AppPkg/Applications/Python: Add Python 2.7.2 sources since the release of Python 2.7.3 made them unavailable from the python.org web site.
These files are a subset of the python-2.7.2.tgz distribution from python.org. Changed files from PyMod-2.7.2 have been copied into the corresponding directories of this tree, replacing the original files in the distribution. Signed-off-by: daryl.mcdaniel@intel.com git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13197 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
BIN
AppPkg/Applications/Python/Python-2.7.2/Lib/test/185test.db
Normal file
BIN
AppPkg/Applications/Python/Python-2.7.2/Lib/test/185test.db
Normal file
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
# Dummy file to make this directory a package.
|
BIN
AppPkg/Applications/Python/Python-2.7.2/Lib/test/audiotest.au
Normal file
BIN
AppPkg/Applications/Python/Python-2.7.2/Lib/test/audiotest.au
Normal file
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
# This should be equivalent to running regrtest.py from the cmdline.
|
||||
# It can be especially handy if you're in an interactive shell, e.g.,
|
||||
# from test import autotest.
|
||||
|
||||
from test import regrtest
|
||||
regrtest.main()
|
@@ -0,0 +1 @@
|
||||
# -*- coding: uft-8 -*-
|
@@ -0,0 +1,2 @@
|
||||
#coding: utf8
|
||||
print '我'
|
36
AppPkg/Applications/Python/Python-2.7.2/Lib/test/badcert.pem
Normal file
36
AppPkg/Applications/Python/Python-2.7.2/Lib/test/badcert.pem
Normal file
@@ -0,0 +1,36 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIICXwIBAAKBgQC8ddrhm+LutBvjYcQlnH21PPIseJ1JVG2HMmN2CmZk2YukO+9L
|
||||
opdJhTvbGfEj0DQs1IE8M+kTUyOmuKfVrFMKwtVeCJphrAnhoz7TYOuLBSqt7lVH
|
||||
fhi/VwovESJlaBOp+WMnfhcduPEYHYx/6cnVapIkZnLt30zu2um+DzA9jQIDAQAB
|
||||
AoGBAK0FZpaKj6WnJZN0RqhhK+ggtBWwBnc0U/ozgKz2j1s3fsShYeiGtW6CK5nU
|
||||
D1dZ5wzhbGThI7LiOXDvRucc9n7vUgi0alqPQ/PFodPxAN/eEYkmXQ7W2k7zwsDA
|
||||
IUK0KUhktQbLu8qF/m8qM86ba9y9/9YkXuQbZ3COl5ahTZrhAkEA301P08RKv3KM
|
||||
oXnGU2UHTuJ1MAD2hOrPxjD4/wxA/39EWG9bZczbJyggB4RHu0I3NOSFjAm3HQm0
|
||||
ANOu5QK9owJBANgOeLfNNcF4pp+UikRFqxk5hULqRAWzVxVrWe85FlPm0VVmHbb/
|
||||
loif7mqjU8o1jTd/LM7RD9f2usZyE2psaw8CQQCNLhkpX3KO5kKJmS9N7JMZSc4j
|
||||
oog58yeYO8BBqKKzpug0LXuQultYv2K4veaIO04iL9VLe5z9S/Q1jaCHBBuXAkEA
|
||||
z8gjGoi1AOp6PBBLZNsncCvcV/0aC+1se4HxTNo2+duKSDnbq+ljqOM+E7odU+Nq
|
||||
ewvIWOG//e8fssd0mq3HywJBAJ8l/c8GVmrpFTx8r/nZ2Pyyjt3dH1widooDXYSV
|
||||
q6Gbf41Llo5sYAtmxdndTLASuHKecacTgZVhy0FryZpLKrU=
|
||||
-----END RSA PRIVATE KEY-----
|
||||
-----BEGIN CERTIFICATE-----
|
||||
Just bad cert data
|
||||
-----END CERTIFICATE-----
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIICXwIBAAKBgQC8ddrhm+LutBvjYcQlnH21PPIseJ1JVG2HMmN2CmZk2YukO+9L
|
||||
opdJhTvbGfEj0DQs1IE8M+kTUyOmuKfVrFMKwtVeCJphrAnhoz7TYOuLBSqt7lVH
|
||||
fhi/VwovESJlaBOp+WMnfhcduPEYHYx/6cnVapIkZnLt30zu2um+DzA9jQIDAQAB
|
||||
AoGBAK0FZpaKj6WnJZN0RqhhK+ggtBWwBnc0U/ozgKz2j1s3fsShYeiGtW6CK5nU
|
||||
D1dZ5wzhbGThI7LiOXDvRucc9n7vUgi0alqPQ/PFodPxAN/eEYkmXQ7W2k7zwsDA
|
||||
IUK0KUhktQbLu8qF/m8qM86ba9y9/9YkXuQbZ3COl5ahTZrhAkEA301P08RKv3KM
|
||||
oXnGU2UHTuJ1MAD2hOrPxjD4/wxA/39EWG9bZczbJyggB4RHu0I3NOSFjAm3HQm0
|
||||
ANOu5QK9owJBANgOeLfNNcF4pp+UikRFqxk5hULqRAWzVxVrWe85FlPm0VVmHbb/
|
||||
loif7mqjU8o1jTd/LM7RD9f2usZyE2psaw8CQQCNLhkpX3KO5kKJmS9N7JMZSc4j
|
||||
oog58yeYO8BBqKKzpug0LXuQultYv2K4veaIO04iL9VLe5z9S/Q1jaCHBBuXAkEA
|
||||
z8gjGoi1AOp6PBBLZNsncCvcV/0aC+1se4HxTNo2+duKSDnbq+ljqOM+E7odU+Nq
|
||||
ewvIWOG//e8fssd0mq3HywJBAJ8l/c8GVmrpFTx8r/nZ2Pyyjt3dH1widooDXYSV
|
||||
q6Gbf41Llo5sYAtmxdndTLASuHKecacTgZVhy0FryZpLKrU=
|
||||
-----END RSA PRIVATE KEY-----
|
||||
-----BEGIN CERTIFICATE-----
|
||||
Just bad cert data
|
||||
-----END CERTIFICATE-----
|
40
AppPkg/Applications/Python/Python-2.7.2/Lib/test/badkey.pem
Normal file
40
AppPkg/Applications/Python/Python-2.7.2/Lib/test/badkey.pem
Normal file
@@ -0,0 +1,40 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
Bad Key, though the cert should be OK
|
||||
-----END RSA PRIVATE KEY-----
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICpzCCAhCgAwIBAgIJAP+qStv1cIGNMA0GCSqGSIb3DQEBBQUAMIGJMQswCQYD
|
||||
VQQGEwJVUzERMA8GA1UECBMIRGVsYXdhcmUxEzARBgNVBAcTCldpbG1pbmd0b24x
|
||||
IzAhBgNVBAoTGlB5dGhvbiBTb2Z0d2FyZSBGb3VuZGF0aW9uMQwwCgYDVQQLEwNT
|
||||
U0wxHzAdBgNVBAMTFnNvbWVtYWNoaW5lLnB5dGhvbi5vcmcwHhcNMDcwODI3MTY1
|
||||
NDUwWhcNMTMwMjE2MTY1NDUwWjCBiTELMAkGA1UEBhMCVVMxETAPBgNVBAgTCERl
|
||||
bGF3YXJlMRMwEQYDVQQHEwpXaWxtaW5ndG9uMSMwIQYDVQQKExpQeXRob24gU29m
|
||||
dHdhcmUgRm91bmRhdGlvbjEMMAoGA1UECxMDU1NMMR8wHQYDVQQDExZzb21lbWFj
|
||||
aGluZS5weXRob24ub3JnMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC8ddrh
|
||||
m+LutBvjYcQlnH21PPIseJ1JVG2HMmN2CmZk2YukO+9LopdJhTvbGfEj0DQs1IE8
|
||||
M+kTUyOmuKfVrFMKwtVeCJphrAnhoz7TYOuLBSqt7lVHfhi/VwovESJlaBOp+WMn
|
||||
fhcduPEYHYx/6cnVapIkZnLt30zu2um+DzA9jQIDAQABoxUwEzARBglghkgBhvhC
|
||||
AQEEBAMCBkAwDQYJKoZIhvcNAQEFBQADgYEAF4Q5BVqmCOLv1n8je/Jw9K669VXb
|
||||
08hyGzQhkemEBYQd6fzQ9A/1ZzHkJKb1P6yreOLSEh4KcxYPyrLRC1ll8nr5OlCx
|
||||
CMhKkTnR6qBsdNV0XtdU2+N25hqW+Ma4ZeqsN/iiJVCGNOZGnvQuvCAGWF8+J/f/
|
||||
iHkC6gGdBJhogs4=
|
||||
-----END CERTIFICATE-----
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
Bad Key, though the cert should be OK
|
||||
-----END RSA PRIVATE KEY-----
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICpzCCAhCgAwIBAgIJAP+qStv1cIGNMA0GCSqGSIb3DQEBBQUAMIGJMQswCQYD
|
||||
VQQGEwJVUzERMA8GA1UECBMIRGVsYXdhcmUxEzARBgNVBAcTCldpbG1pbmd0b24x
|
||||
IzAhBgNVBAoTGlB5dGhvbiBTb2Z0d2FyZSBGb3VuZGF0aW9uMQwwCgYDVQQLEwNT
|
||||
U0wxHzAdBgNVBAMTFnNvbWVtYWNoaW5lLnB5dGhvbi5vcmcwHhcNMDcwODI3MTY1
|
||||
NDUwWhcNMTMwMjE2MTY1NDUwWjCBiTELMAkGA1UEBhMCVVMxETAPBgNVBAgTCERl
|
||||
bGF3YXJlMRMwEQYDVQQHEwpXaWxtaW5ndG9uMSMwIQYDVQQKExpQeXRob24gU29m
|
||||
dHdhcmUgRm91bmRhdGlvbjEMMAoGA1UECxMDU1NMMR8wHQYDVQQDExZzb21lbWFj
|
||||
aGluZS5weXRob24ub3JnMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC8ddrh
|
||||
m+LutBvjYcQlnH21PPIseJ1JVG2HMmN2CmZk2YukO+9LopdJhTvbGfEj0DQs1IE8
|
||||
M+kTUyOmuKfVrFMKwtVeCJphrAnhoz7TYOuLBSqt7lVHfhi/VwovESJlaBOp+WMn
|
||||
fhcduPEYHYx/6cnVapIkZnLt30zu2um+DzA9jQIDAQABoxUwEzARBglghkgBhvhC
|
||||
AQEEBAMCBkAwDQYJKoZIhvcNAQEFBQADgYEAF4Q5BVqmCOLv1n8je/Jw9K669VXb
|
||||
08hyGzQhkemEBYQd6fzQ9A/1ZzHkJKb1P6yreOLSEh4KcxYPyrLRC1ll8nr5OlCx
|
||||
CMhKkTnR6qBsdNV0XtdU2+N25hqW+Ma4ZeqsN/iiJVCGNOZGnvQuvCAGWF8+J/f/
|
||||
iHkC6gGdBJhogs4=
|
||||
-----END CERTIFICATE-----
|
@@ -0,0 +1,10 @@
|
||||
"""This is a test"""
|
||||
from __future__ import nested_scopes
|
||||
from __future__ import rested_snopes
|
||||
|
||||
def f(x):
|
||||
def g(y):
|
||||
return x + y
|
||||
return g
|
||||
|
||||
result = f(2)(4)
|
@@ -0,0 +1,10 @@
|
||||
"""This is a test"""
|
||||
import __future__
|
||||
from __future__ import nested_scopes
|
||||
|
||||
def f(x):
|
||||
def g(y):
|
||||
return x + y
|
||||
return g
|
||||
|
||||
result = f(2)(4)
|
@@ -0,0 +1,12 @@
|
||||
"""This is a test"""
|
||||
from __future__ import nested_scopes
|
||||
import foo
|
||||
from __future__ import nested_scopes
|
||||
|
||||
|
||||
def f(x):
|
||||
def g(y):
|
||||
return x + y
|
||||
return g
|
||||
|
||||
result = f(2)(4)
|
@@ -0,0 +1,10 @@
|
||||
"""This is a test"""
|
||||
"this isn't a doc string"
|
||||
from __future__ import nested_scopes
|
||||
|
||||
def f(x):
|
||||
def g(y):
|
||||
return x + y
|
||||
return g
|
||||
|
||||
result = f(2)(4)
|
@@ -0,0 +1,11 @@
|
||||
"""This is a test"""
|
||||
|
||||
from __future__ import nested_scopes; import string; from __future__ import \
|
||||
nested_scopes
|
||||
|
||||
def f(x):
|
||||
def g(y):
|
||||
return x + y
|
||||
return g
|
||||
|
||||
result = f(2)(4)
|
@@ -0,0 +1,10 @@
|
||||
"""This is a test"""
|
||||
|
||||
from __future__ import *
|
||||
|
||||
def f(x):
|
||||
def g(y):
|
||||
return x + y
|
||||
return g
|
||||
|
||||
print f(2)(4)
|
@@ -0,0 +1,10 @@
|
||||
"""This is a test"""
|
||||
|
||||
from __future__ import nested_scopes, braces
|
||||
|
||||
def f(x):
|
||||
def g(y):
|
||||
return x + y
|
||||
return g
|
||||
|
||||
print f(2)(4)
|
@@ -0,0 +1,2 @@
|
||||
def f(x):
|
||||
[x for x in x] = x
|
206
AppPkg/Applications/Python/Python-2.7.2/Lib/test/buffer_tests.py
Normal file
206
AppPkg/Applications/Python/Python-2.7.2/Lib/test/buffer_tests.py
Normal file
@@ -0,0 +1,206 @@
|
||||
# Tests that work for both bytes and buffer objects.
|
||||
# See PEP 3137.
|
||||
|
||||
import struct
|
||||
import sys
|
||||
|
||||
class MixinBytesBufferCommonTests(object):
|
||||
"""Tests that work for both bytes and buffer objects.
|
||||
See PEP 3137.
|
||||
"""
|
||||
|
||||
def marshal(self, x):
|
||||
"""Convert x into the appropriate type for these tests."""
|
||||
raise RuntimeError('test class must provide a marshal method')
|
||||
|
||||
def test_islower(self):
|
||||
self.assertFalse(self.marshal(b'').islower())
|
||||
self.assertTrue(self.marshal(b'a').islower())
|
||||
self.assertFalse(self.marshal(b'A').islower())
|
||||
self.assertFalse(self.marshal(b'\n').islower())
|
||||
self.assertTrue(self.marshal(b'abc').islower())
|
||||
self.assertFalse(self.marshal(b'aBc').islower())
|
||||
self.assertTrue(self.marshal(b'abc\n').islower())
|
||||
self.assertRaises(TypeError, self.marshal(b'abc').islower, 42)
|
||||
|
||||
def test_isupper(self):
|
||||
self.assertFalse(self.marshal(b'').isupper())
|
||||
self.assertFalse(self.marshal(b'a').isupper())
|
||||
self.assertTrue(self.marshal(b'A').isupper())
|
||||
self.assertFalse(self.marshal(b'\n').isupper())
|
||||
self.assertTrue(self.marshal(b'ABC').isupper())
|
||||
self.assertFalse(self.marshal(b'AbC').isupper())
|
||||
self.assertTrue(self.marshal(b'ABC\n').isupper())
|
||||
self.assertRaises(TypeError, self.marshal(b'abc').isupper, 42)
|
||||
|
||||
def test_istitle(self):
|
||||
self.assertFalse(self.marshal(b'').istitle())
|
||||
self.assertFalse(self.marshal(b'a').istitle())
|
||||
self.assertTrue(self.marshal(b'A').istitle())
|
||||
self.assertFalse(self.marshal(b'\n').istitle())
|
||||
self.assertTrue(self.marshal(b'A Titlecased Line').istitle())
|
||||
self.assertTrue(self.marshal(b'A\nTitlecased Line').istitle())
|
||||
self.assertTrue(self.marshal(b'A Titlecased, Line').istitle())
|
||||
self.assertFalse(self.marshal(b'Not a capitalized String').istitle())
|
||||
self.assertFalse(self.marshal(b'Not\ta Titlecase String').istitle())
|
||||
self.assertFalse(self.marshal(b'Not--a Titlecase String').istitle())
|
||||
self.assertFalse(self.marshal(b'NOT').istitle())
|
||||
self.assertRaises(TypeError, self.marshal(b'abc').istitle, 42)
|
||||
|
||||
def test_isspace(self):
|
||||
self.assertFalse(self.marshal(b'').isspace())
|
||||
self.assertFalse(self.marshal(b'a').isspace())
|
||||
self.assertTrue(self.marshal(b' ').isspace())
|
||||
self.assertTrue(self.marshal(b'\t').isspace())
|
||||
self.assertTrue(self.marshal(b'\r').isspace())
|
||||
self.assertTrue(self.marshal(b'\n').isspace())
|
||||
self.assertTrue(self.marshal(b' \t\r\n').isspace())
|
||||
self.assertFalse(self.marshal(b' \t\r\na').isspace())
|
||||
self.assertRaises(TypeError, self.marshal(b'abc').isspace, 42)
|
||||
|
||||
def test_isalpha(self):
|
||||
self.assertFalse(self.marshal(b'').isalpha())
|
||||
self.assertTrue(self.marshal(b'a').isalpha())
|
||||
self.assertTrue(self.marshal(b'A').isalpha())
|
||||
self.assertFalse(self.marshal(b'\n').isalpha())
|
||||
self.assertTrue(self.marshal(b'abc').isalpha())
|
||||
self.assertFalse(self.marshal(b'aBc123').isalpha())
|
||||
self.assertFalse(self.marshal(b'abc\n').isalpha())
|
||||
self.assertRaises(TypeError, self.marshal(b'abc').isalpha, 42)
|
||||
|
||||
def test_isalnum(self):
|
||||
self.assertFalse(self.marshal(b'').isalnum())
|
||||
self.assertTrue(self.marshal(b'a').isalnum())
|
||||
self.assertTrue(self.marshal(b'A').isalnum())
|
||||
self.assertFalse(self.marshal(b'\n').isalnum())
|
||||
self.assertTrue(self.marshal(b'123abc456').isalnum())
|
||||
self.assertTrue(self.marshal(b'a1b3c').isalnum())
|
||||
self.assertFalse(self.marshal(b'aBc000 ').isalnum())
|
||||
self.assertFalse(self.marshal(b'abc\n').isalnum())
|
||||
self.assertRaises(TypeError, self.marshal(b'abc').isalnum, 42)
|
||||
|
||||
def test_isdigit(self):
|
||||
self.assertFalse(self.marshal(b'').isdigit())
|
||||
self.assertFalse(self.marshal(b'a').isdigit())
|
||||
self.assertTrue(self.marshal(b'0').isdigit())
|
||||
self.assertTrue(self.marshal(b'0123456789').isdigit())
|
||||
self.assertFalse(self.marshal(b'0123456789a').isdigit())
|
||||
|
||||
self.assertRaises(TypeError, self.marshal(b'abc').isdigit, 42)
|
||||
|
||||
def test_lower(self):
|
||||
self.assertEqual(b'hello', self.marshal(b'HeLLo').lower())
|
||||
self.assertEqual(b'hello', self.marshal(b'hello').lower())
|
||||
self.assertRaises(TypeError, self.marshal(b'hello').lower, 42)
|
||||
|
||||
def test_upper(self):
|
||||
self.assertEqual(b'HELLO', self.marshal(b'HeLLo').upper())
|
||||
self.assertEqual(b'HELLO', self.marshal(b'HELLO').upper())
|
||||
self.assertRaises(TypeError, self.marshal(b'hello').upper, 42)
|
||||
|
||||
def test_capitalize(self):
|
||||
self.assertEqual(b' hello ', self.marshal(b' hello ').capitalize())
|
||||
self.assertEqual(b'Hello ', self.marshal(b'Hello ').capitalize())
|
||||
self.assertEqual(b'Hello ', self.marshal(b'hello ').capitalize())
|
||||
self.assertEqual(b'Aaaa', self.marshal(b'aaaa').capitalize())
|
||||
self.assertEqual(b'Aaaa', self.marshal(b'AaAa').capitalize())
|
||||
|
||||
self.assertRaises(TypeError, self.marshal(b'hello').capitalize, 42)
|
||||
|
||||
def test_ljust(self):
|
||||
self.assertEqual(b'abc ', self.marshal(b'abc').ljust(10))
|
||||
self.assertEqual(b'abc ', self.marshal(b'abc').ljust(6))
|
||||
self.assertEqual(b'abc', self.marshal(b'abc').ljust(3))
|
||||
self.assertEqual(b'abc', self.marshal(b'abc').ljust(2))
|
||||
self.assertEqual(b'abc*******', self.marshal(b'abc').ljust(10, '*'))
|
||||
self.assertRaises(TypeError, self.marshal(b'abc').ljust)
|
||||
|
||||
def test_rjust(self):
|
||||
self.assertEqual(b' abc', self.marshal(b'abc').rjust(10))
|
||||
self.assertEqual(b' abc', self.marshal(b'abc').rjust(6))
|
||||
self.assertEqual(b'abc', self.marshal(b'abc').rjust(3))
|
||||
self.assertEqual(b'abc', self.marshal(b'abc').rjust(2))
|
||||
self.assertEqual(b'*******abc', self.marshal(b'abc').rjust(10, '*'))
|
||||
self.assertRaises(TypeError, self.marshal(b'abc').rjust)
|
||||
|
||||
def test_center(self):
|
||||
self.assertEqual(b' abc ', self.marshal(b'abc').center(10))
|
||||
self.assertEqual(b' abc ', self.marshal(b'abc').center(6))
|
||||
self.assertEqual(b'abc', self.marshal(b'abc').center(3))
|
||||
self.assertEqual(b'abc', self.marshal(b'abc').center(2))
|
||||
self.assertEqual(b'***abc****', self.marshal(b'abc').center(10, '*'))
|
||||
self.assertRaises(TypeError, self.marshal(b'abc').center)
|
||||
|
||||
def test_swapcase(self):
|
||||
self.assertEqual(b'hEllO CoMPuTErS',
|
||||
self.marshal(b'HeLLo cOmpUteRs').swapcase())
|
||||
|
||||
self.assertRaises(TypeError, self.marshal(b'hello').swapcase, 42)
|
||||
|
||||
def test_zfill(self):
|
||||
self.assertEqual(b'123', self.marshal(b'123').zfill(2))
|
||||
self.assertEqual(b'123', self.marshal(b'123').zfill(3))
|
||||
self.assertEqual(b'0123', self.marshal(b'123').zfill(4))
|
||||
self.assertEqual(b'+123', self.marshal(b'+123').zfill(3))
|
||||
self.assertEqual(b'+123', self.marshal(b'+123').zfill(4))
|
||||
self.assertEqual(b'+0123', self.marshal(b'+123').zfill(5))
|
||||
self.assertEqual(b'-123', self.marshal(b'-123').zfill(3))
|
||||
self.assertEqual(b'-123', self.marshal(b'-123').zfill(4))
|
||||
self.assertEqual(b'-0123', self.marshal(b'-123').zfill(5))
|
||||
self.assertEqual(b'000', self.marshal(b'').zfill(3))
|
||||
self.assertEqual(b'34', self.marshal(b'34').zfill(1))
|
||||
self.assertEqual(b'0034', self.marshal(b'34').zfill(4))
|
||||
|
||||
self.assertRaises(TypeError, self.marshal(b'123').zfill)
|
||||
|
||||
def test_expandtabs(self):
|
||||
self.assertEqual(b'abc\rab def\ng hi',
|
||||
self.marshal(b'abc\rab\tdef\ng\thi').expandtabs())
|
||||
self.assertEqual(b'abc\rab def\ng hi',
|
||||
self.marshal(b'abc\rab\tdef\ng\thi').expandtabs(8))
|
||||
self.assertEqual(b'abc\rab def\ng hi',
|
||||
self.marshal(b'abc\rab\tdef\ng\thi').expandtabs(4))
|
||||
self.assertEqual(b'abc\r\nab def\ng hi',
|
||||
self.marshal(b'abc\r\nab\tdef\ng\thi').expandtabs(4))
|
||||
self.assertEqual(b'abc\rab def\ng hi',
|
||||
self.marshal(b'abc\rab\tdef\ng\thi').expandtabs())
|
||||
self.assertEqual(b'abc\rab def\ng hi',
|
||||
self.marshal(b'abc\rab\tdef\ng\thi').expandtabs(8))
|
||||
self.assertEqual(b'abc\r\nab\r\ndef\ng\r\nhi',
|
||||
self.marshal(b'abc\r\nab\r\ndef\ng\r\nhi').expandtabs(4))
|
||||
self.assertEqual(b' a\n b', self.marshal(b' \ta\n\tb').expandtabs(1))
|
||||
|
||||
self.assertRaises(TypeError, self.marshal(b'hello').expandtabs, 42, 42)
|
||||
# This test is only valid when sizeof(int) == sizeof(void*) == 4.
|
||||
if sys.maxint < (1 << 32) and struct.calcsize('P') == 4:
|
||||
self.assertRaises(OverflowError,
|
||||
self.marshal(b'\ta\n\tb').expandtabs, sys.maxint)
|
||||
|
||||
def test_title(self):
|
||||
self.assertEqual(b' Hello ', self.marshal(b' hello ').title())
|
||||
self.assertEqual(b'Hello ', self.marshal(b'hello ').title())
|
||||
self.assertEqual(b'Hello ', self.marshal(b'Hello ').title())
|
||||
self.assertEqual(b'Format This As Title String',
|
||||
self.marshal(b'fOrMaT thIs aS titLe String').title())
|
||||
self.assertEqual(b'Format,This-As*Title;String',
|
||||
self.marshal(b'fOrMaT,thIs-aS*titLe;String').title())
|
||||
self.assertEqual(b'Getint', self.marshal(b'getInt').title())
|
||||
self.assertRaises(TypeError, self.marshal(b'hello').title, 42)
|
||||
|
||||
def test_splitlines(self):
|
||||
self.assertEqual([b'abc', b'def', b'', b'ghi'],
|
||||
self.marshal(b'abc\ndef\n\rghi').splitlines())
|
||||
self.assertEqual([b'abc', b'def', b'', b'ghi'],
|
||||
self.marshal(b'abc\ndef\n\r\nghi').splitlines())
|
||||
self.assertEqual([b'abc', b'def', b'ghi'],
|
||||
self.marshal(b'abc\ndef\r\nghi').splitlines())
|
||||
self.assertEqual([b'abc', b'def', b'ghi'],
|
||||
self.marshal(b'abc\ndef\r\nghi\n').splitlines())
|
||||
self.assertEqual([b'abc', b'def', b'ghi', b''],
|
||||
self.marshal(b'abc\ndef\r\nghi\n\r').splitlines())
|
||||
self.assertEqual([b'', b'abc', b'def', b'ghi', b''],
|
||||
self.marshal(b'\nabc\ndef\r\nghi\n\r').splitlines())
|
||||
self.assertEqual([b'\n', b'abc\n', b'def\r\n', b'ghi\n', b'\r'],
|
||||
self.marshal(b'\nabc\ndef\r\nghi\n\r').splitlines(1))
|
||||
|
||||
self.assertRaises(TypeError, self.marshal(b'abc').splitlines, 42, 42)
|
@@ -0,0 +1,2 @@
|
||||
[Foo Bar]
|
||||
foo=newbar
|
@@ -0,0 +1,13 @@
|
||||
rem Check for a working sound-card - exit with 0 if OK, 1 otherwise.
|
||||
set wmi = GetObject("winmgmts:")
|
||||
set scs = wmi.InstancesOf("win32_sounddevice")
|
||||
for each sc in scs
|
||||
set status = sc.Properties_("Status")
|
||||
wscript.Echo(sc.Properties_("Name") + "/" + status)
|
||||
if status = "OK" then
|
||||
wscript.Quit 0 rem normal exit
|
||||
end if
|
||||
next
|
||||
rem No sound card found - exit with status code of 1
|
||||
wscript.Quit 1
|
||||
|
@@ -0,0 +1,9 @@
|
||||
如何在 Python 中使用既有的 C library?
|
||||
在資訊科技快速發展的今天, 開發及測試軟體的速度是不容忽視的
|
||||
課題. 為加快開發及測試的速度, 我們便常希望能利用一些已開發好的
|
||||
library, 並有一個 fast prototyping 的 programming language 可
|
||||
供使用. 目前有許許多多的 library 是以 C 寫成, 而 Python 是一個
|
||||
fast prototyping 的 programming language. 故我們希望能將既有的
|
||||
C library 拿到 Python 的環境中測試及整合. 其中最主要也是我們所
|
||||
要討論的問題就是:
|
||||
|
@@ -0,0 +1,9 @@
|
||||
<EFBFBD>p<EFBFBD><EFBFBD><EFBFBD>b Python <20><><EFBFBD>ϥάJ<CEAC><4A><EFBFBD><EFBFBD> C library?
|
||||
<EFBFBD>@<40>b<EFBFBD><62><EFBFBD>T<EFBFBD><54><EFBFBD>ާֳt<D6B3>o<EFBFBD>i<EFBFBD><69><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20>}<7D>o<EFBFBD>δ<EFBFBD><CEB4>ճn<D5B3>骺<EFBFBD>t<EFBFBD>O<D7AC><4F><EFBFBD>e<EFBFBD><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD>D. <20><><EFBFBD>[<5B>ֶ}<7D>o<EFBFBD>δ<EFBFBD><CEB4>ժ<EFBFBD><D5AA>t<EFBFBD><74>, <20>ڭ̫K<CCAB>`<60>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>Q<EFBFBD>Τ@<40>Ǥw<C7A4>}<7D>o<EFBFBD>n<EFBFBD><6E>
|
||||
library, <20>æ<EFBFBD><C3A6>@<40><> fast prototyping <20><> programming language <20>i
|
||||
<EFBFBD>Ѩϥ<EFBFBD>. <20>ثe<D8AB><65><EFBFBD>\<5C>\<5C>h<EFBFBD>h<EFBFBD><68> library <20>O<EFBFBD>H C <20>g<EFBFBD><67>, <20><> Python <20>O<EFBFBD>@<40><>
|
||||
fast prototyping <20><> programming language. <20>G<EFBFBD>ڭ̧Ʊ<CCA7><C6B1><EFBFBD><EFBFBD>N<EFBFBD>J<EFBFBD><4A><EFBFBD><EFBFBD>
|
||||
C library <20><><EFBFBD><EFBFBD> Python <20><><EFBFBD><EFBFBD><EFBFBD>Ҥ<EFBFBD><D2A4><EFBFBD><EFBFBD>դξ<D5A4><CEBE>X. <20>䤤<EFBFBD>̥D<CCA5>n<EFBFBD>]<5D>O<EFBFBD>ڭ̩<DAAD>
|
||||
<EFBFBD>n<EFBFBD>Q<EFBFBD>ת<EFBFBD><EFBFBD><EFBFBD><EFBFBD>D<EFBFBD>N<EFBFBD>O:
|
||||
|
@@ -0,0 +1,2 @@
|
||||
𠄌Ě鵮罓洆
|
||||
ÊÊ̄ê êê̄
|
@@ -0,0 +1,2 @@
|
||||
<EFBFBD>E<EFBFBD>\<5C>s<EFBFBD>ڍ<EFBFBD>
|
||||
<EFBFBD>f<EFBFBD>b<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
@@ -0,0 +1,9 @@
|
||||
똠방각하 펲시콜라
|
||||
|
||||
㉯㉯납!! 因九月패믤릔궈 ⓡⓖ훀¿¿¿ 긍뒙 ⓔ뎨 ㉯. .
|
||||
亞영ⓔ능횹 . . . . 서울뤄 뎐학乙 家훀 ! ! !ㅠ.ㅠ
|
||||
흐흐흐 ㄱㄱㄱ☆ㅠ_ㅠ 어릨 탸콰긐 뎌응 칑九들乙 ㉯드긐
|
||||
설릌 家훀 . . . . 굴애쉌 ⓔ궈 ⓡ릘㉱긐 因仁川女中까즼
|
||||
와쒀훀 ! ! 亞영ⓔ 家능궈 ☆上관 없능궈능 亞능뒈훀 글애듴
|
||||
ⓡ려듀九 싀풔숴훀 어릨 因仁川女中싁⑨들앜!! ㉯㉯납♡ ⌒⌒*
|
||||
|
@@ -0,0 +1,9 @@
|
||||
<EFBFBD>c<EFBFBD>氢<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ݶ<EFBFBD>
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!! <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>В<EFBFBD><D092>p<EFBFBD><70> <20>ި<EFBFBD><DEA8>R<EFBFBD><52><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ѵ<EFBFBD> <20><>. .
|
||||
䬿<EFBFBD><EFBFBD>Ѵ<EFBFBD><EFBFBD><EFBFBD> . . . . <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ʫ<>R ! ! !<21><>.<2E><>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>٤<EFBFBD>_<EFBFBD><5F> <20> <20><><EFBFBD><EFBFBD><EFBFBD>O <20><><EFBFBD><EFBFBD> <20>h<EFBFBD><68><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>O
|
||||
<EFBFBD><EFBFBD><EFBFBD>j ʫ<>R . . . . <20><><EFBFBD>֚f <20>ѱ<EFBFBD> <20>ސt<DE90>O <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD>;<EFBFBD><EFBFBD>R ! ! 䬿<><E4ACBF><EFBFBD> ʫ<>ɱ<EFBFBD> <20><>߾<EFBFBD><DFBE> <20><><EFBFBD>ɱŴ<C9B1> 䬴ɵ<E4ACB4><C9B5>R <20>۾֊<DBBE>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ǵ<EFBFBD><C7B4><EFBFBD>R <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĩ<EFBFBD><C4A8><EFBFBD><EFBFBD><EFBFBD>!! <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ҡ<EFBFBD>*
|
||||
|
@@ -0,0 +1,8 @@
|
||||
Python の開発は、1990 年ごろから開始されています。
|
||||
開発者の Guido van Rossum は教育用のプログラミング言語「ABC」の開発に参加していましたが、ABC は実用上の目的にはあまり適していませんでした。
|
||||
このため、Guido はより実用的なプログラミング言語の開発を開始し、英国 BBS 放送のコメディ番組「モンティ パイソン」のファンである Guido はこの言語を「Python」と名づけました。
|
||||
このような背景から生まれた Python の言語設計は、「シンプル」で「習得が容易」という目標に重点が置かれています。
|
||||
多くのスクリプト系言語ではユーザの目先の利便性を優先して色々な機能を言語要素として取り入れる場合が多いのですが、Python ではそういった小細工が追加されることはあまりありません。
|
||||
言語自体の機能は最小限に押さえ、必要な機能は拡張モジュールとして追加する、というのが Python のポリシーです。
|
||||
|
||||
ノか゚ ト゚ トキ喝塀 𡚴𪎌 麀齁𩛰
|
@@ -0,0 +1,8 @@
|
||||
Python <20>γ<EFBFBD>ȯ<EFBFBD>ϡ<EFBFBD>1990 ǯ<><C7AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>鳫<EFBFBD>Ϥ<EFBFBD><CFA4><EFBFBD><EFBFBD>Ƥ<EFBFBD><C6A4>ޤ<EFBFBD><DEA4><EFBFBD>
|
||||
<EFBFBD><EFBFBD>ȯ<EFBFBD>Ԥ<EFBFBD> Guido van Rossum <20>϶<EFBFBD><CFB6><EFBFBD><EFBFBD>ѤΥץ<CEA5><D7A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߥ<DFA5><F3A5B0B8><EFBFBD><EFBFBD><EFBFBD>ABC<42>פγ<D7A4>ȯ<EFBFBD>˻<EFBFBD><CBBB>ä<EFBFBD><C3A4>Ƥ<EFBFBD><C6A4>ޤ<EFBFBD><DEA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ABC <20>ϼ<EFBFBD><CFBC>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD>Ū<EFBFBD>ˤϤ<CBA4><CFA4>ޤ<EFBFBD>Ŭ<EFBFBD><C5AC><EFBFBD>Ƥ<EFBFBD><C6A4>ޤ<EFBFBD><DEA4><EFBFBD><EFBFBD>Ǥ<EFBFBD><C7A4><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD>Τ<EFBFBD><EFBFBD>ᡢGuido <20>Ϥ<EFBFBD><CFA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ū<EFBFBD>ʥץ<CAA5><D7A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߥ<DFA5><F3A5B0B8><EFBFBD><EFBFBD>γ<EFBFBD>ȯ<EFBFBD>Ϥ<F2B3ABBB><CFA4><EFBFBD><EFBFBD>ѹ<EFBFBD> BBS <20><><EFBFBD><EFBFBD><EFBFBD>Υ<EFBFBD><CEA5><EFBFBD><EFBFBD>ǥ<EFBFBD><C7A5><EFBFBD><EFBFBD>ȡ֥<C8A1><D6A5><EFBFBD><EFBFBD>ƥ<EFBFBD> <20>ѥ<EFBFBD><D1A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>פΥե<CEA5><D5A5><EFBFBD><EFBFBD>Ǥ<EFBFBD><C7A4><EFBFBD> Guido <20>Ϥ<EFBFBD><CFA4>θ<EFBFBD><CEB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Python<6F>פ<EFBFBD>̾<EFBFBD>Ť<EFBFBD><C5A4>ޤ<EFBFBD><DEA4><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD>Τ褦<EFBFBD><EFBFBD><EFBFBD>طʤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޤ줿 Python <20>θ<EFBFBD><CEB8><EFBFBD><EFBFBD>߷פϡ<D7A4><CFA1>֥<EFBFBD><D6A5><EFBFBD><EFBFBD>ץ<EFBFBD><D7A5>פǡֽ<C7A1><D6BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ưספȤ<D7A4><C8A4><EFBFBD><EFBFBD><EFBFBD>ɸ<EFBFBD>˽<EFBFBD><CBBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>Ƥ<EFBFBD><C6A4>ޤ<EFBFBD><DEA4><EFBFBD>
|
||||
¿<EFBFBD><EFBFBD><EFBFBD>Υ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ץȷϸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǥϥ桼<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͥ<EFBFBD>褷<EFBFBD>ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD>ǽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǤȤ<EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>礬¿<EFBFBD><EFBFBD><EFBFBD>ΤǤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Python <20>ǤϤ<C7A4><CFA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ä<EFBFBD><C3A4><EFBFBD><EFBFBD>ٹ<EFBFBD><D9B9><EFBFBD><EFBFBD>ɲä<C9B2><C3A4><EFBFBD><EFBFBD>뤳<EFBFBD>ȤϤ<C8A4><CFA4>ޤꤢ<DEA4><EAA4A2><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD>켫<EFBFBD>Τε<EFBFBD>ǽ<EFBFBD>ϺǾ<EFBFBD><EFBFBD>¤˲<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɬ<EFBFBD>פʵ<EFBFBD>ǽ<EFBFBD>ϳ<EFBFBD>ĥ<EFBFBD>⥸<EFBFBD>塼<EFBFBD><EFBFBD><EFBFBD>Ȥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɲä<EFBFBD><EFBFBD>롢<EFBFBD>Ȥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Τ<EFBFBD> Python <20>Υݥꥷ<DDA5><EAA5B7><EFBFBD>Ǥ<EFBFBD><C7A4><EFBFBD>
|
||||
|
||||
<EFBFBD>Τ<EFBFBD> <20><> <20>ȥ<EFBFBD><C8A5><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><>ԏ<EFBFBD><D48F><EFBFBD><EFBFBD><EFBFBD>
|
@@ -0,0 +1,7 @@
|
||||
Python の開発は、1990 年ごろから開始されています。
|
||||
開発者の Guido van Rossum は教育用のプログラミング言語「ABC」の開発に参加していましたが、ABC は実用上の目的にはあまり適していませんでした。
|
||||
このため、Guido はより実用的なプログラミング言語の開発を開始し、英国 BBS 放送のコメディ番組「モンティ パイソン」のファンである Guido はこの言語を「Python」と名づけました。
|
||||
このような背景から生まれた Python の言語設計は、「シンプル」で「習得が容易」という目標に重点が置かれています。
|
||||
多くのスクリプト系言語ではユーザの目先の利便性を優先して色々な機能を言語要素として取り入れる場合が多いのですが、Python ではそういった小細工が追加されることはあまりありません。
|
||||
言語自体の機能は最小限に押さえ、必要な機能は拡張モジュールとして追加する、というのが Python のポリシーです。
|
||||
|
@@ -0,0 +1,7 @@
|
||||
Python <20>γ<EFBFBD>ȯ<EFBFBD>ϡ<EFBFBD>1990 ǯ<><C7AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>鳫<EFBFBD>Ϥ<EFBFBD><CFA4><EFBFBD><EFBFBD>Ƥ<EFBFBD><C6A4>ޤ<EFBFBD><DEA4><EFBFBD>
|
||||
<EFBFBD><EFBFBD>ȯ<EFBFBD>Ԥ<EFBFBD> Guido van Rossum <20>϶<EFBFBD><CFB6><EFBFBD><EFBFBD>ѤΥץ<CEA5><D7A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߥ<DFA5><F3A5B0B8><EFBFBD><EFBFBD><EFBFBD>ABC<42>פγ<D7A4>ȯ<EFBFBD>˻<EFBFBD><CBBB>ä<EFBFBD><C3A4>Ƥ<EFBFBD><C6A4>ޤ<EFBFBD><DEA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ABC <20>ϼ<EFBFBD><CFBC>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD>Ū<EFBFBD>ˤϤ<CBA4><CFA4>ޤ<EFBFBD>Ŭ<EFBFBD><C5AC><EFBFBD>Ƥ<EFBFBD><C6A4>ޤ<EFBFBD><DEA4><EFBFBD><EFBFBD>Ǥ<EFBFBD><C7A4><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD>Τ<EFBFBD><EFBFBD>ᡢGuido <20>Ϥ<EFBFBD><CFA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ū<EFBFBD>ʥץ<CAA5><D7A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߥ<DFA5><F3A5B0B8><EFBFBD><EFBFBD>γ<EFBFBD>ȯ<EFBFBD>Ϥ<F2B3ABBB><CFA4><EFBFBD><EFBFBD>ѹ<EFBFBD> BBS <20><><EFBFBD><EFBFBD><EFBFBD>Υ<EFBFBD><CEA5><EFBFBD><EFBFBD>ǥ<EFBFBD><C7A5><EFBFBD><EFBFBD>ȡ֥<C8A1><D6A5><EFBFBD><EFBFBD>ƥ<EFBFBD> <20>ѥ<EFBFBD><D1A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>פΥե<CEA5><D5A5><EFBFBD><EFBFBD>Ǥ<EFBFBD><C7A4><EFBFBD> Guido <20>Ϥ<EFBFBD><CFA4>θ<EFBFBD><CEB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Python<6F>פ<EFBFBD>̾<EFBFBD>Ť<EFBFBD><C5A4>ޤ<EFBFBD><DEA4><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD>Τ褦<EFBFBD><EFBFBD><EFBFBD>طʤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޤ줿 Python <20>θ<EFBFBD><CEB8><EFBFBD><EFBFBD>߷פϡ<D7A4><CFA1>֥<EFBFBD><D6A5><EFBFBD><EFBFBD>ץ<EFBFBD><D7A5>פǡֽ<C7A1><D6BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ưספȤ<D7A4><C8A4><EFBFBD><EFBFBD><EFBFBD>ɸ<EFBFBD>˽<EFBFBD><CBBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>Ƥ<EFBFBD><C6A4>ޤ<EFBFBD><DEA4><EFBFBD>
|
||||
¿<EFBFBD><EFBFBD><EFBFBD>Υ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ץȷϸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǥϥ桼<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͥ<EFBFBD>褷<EFBFBD>ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD>ǽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǤȤ<EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>礬¿<EFBFBD><EFBFBD><EFBFBD>ΤǤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Python <20>ǤϤ<C7A4><CFA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ä<EFBFBD><C3A4><EFBFBD><EFBFBD>ٹ<EFBFBD><D9B9><EFBFBD><EFBFBD>ɲä<C9B2><C3A4><EFBFBD><EFBFBD>뤳<EFBFBD>ȤϤ<C8A4><CFA4>ޤꤢ<DEA4><EAA4A2><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD>켫<EFBFBD>Τε<EFBFBD>ǽ<EFBFBD>ϺǾ<EFBFBD><EFBFBD>¤˲<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɬ<EFBFBD>פʵ<EFBFBD>ǽ<EFBFBD>ϳ<EFBFBD>ĥ<EFBFBD>⥸<EFBFBD>塼<EFBFBD><EFBFBD><EFBFBD>Ȥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɲä<EFBFBD><EFBFBD>롢<EFBFBD>Ȥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Τ<EFBFBD> Python <20>Υݥꥷ<DDA5><EAA5B7><EFBFBD>Ǥ<EFBFBD><C7A4><EFBFBD>
|
||||
|
@@ -0,0 +1,7 @@
|
||||
◎ 파이썬(Python)은 배우기 쉽고, 강력한 프로그래밍 언어입니다. 파이썬은
|
||||
효율적인 고수준 데이터 구조와 간단하지만 효율적인 객체지향프로그래밍을
|
||||
지원합니다. 파이썬의 우아(優雅)한 문법과 동적 타이핑, 그리고 인터프리팅
|
||||
환경은 파이썬을 스크립팅과 여러 분야에서와 대부분의 플랫폼에서의 빠른
|
||||
애플리케이션 개발을 할 수 있는 이상적인 언어로 만들어줍니다.
|
||||
|
||||
☆첫가끝: 날아라 쓔쓔쓩~ 닁큼! 뜽금없이 전홥니다. 뷁. 그런거 읎다.
|
@@ -0,0 +1,7 @@
|
||||
<EFBFBD><EFBFBD> <20><><EFBFBD>̽<EFBFBD>(Python)<29><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>. <20><><EFBFBD>̽<EFBFBD><CCBD><EFBFBD>
|
||||
ȿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ȿ<><C8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ü<EFBFBD><C3BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>α<CEB1><D7B7><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>մϴ<EFBFBD>. <20><><EFBFBD>̽<EFBFBD><CCBD><EFBFBD> <20><><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD>)<29><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> Ÿ<><C5B8><EFBFBD><EFBFBD>, <20><EFBFBD><D7B8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
ȯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>̽<EFBFBD><CCBD><EFBFBD> <20><>ũ<EFBFBD><C5A9><EFBFBD>ð<EFBFBD> <20><><EFBFBD><EFBFBD> <20>о߿<D0BE><DFBF><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>κ<EFBFBD><CEBA><EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD>ø<EFBFBD><EFBFBD><EFBFBD><EFBFBD>̼<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><> <20>ִ<EFBFBD> <20>̻<EFBFBD><CCBB><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݴϴ<DDB4>.
|
||||
|
||||
<EFBFBD><EFBFBD>ù<EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD>ƶ<EFBFBD> <20>Ԥ<EFBFBD><D4A4>ФԤԤ<D4A4><D4A4>ФԾ<D0A4>~ <20>Ԥ<EFBFBD><D4A4>Ҥ<EFBFBD>ŭ! <20>Ԥ<EFBFBD><D4A4>Ѥ<EFBFBD><D1A4>ݾ<EFBFBD><DDBE><EFBFBD> <20><><EFBFBD>Ԥ<EFBFBD><D4A4>Ȥ<EFBFBD><C8A4>ϴ<EFBFBD>. <20>Ԥ<EFBFBD><D4A4>Τ<EFBFBD>. <20><EFBFBD><D7B7><EFBFBD> <20>Ԥ<EFBFBD><D4A4>Ѥ<EFBFBD><D1A4><EFBFBD>.
|
@@ -0,0 +1,15 @@
|
||||
Python(派森)语言是一种功能强大而完善的通用型计算机程序设计语言,
|
||||
已经具有十多年的发展历史,成熟且稳定。这种语言具有非常简捷而清晰
|
||||
的语法特点,适合完成各种高层任务,几乎可以在所有的操作系统中
|
||||
运行。这种语言简单而强大,适合各种人士学习使用。目前,基于这
|
||||
种语言的相关技术正在飞速的发展,用户数量急剧扩大,相关的资源非常多。
|
||||
如何在 Python 中使用既有的 C library?
|
||||
在資訊科技快速發展的今天, 開發及測試軟體的速度是不容忽視的
|
||||
課題. 為加快開發及測試的速度, 我們便常希望能利用一些已開發好的
|
||||
library, 並有一個 fast prototyping 的 programming language 可
|
||||
供使用. 目前有許許多多的 library 是以 C 寫成, 而 Python 是一個
|
||||
fast prototyping 的 programming language. 故我們希望能將既有的
|
||||
C library 拿到 Python 的環境中測試及整合. 其中最主要也是我們所
|
||||
要討論的問題就是:
|
||||
파이썬은 강력한 기능을 지닌 범용 컴퓨터 프로그래밍 언어다.
|
||||
|
@@ -0,0 +1,15 @@
|
||||
Python<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD>ֹ<EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD>ͨ<EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԣ<EFBFBD>
|
||||
<EFBFBD>Ѿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ķ<EFBFBD>չ<EFBFBD><EFBFBD>ʷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ծ<EFBFBD><EFBFBD>зdz<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص㣬<EFBFBD>ʺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɸ<EFBFBD><EFBFBD>ָ߲<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>еIJ<EFBFBD><EFBFBD><EFBFBD>ϵͳ<EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD>ǿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʺϸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʿѧϰʹ<EFBFBD>á<EFBFBD>Ŀǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ե<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڷ<EFBFBD><EFBFBD>ٵķ<EFBFBD>չ<EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD><EFBFBD><EFBFBD>Դ<EFBFBD>dz<EFBFBD><EFBFBD>ࡣ
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Python <20><>ʹ<EFBFBD>ü<EFBFBD><C3BC>е<EFBFBD> C library?
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>YӍ<EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ٰlչ<EFBFBD>Ľ<EFBFBD><EFBFBD><EFBFBD>, <20>_<EFBFBD>l<EFBFBD><6C><EFBFBD>yԇܛ<D487>w<EFBFBD><77><EFBFBD>ٶ<EFBFBD><D9B6>Dz<EFBFBD><C7B2>ݺ<EFBFBD>ҕ<EFBFBD><D295>
|
||||
<EFBFBD>n<EFBFBD>}. <20><><EFBFBD>ӿ<EFBFBD><D3BF>_<EFBFBD>l<EFBFBD><6C><EFBFBD>yԇ<79><D487><EFBFBD>ٶ<EFBFBD>, <20>҂<EFBFBD><D282>㳣ϣ<E3B3A3><CFA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һЩ<D2BB><D0A9><EFBFBD>_<EFBFBD>l<EFBFBD>õ<EFBFBD>
|
||||
library, <20>K<EFBFBD><4B>һ<EFBFBD><D2BB> fast prototyping <20><> programming language <20><>
|
||||
<EFBFBD><EFBFBD>ʹ<EFBFBD><EFBFBD>. Ŀǰ<C4BF><C7B0><EFBFBD>S<EFBFBD>S<EFBFBD><53><EFBFBD><EFBFBD><EFBFBD><EFBFBD> library <20><><EFBFBD><EFBFBD> C <20><><EFBFBD><EFBFBD>, <20><> Python <20><>һ<EFBFBD><D2BB>
|
||||
fast prototyping <20><> programming language. <20><><EFBFBD>҂<EFBFBD>ϣ<EFBFBD><CFA3><EFBFBD>܌<EFBFBD><DC8C><EFBFBD><EFBFBD>е<EFBFBD>
|
||||
C library <20>õ<EFBFBD> Python <20>ĭh<C4AD><68><EFBFBD>Мyԇ<79><D487><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҪҲ<D2AA><D2B2><EFBFBD>҂<EFBFBD><D282><EFBFBD>
|
||||
ҪӑՓ<EFBFBD>Ć<EFBFBD><EFBFBD>}<7D><><EFBFBD><EFBFBD>:
|
||||
<EFBFBD>5<EFBFBD>1<EFBFBD>3<EFBFBD>3<EFBFBD>2<EFBFBD>1<EFBFBD>3<EFBFBD>1 <20>7<EFBFBD>6<EFBFBD>0<EFBFBD>4<EFBFBD>6<EFBFBD>3 <20>8<EFBFBD>5<EFBFBD>8<EFBFBD>6<EFBFBD>3<EFBFBD>5 <20>3<EFBFBD>1<EFBFBD>9<EFBFBD>5 <20>0<EFBFBD>9<EFBFBD>3<EFBFBD>0 <20>4<EFBFBD>3<EFBFBD>5<EFBFBD>7<EFBFBD>5<EFBFBD>5 <20>5<EFBFBD>5<EFBFBD>0<EFBFBD>9<EFBFBD>8<EFBFBD>9<EFBFBD>9<EFBFBD>3<EFBFBD>0<EFBFBD>4 <20>2<EFBFBD>9<EFBFBD>2<EFBFBD>5<EFBFBD>9<EFBFBD>9.
|
||||
|
@@ -0,0 +1,6 @@
|
||||
Python(派森)语言是一种功能强大而完善的通用型计算机程序设计语言,
|
||||
已经具有十多年的发展历史,成熟且稳定。这种语言具有非常简捷而清晰
|
||||
的语法特点,适合完成各种高层任务,几乎可以在所有的操作系统中
|
||||
运行。这种语言简单而强大,适合各种人士学习使用。目前,基于这
|
||||
种语言的相关技术正在飞速的发展,用户数量急剧扩大,相关的资源非常多。
|
||||
|
@@ -0,0 +1,6 @@
|
||||
Python<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD>ֹ<EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD>ͨ<EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԣ<EFBFBD>
|
||||
<EFBFBD>Ѿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ķ<EFBFBD>չ<EFBFBD><EFBFBD>ʷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ծ<EFBFBD><EFBFBD>зdz<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص㣬<EFBFBD>ʺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɸ<EFBFBD><EFBFBD>ָ߲<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>еIJ<EFBFBD><EFBFBD><EFBFBD>ϵͳ<EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD>ǿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʺϸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʿѧϰʹ<EFBFBD>á<EFBFBD>Ŀǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ե<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڷ<EFBFBD><EFBFBD>ٵķ<EFBFBD>չ<EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD><EFBFBD><EFBFBD>Դ<EFBFBD>dz<EFBFBD><EFBFBD>ࡣ
|
||||
|
@@ -0,0 +1,14 @@
|
||||
Python(派森)语言是一种功能强大而完善的通用型计算机程序设计语言,
|
||||
已经具有十多年的发展历史,成熟且稳定。这种语言具有非常简捷而清晰
|
||||
的语法特点,适合完成各种高层任务,几乎可以在所有的操作系统中
|
||||
运行。这种语言简单而强大,适合各种人士学习使用。目前,基于这
|
||||
种语言的相关技术正在飞速的发展,用户数量急剧扩大,相关的资源非常多。
|
||||
如何在 Python 中使用既有的 C library?
|
||||
在資訊科技快速發展的今天, 開發及測試軟體的速度是不容忽視的
|
||||
課題. 為加快開發及測試的速度, 我們便常希望能利用一些已開發好的
|
||||
library, 並有一個 fast prototyping 的 programming language 可
|
||||
供使用. 目前有許許多多的 library 是以 C 寫成, 而 Python 是一個
|
||||
fast prototyping 的 programming language. 故我們希望能將既有的
|
||||
C library 拿到 Python 的環境中測試及整合. 其中最主要也是我們所
|
||||
要討論的問題就是:
|
||||
|
@@ -0,0 +1,14 @@
|
||||
Python<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD>ֹ<EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD>ͨ<EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԣ<EFBFBD>
|
||||
<EFBFBD>Ѿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ķ<EFBFBD>չ<EFBFBD><EFBFBD>ʷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ծ<EFBFBD><EFBFBD>зdz<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص㣬<EFBFBD>ʺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɸ<EFBFBD><EFBFBD>ָ߲<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>еIJ<EFBFBD><EFBFBD><EFBFBD>ϵͳ<EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD>ǿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʺϸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʿѧϰʹ<EFBFBD>á<EFBFBD>Ŀǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ե<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڷ<EFBFBD><EFBFBD>ٵķ<EFBFBD>չ<EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD><EFBFBD><EFBFBD>Դ<EFBFBD>dz<EFBFBD><EFBFBD>ࡣ
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Python <20><>ʹ<EFBFBD>ü<EFBFBD><C3BC>е<EFBFBD> C library?
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>YӍ<EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ٰlչ<EFBFBD>Ľ<EFBFBD><EFBFBD><EFBFBD>, <20>_<EFBFBD>l<EFBFBD><6C><EFBFBD>yԇܛ<D487>w<EFBFBD><77><EFBFBD>ٶ<EFBFBD><D9B6>Dz<EFBFBD><C7B2>ݺ<EFBFBD>ҕ<EFBFBD><D295>
|
||||
<EFBFBD>n<EFBFBD>}. <20><><EFBFBD>ӿ<EFBFBD><D3BF>_<EFBFBD>l<EFBFBD><6C><EFBFBD>yԇ<79><D487><EFBFBD>ٶ<EFBFBD>, <20>҂<EFBFBD><D282>㳣ϣ<E3B3A3><CFA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һЩ<D2BB><D0A9><EFBFBD>_<EFBFBD>l<EFBFBD>õ<EFBFBD>
|
||||
library, <20>K<EFBFBD><4B>һ<EFBFBD><D2BB> fast prototyping <20><> programming language <20><>
|
||||
<EFBFBD><EFBFBD>ʹ<EFBFBD><EFBFBD>. Ŀǰ<C4BF><C7B0><EFBFBD>S<EFBFBD>S<EFBFBD><53><EFBFBD><EFBFBD><EFBFBD><EFBFBD> library <20><><EFBFBD><EFBFBD> C <20><><EFBFBD><EFBFBD>, <20><> Python <20><>һ<EFBFBD><D2BB>
|
||||
fast prototyping <20><> programming language. <20><><EFBFBD>҂<EFBFBD>ϣ<EFBFBD><CFA3><EFBFBD>܌<EFBFBD><DC8C><EFBFBD><EFBFBD>е<EFBFBD>
|
||||
C library <20>õ<EFBFBD> Python <20>ĭh<C4AD><68><EFBFBD>Мyԇ<79><D487><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҪҲ<D2AA><D2B2><EFBFBD>҂<EFBFBD><D282><EFBFBD>
|
||||
ҪӑՓ<EFBFBD>Ć<EFBFBD><EFBFBD>}<7D><><EFBFBD><EFBFBD>:
|
||||
|
@@ -0,0 +1,2 @@
|
||||
This sentence is in ASCII.
|
||||
The next sentence is in GB.己所不欲,勿施於人。Bye.
|
@@ -0,0 +1,2 @@
|
||||
This sentence is in ASCII.
|
||||
The next sentence is in GB.~{<:Ky2;S{#,NpJ)l6HK!#~}Bye.
|
@@ -0,0 +1,9 @@
|
||||
똠방각하 펲시콜라
|
||||
|
||||
㉯㉯납!! 因九月패믤릔궈 ⓡⓖ훀¿¿¿ 긍뒙 ⓔ뎨 ㉯. .
|
||||
亞영ⓔ능횹 . . . . 서울뤄 뎐학乙 家훀 ! ! !ㅠ.ㅠ
|
||||
흐흐흐 ㄱㄱㄱ☆ㅠ_ㅠ 어릨 탸콰긐 뎌응 칑九들乙 ㉯드긐
|
||||
설릌 家훀 . . . . 굴애쉌 ⓔ궈 ⓡ릘㉱긐 因仁川女中까즼
|
||||
와쒀훀 ! ! 亞영ⓔ 家능궈 ☆上관 없능궈능 亞능뒈훀 글애듴
|
||||
ⓡ려듀九 싀풔숴훀 어릨 因仁川女中싁⑨들앜!! ㉯㉯납♡ ⌒⌒*
|
||||
|
@@ -0,0 +1,9 @@
|
||||
<EFBFBD><EFBFBD><EFBFBD>w<EFBFBD>b<EFBFBD>a <20>\<5C><>ũ<EFBFBD>a
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>s!! <20>g<EFBFBD><67><EFBFBD>Ú<55><CC81><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>zٯٯٯ <20>w<EFBFBD><77> <20>ѕ<EFBFBD> <20><>. .
|
||||
<EFBFBD><<3C>w<EFBFBD>ѓw<D193>s . . . . <20>ᶉ<EFBFBD><E1B689> <20>e<EFBFBD>b<EFBFBD><62> <20>;<3B>z ! ! !<21>A.<2E>A
|
||||
<EFBFBD>a<EFBFBD>a<EFBFBD>a <20>A<EFBFBD>A<EFBFBD>A<EFBFBD>i<EFBFBD>A_<41>A <20>៚ ȡ<><C8A1><EFBFBD>z <20>a<EFBFBD>w ×✗i<E29C97><69> <20><><EFBFBD>a<EFBFBD>z
|
||||
<EFBFBD><EFBFBD><EFBFBD>z <20>;<3B>z . . . . <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ъ<EFBFBD> <20>ޟ<EFBFBD><DE9F>z <20>g<EFBFBD>b<EFBFBD>I<EFBFBD><49><EFBFBD><EFBFBD><EFBFBD>a<EFBFBD><61>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>z ! ! <20><<3C>w<EFBFBD><77> <20>;<3B>w<EFBFBD><77> <20>i꾉<69> <20><><EFBFBD>w<EFBFBD><77><EFBFBD>w <20><<3C>w<EFBFBD><77><EFBFBD>z <20>i<EFBFBD><69><EFBFBD>z
|
||||
<EFBFBD>ޝa<EFBFBD>A<EFBFBD><EFBFBD> <20><>Ρ<EFBFBD><CEA1><EFBFBD>z <20>៚ <20>g<EFBFBD>b<EFBFBD>I<EFBFBD><49><EFBFBD>鯂<EFBFBD><E9AF82><EFBFBD>i<EFBFBD>z!! <20><><EFBFBD><EFBFBD><EFBFBD>sٽ <20>b<EFBFBD>b*
|
||||
|
@@ -0,0 +1,7 @@
|
||||
Python の開発は、1990 年ごろから開始されています。
|
||||
開発者の Guido van Rossum は教育用のプログラミング言語「ABC」の開発に参加していましたが、ABC は実用上の目的にはあまり適していませんでした。
|
||||
このため、Guido はより実用的なプログラミング言語の開発を開始し、英国 BBS 放送のコメディ番組「モンティ パイソン」のファンである Guido はこの言語を「Python」と名づけました。
|
||||
このような背景から生まれた Python の言語設計は、「シンプル」で「習得が容易」という目標に重点が置かれています。
|
||||
多くのスクリプト系言語ではユーザの目先の利便性を優先して色々な機能を言語要素として取り入れる場合が多いのですが、Python ではそういった小細工が追加されることはあまりありません。
|
||||
言語自体の機能は最小限に押さえ、必要な機能は拡張モジュールとして追加する、というのが Python のポリシーです。
|
||||
|
@@ -0,0 +1,7 @@
|
||||
Python <20>̊J<CC8A><4A><EFBFBD>́A1990 <20>N<EFBFBD><4E><EFBFBD>납<EFBFBD><EB82A9><EFBFBD>J<EFBFBD>n<EFBFBD><6E><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482>܂<EFBFBD><DC82>B
|
||||
<EFBFBD>J<EFBFBD><EFBFBD><EFBFBD>҂<EFBFBD> Guido van Rossum <20>͋<EFBFBD><CD8B><EFBFBD><EFBFBD>p<EFBFBD>̃v<CC83><76><EFBFBD>O<EFBFBD><4F><EFBFBD>~<7E><><EFBFBD>O<EFBFBD><4F><EFBFBD><EFBFBD><EFBFBD>uABC<42>v<EFBFBD>̊J<CC8A><4A><EFBFBD>ɎQ<C98E><51><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482>܂<EFBFBD><DC82><EFBFBD><EFBFBD><EFBFBD><EFBFBD>AABC <20>͎<EFBFBD><CD8E>p<EFBFBD><70><EFBFBD>̖ړI<DA93>ɂ͂<C982><CD82>܂<EFBFBD><DC82>K<EFBFBD><4B><EFBFBD>Ă<EFBFBD><C482>܂<EFBFBD><DC82><EFBFBD><EFBFBD>ł<EFBFBD><C582><EFBFBD><EFBFBD>B
|
||||
<EFBFBD><EFBFBD><EFBFBD>̂<EFBFBD><EFBFBD>߁AGuido <20>͂<EFBFBD><CD82><EFBFBD><EFBFBD><EFBFBD><EFBFBD>p<EFBFBD>I<EFBFBD>ȃv<C883><76><EFBFBD>O<EFBFBD><4F><EFBFBD>~<7E><><EFBFBD>O<EFBFBD><4F><EFBFBD><EFBFBD><EFBFBD>̊J<CC8A><4A><EFBFBD><EFBFBD><EFBFBD>J<EFBFBD>n<EFBFBD><6E><EFBFBD>A<EFBFBD>p<EFBFBD><70> BBS <20><><EFBFBD><EFBFBD><EFBFBD>̃R<CC83><52><EFBFBD>f<EFBFBD>B<EFBFBD>ԑg<D491>u<EFBFBD><75><EFBFBD><EFBFBD><EFBFBD>e<EFBFBD>B <20>p<EFBFBD>C<EFBFBD>\<5C><><EFBFBD>v<EFBFBD>̃t<CC83>@<40><><EFBFBD>ł<EFBFBD><C582><EFBFBD> Guido <20>͂<EFBFBD><CD82>̌<EFBFBD><CC8C><EFBFBD><EFBFBD><EFBFBD><EFBFBD>uPython<6F>v<EFBFBD>Ɩ<EFBFBD><C696>Â<EFBFBD><C382>܂<EFBFBD><DC82><EFBFBD><EFBFBD>B
|
||||
<EFBFBD><EFBFBD><EFBFBD>̂悤<EFBFBD>Ȕw<EFBFBD>i<EFBFBD><EFBFBD><EFBFBD>琶<EFBFBD>܂ꂽ Python <20>̌<EFBFBD><CC8C><EFBFBD><EFBFBD>v<DD8C>́A<CD81>u<EFBFBD>V<EFBFBD><56><EFBFBD>v<EFBFBD><76><EFBFBD>v<EFBFBD>Łu<C581>K<EFBFBD><4B><EFBFBD><EFBFBD><EFBFBD>e<EFBFBD>Ձv<D581>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD>ڕW<DA95>ɏd<C98F>_<EFBFBD><5F><EFBFBD>u<EFBFBD><75><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482>܂<EFBFBD><DC82>B
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̃X<EFBFBD>N<EFBFBD><EFBFBD><EFBFBD>v<EFBFBD>g<EFBFBD>n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ł̓<EFBFBD><EFBFBD>[<5B>U<EFBFBD>̖ڐ<CC96><DA90>̗<EFBFBD><CC97><EFBFBD><D690><EFBFBD><EFBFBD>D<EFBFBD>悵<EFBFBD>ĐF<C490>X<EFBFBD>ȋ@<40>\<5C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>v<EFBFBD>f<EFBFBD>Ƃ<EFBFBD><C682>Ď<EFBFBD><C48E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ꍇ<EFBFBD><EA8D87><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̂ł<CC82><C582><EFBFBD><EFBFBD>APython <20>ł͂<C582><CD82><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>H<D78D><48><EFBFBD>lj<EFBFBD><C789><EFBFBD><EFBFBD><EFBFBD><EFBFBD>邱<EFBFBD>Ƃ͂<C682><CD82>܂肠<DC82><E882A0><EFBFBD>܂<EFBFBD><DC82><EFBFBD><EFBFBD>B
|
||||
<EFBFBD><EFBFBD><EFBFBD>ꎩ<EFBFBD>̂̋@<40>\<5C>͍ŏ<CD8D><C58F><EFBFBD><EFBFBD>ɉ<EFBFBD><C989><EFBFBD><EFBFBD><EFBFBD><EFBFBD>A<EFBFBD>K<EFBFBD>v<EFBFBD>ȋ@<40>\<5C>͊g<CD8A><67><EFBFBD><EFBFBD><EFBFBD>W<EFBFBD><57><EFBFBD>[<5B><><EFBFBD>Ƃ<EFBFBD><C682>Ēlj<C492><C789><EFBFBD><EFBFBD><EFBFBD><EFBFBD>A<EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD>̂<EFBFBD> Python <20>̃|<7C><><EFBFBD>V<EFBFBD>[<5B>ł<EFBFBD><C582>B
|
||||
|
@@ -0,0 +1,8 @@
|
||||
Python の開発は、1990 年ごろから開始されています。
|
||||
開発者の Guido van Rossum は教育用のプログラミング言語「ABC」の開発に参加していましたが、ABC は実用上の目的にはあまり適していませんでした。
|
||||
このため、Guido はより実用的なプログラミング言語の開発を開始し、英国 BBS 放送のコメディ番組「モンティ パイソン」のファンである Guido はこの言語を「Python」と名づけました。
|
||||
このような背景から生まれた Python の言語設計は、「シンプル」で「習得が容易」という目標に重点が置かれています。
|
||||
多くのスクリプト系言語ではユーザの目先の利便性を優先して色々な機能を言語要素として取り入れる場合が多いのですが、Python ではそういった小細工が追加されることはあまりありません。
|
||||
言語自体の機能は最小限に押さえ、必要な機能は拡張モジュールとして追加する、というのが Python のポリシーです。
|
||||
|
||||
ノか゚ ト゚ トキ喝塀 𡚴𪎌 麀齁𩛰
|
@@ -0,0 +1,8 @@
|
||||
Python <20>̊J<CC8A><4A><EFBFBD>́A1990 <20>N<EFBFBD><4E><EFBFBD>납<EFBFBD><EB82A9><EFBFBD>J<EFBFBD>n<EFBFBD><6E><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482>܂<EFBFBD><DC82>B
|
||||
<EFBFBD>J<EFBFBD><EFBFBD><EFBFBD>҂<EFBFBD> Guido van Rossum <20>͋<EFBFBD><CD8B><EFBFBD><EFBFBD>p<EFBFBD>̃v<CC83><76><EFBFBD>O<EFBFBD><4F><EFBFBD>~<7E><><EFBFBD>O<EFBFBD><4F><EFBFBD><EFBFBD><EFBFBD>uABC<42>v<EFBFBD>̊J<CC8A><4A><EFBFBD>ɎQ<C98E><51><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482>܂<EFBFBD><DC82><EFBFBD><EFBFBD><EFBFBD><EFBFBD>AABC <20>͎<EFBFBD><CD8E>p<EFBFBD><70><EFBFBD>̖ړI<DA93>ɂ͂<C982><CD82>܂<EFBFBD><DC82>K<EFBFBD><4B><EFBFBD>Ă<EFBFBD><C482>܂<EFBFBD><DC82><EFBFBD><EFBFBD>ł<EFBFBD><C582><EFBFBD><EFBFBD>B
|
||||
<EFBFBD><EFBFBD><EFBFBD>̂<EFBFBD><EFBFBD>߁AGuido <20>͂<EFBFBD><CD82><EFBFBD><EFBFBD><EFBFBD><EFBFBD>p<EFBFBD>I<EFBFBD>ȃv<C883><76><EFBFBD>O<EFBFBD><4F><EFBFBD>~<7E><><EFBFBD>O<EFBFBD><4F><EFBFBD><EFBFBD><EFBFBD>̊J<CC8A><4A><EFBFBD><EFBFBD><EFBFBD>J<EFBFBD>n<EFBFBD><6E><EFBFBD>A<EFBFBD>p<EFBFBD><70> BBS <20><><EFBFBD><EFBFBD><EFBFBD>̃R<CC83><52><EFBFBD>f<EFBFBD>B<EFBFBD>ԑg<D491>u<EFBFBD><75><EFBFBD><EFBFBD><EFBFBD>e<EFBFBD>B <20>p<EFBFBD>C<EFBFBD>\<5C><><EFBFBD>v<EFBFBD>̃t<CC83>@<40><><EFBFBD>ł<EFBFBD><C582><EFBFBD> Guido <20>͂<EFBFBD><CD82>̌<EFBFBD><CC8C><EFBFBD><EFBFBD><EFBFBD><EFBFBD>uPython<6F>v<EFBFBD>Ɩ<EFBFBD><C696>Â<EFBFBD><C382>܂<EFBFBD><DC82><EFBFBD><EFBFBD>B
|
||||
<EFBFBD><EFBFBD><EFBFBD>̂悤<EFBFBD>Ȕw<EFBFBD>i<EFBFBD><EFBFBD><EFBFBD>琶<EFBFBD>܂ꂽ Python <20>̌<EFBFBD><CC8C><EFBFBD><EFBFBD>v<DD8C>́A<CD81>u<EFBFBD>V<EFBFBD><56><EFBFBD>v<EFBFBD><76><EFBFBD>v<EFBFBD>Łu<C581>K<EFBFBD><4B><EFBFBD><EFBFBD><EFBFBD>e<EFBFBD>Ձv<D581>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD>ڕW<DA95>ɏd<C98F>_<EFBFBD><5F><EFBFBD>u<EFBFBD><75><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482>܂<EFBFBD><DC82>B
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̃X<EFBFBD>N<EFBFBD><EFBFBD><EFBFBD>v<EFBFBD>g<EFBFBD>n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ł̓<EFBFBD><EFBFBD>[<5B>U<EFBFBD>̖ڐ<CC96><DA90>̗<EFBFBD><CC97><EFBFBD><D690><EFBFBD><EFBFBD>D<EFBFBD>悵<EFBFBD>ĐF<C490>X<EFBFBD>ȋ@<40>\<5C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>v<EFBFBD>f<EFBFBD>Ƃ<EFBFBD><C682>Ď<EFBFBD><C48E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ꍇ<EFBFBD><EA8D87><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̂ł<CC82><C582><EFBFBD><EFBFBD>APython <20>ł͂<C582><CD82><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>H<D78D><48><EFBFBD>lj<EFBFBD><C789><EFBFBD><EFBFBD><EFBFBD><EFBFBD>邱<EFBFBD>Ƃ͂<C682><CD82>܂肠<DC82><E882A0><EFBFBD>܂<EFBFBD><DC82><EFBFBD><EFBFBD>B
|
||||
<EFBFBD><EFBFBD><EFBFBD>ꎩ<EFBFBD>̂̋@<40>\<5C>͍ŏ<CD8D><C58F><EFBFBD><EFBFBD>ɉ<EFBFBD><C989><EFBFBD><EFBFBD><EFBFBD><EFBFBD>A<EFBFBD>K<EFBFBD>v<EFBFBD>ȋ@<40>\<5C>͊g<CD8A><67><EFBFBD><EFBFBD><EFBFBD>W<EFBFBD><57><EFBFBD>[<5B><><EFBFBD>Ƃ<EFBFBD><C682>Ēlj<C492><C789><EFBFBD><EFBFBD><EFBFBD><EFBFBD>A<EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD>̂<EFBFBD> Python <20>̃|<7C><><EFBFBD>V<EFBFBD>[<5B>ł<EFBFBD><C582>B
|
||||
|
||||
<EFBFBD>m<EFBFBD><EFBFBD> <20><> <20>g<EFBFBD>L<EFBFBD>K<EFBFBD>y <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2365
AppPkg/Applications/Python/Python-2.7.2/Lib/test/cmath_testcases.txt
Normal file
2365
AppPkg/Applications/Python/Python-2.7.2/Lib/test/cmath_testcases.txt
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,16 @@
|
||||
This directory only contains tests for outstanding bugs that cause the
|
||||
interpreter to segfault. Ideally this directory should always be empty, but
|
||||
sometimes it may not be easy to fix the underlying cause and the bug is deemed
|
||||
too obscure to invest the effort.
|
||||
|
||||
Each test should fail when run from the command line:
|
||||
|
||||
./python Lib/test/crashers/weakref_in_del.py
|
||||
|
||||
Put as much info into a docstring or comments to help determine the cause of the
|
||||
failure, as well as a bugs.python.org issue number if it exists. Particularly
|
||||
note if the cause is system or environment dependent and what the variables are.
|
||||
|
||||
Once the crash is fixed, the test case should be moved into an appropriate test
|
||||
(even if it was originally from the test suite). This ensures the regression
|
||||
doesn't happen again. And if it does, it should be easier to track down.
|
@@ -0,0 +1,19 @@
|
||||
"""
|
||||
Broken bytecode objects can easily crash the interpreter.
|
||||
|
||||
This is not going to be fixed. It is generally agreed that there is no
|
||||
point in writing a bytecode verifier and putting it in CPython just for
|
||||
this. Moreover, a verifier is bound to accept only a subset of all safe
|
||||
bytecodes, so it could lead to unnecessary breakage.
|
||||
|
||||
For security purposes, "restricted" interpreters are not going to let
|
||||
the user build or load random bytecodes anyway. Otherwise, this is a
|
||||
"won't fix" case.
|
||||
|
||||
"""
|
||||
|
||||
import types
|
||||
|
||||
co = types.CodeType(0, 0, 0, 0, '\x04\x71\x00\x00', (),
|
||||
(), (), '', '', 1, '')
|
||||
exec co
|
@@ -0,0 +1,29 @@
|
||||
"""
|
||||
_PyType_Lookup() returns a borrowed reference.
|
||||
This attacks the call in dictobject.c.
|
||||
"""
|
||||
|
||||
class A(object):
|
||||
pass
|
||||
|
||||
class B(object):
|
||||
def __del__(self):
|
||||
print 'hi'
|
||||
del D.__missing__
|
||||
|
||||
class D(dict):
|
||||
class __missing__:
|
||||
def __init__(self, *args):
|
||||
pass
|
||||
|
||||
|
||||
d = D()
|
||||
a = A()
|
||||
a.cycle = a
|
||||
a.other = B()
|
||||
del a
|
||||
|
||||
prev = None
|
||||
while 1:
|
||||
d[5]
|
||||
prev = (prev,)
|
@@ -0,0 +1,38 @@
|
||||
"""
|
||||
_PyType_Lookup() returns a borrowed reference.
|
||||
This attacks PyObject_GenericSetAttr().
|
||||
|
||||
NB. on my machine this crashes in 2.5 debug but not release.
|
||||
"""
|
||||
|
||||
class A(object):
|
||||
pass
|
||||
|
||||
class B(object):
|
||||
def __del__(self):
|
||||
print "hi"
|
||||
del C.d
|
||||
|
||||
class D(object):
|
||||
def __set__(self, obj, value):
|
||||
self.hello = 42
|
||||
|
||||
class C(object):
|
||||
d = D()
|
||||
|
||||
def g():
|
||||
pass
|
||||
|
||||
|
||||
c = C()
|
||||
a = A()
|
||||
a.cycle = a
|
||||
a.other = B()
|
||||
|
||||
lst = [None] * 1000000
|
||||
i = 0
|
||||
del a
|
||||
while 1:
|
||||
c.d = 42 # segfaults in PyMethod_New(im_func=D.__set__, im_self=d)
|
||||
lst[i] = c.g # consume the free list of instancemethod objects
|
||||
i += 1
|
@@ -0,0 +1,5 @@
|
||||
"""
|
||||
The compiler (>= 2.5) recurses happily.
|
||||
"""
|
||||
|
||||
compile('()'*9**5, '?', 'exec')
|
@@ -0,0 +1,36 @@
|
||||
"""
|
||||
The gc module can still invoke arbitrary Python code and crash.
|
||||
This is an attack against _PyInstance_Lookup(), which is documented
|
||||
as follows:
|
||||
|
||||
The point of this routine is that it never calls arbitrary Python
|
||||
code, so is always "safe": all it does is dict lookups.
|
||||
|
||||
But of course dict lookups can call arbitrary Python code.
|
||||
The following code causes mutation of the object graph during
|
||||
the call to has_finalizer() in gcmodule.c, and that might
|
||||
segfault.
|
||||
"""
|
||||
|
||||
import gc
|
||||
|
||||
|
||||
class A:
|
||||
def __hash__(self):
|
||||
return hash("__del__")
|
||||
def __eq__(self, other):
|
||||
del self.other
|
||||
return False
|
||||
|
||||
a = A()
|
||||
b = A()
|
||||
|
||||
a.__dict__[b] = 'A'
|
||||
|
||||
a.other = b
|
||||
b.other = a
|
||||
|
||||
gc.collect()
|
||||
del a, b
|
||||
|
||||
gc.collect()
|
@@ -0,0 +1,32 @@
|
||||
"""
|
||||
gc.get_referrers() can be used to see objects before they are fully built.
|
||||
|
||||
Note that this is only an example. There are many ways to crash Python
|
||||
by using gc.get_referrers(), as well as many extension modules (even
|
||||
when they are using perfectly documented patterns to build objects).
|
||||
|
||||
Identifying and removing all places that expose to the GC a
|
||||
partially-built object is a long-term project. A patch was proposed on
|
||||
SF specifically for this example but I consider fixing just this single
|
||||
example a bit pointless (#1517042).
|
||||
|
||||
A fix would include a whole-scale code review, possibly with an API
|
||||
change to decouple object creation and GC registration, and according
|
||||
fixes to the documentation for extension module writers. It's unlikely
|
||||
to happen, though. So this is currently classified as
|
||||
"gc.get_referrers() is dangerous, use only for debugging".
|
||||
"""
|
||||
|
||||
import gc
|
||||
|
||||
|
||||
def g():
|
||||
marker = object()
|
||||
yield marker
|
||||
# now the marker is in the tuple being constructed
|
||||
[tup] = [x for x in gc.get_referrers(marker) if type(x) is tuple]
|
||||
print tup
|
||||
print tup[1]
|
||||
|
||||
|
||||
tuple(g())
|
@@ -0,0 +1,16 @@
|
||||
|
||||
# This was taken from http://python.org/sf/1541697
|
||||
# It's not technically a crasher. It may not even truly be infinite,
|
||||
# however, I haven't waited a long time to see the result. It takes
|
||||
# 100% of CPU while running this and should be fixed.
|
||||
|
||||
import re
|
||||
starttag = re.compile(r'<[a-zA-Z][-_.:a-zA-Z0-9]*\s*('
|
||||
r'\s*([a-zA-Z_][-:.a-zA-Z_0-9]*)(\s*=\s*'
|
||||
r'(\'[^\']*\'|"[^"]*"|[-a-zA-Z0-9./,:;+*%?!&$\(\)_#=~@]'
|
||||
r'[][\-a-zA-Z0-9./,:;+*%?!&$\(\)_#=~\'"@]*(?=[\s>/<])))?'
|
||||
r')*\s*/?\s*(?=[<>])')
|
||||
|
||||
if __name__ == '__main__':
|
||||
foo = '<table cellspacing="0" cellpadding="0" style="border-collapse'
|
||||
starttag.match(foo)
|
@@ -0,0 +1,35 @@
|
||||
"""
|
||||
There is a way to put keys of any type in a type's dictionary.
|
||||
I think this allows various kinds of crashes, but so far I have only
|
||||
found a convoluted attack of _PyType_Lookup(), which uses the mro of the
|
||||
type without holding a strong reference to it. Probably works with
|
||||
super.__getattribute__() too, which uses the same kind of code.
|
||||
"""
|
||||
|
||||
class MyKey(object):
|
||||
def __hash__(self):
|
||||
return hash('mykey')
|
||||
|
||||
def __cmp__(self, other):
|
||||
# the following line decrefs the previous X.__mro__
|
||||
X.__bases__ = (Base2,)
|
||||
# trash all tuples of length 3, to make sure that the items of
|
||||
# the previous X.__mro__ are really garbage
|
||||
z = []
|
||||
for i in range(1000):
|
||||
z.append((i, None, None))
|
||||
return -1
|
||||
|
||||
|
||||
class Base(object):
|
||||
mykey = 'from Base'
|
||||
|
||||
class Base2(object):
|
||||
mykey = 'from Base2'
|
||||
|
||||
# you can't add a non-string key to X.__dict__, but it can be
|
||||
# there from the beginning :-)
|
||||
X = type('X', (Base,), {MyKey(): 5})
|
||||
|
||||
print X.mykey
|
||||
# I get a segfault, or a slightly wrong assertion error in a debug build.
|
@@ -0,0 +1,31 @@
|
||||
|
||||
# The cycle GC collector can be executed when any GC-tracked object is
|
||||
# allocated, e.g. during a call to PyList_New(), PyDict_New(), ...
|
||||
# Moreover, it can invoke arbitrary Python code via a weakref callback.
|
||||
# This means that there are many places in the source where an arbitrary
|
||||
# mutation could unexpectedly occur.
|
||||
|
||||
# The example below shows list_slice() not expecting the call to
|
||||
# PyList_New to mutate the input list. (Of course there are many
|
||||
# more examples like this one.)
|
||||
|
||||
|
||||
import weakref
|
||||
|
||||
class A(object):
|
||||
pass
|
||||
|
||||
def callback(x):
|
||||
del lst[:]
|
||||
|
||||
|
||||
keepalive = []
|
||||
|
||||
for i in range(100):
|
||||
lst = [str(i)]
|
||||
a = A()
|
||||
a.cycle = a
|
||||
keepalive.append(weakref.ref(a, callback))
|
||||
del a
|
||||
while lst:
|
||||
keepalive.append(lst[:])
|
@@ -0,0 +1,47 @@
|
||||
# from http://mail.python.org/pipermail/python-dev/2001-June/015239.html
|
||||
|
||||
# if you keep changing a dictionary while looking up a key, you can
|
||||
# provoke an infinite recursion in C
|
||||
|
||||
# At the time neither Tim nor Michael could be bothered to think of a
|
||||
# way to fix it.
|
||||
|
||||
class Yuck:
|
||||
def __init__(self):
|
||||
self.i = 0
|
||||
|
||||
def make_dangerous(self):
|
||||
self.i = 1
|
||||
|
||||
def __hash__(self):
|
||||
# direct to slot 4 in table of size 8; slot 12 when size 16
|
||||
return 4 + 8
|
||||
|
||||
def __eq__(self, other):
|
||||
if self.i == 0:
|
||||
# leave dict alone
|
||||
pass
|
||||
elif self.i == 1:
|
||||
# fiddle to 16 slots
|
||||
self.__fill_dict(6)
|
||||
self.i = 2
|
||||
else:
|
||||
# fiddle to 8 slots
|
||||
self.__fill_dict(4)
|
||||
self.i = 1
|
||||
|
||||
return 1
|
||||
|
||||
def __fill_dict(self, n):
|
||||
self.i = 0
|
||||
dict.clear()
|
||||
for i in range(n):
|
||||
dict[i] = i
|
||||
dict[self] = "OK!"
|
||||
|
||||
y = Yuck()
|
||||
dict = {y: "OK!"}
|
||||
|
||||
z = Yuck()
|
||||
y.make_dangerous()
|
||||
print dict[z]
|
@@ -0,0 +1,16 @@
|
||||
# The following example may crash or not depending on the platform.
|
||||
# E.g. on 32-bit Intel Linux in a "standard" configuration it seems to
|
||||
# crash on Python 2.5 (but not 2.4 nor 2.3). On Windows the import
|
||||
# eventually fails to find the module, possibly because we run out of
|
||||
# file handles.
|
||||
|
||||
# The point of this example is to show that sys.setrecursionlimit() is a
|
||||
# hack, and not a robust solution. This example simply exercises a path
|
||||
# where it takes many C-level recursions, consuming a lot of stack
|
||||
# space, for each Python-level recursion. So 1000 times this amount of
|
||||
# stack space may be too much for standard platforms already.
|
||||
|
||||
import sys
|
||||
if 'recursion_limit_too_high' in sys.modules:
|
||||
del sys.modules['recursion_limit_too_high']
|
||||
import recursion_limit_too_high
|
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
# No bug report AFAIK, mail on python-dev on 2006-01-10
|
||||
|
||||
# This is a "won't fix" case. It is known that setting a high enough
|
||||
# recursion limit crashes by overflowing the stack. Unless this is
|
||||
# redesigned somehow, it won't go away.
|
||||
|
||||
import sys
|
||||
|
||||
sys.setrecursionlimit(1 << 30)
|
||||
f = lambda f:f(f)
|
||||
|
||||
if __name__ == '__main__':
|
||||
f(f)
|
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# $Id: ncurses.py 36559 2004-07-18 05:56:09Z tim_one $
|
||||
#
|
||||
# Interactive test suite for the curses module.
|
||||
# This script displays various things and the user should verify whether
|
||||
# they display correctly.
|
||||
#
|
||||
|
||||
import curses
|
||||
from curses import textpad
|
||||
|
||||
def test_textpad(stdscr, insert_mode=False):
|
||||
ncols, nlines = 8, 3
|
||||
uly, ulx = 3, 2
|
||||
if insert_mode:
|
||||
mode = 'insert mode'
|
||||
else:
|
||||
mode = 'overwrite mode'
|
||||
|
||||
stdscr.addstr(uly-3, ulx, "Use Ctrl-G to end editing (%s)." % mode)
|
||||
stdscr.addstr(uly-2, ulx, "Be sure to try typing in the lower-right corner.")
|
||||
win = curses.newwin(nlines, ncols, uly, ulx)
|
||||
textpad.rectangle(stdscr, uly-1, ulx-1, uly + nlines, ulx + ncols)
|
||||
stdscr.refresh()
|
||||
|
||||
box = textpad.Textbox(win, insert_mode)
|
||||
contents = box.edit()
|
||||
stdscr.addstr(uly+ncols+2, 0, "Text entered in the box\n")
|
||||
stdscr.addstr(repr(contents))
|
||||
stdscr.addstr('\n')
|
||||
stdscr.addstr('Press any key')
|
||||
stdscr.getch()
|
||||
|
||||
for i in range(3):
|
||||
stdscr.move(uly+ncols+2 + i, 0)
|
||||
stdscr.clrtoeol()
|
||||
|
||||
def main(stdscr):
|
||||
stdscr.clear()
|
||||
test_textpad(stdscr, False)
|
||||
test_textpad(stdscr, True)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
curses.wrapper(main)
|
@@ -0,0 +1,2 @@
|
||||
This empty directory serves as destination for temporary files
|
||||
created by some tests.
|
@@ -0,0 +1,161 @@
|
||||
------------------------------------------------------------------------
|
||||
-- abs.decTest -- decimal absolute value --
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
-- This set of tests primarily tests the existence of the operator.
|
||||
-- Additon, subtraction, rounding, and more overflows are tested
|
||||
-- elsewhere.
|
||||
|
||||
precision: 9
|
||||
rounding: half_up
|
||||
maxExponent: 384
|
||||
minexponent: -383
|
||||
extended: 1
|
||||
|
||||
absx001 abs '1' -> '1'
|
||||
absx002 abs '-1' -> '1'
|
||||
absx003 abs '1.00' -> '1.00'
|
||||
absx004 abs '-1.00' -> '1.00'
|
||||
absx005 abs '0' -> '0'
|
||||
absx006 abs '0.00' -> '0.00'
|
||||
absx007 abs '00.0' -> '0.0'
|
||||
absx008 abs '00.00' -> '0.00'
|
||||
absx009 abs '00' -> '0'
|
||||
|
||||
absx010 abs '-2' -> '2'
|
||||
absx011 abs '2' -> '2'
|
||||
absx012 abs '-2.00' -> '2.00'
|
||||
absx013 abs '2.00' -> '2.00'
|
||||
absx014 abs '-0' -> '0'
|
||||
absx015 abs '-0.00' -> '0.00'
|
||||
absx016 abs '-00.0' -> '0.0'
|
||||
absx017 abs '-00.00' -> '0.00'
|
||||
absx018 abs '-00' -> '0'
|
||||
|
||||
absx020 abs '-2000000' -> '2000000'
|
||||
absx021 abs '2000000' -> '2000000'
|
||||
precision: 7
|
||||
absx022 abs '-2000000' -> '2000000'
|
||||
absx023 abs '2000000' -> '2000000'
|
||||
precision: 6
|
||||
absx024 abs '-2000000' -> '2.00000E+6' Rounded
|
||||
absx025 abs '2000000' -> '2.00000E+6' Rounded
|
||||
precision: 3
|
||||
absx026 abs '-2000000' -> '2.00E+6' Rounded
|
||||
absx027 abs '2000000' -> '2.00E+6' Rounded
|
||||
|
||||
absx030 abs '+0.1' -> '0.1'
|
||||
absx031 abs '-0.1' -> '0.1'
|
||||
absx032 abs '+0.01' -> '0.01'
|
||||
absx033 abs '-0.01' -> '0.01'
|
||||
absx034 abs '+0.001' -> '0.001'
|
||||
absx035 abs '-0.001' -> '0.001'
|
||||
absx036 abs '+0.000001' -> '0.000001'
|
||||
absx037 abs '-0.000001' -> '0.000001'
|
||||
absx038 abs '+0.000000000001' -> '1E-12'
|
||||
absx039 abs '-0.000000000001' -> '1E-12'
|
||||
|
||||
-- examples from decArith
|
||||
precision: 9
|
||||
absx040 abs '2.1' -> '2.1'
|
||||
absx041 abs '-100' -> '100'
|
||||
absx042 abs '101.5' -> '101.5'
|
||||
absx043 abs '-101.5' -> '101.5'
|
||||
|
||||
-- more fixed, potential LHS swaps/overlays if done by subtract 0
|
||||
precision: 9
|
||||
absx060 abs '-56267E-10' -> '0.0000056267'
|
||||
absx061 abs '-56267E-5' -> '0.56267'
|
||||
absx062 abs '-56267E-2' -> '562.67'
|
||||
absx063 abs '-56267E-1' -> '5626.7'
|
||||
absx065 abs '-56267E-0' -> '56267'
|
||||
|
||||
-- overflow tests
|
||||
maxexponent: 999999999
|
||||
minexponent: -999999999
|
||||
precision: 3
|
||||
absx120 abs 9.999E+999999999 -> Infinity Inexact Overflow Rounded
|
||||
|
||||
-- subnormals and underflow
|
||||
precision: 3
|
||||
maxexponent: 999
|
||||
minexponent: -999
|
||||
absx210 abs 1.00E-999 -> 1.00E-999
|
||||
absx211 abs 0.1E-999 -> 1E-1000 Subnormal
|
||||
absx212 abs 0.10E-999 -> 1.0E-1000 Subnormal
|
||||
absx213 abs 0.100E-999 -> 1.0E-1000 Subnormal Rounded
|
||||
absx214 abs 0.01E-999 -> 1E-1001 Subnormal
|
||||
-- next is rounded to Emin
|
||||
absx215 abs 0.999E-999 -> 1.00E-999 Inexact Rounded Subnormal Underflow
|
||||
absx216 abs 0.099E-999 -> 1.0E-1000 Inexact Rounded Subnormal Underflow
|
||||
absx217 abs 0.009E-999 -> 1E-1001 Inexact Rounded Subnormal Underflow
|
||||
absx218 abs 0.001E-999 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
|
||||
absx219 abs 0.0009E-999 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
|
||||
absx220 abs 0.0001E-999 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
|
||||
|
||||
absx230 abs -1.00E-999 -> 1.00E-999
|
||||
absx231 abs -0.1E-999 -> 1E-1000 Subnormal
|
||||
absx232 abs -0.10E-999 -> 1.0E-1000 Subnormal
|
||||
absx233 abs -0.100E-999 -> 1.0E-1000 Subnormal Rounded
|
||||
absx234 abs -0.01E-999 -> 1E-1001 Subnormal
|
||||
-- next is rounded to Emin
|
||||
absx235 abs -0.999E-999 -> 1.00E-999 Inexact Rounded Subnormal Underflow
|
||||
absx236 abs -0.099E-999 -> 1.0E-1000 Inexact Rounded Subnormal Underflow
|
||||
absx237 abs -0.009E-999 -> 1E-1001 Inexact Rounded Subnormal Underflow
|
||||
absx238 abs -0.001E-999 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
|
||||
absx239 abs -0.0009E-999 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
|
||||
absx240 abs -0.0001E-999 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped
|
||||
|
||||
-- long operand tests
|
||||
maxexponent: 999
|
||||
minexponent: -999
|
||||
precision: 9
|
||||
absx301 abs 12345678000 -> 1.23456780E+10 Rounded
|
||||
absx302 abs 1234567800 -> 1.23456780E+9 Rounded
|
||||
absx303 abs 1234567890 -> 1.23456789E+9 Rounded
|
||||
absx304 abs 1234567891 -> 1.23456789E+9 Inexact Rounded
|
||||
absx305 abs 12345678901 -> 1.23456789E+10 Inexact Rounded
|
||||
absx306 abs 1234567896 -> 1.23456790E+9 Inexact Rounded
|
||||
|
||||
precision: 15
|
||||
absx321 abs 12345678000 -> 12345678000
|
||||
absx322 abs 1234567800 -> 1234567800
|
||||
absx323 abs 1234567890 -> 1234567890
|
||||
absx324 abs 1234567891 -> 1234567891
|
||||
absx325 abs 12345678901 -> 12345678901
|
||||
absx326 abs 1234567896 -> 1234567896
|
||||
|
||||
|
||||
-- Specials
|
||||
precision: 9
|
||||
|
||||
-- specials
|
||||
absx520 abs 'Inf' -> 'Infinity'
|
||||
absx521 abs '-Inf' -> 'Infinity'
|
||||
absx522 abs NaN -> NaN
|
||||
absx523 abs sNaN -> NaN Invalid_operation
|
||||
absx524 abs NaN22 -> NaN22
|
||||
absx525 abs sNaN33 -> NaN33 Invalid_operation
|
||||
absx526 abs -NaN22 -> -NaN22
|
||||
absx527 abs -sNaN33 -> -NaN33 Invalid_operation
|
||||
|
||||
-- Null tests
|
||||
absx900 abs # -> NaN Invalid_operation
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,338 @@
|
||||
------------------------------------------------------------------------
|
||||
-- and.decTest -- digitwise logical AND --
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
extended: 1
|
||||
precision: 9
|
||||
rounding: half_up
|
||||
maxExponent: 999
|
||||
minExponent: -999
|
||||
|
||||
-- Sanity check (truth table)
|
||||
andx001 and 0 0 -> 0
|
||||
andx002 and 0 1 -> 0
|
||||
andx003 and 1 0 -> 0
|
||||
andx004 and 1 1 -> 1
|
||||
andx005 and 1100 1010 -> 1000
|
||||
andx006 and 1111 10 -> 10
|
||||
andx007 and 1111 1010 -> 1010
|
||||
|
||||
-- and at msd and msd-1
|
||||
andx010 and 000000000 000000000 -> 0
|
||||
andx011 and 000000000 100000000 -> 0
|
||||
andx012 and 100000000 000000000 -> 0
|
||||
andx013 and 100000000 100000000 -> 100000000
|
||||
andx014 and 000000000 000000000 -> 0
|
||||
andx015 and 000000000 010000000 -> 0
|
||||
andx016 and 010000000 000000000 -> 0
|
||||
andx017 and 010000000 010000000 -> 10000000
|
||||
|
||||
-- Various lengths
|
||||
-- 123456789 123456789 123456789
|
||||
andx021 and 111111111 111111111 -> 111111111
|
||||
andx022 and 111111111111 111111111 -> 111111111
|
||||
andx023 and 111111111111 11111111 -> 11111111
|
||||
andx024 and 111111111 11111111 -> 11111111
|
||||
andx025 and 111111111 1111111 -> 1111111
|
||||
andx026 and 111111111111 111111 -> 111111
|
||||
andx027 and 111111111111 11111 -> 11111
|
||||
andx028 and 111111111111 1111 -> 1111
|
||||
andx029 and 111111111111 111 -> 111
|
||||
andx031 and 111111111111 11 -> 11
|
||||
andx032 and 111111111111 1 -> 1
|
||||
andx033 and 111111111111 1111111111 -> 111111111
|
||||
andx034 and 11111111111 11111111111 -> 111111111
|
||||
andx035 and 1111111111 111111111111 -> 111111111
|
||||
andx036 and 111111111 1111111111111 -> 111111111
|
||||
|
||||
andx040 and 111111111 111111111111 -> 111111111
|
||||
andx041 and 11111111 111111111111 -> 11111111
|
||||
andx042 and 11111111 111111111 -> 11111111
|
||||
andx043 and 1111111 111111111 -> 1111111
|
||||
andx044 and 111111 111111111 -> 111111
|
||||
andx045 and 11111 111111111 -> 11111
|
||||
andx046 and 1111 111111111 -> 1111
|
||||
andx047 and 111 111111111 -> 111
|
||||
andx048 and 11 111111111 -> 11
|
||||
andx049 and 1 111111111 -> 1
|
||||
|
||||
andx050 and 1111111111 1 -> 1
|
||||
andx051 and 111111111 1 -> 1
|
||||
andx052 and 11111111 1 -> 1
|
||||
andx053 and 1111111 1 -> 1
|
||||
andx054 and 111111 1 -> 1
|
||||
andx055 and 11111 1 -> 1
|
||||
andx056 and 1111 1 -> 1
|
||||
andx057 and 111 1 -> 1
|
||||
andx058 and 11 1 -> 1
|
||||
andx059 and 1 1 -> 1
|
||||
|
||||
andx060 and 1111111111 0 -> 0
|
||||
andx061 and 111111111 0 -> 0
|
||||
andx062 and 11111111 0 -> 0
|
||||
andx063 and 1111111 0 -> 0
|
||||
andx064 and 111111 0 -> 0
|
||||
andx065 and 11111 0 -> 0
|
||||
andx066 and 1111 0 -> 0
|
||||
andx067 and 111 0 -> 0
|
||||
andx068 and 11 0 -> 0
|
||||
andx069 and 1 0 -> 0
|
||||
|
||||
andx070 and 1 1111111111 -> 1
|
||||
andx071 and 1 111111111 -> 1
|
||||
andx072 and 1 11111111 -> 1
|
||||
andx073 and 1 1111111 -> 1
|
||||
andx074 and 1 111111 -> 1
|
||||
andx075 and 1 11111 -> 1
|
||||
andx076 and 1 1111 -> 1
|
||||
andx077 and 1 111 -> 1
|
||||
andx078 and 1 11 -> 1
|
||||
andx079 and 1 1 -> 1
|
||||
|
||||
andx080 and 0 1111111111 -> 0
|
||||
andx081 and 0 111111111 -> 0
|
||||
andx082 and 0 11111111 -> 0
|
||||
andx083 and 0 1111111 -> 0
|
||||
andx084 and 0 111111 -> 0
|
||||
andx085 and 0 11111 -> 0
|
||||
andx086 and 0 1111 -> 0
|
||||
andx087 and 0 111 -> 0
|
||||
andx088 and 0 11 -> 0
|
||||
andx089 and 0 1 -> 0
|
||||
|
||||
andx090 and 011111111 111111111 -> 11111111
|
||||
andx091 and 101111111 111111111 -> 101111111
|
||||
andx092 and 110111111 111111111 -> 110111111
|
||||
andx093 and 111011111 111111111 -> 111011111
|
||||
andx094 and 111101111 111111111 -> 111101111
|
||||
andx095 and 111110111 111111111 -> 111110111
|
||||
andx096 and 111111011 111111111 -> 111111011
|
||||
andx097 and 111111101 111111111 -> 111111101
|
||||
andx098 and 111111110 111111111 -> 111111110
|
||||
|
||||
andx100 and 111111111 011111111 -> 11111111
|
||||
andx101 and 111111111 101111111 -> 101111111
|
||||
andx102 and 111111111 110111111 -> 110111111
|
||||
andx103 and 111111111 111011111 -> 111011111
|
||||
andx104 and 111111111 111101111 -> 111101111
|
||||
andx105 and 111111111 111110111 -> 111110111
|
||||
andx106 and 111111111 111111011 -> 111111011
|
||||
andx107 and 111111111 111111101 -> 111111101
|
||||
andx108 and 111111111 111111110 -> 111111110
|
||||
|
||||
-- non-0/1 should not be accepted, nor should signs
|
||||
andx220 and 111111112 111111111 -> NaN Invalid_operation
|
||||
andx221 and 333333333 333333333 -> NaN Invalid_operation
|
||||
andx222 and 555555555 555555555 -> NaN Invalid_operation
|
||||
andx223 and 777777777 777777777 -> NaN Invalid_operation
|
||||
andx224 and 999999999 999999999 -> NaN Invalid_operation
|
||||
andx225 and 222222222 999999999 -> NaN Invalid_operation
|
||||
andx226 and 444444444 999999999 -> NaN Invalid_operation
|
||||
andx227 and 666666666 999999999 -> NaN Invalid_operation
|
||||
andx228 and 888888888 999999999 -> NaN Invalid_operation
|
||||
andx229 and 999999999 222222222 -> NaN Invalid_operation
|
||||
andx230 and 999999999 444444444 -> NaN Invalid_operation
|
||||
andx231 and 999999999 666666666 -> NaN Invalid_operation
|
||||
andx232 and 999999999 888888888 -> NaN Invalid_operation
|
||||
-- a few randoms
|
||||
andx240 and 567468689 -934981942 -> NaN Invalid_operation
|
||||
andx241 and 567367689 934981942 -> NaN Invalid_operation
|
||||
andx242 and -631917772 -706014634 -> NaN Invalid_operation
|
||||
andx243 and -756253257 138579234 -> NaN Invalid_operation
|
||||
andx244 and 835590149 567435400 -> NaN Invalid_operation
|
||||
-- test MSD
|
||||
andx250 and 200000000 100000000 -> NaN Invalid_operation
|
||||
andx251 and 700000000 100000000 -> NaN Invalid_operation
|
||||
andx252 and 800000000 100000000 -> NaN Invalid_operation
|
||||
andx253 and 900000000 100000000 -> NaN Invalid_operation
|
||||
andx254 and 200000000 000000000 -> NaN Invalid_operation
|
||||
andx255 and 700000000 000000000 -> NaN Invalid_operation
|
||||
andx256 and 800000000 000000000 -> NaN Invalid_operation
|
||||
andx257 and 900000000 000000000 -> NaN Invalid_operation
|
||||
andx258 and 100000000 200000000 -> NaN Invalid_operation
|
||||
andx259 and 100000000 700000000 -> NaN Invalid_operation
|
||||
andx260 and 100000000 800000000 -> NaN Invalid_operation
|
||||
andx261 and 100000000 900000000 -> NaN Invalid_operation
|
||||
andx262 and 000000000 200000000 -> NaN Invalid_operation
|
||||
andx263 and 000000000 700000000 -> NaN Invalid_operation
|
||||
andx264 and 000000000 800000000 -> NaN Invalid_operation
|
||||
andx265 and 000000000 900000000 -> NaN Invalid_operation
|
||||
-- test MSD-1
|
||||
andx270 and 020000000 100000000 -> NaN Invalid_operation
|
||||
andx271 and 070100000 100000000 -> NaN Invalid_operation
|
||||
andx272 and 080010000 100000001 -> NaN Invalid_operation
|
||||
andx273 and 090001000 100000010 -> NaN Invalid_operation
|
||||
andx274 and 100000100 020010100 -> NaN Invalid_operation
|
||||
andx275 and 100000000 070001000 -> NaN Invalid_operation
|
||||
andx276 and 100000010 080010100 -> NaN Invalid_operation
|
||||
andx277 and 100000000 090000010 -> NaN Invalid_operation
|
||||
-- test LSD
|
||||
andx280 and 001000002 100000000 -> NaN Invalid_operation
|
||||
andx281 and 000000007 100000000 -> NaN Invalid_operation
|
||||
andx282 and 000000008 100000000 -> NaN Invalid_operation
|
||||
andx283 and 000000009 100000000 -> NaN Invalid_operation
|
||||
andx284 and 100000000 000100002 -> NaN Invalid_operation
|
||||
andx285 and 100100000 001000007 -> NaN Invalid_operation
|
||||
andx286 and 100010000 010000008 -> NaN Invalid_operation
|
||||
andx287 and 100001000 100000009 -> NaN Invalid_operation
|
||||
-- test Middie
|
||||
andx288 and 001020000 100000000 -> NaN Invalid_operation
|
||||
andx289 and 000070001 100000000 -> NaN Invalid_operation
|
||||
andx290 and 000080000 100010000 -> NaN Invalid_operation
|
||||
andx291 and 000090000 100001000 -> NaN Invalid_operation
|
||||
andx292 and 100000010 000020100 -> NaN Invalid_operation
|
||||
andx293 and 100100000 000070010 -> NaN Invalid_operation
|
||||
andx294 and 100010100 000080001 -> NaN Invalid_operation
|
||||
andx295 and 100001000 000090000 -> NaN Invalid_operation
|
||||
-- signs
|
||||
andx296 and -100001000 -000000000 -> NaN Invalid_operation
|
||||
andx297 and -100001000 000010000 -> NaN Invalid_operation
|
||||
andx298 and 100001000 -000000000 -> NaN Invalid_operation
|
||||
andx299 and 100001000 000011000 -> 1000
|
||||
|
||||
-- Nmax, Nmin, Ntiny
|
||||
andx331 and 2 9.99999999E+999 -> NaN Invalid_operation
|
||||
andx332 and 3 1E-999 -> NaN Invalid_operation
|
||||
andx333 and 4 1.00000000E-999 -> NaN Invalid_operation
|
||||
andx334 and 5 1E-1007 -> NaN Invalid_operation
|
||||
andx335 and 6 -1E-1007 -> NaN Invalid_operation
|
||||
andx336 and 7 -1.00000000E-999 -> NaN Invalid_operation
|
||||
andx337 and 8 -1E-999 -> NaN Invalid_operation
|
||||
andx338 and 9 -9.99999999E+999 -> NaN Invalid_operation
|
||||
andx341 and 9.99999999E+999 -18 -> NaN Invalid_operation
|
||||
andx342 and 1E-999 01 -> NaN Invalid_operation
|
||||
andx343 and 1.00000000E-999 -18 -> NaN Invalid_operation
|
||||
andx344 and 1E-1007 18 -> NaN Invalid_operation
|
||||
andx345 and -1E-1007 -10 -> NaN Invalid_operation
|
||||
andx346 and -1.00000000E-999 18 -> NaN Invalid_operation
|
||||
andx347 and -1E-999 10 -> NaN Invalid_operation
|
||||
andx348 and -9.99999999E+999 -18 -> NaN Invalid_operation
|
||||
|
||||
-- A few other non-integers
|
||||
andx361 and 1.0 1 -> NaN Invalid_operation
|
||||
andx362 and 1E+1 1 -> NaN Invalid_operation
|
||||
andx363 and 0.0 1 -> NaN Invalid_operation
|
||||
andx364 and 0E+1 1 -> NaN Invalid_operation
|
||||
andx365 and 9.9 1 -> NaN Invalid_operation
|
||||
andx366 and 9E+1 1 -> NaN Invalid_operation
|
||||
andx371 and 0 1.0 -> NaN Invalid_operation
|
||||
andx372 and 0 1E+1 -> NaN Invalid_operation
|
||||
andx373 and 0 0.0 -> NaN Invalid_operation
|
||||
andx374 and 0 0E+1 -> NaN Invalid_operation
|
||||
andx375 and 0 9.9 -> NaN Invalid_operation
|
||||
andx376 and 0 9E+1 -> NaN Invalid_operation
|
||||
|
||||
-- All Specials are in error
|
||||
andx780 and -Inf -Inf -> NaN Invalid_operation
|
||||
andx781 and -Inf -1000 -> NaN Invalid_operation
|
||||
andx782 and -Inf -1 -> NaN Invalid_operation
|
||||
andx783 and -Inf -0 -> NaN Invalid_operation
|
||||
andx784 and -Inf 0 -> NaN Invalid_operation
|
||||
andx785 and -Inf 1 -> NaN Invalid_operation
|
||||
andx786 and -Inf 1000 -> NaN Invalid_operation
|
||||
andx787 and -1000 -Inf -> NaN Invalid_operation
|
||||
andx788 and -Inf -Inf -> NaN Invalid_operation
|
||||
andx789 and -1 -Inf -> NaN Invalid_operation
|
||||
andx790 and -0 -Inf -> NaN Invalid_operation
|
||||
andx791 and 0 -Inf -> NaN Invalid_operation
|
||||
andx792 and 1 -Inf -> NaN Invalid_operation
|
||||
andx793 and 1000 -Inf -> NaN Invalid_operation
|
||||
andx794 and Inf -Inf -> NaN Invalid_operation
|
||||
|
||||
andx800 and Inf -Inf -> NaN Invalid_operation
|
||||
andx801 and Inf -1000 -> NaN Invalid_operation
|
||||
andx802 and Inf -1 -> NaN Invalid_operation
|
||||
andx803 and Inf -0 -> NaN Invalid_operation
|
||||
andx804 and Inf 0 -> NaN Invalid_operation
|
||||
andx805 and Inf 1 -> NaN Invalid_operation
|
||||
andx806 and Inf 1000 -> NaN Invalid_operation
|
||||
andx807 and Inf Inf -> NaN Invalid_operation
|
||||
andx808 and -1000 Inf -> NaN Invalid_operation
|
||||
andx809 and -Inf Inf -> NaN Invalid_operation
|
||||
andx810 and -1 Inf -> NaN Invalid_operation
|
||||
andx811 and -0 Inf -> NaN Invalid_operation
|
||||
andx812 and 0 Inf -> NaN Invalid_operation
|
||||
andx813 and 1 Inf -> NaN Invalid_operation
|
||||
andx814 and 1000 Inf -> NaN Invalid_operation
|
||||
andx815 and Inf Inf -> NaN Invalid_operation
|
||||
|
||||
andx821 and NaN -Inf -> NaN Invalid_operation
|
||||
andx822 and NaN -1000 -> NaN Invalid_operation
|
||||
andx823 and NaN -1 -> NaN Invalid_operation
|
||||
andx824 and NaN -0 -> NaN Invalid_operation
|
||||
andx825 and NaN 0 -> NaN Invalid_operation
|
||||
andx826 and NaN 1 -> NaN Invalid_operation
|
||||
andx827 and NaN 1000 -> NaN Invalid_operation
|
||||
andx828 and NaN Inf -> NaN Invalid_operation
|
||||
andx829 and NaN NaN -> NaN Invalid_operation
|
||||
andx830 and -Inf NaN -> NaN Invalid_operation
|
||||
andx831 and -1000 NaN -> NaN Invalid_operation
|
||||
andx832 and -1 NaN -> NaN Invalid_operation
|
||||
andx833 and -0 NaN -> NaN Invalid_operation
|
||||
andx834 and 0 NaN -> NaN Invalid_operation
|
||||
andx835 and 1 NaN -> NaN Invalid_operation
|
||||
andx836 and 1000 NaN -> NaN Invalid_operation
|
||||
andx837 and Inf NaN -> NaN Invalid_operation
|
||||
|
||||
andx841 and sNaN -Inf -> NaN Invalid_operation
|
||||
andx842 and sNaN -1000 -> NaN Invalid_operation
|
||||
andx843 and sNaN -1 -> NaN Invalid_operation
|
||||
andx844 and sNaN -0 -> NaN Invalid_operation
|
||||
andx845 and sNaN 0 -> NaN Invalid_operation
|
||||
andx846 and sNaN 1 -> NaN Invalid_operation
|
||||
andx847 and sNaN 1000 -> NaN Invalid_operation
|
||||
andx848 and sNaN NaN -> NaN Invalid_operation
|
||||
andx849 and sNaN sNaN -> NaN Invalid_operation
|
||||
andx850 and NaN sNaN -> NaN Invalid_operation
|
||||
andx851 and -Inf sNaN -> NaN Invalid_operation
|
||||
andx852 and -1000 sNaN -> NaN Invalid_operation
|
||||
andx853 and -1 sNaN -> NaN Invalid_operation
|
||||
andx854 and -0 sNaN -> NaN Invalid_operation
|
||||
andx855 and 0 sNaN -> NaN Invalid_operation
|
||||
andx856 and 1 sNaN -> NaN Invalid_operation
|
||||
andx857 and 1000 sNaN -> NaN Invalid_operation
|
||||
andx858 and Inf sNaN -> NaN Invalid_operation
|
||||
andx859 and NaN sNaN -> NaN Invalid_operation
|
||||
|
||||
-- propagating NaNs
|
||||
andx861 and NaN1 -Inf -> NaN Invalid_operation
|
||||
andx862 and +NaN2 -1000 -> NaN Invalid_operation
|
||||
andx863 and NaN3 1000 -> NaN Invalid_operation
|
||||
andx864 and NaN4 Inf -> NaN Invalid_operation
|
||||
andx865 and NaN5 +NaN6 -> NaN Invalid_operation
|
||||
andx866 and -Inf NaN7 -> NaN Invalid_operation
|
||||
andx867 and -1000 NaN8 -> NaN Invalid_operation
|
||||
andx868 and 1000 NaN9 -> NaN Invalid_operation
|
||||
andx869 and Inf +NaN10 -> NaN Invalid_operation
|
||||
andx871 and sNaN11 -Inf -> NaN Invalid_operation
|
||||
andx872 and sNaN12 -1000 -> NaN Invalid_operation
|
||||
andx873 and sNaN13 1000 -> NaN Invalid_operation
|
||||
andx874 and sNaN14 NaN17 -> NaN Invalid_operation
|
||||
andx875 and sNaN15 sNaN18 -> NaN Invalid_operation
|
||||
andx876 and NaN16 sNaN19 -> NaN Invalid_operation
|
||||
andx877 and -Inf +sNaN20 -> NaN Invalid_operation
|
||||
andx878 and -1000 sNaN21 -> NaN Invalid_operation
|
||||
andx879 and 1000 sNaN22 -> NaN Invalid_operation
|
||||
andx880 and Inf sNaN23 -> NaN Invalid_operation
|
||||
andx881 and +NaN25 +sNaN24 -> NaN Invalid_operation
|
||||
andx882 and -NaN26 NaN28 -> NaN Invalid_operation
|
||||
andx883 and -sNaN27 sNaN29 -> NaN Invalid_operation
|
||||
andx884 and 1000 -NaN30 -> NaN Invalid_operation
|
||||
andx885 and 1000 -sNaN31 -> NaN Invalid_operation
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,211 @@
|
||||
------------------------------------------------------------------------
|
||||
-- clamp.decTest -- clamped exponent tests (format-independent) --
|
||||
-- Copyright (c) IBM Corporation, 2000, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
-- This set of tests uses the same limits as the 8-byte concrete
|
||||
-- representation, but applies clamping without using format-specific
|
||||
-- conversions.
|
||||
|
||||
extended: 1
|
||||
precision: 16
|
||||
rounding: half_even
|
||||
maxExponent: 384
|
||||
minExponent: -383
|
||||
clamp: 1
|
||||
|
||||
-- General testcases
|
||||
|
||||
-- Normality
|
||||
clam010 apply 1234567890123456 -> 1234567890123456
|
||||
clam011 apply 1234567890123456.0 -> 1234567890123456 Rounded
|
||||
clam012 apply 1234567890123456.1 -> 1234567890123456 Rounded Inexact
|
||||
clam013 apply -1234567890123456 -> -1234567890123456
|
||||
clam014 apply -1234567890123456.0 -> -1234567890123456 Rounded
|
||||
clam015 apply -1234567890123456.1 -> -1234567890123456 Rounded Inexact
|
||||
|
||||
|
||||
-- Nmax and similar
|
||||
clam022 apply 9.999999999999999E+384 -> 9.999999999999999E+384
|
||||
clam024 apply 1.234567890123456E+384 -> 1.234567890123456E+384
|
||||
-- fold-downs (more below)
|
||||
clam030 apply 1.23E+384 -> 1.230000000000000E+384 Clamped
|
||||
clam032 apply 1E+384 -> 1.000000000000000E+384 Clamped
|
||||
|
||||
clam051 apply 12345 -> 12345
|
||||
clam053 apply 1234 -> 1234
|
||||
clam055 apply 123 -> 123
|
||||
clam057 apply 12 -> 12
|
||||
clam059 apply 1 -> 1
|
||||
clam061 apply 1.23 -> 1.23
|
||||
clam063 apply 123.45 -> 123.45
|
||||
|
||||
-- Nmin and below
|
||||
clam071 apply 1E-383 -> 1E-383
|
||||
clam073 apply 1.000000000000000E-383 -> 1.000000000000000E-383
|
||||
clam075 apply 1.000000000000001E-383 -> 1.000000000000001E-383
|
||||
|
||||
clam077 apply 0.100000000000000E-383 -> 1.00000000000000E-384 Subnormal
|
||||
clam079 apply 0.000000000000010E-383 -> 1.0E-397 Subnormal
|
||||
clam081 apply 0.00000000000001E-383 -> 1E-397 Subnormal
|
||||
clam083 apply 0.000000000000001E-383 -> 1E-398 Subnormal
|
||||
|
||||
-- underflows
|
||||
clam090 apply 1e-398 -> #0000000000000001 Subnormal
|
||||
clam091 apply 1.9e-398 -> #0000000000000002 Subnormal Underflow Inexact Rounded
|
||||
clam092 apply 1.1e-398 -> #0000000000000001 Subnormal Underflow Inexact Rounded
|
||||
clam093 apply 1.00000000001e-398 -> #0000000000000001 Subnormal Underflow Inexact Rounded
|
||||
clam094 apply 1.00000000000001e-398 -> #0000000000000001 Subnormal Underflow Inexact Rounded
|
||||
clam095 apply 1.000000000000001e-398 -> #0000000000000001 Subnormal Underflow Inexact Rounded
|
||||
clam096 apply 0.1e-398 -> #0000000000000000 Subnormal Underflow Inexact Rounded Clamped
|
||||
clam097 apply 0.00000000001e-398 -> #0000000000000000 Subnormal Underflow Inexact Rounded Clamped
|
||||
clam098 apply 0.00000000000001e-398 -> #0000000000000000 Subnormal Underflow Inexact Rounded Clamped
|
||||
clam099 apply 0.000000000000001e-398 -> #0000000000000000 Subnormal Underflow Inexact Rounded Clamped
|
||||
|
||||
-- Same again, negatives
|
||||
-- Nmax and similar
|
||||
clam122 apply -9.999999999999999E+384 -> -9.999999999999999E+384
|
||||
clam124 apply -1.234567890123456E+384 -> -1.234567890123456E+384
|
||||
-- fold-downs (more below)
|
||||
clam130 apply -1.23E+384 -> -1.230000000000000E+384 Clamped
|
||||
clam132 apply -1E+384 -> -1.000000000000000E+384 Clamped
|
||||
|
||||
clam151 apply -12345 -> -12345
|
||||
clam153 apply -1234 -> -1234
|
||||
clam155 apply -123 -> -123
|
||||
clam157 apply -12 -> -12
|
||||
clam159 apply -1 -> -1
|
||||
clam161 apply -1.23 -> -1.23
|
||||
clam163 apply -123.45 -> -123.45
|
||||
|
||||
-- Nmin and below
|
||||
clam171 apply -1E-383 -> -1E-383
|
||||
clam173 apply -1.000000000000000E-383 -> -1.000000000000000E-383
|
||||
clam175 apply -1.000000000000001E-383 -> -1.000000000000001E-383
|
||||
|
||||
clam177 apply -0.100000000000000E-383 -> -1.00000000000000E-384 Subnormal
|
||||
clam179 apply -0.000000000000010E-383 -> -1.0E-397 Subnormal
|
||||
clam181 apply -0.00000000000001E-383 -> -1E-397 Subnormal
|
||||
clam183 apply -0.000000000000001E-383 -> -1E-398 Subnormal
|
||||
|
||||
-- underflows
|
||||
clam189 apply -1e-398 -> #8000000000000001 Subnormal
|
||||
clam190 apply -1.0e-398 -> #8000000000000001 Subnormal Rounded
|
||||
clam191 apply -1.9e-398 -> #8000000000000002 Subnormal Underflow Inexact Rounded
|
||||
clam192 apply -1.1e-398 -> #8000000000000001 Subnormal Underflow Inexact Rounded
|
||||
clam193 apply -1.00000000001e-398 -> #8000000000000001 Subnormal Underflow Inexact Rounded
|
||||
clam194 apply -1.00000000000001e-398 -> #8000000000000001 Subnormal Underflow Inexact Rounded
|
||||
clam195 apply -1.000000000000001e-398 -> #8000000000000001 Subnormal Underflow Inexact Rounded
|
||||
clam196 apply -0.1e-398 -> #8000000000000000 Subnormal Underflow Inexact Rounded Clamped
|
||||
clam197 apply -0.00000000001e-398 -> #8000000000000000 Subnormal Underflow Inexact Rounded Clamped
|
||||
clam198 apply -0.00000000000001e-398 -> #8000000000000000 Subnormal Underflow Inexact Rounded Clamped
|
||||
clam199 apply -0.000000000000001e-398 -> #8000000000000000 Subnormal Underflow Inexact Rounded Clamped
|
||||
|
||||
-- zeros
|
||||
clam401 apply 0E-500 -> 0E-398 Clamped
|
||||
clam402 apply 0E-400 -> 0E-398 Clamped
|
||||
clam403 apply 0E-398 -> 0E-398
|
||||
clam404 apply 0.000000000000000E-383 -> 0E-398
|
||||
clam405 apply 0E-2 -> 0.00
|
||||
clam406 apply 0 -> 0
|
||||
clam407 apply 0E+3 -> 0E+3
|
||||
clam408 apply 0E+369 -> 0E+369
|
||||
-- clamped zeros...
|
||||
clam410 apply 0E+370 -> 0E+369 Clamped
|
||||
clam411 apply 0E+384 -> 0E+369 Clamped
|
||||
clam412 apply 0E+400 -> 0E+369 Clamped
|
||||
clam413 apply 0E+500 -> 0E+369 Clamped
|
||||
|
||||
-- negative zeros
|
||||
clam420 apply -0E-500 -> -0E-398 Clamped
|
||||
clam421 apply -0E-400 -> -0E-398 Clamped
|
||||
clam422 apply -0E-398 -> -0E-398
|
||||
clam423 apply -0.000000000000000E-383 -> -0E-398
|
||||
clam424 apply -0E-2 -> -0.00
|
||||
clam425 apply -0 -> -0
|
||||
clam426 apply -0E+3 -> -0E+3
|
||||
clam427 apply -0E+369 -> -0E+369
|
||||
-- clamped zeros...
|
||||
clam431 apply -0E+370 -> -0E+369 Clamped
|
||||
clam432 apply -0E+384 -> -0E+369 Clamped
|
||||
clam433 apply -0E+400 -> -0E+369 Clamped
|
||||
clam434 apply -0E+500 -> -0E+369 Clamped
|
||||
|
||||
-- fold-down full sequence
|
||||
clam601 apply 1E+384 -> 1.000000000000000E+384 Clamped
|
||||
clam603 apply 1E+383 -> 1.00000000000000E+383 Clamped
|
||||
clam605 apply 1E+382 -> 1.0000000000000E+382 Clamped
|
||||
clam607 apply 1E+381 -> 1.000000000000E+381 Clamped
|
||||
clam609 apply 1E+380 -> 1.00000000000E+380 Clamped
|
||||
clam611 apply 1E+379 -> 1.0000000000E+379 Clamped
|
||||
clam613 apply 1E+378 -> 1.000000000E+378 Clamped
|
||||
clam615 apply 1E+377 -> 1.00000000E+377 Clamped
|
||||
clam617 apply 1E+376 -> 1.0000000E+376 Clamped
|
||||
clam619 apply 1E+375 -> 1.000000E+375 Clamped
|
||||
clam621 apply 1E+374 -> 1.00000E+374 Clamped
|
||||
clam623 apply 1E+373 -> 1.0000E+373 Clamped
|
||||
clam625 apply 1E+372 -> 1.000E+372 Clamped
|
||||
clam627 apply 1E+371 -> 1.00E+371 Clamped
|
||||
clam629 apply 1E+370 -> 1.0E+370 Clamped
|
||||
clam631 apply 1E+369 -> 1E+369
|
||||
clam633 apply 1E+368 -> 1E+368
|
||||
-- same with 9s
|
||||
clam641 apply 9E+384 -> 9.000000000000000E+384 Clamped
|
||||
clam643 apply 9E+383 -> 9.00000000000000E+383 Clamped
|
||||
clam645 apply 9E+382 -> 9.0000000000000E+382 Clamped
|
||||
clam647 apply 9E+381 -> 9.000000000000E+381 Clamped
|
||||
clam649 apply 9E+380 -> 9.00000000000E+380 Clamped
|
||||
clam651 apply 9E+379 -> 9.0000000000E+379 Clamped
|
||||
clam653 apply 9E+378 -> 9.000000000E+378 Clamped
|
||||
clam655 apply 9E+377 -> 9.00000000E+377 Clamped
|
||||
clam657 apply 9E+376 -> 9.0000000E+376 Clamped
|
||||
clam659 apply 9E+375 -> 9.000000E+375 Clamped
|
||||
clam661 apply 9E+374 -> 9.00000E+374 Clamped
|
||||
clam663 apply 9E+373 -> 9.0000E+373 Clamped
|
||||
clam665 apply 9E+372 -> 9.000E+372 Clamped
|
||||
clam667 apply 9E+371 -> 9.00E+371 Clamped
|
||||
clam669 apply 9E+370 -> 9.0E+370 Clamped
|
||||
clam671 apply 9E+369 -> 9E+369
|
||||
clam673 apply 9E+368 -> 9E+368
|
||||
|
||||
-- subnormals clamped to 0-Etiny
|
||||
precision: 16
|
||||
maxExponent: 384
|
||||
minExponent: -383
|
||||
clam681 apply 7E-398 -> 7E-398 Subnormal
|
||||
clam682 apply 0E-398 -> 0E-398
|
||||
clam683 apply 7E-399 -> 1E-398 Subnormal Underflow Inexact Rounded
|
||||
clam684 apply 4E-399 -> 0E-398 Clamped Subnormal Underflow Inexact Rounded
|
||||
clam685 apply 7E-400 -> 0E-398 Clamped Subnormal Underflow Inexact Rounded
|
||||
clam686 apply 7E-401 -> 0E-398 Clamped Subnormal Underflow Inexact Rounded
|
||||
clam687 apply 0E-399 -> 0E-398 Clamped
|
||||
clam688 apply 0E-400 -> 0E-398 Clamped
|
||||
clam689 apply 0E-401 -> 0E-398 Clamped
|
||||
|
||||
-- example from documentation
|
||||
precision: 7
|
||||
rounding: half_even
|
||||
maxExponent: +96
|
||||
minExponent: -95
|
||||
|
||||
clamp: 0
|
||||
clam700 apply 1.23E+96 -> 1.23E+96
|
||||
|
||||
clamp: 1
|
||||
clam701 apply 1.23E+96 -> 1.230000E+96 Clamped
|
@@ -0,0 +1,131 @@
|
||||
------------------------------------------------------------------------
|
||||
-- class.decTest -- Class operations --
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
-- [New 2006.11.27]
|
||||
|
||||
precision: 9
|
||||
maxExponent: 999
|
||||
minExponent: -999
|
||||
extended: 1
|
||||
clamp: 1
|
||||
rounding: half_even
|
||||
|
||||
clasx001 class 0 -> +Zero
|
||||
clasx002 class 0.00 -> +Zero
|
||||
clasx003 class 0E+5 -> +Zero
|
||||
clasx004 class 1E-1007 -> +Subnormal
|
||||
clasx005 class 0.1E-999 -> +Subnormal
|
||||
clasx006 class 0.99999999E-999 -> +Subnormal
|
||||
clasx007 class 1.00000000E-999 -> +Normal
|
||||
clasx008 class 1E-999 -> +Normal
|
||||
clasx009 class 1E-100 -> +Normal
|
||||
clasx010 class 1E-10 -> +Normal
|
||||
clasx012 class 1E-1 -> +Normal
|
||||
clasx013 class 1 -> +Normal
|
||||
clasx014 class 2.50 -> +Normal
|
||||
clasx015 class 100.100 -> +Normal
|
||||
clasx016 class 1E+30 -> +Normal
|
||||
clasx017 class 1E+999 -> +Normal
|
||||
clasx018 class 9.99999999E+999 -> +Normal
|
||||
clasx019 class Inf -> +Infinity
|
||||
|
||||
clasx021 class -0 -> -Zero
|
||||
clasx022 class -0.00 -> -Zero
|
||||
clasx023 class -0E+5 -> -Zero
|
||||
clasx024 class -1E-1007 -> -Subnormal
|
||||
clasx025 class -0.1E-999 -> -Subnormal
|
||||
clasx026 class -0.99999999E-999 -> -Subnormal
|
||||
clasx027 class -1.00000000E-999 -> -Normal
|
||||
clasx028 class -1E-999 -> -Normal
|
||||
clasx029 class -1E-100 -> -Normal
|
||||
clasx030 class -1E-10 -> -Normal
|
||||
clasx032 class -1E-1 -> -Normal
|
||||
clasx033 class -1 -> -Normal
|
||||
clasx034 class -2.50 -> -Normal
|
||||
clasx035 class -100.100 -> -Normal
|
||||
clasx036 class -1E+30 -> -Normal
|
||||
clasx037 class -1E+999 -> -Normal
|
||||
clasx038 class -9.99999999E+999 -> -Normal
|
||||
clasx039 class -Inf -> -Infinity
|
||||
|
||||
clasx041 class NaN -> NaN
|
||||
clasx042 class -NaN -> NaN
|
||||
clasx043 class +NaN12345 -> NaN
|
||||
clasx044 class sNaN -> sNaN
|
||||
clasx045 class -sNaN -> sNaN
|
||||
clasx046 class +sNaN12345 -> sNaN
|
||||
|
||||
|
||||
-- decimal64 bounds
|
||||
|
||||
precision: 16
|
||||
maxExponent: 384
|
||||
minExponent: -383
|
||||
clamp: 1
|
||||
rounding: half_even
|
||||
|
||||
clasx201 class 0 -> +Zero
|
||||
clasx202 class 0.00 -> +Zero
|
||||
clasx203 class 0E+5 -> +Zero
|
||||
clasx204 class 1E-396 -> +Subnormal
|
||||
clasx205 class 0.1E-383 -> +Subnormal
|
||||
clasx206 class 0.999999999999999E-383 -> +Subnormal
|
||||
clasx207 class 1.000000000000000E-383 -> +Normal
|
||||
clasx208 class 1E-383 -> +Normal
|
||||
clasx209 class 1E-100 -> +Normal
|
||||
clasx210 class 1E-10 -> +Normal
|
||||
clasx212 class 1E-1 -> +Normal
|
||||
clasx213 class 1 -> +Normal
|
||||
clasx214 class 2.50 -> +Normal
|
||||
clasx215 class 100.100 -> +Normal
|
||||
clasx216 class 1E+30 -> +Normal
|
||||
clasx217 class 1E+384 -> +Normal
|
||||
clasx218 class 9.999999999999999E+384 -> +Normal
|
||||
clasx219 class Inf -> +Infinity
|
||||
|
||||
clasx221 class -0 -> -Zero
|
||||
clasx222 class -0.00 -> -Zero
|
||||
clasx223 class -0E+5 -> -Zero
|
||||
clasx224 class -1E-396 -> -Subnormal
|
||||
clasx225 class -0.1E-383 -> -Subnormal
|
||||
clasx226 class -0.999999999999999E-383 -> -Subnormal
|
||||
clasx227 class -1.000000000000000E-383 -> -Normal
|
||||
clasx228 class -1E-383 -> -Normal
|
||||
clasx229 class -1E-100 -> -Normal
|
||||
clasx230 class -1E-10 -> -Normal
|
||||
clasx232 class -1E-1 -> -Normal
|
||||
clasx233 class -1 -> -Normal
|
||||
clasx234 class -2.50 -> -Normal
|
||||
clasx235 class -100.100 -> -Normal
|
||||
clasx236 class -1E+30 -> -Normal
|
||||
clasx237 class -1E+384 -> -Normal
|
||||
clasx238 class -9.999999999999999E+384 -> -Normal
|
||||
clasx239 class -Inf -> -Infinity
|
||||
|
||||
clasx241 class NaN -> NaN
|
||||
clasx242 class -NaN -> NaN
|
||||
clasx243 class +NaN12345 -> NaN
|
||||
clasx244 class sNaN -> sNaN
|
||||
clasx245 class -sNaN -> sNaN
|
||||
clasx246 class +sNaN12345 -> sNaN
|
||||
|
||||
|
||||
|
@@ -0,0 +1,758 @@
|
||||
------------------------------------------------------------------------
|
||||
-- compare.decTest -- decimal comparison that allows quiet NaNs --
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
-- Note that we cannot assume add/subtract tests cover paths adequately,
|
||||
-- here, because the code might be quite different (comparison cannot
|
||||
-- overflow or underflow, so actual subtractions are not necessary).
|
||||
|
||||
extended: 1
|
||||
|
||||
precision: 9
|
||||
rounding: half_up
|
||||
maxExponent: 999
|
||||
minexponent: -999
|
||||
|
||||
-- sanity checks
|
||||
comx001 compare -2 -2 -> 0
|
||||
comx002 compare -2 -1 -> -1
|
||||
comx003 compare -2 0 -> -1
|
||||
comx004 compare -2 1 -> -1
|
||||
comx005 compare -2 2 -> -1
|
||||
comx006 compare -1 -2 -> 1
|
||||
comx007 compare -1 -1 -> 0
|
||||
comx008 compare -1 0 -> -1
|
||||
comx009 compare -1 1 -> -1
|
||||
comx010 compare -1 2 -> -1
|
||||
comx011 compare 0 -2 -> 1
|
||||
comx012 compare 0 -1 -> 1
|
||||
comx013 compare 0 0 -> 0
|
||||
comx014 compare 0 1 -> -1
|
||||
comx015 compare 0 2 -> -1
|
||||
comx016 compare 1 -2 -> 1
|
||||
comx017 compare 1 -1 -> 1
|
||||
comx018 compare 1 0 -> 1
|
||||
comx019 compare 1 1 -> 0
|
||||
comx020 compare 1 2 -> -1
|
||||
comx021 compare 2 -2 -> 1
|
||||
comx022 compare 2 -1 -> 1
|
||||
comx023 compare 2 0 -> 1
|
||||
comx025 compare 2 1 -> 1
|
||||
comx026 compare 2 2 -> 0
|
||||
|
||||
comx031 compare -20 -20 -> 0
|
||||
comx032 compare -20 -10 -> -1
|
||||
comx033 compare -20 00 -> -1
|
||||
comx034 compare -20 10 -> -1
|
||||
comx035 compare -20 20 -> -1
|
||||
comx036 compare -10 -20 -> 1
|
||||
comx037 compare -10 -10 -> 0
|
||||
comx038 compare -10 00 -> -1
|
||||
comx039 compare -10 10 -> -1
|
||||
comx040 compare -10 20 -> -1
|
||||
comx041 compare 00 -20 -> 1
|
||||
comx042 compare 00 -10 -> 1
|
||||
comx043 compare 00 00 -> 0
|
||||
comx044 compare 00 10 -> -1
|
||||
comx045 compare 00 20 -> -1
|
||||
comx046 compare 10 -20 -> 1
|
||||
comx047 compare 10 -10 -> 1
|
||||
comx048 compare 10 00 -> 1
|
||||
comx049 compare 10 10 -> 0
|
||||
comx050 compare 10 20 -> -1
|
||||
comx051 compare 20 -20 -> 1
|
||||
comx052 compare 20 -10 -> 1
|
||||
comx053 compare 20 00 -> 1
|
||||
comx055 compare 20 10 -> 1
|
||||
comx056 compare 20 20 -> 0
|
||||
|
||||
comx061 compare -2.0 -2.0 -> 0
|
||||
comx062 compare -2.0 -1.0 -> -1
|
||||
comx063 compare -2.0 0.0 -> -1
|
||||
comx064 compare -2.0 1.0 -> -1
|
||||
comx065 compare -2.0 2.0 -> -1
|
||||
comx066 compare -1.0 -2.0 -> 1
|
||||
comx067 compare -1.0 -1.0 -> 0
|
||||
comx068 compare -1.0 0.0 -> -1
|
||||
comx069 compare -1.0 1.0 -> -1
|
||||
comx070 compare -1.0 2.0 -> -1
|
||||
comx071 compare 0.0 -2.0 -> 1
|
||||
comx072 compare 0.0 -1.0 -> 1
|
||||
comx073 compare 0.0 0.0 -> 0
|
||||
comx074 compare 0.0 1.0 -> -1
|
||||
comx075 compare 0.0 2.0 -> -1
|
||||
comx076 compare 1.0 -2.0 -> 1
|
||||
comx077 compare 1.0 -1.0 -> 1
|
||||
comx078 compare 1.0 0.0 -> 1
|
||||
comx079 compare 1.0 1.0 -> 0
|
||||
comx080 compare 1.0 2.0 -> -1
|
||||
comx081 compare 2.0 -2.0 -> 1
|
||||
comx082 compare 2.0 -1.0 -> 1
|
||||
comx083 compare 2.0 0.0 -> 1
|
||||
comx085 compare 2.0 1.0 -> 1
|
||||
comx086 compare 2.0 2.0 -> 0
|
||||
|
||||
-- now some cases which might overflow if subtract were used
|
||||
maxexponent: 999999999
|
||||
minexponent: -999999999
|
||||
comx095 compare 9.99999999E+999999999 9.99999999E+999999999 -> 0
|
||||
comx096 compare -9.99999999E+999999999 9.99999999E+999999999 -> -1
|
||||
comx097 compare 9.99999999E+999999999 -9.99999999E+999999999 -> 1
|
||||
comx098 compare -9.99999999E+999999999 -9.99999999E+999999999 -> 0
|
||||
|
||||
-- some differing length/exponent cases
|
||||
comx100 compare 7.0 7.0 -> 0
|
||||
comx101 compare 7.0 7 -> 0
|
||||
comx102 compare 7 7.0 -> 0
|
||||
comx103 compare 7E+0 7.0 -> 0
|
||||
comx104 compare 70E-1 7.0 -> 0
|
||||
comx105 compare 0.7E+1 7 -> 0
|
||||
comx106 compare 70E-1 7 -> 0
|
||||
comx107 compare 7.0 7E+0 -> 0
|
||||
comx108 compare 7.0 70E-1 -> 0
|
||||
comx109 compare 7 0.7E+1 -> 0
|
||||
comx110 compare 7 70E-1 -> 0
|
||||
|
||||
comx120 compare 8.0 7.0 -> 1
|
||||
comx121 compare 8.0 7 -> 1
|
||||
comx122 compare 8 7.0 -> 1
|
||||
comx123 compare 8E+0 7.0 -> 1
|
||||
comx124 compare 80E-1 7.0 -> 1
|
||||
comx125 compare 0.8E+1 7 -> 1
|
||||
comx126 compare 80E-1 7 -> 1
|
||||
comx127 compare 8.0 7E+0 -> 1
|
||||
comx128 compare 8.0 70E-1 -> 1
|
||||
comx129 compare 8 0.7E+1 -> 1
|
||||
comx130 compare 8 70E-1 -> 1
|
||||
|
||||
comx140 compare 8.0 9.0 -> -1
|
||||
comx141 compare 8.0 9 -> -1
|
||||
comx142 compare 8 9.0 -> -1
|
||||
comx143 compare 8E+0 9.0 -> -1
|
||||
comx144 compare 80E-1 9.0 -> -1
|
||||
comx145 compare 0.8E+1 9 -> -1
|
||||
comx146 compare 80E-1 9 -> -1
|
||||
comx147 compare 8.0 9E+0 -> -1
|
||||
comx148 compare 8.0 90E-1 -> -1
|
||||
comx149 compare 8 0.9E+1 -> -1
|
||||
comx150 compare 8 90E-1 -> -1
|
||||
|
||||
-- and again, with sign changes -+ ..
|
||||
comx200 compare -7.0 7.0 -> -1
|
||||
comx201 compare -7.0 7 -> -1
|
||||
comx202 compare -7 7.0 -> -1
|
||||
comx203 compare -7E+0 7.0 -> -1
|
||||
comx204 compare -70E-1 7.0 -> -1
|
||||
comx205 compare -0.7E+1 7 -> -1
|
||||
comx206 compare -70E-1 7 -> -1
|
||||
comx207 compare -7.0 7E+0 -> -1
|
||||
comx208 compare -7.0 70E-1 -> -1
|
||||
comx209 compare -7 0.7E+1 -> -1
|
||||
comx210 compare -7 70E-1 -> -1
|
||||
|
||||
comx220 compare -8.0 7.0 -> -1
|
||||
comx221 compare -8.0 7 -> -1
|
||||
comx222 compare -8 7.0 -> -1
|
||||
comx223 compare -8E+0 7.0 -> -1
|
||||
comx224 compare -80E-1 7.0 -> -1
|
||||
comx225 compare -0.8E+1 7 -> -1
|
||||
comx226 compare -80E-1 7 -> -1
|
||||
comx227 compare -8.0 7E+0 -> -1
|
||||
comx228 compare -8.0 70E-1 -> -1
|
||||
comx229 compare -8 0.7E+1 -> -1
|
||||
comx230 compare -8 70E-1 -> -1
|
||||
|
||||
comx240 compare -8.0 9.0 -> -1
|
||||
comx241 compare -8.0 9 -> -1
|
||||
comx242 compare -8 9.0 -> -1
|
||||
comx243 compare -8E+0 9.0 -> -1
|
||||
comx244 compare -80E-1 9.0 -> -1
|
||||
comx245 compare -0.8E+1 9 -> -1
|
||||
comx246 compare -80E-1 9 -> -1
|
||||
comx247 compare -8.0 9E+0 -> -1
|
||||
comx248 compare -8.0 90E-1 -> -1
|
||||
comx249 compare -8 0.9E+1 -> -1
|
||||
comx250 compare -8 90E-1 -> -1
|
||||
|
||||
-- and again, with sign changes +- ..
|
||||
comx300 compare 7.0 -7.0 -> 1
|
||||
comx301 compare 7.0 -7 -> 1
|
||||
comx302 compare 7 -7.0 -> 1
|
||||
comx303 compare 7E+0 -7.0 -> 1
|
||||
comx304 compare 70E-1 -7.0 -> 1
|
||||
comx305 compare .7E+1 -7 -> 1
|
||||
comx306 compare 70E-1 -7 -> 1
|
||||
comx307 compare 7.0 -7E+0 -> 1
|
||||
comx308 compare 7.0 -70E-1 -> 1
|
||||
comx309 compare 7 -.7E+1 -> 1
|
||||
comx310 compare 7 -70E-1 -> 1
|
||||
|
||||
comx320 compare 8.0 -7.0 -> 1
|
||||
comx321 compare 8.0 -7 -> 1
|
||||
comx322 compare 8 -7.0 -> 1
|
||||
comx323 compare 8E+0 -7.0 -> 1
|
||||
comx324 compare 80E-1 -7.0 -> 1
|
||||
comx325 compare .8E+1 -7 -> 1
|
||||
comx326 compare 80E-1 -7 -> 1
|
||||
comx327 compare 8.0 -7E+0 -> 1
|
||||
comx328 compare 8.0 -70E-1 -> 1
|
||||
comx329 compare 8 -.7E+1 -> 1
|
||||
comx330 compare 8 -70E-1 -> 1
|
||||
|
||||
comx340 compare 8.0 -9.0 -> 1
|
||||
comx341 compare 8.0 -9 -> 1
|
||||
comx342 compare 8 -9.0 -> 1
|
||||
comx343 compare 8E+0 -9.0 -> 1
|
||||
comx344 compare 80E-1 -9.0 -> 1
|
||||
comx345 compare .8E+1 -9 -> 1
|
||||
comx346 compare 80E-1 -9 -> 1
|
||||
comx347 compare 8.0 -9E+0 -> 1
|
||||
comx348 compare 8.0 -90E-1 -> 1
|
||||
comx349 compare 8 -.9E+1 -> 1
|
||||
comx350 compare 8 -90E-1 -> 1
|
||||
|
||||
-- and again, with sign changes -- ..
|
||||
comx400 compare -7.0 -7.0 -> 0
|
||||
comx401 compare -7.0 -7 -> 0
|
||||
comx402 compare -7 -7.0 -> 0
|
||||
comx403 compare -7E+0 -7.0 -> 0
|
||||
comx404 compare -70E-1 -7.0 -> 0
|
||||
comx405 compare -.7E+1 -7 -> 0
|
||||
comx406 compare -70E-1 -7 -> 0
|
||||
comx407 compare -7.0 -7E+0 -> 0
|
||||
comx408 compare -7.0 -70E-1 -> 0
|
||||
comx409 compare -7 -.7E+1 -> 0
|
||||
comx410 compare -7 -70E-1 -> 0
|
||||
|
||||
comx420 compare -8.0 -7.0 -> -1
|
||||
comx421 compare -8.0 -7 -> -1
|
||||
comx422 compare -8 -7.0 -> -1
|
||||
comx423 compare -8E+0 -7.0 -> -1
|
||||
comx424 compare -80E-1 -7.0 -> -1
|
||||
comx425 compare -.8E+1 -7 -> -1
|
||||
comx426 compare -80E-1 -7 -> -1
|
||||
comx427 compare -8.0 -7E+0 -> -1
|
||||
comx428 compare -8.0 -70E-1 -> -1
|
||||
comx429 compare -8 -.7E+1 -> -1
|
||||
comx430 compare -8 -70E-1 -> -1
|
||||
|
||||
comx440 compare -8.0 -9.0 -> 1
|
||||
comx441 compare -8.0 -9 -> 1
|
||||
comx442 compare -8 -9.0 -> 1
|
||||
comx443 compare -8E+0 -9.0 -> 1
|
||||
comx444 compare -80E-1 -9.0 -> 1
|
||||
comx445 compare -.8E+1 -9 -> 1
|
||||
comx446 compare -80E-1 -9 -> 1
|
||||
comx447 compare -8.0 -9E+0 -> 1
|
||||
comx448 compare -8.0 -90E-1 -> 1
|
||||
comx449 compare -8 -.9E+1 -> 1
|
||||
comx450 compare -8 -90E-1 -> 1
|
||||
|
||||
-- misalignment traps for little-endian
|
||||
comx451 compare 1.0 0.1 -> 1
|
||||
comx452 compare 0.1 1.0 -> -1
|
||||
comx453 compare 10.0 0.1 -> 1
|
||||
comx454 compare 0.1 10.0 -> -1
|
||||
comx455 compare 100 1.0 -> 1
|
||||
comx456 compare 1.0 100 -> -1
|
||||
comx457 compare 1000 10.0 -> 1
|
||||
comx458 compare 10.0 1000 -> -1
|
||||
comx459 compare 10000 100.0 -> 1
|
||||
comx460 compare 100.0 10000 -> -1
|
||||
comx461 compare 100000 1000.0 -> 1
|
||||
comx462 compare 1000.0 100000 -> -1
|
||||
comx463 compare 1000000 10000.0 -> 1
|
||||
comx464 compare 10000.0 1000000 -> -1
|
||||
|
||||
-- testcases that subtract to lots of zeros at boundaries [pgr]
|
||||
precision: 40
|
||||
comx470 compare 123.4560000000000000E789 123.456E789 -> 0
|
||||
comx471 compare 123.456000000000000E-89 123.456E-89 -> 0
|
||||
comx472 compare 123.45600000000000E789 123.456E789 -> 0
|
||||
comx473 compare 123.4560000000000E-89 123.456E-89 -> 0
|
||||
comx474 compare 123.456000000000E789 123.456E789 -> 0
|
||||
comx475 compare 123.45600000000E-89 123.456E-89 -> 0
|
||||
comx476 compare 123.4560000000E789 123.456E789 -> 0
|
||||
comx477 compare 123.456000000E-89 123.456E-89 -> 0
|
||||
comx478 compare 123.45600000E789 123.456E789 -> 0
|
||||
comx479 compare 123.4560000E-89 123.456E-89 -> 0
|
||||
comx480 compare 123.456000E789 123.456E789 -> 0
|
||||
comx481 compare 123.45600E-89 123.456E-89 -> 0
|
||||
comx482 compare 123.4560E789 123.456E789 -> 0
|
||||
comx483 compare 123.456E-89 123.456E-89 -> 0
|
||||
comx484 compare 123.456E-89 123.4560000000000000E-89 -> 0
|
||||
comx485 compare 123.456E789 123.456000000000000E789 -> 0
|
||||
comx486 compare 123.456E-89 123.45600000000000E-89 -> 0
|
||||
comx487 compare 123.456E789 123.4560000000000E789 -> 0
|
||||
comx488 compare 123.456E-89 123.456000000000E-89 -> 0
|
||||
comx489 compare 123.456E789 123.45600000000E789 -> 0
|
||||
comx490 compare 123.456E-89 123.4560000000E-89 -> 0
|
||||
comx491 compare 123.456E789 123.456000000E789 -> 0
|
||||
comx492 compare 123.456E-89 123.45600000E-89 -> 0
|
||||
comx493 compare 123.456E789 123.4560000E789 -> 0
|
||||
comx494 compare 123.456E-89 123.456000E-89 -> 0
|
||||
comx495 compare 123.456E789 123.45600E789 -> 0
|
||||
comx496 compare 123.456E-89 123.4560E-89 -> 0
|
||||
comx497 compare 123.456E789 123.456E789 -> 0
|
||||
|
||||
-- wide-ranging, around precision; signs equal
|
||||
precision: 9
|
||||
comx500 compare 1 1E-15 -> 1
|
||||
comx501 compare 1 1E-14 -> 1
|
||||
comx502 compare 1 1E-13 -> 1
|
||||
comx503 compare 1 1E-12 -> 1
|
||||
comx504 compare 1 1E-11 -> 1
|
||||
comx505 compare 1 1E-10 -> 1
|
||||
comx506 compare 1 1E-9 -> 1
|
||||
comx507 compare 1 1E-8 -> 1
|
||||
comx508 compare 1 1E-7 -> 1
|
||||
comx509 compare 1 1E-6 -> 1
|
||||
comx510 compare 1 1E-5 -> 1
|
||||
comx511 compare 1 1E-4 -> 1
|
||||
comx512 compare 1 1E-3 -> 1
|
||||
comx513 compare 1 1E-2 -> 1
|
||||
comx514 compare 1 1E-1 -> 1
|
||||
comx515 compare 1 1E-0 -> 0
|
||||
comx516 compare 1 1E+1 -> -1
|
||||
comx517 compare 1 1E+2 -> -1
|
||||
comx518 compare 1 1E+3 -> -1
|
||||
comx519 compare 1 1E+4 -> -1
|
||||
comx521 compare 1 1E+5 -> -1
|
||||
comx522 compare 1 1E+6 -> -1
|
||||
comx523 compare 1 1E+7 -> -1
|
||||
comx524 compare 1 1E+8 -> -1
|
||||
comx525 compare 1 1E+9 -> -1
|
||||
comx526 compare 1 1E+10 -> -1
|
||||
comx527 compare 1 1E+11 -> -1
|
||||
comx528 compare 1 1E+12 -> -1
|
||||
comx529 compare 1 1E+13 -> -1
|
||||
comx530 compare 1 1E+14 -> -1
|
||||
comx531 compare 1 1E+15 -> -1
|
||||
-- LR swap
|
||||
comx540 compare 1E-15 1 -> -1
|
||||
comx541 compare 1E-14 1 -> -1
|
||||
comx542 compare 1E-13 1 -> -1
|
||||
comx543 compare 1E-12 1 -> -1
|
||||
comx544 compare 1E-11 1 -> -1
|
||||
comx545 compare 1E-10 1 -> -1
|
||||
comx546 compare 1E-9 1 -> -1
|
||||
comx547 compare 1E-8 1 -> -1
|
||||
comx548 compare 1E-7 1 -> -1
|
||||
comx549 compare 1E-6 1 -> -1
|
||||
comx550 compare 1E-5 1 -> -1
|
||||
comx551 compare 1E-4 1 -> -1
|
||||
comx552 compare 1E-3 1 -> -1
|
||||
comx553 compare 1E-2 1 -> -1
|
||||
comx554 compare 1E-1 1 -> -1
|
||||
comx555 compare 1E-0 1 -> 0
|
||||
comx556 compare 1E+1 1 -> 1
|
||||
comx557 compare 1E+2 1 -> 1
|
||||
comx558 compare 1E+3 1 -> 1
|
||||
comx559 compare 1E+4 1 -> 1
|
||||
comx561 compare 1E+5 1 -> 1
|
||||
comx562 compare 1E+6 1 -> 1
|
||||
comx563 compare 1E+7 1 -> 1
|
||||
comx564 compare 1E+8 1 -> 1
|
||||
comx565 compare 1E+9 1 -> 1
|
||||
comx566 compare 1E+10 1 -> 1
|
||||
comx567 compare 1E+11 1 -> 1
|
||||
comx568 compare 1E+12 1 -> 1
|
||||
comx569 compare 1E+13 1 -> 1
|
||||
comx570 compare 1E+14 1 -> 1
|
||||
comx571 compare 1E+15 1 -> 1
|
||||
-- similar with a useful coefficient, one side only
|
||||
comx580 compare 0.000000987654321 1E-15 -> 1
|
||||
comx581 compare 0.000000987654321 1E-14 -> 1
|
||||
comx582 compare 0.000000987654321 1E-13 -> 1
|
||||
comx583 compare 0.000000987654321 1E-12 -> 1
|
||||
comx584 compare 0.000000987654321 1E-11 -> 1
|
||||
comx585 compare 0.000000987654321 1E-10 -> 1
|
||||
comx586 compare 0.000000987654321 1E-9 -> 1
|
||||
comx587 compare 0.000000987654321 1E-8 -> 1
|
||||
comx588 compare 0.000000987654321 1E-7 -> 1
|
||||
comx589 compare 0.000000987654321 1E-6 -> -1
|
||||
comx590 compare 0.000000987654321 1E-5 -> -1
|
||||
comx591 compare 0.000000987654321 1E-4 -> -1
|
||||
comx592 compare 0.000000987654321 1E-3 -> -1
|
||||
comx593 compare 0.000000987654321 1E-2 -> -1
|
||||
comx594 compare 0.000000987654321 1E-1 -> -1
|
||||
comx595 compare 0.000000987654321 1E-0 -> -1
|
||||
comx596 compare 0.000000987654321 1E+1 -> -1
|
||||
comx597 compare 0.000000987654321 1E+2 -> -1
|
||||
comx598 compare 0.000000987654321 1E+3 -> -1
|
||||
comx599 compare 0.000000987654321 1E+4 -> -1
|
||||
|
||||
-- check some unit-y traps
|
||||
precision: 20
|
||||
comx600 compare 12 12.2345 -> -1
|
||||
comx601 compare 12.0 12.2345 -> -1
|
||||
comx602 compare 12.00 12.2345 -> -1
|
||||
comx603 compare 12.000 12.2345 -> -1
|
||||
comx604 compare 12.0000 12.2345 -> -1
|
||||
comx605 compare 12.00000 12.2345 -> -1
|
||||
comx606 compare 12.000000 12.2345 -> -1
|
||||
comx607 compare 12.0000000 12.2345 -> -1
|
||||
comx608 compare 12.00000000 12.2345 -> -1
|
||||
comx609 compare 12.000000000 12.2345 -> -1
|
||||
comx610 compare 12.1234 12 -> 1
|
||||
comx611 compare 12.1234 12.0 -> 1
|
||||
comx612 compare 12.1234 12.00 -> 1
|
||||
comx613 compare 12.1234 12.000 -> 1
|
||||
comx614 compare 12.1234 12.0000 -> 1
|
||||
comx615 compare 12.1234 12.00000 -> 1
|
||||
comx616 compare 12.1234 12.000000 -> 1
|
||||
comx617 compare 12.1234 12.0000000 -> 1
|
||||
comx618 compare 12.1234 12.00000000 -> 1
|
||||
comx619 compare 12.1234 12.000000000 -> 1
|
||||
comx620 compare -12 -12.2345 -> 1
|
||||
comx621 compare -12.0 -12.2345 -> 1
|
||||
comx622 compare -12.00 -12.2345 -> 1
|
||||
comx623 compare -12.000 -12.2345 -> 1
|
||||
comx624 compare -12.0000 -12.2345 -> 1
|
||||
comx625 compare -12.00000 -12.2345 -> 1
|
||||
comx626 compare -12.000000 -12.2345 -> 1
|
||||
comx627 compare -12.0000000 -12.2345 -> 1
|
||||
comx628 compare -12.00000000 -12.2345 -> 1
|
||||
comx629 compare -12.000000000 -12.2345 -> 1
|
||||
comx630 compare -12.1234 -12 -> -1
|
||||
comx631 compare -12.1234 -12.0 -> -1
|
||||
comx632 compare -12.1234 -12.00 -> -1
|
||||
comx633 compare -12.1234 -12.000 -> -1
|
||||
comx634 compare -12.1234 -12.0000 -> -1
|
||||
comx635 compare -12.1234 -12.00000 -> -1
|
||||
comx636 compare -12.1234 -12.000000 -> -1
|
||||
comx637 compare -12.1234 -12.0000000 -> -1
|
||||
comx638 compare -12.1234 -12.00000000 -> -1
|
||||
comx639 compare -12.1234 -12.000000000 -> -1
|
||||
precision: 9
|
||||
|
||||
-- extended zeros
|
||||
comx640 compare 0 0 -> 0
|
||||
comx641 compare 0 -0 -> 0
|
||||
comx642 compare 0 -0.0 -> 0
|
||||
comx643 compare 0 0.0 -> 0
|
||||
comx644 compare -0 0 -> 0
|
||||
comx645 compare -0 -0 -> 0
|
||||
comx646 compare -0 -0.0 -> 0
|
||||
comx647 compare -0 0.0 -> 0
|
||||
comx648 compare 0.0 0 -> 0
|
||||
comx649 compare 0.0 -0 -> 0
|
||||
comx650 compare 0.0 -0.0 -> 0
|
||||
comx651 compare 0.0 0.0 -> 0
|
||||
comx652 compare -0.0 0 -> 0
|
||||
comx653 compare -0.0 -0 -> 0
|
||||
comx654 compare -0.0 -0.0 -> 0
|
||||
comx655 compare -0.0 0.0 -> 0
|
||||
|
||||
comx656 compare -0E1 0.0 -> 0
|
||||
comx657 compare -0E2 0.0 -> 0
|
||||
comx658 compare 0E1 0.0 -> 0
|
||||
comx659 compare 0E2 0.0 -> 0
|
||||
comx660 compare -0E1 0 -> 0
|
||||
comx661 compare -0E2 0 -> 0
|
||||
comx662 compare 0E1 0 -> 0
|
||||
comx663 compare 0E2 0 -> 0
|
||||
comx664 compare -0E1 -0E1 -> 0
|
||||
comx665 compare -0E2 -0E1 -> 0
|
||||
comx666 compare 0E1 -0E1 -> 0
|
||||
comx667 compare 0E2 -0E1 -> 0
|
||||
comx668 compare -0E1 -0E2 -> 0
|
||||
comx669 compare -0E2 -0E2 -> 0
|
||||
comx670 compare 0E1 -0E2 -> 0
|
||||
comx671 compare 0E2 -0E2 -> 0
|
||||
comx672 compare -0E1 0E1 -> 0
|
||||
comx673 compare -0E2 0E1 -> 0
|
||||
comx674 compare 0E1 0E1 -> 0
|
||||
comx675 compare 0E2 0E1 -> 0
|
||||
comx676 compare -0E1 0E2 -> 0
|
||||
comx677 compare -0E2 0E2 -> 0
|
||||
comx678 compare 0E1 0E2 -> 0
|
||||
comx679 compare 0E2 0E2 -> 0
|
||||
|
||||
-- trailing zeros; unit-y
|
||||
precision: 20
|
||||
comx680 compare 12 12 -> 0
|
||||
comx681 compare 12 12.0 -> 0
|
||||
comx682 compare 12 12.00 -> 0
|
||||
comx683 compare 12 12.000 -> 0
|
||||
comx684 compare 12 12.0000 -> 0
|
||||
comx685 compare 12 12.00000 -> 0
|
||||
comx686 compare 12 12.000000 -> 0
|
||||
comx687 compare 12 12.0000000 -> 0
|
||||
comx688 compare 12 12.00000000 -> 0
|
||||
comx689 compare 12 12.000000000 -> 0
|
||||
comx690 compare 12 12 -> 0
|
||||
comx691 compare 12.0 12 -> 0
|
||||
comx692 compare 12.00 12 -> 0
|
||||
comx693 compare 12.000 12 -> 0
|
||||
comx694 compare 12.0000 12 -> 0
|
||||
comx695 compare 12.00000 12 -> 0
|
||||
comx696 compare 12.000000 12 -> 0
|
||||
comx697 compare 12.0000000 12 -> 0
|
||||
comx698 compare 12.00000000 12 -> 0
|
||||
comx699 compare 12.000000000 12 -> 0
|
||||
|
||||
-- long operand checks
|
||||
maxexponent: 999
|
||||
minexponent: -999
|
||||
precision: 9
|
||||
comx701 compare 12345678000 1 -> 1
|
||||
comx702 compare 1 12345678000 -> -1
|
||||
comx703 compare 1234567800 1 -> 1
|
||||
comx704 compare 1 1234567800 -> -1
|
||||
comx705 compare 1234567890 1 -> 1
|
||||
comx706 compare 1 1234567890 -> -1
|
||||
comx707 compare 1234567891 1 -> 1
|
||||
comx708 compare 1 1234567891 -> -1
|
||||
comx709 compare 12345678901 1 -> 1
|
||||
comx710 compare 1 12345678901 -> -1
|
||||
comx711 compare 1234567896 1 -> 1
|
||||
comx712 compare 1 1234567896 -> -1
|
||||
comx713 compare -1234567891 1 -> -1
|
||||
comx714 compare 1 -1234567891 -> 1
|
||||
comx715 compare -12345678901 1 -> -1
|
||||
comx716 compare 1 -12345678901 -> 1
|
||||
comx717 compare -1234567896 1 -> -1
|
||||
comx718 compare 1 -1234567896 -> 1
|
||||
|
||||
precision: 15
|
||||
-- same with plenty of precision
|
||||
comx721 compare 12345678000 1 -> 1
|
||||
comx722 compare 1 12345678000 -> -1
|
||||
comx723 compare 1234567800 1 -> 1
|
||||
comx724 compare 1 1234567800 -> -1
|
||||
comx725 compare 1234567890 1 -> 1
|
||||
comx726 compare 1 1234567890 -> -1
|
||||
comx727 compare 1234567891 1 -> 1
|
||||
comx728 compare 1 1234567891 -> -1
|
||||
comx729 compare 12345678901 1 -> 1
|
||||
comx730 compare 1 12345678901 -> -1
|
||||
comx731 compare 1234567896 1 -> 1
|
||||
comx732 compare 1 1234567896 -> -1
|
||||
|
||||
-- residue cases
|
||||
precision: 5
|
||||
comx740 compare 1 0.9999999 -> 1
|
||||
comx741 compare 1 0.999999 -> 1
|
||||
comx742 compare 1 0.99999 -> 1
|
||||
comx743 compare 1 1.0000 -> 0
|
||||
comx744 compare 1 1.00001 -> -1
|
||||
comx745 compare 1 1.000001 -> -1
|
||||
comx746 compare 1 1.0000001 -> -1
|
||||
comx750 compare 0.9999999 1 -> -1
|
||||
comx751 compare 0.999999 1 -> -1
|
||||
comx752 compare 0.99999 1 -> -1
|
||||
comx753 compare 1.0000 1 -> 0
|
||||
comx754 compare 1.00001 1 -> 1
|
||||
comx755 compare 1.000001 1 -> 1
|
||||
comx756 compare 1.0000001 1 -> 1
|
||||
|
||||
-- a selection of longies
|
||||
comx760 compare -36852134.84194296250843579428931 -5830629.8347085025808756560357940 -> -1
|
||||
comx761 compare -36852134.84194296250843579428931 -36852134.84194296250843579428931 -> 0
|
||||
comx762 compare -36852134.94194296250843579428931 -36852134.84194296250843579428931 -> -1
|
||||
comx763 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
|
||||
-- precisions above or below the difference should have no effect
|
||||
precision: 11
|
||||
comx764 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
|
||||
precision: 10
|
||||
comx765 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
|
||||
precision: 9
|
||||
comx766 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
|
||||
precision: 8
|
||||
comx767 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
|
||||
precision: 7
|
||||
comx768 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
|
||||
precision: 6
|
||||
comx769 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
|
||||
precision: 5
|
||||
comx770 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
|
||||
precision: 4
|
||||
comx771 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
|
||||
precision: 3
|
||||
comx772 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
|
||||
precision: 2
|
||||
comx773 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
|
||||
precision: 1
|
||||
comx774 compare -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
|
||||
|
||||
-- Specials
|
||||
precision: 9
|
||||
comx780 compare Inf -Inf -> 1
|
||||
comx781 compare Inf -1000 -> 1
|
||||
comx782 compare Inf -1 -> 1
|
||||
comx783 compare Inf -0 -> 1
|
||||
comx784 compare Inf 0 -> 1
|
||||
comx785 compare Inf 1 -> 1
|
||||
comx786 compare Inf 1000 -> 1
|
||||
comx787 compare Inf Inf -> 0
|
||||
comx788 compare -1000 Inf -> -1
|
||||
comx789 compare -Inf Inf -> -1
|
||||
comx790 compare -1 Inf -> -1
|
||||
comx791 compare -0 Inf -> -1
|
||||
comx792 compare 0 Inf -> -1
|
||||
comx793 compare 1 Inf -> -1
|
||||
comx794 compare 1000 Inf -> -1
|
||||
comx795 compare Inf Inf -> 0
|
||||
|
||||
comx800 compare -Inf -Inf -> 0
|
||||
comx801 compare -Inf -1000 -> -1
|
||||
comx802 compare -Inf -1 -> -1
|
||||
comx803 compare -Inf -0 -> -1
|
||||
comx804 compare -Inf 0 -> -1
|
||||
comx805 compare -Inf 1 -> -1
|
||||
comx806 compare -Inf 1000 -> -1
|
||||
comx807 compare -Inf Inf -> -1
|
||||
comx808 compare -Inf -Inf -> 0
|
||||
comx809 compare -1000 -Inf -> 1
|
||||
comx810 compare -1 -Inf -> 1
|
||||
comx811 compare -0 -Inf -> 1
|
||||
comx812 compare 0 -Inf -> 1
|
||||
comx813 compare 1 -Inf -> 1
|
||||
comx814 compare 1000 -Inf -> 1
|
||||
comx815 compare Inf -Inf -> 1
|
||||
|
||||
comx821 compare NaN -Inf -> NaN
|
||||
comx822 compare NaN -1000 -> NaN
|
||||
comx823 compare NaN -1 -> NaN
|
||||
comx824 compare NaN -0 -> NaN
|
||||
comx825 compare NaN 0 -> NaN
|
||||
comx826 compare NaN 1 -> NaN
|
||||
comx827 compare NaN 1000 -> NaN
|
||||
comx828 compare NaN Inf -> NaN
|
||||
comx829 compare NaN NaN -> NaN
|
||||
comx830 compare -Inf NaN -> NaN
|
||||
comx831 compare -1000 NaN -> NaN
|
||||
comx832 compare -1 NaN -> NaN
|
||||
comx833 compare -0 NaN -> NaN
|
||||
comx834 compare 0 NaN -> NaN
|
||||
comx835 compare 1 NaN -> NaN
|
||||
comx836 compare 1000 NaN -> NaN
|
||||
comx837 compare Inf NaN -> NaN
|
||||
comx838 compare -NaN -NaN -> -NaN
|
||||
comx839 compare +NaN -NaN -> NaN
|
||||
comx840 compare -NaN +NaN -> -NaN
|
||||
|
||||
comx841 compare sNaN -Inf -> NaN Invalid_operation
|
||||
comx842 compare sNaN -1000 -> NaN Invalid_operation
|
||||
comx843 compare sNaN -1 -> NaN Invalid_operation
|
||||
comx844 compare sNaN -0 -> NaN Invalid_operation
|
||||
comx845 compare sNaN 0 -> NaN Invalid_operation
|
||||
comx846 compare sNaN 1 -> NaN Invalid_operation
|
||||
comx847 compare sNaN 1000 -> NaN Invalid_operation
|
||||
comx848 compare sNaN NaN -> NaN Invalid_operation
|
||||
comx849 compare sNaN sNaN -> NaN Invalid_operation
|
||||
comx850 compare NaN sNaN -> NaN Invalid_operation
|
||||
comx851 compare -Inf sNaN -> NaN Invalid_operation
|
||||
comx852 compare -1000 sNaN -> NaN Invalid_operation
|
||||
comx853 compare -1 sNaN -> NaN Invalid_operation
|
||||
comx854 compare -0 sNaN -> NaN Invalid_operation
|
||||
comx855 compare 0 sNaN -> NaN Invalid_operation
|
||||
comx856 compare 1 sNaN -> NaN Invalid_operation
|
||||
comx857 compare 1000 sNaN -> NaN Invalid_operation
|
||||
comx858 compare Inf sNaN -> NaN Invalid_operation
|
||||
comx859 compare NaN sNaN -> NaN Invalid_operation
|
||||
|
||||
-- propagating NaNs
|
||||
comx860 compare NaN9 -Inf -> NaN9
|
||||
comx861 compare NaN8 999 -> NaN8
|
||||
comx862 compare NaN77 Inf -> NaN77
|
||||
comx863 compare -NaN67 NaN5 -> -NaN67
|
||||
comx864 compare -Inf -NaN4 -> -NaN4
|
||||
comx865 compare -999 -NaN33 -> -NaN33
|
||||
comx866 compare Inf NaN2 -> NaN2
|
||||
comx867 compare -NaN41 -NaN42 -> -NaN41
|
||||
comx868 compare +NaN41 -NaN42 -> NaN41
|
||||
comx869 compare -NaN41 +NaN42 -> -NaN41
|
||||
comx870 compare +NaN41 +NaN42 -> NaN41
|
||||
|
||||
comx871 compare -sNaN99 -Inf -> -NaN99 Invalid_operation
|
||||
comx872 compare sNaN98 -11 -> NaN98 Invalid_operation
|
||||
comx873 compare sNaN97 NaN -> NaN97 Invalid_operation
|
||||
comx874 compare sNaN16 sNaN94 -> NaN16 Invalid_operation
|
||||
comx875 compare NaN85 sNaN83 -> NaN83 Invalid_operation
|
||||
comx876 compare -Inf sNaN92 -> NaN92 Invalid_operation
|
||||
comx877 compare 088 sNaN81 -> NaN81 Invalid_operation
|
||||
comx878 compare Inf sNaN90 -> NaN90 Invalid_operation
|
||||
comx879 compare NaN -sNaN89 -> -NaN89 Invalid_operation
|
||||
|
||||
-- overflow and underflow tests .. subnormal results now allowed
|
||||
maxExponent: 999999999
|
||||
minexponent: -999999999
|
||||
comx880 compare +1.23456789012345E-0 9E+999999999 -> -1
|
||||
comx881 compare 9E+999999999 +1.23456789012345E-0 -> 1
|
||||
comx882 compare +0.100 9E-999999999 -> 1
|
||||
comx883 compare 9E-999999999 +0.100 -> -1
|
||||
comx885 compare -1.23456789012345E-0 9E+999999999 -> -1
|
||||
comx886 compare 9E+999999999 -1.23456789012345E-0 -> 1
|
||||
comx887 compare -0.100 9E-999999999 -> -1
|
||||
comx888 compare 9E-999999999 -0.100 -> 1
|
||||
|
||||
comx889 compare 1e-599999999 1e-400000001 -> -1
|
||||
comx890 compare 1e-599999999 1e-400000000 -> -1
|
||||
comx891 compare 1e-600000000 1e-400000000 -> -1
|
||||
comx892 compare 9e-999999998 0.01 -> -1
|
||||
comx893 compare 9e-999999998 0.1 -> -1
|
||||
comx894 compare 0.01 9e-999999998 -> 1
|
||||
comx895 compare 1e599999999 1e400000001 -> 1
|
||||
comx896 compare 1e599999999 1e400000000 -> 1
|
||||
comx897 compare 1e600000000 1e400000000 -> 1
|
||||
comx898 compare 9e999999998 100 -> 1
|
||||
comx899 compare 9e999999998 10 -> 1
|
||||
comx900 compare 100 9e999999998 -> -1
|
||||
-- signs
|
||||
comx901 compare 1e+777777777 1e+411111111 -> 1
|
||||
comx902 compare 1e+777777777 -1e+411111111 -> 1
|
||||
comx903 compare -1e+777777777 1e+411111111 -> -1
|
||||
comx904 compare -1e+777777777 -1e+411111111 -> -1
|
||||
comx905 compare 1e-777777777 1e-411111111 -> -1
|
||||
comx906 compare 1e-777777777 -1e-411111111 -> 1
|
||||
comx907 compare -1e-777777777 1e-411111111 -> -1
|
||||
comx908 compare -1e-777777777 -1e-411111111 -> 1
|
||||
|
||||
-- spread zeros
|
||||
comx910 compare 0E-383 0 -> 0
|
||||
comx911 compare 0E-383 -0 -> 0
|
||||
comx912 compare -0E-383 0 -> 0
|
||||
comx913 compare -0E-383 -0 -> 0
|
||||
comx914 compare 0E-383 0E+384 -> 0
|
||||
comx915 compare 0E-383 -0E+384 -> 0
|
||||
comx916 compare -0E-383 0E+384 -> 0
|
||||
comx917 compare -0E-383 -0E+384 -> 0
|
||||
comx918 compare 0 0E+384 -> 0
|
||||
comx919 compare 0 -0E+384 -> 0
|
||||
comx920 compare -0 0E+384 -> 0
|
||||
comx921 compare -0 -0E+384 -> 0
|
||||
comx930 compare 0E+384 0 -> 0
|
||||
comx931 compare 0E+384 -0 -> 0
|
||||
comx932 compare -0E+384 0 -> 0
|
||||
comx933 compare -0E+384 -0 -> 0
|
||||
comx934 compare 0E+384 0E-383 -> 0
|
||||
comx935 compare 0E+384 -0E-383 -> 0
|
||||
comx936 compare -0E+384 0E-383 -> 0
|
||||
comx937 compare -0E+384 -0E-383 -> 0
|
||||
comx938 compare 0 0E-383 -> 0
|
||||
comx939 compare 0 -0E-383 -> 0
|
||||
comx940 compare -0 0E-383 -> 0
|
||||
comx941 compare -0 -0E-383 -> 0
|
||||
|
||||
-- Null tests
|
||||
comx990 compare 10 # -> NaN Invalid_operation
|
||||
comx991 compare # 10 -> NaN Invalid_operation
|
@@ -0,0 +1,798 @@
|
||||
------------------------------------------------------------------------
|
||||
-- comparetotal.decTest -- decimal comparison using total ordering --
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
-- Note that we cannot assume add/subtract tests cover paths adequately,
|
||||
-- here, because the code might be quite different (comparison cannot
|
||||
-- overflow or underflow, so actual subtractions are not necessary).
|
||||
-- Similarly, comparetotal will have some radically different paths
|
||||
-- than compare.
|
||||
|
||||
extended: 1
|
||||
precision: 16
|
||||
rounding: half_up
|
||||
maxExponent: 384
|
||||
minExponent: -383
|
||||
|
||||
-- sanity checks
|
||||
cotx001 comparetotal -2 -2 -> 0
|
||||
cotx002 comparetotal -2 -1 -> -1
|
||||
cotx003 comparetotal -2 0 -> -1
|
||||
cotx004 comparetotal -2 1 -> -1
|
||||
cotx005 comparetotal -2 2 -> -1
|
||||
cotx006 comparetotal -1 -2 -> 1
|
||||
cotx007 comparetotal -1 -1 -> 0
|
||||
cotx008 comparetotal -1 0 -> -1
|
||||
cotx009 comparetotal -1 1 -> -1
|
||||
cotx010 comparetotal -1 2 -> -1
|
||||
cotx011 comparetotal 0 -2 -> 1
|
||||
cotx012 comparetotal 0 -1 -> 1
|
||||
cotx013 comparetotal 0 0 -> 0
|
||||
cotx014 comparetotal 0 1 -> -1
|
||||
cotx015 comparetotal 0 2 -> -1
|
||||
cotx016 comparetotal 1 -2 -> 1
|
||||
cotx017 comparetotal 1 -1 -> 1
|
||||
cotx018 comparetotal 1 0 -> 1
|
||||
cotx019 comparetotal 1 1 -> 0
|
||||
cotx020 comparetotal 1 2 -> -1
|
||||
cotx021 comparetotal 2 -2 -> 1
|
||||
cotx022 comparetotal 2 -1 -> 1
|
||||
cotx023 comparetotal 2 0 -> 1
|
||||
cotx025 comparetotal 2 1 -> 1
|
||||
cotx026 comparetotal 2 2 -> 0
|
||||
|
||||
cotx031 comparetotal -20 -20 -> 0
|
||||
cotx032 comparetotal -20 -10 -> -1
|
||||
cotx033 comparetotal -20 00 -> -1
|
||||
cotx034 comparetotal -20 10 -> -1
|
||||
cotx035 comparetotal -20 20 -> -1
|
||||
cotx036 comparetotal -10 -20 -> 1
|
||||
cotx037 comparetotal -10 -10 -> 0
|
||||
cotx038 comparetotal -10 00 -> -1
|
||||
cotx039 comparetotal -10 10 -> -1
|
||||
cotx040 comparetotal -10 20 -> -1
|
||||
cotx041 comparetotal 00 -20 -> 1
|
||||
cotx042 comparetotal 00 -10 -> 1
|
||||
cotx043 comparetotal 00 00 -> 0
|
||||
cotx044 comparetotal 00 10 -> -1
|
||||
cotx045 comparetotal 00 20 -> -1
|
||||
cotx046 comparetotal 10 -20 -> 1
|
||||
cotx047 comparetotal 10 -10 -> 1
|
||||
cotx048 comparetotal 10 00 -> 1
|
||||
cotx049 comparetotal 10 10 -> 0
|
||||
cotx050 comparetotal 10 20 -> -1
|
||||
cotx051 comparetotal 20 -20 -> 1
|
||||
cotx052 comparetotal 20 -10 -> 1
|
||||
cotx053 comparetotal 20 00 -> 1
|
||||
cotx055 comparetotal 20 10 -> 1
|
||||
cotx056 comparetotal 20 20 -> 0
|
||||
|
||||
cotx061 comparetotal -2.0 -2.0 -> 0
|
||||
cotx062 comparetotal -2.0 -1.0 -> -1
|
||||
cotx063 comparetotal -2.0 0.0 -> -1
|
||||
cotx064 comparetotal -2.0 1.0 -> -1
|
||||
cotx065 comparetotal -2.0 2.0 -> -1
|
||||
cotx066 comparetotal -1.0 -2.0 -> 1
|
||||
cotx067 comparetotal -1.0 -1.0 -> 0
|
||||
cotx068 comparetotal -1.0 0.0 -> -1
|
||||
cotx069 comparetotal -1.0 1.0 -> -1
|
||||
cotx070 comparetotal -1.0 2.0 -> -1
|
||||
cotx071 comparetotal 0.0 -2.0 -> 1
|
||||
cotx072 comparetotal 0.0 -1.0 -> 1
|
||||
cotx073 comparetotal 0.0 0.0 -> 0
|
||||
cotx074 comparetotal 0.0 1.0 -> -1
|
||||
cotx075 comparetotal 0.0 2.0 -> -1
|
||||
cotx076 comparetotal 1.0 -2.0 -> 1
|
||||
cotx077 comparetotal 1.0 -1.0 -> 1
|
||||
cotx078 comparetotal 1.0 0.0 -> 1
|
||||
cotx079 comparetotal 1.0 1.0 -> 0
|
||||
cotx080 comparetotal 1.0 2.0 -> -1
|
||||
cotx081 comparetotal 2.0 -2.0 -> 1
|
||||
cotx082 comparetotal 2.0 -1.0 -> 1
|
||||
cotx083 comparetotal 2.0 0.0 -> 1
|
||||
cotx085 comparetotal 2.0 1.0 -> 1
|
||||
cotx086 comparetotal 2.0 2.0 -> 0
|
||||
|
||||
-- now some cases which might overflow if subtract were used
|
||||
maxexponent: 999999999
|
||||
minexponent: -999999999
|
||||
cotx090 comparetotal 9.99999999E+999999999 9.99999999E+999999999 -> 0
|
||||
cotx091 comparetotal -9.99999999E+999999999 9.99999999E+999999999 -> -1
|
||||
cotx092 comparetotal 9.99999999E+999999999 -9.99999999E+999999999 -> 1
|
||||
cotx093 comparetotal -9.99999999E+999999999 -9.99999999E+999999999 -> 0
|
||||
|
||||
-- Examples
|
||||
cotx094 comparetotal 12.73 127.9 -> -1
|
||||
cotx095 comparetotal -127 12 -> -1
|
||||
cotx096 comparetotal 12.30 12.3 -> -1
|
||||
cotx097 comparetotal 12.30 12.30 -> 0
|
||||
cotx098 comparetotal 12.3 12.300 -> 1
|
||||
cotx099 comparetotal 12.3 NaN -> -1
|
||||
|
||||
-- some differing length/exponent cases
|
||||
-- in this first group, compare would compare all equal
|
||||
cotx100 comparetotal 7.0 7.0 -> 0
|
||||
cotx101 comparetotal 7.0 7 -> -1
|
||||
cotx102 comparetotal 7 7.0 -> 1
|
||||
cotx103 comparetotal 7E+0 7.0 -> 1
|
||||
cotx104 comparetotal 70E-1 7.0 -> 0
|
||||
cotx105 comparetotal 0.7E+1 7 -> 0
|
||||
cotx106 comparetotal 70E-1 7 -> -1
|
||||
cotx107 comparetotal 7.0 7E+0 -> -1
|
||||
cotx108 comparetotal 7.0 70E-1 -> 0
|
||||
cotx109 comparetotal 7 0.7E+1 -> 0
|
||||
cotx110 comparetotal 7 70E-1 -> 1
|
||||
|
||||
cotx120 comparetotal 8.0 7.0 -> 1
|
||||
cotx121 comparetotal 8.0 7 -> 1
|
||||
cotx122 comparetotal 8 7.0 -> 1
|
||||
cotx123 comparetotal 8E+0 7.0 -> 1
|
||||
cotx124 comparetotal 80E-1 7.0 -> 1
|
||||
cotx125 comparetotal 0.8E+1 7 -> 1
|
||||
cotx126 comparetotal 80E-1 7 -> 1
|
||||
cotx127 comparetotal 8.0 7E+0 -> 1
|
||||
cotx128 comparetotal 8.0 70E-1 -> 1
|
||||
cotx129 comparetotal 8 0.7E+1 -> 1
|
||||
cotx130 comparetotal 8 70E-1 -> 1
|
||||
|
||||
cotx140 comparetotal 8.0 9.0 -> -1
|
||||
cotx141 comparetotal 8.0 9 -> -1
|
||||
cotx142 comparetotal 8 9.0 -> -1
|
||||
cotx143 comparetotal 8E+0 9.0 -> -1
|
||||
cotx144 comparetotal 80E-1 9.0 -> -1
|
||||
cotx145 comparetotal 0.8E+1 9 -> -1
|
||||
cotx146 comparetotal 80E-1 9 -> -1
|
||||
cotx147 comparetotal 8.0 9E+0 -> -1
|
||||
cotx148 comparetotal 8.0 90E-1 -> -1
|
||||
cotx149 comparetotal 8 0.9E+1 -> -1
|
||||
cotx150 comparetotal 8 90E-1 -> -1
|
||||
|
||||
-- and again, with sign changes -+ ..
|
||||
cotx200 comparetotal -7.0 7.0 -> -1
|
||||
cotx201 comparetotal -7.0 7 -> -1
|
||||
cotx202 comparetotal -7 7.0 -> -1
|
||||
cotx203 comparetotal -7E+0 7.0 -> -1
|
||||
cotx204 comparetotal -70E-1 7.0 -> -1
|
||||
cotx205 comparetotal -0.7E+1 7 -> -1
|
||||
cotx206 comparetotal -70E-1 7 -> -1
|
||||
cotx207 comparetotal -7.0 7E+0 -> -1
|
||||
cotx208 comparetotal -7.0 70E-1 -> -1
|
||||
cotx209 comparetotal -7 0.7E+1 -> -1
|
||||
cotx210 comparetotal -7 70E-1 -> -1
|
||||
|
||||
cotx220 comparetotal -8.0 7.0 -> -1
|
||||
cotx221 comparetotal -8.0 7 -> -1
|
||||
cotx222 comparetotal -8 7.0 -> -1
|
||||
cotx223 comparetotal -8E+0 7.0 -> -1
|
||||
cotx224 comparetotal -80E-1 7.0 -> -1
|
||||
cotx225 comparetotal -0.8E+1 7 -> -1
|
||||
cotx226 comparetotal -80E-1 7 -> -1
|
||||
cotx227 comparetotal -8.0 7E+0 -> -1
|
||||
cotx228 comparetotal -8.0 70E-1 -> -1
|
||||
cotx229 comparetotal -8 0.7E+1 -> -1
|
||||
cotx230 comparetotal -8 70E-1 -> -1
|
||||
|
||||
cotx240 comparetotal -8.0 9.0 -> -1
|
||||
cotx241 comparetotal -8.0 9 -> -1
|
||||
cotx242 comparetotal -8 9.0 -> -1
|
||||
cotx243 comparetotal -8E+0 9.0 -> -1
|
||||
cotx244 comparetotal -80E-1 9.0 -> -1
|
||||
cotx245 comparetotal -0.8E+1 9 -> -1
|
||||
cotx246 comparetotal -80E-1 9 -> -1
|
||||
cotx247 comparetotal -8.0 9E+0 -> -1
|
||||
cotx248 comparetotal -8.0 90E-1 -> -1
|
||||
cotx249 comparetotal -8 0.9E+1 -> -1
|
||||
cotx250 comparetotal -8 90E-1 -> -1
|
||||
|
||||
-- and again, with sign changes +- ..
|
||||
cotx300 comparetotal 7.0 -7.0 -> 1
|
||||
cotx301 comparetotal 7.0 -7 -> 1
|
||||
cotx302 comparetotal 7 -7.0 -> 1
|
||||
cotx303 comparetotal 7E+0 -7.0 -> 1
|
||||
cotx304 comparetotal 70E-1 -7.0 -> 1
|
||||
cotx305 comparetotal .7E+1 -7 -> 1
|
||||
cotx306 comparetotal 70E-1 -7 -> 1
|
||||
cotx307 comparetotal 7.0 -7E+0 -> 1
|
||||
cotx308 comparetotal 7.0 -70E-1 -> 1
|
||||
cotx309 comparetotal 7 -.7E+1 -> 1
|
||||
cotx310 comparetotal 7 -70E-1 -> 1
|
||||
|
||||
cotx320 comparetotal 8.0 -7.0 -> 1
|
||||
cotx321 comparetotal 8.0 -7 -> 1
|
||||
cotx322 comparetotal 8 -7.0 -> 1
|
||||
cotx323 comparetotal 8E+0 -7.0 -> 1
|
||||
cotx324 comparetotal 80E-1 -7.0 -> 1
|
||||
cotx325 comparetotal .8E+1 -7 -> 1
|
||||
cotx326 comparetotal 80E-1 -7 -> 1
|
||||
cotx327 comparetotal 8.0 -7E+0 -> 1
|
||||
cotx328 comparetotal 8.0 -70E-1 -> 1
|
||||
cotx329 comparetotal 8 -.7E+1 -> 1
|
||||
cotx330 comparetotal 8 -70E-1 -> 1
|
||||
|
||||
cotx340 comparetotal 8.0 -9.0 -> 1
|
||||
cotx341 comparetotal 8.0 -9 -> 1
|
||||
cotx342 comparetotal 8 -9.0 -> 1
|
||||
cotx343 comparetotal 8E+0 -9.0 -> 1
|
||||
cotx344 comparetotal 80E-1 -9.0 -> 1
|
||||
cotx345 comparetotal .8E+1 -9 -> 1
|
||||
cotx346 comparetotal 80E-1 -9 -> 1
|
||||
cotx347 comparetotal 8.0 -9E+0 -> 1
|
||||
cotx348 comparetotal 8.0 -90E-1 -> 1
|
||||
cotx349 comparetotal 8 -.9E+1 -> 1
|
||||
cotx350 comparetotal 8 -90E-1 -> 1
|
||||
|
||||
-- and again, with sign changes -- ..
|
||||
cotx400 comparetotal -7.0 -7.0 -> 0
|
||||
cotx401 comparetotal -7.0 -7 -> 1
|
||||
cotx402 comparetotal -7 -7.0 -> -1
|
||||
cotx403 comparetotal -7E+0 -7.0 -> -1
|
||||
cotx404 comparetotal -70E-1 -7.0 -> 0
|
||||
cotx405 comparetotal -.7E+1 -7 -> 0
|
||||
cotx406 comparetotal -70E-1 -7 -> 1
|
||||
cotx407 comparetotal -7.0 -7E+0 -> 1
|
||||
cotx408 comparetotal -7.0 -70E-1 -> 0
|
||||
cotx409 comparetotal -7 -.7E+1 -> 0
|
||||
cotx410 comparetotal -7 -70E-1 -> -1
|
||||
|
||||
cotx420 comparetotal -8.0 -7.0 -> -1
|
||||
cotx421 comparetotal -8.0 -7 -> -1
|
||||
cotx422 comparetotal -8 -7.0 -> -1
|
||||
cotx423 comparetotal -8E+0 -7.0 -> -1
|
||||
cotx424 comparetotal -80E-1 -7.0 -> -1
|
||||
cotx425 comparetotal -.8E+1 -7 -> -1
|
||||
cotx426 comparetotal -80E-1 -7 -> -1
|
||||
cotx427 comparetotal -8.0 -7E+0 -> -1
|
||||
cotx428 comparetotal -8.0 -70E-1 -> -1
|
||||
cotx429 comparetotal -8 -.7E+1 -> -1
|
||||
cotx430 comparetotal -8 -70E-1 -> -1
|
||||
|
||||
cotx440 comparetotal -8.0 -9.0 -> 1
|
||||
cotx441 comparetotal -8.0 -9 -> 1
|
||||
cotx442 comparetotal -8 -9.0 -> 1
|
||||
cotx443 comparetotal -8E+0 -9.0 -> 1
|
||||
cotx444 comparetotal -80E-1 -9.0 -> 1
|
||||
cotx445 comparetotal -.8E+1 -9 -> 1
|
||||
cotx446 comparetotal -80E-1 -9 -> 1
|
||||
cotx447 comparetotal -8.0 -9E+0 -> 1
|
||||
cotx448 comparetotal -8.0 -90E-1 -> 1
|
||||
cotx449 comparetotal -8 -.9E+1 -> 1
|
||||
cotx450 comparetotal -8 -90E-1 -> 1
|
||||
|
||||
|
||||
-- testcases that subtract to lots of zeros at boundaries [pgr]
|
||||
precision: 40
|
||||
cotx470 comparetotal 123.4560000000000000E789 123.456E789 -> -1
|
||||
cotx471 comparetotal 123.456000000000000E-89 123.456E-89 -> -1
|
||||
cotx472 comparetotal 123.45600000000000E789 123.456E789 -> -1
|
||||
cotx473 comparetotal 123.4560000000000E-89 123.456E-89 -> -1
|
||||
cotx474 comparetotal 123.456000000000E789 123.456E789 -> -1
|
||||
cotx475 comparetotal 123.45600000000E-89 123.456E-89 -> -1
|
||||
cotx476 comparetotal 123.4560000000E789 123.456E789 -> -1
|
||||
cotx477 comparetotal 123.456000000E-89 123.456E-89 -> -1
|
||||
cotx478 comparetotal 123.45600000E789 123.456E789 -> -1
|
||||
cotx479 comparetotal 123.4560000E-89 123.456E-89 -> -1
|
||||
cotx480 comparetotal 123.456000E789 123.456E789 -> -1
|
||||
cotx481 comparetotal 123.45600E-89 123.456E-89 -> -1
|
||||
cotx482 comparetotal 123.4560E789 123.456E789 -> -1
|
||||
cotx483 comparetotal 123.456E-89 123.456E-89 -> 0
|
||||
cotx484 comparetotal 123.456E-89 123.4560000000000000E-89 -> 1
|
||||
cotx485 comparetotal 123.456E789 123.456000000000000E789 -> 1
|
||||
cotx486 comparetotal 123.456E-89 123.45600000000000E-89 -> 1
|
||||
cotx487 comparetotal 123.456E789 123.4560000000000E789 -> 1
|
||||
cotx488 comparetotal 123.456E-89 123.456000000000E-89 -> 1
|
||||
cotx489 comparetotal 123.456E789 123.45600000000E789 -> 1
|
||||
cotx490 comparetotal 123.456E-89 123.4560000000E-89 -> 1
|
||||
cotx491 comparetotal 123.456E789 123.456000000E789 -> 1
|
||||
cotx492 comparetotal 123.456E-89 123.45600000E-89 -> 1
|
||||
cotx493 comparetotal 123.456E789 123.4560000E789 -> 1
|
||||
cotx494 comparetotal 123.456E-89 123.456000E-89 -> 1
|
||||
cotx495 comparetotal 123.456E789 123.45600E789 -> 1
|
||||
cotx496 comparetotal 123.456E-89 123.4560E-89 -> 1
|
||||
cotx497 comparetotal 123.456E789 123.456E789 -> 0
|
||||
|
||||
-- wide-ranging, around precision; signs equal
|
||||
precision: 9
|
||||
cotx500 comparetotal 1 1E-15 -> 1
|
||||
cotx501 comparetotal 1 1E-14 -> 1
|
||||
cotx502 comparetotal 1 1E-13 -> 1
|
||||
cotx503 comparetotal 1 1E-12 -> 1
|
||||
cotx504 comparetotal 1 1E-11 -> 1
|
||||
cotx505 comparetotal 1 1E-10 -> 1
|
||||
cotx506 comparetotal 1 1E-9 -> 1
|
||||
cotx507 comparetotal 1 1E-8 -> 1
|
||||
cotx508 comparetotal 1 1E-7 -> 1
|
||||
cotx509 comparetotal 1 1E-6 -> 1
|
||||
cotx510 comparetotal 1 1E-5 -> 1
|
||||
cotx511 comparetotal 1 1E-4 -> 1
|
||||
cotx512 comparetotal 1 1E-3 -> 1
|
||||
cotx513 comparetotal 1 1E-2 -> 1
|
||||
cotx514 comparetotal 1 1E-1 -> 1
|
||||
cotx515 comparetotal 1 1E-0 -> 0
|
||||
cotx516 comparetotal 1 1E+1 -> -1
|
||||
cotx517 comparetotal 1 1E+2 -> -1
|
||||
cotx518 comparetotal 1 1E+3 -> -1
|
||||
cotx519 comparetotal 1 1E+4 -> -1
|
||||
cotx521 comparetotal 1 1E+5 -> -1
|
||||
cotx522 comparetotal 1 1E+6 -> -1
|
||||
cotx523 comparetotal 1 1E+7 -> -1
|
||||
cotx524 comparetotal 1 1E+8 -> -1
|
||||
cotx525 comparetotal 1 1E+9 -> -1
|
||||
cotx526 comparetotal 1 1E+10 -> -1
|
||||
cotx527 comparetotal 1 1E+11 -> -1
|
||||
cotx528 comparetotal 1 1E+12 -> -1
|
||||
cotx529 comparetotal 1 1E+13 -> -1
|
||||
cotx530 comparetotal 1 1E+14 -> -1
|
||||
cotx531 comparetotal 1 1E+15 -> -1
|
||||
-- LR swap
|
||||
cotx540 comparetotal 1E-15 1 -> -1
|
||||
cotx541 comparetotal 1E-14 1 -> -1
|
||||
cotx542 comparetotal 1E-13 1 -> -1
|
||||
cotx543 comparetotal 1E-12 1 -> -1
|
||||
cotx544 comparetotal 1E-11 1 -> -1
|
||||
cotx545 comparetotal 1E-10 1 -> -1
|
||||
cotx546 comparetotal 1E-9 1 -> -1
|
||||
cotx547 comparetotal 1E-8 1 -> -1
|
||||
cotx548 comparetotal 1E-7 1 -> -1
|
||||
cotx549 comparetotal 1E-6 1 -> -1
|
||||
cotx550 comparetotal 1E-5 1 -> -1
|
||||
cotx551 comparetotal 1E-4 1 -> -1
|
||||
cotx552 comparetotal 1E-3 1 -> -1
|
||||
cotx553 comparetotal 1E-2 1 -> -1
|
||||
cotx554 comparetotal 1E-1 1 -> -1
|
||||
cotx555 comparetotal 1E-0 1 -> 0
|
||||
cotx556 comparetotal 1E+1 1 -> 1
|
||||
cotx557 comparetotal 1E+2 1 -> 1
|
||||
cotx558 comparetotal 1E+3 1 -> 1
|
||||
cotx559 comparetotal 1E+4 1 -> 1
|
||||
cotx561 comparetotal 1E+5 1 -> 1
|
||||
cotx562 comparetotal 1E+6 1 -> 1
|
||||
cotx563 comparetotal 1E+7 1 -> 1
|
||||
cotx564 comparetotal 1E+8 1 -> 1
|
||||
cotx565 comparetotal 1E+9 1 -> 1
|
||||
cotx566 comparetotal 1E+10 1 -> 1
|
||||
cotx567 comparetotal 1E+11 1 -> 1
|
||||
cotx568 comparetotal 1E+12 1 -> 1
|
||||
cotx569 comparetotal 1E+13 1 -> 1
|
||||
cotx570 comparetotal 1E+14 1 -> 1
|
||||
cotx571 comparetotal 1E+15 1 -> 1
|
||||
-- similar with an useful coefficient, one side only
|
||||
cotx580 comparetotal 0.000000987654321 1E-15 -> 1
|
||||
cotx581 comparetotal 0.000000987654321 1E-14 -> 1
|
||||
cotx582 comparetotal 0.000000987654321 1E-13 -> 1
|
||||
cotx583 comparetotal 0.000000987654321 1E-12 -> 1
|
||||
cotx584 comparetotal 0.000000987654321 1E-11 -> 1
|
||||
cotx585 comparetotal 0.000000987654321 1E-10 -> 1
|
||||
cotx586 comparetotal 0.000000987654321 1E-9 -> 1
|
||||
cotx587 comparetotal 0.000000987654321 1E-8 -> 1
|
||||
cotx588 comparetotal 0.000000987654321 1E-7 -> 1
|
||||
cotx589 comparetotal 0.000000987654321 1E-6 -> -1
|
||||
cotx590 comparetotal 0.000000987654321 1E-5 -> -1
|
||||
cotx591 comparetotal 0.000000987654321 1E-4 -> -1
|
||||
cotx592 comparetotal 0.000000987654321 1E-3 -> -1
|
||||
cotx593 comparetotal 0.000000987654321 1E-2 -> -1
|
||||
cotx594 comparetotal 0.000000987654321 1E-1 -> -1
|
||||
cotx595 comparetotal 0.000000987654321 1E-0 -> -1
|
||||
cotx596 comparetotal 0.000000987654321 1E+1 -> -1
|
||||
cotx597 comparetotal 0.000000987654321 1E+2 -> -1
|
||||
cotx598 comparetotal 0.000000987654321 1E+3 -> -1
|
||||
cotx599 comparetotal 0.000000987654321 1E+4 -> -1
|
||||
|
||||
-- check some unit-y traps
|
||||
precision: 20
|
||||
cotx600 comparetotal 12 12.2345 -> -1
|
||||
cotx601 comparetotal 12.0 12.2345 -> -1
|
||||
cotx602 comparetotal 12.00 12.2345 -> -1
|
||||
cotx603 comparetotal 12.000 12.2345 -> -1
|
||||
cotx604 comparetotal 12.0000 12.2345 -> -1
|
||||
cotx605 comparetotal 12.00000 12.2345 -> -1
|
||||
cotx606 comparetotal 12.000000 12.2345 -> -1
|
||||
cotx607 comparetotal 12.0000000 12.2345 -> -1
|
||||
cotx608 comparetotal 12.00000000 12.2345 -> -1
|
||||
cotx609 comparetotal 12.000000000 12.2345 -> -1
|
||||
cotx610 comparetotal 12.1234 12 -> 1
|
||||
cotx611 comparetotal 12.1234 12.0 -> 1
|
||||
cotx612 comparetotal 12.1234 12.00 -> 1
|
||||
cotx613 comparetotal 12.1234 12.000 -> 1
|
||||
cotx614 comparetotal 12.1234 12.0000 -> 1
|
||||
cotx615 comparetotal 12.1234 12.00000 -> 1
|
||||
cotx616 comparetotal 12.1234 12.000000 -> 1
|
||||
cotx617 comparetotal 12.1234 12.0000000 -> 1
|
||||
cotx618 comparetotal 12.1234 12.00000000 -> 1
|
||||
cotx619 comparetotal 12.1234 12.000000000 -> 1
|
||||
cotx620 comparetotal -12 -12.2345 -> 1
|
||||
cotx621 comparetotal -12.0 -12.2345 -> 1
|
||||
cotx622 comparetotal -12.00 -12.2345 -> 1
|
||||
cotx623 comparetotal -12.000 -12.2345 -> 1
|
||||
cotx624 comparetotal -12.0000 -12.2345 -> 1
|
||||
cotx625 comparetotal -12.00000 -12.2345 -> 1
|
||||
cotx626 comparetotal -12.000000 -12.2345 -> 1
|
||||
cotx627 comparetotal -12.0000000 -12.2345 -> 1
|
||||
cotx628 comparetotal -12.00000000 -12.2345 -> 1
|
||||
cotx629 comparetotal -12.000000000 -12.2345 -> 1
|
||||
cotx630 comparetotal -12.1234 -12 -> -1
|
||||
cotx631 comparetotal -12.1234 -12.0 -> -1
|
||||
cotx632 comparetotal -12.1234 -12.00 -> -1
|
||||
cotx633 comparetotal -12.1234 -12.000 -> -1
|
||||
cotx634 comparetotal -12.1234 -12.0000 -> -1
|
||||
cotx635 comparetotal -12.1234 -12.00000 -> -1
|
||||
cotx636 comparetotal -12.1234 -12.000000 -> -1
|
||||
cotx637 comparetotal -12.1234 -12.0000000 -> -1
|
||||
cotx638 comparetotal -12.1234 -12.00000000 -> -1
|
||||
cotx639 comparetotal -12.1234 -12.000000000 -> -1
|
||||
precision: 9
|
||||
|
||||
-- extended zeros
|
||||
cotx640 comparetotal 0 0 -> 0
|
||||
cotx641 comparetotal 0 -0 -> 1
|
||||
cotx642 comparetotal 0 -0.0 -> 1
|
||||
cotx643 comparetotal 0 0.0 -> 1
|
||||
cotx644 comparetotal -0 0 -> -1
|
||||
cotx645 comparetotal -0 -0 -> 0
|
||||
cotx646 comparetotal -0 -0.0 -> -1
|
||||
cotx647 comparetotal -0 0.0 -> -1
|
||||
cotx648 comparetotal 0.0 0 -> -1
|
||||
cotx649 comparetotal 0.0 -0 -> 1
|
||||
cotx650 comparetotal 0.0 -0.0 -> 1
|
||||
cotx651 comparetotal 0.0 0.0 -> 0
|
||||
cotx652 comparetotal -0.0 0 -> -1
|
||||
cotx653 comparetotal -0.0 -0 -> 1
|
||||
cotx654 comparetotal -0.0 -0.0 -> 0
|
||||
cotx655 comparetotal -0.0 0.0 -> -1
|
||||
|
||||
cotx656 comparetotal -0E1 0.0 -> -1
|
||||
cotx657 comparetotal -0E2 0.0 -> -1
|
||||
cotx658 comparetotal 0E1 0.0 -> 1
|
||||
cotx659 comparetotal 0E2 0.0 -> 1
|
||||
cotx660 comparetotal -0E1 0 -> -1
|
||||
cotx661 comparetotal -0E2 0 -> -1
|
||||
cotx662 comparetotal 0E1 0 -> 1
|
||||
cotx663 comparetotal 0E2 0 -> 1
|
||||
cotx664 comparetotal -0E1 -0E1 -> 0
|
||||
cotx665 comparetotal -0E2 -0E1 -> -1
|
||||
cotx666 comparetotal 0E1 -0E1 -> 1
|
||||
cotx667 comparetotal 0E2 -0E1 -> 1
|
||||
cotx668 comparetotal -0E1 -0E2 -> 1
|
||||
cotx669 comparetotal -0E2 -0E2 -> 0
|
||||
cotx670 comparetotal 0E1 -0E2 -> 1
|
||||
cotx671 comparetotal 0E2 -0E2 -> 1
|
||||
cotx672 comparetotal -0E1 0E1 -> -1
|
||||
cotx673 comparetotal -0E2 0E1 -> -1
|
||||
cotx674 comparetotal 0E1 0E1 -> 0
|
||||
cotx675 comparetotal 0E2 0E1 -> 1
|
||||
cotx676 comparetotal -0E1 0E2 -> -1
|
||||
cotx677 comparetotal -0E2 0E2 -> -1
|
||||
cotx678 comparetotal 0E1 0E2 -> -1
|
||||
cotx679 comparetotal 0E2 0E2 -> 0
|
||||
|
||||
-- trailing zeros; unit-y
|
||||
precision: 20
|
||||
cotx680 comparetotal 12 12 -> 0
|
||||
cotx681 comparetotal 12 12.0 -> 1
|
||||
cotx682 comparetotal 12 12.00 -> 1
|
||||
cotx683 comparetotal 12 12.000 -> 1
|
||||
cotx684 comparetotal 12 12.0000 -> 1
|
||||
cotx685 comparetotal 12 12.00000 -> 1
|
||||
cotx686 comparetotal 12 12.000000 -> 1
|
||||
cotx687 comparetotal 12 12.0000000 -> 1
|
||||
cotx688 comparetotal 12 12.00000000 -> 1
|
||||
cotx689 comparetotal 12 12.000000000 -> 1
|
||||
cotx690 comparetotal 12 12 -> 0
|
||||
cotx691 comparetotal 12.0 12 -> -1
|
||||
cotx692 comparetotal 12.00 12 -> -1
|
||||
cotx693 comparetotal 12.000 12 -> -1
|
||||
cotx694 comparetotal 12.0000 12 -> -1
|
||||
cotx695 comparetotal 12.00000 12 -> -1
|
||||
cotx696 comparetotal 12.000000 12 -> -1
|
||||
cotx697 comparetotal 12.0000000 12 -> -1
|
||||
cotx698 comparetotal 12.00000000 12 -> -1
|
||||
cotx699 comparetotal 12.000000000 12 -> -1
|
||||
|
||||
-- long operand checks
|
||||
maxexponent: 999
|
||||
minexponent: -999
|
||||
precision: 9
|
||||
cotx701 comparetotal 12345678000 1 -> 1
|
||||
cotx702 comparetotal 1 12345678000 -> -1
|
||||
cotx703 comparetotal 1234567800 1 -> 1
|
||||
cotx704 comparetotal 1 1234567800 -> -1
|
||||
cotx705 comparetotal 1234567890 1 -> 1
|
||||
cotx706 comparetotal 1 1234567890 -> -1
|
||||
cotx707 comparetotal 1234567891 1 -> 1
|
||||
cotx708 comparetotal 1 1234567891 -> -1
|
||||
cotx709 comparetotal 12345678901 1 -> 1
|
||||
cotx710 comparetotal 1 12345678901 -> -1
|
||||
cotx711 comparetotal 1234567896 1 -> 1
|
||||
cotx712 comparetotal 1 1234567896 -> -1
|
||||
cotx713 comparetotal -1234567891 1 -> -1
|
||||
cotx714 comparetotal 1 -1234567891 -> 1
|
||||
cotx715 comparetotal -12345678901 1 -> -1
|
||||
cotx716 comparetotal 1 -12345678901 -> 1
|
||||
cotx717 comparetotal -1234567896 1 -> -1
|
||||
cotx718 comparetotal 1 -1234567896 -> 1
|
||||
|
||||
precision: 15
|
||||
-- same with plenty of precision
|
||||
cotx721 comparetotal 12345678000 1 -> 1
|
||||
cotx722 comparetotal 1 12345678000 -> -1
|
||||
cotx723 comparetotal 1234567800 1 -> 1
|
||||
cotx724 comparetotal 1 1234567800 -> -1
|
||||
cotx725 comparetotal 1234567890 1 -> 1
|
||||
cotx726 comparetotal 1 1234567890 -> -1
|
||||
cotx727 comparetotal 1234567891 1 -> 1
|
||||
cotx728 comparetotal 1 1234567891 -> -1
|
||||
cotx729 comparetotal 12345678901 1 -> 1
|
||||
cotx730 comparetotal 1 12345678901 -> -1
|
||||
cotx731 comparetotal 1234567896 1 -> 1
|
||||
cotx732 comparetotal 1 1234567896 -> -1
|
||||
|
||||
-- residue cases
|
||||
precision: 5
|
||||
cotx740 comparetotal 1 0.9999999 -> 1
|
||||
cotx741 comparetotal 1 0.999999 -> 1
|
||||
cotx742 comparetotal 1 0.99999 -> 1
|
||||
cotx743 comparetotal 1 1.0000 -> 1
|
||||
cotx744 comparetotal 1 1.00001 -> -1
|
||||
cotx745 comparetotal 1 1.000001 -> -1
|
||||
cotx746 comparetotal 1 1.0000001 -> -1
|
||||
cotx750 comparetotal 0.9999999 1 -> -1
|
||||
cotx751 comparetotal 0.999999 1 -> -1
|
||||
cotx752 comparetotal 0.99999 1 -> -1
|
||||
cotx753 comparetotal 1.0000 1 -> -1
|
||||
cotx754 comparetotal 1.00001 1 -> 1
|
||||
cotx755 comparetotal 1.000001 1 -> 1
|
||||
cotx756 comparetotal 1.0000001 1 -> 1
|
||||
|
||||
-- a selection of longies
|
||||
cotx760 comparetotal -36852134.84194296250843579428931 -5830629.8347085025808756560357940 -> -1
|
||||
cotx761 comparetotal -36852134.84194296250843579428931 -36852134.84194296250843579428931 -> 0
|
||||
cotx762 comparetotal -36852134.94194296250843579428931 -36852134.84194296250843579428931 -> -1
|
||||
cotx763 comparetotal -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
|
||||
-- precisions above or below the difference should have no effect
|
||||
precision: 11
|
||||
cotx764 comparetotal -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
|
||||
precision: 10
|
||||
cotx765 comparetotal -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
|
||||
precision: 9
|
||||
cotx766 comparetotal -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
|
||||
precision: 8
|
||||
cotx767 comparetotal -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
|
||||
precision: 7
|
||||
cotx768 comparetotal -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
|
||||
precision: 6
|
||||
cotx769 comparetotal -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
|
||||
precision: 5
|
||||
cotx770 comparetotal -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
|
||||
precision: 4
|
||||
cotx771 comparetotal -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
|
||||
precision: 3
|
||||
cotx772 comparetotal -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
|
||||
precision: 2
|
||||
cotx773 comparetotal -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
|
||||
precision: 1
|
||||
cotx774 comparetotal -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> 1
|
||||
|
||||
-- Specials
|
||||
precision: 9
|
||||
cotx780 comparetotal Inf -Inf -> 1
|
||||
cotx781 comparetotal Inf -1000 -> 1
|
||||
cotx782 comparetotal Inf -1 -> 1
|
||||
cotx783 comparetotal Inf -0 -> 1
|
||||
cotx784 comparetotal Inf 0 -> 1
|
||||
cotx785 comparetotal Inf 1 -> 1
|
||||
cotx786 comparetotal Inf 1000 -> 1
|
||||
cotx787 comparetotal Inf Inf -> 0
|
||||
cotx788 comparetotal -1000 Inf -> -1
|
||||
cotx789 comparetotal -Inf Inf -> -1
|
||||
cotx790 comparetotal -1 Inf -> -1
|
||||
cotx791 comparetotal -0 Inf -> -1
|
||||
cotx792 comparetotal 0 Inf -> -1
|
||||
cotx793 comparetotal 1 Inf -> -1
|
||||
cotx794 comparetotal 1000 Inf -> -1
|
||||
cotx795 comparetotal Inf Inf -> 0
|
||||
|
||||
cotx800 comparetotal -Inf -Inf -> 0
|
||||
cotx801 comparetotal -Inf -1000 -> -1
|
||||
cotx802 comparetotal -Inf -1 -> -1
|
||||
cotx803 comparetotal -Inf -0 -> -1
|
||||
cotx804 comparetotal -Inf 0 -> -1
|
||||
cotx805 comparetotal -Inf 1 -> -1
|
||||
cotx806 comparetotal -Inf 1000 -> -1
|
||||
cotx807 comparetotal -Inf Inf -> -1
|
||||
cotx808 comparetotal -Inf -Inf -> 0
|
||||
cotx809 comparetotal -1000 -Inf -> 1
|
||||
cotx810 comparetotal -1 -Inf -> 1
|
||||
cotx811 comparetotal -0 -Inf -> 1
|
||||
cotx812 comparetotal 0 -Inf -> 1
|
||||
cotx813 comparetotal 1 -Inf -> 1
|
||||
cotx814 comparetotal 1000 -Inf -> 1
|
||||
cotx815 comparetotal Inf -Inf -> 1
|
||||
|
||||
cotx821 comparetotal NaN -Inf -> 1
|
||||
cotx822 comparetotal NaN -1000 -> 1
|
||||
cotx823 comparetotal NaN -1 -> 1
|
||||
cotx824 comparetotal NaN -0 -> 1
|
||||
cotx825 comparetotal NaN 0 -> 1
|
||||
cotx826 comparetotal NaN 1 -> 1
|
||||
cotx827 comparetotal NaN 1000 -> 1
|
||||
cotx828 comparetotal NaN Inf -> 1
|
||||
cotx829 comparetotal NaN NaN -> 0
|
||||
cotx830 comparetotal -Inf NaN -> -1
|
||||
cotx831 comparetotal -1000 NaN -> -1
|
||||
cotx832 comparetotal -1 NaN -> -1
|
||||
cotx833 comparetotal -0 NaN -> -1
|
||||
cotx834 comparetotal 0 NaN -> -1
|
||||
cotx835 comparetotal 1 NaN -> -1
|
||||
cotx836 comparetotal 1000 NaN -> -1
|
||||
cotx837 comparetotal Inf NaN -> -1
|
||||
cotx838 comparetotal -NaN -NaN -> 0
|
||||
cotx839 comparetotal +NaN -NaN -> 1
|
||||
cotx840 comparetotal -NaN +NaN -> -1
|
||||
|
||||
cotx841 comparetotal sNaN -sNaN -> 1
|
||||
cotx842 comparetotal sNaN -NaN -> 1
|
||||
cotx843 comparetotal sNaN -Inf -> 1
|
||||
cotx844 comparetotal sNaN -1000 -> 1
|
||||
cotx845 comparetotal sNaN -1 -> 1
|
||||
cotx846 comparetotal sNaN -0 -> 1
|
||||
cotx847 comparetotal sNaN 0 -> 1
|
||||
cotx848 comparetotal sNaN 1 -> 1
|
||||
cotx849 comparetotal sNaN 1000 -> 1
|
||||
cotx850 comparetotal sNaN NaN -> -1
|
||||
cotx851 comparetotal sNaN sNaN -> 0
|
||||
|
||||
cotx852 comparetotal -sNaN sNaN -> -1
|
||||
cotx853 comparetotal -NaN sNaN -> -1
|
||||
cotx854 comparetotal -Inf sNaN -> -1
|
||||
cotx855 comparetotal -1000 sNaN -> -1
|
||||
cotx856 comparetotal -1 sNaN -> -1
|
||||
cotx857 comparetotal -0 sNaN -> -1
|
||||
cotx858 comparetotal 0 sNaN -> -1
|
||||
cotx859 comparetotal 1 sNaN -> -1
|
||||
cotx860 comparetotal 1000 sNaN -> -1
|
||||
cotx861 comparetotal Inf sNaN -> -1
|
||||
cotx862 comparetotal NaN sNaN -> 1
|
||||
cotx863 comparetotal sNaN sNaN -> 0
|
||||
|
||||
cotx871 comparetotal -sNaN -sNaN -> 0
|
||||
cotx872 comparetotal -sNaN -NaN -> 1
|
||||
cotx873 comparetotal -sNaN -Inf -> -1
|
||||
cotx874 comparetotal -sNaN -1000 -> -1
|
||||
cotx875 comparetotal -sNaN -1 -> -1
|
||||
cotx876 comparetotal -sNaN -0 -> -1
|
||||
cotx877 comparetotal -sNaN 0 -> -1
|
||||
cotx878 comparetotal -sNaN 1 -> -1
|
||||
cotx879 comparetotal -sNaN 1000 -> -1
|
||||
cotx880 comparetotal -sNaN NaN -> -1
|
||||
cotx881 comparetotal -sNaN sNaN -> -1
|
||||
|
||||
cotx882 comparetotal -sNaN -sNaN -> 0
|
||||
cotx883 comparetotal -NaN -sNaN -> -1
|
||||
cotx884 comparetotal -Inf -sNaN -> 1
|
||||
cotx885 comparetotal -1000 -sNaN -> 1
|
||||
cotx886 comparetotal -1 -sNaN -> 1
|
||||
cotx887 comparetotal -0 -sNaN -> 1
|
||||
cotx888 comparetotal 0 -sNaN -> 1
|
||||
cotx889 comparetotal 1 -sNaN -> 1
|
||||
cotx890 comparetotal 1000 -sNaN -> 1
|
||||
cotx891 comparetotal Inf -sNaN -> 1
|
||||
cotx892 comparetotal NaN -sNaN -> 1
|
||||
cotx893 comparetotal sNaN -sNaN -> 1
|
||||
|
||||
-- NaNs with payload
|
||||
cotx960 comparetotal NaN9 -Inf -> 1
|
||||
cotx961 comparetotal NaN8 999 -> 1
|
||||
cotx962 comparetotal NaN77 Inf -> 1
|
||||
cotx963 comparetotal -NaN67 NaN5 -> -1
|
||||
cotx964 comparetotal -Inf -NaN4 -> 1
|
||||
cotx965 comparetotal -999 -NaN33 -> 1
|
||||
cotx966 comparetotal Inf NaN2 -> -1
|
||||
|
||||
cotx970 comparetotal -NaN41 -NaN42 -> 1
|
||||
cotx971 comparetotal +NaN41 -NaN42 -> 1
|
||||
cotx972 comparetotal -NaN41 +NaN42 -> -1
|
||||
cotx973 comparetotal +NaN41 +NaN42 -> -1
|
||||
cotx974 comparetotal -NaN42 -NaN01 -> -1
|
||||
cotx975 comparetotal +NaN42 -NaN01 -> 1
|
||||
cotx976 comparetotal -NaN42 +NaN01 -> -1
|
||||
cotx977 comparetotal +NaN42 +NaN01 -> 1
|
||||
|
||||
cotx980 comparetotal -sNaN771 -sNaN772 -> 1
|
||||
cotx981 comparetotal +sNaN771 -sNaN772 -> 1
|
||||
cotx982 comparetotal -sNaN771 +sNaN772 -> -1
|
||||
cotx983 comparetotal +sNaN771 +sNaN772 -> -1
|
||||
cotx984 comparetotal -sNaN772 -sNaN771 -> -1
|
||||
cotx985 comparetotal +sNaN772 -sNaN771 -> 1
|
||||
cotx986 comparetotal -sNaN772 +sNaN771 -> -1
|
||||
cotx987 comparetotal +sNaN772 +sNaN771 -> 1
|
||||
|
||||
cotx991 comparetotal -sNaN99 -Inf -> -1
|
||||
cotx992 comparetotal sNaN98 -11 -> 1
|
||||
cotx993 comparetotal sNaN97 NaN -> -1
|
||||
cotx994 comparetotal sNaN16 sNaN94 -> -1
|
||||
cotx995 comparetotal NaN85 sNaN83 -> 1
|
||||
cotx996 comparetotal -Inf sNaN92 -> -1
|
||||
cotx997 comparetotal 088 sNaN81 -> -1
|
||||
cotx998 comparetotal Inf sNaN90 -> -1
|
||||
cotx999 comparetotal NaN -sNaN89 -> 1
|
||||
|
||||
-- overflow and underflow tests .. subnormal results now allowed
|
||||
maxExponent: 999999999
|
||||
minexponent: -999999999
|
||||
cotx1080 comparetotal +1.23456789012345E-0 9E+999999999 -> -1
|
||||
cotx1081 comparetotal 9E+999999999 +1.23456789012345E-0 -> 1
|
||||
cotx1082 comparetotal +0.100 9E-999999999 -> 1
|
||||
cotx1083 comparetotal 9E-999999999 +0.100 -> -1
|
||||
cotx1085 comparetotal -1.23456789012345E-0 9E+999999999 -> -1
|
||||
cotx1086 comparetotal 9E+999999999 -1.23456789012345E-0 -> 1
|
||||
cotx1087 comparetotal -0.100 9E-999999999 -> -1
|
||||
cotx1088 comparetotal 9E-999999999 -0.100 -> 1
|
||||
|
||||
cotx1089 comparetotal 1e-599999999 1e-400000001 -> -1
|
||||
cotx1090 comparetotal 1e-599999999 1e-400000000 -> -1
|
||||
cotx1091 comparetotal 1e-600000000 1e-400000000 -> -1
|
||||
cotx1092 comparetotal 9e-999999998 0.01 -> -1
|
||||
cotx1093 comparetotal 9e-999999998 0.1 -> -1
|
||||
cotx1094 comparetotal 0.01 9e-999999998 -> 1
|
||||
cotx1095 comparetotal 1e599999999 1e400000001 -> 1
|
||||
cotx1096 comparetotal 1e599999999 1e400000000 -> 1
|
||||
cotx1097 comparetotal 1e600000000 1e400000000 -> 1
|
||||
cotx1098 comparetotal 9e999999998 100 -> 1
|
||||
cotx1099 comparetotal 9e999999998 10 -> 1
|
||||
cotx1100 comparetotal 100 9e999999998 -> -1
|
||||
-- signs
|
||||
cotx1101 comparetotal 1e+777777777 1e+411111111 -> 1
|
||||
cotx1102 comparetotal 1e+777777777 -1e+411111111 -> 1
|
||||
cotx1103 comparetotal -1e+777777777 1e+411111111 -> -1
|
||||
cotx1104 comparetotal -1e+777777777 -1e+411111111 -> -1
|
||||
cotx1105 comparetotal 1e-777777777 1e-411111111 -> -1
|
||||
cotx1106 comparetotal 1e-777777777 -1e-411111111 -> 1
|
||||
cotx1107 comparetotal -1e-777777777 1e-411111111 -> -1
|
||||
cotx1108 comparetotal -1e-777777777 -1e-411111111 -> 1
|
||||
|
||||
-- spread zeros
|
||||
cotx1110 comparetotal 0E-383 0 -> -1
|
||||
cotx1111 comparetotal 0E-383 -0 -> 1
|
||||
cotx1112 comparetotal -0E-383 0 -> -1
|
||||
cotx1113 comparetotal -0E-383 -0 -> 1
|
||||
cotx1114 comparetotal 0E-383 0E+384 -> -1
|
||||
cotx1115 comparetotal 0E-383 -0E+384 -> 1
|
||||
cotx1116 comparetotal -0E-383 0E+384 -> -1
|
||||
cotx1117 comparetotal -0E-383 -0E+384 -> 1
|
||||
cotx1118 comparetotal 0 0E+384 -> -1
|
||||
cotx1119 comparetotal 0 -0E+384 -> 1
|
||||
cotx1120 comparetotal -0 0E+384 -> -1
|
||||
cotx1121 comparetotal -0 -0E+384 -> 1
|
||||
|
||||
cotx1130 comparetotal 0E+384 0 -> 1
|
||||
cotx1131 comparetotal 0E+384 -0 -> 1
|
||||
cotx1132 comparetotal -0E+384 0 -> -1
|
||||
cotx1133 comparetotal -0E+384 -0 -> -1
|
||||
cotx1134 comparetotal 0E+384 0E-383 -> 1
|
||||
cotx1135 comparetotal 0E+384 -0E-383 -> 1
|
||||
cotx1136 comparetotal -0E+384 0E-383 -> -1
|
||||
cotx1137 comparetotal -0E+384 -0E-383 -> -1
|
||||
cotx1138 comparetotal 0 0E-383 -> 1
|
||||
cotx1139 comparetotal 0 -0E-383 -> 1
|
||||
cotx1140 comparetotal -0 0E-383 -> -1
|
||||
cotx1141 comparetotal -0 -0E-383 -> -1
|
||||
|
||||
-- Null tests
|
||||
cotx9990 comparetotal 10 # -> NaN Invalid_operation
|
||||
cotx9991 comparetotal # 10 -> NaN Invalid_operation
|
@@ -0,0 +1,790 @@
|
||||
------------------------------------------------------------------------
|
||||
-- comparetotmag.decTest -- decimal comparison, abs. total ordering --
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
-- Note that it cannot be assumed that add/subtract tests cover paths
|
||||
-- for this operation adequately, here, because the code might be
|
||||
-- quite different (comparison cannot overflow or underflow, so
|
||||
-- actual subtractions are not necessary). Similarly, comparetotal
|
||||
-- will have some radically different paths than compare.
|
||||
|
||||
extended: 1
|
||||
precision: 16
|
||||
rounding: half_up
|
||||
maxExponent: 384
|
||||
minExponent: -383
|
||||
|
||||
-- sanity checks
|
||||
ctmx001 comparetotmag -2 -2 -> 0
|
||||
ctmx002 comparetotmag -2 -1 -> 1
|
||||
ctmx003 comparetotmag -2 0 -> 1
|
||||
ctmx004 comparetotmag -2 1 -> 1
|
||||
ctmx005 comparetotmag -2 2 -> 0
|
||||
ctmx006 comparetotmag -1 -2 -> -1
|
||||
ctmx007 comparetotmag -1 -1 -> 0
|
||||
ctmx008 comparetotmag -1 0 -> 1
|
||||
ctmx009 comparetotmag -1 1 -> 0
|
||||
ctmx010 comparetotmag -1 2 -> -1
|
||||
ctmx011 comparetotmag 0 -2 -> -1
|
||||
ctmx012 comparetotmag 0 -1 -> -1
|
||||
ctmx013 comparetotmag 0 0 -> 0
|
||||
ctmx014 comparetotmag 0 1 -> -1
|
||||
ctmx015 comparetotmag 0 2 -> -1
|
||||
ctmx016 comparetotmag 1 -2 -> -1
|
||||
ctmx017 comparetotmag 1 -1 -> 0
|
||||
ctmx018 comparetotmag 1 0 -> 1
|
||||
ctmx019 comparetotmag 1 1 -> 0
|
||||
ctmx020 comparetotmag 1 2 -> -1
|
||||
ctmx021 comparetotmag 2 -2 -> 0
|
||||
ctmx022 comparetotmag 2 -1 -> 1
|
||||
ctmx023 comparetotmag 2 0 -> 1
|
||||
ctmx025 comparetotmag 2 1 -> 1
|
||||
ctmx026 comparetotmag 2 2 -> 0
|
||||
|
||||
ctmx031 comparetotmag -20 -20 -> 0
|
||||
ctmx032 comparetotmag -20 -10 -> 1
|
||||
ctmx033 comparetotmag -20 00 -> 1
|
||||
ctmx034 comparetotmag -20 10 -> 1
|
||||
ctmx035 comparetotmag -20 20 -> 0
|
||||
ctmx036 comparetotmag -10 -20 -> -1
|
||||
ctmx037 comparetotmag -10 -10 -> 0
|
||||
ctmx038 comparetotmag -10 00 -> 1
|
||||
ctmx039 comparetotmag -10 10 -> 0
|
||||
ctmx040 comparetotmag -10 20 -> -1
|
||||
ctmx041 comparetotmag 00 -20 -> -1
|
||||
ctmx042 comparetotmag 00 -10 -> -1
|
||||
ctmx043 comparetotmag 00 00 -> 0
|
||||
ctmx044 comparetotmag 00 10 -> -1
|
||||
ctmx045 comparetotmag 00 20 -> -1
|
||||
ctmx046 comparetotmag 10 -20 -> -1
|
||||
ctmx047 comparetotmag 10 -10 -> 0
|
||||
ctmx048 comparetotmag 10 00 -> 1
|
||||
ctmx049 comparetotmag 10 10 -> 0
|
||||
ctmx050 comparetotmag 10 20 -> -1
|
||||
ctmx051 comparetotmag 20 -20 -> 0
|
||||
ctmx052 comparetotmag 20 -10 -> 1
|
||||
ctmx053 comparetotmag 20 00 -> 1
|
||||
ctmx055 comparetotmag 20 10 -> 1
|
||||
ctmx056 comparetotmag 20 20 -> 0
|
||||
|
||||
ctmx061 comparetotmag -2.0 -2.0 -> 0
|
||||
ctmx062 comparetotmag -2.0 -1.0 -> 1
|
||||
ctmx063 comparetotmag -2.0 0.0 -> 1
|
||||
ctmx064 comparetotmag -2.0 1.0 -> 1
|
||||
ctmx065 comparetotmag -2.0 2.0 -> 0
|
||||
ctmx066 comparetotmag -1.0 -2.0 -> -1
|
||||
ctmx067 comparetotmag -1.0 -1.0 -> 0
|
||||
ctmx068 comparetotmag -1.0 0.0 -> 1
|
||||
ctmx069 comparetotmag -1.0 1.0 -> 0
|
||||
ctmx070 comparetotmag -1.0 2.0 -> -1
|
||||
ctmx071 comparetotmag 0.0 -2.0 -> -1
|
||||
ctmx072 comparetotmag 0.0 -1.0 -> -1
|
||||
ctmx073 comparetotmag 0.0 0.0 -> 0
|
||||
ctmx074 comparetotmag 0.0 1.0 -> -1
|
||||
ctmx075 comparetotmag 0.0 2.0 -> -1
|
||||
ctmx076 comparetotmag 1.0 -2.0 -> -1
|
||||
ctmx077 comparetotmag 1.0 -1.0 -> 0
|
||||
ctmx078 comparetotmag 1.0 0.0 -> 1
|
||||
ctmx079 comparetotmag 1.0 1.0 -> 0
|
||||
ctmx080 comparetotmag 1.0 2.0 -> -1
|
||||
ctmx081 comparetotmag 2.0 -2.0 -> 0
|
||||
ctmx082 comparetotmag 2.0 -1.0 -> 1
|
||||
ctmx083 comparetotmag 2.0 0.0 -> 1
|
||||
ctmx085 comparetotmag 2.0 1.0 -> 1
|
||||
ctmx086 comparetotmag 2.0 2.0 -> 0
|
||||
|
||||
-- now some cases which might overflow if subtract were used
|
||||
maxexponent: 999999999
|
||||
minexponent: -999999999
|
||||
ctmx090 comparetotmag 9.99999999E+999999999 9.99999999E+999999999 -> 0
|
||||
ctmx091 comparetotmag -9.99999999E+999999999 9.99999999E+999999999 -> 0
|
||||
ctmx092 comparetotmag 9.99999999E+999999999 -9.99999999E+999999999 -> 0
|
||||
ctmx093 comparetotmag -9.99999999E+999999999 -9.99999999E+999999999 -> 0
|
||||
|
||||
-- some differing length/exponent cases
|
||||
-- in this first group, compare would compare all equal
|
||||
ctmx100 comparetotmag 7.0 7.0 -> 0
|
||||
ctmx101 comparetotmag 7.0 7 -> -1
|
||||
ctmx102 comparetotmag 7 7.0 -> 1
|
||||
ctmx103 comparetotmag 7E+0 7.0 -> 1
|
||||
ctmx104 comparetotmag 70E-1 7.0 -> 0
|
||||
ctmx105 comparetotmag 0.7E+1 7 -> 0
|
||||
ctmx106 comparetotmag 70E-1 7 -> -1
|
||||
ctmx107 comparetotmag 7.0 7E+0 -> -1
|
||||
ctmx108 comparetotmag 7.0 70E-1 -> 0
|
||||
ctmx109 comparetotmag 7 0.7E+1 -> 0
|
||||
ctmx110 comparetotmag 7 70E-1 -> 1
|
||||
|
||||
ctmx120 comparetotmag 8.0 7.0 -> 1
|
||||
ctmx121 comparetotmag 8.0 7 -> 1
|
||||
ctmx122 comparetotmag 8 7.0 -> 1
|
||||
ctmx123 comparetotmag 8E+0 7.0 -> 1
|
||||
ctmx124 comparetotmag 80E-1 7.0 -> 1
|
||||
ctmx125 comparetotmag 0.8E+1 7 -> 1
|
||||
ctmx126 comparetotmag 80E-1 7 -> 1
|
||||
ctmx127 comparetotmag 8.0 7E+0 -> 1
|
||||
ctmx128 comparetotmag 8.0 70E-1 -> 1
|
||||
ctmx129 comparetotmag 8 0.7E+1 -> 1
|
||||
ctmx130 comparetotmag 8 70E-1 -> 1
|
||||
|
||||
ctmx140 comparetotmag 8.0 9.0 -> -1
|
||||
ctmx141 comparetotmag 8.0 9 -> -1
|
||||
ctmx142 comparetotmag 8 9.0 -> -1
|
||||
ctmx143 comparetotmag 8E+0 9.0 -> -1
|
||||
ctmx144 comparetotmag 80E-1 9.0 -> -1
|
||||
ctmx145 comparetotmag 0.8E+1 9 -> -1
|
||||
ctmx146 comparetotmag 80E-1 9 -> -1
|
||||
ctmx147 comparetotmag 8.0 9E+0 -> -1
|
||||
ctmx148 comparetotmag 8.0 90E-1 -> -1
|
||||
ctmx149 comparetotmag 8 0.9E+1 -> -1
|
||||
ctmx150 comparetotmag 8 90E-1 -> -1
|
||||
|
||||
-- and again, with sign changes -+ ..
|
||||
ctmx200 comparetotmag -7.0 7.0 -> 0
|
||||
ctmx201 comparetotmag -7.0 7 -> -1
|
||||
ctmx202 comparetotmag -7 7.0 -> 1
|
||||
ctmx203 comparetotmag -7E+0 7.0 -> 1
|
||||
ctmx204 comparetotmag -70E-1 7.0 -> 0
|
||||
ctmx205 comparetotmag -0.7E+1 7 -> 0
|
||||
ctmx206 comparetotmag -70E-1 7 -> -1
|
||||
ctmx207 comparetotmag -7.0 7E+0 -> -1
|
||||
ctmx208 comparetotmag -7.0 70E-1 -> 0
|
||||
ctmx209 comparetotmag -7 0.7E+1 -> 0
|
||||
ctmx210 comparetotmag -7 70E-1 -> 1
|
||||
|
||||
ctmx220 comparetotmag -8.0 7.0 -> 1
|
||||
ctmx221 comparetotmag -8.0 7 -> 1
|
||||
ctmx222 comparetotmag -8 7.0 -> 1
|
||||
ctmx223 comparetotmag -8E+0 7.0 -> 1
|
||||
ctmx224 comparetotmag -80E-1 7.0 -> 1
|
||||
ctmx225 comparetotmag -0.8E+1 7 -> 1
|
||||
ctmx226 comparetotmag -80E-1 7 -> 1
|
||||
ctmx227 comparetotmag -8.0 7E+0 -> 1
|
||||
ctmx228 comparetotmag -8.0 70E-1 -> 1
|
||||
ctmx229 comparetotmag -8 0.7E+1 -> 1
|
||||
ctmx230 comparetotmag -8 70E-1 -> 1
|
||||
|
||||
ctmx240 comparetotmag -8.0 9.0 -> -1
|
||||
ctmx241 comparetotmag -8.0 9 -> -1
|
||||
ctmx242 comparetotmag -8 9.0 -> -1
|
||||
ctmx243 comparetotmag -8E+0 9.0 -> -1
|
||||
ctmx244 comparetotmag -80E-1 9.0 -> -1
|
||||
ctmx245 comparetotmag -0.8E+1 9 -> -1
|
||||
ctmx246 comparetotmag -80E-1 9 -> -1
|
||||
ctmx247 comparetotmag -8.0 9E+0 -> -1
|
||||
ctmx248 comparetotmag -8.0 90E-1 -> -1
|
||||
ctmx249 comparetotmag -8 0.9E+1 -> -1
|
||||
ctmx250 comparetotmag -8 90E-1 -> -1
|
||||
|
||||
-- and again, with sign changes +- ..
|
||||
ctmx300 comparetotmag 7.0 -7.0 -> 0
|
||||
ctmx301 comparetotmag 7.0 -7 -> -1
|
||||
ctmx302 comparetotmag 7 -7.0 -> 1
|
||||
ctmx303 comparetotmag 7E+0 -7.0 -> 1
|
||||
ctmx304 comparetotmag 70E-1 -7.0 -> 0
|
||||
ctmx305 comparetotmag .7E+1 -7 -> 0
|
||||
ctmx306 comparetotmag 70E-1 -7 -> -1
|
||||
ctmx307 comparetotmag 7.0 -7E+0 -> -1
|
||||
ctmx308 comparetotmag 7.0 -70E-1 -> 0
|
||||
ctmx309 comparetotmag 7 -.7E+1 -> 0
|
||||
ctmx310 comparetotmag 7 -70E-1 -> 1
|
||||
|
||||
ctmx320 comparetotmag 8.0 -7.0 -> 1
|
||||
ctmx321 comparetotmag 8.0 -7 -> 1
|
||||
ctmx322 comparetotmag 8 -7.0 -> 1
|
||||
ctmx323 comparetotmag 8E+0 -7.0 -> 1
|
||||
ctmx324 comparetotmag 80E-1 -7.0 -> 1
|
||||
ctmx325 comparetotmag .8E+1 -7 -> 1
|
||||
ctmx326 comparetotmag 80E-1 -7 -> 1
|
||||
ctmx327 comparetotmag 8.0 -7E+0 -> 1
|
||||
ctmx328 comparetotmag 8.0 -70E-1 -> 1
|
||||
ctmx329 comparetotmag 8 -.7E+1 -> 1
|
||||
ctmx330 comparetotmag 8 -70E-1 -> 1
|
||||
|
||||
ctmx340 comparetotmag 8.0 -9.0 -> -1
|
||||
ctmx341 comparetotmag 8.0 -9 -> -1
|
||||
ctmx342 comparetotmag 8 -9.0 -> -1
|
||||
ctmx343 comparetotmag 8E+0 -9.0 -> -1
|
||||
ctmx344 comparetotmag 80E-1 -9.0 -> -1
|
||||
ctmx345 comparetotmag .8E+1 -9 -> -1
|
||||
ctmx346 comparetotmag 80E-1 -9 -> -1
|
||||
ctmx347 comparetotmag 8.0 -9E+0 -> -1
|
||||
ctmx348 comparetotmag 8.0 -90E-1 -> -1
|
||||
ctmx349 comparetotmag 8 -.9E+1 -> -1
|
||||
ctmx350 comparetotmag 8 -90E-1 -> -1
|
||||
|
||||
-- and again, with sign changes -- ..
|
||||
ctmx400 comparetotmag -7.0 -7.0 -> 0
|
||||
ctmx401 comparetotmag -7.0 -7 -> -1
|
||||
ctmx402 comparetotmag -7 -7.0 -> 1
|
||||
ctmx403 comparetotmag -7E+0 -7.0 -> 1
|
||||
ctmx404 comparetotmag -70E-1 -7.0 -> 0
|
||||
ctmx405 comparetotmag -.7E+1 -7 -> 0
|
||||
ctmx406 comparetotmag -70E-1 -7 -> -1
|
||||
ctmx407 comparetotmag -7.0 -7E+0 -> -1
|
||||
ctmx408 comparetotmag -7.0 -70E-1 -> 0
|
||||
ctmx409 comparetotmag -7 -.7E+1 -> 0
|
||||
ctmx410 comparetotmag -7 -70E-1 -> 1
|
||||
|
||||
ctmx420 comparetotmag -8.0 -7.0 -> 1
|
||||
ctmx421 comparetotmag -8.0 -7 -> 1
|
||||
ctmx422 comparetotmag -8 -7.0 -> 1
|
||||
ctmx423 comparetotmag -8E+0 -7.0 -> 1
|
||||
ctmx424 comparetotmag -80E-1 -7.0 -> 1
|
||||
ctmx425 comparetotmag -.8E+1 -7 -> 1
|
||||
ctmx426 comparetotmag -80E-1 -7 -> 1
|
||||
ctmx427 comparetotmag -8.0 -7E+0 -> 1
|
||||
ctmx428 comparetotmag -8.0 -70E-1 -> 1
|
||||
ctmx429 comparetotmag -8 -.7E+1 -> 1
|
||||
ctmx430 comparetotmag -8 -70E-1 -> 1
|
||||
|
||||
ctmx440 comparetotmag -8.0 -9.0 -> -1
|
||||
ctmx441 comparetotmag -8.0 -9 -> -1
|
||||
ctmx442 comparetotmag -8 -9.0 -> -1
|
||||
ctmx443 comparetotmag -8E+0 -9.0 -> -1
|
||||
ctmx444 comparetotmag -80E-1 -9.0 -> -1
|
||||
ctmx445 comparetotmag -.8E+1 -9 -> -1
|
||||
ctmx446 comparetotmag -80E-1 -9 -> -1
|
||||
ctmx447 comparetotmag -8.0 -9E+0 -> -1
|
||||
ctmx448 comparetotmag -8.0 -90E-1 -> -1
|
||||
ctmx449 comparetotmag -8 -.9E+1 -> -1
|
||||
ctmx450 comparetotmag -8 -90E-1 -> -1
|
||||
|
||||
|
||||
-- testcases that subtract to lots of zeros at boundaries [pgr]
|
||||
precision: 40
|
||||
ctmx470 comparetotmag 123.4560000000000000E789 123.456E789 -> -1
|
||||
ctmx471 comparetotmag 123.456000000000000E-89 123.456E-89 -> -1
|
||||
ctmx472 comparetotmag 123.45600000000000E789 123.456E789 -> -1
|
||||
ctmx473 comparetotmag 123.4560000000000E-89 123.456E-89 -> -1
|
||||
ctmx474 comparetotmag 123.456000000000E789 123.456E789 -> -1
|
||||
ctmx475 comparetotmag 123.45600000000E-89 123.456E-89 -> -1
|
||||
ctmx476 comparetotmag 123.4560000000E789 123.456E789 -> -1
|
||||
ctmx477 comparetotmag 123.456000000E-89 123.456E-89 -> -1
|
||||
ctmx478 comparetotmag 123.45600000E789 123.456E789 -> -1
|
||||
ctmx479 comparetotmag 123.4560000E-89 123.456E-89 -> -1
|
||||
ctmx480 comparetotmag 123.456000E789 123.456E789 -> -1
|
||||
ctmx481 comparetotmag 123.45600E-89 123.456E-89 -> -1
|
||||
ctmx482 comparetotmag 123.4560E789 123.456E789 -> -1
|
||||
ctmx483 comparetotmag 123.456E-89 123.456E-89 -> 0
|
||||
ctmx484 comparetotmag 123.456E-89 123.4560000000000000E-89 -> 1
|
||||
ctmx485 comparetotmag 123.456E789 123.456000000000000E789 -> 1
|
||||
ctmx486 comparetotmag 123.456E-89 123.45600000000000E-89 -> 1
|
||||
ctmx487 comparetotmag 123.456E789 123.4560000000000E789 -> 1
|
||||
ctmx488 comparetotmag 123.456E-89 123.456000000000E-89 -> 1
|
||||
ctmx489 comparetotmag 123.456E789 123.45600000000E789 -> 1
|
||||
ctmx490 comparetotmag 123.456E-89 123.4560000000E-89 -> 1
|
||||
ctmx491 comparetotmag 123.456E789 123.456000000E789 -> 1
|
||||
ctmx492 comparetotmag 123.456E-89 123.45600000E-89 -> 1
|
||||
ctmx493 comparetotmag 123.456E789 123.4560000E789 -> 1
|
||||
ctmx494 comparetotmag 123.456E-89 123.456000E-89 -> 1
|
||||
ctmx495 comparetotmag 123.456E789 123.45600E789 -> 1
|
||||
ctmx496 comparetotmag 123.456E-89 123.4560E-89 -> 1
|
||||
ctmx497 comparetotmag 123.456E789 123.456E789 -> 0
|
||||
|
||||
-- wide-ranging, around precision; signs equal
|
||||
precision: 9
|
||||
ctmx500 comparetotmag 1 1E-15 -> 1
|
||||
ctmx501 comparetotmag 1 1E-14 -> 1
|
||||
ctmx502 comparetotmag 1 1E-13 -> 1
|
||||
ctmx503 comparetotmag 1 1E-12 -> 1
|
||||
ctmx504 comparetotmag 1 1E-11 -> 1
|
||||
ctmx505 comparetotmag 1 1E-10 -> 1
|
||||
ctmx506 comparetotmag 1 1E-9 -> 1
|
||||
ctmx507 comparetotmag 1 1E-8 -> 1
|
||||
ctmx508 comparetotmag 1 1E-7 -> 1
|
||||
ctmx509 comparetotmag 1 1E-6 -> 1
|
||||
ctmx510 comparetotmag 1 1E-5 -> 1
|
||||
ctmx511 comparetotmag 1 1E-4 -> 1
|
||||
ctmx512 comparetotmag 1 1E-3 -> 1
|
||||
ctmx513 comparetotmag 1 1E-2 -> 1
|
||||
ctmx514 comparetotmag 1 1E-1 -> 1
|
||||
ctmx515 comparetotmag 1 1E-0 -> 0
|
||||
ctmx516 comparetotmag 1 1E+1 -> -1
|
||||
ctmx517 comparetotmag 1 1E+2 -> -1
|
||||
ctmx518 comparetotmag 1 1E+3 -> -1
|
||||
ctmx519 comparetotmag 1 1E+4 -> -1
|
||||
ctmx521 comparetotmag 1 1E+5 -> -1
|
||||
ctmx522 comparetotmag 1 1E+6 -> -1
|
||||
ctmx523 comparetotmag 1 1E+7 -> -1
|
||||
ctmx524 comparetotmag 1 1E+8 -> -1
|
||||
ctmx525 comparetotmag 1 1E+9 -> -1
|
||||
ctmx526 comparetotmag 1 1E+10 -> -1
|
||||
ctmx527 comparetotmag 1 1E+11 -> -1
|
||||
ctmx528 comparetotmag 1 1E+12 -> -1
|
||||
ctmx529 comparetotmag 1 1E+13 -> -1
|
||||
ctmx530 comparetotmag 1 1E+14 -> -1
|
||||
ctmx531 comparetotmag 1 1E+15 -> -1
|
||||
-- LR swap
|
||||
ctmx540 comparetotmag 1E-15 1 -> -1
|
||||
ctmx541 comparetotmag 1E-14 1 -> -1
|
||||
ctmx542 comparetotmag 1E-13 1 -> -1
|
||||
ctmx543 comparetotmag 1E-12 1 -> -1
|
||||
ctmx544 comparetotmag 1E-11 1 -> -1
|
||||
ctmx545 comparetotmag 1E-10 1 -> -1
|
||||
ctmx546 comparetotmag 1E-9 1 -> -1
|
||||
ctmx547 comparetotmag 1E-8 1 -> -1
|
||||
ctmx548 comparetotmag 1E-7 1 -> -1
|
||||
ctmx549 comparetotmag 1E-6 1 -> -1
|
||||
ctmx550 comparetotmag 1E-5 1 -> -1
|
||||
ctmx551 comparetotmag 1E-4 1 -> -1
|
||||
ctmx552 comparetotmag 1E-3 1 -> -1
|
||||
ctmx553 comparetotmag 1E-2 1 -> -1
|
||||
ctmx554 comparetotmag 1E-1 1 -> -1
|
||||
ctmx555 comparetotmag 1E-0 1 -> 0
|
||||
ctmx556 comparetotmag 1E+1 1 -> 1
|
||||
ctmx557 comparetotmag 1E+2 1 -> 1
|
||||
ctmx558 comparetotmag 1E+3 1 -> 1
|
||||
ctmx559 comparetotmag 1E+4 1 -> 1
|
||||
ctmx561 comparetotmag 1E+5 1 -> 1
|
||||
ctmx562 comparetotmag 1E+6 1 -> 1
|
||||
ctmx563 comparetotmag 1E+7 1 -> 1
|
||||
ctmx564 comparetotmag 1E+8 1 -> 1
|
||||
ctmx565 comparetotmag 1E+9 1 -> 1
|
||||
ctmx566 comparetotmag 1E+10 1 -> 1
|
||||
ctmx567 comparetotmag 1E+11 1 -> 1
|
||||
ctmx568 comparetotmag 1E+12 1 -> 1
|
||||
ctmx569 comparetotmag 1E+13 1 -> 1
|
||||
ctmx570 comparetotmag 1E+14 1 -> 1
|
||||
ctmx571 comparetotmag 1E+15 1 -> 1
|
||||
-- similar with an useful coefficient, one side only
|
||||
ctmx580 comparetotmag 0.000000987654321 1E-15 -> 1
|
||||
ctmx581 comparetotmag 0.000000987654321 1E-14 -> 1
|
||||
ctmx582 comparetotmag 0.000000987654321 1E-13 -> 1
|
||||
ctmx583 comparetotmag 0.000000987654321 1E-12 -> 1
|
||||
ctmx584 comparetotmag 0.000000987654321 1E-11 -> 1
|
||||
ctmx585 comparetotmag 0.000000987654321 1E-10 -> 1
|
||||
ctmx586 comparetotmag 0.000000987654321 1E-9 -> 1
|
||||
ctmx587 comparetotmag 0.000000987654321 1E-8 -> 1
|
||||
ctmx588 comparetotmag 0.000000987654321 1E-7 -> 1
|
||||
ctmx589 comparetotmag 0.000000987654321 1E-6 -> -1
|
||||
ctmx590 comparetotmag 0.000000987654321 1E-5 -> -1
|
||||
ctmx591 comparetotmag 0.000000987654321 1E-4 -> -1
|
||||
ctmx592 comparetotmag 0.000000987654321 1E-3 -> -1
|
||||
ctmx593 comparetotmag 0.000000987654321 1E-2 -> -1
|
||||
ctmx594 comparetotmag 0.000000987654321 1E-1 -> -1
|
||||
ctmx595 comparetotmag 0.000000987654321 1E-0 -> -1
|
||||
ctmx596 comparetotmag 0.000000987654321 1E+1 -> -1
|
||||
ctmx597 comparetotmag 0.000000987654321 1E+2 -> -1
|
||||
ctmx598 comparetotmag 0.000000987654321 1E+3 -> -1
|
||||
ctmx599 comparetotmag 0.000000987654321 1E+4 -> -1
|
||||
|
||||
-- check some unit-y traps
|
||||
precision: 20
|
||||
ctmx600 comparetotmag 12 12.2345 -> -1
|
||||
ctmx601 comparetotmag 12.0 12.2345 -> -1
|
||||
ctmx602 comparetotmag 12.00 12.2345 -> -1
|
||||
ctmx603 comparetotmag 12.000 12.2345 -> -1
|
||||
ctmx604 comparetotmag 12.0000 12.2345 -> -1
|
||||
ctmx605 comparetotmag 12.00000 12.2345 -> -1
|
||||
ctmx606 comparetotmag 12.000000 12.2345 -> -1
|
||||
ctmx607 comparetotmag 12.0000000 12.2345 -> -1
|
||||
ctmx608 comparetotmag 12.00000000 12.2345 -> -1
|
||||
ctmx609 comparetotmag 12.000000000 12.2345 -> -1
|
||||
ctmx610 comparetotmag 12.1234 12 -> 1
|
||||
ctmx611 comparetotmag 12.1234 12.0 -> 1
|
||||
ctmx612 comparetotmag 12.1234 12.00 -> 1
|
||||
ctmx613 comparetotmag 12.1234 12.000 -> 1
|
||||
ctmx614 comparetotmag 12.1234 12.0000 -> 1
|
||||
ctmx615 comparetotmag 12.1234 12.00000 -> 1
|
||||
ctmx616 comparetotmag 12.1234 12.000000 -> 1
|
||||
ctmx617 comparetotmag 12.1234 12.0000000 -> 1
|
||||
ctmx618 comparetotmag 12.1234 12.00000000 -> 1
|
||||
ctmx619 comparetotmag 12.1234 12.000000000 -> 1
|
||||
ctmx620 comparetotmag -12 -12.2345 -> -1
|
||||
ctmx621 comparetotmag -12.0 -12.2345 -> -1
|
||||
ctmx622 comparetotmag -12.00 -12.2345 -> -1
|
||||
ctmx623 comparetotmag -12.000 -12.2345 -> -1
|
||||
ctmx624 comparetotmag -12.0000 -12.2345 -> -1
|
||||
ctmx625 comparetotmag -12.00000 -12.2345 -> -1
|
||||
ctmx626 comparetotmag -12.000000 -12.2345 -> -1
|
||||
ctmx627 comparetotmag -12.0000000 -12.2345 -> -1
|
||||
ctmx628 comparetotmag -12.00000000 -12.2345 -> -1
|
||||
ctmx629 comparetotmag -12.000000000 -12.2345 -> -1
|
||||
ctmx630 comparetotmag -12.1234 -12 -> 1
|
||||
ctmx631 comparetotmag -12.1234 -12.0 -> 1
|
||||
ctmx632 comparetotmag -12.1234 -12.00 -> 1
|
||||
ctmx633 comparetotmag -12.1234 -12.000 -> 1
|
||||
ctmx634 comparetotmag -12.1234 -12.0000 -> 1
|
||||
ctmx635 comparetotmag -12.1234 -12.00000 -> 1
|
||||
ctmx636 comparetotmag -12.1234 -12.000000 -> 1
|
||||
ctmx637 comparetotmag -12.1234 -12.0000000 -> 1
|
||||
ctmx638 comparetotmag -12.1234 -12.00000000 -> 1
|
||||
ctmx639 comparetotmag -12.1234 -12.000000000 -> 1
|
||||
precision: 9
|
||||
|
||||
-- extended zeros
|
||||
ctmx640 comparetotmag 0 0 -> 0
|
||||
ctmx641 comparetotmag 0 -0 -> 0
|
||||
ctmx642 comparetotmag 0 -0.0 -> 1
|
||||
ctmx643 comparetotmag 0 0.0 -> 1
|
||||
ctmx644 comparetotmag -0 0 -> 0
|
||||
ctmx645 comparetotmag -0 -0 -> 0
|
||||
ctmx646 comparetotmag -0 -0.0 -> 1
|
||||
ctmx647 comparetotmag -0 0.0 -> 1
|
||||
ctmx648 comparetotmag 0.0 0 -> -1
|
||||
ctmx649 comparetotmag 0.0 -0 -> -1
|
||||
ctmx650 comparetotmag 0.0 -0.0 -> 0
|
||||
ctmx651 comparetotmag 0.0 0.0 -> 0
|
||||
ctmx652 comparetotmag -0.0 0 -> -1
|
||||
ctmx653 comparetotmag -0.0 -0 -> -1
|
||||
ctmx654 comparetotmag -0.0 -0.0 -> 0
|
||||
ctmx655 comparetotmag -0.0 0.0 -> 0
|
||||
|
||||
ctmx656 comparetotmag -0E1 0.0 -> 1
|
||||
ctmx657 comparetotmag -0E2 0.0 -> 1
|
||||
ctmx658 comparetotmag 0E1 0.0 -> 1
|
||||
ctmx659 comparetotmag 0E2 0.0 -> 1
|
||||
ctmx660 comparetotmag -0E1 0 -> 1
|
||||
ctmx661 comparetotmag -0E2 0 -> 1
|
||||
ctmx662 comparetotmag 0E1 0 -> 1
|
||||
ctmx663 comparetotmag 0E2 0 -> 1
|
||||
ctmx664 comparetotmag -0E1 -0E1 -> 0
|
||||
ctmx665 comparetotmag -0E2 -0E1 -> 1
|
||||
ctmx666 comparetotmag 0E1 -0E1 -> 0
|
||||
ctmx667 comparetotmag 0E2 -0E1 -> 1
|
||||
ctmx668 comparetotmag -0E1 -0E2 -> -1
|
||||
ctmx669 comparetotmag -0E2 -0E2 -> 0
|
||||
ctmx670 comparetotmag 0E1 -0E2 -> -1
|
||||
ctmx671 comparetotmag 0E2 -0E2 -> 0
|
||||
ctmx672 comparetotmag -0E1 0E1 -> 0
|
||||
ctmx673 comparetotmag -0E2 0E1 -> 1
|
||||
ctmx674 comparetotmag 0E1 0E1 -> 0
|
||||
ctmx675 comparetotmag 0E2 0E1 -> 1
|
||||
ctmx676 comparetotmag -0E1 0E2 -> -1
|
||||
ctmx677 comparetotmag -0E2 0E2 -> 0
|
||||
ctmx678 comparetotmag 0E1 0E2 -> -1
|
||||
ctmx679 comparetotmag 0E2 0E2 -> 0
|
||||
|
||||
-- trailing zeros; unit-y
|
||||
precision: 20
|
||||
ctmx680 comparetotmag 12 12 -> 0
|
||||
ctmx681 comparetotmag 12 12.0 -> 1
|
||||
ctmx682 comparetotmag 12 12.00 -> 1
|
||||
ctmx683 comparetotmag 12 12.000 -> 1
|
||||
ctmx684 comparetotmag 12 12.0000 -> 1
|
||||
ctmx685 comparetotmag 12 12.00000 -> 1
|
||||
ctmx686 comparetotmag 12 12.000000 -> 1
|
||||
ctmx687 comparetotmag 12 12.0000000 -> 1
|
||||
ctmx688 comparetotmag 12 12.00000000 -> 1
|
||||
ctmx689 comparetotmag 12 12.000000000 -> 1
|
||||
ctmx690 comparetotmag 12 12 -> 0
|
||||
ctmx691 comparetotmag 12.0 12 -> -1
|
||||
ctmx692 comparetotmag 12.00 12 -> -1
|
||||
ctmx693 comparetotmag 12.000 12 -> -1
|
||||
ctmx694 comparetotmag 12.0000 12 -> -1
|
||||
ctmx695 comparetotmag 12.00000 12 -> -1
|
||||
ctmx696 comparetotmag 12.000000 12 -> -1
|
||||
ctmx697 comparetotmag 12.0000000 12 -> -1
|
||||
ctmx698 comparetotmag 12.00000000 12 -> -1
|
||||
ctmx699 comparetotmag 12.000000000 12 -> -1
|
||||
|
||||
-- long operand checks
|
||||
maxexponent: 999
|
||||
minexponent: -999
|
||||
precision: 9
|
||||
ctmx701 comparetotmag 12345678000 1 -> 1
|
||||
ctmx702 comparetotmag 1 12345678000 -> -1
|
||||
ctmx703 comparetotmag 1234567800 1 -> 1
|
||||
ctmx704 comparetotmag 1 1234567800 -> -1
|
||||
ctmx705 comparetotmag 1234567890 1 -> 1
|
||||
ctmx706 comparetotmag 1 1234567890 -> -1
|
||||
ctmx707 comparetotmag 1234567891 1 -> 1
|
||||
ctmx708 comparetotmag 1 1234567891 -> -1
|
||||
ctmx709 comparetotmag 12345678901 1 -> 1
|
||||
ctmx710 comparetotmag 1 12345678901 -> -1
|
||||
ctmx711 comparetotmag 1234567896 1 -> 1
|
||||
ctmx712 comparetotmag 1 1234567896 -> -1
|
||||
ctmx713 comparetotmag -1234567891 1 -> 1
|
||||
ctmx714 comparetotmag 1 -1234567891 -> -1
|
||||
ctmx715 comparetotmag -12345678901 1 -> 1
|
||||
ctmx716 comparetotmag 1 -12345678901 -> -1
|
||||
ctmx717 comparetotmag -1234567896 1 -> 1
|
||||
ctmx718 comparetotmag 1 -1234567896 -> -1
|
||||
|
||||
precision: 15
|
||||
-- same with plenty of precision
|
||||
ctmx721 comparetotmag 12345678000 1 -> 1
|
||||
ctmx722 comparetotmag 1 12345678000 -> -1
|
||||
ctmx723 comparetotmag 1234567800 1 -> 1
|
||||
ctmx724 comparetotmag 1 1234567800 -> -1
|
||||
ctmx725 comparetotmag 1234567890 1 -> 1
|
||||
ctmx726 comparetotmag 1 1234567890 -> -1
|
||||
ctmx727 comparetotmag 1234567891 1 -> 1
|
||||
ctmx728 comparetotmag 1 1234567891 -> -1
|
||||
ctmx729 comparetotmag 12345678901 1 -> 1
|
||||
ctmx730 comparetotmag 1 12345678901 -> -1
|
||||
ctmx731 comparetotmag 1234567896 1 -> 1
|
||||
ctmx732 comparetotmag 1 1234567896 -> -1
|
||||
|
||||
-- residue cases
|
||||
precision: 5
|
||||
ctmx740 comparetotmag 1 0.9999999 -> 1
|
||||
ctmx741 comparetotmag 1 0.999999 -> 1
|
||||
ctmx742 comparetotmag 1 0.99999 -> 1
|
||||
ctmx743 comparetotmag 1 1.0000 -> 1
|
||||
ctmx744 comparetotmag 1 1.00001 -> -1
|
||||
ctmx745 comparetotmag 1 1.000001 -> -1
|
||||
ctmx746 comparetotmag 1 1.0000001 -> -1
|
||||
ctmx750 comparetotmag 0.9999999 1 -> -1
|
||||
ctmx751 comparetotmag 0.999999 1 -> -1
|
||||
ctmx752 comparetotmag 0.99999 1 -> -1
|
||||
ctmx753 comparetotmag 1.0000 1 -> -1
|
||||
ctmx754 comparetotmag 1.00001 1 -> 1
|
||||
ctmx755 comparetotmag 1.000001 1 -> 1
|
||||
ctmx756 comparetotmag 1.0000001 1 -> 1
|
||||
|
||||
-- a selection of longies
|
||||
ctmx760 comparetotmag -36852134.84194296250843579428931 -5830629.8347085025808756560357940 -> 1
|
||||
ctmx761 comparetotmag -36852134.84194296250843579428931 -36852134.84194296250843579428931 -> 0
|
||||
ctmx762 comparetotmag -36852134.94194296250843579428931 -36852134.84194296250843579428931 -> 1
|
||||
ctmx763 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1
|
||||
-- precisions above or below the difference should have no effect
|
||||
precision: 11
|
||||
ctmx764 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1
|
||||
precision: 10
|
||||
ctmx765 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1
|
||||
precision: 9
|
||||
ctmx766 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1
|
||||
precision: 8
|
||||
ctmx767 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1
|
||||
precision: 7
|
||||
ctmx768 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1
|
||||
precision: 6
|
||||
ctmx769 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1
|
||||
precision: 5
|
||||
ctmx770 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1
|
||||
precision: 4
|
||||
ctmx771 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1
|
||||
precision: 3
|
||||
ctmx772 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1
|
||||
precision: 2
|
||||
ctmx773 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1
|
||||
precision: 1
|
||||
ctmx774 comparetotmag -36852134.84194296250843579428931 -36852134.94194296250843579428931 -> -1
|
||||
|
||||
-- Specials
|
||||
precision: 9
|
||||
ctmx780 comparetotmag Inf -Inf -> 0
|
||||
ctmx781 comparetotmag Inf -1000 -> 1
|
||||
ctmx782 comparetotmag Inf -1 -> 1
|
||||
ctmx783 comparetotmag Inf -0 -> 1
|
||||
ctmx784 comparetotmag Inf 0 -> 1
|
||||
ctmx785 comparetotmag Inf 1 -> 1
|
||||
ctmx786 comparetotmag Inf 1000 -> 1
|
||||
ctmx787 comparetotmag Inf Inf -> 0
|
||||
ctmx788 comparetotmag -1000 Inf -> -1
|
||||
ctmx789 comparetotmag -Inf Inf -> 0
|
||||
ctmx790 comparetotmag -1 Inf -> -1
|
||||
ctmx791 comparetotmag -0 Inf -> -1
|
||||
ctmx792 comparetotmag 0 Inf -> -1
|
||||
ctmx793 comparetotmag 1 Inf -> -1
|
||||
ctmx794 comparetotmag 1000 Inf -> -1
|
||||
ctmx795 comparetotmag Inf Inf -> 0
|
||||
|
||||
ctmx800 comparetotmag -Inf -Inf -> 0
|
||||
ctmx801 comparetotmag -Inf -1000 -> 1
|
||||
ctmx802 comparetotmag -Inf -1 -> 1
|
||||
ctmx803 comparetotmag -Inf -0 -> 1
|
||||
ctmx804 comparetotmag -Inf 0 -> 1
|
||||
ctmx805 comparetotmag -Inf 1 -> 1
|
||||
ctmx806 comparetotmag -Inf 1000 -> 1
|
||||
ctmx807 comparetotmag -Inf Inf -> 0
|
||||
ctmx808 comparetotmag -Inf -Inf -> 0
|
||||
ctmx809 comparetotmag -1000 -Inf -> -1
|
||||
ctmx810 comparetotmag -1 -Inf -> -1
|
||||
ctmx811 comparetotmag -0 -Inf -> -1
|
||||
ctmx812 comparetotmag 0 -Inf -> -1
|
||||
ctmx813 comparetotmag 1 -Inf -> -1
|
||||
ctmx814 comparetotmag 1000 -Inf -> -1
|
||||
ctmx815 comparetotmag Inf -Inf -> 0
|
||||
|
||||
ctmx821 comparetotmag NaN -Inf -> 1
|
||||
ctmx822 comparetotmag NaN -1000 -> 1
|
||||
ctmx823 comparetotmag NaN -1 -> 1
|
||||
ctmx824 comparetotmag NaN -0 -> 1
|
||||
ctmx825 comparetotmag NaN 0 -> 1
|
||||
ctmx826 comparetotmag NaN 1 -> 1
|
||||
ctmx827 comparetotmag NaN 1000 -> 1
|
||||
ctmx828 comparetotmag NaN Inf -> 1
|
||||
ctmx829 comparetotmag NaN NaN -> 0
|
||||
ctmx830 comparetotmag -Inf NaN -> -1
|
||||
ctmx831 comparetotmag -1000 NaN -> -1
|
||||
ctmx832 comparetotmag -1 NaN -> -1
|
||||
ctmx833 comparetotmag -0 NaN -> -1
|
||||
ctmx834 comparetotmag 0 NaN -> -1
|
||||
ctmx835 comparetotmag 1 NaN -> -1
|
||||
ctmx836 comparetotmag 1000 NaN -> -1
|
||||
ctmx837 comparetotmag Inf NaN -> -1
|
||||
ctmx838 comparetotmag -NaN -NaN -> 0
|
||||
ctmx839 comparetotmag +NaN -NaN -> 0
|
||||
ctmx840 comparetotmag -NaN +NaN -> 0
|
||||
|
||||
ctmx841 comparetotmag sNaN -sNaN -> 0
|
||||
ctmx842 comparetotmag sNaN -NaN -> -1
|
||||
ctmx843 comparetotmag sNaN -Inf -> 1
|
||||
ctmx844 comparetotmag sNaN -1000 -> 1
|
||||
ctmx845 comparetotmag sNaN -1 -> 1
|
||||
ctmx846 comparetotmag sNaN -0 -> 1
|
||||
ctmx847 comparetotmag sNaN 0 -> 1
|
||||
ctmx848 comparetotmag sNaN 1 -> 1
|
||||
ctmx849 comparetotmag sNaN 1000 -> 1
|
||||
ctmx850 comparetotmag sNaN NaN -> -1
|
||||
ctmx851 comparetotmag sNaN sNaN -> 0
|
||||
|
||||
ctmx852 comparetotmag -sNaN sNaN -> 0
|
||||
ctmx853 comparetotmag -NaN sNaN -> 1
|
||||
ctmx854 comparetotmag -Inf sNaN -> -1
|
||||
ctmx855 comparetotmag -1000 sNaN -> -1
|
||||
ctmx856 comparetotmag -1 sNaN -> -1
|
||||
ctmx857 comparetotmag -0 sNaN -> -1
|
||||
ctmx858 comparetotmag 0 sNaN -> -1
|
||||
ctmx859 comparetotmag 1 sNaN -> -1
|
||||
ctmx860 comparetotmag 1000 sNaN -> -1
|
||||
ctmx861 comparetotmag Inf sNaN -> -1
|
||||
ctmx862 comparetotmag NaN sNaN -> 1
|
||||
ctmx863 comparetotmag sNaN sNaN -> 0
|
||||
|
||||
ctmx871 comparetotmag -sNaN -sNaN -> 0
|
||||
ctmx872 comparetotmag -sNaN -NaN -> -1
|
||||
ctmx873 comparetotmag -sNaN -Inf -> 1
|
||||
ctmx874 comparetotmag -sNaN -1000 -> 1
|
||||
ctmx875 comparetotmag -sNaN -1 -> 1
|
||||
ctmx876 comparetotmag -sNaN -0 -> 1
|
||||
ctmx877 comparetotmag -sNaN 0 -> 1
|
||||
ctmx878 comparetotmag -sNaN 1 -> 1
|
||||
ctmx879 comparetotmag -sNaN 1000 -> 1
|
||||
ctmx880 comparetotmag -sNaN NaN -> -1
|
||||
ctmx881 comparetotmag -sNaN sNaN -> 0
|
||||
|
||||
ctmx882 comparetotmag -sNaN -sNaN -> 0
|
||||
ctmx883 comparetotmag -NaN -sNaN -> 1
|
||||
ctmx884 comparetotmag -Inf -sNaN -> -1
|
||||
ctmx885 comparetotmag -1000 -sNaN -> -1
|
||||
ctmx886 comparetotmag -1 -sNaN -> -1
|
||||
ctmx887 comparetotmag -0 -sNaN -> -1
|
||||
ctmx888 comparetotmag 0 -sNaN -> -1
|
||||
ctmx889 comparetotmag 1 -sNaN -> -1
|
||||
ctmx890 comparetotmag 1000 -sNaN -> -1
|
||||
ctmx891 comparetotmag Inf -sNaN -> -1
|
||||
ctmx892 comparetotmag NaN -sNaN -> 1
|
||||
ctmx893 comparetotmag sNaN -sNaN -> 0
|
||||
|
||||
-- NaNs with payload
|
||||
ctmx960 comparetotmag NaN9 -Inf -> 1
|
||||
ctmx961 comparetotmag NaN8 999 -> 1
|
||||
ctmx962 comparetotmag NaN77 Inf -> 1
|
||||
ctmx963 comparetotmag -NaN67 NaN5 -> 1
|
||||
ctmx964 comparetotmag -Inf -NaN4 -> -1
|
||||
ctmx965 comparetotmag -999 -NaN33 -> -1
|
||||
ctmx966 comparetotmag Inf NaN2 -> -1
|
||||
|
||||
ctmx970 comparetotmag -NaN41 -NaN42 -> -1
|
||||
ctmx971 comparetotmag +NaN41 -NaN42 -> -1
|
||||
ctmx972 comparetotmag -NaN41 +NaN42 -> -1
|
||||
ctmx973 comparetotmag +NaN41 +NaN42 -> -1
|
||||
ctmx974 comparetotmag -NaN42 -NaN01 -> 1
|
||||
ctmx975 comparetotmag +NaN42 -NaN01 -> 1
|
||||
ctmx976 comparetotmag -NaN42 +NaN01 -> 1
|
||||
ctmx977 comparetotmag +NaN42 +NaN01 -> 1
|
||||
|
||||
ctmx980 comparetotmag -sNaN771 -sNaN772 -> -1
|
||||
ctmx981 comparetotmag +sNaN771 -sNaN772 -> -1
|
||||
ctmx982 comparetotmag -sNaN771 +sNaN772 -> -1
|
||||
ctmx983 comparetotmag +sNaN771 +sNaN772 -> -1
|
||||
ctmx984 comparetotmag -sNaN772 -sNaN771 -> 1
|
||||
ctmx985 comparetotmag +sNaN772 -sNaN771 -> 1
|
||||
ctmx986 comparetotmag -sNaN772 +sNaN771 -> 1
|
||||
ctmx987 comparetotmag +sNaN772 +sNaN771 -> 1
|
||||
|
||||
ctmx991 comparetotmag -sNaN99 -Inf -> 1
|
||||
ctmx992 comparetotmag sNaN98 -11 -> 1
|
||||
ctmx993 comparetotmag sNaN97 NaN -> -1
|
||||
ctmx994 comparetotmag sNaN16 sNaN94 -> -1
|
||||
ctmx995 comparetotmag NaN85 sNaN83 -> 1
|
||||
ctmx996 comparetotmag -Inf sNaN92 -> -1
|
||||
ctmx997 comparetotmag 088 sNaN81 -> -1
|
||||
ctmx998 comparetotmag Inf sNaN90 -> -1
|
||||
ctmx999 comparetotmag NaN -sNaN89 -> 1
|
||||
|
||||
-- overflow and underflow tests .. subnormal results now allowed
|
||||
maxExponent: 999999999
|
||||
minexponent: -999999999
|
||||
ctmx1080 comparetotmag +1.23456789012345E-0 9E+999999999 -> -1
|
||||
ctmx1081 comparetotmag 9E+999999999 +1.23456789012345E-0 -> 1
|
||||
ctmx1082 comparetotmag +0.100 9E-999999999 -> 1
|
||||
ctmx1083 comparetotmag 9E-999999999 +0.100 -> -1
|
||||
ctmx1085 comparetotmag -1.23456789012345E-0 9E+999999999 -> -1
|
||||
ctmx1086 comparetotmag 9E+999999999 -1.23456789012345E-0 -> 1
|
||||
ctmx1087 comparetotmag -0.100 9E-999999999 -> 1
|
||||
ctmx1088 comparetotmag 9E-999999999 -0.100 -> -1
|
||||
|
||||
ctmx1089 comparetotmag 1e-599999999 1e-400000001 -> -1
|
||||
ctmx1090 comparetotmag 1e-599999999 1e-400000000 -> -1
|
||||
ctmx1091 comparetotmag 1e-600000000 1e-400000000 -> -1
|
||||
ctmx1092 comparetotmag 9e-999999998 0.01 -> -1
|
||||
ctmx1093 comparetotmag 9e-999999998 0.1 -> -1
|
||||
ctmx1094 comparetotmag 0.01 9e-999999998 -> 1
|
||||
ctmx1095 comparetotmag 1e599999999 1e400000001 -> 1
|
||||
ctmx1096 comparetotmag 1e599999999 1e400000000 -> 1
|
||||
ctmx1097 comparetotmag 1e600000000 1e400000000 -> 1
|
||||
ctmx1098 comparetotmag 9e999999998 100 -> 1
|
||||
ctmx1099 comparetotmag 9e999999998 10 -> 1
|
||||
ctmx1100 comparetotmag 100 9e999999998 -> -1
|
||||
-- signs
|
||||
ctmx1101 comparetotmag 1e+777777777 1e+411111111 -> 1
|
||||
ctmx1102 comparetotmag 1e+777777777 -1e+411111111 -> 1
|
||||
ctmx1103 comparetotmag -1e+777777777 1e+411111111 -> 1
|
||||
ctmx1104 comparetotmag -1e+777777777 -1e+411111111 -> 1
|
||||
ctmx1105 comparetotmag 1e-777777777 1e-411111111 -> -1
|
||||
ctmx1106 comparetotmag 1e-777777777 -1e-411111111 -> -1
|
||||
ctmx1107 comparetotmag -1e-777777777 1e-411111111 -> -1
|
||||
ctmx1108 comparetotmag -1e-777777777 -1e-411111111 -> -1
|
||||
|
||||
-- spread zeros
|
||||
ctmx1110 comparetotmag 0E-383 0 -> -1
|
||||
ctmx1111 comparetotmag 0E-383 -0 -> -1
|
||||
ctmx1112 comparetotmag -0E-383 0 -> -1
|
||||
ctmx1113 comparetotmag -0E-383 -0 -> -1
|
||||
ctmx1114 comparetotmag 0E-383 0E+384 -> -1
|
||||
ctmx1115 comparetotmag 0E-383 -0E+384 -> -1
|
||||
ctmx1116 comparetotmag -0E-383 0E+384 -> -1
|
||||
ctmx1117 comparetotmag -0E-383 -0E+384 -> -1
|
||||
ctmx1118 comparetotmag 0 0E+384 -> -1
|
||||
ctmx1119 comparetotmag 0 -0E+384 -> -1
|
||||
ctmx1120 comparetotmag -0 0E+384 -> -1
|
||||
ctmx1121 comparetotmag -0 -0E+384 -> -1
|
||||
|
||||
ctmx1130 comparetotmag 0E+384 0 -> 1
|
||||
ctmx1131 comparetotmag 0E+384 -0 -> 1
|
||||
ctmx1132 comparetotmag -0E+384 0 -> 1
|
||||
ctmx1133 comparetotmag -0E+384 -0 -> 1
|
||||
ctmx1134 comparetotmag 0E+384 0E-383 -> 1
|
||||
ctmx1135 comparetotmag 0E+384 -0E-383 -> 1
|
||||
ctmx1136 comparetotmag -0E+384 0E-383 -> 1
|
||||
ctmx1137 comparetotmag -0E+384 -0E-383 -> 1
|
||||
ctmx1138 comparetotmag 0 0E-383 -> 1
|
||||
ctmx1139 comparetotmag 0 -0E-383 -> 1
|
||||
ctmx1140 comparetotmag -0 0E-383 -> 1
|
||||
ctmx1141 comparetotmag -0 -0E-383 -> 1
|
||||
|
||||
-- Null tests
|
||||
ctmx9990 comparetotmag 10 # -> NaN Invalid_operation
|
||||
ctmx9991 comparetotmag # 10 -> NaN Invalid_operation
|
@@ -0,0 +1,86 @@
|
||||
------------------------------------------------------------------------
|
||||
-- copy.decTest -- quiet copy --
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
extended: 1
|
||||
precision: 9
|
||||
rounding: half_up
|
||||
maxExponent: 999
|
||||
minExponent: -999
|
||||
|
||||
-- Sanity check
|
||||
cpyx001 copy +7.50 -> 7.50
|
||||
|
||||
-- Infinities
|
||||
cpyx011 copy Infinity -> Infinity
|
||||
cpyx012 copy -Infinity -> -Infinity
|
||||
|
||||
-- NaNs, 0 payload
|
||||
cpyx021 copy NaN -> NaN
|
||||
cpyx022 copy -NaN -> -NaN
|
||||
cpyx023 copy sNaN -> sNaN
|
||||
cpyx024 copy -sNaN -> -sNaN
|
||||
|
||||
-- NaNs, non-0 payload
|
||||
cpyx031 copy NaN10 -> NaN10
|
||||
cpyx032 copy -NaN10 -> -NaN10
|
||||
cpyx033 copy sNaN10 -> sNaN10
|
||||
cpyx034 copy -sNaN10 -> -sNaN10
|
||||
cpyx035 copy NaN7 -> NaN7
|
||||
cpyx036 copy -NaN7 -> -NaN7
|
||||
cpyx037 copy sNaN101 -> sNaN101
|
||||
cpyx038 copy -sNaN101 -> -sNaN101
|
||||
|
||||
-- finites
|
||||
cpyx101 copy 7 -> 7
|
||||
cpyx102 copy -7 -> -7
|
||||
cpyx103 copy 75 -> 75
|
||||
cpyx104 copy -75 -> -75
|
||||
cpyx105 copy 7.50 -> 7.50
|
||||
cpyx106 copy -7.50 -> -7.50
|
||||
cpyx107 copy 7.500 -> 7.500
|
||||
cpyx108 copy -7.500 -> -7.500
|
||||
|
||||
-- zeros
|
||||
cpyx111 copy 0 -> 0
|
||||
cpyx112 copy -0 -> -0
|
||||
cpyx113 copy 0E+4 -> 0E+4
|
||||
cpyx114 copy -0E+4 -> -0E+4
|
||||
cpyx115 copy 0.0000 -> 0.0000
|
||||
cpyx116 copy -0.0000 -> -0.0000
|
||||
cpyx117 copy 0E-141 -> 0E-141
|
||||
cpyx118 copy -0E-141 -> -0E-141
|
||||
|
||||
-- full coefficients, alternating bits
|
||||
cpyx121 copy 268268268 -> 268268268
|
||||
cpyx122 copy -268268268 -> -268268268
|
||||
cpyx123 copy 134134134 -> 134134134
|
||||
cpyx124 copy -134134134 -> -134134134
|
||||
|
||||
-- Nmax, Nmin, Ntiny
|
||||
cpyx131 copy 9.99999999E+999 -> 9.99999999E+999
|
||||
cpyx132 copy 1E-999 -> 1E-999
|
||||
cpyx133 copy 1.00000000E-999 -> 1.00000000E-999
|
||||
cpyx134 copy 1E-1007 -> 1E-1007
|
||||
|
||||
cpyx135 copy -1E-1007 -> -1E-1007
|
||||
cpyx136 copy -1.00000000E-999 -> -1.00000000E-999
|
||||
cpyx137 copy -1E-999 -> -1E-999
|
||||
cpyx138 copy -9.99999999E+999 -> -9.99999999E+999
|
@@ -0,0 +1,86 @@
|
||||
------------------------------------------------------------------------
|
||||
-- copyAbs.decTest -- quiet copy and set sign to zero --
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
extended: 1
|
||||
precision: 9
|
||||
rounding: half_up
|
||||
maxExponent: 999
|
||||
minExponent: -999
|
||||
|
||||
-- Sanity check
|
||||
cpax001 copyabs +7.50 -> 7.50
|
||||
|
||||
-- Infinities
|
||||
cpax011 copyabs Infinity -> Infinity
|
||||
cpax012 copyabs -Infinity -> Infinity
|
||||
|
||||
-- NaNs, 0 payload
|
||||
cpax021 copyabs NaN -> NaN
|
||||
cpax022 copyabs -NaN -> NaN
|
||||
cpax023 copyabs sNaN -> sNaN
|
||||
cpax024 copyabs -sNaN -> sNaN
|
||||
|
||||
-- NaNs, non-0 payload
|
||||
cpax031 copyabs NaN10 -> NaN10
|
||||
cpax032 copyabs -NaN15 -> NaN15
|
||||
cpax033 copyabs sNaN15 -> sNaN15
|
||||
cpax034 copyabs -sNaN10 -> sNaN10
|
||||
cpax035 copyabs NaN7 -> NaN7
|
||||
cpax036 copyabs -NaN7 -> NaN7
|
||||
cpax037 copyabs sNaN101 -> sNaN101
|
||||
cpax038 copyabs -sNaN101 -> sNaN101
|
||||
|
||||
-- finites
|
||||
cpax101 copyabs 7 -> 7
|
||||
cpax102 copyabs -7 -> 7
|
||||
cpax103 copyabs 75 -> 75
|
||||
cpax104 copyabs -75 -> 75
|
||||
cpax105 copyabs 7.10 -> 7.10
|
||||
cpax106 copyabs -7.10 -> 7.10
|
||||
cpax107 copyabs 7.500 -> 7.500
|
||||
cpax108 copyabs -7.500 -> 7.500
|
||||
|
||||
-- zeros
|
||||
cpax111 copyabs 0 -> 0
|
||||
cpax112 copyabs -0 -> 0
|
||||
cpax113 copyabs 0E+6 -> 0E+6
|
||||
cpax114 copyabs -0E+6 -> 0E+6
|
||||
cpax115 copyabs 0.0000 -> 0.0000
|
||||
cpax116 copyabs -0.0000 -> 0.0000
|
||||
cpax117 copyabs 0E-141 -> 0E-141
|
||||
cpax118 copyabs -0E-141 -> 0E-141
|
||||
|
||||
-- full coefficients, alternating bits
|
||||
cpax121 copyabs 268268268 -> 268268268
|
||||
cpax122 copyabs -268268268 -> 268268268
|
||||
cpax123 copyabs 134134134 -> 134134134
|
||||
cpax124 copyabs -134134134 -> 134134134
|
||||
|
||||
-- Nmax, Nmin, Ntiny
|
||||
cpax131 copyabs 9.99999999E+999 -> 9.99999999E+999
|
||||
cpax132 copyabs 1E-999 -> 1E-999
|
||||
cpax133 copyabs 1.00000000E-999 -> 1.00000000E-999
|
||||
cpax134 copyabs 1E-1007 -> 1E-1007
|
||||
|
||||
cpax135 copyabs -1E-1007 -> 1E-1007
|
||||
cpax136 copyabs -1.00000000E-999 -> 1.00000000E-999
|
||||
cpax137 copyabs -1E-999 -> 1E-999
|
||||
cpax199 copyabs -9.99999999E+999 -> 9.99999999E+999
|
@@ -0,0 +1,86 @@
|
||||
------------------------------------------------------------------------
|
||||
-- copyNegate.decTest -- quiet copy and negate --
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
extended: 1
|
||||
precision: 9
|
||||
rounding: half_up
|
||||
maxExponent: 999
|
||||
minExponent: -999
|
||||
|
||||
-- Sanity check
|
||||
cpnx001 copynegate +7.50 -> -7.50
|
||||
|
||||
-- Infinities
|
||||
cpnx011 copynegate Infinity -> -Infinity
|
||||
cpnx012 copynegate -Infinity -> Infinity
|
||||
|
||||
-- NaNs, 0 payload
|
||||
cpnx021 copynegate NaN -> -NaN
|
||||
cpnx022 copynegate -NaN -> NaN
|
||||
cpnx023 copynegate sNaN -> -sNaN
|
||||
cpnx024 copynegate -sNaN -> sNaN
|
||||
|
||||
-- NaNs, non-0 payload
|
||||
cpnx031 copynegate NaN13 -> -NaN13
|
||||
cpnx032 copynegate -NaN13 -> NaN13
|
||||
cpnx033 copynegate sNaN13 -> -sNaN13
|
||||
cpnx034 copynegate -sNaN13 -> sNaN13
|
||||
cpnx035 copynegate NaN70 -> -NaN70
|
||||
cpnx036 copynegate -NaN70 -> NaN70
|
||||
cpnx037 copynegate sNaN101 -> -sNaN101
|
||||
cpnx038 copynegate -sNaN101 -> sNaN101
|
||||
|
||||
-- finites
|
||||
cpnx101 copynegate 7 -> -7
|
||||
cpnx102 copynegate -7 -> 7
|
||||
cpnx103 copynegate 75 -> -75
|
||||
cpnx104 copynegate -75 -> 75
|
||||
cpnx105 copynegate 7.50 -> -7.50
|
||||
cpnx106 copynegate -7.50 -> 7.50
|
||||
cpnx107 copynegate 7.500 -> -7.500
|
||||
cpnx108 copynegate -7.500 -> 7.500
|
||||
|
||||
-- zeros
|
||||
cpnx111 copynegate 0 -> -0
|
||||
cpnx112 copynegate -0 -> 0
|
||||
cpnx113 copynegate 0E+4 -> -0E+4
|
||||
cpnx114 copynegate -0E+4 -> 0E+4
|
||||
cpnx115 copynegate 0.0000 -> -0.0000
|
||||
cpnx116 copynegate -0.0000 -> 0.0000
|
||||
cpnx117 copynegate 0E-141 -> -0E-141
|
||||
cpnx118 copynegate -0E-141 -> 0E-141
|
||||
|
||||
-- full coefficients, alternating bits
|
||||
cpnx121 copynegate 268268268 -> -268268268
|
||||
cpnx122 copynegate -268268268 -> 268268268
|
||||
cpnx123 copynegate 134134134 -> -134134134
|
||||
cpnx124 copynegate -134134134 -> 134134134
|
||||
|
||||
-- Nmax, Nmin, Ntiny
|
||||
cpnx131 copynegate 9.99999999E+999 -> -9.99999999E+999
|
||||
cpnx132 copynegate 1E-999 -> -1E-999
|
||||
cpnx133 copynegate 1.00000000E-999 -> -1.00000000E-999
|
||||
cpnx134 copynegate 1E-1007 -> -1E-1007
|
||||
|
||||
cpnx135 copynegate -1E-1007 -> 1E-1007
|
||||
cpnx136 copynegate -1.00000000E-999 -> 1.00000000E-999
|
||||
cpnx137 copynegate -1E-999 -> 1E-999
|
||||
cpnx138 copynegate -9.99999999E+999 -> 9.99999999E+999
|
@@ -0,0 +1,177 @@
|
||||
------------------------------------------------------------------------
|
||||
-- copysign.decTest -- quiet copy with sign from rhs --
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
extended: 1
|
||||
precision: 9
|
||||
rounding: half_up
|
||||
maxExponent: 999
|
||||
minExponent: -999
|
||||
|
||||
-- Sanity check, and examples from decArith
|
||||
cpsx001 copysign +7.50 11 -> 7.50
|
||||
cpsx002 copysign '1.50' '7.33' -> 1.50
|
||||
cpsx003 copysign '-1.50' '7.33' -> 1.50
|
||||
cpsx004 copysign '1.50' '-7.33' -> -1.50
|
||||
cpsx005 copysign '-1.50' '-7.33' -> -1.50
|
||||
|
||||
-- Infinities
|
||||
cpsx011 copysign Infinity 11 -> Infinity
|
||||
cpsx012 copysign -Infinity 11 -> Infinity
|
||||
|
||||
-- NaNs, 0 payload
|
||||
cpsx021 copysign NaN 11 -> NaN
|
||||
cpsx022 copysign -NaN 11 -> NaN
|
||||
cpsx023 copysign sNaN 11 -> sNaN
|
||||
cpsx024 copysign -sNaN 11 -> sNaN
|
||||
|
||||
-- NaNs, non-0 payload
|
||||
cpsx031 copysign NaN10 11 -> NaN10
|
||||
cpsx032 copysign -NaN10 11 -> NaN10
|
||||
cpsx033 copysign sNaN10 11 -> sNaN10
|
||||
cpsx034 copysign -sNaN10 11 -> sNaN10
|
||||
cpsx035 copysign NaN7 11 -> NaN7
|
||||
cpsx036 copysign -NaN7 11 -> NaN7
|
||||
cpsx037 copysign sNaN101 11 -> sNaN101
|
||||
cpsx038 copysign -sNaN101 11 -> sNaN101
|
||||
|
||||
-- finites
|
||||
cpsx101 copysign 7 11 -> 7
|
||||
cpsx102 copysign -7 11 -> 7
|
||||
cpsx103 copysign 75 11 -> 75
|
||||
cpsx104 copysign -75 11 -> 75
|
||||
cpsx105 copysign 7.50 11 -> 7.50
|
||||
cpsx106 copysign -7.50 11 -> 7.50
|
||||
cpsx107 copysign 7.500 11 -> 7.500
|
||||
cpsx108 copysign -7.500 11 -> 7.500
|
||||
|
||||
-- zeros
|
||||
cpsx111 copysign 0 11 -> 0
|
||||
cpsx112 copysign -0 11 -> 0
|
||||
cpsx113 copysign 0E+4 11 -> 0E+4
|
||||
cpsx114 copysign -0E+4 11 -> 0E+4
|
||||
cpsx115 copysign 0.0000 11 -> 0.0000
|
||||
cpsx116 copysign -0.0000 11 -> 0.0000
|
||||
cpsx117 copysign 0E-141 11 -> 0E-141
|
||||
cpsx118 copysign -0E-141 11 -> 0E-141
|
||||
|
||||
-- full coefficients, alternating bits
|
||||
cpsx121 copysign 268268268 11 -> 268268268
|
||||
cpsx122 copysign -268268268 11 -> 268268268
|
||||
cpsx123 copysign 134134134 11 -> 134134134
|
||||
cpsx124 copysign -134134134 11 -> 134134134
|
||||
|
||||
-- Nmax, Nmin, Ntiny
|
||||
cpsx131 copysign 9.99999999E+999 11 -> 9.99999999E+999
|
||||
cpsx132 copysign 1E-999 11 -> 1E-999
|
||||
cpsx133 copysign 1.00000000E-999 11 -> 1.00000000E-999
|
||||
cpsx134 copysign 1E-1007 11 -> 1E-1007
|
||||
|
||||
cpsx135 copysign -1E-1007 11 -> 1E-1007
|
||||
cpsx136 copysign -1.00000000E-999 11 -> 1.00000000E-999
|
||||
cpsx137 copysign -1E-999 11 -> 1E-999
|
||||
cpsx138 copysign -9.99999999E+999 11 -> 9.99999999E+999
|
||||
|
||||
-- repeat with negative RHS
|
||||
|
||||
-- Infinities
|
||||
cpsx211 copysign Infinity -34 -> -Infinity
|
||||
cpsx212 copysign -Infinity -34 -> -Infinity
|
||||
|
||||
-- NaNs, 0 payload
|
||||
cpsx221 copysign NaN -34 -> -NaN
|
||||
cpsx222 copysign -NaN -34 -> -NaN
|
||||
cpsx223 copysign sNaN -34 -> -sNaN
|
||||
cpsx224 copysign -sNaN -34 -> -sNaN
|
||||
|
||||
-- NaNs, non-0 payload
|
||||
cpsx231 copysign NaN10 -34 -> -NaN10
|
||||
cpsx232 copysign -NaN10 -34 -> -NaN10
|
||||
cpsx233 copysign sNaN10 -34 -> -sNaN10
|
||||
cpsx234 copysign -sNaN10 -34 -> -sNaN10
|
||||
cpsx235 copysign NaN7 -34 -> -NaN7
|
||||
cpsx236 copysign -NaN7 -34 -> -NaN7
|
||||
cpsx237 copysign sNaN101 -34 -> -sNaN101
|
||||
cpsx238 copysign -sNaN101 -34 -> -sNaN101
|
||||
|
||||
-- finites
|
||||
cpsx301 copysign 7 -34 -> -7
|
||||
cpsx302 copysign -7 -34 -> -7
|
||||
cpsx303 copysign 75 -34 -> -75
|
||||
cpsx304 copysign -75 -34 -> -75
|
||||
cpsx305 copysign 7.50 -34 -> -7.50
|
||||
cpsx306 copysign -7.50 -34 -> -7.50
|
||||
cpsx307 copysign 7.500 -34 -> -7.500
|
||||
cpsx308 copysign -7.500 -34 -> -7.500
|
||||
|
||||
-- zeros
|
||||
cpsx311 copysign 0 -34 -> -0
|
||||
cpsx312 copysign -0 -34 -> -0
|
||||
cpsx313 copysign 0E+4 -34 -> -0E+4
|
||||
cpsx314 copysign -0E+4 -34 -> -0E+4
|
||||
cpsx315 copysign 0.0000 -34 -> -0.0000
|
||||
cpsx316 copysign -0.0000 -34 -> -0.0000
|
||||
cpsx317 copysign 0E-141 -34 -> -0E-141
|
||||
cpsx318 copysign -0E-141 -34 -> -0E-141
|
||||
|
||||
-- full coefficients, alternating bits
|
||||
cpsx321 copysign 268268268 -18 -> -268268268
|
||||
cpsx322 copysign -268268268 -18 -> -268268268
|
||||
cpsx323 copysign 134134134 -18 -> -134134134
|
||||
cpsx324 copysign -134134134 -18 -> -134134134
|
||||
|
||||
-- Nmax, Nmin, Ntiny
|
||||
cpsx331 copysign 9.99999999E+999 -18 -> -9.99999999E+999
|
||||
cpsx332 copysign 1E-999 -18 -> -1E-999
|
||||
cpsx333 copysign 1.00000000E-999 -18 -> -1.00000000E-999
|
||||
cpsx334 copysign 1E-1007 -18 -> -1E-1007
|
||||
|
||||
cpsx335 copysign -1E-1007 -18 -> -1E-1007
|
||||
cpsx336 copysign -1.00000000E-999 -18 -> -1.00000000E-999
|
||||
cpsx337 copysign -1E-999 -18 -> -1E-999
|
||||
cpsx338 copysign -9.99999999E+999 -18 -> -9.99999999E+999
|
||||
|
||||
-- Other kinds of RHS
|
||||
cpsx401 copysign 701 -34 -> -701
|
||||
cpsx402 copysign -720 -34 -> -720
|
||||
cpsx403 copysign 701 -0 -> -701
|
||||
cpsx404 copysign -720 -0 -> -720
|
||||
cpsx405 copysign 701 +0 -> 701
|
||||
cpsx406 copysign -720 +0 -> 720
|
||||
cpsx407 copysign 701 +34 -> 701
|
||||
cpsx408 copysign -720 +34 -> 720
|
||||
|
||||
cpsx413 copysign 701 -Inf -> -701
|
||||
cpsx414 copysign -720 -Inf -> -720
|
||||
cpsx415 copysign 701 +Inf -> 701
|
||||
cpsx416 copysign -720 +Inf -> 720
|
||||
|
||||
cpsx420 copysign 701 -NaN -> -701
|
||||
cpsx421 copysign -720 -NaN -> -720
|
||||
cpsx422 copysign 701 +NaN -> 701
|
||||
cpsx423 copysign -720 +NaN -> 720
|
||||
cpsx425 copysign -720 +NaN8 -> 720
|
||||
|
||||
cpsx426 copysign 701 -sNaN -> -701
|
||||
cpsx427 copysign -720 -sNaN -> -720
|
||||
cpsx428 copysign 701 +sNaN -> 701
|
||||
cpsx429 copysign -720 +sNaN -> 720
|
||||
cpsx430 copysign -720 +sNaN3 -> 720
|
||||
|
@@ -0,0 +1,126 @@
|
||||
------------------------------------------------------------------------
|
||||
-- ddAbs.decTest -- decDouble absolute value, heeding sNaN --
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
precision: 16
|
||||
maxExponent: 384
|
||||
minExponent: -383
|
||||
extended: 1
|
||||
clamp: 1
|
||||
rounding: half_even
|
||||
|
||||
ddabs001 abs '1' -> '1'
|
||||
ddabs002 abs '-1' -> '1'
|
||||
ddabs003 abs '1.00' -> '1.00'
|
||||
ddabs004 abs '-1.00' -> '1.00'
|
||||
ddabs005 abs '0' -> '0'
|
||||
ddabs006 abs '0.00' -> '0.00'
|
||||
ddabs007 abs '00.0' -> '0.0'
|
||||
ddabs008 abs '00.00' -> '0.00'
|
||||
ddabs009 abs '00' -> '0'
|
||||
|
||||
ddabs010 abs '-2' -> '2'
|
||||
ddabs011 abs '2' -> '2'
|
||||
ddabs012 abs '-2.00' -> '2.00'
|
||||
ddabs013 abs '2.00' -> '2.00'
|
||||
ddabs014 abs '-0' -> '0'
|
||||
ddabs015 abs '-0.00' -> '0.00'
|
||||
ddabs016 abs '-00.0' -> '0.0'
|
||||
ddabs017 abs '-00.00' -> '0.00'
|
||||
ddabs018 abs '-00' -> '0'
|
||||
|
||||
ddabs020 abs '-2000000' -> '2000000'
|
||||
ddabs021 abs '2000000' -> '2000000'
|
||||
|
||||
ddabs030 abs '+0.1' -> '0.1'
|
||||
ddabs031 abs '-0.1' -> '0.1'
|
||||
ddabs032 abs '+0.01' -> '0.01'
|
||||
ddabs033 abs '-0.01' -> '0.01'
|
||||
ddabs034 abs '+0.001' -> '0.001'
|
||||
ddabs035 abs '-0.001' -> '0.001'
|
||||
ddabs036 abs '+0.000001' -> '0.000001'
|
||||
ddabs037 abs '-0.000001' -> '0.000001'
|
||||
ddabs038 abs '+0.000000000001' -> '1E-12'
|
||||
ddabs039 abs '-0.000000000001' -> '1E-12'
|
||||
|
||||
-- examples from decArith
|
||||
ddabs040 abs '2.1' -> '2.1'
|
||||
ddabs041 abs '-100' -> '100'
|
||||
ddabs042 abs '101.5' -> '101.5'
|
||||
ddabs043 abs '-101.5' -> '101.5'
|
||||
|
||||
-- more fixed, potential LHS swaps/overlays if done by subtract 0
|
||||
ddabs060 abs '-56267E-10' -> '0.0000056267'
|
||||
ddabs061 abs '-56267E-5' -> '0.56267'
|
||||
ddabs062 abs '-56267E-2' -> '562.67'
|
||||
ddabs063 abs '-56267E-1' -> '5626.7'
|
||||
ddabs065 abs '-56267E-0' -> '56267'
|
||||
|
||||
-- subnormals and underflow
|
||||
|
||||
-- long operand tests
|
||||
ddabs321 abs 1234567890123456 -> 1234567890123456
|
||||
ddabs322 abs 12345678000 -> 12345678000
|
||||
ddabs323 abs 1234567800 -> 1234567800
|
||||
ddabs324 abs 1234567890 -> 1234567890
|
||||
ddabs325 abs 1234567891 -> 1234567891
|
||||
ddabs326 abs 12345678901 -> 12345678901
|
||||
ddabs327 abs 1234567896 -> 1234567896
|
||||
|
||||
-- zeros
|
||||
ddabs111 abs 0 -> 0
|
||||
ddabs112 abs -0 -> 0
|
||||
ddabs113 abs 0E+6 -> 0E+6
|
||||
ddabs114 abs -0E+6 -> 0E+6
|
||||
ddabs115 abs 0.0000 -> 0.0000
|
||||
ddabs116 abs -0.0000 -> 0.0000
|
||||
ddabs117 abs 0E-141 -> 0E-141
|
||||
ddabs118 abs -0E-141 -> 0E-141
|
||||
|
||||
-- full coefficients, alternating bits
|
||||
ddabs121 abs 2682682682682682 -> 2682682682682682
|
||||
ddabs122 abs -2682682682682682 -> 2682682682682682
|
||||
ddabs123 abs 1341341341341341 -> 1341341341341341
|
||||
ddabs124 abs -1341341341341341 -> 1341341341341341
|
||||
|
||||
-- Nmax, Nmin, Ntiny
|
||||
ddabs131 abs 9.999999999999999E+384 -> 9.999999999999999E+384
|
||||
ddabs132 abs 1E-383 -> 1E-383
|
||||
ddabs133 abs 1.000000000000000E-383 -> 1.000000000000000E-383
|
||||
ddabs134 abs 1E-398 -> 1E-398 Subnormal
|
||||
|
||||
ddabs135 abs -1E-398 -> 1E-398 Subnormal
|
||||
ddabs136 abs -1.000000000000000E-383 -> 1.000000000000000E-383
|
||||
ddabs137 abs -1E-383 -> 1E-383
|
||||
ddabs138 abs -9.999999999999999E+384 -> 9.999999999999999E+384
|
||||
|
||||
-- specials
|
||||
ddabs520 abs 'Inf' -> 'Infinity'
|
||||
ddabs521 abs '-Inf' -> 'Infinity'
|
||||
ddabs522 abs NaN -> NaN
|
||||
ddabs523 abs sNaN -> NaN Invalid_operation
|
||||
ddabs524 abs NaN22 -> NaN22
|
||||
ddabs525 abs sNaN33 -> NaN33 Invalid_operation
|
||||
ddabs526 abs -NaN22 -> -NaN22
|
||||
ddabs527 abs -sNaN33 -> -NaN33 Invalid_operation
|
||||
|
||||
-- Null tests
|
||||
ddabs900 abs # -> NaN Invalid_operation
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,347 @@
|
||||
------------------------------------------------------------------------
|
||||
-- ddAnd.decTest -- digitwise logical AND for decDoubles --
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
precision: 16
|
||||
maxExponent: 384
|
||||
minExponent: -383
|
||||
extended: 1
|
||||
clamp: 1
|
||||
rounding: half_even
|
||||
|
||||
-- Sanity check (truth table)
|
||||
ddand001 and 0 0 -> 0
|
||||
ddand002 and 0 1 -> 0
|
||||
ddand003 and 1 0 -> 0
|
||||
ddand004 and 1 1 -> 1
|
||||
ddand005 and 1100 1010 -> 1000
|
||||
-- and at msd and msd-1
|
||||
-- 1234567890123456 1234567890123456 1234567890123456
|
||||
ddand006 and 0000000000000000 0000000000000000 -> 0
|
||||
ddand007 and 0000000000000000 1000000000000000 -> 0
|
||||
ddand008 and 1000000000000000 0000000000000000 -> 0
|
||||
ddand009 and 1000000000000000 1000000000000000 -> 1000000000000000
|
||||
ddand010 and 0000000000000000 0000000000000000 -> 0
|
||||
ddand011 and 0000000000000000 0100000000000000 -> 0
|
||||
ddand012 and 0100000000000000 0000000000000000 -> 0
|
||||
ddand013 and 0100000000000000 0100000000000000 -> 100000000000000
|
||||
|
||||
-- Various lengths
|
||||
-- 1234567890123456 1234567890123456 1234567890123456
|
||||
ddand021 and 1111111111111111 1111111111111111 -> 1111111111111111
|
||||
ddand024 and 1111111111111111 111111111111111 -> 111111111111111
|
||||
ddand025 and 1111111111111111 11111111111111 -> 11111111111111
|
||||
ddand026 and 1111111111111111 1111111111111 -> 1111111111111
|
||||
ddand027 and 1111111111111111 111111111111 -> 111111111111
|
||||
ddand028 and 1111111111111111 11111111111 -> 11111111111
|
||||
ddand029 and 1111111111111111 1111111111 -> 1111111111
|
||||
ddand030 and 1111111111111111 111111111 -> 111111111
|
||||
ddand031 and 1111111111111111 11111111 -> 11111111
|
||||
ddand032 and 1111111111111111 1111111 -> 1111111
|
||||
ddand033 and 1111111111111111 111111 -> 111111
|
||||
ddand034 and 1111111111111111 11111 -> 11111
|
||||
ddand035 and 1111111111111111 1111 -> 1111
|
||||
ddand036 and 1111111111111111 111 -> 111
|
||||
ddand037 and 1111111111111111 11 -> 11
|
||||
ddand038 and 1111111111111111 1 -> 1
|
||||
ddand039 and 1111111111111111 0 -> 0
|
||||
|
||||
ddand040 and 1111111111111111 1111111111111111 -> 1111111111111111
|
||||
ddand041 and 111111111111111 1111111111111111 -> 111111111111111
|
||||
ddand042 and 111111111111111 1111111111111111 -> 111111111111111
|
||||
ddand043 and 11111111111111 1111111111111111 -> 11111111111111
|
||||
ddand044 and 1111111111111 1111111111111111 -> 1111111111111
|
||||
ddand045 and 111111111111 1111111111111111 -> 111111111111
|
||||
ddand046 and 11111111111 1111111111111111 -> 11111111111
|
||||
ddand047 and 1111111111 1111111111111111 -> 1111111111
|
||||
ddand048 and 111111111 1111111111111111 -> 111111111
|
||||
ddand049 and 11111111 1111111111111111 -> 11111111
|
||||
ddand050 and 1111111 1111111111111111 -> 1111111
|
||||
ddand051 and 111111 1111111111111111 -> 111111
|
||||
ddand052 and 11111 1111111111111111 -> 11111
|
||||
ddand053 and 1111 1111111111111111 -> 1111
|
||||
ddand054 and 111 1111111111111111 -> 111
|
||||
ddand055 and 11 1111111111111111 -> 11
|
||||
ddand056 and 1 1111111111111111 -> 1
|
||||
ddand057 and 0 1111111111111111 -> 0
|
||||
|
||||
ddand150 and 1111111111 1 -> 1
|
||||
ddand151 and 111111111 1 -> 1
|
||||
ddand152 and 11111111 1 -> 1
|
||||
ddand153 and 1111111 1 -> 1
|
||||
ddand154 and 111111 1 -> 1
|
||||
ddand155 and 11111 1 -> 1
|
||||
ddand156 and 1111 1 -> 1
|
||||
ddand157 and 111 1 -> 1
|
||||
ddand158 and 11 1 -> 1
|
||||
ddand159 and 1 1 -> 1
|
||||
|
||||
ddand160 and 1111111111 0 -> 0
|
||||
ddand161 and 111111111 0 -> 0
|
||||
ddand162 and 11111111 0 -> 0
|
||||
ddand163 and 1111111 0 -> 0
|
||||
ddand164 and 111111 0 -> 0
|
||||
ddand165 and 11111 0 -> 0
|
||||
ddand166 and 1111 0 -> 0
|
||||
ddand167 and 111 0 -> 0
|
||||
ddand168 and 11 0 -> 0
|
||||
ddand169 and 1 0 -> 0
|
||||
|
||||
ddand170 and 1 1111111111 -> 1
|
||||
ddand171 and 1 111111111 -> 1
|
||||
ddand172 and 1 11111111 -> 1
|
||||
ddand173 and 1 1111111 -> 1
|
||||
ddand174 and 1 111111 -> 1
|
||||
ddand175 and 1 11111 -> 1
|
||||
ddand176 and 1 1111 -> 1
|
||||
ddand177 and 1 111 -> 1
|
||||
ddand178 and 1 11 -> 1
|
||||
ddand179 and 1 1 -> 1
|
||||
|
||||
ddand180 and 0 1111111111 -> 0
|
||||
ddand181 and 0 111111111 -> 0
|
||||
ddand182 and 0 11111111 -> 0
|
||||
ddand183 and 0 1111111 -> 0
|
||||
ddand184 and 0 111111 -> 0
|
||||
ddand185 and 0 11111 -> 0
|
||||
ddand186 and 0 1111 -> 0
|
||||
ddand187 and 0 111 -> 0
|
||||
ddand188 and 0 11 -> 0
|
||||
ddand189 and 0 1 -> 0
|
||||
|
||||
ddand090 and 011111111 111111111 -> 11111111
|
||||
ddand091 and 101111111 111111111 -> 101111111
|
||||
ddand092 and 110111111 111111111 -> 110111111
|
||||
ddand093 and 111011111 111111111 -> 111011111
|
||||
ddand094 and 111101111 111111111 -> 111101111
|
||||
ddand095 and 111110111 111111111 -> 111110111
|
||||
ddand096 and 111111011 111111111 -> 111111011
|
||||
ddand097 and 111111101 111111111 -> 111111101
|
||||
ddand098 and 111111110 111111111 -> 111111110
|
||||
|
||||
ddand100 and 111111111 011111111 -> 11111111
|
||||
ddand101 and 111111111 101111111 -> 101111111
|
||||
ddand102 and 111111111 110111111 -> 110111111
|
||||
ddand103 and 111111111 111011111 -> 111011111
|
||||
ddand104 and 111111111 111101111 -> 111101111
|
||||
ddand105 and 111111111 111110111 -> 111110111
|
||||
ddand106 and 111111111 111111011 -> 111111011
|
||||
ddand107 and 111111111 111111101 -> 111111101
|
||||
ddand108 and 111111111 111111110 -> 111111110
|
||||
|
||||
-- non-0/1 should not be accepted, nor should signs
|
||||
ddand220 and 111111112 111111111 -> NaN Invalid_operation
|
||||
ddand221 and 333333333 333333333 -> NaN Invalid_operation
|
||||
ddand222 and 555555555 555555555 -> NaN Invalid_operation
|
||||
ddand223 and 777777777 777777777 -> NaN Invalid_operation
|
||||
ddand224 and 999999999 999999999 -> NaN Invalid_operation
|
||||
ddand225 and 222222222 999999999 -> NaN Invalid_operation
|
||||
ddand226 and 444444444 999999999 -> NaN Invalid_operation
|
||||
ddand227 and 666666666 999999999 -> NaN Invalid_operation
|
||||
ddand228 and 888888888 999999999 -> NaN Invalid_operation
|
||||
ddand229 and 999999999 222222222 -> NaN Invalid_operation
|
||||
ddand230 and 999999999 444444444 -> NaN Invalid_operation
|
||||
ddand231 and 999999999 666666666 -> NaN Invalid_operation
|
||||
ddand232 and 999999999 888888888 -> NaN Invalid_operation
|
||||
-- a few randoms
|
||||
ddand240 and 567468689 -934981942 -> NaN Invalid_operation
|
||||
ddand241 and 567367689 934981942 -> NaN Invalid_operation
|
||||
ddand242 and -631917772 -706014634 -> NaN Invalid_operation
|
||||
ddand243 and -756253257 138579234 -> NaN Invalid_operation
|
||||
ddand244 and 835590149 567435400 -> NaN Invalid_operation
|
||||
-- test MSD
|
||||
ddand250 and 2000000000000000 1000000000000000 -> NaN Invalid_operation
|
||||
ddand251 and 7000000000000000 1000000000000000 -> NaN Invalid_operation
|
||||
ddand252 and 8000000000000000 1000000000000000 -> NaN Invalid_operation
|
||||
ddand253 and 9000000000000000 1000000000000000 -> NaN Invalid_operation
|
||||
ddand254 and 2000000000000000 0000000000000000 -> NaN Invalid_operation
|
||||
ddand255 and 7000000000000000 0000000000000000 -> NaN Invalid_operation
|
||||
ddand256 and 8000000000000000 0000000000000000 -> NaN Invalid_operation
|
||||
ddand257 and 9000000000000000 0000000000000000 -> NaN Invalid_operation
|
||||
ddand258 and 1000000000000000 2000000000000000 -> NaN Invalid_operation
|
||||
ddand259 and 1000000000000000 7000000000000000 -> NaN Invalid_operation
|
||||
ddand260 and 1000000000000000 8000000000000000 -> NaN Invalid_operation
|
||||
ddand261 and 1000000000000000 9000000000000000 -> NaN Invalid_operation
|
||||
ddand262 and 0000000000000000 2000000000000000 -> NaN Invalid_operation
|
||||
ddand263 and 0000000000000000 7000000000000000 -> NaN Invalid_operation
|
||||
ddand264 and 0000000000000000 8000000000000000 -> NaN Invalid_operation
|
||||
ddand265 and 0000000000000000 9000000000000000 -> NaN Invalid_operation
|
||||
-- test MSD-1
|
||||
ddand270 and 0200001000000000 1000100000000010 -> NaN Invalid_operation
|
||||
ddand271 and 0700000100000000 1000010000000100 -> NaN Invalid_operation
|
||||
ddand272 and 0800000010000000 1000001000001000 -> NaN Invalid_operation
|
||||
ddand273 and 0900000001000000 1000000100010000 -> NaN Invalid_operation
|
||||
ddand274 and 1000000000100000 0200000010100000 -> NaN Invalid_operation
|
||||
ddand275 and 1000000000010000 0700000001000000 -> NaN Invalid_operation
|
||||
ddand276 and 1000000000001000 0800000010100000 -> NaN Invalid_operation
|
||||
ddand277 and 1000000000000100 0900000000010000 -> NaN Invalid_operation
|
||||
-- test LSD
|
||||
ddand280 and 0010000000000002 1000000100000001 -> NaN Invalid_operation
|
||||
ddand281 and 0001000000000007 1000001000000011 -> NaN Invalid_operation
|
||||
ddand282 and 0000100000000008 1000010000000001 -> NaN Invalid_operation
|
||||
ddand283 and 0000010000000009 1000100000000001 -> NaN Invalid_operation
|
||||
ddand284 and 1000001000000000 0001000000000002 -> NaN Invalid_operation
|
||||
ddand285 and 1000000100000000 0010000000000007 -> NaN Invalid_operation
|
||||
ddand286 and 1000000010000000 0100000000000008 -> NaN Invalid_operation
|
||||
ddand287 and 1000000001000000 1000000000000009 -> NaN Invalid_operation
|
||||
-- test Middie
|
||||
ddand288 and 0010000020000000 1000001000000000 -> NaN Invalid_operation
|
||||
ddand289 and 0001000070000001 1000000100000000 -> NaN Invalid_operation
|
||||
ddand290 and 0000100080000010 1000000010000000 -> NaN Invalid_operation
|
||||
ddand291 and 0000010090000100 1000000001000000 -> NaN Invalid_operation
|
||||
ddand292 and 1000001000001000 0000000020100000 -> NaN Invalid_operation
|
||||
ddand293 and 1000000100010000 0000000070010000 -> NaN Invalid_operation
|
||||
ddand294 and 1000000010100000 0000000080001000 -> NaN Invalid_operation
|
||||
ddand295 and 1000000001000000 0000000090000100 -> NaN Invalid_operation
|
||||
-- signs
|
||||
ddand296 and -1000000001000000 -0000010000000100 -> NaN Invalid_operation
|
||||
ddand297 and -1000000001000000 0000000010000100 -> NaN Invalid_operation
|
||||
ddand298 and 1000000001000000 -0000001000000100 -> NaN Invalid_operation
|
||||
ddand299 and 1000000001000000 0000000011000100 -> 1000000
|
||||
|
||||
-- Nmax, Nmin, Ntiny-like
|
||||
ddand331 and 2 9.99999999E+199 -> NaN Invalid_operation
|
||||
ddand332 and 3 1E-199 -> NaN Invalid_operation
|
||||
ddand333 and 4 1.00000000E-199 -> NaN Invalid_operation
|
||||
ddand334 and 5 1E-100 -> NaN Invalid_operation
|
||||
ddand335 and 6 -1E-100 -> NaN Invalid_operation
|
||||
ddand336 and 7 -1.00000000E-199 -> NaN Invalid_operation
|
||||
ddand337 and 8 -1E-199 -> NaN Invalid_operation
|
||||
ddand338 and 9 -9.99999999E+199 -> NaN Invalid_operation
|
||||
ddand341 and 9.99999999E+199 -18 -> NaN Invalid_operation
|
||||
ddand342 and 1E-199 01 -> NaN Invalid_operation
|
||||
ddand343 and 1.00000000E-199 -18 -> NaN Invalid_operation
|
||||
ddand344 and 1E-100 18 -> NaN Invalid_operation
|
||||
ddand345 and -1E-100 -10 -> NaN Invalid_operation
|
||||
ddand346 and -1.00000000E-199 18 -> NaN Invalid_operation
|
||||
ddand347 and -1E-199 10 -> NaN Invalid_operation
|
||||
ddand348 and -9.99999999E+199 -18 -> NaN Invalid_operation
|
||||
|
||||
-- A few other non-integers
|
||||
ddand361 and 1.0 1 -> NaN Invalid_operation
|
||||
ddand362 and 1E+1 1 -> NaN Invalid_operation
|
||||
ddand363 and 0.0 1 -> NaN Invalid_operation
|
||||
ddand364 and 0E+1 1 -> NaN Invalid_operation
|
||||
ddand365 and 9.9 1 -> NaN Invalid_operation
|
||||
ddand366 and 9E+1 1 -> NaN Invalid_operation
|
||||
ddand371 and 0 1.0 -> NaN Invalid_operation
|
||||
ddand372 and 0 1E+1 -> NaN Invalid_operation
|
||||
ddand373 and 0 0.0 -> NaN Invalid_operation
|
||||
ddand374 and 0 0E+1 -> NaN Invalid_operation
|
||||
ddand375 and 0 9.9 -> NaN Invalid_operation
|
||||
ddand376 and 0 9E+1 -> NaN Invalid_operation
|
||||
|
||||
-- All Specials are in error
|
||||
ddand780 and -Inf -Inf -> NaN Invalid_operation
|
||||
ddand781 and -Inf -1000 -> NaN Invalid_operation
|
||||
ddand782 and -Inf -1 -> NaN Invalid_operation
|
||||
ddand783 and -Inf -0 -> NaN Invalid_operation
|
||||
ddand784 and -Inf 0 -> NaN Invalid_operation
|
||||
ddand785 and -Inf 1 -> NaN Invalid_operation
|
||||
ddand786 and -Inf 1000 -> NaN Invalid_operation
|
||||
ddand787 and -1000 -Inf -> NaN Invalid_operation
|
||||
ddand788 and -Inf -Inf -> NaN Invalid_operation
|
||||
ddand789 and -1 -Inf -> NaN Invalid_operation
|
||||
ddand790 and -0 -Inf -> NaN Invalid_operation
|
||||
ddand791 and 0 -Inf -> NaN Invalid_operation
|
||||
ddand792 and 1 -Inf -> NaN Invalid_operation
|
||||
ddand793 and 1000 -Inf -> NaN Invalid_operation
|
||||
ddand794 and Inf -Inf -> NaN Invalid_operation
|
||||
|
||||
ddand800 and Inf -Inf -> NaN Invalid_operation
|
||||
ddand801 and Inf -1000 -> NaN Invalid_operation
|
||||
ddand802 and Inf -1 -> NaN Invalid_operation
|
||||
ddand803 and Inf -0 -> NaN Invalid_operation
|
||||
ddand804 and Inf 0 -> NaN Invalid_operation
|
||||
ddand805 and Inf 1 -> NaN Invalid_operation
|
||||
ddand806 and Inf 1000 -> NaN Invalid_operation
|
||||
ddand807 and Inf Inf -> NaN Invalid_operation
|
||||
ddand808 and -1000 Inf -> NaN Invalid_operation
|
||||
ddand809 and -Inf Inf -> NaN Invalid_operation
|
||||
ddand810 and -1 Inf -> NaN Invalid_operation
|
||||
ddand811 and -0 Inf -> NaN Invalid_operation
|
||||
ddand812 and 0 Inf -> NaN Invalid_operation
|
||||
ddand813 and 1 Inf -> NaN Invalid_operation
|
||||
ddand814 and 1000 Inf -> NaN Invalid_operation
|
||||
ddand815 and Inf Inf -> NaN Invalid_operation
|
||||
|
||||
ddand821 and NaN -Inf -> NaN Invalid_operation
|
||||
ddand822 and NaN -1000 -> NaN Invalid_operation
|
||||
ddand823 and NaN -1 -> NaN Invalid_operation
|
||||
ddand824 and NaN -0 -> NaN Invalid_operation
|
||||
ddand825 and NaN 0 -> NaN Invalid_operation
|
||||
ddand826 and NaN 1 -> NaN Invalid_operation
|
||||
ddand827 and NaN 1000 -> NaN Invalid_operation
|
||||
ddand828 and NaN Inf -> NaN Invalid_operation
|
||||
ddand829 and NaN NaN -> NaN Invalid_operation
|
||||
ddand830 and -Inf NaN -> NaN Invalid_operation
|
||||
ddand831 and -1000 NaN -> NaN Invalid_operation
|
||||
ddand832 and -1 NaN -> NaN Invalid_operation
|
||||
ddand833 and -0 NaN -> NaN Invalid_operation
|
||||
ddand834 and 0 NaN -> NaN Invalid_operation
|
||||
ddand835 and 1 NaN -> NaN Invalid_operation
|
||||
ddand836 and 1000 NaN -> NaN Invalid_operation
|
||||
ddand837 and Inf NaN -> NaN Invalid_operation
|
||||
|
||||
ddand841 and sNaN -Inf -> NaN Invalid_operation
|
||||
ddand842 and sNaN -1000 -> NaN Invalid_operation
|
||||
ddand843 and sNaN -1 -> NaN Invalid_operation
|
||||
ddand844 and sNaN -0 -> NaN Invalid_operation
|
||||
ddand845 and sNaN 0 -> NaN Invalid_operation
|
||||
ddand846 and sNaN 1 -> NaN Invalid_operation
|
||||
ddand847 and sNaN 1000 -> NaN Invalid_operation
|
||||
ddand848 and sNaN NaN -> NaN Invalid_operation
|
||||
ddand849 and sNaN sNaN -> NaN Invalid_operation
|
||||
ddand850 and NaN sNaN -> NaN Invalid_operation
|
||||
ddand851 and -Inf sNaN -> NaN Invalid_operation
|
||||
ddand852 and -1000 sNaN -> NaN Invalid_operation
|
||||
ddand853 and -1 sNaN -> NaN Invalid_operation
|
||||
ddand854 and -0 sNaN -> NaN Invalid_operation
|
||||
ddand855 and 0 sNaN -> NaN Invalid_operation
|
||||
ddand856 and 1 sNaN -> NaN Invalid_operation
|
||||
ddand857 and 1000 sNaN -> NaN Invalid_operation
|
||||
ddand858 and Inf sNaN -> NaN Invalid_operation
|
||||
ddand859 and NaN sNaN -> NaN Invalid_operation
|
||||
|
||||
-- propagating NaNs
|
||||
ddand861 and NaN1 -Inf -> NaN Invalid_operation
|
||||
ddand862 and +NaN2 -1000 -> NaN Invalid_operation
|
||||
ddand863 and NaN3 1000 -> NaN Invalid_operation
|
||||
ddand864 and NaN4 Inf -> NaN Invalid_operation
|
||||
ddand865 and NaN5 +NaN6 -> NaN Invalid_operation
|
||||
ddand866 and -Inf NaN7 -> NaN Invalid_operation
|
||||
ddand867 and -1000 NaN8 -> NaN Invalid_operation
|
||||
ddand868 and 1000 NaN9 -> NaN Invalid_operation
|
||||
ddand869 and Inf +NaN10 -> NaN Invalid_operation
|
||||
ddand871 and sNaN11 -Inf -> NaN Invalid_operation
|
||||
ddand872 and sNaN12 -1000 -> NaN Invalid_operation
|
||||
ddand873 and sNaN13 1000 -> NaN Invalid_operation
|
||||
ddand874 and sNaN14 NaN17 -> NaN Invalid_operation
|
||||
ddand875 and sNaN15 sNaN18 -> NaN Invalid_operation
|
||||
ddand876 and NaN16 sNaN19 -> NaN Invalid_operation
|
||||
ddand877 and -Inf +sNaN20 -> NaN Invalid_operation
|
||||
ddand878 and -1000 sNaN21 -> NaN Invalid_operation
|
||||
ddand879 and 1000 sNaN22 -> NaN Invalid_operation
|
||||
ddand880 and Inf sNaN23 -> NaN Invalid_operation
|
||||
ddand881 and +NaN25 +sNaN24 -> NaN Invalid_operation
|
||||
ddand882 and -NaN26 NaN28 -> NaN Invalid_operation
|
||||
ddand883 and -sNaN27 sNaN29 -> NaN Invalid_operation
|
||||
ddand884 and 1000 -NaN30 -> NaN Invalid_operation
|
||||
ddand885 and 1000 -sNaN31 -> NaN Invalid_operation
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,357 @@
|
||||
------------------------------------------------------------------------
|
||||
-- ddCanonical.decTest -- test decDouble canonical results --
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
-- This file tests that copy operations leave uncanonical operands
|
||||
-- unchanged, and vice versa
|
||||
-- All operands and results are decDoubles.
|
||||
precision: 16
|
||||
maxExponent: 384
|
||||
minExponent: -383
|
||||
extended: 1
|
||||
clamp: 1
|
||||
rounding: half_even
|
||||
|
||||
-- Uncanonical declets are: abc, where:
|
||||
-- a=1,2,3
|
||||
-- b=6,7,e,f
|
||||
-- c=e,f
|
||||
|
||||
-- assert some standard (canonical) values; this tests that FromString
|
||||
-- produces canonical results (many more in decimalNN)
|
||||
ddcan001 apply 9.999999999999999E+384 -> #77fcff3fcff3fcff
|
||||
ddcan002 apply 0 -> #2238000000000000
|
||||
ddcan003 apply 1 -> #2238000000000001
|
||||
ddcan004 apply -1 -> #a238000000000001
|
||||
ddcan005 apply Infinity -> #7800000000000000
|
||||
ddcan006 apply -Infinity -> #f800000000000000
|
||||
ddcan007 apply -NaN -> #fc00000000000000
|
||||
ddcan008 apply -sNaN -> #fe00000000000000
|
||||
ddcan009 apply NaN999999999999999 -> #7c00ff3fcff3fcff
|
||||
ddcan010 apply sNaN999999999999999 -> #7e00ff3fcff3fcff
|
||||
decan011 apply 9999999999999999 -> #6e38ff3fcff3fcff
|
||||
ddcan012 apply 7.50 -> #22300000000003d0
|
||||
ddcan013 apply 9.99 -> #22300000000000ff
|
||||
|
||||
-- Base tests for canonical encodings (individual operator
|
||||
-- propagation is tested later)
|
||||
|
||||
-- Finites: declets in coefficient
|
||||
ddcan021 canonical #77fcff3fcff3fcff -> #77fcff3fcff3fcff
|
||||
ddcan022 canonical #77fcff3fcff3fcff -> #77fcff3fcff3fcff
|
||||
ddcan023 canonical #77ffff3fcff3fcff -> #77fcff3fcff3fcff
|
||||
ddcan024 canonical #77ffff3fcff3fcff -> #77fcff3fcff3fcff
|
||||
ddcan025 canonical #77fcffffcff3fcff -> #77fcff3fcff3fcff
|
||||
ddcan026 canonical #77fcffffcff3fcff -> #77fcff3fcff3fcff
|
||||
ddcan027 canonical #77fcff3ffff3fcff -> #77fcff3fcff3fcff
|
||||
ddcan028 canonical #77fcff3ffff3fcff -> #77fcff3fcff3fcff
|
||||
ddcan030 canonical #77fcff3fcffffcff -> #77fcff3fcff3fcff
|
||||
ddcan031 canonical #77fcff3fcffffcff -> #77fcff3fcff3fcff
|
||||
ddcan032 canonical #77fcff3fcff3ffff -> #77fcff3fcff3fcff
|
||||
ddcan033 canonical #77fcff3fcff3ffff -> #77fcff3fcff3fcff
|
||||
ddcan035 canonical #77fcff3fdff3fcff -> #77fcff3fcff3fcff
|
||||
ddcan036 canonical #77fcff3feff3fcff -> #77fcff3fcff3fcff
|
||||
|
||||
-- NaN: declets in payload
|
||||
ddcan100 canonical NaN999999999999999 -> #7c00ff3fcff3fcff
|
||||
ddcan101 canonical #7c00ff3fcff3fcff -> #7c00ff3fcff3fcff
|
||||
ddcan102 canonical #7c03ff3fcff3fcff -> #7c00ff3fcff3fcff
|
||||
ddcan103 canonical #7c00ffffcff3fcff -> #7c00ff3fcff3fcff
|
||||
ddcan104 canonical #7c00ff3ffff3fcff -> #7c00ff3fcff3fcff
|
||||
ddcan105 canonical #7c00ff3fcffffcff -> #7c00ff3fcff3fcff
|
||||
ddcan106 canonical #7c00ff3fcff3ffff -> #7c00ff3fcff3fcff
|
||||
ddcan107 canonical #7c00ff3fcff3ffff -> #7c00ff3fcff3fcff
|
||||
-- NaN: exponent continuation bits [excluding sNaN selector]
|
||||
ddcan110 canonical #7c00ff3fcff3fcff -> #7c00ff3fcff3fcff
|
||||
ddcan112 canonical #7d00ff3fcff3fcff -> #7c00ff3fcff3fcff
|
||||
ddcan113 canonical #7c80ff3fcff3fcff -> #7c00ff3fcff3fcff
|
||||
ddcan114 canonical #7c40ff3fcff3fcff -> #7c00ff3fcff3fcff
|
||||
ddcan115 canonical #7c20ff3fcff3fcff -> #7c00ff3fcff3fcff
|
||||
ddcan116 canonical #7c10ff3fcff3fcff -> #7c00ff3fcff3fcff
|
||||
ddcan117 canonical #7c08ff3fcff3fcff -> #7c00ff3fcff3fcff
|
||||
ddcan118 canonical #7c04ff3fcff3fcff -> #7c00ff3fcff3fcff
|
||||
|
||||
-- sNaN: declets in payload
|
||||
ddcan120 canonical sNaN999999999999999 -> #7e00ff3fcff3fcff
|
||||
ddcan121 canonical #7e00ff3fcff3fcff -> #7e00ff3fcff3fcff
|
||||
ddcan122 canonical #7e03ff3fcff3fcff -> #7e00ff3fcff3fcff
|
||||
ddcan123 canonical #7e00ffffcff3fcff -> #7e00ff3fcff3fcff
|
||||
ddcan124 canonical #7e00ff3ffff3fcff -> #7e00ff3fcff3fcff
|
||||
ddcan125 canonical #7e00ff3fcffffcff -> #7e00ff3fcff3fcff
|
||||
ddcan126 canonical #7e00ff3fcff3ffff -> #7e00ff3fcff3fcff
|
||||
ddcan127 canonical #7e00ff3fcff3ffff -> #7e00ff3fcff3fcff
|
||||
-- sNaN: exponent continuation bits [excluding sNaN selector]
|
||||
ddcan130 canonical #7e00ff3fcff3fcff -> #7e00ff3fcff3fcff
|
||||
ddcan132 canonical #7f00ff3fcff3fcff -> #7e00ff3fcff3fcff
|
||||
ddcan133 canonical #7e80ff3fcff3fcff -> #7e00ff3fcff3fcff
|
||||
ddcan134 canonical #7e40ff3fcff3fcff -> #7e00ff3fcff3fcff
|
||||
ddcan135 canonical #7e20ff3fcff3fcff -> #7e00ff3fcff3fcff
|
||||
ddcan136 canonical #7e10ff3fcff3fcff -> #7e00ff3fcff3fcff
|
||||
ddcan137 canonical #7e08ff3fcff3fcff -> #7e00ff3fcff3fcff
|
||||
ddcan138 canonical #7e04ff3fcff3fcff -> #7e00ff3fcff3fcff
|
||||
|
||||
-- Inf: exponent continuation bits
|
||||
ddcan140 canonical #7800000000000000 -> #7800000000000000
|
||||
ddcan141 canonical #7900000000000000 -> #7800000000000000
|
||||
ddcan142 canonical #7a00000000000000 -> #7800000000000000
|
||||
ddcan143 canonical #7880000000000000 -> #7800000000000000
|
||||
ddcan144 canonical #7840000000000000 -> #7800000000000000
|
||||
ddcan145 canonical #7820000000000000 -> #7800000000000000
|
||||
ddcan146 canonical #7810000000000000 -> #7800000000000000
|
||||
ddcan147 canonical #7808000000000000 -> #7800000000000000
|
||||
ddcan148 canonical #7804000000000000 -> #7800000000000000
|
||||
|
||||
-- Inf: coefficient continuation bits (first, last, and a few others)
|
||||
ddcan150 canonical #7800000000000000 -> #7800000000000000
|
||||
ddcan151 canonical #7802000000000000 -> #7800000000000000
|
||||
ddcan152 canonical #7800000000000001 -> #7800000000000000
|
||||
ddcan153 canonical #7801000000000000 -> #7800000000000000
|
||||
ddcan154 canonical #7800200000000000 -> #7800000000000000
|
||||
ddcan155 canonical #7800080000000000 -> #7800000000000000
|
||||
ddcan156 canonical #7800002000000000 -> #7800000000000000
|
||||
ddcan157 canonical #7800000400000000 -> #7800000000000000
|
||||
ddcan158 canonical #7800000040000000 -> #7800000000000000
|
||||
ddcan159 canonical #7800000008000000 -> #7800000000000000
|
||||
ddcan160 canonical #7800000000400000 -> #7800000000000000
|
||||
ddcan161 canonical #7800000000020000 -> #7800000000000000
|
||||
ddcan162 canonical #7800000000008000 -> #7800000000000000
|
||||
ddcan163 canonical #7800000000000200 -> #7800000000000000
|
||||
ddcan164 canonical #7800000000000040 -> #7800000000000000
|
||||
ddcan165 canonical #7800000000000008 -> #7800000000000000
|
||||
|
||||
|
||||
-- Now the operators -- trying to check paths that might fail to
|
||||
-- canonicalize propagated operands
|
||||
|
||||
----- Add:
|
||||
-- Finites: neutral 0
|
||||
ddcan202 add 0E+384 #77ffff3fcff3fcff -> #77fcff3fcff3fcff
|
||||
ddcan203 add #77fcffffcff3fcff 0E+384 -> #77fcff3fcff3fcff
|
||||
-- tiny zero
|
||||
ddcan204 add 0E-398 #77ffff3fcff3fcff -> #77fcff3fcff3fcff Rounded
|
||||
ddcan205 add #77fcffffcff3fcff 0E-398 -> #77fcff3fcff3fcff Rounded
|
||||
-- tiny non zero
|
||||
ddcan206 add -1E-398 #77ffff3fcff3fcff -> #77fcff3fcff3fcff Inexact Rounded
|
||||
ddcan207 add #77ffff3fcff3fcff -1E-398 -> #77fcff3fcff3fcff Inexact Rounded
|
||||
-- NaN: declets in payload
|
||||
ddcan211 add 0 #7c03ff3fcff3fcff -> #7c00ff3fcff3fcff
|
||||
ddcan212 add #7c03ff3fcff3fcff 0 -> #7c00ff3fcff3fcff
|
||||
-- NaN: exponent continuation bits [excluding sNaN selector]
|
||||
ddcan213 add 0 #7c40ff3fcff3fcff -> #7c00ff3fcff3fcff
|
||||
ddcan214 add #7c40ff3fcff3fcff 0 -> #7c00ff3fcff3fcff
|
||||
-- sNaN: declets in payload
|
||||
ddcan215 add 0 #7e00ffffcff3fcff -> #7c00ff3fcff3fcff Invalid_operation
|
||||
ddcan216 add #7e00ffffcff3fcff 0 -> #7c00ff3fcff3fcff Invalid_operation
|
||||
-- sNaN: exponent continuation bits [excluding sNaN selector]
|
||||
ddcan217 add 0 #7e80ff3fcff3fcff -> #7c00ff3fcff3fcff Invalid_operation
|
||||
ddcan218 add #7e80ff3fcff3fcff 0 -> #7c00ff3fcff3fcff Invalid_operation
|
||||
-- Inf: exponent continuation bits
|
||||
ddcan220 add 0 #7880000000000000 -> #7800000000000000
|
||||
ddcan221 add #7880000000000000 0 -> #7800000000000000
|
||||
-- Inf: coefficient continuation bits
|
||||
ddcan222 add 0 #7802000000000000 -> #7800000000000000
|
||||
ddcan223 add #7802000000000000 0 -> #7800000000000000
|
||||
ddcan224 add 0 #7800000000000001 -> #7800000000000000
|
||||
ddcan225 add #7800000000000001 0 -> #7800000000000000
|
||||
ddcan226 add 0 #7800002000000000 -> #7800000000000000
|
||||
ddcan227 add #7800002000000000 0 -> #7800000000000000
|
||||
|
||||
----- Class: [does not return encoded]
|
||||
|
||||
----- Compare:
|
||||
ddcan231 compare -Inf 1 -> #a238000000000001
|
||||
ddcan232 compare -Inf -Inf -> #2238000000000000
|
||||
ddcan233 compare 1 -Inf -> #2238000000000001
|
||||
ddcan234 compare #7c00ff3ffff3fcff -1000 -> #7c00ff3fcff3fcff
|
||||
ddcan235 compare #7e00ff3ffff3fcff -1000 -> #7c00ff3fcff3fcff Invalid_operation
|
||||
|
||||
----- CompareSig:
|
||||
ddcan241 comparesig -Inf 1 -> #a238000000000001
|
||||
ddcan242 comparesig -Inf -Inf -> #2238000000000000
|
||||
ddcan243 comparesig 1 -Inf -> #2238000000000001
|
||||
ddcan244 comparesig #7c00ff3ffff3fcff -1000 -> #7c00ff3fcff3fcff Invalid_operation
|
||||
ddcan245 comparesig #7e00ff3ffff3fcff -1000 -> #7c00ff3fcff3fcff Invalid_operation
|
||||
|
||||
----- Copy: [does not usually canonicalize]
|
||||
-- finites
|
||||
ddcan250 copy #77ffff3fcff3fcff -> #77ffff3fcff3fcff
|
||||
ddcan251 copy #77fcff3fdff3fcff -> #77fcff3fdff3fcff
|
||||
-- NaNs
|
||||
ddcan252 copy #7c03ff3fcff3fcff -> #7c03ff3fcff3fcff
|
||||
ddcan253 copy #7c00ff3fcff3ffff -> #7c00ff3fcff3ffff
|
||||
ddcan254 copy #7d00ff3fcff3fcff -> #7d00ff3fcff3fcff
|
||||
ddcan255 copy #7c04ff3fcff3fcff -> #7c04ff3fcff3fcff
|
||||
-- sNaN
|
||||
ddcan256 copy #7e00ff3fcffffcff -> #7e00ff3fcffffcff
|
||||
ddcan257 copy #7e40ff3fcff3fcff -> #7e40ff3fcff3fcff
|
||||
-- Inf
|
||||
ddcan258 copy #7a00000000000000 -> #7a00000000000000
|
||||
ddcan259 copy #7800200000000000 -> #7800200000000000
|
||||
|
||||
----- CopyAbs: [does not usually canonicalize]
|
||||
-- finites
|
||||
ddcan260 copyabs #f7ffff3fcff3fcff -> #77ffff3fcff3fcff
|
||||
ddcan261 copyabs #f7fcff3fdff3fcff -> #77fcff3fdff3fcff
|
||||
-- NaNs
|
||||
ddcan262 copyabs #fc03ff3fcff3fcff -> #7c03ff3fcff3fcff
|
||||
ddcan263 copyabs #fc00ff3fcff3ffff -> #7c00ff3fcff3ffff
|
||||
ddcan264 copyabs #fd00ff3fcff3fcff -> #7d00ff3fcff3fcff
|
||||
ddcan265 copyabs #fc04ff3fcff3fcff -> #7c04ff3fcff3fcff
|
||||
-- sNaN
|
||||
ddcan266 copyabs #fe00ff3fcffffcff -> #7e00ff3fcffffcff
|
||||
ddcan267 copyabs #fe40ff3fcff3fcff -> #7e40ff3fcff3fcff
|
||||
-- Inf
|
||||
ddcan268 copyabs #fa00000000000000 -> #7a00000000000000
|
||||
ddcan269 copyabs #f800200000000000 -> #7800200000000000
|
||||
|
||||
----- CopyNegate: [does not usually canonicalize]
|
||||
-- finites
|
||||
ddcan270 copynegate #77ffff3fcff3fcff -> #f7ffff3fcff3fcff
|
||||
ddcan271 copynegate #77fcff3fdff3fcff -> #f7fcff3fdff3fcff
|
||||
-- NaNs
|
||||
ddcan272 copynegate #7c03ff3fcff3fcff -> #fc03ff3fcff3fcff
|
||||
ddcan273 copynegate #7c00ff3fcff3ffff -> #fc00ff3fcff3ffff
|
||||
ddcan274 copynegate #7d00ff3fcff3fcff -> #fd00ff3fcff3fcff
|
||||
ddcan275 copynegate #7c04ff3fcff3fcff -> #fc04ff3fcff3fcff
|
||||
-- sNaN
|
||||
ddcan276 copynegate #7e00ff3fcffffcff -> #fe00ff3fcffffcff
|
||||
ddcan277 copynegate #7e40ff3fcff3fcff -> #fe40ff3fcff3fcff
|
||||
-- Inf
|
||||
ddcan278 copynegate #7a00000000000000 -> #fa00000000000000
|
||||
ddcan279 copynegate #7800200000000000 -> #f800200000000000
|
||||
|
||||
----- CopySign: [does not usually canonicalize]
|
||||
-- finites
|
||||
ddcan280 copysign #77ffff3fcff3fcff -1 -> #f7ffff3fcff3fcff
|
||||
ddcan281 copysign #77fcff3fdff3fcff 1 -> #77fcff3fdff3fcff
|
||||
-- NaNs
|
||||
ddcan282 copysign #7c03ff3fcff3fcff -1 -> #fc03ff3fcff3fcff
|
||||
ddcan283 copysign #7c00ff3fcff3ffff 1 -> #7c00ff3fcff3ffff
|
||||
ddcan284 copysign #7d00ff3fcff3fcff -1 -> #fd00ff3fcff3fcff
|
||||
ddcan285 copysign #7c04ff3fcff3fcff 1 -> #7c04ff3fcff3fcff
|
||||
-- sNaN
|
||||
ddcan286 copysign #7e00ff3fcffffcff -1 -> #fe00ff3fcffffcff
|
||||
ddcan287 copysign #7e40ff3fcff3fcff 1 -> #7e40ff3fcff3fcff
|
||||
-- Inf
|
||||
ddcan288 copysign #7a00000000000000 -1 -> #fa00000000000000
|
||||
ddcan289 copysign #7800200000000000 1 -> #7800200000000000
|
||||
|
||||
----- Multiply:
|
||||
-- Finites: neutral 0
|
||||
ddcan302 multiply 1 #77ffff3fcff3fcff -> #77fcff3fcff3fcff
|
||||
ddcan303 multiply #77fcffffcff3fcff 1 -> #77fcff3fcff3fcff
|
||||
-- negative
|
||||
ddcan306 multiply -1 #77ffff3fcff3fcff -> #f7fcff3fcff3fcff
|
||||
ddcan307 multiply #77fcffffcff3fcff -1 -> #f7fcff3fcff3fcff
|
||||
-- NaN: declets in payload
|
||||
ddcan311 multiply 1 #7c03ff3fcff3fcff -> #7c00ff3fcff3fcff
|
||||
ddcan312 multiply #7c03ff3fcff3fcff 1 -> #7c00ff3fcff3fcff
|
||||
-- NaN: exponent continuation bits [excluding sNaN selector]
|
||||
ddcan313 multiply 1 #7c40ff3fcff3fcff -> #7c00ff3fcff3fcff
|
||||
ddcan314 multiply #7c40ff3fcff3fcff 1 -> #7c00ff3fcff3fcff
|
||||
-- sNaN: declets in payload
|
||||
ddcan315 multiply 1 #7e00ffffcff3fcff -> #7c00ff3fcff3fcff Invalid_operation
|
||||
ddcan316 multiply #7e00ffffcff3fcff 1 -> #7c00ff3fcff3fcff Invalid_operation
|
||||
-- sNaN: exponent continuation bits [excluding sNaN selector]
|
||||
ddcan317 multiply 1 #7e80ff3fcff3fcff -> #7c00ff3fcff3fcff Invalid_operation
|
||||
ddcan318 multiply #7e80ff3fcff3fcff 1 -> #7c00ff3fcff3fcff Invalid_operation
|
||||
-- Inf: exponent continuation bits
|
||||
ddcan320 multiply 1 #7880000000000000 -> #7800000000000000
|
||||
ddcan321 multiply #7880000000000000 1 -> #7800000000000000
|
||||
-- Inf: coefficient continuation bits
|
||||
ddcan322 multiply 1 #7802000000000000 -> #7800000000000000
|
||||
ddcan323 multiply #7802000000000000 1 -> #7800000000000000
|
||||
ddcan324 multiply 1 #7800000000000001 -> #7800000000000000
|
||||
ddcan325 multiply #7800000000000001 1 -> #7800000000000000
|
||||
ddcan326 multiply 1 #7800002000000000 -> #7800000000000000
|
||||
ddcan327 multiply #7800002000000000 1 -> #7800000000000000
|
||||
|
||||
----- Quantize:
|
||||
ddcan401 quantize #6e38ff3ffff3fcff 1 -> #6e38ff3fcff3fcff
|
||||
ddcan402 quantize #6e38ff3fcff3fdff 0 -> #6e38ff3fcff3fcff
|
||||
ddcan403 quantize #7880000000000000 Inf -> #7800000000000000
|
||||
ddcan404 quantize #7802000000000000 -Inf -> #7800000000000000
|
||||
ddcan410 quantize #7c03ff3fcff3fcff 1 -> #7c00ff3fcff3fcff
|
||||
ddcan411 quantize #7c03ff3fcff3fcff 1 -> #7c00ff3fcff3fcff
|
||||
ddcan412 quantize #7c40ff3fcff3fcff 1 -> #7c00ff3fcff3fcff
|
||||
ddcan413 quantize #7c40ff3fcff3fcff 1 -> #7c00ff3fcff3fcff
|
||||
ddcan414 quantize #7e00ffffcff3fcff 1 -> #7c00ff3fcff3fcff Invalid_operation
|
||||
ddcan415 quantize #7e00ffffcff3fcff 1 -> #7c00ff3fcff3fcff Invalid_operation
|
||||
ddcan416 quantize #7e80ff3fcff3fcff 1 -> #7c00ff3fcff3fcff Invalid_operation
|
||||
ddcan417 quantize #7e80ff3fcff3fcff 1 -> #7c00ff3fcff3fcff Invalid_operation
|
||||
|
||||
----- Subtract:
|
||||
-- Finites: neutral 0
|
||||
ddcan502 subtract 0E+384 #77ffff3fcff3fcff -> #f7fcff3fcff3fcff
|
||||
ddcan503 subtract #77fcffffcff3fcff 0E+384 -> #77fcff3fcff3fcff
|
||||
-- tiny zero
|
||||
ddcan504 subtract 0E-398 #77ffff3fcff3fcff -> #f7fcff3fcff3fcff Rounded
|
||||
ddcan505 subtract #77fcffffcff3fcff 0E-398 -> #77fcff3fcff3fcff Rounded
|
||||
-- tiny non zero
|
||||
ddcan506 subtract -1E-398 #77ffff3fcff3fcff -> #f7fcff3fcff3fcff Inexact Rounded
|
||||
ddcan507 subtract #77ffff3fcff3fcff -1E-398 -> #77fcff3fcff3fcff Inexact Rounded
|
||||
-- NaN: declets in payload
|
||||
ddcan511 subtract 0 #7c03ff3fcff3fcff -> #7c00ff3fcff3fcff
|
||||
ddcan512 subtract #7c03ff3fcff3fcff 0 -> #7c00ff3fcff3fcff
|
||||
-- NaN: exponent continuation bits [excluding sNaN selector]
|
||||
ddcan513 subtract 0 #7c40ff3fcff3fcff -> #7c00ff3fcff3fcff
|
||||
ddcan514 subtract #7c40ff3fcff3fcff 0 -> #7c00ff3fcff3fcff
|
||||
-- sNaN: declets in payload
|
||||
ddcan515 subtract 0 #7e00ffffcff3fcff -> #7c00ff3fcff3fcff Invalid_operation
|
||||
ddcan516 subtract #7e00ffffcff3fcff 0 -> #7c00ff3fcff3fcff Invalid_operation
|
||||
-- sNaN: exponent continuation bits [excluding sNaN selector]
|
||||
ddcan517 subtract 0 #7e80ff3fcff3fcff -> #7c00ff3fcff3fcff Invalid_operation
|
||||
ddcan518 subtract #7e80ff3fcff3fcff 0 -> #7c00ff3fcff3fcff Invalid_operation
|
||||
-- Inf: exponent continuation bits
|
||||
ddcan520 subtract 0 #7880000000000000 -> #f800000000000000
|
||||
ddcan521 subtract #7880000000000000 0 -> #7800000000000000
|
||||
-- Inf: coefficient continuation bits
|
||||
ddcan522 subtract 0 #7802000000000000 -> #f800000000000000
|
||||
ddcan523 subtract #7802000000000000 0 -> #7800000000000000
|
||||
ddcan524 subtract 0 #7800000000000001 -> #f800000000000000
|
||||
ddcan525 subtract #7800000000000001 0 -> #7800000000000000
|
||||
ddcan526 subtract 0 #7800002000000000 -> #f800000000000000
|
||||
ddcan527 subtract #7800002000000000 0 -> #7800000000000000
|
||||
|
||||
----- ToIntegral:
|
||||
ddcan601 tointegralx #6e38ff3ffff3fcff -> #6e38ff3fcff3fcff
|
||||
ddcan602 tointegralx #6e38ff3fcff3fdff -> #6e38ff3fcff3fcff
|
||||
ddcan603 tointegralx #7880000000000000 -> #7800000000000000
|
||||
ddcan604 tointegralx #7802000000000000 -> #7800000000000000
|
||||
ddcan610 tointegralx #7c03ff3fcff3fcff -> #7c00ff3fcff3fcff
|
||||
ddcan611 tointegralx #7c03ff3fcff3fcff -> #7c00ff3fcff3fcff
|
||||
ddcan612 tointegralx #7c40ff3fcff3fcff -> #7c00ff3fcff3fcff
|
||||
ddcan613 tointegralx #7c40ff3fcff3fcff -> #7c00ff3fcff3fcff
|
||||
ddcan614 tointegralx #7e00ffffcff3fcff -> #7c00ff3fcff3fcff Invalid_operation
|
||||
ddcan615 tointegralx #7e00ffffcff3fcff -> #7c00ff3fcff3fcff Invalid_operation
|
||||
ddcan616 tointegralx #7e80ff3fcff3fcff -> #7c00ff3fcff3fcff Invalid_operation
|
||||
ddcan617 tointegralx #7e80ff3fcff3fcff -> #7c00ff3fcff3fcff Invalid_operation
|
||||
-- uncanonical 3999, 39.99, 3.99, 0.399, and negatives
|
||||
ddcan618 tointegralx #2238000000000fff -> #2238000000000cff
|
||||
ddcan619 tointegralx #2230000000000fff -> #2238000000000040 Inexact Rounded
|
||||
ddcan620 tointegralx #222c000000000fff -> #2238000000000004 Inexact Rounded
|
||||
ddcan621 tointegralx #2228000000000fff -> #2238000000000000 Inexact Rounded
|
||||
ddcan622 tointegralx #a238000000000fff -> #a238000000000cff
|
||||
ddcan623 tointegralx #a230000000000fff -> #a238000000000040 Inexact Rounded
|
||||
ddcan624 tointegralx #a22c000000000fff -> #a238000000000004 Inexact Rounded
|
||||
ddcan625 tointegralx #a228000000000fff -> #a238000000000000 Inexact Rounded
|
||||
|
||||
|
||||
|
@@ -0,0 +1,76 @@
|
||||
------------------------------------------------------------------------
|
||||
-- ddClass.decTest -- decDouble Class operations --
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
-- [New 2006.11.27]
|
||||
precision: 16
|
||||
maxExponent: 384
|
||||
minExponent: -383
|
||||
extended: 1
|
||||
clamp: 1
|
||||
rounding: half_even
|
||||
|
||||
ddcla001 class 0 -> +Zero
|
||||
ddcla002 class 0.00 -> +Zero
|
||||
ddcla003 class 0E+5 -> +Zero
|
||||
ddcla004 class 1E-396 -> +Subnormal
|
||||
ddcla005 class 0.1E-383 -> +Subnormal
|
||||
ddcla006 class 0.999999999999999E-383 -> +Subnormal
|
||||
ddcla007 class 1.000000000000000E-383 -> +Normal
|
||||
ddcla008 class 1E-383 -> +Normal
|
||||
ddcla009 class 1E-100 -> +Normal
|
||||
ddcla010 class 1E-10 -> +Normal
|
||||
ddcla012 class 1E-1 -> +Normal
|
||||
ddcla013 class 1 -> +Normal
|
||||
ddcla014 class 2.50 -> +Normal
|
||||
ddcla015 class 100.100 -> +Normal
|
||||
ddcla016 class 1E+30 -> +Normal
|
||||
ddcla017 class 1E+384 -> +Normal
|
||||
ddcla018 class 9.999999999999999E+384 -> +Normal
|
||||
ddcla019 class Inf -> +Infinity
|
||||
|
||||
ddcla021 class -0 -> -Zero
|
||||
ddcla022 class -0.00 -> -Zero
|
||||
ddcla023 class -0E+5 -> -Zero
|
||||
ddcla024 class -1E-396 -> -Subnormal
|
||||
ddcla025 class -0.1E-383 -> -Subnormal
|
||||
ddcla026 class -0.999999999999999E-383 -> -Subnormal
|
||||
ddcla027 class -1.000000000000000E-383 -> -Normal
|
||||
ddcla028 class -1E-383 -> -Normal
|
||||
ddcla029 class -1E-100 -> -Normal
|
||||
ddcla030 class -1E-10 -> -Normal
|
||||
ddcla032 class -1E-1 -> -Normal
|
||||
ddcla033 class -1 -> -Normal
|
||||
ddcla034 class -2.50 -> -Normal
|
||||
ddcla035 class -100.100 -> -Normal
|
||||
ddcla036 class -1E+30 -> -Normal
|
||||
ddcla037 class -1E+384 -> -Normal
|
||||
ddcla038 class -9.999999999999999E+384 -> -Normal
|
||||
ddcla039 class -Inf -> -Infinity
|
||||
|
||||
ddcla041 class NaN -> NaN
|
||||
ddcla042 class -NaN -> NaN
|
||||
ddcla043 class +NaN12345 -> NaN
|
||||
ddcla044 class sNaN -> sNaN
|
||||
ddcla045 class -sNaN -> sNaN
|
||||
ddcla046 class +sNaN12345 -> sNaN
|
||||
|
||||
|
||||
|
@@ -0,0 +1,744 @@
|
||||
------------------------------------------------------------------------
|
||||
-- ddCompare.decTest -- decDouble comparison that allows quiet NaNs --
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
-- Note that we cannot assume add/subtract tests cover paths adequately,
|
||||
-- here, because the code might be quite different (comparison cannot
|
||||
-- overflow or underflow, so actual subtractions are not necessary).
|
||||
|
||||
-- All operands and results are decDoubles.
|
||||
precision: 16
|
||||
maxExponent: 384
|
||||
minExponent: -383
|
||||
extended: 1
|
||||
clamp: 1
|
||||
rounding: half_even
|
||||
|
||||
-- sanity checks
|
||||
ddcom001 compare -2 -2 -> 0
|
||||
ddcom002 compare -2 -1 -> -1
|
||||
ddcom003 compare -2 0 -> -1
|
||||
ddcom004 compare -2 1 -> -1
|
||||
ddcom005 compare -2 2 -> -1
|
||||
ddcom006 compare -1 -2 -> 1
|
||||
ddcom007 compare -1 -1 -> 0
|
||||
ddcom008 compare -1 0 -> -1
|
||||
ddcom009 compare -1 1 -> -1
|
||||
ddcom010 compare -1 2 -> -1
|
||||
ddcom011 compare 0 -2 -> 1
|
||||
ddcom012 compare 0 -1 -> 1
|
||||
ddcom013 compare 0 0 -> 0
|
||||
ddcom014 compare 0 1 -> -1
|
||||
ddcom015 compare 0 2 -> -1
|
||||
ddcom016 compare 1 -2 -> 1
|
||||
ddcom017 compare 1 -1 -> 1
|
||||
ddcom018 compare 1 0 -> 1
|
||||
ddcom019 compare 1 1 -> 0
|
||||
ddcom020 compare 1 2 -> -1
|
||||
ddcom021 compare 2 -2 -> 1
|
||||
ddcom022 compare 2 -1 -> 1
|
||||
ddcom023 compare 2 0 -> 1
|
||||
ddcom025 compare 2 1 -> 1
|
||||
ddcom026 compare 2 2 -> 0
|
||||
|
||||
ddcom031 compare -20 -20 -> 0
|
||||
ddcom032 compare -20 -10 -> -1
|
||||
ddcom033 compare -20 00 -> -1
|
||||
ddcom034 compare -20 10 -> -1
|
||||
ddcom035 compare -20 20 -> -1
|
||||
ddcom036 compare -10 -20 -> 1
|
||||
ddcom037 compare -10 -10 -> 0
|
||||
ddcom038 compare -10 00 -> -1
|
||||
ddcom039 compare -10 10 -> -1
|
||||
ddcom040 compare -10 20 -> -1
|
||||
ddcom041 compare 00 -20 -> 1
|
||||
ddcom042 compare 00 -10 -> 1
|
||||
ddcom043 compare 00 00 -> 0
|
||||
ddcom044 compare 00 10 -> -1
|
||||
ddcom045 compare 00 20 -> -1
|
||||
ddcom046 compare 10 -20 -> 1
|
||||
ddcom047 compare 10 -10 -> 1
|
||||
ddcom048 compare 10 00 -> 1
|
||||
ddcom049 compare 10 10 -> 0
|
||||
ddcom050 compare 10 20 -> -1
|
||||
ddcom051 compare 20 -20 -> 1
|
||||
ddcom052 compare 20 -10 -> 1
|
||||
ddcom053 compare 20 00 -> 1
|
||||
ddcom055 compare 20 10 -> 1
|
||||
ddcom056 compare 20 20 -> 0
|
||||
|
||||
ddcom061 compare -2.0 -2.0 -> 0
|
||||
ddcom062 compare -2.0 -1.0 -> -1
|
||||
ddcom063 compare -2.0 0.0 -> -1
|
||||
ddcom064 compare -2.0 1.0 -> -1
|
||||
ddcom065 compare -2.0 2.0 -> -1
|
||||
ddcom066 compare -1.0 -2.0 -> 1
|
||||
ddcom067 compare -1.0 -1.0 -> 0
|
||||
ddcom068 compare -1.0 0.0 -> -1
|
||||
ddcom069 compare -1.0 1.0 -> -1
|
||||
ddcom070 compare -1.0 2.0 -> -1
|
||||
ddcom071 compare 0.0 -2.0 -> 1
|
||||
ddcom072 compare 0.0 -1.0 -> 1
|
||||
ddcom073 compare 0.0 0.0 -> 0
|
||||
ddcom074 compare 0.0 1.0 -> -1
|
||||
ddcom075 compare 0.0 2.0 -> -1
|
||||
ddcom076 compare 1.0 -2.0 -> 1
|
||||
ddcom077 compare 1.0 -1.0 -> 1
|
||||
ddcom078 compare 1.0 0.0 -> 1
|
||||
ddcom079 compare 1.0 1.0 -> 0
|
||||
ddcom080 compare 1.0 2.0 -> -1
|
||||
ddcom081 compare 2.0 -2.0 -> 1
|
||||
ddcom082 compare 2.0 -1.0 -> 1
|
||||
ddcom083 compare 2.0 0.0 -> 1
|
||||
ddcom085 compare 2.0 1.0 -> 1
|
||||
ddcom086 compare 2.0 2.0 -> 0
|
||||
ddcom087 compare 1.0 0.1 -> 1
|
||||
ddcom088 compare 0.1 1.0 -> -1
|
||||
|
||||
-- now some cases which might overflow if subtract were used
|
||||
ddcom095 compare 9.999999999999999E+384 9.999999999999999E+384 -> 0
|
||||
ddcom096 compare -9.999999999999999E+384 9.999999999999999E+384 -> -1
|
||||
ddcom097 compare 9.999999999999999E+384 -9.999999999999999E+384 -> 1
|
||||
ddcom098 compare -9.999999999999999E+384 -9.999999999999999E+384 -> 0
|
||||
|
||||
-- some differing length/exponent cases
|
||||
ddcom100 compare 7.0 7.0 -> 0
|
||||
ddcom101 compare 7.0 7 -> 0
|
||||
ddcom102 compare 7 7.0 -> 0
|
||||
ddcom103 compare 7E+0 7.0 -> 0
|
||||
ddcom104 compare 70E-1 7.0 -> 0
|
||||
ddcom105 compare 0.7E+1 7 -> 0
|
||||
ddcom106 compare 70E-1 7 -> 0
|
||||
ddcom107 compare 7.0 7E+0 -> 0
|
||||
ddcom108 compare 7.0 70E-1 -> 0
|
||||
ddcom109 compare 7 0.7E+1 -> 0
|
||||
ddcom110 compare 7 70E-1 -> 0
|
||||
|
||||
ddcom120 compare 8.0 7.0 -> 1
|
||||
ddcom121 compare 8.0 7 -> 1
|
||||
ddcom122 compare 8 7.0 -> 1
|
||||
ddcom123 compare 8E+0 7.0 -> 1
|
||||
ddcom124 compare 80E-1 7.0 -> 1
|
||||
ddcom125 compare 0.8E+1 7 -> 1
|
||||
ddcom126 compare 80E-1 7 -> 1
|
||||
ddcom127 compare 8.0 7E+0 -> 1
|
||||
ddcom128 compare 8.0 70E-1 -> 1
|
||||
ddcom129 compare 8 0.7E+1 -> 1
|
||||
ddcom130 compare 8 70E-1 -> 1
|
||||
|
||||
ddcom140 compare 8.0 9.0 -> -1
|
||||
ddcom141 compare 8.0 9 -> -1
|
||||
ddcom142 compare 8 9.0 -> -1
|
||||
ddcom143 compare 8E+0 9.0 -> -1
|
||||
ddcom144 compare 80E-1 9.0 -> -1
|
||||
ddcom145 compare 0.8E+1 9 -> -1
|
||||
ddcom146 compare 80E-1 9 -> -1
|
||||
ddcom147 compare 8.0 9E+0 -> -1
|
||||
ddcom148 compare 8.0 90E-1 -> -1
|
||||
ddcom149 compare 8 0.9E+1 -> -1
|
||||
ddcom150 compare 8 90E-1 -> -1
|
||||
|
||||
-- and again, with sign changes -+ ..
|
||||
ddcom200 compare -7.0 7.0 -> -1
|
||||
ddcom201 compare -7.0 7 -> -1
|
||||
ddcom202 compare -7 7.0 -> -1
|
||||
ddcom203 compare -7E+0 7.0 -> -1
|
||||
ddcom204 compare -70E-1 7.0 -> -1
|
||||
ddcom205 compare -0.7E+1 7 -> -1
|
||||
ddcom206 compare -70E-1 7 -> -1
|
||||
ddcom207 compare -7.0 7E+0 -> -1
|
||||
ddcom208 compare -7.0 70E-1 -> -1
|
||||
ddcom209 compare -7 0.7E+1 -> -1
|
||||
ddcom210 compare -7 70E-1 -> -1
|
||||
|
||||
ddcom220 compare -8.0 7.0 -> -1
|
||||
ddcom221 compare -8.0 7 -> -1
|
||||
ddcom222 compare -8 7.0 -> -1
|
||||
ddcom223 compare -8E+0 7.0 -> -1
|
||||
ddcom224 compare -80E-1 7.0 -> -1
|
||||
ddcom225 compare -0.8E+1 7 -> -1
|
||||
ddcom226 compare -80E-1 7 -> -1
|
||||
ddcom227 compare -8.0 7E+0 -> -1
|
||||
ddcom228 compare -8.0 70E-1 -> -1
|
||||
ddcom229 compare -8 0.7E+1 -> -1
|
||||
ddcom230 compare -8 70E-1 -> -1
|
||||
|
||||
ddcom240 compare -8.0 9.0 -> -1
|
||||
ddcom241 compare -8.0 9 -> -1
|
||||
ddcom242 compare -8 9.0 -> -1
|
||||
ddcom243 compare -8E+0 9.0 -> -1
|
||||
ddcom244 compare -80E-1 9.0 -> -1
|
||||
ddcom245 compare -0.8E+1 9 -> -1
|
||||
ddcom246 compare -80E-1 9 -> -1
|
||||
ddcom247 compare -8.0 9E+0 -> -1
|
||||
ddcom248 compare -8.0 90E-1 -> -1
|
||||
ddcom249 compare -8 0.9E+1 -> -1
|
||||
ddcom250 compare -8 90E-1 -> -1
|
||||
|
||||
-- and again, with sign changes +- ..
|
||||
ddcom300 compare 7.0 -7.0 -> 1
|
||||
ddcom301 compare 7.0 -7 -> 1
|
||||
ddcom302 compare 7 -7.0 -> 1
|
||||
ddcom303 compare 7E+0 -7.0 -> 1
|
||||
ddcom304 compare 70E-1 -7.0 -> 1
|
||||
ddcom305 compare .7E+1 -7 -> 1
|
||||
ddcom306 compare 70E-1 -7 -> 1
|
||||
ddcom307 compare 7.0 -7E+0 -> 1
|
||||
ddcom308 compare 7.0 -70E-1 -> 1
|
||||
ddcom309 compare 7 -.7E+1 -> 1
|
||||
ddcom310 compare 7 -70E-1 -> 1
|
||||
|
||||
ddcom320 compare 8.0 -7.0 -> 1
|
||||
ddcom321 compare 8.0 -7 -> 1
|
||||
ddcom322 compare 8 -7.0 -> 1
|
||||
ddcom323 compare 8E+0 -7.0 -> 1
|
||||
ddcom324 compare 80E-1 -7.0 -> 1
|
||||
ddcom325 compare .8E+1 -7 -> 1
|
||||
ddcom326 compare 80E-1 -7 -> 1
|
||||
ddcom327 compare 8.0 -7E+0 -> 1
|
||||
ddcom328 compare 8.0 -70E-1 -> 1
|
||||
ddcom329 compare 8 -.7E+1 -> 1
|
||||
ddcom330 compare 8 -70E-1 -> 1
|
||||
|
||||
ddcom340 compare 8.0 -9.0 -> 1
|
||||
ddcom341 compare 8.0 -9 -> 1
|
||||
ddcom342 compare 8 -9.0 -> 1
|
||||
ddcom343 compare 8E+0 -9.0 -> 1
|
||||
ddcom344 compare 80E-1 -9.0 -> 1
|
||||
ddcom345 compare .8E+1 -9 -> 1
|
||||
ddcom346 compare 80E-1 -9 -> 1
|
||||
ddcom347 compare 8.0 -9E+0 -> 1
|
||||
ddcom348 compare 8.0 -90E-1 -> 1
|
||||
ddcom349 compare 8 -.9E+1 -> 1
|
||||
ddcom350 compare 8 -90E-1 -> 1
|
||||
|
||||
-- and again, with sign changes -- ..
|
||||
ddcom400 compare -7.0 -7.0 -> 0
|
||||
ddcom401 compare -7.0 -7 -> 0
|
||||
ddcom402 compare -7 -7.0 -> 0
|
||||
ddcom403 compare -7E+0 -7.0 -> 0
|
||||
ddcom404 compare -70E-1 -7.0 -> 0
|
||||
ddcom405 compare -.7E+1 -7 -> 0
|
||||
ddcom406 compare -70E-1 -7 -> 0
|
||||
ddcom407 compare -7.0 -7E+0 -> 0
|
||||
ddcom408 compare -7.0 -70E-1 -> 0
|
||||
ddcom409 compare -7 -.7E+1 -> 0
|
||||
ddcom410 compare -7 -70E-1 -> 0
|
||||
|
||||
ddcom420 compare -8.0 -7.0 -> -1
|
||||
ddcom421 compare -8.0 -7 -> -1
|
||||
ddcom422 compare -8 -7.0 -> -1
|
||||
ddcom423 compare -8E+0 -7.0 -> -1
|
||||
ddcom424 compare -80E-1 -7.0 -> -1
|
||||
ddcom425 compare -.8E+1 -7 -> -1
|
||||
ddcom426 compare -80E-1 -7 -> -1
|
||||
ddcom427 compare -8.0 -7E+0 -> -1
|
||||
ddcom428 compare -8.0 -70E-1 -> -1
|
||||
ddcom429 compare -8 -.7E+1 -> -1
|
||||
ddcom430 compare -8 -70E-1 -> -1
|
||||
|
||||
ddcom440 compare -8.0 -9.0 -> 1
|
||||
ddcom441 compare -8.0 -9 -> 1
|
||||
ddcom442 compare -8 -9.0 -> 1
|
||||
ddcom443 compare -8E+0 -9.0 -> 1
|
||||
ddcom444 compare -80E-1 -9.0 -> 1
|
||||
ddcom445 compare -.8E+1 -9 -> 1
|
||||
ddcom446 compare -80E-1 -9 -> 1
|
||||
ddcom447 compare -8.0 -9E+0 -> 1
|
||||
ddcom448 compare -8.0 -90E-1 -> 1
|
||||
ddcom449 compare -8 -.9E+1 -> 1
|
||||
ddcom450 compare -8 -90E-1 -> 1
|
||||
|
||||
-- misalignment traps for little-endian
|
||||
ddcom451 compare 1.0 0.1 -> 1
|
||||
ddcom452 compare 0.1 1.0 -> -1
|
||||
ddcom453 compare 10.0 0.1 -> 1
|
||||
ddcom454 compare 0.1 10.0 -> -1
|
||||
ddcom455 compare 100 1.0 -> 1
|
||||
ddcom456 compare 1.0 100 -> -1
|
||||
ddcom457 compare 1000 10.0 -> 1
|
||||
ddcom458 compare 10.0 1000 -> -1
|
||||
ddcom459 compare 10000 100.0 -> 1
|
||||
ddcom460 compare 100.0 10000 -> -1
|
||||
ddcom461 compare 100000 1000.0 -> 1
|
||||
ddcom462 compare 1000.0 100000 -> -1
|
||||
ddcom463 compare 1000000 10000.0 -> 1
|
||||
ddcom464 compare 10000.0 1000000 -> -1
|
||||
|
||||
-- testcases that subtract to lots of zeros at boundaries [pgr]
|
||||
ddcom473 compare 123.4560000000000E-89 123.456E-89 -> 0
|
||||
ddcom474 compare 123.456000000000E+89 123.456E+89 -> 0
|
||||
ddcom475 compare 123.45600000000E-89 123.456E-89 -> 0
|
||||
ddcom476 compare 123.4560000000E+89 123.456E+89 -> 0
|
||||
ddcom477 compare 123.456000000E-89 123.456E-89 -> 0
|
||||
ddcom478 compare 123.45600000E+89 123.456E+89 -> 0
|
||||
ddcom479 compare 123.4560000E-89 123.456E-89 -> 0
|
||||
ddcom480 compare 123.456000E+89 123.456E+89 -> 0
|
||||
ddcom481 compare 123.45600E-89 123.456E-89 -> 0
|
||||
ddcom482 compare 123.4560E+89 123.456E+89 -> 0
|
||||
ddcom483 compare 123.456E-89 123.456E-89 -> 0
|
||||
ddcom487 compare 123.456E+89 123.4560000000000E+89 -> 0
|
||||
ddcom488 compare 123.456E-89 123.456000000000E-89 -> 0
|
||||
ddcom489 compare 123.456E+89 123.45600000000E+89 -> 0
|
||||
ddcom490 compare 123.456E-89 123.4560000000E-89 -> 0
|
||||
ddcom491 compare 123.456E+89 123.456000000E+89 -> 0
|
||||
ddcom492 compare 123.456E-89 123.45600000E-89 -> 0
|
||||
ddcom493 compare 123.456E+89 123.4560000E+89 -> 0
|
||||
ddcom494 compare 123.456E-89 123.456000E-89 -> 0
|
||||
ddcom495 compare 123.456E+89 123.45600E+89 -> 0
|
||||
ddcom496 compare 123.456E-89 123.4560E-89 -> 0
|
||||
ddcom497 compare 123.456E+89 123.456E+89 -> 0
|
||||
|
||||
-- wide-ranging, around precision; signs equal
|
||||
ddcom500 compare 1 1E-15 -> 1
|
||||
ddcom501 compare 1 1E-14 -> 1
|
||||
ddcom502 compare 1 1E-13 -> 1
|
||||
ddcom503 compare 1 1E-12 -> 1
|
||||
ddcom504 compare 1 1E-11 -> 1
|
||||
ddcom505 compare 1 1E-10 -> 1
|
||||
ddcom506 compare 1 1E-9 -> 1
|
||||
ddcom507 compare 1 1E-8 -> 1
|
||||
ddcom508 compare 1 1E-7 -> 1
|
||||
ddcom509 compare 1 1E-6 -> 1
|
||||
ddcom510 compare 1 1E-5 -> 1
|
||||
ddcom511 compare 1 1E-4 -> 1
|
||||
ddcom512 compare 1 1E-3 -> 1
|
||||
ddcom513 compare 1 1E-2 -> 1
|
||||
ddcom514 compare 1 1E-1 -> 1
|
||||
ddcom515 compare 1 1E-0 -> 0
|
||||
ddcom516 compare 1 1E+1 -> -1
|
||||
ddcom517 compare 1 1E+2 -> -1
|
||||
ddcom518 compare 1 1E+3 -> -1
|
||||
ddcom519 compare 1 1E+4 -> -1
|
||||
ddcom521 compare 1 1E+5 -> -1
|
||||
ddcom522 compare 1 1E+6 -> -1
|
||||
ddcom523 compare 1 1E+7 -> -1
|
||||
ddcom524 compare 1 1E+8 -> -1
|
||||
ddcom525 compare 1 1E+9 -> -1
|
||||
ddcom526 compare 1 1E+10 -> -1
|
||||
ddcom527 compare 1 1E+11 -> -1
|
||||
ddcom528 compare 1 1E+12 -> -1
|
||||
ddcom529 compare 1 1E+13 -> -1
|
||||
ddcom530 compare 1 1E+14 -> -1
|
||||
ddcom531 compare 1 1E+15 -> -1
|
||||
-- LR swap
|
||||
ddcom540 compare 1E-15 1 -> -1
|
||||
ddcom541 compare 1E-14 1 -> -1
|
||||
ddcom542 compare 1E-13 1 -> -1
|
||||
ddcom543 compare 1E-12 1 -> -1
|
||||
ddcom544 compare 1E-11 1 -> -1
|
||||
ddcom545 compare 1E-10 1 -> -1
|
||||
ddcom546 compare 1E-9 1 -> -1
|
||||
ddcom547 compare 1E-8 1 -> -1
|
||||
ddcom548 compare 1E-7 1 -> -1
|
||||
ddcom549 compare 1E-6 1 -> -1
|
||||
ddcom550 compare 1E-5 1 -> -1
|
||||
ddcom551 compare 1E-4 1 -> -1
|
||||
ddcom552 compare 1E-3 1 -> -1
|
||||
ddcom553 compare 1E-2 1 -> -1
|
||||
ddcom554 compare 1E-1 1 -> -1
|
||||
ddcom555 compare 1E-0 1 -> 0
|
||||
ddcom556 compare 1E+1 1 -> 1
|
||||
ddcom557 compare 1E+2 1 -> 1
|
||||
ddcom558 compare 1E+3 1 -> 1
|
||||
ddcom559 compare 1E+4 1 -> 1
|
||||
ddcom561 compare 1E+5 1 -> 1
|
||||
ddcom562 compare 1E+6 1 -> 1
|
||||
ddcom563 compare 1E+7 1 -> 1
|
||||
ddcom564 compare 1E+8 1 -> 1
|
||||
ddcom565 compare 1E+9 1 -> 1
|
||||
ddcom566 compare 1E+10 1 -> 1
|
||||
ddcom567 compare 1E+11 1 -> 1
|
||||
ddcom568 compare 1E+12 1 -> 1
|
||||
ddcom569 compare 1E+13 1 -> 1
|
||||
ddcom570 compare 1E+14 1 -> 1
|
||||
ddcom571 compare 1E+15 1 -> 1
|
||||
-- similar with a useful coefficient, one side only
|
||||
ddcom580 compare 0.000000987654321 1E-15 -> 1
|
||||
ddcom581 compare 0.000000987654321 1E-14 -> 1
|
||||
ddcom582 compare 0.000000987654321 1E-13 -> 1
|
||||
ddcom583 compare 0.000000987654321 1E-12 -> 1
|
||||
ddcom584 compare 0.000000987654321 1E-11 -> 1
|
||||
ddcom585 compare 0.000000987654321 1E-10 -> 1
|
||||
ddcom586 compare 0.000000987654321 1E-9 -> 1
|
||||
ddcom587 compare 0.000000987654321 1E-8 -> 1
|
||||
ddcom588 compare 0.000000987654321 1E-7 -> 1
|
||||
ddcom589 compare 0.000000987654321 1E-6 -> -1
|
||||
ddcom590 compare 0.000000987654321 1E-5 -> -1
|
||||
ddcom591 compare 0.000000987654321 1E-4 -> -1
|
||||
ddcom592 compare 0.000000987654321 1E-3 -> -1
|
||||
ddcom593 compare 0.000000987654321 1E-2 -> -1
|
||||
ddcom594 compare 0.000000987654321 1E-1 -> -1
|
||||
ddcom595 compare 0.000000987654321 1E-0 -> -1
|
||||
ddcom596 compare 0.000000987654321 1E+1 -> -1
|
||||
ddcom597 compare 0.000000987654321 1E+2 -> -1
|
||||
ddcom598 compare 0.000000987654321 1E+3 -> -1
|
||||
ddcom599 compare 0.000000987654321 1E+4 -> -1
|
||||
|
||||
-- check some unit-y traps
|
||||
ddcom600 compare 12 12.2345 -> -1
|
||||
ddcom601 compare 12.0 12.2345 -> -1
|
||||
ddcom602 compare 12.00 12.2345 -> -1
|
||||
ddcom603 compare 12.000 12.2345 -> -1
|
||||
ddcom604 compare 12.0000 12.2345 -> -1
|
||||
ddcom605 compare 12.00000 12.2345 -> -1
|
||||
ddcom606 compare 12.000000 12.2345 -> -1
|
||||
ddcom607 compare 12.0000000 12.2345 -> -1
|
||||
ddcom608 compare 12.00000000 12.2345 -> -1
|
||||
ddcom609 compare 12.000000000 12.2345 -> -1
|
||||
ddcom610 compare 12.1234 12 -> 1
|
||||
ddcom611 compare 12.1234 12.0 -> 1
|
||||
ddcom612 compare 12.1234 12.00 -> 1
|
||||
ddcom613 compare 12.1234 12.000 -> 1
|
||||
ddcom614 compare 12.1234 12.0000 -> 1
|
||||
ddcom615 compare 12.1234 12.00000 -> 1
|
||||
ddcom616 compare 12.1234 12.000000 -> 1
|
||||
ddcom617 compare 12.1234 12.0000000 -> 1
|
||||
ddcom618 compare 12.1234 12.00000000 -> 1
|
||||
ddcom619 compare 12.1234 12.000000000 -> 1
|
||||
ddcom620 compare -12 -12.2345 -> 1
|
||||
ddcom621 compare -12.0 -12.2345 -> 1
|
||||
ddcom622 compare -12.00 -12.2345 -> 1
|
||||
ddcom623 compare -12.000 -12.2345 -> 1
|
||||
ddcom624 compare -12.0000 -12.2345 -> 1
|
||||
ddcom625 compare -12.00000 -12.2345 -> 1
|
||||
ddcom626 compare -12.000000 -12.2345 -> 1
|
||||
ddcom627 compare -12.0000000 -12.2345 -> 1
|
||||
ddcom628 compare -12.00000000 -12.2345 -> 1
|
||||
ddcom629 compare -12.000000000 -12.2345 -> 1
|
||||
ddcom630 compare -12.1234 -12 -> -1
|
||||
ddcom631 compare -12.1234 -12.0 -> -1
|
||||
ddcom632 compare -12.1234 -12.00 -> -1
|
||||
ddcom633 compare -12.1234 -12.000 -> -1
|
||||
ddcom634 compare -12.1234 -12.0000 -> -1
|
||||
ddcom635 compare -12.1234 -12.00000 -> -1
|
||||
ddcom636 compare -12.1234 -12.000000 -> -1
|
||||
ddcom637 compare -12.1234 -12.0000000 -> -1
|
||||
ddcom638 compare -12.1234 -12.00000000 -> -1
|
||||
ddcom639 compare -12.1234 -12.000000000 -> -1
|
||||
|
||||
-- extended zeros
|
||||
ddcom640 compare 0 0 -> 0
|
||||
ddcom641 compare 0 -0 -> 0
|
||||
ddcom642 compare 0 -0.0 -> 0
|
||||
ddcom643 compare 0 0.0 -> 0
|
||||
ddcom644 compare -0 0 -> 0
|
||||
ddcom645 compare -0 -0 -> 0
|
||||
ddcom646 compare -0 -0.0 -> 0
|
||||
ddcom647 compare -0 0.0 -> 0
|
||||
ddcom648 compare 0.0 0 -> 0
|
||||
ddcom649 compare 0.0 -0 -> 0
|
||||
ddcom650 compare 0.0 -0.0 -> 0
|
||||
ddcom651 compare 0.0 0.0 -> 0
|
||||
ddcom652 compare -0.0 0 -> 0
|
||||
ddcom653 compare -0.0 -0 -> 0
|
||||
ddcom654 compare -0.0 -0.0 -> 0
|
||||
ddcom655 compare -0.0 0.0 -> 0
|
||||
|
||||
ddcom656 compare -0E1 0.0 -> 0
|
||||
ddcom657 compare -0E2 0.0 -> 0
|
||||
ddcom658 compare 0E1 0.0 -> 0
|
||||
ddcom659 compare 0E2 0.0 -> 0
|
||||
ddcom660 compare -0E1 0 -> 0
|
||||
ddcom661 compare -0E2 0 -> 0
|
||||
ddcom662 compare 0E1 0 -> 0
|
||||
ddcom663 compare 0E2 0 -> 0
|
||||
ddcom664 compare -0E1 -0E1 -> 0
|
||||
ddcom665 compare -0E2 -0E1 -> 0
|
||||
ddcom666 compare 0E1 -0E1 -> 0
|
||||
ddcom667 compare 0E2 -0E1 -> 0
|
||||
ddcom668 compare -0E1 -0E2 -> 0
|
||||
ddcom669 compare -0E2 -0E2 -> 0
|
||||
ddcom670 compare 0E1 -0E2 -> 0
|
||||
ddcom671 compare 0E2 -0E2 -> 0
|
||||
ddcom672 compare -0E1 0E1 -> 0
|
||||
ddcom673 compare -0E2 0E1 -> 0
|
||||
ddcom674 compare 0E1 0E1 -> 0
|
||||
ddcom675 compare 0E2 0E1 -> 0
|
||||
ddcom676 compare -0E1 0E2 -> 0
|
||||
ddcom677 compare -0E2 0E2 -> 0
|
||||
ddcom678 compare 0E1 0E2 -> 0
|
||||
ddcom679 compare 0E2 0E2 -> 0
|
||||
|
||||
-- trailing zeros; unit-y
|
||||
ddcom680 compare 12 12 -> 0
|
||||
ddcom681 compare 12 12.0 -> 0
|
||||
ddcom682 compare 12 12.00 -> 0
|
||||
ddcom683 compare 12 12.000 -> 0
|
||||
ddcom684 compare 12 12.0000 -> 0
|
||||
ddcom685 compare 12 12.00000 -> 0
|
||||
ddcom686 compare 12 12.000000 -> 0
|
||||
ddcom687 compare 12 12.0000000 -> 0
|
||||
ddcom688 compare 12 12.00000000 -> 0
|
||||
ddcom689 compare 12 12.000000000 -> 0
|
||||
ddcom690 compare 12 12 -> 0
|
||||
ddcom691 compare 12.0 12 -> 0
|
||||
ddcom692 compare 12.00 12 -> 0
|
||||
ddcom693 compare 12.000 12 -> 0
|
||||
ddcom694 compare 12.0000 12 -> 0
|
||||
ddcom695 compare 12.00000 12 -> 0
|
||||
ddcom696 compare 12.000000 12 -> 0
|
||||
ddcom697 compare 12.0000000 12 -> 0
|
||||
ddcom698 compare 12.00000000 12 -> 0
|
||||
ddcom699 compare 12.000000000 12 -> 0
|
||||
|
||||
-- first, second, & last digit
|
||||
ddcom700 compare 1234567890123456 1234567890123455 -> 1
|
||||
ddcom701 compare 1234567890123456 1234567890123456 -> 0
|
||||
ddcom702 compare 1234567890123456 1234567890123457 -> -1
|
||||
ddcom703 compare 1234567890123456 0234567890123456 -> 1
|
||||
ddcom704 compare 1234567890123456 1234567890123456 -> 0
|
||||
ddcom705 compare 1234567890123456 2234567890123456 -> -1
|
||||
ddcom706 compare 1134567890123456 1034567890123456 -> 1
|
||||
ddcom707 compare 1134567890123456 1134567890123456 -> 0
|
||||
ddcom708 compare 1134567890123456 1234567890123456 -> -1
|
||||
|
||||
-- miscellaneous
|
||||
ddcom721 compare 12345678000 1 -> 1
|
||||
ddcom722 compare 1 12345678000 -> -1
|
||||
ddcom723 compare 1234567800 1 -> 1
|
||||
ddcom724 compare 1 1234567800 -> -1
|
||||
ddcom725 compare 1234567890 1 -> 1
|
||||
ddcom726 compare 1 1234567890 -> -1
|
||||
ddcom727 compare 1234567891 1 -> 1
|
||||
ddcom728 compare 1 1234567891 -> -1
|
||||
ddcom729 compare 12345678901 1 -> 1
|
||||
ddcom730 compare 1 12345678901 -> -1
|
||||
ddcom731 compare 1234567896 1 -> 1
|
||||
ddcom732 compare 1 1234567896 -> -1
|
||||
|
||||
-- residue cases at lower precision
|
||||
ddcom740 compare 1 0.9999999 -> 1
|
||||
ddcom741 compare 1 0.999999 -> 1
|
||||
ddcom742 compare 1 0.99999 -> 1
|
||||
ddcom743 compare 1 1.0000 -> 0
|
||||
ddcom744 compare 1 1.00001 -> -1
|
||||
ddcom745 compare 1 1.000001 -> -1
|
||||
ddcom746 compare 1 1.0000001 -> -1
|
||||
ddcom750 compare 0.9999999 1 -> -1
|
||||
ddcom751 compare 0.999999 1 -> -1
|
||||
ddcom752 compare 0.99999 1 -> -1
|
||||
ddcom753 compare 1.0000 1 -> 0
|
||||
ddcom754 compare 1.00001 1 -> 1
|
||||
ddcom755 compare 1.000001 1 -> 1
|
||||
ddcom756 compare 1.0000001 1 -> 1
|
||||
|
||||
-- Specials
|
||||
ddcom780 compare Inf -Inf -> 1
|
||||
ddcom781 compare Inf -1000 -> 1
|
||||
ddcom782 compare Inf -1 -> 1
|
||||
ddcom783 compare Inf -0 -> 1
|
||||
ddcom784 compare Inf 0 -> 1
|
||||
ddcom785 compare Inf 1 -> 1
|
||||
ddcom786 compare Inf 1000 -> 1
|
||||
ddcom787 compare Inf Inf -> 0
|
||||
ddcom788 compare -1000 Inf -> -1
|
||||
ddcom789 compare -Inf Inf -> -1
|
||||
ddcom790 compare -1 Inf -> -1
|
||||
ddcom791 compare -0 Inf -> -1
|
||||
ddcom792 compare 0 Inf -> -1
|
||||
ddcom793 compare 1 Inf -> -1
|
||||
ddcom794 compare 1000 Inf -> -1
|
||||
ddcom795 compare Inf Inf -> 0
|
||||
|
||||
ddcom800 compare -Inf -Inf -> 0
|
||||
ddcom801 compare -Inf -1000 -> -1
|
||||
ddcom802 compare -Inf -1 -> -1
|
||||
ddcom803 compare -Inf -0 -> -1
|
||||
ddcom804 compare -Inf 0 -> -1
|
||||
ddcom805 compare -Inf 1 -> -1
|
||||
ddcom806 compare -Inf 1000 -> -1
|
||||
ddcom807 compare -Inf Inf -> -1
|
||||
ddcom808 compare -Inf -Inf -> 0
|
||||
ddcom809 compare -1000 -Inf -> 1
|
||||
ddcom810 compare -1 -Inf -> 1
|
||||
ddcom811 compare -0 -Inf -> 1
|
||||
ddcom812 compare 0 -Inf -> 1
|
||||
ddcom813 compare 1 -Inf -> 1
|
||||
ddcom814 compare 1000 -Inf -> 1
|
||||
ddcom815 compare Inf -Inf -> 1
|
||||
|
||||
ddcom821 compare NaN -Inf -> NaN
|
||||
ddcom822 compare NaN -1000 -> NaN
|
||||
ddcom823 compare NaN -1 -> NaN
|
||||
ddcom824 compare NaN -0 -> NaN
|
||||
ddcom825 compare NaN 0 -> NaN
|
||||
ddcom826 compare NaN 1 -> NaN
|
||||
ddcom827 compare NaN 1000 -> NaN
|
||||
ddcom828 compare NaN Inf -> NaN
|
||||
ddcom829 compare NaN NaN -> NaN
|
||||
ddcom830 compare -Inf NaN -> NaN
|
||||
ddcom831 compare -1000 NaN -> NaN
|
||||
ddcom832 compare -1 NaN -> NaN
|
||||
ddcom833 compare -0 NaN -> NaN
|
||||
ddcom834 compare 0 NaN -> NaN
|
||||
ddcom835 compare 1 NaN -> NaN
|
||||
ddcom836 compare 1000 NaN -> NaN
|
||||
ddcom837 compare Inf NaN -> NaN
|
||||
ddcom838 compare -NaN -NaN -> -NaN
|
||||
ddcom839 compare +NaN -NaN -> NaN
|
||||
ddcom840 compare -NaN +NaN -> -NaN
|
||||
|
||||
ddcom841 compare sNaN -Inf -> NaN Invalid_operation
|
||||
ddcom842 compare sNaN -1000 -> NaN Invalid_operation
|
||||
ddcom843 compare sNaN -1 -> NaN Invalid_operation
|
||||
ddcom844 compare sNaN -0 -> NaN Invalid_operation
|
||||
ddcom845 compare sNaN 0 -> NaN Invalid_operation
|
||||
ddcom846 compare sNaN 1 -> NaN Invalid_operation
|
||||
ddcom847 compare sNaN 1000 -> NaN Invalid_operation
|
||||
ddcom848 compare sNaN NaN -> NaN Invalid_operation
|
||||
ddcom849 compare sNaN sNaN -> NaN Invalid_operation
|
||||
ddcom850 compare NaN sNaN -> NaN Invalid_operation
|
||||
ddcom851 compare -Inf sNaN -> NaN Invalid_operation
|
||||
ddcom852 compare -1000 sNaN -> NaN Invalid_operation
|
||||
ddcom853 compare -1 sNaN -> NaN Invalid_operation
|
||||
ddcom854 compare -0 sNaN -> NaN Invalid_operation
|
||||
ddcom855 compare 0 sNaN -> NaN Invalid_operation
|
||||
ddcom856 compare 1 sNaN -> NaN Invalid_operation
|
||||
ddcom857 compare 1000 sNaN -> NaN Invalid_operation
|
||||
ddcom858 compare Inf sNaN -> NaN Invalid_operation
|
||||
ddcom859 compare NaN sNaN -> NaN Invalid_operation
|
||||
|
||||
-- propagating NaNs
|
||||
ddcom860 compare NaN9 -Inf -> NaN9
|
||||
ddcom861 compare NaN8 999 -> NaN8
|
||||
ddcom862 compare NaN77 Inf -> NaN77
|
||||
ddcom863 compare -NaN67 NaN5 -> -NaN67
|
||||
ddcom864 compare -Inf -NaN4 -> -NaN4
|
||||
ddcom865 compare -999 -NaN33 -> -NaN33
|
||||
ddcom866 compare Inf NaN2 -> NaN2
|
||||
ddcom867 compare -NaN41 -NaN42 -> -NaN41
|
||||
ddcom868 compare +NaN41 -NaN42 -> NaN41
|
||||
ddcom869 compare -NaN41 +NaN42 -> -NaN41
|
||||
ddcom870 compare +NaN41 +NaN42 -> NaN41
|
||||
|
||||
ddcom871 compare -sNaN99 -Inf -> -NaN99 Invalid_operation
|
||||
ddcom872 compare sNaN98 -11 -> NaN98 Invalid_operation
|
||||
ddcom873 compare sNaN97 NaN -> NaN97 Invalid_operation
|
||||
ddcom874 compare sNaN16 sNaN94 -> NaN16 Invalid_operation
|
||||
ddcom875 compare NaN85 sNaN83 -> NaN83 Invalid_operation
|
||||
ddcom876 compare -Inf sNaN92 -> NaN92 Invalid_operation
|
||||
ddcom877 compare 088 sNaN81 -> NaN81 Invalid_operation
|
||||
ddcom878 compare Inf sNaN90 -> NaN90 Invalid_operation
|
||||
ddcom879 compare NaN -sNaN89 -> -NaN89 Invalid_operation
|
||||
|
||||
-- wide range
|
||||
ddcom880 compare +1.23456789012345E-0 9E+384 -> -1
|
||||
ddcom881 compare 9E+384 +1.23456789012345E-0 -> 1
|
||||
ddcom882 compare +0.100 9E-383 -> 1
|
||||
ddcom883 compare 9E-383 +0.100 -> -1
|
||||
ddcom885 compare -1.23456789012345E-0 9E+384 -> -1
|
||||
ddcom886 compare 9E+384 -1.23456789012345E-0 -> 1
|
||||
ddcom887 compare -0.100 9E-383 -> -1
|
||||
ddcom888 compare 9E-383 -0.100 -> 1
|
||||
|
||||
-- spread zeros
|
||||
ddcom900 compare 0E-383 0 -> 0
|
||||
ddcom901 compare 0E-383 -0 -> 0
|
||||
ddcom902 compare -0E-383 0 -> 0
|
||||
ddcom903 compare -0E-383 -0 -> 0
|
||||
ddcom904 compare 0E-383 0E+384 -> 0
|
||||
ddcom905 compare 0E-383 -0E+384 -> 0
|
||||
ddcom906 compare -0E-383 0E+384 -> 0
|
||||
ddcom907 compare -0E-383 -0E+384 -> 0
|
||||
ddcom908 compare 0 0E+384 -> 0
|
||||
ddcom909 compare 0 -0E+384 -> 0
|
||||
ddcom910 compare -0 0E+384 -> 0
|
||||
ddcom911 compare -0 -0E+384 -> 0
|
||||
ddcom930 compare 0E+384 0 -> 0
|
||||
ddcom931 compare 0E+384 -0 -> 0
|
||||
ddcom932 compare -0E+384 0 -> 0
|
||||
ddcom933 compare -0E+384 -0 -> 0
|
||||
ddcom934 compare 0E+384 0E-383 -> 0
|
||||
ddcom935 compare 0E+384 -0E-383 -> 0
|
||||
ddcom936 compare -0E+384 0E-383 -> 0
|
||||
ddcom937 compare -0E+384 -0E-383 -> 0
|
||||
ddcom938 compare 0 0E-383 -> 0
|
||||
ddcom939 compare 0 -0E-383 -> 0
|
||||
ddcom940 compare -0 0E-383 -> 0
|
||||
ddcom941 compare -0 -0E-383 -> 0
|
||||
|
||||
-- signs
|
||||
ddcom961 compare 1e+77 1e+11 -> 1
|
||||
ddcom962 compare 1e+77 -1e+11 -> 1
|
||||
ddcom963 compare -1e+77 1e+11 -> -1
|
||||
ddcom964 compare -1e+77 -1e+11 -> -1
|
||||
ddcom965 compare 1e-77 1e-11 -> -1
|
||||
ddcom966 compare 1e-77 -1e-11 -> 1
|
||||
ddcom967 compare -1e-77 1e-11 -> -1
|
||||
ddcom968 compare -1e-77 -1e-11 -> 1
|
||||
|
||||
-- full alignment range, both ways
|
||||
ddcomp1001 compare 1 1.000000000000000 -> 0
|
||||
ddcomp1002 compare 1 1.00000000000000 -> 0
|
||||
ddcomp1003 compare 1 1.0000000000000 -> 0
|
||||
ddcomp1004 compare 1 1.000000000000 -> 0
|
||||
ddcomp1005 compare 1 1.00000000000 -> 0
|
||||
ddcomp1006 compare 1 1.0000000000 -> 0
|
||||
ddcomp1007 compare 1 1.000000000 -> 0
|
||||
ddcomp1008 compare 1 1.00000000 -> 0
|
||||
ddcomp1009 compare 1 1.0000000 -> 0
|
||||
ddcomp1010 compare 1 1.000000 -> 0
|
||||
ddcomp1011 compare 1 1.00000 -> 0
|
||||
ddcomp1012 compare 1 1.0000 -> 0
|
||||
ddcomp1013 compare 1 1.000 -> 0
|
||||
ddcomp1014 compare 1 1.00 -> 0
|
||||
ddcomp1015 compare 1 1.0 -> 0
|
||||
ddcomp1021 compare 1.000000000000000 1 -> 0
|
||||
ddcomp1022 compare 1.00000000000000 1 -> 0
|
||||
ddcomp1023 compare 1.0000000000000 1 -> 0
|
||||
ddcomp1024 compare 1.000000000000 1 -> 0
|
||||
ddcomp1025 compare 1.00000000000 1 -> 0
|
||||
ddcomp1026 compare 1.0000000000 1 -> 0
|
||||
ddcomp1027 compare 1.000000000 1 -> 0
|
||||
ddcomp1028 compare 1.00000000 1 -> 0
|
||||
ddcomp1029 compare 1.0000000 1 -> 0
|
||||
ddcomp1030 compare 1.000000 1 -> 0
|
||||
ddcomp1031 compare 1.00000 1 -> 0
|
||||
ddcomp1032 compare 1.0000 1 -> 0
|
||||
ddcomp1033 compare 1.000 1 -> 0
|
||||
ddcomp1034 compare 1.00 1 -> 0
|
||||
ddcomp1035 compare 1.0 1 -> 0
|
||||
|
||||
-- check MSD always detected non-zero
|
||||
ddcomp1040 compare 0 0.000000000000000 -> 0
|
||||
ddcomp1041 compare 0 1.000000000000000 -> -1
|
||||
ddcomp1042 compare 0 2.000000000000000 -> -1
|
||||
ddcomp1043 compare 0 3.000000000000000 -> -1
|
||||
ddcomp1044 compare 0 4.000000000000000 -> -1
|
||||
ddcomp1045 compare 0 5.000000000000000 -> -1
|
||||
ddcomp1046 compare 0 6.000000000000000 -> -1
|
||||
ddcomp1047 compare 0 7.000000000000000 -> -1
|
||||
ddcomp1048 compare 0 8.000000000000000 -> -1
|
||||
ddcomp1049 compare 0 9.000000000000000 -> -1
|
||||
ddcomp1050 compare 0.000000000000000 0 -> 0
|
||||
ddcomp1051 compare 1.000000000000000 0 -> 1
|
||||
ddcomp1052 compare 2.000000000000000 0 -> 1
|
||||
ddcomp1053 compare 3.000000000000000 0 -> 1
|
||||
ddcomp1054 compare 4.000000000000000 0 -> 1
|
||||
ddcomp1055 compare 5.000000000000000 0 -> 1
|
||||
ddcomp1056 compare 6.000000000000000 0 -> 1
|
||||
ddcomp1057 compare 7.000000000000000 0 -> 1
|
||||
ddcomp1058 compare 8.000000000000000 0 -> 1
|
||||
ddcomp1059 compare 9.000000000000000 0 -> 1
|
||||
|
||||
-- Null tests
|
||||
ddcom9990 compare 10 # -> NaN Invalid_operation
|
||||
ddcom9991 compare # 10 -> NaN Invalid_operation
|
@@ -0,0 +1,647 @@
|
||||
------------------------------------------------------------------------
|
||||
-- ddCompareSig.decTest -- decDouble comparison; all NaNs signal --
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
-- Note that we cannot assume add/subtract tests cover paths adequately,
|
||||
-- here, because the code might be quite different (comparison cannot
|
||||
-- overflow or underflow, so actual subtractions are not necessary).
|
||||
|
||||
-- All operands and results are decDoubles.
|
||||
precision: 16
|
||||
maxExponent: 384
|
||||
minExponent: -383
|
||||
extended: 1
|
||||
clamp: 1
|
||||
rounding: half_even
|
||||
|
||||
-- sanity checks
|
||||
ddcms001 comparesig -2 -2 -> 0
|
||||
ddcms002 comparesig -2 -1 -> -1
|
||||
ddcms003 comparesig -2 0 -> -1
|
||||
ddcms004 comparesig -2 1 -> -1
|
||||
ddcms005 comparesig -2 2 -> -1
|
||||
ddcms006 comparesig -1 -2 -> 1
|
||||
ddcms007 comparesig -1 -1 -> 0
|
||||
ddcms008 comparesig -1 0 -> -1
|
||||
ddcms009 comparesig -1 1 -> -1
|
||||
ddcms010 comparesig -1 2 -> -1
|
||||
ddcms011 comparesig 0 -2 -> 1
|
||||
ddcms012 comparesig 0 -1 -> 1
|
||||
ddcms013 comparesig 0 0 -> 0
|
||||
ddcms014 comparesig 0 1 -> -1
|
||||
ddcms015 comparesig 0 2 -> -1
|
||||
ddcms016 comparesig 1 -2 -> 1
|
||||
ddcms017 comparesig 1 -1 -> 1
|
||||
ddcms018 comparesig 1 0 -> 1
|
||||
ddcms019 comparesig 1 1 -> 0
|
||||
ddcms020 comparesig 1 2 -> -1
|
||||
ddcms021 comparesig 2 -2 -> 1
|
||||
ddcms022 comparesig 2 -1 -> 1
|
||||
ddcms023 comparesig 2 0 -> 1
|
||||
ddcms025 comparesig 2 1 -> 1
|
||||
ddcms026 comparesig 2 2 -> 0
|
||||
|
||||
ddcms031 comparesig -20 -20 -> 0
|
||||
ddcms032 comparesig -20 -10 -> -1
|
||||
ddcms033 comparesig -20 00 -> -1
|
||||
ddcms034 comparesig -20 10 -> -1
|
||||
ddcms035 comparesig -20 20 -> -1
|
||||
ddcms036 comparesig -10 -20 -> 1
|
||||
ddcms037 comparesig -10 -10 -> 0
|
||||
ddcms038 comparesig -10 00 -> -1
|
||||
ddcms039 comparesig -10 10 -> -1
|
||||
ddcms040 comparesig -10 20 -> -1
|
||||
ddcms041 comparesig 00 -20 -> 1
|
||||
ddcms042 comparesig 00 -10 -> 1
|
||||
ddcms043 comparesig 00 00 -> 0
|
||||
ddcms044 comparesig 00 10 -> -1
|
||||
ddcms045 comparesig 00 20 -> -1
|
||||
ddcms046 comparesig 10 -20 -> 1
|
||||
ddcms047 comparesig 10 -10 -> 1
|
||||
ddcms048 comparesig 10 00 -> 1
|
||||
ddcms049 comparesig 10 10 -> 0
|
||||
ddcms050 comparesig 10 20 -> -1
|
||||
ddcms051 comparesig 20 -20 -> 1
|
||||
ddcms052 comparesig 20 -10 -> 1
|
||||
ddcms053 comparesig 20 00 -> 1
|
||||
ddcms055 comparesig 20 10 -> 1
|
||||
ddcms056 comparesig 20 20 -> 0
|
||||
|
||||
ddcms061 comparesig -2.0 -2.0 -> 0
|
||||
ddcms062 comparesig -2.0 -1.0 -> -1
|
||||
ddcms063 comparesig -2.0 0.0 -> -1
|
||||
ddcms064 comparesig -2.0 1.0 -> -1
|
||||
ddcms065 comparesig -2.0 2.0 -> -1
|
||||
ddcms066 comparesig -1.0 -2.0 -> 1
|
||||
ddcms067 comparesig -1.0 -1.0 -> 0
|
||||
ddcms068 comparesig -1.0 0.0 -> -1
|
||||
ddcms069 comparesig -1.0 1.0 -> -1
|
||||
ddcms070 comparesig -1.0 2.0 -> -1
|
||||
ddcms071 comparesig 0.0 -2.0 -> 1
|
||||
ddcms072 comparesig 0.0 -1.0 -> 1
|
||||
ddcms073 comparesig 0.0 0.0 -> 0
|
||||
ddcms074 comparesig 0.0 1.0 -> -1
|
||||
ddcms075 comparesig 0.0 2.0 -> -1
|
||||
ddcms076 comparesig 1.0 -2.0 -> 1
|
||||
ddcms077 comparesig 1.0 -1.0 -> 1
|
||||
ddcms078 comparesig 1.0 0.0 -> 1
|
||||
ddcms079 comparesig 1.0 1.0 -> 0
|
||||
ddcms080 comparesig 1.0 2.0 -> -1
|
||||
ddcms081 comparesig 2.0 -2.0 -> 1
|
||||
ddcms082 comparesig 2.0 -1.0 -> 1
|
||||
ddcms083 comparesig 2.0 0.0 -> 1
|
||||
ddcms085 comparesig 2.0 1.0 -> 1
|
||||
ddcms086 comparesig 2.0 2.0 -> 0
|
||||
|
||||
-- now some cases which might overflow if subtract were used
|
||||
ddcms090 comparesig 9.999999999999999E+384 9.999999999999999E+384 -> 0
|
||||
ddcms091 comparesig -9.999999999999999E+384 9.999999999999999E+384 -> -1
|
||||
ddcms092 comparesig 9.999999999999999E+384 -9.999999999999999E+384 -> 1
|
||||
ddcms093 comparesig -9.999999999999999E+384 -9.999999999999999E+384 -> 0
|
||||
|
||||
-- some differing length/exponent cases
|
||||
ddcms100 comparesig 7.0 7.0 -> 0
|
||||
ddcms101 comparesig 7.0 7 -> 0
|
||||
ddcms102 comparesig 7 7.0 -> 0
|
||||
ddcms103 comparesig 7E+0 7.0 -> 0
|
||||
ddcms104 comparesig 70E-1 7.0 -> 0
|
||||
ddcms105 comparesig 0.7E+1 7 -> 0
|
||||
ddcms106 comparesig 70E-1 7 -> 0
|
||||
ddcms107 comparesig 7.0 7E+0 -> 0
|
||||
ddcms108 comparesig 7.0 70E-1 -> 0
|
||||
ddcms109 comparesig 7 0.7E+1 -> 0
|
||||
ddcms110 comparesig 7 70E-1 -> 0
|
||||
|
||||
ddcms120 comparesig 8.0 7.0 -> 1
|
||||
ddcms121 comparesig 8.0 7 -> 1
|
||||
ddcms122 comparesig 8 7.0 -> 1
|
||||
ddcms123 comparesig 8E+0 7.0 -> 1
|
||||
ddcms124 comparesig 80E-1 7.0 -> 1
|
||||
ddcms125 comparesig 0.8E+1 7 -> 1
|
||||
ddcms126 comparesig 80E-1 7 -> 1
|
||||
ddcms127 comparesig 8.0 7E+0 -> 1
|
||||
ddcms128 comparesig 8.0 70E-1 -> 1
|
||||
ddcms129 comparesig 8 0.7E+1 -> 1
|
||||
ddcms130 comparesig 8 70E-1 -> 1
|
||||
|
||||
ddcms140 comparesig 8.0 9.0 -> -1
|
||||
ddcms141 comparesig 8.0 9 -> -1
|
||||
ddcms142 comparesig 8 9.0 -> -1
|
||||
ddcms143 comparesig 8E+0 9.0 -> -1
|
||||
ddcms144 comparesig 80E-1 9.0 -> -1
|
||||
ddcms145 comparesig 0.8E+1 9 -> -1
|
||||
ddcms146 comparesig 80E-1 9 -> -1
|
||||
ddcms147 comparesig 8.0 9E+0 -> -1
|
||||
ddcms148 comparesig 8.0 90E-1 -> -1
|
||||
ddcms149 comparesig 8 0.9E+1 -> -1
|
||||
ddcms150 comparesig 8 90E-1 -> -1
|
||||
|
||||
-- and again, with sign changes -+ ..
|
||||
ddcms200 comparesig -7.0 7.0 -> -1
|
||||
ddcms201 comparesig -7.0 7 -> -1
|
||||
ddcms202 comparesig -7 7.0 -> -1
|
||||
ddcms203 comparesig -7E+0 7.0 -> -1
|
||||
ddcms204 comparesig -70E-1 7.0 -> -1
|
||||
ddcms205 comparesig -0.7E+1 7 -> -1
|
||||
ddcms206 comparesig -70E-1 7 -> -1
|
||||
ddcms207 comparesig -7.0 7E+0 -> -1
|
||||
ddcms208 comparesig -7.0 70E-1 -> -1
|
||||
ddcms209 comparesig -7 0.7E+1 -> -1
|
||||
ddcms210 comparesig -7 70E-1 -> -1
|
||||
|
||||
ddcms220 comparesig -8.0 7.0 -> -1
|
||||
ddcms221 comparesig -8.0 7 -> -1
|
||||
ddcms222 comparesig -8 7.0 -> -1
|
||||
ddcms223 comparesig -8E+0 7.0 -> -1
|
||||
ddcms224 comparesig -80E-1 7.0 -> -1
|
||||
ddcms225 comparesig -0.8E+1 7 -> -1
|
||||
ddcms226 comparesig -80E-1 7 -> -1
|
||||
ddcms227 comparesig -8.0 7E+0 -> -1
|
||||
ddcms228 comparesig -8.0 70E-1 -> -1
|
||||
ddcms229 comparesig -8 0.7E+1 -> -1
|
||||
ddcms230 comparesig -8 70E-1 -> -1
|
||||
|
||||
ddcms240 comparesig -8.0 9.0 -> -1
|
||||
ddcms241 comparesig -8.0 9 -> -1
|
||||
ddcms242 comparesig -8 9.0 -> -1
|
||||
ddcms243 comparesig -8E+0 9.0 -> -1
|
||||
ddcms244 comparesig -80E-1 9.0 -> -1
|
||||
ddcms245 comparesig -0.8E+1 9 -> -1
|
||||
ddcms246 comparesig -80E-1 9 -> -1
|
||||
ddcms247 comparesig -8.0 9E+0 -> -1
|
||||
ddcms248 comparesig -8.0 90E-1 -> -1
|
||||
ddcms249 comparesig -8 0.9E+1 -> -1
|
||||
ddcms250 comparesig -8 90E-1 -> -1
|
||||
|
||||
-- and again, with sign changes +- ..
|
||||
ddcms300 comparesig 7.0 -7.0 -> 1
|
||||
ddcms301 comparesig 7.0 -7 -> 1
|
||||
ddcms302 comparesig 7 -7.0 -> 1
|
||||
ddcms303 comparesig 7E+0 -7.0 -> 1
|
||||
ddcms304 comparesig 70E-1 -7.0 -> 1
|
||||
ddcms305 comparesig .7E+1 -7 -> 1
|
||||
ddcms306 comparesig 70E-1 -7 -> 1
|
||||
ddcms307 comparesig 7.0 -7E+0 -> 1
|
||||
ddcms308 comparesig 7.0 -70E-1 -> 1
|
||||
ddcms309 comparesig 7 -.7E+1 -> 1
|
||||
ddcms310 comparesig 7 -70E-1 -> 1
|
||||
|
||||
ddcms320 comparesig 8.0 -7.0 -> 1
|
||||
ddcms321 comparesig 8.0 -7 -> 1
|
||||
ddcms322 comparesig 8 -7.0 -> 1
|
||||
ddcms323 comparesig 8E+0 -7.0 -> 1
|
||||
ddcms324 comparesig 80E-1 -7.0 -> 1
|
||||
ddcms325 comparesig .8E+1 -7 -> 1
|
||||
ddcms326 comparesig 80E-1 -7 -> 1
|
||||
ddcms327 comparesig 8.0 -7E+0 -> 1
|
||||
ddcms328 comparesig 8.0 -70E-1 -> 1
|
||||
ddcms329 comparesig 8 -.7E+1 -> 1
|
||||
ddcms330 comparesig 8 -70E-1 -> 1
|
||||
|
||||
ddcms340 comparesig 8.0 -9.0 -> 1
|
||||
ddcms341 comparesig 8.0 -9 -> 1
|
||||
ddcms342 comparesig 8 -9.0 -> 1
|
||||
ddcms343 comparesig 8E+0 -9.0 -> 1
|
||||
ddcms344 comparesig 80E-1 -9.0 -> 1
|
||||
ddcms345 comparesig .8E+1 -9 -> 1
|
||||
ddcms346 comparesig 80E-1 -9 -> 1
|
||||
ddcms347 comparesig 8.0 -9E+0 -> 1
|
||||
ddcms348 comparesig 8.0 -90E-1 -> 1
|
||||
ddcms349 comparesig 8 -.9E+1 -> 1
|
||||
ddcms350 comparesig 8 -90E-1 -> 1
|
||||
|
||||
-- and again, with sign changes -- ..
|
||||
ddcms400 comparesig -7.0 -7.0 -> 0
|
||||
ddcms401 comparesig -7.0 -7 -> 0
|
||||
ddcms402 comparesig -7 -7.0 -> 0
|
||||
ddcms403 comparesig -7E+0 -7.0 -> 0
|
||||
ddcms404 comparesig -70E-1 -7.0 -> 0
|
||||
ddcms405 comparesig -.7E+1 -7 -> 0
|
||||
ddcms406 comparesig -70E-1 -7 -> 0
|
||||
ddcms407 comparesig -7.0 -7E+0 -> 0
|
||||
ddcms408 comparesig -7.0 -70E-1 -> 0
|
||||
ddcms409 comparesig -7 -.7E+1 -> 0
|
||||
ddcms410 comparesig -7 -70E-1 -> 0
|
||||
|
||||
ddcms420 comparesig -8.0 -7.0 -> -1
|
||||
ddcms421 comparesig -8.0 -7 -> -1
|
||||
ddcms422 comparesig -8 -7.0 -> -1
|
||||
ddcms423 comparesig -8E+0 -7.0 -> -1
|
||||
ddcms424 comparesig -80E-1 -7.0 -> -1
|
||||
ddcms425 comparesig -.8E+1 -7 -> -1
|
||||
ddcms426 comparesig -80E-1 -7 -> -1
|
||||
ddcms427 comparesig -8.0 -7E+0 -> -1
|
||||
ddcms428 comparesig -8.0 -70E-1 -> -1
|
||||
ddcms429 comparesig -8 -.7E+1 -> -1
|
||||
ddcms430 comparesig -8 -70E-1 -> -1
|
||||
|
||||
ddcms440 comparesig -8.0 -9.0 -> 1
|
||||
ddcms441 comparesig -8.0 -9 -> 1
|
||||
ddcms442 comparesig -8 -9.0 -> 1
|
||||
ddcms443 comparesig -8E+0 -9.0 -> 1
|
||||
ddcms444 comparesig -80E-1 -9.0 -> 1
|
||||
ddcms445 comparesig -.8E+1 -9 -> 1
|
||||
ddcms446 comparesig -80E-1 -9 -> 1
|
||||
ddcms447 comparesig -8.0 -9E+0 -> 1
|
||||
ddcms448 comparesig -8.0 -90E-1 -> 1
|
||||
ddcms449 comparesig -8 -.9E+1 -> 1
|
||||
ddcms450 comparesig -8 -90E-1 -> 1
|
||||
|
||||
|
||||
-- testcases that subtract to lots of zeros at boundaries [pgr]
|
||||
ddcms473 comparesig 123.4560000000000E-89 123.456E-89 -> 0
|
||||
ddcms474 comparesig 123.456000000000E+89 123.456E+89 -> 0
|
||||
ddcms475 comparesig 123.45600000000E-89 123.456E-89 -> 0
|
||||
ddcms476 comparesig 123.4560000000E+89 123.456E+89 -> 0
|
||||
ddcms477 comparesig 123.456000000E-89 123.456E-89 -> 0
|
||||
ddcms478 comparesig 123.45600000E+89 123.456E+89 -> 0
|
||||
ddcms479 comparesig 123.4560000E-89 123.456E-89 -> 0
|
||||
ddcms480 comparesig 123.456000E+89 123.456E+89 -> 0
|
||||
ddcms481 comparesig 123.45600E-89 123.456E-89 -> 0
|
||||
ddcms482 comparesig 123.4560E+89 123.456E+89 -> 0
|
||||
ddcms483 comparesig 123.456E-89 123.456E-89 -> 0
|
||||
ddcms487 comparesig 123.456E+89 123.4560000000000E+89 -> 0
|
||||
ddcms488 comparesig 123.456E-89 123.456000000000E-89 -> 0
|
||||
ddcms489 comparesig 123.456E+89 123.45600000000E+89 -> 0
|
||||
ddcms490 comparesig 123.456E-89 123.4560000000E-89 -> 0
|
||||
ddcms491 comparesig 123.456E+89 123.456000000E+89 -> 0
|
||||
ddcms492 comparesig 123.456E-89 123.45600000E-89 -> 0
|
||||
ddcms493 comparesig 123.456E+89 123.4560000E+89 -> 0
|
||||
ddcms494 comparesig 123.456E-89 123.456000E-89 -> 0
|
||||
ddcms495 comparesig 123.456E+89 123.45600E+89 -> 0
|
||||
ddcms496 comparesig 123.456E-89 123.4560E-89 -> 0
|
||||
ddcms497 comparesig 123.456E+89 123.456E+89 -> 0
|
||||
|
||||
-- wide-ranging, around precision; signs equal
|
||||
ddcms500 comparesig 1 1E-15 -> 1
|
||||
ddcms501 comparesig 1 1E-14 -> 1
|
||||
ddcms502 comparesig 1 1E-13 -> 1
|
||||
ddcms503 comparesig 1 1E-12 -> 1
|
||||
ddcms504 comparesig 1 1E-11 -> 1
|
||||
ddcms505 comparesig 1 1E-10 -> 1
|
||||
ddcms506 comparesig 1 1E-9 -> 1
|
||||
ddcms507 comparesig 1 1E-8 -> 1
|
||||
ddcms508 comparesig 1 1E-7 -> 1
|
||||
ddcms509 comparesig 1 1E-6 -> 1
|
||||
ddcms510 comparesig 1 1E-5 -> 1
|
||||
ddcms511 comparesig 1 1E-4 -> 1
|
||||
ddcms512 comparesig 1 1E-3 -> 1
|
||||
ddcms513 comparesig 1 1E-2 -> 1
|
||||
ddcms514 comparesig 1 1E-1 -> 1
|
||||
ddcms515 comparesig 1 1E-0 -> 0
|
||||
ddcms516 comparesig 1 1E+1 -> -1
|
||||
ddcms517 comparesig 1 1E+2 -> -1
|
||||
ddcms518 comparesig 1 1E+3 -> -1
|
||||
ddcms519 comparesig 1 1E+4 -> -1
|
||||
ddcms521 comparesig 1 1E+5 -> -1
|
||||
ddcms522 comparesig 1 1E+6 -> -1
|
||||
ddcms523 comparesig 1 1E+7 -> -1
|
||||
ddcms524 comparesig 1 1E+8 -> -1
|
||||
ddcms525 comparesig 1 1E+9 -> -1
|
||||
ddcms526 comparesig 1 1E+10 -> -1
|
||||
ddcms527 comparesig 1 1E+11 -> -1
|
||||
ddcms528 comparesig 1 1E+12 -> -1
|
||||
ddcms529 comparesig 1 1E+13 -> -1
|
||||
ddcms530 comparesig 1 1E+14 -> -1
|
||||
ddcms531 comparesig 1 1E+15 -> -1
|
||||
-- LR swap
|
||||
ddcms540 comparesig 1E-15 1 -> -1
|
||||
ddcms541 comparesig 1E-14 1 -> -1
|
||||
ddcms542 comparesig 1E-13 1 -> -1
|
||||
ddcms543 comparesig 1E-12 1 -> -1
|
||||
ddcms544 comparesig 1E-11 1 -> -1
|
||||
ddcms545 comparesig 1E-10 1 -> -1
|
||||
ddcms546 comparesig 1E-9 1 -> -1
|
||||
ddcms547 comparesig 1E-8 1 -> -1
|
||||
ddcms548 comparesig 1E-7 1 -> -1
|
||||
ddcms549 comparesig 1E-6 1 -> -1
|
||||
ddcms550 comparesig 1E-5 1 -> -1
|
||||
ddcms551 comparesig 1E-4 1 -> -1
|
||||
ddcms552 comparesig 1E-3 1 -> -1
|
||||
ddcms553 comparesig 1E-2 1 -> -1
|
||||
ddcms554 comparesig 1E-1 1 -> -1
|
||||
ddcms555 comparesig 1E-0 1 -> 0
|
||||
ddcms556 comparesig 1E+1 1 -> 1
|
||||
ddcms557 comparesig 1E+2 1 -> 1
|
||||
ddcms558 comparesig 1E+3 1 -> 1
|
||||
ddcms559 comparesig 1E+4 1 -> 1
|
||||
ddcms561 comparesig 1E+5 1 -> 1
|
||||
ddcms562 comparesig 1E+6 1 -> 1
|
||||
ddcms563 comparesig 1E+7 1 -> 1
|
||||
ddcms564 comparesig 1E+8 1 -> 1
|
||||
ddcms565 comparesig 1E+9 1 -> 1
|
||||
ddcms566 comparesig 1E+10 1 -> 1
|
||||
ddcms567 comparesig 1E+11 1 -> 1
|
||||
ddcms568 comparesig 1E+12 1 -> 1
|
||||
ddcms569 comparesig 1E+13 1 -> 1
|
||||
ddcms570 comparesig 1E+14 1 -> 1
|
||||
ddcms571 comparesig 1E+15 1 -> 1
|
||||
-- similar with a useful coefficient, one side only
|
||||
ddcms580 comparesig 0.000000987654321 1E-15 -> 1
|
||||
ddcms581 comparesig 0.000000987654321 1E-14 -> 1
|
||||
ddcms582 comparesig 0.000000987654321 1E-13 -> 1
|
||||
ddcms583 comparesig 0.000000987654321 1E-12 -> 1
|
||||
ddcms584 comparesig 0.000000987654321 1E-11 -> 1
|
||||
ddcms585 comparesig 0.000000987654321 1E-10 -> 1
|
||||
ddcms586 comparesig 0.000000987654321 1E-9 -> 1
|
||||
ddcms587 comparesig 0.000000987654321 1E-8 -> 1
|
||||
ddcms588 comparesig 0.000000987654321 1E-7 -> 1
|
||||
ddcms589 comparesig 0.000000987654321 1E-6 -> -1
|
||||
ddcms590 comparesig 0.000000987654321 1E-5 -> -1
|
||||
ddcms591 comparesig 0.000000987654321 1E-4 -> -1
|
||||
ddcms592 comparesig 0.000000987654321 1E-3 -> -1
|
||||
ddcms593 comparesig 0.000000987654321 1E-2 -> -1
|
||||
ddcms594 comparesig 0.000000987654321 1E-1 -> -1
|
||||
ddcms595 comparesig 0.000000987654321 1E-0 -> -1
|
||||
ddcms596 comparesig 0.000000987654321 1E+1 -> -1
|
||||
ddcms597 comparesig 0.000000987654321 1E+2 -> -1
|
||||
ddcms598 comparesig 0.000000987654321 1E+3 -> -1
|
||||
ddcms599 comparesig 0.000000987654321 1E+4 -> -1
|
||||
|
||||
-- check some unit-y traps
|
||||
ddcms600 comparesig 12 12.2345 -> -1
|
||||
ddcms601 comparesig 12.0 12.2345 -> -1
|
||||
ddcms602 comparesig 12.00 12.2345 -> -1
|
||||
ddcms603 comparesig 12.000 12.2345 -> -1
|
||||
ddcms604 comparesig 12.0000 12.2345 -> -1
|
||||
ddcms605 comparesig 12.00000 12.2345 -> -1
|
||||
ddcms606 comparesig 12.000000 12.2345 -> -1
|
||||
ddcms607 comparesig 12.0000000 12.2345 -> -1
|
||||
ddcms608 comparesig 12.00000000 12.2345 -> -1
|
||||
ddcms609 comparesig 12.000000000 12.2345 -> -1
|
||||
ddcms610 comparesig 12.1234 12 -> 1
|
||||
ddcms611 comparesig 12.1234 12.0 -> 1
|
||||
ddcms612 comparesig 12.1234 12.00 -> 1
|
||||
ddcms613 comparesig 12.1234 12.000 -> 1
|
||||
ddcms614 comparesig 12.1234 12.0000 -> 1
|
||||
ddcms615 comparesig 12.1234 12.00000 -> 1
|
||||
ddcms616 comparesig 12.1234 12.000000 -> 1
|
||||
ddcms617 comparesig 12.1234 12.0000000 -> 1
|
||||
ddcms618 comparesig 12.1234 12.00000000 -> 1
|
||||
ddcms619 comparesig 12.1234 12.000000000 -> 1
|
||||
ddcms620 comparesig -12 -12.2345 -> 1
|
||||
ddcms621 comparesig -12.0 -12.2345 -> 1
|
||||
ddcms622 comparesig -12.00 -12.2345 -> 1
|
||||
ddcms623 comparesig -12.000 -12.2345 -> 1
|
||||
ddcms624 comparesig -12.0000 -12.2345 -> 1
|
||||
ddcms625 comparesig -12.00000 -12.2345 -> 1
|
||||
ddcms626 comparesig -12.000000 -12.2345 -> 1
|
||||
ddcms627 comparesig -12.0000000 -12.2345 -> 1
|
||||
ddcms628 comparesig -12.00000000 -12.2345 -> 1
|
||||
ddcms629 comparesig -12.000000000 -12.2345 -> 1
|
||||
ddcms630 comparesig -12.1234 -12 -> -1
|
||||
ddcms631 comparesig -12.1234 -12.0 -> -1
|
||||
ddcms632 comparesig -12.1234 -12.00 -> -1
|
||||
ddcms633 comparesig -12.1234 -12.000 -> -1
|
||||
ddcms634 comparesig -12.1234 -12.0000 -> -1
|
||||
ddcms635 comparesig -12.1234 -12.00000 -> -1
|
||||
ddcms636 comparesig -12.1234 -12.000000 -> -1
|
||||
ddcms637 comparesig -12.1234 -12.0000000 -> -1
|
||||
ddcms638 comparesig -12.1234 -12.00000000 -> -1
|
||||
ddcms639 comparesig -12.1234 -12.000000000 -> -1
|
||||
|
||||
-- extended zeros
|
||||
ddcms640 comparesig 0 0 -> 0
|
||||
ddcms641 comparesig 0 -0 -> 0
|
||||
ddcms642 comparesig 0 -0.0 -> 0
|
||||
ddcms643 comparesig 0 0.0 -> 0
|
||||
ddcms644 comparesig -0 0 -> 0
|
||||
ddcms645 comparesig -0 -0 -> 0
|
||||
ddcms646 comparesig -0 -0.0 -> 0
|
||||
ddcms647 comparesig -0 0.0 -> 0
|
||||
ddcms648 comparesig 0.0 0 -> 0
|
||||
ddcms649 comparesig 0.0 -0 -> 0
|
||||
ddcms650 comparesig 0.0 -0.0 -> 0
|
||||
ddcms651 comparesig 0.0 0.0 -> 0
|
||||
ddcms652 comparesig -0.0 0 -> 0
|
||||
ddcms653 comparesig -0.0 -0 -> 0
|
||||
ddcms654 comparesig -0.0 -0.0 -> 0
|
||||
ddcms655 comparesig -0.0 0.0 -> 0
|
||||
|
||||
ddcms656 comparesig -0E1 0.0 -> 0
|
||||
ddcms657 comparesig -0E2 0.0 -> 0
|
||||
ddcms658 comparesig 0E1 0.0 -> 0
|
||||
ddcms659 comparesig 0E2 0.0 -> 0
|
||||
ddcms660 comparesig -0E1 0 -> 0
|
||||
ddcms661 comparesig -0E2 0 -> 0
|
||||
ddcms662 comparesig 0E1 0 -> 0
|
||||
ddcms663 comparesig 0E2 0 -> 0
|
||||
ddcms664 comparesig -0E1 -0E1 -> 0
|
||||
ddcms665 comparesig -0E2 -0E1 -> 0
|
||||
ddcms666 comparesig 0E1 -0E1 -> 0
|
||||
ddcms667 comparesig 0E2 -0E1 -> 0
|
||||
ddcms668 comparesig -0E1 -0E2 -> 0
|
||||
ddcms669 comparesig -0E2 -0E2 -> 0
|
||||
ddcms670 comparesig 0E1 -0E2 -> 0
|
||||
ddcms671 comparesig 0E2 -0E2 -> 0
|
||||
ddcms672 comparesig -0E1 0E1 -> 0
|
||||
ddcms673 comparesig -0E2 0E1 -> 0
|
||||
ddcms674 comparesig 0E1 0E1 -> 0
|
||||
ddcms675 comparesig 0E2 0E1 -> 0
|
||||
ddcms676 comparesig -0E1 0E2 -> 0
|
||||
ddcms677 comparesig -0E2 0E2 -> 0
|
||||
ddcms678 comparesig 0E1 0E2 -> 0
|
||||
ddcms679 comparesig 0E2 0E2 -> 0
|
||||
|
||||
-- trailing zeros; unit-y
|
||||
ddcms680 comparesig 12 12 -> 0
|
||||
ddcms681 comparesig 12 12.0 -> 0
|
||||
ddcms682 comparesig 12 12.00 -> 0
|
||||
ddcms683 comparesig 12 12.000 -> 0
|
||||
ddcms684 comparesig 12 12.0000 -> 0
|
||||
ddcms685 comparesig 12 12.00000 -> 0
|
||||
ddcms686 comparesig 12 12.000000 -> 0
|
||||
ddcms687 comparesig 12 12.0000000 -> 0
|
||||
ddcms688 comparesig 12 12.00000000 -> 0
|
||||
ddcms689 comparesig 12 12.000000000 -> 0
|
||||
ddcms690 comparesig 12 12 -> 0
|
||||
ddcms691 comparesig 12.0 12 -> 0
|
||||
ddcms692 comparesig 12.00 12 -> 0
|
||||
ddcms693 comparesig 12.000 12 -> 0
|
||||
ddcms694 comparesig 12.0000 12 -> 0
|
||||
ddcms695 comparesig 12.00000 12 -> 0
|
||||
ddcms696 comparesig 12.000000 12 -> 0
|
||||
ddcms697 comparesig 12.0000000 12 -> 0
|
||||
ddcms698 comparesig 12.00000000 12 -> 0
|
||||
ddcms699 comparesig 12.000000000 12 -> 0
|
||||
|
||||
-- first, second, & last digit
|
||||
ddcms700 comparesig 1234567890123456 1234567890123455 -> 1
|
||||
ddcms701 comparesig 1234567890123456 1234567890123456 -> 0
|
||||
ddcms702 comparesig 1234567890123456 1234567890123457 -> -1
|
||||
ddcms703 comparesig 1234567890123456 0234567890123456 -> 1
|
||||
ddcms704 comparesig 1234567890123456 1234567890123456 -> 0
|
||||
ddcms705 comparesig 1234567890123456 2234567890123456 -> -1
|
||||
ddcms706 comparesig 1134567890123456 1034567890123456 -> 1
|
||||
ddcms707 comparesig 1134567890123456 1134567890123456 -> 0
|
||||
ddcms708 comparesig 1134567890123456 1234567890123456 -> -1
|
||||
|
||||
-- miscellaneous
|
||||
ddcms721 comparesig 12345678000 1 -> 1
|
||||
ddcms722 comparesig 1 12345678000 -> -1
|
||||
ddcms723 comparesig 1234567800 1 -> 1
|
||||
ddcms724 comparesig 1 1234567800 -> -1
|
||||
ddcms725 comparesig 1234567890 1 -> 1
|
||||
ddcms726 comparesig 1 1234567890 -> -1
|
||||
ddcms727 comparesig 1234567891 1 -> 1
|
||||
ddcms728 comparesig 1 1234567891 -> -1
|
||||
ddcms729 comparesig 12345678901 1 -> 1
|
||||
ddcms730 comparesig 1 12345678901 -> -1
|
||||
ddcms731 comparesig 1234567896 1 -> 1
|
||||
ddcms732 comparesig 1 1234567896 -> -1
|
||||
|
||||
-- residue cases at lower precision
|
||||
ddcms740 comparesig 1 0.9999999 -> 1
|
||||
ddcms741 comparesig 1 0.999999 -> 1
|
||||
ddcms742 comparesig 1 0.99999 -> 1
|
||||
ddcms743 comparesig 1 1.0000 -> 0
|
||||
ddcms744 comparesig 1 1.00001 -> -1
|
||||
ddcms745 comparesig 1 1.000001 -> -1
|
||||
ddcms746 comparesig 1 1.0000001 -> -1
|
||||
ddcms750 comparesig 0.9999999 1 -> -1
|
||||
ddcms751 comparesig 0.999999 1 -> -1
|
||||
ddcms752 comparesig 0.99999 1 -> -1
|
||||
ddcms753 comparesig 1.0000 1 -> 0
|
||||
ddcms754 comparesig 1.00001 1 -> 1
|
||||
ddcms755 comparesig 1.000001 1 -> 1
|
||||
ddcms756 comparesig 1.0000001 1 -> 1
|
||||
|
||||
-- Specials
|
||||
ddcms780 comparesig Inf -Inf -> 1
|
||||
ddcms781 comparesig Inf -1000 -> 1
|
||||
ddcms782 comparesig Inf -1 -> 1
|
||||
ddcms783 comparesig Inf -0 -> 1
|
||||
ddcms784 comparesig Inf 0 -> 1
|
||||
ddcms785 comparesig Inf 1 -> 1
|
||||
ddcms786 comparesig Inf 1000 -> 1
|
||||
ddcms787 comparesig Inf Inf -> 0
|
||||
ddcms788 comparesig -1000 Inf -> -1
|
||||
ddcms789 comparesig -Inf Inf -> -1
|
||||
ddcms790 comparesig -1 Inf -> -1
|
||||
ddcms791 comparesig -0 Inf -> -1
|
||||
ddcms792 comparesig 0 Inf -> -1
|
||||
ddcms793 comparesig 1 Inf -> -1
|
||||
ddcms794 comparesig 1000 Inf -> -1
|
||||
ddcms795 comparesig Inf Inf -> 0
|
||||
|
||||
ddcms800 comparesig -Inf -Inf -> 0
|
||||
ddcms801 comparesig -Inf -1000 -> -1
|
||||
ddcms802 comparesig -Inf -1 -> -1
|
||||
ddcms803 comparesig -Inf -0 -> -1
|
||||
ddcms804 comparesig -Inf 0 -> -1
|
||||
ddcms805 comparesig -Inf 1 -> -1
|
||||
ddcms806 comparesig -Inf 1000 -> -1
|
||||
ddcms807 comparesig -Inf Inf -> -1
|
||||
ddcms808 comparesig -Inf -Inf -> 0
|
||||
ddcms809 comparesig -1000 -Inf -> 1
|
||||
ddcms810 comparesig -1 -Inf -> 1
|
||||
ddcms811 comparesig -0 -Inf -> 1
|
||||
ddcms812 comparesig 0 -Inf -> 1
|
||||
ddcms813 comparesig 1 -Inf -> 1
|
||||
ddcms814 comparesig 1000 -Inf -> 1
|
||||
ddcms815 comparesig Inf -Inf -> 1
|
||||
|
||||
ddcms821 comparesig NaN -Inf -> NaN Invalid_operation
|
||||
ddcms822 comparesig NaN -1000 -> NaN Invalid_operation
|
||||
ddcms823 comparesig NaN -1 -> NaN Invalid_operation
|
||||
ddcms824 comparesig NaN -0 -> NaN Invalid_operation
|
||||
ddcms825 comparesig NaN 0 -> NaN Invalid_operation
|
||||
ddcms826 comparesig NaN 1 -> NaN Invalid_operation
|
||||
ddcms827 comparesig NaN 1000 -> NaN Invalid_operation
|
||||
ddcms828 comparesig NaN Inf -> NaN Invalid_operation
|
||||
ddcms829 comparesig NaN NaN -> NaN Invalid_operation
|
||||
ddcms830 comparesig -Inf NaN -> NaN Invalid_operation
|
||||
ddcms831 comparesig -1000 NaN -> NaN Invalid_operation
|
||||
ddcms832 comparesig -1 NaN -> NaN Invalid_operation
|
||||
ddcms833 comparesig -0 NaN -> NaN Invalid_operation
|
||||
ddcms834 comparesig 0 NaN -> NaN Invalid_operation
|
||||
ddcms835 comparesig 1 NaN -> NaN Invalid_operation
|
||||
ddcms836 comparesig 1000 NaN -> NaN Invalid_operation
|
||||
ddcms837 comparesig Inf NaN -> NaN Invalid_operation
|
||||
ddcms838 comparesig -NaN -NaN -> -NaN Invalid_operation
|
||||
ddcms839 comparesig +NaN -NaN -> NaN Invalid_operation
|
||||
ddcms840 comparesig -NaN +NaN -> -NaN Invalid_operation
|
||||
|
||||
ddcms841 comparesig sNaN -Inf -> NaN Invalid_operation
|
||||
ddcms842 comparesig sNaN -1000 -> NaN Invalid_operation
|
||||
ddcms843 comparesig sNaN -1 -> NaN Invalid_operation
|
||||
ddcms844 comparesig sNaN -0 -> NaN Invalid_operation
|
||||
ddcms845 comparesig sNaN 0 -> NaN Invalid_operation
|
||||
ddcms846 comparesig sNaN 1 -> NaN Invalid_operation
|
||||
ddcms847 comparesig sNaN 1000 -> NaN Invalid_operation
|
||||
ddcms848 comparesig sNaN NaN -> NaN Invalid_operation
|
||||
ddcms849 comparesig sNaN sNaN -> NaN Invalid_operation
|
||||
ddcms850 comparesig NaN sNaN -> NaN Invalid_operation
|
||||
ddcms851 comparesig -Inf sNaN -> NaN Invalid_operation
|
||||
ddcms852 comparesig -1000 sNaN -> NaN Invalid_operation
|
||||
ddcms853 comparesig -1 sNaN -> NaN Invalid_operation
|
||||
ddcms854 comparesig -0 sNaN -> NaN Invalid_operation
|
||||
ddcms855 comparesig 0 sNaN -> NaN Invalid_operation
|
||||
ddcms856 comparesig 1 sNaN -> NaN Invalid_operation
|
||||
ddcms857 comparesig 1000 sNaN -> NaN Invalid_operation
|
||||
ddcms858 comparesig Inf sNaN -> NaN Invalid_operation
|
||||
ddcms859 comparesig NaN sNaN -> NaN Invalid_operation
|
||||
|
||||
-- propagating NaNs
|
||||
ddcms860 comparesig NaN9 -Inf -> NaN9 Invalid_operation
|
||||
ddcms861 comparesig NaN8 999 -> NaN8 Invalid_operation
|
||||
ddcms862 comparesig NaN77 Inf -> NaN77 Invalid_operation
|
||||
ddcms863 comparesig -NaN67 NaN5 -> -NaN67 Invalid_operation
|
||||
ddcms864 comparesig -Inf -NaN4 -> -NaN4 Invalid_operation
|
||||
ddcms865 comparesig -999 -NaN33 -> -NaN33 Invalid_operation
|
||||
ddcms866 comparesig Inf NaN2 -> NaN2 Invalid_operation
|
||||
ddcms867 comparesig -NaN41 -NaN42 -> -NaN41 Invalid_operation
|
||||
ddcms868 comparesig +NaN41 -NaN42 -> NaN41 Invalid_operation
|
||||
ddcms869 comparesig -NaN41 +NaN42 -> -NaN41 Invalid_operation
|
||||
ddcms870 comparesig +NaN41 +NaN42 -> NaN41 Invalid_operation
|
||||
|
||||
ddcms871 comparesig -sNaN99 -Inf -> -NaN99 Invalid_operation
|
||||
ddcms872 comparesig sNaN98 -11 -> NaN98 Invalid_operation
|
||||
ddcms873 comparesig sNaN97 NaN -> NaN97 Invalid_operation
|
||||
ddcms874 comparesig sNaN16 sNaN94 -> NaN16 Invalid_operation
|
||||
ddcms875 comparesig NaN85 sNaN83 -> NaN83 Invalid_operation
|
||||
ddcms876 comparesig -Inf sNaN92 -> NaN92 Invalid_operation
|
||||
ddcms877 comparesig 088 sNaN81 -> NaN81 Invalid_operation
|
||||
ddcms878 comparesig Inf sNaN90 -> NaN90 Invalid_operation
|
||||
ddcms879 comparesig NaN -sNaN89 -> -NaN89 Invalid_operation
|
||||
|
||||
-- wide range
|
||||
ddcms880 comparesig +1.23456789012345E-0 9E+384 -> -1
|
||||
ddcms881 comparesig 9E+384 +1.23456789012345E-0 -> 1
|
||||
ddcms882 comparesig +0.100 9E-383 -> 1
|
||||
ddcms883 comparesig 9E-383 +0.100 -> -1
|
||||
ddcms885 comparesig -1.23456789012345E-0 9E+384 -> -1
|
||||
ddcms886 comparesig 9E+384 -1.23456789012345E-0 -> 1
|
||||
ddcms887 comparesig -0.100 9E-383 -> -1
|
||||
ddcms888 comparesig 9E-383 -0.100 -> 1
|
||||
|
||||
-- signs
|
||||
ddcms901 comparesig 1e+77 1e+11 -> 1
|
||||
ddcms902 comparesig 1e+77 -1e+11 -> 1
|
||||
ddcms903 comparesig -1e+77 1e+11 -> -1
|
||||
ddcms904 comparesig -1e+77 -1e+11 -> -1
|
||||
ddcms905 comparesig 1e-77 1e-11 -> -1
|
||||
ddcms906 comparesig 1e-77 -1e-11 -> 1
|
||||
ddcms907 comparesig -1e-77 1e-11 -> -1
|
||||
ddcms908 comparesig -1e-77 -1e-11 -> 1
|
||||
|
||||
-- Null tests
|
||||
ddcms990 comparesig 10 # -> NaN Invalid_operation
|
||||
ddcms991 comparesig # 10 -> NaN Invalid_operation
|
@@ -0,0 +1,706 @@
|
||||
------------------------------------------------------------------------
|
||||
-- ddCompareTotal.decTest -- decDouble comparison using total ordering--
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
-- Note that we cannot assume add/subtract tests cover paths adequately,
|
||||
-- here, because the code might be quite different (comparison cannot
|
||||
-- overflow or underflow, so actual subtractions are not necessary).
|
||||
-- Similarly, comparetotal will have some radically different paths
|
||||
-- than compare.
|
||||
|
||||
-- All operands and results are decDoubles.
|
||||
precision: 16
|
||||
maxExponent: 384
|
||||
minExponent: -383
|
||||
extended: 1
|
||||
clamp: 1
|
||||
rounding: half_even
|
||||
|
||||
-- sanity checks
|
||||
ddcot001 comparetotal -2 -2 -> 0
|
||||
ddcot002 comparetotal -2 -1 -> -1
|
||||
ddcot003 comparetotal -2 0 -> -1
|
||||
ddcot004 comparetotal -2 1 -> -1
|
||||
ddcot005 comparetotal -2 2 -> -1
|
||||
ddcot006 comparetotal -1 -2 -> 1
|
||||
ddcot007 comparetotal -1 -1 -> 0
|
||||
ddcot008 comparetotal -1 0 -> -1
|
||||
ddcot009 comparetotal -1 1 -> -1
|
||||
ddcot010 comparetotal -1 2 -> -1
|
||||
ddcot011 comparetotal 0 -2 -> 1
|
||||
ddcot012 comparetotal 0 -1 -> 1
|
||||
ddcot013 comparetotal 0 0 -> 0
|
||||
ddcot014 comparetotal 0 1 -> -1
|
||||
ddcot015 comparetotal 0 2 -> -1
|
||||
ddcot016 comparetotal 1 -2 -> 1
|
||||
ddcot017 comparetotal 1 -1 -> 1
|
||||
ddcot018 comparetotal 1 0 -> 1
|
||||
ddcot019 comparetotal 1 1 -> 0
|
||||
ddcot020 comparetotal 1 2 -> -1
|
||||
ddcot021 comparetotal 2 -2 -> 1
|
||||
ddcot022 comparetotal 2 -1 -> 1
|
||||
ddcot023 comparetotal 2 0 -> 1
|
||||
ddcot025 comparetotal 2 1 -> 1
|
||||
ddcot026 comparetotal 2 2 -> 0
|
||||
|
||||
ddcot031 comparetotal -20 -20 -> 0
|
||||
ddcot032 comparetotal -20 -10 -> -1
|
||||
ddcot033 comparetotal -20 00 -> -1
|
||||
ddcot034 comparetotal -20 10 -> -1
|
||||
ddcot035 comparetotal -20 20 -> -1
|
||||
ddcot036 comparetotal -10 -20 -> 1
|
||||
ddcot037 comparetotal -10 -10 -> 0
|
||||
ddcot038 comparetotal -10 00 -> -1
|
||||
ddcot039 comparetotal -10 10 -> -1
|
||||
ddcot040 comparetotal -10 20 -> -1
|
||||
ddcot041 comparetotal 00 -20 -> 1
|
||||
ddcot042 comparetotal 00 -10 -> 1
|
||||
ddcot043 comparetotal 00 00 -> 0
|
||||
ddcot044 comparetotal 00 10 -> -1
|
||||
ddcot045 comparetotal 00 20 -> -1
|
||||
ddcot046 comparetotal 10 -20 -> 1
|
||||
ddcot047 comparetotal 10 -10 -> 1
|
||||
ddcot048 comparetotal 10 00 -> 1
|
||||
ddcot049 comparetotal 10 10 -> 0
|
||||
ddcot050 comparetotal 10 20 -> -1
|
||||
ddcot051 comparetotal 20 -20 -> 1
|
||||
ddcot052 comparetotal 20 -10 -> 1
|
||||
ddcot053 comparetotal 20 00 -> 1
|
||||
ddcot055 comparetotal 20 10 -> 1
|
||||
ddcot056 comparetotal 20 20 -> 0
|
||||
|
||||
ddcot061 comparetotal -2.0 -2.0 -> 0
|
||||
ddcot062 comparetotal -2.0 -1.0 -> -1
|
||||
ddcot063 comparetotal -2.0 0.0 -> -1
|
||||
ddcot064 comparetotal -2.0 1.0 -> -1
|
||||
ddcot065 comparetotal -2.0 2.0 -> -1
|
||||
ddcot066 comparetotal -1.0 -2.0 -> 1
|
||||
ddcot067 comparetotal -1.0 -1.0 -> 0
|
||||
ddcot068 comparetotal -1.0 0.0 -> -1
|
||||
ddcot069 comparetotal -1.0 1.0 -> -1
|
||||
ddcot070 comparetotal -1.0 2.0 -> -1
|
||||
ddcot071 comparetotal 0.0 -2.0 -> 1
|
||||
ddcot072 comparetotal 0.0 -1.0 -> 1
|
||||
ddcot073 comparetotal 0.0 0.0 -> 0
|
||||
ddcot074 comparetotal 0.0 1.0 -> -1
|
||||
ddcot075 comparetotal 0.0 2.0 -> -1
|
||||
ddcot076 comparetotal 1.0 -2.0 -> 1
|
||||
ddcot077 comparetotal 1.0 -1.0 -> 1
|
||||
ddcot078 comparetotal 1.0 0.0 -> 1
|
||||
ddcot079 comparetotal 1.0 1.0 -> 0
|
||||
ddcot080 comparetotal 1.0 2.0 -> -1
|
||||
ddcot081 comparetotal 2.0 -2.0 -> 1
|
||||
ddcot082 comparetotal 2.0 -1.0 -> 1
|
||||
ddcot083 comparetotal 2.0 0.0 -> 1
|
||||
ddcot085 comparetotal 2.0 1.0 -> 1
|
||||
ddcot086 comparetotal 2.0 2.0 -> 0
|
||||
|
||||
-- now some cases which might overflow if subtract were used
|
||||
ddcot090 comparetotal 9.99999999E+384 9.99999999E+384 -> 0
|
||||
ddcot091 comparetotal -9.99999999E+384 9.99999999E+384 -> -1
|
||||
ddcot092 comparetotal 9.99999999E+384 -9.99999999E+384 -> 1
|
||||
ddcot093 comparetotal -9.99999999E+384 -9.99999999E+384 -> 0
|
||||
|
||||
-- some differing length/exponent cases
|
||||
-- in this first group, compare would compare all equal
|
||||
ddcot100 comparetotal 7.0 7.0 -> 0
|
||||
ddcot101 comparetotal 7.0 7 -> -1
|
||||
ddcot102 comparetotal 7 7.0 -> 1
|
||||
ddcot103 comparetotal 7E+0 7.0 -> 1
|
||||
ddcot104 comparetotal 70E-1 7.0 -> 0
|
||||
ddcot105 comparetotal 0.7E+1 7 -> 0
|
||||
ddcot106 comparetotal 70E-1 7 -> -1
|
||||
ddcot107 comparetotal 7.0 7E+0 -> -1
|
||||
ddcot108 comparetotal 7.0 70E-1 -> 0
|
||||
ddcot109 comparetotal 7 0.7E+1 -> 0
|
||||
ddcot110 comparetotal 7 70E-1 -> 1
|
||||
|
||||
ddcot120 comparetotal 8.0 7.0 -> 1
|
||||
ddcot121 comparetotal 8.0 7 -> 1
|
||||
ddcot122 comparetotal 8 7.0 -> 1
|
||||
ddcot123 comparetotal 8E+0 7.0 -> 1
|
||||
ddcot124 comparetotal 80E-1 7.0 -> 1
|
||||
ddcot125 comparetotal 0.8E+1 7 -> 1
|
||||
ddcot126 comparetotal 80E-1 7 -> 1
|
||||
ddcot127 comparetotal 8.0 7E+0 -> 1
|
||||
ddcot128 comparetotal 8.0 70E-1 -> 1
|
||||
ddcot129 comparetotal 8 0.7E+1 -> 1
|
||||
ddcot130 comparetotal 8 70E-1 -> 1
|
||||
|
||||
ddcot140 comparetotal 8.0 9.0 -> -1
|
||||
ddcot141 comparetotal 8.0 9 -> -1
|
||||
ddcot142 comparetotal 8 9.0 -> -1
|
||||
ddcot143 comparetotal 8E+0 9.0 -> -1
|
||||
ddcot144 comparetotal 80E-1 9.0 -> -1
|
||||
ddcot145 comparetotal 0.8E+1 9 -> -1
|
||||
ddcot146 comparetotal 80E-1 9 -> -1
|
||||
ddcot147 comparetotal 8.0 9E+0 -> -1
|
||||
ddcot148 comparetotal 8.0 90E-1 -> -1
|
||||
ddcot149 comparetotal 8 0.9E+1 -> -1
|
||||
ddcot150 comparetotal 8 90E-1 -> -1
|
||||
|
||||
-- and again, with sign changes -+ ..
|
||||
ddcot200 comparetotal -7.0 7.0 -> -1
|
||||
ddcot201 comparetotal -7.0 7 -> -1
|
||||
ddcot202 comparetotal -7 7.0 -> -1
|
||||
ddcot203 comparetotal -7E+0 7.0 -> -1
|
||||
ddcot204 comparetotal -70E-1 7.0 -> -1
|
||||
ddcot205 comparetotal -0.7E+1 7 -> -1
|
||||
ddcot206 comparetotal -70E-1 7 -> -1
|
||||
ddcot207 comparetotal -7.0 7E+0 -> -1
|
||||
ddcot208 comparetotal -7.0 70E-1 -> -1
|
||||
ddcot209 comparetotal -7 0.7E+1 -> -1
|
||||
ddcot210 comparetotal -7 70E-1 -> -1
|
||||
|
||||
ddcot220 comparetotal -8.0 7.0 -> -1
|
||||
ddcot221 comparetotal -8.0 7 -> -1
|
||||
ddcot222 comparetotal -8 7.0 -> -1
|
||||
ddcot223 comparetotal -8E+0 7.0 -> -1
|
||||
ddcot224 comparetotal -80E-1 7.0 -> -1
|
||||
ddcot225 comparetotal -0.8E+1 7 -> -1
|
||||
ddcot226 comparetotal -80E-1 7 -> -1
|
||||
ddcot227 comparetotal -8.0 7E+0 -> -1
|
||||
ddcot228 comparetotal -8.0 70E-1 -> -1
|
||||
ddcot229 comparetotal -8 0.7E+1 -> -1
|
||||
ddcot230 comparetotal -8 70E-1 -> -1
|
||||
|
||||
ddcot240 comparetotal -8.0 9.0 -> -1
|
||||
ddcot241 comparetotal -8.0 9 -> -1
|
||||
ddcot242 comparetotal -8 9.0 -> -1
|
||||
ddcot243 comparetotal -8E+0 9.0 -> -1
|
||||
ddcot244 comparetotal -80E-1 9.0 -> -1
|
||||
ddcot245 comparetotal -0.8E+1 9 -> -1
|
||||
ddcot246 comparetotal -80E-1 9 -> -1
|
||||
ddcot247 comparetotal -8.0 9E+0 -> -1
|
||||
ddcot248 comparetotal -8.0 90E-1 -> -1
|
||||
ddcot249 comparetotal -8 0.9E+1 -> -1
|
||||
ddcot250 comparetotal -8 90E-1 -> -1
|
||||
|
||||
-- and again, with sign changes +- ..
|
||||
ddcot300 comparetotal 7.0 -7.0 -> 1
|
||||
ddcot301 comparetotal 7.0 -7 -> 1
|
||||
ddcot302 comparetotal 7 -7.0 -> 1
|
||||
ddcot303 comparetotal 7E+0 -7.0 -> 1
|
||||
ddcot304 comparetotal 70E-1 -7.0 -> 1
|
||||
ddcot305 comparetotal .7E+1 -7 -> 1
|
||||
ddcot306 comparetotal 70E-1 -7 -> 1
|
||||
ddcot307 comparetotal 7.0 -7E+0 -> 1
|
||||
ddcot308 comparetotal 7.0 -70E-1 -> 1
|
||||
ddcot309 comparetotal 7 -.7E+1 -> 1
|
||||
ddcot310 comparetotal 7 -70E-1 -> 1
|
||||
|
||||
ddcot320 comparetotal 8.0 -7.0 -> 1
|
||||
ddcot321 comparetotal 8.0 -7 -> 1
|
||||
ddcot322 comparetotal 8 -7.0 -> 1
|
||||
ddcot323 comparetotal 8E+0 -7.0 -> 1
|
||||
ddcot324 comparetotal 80E-1 -7.0 -> 1
|
||||
ddcot325 comparetotal .8E+1 -7 -> 1
|
||||
ddcot326 comparetotal 80E-1 -7 -> 1
|
||||
ddcot327 comparetotal 8.0 -7E+0 -> 1
|
||||
ddcot328 comparetotal 8.0 -70E-1 -> 1
|
||||
ddcot329 comparetotal 8 -.7E+1 -> 1
|
||||
ddcot330 comparetotal 8 -70E-1 -> 1
|
||||
|
||||
ddcot340 comparetotal 8.0 -9.0 -> 1
|
||||
ddcot341 comparetotal 8.0 -9 -> 1
|
||||
ddcot342 comparetotal 8 -9.0 -> 1
|
||||
ddcot343 comparetotal 8E+0 -9.0 -> 1
|
||||
ddcot344 comparetotal 80E-1 -9.0 -> 1
|
||||
ddcot345 comparetotal .8E+1 -9 -> 1
|
||||
ddcot346 comparetotal 80E-1 -9 -> 1
|
||||
ddcot347 comparetotal 8.0 -9E+0 -> 1
|
||||
ddcot348 comparetotal 8.0 -90E-1 -> 1
|
||||
ddcot349 comparetotal 8 -.9E+1 -> 1
|
||||
ddcot350 comparetotal 8 -90E-1 -> 1
|
||||
|
||||
-- and again, with sign changes -- ..
|
||||
ddcot400 comparetotal -7.0 -7.0 -> 0
|
||||
ddcot401 comparetotal -7.0 -7 -> 1
|
||||
ddcot402 comparetotal -7 -7.0 -> -1
|
||||
ddcot403 comparetotal -7E+0 -7.0 -> -1
|
||||
ddcot404 comparetotal -70E-1 -7.0 -> 0
|
||||
ddcot405 comparetotal -.7E+1 -7 -> 0
|
||||
ddcot406 comparetotal -70E-1 -7 -> 1
|
||||
ddcot407 comparetotal -7.0 -7E+0 -> 1
|
||||
ddcot408 comparetotal -7.0 -70E-1 -> 0
|
||||
ddcot409 comparetotal -7 -.7E+1 -> 0
|
||||
ddcot410 comparetotal -7 -70E-1 -> -1
|
||||
|
||||
ddcot420 comparetotal -8.0 -7.0 -> -1
|
||||
ddcot421 comparetotal -8.0 -7 -> -1
|
||||
ddcot422 comparetotal -8 -7.0 -> -1
|
||||
ddcot423 comparetotal -8E+0 -7.0 -> -1
|
||||
ddcot424 comparetotal -80E-1 -7.0 -> -1
|
||||
ddcot425 comparetotal -.8E+1 -7 -> -1
|
||||
ddcot426 comparetotal -80E-1 -7 -> -1
|
||||
ddcot427 comparetotal -8.0 -7E+0 -> -1
|
||||
ddcot428 comparetotal -8.0 -70E-1 -> -1
|
||||
ddcot429 comparetotal -8 -.7E+1 -> -1
|
||||
ddcot430 comparetotal -8 -70E-1 -> -1
|
||||
|
||||
ddcot440 comparetotal -8.0 -9.0 -> 1
|
||||
ddcot441 comparetotal -8.0 -9 -> 1
|
||||
ddcot442 comparetotal -8 -9.0 -> 1
|
||||
ddcot443 comparetotal -8E+0 -9.0 -> 1
|
||||
ddcot444 comparetotal -80E-1 -9.0 -> 1
|
||||
ddcot445 comparetotal -.8E+1 -9 -> 1
|
||||
ddcot446 comparetotal -80E-1 -9 -> 1
|
||||
ddcot447 comparetotal -8.0 -9E+0 -> 1
|
||||
ddcot448 comparetotal -8.0 -90E-1 -> 1
|
||||
ddcot449 comparetotal -8 -.9E+1 -> 1
|
||||
ddcot450 comparetotal -8 -90E-1 -> 1
|
||||
|
||||
|
||||
-- testcases that subtract to lots of zeros at boundaries [pgr]
|
||||
ddcot473 comparetotal 123.4560000000000E-89 123.456E-89 -> -1
|
||||
ddcot474 comparetotal 123.456000000000E+89 123.456E+89 -> -1
|
||||
ddcot475 comparetotal 123.45600000000E-89 123.456E-89 -> -1
|
||||
ddcot476 comparetotal 123.4560000000E+89 123.456E+89 -> -1
|
||||
ddcot477 comparetotal 123.456000000E-89 123.456E-89 -> -1
|
||||
ddcot478 comparetotal 123.45600000E+89 123.456E+89 -> -1
|
||||
ddcot479 comparetotal 123.4560000E-89 123.456E-89 -> -1
|
||||
ddcot480 comparetotal 123.456000E+89 123.456E+89 -> -1
|
||||
ddcot481 comparetotal 123.45600E-89 123.456E-89 -> -1
|
||||
ddcot482 comparetotal 123.4560E+89 123.456E+89 -> -1
|
||||
ddcot483 comparetotal 123.456E-89 123.456E-89 -> 0
|
||||
ddcot487 comparetotal 123.456E+89 123.4560000000000E+89 -> 1
|
||||
ddcot488 comparetotal 123.456E-89 123.456000000000E-89 -> 1
|
||||
ddcot489 comparetotal 123.456E+89 123.45600000000E+89 -> 1
|
||||
ddcot490 comparetotal 123.456E-89 123.4560000000E-89 -> 1
|
||||
ddcot491 comparetotal 123.456E+89 123.456000000E+89 -> 1
|
||||
ddcot492 comparetotal 123.456E-89 123.45600000E-89 -> 1
|
||||
ddcot493 comparetotal 123.456E+89 123.4560000E+89 -> 1
|
||||
ddcot494 comparetotal 123.456E-89 123.456000E-89 -> 1
|
||||
ddcot495 comparetotal 123.456E+89 123.45600E+89 -> 1
|
||||
ddcot496 comparetotal 123.456E-89 123.4560E-89 -> 1
|
||||
ddcot497 comparetotal 123.456E+89 123.456E+89 -> 0
|
||||
|
||||
-- wide-ranging, around precision; signs equal
|
||||
ddcot498 comparetotal 1 1E-17 -> 1
|
||||
ddcot499 comparetotal 1 1E-16 -> 1
|
||||
ddcot500 comparetotal 1 1E-15 -> 1
|
||||
ddcot501 comparetotal 1 1E-14 -> 1
|
||||
ddcot502 comparetotal 1 1E-13 -> 1
|
||||
ddcot503 comparetotal 1 1E-12 -> 1
|
||||
ddcot504 comparetotal 1 1E-11 -> 1
|
||||
ddcot505 comparetotal 1 1E-10 -> 1
|
||||
ddcot506 comparetotal 1 1E-9 -> 1
|
||||
ddcot507 comparetotal 1 1E-8 -> 1
|
||||
ddcot508 comparetotal 1 1E-7 -> 1
|
||||
ddcot509 comparetotal 1 1E-6 -> 1
|
||||
ddcot510 comparetotal 1 1E-5 -> 1
|
||||
ddcot511 comparetotal 1 1E-4 -> 1
|
||||
ddcot512 comparetotal 1 1E-3 -> 1
|
||||
ddcot513 comparetotal 1 1E-2 -> 1
|
||||
ddcot514 comparetotal 1 1E-1 -> 1
|
||||
ddcot515 comparetotal 1 1E-0 -> 0
|
||||
ddcot516 comparetotal 1 1E+1 -> -1
|
||||
ddcot517 comparetotal 1 1E+2 -> -1
|
||||
ddcot518 comparetotal 1 1E+3 -> -1
|
||||
ddcot519 comparetotal 1 1E+4 -> -1
|
||||
ddcot521 comparetotal 1 1E+5 -> -1
|
||||
ddcot522 comparetotal 1 1E+6 -> -1
|
||||
ddcot523 comparetotal 1 1E+7 -> -1
|
||||
ddcot524 comparetotal 1 1E+8 -> -1
|
||||
ddcot525 comparetotal 1 1E+9 -> -1
|
||||
ddcot526 comparetotal 1 1E+10 -> -1
|
||||
ddcot527 comparetotal 1 1E+11 -> -1
|
||||
ddcot528 comparetotal 1 1E+12 -> -1
|
||||
ddcot529 comparetotal 1 1E+13 -> -1
|
||||
ddcot530 comparetotal 1 1E+14 -> -1
|
||||
ddcot531 comparetotal 1 1E+15 -> -1
|
||||
ddcot532 comparetotal 1 1E+16 -> -1
|
||||
ddcot533 comparetotal 1 1E+17 -> -1
|
||||
-- LR swap
|
||||
ddcot538 comparetotal 1E-17 1 -> -1
|
||||
ddcot539 comparetotal 1E-16 1 -> -1
|
||||
ddcot540 comparetotal 1E-15 1 -> -1
|
||||
ddcot541 comparetotal 1E-14 1 -> -1
|
||||
ddcot542 comparetotal 1E-13 1 -> -1
|
||||
ddcot543 comparetotal 1E-12 1 -> -1
|
||||
ddcot544 comparetotal 1E-11 1 -> -1
|
||||
ddcot545 comparetotal 1E-10 1 -> -1
|
||||
ddcot546 comparetotal 1E-9 1 -> -1
|
||||
ddcot547 comparetotal 1E-8 1 -> -1
|
||||
ddcot548 comparetotal 1E-7 1 -> -1
|
||||
ddcot549 comparetotal 1E-6 1 -> -1
|
||||
ddcot550 comparetotal 1E-5 1 -> -1
|
||||
ddcot551 comparetotal 1E-4 1 -> -1
|
||||
ddcot552 comparetotal 1E-3 1 -> -1
|
||||
ddcot553 comparetotal 1E-2 1 -> -1
|
||||
ddcot554 comparetotal 1E-1 1 -> -1
|
||||
ddcot555 comparetotal 1E-0 1 -> 0
|
||||
ddcot556 comparetotal 1E+1 1 -> 1
|
||||
ddcot557 comparetotal 1E+2 1 -> 1
|
||||
ddcot558 comparetotal 1E+3 1 -> 1
|
||||
ddcot559 comparetotal 1E+4 1 -> 1
|
||||
ddcot561 comparetotal 1E+5 1 -> 1
|
||||
ddcot562 comparetotal 1E+6 1 -> 1
|
||||
ddcot563 comparetotal 1E+7 1 -> 1
|
||||
ddcot564 comparetotal 1E+8 1 -> 1
|
||||
ddcot565 comparetotal 1E+9 1 -> 1
|
||||
ddcot566 comparetotal 1E+10 1 -> 1
|
||||
ddcot567 comparetotal 1E+11 1 -> 1
|
||||
ddcot568 comparetotal 1E+12 1 -> 1
|
||||
ddcot569 comparetotal 1E+13 1 -> 1
|
||||
ddcot570 comparetotal 1E+14 1 -> 1
|
||||
ddcot571 comparetotal 1E+15 1 -> 1
|
||||
ddcot572 comparetotal 1E+16 1 -> 1
|
||||
ddcot573 comparetotal 1E+17 1 -> 1
|
||||
-- similar with a useful coefficient, one side only
|
||||
ddcot578 comparetotal 0.000000987654321 1E-17 -> 1
|
||||
ddcot579 comparetotal 0.000000987654321 1E-16 -> 1
|
||||
ddcot580 comparetotal 0.000000987654321 1E-15 -> 1
|
||||
ddcot581 comparetotal 0.000000987654321 1E-14 -> 1
|
||||
ddcot582 comparetotal 0.000000987654321 1E-13 -> 1
|
||||
ddcot583 comparetotal 0.000000987654321 1E-12 -> 1
|
||||
ddcot584 comparetotal 0.000000987654321 1E-11 -> 1
|
||||
ddcot585 comparetotal 0.000000987654321 1E-10 -> 1
|
||||
ddcot586 comparetotal 0.000000987654321 1E-9 -> 1
|
||||
ddcot587 comparetotal 0.000000987654321 1E-8 -> 1
|
||||
ddcot588 comparetotal 0.000000987654321 1E-7 -> 1
|
||||
ddcot589 comparetotal 0.000000987654321 1E-6 -> -1
|
||||
ddcot590 comparetotal 0.000000987654321 1E-5 -> -1
|
||||
ddcot591 comparetotal 0.000000987654321 1E-4 -> -1
|
||||
ddcot592 comparetotal 0.000000987654321 1E-3 -> -1
|
||||
ddcot593 comparetotal 0.000000987654321 1E-2 -> -1
|
||||
ddcot594 comparetotal 0.000000987654321 1E-1 -> -1
|
||||
ddcot595 comparetotal 0.000000987654321 1E-0 -> -1
|
||||
ddcot596 comparetotal 0.000000987654321 1E+1 -> -1
|
||||
ddcot597 comparetotal 0.000000987654321 1E+2 -> -1
|
||||
ddcot598 comparetotal 0.000000987654321 1E+3 -> -1
|
||||
ddcot599 comparetotal 0.000000987654321 1E+4 -> -1
|
||||
|
||||
-- check some unit-y traps
|
||||
ddcot600 comparetotal 12 12.2345 -> -1
|
||||
ddcot601 comparetotal 12.0 12.2345 -> -1
|
||||
ddcot602 comparetotal 12.00 12.2345 -> -1
|
||||
ddcot603 comparetotal 12.000 12.2345 -> -1
|
||||
ddcot604 comparetotal 12.0000 12.2345 -> -1
|
||||
ddcot605 comparetotal 12.00000 12.2345 -> -1
|
||||
ddcot606 comparetotal 12.000000 12.2345 -> -1
|
||||
ddcot607 comparetotal 12.0000000 12.2345 -> -1
|
||||
ddcot608 comparetotal 12.00000000 12.2345 -> -1
|
||||
ddcot609 comparetotal 12.000000000 12.2345 -> -1
|
||||
ddcot610 comparetotal 12.1234 12 -> 1
|
||||
ddcot611 comparetotal 12.1234 12.0 -> 1
|
||||
ddcot612 comparetotal 12.1234 12.00 -> 1
|
||||
ddcot613 comparetotal 12.1234 12.000 -> 1
|
||||
ddcot614 comparetotal 12.1234 12.0000 -> 1
|
||||
ddcot615 comparetotal 12.1234 12.00000 -> 1
|
||||
ddcot616 comparetotal 12.1234 12.000000 -> 1
|
||||
ddcot617 comparetotal 12.1234 12.0000000 -> 1
|
||||
ddcot618 comparetotal 12.1234 12.00000000 -> 1
|
||||
ddcot619 comparetotal 12.1234 12.000000000 -> 1
|
||||
ddcot620 comparetotal -12 -12.2345 -> 1
|
||||
ddcot621 comparetotal -12.0 -12.2345 -> 1
|
||||
ddcot622 comparetotal -12.00 -12.2345 -> 1
|
||||
ddcot623 comparetotal -12.000 -12.2345 -> 1
|
||||
ddcot624 comparetotal -12.0000 -12.2345 -> 1
|
||||
ddcot625 comparetotal -12.00000 -12.2345 -> 1
|
||||
ddcot626 comparetotal -12.000000 -12.2345 -> 1
|
||||
ddcot627 comparetotal -12.0000000 -12.2345 -> 1
|
||||
ddcot628 comparetotal -12.00000000 -12.2345 -> 1
|
||||
ddcot629 comparetotal -12.000000000 -12.2345 -> 1
|
||||
ddcot630 comparetotal -12.1234 -12 -> -1
|
||||
ddcot631 comparetotal -12.1234 -12.0 -> -1
|
||||
ddcot632 comparetotal -12.1234 -12.00 -> -1
|
||||
ddcot633 comparetotal -12.1234 -12.000 -> -1
|
||||
ddcot634 comparetotal -12.1234 -12.0000 -> -1
|
||||
ddcot635 comparetotal -12.1234 -12.00000 -> -1
|
||||
ddcot636 comparetotal -12.1234 -12.000000 -> -1
|
||||
ddcot637 comparetotal -12.1234 -12.0000000 -> -1
|
||||
ddcot638 comparetotal -12.1234 -12.00000000 -> -1
|
||||
ddcot639 comparetotal -12.1234 -12.000000000 -> -1
|
||||
|
||||
-- extended zeros
|
||||
ddcot640 comparetotal 0 0 -> 0
|
||||
ddcot641 comparetotal 0 -0 -> 1
|
||||
ddcot642 comparetotal 0 -0.0 -> 1
|
||||
ddcot643 comparetotal 0 0.0 -> 1
|
||||
ddcot644 comparetotal -0 0 -> -1
|
||||
ddcot645 comparetotal -0 -0 -> 0
|
||||
ddcot646 comparetotal -0 -0.0 -> -1
|
||||
ddcot647 comparetotal -0 0.0 -> -1
|
||||
ddcot648 comparetotal 0.0 0 -> -1
|
||||
ddcot649 comparetotal 0.0 -0 -> 1
|
||||
ddcot650 comparetotal 0.0 -0.0 -> 1
|
||||
ddcot651 comparetotal 0.0 0.0 -> 0
|
||||
ddcot652 comparetotal -0.0 0 -> -1
|
||||
ddcot653 comparetotal -0.0 -0 -> 1
|
||||
ddcot654 comparetotal -0.0 -0.0 -> 0
|
||||
ddcot655 comparetotal -0.0 0.0 -> -1
|
||||
|
||||
ddcot656 comparetotal -0E1 0.0 -> -1
|
||||
ddcot657 comparetotal -0E2 0.0 -> -1
|
||||
ddcot658 comparetotal 0E1 0.0 -> 1
|
||||
ddcot659 comparetotal 0E2 0.0 -> 1
|
||||
ddcot660 comparetotal -0E1 0 -> -1
|
||||
ddcot661 comparetotal -0E2 0 -> -1
|
||||
ddcot662 comparetotal 0E1 0 -> 1
|
||||
ddcot663 comparetotal 0E2 0 -> 1
|
||||
ddcot664 comparetotal -0E1 -0E1 -> 0
|
||||
ddcot665 comparetotal -0E2 -0E1 -> -1
|
||||
ddcot666 comparetotal 0E1 -0E1 -> 1
|
||||
ddcot667 comparetotal 0E2 -0E1 -> 1
|
||||
ddcot668 comparetotal -0E1 -0E2 -> 1
|
||||
ddcot669 comparetotal -0E2 -0E2 -> 0
|
||||
ddcot670 comparetotal 0E1 -0E2 -> 1
|
||||
ddcot671 comparetotal 0E2 -0E2 -> 1
|
||||
ddcot672 comparetotal -0E1 0E1 -> -1
|
||||
ddcot673 comparetotal -0E2 0E1 -> -1
|
||||
ddcot674 comparetotal 0E1 0E1 -> 0
|
||||
ddcot675 comparetotal 0E2 0E1 -> 1
|
||||
ddcot676 comparetotal -0E1 0E2 -> -1
|
||||
ddcot677 comparetotal -0E2 0E2 -> -1
|
||||
ddcot678 comparetotal 0E1 0E2 -> -1
|
||||
ddcot679 comparetotal 0E2 0E2 -> 0
|
||||
|
||||
-- trailing zeros; unit-y
|
||||
ddcot680 comparetotal 12 12 -> 0
|
||||
ddcot681 comparetotal 12 12.0 -> 1
|
||||
ddcot682 comparetotal 12 12.00 -> 1
|
||||
ddcot683 comparetotal 12 12.000 -> 1
|
||||
ddcot684 comparetotal 12 12.0000 -> 1
|
||||
ddcot685 comparetotal 12 12.00000 -> 1
|
||||
ddcot686 comparetotal 12 12.000000 -> 1
|
||||
ddcot687 comparetotal 12 12.0000000 -> 1
|
||||
ddcot688 comparetotal 12 12.00000000 -> 1
|
||||
ddcot689 comparetotal 12 12.000000000 -> 1
|
||||
ddcot690 comparetotal 12 12 -> 0
|
||||
ddcot691 comparetotal 12.0 12 -> -1
|
||||
ddcot692 comparetotal 12.00 12 -> -1
|
||||
ddcot693 comparetotal 12.000 12 -> -1
|
||||
ddcot694 comparetotal 12.0000 12 -> -1
|
||||
ddcot695 comparetotal 12.00000 12 -> -1
|
||||
ddcot696 comparetotal 12.000000 12 -> -1
|
||||
ddcot697 comparetotal 12.0000000 12 -> -1
|
||||
ddcot698 comparetotal 12.00000000 12 -> -1
|
||||
ddcot699 comparetotal 12.000000000 12 -> -1
|
||||
|
||||
-- old long operand checks
|
||||
ddcot701 comparetotal 12345678000 1 -> 1
|
||||
ddcot702 comparetotal 1 12345678000 -> -1
|
||||
ddcot703 comparetotal 1234567800 1 -> 1
|
||||
ddcot704 comparetotal 1 1234567800 -> -1
|
||||
ddcot705 comparetotal 1234567890 1 -> 1
|
||||
ddcot706 comparetotal 1 1234567890 -> -1
|
||||
ddcot707 comparetotal 1234567891 1 -> 1
|
||||
ddcot708 comparetotal 1 1234567891 -> -1
|
||||
ddcot709 comparetotal 12345678901 1 -> 1
|
||||
ddcot710 comparetotal 1 12345678901 -> -1
|
||||
ddcot711 comparetotal 1234567896 1 -> 1
|
||||
ddcot712 comparetotal 1 1234567896 -> -1
|
||||
ddcot713 comparetotal -1234567891 1 -> -1
|
||||
ddcot714 comparetotal 1 -1234567891 -> 1
|
||||
ddcot715 comparetotal -12345678901 1 -> -1
|
||||
ddcot716 comparetotal 1 -12345678901 -> 1
|
||||
ddcot717 comparetotal -1234567896 1 -> -1
|
||||
ddcot718 comparetotal 1 -1234567896 -> 1
|
||||
|
||||
-- old residue cases
|
||||
ddcot740 comparetotal 1 0.9999999 -> 1
|
||||
ddcot741 comparetotal 1 0.999999 -> 1
|
||||
ddcot742 comparetotal 1 0.99999 -> 1
|
||||
ddcot743 comparetotal 1 1.0000 -> 1
|
||||
ddcot744 comparetotal 1 1.00001 -> -1
|
||||
ddcot745 comparetotal 1 1.000001 -> -1
|
||||
ddcot746 comparetotal 1 1.0000001 -> -1
|
||||
ddcot750 comparetotal 0.9999999 1 -> -1
|
||||
ddcot751 comparetotal 0.999999 1 -> -1
|
||||
ddcot752 comparetotal 0.99999 1 -> -1
|
||||
ddcot753 comparetotal 1.0000 1 -> -1
|
||||
ddcot754 comparetotal 1.00001 1 -> 1
|
||||
ddcot755 comparetotal 1.000001 1 -> 1
|
||||
ddcot756 comparetotal 1.0000001 1 -> 1
|
||||
|
||||
-- Specials
|
||||
ddcot780 comparetotal Inf -Inf -> 1
|
||||
ddcot781 comparetotal Inf -1000 -> 1
|
||||
ddcot782 comparetotal Inf -1 -> 1
|
||||
ddcot783 comparetotal Inf -0 -> 1
|
||||
ddcot784 comparetotal Inf 0 -> 1
|
||||
ddcot785 comparetotal Inf 1 -> 1
|
||||
ddcot786 comparetotal Inf 1000 -> 1
|
||||
ddcot787 comparetotal Inf Inf -> 0
|
||||
ddcot788 comparetotal -1000 Inf -> -1
|
||||
ddcot789 comparetotal -Inf Inf -> -1
|
||||
ddcot790 comparetotal -1 Inf -> -1
|
||||
ddcot791 comparetotal -0 Inf -> -1
|
||||
ddcot792 comparetotal 0 Inf -> -1
|
||||
ddcot793 comparetotal 1 Inf -> -1
|
||||
ddcot794 comparetotal 1000 Inf -> -1
|
||||
ddcot795 comparetotal Inf Inf -> 0
|
||||
|
||||
ddcot800 comparetotal -Inf -Inf -> 0
|
||||
ddcot801 comparetotal -Inf -1000 -> -1
|
||||
ddcot802 comparetotal -Inf -1 -> -1
|
||||
ddcot803 comparetotal -Inf -0 -> -1
|
||||
ddcot804 comparetotal -Inf 0 -> -1
|
||||
ddcot805 comparetotal -Inf 1 -> -1
|
||||
ddcot806 comparetotal -Inf 1000 -> -1
|
||||
ddcot807 comparetotal -Inf Inf -> -1
|
||||
ddcot808 comparetotal -Inf -Inf -> 0
|
||||
ddcot809 comparetotal -1000 -Inf -> 1
|
||||
ddcot810 comparetotal -1 -Inf -> 1
|
||||
ddcot811 comparetotal -0 -Inf -> 1
|
||||
ddcot812 comparetotal 0 -Inf -> 1
|
||||
ddcot813 comparetotal 1 -Inf -> 1
|
||||
ddcot814 comparetotal 1000 -Inf -> 1
|
||||
ddcot815 comparetotal Inf -Inf -> 1
|
||||
|
||||
ddcot821 comparetotal NaN -Inf -> 1
|
||||
ddcot822 comparetotal NaN -1000 -> 1
|
||||
ddcot823 comparetotal NaN -1 -> 1
|
||||
ddcot824 comparetotal NaN -0 -> 1
|
||||
ddcot825 comparetotal NaN 0 -> 1
|
||||
ddcot826 comparetotal NaN 1 -> 1
|
||||
ddcot827 comparetotal NaN 1000 -> 1
|
||||
ddcot828 comparetotal NaN Inf -> 1
|
||||
ddcot829 comparetotal NaN NaN -> 0
|
||||
ddcot830 comparetotal -Inf NaN -> -1
|
||||
ddcot831 comparetotal -1000 NaN -> -1
|
||||
ddcot832 comparetotal -1 NaN -> -1
|
||||
ddcot833 comparetotal -0 NaN -> -1
|
||||
ddcot834 comparetotal 0 NaN -> -1
|
||||
ddcot835 comparetotal 1 NaN -> -1
|
||||
ddcot836 comparetotal 1000 NaN -> -1
|
||||
ddcot837 comparetotal Inf NaN -> -1
|
||||
ddcot838 comparetotal -NaN -NaN -> 0
|
||||
ddcot839 comparetotal +NaN -NaN -> 1
|
||||
ddcot840 comparetotal -NaN +NaN -> -1
|
||||
|
||||
ddcot841 comparetotal sNaN -sNaN -> 1
|
||||
ddcot842 comparetotal sNaN -NaN -> 1
|
||||
ddcot843 comparetotal sNaN -Inf -> 1
|
||||
ddcot844 comparetotal sNaN -1000 -> 1
|
||||
ddcot845 comparetotal sNaN -1 -> 1
|
||||
ddcot846 comparetotal sNaN -0 -> 1
|
||||
ddcot847 comparetotal sNaN 0 -> 1
|
||||
ddcot848 comparetotal sNaN 1 -> 1
|
||||
ddcot849 comparetotal sNaN 1000 -> 1
|
||||
ddcot850 comparetotal sNaN NaN -> -1
|
||||
ddcot851 comparetotal sNaN sNaN -> 0
|
||||
|
||||
ddcot852 comparetotal -sNaN sNaN -> -1
|
||||
ddcot853 comparetotal -NaN sNaN -> -1
|
||||
ddcot854 comparetotal -Inf sNaN -> -1
|
||||
ddcot855 comparetotal -1000 sNaN -> -1
|
||||
ddcot856 comparetotal -1 sNaN -> -1
|
||||
ddcot857 comparetotal -0 sNaN -> -1
|
||||
ddcot858 comparetotal 0 sNaN -> -1
|
||||
ddcot859 comparetotal 1 sNaN -> -1
|
||||
ddcot860 comparetotal 1000 sNaN -> -1
|
||||
ddcot861 comparetotal Inf sNaN -> -1
|
||||
ddcot862 comparetotal NaN sNaN -> 1
|
||||
ddcot863 comparetotal sNaN sNaN -> 0
|
||||
|
||||
ddcot871 comparetotal -sNaN -sNaN -> 0
|
||||
ddcot872 comparetotal -sNaN -NaN -> 1
|
||||
ddcot873 comparetotal -sNaN -Inf -> -1
|
||||
ddcot874 comparetotal -sNaN -1000 -> -1
|
||||
ddcot875 comparetotal -sNaN -1 -> -1
|
||||
ddcot876 comparetotal -sNaN -0 -> -1
|
||||
ddcot877 comparetotal -sNaN 0 -> -1
|
||||
ddcot878 comparetotal -sNaN 1 -> -1
|
||||
ddcot879 comparetotal -sNaN 1000 -> -1
|
||||
ddcot880 comparetotal -sNaN NaN -> -1
|
||||
ddcot881 comparetotal -sNaN sNaN -> -1
|
||||
|
||||
ddcot882 comparetotal -sNaN -sNaN -> 0
|
||||
ddcot883 comparetotal -NaN -sNaN -> -1
|
||||
ddcot884 comparetotal -Inf -sNaN -> 1
|
||||
ddcot885 comparetotal -1000 -sNaN -> 1
|
||||
ddcot886 comparetotal -1 -sNaN -> 1
|
||||
ddcot887 comparetotal -0 -sNaN -> 1
|
||||
ddcot888 comparetotal 0 -sNaN -> 1
|
||||
ddcot889 comparetotal 1 -sNaN -> 1
|
||||
ddcot890 comparetotal 1000 -sNaN -> 1
|
||||
ddcot891 comparetotal Inf -sNaN -> 1
|
||||
ddcot892 comparetotal NaN -sNaN -> 1
|
||||
ddcot893 comparetotal sNaN -sNaN -> 1
|
||||
|
||||
-- NaNs with payload
|
||||
ddcot960 comparetotal NaN9 -Inf -> 1
|
||||
ddcot961 comparetotal NaN8 999 -> 1
|
||||
ddcot962 comparetotal NaN77 Inf -> 1
|
||||
ddcot963 comparetotal -NaN67 NaN5 -> -1
|
||||
ddcot964 comparetotal -Inf -NaN4 -> 1
|
||||
ddcot965 comparetotal -999 -NaN33 -> 1
|
||||
ddcot966 comparetotal Inf NaN2 -> -1
|
||||
|
||||
ddcot970 comparetotal -NaN41 -NaN42 -> 1
|
||||
ddcot971 comparetotal +NaN41 -NaN42 -> 1
|
||||
ddcot972 comparetotal -NaN41 +NaN42 -> -1
|
||||
ddcot973 comparetotal +NaN41 +NaN42 -> -1
|
||||
ddcot974 comparetotal -NaN42 -NaN01 -> -1
|
||||
ddcot975 comparetotal +NaN42 -NaN01 -> 1
|
||||
ddcot976 comparetotal -NaN42 +NaN01 -> -1
|
||||
ddcot977 comparetotal +NaN42 +NaN01 -> 1
|
||||
|
||||
ddcot980 comparetotal -sNaN771 -sNaN772 -> 1
|
||||
ddcot981 comparetotal +sNaN771 -sNaN772 -> 1
|
||||
ddcot982 comparetotal -sNaN771 +sNaN772 -> -1
|
||||
ddcot983 comparetotal +sNaN771 +sNaN772 -> -1
|
||||
ddcot984 comparetotal -sNaN772 -sNaN771 -> -1
|
||||
ddcot985 comparetotal +sNaN772 -sNaN771 -> 1
|
||||
ddcot986 comparetotal -sNaN772 +sNaN771 -> -1
|
||||
ddcot987 comparetotal +sNaN772 +sNaN771 -> 1
|
||||
|
||||
ddcot991 comparetotal -sNaN99 -Inf -> -1
|
||||
ddcot992 comparetotal sNaN98 -11 -> 1
|
||||
ddcot993 comparetotal sNaN97 NaN -> -1
|
||||
ddcot994 comparetotal sNaN16 sNaN94 -> -1
|
||||
ddcot995 comparetotal NaN85 sNaN83 -> 1
|
||||
ddcot996 comparetotal -Inf sNaN92 -> -1
|
||||
ddcot997 comparetotal 088 sNaN81 -> -1
|
||||
ddcot998 comparetotal Inf sNaN90 -> -1
|
||||
ddcot999 comparetotal NaN -sNaN89 -> 1
|
||||
|
||||
-- spread zeros
|
||||
ddcot1110 comparetotal 0E-383 0 -> -1
|
||||
ddcot1111 comparetotal 0E-383 -0 -> 1
|
||||
ddcot1112 comparetotal -0E-383 0 -> -1
|
||||
ddcot1113 comparetotal -0E-383 -0 -> 1
|
||||
ddcot1114 comparetotal 0E-383 0E+384 -> -1
|
||||
ddcot1115 comparetotal 0E-383 -0E+384 -> 1
|
||||
ddcot1116 comparetotal -0E-383 0E+384 -> -1
|
||||
ddcot1117 comparetotal -0E-383 -0E+384 -> 1
|
||||
ddcot1118 comparetotal 0 0E+384 -> -1
|
||||
ddcot1119 comparetotal 0 -0E+384 -> 1
|
||||
ddcot1120 comparetotal -0 0E+384 -> -1
|
||||
ddcot1121 comparetotal -0 -0E+384 -> 1
|
||||
|
||||
ddcot1130 comparetotal 0E+384 0 -> 1
|
||||
ddcot1131 comparetotal 0E+384 -0 -> 1
|
||||
ddcot1132 comparetotal -0E+384 0 -> -1
|
||||
ddcot1133 comparetotal -0E+384 -0 -> -1
|
||||
ddcot1134 comparetotal 0E+384 0E-383 -> 1
|
||||
ddcot1135 comparetotal 0E+384 -0E-383 -> 1
|
||||
ddcot1136 comparetotal -0E+384 0E-383 -> -1
|
||||
ddcot1137 comparetotal -0E+384 -0E-383 -> -1
|
||||
ddcot1138 comparetotal 0 0E-383 -> 1
|
||||
ddcot1139 comparetotal 0 -0E-383 -> 1
|
||||
ddcot1140 comparetotal -0 0E-383 -> -1
|
||||
ddcot1141 comparetotal -0 -0E-383 -> -1
|
||||
|
||||
-- Null tests
|
||||
ddcot9990 comparetotal 10 # -> NaN Invalid_operation
|
||||
ddcot9991 comparetotal # 10 -> NaN Invalid_operation
|
@@ -0,0 +1,706 @@
|
||||
------------------------------------------------------------------------
|
||||
-- ddCompareTotalMag.decTest -- decDouble comparison; abs. total order--
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
-- Note that we cannot assume add/subtract tests cover paths adequately,
|
||||
-- here, because the code might be quite different (comparison cannot
|
||||
-- overflow or underflow, so actual subtractions are not necessary).
|
||||
-- Similarly, comparetotal will have some radically different paths
|
||||
-- than compare.
|
||||
|
||||
-- All operands and results are decDoubles.
|
||||
precision: 16
|
||||
maxExponent: 384
|
||||
minExponent: -383
|
||||
extended: 1
|
||||
clamp: 1
|
||||
rounding: half_even
|
||||
|
||||
-- sanity checks
|
||||
ddctm001 comparetotmag -2 -2 -> 0
|
||||
ddctm002 comparetotmag -2 -1 -> 1
|
||||
ddctm003 comparetotmag -2 0 -> 1
|
||||
ddctm004 comparetotmag -2 1 -> 1
|
||||
ddctm005 comparetotmag -2 2 -> 0
|
||||
ddctm006 comparetotmag -1 -2 -> -1
|
||||
ddctm007 comparetotmag -1 -1 -> 0
|
||||
ddctm008 comparetotmag -1 0 -> 1
|
||||
ddctm009 comparetotmag -1 1 -> 0
|
||||
ddctm010 comparetotmag -1 2 -> -1
|
||||
ddctm011 comparetotmag 0 -2 -> -1
|
||||
ddctm012 comparetotmag 0 -1 -> -1
|
||||
ddctm013 comparetotmag 0 0 -> 0
|
||||
ddctm014 comparetotmag 0 1 -> -1
|
||||
ddctm015 comparetotmag 0 2 -> -1
|
||||
ddctm016 comparetotmag 1 -2 -> -1
|
||||
ddctm017 comparetotmag 1 -1 -> 0
|
||||
ddctm018 comparetotmag 1 0 -> 1
|
||||
ddctm019 comparetotmag 1 1 -> 0
|
||||
ddctm020 comparetotmag 1 2 -> -1
|
||||
ddctm021 comparetotmag 2 -2 -> 0
|
||||
ddctm022 comparetotmag 2 -1 -> 1
|
||||
ddctm023 comparetotmag 2 0 -> 1
|
||||
ddctm025 comparetotmag 2 1 -> 1
|
||||
ddctm026 comparetotmag 2 2 -> 0
|
||||
|
||||
ddctm031 comparetotmag -20 -20 -> 0
|
||||
ddctm032 comparetotmag -20 -10 -> 1
|
||||
ddctm033 comparetotmag -20 00 -> 1
|
||||
ddctm034 comparetotmag -20 10 -> 1
|
||||
ddctm035 comparetotmag -20 20 -> 0
|
||||
ddctm036 comparetotmag -10 -20 -> -1
|
||||
ddctm037 comparetotmag -10 -10 -> 0
|
||||
ddctm038 comparetotmag -10 00 -> 1
|
||||
ddctm039 comparetotmag -10 10 -> 0
|
||||
ddctm040 comparetotmag -10 20 -> -1
|
||||
ddctm041 comparetotmag 00 -20 -> -1
|
||||
ddctm042 comparetotmag 00 -10 -> -1
|
||||
ddctm043 comparetotmag 00 00 -> 0
|
||||
ddctm044 comparetotmag 00 10 -> -1
|
||||
ddctm045 comparetotmag 00 20 -> -1
|
||||
ddctm046 comparetotmag 10 -20 -> -1
|
||||
ddctm047 comparetotmag 10 -10 -> 0
|
||||
ddctm048 comparetotmag 10 00 -> 1
|
||||
ddctm049 comparetotmag 10 10 -> 0
|
||||
ddctm050 comparetotmag 10 20 -> -1
|
||||
ddctm051 comparetotmag 20 -20 -> 0
|
||||
ddctm052 comparetotmag 20 -10 -> 1
|
||||
ddctm053 comparetotmag 20 00 -> 1
|
||||
ddctm055 comparetotmag 20 10 -> 1
|
||||
ddctm056 comparetotmag 20 20 -> 0
|
||||
|
||||
ddctm061 comparetotmag -2.0 -2.0 -> 0
|
||||
ddctm062 comparetotmag -2.0 -1.0 -> 1
|
||||
ddctm063 comparetotmag -2.0 0.0 -> 1
|
||||
ddctm064 comparetotmag -2.0 1.0 -> 1
|
||||
ddctm065 comparetotmag -2.0 2.0 -> 0
|
||||
ddctm066 comparetotmag -1.0 -2.0 -> -1
|
||||
ddctm067 comparetotmag -1.0 -1.0 -> 0
|
||||
ddctm068 comparetotmag -1.0 0.0 -> 1
|
||||
ddctm069 comparetotmag -1.0 1.0 -> 0
|
||||
ddctm070 comparetotmag -1.0 2.0 -> -1
|
||||
ddctm071 comparetotmag 0.0 -2.0 -> -1
|
||||
ddctm072 comparetotmag 0.0 -1.0 -> -1
|
||||
ddctm073 comparetotmag 0.0 0.0 -> 0
|
||||
ddctm074 comparetotmag 0.0 1.0 -> -1
|
||||
ddctm075 comparetotmag 0.0 2.0 -> -1
|
||||
ddctm076 comparetotmag 1.0 -2.0 -> -1
|
||||
ddctm077 comparetotmag 1.0 -1.0 -> 0
|
||||
ddctm078 comparetotmag 1.0 0.0 -> 1
|
||||
ddctm079 comparetotmag 1.0 1.0 -> 0
|
||||
ddctm080 comparetotmag 1.0 2.0 -> -1
|
||||
ddctm081 comparetotmag 2.0 -2.0 -> 0
|
||||
ddctm082 comparetotmag 2.0 -1.0 -> 1
|
||||
ddctm083 comparetotmag 2.0 0.0 -> 1
|
||||
ddctm085 comparetotmag 2.0 1.0 -> 1
|
||||
ddctm086 comparetotmag 2.0 2.0 -> 0
|
||||
|
||||
-- now some cases which might overflow if subtract were used
|
||||
ddctm090 comparetotmag 9.99999999E+384 9.99999999E+384 -> 0
|
||||
ddctm091 comparetotmag -9.99999999E+384 9.99999999E+384 -> 0
|
||||
ddctm092 comparetotmag 9.99999999E+384 -9.99999999E+384 -> 0
|
||||
ddctm093 comparetotmag -9.99999999E+384 -9.99999999E+384 -> 0
|
||||
|
||||
-- some differing length/exponent cases
|
||||
-- in this first group, compare would compare all equal
|
||||
ddctm100 comparetotmag 7.0 7.0 -> 0
|
||||
ddctm101 comparetotmag 7.0 7 -> -1
|
||||
ddctm102 comparetotmag 7 7.0 -> 1
|
||||
ddctm103 comparetotmag 7E+0 7.0 -> 1
|
||||
ddctm104 comparetotmag 70E-1 7.0 -> 0
|
||||
ddctm105 comparetotmag 0.7E+1 7 -> 0
|
||||
ddctm106 comparetotmag 70E-1 7 -> -1
|
||||
ddctm107 comparetotmag 7.0 7E+0 -> -1
|
||||
ddctm108 comparetotmag 7.0 70E-1 -> 0
|
||||
ddctm109 comparetotmag 7 0.7E+1 -> 0
|
||||
ddctm110 comparetotmag 7 70E-1 -> 1
|
||||
|
||||
ddctm120 comparetotmag 8.0 7.0 -> 1
|
||||
ddctm121 comparetotmag 8.0 7 -> 1
|
||||
ddctm122 comparetotmag 8 7.0 -> 1
|
||||
ddctm123 comparetotmag 8E+0 7.0 -> 1
|
||||
ddctm124 comparetotmag 80E-1 7.0 -> 1
|
||||
ddctm125 comparetotmag 0.8E+1 7 -> 1
|
||||
ddctm126 comparetotmag 80E-1 7 -> 1
|
||||
ddctm127 comparetotmag 8.0 7E+0 -> 1
|
||||
ddctm128 comparetotmag 8.0 70E-1 -> 1
|
||||
ddctm129 comparetotmag 8 0.7E+1 -> 1
|
||||
ddctm130 comparetotmag 8 70E-1 -> 1
|
||||
|
||||
ddctm140 comparetotmag 8.0 9.0 -> -1
|
||||
ddctm141 comparetotmag 8.0 9 -> -1
|
||||
ddctm142 comparetotmag 8 9.0 -> -1
|
||||
ddctm143 comparetotmag 8E+0 9.0 -> -1
|
||||
ddctm144 comparetotmag 80E-1 9.0 -> -1
|
||||
ddctm145 comparetotmag 0.8E+1 9 -> -1
|
||||
ddctm146 comparetotmag 80E-1 9 -> -1
|
||||
ddctm147 comparetotmag 8.0 9E+0 -> -1
|
||||
ddctm148 comparetotmag 8.0 90E-1 -> -1
|
||||
ddctm149 comparetotmag 8 0.9E+1 -> -1
|
||||
ddctm150 comparetotmag 8 90E-1 -> -1
|
||||
|
||||
-- and again, with sign changes -+ ..
|
||||
ddctm200 comparetotmag -7.0 7.0 -> 0
|
||||
ddctm201 comparetotmag -7.0 7 -> -1
|
||||
ddctm202 comparetotmag -7 7.0 -> 1
|
||||
ddctm203 comparetotmag -7E+0 7.0 -> 1
|
||||
ddctm204 comparetotmag -70E-1 7.0 -> 0
|
||||
ddctm205 comparetotmag -0.7E+1 7 -> 0
|
||||
ddctm206 comparetotmag -70E-1 7 -> -1
|
||||
ddctm207 comparetotmag -7.0 7E+0 -> -1
|
||||
ddctm208 comparetotmag -7.0 70E-1 -> 0
|
||||
ddctm209 comparetotmag -7 0.7E+1 -> 0
|
||||
ddctm210 comparetotmag -7 70E-1 -> 1
|
||||
|
||||
ddctm220 comparetotmag -8.0 7.0 -> 1
|
||||
ddctm221 comparetotmag -8.0 7 -> 1
|
||||
ddctm222 comparetotmag -8 7.0 -> 1
|
||||
ddctm223 comparetotmag -8E+0 7.0 -> 1
|
||||
ddctm224 comparetotmag -80E-1 7.0 -> 1
|
||||
ddctm225 comparetotmag -0.8E+1 7 -> 1
|
||||
ddctm226 comparetotmag -80E-1 7 -> 1
|
||||
ddctm227 comparetotmag -8.0 7E+0 -> 1
|
||||
ddctm228 comparetotmag -8.0 70E-1 -> 1
|
||||
ddctm229 comparetotmag -8 0.7E+1 -> 1
|
||||
ddctm230 comparetotmag -8 70E-1 -> 1
|
||||
|
||||
ddctm240 comparetotmag -8.0 9.0 -> -1
|
||||
ddctm241 comparetotmag -8.0 9 -> -1
|
||||
ddctm242 comparetotmag -8 9.0 -> -1
|
||||
ddctm243 comparetotmag -8E+0 9.0 -> -1
|
||||
ddctm244 comparetotmag -80E-1 9.0 -> -1
|
||||
ddctm245 comparetotmag -0.8E+1 9 -> -1
|
||||
ddctm246 comparetotmag -80E-1 9 -> -1
|
||||
ddctm247 comparetotmag -8.0 9E+0 -> -1
|
||||
ddctm248 comparetotmag -8.0 90E-1 -> -1
|
||||
ddctm249 comparetotmag -8 0.9E+1 -> -1
|
||||
ddctm250 comparetotmag -8 90E-1 -> -1
|
||||
|
||||
-- and again, with sign changes +- ..
|
||||
ddctm300 comparetotmag 7.0 -7.0 -> 0
|
||||
ddctm301 comparetotmag 7.0 -7 -> -1
|
||||
ddctm302 comparetotmag 7 -7.0 -> 1
|
||||
ddctm303 comparetotmag 7E+0 -7.0 -> 1
|
||||
ddctm304 comparetotmag 70E-1 -7.0 -> 0
|
||||
ddctm305 comparetotmag .7E+1 -7 -> 0
|
||||
ddctm306 comparetotmag 70E-1 -7 -> -1
|
||||
ddctm307 comparetotmag 7.0 -7E+0 -> -1
|
||||
ddctm308 comparetotmag 7.0 -70E-1 -> 0
|
||||
ddctm309 comparetotmag 7 -.7E+1 -> 0
|
||||
ddctm310 comparetotmag 7 -70E-1 -> 1
|
||||
|
||||
ddctm320 comparetotmag 8.0 -7.0 -> 1
|
||||
ddctm321 comparetotmag 8.0 -7 -> 1
|
||||
ddctm322 comparetotmag 8 -7.0 -> 1
|
||||
ddctm323 comparetotmag 8E+0 -7.0 -> 1
|
||||
ddctm324 comparetotmag 80E-1 -7.0 -> 1
|
||||
ddctm325 comparetotmag .8E+1 -7 -> 1
|
||||
ddctm326 comparetotmag 80E-1 -7 -> 1
|
||||
ddctm327 comparetotmag 8.0 -7E+0 -> 1
|
||||
ddctm328 comparetotmag 8.0 -70E-1 -> 1
|
||||
ddctm329 comparetotmag 8 -.7E+1 -> 1
|
||||
ddctm330 comparetotmag 8 -70E-1 -> 1
|
||||
|
||||
ddctm340 comparetotmag 8.0 -9.0 -> -1
|
||||
ddctm341 comparetotmag 8.0 -9 -> -1
|
||||
ddctm342 comparetotmag 8 -9.0 -> -1
|
||||
ddctm343 comparetotmag 8E+0 -9.0 -> -1
|
||||
ddctm344 comparetotmag 80E-1 -9.0 -> -1
|
||||
ddctm345 comparetotmag .8E+1 -9 -> -1
|
||||
ddctm346 comparetotmag 80E-1 -9 -> -1
|
||||
ddctm347 comparetotmag 8.0 -9E+0 -> -1
|
||||
ddctm348 comparetotmag 8.0 -90E-1 -> -1
|
||||
ddctm349 comparetotmag 8 -.9E+1 -> -1
|
||||
ddctm350 comparetotmag 8 -90E-1 -> -1
|
||||
|
||||
-- and again, with sign changes -- ..
|
||||
ddctm400 comparetotmag -7.0 -7.0 -> 0
|
||||
ddctm401 comparetotmag -7.0 -7 -> -1
|
||||
ddctm402 comparetotmag -7 -7.0 -> 1
|
||||
ddctm403 comparetotmag -7E+0 -7.0 -> 1
|
||||
ddctm404 comparetotmag -70E-1 -7.0 -> 0
|
||||
ddctm405 comparetotmag -.7E+1 -7 -> 0
|
||||
ddctm406 comparetotmag -70E-1 -7 -> -1
|
||||
ddctm407 comparetotmag -7.0 -7E+0 -> -1
|
||||
ddctm408 comparetotmag -7.0 -70E-1 -> 0
|
||||
ddctm409 comparetotmag -7 -.7E+1 -> 0
|
||||
ddctm410 comparetotmag -7 -70E-1 -> 1
|
||||
|
||||
ddctm420 comparetotmag -8.0 -7.0 -> 1
|
||||
ddctm421 comparetotmag -8.0 -7 -> 1
|
||||
ddctm422 comparetotmag -8 -7.0 -> 1
|
||||
ddctm423 comparetotmag -8E+0 -7.0 -> 1
|
||||
ddctm424 comparetotmag -80E-1 -7.0 -> 1
|
||||
ddctm425 comparetotmag -.8E+1 -7 -> 1
|
||||
ddctm426 comparetotmag -80E-1 -7 -> 1
|
||||
ddctm427 comparetotmag -8.0 -7E+0 -> 1
|
||||
ddctm428 comparetotmag -8.0 -70E-1 -> 1
|
||||
ddctm429 comparetotmag -8 -.7E+1 -> 1
|
||||
ddctm430 comparetotmag -8 -70E-1 -> 1
|
||||
|
||||
ddctm440 comparetotmag -8.0 -9.0 -> -1
|
||||
ddctm441 comparetotmag -8.0 -9 -> -1
|
||||
ddctm442 comparetotmag -8 -9.0 -> -1
|
||||
ddctm443 comparetotmag -8E+0 -9.0 -> -1
|
||||
ddctm444 comparetotmag -80E-1 -9.0 -> -1
|
||||
ddctm445 comparetotmag -.8E+1 -9 -> -1
|
||||
ddctm446 comparetotmag -80E-1 -9 -> -1
|
||||
ddctm447 comparetotmag -8.0 -9E+0 -> -1
|
||||
ddctm448 comparetotmag -8.0 -90E-1 -> -1
|
||||
ddctm449 comparetotmag -8 -.9E+1 -> -1
|
||||
ddctm450 comparetotmag -8 -90E-1 -> -1
|
||||
|
||||
|
||||
-- testcases that subtract to lots of zeros at boundaries [pgr]
|
||||
ddctm473 comparetotmag 123.4560000000000E-89 123.456E-89 -> -1
|
||||
ddctm474 comparetotmag 123.456000000000E+89 123.456E+89 -> -1
|
||||
ddctm475 comparetotmag 123.45600000000E-89 123.456E-89 -> -1
|
||||
ddctm476 comparetotmag 123.4560000000E+89 123.456E+89 -> -1
|
||||
ddctm477 comparetotmag 123.456000000E-89 123.456E-89 -> -1
|
||||
ddctm478 comparetotmag 123.45600000E+89 123.456E+89 -> -1
|
||||
ddctm479 comparetotmag 123.4560000E-89 123.456E-89 -> -1
|
||||
ddctm480 comparetotmag 123.456000E+89 123.456E+89 -> -1
|
||||
ddctm481 comparetotmag 123.45600E-89 123.456E-89 -> -1
|
||||
ddctm482 comparetotmag 123.4560E+89 123.456E+89 -> -1
|
||||
ddctm483 comparetotmag 123.456E-89 123.456E-89 -> 0
|
||||
ddctm487 comparetotmag 123.456E+89 123.4560000000000E+89 -> 1
|
||||
ddctm488 comparetotmag 123.456E-89 123.456000000000E-89 -> 1
|
||||
ddctm489 comparetotmag 123.456E+89 123.45600000000E+89 -> 1
|
||||
ddctm490 comparetotmag 123.456E-89 123.4560000000E-89 -> 1
|
||||
ddctm491 comparetotmag 123.456E+89 123.456000000E+89 -> 1
|
||||
ddctm492 comparetotmag 123.456E-89 123.45600000E-89 -> 1
|
||||
ddctm493 comparetotmag 123.456E+89 123.4560000E+89 -> 1
|
||||
ddctm494 comparetotmag 123.456E-89 123.456000E-89 -> 1
|
||||
ddctm495 comparetotmag 123.456E+89 123.45600E+89 -> 1
|
||||
ddctm496 comparetotmag 123.456E-89 123.4560E-89 -> 1
|
||||
ddctm497 comparetotmag 123.456E+89 123.456E+89 -> 0
|
||||
|
||||
-- wide-ranging, around precision; signs equal
|
||||
ddctm498 comparetotmag 1 1E-17 -> 1
|
||||
ddctm499 comparetotmag 1 1E-16 -> 1
|
||||
ddctm500 comparetotmag 1 1E-15 -> 1
|
||||
ddctm501 comparetotmag 1 1E-14 -> 1
|
||||
ddctm502 comparetotmag 1 1E-13 -> 1
|
||||
ddctm503 comparetotmag 1 1E-12 -> 1
|
||||
ddctm504 comparetotmag 1 1E-11 -> 1
|
||||
ddctm505 comparetotmag 1 1E-10 -> 1
|
||||
ddctm506 comparetotmag 1 1E-9 -> 1
|
||||
ddctm507 comparetotmag 1 1E-8 -> 1
|
||||
ddctm508 comparetotmag 1 1E-7 -> 1
|
||||
ddctm509 comparetotmag 1 1E-6 -> 1
|
||||
ddctm510 comparetotmag 1 1E-5 -> 1
|
||||
ddctm511 comparetotmag 1 1E-4 -> 1
|
||||
ddctm512 comparetotmag 1 1E-3 -> 1
|
||||
ddctm513 comparetotmag 1 1E-2 -> 1
|
||||
ddctm514 comparetotmag 1 1E-1 -> 1
|
||||
ddctm515 comparetotmag 1 1E-0 -> 0
|
||||
ddctm516 comparetotmag 1 1E+1 -> -1
|
||||
ddctm517 comparetotmag 1 1E+2 -> -1
|
||||
ddctm518 comparetotmag 1 1E+3 -> -1
|
||||
ddctm519 comparetotmag 1 1E+4 -> -1
|
||||
ddctm521 comparetotmag 1 1E+5 -> -1
|
||||
ddctm522 comparetotmag 1 1E+6 -> -1
|
||||
ddctm523 comparetotmag 1 1E+7 -> -1
|
||||
ddctm524 comparetotmag 1 1E+8 -> -1
|
||||
ddctm525 comparetotmag 1 1E+9 -> -1
|
||||
ddctm526 comparetotmag 1 1E+10 -> -1
|
||||
ddctm527 comparetotmag 1 1E+11 -> -1
|
||||
ddctm528 comparetotmag 1 1E+12 -> -1
|
||||
ddctm529 comparetotmag 1 1E+13 -> -1
|
||||
ddctm530 comparetotmag 1 1E+14 -> -1
|
||||
ddctm531 comparetotmag 1 1E+15 -> -1
|
||||
ddctm532 comparetotmag 1 1E+16 -> -1
|
||||
ddctm533 comparetotmag 1 1E+17 -> -1
|
||||
-- LR swap
|
||||
ddctm538 comparetotmag 1E-17 1 -> -1
|
||||
ddctm539 comparetotmag 1E-16 1 -> -1
|
||||
ddctm540 comparetotmag 1E-15 1 -> -1
|
||||
ddctm541 comparetotmag 1E-14 1 -> -1
|
||||
ddctm542 comparetotmag 1E-13 1 -> -1
|
||||
ddctm543 comparetotmag 1E-12 1 -> -1
|
||||
ddctm544 comparetotmag 1E-11 1 -> -1
|
||||
ddctm545 comparetotmag 1E-10 1 -> -1
|
||||
ddctm546 comparetotmag 1E-9 1 -> -1
|
||||
ddctm547 comparetotmag 1E-8 1 -> -1
|
||||
ddctm548 comparetotmag 1E-7 1 -> -1
|
||||
ddctm549 comparetotmag 1E-6 1 -> -1
|
||||
ddctm550 comparetotmag 1E-5 1 -> -1
|
||||
ddctm551 comparetotmag 1E-4 1 -> -1
|
||||
ddctm552 comparetotmag 1E-3 1 -> -1
|
||||
ddctm553 comparetotmag 1E-2 1 -> -1
|
||||
ddctm554 comparetotmag 1E-1 1 -> -1
|
||||
ddctm555 comparetotmag 1E-0 1 -> 0
|
||||
ddctm556 comparetotmag 1E+1 1 -> 1
|
||||
ddctm557 comparetotmag 1E+2 1 -> 1
|
||||
ddctm558 comparetotmag 1E+3 1 -> 1
|
||||
ddctm559 comparetotmag 1E+4 1 -> 1
|
||||
ddctm561 comparetotmag 1E+5 1 -> 1
|
||||
ddctm562 comparetotmag 1E+6 1 -> 1
|
||||
ddctm563 comparetotmag 1E+7 1 -> 1
|
||||
ddctm564 comparetotmag 1E+8 1 -> 1
|
||||
ddctm565 comparetotmag 1E+9 1 -> 1
|
||||
ddctm566 comparetotmag 1E+10 1 -> 1
|
||||
ddctm567 comparetotmag 1E+11 1 -> 1
|
||||
ddctm568 comparetotmag 1E+12 1 -> 1
|
||||
ddctm569 comparetotmag 1E+13 1 -> 1
|
||||
ddctm570 comparetotmag 1E+14 1 -> 1
|
||||
ddctm571 comparetotmag 1E+15 1 -> 1
|
||||
ddctm572 comparetotmag 1E+16 1 -> 1
|
||||
ddctm573 comparetotmag 1E+17 1 -> 1
|
||||
-- similar with a useful coefficient, one side only
|
||||
ddctm578 comparetotmag 0.000000987654321 1E-17 -> 1
|
||||
ddctm579 comparetotmag 0.000000987654321 1E-16 -> 1
|
||||
ddctm580 comparetotmag 0.000000987654321 1E-15 -> 1
|
||||
ddctm581 comparetotmag 0.000000987654321 1E-14 -> 1
|
||||
ddctm582 comparetotmag 0.000000987654321 1E-13 -> 1
|
||||
ddctm583 comparetotmag 0.000000987654321 1E-12 -> 1
|
||||
ddctm584 comparetotmag 0.000000987654321 1E-11 -> 1
|
||||
ddctm585 comparetotmag 0.000000987654321 1E-10 -> 1
|
||||
ddctm586 comparetotmag 0.000000987654321 1E-9 -> 1
|
||||
ddctm587 comparetotmag 0.000000987654321 1E-8 -> 1
|
||||
ddctm588 comparetotmag 0.000000987654321 1E-7 -> 1
|
||||
ddctm589 comparetotmag 0.000000987654321 1E-6 -> -1
|
||||
ddctm590 comparetotmag 0.000000987654321 1E-5 -> -1
|
||||
ddctm591 comparetotmag 0.000000987654321 1E-4 -> -1
|
||||
ddctm592 comparetotmag 0.000000987654321 1E-3 -> -1
|
||||
ddctm593 comparetotmag 0.000000987654321 1E-2 -> -1
|
||||
ddctm594 comparetotmag 0.000000987654321 1E-1 -> -1
|
||||
ddctm595 comparetotmag 0.000000987654321 1E-0 -> -1
|
||||
ddctm596 comparetotmag 0.000000987654321 1E+1 -> -1
|
||||
ddctm597 comparetotmag 0.000000987654321 1E+2 -> -1
|
||||
ddctm598 comparetotmag 0.000000987654321 1E+3 -> -1
|
||||
ddctm599 comparetotmag 0.000000987654321 1E+4 -> -1
|
||||
|
||||
-- check some unit-y traps
|
||||
ddctm600 comparetotmag 12 12.2345 -> -1
|
||||
ddctm601 comparetotmag 12.0 12.2345 -> -1
|
||||
ddctm602 comparetotmag 12.00 12.2345 -> -1
|
||||
ddctm603 comparetotmag 12.000 12.2345 -> -1
|
||||
ddctm604 comparetotmag 12.0000 12.2345 -> -1
|
||||
ddctm605 comparetotmag 12.00000 12.2345 -> -1
|
||||
ddctm606 comparetotmag 12.000000 12.2345 -> -1
|
||||
ddctm607 comparetotmag 12.0000000 12.2345 -> -1
|
||||
ddctm608 comparetotmag 12.00000000 12.2345 -> -1
|
||||
ddctm609 comparetotmag 12.000000000 12.2345 -> -1
|
||||
ddctm610 comparetotmag 12.1234 12 -> 1
|
||||
ddctm611 comparetotmag 12.1234 12.0 -> 1
|
||||
ddctm612 comparetotmag 12.1234 12.00 -> 1
|
||||
ddctm613 comparetotmag 12.1234 12.000 -> 1
|
||||
ddctm614 comparetotmag 12.1234 12.0000 -> 1
|
||||
ddctm615 comparetotmag 12.1234 12.00000 -> 1
|
||||
ddctm616 comparetotmag 12.1234 12.000000 -> 1
|
||||
ddctm617 comparetotmag 12.1234 12.0000000 -> 1
|
||||
ddctm618 comparetotmag 12.1234 12.00000000 -> 1
|
||||
ddctm619 comparetotmag 12.1234 12.000000000 -> 1
|
||||
ddctm620 comparetotmag -12 -12.2345 -> -1
|
||||
ddctm621 comparetotmag -12.0 -12.2345 -> -1
|
||||
ddctm622 comparetotmag -12.00 -12.2345 -> -1
|
||||
ddctm623 comparetotmag -12.000 -12.2345 -> -1
|
||||
ddctm624 comparetotmag -12.0000 -12.2345 -> -1
|
||||
ddctm625 comparetotmag -12.00000 -12.2345 -> -1
|
||||
ddctm626 comparetotmag -12.000000 -12.2345 -> -1
|
||||
ddctm627 comparetotmag -12.0000000 -12.2345 -> -1
|
||||
ddctm628 comparetotmag -12.00000000 -12.2345 -> -1
|
||||
ddctm629 comparetotmag -12.000000000 -12.2345 -> -1
|
||||
ddctm630 comparetotmag -12.1234 -12 -> 1
|
||||
ddctm631 comparetotmag -12.1234 -12.0 -> 1
|
||||
ddctm632 comparetotmag -12.1234 -12.00 -> 1
|
||||
ddctm633 comparetotmag -12.1234 -12.000 -> 1
|
||||
ddctm634 comparetotmag -12.1234 -12.0000 -> 1
|
||||
ddctm635 comparetotmag -12.1234 -12.00000 -> 1
|
||||
ddctm636 comparetotmag -12.1234 -12.000000 -> 1
|
||||
ddctm637 comparetotmag -12.1234 -12.0000000 -> 1
|
||||
ddctm638 comparetotmag -12.1234 -12.00000000 -> 1
|
||||
ddctm639 comparetotmag -12.1234 -12.000000000 -> 1
|
||||
|
||||
-- extended zeros
|
||||
ddctm640 comparetotmag 0 0 -> 0
|
||||
ddctm641 comparetotmag 0 -0 -> 0
|
||||
ddctm642 comparetotmag 0 -0.0 -> 1
|
||||
ddctm643 comparetotmag 0 0.0 -> 1
|
||||
ddctm644 comparetotmag -0 0 -> 0
|
||||
ddctm645 comparetotmag -0 -0 -> 0
|
||||
ddctm646 comparetotmag -0 -0.0 -> 1
|
||||
ddctm647 comparetotmag -0 0.0 -> 1
|
||||
ddctm648 comparetotmag 0.0 0 -> -1
|
||||
ddctm649 comparetotmag 0.0 -0 -> -1
|
||||
ddctm650 comparetotmag 0.0 -0.0 -> 0
|
||||
ddctm651 comparetotmag 0.0 0.0 -> 0
|
||||
ddctm652 comparetotmag -0.0 0 -> -1
|
||||
ddctm653 comparetotmag -0.0 -0 -> -1
|
||||
ddctm654 comparetotmag -0.0 -0.0 -> 0
|
||||
ddctm655 comparetotmag -0.0 0.0 -> 0
|
||||
|
||||
ddctm656 comparetotmag -0E1 0.0 -> 1
|
||||
ddctm657 comparetotmag -0E2 0.0 -> 1
|
||||
ddctm658 comparetotmag 0E1 0.0 -> 1
|
||||
ddctm659 comparetotmag 0E2 0.0 -> 1
|
||||
ddctm660 comparetotmag -0E1 0 -> 1
|
||||
ddctm661 comparetotmag -0E2 0 -> 1
|
||||
ddctm662 comparetotmag 0E1 0 -> 1
|
||||
ddctm663 comparetotmag 0E2 0 -> 1
|
||||
ddctm664 comparetotmag -0E1 -0E1 -> 0
|
||||
ddctm665 comparetotmag -0E2 -0E1 -> 1
|
||||
ddctm666 comparetotmag 0E1 -0E1 -> 0
|
||||
ddctm667 comparetotmag 0E2 -0E1 -> 1
|
||||
ddctm668 comparetotmag -0E1 -0E2 -> -1
|
||||
ddctm669 comparetotmag -0E2 -0E2 -> 0
|
||||
ddctm670 comparetotmag 0E1 -0E2 -> -1
|
||||
ddctm671 comparetotmag 0E2 -0E2 -> 0
|
||||
ddctm672 comparetotmag -0E1 0E1 -> 0
|
||||
ddctm673 comparetotmag -0E2 0E1 -> 1
|
||||
ddctm674 comparetotmag 0E1 0E1 -> 0
|
||||
ddctm675 comparetotmag 0E2 0E1 -> 1
|
||||
ddctm676 comparetotmag -0E1 0E2 -> -1
|
||||
ddctm677 comparetotmag -0E2 0E2 -> 0
|
||||
ddctm678 comparetotmag 0E1 0E2 -> -1
|
||||
ddctm679 comparetotmag 0E2 0E2 -> 0
|
||||
|
||||
-- trailing zeros; unit-y
|
||||
ddctm680 comparetotmag 12 12 -> 0
|
||||
ddctm681 comparetotmag 12 12.0 -> 1
|
||||
ddctm682 comparetotmag 12 12.00 -> 1
|
||||
ddctm683 comparetotmag 12 12.000 -> 1
|
||||
ddctm684 comparetotmag 12 12.0000 -> 1
|
||||
ddctm685 comparetotmag 12 12.00000 -> 1
|
||||
ddctm686 comparetotmag 12 12.000000 -> 1
|
||||
ddctm687 comparetotmag 12 12.0000000 -> 1
|
||||
ddctm688 comparetotmag 12 12.00000000 -> 1
|
||||
ddctm689 comparetotmag 12 12.000000000 -> 1
|
||||
ddctm690 comparetotmag 12 12 -> 0
|
||||
ddctm691 comparetotmag 12.0 12 -> -1
|
||||
ddctm692 comparetotmag 12.00 12 -> -1
|
||||
ddctm693 comparetotmag 12.000 12 -> -1
|
||||
ddctm694 comparetotmag 12.0000 12 -> -1
|
||||
ddctm695 comparetotmag 12.00000 12 -> -1
|
||||
ddctm696 comparetotmag 12.000000 12 -> -1
|
||||
ddctm697 comparetotmag 12.0000000 12 -> -1
|
||||
ddctm698 comparetotmag 12.00000000 12 -> -1
|
||||
ddctm699 comparetotmag 12.000000000 12 -> -1
|
||||
|
||||
-- old long operand checks
|
||||
ddctm701 comparetotmag 12345678000 1 -> 1
|
||||
ddctm702 comparetotmag 1 12345678000 -> -1
|
||||
ddctm703 comparetotmag 1234567800 1 -> 1
|
||||
ddctm704 comparetotmag 1 1234567800 -> -1
|
||||
ddctm705 comparetotmag 1234567890 1 -> 1
|
||||
ddctm706 comparetotmag 1 1234567890 -> -1
|
||||
ddctm707 comparetotmag 1234567891 1 -> 1
|
||||
ddctm708 comparetotmag 1 1234567891 -> -1
|
||||
ddctm709 comparetotmag 12345678901 1 -> 1
|
||||
ddctm710 comparetotmag 1 12345678901 -> -1
|
||||
ddctm711 comparetotmag 1234567896 1 -> 1
|
||||
ddctm712 comparetotmag 1 1234567896 -> -1
|
||||
ddctm713 comparetotmag -1234567891 1 -> 1
|
||||
ddctm714 comparetotmag 1 -1234567891 -> -1
|
||||
ddctm715 comparetotmag -12345678901 1 -> 1
|
||||
ddctm716 comparetotmag 1 -12345678901 -> -1
|
||||
ddctm717 comparetotmag -1234567896 1 -> 1
|
||||
ddctm718 comparetotmag 1 -1234567896 -> -1
|
||||
|
||||
-- old residue cases
|
||||
ddctm740 comparetotmag 1 0.9999999 -> 1
|
||||
ddctm741 comparetotmag 1 0.999999 -> 1
|
||||
ddctm742 comparetotmag 1 0.99999 -> 1
|
||||
ddctm743 comparetotmag 1 1.0000 -> 1
|
||||
ddctm744 comparetotmag 1 1.00001 -> -1
|
||||
ddctm745 comparetotmag 1 1.000001 -> -1
|
||||
ddctm746 comparetotmag 1 1.0000001 -> -1
|
||||
ddctm750 comparetotmag 0.9999999 1 -> -1
|
||||
ddctm751 comparetotmag 0.999999 1 -> -1
|
||||
ddctm752 comparetotmag 0.99999 1 -> -1
|
||||
ddctm753 comparetotmag 1.0000 1 -> -1
|
||||
ddctm754 comparetotmag 1.00001 1 -> 1
|
||||
ddctm755 comparetotmag 1.000001 1 -> 1
|
||||
ddctm756 comparetotmag 1.0000001 1 -> 1
|
||||
|
||||
-- Specials
|
||||
ddctm780 comparetotmag Inf -Inf -> 0
|
||||
ddctm781 comparetotmag Inf -1000 -> 1
|
||||
ddctm782 comparetotmag Inf -1 -> 1
|
||||
ddctm783 comparetotmag Inf -0 -> 1
|
||||
ddctm784 comparetotmag Inf 0 -> 1
|
||||
ddctm785 comparetotmag Inf 1 -> 1
|
||||
ddctm786 comparetotmag Inf 1000 -> 1
|
||||
ddctm787 comparetotmag Inf Inf -> 0
|
||||
ddctm788 comparetotmag -1000 Inf -> -1
|
||||
ddctm789 comparetotmag -Inf Inf -> 0
|
||||
ddctm790 comparetotmag -1 Inf -> -1
|
||||
ddctm791 comparetotmag -0 Inf -> -1
|
||||
ddctm792 comparetotmag 0 Inf -> -1
|
||||
ddctm793 comparetotmag 1 Inf -> -1
|
||||
ddctm794 comparetotmag 1000 Inf -> -1
|
||||
ddctm795 comparetotmag Inf Inf -> 0
|
||||
|
||||
ddctm800 comparetotmag -Inf -Inf -> 0
|
||||
ddctm801 comparetotmag -Inf -1000 -> 1
|
||||
ddctm802 comparetotmag -Inf -1 -> 1
|
||||
ddctm803 comparetotmag -Inf -0 -> 1
|
||||
ddctm804 comparetotmag -Inf 0 -> 1
|
||||
ddctm805 comparetotmag -Inf 1 -> 1
|
||||
ddctm806 comparetotmag -Inf 1000 -> 1
|
||||
ddctm807 comparetotmag -Inf Inf -> 0
|
||||
ddctm808 comparetotmag -Inf -Inf -> 0
|
||||
ddctm809 comparetotmag -1000 -Inf -> -1
|
||||
ddctm810 comparetotmag -1 -Inf -> -1
|
||||
ddctm811 comparetotmag -0 -Inf -> -1
|
||||
ddctm812 comparetotmag 0 -Inf -> -1
|
||||
ddctm813 comparetotmag 1 -Inf -> -1
|
||||
ddctm814 comparetotmag 1000 -Inf -> -1
|
||||
ddctm815 comparetotmag Inf -Inf -> 0
|
||||
|
||||
ddctm821 comparetotmag NaN -Inf -> 1
|
||||
ddctm822 comparetotmag NaN -1000 -> 1
|
||||
ddctm823 comparetotmag NaN -1 -> 1
|
||||
ddctm824 comparetotmag NaN -0 -> 1
|
||||
ddctm825 comparetotmag NaN 0 -> 1
|
||||
ddctm826 comparetotmag NaN 1 -> 1
|
||||
ddctm827 comparetotmag NaN 1000 -> 1
|
||||
ddctm828 comparetotmag NaN Inf -> 1
|
||||
ddctm829 comparetotmag NaN NaN -> 0
|
||||
ddctm830 comparetotmag -Inf NaN -> -1
|
||||
ddctm831 comparetotmag -1000 NaN -> -1
|
||||
ddctm832 comparetotmag -1 NaN -> -1
|
||||
ddctm833 comparetotmag -0 NaN -> -1
|
||||
ddctm834 comparetotmag 0 NaN -> -1
|
||||
ddctm835 comparetotmag 1 NaN -> -1
|
||||
ddctm836 comparetotmag 1000 NaN -> -1
|
||||
ddctm837 comparetotmag Inf NaN -> -1
|
||||
ddctm838 comparetotmag -NaN -NaN -> 0
|
||||
ddctm839 comparetotmag +NaN -NaN -> 0
|
||||
ddctm840 comparetotmag -NaN +NaN -> 0
|
||||
|
||||
ddctm841 comparetotmag sNaN -sNaN -> 0
|
||||
ddctm842 comparetotmag sNaN -NaN -> -1
|
||||
ddctm843 comparetotmag sNaN -Inf -> 1
|
||||
ddctm844 comparetotmag sNaN -1000 -> 1
|
||||
ddctm845 comparetotmag sNaN -1 -> 1
|
||||
ddctm846 comparetotmag sNaN -0 -> 1
|
||||
ddctm847 comparetotmag sNaN 0 -> 1
|
||||
ddctm848 comparetotmag sNaN 1 -> 1
|
||||
ddctm849 comparetotmag sNaN 1000 -> 1
|
||||
ddctm850 comparetotmag sNaN NaN -> -1
|
||||
ddctm851 comparetotmag sNaN sNaN -> 0
|
||||
|
||||
ddctm852 comparetotmag -sNaN sNaN -> 0
|
||||
ddctm853 comparetotmag -NaN sNaN -> 1
|
||||
ddctm854 comparetotmag -Inf sNaN -> -1
|
||||
ddctm855 comparetotmag -1000 sNaN -> -1
|
||||
ddctm856 comparetotmag -1 sNaN -> -1
|
||||
ddctm857 comparetotmag -0 sNaN -> -1
|
||||
ddctm858 comparetotmag 0 sNaN -> -1
|
||||
ddctm859 comparetotmag 1 sNaN -> -1
|
||||
ddctm860 comparetotmag 1000 sNaN -> -1
|
||||
ddctm861 comparetotmag Inf sNaN -> -1
|
||||
ddctm862 comparetotmag NaN sNaN -> 1
|
||||
ddctm863 comparetotmag sNaN sNaN -> 0
|
||||
|
||||
ddctm871 comparetotmag -sNaN -sNaN -> 0
|
||||
ddctm872 comparetotmag -sNaN -NaN -> -1
|
||||
ddctm873 comparetotmag -sNaN -Inf -> 1
|
||||
ddctm874 comparetotmag -sNaN -1000 -> 1
|
||||
ddctm875 comparetotmag -sNaN -1 -> 1
|
||||
ddctm876 comparetotmag -sNaN -0 -> 1
|
||||
ddctm877 comparetotmag -sNaN 0 -> 1
|
||||
ddctm878 comparetotmag -sNaN 1 -> 1
|
||||
ddctm879 comparetotmag -sNaN 1000 -> 1
|
||||
ddctm880 comparetotmag -sNaN NaN -> -1
|
||||
ddctm881 comparetotmag -sNaN sNaN -> 0
|
||||
|
||||
ddctm882 comparetotmag -sNaN -sNaN -> 0
|
||||
ddctm883 comparetotmag -NaN -sNaN -> 1
|
||||
ddctm884 comparetotmag -Inf -sNaN -> -1
|
||||
ddctm885 comparetotmag -1000 -sNaN -> -1
|
||||
ddctm886 comparetotmag -1 -sNaN -> -1
|
||||
ddctm887 comparetotmag -0 -sNaN -> -1
|
||||
ddctm888 comparetotmag 0 -sNaN -> -1
|
||||
ddctm889 comparetotmag 1 -sNaN -> -1
|
||||
ddctm890 comparetotmag 1000 -sNaN -> -1
|
||||
ddctm891 comparetotmag Inf -sNaN -> -1
|
||||
ddctm892 comparetotmag NaN -sNaN -> 1
|
||||
ddctm893 comparetotmag sNaN -sNaN -> 0
|
||||
|
||||
-- NaNs with payload
|
||||
ddctm960 comparetotmag NaN9 -Inf -> 1
|
||||
ddctm961 comparetotmag NaN8 999 -> 1
|
||||
ddctm962 comparetotmag NaN77 Inf -> 1
|
||||
ddctm963 comparetotmag -NaN67 NaN5 -> 1
|
||||
ddctm964 comparetotmag -Inf -NaN4 -> -1
|
||||
ddctm965 comparetotmag -999 -NaN33 -> -1
|
||||
ddctm966 comparetotmag Inf NaN2 -> -1
|
||||
|
||||
ddctm970 comparetotmag -NaN41 -NaN42 -> -1
|
||||
ddctm971 comparetotmag +NaN41 -NaN42 -> -1
|
||||
ddctm972 comparetotmag -NaN41 +NaN42 -> -1
|
||||
ddctm973 comparetotmag +NaN41 +NaN42 -> -1
|
||||
ddctm974 comparetotmag -NaN42 -NaN01 -> 1
|
||||
ddctm975 comparetotmag +NaN42 -NaN01 -> 1
|
||||
ddctm976 comparetotmag -NaN42 +NaN01 -> 1
|
||||
ddctm977 comparetotmag +NaN42 +NaN01 -> 1
|
||||
|
||||
ddctm980 comparetotmag -sNaN771 -sNaN772 -> -1
|
||||
ddctm981 comparetotmag +sNaN771 -sNaN772 -> -1
|
||||
ddctm982 comparetotmag -sNaN771 +sNaN772 -> -1
|
||||
ddctm983 comparetotmag +sNaN771 +sNaN772 -> -1
|
||||
ddctm984 comparetotmag -sNaN772 -sNaN771 -> 1
|
||||
ddctm985 comparetotmag +sNaN772 -sNaN771 -> 1
|
||||
ddctm986 comparetotmag -sNaN772 +sNaN771 -> 1
|
||||
ddctm987 comparetotmag +sNaN772 +sNaN771 -> 1
|
||||
|
||||
ddctm991 comparetotmag -sNaN99 -Inf -> 1
|
||||
ddctm992 comparetotmag sNaN98 -11 -> 1
|
||||
ddctm993 comparetotmag sNaN97 NaN -> -1
|
||||
ddctm994 comparetotmag sNaN16 sNaN94 -> -1
|
||||
ddctm995 comparetotmag NaN85 sNaN83 -> 1
|
||||
ddctm996 comparetotmag -Inf sNaN92 -> -1
|
||||
ddctm997 comparetotmag 088 sNaN81 -> -1
|
||||
ddctm998 comparetotmag Inf sNaN90 -> -1
|
||||
ddctm999 comparetotmag NaN -sNaN89 -> 1
|
||||
|
||||
-- spread zeros
|
||||
ddctm1110 comparetotmag 0E-383 0 -> -1
|
||||
ddctm1111 comparetotmag 0E-383 -0 -> -1
|
||||
ddctm1112 comparetotmag -0E-383 0 -> -1
|
||||
ddctm1113 comparetotmag -0E-383 -0 -> -1
|
||||
ddctm1114 comparetotmag 0E-383 0E+384 -> -1
|
||||
ddctm1115 comparetotmag 0E-383 -0E+384 -> -1
|
||||
ddctm1116 comparetotmag -0E-383 0E+384 -> -1
|
||||
ddctm1117 comparetotmag -0E-383 -0E+384 -> -1
|
||||
ddctm1118 comparetotmag 0 0E+384 -> -1
|
||||
ddctm1119 comparetotmag 0 -0E+384 -> -1
|
||||
ddctm1120 comparetotmag -0 0E+384 -> -1
|
||||
ddctm1121 comparetotmag -0 -0E+384 -> -1
|
||||
|
||||
ddctm1130 comparetotmag 0E+384 0 -> 1
|
||||
ddctm1131 comparetotmag 0E+384 -0 -> 1
|
||||
ddctm1132 comparetotmag -0E+384 0 -> 1
|
||||
ddctm1133 comparetotmag -0E+384 -0 -> 1
|
||||
ddctm1134 comparetotmag 0E+384 0E-383 -> 1
|
||||
ddctm1135 comparetotmag 0E+384 -0E-383 -> 1
|
||||
ddctm1136 comparetotmag -0E+384 0E-383 -> 1
|
||||
ddctm1137 comparetotmag -0E+384 -0E-383 -> 1
|
||||
ddctm1138 comparetotmag 0 0E-383 -> 1
|
||||
ddctm1139 comparetotmag 0 -0E-383 -> 1
|
||||
ddctm1140 comparetotmag -0 0E-383 -> 1
|
||||
ddctm1141 comparetotmag -0 -0E-383 -> 1
|
||||
|
||||
-- Null tests
|
||||
ddctm9990 comparetotmag 10 # -> NaN Invalid_operation
|
||||
ddctm9991 comparetotmag # 10 -> NaN Invalid_operation
|
@@ -0,0 +1,88 @@
|
||||
------------------------------------------------------------------------
|
||||
-- ddCopy.decTest -- quiet decDouble copy --
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
-- All operands and results are decDoubles.
|
||||
precision: 16
|
||||
maxExponent: 384
|
||||
minExponent: -383
|
||||
extended: 1
|
||||
clamp: 1
|
||||
rounding: half_even
|
||||
|
||||
-- Sanity check
|
||||
ddcpy001 copy +7.50 -> 7.50
|
||||
|
||||
-- Infinities
|
||||
ddcpy011 copy Infinity -> Infinity
|
||||
ddcpy012 copy -Infinity -> -Infinity
|
||||
|
||||
-- NaNs, 0 payload
|
||||
ddcpy021 copy NaN -> NaN
|
||||
ddcpy022 copy -NaN -> -NaN
|
||||
ddcpy023 copy sNaN -> sNaN
|
||||
ddcpy024 copy -sNaN -> -sNaN
|
||||
|
||||
-- NaNs, non-0 payload
|
||||
ddcpy031 copy NaN10 -> NaN10
|
||||
ddcpy032 copy -NaN10 -> -NaN10
|
||||
ddcpy033 copy sNaN10 -> sNaN10
|
||||
ddcpy034 copy -sNaN10 -> -sNaN10
|
||||
ddcpy035 copy NaN7 -> NaN7
|
||||
ddcpy036 copy -NaN7 -> -NaN7
|
||||
ddcpy037 copy sNaN101 -> sNaN101
|
||||
ddcpy038 copy -sNaN101 -> -sNaN101
|
||||
|
||||
-- finites
|
||||
ddcpy101 copy 7 -> 7
|
||||
ddcpy102 copy -7 -> -7
|
||||
ddcpy103 copy 75 -> 75
|
||||
ddcpy104 copy -75 -> -75
|
||||
ddcpy105 copy 7.50 -> 7.50
|
||||
ddcpy106 copy -7.50 -> -7.50
|
||||
ddcpy107 copy 7.500 -> 7.500
|
||||
ddcpy108 copy -7.500 -> -7.500
|
||||
|
||||
-- zeros
|
||||
ddcpy111 copy 0 -> 0
|
||||
ddcpy112 copy -0 -> -0
|
||||
ddcpy113 copy 0E+4 -> 0E+4
|
||||
ddcpy114 copy -0E+4 -> -0E+4
|
||||
ddcpy115 copy 0.0000 -> 0.0000
|
||||
ddcpy116 copy -0.0000 -> -0.0000
|
||||
ddcpy117 copy 0E-141 -> 0E-141
|
||||
ddcpy118 copy -0E-141 -> -0E-141
|
||||
|
||||
-- full coefficients, alternating bits
|
||||
ddcpy121 copy 2682682682682682 -> 2682682682682682
|
||||
ddcpy122 copy -2682682682682682 -> -2682682682682682
|
||||
ddcpy123 copy 1341341341341341 -> 1341341341341341
|
||||
ddcpy124 copy -1341341341341341 -> -1341341341341341
|
||||
|
||||
-- Nmax, Nmin, Ntiny
|
||||
ddcpy131 copy 9.999999999999999E+384 -> 9.999999999999999E+384
|
||||
ddcpy132 copy 1E-383 -> 1E-383
|
||||
ddcpy133 copy 1.000000000000000E-383 -> 1.000000000000000E-383
|
||||
ddcpy134 copy 1E-398 -> 1E-398
|
||||
|
||||
ddcpy135 copy -1E-398 -> -1E-398
|
||||
ddcpy136 copy -1.000000000000000E-383 -> -1.000000000000000E-383
|
||||
ddcpy137 copy -1E-383 -> -1E-383
|
||||
ddcpy138 copy -9.999999999999999E+384 -> -9.999999999999999E+384
|
@@ -0,0 +1,88 @@
|
||||
------------------------------------------------------------------------
|
||||
-- ddCopyAbs.decTest -- quiet decDouble copy and set sign to zero --
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
-- All operands and results are decDoubles.
|
||||
precision: 16
|
||||
maxExponent: 384
|
||||
minExponent: -383
|
||||
extended: 1
|
||||
clamp: 1
|
||||
rounding: half_even
|
||||
|
||||
-- Sanity check
|
||||
ddcpa001 copyabs +7.50 -> 7.50
|
||||
|
||||
-- Infinities
|
||||
ddcpa011 copyabs Infinity -> Infinity
|
||||
ddcpa012 copyabs -Infinity -> Infinity
|
||||
|
||||
-- NaNs, 0 payload
|
||||
ddcpa021 copyabs NaN -> NaN
|
||||
ddcpa022 copyabs -NaN -> NaN
|
||||
ddcpa023 copyabs sNaN -> sNaN
|
||||
ddcpa024 copyabs -sNaN -> sNaN
|
||||
|
||||
-- NaNs, non-0 payload
|
||||
ddcpa031 copyabs NaN10 -> NaN10
|
||||
ddcpa032 copyabs -NaN15 -> NaN15
|
||||
ddcpa033 copyabs sNaN15 -> sNaN15
|
||||
ddcpa034 copyabs -sNaN10 -> sNaN10
|
||||
ddcpa035 copyabs NaN7 -> NaN7
|
||||
ddcpa036 copyabs -NaN7 -> NaN7
|
||||
ddcpa037 copyabs sNaN101 -> sNaN101
|
||||
ddcpa038 copyabs -sNaN101 -> sNaN101
|
||||
|
||||
-- finites
|
||||
ddcpa101 copyabs 7 -> 7
|
||||
ddcpa102 copyabs -7 -> 7
|
||||
ddcpa103 copyabs 75 -> 75
|
||||
ddcpa104 copyabs -75 -> 75
|
||||
ddcpa105 copyabs 7.10 -> 7.10
|
||||
ddcpa106 copyabs -7.10 -> 7.10
|
||||
ddcpa107 copyabs 7.500 -> 7.500
|
||||
ddcpa108 copyabs -7.500 -> 7.500
|
||||
|
||||
-- zeros
|
||||
ddcpa111 copyabs 0 -> 0
|
||||
ddcpa112 copyabs -0 -> 0
|
||||
ddcpa113 copyabs 0E+6 -> 0E+6
|
||||
ddcpa114 copyabs -0E+6 -> 0E+6
|
||||
ddcpa115 copyabs 0.0000 -> 0.0000
|
||||
ddcpa116 copyabs -0.0000 -> 0.0000
|
||||
ddcpa117 copyabs 0E-141 -> 0E-141
|
||||
ddcpa118 copyabs -0E-141 -> 0E-141
|
||||
|
||||
-- full coefficients, alternating bits
|
||||
ddcpa121 copyabs 2682682682682682 -> 2682682682682682
|
||||
ddcpa122 copyabs -2682682682682682 -> 2682682682682682
|
||||
ddcpa123 copyabs 1341341341341341 -> 1341341341341341
|
||||
ddcpa124 copyabs -1341341341341341 -> 1341341341341341
|
||||
|
||||
-- Nmax, Nmin, Ntiny
|
||||
ddcpa131 copyabs 9.999999999999999E+384 -> 9.999999999999999E+384
|
||||
ddcpa132 copyabs 1E-383 -> 1E-383
|
||||
ddcpa133 copyabs 1.000000000000000E-383 -> 1.000000000000000E-383
|
||||
ddcpa134 copyabs 1E-398 -> 1E-398
|
||||
|
||||
ddcpa135 copyabs -1E-398 -> 1E-398
|
||||
ddcpa136 copyabs -1.000000000000000E-383 -> 1.000000000000000E-383
|
||||
ddcpa137 copyabs -1E-383 -> 1E-383
|
||||
ddcpa138 copyabs -9.999999999999999E+384 -> 9.999999999999999E+384
|
@@ -0,0 +1,88 @@
|
||||
------------------------------------------------------------------------
|
||||
-- ddCopyNegate.decTest -- quiet decDouble copy and negate --
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
-- All operands and results are decDoubles.
|
||||
precision: 16
|
||||
maxExponent: 384
|
||||
minExponent: -383
|
||||
extended: 1
|
||||
clamp: 1
|
||||
rounding: half_even
|
||||
|
||||
-- Sanity check
|
||||
ddcpn001 copynegate +7.50 -> -7.50
|
||||
|
||||
-- Infinities
|
||||
ddcpn011 copynegate Infinity -> -Infinity
|
||||
ddcpn012 copynegate -Infinity -> Infinity
|
||||
|
||||
-- NaNs, 0 payload
|
||||
ddcpn021 copynegate NaN -> -NaN
|
||||
ddcpn022 copynegate -NaN -> NaN
|
||||
ddcpn023 copynegate sNaN -> -sNaN
|
||||
ddcpn024 copynegate -sNaN -> sNaN
|
||||
|
||||
-- NaNs, non-0 payload
|
||||
ddcpn031 copynegate NaN13 -> -NaN13
|
||||
ddcpn032 copynegate -NaN13 -> NaN13
|
||||
ddcpn033 copynegate sNaN13 -> -sNaN13
|
||||
ddcpn034 copynegate -sNaN13 -> sNaN13
|
||||
ddcpn035 copynegate NaN70 -> -NaN70
|
||||
ddcpn036 copynegate -NaN70 -> NaN70
|
||||
ddcpn037 copynegate sNaN101 -> -sNaN101
|
||||
ddcpn038 copynegate -sNaN101 -> sNaN101
|
||||
|
||||
-- finites
|
||||
ddcpn101 copynegate 7 -> -7
|
||||
ddcpn102 copynegate -7 -> 7
|
||||
ddcpn103 copynegate 75 -> -75
|
||||
ddcpn104 copynegate -75 -> 75
|
||||
ddcpn105 copynegate 7.50 -> -7.50
|
||||
ddcpn106 copynegate -7.50 -> 7.50
|
||||
ddcpn107 copynegate 7.500 -> -7.500
|
||||
ddcpn108 copynegate -7.500 -> 7.500
|
||||
|
||||
-- zeros
|
||||
ddcpn111 copynegate 0 -> -0
|
||||
ddcpn112 copynegate -0 -> 0
|
||||
ddcpn113 copynegate 0E+4 -> -0E+4
|
||||
ddcpn114 copynegate -0E+4 -> 0E+4
|
||||
ddcpn115 copynegate 0.0000 -> -0.0000
|
||||
ddcpn116 copynegate -0.0000 -> 0.0000
|
||||
ddcpn117 copynegate 0E-141 -> -0E-141
|
||||
ddcpn118 copynegate -0E-141 -> 0E-141
|
||||
|
||||
-- full coefficients, alternating bits
|
||||
ddcpn121 copynegate 2682682682682682 -> -2682682682682682
|
||||
ddcpn122 copynegate -2682682682682682 -> 2682682682682682
|
||||
ddcpn123 copynegate 1341341341341341 -> -1341341341341341
|
||||
ddcpn124 copynegate -1341341341341341 -> 1341341341341341
|
||||
|
||||
-- Nmax, Nmin, Ntiny
|
||||
ddcpn131 copynegate 9.999999999999999E+384 -> -9.999999999999999E+384
|
||||
ddcpn132 copynegate 1E-383 -> -1E-383
|
||||
ddcpn133 copynegate 1.000000000000000E-383 -> -1.000000000000000E-383
|
||||
ddcpn134 copynegate 1E-398 -> -1E-398
|
||||
|
||||
ddcpn135 copynegate -1E-398 -> 1E-398
|
||||
ddcpn136 copynegate -1.000000000000000E-383 -> 1.000000000000000E-383
|
||||
ddcpn137 copynegate -1E-383 -> 1E-383
|
||||
ddcpn138 copynegate -9.999999999999999E+384 -> 9.999999999999999E+384
|
@@ -0,0 +1,175 @@
|
||||
------------------------------------------------------------------------
|
||||
-- ddCopySign.decTest -- quiet decDouble copy with sign from rhs --
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
-- All operands and results are decDoubles.
|
||||
precision: 16
|
||||
maxExponent: 384
|
||||
minExponent: -383
|
||||
extended: 1
|
||||
clamp: 1
|
||||
rounding: half_even
|
||||
|
||||
-- Sanity check
|
||||
ddcps001 copysign +7.50 11 -> 7.50
|
||||
|
||||
-- Infinities
|
||||
ddcps011 copysign Infinity 11 -> Infinity
|
||||
ddcps012 copysign -Infinity 11 -> Infinity
|
||||
|
||||
-- NaNs, 0 payload
|
||||
ddcps021 copysign NaN 11 -> NaN
|
||||
ddcps022 copysign -NaN 11 -> NaN
|
||||
ddcps023 copysign sNaN 11 -> sNaN
|
||||
ddcps024 copysign -sNaN 11 -> sNaN
|
||||
|
||||
-- NaNs, non-0 payload
|
||||
ddcps031 copysign NaN10 11 -> NaN10
|
||||
ddcps032 copysign -NaN10 11 -> NaN10
|
||||
ddcps033 copysign sNaN10 11 -> sNaN10
|
||||
ddcps034 copysign -sNaN10 11 -> sNaN10
|
||||
ddcps035 copysign NaN7 11 -> NaN7
|
||||
ddcps036 copysign -NaN7 11 -> NaN7
|
||||
ddcps037 copysign sNaN101 11 -> sNaN101
|
||||
ddcps038 copysign -sNaN101 11 -> sNaN101
|
||||
|
||||
-- finites
|
||||
ddcps101 copysign 7 11 -> 7
|
||||
ddcps102 copysign -7 11 -> 7
|
||||
ddcps103 copysign 75 11 -> 75
|
||||
ddcps104 copysign -75 11 -> 75
|
||||
ddcps105 copysign 7.50 11 -> 7.50
|
||||
ddcps106 copysign -7.50 11 -> 7.50
|
||||
ddcps107 copysign 7.500 11 -> 7.500
|
||||
ddcps108 copysign -7.500 11 -> 7.500
|
||||
|
||||
-- zeros
|
||||
ddcps111 copysign 0 11 -> 0
|
||||
ddcps112 copysign -0 11 -> 0
|
||||
ddcps113 copysign 0E+4 11 -> 0E+4
|
||||
ddcps114 copysign -0E+4 11 -> 0E+4
|
||||
ddcps115 copysign 0.0000 11 -> 0.0000
|
||||
ddcps116 copysign -0.0000 11 -> 0.0000
|
||||
ddcps117 copysign 0E-141 11 -> 0E-141
|
||||
ddcps118 copysign -0E-141 11 -> 0E-141
|
||||
|
||||
-- full coefficients, alternating bits
|
||||
ddcps121 copysign 2682682682682682 11 -> 2682682682682682
|
||||
ddcps122 copysign -2682682682682682 11 -> 2682682682682682
|
||||
ddcps123 copysign 1341341341341341 11 -> 1341341341341341
|
||||
ddcps124 copysign -1341341341341341 11 -> 1341341341341341
|
||||
|
||||
-- Nmax, Nmin, Ntiny
|
||||
ddcps131 copysign 9.999999999999999E+384 11 -> 9.999999999999999E+384
|
||||
ddcps132 copysign 1E-383 11 -> 1E-383
|
||||
ddcps133 copysign 1.000000000000000E-383 11 -> 1.000000000000000E-383
|
||||
ddcps134 copysign 1E-398 11 -> 1E-398
|
||||
|
||||
ddcps135 copysign -1E-398 11 -> 1E-398
|
||||
ddcps136 copysign -1.000000000000000E-383 11 -> 1.000000000000000E-383
|
||||
ddcps137 copysign -1E-383 11 -> 1E-383
|
||||
ddcps138 copysign -9.999999999999999E+384 11 -> 9.999999999999999E+384
|
||||
|
||||
-- repeat with negative RHS
|
||||
|
||||
-- Infinities
|
||||
ddcps211 copysign Infinity -34 -> -Infinity
|
||||
ddcps212 copysign -Infinity -34 -> -Infinity
|
||||
|
||||
-- NaNs, 0 payload
|
||||
ddcps221 copysign NaN -34 -> -NaN
|
||||
ddcps222 copysign -NaN -34 -> -NaN
|
||||
ddcps223 copysign sNaN -34 -> -sNaN
|
||||
ddcps224 copysign -sNaN -34 -> -sNaN
|
||||
|
||||
-- NaNs, non-0 payload
|
||||
ddcps231 copysign NaN10 -34 -> -NaN10
|
||||
ddcps232 copysign -NaN10 -34 -> -NaN10
|
||||
ddcps233 copysign sNaN10 -34 -> -sNaN10
|
||||
ddcps234 copysign -sNaN10 -34 -> -sNaN10
|
||||
ddcps235 copysign NaN7 -34 -> -NaN7
|
||||
ddcps236 copysign -NaN7 -34 -> -NaN7
|
||||
ddcps237 copysign sNaN101 -34 -> -sNaN101
|
||||
ddcps238 copysign -sNaN101 -34 -> -sNaN101
|
||||
|
||||
-- finites
|
||||
ddcps301 copysign 7 -34 -> -7
|
||||
ddcps302 copysign -7 -34 -> -7
|
||||
ddcps303 copysign 75 -34 -> -75
|
||||
ddcps304 copysign -75 -34 -> -75
|
||||
ddcps305 copysign 7.50 -34 -> -7.50
|
||||
ddcps306 copysign -7.50 -34 -> -7.50
|
||||
ddcps307 copysign 7.500 -34 -> -7.500
|
||||
ddcps308 copysign -7.500 -34 -> -7.500
|
||||
|
||||
-- zeros
|
||||
ddcps311 copysign 0 -34 -> -0
|
||||
ddcps312 copysign -0 -34 -> -0
|
||||
ddcps313 copysign 0E+4 -34 -> -0E+4
|
||||
ddcps314 copysign -0E+4 -34 -> -0E+4
|
||||
ddcps315 copysign 0.0000 -34 -> -0.0000
|
||||
ddcps316 copysign -0.0000 -34 -> -0.0000
|
||||
ddcps317 copysign 0E-141 -34 -> -0E-141
|
||||
ddcps318 copysign -0E-141 -34 -> -0E-141
|
||||
|
||||
-- full coefficients, alternating bits
|
||||
ddcps321 copysign 2682682682682682 -34 -> -2682682682682682
|
||||
ddcps322 copysign -2682682682682682 -34 -> -2682682682682682
|
||||
ddcps323 copysign 1341341341341341 -34 -> -1341341341341341
|
||||
ddcps324 copysign -1341341341341341 -34 -> -1341341341341341
|
||||
|
||||
-- Nmax, Nmin, Ntiny
|
||||
ddcps331 copysign 9.999999999999999E+384 -34 -> -9.999999999999999E+384
|
||||
ddcps332 copysign 1E-383 -34 -> -1E-383
|
||||
ddcps333 copysign 1.000000000000000E-383 -34 -> -1.000000000000000E-383
|
||||
ddcps334 copysign 1E-398 -34 -> -1E-398
|
||||
|
||||
ddcps335 copysign -1E-398 -34 -> -1E-398
|
||||
ddcps336 copysign -1.000000000000000E-383 -34 -> -1.000000000000000E-383
|
||||
ddcps337 copysign -1E-383 -34 -> -1E-383
|
||||
ddcps338 copysign -9.999999999999999E+384 -34 -> -9.999999999999999E+384
|
||||
|
||||
-- Other kinds of RHS
|
||||
ddcps401 copysign 701 -34 -> -701
|
||||
ddcps402 copysign -720 -34 -> -720
|
||||
ddcps403 copysign 701 -0 -> -701
|
||||
ddcps404 copysign -720 -0 -> -720
|
||||
ddcps405 copysign 701 +0 -> 701
|
||||
ddcps406 copysign -720 +0 -> 720
|
||||
ddcps407 copysign 701 +34 -> 701
|
||||
ddcps408 copysign -720 +34 -> 720
|
||||
|
||||
ddcps413 copysign 701 -Inf -> -701
|
||||
ddcps414 copysign -720 -Inf -> -720
|
||||
ddcps415 copysign 701 +Inf -> 701
|
||||
ddcps416 copysign -720 +Inf -> 720
|
||||
|
||||
ddcps420 copysign 701 -NaN -> -701
|
||||
ddcps421 copysign -720 -NaN -> -720
|
||||
ddcps422 copysign 701 +NaN -> 701
|
||||
ddcps423 copysign -720 +NaN -> 720
|
||||
ddcps425 copysign -720 +NaN8 -> 720
|
||||
|
||||
ddcps426 copysign 701 -sNaN -> -701
|
||||
ddcps427 copysign -720 -sNaN -> -720
|
||||
ddcps428 copysign 701 +sNaN -> 701
|
||||
ddcps429 copysign -720 +sNaN -> 720
|
||||
ddcps430 copysign -720 +sNaN3 -> 720
|
||||
|
@@ -0,0 +1,863 @@
|
||||
------------------------------------------------------------------------
|
||||
-- ddDivide.decTest -- decDouble division --
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
precision: 16
|
||||
maxExponent: 384
|
||||
minExponent: -383
|
||||
extended: 1
|
||||
clamp: 1
|
||||
rounding: half_even
|
||||
|
||||
-- sanity checks
|
||||
dddiv001 divide 1 1 -> 1
|
||||
dddiv002 divide 2 1 -> 2
|
||||
dddiv003 divide 1 2 -> 0.5
|
||||
dddiv004 divide 2 2 -> 1
|
||||
dddiv005 divide 0 1 -> 0
|
||||
dddiv006 divide 0 2 -> 0
|
||||
dddiv007 divide 1 3 -> 0.3333333333333333 Inexact Rounded
|
||||
dddiv008 divide 2 3 -> 0.6666666666666667 Inexact Rounded
|
||||
dddiv009 divide 3 3 -> 1
|
||||
|
||||
dddiv010 divide 2.4 1 -> 2.4
|
||||
dddiv011 divide 2.4 -1 -> -2.4
|
||||
dddiv012 divide -2.4 1 -> -2.4
|
||||
dddiv013 divide -2.4 -1 -> 2.4
|
||||
dddiv014 divide 2.40 1 -> 2.40
|
||||
dddiv015 divide 2.400 1 -> 2.400
|
||||
dddiv016 divide 2.4 2 -> 1.2
|
||||
dddiv017 divide 2.400 2 -> 1.200
|
||||
dddiv018 divide 2. 2 -> 1
|
||||
dddiv019 divide 20 20 -> 1
|
||||
|
||||
dddiv020 divide 187 187 -> 1
|
||||
dddiv021 divide 5 2 -> 2.5
|
||||
dddiv022 divide 50 20 -> 2.5
|
||||
dddiv023 divide 500 200 -> 2.5
|
||||
dddiv024 divide 50.0 20.0 -> 2.5
|
||||
dddiv025 divide 5.00 2.00 -> 2.5
|
||||
dddiv026 divide 5 2.0 -> 2.5
|
||||
dddiv027 divide 5 2.000 -> 2.5
|
||||
dddiv028 divide 5 0.20 -> 25
|
||||
dddiv029 divide 5 0.200 -> 25
|
||||
dddiv030 divide 10 1 -> 10
|
||||
dddiv031 divide 100 1 -> 100
|
||||
dddiv032 divide 1000 1 -> 1000
|
||||
dddiv033 divide 1000 100 -> 10
|
||||
|
||||
dddiv035 divide 1 2 -> 0.5
|
||||
dddiv036 divide 1 4 -> 0.25
|
||||
dddiv037 divide 1 8 -> 0.125
|
||||
dddiv038 divide 1 16 -> 0.0625
|
||||
dddiv039 divide 1 32 -> 0.03125
|
||||
dddiv040 divide 1 64 -> 0.015625
|
||||
dddiv041 divide 1 -2 -> -0.5
|
||||
dddiv042 divide 1 -4 -> -0.25
|
||||
dddiv043 divide 1 -8 -> -0.125
|
||||
dddiv044 divide 1 -16 -> -0.0625
|
||||
dddiv045 divide 1 -32 -> -0.03125
|
||||
dddiv046 divide 1 -64 -> -0.015625
|
||||
dddiv047 divide -1 2 -> -0.5
|
||||
dddiv048 divide -1 4 -> -0.25
|
||||
dddiv049 divide -1 8 -> -0.125
|
||||
dddiv050 divide -1 16 -> -0.0625
|
||||
dddiv051 divide -1 32 -> -0.03125
|
||||
dddiv052 divide -1 64 -> -0.015625
|
||||
dddiv053 divide -1 -2 -> 0.5
|
||||
dddiv054 divide -1 -4 -> 0.25
|
||||
dddiv055 divide -1 -8 -> 0.125
|
||||
dddiv056 divide -1 -16 -> 0.0625
|
||||
dddiv057 divide -1 -32 -> 0.03125
|
||||
dddiv058 divide -1 -64 -> 0.015625
|
||||
|
||||
-- bcdTime
|
||||
dddiv060 divide 1 7 -> 0.1428571428571429 Inexact Rounded
|
||||
dddiv061 divide 1.2345678 1.9876543 -> 0.6211179680490717 Inexact Rounded
|
||||
|
||||
-- 1234567890123456
|
||||
dddiv071 divide 9999999999999999 1 -> 9999999999999999
|
||||
dddiv072 divide 999999999999999 1 -> 999999999999999
|
||||
dddiv073 divide 99999999999999 1 -> 99999999999999
|
||||
dddiv074 divide 9999999999999 1 -> 9999999999999
|
||||
dddiv075 divide 999999999999 1 -> 999999999999
|
||||
dddiv076 divide 99999999999 1 -> 99999999999
|
||||
dddiv077 divide 9999999999 1 -> 9999999999
|
||||
dddiv078 divide 999999999 1 -> 999999999
|
||||
dddiv079 divide 99999999 1 -> 99999999
|
||||
dddiv080 divide 9999999 1 -> 9999999
|
||||
dddiv081 divide 999999 1 -> 999999
|
||||
dddiv082 divide 99999 1 -> 99999
|
||||
dddiv083 divide 9999 1 -> 9999
|
||||
dddiv084 divide 999 1 -> 999
|
||||
dddiv085 divide 99 1 -> 99
|
||||
dddiv086 divide 9 1 -> 9
|
||||
|
||||
dddiv090 divide 0. 1 -> 0
|
||||
dddiv091 divide .0 1 -> 0.0
|
||||
dddiv092 divide 0.00 1 -> 0.00
|
||||
dddiv093 divide 0.00E+9 1 -> 0E+7
|
||||
dddiv094 divide 0.0000E-50 1 -> 0E-54
|
||||
|
||||
dddiv095 divide 1 1E-8 -> 1E+8
|
||||
dddiv096 divide 1 1E-9 -> 1E+9
|
||||
dddiv097 divide 1 1E-10 -> 1E+10
|
||||
dddiv098 divide 1 1E-11 -> 1E+11
|
||||
dddiv099 divide 1 1E-12 -> 1E+12
|
||||
|
||||
dddiv100 divide 1 1 -> 1
|
||||
dddiv101 divide 1 2 -> 0.5
|
||||
dddiv102 divide 1 3 -> 0.3333333333333333 Inexact Rounded
|
||||
dddiv103 divide 1 4 -> 0.25
|
||||
dddiv104 divide 1 5 -> 0.2
|
||||
dddiv105 divide 1 6 -> 0.1666666666666667 Inexact Rounded
|
||||
dddiv106 divide 1 7 -> 0.1428571428571429 Inexact Rounded
|
||||
dddiv107 divide 1 8 -> 0.125
|
||||
dddiv108 divide 1 9 -> 0.1111111111111111 Inexact Rounded
|
||||
dddiv109 divide 1 10 -> 0.1
|
||||
dddiv110 divide 1 1 -> 1
|
||||
dddiv111 divide 2 1 -> 2
|
||||
dddiv112 divide 3 1 -> 3
|
||||
dddiv113 divide 4 1 -> 4
|
||||
dddiv114 divide 5 1 -> 5
|
||||
dddiv115 divide 6 1 -> 6
|
||||
dddiv116 divide 7 1 -> 7
|
||||
dddiv117 divide 8 1 -> 8
|
||||
dddiv118 divide 9 1 -> 9
|
||||
dddiv119 divide 10 1 -> 10
|
||||
|
||||
dddiv120 divide 3E+1 0.001 -> 3E+4
|
||||
dddiv121 divide 2.200 2 -> 1.100
|
||||
|
||||
dddiv130 divide 12345 4.999 -> 2469.493898779756 Inexact Rounded
|
||||
dddiv131 divide 12345 4.99 -> 2473.947895791583 Inexact Rounded
|
||||
dddiv132 divide 12345 4.9 -> 2519.387755102041 Inexact Rounded
|
||||
dddiv133 divide 12345 5 -> 2469
|
||||
dddiv134 divide 12345 5.1 -> 2420.588235294118 Inexact Rounded
|
||||
dddiv135 divide 12345 5.01 -> 2464.071856287425 Inexact Rounded
|
||||
dddiv136 divide 12345 5.001 -> 2468.506298740252 Inexact Rounded
|
||||
|
||||
-- test possibly imprecise results
|
||||
dddiv220 divide 391 597 -> 0.6549413735343384 Inexact Rounded
|
||||
dddiv221 divide 391 -597 -> -0.6549413735343384 Inexact Rounded
|
||||
dddiv222 divide -391 597 -> -0.6549413735343384 Inexact Rounded
|
||||
dddiv223 divide -391 -597 -> 0.6549413735343384 Inexact Rounded
|
||||
|
||||
-- test some cases that are close to exponent overflow, some with coefficient padding
|
||||
dddiv270 divide 1 1e384 -> 1E-384 Subnormal
|
||||
dddiv271 divide 1 0.9e384 -> 1.11111111111111E-384 Rounded Inexact Subnormal Underflow
|
||||
dddiv272 divide 1 0.99e384 -> 1.01010101010101E-384 Rounded Inexact Subnormal Underflow
|
||||
dddiv273 divide 1 0.9999999999999999e384 -> 1.00000000000000E-384 Rounded Inexact Subnormal Underflow
|
||||
dddiv274 divide 9e384 1 -> 9.000000000000000E+384 Clamped
|
||||
dddiv275 divide 9.9e384 1 -> 9.900000000000000E+384 Clamped
|
||||
dddiv276 divide 9.99e384 1 -> 9.990000000000000E+384 Clamped
|
||||
dddiv277 divide 9.9999999999999e384 1 -> 9.999999999999900E+384 Clamped
|
||||
dddiv278 divide 9.99999999999999e384 1 -> 9.999999999999990E+384 Clamped
|
||||
dddiv279 divide 9.999999999999999e384 1 -> 9.999999999999999E+384
|
||||
|
||||
dddiv285 divide 9.9e384 1.1 -> 9.000000000000000E+384 Clamped
|
||||
dddiv286 divide 9.99e384 1.1 -> 9.081818181818182E+384 Inexact Rounded
|
||||
dddiv287 divide 9.9999999999999e384 1.1 -> 9.090909090909000E+384 Clamped
|
||||
dddiv288 divide 9.99999999999999e384 1.1 -> 9.090909090909082E+384 Inexact Rounded
|
||||
dddiv289 divide 9.999999999999999e384 1.1 -> 9.090909090909090E+384 Clamped
|
||||
|
||||
|
||||
-- Divide into 0 tests
|
||||
dddiv301 divide 0 7 -> 0
|
||||
dddiv302 divide 0 7E-5 -> 0E+5
|
||||
dddiv303 divide 0 7E-1 -> 0E+1
|
||||
dddiv304 divide 0 7E+1 -> 0.0
|
||||
dddiv305 divide 0 7E+5 -> 0.00000
|
||||
dddiv306 divide 0 7E+6 -> 0.000000
|
||||
dddiv307 divide 0 7E+7 -> 0E-7
|
||||
dddiv308 divide 0 70E-5 -> 0E+5
|
||||
dddiv309 divide 0 70E-1 -> 0E+1
|
||||
dddiv310 divide 0 70E+0 -> 0
|
||||
dddiv311 divide 0 70E+1 -> 0.0
|
||||
dddiv312 divide 0 70E+5 -> 0.00000
|
||||
dddiv313 divide 0 70E+6 -> 0.000000
|
||||
dddiv314 divide 0 70E+7 -> 0E-7
|
||||
dddiv315 divide 0 700E-5 -> 0E+5
|
||||
dddiv316 divide 0 700E-1 -> 0E+1
|
||||
dddiv317 divide 0 700E+0 -> 0
|
||||
dddiv318 divide 0 700E+1 -> 0.0
|
||||
dddiv319 divide 0 700E+5 -> 0.00000
|
||||
dddiv320 divide 0 700E+6 -> 0.000000
|
||||
dddiv321 divide 0 700E+7 -> 0E-7
|
||||
dddiv322 divide 0 700E+77 -> 0E-77
|
||||
|
||||
dddiv331 divide 0E-3 7E-5 -> 0E+2
|
||||
dddiv332 divide 0E-3 7E-1 -> 0.00
|
||||
dddiv333 divide 0E-3 7E+1 -> 0.0000
|
||||
dddiv334 divide 0E-3 7E+5 -> 0E-8
|
||||
dddiv335 divide 0E-1 7E-5 -> 0E+4
|
||||
dddiv336 divide 0E-1 7E-1 -> 0
|
||||
dddiv337 divide 0E-1 7E+1 -> 0.00
|
||||
dddiv338 divide 0E-1 7E+5 -> 0.000000
|
||||
dddiv339 divide 0E+1 7E-5 -> 0E+6
|
||||
dddiv340 divide 0E+1 7E-1 -> 0E+2
|
||||
dddiv341 divide 0E+1 7E+1 -> 0
|
||||
dddiv342 divide 0E+1 7E+5 -> 0.0000
|
||||
dddiv343 divide 0E+3 7E-5 -> 0E+8
|
||||
dddiv344 divide 0E+3 7E-1 -> 0E+4
|
||||
dddiv345 divide 0E+3 7E+1 -> 0E+2
|
||||
dddiv346 divide 0E+3 7E+5 -> 0.00
|
||||
|
||||
-- These were 'input rounding'
|
||||
dddiv441 divide 12345678000 1 -> 12345678000
|
||||
dddiv442 divide 1 12345678000 -> 8.100000664200054E-11 Inexact Rounded
|
||||
dddiv443 divide 1234567800 1 -> 1234567800
|
||||
dddiv444 divide 1 1234567800 -> 8.100000664200054E-10 Inexact Rounded
|
||||
dddiv445 divide 1234567890 1 -> 1234567890
|
||||
dddiv446 divide 1 1234567890 -> 8.100000073710001E-10 Inexact Rounded
|
||||
dddiv447 divide 1234567891 1 -> 1234567891
|
||||
dddiv448 divide 1 1234567891 -> 8.100000067149001E-10 Inexact Rounded
|
||||
dddiv449 divide 12345678901 1 -> 12345678901
|
||||
dddiv450 divide 1 12345678901 -> 8.100000073053901E-11 Inexact Rounded
|
||||
dddiv451 divide 1234567896 1 -> 1234567896
|
||||
dddiv452 divide 1 1234567896 -> 8.100000034344000E-10 Inexact Rounded
|
||||
|
||||
-- high-lows
|
||||
dddiv453 divide 1e+1 1 -> 1E+1
|
||||
dddiv454 divide 1e+1 1.0 -> 1E+1
|
||||
dddiv455 divide 1e+1 1.00 -> 1E+1
|
||||
dddiv456 divide 1e+2 2 -> 5E+1
|
||||
dddiv457 divide 1e+2 2.0 -> 5E+1
|
||||
dddiv458 divide 1e+2 2.00 -> 5E+1
|
||||
|
||||
-- some from IEEE discussions
|
||||
dddiv460 divide 3e0 2e0 -> 1.5
|
||||
dddiv461 divide 30e-1 2e0 -> 1.5
|
||||
dddiv462 divide 300e-2 2e0 -> 1.50
|
||||
dddiv464 divide 3000e-3 2e0 -> 1.500
|
||||
dddiv465 divide 3e0 20e-1 -> 1.5
|
||||
dddiv466 divide 30e-1 20e-1 -> 1.5
|
||||
dddiv467 divide 300e-2 20e-1 -> 1.5
|
||||
dddiv468 divide 3000e-3 20e-1 -> 1.50
|
||||
dddiv469 divide 3e0 200e-2 -> 1.5
|
||||
dddiv470 divide 30e-1 200e-2 -> 1.5
|
||||
dddiv471 divide 300e-2 200e-2 -> 1.5
|
||||
dddiv472 divide 3000e-3 200e-2 -> 1.5
|
||||
dddiv473 divide 3e0 2000e-3 -> 1.5
|
||||
dddiv474 divide 30e-1 2000e-3 -> 1.5
|
||||
dddiv475 divide 300e-2 2000e-3 -> 1.5
|
||||
dddiv476 divide 3000e-3 2000e-3 -> 1.5
|
||||
|
||||
-- some reciprocals
|
||||
dddiv480 divide 1 1.0E+33 -> 1E-33
|
||||
dddiv481 divide 1 10E+33 -> 1E-34
|
||||
dddiv482 divide 1 1.0E-33 -> 1E+33
|
||||
dddiv483 divide 1 10E-33 -> 1E+32
|
||||
|
||||
-- RMS discussion table
|
||||
dddiv484 divide 0e5 1e3 -> 0E+2
|
||||
dddiv485 divide 0e5 2e3 -> 0E+2
|
||||
dddiv486 divide 0e5 10e2 -> 0E+3
|
||||
dddiv487 divide 0e5 20e2 -> 0E+3
|
||||
dddiv488 divide 0e5 100e1 -> 0E+4
|
||||
dddiv489 divide 0e5 200e1 -> 0E+4
|
||||
|
||||
dddiv491 divide 1e5 1e3 -> 1E+2
|
||||
dddiv492 divide 1e5 2e3 -> 5E+1
|
||||
dddiv493 divide 1e5 10e2 -> 1E+2
|
||||
dddiv494 divide 1e5 20e2 -> 5E+1
|
||||
dddiv495 divide 1e5 100e1 -> 1E+2
|
||||
dddiv496 divide 1e5 200e1 -> 5E+1
|
||||
|
||||
-- tryzeros cases
|
||||
rounding: half_up
|
||||
dddiv497 divide 0E+380 1000E-13 -> 0E+369 Clamped
|
||||
dddiv498 divide 0E-390 1000E+13 -> 0E-398 Clamped
|
||||
|
||||
rounding: half_up
|
||||
|
||||
-- focus on trailing zeros issues
|
||||
dddiv500 divide 1 9.9 -> 0.1010101010101010 Inexact Rounded
|
||||
dddiv501 divide 1 9.09 -> 0.1100110011001100 Inexact Rounded
|
||||
dddiv502 divide 1 9.009 -> 0.1110001110001110 Inexact Rounded
|
||||
|
||||
dddiv511 divide 1 2 -> 0.5
|
||||
dddiv512 divide 1.0 2 -> 0.5
|
||||
dddiv513 divide 1.00 2 -> 0.50
|
||||
dddiv514 divide 1.000 2 -> 0.500
|
||||
dddiv515 divide 1.0000 2 -> 0.5000
|
||||
dddiv516 divide 1.00000 2 -> 0.50000
|
||||
dddiv517 divide 1.000000 2 -> 0.500000
|
||||
dddiv518 divide 1.0000000 2 -> 0.5000000
|
||||
dddiv519 divide 1.00 2.00 -> 0.5
|
||||
|
||||
dddiv521 divide 2 1 -> 2
|
||||
dddiv522 divide 2 1.0 -> 2
|
||||
dddiv523 divide 2 1.00 -> 2
|
||||
dddiv524 divide 2 1.000 -> 2
|
||||
dddiv525 divide 2 1.0000 -> 2
|
||||
dddiv526 divide 2 1.00000 -> 2
|
||||
dddiv527 divide 2 1.000000 -> 2
|
||||
dddiv528 divide 2 1.0000000 -> 2
|
||||
dddiv529 divide 2.00 1.00 -> 2
|
||||
|
||||
dddiv530 divide 2.40 2 -> 1.20
|
||||
dddiv531 divide 2.40 4 -> 0.60
|
||||
dddiv532 divide 2.40 10 -> 0.24
|
||||
dddiv533 divide 2.40 2.0 -> 1.2
|
||||
dddiv534 divide 2.40 4.0 -> 0.6
|
||||
dddiv535 divide 2.40 10.0 -> 0.24
|
||||
dddiv536 divide 2.40 2.00 -> 1.2
|
||||
dddiv537 divide 2.40 4.00 -> 0.6
|
||||
dddiv538 divide 2.40 10.00 -> 0.24
|
||||
dddiv539 divide 0.9 0.1 -> 9
|
||||
dddiv540 divide 0.9 0.01 -> 9E+1
|
||||
dddiv541 divide 0.9 0.001 -> 9E+2
|
||||
dddiv542 divide 5 2 -> 2.5
|
||||
dddiv543 divide 5 2.0 -> 2.5
|
||||
dddiv544 divide 5 2.00 -> 2.5
|
||||
dddiv545 divide 5 20 -> 0.25
|
||||
dddiv546 divide 5 20.0 -> 0.25
|
||||
dddiv547 divide 2.400 2 -> 1.200
|
||||
dddiv548 divide 2.400 2.0 -> 1.20
|
||||
dddiv549 divide 2.400 2.400 -> 1
|
||||
|
||||
dddiv550 divide 240 1 -> 240
|
||||
dddiv551 divide 240 10 -> 24
|
||||
dddiv552 divide 240 100 -> 2.4
|
||||
dddiv553 divide 240 1000 -> 0.24
|
||||
dddiv554 divide 2400 1 -> 2400
|
||||
dddiv555 divide 2400 10 -> 240
|
||||
dddiv556 divide 2400 100 -> 24
|
||||
dddiv557 divide 2400 1000 -> 2.4
|
||||
|
||||
-- +ve exponent
|
||||
dddiv600 divide 2.4E+9 2 -> 1.2E+9
|
||||
dddiv601 divide 2.40E+9 2 -> 1.20E+9
|
||||
dddiv602 divide 2.400E+9 2 -> 1.200E+9
|
||||
dddiv603 divide 2.4000E+9 2 -> 1.2000E+9
|
||||
dddiv604 divide 24E+8 2 -> 1.2E+9
|
||||
dddiv605 divide 240E+7 2 -> 1.20E+9
|
||||
dddiv606 divide 2400E+6 2 -> 1.200E+9
|
||||
dddiv607 divide 24000E+5 2 -> 1.2000E+9
|
||||
|
||||
-- more zeros, etc.
|
||||
dddiv731 divide 5.00 1E-3 -> 5.00E+3
|
||||
dddiv732 divide 00.00 0.000 -> NaN Division_undefined
|
||||
dddiv733 divide 00.00 0E-3 -> NaN Division_undefined
|
||||
dddiv734 divide 0 -0 -> NaN Division_undefined
|
||||
dddiv735 divide -0 0 -> NaN Division_undefined
|
||||
dddiv736 divide -0 -0 -> NaN Division_undefined
|
||||
|
||||
dddiv741 divide 0 -1 -> -0
|
||||
dddiv742 divide -0 -1 -> 0
|
||||
dddiv743 divide 0 1 -> 0
|
||||
dddiv744 divide -0 1 -> -0
|
||||
dddiv745 divide -1 0 -> -Infinity Division_by_zero
|
||||
dddiv746 divide -1 -0 -> Infinity Division_by_zero
|
||||
dddiv747 divide 1 0 -> Infinity Division_by_zero
|
||||
dddiv748 divide 1 -0 -> -Infinity Division_by_zero
|
||||
|
||||
dddiv751 divide 0.0 -1 -> -0.0
|
||||
dddiv752 divide -0.0 -1 -> 0.0
|
||||
dddiv753 divide 0.0 1 -> 0.0
|
||||
dddiv754 divide -0.0 1 -> -0.0
|
||||
dddiv755 divide -1.0 0 -> -Infinity Division_by_zero
|
||||
dddiv756 divide -1.0 -0 -> Infinity Division_by_zero
|
||||
dddiv757 divide 1.0 0 -> Infinity Division_by_zero
|
||||
dddiv758 divide 1.0 -0 -> -Infinity Division_by_zero
|
||||
|
||||
dddiv761 divide 0 -1.0 -> -0E+1
|
||||
dddiv762 divide -0 -1.0 -> 0E+1
|
||||
dddiv763 divide 0 1.0 -> 0E+1
|
||||
dddiv764 divide -0 1.0 -> -0E+1
|
||||
dddiv765 divide -1 0.0 -> -Infinity Division_by_zero
|
||||
dddiv766 divide -1 -0.0 -> Infinity Division_by_zero
|
||||
dddiv767 divide 1 0.0 -> Infinity Division_by_zero
|
||||
dddiv768 divide 1 -0.0 -> -Infinity Division_by_zero
|
||||
|
||||
dddiv771 divide 0.0 -1.0 -> -0
|
||||
dddiv772 divide -0.0 -1.0 -> 0
|
||||
dddiv773 divide 0.0 1.0 -> 0
|
||||
dddiv774 divide -0.0 1.0 -> -0
|
||||
dddiv775 divide -1.0 0.0 -> -Infinity Division_by_zero
|
||||
dddiv776 divide -1.0 -0.0 -> Infinity Division_by_zero
|
||||
dddiv777 divide 1.0 0.0 -> Infinity Division_by_zero
|
||||
dddiv778 divide 1.0 -0.0 -> -Infinity Division_by_zero
|
||||
|
||||
-- Specials
|
||||
dddiv780 divide Inf -Inf -> NaN Invalid_operation
|
||||
dddiv781 divide Inf -1000 -> -Infinity
|
||||
dddiv782 divide Inf -1 -> -Infinity
|
||||
dddiv783 divide Inf -0 -> -Infinity
|
||||
dddiv784 divide Inf 0 -> Infinity
|
||||
dddiv785 divide Inf 1 -> Infinity
|
||||
dddiv786 divide Inf 1000 -> Infinity
|
||||
dddiv787 divide Inf Inf -> NaN Invalid_operation
|
||||
dddiv788 divide -1000 Inf -> -0E-398 Clamped
|
||||
dddiv789 divide -Inf Inf -> NaN Invalid_operation
|
||||
dddiv790 divide -1 Inf -> -0E-398 Clamped
|
||||
dddiv791 divide -0 Inf -> -0E-398 Clamped
|
||||
dddiv792 divide 0 Inf -> 0E-398 Clamped
|
||||
dddiv793 divide 1 Inf -> 0E-398 Clamped
|
||||
dddiv794 divide 1000 Inf -> 0E-398 Clamped
|
||||
dddiv795 divide Inf Inf -> NaN Invalid_operation
|
||||
|
||||
dddiv800 divide -Inf -Inf -> NaN Invalid_operation
|
||||
dddiv801 divide -Inf -1000 -> Infinity
|
||||
dddiv802 divide -Inf -1 -> Infinity
|
||||
dddiv803 divide -Inf -0 -> Infinity
|
||||
dddiv804 divide -Inf 0 -> -Infinity
|
||||
dddiv805 divide -Inf 1 -> -Infinity
|
||||
dddiv806 divide -Inf 1000 -> -Infinity
|
||||
dddiv807 divide -Inf Inf -> NaN Invalid_operation
|
||||
dddiv808 divide -1000 Inf -> -0E-398 Clamped
|
||||
dddiv809 divide -Inf -Inf -> NaN Invalid_operation
|
||||
dddiv810 divide -1 -Inf -> 0E-398 Clamped
|
||||
dddiv811 divide -0 -Inf -> 0E-398 Clamped
|
||||
dddiv812 divide 0 -Inf -> -0E-398 Clamped
|
||||
dddiv813 divide 1 -Inf -> -0E-398 Clamped
|
||||
dddiv814 divide 1000 -Inf -> -0E-398 Clamped
|
||||
dddiv815 divide Inf -Inf -> NaN Invalid_operation
|
||||
|
||||
dddiv821 divide NaN -Inf -> NaN
|
||||
dddiv822 divide NaN -1000 -> NaN
|
||||
dddiv823 divide NaN -1 -> NaN
|
||||
dddiv824 divide NaN -0 -> NaN
|
||||
dddiv825 divide NaN 0 -> NaN
|
||||
dddiv826 divide NaN 1 -> NaN
|
||||
dddiv827 divide NaN 1000 -> NaN
|
||||
dddiv828 divide NaN Inf -> NaN
|
||||
dddiv829 divide NaN NaN -> NaN
|
||||
dddiv830 divide -Inf NaN -> NaN
|
||||
dddiv831 divide -1000 NaN -> NaN
|
||||
dddiv832 divide -1 NaN -> NaN
|
||||
dddiv833 divide -0 NaN -> NaN
|
||||
dddiv834 divide 0 NaN -> NaN
|
||||
dddiv835 divide 1 NaN -> NaN
|
||||
dddiv836 divide 1000 NaN -> NaN
|
||||
dddiv837 divide Inf NaN -> NaN
|
||||
|
||||
dddiv841 divide sNaN -Inf -> NaN Invalid_operation
|
||||
dddiv842 divide sNaN -1000 -> NaN Invalid_operation
|
||||
dddiv843 divide sNaN -1 -> NaN Invalid_operation
|
||||
dddiv844 divide sNaN -0 -> NaN Invalid_operation
|
||||
dddiv845 divide sNaN 0 -> NaN Invalid_operation
|
||||
dddiv846 divide sNaN 1 -> NaN Invalid_operation
|
||||
dddiv847 divide sNaN 1000 -> NaN Invalid_operation
|
||||
dddiv848 divide sNaN NaN -> NaN Invalid_operation
|
||||
dddiv849 divide sNaN sNaN -> NaN Invalid_operation
|
||||
dddiv850 divide NaN sNaN -> NaN Invalid_operation
|
||||
dddiv851 divide -Inf sNaN -> NaN Invalid_operation
|
||||
dddiv852 divide -1000 sNaN -> NaN Invalid_operation
|
||||
dddiv853 divide -1 sNaN -> NaN Invalid_operation
|
||||
dddiv854 divide -0 sNaN -> NaN Invalid_operation
|
||||
dddiv855 divide 0 sNaN -> NaN Invalid_operation
|
||||
dddiv856 divide 1 sNaN -> NaN Invalid_operation
|
||||
dddiv857 divide 1000 sNaN -> NaN Invalid_operation
|
||||
dddiv858 divide Inf sNaN -> NaN Invalid_operation
|
||||
dddiv859 divide NaN sNaN -> NaN Invalid_operation
|
||||
|
||||
-- propagating NaNs
|
||||
dddiv861 divide NaN9 -Inf -> NaN9
|
||||
dddiv862 divide NaN8 1000 -> NaN8
|
||||
dddiv863 divide NaN7 Inf -> NaN7
|
||||
dddiv864 divide NaN6 NaN5 -> NaN6
|
||||
dddiv865 divide -Inf NaN4 -> NaN4
|
||||
dddiv866 divide -1000 NaN3 -> NaN3
|
||||
dddiv867 divide Inf NaN2 -> NaN2
|
||||
|
||||
dddiv871 divide sNaN99 -Inf -> NaN99 Invalid_operation
|
||||
dddiv872 divide sNaN98 -1 -> NaN98 Invalid_operation
|
||||
dddiv873 divide sNaN97 NaN -> NaN97 Invalid_operation
|
||||
dddiv874 divide sNaN96 sNaN94 -> NaN96 Invalid_operation
|
||||
dddiv875 divide NaN95 sNaN93 -> NaN93 Invalid_operation
|
||||
dddiv876 divide -Inf sNaN92 -> NaN92 Invalid_operation
|
||||
dddiv877 divide 0 sNaN91 -> NaN91 Invalid_operation
|
||||
dddiv878 divide Inf sNaN90 -> NaN90 Invalid_operation
|
||||
dddiv879 divide NaN sNaN89 -> NaN89 Invalid_operation
|
||||
|
||||
dddiv881 divide -NaN9 -Inf -> -NaN9
|
||||
dddiv882 divide -NaN8 1000 -> -NaN8
|
||||
dddiv883 divide -NaN7 Inf -> -NaN7
|
||||
dddiv884 divide -NaN6 -NaN5 -> -NaN6
|
||||
dddiv885 divide -Inf -NaN4 -> -NaN4
|
||||
dddiv886 divide -1000 -NaN3 -> -NaN3
|
||||
dddiv887 divide Inf -NaN2 -> -NaN2
|
||||
|
||||
dddiv891 divide -sNaN99 -Inf -> -NaN99 Invalid_operation
|
||||
dddiv892 divide -sNaN98 -1 -> -NaN98 Invalid_operation
|
||||
dddiv893 divide -sNaN97 NaN -> -NaN97 Invalid_operation
|
||||
dddiv894 divide -sNaN96 -sNaN94 -> -NaN96 Invalid_operation
|
||||
dddiv895 divide -NaN95 -sNaN93 -> -NaN93 Invalid_operation
|
||||
dddiv896 divide -Inf -sNaN92 -> -NaN92 Invalid_operation
|
||||
dddiv897 divide 0 -sNaN91 -> -NaN91 Invalid_operation
|
||||
dddiv898 divide Inf -sNaN90 -> -NaN90 Invalid_operation
|
||||
dddiv899 divide -NaN -sNaN89 -> -NaN89 Invalid_operation
|
||||
|
||||
-- Various flavours of divide by 0
|
||||
dddiv901 divide 0 0 -> NaN Division_undefined
|
||||
dddiv902 divide 0.0E5 0 -> NaN Division_undefined
|
||||
dddiv903 divide 0.000 0 -> NaN Division_undefined
|
||||
dddiv904 divide 0.0001 0 -> Infinity Division_by_zero
|
||||
dddiv905 divide 0.01 0 -> Infinity Division_by_zero
|
||||
dddiv906 divide 0.1 0 -> Infinity Division_by_zero
|
||||
dddiv907 divide 1 0 -> Infinity Division_by_zero
|
||||
dddiv908 divide 1 0.0 -> Infinity Division_by_zero
|
||||
dddiv909 divide 10 0.0 -> Infinity Division_by_zero
|
||||
dddiv910 divide 1E+100 0.0 -> Infinity Division_by_zero
|
||||
dddiv911 divide 1E+100 0 -> Infinity Division_by_zero
|
||||
|
||||
dddiv921 divide -0.0001 0 -> -Infinity Division_by_zero
|
||||
dddiv922 divide -0.01 0 -> -Infinity Division_by_zero
|
||||
dddiv923 divide -0.1 0 -> -Infinity Division_by_zero
|
||||
dddiv924 divide -1 0 -> -Infinity Division_by_zero
|
||||
dddiv925 divide -1 0.0 -> -Infinity Division_by_zero
|
||||
dddiv926 divide -10 0.0 -> -Infinity Division_by_zero
|
||||
dddiv927 divide -1E+100 0.0 -> -Infinity Division_by_zero
|
||||
dddiv928 divide -1E+100 0 -> -Infinity Division_by_zero
|
||||
|
||||
dddiv931 divide 0.0001 -0 -> -Infinity Division_by_zero
|
||||
dddiv932 divide 0.01 -0 -> -Infinity Division_by_zero
|
||||
dddiv933 divide 0.1 -0 -> -Infinity Division_by_zero
|
||||
dddiv934 divide 1 -0 -> -Infinity Division_by_zero
|
||||
dddiv935 divide 1 -0.0 -> -Infinity Division_by_zero
|
||||
dddiv936 divide 10 -0.0 -> -Infinity Division_by_zero
|
||||
dddiv937 divide 1E+100 -0.0 -> -Infinity Division_by_zero
|
||||
dddiv938 divide 1E+100 -0 -> -Infinity Division_by_zero
|
||||
|
||||
dddiv941 divide -0.0001 -0 -> Infinity Division_by_zero
|
||||
dddiv942 divide -0.01 -0 -> Infinity Division_by_zero
|
||||
dddiv943 divide -0.1 -0 -> Infinity Division_by_zero
|
||||
dddiv944 divide -1 -0 -> Infinity Division_by_zero
|
||||
dddiv945 divide -1 -0.0 -> Infinity Division_by_zero
|
||||
dddiv946 divide -10 -0.0 -> Infinity Division_by_zero
|
||||
dddiv947 divide -1E+100 -0.0 -> Infinity Division_by_zero
|
||||
dddiv948 divide -1E+100 -0 -> Infinity Division_by_zero
|
||||
|
||||
-- Examples from SQL proposal (Krishna Kulkarni)
|
||||
dddiv1021 divide 1E0 1E0 -> 1
|
||||
dddiv1022 divide 1E0 2E0 -> 0.5
|
||||
dddiv1023 divide 1E0 3E0 -> 0.3333333333333333 Inexact Rounded
|
||||
dddiv1024 divide 100E-2 1000E-3 -> 1
|
||||
dddiv1025 divide 24E-1 2E0 -> 1.2
|
||||
dddiv1026 divide 2400E-3 2E0 -> 1.200
|
||||
dddiv1027 divide 5E0 2E0 -> 2.5
|
||||
dddiv1028 divide 5E0 20E-1 -> 2.5
|
||||
dddiv1029 divide 5E0 2000E-3 -> 2.5
|
||||
dddiv1030 divide 5E0 2E-1 -> 25
|
||||
dddiv1031 divide 5E0 20E-2 -> 25
|
||||
dddiv1032 divide 480E-2 3E0 -> 1.60
|
||||
dddiv1033 divide 47E-1 2E0 -> 2.35
|
||||
|
||||
-- ECMAScript bad examples
|
||||
rounding: half_down
|
||||
dddiv1040 divide 5 9 -> 0.5555555555555556 Inexact Rounded
|
||||
rounding: half_even
|
||||
dddiv1041 divide 6 11 -> 0.5454545454545455 Inexact Rounded
|
||||
|
||||
-- overflow and underflow tests .. note subnormal results
|
||||
-- signs
|
||||
dddiv1051 divide 1e+277 1e-311 -> Infinity Overflow Inexact Rounded
|
||||
dddiv1052 divide 1e+277 -1e-311 -> -Infinity Overflow Inexact Rounded
|
||||
dddiv1053 divide -1e+277 1e-311 -> -Infinity Overflow Inexact Rounded
|
||||
dddiv1054 divide -1e+277 -1e-311 -> Infinity Overflow Inexact Rounded
|
||||
dddiv1055 divide 1e-277 1e+311 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
|
||||
dddiv1056 divide 1e-277 -1e+311 -> -0E-398 Underflow Subnormal Inexact Rounded Clamped
|
||||
dddiv1057 divide -1e-277 1e+311 -> -0E-398 Underflow Subnormal Inexact Rounded Clamped
|
||||
dddiv1058 divide -1e-277 -1e+311 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
|
||||
|
||||
-- 'subnormal' boundary (all hard underflow or overflow in base arithemtic)
|
||||
dddiv1060 divide 1e-291 1e+101 -> 1E-392 Subnormal
|
||||
dddiv1061 divide 1e-291 1e+102 -> 1E-393 Subnormal
|
||||
dddiv1062 divide 1e-291 1e+103 -> 1E-394 Subnormal
|
||||
dddiv1063 divide 1e-291 1e+104 -> 1E-395 Subnormal
|
||||
dddiv1064 divide 1e-291 1e+105 -> 1E-396 Subnormal
|
||||
dddiv1065 divide 1e-291 1e+106 -> 1E-397 Subnormal
|
||||
dddiv1066 divide 1e-291 1e+107 -> 1E-398 Subnormal
|
||||
dddiv1067 divide 1e-291 1e+108 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
|
||||
dddiv1068 divide 1e-291 1e+109 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
|
||||
dddiv1069 divide 1e-291 1e+110 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
|
||||
-- [no equivalent of 'subnormal' for overflow]
|
||||
dddiv1070 divide 1e+60 1e-321 -> 1.000000000000E+381 Clamped
|
||||
dddiv1071 divide 1e+60 1e-322 -> 1.0000000000000E+382 Clamped
|
||||
dddiv1072 divide 1e+60 1e-323 -> 1.00000000000000E+383 Clamped
|
||||
dddiv1073 divide 1e+60 1e-324 -> 1.000000000000000E+384 Clamped
|
||||
dddiv1074 divide 1e+60 1e-325 -> Infinity Overflow Inexact Rounded
|
||||
dddiv1075 divide 1e+60 1e-326 -> Infinity Overflow Inexact Rounded
|
||||
dddiv1076 divide 1e+60 1e-327 -> Infinity Overflow Inexact Rounded
|
||||
dddiv1077 divide 1e+60 1e-328 -> Infinity Overflow Inexact Rounded
|
||||
dddiv1078 divide 1e+60 1e-329 -> Infinity Overflow Inexact Rounded
|
||||
dddiv1079 divide 1e+60 1e-330 -> Infinity Overflow Inexact Rounded
|
||||
|
||||
dddiv1101 divide 1.0000E-394 1 -> 1.0000E-394 Subnormal
|
||||
dddiv1102 divide 1.000E-394 1e+1 -> 1.000E-395 Subnormal
|
||||
dddiv1103 divide 1.00E-394 1e+2 -> 1.00E-396 Subnormal
|
||||
dddiv1104 divide 1.0E-394 1e+3 -> 1.0E-397 Subnormal
|
||||
dddiv1105 divide 1.0E-394 1e+4 -> 1E-398 Subnormal Rounded
|
||||
dddiv1106 divide 1.3E-394 1e+4 -> 1E-398 Underflow Subnormal Inexact Rounded
|
||||
dddiv1107 divide 1.5E-394 1e+4 -> 2E-398 Underflow Subnormal Inexact Rounded
|
||||
dddiv1108 divide 1.7E-394 1e+4 -> 2E-398 Underflow Subnormal Inexact Rounded
|
||||
dddiv1109 divide 2.3E-394 1e+4 -> 2E-398 Underflow Subnormal Inexact Rounded
|
||||
dddiv1110 divide 2.5E-394 1e+4 -> 2E-398 Underflow Subnormal Inexact Rounded
|
||||
dddiv1111 divide 2.7E-394 1e+4 -> 3E-398 Underflow Subnormal Inexact Rounded
|
||||
dddiv1112 divide 1.49E-394 1e+4 -> 1E-398 Underflow Subnormal Inexact Rounded
|
||||
dddiv1113 divide 1.50E-394 1e+4 -> 2E-398 Underflow Subnormal Inexact Rounded
|
||||
dddiv1114 divide 1.51E-394 1e+4 -> 2E-398 Underflow Subnormal Inexact Rounded
|
||||
dddiv1115 divide 2.49E-394 1e+4 -> 2E-398 Underflow Subnormal Inexact Rounded
|
||||
dddiv1116 divide 2.50E-394 1e+4 -> 2E-398 Underflow Subnormal Inexact Rounded
|
||||
dddiv1117 divide 2.51E-394 1e+4 -> 3E-398 Underflow Subnormal Inexact Rounded
|
||||
|
||||
dddiv1118 divide 1E-394 1e+4 -> 1E-398 Subnormal
|
||||
dddiv1119 divide 3E-394 1e+5 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
|
||||
dddiv1120 divide 5E-394 1e+5 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
|
||||
dddiv1121 divide 7E-394 1e+5 -> 1E-398 Underflow Subnormal Inexact Rounded
|
||||
dddiv1122 divide 9E-394 1e+5 -> 1E-398 Underflow Subnormal Inexact Rounded
|
||||
dddiv1123 divide 9.9E-394 1e+5 -> 1E-398 Underflow Subnormal Inexact Rounded
|
||||
|
||||
dddiv1124 divide 1E-394 -1e+4 -> -1E-398 Subnormal
|
||||
dddiv1125 divide 3E-394 -1e+5 -> -0E-398 Underflow Subnormal Inexact Rounded Clamped
|
||||
dddiv1126 divide -5E-394 1e+5 -> -0E-398 Underflow Subnormal Inexact Rounded Clamped
|
||||
dddiv1127 divide 7E-394 -1e+5 -> -1E-398 Underflow Subnormal Inexact Rounded
|
||||
dddiv1128 divide -9E-394 1e+5 -> -1E-398 Underflow Subnormal Inexact Rounded
|
||||
dddiv1129 divide 9.9E-394 -1e+5 -> -1E-398 Underflow Subnormal Inexact Rounded
|
||||
dddiv1130 divide 3.0E-394 -1e+5 -> -0E-398 Underflow Subnormal Inexact Rounded Clamped
|
||||
|
||||
dddiv1131 divide 1.0E-199 1e+200 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
|
||||
dddiv1132 divide 1.0E-199 1e+199 -> 1E-398 Subnormal Rounded
|
||||
dddiv1133 divide 1.0E-199 1e+198 -> 1.0E-397 Subnormal
|
||||
dddiv1134 divide 2.0E-199 2e+198 -> 1.0E-397 Subnormal
|
||||
dddiv1135 divide 4.0E-199 4e+198 -> 1.0E-397 Subnormal
|
||||
dddiv1136 divide 10.0E-199 10e+198 -> 1.0E-397 Subnormal
|
||||
dddiv1137 divide 30.0E-199 30e+198 -> 1.0E-397 Subnormal
|
||||
|
||||
-- randoms
|
||||
dddiv2010 divide -3.303226714900711E-35 8.796578842713183E+73 -> -3.755126594058783E-109 Inexact Rounded
|
||||
dddiv2011 divide 933153327821073.6 68782181090246.25 -> 13.56678885475763 Inexact Rounded
|
||||
dddiv2012 divide 5.04752436057906E-72 -8.179481771238642E+64 -> -6.170958627632835E-137 Inexact Rounded
|
||||
dddiv2013 divide -3707613309582318 3394911196503.048 -> -1092.109070010836 Inexact Rounded
|
||||
dddiv2014 divide 99689.0555190461 -4.735208553891464 -> -21052.72753765411 Inexact Rounded
|
||||
dddiv2015 divide -1447915775613329 269750797.8184875 -> -5367605.164925653 Inexact Rounded
|
||||
dddiv2016 divide -9.394881304225258E-19 -830585.0252671636 -> 1.131116143251358E-24 Inexact Rounded
|
||||
dddiv2017 divide -1.056283432738934 88.58754555124013 -> -0.01192361100159352 Inexact Rounded
|
||||
dddiv2018 divide 5763220933343.081 689089567025052.1 -> 0.008363529516524456 Inexact Rounded
|
||||
dddiv2019 divide 873819.122103216 9.740612494523300E-49 -> 8.970884763093948E+53 Inexact Rounded
|
||||
dddiv2020 divide 8022914.838533576 6178.566801742713 -> 1298.507420243583 Inexact Rounded
|
||||
dddiv2021 divide 203982.7605650363 -2158.283639053435 -> -94.51156320422168 Inexact Rounded
|
||||
dddiv2022 divide 803.6310547013030 7101143795399.238 -> 1.131692411611166E-10 Inexact Rounded
|
||||
dddiv2023 divide 9.251697842123399E-82 -1.342350220606119E-7 -> -6.892163982321936E-75 Inexact Rounded
|
||||
dddiv2024 divide -1.980600645637992E-53 -5.474262753214457E+77 -> 3.618022617703168E-131 Inexact Rounded
|
||||
dddiv2025 divide -210.0322996351690 -8.580951835872843E+80 -> 2.447657365434971E-79 Inexact Rounded
|
||||
dddiv2026 divide -1.821980314020370E+85 -3.018915267138165 -> 6.035215144503042E+84 Inexact Rounded
|
||||
dddiv2027 divide -772264503601.1047 5.158258271408988E-86 -> -1.497141986630614E+97 Inexact Rounded
|
||||
dddiv2028 divide -767.0532415847106 2.700027228028939E-59 -> -2.840909282772941E+61 Inexact Rounded
|
||||
dddiv2029 divide 496724.8548250093 7.32700588163100E+66 -> 6.779370220929013E-62 Inexact Rounded
|
||||
dddiv2030 divide -304232651447703.9 -108.9730808657440 -> 2791814721862.565 Inexact Rounded
|
||||
dddiv2031 divide -7.233817192699405E+42 -5711302004.149411 -> 1.266579352211430E+33 Inexact Rounded
|
||||
dddiv2032 divide -9.999221444912745E+96 4010569406446197 -> -2.493217404202250E+81 Inexact Rounded
|
||||
dddiv2033 divide -1837272.061937622 8.356322838066762 -> -219866.0939196882 Inexact Rounded
|
||||
dddiv2034 divide 2168.517555606529 209.1910258615061 -> 10.36620737756784 Inexact Rounded
|
||||
dddiv2035 divide -1.884389790576371E+88 2.95181953870583E+20 -> -6.383824505079828E+67 Inexact Rounded
|
||||
dddiv2036 divide 732263.6037438196 961222.3634446889 -> 0.7618045850698269 Inexact Rounded
|
||||
dddiv2037 divide -813461419.0348336 5.376293753809143E+84 -> -1.513052404285927E-76 Inexact Rounded
|
||||
dddiv2038 divide -45562133508108.50 -9.776843494690107E+51 -> 4.660208945029519E-39 Inexact Rounded
|
||||
dddiv2039 divide -6.489393172441016E+80 -9101965.097852113 -> 7.129661674897421E+73 Inexact Rounded
|
||||
dddiv2040 divide 3.694576237117349E+93 6683512.012622003 -> 5.527896456443912E+86 Inexact Rounded
|
||||
dddiv2041 divide -2.252877726403272E+19 -7451913256.181367 -> 3023220546.125531 Inexact Rounded
|
||||
dddiv2042 divide 518303.1989111842 50.01587020474133 -> 10362.77479107123 Inexact Rounded
|
||||
dddiv2043 divide 2.902087881880103E+24 33.32400992305702 -> 8.708699488989578E+22 Inexact Rounded
|
||||
dddiv2044 divide 549619.4559510557 1660824845196338 -> 3.309316196351104E-10 Inexact Rounded
|
||||
dddiv2045 divide -6775670774684043 8292152023.077262 -> -817118.4941891062 Inexact Rounded
|
||||
dddiv2046 divide -77.50923921524079 -5.636882655425815E+74 -> 1.375037302588405E-73 Inexact Rounded
|
||||
dddiv2047 divide -2.984889459605149E-10 -88106156784122.99 -> 3.387833005721384E-24 Inexact Rounded
|
||||
dddiv2048 divide 0.949517293997085 44767115.96450998 -> 2.121015110175589E-8 Inexact Rounded
|
||||
dddiv2049 divide -2760937211.084521 -1087015876975408 -> 0.000002539923537057024 Inexact Rounded
|
||||
dddiv2050 divide 28438351.85030536 -4.209397904088624E-47 -> -6.755919135770688E+53 Inexact Rounded
|
||||
dddiv2051 divide -85562731.6820956 -7.166045442530185E+45 -> 1.194002080621542E-38 Inexact Rounded
|
||||
dddiv2052 divide 2533802852165.25 7154.119606235955 -> 354173957.3317501 Inexact Rounded
|
||||
dddiv2053 divide -8858831346851.474 97.59734208801716 -> -90769186509.83577 Inexact Rounded
|
||||
dddiv2054 divide 176783629801387.5 840073263.3109817 -> 210438.3480848206 Inexact Rounded
|
||||
dddiv2055 divide -493506471796175.6 79733894790822.03 -> -6.189418854940746 Inexact Rounded
|
||||
dddiv2056 divide 790.1682542103445 829.9449370367435 -> 0.9520731062371214 Inexact Rounded
|
||||
dddiv2057 divide -8920459838.583164 -4767.889187899214 -> 1870945.294035581 Inexact Rounded
|
||||
dddiv2058 divide 53536687164422.1 53137.5007032689 -> 1007512330.385698 Inexact Rounded
|
||||
dddiv2059 divide 4.051532311146561E-74 -2.343089768972261E+94 -> -1.729140882606332E-168 Inexact Rounded
|
||||
dddiv2060 divide -14847758778636.88 3.062543516383807E-43 -> -4.848178874587497E+55 Inexact Rounded
|
||||
|
||||
-- Division probably has pre-rounding, so need to test rounding
|
||||
-- explicitly rather than assume included through other tests;
|
||||
-- tests include simple rounding and also the tricky cases of sticky
|
||||
-- bits following two zeros
|
||||
--
|
||||
-- 1/99999 gives 0.0000100001000010000100001000010000100001
|
||||
-- 1234567890123456
|
||||
--
|
||||
-- 1/999999 gives 0.000001000001000001000001000001000001000001
|
||||
-- 1234567890123456
|
||||
|
||||
rounding: ceiling
|
||||
dddiv3001 divide 1 3 -> 0.3333333333333334 Inexact Rounded
|
||||
dddiv3002 divide 2 3 -> 0.6666666666666667 Inexact Rounded
|
||||
dddiv3003 divide 1 99999 -> 0.00001000010000100002 Inexact Rounded
|
||||
dddiv3004 divide 1 999999 -> 0.000001000001000001001 Inexact Rounded
|
||||
|
||||
rounding: floor
|
||||
dddiv3011 divide 1 3 -> 0.3333333333333333 Inexact Rounded
|
||||
dddiv3012 divide 2 3 -> 0.6666666666666666 Inexact Rounded
|
||||
dddiv3013 divide 1 99999 -> 0.00001000010000100001 Inexact Rounded
|
||||
dddiv3014 divide 1 999999 -> 0.000001000001000001000 Inexact Rounded
|
||||
|
||||
rounding: up
|
||||
dddiv3021 divide 1 3 -> 0.3333333333333334 Inexact Rounded
|
||||
dddiv3022 divide 2 3 -> 0.6666666666666667 Inexact Rounded
|
||||
dddiv3023 divide 1 99999 -> 0.00001000010000100002 Inexact Rounded
|
||||
dddiv3024 divide 1 999999 -> 0.000001000001000001001 Inexact Rounded
|
||||
|
||||
rounding: down
|
||||
dddiv3031 divide 1 3 -> 0.3333333333333333 Inexact Rounded
|
||||
dddiv3032 divide 2 3 -> 0.6666666666666666 Inexact Rounded
|
||||
dddiv3033 divide 1 99999 -> 0.00001000010000100001 Inexact Rounded
|
||||
dddiv3034 divide 1 999999 -> 0.000001000001000001000 Inexact Rounded
|
||||
|
||||
rounding: half_up
|
||||
dddiv3041 divide 1 3 -> 0.3333333333333333 Inexact Rounded
|
||||
dddiv3042 divide 2 3 -> 0.6666666666666667 Inexact Rounded
|
||||
dddiv3043 divide 1 99999 -> 0.00001000010000100001 Inexact Rounded
|
||||
dddiv3044 divide 1 999999 -> 0.000001000001000001000 Inexact Rounded
|
||||
|
||||
rounding: half_down
|
||||
dddiv3051 divide 1 3 -> 0.3333333333333333 Inexact Rounded
|
||||
dddiv3052 divide 2 3 -> 0.6666666666666667 Inexact Rounded
|
||||
dddiv3053 divide 1 99999 -> 0.00001000010000100001 Inexact Rounded
|
||||
dddiv3054 divide 1 999999 -> 0.000001000001000001000 Inexact Rounded
|
||||
|
||||
rounding: half_even
|
||||
dddiv3061 divide 1 3 -> 0.3333333333333333 Inexact Rounded
|
||||
dddiv3062 divide 2 3 -> 0.6666666666666667 Inexact Rounded
|
||||
dddiv3063 divide 1 99999 -> 0.00001000010000100001 Inexact Rounded
|
||||
dddiv3064 divide 1 999999 -> 0.000001000001000001000 Inexact Rounded
|
||||
|
||||
rounding: 05up
|
||||
dddiv3071 divide 1 3 -> 0.3333333333333333 Inexact Rounded
|
||||
dddiv3072 divide 2 3 -> 0.6666666666666666 Inexact Rounded
|
||||
dddiv3073 divide 1 99999 -> 0.00001000010000100001 Inexact Rounded
|
||||
dddiv3074 divide 1 999999 -> 0.000001000001000001001 Inexact Rounded
|
||||
|
||||
-- random divide tests with result near 1
|
||||
rounding: half_even
|
||||
dddiv4001 divide 3195385192916917 3195385192946695 -> 0.9999999999906809 Inexact Rounded
|
||||
dddiv4002 divide 1393723067526993 1393723067519475 -> 1.000000000005394 Inexact Rounded
|
||||
dddiv4003 divide 759985543702302 759985543674015 -> 1.000000000037220 Inexact Rounded
|
||||
dddiv4004 divide 9579158456027302 9579158456036864 -> 0.9999999999990018 Inexact Rounded
|
||||
dddiv4005 divide 7079398299143569 7079398299156904 -> 0.9999999999981164 Inexact Rounded
|
||||
dddiv4006 divide 6636169255366598 6636169255336386 -> 1.000000000004553 Inexact Rounded
|
||||
dddiv4007 divide 6964813971340090 6964813971321554 -> 1.000000000002661 Inexact Rounded
|
||||
dddiv4008 divide 4182275225480784 4182275225454009 -> 1.000000000006402 Inexact Rounded
|
||||
dddiv4009 divide 9228325124938029 9228325124918730 -> 1.000000000002091 Inexact Rounded
|
||||
dddiv4010 divide 3428346338630192 3428346338609843 -> 1.000000000005936 Inexact Rounded
|
||||
dddiv4011 divide 2143511550722893 2143511550751754 -> 0.9999999999865356 Inexact Rounded
|
||||
dddiv4012 divide 1672732924396785 1672732924401811 -> 0.9999999999969953 Inexact Rounded
|
||||
dddiv4013 divide 4190714611948216 4190714611948664 -> 0.9999999999998931 Inexact Rounded
|
||||
dddiv4014 divide 3942254800848877 3942254800814556 -> 1.000000000008706 Inexact Rounded
|
||||
dddiv4015 divide 2854459826952334 2854459826960762 -> 0.9999999999970474 Inexact Rounded
|
||||
dddiv4016 divide 2853258953664731 2853258953684471 -> 0.9999999999930816 Inexact Rounded
|
||||
dddiv4017 divide 9453512638125978 9453512638146425 -> 0.9999999999978371 Inexact Rounded
|
||||
dddiv4018 divide 339476633940369 339476633912887 -> 1.000000000080954 Inexact Rounded
|
||||
dddiv4019 divide 4542181492688467 4542181492697735 -> 0.9999999999979596 Inexact Rounded
|
||||
dddiv4020 divide 7312600192399197 7312600192395424 -> 1.000000000000516 Inexact Rounded
|
||||
dddiv4021 divide 1811674985570111 1811674985603935 -> 0.9999999999813300 Inexact Rounded
|
||||
dddiv4022 divide 1706462639003481 1706462639017740 -> 0.9999999999916441 Inexact Rounded
|
||||
dddiv4023 divide 6697052654940368 6697052654934110 -> 1.000000000000934 Inexact Rounded
|
||||
dddiv4024 divide 5015283664277539 5015283664310719 -> 0.9999999999933842 Inexact Rounded
|
||||
dddiv4025 divide 2359501561537464 2359501561502464 -> 1.000000000014834 Inexact Rounded
|
||||
dddiv4026 divide 2669850227909157 2669850227901548 -> 1.000000000002850 Inexact Rounded
|
||||
dddiv4027 divide 9329725546974648 9329725547002445 -> 0.9999999999970206 Inexact Rounded
|
||||
dddiv4028 divide 3228562867071248 3228562867106206 -> 0.9999999999891723 Inexact Rounded
|
||||
dddiv4029 divide 4862226644921175 4862226644909380 -> 1.000000000002426 Inexact Rounded
|
||||
dddiv4030 divide 1022267997054529 1022267997071329 -> 0.9999999999835660 Inexact Rounded
|
||||
dddiv4031 divide 1048777482023719 1048777482000948 -> 1.000000000021712 Inexact Rounded
|
||||
dddiv4032 divide 9980113777337098 9980113777330539 -> 1.000000000000657 Inexact Rounded
|
||||
dddiv4033 divide 7506839167963908 7506839167942901 -> 1.000000000002798 Inexact Rounded
|
||||
dddiv4034 divide 231119751977860 231119751962453 -> 1.000000000066662 Inexact Rounded
|
||||
dddiv4035 divide 4034903664762962 4034903664795526 -> 0.9999999999919294 Inexact Rounded
|
||||
dddiv4036 divide 5700122152274696 5700122152251386 -> 1.000000000004089 Inexact Rounded
|
||||
dddiv4037 divide 6869599590293110 6869599590293495 -> 0.9999999999999440 Inexact Rounded
|
||||
dddiv4038 divide 5576281960092797 5576281960105579 -> 0.9999999999977078 Inexact Rounded
|
||||
dddiv4039 divide 2304844888381318 2304844888353073 -> 1.000000000012255 Inexact Rounded
|
||||
dddiv4040 divide 3265933651656452 3265933651682779 -> 0.9999999999919389 Inexact Rounded
|
||||
dddiv4041 divide 5235714985079914 5235714985066131 -> 1.000000000002632 Inexact Rounded
|
||||
dddiv4042 divide 5578481572827551 5578481572822945 -> 1.000000000000826 Inexact Rounded
|
||||
dddiv4043 divide 4909616081396134 4909616081373076 -> 1.000000000004696 Inexact Rounded
|
||||
dddiv4044 divide 636447224349537 636447224338757 -> 1.000000000016938 Inexact Rounded
|
||||
dddiv4045 divide 1539373428396640 1539373428364727 -> 1.000000000020731 Inexact Rounded
|
||||
dddiv4046 divide 2028786707377893 2028786707378866 -> 0.9999999999995204 Inexact Rounded
|
||||
dddiv4047 divide 137643260486222 137643260487419 -> 0.9999999999913036 Inexact Rounded
|
||||
dddiv4048 divide 247451519746765 247451519752267 -> 0.9999999999777653 Inexact Rounded
|
||||
dddiv4049 divide 7877858475022054 7877858474999794 -> 1.000000000002826 Inexact Rounded
|
||||
dddiv4050 divide 7333242694766258 7333242694744628 -> 1.000000000002950 Inexact Rounded
|
||||
dddiv4051 divide 124051503698592 124051503699397 -> 0.9999999999935108 Inexact Rounded
|
||||
dddiv4052 divide 8944737432385188 8944737432406860 -> 0.9999999999975771 Inexact Rounded
|
||||
dddiv4053 divide 9883948923406874 9883948923424843 -> 0.9999999999981820 Inexact Rounded
|
||||
dddiv4054 divide 6829178741654284 6829178741671973 -> 0.9999999999974098 Inexact Rounded
|
||||
dddiv4055 divide 7342752479768122 7342752479793385 -> 0.9999999999965595 Inexact Rounded
|
||||
dddiv4056 divide 8066426579008783 8066426578977563 -> 1.000000000003870 Inexact Rounded
|
||||
dddiv4057 divide 8992775071383295 8992775071352712 -> 1.000000000003401 Inexact Rounded
|
||||
dddiv4058 divide 5485011755545641 5485011755543611 -> 1.000000000000370 Inexact Rounded
|
||||
dddiv4059 divide 5779983054353918 5779983054365300 -> 0.9999999999980308 Inexact Rounded
|
||||
dddiv4060 divide 9502265102713774 9502265102735208 -> 0.9999999999977443 Inexact Rounded
|
||||
dddiv4061 divide 2109558399130981 2109558399116281 -> 1.000000000006968 Inexact Rounded
|
||||
dddiv4062 divide 5296182636350471 5296182636351521 -> 0.9999999999998017 Inexact Rounded
|
||||
dddiv4063 divide 1440019225591883 1440019225601844 -> 0.9999999999930827 Inexact Rounded
|
||||
dddiv4064 divide 8182110791881341 8182110791847174 -> 1.000000000004176 Inexact Rounded
|
||||
dddiv4065 divide 489098235512060 489098235534516 -> 0.9999999999540869 Inexact Rounded
|
||||
dddiv4066 divide 6475687084782038 6475687084756089 -> 1.000000000004007 Inexact Rounded
|
||||
dddiv4067 divide 8094348555736948 8094348555759236 -> 0.9999999999972465 Inexact Rounded
|
||||
dddiv4068 divide 1982766816291543 1982766816309463 -> 0.9999999999909621 Inexact Rounded
|
||||
dddiv4069 divide 9277314300113251 9277314300084467 -> 1.000000000003103 Inexact Rounded
|
||||
dddiv4070 divide 4335532959318934 4335532959293167 -> 1.000000000005943 Inexact Rounded
|
||||
dddiv4071 divide 7767113032981348 7767113032968132 -> 1.000000000001702 Inexact Rounded
|
||||
dddiv4072 divide 1578548053342868 1578548053370448 -> 0.9999999999825282 Inexact Rounded
|
||||
dddiv4073 divide 3790420686666898 3790420686636315 -> 1.000000000008068 Inexact Rounded
|
||||
dddiv4074 divide 871682421955147 871682421976441 -> 0.9999999999755714 Inexact Rounded
|
||||
dddiv4075 divide 744141054479940 744141054512329 -> 0.9999999999564746 Inexact Rounded
|
||||
dddiv4076 divide 8956824183670735 8956824183641741 -> 1.000000000003237 Inexact Rounded
|
||||
dddiv4077 divide 8337291694485682 8337291694451193 -> 1.000000000004137 Inexact Rounded
|
||||
dddiv4078 divide 4107775944683669 4107775944657097 -> 1.000000000006469 Inexact Rounded
|
||||
dddiv4079 divide 8691900057964648 8691900057997555 -> 0.9999999999962141 Inexact Rounded
|
||||
dddiv4080 divide 2229528520536462 2229528520502337 -> 1.000000000015306 Inexact Rounded
|
||||
dddiv4081 divide 398442083774322 398442083746273 -> 1.000000000070397 Inexact Rounded
|
||||
dddiv4082 divide 5319819776808759 5319819776838313 -> 0.9999999999944445 Inexact Rounded
|
||||
dddiv4083 divide 7710491299066855 7710491299041858 -> 1.000000000003242 Inexact Rounded
|
||||
dddiv4084 divide 9083231296087266 9083231296058160 -> 1.000000000003204 Inexact Rounded
|
||||
dddiv4085 divide 3566873574904559 3566873574890328 -> 1.000000000003990 Inexact Rounded
|
||||
dddiv4086 divide 596343290550525 596343290555614 -> 0.9999999999914663 Inexact Rounded
|
||||
dddiv4087 divide 278227925093192 278227925068104 -> 1.000000000090171 Inexact Rounded
|
||||
dddiv4088 divide 3292902958490649 3292902958519881 -> 0.9999999999911227 Inexact Rounded
|
||||
dddiv4089 divide 5521871364245881 5521871364229536 -> 1.000000000002960 Inexact Rounded
|
||||
dddiv4090 divide 2406505602883617 2406505602857997 -> 1.000000000010646 Inexact Rounded
|
||||
dddiv4091 divide 7741146984869208 7741146984867255 -> 1.000000000000252 Inexact Rounded
|
||||
dddiv4092 divide 4576041832414909 4576041832405102 -> 1.000000000002143 Inexact Rounded
|
||||
dddiv4093 divide 9183756982878057 9183756982901934 -> 0.9999999999974001 Inexact Rounded
|
||||
dddiv4094 divide 6215736513855159 6215736513870342 -> 0.9999999999975573 Inexact Rounded
|
||||
dddiv4095 divide 248554968534533 248554968551417 -> 0.9999999999320714 Inexact Rounded
|
||||
dddiv4096 divide 376314165668645 376314165659755 -> 1.000000000023624 Inexact Rounded
|
||||
dddiv4097 divide 5513569249809718 5513569249808906 -> 1.000000000000147 Inexact Rounded
|
||||
dddiv4098 divide 3367992242167904 3367992242156228 -> 1.000000000003467 Inexact Rounded
|
||||
dddiv4099 divide 6134869538966967 6134869538985986 -> 0.9999999999968999 Inexact Rounded
|
||||
|
||||
-- Null tests
|
||||
dddiv9998 divide 10 # -> NaN Invalid_operation
|
||||
dddiv9999 divide # 10 -> NaN Invalid_operation
|
||||
|
@@ -0,0 +1,449 @@
|
||||
------------------------------------------------------------------------
|
||||
-- ddDivideInt.decTest -- decDouble integer division --
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
precision: 16
|
||||
maxExponent: 384
|
||||
minExponent: -383
|
||||
extended: 1
|
||||
clamp: 1
|
||||
rounding: half_even
|
||||
|
||||
dddvi001 divideint 1 1 -> 1
|
||||
dddvi002 divideint 2 1 -> 2
|
||||
dddvi003 divideint 1 2 -> 0
|
||||
dddvi004 divideint 2 2 -> 1
|
||||
dddvi005 divideint 0 1 -> 0
|
||||
dddvi006 divideint 0 2 -> 0
|
||||
dddvi007 divideint 1 3 -> 0
|
||||
dddvi008 divideint 2 3 -> 0
|
||||
dddvi009 divideint 3 3 -> 1
|
||||
|
||||
dddvi010 divideint 2.4 1 -> 2
|
||||
dddvi011 divideint 2.4 -1 -> -2
|
||||
dddvi012 divideint -2.4 1 -> -2
|
||||
dddvi013 divideint -2.4 -1 -> 2
|
||||
dddvi014 divideint 2.40 1 -> 2
|
||||
dddvi015 divideint 2.400 1 -> 2
|
||||
dddvi016 divideint 2.4 2 -> 1
|
||||
dddvi017 divideint 2.400 2 -> 1
|
||||
dddvi018 divideint 2. 2 -> 1
|
||||
dddvi019 divideint 20 20 -> 1
|
||||
|
||||
dddvi020 divideint 187 187 -> 1
|
||||
dddvi021 divideint 5 2 -> 2
|
||||
dddvi022 divideint 5 2.0 -> 2
|
||||
dddvi023 divideint 5 2.000 -> 2
|
||||
dddvi024 divideint 5 0.200 -> 25
|
||||
dddvi025 divideint 5 0.200 -> 25
|
||||
|
||||
dddvi030 divideint 1 2 -> 0
|
||||
dddvi031 divideint 1 4 -> 0
|
||||
dddvi032 divideint 1 8 -> 0
|
||||
dddvi033 divideint 1 16 -> 0
|
||||
dddvi034 divideint 1 32 -> 0
|
||||
dddvi035 divideint 1 64 -> 0
|
||||
dddvi040 divideint 1 -2 -> -0
|
||||
dddvi041 divideint 1 -4 -> -0
|
||||
dddvi042 divideint 1 -8 -> -0
|
||||
dddvi043 divideint 1 -16 -> -0
|
||||
dddvi044 divideint 1 -32 -> -0
|
||||
dddvi045 divideint 1 -64 -> -0
|
||||
dddvi050 divideint -1 2 -> -0
|
||||
dddvi051 divideint -1 4 -> -0
|
||||
dddvi052 divideint -1 8 -> -0
|
||||
dddvi053 divideint -1 16 -> -0
|
||||
dddvi054 divideint -1 32 -> -0
|
||||
dddvi055 divideint -1 64 -> -0
|
||||
dddvi060 divideint -1 -2 -> 0
|
||||
dddvi061 divideint -1 -4 -> 0
|
||||
dddvi062 divideint -1 -8 -> 0
|
||||
dddvi063 divideint -1 -16 -> 0
|
||||
dddvi064 divideint -1 -32 -> 0
|
||||
dddvi065 divideint -1 -64 -> 0
|
||||
|
||||
-- similar with powers of ten
|
||||
dddvi160 divideint 1 1 -> 1
|
||||
dddvi161 divideint 1 10 -> 0
|
||||
dddvi162 divideint 1 100 -> 0
|
||||
dddvi163 divideint 1 1000 -> 0
|
||||
dddvi164 divideint 1 10000 -> 0
|
||||
dddvi165 divideint 1 100000 -> 0
|
||||
dddvi166 divideint 1 1000000 -> 0
|
||||
dddvi167 divideint 1 10000000 -> 0
|
||||
dddvi168 divideint 1 100000000 -> 0
|
||||
dddvi170 divideint 1 -1 -> -1
|
||||
dddvi171 divideint 1 -10 -> -0
|
||||
dddvi172 divideint 1 -100 -> -0
|
||||
dddvi173 divideint 1 -1000 -> -0
|
||||
dddvi174 divideint 1 -10000 -> -0
|
||||
dddvi175 divideint 1 -100000 -> -0
|
||||
dddvi176 divideint 1 -1000000 -> -0
|
||||
dddvi177 divideint 1 -10000000 -> -0
|
||||
dddvi178 divideint 1 -100000000 -> -0
|
||||
dddvi180 divideint -1 1 -> -1
|
||||
dddvi181 divideint -1 10 -> -0
|
||||
dddvi182 divideint -1 100 -> -0
|
||||
dddvi183 divideint -1 1000 -> -0
|
||||
dddvi184 divideint -1 10000 -> -0
|
||||
dddvi185 divideint -1 100000 -> -0
|
||||
dddvi186 divideint -1 1000000 -> -0
|
||||
dddvi187 divideint -1 10000000 -> -0
|
||||
dddvi188 divideint -1 100000000 -> -0
|
||||
dddvi190 divideint -1 -1 -> 1
|
||||
dddvi191 divideint -1 -10 -> 0
|
||||
dddvi192 divideint -1 -100 -> 0
|
||||
dddvi193 divideint -1 -1000 -> 0
|
||||
dddvi194 divideint -1 -10000 -> 0
|
||||
dddvi195 divideint -1 -100000 -> 0
|
||||
dddvi196 divideint -1 -1000000 -> 0
|
||||
dddvi197 divideint -1 -10000000 -> 0
|
||||
dddvi198 divideint -1 -100000000 -> 0
|
||||
|
||||
-- some long operand (at p=9) cases
|
||||
dddvi070 divideint 999999999 1 -> 999999999
|
||||
dddvi071 divideint 999999999.4 1 -> 999999999
|
||||
dddvi072 divideint 999999999.5 1 -> 999999999
|
||||
dddvi073 divideint 999999999.9 1 -> 999999999
|
||||
dddvi074 divideint 999999999.999 1 -> 999999999
|
||||
|
||||
dddvi090 divideint 0. 1 -> 0
|
||||
dddvi091 divideint .0 1 -> 0
|
||||
dddvi092 divideint 0.00 1 -> 0
|
||||
dddvi093 divideint 0.00E+9 1 -> 0
|
||||
dddvi094 divideint 0.0000E-50 1 -> 0
|
||||
|
||||
dddvi100 divideint 1 1 -> 1
|
||||
dddvi101 divideint 1 2 -> 0
|
||||
dddvi102 divideint 1 3 -> 0
|
||||
dddvi103 divideint 1 4 -> 0
|
||||
dddvi104 divideint 1 5 -> 0
|
||||
dddvi105 divideint 1 6 -> 0
|
||||
dddvi106 divideint 1 7 -> 0
|
||||
dddvi107 divideint 1 8 -> 0
|
||||
dddvi108 divideint 1 9 -> 0
|
||||
dddvi109 divideint 1 10 -> 0
|
||||
dddvi110 divideint 1 1 -> 1
|
||||
dddvi111 divideint 2 1 -> 2
|
||||
dddvi112 divideint 3 1 -> 3
|
||||
dddvi113 divideint 4 1 -> 4
|
||||
dddvi114 divideint 5 1 -> 5
|
||||
dddvi115 divideint 6 1 -> 6
|
||||
dddvi116 divideint 7 1 -> 7
|
||||
dddvi117 divideint 8 1 -> 8
|
||||
dddvi118 divideint 9 1 -> 9
|
||||
dddvi119 divideint 10 1 -> 10
|
||||
|
||||
-- from DiagBigDecimal
|
||||
dddvi131 divideint 101.3 1 -> 101
|
||||
dddvi132 divideint 101.0 1 -> 101
|
||||
dddvi133 divideint 101.3 3 -> 33
|
||||
dddvi134 divideint 101.0 3 -> 33
|
||||
dddvi135 divideint 2.4 1 -> 2
|
||||
dddvi136 divideint 2.400 1 -> 2
|
||||
dddvi137 divideint 18 18 -> 1
|
||||
dddvi138 divideint 1120 1000 -> 1
|
||||
dddvi139 divideint 2.4 2 -> 1
|
||||
dddvi140 divideint 2.400 2 -> 1
|
||||
dddvi141 divideint 0.5 2.000 -> 0
|
||||
dddvi142 divideint 8.005 7 -> 1
|
||||
dddvi143 divideint 5 2 -> 2
|
||||
dddvi144 divideint 0 2 -> 0
|
||||
dddvi145 divideint 0.00 2 -> 0
|
||||
|
||||
-- Others
|
||||
dddvi150 divideint 12345 4.999 -> 2469
|
||||
dddvi151 divideint 12345 4.99 -> 2473
|
||||
dddvi152 divideint 12345 4.9 -> 2519
|
||||
dddvi153 divideint 12345 5 -> 2469
|
||||
dddvi154 divideint 12345 5.1 -> 2420
|
||||
dddvi155 divideint 12345 5.01 -> 2464
|
||||
dddvi156 divideint 12345 5.001 -> 2468
|
||||
dddvi157 divideint 101 7.6 -> 13
|
||||
|
||||
-- Various flavours of divideint by 0
|
||||
dddvi201 divideint 0 0 -> NaN Division_undefined
|
||||
dddvi202 divideint 0.0E5 0 -> NaN Division_undefined
|
||||
dddvi203 divideint 0.000 0 -> NaN Division_undefined
|
||||
dddvi204 divideint 0.0001 0 -> Infinity Division_by_zero
|
||||
dddvi205 divideint 0.01 0 -> Infinity Division_by_zero
|
||||
dddvi206 divideint 0.1 0 -> Infinity Division_by_zero
|
||||
dddvi207 divideint 1 0 -> Infinity Division_by_zero
|
||||
dddvi208 divideint 1 0.0 -> Infinity Division_by_zero
|
||||
dddvi209 divideint 10 0.0 -> Infinity Division_by_zero
|
||||
dddvi210 divideint 1E+100 0.0 -> Infinity Division_by_zero
|
||||
dddvi211 divideint 1E+380 0 -> Infinity Division_by_zero
|
||||
dddvi214 divideint -0.0001 0 -> -Infinity Division_by_zero
|
||||
dddvi215 divideint -0.01 0 -> -Infinity Division_by_zero
|
||||
dddvi216 divideint -0.1 0 -> -Infinity Division_by_zero
|
||||
dddvi217 divideint -1 0 -> -Infinity Division_by_zero
|
||||
dddvi218 divideint -1 0.0 -> -Infinity Division_by_zero
|
||||
dddvi219 divideint -10 0.0 -> -Infinity Division_by_zero
|
||||
dddvi220 divideint -1E+100 0.0 -> -Infinity Division_by_zero
|
||||
dddvi221 divideint -1E+380 0 -> -Infinity Division_by_zero
|
||||
|
||||
-- test some cases that are close to exponent overflow
|
||||
dddvi270 divideint 1 1e384 -> 0
|
||||
dddvi271 divideint 1 0.9e384 -> 0
|
||||
dddvi272 divideint 1 0.99e384 -> 0
|
||||
dddvi273 divideint 1 0.9999999999999999e384 -> 0
|
||||
dddvi274 divideint 9e384 1 -> NaN Division_impossible
|
||||
dddvi275 divideint 9.9e384 1 -> NaN Division_impossible
|
||||
dddvi276 divideint 9.99e384 1 -> NaN Division_impossible
|
||||
dddvi277 divideint 9.999999999999999e384 1 -> NaN Division_impossible
|
||||
|
||||
dddvi280 divideint 0.1 9e-383 -> NaN Division_impossible
|
||||
dddvi281 divideint 0.1 99e-383 -> NaN Division_impossible
|
||||
dddvi282 divideint 0.1 999e-383 -> NaN Division_impossible
|
||||
dddvi283 divideint 0.1 9e-382 -> NaN Division_impossible
|
||||
dddvi284 divideint 0.1 99e-382 -> NaN Division_impossible
|
||||
|
||||
-- GD edge cases: lhs smaller than rhs but more digits
|
||||
dddvi301 divideint 0.9 2 -> 0
|
||||
dddvi302 divideint 0.9 2.0 -> 0
|
||||
dddvi303 divideint 0.9 2.1 -> 0
|
||||
dddvi304 divideint 0.9 2.00 -> 0
|
||||
dddvi305 divideint 0.9 2.01 -> 0
|
||||
dddvi306 divideint 0.12 1 -> 0
|
||||
dddvi307 divideint 0.12 1.0 -> 0
|
||||
dddvi308 divideint 0.12 1.00 -> 0
|
||||
dddvi309 divideint 0.12 1.0 -> 0
|
||||
dddvi310 divideint 0.12 1.00 -> 0
|
||||
dddvi311 divideint 0.12 2 -> 0
|
||||
dddvi312 divideint 0.12 2.0 -> 0
|
||||
dddvi313 divideint 0.12 2.1 -> 0
|
||||
dddvi314 divideint 0.12 2.00 -> 0
|
||||
dddvi315 divideint 0.12 2.01 -> 0
|
||||
|
||||
-- edge cases of impossible
|
||||
dddvi330 divideint 1234567890123456 10 -> 123456789012345
|
||||
dddvi331 divideint 1234567890123456 1 -> 1234567890123456
|
||||
dddvi332 divideint 1234567890123456 0.1 -> NaN Division_impossible
|
||||
dddvi333 divideint 1234567890123456 0.01 -> NaN Division_impossible
|
||||
|
||||
-- overflow and underflow tests [from divide]
|
||||
dddvi1051 divideint 1e+277 1e-311 -> NaN Division_impossible
|
||||
dddvi1052 divideint 1e+277 -1e-311 -> NaN Division_impossible
|
||||
dddvi1053 divideint -1e+277 1e-311 -> NaN Division_impossible
|
||||
dddvi1054 divideint -1e+277 -1e-311 -> NaN Division_impossible
|
||||
dddvi1055 divideint 1e-277 1e+311 -> 0
|
||||
dddvi1056 divideint 1e-277 -1e+311 -> -0
|
||||
dddvi1057 divideint -1e-277 1e+311 -> -0
|
||||
dddvi1058 divideint -1e-277 -1e+311 -> 0
|
||||
|
||||
-- 'subnormal' boundary (all hard underflow or overflow in base arithemtic)
|
||||
dddvi1060 divideint 1e-291 1e+101 -> 0
|
||||
dddvi1061 divideint 1e-291 1e+102 -> 0
|
||||
dddvi1062 divideint 1e-291 1e+103 -> 0
|
||||
dddvi1063 divideint 1e-291 1e+104 -> 0
|
||||
dddvi1064 divideint 1e-291 1e+105 -> 0
|
||||
dddvi1065 divideint 1e-291 1e+106 -> 0
|
||||
dddvi1066 divideint 1e-291 1e+107 -> 0
|
||||
dddvi1067 divideint 1e-291 1e+108 -> 0
|
||||
dddvi1068 divideint 1e-291 1e+109 -> 0
|
||||
dddvi1069 divideint 1e-291 1e+110 -> 0
|
||||
|
||||
dddvi1101 divideint 1.0000E-394 1 -> 0
|
||||
dddvi1102 divideint 1.000E-394 1e+1 -> 0
|
||||
dddvi1103 divideint 1.00E-394 1e+2 -> 0
|
||||
|
||||
dddvi1118 divideint 1E-394 1e+4 -> 0
|
||||
dddvi1119 divideint 3E-394 -1e+5 -> -0
|
||||
dddvi1120 divideint 5E-394 1e+5 -> 0
|
||||
|
||||
dddvi1124 divideint 1E-394 -1e+4 -> -0
|
||||
dddvi1130 divideint 3.0E-394 -1e+5 -> -0
|
||||
|
||||
dddvi1131 divideint 1.0E-199 1e+200 -> 0
|
||||
dddvi1132 divideint 1.0E-199 1e+199 -> 0
|
||||
dddvi1133 divideint 1.0E-199 1e+198 -> 0
|
||||
dddvi1134 divideint 2.0E-199 2e+198 -> 0
|
||||
dddvi1135 divideint 4.0E-199 4e+198 -> 0
|
||||
|
||||
-- long operand checks
|
||||
dddvi401 divideint 12345678000 100 -> 123456780
|
||||
dddvi402 divideint 1 12345678000 -> 0
|
||||
dddvi403 divideint 1234567800 10 -> 123456780
|
||||
dddvi404 divideint 1 1234567800 -> 0
|
||||
dddvi405 divideint 1234567890 10 -> 123456789
|
||||
dddvi406 divideint 1 1234567890 -> 0
|
||||
dddvi407 divideint 1234567891 10 -> 123456789
|
||||
dddvi408 divideint 1 1234567891 -> 0
|
||||
dddvi409 divideint 12345678901 100 -> 123456789
|
||||
dddvi410 divideint 1 12345678901 -> 0
|
||||
dddvi411 divideint 1234567896 10 -> 123456789
|
||||
dddvi412 divideint 1 1234567896 -> 0
|
||||
dddvi413 divideint 12345678948 100 -> 123456789
|
||||
dddvi414 divideint 12345678949 100 -> 123456789
|
||||
dddvi415 divideint 12345678950 100 -> 123456789
|
||||
dddvi416 divideint 12345678951 100 -> 123456789
|
||||
dddvi417 divideint 12345678999 100 -> 123456789
|
||||
dddvi441 divideint 12345678000 1 -> 12345678000
|
||||
dddvi442 divideint 1 12345678000 -> 0
|
||||
dddvi443 divideint 1234567800 1 -> 1234567800
|
||||
dddvi444 divideint 1 1234567800 -> 0
|
||||
dddvi445 divideint 1234567890 1 -> 1234567890
|
||||
dddvi446 divideint 1 1234567890 -> 0
|
||||
dddvi447 divideint 1234567891 1 -> 1234567891
|
||||
dddvi448 divideint 1 1234567891 -> 0
|
||||
dddvi449 divideint 12345678901 1 -> 12345678901
|
||||
dddvi450 divideint 1 12345678901 -> 0
|
||||
dddvi451 divideint 1234567896 1 -> 1234567896
|
||||
dddvi452 divideint 1 1234567896 -> 0
|
||||
|
||||
-- more zeros, etc.
|
||||
dddvi531 divideint 5.00 1E-3 -> 5000
|
||||
dddvi532 divideint 00.00 0.000 -> NaN Division_undefined
|
||||
dddvi533 divideint 00.00 0E-3 -> NaN Division_undefined
|
||||
dddvi534 divideint 0 -0 -> NaN Division_undefined
|
||||
dddvi535 divideint -0 0 -> NaN Division_undefined
|
||||
dddvi536 divideint -0 -0 -> NaN Division_undefined
|
||||
|
||||
dddvi541 divideint 0 -1 -> -0
|
||||
dddvi542 divideint -0 -1 -> 0
|
||||
dddvi543 divideint 0 1 -> 0
|
||||
dddvi544 divideint -0 1 -> -0
|
||||
dddvi545 divideint -1 0 -> -Infinity Division_by_zero
|
||||
dddvi546 divideint -1 -0 -> Infinity Division_by_zero
|
||||
dddvi547 divideint 1 0 -> Infinity Division_by_zero
|
||||
dddvi548 divideint 1 -0 -> -Infinity Division_by_zero
|
||||
|
||||
dddvi551 divideint 0.0 -1 -> -0
|
||||
dddvi552 divideint -0.0 -1 -> 0
|
||||
dddvi553 divideint 0.0 1 -> 0
|
||||
dddvi554 divideint -0.0 1 -> -0
|
||||
dddvi555 divideint -1.0 0 -> -Infinity Division_by_zero
|
||||
dddvi556 divideint -1.0 -0 -> Infinity Division_by_zero
|
||||
dddvi557 divideint 1.0 0 -> Infinity Division_by_zero
|
||||
dddvi558 divideint 1.0 -0 -> -Infinity Division_by_zero
|
||||
|
||||
dddvi561 divideint 0 -1.0 -> -0
|
||||
dddvi562 divideint -0 -1.0 -> 0
|
||||
dddvi563 divideint 0 1.0 -> 0
|
||||
dddvi564 divideint -0 1.0 -> -0
|
||||
dddvi565 divideint -1 0.0 -> -Infinity Division_by_zero
|
||||
dddvi566 divideint -1 -0.0 -> Infinity Division_by_zero
|
||||
dddvi567 divideint 1 0.0 -> Infinity Division_by_zero
|
||||
dddvi568 divideint 1 -0.0 -> -Infinity Division_by_zero
|
||||
|
||||
dddvi571 divideint 0.0 -1.0 -> -0
|
||||
dddvi572 divideint -0.0 -1.0 -> 0
|
||||
dddvi573 divideint 0.0 1.0 -> 0
|
||||
dddvi574 divideint -0.0 1.0 -> -0
|
||||
dddvi575 divideint -1.0 0.0 -> -Infinity Division_by_zero
|
||||
dddvi576 divideint -1.0 -0.0 -> Infinity Division_by_zero
|
||||
dddvi577 divideint 1.0 0.0 -> Infinity Division_by_zero
|
||||
dddvi578 divideint 1.0 -0.0 -> -Infinity Division_by_zero
|
||||
|
||||
-- Specials
|
||||
dddvi580 divideint Inf -Inf -> NaN Invalid_operation
|
||||
dddvi581 divideint Inf -1000 -> -Infinity
|
||||
dddvi582 divideint Inf -1 -> -Infinity
|
||||
dddvi583 divideint Inf -0 -> -Infinity
|
||||
dddvi584 divideint Inf 0 -> Infinity
|
||||
dddvi585 divideint Inf 1 -> Infinity
|
||||
dddvi586 divideint Inf 1000 -> Infinity
|
||||
dddvi587 divideint Inf Inf -> NaN Invalid_operation
|
||||
dddvi588 divideint -1000 Inf -> -0
|
||||
dddvi589 divideint -Inf Inf -> NaN Invalid_operation
|
||||
dddvi590 divideint -1 Inf -> -0
|
||||
dddvi591 divideint -0 Inf -> -0
|
||||
dddvi592 divideint 0 Inf -> 0
|
||||
dddvi593 divideint 1 Inf -> 0
|
||||
dddvi594 divideint 1000 Inf -> 0
|
||||
dddvi595 divideint Inf Inf -> NaN Invalid_operation
|
||||
|
||||
dddvi600 divideint -Inf -Inf -> NaN Invalid_operation
|
||||
dddvi601 divideint -Inf -1000 -> Infinity
|
||||
dddvi602 divideint -Inf -1 -> Infinity
|
||||
dddvi603 divideint -Inf -0 -> Infinity
|
||||
dddvi604 divideint -Inf 0 -> -Infinity
|
||||
dddvi605 divideint -Inf 1 -> -Infinity
|
||||
dddvi606 divideint -Inf 1000 -> -Infinity
|
||||
dddvi607 divideint -Inf Inf -> NaN Invalid_operation
|
||||
dddvi608 divideint -1000 Inf -> -0
|
||||
dddvi609 divideint -Inf -Inf -> NaN Invalid_operation
|
||||
dddvi610 divideint -1 -Inf -> 0
|
||||
dddvi611 divideint -0 -Inf -> 0
|
||||
dddvi612 divideint 0 -Inf -> -0
|
||||
dddvi613 divideint 1 -Inf -> -0
|
||||
dddvi614 divideint 1000 -Inf -> -0
|
||||
dddvi615 divideint Inf -Inf -> NaN Invalid_operation
|
||||
|
||||
dddvi621 divideint NaN -Inf -> NaN
|
||||
dddvi622 divideint NaN -1000 -> NaN
|
||||
dddvi623 divideint NaN -1 -> NaN
|
||||
dddvi624 divideint NaN -0 -> NaN
|
||||
dddvi625 divideint NaN 0 -> NaN
|
||||
dddvi626 divideint NaN 1 -> NaN
|
||||
dddvi627 divideint NaN 1000 -> NaN
|
||||
dddvi628 divideint NaN Inf -> NaN
|
||||
dddvi629 divideint NaN NaN -> NaN
|
||||
dddvi630 divideint -Inf NaN -> NaN
|
||||
dddvi631 divideint -1000 NaN -> NaN
|
||||
dddvi632 divideint -1 NaN -> NaN
|
||||
dddvi633 divideint -0 NaN -> NaN
|
||||
dddvi634 divideint 0 NaN -> NaN
|
||||
dddvi635 divideint 1 NaN -> NaN
|
||||
dddvi636 divideint 1000 NaN -> NaN
|
||||
dddvi637 divideint Inf NaN -> NaN
|
||||
|
||||
dddvi641 divideint sNaN -Inf -> NaN Invalid_operation
|
||||
dddvi642 divideint sNaN -1000 -> NaN Invalid_operation
|
||||
dddvi643 divideint sNaN -1 -> NaN Invalid_operation
|
||||
dddvi644 divideint sNaN -0 -> NaN Invalid_operation
|
||||
dddvi645 divideint sNaN 0 -> NaN Invalid_operation
|
||||
dddvi646 divideint sNaN 1 -> NaN Invalid_operation
|
||||
dddvi647 divideint sNaN 1000 -> NaN Invalid_operation
|
||||
dddvi648 divideint sNaN NaN -> NaN Invalid_operation
|
||||
dddvi649 divideint sNaN sNaN -> NaN Invalid_operation
|
||||
dddvi650 divideint NaN sNaN -> NaN Invalid_operation
|
||||
dddvi651 divideint -Inf sNaN -> NaN Invalid_operation
|
||||
dddvi652 divideint -1000 sNaN -> NaN Invalid_operation
|
||||
dddvi653 divideint -1 sNaN -> NaN Invalid_operation
|
||||
dddvi654 divideint -0 sNaN -> NaN Invalid_operation
|
||||
dddvi655 divideint 0 sNaN -> NaN Invalid_operation
|
||||
dddvi656 divideint 1 sNaN -> NaN Invalid_operation
|
||||
dddvi657 divideint 1000 sNaN -> NaN Invalid_operation
|
||||
dddvi658 divideint Inf sNaN -> NaN Invalid_operation
|
||||
dddvi659 divideint NaN sNaN -> NaN Invalid_operation
|
||||
|
||||
-- propagating NaNs
|
||||
dddvi661 divideint NaN9 -Inf -> NaN9
|
||||
dddvi662 divideint NaN8 1000 -> NaN8
|
||||
dddvi663 divideint NaN7 Inf -> NaN7
|
||||
dddvi664 divideint -NaN6 NaN5 -> -NaN6
|
||||
dddvi665 divideint -Inf NaN4 -> NaN4
|
||||
dddvi666 divideint -1000 NaN3 -> NaN3
|
||||
dddvi667 divideint Inf -NaN2 -> -NaN2
|
||||
|
||||
dddvi671 divideint -sNaN99 -Inf -> -NaN99 Invalid_operation
|
||||
dddvi672 divideint sNaN98 -1 -> NaN98 Invalid_operation
|
||||
dddvi673 divideint sNaN97 NaN -> NaN97 Invalid_operation
|
||||
dddvi674 divideint sNaN96 sNaN94 -> NaN96 Invalid_operation
|
||||
dddvi675 divideint NaN95 sNaN93 -> NaN93 Invalid_operation
|
||||
dddvi676 divideint -Inf sNaN92 -> NaN92 Invalid_operation
|
||||
dddvi677 divideint 0 sNaN91 -> NaN91 Invalid_operation
|
||||
dddvi678 divideint Inf -sNaN90 -> -NaN90 Invalid_operation
|
||||
dddvi679 divideint NaN sNaN89 -> NaN89 Invalid_operation
|
||||
|
||||
-- Null tests
|
||||
dddvi900 divideint 10 # -> NaN Invalid_operation
|
||||
dddvi901 divideint # 10 -> NaN Invalid_operation
|
@@ -0,0 +1,495 @@
|
||||
------------------------------------------------------------------------
|
||||
-- ddEncode.decTest -- decimal eight-byte format testcases --
|
||||
-- Copyright (c) IBM Corporation, 2000, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
-- [Previously called decimal64.decTest]
|
||||
version: 2.59
|
||||
|
||||
-- This set of tests is for the eight-byte concrete representation.
|
||||
-- Its characteristics are:
|
||||
--
|
||||
-- 1 bit sign
|
||||
-- 5 bits combination field
|
||||
-- 8 bits exponent continuation
|
||||
-- 50 bits coefficient continuation
|
||||
--
|
||||
-- Total exponent length 10 bits
|
||||
-- Total coefficient length 54 bits (16 digits)
|
||||
--
|
||||
-- Elimit = 767 (maximum encoded exponent)
|
||||
-- Emax = 384 (largest exponent value)
|
||||
-- Emin = -383 (smallest exponent value)
|
||||
-- bias = 398 (subtracted from encoded exponent) = -Etiny
|
||||
|
||||
-- The testcases here have only exactly representable data on the
|
||||
-- 'left-hand-side'; rounding from strings is tested in 'base'
|
||||
-- testcase groups.
|
||||
|
||||
extended: 1
|
||||
clamp: 1
|
||||
precision: 16
|
||||
rounding: half_up
|
||||
maxExponent: 384
|
||||
minExponent: -383
|
||||
|
||||
-- General testcases
|
||||
-- (mostly derived from the Strawman 4 document and examples)
|
||||
dece001 apply #A2300000000003D0 -> -7.50
|
||||
dece002 apply -7.50 -> #A2300000000003D0
|
||||
-- derivative canonical plain strings
|
||||
dece003 apply #A23c0000000003D0 -> -7.50E+3
|
||||
dece004 apply -7.50E+3 -> #A23c0000000003D0
|
||||
dece005 apply #A2380000000003D0 -> -750
|
||||
dece006 apply -750 -> #A2380000000003D0
|
||||
dece007 apply #A2340000000003D0 -> -75.0
|
||||
dece008 apply -75.0 -> #A2340000000003D0
|
||||
dece009 apply #A22c0000000003D0 -> -0.750
|
||||
dece010 apply -0.750 -> #A22c0000000003D0
|
||||
dece011 apply #A2280000000003D0 -> -0.0750
|
||||
dece012 apply -0.0750 -> #A2280000000003D0
|
||||
dece013 apply #A2200000000003D0 -> -0.000750
|
||||
dece014 apply -0.000750 -> #A2200000000003D0
|
||||
dece015 apply #A2180000000003D0 -> -0.00000750
|
||||
dece016 apply -0.00000750 -> #A2180000000003D0
|
||||
dece017 apply #A2140000000003D0 -> -7.50E-7
|
||||
dece018 apply -7.50E-7 -> #A2140000000003D0
|
||||
|
||||
-- Normality
|
||||
dece020 apply 1234567890123456 -> #263934b9c1e28e56
|
||||
dece021 apply -1234567890123456 -> #a63934b9c1e28e56
|
||||
dece022 apply 1234.567890123456 -> #260934b9c1e28e56
|
||||
dece023 apply #260934b9c1e28e56 -> 1234.567890123456
|
||||
dece024 apply 1111111111111111 -> #2638912449124491
|
||||
dece025 apply 9999999999999999 -> #6e38ff3fcff3fcff
|
||||
|
||||
-- Nmax and similar
|
||||
dece031 apply 9999999999999999E+369 -> #77fcff3fcff3fcff
|
||||
dece032 apply 9.999999999999999E+384 -> #77fcff3fcff3fcff
|
||||
dece033 apply #77fcff3fcff3fcff -> 9.999999999999999E+384
|
||||
dece034 apply 1.234567890123456E+384 -> #47fd34b9c1e28e56
|
||||
dece035 apply #47fd34b9c1e28e56 -> 1.234567890123456E+384
|
||||
-- fold-downs (more below)
|
||||
dece036 apply 1.23E+384 -> #47fd300000000000 Clamped
|
||||
dece037 apply #47fd300000000000 -> 1.230000000000000E+384
|
||||
decd038 apply 1E+384 -> #47fc000000000000 Clamped
|
||||
decd039 apply #47fc000000000000 -> 1.000000000000000E+384
|
||||
|
||||
decd051 apply 12345 -> #22380000000049c5
|
||||
decd052 apply #22380000000049c5 -> 12345
|
||||
decd053 apply 1234 -> #2238000000000534
|
||||
decd054 apply #2238000000000534 -> 1234
|
||||
decd055 apply 123 -> #22380000000000a3
|
||||
decd056 apply #22380000000000a3 -> 123
|
||||
decd057 apply 12 -> #2238000000000012
|
||||
decd058 apply #2238000000000012 -> 12
|
||||
decd059 apply 1 -> #2238000000000001
|
||||
decd060 apply #2238000000000001 -> 1
|
||||
decd061 apply 1.23 -> #22300000000000a3
|
||||
decd062 apply #22300000000000a3 -> 1.23
|
||||
decd063 apply 123.45 -> #22300000000049c5
|
||||
decd064 apply #22300000000049c5 -> 123.45
|
||||
|
||||
-- Nmin and below
|
||||
decd071 apply 1E-383 -> #003c000000000001
|
||||
decd072 apply #003c000000000001 -> 1E-383
|
||||
decd073 apply 1.000000000000000E-383 -> #0400000000000000
|
||||
decd074 apply #0400000000000000 -> 1.000000000000000E-383
|
||||
decd075 apply 1.000000000000001E-383 -> #0400000000000001
|
||||
decd076 apply #0400000000000001 -> 1.000000000000001E-383
|
||||
|
||||
decd077 apply 0.100000000000000E-383 -> #0000800000000000 Subnormal
|
||||
decd078 apply #0000800000000000 -> 1.00000000000000E-384 Subnormal
|
||||
decd079 apply 0.000000000000010E-383 -> #0000000000000010 Subnormal
|
||||
decd080 apply #0000000000000010 -> 1.0E-397 Subnormal
|
||||
decd081 apply 0.00000000000001E-383 -> #0004000000000001 Subnormal
|
||||
decd082 apply #0004000000000001 -> 1E-397 Subnormal
|
||||
decd083 apply 0.000000000000001E-383 -> #0000000000000001 Subnormal
|
||||
decd084 apply #0000000000000001 -> 1E-398 Subnormal
|
||||
-- next is smallest all-nines
|
||||
decd085 apply 9999999999999999E-398 -> #6400ff3fcff3fcff
|
||||
decd086 apply #6400ff3fcff3fcff -> 9.999999999999999E-383
|
||||
-- and a problematic divide result
|
||||
decd088 apply 1.111111111111111E-383 -> #0400912449124491
|
||||
decd089 apply #0400912449124491 -> 1.111111111111111E-383
|
||||
|
||||
-- forties
|
||||
decd090 apply 40 -> #2238000000000040
|
||||
decd091 apply 39.99 -> #2230000000000cff
|
||||
|
||||
-- underflows cannot be tested as all LHS exact
|
||||
|
||||
-- Same again, negatives
|
||||
-- Nmax and similar
|
||||
decd122 apply -9.999999999999999E+384 -> #f7fcff3fcff3fcff
|
||||
decd123 apply #f7fcff3fcff3fcff -> -9.999999999999999E+384
|
||||
decd124 apply -1.234567890123456E+384 -> #c7fd34b9c1e28e56
|
||||
decd125 apply #c7fd34b9c1e28e56 -> -1.234567890123456E+384
|
||||
-- fold-downs (more below)
|
||||
decd130 apply -1.23E+384 -> #c7fd300000000000 Clamped
|
||||
decd131 apply #c7fd300000000000 -> -1.230000000000000E+384
|
||||
decd132 apply -1E+384 -> #c7fc000000000000 Clamped
|
||||
decd133 apply #c7fc000000000000 -> -1.000000000000000E+384
|
||||
|
||||
-- overflows
|
||||
decd151 apply -12345 -> #a2380000000049c5
|
||||
decd152 apply #a2380000000049c5 -> -12345
|
||||
decd153 apply -1234 -> #a238000000000534
|
||||
decd154 apply #a238000000000534 -> -1234
|
||||
decd155 apply -123 -> #a2380000000000a3
|
||||
decd156 apply #a2380000000000a3 -> -123
|
||||
decd157 apply -12 -> #a238000000000012
|
||||
decd158 apply #a238000000000012 -> -12
|
||||
decd159 apply -1 -> #a238000000000001
|
||||
decd160 apply #a238000000000001 -> -1
|
||||
decd161 apply -1.23 -> #a2300000000000a3
|
||||
decd162 apply #a2300000000000a3 -> -1.23
|
||||
decd163 apply -123.45 -> #a2300000000049c5
|
||||
decd164 apply #a2300000000049c5 -> -123.45
|
||||
|
||||
-- Nmin and below
|
||||
decd171 apply -1E-383 -> #803c000000000001
|
||||
decd172 apply #803c000000000001 -> -1E-383
|
||||
decd173 apply -1.000000000000000E-383 -> #8400000000000000
|
||||
decd174 apply #8400000000000000 -> -1.000000000000000E-383
|
||||
decd175 apply -1.000000000000001E-383 -> #8400000000000001
|
||||
decd176 apply #8400000000000001 -> -1.000000000000001E-383
|
||||
|
||||
decd177 apply -0.100000000000000E-383 -> #8000800000000000 Subnormal
|
||||
decd178 apply #8000800000000000 -> -1.00000000000000E-384 Subnormal
|
||||
decd179 apply -0.000000000000010E-383 -> #8000000000000010 Subnormal
|
||||
decd180 apply #8000000000000010 -> -1.0E-397 Subnormal
|
||||
decd181 apply -0.00000000000001E-383 -> #8004000000000001 Subnormal
|
||||
decd182 apply #8004000000000001 -> -1E-397 Subnormal
|
||||
decd183 apply -0.000000000000001E-383 -> #8000000000000001 Subnormal
|
||||
decd184 apply #8000000000000001 -> -1E-398 Subnormal
|
||||
-- next is smallest all-nines
|
||||
decd185 apply -9999999999999999E-398 -> #e400ff3fcff3fcff
|
||||
decd186 apply #e400ff3fcff3fcff -> -9.999999999999999E-383
|
||||
-- and a tricky subnormal
|
||||
decd187 apply 1.11111111111524E-384 -> #00009124491246a4 Subnormal
|
||||
decd188 apply #00009124491246a4 -> 1.11111111111524E-384 Subnormal
|
||||
|
||||
-- near-underflows
|
||||
decd189 apply -1e-398 -> #8000000000000001 Subnormal
|
||||
decd190 apply -1.0e-398 -> #8000000000000001 Subnormal Rounded
|
||||
|
||||
-- zeros
|
||||
decd401 apply 0E-500 -> #0000000000000000 Clamped
|
||||
decd402 apply 0E-400 -> #0000000000000000 Clamped
|
||||
decd403 apply 0E-398 -> #0000000000000000
|
||||
decd404 apply #0000000000000000 -> 0E-398
|
||||
decd405 apply 0.000000000000000E-383 -> #0000000000000000
|
||||
decd406 apply #0000000000000000 -> 0E-398
|
||||
decd407 apply 0E-2 -> #2230000000000000
|
||||
decd408 apply #2230000000000000 -> 0.00
|
||||
decd409 apply 0 -> #2238000000000000
|
||||
decd410 apply #2238000000000000 -> 0
|
||||
decd411 apply 0E+3 -> #2244000000000000
|
||||
decd412 apply #2244000000000000 -> 0E+3
|
||||
decd413 apply 0E+369 -> #43fc000000000000
|
||||
decd414 apply #43fc000000000000 -> 0E+369
|
||||
-- clamped zeros...
|
||||
decd415 apply 0E+370 -> #43fc000000000000 Clamped
|
||||
decd416 apply #43fc000000000000 -> 0E+369
|
||||
decd417 apply 0E+384 -> #43fc000000000000 Clamped
|
||||
decd418 apply #43fc000000000000 -> 0E+369
|
||||
decd419 apply 0E+400 -> #43fc000000000000 Clamped
|
||||
decd420 apply #43fc000000000000 -> 0E+369
|
||||
decd421 apply 0E+500 -> #43fc000000000000 Clamped
|
||||
decd422 apply #43fc000000000000 -> 0E+369
|
||||
|
||||
-- negative zeros
|
||||
decd431 apply -0E-400 -> #8000000000000000 Clamped
|
||||
decd432 apply -0E-400 -> #8000000000000000 Clamped
|
||||
decd433 apply -0E-398 -> #8000000000000000
|
||||
decd434 apply #8000000000000000 -> -0E-398
|
||||
decd435 apply -0.000000000000000E-383 -> #8000000000000000
|
||||
decd436 apply #8000000000000000 -> -0E-398
|
||||
decd437 apply -0E-2 -> #a230000000000000
|
||||
decd438 apply #a230000000000000 -> -0.00
|
||||
decd439 apply -0 -> #a238000000000000
|
||||
decd440 apply #a238000000000000 -> -0
|
||||
decd441 apply -0E+3 -> #a244000000000000
|
||||
decd442 apply #a244000000000000 -> -0E+3
|
||||
decd443 apply -0E+369 -> #c3fc000000000000
|
||||
decd444 apply #c3fc000000000000 -> -0E+369
|
||||
-- clamped zeros...
|
||||
decd445 apply -0E+370 -> #c3fc000000000000 Clamped
|
||||
decd446 apply #c3fc000000000000 -> -0E+369
|
||||
decd447 apply -0E+384 -> #c3fc000000000000 Clamped
|
||||
decd448 apply #c3fc000000000000 -> -0E+369
|
||||
decd449 apply -0E+400 -> #c3fc000000000000 Clamped
|
||||
decd450 apply #c3fc000000000000 -> -0E+369
|
||||
decd451 apply -0E+500 -> #c3fc000000000000 Clamped
|
||||
decd452 apply #c3fc000000000000 -> -0E+369
|
||||
|
||||
-- exponents
|
||||
decd460 apply #225c000000000007 -> 7E+9
|
||||
decd461 apply 7E+9 -> #225c000000000007
|
||||
decd462 apply #23c4000000000007 -> 7E+99
|
||||
decd463 apply 7E+99 -> #23c4000000000007
|
||||
|
||||
-- Specials
|
||||
decd500 apply Infinity -> #7800000000000000
|
||||
decd501 apply #7878787878787878 -> #7800000000000000
|
||||
decd502 apply #7800000000000000 -> Infinity
|
||||
decd503 apply #7979797979797979 -> #7800000000000000
|
||||
decd504 apply #7900000000000000 -> Infinity
|
||||
decd505 apply #7a7a7a7a7a7a7a7a -> #7800000000000000
|
||||
decd506 apply #7a00000000000000 -> Infinity
|
||||
decd507 apply #7b7b7b7b7b7b7b7b -> #7800000000000000
|
||||
decd508 apply #7b00000000000000 -> Infinity
|
||||
|
||||
decd509 apply NaN -> #7c00000000000000
|
||||
decd510 apply #7c7c7c7c7c7c7c7c -> #7c007c7c7c7c7c7c
|
||||
decd511 apply #7c00000000000000 -> NaN
|
||||
decd512 apply #7d7d7d7d7d7d7d7d -> #7c017d7d7d7d7d7d
|
||||
decd513 apply #7d00000000000000 -> NaN
|
||||
decd514 apply #7e7e7e7e7e7e7e7e -> #7e007e7e7e7e7c7e
|
||||
decd515 apply #7e00000000000000 -> sNaN
|
||||
decd516 apply #7f7f7f7f7f7f7f7f -> #7e007f7f7f7f7c7f
|
||||
decd517 apply #7f00000000000000 -> sNaN
|
||||
decd518 apply #7fffffffffffffff -> sNaN999999999999999
|
||||
decd519 apply #7fffffffffffffff -> #7e00ff3fcff3fcff
|
||||
|
||||
decd520 apply -Infinity -> #f800000000000000
|
||||
decd521 apply #f878787878787878 -> #f800000000000000
|
||||
decd522 apply #f800000000000000 -> -Infinity
|
||||
decd523 apply #f979797979797979 -> #f800000000000000
|
||||
decd524 apply #f900000000000000 -> -Infinity
|
||||
decd525 apply #fa7a7a7a7a7a7a7a -> #f800000000000000
|
||||
decd526 apply #fa00000000000000 -> -Infinity
|
||||
decd527 apply #fb7b7b7b7b7b7b7b -> #f800000000000000
|
||||
decd528 apply #fb00000000000000 -> -Infinity
|
||||
|
||||
decd529 apply -NaN -> #fc00000000000000
|
||||
decd530 apply #fc7c7c7c7c7c7c7c -> #fc007c7c7c7c7c7c
|
||||
decd531 apply #fc00000000000000 -> -NaN
|
||||
decd532 apply #fd7d7d7d7d7d7d7d -> #fc017d7d7d7d7d7d
|
||||
decd533 apply #fd00000000000000 -> -NaN
|
||||
decd534 apply #fe7e7e7e7e7e7e7e -> #fe007e7e7e7e7c7e
|
||||
decd535 apply #fe00000000000000 -> -sNaN
|
||||
decd536 apply #ff7f7f7f7f7f7f7f -> #fe007f7f7f7f7c7f
|
||||
decd537 apply #ff00000000000000 -> -sNaN
|
||||
decd538 apply #ffffffffffffffff -> -sNaN999999999999999
|
||||
decd539 apply #ffffffffffffffff -> #fe00ff3fcff3fcff
|
||||
|
||||
-- diagnostic NaNs
|
||||
decd540 apply NaN -> #7c00000000000000
|
||||
decd541 apply NaN0 -> #7c00000000000000
|
||||
decd542 apply NaN1 -> #7c00000000000001
|
||||
decd543 apply NaN12 -> #7c00000000000012
|
||||
decd544 apply NaN79 -> #7c00000000000079
|
||||
decd545 apply NaN12345 -> #7c000000000049c5
|
||||
decd546 apply NaN123456 -> #7c00000000028e56
|
||||
decd547 apply NaN799799 -> #7c000000000f7fdf
|
||||
decd548 apply NaN799799799799799 -> #7c03dff7fdff7fdf
|
||||
decd549 apply NaN999999999999999 -> #7c00ff3fcff3fcff
|
||||
-- too many digits
|
||||
|
||||
-- fold-down full sequence
|
||||
decd601 apply 1E+384 -> #47fc000000000000 Clamped
|
||||
decd602 apply #47fc000000000000 -> 1.000000000000000E+384
|
||||
decd603 apply 1E+383 -> #43fc800000000000 Clamped
|
||||
decd604 apply #43fc800000000000 -> 1.00000000000000E+383
|
||||
decd605 apply 1E+382 -> #43fc100000000000 Clamped
|
||||
decd606 apply #43fc100000000000 -> 1.0000000000000E+382
|
||||
decd607 apply 1E+381 -> #43fc010000000000 Clamped
|
||||
decd608 apply #43fc010000000000 -> 1.000000000000E+381
|
||||
decd609 apply 1E+380 -> #43fc002000000000 Clamped
|
||||
decd610 apply #43fc002000000000 -> 1.00000000000E+380
|
||||
decd611 apply 1E+379 -> #43fc000400000000 Clamped
|
||||
decd612 apply #43fc000400000000 -> 1.0000000000E+379
|
||||
decd613 apply 1E+378 -> #43fc000040000000 Clamped
|
||||
decd614 apply #43fc000040000000 -> 1.000000000E+378
|
||||
decd615 apply 1E+377 -> #43fc000008000000 Clamped
|
||||
decd616 apply #43fc000008000000 -> 1.00000000E+377
|
||||
decd617 apply 1E+376 -> #43fc000001000000 Clamped
|
||||
decd618 apply #43fc000001000000 -> 1.0000000E+376
|
||||
decd619 apply 1E+375 -> #43fc000000100000 Clamped
|
||||
decd620 apply #43fc000000100000 -> 1.000000E+375
|
||||
decd621 apply 1E+374 -> #43fc000000020000 Clamped
|
||||
decd622 apply #43fc000000020000 -> 1.00000E+374
|
||||
decd623 apply 1E+373 -> #43fc000000004000 Clamped
|
||||
decd624 apply #43fc000000004000 -> 1.0000E+373
|
||||
decd625 apply 1E+372 -> #43fc000000000400 Clamped
|
||||
decd626 apply #43fc000000000400 -> 1.000E+372
|
||||
decd627 apply 1E+371 -> #43fc000000000080 Clamped
|
||||
decd628 apply #43fc000000000080 -> 1.00E+371
|
||||
decd629 apply 1E+370 -> #43fc000000000010 Clamped
|
||||
decd630 apply #43fc000000000010 -> 1.0E+370
|
||||
decd631 apply 1E+369 -> #43fc000000000001
|
||||
decd632 apply #43fc000000000001 -> 1E+369
|
||||
decd633 apply 1E+368 -> #43f8000000000001
|
||||
decd634 apply #43f8000000000001 -> 1E+368
|
||||
-- same with 9s
|
||||
decd641 apply 9E+384 -> #77fc000000000000 Clamped
|
||||
decd642 apply #77fc000000000000 -> 9.000000000000000E+384
|
||||
decd643 apply 9E+383 -> #43fc8c0000000000 Clamped
|
||||
decd644 apply #43fc8c0000000000 -> 9.00000000000000E+383
|
||||
decd645 apply 9E+382 -> #43fc1a0000000000 Clamped
|
||||
decd646 apply #43fc1a0000000000 -> 9.0000000000000E+382
|
||||
decd647 apply 9E+381 -> #43fc090000000000 Clamped
|
||||
decd648 apply #43fc090000000000 -> 9.000000000000E+381
|
||||
decd649 apply 9E+380 -> #43fc002300000000 Clamped
|
||||
decd650 apply #43fc002300000000 -> 9.00000000000E+380
|
||||
decd651 apply 9E+379 -> #43fc000680000000 Clamped
|
||||
decd652 apply #43fc000680000000 -> 9.0000000000E+379
|
||||
decd653 apply 9E+378 -> #43fc000240000000 Clamped
|
||||
decd654 apply #43fc000240000000 -> 9.000000000E+378
|
||||
decd655 apply 9E+377 -> #43fc000008c00000 Clamped
|
||||
decd656 apply #43fc000008c00000 -> 9.00000000E+377
|
||||
decd657 apply 9E+376 -> #43fc000001a00000 Clamped
|
||||
decd658 apply #43fc000001a00000 -> 9.0000000E+376
|
||||
decd659 apply 9E+375 -> #43fc000000900000 Clamped
|
||||
decd660 apply #43fc000000900000 -> 9.000000E+375
|
||||
decd661 apply 9E+374 -> #43fc000000023000 Clamped
|
||||
decd662 apply #43fc000000023000 -> 9.00000E+374
|
||||
decd663 apply 9E+373 -> #43fc000000006800 Clamped
|
||||
decd664 apply #43fc000000006800 -> 9.0000E+373
|
||||
decd665 apply 9E+372 -> #43fc000000002400 Clamped
|
||||
decd666 apply #43fc000000002400 -> 9.000E+372
|
||||
decd667 apply 9E+371 -> #43fc00000000008c Clamped
|
||||
decd668 apply #43fc00000000008c -> 9.00E+371
|
||||
decd669 apply 9E+370 -> #43fc00000000001a Clamped
|
||||
decd670 apply #43fc00000000001a -> 9.0E+370
|
||||
decd671 apply 9E+369 -> #43fc000000000009
|
||||
decd672 apply #43fc000000000009 -> 9E+369
|
||||
decd673 apply 9E+368 -> #43f8000000000009
|
||||
decd674 apply #43f8000000000009 -> 9E+368
|
||||
|
||||
|
||||
-- Selected DPD codes
|
||||
decd700 apply #2238000000000000 -> 0
|
||||
decd701 apply #2238000000000009 -> 9
|
||||
decd702 apply #2238000000000010 -> 10
|
||||
decd703 apply #2238000000000019 -> 19
|
||||
decd704 apply #2238000000000020 -> 20
|
||||
decd705 apply #2238000000000029 -> 29
|
||||
decd706 apply #2238000000000030 -> 30
|
||||
decd707 apply #2238000000000039 -> 39
|
||||
decd708 apply #2238000000000040 -> 40
|
||||
decd709 apply #2238000000000049 -> 49
|
||||
decd710 apply #2238000000000050 -> 50
|
||||
decd711 apply #2238000000000059 -> 59
|
||||
decd712 apply #2238000000000060 -> 60
|
||||
decd713 apply #2238000000000069 -> 69
|
||||
decd714 apply #2238000000000070 -> 70
|
||||
decd715 apply #2238000000000071 -> 71
|
||||
decd716 apply #2238000000000072 -> 72
|
||||
decd717 apply #2238000000000073 -> 73
|
||||
decd718 apply #2238000000000074 -> 74
|
||||
decd719 apply #2238000000000075 -> 75
|
||||
decd720 apply #2238000000000076 -> 76
|
||||
decd721 apply #2238000000000077 -> 77
|
||||
decd722 apply #2238000000000078 -> 78
|
||||
decd723 apply #2238000000000079 -> 79
|
||||
|
||||
decd725 apply #223800000000029e -> 994
|
||||
decd726 apply #223800000000029f -> 995
|
||||
decd727 apply #22380000000002a0 -> 520
|
||||
decd728 apply #22380000000002a1 -> 521
|
||||
-- from telco test data
|
||||
decd730 apply #2238000000000188 -> 308
|
||||
decd731 apply #22380000000001a3 -> 323
|
||||
decd732 apply #223800000000002a -> 82
|
||||
decd733 apply #22380000000001a9 -> 329
|
||||
decd734 apply #2238000000000081 -> 101
|
||||
decd735 apply #22380000000002a2 -> 522
|
||||
|
||||
-- DPD: one of each of the huffman groups
|
||||
decd740 apply #22380000000003f7 -> 777
|
||||
decd741 apply #22380000000003f8 -> 778
|
||||
decd742 apply #22380000000003eb -> 787
|
||||
decd743 apply #223800000000037d -> 877
|
||||
decd744 apply #223800000000039f -> 997
|
||||
decd745 apply #22380000000003bf -> 979
|
||||
decd746 apply #22380000000003df -> 799
|
||||
decd747 apply #223800000000006e -> 888
|
||||
|
||||
-- DPD all-highs cases (includes the 24 redundant codes)
|
||||
decd750 apply #223800000000006e -> 888
|
||||
decd751 apply #223800000000016e -> 888
|
||||
decd752 apply #223800000000026e -> 888
|
||||
decd753 apply #223800000000036e -> 888
|
||||
decd754 apply #223800000000006f -> 889
|
||||
decd755 apply #223800000000016f -> 889
|
||||
decd756 apply #223800000000026f -> 889
|
||||
decd757 apply #223800000000036f -> 889
|
||||
|
||||
decd760 apply #223800000000007e -> 898
|
||||
decd761 apply #223800000000017e -> 898
|
||||
decd762 apply #223800000000027e -> 898
|
||||
decd763 apply #223800000000037e -> 898
|
||||
decd764 apply #223800000000007f -> 899
|
||||
decd765 apply #223800000000017f -> 899
|
||||
decd766 apply #223800000000027f -> 899
|
||||
decd767 apply #223800000000037f -> 899
|
||||
|
||||
decd770 apply #22380000000000ee -> 988
|
||||
decd771 apply #22380000000001ee -> 988
|
||||
decd772 apply #22380000000002ee -> 988
|
||||
decd773 apply #22380000000003ee -> 988
|
||||
decd774 apply #22380000000000ef -> 989
|
||||
decd775 apply #22380000000001ef -> 989
|
||||
decd776 apply #22380000000002ef -> 989
|
||||
decd777 apply #22380000000003ef -> 989
|
||||
|
||||
decd780 apply #22380000000000fe -> 998
|
||||
decd781 apply #22380000000001fe -> 998
|
||||
decd782 apply #22380000000002fe -> 998
|
||||
decd783 apply #22380000000003fe -> 998
|
||||
decd784 apply #22380000000000ff -> 999
|
||||
decd785 apply #22380000000001ff -> 999
|
||||
decd786 apply #22380000000002ff -> 999
|
||||
decd787 apply #22380000000003ff -> 999
|
||||
|
||||
-- values around [u]int32 edges (zeros done earlier)
|
||||
decd800 apply -2147483646 -> #a23800008c78af46
|
||||
decd801 apply -2147483647 -> #a23800008c78af47
|
||||
decd802 apply -2147483648 -> #a23800008c78af48
|
||||
decd803 apply -2147483649 -> #a23800008c78af49
|
||||
decd804 apply 2147483646 -> #223800008c78af46
|
||||
decd805 apply 2147483647 -> #223800008c78af47
|
||||
decd806 apply 2147483648 -> #223800008c78af48
|
||||
decd807 apply 2147483649 -> #223800008c78af49
|
||||
decd808 apply 4294967294 -> #2238000115afb55a
|
||||
decd809 apply 4294967295 -> #2238000115afb55b
|
||||
decd810 apply 4294967296 -> #2238000115afb57a
|
||||
decd811 apply 4294967297 -> #2238000115afb57b
|
||||
|
||||
decd820 apply #a23800008c78af46 -> -2147483646
|
||||
decd821 apply #a23800008c78af47 -> -2147483647
|
||||
decd822 apply #a23800008c78af48 -> -2147483648
|
||||
decd823 apply #a23800008c78af49 -> -2147483649
|
||||
decd824 apply #223800008c78af46 -> 2147483646
|
||||
decd825 apply #223800008c78af47 -> 2147483647
|
||||
decd826 apply #223800008c78af48 -> 2147483648
|
||||
decd827 apply #223800008c78af49 -> 2147483649
|
||||
decd828 apply #2238000115afb55a -> 4294967294
|
||||
decd829 apply #2238000115afb55b -> 4294967295
|
||||
decd830 apply #2238000115afb57a -> 4294967296
|
||||
decd831 apply #2238000115afb57b -> 4294967297
|
||||
|
||||
-- for narrowing
|
||||
decd840 apply #2870000000000000 -> 2.000000000000000E-99
|
||||
|
||||
-- some miscellaneous
|
||||
decd850 apply #0004070000000000 -> 7.000000000000E-385 Subnormal
|
||||
decd851 apply #0008000000020000 -> 1.00000E-391 Subnormal
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,202 @@
|
||||
------------------------------------------------------------------------
|
||||
-- ddInvert.decTest -- digitwise logical INVERT for decDoubles --
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
precision: 16
|
||||
maxExponent: 384
|
||||
minExponent: -383
|
||||
extended: 1
|
||||
clamp: 1
|
||||
rounding: half_even
|
||||
|
||||
-- Sanity check (truth table)
|
||||
ddinv001 invert 0 -> 1111111111111111
|
||||
ddinv002 invert 1 -> 1111111111111110
|
||||
ddinv003 invert 10 -> 1111111111111101
|
||||
ddinv004 invert 111111111 -> 1111111000000000
|
||||
ddinv005 invert 000000000 -> 1111111111111111
|
||||
-- and at msd and msd-1
|
||||
ddinv007 invert 0000000000000000 -> 1111111111111111
|
||||
ddinv008 invert 1000000000000000 -> 111111111111111
|
||||
ddinv009 invert 0000000000000000 -> 1111111111111111
|
||||
ddinv010 invert 0100000000000000 -> 1011111111111111
|
||||
ddinv011 invert 0111111111111111 -> 1000000000000000
|
||||
ddinv012 invert 1111111111111111 -> 0
|
||||
ddinv013 invert 0011111111111111 -> 1100000000000000
|
||||
ddinv014 invert 0111111111111111 -> 1000000000000000
|
||||
|
||||
-- Various lengths
|
||||
-- 123456789 1234567890123456
|
||||
ddinv021 invert 111111111 -> 1111111000000000
|
||||
ddinv022 invert 111111111111 -> 1111000000000000
|
||||
ddinv023 invert 11111111 -> 1111111100000000
|
||||
ddinv025 invert 1111111 -> 1111111110000000
|
||||
ddinv026 invert 111111 -> 1111111111000000
|
||||
ddinv027 invert 11111 -> 1111111111100000
|
||||
ddinv028 invert 1111 -> 1111111111110000
|
||||
ddinv029 invert 111 -> 1111111111111000
|
||||
ddinv031 invert 11 -> 1111111111111100
|
||||
ddinv032 invert 1 -> 1111111111111110
|
||||
ddinv033 invert 111111111111 -> 1111000000000000
|
||||
ddinv034 invert 11111111111 -> 1111100000000000
|
||||
ddinv035 invert 1111111111 -> 1111110000000000
|
||||
ddinv036 invert 111111111 -> 1111111000000000
|
||||
|
||||
ddinv040 invert 011111111 -> 1111111100000000
|
||||
ddinv041 invert 101111111 -> 1111111010000000
|
||||
ddinv042 invert 110111111 -> 1111111001000000
|
||||
ddinv043 invert 111011111 -> 1111111000100000
|
||||
ddinv044 invert 111101111 -> 1111111000010000
|
||||
ddinv045 invert 111110111 -> 1111111000001000
|
||||
ddinv046 invert 111111011 -> 1111111000000100
|
||||
ddinv047 invert 111111101 -> 1111111000000010
|
||||
ddinv048 invert 111111110 -> 1111111000000001
|
||||
ddinv049 invert 011111011 -> 1111111100000100
|
||||
ddinv050 invert 101111101 -> 1111111010000010
|
||||
ddinv051 invert 110111110 -> 1111111001000001
|
||||
ddinv052 invert 111011101 -> 1111111000100010
|
||||
ddinv053 invert 111101011 -> 1111111000010100
|
||||
ddinv054 invert 111110111 -> 1111111000001000
|
||||
ddinv055 invert 111101011 -> 1111111000010100
|
||||
ddinv056 invert 111011101 -> 1111111000100010
|
||||
ddinv057 invert 110111110 -> 1111111001000001
|
||||
ddinv058 invert 101111101 -> 1111111010000010
|
||||
ddinv059 invert 011111011 -> 1111111100000100
|
||||
|
||||
ddinv080 invert 1000000011111111 -> 111111100000000
|
||||
ddinv081 invert 0100000101111111 -> 1011111010000000
|
||||
ddinv082 invert 0010000110111111 -> 1101111001000000
|
||||
ddinv083 invert 0001000111011111 -> 1110111000100000
|
||||
ddinv084 invert 0000100111101111 -> 1111011000010000
|
||||
ddinv085 invert 0000010111110111 -> 1111101000001000
|
||||
ddinv086 invert 0000001111111011 -> 1111110000000100
|
||||
ddinv087 invert 0000010111111101 -> 1111101000000010
|
||||
ddinv088 invert 0000100111111110 -> 1111011000000001
|
||||
ddinv089 invert 0001000011111011 -> 1110111100000100
|
||||
ddinv090 invert 0010000101111101 -> 1101111010000010
|
||||
ddinv091 invert 0100000110111110 -> 1011111001000001
|
||||
ddinv092 invert 1000000111011101 -> 111111000100010
|
||||
ddinv093 invert 0100000111101011 -> 1011111000010100
|
||||
ddinv094 invert 0010000111110111 -> 1101111000001000
|
||||
ddinv095 invert 0001000111101011 -> 1110111000010100
|
||||
ddinv096 invert 0000100111011101 -> 1111011000100010
|
||||
ddinv097 invert 0000010110111110 -> 1111101001000001
|
||||
ddinv098 invert 0000001101111101 -> 1111110010000010
|
||||
ddinv099 invert 0000010011111011 -> 1111101100000100
|
||||
|
||||
-- non-0/1 should not be accepted, nor should signs
|
||||
ddinv220 invert 111111112 -> NaN Invalid_operation
|
||||
ddinv221 invert 333333333 -> NaN Invalid_operation
|
||||
ddinv222 invert 555555555 -> NaN Invalid_operation
|
||||
ddinv223 invert 777777777 -> NaN Invalid_operation
|
||||
ddinv224 invert 999999999 -> NaN Invalid_operation
|
||||
ddinv225 invert 222222222 -> NaN Invalid_operation
|
||||
ddinv226 invert 444444444 -> NaN Invalid_operation
|
||||
ddinv227 invert 666666666 -> NaN Invalid_operation
|
||||
ddinv228 invert 888888888 -> NaN Invalid_operation
|
||||
ddinv229 invert 999999999 -> NaN Invalid_operation
|
||||
ddinv230 invert 999999999 -> NaN Invalid_operation
|
||||
ddinv231 invert 999999999 -> NaN Invalid_operation
|
||||
ddinv232 invert 999999999 -> NaN Invalid_operation
|
||||
-- a few randoms
|
||||
ddinv240 invert 567468689 -> NaN Invalid_operation
|
||||
ddinv241 invert 567367689 -> NaN Invalid_operation
|
||||
ddinv242 invert -631917772 -> NaN Invalid_operation
|
||||
ddinv243 invert -756253257 -> NaN Invalid_operation
|
||||
ddinv244 invert 835590149 -> NaN Invalid_operation
|
||||
-- test MSD
|
||||
ddinv250 invert 2000000000000000 -> NaN Invalid_operation
|
||||
ddinv251 invert 3000000000000000 -> NaN Invalid_operation
|
||||
ddinv252 invert 4000000000000000 -> NaN Invalid_operation
|
||||
ddinv253 invert 5000000000000000 -> NaN Invalid_operation
|
||||
ddinv254 invert 6000000000000000 -> NaN Invalid_operation
|
||||
ddinv255 invert 7000000000000000 -> NaN Invalid_operation
|
||||
ddinv256 invert 8000000000000000 -> NaN Invalid_operation
|
||||
ddinv257 invert 9000000000000000 -> NaN Invalid_operation
|
||||
-- test MSD-1
|
||||
ddinv270 invert 0200001000000000 -> NaN Invalid_operation
|
||||
ddinv271 invert 0300000100000000 -> NaN Invalid_operation
|
||||
ddinv272 invert 0400000010000000 -> NaN Invalid_operation
|
||||
ddinv273 invert 0500000001000000 -> NaN Invalid_operation
|
||||
ddinv274 invert 1600000000100000 -> NaN Invalid_operation
|
||||
ddinv275 invert 1700000000010000 -> NaN Invalid_operation
|
||||
ddinv276 invert 1800000000001000 -> NaN Invalid_operation
|
||||
ddinv277 invert 1900000000000100 -> NaN Invalid_operation
|
||||
-- test LSD
|
||||
ddinv280 invert 0010000000000002 -> NaN Invalid_operation
|
||||
ddinv281 invert 0001000000000003 -> NaN Invalid_operation
|
||||
ddinv282 invert 0000100000000004 -> NaN Invalid_operation
|
||||
ddinv283 invert 0000010000000005 -> NaN Invalid_operation
|
||||
ddinv284 invert 1000001000000006 -> NaN Invalid_operation
|
||||
ddinv285 invert 1000000100000007 -> NaN Invalid_operation
|
||||
ddinv286 invert 1000000010000008 -> NaN Invalid_operation
|
||||
ddinv287 invert 1000000001000009 -> NaN Invalid_operation
|
||||
-- test Middie
|
||||
ddinv288 invert 0010000020000000 -> NaN Invalid_operation
|
||||
ddinv289 invert 0001000030000001 -> NaN Invalid_operation
|
||||
ddinv290 invert 0000100040000010 -> NaN Invalid_operation
|
||||
ddinv291 invert 0000010050000100 -> NaN Invalid_operation
|
||||
ddinv292 invert 1000001060001000 -> NaN Invalid_operation
|
||||
ddinv293 invert 1000000170010000 -> NaN Invalid_operation
|
||||
ddinv294 invert 1000000080100000 -> NaN Invalid_operation
|
||||
ddinv295 invert 1000000091000000 -> NaN Invalid_operation
|
||||
-- sign
|
||||
ddinv296 invert -1000000001000000 -> NaN Invalid_operation
|
||||
ddinv299 invert 1000000001000000 -> 111111110111111
|
||||
|
||||
|
||||
-- Nmax, Nmin, Ntiny-like
|
||||
ddinv341 invert 9.99999999E+299 -> NaN Invalid_operation
|
||||
ddinv342 invert 1E-299 -> NaN Invalid_operation
|
||||
ddinv343 invert 1.00000000E-299 -> NaN Invalid_operation
|
||||
ddinv344 invert 1E-207 -> NaN Invalid_operation
|
||||
ddinv345 invert -1E-207 -> NaN Invalid_operation
|
||||
ddinv346 invert -1.00000000E-299 -> NaN Invalid_operation
|
||||
ddinv347 invert -1E-299 -> NaN Invalid_operation
|
||||
ddinv348 invert -9.99999999E+299 -> NaN Invalid_operation
|
||||
|
||||
-- A few other non-integers
|
||||
ddinv361 invert 1.0 -> NaN Invalid_operation
|
||||
ddinv362 invert 1E+1 -> NaN Invalid_operation
|
||||
ddinv363 invert 0.0 -> NaN Invalid_operation
|
||||
ddinv364 invert 0E+1 -> NaN Invalid_operation
|
||||
ddinv365 invert 9.9 -> NaN Invalid_operation
|
||||
ddinv366 invert 9E+1 -> NaN Invalid_operation
|
||||
|
||||
-- All Specials are in error
|
||||
ddinv788 invert -Inf -> NaN Invalid_operation
|
||||
ddinv794 invert Inf -> NaN Invalid_operation
|
||||
ddinv821 invert NaN -> NaN Invalid_operation
|
||||
ddinv841 invert sNaN -> NaN Invalid_operation
|
||||
-- propagating NaNs
|
||||
ddinv861 invert NaN1 -> NaN Invalid_operation
|
||||
ddinv862 invert +NaN2 -> NaN Invalid_operation
|
||||
ddinv863 invert NaN3 -> NaN Invalid_operation
|
||||
ddinv864 invert NaN4 -> NaN Invalid_operation
|
||||
ddinv865 invert NaN5 -> NaN Invalid_operation
|
||||
ddinv871 invert sNaN11 -> NaN Invalid_operation
|
||||
ddinv872 invert sNaN12 -> NaN Invalid_operation
|
||||
ddinv873 invert sNaN13 -> NaN Invalid_operation
|
||||
ddinv874 invert sNaN14 -> NaN Invalid_operation
|
||||
ddinv875 invert sNaN15 -> NaN Invalid_operation
|
||||
ddinv876 invert NaN16 -> NaN Invalid_operation
|
||||
ddinv881 invert +NaN25 -> NaN Invalid_operation
|
||||
ddinv882 invert -NaN26 -> NaN Invalid_operation
|
||||
ddinv883 invert -sNaN27 -> NaN Invalid_operation
|
@@ -0,0 +1,159 @@
|
||||
------------------------------------------------------------------------
|
||||
-- ddLogB.decTest -- integral 754r adjusted exponent, for decDoubles --
|
||||
-- Copyright (c) IBM Corporation, 2005, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
precision: 16
|
||||
maxExponent: 384
|
||||
minExponent: -383
|
||||
extended: 1
|
||||
clamp: 1
|
||||
rounding: half_even
|
||||
|
||||
-- basics
|
||||
ddlogb000 logb 0 -> -Infinity Division_by_zero
|
||||
ddlogb001 logb 1E-398 -> -398
|
||||
ddlogb002 logb 1E-383 -> -383
|
||||
ddlogb003 logb 0.001 -> -3
|
||||
ddlogb004 logb 0.03 -> -2
|
||||
ddlogb005 logb 1 -> 0
|
||||
ddlogb006 logb 2 -> 0
|
||||
ddlogb007 logb 2.5 -> 0
|
||||
ddlogb008 logb 2.500 -> 0
|
||||
ddlogb009 logb 10 -> 1
|
||||
ddlogb010 logb 70 -> 1
|
||||
ddlogb011 logb 100 -> 2
|
||||
ddlogb012 logb 333 -> 2
|
||||
ddlogb013 logb 9E+384 -> 384
|
||||
ddlogb014 logb +Infinity -> Infinity
|
||||
|
||||
-- negatives appear to be treated as positives
|
||||
ddlogb021 logb -0 -> -Infinity Division_by_zero
|
||||
ddlogb022 logb -1E-398 -> -398
|
||||
ddlogb023 logb -9E-383 -> -383
|
||||
ddlogb024 logb -0.001 -> -3
|
||||
ddlogb025 logb -1 -> 0
|
||||
ddlogb026 logb -2 -> 0
|
||||
ddlogb027 logb -10 -> 1
|
||||
ddlogb028 logb -70 -> 1
|
||||
ddlogb029 logb -100 -> 2
|
||||
ddlogb030 logb -9E+384 -> 384
|
||||
ddlogb031 logb -Infinity -> Infinity
|
||||
|
||||
-- zeros
|
||||
ddlogb111 logb 0 -> -Infinity Division_by_zero
|
||||
ddlogb112 logb -0 -> -Infinity Division_by_zero
|
||||
ddlogb113 logb 0E+4 -> -Infinity Division_by_zero
|
||||
ddlogb114 logb -0E+4 -> -Infinity Division_by_zero
|
||||
ddlogb115 logb 0.0000 -> -Infinity Division_by_zero
|
||||
ddlogb116 logb -0.0000 -> -Infinity Division_by_zero
|
||||
ddlogb117 logb 0E-141 -> -Infinity Division_by_zero
|
||||
ddlogb118 logb -0E-141 -> -Infinity Division_by_zero
|
||||
|
||||
-- full coefficients, alternating bits
|
||||
ddlogb121 logb 268268268 -> 8
|
||||
ddlogb122 logb -268268268 -> 8
|
||||
ddlogb123 logb 134134134 -> 8
|
||||
ddlogb124 logb -134134134 -> 8
|
||||
|
||||
-- Nmax, Nmin, Ntiny
|
||||
ddlogb131 logb 9.999999999999999E+384 -> 384
|
||||
ddlogb132 logb 1E-383 -> -383
|
||||
ddlogb133 logb 1.000000000000000E-383 -> -383
|
||||
ddlogb134 logb 1E-398 -> -398
|
||||
|
||||
ddlogb135 logb -1E-398 -> -398
|
||||
ddlogb136 logb -1.000000000000000E-383 -> -383
|
||||
ddlogb137 logb -1E-383 -> -383
|
||||
ddlogb138 logb -9.999999999999999E+384 -> 384
|
||||
|
||||
-- ones
|
||||
ddlogb0061 logb 1 -> 0
|
||||
ddlogb0062 logb 1.0 -> 0
|
||||
ddlogb0063 logb 1.000000000000000 -> 0
|
||||
|
||||
-- notable cases -- exact powers of 10
|
||||
ddlogb1100 logb 1 -> 0
|
||||
ddlogb1101 logb 10 -> 1
|
||||
ddlogb1102 logb 100 -> 2
|
||||
ddlogb1103 logb 1000 -> 3
|
||||
ddlogb1104 logb 10000 -> 4
|
||||
ddlogb1105 logb 100000 -> 5
|
||||
ddlogb1106 logb 1000000 -> 6
|
||||
ddlogb1107 logb 10000000 -> 7
|
||||
ddlogb1108 logb 100000000 -> 8
|
||||
ddlogb1109 logb 1000000000 -> 9
|
||||
ddlogb1110 logb 10000000000 -> 10
|
||||
ddlogb1111 logb 100000000000 -> 11
|
||||
ddlogb1112 logb 1000000000000 -> 12
|
||||
ddlogb1113 logb 0.00000000001 -> -11
|
||||
ddlogb1114 logb 0.0000000001 -> -10
|
||||
ddlogb1115 logb 0.000000001 -> -9
|
||||
ddlogb1116 logb 0.00000001 -> -8
|
||||
ddlogb1117 logb 0.0000001 -> -7
|
||||
ddlogb1118 logb 0.000001 -> -6
|
||||
ddlogb1119 logb 0.00001 -> -5
|
||||
ddlogb1120 logb 0.0001 -> -4
|
||||
ddlogb1121 logb 0.001 -> -3
|
||||
ddlogb1122 logb 0.01 -> -2
|
||||
ddlogb1123 logb 0.1 -> -1
|
||||
ddlogb1124 logb 1E-99 -> -99
|
||||
ddlogb1125 logb 1E-100 -> -100
|
||||
ddlogb1127 logb 1E-299 -> -299
|
||||
ddlogb1126 logb 1E-383 -> -383
|
||||
|
||||
-- suggestions from Ilan Nehama
|
||||
ddlogb1400 logb 10E-3 -> -2
|
||||
ddlogb1401 logb 10E-2 -> -1
|
||||
ddlogb1402 logb 100E-2 -> 0
|
||||
ddlogb1403 logb 1000E-2 -> 1
|
||||
ddlogb1404 logb 10000E-2 -> 2
|
||||
ddlogb1405 logb 10E-1 -> 0
|
||||
ddlogb1406 logb 100E-1 -> 1
|
||||
ddlogb1407 logb 1000E-1 -> 2
|
||||
ddlogb1408 logb 10000E-1 -> 3
|
||||
ddlogb1409 logb 10E0 -> 1
|
||||
ddlogb1410 logb 100E0 -> 2
|
||||
ddlogb1411 logb 1000E0 -> 3
|
||||
ddlogb1412 logb 10000E0 -> 4
|
||||
ddlogb1413 logb 10E1 -> 2
|
||||
ddlogb1414 logb 100E1 -> 3
|
||||
ddlogb1415 logb 1000E1 -> 4
|
||||
ddlogb1416 logb 10000E1 -> 5
|
||||
ddlogb1417 logb 10E2 -> 3
|
||||
ddlogb1418 logb 100E2 -> 4
|
||||
ddlogb1419 logb 1000E2 -> 5
|
||||
ddlogb1420 logb 10000E2 -> 6
|
||||
|
||||
-- special values
|
||||
ddlogb820 logb Infinity -> Infinity
|
||||
ddlogb821 logb 0 -> -Infinity Division_by_zero
|
||||
ddlogb822 logb NaN -> NaN
|
||||
ddlogb823 logb sNaN -> NaN Invalid_operation
|
||||
-- propagating NaNs
|
||||
ddlogb824 logb sNaN123 -> NaN123 Invalid_operation
|
||||
ddlogb825 logb -sNaN321 -> -NaN321 Invalid_operation
|
||||
ddlogb826 logb NaN456 -> NaN456
|
||||
ddlogb827 logb -NaN654 -> -NaN654
|
||||
ddlogb828 logb NaN1 -> NaN1
|
||||
|
||||
-- Null test
|
||||
ddlogb900 logb # -> NaN Invalid_operation
|
||||
|
||||
|
@@ -0,0 +1,322 @@
|
||||
------------------------------------------------------------------------
|
||||
-- ddMax.decTest -- decDouble maxnum --
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
-- we assume that base comparison is tested in compare.decTest, so
|
||||
-- these mainly cover special cases and rounding
|
||||
precision: 16
|
||||
maxExponent: 384
|
||||
minExponent: -383
|
||||
extended: 1
|
||||
clamp: 1
|
||||
rounding: half_even
|
||||
|
||||
-- sanity checks
|
||||
ddmax001 max -2 -2 -> -2
|
||||
ddmax002 max -2 -1 -> -1
|
||||
ddmax003 max -2 0 -> 0
|
||||
ddmax004 max -2 1 -> 1
|
||||
ddmax005 max -2 2 -> 2
|
||||
ddmax006 max -1 -2 -> -1
|
||||
ddmax007 max -1 -1 -> -1
|
||||
ddmax008 max -1 0 -> 0
|
||||
ddmax009 max -1 1 -> 1
|
||||
ddmax010 max -1 2 -> 2
|
||||
ddmax011 max 0 -2 -> 0
|
||||
ddmax012 max 0 -1 -> 0
|
||||
ddmax013 max 0 0 -> 0
|
||||
ddmax014 max 0 1 -> 1
|
||||
ddmax015 max 0 2 -> 2
|
||||
ddmax016 max 1 -2 -> 1
|
||||
ddmax017 max 1 -1 -> 1
|
||||
ddmax018 max 1 0 -> 1
|
||||
ddmax019 max 1 1 -> 1
|
||||
ddmax020 max 1 2 -> 2
|
||||
ddmax021 max 2 -2 -> 2
|
||||
ddmax022 max 2 -1 -> 2
|
||||
ddmax023 max 2 0 -> 2
|
||||
ddmax025 max 2 1 -> 2
|
||||
ddmax026 max 2 2 -> 2
|
||||
|
||||
-- extended zeros
|
||||
ddmax030 max 0 0 -> 0
|
||||
ddmax031 max 0 -0 -> 0
|
||||
ddmax032 max 0 -0.0 -> 0
|
||||
ddmax033 max 0 0.0 -> 0
|
||||
ddmax034 max -0 0 -> 0 -- note: -0 = 0, but 0 chosen
|
||||
ddmax035 max -0 -0 -> -0
|
||||
ddmax036 max -0 -0.0 -> -0.0
|
||||
ddmax037 max -0 0.0 -> 0.0
|
||||
ddmax038 max 0.0 0 -> 0
|
||||
ddmax039 max 0.0 -0 -> 0.0
|
||||
ddmax040 max 0.0 -0.0 -> 0.0
|
||||
ddmax041 max 0.0 0.0 -> 0.0
|
||||
ddmax042 max -0.0 0 -> 0
|
||||
ddmax043 max -0.0 -0 -> -0.0
|
||||
ddmax044 max -0.0 -0.0 -> -0.0
|
||||
ddmax045 max -0.0 0.0 -> 0.0
|
||||
|
||||
ddmax050 max -0E1 0E1 -> 0E+1
|
||||
ddmax051 max -0E2 0E2 -> 0E+2
|
||||
ddmax052 max -0E2 0E1 -> 0E+1
|
||||
ddmax053 max -0E1 0E2 -> 0E+2
|
||||
ddmax054 max 0E1 -0E1 -> 0E+1
|
||||
ddmax055 max 0E2 -0E2 -> 0E+2
|
||||
ddmax056 max 0E2 -0E1 -> 0E+2
|
||||
ddmax057 max 0E1 -0E2 -> 0E+1
|
||||
|
||||
ddmax058 max 0E1 0E1 -> 0E+1
|
||||
ddmax059 max 0E2 0E2 -> 0E+2
|
||||
ddmax060 max 0E2 0E1 -> 0E+2
|
||||
ddmax061 max 0E1 0E2 -> 0E+2
|
||||
ddmax062 max -0E1 -0E1 -> -0E+1
|
||||
ddmax063 max -0E2 -0E2 -> -0E+2
|
||||
ddmax064 max -0E2 -0E1 -> -0E+1
|
||||
ddmax065 max -0E1 -0E2 -> -0E+1
|
||||
|
||||
-- Specials
|
||||
ddmax090 max Inf -Inf -> Infinity
|
||||
ddmax091 max Inf -1000 -> Infinity
|
||||
ddmax092 max Inf -1 -> Infinity
|
||||
ddmax093 max Inf -0 -> Infinity
|
||||
ddmax094 max Inf 0 -> Infinity
|
||||
ddmax095 max Inf 1 -> Infinity
|
||||
ddmax096 max Inf 1000 -> Infinity
|
||||
ddmax097 max Inf Inf -> Infinity
|
||||
ddmax098 max -1000 Inf -> Infinity
|
||||
ddmax099 max -Inf Inf -> Infinity
|
||||
ddmax100 max -1 Inf -> Infinity
|
||||
ddmax101 max -0 Inf -> Infinity
|
||||
ddmax102 max 0 Inf -> Infinity
|
||||
ddmax103 max 1 Inf -> Infinity
|
||||
ddmax104 max 1000 Inf -> Infinity
|
||||
ddmax105 max Inf Inf -> Infinity
|
||||
|
||||
ddmax120 max -Inf -Inf -> -Infinity
|
||||
ddmax121 max -Inf -1000 -> -1000
|
||||
ddmax122 max -Inf -1 -> -1
|
||||
ddmax123 max -Inf -0 -> -0
|
||||
ddmax124 max -Inf 0 -> 0
|
||||
ddmax125 max -Inf 1 -> 1
|
||||
ddmax126 max -Inf 1000 -> 1000
|
||||
ddmax127 max -Inf Inf -> Infinity
|
||||
ddmax128 max -Inf -Inf -> -Infinity
|
||||
ddmax129 max -1000 -Inf -> -1000
|
||||
ddmax130 max -1 -Inf -> -1
|
||||
ddmax131 max -0 -Inf -> -0
|
||||
ddmax132 max 0 -Inf -> 0
|
||||
ddmax133 max 1 -Inf -> 1
|
||||
ddmax134 max 1000 -Inf -> 1000
|
||||
ddmax135 max Inf -Inf -> Infinity
|
||||
|
||||
-- 2004.08.02 754r chooses number over NaN in mixed cases
|
||||
ddmax141 max NaN -Inf -> -Infinity
|
||||
ddmax142 max NaN -1000 -> -1000
|
||||
ddmax143 max NaN -1 -> -1
|
||||
ddmax144 max NaN -0 -> -0
|
||||
ddmax145 max NaN 0 -> 0
|
||||
ddmax146 max NaN 1 -> 1
|
||||
ddmax147 max NaN 1000 -> 1000
|
||||
ddmax148 max NaN Inf -> Infinity
|
||||
ddmax149 max NaN NaN -> NaN
|
||||
ddmax150 max -Inf NaN -> -Infinity
|
||||
ddmax151 max -1000 NaN -> -1000
|
||||
ddmax152 max -1 NaN -> -1
|
||||
ddmax153 max -0 NaN -> -0
|
||||
ddmax154 max 0 NaN -> 0
|
||||
ddmax155 max 1 NaN -> 1
|
||||
ddmax156 max 1000 NaN -> 1000
|
||||
ddmax157 max Inf NaN -> Infinity
|
||||
|
||||
ddmax161 max sNaN -Inf -> NaN Invalid_operation
|
||||
ddmax162 max sNaN -1000 -> NaN Invalid_operation
|
||||
ddmax163 max sNaN -1 -> NaN Invalid_operation
|
||||
ddmax164 max sNaN -0 -> NaN Invalid_operation
|
||||
ddmax165 max sNaN 0 -> NaN Invalid_operation
|
||||
ddmax166 max sNaN 1 -> NaN Invalid_operation
|
||||
ddmax167 max sNaN 1000 -> NaN Invalid_operation
|
||||
ddmax168 max sNaN NaN -> NaN Invalid_operation
|
||||
ddmax169 max sNaN sNaN -> NaN Invalid_operation
|
||||
ddmax170 max NaN sNaN -> NaN Invalid_operation
|
||||
ddmax171 max -Inf sNaN -> NaN Invalid_operation
|
||||
ddmax172 max -1000 sNaN -> NaN Invalid_operation
|
||||
ddmax173 max -1 sNaN -> NaN Invalid_operation
|
||||
ddmax174 max -0 sNaN -> NaN Invalid_operation
|
||||
ddmax175 max 0 sNaN -> NaN Invalid_operation
|
||||
ddmax176 max 1 sNaN -> NaN Invalid_operation
|
||||
ddmax177 max 1000 sNaN -> NaN Invalid_operation
|
||||
ddmax178 max Inf sNaN -> NaN Invalid_operation
|
||||
ddmax179 max NaN sNaN -> NaN Invalid_operation
|
||||
|
||||
-- propagating NaNs
|
||||
ddmax181 max NaN9 -Inf -> -Infinity
|
||||
ddmax182 max NaN8 9 -> 9
|
||||
ddmax183 max -NaN7 Inf -> Infinity
|
||||
|
||||
ddmax184 max -NaN1 NaN11 -> -NaN1
|
||||
ddmax185 max NaN2 NaN12 -> NaN2
|
||||
ddmax186 max -NaN13 -NaN7 -> -NaN13
|
||||
ddmax187 max NaN14 -NaN5 -> NaN14
|
||||
|
||||
ddmax188 max -Inf NaN4 -> -Infinity
|
||||
ddmax189 max -9 -NaN3 -> -9
|
||||
ddmax190 max Inf NaN2 -> Infinity
|
||||
|
||||
ddmax191 max sNaN99 -Inf -> NaN99 Invalid_operation
|
||||
ddmax192 max sNaN98 -1 -> NaN98 Invalid_operation
|
||||
ddmax193 max -sNaN97 NaN -> -NaN97 Invalid_operation
|
||||
ddmax194 max sNaN96 sNaN94 -> NaN96 Invalid_operation
|
||||
ddmax195 max NaN95 sNaN93 -> NaN93 Invalid_operation
|
||||
ddmax196 max -Inf sNaN92 -> NaN92 Invalid_operation
|
||||
ddmax197 max 0 sNaN91 -> NaN91 Invalid_operation
|
||||
ddmax198 max Inf -sNaN90 -> -NaN90 Invalid_operation
|
||||
ddmax199 max NaN sNaN89 -> NaN89 Invalid_operation
|
||||
|
||||
-- old rounding checks
|
||||
ddmax221 max 12345678000 1 -> 12345678000
|
||||
ddmax222 max 1 12345678000 -> 12345678000
|
||||
ddmax223 max 1234567800 1 -> 1234567800
|
||||
ddmax224 max 1 1234567800 -> 1234567800
|
||||
ddmax225 max 1234567890 1 -> 1234567890
|
||||
ddmax226 max 1 1234567890 -> 1234567890
|
||||
ddmax227 max 1234567891 1 -> 1234567891
|
||||
ddmax228 max 1 1234567891 -> 1234567891
|
||||
ddmax229 max 12345678901 1 -> 12345678901
|
||||
ddmax230 max 1 12345678901 -> 12345678901
|
||||
ddmax231 max 1234567896 1 -> 1234567896
|
||||
ddmax232 max 1 1234567896 -> 1234567896
|
||||
ddmax233 max -1234567891 1 -> 1
|
||||
ddmax234 max 1 -1234567891 -> 1
|
||||
ddmax235 max -12345678901 1 -> 1
|
||||
ddmax236 max 1 -12345678901 -> 1
|
||||
ddmax237 max -1234567896 1 -> 1
|
||||
ddmax238 max 1 -1234567896 -> 1
|
||||
|
||||
-- from examples
|
||||
ddmax280 max '3' '2' -> '3'
|
||||
ddmax281 max '-10' '3' -> '3'
|
||||
ddmax282 max '1.0' '1' -> '1'
|
||||
ddmax283 max '1' '1.0' -> '1'
|
||||
ddmax284 max '7' 'NaN' -> '7'
|
||||
|
||||
-- expanded list from min/max 754r purple prose
|
||||
-- [explicit tests for exponent ordering]
|
||||
ddmax401 max Inf 1.1 -> Infinity
|
||||
ddmax402 max 1.1 1 -> 1.1
|
||||
ddmax403 max 1 1.0 -> 1
|
||||
ddmax404 max 1.0 0.1 -> 1.0
|
||||
ddmax405 max 0.1 0.10 -> 0.1
|
||||
ddmax406 max 0.10 0.100 -> 0.10
|
||||
ddmax407 max 0.10 0 -> 0.10
|
||||
ddmax408 max 0 0.0 -> 0
|
||||
ddmax409 max 0.0 -0 -> 0.0
|
||||
ddmax410 max 0.0 -0.0 -> 0.0
|
||||
ddmax411 max 0.00 -0.0 -> 0.00
|
||||
ddmax412 max 0.0 -0.00 -> 0.0
|
||||
ddmax413 max 0 -0.0 -> 0
|
||||
ddmax414 max 0 -0 -> 0
|
||||
ddmax415 max -0.0 -0 -> -0.0
|
||||
ddmax416 max -0 -0.100 -> -0
|
||||
ddmax417 max -0.100 -0.10 -> -0.100
|
||||
ddmax418 max -0.10 -0.1 -> -0.10
|
||||
ddmax419 max -0.1 -1.0 -> -0.1
|
||||
ddmax420 max -1.0 -1 -> -1.0
|
||||
ddmax421 max -1 -1.1 -> -1
|
||||
ddmax423 max -1.1 -Inf -> -1.1
|
||||
-- same with operands reversed
|
||||
ddmax431 max 1.1 Inf -> Infinity
|
||||
ddmax432 max 1 1.1 -> 1.1
|
||||
ddmax433 max 1.0 1 -> 1
|
||||
ddmax434 max 0.1 1.0 -> 1.0
|
||||
ddmax435 max 0.10 0.1 -> 0.1
|
||||
ddmax436 max 0.100 0.10 -> 0.10
|
||||
ddmax437 max 0 0.10 -> 0.10
|
||||
ddmax438 max 0.0 0 -> 0
|
||||
ddmax439 max -0 0.0 -> 0.0
|
||||
ddmax440 max -0.0 0.0 -> 0.0
|
||||
ddmax441 max -0.0 0.00 -> 0.00
|
||||
ddmax442 max -0.00 0.0 -> 0.0
|
||||
ddmax443 max -0.0 0 -> 0
|
||||
ddmax444 max -0 0 -> 0
|
||||
ddmax445 max -0 -0.0 -> -0.0
|
||||
ddmax446 max -0.100 -0 -> -0
|
||||
ddmax447 max -0.10 -0.100 -> -0.100
|
||||
ddmax448 max -0.1 -0.10 -> -0.10
|
||||
ddmax449 max -1.0 -0.1 -> -0.1
|
||||
ddmax450 max -1 -1.0 -> -1.0
|
||||
ddmax451 max -1.1 -1 -> -1
|
||||
ddmax453 max -Inf -1.1 -> -1.1
|
||||
-- largies
|
||||
ddmax460 max 1000 1E+3 -> 1E+3
|
||||
ddmax461 max 1E+3 1000 -> 1E+3
|
||||
ddmax462 max 1000 -1E+3 -> 1000
|
||||
ddmax463 max 1E+3 -1000 -> 1E+3
|
||||
ddmax464 max -1000 1E+3 -> 1E+3
|
||||
ddmax465 max -1E+3 1000 -> 1000
|
||||
ddmax466 max -1000 -1E+3 -> -1000
|
||||
ddmax467 max -1E+3 -1000 -> -1000
|
||||
|
||||
-- misalignment traps for little-endian
|
||||
ddmax471 max 1.0 0.1 -> 1.0
|
||||
ddmax472 max 0.1 1.0 -> 1.0
|
||||
ddmax473 max 10.0 0.1 -> 10.0
|
||||
ddmax474 max 0.1 10.0 -> 10.0
|
||||
ddmax475 max 100 1.0 -> 100
|
||||
ddmax476 max 1.0 100 -> 100
|
||||
ddmax477 max 1000 10.0 -> 1000
|
||||
ddmax478 max 10.0 1000 -> 1000
|
||||
ddmax479 max 10000 100.0 -> 10000
|
||||
ddmax480 max 100.0 10000 -> 10000
|
||||
ddmax481 max 100000 1000.0 -> 100000
|
||||
ddmax482 max 1000.0 100000 -> 100000
|
||||
ddmax483 max 1000000 10000.0 -> 1000000
|
||||
ddmax484 max 10000.0 1000000 -> 1000000
|
||||
|
||||
-- subnormals
|
||||
ddmax510 max 1.00E-383 0 -> 1.00E-383
|
||||
ddmax511 max 0.1E-383 0 -> 1E-384 Subnormal
|
||||
ddmax512 max 0.10E-383 0 -> 1.0E-384 Subnormal
|
||||
ddmax513 max 0.100E-383 0 -> 1.00E-384 Subnormal
|
||||
ddmax514 max 0.01E-383 0 -> 1E-385 Subnormal
|
||||
ddmax515 max 0.999E-383 0 -> 9.99E-384 Subnormal
|
||||
ddmax516 max 0.099E-383 0 -> 9.9E-385 Subnormal
|
||||
ddmax517 max 0.009E-383 0 -> 9E-386 Subnormal
|
||||
ddmax518 max 0.001E-383 0 -> 1E-386 Subnormal
|
||||
ddmax519 max 0.0009E-383 0 -> 9E-387 Subnormal
|
||||
ddmax520 max 0.0001E-383 0 -> 1E-387 Subnormal
|
||||
|
||||
ddmax530 max -1.00E-383 0 -> 0
|
||||
ddmax531 max -0.1E-383 0 -> 0
|
||||
ddmax532 max -0.10E-383 0 -> 0
|
||||
ddmax533 max -0.100E-383 0 -> 0
|
||||
ddmax534 max -0.01E-383 0 -> 0
|
||||
ddmax535 max -0.999E-383 0 -> 0
|
||||
ddmax536 max -0.099E-383 0 -> 0
|
||||
ddmax537 max -0.009E-383 0 -> 0
|
||||
ddmax538 max -0.001E-383 0 -> 0
|
||||
ddmax539 max -0.0009E-383 0 -> 0
|
||||
ddmax540 max -0.0001E-383 0 -> 0
|
||||
|
||||
-- Null tests
|
||||
ddmax900 max 10 # -> NaN Invalid_operation
|
||||
ddmax901 max # 10 -> NaN Invalid_operation
|
||||
|
||||
|
||||
|
@@ -0,0 +1,304 @@
|
||||
------------------------------------------------------------------------
|
||||
-- ddMaxMag.decTest -- decDouble maxnummag --
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
-- we assume that base comparison is tested in compare.decTest, so
|
||||
-- these mainly cover special cases and rounding
|
||||
precision: 16
|
||||
maxExponent: 384
|
||||
minExponent: -383
|
||||
extended: 1
|
||||
clamp: 1
|
||||
rounding: half_even
|
||||
|
||||
-- sanity checks
|
||||
ddmxg001 maxmag -2 -2 -> -2
|
||||
ddmxg002 maxmag -2 -1 -> -2
|
||||
ddmxg003 maxmag -2 0 -> -2
|
||||
ddmxg004 maxmag -2 1 -> -2
|
||||
ddmxg005 maxmag -2 2 -> 2
|
||||
ddmxg006 maxmag -1 -2 -> -2
|
||||
ddmxg007 maxmag -1 -1 -> -1
|
||||
ddmxg008 maxmag -1 0 -> -1
|
||||
ddmxg009 maxmag -1 1 -> 1
|
||||
ddmxg010 maxmag -1 2 -> 2
|
||||
ddmxg011 maxmag 0 -2 -> -2
|
||||
ddmxg012 maxmag 0 -1 -> -1
|
||||
ddmxg013 maxmag 0 0 -> 0
|
||||
ddmxg014 maxmag 0 1 -> 1
|
||||
ddmxg015 maxmag 0 2 -> 2
|
||||
ddmxg016 maxmag 1 -2 -> -2
|
||||
ddmxg017 maxmag 1 -1 -> 1
|
||||
ddmxg018 maxmag 1 0 -> 1
|
||||
ddmxg019 maxmag 1 1 -> 1
|
||||
ddmxg020 maxmag 1 2 -> 2
|
||||
ddmxg021 maxmag 2 -2 -> 2
|
||||
ddmxg022 maxmag 2 -1 -> 2
|
||||
ddmxg023 maxmag 2 0 -> 2
|
||||
ddmxg025 maxmag 2 1 -> 2
|
||||
ddmxg026 maxmag 2 2 -> 2
|
||||
|
||||
-- extended zeros
|
||||
ddmxg030 maxmag 0 0 -> 0
|
||||
ddmxg031 maxmag 0 -0 -> 0
|
||||
ddmxg032 maxmag 0 -0.0 -> 0
|
||||
ddmxg033 maxmag 0 0.0 -> 0
|
||||
ddmxg034 maxmag -0 0 -> 0 -- note: -0 = 0, but 0 chosen
|
||||
ddmxg035 maxmag -0 -0 -> -0
|
||||
ddmxg036 maxmag -0 -0.0 -> -0.0
|
||||
ddmxg037 maxmag -0 0.0 -> 0.0
|
||||
ddmxg038 maxmag 0.0 0 -> 0
|
||||
ddmxg039 maxmag 0.0 -0 -> 0.0
|
||||
ddmxg040 maxmag 0.0 -0.0 -> 0.0
|
||||
ddmxg041 maxmag 0.0 0.0 -> 0.0
|
||||
ddmxg042 maxmag -0.0 0 -> 0
|
||||
ddmxg043 maxmag -0.0 -0 -> -0.0
|
||||
ddmxg044 maxmag -0.0 -0.0 -> -0.0
|
||||
ddmxg045 maxmag -0.0 0.0 -> 0.0
|
||||
|
||||
ddmxg050 maxmag -0E1 0E1 -> 0E+1
|
||||
ddmxg051 maxmag -0E2 0E2 -> 0E+2
|
||||
ddmxg052 maxmag -0E2 0E1 -> 0E+1
|
||||
ddmxg053 maxmag -0E1 0E2 -> 0E+2
|
||||
ddmxg054 maxmag 0E1 -0E1 -> 0E+1
|
||||
ddmxg055 maxmag 0E2 -0E2 -> 0E+2
|
||||
ddmxg056 maxmag 0E2 -0E1 -> 0E+2
|
||||
ddmxg057 maxmag 0E1 -0E2 -> 0E+1
|
||||
|
||||
ddmxg058 maxmag 0E1 0E1 -> 0E+1
|
||||
ddmxg059 maxmag 0E2 0E2 -> 0E+2
|
||||
ddmxg060 maxmag 0E2 0E1 -> 0E+2
|
||||
ddmxg061 maxmag 0E1 0E2 -> 0E+2
|
||||
ddmxg062 maxmag -0E1 -0E1 -> -0E+1
|
||||
ddmxg063 maxmag -0E2 -0E2 -> -0E+2
|
||||
ddmxg064 maxmag -0E2 -0E1 -> -0E+1
|
||||
ddmxg065 maxmag -0E1 -0E2 -> -0E+1
|
||||
|
||||
-- Specials
|
||||
ddmxg090 maxmag Inf -Inf -> Infinity
|
||||
ddmxg091 maxmag Inf -1000 -> Infinity
|
||||
ddmxg092 maxmag Inf -1 -> Infinity
|
||||
ddmxg093 maxmag Inf -0 -> Infinity
|
||||
ddmxg094 maxmag Inf 0 -> Infinity
|
||||
ddmxg095 maxmag Inf 1 -> Infinity
|
||||
ddmxg096 maxmag Inf 1000 -> Infinity
|
||||
ddmxg097 maxmag Inf Inf -> Infinity
|
||||
ddmxg098 maxmag -1000 Inf -> Infinity
|
||||
ddmxg099 maxmag -Inf Inf -> Infinity
|
||||
ddmxg100 maxmag -1 Inf -> Infinity
|
||||
ddmxg101 maxmag -0 Inf -> Infinity
|
||||
ddmxg102 maxmag 0 Inf -> Infinity
|
||||
ddmxg103 maxmag 1 Inf -> Infinity
|
||||
ddmxg104 maxmag 1000 Inf -> Infinity
|
||||
ddmxg105 maxmag Inf Inf -> Infinity
|
||||
|
||||
ddmxg120 maxmag -Inf -Inf -> -Infinity
|
||||
ddmxg121 maxmag -Inf -1000 -> -Infinity
|
||||
ddmxg122 maxmag -Inf -1 -> -Infinity
|
||||
ddmxg123 maxmag -Inf -0 -> -Infinity
|
||||
ddmxg124 maxmag -Inf 0 -> -Infinity
|
||||
ddmxg125 maxmag -Inf 1 -> -Infinity
|
||||
ddmxg126 maxmag -Inf 1000 -> -Infinity
|
||||
ddmxg127 maxmag -Inf Inf -> Infinity
|
||||
ddmxg128 maxmag -Inf -Inf -> -Infinity
|
||||
ddmxg129 maxmag -1000 -Inf -> -Infinity
|
||||
ddmxg130 maxmag -1 -Inf -> -Infinity
|
||||
ddmxg131 maxmag -0 -Inf -> -Infinity
|
||||
ddmxg132 maxmag 0 -Inf -> -Infinity
|
||||
ddmxg133 maxmag 1 -Inf -> -Infinity
|
||||
ddmxg134 maxmag 1000 -Inf -> -Infinity
|
||||
ddmxg135 maxmag Inf -Inf -> Infinity
|
||||
|
||||
-- 2004.08.02 754r chooses number over NaN in mixed cases
|
||||
ddmxg141 maxmag NaN -Inf -> -Infinity
|
||||
ddmxg142 maxmag NaN -1000 -> -1000
|
||||
ddmxg143 maxmag NaN -1 -> -1
|
||||
ddmxg144 maxmag NaN -0 -> -0
|
||||
ddmxg145 maxmag NaN 0 -> 0
|
||||
ddmxg146 maxmag NaN 1 -> 1
|
||||
ddmxg147 maxmag NaN 1000 -> 1000
|
||||
ddmxg148 maxmag NaN Inf -> Infinity
|
||||
ddmxg149 maxmag NaN NaN -> NaN
|
||||
ddmxg150 maxmag -Inf NaN -> -Infinity
|
||||
ddmxg151 maxmag -1000 NaN -> -1000
|
||||
ddmxg152 maxmag -1 NaN -> -1
|
||||
ddmxg153 maxmag -0 NaN -> -0
|
||||
ddmxg154 maxmag 0 NaN -> 0
|
||||
ddmxg155 maxmag 1 NaN -> 1
|
||||
ddmxg156 maxmag 1000 NaN -> 1000
|
||||
ddmxg157 maxmag Inf NaN -> Infinity
|
||||
|
||||
ddmxg161 maxmag sNaN -Inf -> NaN Invalid_operation
|
||||
ddmxg162 maxmag sNaN -1000 -> NaN Invalid_operation
|
||||
ddmxg163 maxmag sNaN -1 -> NaN Invalid_operation
|
||||
ddmxg164 maxmag sNaN -0 -> NaN Invalid_operation
|
||||
ddmxg165 maxmag sNaN 0 -> NaN Invalid_operation
|
||||
ddmxg166 maxmag sNaN 1 -> NaN Invalid_operation
|
||||
ddmxg167 maxmag sNaN 1000 -> NaN Invalid_operation
|
||||
ddmxg168 maxmag sNaN NaN -> NaN Invalid_operation
|
||||
ddmxg169 maxmag sNaN sNaN -> NaN Invalid_operation
|
||||
ddmxg170 maxmag NaN sNaN -> NaN Invalid_operation
|
||||
ddmxg171 maxmag -Inf sNaN -> NaN Invalid_operation
|
||||
ddmxg172 maxmag -1000 sNaN -> NaN Invalid_operation
|
||||
ddmxg173 maxmag -1 sNaN -> NaN Invalid_operation
|
||||
ddmxg174 maxmag -0 sNaN -> NaN Invalid_operation
|
||||
ddmxg175 maxmag 0 sNaN -> NaN Invalid_operation
|
||||
ddmxg176 maxmag 1 sNaN -> NaN Invalid_operation
|
||||
ddmxg177 maxmag 1000 sNaN -> NaN Invalid_operation
|
||||
ddmxg178 maxmag Inf sNaN -> NaN Invalid_operation
|
||||
ddmxg179 maxmag NaN sNaN -> NaN Invalid_operation
|
||||
|
||||
-- propagating NaNs
|
||||
ddmxg181 maxmag NaN9 -Inf -> -Infinity
|
||||
ddmxg182 maxmag NaN8 9 -> 9
|
||||
ddmxg183 maxmag -NaN7 Inf -> Infinity
|
||||
|
||||
ddmxg184 maxmag -NaN1 NaN11 -> -NaN1
|
||||
ddmxg185 maxmag NaN2 NaN12 -> NaN2
|
||||
ddmxg186 maxmag -NaN13 -NaN7 -> -NaN13
|
||||
ddmxg187 maxmag NaN14 -NaN5 -> NaN14
|
||||
|
||||
ddmxg188 maxmag -Inf NaN4 -> -Infinity
|
||||
ddmxg189 maxmag -9 -NaN3 -> -9
|
||||
ddmxg190 maxmag Inf NaN2 -> Infinity
|
||||
|
||||
ddmxg191 maxmag sNaN99 -Inf -> NaN99 Invalid_operation
|
||||
ddmxg192 maxmag sNaN98 -1 -> NaN98 Invalid_operation
|
||||
ddmxg193 maxmag -sNaN97 NaN -> -NaN97 Invalid_operation
|
||||
ddmxg194 maxmag sNaN96 sNaN94 -> NaN96 Invalid_operation
|
||||
ddmxg195 maxmag NaN95 sNaN93 -> NaN93 Invalid_operation
|
||||
ddmxg196 maxmag -Inf sNaN92 -> NaN92 Invalid_operation
|
||||
ddmxg197 maxmag 0 sNaN91 -> NaN91 Invalid_operation
|
||||
ddmxg198 maxmag Inf -sNaN90 -> -NaN90 Invalid_operation
|
||||
ddmxg199 maxmag NaN sNaN89 -> NaN89 Invalid_operation
|
||||
|
||||
-- old rounding checks
|
||||
ddmxg221 maxmag 12345678000 1 -> 12345678000
|
||||
ddmxg222 maxmag 1 12345678000 -> 12345678000
|
||||
ddmxg223 maxmag 1234567800 1 -> 1234567800
|
||||
ddmxg224 maxmag 1 1234567800 -> 1234567800
|
||||
ddmxg225 maxmag 1234567890 1 -> 1234567890
|
||||
ddmxg226 maxmag 1 1234567890 -> 1234567890
|
||||
ddmxg227 maxmag 1234567891 1 -> 1234567891
|
||||
ddmxg228 maxmag 1 1234567891 -> 1234567891
|
||||
ddmxg229 maxmag 12345678901 1 -> 12345678901
|
||||
ddmxg230 maxmag 1 12345678901 -> 12345678901
|
||||
ddmxg231 maxmag 1234567896 1 -> 1234567896
|
||||
ddmxg232 maxmag 1 1234567896 -> 1234567896
|
||||
ddmxg233 maxmag -1234567891 1 -> -1234567891
|
||||
ddmxg234 maxmag 1 -1234567891 -> -1234567891
|
||||
ddmxg235 maxmag -12345678901 1 -> -12345678901
|
||||
ddmxg236 maxmag 1 -12345678901 -> -12345678901
|
||||
ddmxg237 maxmag -1234567896 1 -> -1234567896
|
||||
ddmxg238 maxmag 1 -1234567896 -> -1234567896
|
||||
|
||||
-- from examples
|
||||
ddmxg280 maxmag '3' '2' -> '3'
|
||||
ddmxg281 maxmag '-10' '3' -> '-10'
|
||||
ddmxg282 maxmag '1.0' '1' -> '1'
|
||||
ddmxg283 maxmag '1' '1.0' -> '1'
|
||||
ddmxg284 maxmag '7' 'NaN' -> '7'
|
||||
|
||||
-- expanded list from min/max 754r purple prose
|
||||
-- [explicit tests for exponent ordering]
|
||||
ddmxg401 maxmag Inf 1.1 -> Infinity
|
||||
ddmxg402 maxmag 1.1 1 -> 1.1
|
||||
ddmxg403 maxmag 1 1.0 -> 1
|
||||
ddmxg404 maxmag 1.0 0.1 -> 1.0
|
||||
ddmxg405 maxmag 0.1 0.10 -> 0.1
|
||||
ddmxg406 maxmag 0.10 0.100 -> 0.10
|
||||
ddmxg407 maxmag 0.10 0 -> 0.10
|
||||
ddmxg408 maxmag 0 0.0 -> 0
|
||||
ddmxg409 maxmag 0.0 -0 -> 0.0
|
||||
ddmxg410 maxmag 0.0 -0.0 -> 0.0
|
||||
ddmxg411 maxmag 0.00 -0.0 -> 0.00
|
||||
ddmxg412 maxmag 0.0 -0.00 -> 0.0
|
||||
ddmxg413 maxmag 0 -0.0 -> 0
|
||||
ddmxg414 maxmag 0 -0 -> 0
|
||||
ddmxg415 maxmag -0.0 -0 -> -0.0
|
||||
ddmxg416 maxmag -0 -0.100 -> -0.100
|
||||
ddmxg417 maxmag -0.100 -0.10 -> -0.100
|
||||
ddmxg418 maxmag -0.10 -0.1 -> -0.10
|
||||
ddmxg419 maxmag -0.1 -1.0 -> -1.0
|
||||
ddmxg420 maxmag -1.0 -1 -> -1.0
|
||||
ddmxg421 maxmag -1 -1.1 -> -1.1
|
||||
ddmxg423 maxmag -1.1 -Inf -> -Infinity
|
||||
-- same with operands reversed
|
||||
ddmxg431 maxmag 1.1 Inf -> Infinity
|
||||
ddmxg432 maxmag 1 1.1 -> 1.1
|
||||
ddmxg433 maxmag 1.0 1 -> 1
|
||||
ddmxg434 maxmag 0.1 1.0 -> 1.0
|
||||
ddmxg435 maxmag 0.10 0.1 -> 0.1
|
||||
ddmxg436 maxmag 0.100 0.10 -> 0.10
|
||||
ddmxg437 maxmag 0 0.10 -> 0.10
|
||||
ddmxg438 maxmag 0.0 0 -> 0
|
||||
ddmxg439 maxmag -0 0.0 -> 0.0
|
||||
ddmxg440 maxmag -0.0 0.0 -> 0.0
|
||||
ddmxg441 maxmag -0.0 0.00 -> 0.00
|
||||
ddmxg442 maxmag -0.00 0.0 -> 0.0
|
||||
ddmxg443 maxmag -0.0 0 -> 0
|
||||
ddmxg444 maxmag -0 0 -> 0
|
||||
ddmxg445 maxmag -0 -0.0 -> -0.0
|
||||
ddmxg446 maxmag -0.100 -0 -> -0.100
|
||||
ddmxg447 maxmag -0.10 -0.100 -> -0.100
|
||||
ddmxg448 maxmag -0.1 -0.10 -> -0.10
|
||||
ddmxg449 maxmag -1.0 -0.1 -> -1.0
|
||||
ddmxg450 maxmag -1 -1.0 -> -1.0
|
||||
ddmxg451 maxmag -1.1 -1 -> -1.1
|
||||
ddmxg453 maxmag -Inf -1.1 -> -Infinity
|
||||
-- largies
|
||||
ddmxg460 maxmag 1000 1E+3 -> 1E+3
|
||||
ddmxg461 maxmag 1E+3 1000 -> 1E+3
|
||||
ddmxg462 maxmag 1000 -1E+3 -> 1000
|
||||
ddmxg463 maxmag 1E+3 -1000 -> 1E+3
|
||||
ddmxg464 maxmag -1000 1E+3 -> 1E+3
|
||||
ddmxg465 maxmag -1E+3 1000 -> 1000
|
||||
ddmxg466 maxmag -1000 -1E+3 -> -1000
|
||||
ddmxg467 maxmag -1E+3 -1000 -> -1000
|
||||
|
||||
-- subnormals
|
||||
ddmxg510 maxmag 1.00E-383 0 -> 1.00E-383
|
||||
ddmxg511 maxmag 0.1E-383 0 -> 1E-384 Subnormal
|
||||
ddmxg512 maxmag 0.10E-383 0 -> 1.0E-384 Subnormal
|
||||
ddmxg513 maxmag 0.100E-383 0 -> 1.00E-384 Subnormal
|
||||
ddmxg514 maxmag 0.01E-383 0 -> 1E-385 Subnormal
|
||||
ddmxg515 maxmag 0.999E-383 0 -> 9.99E-384 Subnormal
|
||||
ddmxg516 maxmag 0.099E-383 0 -> 9.9E-385 Subnormal
|
||||
ddmxg517 maxmag 0.009E-383 0 -> 9E-386 Subnormal
|
||||
ddmxg518 maxmag 0.001E-383 0 -> 1E-386 Subnormal
|
||||
ddmxg519 maxmag 0.0009E-383 0 -> 9E-387 Subnormal
|
||||
ddmxg520 maxmag 0.0001E-383 0 -> 1E-387 Subnormal
|
||||
|
||||
ddmxg530 maxmag -1.00E-383 0 -> -1.00E-383
|
||||
ddmxg531 maxmag -0.1E-383 0 -> -1E-384 Subnormal
|
||||
ddmxg532 maxmag -0.10E-383 0 -> -1.0E-384 Subnormal
|
||||
ddmxg533 maxmag -0.100E-383 0 -> -1.00E-384 Subnormal
|
||||
ddmxg534 maxmag -0.01E-383 0 -> -1E-385 Subnormal
|
||||
ddmxg535 maxmag -0.999E-383 0 -> -9.99E-384 Subnormal
|
||||
ddmxg536 maxmag -0.099E-383 0 -> -9.9E-385 Subnormal
|
||||
ddmxg537 maxmag -0.009E-383 0 -> -9E-386 Subnormal
|
||||
ddmxg538 maxmag -0.001E-383 0 -> -1E-386 Subnormal
|
||||
ddmxg539 maxmag -0.0009E-383 0 -> -9E-387 Subnormal
|
||||
ddmxg540 maxmag -0.0001E-383 0 -> -1E-387 Subnormal
|
||||
|
||||
-- Null tests
|
||||
ddmxg900 maxmag 10 # -> NaN Invalid_operation
|
||||
ddmxg901 maxmag # 10 -> NaN Invalid_operation
|
||||
|
@@ -0,0 +1,309 @@
|
||||
------------------------------------------------------------------------
|
||||
-- ddMin.decTest -- decDouble minnum --
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
-- we assume that base comparison is tested in compare.decTest, so
|
||||
-- these mainly cover special cases and rounding
|
||||
precision: 16
|
||||
maxExponent: 384
|
||||
minExponent: -383
|
||||
extended: 1
|
||||
clamp: 1
|
||||
rounding: half_even
|
||||
|
||||
-- sanity checks
|
||||
ddmin001 min -2 -2 -> -2
|
||||
ddmin002 min -2 -1 -> -2
|
||||
ddmin003 min -2 0 -> -2
|
||||
ddmin004 min -2 1 -> -2
|
||||
ddmin005 min -2 2 -> -2
|
||||
ddmin006 min -1 -2 -> -2
|
||||
ddmin007 min -1 -1 -> -1
|
||||
ddmin008 min -1 0 -> -1
|
||||
ddmin009 min -1 1 -> -1
|
||||
ddmin010 min -1 2 -> -1
|
||||
ddmin011 min 0 -2 -> -2
|
||||
ddmin012 min 0 -1 -> -1
|
||||
ddmin013 min 0 0 -> 0
|
||||
ddmin014 min 0 1 -> 0
|
||||
ddmin015 min 0 2 -> 0
|
||||
ddmin016 min 1 -2 -> -2
|
||||
ddmin017 min 1 -1 -> -1
|
||||
ddmin018 min 1 0 -> 0
|
||||
ddmin019 min 1 1 -> 1
|
||||
ddmin020 min 1 2 -> 1
|
||||
ddmin021 min 2 -2 -> -2
|
||||
ddmin022 min 2 -1 -> -1
|
||||
ddmin023 min 2 0 -> 0
|
||||
ddmin025 min 2 1 -> 1
|
||||
ddmin026 min 2 2 -> 2
|
||||
|
||||
-- extended zeros
|
||||
ddmin030 min 0 0 -> 0
|
||||
ddmin031 min 0 -0 -> -0
|
||||
ddmin032 min 0 -0.0 -> -0.0
|
||||
ddmin033 min 0 0.0 -> 0.0
|
||||
ddmin034 min -0 0 -> -0
|
||||
ddmin035 min -0 -0 -> -0
|
||||
ddmin036 min -0 -0.0 -> -0
|
||||
ddmin037 min -0 0.0 -> -0
|
||||
ddmin038 min 0.0 0 -> 0.0
|
||||
ddmin039 min 0.0 -0 -> -0
|
||||
ddmin040 min 0.0 -0.0 -> -0.0
|
||||
ddmin041 min 0.0 0.0 -> 0.0
|
||||
ddmin042 min -0.0 0 -> -0.0
|
||||
ddmin043 min -0.0 -0 -> -0
|
||||
ddmin044 min -0.0 -0.0 -> -0.0
|
||||
ddmin045 min -0.0 0.0 -> -0.0
|
||||
|
||||
ddmin046 min 0E1 -0E1 -> -0E+1
|
||||
ddmin047 min -0E1 0E2 -> -0E+1
|
||||
ddmin048 min 0E2 0E1 -> 0E+1
|
||||
ddmin049 min 0E1 0E2 -> 0E+1
|
||||
ddmin050 min -0E3 -0E2 -> -0E+3
|
||||
ddmin051 min -0E2 -0E3 -> -0E+3
|
||||
|
||||
-- Specials
|
||||
ddmin090 min Inf -Inf -> -Infinity
|
||||
ddmin091 min Inf -1000 -> -1000
|
||||
ddmin092 min Inf -1 -> -1
|
||||
ddmin093 min Inf -0 -> -0
|
||||
ddmin094 min Inf 0 -> 0
|
||||
ddmin095 min Inf 1 -> 1
|
||||
ddmin096 min Inf 1000 -> 1000
|
||||
ddmin097 min Inf Inf -> Infinity
|
||||
ddmin098 min -1000 Inf -> -1000
|
||||
ddmin099 min -Inf Inf -> -Infinity
|
||||
ddmin100 min -1 Inf -> -1
|
||||
ddmin101 min -0 Inf -> -0
|
||||
ddmin102 min 0 Inf -> 0
|
||||
ddmin103 min 1 Inf -> 1
|
||||
ddmin104 min 1000 Inf -> 1000
|
||||
ddmin105 min Inf Inf -> Infinity
|
||||
|
||||
ddmin120 min -Inf -Inf -> -Infinity
|
||||
ddmin121 min -Inf -1000 -> -Infinity
|
||||
ddmin122 min -Inf -1 -> -Infinity
|
||||
ddmin123 min -Inf -0 -> -Infinity
|
||||
ddmin124 min -Inf 0 -> -Infinity
|
||||
ddmin125 min -Inf 1 -> -Infinity
|
||||
ddmin126 min -Inf 1000 -> -Infinity
|
||||
ddmin127 min -Inf Inf -> -Infinity
|
||||
ddmin128 min -Inf -Inf -> -Infinity
|
||||
ddmin129 min -1000 -Inf -> -Infinity
|
||||
ddmin130 min -1 -Inf -> -Infinity
|
||||
ddmin131 min -0 -Inf -> -Infinity
|
||||
ddmin132 min 0 -Inf -> -Infinity
|
||||
ddmin133 min 1 -Inf -> -Infinity
|
||||
ddmin134 min 1000 -Inf -> -Infinity
|
||||
ddmin135 min Inf -Inf -> -Infinity
|
||||
|
||||
-- 2004.08.02 754r chooses number over NaN in mixed cases
|
||||
ddmin141 min NaN -Inf -> -Infinity
|
||||
ddmin142 min NaN -1000 -> -1000
|
||||
ddmin143 min NaN -1 -> -1
|
||||
ddmin144 min NaN -0 -> -0
|
||||
ddmin145 min NaN 0 -> 0
|
||||
ddmin146 min NaN 1 -> 1
|
||||
ddmin147 min NaN 1000 -> 1000
|
||||
ddmin148 min NaN Inf -> Infinity
|
||||
ddmin149 min NaN NaN -> NaN
|
||||
ddmin150 min -Inf NaN -> -Infinity
|
||||
ddmin151 min -1000 NaN -> -1000
|
||||
ddmin152 min -1 -NaN -> -1
|
||||
ddmin153 min -0 NaN -> -0
|
||||
ddmin154 min 0 -NaN -> 0
|
||||
ddmin155 min 1 NaN -> 1
|
||||
ddmin156 min 1000 NaN -> 1000
|
||||
ddmin157 min Inf NaN -> Infinity
|
||||
|
||||
ddmin161 min sNaN -Inf -> NaN Invalid_operation
|
||||
ddmin162 min sNaN -1000 -> NaN Invalid_operation
|
||||
ddmin163 min sNaN -1 -> NaN Invalid_operation
|
||||
ddmin164 min sNaN -0 -> NaN Invalid_operation
|
||||
ddmin165 min -sNaN 0 -> -NaN Invalid_operation
|
||||
ddmin166 min -sNaN 1 -> -NaN Invalid_operation
|
||||
ddmin167 min sNaN 1000 -> NaN Invalid_operation
|
||||
ddmin168 min sNaN NaN -> NaN Invalid_operation
|
||||
ddmin169 min sNaN sNaN -> NaN Invalid_operation
|
||||
ddmin170 min NaN sNaN -> NaN Invalid_operation
|
||||
ddmin171 min -Inf sNaN -> NaN Invalid_operation
|
||||
ddmin172 min -1000 sNaN -> NaN Invalid_operation
|
||||
ddmin173 min -1 sNaN -> NaN Invalid_operation
|
||||
ddmin174 min -0 sNaN -> NaN Invalid_operation
|
||||
ddmin175 min 0 sNaN -> NaN Invalid_operation
|
||||
ddmin176 min 1 sNaN -> NaN Invalid_operation
|
||||
ddmin177 min 1000 sNaN -> NaN Invalid_operation
|
||||
ddmin178 min Inf sNaN -> NaN Invalid_operation
|
||||
ddmin179 min NaN sNaN -> NaN Invalid_operation
|
||||
|
||||
-- propagating NaNs
|
||||
ddmin181 min NaN9 -Inf -> -Infinity
|
||||
ddmin182 min -NaN8 9990 -> 9990
|
||||
ddmin183 min NaN71 Inf -> Infinity
|
||||
|
||||
ddmin184 min NaN1 NaN54 -> NaN1
|
||||
ddmin185 min NaN22 -NaN53 -> NaN22
|
||||
ddmin186 min -NaN3 NaN6 -> -NaN3
|
||||
ddmin187 min -NaN44 NaN7 -> -NaN44
|
||||
|
||||
ddmin188 min -Inf NaN41 -> -Infinity
|
||||
ddmin189 min -9999 -NaN33 -> -9999
|
||||
ddmin190 min Inf NaN2 -> Infinity
|
||||
|
||||
ddmin191 min sNaN99 -Inf -> NaN99 Invalid_operation
|
||||
ddmin192 min sNaN98 -11 -> NaN98 Invalid_operation
|
||||
ddmin193 min -sNaN97 NaN8 -> -NaN97 Invalid_operation
|
||||
ddmin194 min sNaN69 sNaN94 -> NaN69 Invalid_operation
|
||||
ddmin195 min NaN95 sNaN93 -> NaN93 Invalid_operation
|
||||
ddmin196 min -Inf sNaN92 -> NaN92 Invalid_operation
|
||||
ddmin197 min 088 sNaN91 -> NaN91 Invalid_operation
|
||||
ddmin198 min Inf -sNaN90 -> -NaN90 Invalid_operation
|
||||
ddmin199 min NaN sNaN86 -> NaN86 Invalid_operation
|
||||
|
||||
-- old rounding checks
|
||||
ddmin221 min -12345678000 1 -> -12345678000
|
||||
ddmin222 min 1 -12345678000 -> -12345678000
|
||||
ddmin223 min -1234567800 1 -> -1234567800
|
||||
ddmin224 min 1 -1234567800 -> -1234567800
|
||||
ddmin225 min -1234567890 1 -> -1234567890
|
||||
ddmin226 min 1 -1234567890 -> -1234567890
|
||||
ddmin227 min -1234567891 1 -> -1234567891
|
||||
ddmin228 min 1 -1234567891 -> -1234567891
|
||||
ddmin229 min -12345678901 1 -> -12345678901
|
||||
ddmin230 min 1 -12345678901 -> -12345678901
|
||||
ddmin231 min -1234567896 1 -> -1234567896
|
||||
ddmin232 min 1 -1234567896 -> -1234567896
|
||||
ddmin233 min 1234567891 1 -> 1
|
||||
ddmin234 min 1 1234567891 -> 1
|
||||
ddmin235 min 12345678901 1 -> 1
|
||||
ddmin236 min 1 12345678901 -> 1
|
||||
ddmin237 min 1234567896 1 -> 1
|
||||
ddmin238 min 1 1234567896 -> 1
|
||||
|
||||
-- from examples
|
||||
ddmin280 min '3' '2' -> '2'
|
||||
ddmin281 min '-10' '3' -> '-10'
|
||||
ddmin282 min '1.0' '1' -> '1.0'
|
||||
ddmin283 min '1' '1.0' -> '1.0'
|
||||
ddmin284 min '7' 'NaN' -> '7'
|
||||
|
||||
-- expanded list from min/max 754r purple prose
|
||||
-- [explicit tests for exponent ordering]
|
||||
ddmin401 min Inf 1.1 -> 1.1
|
||||
ddmin402 min 1.1 1 -> 1
|
||||
ddmin403 min 1 1.0 -> 1.0
|
||||
ddmin404 min 1.0 0.1 -> 0.1
|
||||
ddmin405 min 0.1 0.10 -> 0.10
|
||||
ddmin406 min 0.10 0.100 -> 0.100
|
||||
ddmin407 min 0.10 0 -> 0
|
||||
ddmin408 min 0 0.0 -> 0.0
|
||||
ddmin409 min 0.0 -0 -> -0
|
||||
ddmin410 min 0.0 -0.0 -> -0.0
|
||||
ddmin411 min 0.00 -0.0 -> -0.0
|
||||
ddmin412 min 0.0 -0.00 -> -0.00
|
||||
ddmin413 min 0 -0.0 -> -0.0
|
||||
ddmin414 min 0 -0 -> -0
|
||||
ddmin415 min -0.0 -0 -> -0
|
||||
ddmin416 min -0 -0.100 -> -0.100
|
||||
ddmin417 min -0.100 -0.10 -> -0.10
|
||||
ddmin418 min -0.10 -0.1 -> -0.1
|
||||
ddmin419 min -0.1 -1.0 -> -1.0
|
||||
ddmin420 min -1.0 -1 -> -1
|
||||
ddmin421 min -1 -1.1 -> -1.1
|
||||
ddmin423 min -1.1 -Inf -> -Infinity
|
||||
-- same with operands reversed
|
||||
ddmin431 min 1.1 Inf -> 1.1
|
||||
ddmin432 min 1 1.1 -> 1
|
||||
ddmin433 min 1.0 1 -> 1.0
|
||||
ddmin434 min 0.1 1.0 -> 0.1
|
||||
ddmin435 min 0.10 0.1 -> 0.10
|
||||
ddmin436 min 0.100 0.10 -> 0.100
|
||||
ddmin437 min 0 0.10 -> 0
|
||||
ddmin438 min 0.0 0 -> 0.0
|
||||
ddmin439 min -0 0.0 -> -0
|
||||
ddmin440 min -0.0 0.0 -> -0.0
|
||||
ddmin441 min -0.0 0.00 -> -0.0
|
||||
ddmin442 min -0.00 0.0 -> -0.00
|
||||
ddmin443 min -0.0 0 -> -0.0
|
||||
ddmin444 min -0 0 -> -0
|
||||
ddmin445 min -0 -0.0 -> -0
|
||||
ddmin446 min -0.100 -0 -> -0.100
|
||||
ddmin447 min -0.10 -0.100 -> -0.10
|
||||
ddmin448 min -0.1 -0.10 -> -0.1
|
||||
ddmin449 min -1.0 -0.1 -> -1.0
|
||||
ddmin450 min -1 -1.0 -> -1
|
||||
ddmin451 min -1.1 -1 -> -1.1
|
||||
ddmin453 min -Inf -1.1 -> -Infinity
|
||||
-- largies
|
||||
ddmin460 min 1000 1E+3 -> 1000
|
||||
ddmin461 min 1E+3 1000 -> 1000
|
||||
ddmin462 min 1000 -1E+3 -> -1E+3
|
||||
ddmin463 min 1E+3 -384 -> -384
|
||||
ddmin464 min -384 1E+3 -> -384
|
||||
ddmin465 min -1E+3 1000 -> -1E+3
|
||||
ddmin466 min -384 -1E+3 -> -1E+3
|
||||
ddmin467 min -1E+3 -384 -> -1E+3
|
||||
|
||||
-- misalignment traps for little-endian
|
||||
ddmin471 min 1.0 0.1 -> 0.1
|
||||
ddmin472 min 0.1 1.0 -> 0.1
|
||||
ddmin473 min 10.0 0.1 -> 0.1
|
||||
ddmin474 min 0.1 10.0 -> 0.1
|
||||
ddmin475 min 100 1.0 -> 1.0
|
||||
ddmin476 min 1.0 100 -> 1.0
|
||||
ddmin477 min 1000 10.0 -> 10.0
|
||||
ddmin478 min 10.0 1000 -> 10.0
|
||||
ddmin479 min 10000 100.0 -> 100.0
|
||||
ddmin480 min 100.0 10000 -> 100.0
|
||||
ddmin481 min 100000 1000.0 -> 1000.0
|
||||
ddmin482 min 1000.0 100000 -> 1000.0
|
||||
ddmin483 min 1000000 10000.0 -> 10000.0
|
||||
ddmin484 min 10000.0 1000000 -> 10000.0
|
||||
|
||||
-- subnormals
|
||||
ddmin510 min 1.00E-383 0 -> 0
|
||||
ddmin511 min 0.1E-383 0 -> 0
|
||||
ddmin512 min 0.10E-383 0 -> 0
|
||||
ddmin513 min 0.100E-383 0 -> 0
|
||||
ddmin514 min 0.01E-383 0 -> 0
|
||||
ddmin515 min 0.999E-383 0 -> 0
|
||||
ddmin516 min 0.099E-383 0 -> 0
|
||||
ddmin517 min 0.009E-383 0 -> 0
|
||||
ddmin518 min 0.001E-383 0 -> 0
|
||||
ddmin519 min 0.0009E-383 0 -> 0
|
||||
ddmin520 min 0.0001E-383 0 -> 0
|
||||
|
||||
ddmin530 min -1.00E-383 0 -> -1.00E-383
|
||||
ddmin531 min -0.1E-383 0 -> -1E-384 Subnormal
|
||||
ddmin532 min -0.10E-383 0 -> -1.0E-384 Subnormal
|
||||
ddmin533 min -0.100E-383 0 -> -1.00E-384 Subnormal
|
||||
ddmin534 min -0.01E-383 0 -> -1E-385 Subnormal
|
||||
ddmin535 min -0.999E-383 0 -> -9.99E-384 Subnormal
|
||||
ddmin536 min -0.099E-383 0 -> -9.9E-385 Subnormal
|
||||
ddmin537 min -0.009E-383 0 -> -9E-386 Subnormal
|
||||
ddmin538 min -0.001E-383 0 -> -1E-386 Subnormal
|
||||
ddmin539 min -0.0009E-383 0 -> -9E-387 Subnormal
|
||||
ddmin540 min -0.0001E-383 0 -> -1E-387 Subnormal
|
||||
|
||||
|
||||
-- Null tests
|
||||
ddmin900 min 10 # -> NaN Invalid_operation
|
||||
ddmin901 min # 10 -> NaN Invalid_operation
|
@@ -0,0 +1,293 @@
|
||||
------------------------------------------------------------------------
|
||||
-- ddMinMag.decTest -- decDouble minnummag --
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
-- we assume that base comparison is tested in compare.decTest, so
|
||||
-- these mainly cover special cases and rounding
|
||||
precision: 16
|
||||
maxExponent: 384
|
||||
minExponent: -383
|
||||
extended: 1
|
||||
clamp: 1
|
||||
rounding: half_even
|
||||
|
||||
-- sanity checks
|
||||
ddmng001 minmag -2 -2 -> -2
|
||||
ddmng002 minmag -2 -1 -> -1
|
||||
ddmng003 minmag -2 0 -> 0
|
||||
ddmng004 minmag -2 1 -> 1
|
||||
ddmng005 minmag -2 2 -> -2
|
||||
ddmng006 minmag -1 -2 -> -1
|
||||
ddmng007 minmag -1 -1 -> -1
|
||||
ddmng008 minmag -1 0 -> 0
|
||||
ddmng009 minmag -1 1 -> -1
|
||||
ddmng010 minmag -1 2 -> -1
|
||||
ddmng011 minmag 0 -2 -> 0
|
||||
ddmng012 minmag 0 -1 -> 0
|
||||
ddmng013 minmag 0 0 -> 0
|
||||
ddmng014 minmag 0 1 -> 0
|
||||
ddmng015 minmag 0 2 -> 0
|
||||
ddmng016 minmag 1 -2 -> 1
|
||||
ddmng017 minmag 1 -1 -> -1
|
||||
ddmng018 minmag 1 0 -> 0
|
||||
ddmng019 minmag 1 1 -> 1
|
||||
ddmng020 minmag 1 2 -> 1
|
||||
ddmng021 minmag 2 -2 -> -2
|
||||
ddmng022 minmag 2 -1 -> -1
|
||||
ddmng023 minmag 2 0 -> 0
|
||||
ddmng025 minmag 2 1 -> 1
|
||||
ddmng026 minmag 2 2 -> 2
|
||||
|
||||
-- extended zeros
|
||||
ddmng030 minmag 0 0 -> 0
|
||||
ddmng031 minmag 0 -0 -> -0
|
||||
ddmng032 minmag 0 -0.0 -> -0.0
|
||||
ddmng033 minmag 0 0.0 -> 0.0
|
||||
ddmng034 minmag -0 0 -> -0
|
||||
ddmng035 minmag -0 -0 -> -0
|
||||
ddmng036 minmag -0 -0.0 -> -0
|
||||
ddmng037 minmag -0 0.0 -> -0
|
||||
ddmng038 minmag 0.0 0 -> 0.0
|
||||
ddmng039 minmag 0.0 -0 -> -0
|
||||
ddmng040 minmag 0.0 -0.0 -> -0.0
|
||||
ddmng041 minmag 0.0 0.0 -> 0.0
|
||||
ddmng042 minmag -0.0 0 -> -0.0
|
||||
ddmng043 minmag -0.0 -0 -> -0
|
||||
ddmng044 minmag -0.0 -0.0 -> -0.0
|
||||
ddmng045 minmag -0.0 0.0 -> -0.0
|
||||
|
||||
ddmng046 minmag 0E1 -0E1 -> -0E+1
|
||||
ddmng047 minmag -0E1 0E2 -> -0E+1
|
||||
ddmng048 minmag 0E2 0E1 -> 0E+1
|
||||
ddmng049 minmag 0E1 0E2 -> 0E+1
|
||||
ddmng050 minmag -0E3 -0E2 -> -0E+3
|
||||
ddmng051 minmag -0E2 -0E3 -> -0E+3
|
||||
|
||||
-- Specials
|
||||
ddmng090 minmag Inf -Inf -> -Infinity
|
||||
ddmng091 minmag Inf -1000 -> -1000
|
||||
ddmng092 minmag Inf -1 -> -1
|
||||
ddmng093 minmag Inf -0 -> -0
|
||||
ddmng094 minmag Inf 0 -> 0
|
||||
ddmng095 minmag Inf 1 -> 1
|
||||
ddmng096 minmag Inf 1000 -> 1000
|
||||
ddmng097 minmag Inf Inf -> Infinity
|
||||
ddmng098 minmag -1000 Inf -> -1000
|
||||
ddmng099 minmag -Inf Inf -> -Infinity
|
||||
ddmng100 minmag -1 Inf -> -1
|
||||
ddmng101 minmag -0 Inf -> -0
|
||||
ddmng102 minmag 0 Inf -> 0
|
||||
ddmng103 minmag 1 Inf -> 1
|
||||
ddmng104 minmag 1000 Inf -> 1000
|
||||
ddmng105 minmag Inf Inf -> Infinity
|
||||
|
||||
ddmng120 minmag -Inf -Inf -> -Infinity
|
||||
ddmng121 minmag -Inf -1000 -> -1000
|
||||
ddmng122 minmag -Inf -1 -> -1
|
||||
ddmng123 minmag -Inf -0 -> -0
|
||||
ddmng124 minmag -Inf 0 -> 0
|
||||
ddmng125 minmag -Inf 1 -> 1
|
||||
ddmng126 minmag -Inf 1000 -> 1000
|
||||
ddmng127 minmag -Inf Inf -> -Infinity
|
||||
ddmng128 minmag -Inf -Inf -> -Infinity
|
||||
ddmng129 minmag -1000 -Inf -> -1000
|
||||
ddmng130 minmag -1 -Inf -> -1
|
||||
ddmng131 minmag -0 -Inf -> -0
|
||||
ddmng132 minmag 0 -Inf -> 0
|
||||
ddmng133 minmag 1 -Inf -> 1
|
||||
ddmng134 minmag 1000 -Inf -> 1000
|
||||
ddmng135 minmag Inf -Inf -> -Infinity
|
||||
|
||||
-- 2004.08.02 754r chooses number over NaN in mixed cases
|
||||
ddmng141 minmag NaN -Inf -> -Infinity
|
||||
ddmng142 minmag NaN -1000 -> -1000
|
||||
ddmng143 minmag NaN -1 -> -1
|
||||
ddmng144 minmag NaN -0 -> -0
|
||||
ddmng145 minmag NaN 0 -> 0
|
||||
ddmng146 minmag NaN 1 -> 1
|
||||
ddmng147 minmag NaN 1000 -> 1000
|
||||
ddmng148 minmag NaN Inf -> Infinity
|
||||
ddmng149 minmag NaN NaN -> NaN
|
||||
ddmng150 minmag -Inf NaN -> -Infinity
|
||||
ddmng151 minmag -1000 NaN -> -1000
|
||||
ddmng152 minmag -1 -NaN -> -1
|
||||
ddmng153 minmag -0 NaN -> -0
|
||||
ddmng154 minmag 0 -NaN -> 0
|
||||
ddmng155 minmag 1 NaN -> 1
|
||||
ddmng156 minmag 1000 NaN -> 1000
|
||||
ddmng157 minmag Inf NaN -> Infinity
|
||||
|
||||
ddmng161 minmag sNaN -Inf -> NaN Invalid_operation
|
||||
ddmng162 minmag sNaN -1000 -> NaN Invalid_operation
|
||||
ddmng163 minmag sNaN -1 -> NaN Invalid_operation
|
||||
ddmng164 minmag sNaN -0 -> NaN Invalid_operation
|
||||
ddmng165 minmag -sNaN 0 -> -NaN Invalid_operation
|
||||
ddmng166 minmag -sNaN 1 -> -NaN Invalid_operation
|
||||
ddmng167 minmag sNaN 1000 -> NaN Invalid_operation
|
||||
ddmng168 minmag sNaN NaN -> NaN Invalid_operation
|
||||
ddmng169 minmag sNaN sNaN -> NaN Invalid_operation
|
||||
ddmng170 minmag NaN sNaN -> NaN Invalid_operation
|
||||
ddmng171 minmag -Inf sNaN -> NaN Invalid_operation
|
||||
ddmng172 minmag -1000 sNaN -> NaN Invalid_operation
|
||||
ddmng173 minmag -1 sNaN -> NaN Invalid_operation
|
||||
ddmng174 minmag -0 sNaN -> NaN Invalid_operation
|
||||
ddmng175 minmag 0 sNaN -> NaN Invalid_operation
|
||||
ddmng176 minmag 1 sNaN -> NaN Invalid_operation
|
||||
ddmng177 minmag 1000 sNaN -> NaN Invalid_operation
|
||||
ddmng178 minmag Inf sNaN -> NaN Invalid_operation
|
||||
ddmng179 minmag NaN sNaN -> NaN Invalid_operation
|
||||
|
||||
-- propagating NaNs
|
||||
ddmng181 minmag NaN9 -Inf -> -Infinity
|
||||
ddmng182 minmag -NaN8 9990 -> 9990
|
||||
ddmng183 minmag NaN71 Inf -> Infinity
|
||||
|
||||
ddmng184 minmag NaN1 NaN54 -> NaN1
|
||||
ddmng185 minmag NaN22 -NaN53 -> NaN22
|
||||
ddmng186 minmag -NaN3 NaN6 -> -NaN3
|
||||
ddmng187 minmag -NaN44 NaN7 -> -NaN44
|
||||
|
||||
ddmng188 minmag -Inf NaN41 -> -Infinity
|
||||
ddmng189 minmag -9999 -NaN33 -> -9999
|
||||
ddmng190 minmag Inf NaN2 -> Infinity
|
||||
|
||||
ddmng191 minmag sNaN99 -Inf -> NaN99 Invalid_operation
|
||||
ddmng192 minmag sNaN98 -11 -> NaN98 Invalid_operation
|
||||
ddmng193 minmag -sNaN97 NaN8 -> -NaN97 Invalid_operation
|
||||
ddmng194 minmag sNaN69 sNaN94 -> NaN69 Invalid_operation
|
||||
ddmng195 minmag NaN95 sNaN93 -> NaN93 Invalid_operation
|
||||
ddmng196 minmag -Inf sNaN92 -> NaN92 Invalid_operation
|
||||
ddmng197 minmag 088 sNaN91 -> NaN91 Invalid_operation
|
||||
ddmng198 minmag Inf -sNaN90 -> -NaN90 Invalid_operation
|
||||
ddmng199 minmag NaN sNaN86 -> NaN86 Invalid_operation
|
||||
|
||||
-- old rounding checks
|
||||
ddmng221 minmag -12345678000 1 -> 1
|
||||
ddmng222 minmag 1 -12345678000 -> 1
|
||||
ddmng223 minmag -1234567800 1 -> 1
|
||||
ddmng224 minmag 1 -1234567800 -> 1
|
||||
ddmng225 minmag -1234567890 1 -> 1
|
||||
ddmng226 minmag 1 -1234567890 -> 1
|
||||
ddmng227 minmag -1234567891 1 -> 1
|
||||
ddmng228 minmag 1 -1234567891 -> 1
|
||||
ddmng229 minmag -12345678901 1 -> 1
|
||||
ddmng230 minmag 1 -12345678901 -> 1
|
||||
ddmng231 minmag -1234567896 1 -> 1
|
||||
ddmng232 minmag 1 -1234567896 -> 1
|
||||
ddmng233 minmag 1234567891 1 -> 1
|
||||
ddmng234 minmag 1 1234567891 -> 1
|
||||
ddmng235 minmag 12345678901 1 -> 1
|
||||
ddmng236 minmag 1 12345678901 -> 1
|
||||
ddmng237 minmag 1234567896 1 -> 1
|
||||
ddmng238 minmag 1 1234567896 -> 1
|
||||
|
||||
-- from examples
|
||||
ddmng280 minmag '3' '2' -> '2'
|
||||
ddmng281 minmag '-10' '3' -> '3'
|
||||
ddmng282 minmag '1.0' '1' -> '1.0'
|
||||
ddmng283 minmag '1' '1.0' -> '1.0'
|
||||
ddmng284 minmag '7' 'NaN' -> '7'
|
||||
|
||||
-- expanded list from min/max 754r purple prose
|
||||
-- [explicit tests for exponent ordering]
|
||||
ddmng401 minmag Inf 1.1 -> 1.1
|
||||
ddmng402 minmag 1.1 1 -> 1
|
||||
ddmng403 minmag 1 1.0 -> 1.0
|
||||
ddmng404 minmag 1.0 0.1 -> 0.1
|
||||
ddmng405 minmag 0.1 0.10 -> 0.10
|
||||
ddmng406 minmag 0.10 0.100 -> 0.100
|
||||
ddmng407 minmag 0.10 0 -> 0
|
||||
ddmng408 minmag 0 0.0 -> 0.0
|
||||
ddmng409 minmag 0.0 -0 -> -0
|
||||
ddmng410 minmag 0.0 -0.0 -> -0.0
|
||||
ddmng411 minmag 0.00 -0.0 -> -0.0
|
||||
ddmng412 minmag 0.0 -0.00 -> -0.00
|
||||
ddmng413 minmag 0 -0.0 -> -0.0
|
||||
ddmng414 minmag 0 -0 -> -0
|
||||
ddmng415 minmag -0.0 -0 -> -0
|
||||
ddmng416 minmag -0 -0.100 -> -0
|
||||
ddmng417 minmag -0.100 -0.10 -> -0.10
|
||||
ddmng418 minmag -0.10 -0.1 -> -0.1
|
||||
ddmng419 minmag -0.1 -1.0 -> -0.1
|
||||
ddmng420 minmag -1.0 -1 -> -1
|
||||
ddmng421 minmag -1 -1.1 -> -1
|
||||
ddmng423 minmag -1.1 -Inf -> -1.1
|
||||
-- same with operands reversed
|
||||
ddmng431 minmag 1.1 Inf -> 1.1
|
||||
ddmng432 minmag 1 1.1 -> 1
|
||||
ddmng433 minmag 1.0 1 -> 1.0
|
||||
ddmng434 minmag 0.1 1.0 -> 0.1
|
||||
ddmng435 minmag 0.10 0.1 -> 0.10
|
||||
ddmng436 minmag 0.100 0.10 -> 0.100
|
||||
ddmng437 minmag 0 0.10 -> 0
|
||||
ddmng438 minmag 0.0 0 -> 0.0
|
||||
ddmng439 minmag -0 0.0 -> -0
|
||||
ddmng440 minmag -0.0 0.0 -> -0.0
|
||||
ddmng441 minmag -0.0 0.00 -> -0.0
|
||||
ddmng442 minmag -0.00 0.0 -> -0.00
|
||||
ddmng443 minmag -0.0 0 -> -0.0
|
||||
ddmng444 minmag -0 0 -> -0
|
||||
ddmng445 minmag -0 -0.0 -> -0
|
||||
ddmng446 minmag -0.100 -0 -> -0
|
||||
ddmng447 minmag -0.10 -0.100 -> -0.10
|
||||
ddmng448 minmag -0.1 -0.10 -> -0.1
|
||||
ddmng449 minmag -1.0 -0.1 -> -0.1
|
||||
ddmng450 minmag -1 -1.0 -> -1
|
||||
ddmng451 minmag -1.1 -1 -> -1
|
||||
ddmng453 minmag -Inf -1.1 -> -1.1
|
||||
-- largies
|
||||
ddmng460 minmag 1000 1E+3 -> 1000
|
||||
ddmng461 minmag 1E+3 1000 -> 1000
|
||||
ddmng462 minmag 1000 -1E+3 -> -1E+3
|
||||
ddmng463 minmag 1E+3 -384 -> -384
|
||||
ddmng464 minmag -384 1E+3 -> -384
|
||||
ddmng465 minmag -1E+3 1000 -> -1E+3
|
||||
ddmng466 minmag -384 -1E+3 -> -384
|
||||
ddmng467 minmag -1E+3 -384 -> -384
|
||||
|
||||
-- subnormals
|
||||
ddmng510 minmag 1.00E-383 0 -> 0
|
||||
ddmng511 minmag 0.1E-383 0 -> 0
|
||||
ddmng512 minmag 0.10E-383 0 -> 0
|
||||
ddmng513 minmag 0.100E-383 0 -> 0
|
||||
ddmng514 minmag 0.01E-383 0 -> 0
|
||||
ddmng515 minmag 0.999E-383 0 -> 0
|
||||
ddmng516 minmag 0.099E-383 0 -> 0
|
||||
ddmng517 minmag 0.009E-383 0 -> 0
|
||||
ddmng518 minmag 0.001E-383 0 -> 0
|
||||
ddmng519 minmag 0.0009E-383 0 -> 0
|
||||
ddmng520 minmag 0.0001E-383 0 -> 0
|
||||
|
||||
ddmng530 minmag -1.00E-383 0 -> 0
|
||||
ddmng531 minmag -0.1E-383 0 -> 0
|
||||
ddmng532 minmag -0.10E-383 0 -> 0
|
||||
ddmng533 minmag -0.100E-383 0 -> 0
|
||||
ddmng534 minmag -0.01E-383 0 -> 0
|
||||
ddmng535 minmag -0.999E-383 0 -> 0
|
||||
ddmng536 minmag -0.099E-383 0 -> 0
|
||||
ddmng537 minmag -0.009E-383 0 -> 0
|
||||
ddmng538 minmag -0.001E-383 0 -> 0
|
||||
ddmng539 minmag -0.0009E-383 0 -> 0
|
||||
ddmng540 minmag -0.0001E-383 0 -> 0
|
||||
|
||||
|
||||
-- Null tests
|
||||
ddmng900 minmag 10 # -> NaN Invalid_operation
|
||||
ddmng901 minmag # 10 -> NaN Invalid_operation
|
@@ -0,0 +1,88 @@
|
||||
------------------------------------------------------------------------
|
||||
-- ddMinus.decTest -- decDouble 0-x --
|
||||
-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --
|
||||
------------------------------------------------------------------------
|
||||
-- Please see the document "General Decimal Arithmetic Testcases" --
|
||||
-- at http://www2.hursley.ibm.com/decimal for the description of --
|
||||
-- these testcases. --
|
||||
-- --
|
||||
-- These testcases are experimental ('beta' versions), and they --
|
||||
-- may contain errors. They are offered on an as-is basis. In --
|
||||
-- particular, achieving the same results as the tests here is not --
|
||||
-- a guarantee that an implementation complies with any Standard --
|
||||
-- or specification. The tests are not exhaustive. --
|
||||
-- --
|
||||
-- Please send comments, suggestions, and corrections to the author: --
|
||||
-- Mike Cowlishaw, IBM Fellow --
|
||||
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
|
||||
-- mfc@uk.ibm.com --
|
||||
------------------------------------------------------------------------
|
||||
version: 2.59
|
||||
|
||||
-- All operands and results are decDoubles.
|
||||
precision: 16
|
||||
maxExponent: 384
|
||||
minExponent: -383
|
||||
extended: 1
|
||||
clamp: 1
|
||||
rounding: half_even
|
||||
|
||||
-- Sanity check
|
||||
ddmns001 minus +7.50 -> -7.50
|
||||
|
||||
-- Infinities
|
||||
ddmns011 minus Infinity -> -Infinity
|
||||
ddmns012 minus -Infinity -> Infinity
|
||||
|
||||
-- NaNs, 0 payload
|
||||
ddmns021 minus NaN -> NaN
|
||||
ddmns022 minus -NaN -> -NaN
|
||||
ddmns023 minus sNaN -> NaN Invalid_operation
|
||||
ddmns024 minus -sNaN -> -NaN Invalid_operation
|
||||
|
||||
-- NaNs, non-0 payload
|
||||
ddmns031 minus NaN13 -> NaN13
|
||||
ddmns032 minus -NaN13 -> -NaN13
|
||||
ddmns033 minus sNaN13 -> NaN13 Invalid_operation
|
||||
ddmns034 minus -sNaN13 -> -NaN13 Invalid_operation
|
||||
ddmns035 minus NaN70 -> NaN70
|
||||
ddmns036 minus -NaN70 -> -NaN70
|
||||
ddmns037 minus sNaN101 -> NaN101 Invalid_operation
|
||||
ddmns038 minus -sNaN101 -> -NaN101 Invalid_operation
|
||||
|
||||
-- finites
|
||||
ddmns101 minus 7 -> -7
|
||||
ddmns102 minus -7 -> 7
|
||||
ddmns103 minus 75 -> -75
|
||||
ddmns104 minus -75 -> 75
|
||||
ddmns105 minus 7.50 -> -7.50
|
||||
ddmns106 minus -7.50 -> 7.50
|
||||
ddmns107 minus 7.500 -> -7.500
|
||||
ddmns108 minus -7.500 -> 7.500
|
||||
|
||||
-- zeros
|
||||
ddmns111 minus 0 -> 0
|
||||
ddmns112 minus -0 -> 0
|
||||
ddmns113 minus 0E+4 -> 0E+4
|
||||
ddmns114 minus -0E+4 -> 0E+4
|
||||
ddmns115 minus 0.0000 -> 0.0000
|
||||
ddmns116 minus -0.0000 -> 0.0000
|
||||
ddmns117 minus 0E-141 -> 0E-141
|
||||
ddmns118 minus -0E-141 -> 0E-141
|
||||
|
||||
-- full coefficients, alternating bits
|
||||
ddmns121 minus 2682682682682682 -> -2682682682682682
|
||||
ddmns122 minus -2682682682682682 -> 2682682682682682
|
||||
ddmns123 minus 1341341341341341 -> -1341341341341341
|
||||
ddmns124 minus -1341341341341341 -> 1341341341341341
|
||||
|
||||
-- Nmax, Nmin, Ntiny
|
||||
ddmns131 minus 9.999999999999999E+384 -> -9.999999999999999E+384
|
||||
ddmns132 minus 1E-383 -> -1E-383
|
||||
ddmns133 minus 1.000000000000000E-383 -> -1.000000000000000E-383
|
||||
ddmns134 minus 1E-398 -> -1E-398 Subnormal
|
||||
|
||||
ddmns135 minus -1E-398 -> 1E-398 Subnormal
|
||||
ddmns136 minus -1.000000000000000E-383 -> 1.000000000000000E-383
|
||||
ddmns137 minus -1E-383 -> 1E-383
|
||||
ddmns138 minus -9.999999999999999E+384 -> 9.999999999999999E+384
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user