Add updated .hgeol file and fix newlines in the 2.7 branch.

This commit is contained in:
Georg Brandl 2011-03-05 15:06:13 +01:00
parent 9504bc11b0
commit faa9ad2a46
174 changed files with 58065 additions and 58062 deletions

27
.hgeol
View file

@ -1,16 +1,13 @@
[patterns]
** = native
**.bat = CRLF
**.def = CRLF
**.dsp = CRLF
**.dsw = CRLF
**.mak = CRLF
**.mk = CRLF
**.rc = CRLF
**.sln = CRLF
**.vcproj = CRLF
**.vsprops = CRLF
# Non human-editable files are binary
**.dsp = BIN
**.dsw = BIN
**.mk = BIN
**.sln = BIN
**.vcproj = BIN
**.vsprops = BIN
**.aif = BIN
**.au = BIN
@ -31,6 +28,12 @@
Lib/email/test/data/msg_26.txt = BIN
Lib/test/sndhdrdata/sndhdr.* = BIN
Lib/test/decimaltestdata/*.decTest = BIN
# All other files (which presumably are human-editable) are "native".
# This must be the last rule!
** = native
[repository]
native = LF
native = LF

View file

@ -1,227 +1,227 @@
""" turtle-example-suite:
tdemo_nim.py
Play nim against the computer. The player
who takes the last stick is the winner.
Implements the model-view-controller
design pattern.
"""
import turtle
import random
import time
SCREENWIDTH = 640
SCREENHEIGHT = 480
MINSTICKS = 7
MAXSTICKS = 31
HUNIT = SCREENHEIGHT // 12
WUNIT = SCREENWIDTH // ((MAXSTICKS // 5) * 11 + (MAXSTICKS % 5) * 2)
SCOLOR = (63, 63, 31)
HCOLOR = (255, 204, 204)
COLOR = (204, 204, 255)
def randomrow():
return random.randint(MINSTICKS, MAXSTICKS)
def computerzug(state):
xored = state[0] ^ state[1] ^ state[2]
if xored == 0:
return randommove(state)
for z in range(3):
s = state[z] ^ xored
if s <= state[z]:
move = (z, s)
return move
def randommove(state):
m = max(state)
while True:
z = random.randint(0,2)
if state[z] > (m > 1):
break
rand = random.randint(m > 1, state[z]-1)
return z, rand
class NimModel(object):
def __init__(self, game):
self.game = game
def setup(self):
if self.game.state not in [Nim.CREATED, Nim.OVER]:
return
self.sticks = [randomrow(), randomrow(), randomrow()]
self.player = 0
self.winner = None
self.game.view.setup()
self.game.state = Nim.RUNNING
def move(self, row, col):
maxspalte = self.sticks[row]
self.sticks[row] = col
self.game.view.notify_move(row, col, maxspalte, self.player)
if self.game_over():
self.game.state = Nim.OVER
self.winner = self.player
self.game.view.notify_over()
elif self.player == 0:
self.player = 1
row, col = computerzug(self.sticks)
self.move(row, col)
self.player = 0
def game_over(self):
return self.sticks == [0, 0, 0]
def notify_move(self, row, col):
if self.sticks[row] <= col:
return
self.move(row, col)
class Stick(turtle.Turtle):
def __init__(self, row, col, game):
turtle.Turtle.__init__(self, visible=False)
self.row = row
self.col = col
self.game = game
x, y = self.coords(row, col)
self.shape("square")
self.shapesize(HUNIT/10.0, WUNIT/20.0)
self.speed(0)
self.pu()
self.goto(x,y)
self.color("white")
self.showturtle()
def coords(self, row, col):
packet, remainder = divmod(col, 5)
x = (3 + 11 * packet + 2 * remainder) * WUNIT
y = (2 + 3 * row) * HUNIT
return x - SCREENWIDTH // 2 + WUNIT // 2, SCREENHEIGHT // 2 - y - HUNIT // 2
def makemove(self, x, y):
if self.game.state != Nim.RUNNING:
return
self.game.controller.notify_move(self.row, self.col)
class NimView(object):
def __init__(self, game):
self.game = game
self.screen = game.screen
self.model = game.model
self.screen.colormode(255)
self.screen.tracer(False)
self.screen.bgcolor((240, 240, 255))
self.writer = turtle.Turtle(visible=False)
self.writer.pu()
self.writer.speed(0)
self.sticks = {}
for row in range(3):
for col in range(MAXSTICKS):
self.sticks[(row, col)] = Stick(row, col, game)
self.display("... a moment please ...")
self.screen.tracer(True)
def display(self, msg1, msg2=None):
self.screen.tracer(False)
self.writer.clear()
if msg2 is not None:
self.writer.goto(0, - SCREENHEIGHT // 2 + 48)
self.writer.pencolor("red")
self.writer.write(msg2, align="center", font=("Courier",18,"bold"))
self.writer.goto(0, - SCREENHEIGHT // 2 + 20)
self.writer.pencolor("black")
self.writer.write(msg1, align="center", font=("Courier",14,"bold"))
self.screen.tracer(True)
def setup(self):
self.screen.tracer(False)
for row in range(3):
for col in range(self.model.sticks[row]):
self.sticks[(row, col)].color(SCOLOR)
for row in range(3):
for col in range(self.model.sticks[row], MAXSTICKS):
self.sticks[(row, col)].color("white")
self.display("Your turn! Click leftmost stick to remove.")
self.screen.tracer(True)
def notify_move(self, row, col, maxspalte, player):
if player == 0:
farbe = HCOLOR
for s in range(col, maxspalte):
self.sticks[(row, s)].color(farbe)
else:
self.display(" ... thinking ... ")
time.sleep(0.5)
self.display(" ... thinking ... aaah ...")
farbe = COLOR
for s in range(maxspalte-1, col-1, -1):
time.sleep(0.2)
self.sticks[(row, s)].color(farbe)
self.display("Your turn! Click leftmost stick to remove.")
def notify_over(self):
if self.game.model.winner == 0:
msg2 = "Congrats. You're the winner!!!"
else:
msg2 = "Sorry, the computer is the winner."
self.display("To play again press space bar. To leave press ESC.", msg2)
def clear(self):
if self.game.state == Nim.OVER:
self.screen.clear()
class NimController(object):
def __init__(self, game):
self.game = game
self.sticks = game.view.sticks
self.BUSY = False
for stick in self.sticks.values():
stick.onclick(stick.makemove)
self.game.screen.onkey(self.game.model.setup, "space")
self.game.screen.onkey(self.game.view.clear, "Escape")
self.game.view.display("Press space bar to start game")
self.game.screen.listen()
def notify_move(self, row, col):
if self.BUSY:
return
self.BUSY = True
self.game.model.notify_move(row, col)
self.BUSY = False
class Nim(object):
CREATED = 0
RUNNING = 1
OVER = 2
def __init__(self, screen):
self.state = Nim.CREATED
self.screen = screen
self.model = NimModel(self)
self.view = NimView(self)
self.controller = NimController(self)
mainscreen = turtle.Screen()
mainscreen.mode("standard")
mainscreen.setup(SCREENWIDTH, SCREENHEIGHT)
def main():
nim = Nim(mainscreen)
return "EVENTLOOP!"
if __name__ == "__main__":
main()
turtle.mainloop()
""" turtle-example-suite:
tdemo_nim.py
Play nim against the computer. The player
who takes the last stick is the winner.
Implements the model-view-controller
design pattern.
"""
import turtle
import random
import time
SCREENWIDTH = 640
SCREENHEIGHT = 480
MINSTICKS = 7
MAXSTICKS = 31
HUNIT = SCREENHEIGHT // 12
WUNIT = SCREENWIDTH // ((MAXSTICKS // 5) * 11 + (MAXSTICKS % 5) * 2)
SCOLOR = (63, 63, 31)
HCOLOR = (255, 204, 204)
COLOR = (204, 204, 255)
def randomrow():
return random.randint(MINSTICKS, MAXSTICKS)
def computerzug(state):
xored = state[0] ^ state[1] ^ state[2]
if xored == 0:
return randommove(state)
for z in range(3):
s = state[z] ^ xored
if s <= state[z]:
move = (z, s)
return move
def randommove(state):
m = max(state)
while True:
z = random.randint(0,2)
if state[z] > (m > 1):
break
rand = random.randint(m > 1, state[z]-1)
return z, rand
class NimModel(object):
def __init__(self, game):
self.game = game
def setup(self):
if self.game.state not in [Nim.CREATED, Nim.OVER]:
return
self.sticks = [randomrow(), randomrow(), randomrow()]
self.player = 0
self.winner = None
self.game.view.setup()
self.game.state = Nim.RUNNING
def move(self, row, col):
maxspalte = self.sticks[row]
self.sticks[row] = col
self.game.view.notify_move(row, col, maxspalte, self.player)
if self.game_over():
self.game.state = Nim.OVER
self.winner = self.player
self.game.view.notify_over()
elif self.player == 0:
self.player = 1
row, col = computerzug(self.sticks)
self.move(row, col)
self.player = 0
def game_over(self):
return self.sticks == [0, 0, 0]
def notify_move(self, row, col):
if self.sticks[row] <= col:
return
self.move(row, col)
class Stick(turtle.Turtle):
def __init__(self, row, col, game):
turtle.Turtle.__init__(self, visible=False)
self.row = row
self.col = col
self.game = game
x, y = self.coords(row, col)
self.shape("square")
self.shapesize(HUNIT/10.0, WUNIT/20.0)
self.speed(0)
self.pu()
self.goto(x,y)
self.color("white")
self.showturtle()
def coords(self, row, col):
packet, remainder = divmod(col, 5)
x = (3 + 11 * packet + 2 * remainder) * WUNIT
y = (2 + 3 * row) * HUNIT
return x - SCREENWIDTH // 2 + WUNIT // 2, SCREENHEIGHT // 2 - y - HUNIT // 2
def makemove(self, x, y):
if self.game.state != Nim.RUNNING:
return
self.game.controller.notify_move(self.row, self.col)
class NimView(object):
def __init__(self, game):
self.game = game
self.screen = game.screen
self.model = game.model
self.screen.colormode(255)
self.screen.tracer(False)
self.screen.bgcolor((240, 240, 255))
self.writer = turtle.Turtle(visible=False)
self.writer.pu()
self.writer.speed(0)
self.sticks = {}
for row in range(3):
for col in range(MAXSTICKS):
self.sticks[(row, col)] = Stick(row, col, game)
self.display("... a moment please ...")
self.screen.tracer(True)
def display(self, msg1, msg2=None):
self.screen.tracer(False)
self.writer.clear()
if msg2 is not None:
self.writer.goto(0, - SCREENHEIGHT // 2 + 48)
self.writer.pencolor("red")
self.writer.write(msg2, align="center", font=("Courier",18,"bold"))
self.writer.goto(0, - SCREENHEIGHT // 2 + 20)
self.writer.pencolor("black")
self.writer.write(msg1, align="center", font=("Courier",14,"bold"))
self.screen.tracer(True)
def setup(self):
self.screen.tracer(False)
for row in range(3):
for col in range(self.model.sticks[row]):
self.sticks[(row, col)].color(SCOLOR)
for row in range(3):
for col in range(self.model.sticks[row], MAXSTICKS):
self.sticks[(row, col)].color("white")
self.display("Your turn! Click leftmost stick to remove.")
self.screen.tracer(True)
def notify_move(self, row, col, maxspalte, player):
if player == 0:
farbe = HCOLOR
for s in range(col, maxspalte):
self.sticks[(row, s)].color(farbe)
else:
self.display(" ... thinking ... ")
time.sleep(0.5)
self.display(" ... thinking ... aaah ...")
farbe = COLOR
for s in range(maxspalte-1, col-1, -1):
time.sleep(0.2)
self.sticks[(row, s)].color(farbe)
self.display("Your turn! Click leftmost stick to remove.")
def notify_over(self):
if self.game.model.winner == 0:
msg2 = "Congrats. You're the winner!!!"
else:
msg2 = "Sorry, the computer is the winner."
self.display("To play again press space bar. To leave press ESC.", msg2)
def clear(self):
if self.game.state == Nim.OVER:
self.screen.clear()
class NimController(object):
def __init__(self, game):
self.game = game
self.sticks = game.view.sticks
self.BUSY = False
for stick in self.sticks.values():
stick.onclick(stick.makemove)
self.game.screen.onkey(self.game.model.setup, "space")
self.game.screen.onkey(self.game.view.clear, "Escape")
self.game.view.display("Press space bar to start game")
self.game.screen.listen()
def notify_move(self, row, col):
if self.BUSY:
return
self.BUSY = True
self.game.model.notify_move(row, col)
self.BUSY = False
class Nim(object):
CREATED = 0
RUNNING = 1
OVER = 2
def __init__(self, screen):
self.state = Nim.CREATED
self.screen = screen
self.model = NimModel(self)
self.view = NimView(self)
self.controller = NimController(self)
mainscreen = turtle.Screen()
mainscreen.mode("standard")
mainscreen.setup(SCREENWIDTH, SCREENHEIGHT)
def main():
nim = Nim(mainscreen)
return "EVENTLOOP!"
if __name__ == "__main__":
main()
turtle.mainloop()

View file

@ -1,58 +1,58 @@
@@echo off
setlocal
set SVNROOT=http://svn.python.org/projects
if "%PYTHON%" EQU "" set PYTHON=..\pcbuild\python
if "%HTMLHELP%" EQU "" set HTMLHELP=%ProgramFiles%\HTML Help Workshop\hhc.exe
if "%DISTVERSION%" EQU "" for /f "usebackq" %%v in (`%PYTHON% tools/sphinxext/patchlevel.py`) do set DISTVERSION=%%v
if "%1" EQU "" goto help
if "%1" EQU "html" goto build
if "%1" EQU "htmlhelp" goto build
if "%1" EQU "latex" goto build
if "%1" EQU "text" goto build
if "%1" EQU "suspicious" goto build
if "%1" EQU "linkcheck" goto build
if "%1" EQU "changes" goto build
if "%1" EQU "checkout" goto checkout
if "%1" EQU "update" goto update
:help
set this=%~n0
echo HELP
echo.
echo %this% checkout
echo %this% update
echo %this% html
echo %this% htmlhelp
echo %this% latex
echo %this% text
echo %this% suspicious
echo %this% linkcheck
echo %this% changes
echo.
goto end
:checkout
svn co %SVNROOT%/external/Sphinx-0.6.7/sphinx tools/sphinx
svn co %SVNROOT%/external/docutils-0.6/docutils tools/docutils
svn co %SVNROOT%/external/Jinja-2.3.1/jinja2 tools/jinja2
svn co %SVNROOT%/external/Pygments-1.3.1/pygments tools/pygments
goto end
:update
svn update tools/sphinx
svn update tools/docutils
svn update tools/jinja2
svn update tools/pygments
goto end
:build
if not exist build mkdir build
if not exist build\%1 mkdir build\%1
if not exist build\doctrees mkdir build\doctrees
cmd /C %PYTHON% tools\sphinx-build.py -b%1 -dbuild\doctrees . build\%*
if "%1" EQU "htmlhelp" "%HTMLHELP%" build\htmlhelp\python%DISTVERSION:.=%.hhp
goto end
:end
@@echo off
setlocal
set SVNROOT=http://svn.python.org/projects
if "%PYTHON%" EQU "" set PYTHON=..\pcbuild\python
if "%HTMLHELP%" EQU "" set HTMLHELP=%ProgramFiles%\HTML Help Workshop\hhc.exe
if "%DISTVERSION%" EQU "" for /f "usebackq" %%v in (`%PYTHON% tools/sphinxext/patchlevel.py`) do set DISTVERSION=%%v
if "%1" EQU "" goto help
if "%1" EQU "html" goto build
if "%1" EQU "htmlhelp" goto build
if "%1" EQU "latex" goto build
if "%1" EQU "text" goto build
if "%1" EQU "suspicious" goto build
if "%1" EQU "linkcheck" goto build
if "%1" EQU "changes" goto build
if "%1" EQU "checkout" goto checkout
if "%1" EQU "update" goto update
:help
set this=%~n0
echo HELP
echo.
echo %this% checkout
echo %this% update
echo %this% html
echo %this% htmlhelp
echo %this% latex
echo %this% text
echo %this% suspicious
echo %this% linkcheck
echo %this% changes
echo.
goto end
:checkout
svn co %SVNROOT%/external/Sphinx-0.6.7/sphinx tools/sphinx
svn co %SVNROOT%/external/docutils-0.6/docutils tools/docutils
svn co %SVNROOT%/external/Jinja-2.3.1/jinja2 tools/jinja2
svn co %SVNROOT%/external/Pygments-1.3.1/pygments tools/pygments
goto end
:update
svn update tools/sphinx
svn update tools/docutils
svn update tools/jinja2
svn update tools/pygments
goto end
:build
if not exist build mkdir build
if not exist build\%1 mkdir build\%1
if not exist build\doctrees mkdir build\doctrees
cmd /C %PYTHON% tools\sphinx-build.py -b%1 -dbuild\doctrees . build\%*
if "%1" EQU "htmlhelp" "%HTMLHELP%" build\htmlhelp\python%DISTVERSION:.=%.hhp
goto end
:end

View file

@ -1,45 +1,45 @@
Received: from xcar [192.168.0.2] by jeeves.wooster.local
(SMTPD32-7.07 EVAL) id AFF92F0214; Sun, 12 May 2002 08:55:37 +0100
Date: Sun, 12 May 2002 08:56:15 +0100
From: Father Time <father.time@xcar.wooster.local>
To: timbo@jeeves.wooster.local
Subject: IMAP file test
Message-ID: <6df65d354b.father.time@rpc.wooster.local>
X-Organization: Home
User-Agent: Messenger-Pro/2.50a (MsgServe/1.50) (RISC-OS/4.02) POPstar/2.03
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="1618492860--2051301190--113853680"
Status: R
X-UIDL: 319998302
This message is in MIME format which your mailer apparently does not support.
You either require a newer version of your software which supports MIME, or
a separate MIME decoding utility. Alternatively, ask the sender of this
message to resend it in a different format.
--1618492860--2051301190--113853680
Content-Type: text/plain; charset=us-ascii
Simple email with attachment.
--1618492860--2051301190--113853680
Content-Type: application/riscos; name="clock.bmp,69c"; type=BMP; load=&fff69c4b; exec=&355dd4d1; access=&03
Content-Disposition: attachment; filename="clock.bmp"
Content-Transfer-Encoding: base64
Qk12AgAAAAAAAHYAAAAoAAAAIAAAACAAAAABAAQAAAAAAAAAAADXDQAA1w0AAAAAAAAA
AAAAAAAAAAAAiAAAiAAAAIiIAIgAAACIAIgAiIgAALu7uwCIiIgAERHdACLuIgAz//8A
zAAAAN0R3QDu7iIA////AAAAAAAAAAAAAAAAAAAAAAAAAAi3AAAAAAAAADeAAAAAAAAA
C3ADMzMzMANwAAAAAAAAAAAHMAAAAANwAAAAAAAAAACAMAd3zPfwAwgAAAAAAAAIAwd/
f8x/f3AwgAAAAAAAgDB0x/f3//zPAwgAAAAAAAcHfM9////8z/AwAAAAAAiwd/f3////
////A4AAAAAAcEx/f///////zAMAAAAAiwfM9////3///8zwOAAAAAcHf3////B/////
8DAAAAALB/f3///wd3d3//AwAAAABwTPf//wCQAAD/zAMAAAAAsEx/f///B////8wDAA
AAAHB39////wf/////AwAAAACwf39///8H/////wMAAAAIcHfM9///B////M8DgAAAAA
sHTH///wf///xAMAAAAACHB3f3//8H////cDgAAAAAALB3zH//D//M9wMAAAAAAAgLB0
z39///xHAwgAAAAAAAgLB3d3RHd3cDCAAAAAAAAAgLAHd0R3cAMIAAAAAAAAgAgLcAAA
AAMwgAgAAAAACDAAAAu7t7cwAAgDgAAAAABzcIAAAAAAAAgDMwAAAAAAN7uwgAAAAAgH
MzMAAAAACH97tzAAAAALu3c3gAAAAAAL+7tzDABAu7f7cAAAAAAACA+3MA7EQAv/sIAA
AAAAAAAIAAAAAAAAAIAAAAAA
--1618492860--2051301190--113853680--
Received: from xcar [192.168.0.2] by jeeves.wooster.local
(SMTPD32-7.07 EVAL) id AFF92F0214; Sun, 12 May 2002 08:55:37 +0100
Date: Sun, 12 May 2002 08:56:15 +0100
From: Father Time <father.time@xcar.wooster.local>
To: timbo@jeeves.wooster.local
Subject: IMAP file test
Message-ID: <6df65d354b.father.time@rpc.wooster.local>
X-Organization: Home
User-Agent: Messenger-Pro/2.50a (MsgServe/1.50) (RISC-OS/4.02) POPstar/2.03
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="1618492860--2051301190--113853680"
Status: R
X-UIDL: 319998302
This message is in MIME format which your mailer apparently does not support.
You either require a newer version of your software which supports MIME, or
a separate MIME decoding utility. Alternatively, ask the sender of this
message to resend it in a different format.
--1618492860--2051301190--113853680
Content-Type: text/plain; charset=us-ascii
Simple email with attachment.
--1618492860--2051301190--113853680
Content-Type: application/riscos; name="clock.bmp,69c"; type=BMP; load=&fff69c4b; exec=&355dd4d1; access=&03
Content-Disposition: attachment; filename="clock.bmp"
Content-Transfer-Encoding: base64
Qk12AgAAAAAAAHYAAAAoAAAAIAAAACAAAAABAAQAAAAAAAAAAADXDQAA1w0AAAAAAAAA
AAAAAAAAAAAAiAAAiAAAAIiIAIgAAACIAIgAiIgAALu7uwCIiIgAERHdACLuIgAz//8A
zAAAAN0R3QDu7iIA////AAAAAAAAAAAAAAAAAAAAAAAAAAi3AAAAAAAAADeAAAAAAAAA
C3ADMzMzMANwAAAAAAAAAAAHMAAAAANwAAAAAAAAAACAMAd3zPfwAwgAAAAAAAAIAwd/
f8x/f3AwgAAAAAAAgDB0x/f3//zPAwgAAAAAAAcHfM9////8z/AwAAAAAAiwd/f3////
////A4AAAAAAcEx/f///////zAMAAAAAiwfM9////3///8zwOAAAAAcHf3////B/////
8DAAAAALB/f3///wd3d3//AwAAAABwTPf//wCQAAD/zAMAAAAAsEx/f///B////8wDAA
AAAHB39////wf/////AwAAAACwf39///8H/////wMAAAAIcHfM9///B////M8DgAAAAA
sHTH///wf///xAMAAAAACHB3f3//8H////cDgAAAAAALB3zH//D//M9wMAAAAAAAgLB0
z39///xHAwgAAAAAAAgLB3d3RHd3cDCAAAAAAAAAgLAHd0R3cAMIAAAAAAAAgAgLcAAA
AAMwgAgAAAAACDAAAAu7t7cwAAgDgAAAAABzcIAAAAAAAAgDMwAAAAAAN7uwgAAAAAgH
MzMAAAAACH97tzAAAAALu3c3gAAAAAAL+7tzDABAu7f7cAAAAAAACA+3MA7EQAv/sIAA
AAAAAAAIAAAAAAAAAIAAAAAA
--1618492860--2051301190--113853680--

View file

@ -1,338 +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
------------------------------------------------------------------------
-- 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

View file

@ -1,131 +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
------------------------------------------------------------------------
-- 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

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,86 +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
------------------------------------------------------------------------
-- 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

View file

@ -1,86 +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
------------------------------------------------------------------------
-- 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

View file

@ -1,86 +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
------------------------------------------------------------------------
-- 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

View file

@ -1,177 +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
------------------------------------------------------------------------
-- 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

View file

@ -1,126 +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
------------------------------------------------------------------------
-- 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

View file

@ -1,347 +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
------------------------------------------------------------------------
-- 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

View file

@ -1,357 +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
------------------------------------------------------------------------
-- 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

View file

@ -1,76 +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
------------------------------------------------------------------------
-- 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

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,88 +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
------------------------------------------------------------------------
-- 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

View file

@ -1,88 +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
------------------------------------------------------------------------
-- 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

View file

@ -1,88 +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
------------------------------------------------------------------------
-- 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

View file

@ -1,175 +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
------------------------------------------------------------------------
-- 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

File diff suppressed because it is too large Load diff

View file

@ -1,449 +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
------------------------------------------------------------------------
-- 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

View file

@ -1,495 +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
------------------------------------------------------------------------
-- 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

View file

@ -1,202 +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
------------------------------------------------------------------------
-- 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

View file

@ -1,159 +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
------------------------------------------------------------------------
-- 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

View file

@ -1,322 +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
------------------------------------------------------------------------
-- 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

View file

@ -1,304 +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
------------------------------------------------------------------------
-- 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

View file

@ -1,309 +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
------------------------------------------------------------------------
-- 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

View file

@ -1,293 +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
------------------------------------------------------------------------
-- 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

View file

@ -1,88 +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
------------------------------------------------------------------------
-- 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

File diff suppressed because it is too large Load diff

View file

@ -1,126 +1,126 @@
------------------------------------------------------------------------
-- ddNextMinus.decTest -- decDouble next that is less [754r nextdown] --
-- 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
ddnextm001 nextminus 0.9999999999999995 -> 0.9999999999999994
ddnextm002 nextminus 0.9999999999999996 -> 0.9999999999999995
ddnextm003 nextminus 0.9999999999999997 -> 0.9999999999999996
ddnextm004 nextminus 0.9999999999999998 -> 0.9999999999999997
ddnextm005 nextminus 0.9999999999999999 -> 0.9999999999999998
ddnextm006 nextminus 1.000000000000000 -> 0.9999999999999999
ddnextm007 nextminus 1.0 -> 0.9999999999999999
ddnextm008 nextminus 1 -> 0.9999999999999999
ddnextm009 nextminus 1.000000000000001 -> 1.000000000000000
ddnextm010 nextminus 1.000000000000002 -> 1.000000000000001
ddnextm011 nextminus 1.000000000000003 -> 1.000000000000002
ddnextm012 nextminus 1.000000000000004 -> 1.000000000000003
ddnextm013 nextminus 1.000000000000005 -> 1.000000000000004
ddnextm014 nextminus 1.000000000000006 -> 1.000000000000005
ddnextm015 nextminus 1.000000000000007 -> 1.000000000000006
ddnextm016 nextminus 1.000000000000008 -> 1.000000000000007
ddnextm017 nextminus 1.000000000000009 -> 1.000000000000008
ddnextm018 nextminus 1.000000000000010 -> 1.000000000000009
ddnextm019 nextminus 1.000000000000011 -> 1.000000000000010
ddnextm020 nextminus 1.000000000000012 -> 1.000000000000011
ddnextm021 nextminus -0.9999999999999995 -> -0.9999999999999996
ddnextm022 nextminus -0.9999999999999996 -> -0.9999999999999997
ddnextm023 nextminus -0.9999999999999997 -> -0.9999999999999998
ddnextm024 nextminus -0.9999999999999998 -> -0.9999999999999999
ddnextm025 nextminus -0.9999999999999999 -> -1.000000000000000
ddnextm026 nextminus -1.000000000000000 -> -1.000000000000001
ddnextm027 nextminus -1.0 -> -1.000000000000001
ddnextm028 nextminus -1 -> -1.000000000000001
ddnextm029 nextminus -1.000000000000001 -> -1.000000000000002
ddnextm030 nextminus -1.000000000000002 -> -1.000000000000003
ddnextm031 nextminus -1.000000000000003 -> -1.000000000000004
ddnextm032 nextminus -1.000000000000004 -> -1.000000000000005
ddnextm033 nextminus -1.000000000000005 -> -1.000000000000006
ddnextm034 nextminus -1.000000000000006 -> -1.000000000000007
ddnextm035 nextminus -1.000000000000007 -> -1.000000000000008
ddnextm036 nextminus -1.000000000000008 -> -1.000000000000009
ddnextm037 nextminus -1.000000000000009 -> -1.000000000000010
ddnextm038 nextminus -1.000000000000010 -> -1.000000000000011
ddnextm039 nextminus -1.000000000000011 -> -1.000000000000012
-- ultra-tiny inputs
ddnextm062 nextminus 1E-398 -> 0E-398
ddnextm065 nextminus -1E-398 -> -2E-398
-- Zeros
ddnextm100 nextminus -0 -> -1E-398
ddnextm101 nextminus 0 -> -1E-398
ddnextm102 nextminus 0.00 -> -1E-398
ddnextm103 nextminus -0.00 -> -1E-398
ddnextm104 nextminus 0E-300 -> -1E-398
ddnextm105 nextminus 0E+300 -> -1E-398
ddnextm106 nextminus 0E+30000 -> -1E-398
ddnextm107 nextminus -0E+30000 -> -1E-398
-- specials
ddnextm150 nextminus Inf -> 9.999999999999999E+384
ddnextm151 nextminus -Inf -> -Infinity
ddnextm152 nextminus NaN -> NaN
ddnextm153 nextminus sNaN -> NaN Invalid_operation
ddnextm154 nextminus NaN77 -> NaN77
ddnextm155 nextminus sNaN88 -> NaN88 Invalid_operation
ddnextm156 nextminus -NaN -> -NaN
ddnextm157 nextminus -sNaN -> -NaN Invalid_operation
ddnextm158 nextminus -NaN77 -> -NaN77
ddnextm159 nextminus -sNaN88 -> -NaN88 Invalid_operation
-- Nmax, Nmin, Ntiny, subnormals
ddnextm170 nextminus 9.999999999999999E+384 -> 9.999999999999998E+384
ddnextm171 nextminus 9.999999999999998E+384 -> 9.999999999999997E+384
ddnextm172 nextminus 1E-383 -> 9.99999999999999E-384
ddnextm173 nextminus 1.000000000000000E-383 -> 9.99999999999999E-384
ddnextm174 nextminus 9E-398 -> 8E-398
ddnextm175 nextminus 9.9E-397 -> 9.8E-397
ddnextm176 nextminus 9.99999999999E-387 -> 9.99999999998E-387
ddnextm177 nextminus 9.99999999999999E-384 -> 9.99999999999998E-384
ddnextm178 nextminus 9.99999999999998E-384 -> 9.99999999999997E-384
ddnextm179 nextminus 9.99999999999997E-384 -> 9.99999999999996E-384
ddnextm180 nextminus 0E-398 -> -1E-398
ddnextm181 nextminus 1E-398 -> 0E-398
ddnextm182 nextminus 2E-398 -> 1E-398
ddnextm183 nextminus -0E-398 -> -1E-398
ddnextm184 nextminus -1E-398 -> -2E-398
ddnextm185 nextminus -2E-398 -> -3E-398
ddnextm186 nextminus -10E-398 -> -1.1E-397
ddnextm187 nextminus -100E-398 -> -1.01E-396
ddnextm188 nextminus -100000E-398 -> -1.00001E-393
ddnextm189 nextminus -1.00000000000E-383 -> -1.000000000000001E-383
ddnextm190 nextminus -1.000000000000000E-383 -> -1.000000000000001E-383
ddnextm191 nextminus -1E-383 -> -1.000000000000001E-383
ddnextm192 nextminus -9.999999999999998E+384 -> -9.999999999999999E+384
ddnextm193 nextminus -9.999999999999999E+384 -> -Infinity
-- Null tests
ddnextm900 nextminus # -> NaN Invalid_operation
------------------------------------------------------------------------
-- ddNextMinus.decTest -- decDouble next that is less [754r nextdown] --
-- 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
ddnextm001 nextminus 0.9999999999999995 -> 0.9999999999999994
ddnextm002 nextminus 0.9999999999999996 -> 0.9999999999999995
ddnextm003 nextminus 0.9999999999999997 -> 0.9999999999999996
ddnextm004 nextminus 0.9999999999999998 -> 0.9999999999999997
ddnextm005 nextminus 0.9999999999999999 -> 0.9999999999999998
ddnextm006 nextminus 1.000000000000000 -> 0.9999999999999999
ddnextm007 nextminus 1.0 -> 0.9999999999999999
ddnextm008 nextminus 1 -> 0.9999999999999999
ddnextm009 nextminus 1.000000000000001 -> 1.000000000000000
ddnextm010 nextminus 1.000000000000002 -> 1.000000000000001
ddnextm011 nextminus 1.000000000000003 -> 1.000000000000002
ddnextm012 nextminus 1.000000000000004 -> 1.000000000000003
ddnextm013 nextminus 1.000000000000005 -> 1.000000000000004
ddnextm014 nextminus 1.000000000000006 -> 1.000000000000005
ddnextm015 nextminus 1.000000000000007 -> 1.000000000000006
ddnextm016 nextminus 1.000000000000008 -> 1.000000000000007
ddnextm017 nextminus 1.000000000000009 -> 1.000000000000008
ddnextm018 nextminus 1.000000000000010 -> 1.000000000000009
ddnextm019 nextminus 1.000000000000011 -> 1.000000000000010
ddnextm020 nextminus 1.000000000000012 -> 1.000000000000011
ddnextm021 nextminus -0.9999999999999995 -> -0.9999999999999996
ddnextm022 nextminus -0.9999999999999996 -> -0.9999999999999997
ddnextm023 nextminus -0.9999999999999997 -> -0.9999999999999998
ddnextm024 nextminus -0.9999999999999998 -> -0.9999999999999999
ddnextm025 nextminus -0.9999999999999999 -> -1.000000000000000
ddnextm026 nextminus -1.000000000000000 -> -1.000000000000001
ddnextm027 nextminus -1.0 -> -1.000000000000001
ddnextm028 nextminus -1 -> -1.000000000000001
ddnextm029 nextminus -1.000000000000001 -> -1.000000000000002
ddnextm030 nextminus -1.000000000000002 -> -1.000000000000003
ddnextm031 nextminus -1.000000000000003 -> -1.000000000000004
ddnextm032 nextminus -1.000000000000004 -> -1.000000000000005
ddnextm033 nextminus -1.000000000000005 -> -1.000000000000006
ddnextm034 nextminus -1.000000000000006 -> -1.000000000000007
ddnextm035 nextminus -1.000000000000007 -> -1.000000000000008
ddnextm036 nextminus -1.000000000000008 -> -1.000000000000009
ddnextm037 nextminus -1.000000000000009 -> -1.000000000000010
ddnextm038 nextminus -1.000000000000010 -> -1.000000000000011
ddnextm039 nextminus -1.000000000000011 -> -1.000000000000012
-- ultra-tiny inputs
ddnextm062 nextminus 1E-398 -> 0E-398
ddnextm065 nextminus -1E-398 -> -2E-398
-- Zeros
ddnextm100 nextminus -0 -> -1E-398
ddnextm101 nextminus 0 -> -1E-398
ddnextm102 nextminus 0.00 -> -1E-398
ddnextm103 nextminus -0.00 -> -1E-398
ddnextm104 nextminus 0E-300 -> -1E-398
ddnextm105 nextminus 0E+300 -> -1E-398
ddnextm106 nextminus 0E+30000 -> -1E-398
ddnextm107 nextminus -0E+30000 -> -1E-398
-- specials
ddnextm150 nextminus Inf -> 9.999999999999999E+384
ddnextm151 nextminus -Inf -> -Infinity
ddnextm152 nextminus NaN -> NaN
ddnextm153 nextminus sNaN -> NaN Invalid_operation
ddnextm154 nextminus NaN77 -> NaN77
ddnextm155 nextminus sNaN88 -> NaN88 Invalid_operation
ddnextm156 nextminus -NaN -> -NaN
ddnextm157 nextminus -sNaN -> -NaN Invalid_operation
ddnextm158 nextminus -NaN77 -> -NaN77
ddnextm159 nextminus -sNaN88 -> -NaN88 Invalid_operation
-- Nmax, Nmin, Ntiny, subnormals
ddnextm170 nextminus 9.999999999999999E+384 -> 9.999999999999998E+384
ddnextm171 nextminus 9.999999999999998E+384 -> 9.999999999999997E+384
ddnextm172 nextminus 1E-383 -> 9.99999999999999E-384
ddnextm173 nextminus 1.000000000000000E-383 -> 9.99999999999999E-384
ddnextm174 nextminus 9E-398 -> 8E-398
ddnextm175 nextminus 9.9E-397 -> 9.8E-397
ddnextm176 nextminus 9.99999999999E-387 -> 9.99999999998E-387
ddnextm177 nextminus 9.99999999999999E-384 -> 9.99999999999998E-384
ddnextm178 nextminus 9.99999999999998E-384 -> 9.99999999999997E-384
ddnextm179 nextminus 9.99999999999997E-384 -> 9.99999999999996E-384
ddnextm180 nextminus 0E-398 -> -1E-398
ddnextm181 nextminus 1E-398 -> 0E-398
ddnextm182 nextminus 2E-398 -> 1E-398
ddnextm183 nextminus -0E-398 -> -1E-398
ddnextm184 nextminus -1E-398 -> -2E-398
ddnextm185 nextminus -2E-398 -> -3E-398
ddnextm186 nextminus -10E-398 -> -1.1E-397
ddnextm187 nextminus -100E-398 -> -1.01E-396
ddnextm188 nextminus -100000E-398 -> -1.00001E-393
ddnextm189 nextminus -1.00000000000E-383 -> -1.000000000000001E-383
ddnextm190 nextminus -1.000000000000000E-383 -> -1.000000000000001E-383
ddnextm191 nextminus -1E-383 -> -1.000000000000001E-383
ddnextm192 nextminus -9.999999999999998E+384 -> -9.999999999999999E+384
ddnextm193 nextminus -9.999999999999999E+384 -> -Infinity
-- Null tests
ddnextm900 nextminus # -> NaN Invalid_operation

View file

@ -1,124 +1,124 @@
------------------------------------------------------------------------
-- ddNextPlus.decTest -- decDouble next that is greater [754r nextup] --
-- 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
ddnextp001 nextplus 0.9999999999999995 -> 0.9999999999999996
ddnextp002 nextplus 0.9999999999999996 -> 0.9999999999999997
ddnextp003 nextplus 0.9999999999999997 -> 0.9999999999999998
ddnextp004 nextplus 0.9999999999999998 -> 0.9999999999999999
ddnextp005 nextplus 0.9999999999999999 -> 1.000000000000000
ddnextp006 nextplus 1.000000000000000 -> 1.000000000000001
ddnextp007 nextplus 1.0 -> 1.000000000000001
ddnextp008 nextplus 1 -> 1.000000000000001
ddnextp009 nextplus 1.000000000000001 -> 1.000000000000002
ddnextp010 nextplus 1.000000000000002 -> 1.000000000000003
ddnextp011 nextplus 1.000000000000003 -> 1.000000000000004
ddnextp012 nextplus 1.000000000000004 -> 1.000000000000005
ddnextp013 nextplus 1.000000000000005 -> 1.000000000000006
ddnextp014 nextplus 1.000000000000006 -> 1.000000000000007
ddnextp015 nextplus 1.000000000000007 -> 1.000000000000008
ddnextp016 nextplus 1.000000000000008 -> 1.000000000000009
ddnextp017 nextplus 1.000000000000009 -> 1.000000000000010
ddnextp018 nextplus 1.000000000000010 -> 1.000000000000011
ddnextp019 nextplus 1.000000000000011 -> 1.000000000000012
ddnextp021 nextplus -0.9999999999999995 -> -0.9999999999999994
ddnextp022 nextplus -0.9999999999999996 -> -0.9999999999999995
ddnextp023 nextplus -0.9999999999999997 -> -0.9999999999999996
ddnextp024 nextplus -0.9999999999999998 -> -0.9999999999999997
ddnextp025 nextplus -0.9999999999999999 -> -0.9999999999999998
ddnextp026 nextplus -1.000000000000000 -> -0.9999999999999999
ddnextp027 nextplus -1.0 -> -0.9999999999999999
ddnextp028 nextplus -1 -> -0.9999999999999999
ddnextp029 nextplus -1.000000000000001 -> -1.000000000000000
ddnextp030 nextplus -1.000000000000002 -> -1.000000000000001
ddnextp031 nextplus -1.000000000000003 -> -1.000000000000002
ddnextp032 nextplus -1.000000000000004 -> -1.000000000000003
ddnextp033 nextplus -1.000000000000005 -> -1.000000000000004
ddnextp034 nextplus -1.000000000000006 -> -1.000000000000005
ddnextp035 nextplus -1.000000000000007 -> -1.000000000000006
ddnextp036 nextplus -1.000000000000008 -> -1.000000000000007
ddnextp037 nextplus -1.000000000000009 -> -1.000000000000008
ddnextp038 nextplus -1.000000000000010 -> -1.000000000000009
ddnextp039 nextplus -1.000000000000011 -> -1.000000000000010
ddnextp040 nextplus -1.000000000000012 -> -1.000000000000011
-- Zeros
ddnextp100 nextplus 0 -> 1E-398
ddnextp101 nextplus 0.00 -> 1E-398
ddnextp102 nextplus 0E-300 -> 1E-398
ddnextp103 nextplus 0E+300 -> 1E-398
ddnextp104 nextplus 0E+30000 -> 1E-398
ddnextp105 nextplus -0 -> 1E-398
ddnextp106 nextplus -0.00 -> 1E-398
ddnextp107 nextplus -0E-300 -> 1E-398
ddnextp108 nextplus -0E+300 -> 1E-398
ddnextp109 nextplus -0E+30000 -> 1E-398
-- specials
ddnextp150 nextplus Inf -> Infinity
ddnextp151 nextplus -Inf -> -9.999999999999999E+384
ddnextp152 nextplus NaN -> NaN
ddnextp153 nextplus sNaN -> NaN Invalid_operation
ddnextp154 nextplus NaN77 -> NaN77
ddnextp155 nextplus sNaN88 -> NaN88 Invalid_operation
ddnextp156 nextplus -NaN -> -NaN
ddnextp157 nextplus -sNaN -> -NaN Invalid_operation
ddnextp158 nextplus -NaN77 -> -NaN77
ddnextp159 nextplus -sNaN88 -> -NaN88 Invalid_operation
-- Nmax, Nmin, Ntiny, subnormals
ddnextp170 nextplus -9.999999999999999E+384 -> -9.999999999999998E+384
ddnextp171 nextplus -9.999999999999998E+384 -> -9.999999999999997E+384
ddnextp172 nextplus -1E-383 -> -9.99999999999999E-384
ddnextp173 nextplus -1.000000000000000E-383 -> -9.99999999999999E-384
ddnextp174 nextplus -9E-398 -> -8E-398
ddnextp175 nextplus -9.9E-397 -> -9.8E-397
ddnextp176 nextplus -9.99999999999E-387 -> -9.99999999998E-387
ddnextp177 nextplus -9.99999999999999E-384 -> -9.99999999999998E-384
ddnextp178 nextplus -9.99999999999998E-384 -> -9.99999999999997E-384
ddnextp179 nextplus -9.99999999999997E-384 -> -9.99999999999996E-384
ddnextp180 nextplus -0E-398 -> 1E-398
ddnextp181 nextplus -1E-398 -> -0E-398
ddnextp182 nextplus -2E-398 -> -1E-398
ddnextp183 nextplus 0E-398 -> 1E-398
ddnextp184 nextplus 1E-398 -> 2E-398
ddnextp185 nextplus 2E-398 -> 3E-398
ddnextp186 nextplus 10E-398 -> 1.1E-397
ddnextp187 nextplus 100E-398 -> 1.01E-396
ddnextp188 nextplus 100000E-398 -> 1.00001E-393
ddnextp189 nextplus 1.00000000000E-383 -> 1.000000000000001E-383
ddnextp190 nextplus 1.000000000000000E-383 -> 1.000000000000001E-383
ddnextp191 nextplus 1E-383 -> 1.000000000000001E-383
ddnextp192 nextplus 9.999999999999998E+384 -> 9.999999999999999E+384
ddnextp193 nextplus 9.999999999999999E+384 -> Infinity
-- Null tests
ddnextp900 nextplus # -> NaN Invalid_operation
------------------------------------------------------------------------
-- ddNextPlus.decTest -- decDouble next that is greater [754r nextup] --
-- 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
ddnextp001 nextplus 0.9999999999999995 -> 0.9999999999999996
ddnextp002 nextplus 0.9999999999999996 -> 0.9999999999999997
ddnextp003 nextplus 0.9999999999999997 -> 0.9999999999999998
ddnextp004 nextplus 0.9999999999999998 -> 0.9999999999999999
ddnextp005 nextplus 0.9999999999999999 -> 1.000000000000000
ddnextp006 nextplus 1.000000000000000 -> 1.000000000000001
ddnextp007 nextplus 1.0 -> 1.000000000000001
ddnextp008 nextplus 1 -> 1.000000000000001
ddnextp009 nextplus 1.000000000000001 -> 1.000000000000002
ddnextp010 nextplus 1.000000000000002 -> 1.000000000000003
ddnextp011 nextplus 1.000000000000003 -> 1.000000000000004
ddnextp012 nextplus 1.000000000000004 -> 1.000000000000005
ddnextp013 nextplus 1.000000000000005 -> 1.000000000000006
ddnextp014 nextplus 1.000000000000006 -> 1.000000000000007
ddnextp015 nextplus 1.000000000000007 -> 1.000000000000008
ddnextp016 nextplus 1.000000000000008 -> 1.000000000000009
ddnextp017 nextplus 1.000000000000009 -> 1.000000000000010
ddnextp018 nextplus 1.000000000000010 -> 1.000000000000011
ddnextp019 nextplus 1.000000000000011 -> 1.000000000000012
ddnextp021 nextplus -0.9999999999999995 -> -0.9999999999999994
ddnextp022 nextplus -0.9999999999999996 -> -0.9999999999999995
ddnextp023 nextplus -0.9999999999999997 -> -0.9999999999999996
ddnextp024 nextplus -0.9999999999999998 -> -0.9999999999999997
ddnextp025 nextplus -0.9999999999999999 -> -0.9999999999999998
ddnextp026 nextplus -1.000000000000000 -> -0.9999999999999999
ddnextp027 nextplus -1.0 -> -0.9999999999999999
ddnextp028 nextplus -1 -> -0.9999999999999999
ddnextp029 nextplus -1.000000000000001 -> -1.000000000000000
ddnextp030 nextplus -1.000000000000002 -> -1.000000000000001
ddnextp031 nextplus -1.000000000000003 -> -1.000000000000002
ddnextp032 nextplus -1.000000000000004 -> -1.000000000000003
ddnextp033 nextplus -1.000000000000005 -> -1.000000000000004
ddnextp034 nextplus -1.000000000000006 -> -1.000000000000005
ddnextp035 nextplus -1.000000000000007 -> -1.000000000000006
ddnextp036 nextplus -1.000000000000008 -> -1.000000000000007
ddnextp037 nextplus -1.000000000000009 -> -1.000000000000008
ddnextp038 nextplus -1.000000000000010 -> -1.000000000000009
ddnextp039 nextplus -1.000000000000011 -> -1.000000000000010
ddnextp040 nextplus -1.000000000000012 -> -1.000000000000011
-- Zeros
ddnextp100 nextplus 0 -> 1E-398
ddnextp101 nextplus 0.00 -> 1E-398
ddnextp102 nextplus 0E-300 -> 1E-398
ddnextp103 nextplus 0E+300 -> 1E-398
ddnextp104 nextplus 0E+30000 -> 1E-398
ddnextp105 nextplus -0 -> 1E-398
ddnextp106 nextplus -0.00 -> 1E-398
ddnextp107 nextplus -0E-300 -> 1E-398
ddnextp108 nextplus -0E+300 -> 1E-398
ddnextp109 nextplus -0E+30000 -> 1E-398
-- specials
ddnextp150 nextplus Inf -> Infinity
ddnextp151 nextplus -Inf -> -9.999999999999999E+384
ddnextp152 nextplus NaN -> NaN
ddnextp153 nextplus sNaN -> NaN Invalid_operation
ddnextp154 nextplus NaN77 -> NaN77
ddnextp155 nextplus sNaN88 -> NaN88 Invalid_operation
ddnextp156 nextplus -NaN -> -NaN
ddnextp157 nextplus -sNaN -> -NaN Invalid_operation
ddnextp158 nextplus -NaN77 -> -NaN77
ddnextp159 nextplus -sNaN88 -> -NaN88 Invalid_operation
-- Nmax, Nmin, Ntiny, subnormals
ddnextp170 nextplus -9.999999999999999E+384 -> -9.999999999999998E+384
ddnextp171 nextplus -9.999999999999998E+384 -> -9.999999999999997E+384
ddnextp172 nextplus -1E-383 -> -9.99999999999999E-384
ddnextp173 nextplus -1.000000000000000E-383 -> -9.99999999999999E-384
ddnextp174 nextplus -9E-398 -> -8E-398
ddnextp175 nextplus -9.9E-397 -> -9.8E-397
ddnextp176 nextplus -9.99999999999E-387 -> -9.99999999998E-387
ddnextp177 nextplus -9.99999999999999E-384 -> -9.99999999999998E-384
ddnextp178 nextplus -9.99999999999998E-384 -> -9.99999999999997E-384
ddnextp179 nextplus -9.99999999999997E-384 -> -9.99999999999996E-384
ddnextp180 nextplus -0E-398 -> 1E-398
ddnextp181 nextplus -1E-398 -> -0E-398
ddnextp182 nextplus -2E-398 -> -1E-398
ddnextp183 nextplus 0E-398 -> 1E-398
ddnextp184 nextplus 1E-398 -> 2E-398
ddnextp185 nextplus 2E-398 -> 3E-398
ddnextp186 nextplus 10E-398 -> 1.1E-397
ddnextp187 nextplus 100E-398 -> 1.01E-396
ddnextp188 nextplus 100000E-398 -> 1.00001E-393
ddnextp189 nextplus 1.00000000000E-383 -> 1.000000000000001E-383
ddnextp190 nextplus 1.000000000000000E-383 -> 1.000000000000001E-383
ddnextp191 nextplus 1E-383 -> 1.000000000000001E-383
ddnextp192 nextplus 9.999999999999998E+384 -> 9.999999999999999E+384
ddnextp193 nextplus 9.999999999999999E+384 -> Infinity
-- Null tests
ddnextp900 nextplus # -> NaN Invalid_operation

View file

@ -1,374 +1,374 @@
------------------------------------------------------------------------
-- ddNextToward.decTest -- decDouble next toward rhs [754r nextafter] --
-- 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 with a scattering of numerics
ddnextt001 nexttoward 10 10 -> 10
ddnextt002 nexttoward -10 -10 -> -10
ddnextt003 nexttoward 1 10 -> 1.000000000000001
ddnextt004 nexttoward 1 -10 -> 0.9999999999999999
ddnextt005 nexttoward -1 10 -> -0.9999999999999999
ddnextt006 nexttoward -1 -10 -> -1.000000000000001
ddnextt007 nexttoward 0 10 -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt008 nexttoward 0 -10 -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt009 nexttoward 9.999999999999999E+384 +Infinity -> Infinity Overflow Inexact Rounded
ddnextt010 nexttoward -9.999999999999999E+384 -Infinity -> -Infinity Overflow Inexact Rounded
ddnextt011 nexttoward 9.999999999999999 10 -> 10.00000000000000
ddnextt012 nexttoward 10 9.999999999999999 -> 9.999999999999999
ddnextt013 nexttoward -9.999999999999999 -10 -> -10.00000000000000
ddnextt014 nexttoward -10 -9.999999999999999 -> -9.999999999999999
ddnextt015 nexttoward 9.999999999999998 10 -> 9.999999999999999
ddnextt016 nexttoward 10 9.999999999999998 -> 9.999999999999999
ddnextt017 nexttoward -9.999999999999998 -10 -> -9.999999999999999
ddnextt018 nexttoward -10 -9.999999999999998 -> -9.999999999999999
------- lhs=rhs
-- finites
ddnextt101 nexttoward 7 7 -> 7
ddnextt102 nexttoward -7 -7 -> -7
ddnextt103 nexttoward 75 75 -> 75
ddnextt104 nexttoward -75 -75 -> -75
ddnextt105 nexttoward 7.50 7.5 -> 7.50
ddnextt106 nexttoward -7.50 -7.50 -> -7.50
ddnextt107 nexttoward 7.500 7.5000 -> 7.500
ddnextt108 nexttoward -7.500 -7.5 -> -7.500
-- zeros
ddnextt111 nexttoward 0 0 -> 0
ddnextt112 nexttoward -0 -0 -> -0
ddnextt113 nexttoward 0E+4 0 -> 0E+4
ddnextt114 nexttoward -0E+4 -0 -> -0E+4
ddnextt115 nexttoward 0.00000000000 0.000000000000 -> 0E-11
ddnextt116 nexttoward -0.00000000000 -0.00 -> -0E-11
ddnextt117 nexttoward 0E-141 0 -> 0E-141
ddnextt118 nexttoward -0E-141 -000 -> -0E-141
-- full coefficients, alternating bits
ddnextt121 nexttoward 268268268 268268268 -> 268268268
ddnextt122 nexttoward -268268268 -268268268 -> -268268268
ddnextt123 nexttoward 134134134 134134134 -> 134134134
ddnextt124 nexttoward -134134134 -134134134 -> -134134134
-- Nmax, Nmin, Ntiny
ddnextt131 nexttoward 9.999999999999999E+384 9.999999999999999E+384 -> 9.999999999999999E+384
ddnextt132 nexttoward 1E-383 1E-383 -> 1E-383
ddnextt133 nexttoward 1.000000000000000E-383 1.000000000000000E-383 -> 1.000000000000000E-383
ddnextt134 nexttoward 1E-398 1E-398 -> 1E-398
ddnextt135 nexttoward -1E-398 -1E-398 -> -1E-398
ddnextt136 nexttoward -1.000000000000000E-383 -1.000000000000000E-383 -> -1.000000000000000E-383
ddnextt137 nexttoward -1E-383 -1E-383 -> -1E-383
ddnextt138 nexttoward -9.999999999999999E+384 -9.999999999999999E+384 -> -9.999999999999999E+384
------- lhs<rhs
ddnextt201 nexttoward 0.9999999999999995 Infinity -> 0.9999999999999996
ddnextt202 nexttoward 0.9999999999999996 Infinity -> 0.9999999999999997
ddnextt203 nexttoward 0.9999999999999997 Infinity -> 0.9999999999999998
ddnextt204 nexttoward 0.9999999999999998 Infinity -> 0.9999999999999999
ddnextt205 nexttoward 0.9999999999999999 Infinity -> 1.000000000000000
ddnextt206 nexttoward 1.000000000000000 Infinity -> 1.000000000000001
ddnextt207 nexttoward 1.0 Infinity -> 1.000000000000001
ddnextt208 nexttoward 1 Infinity -> 1.000000000000001
ddnextt209 nexttoward 1.000000000000001 Infinity -> 1.000000000000002
ddnextt210 nexttoward 1.000000000000002 Infinity -> 1.000000000000003
ddnextt211 nexttoward 1.000000000000003 Infinity -> 1.000000000000004
ddnextt212 nexttoward 1.000000000000004 Infinity -> 1.000000000000005
ddnextt213 nexttoward 1.000000000000005 Infinity -> 1.000000000000006
ddnextt214 nexttoward 1.000000000000006 Infinity -> 1.000000000000007
ddnextt215 nexttoward 1.000000000000007 Infinity -> 1.000000000000008
ddnextt216 nexttoward 1.000000000000008 Infinity -> 1.000000000000009
ddnextt217 nexttoward 1.000000000000009 Infinity -> 1.000000000000010
ddnextt218 nexttoward 1.000000000000010 Infinity -> 1.000000000000011
ddnextt219 nexttoward 1.000000000000011 Infinity -> 1.000000000000012
ddnextt221 nexttoward -0.9999999999999995 Infinity -> -0.9999999999999994
ddnextt222 nexttoward -0.9999999999999996 Infinity -> -0.9999999999999995
ddnextt223 nexttoward -0.9999999999999997 Infinity -> -0.9999999999999996
ddnextt224 nexttoward -0.9999999999999998 Infinity -> -0.9999999999999997
ddnextt225 nexttoward -0.9999999999999999 Infinity -> -0.9999999999999998
ddnextt226 nexttoward -1.000000000000000 Infinity -> -0.9999999999999999
ddnextt227 nexttoward -1.0 Infinity -> -0.9999999999999999
ddnextt228 nexttoward -1 Infinity -> -0.9999999999999999
ddnextt229 nexttoward -1.000000000000001 Infinity -> -1.000000000000000
ddnextt230 nexttoward -1.000000000000002 Infinity -> -1.000000000000001
ddnextt231 nexttoward -1.000000000000003 Infinity -> -1.000000000000002
ddnextt232 nexttoward -1.000000000000004 Infinity -> -1.000000000000003
ddnextt233 nexttoward -1.000000000000005 Infinity -> -1.000000000000004
ddnextt234 nexttoward -1.000000000000006 Infinity -> -1.000000000000005
ddnextt235 nexttoward -1.000000000000007 Infinity -> -1.000000000000006
ddnextt236 nexttoward -1.000000000000008 Infinity -> -1.000000000000007
ddnextt237 nexttoward -1.000000000000009 Infinity -> -1.000000000000008
ddnextt238 nexttoward -1.000000000000010 Infinity -> -1.000000000000009
ddnextt239 nexttoward -1.000000000000011 Infinity -> -1.000000000000010
ddnextt240 nexttoward -1.000000000000012 Infinity -> -1.000000000000011
-- Zeros
ddnextt300 nexttoward 0 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt301 nexttoward 0.00 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt302 nexttoward 0E-300 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt303 nexttoward 0E+300 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt304 nexttoward 0E+30000 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt305 nexttoward -0 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt306 nexttoward -0.00 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt307 nexttoward -0E-300 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt308 nexttoward -0E+300 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt309 nexttoward -0E+30000 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
-- specials
ddnextt350 nexttoward Inf Infinity -> Infinity
ddnextt351 nexttoward -Inf Infinity -> -9.999999999999999E+384
ddnextt352 nexttoward NaN Infinity -> NaN
ddnextt353 nexttoward sNaN Infinity -> NaN Invalid_operation
ddnextt354 nexttoward NaN77 Infinity -> NaN77
ddnextt355 nexttoward sNaN88 Infinity -> NaN88 Invalid_operation
ddnextt356 nexttoward -NaN Infinity -> -NaN
ddnextt357 nexttoward -sNaN Infinity -> -NaN Invalid_operation
ddnextt358 nexttoward -NaN77 Infinity -> -NaN77
ddnextt359 nexttoward -sNaN88 Infinity -> -NaN88 Invalid_operation
-- Nmax, Nmin, Ntiny, subnormals
ddnextt370 nexttoward -9.999999999999999E+384 Infinity -> -9.999999999999998E+384
ddnextt371 nexttoward -9.999999999999998E+384 Infinity -> -9.999999999999997E+384
ddnextt372 nexttoward -1E-383 Infinity -> -9.99999999999999E-384 Underflow Subnormal Inexact Rounded
ddnextt373 nexttoward -1.000000000000000E-383 Infinity -> -9.99999999999999E-384 Underflow Subnormal Inexact Rounded
ddnextt374 nexttoward -9E-398 Infinity -> -8E-398 Underflow Subnormal Inexact Rounded
ddnextt375 nexttoward -9.9E-397 Infinity -> -9.8E-397 Underflow Subnormal Inexact Rounded
ddnextt376 nexttoward -9.99999999999E-387 Infinity -> -9.99999999998E-387 Underflow Subnormal Inexact Rounded
ddnextt377 nexttoward -9.99999999999999E-384 Infinity -> -9.99999999999998E-384 Underflow Subnormal Inexact Rounded
ddnextt378 nexttoward -9.99999999999998E-384 Infinity -> -9.99999999999997E-384 Underflow Subnormal Inexact Rounded
ddnextt379 nexttoward -9.99999999999997E-384 Infinity -> -9.99999999999996E-384 Underflow Subnormal Inexact Rounded
ddnextt380 nexttoward -0E-398 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt381 nexttoward -1E-398 Infinity -> -0E-398 Underflow Subnormal Inexact Rounded Clamped
ddnextt382 nexttoward -2E-398 Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt383 nexttoward 0E-398 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt384 nexttoward 1E-398 Infinity -> 2E-398 Underflow Subnormal Inexact Rounded
ddnextt385 nexttoward 2E-398 Infinity -> 3E-398 Underflow Subnormal Inexact Rounded
ddnextt386 nexttoward 10E-398 Infinity -> 1.1E-397 Underflow Subnormal Inexact Rounded
ddnextt387 nexttoward 100E-398 Infinity -> 1.01E-396 Underflow Subnormal Inexact Rounded
ddnextt388 nexttoward 100000E-398 Infinity -> 1.00001E-393 Underflow Subnormal Inexact Rounded
ddnextt389 nexttoward 1.00000000000E-383 Infinity -> 1.000000000000001E-383
ddnextt390 nexttoward 1.000000000000000E-383 Infinity -> 1.000000000000001E-383
ddnextt391 nexttoward 1E-383 Infinity -> 1.000000000000001E-383
ddnextt392 nexttoward 9.999999999999997E+384 Infinity -> 9.999999999999998E+384
ddnextt393 nexttoward 9.999999999999998E+384 Infinity -> 9.999999999999999E+384
ddnextt394 nexttoward 9.999999999999999E+384 Infinity -> Infinity Overflow Inexact Rounded
------- lhs>rhs
ddnextt401 nexttoward 0.9999999999999995 -Infinity -> 0.9999999999999994
ddnextt402 nexttoward 0.9999999999999996 -Infinity -> 0.9999999999999995
ddnextt403 nexttoward 0.9999999999999997 -Infinity -> 0.9999999999999996
ddnextt404 nexttoward 0.9999999999999998 -Infinity -> 0.9999999999999997
ddnextt405 nexttoward 0.9999999999999999 -Infinity -> 0.9999999999999998
ddnextt406 nexttoward 1.000000000000000 -Infinity -> 0.9999999999999999
ddnextt407 nexttoward 1.0 -Infinity -> 0.9999999999999999
ddnextt408 nexttoward 1 -Infinity -> 0.9999999999999999
ddnextt409 nexttoward 1.000000000000001 -Infinity -> 1.000000000000000
ddnextt410 nexttoward 1.000000000000002 -Infinity -> 1.000000000000001
ddnextt411 nexttoward 1.000000000000003 -Infinity -> 1.000000000000002
ddnextt412 nexttoward 1.000000000000004 -Infinity -> 1.000000000000003
ddnextt413 nexttoward 1.000000000000005 -Infinity -> 1.000000000000004
ddnextt414 nexttoward 1.000000000000006 -Infinity -> 1.000000000000005
ddnextt415 nexttoward 1.000000000000007 -Infinity -> 1.000000000000006
ddnextt416 nexttoward 1.000000000000008 -Infinity -> 1.000000000000007
ddnextt417 nexttoward 1.000000000000009 -Infinity -> 1.000000000000008
ddnextt418 nexttoward 1.000000000000010 -Infinity -> 1.000000000000009
ddnextt419 nexttoward 1.000000000000011 -Infinity -> 1.000000000000010
ddnextt420 nexttoward 1.000000000000012 -Infinity -> 1.000000000000011
ddnextt421 nexttoward -0.9999999999999995 -Infinity -> -0.9999999999999996
ddnextt422 nexttoward -0.9999999999999996 -Infinity -> -0.9999999999999997
ddnextt423 nexttoward -0.9999999999999997 -Infinity -> -0.9999999999999998
ddnextt424 nexttoward -0.9999999999999998 -Infinity -> -0.9999999999999999
ddnextt425 nexttoward -0.9999999999999999 -Infinity -> -1.000000000000000
ddnextt426 nexttoward -1.000000000000000 -Infinity -> -1.000000000000001
ddnextt427 nexttoward -1.0 -Infinity -> -1.000000000000001
ddnextt428 nexttoward -1 -Infinity -> -1.000000000000001
ddnextt429 nexttoward -1.000000000000001 -Infinity -> -1.000000000000002
ddnextt430 nexttoward -1.000000000000002 -Infinity -> -1.000000000000003
ddnextt431 nexttoward -1.000000000000003 -Infinity -> -1.000000000000004
ddnextt432 nexttoward -1.000000000000004 -Infinity -> -1.000000000000005
ddnextt433 nexttoward -1.000000000000005 -Infinity -> -1.000000000000006
ddnextt434 nexttoward -1.000000000000006 -Infinity -> -1.000000000000007
ddnextt435 nexttoward -1.000000000000007 -Infinity -> -1.000000000000008
ddnextt436 nexttoward -1.000000000000008 -Infinity -> -1.000000000000009
ddnextt437 nexttoward -1.000000000000009 -Infinity -> -1.000000000000010
ddnextt438 nexttoward -1.000000000000010 -Infinity -> -1.000000000000011
ddnextt439 nexttoward -1.000000000000011 -Infinity -> -1.000000000000012
-- Zeros
ddnextt500 nexttoward -0 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt501 nexttoward 0 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt502 nexttoward 0.00 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt503 nexttoward -0.00 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt504 nexttoward 0E-300 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt505 nexttoward 0E+300 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt506 nexttoward 0E+30000 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt507 nexttoward -0E+30000 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
-- specials
ddnextt550 nexttoward Inf -Infinity -> 9.999999999999999E+384
ddnextt551 nexttoward -Inf -Infinity -> -Infinity
ddnextt552 nexttoward NaN -Infinity -> NaN
ddnextt553 nexttoward sNaN -Infinity -> NaN Invalid_operation
ddnextt554 nexttoward NaN77 -Infinity -> NaN77
ddnextt555 nexttoward sNaN88 -Infinity -> NaN88 Invalid_operation
ddnextt556 nexttoward -NaN -Infinity -> -NaN
ddnextt557 nexttoward -sNaN -Infinity -> -NaN Invalid_operation
ddnextt558 nexttoward -NaN77 -Infinity -> -NaN77
ddnextt559 nexttoward -sNaN88 -Infinity -> -NaN88 Invalid_operation
-- Nmax, Nmin, Ntiny, subnormals
ddnextt670 nexttoward 9.999999999999999E+384 -Infinity -> 9.999999999999998E+384
ddnextt671 nexttoward 9.999999999999998E+384 -Infinity -> 9.999999999999997E+384
ddnextt672 nexttoward 1E-383 -Infinity -> 9.99999999999999E-384 Underflow Subnormal Inexact Rounded
ddnextt673 nexttoward 1.000000000000000E-383 -Infinity -> 9.99999999999999E-384 Underflow Subnormal Inexact Rounded
ddnextt674 nexttoward 9E-398 -Infinity -> 8E-398 Underflow Subnormal Inexact Rounded
ddnextt675 nexttoward 9.9E-397 -Infinity -> 9.8E-397 Underflow Subnormal Inexact Rounded
ddnextt676 nexttoward 9.99999999999E-387 -Infinity -> 9.99999999998E-387 Underflow Subnormal Inexact Rounded
ddnextt677 nexttoward 9.99999999999999E-384 -Infinity -> 9.99999999999998E-384 Underflow Subnormal Inexact Rounded
ddnextt678 nexttoward 9.99999999999998E-384 -Infinity -> 9.99999999999997E-384 Underflow Subnormal Inexact Rounded
ddnextt679 nexttoward 9.99999999999997E-384 -Infinity -> 9.99999999999996E-384 Underflow Subnormal Inexact Rounded
ddnextt680 nexttoward 0E-398 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt681 nexttoward 1E-398 -Infinity -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
ddnextt682 nexttoward 2E-398 -Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt683 nexttoward -0E-398 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt684 nexttoward -1E-398 -Infinity -> -2E-398 Underflow Subnormal Inexact Rounded
ddnextt685 nexttoward -2E-398 -Infinity -> -3E-398 Underflow Subnormal Inexact Rounded
ddnextt686 nexttoward -10E-398 -Infinity -> -1.1E-397 Underflow Subnormal Inexact Rounded
ddnextt687 nexttoward -100E-398 -Infinity -> -1.01E-396 Underflow Subnormal Inexact Rounded
ddnextt688 nexttoward -100000E-398 -Infinity -> -1.00001E-393 Underflow Subnormal Inexact Rounded
ddnextt689 nexttoward -1.00000000000E-383 -Infinity -> -1.000000000000001E-383
ddnextt690 nexttoward -1.000000000000000E-383 -Infinity -> -1.000000000000001E-383
ddnextt691 nexttoward -1E-383 -Infinity -> -1.000000000000001E-383
ddnextt692 nexttoward -9.999999999999998E+384 -Infinity -> -9.999999999999999E+384
ddnextt693 nexttoward -9.999999999999999E+384 -Infinity -> -Infinity Overflow Inexact Rounded
------- Specials
ddnextt780 nexttoward -Inf -Inf -> -Infinity
ddnextt781 nexttoward -Inf -1000 -> -9.999999999999999E+384
ddnextt782 nexttoward -Inf -1 -> -9.999999999999999E+384
ddnextt783 nexttoward -Inf -0 -> -9.999999999999999E+384
ddnextt784 nexttoward -Inf 0 -> -9.999999999999999E+384
ddnextt785 nexttoward -Inf 1 -> -9.999999999999999E+384
ddnextt786 nexttoward -Inf 1000 -> -9.999999999999999E+384
ddnextt787 nexttoward -1000 -Inf -> -1000.000000000001
ddnextt788 nexttoward -Inf -Inf -> -Infinity
ddnextt789 nexttoward -1 -Inf -> -1.000000000000001
ddnextt790 nexttoward -0 -Inf -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt791 nexttoward 0 -Inf -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt792 nexttoward 1 -Inf -> 0.9999999999999999
ddnextt793 nexttoward 1000 -Inf -> 999.9999999999999
ddnextt794 nexttoward Inf -Inf -> 9.999999999999999E+384
ddnextt800 nexttoward Inf -Inf -> 9.999999999999999E+384
ddnextt801 nexttoward Inf -1000 -> 9.999999999999999E+384
ddnextt802 nexttoward Inf -1 -> 9.999999999999999E+384
ddnextt803 nexttoward Inf -0 -> 9.999999999999999E+384
ddnextt804 nexttoward Inf 0 -> 9.999999999999999E+384
ddnextt805 nexttoward Inf 1 -> 9.999999999999999E+384
ddnextt806 nexttoward Inf 1000 -> 9.999999999999999E+384
ddnextt807 nexttoward Inf Inf -> Infinity
ddnextt808 nexttoward -1000 Inf -> -999.9999999999999
ddnextt809 nexttoward -Inf Inf -> -9.999999999999999E+384
ddnextt810 nexttoward -1 Inf -> -0.9999999999999999
ddnextt811 nexttoward -0 Inf -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt812 nexttoward 0 Inf -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt813 nexttoward 1 Inf -> 1.000000000000001
ddnextt814 nexttoward 1000 Inf -> 1000.000000000001
ddnextt815 nexttoward Inf Inf -> Infinity
ddnextt821 nexttoward NaN -Inf -> NaN
ddnextt822 nexttoward NaN -1000 -> NaN
ddnextt823 nexttoward NaN -1 -> NaN
ddnextt824 nexttoward NaN -0 -> NaN
ddnextt825 nexttoward NaN 0 -> NaN
ddnextt826 nexttoward NaN 1 -> NaN
ddnextt827 nexttoward NaN 1000 -> NaN
ddnextt828 nexttoward NaN Inf -> NaN
ddnextt829 nexttoward NaN NaN -> NaN
ddnextt830 nexttoward -Inf NaN -> NaN
ddnextt831 nexttoward -1000 NaN -> NaN
ddnextt832 nexttoward -1 NaN -> NaN
ddnextt833 nexttoward -0 NaN -> NaN
ddnextt834 nexttoward 0 NaN -> NaN
ddnextt835 nexttoward 1 NaN -> NaN
ddnextt836 nexttoward 1000 NaN -> NaN
ddnextt837 nexttoward Inf NaN -> NaN
ddnextt841 nexttoward sNaN -Inf -> NaN Invalid_operation
ddnextt842 nexttoward sNaN -1000 -> NaN Invalid_operation
ddnextt843 nexttoward sNaN -1 -> NaN Invalid_operation
ddnextt844 nexttoward sNaN -0 -> NaN Invalid_operation
ddnextt845 nexttoward sNaN 0 -> NaN Invalid_operation
ddnextt846 nexttoward sNaN 1 -> NaN Invalid_operation
ddnextt847 nexttoward sNaN 1000 -> NaN Invalid_operation
ddnextt848 nexttoward sNaN NaN -> NaN Invalid_operation
ddnextt849 nexttoward sNaN sNaN -> NaN Invalid_operation
ddnextt850 nexttoward NaN sNaN -> NaN Invalid_operation
ddnextt851 nexttoward -Inf sNaN -> NaN Invalid_operation
ddnextt852 nexttoward -1000 sNaN -> NaN Invalid_operation
ddnextt853 nexttoward -1 sNaN -> NaN Invalid_operation
ddnextt854 nexttoward -0 sNaN -> NaN Invalid_operation
ddnextt855 nexttoward 0 sNaN -> NaN Invalid_operation
ddnextt856 nexttoward 1 sNaN -> NaN Invalid_operation
ddnextt857 nexttoward 1000 sNaN -> NaN Invalid_operation
ddnextt858 nexttoward Inf sNaN -> NaN Invalid_operation
ddnextt859 nexttoward NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
ddnextt861 nexttoward NaN1 -Inf -> NaN1
ddnextt862 nexttoward +NaN2 -1000 -> NaN2
ddnextt863 nexttoward NaN3 1000 -> NaN3
ddnextt864 nexttoward NaN4 Inf -> NaN4
ddnextt865 nexttoward NaN5 +NaN6 -> NaN5
ddnextt866 nexttoward -Inf NaN7 -> NaN7
ddnextt867 nexttoward -1000 NaN8 -> NaN8
ddnextt868 nexttoward 1000 NaN9 -> NaN9
ddnextt869 nexttoward Inf +NaN10 -> NaN10
ddnextt871 nexttoward sNaN11 -Inf -> NaN11 Invalid_operation
ddnextt872 nexttoward sNaN12 -1000 -> NaN12 Invalid_operation
ddnextt873 nexttoward sNaN13 1000 -> NaN13 Invalid_operation
ddnextt874 nexttoward sNaN14 NaN17 -> NaN14 Invalid_operation
ddnextt875 nexttoward sNaN15 sNaN18 -> NaN15 Invalid_operation
ddnextt876 nexttoward NaN16 sNaN19 -> NaN19 Invalid_operation
ddnextt877 nexttoward -Inf +sNaN20 -> NaN20 Invalid_operation
ddnextt878 nexttoward -1000 sNaN21 -> NaN21 Invalid_operation
ddnextt879 nexttoward 1000 sNaN22 -> NaN22 Invalid_operation
ddnextt880 nexttoward Inf sNaN23 -> NaN23 Invalid_operation
ddnextt881 nexttoward +NaN25 +sNaN24 -> NaN24 Invalid_operation
ddnextt882 nexttoward -NaN26 NaN28 -> -NaN26
ddnextt883 nexttoward -sNaN27 sNaN29 -> -NaN27 Invalid_operation
ddnextt884 nexttoward 1000 -NaN30 -> -NaN30
ddnextt885 nexttoward 1000 -sNaN31 -> -NaN31 Invalid_operation
-- Null tests
ddnextt900 nexttoward 1 # -> NaN Invalid_operation
ddnextt901 nexttoward # 1 -> NaN Invalid_operation
------------------------------------------------------------------------
-- ddNextToward.decTest -- decDouble next toward rhs [754r nextafter] --
-- 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 with a scattering of numerics
ddnextt001 nexttoward 10 10 -> 10
ddnextt002 nexttoward -10 -10 -> -10
ddnextt003 nexttoward 1 10 -> 1.000000000000001
ddnextt004 nexttoward 1 -10 -> 0.9999999999999999
ddnextt005 nexttoward -1 10 -> -0.9999999999999999
ddnextt006 nexttoward -1 -10 -> -1.000000000000001
ddnextt007 nexttoward 0 10 -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt008 nexttoward 0 -10 -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt009 nexttoward 9.999999999999999E+384 +Infinity -> Infinity Overflow Inexact Rounded
ddnextt010 nexttoward -9.999999999999999E+384 -Infinity -> -Infinity Overflow Inexact Rounded
ddnextt011 nexttoward 9.999999999999999 10 -> 10.00000000000000
ddnextt012 nexttoward 10 9.999999999999999 -> 9.999999999999999
ddnextt013 nexttoward -9.999999999999999 -10 -> -10.00000000000000
ddnextt014 nexttoward -10 -9.999999999999999 -> -9.999999999999999
ddnextt015 nexttoward 9.999999999999998 10 -> 9.999999999999999
ddnextt016 nexttoward 10 9.999999999999998 -> 9.999999999999999
ddnextt017 nexttoward -9.999999999999998 -10 -> -9.999999999999999
ddnextt018 nexttoward -10 -9.999999999999998 -> -9.999999999999999
------- lhs=rhs
-- finites
ddnextt101 nexttoward 7 7 -> 7
ddnextt102 nexttoward -7 -7 -> -7
ddnextt103 nexttoward 75 75 -> 75
ddnextt104 nexttoward -75 -75 -> -75
ddnextt105 nexttoward 7.50 7.5 -> 7.50
ddnextt106 nexttoward -7.50 -7.50 -> -7.50
ddnextt107 nexttoward 7.500 7.5000 -> 7.500
ddnextt108 nexttoward -7.500 -7.5 -> -7.500
-- zeros
ddnextt111 nexttoward 0 0 -> 0
ddnextt112 nexttoward -0 -0 -> -0
ddnextt113 nexttoward 0E+4 0 -> 0E+4
ddnextt114 nexttoward -0E+4 -0 -> -0E+4
ddnextt115 nexttoward 0.00000000000 0.000000000000 -> 0E-11
ddnextt116 nexttoward -0.00000000000 -0.00 -> -0E-11
ddnextt117 nexttoward 0E-141 0 -> 0E-141
ddnextt118 nexttoward -0E-141 -000 -> -0E-141
-- full coefficients, alternating bits
ddnextt121 nexttoward 268268268 268268268 -> 268268268
ddnextt122 nexttoward -268268268 -268268268 -> -268268268
ddnextt123 nexttoward 134134134 134134134 -> 134134134
ddnextt124 nexttoward -134134134 -134134134 -> -134134134
-- Nmax, Nmin, Ntiny
ddnextt131 nexttoward 9.999999999999999E+384 9.999999999999999E+384 -> 9.999999999999999E+384
ddnextt132 nexttoward 1E-383 1E-383 -> 1E-383
ddnextt133 nexttoward 1.000000000000000E-383 1.000000000000000E-383 -> 1.000000000000000E-383
ddnextt134 nexttoward 1E-398 1E-398 -> 1E-398
ddnextt135 nexttoward -1E-398 -1E-398 -> -1E-398
ddnextt136 nexttoward -1.000000000000000E-383 -1.000000000000000E-383 -> -1.000000000000000E-383
ddnextt137 nexttoward -1E-383 -1E-383 -> -1E-383
ddnextt138 nexttoward -9.999999999999999E+384 -9.999999999999999E+384 -> -9.999999999999999E+384
------- lhs<rhs
ddnextt201 nexttoward 0.9999999999999995 Infinity -> 0.9999999999999996
ddnextt202 nexttoward 0.9999999999999996 Infinity -> 0.9999999999999997
ddnextt203 nexttoward 0.9999999999999997 Infinity -> 0.9999999999999998
ddnextt204 nexttoward 0.9999999999999998 Infinity -> 0.9999999999999999
ddnextt205 nexttoward 0.9999999999999999 Infinity -> 1.000000000000000
ddnextt206 nexttoward 1.000000000000000 Infinity -> 1.000000000000001
ddnextt207 nexttoward 1.0 Infinity -> 1.000000000000001
ddnextt208 nexttoward 1 Infinity -> 1.000000000000001
ddnextt209 nexttoward 1.000000000000001 Infinity -> 1.000000000000002
ddnextt210 nexttoward 1.000000000000002 Infinity -> 1.000000000000003
ddnextt211 nexttoward 1.000000000000003 Infinity -> 1.000000000000004
ddnextt212 nexttoward 1.000000000000004 Infinity -> 1.000000000000005
ddnextt213 nexttoward 1.000000000000005 Infinity -> 1.000000000000006
ddnextt214 nexttoward 1.000000000000006 Infinity -> 1.000000000000007
ddnextt215 nexttoward 1.000000000000007 Infinity -> 1.000000000000008
ddnextt216 nexttoward 1.000000000000008 Infinity -> 1.000000000000009
ddnextt217 nexttoward 1.000000000000009 Infinity -> 1.000000000000010
ddnextt218 nexttoward 1.000000000000010 Infinity -> 1.000000000000011
ddnextt219 nexttoward 1.000000000000011 Infinity -> 1.000000000000012
ddnextt221 nexttoward -0.9999999999999995 Infinity -> -0.9999999999999994
ddnextt222 nexttoward -0.9999999999999996 Infinity -> -0.9999999999999995
ddnextt223 nexttoward -0.9999999999999997 Infinity -> -0.9999999999999996
ddnextt224 nexttoward -0.9999999999999998 Infinity -> -0.9999999999999997
ddnextt225 nexttoward -0.9999999999999999 Infinity -> -0.9999999999999998
ddnextt226 nexttoward -1.000000000000000 Infinity -> -0.9999999999999999
ddnextt227 nexttoward -1.0 Infinity -> -0.9999999999999999
ddnextt228 nexttoward -1 Infinity -> -0.9999999999999999
ddnextt229 nexttoward -1.000000000000001 Infinity -> -1.000000000000000
ddnextt230 nexttoward -1.000000000000002 Infinity -> -1.000000000000001
ddnextt231 nexttoward -1.000000000000003 Infinity -> -1.000000000000002
ddnextt232 nexttoward -1.000000000000004 Infinity -> -1.000000000000003
ddnextt233 nexttoward -1.000000000000005 Infinity -> -1.000000000000004
ddnextt234 nexttoward -1.000000000000006 Infinity -> -1.000000000000005
ddnextt235 nexttoward -1.000000000000007 Infinity -> -1.000000000000006
ddnextt236 nexttoward -1.000000000000008 Infinity -> -1.000000000000007
ddnextt237 nexttoward -1.000000000000009 Infinity -> -1.000000000000008
ddnextt238 nexttoward -1.000000000000010 Infinity -> -1.000000000000009
ddnextt239 nexttoward -1.000000000000011 Infinity -> -1.000000000000010
ddnextt240 nexttoward -1.000000000000012 Infinity -> -1.000000000000011
-- Zeros
ddnextt300 nexttoward 0 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt301 nexttoward 0.00 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt302 nexttoward 0E-300 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt303 nexttoward 0E+300 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt304 nexttoward 0E+30000 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt305 nexttoward -0 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt306 nexttoward -0.00 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt307 nexttoward -0E-300 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt308 nexttoward -0E+300 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt309 nexttoward -0E+30000 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
-- specials
ddnextt350 nexttoward Inf Infinity -> Infinity
ddnextt351 nexttoward -Inf Infinity -> -9.999999999999999E+384
ddnextt352 nexttoward NaN Infinity -> NaN
ddnextt353 nexttoward sNaN Infinity -> NaN Invalid_operation
ddnextt354 nexttoward NaN77 Infinity -> NaN77
ddnextt355 nexttoward sNaN88 Infinity -> NaN88 Invalid_operation
ddnextt356 nexttoward -NaN Infinity -> -NaN
ddnextt357 nexttoward -sNaN Infinity -> -NaN Invalid_operation
ddnextt358 nexttoward -NaN77 Infinity -> -NaN77
ddnextt359 nexttoward -sNaN88 Infinity -> -NaN88 Invalid_operation
-- Nmax, Nmin, Ntiny, subnormals
ddnextt370 nexttoward -9.999999999999999E+384 Infinity -> -9.999999999999998E+384
ddnextt371 nexttoward -9.999999999999998E+384 Infinity -> -9.999999999999997E+384
ddnextt372 nexttoward -1E-383 Infinity -> -9.99999999999999E-384 Underflow Subnormal Inexact Rounded
ddnextt373 nexttoward -1.000000000000000E-383 Infinity -> -9.99999999999999E-384 Underflow Subnormal Inexact Rounded
ddnextt374 nexttoward -9E-398 Infinity -> -8E-398 Underflow Subnormal Inexact Rounded
ddnextt375 nexttoward -9.9E-397 Infinity -> -9.8E-397 Underflow Subnormal Inexact Rounded
ddnextt376 nexttoward -9.99999999999E-387 Infinity -> -9.99999999998E-387 Underflow Subnormal Inexact Rounded
ddnextt377 nexttoward -9.99999999999999E-384 Infinity -> -9.99999999999998E-384 Underflow Subnormal Inexact Rounded
ddnextt378 nexttoward -9.99999999999998E-384 Infinity -> -9.99999999999997E-384 Underflow Subnormal Inexact Rounded
ddnextt379 nexttoward -9.99999999999997E-384 Infinity -> -9.99999999999996E-384 Underflow Subnormal Inexact Rounded
ddnextt380 nexttoward -0E-398 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt381 nexttoward -1E-398 Infinity -> -0E-398 Underflow Subnormal Inexact Rounded Clamped
ddnextt382 nexttoward -2E-398 Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt383 nexttoward 0E-398 Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt384 nexttoward 1E-398 Infinity -> 2E-398 Underflow Subnormal Inexact Rounded
ddnextt385 nexttoward 2E-398 Infinity -> 3E-398 Underflow Subnormal Inexact Rounded
ddnextt386 nexttoward 10E-398 Infinity -> 1.1E-397 Underflow Subnormal Inexact Rounded
ddnextt387 nexttoward 100E-398 Infinity -> 1.01E-396 Underflow Subnormal Inexact Rounded
ddnextt388 nexttoward 100000E-398 Infinity -> 1.00001E-393 Underflow Subnormal Inexact Rounded
ddnextt389 nexttoward 1.00000000000E-383 Infinity -> 1.000000000000001E-383
ddnextt390 nexttoward 1.000000000000000E-383 Infinity -> 1.000000000000001E-383
ddnextt391 nexttoward 1E-383 Infinity -> 1.000000000000001E-383
ddnextt392 nexttoward 9.999999999999997E+384 Infinity -> 9.999999999999998E+384
ddnextt393 nexttoward 9.999999999999998E+384 Infinity -> 9.999999999999999E+384
ddnextt394 nexttoward 9.999999999999999E+384 Infinity -> Infinity Overflow Inexact Rounded
------- lhs>rhs
ddnextt401 nexttoward 0.9999999999999995 -Infinity -> 0.9999999999999994
ddnextt402 nexttoward 0.9999999999999996 -Infinity -> 0.9999999999999995
ddnextt403 nexttoward 0.9999999999999997 -Infinity -> 0.9999999999999996
ddnextt404 nexttoward 0.9999999999999998 -Infinity -> 0.9999999999999997
ddnextt405 nexttoward 0.9999999999999999 -Infinity -> 0.9999999999999998
ddnextt406 nexttoward 1.000000000000000 -Infinity -> 0.9999999999999999
ddnextt407 nexttoward 1.0 -Infinity -> 0.9999999999999999
ddnextt408 nexttoward 1 -Infinity -> 0.9999999999999999
ddnextt409 nexttoward 1.000000000000001 -Infinity -> 1.000000000000000
ddnextt410 nexttoward 1.000000000000002 -Infinity -> 1.000000000000001
ddnextt411 nexttoward 1.000000000000003 -Infinity -> 1.000000000000002
ddnextt412 nexttoward 1.000000000000004 -Infinity -> 1.000000000000003
ddnextt413 nexttoward 1.000000000000005 -Infinity -> 1.000000000000004
ddnextt414 nexttoward 1.000000000000006 -Infinity -> 1.000000000000005
ddnextt415 nexttoward 1.000000000000007 -Infinity -> 1.000000000000006
ddnextt416 nexttoward 1.000000000000008 -Infinity -> 1.000000000000007
ddnextt417 nexttoward 1.000000000000009 -Infinity -> 1.000000000000008
ddnextt418 nexttoward 1.000000000000010 -Infinity -> 1.000000000000009
ddnextt419 nexttoward 1.000000000000011 -Infinity -> 1.000000000000010
ddnextt420 nexttoward 1.000000000000012 -Infinity -> 1.000000000000011
ddnextt421 nexttoward -0.9999999999999995 -Infinity -> -0.9999999999999996
ddnextt422 nexttoward -0.9999999999999996 -Infinity -> -0.9999999999999997
ddnextt423 nexttoward -0.9999999999999997 -Infinity -> -0.9999999999999998
ddnextt424 nexttoward -0.9999999999999998 -Infinity -> -0.9999999999999999
ddnextt425 nexttoward -0.9999999999999999 -Infinity -> -1.000000000000000
ddnextt426 nexttoward -1.000000000000000 -Infinity -> -1.000000000000001
ddnextt427 nexttoward -1.0 -Infinity -> -1.000000000000001
ddnextt428 nexttoward -1 -Infinity -> -1.000000000000001
ddnextt429 nexttoward -1.000000000000001 -Infinity -> -1.000000000000002
ddnextt430 nexttoward -1.000000000000002 -Infinity -> -1.000000000000003
ddnextt431 nexttoward -1.000000000000003 -Infinity -> -1.000000000000004
ddnextt432 nexttoward -1.000000000000004 -Infinity -> -1.000000000000005
ddnextt433 nexttoward -1.000000000000005 -Infinity -> -1.000000000000006
ddnextt434 nexttoward -1.000000000000006 -Infinity -> -1.000000000000007
ddnextt435 nexttoward -1.000000000000007 -Infinity -> -1.000000000000008
ddnextt436 nexttoward -1.000000000000008 -Infinity -> -1.000000000000009
ddnextt437 nexttoward -1.000000000000009 -Infinity -> -1.000000000000010
ddnextt438 nexttoward -1.000000000000010 -Infinity -> -1.000000000000011
ddnextt439 nexttoward -1.000000000000011 -Infinity -> -1.000000000000012
-- Zeros
ddnextt500 nexttoward -0 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt501 nexttoward 0 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt502 nexttoward 0.00 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt503 nexttoward -0.00 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt504 nexttoward 0E-300 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt505 nexttoward 0E+300 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt506 nexttoward 0E+30000 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt507 nexttoward -0E+30000 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
-- specials
ddnextt550 nexttoward Inf -Infinity -> 9.999999999999999E+384
ddnextt551 nexttoward -Inf -Infinity -> -Infinity
ddnextt552 nexttoward NaN -Infinity -> NaN
ddnextt553 nexttoward sNaN -Infinity -> NaN Invalid_operation
ddnextt554 nexttoward NaN77 -Infinity -> NaN77
ddnextt555 nexttoward sNaN88 -Infinity -> NaN88 Invalid_operation
ddnextt556 nexttoward -NaN -Infinity -> -NaN
ddnextt557 nexttoward -sNaN -Infinity -> -NaN Invalid_operation
ddnextt558 nexttoward -NaN77 -Infinity -> -NaN77
ddnextt559 nexttoward -sNaN88 -Infinity -> -NaN88 Invalid_operation
-- Nmax, Nmin, Ntiny, subnormals
ddnextt670 nexttoward 9.999999999999999E+384 -Infinity -> 9.999999999999998E+384
ddnextt671 nexttoward 9.999999999999998E+384 -Infinity -> 9.999999999999997E+384
ddnextt672 nexttoward 1E-383 -Infinity -> 9.99999999999999E-384 Underflow Subnormal Inexact Rounded
ddnextt673 nexttoward 1.000000000000000E-383 -Infinity -> 9.99999999999999E-384 Underflow Subnormal Inexact Rounded
ddnextt674 nexttoward 9E-398 -Infinity -> 8E-398 Underflow Subnormal Inexact Rounded
ddnextt675 nexttoward 9.9E-397 -Infinity -> 9.8E-397 Underflow Subnormal Inexact Rounded
ddnextt676 nexttoward 9.99999999999E-387 -Infinity -> 9.99999999998E-387 Underflow Subnormal Inexact Rounded
ddnextt677 nexttoward 9.99999999999999E-384 -Infinity -> 9.99999999999998E-384 Underflow Subnormal Inexact Rounded
ddnextt678 nexttoward 9.99999999999998E-384 -Infinity -> 9.99999999999997E-384 Underflow Subnormal Inexact Rounded
ddnextt679 nexttoward 9.99999999999997E-384 -Infinity -> 9.99999999999996E-384 Underflow Subnormal Inexact Rounded
ddnextt680 nexttoward 0E-398 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt681 nexttoward 1E-398 -Infinity -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
ddnextt682 nexttoward 2E-398 -Infinity -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt683 nexttoward -0E-398 -Infinity -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt684 nexttoward -1E-398 -Infinity -> -2E-398 Underflow Subnormal Inexact Rounded
ddnextt685 nexttoward -2E-398 -Infinity -> -3E-398 Underflow Subnormal Inexact Rounded
ddnextt686 nexttoward -10E-398 -Infinity -> -1.1E-397 Underflow Subnormal Inexact Rounded
ddnextt687 nexttoward -100E-398 -Infinity -> -1.01E-396 Underflow Subnormal Inexact Rounded
ddnextt688 nexttoward -100000E-398 -Infinity -> -1.00001E-393 Underflow Subnormal Inexact Rounded
ddnextt689 nexttoward -1.00000000000E-383 -Infinity -> -1.000000000000001E-383
ddnextt690 nexttoward -1.000000000000000E-383 -Infinity -> -1.000000000000001E-383
ddnextt691 nexttoward -1E-383 -Infinity -> -1.000000000000001E-383
ddnextt692 nexttoward -9.999999999999998E+384 -Infinity -> -9.999999999999999E+384
ddnextt693 nexttoward -9.999999999999999E+384 -Infinity -> -Infinity Overflow Inexact Rounded
------- Specials
ddnextt780 nexttoward -Inf -Inf -> -Infinity
ddnextt781 nexttoward -Inf -1000 -> -9.999999999999999E+384
ddnextt782 nexttoward -Inf -1 -> -9.999999999999999E+384
ddnextt783 nexttoward -Inf -0 -> -9.999999999999999E+384
ddnextt784 nexttoward -Inf 0 -> -9.999999999999999E+384
ddnextt785 nexttoward -Inf 1 -> -9.999999999999999E+384
ddnextt786 nexttoward -Inf 1000 -> -9.999999999999999E+384
ddnextt787 nexttoward -1000 -Inf -> -1000.000000000001
ddnextt788 nexttoward -Inf -Inf -> -Infinity
ddnextt789 nexttoward -1 -Inf -> -1.000000000000001
ddnextt790 nexttoward -0 -Inf -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt791 nexttoward 0 -Inf -> -1E-398 Underflow Subnormal Inexact Rounded
ddnextt792 nexttoward 1 -Inf -> 0.9999999999999999
ddnextt793 nexttoward 1000 -Inf -> 999.9999999999999
ddnextt794 nexttoward Inf -Inf -> 9.999999999999999E+384
ddnextt800 nexttoward Inf -Inf -> 9.999999999999999E+384
ddnextt801 nexttoward Inf -1000 -> 9.999999999999999E+384
ddnextt802 nexttoward Inf -1 -> 9.999999999999999E+384
ddnextt803 nexttoward Inf -0 -> 9.999999999999999E+384
ddnextt804 nexttoward Inf 0 -> 9.999999999999999E+384
ddnextt805 nexttoward Inf 1 -> 9.999999999999999E+384
ddnextt806 nexttoward Inf 1000 -> 9.999999999999999E+384
ddnextt807 nexttoward Inf Inf -> Infinity
ddnextt808 nexttoward -1000 Inf -> -999.9999999999999
ddnextt809 nexttoward -Inf Inf -> -9.999999999999999E+384
ddnextt810 nexttoward -1 Inf -> -0.9999999999999999
ddnextt811 nexttoward -0 Inf -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt812 nexttoward 0 Inf -> 1E-398 Underflow Subnormal Inexact Rounded
ddnextt813 nexttoward 1 Inf -> 1.000000000000001
ddnextt814 nexttoward 1000 Inf -> 1000.000000000001
ddnextt815 nexttoward Inf Inf -> Infinity
ddnextt821 nexttoward NaN -Inf -> NaN
ddnextt822 nexttoward NaN -1000 -> NaN
ddnextt823 nexttoward NaN -1 -> NaN
ddnextt824 nexttoward NaN -0 -> NaN
ddnextt825 nexttoward NaN 0 -> NaN
ddnextt826 nexttoward NaN 1 -> NaN
ddnextt827 nexttoward NaN 1000 -> NaN
ddnextt828 nexttoward NaN Inf -> NaN
ddnextt829 nexttoward NaN NaN -> NaN
ddnextt830 nexttoward -Inf NaN -> NaN
ddnextt831 nexttoward -1000 NaN -> NaN
ddnextt832 nexttoward -1 NaN -> NaN
ddnextt833 nexttoward -0 NaN -> NaN
ddnextt834 nexttoward 0 NaN -> NaN
ddnextt835 nexttoward 1 NaN -> NaN
ddnextt836 nexttoward 1000 NaN -> NaN
ddnextt837 nexttoward Inf NaN -> NaN
ddnextt841 nexttoward sNaN -Inf -> NaN Invalid_operation
ddnextt842 nexttoward sNaN -1000 -> NaN Invalid_operation
ddnextt843 nexttoward sNaN -1 -> NaN Invalid_operation
ddnextt844 nexttoward sNaN -0 -> NaN Invalid_operation
ddnextt845 nexttoward sNaN 0 -> NaN Invalid_operation
ddnextt846 nexttoward sNaN 1 -> NaN Invalid_operation
ddnextt847 nexttoward sNaN 1000 -> NaN Invalid_operation
ddnextt848 nexttoward sNaN NaN -> NaN Invalid_operation
ddnextt849 nexttoward sNaN sNaN -> NaN Invalid_operation
ddnextt850 nexttoward NaN sNaN -> NaN Invalid_operation
ddnextt851 nexttoward -Inf sNaN -> NaN Invalid_operation
ddnextt852 nexttoward -1000 sNaN -> NaN Invalid_operation
ddnextt853 nexttoward -1 sNaN -> NaN Invalid_operation
ddnextt854 nexttoward -0 sNaN -> NaN Invalid_operation
ddnextt855 nexttoward 0 sNaN -> NaN Invalid_operation
ddnextt856 nexttoward 1 sNaN -> NaN Invalid_operation
ddnextt857 nexttoward 1000 sNaN -> NaN Invalid_operation
ddnextt858 nexttoward Inf sNaN -> NaN Invalid_operation
ddnextt859 nexttoward NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
ddnextt861 nexttoward NaN1 -Inf -> NaN1
ddnextt862 nexttoward +NaN2 -1000 -> NaN2
ddnextt863 nexttoward NaN3 1000 -> NaN3
ddnextt864 nexttoward NaN4 Inf -> NaN4
ddnextt865 nexttoward NaN5 +NaN6 -> NaN5
ddnextt866 nexttoward -Inf NaN7 -> NaN7
ddnextt867 nexttoward -1000 NaN8 -> NaN8
ddnextt868 nexttoward 1000 NaN9 -> NaN9
ddnextt869 nexttoward Inf +NaN10 -> NaN10
ddnextt871 nexttoward sNaN11 -Inf -> NaN11 Invalid_operation
ddnextt872 nexttoward sNaN12 -1000 -> NaN12 Invalid_operation
ddnextt873 nexttoward sNaN13 1000 -> NaN13 Invalid_operation
ddnextt874 nexttoward sNaN14 NaN17 -> NaN14 Invalid_operation
ddnextt875 nexttoward sNaN15 sNaN18 -> NaN15 Invalid_operation
ddnextt876 nexttoward NaN16 sNaN19 -> NaN19 Invalid_operation
ddnextt877 nexttoward -Inf +sNaN20 -> NaN20 Invalid_operation
ddnextt878 nexttoward -1000 sNaN21 -> NaN21 Invalid_operation
ddnextt879 nexttoward 1000 sNaN22 -> NaN22 Invalid_operation
ddnextt880 nexttoward Inf sNaN23 -> NaN23 Invalid_operation
ddnextt881 nexttoward +NaN25 +sNaN24 -> NaN24 Invalid_operation
ddnextt882 nexttoward -NaN26 NaN28 -> -NaN26
ddnextt883 nexttoward -sNaN27 sNaN29 -> -NaN27 Invalid_operation
ddnextt884 nexttoward 1000 -NaN30 -> -NaN30
ddnextt885 nexttoward 1000 -sNaN31 -> -NaN31 Invalid_operation
-- Null tests
ddnextt900 nexttoward 1 # -> NaN Invalid_operation
ddnextt901 nexttoward # 1 -> NaN Invalid_operation

View file

@ -1,292 +1,292 @@
------------------------------------------------------------------------
-- ddOr.decTest -- digitwise logical OR 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)
ddor001 or 0 0 -> 0
ddor002 or 0 1 -> 1
ddor003 or 1 0 -> 1
ddor004 or 1 1 -> 1
ddor005 or 1100 1010 -> 1110
-- and at msd and msd-1
ddor006 or 0000000000000000 0000000000000000 -> 0
ddor007 or 0000000000000000 1000000000000000 -> 1000000000000000
ddor008 or 1000000000000000 0000000000000000 -> 1000000000000000
ddor009 or 1000000000000000 1000000000000000 -> 1000000000000000
ddor010 or 0000000000000000 0000000000000000 -> 0
ddor011 or 0000000000000000 0100000000000000 -> 100000000000000
ddor012 or 0100000000000000 0000000000000000 -> 100000000000000
ddor013 or 0100000000000000 0100000000000000 -> 100000000000000
-- Various lengths
-- 1234567890123456 1234567890123456 1234567890123456
ddor020 or 1111111111111111 1111111111111111 -> 1111111111111111
ddor021 or 111111111111111 111111111111111 -> 111111111111111
ddor022 or 11111111111111 11111111111111 -> 11111111111111
ddor023 or 1111111111111 1111111111111 -> 1111111111111
ddor024 or 111111111111 111111111111 -> 111111111111
ddor025 or 11111111111 11111111111 -> 11111111111
ddor026 or 1111111111 1111111111 -> 1111111111
ddor027 or 111111111 111111111 -> 111111111
ddor028 or 11111111 11111111 -> 11111111
ddor029 or 1111111 1111111 -> 1111111
ddor030 or 111111 111111 -> 111111
ddor031 or 11111 11111 -> 11111
ddor032 or 1111 1111 -> 1111
ddor033 or 111 111 -> 111
ddor034 or 11 11 -> 11
ddor035 or 1 1 -> 1
ddor036 or 0 0 -> 0
ddor042 or 111111110000000 1111111110000000 -> 1111111110000000
ddor043 or 11111110000000 1000000100000000 -> 1011111110000000
ddor044 or 1111110000000 1000001000000000 -> 1001111110000000
ddor045 or 111110000000 1000010000000000 -> 1000111110000000
ddor046 or 11110000000 1000100000000000 -> 1000111110000000
ddor047 or 1110000000 1001000000000000 -> 1001001110000000
ddor048 or 110000000 1010000000000000 -> 1010000110000000
ddor049 or 10000000 1100000000000000 -> 1100000010000000
ddor090 or 011111111 111101111 -> 111111111
ddor091 or 101111111 111101111 -> 111111111
ddor092 or 110111111 111101111 -> 111111111
ddor093 or 111011111 111101111 -> 111111111
ddor094 or 111101111 111101111 -> 111101111
ddor095 or 111110111 111101111 -> 111111111
ddor096 or 111111011 111101111 -> 111111111
ddor097 or 111111101 111101111 -> 111111111
ddor098 or 111111110 111101111 -> 111111111
ddor100 or 111101111 011111111 -> 111111111
ddor101 or 111101111 101111111 -> 111111111
ddor102 or 111101111 110111111 -> 111111111
ddor103 or 111101111 111011111 -> 111111111
ddor104 or 111101111 111101111 -> 111101111
ddor105 or 111101111 111110111 -> 111111111
ddor106 or 111101111 111111011 -> 111111111
ddor107 or 111101111 111111101 -> 111111111
ddor108 or 111101111 111111110 -> 111111111
-- non-0/1 should not be accepted, nor should signs
ddor220 or 111111112 111111111 -> NaN Invalid_operation
ddor221 or 333333333 333333333 -> NaN Invalid_operation
ddor222 or 555555555 555555555 -> NaN Invalid_operation
ddor223 or 777777777 777777777 -> NaN Invalid_operation
ddor224 or 999999999 999999999 -> NaN Invalid_operation
ddor225 or 222222222 999999999 -> NaN Invalid_operation
ddor226 or 444444444 999999999 -> NaN Invalid_operation
ddor227 or 666666666 999999999 -> NaN Invalid_operation
ddor228 or 888888888 999999999 -> NaN Invalid_operation
ddor229 or 999999999 222222222 -> NaN Invalid_operation
ddor230 or 999999999 444444444 -> NaN Invalid_operation
ddor231 or 999999999 666666666 -> NaN Invalid_operation
ddor232 or 999999999 888888888 -> NaN Invalid_operation
-- a few randoms
ddor240 or 567468689 -934981942 -> NaN Invalid_operation
ddor241 or 567367689 934981942 -> NaN Invalid_operation
ddor242 or -631917772 -706014634 -> NaN Invalid_operation
ddor243 or -756253257 138579234 -> NaN Invalid_operation
ddor244 or 835590149 567435400 -> NaN Invalid_operation
-- test MSD
ddor250 or 2000000000000000 1000000000000000 -> NaN Invalid_operation
ddor251 or 7000000000000000 1000000000000000 -> NaN Invalid_operation
ddor252 or 8000000000000000 1000000000000000 -> NaN Invalid_operation
ddor253 or 9000000000000000 1000000000000000 -> NaN Invalid_operation
ddor254 or 2000000000000000 0000000000000000 -> NaN Invalid_operation
ddor255 or 7000000000000000 0000000000000000 -> NaN Invalid_operation
ddor256 or 8000000000000000 0000000000000000 -> NaN Invalid_operation
ddor257 or 9000000000000000 0000000000000000 -> NaN Invalid_operation
ddor258 or 1000000000000000 2000000000000000 -> NaN Invalid_operation
ddor259 or 1000000000000000 7000000000000000 -> NaN Invalid_operation
ddor260 or 1000000000000000 8000000000000000 -> NaN Invalid_operation
ddor261 or 1000000000000000 9000000000000000 -> NaN Invalid_operation
ddor262 or 0000000000000000 2000000000000000 -> NaN Invalid_operation
ddor263 or 0000000000000000 7000000000000000 -> NaN Invalid_operation
ddor264 or 0000000000000000 8000000000000000 -> NaN Invalid_operation
ddor265 or 0000000000000000 9000000000000000 -> NaN Invalid_operation
-- test MSD-1
ddor270 or 0200001000000000 1000100000000010 -> NaN Invalid_operation
ddor271 or 0700000100000000 1000010000000100 -> NaN Invalid_operation
ddor272 or 0800000010000000 1000001000001000 -> NaN Invalid_operation
ddor273 or 0900000001000000 1000000100010000 -> NaN Invalid_operation
ddor274 or 1000000000100000 0200000010100000 -> NaN Invalid_operation
ddor275 or 1000000000010000 0700000001000000 -> NaN Invalid_operation
ddor276 or 1000000000001000 0800000010100000 -> NaN Invalid_operation
ddor277 or 1000000000000100 0900000000010000 -> NaN Invalid_operation
-- test LSD
ddor280 or 0010000000000002 1000000100000001 -> NaN Invalid_operation
ddor281 or 0001000000000007 1000001000000011 -> NaN Invalid_operation
ddor282 or 0000100000000008 1000010000000001 -> NaN Invalid_operation
ddor283 or 0000010000000009 1000100000000001 -> NaN Invalid_operation
ddor284 or 1000001000000000 0001000000000002 -> NaN Invalid_operation
ddor285 or 1000000100000000 0010000000000007 -> NaN Invalid_operation
ddor286 or 1000000010000000 0100000000000008 -> NaN Invalid_operation
ddor287 or 1000000001000000 1000000000000009 -> NaN Invalid_operation
-- test Middie
ddor288 or 0010000020000000 1000001000000000 -> NaN Invalid_operation
ddor289 or 0001000070000001 1000000100000000 -> NaN Invalid_operation
ddor290 or 0000100080000010 1000000010000000 -> NaN Invalid_operation
ddor291 or 0000010090000100 1000000001000000 -> NaN Invalid_operation
ddor292 or 1000001000001000 0000000020100000 -> NaN Invalid_operation
ddor293 or 1000000100010000 0000000070010000 -> NaN Invalid_operation
ddor294 or 1000000010100000 0000000080001000 -> NaN Invalid_operation
ddor295 or 1000000001000000 0000000090000100 -> NaN Invalid_operation
-- signs
ddor296 or -1000000001000000 -0000010000000100 -> NaN Invalid_operation
ddor297 or -1000000001000000 0000000010000100 -> NaN Invalid_operation
ddor298 or 1000000001000000 -0000001000000100 -> NaN Invalid_operation
ddor299 or 1000000001000000 0000000011000100 -> 1000000011000100
-- Nmax, Nmin, Ntiny-like
ddor331 or 2 9.99999999E+199 -> NaN Invalid_operation
ddor332 or 3 1E-199 -> NaN Invalid_operation
ddor333 or 4 1.00000000E-199 -> NaN Invalid_operation
ddor334 or 5 1E-100 -> NaN Invalid_operation
ddor335 or 6 -1E-100 -> NaN Invalid_operation
ddor336 or 7 -1.00000000E-199 -> NaN Invalid_operation
ddor337 or 8 -1E-199 -> NaN Invalid_operation
ddor338 or 9 -9.99999999E+199 -> NaN Invalid_operation
ddor341 or 9.99999999E+299 -18 -> NaN Invalid_operation
ddor342 or 1E-299 01 -> NaN Invalid_operation
ddor343 or 1.00000000E-299 -18 -> NaN Invalid_operation
ddor344 or 1E-100 18 -> NaN Invalid_operation
ddor345 or -1E-100 -10 -> NaN Invalid_operation
ddor346 or -1.00000000E-299 18 -> NaN Invalid_operation
ddor347 or -1E-299 10 -> NaN Invalid_operation
ddor348 or -9.99999999E+299 -18 -> NaN Invalid_operation
-- A few other non-integers
ddor361 or 1.0 1 -> NaN Invalid_operation
ddor362 or 1E+1 1 -> NaN Invalid_operation
ddor363 or 0.0 1 -> NaN Invalid_operation
ddor364 or 0E+1 1 -> NaN Invalid_operation
ddor365 or 9.9 1 -> NaN Invalid_operation
ddor366 or 9E+1 1 -> NaN Invalid_operation
ddor371 or 0 1.0 -> NaN Invalid_operation
ddor372 or 0 1E+1 -> NaN Invalid_operation
ddor373 or 0 0.0 -> NaN Invalid_operation
ddor374 or 0 0E+1 -> NaN Invalid_operation
ddor375 or 0 9.9 -> NaN Invalid_operation
ddor376 or 0 9E+1 -> NaN Invalid_operation
-- All Specials are in error
ddor780 or -Inf -Inf -> NaN Invalid_operation
ddor781 or -Inf -1000 -> NaN Invalid_operation
ddor782 or -Inf -1 -> NaN Invalid_operation
ddor783 or -Inf -0 -> NaN Invalid_operation
ddor784 or -Inf 0 -> NaN Invalid_operation
ddor785 or -Inf 1 -> NaN Invalid_operation
ddor786 or -Inf 1000 -> NaN Invalid_operation
ddor787 or -1000 -Inf -> NaN Invalid_operation
ddor788 or -Inf -Inf -> NaN Invalid_operation
ddor789 or -1 -Inf -> NaN Invalid_operation
ddor790 or -0 -Inf -> NaN Invalid_operation
ddor791 or 0 -Inf -> NaN Invalid_operation
ddor792 or 1 -Inf -> NaN Invalid_operation
ddor793 or 1000 -Inf -> NaN Invalid_operation
ddor794 or Inf -Inf -> NaN Invalid_operation
ddor800 or Inf -Inf -> NaN Invalid_operation
ddor801 or Inf -1000 -> NaN Invalid_operation
ddor802 or Inf -1 -> NaN Invalid_operation
ddor803 or Inf -0 -> NaN Invalid_operation
ddor804 or Inf 0 -> NaN Invalid_operation
ddor805 or Inf 1 -> NaN Invalid_operation
ddor806 or Inf 1000 -> NaN Invalid_operation
ddor807 or Inf Inf -> NaN Invalid_operation
ddor808 or -1000 Inf -> NaN Invalid_operation
ddor809 or -Inf Inf -> NaN Invalid_operation
ddor810 or -1 Inf -> NaN Invalid_operation
ddor811 or -0 Inf -> NaN Invalid_operation
ddor812 or 0 Inf -> NaN Invalid_operation
ddor813 or 1 Inf -> NaN Invalid_operation
ddor814 or 1000 Inf -> NaN Invalid_operation
ddor815 or Inf Inf -> NaN Invalid_operation
ddor821 or NaN -Inf -> NaN Invalid_operation
ddor822 or NaN -1000 -> NaN Invalid_operation
ddor823 or NaN -1 -> NaN Invalid_operation
ddor824 or NaN -0 -> NaN Invalid_operation
ddor825 or NaN 0 -> NaN Invalid_operation
ddor826 or NaN 1 -> NaN Invalid_operation
ddor827 or NaN 1000 -> NaN Invalid_operation
ddor828 or NaN Inf -> NaN Invalid_operation
ddor829 or NaN NaN -> NaN Invalid_operation
ddor830 or -Inf NaN -> NaN Invalid_operation
ddor831 or -1000 NaN -> NaN Invalid_operation
ddor832 or -1 NaN -> NaN Invalid_operation
ddor833 or -0 NaN -> NaN Invalid_operation
ddor834 or 0 NaN -> NaN Invalid_operation
ddor835 or 1 NaN -> NaN Invalid_operation
ddor836 or 1000 NaN -> NaN Invalid_operation
ddor837 or Inf NaN -> NaN Invalid_operation
ddor841 or sNaN -Inf -> NaN Invalid_operation
ddor842 or sNaN -1000 -> NaN Invalid_operation
ddor843 or sNaN -1 -> NaN Invalid_operation
ddor844 or sNaN -0 -> NaN Invalid_operation
ddor845 or sNaN 0 -> NaN Invalid_operation
ddor846 or sNaN 1 -> NaN Invalid_operation
ddor847 or sNaN 1000 -> NaN Invalid_operation
ddor848 or sNaN NaN -> NaN Invalid_operation
ddor849 or sNaN sNaN -> NaN Invalid_operation
ddor850 or NaN sNaN -> NaN Invalid_operation
ddor851 or -Inf sNaN -> NaN Invalid_operation
ddor852 or -1000 sNaN -> NaN Invalid_operation
ddor853 or -1 sNaN -> NaN Invalid_operation
ddor854 or -0 sNaN -> NaN Invalid_operation
ddor855 or 0 sNaN -> NaN Invalid_operation
ddor856 or 1 sNaN -> NaN Invalid_operation
ddor857 or 1000 sNaN -> NaN Invalid_operation
ddor858 or Inf sNaN -> NaN Invalid_operation
ddor859 or NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
ddor861 or NaN1 -Inf -> NaN Invalid_operation
ddor862 or +NaN2 -1000 -> NaN Invalid_operation
ddor863 or NaN3 1000 -> NaN Invalid_operation
ddor864 or NaN4 Inf -> NaN Invalid_operation
ddor865 or NaN5 +NaN6 -> NaN Invalid_operation
ddor866 or -Inf NaN7 -> NaN Invalid_operation
ddor867 or -1000 NaN8 -> NaN Invalid_operation
ddor868 or 1000 NaN9 -> NaN Invalid_operation
ddor869 or Inf +NaN10 -> NaN Invalid_operation
ddor871 or sNaN11 -Inf -> NaN Invalid_operation
ddor872 or sNaN12 -1000 -> NaN Invalid_operation
ddor873 or sNaN13 1000 -> NaN Invalid_operation
ddor874 or sNaN14 NaN17 -> NaN Invalid_operation
ddor875 or sNaN15 sNaN18 -> NaN Invalid_operation
ddor876 or NaN16 sNaN19 -> NaN Invalid_operation
ddor877 or -Inf +sNaN20 -> NaN Invalid_operation
ddor878 or -1000 sNaN21 -> NaN Invalid_operation
ddor879 or 1000 sNaN22 -> NaN Invalid_operation
ddor880 or Inf sNaN23 -> NaN Invalid_operation
ddor881 or +NaN25 +sNaN24 -> NaN Invalid_operation
ddor882 or -NaN26 NaN28 -> NaN Invalid_operation
ddor883 or -sNaN27 sNaN29 -> NaN Invalid_operation
ddor884 or 1000 -NaN30 -> NaN Invalid_operation
ddor885 or 1000 -sNaN31 -> NaN Invalid_operation
------------------------------------------------------------------------
-- ddOr.decTest -- digitwise logical OR 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)
ddor001 or 0 0 -> 0
ddor002 or 0 1 -> 1
ddor003 or 1 0 -> 1
ddor004 or 1 1 -> 1
ddor005 or 1100 1010 -> 1110
-- and at msd and msd-1
ddor006 or 0000000000000000 0000000000000000 -> 0
ddor007 or 0000000000000000 1000000000000000 -> 1000000000000000
ddor008 or 1000000000000000 0000000000000000 -> 1000000000000000
ddor009 or 1000000000000000 1000000000000000 -> 1000000000000000
ddor010 or 0000000000000000 0000000000000000 -> 0
ddor011 or 0000000000000000 0100000000000000 -> 100000000000000
ddor012 or 0100000000000000 0000000000000000 -> 100000000000000
ddor013 or 0100000000000000 0100000000000000 -> 100000000000000
-- Various lengths
-- 1234567890123456 1234567890123456 1234567890123456
ddor020 or 1111111111111111 1111111111111111 -> 1111111111111111
ddor021 or 111111111111111 111111111111111 -> 111111111111111
ddor022 or 11111111111111 11111111111111 -> 11111111111111
ddor023 or 1111111111111 1111111111111 -> 1111111111111
ddor024 or 111111111111 111111111111 -> 111111111111
ddor025 or 11111111111 11111111111 -> 11111111111
ddor026 or 1111111111 1111111111 -> 1111111111
ddor027 or 111111111 111111111 -> 111111111
ddor028 or 11111111 11111111 -> 11111111
ddor029 or 1111111 1111111 -> 1111111
ddor030 or 111111 111111 -> 111111
ddor031 or 11111 11111 -> 11111
ddor032 or 1111 1111 -> 1111
ddor033 or 111 111 -> 111
ddor034 or 11 11 -> 11
ddor035 or 1 1 -> 1
ddor036 or 0 0 -> 0
ddor042 or 111111110000000 1111111110000000 -> 1111111110000000
ddor043 or 11111110000000 1000000100000000 -> 1011111110000000
ddor044 or 1111110000000 1000001000000000 -> 1001111110000000
ddor045 or 111110000000 1000010000000000 -> 1000111110000000
ddor046 or 11110000000 1000100000000000 -> 1000111110000000
ddor047 or 1110000000 1001000000000000 -> 1001001110000000
ddor048 or 110000000 1010000000000000 -> 1010000110000000
ddor049 or 10000000 1100000000000000 -> 1100000010000000
ddor090 or 011111111 111101111 -> 111111111
ddor091 or 101111111 111101111 -> 111111111
ddor092 or 110111111 111101111 -> 111111111
ddor093 or 111011111 111101111 -> 111111111
ddor094 or 111101111 111101111 -> 111101111
ddor095 or 111110111 111101111 -> 111111111
ddor096 or 111111011 111101111 -> 111111111
ddor097 or 111111101 111101111 -> 111111111
ddor098 or 111111110 111101111 -> 111111111
ddor100 or 111101111 011111111 -> 111111111
ddor101 or 111101111 101111111 -> 111111111
ddor102 or 111101111 110111111 -> 111111111
ddor103 or 111101111 111011111 -> 111111111
ddor104 or 111101111 111101111 -> 111101111
ddor105 or 111101111 111110111 -> 111111111
ddor106 or 111101111 111111011 -> 111111111
ddor107 or 111101111 111111101 -> 111111111
ddor108 or 111101111 111111110 -> 111111111
-- non-0/1 should not be accepted, nor should signs
ddor220 or 111111112 111111111 -> NaN Invalid_operation
ddor221 or 333333333 333333333 -> NaN Invalid_operation
ddor222 or 555555555 555555555 -> NaN Invalid_operation
ddor223 or 777777777 777777777 -> NaN Invalid_operation
ddor224 or 999999999 999999999 -> NaN Invalid_operation
ddor225 or 222222222 999999999 -> NaN Invalid_operation
ddor226 or 444444444 999999999 -> NaN Invalid_operation
ddor227 or 666666666 999999999 -> NaN Invalid_operation
ddor228 or 888888888 999999999 -> NaN Invalid_operation
ddor229 or 999999999 222222222 -> NaN Invalid_operation
ddor230 or 999999999 444444444 -> NaN Invalid_operation
ddor231 or 999999999 666666666 -> NaN Invalid_operation
ddor232 or 999999999 888888888 -> NaN Invalid_operation
-- a few randoms
ddor240 or 567468689 -934981942 -> NaN Invalid_operation
ddor241 or 567367689 934981942 -> NaN Invalid_operation
ddor242 or -631917772 -706014634 -> NaN Invalid_operation
ddor243 or -756253257 138579234 -> NaN Invalid_operation
ddor244 or 835590149 567435400 -> NaN Invalid_operation
-- test MSD
ddor250 or 2000000000000000 1000000000000000 -> NaN Invalid_operation
ddor251 or 7000000000000000 1000000000000000 -> NaN Invalid_operation
ddor252 or 8000000000000000 1000000000000000 -> NaN Invalid_operation
ddor253 or 9000000000000000 1000000000000000 -> NaN Invalid_operation
ddor254 or 2000000000000000 0000000000000000 -> NaN Invalid_operation
ddor255 or 7000000000000000 0000000000000000 -> NaN Invalid_operation
ddor256 or 8000000000000000 0000000000000000 -> NaN Invalid_operation
ddor257 or 9000000000000000 0000000000000000 -> NaN Invalid_operation
ddor258 or 1000000000000000 2000000000000000 -> NaN Invalid_operation
ddor259 or 1000000000000000 7000000000000000 -> NaN Invalid_operation
ddor260 or 1000000000000000 8000000000000000 -> NaN Invalid_operation
ddor261 or 1000000000000000 9000000000000000 -> NaN Invalid_operation
ddor262 or 0000000000000000 2000000000000000 -> NaN Invalid_operation
ddor263 or 0000000000000000 7000000000000000 -> NaN Invalid_operation
ddor264 or 0000000000000000 8000000000000000 -> NaN Invalid_operation
ddor265 or 0000000000000000 9000000000000000 -> NaN Invalid_operation
-- test MSD-1
ddor270 or 0200001000000000 1000100000000010 -> NaN Invalid_operation
ddor271 or 0700000100000000 1000010000000100 -> NaN Invalid_operation
ddor272 or 0800000010000000 1000001000001000 -> NaN Invalid_operation
ddor273 or 0900000001000000 1000000100010000 -> NaN Invalid_operation
ddor274 or 1000000000100000 0200000010100000 -> NaN Invalid_operation
ddor275 or 1000000000010000 0700000001000000 -> NaN Invalid_operation
ddor276 or 1000000000001000 0800000010100000 -> NaN Invalid_operation
ddor277 or 1000000000000100 0900000000010000 -> NaN Invalid_operation
-- test LSD
ddor280 or 0010000000000002 1000000100000001 -> NaN Invalid_operation
ddor281 or 0001000000000007 1000001000000011 -> NaN Invalid_operation
ddor282 or 0000100000000008 1000010000000001 -> NaN Invalid_operation
ddor283 or 0000010000000009 1000100000000001 -> NaN Invalid_operation
ddor284 or 1000001000000000 0001000000000002 -> NaN Invalid_operation
ddor285 or 1000000100000000 0010000000000007 -> NaN Invalid_operation
ddor286 or 1000000010000000 0100000000000008 -> NaN Invalid_operation
ddor287 or 1000000001000000 1000000000000009 -> NaN Invalid_operation
-- test Middie
ddor288 or 0010000020000000 1000001000000000 -> NaN Invalid_operation
ddor289 or 0001000070000001 1000000100000000 -> NaN Invalid_operation
ddor290 or 0000100080000010 1000000010000000 -> NaN Invalid_operation
ddor291 or 0000010090000100 1000000001000000 -> NaN Invalid_operation
ddor292 or 1000001000001000 0000000020100000 -> NaN Invalid_operation
ddor293 or 1000000100010000 0000000070010000 -> NaN Invalid_operation
ddor294 or 1000000010100000 0000000080001000 -> NaN Invalid_operation
ddor295 or 1000000001000000 0000000090000100 -> NaN Invalid_operation
-- signs
ddor296 or -1000000001000000 -0000010000000100 -> NaN Invalid_operation
ddor297 or -1000000001000000 0000000010000100 -> NaN Invalid_operation
ddor298 or 1000000001000000 -0000001000000100 -> NaN Invalid_operation
ddor299 or 1000000001000000 0000000011000100 -> 1000000011000100
-- Nmax, Nmin, Ntiny-like
ddor331 or 2 9.99999999E+199 -> NaN Invalid_operation
ddor332 or 3 1E-199 -> NaN Invalid_operation
ddor333 or 4 1.00000000E-199 -> NaN Invalid_operation
ddor334 or 5 1E-100 -> NaN Invalid_operation
ddor335 or 6 -1E-100 -> NaN Invalid_operation
ddor336 or 7 -1.00000000E-199 -> NaN Invalid_operation
ddor337 or 8 -1E-199 -> NaN Invalid_operation
ddor338 or 9 -9.99999999E+199 -> NaN Invalid_operation
ddor341 or 9.99999999E+299 -18 -> NaN Invalid_operation
ddor342 or 1E-299 01 -> NaN Invalid_operation
ddor343 or 1.00000000E-299 -18 -> NaN Invalid_operation
ddor344 or 1E-100 18 -> NaN Invalid_operation
ddor345 or -1E-100 -10 -> NaN Invalid_operation
ddor346 or -1.00000000E-299 18 -> NaN Invalid_operation
ddor347 or -1E-299 10 -> NaN Invalid_operation
ddor348 or -9.99999999E+299 -18 -> NaN Invalid_operation
-- A few other non-integers
ddor361 or 1.0 1 -> NaN Invalid_operation
ddor362 or 1E+1 1 -> NaN Invalid_operation
ddor363 or 0.0 1 -> NaN Invalid_operation
ddor364 or 0E+1 1 -> NaN Invalid_operation
ddor365 or 9.9 1 -> NaN Invalid_operation
ddor366 or 9E+1 1 -> NaN Invalid_operation
ddor371 or 0 1.0 -> NaN Invalid_operation
ddor372 or 0 1E+1 -> NaN Invalid_operation
ddor373 or 0 0.0 -> NaN Invalid_operation
ddor374 or 0 0E+1 -> NaN Invalid_operation
ddor375 or 0 9.9 -> NaN Invalid_operation
ddor376 or 0 9E+1 -> NaN Invalid_operation
-- All Specials are in error
ddor780 or -Inf -Inf -> NaN Invalid_operation
ddor781 or -Inf -1000 -> NaN Invalid_operation
ddor782 or -Inf -1 -> NaN Invalid_operation
ddor783 or -Inf -0 -> NaN Invalid_operation
ddor784 or -Inf 0 -> NaN Invalid_operation
ddor785 or -Inf 1 -> NaN Invalid_operation
ddor786 or -Inf 1000 -> NaN Invalid_operation
ddor787 or -1000 -Inf -> NaN Invalid_operation
ddor788 or -Inf -Inf -> NaN Invalid_operation
ddor789 or -1 -Inf -> NaN Invalid_operation
ddor790 or -0 -Inf -> NaN Invalid_operation
ddor791 or 0 -Inf -> NaN Invalid_operation
ddor792 or 1 -Inf -> NaN Invalid_operation
ddor793 or 1000 -Inf -> NaN Invalid_operation
ddor794 or Inf -Inf -> NaN Invalid_operation
ddor800 or Inf -Inf -> NaN Invalid_operation
ddor801 or Inf -1000 -> NaN Invalid_operation
ddor802 or Inf -1 -> NaN Invalid_operation
ddor803 or Inf -0 -> NaN Invalid_operation
ddor804 or Inf 0 -> NaN Invalid_operation
ddor805 or Inf 1 -> NaN Invalid_operation
ddor806 or Inf 1000 -> NaN Invalid_operation
ddor807 or Inf Inf -> NaN Invalid_operation
ddor808 or -1000 Inf -> NaN Invalid_operation
ddor809 or -Inf Inf -> NaN Invalid_operation
ddor810 or -1 Inf -> NaN Invalid_operation
ddor811 or -0 Inf -> NaN Invalid_operation
ddor812 or 0 Inf -> NaN Invalid_operation
ddor813 or 1 Inf -> NaN Invalid_operation
ddor814 or 1000 Inf -> NaN Invalid_operation
ddor815 or Inf Inf -> NaN Invalid_operation
ddor821 or NaN -Inf -> NaN Invalid_operation
ddor822 or NaN -1000 -> NaN Invalid_operation
ddor823 or NaN -1 -> NaN Invalid_operation
ddor824 or NaN -0 -> NaN Invalid_operation
ddor825 or NaN 0 -> NaN Invalid_operation
ddor826 or NaN 1 -> NaN Invalid_operation
ddor827 or NaN 1000 -> NaN Invalid_operation
ddor828 or NaN Inf -> NaN Invalid_operation
ddor829 or NaN NaN -> NaN Invalid_operation
ddor830 or -Inf NaN -> NaN Invalid_operation
ddor831 or -1000 NaN -> NaN Invalid_operation
ddor832 or -1 NaN -> NaN Invalid_operation
ddor833 or -0 NaN -> NaN Invalid_operation
ddor834 or 0 NaN -> NaN Invalid_operation
ddor835 or 1 NaN -> NaN Invalid_operation
ddor836 or 1000 NaN -> NaN Invalid_operation
ddor837 or Inf NaN -> NaN Invalid_operation
ddor841 or sNaN -Inf -> NaN Invalid_operation
ddor842 or sNaN -1000 -> NaN Invalid_operation
ddor843 or sNaN -1 -> NaN Invalid_operation
ddor844 or sNaN -0 -> NaN Invalid_operation
ddor845 or sNaN 0 -> NaN Invalid_operation
ddor846 or sNaN 1 -> NaN Invalid_operation
ddor847 or sNaN 1000 -> NaN Invalid_operation
ddor848 or sNaN NaN -> NaN Invalid_operation
ddor849 or sNaN sNaN -> NaN Invalid_operation
ddor850 or NaN sNaN -> NaN Invalid_operation
ddor851 or -Inf sNaN -> NaN Invalid_operation
ddor852 or -1000 sNaN -> NaN Invalid_operation
ddor853 or -1 sNaN -> NaN Invalid_operation
ddor854 or -0 sNaN -> NaN Invalid_operation
ddor855 or 0 sNaN -> NaN Invalid_operation
ddor856 or 1 sNaN -> NaN Invalid_operation
ddor857 or 1000 sNaN -> NaN Invalid_operation
ddor858 or Inf sNaN -> NaN Invalid_operation
ddor859 or NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
ddor861 or NaN1 -Inf -> NaN Invalid_operation
ddor862 or +NaN2 -1000 -> NaN Invalid_operation
ddor863 or NaN3 1000 -> NaN Invalid_operation
ddor864 or NaN4 Inf -> NaN Invalid_operation
ddor865 or NaN5 +NaN6 -> NaN Invalid_operation
ddor866 or -Inf NaN7 -> NaN Invalid_operation
ddor867 or -1000 NaN8 -> NaN Invalid_operation
ddor868 or 1000 NaN9 -> NaN Invalid_operation
ddor869 or Inf +NaN10 -> NaN Invalid_operation
ddor871 or sNaN11 -Inf -> NaN Invalid_operation
ddor872 or sNaN12 -1000 -> NaN Invalid_operation
ddor873 or sNaN13 1000 -> NaN Invalid_operation
ddor874 or sNaN14 NaN17 -> NaN Invalid_operation
ddor875 or sNaN15 sNaN18 -> NaN Invalid_operation
ddor876 or NaN16 sNaN19 -> NaN Invalid_operation
ddor877 or -Inf +sNaN20 -> NaN Invalid_operation
ddor878 or -1000 sNaN21 -> NaN Invalid_operation
ddor879 or 1000 sNaN22 -> NaN Invalid_operation
ddor880 or Inf sNaN23 -> NaN Invalid_operation
ddor881 or +NaN25 +sNaN24 -> NaN Invalid_operation
ddor882 or -NaN26 NaN28 -> NaN Invalid_operation
ddor883 or -sNaN27 sNaN29 -> NaN Invalid_operation
ddor884 or 1000 -NaN30 -> NaN Invalid_operation
ddor885 or 1000 -sNaN31 -> NaN Invalid_operation

View file

@ -1,88 +1,88 @@
------------------------------------------------------------------------
-- ddPlus.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
ddpls001 plus +7.50 -> 7.50
-- Infinities
ddpls011 plus Infinity -> Infinity
ddpls012 plus -Infinity -> -Infinity
-- NaNs, 0 payload
ddpls021 plus NaN -> NaN
ddpls022 plus -NaN -> -NaN
ddpls023 plus sNaN -> NaN Invalid_operation
ddpls024 plus -sNaN -> -NaN Invalid_operation
-- NaNs, non-0 payload
ddpls031 plus NaN13 -> NaN13
ddpls032 plus -NaN13 -> -NaN13
ddpls033 plus sNaN13 -> NaN13 Invalid_operation
ddpls034 plus -sNaN13 -> -NaN13 Invalid_operation
ddpls035 plus NaN70 -> NaN70
ddpls036 plus -NaN70 -> -NaN70
ddpls037 plus sNaN101 -> NaN101 Invalid_operation
ddpls038 plus -sNaN101 -> -NaN101 Invalid_operation
-- finites
ddpls101 plus 7 -> 7
ddpls102 plus -7 -> -7
ddpls103 plus 75 -> 75
ddpls104 plus -75 -> -75
ddpls105 plus 7.50 -> 7.50
ddpls106 plus -7.50 -> -7.50
ddpls107 plus 7.500 -> 7.500
ddpls108 plus -7.500 -> -7.500
-- zeros
ddpls111 plus 0 -> 0
ddpls112 plus -0 -> 0
ddpls113 plus 0E+4 -> 0E+4
ddpls114 plus -0E+4 -> 0E+4
ddpls115 plus 0.0000 -> 0.0000
ddpls116 plus -0.0000 -> 0.0000
ddpls117 plus 0E-141 -> 0E-141
ddpls118 plus -0E-141 -> 0E-141
-- full coefficients, alternating bits
ddpls121 plus 2682682682682682 -> 2682682682682682
ddpls122 plus -2682682682682682 -> -2682682682682682
ddpls123 plus 1341341341341341 -> 1341341341341341
ddpls124 plus -1341341341341341 -> -1341341341341341
-- Nmax, Nmin, Ntiny
ddpls131 plus 9.999999999999999E+384 -> 9.999999999999999E+384
ddpls132 plus 1E-383 -> 1E-383
ddpls133 plus 1.000000000000000E-383 -> 1.000000000000000E-383
ddpls134 plus 1E-398 -> 1E-398 Subnormal
ddpls135 plus -1E-398 -> -1E-398 Subnormal
ddpls136 plus -1.000000000000000E-383 -> -1.000000000000000E-383
ddpls137 plus -1E-383 -> -1E-383
ddpls138 plus -9.999999999999999E+384 -> -9.999999999999999E+384
------------------------------------------------------------------------
-- ddPlus.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
ddpls001 plus +7.50 -> 7.50
-- Infinities
ddpls011 plus Infinity -> Infinity
ddpls012 plus -Infinity -> -Infinity
-- NaNs, 0 payload
ddpls021 plus NaN -> NaN
ddpls022 plus -NaN -> -NaN
ddpls023 plus sNaN -> NaN Invalid_operation
ddpls024 plus -sNaN -> -NaN Invalid_operation
-- NaNs, non-0 payload
ddpls031 plus NaN13 -> NaN13
ddpls032 plus -NaN13 -> -NaN13
ddpls033 plus sNaN13 -> NaN13 Invalid_operation
ddpls034 plus -sNaN13 -> -NaN13 Invalid_operation
ddpls035 plus NaN70 -> NaN70
ddpls036 plus -NaN70 -> -NaN70
ddpls037 plus sNaN101 -> NaN101 Invalid_operation
ddpls038 plus -sNaN101 -> -NaN101 Invalid_operation
-- finites
ddpls101 plus 7 -> 7
ddpls102 plus -7 -> -7
ddpls103 plus 75 -> 75
ddpls104 plus -75 -> -75
ddpls105 plus 7.50 -> 7.50
ddpls106 plus -7.50 -> -7.50
ddpls107 plus 7.500 -> 7.500
ddpls108 plus -7.500 -> -7.500
-- zeros
ddpls111 plus 0 -> 0
ddpls112 plus -0 -> 0
ddpls113 plus 0E+4 -> 0E+4
ddpls114 plus -0E+4 -> 0E+4
ddpls115 plus 0.0000 -> 0.0000
ddpls116 plus -0.0000 -> 0.0000
ddpls117 plus 0E-141 -> 0E-141
ddpls118 plus -0E-141 -> 0E-141
-- full coefficients, alternating bits
ddpls121 plus 2682682682682682 -> 2682682682682682
ddpls122 plus -2682682682682682 -> -2682682682682682
ddpls123 plus 1341341341341341 -> 1341341341341341
ddpls124 plus -1341341341341341 -> -1341341341341341
-- Nmax, Nmin, Ntiny
ddpls131 plus 9.999999999999999E+384 -> 9.999999999999999E+384
ddpls132 plus 1E-383 -> 1E-383
ddpls133 plus 1.000000000000000E-383 -> 1.000000000000000E-383
ddpls134 plus 1E-398 -> 1E-398 Subnormal
ddpls135 plus -1E-398 -> -1E-398 Subnormal
ddpls136 plus -1.000000000000000E-383 -> -1.000000000000000E-383
ddpls137 plus -1E-383 -> -1E-383
ddpls138 plus -9.999999999999999E+384 -> -9.999999999999999E+384

File diff suppressed because it is too large Load diff

View file

@ -1,182 +1,182 @@
------------------------------------------------------------------------
-- ddReduce.decTest -- remove trailing zeros from a decDouble --
-- Copyright (c) IBM Corporation, 2003, 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
ddred001 reduce '1' -> '1'
ddred002 reduce '-1' -> '-1'
ddred003 reduce '1.00' -> '1'
ddred004 reduce '-1.00' -> '-1'
ddred005 reduce '0' -> '0'
ddred006 reduce '0.00' -> '0'
ddred007 reduce '00.0' -> '0'
ddred008 reduce '00.00' -> '0'
ddred009 reduce '00' -> '0'
ddred010 reduce '0E+1' -> '0'
ddred011 reduce '0E+5' -> '0'
ddred012 reduce '-2' -> '-2'
ddred013 reduce '2' -> '2'
ddred014 reduce '-2.00' -> '-2'
ddred015 reduce '2.00' -> '2'
ddred016 reduce '-0' -> '-0'
ddred017 reduce '-0.00' -> '-0'
ddred018 reduce '-00.0' -> '-0'
ddred019 reduce '-00.00' -> '-0'
ddred020 reduce '-00' -> '-0'
ddred021 reduce '-0E+5' -> '-0'
ddred022 reduce '-0E+1' -> '-0'
ddred030 reduce '+0.1' -> '0.1'
ddred031 reduce '-0.1' -> '-0.1'
ddred032 reduce '+0.01' -> '0.01'
ddred033 reduce '-0.01' -> '-0.01'
ddred034 reduce '+0.001' -> '0.001'
ddred035 reduce '-0.001' -> '-0.001'
ddred036 reduce '+0.000001' -> '0.000001'
ddred037 reduce '-0.000001' -> '-0.000001'
ddred038 reduce '+0.000000000001' -> '1E-12'
ddred039 reduce '-0.000000000001' -> '-1E-12'
ddred041 reduce 1.1 -> 1.1
ddred042 reduce 1.10 -> 1.1
ddred043 reduce 1.100 -> 1.1
ddred044 reduce 1.110 -> 1.11
ddred045 reduce -1.1 -> -1.1
ddred046 reduce -1.10 -> -1.1
ddred047 reduce -1.100 -> -1.1
ddred048 reduce -1.110 -> -1.11
ddred049 reduce 9.9 -> 9.9
ddred050 reduce 9.90 -> 9.9
ddred051 reduce 9.900 -> 9.9
ddred052 reduce 9.990 -> 9.99
ddred053 reduce -9.9 -> -9.9
ddred054 reduce -9.90 -> -9.9
ddred055 reduce -9.900 -> -9.9
ddred056 reduce -9.990 -> -9.99
-- some trailing fractional zeros with zeros in units
ddred060 reduce 10.0 -> 1E+1
ddred061 reduce 10.00 -> 1E+1
ddred062 reduce 100.0 -> 1E+2
ddred063 reduce 100.00 -> 1E+2
ddred064 reduce 1.1000E+3 -> 1.1E+3
ddred065 reduce 1.10000E+3 -> 1.1E+3
ddred066 reduce -10.0 -> -1E+1
ddred067 reduce -10.00 -> -1E+1
ddred068 reduce -100.0 -> -1E+2
ddred069 reduce -100.00 -> -1E+2
ddred070 reduce -1.1000E+3 -> -1.1E+3
ddred071 reduce -1.10000E+3 -> -1.1E+3
-- some insignificant trailing zeros with positive exponent
ddred080 reduce 10E+1 -> 1E+2
ddred081 reduce 100E+1 -> 1E+3
ddred082 reduce 1.0E+2 -> 1E+2
ddred083 reduce 1.0E+3 -> 1E+3
ddred084 reduce 1.1E+3 -> 1.1E+3
ddred085 reduce 1.00E+3 -> 1E+3
ddred086 reduce 1.10E+3 -> 1.1E+3
ddred087 reduce -10E+1 -> -1E+2
ddred088 reduce -100E+1 -> -1E+3
ddred089 reduce -1.0E+2 -> -1E+2
ddred090 reduce -1.0E+3 -> -1E+3
ddred091 reduce -1.1E+3 -> -1.1E+3
ddred092 reduce -1.00E+3 -> -1E+3
ddred093 reduce -1.10E+3 -> -1.1E+3
-- some significant trailing zeros, were we to be trimming
ddred100 reduce 11 -> 11
ddred101 reduce 10 -> 1E+1
ddred102 reduce 10. -> 1E+1
ddred103 reduce 1.1E+1 -> 11
ddred104 reduce 1.0E+1 -> 1E+1
ddred105 reduce 1.10E+2 -> 1.1E+2
ddred106 reduce 1.00E+2 -> 1E+2
ddred107 reduce 1.100E+3 -> 1.1E+3
ddred108 reduce 1.000E+3 -> 1E+3
ddred109 reduce 1.000000E+6 -> 1E+6
ddred110 reduce -11 -> -11
ddred111 reduce -10 -> -1E+1
ddred112 reduce -10. -> -1E+1
ddred113 reduce -1.1E+1 -> -11
ddred114 reduce -1.0E+1 -> -1E+1
ddred115 reduce -1.10E+2 -> -1.1E+2
ddred116 reduce -1.00E+2 -> -1E+2
ddred117 reduce -1.100E+3 -> -1.1E+3
ddred118 reduce -1.000E+3 -> -1E+3
ddred119 reduce -1.00000E+5 -> -1E+5
ddred120 reduce -1.000000E+6 -> -1E+6
ddred121 reduce -10.00000E+6 -> -1E+7
ddred122 reduce -100.0000E+6 -> -1E+8
ddred123 reduce -1000.000E+6 -> -1E+9
ddred124 reduce -10000.00E+6 -> -1E+10
ddred125 reduce -100000.0E+6 -> -1E+11
ddred126 reduce -1000000.E+6 -> -1E+12
-- examples from decArith
ddred140 reduce '2.1' -> '2.1'
ddred141 reduce '-2.0' -> '-2'
ddred142 reduce '1.200' -> '1.2'
ddred143 reduce '-120' -> '-1.2E+2'
ddred144 reduce '120.00' -> '1.2E+2'
ddred145 reduce '0.00' -> '0'
-- Nmax, Nmin, Ntiny
-- note origami effect on some of these
ddred151 reduce 9.999999999999999E+384 -> 9.999999999999999E+384
ddred152 reduce 9.999999000000000E+380 -> 9.99999900000E+380
ddred153 reduce 9.999999999990000E+384 -> 9.999999999990000E+384
ddred154 reduce 1E-383 -> 1E-383
ddred155 reduce 1.000000000000000E-383 -> 1E-383
ddred156 reduce 2.000E-395 -> 2E-395 Subnormal
ddred157 reduce 1E-398 -> 1E-398 Subnormal
ddred161 reduce -1E-398 -> -1E-398 Subnormal
ddred162 reduce -2.000E-395 -> -2E-395 Subnormal
ddred163 reduce -1.000000000000000E-383 -> -1E-383
ddred164 reduce -1E-383 -> -1E-383
ddred165 reduce -9.999999000000000E+380 -> -9.99999900000E+380
ddred166 reduce -9.999999999990000E+384 -> -9.999999999990000E+384
ddred167 reduce -9.999999999999990E+384 -> -9.999999999999990E+384
ddred168 reduce -9.999999999999999E+384 -> -9.999999999999999E+384
ddred169 reduce -9.999999999999990E+384 -> -9.999999999999990E+384
-- specials (reduce does not affect payload)
ddred820 reduce 'Inf' -> 'Infinity'
ddred821 reduce '-Inf' -> '-Infinity'
ddred822 reduce NaN -> NaN
ddred823 reduce sNaN -> NaN Invalid_operation
ddred824 reduce NaN101 -> NaN101
ddred825 reduce sNaN010 -> NaN10 Invalid_operation
ddred827 reduce -NaN -> -NaN
ddred828 reduce -sNaN -> -NaN Invalid_operation
ddred829 reduce -NaN101 -> -NaN101
ddred830 reduce -sNaN010 -> -NaN10 Invalid_operation
-- Null test
ddred900 reduce # -> NaN Invalid_operation
------------------------------------------------------------------------
-- ddReduce.decTest -- remove trailing zeros from a decDouble --
-- Copyright (c) IBM Corporation, 2003, 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
ddred001 reduce '1' -> '1'
ddred002 reduce '-1' -> '-1'
ddred003 reduce '1.00' -> '1'
ddred004 reduce '-1.00' -> '-1'
ddred005 reduce '0' -> '0'
ddred006 reduce '0.00' -> '0'
ddred007 reduce '00.0' -> '0'
ddred008 reduce '00.00' -> '0'
ddred009 reduce '00' -> '0'
ddred010 reduce '0E+1' -> '0'
ddred011 reduce '0E+5' -> '0'
ddred012 reduce '-2' -> '-2'
ddred013 reduce '2' -> '2'
ddred014 reduce '-2.00' -> '-2'
ddred015 reduce '2.00' -> '2'
ddred016 reduce '-0' -> '-0'
ddred017 reduce '-0.00' -> '-0'
ddred018 reduce '-00.0' -> '-0'
ddred019 reduce '-00.00' -> '-0'
ddred020 reduce '-00' -> '-0'
ddred021 reduce '-0E+5' -> '-0'
ddred022 reduce '-0E+1' -> '-0'
ddred030 reduce '+0.1' -> '0.1'
ddred031 reduce '-0.1' -> '-0.1'
ddred032 reduce '+0.01' -> '0.01'
ddred033 reduce '-0.01' -> '-0.01'
ddred034 reduce '+0.001' -> '0.001'
ddred035 reduce '-0.001' -> '-0.001'
ddred036 reduce '+0.000001' -> '0.000001'
ddred037 reduce '-0.000001' -> '-0.000001'
ddred038 reduce '+0.000000000001' -> '1E-12'
ddred039 reduce '-0.000000000001' -> '-1E-12'
ddred041 reduce 1.1 -> 1.1
ddred042 reduce 1.10 -> 1.1
ddred043 reduce 1.100 -> 1.1
ddred044 reduce 1.110 -> 1.11
ddred045 reduce -1.1 -> -1.1
ddred046 reduce -1.10 -> -1.1
ddred047 reduce -1.100 -> -1.1
ddred048 reduce -1.110 -> -1.11
ddred049 reduce 9.9 -> 9.9
ddred050 reduce 9.90 -> 9.9
ddred051 reduce 9.900 -> 9.9
ddred052 reduce 9.990 -> 9.99
ddred053 reduce -9.9 -> -9.9
ddred054 reduce -9.90 -> -9.9
ddred055 reduce -9.900 -> -9.9
ddred056 reduce -9.990 -> -9.99
-- some trailing fractional zeros with zeros in units
ddred060 reduce 10.0 -> 1E+1
ddred061 reduce 10.00 -> 1E+1
ddred062 reduce 100.0 -> 1E+2
ddred063 reduce 100.00 -> 1E+2
ddred064 reduce 1.1000E+3 -> 1.1E+3
ddred065 reduce 1.10000E+3 -> 1.1E+3
ddred066 reduce -10.0 -> -1E+1
ddred067 reduce -10.00 -> -1E+1
ddred068 reduce -100.0 -> -1E+2
ddred069 reduce -100.00 -> -1E+2
ddred070 reduce -1.1000E+3 -> -1.1E+3
ddred071 reduce -1.10000E+3 -> -1.1E+3
-- some insignificant trailing zeros with positive exponent
ddred080 reduce 10E+1 -> 1E+2
ddred081 reduce 100E+1 -> 1E+3
ddred082 reduce 1.0E+2 -> 1E+2
ddred083 reduce 1.0E+3 -> 1E+3
ddred084 reduce 1.1E+3 -> 1.1E+3
ddred085 reduce 1.00E+3 -> 1E+3
ddred086 reduce 1.10E+3 -> 1.1E+3
ddred087 reduce -10E+1 -> -1E+2
ddred088 reduce -100E+1 -> -1E+3
ddred089 reduce -1.0E+2 -> -1E+2
ddred090 reduce -1.0E+3 -> -1E+3
ddred091 reduce -1.1E+3 -> -1.1E+3
ddred092 reduce -1.00E+3 -> -1E+3
ddred093 reduce -1.10E+3 -> -1.1E+3
-- some significant trailing zeros, were we to be trimming
ddred100 reduce 11 -> 11
ddred101 reduce 10 -> 1E+1
ddred102 reduce 10. -> 1E+1
ddred103 reduce 1.1E+1 -> 11
ddred104 reduce 1.0E+1 -> 1E+1
ddred105 reduce 1.10E+2 -> 1.1E+2
ddred106 reduce 1.00E+2 -> 1E+2
ddred107 reduce 1.100E+3 -> 1.1E+3
ddred108 reduce 1.000E+3 -> 1E+3
ddred109 reduce 1.000000E+6 -> 1E+6
ddred110 reduce -11 -> -11
ddred111 reduce -10 -> -1E+1
ddred112 reduce -10. -> -1E+1
ddred113 reduce -1.1E+1 -> -11
ddred114 reduce -1.0E+1 -> -1E+1
ddred115 reduce -1.10E+2 -> -1.1E+2
ddred116 reduce -1.00E+2 -> -1E+2
ddred117 reduce -1.100E+3 -> -1.1E+3
ddred118 reduce -1.000E+3 -> -1E+3
ddred119 reduce -1.00000E+5 -> -1E+5
ddred120 reduce -1.000000E+6 -> -1E+6
ddred121 reduce -10.00000E+6 -> -1E+7
ddred122 reduce -100.0000E+6 -> -1E+8
ddred123 reduce -1000.000E+6 -> -1E+9
ddred124 reduce -10000.00E+6 -> -1E+10
ddred125 reduce -100000.0E+6 -> -1E+11
ddred126 reduce -1000000.E+6 -> -1E+12
-- examples from decArith
ddred140 reduce '2.1' -> '2.1'
ddred141 reduce '-2.0' -> '-2'
ddred142 reduce '1.200' -> '1.2'
ddred143 reduce '-120' -> '-1.2E+2'
ddred144 reduce '120.00' -> '1.2E+2'
ddred145 reduce '0.00' -> '0'
-- Nmax, Nmin, Ntiny
-- note origami effect on some of these
ddred151 reduce 9.999999999999999E+384 -> 9.999999999999999E+384
ddred152 reduce 9.999999000000000E+380 -> 9.99999900000E+380
ddred153 reduce 9.999999999990000E+384 -> 9.999999999990000E+384
ddred154 reduce 1E-383 -> 1E-383
ddred155 reduce 1.000000000000000E-383 -> 1E-383
ddred156 reduce 2.000E-395 -> 2E-395 Subnormal
ddred157 reduce 1E-398 -> 1E-398 Subnormal
ddred161 reduce -1E-398 -> -1E-398 Subnormal
ddred162 reduce -2.000E-395 -> -2E-395 Subnormal
ddred163 reduce -1.000000000000000E-383 -> -1E-383
ddred164 reduce -1E-383 -> -1E-383
ddred165 reduce -9.999999000000000E+380 -> -9.99999900000E+380
ddred166 reduce -9.999999999990000E+384 -> -9.999999999990000E+384
ddred167 reduce -9.999999999999990E+384 -> -9.999999999999990E+384
ddred168 reduce -9.999999999999999E+384 -> -9.999999999999999E+384
ddred169 reduce -9.999999999999990E+384 -> -9.999999999999990E+384
-- specials (reduce does not affect payload)
ddred820 reduce 'Inf' -> 'Infinity'
ddred821 reduce '-Inf' -> '-Infinity'
ddred822 reduce NaN -> NaN
ddred823 reduce sNaN -> NaN Invalid_operation
ddred824 reduce NaN101 -> NaN101
ddred825 reduce sNaN010 -> NaN10 Invalid_operation
ddred827 reduce -NaN -> -NaN
ddred828 reduce -sNaN -> -NaN Invalid_operation
ddred829 reduce -NaN101 -> -NaN101
ddred830 reduce -sNaN010 -> -NaN10 Invalid_operation
-- Null test
ddred900 reduce # -> NaN Invalid_operation

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,262 +1,262 @@
------------------------------------------------------------------------
-- ddRotate.decTest -- rotate a decDouble coefficient left or right --
-- 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
ddrot001 rotate 0 0 -> 0
ddrot002 rotate 0 2 -> 0
ddrot003 rotate 1 2 -> 100
ddrot004 rotate 1 15 -> 1000000000000000
ddrot005 rotate 1 16 -> 1
ddrot006 rotate 1 -1 -> 1000000000000000
ddrot007 rotate 0 -2 -> 0
ddrot008 rotate 1234567890123456 -1 -> 6123456789012345
ddrot009 rotate 1234567890123456 -15 -> 2345678901234561
ddrot010 rotate 1234567890123456 -16 -> 1234567890123456
ddrot011 rotate 9934567890123456 -15 -> 9345678901234569
ddrot012 rotate 9934567890123456 -16 -> 9934567890123456
-- rhs must be an integer
ddrot015 rotate 1 1.5 -> NaN Invalid_operation
ddrot016 rotate 1 1.0 -> NaN Invalid_operation
ddrot017 rotate 1 0.1 -> NaN Invalid_operation
ddrot018 rotate 1 0.0 -> NaN Invalid_operation
ddrot019 rotate 1 1E+1 -> NaN Invalid_operation
ddrot020 rotate 1 1E+99 -> NaN Invalid_operation
ddrot021 rotate 1 Inf -> NaN Invalid_operation
ddrot022 rotate 1 -Inf -> NaN Invalid_operation
-- and |rhs| <= precision
ddrot025 rotate 1 -1000 -> NaN Invalid_operation
ddrot026 rotate 1 -17 -> NaN Invalid_operation
ddrot027 rotate 1 17 -> NaN Invalid_operation
ddrot028 rotate 1 1000 -> NaN Invalid_operation
-- full pattern
ddrot030 rotate 1234567890123456 -16 -> 1234567890123456
ddrot031 rotate 1234567890123456 -15 -> 2345678901234561
ddrot032 rotate 1234567890123456 -14 -> 3456789012345612
ddrot033 rotate 1234567890123456 -13 -> 4567890123456123
ddrot034 rotate 1234567890123456 -12 -> 5678901234561234
ddrot035 rotate 1234567890123456 -11 -> 6789012345612345
ddrot036 rotate 1234567890123456 -10 -> 7890123456123456
ddrot037 rotate 1234567890123456 -9 -> 8901234561234567
ddrot038 rotate 1234567890123456 -8 -> 9012345612345678
ddrot039 rotate 1234567890123456 -7 -> 123456123456789
ddrot040 rotate 1234567890123456 -6 -> 1234561234567890
ddrot041 rotate 1234567890123456 -5 -> 2345612345678901
ddrot042 rotate 1234567890123456 -4 -> 3456123456789012
ddrot043 rotate 1234567890123456 -3 -> 4561234567890123
ddrot044 rotate 1234567890123456 -2 -> 5612345678901234
ddrot045 rotate 1234567890123456 -1 -> 6123456789012345
ddrot046 rotate 1234567890123456 -0 -> 1234567890123456
ddrot047 rotate 1234567890123456 +0 -> 1234567890123456
ddrot048 rotate 1234567890123456 +1 -> 2345678901234561
ddrot049 rotate 1234567890123456 +2 -> 3456789012345612
ddrot050 rotate 1234567890123456 +3 -> 4567890123456123
ddrot051 rotate 1234567890123456 +4 -> 5678901234561234
ddrot052 rotate 1234567890123456 +5 -> 6789012345612345
ddrot053 rotate 1234567890123456 +6 -> 7890123456123456
ddrot054 rotate 1234567890123456 +7 -> 8901234561234567
ddrot055 rotate 1234567890123456 +8 -> 9012345612345678
ddrot056 rotate 1234567890123456 +9 -> 123456123456789
ddrot057 rotate 1234567890123456 +10 -> 1234561234567890
ddrot058 rotate 1234567890123456 +11 -> 2345612345678901
ddrot059 rotate 1234567890123456 +12 -> 3456123456789012
ddrot060 rotate 1234567890123456 +13 -> 4561234567890123
ddrot061 rotate 1234567890123456 +14 -> 5612345678901234
ddrot062 rotate 1234567890123456 +15 -> 6123456789012345
ddrot063 rotate 1234567890123456 +16 -> 1234567890123456
-- zeros
ddrot070 rotate 0E-10 +9 -> 0E-10
ddrot071 rotate 0E-10 -9 -> 0E-10
ddrot072 rotate 0.000 +9 -> 0.000
ddrot073 rotate 0.000 -9 -> 0.000
ddrot074 rotate 0E+10 +9 -> 0E+10
ddrot075 rotate 0E+10 -9 -> 0E+10
ddrot076 rotate -0E-10 +9 -> -0E-10
ddrot077 rotate -0E-10 -9 -> -0E-10
ddrot078 rotate -0.000 +9 -> -0.000
ddrot079 rotate -0.000 -9 -> -0.000
ddrot080 rotate -0E+10 +9 -> -0E+10
ddrot081 rotate -0E+10 -9 -> -0E+10
-- Nmax, Nmin, Ntiny
ddrot141 rotate 9.999999999999999E+384 -1 -> 9.999999999999999E+384
ddrot142 rotate 9.999999999999999E+384 -15 -> 9.999999999999999E+384
ddrot143 rotate 9.999999999999999E+384 1 -> 9.999999999999999E+384
ddrot144 rotate 9.999999999999999E+384 15 -> 9.999999999999999E+384
ddrot145 rotate 1E-383 -1 -> 1.000000000000000E-368
ddrot146 rotate 1E-383 -15 -> 1.0E-382
ddrot147 rotate 1E-383 1 -> 1.0E-382
ddrot148 rotate 1E-383 15 -> 1.000000000000000E-368
ddrot151 rotate 1.000000000000000E-383 -1 -> 1.00000000000000E-384
ddrot152 rotate 1.000000000000000E-383 -15 -> 1E-398
ddrot153 rotate 1.000000000000000E-383 1 -> 1E-398
ddrot154 rotate 1.000000000000000E-383 15 -> 1.00000000000000E-384
ddrot155 rotate 9.000000000000000E-383 -1 -> 9.00000000000000E-384
ddrot156 rotate 9.000000000000000E-383 -15 -> 9E-398
ddrot157 rotate 9.000000000000000E-383 1 -> 9E-398
ddrot158 rotate 9.000000000000000E-383 15 -> 9.00000000000000E-384
ddrot160 rotate 1E-398 -1 -> 1.000000000000000E-383
ddrot161 rotate 1E-398 -15 -> 1.0E-397
ddrot162 rotate 1E-398 1 -> 1.0E-397
ddrot163 rotate 1E-398 15 -> 1.000000000000000E-383
-- negatives
ddrot171 rotate -9.999999999999999E+384 -1 -> -9.999999999999999E+384
ddrot172 rotate -9.999999999999999E+384 -15 -> -9.999999999999999E+384
ddrot173 rotate -9.999999999999999E+384 1 -> -9.999999999999999E+384
ddrot174 rotate -9.999999999999999E+384 15 -> -9.999999999999999E+384
ddrot175 rotate -1E-383 -1 -> -1.000000000000000E-368
ddrot176 rotate -1E-383 -15 -> -1.0E-382
ddrot177 rotate -1E-383 1 -> -1.0E-382
ddrot178 rotate -1E-383 15 -> -1.000000000000000E-368
ddrot181 rotate -1.000000000000000E-383 -1 -> -1.00000000000000E-384
ddrot182 rotate -1.000000000000000E-383 -15 -> -1E-398
ddrot183 rotate -1.000000000000000E-383 1 -> -1E-398
ddrot184 rotate -1.000000000000000E-383 15 -> -1.00000000000000E-384
ddrot185 rotate -9.000000000000000E-383 -1 -> -9.00000000000000E-384
ddrot186 rotate -9.000000000000000E-383 -15 -> -9E-398
ddrot187 rotate -9.000000000000000E-383 1 -> -9E-398
ddrot188 rotate -9.000000000000000E-383 15 -> -9.00000000000000E-384
ddrot190 rotate -1E-398 -1 -> -1.000000000000000E-383
ddrot191 rotate -1E-398 -15 -> -1.0E-397
ddrot192 rotate -1E-398 1 -> -1.0E-397
ddrot193 rotate -1E-398 15 -> -1.000000000000000E-383
-- more negatives (of sanities)
ddrot201 rotate -0 0 -> -0
ddrot202 rotate -0 2 -> -0
ddrot203 rotate -1 2 -> -100
ddrot204 rotate -1 15 -> -1000000000000000
ddrot205 rotate -1 16 -> -1
ddrot206 rotate -1 -1 -> -1000000000000000
ddrot207 rotate -0 -2 -> -0
ddrot208 rotate -1234567890123456 -1 -> -6123456789012345
ddrot209 rotate -1234567890123456 -15 -> -2345678901234561
ddrot210 rotate -1234567890123456 -16 -> -1234567890123456
ddrot211 rotate -9934567890123456 -15 -> -9345678901234569
ddrot212 rotate -9934567890123456 -16 -> -9934567890123456
-- Specials; NaNs are handled as usual
ddrot781 rotate -Inf -8 -> -Infinity
ddrot782 rotate -Inf -1 -> -Infinity
ddrot783 rotate -Inf -0 -> -Infinity
ddrot784 rotate -Inf 0 -> -Infinity
ddrot785 rotate -Inf 1 -> -Infinity
ddrot786 rotate -Inf 8 -> -Infinity
ddrot787 rotate -1000 -Inf -> NaN Invalid_operation
ddrot788 rotate -Inf -Inf -> NaN Invalid_operation
ddrot789 rotate -1 -Inf -> NaN Invalid_operation
ddrot790 rotate -0 -Inf -> NaN Invalid_operation
ddrot791 rotate 0 -Inf -> NaN Invalid_operation
ddrot792 rotate 1 -Inf -> NaN Invalid_operation
ddrot793 rotate 1000 -Inf -> NaN Invalid_operation
ddrot794 rotate Inf -Inf -> NaN Invalid_operation
ddrot800 rotate Inf -Inf -> NaN Invalid_operation
ddrot801 rotate Inf -8 -> Infinity
ddrot802 rotate Inf -1 -> Infinity
ddrot803 rotate Inf -0 -> Infinity
ddrot804 rotate Inf 0 -> Infinity
ddrot805 rotate Inf 1 -> Infinity
ddrot806 rotate Inf 8 -> Infinity
ddrot807 rotate Inf Inf -> NaN Invalid_operation
ddrot808 rotate -1000 Inf -> NaN Invalid_operation
ddrot809 rotate -Inf Inf -> NaN Invalid_operation
ddrot810 rotate -1 Inf -> NaN Invalid_operation
ddrot811 rotate -0 Inf -> NaN Invalid_operation
ddrot812 rotate 0 Inf -> NaN Invalid_operation
ddrot813 rotate 1 Inf -> NaN Invalid_operation
ddrot814 rotate 1000 Inf -> NaN Invalid_operation
ddrot815 rotate Inf Inf -> NaN Invalid_operation
ddrot821 rotate NaN -Inf -> NaN
ddrot822 rotate NaN -1000 -> NaN
ddrot823 rotate NaN -1 -> NaN
ddrot824 rotate NaN -0 -> NaN
ddrot825 rotate NaN 0 -> NaN
ddrot826 rotate NaN 1 -> NaN
ddrot827 rotate NaN 1000 -> NaN
ddrot828 rotate NaN Inf -> NaN
ddrot829 rotate NaN NaN -> NaN
ddrot830 rotate -Inf NaN -> NaN
ddrot831 rotate -1000 NaN -> NaN
ddrot832 rotate -1 NaN -> NaN
ddrot833 rotate -0 NaN -> NaN
ddrot834 rotate 0 NaN -> NaN
ddrot835 rotate 1 NaN -> NaN
ddrot836 rotate 1000 NaN -> NaN
ddrot837 rotate Inf NaN -> NaN
ddrot841 rotate sNaN -Inf -> NaN Invalid_operation
ddrot842 rotate sNaN -1000 -> NaN Invalid_operation
ddrot843 rotate sNaN -1 -> NaN Invalid_operation
ddrot844 rotate sNaN -0 -> NaN Invalid_operation
ddrot845 rotate sNaN 0 -> NaN Invalid_operation
ddrot846 rotate sNaN 1 -> NaN Invalid_operation
ddrot847 rotate sNaN 1000 -> NaN Invalid_operation
ddrot848 rotate sNaN NaN -> NaN Invalid_operation
ddrot849 rotate sNaN sNaN -> NaN Invalid_operation
ddrot850 rotate NaN sNaN -> NaN Invalid_operation
ddrot851 rotate -Inf sNaN -> NaN Invalid_operation
ddrot852 rotate -1000 sNaN -> NaN Invalid_operation
ddrot853 rotate -1 sNaN -> NaN Invalid_operation
ddrot854 rotate -0 sNaN -> NaN Invalid_operation
ddrot855 rotate 0 sNaN -> NaN Invalid_operation
ddrot856 rotate 1 sNaN -> NaN Invalid_operation
ddrot857 rotate 1000 sNaN -> NaN Invalid_operation
ddrot858 rotate Inf sNaN -> NaN Invalid_operation
ddrot859 rotate NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
ddrot861 rotate NaN1 -Inf -> NaN1
ddrot862 rotate +NaN2 -1000 -> NaN2
ddrot863 rotate NaN3 1000 -> NaN3
ddrot864 rotate NaN4 Inf -> NaN4
ddrot865 rotate NaN5 +NaN6 -> NaN5
ddrot866 rotate -Inf NaN7 -> NaN7
ddrot867 rotate -1000 NaN8 -> NaN8
ddrot868 rotate 1000 NaN9 -> NaN9
ddrot869 rotate Inf +NaN10 -> NaN10
ddrot871 rotate sNaN11 -Inf -> NaN11 Invalid_operation
ddrot872 rotate sNaN12 -1000 -> NaN12 Invalid_operation
ddrot873 rotate sNaN13 1000 -> NaN13 Invalid_operation
ddrot874 rotate sNaN14 NaN17 -> NaN14 Invalid_operation
ddrot875 rotate sNaN15 sNaN18 -> NaN15 Invalid_operation
ddrot876 rotate NaN16 sNaN19 -> NaN19 Invalid_operation
ddrot877 rotate -Inf +sNaN20 -> NaN20 Invalid_operation
ddrot878 rotate -1000 sNaN21 -> NaN21 Invalid_operation
ddrot879 rotate 1000 sNaN22 -> NaN22 Invalid_operation
ddrot880 rotate Inf sNaN23 -> NaN23 Invalid_operation
ddrot881 rotate +NaN25 +sNaN24 -> NaN24 Invalid_operation
ddrot882 rotate -NaN26 NaN28 -> -NaN26
ddrot883 rotate -sNaN27 sNaN29 -> -NaN27 Invalid_operation
ddrot884 rotate 1000 -NaN30 -> -NaN30
ddrot885 rotate 1000 -sNaN31 -> -NaN31 Invalid_operation
------------------------------------------------------------------------
-- ddRotate.decTest -- rotate a decDouble coefficient left or right --
-- 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
ddrot001 rotate 0 0 -> 0
ddrot002 rotate 0 2 -> 0
ddrot003 rotate 1 2 -> 100
ddrot004 rotate 1 15 -> 1000000000000000
ddrot005 rotate 1 16 -> 1
ddrot006 rotate 1 -1 -> 1000000000000000
ddrot007 rotate 0 -2 -> 0
ddrot008 rotate 1234567890123456 -1 -> 6123456789012345
ddrot009 rotate 1234567890123456 -15 -> 2345678901234561
ddrot010 rotate 1234567890123456 -16 -> 1234567890123456
ddrot011 rotate 9934567890123456 -15 -> 9345678901234569
ddrot012 rotate 9934567890123456 -16 -> 9934567890123456
-- rhs must be an integer
ddrot015 rotate 1 1.5 -> NaN Invalid_operation
ddrot016 rotate 1 1.0 -> NaN Invalid_operation
ddrot017 rotate 1 0.1 -> NaN Invalid_operation
ddrot018 rotate 1 0.0 -> NaN Invalid_operation
ddrot019 rotate 1 1E+1 -> NaN Invalid_operation
ddrot020 rotate 1 1E+99 -> NaN Invalid_operation
ddrot021 rotate 1 Inf -> NaN Invalid_operation
ddrot022 rotate 1 -Inf -> NaN Invalid_operation
-- and |rhs| <= precision
ddrot025 rotate 1 -1000 -> NaN Invalid_operation
ddrot026 rotate 1 -17 -> NaN Invalid_operation
ddrot027 rotate 1 17 -> NaN Invalid_operation
ddrot028 rotate 1 1000 -> NaN Invalid_operation
-- full pattern
ddrot030 rotate 1234567890123456 -16 -> 1234567890123456
ddrot031 rotate 1234567890123456 -15 -> 2345678901234561
ddrot032 rotate 1234567890123456 -14 -> 3456789012345612
ddrot033 rotate 1234567890123456 -13 -> 4567890123456123
ddrot034 rotate 1234567890123456 -12 -> 5678901234561234
ddrot035 rotate 1234567890123456 -11 -> 6789012345612345
ddrot036 rotate 1234567890123456 -10 -> 7890123456123456
ddrot037 rotate 1234567890123456 -9 -> 8901234561234567
ddrot038 rotate 1234567890123456 -8 -> 9012345612345678
ddrot039 rotate 1234567890123456 -7 -> 123456123456789
ddrot040 rotate 1234567890123456 -6 -> 1234561234567890
ddrot041 rotate 1234567890123456 -5 -> 2345612345678901
ddrot042 rotate 1234567890123456 -4 -> 3456123456789012
ddrot043 rotate 1234567890123456 -3 -> 4561234567890123
ddrot044 rotate 1234567890123456 -2 -> 5612345678901234
ddrot045 rotate 1234567890123456 -1 -> 6123456789012345
ddrot046 rotate 1234567890123456 -0 -> 1234567890123456
ddrot047 rotate 1234567890123456 +0 -> 1234567890123456
ddrot048 rotate 1234567890123456 +1 -> 2345678901234561
ddrot049 rotate 1234567890123456 +2 -> 3456789012345612
ddrot050 rotate 1234567890123456 +3 -> 4567890123456123
ddrot051 rotate 1234567890123456 +4 -> 5678901234561234
ddrot052 rotate 1234567890123456 +5 -> 6789012345612345
ddrot053 rotate 1234567890123456 +6 -> 7890123456123456
ddrot054 rotate 1234567890123456 +7 -> 8901234561234567
ddrot055 rotate 1234567890123456 +8 -> 9012345612345678
ddrot056 rotate 1234567890123456 +9 -> 123456123456789
ddrot057 rotate 1234567890123456 +10 -> 1234561234567890
ddrot058 rotate 1234567890123456 +11 -> 2345612345678901
ddrot059 rotate 1234567890123456 +12 -> 3456123456789012
ddrot060 rotate 1234567890123456 +13 -> 4561234567890123
ddrot061 rotate 1234567890123456 +14 -> 5612345678901234
ddrot062 rotate 1234567890123456 +15 -> 6123456789012345
ddrot063 rotate 1234567890123456 +16 -> 1234567890123456
-- zeros
ddrot070 rotate 0E-10 +9 -> 0E-10
ddrot071 rotate 0E-10 -9 -> 0E-10
ddrot072 rotate 0.000 +9 -> 0.000
ddrot073 rotate 0.000 -9 -> 0.000
ddrot074 rotate 0E+10 +9 -> 0E+10
ddrot075 rotate 0E+10 -9 -> 0E+10
ddrot076 rotate -0E-10 +9 -> -0E-10
ddrot077 rotate -0E-10 -9 -> -0E-10
ddrot078 rotate -0.000 +9 -> -0.000
ddrot079 rotate -0.000 -9 -> -0.000
ddrot080 rotate -0E+10 +9 -> -0E+10
ddrot081 rotate -0E+10 -9 -> -0E+10
-- Nmax, Nmin, Ntiny
ddrot141 rotate 9.999999999999999E+384 -1 -> 9.999999999999999E+384
ddrot142 rotate 9.999999999999999E+384 -15 -> 9.999999999999999E+384
ddrot143 rotate 9.999999999999999E+384 1 -> 9.999999999999999E+384
ddrot144 rotate 9.999999999999999E+384 15 -> 9.999999999999999E+384
ddrot145 rotate 1E-383 -1 -> 1.000000000000000E-368
ddrot146 rotate 1E-383 -15 -> 1.0E-382
ddrot147 rotate 1E-383 1 -> 1.0E-382
ddrot148 rotate 1E-383 15 -> 1.000000000000000E-368
ddrot151 rotate 1.000000000000000E-383 -1 -> 1.00000000000000E-384
ddrot152 rotate 1.000000000000000E-383 -15 -> 1E-398
ddrot153 rotate 1.000000000000000E-383 1 -> 1E-398
ddrot154 rotate 1.000000000000000E-383 15 -> 1.00000000000000E-384
ddrot155 rotate 9.000000000000000E-383 -1 -> 9.00000000000000E-384
ddrot156 rotate 9.000000000000000E-383 -15 -> 9E-398
ddrot157 rotate 9.000000000000000E-383 1 -> 9E-398
ddrot158 rotate 9.000000000000000E-383 15 -> 9.00000000000000E-384
ddrot160 rotate 1E-398 -1 -> 1.000000000000000E-383
ddrot161 rotate 1E-398 -15 -> 1.0E-397
ddrot162 rotate 1E-398 1 -> 1.0E-397
ddrot163 rotate 1E-398 15 -> 1.000000000000000E-383
-- negatives
ddrot171 rotate -9.999999999999999E+384 -1 -> -9.999999999999999E+384
ddrot172 rotate -9.999999999999999E+384 -15 -> -9.999999999999999E+384
ddrot173 rotate -9.999999999999999E+384 1 -> -9.999999999999999E+384
ddrot174 rotate -9.999999999999999E+384 15 -> -9.999999999999999E+384
ddrot175 rotate -1E-383 -1 -> -1.000000000000000E-368
ddrot176 rotate -1E-383 -15 -> -1.0E-382
ddrot177 rotate -1E-383 1 -> -1.0E-382
ddrot178 rotate -1E-383 15 -> -1.000000000000000E-368
ddrot181 rotate -1.000000000000000E-383 -1 -> -1.00000000000000E-384
ddrot182 rotate -1.000000000000000E-383 -15 -> -1E-398
ddrot183 rotate -1.000000000000000E-383 1 -> -1E-398
ddrot184 rotate -1.000000000000000E-383 15 -> -1.00000000000000E-384
ddrot185 rotate -9.000000000000000E-383 -1 -> -9.00000000000000E-384
ddrot186 rotate -9.000000000000000E-383 -15 -> -9E-398
ddrot187 rotate -9.000000000000000E-383 1 -> -9E-398
ddrot188 rotate -9.000000000000000E-383 15 -> -9.00000000000000E-384
ddrot190 rotate -1E-398 -1 -> -1.000000000000000E-383
ddrot191 rotate -1E-398 -15 -> -1.0E-397
ddrot192 rotate -1E-398 1 -> -1.0E-397
ddrot193 rotate -1E-398 15 -> -1.000000000000000E-383
-- more negatives (of sanities)
ddrot201 rotate -0 0 -> -0
ddrot202 rotate -0 2 -> -0
ddrot203 rotate -1 2 -> -100
ddrot204 rotate -1 15 -> -1000000000000000
ddrot205 rotate -1 16 -> -1
ddrot206 rotate -1 -1 -> -1000000000000000
ddrot207 rotate -0 -2 -> -0
ddrot208 rotate -1234567890123456 -1 -> -6123456789012345
ddrot209 rotate -1234567890123456 -15 -> -2345678901234561
ddrot210 rotate -1234567890123456 -16 -> -1234567890123456
ddrot211 rotate -9934567890123456 -15 -> -9345678901234569
ddrot212 rotate -9934567890123456 -16 -> -9934567890123456
-- Specials; NaNs are handled as usual
ddrot781 rotate -Inf -8 -> -Infinity
ddrot782 rotate -Inf -1 -> -Infinity
ddrot783 rotate -Inf -0 -> -Infinity
ddrot784 rotate -Inf 0 -> -Infinity
ddrot785 rotate -Inf 1 -> -Infinity
ddrot786 rotate -Inf 8 -> -Infinity
ddrot787 rotate -1000 -Inf -> NaN Invalid_operation
ddrot788 rotate -Inf -Inf -> NaN Invalid_operation
ddrot789 rotate -1 -Inf -> NaN Invalid_operation
ddrot790 rotate -0 -Inf -> NaN Invalid_operation
ddrot791 rotate 0 -Inf -> NaN Invalid_operation
ddrot792 rotate 1 -Inf -> NaN Invalid_operation
ddrot793 rotate 1000 -Inf -> NaN Invalid_operation
ddrot794 rotate Inf -Inf -> NaN Invalid_operation
ddrot800 rotate Inf -Inf -> NaN Invalid_operation
ddrot801 rotate Inf -8 -> Infinity
ddrot802 rotate Inf -1 -> Infinity
ddrot803 rotate Inf -0 -> Infinity
ddrot804 rotate Inf 0 -> Infinity
ddrot805 rotate Inf 1 -> Infinity
ddrot806 rotate Inf 8 -> Infinity
ddrot807 rotate Inf Inf -> NaN Invalid_operation
ddrot808 rotate -1000 Inf -> NaN Invalid_operation
ddrot809 rotate -Inf Inf -> NaN Invalid_operation
ddrot810 rotate -1 Inf -> NaN Invalid_operation
ddrot811 rotate -0 Inf -> NaN Invalid_operation
ddrot812 rotate 0 Inf -> NaN Invalid_operation
ddrot813 rotate 1 Inf -> NaN Invalid_operation
ddrot814 rotate 1000 Inf -> NaN Invalid_operation
ddrot815 rotate Inf Inf -> NaN Invalid_operation
ddrot821 rotate NaN -Inf -> NaN
ddrot822 rotate NaN -1000 -> NaN
ddrot823 rotate NaN -1 -> NaN
ddrot824 rotate NaN -0 -> NaN
ddrot825 rotate NaN 0 -> NaN
ddrot826 rotate NaN 1 -> NaN
ddrot827 rotate NaN 1000 -> NaN
ddrot828 rotate NaN Inf -> NaN
ddrot829 rotate NaN NaN -> NaN
ddrot830 rotate -Inf NaN -> NaN
ddrot831 rotate -1000 NaN -> NaN
ddrot832 rotate -1 NaN -> NaN
ddrot833 rotate -0 NaN -> NaN
ddrot834 rotate 0 NaN -> NaN
ddrot835 rotate 1 NaN -> NaN
ddrot836 rotate 1000 NaN -> NaN
ddrot837 rotate Inf NaN -> NaN
ddrot841 rotate sNaN -Inf -> NaN Invalid_operation
ddrot842 rotate sNaN -1000 -> NaN Invalid_operation
ddrot843 rotate sNaN -1 -> NaN Invalid_operation
ddrot844 rotate sNaN -0 -> NaN Invalid_operation
ddrot845 rotate sNaN 0 -> NaN Invalid_operation
ddrot846 rotate sNaN 1 -> NaN Invalid_operation
ddrot847 rotate sNaN 1000 -> NaN Invalid_operation
ddrot848 rotate sNaN NaN -> NaN Invalid_operation
ddrot849 rotate sNaN sNaN -> NaN Invalid_operation
ddrot850 rotate NaN sNaN -> NaN Invalid_operation
ddrot851 rotate -Inf sNaN -> NaN Invalid_operation
ddrot852 rotate -1000 sNaN -> NaN Invalid_operation
ddrot853 rotate -1 sNaN -> NaN Invalid_operation
ddrot854 rotate -0 sNaN -> NaN Invalid_operation
ddrot855 rotate 0 sNaN -> NaN Invalid_operation
ddrot856 rotate 1 sNaN -> NaN Invalid_operation
ddrot857 rotate 1000 sNaN -> NaN Invalid_operation
ddrot858 rotate Inf sNaN -> NaN Invalid_operation
ddrot859 rotate NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
ddrot861 rotate NaN1 -Inf -> NaN1
ddrot862 rotate +NaN2 -1000 -> NaN2
ddrot863 rotate NaN3 1000 -> NaN3
ddrot864 rotate NaN4 Inf -> NaN4
ddrot865 rotate NaN5 +NaN6 -> NaN5
ddrot866 rotate -Inf NaN7 -> NaN7
ddrot867 rotate -1000 NaN8 -> NaN8
ddrot868 rotate 1000 NaN9 -> NaN9
ddrot869 rotate Inf +NaN10 -> NaN10
ddrot871 rotate sNaN11 -Inf -> NaN11 Invalid_operation
ddrot872 rotate sNaN12 -1000 -> NaN12 Invalid_operation
ddrot873 rotate sNaN13 1000 -> NaN13 Invalid_operation
ddrot874 rotate sNaN14 NaN17 -> NaN14 Invalid_operation
ddrot875 rotate sNaN15 sNaN18 -> NaN15 Invalid_operation
ddrot876 rotate NaN16 sNaN19 -> NaN19 Invalid_operation
ddrot877 rotate -Inf +sNaN20 -> NaN20 Invalid_operation
ddrot878 rotate -1000 sNaN21 -> NaN21 Invalid_operation
ddrot879 rotate 1000 sNaN22 -> NaN22 Invalid_operation
ddrot880 rotate Inf sNaN23 -> NaN23 Invalid_operation
ddrot881 rotate +NaN25 +sNaN24 -> NaN24 Invalid_operation
ddrot882 rotate -NaN26 NaN28 -> -NaN26
ddrot883 rotate -sNaN27 sNaN29 -> -NaN27 Invalid_operation
ddrot884 rotate 1000 -NaN30 -> -NaN30
ddrot885 rotate 1000 -sNaN31 -> -NaN31 Invalid_operation

View file

@ -1,389 +1,389 @@
------------------------------------------------------------------------
-- ddSameQuantum.decTest -- check decDouble quantums match --
-- Copyright (c) IBM Corporation, 2001, 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
ddsamq001 samequantum 0 0 -> 1
ddsamq002 samequantum 0 1 -> 1
ddsamq003 samequantum 1 0 -> 1
ddsamq004 samequantum 1 1 -> 1
ddsamq011 samequantum 10 1E+1 -> 0
ddsamq012 samequantum 10E+1 10E+1 -> 1
ddsamq013 samequantum 100 10E+1 -> 0
ddsamq014 samequantum 100 1E+2 -> 0
ddsamq015 samequantum 0.1 1E-2 -> 0
ddsamq016 samequantum 0.1 1E-1 -> 1
ddsamq017 samequantum 0.1 1E-0 -> 0
ddsamq018 samequantum 999 999 -> 1
ddsamq019 samequantum 999E-1 99.9 -> 1
ddsamq020 samequantum 111E-1 22.2 -> 1
ddsamq021 samequantum 111E-1 1234.2 -> 1
-- zeros
ddsamq030 samequantum 0.0 1.1 -> 1
ddsamq031 samequantum 0.0 1.11 -> 0
ddsamq032 samequantum 0.0 0 -> 0
ddsamq033 samequantum 0.0 0.0 -> 1
ddsamq034 samequantum 0.0 0.00 -> 0
ddsamq035 samequantum 0E+1 0E+0 -> 0
ddsamq036 samequantum 0E+1 0E+1 -> 1
ddsamq037 samequantum 0E+1 0E+2 -> 0
ddsamq038 samequantum 0E-17 0E-16 -> 0
ddsamq039 samequantum 0E-17 0E-17 -> 1
ddsamq040 samequantum 0E-17 0E-18 -> 0
ddsamq041 samequantum 0E-17 0.0E-15 -> 0
ddsamq042 samequantum 0E-17 0.0E-16 -> 1
ddsamq043 samequantum 0E-17 0.0E-17 -> 0
ddsamq044 samequantum -0E-17 0.0E-16 -> 1
ddsamq045 samequantum 0E-17 -0.0E-17 -> 0
ddsamq046 samequantum 0E-17 -0.0E-16 -> 1
ddsamq047 samequantum -0E-17 0.0E-17 -> 0
ddsamq048 samequantum -0E-17 -0.0E-16 -> 1
ddsamq049 samequantum -0E-17 -0.0E-17 -> 0
-- Nmax, Nmin, Ntiny
ddsamq051 samequantum 9.999999999999999E+384 9.999999999999999E+384 -> 1
ddsamq052 samequantum 1E-383 1E-383 -> 1
ddsamq053 samequantum 1.000000000000000E-383 1.000000000000000E-383 -> 1
ddsamq054 samequantum 1E-398 1E-398 -> 1
ddsamq055 samequantum 9.999999999999999E+384 9.999999999999999E+384 -> 1
ddsamq056 samequantum 1E-383 1E-383 -> 1
ddsamq057 samequantum 1.000000000000000E-383 1.000000000000000E-383 -> 1
ddsamq058 samequantum 1E-398 1E-398 -> 1
ddsamq061 samequantum -1E-398 -1E-398 -> 1
ddsamq062 samequantum -1.000000000000000E-383 -1.000000000000000E-383 -> 1
ddsamq063 samequantum -1E-383 -1E-383 -> 1
ddsamq064 samequantum -9.999999999999999E+384 -9.999999999999999E+384 -> 1
ddsamq065 samequantum -1E-398 -1E-398 -> 1
ddsamq066 samequantum -1.000000000000000E-383 -1.000000000000000E-383 -> 1
ddsamq067 samequantum -1E-383 -1E-383 -> 1
ddsamq068 samequantum -9.999999999999999E+384 -9.999999999999999E+384 -> 1
ddsamq071 samequantum -4E-398 -1E-398 -> 1
ddsamq072 samequantum -4.000000000000000E-383 -1.000040000000000E-383 -> 1
ddsamq073 samequantum -4E-383 -1E-383 -> 1
ddsamq074 samequantum -4.999999999999999E+384 -9.999999999949999E+384 -> 1
ddsamq075 samequantum -4E-398 -1E-398 -> 1
ddsamq076 samequantum -4.000000000000000E-383 -1.004000000000000E-383 -> 1
ddsamq077 samequantum -4E-383 -1E-383 -> 1
ddsamq078 samequantum -4.999999999999999E+384 -9.949999999999999E+384 -> 1
ddsamq081 samequantum -4E-397 -1E-398 -> 0
ddsamq082 samequantum -4.000000000000000E-383 -1.000040000000000E-336 -> 0
ddsamq083 samequantum -4E-346 -1E-383 -> 0
ddsamq084 samequantum -4.999999999999999E+384 -9.999499999999999E+336 -> 0
ddsamq085 samequantum -4E-397 -1E-398 -> 0
ddsamq086 samequantum -4.000000000000000E-383 -1.004000000000000E-336 -> 0
ddsamq087 samequantum -4E-346 -1E-383 -> 0
ddsamq088 samequantum -4.999999999999999E+384 -9.949999999999999E+336 -> 0
-- specials & combinations
ddsamq0110 samequantum -Inf -Inf -> 1
ddsamq0111 samequantum -Inf Inf -> 1
ddsamq0112 samequantum -Inf NaN -> 0
ddsamq0113 samequantum -Inf -7E+3 -> 0
ddsamq0114 samequantum -Inf -7 -> 0
ddsamq0115 samequantum -Inf -7E-3 -> 0
ddsamq0116 samequantum -Inf -0E-3 -> 0
ddsamq0117 samequantum -Inf -0 -> 0
ddsamq0118 samequantum -Inf -0E+3 -> 0
ddsamq0119 samequantum -Inf 0E-3 -> 0
ddsamq0120 samequantum -Inf 0 -> 0
ddsamq0121 samequantum -Inf 0E+3 -> 0
ddsamq0122 samequantum -Inf 7E-3 -> 0
ddsamq0123 samequantum -Inf 7 -> 0
ddsamq0124 samequantum -Inf 7E+3 -> 0
ddsamq0125 samequantum -Inf sNaN -> 0
ddsamq0210 samequantum Inf -Inf -> 1
ddsamq0211 samequantum Inf Inf -> 1
ddsamq0212 samequantum Inf NaN -> 0
ddsamq0213 samequantum Inf -7E+3 -> 0
ddsamq0214 samequantum Inf -7 -> 0
ddsamq0215 samequantum Inf -7E-3 -> 0
ddsamq0216 samequantum Inf -0E-3 -> 0
ddsamq0217 samequantum Inf -0 -> 0
ddsamq0218 samequantum Inf -0E+3 -> 0
ddsamq0219 samequantum Inf 0E-3 -> 0
ddsamq0220 samequantum Inf 0 -> 0
ddsamq0221 samequantum Inf 0E+3 -> 0
ddsamq0222 samequantum Inf 7E-3 -> 0
ddsamq0223 samequantum Inf 7 -> 0
ddsamq0224 samequantum Inf 7E+3 -> 0
ddsamq0225 samequantum Inf sNaN -> 0
ddsamq0310 samequantum NaN -Inf -> 0
ddsamq0311 samequantum NaN Inf -> 0
ddsamq0312 samequantum NaN NaN -> 1
ddsamq0313 samequantum NaN -7E+3 -> 0
ddsamq0314 samequantum NaN -7 -> 0
ddsamq0315 samequantum NaN -7E-3 -> 0
ddsamq0316 samequantum NaN -0E-3 -> 0
ddsamq0317 samequantum NaN -0 -> 0
ddsamq0318 samequantum NaN -0E+3 -> 0
ddsamq0319 samequantum NaN 0E-3 -> 0
ddsamq0320 samequantum NaN 0 -> 0
ddsamq0321 samequantum NaN 0E+3 -> 0
ddsamq0322 samequantum NaN 7E-3 -> 0
ddsamq0323 samequantum NaN 7 -> 0
ddsamq0324 samequantum NaN 7E+3 -> 0
ddsamq0325 samequantum NaN sNaN -> 1
ddsamq0410 samequantum -7E+3 -Inf -> 0
ddsamq0411 samequantum -7E+3 Inf -> 0
ddsamq0412 samequantum -7E+3 NaN -> 0
ddsamq0413 samequantum -7E+3 -7E+3 -> 1
ddsamq0414 samequantum -7E+3 -7 -> 0
ddsamq0415 samequantum -7E+3 -7E-3 -> 0
ddsamq0416 samequantum -7E+3 -0E-3 -> 0
ddsamq0417 samequantum -7E+3 -0 -> 0
ddsamq0418 samequantum -7E+3 -0E+3 -> 1
ddsamq0419 samequantum -7E+3 0E-3 -> 0
ddsamq0420 samequantum -7E+3 0 -> 0
ddsamq0421 samequantum -7E+3 0E+3 -> 1
ddsamq0422 samequantum -7E+3 7E-3 -> 0
ddsamq0423 samequantum -7E+3 7 -> 0
ddsamq0424 samequantum -7E+3 7E+3 -> 1
ddsamq0425 samequantum -7E+3 sNaN -> 0
ddsamq0510 samequantum -7 -Inf -> 0
ddsamq0511 samequantum -7 Inf -> 0
ddsamq0512 samequantum -7 NaN -> 0
ddsamq0513 samequantum -7 -7E+3 -> 0
ddsamq0514 samequantum -7 -7 -> 1
ddsamq0515 samequantum -7 -7E-3 -> 0
ddsamq0516 samequantum -7 -0E-3 -> 0
ddsamq0517 samequantum -7 -0 -> 1
ddsamq0518 samequantum -7 -0E+3 -> 0
ddsamq0519 samequantum -7 0E-3 -> 0
ddsamq0520 samequantum -7 0 -> 1
ddsamq0521 samequantum -7 0E+3 -> 0
ddsamq0522 samequantum -7 7E-3 -> 0
ddsamq0523 samequantum -7 7 -> 1
ddsamq0524 samequantum -7 7E+3 -> 0
ddsamq0525 samequantum -7 sNaN -> 0
ddsamq0610 samequantum -7E-3 -Inf -> 0
ddsamq0611 samequantum -7E-3 Inf -> 0
ddsamq0612 samequantum -7E-3 NaN -> 0
ddsamq0613 samequantum -7E-3 -7E+3 -> 0
ddsamq0614 samequantum -7E-3 -7 -> 0
ddsamq0615 samequantum -7E-3 -7E-3 -> 1
ddsamq0616 samequantum -7E-3 -0E-3 -> 1
ddsamq0617 samequantum -7E-3 -0 -> 0
ddsamq0618 samequantum -7E-3 -0E+3 -> 0
ddsamq0619 samequantum -7E-3 0E-3 -> 1
ddsamq0620 samequantum -7E-3 0 -> 0
ddsamq0621 samequantum -7E-3 0E+3 -> 0
ddsamq0622 samequantum -7E-3 7E-3 -> 1
ddsamq0623 samequantum -7E-3 7 -> 0
ddsamq0624 samequantum -7E-3 7E+3 -> 0
ddsamq0625 samequantum -7E-3 sNaN -> 0
ddsamq0710 samequantum -0E-3 -Inf -> 0
ddsamq0711 samequantum -0E-3 Inf -> 0
ddsamq0712 samequantum -0E-3 NaN -> 0
ddsamq0713 samequantum -0E-3 -7E+3 -> 0
ddsamq0714 samequantum -0E-3 -7 -> 0
ddsamq0715 samequantum -0E-3 -7E-3 -> 1
ddsamq0716 samequantum -0E-3 -0E-3 -> 1
ddsamq0717 samequantum -0E-3 -0 -> 0
ddsamq0718 samequantum -0E-3 -0E+3 -> 0
ddsamq0719 samequantum -0E-3 0E-3 -> 1
ddsamq0720 samequantum -0E-3 0 -> 0
ddsamq0721 samequantum -0E-3 0E+3 -> 0
ddsamq0722 samequantum -0E-3 7E-3 -> 1
ddsamq0723 samequantum -0E-3 7 -> 0
ddsamq0724 samequantum -0E-3 7E+3 -> 0
ddsamq0725 samequantum -0E-3 sNaN -> 0
ddsamq0810 samequantum -0 -Inf -> 0
ddsamq0811 samequantum -0 Inf -> 0
ddsamq0812 samequantum -0 NaN -> 0
ddsamq0813 samequantum -0 -7E+3 -> 0
ddsamq0814 samequantum -0 -7 -> 1
ddsamq0815 samequantum -0 -7E-3 -> 0
ddsamq0816 samequantum -0 -0E-3 -> 0
ddsamq0817 samequantum -0 -0 -> 1
ddsamq0818 samequantum -0 -0E+3 -> 0
ddsamq0819 samequantum -0 0E-3 -> 0
ddsamq0820 samequantum -0 0 -> 1
ddsamq0821 samequantum -0 0E+3 -> 0
ddsamq0822 samequantum -0 7E-3 -> 0
ddsamq0823 samequantum -0 7 -> 1
ddsamq0824 samequantum -0 7E+3 -> 0
ddsamq0825 samequantum -0 sNaN -> 0
ddsamq0910 samequantum -0E+3 -Inf -> 0
ddsamq0911 samequantum -0E+3 Inf -> 0
ddsamq0912 samequantum -0E+3 NaN -> 0
ddsamq0913 samequantum -0E+3 -7E+3 -> 1
ddsamq0914 samequantum -0E+3 -7 -> 0
ddsamq0915 samequantum -0E+3 -7E-3 -> 0
ddsamq0916 samequantum -0E+3 -0E-3 -> 0
ddsamq0917 samequantum -0E+3 -0 -> 0
ddsamq0918 samequantum -0E+3 -0E+3 -> 1
ddsamq0919 samequantum -0E+3 0E-3 -> 0
ddsamq0920 samequantum -0E+3 0 -> 0
ddsamq0921 samequantum -0E+3 0E+3 -> 1
ddsamq0922 samequantum -0E+3 7E-3 -> 0
ddsamq0923 samequantum -0E+3 7 -> 0
ddsamq0924 samequantum -0E+3 7E+3 -> 1
ddsamq0925 samequantum -0E+3 sNaN -> 0
ddsamq1110 samequantum 0E-3 -Inf -> 0
ddsamq1111 samequantum 0E-3 Inf -> 0
ddsamq1112 samequantum 0E-3 NaN -> 0
ddsamq1113 samequantum 0E-3 -7E+3 -> 0
ddsamq1114 samequantum 0E-3 -7 -> 0
ddsamq1115 samequantum 0E-3 -7E-3 -> 1
ddsamq1116 samequantum 0E-3 -0E-3 -> 1
ddsamq1117 samequantum 0E-3 -0 -> 0
ddsamq1118 samequantum 0E-3 -0E+3 -> 0
ddsamq1119 samequantum 0E-3 0E-3 -> 1
ddsamq1120 samequantum 0E-3 0 -> 0
ddsamq1121 samequantum 0E-3 0E+3 -> 0
ddsamq1122 samequantum 0E-3 7E-3 -> 1
ddsamq1123 samequantum 0E-3 7 -> 0
ddsamq1124 samequantum 0E-3 7E+3 -> 0
ddsamq1125 samequantum 0E-3 sNaN -> 0
ddsamq1210 samequantum 0 -Inf -> 0
ddsamq1211 samequantum 0 Inf -> 0
ddsamq1212 samequantum 0 NaN -> 0
ddsamq1213 samequantum 0 -7E+3 -> 0
ddsamq1214 samequantum 0 -7 -> 1
ddsamq1215 samequantum 0 -7E-3 -> 0
ddsamq1216 samequantum 0 -0E-3 -> 0
ddsamq1217 samequantum 0 -0 -> 1
ddsamq1218 samequantum 0 -0E+3 -> 0
ddsamq1219 samequantum 0 0E-3 -> 0
ddsamq1220 samequantum 0 0 -> 1
ddsamq1221 samequantum 0 0E+3 -> 0
ddsamq1222 samequantum 0 7E-3 -> 0
ddsamq1223 samequantum 0 7 -> 1
ddsamq1224 samequantum 0 7E+3 -> 0
ddsamq1225 samequantum 0 sNaN -> 0
ddsamq1310 samequantum 0E+3 -Inf -> 0
ddsamq1311 samequantum 0E+3 Inf -> 0
ddsamq1312 samequantum 0E+3 NaN -> 0
ddsamq1313 samequantum 0E+3 -7E+3 -> 1
ddsamq1314 samequantum 0E+3 -7 -> 0
ddsamq1315 samequantum 0E+3 -7E-3 -> 0
ddsamq1316 samequantum 0E+3 -0E-3 -> 0
ddsamq1317 samequantum 0E+3 -0 -> 0
ddsamq1318 samequantum 0E+3 -0E+3 -> 1
ddsamq1319 samequantum 0E+3 0E-3 -> 0
ddsamq1320 samequantum 0E+3 0 -> 0
ddsamq1321 samequantum 0E+3 0E+3 -> 1
ddsamq1322 samequantum 0E+3 7E-3 -> 0
ddsamq1323 samequantum 0E+3 7 -> 0
ddsamq1324 samequantum 0E+3 7E+3 -> 1
ddsamq1325 samequantum 0E+3 sNaN -> 0
ddsamq1410 samequantum 7E-3 -Inf -> 0
ddsamq1411 samequantum 7E-3 Inf -> 0
ddsamq1412 samequantum 7E-3 NaN -> 0
ddsamq1413 samequantum 7E-3 -7E+3 -> 0
ddsamq1414 samequantum 7E-3 -7 -> 0
ddsamq1415 samequantum 7E-3 -7E-3 -> 1
ddsamq1416 samequantum 7E-3 -0E-3 -> 1
ddsamq1417 samequantum 7E-3 -0 -> 0
ddsamq1418 samequantum 7E-3 -0E+3 -> 0
ddsamq1419 samequantum 7E-3 0E-3 -> 1
ddsamq1420 samequantum 7E-3 0 -> 0
ddsamq1421 samequantum 7E-3 0E+3 -> 0
ddsamq1422 samequantum 7E-3 7E-3 -> 1
ddsamq1423 samequantum 7E-3 7 -> 0
ddsamq1424 samequantum 7E-3 7E+3 -> 0
ddsamq1425 samequantum 7E-3 sNaN -> 0
ddsamq1510 samequantum 7 -Inf -> 0
ddsamq1511 samequantum 7 Inf -> 0
ddsamq1512 samequantum 7 NaN -> 0
ddsamq1513 samequantum 7 -7E+3 -> 0
ddsamq1514 samequantum 7 -7 -> 1
ddsamq1515 samequantum 7 -7E-3 -> 0
ddsamq1516 samequantum 7 -0E-3 -> 0
ddsamq1517 samequantum 7 -0 -> 1
ddsamq1518 samequantum 7 -0E+3 -> 0
ddsamq1519 samequantum 7 0E-3 -> 0
ddsamq1520 samequantum 7 0 -> 1
ddsamq1521 samequantum 7 0E+3 -> 0
ddsamq1522 samequantum 7 7E-3 -> 0
ddsamq1523 samequantum 7 7 -> 1
ddsamq1524 samequantum 7 7E+3 -> 0
ddsamq1525 samequantum 7 sNaN -> 0
ddsamq1610 samequantum 7E+3 -Inf -> 0
ddsamq1611 samequantum 7E+3 Inf -> 0
ddsamq1612 samequantum 7E+3 NaN -> 0
ddsamq1613 samequantum 7E+3 -7E+3 -> 1
ddsamq1614 samequantum 7E+3 -7 -> 0
ddsamq1615 samequantum 7E+3 -7E-3 -> 0
ddsamq1616 samequantum 7E+3 -0E-3 -> 0
ddsamq1617 samequantum 7E+3 -0 -> 0
ddsamq1618 samequantum 7E+3 -0E+3 -> 1
ddsamq1619 samequantum 7E+3 0E-3 -> 0
ddsamq1620 samequantum 7E+3 0 -> 0
ddsamq1621 samequantum 7E+3 0E+3 -> 1
ddsamq1622 samequantum 7E+3 7E-3 -> 0
ddsamq1623 samequantum 7E+3 7 -> 0
ddsamq1624 samequantum 7E+3 7E+3 -> 1
ddsamq1625 samequantum 7E+3 sNaN -> 0
ddsamq1710 samequantum sNaN -Inf -> 0
ddsamq1711 samequantum sNaN Inf -> 0
ddsamq1712 samequantum sNaN NaN -> 1
ddsamq1713 samequantum sNaN -7E+3 -> 0
ddsamq1714 samequantum sNaN -7 -> 0
ddsamq1715 samequantum sNaN -7E-3 -> 0
ddsamq1716 samequantum sNaN -0E-3 -> 0
ddsamq1717 samequantum sNaN -0 -> 0
ddsamq1718 samequantum sNaN -0E+3 -> 0
ddsamq1719 samequantum sNaN 0E-3 -> 0
ddsamq1720 samequantum sNaN 0 -> 0
ddsamq1721 samequantum sNaN 0E+3 -> 0
ddsamq1722 samequantum sNaN 7E-3 -> 0
ddsamq1723 samequantum sNaN 7 -> 0
ddsamq1724 samequantum sNaN 7E+3 -> 0
ddsamq1725 samequantum sNaN sNaN -> 1
-- noisy NaNs
ddsamq1730 samequantum sNaN3 sNaN3 -> 1
ddsamq1731 samequantum sNaN3 sNaN4 -> 1
ddsamq1732 samequantum NaN3 NaN3 -> 1
ddsamq1733 samequantum NaN3 NaN4 -> 1
ddsamq1734 samequantum sNaN3 3 -> 0
ddsamq1735 samequantum NaN3 3 -> 0
ddsamq1736 samequantum 4 sNaN4 -> 0
ddsamq1737 samequantum 3 NaN3 -> 0
ddsamq1738 samequantum Inf sNaN4 -> 0
ddsamq1739 samequantum -Inf NaN3 -> 0
------------------------------------------------------------------------
-- ddSameQuantum.decTest -- check decDouble quantums match --
-- Copyright (c) IBM Corporation, 2001, 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
ddsamq001 samequantum 0 0 -> 1
ddsamq002 samequantum 0 1 -> 1
ddsamq003 samequantum 1 0 -> 1
ddsamq004 samequantum 1 1 -> 1
ddsamq011 samequantum 10 1E+1 -> 0
ddsamq012 samequantum 10E+1 10E+1 -> 1
ddsamq013 samequantum 100 10E+1 -> 0
ddsamq014 samequantum 100 1E+2 -> 0
ddsamq015 samequantum 0.1 1E-2 -> 0
ddsamq016 samequantum 0.1 1E-1 -> 1
ddsamq017 samequantum 0.1 1E-0 -> 0
ddsamq018 samequantum 999 999 -> 1
ddsamq019 samequantum 999E-1 99.9 -> 1
ddsamq020 samequantum 111E-1 22.2 -> 1
ddsamq021 samequantum 111E-1 1234.2 -> 1
-- zeros
ddsamq030 samequantum 0.0 1.1 -> 1
ddsamq031 samequantum 0.0 1.11 -> 0
ddsamq032 samequantum 0.0 0 -> 0
ddsamq033 samequantum 0.0 0.0 -> 1
ddsamq034 samequantum 0.0 0.00 -> 0
ddsamq035 samequantum 0E+1 0E+0 -> 0
ddsamq036 samequantum 0E+1 0E+1 -> 1
ddsamq037 samequantum 0E+1 0E+2 -> 0
ddsamq038 samequantum 0E-17 0E-16 -> 0
ddsamq039 samequantum 0E-17 0E-17 -> 1
ddsamq040 samequantum 0E-17 0E-18 -> 0
ddsamq041 samequantum 0E-17 0.0E-15 -> 0
ddsamq042 samequantum 0E-17 0.0E-16 -> 1
ddsamq043 samequantum 0E-17 0.0E-17 -> 0
ddsamq044 samequantum -0E-17 0.0E-16 -> 1
ddsamq045 samequantum 0E-17 -0.0E-17 -> 0
ddsamq046 samequantum 0E-17 -0.0E-16 -> 1
ddsamq047 samequantum -0E-17 0.0E-17 -> 0
ddsamq048 samequantum -0E-17 -0.0E-16 -> 1
ddsamq049 samequantum -0E-17 -0.0E-17 -> 0
-- Nmax, Nmin, Ntiny
ddsamq051 samequantum 9.999999999999999E+384 9.999999999999999E+384 -> 1
ddsamq052 samequantum 1E-383 1E-383 -> 1
ddsamq053 samequantum 1.000000000000000E-383 1.000000000000000E-383 -> 1
ddsamq054 samequantum 1E-398 1E-398 -> 1
ddsamq055 samequantum 9.999999999999999E+384 9.999999999999999E+384 -> 1
ddsamq056 samequantum 1E-383 1E-383 -> 1
ddsamq057 samequantum 1.000000000000000E-383 1.000000000000000E-383 -> 1
ddsamq058 samequantum 1E-398 1E-398 -> 1
ddsamq061 samequantum -1E-398 -1E-398 -> 1
ddsamq062 samequantum -1.000000000000000E-383 -1.000000000000000E-383 -> 1
ddsamq063 samequantum -1E-383 -1E-383 -> 1
ddsamq064 samequantum -9.999999999999999E+384 -9.999999999999999E+384 -> 1
ddsamq065 samequantum -1E-398 -1E-398 -> 1
ddsamq066 samequantum -1.000000000000000E-383 -1.000000000000000E-383 -> 1
ddsamq067 samequantum -1E-383 -1E-383 -> 1
ddsamq068 samequantum -9.999999999999999E+384 -9.999999999999999E+384 -> 1
ddsamq071 samequantum -4E-398 -1E-398 -> 1
ddsamq072 samequantum -4.000000000000000E-383 -1.000040000000000E-383 -> 1
ddsamq073 samequantum -4E-383 -1E-383 -> 1
ddsamq074 samequantum -4.999999999999999E+384 -9.999999999949999E+384 -> 1
ddsamq075 samequantum -4E-398 -1E-398 -> 1
ddsamq076 samequantum -4.000000000000000E-383 -1.004000000000000E-383 -> 1
ddsamq077 samequantum -4E-383 -1E-383 -> 1
ddsamq078 samequantum -4.999999999999999E+384 -9.949999999999999E+384 -> 1
ddsamq081 samequantum -4E-397 -1E-398 -> 0
ddsamq082 samequantum -4.000000000000000E-383 -1.000040000000000E-336 -> 0
ddsamq083 samequantum -4E-346 -1E-383 -> 0
ddsamq084 samequantum -4.999999999999999E+384 -9.999499999999999E+336 -> 0
ddsamq085 samequantum -4E-397 -1E-398 -> 0
ddsamq086 samequantum -4.000000000000000E-383 -1.004000000000000E-336 -> 0
ddsamq087 samequantum -4E-346 -1E-383 -> 0
ddsamq088 samequantum -4.999999999999999E+384 -9.949999999999999E+336 -> 0
-- specials & combinations
ddsamq0110 samequantum -Inf -Inf -> 1
ddsamq0111 samequantum -Inf Inf -> 1
ddsamq0112 samequantum -Inf NaN -> 0
ddsamq0113 samequantum -Inf -7E+3 -> 0
ddsamq0114 samequantum -Inf -7 -> 0
ddsamq0115 samequantum -Inf -7E-3 -> 0
ddsamq0116 samequantum -Inf -0E-3 -> 0
ddsamq0117 samequantum -Inf -0 -> 0
ddsamq0118 samequantum -Inf -0E+3 -> 0
ddsamq0119 samequantum -Inf 0E-3 -> 0
ddsamq0120 samequantum -Inf 0 -> 0
ddsamq0121 samequantum -Inf 0E+3 -> 0
ddsamq0122 samequantum -Inf 7E-3 -> 0
ddsamq0123 samequantum -Inf 7 -> 0
ddsamq0124 samequantum -Inf 7E+3 -> 0
ddsamq0125 samequantum -Inf sNaN -> 0
ddsamq0210 samequantum Inf -Inf -> 1
ddsamq0211 samequantum Inf Inf -> 1
ddsamq0212 samequantum Inf NaN -> 0
ddsamq0213 samequantum Inf -7E+3 -> 0
ddsamq0214 samequantum Inf -7 -> 0
ddsamq0215 samequantum Inf -7E-3 -> 0
ddsamq0216 samequantum Inf -0E-3 -> 0
ddsamq0217 samequantum Inf -0 -> 0
ddsamq0218 samequantum Inf -0E+3 -> 0
ddsamq0219 samequantum Inf 0E-3 -> 0
ddsamq0220 samequantum Inf 0 -> 0
ddsamq0221 samequantum Inf 0E+3 -> 0
ddsamq0222 samequantum Inf 7E-3 -> 0
ddsamq0223 samequantum Inf 7 -> 0
ddsamq0224 samequantum Inf 7E+3 -> 0
ddsamq0225 samequantum Inf sNaN -> 0
ddsamq0310 samequantum NaN -Inf -> 0
ddsamq0311 samequantum NaN Inf -> 0
ddsamq0312 samequantum NaN NaN -> 1
ddsamq0313 samequantum NaN -7E+3 -> 0
ddsamq0314 samequantum NaN -7 -> 0
ddsamq0315 samequantum NaN -7E-3 -> 0
ddsamq0316 samequantum NaN -0E-3 -> 0
ddsamq0317 samequantum NaN -0 -> 0
ddsamq0318 samequantum NaN -0E+3 -> 0
ddsamq0319 samequantum NaN 0E-3 -> 0
ddsamq0320 samequantum NaN 0 -> 0
ddsamq0321 samequantum NaN 0E+3 -> 0
ddsamq0322 samequantum NaN 7E-3 -> 0
ddsamq0323 samequantum NaN 7 -> 0
ddsamq0324 samequantum NaN 7E+3 -> 0
ddsamq0325 samequantum NaN sNaN -> 1
ddsamq0410 samequantum -7E+3 -Inf -> 0
ddsamq0411 samequantum -7E+3 Inf -> 0
ddsamq0412 samequantum -7E+3 NaN -> 0
ddsamq0413 samequantum -7E+3 -7E+3 -> 1
ddsamq0414 samequantum -7E+3 -7 -> 0
ddsamq0415 samequantum -7E+3 -7E-3 -> 0
ddsamq0416 samequantum -7E+3 -0E-3 -> 0
ddsamq0417 samequantum -7E+3 -0 -> 0
ddsamq0418 samequantum -7E+3 -0E+3 -> 1
ddsamq0419 samequantum -7E+3 0E-3 -> 0
ddsamq0420 samequantum -7E+3 0 -> 0
ddsamq0421 samequantum -7E+3 0E+3 -> 1
ddsamq0422 samequantum -7E+3 7E-3 -> 0
ddsamq0423 samequantum -7E+3 7 -> 0
ddsamq0424 samequantum -7E+3 7E+3 -> 1
ddsamq0425 samequantum -7E+3 sNaN -> 0
ddsamq0510 samequantum -7 -Inf -> 0
ddsamq0511 samequantum -7 Inf -> 0
ddsamq0512 samequantum -7 NaN -> 0
ddsamq0513 samequantum -7 -7E+3 -> 0
ddsamq0514 samequantum -7 -7 -> 1
ddsamq0515 samequantum -7 -7E-3 -> 0
ddsamq0516 samequantum -7 -0E-3 -> 0
ddsamq0517 samequantum -7 -0 -> 1
ddsamq0518 samequantum -7 -0E+3 -> 0
ddsamq0519 samequantum -7 0E-3 -> 0
ddsamq0520 samequantum -7 0 -> 1
ddsamq0521 samequantum -7 0E+3 -> 0
ddsamq0522 samequantum -7 7E-3 -> 0
ddsamq0523 samequantum -7 7 -> 1
ddsamq0524 samequantum -7 7E+3 -> 0
ddsamq0525 samequantum -7 sNaN -> 0
ddsamq0610 samequantum -7E-3 -Inf -> 0
ddsamq0611 samequantum -7E-3 Inf -> 0
ddsamq0612 samequantum -7E-3 NaN -> 0
ddsamq0613 samequantum -7E-3 -7E+3 -> 0
ddsamq0614 samequantum -7E-3 -7 -> 0
ddsamq0615 samequantum -7E-3 -7E-3 -> 1
ddsamq0616 samequantum -7E-3 -0E-3 -> 1
ddsamq0617 samequantum -7E-3 -0 -> 0
ddsamq0618 samequantum -7E-3 -0E+3 -> 0
ddsamq0619 samequantum -7E-3 0E-3 -> 1
ddsamq0620 samequantum -7E-3 0 -> 0
ddsamq0621 samequantum -7E-3 0E+3 -> 0
ddsamq0622 samequantum -7E-3 7E-3 -> 1
ddsamq0623 samequantum -7E-3 7 -> 0
ddsamq0624 samequantum -7E-3 7E+3 -> 0
ddsamq0625 samequantum -7E-3 sNaN -> 0
ddsamq0710 samequantum -0E-3 -Inf -> 0
ddsamq0711 samequantum -0E-3 Inf -> 0
ddsamq0712 samequantum -0E-3 NaN -> 0
ddsamq0713 samequantum -0E-3 -7E+3 -> 0
ddsamq0714 samequantum -0E-3 -7 -> 0
ddsamq0715 samequantum -0E-3 -7E-3 -> 1
ddsamq0716 samequantum -0E-3 -0E-3 -> 1
ddsamq0717 samequantum -0E-3 -0 -> 0
ddsamq0718 samequantum -0E-3 -0E+3 -> 0
ddsamq0719 samequantum -0E-3 0E-3 -> 1
ddsamq0720 samequantum -0E-3 0 -> 0
ddsamq0721 samequantum -0E-3 0E+3 -> 0
ddsamq0722 samequantum -0E-3 7E-3 -> 1
ddsamq0723 samequantum -0E-3 7 -> 0
ddsamq0724 samequantum -0E-3 7E+3 -> 0
ddsamq0725 samequantum -0E-3 sNaN -> 0
ddsamq0810 samequantum -0 -Inf -> 0
ddsamq0811 samequantum -0 Inf -> 0
ddsamq0812 samequantum -0 NaN -> 0
ddsamq0813 samequantum -0 -7E+3 -> 0
ddsamq0814 samequantum -0 -7 -> 1
ddsamq0815 samequantum -0 -7E-3 -> 0
ddsamq0816 samequantum -0 -0E-3 -> 0
ddsamq0817 samequantum -0 -0 -> 1
ddsamq0818 samequantum -0 -0E+3 -> 0
ddsamq0819 samequantum -0 0E-3 -> 0
ddsamq0820 samequantum -0 0 -> 1
ddsamq0821 samequantum -0 0E+3 -> 0
ddsamq0822 samequantum -0 7E-3 -> 0
ddsamq0823 samequantum -0 7 -> 1
ddsamq0824 samequantum -0 7E+3 -> 0
ddsamq0825 samequantum -0 sNaN -> 0
ddsamq0910 samequantum -0E+3 -Inf -> 0
ddsamq0911 samequantum -0E+3 Inf -> 0
ddsamq0912 samequantum -0E+3 NaN -> 0
ddsamq0913 samequantum -0E+3 -7E+3 -> 1
ddsamq0914 samequantum -0E+3 -7 -> 0
ddsamq0915 samequantum -0E+3 -7E-3 -> 0
ddsamq0916 samequantum -0E+3 -0E-3 -> 0
ddsamq0917 samequantum -0E+3 -0 -> 0
ddsamq0918 samequantum -0E+3 -0E+3 -> 1
ddsamq0919 samequantum -0E+3 0E-3 -> 0
ddsamq0920 samequantum -0E+3 0 -> 0
ddsamq0921 samequantum -0E+3 0E+3 -> 1
ddsamq0922 samequantum -0E+3 7E-3 -> 0
ddsamq0923 samequantum -0E+3 7 -> 0
ddsamq0924 samequantum -0E+3 7E+3 -> 1
ddsamq0925 samequantum -0E+3 sNaN -> 0
ddsamq1110 samequantum 0E-3 -Inf -> 0
ddsamq1111 samequantum 0E-3 Inf -> 0
ddsamq1112 samequantum 0E-3 NaN -> 0
ddsamq1113 samequantum 0E-3 -7E+3 -> 0
ddsamq1114 samequantum 0E-3 -7 -> 0
ddsamq1115 samequantum 0E-3 -7E-3 -> 1
ddsamq1116 samequantum 0E-3 -0E-3 -> 1
ddsamq1117 samequantum 0E-3 -0 -> 0
ddsamq1118 samequantum 0E-3 -0E+3 -> 0
ddsamq1119 samequantum 0E-3 0E-3 -> 1
ddsamq1120 samequantum 0E-3 0 -> 0
ddsamq1121 samequantum 0E-3 0E+3 -> 0
ddsamq1122 samequantum 0E-3 7E-3 -> 1
ddsamq1123 samequantum 0E-3 7 -> 0
ddsamq1124 samequantum 0E-3 7E+3 -> 0
ddsamq1125 samequantum 0E-3 sNaN -> 0
ddsamq1210 samequantum 0 -Inf -> 0
ddsamq1211 samequantum 0 Inf -> 0
ddsamq1212 samequantum 0 NaN -> 0
ddsamq1213 samequantum 0 -7E+3 -> 0
ddsamq1214 samequantum 0 -7 -> 1
ddsamq1215 samequantum 0 -7E-3 -> 0
ddsamq1216 samequantum 0 -0E-3 -> 0
ddsamq1217 samequantum 0 -0 -> 1
ddsamq1218 samequantum 0 -0E+3 -> 0
ddsamq1219 samequantum 0 0E-3 -> 0
ddsamq1220 samequantum 0 0 -> 1
ddsamq1221 samequantum 0 0E+3 -> 0
ddsamq1222 samequantum 0 7E-3 -> 0
ddsamq1223 samequantum 0 7 -> 1
ddsamq1224 samequantum 0 7E+3 -> 0
ddsamq1225 samequantum 0 sNaN -> 0
ddsamq1310 samequantum 0E+3 -Inf -> 0
ddsamq1311 samequantum 0E+3 Inf -> 0
ddsamq1312 samequantum 0E+3 NaN -> 0
ddsamq1313 samequantum 0E+3 -7E+3 -> 1
ddsamq1314 samequantum 0E+3 -7 -> 0
ddsamq1315 samequantum 0E+3 -7E-3 -> 0
ddsamq1316 samequantum 0E+3 -0E-3 -> 0
ddsamq1317 samequantum 0E+3 -0 -> 0
ddsamq1318 samequantum 0E+3 -0E+3 -> 1
ddsamq1319 samequantum 0E+3 0E-3 -> 0
ddsamq1320 samequantum 0E+3 0 -> 0
ddsamq1321 samequantum 0E+3 0E+3 -> 1
ddsamq1322 samequantum 0E+3 7E-3 -> 0
ddsamq1323 samequantum 0E+3 7 -> 0
ddsamq1324 samequantum 0E+3 7E+3 -> 1
ddsamq1325 samequantum 0E+3 sNaN -> 0
ddsamq1410 samequantum 7E-3 -Inf -> 0
ddsamq1411 samequantum 7E-3 Inf -> 0
ddsamq1412 samequantum 7E-3 NaN -> 0
ddsamq1413 samequantum 7E-3 -7E+3 -> 0
ddsamq1414 samequantum 7E-3 -7 -> 0
ddsamq1415 samequantum 7E-3 -7E-3 -> 1
ddsamq1416 samequantum 7E-3 -0E-3 -> 1
ddsamq1417 samequantum 7E-3 -0 -> 0
ddsamq1418 samequantum 7E-3 -0E+3 -> 0
ddsamq1419 samequantum 7E-3 0E-3 -> 1
ddsamq1420 samequantum 7E-3 0 -> 0
ddsamq1421 samequantum 7E-3 0E+3 -> 0
ddsamq1422 samequantum 7E-3 7E-3 -> 1
ddsamq1423 samequantum 7E-3 7 -> 0
ddsamq1424 samequantum 7E-3 7E+3 -> 0
ddsamq1425 samequantum 7E-3 sNaN -> 0
ddsamq1510 samequantum 7 -Inf -> 0
ddsamq1511 samequantum 7 Inf -> 0
ddsamq1512 samequantum 7 NaN -> 0
ddsamq1513 samequantum 7 -7E+3 -> 0
ddsamq1514 samequantum 7 -7 -> 1
ddsamq1515 samequantum 7 -7E-3 -> 0
ddsamq1516 samequantum 7 -0E-3 -> 0
ddsamq1517 samequantum 7 -0 -> 1
ddsamq1518 samequantum 7 -0E+3 -> 0
ddsamq1519 samequantum 7 0E-3 -> 0
ddsamq1520 samequantum 7 0 -> 1
ddsamq1521 samequantum 7 0E+3 -> 0
ddsamq1522 samequantum 7 7E-3 -> 0
ddsamq1523 samequantum 7 7 -> 1
ddsamq1524 samequantum 7 7E+3 -> 0
ddsamq1525 samequantum 7 sNaN -> 0
ddsamq1610 samequantum 7E+3 -Inf -> 0
ddsamq1611 samequantum 7E+3 Inf -> 0
ddsamq1612 samequantum 7E+3 NaN -> 0
ddsamq1613 samequantum 7E+3 -7E+3 -> 1
ddsamq1614 samequantum 7E+3 -7 -> 0
ddsamq1615 samequantum 7E+3 -7E-3 -> 0
ddsamq1616 samequantum 7E+3 -0E-3 -> 0
ddsamq1617 samequantum 7E+3 -0 -> 0
ddsamq1618 samequantum 7E+3 -0E+3 -> 1
ddsamq1619 samequantum 7E+3 0E-3 -> 0
ddsamq1620 samequantum 7E+3 0 -> 0
ddsamq1621 samequantum 7E+3 0E+3 -> 1
ddsamq1622 samequantum 7E+3 7E-3 -> 0
ddsamq1623 samequantum 7E+3 7 -> 0
ddsamq1624 samequantum 7E+3 7E+3 -> 1
ddsamq1625 samequantum 7E+3 sNaN -> 0
ddsamq1710 samequantum sNaN -Inf -> 0
ddsamq1711 samequantum sNaN Inf -> 0
ddsamq1712 samequantum sNaN NaN -> 1
ddsamq1713 samequantum sNaN -7E+3 -> 0
ddsamq1714 samequantum sNaN -7 -> 0
ddsamq1715 samequantum sNaN -7E-3 -> 0
ddsamq1716 samequantum sNaN -0E-3 -> 0
ddsamq1717 samequantum sNaN -0 -> 0
ddsamq1718 samequantum sNaN -0E+3 -> 0
ddsamq1719 samequantum sNaN 0E-3 -> 0
ddsamq1720 samequantum sNaN 0 -> 0
ddsamq1721 samequantum sNaN 0E+3 -> 0
ddsamq1722 samequantum sNaN 7E-3 -> 0
ddsamq1723 samequantum sNaN 7 -> 0
ddsamq1724 samequantum sNaN 7E+3 -> 0
ddsamq1725 samequantum sNaN sNaN -> 1
-- noisy NaNs
ddsamq1730 samequantum sNaN3 sNaN3 -> 1
ddsamq1731 samequantum sNaN3 sNaN4 -> 1
ddsamq1732 samequantum NaN3 NaN3 -> 1
ddsamq1733 samequantum NaN3 NaN4 -> 1
ddsamq1734 samequantum sNaN3 3 -> 0
ddsamq1735 samequantum NaN3 3 -> 0
ddsamq1736 samequantum 4 sNaN4 -> 0
ddsamq1737 samequantum 3 NaN3 -> 0
ddsamq1738 samequantum Inf sNaN4 -> 0
ddsamq1739 samequantum -Inf NaN3 -> 0

View file

@ -1,243 +1,243 @@
------------------------------------------------------------------------
-- ddScalebB.decTest -- scale a decDouble by powers of 10 --
-- 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
-- Max |rhs| is 2*(384+16) = 800
-- Sanity checks
ddscb001 scaleb 7.50 10 -> 7.50E+10
ddscb002 scaleb 7.50 3 -> 7.50E+3
ddscb003 scaleb 7.50 2 -> 750
ddscb004 scaleb 7.50 1 -> 75.0
ddscb005 scaleb 7.50 0 -> 7.50
ddscb006 scaleb 7.50 -1 -> 0.750
ddscb007 scaleb 7.50 -2 -> 0.0750
ddscb008 scaleb 7.50 -10 -> 7.50E-10
ddscb009 scaleb -7.50 3 -> -7.50E+3
ddscb010 scaleb -7.50 2 -> -750
ddscb011 scaleb -7.50 1 -> -75.0
ddscb012 scaleb -7.50 0 -> -7.50
ddscb013 scaleb -7.50 -1 -> -0.750
-- Infinities
ddscb014 scaleb Infinity 1 -> Infinity
ddscb015 scaleb -Infinity 2 -> -Infinity
ddscb016 scaleb Infinity -1 -> Infinity
ddscb017 scaleb -Infinity -2 -> -Infinity
-- Next two are somewhat undefined in 754r; treat as non-integer
ddscb018 scaleb 10 Infinity -> NaN Invalid_operation
ddscb019 scaleb 10 -Infinity -> NaN Invalid_operation
-- NaNs are undefined in 754r; assume usual processing
-- NaNs, 0 payload
ddscb021 scaleb NaN 1 -> NaN
ddscb022 scaleb -NaN -1 -> -NaN
ddscb023 scaleb sNaN 1 -> NaN Invalid_operation
ddscb024 scaleb -sNaN 1 -> -NaN Invalid_operation
ddscb025 scaleb 4 NaN -> NaN
ddscb026 scaleb -Inf -NaN -> -NaN
ddscb027 scaleb 4 sNaN -> NaN Invalid_operation
ddscb028 scaleb Inf -sNaN -> -NaN Invalid_operation
-- non-integer RHS
ddscb030 scaleb 1.23 1 -> 12.3
ddscb031 scaleb 1.23 1.00 -> NaN Invalid_operation
ddscb032 scaleb 1.23 1.1 -> NaN Invalid_operation
ddscb033 scaleb 1.23 1.01 -> NaN Invalid_operation
ddscb034 scaleb 1.23 0.01 -> NaN Invalid_operation
ddscb035 scaleb 1.23 0.11 -> NaN Invalid_operation
ddscb036 scaleb 1.23 0.999999999 -> NaN Invalid_operation
ddscb037 scaleb 1.23 -1 -> 0.123
ddscb038 scaleb 1.23 -1.00 -> NaN Invalid_operation
ddscb039 scaleb 1.23 -1.1 -> NaN Invalid_operation
ddscb040 scaleb 1.23 -1.01 -> NaN Invalid_operation
ddscb041 scaleb 1.23 -0.01 -> NaN Invalid_operation
ddscb042 scaleb 1.23 -0.11 -> NaN Invalid_operation
ddscb043 scaleb 1.23 -0.999999999 -> NaN Invalid_operation
ddscb044 scaleb 1.23 0.1 -> NaN Invalid_operation
ddscb045 scaleb 1.23 1E+1 -> NaN Invalid_operation
ddscb046 scaleb 1.23 1.1234E+6 -> NaN Invalid_operation
ddscb047 scaleb 1.23 1.123E+4 -> NaN Invalid_operation
-- out-of range RHS
ddscb120 scaleb 1.23 799 -> Infinity Overflow Inexact Rounded
ddscb121 scaleb 1.23 800 -> Infinity Overflow Inexact Rounded
ddscb122 scaleb 1.23 801 -> NaN Invalid_operation
ddscb123 scaleb 1.23 802 -> NaN Invalid_operation
ddscb124 scaleb 1.23 -799 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
ddscb125 scaleb 1.23 -800 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
ddscb126 scaleb 1.23 -801 -> NaN Invalid_operation
ddscb127 scaleb 1.23 -802 -> NaN Invalid_operation
-- NaNs, non-0 payload
-- propagating NaNs
ddscb861 scaleb NaN01 -Inf -> NaN1
ddscb862 scaleb -NaN02 -1000 -> -NaN2
ddscb863 scaleb NaN03 1000 -> NaN3
ddscb864 scaleb NaN04 Inf -> NaN4
ddscb865 scaleb NaN05 NaN61 -> NaN5
ddscb866 scaleb -Inf -NaN71 -> -NaN71
ddscb867 scaleb -1000 NaN81 -> NaN81
ddscb868 scaleb 1000 NaN91 -> NaN91
ddscb869 scaleb Inf NaN101 -> NaN101
ddscb871 scaleb sNaN011 -Inf -> NaN11 Invalid_operation
ddscb872 scaleb sNaN012 -1000 -> NaN12 Invalid_operation
ddscb873 scaleb -sNaN013 1000 -> -NaN13 Invalid_operation
ddscb874 scaleb sNaN014 NaN171 -> NaN14 Invalid_operation
ddscb875 scaleb sNaN015 sNaN181 -> NaN15 Invalid_operation
ddscb876 scaleb NaN016 sNaN191 -> NaN191 Invalid_operation
ddscb877 scaleb -Inf sNaN201 -> NaN201 Invalid_operation
ddscb878 scaleb -1000 sNaN211 -> NaN211 Invalid_operation
ddscb879 scaleb 1000 -sNaN221 -> -NaN221 Invalid_operation
ddscb880 scaleb Inf sNaN231 -> NaN231 Invalid_operation
ddscb881 scaleb NaN025 sNaN241 -> NaN241 Invalid_operation
-- finites
ddscb051 scaleb 7 -2 -> 0.07
ddscb052 scaleb -7 -2 -> -0.07
ddscb053 scaleb 75 -2 -> 0.75
ddscb054 scaleb -75 -2 -> -0.75
ddscb055 scaleb 7.50 -2 -> 0.0750
ddscb056 scaleb -7.50 -2 -> -0.0750
ddscb057 scaleb 7.500 -2 -> 0.07500
ddscb058 scaleb -7.500 -2 -> -0.07500
ddscb061 scaleb 7 -1 -> 0.7
ddscb062 scaleb -7 -1 -> -0.7
ddscb063 scaleb 75 -1 -> 7.5
ddscb064 scaleb -75 -1 -> -7.5
ddscb065 scaleb 7.50 -1 -> 0.750
ddscb066 scaleb -7.50 -1 -> -0.750
ddscb067 scaleb 7.500 -1 -> 0.7500
ddscb068 scaleb -7.500 -1 -> -0.7500
ddscb071 scaleb 7 0 -> 7
ddscb072 scaleb -7 0 -> -7
ddscb073 scaleb 75 0 -> 75
ddscb074 scaleb -75 0 -> -75
ddscb075 scaleb 7.50 0 -> 7.50
ddscb076 scaleb -7.50 0 -> -7.50
ddscb077 scaleb 7.500 0 -> 7.500
ddscb078 scaleb -7.500 0 -> -7.500
ddscb081 scaleb 7 1 -> 7E+1
ddscb082 scaleb -7 1 -> -7E+1
ddscb083 scaleb 75 1 -> 7.5E+2
ddscb084 scaleb -75 1 -> -7.5E+2
ddscb085 scaleb 7.50 1 -> 75.0
ddscb086 scaleb -7.50 1 -> -75.0
ddscb087 scaleb 7.500 1 -> 75.00
ddscb088 scaleb -7.500 1 -> -75.00
ddscb091 scaleb 7 2 -> 7E+2
ddscb092 scaleb -7 2 -> -7E+2
ddscb093 scaleb 75 2 -> 7.5E+3
ddscb094 scaleb -75 2 -> -7.5E+3
ddscb095 scaleb 7.50 2 -> 750
ddscb096 scaleb -7.50 2 -> -750
ddscb097 scaleb 7.500 2 -> 750.0
ddscb098 scaleb -7.500 2 -> -750.0
-- zeros
ddscb111 scaleb 0 1 -> 0E+1
ddscb112 scaleb -0 2 -> -0E+2
ddscb113 scaleb 0E+4 3 -> 0E+7
ddscb114 scaleb -0E+4 4 -> -0E+8
ddscb115 scaleb 0.0000 5 -> 0E+1
ddscb116 scaleb -0.0000 6 -> -0E+2
ddscb117 scaleb 0E-141 7 -> 0E-134
ddscb118 scaleb -0E-141 8 -> -0E-133
-- Nmax, Nmin, Ntiny
ddscb132 scaleb 9.999999999999999E+384 +384 -> Infinity Overflow Inexact Rounded
ddscb133 scaleb 9.999999999999999E+384 +10 -> Infinity Overflow Inexact Rounded
ddscb134 scaleb 9.999999999999999E+384 +1 -> Infinity Overflow Inexact Rounded
ddscb135 scaleb 9.999999999999999E+384 0 -> 9.999999999999999E+384
ddscb136 scaleb 9.999999999999999E+384 -1 -> 9.999999999999999E+383
ddscb137 scaleb 1E-383 +1 -> 1E-382
ddscb138 scaleb 1E-383 -0 -> 1E-383
ddscb139 scaleb 1E-383 -1 -> 1E-384 Subnormal
ddscb140 scaleb 1.000000000000000E-383 +1 -> 1.000000000000000E-382
ddscb141 scaleb 1.000000000000000E-383 0 -> 1.000000000000000E-383
ddscb142 scaleb 1.000000000000000E-383 -1 -> 1.00000000000000E-384 Subnormal Rounded
ddscb143 scaleb 1E-398 +1 -> 1E-397 Subnormal
ddscb144 scaleb 1E-398 -0 -> 1E-398 Subnormal
ddscb145 scaleb 1E-398 -1 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
ddscb150 scaleb -1E-398 +1 -> -1E-397 Subnormal
ddscb151 scaleb -1E-398 -0 -> -1E-398 Subnormal
ddscb152 scaleb -1E-398 -1 -> -0E-398 Underflow Subnormal Inexact Rounded Clamped
ddscb153 scaleb -1.000000000000000E-383 +1 -> -1.000000000000000E-382
ddscb154 scaleb -1.000000000000000E-383 +0 -> -1.000000000000000E-383
ddscb155 scaleb -1.000000000000000E-383 -1 -> -1.00000000000000E-384 Subnormal Rounded
ddscb156 scaleb -1E-383 +1 -> -1E-382
ddscb157 scaleb -1E-383 -0 -> -1E-383
ddscb158 scaleb -1E-383 -1 -> -1E-384 Subnormal
ddscb159 scaleb -9.999999999999999E+384 +1 -> -Infinity Overflow Inexact Rounded
ddscb160 scaleb -9.999999999999999E+384 +0 -> -9.999999999999999E+384
ddscb161 scaleb -9.999999999999999E+384 -1 -> -9.999999999999999E+383
ddscb162 scaleb -9E+384 +1 -> -Infinity Overflow Inexact Rounded
ddscb163 scaleb -1E+384 +1 -> -Infinity Overflow Inexact Rounded
-- some Origami
-- (these check that overflow is being done correctly)
ddscb171 scaleb 1000E+365 +1 -> 1.000E+369
ddscb172 scaleb 1000E+366 +1 -> 1.000E+370
ddscb173 scaleb 1000E+367 +1 -> 1.000E+371
ddscb174 scaleb 1000E+368 +1 -> 1.000E+372
ddscb175 scaleb 1000E+369 +1 -> 1.0000E+373 Clamped
ddscb176 scaleb 1000E+370 +1 -> 1.00000E+374 Clamped
ddscb177 scaleb 1000E+371 +1 -> 1.000000E+375 Clamped
ddscb178 scaleb 1000E+372 +1 -> 1.0000000E+376 Clamped
ddscb179 scaleb 1000E+373 +1 -> 1.00000000E+377 Clamped
ddscb180 scaleb 1000E+374 +1 -> 1.000000000E+378 Clamped
ddscb181 scaleb 1000E+375 +1 -> 1.0000000000E+379 Clamped
ddscb182 scaleb 1000E+376 +1 -> 1.00000000000E+380 Clamped
ddscb183 scaleb 1000E+377 +1 -> 1.000000000000E+381 Clamped
ddscb184 scaleb 1000E+378 +1 -> 1.0000000000000E+382 Clamped
ddscb185 scaleb 1000E+379 +1 -> 1.00000000000000E+383 Clamped
ddscb186 scaleb 1000E+380 +1 -> 1.000000000000000E+384 Clamped
ddscb187 scaleb 1000E+381 +1 -> Infinity Overflow Inexact Rounded
-- and a few more subnormal truncations
-- (these check that underflow is being done correctly)
ddscb201 scaleb 1.000000000000000E-383 0 -> 1.000000000000000E-383
ddscb202 scaleb 1.000000000000000E-383 -1 -> 1.00000000000000E-384 Subnormal Rounded
ddscb203 scaleb 1.000000000000000E-383 -2 -> 1.0000000000000E-385 Subnormal Rounded
ddscb204 scaleb 1.000000000000000E-383 -3 -> 1.000000000000E-386 Subnormal Rounded
ddscb205 scaleb 1.000000000000000E-383 -4 -> 1.00000000000E-387 Subnormal Rounded
ddscb206 scaleb 1.000000000000000E-383 -5 -> 1.0000000000E-388 Subnormal Rounded
ddscb207 scaleb 1.000000000000000E-383 -6 -> 1.000000000E-389 Subnormal Rounded
ddscb208 scaleb 1.000000000000000E-383 -7 -> 1.00000000E-390 Subnormal Rounded
ddscb209 scaleb 1.000000000000000E-383 -8 -> 1.0000000E-391 Subnormal Rounded
ddscb210 scaleb 1.000000000000000E-383 -9 -> 1.000000E-392 Subnormal Rounded
ddscb211 scaleb 1.000000000000000E-383 -10 -> 1.00000E-393 Subnormal Rounded
ddscb212 scaleb 1.000000000000000E-383 -11 -> 1.0000E-394 Subnormal Rounded
ddscb213 scaleb 1.000000000000000E-383 -12 -> 1.000E-395 Subnormal Rounded
ddscb214 scaleb 1.000000000000000E-383 -13 -> 1.00E-396 Subnormal Rounded
ddscb215 scaleb 1.000000000000000E-383 -14 -> 1.0E-397 Subnormal Rounded
ddscb216 scaleb 1.000000000000000E-383 -15 -> 1E-398 Subnormal Rounded
ddscb217 scaleb 1.000000000000000E-383 -16 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
ddscb218 scaleb 1.000000000000000E-383 -17 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
------------------------------------------------------------------------
-- ddScalebB.decTest -- scale a decDouble by powers of 10 --
-- 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
-- Max |rhs| is 2*(384+16) = 800
-- Sanity checks
ddscb001 scaleb 7.50 10 -> 7.50E+10
ddscb002 scaleb 7.50 3 -> 7.50E+3
ddscb003 scaleb 7.50 2 -> 750
ddscb004 scaleb 7.50 1 -> 75.0
ddscb005 scaleb 7.50 0 -> 7.50
ddscb006 scaleb 7.50 -1 -> 0.750
ddscb007 scaleb 7.50 -2 -> 0.0750
ddscb008 scaleb 7.50 -10 -> 7.50E-10
ddscb009 scaleb -7.50 3 -> -7.50E+3
ddscb010 scaleb -7.50 2 -> -750
ddscb011 scaleb -7.50 1 -> -75.0
ddscb012 scaleb -7.50 0 -> -7.50
ddscb013 scaleb -7.50 -1 -> -0.750
-- Infinities
ddscb014 scaleb Infinity 1 -> Infinity
ddscb015 scaleb -Infinity 2 -> -Infinity
ddscb016 scaleb Infinity -1 -> Infinity
ddscb017 scaleb -Infinity -2 -> -Infinity
-- Next two are somewhat undefined in 754r; treat as non-integer
ddscb018 scaleb 10 Infinity -> NaN Invalid_operation
ddscb019 scaleb 10 -Infinity -> NaN Invalid_operation
-- NaNs are undefined in 754r; assume usual processing
-- NaNs, 0 payload
ddscb021 scaleb NaN 1 -> NaN
ddscb022 scaleb -NaN -1 -> -NaN
ddscb023 scaleb sNaN 1 -> NaN Invalid_operation
ddscb024 scaleb -sNaN 1 -> -NaN Invalid_operation
ddscb025 scaleb 4 NaN -> NaN
ddscb026 scaleb -Inf -NaN -> -NaN
ddscb027 scaleb 4 sNaN -> NaN Invalid_operation
ddscb028 scaleb Inf -sNaN -> -NaN Invalid_operation
-- non-integer RHS
ddscb030 scaleb 1.23 1 -> 12.3
ddscb031 scaleb 1.23 1.00 -> NaN Invalid_operation
ddscb032 scaleb 1.23 1.1 -> NaN Invalid_operation
ddscb033 scaleb 1.23 1.01 -> NaN Invalid_operation
ddscb034 scaleb 1.23 0.01 -> NaN Invalid_operation
ddscb035 scaleb 1.23 0.11 -> NaN Invalid_operation
ddscb036 scaleb 1.23 0.999999999 -> NaN Invalid_operation
ddscb037 scaleb 1.23 -1 -> 0.123
ddscb038 scaleb 1.23 -1.00 -> NaN Invalid_operation
ddscb039 scaleb 1.23 -1.1 -> NaN Invalid_operation
ddscb040 scaleb 1.23 -1.01 -> NaN Invalid_operation
ddscb041 scaleb 1.23 -0.01 -> NaN Invalid_operation
ddscb042 scaleb 1.23 -0.11 -> NaN Invalid_operation
ddscb043 scaleb 1.23 -0.999999999 -> NaN Invalid_operation
ddscb044 scaleb 1.23 0.1 -> NaN Invalid_operation
ddscb045 scaleb 1.23 1E+1 -> NaN Invalid_operation
ddscb046 scaleb 1.23 1.1234E+6 -> NaN Invalid_operation
ddscb047 scaleb 1.23 1.123E+4 -> NaN Invalid_operation
-- out-of range RHS
ddscb120 scaleb 1.23 799 -> Infinity Overflow Inexact Rounded
ddscb121 scaleb 1.23 800 -> Infinity Overflow Inexact Rounded
ddscb122 scaleb 1.23 801 -> NaN Invalid_operation
ddscb123 scaleb 1.23 802 -> NaN Invalid_operation
ddscb124 scaleb 1.23 -799 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
ddscb125 scaleb 1.23 -800 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
ddscb126 scaleb 1.23 -801 -> NaN Invalid_operation
ddscb127 scaleb 1.23 -802 -> NaN Invalid_operation
-- NaNs, non-0 payload
-- propagating NaNs
ddscb861 scaleb NaN01 -Inf -> NaN1
ddscb862 scaleb -NaN02 -1000 -> -NaN2
ddscb863 scaleb NaN03 1000 -> NaN3
ddscb864 scaleb NaN04 Inf -> NaN4
ddscb865 scaleb NaN05 NaN61 -> NaN5
ddscb866 scaleb -Inf -NaN71 -> -NaN71
ddscb867 scaleb -1000 NaN81 -> NaN81
ddscb868 scaleb 1000 NaN91 -> NaN91
ddscb869 scaleb Inf NaN101 -> NaN101
ddscb871 scaleb sNaN011 -Inf -> NaN11 Invalid_operation
ddscb872 scaleb sNaN012 -1000 -> NaN12 Invalid_operation
ddscb873 scaleb -sNaN013 1000 -> -NaN13 Invalid_operation
ddscb874 scaleb sNaN014 NaN171 -> NaN14 Invalid_operation
ddscb875 scaleb sNaN015 sNaN181 -> NaN15 Invalid_operation
ddscb876 scaleb NaN016 sNaN191 -> NaN191 Invalid_operation
ddscb877 scaleb -Inf sNaN201 -> NaN201 Invalid_operation
ddscb878 scaleb -1000 sNaN211 -> NaN211 Invalid_operation
ddscb879 scaleb 1000 -sNaN221 -> -NaN221 Invalid_operation
ddscb880 scaleb Inf sNaN231 -> NaN231 Invalid_operation
ddscb881 scaleb NaN025 sNaN241 -> NaN241 Invalid_operation
-- finites
ddscb051 scaleb 7 -2 -> 0.07
ddscb052 scaleb -7 -2 -> -0.07
ddscb053 scaleb 75 -2 -> 0.75
ddscb054 scaleb -75 -2 -> -0.75
ddscb055 scaleb 7.50 -2 -> 0.0750
ddscb056 scaleb -7.50 -2 -> -0.0750
ddscb057 scaleb 7.500 -2 -> 0.07500
ddscb058 scaleb -7.500 -2 -> -0.07500
ddscb061 scaleb 7 -1 -> 0.7
ddscb062 scaleb -7 -1 -> -0.7
ddscb063 scaleb 75 -1 -> 7.5
ddscb064 scaleb -75 -1 -> -7.5
ddscb065 scaleb 7.50 -1 -> 0.750
ddscb066 scaleb -7.50 -1 -> -0.750
ddscb067 scaleb 7.500 -1 -> 0.7500
ddscb068 scaleb -7.500 -1 -> -0.7500
ddscb071 scaleb 7 0 -> 7
ddscb072 scaleb -7 0 -> -7
ddscb073 scaleb 75 0 -> 75
ddscb074 scaleb -75 0 -> -75
ddscb075 scaleb 7.50 0 -> 7.50
ddscb076 scaleb -7.50 0 -> -7.50
ddscb077 scaleb 7.500 0 -> 7.500
ddscb078 scaleb -7.500 0 -> -7.500
ddscb081 scaleb 7 1 -> 7E+1
ddscb082 scaleb -7 1 -> -7E+1
ddscb083 scaleb 75 1 -> 7.5E+2
ddscb084 scaleb -75 1 -> -7.5E+2
ddscb085 scaleb 7.50 1 -> 75.0
ddscb086 scaleb -7.50 1 -> -75.0
ddscb087 scaleb 7.500 1 -> 75.00
ddscb088 scaleb -7.500 1 -> -75.00
ddscb091 scaleb 7 2 -> 7E+2
ddscb092 scaleb -7 2 -> -7E+2
ddscb093 scaleb 75 2 -> 7.5E+3
ddscb094 scaleb -75 2 -> -7.5E+3
ddscb095 scaleb 7.50 2 -> 750
ddscb096 scaleb -7.50 2 -> -750
ddscb097 scaleb 7.500 2 -> 750.0
ddscb098 scaleb -7.500 2 -> -750.0
-- zeros
ddscb111 scaleb 0 1 -> 0E+1
ddscb112 scaleb -0 2 -> -0E+2
ddscb113 scaleb 0E+4 3 -> 0E+7
ddscb114 scaleb -0E+4 4 -> -0E+8
ddscb115 scaleb 0.0000 5 -> 0E+1
ddscb116 scaleb -0.0000 6 -> -0E+2
ddscb117 scaleb 0E-141 7 -> 0E-134
ddscb118 scaleb -0E-141 8 -> -0E-133
-- Nmax, Nmin, Ntiny
ddscb132 scaleb 9.999999999999999E+384 +384 -> Infinity Overflow Inexact Rounded
ddscb133 scaleb 9.999999999999999E+384 +10 -> Infinity Overflow Inexact Rounded
ddscb134 scaleb 9.999999999999999E+384 +1 -> Infinity Overflow Inexact Rounded
ddscb135 scaleb 9.999999999999999E+384 0 -> 9.999999999999999E+384
ddscb136 scaleb 9.999999999999999E+384 -1 -> 9.999999999999999E+383
ddscb137 scaleb 1E-383 +1 -> 1E-382
ddscb138 scaleb 1E-383 -0 -> 1E-383
ddscb139 scaleb 1E-383 -1 -> 1E-384 Subnormal
ddscb140 scaleb 1.000000000000000E-383 +1 -> 1.000000000000000E-382
ddscb141 scaleb 1.000000000000000E-383 0 -> 1.000000000000000E-383
ddscb142 scaleb 1.000000000000000E-383 -1 -> 1.00000000000000E-384 Subnormal Rounded
ddscb143 scaleb 1E-398 +1 -> 1E-397 Subnormal
ddscb144 scaleb 1E-398 -0 -> 1E-398 Subnormal
ddscb145 scaleb 1E-398 -1 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
ddscb150 scaleb -1E-398 +1 -> -1E-397 Subnormal
ddscb151 scaleb -1E-398 -0 -> -1E-398 Subnormal
ddscb152 scaleb -1E-398 -1 -> -0E-398 Underflow Subnormal Inexact Rounded Clamped
ddscb153 scaleb -1.000000000000000E-383 +1 -> -1.000000000000000E-382
ddscb154 scaleb -1.000000000000000E-383 +0 -> -1.000000000000000E-383
ddscb155 scaleb -1.000000000000000E-383 -1 -> -1.00000000000000E-384 Subnormal Rounded
ddscb156 scaleb -1E-383 +1 -> -1E-382
ddscb157 scaleb -1E-383 -0 -> -1E-383
ddscb158 scaleb -1E-383 -1 -> -1E-384 Subnormal
ddscb159 scaleb -9.999999999999999E+384 +1 -> -Infinity Overflow Inexact Rounded
ddscb160 scaleb -9.999999999999999E+384 +0 -> -9.999999999999999E+384
ddscb161 scaleb -9.999999999999999E+384 -1 -> -9.999999999999999E+383
ddscb162 scaleb -9E+384 +1 -> -Infinity Overflow Inexact Rounded
ddscb163 scaleb -1E+384 +1 -> -Infinity Overflow Inexact Rounded
-- some Origami
-- (these check that overflow is being done correctly)
ddscb171 scaleb 1000E+365 +1 -> 1.000E+369
ddscb172 scaleb 1000E+366 +1 -> 1.000E+370
ddscb173 scaleb 1000E+367 +1 -> 1.000E+371
ddscb174 scaleb 1000E+368 +1 -> 1.000E+372
ddscb175 scaleb 1000E+369 +1 -> 1.0000E+373 Clamped
ddscb176 scaleb 1000E+370 +1 -> 1.00000E+374 Clamped
ddscb177 scaleb 1000E+371 +1 -> 1.000000E+375 Clamped
ddscb178 scaleb 1000E+372 +1 -> 1.0000000E+376 Clamped
ddscb179 scaleb 1000E+373 +1 -> 1.00000000E+377 Clamped
ddscb180 scaleb 1000E+374 +1 -> 1.000000000E+378 Clamped
ddscb181 scaleb 1000E+375 +1 -> 1.0000000000E+379 Clamped
ddscb182 scaleb 1000E+376 +1 -> 1.00000000000E+380 Clamped
ddscb183 scaleb 1000E+377 +1 -> 1.000000000000E+381 Clamped
ddscb184 scaleb 1000E+378 +1 -> 1.0000000000000E+382 Clamped
ddscb185 scaleb 1000E+379 +1 -> 1.00000000000000E+383 Clamped
ddscb186 scaleb 1000E+380 +1 -> 1.000000000000000E+384 Clamped
ddscb187 scaleb 1000E+381 +1 -> Infinity Overflow Inexact Rounded
-- and a few more subnormal truncations
-- (these check that underflow is being done correctly)
ddscb201 scaleb 1.000000000000000E-383 0 -> 1.000000000000000E-383
ddscb202 scaleb 1.000000000000000E-383 -1 -> 1.00000000000000E-384 Subnormal Rounded
ddscb203 scaleb 1.000000000000000E-383 -2 -> 1.0000000000000E-385 Subnormal Rounded
ddscb204 scaleb 1.000000000000000E-383 -3 -> 1.000000000000E-386 Subnormal Rounded
ddscb205 scaleb 1.000000000000000E-383 -4 -> 1.00000000000E-387 Subnormal Rounded
ddscb206 scaleb 1.000000000000000E-383 -5 -> 1.0000000000E-388 Subnormal Rounded
ddscb207 scaleb 1.000000000000000E-383 -6 -> 1.000000000E-389 Subnormal Rounded
ddscb208 scaleb 1.000000000000000E-383 -7 -> 1.00000000E-390 Subnormal Rounded
ddscb209 scaleb 1.000000000000000E-383 -8 -> 1.0000000E-391 Subnormal Rounded
ddscb210 scaleb 1.000000000000000E-383 -9 -> 1.000000E-392 Subnormal Rounded
ddscb211 scaleb 1.000000000000000E-383 -10 -> 1.00000E-393 Subnormal Rounded
ddscb212 scaleb 1.000000000000000E-383 -11 -> 1.0000E-394 Subnormal Rounded
ddscb213 scaleb 1.000000000000000E-383 -12 -> 1.000E-395 Subnormal Rounded
ddscb214 scaleb 1.000000000000000E-383 -13 -> 1.00E-396 Subnormal Rounded
ddscb215 scaleb 1.000000000000000E-383 -14 -> 1.0E-397 Subnormal Rounded
ddscb216 scaleb 1.000000000000000E-383 -15 -> 1E-398 Subnormal Rounded
ddscb217 scaleb 1.000000000000000E-383 -16 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped
ddscb218 scaleb 1.000000000000000E-383 -17 -> 0E-398 Underflow Subnormal Inexact Rounded Clamped

View file

@ -1,262 +1,262 @@
------------------------------------------------------------------------
-- ddShift.decTest -- shift decDouble coefficient left or right --
-- 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
ddshi001 shift 0 0 -> 0
ddshi002 shift 0 2 -> 0
ddshi003 shift 1 2 -> 100
ddshi004 shift 1 15 -> 1000000000000000
ddshi005 shift 1 16 -> 0
ddshi006 shift 1 -1 -> 0
ddshi007 shift 0 -2 -> 0
ddshi008 shift 1234567890123456 -1 -> 123456789012345
ddshi009 shift 1234567890123456 -15 -> 1
ddshi010 shift 1234567890123456 -16 -> 0
ddshi011 shift 9934567890123456 -15 -> 9
ddshi012 shift 9934567890123456 -16 -> 0
-- rhs must be an integer
ddshi015 shift 1 1.5 -> NaN Invalid_operation
ddshi016 shift 1 1.0 -> NaN Invalid_operation
ddshi017 shift 1 0.1 -> NaN Invalid_operation
ddshi018 shift 1 0.0 -> NaN Invalid_operation
ddshi019 shift 1 1E+1 -> NaN Invalid_operation
ddshi020 shift 1 1E+99 -> NaN Invalid_operation
ddshi021 shift 1 Inf -> NaN Invalid_operation
ddshi022 shift 1 -Inf -> NaN Invalid_operation
-- and |rhs| <= precision
ddshi025 shift 1 -1000 -> NaN Invalid_operation
ddshi026 shift 1 -17 -> NaN Invalid_operation
ddshi027 shift 1 17 -> NaN Invalid_operation
ddshi028 shift 1 1000 -> NaN Invalid_operation
-- full shifting pattern
ddshi030 shift 1234567890123456 -16 -> 0
ddshi031 shift 1234567890123456 -15 -> 1
ddshi032 shift 1234567890123456 -14 -> 12
ddshi033 shift 1234567890123456 -13 -> 123
ddshi034 shift 1234567890123456 -12 -> 1234
ddshi035 shift 1234567890123456 -11 -> 12345
ddshi036 shift 1234567890123456 -10 -> 123456
ddshi037 shift 1234567890123456 -9 -> 1234567
ddshi038 shift 1234567890123456 -8 -> 12345678
ddshi039 shift 1234567890123456 -7 -> 123456789
ddshi040 shift 1234567890123456 -6 -> 1234567890
ddshi041 shift 1234567890123456 -5 -> 12345678901
ddshi042 shift 1234567890123456 -4 -> 123456789012
ddshi043 shift 1234567890123456 -3 -> 1234567890123
ddshi044 shift 1234567890123456 -2 -> 12345678901234
ddshi045 shift 1234567890123456 -1 -> 123456789012345
ddshi046 shift 1234567890123456 -0 -> 1234567890123456
ddshi047 shift 1234567890123456 +0 -> 1234567890123456
ddshi048 shift 1234567890123456 +1 -> 2345678901234560
ddshi049 shift 1234567890123456 +2 -> 3456789012345600
ddshi050 shift 1234567890123456 +3 -> 4567890123456000
ddshi051 shift 1234567890123456 +4 -> 5678901234560000
ddshi052 shift 1234567890123456 +5 -> 6789012345600000
ddshi053 shift 1234567890123456 +6 -> 7890123456000000
ddshi054 shift 1234567890123456 +7 -> 8901234560000000
ddshi055 shift 1234567890123456 +8 -> 9012345600000000
ddshi056 shift 1234567890123456 +9 -> 123456000000000
ddshi057 shift 1234567890123456 +10 -> 1234560000000000
ddshi058 shift 1234567890123456 +11 -> 2345600000000000
ddshi059 shift 1234567890123456 +12 -> 3456000000000000
ddshi060 shift 1234567890123456 +13 -> 4560000000000000
ddshi061 shift 1234567890123456 +14 -> 5600000000000000
ddshi062 shift 1234567890123456 +15 -> 6000000000000000
ddshi063 shift 1234567890123456 +16 -> 0
-- zeros
ddshi070 shift 0E-10 +9 -> 0E-10
ddshi071 shift 0E-10 -9 -> 0E-10
ddshi072 shift 0.000 +9 -> 0.000
ddshi073 shift 0.000 -9 -> 0.000
ddshi074 shift 0E+10 +9 -> 0E+10
ddshi075 shift 0E+10 -9 -> 0E+10
ddshi076 shift -0E-10 +9 -> -0E-10
ddshi077 shift -0E-10 -9 -> -0E-10
ddshi078 shift -0.000 +9 -> -0.000
ddshi079 shift -0.000 -9 -> -0.000
ddshi080 shift -0E+10 +9 -> -0E+10
ddshi081 shift -0E+10 -9 -> -0E+10
-- Nmax, Nmin, Ntiny
ddshi141 shift 9.999999999999999E+384 -1 -> 9.99999999999999E+383
ddshi142 shift 9.999999999999999E+384 -15 -> 9E+369
ddshi143 shift 9.999999999999999E+384 1 -> 9.999999999999990E+384
ddshi144 shift 9.999999999999999E+384 15 -> 9.000000000000000E+384
ddshi145 shift 1E-383 -1 -> 0E-383
ddshi146 shift 1E-383 -15 -> 0E-383
ddshi147 shift 1E-383 1 -> 1.0E-382
ddshi148 shift 1E-383 15 -> 1.000000000000000E-368
ddshi151 shift 1.000000000000000E-383 -1 -> 1.00000000000000E-384
ddshi152 shift 1.000000000000000E-383 -15 -> 1E-398
ddshi153 shift 1.000000000000000E-383 1 -> 0E-398
ddshi154 shift 1.000000000000000E-383 15 -> 0E-398
ddshi155 shift 9.000000000000000E-383 -1 -> 9.00000000000000E-384
ddshi156 shift 9.000000000000000E-383 -15 -> 9E-398
ddshi157 shift 9.000000000000000E-383 1 -> 0E-398
ddshi158 shift 9.000000000000000E-383 15 -> 0E-398
ddshi160 shift 1E-398 -1 -> 0E-398
ddshi161 shift 1E-398 -15 -> 0E-398
ddshi162 shift 1E-398 1 -> 1.0E-397
ddshi163 shift 1E-398 15 -> 1.000000000000000E-383
-- negatives
ddshi171 shift -9.999999999999999E+384 -1 -> -9.99999999999999E+383
ddshi172 shift -9.999999999999999E+384 -15 -> -9E+369
ddshi173 shift -9.999999999999999E+384 1 -> -9.999999999999990E+384
ddshi174 shift -9.999999999999999E+384 15 -> -9.000000000000000E+384
ddshi175 shift -1E-383 -1 -> -0E-383
ddshi176 shift -1E-383 -15 -> -0E-383
ddshi177 shift -1E-383 1 -> -1.0E-382
ddshi178 shift -1E-383 15 -> -1.000000000000000E-368
ddshi181 shift -1.000000000000000E-383 -1 -> -1.00000000000000E-384
ddshi182 shift -1.000000000000000E-383 -15 -> -1E-398
ddshi183 shift -1.000000000000000E-383 1 -> -0E-398
ddshi184 shift -1.000000000000000E-383 15 -> -0E-398
ddshi185 shift -9.000000000000000E-383 -1 -> -9.00000000000000E-384
ddshi186 shift -9.000000000000000E-383 -15 -> -9E-398
ddshi187 shift -9.000000000000000E-383 1 -> -0E-398
ddshi188 shift -9.000000000000000E-383 15 -> -0E-398
ddshi190 shift -1E-398 -1 -> -0E-398
ddshi191 shift -1E-398 -15 -> -0E-398
ddshi192 shift -1E-398 1 -> -1.0E-397
ddshi193 shift -1E-398 15 -> -1.000000000000000E-383
-- more negatives (of sanities)
ddshi201 shift -0 0 -> -0
ddshi202 shift -0 2 -> -0
ddshi203 shift -1 2 -> -100
ddshi204 shift -1 15 -> -1000000000000000
ddshi205 shift -1 16 -> -0
ddshi206 shift -1 -1 -> -0
ddshi207 shift -0 -2 -> -0
ddshi208 shift -1234567890123456 -1 -> -123456789012345
ddshi209 shift -1234567890123456 -15 -> -1
ddshi210 shift -1234567890123456 -16 -> -0
ddshi211 shift -9934567890123456 -15 -> -9
ddshi212 shift -9934567890123456 -16 -> -0
-- Specials; NaNs are handled as usual
ddshi781 shift -Inf -8 -> -Infinity
ddshi782 shift -Inf -1 -> -Infinity
ddshi783 shift -Inf -0 -> -Infinity
ddshi784 shift -Inf 0 -> -Infinity
ddshi785 shift -Inf 1 -> -Infinity
ddshi786 shift -Inf 8 -> -Infinity
ddshi787 shift -1000 -Inf -> NaN Invalid_operation
ddshi788 shift -Inf -Inf -> NaN Invalid_operation
ddshi789 shift -1 -Inf -> NaN Invalid_operation
ddshi790 shift -0 -Inf -> NaN Invalid_operation
ddshi791 shift 0 -Inf -> NaN Invalid_operation
ddshi792 shift 1 -Inf -> NaN Invalid_operation
ddshi793 shift 1000 -Inf -> NaN Invalid_operation
ddshi794 shift Inf -Inf -> NaN Invalid_operation
ddshi800 shift Inf -Inf -> NaN Invalid_operation
ddshi801 shift Inf -8 -> Infinity
ddshi802 shift Inf -1 -> Infinity
ddshi803 shift Inf -0 -> Infinity
ddshi804 shift Inf 0 -> Infinity
ddshi805 shift Inf 1 -> Infinity
ddshi806 shift Inf 8 -> Infinity
ddshi807 shift Inf Inf -> NaN Invalid_operation
ddshi808 shift -1000 Inf -> NaN Invalid_operation
ddshi809 shift -Inf Inf -> NaN Invalid_operation
ddshi810 shift -1 Inf -> NaN Invalid_operation
ddshi811 shift -0 Inf -> NaN Invalid_operation
ddshi812 shift 0 Inf -> NaN Invalid_operation
ddshi813 shift 1 Inf -> NaN Invalid_operation
ddshi814 shift 1000 Inf -> NaN Invalid_operation
ddshi815 shift Inf Inf -> NaN Invalid_operation
ddshi821 shift NaN -Inf -> NaN
ddshi822 shift NaN -1000 -> NaN
ddshi823 shift NaN -1 -> NaN
ddshi824 shift NaN -0 -> NaN
ddshi825 shift NaN 0 -> NaN
ddshi826 shift NaN 1 -> NaN
ddshi827 shift NaN 1000 -> NaN
ddshi828 shift NaN Inf -> NaN
ddshi829 shift NaN NaN -> NaN
ddshi830 shift -Inf NaN -> NaN
ddshi831 shift -1000 NaN -> NaN
ddshi832 shift -1 NaN -> NaN
ddshi833 shift -0 NaN -> NaN
ddshi834 shift 0 NaN -> NaN
ddshi835 shift 1 NaN -> NaN
ddshi836 shift 1000 NaN -> NaN
ddshi837 shift Inf NaN -> NaN
ddshi841 shift sNaN -Inf -> NaN Invalid_operation
ddshi842 shift sNaN -1000 -> NaN Invalid_operation
ddshi843 shift sNaN -1 -> NaN Invalid_operation
ddshi844 shift sNaN -0 -> NaN Invalid_operation
ddshi845 shift sNaN 0 -> NaN Invalid_operation
ddshi846 shift sNaN 1 -> NaN Invalid_operation
ddshi847 shift sNaN 1000 -> NaN Invalid_operation
ddshi848 shift sNaN NaN -> NaN Invalid_operation
ddshi849 shift sNaN sNaN -> NaN Invalid_operation
ddshi850 shift NaN sNaN -> NaN Invalid_operation
ddshi851 shift -Inf sNaN -> NaN Invalid_operation
ddshi852 shift -1000 sNaN -> NaN Invalid_operation
ddshi853 shift -1 sNaN -> NaN Invalid_operation
ddshi854 shift -0 sNaN -> NaN Invalid_operation
ddshi855 shift 0 sNaN -> NaN Invalid_operation
ddshi856 shift 1 sNaN -> NaN Invalid_operation
ddshi857 shift 1000 sNaN -> NaN Invalid_operation
ddshi858 shift Inf sNaN -> NaN Invalid_operation
ddshi859 shift NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
ddshi861 shift NaN1 -Inf -> NaN1
ddshi862 shift +NaN2 -1000 -> NaN2
ddshi863 shift NaN3 1000 -> NaN3
ddshi864 shift NaN4 Inf -> NaN4
ddshi865 shift NaN5 +NaN6 -> NaN5
ddshi866 shift -Inf NaN7 -> NaN7
ddshi867 shift -1000 NaN8 -> NaN8
ddshi868 shift 1000 NaN9 -> NaN9
ddshi869 shift Inf +NaN10 -> NaN10
ddshi871 shift sNaN11 -Inf -> NaN11 Invalid_operation
ddshi872 shift sNaN12 -1000 -> NaN12 Invalid_operation
ddshi873 shift sNaN13 1000 -> NaN13 Invalid_operation
ddshi874 shift sNaN14 NaN17 -> NaN14 Invalid_operation
ddshi875 shift sNaN15 sNaN18 -> NaN15 Invalid_operation
ddshi876 shift NaN16 sNaN19 -> NaN19 Invalid_operation
ddshi877 shift -Inf +sNaN20 -> NaN20 Invalid_operation
ddshi878 shift -1000 sNaN21 -> NaN21 Invalid_operation
ddshi879 shift 1000 sNaN22 -> NaN22 Invalid_operation
ddshi880 shift Inf sNaN23 -> NaN23 Invalid_operation
ddshi881 shift +NaN25 +sNaN24 -> NaN24 Invalid_operation
ddshi882 shift -NaN26 NaN28 -> -NaN26
ddshi883 shift -sNaN27 sNaN29 -> -NaN27 Invalid_operation
ddshi884 shift 1000 -NaN30 -> -NaN30
ddshi885 shift 1000 -sNaN31 -> -NaN31 Invalid_operation
------------------------------------------------------------------------
-- ddShift.decTest -- shift decDouble coefficient left or right --
-- 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
ddshi001 shift 0 0 -> 0
ddshi002 shift 0 2 -> 0
ddshi003 shift 1 2 -> 100
ddshi004 shift 1 15 -> 1000000000000000
ddshi005 shift 1 16 -> 0
ddshi006 shift 1 -1 -> 0
ddshi007 shift 0 -2 -> 0
ddshi008 shift 1234567890123456 -1 -> 123456789012345
ddshi009 shift 1234567890123456 -15 -> 1
ddshi010 shift 1234567890123456 -16 -> 0
ddshi011 shift 9934567890123456 -15 -> 9
ddshi012 shift 9934567890123456 -16 -> 0
-- rhs must be an integer
ddshi015 shift 1 1.5 -> NaN Invalid_operation
ddshi016 shift 1 1.0 -> NaN Invalid_operation
ddshi017 shift 1 0.1 -> NaN Invalid_operation
ddshi018 shift 1 0.0 -> NaN Invalid_operation
ddshi019 shift 1 1E+1 -> NaN Invalid_operation
ddshi020 shift 1 1E+99 -> NaN Invalid_operation
ddshi021 shift 1 Inf -> NaN Invalid_operation
ddshi022 shift 1 -Inf -> NaN Invalid_operation
-- and |rhs| <= precision
ddshi025 shift 1 -1000 -> NaN Invalid_operation
ddshi026 shift 1 -17 -> NaN Invalid_operation
ddshi027 shift 1 17 -> NaN Invalid_operation
ddshi028 shift 1 1000 -> NaN Invalid_operation
-- full shifting pattern
ddshi030 shift 1234567890123456 -16 -> 0
ddshi031 shift 1234567890123456 -15 -> 1
ddshi032 shift 1234567890123456 -14 -> 12
ddshi033 shift 1234567890123456 -13 -> 123
ddshi034 shift 1234567890123456 -12 -> 1234
ddshi035 shift 1234567890123456 -11 -> 12345
ddshi036 shift 1234567890123456 -10 -> 123456
ddshi037 shift 1234567890123456 -9 -> 1234567
ddshi038 shift 1234567890123456 -8 -> 12345678
ddshi039 shift 1234567890123456 -7 -> 123456789
ddshi040 shift 1234567890123456 -6 -> 1234567890
ddshi041 shift 1234567890123456 -5 -> 12345678901
ddshi042 shift 1234567890123456 -4 -> 123456789012
ddshi043 shift 1234567890123456 -3 -> 1234567890123
ddshi044 shift 1234567890123456 -2 -> 12345678901234
ddshi045 shift 1234567890123456 -1 -> 123456789012345
ddshi046 shift 1234567890123456 -0 -> 1234567890123456
ddshi047 shift 1234567890123456 +0 -> 1234567890123456
ddshi048 shift 1234567890123456 +1 -> 2345678901234560
ddshi049 shift 1234567890123456 +2 -> 3456789012345600
ddshi050 shift 1234567890123456 +3 -> 4567890123456000
ddshi051 shift 1234567890123456 +4 -> 5678901234560000
ddshi052 shift 1234567890123456 +5 -> 6789012345600000
ddshi053 shift 1234567890123456 +6 -> 7890123456000000
ddshi054 shift 1234567890123456 +7 -> 8901234560000000
ddshi055 shift 1234567890123456 +8 -> 9012345600000000
ddshi056 shift 1234567890123456 +9 -> 123456000000000
ddshi057 shift 1234567890123456 +10 -> 1234560000000000
ddshi058 shift 1234567890123456 +11 -> 2345600000000000
ddshi059 shift 1234567890123456 +12 -> 3456000000000000
ddshi060 shift 1234567890123456 +13 -> 4560000000000000
ddshi061 shift 1234567890123456 +14 -> 5600000000000000
ddshi062 shift 1234567890123456 +15 -> 6000000000000000
ddshi063 shift 1234567890123456 +16 -> 0
-- zeros
ddshi070 shift 0E-10 +9 -> 0E-10
ddshi071 shift 0E-10 -9 -> 0E-10
ddshi072 shift 0.000 +9 -> 0.000
ddshi073 shift 0.000 -9 -> 0.000
ddshi074 shift 0E+10 +9 -> 0E+10
ddshi075 shift 0E+10 -9 -> 0E+10
ddshi076 shift -0E-10 +9 -> -0E-10
ddshi077 shift -0E-10 -9 -> -0E-10
ddshi078 shift -0.000 +9 -> -0.000
ddshi079 shift -0.000 -9 -> -0.000
ddshi080 shift -0E+10 +9 -> -0E+10
ddshi081 shift -0E+10 -9 -> -0E+10
-- Nmax, Nmin, Ntiny
ddshi141 shift 9.999999999999999E+384 -1 -> 9.99999999999999E+383
ddshi142 shift 9.999999999999999E+384 -15 -> 9E+369
ddshi143 shift 9.999999999999999E+384 1 -> 9.999999999999990E+384
ddshi144 shift 9.999999999999999E+384 15 -> 9.000000000000000E+384
ddshi145 shift 1E-383 -1 -> 0E-383
ddshi146 shift 1E-383 -15 -> 0E-383
ddshi147 shift 1E-383 1 -> 1.0E-382
ddshi148 shift 1E-383 15 -> 1.000000000000000E-368
ddshi151 shift 1.000000000000000E-383 -1 -> 1.00000000000000E-384
ddshi152 shift 1.000000000000000E-383 -15 -> 1E-398
ddshi153 shift 1.000000000000000E-383 1 -> 0E-398
ddshi154 shift 1.000000000000000E-383 15 -> 0E-398
ddshi155 shift 9.000000000000000E-383 -1 -> 9.00000000000000E-384
ddshi156 shift 9.000000000000000E-383 -15 -> 9E-398
ddshi157 shift 9.000000000000000E-383 1 -> 0E-398
ddshi158 shift 9.000000000000000E-383 15 -> 0E-398
ddshi160 shift 1E-398 -1 -> 0E-398
ddshi161 shift 1E-398 -15 -> 0E-398
ddshi162 shift 1E-398 1 -> 1.0E-397
ddshi163 shift 1E-398 15 -> 1.000000000000000E-383
-- negatives
ddshi171 shift -9.999999999999999E+384 -1 -> -9.99999999999999E+383
ddshi172 shift -9.999999999999999E+384 -15 -> -9E+369
ddshi173 shift -9.999999999999999E+384 1 -> -9.999999999999990E+384
ddshi174 shift -9.999999999999999E+384 15 -> -9.000000000000000E+384
ddshi175 shift -1E-383 -1 -> -0E-383
ddshi176 shift -1E-383 -15 -> -0E-383
ddshi177 shift -1E-383 1 -> -1.0E-382
ddshi178 shift -1E-383 15 -> -1.000000000000000E-368
ddshi181 shift -1.000000000000000E-383 -1 -> -1.00000000000000E-384
ddshi182 shift -1.000000000000000E-383 -15 -> -1E-398
ddshi183 shift -1.000000000000000E-383 1 -> -0E-398
ddshi184 shift -1.000000000000000E-383 15 -> -0E-398
ddshi185 shift -9.000000000000000E-383 -1 -> -9.00000000000000E-384
ddshi186 shift -9.000000000000000E-383 -15 -> -9E-398
ddshi187 shift -9.000000000000000E-383 1 -> -0E-398
ddshi188 shift -9.000000000000000E-383 15 -> -0E-398
ddshi190 shift -1E-398 -1 -> -0E-398
ddshi191 shift -1E-398 -15 -> -0E-398
ddshi192 shift -1E-398 1 -> -1.0E-397
ddshi193 shift -1E-398 15 -> -1.000000000000000E-383
-- more negatives (of sanities)
ddshi201 shift -0 0 -> -0
ddshi202 shift -0 2 -> -0
ddshi203 shift -1 2 -> -100
ddshi204 shift -1 15 -> -1000000000000000
ddshi205 shift -1 16 -> -0
ddshi206 shift -1 -1 -> -0
ddshi207 shift -0 -2 -> -0
ddshi208 shift -1234567890123456 -1 -> -123456789012345
ddshi209 shift -1234567890123456 -15 -> -1
ddshi210 shift -1234567890123456 -16 -> -0
ddshi211 shift -9934567890123456 -15 -> -9
ddshi212 shift -9934567890123456 -16 -> -0
-- Specials; NaNs are handled as usual
ddshi781 shift -Inf -8 -> -Infinity
ddshi782 shift -Inf -1 -> -Infinity
ddshi783 shift -Inf -0 -> -Infinity
ddshi784 shift -Inf 0 -> -Infinity
ddshi785 shift -Inf 1 -> -Infinity
ddshi786 shift -Inf 8 -> -Infinity
ddshi787 shift -1000 -Inf -> NaN Invalid_operation
ddshi788 shift -Inf -Inf -> NaN Invalid_operation
ddshi789 shift -1 -Inf -> NaN Invalid_operation
ddshi790 shift -0 -Inf -> NaN Invalid_operation
ddshi791 shift 0 -Inf -> NaN Invalid_operation
ddshi792 shift 1 -Inf -> NaN Invalid_operation
ddshi793 shift 1000 -Inf -> NaN Invalid_operation
ddshi794 shift Inf -Inf -> NaN Invalid_operation
ddshi800 shift Inf -Inf -> NaN Invalid_operation
ddshi801 shift Inf -8 -> Infinity
ddshi802 shift Inf -1 -> Infinity
ddshi803 shift Inf -0 -> Infinity
ddshi804 shift Inf 0 -> Infinity
ddshi805 shift Inf 1 -> Infinity
ddshi806 shift Inf 8 -> Infinity
ddshi807 shift Inf Inf -> NaN Invalid_operation
ddshi808 shift -1000 Inf -> NaN Invalid_operation
ddshi809 shift -Inf Inf -> NaN Invalid_operation
ddshi810 shift -1 Inf -> NaN Invalid_operation
ddshi811 shift -0 Inf -> NaN Invalid_operation
ddshi812 shift 0 Inf -> NaN Invalid_operation
ddshi813 shift 1 Inf -> NaN Invalid_operation
ddshi814 shift 1000 Inf -> NaN Invalid_operation
ddshi815 shift Inf Inf -> NaN Invalid_operation
ddshi821 shift NaN -Inf -> NaN
ddshi822 shift NaN -1000 -> NaN
ddshi823 shift NaN -1 -> NaN
ddshi824 shift NaN -0 -> NaN
ddshi825 shift NaN 0 -> NaN
ddshi826 shift NaN 1 -> NaN
ddshi827 shift NaN 1000 -> NaN
ddshi828 shift NaN Inf -> NaN
ddshi829 shift NaN NaN -> NaN
ddshi830 shift -Inf NaN -> NaN
ddshi831 shift -1000 NaN -> NaN
ddshi832 shift -1 NaN -> NaN
ddshi833 shift -0 NaN -> NaN
ddshi834 shift 0 NaN -> NaN
ddshi835 shift 1 NaN -> NaN
ddshi836 shift 1000 NaN -> NaN
ddshi837 shift Inf NaN -> NaN
ddshi841 shift sNaN -Inf -> NaN Invalid_operation
ddshi842 shift sNaN -1000 -> NaN Invalid_operation
ddshi843 shift sNaN -1 -> NaN Invalid_operation
ddshi844 shift sNaN -0 -> NaN Invalid_operation
ddshi845 shift sNaN 0 -> NaN Invalid_operation
ddshi846 shift sNaN 1 -> NaN Invalid_operation
ddshi847 shift sNaN 1000 -> NaN Invalid_operation
ddshi848 shift sNaN NaN -> NaN Invalid_operation
ddshi849 shift sNaN sNaN -> NaN Invalid_operation
ddshi850 shift NaN sNaN -> NaN Invalid_operation
ddshi851 shift -Inf sNaN -> NaN Invalid_operation
ddshi852 shift -1000 sNaN -> NaN Invalid_operation
ddshi853 shift -1 sNaN -> NaN Invalid_operation
ddshi854 shift -0 sNaN -> NaN Invalid_operation
ddshi855 shift 0 sNaN -> NaN Invalid_operation
ddshi856 shift 1 sNaN -> NaN Invalid_operation
ddshi857 shift 1000 sNaN -> NaN Invalid_operation
ddshi858 shift Inf sNaN -> NaN Invalid_operation
ddshi859 shift NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
ddshi861 shift NaN1 -Inf -> NaN1
ddshi862 shift +NaN2 -1000 -> NaN2
ddshi863 shift NaN3 1000 -> NaN3
ddshi864 shift NaN4 Inf -> NaN4
ddshi865 shift NaN5 +NaN6 -> NaN5
ddshi866 shift -Inf NaN7 -> NaN7
ddshi867 shift -1000 NaN8 -> NaN8
ddshi868 shift 1000 NaN9 -> NaN9
ddshi869 shift Inf +NaN10 -> NaN10
ddshi871 shift sNaN11 -Inf -> NaN11 Invalid_operation
ddshi872 shift sNaN12 -1000 -> NaN12 Invalid_operation
ddshi873 shift sNaN13 1000 -> NaN13 Invalid_operation
ddshi874 shift sNaN14 NaN17 -> NaN14 Invalid_operation
ddshi875 shift sNaN15 sNaN18 -> NaN15 Invalid_operation
ddshi876 shift NaN16 sNaN19 -> NaN19 Invalid_operation
ddshi877 shift -Inf +sNaN20 -> NaN20 Invalid_operation
ddshi878 shift -1000 sNaN21 -> NaN21 Invalid_operation
ddshi879 shift 1000 sNaN22 -> NaN22 Invalid_operation
ddshi880 shift Inf sNaN23 -> NaN23 Invalid_operation
ddshi881 shift +NaN25 +sNaN24 -> NaN24 Invalid_operation
ddshi882 shift -NaN26 NaN28 -> -NaN26
ddshi883 shift -sNaN27 sNaN29 -> -NaN27 Invalid_operation
ddshi884 shift 1000 -NaN30 -> -NaN30
ddshi885 shift 1000 -sNaN31 -> -NaN31 Invalid_operation

File diff suppressed because it is too large Load diff

View file

@ -1,257 +1,257 @@
------------------------------------------------------------------------
-- ddToIntegral.decTest -- round Double to integral value --
-- Copyright (c) IBM Corporation, 2001, 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 tests the extended specification 'round-to-integral
-- value-exact' operations (from IEEE 854, later modified in 754r).
-- All non-zero results are defined as being those from either copy or
-- quantize, so those are assumed to have been tested extensively
-- elsewhere; the tests here are for integrity, rounding mode, etc.
-- Also, it is assumed the test harness will use these tests for both
-- ToIntegralExact (which does set Inexact) and the fixed-name
-- functions (which do not set Inexact).
-- Note that decNumber implements an earlier definition of toIntegral
-- which never sets Inexact; the decTest operator for that is called
-- 'tointegral' instead of 'tointegralx'.
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
ddintx001 tointegralx 0 -> 0
ddintx002 tointegralx 0.0 -> 0
ddintx003 tointegralx 0.1 -> 0 Inexact Rounded
ddintx004 tointegralx 0.2 -> 0 Inexact Rounded
ddintx005 tointegralx 0.3 -> 0 Inexact Rounded
ddintx006 tointegralx 0.4 -> 0 Inexact Rounded
ddintx007 tointegralx 0.5 -> 0 Inexact Rounded
ddintx008 tointegralx 0.6 -> 1 Inexact Rounded
ddintx009 tointegralx 0.7 -> 1 Inexact Rounded
ddintx010 tointegralx 0.8 -> 1 Inexact Rounded
ddintx011 tointegralx 0.9 -> 1 Inexact Rounded
ddintx012 tointegralx 1 -> 1
ddintx013 tointegralx 1.0 -> 1 Rounded
ddintx014 tointegralx 1.1 -> 1 Inexact Rounded
ddintx015 tointegralx 1.2 -> 1 Inexact Rounded
ddintx016 tointegralx 1.3 -> 1 Inexact Rounded
ddintx017 tointegralx 1.4 -> 1 Inexact Rounded
ddintx018 tointegralx 1.5 -> 2 Inexact Rounded
ddintx019 tointegralx 1.6 -> 2 Inexact Rounded
ddintx020 tointegralx 1.7 -> 2 Inexact Rounded
ddintx021 tointegralx 1.8 -> 2 Inexact Rounded
ddintx022 tointegralx 1.9 -> 2 Inexact Rounded
-- negatives
ddintx031 tointegralx -0 -> -0
ddintx032 tointegralx -0.0 -> -0
ddintx033 tointegralx -0.1 -> -0 Inexact Rounded
ddintx034 tointegralx -0.2 -> -0 Inexact Rounded
ddintx035 tointegralx -0.3 -> -0 Inexact Rounded
ddintx036 tointegralx -0.4 -> -0 Inexact Rounded
ddintx037 tointegralx -0.5 -> -0 Inexact Rounded
ddintx038 tointegralx -0.6 -> -1 Inexact Rounded
ddintx039 tointegralx -0.7 -> -1 Inexact Rounded
ddintx040 tointegralx -0.8 -> -1 Inexact Rounded
ddintx041 tointegralx -0.9 -> -1 Inexact Rounded
ddintx042 tointegralx -1 -> -1
ddintx043 tointegralx -1.0 -> -1 Rounded
ddintx044 tointegralx -1.1 -> -1 Inexact Rounded
ddintx045 tointegralx -1.2 -> -1 Inexact Rounded
ddintx046 tointegralx -1.3 -> -1 Inexact Rounded
ddintx047 tointegralx -1.4 -> -1 Inexact Rounded
ddintx048 tointegralx -1.5 -> -2 Inexact Rounded
ddintx049 tointegralx -1.6 -> -2 Inexact Rounded
ddintx050 tointegralx -1.7 -> -2 Inexact Rounded
ddintx051 tointegralx -1.8 -> -2 Inexact Rounded
ddintx052 tointegralx -1.9 -> -2 Inexact Rounded
-- next two would be NaN using quantize(x, 0)
ddintx053 tointegralx 10E+60 -> 1.0E+61
ddintx054 tointegralx -10E+60 -> -1.0E+61
-- numbers around precision
ddintx060 tointegralx '56267E-17' -> '0' Inexact Rounded
ddintx061 tointegralx '56267E-5' -> '1' Inexact Rounded
ddintx062 tointegralx '56267E-2' -> '563' Inexact Rounded
ddintx063 tointegralx '56267E-1' -> '5627' Inexact Rounded
ddintx065 tointegralx '56267E-0' -> '56267'
ddintx066 tointegralx '56267E+0' -> '56267'
ddintx067 tointegralx '56267E+1' -> '5.6267E+5'
ddintx068 tointegralx '56267E+9' -> '5.6267E+13'
ddintx069 tointegralx '56267E+10' -> '5.6267E+14'
ddintx070 tointegralx '56267E+11' -> '5.6267E+15'
ddintx071 tointegralx '56267E+12' -> '5.6267E+16'
ddintx072 tointegralx '56267E+13' -> '5.6267E+17'
ddintx073 tointegralx '1.23E+96' -> '1.23E+96'
ddintx074 tointegralx '1.23E+384' -> #47fd300000000000 Clamped
ddintx080 tointegralx '-56267E-10' -> '-0' Inexact Rounded
ddintx081 tointegralx '-56267E-5' -> '-1' Inexact Rounded
ddintx082 tointegralx '-56267E-2' -> '-563' Inexact Rounded
ddintx083 tointegralx '-56267E-1' -> '-5627' Inexact Rounded
ddintx085 tointegralx '-56267E-0' -> '-56267'
ddintx086 tointegralx '-56267E+0' -> '-56267'
ddintx087 tointegralx '-56267E+1' -> '-5.6267E+5'
ddintx088 tointegralx '-56267E+9' -> '-5.6267E+13'
ddintx089 tointegralx '-56267E+10' -> '-5.6267E+14'
ddintx090 tointegralx '-56267E+11' -> '-5.6267E+15'
ddintx091 tointegralx '-56267E+12' -> '-5.6267E+16'
ddintx092 tointegralx '-56267E+13' -> '-5.6267E+17'
ddintx093 tointegralx '-1.23E+96' -> '-1.23E+96'
ddintx094 tointegralx '-1.23E+384' -> #c7fd300000000000 Clamped
-- subnormal inputs
ddintx100 tointegralx 1E-299 -> 0 Inexact Rounded
ddintx101 tointegralx 0.1E-299 -> 0 Inexact Rounded
ddintx102 tointegralx 0.01E-299 -> 0 Inexact Rounded
ddintx103 tointegralx 0E-299 -> 0
-- specials and zeros
ddintx120 tointegralx 'Inf' -> Infinity
ddintx121 tointegralx '-Inf' -> -Infinity
ddintx122 tointegralx NaN -> NaN
ddintx123 tointegralx sNaN -> NaN Invalid_operation
ddintx124 tointegralx 0 -> 0
ddintx125 tointegralx -0 -> -0
ddintx126 tointegralx 0.000 -> 0
ddintx127 tointegralx 0.00 -> 0
ddintx128 tointegralx 0.0 -> 0
ddintx129 tointegralx 0 -> 0
ddintx130 tointegralx 0E-3 -> 0
ddintx131 tointegralx 0E-2 -> 0
ddintx132 tointegralx 0E-1 -> 0
ddintx133 tointegralx 0E-0 -> 0
ddintx134 tointegralx 0E+1 -> 0E+1
ddintx135 tointegralx 0E+2 -> 0E+2
ddintx136 tointegralx 0E+3 -> 0E+3
ddintx137 tointegralx 0E+4 -> 0E+4
ddintx138 tointegralx 0E+5 -> 0E+5
ddintx139 tointegralx -0.000 -> -0
ddintx140 tointegralx -0.00 -> -0
ddintx141 tointegralx -0.0 -> -0
ddintx142 tointegralx -0 -> -0
ddintx143 tointegralx -0E-3 -> -0
ddintx144 tointegralx -0E-2 -> -0
ddintx145 tointegralx -0E-1 -> -0
ddintx146 tointegralx -0E-0 -> -0
ddintx147 tointegralx -0E+1 -> -0E+1
ddintx148 tointegralx -0E+2 -> -0E+2
ddintx149 tointegralx -0E+3 -> -0E+3
ddintx150 tointegralx -0E+4 -> -0E+4
ddintx151 tointegralx -0E+5 -> -0E+5
-- propagating NaNs
ddintx152 tointegralx NaN808 -> NaN808
ddintx153 tointegralx sNaN080 -> NaN80 Invalid_operation
ddintx154 tointegralx -NaN808 -> -NaN808
ddintx155 tointegralx -sNaN080 -> -NaN80 Invalid_operation
ddintx156 tointegralx -NaN -> -NaN
ddintx157 tointegralx -sNaN -> -NaN Invalid_operation
-- examples
rounding: half_up
ddintx200 tointegralx 2.1 -> 2 Inexact Rounded
ddintx201 tointegralx 100 -> 100
ddintx202 tointegralx 100.0 -> 100 Rounded
ddintx203 tointegralx 101.5 -> 102 Inexact Rounded
ddintx204 tointegralx -101.5 -> -102 Inexact Rounded
ddintx205 tointegralx 10E+5 -> 1.0E+6
ddintx206 tointegralx 7.89E+77 -> 7.89E+77
ddintx207 tointegralx -Inf -> -Infinity
-- all rounding modes
rounding: half_even
ddintx210 tointegralx 55.5 -> 56 Inexact Rounded
ddintx211 tointegralx 56.5 -> 56 Inexact Rounded
ddintx212 tointegralx 57.5 -> 58 Inexact Rounded
ddintx213 tointegralx -55.5 -> -56 Inexact Rounded
ddintx214 tointegralx -56.5 -> -56 Inexact Rounded
ddintx215 tointegralx -57.5 -> -58 Inexact Rounded
rounding: half_up
ddintx220 tointegralx 55.5 -> 56 Inexact Rounded
ddintx221 tointegralx 56.5 -> 57 Inexact Rounded
ddintx222 tointegralx 57.5 -> 58 Inexact Rounded
ddintx223 tointegralx -55.5 -> -56 Inexact Rounded
ddintx224 tointegralx -56.5 -> -57 Inexact Rounded
ddintx225 tointegralx -57.5 -> -58 Inexact Rounded
rounding: half_down
ddintx230 tointegralx 55.5 -> 55 Inexact Rounded
ddintx231 tointegralx 56.5 -> 56 Inexact Rounded
ddintx232 tointegralx 57.5 -> 57 Inexact Rounded
ddintx233 tointegralx -55.5 -> -55 Inexact Rounded
ddintx234 tointegralx -56.5 -> -56 Inexact Rounded
ddintx235 tointegralx -57.5 -> -57 Inexact Rounded
rounding: up
ddintx240 tointegralx 55.3 -> 56 Inexact Rounded
ddintx241 tointegralx 56.3 -> 57 Inexact Rounded
ddintx242 tointegralx 57.3 -> 58 Inexact Rounded
ddintx243 tointegralx -55.3 -> -56 Inexact Rounded
ddintx244 tointegralx -56.3 -> -57 Inexact Rounded
ddintx245 tointegralx -57.3 -> -58 Inexact Rounded
rounding: down
ddintx250 tointegralx 55.7 -> 55 Inexact Rounded
ddintx251 tointegralx 56.7 -> 56 Inexact Rounded
ddintx252 tointegralx 57.7 -> 57 Inexact Rounded
ddintx253 tointegralx -55.7 -> -55 Inexact Rounded
ddintx254 tointegralx -56.7 -> -56 Inexact Rounded
ddintx255 tointegralx -57.7 -> -57 Inexact Rounded
rounding: ceiling
ddintx260 tointegralx 55.3 -> 56 Inexact Rounded
ddintx261 tointegralx 56.3 -> 57 Inexact Rounded
ddintx262 tointegralx 57.3 -> 58 Inexact Rounded
ddintx263 tointegralx -55.3 -> -55 Inexact Rounded
ddintx264 tointegralx -56.3 -> -56 Inexact Rounded
ddintx265 tointegralx -57.3 -> -57 Inexact Rounded
rounding: floor
ddintx270 tointegralx 55.7 -> 55 Inexact Rounded
ddintx271 tointegralx 56.7 -> 56 Inexact Rounded
ddintx272 tointegralx 57.7 -> 57 Inexact Rounded
ddintx273 tointegralx -55.7 -> -56 Inexact Rounded
ddintx274 tointegralx -56.7 -> -57 Inexact Rounded
ddintx275 tointegralx -57.7 -> -58 Inexact Rounded
-- Int and uInt32 edge values for testing conversions
ddintx300 tointegralx -2147483646 -> -2147483646
ddintx301 tointegralx -2147483647 -> -2147483647
ddintx302 tointegralx -2147483648 -> -2147483648
ddintx303 tointegralx -2147483649 -> -2147483649
ddintx304 tointegralx 2147483646 -> 2147483646
ddintx305 tointegralx 2147483647 -> 2147483647
ddintx306 tointegralx 2147483648 -> 2147483648
ddintx307 tointegralx 2147483649 -> 2147483649
ddintx308 tointegralx 4294967294 -> 4294967294
ddintx309 tointegralx 4294967295 -> 4294967295
ddintx310 tointegralx 4294967296 -> 4294967296
ddintx311 tointegralx 4294967297 -> 4294967297
------------------------------------------------------------------------
-- ddToIntegral.decTest -- round Double to integral value --
-- Copyright (c) IBM Corporation, 2001, 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 tests the extended specification 'round-to-integral
-- value-exact' operations (from IEEE 854, later modified in 754r).
-- All non-zero results are defined as being those from either copy or
-- quantize, so those are assumed to have been tested extensively
-- elsewhere; the tests here are for integrity, rounding mode, etc.
-- Also, it is assumed the test harness will use these tests for both
-- ToIntegralExact (which does set Inexact) and the fixed-name
-- functions (which do not set Inexact).
-- Note that decNumber implements an earlier definition of toIntegral
-- which never sets Inexact; the decTest operator for that is called
-- 'tointegral' instead of 'tointegralx'.
precision: 16
maxExponent: 384
minExponent: -383
extended: 1
clamp: 1
rounding: half_even
ddintx001 tointegralx 0 -> 0
ddintx002 tointegralx 0.0 -> 0
ddintx003 tointegralx 0.1 -> 0 Inexact Rounded
ddintx004 tointegralx 0.2 -> 0 Inexact Rounded
ddintx005 tointegralx 0.3 -> 0 Inexact Rounded
ddintx006 tointegralx 0.4 -> 0 Inexact Rounded
ddintx007 tointegralx 0.5 -> 0 Inexact Rounded
ddintx008 tointegralx 0.6 -> 1 Inexact Rounded
ddintx009 tointegralx 0.7 -> 1 Inexact Rounded
ddintx010 tointegralx 0.8 -> 1 Inexact Rounded
ddintx011 tointegralx 0.9 -> 1 Inexact Rounded
ddintx012 tointegralx 1 -> 1
ddintx013 tointegralx 1.0 -> 1 Rounded
ddintx014 tointegralx 1.1 -> 1 Inexact Rounded
ddintx015 tointegralx 1.2 -> 1 Inexact Rounded
ddintx016 tointegralx 1.3 -> 1 Inexact Rounded
ddintx017 tointegralx 1.4 -> 1 Inexact Rounded
ddintx018 tointegralx 1.5 -> 2 Inexact Rounded
ddintx019 tointegralx 1.6 -> 2 Inexact Rounded
ddintx020 tointegralx 1.7 -> 2 Inexact Rounded
ddintx021 tointegralx 1.8 -> 2 Inexact Rounded
ddintx022 tointegralx 1.9 -> 2 Inexact Rounded
-- negatives
ddintx031 tointegralx -0 -> -0
ddintx032 tointegralx -0.0 -> -0
ddintx033 tointegralx -0.1 -> -0 Inexact Rounded
ddintx034 tointegralx -0.2 -> -0 Inexact Rounded
ddintx035 tointegralx -0.3 -> -0 Inexact Rounded
ddintx036 tointegralx -0.4 -> -0 Inexact Rounded
ddintx037 tointegralx -0.5 -> -0 Inexact Rounded
ddintx038 tointegralx -0.6 -> -1 Inexact Rounded
ddintx039 tointegralx -0.7 -> -1 Inexact Rounded
ddintx040 tointegralx -0.8 -> -1 Inexact Rounded
ddintx041 tointegralx -0.9 -> -1 Inexact Rounded
ddintx042 tointegralx -1 -> -1
ddintx043 tointegralx -1.0 -> -1 Rounded
ddintx044 tointegralx -1.1 -> -1 Inexact Rounded
ddintx045 tointegralx -1.2 -> -1 Inexact Rounded
ddintx046 tointegralx -1.3 -> -1 Inexact Rounded
ddintx047 tointegralx -1.4 -> -1 Inexact Rounded
ddintx048 tointegralx -1.5 -> -2 Inexact Rounded
ddintx049 tointegralx -1.6 -> -2 Inexact Rounded
ddintx050 tointegralx -1.7 -> -2 Inexact Rounded
ddintx051 tointegralx -1.8 -> -2 Inexact Rounded
ddintx052 tointegralx -1.9 -> -2 Inexact Rounded
-- next two would be NaN using quantize(x, 0)
ddintx053 tointegralx 10E+60 -> 1.0E+61
ddintx054 tointegralx -10E+60 -> -1.0E+61
-- numbers around precision
ddintx060 tointegralx '56267E-17' -> '0' Inexact Rounded
ddintx061 tointegralx '56267E-5' -> '1' Inexact Rounded
ddintx062 tointegralx '56267E-2' -> '563' Inexact Rounded
ddintx063 tointegralx '56267E-1' -> '5627' Inexact Rounded
ddintx065 tointegralx '56267E-0' -> '56267'
ddintx066 tointegralx '56267E+0' -> '56267'
ddintx067 tointegralx '56267E+1' -> '5.6267E+5'
ddintx068 tointegralx '56267E+9' -> '5.6267E+13'
ddintx069 tointegralx '56267E+10' -> '5.6267E+14'
ddintx070 tointegralx '56267E+11' -> '5.6267E+15'
ddintx071 tointegralx '56267E+12' -> '5.6267E+16'
ddintx072 tointegralx '56267E+13' -> '5.6267E+17'
ddintx073 tointegralx '1.23E+96' -> '1.23E+96'
ddintx074 tointegralx '1.23E+384' -> #47fd300000000000 Clamped
ddintx080 tointegralx '-56267E-10' -> '-0' Inexact Rounded
ddintx081 tointegralx '-56267E-5' -> '-1' Inexact Rounded
ddintx082 tointegralx '-56267E-2' -> '-563' Inexact Rounded
ddintx083 tointegralx '-56267E-1' -> '-5627' Inexact Rounded
ddintx085 tointegralx '-56267E-0' -> '-56267'
ddintx086 tointegralx '-56267E+0' -> '-56267'
ddintx087 tointegralx '-56267E+1' -> '-5.6267E+5'
ddintx088 tointegralx '-56267E+9' -> '-5.6267E+13'
ddintx089 tointegralx '-56267E+10' -> '-5.6267E+14'
ddintx090 tointegralx '-56267E+11' -> '-5.6267E+15'
ddintx091 tointegralx '-56267E+12' -> '-5.6267E+16'
ddintx092 tointegralx '-56267E+13' -> '-5.6267E+17'
ddintx093 tointegralx '-1.23E+96' -> '-1.23E+96'
ddintx094 tointegralx '-1.23E+384' -> #c7fd300000000000 Clamped
-- subnormal inputs
ddintx100 tointegralx 1E-299 -> 0 Inexact Rounded
ddintx101 tointegralx 0.1E-299 -> 0 Inexact Rounded
ddintx102 tointegralx 0.01E-299 -> 0 Inexact Rounded
ddintx103 tointegralx 0E-299 -> 0
-- specials and zeros
ddintx120 tointegralx 'Inf' -> Infinity
ddintx121 tointegralx '-Inf' -> -Infinity
ddintx122 tointegralx NaN -> NaN
ddintx123 tointegralx sNaN -> NaN Invalid_operation
ddintx124 tointegralx 0 -> 0
ddintx125 tointegralx -0 -> -0
ddintx126 tointegralx 0.000 -> 0
ddintx127 tointegralx 0.00 -> 0
ddintx128 tointegralx 0.0 -> 0
ddintx129 tointegralx 0 -> 0
ddintx130 tointegralx 0E-3 -> 0
ddintx131 tointegralx 0E-2 -> 0
ddintx132 tointegralx 0E-1 -> 0
ddintx133 tointegralx 0E-0 -> 0
ddintx134 tointegralx 0E+1 -> 0E+1
ddintx135 tointegralx 0E+2 -> 0E+2
ddintx136 tointegralx 0E+3 -> 0E+3
ddintx137 tointegralx 0E+4 -> 0E+4
ddintx138 tointegralx 0E+5 -> 0E+5
ddintx139 tointegralx -0.000 -> -0
ddintx140 tointegralx -0.00 -> -0
ddintx141 tointegralx -0.0 -> -0
ddintx142 tointegralx -0 -> -0
ddintx143 tointegralx -0E-3 -> -0
ddintx144 tointegralx -0E-2 -> -0
ddintx145 tointegralx -0E-1 -> -0
ddintx146 tointegralx -0E-0 -> -0
ddintx147 tointegralx -0E+1 -> -0E+1
ddintx148 tointegralx -0E+2 -> -0E+2
ddintx149 tointegralx -0E+3 -> -0E+3
ddintx150 tointegralx -0E+4 -> -0E+4
ddintx151 tointegralx -0E+5 -> -0E+5
-- propagating NaNs
ddintx152 tointegralx NaN808 -> NaN808
ddintx153 tointegralx sNaN080 -> NaN80 Invalid_operation
ddintx154 tointegralx -NaN808 -> -NaN808
ddintx155 tointegralx -sNaN080 -> -NaN80 Invalid_operation
ddintx156 tointegralx -NaN -> -NaN
ddintx157 tointegralx -sNaN -> -NaN Invalid_operation
-- examples
rounding: half_up
ddintx200 tointegralx 2.1 -> 2 Inexact Rounded
ddintx201 tointegralx 100 -> 100
ddintx202 tointegralx 100.0 -> 100 Rounded
ddintx203 tointegralx 101.5 -> 102 Inexact Rounded
ddintx204 tointegralx -101.5 -> -102 Inexact Rounded
ddintx205 tointegralx 10E+5 -> 1.0E+6
ddintx206 tointegralx 7.89E+77 -> 7.89E+77
ddintx207 tointegralx -Inf -> -Infinity
-- all rounding modes
rounding: half_even
ddintx210 tointegralx 55.5 -> 56 Inexact Rounded
ddintx211 tointegralx 56.5 -> 56 Inexact Rounded
ddintx212 tointegralx 57.5 -> 58 Inexact Rounded
ddintx213 tointegralx -55.5 -> -56 Inexact Rounded
ddintx214 tointegralx -56.5 -> -56 Inexact Rounded
ddintx215 tointegralx -57.5 -> -58 Inexact Rounded
rounding: half_up
ddintx220 tointegralx 55.5 -> 56 Inexact Rounded
ddintx221 tointegralx 56.5 -> 57 Inexact Rounded
ddintx222 tointegralx 57.5 -> 58 Inexact Rounded
ddintx223 tointegralx -55.5 -> -56 Inexact Rounded
ddintx224 tointegralx -56.5 -> -57 Inexact Rounded
ddintx225 tointegralx -57.5 -> -58 Inexact Rounded
rounding: half_down
ddintx230 tointegralx 55.5 -> 55 Inexact Rounded
ddintx231 tointegralx 56.5 -> 56 Inexact Rounded
ddintx232 tointegralx 57.5 -> 57 Inexact Rounded
ddintx233 tointegralx -55.5 -> -55 Inexact Rounded
ddintx234 tointegralx -56.5 -> -56 Inexact Rounded
ddintx235 tointegralx -57.5 -> -57 Inexact Rounded
rounding: up
ddintx240 tointegralx 55.3 -> 56 Inexact Rounded
ddintx241 tointegralx 56.3 -> 57 Inexact Rounded
ddintx242 tointegralx 57.3 -> 58 Inexact Rounded
ddintx243 tointegralx -55.3 -> -56 Inexact Rounded
ddintx244 tointegralx -56.3 -> -57 Inexact Rounded
ddintx245 tointegralx -57.3 -> -58 Inexact Rounded
rounding: down
ddintx250 tointegralx 55.7 -> 55 Inexact Rounded
ddintx251 tointegralx 56.7 -> 56 Inexact Rounded
ddintx252 tointegralx 57.7 -> 57 Inexact Rounded
ddintx253 tointegralx -55.7 -> -55 Inexact Rounded
ddintx254 tointegralx -56.7 -> -56 Inexact Rounded
ddintx255 tointegralx -57.7 -> -57 Inexact Rounded
rounding: ceiling
ddintx260 tointegralx 55.3 -> 56 Inexact Rounded
ddintx261 tointegralx 56.3 -> 57 Inexact Rounded
ddintx262 tointegralx 57.3 -> 58 Inexact Rounded
ddintx263 tointegralx -55.3 -> -55 Inexact Rounded
ddintx264 tointegralx -56.3 -> -56 Inexact Rounded
ddintx265 tointegralx -57.3 -> -57 Inexact Rounded
rounding: floor
ddintx270 tointegralx 55.7 -> 55 Inexact Rounded
ddintx271 tointegralx 56.7 -> 56 Inexact Rounded
ddintx272 tointegralx 57.7 -> 57 Inexact Rounded
ddintx273 tointegralx -55.7 -> -56 Inexact Rounded
ddintx274 tointegralx -56.7 -> -57 Inexact Rounded
ddintx275 tointegralx -57.7 -> -58 Inexact Rounded
-- Int and uInt32 edge values for testing conversions
ddintx300 tointegralx -2147483646 -> -2147483646
ddintx301 tointegralx -2147483647 -> -2147483647
ddintx302 tointegralx -2147483648 -> -2147483648
ddintx303 tointegralx -2147483649 -> -2147483649
ddintx304 tointegralx 2147483646 -> 2147483646
ddintx305 tointegralx 2147483647 -> 2147483647
ddintx306 tointegralx 2147483648 -> 2147483648
ddintx307 tointegralx 2147483649 -> 2147483649
ddintx308 tointegralx 4294967294 -> 4294967294
ddintx309 tointegralx 4294967295 -> 4294967295
ddintx310 tointegralx 4294967296 -> 4294967296
ddintx311 tointegralx 4294967297 -> 4294967297

View file

@ -1,337 +1,337 @@
------------------------------------------------------------------------
-- ddXor.decTest -- digitwise logical XOR 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)
ddxor001 xor 0 0 -> 0
ddxor002 xor 0 1 -> 1
ddxor003 xor 1 0 -> 1
ddxor004 xor 1 1 -> 0
ddxor005 xor 1100 1010 -> 110
-- and at msd and msd-1
ddxor006 xor 0000000000000000 0000000000000000 -> 0
ddxor007 xor 0000000000000000 1000000000000000 -> 1000000000000000
ddxor008 xor 1000000000000000 0000000000000000 -> 1000000000000000
ddxor009 xor 1000000000000000 1000000000000000 -> 0
ddxor010 xor 0000000000000000 0000000000000000 -> 0
ddxor011 xor 0000000000000000 0100000000000000 -> 100000000000000
ddxor012 xor 0100000000000000 0000000000000000 -> 100000000000000
ddxor013 xor 0100000000000000 0100000000000000 -> 0
-- Various lengths
-- 1234567890123456 1234567890123456 1234567890123456
ddxor021 xor 1111111110000000 1111111110000000 -> 0
ddxor022 xor 111111110000000 111111110000000 -> 0
ddxor023 xor 11111110000000 11111110000000 -> 0
ddxor024 xor 1111110000000 1111110000000 -> 0
ddxor025 xor 111110000000 111110000000 -> 0
ddxor026 xor 11110000000 11110000000 -> 0
ddxor027 xor 1110000000 1110000000 -> 0
ddxor028 xor 110000000 110000000 -> 0
ddxor029 xor 10000000 10000000 -> 0
ddxor030 xor 1000000 1000000 -> 0
ddxor031 xor 100000 100000 -> 0
ddxor032 xor 10000 10000 -> 0
ddxor033 xor 1000 1000 -> 0
ddxor034 xor 100 100 -> 0
ddxor035 xor 10 10 -> 0
ddxor036 xor 1 1 -> 0
ddxor040 xor 111111111 111111111111 -> 111000000000
ddxor041 xor 11111111 111111111111 -> 111100000000
ddxor042 xor 11111111 111111111 -> 100000000
ddxor043 xor 1111111 100000010 -> 101111101
ddxor044 xor 111111 100000100 -> 100111011
ddxor045 xor 11111 100001000 -> 100010111
ddxor046 xor 1111 100010000 -> 100011111
ddxor047 xor 111 100100000 -> 100100111
ddxor048 xor 11 101000000 -> 101000011
ddxor049 xor 1 110000000 -> 110000001
ddxor050 xor 1111111111 1 -> 1111111110
ddxor051 xor 111111111 1 -> 111111110
ddxor052 xor 11111111 1 -> 11111110
ddxor053 xor 1111111 1 -> 1111110
ddxor054 xor 111111 1 -> 111110
ddxor055 xor 11111 1 -> 11110
ddxor056 xor 1111 1 -> 1110
ddxor057 xor 111 1 -> 110
ddxor058 xor 11 1 -> 10
ddxor059 xor 1 1 -> 0
ddxor060 xor 1111111111 0 -> 1111111111
ddxor061 xor 111111111 0 -> 111111111
ddxor062 xor 11111111 0 -> 11111111
ddxor063 xor 1111111 0 -> 1111111
ddxor064 xor 111111 0 -> 111111
ddxor065 xor 11111 0 -> 11111
ddxor066 xor 1111 0 -> 1111
ddxor067 xor 111 0 -> 111
ddxor068 xor 11 0 -> 11
ddxor069 xor 1 0 -> 1
ddxor070 xor 1 1111111111 -> 1111111110
ddxor071 xor 1 111111111 -> 111111110
ddxor072 xor 1 11111111 -> 11111110
ddxor073 xor 1 1111111 -> 1111110
ddxor074 xor 1 111111 -> 111110
ddxor075 xor 1 11111 -> 11110
ddxor076 xor 1 1111 -> 1110
ddxor077 xor 1 111 -> 110
ddxor078 xor 1 11 -> 10
ddxor079 xor 1 1 -> 0
ddxor080 xor 0 1111111111 -> 1111111111
ddxor081 xor 0 111111111 -> 111111111
ddxor082 xor 0 11111111 -> 11111111
ddxor083 xor 0 1111111 -> 1111111
ddxor084 xor 0 111111 -> 111111
ddxor085 xor 0 11111 -> 11111
ddxor086 xor 0 1111 -> 1111
ddxor087 xor 0 111 -> 111
ddxor088 xor 0 11 -> 11
ddxor089 xor 0 1 -> 1
ddxor090 xor 011111111 111101111 -> 100010000
ddxor091 xor 101111111 111101111 -> 10010000
ddxor092 xor 110111111 111101111 -> 1010000
ddxor093 xor 111011111 111101111 -> 110000
ddxor094 xor 111101111 111101111 -> 0
ddxor095 xor 111110111 111101111 -> 11000
ddxor096 xor 111111011 111101111 -> 10100
ddxor097 xor 111111101 111101111 -> 10010
ddxor098 xor 111111110 111101111 -> 10001
ddxor100 xor 111101111 011111111 -> 100010000
ddxor101 xor 111101111 101111111 -> 10010000
ddxor102 xor 111101111 110111111 -> 1010000
ddxor103 xor 111101111 111011111 -> 110000
ddxor104 xor 111101111 111101111 -> 0
ddxor105 xor 111101111 111110111 -> 11000
ddxor106 xor 111101111 111111011 -> 10100
ddxor107 xor 111101111 111111101 -> 10010
ddxor108 xor 111101111 111111110 -> 10001
-- non-0/1 should not be accepted, nor should signs
ddxor220 xor 111111112 111111111 -> NaN Invalid_operation
ddxor221 xor 333333333 333333333 -> NaN Invalid_operation
ddxor222 xor 555555555 555555555 -> NaN Invalid_operation
ddxor223 xor 777777777 777777777 -> NaN Invalid_operation
ddxor224 xor 999999999 999999999 -> NaN Invalid_operation
ddxor225 xor 222222222 999999999 -> NaN Invalid_operation
ddxor226 xor 444444444 999999999 -> NaN Invalid_operation
ddxor227 xor 666666666 999999999 -> NaN Invalid_operation
ddxor228 xor 888888888 999999999 -> NaN Invalid_operation
ddxor229 xor 999999999 222222222 -> NaN Invalid_operation
ddxor230 xor 999999999 444444444 -> NaN Invalid_operation
ddxor231 xor 999999999 666666666 -> NaN Invalid_operation
ddxor232 xor 999999999 888888888 -> NaN Invalid_operation
-- a few randoms
ddxor240 xor 567468689 -934981942 -> NaN Invalid_operation
ddxor241 xor 567367689 934981942 -> NaN Invalid_operation
ddxor242 xor -631917772 -706014634 -> NaN Invalid_operation
ddxor243 xor -756253257 138579234 -> NaN Invalid_operation
ddxor244 xor 835590149 567435400 -> NaN Invalid_operation
-- test MSD
ddxor250 xor 2000000000000000 1000000000000000 -> NaN Invalid_operation
ddxor251 xor 7000000000000000 1000000000000000 -> NaN Invalid_operation
ddxor252 xor 8000000000000000 1000000000000000 -> NaN Invalid_operation
ddxor253 xor 9000000000000000 1000000000000000 -> NaN Invalid_operation
ddxor254 xor 2000000000000000 0000000000000000 -> NaN Invalid_operation
ddxor255 xor 7000000000000000 0000000000000000 -> NaN Invalid_operation
ddxor256 xor 8000000000000000 0000000000000000 -> NaN Invalid_operation
ddxor257 xor 9000000000000000 0000000000000000 -> NaN Invalid_operation
ddxor258 xor 1000000000000000 2000000000000000 -> NaN Invalid_operation
ddxor259 xor 1000000000000000 7000000000000000 -> NaN Invalid_operation
ddxor260 xor 1000000000000000 8000000000000000 -> NaN Invalid_operation
ddxor261 xor 1000000000000000 9000000000000000 -> NaN Invalid_operation
ddxor262 xor 0000000000000000 2000000000000000 -> NaN Invalid_operation
ddxor263 xor 0000000000000000 7000000000000000 -> NaN Invalid_operation
ddxor264 xor 0000000000000000 8000000000000000 -> NaN Invalid_operation
ddxor265 xor 0000000000000000 9000000000000000 -> NaN Invalid_operation
-- test MSD-1
ddxor270 xor 0200001000000000 1000100000000010 -> NaN Invalid_operation
ddxor271 xor 0700000100000000 1000010000000100 -> NaN Invalid_operation
ddxor272 xor 0800000010000000 1000001000001000 -> NaN Invalid_operation
ddxor273 xor 0900000001000000 1000000100010000 -> NaN Invalid_operation
ddxor274 xor 1000000000100000 0200000010100000 -> NaN Invalid_operation
ddxor275 xor 1000000000010000 0700000001000000 -> NaN Invalid_operation
ddxor276 xor 1000000000001000 0800000010100000 -> NaN Invalid_operation
ddxor277 xor 1000000000000100 0900000000010000 -> NaN Invalid_operation
-- test LSD
ddxor280 xor 0010000000000002 1000000100000001 -> NaN Invalid_operation
ddxor281 xor 0001000000000007 1000001000000011 -> NaN Invalid_operation
ddxor282 xor 0000100000000008 1000010000000001 -> NaN Invalid_operation
ddxor283 xor 0000010000000009 1000100000000001 -> NaN Invalid_operation
ddxor284 xor 1000001000000000 0001000000000002 -> NaN Invalid_operation
ddxor285 xor 1000000100000000 0010000000000007 -> NaN Invalid_operation
ddxor286 xor 1000000010000000 0100000000000008 -> NaN Invalid_operation
ddxor287 xor 1000000001000000 1000000000000009 -> NaN Invalid_operation
-- test Middie
ddxor288 xor 0010000020000000 1000001000000000 -> NaN Invalid_operation
ddxor289 xor 0001000070000001 1000000100000000 -> NaN Invalid_operation
ddxor290 xor 0000100080000010 1000000010000000 -> NaN Invalid_operation
ddxor291 xor 0000010090000100 1000000001000000 -> NaN Invalid_operation
ddxor292 xor 1000001000001000 0000000020100000 -> NaN Invalid_operation
ddxor293 xor 1000000100010000 0000000070010000 -> NaN Invalid_operation
ddxor294 xor 1000000010100000 0000000080001000 -> NaN Invalid_operation
ddxor295 xor 1000000001000000 0000000090000100 -> NaN Invalid_operation
-- signs
ddxor296 xor -1000000001000000 -0000010000000100 -> NaN Invalid_operation
ddxor297 xor -1000000001000000 0000000010000100 -> NaN Invalid_operation
ddxor298 xor 1000000001000000 -0000001000000100 -> NaN Invalid_operation
ddxor299 xor 1000000001000000 0000000011000100 -> 1000000010000100
-- Nmax, Nmin, Ntiny-like
ddxor331 xor 2 9.99999999E+299 -> NaN Invalid_operation
ddxor332 xor 3 1E-299 -> NaN Invalid_operation
ddxor333 xor 4 1.00000000E-299 -> NaN Invalid_operation
ddxor334 xor 5 1E-200 -> NaN Invalid_operation
ddxor335 xor 6 -1E-200 -> NaN Invalid_operation
ddxor336 xor 7 -1.00000000E-299 -> NaN Invalid_operation
ddxor337 xor 8 -1E-299 -> NaN Invalid_operation
ddxor338 xor 9 -9.99999999E+299 -> NaN Invalid_operation
ddxor341 xor 9.99999999E+299 -18 -> NaN Invalid_operation
ddxor342 xor 1E-299 01 -> NaN Invalid_operation
ddxor343 xor 1.00000000E-299 -18 -> NaN Invalid_operation
ddxor344 xor 1E-208 18 -> NaN Invalid_operation
ddxor345 xor -1E-207 -10 -> NaN Invalid_operation
ddxor346 xor -1.00000000E-299 18 -> NaN Invalid_operation
ddxor347 xor -1E-299 10 -> NaN Invalid_operation
ddxor348 xor -9.99999999E+299 -18 -> NaN Invalid_operation
-- A few other non-integers
ddxor361 xor 1.0 1 -> NaN Invalid_operation
ddxor362 xor 1E+1 1 -> NaN Invalid_operation
ddxor363 xor 0.0 1 -> NaN Invalid_operation
ddxor364 xor 0E+1 1 -> NaN Invalid_operation
ddxor365 xor 9.9 1 -> NaN Invalid_operation
ddxor366 xor 9E+1 1 -> NaN Invalid_operation
ddxor371 xor 0 1.0 -> NaN Invalid_operation
ddxor372 xor 0 1E+1 -> NaN Invalid_operation
ddxor373 xor 0 0.0 -> NaN Invalid_operation
ddxor374 xor 0 0E+1 -> NaN Invalid_operation
ddxor375 xor 0 9.9 -> NaN Invalid_operation
ddxor376 xor 0 9E+1 -> NaN Invalid_operation
-- All Specials are in error
ddxor780 xor -Inf -Inf -> NaN Invalid_operation
ddxor781 xor -Inf -1000 -> NaN Invalid_operation
ddxor782 xor -Inf -1 -> NaN Invalid_operation
ddxor783 xor -Inf -0 -> NaN Invalid_operation
ddxor784 xor -Inf 0 -> NaN Invalid_operation
ddxor785 xor -Inf 1 -> NaN Invalid_operation
ddxor786 xor -Inf 1000 -> NaN Invalid_operation
ddxor787 xor -1000 -Inf -> NaN Invalid_operation
ddxor788 xor -Inf -Inf -> NaN Invalid_operation
ddxor789 xor -1 -Inf -> NaN Invalid_operation
ddxor790 xor -0 -Inf -> NaN Invalid_operation
ddxor791 xor 0 -Inf -> NaN Invalid_operation
ddxor792 xor 1 -Inf -> NaN Invalid_operation
ddxor793 xor 1000 -Inf -> NaN Invalid_operation
ddxor794 xor Inf -Inf -> NaN Invalid_operation
ddxor800 xor Inf -Inf -> NaN Invalid_operation
ddxor801 xor Inf -1000 -> NaN Invalid_operation
ddxor802 xor Inf -1 -> NaN Invalid_operation
ddxor803 xor Inf -0 -> NaN Invalid_operation
ddxor804 xor Inf 0 -> NaN Invalid_operation
ddxor805 xor Inf 1 -> NaN Invalid_operation
ddxor806 xor Inf 1000 -> NaN Invalid_operation
ddxor807 xor Inf Inf -> NaN Invalid_operation
ddxor808 xor -1000 Inf -> NaN Invalid_operation
ddxor809 xor -Inf Inf -> NaN Invalid_operation
ddxor810 xor -1 Inf -> NaN Invalid_operation
ddxor811 xor -0 Inf -> NaN Invalid_operation
ddxor812 xor 0 Inf -> NaN Invalid_operation
ddxor813 xor 1 Inf -> NaN Invalid_operation
ddxor814 xor 1000 Inf -> NaN Invalid_operation
ddxor815 xor Inf Inf -> NaN Invalid_operation
ddxor821 xor NaN -Inf -> NaN Invalid_operation
ddxor822 xor NaN -1000 -> NaN Invalid_operation
ddxor823 xor NaN -1 -> NaN Invalid_operation
ddxor824 xor NaN -0 -> NaN Invalid_operation
ddxor825 xor NaN 0 -> NaN Invalid_operation
ddxor826 xor NaN 1 -> NaN Invalid_operation
ddxor827 xor NaN 1000 -> NaN Invalid_operation
ddxor828 xor NaN Inf -> NaN Invalid_operation
ddxor829 xor NaN NaN -> NaN Invalid_operation
ddxor830 xor -Inf NaN -> NaN Invalid_operation
ddxor831 xor -1000 NaN -> NaN Invalid_operation
ddxor832 xor -1 NaN -> NaN Invalid_operation
ddxor833 xor -0 NaN -> NaN Invalid_operation
ddxor834 xor 0 NaN -> NaN Invalid_operation
ddxor835 xor 1 NaN -> NaN Invalid_operation
ddxor836 xor 1000 NaN -> NaN Invalid_operation
ddxor837 xor Inf NaN -> NaN Invalid_operation
ddxor841 xor sNaN -Inf -> NaN Invalid_operation
ddxor842 xor sNaN -1000 -> NaN Invalid_operation
ddxor843 xor sNaN -1 -> NaN Invalid_operation
ddxor844 xor sNaN -0 -> NaN Invalid_operation
ddxor845 xor sNaN 0 -> NaN Invalid_operation
ddxor846 xor sNaN 1 -> NaN Invalid_operation
ddxor847 xor sNaN 1000 -> NaN Invalid_operation
ddxor848 xor sNaN NaN -> NaN Invalid_operation
ddxor849 xor sNaN sNaN -> NaN Invalid_operation
ddxor850 xor NaN sNaN -> NaN Invalid_operation
ddxor851 xor -Inf sNaN -> NaN Invalid_operation
ddxor852 xor -1000 sNaN -> NaN Invalid_operation
ddxor853 xor -1 sNaN -> NaN Invalid_operation
ddxor854 xor -0 sNaN -> NaN Invalid_operation
ddxor855 xor 0 sNaN -> NaN Invalid_operation
ddxor856 xor 1 sNaN -> NaN Invalid_operation
ddxor857 xor 1000 sNaN -> NaN Invalid_operation
ddxor858 xor Inf sNaN -> NaN Invalid_operation
ddxor859 xor NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
ddxor861 xor NaN1 -Inf -> NaN Invalid_operation
ddxor862 xor +NaN2 -1000 -> NaN Invalid_operation
ddxor863 xor NaN3 1000 -> NaN Invalid_operation
ddxor864 xor NaN4 Inf -> NaN Invalid_operation
ddxor865 xor NaN5 +NaN6 -> NaN Invalid_operation
ddxor866 xor -Inf NaN7 -> NaN Invalid_operation
ddxor867 xor -1000 NaN8 -> NaN Invalid_operation
ddxor868 xor 1000 NaN9 -> NaN Invalid_operation
ddxor869 xor Inf +NaN10 -> NaN Invalid_operation
ddxor871 xor sNaN11 -Inf -> NaN Invalid_operation
ddxor872 xor sNaN12 -1000 -> NaN Invalid_operation
ddxor873 xor sNaN13 1000 -> NaN Invalid_operation
ddxor874 xor sNaN14 NaN17 -> NaN Invalid_operation
ddxor875 xor sNaN15 sNaN18 -> NaN Invalid_operation
ddxor876 xor NaN16 sNaN19 -> NaN Invalid_operation
ddxor877 xor -Inf +sNaN20 -> NaN Invalid_operation
ddxor878 xor -1000 sNaN21 -> NaN Invalid_operation
ddxor879 xor 1000 sNaN22 -> NaN Invalid_operation
ddxor880 xor Inf sNaN23 -> NaN Invalid_operation
ddxor881 xor +NaN25 +sNaN24 -> NaN Invalid_operation
ddxor882 xor -NaN26 NaN28 -> NaN Invalid_operation
ddxor883 xor -sNaN27 sNaN29 -> NaN Invalid_operation
ddxor884 xor 1000 -NaN30 -> NaN Invalid_operation
ddxor885 xor 1000 -sNaN31 -> NaN Invalid_operation
------------------------------------------------------------------------
-- ddXor.decTest -- digitwise logical XOR 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)
ddxor001 xor 0 0 -> 0
ddxor002 xor 0 1 -> 1
ddxor003 xor 1 0 -> 1
ddxor004 xor 1 1 -> 0
ddxor005 xor 1100 1010 -> 110
-- and at msd and msd-1
ddxor006 xor 0000000000000000 0000000000000000 -> 0
ddxor007 xor 0000000000000000 1000000000000000 -> 1000000000000000
ddxor008 xor 1000000000000000 0000000000000000 -> 1000000000000000
ddxor009 xor 1000000000000000 1000000000000000 -> 0
ddxor010 xor 0000000000000000 0000000000000000 -> 0
ddxor011 xor 0000000000000000 0100000000000000 -> 100000000000000
ddxor012 xor 0100000000000000 0000000000000000 -> 100000000000000
ddxor013 xor 0100000000000000 0100000000000000 -> 0
-- Various lengths
-- 1234567890123456 1234567890123456 1234567890123456
ddxor021 xor 1111111110000000 1111111110000000 -> 0
ddxor022 xor 111111110000000 111111110000000 -> 0
ddxor023 xor 11111110000000 11111110000000 -> 0
ddxor024 xor 1111110000000 1111110000000 -> 0
ddxor025 xor 111110000000 111110000000 -> 0
ddxor026 xor 11110000000 11110000000 -> 0
ddxor027 xor 1110000000 1110000000 -> 0
ddxor028 xor 110000000 110000000 -> 0
ddxor029 xor 10000000 10000000 -> 0
ddxor030 xor 1000000 1000000 -> 0
ddxor031 xor 100000 100000 -> 0
ddxor032 xor 10000 10000 -> 0
ddxor033 xor 1000 1000 -> 0
ddxor034 xor 100 100 -> 0
ddxor035 xor 10 10 -> 0
ddxor036 xor 1 1 -> 0
ddxor040 xor 111111111 111111111111 -> 111000000000
ddxor041 xor 11111111 111111111111 -> 111100000000
ddxor042 xor 11111111 111111111 -> 100000000
ddxor043 xor 1111111 100000010 -> 101111101
ddxor044 xor 111111 100000100 -> 100111011
ddxor045 xor 11111 100001000 -> 100010111
ddxor046 xor 1111 100010000 -> 100011111
ddxor047 xor 111 100100000 -> 100100111
ddxor048 xor 11 101000000 -> 101000011
ddxor049 xor 1 110000000 -> 110000001
ddxor050 xor 1111111111 1 -> 1111111110
ddxor051 xor 111111111 1 -> 111111110
ddxor052 xor 11111111 1 -> 11111110
ddxor053 xor 1111111 1 -> 1111110
ddxor054 xor 111111 1 -> 111110
ddxor055 xor 11111 1 -> 11110
ddxor056 xor 1111 1 -> 1110
ddxor057 xor 111 1 -> 110
ddxor058 xor 11 1 -> 10
ddxor059 xor 1 1 -> 0
ddxor060 xor 1111111111 0 -> 1111111111
ddxor061 xor 111111111 0 -> 111111111
ddxor062 xor 11111111 0 -> 11111111
ddxor063 xor 1111111 0 -> 1111111
ddxor064 xor 111111 0 -> 111111
ddxor065 xor 11111 0 -> 11111
ddxor066 xor 1111 0 -> 1111
ddxor067 xor 111 0 -> 111
ddxor068 xor 11 0 -> 11
ddxor069 xor 1 0 -> 1
ddxor070 xor 1 1111111111 -> 1111111110
ddxor071 xor 1 111111111 -> 111111110
ddxor072 xor 1 11111111 -> 11111110
ddxor073 xor 1 1111111 -> 1111110
ddxor074 xor 1 111111 -> 111110
ddxor075 xor 1 11111 -> 11110
ddxor076 xor 1 1111 -> 1110
ddxor077 xor 1 111 -> 110
ddxor078 xor 1 11 -> 10
ddxor079 xor 1 1 -> 0
ddxor080 xor 0 1111111111 -> 1111111111
ddxor081 xor 0 111111111 -> 111111111
ddxor082 xor 0 11111111 -> 11111111
ddxor083 xor 0 1111111 -> 1111111
ddxor084 xor 0 111111 -> 111111
ddxor085 xor 0 11111 -> 11111
ddxor086 xor 0 1111 -> 1111
ddxor087 xor 0 111 -> 111
ddxor088 xor 0 11 -> 11
ddxor089 xor 0 1 -> 1
ddxor090 xor 011111111 111101111 -> 100010000
ddxor091 xor 101111111 111101111 -> 10010000
ddxor092 xor 110111111 111101111 -> 1010000
ddxor093 xor 111011111 111101111 -> 110000
ddxor094 xor 111101111 111101111 -> 0
ddxor095 xor 111110111 111101111 -> 11000
ddxor096 xor 111111011 111101111 -> 10100
ddxor097 xor 111111101 111101111 -> 10010
ddxor098 xor 111111110 111101111 -> 10001
ddxor100 xor 111101111 011111111 -> 100010000
ddxor101 xor 111101111 101111111 -> 10010000
ddxor102 xor 111101111 110111111 -> 1010000
ddxor103 xor 111101111 111011111 -> 110000
ddxor104 xor 111101111 111101111 -> 0
ddxor105 xor 111101111 111110111 -> 11000
ddxor106 xor 111101111 111111011 -> 10100
ddxor107 xor 111101111 111111101 -> 10010
ddxor108 xor 111101111 111111110 -> 10001
-- non-0/1 should not be accepted, nor should signs
ddxor220 xor 111111112 111111111 -> NaN Invalid_operation
ddxor221 xor 333333333 333333333 -> NaN Invalid_operation
ddxor222 xor 555555555 555555555 -> NaN Invalid_operation
ddxor223 xor 777777777 777777777 -> NaN Invalid_operation
ddxor224 xor 999999999 999999999 -> NaN Invalid_operation
ddxor225 xor 222222222 999999999 -> NaN Invalid_operation
ddxor226 xor 444444444 999999999 -> NaN Invalid_operation
ddxor227 xor 666666666 999999999 -> NaN Invalid_operation
ddxor228 xor 888888888 999999999 -> NaN Invalid_operation
ddxor229 xor 999999999 222222222 -> NaN Invalid_operation
ddxor230 xor 999999999 444444444 -> NaN Invalid_operation
ddxor231 xor 999999999 666666666 -> NaN Invalid_operation
ddxor232 xor 999999999 888888888 -> NaN Invalid_operation
-- a few randoms
ddxor240 xor 567468689 -934981942 -> NaN Invalid_operation
ddxor241 xor 567367689 934981942 -> NaN Invalid_operation
ddxor242 xor -631917772 -706014634 -> NaN Invalid_operation
ddxor243 xor -756253257 138579234 -> NaN Invalid_operation
ddxor244 xor 835590149 567435400 -> NaN Invalid_operation
-- test MSD
ddxor250 xor 2000000000000000 1000000000000000 -> NaN Invalid_operation
ddxor251 xor 7000000000000000 1000000000000000 -> NaN Invalid_operation
ddxor252 xor 8000000000000000 1000000000000000 -> NaN Invalid_operation
ddxor253 xor 9000000000000000 1000000000000000 -> NaN Invalid_operation
ddxor254 xor 2000000000000000 0000000000000000 -> NaN Invalid_operation
ddxor255 xor 7000000000000000 0000000000000000 -> NaN Invalid_operation
ddxor256 xor 8000000000000000 0000000000000000 -> NaN Invalid_operation
ddxor257 xor 9000000000000000 0000000000000000 -> NaN Invalid_operation
ddxor258 xor 1000000000000000 2000000000000000 -> NaN Invalid_operation
ddxor259 xor 1000000000000000 7000000000000000 -> NaN Invalid_operation
ddxor260 xor 1000000000000000 8000000000000000 -> NaN Invalid_operation
ddxor261 xor 1000000000000000 9000000000000000 -> NaN Invalid_operation
ddxor262 xor 0000000000000000 2000000000000000 -> NaN Invalid_operation
ddxor263 xor 0000000000000000 7000000000000000 -> NaN Invalid_operation
ddxor264 xor 0000000000000000 8000000000000000 -> NaN Invalid_operation
ddxor265 xor 0000000000000000 9000000000000000 -> NaN Invalid_operation
-- test MSD-1
ddxor270 xor 0200001000000000 1000100000000010 -> NaN Invalid_operation
ddxor271 xor 0700000100000000 1000010000000100 -> NaN Invalid_operation
ddxor272 xor 0800000010000000 1000001000001000 -> NaN Invalid_operation
ddxor273 xor 0900000001000000 1000000100010000 -> NaN Invalid_operation
ddxor274 xor 1000000000100000 0200000010100000 -> NaN Invalid_operation
ddxor275 xor 1000000000010000 0700000001000000 -> NaN Invalid_operation
ddxor276 xor 1000000000001000 0800000010100000 -> NaN Invalid_operation
ddxor277 xor 1000000000000100 0900000000010000 -> NaN Invalid_operation
-- test LSD
ddxor280 xor 0010000000000002 1000000100000001 -> NaN Invalid_operation
ddxor281 xor 0001000000000007 1000001000000011 -> NaN Invalid_operation
ddxor282 xor 0000100000000008 1000010000000001 -> NaN Invalid_operation
ddxor283 xor 0000010000000009 1000100000000001 -> NaN Invalid_operation
ddxor284 xor 1000001000000000 0001000000000002 -> NaN Invalid_operation
ddxor285 xor 1000000100000000 0010000000000007 -> NaN Invalid_operation
ddxor286 xor 1000000010000000 0100000000000008 -> NaN Invalid_operation
ddxor287 xor 1000000001000000 1000000000000009 -> NaN Invalid_operation
-- test Middie
ddxor288 xor 0010000020000000 1000001000000000 -> NaN Invalid_operation
ddxor289 xor 0001000070000001 1000000100000000 -> NaN Invalid_operation
ddxor290 xor 0000100080000010 1000000010000000 -> NaN Invalid_operation
ddxor291 xor 0000010090000100 1000000001000000 -> NaN Invalid_operation
ddxor292 xor 1000001000001000 0000000020100000 -> NaN Invalid_operation
ddxor293 xor 1000000100010000 0000000070010000 -> NaN Invalid_operation
ddxor294 xor 1000000010100000 0000000080001000 -> NaN Invalid_operation
ddxor295 xor 1000000001000000 0000000090000100 -> NaN Invalid_operation
-- signs
ddxor296 xor -1000000001000000 -0000010000000100 -> NaN Invalid_operation
ddxor297 xor -1000000001000000 0000000010000100 -> NaN Invalid_operation
ddxor298 xor 1000000001000000 -0000001000000100 -> NaN Invalid_operation
ddxor299 xor 1000000001000000 0000000011000100 -> 1000000010000100
-- Nmax, Nmin, Ntiny-like
ddxor331 xor 2 9.99999999E+299 -> NaN Invalid_operation
ddxor332 xor 3 1E-299 -> NaN Invalid_operation
ddxor333 xor 4 1.00000000E-299 -> NaN Invalid_operation
ddxor334 xor 5 1E-200 -> NaN Invalid_operation
ddxor335 xor 6 -1E-200 -> NaN Invalid_operation
ddxor336 xor 7 -1.00000000E-299 -> NaN Invalid_operation
ddxor337 xor 8 -1E-299 -> NaN Invalid_operation
ddxor338 xor 9 -9.99999999E+299 -> NaN Invalid_operation
ddxor341 xor 9.99999999E+299 -18 -> NaN Invalid_operation
ddxor342 xor 1E-299 01 -> NaN Invalid_operation
ddxor343 xor 1.00000000E-299 -18 -> NaN Invalid_operation
ddxor344 xor 1E-208 18 -> NaN Invalid_operation
ddxor345 xor -1E-207 -10 -> NaN Invalid_operation
ddxor346 xor -1.00000000E-299 18 -> NaN Invalid_operation
ddxor347 xor -1E-299 10 -> NaN Invalid_operation
ddxor348 xor -9.99999999E+299 -18 -> NaN Invalid_operation
-- A few other non-integers
ddxor361 xor 1.0 1 -> NaN Invalid_operation
ddxor362 xor 1E+1 1 -> NaN Invalid_operation
ddxor363 xor 0.0 1 -> NaN Invalid_operation
ddxor364 xor 0E+1 1 -> NaN Invalid_operation
ddxor365 xor 9.9 1 -> NaN Invalid_operation
ddxor366 xor 9E+1 1 -> NaN Invalid_operation
ddxor371 xor 0 1.0 -> NaN Invalid_operation
ddxor372 xor 0 1E+1 -> NaN Invalid_operation
ddxor373 xor 0 0.0 -> NaN Invalid_operation
ddxor374 xor 0 0E+1 -> NaN Invalid_operation
ddxor375 xor 0 9.9 -> NaN Invalid_operation
ddxor376 xor 0 9E+1 -> NaN Invalid_operation
-- All Specials are in error
ddxor780 xor -Inf -Inf -> NaN Invalid_operation
ddxor781 xor -Inf -1000 -> NaN Invalid_operation
ddxor782 xor -Inf -1 -> NaN Invalid_operation
ddxor783 xor -Inf -0 -> NaN Invalid_operation
ddxor784 xor -Inf 0 -> NaN Invalid_operation
ddxor785 xor -Inf 1 -> NaN Invalid_operation
ddxor786 xor -Inf 1000 -> NaN Invalid_operation
ddxor787 xor -1000 -Inf -> NaN Invalid_operation
ddxor788 xor -Inf -Inf -> NaN Invalid_operation
ddxor789 xor -1 -Inf -> NaN Invalid_operation
ddxor790 xor -0 -Inf -> NaN Invalid_operation
ddxor791 xor 0 -Inf -> NaN Invalid_operation
ddxor792 xor 1 -Inf -> NaN Invalid_operation
ddxor793 xor 1000 -Inf -> NaN Invalid_operation
ddxor794 xor Inf -Inf -> NaN Invalid_operation
ddxor800 xor Inf -Inf -> NaN Invalid_operation
ddxor801 xor Inf -1000 -> NaN Invalid_operation
ddxor802 xor Inf -1 -> NaN Invalid_operation
ddxor803 xor Inf -0 -> NaN Invalid_operation
ddxor804 xor Inf 0 -> NaN Invalid_operation
ddxor805 xor Inf 1 -> NaN Invalid_operation
ddxor806 xor Inf 1000 -> NaN Invalid_operation
ddxor807 xor Inf Inf -> NaN Invalid_operation
ddxor808 xor -1000 Inf -> NaN Invalid_operation
ddxor809 xor -Inf Inf -> NaN Invalid_operation
ddxor810 xor -1 Inf -> NaN Invalid_operation
ddxor811 xor -0 Inf -> NaN Invalid_operation
ddxor812 xor 0 Inf -> NaN Invalid_operation
ddxor813 xor 1 Inf -> NaN Invalid_operation
ddxor814 xor 1000 Inf -> NaN Invalid_operation
ddxor815 xor Inf Inf -> NaN Invalid_operation
ddxor821 xor NaN -Inf -> NaN Invalid_operation
ddxor822 xor NaN -1000 -> NaN Invalid_operation
ddxor823 xor NaN -1 -> NaN Invalid_operation
ddxor824 xor NaN -0 -> NaN Invalid_operation
ddxor825 xor NaN 0 -> NaN Invalid_operation
ddxor826 xor NaN 1 -> NaN Invalid_operation
ddxor827 xor NaN 1000 -> NaN Invalid_operation
ddxor828 xor NaN Inf -> NaN Invalid_operation
ddxor829 xor NaN NaN -> NaN Invalid_operation
ddxor830 xor -Inf NaN -> NaN Invalid_operation
ddxor831 xor -1000 NaN -> NaN Invalid_operation
ddxor832 xor -1 NaN -> NaN Invalid_operation
ddxor833 xor -0 NaN -> NaN Invalid_operation
ddxor834 xor 0 NaN -> NaN Invalid_operation
ddxor835 xor 1 NaN -> NaN Invalid_operation
ddxor836 xor 1000 NaN -> NaN Invalid_operation
ddxor837 xor Inf NaN -> NaN Invalid_operation
ddxor841 xor sNaN -Inf -> NaN Invalid_operation
ddxor842 xor sNaN -1000 -> NaN Invalid_operation
ddxor843 xor sNaN -1 -> NaN Invalid_operation
ddxor844 xor sNaN -0 -> NaN Invalid_operation
ddxor845 xor sNaN 0 -> NaN Invalid_operation
ddxor846 xor sNaN 1 -> NaN Invalid_operation
ddxor847 xor sNaN 1000 -> NaN Invalid_operation
ddxor848 xor sNaN NaN -> NaN Invalid_operation
ddxor849 xor sNaN sNaN -> NaN Invalid_operation
ddxor850 xor NaN sNaN -> NaN Invalid_operation
ddxor851 xor -Inf sNaN -> NaN Invalid_operation
ddxor852 xor -1000 sNaN -> NaN Invalid_operation
ddxor853 xor -1 sNaN -> NaN Invalid_operation
ddxor854 xor -0 sNaN -> NaN Invalid_operation
ddxor855 xor 0 sNaN -> NaN Invalid_operation
ddxor856 xor 1 sNaN -> NaN Invalid_operation
ddxor857 xor 1000 sNaN -> NaN Invalid_operation
ddxor858 xor Inf sNaN -> NaN Invalid_operation
ddxor859 xor NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
ddxor861 xor NaN1 -Inf -> NaN Invalid_operation
ddxor862 xor +NaN2 -1000 -> NaN Invalid_operation
ddxor863 xor NaN3 1000 -> NaN Invalid_operation
ddxor864 xor NaN4 Inf -> NaN Invalid_operation
ddxor865 xor NaN5 +NaN6 -> NaN Invalid_operation
ddxor866 xor -Inf NaN7 -> NaN Invalid_operation
ddxor867 xor -1000 NaN8 -> NaN Invalid_operation
ddxor868 xor 1000 NaN9 -> NaN Invalid_operation
ddxor869 xor Inf +NaN10 -> NaN Invalid_operation
ddxor871 xor sNaN11 -Inf -> NaN Invalid_operation
ddxor872 xor sNaN12 -1000 -> NaN Invalid_operation
ddxor873 xor sNaN13 1000 -> NaN Invalid_operation
ddxor874 xor sNaN14 NaN17 -> NaN Invalid_operation
ddxor875 xor sNaN15 sNaN18 -> NaN Invalid_operation
ddxor876 xor NaN16 sNaN19 -> NaN Invalid_operation
ddxor877 xor -Inf +sNaN20 -> NaN Invalid_operation
ddxor878 xor -1000 sNaN21 -> NaN Invalid_operation
ddxor879 xor 1000 sNaN22 -> NaN Invalid_operation
ddxor880 xor Inf sNaN23 -> NaN Invalid_operation
ddxor881 xor +NaN25 +sNaN24 -> NaN Invalid_operation
ddxor882 xor -NaN26 NaN28 -> NaN Invalid_operation
ddxor883 xor -sNaN27 sNaN29 -> NaN Invalid_operation
ddxor884 xor 1000 -NaN30 -> NaN Invalid_operation
ddxor885 xor 1000 -sNaN31 -> NaN Invalid_operation

View file

@ -1,126 +1,126 @@
------------------------------------------------------------------------
-- dqAbs.decTest -- decQuad 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
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
dqabs001 abs '1' -> '1'
dqabs002 abs '-1' -> '1'
dqabs003 abs '1.00' -> '1.00'
dqabs004 abs '-1.00' -> '1.00'
dqabs005 abs '0' -> '0'
dqabs006 abs '0.00' -> '0.00'
dqabs007 abs '00.0' -> '0.0'
dqabs008 abs '00.00' -> '0.00'
dqabs009 abs '00' -> '0'
dqabs010 abs '-2' -> '2'
dqabs011 abs '2' -> '2'
dqabs012 abs '-2.00' -> '2.00'
dqabs013 abs '2.00' -> '2.00'
dqabs014 abs '-0' -> '0'
dqabs015 abs '-0.00' -> '0.00'
dqabs016 abs '-00.0' -> '0.0'
dqabs017 abs '-00.00' -> '0.00'
dqabs018 abs '-00' -> '0'
dqabs020 abs '-2000000' -> '2000000'
dqabs021 abs '2000000' -> '2000000'
dqabs030 abs '+0.1' -> '0.1'
dqabs031 abs '-0.1' -> '0.1'
dqabs032 abs '+0.01' -> '0.01'
dqabs033 abs '-0.01' -> '0.01'
dqabs034 abs '+0.001' -> '0.001'
dqabs035 abs '-0.001' -> '0.001'
dqabs036 abs '+0.000001' -> '0.000001'
dqabs037 abs '-0.000001' -> '0.000001'
dqabs038 abs '+0.000000000001' -> '1E-12'
dqabs039 abs '-0.000000000001' -> '1E-12'
-- examples from decArith
dqabs040 abs '2.1' -> '2.1'
dqabs041 abs '-100' -> '100'
dqabs042 abs '101.5' -> '101.5'
dqabs043 abs '-101.5' -> '101.5'
-- more fixed, potential LHS swaps/overlays if done by subtract 0
dqabs060 abs '-56267E-10' -> '0.0000056267'
dqabs061 abs '-56267E-5' -> '0.56267'
dqabs062 abs '-56267E-2' -> '562.67'
dqabs063 abs '-56267E-1' -> '5626.7'
dqabs065 abs '-56267E-0' -> '56267'
-- subnormals and underflow
-- long operand tests
dqabs321 abs 1234567890123456 -> 1234567890123456
dqabs322 abs 12345678000 -> 12345678000
dqabs323 abs 1234567800 -> 1234567800
dqabs324 abs 1234567890 -> 1234567890
dqabs325 abs 1234567891 -> 1234567891
dqabs326 abs 12345678901 -> 12345678901
dqabs327 abs 1234567896 -> 1234567896
-- zeros
dqabs111 abs 0 -> 0
dqabs112 abs -0 -> 0
dqabs113 abs 0E+6 -> 0E+6
dqabs114 abs -0E+6 -> 0E+6
dqabs115 abs 0.0000 -> 0.0000
dqabs116 abs -0.0000 -> 0.0000
dqabs117 abs 0E-141 -> 0E-141
dqabs118 abs -0E-141 -> 0E-141
-- full coefficients, alternating bits
dqabs121 abs 2682682682682682682682682682682682 -> 2682682682682682682682682682682682
dqabs122 abs -2682682682682682682682682682682682 -> 2682682682682682682682682682682682
dqabs123 abs 1341341341341341341341341341341341 -> 1341341341341341341341341341341341
dqabs124 abs -1341341341341341341341341341341341 -> 1341341341341341341341341341341341
-- Nmax, Nmin, Ntiny
dqabs131 abs 9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144
dqabs132 abs 1E-6143 -> 1E-6143
dqabs133 abs 1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
dqabs134 abs 1E-6176 -> 1E-6176 Subnormal
dqabs135 abs -1E-6176 -> 1E-6176 Subnormal
dqabs136 abs -1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
dqabs137 abs -1E-6143 -> 1E-6143
dqabs138 abs -9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144
-- specials
dqabs520 abs 'Inf' -> 'Infinity'
dqabs521 abs '-Inf' -> 'Infinity'
dqabs522 abs NaN -> NaN
dqabs523 abs sNaN -> NaN Invalid_operation
dqabs524 abs NaN22 -> NaN22
dqabs525 abs sNaN33 -> NaN33 Invalid_operation
dqabs526 abs -NaN22 -> -NaN22
dqabs527 abs -sNaN33 -> -NaN33 Invalid_operation
-- Null tests
dqabs900 abs # -> NaN Invalid_operation
------------------------------------------------------------------------
-- dqAbs.decTest -- decQuad 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
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
dqabs001 abs '1' -> '1'
dqabs002 abs '-1' -> '1'
dqabs003 abs '1.00' -> '1.00'
dqabs004 abs '-1.00' -> '1.00'
dqabs005 abs '0' -> '0'
dqabs006 abs '0.00' -> '0.00'
dqabs007 abs '00.0' -> '0.0'
dqabs008 abs '00.00' -> '0.00'
dqabs009 abs '00' -> '0'
dqabs010 abs '-2' -> '2'
dqabs011 abs '2' -> '2'
dqabs012 abs '-2.00' -> '2.00'
dqabs013 abs '2.00' -> '2.00'
dqabs014 abs '-0' -> '0'
dqabs015 abs '-0.00' -> '0.00'
dqabs016 abs '-00.0' -> '0.0'
dqabs017 abs '-00.00' -> '0.00'
dqabs018 abs '-00' -> '0'
dqabs020 abs '-2000000' -> '2000000'
dqabs021 abs '2000000' -> '2000000'
dqabs030 abs '+0.1' -> '0.1'
dqabs031 abs '-0.1' -> '0.1'
dqabs032 abs '+0.01' -> '0.01'
dqabs033 abs '-0.01' -> '0.01'
dqabs034 abs '+0.001' -> '0.001'
dqabs035 abs '-0.001' -> '0.001'
dqabs036 abs '+0.000001' -> '0.000001'
dqabs037 abs '-0.000001' -> '0.000001'
dqabs038 abs '+0.000000000001' -> '1E-12'
dqabs039 abs '-0.000000000001' -> '1E-12'
-- examples from decArith
dqabs040 abs '2.1' -> '2.1'
dqabs041 abs '-100' -> '100'
dqabs042 abs '101.5' -> '101.5'
dqabs043 abs '-101.5' -> '101.5'
-- more fixed, potential LHS swaps/overlays if done by subtract 0
dqabs060 abs '-56267E-10' -> '0.0000056267'
dqabs061 abs '-56267E-5' -> '0.56267'
dqabs062 abs '-56267E-2' -> '562.67'
dqabs063 abs '-56267E-1' -> '5626.7'
dqabs065 abs '-56267E-0' -> '56267'
-- subnormals and underflow
-- long operand tests
dqabs321 abs 1234567890123456 -> 1234567890123456
dqabs322 abs 12345678000 -> 12345678000
dqabs323 abs 1234567800 -> 1234567800
dqabs324 abs 1234567890 -> 1234567890
dqabs325 abs 1234567891 -> 1234567891
dqabs326 abs 12345678901 -> 12345678901
dqabs327 abs 1234567896 -> 1234567896
-- zeros
dqabs111 abs 0 -> 0
dqabs112 abs -0 -> 0
dqabs113 abs 0E+6 -> 0E+6
dqabs114 abs -0E+6 -> 0E+6
dqabs115 abs 0.0000 -> 0.0000
dqabs116 abs -0.0000 -> 0.0000
dqabs117 abs 0E-141 -> 0E-141
dqabs118 abs -0E-141 -> 0E-141
-- full coefficients, alternating bits
dqabs121 abs 2682682682682682682682682682682682 -> 2682682682682682682682682682682682
dqabs122 abs -2682682682682682682682682682682682 -> 2682682682682682682682682682682682
dqabs123 abs 1341341341341341341341341341341341 -> 1341341341341341341341341341341341
dqabs124 abs -1341341341341341341341341341341341 -> 1341341341341341341341341341341341
-- Nmax, Nmin, Ntiny
dqabs131 abs 9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144
dqabs132 abs 1E-6143 -> 1E-6143
dqabs133 abs 1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
dqabs134 abs 1E-6176 -> 1E-6176 Subnormal
dqabs135 abs -1E-6176 -> 1E-6176 Subnormal
dqabs136 abs -1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
dqabs137 abs -1E-6143 -> 1E-6143
dqabs138 abs -9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144
-- specials
dqabs520 abs 'Inf' -> 'Infinity'
dqabs521 abs '-Inf' -> 'Infinity'
dqabs522 abs NaN -> NaN
dqabs523 abs sNaN -> NaN Invalid_operation
dqabs524 abs NaN22 -> NaN22
dqabs525 abs sNaN33 -> NaN33 Invalid_operation
dqabs526 abs -NaN22 -> -NaN22
dqabs527 abs -sNaN33 -> -NaN33 Invalid_operation
-- Null tests
dqabs900 abs # -> NaN Invalid_operation

File diff suppressed because it is too large Load diff

View file

@ -1,420 +1,420 @@
------------------------------------------------------------------------
-- dqAnd.decTest -- digitwise logical AND for decQuads --
-- 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
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check (truth table)
dqand001 and 0 0 -> 0
dqand002 and 0 1 -> 0
dqand003 and 1 0 -> 0
dqand004 and 1 1 -> 1
dqand005 and 1100 1010 -> 1000
-- and at msd and msd-1
-- 1234567890123456789012345678901234
dqand006 and 0000000000000000000000000000000000 0000000000000000000000000000000000 -> 0
dqand007 and 0000000000000000000000000000000000 1000000000000000000000000000000000 -> 0
dqand008 and 1000000000000000000000000000000000 0000000000000000000000000000000000 -> 0
dqand009 and 1000000000000000000000000000000000 1000000000000000000000000000000000 -> 1000000000000000000000000000000000
dqand010 and 0000000000000000000000000000000000 0000000000000000000000000000000000 -> 0
dqand011 and 0000000000000000000000000000000000 0100000000000000000000000000000000 -> 0
dqand012 and 0100000000000000000000000000000000 0000000000000000000000000000000000 -> 0
dqand013 and 0100000000000000000000000000000000 0100000000000000000000000000000000 -> 100000000000000000000000000000000
-- Various lengths
-- 1234567890123456789012345678901234
dqand601 and 0111111111111111111111111111111111 1111111111111111111111111111111111 -> 111111111111111111111111111111111
dqand602 and 1011111111111111111111111111111111 1111111111111111111111111111111111 -> 1011111111111111111111111111111111
dqand603 and 1101111111111111111111111111111111 1111111111111111111111111111111111 -> 1101111111111111111111111111111111
dqand604 and 1110111111111111111111111111111111 1111111111111111111111111111111111 -> 1110111111111111111111111111111111
dqand605 and 1111011111111111111111111111111111 1111111111111111111111111111111111 -> 1111011111111111111111111111111111
dqand606 and 1111101111111111111111111111111111 1111111111111111111111111111111111 -> 1111101111111111111111111111111111
dqand607 and 1111110111111111111111111111111111 1111111111111111111111111111111111 -> 1111110111111111111111111111111111
dqand608 and 1111111011111111111111111111111111 1111111111111111111111111111111111 -> 1111111011111111111111111111111111
dqand609 and 1111111101111111111111111111111111 1111111111111111111111111111111111 -> 1111111101111111111111111111111111
dqand610 and 1111111110111111111111111111111111 1111111111111111111111111111111111 -> 1111111110111111111111111111111111
dqand611 and 1111111111011111111111111111111111 1111111111111111111111111111111111 -> 1111111111011111111111111111111111
dqand612 and 1111111111101111111111111111111111 1111111111111111111111111111111111 -> 1111111111101111111111111111111111
dqand613 and 1111111111110111111111111111111111 1111111111111111111111111111111111 -> 1111111111110111111111111111111111
dqand614 and 1111111111111011111111111111111111 1111111111111111111111111111111111 -> 1111111111111011111111111111111111
dqand615 and 1111111111111101111111111111111111 1111111111111111111111111111111111 -> 1111111111111101111111111111111111
dqand616 and 1111111111111110111111111111111111 1111111111111111111111111111111111 -> 1111111111111110111111111111111111
dqand617 and 1111111111111111011111111111111111 1111111111111111111111111111111111 -> 1111111111111111011111111111111111
dqand618 and 1111111111111111101111111111111111 1111111111111111111111111111111111 -> 1111111111111111101111111111111111
dqand619 and 1111111111111111110111111111111111 1111111111111111111111111111111111 -> 1111111111111111110111111111111111
dqand620 and 1111111111111111111011111111111111 1111111111111111111111111111111111 -> 1111111111111111111011111111111111
dqand621 and 1111111111111111111101111111111111 1111111111111111111111111111111111 -> 1111111111111111111101111111111111
dqand622 and 1111111111111111111110111111111111 1111111111111111111111111111111111 -> 1111111111111111111110111111111111
dqand623 and 1111111111111111111111011111111111 1111111111111111111111111111111111 -> 1111111111111111111111011111111111
dqand624 and 1111111111111111111111101111111111 1111111111111111111111111111111111 -> 1111111111111111111111101111111111
dqand625 and 1111111111111111111111110111111111 1111111111111111111111111111111111 -> 1111111111111111111111110111111111
dqand626 and 1111111111111111111111111011111111 1111111111111111111111111111111111 -> 1111111111111111111111111011111111
dqand627 and 1111111111111111111111111101111111 1111111111111111111111111111111111 -> 1111111111111111111111111101111111
dqand628 and 1111111111111111111111111110111111 1111111111111111111111111111111111 -> 1111111111111111111111111110111111
dqand629 and 1111111111111111111111111111011111 1111111111111111111111111111111111 -> 1111111111111111111111111111011111
dqand630 and 1111111111111111111111111111101111 1111111111111111111111111111111111 -> 1111111111111111111111111111101111
dqand631 and 1111111111111111111111111111110111 1111111111111111111111111111111111 -> 1111111111111111111111111111110111
dqand632 and 1111111111111111111111111111111011 1111111111111111111111111111111111 -> 1111111111111111111111111111111011
dqand633 and 1111111111111111111111111111111101 1111111111111111111111111111111111 -> 1111111111111111111111111111111101
dqand634 and 1111111111111111111111111111111110 1111111111111111111111111111111111 -> 1111111111111111111111111111111110
dqand641 and 1111111111111111111111111111111111 0111111111111111111111111111111111 -> 111111111111111111111111111111111
dqand642 and 1111111111111111111111111111111111 1011111111111111111111111111111111 -> 1011111111111111111111111111111111
dqand643 and 1111111111111111111111111111111111 1101111111111111111111111111111111 -> 1101111111111111111111111111111111
dqand644 and 1111111111111111111111111111111111 1110111111111111111111111111111111 -> 1110111111111111111111111111111111
dqand645 and 1111111111111111111111111111111111 1111011111111111111111111111111111 -> 1111011111111111111111111111111111
dqand646 and 1111111111111111111111111111111111 1111101111111111111111111111111111 -> 1111101111111111111111111111111111
dqand647 and 1111111111111111111111111111111111 1111110111111111111111111111111111 -> 1111110111111111111111111111111111
dqand648 and 1111111111111111111111111111111111 1111111011111111111111111111111111 -> 1111111011111111111111111111111111
dqand649 and 1111111111111111111111111111111111 1111111101111111111111111111111111 -> 1111111101111111111111111111111111
dqand650 and 1111111111111111111111111111111111 1111111110111111111111111111111111 -> 1111111110111111111111111111111111
dqand651 and 1111111111111111111111111111111111 1111111111011111111111111111111111 -> 1111111111011111111111111111111111
dqand652 and 1111111111111111111111111111111111 1111111111101111111111111111111111 -> 1111111111101111111111111111111111
dqand653 and 1111111111111111111111111111111111 1111111111110111111111111111111111 -> 1111111111110111111111111111111111
dqand654 and 1111111111111111111111111111111111 1111111111111011111111111111111111 -> 1111111111111011111111111111111111
dqand655 and 1111111111111111111111111111111111 1111111111111101111111111111111111 -> 1111111111111101111111111111111111
dqand656 and 1111111111111111111111111111111111 1111111111111110111111111111111111 -> 1111111111111110111111111111111111
dqand657 and 1111111111111111111111111111111111 1111111111111111011111111111111111 -> 1111111111111111011111111111111111
dqand658 and 1111111111111111111111111111111111 1111111111111111101111111111111111 -> 1111111111111111101111111111111111
dqand659 and 1111111111111111111111111111111111 1111111111111111110111111111111111 -> 1111111111111111110111111111111111
dqand660 and 1111111111111111111111111111111111 1111111111111111111011111111111111 -> 1111111111111111111011111111111111
dqand661 and 1111111111111111111111111111111111 1111111111111111111101111111111111 -> 1111111111111111111101111111111111
dqand662 and 1111111111111111111111111111111111 1111111111111111111110111111111111 -> 1111111111111111111110111111111111
dqand663 and 1111111111111111111111111111111111 1111111111111111111111011111111111 -> 1111111111111111111111011111111111
dqand664 and 1111111111111111111111111111111111 1111111111111111111111101111111111 -> 1111111111111111111111101111111111
dqand665 and 1111111111111111111111111111111111 1111111111111111111111110111111111 -> 1111111111111111111111110111111111
dqand666 and 1111111111111111111111111111111111 1111111111111111111111111011111111 -> 1111111111111111111111111011111111
dqand667 and 1111111111111111111111111111111111 1111111111111111111111111101111111 -> 1111111111111111111111111101111111
dqand668 and 1111111111111111111111111111111111 1111111111111111111111111110111111 -> 1111111111111111111111111110111111
dqand669 and 1111111111111111111111111111111111 1111111111111111111111111111011111 -> 1111111111111111111111111111011111
dqand670 and 1111111111111111111111111111111111 1111111111111111111111111111101111 -> 1111111111111111111111111111101111
dqand671 and 1111111111111111111111111111111111 1111111111111111111111111111110111 -> 1111111111111111111111111111110111
dqand672 and 1111111111111111111111111111111111 1111111111111111111111111111111011 -> 1111111111111111111111111111111011
dqand673 and 1111111111111111111111111111111111 1111111111111111111111111111111101 -> 1111111111111111111111111111111101
dqand674 and 1111111111111111111111111111111111 1111111111111111111111111111111110 -> 1111111111111111111111111111111110
dqand675 and 0111111111111111111111111111111111 1111111111111111111111111111111110 -> 111111111111111111111111111111110
dqand676 and 1111111111111111111111111111111111 1111111111111111111111111111111110 -> 1111111111111111111111111111111110
dqand021 and 1111111111111111 1111111111111111 -> 1111111111111111
dqand024 and 1111111111111111 111111111111111 -> 111111111111111
dqand025 and 1111111111111111 11111111111111 -> 11111111111111
dqand026 and 1111111111111111 1111111111111 -> 1111111111111
dqand027 and 1111111111111111 111111111111 -> 111111111111
dqand028 and 1111111111111111 11111111111 -> 11111111111
dqand029 and 1111111111111111 1111111111 -> 1111111111
dqand030 and 1111111111111111 111111111 -> 111111111
dqand031 and 1111111111111111 11111111 -> 11111111
dqand032 and 1111111111111111 1111111 -> 1111111
dqand033 and 1111111111111111 111111 -> 111111
dqand034 and 1111111111111111 11111 -> 11111
dqand035 and 1111111111111111 1111 -> 1111
dqand036 and 1111111111111111 111 -> 111
dqand037 and 1111111111111111 11 -> 11
dqand038 and 1111111111111111 1 -> 1
dqand039 and 1111111111111111 0 -> 0
dqand040 and 1111111111111111 1111111111111111 -> 1111111111111111
dqand041 and 111111111111111 1111111111111111 -> 111111111111111
dqand042 and 111111111111111 1111111111111111 -> 111111111111111
dqand043 and 11111111111111 1111111111111111 -> 11111111111111
dqand044 and 1111111111111 1111111111111111 -> 1111111111111
dqand045 and 111111111111 1111111111111111 -> 111111111111
dqand046 and 11111111111 1111111111111111 -> 11111111111
dqand047 and 1111111111 1111111111111111 -> 1111111111
dqand048 and 111111111 1111111111111111 -> 111111111
dqand049 and 11111111 1111111111111111 -> 11111111
dqand050 and 1111111 1111111111111111 -> 1111111
dqand051 and 111111 1111111111111111 -> 111111
dqand052 and 11111 1111111111111111 -> 11111
dqand053 and 1111 1111111111111111 -> 1111
dqand054 and 111 1111111111111111 -> 111
dqand055 and 11 1111111111111111 -> 11
dqand056 and 1 1111111111111111 -> 1
dqand057 and 0 1111111111111111 -> 0
dqand150 and 1111111111 1 -> 1
dqand151 and 111111111 1 -> 1
dqand152 and 11111111 1 -> 1
dqand153 and 1111111 1 -> 1
dqand154 and 111111 1 -> 1
dqand155 and 11111 1 -> 1
dqand156 and 1111 1 -> 1
dqand157 and 111 1 -> 1
dqand158 and 11 1 -> 1
dqand159 and 1 1 -> 1
dqand160 and 1111111111 0 -> 0
dqand161 and 111111111 0 -> 0
dqand162 and 11111111 0 -> 0
dqand163 and 1111111 0 -> 0
dqand164 and 111111 0 -> 0
dqand165 and 11111 0 -> 0
dqand166 and 1111 0 -> 0
dqand167 and 111 0 -> 0
dqand168 and 11 0 -> 0
dqand169 and 1 0 -> 0
dqand170 and 1 1111111111 -> 1
dqand171 and 1 111111111 -> 1
dqand172 and 1 11111111 -> 1
dqand173 and 1 1111111 -> 1
dqand174 and 1 111111 -> 1
dqand175 and 1 11111 -> 1
dqand176 and 1 1111 -> 1
dqand177 and 1 111 -> 1
dqand178 and 1 11 -> 1
dqand179 and 1 1 -> 1
dqand180 and 0 1111111111 -> 0
dqand181 and 0 111111111 -> 0
dqand182 and 0 11111111 -> 0
dqand183 and 0 1111111 -> 0
dqand184 and 0 111111 -> 0
dqand185 and 0 11111 -> 0
dqand186 and 0 1111 -> 0
dqand187 and 0 111 -> 0
dqand188 and 0 11 -> 0
dqand189 and 0 1 -> 0
dqand090 and 011111111 111111111 -> 11111111
dqand091 and 101111111 111111111 -> 101111111
dqand092 and 110111111 111111111 -> 110111111
dqand093 and 111011111 111111111 -> 111011111
dqand094 and 111101111 111111111 -> 111101111
dqand095 and 111110111 111111111 -> 111110111
dqand096 and 111111011 111111111 -> 111111011
dqand097 and 111111101 111111111 -> 111111101
dqand098 and 111111110 111111111 -> 111111110
dqand100 and 111111111 011111111 -> 11111111
dqand101 and 111111111 101111111 -> 101111111
dqand102 and 111111111 110111111 -> 110111111
dqand103 and 111111111 111011111 -> 111011111
dqand104 and 111111111 111101111 -> 111101111
dqand105 and 111111111 111110111 -> 111110111
dqand106 and 111111111 111111011 -> 111111011
dqand107 and 111111111 111111101 -> 111111101
dqand108 and 111111111 111111110 -> 111111110
-- non-0/1 should not be accepted, nor should signs
dqand220 and 111111112 111111111 -> NaN Invalid_operation
dqand221 and 333333333 333333333 -> NaN Invalid_operation
dqand222 and 555555555 555555555 -> NaN Invalid_operation
dqand223 and 777777777 777777777 -> NaN Invalid_operation
dqand224 and 999999999 999999999 -> NaN Invalid_operation
dqand225 and 222222222 999999999 -> NaN Invalid_operation
dqand226 and 444444444 999999999 -> NaN Invalid_operation
dqand227 and 666666666 999999999 -> NaN Invalid_operation
dqand228 and 888888888 999999999 -> NaN Invalid_operation
dqand229 and 999999999 222222222 -> NaN Invalid_operation
dqand230 and 999999999 444444444 -> NaN Invalid_operation
dqand231 and 999999999 666666666 -> NaN Invalid_operation
dqand232 and 999999999 888888888 -> NaN Invalid_operation
-- a few randoms
dqand240 and 567468689 -934981942 -> NaN Invalid_operation
dqand241 and 567367689 934981942 -> NaN Invalid_operation
dqand242 and -631917772 -706014634 -> NaN Invalid_operation
dqand243 and -756253257 138579234 -> NaN Invalid_operation
dqand244 and 835590149 567435400 -> NaN Invalid_operation
-- test MSD
dqand250 and 2000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqand251 and 7000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqand252 and 8000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqand253 and 9000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqand254 and 2000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqand255 and 7000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqand256 and 8000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqand257 and 9000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqand258 and 1000000111000111000111000000000000 2000000111000111000111000000000000 -> NaN Invalid_operation
dqand259 and 1000000111000111000111000000000000 7000000111000111000111000000000000 -> NaN Invalid_operation
dqand260 and 1000000111000111000111000000000000 8000000111000111000111000000000000 -> NaN Invalid_operation
dqand261 and 1000000111000111000111000000000000 9000000111000111000111000000000000 -> NaN Invalid_operation
dqand262 and 0000000111000111000111000000000000 2000000111000111000111000000000000 -> NaN Invalid_operation
dqand263 and 0000000111000111000111000000000000 7000000111000111000111000000000000 -> NaN Invalid_operation
dqand264 and 0000000111000111000111000000000000 8000000111000111000111000000000000 -> NaN Invalid_operation
dqand265 and 0000000111000111000111000000000000 9000000111000111000111000000000000 -> NaN Invalid_operation
-- test MSD-1
dqand270 and 0200000111000111000111001000000000 1000000111000111000111100000000010 -> NaN Invalid_operation
dqand271 and 0700000111000111000111000100000000 1000000111000111000111010000000100 -> NaN Invalid_operation
dqand272 and 0800000111000111000111000010000000 1000000111000111000111001000001000 -> NaN Invalid_operation
dqand273 and 0900000111000111000111000001000000 1000000111000111000111000100010000 -> NaN Invalid_operation
dqand274 and 1000000111000111000111000000100000 0200000111000111000111000010100000 -> NaN Invalid_operation
dqand275 and 1000000111000111000111000000010000 0700000111000111000111000001000000 -> NaN Invalid_operation
dqand276 and 1000000111000111000111000000001000 0800000111000111000111000010100000 -> NaN Invalid_operation
dqand277 and 1000000111000111000111000000000100 0900000111000111000111000000010000 -> NaN Invalid_operation
-- test LSD
dqand280 and 0010000111000111000111000000000002 1000000111000111000111000100000001 -> NaN Invalid_operation
dqand281 and 0001000111000111000111000000000007 1000000111000111000111001000000011 -> NaN Invalid_operation
dqand282 and 0000000111000111000111100000000008 1000000111000111000111010000000001 -> NaN Invalid_operation
dqand283 and 0000000111000111000111010000000009 1000000111000111000111100000000001 -> NaN Invalid_operation
dqand284 and 1000000111000111000111001000000000 0001000111000111000111000000000002 -> NaN Invalid_operation
dqand285 and 1000000111000111000111000100000000 0010000111000111000111000000000007 -> NaN Invalid_operation
dqand286 and 1000000111000111000111000010000000 0100000111000111000111000000000008 -> NaN Invalid_operation
dqand287 and 1000000111000111000111000001000000 1000000111000111000111000000000009 -> NaN Invalid_operation
-- test Middie
dqand288 and 0010000111000111000111000020000000 1000000111000111000111001000000000 -> NaN Invalid_operation
dqand289 and 0001000111000111000111000070000001 1000000111000111000111000100000000 -> NaN Invalid_operation
dqand290 and 0000000111000111000111100080000010 1000000111000111000111000010000000 -> NaN Invalid_operation
dqand291 and 0000000111000111000111010090000100 1000000111000111000111000001000000 -> NaN Invalid_operation
dqand292 and 1000000111000111000111001000001000 0000000111000111000111000020100000 -> NaN Invalid_operation
dqand293 and 1000000111000111000111000100010000 0000000111000111000111000070010000 -> NaN Invalid_operation
dqand294 and 1000000111000111000111000010100000 0000000111000111000111000080001000 -> NaN Invalid_operation
dqand295 and 1000000111000111000111000001000000 0000000111000111000111000090000100 -> NaN Invalid_operation
-- signs
dqand296 and -1000000111000111000111000001000000 -0000001110001110001110010000000100 -> NaN Invalid_operation
dqand297 and -1000000111000111000111000001000000 0000001110001110001110000010000100 -> NaN Invalid_operation
dqand298 and 1000000111000111000111000001000000 -0000001110001110001110001000000100 -> NaN Invalid_operation
dqand299 and 1000000111000111000111000001000000 0000001110001110001110000011000100 -> 110000110000110000001000000
-- Nmax, Nmin, Ntiny-like
dqand331 and 2 9.99999999E+999 -> NaN Invalid_operation
dqand332 and 3 1E-999 -> NaN Invalid_operation
dqand333 and 4 1.00000000E-999 -> NaN Invalid_operation
dqand334 and 5 1E-900 -> NaN Invalid_operation
dqand335 and 6 -1E-900 -> NaN Invalid_operation
dqand336 and 7 -1.00000000E-999 -> NaN Invalid_operation
dqand337 and 8 -1E-999 -> NaN Invalid_operation
dqand338 and 9 -9.99999999E+999 -> NaN Invalid_operation
dqand341 and 9.99999999E+999 -18 -> NaN Invalid_operation
dqand342 and 1E-999 01 -> NaN Invalid_operation
dqand343 and 1.00000000E-999 -18 -> NaN Invalid_operation
dqand344 and 1E-900 18 -> NaN Invalid_operation
dqand345 and -1E-900 -10 -> NaN Invalid_operation
dqand346 and -1.00000000E-999 18 -> NaN Invalid_operation
dqand347 and -1E-999 10 -> NaN Invalid_operation
dqand348 and -9.99999999E+999 -18 -> NaN Invalid_operation
-- A few other non-integers
dqand361 and 1.0 1 -> NaN Invalid_operation
dqand362 and 1E+1 1 -> NaN Invalid_operation
dqand363 and 0.0 1 -> NaN Invalid_operation
dqand364 and 0E+1 1 -> NaN Invalid_operation
dqand365 and 9.9 1 -> NaN Invalid_operation
dqand366 and 9E+1 1 -> NaN Invalid_operation
dqand371 and 0 1.0 -> NaN Invalid_operation
dqand372 and 0 1E+1 -> NaN Invalid_operation
dqand373 and 0 0.0 -> NaN Invalid_operation
dqand374 and 0 0E+1 -> NaN Invalid_operation
dqand375 and 0 9.9 -> NaN Invalid_operation
dqand376 and 0 9E+1 -> NaN Invalid_operation
-- All Specials are in error
dqand780 and -Inf -Inf -> NaN Invalid_operation
dqand781 and -Inf -1000 -> NaN Invalid_operation
dqand782 and -Inf -1 -> NaN Invalid_operation
dqand783 and -Inf -0 -> NaN Invalid_operation
dqand784 and -Inf 0 -> NaN Invalid_operation
dqand785 and -Inf 1 -> NaN Invalid_operation
dqand786 and -Inf 1000 -> NaN Invalid_operation
dqand787 and -1000 -Inf -> NaN Invalid_operation
dqand788 and -Inf -Inf -> NaN Invalid_operation
dqand789 and -1 -Inf -> NaN Invalid_operation
dqand790 and -0 -Inf -> NaN Invalid_operation
dqand791 and 0 -Inf -> NaN Invalid_operation
dqand792 and 1 -Inf -> NaN Invalid_operation
dqand793 and 1000 -Inf -> NaN Invalid_operation
dqand794 and Inf -Inf -> NaN Invalid_operation
dqand800 and Inf -Inf -> NaN Invalid_operation
dqand801 and Inf -1000 -> NaN Invalid_operation
dqand802 and Inf -1 -> NaN Invalid_operation
dqand803 and Inf -0 -> NaN Invalid_operation
dqand804 and Inf 0 -> NaN Invalid_operation
dqand805 and Inf 1 -> NaN Invalid_operation
dqand806 and Inf 1000 -> NaN Invalid_operation
dqand807 and Inf Inf -> NaN Invalid_operation
dqand808 and -1000 Inf -> NaN Invalid_operation
dqand809 and -Inf Inf -> NaN Invalid_operation
dqand810 and -1 Inf -> NaN Invalid_operation
dqand811 and -0 Inf -> NaN Invalid_operation
dqand812 and 0 Inf -> NaN Invalid_operation
dqand813 and 1 Inf -> NaN Invalid_operation
dqand814 and 1000 Inf -> NaN Invalid_operation
dqand815 and Inf Inf -> NaN Invalid_operation
dqand821 and NaN -Inf -> NaN Invalid_operation
dqand822 and NaN -1000 -> NaN Invalid_operation
dqand823 and NaN -1 -> NaN Invalid_operation
dqand824 and NaN -0 -> NaN Invalid_operation
dqand825 and NaN 0 -> NaN Invalid_operation
dqand826 and NaN 1 -> NaN Invalid_operation
dqand827 and NaN 1000 -> NaN Invalid_operation
dqand828 and NaN Inf -> NaN Invalid_operation
dqand829 and NaN NaN -> NaN Invalid_operation
dqand830 and -Inf NaN -> NaN Invalid_operation
dqand831 and -1000 NaN -> NaN Invalid_operation
dqand832 and -1 NaN -> NaN Invalid_operation
dqand833 and -0 NaN -> NaN Invalid_operation
dqand834 and 0 NaN -> NaN Invalid_operation
dqand835 and 1 NaN -> NaN Invalid_operation
dqand836 and 1000 NaN -> NaN Invalid_operation
dqand837 and Inf NaN -> NaN Invalid_operation
dqand841 and sNaN -Inf -> NaN Invalid_operation
dqand842 and sNaN -1000 -> NaN Invalid_operation
dqand843 and sNaN -1 -> NaN Invalid_operation
dqand844 and sNaN -0 -> NaN Invalid_operation
dqand845 and sNaN 0 -> NaN Invalid_operation
dqand846 and sNaN 1 -> NaN Invalid_operation
dqand847 and sNaN 1000 -> NaN Invalid_operation
dqand848 and sNaN NaN -> NaN Invalid_operation
dqand849 and sNaN sNaN -> NaN Invalid_operation
dqand850 and NaN sNaN -> NaN Invalid_operation
dqand851 and -Inf sNaN -> NaN Invalid_operation
dqand852 and -1000 sNaN -> NaN Invalid_operation
dqand853 and -1 sNaN -> NaN Invalid_operation
dqand854 and -0 sNaN -> NaN Invalid_operation
dqand855 and 0 sNaN -> NaN Invalid_operation
dqand856 and 1 sNaN -> NaN Invalid_operation
dqand857 and 1000 sNaN -> NaN Invalid_operation
dqand858 and Inf sNaN -> NaN Invalid_operation
dqand859 and NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqand861 and NaN1 -Inf -> NaN Invalid_operation
dqand862 and +NaN2 -1000 -> NaN Invalid_operation
dqand863 and NaN3 1000 -> NaN Invalid_operation
dqand864 and NaN4 Inf -> NaN Invalid_operation
dqand865 and NaN5 +NaN6 -> NaN Invalid_operation
dqand866 and -Inf NaN7 -> NaN Invalid_operation
dqand867 and -1000 NaN8 -> NaN Invalid_operation
dqand868 and 1000 NaN9 -> NaN Invalid_operation
dqand869 and Inf +NaN10 -> NaN Invalid_operation
dqand871 and sNaN11 -Inf -> NaN Invalid_operation
dqand872 and sNaN12 -1000 -> NaN Invalid_operation
dqand873 and sNaN13 1000 -> NaN Invalid_operation
dqand874 and sNaN14 NaN17 -> NaN Invalid_operation
dqand875 and sNaN15 sNaN18 -> NaN Invalid_operation
dqand876 and NaN16 sNaN19 -> NaN Invalid_operation
dqand877 and -Inf +sNaN20 -> NaN Invalid_operation
dqand878 and -1000 sNaN21 -> NaN Invalid_operation
dqand879 and 1000 sNaN22 -> NaN Invalid_operation
dqand880 and Inf sNaN23 -> NaN Invalid_operation
dqand881 and +NaN25 +sNaN24 -> NaN Invalid_operation
dqand882 and -NaN26 NaN28 -> NaN Invalid_operation
dqand883 and -sNaN27 sNaN29 -> NaN Invalid_operation
dqand884 and 1000 -NaN30 -> NaN Invalid_operation
dqand885 and 1000 -sNaN31 -> NaN Invalid_operation
------------------------------------------------------------------------
-- dqAnd.decTest -- digitwise logical AND for decQuads --
-- 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
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check (truth table)
dqand001 and 0 0 -> 0
dqand002 and 0 1 -> 0
dqand003 and 1 0 -> 0
dqand004 and 1 1 -> 1
dqand005 and 1100 1010 -> 1000
-- and at msd and msd-1
-- 1234567890123456789012345678901234
dqand006 and 0000000000000000000000000000000000 0000000000000000000000000000000000 -> 0
dqand007 and 0000000000000000000000000000000000 1000000000000000000000000000000000 -> 0
dqand008 and 1000000000000000000000000000000000 0000000000000000000000000000000000 -> 0
dqand009 and 1000000000000000000000000000000000 1000000000000000000000000000000000 -> 1000000000000000000000000000000000
dqand010 and 0000000000000000000000000000000000 0000000000000000000000000000000000 -> 0
dqand011 and 0000000000000000000000000000000000 0100000000000000000000000000000000 -> 0
dqand012 and 0100000000000000000000000000000000 0000000000000000000000000000000000 -> 0
dqand013 and 0100000000000000000000000000000000 0100000000000000000000000000000000 -> 100000000000000000000000000000000
-- Various lengths
-- 1234567890123456789012345678901234
dqand601 and 0111111111111111111111111111111111 1111111111111111111111111111111111 -> 111111111111111111111111111111111
dqand602 and 1011111111111111111111111111111111 1111111111111111111111111111111111 -> 1011111111111111111111111111111111
dqand603 and 1101111111111111111111111111111111 1111111111111111111111111111111111 -> 1101111111111111111111111111111111
dqand604 and 1110111111111111111111111111111111 1111111111111111111111111111111111 -> 1110111111111111111111111111111111
dqand605 and 1111011111111111111111111111111111 1111111111111111111111111111111111 -> 1111011111111111111111111111111111
dqand606 and 1111101111111111111111111111111111 1111111111111111111111111111111111 -> 1111101111111111111111111111111111
dqand607 and 1111110111111111111111111111111111 1111111111111111111111111111111111 -> 1111110111111111111111111111111111
dqand608 and 1111111011111111111111111111111111 1111111111111111111111111111111111 -> 1111111011111111111111111111111111
dqand609 and 1111111101111111111111111111111111 1111111111111111111111111111111111 -> 1111111101111111111111111111111111
dqand610 and 1111111110111111111111111111111111 1111111111111111111111111111111111 -> 1111111110111111111111111111111111
dqand611 and 1111111111011111111111111111111111 1111111111111111111111111111111111 -> 1111111111011111111111111111111111
dqand612 and 1111111111101111111111111111111111 1111111111111111111111111111111111 -> 1111111111101111111111111111111111
dqand613 and 1111111111110111111111111111111111 1111111111111111111111111111111111 -> 1111111111110111111111111111111111
dqand614 and 1111111111111011111111111111111111 1111111111111111111111111111111111 -> 1111111111111011111111111111111111
dqand615 and 1111111111111101111111111111111111 1111111111111111111111111111111111 -> 1111111111111101111111111111111111
dqand616 and 1111111111111110111111111111111111 1111111111111111111111111111111111 -> 1111111111111110111111111111111111
dqand617 and 1111111111111111011111111111111111 1111111111111111111111111111111111 -> 1111111111111111011111111111111111
dqand618 and 1111111111111111101111111111111111 1111111111111111111111111111111111 -> 1111111111111111101111111111111111
dqand619 and 1111111111111111110111111111111111 1111111111111111111111111111111111 -> 1111111111111111110111111111111111
dqand620 and 1111111111111111111011111111111111 1111111111111111111111111111111111 -> 1111111111111111111011111111111111
dqand621 and 1111111111111111111101111111111111 1111111111111111111111111111111111 -> 1111111111111111111101111111111111
dqand622 and 1111111111111111111110111111111111 1111111111111111111111111111111111 -> 1111111111111111111110111111111111
dqand623 and 1111111111111111111111011111111111 1111111111111111111111111111111111 -> 1111111111111111111111011111111111
dqand624 and 1111111111111111111111101111111111 1111111111111111111111111111111111 -> 1111111111111111111111101111111111
dqand625 and 1111111111111111111111110111111111 1111111111111111111111111111111111 -> 1111111111111111111111110111111111
dqand626 and 1111111111111111111111111011111111 1111111111111111111111111111111111 -> 1111111111111111111111111011111111
dqand627 and 1111111111111111111111111101111111 1111111111111111111111111111111111 -> 1111111111111111111111111101111111
dqand628 and 1111111111111111111111111110111111 1111111111111111111111111111111111 -> 1111111111111111111111111110111111
dqand629 and 1111111111111111111111111111011111 1111111111111111111111111111111111 -> 1111111111111111111111111111011111
dqand630 and 1111111111111111111111111111101111 1111111111111111111111111111111111 -> 1111111111111111111111111111101111
dqand631 and 1111111111111111111111111111110111 1111111111111111111111111111111111 -> 1111111111111111111111111111110111
dqand632 and 1111111111111111111111111111111011 1111111111111111111111111111111111 -> 1111111111111111111111111111111011
dqand633 and 1111111111111111111111111111111101 1111111111111111111111111111111111 -> 1111111111111111111111111111111101
dqand634 and 1111111111111111111111111111111110 1111111111111111111111111111111111 -> 1111111111111111111111111111111110
dqand641 and 1111111111111111111111111111111111 0111111111111111111111111111111111 -> 111111111111111111111111111111111
dqand642 and 1111111111111111111111111111111111 1011111111111111111111111111111111 -> 1011111111111111111111111111111111
dqand643 and 1111111111111111111111111111111111 1101111111111111111111111111111111 -> 1101111111111111111111111111111111
dqand644 and 1111111111111111111111111111111111 1110111111111111111111111111111111 -> 1110111111111111111111111111111111
dqand645 and 1111111111111111111111111111111111 1111011111111111111111111111111111 -> 1111011111111111111111111111111111
dqand646 and 1111111111111111111111111111111111 1111101111111111111111111111111111 -> 1111101111111111111111111111111111
dqand647 and 1111111111111111111111111111111111 1111110111111111111111111111111111 -> 1111110111111111111111111111111111
dqand648 and 1111111111111111111111111111111111 1111111011111111111111111111111111 -> 1111111011111111111111111111111111
dqand649 and 1111111111111111111111111111111111 1111111101111111111111111111111111 -> 1111111101111111111111111111111111
dqand650 and 1111111111111111111111111111111111 1111111110111111111111111111111111 -> 1111111110111111111111111111111111
dqand651 and 1111111111111111111111111111111111 1111111111011111111111111111111111 -> 1111111111011111111111111111111111
dqand652 and 1111111111111111111111111111111111 1111111111101111111111111111111111 -> 1111111111101111111111111111111111
dqand653 and 1111111111111111111111111111111111 1111111111110111111111111111111111 -> 1111111111110111111111111111111111
dqand654 and 1111111111111111111111111111111111 1111111111111011111111111111111111 -> 1111111111111011111111111111111111
dqand655 and 1111111111111111111111111111111111 1111111111111101111111111111111111 -> 1111111111111101111111111111111111
dqand656 and 1111111111111111111111111111111111 1111111111111110111111111111111111 -> 1111111111111110111111111111111111
dqand657 and 1111111111111111111111111111111111 1111111111111111011111111111111111 -> 1111111111111111011111111111111111
dqand658 and 1111111111111111111111111111111111 1111111111111111101111111111111111 -> 1111111111111111101111111111111111
dqand659 and 1111111111111111111111111111111111 1111111111111111110111111111111111 -> 1111111111111111110111111111111111
dqand660 and 1111111111111111111111111111111111 1111111111111111111011111111111111 -> 1111111111111111111011111111111111
dqand661 and 1111111111111111111111111111111111 1111111111111111111101111111111111 -> 1111111111111111111101111111111111
dqand662 and 1111111111111111111111111111111111 1111111111111111111110111111111111 -> 1111111111111111111110111111111111
dqand663 and 1111111111111111111111111111111111 1111111111111111111111011111111111 -> 1111111111111111111111011111111111
dqand664 and 1111111111111111111111111111111111 1111111111111111111111101111111111 -> 1111111111111111111111101111111111
dqand665 and 1111111111111111111111111111111111 1111111111111111111111110111111111 -> 1111111111111111111111110111111111
dqand666 and 1111111111111111111111111111111111 1111111111111111111111111011111111 -> 1111111111111111111111111011111111
dqand667 and 1111111111111111111111111111111111 1111111111111111111111111101111111 -> 1111111111111111111111111101111111
dqand668 and 1111111111111111111111111111111111 1111111111111111111111111110111111 -> 1111111111111111111111111110111111
dqand669 and 1111111111111111111111111111111111 1111111111111111111111111111011111 -> 1111111111111111111111111111011111
dqand670 and 1111111111111111111111111111111111 1111111111111111111111111111101111 -> 1111111111111111111111111111101111
dqand671 and 1111111111111111111111111111111111 1111111111111111111111111111110111 -> 1111111111111111111111111111110111
dqand672 and 1111111111111111111111111111111111 1111111111111111111111111111111011 -> 1111111111111111111111111111111011
dqand673 and 1111111111111111111111111111111111 1111111111111111111111111111111101 -> 1111111111111111111111111111111101
dqand674 and 1111111111111111111111111111111111 1111111111111111111111111111111110 -> 1111111111111111111111111111111110
dqand675 and 0111111111111111111111111111111111 1111111111111111111111111111111110 -> 111111111111111111111111111111110
dqand676 and 1111111111111111111111111111111111 1111111111111111111111111111111110 -> 1111111111111111111111111111111110
dqand021 and 1111111111111111 1111111111111111 -> 1111111111111111
dqand024 and 1111111111111111 111111111111111 -> 111111111111111
dqand025 and 1111111111111111 11111111111111 -> 11111111111111
dqand026 and 1111111111111111 1111111111111 -> 1111111111111
dqand027 and 1111111111111111 111111111111 -> 111111111111
dqand028 and 1111111111111111 11111111111 -> 11111111111
dqand029 and 1111111111111111 1111111111 -> 1111111111
dqand030 and 1111111111111111 111111111 -> 111111111
dqand031 and 1111111111111111 11111111 -> 11111111
dqand032 and 1111111111111111 1111111 -> 1111111
dqand033 and 1111111111111111 111111 -> 111111
dqand034 and 1111111111111111 11111 -> 11111
dqand035 and 1111111111111111 1111 -> 1111
dqand036 and 1111111111111111 111 -> 111
dqand037 and 1111111111111111 11 -> 11
dqand038 and 1111111111111111 1 -> 1
dqand039 and 1111111111111111 0 -> 0
dqand040 and 1111111111111111 1111111111111111 -> 1111111111111111
dqand041 and 111111111111111 1111111111111111 -> 111111111111111
dqand042 and 111111111111111 1111111111111111 -> 111111111111111
dqand043 and 11111111111111 1111111111111111 -> 11111111111111
dqand044 and 1111111111111 1111111111111111 -> 1111111111111
dqand045 and 111111111111 1111111111111111 -> 111111111111
dqand046 and 11111111111 1111111111111111 -> 11111111111
dqand047 and 1111111111 1111111111111111 -> 1111111111
dqand048 and 111111111 1111111111111111 -> 111111111
dqand049 and 11111111 1111111111111111 -> 11111111
dqand050 and 1111111 1111111111111111 -> 1111111
dqand051 and 111111 1111111111111111 -> 111111
dqand052 and 11111 1111111111111111 -> 11111
dqand053 and 1111 1111111111111111 -> 1111
dqand054 and 111 1111111111111111 -> 111
dqand055 and 11 1111111111111111 -> 11
dqand056 and 1 1111111111111111 -> 1
dqand057 and 0 1111111111111111 -> 0
dqand150 and 1111111111 1 -> 1
dqand151 and 111111111 1 -> 1
dqand152 and 11111111 1 -> 1
dqand153 and 1111111 1 -> 1
dqand154 and 111111 1 -> 1
dqand155 and 11111 1 -> 1
dqand156 and 1111 1 -> 1
dqand157 and 111 1 -> 1
dqand158 and 11 1 -> 1
dqand159 and 1 1 -> 1
dqand160 and 1111111111 0 -> 0
dqand161 and 111111111 0 -> 0
dqand162 and 11111111 0 -> 0
dqand163 and 1111111 0 -> 0
dqand164 and 111111 0 -> 0
dqand165 and 11111 0 -> 0
dqand166 and 1111 0 -> 0
dqand167 and 111 0 -> 0
dqand168 and 11 0 -> 0
dqand169 and 1 0 -> 0
dqand170 and 1 1111111111 -> 1
dqand171 and 1 111111111 -> 1
dqand172 and 1 11111111 -> 1
dqand173 and 1 1111111 -> 1
dqand174 and 1 111111 -> 1
dqand175 and 1 11111 -> 1
dqand176 and 1 1111 -> 1
dqand177 and 1 111 -> 1
dqand178 and 1 11 -> 1
dqand179 and 1 1 -> 1
dqand180 and 0 1111111111 -> 0
dqand181 and 0 111111111 -> 0
dqand182 and 0 11111111 -> 0
dqand183 and 0 1111111 -> 0
dqand184 and 0 111111 -> 0
dqand185 and 0 11111 -> 0
dqand186 and 0 1111 -> 0
dqand187 and 0 111 -> 0
dqand188 and 0 11 -> 0
dqand189 and 0 1 -> 0
dqand090 and 011111111 111111111 -> 11111111
dqand091 and 101111111 111111111 -> 101111111
dqand092 and 110111111 111111111 -> 110111111
dqand093 and 111011111 111111111 -> 111011111
dqand094 and 111101111 111111111 -> 111101111
dqand095 and 111110111 111111111 -> 111110111
dqand096 and 111111011 111111111 -> 111111011
dqand097 and 111111101 111111111 -> 111111101
dqand098 and 111111110 111111111 -> 111111110
dqand100 and 111111111 011111111 -> 11111111
dqand101 and 111111111 101111111 -> 101111111
dqand102 and 111111111 110111111 -> 110111111
dqand103 and 111111111 111011111 -> 111011111
dqand104 and 111111111 111101111 -> 111101111
dqand105 and 111111111 111110111 -> 111110111
dqand106 and 111111111 111111011 -> 111111011
dqand107 and 111111111 111111101 -> 111111101
dqand108 and 111111111 111111110 -> 111111110
-- non-0/1 should not be accepted, nor should signs
dqand220 and 111111112 111111111 -> NaN Invalid_operation
dqand221 and 333333333 333333333 -> NaN Invalid_operation
dqand222 and 555555555 555555555 -> NaN Invalid_operation
dqand223 and 777777777 777777777 -> NaN Invalid_operation
dqand224 and 999999999 999999999 -> NaN Invalid_operation
dqand225 and 222222222 999999999 -> NaN Invalid_operation
dqand226 and 444444444 999999999 -> NaN Invalid_operation
dqand227 and 666666666 999999999 -> NaN Invalid_operation
dqand228 and 888888888 999999999 -> NaN Invalid_operation
dqand229 and 999999999 222222222 -> NaN Invalid_operation
dqand230 and 999999999 444444444 -> NaN Invalid_operation
dqand231 and 999999999 666666666 -> NaN Invalid_operation
dqand232 and 999999999 888888888 -> NaN Invalid_operation
-- a few randoms
dqand240 and 567468689 -934981942 -> NaN Invalid_operation
dqand241 and 567367689 934981942 -> NaN Invalid_operation
dqand242 and -631917772 -706014634 -> NaN Invalid_operation
dqand243 and -756253257 138579234 -> NaN Invalid_operation
dqand244 and 835590149 567435400 -> NaN Invalid_operation
-- test MSD
dqand250 and 2000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqand251 and 7000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqand252 and 8000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqand253 and 9000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqand254 and 2000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqand255 and 7000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqand256 and 8000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqand257 and 9000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqand258 and 1000000111000111000111000000000000 2000000111000111000111000000000000 -> NaN Invalid_operation
dqand259 and 1000000111000111000111000000000000 7000000111000111000111000000000000 -> NaN Invalid_operation
dqand260 and 1000000111000111000111000000000000 8000000111000111000111000000000000 -> NaN Invalid_operation
dqand261 and 1000000111000111000111000000000000 9000000111000111000111000000000000 -> NaN Invalid_operation
dqand262 and 0000000111000111000111000000000000 2000000111000111000111000000000000 -> NaN Invalid_operation
dqand263 and 0000000111000111000111000000000000 7000000111000111000111000000000000 -> NaN Invalid_operation
dqand264 and 0000000111000111000111000000000000 8000000111000111000111000000000000 -> NaN Invalid_operation
dqand265 and 0000000111000111000111000000000000 9000000111000111000111000000000000 -> NaN Invalid_operation
-- test MSD-1
dqand270 and 0200000111000111000111001000000000 1000000111000111000111100000000010 -> NaN Invalid_operation
dqand271 and 0700000111000111000111000100000000 1000000111000111000111010000000100 -> NaN Invalid_operation
dqand272 and 0800000111000111000111000010000000 1000000111000111000111001000001000 -> NaN Invalid_operation
dqand273 and 0900000111000111000111000001000000 1000000111000111000111000100010000 -> NaN Invalid_operation
dqand274 and 1000000111000111000111000000100000 0200000111000111000111000010100000 -> NaN Invalid_operation
dqand275 and 1000000111000111000111000000010000 0700000111000111000111000001000000 -> NaN Invalid_operation
dqand276 and 1000000111000111000111000000001000 0800000111000111000111000010100000 -> NaN Invalid_operation
dqand277 and 1000000111000111000111000000000100 0900000111000111000111000000010000 -> NaN Invalid_operation
-- test LSD
dqand280 and 0010000111000111000111000000000002 1000000111000111000111000100000001 -> NaN Invalid_operation
dqand281 and 0001000111000111000111000000000007 1000000111000111000111001000000011 -> NaN Invalid_operation
dqand282 and 0000000111000111000111100000000008 1000000111000111000111010000000001 -> NaN Invalid_operation
dqand283 and 0000000111000111000111010000000009 1000000111000111000111100000000001 -> NaN Invalid_operation
dqand284 and 1000000111000111000111001000000000 0001000111000111000111000000000002 -> NaN Invalid_operation
dqand285 and 1000000111000111000111000100000000 0010000111000111000111000000000007 -> NaN Invalid_operation
dqand286 and 1000000111000111000111000010000000 0100000111000111000111000000000008 -> NaN Invalid_operation
dqand287 and 1000000111000111000111000001000000 1000000111000111000111000000000009 -> NaN Invalid_operation
-- test Middie
dqand288 and 0010000111000111000111000020000000 1000000111000111000111001000000000 -> NaN Invalid_operation
dqand289 and 0001000111000111000111000070000001 1000000111000111000111000100000000 -> NaN Invalid_operation
dqand290 and 0000000111000111000111100080000010 1000000111000111000111000010000000 -> NaN Invalid_operation
dqand291 and 0000000111000111000111010090000100 1000000111000111000111000001000000 -> NaN Invalid_operation
dqand292 and 1000000111000111000111001000001000 0000000111000111000111000020100000 -> NaN Invalid_operation
dqand293 and 1000000111000111000111000100010000 0000000111000111000111000070010000 -> NaN Invalid_operation
dqand294 and 1000000111000111000111000010100000 0000000111000111000111000080001000 -> NaN Invalid_operation
dqand295 and 1000000111000111000111000001000000 0000000111000111000111000090000100 -> NaN Invalid_operation
-- signs
dqand296 and -1000000111000111000111000001000000 -0000001110001110001110010000000100 -> NaN Invalid_operation
dqand297 and -1000000111000111000111000001000000 0000001110001110001110000010000100 -> NaN Invalid_operation
dqand298 and 1000000111000111000111000001000000 -0000001110001110001110001000000100 -> NaN Invalid_operation
dqand299 and 1000000111000111000111000001000000 0000001110001110001110000011000100 -> 110000110000110000001000000
-- Nmax, Nmin, Ntiny-like
dqand331 and 2 9.99999999E+999 -> NaN Invalid_operation
dqand332 and 3 1E-999 -> NaN Invalid_operation
dqand333 and 4 1.00000000E-999 -> NaN Invalid_operation
dqand334 and 5 1E-900 -> NaN Invalid_operation
dqand335 and 6 -1E-900 -> NaN Invalid_operation
dqand336 and 7 -1.00000000E-999 -> NaN Invalid_operation
dqand337 and 8 -1E-999 -> NaN Invalid_operation
dqand338 and 9 -9.99999999E+999 -> NaN Invalid_operation
dqand341 and 9.99999999E+999 -18 -> NaN Invalid_operation
dqand342 and 1E-999 01 -> NaN Invalid_operation
dqand343 and 1.00000000E-999 -18 -> NaN Invalid_operation
dqand344 and 1E-900 18 -> NaN Invalid_operation
dqand345 and -1E-900 -10 -> NaN Invalid_operation
dqand346 and -1.00000000E-999 18 -> NaN Invalid_operation
dqand347 and -1E-999 10 -> NaN Invalid_operation
dqand348 and -9.99999999E+999 -18 -> NaN Invalid_operation
-- A few other non-integers
dqand361 and 1.0 1 -> NaN Invalid_operation
dqand362 and 1E+1 1 -> NaN Invalid_operation
dqand363 and 0.0 1 -> NaN Invalid_operation
dqand364 and 0E+1 1 -> NaN Invalid_operation
dqand365 and 9.9 1 -> NaN Invalid_operation
dqand366 and 9E+1 1 -> NaN Invalid_operation
dqand371 and 0 1.0 -> NaN Invalid_operation
dqand372 and 0 1E+1 -> NaN Invalid_operation
dqand373 and 0 0.0 -> NaN Invalid_operation
dqand374 and 0 0E+1 -> NaN Invalid_operation
dqand375 and 0 9.9 -> NaN Invalid_operation
dqand376 and 0 9E+1 -> NaN Invalid_operation
-- All Specials are in error
dqand780 and -Inf -Inf -> NaN Invalid_operation
dqand781 and -Inf -1000 -> NaN Invalid_operation
dqand782 and -Inf -1 -> NaN Invalid_operation
dqand783 and -Inf -0 -> NaN Invalid_operation
dqand784 and -Inf 0 -> NaN Invalid_operation
dqand785 and -Inf 1 -> NaN Invalid_operation
dqand786 and -Inf 1000 -> NaN Invalid_operation
dqand787 and -1000 -Inf -> NaN Invalid_operation
dqand788 and -Inf -Inf -> NaN Invalid_operation
dqand789 and -1 -Inf -> NaN Invalid_operation
dqand790 and -0 -Inf -> NaN Invalid_operation
dqand791 and 0 -Inf -> NaN Invalid_operation
dqand792 and 1 -Inf -> NaN Invalid_operation
dqand793 and 1000 -Inf -> NaN Invalid_operation
dqand794 and Inf -Inf -> NaN Invalid_operation
dqand800 and Inf -Inf -> NaN Invalid_operation
dqand801 and Inf -1000 -> NaN Invalid_operation
dqand802 and Inf -1 -> NaN Invalid_operation
dqand803 and Inf -0 -> NaN Invalid_operation
dqand804 and Inf 0 -> NaN Invalid_operation
dqand805 and Inf 1 -> NaN Invalid_operation
dqand806 and Inf 1000 -> NaN Invalid_operation
dqand807 and Inf Inf -> NaN Invalid_operation
dqand808 and -1000 Inf -> NaN Invalid_operation
dqand809 and -Inf Inf -> NaN Invalid_operation
dqand810 and -1 Inf -> NaN Invalid_operation
dqand811 and -0 Inf -> NaN Invalid_operation
dqand812 and 0 Inf -> NaN Invalid_operation
dqand813 and 1 Inf -> NaN Invalid_operation
dqand814 and 1000 Inf -> NaN Invalid_operation
dqand815 and Inf Inf -> NaN Invalid_operation
dqand821 and NaN -Inf -> NaN Invalid_operation
dqand822 and NaN -1000 -> NaN Invalid_operation
dqand823 and NaN -1 -> NaN Invalid_operation
dqand824 and NaN -0 -> NaN Invalid_operation
dqand825 and NaN 0 -> NaN Invalid_operation
dqand826 and NaN 1 -> NaN Invalid_operation
dqand827 and NaN 1000 -> NaN Invalid_operation
dqand828 and NaN Inf -> NaN Invalid_operation
dqand829 and NaN NaN -> NaN Invalid_operation
dqand830 and -Inf NaN -> NaN Invalid_operation
dqand831 and -1000 NaN -> NaN Invalid_operation
dqand832 and -1 NaN -> NaN Invalid_operation
dqand833 and -0 NaN -> NaN Invalid_operation
dqand834 and 0 NaN -> NaN Invalid_operation
dqand835 and 1 NaN -> NaN Invalid_operation
dqand836 and 1000 NaN -> NaN Invalid_operation
dqand837 and Inf NaN -> NaN Invalid_operation
dqand841 and sNaN -Inf -> NaN Invalid_operation
dqand842 and sNaN -1000 -> NaN Invalid_operation
dqand843 and sNaN -1 -> NaN Invalid_operation
dqand844 and sNaN -0 -> NaN Invalid_operation
dqand845 and sNaN 0 -> NaN Invalid_operation
dqand846 and sNaN 1 -> NaN Invalid_operation
dqand847 and sNaN 1000 -> NaN Invalid_operation
dqand848 and sNaN NaN -> NaN Invalid_operation
dqand849 and sNaN sNaN -> NaN Invalid_operation
dqand850 and NaN sNaN -> NaN Invalid_operation
dqand851 and -Inf sNaN -> NaN Invalid_operation
dqand852 and -1000 sNaN -> NaN Invalid_operation
dqand853 and -1 sNaN -> NaN Invalid_operation
dqand854 and -0 sNaN -> NaN Invalid_operation
dqand855 and 0 sNaN -> NaN Invalid_operation
dqand856 and 1 sNaN -> NaN Invalid_operation
dqand857 and 1000 sNaN -> NaN Invalid_operation
dqand858 and Inf sNaN -> NaN Invalid_operation
dqand859 and NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqand861 and NaN1 -Inf -> NaN Invalid_operation
dqand862 and +NaN2 -1000 -> NaN Invalid_operation
dqand863 and NaN3 1000 -> NaN Invalid_operation
dqand864 and NaN4 Inf -> NaN Invalid_operation
dqand865 and NaN5 +NaN6 -> NaN Invalid_operation
dqand866 and -Inf NaN7 -> NaN Invalid_operation
dqand867 and -1000 NaN8 -> NaN Invalid_operation
dqand868 and 1000 NaN9 -> NaN Invalid_operation
dqand869 and Inf +NaN10 -> NaN Invalid_operation
dqand871 and sNaN11 -Inf -> NaN Invalid_operation
dqand872 and sNaN12 -1000 -> NaN Invalid_operation
dqand873 and sNaN13 1000 -> NaN Invalid_operation
dqand874 and sNaN14 NaN17 -> NaN Invalid_operation
dqand875 and sNaN15 sNaN18 -> NaN Invalid_operation
dqand876 and NaN16 sNaN19 -> NaN Invalid_operation
dqand877 and -Inf +sNaN20 -> NaN Invalid_operation
dqand878 and -1000 sNaN21 -> NaN Invalid_operation
dqand879 and 1000 sNaN22 -> NaN Invalid_operation
dqand880 and Inf sNaN23 -> NaN Invalid_operation
dqand881 and +NaN25 +sNaN24 -> NaN Invalid_operation
dqand882 and -NaN26 NaN28 -> NaN Invalid_operation
dqand883 and -sNaN27 sNaN29 -> NaN Invalid_operation
dqand884 and 1000 -NaN30 -> NaN Invalid_operation
dqand885 and 1000 -sNaN31 -> NaN Invalid_operation

File diff suppressed because it is too large Load diff

View file

@ -1,372 +1,372 @@
------------------------------------------------------------------------
-- dqCanonical.decTest -- test decQuad 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 decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
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)
dqcan001 apply 9.999999999999999999999999999999999E+6144 -> #77ffcff3fcff3fcff3fcff3fcff3fcff
dqcan002 apply 0 -> #22080000000000000000000000000000
dqcan003 apply 1 -> #22080000000000000000000000000001
dqcan004 apply -1 -> #a2080000000000000000000000000001
dqcan005 apply Infinity -> #78000000000000000000000000000000
dqcan006 apply -Infinity -> #f8000000000000000000000000000000
dqcan007 apply -NaN -> #fc000000000000000000000000000000
dqcan008 apply -sNaN -> #fe000000000000000000000000000000
dqcan009 apply NaN999999999999999999999999999999999 -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan010 apply sNaN999999999999999999999999999999999 -> #7e000ff3fcff3fcff3fcff3fcff3fcff
decan011 apply 9999999999999999999999999999999999 -> #6e080ff3fcff3fcff3fcff3fcff3fcff
dqcan012 apply 7.50 -> #220780000000000000000000000003d0
dqcan013 apply 9.99 -> #220780000000000000000000000000ff
-- Base tests for canonical encodings (individual operator
-- propagation is tested later)
-- Finites: declets in coefficient
dqcan021 canonical #77ffcff3fcff3fcff3fcff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
dqcan022 canonical #77fffff3fcff3fcff3fcff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
dqcan023 canonical #77ffcffffcff3fcff3fcff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
dqcan024 canonical #77ffcff3ffff3fcff3fcff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
dqcan025 canonical #77ffcff3fcffffcff3fcff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
dqcan026 canonical #77ffcff3fcff3ffff3fcff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
dqcan027 canonical #77ffcff3fcff3fcffffcff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
dqcan028 canonical #77ffcff3fcff3fcff3ffff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
dqcan029 canonical #77ffcff3fcff3fcff3fcffffcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
dqcan030 canonical #77ffcff3fcff3fcff3fcff3ffff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
dqcan031 canonical #77ffcff3fcff3fcff3fcff3fcffffcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
dqcan032 canonical #77ffcff3fcff3fcff3fcff3fcff3ffff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
-- NaN: declets in payload
dqcan061 canonical #7c000ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan062 canonical #7c000ffffcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan063 canonical #7c000ff3ffff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan064 canonical #7c000ff3fcffffcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan065 canonical #7c000ff3fcff3ffff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan066 canonical #7c000ff3fcff3fcffffcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan067 canonical #7c000ff3fcff3fcff3ffff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan068 canonical #7c000ff3fcff3fcff3fcffffcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan069 canonical #7c000ff3fcff3fcff3fcff3ffff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan070 canonical #7c000ff3fcff3fcff3fcff3fcffffcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan071 canonical #7c000ff3fcff3fcff3fcff3fcff3ffff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
-- NaN: exponent continuation bits [excluding sNaN selector]
dqcan081 canonical #7d000ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan082 canonical #7c800ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan083 canonical #7c400ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan084 canonical #7c200ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan085 canonical #7c100ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan086 canonical #7c080ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan087 canonical #7c040ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan088 canonical #7c020ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan089 canonical #7c010ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan090 canonical #7c008ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan091 canonical #7c004ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
-- sNaN: declets in payload
dqcan101 canonical #7e000ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan102 canonical #7e000ffffcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan103 canonical #7e000ff3ffff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan104 canonical #7e000ff3fcffffcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan105 canonical #7e000ff3fcff3ffff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan106 canonical #7e000ff3fcff3fcffffcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan107 canonical #7e000ff3fcff3fcff3ffff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan108 canonical #7e000ff3fcff3fcff3fcffffcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan109 canonical #7e000ff3fcff3fcff3fcff3ffff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan100 canonical #7e000ff3fcff3fcff3fcff3fcffffcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan111 canonical #7e000ff3fcff3fcff3fcff3fcff3ffff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
-- sNaN: exponent continuation bits [excluding sNaN selector]
dqcan121 canonical #7f000ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan122 canonical #7e800ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan123 canonical #7e400ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan124 canonical #7e200ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan125 canonical #7e100ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan126 canonical #7e080ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan127 canonical #7e040ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan128 canonical #7e020ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan129 canonical #7e010ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan130 canonical #7e008ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan131 canonical #7e004ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
-- Inf: exponent continuation bits
dqcan137 canonical #78000000000000000000000000000000 -> #78000000000000000000000000000000
dqcan138 canonical #79000000000000000000000000000000 -> #78000000000000000000000000000000
dqcan139 canonical #7a000000000000000000000000000000 -> #78000000000000000000000000000000
dqcan140 canonical #78800000000000000000000000000000 -> #78000000000000000000000000000000
dqcan141 canonical #78400000000000000000000000000000 -> #78000000000000000000000000000000
dqcan142 canonical #78200000000000000000000000000000 -> #78000000000000000000000000000000
dqcan143 canonical #78100000000000000000000000000000 -> #78000000000000000000000000000000
dqcan144 canonical #78080000000000000000000000000000 -> #78000000000000000000000000000000
dqcan145 canonical #78040000000000000000000000000000 -> #78000000000000000000000000000000
dqcan146 canonical #78020000000000000000000000000000 -> #78000000000000000000000000000000
dqcan147 canonical #78010000000000000000000000000000 -> #78000000000000000000000000000000
dqcan148 canonical #78008000000000000000000000000000 -> #78000000000000000000000000000000
dqcan149 canonical #78004000000000000000000000000000 -> #78000000000000000000000000000000
-- Inf: coefficient continuation bits (first, last, and a few others)
dqcan150 canonical #78000000000000000000000000000000 -> #78000000000000000000000000000000
dqcan151 canonical #78020000000000000000000000000000 -> #78000000000000000000000000000000
dqcan152 canonical #78000000000000000000000000000001 -> #78000000000000000000000000000000
dqcan153 canonical #78010000000000000000000000000000 -> #78000000000000000000000000000000
dqcan154 canonical #78002000000000000000000000000000 -> #78000000000000000000000000000000
dqcan155 canonical #78000800000000000000000000000000 -> #78000000000000000000000000000000
dqcan156 canonical #78000020000000000000000000000000 -> #78000000000000000000000000000000
dqcan157 canonical #78000004000000000000000000000000 -> #78000000000000000000000000000000
dqcan158 canonical #78000000400000000000000000000000 -> #78000000000000000000000000000000
dqcan159 canonical #78000000080000000000000000000000 -> #78000000000000000000000000000000
dqcan160 canonical #78000000004000000000000000000000 -> #78000000000000000000000000000000
dqcan161 canonical #78000000000200000000000000000000 -> #78000000000000000000000000000000
dqcan162 canonical #78000000000080000000000000000000 -> #78000000000000000000000000000000
dqcan163 canonical #78000000000002000000000000000000 -> #78000000000000000000000000000000
dqcan164 canonical #78000000000000400000000000000000 -> #78000000000000000000000000000000
dqcan165 canonical #78000000000000080000000000000000 -> #78000000000000000000000000000000
dqcan166 canonical #78000000000000001000000000000000 -> #78000000000000000000000000000000
dqcan167 canonical #78000000000000000200000000000000 -> #78000000000000000000000000000000
dqcan168 canonical #78000000000000000080000000000000 -> #78000000000000000000000000000000
dqcan169 canonical #78000000000000000004000000000000 -> #78000000000000000000000000000000
dqcan170 canonical #78000000000000000000400000000000 -> #78000000000000000000000000000000
dqcan171 canonical #78000000000000000000010000000000 -> #78000000000000000000000000000000
dqcan172 canonical #78000000000000000000002000000000 -> #78000000000000000000000000000000
dqcan173 canonical #78000000000000000000000400000000 -> #78000000000000000000000000000000
dqcan174 canonical #78000000000000000000000080000000 -> #78000000000000000000000000000000
dqcan175 canonical #78000000000000000000000002000000 -> #78000000000000000000000000000000
dqcan176 canonical #78000000000000000000000000400000 -> #78000000000000000000000000000000
dqcan177 canonical #78000000000000000000000000020000 -> #78000000000000000000000000000000
dqcan178 canonical #78000000000000000000000000001000 -> #78000000000000000000000000000000
dqcan179 canonical #78000000000000000000000000000400 -> #78000000000000000000000000000000
dqcan180 canonical #78000000000000000000000000000020 -> #78000000000000000000000000000000
dqcan181 canonical #78000000000000000000000000000008 -> #78000000000000000000000000000000
-- Now the operators -- trying to check paths that might fail to
-- canonicalize propagated operands
----- Add:
-- Finites: neutral 0
dqcan202 add 0E+6144 #77ffcff3fcff3fcffffcff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
dqcan203 add #77ffcff3fcff3fcff3fcff3ffff3fcff 0E+6144 -> #77ffcff3fcff3fcff3fcff3fcff3fcff
-- tiny zero
dqcan204 add 0E-6176 #77ffcff3ffff3fcff3fcff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff Rounded
dqcan205 add #77ffcff3fcff3fcff3fcff3fcff3ffff 0E-6176 -> #77ffcff3fcff3fcff3fcff3fcff3fcff Rounded
-- tiny non zero
dqcan206 add -1E-6176 #77ffcff3fcff3fcff3fcff3fcfffffff -> #77ffcff3fcff3fcff3fcff3fcff3fcff Inexact Rounded
dqcan207 add #77ffcffffffffffffffffffffff3fcff -1E-6176 -> #77ffcff3fcff3fcff3fcff3fcff3fcff Inexact Rounded
-- NaN: declets in payload
dqcan211 add 0 #7c000ff3fcff3fcff3fcfffffff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan212 add #7c000ff3fcff3fcfffffff3fcff3fcff 0 -> #7c000ff3fcff3fcff3fcff3fcff3fcff
-- NaN: exponent continuation bits [excluding sNaN selector]
dqcan213 add 0 #7c400ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan214 add #7c020ff3fcff3fcff3fcff3fcff3fcff 0 -> #7c000ff3fcff3fcff3fcff3fcff3fcff
-- sNaN: declets in payload
dqcan215 add 0 #7e000ff3fcffffcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
dqcan216 add #7e003ff3fcff3fcff3fcff3fcff3fcff 0 -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
-- sNaN: exponent continuation bits [excluding sNaN selector]
dqcan217 add 0 #7e500ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
dqcan218 add #7e0e0ff3fcff3fcff3fcff3fcff3fcff 0 -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
-- Inf: exponent continuation bits
dqcan220 add 0 #78010000000000000000000000000000 -> #78000000000000000000000000000000
dqcan221 add #78680000000000000000000000000000 0 -> #78000000000000000000000000000000
-- Inf: coefficient continuation bits
dqcan222 add 0 #78002000000000000000000000000000 -> #78000000000000000000000000000000
dqcan223 add #78000000000000000000000000000001 0 -> #78000000000000000000000000000000
dqcan224 add 0 #78000002000000000000000000000000 -> #78000000000000000000000000000000
dqcan225 add #780000000000f0000000000000000000 0 -> #78000000000000000000000000000000
dqcan226 add 0 #78000000000000000005000000000000 -> #78000000000000000000000000000000
dqcan227 add #780000000000000000000000000a0000 0 -> #78000000000000000000000000000000
----- Class: [does not return encoded]
----- Compare:
dqcan231 compare -Inf 1 -> #a2080000000000000000000000000001
dqcan232 compare -Inf -Inf -> #22080000000000000000000000000000
dqcan233 compare 1 -Inf -> #22080000000000000000000000000001
dqcan234 compare #7c010ff3fcff3fcff3fcff3ffffffcff -1000 -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan235 compare #7e004ff3fcff3fcff3ffffffcff3fcff -1000 -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
----- CompareSig:
dqcan241 comparesig -Inf 1 -> #a2080000000000000000000000000001
dqcan242 comparesig -Inf -Inf -> #22080000000000000000000000000000
dqcan243 comparesig 1 -Inf -> #22080000000000000000000000000001
dqcan244 comparesig #7c400ff3ffff3fcff3fcff3fcff3fcff -1000 -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
dqcan245 comparesig #7e050ff3fcfffffff3fcff3fcff3fcff -1000 -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
----- Copy: [does not usually canonicalize]
-- finites
dqcan250 copy #6e080ff3fcff3fcfffffff3fcfffffff -> #6e080ff3fcff3fcfffffff3fcfffffff
dqcan251 copy #ee080ff3fcff3ffff3fcff3ffff3fcff -> #ee080ff3fcff3ffff3fcff3ffff3fcff
-- NaNs
dqcan252 copy #7c000ff3fcffffffffffffffcff3fcff -> #7c000ff3fcffffffffffffffcff3fcff
dqcan253 copy #7c080ff3fcff3fcff3fcff3fcff3fcff -> #7c080ff3fcff3fcff3fcff3fcff3fcff
-- sNaN
dqcan254 copy #7e003ff3fcffffffffffffffcff3fcff -> #7e003ff3fcffffffffffffffcff3fcff
dqcan255 copy #7e100ff3fcff3fcff3fcff3fcff3fcff -> #7e100ff3fcff3fcff3fcff3fcff3fcff
-- Inf
dqcan258 copy #78002000000000000000000000000000 -> #78002000000000000000000000000000
dqcan259 copy #78000000000010000000000000100000 -> #78000000000010000000000000100000
----- CopyAbs: [does not usually canonicalize]
-- finites
dqcan260 copyabs #6e080ff3fcff3fcfffffff3fcfffffff -> #6e080ff3fcff3fcfffffff3fcfffffff
dqcan261 copyabs #ee080ff3fcff3ffff3fcff3ffff3fcff -> #6e080ff3fcff3ffff3fcff3ffff3fcff
-- NaNs
dqcan262 copyabs #fc000ff3fcffffffffffffffcff3fcff -> #7c000ff3fcffffffffffffffcff3fcff
dqcan263 copyabs #fc080ff3fcff3fcff3fcff3fcff3fcff -> #7c080ff3fcff3fcff3fcff3fcff3fcff
-- sNaN
dqcan264 copyabs #fe003ff3fcffffffffffffffcff3fcff -> #7e003ff3fcffffffffffffffcff3fcff
dqcan265 copyabs #fe100ff3fcff3fcff3fcff3fcff3fcff -> #7e100ff3fcff3fcff3fcff3fcff3fcff
-- Inf
dqcan268 copyabs #f8002000000000000000000000000000 -> #78002000000000000000000000000000
dqcan269 copyabs #f8000000000000700700700000000000 -> #78000000000000700700700000000000
----- CopyNegate: [does not usually canonicalize]
-- finites
dqcan270 copynegate #6e080ff3fcff3fcfffffff3fcfffffff -> #ee080ff3fcff3fcfffffff3fcfffffff
dqcan271 copynegate #ee080ff3fcff3ffff3fcff3ffff3fcff -> #6e080ff3fcff3ffff3fcff3ffff3fcff
-- NaNs
dqcan272 copynegate #7c000ff3fcffffffffffff3fcff3fcff -> #fc000ff3fcffffffffffff3fcff3fcff
dqcan273 copynegate #7c080ff3fcff3fcff3fcff3fcff3fcff -> #fc080ff3fcff3fcff3fcff3fcff3fcff
-- sNaN
dqcan274 copynegate #7e003ff3fcffffffffffffffcff3fcff -> #fe003ff3fcffffffffffffffcff3fcff
dqcan275 copynegate #7e100ff3fcff3fcff3fcff3fcff3fcff -> #fe100ff3fcff3fcff3fcff3fcff3fcff
-- Inf
dqcan278 copynegate #78002000000000000000000000000000 -> #f8002000000000000000000000000000
dqcan279 copynegate #78000000000010000000000000100000 -> #f8000000000010000000000000100000
----- CopySign: [does not usually canonicalize]
-- finites
dqcan280 copysign #6e080ff3fcff3fcfffffff3fcfffffff -1 -> #ee080ff3fcff3fcfffffff3fcfffffff
dqcan281 copysign #ee080ff3fcff3ffff3fcff3ffff3fcff 1 -> #6e080ff3fcff3ffff3fcff3ffff3fcff
-- NaNs
dqcan282 copysign #7c000ff3fcffffffffffffffcff3fcff -1 -> #fc000ff3fcffffffffffffffcff3fcff
dqcan283 copysign #7c080ff3fcff3fcff3fcff3fcff3fcff 1 -> #7c080ff3fcff3fcff3fcff3fcff3fcff
-- sNaN
dqcan284 copysign #7e003ff3fcffffffffffffffcff3fcff -1 -> #fe003ff3fcffffffffffffffcff3fcff
dqcan285 copysign #7e100ff3fcff3fcff3fcff3fcff3fcff 1 -> #7e100ff3fcff3fcff3fcff3fcff3fcff
-- Inf
dqcan288 copysign #78002000000000000000000000000000 -1 -> #f8002000000000000000000000000000
dqcan289 copysign #78000000000010000000000000100000 1 -> #78000000000010000000000000100000
----- Multiply:
-- Finites: neutral 0
dqcan302 multiply 1 #77ffff3fcff3fcff0000000000000000 -> #77ffff3fcff3fcff0000000000000000
dqcan303 multiply #77fcffffcff3fcff0000000000000000 1 -> #77fccfffcff3fcff0000000000000000
-- negative
dqcan306 multiply -1 #77ffff3fcff3fcff0000000000000000 -> #f7ffff3fcff3fcff0000000000000000
dqcan307 multiply #77fcffffcff3fcff0000000000000000 -1 -> #f7fccfffcff3fcff0000000000000000
-- NaN: declets in payload
dqcan311 multiply 1 #7c03ff3fcff3fcff0000000000000000 -> #7c003f3fcff3fcff0000000000000000
dqcan312 multiply #7c03ff3fcff3fcff0000000000000000 1 -> #7c003f3fcff3fcff0000000000000000
-- NaN: exponent continuation bits [excluding sNaN selector]
dqcan313 multiply 1 #7c40ff3fcff3fcff0000000000000000 -> #7c003f3fcff3fcff0000000000000000
dqcan314 multiply #7c40ff3fcff3fcff0000000000000000 1 -> #7c003f3fcff3fcff0000000000000000
-- sNaN: declets in payload
dqcan315 multiply 1 #7e00ffffcff3fcff0000000000000000 -> #7c000fffcff3fcff0000000000000000 Invalid_operation
dqcan316 multiply #7e00ffffcff3fcff0000000000000000 1 -> #7c000fffcff3fcff0000000000000000 Invalid_operation
-- sNaN: exponent continuation bits [excluding sNaN selector]
dqcan317 multiply 1 #7e80ff3fcff3fcff0000000000000000 -> #7c003f3fcff3fcff0000000000000000 Invalid_operation
dqcan318 multiply #7e80ff3fcff3fcff0000000000000000 1 -> #7c003f3fcff3fcff0000000000000000 Invalid_operation
-- Inf: exponent continuation bits
dqcan320 multiply 1 #78800000000000000000000000000000 -> #78000000000000000000000000000000
dqcan321 multiply #78800000000000000000000000000000 1 -> #78000000000000000000000000000000
-- Inf: coefficient continuation bits
dqcan322 multiply 1 #78020000000000000000000000000000 -> #78000000000000000000000000000000
dqcan323 multiply #78020000000000000000000000000000 1 -> #78000000000000000000000000000000
dqcan324 multiply 1 #78000000000000010000000000000000 -> #78000000000000000000000000000000
dqcan325 multiply #78000000000000010000000000000000 1 -> #78000000000000000000000000000000
dqcan326 multiply 1 #78000020000000000000000000000000 -> #78000000000000000000000000000000
dqcan327 multiply #78000020000000000000000000000000 1 -> #78000000000000000000000000000000
----- Quantize:
dqcan401 quantize #ee080ff3fcff3fcff3fffffffff3fcff 0 -> #ee080ff3fcff3fcff3fcff3fcff3fcff
dqcan402 quantize #ee080ff3fffffffffffcff3fcff3fcff 0 -> #ee080ff3fcff3fcff3fcff3fcff3fcff
dqcan403 quantize #78800000000000000000000000000000 Inf -> #78000000000000000000000000000000
dqcan404 quantize #78020000000000000000000000000000 -Inf -> #78000000000000000000000000000000
dqcan410 quantize #7c080ff3fcff3fcff3fcff3fcff3fcff 1 -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan411 quantize #fc000ff3fcfffffff3fcff3fcff3fcff 1 -> #fc000ff3fcff3fcff3fcff3fcff3fcff
dqcan412 quantize #7e100ff3fcff3fcff3fcff3fcff3fcff 1 -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
dqcan413 quantize #fe000ff3fcff3fcff3ffffffcff3fcff 1 -> #fc000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
----- Subtract:
-- Finites: neutral 0
dqcan502 subtract 0E+6144 #77ffcff3fcff3fcffffcff3fcff3fcff -> #f7ffcff3fcff3fcff3fcff3fcff3fcff
dqcan503 subtract #77ffcff3fcff3fcff3fcff3ffff3fcff 0E+6144 -> #77ffcff3fcff3fcff3fcff3fcff3fcff
-- tiny zero
dqcan504 subtract 0E-6176 #77ffcff3ffff3fcff3fcff3fcff3fcff -> #f7ffcff3fcff3fcff3fcff3fcff3fcff Rounded
dqcan505 subtract #77ffcff3fcff3fcff3fcff3fcff3ffff 0E-6176 -> #77ffcff3fcff3fcff3fcff3fcff3fcff Rounded
-- tiny non zero
dqcan506 subtract -1E-6176 #77ffcff3fcff3fcff3fcff3fcfffffff -> #f7ffcff3fcff3fcff3fcff3fcff3fcff Inexact Rounded
dqcan507 subtract #77ffcffffffffffffffffffffff3fcff -1E-6176 -> #77ffcff3fcff3fcff3fcff3fcff3fcff Inexact Rounded
-- NaN: declets in payload
dqcan511 subtract 0 #7c000ff3fcff3fcff3fcfffffff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan512 subtract #7c000ff3fcff3fcfffffff3fcff3fcff 0 -> #7c000ff3fcff3fcff3fcff3fcff3fcff
-- NaN: exponent continuation bits [excluding sNaN selector]
dqcan513 subtract 0 #7c400ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan514 subtract #7c020ff3fcff3fcff3fcff3fcff3fcff 0 -> #7c000ff3fcff3fcff3fcff3fcff3fcff
-- sNaN: declets in payload
dqcan515 subtract 0 #7e000ff3fcffffcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
dqcan516 subtract #7e003ff3fcff3fcff3fcff3fcff3fcff 0 -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
-- sNaN: exponent continuation bits [excluding sNaN selector]
dqcan517 subtract 0 #7e500ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
dqcan518 subtract #7e0e0ff3fcff3fcff3fcff3fcff3fcff 0 -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
-- Inf: exponent continuation bits
dqcan520 subtract 0 #78010000000000000000000000000000 -> #f8000000000000000000000000000000
dqcan521 subtract #78680000000000000000000000000000 0 -> #78000000000000000000000000000000
-- Inf: coefficient continuation bits
dqcan522 subtract 0 #78002000000000000000000000000000 -> #f8000000000000000000000000000000
dqcan523 subtract #78000000000000000000000000000001 0 -> #78000000000000000000000000000000
dqcan524 subtract 0 #78000002000000000000000000000000 -> #f8000000000000000000000000000000
dqcan525 subtract #780000000000f0000000000000000000 0 -> #78000000000000000000000000000000
dqcan526 subtract 0 #78000000000000000005000000000000 -> #f8000000000000000000000000000000
dqcan527 subtract #780000000000000000000000000a0000 0 -> #78000000000000000000000000000000
----- ToIntegral:
dqcan601 tointegralx #6e080ff3fdff3fcff3fcff3fcff3fcff -> #6e080ff3fcff3fcff3fcff3fcff3fcff
dqcan602 tointegralx #ee080ff3fcff3ffff3fcff3fcff3fcff -> #ee080ff3fcff3fcff3fcff3fcff3fcff
dqcan603 tointegralx #78800000000000000000000000000000 -> #78000000000000000000000000000000
dqcan604 tointegralx #78020000000000000000000000000000 -> #78000000000000000000000000000000
dqcan614 tointegralx #7c100ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan615 tointegralx #fc000ff3fcff3fcff3fcffffcff3fcff -> #fc000ff3fcff3fcff3fcff3fcff3fcff
dqcan616 tointegralx #7e010ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
dqcan617 tointegralx #fe000ff3fcff3fcff3fdff3fcff3fcff -> #fc000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
-- uncanonical 3999, 39.99, 3.99, 0.399, and negatives
dqcan618 tointegralx #22080000000000000000000000000fff -> #22080000000000000000000000000cff
dqcan619 tointegralx #22078000000000000000000000000fff -> #22080000000000000000000000000040 Inexact Rounded
dqcan620 tointegralx #22074000000000000000000000000fff -> #22080000000000000000000000000004 Inexact Rounded
dqcan621 tointegralx #22070000000000000000000000000fff -> #22080000000000000000000000000000 Inexact Rounded
dqcan622 tointegralx #a2080000000000000000000000000fff -> #a2080000000000000000000000000cff
dqcan623 tointegralx #a2078000000000000000000000000fff -> #a2080000000000000000000000000040 Inexact Rounded
dqcan624 tointegralx #a2074000000000000000000000000fff -> #a2080000000000000000000000000004 Inexact Rounded
dqcan625 tointegralx #a2070000000000000000000000000fff -> #a2080000000000000000000000000000 Inexact Rounded
------------------------------------------------------------------------
-- dqCanonical.decTest -- test decQuad 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 decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
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)
dqcan001 apply 9.999999999999999999999999999999999E+6144 -> #77ffcff3fcff3fcff3fcff3fcff3fcff
dqcan002 apply 0 -> #22080000000000000000000000000000
dqcan003 apply 1 -> #22080000000000000000000000000001
dqcan004 apply -1 -> #a2080000000000000000000000000001
dqcan005 apply Infinity -> #78000000000000000000000000000000
dqcan006 apply -Infinity -> #f8000000000000000000000000000000
dqcan007 apply -NaN -> #fc000000000000000000000000000000
dqcan008 apply -sNaN -> #fe000000000000000000000000000000
dqcan009 apply NaN999999999999999999999999999999999 -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan010 apply sNaN999999999999999999999999999999999 -> #7e000ff3fcff3fcff3fcff3fcff3fcff
decan011 apply 9999999999999999999999999999999999 -> #6e080ff3fcff3fcff3fcff3fcff3fcff
dqcan012 apply 7.50 -> #220780000000000000000000000003d0
dqcan013 apply 9.99 -> #220780000000000000000000000000ff
-- Base tests for canonical encodings (individual operator
-- propagation is tested later)
-- Finites: declets in coefficient
dqcan021 canonical #77ffcff3fcff3fcff3fcff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
dqcan022 canonical #77fffff3fcff3fcff3fcff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
dqcan023 canonical #77ffcffffcff3fcff3fcff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
dqcan024 canonical #77ffcff3ffff3fcff3fcff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
dqcan025 canonical #77ffcff3fcffffcff3fcff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
dqcan026 canonical #77ffcff3fcff3ffff3fcff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
dqcan027 canonical #77ffcff3fcff3fcffffcff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
dqcan028 canonical #77ffcff3fcff3fcff3ffff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
dqcan029 canonical #77ffcff3fcff3fcff3fcffffcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
dqcan030 canonical #77ffcff3fcff3fcff3fcff3ffff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
dqcan031 canonical #77ffcff3fcff3fcff3fcff3fcffffcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
dqcan032 canonical #77ffcff3fcff3fcff3fcff3fcff3ffff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
-- NaN: declets in payload
dqcan061 canonical #7c000ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan062 canonical #7c000ffffcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan063 canonical #7c000ff3ffff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan064 canonical #7c000ff3fcffffcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan065 canonical #7c000ff3fcff3ffff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan066 canonical #7c000ff3fcff3fcffffcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan067 canonical #7c000ff3fcff3fcff3ffff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan068 canonical #7c000ff3fcff3fcff3fcffffcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan069 canonical #7c000ff3fcff3fcff3fcff3ffff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan070 canonical #7c000ff3fcff3fcff3fcff3fcffffcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan071 canonical #7c000ff3fcff3fcff3fcff3fcff3ffff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
-- NaN: exponent continuation bits [excluding sNaN selector]
dqcan081 canonical #7d000ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan082 canonical #7c800ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan083 canonical #7c400ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan084 canonical #7c200ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan085 canonical #7c100ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan086 canonical #7c080ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan087 canonical #7c040ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan088 canonical #7c020ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan089 canonical #7c010ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan090 canonical #7c008ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan091 canonical #7c004ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
-- sNaN: declets in payload
dqcan101 canonical #7e000ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan102 canonical #7e000ffffcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan103 canonical #7e000ff3ffff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan104 canonical #7e000ff3fcffffcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan105 canonical #7e000ff3fcff3ffff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan106 canonical #7e000ff3fcff3fcffffcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan107 canonical #7e000ff3fcff3fcff3ffff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan108 canonical #7e000ff3fcff3fcff3fcffffcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan109 canonical #7e000ff3fcff3fcff3fcff3ffff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan100 canonical #7e000ff3fcff3fcff3fcff3fcffffcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan111 canonical #7e000ff3fcff3fcff3fcff3fcff3ffff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
-- sNaN: exponent continuation bits [excluding sNaN selector]
dqcan121 canonical #7f000ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan122 canonical #7e800ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan123 canonical #7e400ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan124 canonical #7e200ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan125 canonical #7e100ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan126 canonical #7e080ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan127 canonical #7e040ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan128 canonical #7e020ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan129 canonical #7e010ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan130 canonical #7e008ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
dqcan131 canonical #7e004ff3fcff3fcff3fcff3fcff3fcff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
-- Inf: exponent continuation bits
dqcan137 canonical #78000000000000000000000000000000 -> #78000000000000000000000000000000
dqcan138 canonical #79000000000000000000000000000000 -> #78000000000000000000000000000000
dqcan139 canonical #7a000000000000000000000000000000 -> #78000000000000000000000000000000
dqcan140 canonical #78800000000000000000000000000000 -> #78000000000000000000000000000000
dqcan141 canonical #78400000000000000000000000000000 -> #78000000000000000000000000000000
dqcan142 canonical #78200000000000000000000000000000 -> #78000000000000000000000000000000
dqcan143 canonical #78100000000000000000000000000000 -> #78000000000000000000000000000000
dqcan144 canonical #78080000000000000000000000000000 -> #78000000000000000000000000000000
dqcan145 canonical #78040000000000000000000000000000 -> #78000000000000000000000000000000
dqcan146 canonical #78020000000000000000000000000000 -> #78000000000000000000000000000000
dqcan147 canonical #78010000000000000000000000000000 -> #78000000000000000000000000000000
dqcan148 canonical #78008000000000000000000000000000 -> #78000000000000000000000000000000
dqcan149 canonical #78004000000000000000000000000000 -> #78000000000000000000000000000000
-- Inf: coefficient continuation bits (first, last, and a few others)
dqcan150 canonical #78000000000000000000000000000000 -> #78000000000000000000000000000000
dqcan151 canonical #78020000000000000000000000000000 -> #78000000000000000000000000000000
dqcan152 canonical #78000000000000000000000000000001 -> #78000000000000000000000000000000
dqcan153 canonical #78010000000000000000000000000000 -> #78000000000000000000000000000000
dqcan154 canonical #78002000000000000000000000000000 -> #78000000000000000000000000000000
dqcan155 canonical #78000800000000000000000000000000 -> #78000000000000000000000000000000
dqcan156 canonical #78000020000000000000000000000000 -> #78000000000000000000000000000000
dqcan157 canonical #78000004000000000000000000000000 -> #78000000000000000000000000000000
dqcan158 canonical #78000000400000000000000000000000 -> #78000000000000000000000000000000
dqcan159 canonical #78000000080000000000000000000000 -> #78000000000000000000000000000000
dqcan160 canonical #78000000004000000000000000000000 -> #78000000000000000000000000000000
dqcan161 canonical #78000000000200000000000000000000 -> #78000000000000000000000000000000
dqcan162 canonical #78000000000080000000000000000000 -> #78000000000000000000000000000000
dqcan163 canonical #78000000000002000000000000000000 -> #78000000000000000000000000000000
dqcan164 canonical #78000000000000400000000000000000 -> #78000000000000000000000000000000
dqcan165 canonical #78000000000000080000000000000000 -> #78000000000000000000000000000000
dqcan166 canonical #78000000000000001000000000000000 -> #78000000000000000000000000000000
dqcan167 canonical #78000000000000000200000000000000 -> #78000000000000000000000000000000
dqcan168 canonical #78000000000000000080000000000000 -> #78000000000000000000000000000000
dqcan169 canonical #78000000000000000004000000000000 -> #78000000000000000000000000000000
dqcan170 canonical #78000000000000000000400000000000 -> #78000000000000000000000000000000
dqcan171 canonical #78000000000000000000010000000000 -> #78000000000000000000000000000000
dqcan172 canonical #78000000000000000000002000000000 -> #78000000000000000000000000000000
dqcan173 canonical #78000000000000000000000400000000 -> #78000000000000000000000000000000
dqcan174 canonical #78000000000000000000000080000000 -> #78000000000000000000000000000000
dqcan175 canonical #78000000000000000000000002000000 -> #78000000000000000000000000000000
dqcan176 canonical #78000000000000000000000000400000 -> #78000000000000000000000000000000
dqcan177 canonical #78000000000000000000000000020000 -> #78000000000000000000000000000000
dqcan178 canonical #78000000000000000000000000001000 -> #78000000000000000000000000000000
dqcan179 canonical #78000000000000000000000000000400 -> #78000000000000000000000000000000
dqcan180 canonical #78000000000000000000000000000020 -> #78000000000000000000000000000000
dqcan181 canonical #78000000000000000000000000000008 -> #78000000000000000000000000000000
-- Now the operators -- trying to check paths that might fail to
-- canonicalize propagated operands
----- Add:
-- Finites: neutral 0
dqcan202 add 0E+6144 #77ffcff3fcff3fcffffcff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff
dqcan203 add #77ffcff3fcff3fcff3fcff3ffff3fcff 0E+6144 -> #77ffcff3fcff3fcff3fcff3fcff3fcff
-- tiny zero
dqcan204 add 0E-6176 #77ffcff3ffff3fcff3fcff3fcff3fcff -> #77ffcff3fcff3fcff3fcff3fcff3fcff Rounded
dqcan205 add #77ffcff3fcff3fcff3fcff3fcff3ffff 0E-6176 -> #77ffcff3fcff3fcff3fcff3fcff3fcff Rounded
-- tiny non zero
dqcan206 add -1E-6176 #77ffcff3fcff3fcff3fcff3fcfffffff -> #77ffcff3fcff3fcff3fcff3fcff3fcff Inexact Rounded
dqcan207 add #77ffcffffffffffffffffffffff3fcff -1E-6176 -> #77ffcff3fcff3fcff3fcff3fcff3fcff Inexact Rounded
-- NaN: declets in payload
dqcan211 add 0 #7c000ff3fcff3fcff3fcfffffff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan212 add #7c000ff3fcff3fcfffffff3fcff3fcff 0 -> #7c000ff3fcff3fcff3fcff3fcff3fcff
-- NaN: exponent continuation bits [excluding sNaN selector]
dqcan213 add 0 #7c400ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan214 add #7c020ff3fcff3fcff3fcff3fcff3fcff 0 -> #7c000ff3fcff3fcff3fcff3fcff3fcff
-- sNaN: declets in payload
dqcan215 add 0 #7e000ff3fcffffcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
dqcan216 add #7e003ff3fcff3fcff3fcff3fcff3fcff 0 -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
-- sNaN: exponent continuation bits [excluding sNaN selector]
dqcan217 add 0 #7e500ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
dqcan218 add #7e0e0ff3fcff3fcff3fcff3fcff3fcff 0 -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
-- Inf: exponent continuation bits
dqcan220 add 0 #78010000000000000000000000000000 -> #78000000000000000000000000000000
dqcan221 add #78680000000000000000000000000000 0 -> #78000000000000000000000000000000
-- Inf: coefficient continuation bits
dqcan222 add 0 #78002000000000000000000000000000 -> #78000000000000000000000000000000
dqcan223 add #78000000000000000000000000000001 0 -> #78000000000000000000000000000000
dqcan224 add 0 #78000002000000000000000000000000 -> #78000000000000000000000000000000
dqcan225 add #780000000000f0000000000000000000 0 -> #78000000000000000000000000000000
dqcan226 add 0 #78000000000000000005000000000000 -> #78000000000000000000000000000000
dqcan227 add #780000000000000000000000000a0000 0 -> #78000000000000000000000000000000
----- Class: [does not return encoded]
----- Compare:
dqcan231 compare -Inf 1 -> #a2080000000000000000000000000001
dqcan232 compare -Inf -Inf -> #22080000000000000000000000000000
dqcan233 compare 1 -Inf -> #22080000000000000000000000000001
dqcan234 compare #7c010ff3fcff3fcff3fcff3ffffffcff -1000 -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan235 compare #7e004ff3fcff3fcff3ffffffcff3fcff -1000 -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
----- CompareSig:
dqcan241 comparesig -Inf 1 -> #a2080000000000000000000000000001
dqcan242 comparesig -Inf -Inf -> #22080000000000000000000000000000
dqcan243 comparesig 1 -Inf -> #22080000000000000000000000000001
dqcan244 comparesig #7c400ff3ffff3fcff3fcff3fcff3fcff -1000 -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
dqcan245 comparesig #7e050ff3fcfffffff3fcff3fcff3fcff -1000 -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
----- Copy: [does not usually canonicalize]
-- finites
dqcan250 copy #6e080ff3fcff3fcfffffff3fcfffffff -> #6e080ff3fcff3fcfffffff3fcfffffff
dqcan251 copy #ee080ff3fcff3ffff3fcff3ffff3fcff -> #ee080ff3fcff3ffff3fcff3ffff3fcff
-- NaNs
dqcan252 copy #7c000ff3fcffffffffffffffcff3fcff -> #7c000ff3fcffffffffffffffcff3fcff
dqcan253 copy #7c080ff3fcff3fcff3fcff3fcff3fcff -> #7c080ff3fcff3fcff3fcff3fcff3fcff
-- sNaN
dqcan254 copy #7e003ff3fcffffffffffffffcff3fcff -> #7e003ff3fcffffffffffffffcff3fcff
dqcan255 copy #7e100ff3fcff3fcff3fcff3fcff3fcff -> #7e100ff3fcff3fcff3fcff3fcff3fcff
-- Inf
dqcan258 copy #78002000000000000000000000000000 -> #78002000000000000000000000000000
dqcan259 copy #78000000000010000000000000100000 -> #78000000000010000000000000100000
----- CopyAbs: [does not usually canonicalize]
-- finites
dqcan260 copyabs #6e080ff3fcff3fcfffffff3fcfffffff -> #6e080ff3fcff3fcfffffff3fcfffffff
dqcan261 copyabs #ee080ff3fcff3ffff3fcff3ffff3fcff -> #6e080ff3fcff3ffff3fcff3ffff3fcff
-- NaNs
dqcan262 copyabs #fc000ff3fcffffffffffffffcff3fcff -> #7c000ff3fcffffffffffffffcff3fcff
dqcan263 copyabs #fc080ff3fcff3fcff3fcff3fcff3fcff -> #7c080ff3fcff3fcff3fcff3fcff3fcff
-- sNaN
dqcan264 copyabs #fe003ff3fcffffffffffffffcff3fcff -> #7e003ff3fcffffffffffffffcff3fcff
dqcan265 copyabs #fe100ff3fcff3fcff3fcff3fcff3fcff -> #7e100ff3fcff3fcff3fcff3fcff3fcff
-- Inf
dqcan268 copyabs #f8002000000000000000000000000000 -> #78002000000000000000000000000000
dqcan269 copyabs #f8000000000000700700700000000000 -> #78000000000000700700700000000000
----- CopyNegate: [does not usually canonicalize]
-- finites
dqcan270 copynegate #6e080ff3fcff3fcfffffff3fcfffffff -> #ee080ff3fcff3fcfffffff3fcfffffff
dqcan271 copynegate #ee080ff3fcff3ffff3fcff3ffff3fcff -> #6e080ff3fcff3ffff3fcff3ffff3fcff
-- NaNs
dqcan272 copynegate #7c000ff3fcffffffffffff3fcff3fcff -> #fc000ff3fcffffffffffff3fcff3fcff
dqcan273 copynegate #7c080ff3fcff3fcff3fcff3fcff3fcff -> #fc080ff3fcff3fcff3fcff3fcff3fcff
-- sNaN
dqcan274 copynegate #7e003ff3fcffffffffffffffcff3fcff -> #fe003ff3fcffffffffffffffcff3fcff
dqcan275 copynegate #7e100ff3fcff3fcff3fcff3fcff3fcff -> #fe100ff3fcff3fcff3fcff3fcff3fcff
-- Inf
dqcan278 copynegate #78002000000000000000000000000000 -> #f8002000000000000000000000000000
dqcan279 copynegate #78000000000010000000000000100000 -> #f8000000000010000000000000100000
----- CopySign: [does not usually canonicalize]
-- finites
dqcan280 copysign #6e080ff3fcff3fcfffffff3fcfffffff -1 -> #ee080ff3fcff3fcfffffff3fcfffffff
dqcan281 copysign #ee080ff3fcff3ffff3fcff3ffff3fcff 1 -> #6e080ff3fcff3ffff3fcff3ffff3fcff
-- NaNs
dqcan282 copysign #7c000ff3fcffffffffffffffcff3fcff -1 -> #fc000ff3fcffffffffffffffcff3fcff
dqcan283 copysign #7c080ff3fcff3fcff3fcff3fcff3fcff 1 -> #7c080ff3fcff3fcff3fcff3fcff3fcff
-- sNaN
dqcan284 copysign #7e003ff3fcffffffffffffffcff3fcff -1 -> #fe003ff3fcffffffffffffffcff3fcff
dqcan285 copysign #7e100ff3fcff3fcff3fcff3fcff3fcff 1 -> #7e100ff3fcff3fcff3fcff3fcff3fcff
-- Inf
dqcan288 copysign #78002000000000000000000000000000 -1 -> #f8002000000000000000000000000000
dqcan289 copysign #78000000000010000000000000100000 1 -> #78000000000010000000000000100000
----- Multiply:
-- Finites: neutral 0
dqcan302 multiply 1 #77ffff3fcff3fcff0000000000000000 -> #77ffff3fcff3fcff0000000000000000
dqcan303 multiply #77fcffffcff3fcff0000000000000000 1 -> #77fccfffcff3fcff0000000000000000
-- negative
dqcan306 multiply -1 #77ffff3fcff3fcff0000000000000000 -> #f7ffff3fcff3fcff0000000000000000
dqcan307 multiply #77fcffffcff3fcff0000000000000000 -1 -> #f7fccfffcff3fcff0000000000000000
-- NaN: declets in payload
dqcan311 multiply 1 #7c03ff3fcff3fcff0000000000000000 -> #7c003f3fcff3fcff0000000000000000
dqcan312 multiply #7c03ff3fcff3fcff0000000000000000 1 -> #7c003f3fcff3fcff0000000000000000
-- NaN: exponent continuation bits [excluding sNaN selector]
dqcan313 multiply 1 #7c40ff3fcff3fcff0000000000000000 -> #7c003f3fcff3fcff0000000000000000
dqcan314 multiply #7c40ff3fcff3fcff0000000000000000 1 -> #7c003f3fcff3fcff0000000000000000
-- sNaN: declets in payload
dqcan315 multiply 1 #7e00ffffcff3fcff0000000000000000 -> #7c000fffcff3fcff0000000000000000 Invalid_operation
dqcan316 multiply #7e00ffffcff3fcff0000000000000000 1 -> #7c000fffcff3fcff0000000000000000 Invalid_operation
-- sNaN: exponent continuation bits [excluding sNaN selector]
dqcan317 multiply 1 #7e80ff3fcff3fcff0000000000000000 -> #7c003f3fcff3fcff0000000000000000 Invalid_operation
dqcan318 multiply #7e80ff3fcff3fcff0000000000000000 1 -> #7c003f3fcff3fcff0000000000000000 Invalid_operation
-- Inf: exponent continuation bits
dqcan320 multiply 1 #78800000000000000000000000000000 -> #78000000000000000000000000000000
dqcan321 multiply #78800000000000000000000000000000 1 -> #78000000000000000000000000000000
-- Inf: coefficient continuation bits
dqcan322 multiply 1 #78020000000000000000000000000000 -> #78000000000000000000000000000000
dqcan323 multiply #78020000000000000000000000000000 1 -> #78000000000000000000000000000000
dqcan324 multiply 1 #78000000000000010000000000000000 -> #78000000000000000000000000000000
dqcan325 multiply #78000000000000010000000000000000 1 -> #78000000000000000000000000000000
dqcan326 multiply 1 #78000020000000000000000000000000 -> #78000000000000000000000000000000
dqcan327 multiply #78000020000000000000000000000000 1 -> #78000000000000000000000000000000
----- Quantize:
dqcan401 quantize #ee080ff3fcff3fcff3fffffffff3fcff 0 -> #ee080ff3fcff3fcff3fcff3fcff3fcff
dqcan402 quantize #ee080ff3fffffffffffcff3fcff3fcff 0 -> #ee080ff3fcff3fcff3fcff3fcff3fcff
dqcan403 quantize #78800000000000000000000000000000 Inf -> #78000000000000000000000000000000
dqcan404 quantize #78020000000000000000000000000000 -Inf -> #78000000000000000000000000000000
dqcan410 quantize #7c080ff3fcff3fcff3fcff3fcff3fcff 1 -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan411 quantize #fc000ff3fcfffffff3fcff3fcff3fcff 1 -> #fc000ff3fcff3fcff3fcff3fcff3fcff
dqcan412 quantize #7e100ff3fcff3fcff3fcff3fcff3fcff 1 -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
dqcan413 quantize #fe000ff3fcff3fcff3ffffffcff3fcff 1 -> #fc000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
----- Subtract:
-- Finites: neutral 0
dqcan502 subtract 0E+6144 #77ffcff3fcff3fcffffcff3fcff3fcff -> #f7ffcff3fcff3fcff3fcff3fcff3fcff
dqcan503 subtract #77ffcff3fcff3fcff3fcff3ffff3fcff 0E+6144 -> #77ffcff3fcff3fcff3fcff3fcff3fcff
-- tiny zero
dqcan504 subtract 0E-6176 #77ffcff3ffff3fcff3fcff3fcff3fcff -> #f7ffcff3fcff3fcff3fcff3fcff3fcff Rounded
dqcan505 subtract #77ffcff3fcff3fcff3fcff3fcff3ffff 0E-6176 -> #77ffcff3fcff3fcff3fcff3fcff3fcff Rounded
-- tiny non zero
dqcan506 subtract -1E-6176 #77ffcff3fcff3fcff3fcff3fcfffffff -> #f7ffcff3fcff3fcff3fcff3fcff3fcff Inexact Rounded
dqcan507 subtract #77ffcffffffffffffffffffffff3fcff -1E-6176 -> #77ffcff3fcff3fcff3fcff3fcff3fcff Inexact Rounded
-- NaN: declets in payload
dqcan511 subtract 0 #7c000ff3fcff3fcff3fcfffffff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan512 subtract #7c000ff3fcff3fcfffffff3fcff3fcff 0 -> #7c000ff3fcff3fcff3fcff3fcff3fcff
-- NaN: exponent continuation bits [excluding sNaN selector]
dqcan513 subtract 0 #7c400ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan514 subtract #7c020ff3fcff3fcff3fcff3fcff3fcff 0 -> #7c000ff3fcff3fcff3fcff3fcff3fcff
-- sNaN: declets in payload
dqcan515 subtract 0 #7e000ff3fcffffcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
dqcan516 subtract #7e003ff3fcff3fcff3fcff3fcff3fcff 0 -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
-- sNaN: exponent continuation bits [excluding sNaN selector]
dqcan517 subtract 0 #7e500ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
dqcan518 subtract #7e0e0ff3fcff3fcff3fcff3fcff3fcff 0 -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
-- Inf: exponent continuation bits
dqcan520 subtract 0 #78010000000000000000000000000000 -> #f8000000000000000000000000000000
dqcan521 subtract #78680000000000000000000000000000 0 -> #78000000000000000000000000000000
-- Inf: coefficient continuation bits
dqcan522 subtract 0 #78002000000000000000000000000000 -> #f8000000000000000000000000000000
dqcan523 subtract #78000000000000000000000000000001 0 -> #78000000000000000000000000000000
dqcan524 subtract 0 #78000002000000000000000000000000 -> #f8000000000000000000000000000000
dqcan525 subtract #780000000000f0000000000000000000 0 -> #78000000000000000000000000000000
dqcan526 subtract 0 #78000000000000000005000000000000 -> #f8000000000000000000000000000000
dqcan527 subtract #780000000000000000000000000a0000 0 -> #78000000000000000000000000000000
----- ToIntegral:
dqcan601 tointegralx #6e080ff3fdff3fcff3fcff3fcff3fcff -> #6e080ff3fcff3fcff3fcff3fcff3fcff
dqcan602 tointegralx #ee080ff3fcff3ffff3fcff3fcff3fcff -> #ee080ff3fcff3fcff3fcff3fcff3fcff
dqcan603 tointegralx #78800000000000000000000000000000 -> #78000000000000000000000000000000
dqcan604 tointegralx #78020000000000000000000000000000 -> #78000000000000000000000000000000
dqcan614 tointegralx #7c100ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff
dqcan615 tointegralx #fc000ff3fcff3fcff3fcffffcff3fcff -> #fc000ff3fcff3fcff3fcff3fcff3fcff
dqcan616 tointegralx #7e010ff3fcff3fcff3fcff3fcff3fcff -> #7c000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
dqcan617 tointegralx #fe000ff3fcff3fcff3fdff3fcff3fcff -> #fc000ff3fcff3fcff3fcff3fcff3fcff Invalid_operation
-- uncanonical 3999, 39.99, 3.99, 0.399, and negatives
dqcan618 tointegralx #22080000000000000000000000000fff -> #22080000000000000000000000000cff
dqcan619 tointegralx #22078000000000000000000000000fff -> #22080000000000000000000000000040 Inexact Rounded
dqcan620 tointegralx #22074000000000000000000000000fff -> #22080000000000000000000000000004 Inexact Rounded
dqcan621 tointegralx #22070000000000000000000000000fff -> #22080000000000000000000000000000 Inexact Rounded
dqcan622 tointegralx #a2080000000000000000000000000fff -> #a2080000000000000000000000000cff
dqcan623 tointegralx #a2078000000000000000000000000fff -> #a2080000000000000000000000000040 Inexact Rounded
dqcan624 tointegralx #a2074000000000000000000000000fff -> #a2080000000000000000000000000004 Inexact Rounded
dqcan625 tointegralx #a2070000000000000000000000000fff -> #a2080000000000000000000000000000 Inexact Rounded

View file

@ -1,77 +1,77 @@
------------------------------------------------------------------------
-- dqClass.decTest -- decQuad 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]
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
dqcla001 class 0 -> +Zero
dqcla002 class 0.00 -> +Zero
dqcla003 class 0E+5 -> +Zero
dqcla004 class 1E-6176 -> +Subnormal
dqcla005 class 0.1E-6143 -> +Subnormal
dqcla006 class 0.99999999999999999999999999999999E-6143 -> +Subnormal
dqcla007 class 1.00000000000000000000000000000000E-6143 -> +Normal
dqcla008 class 1E-6143 -> +Normal
dqcla009 class 1E-100 -> +Normal
dqcla010 class 1E-10 -> +Normal
dqcla012 class 1E-1 -> +Normal
dqcla013 class 1 -> +Normal
dqcla014 class 2.50 -> +Normal
dqcla015 class 100.100 -> +Normal
dqcla016 class 1E+30 -> +Normal
dqcla017 class 1E+6144 -> +Normal
dqcla018 class 9.99999999999999999999999999999999E+6144 -> +Normal
dqcla019 class Inf -> +Infinity
dqcla021 class -0 -> -Zero
dqcla022 class -0.00 -> -Zero
dqcla023 class -0E+5 -> -Zero
dqcla024 class -1E-6176 -> -Subnormal
dqcla025 class -0.1E-6143 -> -Subnormal
dqcla026 class -0.99999999999999999999999999999999E-6143 -> -Subnormal
dqcla027 class -1.00000000000000000000000000000000E-6143 -> -Normal
dqcla028 class -1E-6143 -> -Normal
dqcla029 class -1E-100 -> -Normal
dqcla030 class -1E-10 -> -Normal
dqcla032 class -1E-1 -> -Normal
dqcla033 class -1 -> -Normal
dqcla034 class -2.50 -> -Normal
dqcla035 class -100.100 -> -Normal
dqcla036 class -1E+30 -> -Normal
dqcla037 class -1E+6144 -> -Normal
dqcla0614 class -9.99999999999999999999999999999999E+6144 -> -Normal
dqcla039 class -Inf -> -Infinity
dqcla041 class NaN -> NaN
dqcla042 class -NaN -> NaN
dqcla043 class +NaN12345 -> NaN
dqcla044 class sNaN -> sNaN
dqcla045 class -sNaN -> sNaN
dqcla046 class +sNaN12345 -> sNaN
------------------------------------------------------------------------
-- dqClass.decTest -- decQuad 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]
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
dqcla001 class 0 -> +Zero
dqcla002 class 0.00 -> +Zero
dqcla003 class 0E+5 -> +Zero
dqcla004 class 1E-6176 -> +Subnormal
dqcla005 class 0.1E-6143 -> +Subnormal
dqcla006 class 0.99999999999999999999999999999999E-6143 -> +Subnormal
dqcla007 class 1.00000000000000000000000000000000E-6143 -> +Normal
dqcla008 class 1E-6143 -> +Normal
dqcla009 class 1E-100 -> +Normal
dqcla010 class 1E-10 -> +Normal
dqcla012 class 1E-1 -> +Normal
dqcla013 class 1 -> +Normal
dqcla014 class 2.50 -> +Normal
dqcla015 class 100.100 -> +Normal
dqcla016 class 1E+30 -> +Normal
dqcla017 class 1E+6144 -> +Normal
dqcla018 class 9.99999999999999999999999999999999E+6144 -> +Normal
dqcla019 class Inf -> +Infinity
dqcla021 class -0 -> -Zero
dqcla022 class -0.00 -> -Zero
dqcla023 class -0E+5 -> -Zero
dqcla024 class -1E-6176 -> -Subnormal
dqcla025 class -0.1E-6143 -> -Subnormal
dqcla026 class -0.99999999999999999999999999999999E-6143 -> -Subnormal
dqcla027 class -1.00000000000000000000000000000000E-6143 -> -Normal
dqcla028 class -1E-6143 -> -Normal
dqcla029 class -1E-100 -> -Normal
dqcla030 class -1E-10 -> -Normal
dqcla032 class -1E-1 -> -Normal
dqcla033 class -1 -> -Normal
dqcla034 class -2.50 -> -Normal
dqcla035 class -100.100 -> -Normal
dqcla036 class -1E+30 -> -Normal
dqcla037 class -1E+6144 -> -Normal
dqcla0614 class -9.99999999999999999999999999999999E+6144 -> -Normal
dqcla039 class -Inf -> -Infinity
dqcla041 class NaN -> NaN
dqcla042 class -NaN -> NaN
dqcla043 class +NaN12345 -> NaN
dqcla044 class sNaN -> sNaN
dqcla045 class -sNaN -> sNaN
dqcla046 class +sNaN12345 -> sNaN

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,88 +1,88 @@
------------------------------------------------------------------------
-- dqCopy.decTest -- quiet decQuad 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 decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check
dqcpy001 copy +7.50 -> 7.50
-- Infinities
dqcpy011 copy Infinity -> Infinity
dqcpy012 copy -Infinity -> -Infinity
-- NaNs, 0 payload
dqcpy021 copy NaN -> NaN
dqcpy022 copy -NaN -> -NaN
dqcpy023 copy sNaN -> sNaN
dqcpy024 copy -sNaN -> -sNaN
-- NaNs, non-0 payload
dqcpy031 copy NaN10 -> NaN10
dqcpy032 copy -NaN10 -> -NaN10
dqcpy033 copy sNaN10 -> sNaN10
dqcpy034 copy -sNaN10 -> -sNaN10
dqcpy035 copy NaN7 -> NaN7
dqcpy036 copy -NaN7 -> -NaN7
dqcpy037 copy sNaN101 -> sNaN101
dqcpy038 copy -sNaN101 -> -sNaN101
-- finites
dqcpy101 copy 7 -> 7
dqcpy102 copy -7 -> -7
dqcpy103 copy 75 -> 75
dqcpy104 copy -75 -> -75
dqcpy105 copy 7.50 -> 7.50
dqcpy106 copy -7.50 -> -7.50
dqcpy107 copy 7.500 -> 7.500
dqcpy108 copy -7.500 -> -7.500
-- zeros
dqcpy111 copy 0 -> 0
dqcpy112 copy -0 -> -0
dqcpy113 copy 0E+4 -> 0E+4
dqcpy114 copy -0E+4 -> -0E+4
dqcpy115 copy 0.0000 -> 0.0000
dqcpy116 copy -0.0000 -> -0.0000
dqcpy117 copy 0E-141 -> 0E-141
dqcpy118 copy -0E-141 -> -0E-141
-- full coefficients, alternating bits
dqcpy121 copy 2682682682682682682682682682682682 -> 2682682682682682682682682682682682
dqcpy122 copy -2682682682682682682682682682682682 -> -2682682682682682682682682682682682
dqcpy123 copy 1341341341341341341341341341341341 -> 1341341341341341341341341341341341
dqcpy124 copy -1341341341341341341341341341341341 -> -1341341341341341341341341341341341
-- Nmax, Nmin, Ntiny
dqcpy131 copy 9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144
dqcpy132 copy 1E-6143 -> 1E-6143
dqcpy133 copy 1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
dqcpy134 copy 1E-6176 -> 1E-6176
dqcpy135 copy -1E-6176 -> -1E-6176
dqcpy136 copy -1.000000000000000000000000000000000E-6143 -> -1.000000000000000000000000000000000E-6143
dqcpy137 copy -1E-6143 -> -1E-6143
dqcpy138 copy -9.999999999999999999999999999999999E+6144 -> -9.999999999999999999999999999999999E+6144
------------------------------------------------------------------------
-- dqCopy.decTest -- quiet decQuad 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 decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check
dqcpy001 copy +7.50 -> 7.50
-- Infinities
dqcpy011 copy Infinity -> Infinity
dqcpy012 copy -Infinity -> -Infinity
-- NaNs, 0 payload
dqcpy021 copy NaN -> NaN
dqcpy022 copy -NaN -> -NaN
dqcpy023 copy sNaN -> sNaN
dqcpy024 copy -sNaN -> -sNaN
-- NaNs, non-0 payload
dqcpy031 copy NaN10 -> NaN10
dqcpy032 copy -NaN10 -> -NaN10
dqcpy033 copy sNaN10 -> sNaN10
dqcpy034 copy -sNaN10 -> -sNaN10
dqcpy035 copy NaN7 -> NaN7
dqcpy036 copy -NaN7 -> -NaN7
dqcpy037 copy sNaN101 -> sNaN101
dqcpy038 copy -sNaN101 -> -sNaN101
-- finites
dqcpy101 copy 7 -> 7
dqcpy102 copy -7 -> -7
dqcpy103 copy 75 -> 75
dqcpy104 copy -75 -> -75
dqcpy105 copy 7.50 -> 7.50
dqcpy106 copy -7.50 -> -7.50
dqcpy107 copy 7.500 -> 7.500
dqcpy108 copy -7.500 -> -7.500
-- zeros
dqcpy111 copy 0 -> 0
dqcpy112 copy -0 -> -0
dqcpy113 copy 0E+4 -> 0E+4
dqcpy114 copy -0E+4 -> -0E+4
dqcpy115 copy 0.0000 -> 0.0000
dqcpy116 copy -0.0000 -> -0.0000
dqcpy117 copy 0E-141 -> 0E-141
dqcpy118 copy -0E-141 -> -0E-141
-- full coefficients, alternating bits
dqcpy121 copy 2682682682682682682682682682682682 -> 2682682682682682682682682682682682
dqcpy122 copy -2682682682682682682682682682682682 -> -2682682682682682682682682682682682
dqcpy123 copy 1341341341341341341341341341341341 -> 1341341341341341341341341341341341
dqcpy124 copy -1341341341341341341341341341341341 -> -1341341341341341341341341341341341
-- Nmax, Nmin, Ntiny
dqcpy131 copy 9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144
dqcpy132 copy 1E-6143 -> 1E-6143
dqcpy133 copy 1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
dqcpy134 copy 1E-6176 -> 1E-6176
dqcpy135 copy -1E-6176 -> -1E-6176
dqcpy136 copy -1.000000000000000000000000000000000E-6143 -> -1.000000000000000000000000000000000E-6143
dqcpy137 copy -1E-6143 -> -1E-6143
dqcpy138 copy -9.999999999999999999999999999999999E+6144 -> -9.999999999999999999999999999999999E+6144

View file

@ -1,88 +1,88 @@
------------------------------------------------------------------------
-- dqCopyAbs.decTest -- quiet decQuad 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 decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check
dqcpa001 copyabs +7.50 -> 7.50
-- Infinities
dqcpa011 copyabs Infinity -> Infinity
dqcpa012 copyabs -Infinity -> Infinity
-- NaNs, 0 payload
dqcpa021 copyabs NaN -> NaN
dqcpa022 copyabs -NaN -> NaN
dqcpa023 copyabs sNaN -> sNaN
dqcpa024 copyabs -sNaN -> sNaN
-- NaNs, non-0 payload
dqcpa031 copyabs NaN10 -> NaN10
dqcpa032 copyabs -NaN15 -> NaN15
dqcpa033 copyabs sNaN15 -> sNaN15
dqcpa034 copyabs -sNaN10 -> sNaN10
dqcpa035 copyabs NaN7 -> NaN7
dqcpa036 copyabs -NaN7 -> NaN7
dqcpa037 copyabs sNaN101 -> sNaN101
dqcpa038 copyabs -sNaN101 -> sNaN101
-- finites
dqcpa101 copyabs 7 -> 7
dqcpa102 copyabs -7 -> 7
dqcpa103 copyabs 75 -> 75
dqcpa104 copyabs -75 -> 75
dqcpa105 copyabs 7.10 -> 7.10
dqcpa106 copyabs -7.10 -> 7.10
dqcpa107 copyabs 7.500 -> 7.500
dqcpa108 copyabs -7.500 -> 7.500
-- zeros
dqcpa111 copyabs 0 -> 0
dqcpa112 copyabs -0 -> 0
dqcpa113 copyabs 0E+6 -> 0E+6
dqcpa114 copyabs -0E+6 -> 0E+6
dqcpa115 copyabs 0.0000 -> 0.0000
dqcpa116 copyabs -0.0000 -> 0.0000
dqcpa117 copyabs 0E-141 -> 0E-141
dqcpa118 copyabs -0E-141 -> 0E-141
-- full coefficients, alternating bits
dqcpa121 copyabs 2682682682682682682682682682682682 -> 2682682682682682682682682682682682
dqcpa122 copyabs -2682682682682682682682682682682682 -> 2682682682682682682682682682682682
dqcpa123 copyabs 1341341341341341341341341341341341 -> 1341341341341341341341341341341341
dqcpa124 copyabs -1341341341341341341341341341341341 -> 1341341341341341341341341341341341
-- Nmax, Nmin, Ntiny
dqcpa131 copyabs 9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144
dqcpa132 copyabs 1E-6143 -> 1E-6143
dqcpa133 copyabs 1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
dqcpa134 copyabs 1E-6176 -> 1E-6176
dqcpa135 copyabs -1E-6176 -> 1E-6176
dqcpa136 copyabs -1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
dqcpa137 copyabs -1E-6143 -> 1E-6143
dqcpa138 copyabs -9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144
------------------------------------------------------------------------
-- dqCopyAbs.decTest -- quiet decQuad 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 decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check
dqcpa001 copyabs +7.50 -> 7.50
-- Infinities
dqcpa011 copyabs Infinity -> Infinity
dqcpa012 copyabs -Infinity -> Infinity
-- NaNs, 0 payload
dqcpa021 copyabs NaN -> NaN
dqcpa022 copyabs -NaN -> NaN
dqcpa023 copyabs sNaN -> sNaN
dqcpa024 copyabs -sNaN -> sNaN
-- NaNs, non-0 payload
dqcpa031 copyabs NaN10 -> NaN10
dqcpa032 copyabs -NaN15 -> NaN15
dqcpa033 copyabs sNaN15 -> sNaN15
dqcpa034 copyabs -sNaN10 -> sNaN10
dqcpa035 copyabs NaN7 -> NaN7
dqcpa036 copyabs -NaN7 -> NaN7
dqcpa037 copyabs sNaN101 -> sNaN101
dqcpa038 copyabs -sNaN101 -> sNaN101
-- finites
dqcpa101 copyabs 7 -> 7
dqcpa102 copyabs -7 -> 7
dqcpa103 copyabs 75 -> 75
dqcpa104 copyabs -75 -> 75
dqcpa105 copyabs 7.10 -> 7.10
dqcpa106 copyabs -7.10 -> 7.10
dqcpa107 copyabs 7.500 -> 7.500
dqcpa108 copyabs -7.500 -> 7.500
-- zeros
dqcpa111 copyabs 0 -> 0
dqcpa112 copyabs -0 -> 0
dqcpa113 copyabs 0E+6 -> 0E+6
dqcpa114 copyabs -0E+6 -> 0E+6
dqcpa115 copyabs 0.0000 -> 0.0000
dqcpa116 copyabs -0.0000 -> 0.0000
dqcpa117 copyabs 0E-141 -> 0E-141
dqcpa118 copyabs -0E-141 -> 0E-141
-- full coefficients, alternating bits
dqcpa121 copyabs 2682682682682682682682682682682682 -> 2682682682682682682682682682682682
dqcpa122 copyabs -2682682682682682682682682682682682 -> 2682682682682682682682682682682682
dqcpa123 copyabs 1341341341341341341341341341341341 -> 1341341341341341341341341341341341
dqcpa124 copyabs -1341341341341341341341341341341341 -> 1341341341341341341341341341341341
-- Nmax, Nmin, Ntiny
dqcpa131 copyabs 9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144
dqcpa132 copyabs 1E-6143 -> 1E-6143
dqcpa133 copyabs 1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
dqcpa134 copyabs 1E-6176 -> 1E-6176
dqcpa135 copyabs -1E-6176 -> 1E-6176
dqcpa136 copyabs -1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
dqcpa137 copyabs -1E-6143 -> 1E-6143
dqcpa138 copyabs -9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144

View file

@ -1,88 +1,88 @@
------------------------------------------------------------------------
-- dqCopyNegate.decTest -- quiet decQuad 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 decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check
dqcpn001 copynegate +7.50 -> -7.50
-- Infinities
dqcpn011 copynegate Infinity -> -Infinity
dqcpn012 copynegate -Infinity -> Infinity
-- NaNs, 0 payload
dqcpn021 copynegate NaN -> -NaN
dqcpn022 copynegate -NaN -> NaN
dqcpn023 copynegate sNaN -> -sNaN
dqcpn024 copynegate -sNaN -> sNaN
-- NaNs, non-0 payload
dqcpn031 copynegate NaN13 -> -NaN13
dqcpn032 copynegate -NaN13 -> NaN13
dqcpn033 copynegate sNaN13 -> -sNaN13
dqcpn034 copynegate -sNaN13 -> sNaN13
dqcpn035 copynegate NaN70 -> -NaN70
dqcpn036 copynegate -NaN70 -> NaN70
dqcpn037 copynegate sNaN101 -> -sNaN101
dqcpn038 copynegate -sNaN101 -> sNaN101
-- finites
dqcpn101 copynegate 7 -> -7
dqcpn102 copynegate -7 -> 7
dqcpn103 copynegate 75 -> -75
dqcpn104 copynegate -75 -> 75
dqcpn105 copynegate 7.50 -> -7.50
dqcpn106 copynegate -7.50 -> 7.50
dqcpn107 copynegate 7.500 -> -7.500
dqcpn108 copynegate -7.500 -> 7.500
-- zeros
dqcpn111 copynegate 0 -> -0
dqcpn112 copynegate -0 -> 0
dqcpn113 copynegate 0E+4 -> -0E+4
dqcpn114 copynegate -0E+4 -> 0E+4
dqcpn115 copynegate 0.0000 -> -0.0000
dqcpn116 copynegate -0.0000 -> 0.0000
dqcpn117 copynegate 0E-141 -> -0E-141
dqcpn118 copynegate -0E-141 -> 0E-141
-- full coefficients, alternating bits
dqcpn121 copynegate 2682682682682682682682682682682682 -> -2682682682682682682682682682682682
dqcpn122 copynegate -2682682682682682682682682682682682 -> 2682682682682682682682682682682682
dqcpn123 copynegate 1341341341341341341341341341341341 -> -1341341341341341341341341341341341
dqcpn124 copynegate -1341341341341341341341341341341341 -> 1341341341341341341341341341341341
-- Nmax, Nmin, Ntiny
dqcpn131 copynegate 9.999999999999999999999999999999999E+6144 -> -9.999999999999999999999999999999999E+6144
dqcpn132 copynegate 1E-6143 -> -1E-6143
dqcpn133 copynegate 1.000000000000000000000000000000000E-6143 -> -1.000000000000000000000000000000000E-6143
dqcpn134 copynegate 1E-6176 -> -1E-6176
dqcpn135 copynegate -1E-6176 -> 1E-6176
dqcpn136 copynegate -1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
dqcpn137 copynegate -1E-6143 -> 1E-6143
dqcpn138 copynegate -9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144
------------------------------------------------------------------------
-- dqCopyNegate.decTest -- quiet decQuad 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 decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check
dqcpn001 copynegate +7.50 -> -7.50
-- Infinities
dqcpn011 copynegate Infinity -> -Infinity
dqcpn012 copynegate -Infinity -> Infinity
-- NaNs, 0 payload
dqcpn021 copynegate NaN -> -NaN
dqcpn022 copynegate -NaN -> NaN
dqcpn023 copynegate sNaN -> -sNaN
dqcpn024 copynegate -sNaN -> sNaN
-- NaNs, non-0 payload
dqcpn031 copynegate NaN13 -> -NaN13
dqcpn032 copynegate -NaN13 -> NaN13
dqcpn033 copynegate sNaN13 -> -sNaN13
dqcpn034 copynegate -sNaN13 -> sNaN13
dqcpn035 copynegate NaN70 -> -NaN70
dqcpn036 copynegate -NaN70 -> NaN70
dqcpn037 copynegate sNaN101 -> -sNaN101
dqcpn038 copynegate -sNaN101 -> sNaN101
-- finites
dqcpn101 copynegate 7 -> -7
dqcpn102 copynegate -7 -> 7
dqcpn103 copynegate 75 -> -75
dqcpn104 copynegate -75 -> 75
dqcpn105 copynegate 7.50 -> -7.50
dqcpn106 copynegate -7.50 -> 7.50
dqcpn107 copynegate 7.500 -> -7.500
dqcpn108 copynegate -7.500 -> 7.500
-- zeros
dqcpn111 copynegate 0 -> -0
dqcpn112 copynegate -0 -> 0
dqcpn113 copynegate 0E+4 -> -0E+4
dqcpn114 copynegate -0E+4 -> 0E+4
dqcpn115 copynegate 0.0000 -> -0.0000
dqcpn116 copynegate -0.0000 -> 0.0000
dqcpn117 copynegate 0E-141 -> -0E-141
dqcpn118 copynegate -0E-141 -> 0E-141
-- full coefficients, alternating bits
dqcpn121 copynegate 2682682682682682682682682682682682 -> -2682682682682682682682682682682682
dqcpn122 copynegate -2682682682682682682682682682682682 -> 2682682682682682682682682682682682
dqcpn123 copynegate 1341341341341341341341341341341341 -> -1341341341341341341341341341341341
dqcpn124 copynegate -1341341341341341341341341341341341 -> 1341341341341341341341341341341341
-- Nmax, Nmin, Ntiny
dqcpn131 copynegate 9.999999999999999999999999999999999E+6144 -> -9.999999999999999999999999999999999E+6144
dqcpn132 copynegate 1E-6143 -> -1E-6143
dqcpn133 copynegate 1.000000000000000000000000000000000E-6143 -> -1.000000000000000000000000000000000E-6143
dqcpn134 copynegate 1E-6176 -> -1E-6176
dqcpn135 copynegate -1E-6176 -> 1E-6176
dqcpn136 copynegate -1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
dqcpn137 copynegate -1E-6143 -> 1E-6143
dqcpn138 copynegate -9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144

View file

@ -1,175 +1,175 @@
------------------------------------------------------------------------
-- dqCopySign.decTest -- quiet decQuad 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 decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check
dqcps001 copysign +7.50 11 -> 7.50
-- Infinities
dqcps011 copysign Infinity 11 -> Infinity
dqcps012 copysign -Infinity 11 -> Infinity
-- NaNs, 0 payload
dqcps021 copysign NaN 11 -> NaN
dqcps022 copysign -NaN 11 -> NaN
dqcps023 copysign sNaN 11 -> sNaN
dqcps024 copysign -sNaN 11 -> sNaN
-- NaNs, non-0 payload
dqcps031 copysign NaN10 11 -> NaN10
dqcps032 copysign -NaN10 11 -> NaN10
dqcps033 copysign sNaN10 11 -> sNaN10
dqcps034 copysign -sNaN10 11 -> sNaN10
dqcps035 copysign NaN7 11 -> NaN7
dqcps036 copysign -NaN7 11 -> NaN7
dqcps037 copysign sNaN101 11 -> sNaN101
dqcps038 copysign -sNaN101 11 -> sNaN101
-- finites
dqcps101 copysign 7 11 -> 7
dqcps102 copysign -7 11 -> 7
dqcps103 copysign 75 11 -> 75
dqcps104 copysign -75 11 -> 75
dqcps105 copysign 7.50 11 -> 7.50
dqcps106 copysign -7.50 11 -> 7.50
dqcps107 copysign 7.500 11 -> 7.500
dqcps108 copysign -7.500 11 -> 7.500
-- zeros
dqcps111 copysign 0 11 -> 0
dqcps112 copysign -0 11 -> 0
dqcps113 copysign 0E+4 11 -> 0E+4
dqcps114 copysign -0E+4 11 -> 0E+4
dqcps115 copysign 0.0000 11 -> 0.0000
dqcps116 copysign -0.0000 11 -> 0.0000
dqcps117 copysign 0E-141 11 -> 0E-141
dqcps118 copysign -0E-141 11 -> 0E-141
-- full coefficients, alternating bits
dqcps121 copysign 2682682682682682682682682682682682 8 -> 2682682682682682682682682682682682
dqcps122 copysign -2682682682682682682682682682682682 8 -> 2682682682682682682682682682682682
dqcps123 copysign 1341341341341341341341341341341341 8 -> 1341341341341341341341341341341341
dqcps124 copysign -1341341341341341341341341341341341 8 -> 1341341341341341341341341341341341
-- Nmax, Nmin, Ntiny
dqcps131 copysign 9.999999999999999999999999999999999E+6144 8 -> 9.999999999999999999999999999999999E+6144
dqcps132 copysign 1E-6143 8 -> 1E-6143
dqcps133 copysign 1.000000000000000000000000000000000E-6143 8 -> 1.000000000000000000000000000000000E-6143
dqcps134 copysign 1E-6176 8 -> 1E-6176
dqcps135 copysign -1E-6176 8 -> 1E-6176
dqcps136 copysign -1.000000000000000000000000000000000E-6143 8 -> 1.000000000000000000000000000000000E-6143
dqcps137 copysign -1E-6143 8 -> 1E-6143
dqcps138 copysign -9.999999999999999999999999999999999E+6144 8 -> 9.999999999999999999999999999999999E+6144
-- repeat with negative RHS
-- Infinities
dqcps211 copysign Infinity -34 -> -Infinity
dqcps212 copysign -Infinity -34 -> -Infinity
-- NaNs, 0 payload
dqcps221 copysign NaN -34 -> -NaN
dqcps222 copysign -NaN -34 -> -NaN
dqcps223 copysign sNaN -34 -> -sNaN
dqcps224 copysign -sNaN -34 -> -sNaN
-- NaNs, non-0 payload
dqcps231 copysign NaN10 -34 -> -NaN10
dqcps232 copysign -NaN10 -34 -> -NaN10
dqcps233 copysign sNaN10 -34 -> -sNaN10
dqcps234 copysign -sNaN10 -34 -> -sNaN10
dqcps235 copysign NaN7 -34 -> -NaN7
dqcps236 copysign -NaN7 -34 -> -NaN7
dqcps237 copysign sNaN101 -34 -> -sNaN101
dqcps238 copysign -sNaN101 -34 -> -sNaN101
-- finites
dqcps301 copysign 7 -34 -> -7
dqcps302 copysign -7 -34 -> -7
dqcps303 copysign 75 -34 -> -75
dqcps304 copysign -75 -34 -> -75
dqcps305 copysign 7.50 -34 -> -7.50
dqcps306 copysign -7.50 -34 -> -7.50
dqcps307 copysign 7.500 -34 -> -7.500
dqcps308 copysign -7.500 -34 -> -7.500
-- zeros
dqcps311 copysign 0 -34 -> -0
dqcps312 copysign -0 -34 -> -0
dqcps313 copysign 0E+4 -34 -> -0E+4
dqcps314 copysign -0E+4 -34 -> -0E+4
dqcps315 copysign 0.0000 -34 -> -0.0000
dqcps316 copysign -0.0000 -34 -> -0.0000
dqcps317 copysign 0E-141 -34 -> -0E-141
dqcps318 copysign -0E-141 -34 -> -0E-141
-- full coefficients, alternating bits
dqcps321 copysign 2682682682682682682682682682682682 -9 -> -2682682682682682682682682682682682
dqcps322 copysign -2682682682682682682682682682682682 -9 -> -2682682682682682682682682682682682
dqcps323 copysign 1341341341341341341341341341341341 -9 -> -1341341341341341341341341341341341
dqcps324 copysign -1341341341341341341341341341341341 -9 -> -1341341341341341341341341341341341
-- Nmax, Nmin, Ntiny
dqcps331 copysign 9.999999999999999999999999999999999E+6144 -1 -> -9.999999999999999999999999999999999E+6144
dqcps332 copysign 1E-6143 -1 -> -1E-6143
dqcps333 copysign 1.000000000000000000000000000000000E-6143 -1 -> -1.000000000000000000000000000000000E-6143
dqcps334 copysign 1E-6176 -1 -> -1E-6176
dqcps335 copysign -1E-6176 -3 -> -1E-6176
dqcps336 copysign -1.000000000000000000000000000000000E-6143 -3 -> -1.000000000000000000000000000000000E-6143
dqcps337 copysign -1E-6143 -3 -> -1E-6143
dqcps338 copysign -9.999999999999999999999999999999999E+6144 -3 -> -9.999999999999999999999999999999999E+6144
-- Other kinds of RHS
dqcps401 copysign 701 -34 -> -701
dqcps402 copysign -720 -34 -> -720
dqcps403 copysign 701 -0 -> -701
dqcps404 copysign -720 -0 -> -720
dqcps405 copysign 701 +0 -> 701
dqcps406 copysign -720 +0 -> 720
dqcps407 copysign 701 +34 -> 701
dqcps408 copysign -720 +34 -> 720
dqcps413 copysign 701 -Inf -> -701
dqcps414 copysign -720 -Inf -> -720
dqcps415 copysign 701 +Inf -> 701
dqcps416 copysign -720 +Inf -> 720
dqcps420 copysign 701 -NaN -> -701
dqcps421 copysign -720 -NaN -> -720
dqcps422 copysign 701 +NaN -> 701
dqcps423 copysign -720 +NaN -> 720
dqcps425 copysign -720 +NaN8 -> 720
dqcps426 copysign 701 -sNaN -> -701
dqcps427 copysign -720 -sNaN -> -720
dqcps428 copysign 701 +sNaN -> 701
dqcps429 copysign -720 +sNaN -> 720
dqcps430 copysign -720 +sNaN3 -> 720
------------------------------------------------------------------------
-- dqCopySign.decTest -- quiet decQuad 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 decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check
dqcps001 copysign +7.50 11 -> 7.50
-- Infinities
dqcps011 copysign Infinity 11 -> Infinity
dqcps012 copysign -Infinity 11 -> Infinity
-- NaNs, 0 payload
dqcps021 copysign NaN 11 -> NaN
dqcps022 copysign -NaN 11 -> NaN
dqcps023 copysign sNaN 11 -> sNaN
dqcps024 copysign -sNaN 11 -> sNaN
-- NaNs, non-0 payload
dqcps031 copysign NaN10 11 -> NaN10
dqcps032 copysign -NaN10 11 -> NaN10
dqcps033 copysign sNaN10 11 -> sNaN10
dqcps034 copysign -sNaN10 11 -> sNaN10
dqcps035 copysign NaN7 11 -> NaN7
dqcps036 copysign -NaN7 11 -> NaN7
dqcps037 copysign sNaN101 11 -> sNaN101
dqcps038 copysign -sNaN101 11 -> sNaN101
-- finites
dqcps101 copysign 7 11 -> 7
dqcps102 copysign -7 11 -> 7
dqcps103 copysign 75 11 -> 75
dqcps104 copysign -75 11 -> 75
dqcps105 copysign 7.50 11 -> 7.50
dqcps106 copysign -7.50 11 -> 7.50
dqcps107 copysign 7.500 11 -> 7.500
dqcps108 copysign -7.500 11 -> 7.500
-- zeros
dqcps111 copysign 0 11 -> 0
dqcps112 copysign -0 11 -> 0
dqcps113 copysign 0E+4 11 -> 0E+4
dqcps114 copysign -0E+4 11 -> 0E+4
dqcps115 copysign 0.0000 11 -> 0.0000
dqcps116 copysign -0.0000 11 -> 0.0000
dqcps117 copysign 0E-141 11 -> 0E-141
dqcps118 copysign -0E-141 11 -> 0E-141
-- full coefficients, alternating bits
dqcps121 copysign 2682682682682682682682682682682682 8 -> 2682682682682682682682682682682682
dqcps122 copysign -2682682682682682682682682682682682 8 -> 2682682682682682682682682682682682
dqcps123 copysign 1341341341341341341341341341341341 8 -> 1341341341341341341341341341341341
dqcps124 copysign -1341341341341341341341341341341341 8 -> 1341341341341341341341341341341341
-- Nmax, Nmin, Ntiny
dqcps131 copysign 9.999999999999999999999999999999999E+6144 8 -> 9.999999999999999999999999999999999E+6144
dqcps132 copysign 1E-6143 8 -> 1E-6143
dqcps133 copysign 1.000000000000000000000000000000000E-6143 8 -> 1.000000000000000000000000000000000E-6143
dqcps134 copysign 1E-6176 8 -> 1E-6176
dqcps135 copysign -1E-6176 8 -> 1E-6176
dqcps136 copysign -1.000000000000000000000000000000000E-6143 8 -> 1.000000000000000000000000000000000E-6143
dqcps137 copysign -1E-6143 8 -> 1E-6143
dqcps138 copysign -9.999999999999999999999999999999999E+6144 8 -> 9.999999999999999999999999999999999E+6144
-- repeat with negative RHS
-- Infinities
dqcps211 copysign Infinity -34 -> -Infinity
dqcps212 copysign -Infinity -34 -> -Infinity
-- NaNs, 0 payload
dqcps221 copysign NaN -34 -> -NaN
dqcps222 copysign -NaN -34 -> -NaN
dqcps223 copysign sNaN -34 -> -sNaN
dqcps224 copysign -sNaN -34 -> -sNaN
-- NaNs, non-0 payload
dqcps231 copysign NaN10 -34 -> -NaN10
dqcps232 copysign -NaN10 -34 -> -NaN10
dqcps233 copysign sNaN10 -34 -> -sNaN10
dqcps234 copysign -sNaN10 -34 -> -sNaN10
dqcps235 copysign NaN7 -34 -> -NaN7
dqcps236 copysign -NaN7 -34 -> -NaN7
dqcps237 copysign sNaN101 -34 -> -sNaN101
dqcps238 copysign -sNaN101 -34 -> -sNaN101
-- finites
dqcps301 copysign 7 -34 -> -7
dqcps302 copysign -7 -34 -> -7
dqcps303 copysign 75 -34 -> -75
dqcps304 copysign -75 -34 -> -75
dqcps305 copysign 7.50 -34 -> -7.50
dqcps306 copysign -7.50 -34 -> -7.50
dqcps307 copysign 7.500 -34 -> -7.500
dqcps308 copysign -7.500 -34 -> -7.500
-- zeros
dqcps311 copysign 0 -34 -> -0
dqcps312 copysign -0 -34 -> -0
dqcps313 copysign 0E+4 -34 -> -0E+4
dqcps314 copysign -0E+4 -34 -> -0E+4
dqcps315 copysign 0.0000 -34 -> -0.0000
dqcps316 copysign -0.0000 -34 -> -0.0000
dqcps317 copysign 0E-141 -34 -> -0E-141
dqcps318 copysign -0E-141 -34 -> -0E-141
-- full coefficients, alternating bits
dqcps321 copysign 2682682682682682682682682682682682 -9 -> -2682682682682682682682682682682682
dqcps322 copysign -2682682682682682682682682682682682 -9 -> -2682682682682682682682682682682682
dqcps323 copysign 1341341341341341341341341341341341 -9 -> -1341341341341341341341341341341341
dqcps324 copysign -1341341341341341341341341341341341 -9 -> -1341341341341341341341341341341341
-- Nmax, Nmin, Ntiny
dqcps331 copysign 9.999999999999999999999999999999999E+6144 -1 -> -9.999999999999999999999999999999999E+6144
dqcps332 copysign 1E-6143 -1 -> -1E-6143
dqcps333 copysign 1.000000000000000000000000000000000E-6143 -1 -> -1.000000000000000000000000000000000E-6143
dqcps334 copysign 1E-6176 -1 -> -1E-6176
dqcps335 copysign -1E-6176 -3 -> -1E-6176
dqcps336 copysign -1.000000000000000000000000000000000E-6143 -3 -> -1.000000000000000000000000000000000E-6143
dqcps337 copysign -1E-6143 -3 -> -1E-6143
dqcps338 copysign -9.999999999999999999999999999999999E+6144 -3 -> -9.999999999999999999999999999999999E+6144
-- Other kinds of RHS
dqcps401 copysign 701 -34 -> -701
dqcps402 copysign -720 -34 -> -720
dqcps403 copysign 701 -0 -> -701
dqcps404 copysign -720 -0 -> -720
dqcps405 copysign 701 +0 -> 701
dqcps406 copysign -720 +0 -> 720
dqcps407 copysign 701 +34 -> 701
dqcps408 copysign -720 +34 -> 720
dqcps413 copysign 701 -Inf -> -701
dqcps414 copysign -720 -Inf -> -720
dqcps415 copysign 701 +Inf -> 701
dqcps416 copysign -720 +Inf -> 720
dqcps420 copysign 701 -NaN -> -701
dqcps421 copysign -720 -NaN -> -720
dqcps422 copysign 701 +NaN -> 701
dqcps423 copysign -720 +NaN -> 720
dqcps425 copysign -720 +NaN8 -> 720
dqcps426 copysign 701 -sNaN -> -701
dqcps427 copysign -720 -sNaN -> -720
dqcps428 copysign 701 +sNaN -> 701
dqcps429 copysign -720 +sNaN -> 720
dqcps430 copysign -720 +sNaN3 -> 720

File diff suppressed because it is too large Load diff

View file

@ -1,453 +1,453 @@
------------------------------------------------------------------------
-- dqDivideInt.decTest -- decQuad 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
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
dqdvi001 divideint 1 1 -> 1
dqdvi002 divideint 2 1 -> 2
dqdvi003 divideint 1 2 -> 0
dqdvi004 divideint 2 2 -> 1
dqdvi005 divideint 0 1 -> 0
dqdvi006 divideint 0 2 -> 0
dqdvi007 divideint 1 3 -> 0
dqdvi008 divideint 2 3 -> 0
dqdvi009 divideint 3 3 -> 1
dqdvi010 divideint 2.4 1 -> 2
dqdvi011 divideint 2.4 -1 -> -2
dqdvi012 divideint -2.4 1 -> -2
dqdvi013 divideint -2.4 -1 -> 2
dqdvi014 divideint 2.40 1 -> 2
dqdvi015 divideint 2.400 1 -> 2
dqdvi016 divideint 2.4 2 -> 1
dqdvi017 divideint 2.400 2 -> 1
dqdvi018 divideint 2. 2 -> 1
dqdvi019 divideint 20 20 -> 1
dqdvi020 divideint 187 187 -> 1
dqdvi021 divideint 5 2 -> 2
dqdvi022 divideint 5 2.0 -> 2
dqdvi023 divideint 5 2.000 -> 2
dqdvi024 divideint 5 0.200 -> 25
dqdvi025 divideint 5 0.200 -> 25
dqdvi030 divideint 1 2 -> 0
dqdvi031 divideint 1 4 -> 0
dqdvi032 divideint 1 8 -> 0
dqdvi033 divideint 1 16 -> 0
dqdvi034 divideint 1 32 -> 0
dqdvi035 divideint 1 64 -> 0
dqdvi040 divideint 1 -2 -> -0
dqdvi041 divideint 1 -4 -> -0
dqdvi042 divideint 1 -8 -> -0
dqdvi043 divideint 1 -16 -> -0
dqdvi044 divideint 1 -32 -> -0
dqdvi045 divideint 1 -64 -> -0
dqdvi050 divideint -1 2 -> -0
dqdvi051 divideint -1 4 -> -0
dqdvi052 divideint -1 8 -> -0
dqdvi053 divideint -1 16 -> -0
dqdvi054 divideint -1 32 -> -0
dqdvi055 divideint -1 64 -> -0
dqdvi060 divideint -1 -2 -> 0
dqdvi061 divideint -1 -4 -> 0
dqdvi062 divideint -1 -8 -> 0
dqdvi063 divideint -1 -16 -> 0
dqdvi064 divideint -1 -32 -> 0
dqdvi065 divideint -1 -64 -> 0
-- similar with powers of ten
dqdvi160 divideint 1 1 -> 1
dqdvi161 divideint 1 10 -> 0
dqdvi162 divideint 1 100 -> 0
dqdvi163 divideint 1 1000 -> 0
dqdvi164 divideint 1 10000 -> 0
dqdvi165 divideint 1 100000 -> 0
dqdvi166 divideint 1 1000000 -> 0
dqdvi167 divideint 1 10000000 -> 0
dqdvi168 divideint 1 100000000 -> 0
dqdvi170 divideint 1 -1 -> -1
dqdvi171 divideint 1 -10 -> -0
dqdvi172 divideint 1 -100 -> -0
dqdvi173 divideint 1 -1000 -> -0
dqdvi174 divideint 1 -10000 -> -0
dqdvi175 divideint 1 -100000 -> -0
dqdvi176 divideint 1 -1000000 -> -0
dqdvi177 divideint 1 -10000000 -> -0
dqdvi178 divideint 1 -100000000 -> -0
dqdvi180 divideint -1 1 -> -1
dqdvi181 divideint -1 10 -> -0
dqdvi182 divideint -1 100 -> -0
dqdvi183 divideint -1 1000 -> -0
dqdvi184 divideint -1 10000 -> -0
dqdvi185 divideint -1 100000 -> -0
dqdvi186 divideint -1 1000000 -> -0
dqdvi187 divideint -1 10000000 -> -0
dqdvi188 divideint -1 100000000 -> -0
dqdvi190 divideint -1 -1 -> 1
dqdvi191 divideint -1 -10 -> 0
dqdvi192 divideint -1 -100 -> 0
dqdvi193 divideint -1 -1000 -> 0
dqdvi194 divideint -1 -10000 -> 0
dqdvi195 divideint -1 -100000 -> 0
dqdvi196 divideint -1 -1000000 -> 0
dqdvi197 divideint -1 -10000000 -> 0
dqdvi198 divideint -1 -100000000 -> 0
-- some long operand (at p=9) cases
dqdvi070 divideint 999999999 1 -> 999999999
dqdvi071 divideint 999999999.4 1 -> 999999999
dqdvi072 divideint 999999999.5 1 -> 999999999
dqdvi073 divideint 999999999.9 1 -> 999999999
dqdvi074 divideint 999999999.999 1 -> 999999999
dqdvi090 divideint 0. 1 -> 0
dqdvi091 divideint .0 1 -> 0
dqdvi092 divideint 0.00 1 -> 0
dqdvi093 divideint 0.00E+9 1 -> 0
dqdvi094 divideint 0.0000E-50 1 -> 0
dqdvi100 divideint 1 1 -> 1
dqdvi101 divideint 1 2 -> 0
dqdvi102 divideint 1 3 -> 0
dqdvi103 divideint 1 4 -> 0
dqdvi104 divideint 1 5 -> 0
dqdvi105 divideint 1 6 -> 0
dqdvi106 divideint 1 7 -> 0
dqdvi107 divideint 1 8 -> 0
dqdvi108 divideint 1 9 -> 0
dqdvi109 divideint 1 10 -> 0
dqdvi110 divideint 1 1 -> 1
dqdvi111 divideint 2 1 -> 2
dqdvi112 divideint 3 1 -> 3
dqdvi113 divideint 4 1 -> 4
dqdvi114 divideint 5 1 -> 5
dqdvi115 divideint 6 1 -> 6
dqdvi116 divideint 7 1 -> 7
dqdvi117 divideint 8 1 -> 8
dqdvi118 divideint 9 1 -> 9
dqdvi119 divideint 10 1 -> 10
-- from DiagBigDecimal
dqdvi131 divideint 101.3 1 -> 101
dqdvi132 divideint 101.0 1 -> 101
dqdvi133 divideint 101.3 3 -> 33
dqdvi134 divideint 101.0 3 -> 33
dqdvi135 divideint 2.4 1 -> 2
dqdvi136 divideint 2.400 1 -> 2
dqdvi137 divideint 18 18 -> 1
dqdvi138 divideint 1120 1000 -> 1
dqdvi139 divideint 2.4 2 -> 1
dqdvi140 divideint 2.400 2 -> 1
dqdvi141 divideint 0.5 2.000 -> 0
dqdvi142 divideint 8.005 7 -> 1
dqdvi143 divideint 5 2 -> 2
dqdvi144 divideint 0 2 -> 0
dqdvi145 divideint 0.00 2 -> 0
-- Others
dqdvi150 divideint 12345 4.999 -> 2469
dqdvi151 divideint 12345 4.99 -> 2473
dqdvi152 divideint 12345 4.9 -> 2519
dqdvi153 divideint 12345 5 -> 2469
dqdvi154 divideint 12345 5.1 -> 2420
dqdvi155 divideint 12345 5.01 -> 2464
dqdvi156 divideint 12345 5.001 -> 2468
dqdvi157 divideint 101 7.6 -> 13
-- Various flavours of divideint by 0
dqdvi201 divideint 0 0 -> NaN Division_undefined
dqdvi202 divideint 0.0E5 0 -> NaN Division_undefined
dqdvi203 divideint 0.000 0 -> NaN Division_undefined
dqdvi204 divideint 0.0001 0 -> Infinity Division_by_zero
dqdvi205 divideint 0.01 0 -> Infinity Division_by_zero
dqdvi206 divideint 0.1 0 -> Infinity Division_by_zero
dqdvi207 divideint 1 0 -> Infinity Division_by_zero
dqdvi208 divideint 1 0.0 -> Infinity Division_by_zero
dqdvi209 divideint 10 0.0 -> Infinity Division_by_zero
dqdvi210 divideint 1E+100 0.0 -> Infinity Division_by_zero
dqdvi211 divideint 1E+380 0 -> Infinity Division_by_zero
dqdvi214 divideint -0.0001 0 -> -Infinity Division_by_zero
dqdvi215 divideint -0.01 0 -> -Infinity Division_by_zero
dqdvi216 divideint -0.1 0 -> -Infinity Division_by_zero
dqdvi217 divideint -1 0 -> -Infinity Division_by_zero
dqdvi218 divideint -1 0.0 -> -Infinity Division_by_zero
dqdvi219 divideint -10 0.0 -> -Infinity Division_by_zero
dqdvi220 divideint -1E+100 0.0 -> -Infinity Division_by_zero
dqdvi221 divideint -1E+380 0 -> -Infinity Division_by_zero
-- test some cases that are close to exponent overflow
dqdvi270 divideint 1 1e384 -> 0
dqdvi271 divideint 1 0.9e384 -> 0
dqdvi272 divideint 1 0.99e384 -> 0
dqdvi273 divideint 1 0.9999999999999999e384 -> 0
dqdvi274 divideint 9e384 1 -> NaN Division_impossible
dqdvi275 divideint 9.9e384 1 -> NaN Division_impossible
dqdvi276 divideint 9.99e384 1 -> NaN Division_impossible
dqdvi277 divideint 9.999999999999999e384 1 -> NaN Division_impossible
dqdvi280 divideint 0.1 9e-383 -> NaN Division_impossible
dqdvi281 divideint 0.1 99e-383 -> NaN Division_impossible
dqdvi282 divideint 0.1 999e-383 -> NaN Division_impossible
dqdvi283 divideint 0.1 9e-382 -> NaN Division_impossible
dqdvi284 divideint 0.1 99e-382 -> NaN Division_impossible
-- GD edge cases: lhs smaller than rhs but more digits
dqdvi301 divideint 0.9 2 -> 0
dqdvi302 divideint 0.9 2.0 -> 0
dqdvi303 divideint 0.9 2.1 -> 0
dqdvi304 divideint 0.9 2.00 -> 0
dqdvi305 divideint 0.9 2.01 -> 0
dqdvi306 divideint 0.12 1 -> 0
dqdvi307 divideint 0.12 1.0 -> 0
dqdvi308 divideint 0.12 1.00 -> 0
dqdvi309 divideint 0.12 1.0 -> 0
dqdvi310 divideint 0.12 1.00 -> 0
dqdvi311 divideint 0.12 2 -> 0
dqdvi312 divideint 0.12 2.0 -> 0
dqdvi313 divideint 0.12 2.1 -> 0
dqdvi314 divideint 0.12 2.00 -> 0
dqdvi315 divideint 0.12 2.01 -> 0
-- edge cases of impossible
dqdvi330 divideint 1234567987654321987654321890123456 10 -> 123456798765432198765432189012345
dqdvi331 divideint 1234567987654321987654321890123456 1 -> 1234567987654321987654321890123456
dqdvi332 divideint 1234567987654321987654321890123456 0.1 -> NaN Division_impossible
dqdvi333 divideint 1234567987654321987654321890123456 0.01 -> NaN Division_impossible
-- overflow and underflow tests [from divide]
dqdvi1051 divideint 1e+277 1e-311 -> NaN Division_impossible
dqdvi1052 divideint 1e+277 -1e-311 -> NaN Division_impossible
dqdvi1053 divideint -1e+277 1e-311 -> NaN Division_impossible
dqdvi1054 divideint -1e+277 -1e-311 -> NaN Division_impossible
dqdvi1055 divideint 1e-277 1e+311 -> 0
dqdvi1056 divideint 1e-277 -1e+311 -> -0
dqdvi1057 divideint -1e-277 1e+311 -> -0
dqdvi1058 divideint -1e-277 -1e+311 -> 0
-- 'subnormal' boundary (all hard underflow or overflow in base arithemtic)
dqdvi1060 divideint 1e-291 1e+101 -> 0
dqdvi1061 divideint 1e-291 1e+102 -> 0
dqdvi1062 divideint 1e-291 1e+103 -> 0
dqdvi1063 divideint 1e-291 1e+104 -> 0
dqdvi1064 divideint 1e-291 1e+105 -> 0
dqdvi1065 divideint 1e-291 1e+106 -> 0
dqdvi1066 divideint 1e-291 1e+107 -> 0
dqdvi1067 divideint 1e-291 1e+108 -> 0
dqdvi1068 divideint 1e-291 1e+109 -> 0
dqdvi1069 divideint 1e-291 1e+110 -> 0
dqdvi1101 divideint 1.0000E-394 1 -> 0
dqdvi1102 divideint 1.000E-394 1e+1 -> 0
dqdvi1103 divideint 1.00E-394 1e+2 -> 0
dqdvi1118 divideint 1E-394 1e+4 -> 0
dqdvi1119 divideint 3E-394 -1e+5 -> -0
dqdvi1120 divideint 5E-394 1e+5 -> 0
dqdvi1124 divideint 1E-394 -1e+4 -> -0
dqdvi1130 divideint 3.0E-394 -1e+5 -> -0
dqdvi1131 divideint 1.0E-199 1e+200 -> 0
dqdvi1132 divideint 1.0E-199 1e+199 -> 0
dqdvi1133 divideint 1.0E-199 1e+198 -> 0
dqdvi1134 divideint 2.0E-199 2e+198 -> 0
dqdvi1135 divideint 4.0E-199 4e+198 -> 0
-- long operand checks
dqdvi401 divideint 12345678000 100 -> 123456780
dqdvi402 divideint 1 12345678000 -> 0
dqdvi403 divideint 1234567800 10 -> 123456780
dqdvi404 divideint 1 1234567800 -> 0
dqdvi405 divideint 1234567890 10 -> 123456789
dqdvi406 divideint 1 1234567890 -> 0
dqdvi407 divideint 1234567891 10 -> 123456789
dqdvi408 divideint 1 1234567891 -> 0
dqdvi409 divideint 12345678901 100 -> 123456789
dqdvi410 divideint 1 12345678901 -> 0
dqdvi411 divideint 1234567896 10 -> 123456789
dqdvi412 divideint 1 1234567896 -> 0
dqdvi413 divideint 12345678948 100 -> 123456789
dqdvi414 divideint 12345678949 100 -> 123456789
dqdvi415 divideint 12345678950 100 -> 123456789
dqdvi416 divideint 12345678951 100 -> 123456789
dqdvi417 divideint 12345678999 100 -> 123456789
dqdvi441 divideint 12345678000 1 -> 12345678000
dqdvi442 divideint 1 12345678000 -> 0
dqdvi443 divideint 1234567800 1 -> 1234567800
dqdvi444 divideint 1 1234567800 -> 0
dqdvi445 divideint 1234567890 1 -> 1234567890
dqdvi446 divideint 1 1234567890 -> 0
dqdvi447 divideint 1234567891 1 -> 1234567891
dqdvi448 divideint 1 1234567891 -> 0
dqdvi449 divideint 12345678901 1 -> 12345678901
dqdvi450 divideint 1 12345678901 -> 0
dqdvi451 divideint 1234567896 1 -> 1234567896
dqdvi452 divideint 1 1234567896 -> 0
-- more zeros, etc.
dqdvi531 divideint 5.00 1E-3 -> 5000
dqdvi532 divideint 00.00 0.000 -> NaN Division_undefined
dqdvi533 divideint 00.00 0E-3 -> NaN Division_undefined
dqdvi534 divideint 0 -0 -> NaN Division_undefined
dqdvi535 divideint -0 0 -> NaN Division_undefined
dqdvi536 divideint -0 -0 -> NaN Division_undefined
dqdvi541 divideint 0 -1 -> -0
dqdvi542 divideint -0 -1 -> 0
dqdvi543 divideint 0 1 -> 0
dqdvi544 divideint -0 1 -> -0
dqdvi545 divideint -1 0 -> -Infinity Division_by_zero
dqdvi546 divideint -1 -0 -> Infinity Division_by_zero
dqdvi547 divideint 1 0 -> Infinity Division_by_zero
dqdvi548 divideint 1 -0 -> -Infinity Division_by_zero
dqdvi551 divideint 0.0 -1 -> -0
dqdvi552 divideint -0.0 -1 -> 0
dqdvi553 divideint 0.0 1 -> 0
dqdvi554 divideint -0.0 1 -> -0
dqdvi555 divideint -1.0 0 -> -Infinity Division_by_zero
dqdvi556 divideint -1.0 -0 -> Infinity Division_by_zero
dqdvi557 divideint 1.0 0 -> Infinity Division_by_zero
dqdvi558 divideint 1.0 -0 -> -Infinity Division_by_zero
dqdvi561 divideint 0 -1.0 -> -0
dqdvi562 divideint -0 -1.0 -> 0
dqdvi563 divideint 0 1.0 -> 0
dqdvi564 divideint -0 1.0 -> -0
dqdvi565 divideint -1 0.0 -> -Infinity Division_by_zero
dqdvi566 divideint -1 -0.0 -> Infinity Division_by_zero
dqdvi567 divideint 1 0.0 -> Infinity Division_by_zero
dqdvi568 divideint 1 -0.0 -> -Infinity Division_by_zero
dqdvi571 divideint 0.0 -1.0 -> -0
dqdvi572 divideint -0.0 -1.0 -> 0
dqdvi573 divideint 0.0 1.0 -> 0
dqdvi574 divideint -0.0 1.0 -> -0
dqdvi575 divideint -1.0 0.0 -> -Infinity Division_by_zero
dqdvi576 divideint -1.0 -0.0 -> Infinity Division_by_zero
dqdvi577 divideint 1.0 0.0 -> Infinity Division_by_zero
dqdvi578 divideint 1.0 -0.0 -> -Infinity Division_by_zero
-- Specials
dqdvi580 divideint Inf -Inf -> NaN Invalid_operation
dqdvi581 divideint Inf -1000 -> -Infinity
dqdvi582 divideint Inf -1 -> -Infinity
dqdvi583 divideint Inf -0 -> -Infinity
dqdvi584 divideint Inf 0 -> Infinity
dqdvi585 divideint Inf 1 -> Infinity
dqdvi586 divideint Inf 1000 -> Infinity
dqdvi587 divideint Inf Inf -> NaN Invalid_operation
dqdvi588 divideint -1000 Inf -> -0
dqdvi589 divideint -Inf Inf -> NaN Invalid_operation
dqdvi590 divideint -1 Inf -> -0
dqdvi591 divideint -0 Inf -> -0
dqdvi592 divideint 0 Inf -> 0
dqdvi593 divideint 1 Inf -> 0
dqdvi594 divideint 1000 Inf -> 0
dqdvi595 divideint Inf Inf -> NaN Invalid_operation
dqdvi600 divideint -Inf -Inf -> NaN Invalid_operation
dqdvi601 divideint -Inf -1000 -> Infinity
dqdvi602 divideint -Inf -1 -> Infinity
dqdvi603 divideint -Inf -0 -> Infinity
dqdvi604 divideint -Inf 0 -> -Infinity
dqdvi605 divideint -Inf 1 -> -Infinity
dqdvi606 divideint -Inf 1000 -> -Infinity
dqdvi607 divideint -Inf Inf -> NaN Invalid_operation
dqdvi608 divideint -1000 Inf -> -0
dqdvi609 divideint -Inf -Inf -> NaN Invalid_operation
dqdvi610 divideint -1 -Inf -> 0
dqdvi611 divideint -0 -Inf -> 0
dqdvi612 divideint 0 -Inf -> -0
dqdvi613 divideint 1 -Inf -> -0
dqdvi614 divideint 1000 -Inf -> -0
dqdvi615 divideint Inf -Inf -> NaN Invalid_operation
dqdvi621 divideint NaN -Inf -> NaN
dqdvi622 divideint NaN -1000 -> NaN
dqdvi623 divideint NaN -1 -> NaN
dqdvi624 divideint NaN -0 -> NaN
dqdvi625 divideint NaN 0 -> NaN
dqdvi626 divideint NaN 1 -> NaN
dqdvi627 divideint NaN 1000 -> NaN
dqdvi628 divideint NaN Inf -> NaN
dqdvi629 divideint NaN NaN -> NaN
dqdvi630 divideint -Inf NaN -> NaN
dqdvi631 divideint -1000 NaN -> NaN
dqdvi632 divideint -1 NaN -> NaN
dqdvi633 divideint -0 NaN -> NaN
dqdvi634 divideint 0 NaN -> NaN
dqdvi635 divideint 1 NaN -> NaN
dqdvi636 divideint 1000 NaN -> NaN
dqdvi637 divideint Inf NaN -> NaN
dqdvi641 divideint sNaN -Inf -> NaN Invalid_operation
dqdvi642 divideint sNaN -1000 -> NaN Invalid_operation
dqdvi643 divideint sNaN -1 -> NaN Invalid_operation
dqdvi644 divideint sNaN -0 -> NaN Invalid_operation
dqdvi645 divideint sNaN 0 -> NaN Invalid_operation
dqdvi646 divideint sNaN 1 -> NaN Invalid_operation
dqdvi647 divideint sNaN 1000 -> NaN Invalid_operation
dqdvi648 divideint sNaN NaN -> NaN Invalid_operation
dqdvi649 divideint sNaN sNaN -> NaN Invalid_operation
dqdvi650 divideint NaN sNaN -> NaN Invalid_operation
dqdvi651 divideint -Inf sNaN -> NaN Invalid_operation
dqdvi652 divideint -1000 sNaN -> NaN Invalid_operation
dqdvi653 divideint -1 sNaN -> NaN Invalid_operation
dqdvi654 divideint -0 sNaN -> NaN Invalid_operation
dqdvi655 divideint 0 sNaN -> NaN Invalid_operation
dqdvi656 divideint 1 sNaN -> NaN Invalid_operation
dqdvi657 divideint 1000 sNaN -> NaN Invalid_operation
dqdvi658 divideint Inf sNaN -> NaN Invalid_operation
dqdvi659 divideint NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqdvi661 divideint NaN9 -Inf -> NaN9
dqdvi662 divideint NaN8 1000 -> NaN8
dqdvi663 divideint NaN7 Inf -> NaN7
dqdvi664 divideint -NaN6 NaN5 -> -NaN6
dqdvi665 divideint -Inf NaN4 -> NaN4
dqdvi666 divideint -1000 NaN3 -> NaN3
dqdvi667 divideint Inf -NaN2 -> -NaN2
dqdvi671 divideint -sNaN99 -Inf -> -NaN99 Invalid_operation
dqdvi672 divideint sNaN98 -1 -> NaN98 Invalid_operation
dqdvi673 divideint sNaN97 NaN -> NaN97 Invalid_operation
dqdvi674 divideint sNaN96 sNaN94 -> NaN96 Invalid_operation
dqdvi675 divideint NaN95 sNaN93 -> NaN93 Invalid_operation
dqdvi676 divideint -Inf sNaN92 -> NaN92 Invalid_operation
dqdvi677 divideint 0 sNaN91 -> NaN91 Invalid_operation
dqdvi678 divideint Inf -sNaN90 -> -NaN90 Invalid_operation
dqdvi679 divideint NaN sNaN89 -> NaN89 Invalid_operation
-- Gyuris example
dqdvi700 divideint 8.336804418094040989630006819881709E-6143 8.336804418094040989630006819889000E-6143 -> 0
-- Null tests
dqdvi900 divideint 10 # -> NaN Invalid_operation
dqdvi901 divideint # 10 -> NaN Invalid_operation
------------------------------------------------------------------------
-- dqDivideInt.decTest -- decQuad 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
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
dqdvi001 divideint 1 1 -> 1
dqdvi002 divideint 2 1 -> 2
dqdvi003 divideint 1 2 -> 0
dqdvi004 divideint 2 2 -> 1
dqdvi005 divideint 0 1 -> 0
dqdvi006 divideint 0 2 -> 0
dqdvi007 divideint 1 3 -> 0
dqdvi008 divideint 2 3 -> 0
dqdvi009 divideint 3 3 -> 1
dqdvi010 divideint 2.4 1 -> 2
dqdvi011 divideint 2.4 -1 -> -2
dqdvi012 divideint -2.4 1 -> -2
dqdvi013 divideint -2.4 -1 -> 2
dqdvi014 divideint 2.40 1 -> 2
dqdvi015 divideint 2.400 1 -> 2
dqdvi016 divideint 2.4 2 -> 1
dqdvi017 divideint 2.400 2 -> 1
dqdvi018 divideint 2. 2 -> 1
dqdvi019 divideint 20 20 -> 1
dqdvi020 divideint 187 187 -> 1
dqdvi021 divideint 5 2 -> 2
dqdvi022 divideint 5 2.0 -> 2
dqdvi023 divideint 5 2.000 -> 2
dqdvi024 divideint 5 0.200 -> 25
dqdvi025 divideint 5 0.200 -> 25
dqdvi030 divideint 1 2 -> 0
dqdvi031 divideint 1 4 -> 0
dqdvi032 divideint 1 8 -> 0
dqdvi033 divideint 1 16 -> 0
dqdvi034 divideint 1 32 -> 0
dqdvi035 divideint 1 64 -> 0
dqdvi040 divideint 1 -2 -> -0
dqdvi041 divideint 1 -4 -> -0
dqdvi042 divideint 1 -8 -> -0
dqdvi043 divideint 1 -16 -> -0
dqdvi044 divideint 1 -32 -> -0
dqdvi045 divideint 1 -64 -> -0
dqdvi050 divideint -1 2 -> -0
dqdvi051 divideint -1 4 -> -0
dqdvi052 divideint -1 8 -> -0
dqdvi053 divideint -1 16 -> -0
dqdvi054 divideint -1 32 -> -0
dqdvi055 divideint -1 64 -> -0
dqdvi060 divideint -1 -2 -> 0
dqdvi061 divideint -1 -4 -> 0
dqdvi062 divideint -1 -8 -> 0
dqdvi063 divideint -1 -16 -> 0
dqdvi064 divideint -1 -32 -> 0
dqdvi065 divideint -1 -64 -> 0
-- similar with powers of ten
dqdvi160 divideint 1 1 -> 1
dqdvi161 divideint 1 10 -> 0
dqdvi162 divideint 1 100 -> 0
dqdvi163 divideint 1 1000 -> 0
dqdvi164 divideint 1 10000 -> 0
dqdvi165 divideint 1 100000 -> 0
dqdvi166 divideint 1 1000000 -> 0
dqdvi167 divideint 1 10000000 -> 0
dqdvi168 divideint 1 100000000 -> 0
dqdvi170 divideint 1 -1 -> -1
dqdvi171 divideint 1 -10 -> -0
dqdvi172 divideint 1 -100 -> -0
dqdvi173 divideint 1 -1000 -> -0
dqdvi174 divideint 1 -10000 -> -0
dqdvi175 divideint 1 -100000 -> -0
dqdvi176 divideint 1 -1000000 -> -0
dqdvi177 divideint 1 -10000000 -> -0
dqdvi178 divideint 1 -100000000 -> -0
dqdvi180 divideint -1 1 -> -1
dqdvi181 divideint -1 10 -> -0
dqdvi182 divideint -1 100 -> -0
dqdvi183 divideint -1 1000 -> -0
dqdvi184 divideint -1 10000 -> -0
dqdvi185 divideint -1 100000 -> -0
dqdvi186 divideint -1 1000000 -> -0
dqdvi187 divideint -1 10000000 -> -0
dqdvi188 divideint -1 100000000 -> -0
dqdvi190 divideint -1 -1 -> 1
dqdvi191 divideint -1 -10 -> 0
dqdvi192 divideint -1 -100 -> 0
dqdvi193 divideint -1 -1000 -> 0
dqdvi194 divideint -1 -10000 -> 0
dqdvi195 divideint -1 -100000 -> 0
dqdvi196 divideint -1 -1000000 -> 0
dqdvi197 divideint -1 -10000000 -> 0
dqdvi198 divideint -1 -100000000 -> 0
-- some long operand (at p=9) cases
dqdvi070 divideint 999999999 1 -> 999999999
dqdvi071 divideint 999999999.4 1 -> 999999999
dqdvi072 divideint 999999999.5 1 -> 999999999
dqdvi073 divideint 999999999.9 1 -> 999999999
dqdvi074 divideint 999999999.999 1 -> 999999999
dqdvi090 divideint 0. 1 -> 0
dqdvi091 divideint .0 1 -> 0
dqdvi092 divideint 0.00 1 -> 0
dqdvi093 divideint 0.00E+9 1 -> 0
dqdvi094 divideint 0.0000E-50 1 -> 0
dqdvi100 divideint 1 1 -> 1
dqdvi101 divideint 1 2 -> 0
dqdvi102 divideint 1 3 -> 0
dqdvi103 divideint 1 4 -> 0
dqdvi104 divideint 1 5 -> 0
dqdvi105 divideint 1 6 -> 0
dqdvi106 divideint 1 7 -> 0
dqdvi107 divideint 1 8 -> 0
dqdvi108 divideint 1 9 -> 0
dqdvi109 divideint 1 10 -> 0
dqdvi110 divideint 1 1 -> 1
dqdvi111 divideint 2 1 -> 2
dqdvi112 divideint 3 1 -> 3
dqdvi113 divideint 4 1 -> 4
dqdvi114 divideint 5 1 -> 5
dqdvi115 divideint 6 1 -> 6
dqdvi116 divideint 7 1 -> 7
dqdvi117 divideint 8 1 -> 8
dqdvi118 divideint 9 1 -> 9
dqdvi119 divideint 10 1 -> 10
-- from DiagBigDecimal
dqdvi131 divideint 101.3 1 -> 101
dqdvi132 divideint 101.0 1 -> 101
dqdvi133 divideint 101.3 3 -> 33
dqdvi134 divideint 101.0 3 -> 33
dqdvi135 divideint 2.4 1 -> 2
dqdvi136 divideint 2.400 1 -> 2
dqdvi137 divideint 18 18 -> 1
dqdvi138 divideint 1120 1000 -> 1
dqdvi139 divideint 2.4 2 -> 1
dqdvi140 divideint 2.400 2 -> 1
dqdvi141 divideint 0.5 2.000 -> 0
dqdvi142 divideint 8.005 7 -> 1
dqdvi143 divideint 5 2 -> 2
dqdvi144 divideint 0 2 -> 0
dqdvi145 divideint 0.00 2 -> 0
-- Others
dqdvi150 divideint 12345 4.999 -> 2469
dqdvi151 divideint 12345 4.99 -> 2473
dqdvi152 divideint 12345 4.9 -> 2519
dqdvi153 divideint 12345 5 -> 2469
dqdvi154 divideint 12345 5.1 -> 2420
dqdvi155 divideint 12345 5.01 -> 2464
dqdvi156 divideint 12345 5.001 -> 2468
dqdvi157 divideint 101 7.6 -> 13
-- Various flavours of divideint by 0
dqdvi201 divideint 0 0 -> NaN Division_undefined
dqdvi202 divideint 0.0E5 0 -> NaN Division_undefined
dqdvi203 divideint 0.000 0 -> NaN Division_undefined
dqdvi204 divideint 0.0001 0 -> Infinity Division_by_zero
dqdvi205 divideint 0.01 0 -> Infinity Division_by_zero
dqdvi206 divideint 0.1 0 -> Infinity Division_by_zero
dqdvi207 divideint 1 0 -> Infinity Division_by_zero
dqdvi208 divideint 1 0.0 -> Infinity Division_by_zero
dqdvi209 divideint 10 0.0 -> Infinity Division_by_zero
dqdvi210 divideint 1E+100 0.0 -> Infinity Division_by_zero
dqdvi211 divideint 1E+380 0 -> Infinity Division_by_zero
dqdvi214 divideint -0.0001 0 -> -Infinity Division_by_zero
dqdvi215 divideint -0.01 0 -> -Infinity Division_by_zero
dqdvi216 divideint -0.1 0 -> -Infinity Division_by_zero
dqdvi217 divideint -1 0 -> -Infinity Division_by_zero
dqdvi218 divideint -1 0.0 -> -Infinity Division_by_zero
dqdvi219 divideint -10 0.0 -> -Infinity Division_by_zero
dqdvi220 divideint -1E+100 0.0 -> -Infinity Division_by_zero
dqdvi221 divideint -1E+380 0 -> -Infinity Division_by_zero
-- test some cases that are close to exponent overflow
dqdvi270 divideint 1 1e384 -> 0
dqdvi271 divideint 1 0.9e384 -> 0
dqdvi272 divideint 1 0.99e384 -> 0
dqdvi273 divideint 1 0.9999999999999999e384 -> 0
dqdvi274 divideint 9e384 1 -> NaN Division_impossible
dqdvi275 divideint 9.9e384 1 -> NaN Division_impossible
dqdvi276 divideint 9.99e384 1 -> NaN Division_impossible
dqdvi277 divideint 9.999999999999999e384 1 -> NaN Division_impossible
dqdvi280 divideint 0.1 9e-383 -> NaN Division_impossible
dqdvi281 divideint 0.1 99e-383 -> NaN Division_impossible
dqdvi282 divideint 0.1 999e-383 -> NaN Division_impossible
dqdvi283 divideint 0.1 9e-382 -> NaN Division_impossible
dqdvi284 divideint 0.1 99e-382 -> NaN Division_impossible
-- GD edge cases: lhs smaller than rhs but more digits
dqdvi301 divideint 0.9 2 -> 0
dqdvi302 divideint 0.9 2.0 -> 0
dqdvi303 divideint 0.9 2.1 -> 0
dqdvi304 divideint 0.9 2.00 -> 0
dqdvi305 divideint 0.9 2.01 -> 0
dqdvi306 divideint 0.12 1 -> 0
dqdvi307 divideint 0.12 1.0 -> 0
dqdvi308 divideint 0.12 1.00 -> 0
dqdvi309 divideint 0.12 1.0 -> 0
dqdvi310 divideint 0.12 1.00 -> 0
dqdvi311 divideint 0.12 2 -> 0
dqdvi312 divideint 0.12 2.0 -> 0
dqdvi313 divideint 0.12 2.1 -> 0
dqdvi314 divideint 0.12 2.00 -> 0
dqdvi315 divideint 0.12 2.01 -> 0
-- edge cases of impossible
dqdvi330 divideint 1234567987654321987654321890123456 10 -> 123456798765432198765432189012345
dqdvi331 divideint 1234567987654321987654321890123456 1 -> 1234567987654321987654321890123456
dqdvi332 divideint 1234567987654321987654321890123456 0.1 -> NaN Division_impossible
dqdvi333 divideint 1234567987654321987654321890123456 0.01 -> NaN Division_impossible
-- overflow and underflow tests [from divide]
dqdvi1051 divideint 1e+277 1e-311 -> NaN Division_impossible
dqdvi1052 divideint 1e+277 -1e-311 -> NaN Division_impossible
dqdvi1053 divideint -1e+277 1e-311 -> NaN Division_impossible
dqdvi1054 divideint -1e+277 -1e-311 -> NaN Division_impossible
dqdvi1055 divideint 1e-277 1e+311 -> 0
dqdvi1056 divideint 1e-277 -1e+311 -> -0
dqdvi1057 divideint -1e-277 1e+311 -> -0
dqdvi1058 divideint -1e-277 -1e+311 -> 0
-- 'subnormal' boundary (all hard underflow or overflow in base arithemtic)
dqdvi1060 divideint 1e-291 1e+101 -> 0
dqdvi1061 divideint 1e-291 1e+102 -> 0
dqdvi1062 divideint 1e-291 1e+103 -> 0
dqdvi1063 divideint 1e-291 1e+104 -> 0
dqdvi1064 divideint 1e-291 1e+105 -> 0
dqdvi1065 divideint 1e-291 1e+106 -> 0
dqdvi1066 divideint 1e-291 1e+107 -> 0
dqdvi1067 divideint 1e-291 1e+108 -> 0
dqdvi1068 divideint 1e-291 1e+109 -> 0
dqdvi1069 divideint 1e-291 1e+110 -> 0
dqdvi1101 divideint 1.0000E-394 1 -> 0
dqdvi1102 divideint 1.000E-394 1e+1 -> 0
dqdvi1103 divideint 1.00E-394 1e+2 -> 0
dqdvi1118 divideint 1E-394 1e+4 -> 0
dqdvi1119 divideint 3E-394 -1e+5 -> -0
dqdvi1120 divideint 5E-394 1e+5 -> 0
dqdvi1124 divideint 1E-394 -1e+4 -> -0
dqdvi1130 divideint 3.0E-394 -1e+5 -> -0
dqdvi1131 divideint 1.0E-199 1e+200 -> 0
dqdvi1132 divideint 1.0E-199 1e+199 -> 0
dqdvi1133 divideint 1.0E-199 1e+198 -> 0
dqdvi1134 divideint 2.0E-199 2e+198 -> 0
dqdvi1135 divideint 4.0E-199 4e+198 -> 0
-- long operand checks
dqdvi401 divideint 12345678000 100 -> 123456780
dqdvi402 divideint 1 12345678000 -> 0
dqdvi403 divideint 1234567800 10 -> 123456780
dqdvi404 divideint 1 1234567800 -> 0
dqdvi405 divideint 1234567890 10 -> 123456789
dqdvi406 divideint 1 1234567890 -> 0
dqdvi407 divideint 1234567891 10 -> 123456789
dqdvi408 divideint 1 1234567891 -> 0
dqdvi409 divideint 12345678901 100 -> 123456789
dqdvi410 divideint 1 12345678901 -> 0
dqdvi411 divideint 1234567896 10 -> 123456789
dqdvi412 divideint 1 1234567896 -> 0
dqdvi413 divideint 12345678948 100 -> 123456789
dqdvi414 divideint 12345678949 100 -> 123456789
dqdvi415 divideint 12345678950 100 -> 123456789
dqdvi416 divideint 12345678951 100 -> 123456789
dqdvi417 divideint 12345678999 100 -> 123456789
dqdvi441 divideint 12345678000 1 -> 12345678000
dqdvi442 divideint 1 12345678000 -> 0
dqdvi443 divideint 1234567800 1 -> 1234567800
dqdvi444 divideint 1 1234567800 -> 0
dqdvi445 divideint 1234567890 1 -> 1234567890
dqdvi446 divideint 1 1234567890 -> 0
dqdvi447 divideint 1234567891 1 -> 1234567891
dqdvi448 divideint 1 1234567891 -> 0
dqdvi449 divideint 12345678901 1 -> 12345678901
dqdvi450 divideint 1 12345678901 -> 0
dqdvi451 divideint 1234567896 1 -> 1234567896
dqdvi452 divideint 1 1234567896 -> 0
-- more zeros, etc.
dqdvi531 divideint 5.00 1E-3 -> 5000
dqdvi532 divideint 00.00 0.000 -> NaN Division_undefined
dqdvi533 divideint 00.00 0E-3 -> NaN Division_undefined
dqdvi534 divideint 0 -0 -> NaN Division_undefined
dqdvi535 divideint -0 0 -> NaN Division_undefined
dqdvi536 divideint -0 -0 -> NaN Division_undefined
dqdvi541 divideint 0 -1 -> -0
dqdvi542 divideint -0 -1 -> 0
dqdvi543 divideint 0 1 -> 0
dqdvi544 divideint -0 1 -> -0
dqdvi545 divideint -1 0 -> -Infinity Division_by_zero
dqdvi546 divideint -1 -0 -> Infinity Division_by_zero
dqdvi547 divideint 1 0 -> Infinity Division_by_zero
dqdvi548 divideint 1 -0 -> -Infinity Division_by_zero
dqdvi551 divideint 0.0 -1 -> -0
dqdvi552 divideint -0.0 -1 -> 0
dqdvi553 divideint 0.0 1 -> 0
dqdvi554 divideint -0.0 1 -> -0
dqdvi555 divideint -1.0 0 -> -Infinity Division_by_zero
dqdvi556 divideint -1.0 -0 -> Infinity Division_by_zero
dqdvi557 divideint 1.0 0 -> Infinity Division_by_zero
dqdvi558 divideint 1.0 -0 -> -Infinity Division_by_zero
dqdvi561 divideint 0 -1.0 -> -0
dqdvi562 divideint -0 -1.0 -> 0
dqdvi563 divideint 0 1.0 -> 0
dqdvi564 divideint -0 1.0 -> -0
dqdvi565 divideint -1 0.0 -> -Infinity Division_by_zero
dqdvi566 divideint -1 -0.0 -> Infinity Division_by_zero
dqdvi567 divideint 1 0.0 -> Infinity Division_by_zero
dqdvi568 divideint 1 -0.0 -> -Infinity Division_by_zero
dqdvi571 divideint 0.0 -1.0 -> -0
dqdvi572 divideint -0.0 -1.0 -> 0
dqdvi573 divideint 0.0 1.0 -> 0
dqdvi574 divideint -0.0 1.0 -> -0
dqdvi575 divideint -1.0 0.0 -> -Infinity Division_by_zero
dqdvi576 divideint -1.0 -0.0 -> Infinity Division_by_zero
dqdvi577 divideint 1.0 0.0 -> Infinity Division_by_zero
dqdvi578 divideint 1.0 -0.0 -> -Infinity Division_by_zero
-- Specials
dqdvi580 divideint Inf -Inf -> NaN Invalid_operation
dqdvi581 divideint Inf -1000 -> -Infinity
dqdvi582 divideint Inf -1 -> -Infinity
dqdvi583 divideint Inf -0 -> -Infinity
dqdvi584 divideint Inf 0 -> Infinity
dqdvi585 divideint Inf 1 -> Infinity
dqdvi586 divideint Inf 1000 -> Infinity
dqdvi587 divideint Inf Inf -> NaN Invalid_operation
dqdvi588 divideint -1000 Inf -> -0
dqdvi589 divideint -Inf Inf -> NaN Invalid_operation
dqdvi590 divideint -1 Inf -> -0
dqdvi591 divideint -0 Inf -> -0
dqdvi592 divideint 0 Inf -> 0
dqdvi593 divideint 1 Inf -> 0
dqdvi594 divideint 1000 Inf -> 0
dqdvi595 divideint Inf Inf -> NaN Invalid_operation
dqdvi600 divideint -Inf -Inf -> NaN Invalid_operation
dqdvi601 divideint -Inf -1000 -> Infinity
dqdvi602 divideint -Inf -1 -> Infinity
dqdvi603 divideint -Inf -0 -> Infinity
dqdvi604 divideint -Inf 0 -> -Infinity
dqdvi605 divideint -Inf 1 -> -Infinity
dqdvi606 divideint -Inf 1000 -> -Infinity
dqdvi607 divideint -Inf Inf -> NaN Invalid_operation
dqdvi608 divideint -1000 Inf -> -0
dqdvi609 divideint -Inf -Inf -> NaN Invalid_operation
dqdvi610 divideint -1 -Inf -> 0
dqdvi611 divideint -0 -Inf -> 0
dqdvi612 divideint 0 -Inf -> -0
dqdvi613 divideint 1 -Inf -> -0
dqdvi614 divideint 1000 -Inf -> -0
dqdvi615 divideint Inf -Inf -> NaN Invalid_operation
dqdvi621 divideint NaN -Inf -> NaN
dqdvi622 divideint NaN -1000 -> NaN
dqdvi623 divideint NaN -1 -> NaN
dqdvi624 divideint NaN -0 -> NaN
dqdvi625 divideint NaN 0 -> NaN
dqdvi626 divideint NaN 1 -> NaN
dqdvi627 divideint NaN 1000 -> NaN
dqdvi628 divideint NaN Inf -> NaN
dqdvi629 divideint NaN NaN -> NaN
dqdvi630 divideint -Inf NaN -> NaN
dqdvi631 divideint -1000 NaN -> NaN
dqdvi632 divideint -1 NaN -> NaN
dqdvi633 divideint -0 NaN -> NaN
dqdvi634 divideint 0 NaN -> NaN
dqdvi635 divideint 1 NaN -> NaN
dqdvi636 divideint 1000 NaN -> NaN
dqdvi637 divideint Inf NaN -> NaN
dqdvi641 divideint sNaN -Inf -> NaN Invalid_operation
dqdvi642 divideint sNaN -1000 -> NaN Invalid_operation
dqdvi643 divideint sNaN -1 -> NaN Invalid_operation
dqdvi644 divideint sNaN -0 -> NaN Invalid_operation
dqdvi645 divideint sNaN 0 -> NaN Invalid_operation
dqdvi646 divideint sNaN 1 -> NaN Invalid_operation
dqdvi647 divideint sNaN 1000 -> NaN Invalid_operation
dqdvi648 divideint sNaN NaN -> NaN Invalid_operation
dqdvi649 divideint sNaN sNaN -> NaN Invalid_operation
dqdvi650 divideint NaN sNaN -> NaN Invalid_operation
dqdvi651 divideint -Inf sNaN -> NaN Invalid_operation
dqdvi652 divideint -1000 sNaN -> NaN Invalid_operation
dqdvi653 divideint -1 sNaN -> NaN Invalid_operation
dqdvi654 divideint -0 sNaN -> NaN Invalid_operation
dqdvi655 divideint 0 sNaN -> NaN Invalid_operation
dqdvi656 divideint 1 sNaN -> NaN Invalid_operation
dqdvi657 divideint 1000 sNaN -> NaN Invalid_operation
dqdvi658 divideint Inf sNaN -> NaN Invalid_operation
dqdvi659 divideint NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqdvi661 divideint NaN9 -Inf -> NaN9
dqdvi662 divideint NaN8 1000 -> NaN8
dqdvi663 divideint NaN7 Inf -> NaN7
dqdvi664 divideint -NaN6 NaN5 -> -NaN6
dqdvi665 divideint -Inf NaN4 -> NaN4
dqdvi666 divideint -1000 NaN3 -> NaN3
dqdvi667 divideint Inf -NaN2 -> -NaN2
dqdvi671 divideint -sNaN99 -Inf -> -NaN99 Invalid_operation
dqdvi672 divideint sNaN98 -1 -> NaN98 Invalid_operation
dqdvi673 divideint sNaN97 NaN -> NaN97 Invalid_operation
dqdvi674 divideint sNaN96 sNaN94 -> NaN96 Invalid_operation
dqdvi675 divideint NaN95 sNaN93 -> NaN93 Invalid_operation
dqdvi676 divideint -Inf sNaN92 -> NaN92 Invalid_operation
dqdvi677 divideint 0 sNaN91 -> NaN91 Invalid_operation
dqdvi678 divideint Inf -sNaN90 -> -NaN90 Invalid_operation
dqdvi679 divideint NaN sNaN89 -> NaN89 Invalid_operation
-- Gyuris example
dqdvi700 divideint 8.336804418094040989630006819881709E-6143 8.336804418094040989630006819889000E-6143 -> 0
-- Null tests
dqdvi900 divideint 10 # -> NaN Invalid_operation
dqdvi901 divideint # 10 -> NaN Invalid_operation

View file

@ -1,477 +1,477 @@
------------------------------------------------------------------------
-- dqEncode.decTest -- decimal sixteen-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 decimal128.decTest]
version: 2.59
-- This set of tests is for the sixteen-byte concrete representation.
-- Its characteristics are:
--
-- 1 bit sign
-- 5 bits combination field
-- 12 bits exponent continuation
-- 110 bits coefficient continuation
--
-- Total exponent length 14 bits
-- Total coefficient length 114 bits (34 digits)
--
-- Elimit = 12287 (maximum encoded exponent)
-- Emax = 6144 (largest exponent value)
-- Emin = -6143 (smallest exponent value)
-- bias = 6176 (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: 34
rounding: half_up
maxExponent: 6144
minExponent: -6143
-- General testcases
-- (mostly derived from the Strawman 4 document and examples)
decq001 apply #A20780000000000000000000000003D0 -> -7.50
decq002 apply -7.50 -> #A20780000000000000000000000003D0
-- derivative canonical plain strings
decq003 apply #A20840000000000000000000000003D0 -> -7.50E+3
decq004 apply -7.50E+3 -> #A20840000000000000000000000003D0
decq005 apply #A20800000000000000000000000003D0 -> -750
decq006 apply -750 -> #A20800000000000000000000000003D0
decq007 apply #A207c0000000000000000000000003D0 -> -75.0
decq008 apply -75.0 -> #A207c0000000000000000000000003D0
decq009 apply #A20740000000000000000000000003D0 -> -0.750
decq010 apply -0.750 -> #A20740000000000000000000000003D0
decq011 apply #A20700000000000000000000000003D0 -> -0.0750
decq012 apply -0.0750 -> #A20700000000000000000000000003D0
decq013 apply #A20680000000000000000000000003D0 -> -0.000750
decq014 apply -0.000750 -> #A20680000000000000000000000003D0
decq015 apply #A20600000000000000000000000003D0 -> -0.00000750
decq016 apply -0.00000750 -> #A20600000000000000000000000003D0
decq017 apply #A205c0000000000000000000000003D0 -> -7.50E-7
decq018 apply -7.50E-7 -> #A205c0000000000000000000000003D0
-- Normality
decq020 apply 1234567890123456789012345678901234 -> #2608134b9c1e28e56f3c127177823534
decq021 apply -1234567890123456789012345678901234 -> #a608134b9c1e28e56f3c127177823534
decq022 apply 1111111111111111111111111111111111 -> #26080912449124491244912449124491
-- Nmax and similar
decq031 apply 9.999999999999999999999999999999999E+6144 -> #77ffcff3fcff3fcff3fcff3fcff3fcff
decq032 apply #77ffcff3fcff3fcff3fcff3fcff3fcff -> 9.999999999999999999999999999999999E+6144
decq033 apply 1.234567890123456789012345678901234E+6144 -> #47ffd34b9c1e28e56f3c127177823534
decq034 apply #47ffd34b9c1e28e56f3c127177823534 -> 1.234567890123456789012345678901234E+6144
-- fold-downs (more below)
decq035 apply 1.23E+6144 -> #47ffd300000000000000000000000000 Clamped
decq036 apply #47ffd300000000000000000000000000 -> 1.230000000000000000000000000000000E+6144
decq037 apply 1E+6144 -> #47ffc000000000000000000000000000 Clamped
decq038 apply #47ffc000000000000000000000000000 -> 1.000000000000000000000000000000000E+6144
decq051 apply 12345 -> #220800000000000000000000000049c5
decq052 apply #220800000000000000000000000049c5 -> 12345
decq053 apply 1234 -> #22080000000000000000000000000534
decq054 apply #22080000000000000000000000000534 -> 1234
decq055 apply 123 -> #220800000000000000000000000000a3
decq056 apply #220800000000000000000000000000a3 -> 123
decq057 apply 12 -> #22080000000000000000000000000012
decq058 apply #22080000000000000000000000000012 -> 12
decq059 apply 1 -> #22080000000000000000000000000001
decq060 apply #22080000000000000000000000000001 -> 1
decq061 apply 1.23 -> #220780000000000000000000000000a3
decq062 apply #220780000000000000000000000000a3 -> 1.23
decq063 apply 123.45 -> #220780000000000000000000000049c5
decq064 apply #220780000000000000000000000049c5 -> 123.45
-- Nmin and below
decq071 apply 1E-6143 -> #00084000000000000000000000000001
decq072 apply #00084000000000000000000000000001 -> 1E-6143
decq073 apply 1.000000000000000000000000000000000E-6143 -> #04000000000000000000000000000000
decq074 apply #04000000000000000000000000000000 -> 1.000000000000000000000000000000000E-6143
decq075 apply 1.000000000000000000000000000000001E-6143 -> #04000000000000000000000000000001
decq076 apply #04000000000000000000000000000001 -> 1.000000000000000000000000000000001E-6143
decq077 apply 0.100000000000000000000000000000000E-6143 -> #00000800000000000000000000000000 Subnormal
decq078 apply #00000800000000000000000000000000 -> 1.00000000000000000000000000000000E-6144 Subnormal
decq079 apply 0.000000000000000000000000000000010E-6143 -> #00000000000000000000000000000010 Subnormal
decq080 apply #00000000000000000000000000000010 -> 1.0E-6175 Subnormal
decq081 apply 0.00000000000000000000000000000001E-6143 -> #00004000000000000000000000000001 Subnormal
decq082 apply #00004000000000000000000000000001 -> 1E-6175 Subnormal
decq083 apply 0.000000000000000000000000000000001E-6143 -> #00000000000000000000000000000001 Subnormal
decq084 apply #00000000000000000000000000000001 -> 1E-6176 Subnormal
-- underflows cannot be tested for simple copies, check edge cases
decq090 apply 1e-6176 -> #00000000000000000000000000000001 Subnormal
decq100 apply 999999999999999999999999999999999e-6176 -> #00000ff3fcff3fcff3fcff3fcff3fcff Subnormal
-- same again, negatives
-- Nmax and similar
decq122 apply -9.999999999999999999999999999999999E+6144 -> #f7ffcff3fcff3fcff3fcff3fcff3fcff
decq123 apply #f7ffcff3fcff3fcff3fcff3fcff3fcff -> -9.999999999999999999999999999999999E+6144
decq124 apply -1.234567890123456789012345678901234E+6144 -> #c7ffd34b9c1e28e56f3c127177823534
decq125 apply #c7ffd34b9c1e28e56f3c127177823534 -> -1.234567890123456789012345678901234E+6144
-- fold-downs (more below)
decq130 apply -1.23E+6144 -> #c7ffd300000000000000000000000000 Clamped
decq131 apply #c7ffd300000000000000000000000000 -> -1.230000000000000000000000000000000E+6144
decq132 apply -1E+6144 -> #c7ffc000000000000000000000000000 Clamped
decq133 apply #c7ffc000000000000000000000000000 -> -1.000000000000000000000000000000000E+6144
decq151 apply -12345 -> #a20800000000000000000000000049c5
decq152 apply #a20800000000000000000000000049c5 -> -12345
decq153 apply -1234 -> #a2080000000000000000000000000534
decq154 apply #a2080000000000000000000000000534 -> -1234
decq155 apply -123 -> #a20800000000000000000000000000a3
decq156 apply #a20800000000000000000000000000a3 -> -123
decq157 apply -12 -> #a2080000000000000000000000000012
decq158 apply #a2080000000000000000000000000012 -> -12
decq159 apply -1 -> #a2080000000000000000000000000001
decq160 apply #a2080000000000000000000000000001 -> -1
decq161 apply -1.23 -> #a20780000000000000000000000000a3
decq162 apply #a20780000000000000000000000000a3 -> -1.23
decq163 apply -123.45 -> #a20780000000000000000000000049c5
decq164 apply #a20780000000000000000000000049c5 -> -123.45
-- Nmin and below
decq171 apply -1E-6143 -> #80084000000000000000000000000001
decq172 apply #80084000000000000000000000000001 -> -1E-6143
decq173 apply -1.000000000000000000000000000000000E-6143 -> #84000000000000000000000000000000
decq174 apply #84000000000000000000000000000000 -> -1.000000000000000000000000000000000E-6143
decq175 apply -1.000000000000000000000000000000001E-6143 -> #84000000000000000000000000000001
decq176 apply #84000000000000000000000000000001 -> -1.000000000000000000000000000000001E-6143
decq177 apply -0.100000000000000000000000000000000E-6143 -> #80000800000000000000000000000000 Subnormal
decq178 apply #80000800000000000000000000000000 -> -1.00000000000000000000000000000000E-6144 Subnormal
decq179 apply -0.000000000000000000000000000000010E-6143 -> #80000000000000000000000000000010 Subnormal
decq180 apply #80000000000000000000000000000010 -> -1.0E-6175 Subnormal
decq181 apply -0.00000000000000000000000000000001E-6143 -> #80004000000000000000000000000001 Subnormal
decq182 apply #80004000000000000000000000000001 -> -1E-6175 Subnormal
decq183 apply -0.000000000000000000000000000000001E-6143 -> #80000000000000000000000000000001 Subnormal
decq184 apply #80000000000000000000000000000001 -> -1E-6176 Subnormal
-- underflow edge cases
decq190 apply -1e-6176 -> #80000000000000000000000000000001 Subnormal
decq200 apply -999999999999999999999999999999999e-6176 -> #80000ff3fcff3fcff3fcff3fcff3fcff Subnormal
-- zeros
decq400 apply 0E-8000 -> #00000000000000000000000000000000 Clamped
decq401 apply 0E-6177 -> #00000000000000000000000000000000 Clamped
decq402 apply 0E-6176 -> #00000000000000000000000000000000
decq403 apply #00000000000000000000000000000000 -> 0E-6176
decq404 apply 0.000000000000000000000000000000000E-6143 -> #00000000000000000000000000000000
decq405 apply #00000000000000000000000000000000 -> 0E-6176
decq406 apply 0E-2 -> #22078000000000000000000000000000
decq407 apply #22078000000000000000000000000000 -> 0.00
decq408 apply 0 -> #22080000000000000000000000000000
decq409 apply #22080000000000000000000000000000 -> 0
decq410 apply 0E+3 -> #2208c000000000000000000000000000
decq411 apply #2208c000000000000000000000000000 -> 0E+3
decq412 apply 0E+6111 -> #43ffc000000000000000000000000000
decq413 apply #43ffc000000000000000000000000000 -> 0E+6111
-- clamped zeros...
decq414 apply 0E+6112 -> #43ffc000000000000000000000000000 Clamped
decq415 apply #43ffc000000000000000000000000000 -> 0E+6111
decq416 apply 0E+6144 -> #43ffc000000000000000000000000000 Clamped
decq417 apply #43ffc000000000000000000000000000 -> 0E+6111
decq418 apply 0E+8000 -> #43ffc000000000000000000000000000 Clamped
decq419 apply #43ffc000000000000000000000000000 -> 0E+6111
-- negative zeros
decq420 apply -0E-8000 -> #80000000000000000000000000000000 Clamped
decq421 apply -0E-6177 -> #80000000000000000000000000000000 Clamped
decq422 apply -0E-6176 -> #80000000000000000000000000000000
decq423 apply #80000000000000000000000000000000 -> -0E-6176
decq424 apply -0.000000000000000000000000000000000E-6143 -> #80000000000000000000000000000000
decq425 apply #80000000000000000000000000000000 -> -0E-6176
decq426 apply -0E-2 -> #a2078000000000000000000000000000
decq427 apply #a2078000000000000000000000000000 -> -0.00
decq428 apply -0 -> #a2080000000000000000000000000000
decq429 apply #a2080000000000000000000000000000 -> -0
decq430 apply -0E+3 -> #a208c000000000000000000000000000
decq431 apply #a208c000000000000000000000000000 -> -0E+3
decq432 apply -0E+6111 -> #c3ffc000000000000000000000000000
decq433 apply #c3ffc000000000000000000000000000 -> -0E+6111
-- clamped zeros...
decq434 apply -0E+6112 -> #c3ffc000000000000000000000000000 Clamped
decq435 apply #c3ffc000000000000000000000000000 -> -0E+6111
decq436 apply -0E+6144 -> #c3ffc000000000000000000000000000 Clamped
decq437 apply #c3ffc000000000000000000000000000 -> -0E+6111
decq438 apply -0E+8000 -> #c3ffc000000000000000000000000000 Clamped
decq439 apply #c3ffc000000000000000000000000000 -> -0E+6111
-- exponent lengths
decq440 apply #22080000000000000000000000000007 -> 7
decq441 apply 7 -> #22080000000000000000000000000007
decq442 apply #220a4000000000000000000000000007 -> 7E+9
decq443 apply 7E+9 -> #220a4000000000000000000000000007
decq444 apply #2220c000000000000000000000000007 -> 7E+99
decq445 apply 7E+99 -> #2220c000000000000000000000000007
decq446 apply #2301c000000000000000000000000007 -> 7E+999
decq447 apply 7E+999 -> #2301c000000000000000000000000007
decq448 apply #43e3c000000000000000000000000007 -> 7E+5999
decq449 apply 7E+5999 -> #43e3c000000000000000000000000007
-- Specials
decq500 apply Infinity -> #78000000000000000000000000000000
decq501 apply #78787878787878787878787878787878 -> #78000000000000000000000000000000
decq502 apply #78000000000000000000000000000000 -> Infinity
decq503 apply #79797979797979797979797979797979 -> #78000000000000000000000000000000
decq504 apply #79000000000000000000000000000000 -> Infinity
decq505 apply #7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a -> #78000000000000000000000000000000
decq506 apply #7a000000000000000000000000000000 -> Infinity
decq507 apply #7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b -> #78000000000000000000000000000000
decq508 apply #7b000000000000000000000000000000 -> Infinity
decq509 apply NaN -> #7c000000000000000000000000000000
decq510 apply #7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c -> #7c003c7c7c7c7c7c7c7c7c7c7c7c7c7c
decq511 apply #7c000000000000000000000000000000 -> NaN
decq512 apply #7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d -> #7c003d7d7d7d7d7d7d7d7d7d7d7d7d7d
decq513 apply #7d000000000000000000000000000000 -> NaN
decq514 apply #7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e -> #7e003e7e7c7e7e7e7e7c7e7e7e7e7c7e
decq515 apply #7e000000000000000000000000000000 -> sNaN
decq516 apply #7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f -> #7e003f7f7c7f7f7f7f7c7f7f7f7f7c7f
decq517 apply #7f000000000000000000000000000000 -> sNaN
decq518 apply #7fffffffffffffffffffffffffffffff -> sNaN999999999999999999999999999999999
decq519 apply #7fffffffffffffffffffffffffffffff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
decq520 apply -Infinity -> #f8000000000000000000000000000000
decq521 apply #f8787878787878787878787878787878 -> #f8000000000000000000000000000000
decq522 apply #f8000000000000000000000000000000 -> -Infinity
decq523 apply #f9797979797979797979797979797979 -> #f8000000000000000000000000000000
decq524 apply #f9000000000000000000000000000000 -> -Infinity
decq525 apply #fa7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a -> #f8000000000000000000000000000000
decq526 apply #fa000000000000000000000000000000 -> -Infinity
decq527 apply #fb7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b -> #f8000000000000000000000000000000
decq528 apply #fb000000000000000000000000000000 -> -Infinity
decq529 apply -NaN -> #fc000000000000000000000000000000
decq530 apply #fc7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c -> #fc003c7c7c7c7c7c7c7c7c7c7c7c7c7c
decq531 apply #fc000000000000000000000000000000 -> -NaN
decq532 apply #fd7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d -> #fc003d7d7d7d7d7d7d7d7d7d7d7d7d7d
decq533 apply #fd000000000000000000000000000000 -> -NaN
decq534 apply #fe7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e -> #fe003e7e7c7e7e7e7e7c7e7e7e7e7c7e
decq535 apply #fe000000000000000000000000000000 -> -sNaN
decq536 apply #ff7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f -> #fe003f7f7c7f7f7f7f7c7f7f7f7f7c7f
decq537 apply #ff000000000000000000000000000000 -> -sNaN
decq538 apply #ffffffffffffffffffffffffffffffff -> -sNaN999999999999999999999999999999999
decq539 apply #ffffffffffffffffffffffffffffffff -> #fe000ff3fcff3fcff3fcff3fcff3fcff
decq540 apply NaN -> #7c000000000000000000000000000000
decq541 apply NaN0 -> #7c000000000000000000000000000000
decq542 apply NaN1 -> #7c000000000000000000000000000001
decq543 apply NaN12 -> #7c000000000000000000000000000012
decq544 apply NaN79 -> #7c000000000000000000000000000079
decq545 apply NaN12345 -> #7c0000000000000000000000000049c5
decq546 apply NaN123456 -> #7c000000000000000000000000028e56
decq547 apply NaN799799 -> #7c0000000000000000000000000f7fdf
decq548 apply NaN799799799799799799799799799799799 -> #7c003dff7fdff7fdff7fdff7fdff7fdf
decq549 apply NaN999999999999999999999999999999999 -> #7c000ff3fcff3fcff3fcff3fcff3fcff
decq550 apply 9999999999999999999999999999999999 -> #6e080ff3fcff3fcff3fcff3fcff3fcff
-- fold-down full sequence
decq601 apply 1E+6144 -> #47ffc000000000000000000000000000 Clamped
decq602 apply #47ffc000000000000000000000000000 -> 1.000000000000000000000000000000000E+6144
decq603 apply 1E+6143 -> #43ffc800000000000000000000000000 Clamped
decq604 apply #43ffc800000000000000000000000000 -> 1.00000000000000000000000000000000E+6143
decq605 apply 1E+6142 -> #43ffc100000000000000000000000000 Clamped
decq606 apply #43ffc100000000000000000000000000 -> 1.0000000000000000000000000000000E+6142
decq607 apply 1E+6141 -> #43ffc010000000000000000000000000 Clamped
decq608 apply #43ffc010000000000000000000000000 -> 1.000000000000000000000000000000E+6141
decq609 apply 1E+6140 -> #43ffc002000000000000000000000000 Clamped
decq610 apply #43ffc002000000000000000000000000 -> 1.00000000000000000000000000000E+6140
decq611 apply 1E+6139 -> #43ffc000400000000000000000000000 Clamped
decq612 apply #43ffc000400000000000000000000000 -> 1.0000000000000000000000000000E+6139
decq613 apply 1E+6138 -> #43ffc000040000000000000000000000 Clamped
decq614 apply #43ffc000040000000000000000000000 -> 1.000000000000000000000000000E+6138
decq615 apply 1E+6137 -> #43ffc000008000000000000000000000 Clamped
decq616 apply #43ffc000008000000000000000000000 -> 1.00000000000000000000000000E+6137
decq617 apply 1E+6136 -> #43ffc000001000000000000000000000 Clamped
decq618 apply #43ffc000001000000000000000000000 -> 1.0000000000000000000000000E+6136
decq619 apply 1E+6135 -> #43ffc000000100000000000000000000 Clamped
decq620 apply #43ffc000000100000000000000000000 -> 1.000000000000000000000000E+6135
decq621 apply 1E+6134 -> #43ffc000000020000000000000000000 Clamped
decq622 apply #43ffc000000020000000000000000000 -> 1.00000000000000000000000E+6134
decq623 apply 1E+6133 -> #43ffc000000004000000000000000000 Clamped
decq624 apply #43ffc000000004000000000000000000 -> 1.0000000000000000000000E+6133
decq625 apply 1E+6132 -> #43ffc000000000400000000000000000 Clamped
decq626 apply #43ffc000000000400000000000000000 -> 1.000000000000000000000E+6132
decq627 apply 1E+6131 -> #43ffc000000000080000000000000000 Clamped
decq628 apply #43ffc000000000080000000000000000 -> 1.00000000000000000000E+6131
decq629 apply 1E+6130 -> #43ffc000000000010000000000000000 Clamped
decq630 apply #43ffc000000000010000000000000000 -> 1.0000000000000000000E+6130
decq631 apply 1E+6129 -> #43ffc000000000001000000000000000 Clamped
decq632 apply #43ffc000000000001000000000000000 -> 1.000000000000000000E+6129
decq633 apply 1E+6128 -> #43ffc000000000000200000000000000 Clamped
decq634 apply #43ffc000000000000200000000000000 -> 1.00000000000000000E+6128
decq635 apply 1E+6127 -> #43ffc000000000000040000000000000 Clamped
decq636 apply #43ffc000000000000040000000000000 -> 1.0000000000000000E+6127
decq637 apply 1E+6126 -> #43ffc000000000000004000000000000 Clamped
decq638 apply #43ffc000000000000004000000000000 -> 1.000000000000000E+6126
decq639 apply 1E+6125 -> #43ffc000000000000000800000000000 Clamped
decq640 apply #43ffc000000000000000800000000000 -> 1.00000000000000E+6125
decq641 apply 1E+6124 -> #43ffc000000000000000100000000000 Clamped
decq642 apply #43ffc000000000000000100000000000 -> 1.0000000000000E+6124
decq643 apply 1E+6123 -> #43ffc000000000000000010000000000 Clamped
decq644 apply #43ffc000000000000000010000000000 -> 1.000000000000E+6123
decq645 apply 1E+6122 -> #43ffc000000000000000002000000000 Clamped
decq646 apply #43ffc000000000000000002000000000 -> 1.00000000000E+6122
decq647 apply 1E+6121 -> #43ffc000000000000000000400000000 Clamped
decq648 apply #43ffc000000000000000000400000000 -> 1.0000000000E+6121
decq649 apply 1E+6120 -> #43ffc000000000000000000040000000 Clamped
decq650 apply #43ffc000000000000000000040000000 -> 1.000000000E+6120
decq651 apply 1E+6119 -> #43ffc000000000000000000008000000 Clamped
decq652 apply #43ffc000000000000000000008000000 -> 1.00000000E+6119
decq653 apply 1E+6118 -> #43ffc000000000000000000001000000 Clamped
decq654 apply #43ffc000000000000000000001000000 -> 1.0000000E+6118
decq655 apply 1E+6117 -> #43ffc000000000000000000000100000 Clamped
decq656 apply #43ffc000000000000000000000100000 -> 1.000000E+6117
decq657 apply 1E+6116 -> #43ffc000000000000000000000020000 Clamped
decq658 apply #43ffc000000000000000000000020000 -> 1.00000E+6116
decq659 apply 1E+6115 -> #43ffc000000000000000000000004000 Clamped
decq660 apply #43ffc000000000000000000000004000 -> 1.0000E+6115
decq661 apply 1E+6114 -> #43ffc000000000000000000000000400 Clamped
decq662 apply #43ffc000000000000000000000000400 -> 1.000E+6114
decq663 apply 1E+6113 -> #43ffc000000000000000000000000080 Clamped
decq664 apply #43ffc000000000000000000000000080 -> 1.00E+6113
decq665 apply 1E+6112 -> #43ffc000000000000000000000000010 Clamped
decq666 apply #43ffc000000000000000000000000010 -> 1.0E+6112
decq667 apply 1E+6111 -> #43ffc000000000000000000000000001
decq668 apply #43ffc000000000000000000000000001 -> 1E+6111
decq669 apply 1E+6110 -> #43ff8000000000000000000000000001
decq670 apply #43ff8000000000000000000000000001 -> 1E+6110
-- Selected DPD codes
decq700 apply #22080000000000000000000000000000 -> 0
decq701 apply #22080000000000000000000000000009 -> 9
decq702 apply #22080000000000000000000000000010 -> 10
decq703 apply #22080000000000000000000000000019 -> 19
decq704 apply #22080000000000000000000000000020 -> 20
decq705 apply #22080000000000000000000000000029 -> 29
decq706 apply #22080000000000000000000000000030 -> 30
decq707 apply #22080000000000000000000000000039 -> 39
decq708 apply #22080000000000000000000000000040 -> 40
decq709 apply #22080000000000000000000000000049 -> 49
decq710 apply #22080000000000000000000000000050 -> 50
decq711 apply #22080000000000000000000000000059 -> 59
decq712 apply #22080000000000000000000000000060 -> 60
decq713 apply #22080000000000000000000000000069 -> 69
decq714 apply #22080000000000000000000000000070 -> 70
decq715 apply #22080000000000000000000000000071 -> 71
decq716 apply #22080000000000000000000000000072 -> 72
decq717 apply #22080000000000000000000000000073 -> 73
decq718 apply #22080000000000000000000000000074 -> 74
decq719 apply #22080000000000000000000000000075 -> 75
decq720 apply #22080000000000000000000000000076 -> 76
decq721 apply #22080000000000000000000000000077 -> 77
decq722 apply #22080000000000000000000000000078 -> 78
decq723 apply #22080000000000000000000000000079 -> 79
decq730 apply #2208000000000000000000000000029e -> 994
decq731 apply #2208000000000000000000000000029f -> 995
decq732 apply #220800000000000000000000000002a0 -> 520
decq733 apply #220800000000000000000000000002a1 -> 521
-- DPD: one of each of the huffman groups
decq740 apply #220800000000000000000000000003f7 -> 777
decq741 apply #220800000000000000000000000003f8 -> 778
decq742 apply #220800000000000000000000000003eb -> 787
decq743 apply #2208000000000000000000000000037d -> 877
decq744 apply #2208000000000000000000000000039f -> 997
decq745 apply #220800000000000000000000000003bf -> 979
decq746 apply #220800000000000000000000000003df -> 799
decq747 apply #2208000000000000000000000000006e -> 888
-- DPD all-highs cases (includes the 24 redundant codes)
decq750 apply #2208000000000000000000000000006e -> 888
decq751 apply #2208000000000000000000000000016e -> 888
decq752 apply #2208000000000000000000000000026e -> 888
decq753 apply #2208000000000000000000000000036e -> 888
decq754 apply #2208000000000000000000000000006f -> 889
decq755 apply #2208000000000000000000000000016f -> 889
decq756 apply #2208000000000000000000000000026f -> 889
decq757 apply #2208000000000000000000000000036f -> 889
decq760 apply #2208000000000000000000000000007e -> 898
decq761 apply #2208000000000000000000000000017e -> 898
decq762 apply #2208000000000000000000000000027e -> 898
decq763 apply #2208000000000000000000000000037e -> 898
decq764 apply #2208000000000000000000000000007f -> 899
decq765 apply #2208000000000000000000000000017f -> 899
decq766 apply #2208000000000000000000000000027f -> 899
decq767 apply #2208000000000000000000000000037f -> 899
decq770 apply #220800000000000000000000000000ee -> 988
decq771 apply #220800000000000000000000000001ee -> 988
decq772 apply #220800000000000000000000000002ee -> 988
decq773 apply #220800000000000000000000000003ee -> 988
decq774 apply #220800000000000000000000000000ef -> 989
decq775 apply #220800000000000000000000000001ef -> 989
decq776 apply #220800000000000000000000000002ef -> 989
decq777 apply #220800000000000000000000000003ef -> 989
decq780 apply #220800000000000000000000000000fe -> 998
decq781 apply #220800000000000000000000000001fe -> 998
decq782 apply #220800000000000000000000000002fe -> 998
decq783 apply #220800000000000000000000000003fe -> 998
decq784 apply #220800000000000000000000000000ff -> 999
decq785 apply #220800000000000000000000000001ff -> 999
decq786 apply #220800000000000000000000000002ff -> 999
decq787 apply #220800000000000000000000000003ff -> 999
-- Miscellaneous (testers' queries, etc.)
decq790 apply #2208000000000000000000000000c000 -> 30000
decq791 apply #22080000000000000000000000007800 -> 890000
decq792 apply 30000 -> #2208000000000000000000000000c000
decq793 apply 890000 -> #22080000000000000000000000007800
-- values around [u]int32 edges (zeros done earlier)
decq800 apply -2147483646 -> #a208000000000000000000008c78af46
decq801 apply -2147483647 -> #a208000000000000000000008c78af47
decq802 apply -2147483648 -> #a208000000000000000000008c78af48
decq803 apply -2147483649 -> #a208000000000000000000008c78af49
decq804 apply 2147483646 -> #2208000000000000000000008c78af46
decq805 apply 2147483647 -> #2208000000000000000000008c78af47
decq806 apply 2147483648 -> #2208000000000000000000008c78af48
decq807 apply 2147483649 -> #2208000000000000000000008c78af49
decq808 apply 4294967294 -> #22080000000000000000000115afb55a
decq809 apply 4294967295 -> #22080000000000000000000115afb55b
decq810 apply 4294967296 -> #22080000000000000000000115afb57a
decq811 apply 4294967297 -> #22080000000000000000000115afb57b
decq820 apply #a208000000000000000000008c78af46 -> -2147483646
decq821 apply #a208000000000000000000008c78af47 -> -2147483647
decq822 apply #a208000000000000000000008c78af48 -> -2147483648
decq823 apply #a208000000000000000000008c78af49 -> -2147483649
decq824 apply #2208000000000000000000008c78af46 -> 2147483646
decq825 apply #2208000000000000000000008c78af47 -> 2147483647
decq826 apply #2208000000000000000000008c78af48 -> 2147483648
decq827 apply #2208000000000000000000008c78af49 -> 2147483649
decq828 apply #22080000000000000000000115afb55a -> 4294967294
decq829 apply #22080000000000000000000115afb55b -> 4294967295
decq830 apply #22080000000000000000000115afb57a -> 4294967296
decq831 apply #22080000000000000000000115afb57b -> 4294967297
-- VG testcase
decq840 apply #2080000000000000F294000000172636 -> 8.81125000000001349436E-1548
decq841 apply #20800000000000008000000000000000 -> 8.000000000000000000E-1550
decq842 apply #1EF98490000000010F6E4E0000000000 -> 7.049000000000010795488000000000000E-3097
decq843 multiply #20800000000000008000000000000000 #2080000000000000F294000000172636 -> #1EF98490000000010F6E4E0000000000 Rounded
------------------------------------------------------------------------
-- dqEncode.decTest -- decimal sixteen-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 decimal128.decTest]
version: 2.59
-- This set of tests is for the sixteen-byte concrete representation.
-- Its characteristics are:
--
-- 1 bit sign
-- 5 bits combination field
-- 12 bits exponent continuation
-- 110 bits coefficient continuation
--
-- Total exponent length 14 bits
-- Total coefficient length 114 bits (34 digits)
--
-- Elimit = 12287 (maximum encoded exponent)
-- Emax = 6144 (largest exponent value)
-- Emin = -6143 (smallest exponent value)
-- bias = 6176 (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: 34
rounding: half_up
maxExponent: 6144
minExponent: -6143
-- General testcases
-- (mostly derived from the Strawman 4 document and examples)
decq001 apply #A20780000000000000000000000003D0 -> -7.50
decq002 apply -7.50 -> #A20780000000000000000000000003D0
-- derivative canonical plain strings
decq003 apply #A20840000000000000000000000003D0 -> -7.50E+3
decq004 apply -7.50E+3 -> #A20840000000000000000000000003D0
decq005 apply #A20800000000000000000000000003D0 -> -750
decq006 apply -750 -> #A20800000000000000000000000003D0
decq007 apply #A207c0000000000000000000000003D0 -> -75.0
decq008 apply -75.0 -> #A207c0000000000000000000000003D0
decq009 apply #A20740000000000000000000000003D0 -> -0.750
decq010 apply -0.750 -> #A20740000000000000000000000003D0
decq011 apply #A20700000000000000000000000003D0 -> -0.0750
decq012 apply -0.0750 -> #A20700000000000000000000000003D0
decq013 apply #A20680000000000000000000000003D0 -> -0.000750
decq014 apply -0.000750 -> #A20680000000000000000000000003D0
decq015 apply #A20600000000000000000000000003D0 -> -0.00000750
decq016 apply -0.00000750 -> #A20600000000000000000000000003D0
decq017 apply #A205c0000000000000000000000003D0 -> -7.50E-7
decq018 apply -7.50E-7 -> #A205c0000000000000000000000003D0
-- Normality
decq020 apply 1234567890123456789012345678901234 -> #2608134b9c1e28e56f3c127177823534
decq021 apply -1234567890123456789012345678901234 -> #a608134b9c1e28e56f3c127177823534
decq022 apply 1111111111111111111111111111111111 -> #26080912449124491244912449124491
-- Nmax and similar
decq031 apply 9.999999999999999999999999999999999E+6144 -> #77ffcff3fcff3fcff3fcff3fcff3fcff
decq032 apply #77ffcff3fcff3fcff3fcff3fcff3fcff -> 9.999999999999999999999999999999999E+6144
decq033 apply 1.234567890123456789012345678901234E+6144 -> #47ffd34b9c1e28e56f3c127177823534
decq034 apply #47ffd34b9c1e28e56f3c127177823534 -> 1.234567890123456789012345678901234E+6144
-- fold-downs (more below)
decq035 apply 1.23E+6144 -> #47ffd300000000000000000000000000 Clamped
decq036 apply #47ffd300000000000000000000000000 -> 1.230000000000000000000000000000000E+6144
decq037 apply 1E+6144 -> #47ffc000000000000000000000000000 Clamped
decq038 apply #47ffc000000000000000000000000000 -> 1.000000000000000000000000000000000E+6144
decq051 apply 12345 -> #220800000000000000000000000049c5
decq052 apply #220800000000000000000000000049c5 -> 12345
decq053 apply 1234 -> #22080000000000000000000000000534
decq054 apply #22080000000000000000000000000534 -> 1234
decq055 apply 123 -> #220800000000000000000000000000a3
decq056 apply #220800000000000000000000000000a3 -> 123
decq057 apply 12 -> #22080000000000000000000000000012
decq058 apply #22080000000000000000000000000012 -> 12
decq059 apply 1 -> #22080000000000000000000000000001
decq060 apply #22080000000000000000000000000001 -> 1
decq061 apply 1.23 -> #220780000000000000000000000000a3
decq062 apply #220780000000000000000000000000a3 -> 1.23
decq063 apply 123.45 -> #220780000000000000000000000049c5
decq064 apply #220780000000000000000000000049c5 -> 123.45
-- Nmin and below
decq071 apply 1E-6143 -> #00084000000000000000000000000001
decq072 apply #00084000000000000000000000000001 -> 1E-6143
decq073 apply 1.000000000000000000000000000000000E-6143 -> #04000000000000000000000000000000
decq074 apply #04000000000000000000000000000000 -> 1.000000000000000000000000000000000E-6143
decq075 apply 1.000000000000000000000000000000001E-6143 -> #04000000000000000000000000000001
decq076 apply #04000000000000000000000000000001 -> 1.000000000000000000000000000000001E-6143
decq077 apply 0.100000000000000000000000000000000E-6143 -> #00000800000000000000000000000000 Subnormal
decq078 apply #00000800000000000000000000000000 -> 1.00000000000000000000000000000000E-6144 Subnormal
decq079 apply 0.000000000000000000000000000000010E-6143 -> #00000000000000000000000000000010 Subnormal
decq080 apply #00000000000000000000000000000010 -> 1.0E-6175 Subnormal
decq081 apply 0.00000000000000000000000000000001E-6143 -> #00004000000000000000000000000001 Subnormal
decq082 apply #00004000000000000000000000000001 -> 1E-6175 Subnormal
decq083 apply 0.000000000000000000000000000000001E-6143 -> #00000000000000000000000000000001 Subnormal
decq084 apply #00000000000000000000000000000001 -> 1E-6176 Subnormal
-- underflows cannot be tested for simple copies, check edge cases
decq090 apply 1e-6176 -> #00000000000000000000000000000001 Subnormal
decq100 apply 999999999999999999999999999999999e-6176 -> #00000ff3fcff3fcff3fcff3fcff3fcff Subnormal
-- same again, negatives
-- Nmax and similar
decq122 apply -9.999999999999999999999999999999999E+6144 -> #f7ffcff3fcff3fcff3fcff3fcff3fcff
decq123 apply #f7ffcff3fcff3fcff3fcff3fcff3fcff -> -9.999999999999999999999999999999999E+6144
decq124 apply -1.234567890123456789012345678901234E+6144 -> #c7ffd34b9c1e28e56f3c127177823534
decq125 apply #c7ffd34b9c1e28e56f3c127177823534 -> -1.234567890123456789012345678901234E+6144
-- fold-downs (more below)
decq130 apply -1.23E+6144 -> #c7ffd300000000000000000000000000 Clamped
decq131 apply #c7ffd300000000000000000000000000 -> -1.230000000000000000000000000000000E+6144
decq132 apply -1E+6144 -> #c7ffc000000000000000000000000000 Clamped
decq133 apply #c7ffc000000000000000000000000000 -> -1.000000000000000000000000000000000E+6144
decq151 apply -12345 -> #a20800000000000000000000000049c5
decq152 apply #a20800000000000000000000000049c5 -> -12345
decq153 apply -1234 -> #a2080000000000000000000000000534
decq154 apply #a2080000000000000000000000000534 -> -1234
decq155 apply -123 -> #a20800000000000000000000000000a3
decq156 apply #a20800000000000000000000000000a3 -> -123
decq157 apply -12 -> #a2080000000000000000000000000012
decq158 apply #a2080000000000000000000000000012 -> -12
decq159 apply -1 -> #a2080000000000000000000000000001
decq160 apply #a2080000000000000000000000000001 -> -1
decq161 apply -1.23 -> #a20780000000000000000000000000a3
decq162 apply #a20780000000000000000000000000a3 -> -1.23
decq163 apply -123.45 -> #a20780000000000000000000000049c5
decq164 apply #a20780000000000000000000000049c5 -> -123.45
-- Nmin and below
decq171 apply -1E-6143 -> #80084000000000000000000000000001
decq172 apply #80084000000000000000000000000001 -> -1E-6143
decq173 apply -1.000000000000000000000000000000000E-6143 -> #84000000000000000000000000000000
decq174 apply #84000000000000000000000000000000 -> -1.000000000000000000000000000000000E-6143
decq175 apply -1.000000000000000000000000000000001E-6143 -> #84000000000000000000000000000001
decq176 apply #84000000000000000000000000000001 -> -1.000000000000000000000000000000001E-6143
decq177 apply -0.100000000000000000000000000000000E-6143 -> #80000800000000000000000000000000 Subnormal
decq178 apply #80000800000000000000000000000000 -> -1.00000000000000000000000000000000E-6144 Subnormal
decq179 apply -0.000000000000000000000000000000010E-6143 -> #80000000000000000000000000000010 Subnormal
decq180 apply #80000000000000000000000000000010 -> -1.0E-6175 Subnormal
decq181 apply -0.00000000000000000000000000000001E-6143 -> #80004000000000000000000000000001 Subnormal
decq182 apply #80004000000000000000000000000001 -> -1E-6175 Subnormal
decq183 apply -0.000000000000000000000000000000001E-6143 -> #80000000000000000000000000000001 Subnormal
decq184 apply #80000000000000000000000000000001 -> -1E-6176 Subnormal
-- underflow edge cases
decq190 apply -1e-6176 -> #80000000000000000000000000000001 Subnormal
decq200 apply -999999999999999999999999999999999e-6176 -> #80000ff3fcff3fcff3fcff3fcff3fcff Subnormal
-- zeros
decq400 apply 0E-8000 -> #00000000000000000000000000000000 Clamped
decq401 apply 0E-6177 -> #00000000000000000000000000000000 Clamped
decq402 apply 0E-6176 -> #00000000000000000000000000000000
decq403 apply #00000000000000000000000000000000 -> 0E-6176
decq404 apply 0.000000000000000000000000000000000E-6143 -> #00000000000000000000000000000000
decq405 apply #00000000000000000000000000000000 -> 0E-6176
decq406 apply 0E-2 -> #22078000000000000000000000000000
decq407 apply #22078000000000000000000000000000 -> 0.00
decq408 apply 0 -> #22080000000000000000000000000000
decq409 apply #22080000000000000000000000000000 -> 0
decq410 apply 0E+3 -> #2208c000000000000000000000000000
decq411 apply #2208c000000000000000000000000000 -> 0E+3
decq412 apply 0E+6111 -> #43ffc000000000000000000000000000
decq413 apply #43ffc000000000000000000000000000 -> 0E+6111
-- clamped zeros...
decq414 apply 0E+6112 -> #43ffc000000000000000000000000000 Clamped
decq415 apply #43ffc000000000000000000000000000 -> 0E+6111
decq416 apply 0E+6144 -> #43ffc000000000000000000000000000 Clamped
decq417 apply #43ffc000000000000000000000000000 -> 0E+6111
decq418 apply 0E+8000 -> #43ffc000000000000000000000000000 Clamped
decq419 apply #43ffc000000000000000000000000000 -> 0E+6111
-- negative zeros
decq420 apply -0E-8000 -> #80000000000000000000000000000000 Clamped
decq421 apply -0E-6177 -> #80000000000000000000000000000000 Clamped
decq422 apply -0E-6176 -> #80000000000000000000000000000000
decq423 apply #80000000000000000000000000000000 -> -0E-6176
decq424 apply -0.000000000000000000000000000000000E-6143 -> #80000000000000000000000000000000
decq425 apply #80000000000000000000000000000000 -> -0E-6176
decq426 apply -0E-2 -> #a2078000000000000000000000000000
decq427 apply #a2078000000000000000000000000000 -> -0.00
decq428 apply -0 -> #a2080000000000000000000000000000
decq429 apply #a2080000000000000000000000000000 -> -0
decq430 apply -0E+3 -> #a208c000000000000000000000000000
decq431 apply #a208c000000000000000000000000000 -> -0E+3
decq432 apply -0E+6111 -> #c3ffc000000000000000000000000000
decq433 apply #c3ffc000000000000000000000000000 -> -0E+6111
-- clamped zeros...
decq434 apply -0E+6112 -> #c3ffc000000000000000000000000000 Clamped
decq435 apply #c3ffc000000000000000000000000000 -> -0E+6111
decq436 apply -0E+6144 -> #c3ffc000000000000000000000000000 Clamped
decq437 apply #c3ffc000000000000000000000000000 -> -0E+6111
decq438 apply -0E+8000 -> #c3ffc000000000000000000000000000 Clamped
decq439 apply #c3ffc000000000000000000000000000 -> -0E+6111
-- exponent lengths
decq440 apply #22080000000000000000000000000007 -> 7
decq441 apply 7 -> #22080000000000000000000000000007
decq442 apply #220a4000000000000000000000000007 -> 7E+9
decq443 apply 7E+9 -> #220a4000000000000000000000000007
decq444 apply #2220c000000000000000000000000007 -> 7E+99
decq445 apply 7E+99 -> #2220c000000000000000000000000007
decq446 apply #2301c000000000000000000000000007 -> 7E+999
decq447 apply 7E+999 -> #2301c000000000000000000000000007
decq448 apply #43e3c000000000000000000000000007 -> 7E+5999
decq449 apply 7E+5999 -> #43e3c000000000000000000000000007
-- Specials
decq500 apply Infinity -> #78000000000000000000000000000000
decq501 apply #78787878787878787878787878787878 -> #78000000000000000000000000000000
decq502 apply #78000000000000000000000000000000 -> Infinity
decq503 apply #79797979797979797979797979797979 -> #78000000000000000000000000000000
decq504 apply #79000000000000000000000000000000 -> Infinity
decq505 apply #7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a -> #78000000000000000000000000000000
decq506 apply #7a000000000000000000000000000000 -> Infinity
decq507 apply #7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b -> #78000000000000000000000000000000
decq508 apply #7b000000000000000000000000000000 -> Infinity
decq509 apply NaN -> #7c000000000000000000000000000000
decq510 apply #7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c -> #7c003c7c7c7c7c7c7c7c7c7c7c7c7c7c
decq511 apply #7c000000000000000000000000000000 -> NaN
decq512 apply #7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d -> #7c003d7d7d7d7d7d7d7d7d7d7d7d7d7d
decq513 apply #7d000000000000000000000000000000 -> NaN
decq514 apply #7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e -> #7e003e7e7c7e7e7e7e7c7e7e7e7e7c7e
decq515 apply #7e000000000000000000000000000000 -> sNaN
decq516 apply #7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f -> #7e003f7f7c7f7f7f7f7c7f7f7f7f7c7f
decq517 apply #7f000000000000000000000000000000 -> sNaN
decq518 apply #7fffffffffffffffffffffffffffffff -> sNaN999999999999999999999999999999999
decq519 apply #7fffffffffffffffffffffffffffffff -> #7e000ff3fcff3fcff3fcff3fcff3fcff
decq520 apply -Infinity -> #f8000000000000000000000000000000
decq521 apply #f8787878787878787878787878787878 -> #f8000000000000000000000000000000
decq522 apply #f8000000000000000000000000000000 -> -Infinity
decq523 apply #f9797979797979797979797979797979 -> #f8000000000000000000000000000000
decq524 apply #f9000000000000000000000000000000 -> -Infinity
decq525 apply #fa7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a -> #f8000000000000000000000000000000
decq526 apply #fa000000000000000000000000000000 -> -Infinity
decq527 apply #fb7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b -> #f8000000000000000000000000000000
decq528 apply #fb000000000000000000000000000000 -> -Infinity
decq529 apply -NaN -> #fc000000000000000000000000000000
decq530 apply #fc7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c -> #fc003c7c7c7c7c7c7c7c7c7c7c7c7c7c
decq531 apply #fc000000000000000000000000000000 -> -NaN
decq532 apply #fd7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d -> #fc003d7d7d7d7d7d7d7d7d7d7d7d7d7d
decq533 apply #fd000000000000000000000000000000 -> -NaN
decq534 apply #fe7e7e7e7e7e7e7e7e7e7e7e7e7e7e7e -> #fe003e7e7c7e7e7e7e7c7e7e7e7e7c7e
decq535 apply #fe000000000000000000000000000000 -> -sNaN
decq536 apply #ff7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f -> #fe003f7f7c7f7f7f7f7c7f7f7f7f7c7f
decq537 apply #ff000000000000000000000000000000 -> -sNaN
decq538 apply #ffffffffffffffffffffffffffffffff -> -sNaN999999999999999999999999999999999
decq539 apply #ffffffffffffffffffffffffffffffff -> #fe000ff3fcff3fcff3fcff3fcff3fcff
decq540 apply NaN -> #7c000000000000000000000000000000
decq541 apply NaN0 -> #7c000000000000000000000000000000
decq542 apply NaN1 -> #7c000000000000000000000000000001
decq543 apply NaN12 -> #7c000000000000000000000000000012
decq544 apply NaN79 -> #7c000000000000000000000000000079
decq545 apply NaN12345 -> #7c0000000000000000000000000049c5
decq546 apply NaN123456 -> #7c000000000000000000000000028e56
decq547 apply NaN799799 -> #7c0000000000000000000000000f7fdf
decq548 apply NaN799799799799799799799799799799799 -> #7c003dff7fdff7fdff7fdff7fdff7fdf
decq549 apply NaN999999999999999999999999999999999 -> #7c000ff3fcff3fcff3fcff3fcff3fcff
decq550 apply 9999999999999999999999999999999999 -> #6e080ff3fcff3fcff3fcff3fcff3fcff
-- fold-down full sequence
decq601 apply 1E+6144 -> #47ffc000000000000000000000000000 Clamped
decq602 apply #47ffc000000000000000000000000000 -> 1.000000000000000000000000000000000E+6144
decq603 apply 1E+6143 -> #43ffc800000000000000000000000000 Clamped
decq604 apply #43ffc800000000000000000000000000 -> 1.00000000000000000000000000000000E+6143
decq605 apply 1E+6142 -> #43ffc100000000000000000000000000 Clamped
decq606 apply #43ffc100000000000000000000000000 -> 1.0000000000000000000000000000000E+6142
decq607 apply 1E+6141 -> #43ffc010000000000000000000000000 Clamped
decq608 apply #43ffc010000000000000000000000000 -> 1.000000000000000000000000000000E+6141
decq609 apply 1E+6140 -> #43ffc002000000000000000000000000 Clamped
decq610 apply #43ffc002000000000000000000000000 -> 1.00000000000000000000000000000E+6140
decq611 apply 1E+6139 -> #43ffc000400000000000000000000000 Clamped
decq612 apply #43ffc000400000000000000000000000 -> 1.0000000000000000000000000000E+6139
decq613 apply 1E+6138 -> #43ffc000040000000000000000000000 Clamped
decq614 apply #43ffc000040000000000000000000000 -> 1.000000000000000000000000000E+6138
decq615 apply 1E+6137 -> #43ffc000008000000000000000000000 Clamped
decq616 apply #43ffc000008000000000000000000000 -> 1.00000000000000000000000000E+6137
decq617 apply 1E+6136 -> #43ffc000001000000000000000000000 Clamped
decq618 apply #43ffc000001000000000000000000000 -> 1.0000000000000000000000000E+6136
decq619 apply 1E+6135 -> #43ffc000000100000000000000000000 Clamped
decq620 apply #43ffc000000100000000000000000000 -> 1.000000000000000000000000E+6135
decq621 apply 1E+6134 -> #43ffc000000020000000000000000000 Clamped
decq622 apply #43ffc000000020000000000000000000 -> 1.00000000000000000000000E+6134
decq623 apply 1E+6133 -> #43ffc000000004000000000000000000 Clamped
decq624 apply #43ffc000000004000000000000000000 -> 1.0000000000000000000000E+6133
decq625 apply 1E+6132 -> #43ffc000000000400000000000000000 Clamped
decq626 apply #43ffc000000000400000000000000000 -> 1.000000000000000000000E+6132
decq627 apply 1E+6131 -> #43ffc000000000080000000000000000 Clamped
decq628 apply #43ffc000000000080000000000000000 -> 1.00000000000000000000E+6131
decq629 apply 1E+6130 -> #43ffc000000000010000000000000000 Clamped
decq630 apply #43ffc000000000010000000000000000 -> 1.0000000000000000000E+6130
decq631 apply 1E+6129 -> #43ffc000000000001000000000000000 Clamped
decq632 apply #43ffc000000000001000000000000000 -> 1.000000000000000000E+6129
decq633 apply 1E+6128 -> #43ffc000000000000200000000000000 Clamped
decq634 apply #43ffc000000000000200000000000000 -> 1.00000000000000000E+6128
decq635 apply 1E+6127 -> #43ffc000000000000040000000000000 Clamped
decq636 apply #43ffc000000000000040000000000000 -> 1.0000000000000000E+6127
decq637 apply 1E+6126 -> #43ffc000000000000004000000000000 Clamped
decq638 apply #43ffc000000000000004000000000000 -> 1.000000000000000E+6126
decq639 apply 1E+6125 -> #43ffc000000000000000800000000000 Clamped
decq640 apply #43ffc000000000000000800000000000 -> 1.00000000000000E+6125
decq641 apply 1E+6124 -> #43ffc000000000000000100000000000 Clamped
decq642 apply #43ffc000000000000000100000000000 -> 1.0000000000000E+6124
decq643 apply 1E+6123 -> #43ffc000000000000000010000000000 Clamped
decq644 apply #43ffc000000000000000010000000000 -> 1.000000000000E+6123
decq645 apply 1E+6122 -> #43ffc000000000000000002000000000 Clamped
decq646 apply #43ffc000000000000000002000000000 -> 1.00000000000E+6122
decq647 apply 1E+6121 -> #43ffc000000000000000000400000000 Clamped
decq648 apply #43ffc000000000000000000400000000 -> 1.0000000000E+6121
decq649 apply 1E+6120 -> #43ffc000000000000000000040000000 Clamped
decq650 apply #43ffc000000000000000000040000000 -> 1.000000000E+6120
decq651 apply 1E+6119 -> #43ffc000000000000000000008000000 Clamped
decq652 apply #43ffc000000000000000000008000000 -> 1.00000000E+6119
decq653 apply 1E+6118 -> #43ffc000000000000000000001000000 Clamped
decq654 apply #43ffc000000000000000000001000000 -> 1.0000000E+6118
decq655 apply 1E+6117 -> #43ffc000000000000000000000100000 Clamped
decq656 apply #43ffc000000000000000000000100000 -> 1.000000E+6117
decq657 apply 1E+6116 -> #43ffc000000000000000000000020000 Clamped
decq658 apply #43ffc000000000000000000000020000 -> 1.00000E+6116
decq659 apply 1E+6115 -> #43ffc000000000000000000000004000 Clamped
decq660 apply #43ffc000000000000000000000004000 -> 1.0000E+6115
decq661 apply 1E+6114 -> #43ffc000000000000000000000000400 Clamped
decq662 apply #43ffc000000000000000000000000400 -> 1.000E+6114
decq663 apply 1E+6113 -> #43ffc000000000000000000000000080 Clamped
decq664 apply #43ffc000000000000000000000000080 -> 1.00E+6113
decq665 apply 1E+6112 -> #43ffc000000000000000000000000010 Clamped
decq666 apply #43ffc000000000000000000000000010 -> 1.0E+6112
decq667 apply 1E+6111 -> #43ffc000000000000000000000000001
decq668 apply #43ffc000000000000000000000000001 -> 1E+6111
decq669 apply 1E+6110 -> #43ff8000000000000000000000000001
decq670 apply #43ff8000000000000000000000000001 -> 1E+6110
-- Selected DPD codes
decq700 apply #22080000000000000000000000000000 -> 0
decq701 apply #22080000000000000000000000000009 -> 9
decq702 apply #22080000000000000000000000000010 -> 10
decq703 apply #22080000000000000000000000000019 -> 19
decq704 apply #22080000000000000000000000000020 -> 20
decq705 apply #22080000000000000000000000000029 -> 29
decq706 apply #22080000000000000000000000000030 -> 30
decq707 apply #22080000000000000000000000000039 -> 39
decq708 apply #22080000000000000000000000000040 -> 40
decq709 apply #22080000000000000000000000000049 -> 49
decq710 apply #22080000000000000000000000000050 -> 50
decq711 apply #22080000000000000000000000000059 -> 59
decq712 apply #22080000000000000000000000000060 -> 60
decq713 apply #22080000000000000000000000000069 -> 69
decq714 apply #22080000000000000000000000000070 -> 70
decq715 apply #22080000000000000000000000000071 -> 71
decq716 apply #22080000000000000000000000000072 -> 72
decq717 apply #22080000000000000000000000000073 -> 73
decq718 apply #22080000000000000000000000000074 -> 74
decq719 apply #22080000000000000000000000000075 -> 75
decq720 apply #22080000000000000000000000000076 -> 76
decq721 apply #22080000000000000000000000000077 -> 77
decq722 apply #22080000000000000000000000000078 -> 78
decq723 apply #22080000000000000000000000000079 -> 79
decq730 apply #2208000000000000000000000000029e -> 994
decq731 apply #2208000000000000000000000000029f -> 995
decq732 apply #220800000000000000000000000002a0 -> 520
decq733 apply #220800000000000000000000000002a1 -> 521
-- DPD: one of each of the huffman groups
decq740 apply #220800000000000000000000000003f7 -> 777
decq741 apply #220800000000000000000000000003f8 -> 778
decq742 apply #220800000000000000000000000003eb -> 787
decq743 apply #2208000000000000000000000000037d -> 877
decq744 apply #2208000000000000000000000000039f -> 997
decq745 apply #220800000000000000000000000003bf -> 979
decq746 apply #220800000000000000000000000003df -> 799
decq747 apply #2208000000000000000000000000006e -> 888
-- DPD all-highs cases (includes the 24 redundant codes)
decq750 apply #2208000000000000000000000000006e -> 888
decq751 apply #2208000000000000000000000000016e -> 888
decq752 apply #2208000000000000000000000000026e -> 888
decq753 apply #2208000000000000000000000000036e -> 888
decq754 apply #2208000000000000000000000000006f -> 889
decq755 apply #2208000000000000000000000000016f -> 889
decq756 apply #2208000000000000000000000000026f -> 889
decq757 apply #2208000000000000000000000000036f -> 889
decq760 apply #2208000000000000000000000000007e -> 898
decq761 apply #2208000000000000000000000000017e -> 898
decq762 apply #2208000000000000000000000000027e -> 898
decq763 apply #2208000000000000000000000000037e -> 898
decq764 apply #2208000000000000000000000000007f -> 899
decq765 apply #2208000000000000000000000000017f -> 899
decq766 apply #2208000000000000000000000000027f -> 899
decq767 apply #2208000000000000000000000000037f -> 899
decq770 apply #220800000000000000000000000000ee -> 988
decq771 apply #220800000000000000000000000001ee -> 988
decq772 apply #220800000000000000000000000002ee -> 988
decq773 apply #220800000000000000000000000003ee -> 988
decq774 apply #220800000000000000000000000000ef -> 989
decq775 apply #220800000000000000000000000001ef -> 989
decq776 apply #220800000000000000000000000002ef -> 989
decq777 apply #220800000000000000000000000003ef -> 989
decq780 apply #220800000000000000000000000000fe -> 998
decq781 apply #220800000000000000000000000001fe -> 998
decq782 apply #220800000000000000000000000002fe -> 998
decq783 apply #220800000000000000000000000003fe -> 998
decq784 apply #220800000000000000000000000000ff -> 999
decq785 apply #220800000000000000000000000001ff -> 999
decq786 apply #220800000000000000000000000002ff -> 999
decq787 apply #220800000000000000000000000003ff -> 999
-- Miscellaneous (testers' queries, etc.)
decq790 apply #2208000000000000000000000000c000 -> 30000
decq791 apply #22080000000000000000000000007800 -> 890000
decq792 apply 30000 -> #2208000000000000000000000000c000
decq793 apply 890000 -> #22080000000000000000000000007800
-- values around [u]int32 edges (zeros done earlier)
decq800 apply -2147483646 -> #a208000000000000000000008c78af46
decq801 apply -2147483647 -> #a208000000000000000000008c78af47
decq802 apply -2147483648 -> #a208000000000000000000008c78af48
decq803 apply -2147483649 -> #a208000000000000000000008c78af49
decq804 apply 2147483646 -> #2208000000000000000000008c78af46
decq805 apply 2147483647 -> #2208000000000000000000008c78af47
decq806 apply 2147483648 -> #2208000000000000000000008c78af48
decq807 apply 2147483649 -> #2208000000000000000000008c78af49
decq808 apply 4294967294 -> #22080000000000000000000115afb55a
decq809 apply 4294967295 -> #22080000000000000000000115afb55b
decq810 apply 4294967296 -> #22080000000000000000000115afb57a
decq811 apply 4294967297 -> #22080000000000000000000115afb57b
decq820 apply #a208000000000000000000008c78af46 -> -2147483646
decq821 apply #a208000000000000000000008c78af47 -> -2147483647
decq822 apply #a208000000000000000000008c78af48 -> -2147483648
decq823 apply #a208000000000000000000008c78af49 -> -2147483649
decq824 apply #2208000000000000000000008c78af46 -> 2147483646
decq825 apply #2208000000000000000000008c78af47 -> 2147483647
decq826 apply #2208000000000000000000008c78af48 -> 2147483648
decq827 apply #2208000000000000000000008c78af49 -> 2147483649
decq828 apply #22080000000000000000000115afb55a -> 4294967294
decq829 apply #22080000000000000000000115afb55b -> 4294967295
decq830 apply #22080000000000000000000115afb57a -> 4294967296
decq831 apply #22080000000000000000000115afb57b -> 4294967297
-- VG testcase
decq840 apply #2080000000000000F294000000172636 -> 8.81125000000001349436E-1548
decq841 apply #20800000000000008000000000000000 -> 8.000000000000000000E-1550
decq842 apply #1EF98490000000010F6E4E0000000000 -> 7.049000000000010795488000000000000E-3097
decq843 multiply #20800000000000008000000000000000 #2080000000000000F294000000172636 -> #1EF98490000000010F6E4E0000000000 Rounded

File diff suppressed because it is too large Load diff

View file

@ -1,245 +1,245 @@
------------------------------------------------------------------------
-- dqInvert.decTest -- digitwise logical INVERT for decQuads --
-- 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
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check (truth table)
dqinv001 invert 0 -> 1111111111111111111111111111111111
dqinv002 invert 1 -> 1111111111111111111111111111111110
dqinv003 invert 10 -> 1111111111111111111111111111111101
dqinv004 invert 111111111 -> 1111111111111111111111111000000000
dqinv005 invert 000000000 -> 1111111111111111111111111111111111
-- and at msd and msd-1
dqinv007 invert 0000000000000000000000000000000000 -> 1111111111111111111111111111111111
dqinv008 invert 1000000000000000000000000000000000 -> 111111111111111111111111111111111
dqinv009 invert 0000000000000000000000000000000000 -> 1111111111111111111111111111111111
dqinv010 invert 0100000000000000000000000000000000 -> 1011111111111111111111111111111111
dqinv011 invert 0111111111111111111111111111111111 -> 1000000000000000000000000000000000
dqinv012 invert 1111111111111111111111111111111111 -> 0
dqinv013 invert 0011111111111111111111111111111111 -> 1100000000000000000000000000000000
dqinv014 invert 0111111111111111111111111111111111 -> 1000000000000000000000000000000000
-- Various lengths
dqinv600 invert 0111111111111111111011111111111111 -> 1000000000000000000100000000000000
dqinv601 invert 0011111111111111110101111111111111 -> 1100000000000000001010000000000000
dqinv602 invert 0101111111111111101110111111111111 -> 1010000000000000010001000000000000
dqinv603 invert 0110111111111111011111011111111111 -> 1001000000000000100000100000000000
dqinv604 invert 0111011111111110111111101111111111 -> 1000100000000001000000010000000000
dqinv605 invert 0111101111111101111111110111111111 -> 1000010000000010000000001000000000
dqinv606 invert 0111110111111011111111111011111111 -> 1000001000000100000000000100000000
dqinv607 invert 0111111011110111111111111101111111 -> 1000000100001000000000000010000000
dqinv608 invert 0111111101101111111111111110111111 -> 1000000010010000000000000001000000
dqinv609 invert 0111111110011111111111111111011111 -> 1000000001100000000000000000100000
dqinv610 invert 0111111110011111111111111111101111 -> 1000000001100000000000000000010000
dqinv611 invert 0111111101101111111111111111110111 -> 1000000010010000000000000000001000
dqinv612 invert 0111111011110111111111111111111011 -> 1000000100001000000000000000000100
dqinv613 invert 0111110111111011111111111111111101 -> 1000001000000100000000000000000010
dqinv614 invert 0111101111111101111111111111111110 -> 1000010000000010000000000000000001
dqinv615 invert 0111011111111110111111111111111111 -> 1000100000000001000000000000000000
dqinv616 invert 0110111111111111011111111111111110 -> 1001000000000000100000000000000001
dqinv617 invert 0101111111111111101111111111111101 -> 1010000000000000010000000000000010
dqinv618 invert 0011111111111111110111111111111011 -> 1100000000000000001000000000000100
dqinv619 invert 0101111111111111111011111111110111 -> 1010000000000000000100000000001000
dqinv620 invert 0110111111111111111101111111101111 -> 1001000000000000000010000000010000
dqinv621 invert 0111011111111111111110111111011111 -> 1000100000000000000001000000100000
dqinv622 invert 0111101111111111111111011110111111 -> 1000010000000000000000100001000000
dqinv623 invert 0111110111111111111111101101111111 -> 1000001000000000000000010010000000
dqinv624 invert 0111111011111111111111110011111111 -> 1000000100000000000000001100000000
dqinv625 invert 0111111101111111111111110011111111 -> 1000000010000000000000001100000000
dqinv626 invert 0111111110111111111111101101111111 -> 1000000001000000000000010010000000
dqinv627 invert 0111111111011111111111011110111111 -> 1000000000100000000000100001000000
dqinv628 invert 0111111111101111111110111111011111 -> 1000000000010000000001000000100000
dqinv629 invert 0111111111110111111101111111101111 -> 1000000000001000000010000000010000
dqinv630 invert 0111111111111011111011111111110111 -> 1000000000000100000100000000001000
dqinv631 invert 0111111111111101110111111111111011 -> 1000000000000010001000000000000100
dqinv632 invert 0111111111111110101111111111111101 -> 1000000000000001010000000000000010
dqinv633 invert 0111111111111111011111111111111110 -> 1000000000000000100000000000000001
dqinv021 invert 111111111 -> 1111111111111111111111111000000000
dqinv022 invert 111111111111 -> 1111111111111111111111000000000000
dqinv023 invert 11111111 -> 1111111111111111111111111100000000
dqinv025 invert 1111111 -> 1111111111111111111111111110000000
dqinv026 invert 111111 -> 1111111111111111111111111111000000
dqinv027 invert 11111 -> 1111111111111111111111111111100000
dqinv028 invert 1111 -> 1111111111111111111111111111110000
dqinv029 invert 111 -> 1111111111111111111111111111111000
dqinv031 invert 11 -> 1111111111111111111111111111111100
dqinv032 invert 1 -> 1111111111111111111111111111111110
dqinv033 invert 111111111111 -> 1111111111111111111111000000000000
dqinv034 invert 11111111111 -> 1111111111111111111111100000000000
dqinv035 invert 1111111111 -> 1111111111111111111111110000000000
dqinv036 invert 111111111 -> 1111111111111111111111111000000000
dqinv040 invert 011111111 -> 1111111111111111111111111100000000
dqinv041 invert 101111111 -> 1111111111111111111111111010000000
dqinv042 invert 110111111 -> 1111111111111111111111111001000000
dqinv043 invert 111011111 -> 1111111111111111111111111000100000
dqinv044 invert 111101111 -> 1111111111111111111111111000010000
dqinv045 invert 111110111 -> 1111111111111111111111111000001000
dqinv046 invert 111111011 -> 1111111111111111111111111000000100
dqinv047 invert 111111101 -> 1111111111111111111111111000000010
dqinv048 invert 111111110 -> 1111111111111111111111111000000001
dqinv049 invert 011111011 -> 1111111111111111111111111100000100
dqinv050 invert 101111101 -> 1111111111111111111111111010000010
dqinv051 invert 110111110 -> 1111111111111111111111111001000001
dqinv052 invert 111011101 -> 1111111111111111111111111000100010
dqinv053 invert 111101011 -> 1111111111111111111111111000010100
dqinv054 invert 111110111 -> 1111111111111111111111111000001000
dqinv055 invert 111101011 -> 1111111111111111111111111000010100
dqinv056 invert 111011101 -> 1111111111111111111111111000100010
dqinv057 invert 110111110 -> 1111111111111111111111111001000001
dqinv058 invert 101111101 -> 1111111111111111111111111010000010
dqinv059 invert 011111011 -> 1111111111111111111111111100000100
dqinv080 invert 1000000011111111 -> 1111111111111111110111111100000000
dqinv081 invert 0100000101111111 -> 1111111111111111111011111010000000
dqinv082 invert 0010000110111111 -> 1111111111111111111101111001000000
dqinv083 invert 0001000111011111 -> 1111111111111111111110111000100000
dqinv084 invert 0000100111101111 -> 1111111111111111111111011000010000
dqinv085 invert 0000010111110111 -> 1111111111111111111111101000001000
dqinv086 invert 0000001111111011 -> 1111111111111111111111110000000100
dqinv087 invert 0000010111111101 -> 1111111111111111111111101000000010
dqinv088 invert 0000100111111110 -> 1111111111111111111111011000000001
dqinv089 invert 0001000011111011 -> 1111111111111111111110111100000100
dqinv090 invert 0010000101111101 -> 1111111111111111111101111010000010
dqinv091 invert 0100000110111110 -> 1111111111111111111011111001000001
dqinv092 invert 1000000111011101 -> 1111111111111111110111111000100010
dqinv093 invert 0100000111101011 -> 1111111111111111111011111000010100
dqinv094 invert 0010000111110111 -> 1111111111111111111101111000001000
dqinv095 invert 0001000111101011 -> 1111111111111111111110111000010100
dqinv096 invert 0000100111011101 -> 1111111111111111111111011000100010
dqinv097 invert 0000010110111110 -> 1111111111111111111111101001000001
dqinv098 invert 0000001101111101 -> 1111111111111111111111110010000010
dqinv099 invert 0000010011111011 -> 1111111111111111111111101100000100
-- and more thorough MSD/LSD tests [8 and 9 mght be encoded differently...]
dqinv151 invert 1111111111111111111111111111111110 -> 1
dqinv152 invert 1111111111111111110000000000000000 -> 1111111111111111
dqinv153 invert 1000000000000000001111111111111111 -> 111111111111111110000000000000000
dqinv154 invert 1111111111111111111000000000000000 -> 111111111111111
dqinv155 invert 0100000000000000000111111111111111 -> 1011111111111111111000000000000000
dqinv156 invert 1011111111111111110100000000000000 -> 100000000000000001011111111111111
dqinv157 invert 1101111111111111110111111111111111 -> 10000000000000001000000000000000
dqinv158 invert 1110111111111111110011111111111111 -> 1000000000000001100000000000000
-- non-0/1 should not be accepted, nor should signs
dqinv220 invert 111111112 -> NaN Invalid_operation
dqinv221 invert 333333333 -> NaN Invalid_operation
dqinv222 invert 555555555 -> NaN Invalid_operation
dqinv223 invert 777777777 -> NaN Invalid_operation
dqinv224 invert 999999999 -> NaN Invalid_operation
dqinv225 invert 222222222 -> NaN Invalid_operation
dqinv226 invert 444444444 -> NaN Invalid_operation
dqinv227 invert 666666666 -> NaN Invalid_operation
dqinv228 invert 888888888 -> NaN Invalid_operation
dqinv229 invert 999999999 -> NaN Invalid_operation
dqinv230 invert 999999999 -> NaN Invalid_operation
dqinv231 invert 999999999 -> NaN Invalid_operation
dqinv232 invert 999999999 -> NaN Invalid_operation
-- a few randoms
dqinv240 invert 567468689 -> NaN Invalid_operation
dqinv241 invert 567367689 -> NaN Invalid_operation
dqinv242 invert -631917772 -> NaN Invalid_operation
dqinv243 invert -756253257 -> NaN Invalid_operation
dqinv244 invert 835590149 -> NaN Invalid_operation
-- test MSD
dqinv250 invert 2000000111000111000111000000000000 -> NaN Invalid_operation
dqinv251 invert 3000000111000111000111000000000000 -> NaN Invalid_operation
dqinv252 invert 4000000111000111000111000000000000 -> NaN Invalid_operation
dqinv253 invert 5000000111000111000111000000000000 -> NaN Invalid_operation
dqinv254 invert 6000000111000111000111000000000000 -> NaN Invalid_operation
dqinv255 invert 7000000111000111000111000000000000 -> NaN Invalid_operation
dqinv256 invert 8000000111000111000111000000000000 -> NaN Invalid_operation
dqinv257 invert 9000000111000111000111000000000000 -> NaN Invalid_operation
-- test MSD-1
dqinv270 invert 0200000111000111000111001000000000 -> NaN Invalid_operation
dqinv271 invert 0300000111000111000111000100000000 -> NaN Invalid_operation
dqinv272 invert 0400000111000111000111000010000000 -> NaN Invalid_operation
dqinv273 invert 0500000111000111000111000001000000 -> NaN Invalid_operation
dqinv274 invert 1600000111000111000111000000100000 -> NaN Invalid_operation
dqinv275 invert 1700000111000111000111000000010000 -> NaN Invalid_operation
dqinv276 invert 1800000111000111000111000000001000 -> NaN Invalid_operation
dqinv277 invert 1900000111000111000111000000000100 -> NaN Invalid_operation
-- test LSD
dqinv280 invert 0010000111000111000111000000000002 -> NaN Invalid_operation
dqinv281 invert 0001000111000111000111000000000003 -> NaN Invalid_operation
dqinv282 invert 0000000111000111000111100000000004 -> NaN Invalid_operation
dqinv283 invert 0000000111000111000111010000000005 -> NaN Invalid_operation
dqinv284 invert 1000000111000111000111001000000006 -> NaN Invalid_operation
dqinv285 invert 1000000111000111000111000100000007 -> NaN Invalid_operation
dqinv286 invert 1000000111000111000111000010000008 -> NaN Invalid_operation
dqinv287 invert 1000000111000111000111000001000009 -> NaN Invalid_operation
-- test Middie
dqinv288 invert 0010000111000111000111000020000000 -> NaN Invalid_operation
dqinv289 invert 0001000111000111000111000030000001 -> NaN Invalid_operation
dqinv290 invert 0000000111000111000111100040000010 -> NaN Invalid_operation
dqinv291 invert 0000000111000111000111010050000100 -> NaN Invalid_operation
dqinv292 invert 1000000111000111000111001060001000 -> NaN Invalid_operation
dqinv293 invert 1000000111000111000111000170010000 -> NaN Invalid_operation
dqinv294 invert 1000000111000111000111000080100000 -> NaN Invalid_operation
dqinv295 invert 1000000111000111000111000091000000 -> NaN Invalid_operation
-- signs
dqinv296 invert -1000000111000111000111000001000000 -> NaN Invalid_operation
dqinv299 invert 1000000111000111000111000001000000 -> 111111000111000111000111110111111
-- Nmax, Nmin, Ntiny-like
dqinv341 invert 9.99999999E+2998 -> NaN Invalid_operation
dqinv342 invert 1E-2998 -> NaN Invalid_operation
dqinv343 invert 1.00000000E-2998 -> NaN Invalid_operation
dqinv344 invert 1E-2078 -> NaN Invalid_operation
dqinv345 invert -1E-2078 -> NaN Invalid_operation
dqinv346 invert -1.00000000E-2998 -> NaN Invalid_operation
dqinv347 invert -1E-2998 -> NaN Invalid_operation
dqinv348 invert -9.99999999E+2998 -> NaN Invalid_operation
-- A few other non-integers
dqinv361 invert 1.0 -> NaN Invalid_operation
dqinv362 invert 1E+1 -> NaN Invalid_operation
dqinv363 invert 0.0 -> NaN Invalid_operation
dqinv364 invert 0E+1 -> NaN Invalid_operation
dqinv365 invert 9.9 -> NaN Invalid_operation
dqinv366 invert 9E+1 -> NaN Invalid_operation
-- All Specials are in error
dqinv788 invert -Inf -> NaN Invalid_operation
dqinv794 invert Inf -> NaN Invalid_operation
dqinv821 invert NaN -> NaN Invalid_operation
dqinv841 invert sNaN -> NaN Invalid_operation
-- propagating NaNs
dqinv861 invert NaN1 -> NaN Invalid_operation
dqinv862 invert +NaN2 -> NaN Invalid_operation
dqinv863 invert NaN3 -> NaN Invalid_operation
dqinv864 invert NaN4 -> NaN Invalid_operation
dqinv865 invert NaN5 -> NaN Invalid_operation
dqinv871 invert sNaN11 -> NaN Invalid_operation
dqinv872 invert sNaN12 -> NaN Invalid_operation
dqinv873 invert sNaN13 -> NaN Invalid_operation
dqinv874 invert sNaN14 -> NaN Invalid_operation
dqinv875 invert sNaN15 -> NaN Invalid_operation
dqinv876 invert NaN16 -> NaN Invalid_operation
dqinv881 invert +NaN25 -> NaN Invalid_operation
dqinv882 invert -NaN26 -> NaN Invalid_operation
dqinv883 invert -sNaN27 -> NaN Invalid_operation
------------------------------------------------------------------------
-- dqInvert.decTest -- digitwise logical INVERT for decQuads --
-- 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
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check (truth table)
dqinv001 invert 0 -> 1111111111111111111111111111111111
dqinv002 invert 1 -> 1111111111111111111111111111111110
dqinv003 invert 10 -> 1111111111111111111111111111111101
dqinv004 invert 111111111 -> 1111111111111111111111111000000000
dqinv005 invert 000000000 -> 1111111111111111111111111111111111
-- and at msd and msd-1
dqinv007 invert 0000000000000000000000000000000000 -> 1111111111111111111111111111111111
dqinv008 invert 1000000000000000000000000000000000 -> 111111111111111111111111111111111
dqinv009 invert 0000000000000000000000000000000000 -> 1111111111111111111111111111111111
dqinv010 invert 0100000000000000000000000000000000 -> 1011111111111111111111111111111111
dqinv011 invert 0111111111111111111111111111111111 -> 1000000000000000000000000000000000
dqinv012 invert 1111111111111111111111111111111111 -> 0
dqinv013 invert 0011111111111111111111111111111111 -> 1100000000000000000000000000000000
dqinv014 invert 0111111111111111111111111111111111 -> 1000000000000000000000000000000000
-- Various lengths
dqinv600 invert 0111111111111111111011111111111111 -> 1000000000000000000100000000000000
dqinv601 invert 0011111111111111110101111111111111 -> 1100000000000000001010000000000000
dqinv602 invert 0101111111111111101110111111111111 -> 1010000000000000010001000000000000
dqinv603 invert 0110111111111111011111011111111111 -> 1001000000000000100000100000000000
dqinv604 invert 0111011111111110111111101111111111 -> 1000100000000001000000010000000000
dqinv605 invert 0111101111111101111111110111111111 -> 1000010000000010000000001000000000
dqinv606 invert 0111110111111011111111111011111111 -> 1000001000000100000000000100000000
dqinv607 invert 0111111011110111111111111101111111 -> 1000000100001000000000000010000000
dqinv608 invert 0111111101101111111111111110111111 -> 1000000010010000000000000001000000
dqinv609 invert 0111111110011111111111111111011111 -> 1000000001100000000000000000100000
dqinv610 invert 0111111110011111111111111111101111 -> 1000000001100000000000000000010000
dqinv611 invert 0111111101101111111111111111110111 -> 1000000010010000000000000000001000
dqinv612 invert 0111111011110111111111111111111011 -> 1000000100001000000000000000000100
dqinv613 invert 0111110111111011111111111111111101 -> 1000001000000100000000000000000010
dqinv614 invert 0111101111111101111111111111111110 -> 1000010000000010000000000000000001
dqinv615 invert 0111011111111110111111111111111111 -> 1000100000000001000000000000000000
dqinv616 invert 0110111111111111011111111111111110 -> 1001000000000000100000000000000001
dqinv617 invert 0101111111111111101111111111111101 -> 1010000000000000010000000000000010
dqinv618 invert 0011111111111111110111111111111011 -> 1100000000000000001000000000000100
dqinv619 invert 0101111111111111111011111111110111 -> 1010000000000000000100000000001000
dqinv620 invert 0110111111111111111101111111101111 -> 1001000000000000000010000000010000
dqinv621 invert 0111011111111111111110111111011111 -> 1000100000000000000001000000100000
dqinv622 invert 0111101111111111111111011110111111 -> 1000010000000000000000100001000000
dqinv623 invert 0111110111111111111111101101111111 -> 1000001000000000000000010010000000
dqinv624 invert 0111111011111111111111110011111111 -> 1000000100000000000000001100000000
dqinv625 invert 0111111101111111111111110011111111 -> 1000000010000000000000001100000000
dqinv626 invert 0111111110111111111111101101111111 -> 1000000001000000000000010010000000
dqinv627 invert 0111111111011111111111011110111111 -> 1000000000100000000000100001000000
dqinv628 invert 0111111111101111111110111111011111 -> 1000000000010000000001000000100000
dqinv629 invert 0111111111110111111101111111101111 -> 1000000000001000000010000000010000
dqinv630 invert 0111111111111011111011111111110111 -> 1000000000000100000100000000001000
dqinv631 invert 0111111111111101110111111111111011 -> 1000000000000010001000000000000100
dqinv632 invert 0111111111111110101111111111111101 -> 1000000000000001010000000000000010
dqinv633 invert 0111111111111111011111111111111110 -> 1000000000000000100000000000000001
dqinv021 invert 111111111 -> 1111111111111111111111111000000000
dqinv022 invert 111111111111 -> 1111111111111111111111000000000000
dqinv023 invert 11111111 -> 1111111111111111111111111100000000
dqinv025 invert 1111111 -> 1111111111111111111111111110000000
dqinv026 invert 111111 -> 1111111111111111111111111111000000
dqinv027 invert 11111 -> 1111111111111111111111111111100000
dqinv028 invert 1111 -> 1111111111111111111111111111110000
dqinv029 invert 111 -> 1111111111111111111111111111111000
dqinv031 invert 11 -> 1111111111111111111111111111111100
dqinv032 invert 1 -> 1111111111111111111111111111111110
dqinv033 invert 111111111111 -> 1111111111111111111111000000000000
dqinv034 invert 11111111111 -> 1111111111111111111111100000000000
dqinv035 invert 1111111111 -> 1111111111111111111111110000000000
dqinv036 invert 111111111 -> 1111111111111111111111111000000000
dqinv040 invert 011111111 -> 1111111111111111111111111100000000
dqinv041 invert 101111111 -> 1111111111111111111111111010000000
dqinv042 invert 110111111 -> 1111111111111111111111111001000000
dqinv043 invert 111011111 -> 1111111111111111111111111000100000
dqinv044 invert 111101111 -> 1111111111111111111111111000010000
dqinv045 invert 111110111 -> 1111111111111111111111111000001000
dqinv046 invert 111111011 -> 1111111111111111111111111000000100
dqinv047 invert 111111101 -> 1111111111111111111111111000000010
dqinv048 invert 111111110 -> 1111111111111111111111111000000001
dqinv049 invert 011111011 -> 1111111111111111111111111100000100
dqinv050 invert 101111101 -> 1111111111111111111111111010000010
dqinv051 invert 110111110 -> 1111111111111111111111111001000001
dqinv052 invert 111011101 -> 1111111111111111111111111000100010
dqinv053 invert 111101011 -> 1111111111111111111111111000010100
dqinv054 invert 111110111 -> 1111111111111111111111111000001000
dqinv055 invert 111101011 -> 1111111111111111111111111000010100
dqinv056 invert 111011101 -> 1111111111111111111111111000100010
dqinv057 invert 110111110 -> 1111111111111111111111111001000001
dqinv058 invert 101111101 -> 1111111111111111111111111010000010
dqinv059 invert 011111011 -> 1111111111111111111111111100000100
dqinv080 invert 1000000011111111 -> 1111111111111111110111111100000000
dqinv081 invert 0100000101111111 -> 1111111111111111111011111010000000
dqinv082 invert 0010000110111111 -> 1111111111111111111101111001000000
dqinv083 invert 0001000111011111 -> 1111111111111111111110111000100000
dqinv084 invert 0000100111101111 -> 1111111111111111111111011000010000
dqinv085 invert 0000010111110111 -> 1111111111111111111111101000001000
dqinv086 invert 0000001111111011 -> 1111111111111111111111110000000100
dqinv087 invert 0000010111111101 -> 1111111111111111111111101000000010
dqinv088 invert 0000100111111110 -> 1111111111111111111111011000000001
dqinv089 invert 0001000011111011 -> 1111111111111111111110111100000100
dqinv090 invert 0010000101111101 -> 1111111111111111111101111010000010
dqinv091 invert 0100000110111110 -> 1111111111111111111011111001000001
dqinv092 invert 1000000111011101 -> 1111111111111111110111111000100010
dqinv093 invert 0100000111101011 -> 1111111111111111111011111000010100
dqinv094 invert 0010000111110111 -> 1111111111111111111101111000001000
dqinv095 invert 0001000111101011 -> 1111111111111111111110111000010100
dqinv096 invert 0000100111011101 -> 1111111111111111111111011000100010
dqinv097 invert 0000010110111110 -> 1111111111111111111111101001000001
dqinv098 invert 0000001101111101 -> 1111111111111111111111110010000010
dqinv099 invert 0000010011111011 -> 1111111111111111111111101100000100
-- and more thorough MSD/LSD tests [8 and 9 mght be encoded differently...]
dqinv151 invert 1111111111111111111111111111111110 -> 1
dqinv152 invert 1111111111111111110000000000000000 -> 1111111111111111
dqinv153 invert 1000000000000000001111111111111111 -> 111111111111111110000000000000000
dqinv154 invert 1111111111111111111000000000000000 -> 111111111111111
dqinv155 invert 0100000000000000000111111111111111 -> 1011111111111111111000000000000000
dqinv156 invert 1011111111111111110100000000000000 -> 100000000000000001011111111111111
dqinv157 invert 1101111111111111110111111111111111 -> 10000000000000001000000000000000
dqinv158 invert 1110111111111111110011111111111111 -> 1000000000000001100000000000000
-- non-0/1 should not be accepted, nor should signs
dqinv220 invert 111111112 -> NaN Invalid_operation
dqinv221 invert 333333333 -> NaN Invalid_operation
dqinv222 invert 555555555 -> NaN Invalid_operation
dqinv223 invert 777777777 -> NaN Invalid_operation
dqinv224 invert 999999999 -> NaN Invalid_operation
dqinv225 invert 222222222 -> NaN Invalid_operation
dqinv226 invert 444444444 -> NaN Invalid_operation
dqinv227 invert 666666666 -> NaN Invalid_operation
dqinv228 invert 888888888 -> NaN Invalid_operation
dqinv229 invert 999999999 -> NaN Invalid_operation
dqinv230 invert 999999999 -> NaN Invalid_operation
dqinv231 invert 999999999 -> NaN Invalid_operation
dqinv232 invert 999999999 -> NaN Invalid_operation
-- a few randoms
dqinv240 invert 567468689 -> NaN Invalid_operation
dqinv241 invert 567367689 -> NaN Invalid_operation
dqinv242 invert -631917772 -> NaN Invalid_operation
dqinv243 invert -756253257 -> NaN Invalid_operation
dqinv244 invert 835590149 -> NaN Invalid_operation
-- test MSD
dqinv250 invert 2000000111000111000111000000000000 -> NaN Invalid_operation
dqinv251 invert 3000000111000111000111000000000000 -> NaN Invalid_operation
dqinv252 invert 4000000111000111000111000000000000 -> NaN Invalid_operation
dqinv253 invert 5000000111000111000111000000000000 -> NaN Invalid_operation
dqinv254 invert 6000000111000111000111000000000000 -> NaN Invalid_operation
dqinv255 invert 7000000111000111000111000000000000 -> NaN Invalid_operation
dqinv256 invert 8000000111000111000111000000000000 -> NaN Invalid_operation
dqinv257 invert 9000000111000111000111000000000000 -> NaN Invalid_operation
-- test MSD-1
dqinv270 invert 0200000111000111000111001000000000 -> NaN Invalid_operation
dqinv271 invert 0300000111000111000111000100000000 -> NaN Invalid_operation
dqinv272 invert 0400000111000111000111000010000000 -> NaN Invalid_operation
dqinv273 invert 0500000111000111000111000001000000 -> NaN Invalid_operation
dqinv274 invert 1600000111000111000111000000100000 -> NaN Invalid_operation
dqinv275 invert 1700000111000111000111000000010000 -> NaN Invalid_operation
dqinv276 invert 1800000111000111000111000000001000 -> NaN Invalid_operation
dqinv277 invert 1900000111000111000111000000000100 -> NaN Invalid_operation
-- test LSD
dqinv280 invert 0010000111000111000111000000000002 -> NaN Invalid_operation
dqinv281 invert 0001000111000111000111000000000003 -> NaN Invalid_operation
dqinv282 invert 0000000111000111000111100000000004 -> NaN Invalid_operation
dqinv283 invert 0000000111000111000111010000000005 -> NaN Invalid_operation
dqinv284 invert 1000000111000111000111001000000006 -> NaN Invalid_operation
dqinv285 invert 1000000111000111000111000100000007 -> NaN Invalid_operation
dqinv286 invert 1000000111000111000111000010000008 -> NaN Invalid_operation
dqinv287 invert 1000000111000111000111000001000009 -> NaN Invalid_operation
-- test Middie
dqinv288 invert 0010000111000111000111000020000000 -> NaN Invalid_operation
dqinv289 invert 0001000111000111000111000030000001 -> NaN Invalid_operation
dqinv290 invert 0000000111000111000111100040000010 -> NaN Invalid_operation
dqinv291 invert 0000000111000111000111010050000100 -> NaN Invalid_operation
dqinv292 invert 1000000111000111000111001060001000 -> NaN Invalid_operation
dqinv293 invert 1000000111000111000111000170010000 -> NaN Invalid_operation
dqinv294 invert 1000000111000111000111000080100000 -> NaN Invalid_operation
dqinv295 invert 1000000111000111000111000091000000 -> NaN Invalid_operation
-- signs
dqinv296 invert -1000000111000111000111000001000000 -> NaN Invalid_operation
dqinv299 invert 1000000111000111000111000001000000 -> 111111000111000111000111110111111
-- Nmax, Nmin, Ntiny-like
dqinv341 invert 9.99999999E+2998 -> NaN Invalid_operation
dqinv342 invert 1E-2998 -> NaN Invalid_operation
dqinv343 invert 1.00000000E-2998 -> NaN Invalid_operation
dqinv344 invert 1E-2078 -> NaN Invalid_operation
dqinv345 invert -1E-2078 -> NaN Invalid_operation
dqinv346 invert -1.00000000E-2998 -> NaN Invalid_operation
dqinv347 invert -1E-2998 -> NaN Invalid_operation
dqinv348 invert -9.99999999E+2998 -> NaN Invalid_operation
-- A few other non-integers
dqinv361 invert 1.0 -> NaN Invalid_operation
dqinv362 invert 1E+1 -> NaN Invalid_operation
dqinv363 invert 0.0 -> NaN Invalid_operation
dqinv364 invert 0E+1 -> NaN Invalid_operation
dqinv365 invert 9.9 -> NaN Invalid_operation
dqinv366 invert 9E+1 -> NaN Invalid_operation
-- All Specials are in error
dqinv788 invert -Inf -> NaN Invalid_operation
dqinv794 invert Inf -> NaN Invalid_operation
dqinv821 invert NaN -> NaN Invalid_operation
dqinv841 invert sNaN -> NaN Invalid_operation
-- propagating NaNs
dqinv861 invert NaN1 -> NaN Invalid_operation
dqinv862 invert +NaN2 -> NaN Invalid_operation
dqinv863 invert NaN3 -> NaN Invalid_operation
dqinv864 invert NaN4 -> NaN Invalid_operation
dqinv865 invert NaN5 -> NaN Invalid_operation
dqinv871 invert sNaN11 -> NaN Invalid_operation
dqinv872 invert sNaN12 -> NaN Invalid_operation
dqinv873 invert sNaN13 -> NaN Invalid_operation
dqinv874 invert sNaN14 -> NaN Invalid_operation
dqinv875 invert sNaN15 -> NaN Invalid_operation
dqinv876 invert NaN16 -> NaN Invalid_operation
dqinv881 invert +NaN25 -> NaN Invalid_operation
dqinv882 invert -NaN26 -> NaN Invalid_operation
dqinv883 invert -sNaN27 -> NaN Invalid_operation

View file

@ -1,160 +1,160 @@
------------------------------------------------------------------------
-- dqLogB.decTest -- integral 754r adjusted exponent, for decQuads --
-- 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
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- basics
dqlogb000 logb 0 -> -Infinity Division_by_zero
dqlogb001 logb 1E-6176 -> -6176
dqlogb002 logb 1E-6143 -> -6143
dqlogb003 logb 0.001 -> -3
dqlogb004 logb 0.03 -> -2
dqlogb005 logb 1 -> 0
dqlogb006 logb 2 -> 0
dqlogb007 logb 2.5 -> 0
dqlogb008 logb 2.50 -> 0
dqlogb009 logb 2.500 -> 0
dqlogb010 logb 10 -> 1
dqlogb011 logb 70 -> 1
dqlogb012 logb 100 -> 2
dqlogb013 logb 250 -> 2
dqlogb014 logb 9E+6144 -> 6144
dqlogb015 logb +Infinity -> Infinity
-- negatives appear to be treated as positives
dqlogb021 logb -0 -> -Infinity Division_by_zero
dqlogb022 logb -1E-6176 -> -6176
dqlogb023 logb -9E-6143 -> -6143
dqlogb024 logb -0.001 -> -3
dqlogb025 logb -1 -> 0
dqlogb026 logb -2 -> 0
dqlogb027 logb -10 -> 1
dqlogb028 logb -70 -> 1
dqlogb029 logb -100 -> 2
dqlogb030 logb -9E+6144 -> 6144
dqlogb031 logb -Infinity -> Infinity
-- zeros
dqlogb111 logb 0 -> -Infinity Division_by_zero
dqlogb112 logb -0 -> -Infinity Division_by_zero
dqlogb113 logb 0E+4 -> -Infinity Division_by_zero
dqlogb114 logb -0E+4 -> -Infinity Division_by_zero
dqlogb115 logb 0.0000 -> -Infinity Division_by_zero
dqlogb116 logb -0.0000 -> -Infinity Division_by_zero
dqlogb117 logb 0E-141 -> -Infinity Division_by_zero
dqlogb118 logb -0E-141 -> -Infinity Division_by_zero
-- full coefficients, alternating bits
dqlogb121 logb 268268268 -> 8
dqlogb122 logb -268268268 -> 8
dqlogb123 logb 134134134 -> 8
dqlogb124 logb -134134134 -> 8
-- Nmax, Nmin, Ntiny
dqlogb131 logb 9.999999999999999999999999999999999E+6144 -> 6144
dqlogb132 logb 1E-6143 -> -6143
dqlogb133 logb 1.000000000000000000000000000000000E-6143 -> -6143
dqlogb134 logb 1E-6176 -> -6176
dqlogb135 logb -1E-6176 -> -6176
dqlogb136 logb -1.000000000000000000000000000000000E-6143 -> -6143
dqlogb137 logb -1E-6143 -> -6143
dqlogb1614 logb -9.999999999999999999999999999999999E+6144 -> 6144
-- ones
dqlogb0061 logb 1 -> 0
dqlogb0062 logb 1.0 -> 0
dqlogb0063 logb 1.000000000000000 -> 0
-- notable cases -- exact powers of 10
dqlogb1100 logb 1 -> 0
dqlogb1101 logb 10 -> 1
dqlogb1102 logb 100 -> 2
dqlogb1103 logb 1000 -> 3
dqlogb1104 logb 10000 -> 4
dqlogb1105 logb 100000 -> 5
dqlogb1106 logb 1000000 -> 6
dqlogb1107 logb 10000000 -> 7
dqlogb1108 logb 100000000 -> 8
dqlogb1109 logb 1000000000 -> 9
dqlogb1110 logb 10000000000 -> 10
dqlogb1111 logb 100000000000 -> 11
dqlogb1112 logb 1000000000000 -> 12
dqlogb1113 logb 0.00000000001 -> -11
dqlogb1114 logb 0.0000000001 -> -10
dqlogb1115 logb 0.000000001 -> -9
dqlogb1116 logb 0.00000001 -> -8
dqlogb1117 logb 0.0000001 -> -7
dqlogb1118 logb 0.000001 -> -6
dqlogb1119 logb 0.00001 -> -5
dqlogb1120 logb 0.0001 -> -4
dqlogb1121 logb 0.001 -> -3
dqlogb1122 logb 0.01 -> -2
dqlogb1123 logb 0.1 -> -1
dqlogb1124 logb 1E-99 -> -99
dqlogb1125 logb 1E-100 -> -100
dqlogb1127 logb 1E-299 -> -299
dqlogb1126 logb 1E-6143 -> -6143
-- suggestions from Ilan Nehama
dqlogb1400 logb 10E-3 -> -2
dqlogb1401 logb 10E-2 -> -1
dqlogb1402 logb 100E-2 -> 0
dqlogb1403 logb 1000E-2 -> 1
dqlogb1404 logb 10000E-2 -> 2
dqlogb1405 logb 10E-1 -> 0
dqlogb1406 logb 100E-1 -> 1
dqlogb1407 logb 1000E-1 -> 2
dqlogb1408 logb 10000E-1 -> 3
dqlogb1409 logb 10E0 -> 1
dqlogb1410 logb 100E0 -> 2
dqlogb1411 logb 1000E0 -> 3
dqlogb1412 logb 10000E0 -> 4
dqlogb1413 logb 10E1 -> 2
dqlogb1414 logb 100E1 -> 3
dqlogb1415 logb 1000E1 -> 4
dqlogb1416 logb 10000E1 -> 5
dqlogb1417 logb 10E2 -> 3
dqlogb1418 logb 100E2 -> 4
dqlogb1419 logb 1000E2 -> 5
dqlogb1420 logb 10000E2 -> 6
-- special values
dqlogb820 logb Infinity -> Infinity
dqlogb821 logb 0 -> -Infinity Division_by_zero
dqlogb822 logb NaN -> NaN
dqlogb823 logb sNaN -> NaN Invalid_operation
-- propagating NaNs
dqlogb824 logb sNaN123 -> NaN123 Invalid_operation
dqlogb825 logb -sNaN321 -> -NaN321 Invalid_operation
dqlogb826 logb NaN456 -> NaN456
dqlogb827 logb -NaN654 -> -NaN654
dqlogb828 logb NaN1 -> NaN1
-- Null test
dqlogb900 logb # -> NaN Invalid_operation
------------------------------------------------------------------------
-- dqLogB.decTest -- integral 754r adjusted exponent, for decQuads --
-- 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
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- basics
dqlogb000 logb 0 -> -Infinity Division_by_zero
dqlogb001 logb 1E-6176 -> -6176
dqlogb002 logb 1E-6143 -> -6143
dqlogb003 logb 0.001 -> -3
dqlogb004 logb 0.03 -> -2
dqlogb005 logb 1 -> 0
dqlogb006 logb 2 -> 0
dqlogb007 logb 2.5 -> 0
dqlogb008 logb 2.50 -> 0
dqlogb009 logb 2.500 -> 0
dqlogb010 logb 10 -> 1
dqlogb011 logb 70 -> 1
dqlogb012 logb 100 -> 2
dqlogb013 logb 250 -> 2
dqlogb014 logb 9E+6144 -> 6144
dqlogb015 logb +Infinity -> Infinity
-- negatives appear to be treated as positives
dqlogb021 logb -0 -> -Infinity Division_by_zero
dqlogb022 logb -1E-6176 -> -6176
dqlogb023 logb -9E-6143 -> -6143
dqlogb024 logb -0.001 -> -3
dqlogb025 logb -1 -> 0
dqlogb026 logb -2 -> 0
dqlogb027 logb -10 -> 1
dqlogb028 logb -70 -> 1
dqlogb029 logb -100 -> 2
dqlogb030 logb -9E+6144 -> 6144
dqlogb031 logb -Infinity -> Infinity
-- zeros
dqlogb111 logb 0 -> -Infinity Division_by_zero
dqlogb112 logb -0 -> -Infinity Division_by_zero
dqlogb113 logb 0E+4 -> -Infinity Division_by_zero
dqlogb114 logb -0E+4 -> -Infinity Division_by_zero
dqlogb115 logb 0.0000 -> -Infinity Division_by_zero
dqlogb116 logb -0.0000 -> -Infinity Division_by_zero
dqlogb117 logb 0E-141 -> -Infinity Division_by_zero
dqlogb118 logb -0E-141 -> -Infinity Division_by_zero
-- full coefficients, alternating bits
dqlogb121 logb 268268268 -> 8
dqlogb122 logb -268268268 -> 8
dqlogb123 logb 134134134 -> 8
dqlogb124 logb -134134134 -> 8
-- Nmax, Nmin, Ntiny
dqlogb131 logb 9.999999999999999999999999999999999E+6144 -> 6144
dqlogb132 logb 1E-6143 -> -6143
dqlogb133 logb 1.000000000000000000000000000000000E-6143 -> -6143
dqlogb134 logb 1E-6176 -> -6176
dqlogb135 logb -1E-6176 -> -6176
dqlogb136 logb -1.000000000000000000000000000000000E-6143 -> -6143
dqlogb137 logb -1E-6143 -> -6143
dqlogb1614 logb -9.999999999999999999999999999999999E+6144 -> 6144
-- ones
dqlogb0061 logb 1 -> 0
dqlogb0062 logb 1.0 -> 0
dqlogb0063 logb 1.000000000000000 -> 0
-- notable cases -- exact powers of 10
dqlogb1100 logb 1 -> 0
dqlogb1101 logb 10 -> 1
dqlogb1102 logb 100 -> 2
dqlogb1103 logb 1000 -> 3
dqlogb1104 logb 10000 -> 4
dqlogb1105 logb 100000 -> 5
dqlogb1106 logb 1000000 -> 6
dqlogb1107 logb 10000000 -> 7
dqlogb1108 logb 100000000 -> 8
dqlogb1109 logb 1000000000 -> 9
dqlogb1110 logb 10000000000 -> 10
dqlogb1111 logb 100000000000 -> 11
dqlogb1112 logb 1000000000000 -> 12
dqlogb1113 logb 0.00000000001 -> -11
dqlogb1114 logb 0.0000000001 -> -10
dqlogb1115 logb 0.000000001 -> -9
dqlogb1116 logb 0.00000001 -> -8
dqlogb1117 logb 0.0000001 -> -7
dqlogb1118 logb 0.000001 -> -6
dqlogb1119 logb 0.00001 -> -5
dqlogb1120 logb 0.0001 -> -4
dqlogb1121 logb 0.001 -> -3
dqlogb1122 logb 0.01 -> -2
dqlogb1123 logb 0.1 -> -1
dqlogb1124 logb 1E-99 -> -99
dqlogb1125 logb 1E-100 -> -100
dqlogb1127 logb 1E-299 -> -299
dqlogb1126 logb 1E-6143 -> -6143
-- suggestions from Ilan Nehama
dqlogb1400 logb 10E-3 -> -2
dqlogb1401 logb 10E-2 -> -1
dqlogb1402 logb 100E-2 -> 0
dqlogb1403 logb 1000E-2 -> 1
dqlogb1404 logb 10000E-2 -> 2
dqlogb1405 logb 10E-1 -> 0
dqlogb1406 logb 100E-1 -> 1
dqlogb1407 logb 1000E-1 -> 2
dqlogb1408 logb 10000E-1 -> 3
dqlogb1409 logb 10E0 -> 1
dqlogb1410 logb 100E0 -> 2
dqlogb1411 logb 1000E0 -> 3
dqlogb1412 logb 10000E0 -> 4
dqlogb1413 logb 10E1 -> 2
dqlogb1414 logb 100E1 -> 3
dqlogb1415 logb 1000E1 -> 4
dqlogb1416 logb 10000E1 -> 5
dqlogb1417 logb 10E2 -> 3
dqlogb1418 logb 100E2 -> 4
dqlogb1419 logb 1000E2 -> 5
dqlogb1420 logb 10000E2 -> 6
-- special values
dqlogb820 logb Infinity -> Infinity
dqlogb821 logb 0 -> -Infinity Division_by_zero
dqlogb822 logb NaN -> NaN
dqlogb823 logb sNaN -> NaN Invalid_operation
-- propagating NaNs
dqlogb824 logb sNaN123 -> NaN123 Invalid_operation
dqlogb825 logb -sNaN321 -> -NaN321 Invalid_operation
dqlogb826 logb NaN456 -> NaN456
dqlogb827 logb -NaN654 -> -NaN654
dqlogb828 logb NaN1 -> NaN1
-- Null test
dqlogb900 logb # -> NaN Invalid_operation

View file

@ -1,322 +1,322 @@
------------------------------------------------------------------------
-- dqMax.decTest -- decQuad 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
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- sanity checks
dqmax001 max -2 -2 -> -2
dqmax002 max -2 -1 -> -1
dqmax003 max -2 0 -> 0
dqmax004 max -2 1 -> 1
dqmax005 max -2 2 -> 2
dqmax006 max -1 -2 -> -1
dqmax007 max -1 -1 -> -1
dqmax008 max -1 0 -> 0
dqmax009 max -1 1 -> 1
dqmax010 max -1 2 -> 2
dqmax011 max 0 -2 -> 0
dqmax012 max 0 -1 -> 0
dqmax013 max 0 0 -> 0
dqmax014 max 0 1 -> 1
dqmax015 max 0 2 -> 2
dqmax016 max 1 -2 -> 1
dqmax017 max 1 -1 -> 1
dqmax018 max 1 0 -> 1
dqmax019 max 1 1 -> 1
dqmax020 max 1 2 -> 2
dqmax021 max 2 -2 -> 2
dqmax022 max 2 -1 -> 2
dqmax023 max 2 0 -> 2
dqmax025 max 2 1 -> 2
dqmax026 max 2 2 -> 2
-- extended zeros
dqmax030 max 0 0 -> 0
dqmax031 max 0 -0 -> 0
dqmax032 max 0 -0.0 -> 0
dqmax033 max 0 0.0 -> 0
dqmax034 max -0 0 -> 0 -- note: -0 = 0, but 0 chosen
dqmax035 max -0 -0 -> -0
dqmax036 max -0 -0.0 -> -0.0
dqmax037 max -0 0.0 -> 0.0
dqmax038 max 0.0 0 -> 0
dqmax039 max 0.0 -0 -> 0.0
dqmax040 max 0.0 -0.0 -> 0.0
dqmax041 max 0.0 0.0 -> 0.0
dqmax042 max -0.0 0 -> 0
dqmax043 max -0.0 -0 -> -0.0
dqmax044 max -0.0 -0.0 -> -0.0
dqmax045 max -0.0 0.0 -> 0.0
dqmax050 max -0E1 0E1 -> 0E+1
dqmax051 max -0E2 0E2 -> 0E+2
dqmax052 max -0E2 0E1 -> 0E+1
dqmax053 max -0E1 0E2 -> 0E+2
dqmax054 max 0E1 -0E1 -> 0E+1
dqmax055 max 0E2 -0E2 -> 0E+2
dqmax056 max 0E2 -0E1 -> 0E+2
dqmax057 max 0E1 -0E2 -> 0E+1
dqmax058 max 0E1 0E1 -> 0E+1
dqmax059 max 0E2 0E2 -> 0E+2
dqmax060 max 0E2 0E1 -> 0E+2
dqmax061 max 0E1 0E2 -> 0E+2
dqmax062 max -0E1 -0E1 -> -0E+1
dqmax063 max -0E2 -0E2 -> -0E+2
dqmax064 max -0E2 -0E1 -> -0E+1
dqmax065 max -0E1 -0E2 -> -0E+1
-- Specials
dqmax090 max Inf -Inf -> Infinity
dqmax091 max Inf -1000 -> Infinity
dqmax092 max Inf -1 -> Infinity
dqmax093 max Inf -0 -> Infinity
dqmax094 max Inf 0 -> Infinity
dqmax095 max Inf 1 -> Infinity
dqmax096 max Inf 1000 -> Infinity
dqmax097 max Inf Inf -> Infinity
dqmax098 max -1000 Inf -> Infinity
dqmax099 max -Inf Inf -> Infinity
dqmax100 max -1 Inf -> Infinity
dqmax101 max -0 Inf -> Infinity
dqmax102 max 0 Inf -> Infinity
dqmax103 max 1 Inf -> Infinity
dqmax104 max 1000 Inf -> Infinity
dqmax105 max Inf Inf -> Infinity
dqmax120 max -Inf -Inf -> -Infinity
dqmax121 max -Inf -1000 -> -1000
dqmax122 max -Inf -1 -> -1
dqmax123 max -Inf -0 -> -0
dqmax124 max -Inf 0 -> 0
dqmax125 max -Inf 1 -> 1
dqmax126 max -Inf 1000 -> 1000
dqmax127 max -Inf Inf -> Infinity
dqmax128 max -Inf -Inf -> -Infinity
dqmax129 max -1000 -Inf -> -1000
dqmax130 max -1 -Inf -> -1
dqmax131 max -0 -Inf -> -0
dqmax132 max 0 -Inf -> 0
dqmax133 max 1 -Inf -> 1
dqmax134 max 1000 -Inf -> 1000
dqmax135 max Inf -Inf -> Infinity
-- 2004.08.02 754r chooses number over NaN in mixed cases
dqmax141 max NaN -Inf -> -Infinity
dqmax142 max NaN -1000 -> -1000
dqmax143 max NaN -1 -> -1
dqmax144 max NaN -0 -> -0
dqmax145 max NaN 0 -> 0
dqmax146 max NaN 1 -> 1
dqmax147 max NaN 1000 -> 1000
dqmax148 max NaN Inf -> Infinity
dqmax149 max NaN NaN -> NaN
dqmax150 max -Inf NaN -> -Infinity
dqmax151 max -1000 NaN -> -1000
dqmax152 max -1 NaN -> -1
dqmax153 max -0 NaN -> -0
dqmax154 max 0 NaN -> 0
dqmax155 max 1 NaN -> 1
dqmax156 max 1000 NaN -> 1000
dqmax157 max Inf NaN -> Infinity
dqmax161 max sNaN -Inf -> NaN Invalid_operation
dqmax162 max sNaN -1000 -> NaN Invalid_operation
dqmax163 max sNaN -1 -> NaN Invalid_operation
dqmax164 max sNaN -0 -> NaN Invalid_operation
dqmax165 max sNaN 0 -> NaN Invalid_operation
dqmax166 max sNaN 1 -> NaN Invalid_operation
dqmax167 max sNaN 1000 -> NaN Invalid_operation
dqmax168 max sNaN NaN -> NaN Invalid_operation
dqmax169 max sNaN sNaN -> NaN Invalid_operation
dqmax170 max NaN sNaN -> NaN Invalid_operation
dqmax171 max -Inf sNaN -> NaN Invalid_operation
dqmax172 max -1000 sNaN -> NaN Invalid_operation
dqmax173 max -1 sNaN -> NaN Invalid_operation
dqmax174 max -0 sNaN -> NaN Invalid_operation
dqmax175 max 0 sNaN -> NaN Invalid_operation
dqmax176 max 1 sNaN -> NaN Invalid_operation
dqmax177 max 1000 sNaN -> NaN Invalid_operation
dqmax178 max Inf sNaN -> NaN Invalid_operation
dqmax179 max NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqmax181 max NaN9 -Inf -> -Infinity
dqmax182 max NaN8 9 -> 9
dqmax183 max -NaN7 Inf -> Infinity
dqmax184 max -NaN1 NaN11 -> -NaN1
dqmax185 max NaN2 NaN12 -> NaN2
dqmax186 max -NaN13 -NaN7 -> -NaN13
dqmax187 max NaN14 -NaN5 -> NaN14
dqmax188 max -Inf NaN4 -> -Infinity
dqmax189 max -9 -NaN3 -> -9
dqmax190 max Inf NaN2 -> Infinity
dqmax191 max sNaN99 -Inf -> NaN99 Invalid_operation
dqmax192 max sNaN98 -1 -> NaN98 Invalid_operation
dqmax193 max -sNaN97 NaN -> -NaN97 Invalid_operation
dqmax194 max sNaN96 sNaN94 -> NaN96 Invalid_operation
dqmax195 max NaN95 sNaN93 -> NaN93 Invalid_operation
dqmax196 max -Inf sNaN92 -> NaN92 Invalid_operation
dqmax197 max 0 sNaN91 -> NaN91 Invalid_operation
dqmax198 max Inf -sNaN90 -> -NaN90 Invalid_operation
dqmax199 max NaN sNaN89 -> NaN89 Invalid_operation
-- old rounding checks
dqmax221 max 12345678000 1 -> 12345678000
dqmax222 max 1 12345678000 -> 12345678000
dqmax223 max 1234567800 1 -> 1234567800
dqmax224 max 1 1234567800 -> 1234567800
dqmax225 max 1234567890 1 -> 1234567890
dqmax226 max 1 1234567890 -> 1234567890
dqmax227 max 1234567891 1 -> 1234567891
dqmax228 max 1 1234567891 -> 1234567891
dqmax229 max 12345678901 1 -> 12345678901
dqmax230 max 1 12345678901 -> 12345678901
dqmax231 max 1234567896 1 -> 1234567896
dqmax232 max 1 1234567896 -> 1234567896
dqmax233 max -1234567891 1 -> 1
dqmax234 max 1 -1234567891 -> 1
dqmax235 max -12345678901 1 -> 1
dqmax236 max 1 -12345678901 -> 1
dqmax237 max -1234567896 1 -> 1
dqmax238 max 1 -1234567896 -> 1
-- from examples
dqmax280 max '3' '2' -> '3'
dqmax281 max '-10' '3' -> '3'
dqmax282 max '1.0' '1' -> '1'
dqmax283 max '1' '1.0' -> '1'
dqmax284 max '7' 'NaN' -> '7'
-- expanded list from min/max 754r purple prose
-- [explicit tests for exponent ordering]
dqmax401 max Inf 1.1 -> Infinity
dqmax402 max 1.1 1 -> 1.1
dqmax403 max 1 1.0 -> 1
dqmax404 max 1.0 0.1 -> 1.0
dqmax405 max 0.1 0.10 -> 0.1
dqmax406 max 0.10 0.100 -> 0.10
dqmax407 max 0.10 0 -> 0.10
dqmax408 max 0 0.0 -> 0
dqmax409 max 0.0 -0 -> 0.0
dqmax410 max 0.0 -0.0 -> 0.0
dqmax411 max 0.00 -0.0 -> 0.00
dqmax412 max 0.0 -0.00 -> 0.0
dqmax413 max 0 -0.0 -> 0
dqmax414 max 0 -0 -> 0
dqmax415 max -0.0 -0 -> -0.0
dqmax416 max -0 -0.100 -> -0
dqmax417 max -0.100 -0.10 -> -0.100
dqmax418 max -0.10 -0.1 -> -0.10
dqmax419 max -0.1 -1.0 -> -0.1
dqmax420 max -1.0 -1 -> -1.0
dqmax421 max -1 -1.1 -> -1
dqmax423 max -1.1 -Inf -> -1.1
-- same with operands reversed
dqmax431 max 1.1 Inf -> Infinity
dqmax432 max 1 1.1 -> 1.1
dqmax433 max 1.0 1 -> 1
dqmax434 max 0.1 1.0 -> 1.0
dqmax435 max 0.10 0.1 -> 0.1
dqmax436 max 0.100 0.10 -> 0.10
dqmax437 max 0 0.10 -> 0.10
dqmax438 max 0.0 0 -> 0
dqmax439 max -0 0.0 -> 0.0
dqmax440 max -0.0 0.0 -> 0.0
dqmax441 max -0.0 0.00 -> 0.00
dqmax442 max -0.00 0.0 -> 0.0
dqmax443 max -0.0 0 -> 0
dqmax444 max -0 0 -> 0
dqmax445 max -0 -0.0 -> -0.0
dqmax446 max -0.100 -0 -> -0
dqmax447 max -0.10 -0.100 -> -0.100
dqmax448 max -0.1 -0.10 -> -0.10
dqmax449 max -1.0 -0.1 -> -0.1
dqmax450 max -1 -1.0 -> -1.0
dqmax451 max -1.1 -1 -> -1
dqmax453 max -Inf -1.1 -> -1.1
-- largies
dqmax460 max 1000 1E+3 -> 1E+3
dqmax461 max 1E+3 1000 -> 1E+3
dqmax462 max 1000 -1E+3 -> 1000
dqmax463 max 1E+3 -1000 -> 1E+3
dqmax464 max -1000 1E+3 -> 1E+3
dqmax465 max -1E+3 1000 -> 1000
dqmax466 max -1000 -1E+3 -> -1000
dqmax467 max -1E+3 -1000 -> -1000
-- misalignment traps for little-endian
dqmax471 max 1.0 0.1 -> 1.0
dqmax472 max 0.1 1.0 -> 1.0
dqmax473 max 10.0 0.1 -> 10.0
dqmax474 max 0.1 10.0 -> 10.0
dqmax475 max 100 1.0 -> 100
dqmax476 max 1.0 100 -> 100
dqmax477 max 1000 10.0 -> 1000
dqmax478 max 10.0 1000 -> 1000
dqmax479 max 10000 100.0 -> 10000
dqmax480 max 100.0 10000 -> 10000
dqmax481 max 100000 1000.0 -> 100000
dqmax482 max 1000.0 100000 -> 100000
dqmax483 max 1000000 10000.0 -> 1000000
dqmax484 max 10000.0 1000000 -> 1000000
-- subnormals
dqmax510 max 1.00E-6143 0 -> 1.00E-6143
dqmax511 max 0.1E-6143 0 -> 1E-6144 Subnormal
dqmax512 max 0.10E-6143 0 -> 1.0E-6144 Subnormal
dqmax513 max 0.100E-6143 0 -> 1.00E-6144 Subnormal
dqmax514 max 0.01E-6143 0 -> 1E-6145 Subnormal
dqmax515 max 0.999E-6143 0 -> 9.99E-6144 Subnormal
dqmax516 max 0.099E-6143 0 -> 9.9E-6145 Subnormal
dqmax517 max 0.009E-6143 0 -> 9E-6146 Subnormal
dqmax518 max 0.001E-6143 0 -> 1E-6146 Subnormal
dqmax519 max 0.0009E-6143 0 -> 9E-6147 Subnormal
dqmax520 max 0.0001E-6143 0 -> 1E-6147 Subnormal
dqmax530 max -1.00E-6143 0 -> 0
dqmax531 max -0.1E-6143 0 -> 0
dqmax532 max -0.10E-6143 0 -> 0
dqmax533 max -0.100E-6143 0 -> 0
dqmax534 max -0.01E-6143 0 -> 0
dqmax535 max -0.999E-6143 0 -> 0
dqmax536 max -0.099E-6143 0 -> 0
dqmax537 max -0.009E-6143 0 -> 0
dqmax538 max -0.001E-6143 0 -> 0
dqmax539 max -0.0009E-6143 0 -> 0
dqmax540 max -0.0001E-6143 0 -> 0
-- Null tests
dqmax900 max 10 # -> NaN Invalid_operation
dqmax901 max # 10 -> NaN Invalid_operation
------------------------------------------------------------------------
-- dqMax.decTest -- decQuad 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
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- sanity checks
dqmax001 max -2 -2 -> -2
dqmax002 max -2 -1 -> -1
dqmax003 max -2 0 -> 0
dqmax004 max -2 1 -> 1
dqmax005 max -2 2 -> 2
dqmax006 max -1 -2 -> -1
dqmax007 max -1 -1 -> -1
dqmax008 max -1 0 -> 0
dqmax009 max -1 1 -> 1
dqmax010 max -1 2 -> 2
dqmax011 max 0 -2 -> 0
dqmax012 max 0 -1 -> 0
dqmax013 max 0 0 -> 0
dqmax014 max 0 1 -> 1
dqmax015 max 0 2 -> 2
dqmax016 max 1 -2 -> 1
dqmax017 max 1 -1 -> 1
dqmax018 max 1 0 -> 1
dqmax019 max 1 1 -> 1
dqmax020 max 1 2 -> 2
dqmax021 max 2 -2 -> 2
dqmax022 max 2 -1 -> 2
dqmax023 max 2 0 -> 2
dqmax025 max 2 1 -> 2
dqmax026 max 2 2 -> 2
-- extended zeros
dqmax030 max 0 0 -> 0
dqmax031 max 0 -0 -> 0
dqmax032 max 0 -0.0 -> 0
dqmax033 max 0 0.0 -> 0
dqmax034 max -0 0 -> 0 -- note: -0 = 0, but 0 chosen
dqmax035 max -0 -0 -> -0
dqmax036 max -0 -0.0 -> -0.0
dqmax037 max -0 0.0 -> 0.0
dqmax038 max 0.0 0 -> 0
dqmax039 max 0.0 -0 -> 0.0
dqmax040 max 0.0 -0.0 -> 0.0
dqmax041 max 0.0 0.0 -> 0.0
dqmax042 max -0.0 0 -> 0
dqmax043 max -0.0 -0 -> -0.0
dqmax044 max -0.0 -0.0 -> -0.0
dqmax045 max -0.0 0.0 -> 0.0
dqmax050 max -0E1 0E1 -> 0E+1
dqmax051 max -0E2 0E2 -> 0E+2
dqmax052 max -0E2 0E1 -> 0E+1
dqmax053 max -0E1 0E2 -> 0E+2
dqmax054 max 0E1 -0E1 -> 0E+1
dqmax055 max 0E2 -0E2 -> 0E+2
dqmax056 max 0E2 -0E1 -> 0E+2
dqmax057 max 0E1 -0E2 -> 0E+1
dqmax058 max 0E1 0E1 -> 0E+1
dqmax059 max 0E2 0E2 -> 0E+2
dqmax060 max 0E2 0E1 -> 0E+2
dqmax061 max 0E1 0E2 -> 0E+2
dqmax062 max -0E1 -0E1 -> -0E+1
dqmax063 max -0E2 -0E2 -> -0E+2
dqmax064 max -0E2 -0E1 -> -0E+1
dqmax065 max -0E1 -0E2 -> -0E+1
-- Specials
dqmax090 max Inf -Inf -> Infinity
dqmax091 max Inf -1000 -> Infinity
dqmax092 max Inf -1 -> Infinity
dqmax093 max Inf -0 -> Infinity
dqmax094 max Inf 0 -> Infinity
dqmax095 max Inf 1 -> Infinity
dqmax096 max Inf 1000 -> Infinity
dqmax097 max Inf Inf -> Infinity
dqmax098 max -1000 Inf -> Infinity
dqmax099 max -Inf Inf -> Infinity
dqmax100 max -1 Inf -> Infinity
dqmax101 max -0 Inf -> Infinity
dqmax102 max 0 Inf -> Infinity
dqmax103 max 1 Inf -> Infinity
dqmax104 max 1000 Inf -> Infinity
dqmax105 max Inf Inf -> Infinity
dqmax120 max -Inf -Inf -> -Infinity
dqmax121 max -Inf -1000 -> -1000
dqmax122 max -Inf -1 -> -1
dqmax123 max -Inf -0 -> -0
dqmax124 max -Inf 0 -> 0
dqmax125 max -Inf 1 -> 1
dqmax126 max -Inf 1000 -> 1000
dqmax127 max -Inf Inf -> Infinity
dqmax128 max -Inf -Inf -> -Infinity
dqmax129 max -1000 -Inf -> -1000
dqmax130 max -1 -Inf -> -1
dqmax131 max -0 -Inf -> -0
dqmax132 max 0 -Inf -> 0
dqmax133 max 1 -Inf -> 1
dqmax134 max 1000 -Inf -> 1000
dqmax135 max Inf -Inf -> Infinity
-- 2004.08.02 754r chooses number over NaN in mixed cases
dqmax141 max NaN -Inf -> -Infinity
dqmax142 max NaN -1000 -> -1000
dqmax143 max NaN -1 -> -1
dqmax144 max NaN -0 -> -0
dqmax145 max NaN 0 -> 0
dqmax146 max NaN 1 -> 1
dqmax147 max NaN 1000 -> 1000
dqmax148 max NaN Inf -> Infinity
dqmax149 max NaN NaN -> NaN
dqmax150 max -Inf NaN -> -Infinity
dqmax151 max -1000 NaN -> -1000
dqmax152 max -1 NaN -> -1
dqmax153 max -0 NaN -> -0
dqmax154 max 0 NaN -> 0
dqmax155 max 1 NaN -> 1
dqmax156 max 1000 NaN -> 1000
dqmax157 max Inf NaN -> Infinity
dqmax161 max sNaN -Inf -> NaN Invalid_operation
dqmax162 max sNaN -1000 -> NaN Invalid_operation
dqmax163 max sNaN -1 -> NaN Invalid_operation
dqmax164 max sNaN -0 -> NaN Invalid_operation
dqmax165 max sNaN 0 -> NaN Invalid_operation
dqmax166 max sNaN 1 -> NaN Invalid_operation
dqmax167 max sNaN 1000 -> NaN Invalid_operation
dqmax168 max sNaN NaN -> NaN Invalid_operation
dqmax169 max sNaN sNaN -> NaN Invalid_operation
dqmax170 max NaN sNaN -> NaN Invalid_operation
dqmax171 max -Inf sNaN -> NaN Invalid_operation
dqmax172 max -1000 sNaN -> NaN Invalid_operation
dqmax173 max -1 sNaN -> NaN Invalid_operation
dqmax174 max -0 sNaN -> NaN Invalid_operation
dqmax175 max 0 sNaN -> NaN Invalid_operation
dqmax176 max 1 sNaN -> NaN Invalid_operation
dqmax177 max 1000 sNaN -> NaN Invalid_operation
dqmax178 max Inf sNaN -> NaN Invalid_operation
dqmax179 max NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqmax181 max NaN9 -Inf -> -Infinity
dqmax182 max NaN8 9 -> 9
dqmax183 max -NaN7 Inf -> Infinity
dqmax184 max -NaN1 NaN11 -> -NaN1
dqmax185 max NaN2 NaN12 -> NaN2
dqmax186 max -NaN13 -NaN7 -> -NaN13
dqmax187 max NaN14 -NaN5 -> NaN14
dqmax188 max -Inf NaN4 -> -Infinity
dqmax189 max -9 -NaN3 -> -9
dqmax190 max Inf NaN2 -> Infinity
dqmax191 max sNaN99 -Inf -> NaN99 Invalid_operation
dqmax192 max sNaN98 -1 -> NaN98 Invalid_operation
dqmax193 max -sNaN97 NaN -> -NaN97 Invalid_operation
dqmax194 max sNaN96 sNaN94 -> NaN96 Invalid_operation
dqmax195 max NaN95 sNaN93 -> NaN93 Invalid_operation
dqmax196 max -Inf sNaN92 -> NaN92 Invalid_operation
dqmax197 max 0 sNaN91 -> NaN91 Invalid_operation
dqmax198 max Inf -sNaN90 -> -NaN90 Invalid_operation
dqmax199 max NaN sNaN89 -> NaN89 Invalid_operation
-- old rounding checks
dqmax221 max 12345678000 1 -> 12345678000
dqmax222 max 1 12345678000 -> 12345678000
dqmax223 max 1234567800 1 -> 1234567800
dqmax224 max 1 1234567800 -> 1234567800
dqmax225 max 1234567890 1 -> 1234567890
dqmax226 max 1 1234567890 -> 1234567890
dqmax227 max 1234567891 1 -> 1234567891
dqmax228 max 1 1234567891 -> 1234567891
dqmax229 max 12345678901 1 -> 12345678901
dqmax230 max 1 12345678901 -> 12345678901
dqmax231 max 1234567896 1 -> 1234567896
dqmax232 max 1 1234567896 -> 1234567896
dqmax233 max -1234567891 1 -> 1
dqmax234 max 1 -1234567891 -> 1
dqmax235 max -12345678901 1 -> 1
dqmax236 max 1 -12345678901 -> 1
dqmax237 max -1234567896 1 -> 1
dqmax238 max 1 -1234567896 -> 1
-- from examples
dqmax280 max '3' '2' -> '3'
dqmax281 max '-10' '3' -> '3'
dqmax282 max '1.0' '1' -> '1'
dqmax283 max '1' '1.0' -> '1'
dqmax284 max '7' 'NaN' -> '7'
-- expanded list from min/max 754r purple prose
-- [explicit tests for exponent ordering]
dqmax401 max Inf 1.1 -> Infinity
dqmax402 max 1.1 1 -> 1.1
dqmax403 max 1 1.0 -> 1
dqmax404 max 1.0 0.1 -> 1.0
dqmax405 max 0.1 0.10 -> 0.1
dqmax406 max 0.10 0.100 -> 0.10
dqmax407 max 0.10 0 -> 0.10
dqmax408 max 0 0.0 -> 0
dqmax409 max 0.0 -0 -> 0.0
dqmax410 max 0.0 -0.0 -> 0.0
dqmax411 max 0.00 -0.0 -> 0.00
dqmax412 max 0.0 -0.00 -> 0.0
dqmax413 max 0 -0.0 -> 0
dqmax414 max 0 -0 -> 0
dqmax415 max -0.0 -0 -> -0.0
dqmax416 max -0 -0.100 -> -0
dqmax417 max -0.100 -0.10 -> -0.100
dqmax418 max -0.10 -0.1 -> -0.10
dqmax419 max -0.1 -1.0 -> -0.1
dqmax420 max -1.0 -1 -> -1.0
dqmax421 max -1 -1.1 -> -1
dqmax423 max -1.1 -Inf -> -1.1
-- same with operands reversed
dqmax431 max 1.1 Inf -> Infinity
dqmax432 max 1 1.1 -> 1.1
dqmax433 max 1.0 1 -> 1
dqmax434 max 0.1 1.0 -> 1.0
dqmax435 max 0.10 0.1 -> 0.1
dqmax436 max 0.100 0.10 -> 0.10
dqmax437 max 0 0.10 -> 0.10
dqmax438 max 0.0 0 -> 0
dqmax439 max -0 0.0 -> 0.0
dqmax440 max -0.0 0.0 -> 0.0
dqmax441 max -0.0 0.00 -> 0.00
dqmax442 max -0.00 0.0 -> 0.0
dqmax443 max -0.0 0 -> 0
dqmax444 max -0 0 -> 0
dqmax445 max -0 -0.0 -> -0.0
dqmax446 max -0.100 -0 -> -0
dqmax447 max -0.10 -0.100 -> -0.100
dqmax448 max -0.1 -0.10 -> -0.10
dqmax449 max -1.0 -0.1 -> -0.1
dqmax450 max -1 -1.0 -> -1.0
dqmax451 max -1.1 -1 -> -1
dqmax453 max -Inf -1.1 -> -1.1
-- largies
dqmax460 max 1000 1E+3 -> 1E+3
dqmax461 max 1E+3 1000 -> 1E+3
dqmax462 max 1000 -1E+3 -> 1000
dqmax463 max 1E+3 -1000 -> 1E+3
dqmax464 max -1000 1E+3 -> 1E+3
dqmax465 max -1E+3 1000 -> 1000
dqmax466 max -1000 -1E+3 -> -1000
dqmax467 max -1E+3 -1000 -> -1000
-- misalignment traps for little-endian
dqmax471 max 1.0 0.1 -> 1.0
dqmax472 max 0.1 1.0 -> 1.0
dqmax473 max 10.0 0.1 -> 10.0
dqmax474 max 0.1 10.0 -> 10.0
dqmax475 max 100 1.0 -> 100
dqmax476 max 1.0 100 -> 100
dqmax477 max 1000 10.0 -> 1000
dqmax478 max 10.0 1000 -> 1000
dqmax479 max 10000 100.0 -> 10000
dqmax480 max 100.0 10000 -> 10000
dqmax481 max 100000 1000.0 -> 100000
dqmax482 max 1000.0 100000 -> 100000
dqmax483 max 1000000 10000.0 -> 1000000
dqmax484 max 10000.0 1000000 -> 1000000
-- subnormals
dqmax510 max 1.00E-6143 0 -> 1.00E-6143
dqmax511 max 0.1E-6143 0 -> 1E-6144 Subnormal
dqmax512 max 0.10E-6143 0 -> 1.0E-6144 Subnormal
dqmax513 max 0.100E-6143 0 -> 1.00E-6144 Subnormal
dqmax514 max 0.01E-6143 0 -> 1E-6145 Subnormal
dqmax515 max 0.999E-6143 0 -> 9.99E-6144 Subnormal
dqmax516 max 0.099E-6143 0 -> 9.9E-6145 Subnormal
dqmax517 max 0.009E-6143 0 -> 9E-6146 Subnormal
dqmax518 max 0.001E-6143 0 -> 1E-6146 Subnormal
dqmax519 max 0.0009E-6143 0 -> 9E-6147 Subnormal
dqmax520 max 0.0001E-6143 0 -> 1E-6147 Subnormal
dqmax530 max -1.00E-6143 0 -> 0
dqmax531 max -0.1E-6143 0 -> 0
dqmax532 max -0.10E-6143 0 -> 0
dqmax533 max -0.100E-6143 0 -> 0
dqmax534 max -0.01E-6143 0 -> 0
dqmax535 max -0.999E-6143 0 -> 0
dqmax536 max -0.099E-6143 0 -> 0
dqmax537 max -0.009E-6143 0 -> 0
dqmax538 max -0.001E-6143 0 -> 0
dqmax539 max -0.0009E-6143 0 -> 0
dqmax540 max -0.0001E-6143 0 -> 0
-- Null tests
dqmax900 max 10 # -> NaN Invalid_operation
dqmax901 max # 10 -> NaN Invalid_operation

View file

@ -1,304 +1,304 @@
------------------------------------------------------------------------
-- dqMaxMag.decTest -- decQuad 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
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- sanity checks
dqmxg001 maxmag -2 -2 -> -2
dqmxg002 maxmag -2 -1 -> -2
dqmxg003 maxmag -2 0 -> -2
dqmxg004 maxmag -2 1 -> -2
dqmxg005 maxmag -2 2 -> 2
dqmxg006 maxmag -1 -2 -> -2
dqmxg007 maxmag -1 -1 -> -1
dqmxg008 maxmag -1 0 -> -1
dqmxg009 maxmag -1 1 -> 1
dqmxg010 maxmag -1 2 -> 2
dqmxg011 maxmag 0 -2 -> -2
dqmxg012 maxmag 0 -1 -> -1
dqmxg013 maxmag 0 0 -> 0
dqmxg014 maxmag 0 1 -> 1
dqmxg015 maxmag 0 2 -> 2
dqmxg016 maxmag 1 -2 -> -2
dqmxg017 maxmag 1 -1 -> 1
dqmxg018 maxmag 1 0 -> 1
dqmxg019 maxmag 1 1 -> 1
dqmxg020 maxmag 1 2 -> 2
dqmxg021 maxmag 2 -2 -> 2
dqmxg022 maxmag 2 -1 -> 2
dqmxg023 maxmag 2 0 -> 2
dqmxg025 maxmag 2 1 -> 2
dqmxg026 maxmag 2 2 -> 2
-- extended zeros
dqmxg030 maxmag 0 0 -> 0
dqmxg031 maxmag 0 -0 -> 0
dqmxg032 maxmag 0 -0.0 -> 0
dqmxg033 maxmag 0 0.0 -> 0
dqmxg034 maxmag -0 0 -> 0 -- note: -0 = 0, but 0 chosen
dqmxg035 maxmag -0 -0 -> -0
dqmxg036 maxmag -0 -0.0 -> -0.0
dqmxg037 maxmag -0 0.0 -> 0.0
dqmxg038 maxmag 0.0 0 -> 0
dqmxg039 maxmag 0.0 -0 -> 0.0
dqmxg040 maxmag 0.0 -0.0 -> 0.0
dqmxg041 maxmag 0.0 0.0 -> 0.0
dqmxg042 maxmag -0.0 0 -> 0
dqmxg043 maxmag -0.0 -0 -> -0.0
dqmxg044 maxmag -0.0 -0.0 -> -0.0
dqmxg045 maxmag -0.0 0.0 -> 0.0
dqmxg050 maxmag -0E1 0E1 -> 0E+1
dqmxg051 maxmag -0E2 0E2 -> 0E+2
dqmxg052 maxmag -0E2 0E1 -> 0E+1
dqmxg053 maxmag -0E1 0E2 -> 0E+2
dqmxg054 maxmag 0E1 -0E1 -> 0E+1
dqmxg055 maxmag 0E2 -0E2 -> 0E+2
dqmxg056 maxmag 0E2 -0E1 -> 0E+2
dqmxg057 maxmag 0E1 -0E2 -> 0E+1
dqmxg058 maxmag 0E1 0E1 -> 0E+1
dqmxg059 maxmag 0E2 0E2 -> 0E+2
dqmxg060 maxmag 0E2 0E1 -> 0E+2
dqmxg061 maxmag 0E1 0E2 -> 0E+2
dqmxg062 maxmag -0E1 -0E1 -> -0E+1
dqmxg063 maxmag -0E2 -0E2 -> -0E+2
dqmxg064 maxmag -0E2 -0E1 -> -0E+1
dqmxg065 maxmag -0E1 -0E2 -> -0E+1
-- Specials
dqmxg090 maxmag Inf -Inf -> Infinity
dqmxg091 maxmag Inf -1000 -> Infinity
dqmxg092 maxmag Inf -1 -> Infinity
dqmxg093 maxmag Inf -0 -> Infinity
dqmxg094 maxmag Inf 0 -> Infinity
dqmxg095 maxmag Inf 1 -> Infinity
dqmxg096 maxmag Inf 1000 -> Infinity
dqmxg097 maxmag Inf Inf -> Infinity
dqmxg098 maxmag -1000 Inf -> Infinity
dqmxg099 maxmag -Inf Inf -> Infinity
dqmxg100 maxmag -1 Inf -> Infinity
dqmxg101 maxmag -0 Inf -> Infinity
dqmxg102 maxmag 0 Inf -> Infinity
dqmxg103 maxmag 1 Inf -> Infinity
dqmxg104 maxmag 1000 Inf -> Infinity
dqmxg105 maxmag Inf Inf -> Infinity
dqmxg120 maxmag -Inf -Inf -> -Infinity
dqmxg121 maxmag -Inf -1000 -> -Infinity
dqmxg122 maxmag -Inf -1 -> -Infinity
dqmxg123 maxmag -Inf -0 -> -Infinity
dqmxg124 maxmag -Inf 0 -> -Infinity
dqmxg125 maxmag -Inf 1 -> -Infinity
dqmxg126 maxmag -Inf 1000 -> -Infinity
dqmxg127 maxmag -Inf Inf -> Infinity
dqmxg128 maxmag -Inf -Inf -> -Infinity
dqmxg129 maxmag -1000 -Inf -> -Infinity
dqmxg130 maxmag -1 -Inf -> -Infinity
dqmxg131 maxmag -0 -Inf -> -Infinity
dqmxg132 maxmag 0 -Inf -> -Infinity
dqmxg133 maxmag 1 -Inf -> -Infinity
dqmxg134 maxmag 1000 -Inf -> -Infinity
dqmxg135 maxmag Inf -Inf -> Infinity
-- 2004.08.02 754r chooses number over NaN in mixed cases
dqmxg141 maxmag NaN -Inf -> -Infinity
dqmxg142 maxmag NaN -1000 -> -1000
dqmxg143 maxmag NaN -1 -> -1
dqmxg144 maxmag NaN -0 -> -0
dqmxg145 maxmag NaN 0 -> 0
dqmxg146 maxmag NaN 1 -> 1
dqmxg147 maxmag NaN 1000 -> 1000
dqmxg148 maxmag NaN Inf -> Infinity
dqmxg149 maxmag NaN NaN -> NaN
dqmxg150 maxmag -Inf NaN -> -Infinity
dqmxg151 maxmag -1000 NaN -> -1000
dqmxg152 maxmag -1 NaN -> -1
dqmxg153 maxmag -0 NaN -> -0
dqmxg154 maxmag 0 NaN -> 0
dqmxg155 maxmag 1 NaN -> 1
dqmxg156 maxmag 1000 NaN -> 1000
dqmxg157 maxmag Inf NaN -> Infinity
dqmxg161 maxmag sNaN -Inf -> NaN Invalid_operation
dqmxg162 maxmag sNaN -1000 -> NaN Invalid_operation
dqmxg163 maxmag sNaN -1 -> NaN Invalid_operation
dqmxg164 maxmag sNaN -0 -> NaN Invalid_operation
dqmxg165 maxmag sNaN 0 -> NaN Invalid_operation
dqmxg166 maxmag sNaN 1 -> NaN Invalid_operation
dqmxg167 maxmag sNaN 1000 -> NaN Invalid_operation
dqmxg168 maxmag sNaN NaN -> NaN Invalid_operation
dqmxg169 maxmag sNaN sNaN -> NaN Invalid_operation
dqmxg170 maxmag NaN sNaN -> NaN Invalid_operation
dqmxg171 maxmag -Inf sNaN -> NaN Invalid_operation
dqmxg172 maxmag -1000 sNaN -> NaN Invalid_operation
dqmxg173 maxmag -1 sNaN -> NaN Invalid_operation
dqmxg174 maxmag -0 sNaN -> NaN Invalid_operation
dqmxg175 maxmag 0 sNaN -> NaN Invalid_operation
dqmxg176 maxmag 1 sNaN -> NaN Invalid_operation
dqmxg177 maxmag 1000 sNaN -> NaN Invalid_operation
dqmxg178 maxmag Inf sNaN -> NaN Invalid_operation
dqmxg179 maxmag NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqmxg181 maxmag NaN9 -Inf -> -Infinity
dqmxg182 maxmag NaN8 9 -> 9
dqmxg183 maxmag -NaN7 Inf -> Infinity
dqmxg184 maxmag -NaN1 NaN11 -> -NaN1
dqmxg185 maxmag NaN2 NaN12 -> NaN2
dqmxg186 maxmag -NaN13 -NaN7 -> -NaN13
dqmxg187 maxmag NaN14 -NaN5 -> NaN14
dqmxg188 maxmag -Inf NaN4 -> -Infinity
dqmxg189 maxmag -9 -NaN3 -> -9
dqmxg190 maxmag Inf NaN2 -> Infinity
dqmxg191 maxmag sNaN99 -Inf -> NaN99 Invalid_operation
dqmxg192 maxmag sNaN98 -1 -> NaN98 Invalid_operation
dqmxg193 maxmag -sNaN97 NaN -> -NaN97 Invalid_operation
dqmxg194 maxmag sNaN96 sNaN94 -> NaN96 Invalid_operation
dqmxg195 maxmag NaN95 sNaN93 -> NaN93 Invalid_operation
dqmxg196 maxmag -Inf sNaN92 -> NaN92 Invalid_operation
dqmxg197 maxmag 0 sNaN91 -> NaN91 Invalid_operation
dqmxg198 maxmag Inf -sNaN90 -> -NaN90 Invalid_operation
dqmxg199 maxmag NaN sNaN89 -> NaN89 Invalid_operation
-- old rounding checks
dqmxg221 maxmag 12345678000 1 -> 12345678000
dqmxg222 maxmag 1 12345678000 -> 12345678000
dqmxg223 maxmag 1234567800 1 -> 1234567800
dqmxg224 maxmag 1 1234567800 -> 1234567800
dqmxg225 maxmag 1234567890 1 -> 1234567890
dqmxg226 maxmag 1 1234567890 -> 1234567890
dqmxg227 maxmag 1234567891 1 -> 1234567891
dqmxg228 maxmag 1 1234567891 -> 1234567891
dqmxg229 maxmag 12345678901 1 -> 12345678901
dqmxg230 maxmag 1 12345678901 -> 12345678901
dqmxg231 maxmag 1234567896 1 -> 1234567896
dqmxg232 maxmag 1 1234567896 -> 1234567896
dqmxg233 maxmag -1234567891 1 -> -1234567891
dqmxg234 maxmag 1 -1234567891 -> -1234567891
dqmxg235 maxmag -12345678901 1 -> -12345678901
dqmxg236 maxmag 1 -12345678901 -> -12345678901
dqmxg237 maxmag -1234567896 1 -> -1234567896
dqmxg238 maxmag 1 -1234567896 -> -1234567896
-- from examples
dqmxg280 maxmag '3' '2' -> '3'
dqmxg281 maxmag '-10' '3' -> '-10'
dqmxg282 maxmag '1.0' '1' -> '1'
dqmxg283 maxmag '1' '1.0' -> '1'
dqmxg284 maxmag '7' 'NaN' -> '7'
-- expanded list from min/max 754r purple prose
-- [explicit tests for exponent ordering]
dqmxg401 maxmag Inf 1.1 -> Infinity
dqmxg402 maxmag 1.1 1 -> 1.1
dqmxg403 maxmag 1 1.0 -> 1
dqmxg404 maxmag 1.0 0.1 -> 1.0
dqmxg405 maxmag 0.1 0.10 -> 0.1
dqmxg406 maxmag 0.10 0.100 -> 0.10
dqmxg407 maxmag 0.10 0 -> 0.10
dqmxg408 maxmag 0 0.0 -> 0
dqmxg409 maxmag 0.0 -0 -> 0.0
dqmxg410 maxmag 0.0 -0.0 -> 0.0
dqmxg411 maxmag 0.00 -0.0 -> 0.00
dqmxg412 maxmag 0.0 -0.00 -> 0.0
dqmxg413 maxmag 0 -0.0 -> 0
dqmxg414 maxmag 0 -0 -> 0
dqmxg415 maxmag -0.0 -0 -> -0.0
dqmxg416 maxmag -0 -0.100 -> -0.100
dqmxg417 maxmag -0.100 -0.10 -> -0.100
dqmxg418 maxmag -0.10 -0.1 -> -0.10
dqmxg419 maxmag -0.1 -1.0 -> -1.0
dqmxg420 maxmag -1.0 -1 -> -1.0
dqmxg421 maxmag -1 -1.1 -> -1.1
dqmxg423 maxmag -1.1 -Inf -> -Infinity
-- same with operands reversed
dqmxg431 maxmag 1.1 Inf -> Infinity
dqmxg432 maxmag 1 1.1 -> 1.1
dqmxg433 maxmag 1.0 1 -> 1
dqmxg434 maxmag 0.1 1.0 -> 1.0
dqmxg435 maxmag 0.10 0.1 -> 0.1
dqmxg436 maxmag 0.100 0.10 -> 0.10
dqmxg437 maxmag 0 0.10 -> 0.10
dqmxg438 maxmag 0.0 0 -> 0
dqmxg439 maxmag -0 0.0 -> 0.0
dqmxg440 maxmag -0.0 0.0 -> 0.0
dqmxg441 maxmag -0.0 0.00 -> 0.00
dqmxg442 maxmag -0.00 0.0 -> 0.0
dqmxg443 maxmag -0.0 0 -> 0
dqmxg444 maxmag -0 0 -> 0
dqmxg445 maxmag -0 -0.0 -> -0.0
dqmxg446 maxmag -0.100 -0 -> -0.100
dqmxg447 maxmag -0.10 -0.100 -> -0.100
dqmxg448 maxmag -0.1 -0.10 -> -0.10
dqmxg449 maxmag -1.0 -0.1 -> -1.0
dqmxg450 maxmag -1 -1.0 -> -1.0
dqmxg451 maxmag -1.1 -1 -> -1.1
dqmxg453 maxmag -Inf -1.1 -> -Infinity
-- largies
dqmxg460 maxmag 1000 1E+3 -> 1E+3
dqmxg461 maxmag 1E+3 1000 -> 1E+3
dqmxg462 maxmag 1000 -1E+3 -> 1000
dqmxg463 maxmag 1E+3 -1000 -> 1E+3
dqmxg464 maxmag -1000 1E+3 -> 1E+3
dqmxg465 maxmag -1E+3 1000 -> 1000
dqmxg466 maxmag -1000 -1E+3 -> -1000
dqmxg467 maxmag -1E+3 -1000 -> -1000
-- subnormals
dqmxg510 maxmag 1.00E-6143 0 -> 1.00E-6143
dqmxg511 maxmag 0.1E-6143 0 -> 1E-6144 Subnormal
dqmxg512 maxmag 0.10E-6143 0 -> 1.0E-6144 Subnormal
dqmxg513 maxmag 0.100E-6143 0 -> 1.00E-6144 Subnormal
dqmxg514 maxmag 0.01E-6143 0 -> 1E-6145 Subnormal
dqmxg515 maxmag 0.999E-6143 0 -> 9.99E-6144 Subnormal
dqmxg516 maxmag 0.099E-6143 0 -> 9.9E-6145 Subnormal
dqmxg517 maxmag 0.009E-6143 0 -> 9E-6146 Subnormal
dqmxg518 maxmag 0.001E-6143 0 -> 1E-6146 Subnormal
dqmxg519 maxmag 0.0009E-6143 0 -> 9E-6147 Subnormal
dqmxg520 maxmag 0.0001E-6143 0 -> 1E-6147 Subnormal
dqmxg530 maxmag -1.00E-6143 0 -> -1.00E-6143
dqmxg531 maxmag -0.1E-6143 0 -> -1E-6144 Subnormal
dqmxg532 maxmag -0.10E-6143 0 -> -1.0E-6144 Subnormal
dqmxg533 maxmag -0.100E-6143 0 -> -1.00E-6144 Subnormal
dqmxg534 maxmag -0.01E-6143 0 -> -1E-6145 Subnormal
dqmxg535 maxmag -0.999E-6143 0 -> -9.99E-6144 Subnormal
dqmxg536 maxmag -0.099E-6143 0 -> -9.9E-6145 Subnormal
dqmxg537 maxmag -0.009E-6143 0 -> -9E-6146 Subnormal
dqmxg538 maxmag -0.001E-6143 0 -> -1E-6146 Subnormal
dqmxg539 maxmag -0.0009E-6143 0 -> -9E-6147 Subnormal
dqmxg540 maxmag -0.0001E-6143 0 -> -1E-6147 Subnormal
-- Null tests
dqmxg900 maxmag 10 # -> NaN Invalid_operation
dqmxg901 maxmag # 10 -> NaN Invalid_operation
------------------------------------------------------------------------
-- dqMaxMag.decTest -- decQuad 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
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- sanity checks
dqmxg001 maxmag -2 -2 -> -2
dqmxg002 maxmag -2 -1 -> -2
dqmxg003 maxmag -2 0 -> -2
dqmxg004 maxmag -2 1 -> -2
dqmxg005 maxmag -2 2 -> 2
dqmxg006 maxmag -1 -2 -> -2
dqmxg007 maxmag -1 -1 -> -1
dqmxg008 maxmag -1 0 -> -1
dqmxg009 maxmag -1 1 -> 1
dqmxg010 maxmag -1 2 -> 2
dqmxg011 maxmag 0 -2 -> -2
dqmxg012 maxmag 0 -1 -> -1
dqmxg013 maxmag 0 0 -> 0
dqmxg014 maxmag 0 1 -> 1
dqmxg015 maxmag 0 2 -> 2
dqmxg016 maxmag 1 -2 -> -2
dqmxg017 maxmag 1 -1 -> 1
dqmxg018 maxmag 1 0 -> 1
dqmxg019 maxmag 1 1 -> 1
dqmxg020 maxmag 1 2 -> 2
dqmxg021 maxmag 2 -2 -> 2
dqmxg022 maxmag 2 -1 -> 2
dqmxg023 maxmag 2 0 -> 2
dqmxg025 maxmag 2 1 -> 2
dqmxg026 maxmag 2 2 -> 2
-- extended zeros
dqmxg030 maxmag 0 0 -> 0
dqmxg031 maxmag 0 -0 -> 0
dqmxg032 maxmag 0 -0.0 -> 0
dqmxg033 maxmag 0 0.0 -> 0
dqmxg034 maxmag -0 0 -> 0 -- note: -0 = 0, but 0 chosen
dqmxg035 maxmag -0 -0 -> -0
dqmxg036 maxmag -0 -0.0 -> -0.0
dqmxg037 maxmag -0 0.0 -> 0.0
dqmxg038 maxmag 0.0 0 -> 0
dqmxg039 maxmag 0.0 -0 -> 0.0
dqmxg040 maxmag 0.0 -0.0 -> 0.0
dqmxg041 maxmag 0.0 0.0 -> 0.0
dqmxg042 maxmag -0.0 0 -> 0
dqmxg043 maxmag -0.0 -0 -> -0.0
dqmxg044 maxmag -0.0 -0.0 -> -0.0
dqmxg045 maxmag -0.0 0.0 -> 0.0
dqmxg050 maxmag -0E1 0E1 -> 0E+1
dqmxg051 maxmag -0E2 0E2 -> 0E+2
dqmxg052 maxmag -0E2 0E1 -> 0E+1
dqmxg053 maxmag -0E1 0E2 -> 0E+2
dqmxg054 maxmag 0E1 -0E1 -> 0E+1
dqmxg055 maxmag 0E2 -0E2 -> 0E+2
dqmxg056 maxmag 0E2 -0E1 -> 0E+2
dqmxg057 maxmag 0E1 -0E2 -> 0E+1
dqmxg058 maxmag 0E1 0E1 -> 0E+1
dqmxg059 maxmag 0E2 0E2 -> 0E+2
dqmxg060 maxmag 0E2 0E1 -> 0E+2
dqmxg061 maxmag 0E1 0E2 -> 0E+2
dqmxg062 maxmag -0E1 -0E1 -> -0E+1
dqmxg063 maxmag -0E2 -0E2 -> -0E+2
dqmxg064 maxmag -0E2 -0E1 -> -0E+1
dqmxg065 maxmag -0E1 -0E2 -> -0E+1
-- Specials
dqmxg090 maxmag Inf -Inf -> Infinity
dqmxg091 maxmag Inf -1000 -> Infinity
dqmxg092 maxmag Inf -1 -> Infinity
dqmxg093 maxmag Inf -0 -> Infinity
dqmxg094 maxmag Inf 0 -> Infinity
dqmxg095 maxmag Inf 1 -> Infinity
dqmxg096 maxmag Inf 1000 -> Infinity
dqmxg097 maxmag Inf Inf -> Infinity
dqmxg098 maxmag -1000 Inf -> Infinity
dqmxg099 maxmag -Inf Inf -> Infinity
dqmxg100 maxmag -1 Inf -> Infinity
dqmxg101 maxmag -0 Inf -> Infinity
dqmxg102 maxmag 0 Inf -> Infinity
dqmxg103 maxmag 1 Inf -> Infinity
dqmxg104 maxmag 1000 Inf -> Infinity
dqmxg105 maxmag Inf Inf -> Infinity
dqmxg120 maxmag -Inf -Inf -> -Infinity
dqmxg121 maxmag -Inf -1000 -> -Infinity
dqmxg122 maxmag -Inf -1 -> -Infinity
dqmxg123 maxmag -Inf -0 -> -Infinity
dqmxg124 maxmag -Inf 0 -> -Infinity
dqmxg125 maxmag -Inf 1 -> -Infinity
dqmxg126 maxmag -Inf 1000 -> -Infinity
dqmxg127 maxmag -Inf Inf -> Infinity
dqmxg128 maxmag -Inf -Inf -> -Infinity
dqmxg129 maxmag -1000 -Inf -> -Infinity
dqmxg130 maxmag -1 -Inf -> -Infinity
dqmxg131 maxmag -0 -Inf -> -Infinity
dqmxg132 maxmag 0 -Inf -> -Infinity
dqmxg133 maxmag 1 -Inf -> -Infinity
dqmxg134 maxmag 1000 -Inf -> -Infinity
dqmxg135 maxmag Inf -Inf -> Infinity
-- 2004.08.02 754r chooses number over NaN in mixed cases
dqmxg141 maxmag NaN -Inf -> -Infinity
dqmxg142 maxmag NaN -1000 -> -1000
dqmxg143 maxmag NaN -1 -> -1
dqmxg144 maxmag NaN -0 -> -0
dqmxg145 maxmag NaN 0 -> 0
dqmxg146 maxmag NaN 1 -> 1
dqmxg147 maxmag NaN 1000 -> 1000
dqmxg148 maxmag NaN Inf -> Infinity
dqmxg149 maxmag NaN NaN -> NaN
dqmxg150 maxmag -Inf NaN -> -Infinity
dqmxg151 maxmag -1000 NaN -> -1000
dqmxg152 maxmag -1 NaN -> -1
dqmxg153 maxmag -0 NaN -> -0
dqmxg154 maxmag 0 NaN -> 0
dqmxg155 maxmag 1 NaN -> 1
dqmxg156 maxmag 1000 NaN -> 1000
dqmxg157 maxmag Inf NaN -> Infinity
dqmxg161 maxmag sNaN -Inf -> NaN Invalid_operation
dqmxg162 maxmag sNaN -1000 -> NaN Invalid_operation
dqmxg163 maxmag sNaN -1 -> NaN Invalid_operation
dqmxg164 maxmag sNaN -0 -> NaN Invalid_operation
dqmxg165 maxmag sNaN 0 -> NaN Invalid_operation
dqmxg166 maxmag sNaN 1 -> NaN Invalid_operation
dqmxg167 maxmag sNaN 1000 -> NaN Invalid_operation
dqmxg168 maxmag sNaN NaN -> NaN Invalid_operation
dqmxg169 maxmag sNaN sNaN -> NaN Invalid_operation
dqmxg170 maxmag NaN sNaN -> NaN Invalid_operation
dqmxg171 maxmag -Inf sNaN -> NaN Invalid_operation
dqmxg172 maxmag -1000 sNaN -> NaN Invalid_operation
dqmxg173 maxmag -1 sNaN -> NaN Invalid_operation
dqmxg174 maxmag -0 sNaN -> NaN Invalid_operation
dqmxg175 maxmag 0 sNaN -> NaN Invalid_operation
dqmxg176 maxmag 1 sNaN -> NaN Invalid_operation
dqmxg177 maxmag 1000 sNaN -> NaN Invalid_operation
dqmxg178 maxmag Inf sNaN -> NaN Invalid_operation
dqmxg179 maxmag NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqmxg181 maxmag NaN9 -Inf -> -Infinity
dqmxg182 maxmag NaN8 9 -> 9
dqmxg183 maxmag -NaN7 Inf -> Infinity
dqmxg184 maxmag -NaN1 NaN11 -> -NaN1
dqmxg185 maxmag NaN2 NaN12 -> NaN2
dqmxg186 maxmag -NaN13 -NaN7 -> -NaN13
dqmxg187 maxmag NaN14 -NaN5 -> NaN14
dqmxg188 maxmag -Inf NaN4 -> -Infinity
dqmxg189 maxmag -9 -NaN3 -> -9
dqmxg190 maxmag Inf NaN2 -> Infinity
dqmxg191 maxmag sNaN99 -Inf -> NaN99 Invalid_operation
dqmxg192 maxmag sNaN98 -1 -> NaN98 Invalid_operation
dqmxg193 maxmag -sNaN97 NaN -> -NaN97 Invalid_operation
dqmxg194 maxmag sNaN96 sNaN94 -> NaN96 Invalid_operation
dqmxg195 maxmag NaN95 sNaN93 -> NaN93 Invalid_operation
dqmxg196 maxmag -Inf sNaN92 -> NaN92 Invalid_operation
dqmxg197 maxmag 0 sNaN91 -> NaN91 Invalid_operation
dqmxg198 maxmag Inf -sNaN90 -> -NaN90 Invalid_operation
dqmxg199 maxmag NaN sNaN89 -> NaN89 Invalid_operation
-- old rounding checks
dqmxg221 maxmag 12345678000 1 -> 12345678000
dqmxg222 maxmag 1 12345678000 -> 12345678000
dqmxg223 maxmag 1234567800 1 -> 1234567800
dqmxg224 maxmag 1 1234567800 -> 1234567800
dqmxg225 maxmag 1234567890 1 -> 1234567890
dqmxg226 maxmag 1 1234567890 -> 1234567890
dqmxg227 maxmag 1234567891 1 -> 1234567891
dqmxg228 maxmag 1 1234567891 -> 1234567891
dqmxg229 maxmag 12345678901 1 -> 12345678901
dqmxg230 maxmag 1 12345678901 -> 12345678901
dqmxg231 maxmag 1234567896 1 -> 1234567896
dqmxg232 maxmag 1 1234567896 -> 1234567896
dqmxg233 maxmag -1234567891 1 -> -1234567891
dqmxg234 maxmag 1 -1234567891 -> -1234567891
dqmxg235 maxmag -12345678901 1 -> -12345678901
dqmxg236 maxmag 1 -12345678901 -> -12345678901
dqmxg237 maxmag -1234567896 1 -> -1234567896
dqmxg238 maxmag 1 -1234567896 -> -1234567896
-- from examples
dqmxg280 maxmag '3' '2' -> '3'
dqmxg281 maxmag '-10' '3' -> '-10'
dqmxg282 maxmag '1.0' '1' -> '1'
dqmxg283 maxmag '1' '1.0' -> '1'
dqmxg284 maxmag '7' 'NaN' -> '7'
-- expanded list from min/max 754r purple prose
-- [explicit tests for exponent ordering]
dqmxg401 maxmag Inf 1.1 -> Infinity
dqmxg402 maxmag 1.1 1 -> 1.1
dqmxg403 maxmag 1 1.0 -> 1
dqmxg404 maxmag 1.0 0.1 -> 1.0
dqmxg405 maxmag 0.1 0.10 -> 0.1
dqmxg406 maxmag 0.10 0.100 -> 0.10
dqmxg407 maxmag 0.10 0 -> 0.10
dqmxg408 maxmag 0 0.0 -> 0
dqmxg409 maxmag 0.0 -0 -> 0.0
dqmxg410 maxmag 0.0 -0.0 -> 0.0
dqmxg411 maxmag 0.00 -0.0 -> 0.00
dqmxg412 maxmag 0.0 -0.00 -> 0.0
dqmxg413 maxmag 0 -0.0 -> 0
dqmxg414 maxmag 0 -0 -> 0
dqmxg415 maxmag -0.0 -0 -> -0.0
dqmxg416 maxmag -0 -0.100 -> -0.100
dqmxg417 maxmag -0.100 -0.10 -> -0.100
dqmxg418 maxmag -0.10 -0.1 -> -0.10
dqmxg419 maxmag -0.1 -1.0 -> -1.0
dqmxg420 maxmag -1.0 -1 -> -1.0
dqmxg421 maxmag -1 -1.1 -> -1.1
dqmxg423 maxmag -1.1 -Inf -> -Infinity
-- same with operands reversed
dqmxg431 maxmag 1.1 Inf -> Infinity
dqmxg432 maxmag 1 1.1 -> 1.1
dqmxg433 maxmag 1.0 1 -> 1
dqmxg434 maxmag 0.1 1.0 -> 1.0
dqmxg435 maxmag 0.10 0.1 -> 0.1
dqmxg436 maxmag 0.100 0.10 -> 0.10
dqmxg437 maxmag 0 0.10 -> 0.10
dqmxg438 maxmag 0.0 0 -> 0
dqmxg439 maxmag -0 0.0 -> 0.0
dqmxg440 maxmag -0.0 0.0 -> 0.0
dqmxg441 maxmag -0.0 0.00 -> 0.00
dqmxg442 maxmag -0.00 0.0 -> 0.0
dqmxg443 maxmag -0.0 0 -> 0
dqmxg444 maxmag -0 0 -> 0
dqmxg445 maxmag -0 -0.0 -> -0.0
dqmxg446 maxmag -0.100 -0 -> -0.100
dqmxg447 maxmag -0.10 -0.100 -> -0.100
dqmxg448 maxmag -0.1 -0.10 -> -0.10
dqmxg449 maxmag -1.0 -0.1 -> -1.0
dqmxg450 maxmag -1 -1.0 -> -1.0
dqmxg451 maxmag -1.1 -1 -> -1.1
dqmxg453 maxmag -Inf -1.1 -> -Infinity
-- largies
dqmxg460 maxmag 1000 1E+3 -> 1E+3
dqmxg461 maxmag 1E+3 1000 -> 1E+3
dqmxg462 maxmag 1000 -1E+3 -> 1000
dqmxg463 maxmag 1E+3 -1000 -> 1E+3
dqmxg464 maxmag -1000 1E+3 -> 1E+3
dqmxg465 maxmag -1E+3 1000 -> 1000
dqmxg466 maxmag -1000 -1E+3 -> -1000
dqmxg467 maxmag -1E+3 -1000 -> -1000
-- subnormals
dqmxg510 maxmag 1.00E-6143 0 -> 1.00E-6143
dqmxg511 maxmag 0.1E-6143 0 -> 1E-6144 Subnormal
dqmxg512 maxmag 0.10E-6143 0 -> 1.0E-6144 Subnormal
dqmxg513 maxmag 0.100E-6143 0 -> 1.00E-6144 Subnormal
dqmxg514 maxmag 0.01E-6143 0 -> 1E-6145 Subnormal
dqmxg515 maxmag 0.999E-6143 0 -> 9.99E-6144 Subnormal
dqmxg516 maxmag 0.099E-6143 0 -> 9.9E-6145 Subnormal
dqmxg517 maxmag 0.009E-6143 0 -> 9E-6146 Subnormal
dqmxg518 maxmag 0.001E-6143 0 -> 1E-6146 Subnormal
dqmxg519 maxmag 0.0009E-6143 0 -> 9E-6147 Subnormal
dqmxg520 maxmag 0.0001E-6143 0 -> 1E-6147 Subnormal
dqmxg530 maxmag -1.00E-6143 0 -> -1.00E-6143
dqmxg531 maxmag -0.1E-6143 0 -> -1E-6144 Subnormal
dqmxg532 maxmag -0.10E-6143 0 -> -1.0E-6144 Subnormal
dqmxg533 maxmag -0.100E-6143 0 -> -1.00E-6144 Subnormal
dqmxg534 maxmag -0.01E-6143 0 -> -1E-6145 Subnormal
dqmxg535 maxmag -0.999E-6143 0 -> -9.99E-6144 Subnormal
dqmxg536 maxmag -0.099E-6143 0 -> -9.9E-6145 Subnormal
dqmxg537 maxmag -0.009E-6143 0 -> -9E-6146 Subnormal
dqmxg538 maxmag -0.001E-6143 0 -> -1E-6146 Subnormal
dqmxg539 maxmag -0.0009E-6143 0 -> -9E-6147 Subnormal
dqmxg540 maxmag -0.0001E-6143 0 -> -1E-6147 Subnormal
-- Null tests
dqmxg900 maxmag 10 # -> NaN Invalid_operation
dqmxg901 maxmag # 10 -> NaN Invalid_operation

View file

@ -1,309 +1,309 @@
------------------------------------------------------------------------
-- dqMin.decTest -- decQuad 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
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- sanity checks
dqmin001 min -2 -2 -> -2
dqmin002 min -2 -1 -> -2
dqmin003 min -2 0 -> -2
dqmin004 min -2 1 -> -2
dqmin005 min -2 2 -> -2
dqmin006 min -1 -2 -> -2
dqmin007 min -1 -1 -> -1
dqmin008 min -1 0 -> -1
dqmin009 min -1 1 -> -1
dqmin010 min -1 2 -> -1
dqmin011 min 0 -2 -> -2
dqmin012 min 0 -1 -> -1
dqmin013 min 0 0 -> 0
dqmin014 min 0 1 -> 0
dqmin015 min 0 2 -> 0
dqmin016 min 1 -2 -> -2
dqmin017 min 1 -1 -> -1
dqmin018 min 1 0 -> 0
dqmin019 min 1 1 -> 1
dqmin020 min 1 2 -> 1
dqmin021 min 2 -2 -> -2
dqmin022 min 2 -1 -> -1
dqmin023 min 2 0 -> 0
dqmin025 min 2 1 -> 1
dqmin026 min 2 2 -> 2
-- extended zeros
dqmin030 min 0 0 -> 0
dqmin031 min 0 -0 -> -0
dqmin032 min 0 -0.0 -> -0.0
dqmin033 min 0 0.0 -> 0.0
dqmin034 min -0 0 -> -0
dqmin035 min -0 -0 -> -0
dqmin036 min -0 -0.0 -> -0
dqmin037 min -0 0.0 -> -0
dqmin038 min 0.0 0 -> 0.0
dqmin039 min 0.0 -0 -> -0
dqmin040 min 0.0 -0.0 -> -0.0
dqmin041 min 0.0 0.0 -> 0.0
dqmin042 min -0.0 0 -> -0.0
dqmin043 min -0.0 -0 -> -0
dqmin044 min -0.0 -0.0 -> -0.0
dqmin045 min -0.0 0.0 -> -0.0
dqmin046 min 0E1 -0E1 -> -0E+1
dqmin047 min -0E1 0E2 -> -0E+1
dqmin048 min 0E2 0E1 -> 0E+1
dqmin049 min 0E1 0E2 -> 0E+1
dqmin050 min -0E3 -0E2 -> -0E+3
dqmin051 min -0E2 -0E3 -> -0E+3
-- Specials
dqmin090 min Inf -Inf -> -Infinity
dqmin091 min Inf -1000 -> -1000
dqmin092 min Inf -1 -> -1
dqmin093 min Inf -0 -> -0
dqmin094 min Inf 0 -> 0
dqmin095 min Inf 1 -> 1
dqmin096 min Inf 1000 -> 1000
dqmin097 min Inf Inf -> Infinity
dqmin098 min -1000 Inf -> -1000
dqmin099 min -Inf Inf -> -Infinity
dqmin100 min -1 Inf -> -1
dqmin101 min -0 Inf -> -0
dqmin102 min 0 Inf -> 0
dqmin103 min 1 Inf -> 1
dqmin104 min 1000 Inf -> 1000
dqmin105 min Inf Inf -> Infinity
dqmin120 min -Inf -Inf -> -Infinity
dqmin121 min -Inf -1000 -> -Infinity
dqmin122 min -Inf -1 -> -Infinity
dqmin123 min -Inf -0 -> -Infinity
dqmin124 min -Inf 0 -> -Infinity
dqmin125 min -Inf 1 -> -Infinity
dqmin126 min -Inf 1000 -> -Infinity
dqmin127 min -Inf Inf -> -Infinity
dqmin128 min -Inf -Inf -> -Infinity
dqmin129 min -1000 -Inf -> -Infinity
dqmin130 min -1 -Inf -> -Infinity
dqmin131 min -0 -Inf -> -Infinity
dqmin132 min 0 -Inf -> -Infinity
dqmin133 min 1 -Inf -> -Infinity
dqmin134 min 1000 -Inf -> -Infinity
dqmin135 min Inf -Inf -> -Infinity
-- 2004.08.02 754r chooses number over NaN in mixed cases
dqmin141 min NaN -Inf -> -Infinity
dqmin142 min NaN -1000 -> -1000
dqmin143 min NaN -1 -> -1
dqmin144 min NaN -0 -> -0
dqmin145 min NaN 0 -> 0
dqmin146 min NaN 1 -> 1
dqmin147 min NaN 1000 -> 1000
dqmin148 min NaN Inf -> Infinity
dqmin149 min NaN NaN -> NaN
dqmin150 min -Inf NaN -> -Infinity
dqmin151 min -1000 NaN -> -1000
dqmin152 min -1 -NaN -> -1
dqmin153 min -0 NaN -> -0
dqmin154 min 0 -NaN -> 0
dqmin155 min 1 NaN -> 1
dqmin156 min 1000 NaN -> 1000
dqmin157 min Inf NaN -> Infinity
dqmin161 min sNaN -Inf -> NaN Invalid_operation
dqmin162 min sNaN -1000 -> NaN Invalid_operation
dqmin163 min sNaN -1 -> NaN Invalid_operation
dqmin164 min sNaN -0 -> NaN Invalid_operation
dqmin165 min -sNaN 0 -> -NaN Invalid_operation
dqmin166 min -sNaN 1 -> -NaN Invalid_operation
dqmin167 min sNaN 1000 -> NaN Invalid_operation
dqmin168 min sNaN NaN -> NaN Invalid_operation
dqmin169 min sNaN sNaN -> NaN Invalid_operation
dqmin170 min NaN sNaN -> NaN Invalid_operation
dqmin171 min -Inf sNaN -> NaN Invalid_operation
dqmin172 min -1000 sNaN -> NaN Invalid_operation
dqmin173 min -1 sNaN -> NaN Invalid_operation
dqmin174 min -0 sNaN -> NaN Invalid_operation
dqmin175 min 0 sNaN -> NaN Invalid_operation
dqmin176 min 1 sNaN -> NaN Invalid_operation
dqmin177 min 1000 sNaN -> NaN Invalid_operation
dqmin178 min Inf sNaN -> NaN Invalid_operation
dqmin179 min NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqmin181 min NaN9 -Inf -> -Infinity
dqmin182 min -NaN8 9990 -> 9990
dqmin183 min NaN71 Inf -> Infinity
dqmin184 min NaN1 NaN54 -> NaN1
dqmin185 min NaN22 -NaN53 -> NaN22
dqmin186 min -NaN3 NaN6 -> -NaN3
dqmin187 min -NaN44 NaN7 -> -NaN44
dqmin188 min -Inf NaN41 -> -Infinity
dqmin189 min -9999 -NaN33 -> -9999
dqmin190 min Inf NaN2 -> Infinity
dqmin191 min sNaN99 -Inf -> NaN99 Invalid_operation
dqmin192 min sNaN98 -11 -> NaN98 Invalid_operation
dqmin193 min -sNaN97 NaN8 -> -NaN97 Invalid_operation
dqmin194 min sNaN69 sNaN94 -> NaN69 Invalid_operation
dqmin195 min NaN95 sNaN93 -> NaN93 Invalid_operation
dqmin196 min -Inf sNaN92 -> NaN92 Invalid_operation
dqmin197 min 088 sNaN91 -> NaN91 Invalid_operation
dqmin198 min Inf -sNaN90 -> -NaN90 Invalid_operation
dqmin199 min NaN sNaN86 -> NaN86 Invalid_operation
-- old rounding checks
dqmin221 min -12345678000 1 -> -12345678000
dqmin222 min 1 -12345678000 -> -12345678000
dqmin223 min -1234567800 1 -> -1234567800
dqmin224 min 1 -1234567800 -> -1234567800
dqmin225 min -1234567890 1 -> -1234567890
dqmin226 min 1 -1234567890 -> -1234567890
dqmin227 min -1234567891 1 -> -1234567891
dqmin228 min 1 -1234567891 -> -1234567891
dqmin229 min -12345678901 1 -> -12345678901
dqmin230 min 1 -12345678901 -> -12345678901
dqmin231 min -1234567896 1 -> -1234567896
dqmin232 min 1 -1234567896 -> -1234567896
dqmin233 min 1234567891 1 -> 1
dqmin234 min 1 1234567891 -> 1
dqmin235 min 12345678901 1 -> 1
dqmin236 min 1 12345678901 -> 1
dqmin237 min 1234567896 1 -> 1
dqmin238 min 1 1234567896 -> 1
-- from examples
dqmin280 min '3' '2' -> '2'
dqmin281 min '-10' '3' -> '-10'
dqmin282 min '1.0' '1' -> '1.0'
dqmin283 min '1' '1.0' -> '1.0'
dqmin284 min '7' 'NaN' -> '7'
-- expanded list from min/max 754r purple prose
-- [explicit tests for exponent ordering]
dqmin401 min Inf 1.1 -> 1.1
dqmin402 min 1.1 1 -> 1
dqmin403 min 1 1.0 -> 1.0
dqmin404 min 1.0 0.1 -> 0.1
dqmin405 min 0.1 0.10 -> 0.10
dqmin406 min 0.10 0.100 -> 0.100
dqmin407 min 0.10 0 -> 0
dqmin408 min 0 0.0 -> 0.0
dqmin409 min 0.0 -0 -> -0
dqmin410 min 0.0 -0.0 -> -0.0
dqmin411 min 0.00 -0.0 -> -0.0
dqmin412 min 0.0 -0.00 -> -0.00
dqmin413 min 0 -0.0 -> -0.0
dqmin414 min 0 -0 -> -0
dqmin415 min -0.0 -0 -> -0
dqmin416 min -0 -0.100 -> -0.100
dqmin417 min -0.100 -0.10 -> -0.10
dqmin418 min -0.10 -0.1 -> -0.1
dqmin419 min -0.1 -1.0 -> -1.0
dqmin420 min -1.0 -1 -> -1
dqmin421 min -1 -1.1 -> -1.1
dqmin423 min -1.1 -Inf -> -Infinity
-- same with operands reversed
dqmin431 min 1.1 Inf -> 1.1
dqmin432 min 1 1.1 -> 1
dqmin433 min 1.0 1 -> 1.0
dqmin434 min 0.1 1.0 -> 0.1
dqmin435 min 0.10 0.1 -> 0.10
dqmin436 min 0.100 0.10 -> 0.100
dqmin437 min 0 0.10 -> 0
dqmin438 min 0.0 0 -> 0.0
dqmin439 min -0 0.0 -> -0
dqmin440 min -0.0 0.0 -> -0.0
dqmin441 min -0.0 0.00 -> -0.0
dqmin442 min -0.00 0.0 -> -0.00
dqmin443 min -0.0 0 -> -0.0
dqmin444 min -0 0 -> -0
dqmin445 min -0 -0.0 -> -0
dqmin446 min -0.100 -0 -> -0.100
dqmin447 min -0.10 -0.100 -> -0.10
dqmin448 min -0.1 -0.10 -> -0.1
dqmin449 min -1.0 -0.1 -> -1.0
dqmin450 min -1 -1.0 -> -1
dqmin451 min -1.1 -1 -> -1.1
dqmin453 min -Inf -1.1 -> -Infinity
-- largies
dqmin460 min 1000 1E+3 -> 1000
dqmin461 min 1E+3 1000 -> 1000
dqmin462 min 1000 -1E+3 -> -1E+3
dqmin463 min 1E+3 -384 -> -384
dqmin464 min -384 1E+3 -> -384
dqmin465 min -1E+3 1000 -> -1E+3
dqmin466 min -384 -1E+3 -> -1E+3
dqmin467 min -1E+3 -384 -> -1E+3
-- misalignment traps for little-endian
dqmin471 min 1.0 0.1 -> 0.1
dqmin472 min 0.1 1.0 -> 0.1
dqmin473 min 10.0 0.1 -> 0.1
dqmin474 min 0.1 10.0 -> 0.1
dqmin475 min 100 1.0 -> 1.0
dqmin476 min 1.0 100 -> 1.0
dqmin477 min 1000 10.0 -> 10.0
dqmin478 min 10.0 1000 -> 10.0
dqmin479 min 10000 100.0 -> 100.0
dqmin480 min 100.0 10000 -> 100.0
dqmin481 min 100000 1000.0 -> 1000.0
dqmin482 min 1000.0 100000 -> 1000.0
dqmin483 min 1000000 10000.0 -> 10000.0
dqmin484 min 10000.0 1000000 -> 10000.0
-- subnormals
dqmin510 min 1.00E-6143 0 -> 0
dqmin511 min 0.1E-6143 0 -> 0
dqmin512 min 0.10E-6143 0 -> 0
dqmin513 min 0.100E-6143 0 -> 0
dqmin514 min 0.01E-6143 0 -> 0
dqmin515 min 0.999E-6143 0 -> 0
dqmin516 min 0.099E-6143 0 -> 0
dqmin517 min 0.009E-6143 0 -> 0
dqmin518 min 0.001E-6143 0 -> 0
dqmin519 min 0.0009E-6143 0 -> 0
dqmin520 min 0.0001E-6143 0 -> 0
dqmin530 min -1.00E-6143 0 -> -1.00E-6143
dqmin531 min -0.1E-6143 0 -> -1E-6144 Subnormal
dqmin532 min -0.10E-6143 0 -> -1.0E-6144 Subnormal
dqmin533 min -0.100E-6143 0 -> -1.00E-6144 Subnormal
dqmin534 min -0.01E-6143 0 -> -1E-6145 Subnormal
dqmin535 min -0.999E-6143 0 -> -9.99E-6144 Subnormal
dqmin536 min -0.099E-6143 0 -> -9.9E-6145 Subnormal
dqmin537 min -0.009E-6143 0 -> -9E-6146 Subnormal
dqmin538 min -0.001E-6143 0 -> -1E-6146 Subnormal
dqmin539 min -0.0009E-6143 0 -> -9E-6147 Subnormal
dqmin540 min -0.0001E-6143 0 -> -1E-6147 Subnormal
-- Null tests
dqmin900 min 10 # -> NaN Invalid_operation
dqmin901 min # 10 -> NaN Invalid_operation
------------------------------------------------------------------------
-- dqMin.decTest -- decQuad 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
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- sanity checks
dqmin001 min -2 -2 -> -2
dqmin002 min -2 -1 -> -2
dqmin003 min -2 0 -> -2
dqmin004 min -2 1 -> -2
dqmin005 min -2 2 -> -2
dqmin006 min -1 -2 -> -2
dqmin007 min -1 -1 -> -1
dqmin008 min -1 0 -> -1
dqmin009 min -1 1 -> -1
dqmin010 min -1 2 -> -1
dqmin011 min 0 -2 -> -2
dqmin012 min 0 -1 -> -1
dqmin013 min 0 0 -> 0
dqmin014 min 0 1 -> 0
dqmin015 min 0 2 -> 0
dqmin016 min 1 -2 -> -2
dqmin017 min 1 -1 -> -1
dqmin018 min 1 0 -> 0
dqmin019 min 1 1 -> 1
dqmin020 min 1 2 -> 1
dqmin021 min 2 -2 -> -2
dqmin022 min 2 -1 -> -1
dqmin023 min 2 0 -> 0
dqmin025 min 2 1 -> 1
dqmin026 min 2 2 -> 2
-- extended zeros
dqmin030 min 0 0 -> 0
dqmin031 min 0 -0 -> -0
dqmin032 min 0 -0.0 -> -0.0
dqmin033 min 0 0.0 -> 0.0
dqmin034 min -0 0 -> -0
dqmin035 min -0 -0 -> -0
dqmin036 min -0 -0.0 -> -0
dqmin037 min -0 0.0 -> -0
dqmin038 min 0.0 0 -> 0.0
dqmin039 min 0.0 -0 -> -0
dqmin040 min 0.0 -0.0 -> -0.0
dqmin041 min 0.0 0.0 -> 0.0
dqmin042 min -0.0 0 -> -0.0
dqmin043 min -0.0 -0 -> -0
dqmin044 min -0.0 -0.0 -> -0.0
dqmin045 min -0.0 0.0 -> -0.0
dqmin046 min 0E1 -0E1 -> -0E+1
dqmin047 min -0E1 0E2 -> -0E+1
dqmin048 min 0E2 0E1 -> 0E+1
dqmin049 min 0E1 0E2 -> 0E+1
dqmin050 min -0E3 -0E2 -> -0E+3
dqmin051 min -0E2 -0E3 -> -0E+3
-- Specials
dqmin090 min Inf -Inf -> -Infinity
dqmin091 min Inf -1000 -> -1000
dqmin092 min Inf -1 -> -1
dqmin093 min Inf -0 -> -0
dqmin094 min Inf 0 -> 0
dqmin095 min Inf 1 -> 1
dqmin096 min Inf 1000 -> 1000
dqmin097 min Inf Inf -> Infinity
dqmin098 min -1000 Inf -> -1000
dqmin099 min -Inf Inf -> -Infinity
dqmin100 min -1 Inf -> -1
dqmin101 min -0 Inf -> -0
dqmin102 min 0 Inf -> 0
dqmin103 min 1 Inf -> 1
dqmin104 min 1000 Inf -> 1000
dqmin105 min Inf Inf -> Infinity
dqmin120 min -Inf -Inf -> -Infinity
dqmin121 min -Inf -1000 -> -Infinity
dqmin122 min -Inf -1 -> -Infinity
dqmin123 min -Inf -0 -> -Infinity
dqmin124 min -Inf 0 -> -Infinity
dqmin125 min -Inf 1 -> -Infinity
dqmin126 min -Inf 1000 -> -Infinity
dqmin127 min -Inf Inf -> -Infinity
dqmin128 min -Inf -Inf -> -Infinity
dqmin129 min -1000 -Inf -> -Infinity
dqmin130 min -1 -Inf -> -Infinity
dqmin131 min -0 -Inf -> -Infinity
dqmin132 min 0 -Inf -> -Infinity
dqmin133 min 1 -Inf -> -Infinity
dqmin134 min 1000 -Inf -> -Infinity
dqmin135 min Inf -Inf -> -Infinity
-- 2004.08.02 754r chooses number over NaN in mixed cases
dqmin141 min NaN -Inf -> -Infinity
dqmin142 min NaN -1000 -> -1000
dqmin143 min NaN -1 -> -1
dqmin144 min NaN -0 -> -0
dqmin145 min NaN 0 -> 0
dqmin146 min NaN 1 -> 1
dqmin147 min NaN 1000 -> 1000
dqmin148 min NaN Inf -> Infinity
dqmin149 min NaN NaN -> NaN
dqmin150 min -Inf NaN -> -Infinity
dqmin151 min -1000 NaN -> -1000
dqmin152 min -1 -NaN -> -1
dqmin153 min -0 NaN -> -0
dqmin154 min 0 -NaN -> 0
dqmin155 min 1 NaN -> 1
dqmin156 min 1000 NaN -> 1000
dqmin157 min Inf NaN -> Infinity
dqmin161 min sNaN -Inf -> NaN Invalid_operation
dqmin162 min sNaN -1000 -> NaN Invalid_operation
dqmin163 min sNaN -1 -> NaN Invalid_operation
dqmin164 min sNaN -0 -> NaN Invalid_operation
dqmin165 min -sNaN 0 -> -NaN Invalid_operation
dqmin166 min -sNaN 1 -> -NaN Invalid_operation
dqmin167 min sNaN 1000 -> NaN Invalid_operation
dqmin168 min sNaN NaN -> NaN Invalid_operation
dqmin169 min sNaN sNaN -> NaN Invalid_operation
dqmin170 min NaN sNaN -> NaN Invalid_operation
dqmin171 min -Inf sNaN -> NaN Invalid_operation
dqmin172 min -1000 sNaN -> NaN Invalid_operation
dqmin173 min -1 sNaN -> NaN Invalid_operation
dqmin174 min -0 sNaN -> NaN Invalid_operation
dqmin175 min 0 sNaN -> NaN Invalid_operation
dqmin176 min 1 sNaN -> NaN Invalid_operation
dqmin177 min 1000 sNaN -> NaN Invalid_operation
dqmin178 min Inf sNaN -> NaN Invalid_operation
dqmin179 min NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqmin181 min NaN9 -Inf -> -Infinity
dqmin182 min -NaN8 9990 -> 9990
dqmin183 min NaN71 Inf -> Infinity
dqmin184 min NaN1 NaN54 -> NaN1
dqmin185 min NaN22 -NaN53 -> NaN22
dqmin186 min -NaN3 NaN6 -> -NaN3
dqmin187 min -NaN44 NaN7 -> -NaN44
dqmin188 min -Inf NaN41 -> -Infinity
dqmin189 min -9999 -NaN33 -> -9999
dqmin190 min Inf NaN2 -> Infinity
dqmin191 min sNaN99 -Inf -> NaN99 Invalid_operation
dqmin192 min sNaN98 -11 -> NaN98 Invalid_operation
dqmin193 min -sNaN97 NaN8 -> -NaN97 Invalid_operation
dqmin194 min sNaN69 sNaN94 -> NaN69 Invalid_operation
dqmin195 min NaN95 sNaN93 -> NaN93 Invalid_operation
dqmin196 min -Inf sNaN92 -> NaN92 Invalid_operation
dqmin197 min 088 sNaN91 -> NaN91 Invalid_operation
dqmin198 min Inf -sNaN90 -> -NaN90 Invalid_operation
dqmin199 min NaN sNaN86 -> NaN86 Invalid_operation
-- old rounding checks
dqmin221 min -12345678000 1 -> -12345678000
dqmin222 min 1 -12345678000 -> -12345678000
dqmin223 min -1234567800 1 -> -1234567800
dqmin224 min 1 -1234567800 -> -1234567800
dqmin225 min -1234567890 1 -> -1234567890
dqmin226 min 1 -1234567890 -> -1234567890
dqmin227 min -1234567891 1 -> -1234567891
dqmin228 min 1 -1234567891 -> -1234567891
dqmin229 min -12345678901 1 -> -12345678901
dqmin230 min 1 -12345678901 -> -12345678901
dqmin231 min -1234567896 1 -> -1234567896
dqmin232 min 1 -1234567896 -> -1234567896
dqmin233 min 1234567891 1 -> 1
dqmin234 min 1 1234567891 -> 1
dqmin235 min 12345678901 1 -> 1
dqmin236 min 1 12345678901 -> 1
dqmin237 min 1234567896 1 -> 1
dqmin238 min 1 1234567896 -> 1
-- from examples
dqmin280 min '3' '2' -> '2'
dqmin281 min '-10' '3' -> '-10'
dqmin282 min '1.0' '1' -> '1.0'
dqmin283 min '1' '1.0' -> '1.0'
dqmin284 min '7' 'NaN' -> '7'
-- expanded list from min/max 754r purple prose
-- [explicit tests for exponent ordering]
dqmin401 min Inf 1.1 -> 1.1
dqmin402 min 1.1 1 -> 1
dqmin403 min 1 1.0 -> 1.0
dqmin404 min 1.0 0.1 -> 0.1
dqmin405 min 0.1 0.10 -> 0.10
dqmin406 min 0.10 0.100 -> 0.100
dqmin407 min 0.10 0 -> 0
dqmin408 min 0 0.0 -> 0.0
dqmin409 min 0.0 -0 -> -0
dqmin410 min 0.0 -0.0 -> -0.0
dqmin411 min 0.00 -0.0 -> -0.0
dqmin412 min 0.0 -0.00 -> -0.00
dqmin413 min 0 -0.0 -> -0.0
dqmin414 min 0 -0 -> -0
dqmin415 min -0.0 -0 -> -0
dqmin416 min -0 -0.100 -> -0.100
dqmin417 min -0.100 -0.10 -> -0.10
dqmin418 min -0.10 -0.1 -> -0.1
dqmin419 min -0.1 -1.0 -> -1.0
dqmin420 min -1.0 -1 -> -1
dqmin421 min -1 -1.1 -> -1.1
dqmin423 min -1.1 -Inf -> -Infinity
-- same with operands reversed
dqmin431 min 1.1 Inf -> 1.1
dqmin432 min 1 1.1 -> 1
dqmin433 min 1.0 1 -> 1.0
dqmin434 min 0.1 1.0 -> 0.1
dqmin435 min 0.10 0.1 -> 0.10
dqmin436 min 0.100 0.10 -> 0.100
dqmin437 min 0 0.10 -> 0
dqmin438 min 0.0 0 -> 0.0
dqmin439 min -0 0.0 -> -0
dqmin440 min -0.0 0.0 -> -0.0
dqmin441 min -0.0 0.00 -> -0.0
dqmin442 min -0.00 0.0 -> -0.00
dqmin443 min -0.0 0 -> -0.0
dqmin444 min -0 0 -> -0
dqmin445 min -0 -0.0 -> -0
dqmin446 min -0.100 -0 -> -0.100
dqmin447 min -0.10 -0.100 -> -0.10
dqmin448 min -0.1 -0.10 -> -0.1
dqmin449 min -1.0 -0.1 -> -1.0
dqmin450 min -1 -1.0 -> -1
dqmin451 min -1.1 -1 -> -1.1
dqmin453 min -Inf -1.1 -> -Infinity
-- largies
dqmin460 min 1000 1E+3 -> 1000
dqmin461 min 1E+3 1000 -> 1000
dqmin462 min 1000 -1E+3 -> -1E+3
dqmin463 min 1E+3 -384 -> -384
dqmin464 min -384 1E+3 -> -384
dqmin465 min -1E+3 1000 -> -1E+3
dqmin466 min -384 -1E+3 -> -1E+3
dqmin467 min -1E+3 -384 -> -1E+3
-- misalignment traps for little-endian
dqmin471 min 1.0 0.1 -> 0.1
dqmin472 min 0.1 1.0 -> 0.1
dqmin473 min 10.0 0.1 -> 0.1
dqmin474 min 0.1 10.0 -> 0.1
dqmin475 min 100 1.0 -> 1.0
dqmin476 min 1.0 100 -> 1.0
dqmin477 min 1000 10.0 -> 10.0
dqmin478 min 10.0 1000 -> 10.0
dqmin479 min 10000 100.0 -> 100.0
dqmin480 min 100.0 10000 -> 100.0
dqmin481 min 100000 1000.0 -> 1000.0
dqmin482 min 1000.0 100000 -> 1000.0
dqmin483 min 1000000 10000.0 -> 10000.0
dqmin484 min 10000.0 1000000 -> 10000.0
-- subnormals
dqmin510 min 1.00E-6143 0 -> 0
dqmin511 min 0.1E-6143 0 -> 0
dqmin512 min 0.10E-6143 0 -> 0
dqmin513 min 0.100E-6143 0 -> 0
dqmin514 min 0.01E-6143 0 -> 0
dqmin515 min 0.999E-6143 0 -> 0
dqmin516 min 0.099E-6143 0 -> 0
dqmin517 min 0.009E-6143 0 -> 0
dqmin518 min 0.001E-6143 0 -> 0
dqmin519 min 0.0009E-6143 0 -> 0
dqmin520 min 0.0001E-6143 0 -> 0
dqmin530 min -1.00E-6143 0 -> -1.00E-6143
dqmin531 min -0.1E-6143 0 -> -1E-6144 Subnormal
dqmin532 min -0.10E-6143 0 -> -1.0E-6144 Subnormal
dqmin533 min -0.100E-6143 0 -> -1.00E-6144 Subnormal
dqmin534 min -0.01E-6143 0 -> -1E-6145 Subnormal
dqmin535 min -0.999E-6143 0 -> -9.99E-6144 Subnormal
dqmin536 min -0.099E-6143 0 -> -9.9E-6145 Subnormal
dqmin537 min -0.009E-6143 0 -> -9E-6146 Subnormal
dqmin538 min -0.001E-6143 0 -> -1E-6146 Subnormal
dqmin539 min -0.0009E-6143 0 -> -9E-6147 Subnormal
dqmin540 min -0.0001E-6143 0 -> -1E-6147 Subnormal
-- Null tests
dqmin900 min 10 # -> NaN Invalid_operation
dqmin901 min # 10 -> NaN Invalid_operation

View file

@ -1,293 +1,293 @@
------------------------------------------------------------------------
-- dqMinMag.decTest -- decQuad 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
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- sanity checks
dqmng001 minmag -2 -2 -> -2
dqmng002 minmag -2 -1 -> -1
dqmng003 minmag -2 0 -> 0
dqmng004 minmag -2 1 -> 1
dqmng005 minmag -2 2 -> -2
dqmng006 minmag -1 -2 -> -1
dqmng007 minmag -1 -1 -> -1
dqmng008 minmag -1 0 -> 0
dqmng009 minmag -1 1 -> -1
dqmng010 minmag -1 2 -> -1
dqmng011 minmag 0 -2 -> 0
dqmng012 minmag 0 -1 -> 0
dqmng013 minmag 0 0 -> 0
dqmng014 minmag 0 1 -> 0
dqmng015 minmag 0 2 -> 0
dqmng016 minmag 1 -2 -> 1
dqmng017 minmag 1 -1 -> -1
dqmng018 minmag 1 0 -> 0
dqmng019 minmag 1 1 -> 1
dqmng020 minmag 1 2 -> 1
dqmng021 minmag 2 -2 -> -2
dqmng022 minmag 2 -1 -> -1
dqmng023 minmag 2 0 -> 0
dqmng025 minmag 2 1 -> 1
dqmng026 minmag 2 2 -> 2
-- extended zeros
dqmng030 minmag 0 0 -> 0
dqmng031 minmag 0 -0 -> -0
dqmng032 minmag 0 -0.0 -> -0.0
dqmng033 minmag 0 0.0 -> 0.0
dqmng034 minmag -0 0 -> -0
dqmng035 minmag -0 -0 -> -0
dqmng036 minmag -0 -0.0 -> -0
dqmng037 minmag -0 0.0 -> -0
dqmng038 minmag 0.0 0 -> 0.0
dqmng039 minmag 0.0 -0 -> -0
dqmng040 minmag 0.0 -0.0 -> -0.0
dqmng041 minmag 0.0 0.0 -> 0.0
dqmng042 minmag -0.0 0 -> -0.0
dqmng043 minmag -0.0 -0 -> -0
dqmng044 minmag -0.0 -0.0 -> -0.0
dqmng045 minmag -0.0 0.0 -> -0.0
dqmng046 minmag 0E1 -0E1 -> -0E+1
dqmng047 minmag -0E1 0E2 -> -0E+1
dqmng048 minmag 0E2 0E1 -> 0E+1
dqmng049 minmag 0E1 0E2 -> 0E+1
dqmng050 minmag -0E3 -0E2 -> -0E+3
dqmng051 minmag -0E2 -0E3 -> -0E+3
-- Specials
dqmng090 minmag Inf -Inf -> -Infinity
dqmng091 minmag Inf -1000 -> -1000
dqmng092 minmag Inf -1 -> -1
dqmng093 minmag Inf -0 -> -0
dqmng094 minmag Inf 0 -> 0
dqmng095 minmag Inf 1 -> 1
dqmng096 minmag Inf 1000 -> 1000
dqmng097 minmag Inf Inf -> Infinity
dqmng098 minmag -1000 Inf -> -1000
dqmng099 minmag -Inf Inf -> -Infinity
dqmng100 minmag -1 Inf -> -1
dqmng101 minmag -0 Inf -> -0
dqmng102 minmag 0 Inf -> 0
dqmng103 minmag 1 Inf -> 1
dqmng104 minmag 1000 Inf -> 1000
dqmng105 minmag Inf Inf -> Infinity
dqmng120 minmag -Inf -Inf -> -Infinity
dqmng121 minmag -Inf -1000 -> -1000
dqmng122 minmag -Inf -1 -> -1
dqmng123 minmag -Inf -0 -> -0
dqmng124 minmag -Inf 0 -> 0
dqmng125 minmag -Inf 1 -> 1
dqmng126 minmag -Inf 1000 -> 1000
dqmng127 minmag -Inf Inf -> -Infinity
dqmng128 minmag -Inf -Inf -> -Infinity
dqmng129 minmag -1000 -Inf -> -1000
dqmng130 minmag -1 -Inf -> -1
dqmng131 minmag -0 -Inf -> -0
dqmng132 minmag 0 -Inf -> 0
dqmng133 minmag 1 -Inf -> 1
dqmng134 minmag 1000 -Inf -> 1000
dqmng135 minmag Inf -Inf -> -Infinity
-- 2004.08.02 754r chooses number over NaN in mixed cases
dqmng141 minmag NaN -Inf -> -Infinity
dqmng142 minmag NaN -1000 -> -1000
dqmng143 minmag NaN -1 -> -1
dqmng144 minmag NaN -0 -> -0
dqmng145 minmag NaN 0 -> 0
dqmng146 minmag NaN 1 -> 1
dqmng147 minmag NaN 1000 -> 1000
dqmng148 minmag NaN Inf -> Infinity
dqmng149 minmag NaN NaN -> NaN
dqmng150 minmag -Inf NaN -> -Infinity
dqmng151 minmag -1000 NaN -> -1000
dqmng152 minmag -1 -NaN -> -1
dqmng153 minmag -0 NaN -> -0
dqmng154 minmag 0 -NaN -> 0
dqmng155 minmag 1 NaN -> 1
dqmng156 minmag 1000 NaN -> 1000
dqmng157 minmag Inf NaN -> Infinity
dqmng161 minmag sNaN -Inf -> NaN Invalid_operation
dqmng162 minmag sNaN -1000 -> NaN Invalid_operation
dqmng163 minmag sNaN -1 -> NaN Invalid_operation
dqmng164 minmag sNaN -0 -> NaN Invalid_operation
dqmng165 minmag -sNaN 0 -> -NaN Invalid_operation
dqmng166 minmag -sNaN 1 -> -NaN Invalid_operation
dqmng167 minmag sNaN 1000 -> NaN Invalid_operation
dqmng168 minmag sNaN NaN -> NaN Invalid_operation
dqmng169 minmag sNaN sNaN -> NaN Invalid_operation
dqmng170 minmag NaN sNaN -> NaN Invalid_operation
dqmng171 minmag -Inf sNaN -> NaN Invalid_operation
dqmng172 minmag -1000 sNaN -> NaN Invalid_operation
dqmng173 minmag -1 sNaN -> NaN Invalid_operation
dqmng174 minmag -0 sNaN -> NaN Invalid_operation
dqmng175 minmag 0 sNaN -> NaN Invalid_operation
dqmng176 minmag 1 sNaN -> NaN Invalid_operation
dqmng177 minmag 1000 sNaN -> NaN Invalid_operation
dqmng178 minmag Inf sNaN -> NaN Invalid_operation
dqmng179 minmag NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqmng181 minmag NaN9 -Inf -> -Infinity
dqmng182 minmag -NaN8 9990 -> 9990
dqmng183 minmag NaN71 Inf -> Infinity
dqmng184 minmag NaN1 NaN54 -> NaN1
dqmng185 minmag NaN22 -NaN53 -> NaN22
dqmng186 minmag -NaN3 NaN6 -> -NaN3
dqmng187 minmag -NaN44 NaN7 -> -NaN44
dqmng188 minmag -Inf NaN41 -> -Infinity
dqmng189 minmag -9999 -NaN33 -> -9999
dqmng190 minmag Inf NaN2 -> Infinity
dqmng191 minmag sNaN99 -Inf -> NaN99 Invalid_operation
dqmng192 minmag sNaN98 -11 -> NaN98 Invalid_operation
dqmng193 minmag -sNaN97 NaN8 -> -NaN97 Invalid_operation
dqmng194 minmag sNaN69 sNaN94 -> NaN69 Invalid_operation
dqmng195 minmag NaN95 sNaN93 -> NaN93 Invalid_operation
dqmng196 minmag -Inf sNaN92 -> NaN92 Invalid_operation
dqmng197 minmag 088 sNaN91 -> NaN91 Invalid_operation
dqmng198 minmag Inf -sNaN90 -> -NaN90 Invalid_operation
dqmng199 minmag NaN sNaN86 -> NaN86 Invalid_operation
-- old rounding checks
dqmng221 minmag -12345678000 1 -> 1
dqmng222 minmag 1 -12345678000 -> 1
dqmng223 minmag -1234567800 1 -> 1
dqmng224 minmag 1 -1234567800 -> 1
dqmng225 minmag -1234567890 1 -> 1
dqmng226 minmag 1 -1234567890 -> 1
dqmng227 minmag -1234567891 1 -> 1
dqmng228 minmag 1 -1234567891 -> 1
dqmng229 minmag -12345678901 1 -> 1
dqmng230 minmag 1 -12345678901 -> 1
dqmng231 minmag -1234567896 1 -> 1
dqmng232 minmag 1 -1234567896 -> 1
dqmng233 minmag 1234567891 1 -> 1
dqmng234 minmag 1 1234567891 -> 1
dqmng235 minmag 12345678901 1 -> 1
dqmng236 minmag 1 12345678901 -> 1
dqmng237 minmag 1234567896 1 -> 1
dqmng238 minmag 1 1234567896 -> 1
-- from examples
dqmng280 minmag '3' '2' -> '2'
dqmng281 minmag '-10' '3' -> '3'
dqmng282 minmag '1.0' '1' -> '1.0'
dqmng283 minmag '1' '1.0' -> '1.0'
dqmng284 minmag '7' 'NaN' -> '7'
-- expanded list from min/max 754r purple prose
-- [explicit tests for exponent ordering]
dqmng401 minmag Inf 1.1 -> 1.1
dqmng402 minmag 1.1 1 -> 1
dqmng403 minmag 1 1.0 -> 1.0
dqmng404 minmag 1.0 0.1 -> 0.1
dqmng405 minmag 0.1 0.10 -> 0.10
dqmng406 minmag 0.10 0.100 -> 0.100
dqmng407 minmag 0.10 0 -> 0
dqmng408 minmag 0 0.0 -> 0.0
dqmng409 minmag 0.0 -0 -> -0
dqmng410 minmag 0.0 -0.0 -> -0.0
dqmng411 minmag 0.00 -0.0 -> -0.0
dqmng412 minmag 0.0 -0.00 -> -0.00
dqmng413 minmag 0 -0.0 -> -0.0
dqmng414 minmag 0 -0 -> -0
dqmng415 minmag -0.0 -0 -> -0
dqmng416 minmag -0 -0.100 -> -0
dqmng417 minmag -0.100 -0.10 -> -0.10
dqmng418 minmag -0.10 -0.1 -> -0.1
dqmng419 minmag -0.1 -1.0 -> -0.1
dqmng420 minmag -1.0 -1 -> -1
dqmng421 minmag -1 -1.1 -> -1
dqmng423 minmag -1.1 -Inf -> -1.1
-- same with operands reversed
dqmng431 minmag 1.1 Inf -> 1.1
dqmng432 minmag 1 1.1 -> 1
dqmng433 minmag 1.0 1 -> 1.0
dqmng434 minmag 0.1 1.0 -> 0.1
dqmng435 minmag 0.10 0.1 -> 0.10
dqmng436 minmag 0.100 0.10 -> 0.100
dqmng437 minmag 0 0.10 -> 0
dqmng438 minmag 0.0 0 -> 0.0
dqmng439 minmag -0 0.0 -> -0
dqmng440 minmag -0.0 0.0 -> -0.0
dqmng441 minmag -0.0 0.00 -> -0.0
dqmng442 minmag -0.00 0.0 -> -0.00
dqmng443 minmag -0.0 0 -> -0.0
dqmng444 minmag -0 0 -> -0
dqmng445 minmag -0 -0.0 -> -0
dqmng446 minmag -0.100 -0 -> -0
dqmng447 minmag -0.10 -0.100 -> -0.10
dqmng448 minmag -0.1 -0.10 -> -0.1
dqmng449 minmag -1.0 -0.1 -> -0.1
dqmng450 minmag -1 -1.0 -> -1
dqmng451 minmag -1.1 -1 -> -1
dqmng453 minmag -Inf -1.1 -> -1.1
-- largies
dqmng460 minmag 1000 1E+3 -> 1000
dqmng461 minmag 1E+3 1000 -> 1000
dqmng462 minmag 1000 -1E+3 -> -1E+3
dqmng463 minmag 1E+3 -384 -> -384
dqmng464 minmag -384 1E+3 -> -384
dqmng465 minmag -1E+3 1000 -> -1E+3
dqmng466 minmag -384 -1E+3 -> -384
dqmng467 minmag -1E+3 -384 -> -384
-- subnormals
dqmng510 minmag 1.00E-6143 0 -> 0
dqmng511 minmag 0.1E-6143 0 -> 0
dqmng512 minmag 0.10E-6143 0 -> 0
dqmng513 minmag 0.100E-6143 0 -> 0
dqmng514 minmag 0.01E-6143 0 -> 0
dqmng515 minmag 0.999E-6143 0 -> 0
dqmng516 minmag 0.099E-6143 0 -> 0
dqmng517 minmag 0.009E-6143 0 -> 0
dqmng518 minmag 0.001E-6143 0 -> 0
dqmng519 minmag 0.0009E-6143 0 -> 0
dqmng520 minmag 0.0001E-6143 0 -> 0
dqmng530 minmag -1.00E-6143 0 -> 0
dqmng531 minmag -0.1E-6143 0 -> 0
dqmng532 minmag -0.10E-6143 0 -> 0
dqmng533 minmag -0.100E-6143 0 -> 0
dqmng534 minmag -0.01E-6143 0 -> 0
dqmng535 minmag -0.999E-6143 0 -> 0
dqmng536 minmag -0.099E-6143 0 -> 0
dqmng537 minmag -0.009E-6143 0 -> 0
dqmng538 minmag -0.001E-6143 0 -> 0
dqmng539 minmag -0.0009E-6143 0 -> 0
dqmng540 minmag -0.0001E-6143 0 -> 0
-- Null tests
dqmng900 minmag 10 # -> NaN Invalid_operation
dqmng901 minmag # 10 -> NaN Invalid_operation
------------------------------------------------------------------------
-- dqMinMag.decTest -- decQuad 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
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- sanity checks
dqmng001 minmag -2 -2 -> -2
dqmng002 minmag -2 -1 -> -1
dqmng003 minmag -2 0 -> 0
dqmng004 minmag -2 1 -> 1
dqmng005 minmag -2 2 -> -2
dqmng006 minmag -1 -2 -> -1
dqmng007 minmag -1 -1 -> -1
dqmng008 minmag -1 0 -> 0
dqmng009 minmag -1 1 -> -1
dqmng010 minmag -1 2 -> -1
dqmng011 minmag 0 -2 -> 0
dqmng012 minmag 0 -1 -> 0
dqmng013 minmag 0 0 -> 0
dqmng014 minmag 0 1 -> 0
dqmng015 minmag 0 2 -> 0
dqmng016 minmag 1 -2 -> 1
dqmng017 minmag 1 -1 -> -1
dqmng018 minmag 1 0 -> 0
dqmng019 minmag 1 1 -> 1
dqmng020 minmag 1 2 -> 1
dqmng021 minmag 2 -2 -> -2
dqmng022 minmag 2 -1 -> -1
dqmng023 minmag 2 0 -> 0
dqmng025 minmag 2 1 -> 1
dqmng026 minmag 2 2 -> 2
-- extended zeros
dqmng030 minmag 0 0 -> 0
dqmng031 minmag 0 -0 -> -0
dqmng032 minmag 0 -0.0 -> -0.0
dqmng033 minmag 0 0.0 -> 0.0
dqmng034 minmag -0 0 -> -0
dqmng035 minmag -0 -0 -> -0
dqmng036 minmag -0 -0.0 -> -0
dqmng037 minmag -0 0.0 -> -0
dqmng038 minmag 0.0 0 -> 0.0
dqmng039 minmag 0.0 -0 -> -0
dqmng040 minmag 0.0 -0.0 -> -0.0
dqmng041 minmag 0.0 0.0 -> 0.0
dqmng042 minmag -0.0 0 -> -0.0
dqmng043 minmag -0.0 -0 -> -0
dqmng044 minmag -0.0 -0.0 -> -0.0
dqmng045 minmag -0.0 0.0 -> -0.0
dqmng046 minmag 0E1 -0E1 -> -0E+1
dqmng047 minmag -0E1 0E2 -> -0E+1
dqmng048 minmag 0E2 0E1 -> 0E+1
dqmng049 minmag 0E1 0E2 -> 0E+1
dqmng050 minmag -0E3 -0E2 -> -0E+3
dqmng051 minmag -0E2 -0E3 -> -0E+3
-- Specials
dqmng090 minmag Inf -Inf -> -Infinity
dqmng091 minmag Inf -1000 -> -1000
dqmng092 minmag Inf -1 -> -1
dqmng093 minmag Inf -0 -> -0
dqmng094 minmag Inf 0 -> 0
dqmng095 minmag Inf 1 -> 1
dqmng096 minmag Inf 1000 -> 1000
dqmng097 minmag Inf Inf -> Infinity
dqmng098 minmag -1000 Inf -> -1000
dqmng099 minmag -Inf Inf -> -Infinity
dqmng100 minmag -1 Inf -> -1
dqmng101 minmag -0 Inf -> -0
dqmng102 minmag 0 Inf -> 0
dqmng103 minmag 1 Inf -> 1
dqmng104 minmag 1000 Inf -> 1000
dqmng105 minmag Inf Inf -> Infinity
dqmng120 minmag -Inf -Inf -> -Infinity
dqmng121 minmag -Inf -1000 -> -1000
dqmng122 minmag -Inf -1 -> -1
dqmng123 minmag -Inf -0 -> -0
dqmng124 minmag -Inf 0 -> 0
dqmng125 minmag -Inf 1 -> 1
dqmng126 minmag -Inf 1000 -> 1000
dqmng127 minmag -Inf Inf -> -Infinity
dqmng128 minmag -Inf -Inf -> -Infinity
dqmng129 minmag -1000 -Inf -> -1000
dqmng130 minmag -1 -Inf -> -1
dqmng131 minmag -0 -Inf -> -0
dqmng132 minmag 0 -Inf -> 0
dqmng133 minmag 1 -Inf -> 1
dqmng134 minmag 1000 -Inf -> 1000
dqmng135 minmag Inf -Inf -> -Infinity
-- 2004.08.02 754r chooses number over NaN in mixed cases
dqmng141 minmag NaN -Inf -> -Infinity
dqmng142 minmag NaN -1000 -> -1000
dqmng143 minmag NaN -1 -> -1
dqmng144 minmag NaN -0 -> -0
dqmng145 minmag NaN 0 -> 0
dqmng146 minmag NaN 1 -> 1
dqmng147 minmag NaN 1000 -> 1000
dqmng148 minmag NaN Inf -> Infinity
dqmng149 minmag NaN NaN -> NaN
dqmng150 minmag -Inf NaN -> -Infinity
dqmng151 minmag -1000 NaN -> -1000
dqmng152 minmag -1 -NaN -> -1
dqmng153 minmag -0 NaN -> -0
dqmng154 minmag 0 -NaN -> 0
dqmng155 minmag 1 NaN -> 1
dqmng156 minmag 1000 NaN -> 1000
dqmng157 minmag Inf NaN -> Infinity
dqmng161 minmag sNaN -Inf -> NaN Invalid_operation
dqmng162 minmag sNaN -1000 -> NaN Invalid_operation
dqmng163 minmag sNaN -1 -> NaN Invalid_operation
dqmng164 minmag sNaN -0 -> NaN Invalid_operation
dqmng165 minmag -sNaN 0 -> -NaN Invalid_operation
dqmng166 minmag -sNaN 1 -> -NaN Invalid_operation
dqmng167 minmag sNaN 1000 -> NaN Invalid_operation
dqmng168 minmag sNaN NaN -> NaN Invalid_operation
dqmng169 minmag sNaN sNaN -> NaN Invalid_operation
dqmng170 minmag NaN sNaN -> NaN Invalid_operation
dqmng171 minmag -Inf sNaN -> NaN Invalid_operation
dqmng172 minmag -1000 sNaN -> NaN Invalid_operation
dqmng173 minmag -1 sNaN -> NaN Invalid_operation
dqmng174 minmag -0 sNaN -> NaN Invalid_operation
dqmng175 minmag 0 sNaN -> NaN Invalid_operation
dqmng176 minmag 1 sNaN -> NaN Invalid_operation
dqmng177 minmag 1000 sNaN -> NaN Invalid_operation
dqmng178 minmag Inf sNaN -> NaN Invalid_operation
dqmng179 minmag NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqmng181 minmag NaN9 -Inf -> -Infinity
dqmng182 minmag -NaN8 9990 -> 9990
dqmng183 minmag NaN71 Inf -> Infinity
dqmng184 minmag NaN1 NaN54 -> NaN1
dqmng185 minmag NaN22 -NaN53 -> NaN22
dqmng186 minmag -NaN3 NaN6 -> -NaN3
dqmng187 minmag -NaN44 NaN7 -> -NaN44
dqmng188 minmag -Inf NaN41 -> -Infinity
dqmng189 minmag -9999 -NaN33 -> -9999
dqmng190 minmag Inf NaN2 -> Infinity
dqmng191 minmag sNaN99 -Inf -> NaN99 Invalid_operation
dqmng192 minmag sNaN98 -11 -> NaN98 Invalid_operation
dqmng193 minmag -sNaN97 NaN8 -> -NaN97 Invalid_operation
dqmng194 minmag sNaN69 sNaN94 -> NaN69 Invalid_operation
dqmng195 minmag NaN95 sNaN93 -> NaN93 Invalid_operation
dqmng196 minmag -Inf sNaN92 -> NaN92 Invalid_operation
dqmng197 minmag 088 sNaN91 -> NaN91 Invalid_operation
dqmng198 minmag Inf -sNaN90 -> -NaN90 Invalid_operation
dqmng199 minmag NaN sNaN86 -> NaN86 Invalid_operation
-- old rounding checks
dqmng221 minmag -12345678000 1 -> 1
dqmng222 minmag 1 -12345678000 -> 1
dqmng223 minmag -1234567800 1 -> 1
dqmng224 minmag 1 -1234567800 -> 1
dqmng225 minmag -1234567890 1 -> 1
dqmng226 minmag 1 -1234567890 -> 1
dqmng227 minmag -1234567891 1 -> 1
dqmng228 minmag 1 -1234567891 -> 1
dqmng229 minmag -12345678901 1 -> 1
dqmng230 minmag 1 -12345678901 -> 1
dqmng231 minmag -1234567896 1 -> 1
dqmng232 minmag 1 -1234567896 -> 1
dqmng233 minmag 1234567891 1 -> 1
dqmng234 minmag 1 1234567891 -> 1
dqmng235 minmag 12345678901 1 -> 1
dqmng236 minmag 1 12345678901 -> 1
dqmng237 minmag 1234567896 1 -> 1
dqmng238 minmag 1 1234567896 -> 1
-- from examples
dqmng280 minmag '3' '2' -> '2'
dqmng281 minmag '-10' '3' -> '3'
dqmng282 minmag '1.0' '1' -> '1.0'
dqmng283 minmag '1' '1.0' -> '1.0'
dqmng284 minmag '7' 'NaN' -> '7'
-- expanded list from min/max 754r purple prose
-- [explicit tests for exponent ordering]
dqmng401 minmag Inf 1.1 -> 1.1
dqmng402 minmag 1.1 1 -> 1
dqmng403 minmag 1 1.0 -> 1.0
dqmng404 minmag 1.0 0.1 -> 0.1
dqmng405 minmag 0.1 0.10 -> 0.10
dqmng406 minmag 0.10 0.100 -> 0.100
dqmng407 minmag 0.10 0 -> 0
dqmng408 minmag 0 0.0 -> 0.0
dqmng409 minmag 0.0 -0 -> -0
dqmng410 minmag 0.0 -0.0 -> -0.0
dqmng411 minmag 0.00 -0.0 -> -0.0
dqmng412 minmag 0.0 -0.00 -> -0.00
dqmng413 minmag 0 -0.0 -> -0.0
dqmng414 minmag 0 -0 -> -0
dqmng415 minmag -0.0 -0 -> -0
dqmng416 minmag -0 -0.100 -> -0
dqmng417 minmag -0.100 -0.10 -> -0.10
dqmng418 minmag -0.10 -0.1 -> -0.1
dqmng419 minmag -0.1 -1.0 -> -0.1
dqmng420 minmag -1.0 -1 -> -1
dqmng421 minmag -1 -1.1 -> -1
dqmng423 minmag -1.1 -Inf -> -1.1
-- same with operands reversed
dqmng431 minmag 1.1 Inf -> 1.1
dqmng432 minmag 1 1.1 -> 1
dqmng433 minmag 1.0 1 -> 1.0
dqmng434 minmag 0.1 1.0 -> 0.1
dqmng435 minmag 0.10 0.1 -> 0.10
dqmng436 minmag 0.100 0.10 -> 0.100
dqmng437 minmag 0 0.10 -> 0
dqmng438 minmag 0.0 0 -> 0.0
dqmng439 minmag -0 0.0 -> -0
dqmng440 minmag -0.0 0.0 -> -0.0
dqmng441 minmag -0.0 0.00 -> -0.0
dqmng442 minmag -0.00 0.0 -> -0.00
dqmng443 minmag -0.0 0 -> -0.0
dqmng444 minmag -0 0 -> -0
dqmng445 minmag -0 -0.0 -> -0
dqmng446 minmag -0.100 -0 -> -0
dqmng447 minmag -0.10 -0.100 -> -0.10
dqmng448 minmag -0.1 -0.10 -> -0.1
dqmng449 minmag -1.0 -0.1 -> -0.1
dqmng450 minmag -1 -1.0 -> -1
dqmng451 minmag -1.1 -1 -> -1
dqmng453 minmag -Inf -1.1 -> -1.1
-- largies
dqmng460 minmag 1000 1E+3 -> 1000
dqmng461 minmag 1E+3 1000 -> 1000
dqmng462 minmag 1000 -1E+3 -> -1E+3
dqmng463 minmag 1E+3 -384 -> -384
dqmng464 minmag -384 1E+3 -> -384
dqmng465 minmag -1E+3 1000 -> -1E+3
dqmng466 minmag -384 -1E+3 -> -384
dqmng467 minmag -1E+3 -384 -> -384
-- subnormals
dqmng510 minmag 1.00E-6143 0 -> 0
dqmng511 minmag 0.1E-6143 0 -> 0
dqmng512 minmag 0.10E-6143 0 -> 0
dqmng513 minmag 0.100E-6143 0 -> 0
dqmng514 minmag 0.01E-6143 0 -> 0
dqmng515 minmag 0.999E-6143 0 -> 0
dqmng516 minmag 0.099E-6143 0 -> 0
dqmng517 minmag 0.009E-6143 0 -> 0
dqmng518 minmag 0.001E-6143 0 -> 0
dqmng519 minmag 0.0009E-6143 0 -> 0
dqmng520 minmag 0.0001E-6143 0 -> 0
dqmng530 minmag -1.00E-6143 0 -> 0
dqmng531 minmag -0.1E-6143 0 -> 0
dqmng532 minmag -0.10E-6143 0 -> 0
dqmng533 minmag -0.100E-6143 0 -> 0
dqmng534 minmag -0.01E-6143 0 -> 0
dqmng535 minmag -0.999E-6143 0 -> 0
dqmng536 minmag -0.099E-6143 0 -> 0
dqmng537 minmag -0.009E-6143 0 -> 0
dqmng538 minmag -0.001E-6143 0 -> 0
dqmng539 minmag -0.0009E-6143 0 -> 0
dqmng540 minmag -0.0001E-6143 0 -> 0
-- Null tests
dqmng900 minmag 10 # -> NaN Invalid_operation
dqmng901 minmag # 10 -> NaN Invalid_operation

View file

@ -1,88 +1,88 @@
------------------------------------------------------------------------
-- dqMinus.decTest -- decQuad 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 decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check
dqmns001 minus +7.50 -> -7.50
-- Infinities
dqmns011 minus Infinity -> -Infinity
dqmns012 minus -Infinity -> Infinity
-- NaNs, 0 payload
dqmns021 minus NaN -> NaN
dqmns022 minus -NaN -> -NaN
dqmns023 minus sNaN -> NaN Invalid_operation
dqmns024 minus -sNaN -> -NaN Invalid_operation
-- NaNs, non-0 payload
dqmns031 minus NaN13 -> NaN13
dqmns032 minus -NaN13 -> -NaN13
dqmns033 minus sNaN13 -> NaN13 Invalid_operation
dqmns034 minus -sNaN13 -> -NaN13 Invalid_operation
dqmns035 minus NaN70 -> NaN70
dqmns036 minus -NaN70 -> -NaN70
dqmns037 minus sNaN101 -> NaN101 Invalid_operation
dqmns038 minus -sNaN101 -> -NaN101 Invalid_operation
-- finites
dqmns101 minus 7 -> -7
dqmns102 minus -7 -> 7
dqmns103 minus 75 -> -75
dqmns104 minus -75 -> 75
dqmns105 minus 7.50 -> -7.50
dqmns106 minus -7.50 -> 7.50
dqmns107 minus 7.500 -> -7.500
dqmns108 minus -7.500 -> 7.500
-- zeros
dqmns111 minus 0 -> 0
dqmns112 minus -0 -> 0
dqmns113 minus 0E+4 -> 0E+4
dqmns114 minus -0E+4 -> 0E+4
dqmns115 minus 0.0000 -> 0.0000
dqmns116 minus -0.0000 -> 0.0000
dqmns117 minus 0E-141 -> 0E-141
dqmns118 minus -0E-141 -> 0E-141
-- full coefficients, alternating bits
dqmns121 minus 2682682682682682682682682682682682 -> -2682682682682682682682682682682682
dqmns122 minus -2682682682682682682682682682682682 -> 2682682682682682682682682682682682
dqmns123 minus 1341341341341341341341341341341341 -> -1341341341341341341341341341341341
dqmns124 minus -1341341341341341341341341341341341 -> 1341341341341341341341341341341341
-- Nmax, Nmin, Ntiny
dqmns131 minus 9.999999999999999999999999999999999E+6144 -> -9.999999999999999999999999999999999E+6144
dqmns132 minus 1E-6143 -> -1E-6143
dqmns133 minus 1.000000000000000000000000000000000E-6143 -> -1.000000000000000000000000000000000E-6143
dqmns134 minus 1E-6176 -> -1E-6176 Subnormal
dqmns135 minus -1E-6176 -> 1E-6176 Subnormal
dqmns136 minus -1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
dqmns137 minus -1E-6143 -> 1E-6143
dqmns138 minus -9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144
------------------------------------------------------------------------
-- dqMinus.decTest -- decQuad 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 decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check
dqmns001 minus +7.50 -> -7.50
-- Infinities
dqmns011 minus Infinity -> -Infinity
dqmns012 minus -Infinity -> Infinity
-- NaNs, 0 payload
dqmns021 minus NaN -> NaN
dqmns022 minus -NaN -> -NaN
dqmns023 minus sNaN -> NaN Invalid_operation
dqmns024 minus -sNaN -> -NaN Invalid_operation
-- NaNs, non-0 payload
dqmns031 minus NaN13 -> NaN13
dqmns032 minus -NaN13 -> -NaN13
dqmns033 minus sNaN13 -> NaN13 Invalid_operation
dqmns034 minus -sNaN13 -> -NaN13 Invalid_operation
dqmns035 minus NaN70 -> NaN70
dqmns036 minus -NaN70 -> -NaN70
dqmns037 minus sNaN101 -> NaN101 Invalid_operation
dqmns038 minus -sNaN101 -> -NaN101 Invalid_operation
-- finites
dqmns101 minus 7 -> -7
dqmns102 minus -7 -> 7
dqmns103 minus 75 -> -75
dqmns104 minus -75 -> 75
dqmns105 minus 7.50 -> -7.50
dqmns106 minus -7.50 -> 7.50
dqmns107 minus 7.500 -> -7.500
dqmns108 minus -7.500 -> 7.500
-- zeros
dqmns111 minus 0 -> 0
dqmns112 minus -0 -> 0
dqmns113 minus 0E+4 -> 0E+4
dqmns114 minus -0E+4 -> 0E+4
dqmns115 minus 0.0000 -> 0.0000
dqmns116 minus -0.0000 -> 0.0000
dqmns117 minus 0E-141 -> 0E-141
dqmns118 minus -0E-141 -> 0E-141
-- full coefficients, alternating bits
dqmns121 minus 2682682682682682682682682682682682 -> -2682682682682682682682682682682682
dqmns122 minus -2682682682682682682682682682682682 -> 2682682682682682682682682682682682
dqmns123 minus 1341341341341341341341341341341341 -> -1341341341341341341341341341341341
dqmns124 minus -1341341341341341341341341341341341 -> 1341341341341341341341341341341341
-- Nmax, Nmin, Ntiny
dqmns131 minus 9.999999999999999999999999999999999E+6144 -> -9.999999999999999999999999999999999E+6144
dqmns132 minus 1E-6143 -> -1E-6143
dqmns133 minus 1.000000000000000000000000000000000E-6143 -> -1.000000000000000000000000000000000E-6143
dqmns134 minus 1E-6176 -> -1E-6176 Subnormal
dqmns135 minus -1E-6176 -> 1E-6176 Subnormal
dqmns136 minus -1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
dqmns137 minus -1E-6143 -> 1E-6143
dqmns138 minus -9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144

File diff suppressed because it is too large Load diff

View file

@ -1,126 +1,126 @@
------------------------------------------------------------------------
-- dqNextMinus.decTest -- decQuad next that is less [754r nextdown] --
-- 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 decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
dqnextm001 nextminus 0.9999999999999999999999999999999995 -> 0.9999999999999999999999999999999994
dqnextm002 nextminus 0.9999999999999999999999999999999996 -> 0.9999999999999999999999999999999995
dqnextm003 nextminus 0.9999999999999999999999999999999997 -> 0.9999999999999999999999999999999996
dqnextm004 nextminus 0.9999999999999999999999999999999998 -> 0.9999999999999999999999999999999997
dqnextm005 nextminus 0.9999999999999999999999999999999999 -> 0.9999999999999999999999999999999998
dqnextm006 nextminus 1.000000000000000000000000000000000 -> 0.9999999999999999999999999999999999
dqnextm007 nextminus 1.0 -> 0.9999999999999999999999999999999999
dqnextm008 nextminus 1 -> 0.9999999999999999999999999999999999
dqnextm009 nextminus 1.000000000000000000000000000000001 -> 1.000000000000000000000000000000000
dqnextm010 nextminus 1.000000000000000000000000000000002 -> 1.000000000000000000000000000000001
dqnextm011 nextminus 1.000000000000000000000000000000003 -> 1.000000000000000000000000000000002
dqnextm012 nextminus 1.000000000000000000000000000000004 -> 1.000000000000000000000000000000003
dqnextm013 nextminus 1.000000000000000000000000000000005 -> 1.000000000000000000000000000000004
dqnextm014 nextminus 1.000000000000000000000000000000006 -> 1.000000000000000000000000000000005
dqnextm015 nextminus 1.000000000000000000000000000000007 -> 1.000000000000000000000000000000006
dqnextm016 nextminus 1.000000000000000000000000000000008 -> 1.000000000000000000000000000000007
dqnextm017 nextminus 1.000000000000000000000000000000009 -> 1.000000000000000000000000000000008
dqnextm018 nextminus 1.000000000000000000000000000000010 -> 1.000000000000000000000000000000009
dqnextm019 nextminus 1.000000000000000000000000000000011 -> 1.000000000000000000000000000000010
dqnextm020 nextminus 1.000000000000000000000000000000012 -> 1.000000000000000000000000000000011
dqnextm021 nextminus -0.9999999999999999999999999999999995 -> -0.9999999999999999999999999999999996
dqnextm022 nextminus -0.9999999999999999999999999999999996 -> -0.9999999999999999999999999999999997
dqnextm023 nextminus -0.9999999999999999999999999999999997 -> -0.9999999999999999999999999999999998
dqnextm024 nextminus -0.9999999999999999999999999999999998 -> -0.9999999999999999999999999999999999
dqnextm025 nextminus -0.9999999999999999999999999999999999 -> -1.000000000000000000000000000000000
dqnextm026 nextminus -1.000000000000000000000000000000000 -> -1.000000000000000000000000000000001
dqnextm027 nextminus -1.0 -> -1.000000000000000000000000000000001
dqnextm028 nextminus -1 -> -1.000000000000000000000000000000001
dqnextm029 nextminus -1.000000000000000000000000000000001 -> -1.000000000000000000000000000000002
dqnextm030 nextminus -1.000000000000000000000000000000002 -> -1.000000000000000000000000000000003
dqnextm031 nextminus -1.000000000000000000000000000000003 -> -1.000000000000000000000000000000004
dqnextm032 nextminus -1.000000000000000000000000000000004 -> -1.000000000000000000000000000000005
dqnextm033 nextminus -1.000000000000000000000000000000005 -> -1.000000000000000000000000000000006
dqnextm034 nextminus -1.000000000000000000000000000000006 -> -1.000000000000000000000000000000007
dqnextm035 nextminus -1.000000000000000000000000000000007 -> -1.000000000000000000000000000000008
dqnextm036 nextminus -1.000000000000000000000000000000008 -> -1.000000000000000000000000000000009
dqnextm037 nextminus -1.000000000000000000000000000000009 -> -1.000000000000000000000000000000010
dqnextm038 nextminus -1.000000000000000000000000000000010 -> -1.000000000000000000000000000000011
dqnextm039 nextminus -1.000000000000000000000000000000011 -> -1.000000000000000000000000000000012
-- ultra-tiny inputs
dqnextm062 nextminus 1E-6176 -> 0E-6176
dqnextm065 nextminus -1E-6176 -> -2E-6176
-- Zeros
dqnextm100 nextminus -0 -> -1E-6176
dqnextm101 nextminus 0 -> -1E-6176
dqnextm102 nextminus 0.00 -> -1E-6176
dqnextm103 nextminus -0.00 -> -1E-6176
dqnextm104 nextminus 0E-300 -> -1E-6176
dqnextm105 nextminus 0E+300 -> -1E-6176
dqnextm106 nextminus 0E+30000 -> -1E-6176
dqnextm107 nextminus -0E+30000 -> -1E-6176
-- specials
dqnextm150 nextminus Inf -> 9.999999999999999999999999999999999E+6144
dqnextm151 nextminus -Inf -> -Infinity
dqnextm152 nextminus NaN -> NaN
dqnextm153 nextminus sNaN -> NaN Invalid_operation
dqnextm154 nextminus NaN77 -> NaN77
dqnextm155 nextminus sNaN88 -> NaN88 Invalid_operation
dqnextm156 nextminus -NaN -> -NaN
dqnextm157 nextminus -sNaN -> -NaN Invalid_operation
dqnextm158 nextminus -NaN77 -> -NaN77
dqnextm159 nextminus -sNaN88 -> -NaN88 Invalid_operation
-- Nmax, Nmin, Ntiny, subnormals
dqnextm170 nextminus 9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999998E+6144
dqnextm171 nextminus 9.999999999999999999999999999999998E+6144 -> 9.999999999999999999999999999999997E+6144
dqnextm172 nextminus 1E-6143 -> 9.99999999999999999999999999999999E-6144
dqnextm173 nextminus 1.000000000000000000000000000000000E-6143 -> 9.99999999999999999999999999999999E-6144
dqnextm174 nextminus 9E-6176 -> 8E-6176
dqnextm175 nextminus 9.9E-6175 -> 9.8E-6175
dqnextm176 nextminus 9.99999999999999999999999999999E-6147 -> 9.99999999999999999999999999998E-6147
dqnextm177 nextminus 9.99999999999999999999999999999999E-6144 -> 9.99999999999999999999999999999998E-6144
dqnextm178 nextminus 9.99999999999999999999999999999998E-6144 -> 9.99999999999999999999999999999997E-6144
dqnextm179 nextminus 9.99999999999999999999999999999997E-6144 -> 9.99999999999999999999999999999996E-6144
dqnextm180 nextminus 0E-6176 -> -1E-6176
dqnextm181 nextminus 1E-6176 -> 0E-6176
dqnextm182 nextminus 2E-6176 -> 1E-6176
dqnextm183 nextminus -0E-6176 -> -1E-6176
dqnextm184 nextminus -1E-6176 -> -2E-6176
dqnextm185 nextminus -2E-6176 -> -3E-6176
dqnextm186 nextminus -10E-6176 -> -1.1E-6175
dqnextm187 nextminus -100E-6176 -> -1.01E-6174
dqnextm188 nextminus -100000E-6176 -> -1.00001E-6171
dqnextm189 nextminus -1.00000000000000000000000000000E-6143 -> -1.000000000000000000000000000000001E-6143
dqnextm190 nextminus -1.000000000000000000000000000000000E-6143 -> -1.000000000000000000000000000000001E-6143
dqnextm191 nextminus -1E-6143 -> -1.000000000000000000000000000000001E-6143
dqnextm192 nextminus -9.999999999999999999999999999999998E+6144 -> -9.999999999999999999999999999999999E+6144
dqnextm193 nextminus -9.999999999999999999999999999999999E+6144 -> -Infinity
-- Null tests
dqnextm900 nextminus # -> NaN Invalid_operation
------------------------------------------------------------------------
-- dqNextMinus.decTest -- decQuad next that is less [754r nextdown] --
-- 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 decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
dqnextm001 nextminus 0.9999999999999999999999999999999995 -> 0.9999999999999999999999999999999994
dqnextm002 nextminus 0.9999999999999999999999999999999996 -> 0.9999999999999999999999999999999995
dqnextm003 nextminus 0.9999999999999999999999999999999997 -> 0.9999999999999999999999999999999996
dqnextm004 nextminus 0.9999999999999999999999999999999998 -> 0.9999999999999999999999999999999997
dqnextm005 nextminus 0.9999999999999999999999999999999999 -> 0.9999999999999999999999999999999998
dqnextm006 nextminus 1.000000000000000000000000000000000 -> 0.9999999999999999999999999999999999
dqnextm007 nextminus 1.0 -> 0.9999999999999999999999999999999999
dqnextm008 nextminus 1 -> 0.9999999999999999999999999999999999
dqnextm009 nextminus 1.000000000000000000000000000000001 -> 1.000000000000000000000000000000000
dqnextm010 nextminus 1.000000000000000000000000000000002 -> 1.000000000000000000000000000000001
dqnextm011 nextminus 1.000000000000000000000000000000003 -> 1.000000000000000000000000000000002
dqnextm012 nextminus 1.000000000000000000000000000000004 -> 1.000000000000000000000000000000003
dqnextm013 nextminus 1.000000000000000000000000000000005 -> 1.000000000000000000000000000000004
dqnextm014 nextminus 1.000000000000000000000000000000006 -> 1.000000000000000000000000000000005
dqnextm015 nextminus 1.000000000000000000000000000000007 -> 1.000000000000000000000000000000006
dqnextm016 nextminus 1.000000000000000000000000000000008 -> 1.000000000000000000000000000000007
dqnextm017 nextminus 1.000000000000000000000000000000009 -> 1.000000000000000000000000000000008
dqnextm018 nextminus 1.000000000000000000000000000000010 -> 1.000000000000000000000000000000009
dqnextm019 nextminus 1.000000000000000000000000000000011 -> 1.000000000000000000000000000000010
dqnextm020 nextminus 1.000000000000000000000000000000012 -> 1.000000000000000000000000000000011
dqnextm021 nextminus -0.9999999999999999999999999999999995 -> -0.9999999999999999999999999999999996
dqnextm022 nextminus -0.9999999999999999999999999999999996 -> -0.9999999999999999999999999999999997
dqnextm023 nextminus -0.9999999999999999999999999999999997 -> -0.9999999999999999999999999999999998
dqnextm024 nextminus -0.9999999999999999999999999999999998 -> -0.9999999999999999999999999999999999
dqnextm025 nextminus -0.9999999999999999999999999999999999 -> -1.000000000000000000000000000000000
dqnextm026 nextminus -1.000000000000000000000000000000000 -> -1.000000000000000000000000000000001
dqnextm027 nextminus -1.0 -> -1.000000000000000000000000000000001
dqnextm028 nextminus -1 -> -1.000000000000000000000000000000001
dqnextm029 nextminus -1.000000000000000000000000000000001 -> -1.000000000000000000000000000000002
dqnextm030 nextminus -1.000000000000000000000000000000002 -> -1.000000000000000000000000000000003
dqnextm031 nextminus -1.000000000000000000000000000000003 -> -1.000000000000000000000000000000004
dqnextm032 nextminus -1.000000000000000000000000000000004 -> -1.000000000000000000000000000000005
dqnextm033 nextminus -1.000000000000000000000000000000005 -> -1.000000000000000000000000000000006
dqnextm034 nextminus -1.000000000000000000000000000000006 -> -1.000000000000000000000000000000007
dqnextm035 nextminus -1.000000000000000000000000000000007 -> -1.000000000000000000000000000000008
dqnextm036 nextminus -1.000000000000000000000000000000008 -> -1.000000000000000000000000000000009
dqnextm037 nextminus -1.000000000000000000000000000000009 -> -1.000000000000000000000000000000010
dqnextm038 nextminus -1.000000000000000000000000000000010 -> -1.000000000000000000000000000000011
dqnextm039 nextminus -1.000000000000000000000000000000011 -> -1.000000000000000000000000000000012
-- ultra-tiny inputs
dqnextm062 nextminus 1E-6176 -> 0E-6176
dqnextm065 nextminus -1E-6176 -> -2E-6176
-- Zeros
dqnextm100 nextminus -0 -> -1E-6176
dqnextm101 nextminus 0 -> -1E-6176
dqnextm102 nextminus 0.00 -> -1E-6176
dqnextm103 nextminus -0.00 -> -1E-6176
dqnextm104 nextminus 0E-300 -> -1E-6176
dqnextm105 nextminus 0E+300 -> -1E-6176
dqnextm106 nextminus 0E+30000 -> -1E-6176
dqnextm107 nextminus -0E+30000 -> -1E-6176
-- specials
dqnextm150 nextminus Inf -> 9.999999999999999999999999999999999E+6144
dqnextm151 nextminus -Inf -> -Infinity
dqnextm152 nextminus NaN -> NaN
dqnextm153 nextminus sNaN -> NaN Invalid_operation
dqnextm154 nextminus NaN77 -> NaN77
dqnextm155 nextminus sNaN88 -> NaN88 Invalid_operation
dqnextm156 nextminus -NaN -> -NaN
dqnextm157 nextminus -sNaN -> -NaN Invalid_operation
dqnextm158 nextminus -NaN77 -> -NaN77
dqnextm159 nextminus -sNaN88 -> -NaN88 Invalid_operation
-- Nmax, Nmin, Ntiny, subnormals
dqnextm170 nextminus 9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999998E+6144
dqnextm171 nextminus 9.999999999999999999999999999999998E+6144 -> 9.999999999999999999999999999999997E+6144
dqnextm172 nextminus 1E-6143 -> 9.99999999999999999999999999999999E-6144
dqnextm173 nextminus 1.000000000000000000000000000000000E-6143 -> 9.99999999999999999999999999999999E-6144
dqnextm174 nextminus 9E-6176 -> 8E-6176
dqnextm175 nextminus 9.9E-6175 -> 9.8E-6175
dqnextm176 nextminus 9.99999999999999999999999999999E-6147 -> 9.99999999999999999999999999998E-6147
dqnextm177 nextminus 9.99999999999999999999999999999999E-6144 -> 9.99999999999999999999999999999998E-6144
dqnextm178 nextminus 9.99999999999999999999999999999998E-6144 -> 9.99999999999999999999999999999997E-6144
dqnextm179 nextminus 9.99999999999999999999999999999997E-6144 -> 9.99999999999999999999999999999996E-6144
dqnextm180 nextminus 0E-6176 -> -1E-6176
dqnextm181 nextminus 1E-6176 -> 0E-6176
dqnextm182 nextminus 2E-6176 -> 1E-6176
dqnextm183 nextminus -0E-6176 -> -1E-6176
dqnextm184 nextminus -1E-6176 -> -2E-6176
dqnextm185 nextminus -2E-6176 -> -3E-6176
dqnextm186 nextminus -10E-6176 -> -1.1E-6175
dqnextm187 nextminus -100E-6176 -> -1.01E-6174
dqnextm188 nextminus -100000E-6176 -> -1.00001E-6171
dqnextm189 nextminus -1.00000000000000000000000000000E-6143 -> -1.000000000000000000000000000000001E-6143
dqnextm190 nextminus -1.000000000000000000000000000000000E-6143 -> -1.000000000000000000000000000000001E-6143
dqnextm191 nextminus -1E-6143 -> -1.000000000000000000000000000000001E-6143
dqnextm192 nextminus -9.999999999999999999999999999999998E+6144 -> -9.999999999999999999999999999999999E+6144
dqnextm193 nextminus -9.999999999999999999999999999999999E+6144 -> -Infinity
-- Null tests
dqnextm900 nextminus # -> NaN Invalid_operation

View file

@ -1,124 +1,124 @@
------------------------------------------------------------------------
-- dqNextPlus.decTest -- decQuad next that is greater [754r nextup] --
-- 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 decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
dqnextp001 nextplus 0.9999999999999999999999999999999995 -> 0.9999999999999999999999999999999996
dqnextp002 nextplus 0.9999999999999999999999999999999996 -> 0.9999999999999999999999999999999997
dqnextp003 nextplus 0.9999999999999999999999999999999997 -> 0.9999999999999999999999999999999998
dqnextp004 nextplus 0.9999999999999999999999999999999998 -> 0.9999999999999999999999999999999999
dqnextp005 nextplus 0.9999999999999999999999999999999999 -> 1.000000000000000000000000000000000
dqnextp006 nextplus 1.000000000000000000000000000000000 -> 1.000000000000000000000000000000001
dqnextp007 nextplus 1.0 -> 1.000000000000000000000000000000001
dqnextp008 nextplus 1 -> 1.000000000000000000000000000000001
dqnextp009 nextplus 1.000000000000000000000000000000001 -> 1.000000000000000000000000000000002
dqnextp010 nextplus 1.000000000000000000000000000000002 -> 1.000000000000000000000000000000003
dqnextp011 nextplus 1.000000000000000000000000000000003 -> 1.000000000000000000000000000000004
dqnextp012 nextplus 1.000000000000000000000000000000004 -> 1.000000000000000000000000000000005
dqnextp013 nextplus 1.000000000000000000000000000000005 -> 1.000000000000000000000000000000006
dqnextp014 nextplus 1.000000000000000000000000000000006 -> 1.000000000000000000000000000000007
dqnextp015 nextplus 1.000000000000000000000000000000007 -> 1.000000000000000000000000000000008
dqnextp016 nextplus 1.000000000000000000000000000000008 -> 1.000000000000000000000000000000009
dqnextp017 nextplus 1.000000000000000000000000000000009 -> 1.000000000000000000000000000000010
dqnextp018 nextplus 1.000000000000000000000000000000010 -> 1.000000000000000000000000000000011
dqnextp019 nextplus 1.000000000000000000000000000000011 -> 1.000000000000000000000000000000012
dqnextp021 nextplus -0.9999999999999999999999999999999995 -> -0.9999999999999999999999999999999994
dqnextp022 nextplus -0.9999999999999999999999999999999996 -> -0.9999999999999999999999999999999995
dqnextp023 nextplus -0.9999999999999999999999999999999997 -> -0.9999999999999999999999999999999996
dqnextp024 nextplus -0.9999999999999999999999999999999998 -> -0.9999999999999999999999999999999997
dqnextp025 nextplus -0.9999999999999999999999999999999999 -> -0.9999999999999999999999999999999998
dqnextp026 nextplus -1.000000000000000000000000000000000 -> -0.9999999999999999999999999999999999
dqnextp027 nextplus -1.0 -> -0.9999999999999999999999999999999999
dqnextp028 nextplus -1 -> -0.9999999999999999999999999999999999
dqnextp029 nextplus -1.000000000000000000000000000000001 -> -1.000000000000000000000000000000000
dqnextp030 nextplus -1.000000000000000000000000000000002 -> -1.000000000000000000000000000000001
dqnextp031 nextplus -1.000000000000000000000000000000003 -> -1.000000000000000000000000000000002
dqnextp032 nextplus -1.000000000000000000000000000000004 -> -1.000000000000000000000000000000003
dqnextp033 nextplus -1.000000000000000000000000000000005 -> -1.000000000000000000000000000000004
dqnextp034 nextplus -1.000000000000000000000000000000006 -> -1.000000000000000000000000000000005
dqnextp035 nextplus -1.000000000000000000000000000000007 -> -1.000000000000000000000000000000006
dqnextp036 nextplus -1.000000000000000000000000000000008 -> -1.000000000000000000000000000000007
dqnextp037 nextplus -1.000000000000000000000000000000009 -> -1.000000000000000000000000000000008
dqnextp038 nextplus -1.000000000000000000000000000000010 -> -1.000000000000000000000000000000009
dqnextp039 nextplus -1.000000000000000000000000000000011 -> -1.000000000000000000000000000000010
dqnextp040 nextplus -1.000000000000000000000000000000012 -> -1.000000000000000000000000000000011
-- Zeros
dqnextp100 nextplus 0 -> 1E-6176
dqnextp101 nextplus 0.00 -> 1E-6176
dqnextp102 nextplus 0E-300 -> 1E-6176
dqnextp103 nextplus 0E+300 -> 1E-6176
dqnextp104 nextplus 0E+30000 -> 1E-6176
dqnextp105 nextplus -0 -> 1E-6176
dqnextp106 nextplus -0.00 -> 1E-6176
dqnextp107 nextplus -0E-300 -> 1E-6176
dqnextp108 nextplus -0E+300 -> 1E-6176
dqnextp109 nextplus -0E+30000 -> 1E-6176
-- specials
dqnextp150 nextplus Inf -> Infinity
dqnextp151 nextplus -Inf -> -9.999999999999999999999999999999999E+6144
dqnextp152 nextplus NaN -> NaN
dqnextp153 nextplus sNaN -> NaN Invalid_operation
dqnextp154 nextplus NaN77 -> NaN77
dqnextp155 nextplus sNaN88 -> NaN88 Invalid_operation
dqnextp156 nextplus -NaN -> -NaN
dqnextp157 nextplus -sNaN -> -NaN Invalid_operation
dqnextp158 nextplus -NaN77 -> -NaN77
dqnextp159 nextplus -sNaN88 -> -NaN88 Invalid_operation
-- Nmax, Nmin, Ntiny, subnormals
dqnextp170 nextplus -9.999999999999999999999999999999999E+6144 -> -9.999999999999999999999999999999998E+6144
dqnextp171 nextplus -9.999999999999999999999999999999998E+6144 -> -9.999999999999999999999999999999997E+6144
dqnextp172 nextplus -1E-6143 -> -9.99999999999999999999999999999999E-6144
dqnextp173 nextplus -1.000000000000000E-6143 -> -9.99999999999999999999999999999999E-6144
dqnextp174 nextplus -9E-6176 -> -8E-6176
dqnextp175 nextplus -9.9E-6175 -> -9.8E-6175
dqnextp176 nextplus -9.99999999999999999999999999999E-6147 -> -9.99999999999999999999999999998E-6147
dqnextp177 nextplus -9.99999999999999999999999999999999E-6144 -> -9.99999999999999999999999999999998E-6144
dqnextp178 nextplus -9.99999999999999999999999999999998E-6144 -> -9.99999999999999999999999999999997E-6144
dqnextp179 nextplus -9.99999999999999999999999999999997E-6144 -> -9.99999999999999999999999999999996E-6144
dqnextp180 nextplus -0E-6176 -> 1E-6176
dqnextp181 nextplus -1E-6176 -> -0E-6176
dqnextp182 nextplus -2E-6176 -> -1E-6176
dqnextp183 nextplus 0E-6176 -> 1E-6176
dqnextp184 nextplus 1E-6176 -> 2E-6176
dqnextp185 nextplus 2E-6176 -> 3E-6176
dqnextp186 nextplus 10E-6176 -> 1.1E-6175
dqnextp187 nextplus 100E-6176 -> 1.01E-6174
dqnextp188 nextplus 100000E-6176 -> 1.00001E-6171
dqnextp189 nextplus 1.00000000000000000000000000000E-6143 -> 1.000000000000000000000000000000001E-6143
dqnextp190 nextplus 1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000001E-6143
dqnextp191 nextplus 1E-6143 -> 1.000000000000000000000000000000001E-6143
dqnextp192 nextplus 9.999999999999999999999999999999998E+6144 -> 9.999999999999999999999999999999999E+6144
dqnextp193 nextplus 9.999999999999999999999999999999999E+6144 -> Infinity
-- Null tests
dqnextp900 nextplus # -> NaN Invalid_operation
------------------------------------------------------------------------
-- dqNextPlus.decTest -- decQuad next that is greater [754r nextup] --
-- 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 decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
dqnextp001 nextplus 0.9999999999999999999999999999999995 -> 0.9999999999999999999999999999999996
dqnextp002 nextplus 0.9999999999999999999999999999999996 -> 0.9999999999999999999999999999999997
dqnextp003 nextplus 0.9999999999999999999999999999999997 -> 0.9999999999999999999999999999999998
dqnextp004 nextplus 0.9999999999999999999999999999999998 -> 0.9999999999999999999999999999999999
dqnextp005 nextplus 0.9999999999999999999999999999999999 -> 1.000000000000000000000000000000000
dqnextp006 nextplus 1.000000000000000000000000000000000 -> 1.000000000000000000000000000000001
dqnextp007 nextplus 1.0 -> 1.000000000000000000000000000000001
dqnextp008 nextplus 1 -> 1.000000000000000000000000000000001
dqnextp009 nextplus 1.000000000000000000000000000000001 -> 1.000000000000000000000000000000002
dqnextp010 nextplus 1.000000000000000000000000000000002 -> 1.000000000000000000000000000000003
dqnextp011 nextplus 1.000000000000000000000000000000003 -> 1.000000000000000000000000000000004
dqnextp012 nextplus 1.000000000000000000000000000000004 -> 1.000000000000000000000000000000005
dqnextp013 nextplus 1.000000000000000000000000000000005 -> 1.000000000000000000000000000000006
dqnextp014 nextplus 1.000000000000000000000000000000006 -> 1.000000000000000000000000000000007
dqnextp015 nextplus 1.000000000000000000000000000000007 -> 1.000000000000000000000000000000008
dqnextp016 nextplus 1.000000000000000000000000000000008 -> 1.000000000000000000000000000000009
dqnextp017 nextplus 1.000000000000000000000000000000009 -> 1.000000000000000000000000000000010
dqnextp018 nextplus 1.000000000000000000000000000000010 -> 1.000000000000000000000000000000011
dqnextp019 nextplus 1.000000000000000000000000000000011 -> 1.000000000000000000000000000000012
dqnextp021 nextplus -0.9999999999999999999999999999999995 -> -0.9999999999999999999999999999999994
dqnextp022 nextplus -0.9999999999999999999999999999999996 -> -0.9999999999999999999999999999999995
dqnextp023 nextplus -0.9999999999999999999999999999999997 -> -0.9999999999999999999999999999999996
dqnextp024 nextplus -0.9999999999999999999999999999999998 -> -0.9999999999999999999999999999999997
dqnextp025 nextplus -0.9999999999999999999999999999999999 -> -0.9999999999999999999999999999999998
dqnextp026 nextplus -1.000000000000000000000000000000000 -> -0.9999999999999999999999999999999999
dqnextp027 nextplus -1.0 -> -0.9999999999999999999999999999999999
dqnextp028 nextplus -1 -> -0.9999999999999999999999999999999999
dqnextp029 nextplus -1.000000000000000000000000000000001 -> -1.000000000000000000000000000000000
dqnextp030 nextplus -1.000000000000000000000000000000002 -> -1.000000000000000000000000000000001
dqnextp031 nextplus -1.000000000000000000000000000000003 -> -1.000000000000000000000000000000002
dqnextp032 nextplus -1.000000000000000000000000000000004 -> -1.000000000000000000000000000000003
dqnextp033 nextplus -1.000000000000000000000000000000005 -> -1.000000000000000000000000000000004
dqnextp034 nextplus -1.000000000000000000000000000000006 -> -1.000000000000000000000000000000005
dqnextp035 nextplus -1.000000000000000000000000000000007 -> -1.000000000000000000000000000000006
dqnextp036 nextplus -1.000000000000000000000000000000008 -> -1.000000000000000000000000000000007
dqnextp037 nextplus -1.000000000000000000000000000000009 -> -1.000000000000000000000000000000008
dqnextp038 nextplus -1.000000000000000000000000000000010 -> -1.000000000000000000000000000000009
dqnextp039 nextplus -1.000000000000000000000000000000011 -> -1.000000000000000000000000000000010
dqnextp040 nextplus -1.000000000000000000000000000000012 -> -1.000000000000000000000000000000011
-- Zeros
dqnextp100 nextplus 0 -> 1E-6176
dqnextp101 nextplus 0.00 -> 1E-6176
dqnextp102 nextplus 0E-300 -> 1E-6176
dqnextp103 nextplus 0E+300 -> 1E-6176
dqnextp104 nextplus 0E+30000 -> 1E-6176
dqnextp105 nextplus -0 -> 1E-6176
dqnextp106 nextplus -0.00 -> 1E-6176
dqnextp107 nextplus -0E-300 -> 1E-6176
dqnextp108 nextplus -0E+300 -> 1E-6176
dqnextp109 nextplus -0E+30000 -> 1E-6176
-- specials
dqnextp150 nextplus Inf -> Infinity
dqnextp151 nextplus -Inf -> -9.999999999999999999999999999999999E+6144
dqnextp152 nextplus NaN -> NaN
dqnextp153 nextplus sNaN -> NaN Invalid_operation
dqnextp154 nextplus NaN77 -> NaN77
dqnextp155 nextplus sNaN88 -> NaN88 Invalid_operation
dqnextp156 nextplus -NaN -> -NaN
dqnextp157 nextplus -sNaN -> -NaN Invalid_operation
dqnextp158 nextplus -NaN77 -> -NaN77
dqnextp159 nextplus -sNaN88 -> -NaN88 Invalid_operation
-- Nmax, Nmin, Ntiny, subnormals
dqnextp170 nextplus -9.999999999999999999999999999999999E+6144 -> -9.999999999999999999999999999999998E+6144
dqnextp171 nextplus -9.999999999999999999999999999999998E+6144 -> -9.999999999999999999999999999999997E+6144
dqnextp172 nextplus -1E-6143 -> -9.99999999999999999999999999999999E-6144
dqnextp173 nextplus -1.000000000000000E-6143 -> -9.99999999999999999999999999999999E-6144
dqnextp174 nextplus -9E-6176 -> -8E-6176
dqnextp175 nextplus -9.9E-6175 -> -9.8E-6175
dqnextp176 nextplus -9.99999999999999999999999999999E-6147 -> -9.99999999999999999999999999998E-6147
dqnextp177 nextplus -9.99999999999999999999999999999999E-6144 -> -9.99999999999999999999999999999998E-6144
dqnextp178 nextplus -9.99999999999999999999999999999998E-6144 -> -9.99999999999999999999999999999997E-6144
dqnextp179 nextplus -9.99999999999999999999999999999997E-6144 -> -9.99999999999999999999999999999996E-6144
dqnextp180 nextplus -0E-6176 -> 1E-6176
dqnextp181 nextplus -1E-6176 -> -0E-6176
dqnextp182 nextplus -2E-6176 -> -1E-6176
dqnextp183 nextplus 0E-6176 -> 1E-6176
dqnextp184 nextplus 1E-6176 -> 2E-6176
dqnextp185 nextplus 2E-6176 -> 3E-6176
dqnextp186 nextplus 10E-6176 -> 1.1E-6175
dqnextp187 nextplus 100E-6176 -> 1.01E-6174
dqnextp188 nextplus 100000E-6176 -> 1.00001E-6171
dqnextp189 nextplus 1.00000000000000000000000000000E-6143 -> 1.000000000000000000000000000000001E-6143
dqnextp190 nextplus 1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000001E-6143
dqnextp191 nextplus 1E-6143 -> 1.000000000000000000000000000000001E-6143
dqnextp192 nextplus 9.999999999999999999999999999999998E+6144 -> 9.999999999999999999999999999999999E+6144
dqnextp193 nextplus 9.999999999999999999999999999999999E+6144 -> Infinity
-- Null tests
dqnextp900 nextplus # -> NaN Invalid_operation

View file

@ -1,375 +1,375 @@
------------------------------------------------------------------------
-- dqNextToward.decTest -- decQuad next toward rhs [754r nextafter] --
-- 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 decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check with a scattering of numerics
dqnextt001 nexttoward 10 10 -> 10
dqnextt002 nexttoward -10 -10 -> -10
dqnextt003 nexttoward 1 10 -> 1.000000000000000000000000000000001
dqnextt004 nexttoward 1 -10 -> 0.9999999999999999999999999999999999
dqnextt005 nexttoward -1 10 -> -0.9999999999999999999999999999999999
dqnextt006 nexttoward -1 -10 -> -1.000000000000000000000000000000001
dqnextt007 nexttoward 0 10 -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt008 nexttoward 0 -10 -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt009 nexttoward 9.999999999999999999999999999999999E+6144 +Infinity -> Infinity Overflow Inexact Rounded
dqnextt010 nexttoward -9.999999999999999999999999999999999E+6144 -Infinity -> -Infinity Overflow Inexact Rounded
dqnextt011 nexttoward 9.999999999999999999999999999999999 10 -> 10.00000000000000000000000000000000
dqnextt012 nexttoward 10 9.999999999999999999999999999999999 -> 9.999999999999999999999999999999999
dqnextt013 nexttoward -9.999999999999999999999999999999999 -10 -> -10.00000000000000000000000000000000
dqnextt014 nexttoward -10 -9.999999999999999999999999999999999 -> -9.999999999999999999999999999999999
dqnextt015 nexttoward 9.999999999999999999999999999999998 10 -> 9.999999999999999999999999999999999
dqnextt016 nexttoward 10 9.999999999999999999999999999999998 -> 9.999999999999999999999999999999999
dqnextt017 nexttoward -9.999999999999999999999999999999998 -10 -> -9.999999999999999999999999999999999
dqnextt018 nexttoward -10 -9.999999999999999999999999999999998 -> -9.999999999999999999999999999999999
------- lhs=rhs
-- finites
dqnextt101 nexttoward 7 7 -> 7
dqnextt102 nexttoward -7 -7 -> -7
dqnextt103 nexttoward 75 75 -> 75
dqnextt104 nexttoward -75 -75 -> -75
dqnextt105 nexttoward 7.50 7.5 -> 7.50
dqnextt106 nexttoward -7.50 -7.50 -> -7.50
dqnextt107 nexttoward 7.500 7.5000 -> 7.500
dqnextt108 nexttoward -7.500 -7.5 -> -7.500
-- zeros
dqnextt111 nexttoward 0 0 -> 0
dqnextt112 nexttoward -0 -0 -> -0
dqnextt113 nexttoward 0E+4 0 -> 0E+4
dqnextt114 nexttoward -0E+4 -0 -> -0E+4
dqnextt115 nexttoward 0.00000000000 0.000000000000 -> 0E-11
dqnextt116 nexttoward -0.00000000000 -0.00 -> -0E-11
dqnextt117 nexttoward 0E-141 0 -> 0E-141
dqnextt118 nexttoward -0E-141 -000 -> -0E-141
-- full coefficients, alternating bits
dqnextt121 nexttoward 268268268 268268268 -> 268268268
dqnextt122 nexttoward -268268268 -268268268 -> -268268268
dqnextt123 nexttoward 134134134 134134134 -> 134134134
dqnextt124 nexttoward -134134134 -134134134 -> -134134134
-- Nmax, Nmin, Ntiny
dqnextt131 nexttoward 9.999999999999999999999999999999999E+6144 9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144
dqnextt132 nexttoward 1E-6143 1E-6143 -> 1E-6143
dqnextt133 nexttoward 1.000000000000000000000000000000000E-6143 1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
dqnextt134 nexttoward 1E-6176 1E-6176 -> 1E-6176
dqnextt135 nexttoward -1E-6176 -1E-6176 -> -1E-6176
dqnextt136 nexttoward -1.000000000000000000000000000000000E-6143 -1.000000000000000000000000000000000E-6143 -> -1.000000000000000000000000000000000E-6143
dqnextt137 nexttoward -1E-6143 -1E-6143 -> -1E-6143
dqnextt138 nexttoward -9.999999999999999999999999999999999E+6144 -9.999999999999999999999999999999999E+6144 -> -9.999999999999999999999999999999999E+6144
------- lhs<rhs
dqnextt201 nexttoward 0.9999999999999999999999999999999995 Infinity -> 0.9999999999999999999999999999999996
dqnextt202 nexttoward 0.9999999999999999999999999999999996 Infinity -> 0.9999999999999999999999999999999997
dqnextt203 nexttoward 0.9999999999999999999999999999999997 Infinity -> 0.9999999999999999999999999999999998
dqnextt204 nexttoward 0.9999999999999999999999999999999998 Infinity -> 0.9999999999999999999999999999999999
dqnextt205 nexttoward 0.9999999999999999999999999999999999 Infinity -> 1.000000000000000000000000000000000
dqnextt206 nexttoward 1.000000000000000000000000000000000 Infinity -> 1.000000000000000000000000000000001
dqnextt207 nexttoward 1.0 Infinity -> 1.000000000000000000000000000000001
dqnextt208 nexttoward 1 Infinity -> 1.000000000000000000000000000000001
dqnextt209 nexttoward 1.000000000000000000000000000000001 Infinity -> 1.000000000000000000000000000000002
dqnextt210 nexttoward 1.000000000000000000000000000000002 Infinity -> 1.000000000000000000000000000000003
dqnextt211 nexttoward 1.000000000000000000000000000000003 Infinity -> 1.000000000000000000000000000000004
dqnextt212 nexttoward 1.000000000000000000000000000000004 Infinity -> 1.000000000000000000000000000000005
dqnextt213 nexttoward 1.000000000000000000000000000000005 Infinity -> 1.000000000000000000000000000000006
dqnextt214 nexttoward 1.000000000000000000000000000000006 Infinity -> 1.000000000000000000000000000000007
dqnextt215 nexttoward 1.000000000000000000000000000000007 Infinity -> 1.000000000000000000000000000000008
dqnextt216 nexttoward 1.000000000000000000000000000000008 Infinity -> 1.000000000000000000000000000000009
dqnextt217 nexttoward 1.000000000000000000000000000000009 Infinity -> 1.000000000000000000000000000000010
dqnextt218 nexttoward 1.000000000000000000000000000000010 Infinity -> 1.000000000000000000000000000000011
dqnextt219 nexttoward 1.000000000000000000000000000000011 Infinity -> 1.000000000000000000000000000000012
dqnextt221 nexttoward -0.9999999999999999999999999999999995 Infinity -> -0.9999999999999999999999999999999994
dqnextt222 nexttoward -0.9999999999999999999999999999999996 Infinity -> -0.9999999999999999999999999999999995
dqnextt223 nexttoward -0.9999999999999999999999999999999997 Infinity -> -0.9999999999999999999999999999999996
dqnextt224 nexttoward -0.9999999999999999999999999999999998 Infinity -> -0.9999999999999999999999999999999997
dqnextt225 nexttoward -0.9999999999999999999999999999999999 Infinity -> -0.9999999999999999999999999999999998
dqnextt226 nexttoward -1.000000000000000000000000000000000 Infinity -> -0.9999999999999999999999999999999999
dqnextt227 nexttoward -1.0 Infinity -> -0.9999999999999999999999999999999999
dqnextt228 nexttoward -1 Infinity -> -0.9999999999999999999999999999999999
dqnextt229 nexttoward -1.000000000000000000000000000000001 Infinity -> -1.000000000000000000000000000000000
dqnextt230 nexttoward -1.000000000000000000000000000000002 Infinity -> -1.000000000000000000000000000000001
dqnextt231 nexttoward -1.000000000000000000000000000000003 Infinity -> -1.000000000000000000000000000000002
dqnextt232 nexttoward -1.000000000000000000000000000000004 Infinity -> -1.000000000000000000000000000000003
dqnextt233 nexttoward -1.000000000000000000000000000000005 Infinity -> -1.000000000000000000000000000000004
dqnextt234 nexttoward -1.000000000000000000000000000000006 Infinity -> -1.000000000000000000000000000000005
dqnextt235 nexttoward -1.000000000000000000000000000000007 Infinity -> -1.000000000000000000000000000000006
dqnextt236 nexttoward -1.000000000000000000000000000000008 Infinity -> -1.000000000000000000000000000000007
dqnextt237 nexttoward -1.000000000000000000000000000000009 Infinity -> -1.000000000000000000000000000000008
dqnextt238 nexttoward -1.000000000000000000000000000000010 Infinity -> -1.000000000000000000000000000000009
dqnextt239 nexttoward -1.000000000000000000000000000000011 Infinity -> -1.000000000000000000000000000000010
dqnextt240 nexttoward -1.000000000000000000000000000000012 Infinity -> -1.000000000000000000000000000000011
-- Zeros
dqnextt300 nexttoward 0 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt301 nexttoward 0.00 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt302 nexttoward 0E-300 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt303 nexttoward 0E+300 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt304 nexttoward 0E+30000 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt305 nexttoward -0 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt306 nexttoward -0.00 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt307 nexttoward -0E-300 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt308 nexttoward -0E+300 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt309 nexttoward -0E+30000 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
-- specials
dqnextt350 nexttoward Inf Infinity -> Infinity
dqnextt351 nexttoward -Inf Infinity -> -9.999999999999999999999999999999999E+6144
dqnextt352 nexttoward NaN Infinity -> NaN
dqnextt353 nexttoward sNaN Infinity -> NaN Invalid_operation
dqnextt354 nexttoward NaN77 Infinity -> NaN77
dqnextt355 nexttoward sNaN88 Infinity -> NaN88 Invalid_operation
dqnextt356 nexttoward -NaN Infinity -> -NaN
dqnextt357 nexttoward -sNaN Infinity -> -NaN Invalid_operation
dqnextt358 nexttoward -NaN77 Infinity -> -NaN77
dqnextt359 nexttoward -sNaN88 Infinity -> -NaN88 Invalid_operation
-- Nmax, Nmin, Ntiny, subnormals
dqnextt370 nexttoward -9.999999999999999999999999999999999E+6144 Infinity -> -9.999999999999999999999999999999998E+6144
dqnextt371 nexttoward -9.999999999999999999999999999999998E+6144 Infinity -> -9.999999999999999999999999999999997E+6144
dqnextt372 nexttoward -1E-6143 Infinity -> -9.99999999999999999999999999999999E-6144 Underflow Subnormal Inexact Rounded
dqnextt373 nexttoward -1.000000000000000E-6143 Infinity -> -9.99999999999999999999999999999999E-6144 Underflow Subnormal Inexact Rounded
dqnextt374 nexttoward -9E-6176 Infinity -> -8E-6176 Underflow Subnormal Inexact Rounded
dqnextt375 nexttoward -9.9E-6175 Infinity -> -9.8E-6175 Underflow Subnormal Inexact Rounded
dqnextt376 nexttoward -9.99999999999999999999999999999E-6147 Infinity -> -9.99999999999999999999999999998E-6147 Underflow Subnormal Inexact Rounded
dqnextt377 nexttoward -9.99999999999999999999999999999999E-6144 Infinity -> -9.99999999999999999999999999999998E-6144 Underflow Subnormal Inexact Rounded
dqnextt378 nexttoward -9.99999999999999999999999999999998E-6144 Infinity -> -9.99999999999999999999999999999997E-6144 Underflow Subnormal Inexact Rounded
dqnextt379 nexttoward -9.99999999999999999999999999999997E-6144 Infinity -> -9.99999999999999999999999999999996E-6144 Underflow Subnormal Inexact Rounded
dqnextt380 nexttoward -0E-6176 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt381 nexttoward -1E-6176 Infinity -> -0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqnextt382 nexttoward -2E-6176 Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt383 nexttoward 0E-6176 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt384 nexttoward 1E-6176 Infinity -> 2E-6176 Underflow Subnormal Inexact Rounded
dqnextt385 nexttoward 2E-6176 Infinity -> 3E-6176 Underflow Subnormal Inexact Rounded
dqnextt386 nexttoward 10E-6176 Infinity -> 1.1E-6175 Underflow Subnormal Inexact Rounded
dqnextt387 nexttoward 100E-6176 Infinity -> 1.01E-6174 Underflow Subnormal Inexact Rounded
dqnextt388 nexttoward 100000E-6176 Infinity -> 1.00001E-6171 Underflow Subnormal Inexact Rounded
dqnextt389 nexttoward 1.00000000000000000000000000000E-6143 Infinity -> 1.000000000000000000000000000000001E-6143
dqnextt390 nexttoward 1.000000000000000000000000000000000E-6143 Infinity -> 1.000000000000000000000000000000001E-6143
dqnextt391 nexttoward 1E-6143 Infinity -> 1.000000000000000000000000000000001E-6143
dqnextt392 nexttoward 9.999999999999999999999999999999997E+6144 Infinity -> 9.999999999999999999999999999999998E+6144
dqnextt393 nexttoward 9.999999999999999999999999999999998E+6144 Infinity -> 9.999999999999999999999999999999999E+6144
dqnextt394 nexttoward 9.999999999999999999999999999999999E+6144 Infinity -> Infinity Overflow Inexact Rounded
------- lhs>rhs
dqnextt401 nexttoward 0.9999999999999999999999999999999995 -Infinity -> 0.9999999999999999999999999999999994
dqnextt402 nexttoward 0.9999999999999999999999999999999996 -Infinity -> 0.9999999999999999999999999999999995
dqnextt403 nexttoward 0.9999999999999999999999999999999997 -Infinity -> 0.9999999999999999999999999999999996
dqnextt404 nexttoward 0.9999999999999999999999999999999998 -Infinity -> 0.9999999999999999999999999999999997
dqnextt405 nexttoward 0.9999999999999999999999999999999999 -Infinity -> 0.9999999999999999999999999999999998
dqnextt406 nexttoward 1.000000000000000000000000000000000 -Infinity -> 0.9999999999999999999999999999999999
dqnextt407 nexttoward 1.0 -Infinity -> 0.9999999999999999999999999999999999
dqnextt408 nexttoward 1 -Infinity -> 0.9999999999999999999999999999999999
dqnextt409 nexttoward 1.000000000000000000000000000000001 -Infinity -> 1.000000000000000000000000000000000
dqnextt410 nexttoward 1.000000000000000000000000000000002 -Infinity -> 1.000000000000000000000000000000001
dqnextt411 nexttoward 1.000000000000000000000000000000003 -Infinity -> 1.000000000000000000000000000000002
dqnextt412 nexttoward 1.000000000000000000000000000000004 -Infinity -> 1.000000000000000000000000000000003
dqnextt413 nexttoward 1.000000000000000000000000000000005 -Infinity -> 1.000000000000000000000000000000004
dqnextt414 nexttoward 1.000000000000000000000000000000006 -Infinity -> 1.000000000000000000000000000000005
dqnextt415 nexttoward 1.000000000000000000000000000000007 -Infinity -> 1.000000000000000000000000000000006
dqnextt416 nexttoward 1.000000000000000000000000000000008 -Infinity -> 1.000000000000000000000000000000007
dqnextt417 nexttoward 1.000000000000000000000000000000009 -Infinity -> 1.000000000000000000000000000000008
dqnextt418 nexttoward 1.000000000000000000000000000000010 -Infinity -> 1.000000000000000000000000000000009
dqnextt419 nexttoward 1.000000000000000000000000000000011 -Infinity -> 1.000000000000000000000000000000010
dqnextt420 nexttoward 1.000000000000000000000000000000012 -Infinity -> 1.000000000000000000000000000000011
dqnextt421 nexttoward -0.9999999999999999999999999999999995 -Infinity -> -0.9999999999999999999999999999999996
dqnextt422 nexttoward -0.9999999999999999999999999999999996 -Infinity -> -0.9999999999999999999999999999999997
dqnextt423 nexttoward -0.9999999999999999999999999999999997 -Infinity -> -0.9999999999999999999999999999999998
dqnextt424 nexttoward -0.9999999999999999999999999999999998 -Infinity -> -0.9999999999999999999999999999999999
dqnextt425 nexttoward -0.9999999999999999999999999999999999 -Infinity -> -1.000000000000000000000000000000000
dqnextt426 nexttoward -1.000000000000000000000000000000000 -Infinity -> -1.000000000000000000000000000000001
dqnextt427 nexttoward -1.0 -Infinity -> -1.000000000000000000000000000000001
dqnextt428 nexttoward -1 -Infinity -> -1.000000000000000000000000000000001
dqnextt429 nexttoward -1.000000000000000000000000000000001 -Infinity -> -1.000000000000000000000000000000002
dqnextt430 nexttoward -1.000000000000000000000000000000002 -Infinity -> -1.000000000000000000000000000000003
dqnextt431 nexttoward -1.000000000000000000000000000000003 -Infinity -> -1.000000000000000000000000000000004
dqnextt432 nexttoward -1.000000000000000000000000000000004 -Infinity -> -1.000000000000000000000000000000005
dqnextt433 nexttoward -1.000000000000000000000000000000005 -Infinity -> -1.000000000000000000000000000000006
dqnextt434 nexttoward -1.000000000000000000000000000000006 -Infinity -> -1.000000000000000000000000000000007
dqnextt435 nexttoward -1.000000000000000000000000000000007 -Infinity -> -1.000000000000000000000000000000008
dqnextt436 nexttoward -1.000000000000000000000000000000008 -Infinity -> -1.000000000000000000000000000000009
dqnextt437 nexttoward -1.000000000000000000000000000000009 -Infinity -> -1.000000000000000000000000000000010
dqnextt438 nexttoward -1.000000000000000000000000000000010 -Infinity -> -1.000000000000000000000000000000011
dqnextt439 nexttoward -1.000000000000000000000000000000011 -Infinity -> -1.000000000000000000000000000000012
-- Zeros
dqnextt500 nexttoward -0 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt501 nexttoward 0 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt502 nexttoward 0.00 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt503 nexttoward -0.00 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt504 nexttoward 0E-300 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt505 nexttoward 0E+300 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt506 nexttoward 0E+30000 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt507 nexttoward -0E+30000 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
-- specials
dqnextt550 nexttoward Inf -Infinity -> 9.999999999999999999999999999999999E+6144
dqnextt551 nexttoward -Inf -Infinity -> -Infinity
dqnextt552 nexttoward NaN -Infinity -> NaN
dqnextt553 nexttoward sNaN -Infinity -> NaN Invalid_operation
dqnextt554 nexttoward NaN77 -Infinity -> NaN77
dqnextt555 nexttoward sNaN88 -Infinity -> NaN88 Invalid_operation
dqnextt556 nexttoward -NaN -Infinity -> -NaN
dqnextt557 nexttoward -sNaN -Infinity -> -NaN Invalid_operation
dqnextt558 nexttoward -NaN77 -Infinity -> -NaN77
dqnextt559 nexttoward -sNaN88 -Infinity -> -NaN88 Invalid_operation
-- Nmax, Nmin, Ntiny, subnormals
dqnextt670 nexttoward 9.999999999999999999999999999999999E+6144 -Infinity -> 9.999999999999999999999999999999998E+6144
dqnextt671 nexttoward 9.999999999999999999999999999999998E+6144 -Infinity -> 9.999999999999999999999999999999997E+6144
dqnextt672 nexttoward 1E-6143 -Infinity -> 9.99999999999999999999999999999999E-6144 Underflow Subnormal Inexact Rounded
dqnextt673 nexttoward 1.000000000000000000000000000000000E-6143 -Infinity -> 9.99999999999999999999999999999999E-6144 Underflow Subnormal Inexact Rounded
dqnextt674 nexttoward 9E-6176 -Infinity -> 8E-6176 Underflow Subnormal Inexact Rounded
dqnextt675 nexttoward 9.9E-6175 -Infinity -> 9.8E-6175 Underflow Subnormal Inexact Rounded
dqnextt676 nexttoward 9.99999999999999999999999999999E-6147 -Infinity -> 9.99999999999999999999999999998E-6147 Underflow Subnormal Inexact Rounded
dqnextt677 nexttoward 9.99999999999999999999999999999999E-6144 -Infinity -> 9.99999999999999999999999999999998E-6144 Underflow Subnormal Inexact Rounded
dqnextt678 nexttoward 9.99999999999999999999999999999998E-6144 -Infinity -> 9.99999999999999999999999999999997E-6144 Underflow Subnormal Inexact Rounded
dqnextt679 nexttoward 9.99999999999999999999999999999997E-6144 -Infinity -> 9.99999999999999999999999999999996E-6144 Underflow Subnormal Inexact Rounded
dqnextt680 nexttoward 0E-6176 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt681 nexttoward 1E-6176 -Infinity -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqnextt682 nexttoward 2E-6176 -Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt683 nexttoward -0E-6176 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt684 nexttoward -1E-6176 -Infinity -> -2E-6176 Underflow Subnormal Inexact Rounded
dqnextt685 nexttoward -2E-6176 -Infinity -> -3E-6176 Underflow Subnormal Inexact Rounded
dqnextt686 nexttoward -10E-6176 -Infinity -> -1.1E-6175 Underflow Subnormal Inexact Rounded
dqnextt687 nexttoward -100E-6176 -Infinity -> -1.01E-6174 Underflow Subnormal Inexact Rounded
dqnextt688 nexttoward -100000E-6176 -Infinity -> -1.00001E-6171 Underflow Subnormal Inexact Rounded
dqnextt689 nexttoward -1.00000000000000000000000000000E-6143 -Infinity -> -1.000000000000000000000000000000001E-6143
dqnextt690 nexttoward -1.000000000000000000000000000000000E-6143 -Infinity -> -1.000000000000000000000000000000001E-6143
dqnextt691 nexttoward -1E-6143 -Infinity -> -1.000000000000000000000000000000001E-6143
dqnextt692 nexttoward -9.999999999999999999999999999999998E+6144 -Infinity -> -9.999999999999999999999999999999999E+6144
dqnextt693 nexttoward -9.999999999999999999999999999999999E+6144 -Infinity -> -Infinity Overflow Inexact Rounded
------- Specials
dqnextt780 nexttoward -Inf -Inf -> -Infinity
dqnextt781 nexttoward -Inf -1000 -> -9.999999999999999999999999999999999E+6144
dqnextt782 nexttoward -Inf -1 -> -9.999999999999999999999999999999999E+6144
dqnextt783 nexttoward -Inf -0 -> -9.999999999999999999999999999999999E+6144
dqnextt784 nexttoward -Inf 0 -> -9.999999999999999999999999999999999E+6144
dqnextt785 nexttoward -Inf 1 -> -9.999999999999999999999999999999999E+6144
dqnextt786 nexttoward -Inf 1000 -> -9.999999999999999999999999999999999E+6144
dqnextt787 nexttoward -1000 -Inf -> -1000.000000000000000000000000000001
dqnextt788 nexttoward -Inf -Inf -> -Infinity
dqnextt789 nexttoward -1 -Inf -> -1.000000000000000000000000000000001
dqnextt790 nexttoward -0 -Inf -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt791 nexttoward 0 -Inf -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt792 nexttoward 1 -Inf -> 0.9999999999999999999999999999999999
dqnextt793 nexttoward 1000 -Inf -> 999.9999999999999999999999999999999
dqnextt794 nexttoward Inf -Inf -> 9.999999999999999999999999999999999E+6144
dqnextt800 nexttoward Inf -Inf -> 9.999999999999999999999999999999999E+6144
dqnextt801 nexttoward Inf -1000 -> 9.999999999999999999999999999999999E+6144
dqnextt802 nexttoward Inf -1 -> 9.999999999999999999999999999999999E+6144
dqnextt803 nexttoward Inf -0 -> 9.999999999999999999999999999999999E+6144
dqnextt804 nexttoward Inf 0 -> 9.999999999999999999999999999999999E+6144
dqnextt805 nexttoward Inf 1 -> 9.999999999999999999999999999999999E+6144
dqnextt806 nexttoward Inf 1000 -> 9.999999999999999999999999999999999E+6144
dqnextt807 nexttoward Inf Inf -> Infinity
dqnextt808 nexttoward -1000 Inf -> -999.9999999999999999999999999999999
dqnextt809 nexttoward -Inf Inf -> -9.999999999999999999999999999999999E+6144
dqnextt810 nexttoward -1 Inf -> -0.9999999999999999999999999999999999
dqnextt811 nexttoward -0 Inf -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt812 nexttoward 0 Inf -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt813 nexttoward 1 Inf -> 1.000000000000000000000000000000001
dqnextt814 nexttoward 1000 Inf -> 1000.000000000000000000000000000001
dqnextt815 nexttoward Inf Inf -> Infinity
dqnextt821 nexttoward NaN -Inf -> NaN
dqnextt822 nexttoward NaN -1000 -> NaN
dqnextt823 nexttoward NaN -1 -> NaN
dqnextt824 nexttoward NaN -0 -> NaN
dqnextt825 nexttoward NaN 0 -> NaN
dqnextt826 nexttoward NaN 1 -> NaN
dqnextt827 nexttoward NaN 1000 -> NaN
dqnextt828 nexttoward NaN Inf -> NaN
dqnextt829 nexttoward NaN NaN -> NaN
dqnextt830 nexttoward -Inf NaN -> NaN
dqnextt831 nexttoward -1000 NaN -> NaN
dqnextt832 nexttoward -1 NaN -> NaN
dqnextt833 nexttoward -0 NaN -> NaN
dqnextt834 nexttoward 0 NaN -> NaN
dqnextt835 nexttoward 1 NaN -> NaN
dqnextt836 nexttoward 1000 NaN -> NaN
dqnextt837 nexttoward Inf NaN -> NaN
dqnextt841 nexttoward sNaN -Inf -> NaN Invalid_operation
dqnextt842 nexttoward sNaN -1000 -> NaN Invalid_operation
dqnextt843 nexttoward sNaN -1 -> NaN Invalid_operation
dqnextt844 nexttoward sNaN -0 -> NaN Invalid_operation
dqnextt845 nexttoward sNaN 0 -> NaN Invalid_operation
dqnextt846 nexttoward sNaN 1 -> NaN Invalid_operation
dqnextt847 nexttoward sNaN 1000 -> NaN Invalid_operation
dqnextt848 nexttoward sNaN NaN -> NaN Invalid_operation
dqnextt849 nexttoward sNaN sNaN -> NaN Invalid_operation
dqnextt850 nexttoward NaN sNaN -> NaN Invalid_operation
dqnextt851 nexttoward -Inf sNaN -> NaN Invalid_operation
dqnextt852 nexttoward -1000 sNaN -> NaN Invalid_operation
dqnextt853 nexttoward -1 sNaN -> NaN Invalid_operation
dqnextt854 nexttoward -0 sNaN -> NaN Invalid_operation
dqnextt855 nexttoward 0 sNaN -> NaN Invalid_operation
dqnextt856 nexttoward 1 sNaN -> NaN Invalid_operation
dqnextt857 nexttoward 1000 sNaN -> NaN Invalid_operation
dqnextt858 nexttoward Inf sNaN -> NaN Invalid_operation
dqnextt859 nexttoward NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqnextt861 nexttoward NaN1 -Inf -> NaN1
dqnextt862 nexttoward +NaN2 -1000 -> NaN2
dqnextt863 nexttoward NaN3 1000 -> NaN3
dqnextt864 nexttoward NaN4 Inf -> NaN4
dqnextt865 nexttoward NaN5 +NaN6 -> NaN5
dqnextt866 nexttoward -Inf NaN7 -> NaN7
dqnextt867 nexttoward -1000 NaN8 -> NaN8
dqnextt868 nexttoward 1000 NaN9 -> NaN9
dqnextt869 nexttoward Inf +NaN10 -> NaN10
dqnextt871 nexttoward sNaN11 -Inf -> NaN11 Invalid_operation
dqnextt872 nexttoward sNaN12 -1000 -> NaN12 Invalid_operation
dqnextt873 nexttoward sNaN13 1000 -> NaN13 Invalid_operation
dqnextt874 nexttoward sNaN14 NaN17 -> NaN14 Invalid_operation
dqnextt875 nexttoward sNaN15 sNaN18 -> NaN15 Invalid_operation
dqnextt876 nexttoward NaN16 sNaN19 -> NaN19 Invalid_operation
dqnextt877 nexttoward -Inf +sNaN20 -> NaN20 Invalid_operation
dqnextt878 nexttoward -1000 sNaN21 -> NaN21 Invalid_operation
dqnextt879 nexttoward 1000 sNaN22 -> NaN22 Invalid_operation
dqnextt880 nexttoward Inf sNaN23 -> NaN23 Invalid_operation
dqnextt881 nexttoward +NaN25 +sNaN24 -> NaN24 Invalid_operation
dqnextt882 nexttoward -NaN26 NaN28 -> -NaN26
dqnextt883 nexttoward -sNaN27 sNaN29 -> -NaN27 Invalid_operation
dqnextt884 nexttoward 1000 -NaN30 -> -NaN30
dqnextt885 nexttoward 1000 -sNaN31 -> -NaN31 Invalid_operation
-- Null tests
dqnextt900 nexttoward 1 # -> NaN Invalid_operation
dqnextt901 nexttoward # 1 -> NaN Invalid_operation
------------------------------------------------------------------------
-- dqNextToward.decTest -- decQuad next toward rhs [754r nextafter] --
-- 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 decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check with a scattering of numerics
dqnextt001 nexttoward 10 10 -> 10
dqnextt002 nexttoward -10 -10 -> -10
dqnextt003 nexttoward 1 10 -> 1.000000000000000000000000000000001
dqnextt004 nexttoward 1 -10 -> 0.9999999999999999999999999999999999
dqnextt005 nexttoward -1 10 -> -0.9999999999999999999999999999999999
dqnextt006 nexttoward -1 -10 -> -1.000000000000000000000000000000001
dqnextt007 nexttoward 0 10 -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt008 nexttoward 0 -10 -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt009 nexttoward 9.999999999999999999999999999999999E+6144 +Infinity -> Infinity Overflow Inexact Rounded
dqnextt010 nexttoward -9.999999999999999999999999999999999E+6144 -Infinity -> -Infinity Overflow Inexact Rounded
dqnextt011 nexttoward 9.999999999999999999999999999999999 10 -> 10.00000000000000000000000000000000
dqnextt012 nexttoward 10 9.999999999999999999999999999999999 -> 9.999999999999999999999999999999999
dqnextt013 nexttoward -9.999999999999999999999999999999999 -10 -> -10.00000000000000000000000000000000
dqnextt014 nexttoward -10 -9.999999999999999999999999999999999 -> -9.999999999999999999999999999999999
dqnextt015 nexttoward 9.999999999999999999999999999999998 10 -> 9.999999999999999999999999999999999
dqnextt016 nexttoward 10 9.999999999999999999999999999999998 -> 9.999999999999999999999999999999999
dqnextt017 nexttoward -9.999999999999999999999999999999998 -10 -> -9.999999999999999999999999999999999
dqnextt018 nexttoward -10 -9.999999999999999999999999999999998 -> -9.999999999999999999999999999999999
------- lhs=rhs
-- finites
dqnextt101 nexttoward 7 7 -> 7
dqnextt102 nexttoward -7 -7 -> -7
dqnextt103 nexttoward 75 75 -> 75
dqnextt104 nexttoward -75 -75 -> -75
dqnextt105 nexttoward 7.50 7.5 -> 7.50
dqnextt106 nexttoward -7.50 -7.50 -> -7.50
dqnextt107 nexttoward 7.500 7.5000 -> 7.500
dqnextt108 nexttoward -7.500 -7.5 -> -7.500
-- zeros
dqnextt111 nexttoward 0 0 -> 0
dqnextt112 nexttoward -0 -0 -> -0
dqnextt113 nexttoward 0E+4 0 -> 0E+4
dqnextt114 nexttoward -0E+4 -0 -> -0E+4
dqnextt115 nexttoward 0.00000000000 0.000000000000 -> 0E-11
dqnextt116 nexttoward -0.00000000000 -0.00 -> -0E-11
dqnextt117 nexttoward 0E-141 0 -> 0E-141
dqnextt118 nexttoward -0E-141 -000 -> -0E-141
-- full coefficients, alternating bits
dqnextt121 nexttoward 268268268 268268268 -> 268268268
dqnextt122 nexttoward -268268268 -268268268 -> -268268268
dqnextt123 nexttoward 134134134 134134134 -> 134134134
dqnextt124 nexttoward -134134134 -134134134 -> -134134134
-- Nmax, Nmin, Ntiny
dqnextt131 nexttoward 9.999999999999999999999999999999999E+6144 9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144
dqnextt132 nexttoward 1E-6143 1E-6143 -> 1E-6143
dqnextt133 nexttoward 1.000000000000000000000000000000000E-6143 1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
dqnextt134 nexttoward 1E-6176 1E-6176 -> 1E-6176
dqnextt135 nexttoward -1E-6176 -1E-6176 -> -1E-6176
dqnextt136 nexttoward -1.000000000000000000000000000000000E-6143 -1.000000000000000000000000000000000E-6143 -> -1.000000000000000000000000000000000E-6143
dqnextt137 nexttoward -1E-6143 -1E-6143 -> -1E-6143
dqnextt138 nexttoward -9.999999999999999999999999999999999E+6144 -9.999999999999999999999999999999999E+6144 -> -9.999999999999999999999999999999999E+6144
------- lhs<rhs
dqnextt201 nexttoward 0.9999999999999999999999999999999995 Infinity -> 0.9999999999999999999999999999999996
dqnextt202 nexttoward 0.9999999999999999999999999999999996 Infinity -> 0.9999999999999999999999999999999997
dqnextt203 nexttoward 0.9999999999999999999999999999999997 Infinity -> 0.9999999999999999999999999999999998
dqnextt204 nexttoward 0.9999999999999999999999999999999998 Infinity -> 0.9999999999999999999999999999999999
dqnextt205 nexttoward 0.9999999999999999999999999999999999 Infinity -> 1.000000000000000000000000000000000
dqnextt206 nexttoward 1.000000000000000000000000000000000 Infinity -> 1.000000000000000000000000000000001
dqnextt207 nexttoward 1.0 Infinity -> 1.000000000000000000000000000000001
dqnextt208 nexttoward 1 Infinity -> 1.000000000000000000000000000000001
dqnextt209 nexttoward 1.000000000000000000000000000000001 Infinity -> 1.000000000000000000000000000000002
dqnextt210 nexttoward 1.000000000000000000000000000000002 Infinity -> 1.000000000000000000000000000000003
dqnextt211 nexttoward 1.000000000000000000000000000000003 Infinity -> 1.000000000000000000000000000000004
dqnextt212 nexttoward 1.000000000000000000000000000000004 Infinity -> 1.000000000000000000000000000000005
dqnextt213 nexttoward 1.000000000000000000000000000000005 Infinity -> 1.000000000000000000000000000000006
dqnextt214 nexttoward 1.000000000000000000000000000000006 Infinity -> 1.000000000000000000000000000000007
dqnextt215 nexttoward 1.000000000000000000000000000000007 Infinity -> 1.000000000000000000000000000000008
dqnextt216 nexttoward 1.000000000000000000000000000000008 Infinity -> 1.000000000000000000000000000000009
dqnextt217 nexttoward 1.000000000000000000000000000000009 Infinity -> 1.000000000000000000000000000000010
dqnextt218 nexttoward 1.000000000000000000000000000000010 Infinity -> 1.000000000000000000000000000000011
dqnextt219 nexttoward 1.000000000000000000000000000000011 Infinity -> 1.000000000000000000000000000000012
dqnextt221 nexttoward -0.9999999999999999999999999999999995 Infinity -> -0.9999999999999999999999999999999994
dqnextt222 nexttoward -0.9999999999999999999999999999999996 Infinity -> -0.9999999999999999999999999999999995
dqnextt223 nexttoward -0.9999999999999999999999999999999997 Infinity -> -0.9999999999999999999999999999999996
dqnextt224 nexttoward -0.9999999999999999999999999999999998 Infinity -> -0.9999999999999999999999999999999997
dqnextt225 nexttoward -0.9999999999999999999999999999999999 Infinity -> -0.9999999999999999999999999999999998
dqnextt226 nexttoward -1.000000000000000000000000000000000 Infinity -> -0.9999999999999999999999999999999999
dqnextt227 nexttoward -1.0 Infinity -> -0.9999999999999999999999999999999999
dqnextt228 nexttoward -1 Infinity -> -0.9999999999999999999999999999999999
dqnextt229 nexttoward -1.000000000000000000000000000000001 Infinity -> -1.000000000000000000000000000000000
dqnextt230 nexttoward -1.000000000000000000000000000000002 Infinity -> -1.000000000000000000000000000000001
dqnextt231 nexttoward -1.000000000000000000000000000000003 Infinity -> -1.000000000000000000000000000000002
dqnextt232 nexttoward -1.000000000000000000000000000000004 Infinity -> -1.000000000000000000000000000000003
dqnextt233 nexttoward -1.000000000000000000000000000000005 Infinity -> -1.000000000000000000000000000000004
dqnextt234 nexttoward -1.000000000000000000000000000000006 Infinity -> -1.000000000000000000000000000000005
dqnextt235 nexttoward -1.000000000000000000000000000000007 Infinity -> -1.000000000000000000000000000000006
dqnextt236 nexttoward -1.000000000000000000000000000000008 Infinity -> -1.000000000000000000000000000000007
dqnextt237 nexttoward -1.000000000000000000000000000000009 Infinity -> -1.000000000000000000000000000000008
dqnextt238 nexttoward -1.000000000000000000000000000000010 Infinity -> -1.000000000000000000000000000000009
dqnextt239 nexttoward -1.000000000000000000000000000000011 Infinity -> -1.000000000000000000000000000000010
dqnextt240 nexttoward -1.000000000000000000000000000000012 Infinity -> -1.000000000000000000000000000000011
-- Zeros
dqnextt300 nexttoward 0 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt301 nexttoward 0.00 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt302 nexttoward 0E-300 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt303 nexttoward 0E+300 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt304 nexttoward 0E+30000 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt305 nexttoward -0 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt306 nexttoward -0.00 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt307 nexttoward -0E-300 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt308 nexttoward -0E+300 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt309 nexttoward -0E+30000 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
-- specials
dqnextt350 nexttoward Inf Infinity -> Infinity
dqnextt351 nexttoward -Inf Infinity -> -9.999999999999999999999999999999999E+6144
dqnextt352 nexttoward NaN Infinity -> NaN
dqnextt353 nexttoward sNaN Infinity -> NaN Invalid_operation
dqnextt354 nexttoward NaN77 Infinity -> NaN77
dqnextt355 nexttoward sNaN88 Infinity -> NaN88 Invalid_operation
dqnextt356 nexttoward -NaN Infinity -> -NaN
dqnextt357 nexttoward -sNaN Infinity -> -NaN Invalid_operation
dqnextt358 nexttoward -NaN77 Infinity -> -NaN77
dqnextt359 nexttoward -sNaN88 Infinity -> -NaN88 Invalid_operation
-- Nmax, Nmin, Ntiny, subnormals
dqnextt370 nexttoward -9.999999999999999999999999999999999E+6144 Infinity -> -9.999999999999999999999999999999998E+6144
dqnextt371 nexttoward -9.999999999999999999999999999999998E+6144 Infinity -> -9.999999999999999999999999999999997E+6144
dqnextt372 nexttoward -1E-6143 Infinity -> -9.99999999999999999999999999999999E-6144 Underflow Subnormal Inexact Rounded
dqnextt373 nexttoward -1.000000000000000E-6143 Infinity -> -9.99999999999999999999999999999999E-6144 Underflow Subnormal Inexact Rounded
dqnextt374 nexttoward -9E-6176 Infinity -> -8E-6176 Underflow Subnormal Inexact Rounded
dqnextt375 nexttoward -9.9E-6175 Infinity -> -9.8E-6175 Underflow Subnormal Inexact Rounded
dqnextt376 nexttoward -9.99999999999999999999999999999E-6147 Infinity -> -9.99999999999999999999999999998E-6147 Underflow Subnormal Inexact Rounded
dqnextt377 nexttoward -9.99999999999999999999999999999999E-6144 Infinity -> -9.99999999999999999999999999999998E-6144 Underflow Subnormal Inexact Rounded
dqnextt378 nexttoward -9.99999999999999999999999999999998E-6144 Infinity -> -9.99999999999999999999999999999997E-6144 Underflow Subnormal Inexact Rounded
dqnextt379 nexttoward -9.99999999999999999999999999999997E-6144 Infinity -> -9.99999999999999999999999999999996E-6144 Underflow Subnormal Inexact Rounded
dqnextt380 nexttoward -0E-6176 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt381 nexttoward -1E-6176 Infinity -> -0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqnextt382 nexttoward -2E-6176 Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt383 nexttoward 0E-6176 Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt384 nexttoward 1E-6176 Infinity -> 2E-6176 Underflow Subnormal Inexact Rounded
dqnextt385 nexttoward 2E-6176 Infinity -> 3E-6176 Underflow Subnormal Inexact Rounded
dqnextt386 nexttoward 10E-6176 Infinity -> 1.1E-6175 Underflow Subnormal Inexact Rounded
dqnextt387 nexttoward 100E-6176 Infinity -> 1.01E-6174 Underflow Subnormal Inexact Rounded
dqnextt388 nexttoward 100000E-6176 Infinity -> 1.00001E-6171 Underflow Subnormal Inexact Rounded
dqnextt389 nexttoward 1.00000000000000000000000000000E-6143 Infinity -> 1.000000000000000000000000000000001E-6143
dqnextt390 nexttoward 1.000000000000000000000000000000000E-6143 Infinity -> 1.000000000000000000000000000000001E-6143
dqnextt391 nexttoward 1E-6143 Infinity -> 1.000000000000000000000000000000001E-6143
dqnextt392 nexttoward 9.999999999999999999999999999999997E+6144 Infinity -> 9.999999999999999999999999999999998E+6144
dqnextt393 nexttoward 9.999999999999999999999999999999998E+6144 Infinity -> 9.999999999999999999999999999999999E+6144
dqnextt394 nexttoward 9.999999999999999999999999999999999E+6144 Infinity -> Infinity Overflow Inexact Rounded
------- lhs>rhs
dqnextt401 nexttoward 0.9999999999999999999999999999999995 -Infinity -> 0.9999999999999999999999999999999994
dqnextt402 nexttoward 0.9999999999999999999999999999999996 -Infinity -> 0.9999999999999999999999999999999995
dqnextt403 nexttoward 0.9999999999999999999999999999999997 -Infinity -> 0.9999999999999999999999999999999996
dqnextt404 nexttoward 0.9999999999999999999999999999999998 -Infinity -> 0.9999999999999999999999999999999997
dqnextt405 nexttoward 0.9999999999999999999999999999999999 -Infinity -> 0.9999999999999999999999999999999998
dqnextt406 nexttoward 1.000000000000000000000000000000000 -Infinity -> 0.9999999999999999999999999999999999
dqnextt407 nexttoward 1.0 -Infinity -> 0.9999999999999999999999999999999999
dqnextt408 nexttoward 1 -Infinity -> 0.9999999999999999999999999999999999
dqnextt409 nexttoward 1.000000000000000000000000000000001 -Infinity -> 1.000000000000000000000000000000000
dqnextt410 nexttoward 1.000000000000000000000000000000002 -Infinity -> 1.000000000000000000000000000000001
dqnextt411 nexttoward 1.000000000000000000000000000000003 -Infinity -> 1.000000000000000000000000000000002
dqnextt412 nexttoward 1.000000000000000000000000000000004 -Infinity -> 1.000000000000000000000000000000003
dqnextt413 nexttoward 1.000000000000000000000000000000005 -Infinity -> 1.000000000000000000000000000000004
dqnextt414 nexttoward 1.000000000000000000000000000000006 -Infinity -> 1.000000000000000000000000000000005
dqnextt415 nexttoward 1.000000000000000000000000000000007 -Infinity -> 1.000000000000000000000000000000006
dqnextt416 nexttoward 1.000000000000000000000000000000008 -Infinity -> 1.000000000000000000000000000000007
dqnextt417 nexttoward 1.000000000000000000000000000000009 -Infinity -> 1.000000000000000000000000000000008
dqnextt418 nexttoward 1.000000000000000000000000000000010 -Infinity -> 1.000000000000000000000000000000009
dqnextt419 nexttoward 1.000000000000000000000000000000011 -Infinity -> 1.000000000000000000000000000000010
dqnextt420 nexttoward 1.000000000000000000000000000000012 -Infinity -> 1.000000000000000000000000000000011
dqnextt421 nexttoward -0.9999999999999999999999999999999995 -Infinity -> -0.9999999999999999999999999999999996
dqnextt422 nexttoward -0.9999999999999999999999999999999996 -Infinity -> -0.9999999999999999999999999999999997
dqnextt423 nexttoward -0.9999999999999999999999999999999997 -Infinity -> -0.9999999999999999999999999999999998
dqnextt424 nexttoward -0.9999999999999999999999999999999998 -Infinity -> -0.9999999999999999999999999999999999
dqnextt425 nexttoward -0.9999999999999999999999999999999999 -Infinity -> -1.000000000000000000000000000000000
dqnextt426 nexttoward -1.000000000000000000000000000000000 -Infinity -> -1.000000000000000000000000000000001
dqnextt427 nexttoward -1.0 -Infinity -> -1.000000000000000000000000000000001
dqnextt428 nexttoward -1 -Infinity -> -1.000000000000000000000000000000001
dqnextt429 nexttoward -1.000000000000000000000000000000001 -Infinity -> -1.000000000000000000000000000000002
dqnextt430 nexttoward -1.000000000000000000000000000000002 -Infinity -> -1.000000000000000000000000000000003
dqnextt431 nexttoward -1.000000000000000000000000000000003 -Infinity -> -1.000000000000000000000000000000004
dqnextt432 nexttoward -1.000000000000000000000000000000004 -Infinity -> -1.000000000000000000000000000000005
dqnextt433 nexttoward -1.000000000000000000000000000000005 -Infinity -> -1.000000000000000000000000000000006
dqnextt434 nexttoward -1.000000000000000000000000000000006 -Infinity -> -1.000000000000000000000000000000007
dqnextt435 nexttoward -1.000000000000000000000000000000007 -Infinity -> -1.000000000000000000000000000000008
dqnextt436 nexttoward -1.000000000000000000000000000000008 -Infinity -> -1.000000000000000000000000000000009
dqnextt437 nexttoward -1.000000000000000000000000000000009 -Infinity -> -1.000000000000000000000000000000010
dqnextt438 nexttoward -1.000000000000000000000000000000010 -Infinity -> -1.000000000000000000000000000000011
dqnextt439 nexttoward -1.000000000000000000000000000000011 -Infinity -> -1.000000000000000000000000000000012
-- Zeros
dqnextt500 nexttoward -0 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt501 nexttoward 0 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt502 nexttoward 0.00 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt503 nexttoward -0.00 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt504 nexttoward 0E-300 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt505 nexttoward 0E+300 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt506 nexttoward 0E+30000 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt507 nexttoward -0E+30000 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
-- specials
dqnextt550 nexttoward Inf -Infinity -> 9.999999999999999999999999999999999E+6144
dqnextt551 nexttoward -Inf -Infinity -> -Infinity
dqnextt552 nexttoward NaN -Infinity -> NaN
dqnextt553 nexttoward sNaN -Infinity -> NaN Invalid_operation
dqnextt554 nexttoward NaN77 -Infinity -> NaN77
dqnextt555 nexttoward sNaN88 -Infinity -> NaN88 Invalid_operation
dqnextt556 nexttoward -NaN -Infinity -> -NaN
dqnextt557 nexttoward -sNaN -Infinity -> -NaN Invalid_operation
dqnextt558 nexttoward -NaN77 -Infinity -> -NaN77
dqnextt559 nexttoward -sNaN88 -Infinity -> -NaN88 Invalid_operation
-- Nmax, Nmin, Ntiny, subnormals
dqnextt670 nexttoward 9.999999999999999999999999999999999E+6144 -Infinity -> 9.999999999999999999999999999999998E+6144
dqnextt671 nexttoward 9.999999999999999999999999999999998E+6144 -Infinity -> 9.999999999999999999999999999999997E+6144
dqnextt672 nexttoward 1E-6143 -Infinity -> 9.99999999999999999999999999999999E-6144 Underflow Subnormal Inexact Rounded
dqnextt673 nexttoward 1.000000000000000000000000000000000E-6143 -Infinity -> 9.99999999999999999999999999999999E-6144 Underflow Subnormal Inexact Rounded
dqnextt674 nexttoward 9E-6176 -Infinity -> 8E-6176 Underflow Subnormal Inexact Rounded
dqnextt675 nexttoward 9.9E-6175 -Infinity -> 9.8E-6175 Underflow Subnormal Inexact Rounded
dqnextt676 nexttoward 9.99999999999999999999999999999E-6147 -Infinity -> 9.99999999999999999999999999998E-6147 Underflow Subnormal Inexact Rounded
dqnextt677 nexttoward 9.99999999999999999999999999999999E-6144 -Infinity -> 9.99999999999999999999999999999998E-6144 Underflow Subnormal Inexact Rounded
dqnextt678 nexttoward 9.99999999999999999999999999999998E-6144 -Infinity -> 9.99999999999999999999999999999997E-6144 Underflow Subnormal Inexact Rounded
dqnextt679 nexttoward 9.99999999999999999999999999999997E-6144 -Infinity -> 9.99999999999999999999999999999996E-6144 Underflow Subnormal Inexact Rounded
dqnextt680 nexttoward 0E-6176 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt681 nexttoward 1E-6176 -Infinity -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqnextt682 nexttoward 2E-6176 -Infinity -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt683 nexttoward -0E-6176 -Infinity -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt684 nexttoward -1E-6176 -Infinity -> -2E-6176 Underflow Subnormal Inexact Rounded
dqnextt685 nexttoward -2E-6176 -Infinity -> -3E-6176 Underflow Subnormal Inexact Rounded
dqnextt686 nexttoward -10E-6176 -Infinity -> -1.1E-6175 Underflow Subnormal Inexact Rounded
dqnextt687 nexttoward -100E-6176 -Infinity -> -1.01E-6174 Underflow Subnormal Inexact Rounded
dqnextt688 nexttoward -100000E-6176 -Infinity -> -1.00001E-6171 Underflow Subnormal Inexact Rounded
dqnextt689 nexttoward -1.00000000000000000000000000000E-6143 -Infinity -> -1.000000000000000000000000000000001E-6143
dqnextt690 nexttoward -1.000000000000000000000000000000000E-6143 -Infinity -> -1.000000000000000000000000000000001E-6143
dqnextt691 nexttoward -1E-6143 -Infinity -> -1.000000000000000000000000000000001E-6143
dqnextt692 nexttoward -9.999999999999999999999999999999998E+6144 -Infinity -> -9.999999999999999999999999999999999E+6144
dqnextt693 nexttoward -9.999999999999999999999999999999999E+6144 -Infinity -> -Infinity Overflow Inexact Rounded
------- Specials
dqnextt780 nexttoward -Inf -Inf -> -Infinity
dqnextt781 nexttoward -Inf -1000 -> -9.999999999999999999999999999999999E+6144
dqnextt782 nexttoward -Inf -1 -> -9.999999999999999999999999999999999E+6144
dqnextt783 nexttoward -Inf -0 -> -9.999999999999999999999999999999999E+6144
dqnextt784 nexttoward -Inf 0 -> -9.999999999999999999999999999999999E+6144
dqnextt785 nexttoward -Inf 1 -> -9.999999999999999999999999999999999E+6144
dqnextt786 nexttoward -Inf 1000 -> -9.999999999999999999999999999999999E+6144
dqnextt787 nexttoward -1000 -Inf -> -1000.000000000000000000000000000001
dqnextt788 nexttoward -Inf -Inf -> -Infinity
dqnextt789 nexttoward -1 -Inf -> -1.000000000000000000000000000000001
dqnextt790 nexttoward -0 -Inf -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt791 nexttoward 0 -Inf -> -1E-6176 Underflow Subnormal Inexact Rounded
dqnextt792 nexttoward 1 -Inf -> 0.9999999999999999999999999999999999
dqnextt793 nexttoward 1000 -Inf -> 999.9999999999999999999999999999999
dqnextt794 nexttoward Inf -Inf -> 9.999999999999999999999999999999999E+6144
dqnextt800 nexttoward Inf -Inf -> 9.999999999999999999999999999999999E+6144
dqnextt801 nexttoward Inf -1000 -> 9.999999999999999999999999999999999E+6144
dqnextt802 nexttoward Inf -1 -> 9.999999999999999999999999999999999E+6144
dqnextt803 nexttoward Inf -0 -> 9.999999999999999999999999999999999E+6144
dqnextt804 nexttoward Inf 0 -> 9.999999999999999999999999999999999E+6144
dqnextt805 nexttoward Inf 1 -> 9.999999999999999999999999999999999E+6144
dqnextt806 nexttoward Inf 1000 -> 9.999999999999999999999999999999999E+6144
dqnextt807 nexttoward Inf Inf -> Infinity
dqnextt808 nexttoward -1000 Inf -> -999.9999999999999999999999999999999
dqnextt809 nexttoward -Inf Inf -> -9.999999999999999999999999999999999E+6144
dqnextt810 nexttoward -1 Inf -> -0.9999999999999999999999999999999999
dqnextt811 nexttoward -0 Inf -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt812 nexttoward 0 Inf -> 1E-6176 Underflow Subnormal Inexact Rounded
dqnextt813 nexttoward 1 Inf -> 1.000000000000000000000000000000001
dqnextt814 nexttoward 1000 Inf -> 1000.000000000000000000000000000001
dqnextt815 nexttoward Inf Inf -> Infinity
dqnextt821 nexttoward NaN -Inf -> NaN
dqnextt822 nexttoward NaN -1000 -> NaN
dqnextt823 nexttoward NaN -1 -> NaN
dqnextt824 nexttoward NaN -0 -> NaN
dqnextt825 nexttoward NaN 0 -> NaN
dqnextt826 nexttoward NaN 1 -> NaN
dqnextt827 nexttoward NaN 1000 -> NaN
dqnextt828 nexttoward NaN Inf -> NaN
dqnextt829 nexttoward NaN NaN -> NaN
dqnextt830 nexttoward -Inf NaN -> NaN
dqnextt831 nexttoward -1000 NaN -> NaN
dqnextt832 nexttoward -1 NaN -> NaN
dqnextt833 nexttoward -0 NaN -> NaN
dqnextt834 nexttoward 0 NaN -> NaN
dqnextt835 nexttoward 1 NaN -> NaN
dqnextt836 nexttoward 1000 NaN -> NaN
dqnextt837 nexttoward Inf NaN -> NaN
dqnextt841 nexttoward sNaN -Inf -> NaN Invalid_operation
dqnextt842 nexttoward sNaN -1000 -> NaN Invalid_operation
dqnextt843 nexttoward sNaN -1 -> NaN Invalid_operation
dqnextt844 nexttoward sNaN -0 -> NaN Invalid_operation
dqnextt845 nexttoward sNaN 0 -> NaN Invalid_operation
dqnextt846 nexttoward sNaN 1 -> NaN Invalid_operation
dqnextt847 nexttoward sNaN 1000 -> NaN Invalid_operation
dqnextt848 nexttoward sNaN NaN -> NaN Invalid_operation
dqnextt849 nexttoward sNaN sNaN -> NaN Invalid_operation
dqnextt850 nexttoward NaN sNaN -> NaN Invalid_operation
dqnextt851 nexttoward -Inf sNaN -> NaN Invalid_operation
dqnextt852 nexttoward -1000 sNaN -> NaN Invalid_operation
dqnextt853 nexttoward -1 sNaN -> NaN Invalid_operation
dqnextt854 nexttoward -0 sNaN -> NaN Invalid_operation
dqnextt855 nexttoward 0 sNaN -> NaN Invalid_operation
dqnextt856 nexttoward 1 sNaN -> NaN Invalid_operation
dqnextt857 nexttoward 1000 sNaN -> NaN Invalid_operation
dqnextt858 nexttoward Inf sNaN -> NaN Invalid_operation
dqnextt859 nexttoward NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqnextt861 nexttoward NaN1 -Inf -> NaN1
dqnextt862 nexttoward +NaN2 -1000 -> NaN2
dqnextt863 nexttoward NaN3 1000 -> NaN3
dqnextt864 nexttoward NaN4 Inf -> NaN4
dqnextt865 nexttoward NaN5 +NaN6 -> NaN5
dqnextt866 nexttoward -Inf NaN7 -> NaN7
dqnextt867 nexttoward -1000 NaN8 -> NaN8
dqnextt868 nexttoward 1000 NaN9 -> NaN9
dqnextt869 nexttoward Inf +NaN10 -> NaN10
dqnextt871 nexttoward sNaN11 -Inf -> NaN11 Invalid_operation
dqnextt872 nexttoward sNaN12 -1000 -> NaN12 Invalid_operation
dqnextt873 nexttoward sNaN13 1000 -> NaN13 Invalid_operation
dqnextt874 nexttoward sNaN14 NaN17 -> NaN14 Invalid_operation
dqnextt875 nexttoward sNaN15 sNaN18 -> NaN15 Invalid_operation
dqnextt876 nexttoward NaN16 sNaN19 -> NaN19 Invalid_operation
dqnextt877 nexttoward -Inf +sNaN20 -> NaN20 Invalid_operation
dqnextt878 nexttoward -1000 sNaN21 -> NaN21 Invalid_operation
dqnextt879 nexttoward 1000 sNaN22 -> NaN22 Invalid_operation
dqnextt880 nexttoward Inf sNaN23 -> NaN23 Invalid_operation
dqnextt881 nexttoward +NaN25 +sNaN24 -> NaN24 Invalid_operation
dqnextt882 nexttoward -NaN26 NaN28 -> -NaN26
dqnextt883 nexttoward -sNaN27 sNaN29 -> -NaN27 Invalid_operation
dqnextt884 nexttoward 1000 -NaN30 -> -NaN30
dqnextt885 nexttoward 1000 -sNaN31 -> -NaN31 Invalid_operation
-- Null tests
dqnextt900 nexttoward 1 # -> NaN Invalid_operation
dqnextt901 nexttoward # 1 -> NaN Invalid_operation

View file

@ -1,401 +1,401 @@
------------------------------------------------------------------------
-- dqOr.decTest -- digitwise logical OR for decQuads --
-- 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
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check (truth table)
dqor001 or 0 0 -> 0
dqor002 or 0 1 -> 1
dqor003 or 1 0 -> 1
dqor004 or 1 1 -> 1
dqor005 or 1100 1010 -> 1110
-- and at msd and msd-1
dqor006 or 0000000000000000000000000000000000 0000000000000000000000000000000000 -> 0
dqor007 or 0000000000000000000000000000000000 1000000000000000000000000000000000 -> 1000000000000000000000000000000000
dqor008 or 1000000000000000000000000000000000 0000000000000000000000000000000000 -> 1000000000000000000000000000000000
dqor009 or 1000000000000000000000000000000000 1000000000000000000000000000000000 -> 1000000000000000000000000000000000
dqor010 or 0000000000000000000000000000000000 0000000000000000000000000000000000 -> 0
dqor011 or 0000000000000000000000000000000000 0100000000000000000000000000000000 -> 100000000000000000000000000000000
dqor012 or 0100000000000000000000000000000000 0000000000000000000000000000000000 -> 100000000000000000000000000000000
dqor013 or 0100000000000000000000000000000000 0100000000000000000000000000000000 -> 100000000000000000000000000000000
-- Various lengths
dqor601 or 0111111111111111111111111111111111 1111111111111111111111111111111110 -> 1111111111111111111111111111111111
dqor602 or 1011111111111111111111111111111111 1111111111111111111111111111111101 -> 1111111111111111111111111111111111
dqor603 or 1101111111111111111111111111111111 1111111111111111111111111111111011 -> 1111111111111111111111111111111111
dqor604 or 1110111111111111111111111111111111 1111111111111111111111111111110111 -> 1111111111111111111111111111111111
dqor605 or 1111011111111111111111111111111111 1111111111111111111111111111101111 -> 1111111111111111111111111111111111
dqor606 or 1111101111111111111111111111111111 1111111111111111111111111111011111 -> 1111111111111111111111111111111111
dqor607 or 1111110111111111111111111111111111 1111111111111111111111111110111111 -> 1111111111111111111111111111111111
dqor608 or 1111111011111111111111111111111111 1111111111111111111111111101111111 -> 1111111111111111111111111111111111
dqor609 or 1111111101111111111111111111111111 1111111111111111111111111011111111 -> 1111111111111111111111111111111111
dqor610 or 1111111110111111111111111111111111 1111111111111111111111110111111111 -> 1111111111111111111111111111111111
dqor611 or 1111111111011111111111111111111111 1111111111111111111111101111111111 -> 1111111111111111111111111111111111
dqor612 or 1111111111101111111111111111111111 1111111111111111111111011111111111 -> 1111111111111111111111111111111111
dqor613 or 1111111111110111111111111111111111 1111111111111111111110111111111111 -> 1111111111111111111111111111111111
dqor614 or 1111111111111011111111111111111111 1111111111111111111101111111111111 -> 1111111111111111111111111111111111
dqor615 or 1111111111111101111111111111111111 1111111111111111111011111111111111 -> 1111111111111111111111111111111111
dqor616 or 1111111111111110111111111111111111 1111111111111111110111111111111111 -> 1111111111111111111111111111111111
dqor617 or 1111111111111111011111111111111111 1111111111111111101111111111111111 -> 1111111111111111111111111111111111
dqor618 or 1111111111111111101111111111111111 1111111111111111011111111111111111 -> 1111111111111111111111111111111111
dqor619 or 1111111111111111110111111111111111 1111111111111110111111111111111111 -> 1111111111111111111111111111111111
dqor620 or 1111111111111111111011111111111111 1111111111111101111111111111111111 -> 1111111111111111111111111111111111
dqor621 or 1111111111111111111101111111111111 1111111111111011111111111111111111 -> 1111111111111111111111111111111111
dqor622 or 1111111111111111111110111111111111 1111111111110111111111111111111111 -> 1111111111111111111111111111111111
dqor623 or 1111111111111111111111011111111111 1111111111101111111111111111111111 -> 1111111111111111111111111111111111
dqor624 or 1111111111111111111111101111111111 1111111111011111111111111111111111 -> 1111111111111111111111111111111111
dqor625 or 1111111111111111111111110111111111 1111111110111111111111111111111111 -> 1111111111111111111111111111111111
dqor626 or 1111111111111111111111111011111111 1111111101111111111111111111111111 -> 1111111111111111111111111111111111
dqor627 or 1111111111111111111111111101111111 1111111011111111111111111111111111 -> 1111111111111111111111111111111111
dqor628 or 1111111111111111111111111110111111 1111110111111111111111111111111111 -> 1111111111111111111111111111111111
dqor629 or 1111111111111111111111111111011111 1111101111111111111111111111111111 -> 1111111111111111111111111111111111
dqor630 or 1111111111111111111111111111101111 1111011111111111111111111111111111 -> 1111111111111111111111111111111111
dqor631 or 1111111111111111111111111111110111 1110111111111111111111111111111111 -> 1111111111111111111111111111111111
dqor632 or 1111111111111111111111111111111011 1101111111111111111111111111111111 -> 1111111111111111111111111111111111
dqor633 or 1111111111111111111111111111111101 1011111111111111111111111111111111 -> 1111111111111111111111111111111111
dqor634 or 1111111111111111111111111111111110 0111111111111111111111111111111111 -> 1111111111111111111111111111111111
dqor641 or 1111111111111111111111111111111110 0111111111111111111111111111111111 -> 1111111111111111111111111111111111
dqor642 or 1111111111111111111111111111111101 1011111111111111111111111111111111 -> 1111111111111111111111111111111111
dqor643 or 1111111111111111111111111111111011 1101111111111111111111111111111111 -> 1111111111111111111111111111111111
dqor644 or 1111111111111111111111111111110111 1110111111111111111111111111111111 -> 1111111111111111111111111111111111
dqor645 or 1111111111111111111111111111101111 1111011111111111111111111111111111 -> 1111111111111111111111111111111111
dqor646 or 1111111111111111111111111111011111 1111101111111111111111111111111111 -> 1111111111111111111111111111111111
dqor647 or 1111111111111111111111111110111111 1111110111111111111111111111111111 -> 1111111111111111111111111111111111
dqor648 or 1111111111111111111111111101111111 1111111011111111111111111111111111 -> 1111111111111111111111111111111111
dqor649 or 1111111111111111111111111011111111 1111111101111111111111111111111111 -> 1111111111111111111111111111111111
dqor650 or 1111111111111111111111110111111111 1111111110111111111111111111111111 -> 1111111111111111111111111111111111
dqor651 or 1111111111111111111111101111111111 1111111111011111111111111111111111 -> 1111111111111111111111111111111111
dqor652 or 1111111111111111111111011111111111 1111111111101111111111111111111111 -> 1111111111111111111111111111111111
dqor653 or 1111111111111111111110111111111111 1111111111110111111111111111111111 -> 1111111111111111111111111111111111
dqor654 or 1111111111111111111101111111111111 1111111111111011111111111111111111 -> 1111111111111111111111111111111111
dqor655 or 1111111111111111111011111111111111 1111111111111101111111111111111111 -> 1111111111111111111111111111111111
dqor656 or 1111111111111111110111111111111111 1111111111111110111111111111111111 -> 1111111111111111111111111111111111
dqor657 or 1010101010101010101010101010101010 1010101010101010001010101010101010 -> 1010101010101010101010101010101010
dqor658 or 1111111111111111011111111111111111 1111111111111111101111111111111111 -> 1111111111111111111111111111111111
dqor659 or 1111111111111110111111111111111111 1111111111111111110111111111111111 -> 1111111111111111111111111111111111
dqor660 or 1111111111111101111111111111111111 1111111111111111111011111111111111 -> 1111111111111111111111111111111111
dqor661 or 1111111111111011111111111111111111 1111111111111111111101111111111111 -> 1111111111111111111111111111111111
dqor662 or 1111111111110111111111111111111111 1111111111111111111110111111111111 -> 1111111111111111111111111111111111
dqor663 or 1111111111101111111111111111111111 1111111111111111111111011111111111 -> 1111111111111111111111111111111111
dqor664 or 1111111111011111111111111111111111 1111111111111111111111101111111111 -> 1111111111111111111111111111111111
dqor665 or 1111111110111111111111111111111111 1111111111111111111111110111111111 -> 1111111111111111111111111111111111
dqor666 or 0101010101010101010101010101010101 0101010101010101010101010001010101 -> 101010101010101010101010101010101
dqor667 or 1111111011111111111111111111111111 1111111111111111111111111101111111 -> 1111111111111111111111111111111111
dqor668 or 1111110111111111111111111111111111 1111111111111111111111111110111111 -> 1111111111111111111111111111111111
dqor669 or 1111101111111111111111111111111111 1111111111111111111111111111011111 -> 1111111111111111111111111111111111
dqor670 or 1111011111111111111111111111111111 1111111111111111111111111111101111 -> 1111111111111111111111111111111111
dqor671 or 1110111111111111111111111111111111 1111111111111111111111111111110111 -> 1111111111111111111111111111111111
dqor672 or 1101111111111111111111111111111111 1111111111111111111111111111111011 -> 1111111111111111111111111111111111
dqor673 or 1011111111111111111111111111111111 1111111111111111111111111111111101 -> 1111111111111111111111111111111111
dqor674 or 0111111111111111111111111111111111 1111111111111111111111111111111110 -> 1111111111111111111111111111111111
dqor675 or 0111111111111111111111111111111110 1111111111111111111111111111111110 -> 1111111111111111111111111111111110
dqor676 or 1111111111111111111111111111111110 1111111111111111111111111111111110 -> 1111111111111111111111111111111110
dqor681 or 0111111111111111111111111111111111 0111111111011111111111111111111110 -> 111111111111111111111111111111111
dqor682 or 1011111111111111111111111111111111 1011111110101111111111111111111101 -> 1011111111111111111111111111111111
dqor683 or 1101111111111111111111111111111111 1101111101110111111111111111111011 -> 1101111111111111111111111111111111
dqor684 or 1110111111111111111111111111111111 1110111011111011111111111111110111 -> 1110111111111111111111111111111111
dqor685 or 1111011111111111111111111111111111 1111010111111101111111111111101111 -> 1111011111111111111111111111111111
dqor686 or 1111101111111111111111111111111111 1111101111111110111111111111011111 -> 1111101111111111111111111111111111
dqor687 or 1111110111111111111111111111111111 1111010111111111011111111110111111 -> 1111110111111111111111111111111111
dqor688 or 1111111011111111111111111111111111 1110111011111111101111111101111111 -> 1111111011111111111111111111111111
dqor689 or 1111111101111111111111111111111111 1101111101111111110111111011111111 -> 1111111101111111111111111111111111
dqor690 or 1111111110111111111111111111111111 1011111110111111111011110111111110 -> 1111111110111111111111111111111111
dqor691 or 1111111111011111111111111111111111 0111111111011111111101101111111101 -> 1111111111011111111111111111111111
dqor692 or 1111111111101111111111111111111111 1111111111101111111110011111111011 -> 1111111111101111111111111111111111
dqor693 or 1111111111110111111111111111111111 1111111111110111111110011111110111 -> 1111111111110111111111111111111111
dqor694 or 1111111111111011111111111111111111 1111111111111011111101101111101111 -> 1111111111111011111111111111111111
dqor695 or 1111111111111101111111111111111111 1111111111111101111011110111011111 -> 1111111111111101111111111111111111
dqor696 or 1111111111111110111111111111111111 1111111111111110110111111010111111 -> 1111111111111110111111111111111111
dqor697 or 1111111111111111011111111111111111 1111111111111111001111111101111111 -> 1111111111111111011111111111111111
dqor698 or 1111111111111111101111111111111111 1111111111111111001111111010111111 -> 1111111111111111101111111111111111
dqor699 or 1111111111111111110111111111111111 1111111111111110110111110111011111 -> 1111111111111111110111111111111111
dqor700 or 1111111111111111111011111111111111 1111111111111101111011101111101111 -> 1111111111111111111011111111111111
dqor701 or 1111111111111111111101111111111111 1111111111111011111101011111110111 -> 1111111111111111111101111111111111
dqor702 or 1111111111111111111110111111111111 1111111111110111111110111111111011 -> 1111111111111111111110111111111111
dqor703 or 1111111111111111111111011111111111 1111111111101111111101011111111101 -> 1111111111111111111111011111111111
dqor704 or 1111111111111111111111101111111111 1111111111011111111011101111111110 -> 1111111111111111111111101111111111
dqor705 or 1111111111111111111111110111111111 0111111110111111110111110111111111 -> 1111111111111111111111110111111111
dqor706 or 1111111111111111111111111011111111 1011111101111111101111111011111111 -> 1111111111111111111111111011111111
dqor707 or 1111111111111111111111111101111111 1101111011111111011111111101111111 -> 1111111111111111111111111101111111
dqor708 or 1111111111111111111111111110111111 1110110111111110111111111110111111 -> 1111111111111111111111111110111111
dqor709 or 1111111111111111111111111111011111 1111001111111101111111111111011111 -> 1111111111111111111111111111011111
dqor710 or 1111111111111111111111111111101111 1111001111111011111111111111101111 -> 1111111111111111111111111111101111
dqor711 or 1111111111111111111111111111110111 1110110111110111111111111111110111 -> 1111111111111111111111111111110111
dqor712 or 1111111111111111111111111111111011 1101111011101111111111111111111011 -> 1111111111111111111111111111111011
dqor713 or 1111111111111111111111111111111101 1011111101011111111111111111111101 -> 1111111111111111111111111111111101
dqor714 or 1111111111111111111111111111111110 0111111110111111111111111111111110 -> 1111111111111111111111111111111110
-- 1234567890123456 1234567890123456 1234567890123456
dqor020 or 1111111111111111 1111111111111111 -> 1111111111111111
dqor021 or 111111111111111 111111111111111 -> 111111111111111
dqor022 or 11111111111111 11111111111111 -> 11111111111111
dqor023 or 1111111111111 1111111111111 -> 1111111111111
dqor024 or 111111111111 111111111111 -> 111111111111
dqor025 or 11111111111 11111111111 -> 11111111111
dqor026 or 1111111111 1111111111 -> 1111111111
dqor027 or 111111111 111111111 -> 111111111
dqor028 or 11111111 11111111 -> 11111111
dqor029 or 1111111 1111111 -> 1111111
dqor030 or 111111 111111 -> 111111
dqor031 or 11111 11111 -> 11111
dqor032 or 1111 1111 -> 1111
dqor033 or 111 111 -> 111
dqor034 or 11 11 -> 11
dqor035 or 1 1 -> 1
dqor036 or 0 0 -> 0
dqor042 or 111111110000000 1111111110000000 -> 1111111110000000
dqor043 or 11111110000000 1000000100000000 -> 1011111110000000
dqor044 or 1111110000000 1000001000000000 -> 1001111110000000
dqor045 or 111110000000 1000010000000000 -> 1000111110000000
dqor046 or 11110000000 1000100000000000 -> 1000111110000000
dqor047 or 1110000000 1001000000000000 -> 1001001110000000
dqor048 or 110000000 1010000000000000 -> 1010000110000000
dqor049 or 10000000 1100000000000000 -> 1100000010000000
dqor090 or 011111111 111101111 -> 111111111
dqor091 or 101111111 111101111 -> 111111111
dqor092 or 110111111 111101111 -> 111111111
dqor093 or 111011111 111101111 -> 111111111
dqor094 or 111101111 111101111 -> 111101111
dqor095 or 111110111 111101111 -> 111111111
dqor096 or 111111011 111101111 -> 111111111
dqor097 or 111111101 111101111 -> 111111111
dqor098 or 111111110 111101111 -> 111111111
dqor100 or 111101111 011111111 -> 111111111
dqor101 or 111101111 101111111 -> 111111111
dqor102 or 111101111 110111111 -> 111111111
dqor103 or 111101111 111011111 -> 111111111
dqor104 or 111101111 111101111 -> 111101111
dqor105 or 111101111 111110111 -> 111111111
dqor106 or 111101111 111111011 -> 111111111
dqor107 or 111101111 111111101 -> 111111111
dqor108 or 111101111 111111110 -> 111111111
-- non-0/1 should not be accepted, nor should signs
dqor220 or 111111112 111111111 -> NaN Invalid_operation
dqor221 or 333333333 333333333 -> NaN Invalid_operation
dqor222 or 555555555 555555555 -> NaN Invalid_operation
dqor223 or 777777777 777777777 -> NaN Invalid_operation
dqor224 or 999999999 999999999 -> NaN Invalid_operation
dqor225 or 222222222 999999999 -> NaN Invalid_operation
dqor226 or 444444444 999999999 -> NaN Invalid_operation
dqor227 or 666666666 999999999 -> NaN Invalid_operation
dqor228 or 888888888 999999999 -> NaN Invalid_operation
dqor229 or 999999999 222222222 -> NaN Invalid_operation
dqor230 or 999999999 444444444 -> NaN Invalid_operation
dqor231 or 999999999 666666666 -> NaN Invalid_operation
dqor232 or 999999999 888888888 -> NaN Invalid_operation
-- a few randoms
dqor240 or 567468689 -934981942 -> NaN Invalid_operation
dqor241 or 567367689 934981942 -> NaN Invalid_operation
dqor242 or -631917772 -706014634 -> NaN Invalid_operation
dqor243 or -756253257 138579234 -> NaN Invalid_operation
dqor244 or 835590149 567435400 -> NaN Invalid_operation
-- test MSD
dqor250 or 2000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqor251 or 7000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqor252 or 8000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqor253 or 9000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqor254 or 2000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqor255 or 7000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqor256 or 8000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqor257 or 9000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqor258 or 1000000111000111000111000000000000 2000000111000111000111000000000000 -> NaN Invalid_operation
dqor259 or 1000000111000111000111000000000000 7000000111000111000111000000000000 -> NaN Invalid_operation
dqor260 or 1000000111000111000111000000000000 8000000111000111000111000000000000 -> NaN Invalid_operation
dqor261 or 1000000111000111000111000000000000 9000000111000111000111000000000000 -> NaN Invalid_operation
dqor262 or 0000000111000111000111000000000000 2000000111000111000111000000000000 -> NaN Invalid_operation
dqor263 or 0000000111000111000111000000000000 7000000111000111000111000000000000 -> NaN Invalid_operation
dqor264 or 0000000111000111000111000000000000 8000000111000111000111000000000000 -> NaN Invalid_operation
dqor265 or 0000000111000111000111000000000000 9000000111000111000111000000000000 -> NaN Invalid_operation
-- test MSD-1
dqor270 or 0200000111000111000111001000000000 1000000111000111000111100000000010 -> NaN Invalid_operation
dqor271 or 0700000111000111000111000100000000 1000000111000111000111010000000100 -> NaN Invalid_operation
dqor272 or 0800000111000111000111000010000000 1000000111000111000111001000001000 -> NaN Invalid_operation
dqor273 or 0900000111000111000111000001000000 1000000111000111000111000100010000 -> NaN Invalid_operation
dqor274 or 1000000111000111000111000000100000 0200000111000111000111000010100000 -> NaN Invalid_operation
dqor275 or 1000000111000111000111000000010000 0700000111000111000111000001000000 -> NaN Invalid_operation
dqor276 or 1000000111000111000111000000001000 0800000111000111000111000010100000 -> NaN Invalid_operation
dqor277 or 1000000111000111000111000000000100 0900000111000111000111000000010000 -> NaN Invalid_operation
-- test LSD
dqor280 or 0010000111000111000111000000000002 1000000111000111000111000100000001 -> NaN Invalid_operation
dqor281 or 0001000111000111000111000000000007 1000000111000111000111001000000011 -> NaN Invalid_operation
dqor282 or 0000000111000111000111100000000008 1000000111000111000111010000000001 -> NaN Invalid_operation
dqor283 or 0000000111000111000111010000000009 1000000111000111000111100000000001 -> NaN Invalid_operation
dqor284 or 1000000111000111000111001000000000 0001000111000111000111000000000002 -> NaN Invalid_operation
dqor285 or 1000000111000111000111000100000000 0010000111000111000111000000000007 -> NaN Invalid_operation
dqor286 or 1000000111000111000111000010000000 0100000111000111000111000000000008 -> NaN Invalid_operation
dqor287 or 1000000111000111000111000001000000 1000000111000111000111000000000009 -> NaN Invalid_operation
-- test Middie
dqor288 or 0010000111000111000111000020000000 1000000111000111000111001000000000 -> NaN Invalid_operation
dqor289 or 0001000111000111000111000070000001 1000000111000111000111000100000000 -> NaN Invalid_operation
dqor290 or 0000000111000111000111100080000010 1000000111000111000111000010000000 -> NaN Invalid_operation
dqor291 or 0000000111000111000111010090000100 1000000111000111000111000001000000 -> NaN Invalid_operation
dqor292 or 1000000111000111000111001000001000 0000000111000111000111000020100000 -> NaN Invalid_operation
dqor293 or 1000000111000111000111000100010000 0000000111000111000111000070010000 -> NaN Invalid_operation
dqor294 or 1000000111000111000111000010100000 0000000111000111000111000080001000 -> NaN Invalid_operation
dqor295 or 1000000111000111000111000001000000 0000000111000111000111000090000100 -> NaN Invalid_operation
-- signs
dqor296 or -1000000111000111000111000001000000 -0000001110001110001110010000000100 -> NaN Invalid_operation
dqor297 or -1000000111000111000111000001000000 0000001110001110001110000010000100 -> NaN Invalid_operation
dqor298 or 1000000111000111000111000001000000 -0000001110001110001110001000000100 -> NaN Invalid_operation
dqor299 or 1000000111000111000111000001000000 0000001110001110001110000011000100 -> 1000001111001111001111000011000100
-- Nmax, Nmin, Ntiny-like
dqor331 or 2 9.99999999E+1999 -> NaN Invalid_operation
dqor332 or 3 1E-1999 -> NaN Invalid_operation
dqor333 or 4 1.00000000E-1999 -> NaN Invalid_operation
dqor334 or 5 1E-1009 -> NaN Invalid_operation
dqor335 or 6 -1E-1009 -> NaN Invalid_operation
dqor336 or 7 -1.00000000E-1999 -> NaN Invalid_operation
dqor337 or 8 -1E-1999 -> NaN Invalid_operation
dqor338 or 9 -9.99999999E+1999 -> NaN Invalid_operation
dqor341 or 9.99999999E+2999 -18 -> NaN Invalid_operation
dqor342 or 1E-2999 01 -> NaN Invalid_operation
dqor343 or 1.00000000E-2999 -18 -> NaN Invalid_operation
dqor344 or 1E-1009 18 -> NaN Invalid_operation
dqor345 or -1E-1009 -10 -> NaN Invalid_operation
dqor346 or -1.00000000E-2999 18 -> NaN Invalid_operation
dqor347 or -1E-2999 10 -> NaN Invalid_operation
dqor348 or -9.99999999E+2999 -18 -> NaN Invalid_operation
-- A few other non-integers
dqor361 or 1.0 1 -> NaN Invalid_operation
dqor362 or 1E+1 1 -> NaN Invalid_operation
dqor363 or 0.0 1 -> NaN Invalid_operation
dqor364 or 0E+1 1 -> NaN Invalid_operation
dqor365 or 9.9 1 -> NaN Invalid_operation
dqor366 or 9E+1 1 -> NaN Invalid_operation
dqor371 or 0 1.0 -> NaN Invalid_operation
dqor372 or 0 1E+1 -> NaN Invalid_operation
dqor373 or 0 0.0 -> NaN Invalid_operation
dqor374 or 0 0E+1 -> NaN Invalid_operation
dqor375 or 0 9.9 -> NaN Invalid_operation
dqor376 or 0 9E+1 -> NaN Invalid_operation
-- All Specials are in error
dqor780 or -Inf -Inf -> NaN Invalid_operation
dqor781 or -Inf -1000 -> NaN Invalid_operation
dqor782 or -Inf -1 -> NaN Invalid_operation
dqor783 or -Inf -0 -> NaN Invalid_operation
dqor784 or -Inf 0 -> NaN Invalid_operation
dqor785 or -Inf 1 -> NaN Invalid_operation
dqor786 or -Inf 1000 -> NaN Invalid_operation
dqor787 or -1000 -Inf -> NaN Invalid_operation
dqor788 or -Inf -Inf -> NaN Invalid_operation
dqor789 or -1 -Inf -> NaN Invalid_operation
dqor790 or -0 -Inf -> NaN Invalid_operation
dqor791 or 0 -Inf -> NaN Invalid_operation
dqor792 or 1 -Inf -> NaN Invalid_operation
dqor793 or 1000 -Inf -> NaN Invalid_operation
dqor794 or Inf -Inf -> NaN Invalid_operation
dqor800 or Inf -Inf -> NaN Invalid_operation
dqor801 or Inf -1000 -> NaN Invalid_operation
dqor802 or Inf -1 -> NaN Invalid_operation
dqor803 or Inf -0 -> NaN Invalid_operation
dqor804 or Inf 0 -> NaN Invalid_operation
dqor805 or Inf 1 -> NaN Invalid_operation
dqor806 or Inf 1000 -> NaN Invalid_operation
dqor807 or Inf Inf -> NaN Invalid_operation
dqor808 or -1000 Inf -> NaN Invalid_operation
dqor809 or -Inf Inf -> NaN Invalid_operation
dqor810 or -1 Inf -> NaN Invalid_operation
dqor811 or -0 Inf -> NaN Invalid_operation
dqor812 or 0 Inf -> NaN Invalid_operation
dqor813 or 1 Inf -> NaN Invalid_operation
dqor814 or 1000 Inf -> NaN Invalid_operation
dqor815 or Inf Inf -> NaN Invalid_operation
dqor821 or NaN -Inf -> NaN Invalid_operation
dqor822 or NaN -1000 -> NaN Invalid_operation
dqor823 or NaN -1 -> NaN Invalid_operation
dqor824 or NaN -0 -> NaN Invalid_operation
dqor825 or NaN 0 -> NaN Invalid_operation
dqor826 or NaN 1 -> NaN Invalid_operation
dqor827 or NaN 1000 -> NaN Invalid_operation
dqor828 or NaN Inf -> NaN Invalid_operation
dqor829 or NaN NaN -> NaN Invalid_operation
dqor830 or -Inf NaN -> NaN Invalid_operation
dqor831 or -1000 NaN -> NaN Invalid_operation
dqor832 or -1 NaN -> NaN Invalid_operation
dqor833 or -0 NaN -> NaN Invalid_operation
dqor834 or 0 NaN -> NaN Invalid_operation
dqor835 or 1 NaN -> NaN Invalid_operation
dqor836 or 1000 NaN -> NaN Invalid_operation
dqor837 or Inf NaN -> NaN Invalid_operation
dqor841 or sNaN -Inf -> NaN Invalid_operation
dqor842 or sNaN -1000 -> NaN Invalid_operation
dqor843 or sNaN -1 -> NaN Invalid_operation
dqor844 or sNaN -0 -> NaN Invalid_operation
dqor845 or sNaN 0 -> NaN Invalid_operation
dqor846 or sNaN 1 -> NaN Invalid_operation
dqor847 or sNaN 1000 -> NaN Invalid_operation
dqor848 or sNaN NaN -> NaN Invalid_operation
dqor849 or sNaN sNaN -> NaN Invalid_operation
dqor850 or NaN sNaN -> NaN Invalid_operation
dqor851 or -Inf sNaN -> NaN Invalid_operation
dqor852 or -1000 sNaN -> NaN Invalid_operation
dqor853 or -1 sNaN -> NaN Invalid_operation
dqor854 or -0 sNaN -> NaN Invalid_operation
dqor855 or 0 sNaN -> NaN Invalid_operation
dqor856 or 1 sNaN -> NaN Invalid_operation
dqor857 or 1000 sNaN -> NaN Invalid_operation
dqor858 or Inf sNaN -> NaN Invalid_operation
dqor859 or NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqor861 or NaN1 -Inf -> NaN Invalid_operation
dqor862 or +NaN2 -1000 -> NaN Invalid_operation
dqor863 or NaN3 1000 -> NaN Invalid_operation
dqor864 or NaN4 Inf -> NaN Invalid_operation
dqor865 or NaN5 +NaN6 -> NaN Invalid_operation
dqor866 or -Inf NaN7 -> NaN Invalid_operation
dqor867 or -1000 NaN8 -> NaN Invalid_operation
dqor868 or 1000 NaN9 -> NaN Invalid_operation
dqor869 or Inf +NaN10 -> NaN Invalid_operation
dqor871 or sNaN11 -Inf -> NaN Invalid_operation
dqor872 or sNaN12 -1000 -> NaN Invalid_operation
dqor873 or sNaN13 1000 -> NaN Invalid_operation
dqor874 or sNaN14 NaN17 -> NaN Invalid_operation
dqor875 or sNaN15 sNaN18 -> NaN Invalid_operation
dqor876 or NaN16 sNaN19 -> NaN Invalid_operation
dqor877 or -Inf +sNaN20 -> NaN Invalid_operation
dqor878 or -1000 sNaN21 -> NaN Invalid_operation
dqor879 or 1000 sNaN22 -> NaN Invalid_operation
dqor880 or Inf sNaN23 -> NaN Invalid_operation
dqor881 or +NaN25 +sNaN24 -> NaN Invalid_operation
dqor882 or -NaN26 NaN28 -> NaN Invalid_operation
dqor883 or -sNaN27 sNaN29 -> NaN Invalid_operation
dqor884 or 1000 -NaN30 -> NaN Invalid_operation
dqor885 or 1000 -sNaN31 -> NaN Invalid_operation
------------------------------------------------------------------------
-- dqOr.decTest -- digitwise logical OR for decQuads --
-- 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
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check (truth table)
dqor001 or 0 0 -> 0
dqor002 or 0 1 -> 1
dqor003 or 1 0 -> 1
dqor004 or 1 1 -> 1
dqor005 or 1100 1010 -> 1110
-- and at msd and msd-1
dqor006 or 0000000000000000000000000000000000 0000000000000000000000000000000000 -> 0
dqor007 or 0000000000000000000000000000000000 1000000000000000000000000000000000 -> 1000000000000000000000000000000000
dqor008 or 1000000000000000000000000000000000 0000000000000000000000000000000000 -> 1000000000000000000000000000000000
dqor009 or 1000000000000000000000000000000000 1000000000000000000000000000000000 -> 1000000000000000000000000000000000
dqor010 or 0000000000000000000000000000000000 0000000000000000000000000000000000 -> 0
dqor011 or 0000000000000000000000000000000000 0100000000000000000000000000000000 -> 100000000000000000000000000000000
dqor012 or 0100000000000000000000000000000000 0000000000000000000000000000000000 -> 100000000000000000000000000000000
dqor013 or 0100000000000000000000000000000000 0100000000000000000000000000000000 -> 100000000000000000000000000000000
-- Various lengths
dqor601 or 0111111111111111111111111111111111 1111111111111111111111111111111110 -> 1111111111111111111111111111111111
dqor602 or 1011111111111111111111111111111111 1111111111111111111111111111111101 -> 1111111111111111111111111111111111
dqor603 or 1101111111111111111111111111111111 1111111111111111111111111111111011 -> 1111111111111111111111111111111111
dqor604 or 1110111111111111111111111111111111 1111111111111111111111111111110111 -> 1111111111111111111111111111111111
dqor605 or 1111011111111111111111111111111111 1111111111111111111111111111101111 -> 1111111111111111111111111111111111
dqor606 or 1111101111111111111111111111111111 1111111111111111111111111111011111 -> 1111111111111111111111111111111111
dqor607 or 1111110111111111111111111111111111 1111111111111111111111111110111111 -> 1111111111111111111111111111111111
dqor608 or 1111111011111111111111111111111111 1111111111111111111111111101111111 -> 1111111111111111111111111111111111
dqor609 or 1111111101111111111111111111111111 1111111111111111111111111011111111 -> 1111111111111111111111111111111111
dqor610 or 1111111110111111111111111111111111 1111111111111111111111110111111111 -> 1111111111111111111111111111111111
dqor611 or 1111111111011111111111111111111111 1111111111111111111111101111111111 -> 1111111111111111111111111111111111
dqor612 or 1111111111101111111111111111111111 1111111111111111111111011111111111 -> 1111111111111111111111111111111111
dqor613 or 1111111111110111111111111111111111 1111111111111111111110111111111111 -> 1111111111111111111111111111111111
dqor614 or 1111111111111011111111111111111111 1111111111111111111101111111111111 -> 1111111111111111111111111111111111
dqor615 or 1111111111111101111111111111111111 1111111111111111111011111111111111 -> 1111111111111111111111111111111111
dqor616 or 1111111111111110111111111111111111 1111111111111111110111111111111111 -> 1111111111111111111111111111111111
dqor617 or 1111111111111111011111111111111111 1111111111111111101111111111111111 -> 1111111111111111111111111111111111
dqor618 or 1111111111111111101111111111111111 1111111111111111011111111111111111 -> 1111111111111111111111111111111111
dqor619 or 1111111111111111110111111111111111 1111111111111110111111111111111111 -> 1111111111111111111111111111111111
dqor620 or 1111111111111111111011111111111111 1111111111111101111111111111111111 -> 1111111111111111111111111111111111
dqor621 or 1111111111111111111101111111111111 1111111111111011111111111111111111 -> 1111111111111111111111111111111111
dqor622 or 1111111111111111111110111111111111 1111111111110111111111111111111111 -> 1111111111111111111111111111111111
dqor623 or 1111111111111111111111011111111111 1111111111101111111111111111111111 -> 1111111111111111111111111111111111
dqor624 or 1111111111111111111111101111111111 1111111111011111111111111111111111 -> 1111111111111111111111111111111111
dqor625 or 1111111111111111111111110111111111 1111111110111111111111111111111111 -> 1111111111111111111111111111111111
dqor626 or 1111111111111111111111111011111111 1111111101111111111111111111111111 -> 1111111111111111111111111111111111
dqor627 or 1111111111111111111111111101111111 1111111011111111111111111111111111 -> 1111111111111111111111111111111111
dqor628 or 1111111111111111111111111110111111 1111110111111111111111111111111111 -> 1111111111111111111111111111111111
dqor629 or 1111111111111111111111111111011111 1111101111111111111111111111111111 -> 1111111111111111111111111111111111
dqor630 or 1111111111111111111111111111101111 1111011111111111111111111111111111 -> 1111111111111111111111111111111111
dqor631 or 1111111111111111111111111111110111 1110111111111111111111111111111111 -> 1111111111111111111111111111111111
dqor632 or 1111111111111111111111111111111011 1101111111111111111111111111111111 -> 1111111111111111111111111111111111
dqor633 or 1111111111111111111111111111111101 1011111111111111111111111111111111 -> 1111111111111111111111111111111111
dqor634 or 1111111111111111111111111111111110 0111111111111111111111111111111111 -> 1111111111111111111111111111111111
dqor641 or 1111111111111111111111111111111110 0111111111111111111111111111111111 -> 1111111111111111111111111111111111
dqor642 or 1111111111111111111111111111111101 1011111111111111111111111111111111 -> 1111111111111111111111111111111111
dqor643 or 1111111111111111111111111111111011 1101111111111111111111111111111111 -> 1111111111111111111111111111111111
dqor644 or 1111111111111111111111111111110111 1110111111111111111111111111111111 -> 1111111111111111111111111111111111
dqor645 or 1111111111111111111111111111101111 1111011111111111111111111111111111 -> 1111111111111111111111111111111111
dqor646 or 1111111111111111111111111111011111 1111101111111111111111111111111111 -> 1111111111111111111111111111111111
dqor647 or 1111111111111111111111111110111111 1111110111111111111111111111111111 -> 1111111111111111111111111111111111
dqor648 or 1111111111111111111111111101111111 1111111011111111111111111111111111 -> 1111111111111111111111111111111111
dqor649 or 1111111111111111111111111011111111 1111111101111111111111111111111111 -> 1111111111111111111111111111111111
dqor650 or 1111111111111111111111110111111111 1111111110111111111111111111111111 -> 1111111111111111111111111111111111
dqor651 or 1111111111111111111111101111111111 1111111111011111111111111111111111 -> 1111111111111111111111111111111111
dqor652 or 1111111111111111111111011111111111 1111111111101111111111111111111111 -> 1111111111111111111111111111111111
dqor653 or 1111111111111111111110111111111111 1111111111110111111111111111111111 -> 1111111111111111111111111111111111
dqor654 or 1111111111111111111101111111111111 1111111111111011111111111111111111 -> 1111111111111111111111111111111111
dqor655 or 1111111111111111111011111111111111 1111111111111101111111111111111111 -> 1111111111111111111111111111111111
dqor656 or 1111111111111111110111111111111111 1111111111111110111111111111111111 -> 1111111111111111111111111111111111
dqor657 or 1010101010101010101010101010101010 1010101010101010001010101010101010 -> 1010101010101010101010101010101010
dqor658 or 1111111111111111011111111111111111 1111111111111111101111111111111111 -> 1111111111111111111111111111111111
dqor659 or 1111111111111110111111111111111111 1111111111111111110111111111111111 -> 1111111111111111111111111111111111
dqor660 or 1111111111111101111111111111111111 1111111111111111111011111111111111 -> 1111111111111111111111111111111111
dqor661 or 1111111111111011111111111111111111 1111111111111111111101111111111111 -> 1111111111111111111111111111111111
dqor662 or 1111111111110111111111111111111111 1111111111111111111110111111111111 -> 1111111111111111111111111111111111
dqor663 or 1111111111101111111111111111111111 1111111111111111111111011111111111 -> 1111111111111111111111111111111111
dqor664 or 1111111111011111111111111111111111 1111111111111111111111101111111111 -> 1111111111111111111111111111111111
dqor665 or 1111111110111111111111111111111111 1111111111111111111111110111111111 -> 1111111111111111111111111111111111
dqor666 or 0101010101010101010101010101010101 0101010101010101010101010001010101 -> 101010101010101010101010101010101
dqor667 or 1111111011111111111111111111111111 1111111111111111111111111101111111 -> 1111111111111111111111111111111111
dqor668 or 1111110111111111111111111111111111 1111111111111111111111111110111111 -> 1111111111111111111111111111111111
dqor669 or 1111101111111111111111111111111111 1111111111111111111111111111011111 -> 1111111111111111111111111111111111
dqor670 or 1111011111111111111111111111111111 1111111111111111111111111111101111 -> 1111111111111111111111111111111111
dqor671 or 1110111111111111111111111111111111 1111111111111111111111111111110111 -> 1111111111111111111111111111111111
dqor672 or 1101111111111111111111111111111111 1111111111111111111111111111111011 -> 1111111111111111111111111111111111
dqor673 or 1011111111111111111111111111111111 1111111111111111111111111111111101 -> 1111111111111111111111111111111111
dqor674 or 0111111111111111111111111111111111 1111111111111111111111111111111110 -> 1111111111111111111111111111111111
dqor675 or 0111111111111111111111111111111110 1111111111111111111111111111111110 -> 1111111111111111111111111111111110
dqor676 or 1111111111111111111111111111111110 1111111111111111111111111111111110 -> 1111111111111111111111111111111110
dqor681 or 0111111111111111111111111111111111 0111111111011111111111111111111110 -> 111111111111111111111111111111111
dqor682 or 1011111111111111111111111111111111 1011111110101111111111111111111101 -> 1011111111111111111111111111111111
dqor683 or 1101111111111111111111111111111111 1101111101110111111111111111111011 -> 1101111111111111111111111111111111
dqor684 or 1110111111111111111111111111111111 1110111011111011111111111111110111 -> 1110111111111111111111111111111111
dqor685 or 1111011111111111111111111111111111 1111010111111101111111111111101111 -> 1111011111111111111111111111111111
dqor686 or 1111101111111111111111111111111111 1111101111111110111111111111011111 -> 1111101111111111111111111111111111
dqor687 or 1111110111111111111111111111111111 1111010111111111011111111110111111 -> 1111110111111111111111111111111111
dqor688 or 1111111011111111111111111111111111 1110111011111111101111111101111111 -> 1111111011111111111111111111111111
dqor689 or 1111111101111111111111111111111111 1101111101111111110111111011111111 -> 1111111101111111111111111111111111
dqor690 or 1111111110111111111111111111111111 1011111110111111111011110111111110 -> 1111111110111111111111111111111111
dqor691 or 1111111111011111111111111111111111 0111111111011111111101101111111101 -> 1111111111011111111111111111111111
dqor692 or 1111111111101111111111111111111111 1111111111101111111110011111111011 -> 1111111111101111111111111111111111
dqor693 or 1111111111110111111111111111111111 1111111111110111111110011111110111 -> 1111111111110111111111111111111111
dqor694 or 1111111111111011111111111111111111 1111111111111011111101101111101111 -> 1111111111111011111111111111111111
dqor695 or 1111111111111101111111111111111111 1111111111111101111011110111011111 -> 1111111111111101111111111111111111
dqor696 or 1111111111111110111111111111111111 1111111111111110110111111010111111 -> 1111111111111110111111111111111111
dqor697 or 1111111111111111011111111111111111 1111111111111111001111111101111111 -> 1111111111111111011111111111111111
dqor698 or 1111111111111111101111111111111111 1111111111111111001111111010111111 -> 1111111111111111101111111111111111
dqor699 or 1111111111111111110111111111111111 1111111111111110110111110111011111 -> 1111111111111111110111111111111111
dqor700 or 1111111111111111111011111111111111 1111111111111101111011101111101111 -> 1111111111111111111011111111111111
dqor701 or 1111111111111111111101111111111111 1111111111111011111101011111110111 -> 1111111111111111111101111111111111
dqor702 or 1111111111111111111110111111111111 1111111111110111111110111111111011 -> 1111111111111111111110111111111111
dqor703 or 1111111111111111111111011111111111 1111111111101111111101011111111101 -> 1111111111111111111111011111111111
dqor704 or 1111111111111111111111101111111111 1111111111011111111011101111111110 -> 1111111111111111111111101111111111
dqor705 or 1111111111111111111111110111111111 0111111110111111110111110111111111 -> 1111111111111111111111110111111111
dqor706 or 1111111111111111111111111011111111 1011111101111111101111111011111111 -> 1111111111111111111111111011111111
dqor707 or 1111111111111111111111111101111111 1101111011111111011111111101111111 -> 1111111111111111111111111101111111
dqor708 or 1111111111111111111111111110111111 1110110111111110111111111110111111 -> 1111111111111111111111111110111111
dqor709 or 1111111111111111111111111111011111 1111001111111101111111111111011111 -> 1111111111111111111111111111011111
dqor710 or 1111111111111111111111111111101111 1111001111111011111111111111101111 -> 1111111111111111111111111111101111
dqor711 or 1111111111111111111111111111110111 1110110111110111111111111111110111 -> 1111111111111111111111111111110111
dqor712 or 1111111111111111111111111111111011 1101111011101111111111111111111011 -> 1111111111111111111111111111111011
dqor713 or 1111111111111111111111111111111101 1011111101011111111111111111111101 -> 1111111111111111111111111111111101
dqor714 or 1111111111111111111111111111111110 0111111110111111111111111111111110 -> 1111111111111111111111111111111110
-- 1234567890123456 1234567890123456 1234567890123456
dqor020 or 1111111111111111 1111111111111111 -> 1111111111111111
dqor021 or 111111111111111 111111111111111 -> 111111111111111
dqor022 or 11111111111111 11111111111111 -> 11111111111111
dqor023 or 1111111111111 1111111111111 -> 1111111111111
dqor024 or 111111111111 111111111111 -> 111111111111
dqor025 or 11111111111 11111111111 -> 11111111111
dqor026 or 1111111111 1111111111 -> 1111111111
dqor027 or 111111111 111111111 -> 111111111
dqor028 or 11111111 11111111 -> 11111111
dqor029 or 1111111 1111111 -> 1111111
dqor030 or 111111 111111 -> 111111
dqor031 or 11111 11111 -> 11111
dqor032 or 1111 1111 -> 1111
dqor033 or 111 111 -> 111
dqor034 or 11 11 -> 11
dqor035 or 1 1 -> 1
dqor036 or 0 0 -> 0
dqor042 or 111111110000000 1111111110000000 -> 1111111110000000
dqor043 or 11111110000000 1000000100000000 -> 1011111110000000
dqor044 or 1111110000000 1000001000000000 -> 1001111110000000
dqor045 or 111110000000 1000010000000000 -> 1000111110000000
dqor046 or 11110000000 1000100000000000 -> 1000111110000000
dqor047 or 1110000000 1001000000000000 -> 1001001110000000
dqor048 or 110000000 1010000000000000 -> 1010000110000000
dqor049 or 10000000 1100000000000000 -> 1100000010000000
dqor090 or 011111111 111101111 -> 111111111
dqor091 or 101111111 111101111 -> 111111111
dqor092 or 110111111 111101111 -> 111111111
dqor093 or 111011111 111101111 -> 111111111
dqor094 or 111101111 111101111 -> 111101111
dqor095 or 111110111 111101111 -> 111111111
dqor096 or 111111011 111101111 -> 111111111
dqor097 or 111111101 111101111 -> 111111111
dqor098 or 111111110 111101111 -> 111111111
dqor100 or 111101111 011111111 -> 111111111
dqor101 or 111101111 101111111 -> 111111111
dqor102 or 111101111 110111111 -> 111111111
dqor103 or 111101111 111011111 -> 111111111
dqor104 or 111101111 111101111 -> 111101111
dqor105 or 111101111 111110111 -> 111111111
dqor106 or 111101111 111111011 -> 111111111
dqor107 or 111101111 111111101 -> 111111111
dqor108 or 111101111 111111110 -> 111111111
-- non-0/1 should not be accepted, nor should signs
dqor220 or 111111112 111111111 -> NaN Invalid_operation
dqor221 or 333333333 333333333 -> NaN Invalid_operation
dqor222 or 555555555 555555555 -> NaN Invalid_operation
dqor223 or 777777777 777777777 -> NaN Invalid_operation
dqor224 or 999999999 999999999 -> NaN Invalid_operation
dqor225 or 222222222 999999999 -> NaN Invalid_operation
dqor226 or 444444444 999999999 -> NaN Invalid_operation
dqor227 or 666666666 999999999 -> NaN Invalid_operation
dqor228 or 888888888 999999999 -> NaN Invalid_operation
dqor229 or 999999999 222222222 -> NaN Invalid_operation
dqor230 or 999999999 444444444 -> NaN Invalid_operation
dqor231 or 999999999 666666666 -> NaN Invalid_operation
dqor232 or 999999999 888888888 -> NaN Invalid_operation
-- a few randoms
dqor240 or 567468689 -934981942 -> NaN Invalid_operation
dqor241 or 567367689 934981942 -> NaN Invalid_operation
dqor242 or -631917772 -706014634 -> NaN Invalid_operation
dqor243 or -756253257 138579234 -> NaN Invalid_operation
dqor244 or 835590149 567435400 -> NaN Invalid_operation
-- test MSD
dqor250 or 2000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqor251 or 7000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqor252 or 8000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqor253 or 9000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqor254 or 2000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqor255 or 7000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqor256 or 8000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqor257 or 9000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqor258 or 1000000111000111000111000000000000 2000000111000111000111000000000000 -> NaN Invalid_operation
dqor259 or 1000000111000111000111000000000000 7000000111000111000111000000000000 -> NaN Invalid_operation
dqor260 or 1000000111000111000111000000000000 8000000111000111000111000000000000 -> NaN Invalid_operation
dqor261 or 1000000111000111000111000000000000 9000000111000111000111000000000000 -> NaN Invalid_operation
dqor262 or 0000000111000111000111000000000000 2000000111000111000111000000000000 -> NaN Invalid_operation
dqor263 or 0000000111000111000111000000000000 7000000111000111000111000000000000 -> NaN Invalid_operation
dqor264 or 0000000111000111000111000000000000 8000000111000111000111000000000000 -> NaN Invalid_operation
dqor265 or 0000000111000111000111000000000000 9000000111000111000111000000000000 -> NaN Invalid_operation
-- test MSD-1
dqor270 or 0200000111000111000111001000000000 1000000111000111000111100000000010 -> NaN Invalid_operation
dqor271 or 0700000111000111000111000100000000 1000000111000111000111010000000100 -> NaN Invalid_operation
dqor272 or 0800000111000111000111000010000000 1000000111000111000111001000001000 -> NaN Invalid_operation
dqor273 or 0900000111000111000111000001000000 1000000111000111000111000100010000 -> NaN Invalid_operation
dqor274 or 1000000111000111000111000000100000 0200000111000111000111000010100000 -> NaN Invalid_operation
dqor275 or 1000000111000111000111000000010000 0700000111000111000111000001000000 -> NaN Invalid_operation
dqor276 or 1000000111000111000111000000001000 0800000111000111000111000010100000 -> NaN Invalid_operation
dqor277 or 1000000111000111000111000000000100 0900000111000111000111000000010000 -> NaN Invalid_operation
-- test LSD
dqor280 or 0010000111000111000111000000000002 1000000111000111000111000100000001 -> NaN Invalid_operation
dqor281 or 0001000111000111000111000000000007 1000000111000111000111001000000011 -> NaN Invalid_operation
dqor282 or 0000000111000111000111100000000008 1000000111000111000111010000000001 -> NaN Invalid_operation
dqor283 or 0000000111000111000111010000000009 1000000111000111000111100000000001 -> NaN Invalid_operation
dqor284 or 1000000111000111000111001000000000 0001000111000111000111000000000002 -> NaN Invalid_operation
dqor285 or 1000000111000111000111000100000000 0010000111000111000111000000000007 -> NaN Invalid_operation
dqor286 or 1000000111000111000111000010000000 0100000111000111000111000000000008 -> NaN Invalid_operation
dqor287 or 1000000111000111000111000001000000 1000000111000111000111000000000009 -> NaN Invalid_operation
-- test Middie
dqor288 or 0010000111000111000111000020000000 1000000111000111000111001000000000 -> NaN Invalid_operation
dqor289 or 0001000111000111000111000070000001 1000000111000111000111000100000000 -> NaN Invalid_operation
dqor290 or 0000000111000111000111100080000010 1000000111000111000111000010000000 -> NaN Invalid_operation
dqor291 or 0000000111000111000111010090000100 1000000111000111000111000001000000 -> NaN Invalid_operation
dqor292 or 1000000111000111000111001000001000 0000000111000111000111000020100000 -> NaN Invalid_operation
dqor293 or 1000000111000111000111000100010000 0000000111000111000111000070010000 -> NaN Invalid_operation
dqor294 or 1000000111000111000111000010100000 0000000111000111000111000080001000 -> NaN Invalid_operation
dqor295 or 1000000111000111000111000001000000 0000000111000111000111000090000100 -> NaN Invalid_operation
-- signs
dqor296 or -1000000111000111000111000001000000 -0000001110001110001110010000000100 -> NaN Invalid_operation
dqor297 or -1000000111000111000111000001000000 0000001110001110001110000010000100 -> NaN Invalid_operation
dqor298 or 1000000111000111000111000001000000 -0000001110001110001110001000000100 -> NaN Invalid_operation
dqor299 or 1000000111000111000111000001000000 0000001110001110001110000011000100 -> 1000001111001111001111000011000100
-- Nmax, Nmin, Ntiny-like
dqor331 or 2 9.99999999E+1999 -> NaN Invalid_operation
dqor332 or 3 1E-1999 -> NaN Invalid_operation
dqor333 or 4 1.00000000E-1999 -> NaN Invalid_operation
dqor334 or 5 1E-1009 -> NaN Invalid_operation
dqor335 or 6 -1E-1009 -> NaN Invalid_operation
dqor336 or 7 -1.00000000E-1999 -> NaN Invalid_operation
dqor337 or 8 -1E-1999 -> NaN Invalid_operation
dqor338 or 9 -9.99999999E+1999 -> NaN Invalid_operation
dqor341 or 9.99999999E+2999 -18 -> NaN Invalid_operation
dqor342 or 1E-2999 01 -> NaN Invalid_operation
dqor343 or 1.00000000E-2999 -18 -> NaN Invalid_operation
dqor344 or 1E-1009 18 -> NaN Invalid_operation
dqor345 or -1E-1009 -10 -> NaN Invalid_operation
dqor346 or -1.00000000E-2999 18 -> NaN Invalid_operation
dqor347 or -1E-2999 10 -> NaN Invalid_operation
dqor348 or -9.99999999E+2999 -18 -> NaN Invalid_operation
-- A few other non-integers
dqor361 or 1.0 1 -> NaN Invalid_operation
dqor362 or 1E+1 1 -> NaN Invalid_operation
dqor363 or 0.0 1 -> NaN Invalid_operation
dqor364 or 0E+1 1 -> NaN Invalid_operation
dqor365 or 9.9 1 -> NaN Invalid_operation
dqor366 or 9E+1 1 -> NaN Invalid_operation
dqor371 or 0 1.0 -> NaN Invalid_operation
dqor372 or 0 1E+1 -> NaN Invalid_operation
dqor373 or 0 0.0 -> NaN Invalid_operation
dqor374 or 0 0E+1 -> NaN Invalid_operation
dqor375 or 0 9.9 -> NaN Invalid_operation
dqor376 or 0 9E+1 -> NaN Invalid_operation
-- All Specials are in error
dqor780 or -Inf -Inf -> NaN Invalid_operation
dqor781 or -Inf -1000 -> NaN Invalid_operation
dqor782 or -Inf -1 -> NaN Invalid_operation
dqor783 or -Inf -0 -> NaN Invalid_operation
dqor784 or -Inf 0 -> NaN Invalid_operation
dqor785 or -Inf 1 -> NaN Invalid_operation
dqor786 or -Inf 1000 -> NaN Invalid_operation
dqor787 or -1000 -Inf -> NaN Invalid_operation
dqor788 or -Inf -Inf -> NaN Invalid_operation
dqor789 or -1 -Inf -> NaN Invalid_operation
dqor790 or -0 -Inf -> NaN Invalid_operation
dqor791 or 0 -Inf -> NaN Invalid_operation
dqor792 or 1 -Inf -> NaN Invalid_operation
dqor793 or 1000 -Inf -> NaN Invalid_operation
dqor794 or Inf -Inf -> NaN Invalid_operation
dqor800 or Inf -Inf -> NaN Invalid_operation
dqor801 or Inf -1000 -> NaN Invalid_operation
dqor802 or Inf -1 -> NaN Invalid_operation
dqor803 or Inf -0 -> NaN Invalid_operation
dqor804 or Inf 0 -> NaN Invalid_operation
dqor805 or Inf 1 -> NaN Invalid_operation
dqor806 or Inf 1000 -> NaN Invalid_operation
dqor807 or Inf Inf -> NaN Invalid_operation
dqor808 or -1000 Inf -> NaN Invalid_operation
dqor809 or -Inf Inf -> NaN Invalid_operation
dqor810 or -1 Inf -> NaN Invalid_operation
dqor811 or -0 Inf -> NaN Invalid_operation
dqor812 or 0 Inf -> NaN Invalid_operation
dqor813 or 1 Inf -> NaN Invalid_operation
dqor814 or 1000 Inf -> NaN Invalid_operation
dqor815 or Inf Inf -> NaN Invalid_operation
dqor821 or NaN -Inf -> NaN Invalid_operation
dqor822 or NaN -1000 -> NaN Invalid_operation
dqor823 or NaN -1 -> NaN Invalid_operation
dqor824 or NaN -0 -> NaN Invalid_operation
dqor825 or NaN 0 -> NaN Invalid_operation
dqor826 or NaN 1 -> NaN Invalid_operation
dqor827 or NaN 1000 -> NaN Invalid_operation
dqor828 or NaN Inf -> NaN Invalid_operation
dqor829 or NaN NaN -> NaN Invalid_operation
dqor830 or -Inf NaN -> NaN Invalid_operation
dqor831 or -1000 NaN -> NaN Invalid_operation
dqor832 or -1 NaN -> NaN Invalid_operation
dqor833 or -0 NaN -> NaN Invalid_operation
dqor834 or 0 NaN -> NaN Invalid_operation
dqor835 or 1 NaN -> NaN Invalid_operation
dqor836 or 1000 NaN -> NaN Invalid_operation
dqor837 or Inf NaN -> NaN Invalid_operation
dqor841 or sNaN -Inf -> NaN Invalid_operation
dqor842 or sNaN -1000 -> NaN Invalid_operation
dqor843 or sNaN -1 -> NaN Invalid_operation
dqor844 or sNaN -0 -> NaN Invalid_operation
dqor845 or sNaN 0 -> NaN Invalid_operation
dqor846 or sNaN 1 -> NaN Invalid_operation
dqor847 or sNaN 1000 -> NaN Invalid_operation
dqor848 or sNaN NaN -> NaN Invalid_operation
dqor849 or sNaN sNaN -> NaN Invalid_operation
dqor850 or NaN sNaN -> NaN Invalid_operation
dqor851 or -Inf sNaN -> NaN Invalid_operation
dqor852 or -1000 sNaN -> NaN Invalid_operation
dqor853 or -1 sNaN -> NaN Invalid_operation
dqor854 or -0 sNaN -> NaN Invalid_operation
dqor855 or 0 sNaN -> NaN Invalid_operation
dqor856 or 1 sNaN -> NaN Invalid_operation
dqor857 or 1000 sNaN -> NaN Invalid_operation
dqor858 or Inf sNaN -> NaN Invalid_operation
dqor859 or NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqor861 or NaN1 -Inf -> NaN Invalid_operation
dqor862 or +NaN2 -1000 -> NaN Invalid_operation
dqor863 or NaN3 1000 -> NaN Invalid_operation
dqor864 or NaN4 Inf -> NaN Invalid_operation
dqor865 or NaN5 +NaN6 -> NaN Invalid_operation
dqor866 or -Inf NaN7 -> NaN Invalid_operation
dqor867 or -1000 NaN8 -> NaN Invalid_operation
dqor868 or 1000 NaN9 -> NaN Invalid_operation
dqor869 or Inf +NaN10 -> NaN Invalid_operation
dqor871 or sNaN11 -Inf -> NaN Invalid_operation
dqor872 or sNaN12 -1000 -> NaN Invalid_operation
dqor873 or sNaN13 1000 -> NaN Invalid_operation
dqor874 or sNaN14 NaN17 -> NaN Invalid_operation
dqor875 or sNaN15 sNaN18 -> NaN Invalid_operation
dqor876 or NaN16 sNaN19 -> NaN Invalid_operation
dqor877 or -Inf +sNaN20 -> NaN Invalid_operation
dqor878 or -1000 sNaN21 -> NaN Invalid_operation
dqor879 or 1000 sNaN22 -> NaN Invalid_operation
dqor880 or Inf sNaN23 -> NaN Invalid_operation
dqor881 or +NaN25 +sNaN24 -> NaN Invalid_operation
dqor882 or -NaN26 NaN28 -> NaN Invalid_operation
dqor883 or -sNaN27 sNaN29 -> NaN Invalid_operation
dqor884 or 1000 -NaN30 -> NaN Invalid_operation
dqor885 or 1000 -sNaN31 -> NaN Invalid_operation

View file

@ -1,88 +1,88 @@
------------------------------------------------------------------------
-- dqPlus.decTest -- decQuad 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 decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check
dqpls001 plus +7.50 -> 7.50
-- Infinities
dqpls011 plus Infinity -> Infinity
dqpls012 plus -Infinity -> -Infinity
-- NaNs, 0 payload
ddqls021 plus NaN -> NaN
ddqls022 plus -NaN -> -NaN
ddqls023 plus sNaN -> NaN Invalid_operation
ddqls024 plus -sNaN -> -NaN Invalid_operation
-- NaNs, non-0 payload
ddqls031 plus NaN13 -> NaN13
ddqls032 plus -NaN13 -> -NaN13
ddqls033 plus sNaN13 -> NaN13 Invalid_operation
ddqls034 plus -sNaN13 -> -NaN13 Invalid_operation
ddqls035 plus NaN70 -> NaN70
ddqls036 plus -NaN70 -> -NaN70
ddqls037 plus sNaN101 -> NaN101 Invalid_operation
ddqls038 plus -sNaN101 -> -NaN101 Invalid_operation
-- finites
dqpls101 plus 7 -> 7
dqpls102 plus -7 -> -7
dqpls103 plus 75 -> 75
dqpls104 plus -75 -> -75
dqpls105 plus 7.50 -> 7.50
dqpls106 plus -7.50 -> -7.50
dqpls107 plus 7.500 -> 7.500
dqpls108 plus -7.500 -> -7.500
-- zeros
dqpls111 plus 0 -> 0
dqpls112 plus -0 -> 0
dqpls113 plus 0E+4 -> 0E+4
dqpls114 plus -0E+4 -> 0E+4
dqpls115 plus 0.0000 -> 0.0000
dqpls116 plus -0.0000 -> 0.0000
dqpls117 plus 0E-141 -> 0E-141
dqpls118 plus -0E-141 -> 0E-141
-- full coefficients, alternating bits
dqpls121 plus 2682682682682682682682682682682682 -> 2682682682682682682682682682682682
dqpls122 plus -2682682682682682682682682682682682 -> -2682682682682682682682682682682682
dqpls123 plus 1341341341341341341341341341341341 -> 1341341341341341341341341341341341
dqpls124 plus -1341341341341341341341341341341341 -> -1341341341341341341341341341341341
-- Nmax, Nmin, Ntiny
dqpls131 plus 9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144
dqpls132 plus 1E-6143 -> 1E-6143
dqpls133 plus 1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
dqpls134 plus 1E-6176 -> 1E-6176 Subnormal
dqpls135 plus -1E-6176 -> -1E-6176 Subnormal
dqpls136 plus -1.000000000000000000000000000000000E-6143 -> -1.000000000000000000000000000000000E-6143
dqpls137 plus -1E-6143 -> -1E-6143
dqpls138 plus -9.999999999999999999999999999999999E+6144 -> -9.999999999999999999999999999999999E+6144
------------------------------------------------------------------------
-- dqPlus.decTest -- decQuad 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 decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check
dqpls001 plus +7.50 -> 7.50
-- Infinities
dqpls011 plus Infinity -> Infinity
dqpls012 plus -Infinity -> -Infinity
-- NaNs, 0 payload
ddqls021 plus NaN -> NaN
ddqls022 plus -NaN -> -NaN
ddqls023 plus sNaN -> NaN Invalid_operation
ddqls024 plus -sNaN -> -NaN Invalid_operation
-- NaNs, non-0 payload
ddqls031 plus NaN13 -> NaN13
ddqls032 plus -NaN13 -> -NaN13
ddqls033 plus sNaN13 -> NaN13 Invalid_operation
ddqls034 plus -sNaN13 -> -NaN13 Invalid_operation
ddqls035 plus NaN70 -> NaN70
ddqls036 plus -NaN70 -> -NaN70
ddqls037 plus sNaN101 -> NaN101 Invalid_operation
ddqls038 plus -sNaN101 -> -NaN101 Invalid_operation
-- finites
dqpls101 plus 7 -> 7
dqpls102 plus -7 -> -7
dqpls103 plus 75 -> 75
dqpls104 plus -75 -> -75
dqpls105 plus 7.50 -> 7.50
dqpls106 plus -7.50 -> -7.50
dqpls107 plus 7.500 -> 7.500
dqpls108 plus -7.500 -> -7.500
-- zeros
dqpls111 plus 0 -> 0
dqpls112 plus -0 -> 0
dqpls113 plus 0E+4 -> 0E+4
dqpls114 plus -0E+4 -> 0E+4
dqpls115 plus 0.0000 -> 0.0000
dqpls116 plus -0.0000 -> 0.0000
dqpls117 plus 0E-141 -> 0E-141
dqpls118 plus -0E-141 -> 0E-141
-- full coefficients, alternating bits
dqpls121 plus 2682682682682682682682682682682682 -> 2682682682682682682682682682682682
dqpls122 plus -2682682682682682682682682682682682 -> -2682682682682682682682682682682682
dqpls123 plus 1341341341341341341341341341341341 -> 1341341341341341341341341341341341
dqpls124 plus -1341341341341341341341341341341341 -> -1341341341341341341341341341341341
-- Nmax, Nmin, Ntiny
dqpls131 plus 9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144
dqpls132 plus 1E-6143 -> 1E-6143
dqpls133 plus 1.000000000000000000000000000000000E-6143 -> 1.000000000000000000000000000000000E-6143
dqpls134 plus 1E-6176 -> 1E-6176 Subnormal
dqpls135 plus -1E-6176 -> -1E-6176 Subnormal
dqpls136 plus -1.000000000000000000000000000000000E-6143 -> -1.000000000000000000000000000000000E-6143
dqpls137 plus -1E-6143 -> -1E-6143
dqpls138 plus -9.999999999999999999999999999999999E+6144 -> -9.999999999999999999999999999999999E+6144

File diff suppressed because it is too large Load diff

View file

@ -1,183 +1,183 @@
------------------------------------------------------------------------
-- dqReduce.decTest -- remove trailing zeros from a decQuad --
-- Copyright (c) IBM Corporation, 2003, 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
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
dqred001 reduce '1' -> '1'
dqred002 reduce '-1' -> '-1'
dqred003 reduce '1.00' -> '1'
dqred004 reduce '-1.00' -> '-1'
dqred005 reduce '0' -> '0'
dqred006 reduce '0.00' -> '0'
dqred007 reduce '00.0' -> '0'
dqred008 reduce '00.00' -> '0'
dqred009 reduce '00' -> '0'
dqred010 reduce '0E+1' -> '0'
dqred011 reduce '0E+5' -> '0'
dqred012 reduce '-2' -> '-2'
dqred013 reduce '2' -> '2'
dqred014 reduce '-2.00' -> '-2'
dqred015 reduce '2.00' -> '2'
dqred016 reduce '-0' -> '-0'
dqred017 reduce '-0.00' -> '-0'
dqred018 reduce '-00.0' -> '-0'
dqred019 reduce '-00.00' -> '-0'
dqred020 reduce '-00' -> '-0'
dqred021 reduce '-0E+5' -> '-0'
dqred022 reduce '-0E+1' -> '-0'
dqred030 reduce '+0.1' -> '0.1'
dqred031 reduce '-0.1' -> '-0.1'
dqred032 reduce '+0.01' -> '0.01'
dqred033 reduce '-0.01' -> '-0.01'
dqred034 reduce '+0.001' -> '0.001'
dqred035 reduce '-0.001' -> '-0.001'
dqred036 reduce '+0.000001' -> '0.000001'
dqred037 reduce '-0.000001' -> '-0.000001'
dqred038 reduce '+0.000000000001' -> '1E-12'
dqred039 reduce '-0.000000000001' -> '-1E-12'
dqred041 reduce 1.1 -> 1.1
dqred042 reduce 1.10 -> 1.1
dqred043 reduce 1.100 -> 1.1
dqred044 reduce 1.110 -> 1.11
dqred045 reduce -1.1 -> -1.1
dqred046 reduce -1.10 -> -1.1
dqred047 reduce -1.100 -> -1.1
dqred048 reduce -1.110 -> -1.11
dqred049 reduce 9.9 -> 9.9
dqred050 reduce 9.90 -> 9.9
dqred051 reduce 9.900 -> 9.9
dqred052 reduce 9.990 -> 9.99
dqred053 reduce -9.9 -> -9.9
dqred054 reduce -9.90 -> -9.9
dqred055 reduce -9.900 -> -9.9
dqred056 reduce -9.990 -> -9.99
-- some trailing fractional zeros with zeros in units
dqred060 reduce 10.0 -> 1E+1
dqred061 reduce 10.00 -> 1E+1
dqred062 reduce 100.0 -> 1E+2
dqred063 reduce 100.00 -> 1E+2
dqred064 reduce 1.1000E+3 -> 1.1E+3
dqred065 reduce 1.10000E+3 -> 1.1E+3
dqred066 reduce -10.0 -> -1E+1
dqred067 reduce -10.00 -> -1E+1
dqred068 reduce -100.0 -> -1E+2
dqred069 reduce -100.00 -> -1E+2
dqred070 reduce -1.1000E+3 -> -1.1E+3
dqred071 reduce -1.10000E+3 -> -1.1E+3
-- some insignificant trailing zeros with positive exponent
dqred080 reduce 10E+1 -> 1E+2
dqred081 reduce 100E+1 -> 1E+3
dqred082 reduce 1.0E+2 -> 1E+2
dqred083 reduce 1.0E+3 -> 1E+3
dqred084 reduce 1.1E+3 -> 1.1E+3
dqred085 reduce 1.00E+3 -> 1E+3
dqred086 reduce 1.10E+3 -> 1.1E+3
dqred087 reduce -10E+1 -> -1E+2
dqred088 reduce -100E+1 -> -1E+3
dqred089 reduce -1.0E+2 -> -1E+2
dqred090 reduce -1.0E+3 -> -1E+3
dqred091 reduce -1.1E+3 -> -1.1E+3
dqred092 reduce -1.00E+3 -> -1E+3
dqred093 reduce -1.10E+3 -> -1.1E+3
-- some significant trailing zeros, were we to be trimming
dqred100 reduce 11 -> 11
dqred101 reduce 10 -> 1E+1
dqred102 reduce 10. -> 1E+1
dqred103 reduce 1.1E+1 -> 11
dqred104 reduce 1.0E+1 -> 1E+1
dqred105 reduce 1.10E+2 -> 1.1E+2
dqred106 reduce 1.00E+2 -> 1E+2
dqred107 reduce 1.100E+3 -> 1.1E+3
dqred108 reduce 1.000E+3 -> 1E+3
dqred109 reduce 1.000000E+6 -> 1E+6
dqred110 reduce -11 -> -11
dqred111 reduce -10 -> -1E+1
dqred112 reduce -10. -> -1E+1
dqred113 reduce -1.1E+1 -> -11
dqred114 reduce -1.0E+1 -> -1E+1
dqred115 reduce -1.10E+2 -> -1.1E+2
dqred116 reduce -1.00E+2 -> -1E+2
dqred117 reduce -1.100E+3 -> -1.1E+3
dqred118 reduce -1.000E+3 -> -1E+3
dqred119 reduce -1.00000E+5 -> -1E+5
dqred120 reduce -1.000000E+6 -> -1E+6
dqred121 reduce -10.00000E+6 -> -1E+7
dqred122 reduce -100.0000E+6 -> -1E+8
dqred123 reduce -1000.000E+6 -> -1E+9
dqred124 reduce -10000.00E+6 -> -1E+10
dqred125 reduce -100000.0E+6 -> -1E+11
dqred126 reduce -1000000.E+6 -> -1E+12
-- examples from decArith
dqred140 reduce '2.1' -> '2.1'
dqred141 reduce '-2.0' -> '-2'
dqred142 reduce '1.200' -> '1.2'
dqred143 reduce '-120' -> '-1.2E+2'
dqred144 reduce '120.00' -> '1.2E+2'
dqred145 reduce '0.00' -> '0'
-- Nmax, Nmin, Ntiny
-- note origami effect on some of these
dqred151 reduce 9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144
dqred152 reduce 9.999999999999999999999999000000000E+6140 -> 9.99999999999999999999999900000E+6140
dqred153 reduce 9.999999999999999999999999999990000E+6144 -> 9.999999999999999999999999999990000E+6144
dqred154 reduce 1E-6143 -> 1E-6143
dqred155 reduce 1.000000000000000000000000000000000E-6143 -> 1E-6143
dqred156 reduce 2.000E-6173 -> 2E-6173 Subnormal
dqred157 reduce 1E-6176 -> 1E-6176 Subnormal
dqred161 reduce -1E-6176 -> -1E-6176 Subnormal
dqred162 reduce -2.000E-6173 -> -2E-6173 Subnormal
dqred163 reduce -1.000000000000000000000000000000000E-6143 -> -1E-6143
dqred164 reduce -1E-6143 -> -1E-6143
dqred165 reduce -9.999999999999999999999999000000000E+6140 -> -9.99999999999999999999999900000E+6140
dqred166 reduce -9.999999999999999999999999999990000E+6144 -> -9.999999999999999999999999999990000E+6144
dqred167 reduce -9.999999999999999999999999999999990E+6144 -> -9.999999999999999999999999999999990E+6144
dqred168 reduce -9.999999999999999999999999999999999E+6144 -> -9.999999999999999999999999999999999E+6144
dqred169 reduce -9.999999999999999999999999999999990E+6144 -> -9.999999999999999999999999999999990E+6144
-- specials (reduce does not affect payload)
dqred820 reduce 'Inf' -> 'Infinity'
dqred821 reduce '-Inf' -> '-Infinity'
dqred822 reduce NaN -> NaN
dqred823 reduce sNaN -> NaN Invalid_operation
dqred824 reduce NaN101 -> NaN101
dqred825 reduce sNaN010 -> NaN10 Invalid_operation
dqred827 reduce -NaN -> -NaN
dqred828 reduce -sNaN -> -NaN Invalid_operation
dqred829 reduce -NaN101 -> -NaN101
dqred830 reduce -sNaN010 -> -NaN10 Invalid_operation
-- Null test
dqred900 reduce # -> NaN Invalid_operation
------------------------------------------------------------------------
-- dqReduce.decTest -- remove trailing zeros from a decQuad --
-- Copyright (c) IBM Corporation, 2003, 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
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
dqred001 reduce '1' -> '1'
dqred002 reduce '-1' -> '-1'
dqred003 reduce '1.00' -> '1'
dqred004 reduce '-1.00' -> '-1'
dqred005 reduce '0' -> '0'
dqred006 reduce '0.00' -> '0'
dqred007 reduce '00.0' -> '0'
dqred008 reduce '00.00' -> '0'
dqred009 reduce '00' -> '0'
dqred010 reduce '0E+1' -> '0'
dqred011 reduce '0E+5' -> '0'
dqred012 reduce '-2' -> '-2'
dqred013 reduce '2' -> '2'
dqred014 reduce '-2.00' -> '-2'
dqred015 reduce '2.00' -> '2'
dqred016 reduce '-0' -> '-0'
dqred017 reduce '-0.00' -> '-0'
dqred018 reduce '-00.0' -> '-0'
dqred019 reduce '-00.00' -> '-0'
dqred020 reduce '-00' -> '-0'
dqred021 reduce '-0E+5' -> '-0'
dqred022 reduce '-0E+1' -> '-0'
dqred030 reduce '+0.1' -> '0.1'
dqred031 reduce '-0.1' -> '-0.1'
dqred032 reduce '+0.01' -> '0.01'
dqred033 reduce '-0.01' -> '-0.01'
dqred034 reduce '+0.001' -> '0.001'
dqred035 reduce '-0.001' -> '-0.001'
dqred036 reduce '+0.000001' -> '0.000001'
dqred037 reduce '-0.000001' -> '-0.000001'
dqred038 reduce '+0.000000000001' -> '1E-12'
dqred039 reduce '-0.000000000001' -> '-1E-12'
dqred041 reduce 1.1 -> 1.1
dqred042 reduce 1.10 -> 1.1
dqred043 reduce 1.100 -> 1.1
dqred044 reduce 1.110 -> 1.11
dqred045 reduce -1.1 -> -1.1
dqred046 reduce -1.10 -> -1.1
dqred047 reduce -1.100 -> -1.1
dqred048 reduce -1.110 -> -1.11
dqred049 reduce 9.9 -> 9.9
dqred050 reduce 9.90 -> 9.9
dqred051 reduce 9.900 -> 9.9
dqred052 reduce 9.990 -> 9.99
dqred053 reduce -9.9 -> -9.9
dqred054 reduce -9.90 -> -9.9
dqred055 reduce -9.900 -> -9.9
dqred056 reduce -9.990 -> -9.99
-- some trailing fractional zeros with zeros in units
dqred060 reduce 10.0 -> 1E+1
dqred061 reduce 10.00 -> 1E+1
dqred062 reduce 100.0 -> 1E+2
dqred063 reduce 100.00 -> 1E+2
dqred064 reduce 1.1000E+3 -> 1.1E+3
dqred065 reduce 1.10000E+3 -> 1.1E+3
dqred066 reduce -10.0 -> -1E+1
dqred067 reduce -10.00 -> -1E+1
dqred068 reduce -100.0 -> -1E+2
dqred069 reduce -100.00 -> -1E+2
dqred070 reduce -1.1000E+3 -> -1.1E+3
dqred071 reduce -1.10000E+3 -> -1.1E+3
-- some insignificant trailing zeros with positive exponent
dqred080 reduce 10E+1 -> 1E+2
dqred081 reduce 100E+1 -> 1E+3
dqred082 reduce 1.0E+2 -> 1E+2
dqred083 reduce 1.0E+3 -> 1E+3
dqred084 reduce 1.1E+3 -> 1.1E+3
dqred085 reduce 1.00E+3 -> 1E+3
dqred086 reduce 1.10E+3 -> 1.1E+3
dqred087 reduce -10E+1 -> -1E+2
dqred088 reduce -100E+1 -> -1E+3
dqred089 reduce -1.0E+2 -> -1E+2
dqred090 reduce -1.0E+3 -> -1E+3
dqred091 reduce -1.1E+3 -> -1.1E+3
dqred092 reduce -1.00E+3 -> -1E+3
dqred093 reduce -1.10E+3 -> -1.1E+3
-- some significant trailing zeros, were we to be trimming
dqred100 reduce 11 -> 11
dqred101 reduce 10 -> 1E+1
dqred102 reduce 10. -> 1E+1
dqred103 reduce 1.1E+1 -> 11
dqred104 reduce 1.0E+1 -> 1E+1
dqred105 reduce 1.10E+2 -> 1.1E+2
dqred106 reduce 1.00E+2 -> 1E+2
dqred107 reduce 1.100E+3 -> 1.1E+3
dqred108 reduce 1.000E+3 -> 1E+3
dqred109 reduce 1.000000E+6 -> 1E+6
dqred110 reduce -11 -> -11
dqred111 reduce -10 -> -1E+1
dqred112 reduce -10. -> -1E+1
dqred113 reduce -1.1E+1 -> -11
dqred114 reduce -1.0E+1 -> -1E+1
dqred115 reduce -1.10E+2 -> -1.1E+2
dqred116 reduce -1.00E+2 -> -1E+2
dqred117 reduce -1.100E+3 -> -1.1E+3
dqred118 reduce -1.000E+3 -> -1E+3
dqred119 reduce -1.00000E+5 -> -1E+5
dqred120 reduce -1.000000E+6 -> -1E+6
dqred121 reduce -10.00000E+6 -> -1E+7
dqred122 reduce -100.0000E+6 -> -1E+8
dqred123 reduce -1000.000E+6 -> -1E+9
dqred124 reduce -10000.00E+6 -> -1E+10
dqred125 reduce -100000.0E+6 -> -1E+11
dqred126 reduce -1000000.E+6 -> -1E+12
-- examples from decArith
dqred140 reduce '2.1' -> '2.1'
dqred141 reduce '-2.0' -> '-2'
dqred142 reduce '1.200' -> '1.2'
dqred143 reduce '-120' -> '-1.2E+2'
dqred144 reduce '120.00' -> '1.2E+2'
dqred145 reduce '0.00' -> '0'
-- Nmax, Nmin, Ntiny
-- note origami effect on some of these
dqred151 reduce 9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144
dqred152 reduce 9.999999999999999999999999000000000E+6140 -> 9.99999999999999999999999900000E+6140
dqred153 reduce 9.999999999999999999999999999990000E+6144 -> 9.999999999999999999999999999990000E+6144
dqred154 reduce 1E-6143 -> 1E-6143
dqred155 reduce 1.000000000000000000000000000000000E-6143 -> 1E-6143
dqred156 reduce 2.000E-6173 -> 2E-6173 Subnormal
dqred157 reduce 1E-6176 -> 1E-6176 Subnormal
dqred161 reduce -1E-6176 -> -1E-6176 Subnormal
dqred162 reduce -2.000E-6173 -> -2E-6173 Subnormal
dqred163 reduce -1.000000000000000000000000000000000E-6143 -> -1E-6143
dqred164 reduce -1E-6143 -> -1E-6143
dqred165 reduce -9.999999999999999999999999000000000E+6140 -> -9.99999999999999999999999900000E+6140
dqred166 reduce -9.999999999999999999999999999990000E+6144 -> -9.999999999999999999999999999990000E+6144
dqred167 reduce -9.999999999999999999999999999999990E+6144 -> -9.999999999999999999999999999999990E+6144
dqred168 reduce -9.999999999999999999999999999999999E+6144 -> -9.999999999999999999999999999999999E+6144
dqred169 reduce -9.999999999999999999999999999999990E+6144 -> -9.999999999999999999999999999999990E+6144
-- specials (reduce does not affect payload)
dqred820 reduce 'Inf' -> 'Infinity'
dqred821 reduce '-Inf' -> '-Infinity'
dqred822 reduce NaN -> NaN
dqred823 reduce sNaN -> NaN Invalid_operation
dqred824 reduce NaN101 -> NaN101
dqred825 reduce sNaN010 -> NaN10 Invalid_operation
dqred827 reduce -NaN -> -NaN
dqred828 reduce -sNaN -> -NaN Invalid_operation
dqred829 reduce -NaN101 -> -NaN101
dqred830 reduce -sNaN010 -> -NaN10 Invalid_operation
-- Null test
dqred900 reduce # -> NaN Invalid_operation

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,298 +1,298 @@
------------------------------------------------------------------------
-- dqRotate.decTest -- rotate decQuad coefficient left or right --
-- 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
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check
dqrot001 rotate 0 0 -> 0
dqrot002 rotate 0 2 -> 0
dqrot003 rotate 1 2 -> 100
dqrot004 rotate 1 33 -> 1000000000000000000000000000000000
dqrot005 rotate 1 34 -> 1
dqrot006 rotate 1 -1 -> 1000000000000000000000000000000000
dqrot007 rotate 0 -2 -> 0
dqrot008 rotate 1234567890123456789012345678901234 -1 -> 4123456789012345678901234567890123
dqrot009 rotate 1234567890123456789012345678901234 -33 -> 2345678901234567890123456789012341
dqrot010 rotate 1234567890123456789012345678901234 -34 -> 1234567890123456789012345678901234
dqrot011 rotate 9934567890123456789012345678901234 -33 -> 9345678901234567890123456789012349
dqrot012 rotate 9934567890123456789012345678901234 -34 -> 9934567890123456789012345678901234
-- rhs must be an integer
dqrot015 rotate 1 1.5 -> NaN Invalid_operation
dqrot016 rotate 1 1.0 -> NaN Invalid_operation
dqrot017 rotate 1 0.1 -> NaN Invalid_operation
dqrot018 rotate 1 0.0 -> NaN Invalid_operation
dqrot019 rotate 1 1E+1 -> NaN Invalid_operation
dqrot020 rotate 1 1E+99 -> NaN Invalid_operation
dqrot021 rotate 1 Inf -> NaN Invalid_operation
dqrot022 rotate 1 -Inf -> NaN Invalid_operation
-- and |rhs| <= precision
dqrot025 rotate 1 -1000 -> NaN Invalid_operation
dqrot026 rotate 1 -35 -> NaN Invalid_operation
dqrot027 rotate 1 35 -> NaN Invalid_operation
dqrot028 rotate 1 1000 -> NaN Invalid_operation
-- full pattern
dqrot030 rotate 1234567890123456789012345678901234 -34 -> 1234567890123456789012345678901234
dqrot031 rotate 1234567890123456789012345678901234 -33 -> 2345678901234567890123456789012341
dqrot032 rotate 1234567890123456789012345678901234 -32 -> 3456789012345678901234567890123412
dqrot033 rotate 1234567890123456789012345678901234 -31 -> 4567890123456789012345678901234123
dqrot034 rotate 1234567890123456789012345678901234 -30 -> 5678901234567890123456789012341234
dqrot035 rotate 1234567890123456789012345678901234 -29 -> 6789012345678901234567890123412345
dqrot036 rotate 1234567890123456789012345678901234 -28 -> 7890123456789012345678901234123456
dqrot037 rotate 1234567890123456789012345678901234 -27 -> 8901234567890123456789012341234567
dqrot038 rotate 1234567890123456789012345678901234 -26 -> 9012345678901234567890123412345678
dqrot039 rotate 1234567890123456789012345678901234 -25 -> 123456789012345678901234123456789
dqrot040 rotate 1234567890123456789012345678901234 -24 -> 1234567890123456789012341234567890
dqrot041 rotate 1234567890123456789012345678901234 -23 -> 2345678901234567890123412345678901
dqrot042 rotate 1234567890123456789012345678901234 -22 -> 3456789012345678901234123456789012
dqrot043 rotate 1234567890123456789012345678901234 -21 -> 4567890123456789012341234567890123
dqrot044 rotate 1234567890123456789012345678901234 -20 -> 5678901234567890123412345678901234
dqrot045 rotate 1234567890123456789012345678901234 -19 -> 6789012345678901234123456789012345
dqrot047 rotate 1234567890123456789012345678901234 -18 -> 7890123456789012341234567890123456
dqrot048 rotate 1234567890123456789012345678901234 -17 -> 8901234567890123412345678901234567
dqrot049 rotate 1234567890123456789012345678901234 -16 -> 9012345678901234123456789012345678
dqrot050 rotate 1234567890123456789012345678901234 -15 -> 123456789012341234567890123456789
dqrot051 rotate 1234567890123456789012345678901234 -14 -> 1234567890123412345678901234567890
dqrot052 rotate 1234567890123456789012345678901234 -13 -> 2345678901234123456789012345678901
dqrot053 rotate 1234567890123456789012345678901234 -12 -> 3456789012341234567890123456789012
dqrot054 rotate 1234567890123456789012345678901234 -11 -> 4567890123412345678901234567890123
dqrot055 rotate 1234567890123456789012345678901234 -10 -> 5678901234123456789012345678901234
dqrot056 rotate 1234567890123456789012345678901234 -9 -> 6789012341234567890123456789012345
dqrot057 rotate 1234567890123456789012345678901234 -8 -> 7890123412345678901234567890123456
dqrot058 rotate 1234567890123456789012345678901234 -7 -> 8901234123456789012345678901234567
dqrot059 rotate 1234567890123456789012345678901234 -6 -> 9012341234567890123456789012345678
dqrot060 rotate 1234567890123456789012345678901234 -5 -> 123412345678901234567890123456789
dqrot061 rotate 1234567890123456789012345678901234 -4 -> 1234123456789012345678901234567890
dqrot062 rotate 1234567890123456789012345678901234 -3 -> 2341234567890123456789012345678901
dqrot063 rotate 1234567890123456789012345678901234 -2 -> 3412345678901234567890123456789012
dqrot064 rotate 1234567890123456789012345678901234 -1 -> 4123456789012345678901234567890123
dqrot065 rotate 1234567890123456789012345678901234 -0 -> 1234567890123456789012345678901234
dqrot066 rotate 1234567890123456789012345678901234 +0 -> 1234567890123456789012345678901234
dqrot067 rotate 1234567890123456789012345678901234 +1 -> 2345678901234567890123456789012341
dqrot068 rotate 1234567890123456789012345678901234 +2 -> 3456789012345678901234567890123412
dqrot069 rotate 1234567890123456789012345678901234 +3 -> 4567890123456789012345678901234123
dqrot070 rotate 1234567890123456789012345678901234 +4 -> 5678901234567890123456789012341234
dqrot071 rotate 1234567890123456789012345678901234 +5 -> 6789012345678901234567890123412345
dqrot072 rotate 1234567890123456789012345678901234 +6 -> 7890123456789012345678901234123456
dqrot073 rotate 1234567890123456789012345678901234 +7 -> 8901234567890123456789012341234567
dqrot074 rotate 1234567890123456789012345678901234 +8 -> 9012345678901234567890123412345678
dqrot075 rotate 1234567890123456789012345678901234 +9 -> 123456789012345678901234123456789
dqrot076 rotate 1234567890123456789012345678901234 +10 -> 1234567890123456789012341234567890
dqrot077 rotate 1234567890123456789012345678901234 +11 -> 2345678901234567890123412345678901
dqrot078 rotate 1234567890123456789012345678901234 +12 -> 3456789012345678901234123456789012
dqrot079 rotate 1234567890123456789012345678901234 +13 -> 4567890123456789012341234567890123
dqrot080 rotate 1234567890123456789012345678901234 +14 -> 5678901234567890123412345678901234
dqrot081 rotate 1234567890123456789012345678901234 +15 -> 6789012345678901234123456789012345
dqrot082 rotate 1234567890123456789012345678901234 +16 -> 7890123456789012341234567890123456
dqrot083 rotate 1234567890123456789012345678901234 +17 -> 8901234567890123412345678901234567
dqrot084 rotate 1234567890123456789012345678901234 +18 -> 9012345678901234123456789012345678
dqrot085 rotate 1234567890123456789012345678901234 +19 -> 123456789012341234567890123456789
dqrot086 rotate 1234567890123456789012345678901234 +20 -> 1234567890123412345678901234567890
dqrot087 rotate 1234567890123456789012345678901234 +21 -> 2345678901234123456789012345678901
dqrot088 rotate 1234567890123456789012345678901234 +22 -> 3456789012341234567890123456789012
dqrot089 rotate 1234567890123456789012345678901234 +23 -> 4567890123412345678901234567890123
dqrot090 rotate 1234567890123456789012345678901234 +24 -> 5678901234123456789012345678901234
dqrot091 rotate 1234567890123456789012345678901234 +25 -> 6789012341234567890123456789012345
dqrot092 rotate 1234567890123456789012345678901234 +26 -> 7890123412345678901234567890123456
dqrot093 rotate 1234567890123456789012345678901234 +27 -> 8901234123456789012345678901234567
dqrot094 rotate 1234567890123456789012345678901234 +28 -> 9012341234567890123456789012345678
dqrot095 rotate 1234567890123456789012345678901234 +29 -> 123412345678901234567890123456789
dqrot096 rotate 1234567890123456789012345678901234 +30 -> 1234123456789012345678901234567890
dqrot097 rotate 1234567890123456789012345678901234 +31 -> 2341234567890123456789012345678901
dqrot098 rotate 1234567890123456789012345678901234 +32 -> 3412345678901234567890123456789012
dqrot099 rotate 1234567890123456789012345678901234 +33 -> 4123456789012345678901234567890123
dqrot100 rotate 1234567890123456789012345678901234 +34 -> 1234567890123456789012345678901234
-- zeros
dqrot270 rotate 0E-10 +29 -> 0E-10
dqrot271 rotate 0E-10 -29 -> 0E-10
dqrot272 rotate 0.000 +29 -> 0.000
dqrot273 rotate 0.000 -29 -> 0.000
dqrot274 rotate 0E+10 +29 -> 0E+10
dqrot275 rotate 0E+10 -29 -> 0E+10
dqrot276 rotate -0E-10 +29 -> -0E-10
dqrot277 rotate -0E-10 -29 -> -0E-10
dqrot278 rotate -0.000 +29 -> -0.000
dqrot279 rotate -0.000 -29 -> -0.000
dqrot280 rotate -0E+10 +29 -> -0E+10
dqrot281 rotate -0E+10 -29 -> -0E+10
-- Nmax, Nmin, Ntiny
dqrot141 rotate 9.999999999999999999999999999999999E+6144 -1 -> 9.999999999999999999999999999999999E+6144
dqrot142 rotate 9.999999999999999999999999999999999E+6144 -33 -> 9.999999999999999999999999999999999E+6144
dqrot143 rotate 9.999999999999999999999999999999999E+6144 1 -> 9.999999999999999999999999999999999E+6144
dqrot144 rotate 9.999999999999999999999999999999999E+6144 33 -> 9.999999999999999999999999999999999E+6144
dqrot145 rotate 1E-6143 -1 -> 1.000000000000000000000000000000000E-6110
dqrot146 rotate 1E-6143 -33 -> 1.0E-6142
dqrot147 rotate 1E-6143 1 -> 1.0E-6142
dqrot148 rotate 1E-6143 33 -> 1.000000000000000000000000000000000E-6110
dqrot151 rotate 1.000000000000000000000000000000000E-6143 -1 -> 1.00000000000000000000000000000000E-6144
dqrot152 rotate 1.000000000000000000000000000000000E-6143 -33 -> 1E-6176
dqrot153 rotate 1.000000000000000000000000000000000E-6143 1 -> 1E-6176
dqrot154 rotate 1.000000000000000000000000000000000E-6143 33 -> 1.00000000000000000000000000000000E-6144
dqrot155 rotate 9.000000000000000000000000000000000E-6143 -1 -> 9.00000000000000000000000000000000E-6144
dqrot156 rotate 9.000000000000000000000000000000000E-6143 -33 -> 9E-6176
dqrot157 rotate 9.000000000000000000000000000000000E-6143 1 -> 9E-6176
dqrot158 rotate 9.000000000000000000000000000000000E-6143 33 -> 9.00000000000000000000000000000000E-6144
dqrot160 rotate 1E-6176 -1 -> 1.000000000000000000000000000000000E-6143
dqrot161 rotate 1E-6176 -33 -> 1.0E-6175
dqrot162 rotate 1E-6176 1 -> 1.0E-6175
dqrot163 rotate 1E-6176 33 -> 1.000000000000000000000000000000000E-6143
-- negatives
dqrot171 rotate -9.999999999999999999999999999999999E+6144 -1 -> -9.999999999999999999999999999999999E+6144
dqrot172 rotate -9.999999999999999999999999999999999E+6144 -33 -> -9.999999999999999999999999999999999E+6144
dqrot173 rotate -9.999999999999999999999999999999999E+6144 1 -> -9.999999999999999999999999999999999E+6144
dqrot174 rotate -9.999999999999999999999999999999999E+6144 33 -> -9.999999999999999999999999999999999E+6144
dqrot175 rotate -1E-6143 -1 -> -1.000000000000000000000000000000000E-6110
dqrot176 rotate -1E-6143 -33 -> -1.0E-6142
dqrot177 rotate -1E-6143 1 -> -1.0E-6142
dqrot178 rotate -1E-6143 33 -> -1.000000000000000000000000000000000E-6110
dqrot181 rotate -1.000000000000000000000000000000000E-6143 -1 -> -1.00000000000000000000000000000000E-6144
dqrot182 rotate -1.000000000000000000000000000000000E-6143 -33 -> -1E-6176
dqrot183 rotate -1.000000000000000000000000000000000E-6143 1 -> -1E-6176
dqrot184 rotate -1.000000000000000000000000000000000E-6143 33 -> -1.00000000000000000000000000000000E-6144
dqrot185 rotate -9.000000000000000000000000000000000E-6143 -1 -> -9.00000000000000000000000000000000E-6144
dqrot186 rotate -9.000000000000000000000000000000000E-6143 -33 -> -9E-6176
dqrot187 rotate -9.000000000000000000000000000000000E-6143 1 -> -9E-6176
dqrot188 rotate -9.000000000000000000000000000000000E-6143 33 -> -9.00000000000000000000000000000000E-6144
dqrot190 rotate -1E-6176 -1 -> -1.000000000000000000000000000000000E-6143
dqrot191 rotate -1E-6176 -33 -> -1.0E-6175
dqrot192 rotate -1E-6176 1 -> -1.0E-6175
dqrot193 rotate -1E-6176 33 -> -1.000000000000000000000000000000000E-6143
-- more negatives (of sanities)
dqrot201 rotate -0 0 -> -0
dqrot202 rotate -0 2 -> -0
dqrot203 rotate -1 2 -> -100
dqrot204 rotate -1 33 -> -1000000000000000000000000000000000
dqrot205 rotate -1 34 -> -1
dqrot206 rotate -1 -1 -> -1000000000000000000000000000000000
dqrot207 rotate -0 -2 -> -0
dqrot208 rotate -1234567890123456789012345678901234 -1 -> -4123456789012345678901234567890123
dqrot209 rotate -1234567890123456789012345678901234 -33 -> -2345678901234567890123456789012341
dqrot210 rotate -1234567890123456789012345678901234 -34 -> -1234567890123456789012345678901234
dqrot211 rotate -9934567890123456789012345678901234 -33 -> -9345678901234567890123456789012349
dqrot212 rotate -9934567890123456789012345678901234 -34 -> -9934567890123456789012345678901234
-- Specials; NaNs are handled as usual
dqrot781 rotate -Inf -8 -> -Infinity
dqrot782 rotate -Inf -1 -> -Infinity
dqrot783 rotate -Inf -0 -> -Infinity
dqrot784 rotate -Inf 0 -> -Infinity
dqrot785 rotate -Inf 1 -> -Infinity
dqrot786 rotate -Inf 8 -> -Infinity
dqrot787 rotate -1000 -Inf -> NaN Invalid_operation
dqrot788 rotate -Inf -Inf -> NaN Invalid_operation
dqrot789 rotate -1 -Inf -> NaN Invalid_operation
dqrot790 rotate -0 -Inf -> NaN Invalid_operation
dqrot791 rotate 0 -Inf -> NaN Invalid_operation
dqrot792 rotate 1 -Inf -> NaN Invalid_operation
dqrot793 rotate 1000 -Inf -> NaN Invalid_operation
dqrot794 rotate Inf -Inf -> NaN Invalid_operation
dqrot800 rotate Inf -Inf -> NaN Invalid_operation
dqrot801 rotate Inf -8 -> Infinity
dqrot802 rotate Inf -1 -> Infinity
dqrot803 rotate Inf -0 -> Infinity
dqrot804 rotate Inf 0 -> Infinity
dqrot805 rotate Inf 1 -> Infinity
dqrot806 rotate Inf 8 -> Infinity
dqrot807 rotate Inf Inf -> NaN Invalid_operation
dqrot808 rotate -1000 Inf -> NaN Invalid_operation
dqrot809 rotate -Inf Inf -> NaN Invalid_operation
dqrot810 rotate -1 Inf -> NaN Invalid_operation
dqrot811 rotate -0 Inf -> NaN Invalid_operation
dqrot812 rotate 0 Inf -> NaN Invalid_operation
dqrot813 rotate 1 Inf -> NaN Invalid_operation
dqrot814 rotate 1000 Inf -> NaN Invalid_operation
dqrot815 rotate Inf Inf -> NaN Invalid_operation
dqrot821 rotate NaN -Inf -> NaN
dqrot822 rotate NaN -1000 -> NaN
dqrot823 rotate NaN -1 -> NaN
dqrot824 rotate NaN -0 -> NaN
dqrot825 rotate NaN 0 -> NaN
dqrot826 rotate NaN 1 -> NaN
dqrot827 rotate NaN 1000 -> NaN
dqrot828 rotate NaN Inf -> NaN
dqrot829 rotate NaN NaN -> NaN
dqrot830 rotate -Inf NaN -> NaN
dqrot831 rotate -1000 NaN -> NaN
dqrot832 rotate -1 NaN -> NaN
dqrot833 rotate -0 NaN -> NaN
dqrot834 rotate 0 NaN -> NaN
dqrot835 rotate 1 NaN -> NaN
dqrot836 rotate 1000 NaN -> NaN
dqrot837 rotate Inf NaN -> NaN
dqrot841 rotate sNaN -Inf -> NaN Invalid_operation
dqrot842 rotate sNaN -1000 -> NaN Invalid_operation
dqrot843 rotate sNaN -1 -> NaN Invalid_operation
dqrot844 rotate sNaN -0 -> NaN Invalid_operation
dqrot845 rotate sNaN 0 -> NaN Invalid_operation
dqrot846 rotate sNaN 1 -> NaN Invalid_operation
dqrot847 rotate sNaN 1000 -> NaN Invalid_operation
dqrot848 rotate sNaN NaN -> NaN Invalid_operation
dqrot849 rotate sNaN sNaN -> NaN Invalid_operation
dqrot850 rotate NaN sNaN -> NaN Invalid_operation
dqrot851 rotate -Inf sNaN -> NaN Invalid_operation
dqrot852 rotate -1000 sNaN -> NaN Invalid_operation
dqrot853 rotate -1 sNaN -> NaN Invalid_operation
dqrot854 rotate -0 sNaN -> NaN Invalid_operation
dqrot855 rotate 0 sNaN -> NaN Invalid_operation
dqrot856 rotate 1 sNaN -> NaN Invalid_operation
dqrot857 rotate 1000 sNaN -> NaN Invalid_operation
dqrot858 rotate Inf sNaN -> NaN Invalid_operation
dqrot859 rotate NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqrot861 rotate NaN1 -Inf -> NaN1
dqrot862 rotate +NaN2 -1000 -> NaN2
dqrot863 rotate NaN3 1000 -> NaN3
dqrot864 rotate NaN4 Inf -> NaN4
dqrot865 rotate NaN5 +NaN6 -> NaN5
dqrot866 rotate -Inf NaN7 -> NaN7
dqrot867 rotate -1000 NaN8 -> NaN8
dqrot868 rotate 1000 NaN9 -> NaN9
dqrot869 rotate Inf +NaN10 -> NaN10
dqrot871 rotate sNaN11 -Inf -> NaN11 Invalid_operation
dqrot872 rotate sNaN12 -1000 -> NaN12 Invalid_operation
dqrot873 rotate sNaN13 1000 -> NaN13 Invalid_operation
dqrot874 rotate sNaN14 NaN17 -> NaN14 Invalid_operation
dqrot875 rotate sNaN15 sNaN18 -> NaN15 Invalid_operation
dqrot876 rotate NaN16 sNaN19 -> NaN19 Invalid_operation
dqrot877 rotate -Inf +sNaN20 -> NaN20 Invalid_operation
dqrot878 rotate -1000 sNaN21 -> NaN21 Invalid_operation
dqrot879 rotate 1000 sNaN22 -> NaN22 Invalid_operation
dqrot880 rotate Inf sNaN23 -> NaN23 Invalid_operation
dqrot881 rotate +NaN25 +sNaN24 -> NaN24 Invalid_operation
dqrot882 rotate -NaN26 NaN28 -> -NaN26
dqrot883 rotate -sNaN27 sNaN29 -> -NaN27 Invalid_operation
dqrot884 rotate 1000 -NaN30 -> -NaN30
dqrot885 rotate 1000 -sNaN31 -> -NaN31 Invalid_operation
------------------------------------------------------------------------
-- dqRotate.decTest -- rotate decQuad coefficient left or right --
-- 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
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check
dqrot001 rotate 0 0 -> 0
dqrot002 rotate 0 2 -> 0
dqrot003 rotate 1 2 -> 100
dqrot004 rotate 1 33 -> 1000000000000000000000000000000000
dqrot005 rotate 1 34 -> 1
dqrot006 rotate 1 -1 -> 1000000000000000000000000000000000
dqrot007 rotate 0 -2 -> 0
dqrot008 rotate 1234567890123456789012345678901234 -1 -> 4123456789012345678901234567890123
dqrot009 rotate 1234567890123456789012345678901234 -33 -> 2345678901234567890123456789012341
dqrot010 rotate 1234567890123456789012345678901234 -34 -> 1234567890123456789012345678901234
dqrot011 rotate 9934567890123456789012345678901234 -33 -> 9345678901234567890123456789012349
dqrot012 rotate 9934567890123456789012345678901234 -34 -> 9934567890123456789012345678901234
-- rhs must be an integer
dqrot015 rotate 1 1.5 -> NaN Invalid_operation
dqrot016 rotate 1 1.0 -> NaN Invalid_operation
dqrot017 rotate 1 0.1 -> NaN Invalid_operation
dqrot018 rotate 1 0.0 -> NaN Invalid_operation
dqrot019 rotate 1 1E+1 -> NaN Invalid_operation
dqrot020 rotate 1 1E+99 -> NaN Invalid_operation
dqrot021 rotate 1 Inf -> NaN Invalid_operation
dqrot022 rotate 1 -Inf -> NaN Invalid_operation
-- and |rhs| <= precision
dqrot025 rotate 1 -1000 -> NaN Invalid_operation
dqrot026 rotate 1 -35 -> NaN Invalid_operation
dqrot027 rotate 1 35 -> NaN Invalid_operation
dqrot028 rotate 1 1000 -> NaN Invalid_operation
-- full pattern
dqrot030 rotate 1234567890123456789012345678901234 -34 -> 1234567890123456789012345678901234
dqrot031 rotate 1234567890123456789012345678901234 -33 -> 2345678901234567890123456789012341
dqrot032 rotate 1234567890123456789012345678901234 -32 -> 3456789012345678901234567890123412
dqrot033 rotate 1234567890123456789012345678901234 -31 -> 4567890123456789012345678901234123
dqrot034 rotate 1234567890123456789012345678901234 -30 -> 5678901234567890123456789012341234
dqrot035 rotate 1234567890123456789012345678901234 -29 -> 6789012345678901234567890123412345
dqrot036 rotate 1234567890123456789012345678901234 -28 -> 7890123456789012345678901234123456
dqrot037 rotate 1234567890123456789012345678901234 -27 -> 8901234567890123456789012341234567
dqrot038 rotate 1234567890123456789012345678901234 -26 -> 9012345678901234567890123412345678
dqrot039 rotate 1234567890123456789012345678901234 -25 -> 123456789012345678901234123456789
dqrot040 rotate 1234567890123456789012345678901234 -24 -> 1234567890123456789012341234567890
dqrot041 rotate 1234567890123456789012345678901234 -23 -> 2345678901234567890123412345678901
dqrot042 rotate 1234567890123456789012345678901234 -22 -> 3456789012345678901234123456789012
dqrot043 rotate 1234567890123456789012345678901234 -21 -> 4567890123456789012341234567890123
dqrot044 rotate 1234567890123456789012345678901234 -20 -> 5678901234567890123412345678901234
dqrot045 rotate 1234567890123456789012345678901234 -19 -> 6789012345678901234123456789012345
dqrot047 rotate 1234567890123456789012345678901234 -18 -> 7890123456789012341234567890123456
dqrot048 rotate 1234567890123456789012345678901234 -17 -> 8901234567890123412345678901234567
dqrot049 rotate 1234567890123456789012345678901234 -16 -> 9012345678901234123456789012345678
dqrot050 rotate 1234567890123456789012345678901234 -15 -> 123456789012341234567890123456789
dqrot051 rotate 1234567890123456789012345678901234 -14 -> 1234567890123412345678901234567890
dqrot052 rotate 1234567890123456789012345678901234 -13 -> 2345678901234123456789012345678901
dqrot053 rotate 1234567890123456789012345678901234 -12 -> 3456789012341234567890123456789012
dqrot054 rotate 1234567890123456789012345678901234 -11 -> 4567890123412345678901234567890123
dqrot055 rotate 1234567890123456789012345678901234 -10 -> 5678901234123456789012345678901234
dqrot056 rotate 1234567890123456789012345678901234 -9 -> 6789012341234567890123456789012345
dqrot057 rotate 1234567890123456789012345678901234 -8 -> 7890123412345678901234567890123456
dqrot058 rotate 1234567890123456789012345678901234 -7 -> 8901234123456789012345678901234567
dqrot059 rotate 1234567890123456789012345678901234 -6 -> 9012341234567890123456789012345678
dqrot060 rotate 1234567890123456789012345678901234 -5 -> 123412345678901234567890123456789
dqrot061 rotate 1234567890123456789012345678901234 -4 -> 1234123456789012345678901234567890
dqrot062 rotate 1234567890123456789012345678901234 -3 -> 2341234567890123456789012345678901
dqrot063 rotate 1234567890123456789012345678901234 -2 -> 3412345678901234567890123456789012
dqrot064 rotate 1234567890123456789012345678901234 -1 -> 4123456789012345678901234567890123
dqrot065 rotate 1234567890123456789012345678901234 -0 -> 1234567890123456789012345678901234
dqrot066 rotate 1234567890123456789012345678901234 +0 -> 1234567890123456789012345678901234
dqrot067 rotate 1234567890123456789012345678901234 +1 -> 2345678901234567890123456789012341
dqrot068 rotate 1234567890123456789012345678901234 +2 -> 3456789012345678901234567890123412
dqrot069 rotate 1234567890123456789012345678901234 +3 -> 4567890123456789012345678901234123
dqrot070 rotate 1234567890123456789012345678901234 +4 -> 5678901234567890123456789012341234
dqrot071 rotate 1234567890123456789012345678901234 +5 -> 6789012345678901234567890123412345
dqrot072 rotate 1234567890123456789012345678901234 +6 -> 7890123456789012345678901234123456
dqrot073 rotate 1234567890123456789012345678901234 +7 -> 8901234567890123456789012341234567
dqrot074 rotate 1234567890123456789012345678901234 +8 -> 9012345678901234567890123412345678
dqrot075 rotate 1234567890123456789012345678901234 +9 -> 123456789012345678901234123456789
dqrot076 rotate 1234567890123456789012345678901234 +10 -> 1234567890123456789012341234567890
dqrot077 rotate 1234567890123456789012345678901234 +11 -> 2345678901234567890123412345678901
dqrot078 rotate 1234567890123456789012345678901234 +12 -> 3456789012345678901234123456789012
dqrot079 rotate 1234567890123456789012345678901234 +13 -> 4567890123456789012341234567890123
dqrot080 rotate 1234567890123456789012345678901234 +14 -> 5678901234567890123412345678901234
dqrot081 rotate 1234567890123456789012345678901234 +15 -> 6789012345678901234123456789012345
dqrot082 rotate 1234567890123456789012345678901234 +16 -> 7890123456789012341234567890123456
dqrot083 rotate 1234567890123456789012345678901234 +17 -> 8901234567890123412345678901234567
dqrot084 rotate 1234567890123456789012345678901234 +18 -> 9012345678901234123456789012345678
dqrot085 rotate 1234567890123456789012345678901234 +19 -> 123456789012341234567890123456789
dqrot086 rotate 1234567890123456789012345678901234 +20 -> 1234567890123412345678901234567890
dqrot087 rotate 1234567890123456789012345678901234 +21 -> 2345678901234123456789012345678901
dqrot088 rotate 1234567890123456789012345678901234 +22 -> 3456789012341234567890123456789012
dqrot089 rotate 1234567890123456789012345678901234 +23 -> 4567890123412345678901234567890123
dqrot090 rotate 1234567890123456789012345678901234 +24 -> 5678901234123456789012345678901234
dqrot091 rotate 1234567890123456789012345678901234 +25 -> 6789012341234567890123456789012345
dqrot092 rotate 1234567890123456789012345678901234 +26 -> 7890123412345678901234567890123456
dqrot093 rotate 1234567890123456789012345678901234 +27 -> 8901234123456789012345678901234567
dqrot094 rotate 1234567890123456789012345678901234 +28 -> 9012341234567890123456789012345678
dqrot095 rotate 1234567890123456789012345678901234 +29 -> 123412345678901234567890123456789
dqrot096 rotate 1234567890123456789012345678901234 +30 -> 1234123456789012345678901234567890
dqrot097 rotate 1234567890123456789012345678901234 +31 -> 2341234567890123456789012345678901
dqrot098 rotate 1234567890123456789012345678901234 +32 -> 3412345678901234567890123456789012
dqrot099 rotate 1234567890123456789012345678901234 +33 -> 4123456789012345678901234567890123
dqrot100 rotate 1234567890123456789012345678901234 +34 -> 1234567890123456789012345678901234
-- zeros
dqrot270 rotate 0E-10 +29 -> 0E-10
dqrot271 rotate 0E-10 -29 -> 0E-10
dqrot272 rotate 0.000 +29 -> 0.000
dqrot273 rotate 0.000 -29 -> 0.000
dqrot274 rotate 0E+10 +29 -> 0E+10
dqrot275 rotate 0E+10 -29 -> 0E+10
dqrot276 rotate -0E-10 +29 -> -0E-10
dqrot277 rotate -0E-10 -29 -> -0E-10
dqrot278 rotate -0.000 +29 -> -0.000
dqrot279 rotate -0.000 -29 -> -0.000
dqrot280 rotate -0E+10 +29 -> -0E+10
dqrot281 rotate -0E+10 -29 -> -0E+10
-- Nmax, Nmin, Ntiny
dqrot141 rotate 9.999999999999999999999999999999999E+6144 -1 -> 9.999999999999999999999999999999999E+6144
dqrot142 rotate 9.999999999999999999999999999999999E+6144 -33 -> 9.999999999999999999999999999999999E+6144
dqrot143 rotate 9.999999999999999999999999999999999E+6144 1 -> 9.999999999999999999999999999999999E+6144
dqrot144 rotate 9.999999999999999999999999999999999E+6144 33 -> 9.999999999999999999999999999999999E+6144
dqrot145 rotate 1E-6143 -1 -> 1.000000000000000000000000000000000E-6110
dqrot146 rotate 1E-6143 -33 -> 1.0E-6142
dqrot147 rotate 1E-6143 1 -> 1.0E-6142
dqrot148 rotate 1E-6143 33 -> 1.000000000000000000000000000000000E-6110
dqrot151 rotate 1.000000000000000000000000000000000E-6143 -1 -> 1.00000000000000000000000000000000E-6144
dqrot152 rotate 1.000000000000000000000000000000000E-6143 -33 -> 1E-6176
dqrot153 rotate 1.000000000000000000000000000000000E-6143 1 -> 1E-6176
dqrot154 rotate 1.000000000000000000000000000000000E-6143 33 -> 1.00000000000000000000000000000000E-6144
dqrot155 rotate 9.000000000000000000000000000000000E-6143 -1 -> 9.00000000000000000000000000000000E-6144
dqrot156 rotate 9.000000000000000000000000000000000E-6143 -33 -> 9E-6176
dqrot157 rotate 9.000000000000000000000000000000000E-6143 1 -> 9E-6176
dqrot158 rotate 9.000000000000000000000000000000000E-6143 33 -> 9.00000000000000000000000000000000E-6144
dqrot160 rotate 1E-6176 -1 -> 1.000000000000000000000000000000000E-6143
dqrot161 rotate 1E-6176 -33 -> 1.0E-6175
dqrot162 rotate 1E-6176 1 -> 1.0E-6175
dqrot163 rotate 1E-6176 33 -> 1.000000000000000000000000000000000E-6143
-- negatives
dqrot171 rotate -9.999999999999999999999999999999999E+6144 -1 -> -9.999999999999999999999999999999999E+6144
dqrot172 rotate -9.999999999999999999999999999999999E+6144 -33 -> -9.999999999999999999999999999999999E+6144
dqrot173 rotate -9.999999999999999999999999999999999E+6144 1 -> -9.999999999999999999999999999999999E+6144
dqrot174 rotate -9.999999999999999999999999999999999E+6144 33 -> -9.999999999999999999999999999999999E+6144
dqrot175 rotate -1E-6143 -1 -> -1.000000000000000000000000000000000E-6110
dqrot176 rotate -1E-6143 -33 -> -1.0E-6142
dqrot177 rotate -1E-6143 1 -> -1.0E-6142
dqrot178 rotate -1E-6143 33 -> -1.000000000000000000000000000000000E-6110
dqrot181 rotate -1.000000000000000000000000000000000E-6143 -1 -> -1.00000000000000000000000000000000E-6144
dqrot182 rotate -1.000000000000000000000000000000000E-6143 -33 -> -1E-6176
dqrot183 rotate -1.000000000000000000000000000000000E-6143 1 -> -1E-6176
dqrot184 rotate -1.000000000000000000000000000000000E-6143 33 -> -1.00000000000000000000000000000000E-6144
dqrot185 rotate -9.000000000000000000000000000000000E-6143 -1 -> -9.00000000000000000000000000000000E-6144
dqrot186 rotate -9.000000000000000000000000000000000E-6143 -33 -> -9E-6176
dqrot187 rotate -9.000000000000000000000000000000000E-6143 1 -> -9E-6176
dqrot188 rotate -9.000000000000000000000000000000000E-6143 33 -> -9.00000000000000000000000000000000E-6144
dqrot190 rotate -1E-6176 -1 -> -1.000000000000000000000000000000000E-6143
dqrot191 rotate -1E-6176 -33 -> -1.0E-6175
dqrot192 rotate -1E-6176 1 -> -1.0E-6175
dqrot193 rotate -1E-6176 33 -> -1.000000000000000000000000000000000E-6143
-- more negatives (of sanities)
dqrot201 rotate -0 0 -> -0
dqrot202 rotate -0 2 -> -0
dqrot203 rotate -1 2 -> -100
dqrot204 rotate -1 33 -> -1000000000000000000000000000000000
dqrot205 rotate -1 34 -> -1
dqrot206 rotate -1 -1 -> -1000000000000000000000000000000000
dqrot207 rotate -0 -2 -> -0
dqrot208 rotate -1234567890123456789012345678901234 -1 -> -4123456789012345678901234567890123
dqrot209 rotate -1234567890123456789012345678901234 -33 -> -2345678901234567890123456789012341
dqrot210 rotate -1234567890123456789012345678901234 -34 -> -1234567890123456789012345678901234
dqrot211 rotate -9934567890123456789012345678901234 -33 -> -9345678901234567890123456789012349
dqrot212 rotate -9934567890123456789012345678901234 -34 -> -9934567890123456789012345678901234
-- Specials; NaNs are handled as usual
dqrot781 rotate -Inf -8 -> -Infinity
dqrot782 rotate -Inf -1 -> -Infinity
dqrot783 rotate -Inf -0 -> -Infinity
dqrot784 rotate -Inf 0 -> -Infinity
dqrot785 rotate -Inf 1 -> -Infinity
dqrot786 rotate -Inf 8 -> -Infinity
dqrot787 rotate -1000 -Inf -> NaN Invalid_operation
dqrot788 rotate -Inf -Inf -> NaN Invalid_operation
dqrot789 rotate -1 -Inf -> NaN Invalid_operation
dqrot790 rotate -0 -Inf -> NaN Invalid_operation
dqrot791 rotate 0 -Inf -> NaN Invalid_operation
dqrot792 rotate 1 -Inf -> NaN Invalid_operation
dqrot793 rotate 1000 -Inf -> NaN Invalid_operation
dqrot794 rotate Inf -Inf -> NaN Invalid_operation
dqrot800 rotate Inf -Inf -> NaN Invalid_operation
dqrot801 rotate Inf -8 -> Infinity
dqrot802 rotate Inf -1 -> Infinity
dqrot803 rotate Inf -0 -> Infinity
dqrot804 rotate Inf 0 -> Infinity
dqrot805 rotate Inf 1 -> Infinity
dqrot806 rotate Inf 8 -> Infinity
dqrot807 rotate Inf Inf -> NaN Invalid_operation
dqrot808 rotate -1000 Inf -> NaN Invalid_operation
dqrot809 rotate -Inf Inf -> NaN Invalid_operation
dqrot810 rotate -1 Inf -> NaN Invalid_operation
dqrot811 rotate -0 Inf -> NaN Invalid_operation
dqrot812 rotate 0 Inf -> NaN Invalid_operation
dqrot813 rotate 1 Inf -> NaN Invalid_operation
dqrot814 rotate 1000 Inf -> NaN Invalid_operation
dqrot815 rotate Inf Inf -> NaN Invalid_operation
dqrot821 rotate NaN -Inf -> NaN
dqrot822 rotate NaN -1000 -> NaN
dqrot823 rotate NaN -1 -> NaN
dqrot824 rotate NaN -0 -> NaN
dqrot825 rotate NaN 0 -> NaN
dqrot826 rotate NaN 1 -> NaN
dqrot827 rotate NaN 1000 -> NaN
dqrot828 rotate NaN Inf -> NaN
dqrot829 rotate NaN NaN -> NaN
dqrot830 rotate -Inf NaN -> NaN
dqrot831 rotate -1000 NaN -> NaN
dqrot832 rotate -1 NaN -> NaN
dqrot833 rotate -0 NaN -> NaN
dqrot834 rotate 0 NaN -> NaN
dqrot835 rotate 1 NaN -> NaN
dqrot836 rotate 1000 NaN -> NaN
dqrot837 rotate Inf NaN -> NaN
dqrot841 rotate sNaN -Inf -> NaN Invalid_operation
dqrot842 rotate sNaN -1000 -> NaN Invalid_operation
dqrot843 rotate sNaN -1 -> NaN Invalid_operation
dqrot844 rotate sNaN -0 -> NaN Invalid_operation
dqrot845 rotate sNaN 0 -> NaN Invalid_operation
dqrot846 rotate sNaN 1 -> NaN Invalid_operation
dqrot847 rotate sNaN 1000 -> NaN Invalid_operation
dqrot848 rotate sNaN NaN -> NaN Invalid_operation
dqrot849 rotate sNaN sNaN -> NaN Invalid_operation
dqrot850 rotate NaN sNaN -> NaN Invalid_operation
dqrot851 rotate -Inf sNaN -> NaN Invalid_operation
dqrot852 rotate -1000 sNaN -> NaN Invalid_operation
dqrot853 rotate -1 sNaN -> NaN Invalid_operation
dqrot854 rotate -0 sNaN -> NaN Invalid_operation
dqrot855 rotate 0 sNaN -> NaN Invalid_operation
dqrot856 rotate 1 sNaN -> NaN Invalid_operation
dqrot857 rotate 1000 sNaN -> NaN Invalid_operation
dqrot858 rotate Inf sNaN -> NaN Invalid_operation
dqrot859 rotate NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqrot861 rotate NaN1 -Inf -> NaN1
dqrot862 rotate +NaN2 -1000 -> NaN2
dqrot863 rotate NaN3 1000 -> NaN3
dqrot864 rotate NaN4 Inf -> NaN4
dqrot865 rotate NaN5 +NaN6 -> NaN5
dqrot866 rotate -Inf NaN7 -> NaN7
dqrot867 rotate -1000 NaN8 -> NaN8
dqrot868 rotate 1000 NaN9 -> NaN9
dqrot869 rotate Inf +NaN10 -> NaN10
dqrot871 rotate sNaN11 -Inf -> NaN11 Invalid_operation
dqrot872 rotate sNaN12 -1000 -> NaN12 Invalid_operation
dqrot873 rotate sNaN13 1000 -> NaN13 Invalid_operation
dqrot874 rotate sNaN14 NaN17 -> NaN14 Invalid_operation
dqrot875 rotate sNaN15 sNaN18 -> NaN15 Invalid_operation
dqrot876 rotate NaN16 sNaN19 -> NaN19 Invalid_operation
dqrot877 rotate -Inf +sNaN20 -> NaN20 Invalid_operation
dqrot878 rotate -1000 sNaN21 -> NaN21 Invalid_operation
dqrot879 rotate 1000 sNaN22 -> NaN22 Invalid_operation
dqrot880 rotate Inf sNaN23 -> NaN23 Invalid_operation
dqrot881 rotate +NaN25 +sNaN24 -> NaN24 Invalid_operation
dqrot882 rotate -NaN26 NaN28 -> -NaN26
dqrot883 rotate -sNaN27 sNaN29 -> -NaN27 Invalid_operation
dqrot884 rotate 1000 -NaN30 -> -NaN30
dqrot885 rotate 1000 -sNaN31 -> -NaN31 Invalid_operation

View file

@ -1,389 +1,389 @@
------------------------------------------------------------------------
-- dqSameQuantum.decTest -- check decQuad quantums match --
-- Copyright (c) IBM Corporation, 2001, 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 decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
dqsamq001 samequantum 0 0 -> 1
dqsamq002 samequantum 0 1 -> 1
dqsamq003 samequantum 1 0 -> 1
dqsamq004 samequantum 1 1 -> 1
dqsamq011 samequantum 10 1E+1 -> 0
dqsamq012 samequantum 10E+1 10E+1 -> 1
dqsamq013 samequantum 100 10E+1 -> 0
dqsamq014 samequantum 100 1E+2 -> 0
dqsamq015 samequantum 0.1 1E-2 -> 0
dqsamq016 samequantum 0.1 1E-1 -> 1
dqsamq017 samequantum 0.1 1E-0 -> 0
dqsamq018 samequantum 999 999 -> 1
dqsamq019 samequantum 999E-1 99.9 -> 1
dqsamq020 samequantum 111E-1 22.2 -> 1
dqsamq021 samequantum 111E-1 1234.2 -> 1
-- zeros
dqsamq030 samequantum 0.0 1.1 -> 1
dqsamq031 samequantum 0.0 1.11 -> 0
dqsamq032 samequantum 0.0 0 -> 0
dqsamq033 samequantum 0.0 0.0 -> 1
dqsamq034 samequantum 0.0 0.00 -> 0
dqsamq035 samequantum 0E+1 0E+0 -> 0
dqsamq036 samequantum 0E+1 0E+1 -> 1
dqsamq037 samequantum 0E+1 0E+2 -> 0
dqsamq038 samequantum 0E-17 0E-16 -> 0
dqsamq039 samequantum 0E-17 0E-17 -> 1
dqsamq040 samequantum 0E-17 0E-18 -> 0
dqsamq041 samequantum 0E-17 0.0E-15 -> 0
dqsamq042 samequantum 0E-17 0.0E-16 -> 1
dqsamq043 samequantum 0E-17 0.0E-17 -> 0
dqsamq044 samequantum -0E-17 0.0E-16 -> 1
dqsamq045 samequantum 0E-17 -0.0E-17 -> 0
dqsamq046 samequantum 0E-17 -0.0E-16 -> 1
dqsamq047 samequantum -0E-17 0.0E-17 -> 0
dqsamq048 samequantum -0E-17 -0.0E-16 -> 1
dqsamq049 samequantum -0E-17 -0.0E-17 -> 0
-- Nmax, Nmin, Ntiny
dqsamq051 samequantum 9.99999999999999999999999999999999E+6144 9.99999999999999999999999999999999E+6144 -> 1
dqsamq052 samequantum 1E-6143 1E-6143 -> 1
dqsamq053 samequantum 1.00000000000000000000000000000000E-6143 1.00000000000000000000000000000000E-6143 -> 1
dqsamq054 samequantum 1E-6176 1E-6176 -> 1
dqsamq055 samequantum 9.99999999999999999999999999999999E+6144 9.99999999999999999999999999999999E+6144 -> 1
dqsamq056 samequantum 1E-6143 1E-6143 -> 1
dqsamq057 samequantum 1.00000000000000000000000000000000E-6143 1.00000000000000000000000000000000E-6143 -> 1
dqsamq058 samequantum 1E-6176 1E-6176 -> 1
dqsamq061 samequantum -1E-6176 -1E-6176 -> 1
dqsamq062 samequantum -1.00000000000000000000000000000000E-6143 -1.00000000000000000000000000000000E-6143 -> 1
dqsamq063 samequantum -1E-6143 -1E-6143 -> 1
dqsamq064 samequantum -9.99999999999999999999999999999999E+6144 -9.99999999999999999999999999999999E+6144 -> 1
dqsamq065 samequantum -1E-6176 -1E-6176 -> 1
dqsamq066 samequantum -1.00000000000000000000000000000000E-6143 -1.00000000000000000000000000000000E-6143 -> 1
dqsamq067 samequantum -1E-6143 -1E-6143 -> 1
dqsamq068 samequantum -9.99999999999999999999999999999999E+6144 -9.99999999999999999999999999999999E+6144 -> 1
dqsamq071 samequantum -4E-6176 -1E-6176 -> 1
dqsamq072 samequantum -4.00000000000000000000000000000000E-6143 -1.00000000000000000000000000004000E-6143 -> 1
dqsamq073 samequantum -4E-6143 -1E-6143 -> 1
dqsamq074 samequantum -4.99999999999999999999999999999999E+6144 -9.99949999999999999999999999999999E+6144 -> 1
dqsamq075 samequantum -4E-6176 -1E-6176 -> 1
dqsamq076 samequantum -4.00000000000000000000000000000000E-6143 -1.00400000000000000000000000000000E-6143 -> 1
dqsamq077 samequantum -4E-6143 -1E-6143 -> 1
dqsamq078 samequantum -4.99999999999999999999999999999999E+6144 -9.94999999999999999999999999999999E+6144 -> 1
dqsamq081 samequantum -4E-1006 -1E-6176 -> 0
dqsamq082 samequantum -4.00000000000000000000000000000000E-6143 -1.00004000000000000000000000000000E-6136 -> 0
dqsamq083 samequantum -4E-6140 -1E-6143 -> 0
dqsamq084 samequantum -4.99999999999999999999999999999999E+6144 -9.99949999999999999999999999999999E+6136 -> 0
dqsamq085 samequantum -4E-1006 -1E-6176 -> 0
dqsamq086 samequantum -4.00000000000000000000000000000000E-6143 -1.00400000000000000000000000000000E-6136 -> 0
dqsamq087 samequantum -4E-6133 -1E-6143 -> 0
dqsamq088 samequantum -4.99999999999999999999999999999999E+6144 -9.94999999999999999999999999999999E+6136 -> 0
-- specials & combinations
dqsamq0110 samequantum -Inf -Inf -> 1
dqsamq0111 samequantum -Inf Inf -> 1
dqsamq0112 samequantum -Inf NaN -> 0
dqsamq0113 samequantum -Inf -7E+3 -> 0
dqsamq0114 samequantum -Inf -7 -> 0
dqsamq0115 samequantum -Inf -7E-3 -> 0
dqsamq0116 samequantum -Inf -0E-3 -> 0
dqsamq0117 samequantum -Inf -0 -> 0
dqsamq0118 samequantum -Inf -0E+3 -> 0
dqsamq0119 samequantum -Inf 0E-3 -> 0
dqsamq0120 samequantum -Inf 0 -> 0
dqsamq0121 samequantum -Inf 0E+3 -> 0
dqsamq0122 samequantum -Inf 7E-3 -> 0
dqsamq0123 samequantum -Inf 7 -> 0
dqsamq0124 samequantum -Inf 7E+3 -> 0
dqsamq0125 samequantum -Inf sNaN -> 0
dqsamq0210 samequantum Inf -Inf -> 1
dqsamq0211 samequantum Inf Inf -> 1
dqsamq0212 samequantum Inf NaN -> 0
dqsamq0213 samequantum Inf -7E+3 -> 0
dqsamq0214 samequantum Inf -7 -> 0
dqsamq0215 samequantum Inf -7E-3 -> 0
dqsamq0216 samequantum Inf -0E-3 -> 0
dqsamq0217 samequantum Inf -0 -> 0
dqsamq0218 samequantum Inf -0E+3 -> 0
dqsamq0219 samequantum Inf 0E-3 -> 0
dqsamq0220 samequantum Inf 0 -> 0
dqsamq0221 samequantum Inf 0E+3 -> 0
dqsamq0222 samequantum Inf 7E-3 -> 0
dqsamq0223 samequantum Inf 7 -> 0
dqsamq0224 samequantum Inf 7E+3 -> 0
dqsamq0225 samequantum Inf sNaN -> 0
dqsamq0310 samequantum NaN -Inf -> 0
dqsamq0311 samequantum NaN Inf -> 0
dqsamq0312 samequantum NaN NaN -> 1
dqsamq0313 samequantum NaN -7E+3 -> 0
dqsamq0314 samequantum NaN -7 -> 0
dqsamq0315 samequantum NaN -7E-3 -> 0
dqsamq0316 samequantum NaN -0E-3 -> 0
dqsamq0317 samequantum NaN -0 -> 0
dqsamq0318 samequantum NaN -0E+3 -> 0
dqsamq0319 samequantum NaN 0E-3 -> 0
dqsamq0320 samequantum NaN 0 -> 0
dqsamq0321 samequantum NaN 0E+3 -> 0
dqsamq0322 samequantum NaN 7E-3 -> 0
dqsamq0323 samequantum NaN 7 -> 0
dqsamq0324 samequantum NaN 7E+3 -> 0
dqsamq0325 samequantum NaN sNaN -> 1
dqsamq0410 samequantum -7E+3 -Inf -> 0
dqsamq0411 samequantum -7E+3 Inf -> 0
dqsamq0412 samequantum -7E+3 NaN -> 0
dqsamq0413 samequantum -7E+3 -7E+3 -> 1
dqsamq0414 samequantum -7E+3 -7 -> 0
dqsamq0415 samequantum -7E+3 -7E-3 -> 0
dqsamq0416 samequantum -7E+3 -0E-3 -> 0
dqsamq0417 samequantum -7E+3 -0 -> 0
dqsamq0418 samequantum -7E+3 -0E+3 -> 1
dqsamq0419 samequantum -7E+3 0E-3 -> 0
dqsamq0420 samequantum -7E+3 0 -> 0
dqsamq0421 samequantum -7E+3 0E+3 -> 1
dqsamq0422 samequantum -7E+3 7E-3 -> 0
dqsamq0423 samequantum -7E+3 7 -> 0
dqsamq0424 samequantum -7E+3 7E+3 -> 1
dqsamq0425 samequantum -7E+3 sNaN -> 0
dqsamq0510 samequantum -7 -Inf -> 0
dqsamq0511 samequantum -7 Inf -> 0
dqsamq0512 samequantum -7 NaN -> 0
dqsamq0513 samequantum -7 -7E+3 -> 0
dqsamq0514 samequantum -7 -7 -> 1
dqsamq0515 samequantum -7 -7E-3 -> 0
dqsamq0516 samequantum -7 -0E-3 -> 0
dqsamq0517 samequantum -7 -0 -> 1
dqsamq0518 samequantum -7 -0E+3 -> 0
dqsamq0519 samequantum -7 0E-3 -> 0
dqsamq0520 samequantum -7 0 -> 1
dqsamq0521 samequantum -7 0E+3 -> 0
dqsamq0522 samequantum -7 7E-3 -> 0
dqsamq0523 samequantum -7 7 -> 1
dqsamq0524 samequantum -7 7E+3 -> 0
dqsamq0525 samequantum -7 sNaN -> 0
dqsamq0610 samequantum -7E-3 -Inf -> 0
dqsamq0611 samequantum -7E-3 Inf -> 0
dqsamq0612 samequantum -7E-3 NaN -> 0
dqsamq0613 samequantum -7E-3 -7E+3 -> 0
dqsamq0614 samequantum -7E-3 -7 -> 0
dqsamq0615 samequantum -7E-3 -7E-3 -> 1
dqsamq0616 samequantum -7E-3 -0E-3 -> 1
dqsamq0617 samequantum -7E-3 -0 -> 0
dqsamq0618 samequantum -7E-3 -0E+3 -> 0
dqsamq0619 samequantum -7E-3 0E-3 -> 1
dqsamq0620 samequantum -7E-3 0 -> 0
dqsamq0621 samequantum -7E-3 0E+3 -> 0
dqsamq0622 samequantum -7E-3 7E-3 -> 1
dqsamq0623 samequantum -7E-3 7 -> 0
dqsamq0624 samequantum -7E-3 7E+3 -> 0
dqsamq0625 samequantum -7E-3 sNaN -> 0
dqsamq0710 samequantum -0E-3 -Inf -> 0
dqsamq0711 samequantum -0E-3 Inf -> 0
dqsamq0712 samequantum -0E-3 NaN -> 0
dqsamq0713 samequantum -0E-3 -7E+3 -> 0
dqsamq0714 samequantum -0E-3 -7 -> 0
dqsamq0715 samequantum -0E-3 -7E-3 -> 1
dqsamq0716 samequantum -0E-3 -0E-3 -> 1
dqsamq0717 samequantum -0E-3 -0 -> 0
dqsamq0718 samequantum -0E-3 -0E+3 -> 0
dqsamq0719 samequantum -0E-3 0E-3 -> 1
dqsamq0720 samequantum -0E-3 0 -> 0
dqsamq0721 samequantum -0E-3 0E+3 -> 0
dqsamq0722 samequantum -0E-3 7E-3 -> 1
dqsamq0723 samequantum -0E-3 7 -> 0
dqsamq0724 samequantum -0E-3 7E+3 -> 0
dqsamq0725 samequantum -0E-3 sNaN -> 0
dqsamq0810 samequantum -0 -Inf -> 0
dqsamq0811 samequantum -0 Inf -> 0
dqsamq0812 samequantum -0 NaN -> 0
dqsamq0813 samequantum -0 -7E+3 -> 0
dqsamq0814 samequantum -0 -7 -> 1
dqsamq0815 samequantum -0 -7E-3 -> 0
dqsamq0816 samequantum -0 -0E-3 -> 0
dqsamq0817 samequantum -0 -0 -> 1
dqsamq0818 samequantum -0 -0E+3 -> 0
dqsamq0819 samequantum -0 0E-3 -> 0
dqsamq0820 samequantum -0 0 -> 1
dqsamq0821 samequantum -0 0E+3 -> 0
dqsamq0822 samequantum -0 7E-3 -> 0
dqsamq0823 samequantum -0 7 -> 1
dqsamq0824 samequantum -0 7E+3 -> 0
dqsamq0825 samequantum -0 sNaN -> 0
dqsamq0910 samequantum -0E+3 -Inf -> 0
dqsamq0911 samequantum -0E+3 Inf -> 0
dqsamq0912 samequantum -0E+3 NaN -> 0
dqsamq0913 samequantum -0E+3 -7E+3 -> 1
dqsamq0914 samequantum -0E+3 -7 -> 0
dqsamq0915 samequantum -0E+3 -7E-3 -> 0
dqsamq0916 samequantum -0E+3 -0E-3 -> 0
dqsamq0917 samequantum -0E+3 -0 -> 0
dqsamq0918 samequantum -0E+3 -0E+3 -> 1
dqsamq0919 samequantum -0E+3 0E-3 -> 0
dqsamq0920 samequantum -0E+3 0 -> 0
dqsamq0921 samequantum -0E+3 0E+3 -> 1
dqsamq0922 samequantum -0E+3 7E-3 -> 0
dqsamq0923 samequantum -0E+3 7 -> 0
dqsamq0924 samequantum -0E+3 7E+3 -> 1
dqsamq0925 samequantum -0E+3 sNaN -> 0
dqsamq1110 samequantum 0E-3 -Inf -> 0
dqsamq1111 samequantum 0E-3 Inf -> 0
dqsamq1112 samequantum 0E-3 NaN -> 0
dqsamq1113 samequantum 0E-3 -7E+3 -> 0
dqsamq1114 samequantum 0E-3 -7 -> 0
dqsamq1115 samequantum 0E-3 -7E-3 -> 1
dqsamq1116 samequantum 0E-3 -0E-3 -> 1
dqsamq1117 samequantum 0E-3 -0 -> 0
dqsamq1118 samequantum 0E-3 -0E+3 -> 0
dqsamq1119 samequantum 0E-3 0E-3 -> 1
dqsamq1120 samequantum 0E-3 0 -> 0
dqsamq1121 samequantum 0E-3 0E+3 -> 0
dqsamq1122 samequantum 0E-3 7E-3 -> 1
dqsamq1123 samequantum 0E-3 7 -> 0
dqsamq1124 samequantum 0E-3 7E+3 -> 0
dqsamq1125 samequantum 0E-3 sNaN -> 0
dqsamq1210 samequantum 0 -Inf -> 0
dqsamq1211 samequantum 0 Inf -> 0
dqsamq1212 samequantum 0 NaN -> 0
dqsamq1213 samequantum 0 -7E+3 -> 0
dqsamq1214 samequantum 0 -7 -> 1
dqsamq1215 samequantum 0 -7E-3 -> 0
dqsamq1216 samequantum 0 -0E-3 -> 0
dqsamq1217 samequantum 0 -0 -> 1
dqsamq1218 samequantum 0 -0E+3 -> 0
dqsamq1219 samequantum 0 0E-3 -> 0
dqsamq1220 samequantum 0 0 -> 1
dqsamq1221 samequantum 0 0E+3 -> 0
dqsamq1222 samequantum 0 7E-3 -> 0
dqsamq1223 samequantum 0 7 -> 1
dqsamq1224 samequantum 0 7E+3 -> 0
dqsamq1225 samequantum 0 sNaN -> 0
dqsamq1310 samequantum 0E+3 -Inf -> 0
dqsamq1311 samequantum 0E+3 Inf -> 0
dqsamq1312 samequantum 0E+3 NaN -> 0
dqsamq1313 samequantum 0E+3 -7E+3 -> 1
dqsamq1314 samequantum 0E+3 -7 -> 0
dqsamq1315 samequantum 0E+3 -7E-3 -> 0
dqsamq1316 samequantum 0E+3 -0E-3 -> 0
dqsamq1317 samequantum 0E+3 -0 -> 0
dqsamq1318 samequantum 0E+3 -0E+3 -> 1
dqsamq1319 samequantum 0E+3 0E-3 -> 0
dqsamq1320 samequantum 0E+3 0 -> 0
dqsamq1321 samequantum 0E+3 0E+3 -> 1
dqsamq1322 samequantum 0E+3 7E-3 -> 0
dqsamq1323 samequantum 0E+3 7 -> 0
dqsamq1324 samequantum 0E+3 7E+3 -> 1
dqsamq1325 samequantum 0E+3 sNaN -> 0
dqsamq1410 samequantum 7E-3 -Inf -> 0
dqsamq1411 samequantum 7E-3 Inf -> 0
dqsamq1412 samequantum 7E-3 NaN -> 0
dqsamq1413 samequantum 7E-3 -7E+3 -> 0
dqsamq1414 samequantum 7E-3 -7 -> 0
dqsamq1415 samequantum 7E-3 -7E-3 -> 1
dqsamq1416 samequantum 7E-3 -0E-3 -> 1
dqsamq1417 samequantum 7E-3 -0 -> 0
dqsamq1418 samequantum 7E-3 -0E+3 -> 0
dqsamq1419 samequantum 7E-3 0E-3 -> 1
dqsamq1420 samequantum 7E-3 0 -> 0
dqsamq1421 samequantum 7E-3 0E+3 -> 0
dqsamq1422 samequantum 7E-3 7E-3 -> 1
dqsamq1423 samequantum 7E-3 7 -> 0
dqsamq1424 samequantum 7E-3 7E+3 -> 0
dqsamq1425 samequantum 7E-3 sNaN -> 0
dqsamq1510 samequantum 7 -Inf -> 0
dqsamq1511 samequantum 7 Inf -> 0
dqsamq1512 samequantum 7 NaN -> 0
dqsamq1513 samequantum 7 -7E+3 -> 0
dqsamq1514 samequantum 7 -7 -> 1
dqsamq1515 samequantum 7 -7E-3 -> 0
dqsamq1516 samequantum 7 -0E-3 -> 0
dqsamq1517 samequantum 7 -0 -> 1
dqsamq1518 samequantum 7 -0E+3 -> 0
dqsamq1519 samequantum 7 0E-3 -> 0
dqsamq1520 samequantum 7 0 -> 1
dqsamq1521 samequantum 7 0E+3 -> 0
dqsamq1522 samequantum 7 7E-3 -> 0
dqsamq1523 samequantum 7 7 -> 1
dqsamq1524 samequantum 7 7E+3 -> 0
dqsamq1525 samequantum 7 sNaN -> 0
dqsamq1610 samequantum 7E+3 -Inf -> 0
dqsamq1611 samequantum 7E+3 Inf -> 0
dqsamq1612 samequantum 7E+3 NaN -> 0
dqsamq1613 samequantum 7E+3 -7E+3 -> 1
dqsamq1614 samequantum 7E+3 -7 -> 0
dqsamq1615 samequantum 7E+3 -7E-3 -> 0
dqsamq1616 samequantum 7E+3 -0E-3 -> 0
dqsamq1617 samequantum 7E+3 -0 -> 0
dqsamq1618 samequantum 7E+3 -0E+3 -> 1
dqsamq1619 samequantum 7E+3 0E-3 -> 0
dqsamq1620 samequantum 7E+3 0 -> 0
dqsamq1621 samequantum 7E+3 0E+3 -> 1
dqsamq1622 samequantum 7E+3 7E-3 -> 0
dqsamq1623 samequantum 7E+3 7 -> 0
dqsamq1624 samequantum 7E+3 7E+3 -> 1
dqsamq1625 samequantum 7E+3 sNaN -> 0
dqsamq1710 samequantum sNaN -Inf -> 0
dqsamq1711 samequantum sNaN Inf -> 0
dqsamq1712 samequantum sNaN NaN -> 1
dqsamq1713 samequantum sNaN -7E+3 -> 0
dqsamq1714 samequantum sNaN -7 -> 0
dqsamq1715 samequantum sNaN -7E-3 -> 0
dqsamq1716 samequantum sNaN -0E-3 -> 0
dqsamq1717 samequantum sNaN -0 -> 0
dqsamq1718 samequantum sNaN -0E+3 -> 0
dqsamq1719 samequantum sNaN 0E-3 -> 0
dqsamq1720 samequantum sNaN 0 -> 0
dqsamq1721 samequantum sNaN 0E+3 -> 0
dqsamq1722 samequantum sNaN 7E-3 -> 0
dqsamq1723 samequantum sNaN 7 -> 0
dqsamq1724 samequantum sNaN 7E+3 -> 0
dqsamq1725 samequantum sNaN sNaN -> 1
-- noisy NaNs
dqsamq1730 samequantum sNaN3 sNaN3 -> 1
dqsamq1731 samequantum sNaN3 sNaN4 -> 1
dqsamq1732 samequantum NaN3 NaN3 -> 1
dqsamq1733 samequantum NaN3 NaN4 -> 1
dqsamq1734 samequantum sNaN3 3 -> 0
dqsamq1735 samequantum NaN3 3 -> 0
dqsamq1736 samequantum 4 sNaN4 -> 0
dqsamq1737 samequantum 3 NaN3 -> 0
dqsamq1738 samequantum Inf sNaN4 -> 0
dqsamq1739 samequantum -Inf NaN3 -> 0
------------------------------------------------------------------------
-- dqSameQuantum.decTest -- check decQuad quantums match --
-- Copyright (c) IBM Corporation, 2001, 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 decQuads.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
dqsamq001 samequantum 0 0 -> 1
dqsamq002 samequantum 0 1 -> 1
dqsamq003 samequantum 1 0 -> 1
dqsamq004 samequantum 1 1 -> 1
dqsamq011 samequantum 10 1E+1 -> 0
dqsamq012 samequantum 10E+1 10E+1 -> 1
dqsamq013 samequantum 100 10E+1 -> 0
dqsamq014 samequantum 100 1E+2 -> 0
dqsamq015 samequantum 0.1 1E-2 -> 0
dqsamq016 samequantum 0.1 1E-1 -> 1
dqsamq017 samequantum 0.1 1E-0 -> 0
dqsamq018 samequantum 999 999 -> 1
dqsamq019 samequantum 999E-1 99.9 -> 1
dqsamq020 samequantum 111E-1 22.2 -> 1
dqsamq021 samequantum 111E-1 1234.2 -> 1
-- zeros
dqsamq030 samequantum 0.0 1.1 -> 1
dqsamq031 samequantum 0.0 1.11 -> 0
dqsamq032 samequantum 0.0 0 -> 0
dqsamq033 samequantum 0.0 0.0 -> 1
dqsamq034 samequantum 0.0 0.00 -> 0
dqsamq035 samequantum 0E+1 0E+0 -> 0
dqsamq036 samequantum 0E+1 0E+1 -> 1
dqsamq037 samequantum 0E+1 0E+2 -> 0
dqsamq038 samequantum 0E-17 0E-16 -> 0
dqsamq039 samequantum 0E-17 0E-17 -> 1
dqsamq040 samequantum 0E-17 0E-18 -> 0
dqsamq041 samequantum 0E-17 0.0E-15 -> 0
dqsamq042 samequantum 0E-17 0.0E-16 -> 1
dqsamq043 samequantum 0E-17 0.0E-17 -> 0
dqsamq044 samequantum -0E-17 0.0E-16 -> 1
dqsamq045 samequantum 0E-17 -0.0E-17 -> 0
dqsamq046 samequantum 0E-17 -0.0E-16 -> 1
dqsamq047 samequantum -0E-17 0.0E-17 -> 0
dqsamq048 samequantum -0E-17 -0.0E-16 -> 1
dqsamq049 samequantum -0E-17 -0.0E-17 -> 0
-- Nmax, Nmin, Ntiny
dqsamq051 samequantum 9.99999999999999999999999999999999E+6144 9.99999999999999999999999999999999E+6144 -> 1
dqsamq052 samequantum 1E-6143 1E-6143 -> 1
dqsamq053 samequantum 1.00000000000000000000000000000000E-6143 1.00000000000000000000000000000000E-6143 -> 1
dqsamq054 samequantum 1E-6176 1E-6176 -> 1
dqsamq055 samequantum 9.99999999999999999999999999999999E+6144 9.99999999999999999999999999999999E+6144 -> 1
dqsamq056 samequantum 1E-6143 1E-6143 -> 1
dqsamq057 samequantum 1.00000000000000000000000000000000E-6143 1.00000000000000000000000000000000E-6143 -> 1
dqsamq058 samequantum 1E-6176 1E-6176 -> 1
dqsamq061 samequantum -1E-6176 -1E-6176 -> 1
dqsamq062 samequantum -1.00000000000000000000000000000000E-6143 -1.00000000000000000000000000000000E-6143 -> 1
dqsamq063 samequantum -1E-6143 -1E-6143 -> 1
dqsamq064 samequantum -9.99999999999999999999999999999999E+6144 -9.99999999999999999999999999999999E+6144 -> 1
dqsamq065 samequantum -1E-6176 -1E-6176 -> 1
dqsamq066 samequantum -1.00000000000000000000000000000000E-6143 -1.00000000000000000000000000000000E-6143 -> 1
dqsamq067 samequantum -1E-6143 -1E-6143 -> 1
dqsamq068 samequantum -9.99999999999999999999999999999999E+6144 -9.99999999999999999999999999999999E+6144 -> 1
dqsamq071 samequantum -4E-6176 -1E-6176 -> 1
dqsamq072 samequantum -4.00000000000000000000000000000000E-6143 -1.00000000000000000000000000004000E-6143 -> 1
dqsamq073 samequantum -4E-6143 -1E-6143 -> 1
dqsamq074 samequantum -4.99999999999999999999999999999999E+6144 -9.99949999999999999999999999999999E+6144 -> 1
dqsamq075 samequantum -4E-6176 -1E-6176 -> 1
dqsamq076 samequantum -4.00000000000000000000000000000000E-6143 -1.00400000000000000000000000000000E-6143 -> 1
dqsamq077 samequantum -4E-6143 -1E-6143 -> 1
dqsamq078 samequantum -4.99999999999999999999999999999999E+6144 -9.94999999999999999999999999999999E+6144 -> 1
dqsamq081 samequantum -4E-1006 -1E-6176 -> 0
dqsamq082 samequantum -4.00000000000000000000000000000000E-6143 -1.00004000000000000000000000000000E-6136 -> 0
dqsamq083 samequantum -4E-6140 -1E-6143 -> 0
dqsamq084 samequantum -4.99999999999999999999999999999999E+6144 -9.99949999999999999999999999999999E+6136 -> 0
dqsamq085 samequantum -4E-1006 -1E-6176 -> 0
dqsamq086 samequantum -4.00000000000000000000000000000000E-6143 -1.00400000000000000000000000000000E-6136 -> 0
dqsamq087 samequantum -4E-6133 -1E-6143 -> 0
dqsamq088 samequantum -4.99999999999999999999999999999999E+6144 -9.94999999999999999999999999999999E+6136 -> 0
-- specials & combinations
dqsamq0110 samequantum -Inf -Inf -> 1
dqsamq0111 samequantum -Inf Inf -> 1
dqsamq0112 samequantum -Inf NaN -> 0
dqsamq0113 samequantum -Inf -7E+3 -> 0
dqsamq0114 samequantum -Inf -7 -> 0
dqsamq0115 samequantum -Inf -7E-3 -> 0
dqsamq0116 samequantum -Inf -0E-3 -> 0
dqsamq0117 samequantum -Inf -0 -> 0
dqsamq0118 samequantum -Inf -0E+3 -> 0
dqsamq0119 samequantum -Inf 0E-3 -> 0
dqsamq0120 samequantum -Inf 0 -> 0
dqsamq0121 samequantum -Inf 0E+3 -> 0
dqsamq0122 samequantum -Inf 7E-3 -> 0
dqsamq0123 samequantum -Inf 7 -> 0
dqsamq0124 samequantum -Inf 7E+3 -> 0
dqsamq0125 samequantum -Inf sNaN -> 0
dqsamq0210 samequantum Inf -Inf -> 1
dqsamq0211 samequantum Inf Inf -> 1
dqsamq0212 samequantum Inf NaN -> 0
dqsamq0213 samequantum Inf -7E+3 -> 0
dqsamq0214 samequantum Inf -7 -> 0
dqsamq0215 samequantum Inf -7E-3 -> 0
dqsamq0216 samequantum Inf -0E-3 -> 0
dqsamq0217 samequantum Inf -0 -> 0
dqsamq0218 samequantum Inf -0E+3 -> 0
dqsamq0219 samequantum Inf 0E-3 -> 0
dqsamq0220 samequantum Inf 0 -> 0
dqsamq0221 samequantum Inf 0E+3 -> 0
dqsamq0222 samequantum Inf 7E-3 -> 0
dqsamq0223 samequantum Inf 7 -> 0
dqsamq0224 samequantum Inf 7E+3 -> 0
dqsamq0225 samequantum Inf sNaN -> 0
dqsamq0310 samequantum NaN -Inf -> 0
dqsamq0311 samequantum NaN Inf -> 0
dqsamq0312 samequantum NaN NaN -> 1
dqsamq0313 samequantum NaN -7E+3 -> 0
dqsamq0314 samequantum NaN -7 -> 0
dqsamq0315 samequantum NaN -7E-3 -> 0
dqsamq0316 samequantum NaN -0E-3 -> 0
dqsamq0317 samequantum NaN -0 -> 0
dqsamq0318 samequantum NaN -0E+3 -> 0
dqsamq0319 samequantum NaN 0E-3 -> 0
dqsamq0320 samequantum NaN 0 -> 0
dqsamq0321 samequantum NaN 0E+3 -> 0
dqsamq0322 samequantum NaN 7E-3 -> 0
dqsamq0323 samequantum NaN 7 -> 0
dqsamq0324 samequantum NaN 7E+3 -> 0
dqsamq0325 samequantum NaN sNaN -> 1
dqsamq0410 samequantum -7E+3 -Inf -> 0
dqsamq0411 samequantum -7E+3 Inf -> 0
dqsamq0412 samequantum -7E+3 NaN -> 0
dqsamq0413 samequantum -7E+3 -7E+3 -> 1
dqsamq0414 samequantum -7E+3 -7 -> 0
dqsamq0415 samequantum -7E+3 -7E-3 -> 0
dqsamq0416 samequantum -7E+3 -0E-3 -> 0
dqsamq0417 samequantum -7E+3 -0 -> 0
dqsamq0418 samequantum -7E+3 -0E+3 -> 1
dqsamq0419 samequantum -7E+3 0E-3 -> 0
dqsamq0420 samequantum -7E+3 0 -> 0
dqsamq0421 samequantum -7E+3 0E+3 -> 1
dqsamq0422 samequantum -7E+3 7E-3 -> 0
dqsamq0423 samequantum -7E+3 7 -> 0
dqsamq0424 samequantum -7E+3 7E+3 -> 1
dqsamq0425 samequantum -7E+3 sNaN -> 0
dqsamq0510 samequantum -7 -Inf -> 0
dqsamq0511 samequantum -7 Inf -> 0
dqsamq0512 samequantum -7 NaN -> 0
dqsamq0513 samequantum -7 -7E+3 -> 0
dqsamq0514 samequantum -7 -7 -> 1
dqsamq0515 samequantum -7 -7E-3 -> 0
dqsamq0516 samequantum -7 -0E-3 -> 0
dqsamq0517 samequantum -7 -0 -> 1
dqsamq0518 samequantum -7 -0E+3 -> 0
dqsamq0519 samequantum -7 0E-3 -> 0
dqsamq0520 samequantum -7 0 -> 1
dqsamq0521 samequantum -7 0E+3 -> 0
dqsamq0522 samequantum -7 7E-3 -> 0
dqsamq0523 samequantum -7 7 -> 1
dqsamq0524 samequantum -7 7E+3 -> 0
dqsamq0525 samequantum -7 sNaN -> 0
dqsamq0610 samequantum -7E-3 -Inf -> 0
dqsamq0611 samequantum -7E-3 Inf -> 0
dqsamq0612 samequantum -7E-3 NaN -> 0
dqsamq0613 samequantum -7E-3 -7E+3 -> 0
dqsamq0614 samequantum -7E-3 -7 -> 0
dqsamq0615 samequantum -7E-3 -7E-3 -> 1
dqsamq0616 samequantum -7E-3 -0E-3 -> 1
dqsamq0617 samequantum -7E-3 -0 -> 0
dqsamq0618 samequantum -7E-3 -0E+3 -> 0
dqsamq0619 samequantum -7E-3 0E-3 -> 1
dqsamq0620 samequantum -7E-3 0 -> 0
dqsamq0621 samequantum -7E-3 0E+3 -> 0
dqsamq0622 samequantum -7E-3 7E-3 -> 1
dqsamq0623 samequantum -7E-3 7 -> 0
dqsamq0624 samequantum -7E-3 7E+3 -> 0
dqsamq0625 samequantum -7E-3 sNaN -> 0
dqsamq0710 samequantum -0E-3 -Inf -> 0
dqsamq0711 samequantum -0E-3 Inf -> 0
dqsamq0712 samequantum -0E-3 NaN -> 0
dqsamq0713 samequantum -0E-3 -7E+3 -> 0
dqsamq0714 samequantum -0E-3 -7 -> 0
dqsamq0715 samequantum -0E-3 -7E-3 -> 1
dqsamq0716 samequantum -0E-3 -0E-3 -> 1
dqsamq0717 samequantum -0E-3 -0 -> 0
dqsamq0718 samequantum -0E-3 -0E+3 -> 0
dqsamq0719 samequantum -0E-3 0E-3 -> 1
dqsamq0720 samequantum -0E-3 0 -> 0
dqsamq0721 samequantum -0E-3 0E+3 -> 0
dqsamq0722 samequantum -0E-3 7E-3 -> 1
dqsamq0723 samequantum -0E-3 7 -> 0
dqsamq0724 samequantum -0E-3 7E+3 -> 0
dqsamq0725 samequantum -0E-3 sNaN -> 0
dqsamq0810 samequantum -0 -Inf -> 0
dqsamq0811 samequantum -0 Inf -> 0
dqsamq0812 samequantum -0 NaN -> 0
dqsamq0813 samequantum -0 -7E+3 -> 0
dqsamq0814 samequantum -0 -7 -> 1
dqsamq0815 samequantum -0 -7E-3 -> 0
dqsamq0816 samequantum -0 -0E-3 -> 0
dqsamq0817 samequantum -0 -0 -> 1
dqsamq0818 samequantum -0 -0E+3 -> 0
dqsamq0819 samequantum -0 0E-3 -> 0
dqsamq0820 samequantum -0 0 -> 1
dqsamq0821 samequantum -0 0E+3 -> 0
dqsamq0822 samequantum -0 7E-3 -> 0
dqsamq0823 samequantum -0 7 -> 1
dqsamq0824 samequantum -0 7E+3 -> 0
dqsamq0825 samequantum -0 sNaN -> 0
dqsamq0910 samequantum -0E+3 -Inf -> 0
dqsamq0911 samequantum -0E+3 Inf -> 0
dqsamq0912 samequantum -0E+3 NaN -> 0
dqsamq0913 samequantum -0E+3 -7E+3 -> 1
dqsamq0914 samequantum -0E+3 -7 -> 0
dqsamq0915 samequantum -0E+3 -7E-3 -> 0
dqsamq0916 samequantum -0E+3 -0E-3 -> 0
dqsamq0917 samequantum -0E+3 -0 -> 0
dqsamq0918 samequantum -0E+3 -0E+3 -> 1
dqsamq0919 samequantum -0E+3 0E-3 -> 0
dqsamq0920 samequantum -0E+3 0 -> 0
dqsamq0921 samequantum -0E+3 0E+3 -> 1
dqsamq0922 samequantum -0E+3 7E-3 -> 0
dqsamq0923 samequantum -0E+3 7 -> 0
dqsamq0924 samequantum -0E+3 7E+3 -> 1
dqsamq0925 samequantum -0E+3 sNaN -> 0
dqsamq1110 samequantum 0E-3 -Inf -> 0
dqsamq1111 samequantum 0E-3 Inf -> 0
dqsamq1112 samequantum 0E-3 NaN -> 0
dqsamq1113 samequantum 0E-3 -7E+3 -> 0
dqsamq1114 samequantum 0E-3 -7 -> 0
dqsamq1115 samequantum 0E-3 -7E-3 -> 1
dqsamq1116 samequantum 0E-3 -0E-3 -> 1
dqsamq1117 samequantum 0E-3 -0 -> 0
dqsamq1118 samequantum 0E-3 -0E+3 -> 0
dqsamq1119 samequantum 0E-3 0E-3 -> 1
dqsamq1120 samequantum 0E-3 0 -> 0
dqsamq1121 samequantum 0E-3 0E+3 -> 0
dqsamq1122 samequantum 0E-3 7E-3 -> 1
dqsamq1123 samequantum 0E-3 7 -> 0
dqsamq1124 samequantum 0E-3 7E+3 -> 0
dqsamq1125 samequantum 0E-3 sNaN -> 0
dqsamq1210 samequantum 0 -Inf -> 0
dqsamq1211 samequantum 0 Inf -> 0
dqsamq1212 samequantum 0 NaN -> 0
dqsamq1213 samequantum 0 -7E+3 -> 0
dqsamq1214 samequantum 0 -7 -> 1
dqsamq1215 samequantum 0 -7E-3 -> 0
dqsamq1216 samequantum 0 -0E-3 -> 0
dqsamq1217 samequantum 0 -0 -> 1
dqsamq1218 samequantum 0 -0E+3 -> 0
dqsamq1219 samequantum 0 0E-3 -> 0
dqsamq1220 samequantum 0 0 -> 1
dqsamq1221 samequantum 0 0E+3 -> 0
dqsamq1222 samequantum 0 7E-3 -> 0
dqsamq1223 samequantum 0 7 -> 1
dqsamq1224 samequantum 0 7E+3 -> 0
dqsamq1225 samequantum 0 sNaN -> 0
dqsamq1310 samequantum 0E+3 -Inf -> 0
dqsamq1311 samequantum 0E+3 Inf -> 0
dqsamq1312 samequantum 0E+3 NaN -> 0
dqsamq1313 samequantum 0E+3 -7E+3 -> 1
dqsamq1314 samequantum 0E+3 -7 -> 0
dqsamq1315 samequantum 0E+3 -7E-3 -> 0
dqsamq1316 samequantum 0E+3 -0E-3 -> 0
dqsamq1317 samequantum 0E+3 -0 -> 0
dqsamq1318 samequantum 0E+3 -0E+3 -> 1
dqsamq1319 samequantum 0E+3 0E-3 -> 0
dqsamq1320 samequantum 0E+3 0 -> 0
dqsamq1321 samequantum 0E+3 0E+3 -> 1
dqsamq1322 samequantum 0E+3 7E-3 -> 0
dqsamq1323 samequantum 0E+3 7 -> 0
dqsamq1324 samequantum 0E+3 7E+3 -> 1
dqsamq1325 samequantum 0E+3 sNaN -> 0
dqsamq1410 samequantum 7E-3 -Inf -> 0
dqsamq1411 samequantum 7E-3 Inf -> 0
dqsamq1412 samequantum 7E-3 NaN -> 0
dqsamq1413 samequantum 7E-3 -7E+3 -> 0
dqsamq1414 samequantum 7E-3 -7 -> 0
dqsamq1415 samequantum 7E-3 -7E-3 -> 1
dqsamq1416 samequantum 7E-3 -0E-3 -> 1
dqsamq1417 samequantum 7E-3 -0 -> 0
dqsamq1418 samequantum 7E-3 -0E+3 -> 0
dqsamq1419 samequantum 7E-3 0E-3 -> 1
dqsamq1420 samequantum 7E-3 0 -> 0
dqsamq1421 samequantum 7E-3 0E+3 -> 0
dqsamq1422 samequantum 7E-3 7E-3 -> 1
dqsamq1423 samequantum 7E-3 7 -> 0
dqsamq1424 samequantum 7E-3 7E+3 -> 0
dqsamq1425 samequantum 7E-3 sNaN -> 0
dqsamq1510 samequantum 7 -Inf -> 0
dqsamq1511 samequantum 7 Inf -> 0
dqsamq1512 samequantum 7 NaN -> 0
dqsamq1513 samequantum 7 -7E+3 -> 0
dqsamq1514 samequantum 7 -7 -> 1
dqsamq1515 samequantum 7 -7E-3 -> 0
dqsamq1516 samequantum 7 -0E-3 -> 0
dqsamq1517 samequantum 7 -0 -> 1
dqsamq1518 samequantum 7 -0E+3 -> 0
dqsamq1519 samequantum 7 0E-3 -> 0
dqsamq1520 samequantum 7 0 -> 1
dqsamq1521 samequantum 7 0E+3 -> 0
dqsamq1522 samequantum 7 7E-3 -> 0
dqsamq1523 samequantum 7 7 -> 1
dqsamq1524 samequantum 7 7E+3 -> 0
dqsamq1525 samequantum 7 sNaN -> 0
dqsamq1610 samequantum 7E+3 -Inf -> 0
dqsamq1611 samequantum 7E+3 Inf -> 0
dqsamq1612 samequantum 7E+3 NaN -> 0
dqsamq1613 samequantum 7E+3 -7E+3 -> 1
dqsamq1614 samequantum 7E+3 -7 -> 0
dqsamq1615 samequantum 7E+3 -7E-3 -> 0
dqsamq1616 samequantum 7E+3 -0E-3 -> 0
dqsamq1617 samequantum 7E+3 -0 -> 0
dqsamq1618 samequantum 7E+3 -0E+3 -> 1
dqsamq1619 samequantum 7E+3 0E-3 -> 0
dqsamq1620 samequantum 7E+3 0 -> 0
dqsamq1621 samequantum 7E+3 0E+3 -> 1
dqsamq1622 samequantum 7E+3 7E-3 -> 0
dqsamq1623 samequantum 7E+3 7 -> 0
dqsamq1624 samequantum 7E+3 7E+3 -> 1
dqsamq1625 samequantum 7E+3 sNaN -> 0
dqsamq1710 samequantum sNaN -Inf -> 0
dqsamq1711 samequantum sNaN Inf -> 0
dqsamq1712 samequantum sNaN NaN -> 1
dqsamq1713 samequantum sNaN -7E+3 -> 0
dqsamq1714 samequantum sNaN -7 -> 0
dqsamq1715 samequantum sNaN -7E-3 -> 0
dqsamq1716 samequantum sNaN -0E-3 -> 0
dqsamq1717 samequantum sNaN -0 -> 0
dqsamq1718 samequantum sNaN -0E+3 -> 0
dqsamq1719 samequantum sNaN 0E-3 -> 0
dqsamq1720 samequantum sNaN 0 -> 0
dqsamq1721 samequantum sNaN 0E+3 -> 0
dqsamq1722 samequantum sNaN 7E-3 -> 0
dqsamq1723 samequantum sNaN 7 -> 0
dqsamq1724 samequantum sNaN 7E+3 -> 0
dqsamq1725 samequantum sNaN sNaN -> 1
-- noisy NaNs
dqsamq1730 samequantum sNaN3 sNaN3 -> 1
dqsamq1731 samequantum sNaN3 sNaN4 -> 1
dqsamq1732 samequantum NaN3 NaN3 -> 1
dqsamq1733 samequantum NaN3 NaN4 -> 1
dqsamq1734 samequantum sNaN3 3 -> 0
dqsamq1735 samequantum NaN3 3 -> 0
dqsamq1736 samequantum 4 sNaN4 -> 0
dqsamq1737 samequantum 3 NaN3 -> 0
dqsamq1738 samequantum Inf sNaN4 -> 0
dqsamq1739 samequantum -Inf NaN3 -> 0

View file

@ -1,260 +1,260 @@
------------------------------------------------------------------------
-- dqScalebB.decTest -- scale a decQuad by powers of 10 --
-- 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
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Max |rhs| is 2*(6144+34) = 12356
-- Sanity checks
dqscb001 scaleb 7.50 10 -> 7.50E+10
dqscb002 scaleb 7.50 3 -> 7.50E+3
dqscb003 scaleb 7.50 2 -> 750
dqscb004 scaleb 7.50 1 -> 75.0
dqscb005 scaleb 7.50 0 -> 7.50
dqscb006 scaleb 7.50 -1 -> 0.750
dqscb007 scaleb 7.50 -2 -> 0.0750
dqscb008 scaleb 7.50 -10 -> 7.50E-10
dqscb009 scaleb -7.50 3 -> -7.50E+3
dqscb010 scaleb -7.50 2 -> -750
dqscb011 scaleb -7.50 1 -> -75.0
dqscb012 scaleb -7.50 0 -> -7.50
dqscb013 scaleb -7.50 -1 -> -0.750
-- Infinities
dqscb014 scaleb Infinity 1 -> Infinity
dqscb015 scaleb -Infinity 2 -> -Infinity
dqscb016 scaleb Infinity -1 -> Infinity
dqscb017 scaleb -Infinity -2 -> -Infinity
-- Next two are somewhat undefined in 754r; treat as non-integer
dqscb018 scaleb 10 Infinity -> NaN Invalid_operation
dqscb019 scaleb 10 -Infinity -> NaN Invalid_operation
-- NaNs are undefined in 754r; assume usual processing
-- NaNs, 0 payload
dqscb021 scaleb NaN 1 -> NaN
dqscb022 scaleb -NaN -1 -> -NaN
dqscb023 scaleb sNaN 1 -> NaN Invalid_operation
dqscb024 scaleb -sNaN 1 -> -NaN Invalid_operation
dqscb025 scaleb 4 NaN -> NaN
dqscb026 scaleb -Inf -NaN -> -NaN
dqscb027 scaleb 4 sNaN -> NaN Invalid_operation
dqscb028 scaleb Inf -sNaN -> -NaN Invalid_operation
-- non-integer RHS
dqscb030 scaleb 1.23 1 -> 12.3
dqscb031 scaleb 1.23 1.00 -> NaN Invalid_operation
dqscb032 scaleb 1.23 1.1 -> NaN Invalid_operation
dqscb033 scaleb 1.23 1.01 -> NaN Invalid_operation
dqscb034 scaleb 1.23 0.01 -> NaN Invalid_operation
dqscb035 scaleb 1.23 0.11 -> NaN Invalid_operation
dqscb036 scaleb 1.23 0.999999999 -> NaN Invalid_operation
dqscb037 scaleb 1.23 -1 -> 0.123
dqscb0614 scaleb 1.23 -1.00 -> NaN Invalid_operation
dqscb039 scaleb 1.23 -1.1 -> NaN Invalid_operation
dqscb040 scaleb 1.23 -1.01 -> NaN Invalid_operation
dqscb041 scaleb 1.23 -0.01 -> NaN Invalid_operation
dqscb042 scaleb 1.23 -0.11 -> NaN Invalid_operation
dqscb043 scaleb 1.23 -0.999999999 -> NaN Invalid_operation
dqscb044 scaleb 1.23 0.1 -> NaN Invalid_operation
dqscb045 scaleb 1.23 1E+1 -> NaN Invalid_operation
dqscb046 scaleb 1.23 1.1234E+6 -> NaN Invalid_operation
dqscb047 scaleb 1.23 1.123E+4 -> NaN Invalid_operation
-- out-of range RHS
dqscb120 scaleb 1.23 12355 -> Infinity Overflow Inexact Rounded
dqscb121 scaleb 1.23 12356 -> Infinity Overflow Inexact Rounded
dqscb122 scaleb 1.23 12357 -> NaN Invalid_operation
dqscb123 scaleb 1.23 12358 -> NaN Invalid_operation
dqscb124 scaleb 1.23 -12355 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqscb125 scaleb 1.23 -12356 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqscb126 scaleb 1.23 -12357 -> NaN Invalid_operation
dqscb127 scaleb 1.23 -12358 -> NaN Invalid_operation
-- NaNs, non-0 payload
-- propagating NaNs
dqscb861 scaleb NaN01 -Inf -> NaN1
dqscb862 scaleb -NaN02 -1000 -> -NaN2
dqscb863 scaleb NaN03 1000 -> NaN3
dqscb864 scaleb NaN04 Inf -> NaN4
dqscb865 scaleb NaN05 NaN61 -> NaN5
dqscb866 scaleb -Inf -NaN71 -> -NaN71
dqscb867 scaleb -1000 NaN81 -> NaN81
dqscb868 scaleb 1000 NaN91 -> NaN91
dqscb869 scaleb Inf NaN101 -> NaN101
dqscb871 scaleb sNaN011 -Inf -> NaN11 Invalid_operation
dqscb872 scaleb sNaN012 -1000 -> NaN12 Invalid_operation
dqscb873 scaleb -sNaN013 1000 -> -NaN13 Invalid_operation
dqscb874 scaleb sNaN014 NaN171 -> NaN14 Invalid_operation
dqscb875 scaleb sNaN015 sNaN181 -> NaN15 Invalid_operation
dqscb876 scaleb NaN016 sNaN191 -> NaN191 Invalid_operation
dqscb877 scaleb -Inf sNaN201 -> NaN201 Invalid_operation
dqscb878 scaleb -1000 sNaN211 -> NaN211 Invalid_operation
dqscb879 scaleb 1000 -sNaN221 -> -NaN221 Invalid_operation
dqscb880 scaleb Inf sNaN231 -> NaN231 Invalid_operation
dqscb881 scaleb NaN025 sNaN241 -> NaN241 Invalid_operation
-- finites
dqscb051 scaleb 7 -2 -> 0.07
dqscb052 scaleb -7 -2 -> -0.07
dqscb053 scaleb 75 -2 -> 0.75
dqscb054 scaleb -75 -2 -> -0.75
dqscb055 scaleb 7.50 -2 -> 0.0750
dqscb056 scaleb -7.50 -2 -> -0.0750
dqscb057 scaleb 7.500 -2 -> 0.07500
dqscb058 scaleb -7.500 -2 -> -0.07500
dqscb061 scaleb 7 -1 -> 0.7
dqscb062 scaleb -7 -1 -> -0.7
dqscb063 scaleb 75 -1 -> 7.5
dqscb064 scaleb -75 -1 -> -7.5
dqscb065 scaleb 7.50 -1 -> 0.750
dqscb066 scaleb -7.50 -1 -> -0.750
dqscb067 scaleb 7.500 -1 -> 0.7500
dqscb068 scaleb -7.500 -1 -> -0.7500
dqscb071 scaleb 7 0 -> 7
dqscb072 scaleb -7 0 -> -7
dqscb073 scaleb 75 0 -> 75
dqscb074 scaleb -75 0 -> -75
dqscb075 scaleb 7.50 0 -> 7.50
dqscb076 scaleb -7.50 0 -> -7.50
dqscb077 scaleb 7.500 0 -> 7.500
dqscb078 scaleb -7.500 0 -> -7.500
dqscb081 scaleb 7 1 -> 7E+1
dqscb082 scaleb -7 1 -> -7E+1
dqscb083 scaleb 75 1 -> 7.5E+2
dqscb084 scaleb -75 1 -> -7.5E+2
dqscb085 scaleb 7.50 1 -> 75.0
dqscb086 scaleb -7.50 1 -> -75.0
dqscb087 scaleb 7.500 1 -> 75.00
dqscb088 scaleb -7.500 1 -> -75.00
dqscb091 scaleb 7 2 -> 7E+2
dqscb092 scaleb -7 2 -> -7E+2
dqscb093 scaleb 75 2 -> 7.5E+3
dqscb094 scaleb -75 2 -> -7.5E+3
dqscb095 scaleb 7.50 2 -> 750
dqscb096 scaleb -7.50 2 -> -750
dqscb097 scaleb 7.500 2 -> 750.0
dqscb098 scaleb -7.500 2 -> -750.0
-- zeros
dqscb111 scaleb 0 1 -> 0E+1
dqscb112 scaleb -0 2 -> -0E+2
dqscb113 scaleb 0E+4 3 -> 0E+7
dqscb114 scaleb -0E+4 4 -> -0E+8
dqscb115 scaleb 0.0000 5 -> 0E+1
dqscb116 scaleb -0.0000 6 -> -0E+2
dqscb117 scaleb 0E-141 7 -> 0E-134
dqscb118 scaleb -0E-141 8 -> -0E-133
-- Nmax, Nmin, Ntiny
dqscb132 scaleb 9.999999999999999999999999999999999E+6144 +6144 -> Infinity Overflow Inexact Rounded
dqscb133 scaleb 9.999999999999999999999999999999999E+6144 +10 -> Infinity Overflow Inexact Rounded
dqscb134 scaleb 9.999999999999999999999999999999999E+6144 +1 -> Infinity Overflow Inexact Rounded
dqscb135 scaleb 9.999999999999999999999999999999999E+6144 0 -> 9.999999999999999999999999999999999E+6144
dqscb136 scaleb 9.999999999999999999999999999999999E+6144 -1 -> 9.999999999999999999999999999999999E+6143
dqscb137 scaleb 1E-6143 +1 -> 1E-6142
dqscb1614 scaleb 1E-6143 -0 -> 1E-6143
dqscb139 scaleb 1E-6143 -1 -> 1E-6144 Subnormal
dqscb140 scaleb 1.000000000000000000000000000000000E-6143 +1 -> 1.000000000000000000000000000000000E-6142
dqscb141 scaleb 1.000000000000000000000000000000000E-6143 0 -> 1.000000000000000000000000000000000E-6143
dqscb142 scaleb 1.000000000000000000000000000000000E-6143 -1 -> 1.00000000000000000000000000000000E-6144 Subnormal Rounded
dqscb143 scaleb 1E-6176 +1 -> 1E-6175 Subnormal
dqscb144 scaleb 1E-6176 -0 -> 1E-6176 Subnormal
dqscb145 scaleb 1E-6176 -1 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqscb150 scaleb -1E-6176 +1 -> -1E-6175 Subnormal
dqscb151 scaleb -1E-6176 -0 -> -1E-6176 Subnormal
dqscb152 scaleb -1E-6176 -1 -> -0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqscb153 scaleb -1.000000000000000000000000000000000E-6143 +1 -> -1.000000000000000000000000000000000E-6142
dqscb154 scaleb -1.000000000000000000000000000000000E-6143 +0 -> -1.000000000000000000000000000000000E-6143
dqscb155 scaleb -1.000000000000000000000000000000000E-6143 -1 -> -1.00000000000000000000000000000000E-6144 Subnormal Rounded
dqscb156 scaleb -1E-6143 +1 -> -1E-6142
dqscb157 scaleb -1E-6143 -0 -> -1E-6143
dqscb158 scaleb -1E-6143 -1 -> -1E-6144 Subnormal
dqscb159 scaleb -9.999999999999999999999999999999999E+6144 +1 -> -Infinity Overflow Inexact Rounded
dqscb160 scaleb -9.999999999999999999999999999999999E+6144 +0 -> -9.999999999999999999999999999999999E+6144
dqscb161 scaleb -9.999999999999999999999999999999999E+6144 -1 -> -9.999999999999999999999999999999999E+6143
dqscb162 scaleb -9E+6144 +1 -> -Infinity Overflow Inexact Rounded
dqscb163 scaleb -1E+6144 +1 -> -Infinity Overflow Inexact Rounded
-- some Origami
-- (these check that overflow is being done correctly)
dqscb171 scaleb 1000E+6109 +1 -> 1.000E+6113
dqscb172 scaleb 1000E+6110 +1 -> 1.000E+6114
dqscb173 scaleb 1000E+6111 +1 -> 1.0000E+6115 Clamped
dqscb174 scaleb 1000E+6112 +1 -> 1.00000E+6116 Clamped
dqscb175 scaleb 1000E+6113 +1 -> 1.000000E+6117 Clamped
dqscb176 scaleb 1000E+6114 +1 -> 1.0000000E+6118 Clamped
dqscb177 scaleb 1000E+6131 +1 -> 1.000000000000000000000000E+6135 Clamped
dqscb178 scaleb 1000E+6132 +1 -> 1.0000000000000000000000000E+6136 Clamped
dqscb179 scaleb 1000E+6133 +1 -> 1.00000000000000000000000000E+6137 Clamped
dqscb180 scaleb 1000E+6134 +1 -> 1.000000000000000000000000000E+6138 Clamped
dqscb181 scaleb 1000E+6135 +1 -> 1.0000000000000000000000000000E+6139 Clamped
dqscb182 scaleb 1000E+6136 +1 -> 1.00000000000000000000000000000E+6140 Clamped
dqscb183 scaleb 1000E+6137 +1 -> 1.000000000000000000000000000000E+6141 Clamped
dqscb184 scaleb 1000E+6138 +1 -> 1.0000000000000000000000000000000E+6142 Clamped
dqscb185 scaleb 1000E+6139 +1 -> 1.00000000000000000000000000000000E+6143 Clamped
dqscb186 scaleb 1000E+6140 +1 -> 1.000000000000000000000000000000000E+6144 Clamped
dqscb187 scaleb 1000E+6141 +1 -> Infinity Overflow Inexact Rounded
-- and a few more subnormal truncations
-- (these check that underflow is being done correctly)
dqscb221 scaleb 1.000000000000000000000000000000000E-6143 0 -> 1.000000000000000000000000000000000E-6143
dqscb222 scaleb 1.000000000000000000000000000000000E-6143 -1 -> 1.00000000000000000000000000000000E-6144 Subnormal Rounded
dqscb223 scaleb 1.000000000000000000000000000000000E-6143 -2 -> 1.0000000000000000000000000000000E-6145 Subnormal Rounded
dqscb224 scaleb 1.000000000000000000000000000000000E-6143 -3 -> 1.000000000000000000000000000000E-6146 Subnormal Rounded
dqscb225 scaleb 1.000000000000000000000000000000000E-6143 -4 -> 1.00000000000000000000000000000E-6147 Subnormal Rounded
dqscb226 scaleb 1.000000000000000000000000000000000E-6143 -5 -> 1.0000000000000000000000000000E-6148 Subnormal Rounded
dqscb227 scaleb 1.000000000000000000000000000000000E-6143 -6 -> 1.000000000000000000000000000E-6149 Subnormal Rounded
dqscb228 scaleb 1.000000000000000000000000000000000E-6143 -7 -> 1.00000000000000000000000000E-6150 Subnormal Rounded
dqscb229 scaleb 1.000000000000000000000000000000000E-6143 -8 -> 1.0000000000000000000000000E-6151 Subnormal Rounded
dqscb230 scaleb 1.000000000000000000000000000000000E-6143 -9 -> 1.000000000000000000000000E-6152 Subnormal Rounded
dqscb231 scaleb 1.000000000000000000000000000000000E-6143 -10 -> 1.00000000000000000000000E-6153 Subnormal Rounded
dqscb232 scaleb 1.000000000000000000000000000000000E-6143 -11 -> 1.0000000000000000000000E-6154 Subnormal Rounded
dqscb233 scaleb 1.000000000000000000000000000000000E-6143 -12 -> 1.000000000000000000000E-6155 Subnormal Rounded
dqscb234 scaleb 1.000000000000000000000000000000000E-6143 -13 -> 1.00000000000000000000E-6156 Subnormal Rounded
dqscb235 scaleb 1.000000000000000000000000000000000E-6143 -14 -> 1.0000000000000000000E-6157 Subnormal Rounded
dqscb236 scaleb 1.000000000000000000000000000000000E-6143 -15 -> 1.000000000000000000E-6158 Subnormal Rounded
dqscb237 scaleb 1.000000000000000000000000000000000E-6143 -16 -> 1.00000000000000000E-6159 Subnormal Rounded
dqscb238 scaleb 1.000000000000000000000000000000000E-6143 -17 -> 1.0000000000000000E-6160 Subnormal Rounded
dqscb239 scaleb 1.000000000000000000000000000000000E-6143 -18 -> 1.000000000000000E-6161 Subnormal Rounded
dqscb202 scaleb 1.000000000000000000000000000000000E-6143 -19 -> 1.00000000000000E-6162 Subnormal Rounded
dqscb203 scaleb 1.000000000000000000000000000000000E-6143 -20 -> 1.0000000000000E-6163 Subnormal Rounded
dqscb204 scaleb 1.000000000000000000000000000000000E-6143 -21 -> 1.000000000000E-6164 Subnormal Rounded
dqscb205 scaleb 1.000000000000000000000000000000000E-6143 -22 -> 1.00000000000E-6165 Subnormal Rounded
dqscb206 scaleb 1.000000000000000000000000000000000E-6143 -23 -> 1.0000000000E-6166 Subnormal Rounded
dqscb207 scaleb 1.000000000000000000000000000000000E-6143 -24 -> 1.000000000E-6167 Subnormal Rounded
dqscb208 scaleb 1.000000000000000000000000000000000E-6143 -25 -> 1.00000000E-6168 Subnormal Rounded
dqscb209 scaleb 1.000000000000000000000000000000000E-6143 -26 -> 1.0000000E-6169 Subnormal Rounded
dqscb210 scaleb 1.000000000000000000000000000000000E-6143 -27 -> 1.000000E-6170 Subnormal Rounded
dqscb211 scaleb 1.000000000000000000000000000000000E-6143 -28 -> 1.00000E-6171 Subnormal Rounded
dqscb212 scaleb 1.000000000000000000000000000000000E-6143 -29 -> 1.0000E-6172 Subnormal Rounded
dqscb213 scaleb 1.000000000000000000000000000000000E-6143 -30 -> 1.000E-6173 Subnormal Rounded
dqscb214 scaleb 1.000000000000000000000000000000000E-6143 -31 -> 1.00E-6174 Subnormal Rounded
dqscb215 scaleb 1.000000000000000000000000000000000E-6143 -32 -> 1.0E-6175 Subnormal Rounded
dqscb216 scaleb 1.000000000000000000000000000000000E-6143 -33 -> 1E-6176 Subnormal Rounded
dqscb217 scaleb 1.000000000000000000000000000000000E-6143 -34 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqscb218 scaleb 1.000000000000000000000000000000000E-6143 -35 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
------------------------------------------------------------------------
-- dqScalebB.decTest -- scale a decQuad by powers of 10 --
-- 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
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Max |rhs| is 2*(6144+34) = 12356
-- Sanity checks
dqscb001 scaleb 7.50 10 -> 7.50E+10
dqscb002 scaleb 7.50 3 -> 7.50E+3
dqscb003 scaleb 7.50 2 -> 750
dqscb004 scaleb 7.50 1 -> 75.0
dqscb005 scaleb 7.50 0 -> 7.50
dqscb006 scaleb 7.50 -1 -> 0.750
dqscb007 scaleb 7.50 -2 -> 0.0750
dqscb008 scaleb 7.50 -10 -> 7.50E-10
dqscb009 scaleb -7.50 3 -> -7.50E+3
dqscb010 scaleb -7.50 2 -> -750
dqscb011 scaleb -7.50 1 -> -75.0
dqscb012 scaleb -7.50 0 -> -7.50
dqscb013 scaleb -7.50 -1 -> -0.750
-- Infinities
dqscb014 scaleb Infinity 1 -> Infinity
dqscb015 scaleb -Infinity 2 -> -Infinity
dqscb016 scaleb Infinity -1 -> Infinity
dqscb017 scaleb -Infinity -2 -> -Infinity
-- Next two are somewhat undefined in 754r; treat as non-integer
dqscb018 scaleb 10 Infinity -> NaN Invalid_operation
dqscb019 scaleb 10 -Infinity -> NaN Invalid_operation
-- NaNs are undefined in 754r; assume usual processing
-- NaNs, 0 payload
dqscb021 scaleb NaN 1 -> NaN
dqscb022 scaleb -NaN -1 -> -NaN
dqscb023 scaleb sNaN 1 -> NaN Invalid_operation
dqscb024 scaleb -sNaN 1 -> -NaN Invalid_operation
dqscb025 scaleb 4 NaN -> NaN
dqscb026 scaleb -Inf -NaN -> -NaN
dqscb027 scaleb 4 sNaN -> NaN Invalid_operation
dqscb028 scaleb Inf -sNaN -> -NaN Invalid_operation
-- non-integer RHS
dqscb030 scaleb 1.23 1 -> 12.3
dqscb031 scaleb 1.23 1.00 -> NaN Invalid_operation
dqscb032 scaleb 1.23 1.1 -> NaN Invalid_operation
dqscb033 scaleb 1.23 1.01 -> NaN Invalid_operation
dqscb034 scaleb 1.23 0.01 -> NaN Invalid_operation
dqscb035 scaleb 1.23 0.11 -> NaN Invalid_operation
dqscb036 scaleb 1.23 0.999999999 -> NaN Invalid_operation
dqscb037 scaleb 1.23 -1 -> 0.123
dqscb0614 scaleb 1.23 -1.00 -> NaN Invalid_operation
dqscb039 scaleb 1.23 -1.1 -> NaN Invalid_operation
dqscb040 scaleb 1.23 -1.01 -> NaN Invalid_operation
dqscb041 scaleb 1.23 -0.01 -> NaN Invalid_operation
dqscb042 scaleb 1.23 -0.11 -> NaN Invalid_operation
dqscb043 scaleb 1.23 -0.999999999 -> NaN Invalid_operation
dqscb044 scaleb 1.23 0.1 -> NaN Invalid_operation
dqscb045 scaleb 1.23 1E+1 -> NaN Invalid_operation
dqscb046 scaleb 1.23 1.1234E+6 -> NaN Invalid_operation
dqscb047 scaleb 1.23 1.123E+4 -> NaN Invalid_operation
-- out-of range RHS
dqscb120 scaleb 1.23 12355 -> Infinity Overflow Inexact Rounded
dqscb121 scaleb 1.23 12356 -> Infinity Overflow Inexact Rounded
dqscb122 scaleb 1.23 12357 -> NaN Invalid_operation
dqscb123 scaleb 1.23 12358 -> NaN Invalid_operation
dqscb124 scaleb 1.23 -12355 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqscb125 scaleb 1.23 -12356 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqscb126 scaleb 1.23 -12357 -> NaN Invalid_operation
dqscb127 scaleb 1.23 -12358 -> NaN Invalid_operation
-- NaNs, non-0 payload
-- propagating NaNs
dqscb861 scaleb NaN01 -Inf -> NaN1
dqscb862 scaleb -NaN02 -1000 -> -NaN2
dqscb863 scaleb NaN03 1000 -> NaN3
dqscb864 scaleb NaN04 Inf -> NaN4
dqscb865 scaleb NaN05 NaN61 -> NaN5
dqscb866 scaleb -Inf -NaN71 -> -NaN71
dqscb867 scaleb -1000 NaN81 -> NaN81
dqscb868 scaleb 1000 NaN91 -> NaN91
dqscb869 scaleb Inf NaN101 -> NaN101
dqscb871 scaleb sNaN011 -Inf -> NaN11 Invalid_operation
dqscb872 scaleb sNaN012 -1000 -> NaN12 Invalid_operation
dqscb873 scaleb -sNaN013 1000 -> -NaN13 Invalid_operation
dqscb874 scaleb sNaN014 NaN171 -> NaN14 Invalid_operation
dqscb875 scaleb sNaN015 sNaN181 -> NaN15 Invalid_operation
dqscb876 scaleb NaN016 sNaN191 -> NaN191 Invalid_operation
dqscb877 scaleb -Inf sNaN201 -> NaN201 Invalid_operation
dqscb878 scaleb -1000 sNaN211 -> NaN211 Invalid_operation
dqscb879 scaleb 1000 -sNaN221 -> -NaN221 Invalid_operation
dqscb880 scaleb Inf sNaN231 -> NaN231 Invalid_operation
dqscb881 scaleb NaN025 sNaN241 -> NaN241 Invalid_operation
-- finites
dqscb051 scaleb 7 -2 -> 0.07
dqscb052 scaleb -7 -2 -> -0.07
dqscb053 scaleb 75 -2 -> 0.75
dqscb054 scaleb -75 -2 -> -0.75
dqscb055 scaleb 7.50 -2 -> 0.0750
dqscb056 scaleb -7.50 -2 -> -0.0750
dqscb057 scaleb 7.500 -2 -> 0.07500
dqscb058 scaleb -7.500 -2 -> -0.07500
dqscb061 scaleb 7 -1 -> 0.7
dqscb062 scaleb -7 -1 -> -0.7
dqscb063 scaleb 75 -1 -> 7.5
dqscb064 scaleb -75 -1 -> -7.5
dqscb065 scaleb 7.50 -1 -> 0.750
dqscb066 scaleb -7.50 -1 -> -0.750
dqscb067 scaleb 7.500 -1 -> 0.7500
dqscb068 scaleb -7.500 -1 -> -0.7500
dqscb071 scaleb 7 0 -> 7
dqscb072 scaleb -7 0 -> -7
dqscb073 scaleb 75 0 -> 75
dqscb074 scaleb -75 0 -> -75
dqscb075 scaleb 7.50 0 -> 7.50
dqscb076 scaleb -7.50 0 -> -7.50
dqscb077 scaleb 7.500 0 -> 7.500
dqscb078 scaleb -7.500 0 -> -7.500
dqscb081 scaleb 7 1 -> 7E+1
dqscb082 scaleb -7 1 -> -7E+1
dqscb083 scaleb 75 1 -> 7.5E+2
dqscb084 scaleb -75 1 -> -7.5E+2
dqscb085 scaleb 7.50 1 -> 75.0
dqscb086 scaleb -7.50 1 -> -75.0
dqscb087 scaleb 7.500 1 -> 75.00
dqscb088 scaleb -7.500 1 -> -75.00
dqscb091 scaleb 7 2 -> 7E+2
dqscb092 scaleb -7 2 -> -7E+2
dqscb093 scaleb 75 2 -> 7.5E+3
dqscb094 scaleb -75 2 -> -7.5E+3
dqscb095 scaleb 7.50 2 -> 750
dqscb096 scaleb -7.50 2 -> -750
dqscb097 scaleb 7.500 2 -> 750.0
dqscb098 scaleb -7.500 2 -> -750.0
-- zeros
dqscb111 scaleb 0 1 -> 0E+1
dqscb112 scaleb -0 2 -> -0E+2
dqscb113 scaleb 0E+4 3 -> 0E+7
dqscb114 scaleb -0E+4 4 -> -0E+8
dqscb115 scaleb 0.0000 5 -> 0E+1
dqscb116 scaleb -0.0000 6 -> -0E+2
dqscb117 scaleb 0E-141 7 -> 0E-134
dqscb118 scaleb -0E-141 8 -> -0E-133
-- Nmax, Nmin, Ntiny
dqscb132 scaleb 9.999999999999999999999999999999999E+6144 +6144 -> Infinity Overflow Inexact Rounded
dqscb133 scaleb 9.999999999999999999999999999999999E+6144 +10 -> Infinity Overflow Inexact Rounded
dqscb134 scaleb 9.999999999999999999999999999999999E+6144 +1 -> Infinity Overflow Inexact Rounded
dqscb135 scaleb 9.999999999999999999999999999999999E+6144 0 -> 9.999999999999999999999999999999999E+6144
dqscb136 scaleb 9.999999999999999999999999999999999E+6144 -1 -> 9.999999999999999999999999999999999E+6143
dqscb137 scaleb 1E-6143 +1 -> 1E-6142
dqscb1614 scaleb 1E-6143 -0 -> 1E-6143
dqscb139 scaleb 1E-6143 -1 -> 1E-6144 Subnormal
dqscb140 scaleb 1.000000000000000000000000000000000E-6143 +1 -> 1.000000000000000000000000000000000E-6142
dqscb141 scaleb 1.000000000000000000000000000000000E-6143 0 -> 1.000000000000000000000000000000000E-6143
dqscb142 scaleb 1.000000000000000000000000000000000E-6143 -1 -> 1.00000000000000000000000000000000E-6144 Subnormal Rounded
dqscb143 scaleb 1E-6176 +1 -> 1E-6175 Subnormal
dqscb144 scaleb 1E-6176 -0 -> 1E-6176 Subnormal
dqscb145 scaleb 1E-6176 -1 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqscb150 scaleb -1E-6176 +1 -> -1E-6175 Subnormal
dqscb151 scaleb -1E-6176 -0 -> -1E-6176 Subnormal
dqscb152 scaleb -1E-6176 -1 -> -0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqscb153 scaleb -1.000000000000000000000000000000000E-6143 +1 -> -1.000000000000000000000000000000000E-6142
dqscb154 scaleb -1.000000000000000000000000000000000E-6143 +0 -> -1.000000000000000000000000000000000E-6143
dqscb155 scaleb -1.000000000000000000000000000000000E-6143 -1 -> -1.00000000000000000000000000000000E-6144 Subnormal Rounded
dqscb156 scaleb -1E-6143 +1 -> -1E-6142
dqscb157 scaleb -1E-6143 -0 -> -1E-6143
dqscb158 scaleb -1E-6143 -1 -> -1E-6144 Subnormal
dqscb159 scaleb -9.999999999999999999999999999999999E+6144 +1 -> -Infinity Overflow Inexact Rounded
dqscb160 scaleb -9.999999999999999999999999999999999E+6144 +0 -> -9.999999999999999999999999999999999E+6144
dqscb161 scaleb -9.999999999999999999999999999999999E+6144 -1 -> -9.999999999999999999999999999999999E+6143
dqscb162 scaleb -9E+6144 +1 -> -Infinity Overflow Inexact Rounded
dqscb163 scaleb -1E+6144 +1 -> -Infinity Overflow Inexact Rounded
-- some Origami
-- (these check that overflow is being done correctly)
dqscb171 scaleb 1000E+6109 +1 -> 1.000E+6113
dqscb172 scaleb 1000E+6110 +1 -> 1.000E+6114
dqscb173 scaleb 1000E+6111 +1 -> 1.0000E+6115 Clamped
dqscb174 scaleb 1000E+6112 +1 -> 1.00000E+6116 Clamped
dqscb175 scaleb 1000E+6113 +1 -> 1.000000E+6117 Clamped
dqscb176 scaleb 1000E+6114 +1 -> 1.0000000E+6118 Clamped
dqscb177 scaleb 1000E+6131 +1 -> 1.000000000000000000000000E+6135 Clamped
dqscb178 scaleb 1000E+6132 +1 -> 1.0000000000000000000000000E+6136 Clamped
dqscb179 scaleb 1000E+6133 +1 -> 1.00000000000000000000000000E+6137 Clamped
dqscb180 scaleb 1000E+6134 +1 -> 1.000000000000000000000000000E+6138 Clamped
dqscb181 scaleb 1000E+6135 +1 -> 1.0000000000000000000000000000E+6139 Clamped
dqscb182 scaleb 1000E+6136 +1 -> 1.00000000000000000000000000000E+6140 Clamped
dqscb183 scaleb 1000E+6137 +1 -> 1.000000000000000000000000000000E+6141 Clamped
dqscb184 scaleb 1000E+6138 +1 -> 1.0000000000000000000000000000000E+6142 Clamped
dqscb185 scaleb 1000E+6139 +1 -> 1.00000000000000000000000000000000E+6143 Clamped
dqscb186 scaleb 1000E+6140 +1 -> 1.000000000000000000000000000000000E+6144 Clamped
dqscb187 scaleb 1000E+6141 +1 -> Infinity Overflow Inexact Rounded
-- and a few more subnormal truncations
-- (these check that underflow is being done correctly)
dqscb221 scaleb 1.000000000000000000000000000000000E-6143 0 -> 1.000000000000000000000000000000000E-6143
dqscb222 scaleb 1.000000000000000000000000000000000E-6143 -1 -> 1.00000000000000000000000000000000E-6144 Subnormal Rounded
dqscb223 scaleb 1.000000000000000000000000000000000E-6143 -2 -> 1.0000000000000000000000000000000E-6145 Subnormal Rounded
dqscb224 scaleb 1.000000000000000000000000000000000E-6143 -3 -> 1.000000000000000000000000000000E-6146 Subnormal Rounded
dqscb225 scaleb 1.000000000000000000000000000000000E-6143 -4 -> 1.00000000000000000000000000000E-6147 Subnormal Rounded
dqscb226 scaleb 1.000000000000000000000000000000000E-6143 -5 -> 1.0000000000000000000000000000E-6148 Subnormal Rounded
dqscb227 scaleb 1.000000000000000000000000000000000E-6143 -6 -> 1.000000000000000000000000000E-6149 Subnormal Rounded
dqscb228 scaleb 1.000000000000000000000000000000000E-6143 -7 -> 1.00000000000000000000000000E-6150 Subnormal Rounded
dqscb229 scaleb 1.000000000000000000000000000000000E-6143 -8 -> 1.0000000000000000000000000E-6151 Subnormal Rounded
dqscb230 scaleb 1.000000000000000000000000000000000E-6143 -9 -> 1.000000000000000000000000E-6152 Subnormal Rounded
dqscb231 scaleb 1.000000000000000000000000000000000E-6143 -10 -> 1.00000000000000000000000E-6153 Subnormal Rounded
dqscb232 scaleb 1.000000000000000000000000000000000E-6143 -11 -> 1.0000000000000000000000E-6154 Subnormal Rounded
dqscb233 scaleb 1.000000000000000000000000000000000E-6143 -12 -> 1.000000000000000000000E-6155 Subnormal Rounded
dqscb234 scaleb 1.000000000000000000000000000000000E-6143 -13 -> 1.00000000000000000000E-6156 Subnormal Rounded
dqscb235 scaleb 1.000000000000000000000000000000000E-6143 -14 -> 1.0000000000000000000E-6157 Subnormal Rounded
dqscb236 scaleb 1.000000000000000000000000000000000E-6143 -15 -> 1.000000000000000000E-6158 Subnormal Rounded
dqscb237 scaleb 1.000000000000000000000000000000000E-6143 -16 -> 1.00000000000000000E-6159 Subnormal Rounded
dqscb238 scaleb 1.000000000000000000000000000000000E-6143 -17 -> 1.0000000000000000E-6160 Subnormal Rounded
dqscb239 scaleb 1.000000000000000000000000000000000E-6143 -18 -> 1.000000000000000E-6161 Subnormal Rounded
dqscb202 scaleb 1.000000000000000000000000000000000E-6143 -19 -> 1.00000000000000E-6162 Subnormal Rounded
dqscb203 scaleb 1.000000000000000000000000000000000E-6143 -20 -> 1.0000000000000E-6163 Subnormal Rounded
dqscb204 scaleb 1.000000000000000000000000000000000E-6143 -21 -> 1.000000000000E-6164 Subnormal Rounded
dqscb205 scaleb 1.000000000000000000000000000000000E-6143 -22 -> 1.00000000000E-6165 Subnormal Rounded
dqscb206 scaleb 1.000000000000000000000000000000000E-6143 -23 -> 1.0000000000E-6166 Subnormal Rounded
dqscb207 scaleb 1.000000000000000000000000000000000E-6143 -24 -> 1.000000000E-6167 Subnormal Rounded
dqscb208 scaleb 1.000000000000000000000000000000000E-6143 -25 -> 1.00000000E-6168 Subnormal Rounded
dqscb209 scaleb 1.000000000000000000000000000000000E-6143 -26 -> 1.0000000E-6169 Subnormal Rounded
dqscb210 scaleb 1.000000000000000000000000000000000E-6143 -27 -> 1.000000E-6170 Subnormal Rounded
dqscb211 scaleb 1.000000000000000000000000000000000E-6143 -28 -> 1.00000E-6171 Subnormal Rounded
dqscb212 scaleb 1.000000000000000000000000000000000E-6143 -29 -> 1.0000E-6172 Subnormal Rounded
dqscb213 scaleb 1.000000000000000000000000000000000E-6143 -30 -> 1.000E-6173 Subnormal Rounded
dqscb214 scaleb 1.000000000000000000000000000000000E-6143 -31 -> 1.00E-6174 Subnormal Rounded
dqscb215 scaleb 1.000000000000000000000000000000000E-6143 -32 -> 1.0E-6175 Subnormal Rounded
dqscb216 scaleb 1.000000000000000000000000000000000E-6143 -33 -> 1E-6176 Subnormal Rounded
dqscb217 scaleb 1.000000000000000000000000000000000E-6143 -34 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped
dqscb218 scaleb 1.000000000000000000000000000000000E-6143 -35 -> 0E-6176 Underflow Subnormal Inexact Rounded Clamped

View file

@ -1,298 +1,298 @@
------------------------------------------------------------------------
-- dqShift.decTest -- shift decQuad coefficient left or right --
-- 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
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check
dqshi001 shift 0 0 -> 0
dqshi002 shift 0 2 -> 0
dqshi003 shift 1 2 -> 100
dqshi004 shift 1 33 -> 1000000000000000000000000000000000
dqshi005 shift 1 34 -> 0
dqshi006 shift 1 -1 -> 0
dqshi007 shift 0 -2 -> 0
dqshi008 shift 1234567890123456789012345678901234 -1 -> 123456789012345678901234567890123
dqshi009 shift 1234567890123456789012345678901234 -33 -> 1
dqshi010 shift 1234567890123456789012345678901234 -34 -> 0
dqshi011 shift 9934567890123456789012345678901234 -33 -> 9
dqshi012 shift 9934567890123456789012345678901234 -34 -> 0
-- rhs must be an integer
dqshi015 shift 1 1.5 -> NaN Invalid_operation
dqshi016 shift 1 1.0 -> NaN Invalid_operation
dqshi017 shift 1 0.1 -> NaN Invalid_operation
dqshi018 shift 1 0.0 -> NaN Invalid_operation
dqshi019 shift 1 1E+1 -> NaN Invalid_operation
dqshi020 shift 1 1E+99 -> NaN Invalid_operation
dqshi021 shift 1 Inf -> NaN Invalid_operation
dqshi022 shift 1 -Inf -> NaN Invalid_operation
-- and |rhs| <= precision
dqshi025 shift 1 -1000 -> NaN Invalid_operation
dqshi026 shift 1 -35 -> NaN Invalid_operation
dqshi027 shift 1 35 -> NaN Invalid_operation
dqshi028 shift 1 1000 -> NaN Invalid_operation
-- full shifting pattern
dqshi030 shift 1234567890123456789012345678901234 -34 -> 0
dqshi031 shift 1234567890123456789012345678901234 -33 -> 1
dqshi032 shift 1234567890123456789012345678901234 -32 -> 12
dqshi033 shift 1234567890123456789012345678901234 -31 -> 123
dqshi034 shift 1234567890123456789012345678901234 -30 -> 1234
dqshi035 shift 1234567890123456789012345678901234 -29 -> 12345
dqshi036 shift 1234567890123456789012345678901234 -28 -> 123456
dqshi037 shift 1234567890123456789012345678901234 -27 -> 1234567
dqshi038 shift 1234567890123456789012345678901234 -26 -> 12345678
dqshi039 shift 1234567890123456789012345678901234 -25 -> 123456789
dqshi040 shift 1234567890123456789012345678901234 -24 -> 1234567890
dqshi041 shift 1234567890123456789012345678901234 -23 -> 12345678901
dqshi042 shift 1234567890123456789012345678901234 -22 -> 123456789012
dqshi043 shift 1234567890123456789012345678901234 -21 -> 1234567890123
dqshi044 shift 1234567890123456789012345678901234 -20 -> 12345678901234
dqshi045 shift 1234567890123456789012345678901234 -19 -> 123456789012345
dqshi047 shift 1234567890123456789012345678901234 -18 -> 1234567890123456
dqshi048 shift 1234567890123456789012345678901234 -17 -> 12345678901234567
dqshi049 shift 1234567890123456789012345678901234 -16 -> 123456789012345678
dqshi050 shift 1234567890123456789012345678901234 -15 -> 1234567890123456789
dqshi051 shift 1234567890123456789012345678901234 -14 -> 12345678901234567890
dqshi052 shift 1234567890123456789012345678901234 -13 -> 123456789012345678901
dqshi053 shift 1234567890123456789012345678901234 -12 -> 1234567890123456789012
dqshi054 shift 1234567890123456789012345678901234 -11 -> 12345678901234567890123
dqshi055 shift 1234567890123456789012345678901234 -10 -> 123456789012345678901234
dqshi056 shift 1234567890123456789012345678901234 -9 -> 1234567890123456789012345
dqshi057 shift 1234567890123456789012345678901234 -8 -> 12345678901234567890123456
dqshi058 shift 1234567890123456789012345678901234 -7 -> 123456789012345678901234567
dqshi059 shift 1234567890123456789012345678901234 -6 -> 1234567890123456789012345678
dqshi060 shift 1234567890123456789012345678901234 -5 -> 12345678901234567890123456789
dqshi061 shift 1234567890123456789012345678901234 -4 -> 123456789012345678901234567890
dqshi062 shift 1234567890123456789012345678901234 -3 -> 1234567890123456789012345678901
dqshi063 shift 1234567890123456789012345678901234 -2 -> 12345678901234567890123456789012
dqshi064 shift 1234567890123456789012345678901234 -1 -> 123456789012345678901234567890123
dqshi065 shift 1234567890123456789012345678901234 -0 -> 1234567890123456789012345678901234
dqshi066 shift 1234567890123456789012345678901234 +0 -> 1234567890123456789012345678901234
dqshi067 shift 1234567890123456789012345678901234 +1 -> 2345678901234567890123456789012340
dqshi068 shift 1234567890123456789012345678901234 +2 -> 3456789012345678901234567890123400
dqshi069 shift 1234567890123456789012345678901234 +3 -> 4567890123456789012345678901234000
dqshi070 shift 1234567890123456789012345678901234 +4 -> 5678901234567890123456789012340000
dqshi071 shift 1234567890123456789012345678901234 +5 -> 6789012345678901234567890123400000
dqshi072 shift 1234567890123456789012345678901234 +6 -> 7890123456789012345678901234000000
dqshi073 shift 1234567890123456789012345678901234 +7 -> 8901234567890123456789012340000000
dqshi074 shift 1234567890123456789012345678901234 +8 -> 9012345678901234567890123400000000
dqshi075 shift 1234567890123456789012345678901234 +9 -> 123456789012345678901234000000000
dqshi076 shift 1234567890123456789012345678901234 +10 -> 1234567890123456789012340000000000
dqshi077 shift 1234567890123456789012345678901234 +11 -> 2345678901234567890123400000000000
dqshi078 shift 1234567890123456789012345678901234 +12 -> 3456789012345678901234000000000000
dqshi079 shift 1234567890123456789012345678901234 +13 -> 4567890123456789012340000000000000
dqshi080 shift 1234567890123456789012345678901234 +14 -> 5678901234567890123400000000000000
dqshi081 shift 1234567890123456789012345678901234 +15 -> 6789012345678901234000000000000000
dqshi082 shift 1234567890123456789012345678901234 +16 -> 7890123456789012340000000000000000
dqshi083 shift 1234567890123456789012345678901234 +17 -> 8901234567890123400000000000000000
dqshi084 shift 1234567890123456789012345678901234 +18 -> 9012345678901234000000000000000000
dqshi085 shift 1234567890123456789012345678901234 +19 -> 123456789012340000000000000000000
dqshi086 shift 1234567890123456789012345678901234 +20 -> 1234567890123400000000000000000000
dqshi087 shift 1234567890123456789012345678901234 +21 -> 2345678901234000000000000000000000
dqshi088 shift 1234567890123456789012345678901234 +22 -> 3456789012340000000000000000000000
dqshi089 shift 1234567890123456789012345678901234 +23 -> 4567890123400000000000000000000000
dqshi090 shift 1234567890123456789012345678901234 +24 -> 5678901234000000000000000000000000
dqshi091 shift 1234567890123456789012345678901234 +25 -> 6789012340000000000000000000000000
dqshi092 shift 1234567890123456789012345678901234 +26 -> 7890123400000000000000000000000000
dqshi093 shift 1234567890123456789012345678901234 +27 -> 8901234000000000000000000000000000
dqshi094 shift 1234567890123456789012345678901234 +28 -> 9012340000000000000000000000000000
dqshi095 shift 1234567890123456789012345678901234 +29 -> 123400000000000000000000000000000
dqshi096 shift 1234567890123456789012345678901234 +30 -> 1234000000000000000000000000000000
dqshi097 shift 1234567890123456789012345678901234 +31 -> 2340000000000000000000000000000000
dqshi098 shift 1234567890123456789012345678901234 +32 -> 3400000000000000000000000000000000
dqshi099 shift 1234567890123456789012345678901234 +33 -> 4000000000000000000000000000000000
dqshi100 shift 1234567890123456789012345678901234 +34 -> 0
-- zeros
dqshi270 shift 0E-10 +29 -> 0E-10
dqshi271 shift 0E-10 -29 -> 0E-10
dqshi272 shift 0.000 +29 -> 0.000
dqshi273 shift 0.000 -29 -> 0.000
dqshi274 shift 0E+10 +29 -> 0E+10
dqshi275 shift 0E+10 -29 -> 0E+10
dqshi276 shift -0E-10 +29 -> -0E-10
dqshi277 shift -0E-10 -29 -> -0E-10
dqshi278 shift -0.000 +29 -> -0.000
dqshi279 shift -0.000 -29 -> -0.000
dqshi280 shift -0E+10 +29 -> -0E+10
dqshi281 shift -0E+10 -29 -> -0E+10
-- Nmax, Nmin, Ntiny
dqshi141 shift 9.999999999999999999999999999999999E+6144 -1 -> 9.99999999999999999999999999999999E+6143
dqshi142 shift 9.999999999999999999999999999999999E+6144 -33 -> 9E+6111
dqshi143 shift 9.999999999999999999999999999999999E+6144 1 -> 9.999999999999999999999999999999990E+6144
dqshi144 shift 9.999999999999999999999999999999999E+6144 33 -> 9.000000000000000000000000000000000E+6144
dqshi145 shift 1E-6143 -1 -> 0E-6143
dqshi146 shift 1E-6143 -33 -> 0E-6143
dqshi147 shift 1E-6143 1 -> 1.0E-6142
dqshi148 shift 1E-6143 33 -> 1.000000000000000000000000000000000E-6110
dqshi151 shift 1.000000000000000000000000000000000E-6143 -1 -> 1.00000000000000000000000000000000E-6144
dqshi152 shift 1.000000000000000000000000000000000E-6143 -33 -> 1E-6176
dqshi153 shift 1.000000000000000000000000000000000E-6143 1 -> 0E-6176
dqshi154 shift 1.000000000000000000000000000000000E-6143 33 -> 0E-6176
dqshi155 shift 9.000000000000000000000000000000000E-6143 -1 -> 9.00000000000000000000000000000000E-6144
dqshi156 shift 9.000000000000000000000000000000000E-6143 -33 -> 9E-6176
dqshi157 shift 9.000000000000000000000000000000000E-6143 1 -> 0E-6176
dqshi158 shift 9.000000000000000000000000000000000E-6143 33 -> 0E-6176
dqshi160 shift 1E-6176 -1 -> 0E-6176
dqshi161 shift 1E-6176 -33 -> 0E-6176
dqshi162 shift 1E-6176 1 -> 1.0E-6175
dqshi163 shift 1E-6176 33 -> 1.000000000000000000000000000000000E-6143
-- negatives
dqshi171 shift -9.999999999999999999999999999999999E+6144 -1 -> -9.99999999999999999999999999999999E+6143
dqshi172 shift -9.999999999999999999999999999999999E+6144 -33 -> -9E+6111
dqshi173 shift -9.999999999999999999999999999999999E+6144 1 -> -9.999999999999999999999999999999990E+6144
dqshi174 shift -9.999999999999999999999999999999999E+6144 33 -> -9.000000000000000000000000000000000E+6144
dqshi175 shift -1E-6143 -1 -> -0E-6143
dqshi176 shift -1E-6143 -33 -> -0E-6143
dqshi177 shift -1E-6143 1 -> -1.0E-6142
dqshi178 shift -1E-6143 33 -> -1.000000000000000000000000000000000E-6110
dqshi181 shift -1.000000000000000000000000000000000E-6143 -1 -> -1.00000000000000000000000000000000E-6144
dqshi182 shift -1.000000000000000000000000000000000E-6143 -33 -> -1E-6176
dqshi183 shift -1.000000000000000000000000000000000E-6143 1 -> -0E-6176
dqshi184 shift -1.000000000000000000000000000000000E-6143 33 -> -0E-6176
dqshi185 shift -9.000000000000000000000000000000000E-6143 -1 -> -9.00000000000000000000000000000000E-6144
dqshi186 shift -9.000000000000000000000000000000000E-6143 -33 -> -9E-6176
dqshi187 shift -9.000000000000000000000000000000000E-6143 1 -> -0E-6176
dqshi188 shift -9.000000000000000000000000000000000E-6143 33 -> -0E-6176
dqshi190 shift -1E-6176 -1 -> -0E-6176
dqshi191 shift -1E-6176 -33 -> -0E-6176
dqshi192 shift -1E-6176 1 -> -1.0E-6175
dqshi193 shift -1E-6176 33 -> -1.000000000000000000000000000000000E-6143
-- more negatives (of sanities)
dqshi201 shift -0 0 -> -0
dqshi202 shift -0 2 -> -0
dqshi203 shift -1 2 -> -100
dqshi204 shift -1 33 -> -1000000000000000000000000000000000
dqshi205 shift -1 34 -> -0
dqshi206 shift -1 -1 -> -0
dqshi207 shift -0 -2 -> -0
dqshi208 shift -1234567890123456789012345678901234 -1 -> -123456789012345678901234567890123
dqshi209 shift -1234567890123456789012345678901234 -33 -> -1
dqshi210 shift -1234567890123456789012345678901234 -34 -> -0
dqshi211 shift -9934567890123456789012345678901234 -33 -> -9
dqshi212 shift -9934567890123456789012345678901234 -34 -> -0
-- Specials; NaNs are handled as usual
dqshi781 shift -Inf -8 -> -Infinity
dqshi782 shift -Inf -1 -> -Infinity
dqshi783 shift -Inf -0 -> -Infinity
dqshi784 shift -Inf 0 -> -Infinity
dqshi785 shift -Inf 1 -> -Infinity
dqshi786 shift -Inf 8 -> -Infinity
dqshi787 shift -1000 -Inf -> NaN Invalid_operation
dqshi788 shift -Inf -Inf -> NaN Invalid_operation
dqshi789 shift -1 -Inf -> NaN Invalid_operation
dqshi790 shift -0 -Inf -> NaN Invalid_operation
dqshi791 shift 0 -Inf -> NaN Invalid_operation
dqshi792 shift 1 -Inf -> NaN Invalid_operation
dqshi793 shift 1000 -Inf -> NaN Invalid_operation
dqshi794 shift Inf -Inf -> NaN Invalid_operation
dqshi800 shift Inf -Inf -> NaN Invalid_operation
dqshi801 shift Inf -8 -> Infinity
dqshi802 shift Inf -1 -> Infinity
dqshi803 shift Inf -0 -> Infinity
dqshi804 shift Inf 0 -> Infinity
dqshi805 shift Inf 1 -> Infinity
dqshi806 shift Inf 8 -> Infinity
dqshi807 shift Inf Inf -> NaN Invalid_operation
dqshi808 shift -1000 Inf -> NaN Invalid_operation
dqshi809 shift -Inf Inf -> NaN Invalid_operation
dqshi810 shift -1 Inf -> NaN Invalid_operation
dqshi811 shift -0 Inf -> NaN Invalid_operation
dqshi812 shift 0 Inf -> NaN Invalid_operation
dqshi813 shift 1 Inf -> NaN Invalid_operation
dqshi814 shift 1000 Inf -> NaN Invalid_operation
dqshi815 shift Inf Inf -> NaN Invalid_operation
dqshi821 shift NaN -Inf -> NaN
dqshi822 shift NaN -1000 -> NaN
dqshi823 shift NaN -1 -> NaN
dqshi824 shift NaN -0 -> NaN
dqshi825 shift NaN 0 -> NaN
dqshi826 shift NaN 1 -> NaN
dqshi827 shift NaN 1000 -> NaN
dqshi828 shift NaN Inf -> NaN
dqshi829 shift NaN NaN -> NaN
dqshi830 shift -Inf NaN -> NaN
dqshi831 shift -1000 NaN -> NaN
dqshi832 shift -1 NaN -> NaN
dqshi833 shift -0 NaN -> NaN
dqshi834 shift 0 NaN -> NaN
dqshi835 shift 1 NaN -> NaN
dqshi836 shift 1000 NaN -> NaN
dqshi837 shift Inf NaN -> NaN
dqshi841 shift sNaN -Inf -> NaN Invalid_operation
dqshi842 shift sNaN -1000 -> NaN Invalid_operation
dqshi843 shift sNaN -1 -> NaN Invalid_operation
dqshi844 shift sNaN -0 -> NaN Invalid_operation
dqshi845 shift sNaN 0 -> NaN Invalid_operation
dqshi846 shift sNaN 1 -> NaN Invalid_operation
dqshi847 shift sNaN 1000 -> NaN Invalid_operation
dqshi848 shift sNaN NaN -> NaN Invalid_operation
dqshi849 shift sNaN sNaN -> NaN Invalid_operation
dqshi850 shift NaN sNaN -> NaN Invalid_operation
dqshi851 shift -Inf sNaN -> NaN Invalid_operation
dqshi852 shift -1000 sNaN -> NaN Invalid_operation
dqshi853 shift -1 sNaN -> NaN Invalid_operation
dqshi854 shift -0 sNaN -> NaN Invalid_operation
dqshi855 shift 0 sNaN -> NaN Invalid_operation
dqshi856 shift 1 sNaN -> NaN Invalid_operation
dqshi857 shift 1000 sNaN -> NaN Invalid_operation
dqshi858 shift Inf sNaN -> NaN Invalid_operation
dqshi859 shift NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqshi861 shift NaN1 -Inf -> NaN1
dqshi862 shift +NaN2 -1000 -> NaN2
dqshi863 shift NaN3 1000 -> NaN3
dqshi864 shift NaN4 Inf -> NaN4
dqshi865 shift NaN5 +NaN6 -> NaN5
dqshi866 shift -Inf NaN7 -> NaN7
dqshi867 shift -1000 NaN8 -> NaN8
dqshi868 shift 1000 NaN9 -> NaN9
dqshi869 shift Inf +NaN10 -> NaN10
dqshi871 shift sNaN11 -Inf -> NaN11 Invalid_operation
dqshi872 shift sNaN12 -1000 -> NaN12 Invalid_operation
dqshi873 shift sNaN13 1000 -> NaN13 Invalid_operation
dqshi874 shift sNaN14 NaN17 -> NaN14 Invalid_operation
dqshi875 shift sNaN15 sNaN18 -> NaN15 Invalid_operation
dqshi876 shift NaN16 sNaN19 -> NaN19 Invalid_operation
dqshi877 shift -Inf +sNaN20 -> NaN20 Invalid_operation
dqshi878 shift -1000 sNaN21 -> NaN21 Invalid_operation
dqshi879 shift 1000 sNaN22 -> NaN22 Invalid_operation
dqshi880 shift Inf sNaN23 -> NaN23 Invalid_operation
dqshi881 shift +NaN25 +sNaN24 -> NaN24 Invalid_operation
dqshi882 shift -NaN26 NaN28 -> -NaN26
dqshi883 shift -sNaN27 sNaN29 -> -NaN27 Invalid_operation
dqshi884 shift 1000 -NaN30 -> -NaN30
dqshi885 shift 1000 -sNaN31 -> -NaN31 Invalid_operation
------------------------------------------------------------------------
-- dqShift.decTest -- shift decQuad coefficient left or right --
-- 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
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check
dqshi001 shift 0 0 -> 0
dqshi002 shift 0 2 -> 0
dqshi003 shift 1 2 -> 100
dqshi004 shift 1 33 -> 1000000000000000000000000000000000
dqshi005 shift 1 34 -> 0
dqshi006 shift 1 -1 -> 0
dqshi007 shift 0 -2 -> 0
dqshi008 shift 1234567890123456789012345678901234 -1 -> 123456789012345678901234567890123
dqshi009 shift 1234567890123456789012345678901234 -33 -> 1
dqshi010 shift 1234567890123456789012345678901234 -34 -> 0
dqshi011 shift 9934567890123456789012345678901234 -33 -> 9
dqshi012 shift 9934567890123456789012345678901234 -34 -> 0
-- rhs must be an integer
dqshi015 shift 1 1.5 -> NaN Invalid_operation
dqshi016 shift 1 1.0 -> NaN Invalid_operation
dqshi017 shift 1 0.1 -> NaN Invalid_operation
dqshi018 shift 1 0.0 -> NaN Invalid_operation
dqshi019 shift 1 1E+1 -> NaN Invalid_operation
dqshi020 shift 1 1E+99 -> NaN Invalid_operation
dqshi021 shift 1 Inf -> NaN Invalid_operation
dqshi022 shift 1 -Inf -> NaN Invalid_operation
-- and |rhs| <= precision
dqshi025 shift 1 -1000 -> NaN Invalid_operation
dqshi026 shift 1 -35 -> NaN Invalid_operation
dqshi027 shift 1 35 -> NaN Invalid_operation
dqshi028 shift 1 1000 -> NaN Invalid_operation
-- full shifting pattern
dqshi030 shift 1234567890123456789012345678901234 -34 -> 0
dqshi031 shift 1234567890123456789012345678901234 -33 -> 1
dqshi032 shift 1234567890123456789012345678901234 -32 -> 12
dqshi033 shift 1234567890123456789012345678901234 -31 -> 123
dqshi034 shift 1234567890123456789012345678901234 -30 -> 1234
dqshi035 shift 1234567890123456789012345678901234 -29 -> 12345
dqshi036 shift 1234567890123456789012345678901234 -28 -> 123456
dqshi037 shift 1234567890123456789012345678901234 -27 -> 1234567
dqshi038 shift 1234567890123456789012345678901234 -26 -> 12345678
dqshi039 shift 1234567890123456789012345678901234 -25 -> 123456789
dqshi040 shift 1234567890123456789012345678901234 -24 -> 1234567890
dqshi041 shift 1234567890123456789012345678901234 -23 -> 12345678901
dqshi042 shift 1234567890123456789012345678901234 -22 -> 123456789012
dqshi043 shift 1234567890123456789012345678901234 -21 -> 1234567890123
dqshi044 shift 1234567890123456789012345678901234 -20 -> 12345678901234
dqshi045 shift 1234567890123456789012345678901234 -19 -> 123456789012345
dqshi047 shift 1234567890123456789012345678901234 -18 -> 1234567890123456
dqshi048 shift 1234567890123456789012345678901234 -17 -> 12345678901234567
dqshi049 shift 1234567890123456789012345678901234 -16 -> 123456789012345678
dqshi050 shift 1234567890123456789012345678901234 -15 -> 1234567890123456789
dqshi051 shift 1234567890123456789012345678901234 -14 -> 12345678901234567890
dqshi052 shift 1234567890123456789012345678901234 -13 -> 123456789012345678901
dqshi053 shift 1234567890123456789012345678901234 -12 -> 1234567890123456789012
dqshi054 shift 1234567890123456789012345678901234 -11 -> 12345678901234567890123
dqshi055 shift 1234567890123456789012345678901234 -10 -> 123456789012345678901234
dqshi056 shift 1234567890123456789012345678901234 -9 -> 1234567890123456789012345
dqshi057 shift 1234567890123456789012345678901234 -8 -> 12345678901234567890123456
dqshi058 shift 1234567890123456789012345678901234 -7 -> 123456789012345678901234567
dqshi059 shift 1234567890123456789012345678901234 -6 -> 1234567890123456789012345678
dqshi060 shift 1234567890123456789012345678901234 -5 -> 12345678901234567890123456789
dqshi061 shift 1234567890123456789012345678901234 -4 -> 123456789012345678901234567890
dqshi062 shift 1234567890123456789012345678901234 -3 -> 1234567890123456789012345678901
dqshi063 shift 1234567890123456789012345678901234 -2 -> 12345678901234567890123456789012
dqshi064 shift 1234567890123456789012345678901234 -1 -> 123456789012345678901234567890123
dqshi065 shift 1234567890123456789012345678901234 -0 -> 1234567890123456789012345678901234
dqshi066 shift 1234567890123456789012345678901234 +0 -> 1234567890123456789012345678901234
dqshi067 shift 1234567890123456789012345678901234 +1 -> 2345678901234567890123456789012340
dqshi068 shift 1234567890123456789012345678901234 +2 -> 3456789012345678901234567890123400
dqshi069 shift 1234567890123456789012345678901234 +3 -> 4567890123456789012345678901234000
dqshi070 shift 1234567890123456789012345678901234 +4 -> 5678901234567890123456789012340000
dqshi071 shift 1234567890123456789012345678901234 +5 -> 6789012345678901234567890123400000
dqshi072 shift 1234567890123456789012345678901234 +6 -> 7890123456789012345678901234000000
dqshi073 shift 1234567890123456789012345678901234 +7 -> 8901234567890123456789012340000000
dqshi074 shift 1234567890123456789012345678901234 +8 -> 9012345678901234567890123400000000
dqshi075 shift 1234567890123456789012345678901234 +9 -> 123456789012345678901234000000000
dqshi076 shift 1234567890123456789012345678901234 +10 -> 1234567890123456789012340000000000
dqshi077 shift 1234567890123456789012345678901234 +11 -> 2345678901234567890123400000000000
dqshi078 shift 1234567890123456789012345678901234 +12 -> 3456789012345678901234000000000000
dqshi079 shift 1234567890123456789012345678901234 +13 -> 4567890123456789012340000000000000
dqshi080 shift 1234567890123456789012345678901234 +14 -> 5678901234567890123400000000000000
dqshi081 shift 1234567890123456789012345678901234 +15 -> 6789012345678901234000000000000000
dqshi082 shift 1234567890123456789012345678901234 +16 -> 7890123456789012340000000000000000
dqshi083 shift 1234567890123456789012345678901234 +17 -> 8901234567890123400000000000000000
dqshi084 shift 1234567890123456789012345678901234 +18 -> 9012345678901234000000000000000000
dqshi085 shift 1234567890123456789012345678901234 +19 -> 123456789012340000000000000000000
dqshi086 shift 1234567890123456789012345678901234 +20 -> 1234567890123400000000000000000000
dqshi087 shift 1234567890123456789012345678901234 +21 -> 2345678901234000000000000000000000
dqshi088 shift 1234567890123456789012345678901234 +22 -> 3456789012340000000000000000000000
dqshi089 shift 1234567890123456789012345678901234 +23 -> 4567890123400000000000000000000000
dqshi090 shift 1234567890123456789012345678901234 +24 -> 5678901234000000000000000000000000
dqshi091 shift 1234567890123456789012345678901234 +25 -> 6789012340000000000000000000000000
dqshi092 shift 1234567890123456789012345678901234 +26 -> 7890123400000000000000000000000000
dqshi093 shift 1234567890123456789012345678901234 +27 -> 8901234000000000000000000000000000
dqshi094 shift 1234567890123456789012345678901234 +28 -> 9012340000000000000000000000000000
dqshi095 shift 1234567890123456789012345678901234 +29 -> 123400000000000000000000000000000
dqshi096 shift 1234567890123456789012345678901234 +30 -> 1234000000000000000000000000000000
dqshi097 shift 1234567890123456789012345678901234 +31 -> 2340000000000000000000000000000000
dqshi098 shift 1234567890123456789012345678901234 +32 -> 3400000000000000000000000000000000
dqshi099 shift 1234567890123456789012345678901234 +33 -> 4000000000000000000000000000000000
dqshi100 shift 1234567890123456789012345678901234 +34 -> 0
-- zeros
dqshi270 shift 0E-10 +29 -> 0E-10
dqshi271 shift 0E-10 -29 -> 0E-10
dqshi272 shift 0.000 +29 -> 0.000
dqshi273 shift 0.000 -29 -> 0.000
dqshi274 shift 0E+10 +29 -> 0E+10
dqshi275 shift 0E+10 -29 -> 0E+10
dqshi276 shift -0E-10 +29 -> -0E-10
dqshi277 shift -0E-10 -29 -> -0E-10
dqshi278 shift -0.000 +29 -> -0.000
dqshi279 shift -0.000 -29 -> -0.000
dqshi280 shift -0E+10 +29 -> -0E+10
dqshi281 shift -0E+10 -29 -> -0E+10
-- Nmax, Nmin, Ntiny
dqshi141 shift 9.999999999999999999999999999999999E+6144 -1 -> 9.99999999999999999999999999999999E+6143
dqshi142 shift 9.999999999999999999999999999999999E+6144 -33 -> 9E+6111
dqshi143 shift 9.999999999999999999999999999999999E+6144 1 -> 9.999999999999999999999999999999990E+6144
dqshi144 shift 9.999999999999999999999999999999999E+6144 33 -> 9.000000000000000000000000000000000E+6144
dqshi145 shift 1E-6143 -1 -> 0E-6143
dqshi146 shift 1E-6143 -33 -> 0E-6143
dqshi147 shift 1E-6143 1 -> 1.0E-6142
dqshi148 shift 1E-6143 33 -> 1.000000000000000000000000000000000E-6110
dqshi151 shift 1.000000000000000000000000000000000E-6143 -1 -> 1.00000000000000000000000000000000E-6144
dqshi152 shift 1.000000000000000000000000000000000E-6143 -33 -> 1E-6176
dqshi153 shift 1.000000000000000000000000000000000E-6143 1 -> 0E-6176
dqshi154 shift 1.000000000000000000000000000000000E-6143 33 -> 0E-6176
dqshi155 shift 9.000000000000000000000000000000000E-6143 -1 -> 9.00000000000000000000000000000000E-6144
dqshi156 shift 9.000000000000000000000000000000000E-6143 -33 -> 9E-6176
dqshi157 shift 9.000000000000000000000000000000000E-6143 1 -> 0E-6176
dqshi158 shift 9.000000000000000000000000000000000E-6143 33 -> 0E-6176
dqshi160 shift 1E-6176 -1 -> 0E-6176
dqshi161 shift 1E-6176 -33 -> 0E-6176
dqshi162 shift 1E-6176 1 -> 1.0E-6175
dqshi163 shift 1E-6176 33 -> 1.000000000000000000000000000000000E-6143
-- negatives
dqshi171 shift -9.999999999999999999999999999999999E+6144 -1 -> -9.99999999999999999999999999999999E+6143
dqshi172 shift -9.999999999999999999999999999999999E+6144 -33 -> -9E+6111
dqshi173 shift -9.999999999999999999999999999999999E+6144 1 -> -9.999999999999999999999999999999990E+6144
dqshi174 shift -9.999999999999999999999999999999999E+6144 33 -> -9.000000000000000000000000000000000E+6144
dqshi175 shift -1E-6143 -1 -> -0E-6143
dqshi176 shift -1E-6143 -33 -> -0E-6143
dqshi177 shift -1E-6143 1 -> -1.0E-6142
dqshi178 shift -1E-6143 33 -> -1.000000000000000000000000000000000E-6110
dqshi181 shift -1.000000000000000000000000000000000E-6143 -1 -> -1.00000000000000000000000000000000E-6144
dqshi182 shift -1.000000000000000000000000000000000E-6143 -33 -> -1E-6176
dqshi183 shift -1.000000000000000000000000000000000E-6143 1 -> -0E-6176
dqshi184 shift -1.000000000000000000000000000000000E-6143 33 -> -0E-6176
dqshi185 shift -9.000000000000000000000000000000000E-6143 -1 -> -9.00000000000000000000000000000000E-6144
dqshi186 shift -9.000000000000000000000000000000000E-6143 -33 -> -9E-6176
dqshi187 shift -9.000000000000000000000000000000000E-6143 1 -> -0E-6176
dqshi188 shift -9.000000000000000000000000000000000E-6143 33 -> -0E-6176
dqshi190 shift -1E-6176 -1 -> -0E-6176
dqshi191 shift -1E-6176 -33 -> -0E-6176
dqshi192 shift -1E-6176 1 -> -1.0E-6175
dqshi193 shift -1E-6176 33 -> -1.000000000000000000000000000000000E-6143
-- more negatives (of sanities)
dqshi201 shift -0 0 -> -0
dqshi202 shift -0 2 -> -0
dqshi203 shift -1 2 -> -100
dqshi204 shift -1 33 -> -1000000000000000000000000000000000
dqshi205 shift -1 34 -> -0
dqshi206 shift -1 -1 -> -0
dqshi207 shift -0 -2 -> -0
dqshi208 shift -1234567890123456789012345678901234 -1 -> -123456789012345678901234567890123
dqshi209 shift -1234567890123456789012345678901234 -33 -> -1
dqshi210 shift -1234567890123456789012345678901234 -34 -> -0
dqshi211 shift -9934567890123456789012345678901234 -33 -> -9
dqshi212 shift -9934567890123456789012345678901234 -34 -> -0
-- Specials; NaNs are handled as usual
dqshi781 shift -Inf -8 -> -Infinity
dqshi782 shift -Inf -1 -> -Infinity
dqshi783 shift -Inf -0 -> -Infinity
dqshi784 shift -Inf 0 -> -Infinity
dqshi785 shift -Inf 1 -> -Infinity
dqshi786 shift -Inf 8 -> -Infinity
dqshi787 shift -1000 -Inf -> NaN Invalid_operation
dqshi788 shift -Inf -Inf -> NaN Invalid_operation
dqshi789 shift -1 -Inf -> NaN Invalid_operation
dqshi790 shift -0 -Inf -> NaN Invalid_operation
dqshi791 shift 0 -Inf -> NaN Invalid_operation
dqshi792 shift 1 -Inf -> NaN Invalid_operation
dqshi793 shift 1000 -Inf -> NaN Invalid_operation
dqshi794 shift Inf -Inf -> NaN Invalid_operation
dqshi800 shift Inf -Inf -> NaN Invalid_operation
dqshi801 shift Inf -8 -> Infinity
dqshi802 shift Inf -1 -> Infinity
dqshi803 shift Inf -0 -> Infinity
dqshi804 shift Inf 0 -> Infinity
dqshi805 shift Inf 1 -> Infinity
dqshi806 shift Inf 8 -> Infinity
dqshi807 shift Inf Inf -> NaN Invalid_operation
dqshi808 shift -1000 Inf -> NaN Invalid_operation
dqshi809 shift -Inf Inf -> NaN Invalid_operation
dqshi810 shift -1 Inf -> NaN Invalid_operation
dqshi811 shift -0 Inf -> NaN Invalid_operation
dqshi812 shift 0 Inf -> NaN Invalid_operation
dqshi813 shift 1 Inf -> NaN Invalid_operation
dqshi814 shift 1000 Inf -> NaN Invalid_operation
dqshi815 shift Inf Inf -> NaN Invalid_operation
dqshi821 shift NaN -Inf -> NaN
dqshi822 shift NaN -1000 -> NaN
dqshi823 shift NaN -1 -> NaN
dqshi824 shift NaN -0 -> NaN
dqshi825 shift NaN 0 -> NaN
dqshi826 shift NaN 1 -> NaN
dqshi827 shift NaN 1000 -> NaN
dqshi828 shift NaN Inf -> NaN
dqshi829 shift NaN NaN -> NaN
dqshi830 shift -Inf NaN -> NaN
dqshi831 shift -1000 NaN -> NaN
dqshi832 shift -1 NaN -> NaN
dqshi833 shift -0 NaN -> NaN
dqshi834 shift 0 NaN -> NaN
dqshi835 shift 1 NaN -> NaN
dqshi836 shift 1000 NaN -> NaN
dqshi837 shift Inf NaN -> NaN
dqshi841 shift sNaN -Inf -> NaN Invalid_operation
dqshi842 shift sNaN -1000 -> NaN Invalid_operation
dqshi843 shift sNaN -1 -> NaN Invalid_operation
dqshi844 shift sNaN -0 -> NaN Invalid_operation
dqshi845 shift sNaN 0 -> NaN Invalid_operation
dqshi846 shift sNaN 1 -> NaN Invalid_operation
dqshi847 shift sNaN 1000 -> NaN Invalid_operation
dqshi848 shift sNaN NaN -> NaN Invalid_operation
dqshi849 shift sNaN sNaN -> NaN Invalid_operation
dqshi850 shift NaN sNaN -> NaN Invalid_operation
dqshi851 shift -Inf sNaN -> NaN Invalid_operation
dqshi852 shift -1000 sNaN -> NaN Invalid_operation
dqshi853 shift -1 sNaN -> NaN Invalid_operation
dqshi854 shift -0 sNaN -> NaN Invalid_operation
dqshi855 shift 0 sNaN -> NaN Invalid_operation
dqshi856 shift 1 sNaN -> NaN Invalid_operation
dqshi857 shift 1000 sNaN -> NaN Invalid_operation
dqshi858 shift Inf sNaN -> NaN Invalid_operation
dqshi859 shift NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqshi861 shift NaN1 -Inf -> NaN1
dqshi862 shift +NaN2 -1000 -> NaN2
dqshi863 shift NaN3 1000 -> NaN3
dqshi864 shift NaN4 Inf -> NaN4
dqshi865 shift NaN5 +NaN6 -> NaN5
dqshi866 shift -Inf NaN7 -> NaN7
dqshi867 shift -1000 NaN8 -> NaN8
dqshi868 shift 1000 NaN9 -> NaN9
dqshi869 shift Inf +NaN10 -> NaN10
dqshi871 shift sNaN11 -Inf -> NaN11 Invalid_operation
dqshi872 shift sNaN12 -1000 -> NaN12 Invalid_operation
dqshi873 shift sNaN13 1000 -> NaN13 Invalid_operation
dqshi874 shift sNaN14 NaN17 -> NaN14 Invalid_operation
dqshi875 shift sNaN15 sNaN18 -> NaN15 Invalid_operation
dqshi876 shift NaN16 sNaN19 -> NaN19 Invalid_operation
dqshi877 shift -Inf +sNaN20 -> NaN20 Invalid_operation
dqshi878 shift -1000 sNaN21 -> NaN21 Invalid_operation
dqshi879 shift 1000 sNaN22 -> NaN22 Invalid_operation
dqshi880 shift Inf sNaN23 -> NaN23 Invalid_operation
dqshi881 shift +NaN25 +sNaN24 -> NaN24 Invalid_operation
dqshi882 shift -NaN26 NaN28 -> -NaN26
dqshi883 shift -sNaN27 sNaN29 -> -NaN27 Invalid_operation
dqshi884 shift 1000 -NaN30 -> -NaN30
dqshi885 shift 1000 -sNaN31 -> -NaN31 Invalid_operation

File diff suppressed because it is too large Load diff

View file

@ -1,257 +1,257 @@
------------------------------------------------------------------------
-- dqToIntegral.decTest -- round Quad to integral value --
-- Copyright (c) IBM Corporation, 2001, 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 tests the extended specification 'round-to-integral
-- value-exact' operations (from IEEE 854, later modified in 754r).
-- All non-zero results are defined as being those from either copy or
-- quantize, so those are assumed to have been tested extensively
-- elsewhere; the tests here are for integrity, rounding mode, etc.
-- Also, it is assumed the test harness will use these tests for both
-- ToIntegralExact (which does set Inexact) and the fixed-name
-- functions (which do not set Inexact).
-- Note that decNumber implements an earlier definition of toIntegral
-- which never sets Inexact; the decTest operator for that is called
-- 'tointegral' instead of 'tointegralx'.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
dqintx001 tointegralx 0 -> 0
dqintx002 tointegralx 0.0 -> 0
dqintx003 tointegralx 0.1 -> 0 Inexact Rounded
dqintx004 tointegralx 0.2 -> 0 Inexact Rounded
dqintx005 tointegralx 0.3 -> 0 Inexact Rounded
dqintx006 tointegralx 0.4 -> 0 Inexact Rounded
dqintx007 tointegralx 0.5 -> 0 Inexact Rounded
dqintx008 tointegralx 0.6 -> 1 Inexact Rounded
dqintx009 tointegralx 0.7 -> 1 Inexact Rounded
dqintx010 tointegralx 0.8 -> 1 Inexact Rounded
dqintx011 tointegralx 0.9 -> 1 Inexact Rounded
dqintx012 tointegralx 1 -> 1
dqintx013 tointegralx 1.0 -> 1 Rounded
dqintx014 tointegralx 1.1 -> 1 Inexact Rounded
dqintx015 tointegralx 1.2 -> 1 Inexact Rounded
dqintx016 tointegralx 1.3 -> 1 Inexact Rounded
dqintx017 tointegralx 1.4 -> 1 Inexact Rounded
dqintx018 tointegralx 1.5 -> 2 Inexact Rounded
dqintx019 tointegralx 1.6 -> 2 Inexact Rounded
dqintx020 tointegralx 1.7 -> 2 Inexact Rounded
dqintx021 tointegralx 1.8 -> 2 Inexact Rounded
dqintx022 tointegralx 1.9 -> 2 Inexact Rounded
-- negatives
dqintx031 tointegralx -0 -> -0
dqintx032 tointegralx -0.0 -> -0
dqintx033 tointegralx -0.1 -> -0 Inexact Rounded
dqintx034 tointegralx -0.2 -> -0 Inexact Rounded
dqintx035 tointegralx -0.3 -> -0 Inexact Rounded
dqintx036 tointegralx -0.4 -> -0 Inexact Rounded
dqintx037 tointegralx -0.5 -> -0 Inexact Rounded
dqintx038 tointegralx -0.6 -> -1 Inexact Rounded
dqintx039 tointegralx -0.7 -> -1 Inexact Rounded
dqintx040 tointegralx -0.8 -> -1 Inexact Rounded
dqintx041 tointegralx -0.9 -> -1 Inexact Rounded
dqintx042 tointegralx -1 -> -1
dqintx043 tointegralx -1.0 -> -1 Rounded
dqintx044 tointegralx -1.1 -> -1 Inexact Rounded
dqintx045 tointegralx -1.2 -> -1 Inexact Rounded
dqintx046 tointegralx -1.3 -> -1 Inexact Rounded
dqintx047 tointegralx -1.4 -> -1 Inexact Rounded
dqintx048 tointegralx -1.5 -> -2 Inexact Rounded
dqintx049 tointegralx -1.6 -> -2 Inexact Rounded
dqintx050 tointegralx -1.7 -> -2 Inexact Rounded
dqintx051 tointegralx -1.8 -> -2 Inexact Rounded
dqintx052 tointegralx -1.9 -> -2 Inexact Rounded
-- next two would be NaN using quantize(x, 0)
dqintx053 tointegralx 10E+60 -> 1.0E+61
dqintx054 tointegralx -10E+60 -> -1.0E+61
-- numbers around precision
dqintx060 tointegralx '56267E-17' -> '0' Inexact Rounded
dqintx061 tointegralx '56267E-5' -> '1' Inexact Rounded
dqintx062 tointegralx '56267E-2' -> '563' Inexact Rounded
dqintx063 tointegralx '56267E-1' -> '5627' Inexact Rounded
dqintx065 tointegralx '56267E-0' -> '56267'
dqintx066 tointegralx '56267E+0' -> '56267'
dqintx067 tointegralx '56267E+1' -> '5.6267E+5'
dqintx068 tointegralx '56267E+9' -> '5.6267E+13'
dqintx069 tointegralx '56267E+10' -> '5.6267E+14'
dqintx070 tointegralx '56267E+11' -> '5.6267E+15'
dqintx071 tointegralx '56267E+12' -> '5.6267E+16'
dqintx072 tointegralx '56267E+13' -> '5.6267E+17'
dqintx073 tointegralx '1.23E+96' -> '1.23E+96'
dqintx074 tointegralx '1.23E+6144' -> #47ffd300000000000000000000000000 Clamped
dqintx080 tointegralx '-56267E-10' -> '-0' Inexact Rounded
dqintx081 tointegralx '-56267E-5' -> '-1' Inexact Rounded
dqintx082 tointegralx '-56267E-2' -> '-563' Inexact Rounded
dqintx083 tointegralx '-56267E-1' -> '-5627' Inexact Rounded
dqintx085 tointegralx '-56267E-0' -> '-56267'
dqintx086 tointegralx '-56267E+0' -> '-56267'
dqintx087 tointegralx '-56267E+1' -> '-5.6267E+5'
dqintx088 tointegralx '-56267E+9' -> '-5.6267E+13'
dqintx089 tointegralx '-56267E+10' -> '-5.6267E+14'
dqintx090 tointegralx '-56267E+11' -> '-5.6267E+15'
dqintx091 tointegralx '-56267E+12' -> '-5.6267E+16'
dqintx092 tointegralx '-56267E+13' -> '-5.6267E+17'
dqintx093 tointegralx '-1.23E+96' -> '-1.23E+96'
dqintx094 tointegralx '-1.23E+6144' -> #c7ffd300000000000000000000000000 Clamped
-- subnormal inputs
dqintx100 tointegralx 1E-299 -> 0 Inexact Rounded
dqintx101 tointegralx 0.1E-299 -> 0 Inexact Rounded
dqintx102 tointegralx 0.01E-299 -> 0 Inexact Rounded
dqintx103 tointegralx 0E-299 -> 0
-- specials and zeros
dqintx120 tointegralx 'Inf' -> Infinity
dqintx121 tointegralx '-Inf' -> -Infinity
dqintx122 tointegralx NaN -> NaN
dqintx123 tointegralx sNaN -> NaN Invalid_operation
dqintx124 tointegralx 0 -> 0
dqintx125 tointegralx -0 -> -0
dqintx126 tointegralx 0.000 -> 0
dqintx127 tointegralx 0.00 -> 0
dqintx128 tointegralx 0.0 -> 0
dqintx129 tointegralx 0 -> 0
dqintx130 tointegralx 0E-3 -> 0
dqintx131 tointegralx 0E-2 -> 0
dqintx132 tointegralx 0E-1 -> 0
dqintx133 tointegralx 0E-0 -> 0
dqintx134 tointegralx 0E+1 -> 0E+1
dqintx135 tointegralx 0E+2 -> 0E+2
dqintx136 tointegralx 0E+3 -> 0E+3
dqintx137 tointegralx 0E+4 -> 0E+4
dqintx138 tointegralx 0E+5 -> 0E+5
dqintx139 tointegralx -0.000 -> -0
dqintx140 tointegralx -0.00 -> -0
dqintx141 tointegralx -0.0 -> -0
dqintx142 tointegralx -0 -> -0
dqintx143 tointegralx -0E-3 -> -0
dqintx144 tointegralx -0E-2 -> -0
dqintx145 tointegralx -0E-1 -> -0
dqintx146 tointegralx -0E-0 -> -0
dqintx147 tointegralx -0E+1 -> -0E+1
dqintx148 tointegralx -0E+2 -> -0E+2
dqintx149 tointegralx -0E+3 -> -0E+3
dqintx150 tointegralx -0E+4 -> -0E+4
dqintx151 tointegralx -0E+5 -> -0E+5
-- propagating NaNs
dqintx152 tointegralx NaN808 -> NaN808
dqintx153 tointegralx sNaN080 -> NaN80 Invalid_operation
dqintx154 tointegralx -NaN808 -> -NaN808
dqintx155 tointegralx -sNaN080 -> -NaN80 Invalid_operation
dqintx156 tointegralx -NaN -> -NaN
dqintx157 tointegralx -sNaN -> -NaN Invalid_operation
-- examples
rounding: half_up
dqintx200 tointegralx 2.1 -> 2 Inexact Rounded
dqintx201 tointegralx 100 -> 100
dqintx202 tointegralx 100.0 -> 100 Rounded
dqintx203 tointegralx 101.5 -> 102 Inexact Rounded
dqintx204 tointegralx -101.5 -> -102 Inexact Rounded
dqintx205 tointegralx 10E+5 -> 1.0E+6
dqintx206 tointegralx 7.89E+77 -> 7.89E+77
dqintx207 tointegralx -Inf -> -Infinity
-- all rounding modes
rounding: half_even
dqintx210 tointegralx 55.5 -> 56 Inexact Rounded
dqintx211 tointegralx 56.5 -> 56 Inexact Rounded
dqintx212 tointegralx 57.5 -> 58 Inexact Rounded
dqintx213 tointegralx -55.5 -> -56 Inexact Rounded
dqintx214 tointegralx -56.5 -> -56 Inexact Rounded
dqintx215 tointegralx -57.5 -> -58 Inexact Rounded
rounding: half_up
dqintx220 tointegralx 55.5 -> 56 Inexact Rounded
dqintx221 tointegralx 56.5 -> 57 Inexact Rounded
dqintx222 tointegralx 57.5 -> 58 Inexact Rounded
dqintx223 tointegralx -55.5 -> -56 Inexact Rounded
dqintx224 tointegralx -56.5 -> -57 Inexact Rounded
dqintx225 tointegralx -57.5 -> -58 Inexact Rounded
rounding: half_down
dqintx230 tointegralx 55.5 -> 55 Inexact Rounded
dqintx231 tointegralx 56.5 -> 56 Inexact Rounded
dqintx232 tointegralx 57.5 -> 57 Inexact Rounded
dqintx233 tointegralx -55.5 -> -55 Inexact Rounded
dqintx234 tointegralx -56.5 -> -56 Inexact Rounded
dqintx235 tointegralx -57.5 -> -57 Inexact Rounded
rounding: up
dqintx240 tointegralx 55.3 -> 56 Inexact Rounded
dqintx241 tointegralx 56.3 -> 57 Inexact Rounded
dqintx242 tointegralx 57.3 -> 58 Inexact Rounded
dqintx243 tointegralx -55.3 -> -56 Inexact Rounded
dqintx244 tointegralx -56.3 -> -57 Inexact Rounded
dqintx245 tointegralx -57.3 -> -58 Inexact Rounded
rounding: down
dqintx250 tointegralx 55.7 -> 55 Inexact Rounded
dqintx251 tointegralx 56.7 -> 56 Inexact Rounded
dqintx252 tointegralx 57.7 -> 57 Inexact Rounded
dqintx253 tointegralx -55.7 -> -55 Inexact Rounded
dqintx254 tointegralx -56.7 -> -56 Inexact Rounded
dqintx255 tointegralx -57.7 -> -57 Inexact Rounded
rounding: ceiling
dqintx260 tointegralx 55.3 -> 56 Inexact Rounded
dqintx261 tointegralx 56.3 -> 57 Inexact Rounded
dqintx262 tointegralx 57.3 -> 58 Inexact Rounded
dqintx263 tointegralx -55.3 -> -55 Inexact Rounded
dqintx264 tointegralx -56.3 -> -56 Inexact Rounded
dqintx265 tointegralx -57.3 -> -57 Inexact Rounded
rounding: floor
dqintx270 tointegralx 55.7 -> 55 Inexact Rounded
dqintx271 tointegralx 56.7 -> 56 Inexact Rounded
dqintx272 tointegralx 57.7 -> 57 Inexact Rounded
dqintx273 tointegralx -55.7 -> -56 Inexact Rounded
dqintx274 tointegralx -56.7 -> -57 Inexact Rounded
dqintx275 tointegralx -57.7 -> -58 Inexact Rounded
-- Int and uInt32 edge values for testing conversions
dqintx300 tointegralx -2147483646 -> -2147483646
dqintx301 tointegralx -2147483647 -> -2147483647
dqintx302 tointegralx -2147483648 -> -2147483648
dqintx303 tointegralx -2147483649 -> -2147483649
dqintx304 tointegralx 2147483646 -> 2147483646
dqintx305 tointegralx 2147483647 -> 2147483647
dqintx306 tointegralx 2147483648 -> 2147483648
dqintx307 tointegralx 2147483649 -> 2147483649
dqintx308 tointegralx 4294967294 -> 4294967294
dqintx309 tointegralx 4294967295 -> 4294967295
dqintx310 tointegralx 4294967296 -> 4294967296
dqintx311 tointegralx 4294967297 -> 4294967297
------------------------------------------------------------------------
-- dqToIntegral.decTest -- round Quad to integral value --
-- Copyright (c) IBM Corporation, 2001, 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 tests the extended specification 'round-to-integral
-- value-exact' operations (from IEEE 854, later modified in 754r).
-- All non-zero results are defined as being those from either copy or
-- quantize, so those are assumed to have been tested extensively
-- elsewhere; the tests here are for integrity, rounding mode, etc.
-- Also, it is assumed the test harness will use these tests for both
-- ToIntegralExact (which does set Inexact) and the fixed-name
-- functions (which do not set Inexact).
-- Note that decNumber implements an earlier definition of toIntegral
-- which never sets Inexact; the decTest operator for that is called
-- 'tointegral' instead of 'tointegralx'.
extended: 1
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
dqintx001 tointegralx 0 -> 0
dqintx002 tointegralx 0.0 -> 0
dqintx003 tointegralx 0.1 -> 0 Inexact Rounded
dqintx004 tointegralx 0.2 -> 0 Inexact Rounded
dqintx005 tointegralx 0.3 -> 0 Inexact Rounded
dqintx006 tointegralx 0.4 -> 0 Inexact Rounded
dqintx007 tointegralx 0.5 -> 0 Inexact Rounded
dqintx008 tointegralx 0.6 -> 1 Inexact Rounded
dqintx009 tointegralx 0.7 -> 1 Inexact Rounded
dqintx010 tointegralx 0.8 -> 1 Inexact Rounded
dqintx011 tointegralx 0.9 -> 1 Inexact Rounded
dqintx012 tointegralx 1 -> 1
dqintx013 tointegralx 1.0 -> 1 Rounded
dqintx014 tointegralx 1.1 -> 1 Inexact Rounded
dqintx015 tointegralx 1.2 -> 1 Inexact Rounded
dqintx016 tointegralx 1.3 -> 1 Inexact Rounded
dqintx017 tointegralx 1.4 -> 1 Inexact Rounded
dqintx018 tointegralx 1.5 -> 2 Inexact Rounded
dqintx019 tointegralx 1.6 -> 2 Inexact Rounded
dqintx020 tointegralx 1.7 -> 2 Inexact Rounded
dqintx021 tointegralx 1.8 -> 2 Inexact Rounded
dqintx022 tointegralx 1.9 -> 2 Inexact Rounded
-- negatives
dqintx031 tointegralx -0 -> -0
dqintx032 tointegralx -0.0 -> -0
dqintx033 tointegralx -0.1 -> -0 Inexact Rounded
dqintx034 tointegralx -0.2 -> -0 Inexact Rounded
dqintx035 tointegralx -0.3 -> -0 Inexact Rounded
dqintx036 tointegralx -0.4 -> -0 Inexact Rounded
dqintx037 tointegralx -0.5 -> -0 Inexact Rounded
dqintx038 tointegralx -0.6 -> -1 Inexact Rounded
dqintx039 tointegralx -0.7 -> -1 Inexact Rounded
dqintx040 tointegralx -0.8 -> -1 Inexact Rounded
dqintx041 tointegralx -0.9 -> -1 Inexact Rounded
dqintx042 tointegralx -1 -> -1
dqintx043 tointegralx -1.0 -> -1 Rounded
dqintx044 tointegralx -1.1 -> -1 Inexact Rounded
dqintx045 tointegralx -1.2 -> -1 Inexact Rounded
dqintx046 tointegralx -1.3 -> -1 Inexact Rounded
dqintx047 tointegralx -1.4 -> -1 Inexact Rounded
dqintx048 tointegralx -1.5 -> -2 Inexact Rounded
dqintx049 tointegralx -1.6 -> -2 Inexact Rounded
dqintx050 tointegralx -1.7 -> -2 Inexact Rounded
dqintx051 tointegralx -1.8 -> -2 Inexact Rounded
dqintx052 tointegralx -1.9 -> -2 Inexact Rounded
-- next two would be NaN using quantize(x, 0)
dqintx053 tointegralx 10E+60 -> 1.0E+61
dqintx054 tointegralx -10E+60 -> -1.0E+61
-- numbers around precision
dqintx060 tointegralx '56267E-17' -> '0' Inexact Rounded
dqintx061 tointegralx '56267E-5' -> '1' Inexact Rounded
dqintx062 tointegralx '56267E-2' -> '563' Inexact Rounded
dqintx063 tointegralx '56267E-1' -> '5627' Inexact Rounded
dqintx065 tointegralx '56267E-0' -> '56267'
dqintx066 tointegralx '56267E+0' -> '56267'
dqintx067 tointegralx '56267E+1' -> '5.6267E+5'
dqintx068 tointegralx '56267E+9' -> '5.6267E+13'
dqintx069 tointegralx '56267E+10' -> '5.6267E+14'
dqintx070 tointegralx '56267E+11' -> '5.6267E+15'
dqintx071 tointegralx '56267E+12' -> '5.6267E+16'
dqintx072 tointegralx '56267E+13' -> '5.6267E+17'
dqintx073 tointegralx '1.23E+96' -> '1.23E+96'
dqintx074 tointegralx '1.23E+6144' -> #47ffd300000000000000000000000000 Clamped
dqintx080 tointegralx '-56267E-10' -> '-0' Inexact Rounded
dqintx081 tointegralx '-56267E-5' -> '-1' Inexact Rounded
dqintx082 tointegralx '-56267E-2' -> '-563' Inexact Rounded
dqintx083 tointegralx '-56267E-1' -> '-5627' Inexact Rounded
dqintx085 tointegralx '-56267E-0' -> '-56267'
dqintx086 tointegralx '-56267E+0' -> '-56267'
dqintx087 tointegralx '-56267E+1' -> '-5.6267E+5'
dqintx088 tointegralx '-56267E+9' -> '-5.6267E+13'
dqintx089 tointegralx '-56267E+10' -> '-5.6267E+14'
dqintx090 tointegralx '-56267E+11' -> '-5.6267E+15'
dqintx091 tointegralx '-56267E+12' -> '-5.6267E+16'
dqintx092 tointegralx '-56267E+13' -> '-5.6267E+17'
dqintx093 tointegralx '-1.23E+96' -> '-1.23E+96'
dqintx094 tointegralx '-1.23E+6144' -> #c7ffd300000000000000000000000000 Clamped
-- subnormal inputs
dqintx100 tointegralx 1E-299 -> 0 Inexact Rounded
dqintx101 tointegralx 0.1E-299 -> 0 Inexact Rounded
dqintx102 tointegralx 0.01E-299 -> 0 Inexact Rounded
dqintx103 tointegralx 0E-299 -> 0
-- specials and zeros
dqintx120 tointegralx 'Inf' -> Infinity
dqintx121 tointegralx '-Inf' -> -Infinity
dqintx122 tointegralx NaN -> NaN
dqintx123 tointegralx sNaN -> NaN Invalid_operation
dqintx124 tointegralx 0 -> 0
dqintx125 tointegralx -0 -> -0
dqintx126 tointegralx 0.000 -> 0
dqintx127 tointegralx 0.00 -> 0
dqintx128 tointegralx 0.0 -> 0
dqintx129 tointegralx 0 -> 0
dqintx130 tointegralx 0E-3 -> 0
dqintx131 tointegralx 0E-2 -> 0
dqintx132 tointegralx 0E-1 -> 0
dqintx133 tointegralx 0E-0 -> 0
dqintx134 tointegralx 0E+1 -> 0E+1
dqintx135 tointegralx 0E+2 -> 0E+2
dqintx136 tointegralx 0E+3 -> 0E+3
dqintx137 tointegralx 0E+4 -> 0E+4
dqintx138 tointegralx 0E+5 -> 0E+5
dqintx139 tointegralx -0.000 -> -0
dqintx140 tointegralx -0.00 -> -0
dqintx141 tointegralx -0.0 -> -0
dqintx142 tointegralx -0 -> -0
dqintx143 tointegralx -0E-3 -> -0
dqintx144 tointegralx -0E-2 -> -0
dqintx145 tointegralx -0E-1 -> -0
dqintx146 tointegralx -0E-0 -> -0
dqintx147 tointegralx -0E+1 -> -0E+1
dqintx148 tointegralx -0E+2 -> -0E+2
dqintx149 tointegralx -0E+3 -> -0E+3
dqintx150 tointegralx -0E+4 -> -0E+4
dqintx151 tointegralx -0E+5 -> -0E+5
-- propagating NaNs
dqintx152 tointegralx NaN808 -> NaN808
dqintx153 tointegralx sNaN080 -> NaN80 Invalid_operation
dqintx154 tointegralx -NaN808 -> -NaN808
dqintx155 tointegralx -sNaN080 -> -NaN80 Invalid_operation
dqintx156 tointegralx -NaN -> -NaN
dqintx157 tointegralx -sNaN -> -NaN Invalid_operation
-- examples
rounding: half_up
dqintx200 tointegralx 2.1 -> 2 Inexact Rounded
dqintx201 tointegralx 100 -> 100
dqintx202 tointegralx 100.0 -> 100 Rounded
dqintx203 tointegralx 101.5 -> 102 Inexact Rounded
dqintx204 tointegralx -101.5 -> -102 Inexact Rounded
dqintx205 tointegralx 10E+5 -> 1.0E+6
dqintx206 tointegralx 7.89E+77 -> 7.89E+77
dqintx207 tointegralx -Inf -> -Infinity
-- all rounding modes
rounding: half_even
dqintx210 tointegralx 55.5 -> 56 Inexact Rounded
dqintx211 tointegralx 56.5 -> 56 Inexact Rounded
dqintx212 tointegralx 57.5 -> 58 Inexact Rounded
dqintx213 tointegralx -55.5 -> -56 Inexact Rounded
dqintx214 tointegralx -56.5 -> -56 Inexact Rounded
dqintx215 tointegralx -57.5 -> -58 Inexact Rounded
rounding: half_up
dqintx220 tointegralx 55.5 -> 56 Inexact Rounded
dqintx221 tointegralx 56.5 -> 57 Inexact Rounded
dqintx222 tointegralx 57.5 -> 58 Inexact Rounded
dqintx223 tointegralx -55.5 -> -56 Inexact Rounded
dqintx224 tointegralx -56.5 -> -57 Inexact Rounded
dqintx225 tointegralx -57.5 -> -58 Inexact Rounded
rounding: half_down
dqintx230 tointegralx 55.5 -> 55 Inexact Rounded
dqintx231 tointegralx 56.5 -> 56 Inexact Rounded
dqintx232 tointegralx 57.5 -> 57 Inexact Rounded
dqintx233 tointegralx -55.5 -> -55 Inexact Rounded
dqintx234 tointegralx -56.5 -> -56 Inexact Rounded
dqintx235 tointegralx -57.5 -> -57 Inexact Rounded
rounding: up
dqintx240 tointegralx 55.3 -> 56 Inexact Rounded
dqintx241 tointegralx 56.3 -> 57 Inexact Rounded
dqintx242 tointegralx 57.3 -> 58 Inexact Rounded
dqintx243 tointegralx -55.3 -> -56 Inexact Rounded
dqintx244 tointegralx -56.3 -> -57 Inexact Rounded
dqintx245 tointegralx -57.3 -> -58 Inexact Rounded
rounding: down
dqintx250 tointegralx 55.7 -> 55 Inexact Rounded
dqintx251 tointegralx 56.7 -> 56 Inexact Rounded
dqintx252 tointegralx 57.7 -> 57 Inexact Rounded
dqintx253 tointegralx -55.7 -> -55 Inexact Rounded
dqintx254 tointegralx -56.7 -> -56 Inexact Rounded
dqintx255 tointegralx -57.7 -> -57 Inexact Rounded
rounding: ceiling
dqintx260 tointegralx 55.3 -> 56 Inexact Rounded
dqintx261 tointegralx 56.3 -> 57 Inexact Rounded
dqintx262 tointegralx 57.3 -> 58 Inexact Rounded
dqintx263 tointegralx -55.3 -> -55 Inexact Rounded
dqintx264 tointegralx -56.3 -> -56 Inexact Rounded
dqintx265 tointegralx -57.3 -> -57 Inexact Rounded
rounding: floor
dqintx270 tointegralx 55.7 -> 55 Inexact Rounded
dqintx271 tointegralx 56.7 -> 56 Inexact Rounded
dqintx272 tointegralx 57.7 -> 57 Inexact Rounded
dqintx273 tointegralx -55.7 -> -56 Inexact Rounded
dqintx274 tointegralx -56.7 -> -57 Inexact Rounded
dqintx275 tointegralx -57.7 -> -58 Inexact Rounded
-- Int and uInt32 edge values for testing conversions
dqintx300 tointegralx -2147483646 -> -2147483646
dqintx301 tointegralx -2147483647 -> -2147483647
dqintx302 tointegralx -2147483648 -> -2147483648
dqintx303 tointegralx -2147483649 -> -2147483649
dqintx304 tointegralx 2147483646 -> 2147483646
dqintx305 tointegralx 2147483647 -> 2147483647
dqintx306 tointegralx 2147483648 -> 2147483648
dqintx307 tointegralx 2147483649 -> 2147483649
dqintx308 tointegralx 4294967294 -> 4294967294
dqintx309 tointegralx 4294967295 -> 4294967295
dqintx310 tointegralx 4294967296 -> 4294967296
dqintx311 tointegralx 4294967297 -> 4294967297

View file

@ -1,410 +1,410 @@
------------------------------------------------------------------------
-- dqXor.decTest -- digitwise logical XOR for decQuads --
-- 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
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check (truth table)
dqxor001 xor 0 0 -> 0
dqxor002 xor 0 1 -> 1
dqxor003 xor 1 0 -> 1
dqxor004 xor 1 1 -> 0
dqxor005 xor 1100 1010 -> 110
-- and at msd and msd-1
dqxor006 xor 0000000000000000000000000000000000 0000000000000000000000000000000000 -> 0
dqxor007 xor 0000000000000000000000000000000000 1000000000000000000000000000000000 -> 1000000000000000000000000000000000
dqxor008 xor 1000000000000000000000000000000000 0000000000000000000000000000000000 -> 1000000000000000000000000000000000
dqxor009 xor 1000000000000000000000000000000000 1000000000000000000000000000000000 -> 0
dqxor010 xor 0000000000000000000000000000000000 0000000000000000000000000000000000 -> 0
dqxor011 xor 0000000000000000000000000000000000 0100000000000000000000000000000000 -> 100000000000000000000000000000000
dqxor012 xor 0100000000000000000000000000000000 0000000000000000000000000000000000 -> 100000000000000000000000000000000
dqxor013 xor 0100000000000000000000000000000000 0100000000000000000000000000000000 -> 0
-- Various lengths
-- 1234567890123456789012345678901234
dqxor601 xor 0111111111111111111111111111111111 1111111111111111111111111111111111 -> 1000000000000000000000000000000000
dqxor602 xor 1011111111111111111111111111111111 1111111111111111111111111111111111 -> 100000000000000000000000000000000
dqxor603 xor 1101111111111111111111111111111111 1111111111111111111111111111111111 -> 10000000000000000000000000000000
dqxor604 xor 1110111111111111111111111111111111 1111111111111111111111111111111111 -> 1000000000000000000000000000000
dqxor605 xor 1111011111111111111111111111111111 1111111111111111111111111111111111 -> 100000000000000000000000000000
dqxor606 xor 1111101111111111111111111111111111 1111111111111111111111111111111111 -> 10000000000000000000000000000
dqxor607 xor 1111110111111111111111111111111111 1111111111111111111111111111111111 -> 1000000000000000000000000000
dqxor608 xor 1111111011111111111111111111111111 1111111111111111111111111111111111 -> 100000000000000000000000000
dqxor609 xor 1111111101111111111111111111111111 1111111111111111111111111111111111 -> 10000000000000000000000000
dqxor610 xor 1111111110111111111111111111111111 1111111111111111111111111111111111 -> 1000000000000000000000000
dqxor611 xor 1111111111011111111111111111111111 1111111111111111111111111111111111 -> 100000000000000000000000
dqxor612 xor 1111111111101111111111111111111111 1111111111111111111111111111111111 -> 10000000000000000000000
dqxor613 xor 1111111111110111111111111111111111 1111111111111111111111111111111111 -> 1000000000000000000000
dqxor614 xor 1111111111111011111111111111111111 1111111111111111111111111111111111 -> 100000000000000000000
dqxor615 xor 1111111111111101111111111111111111 1111111111111111111111111111111111 -> 10000000000000000000
dqxor616 xor 1111111111111110111111111111111111 1111111111111111111111111111111111 -> 1000000000000000000
dqxor617 xor 1111111111111111011111111111111111 1111111111111111111111111111111111 -> 100000000000000000
dqxor618 xor 1111111111111111101111111111111111 1111111111111111111111111111111111 -> 10000000000000000
dqxor619 xor 1111111111111111110111111111111111 1111111111111111111111111111111111 -> 1000000000000000
dqxor620 xor 1111111111111111111011111111111111 1111111111111111111111111111111111 -> 100000000000000
dqxor621 xor 1111111111111111111101111111111111 1111111111111111111111111111111111 -> 10000000000000
dqxor622 xor 1111111111111111111110111111111111 1111111111111111111111111111111111 -> 1000000000000
dqxor623 xor 1111111111111111111111011111111111 1111111111111111111111111111111111 -> 100000000000
dqxor624 xor 1111111111111111111111101111111111 1111111111111111111111111111111111 -> 10000000000
dqxor625 xor 1111111111111111111111110111111111 1111111111111111111111111111111111 -> 1000000000
dqxor626 xor 1111111111111111111111111011111111 1111111111111111111111111111111111 -> 100000000
dqxor627 xor 1111111111111111111111111101111111 1111111111111111111111111111111111 -> 10000000
dqxor628 xor 1111111111111111111111111110111111 1111111111111111111111111111111111 -> 1000000
dqxor629 xor 1111111111111111111111111111011111 1111111111111111111111111111111111 -> 100000
dqxor630 xor 1111111111111111111111111111101111 1111111111111111111111111111111111 -> 10000
dqxor631 xor 1111111111111111111111111111110111 1111111111111111111111111111111111 -> 1000
dqxor632 xor 1111111111111111111111111111111011 1111111111111111111111111111111111 -> 100
dqxor633 xor 1111111111111111111111111111111101 1111111111111111111111111111111111 -> 10
dqxor634 xor 1111111111111111111111111111111110 1111111111111111111111111111111111 -> 1
dqxor641 xor 1111111111111111111111111111111111 0111111111111111111111111111111111 -> 1000000000000000000000000000000000
dqxor642 xor 1111111111111111111111111111111111 1011111111111111111111111111111111 -> 100000000000000000000000000000000
dqxor643 xor 1111111111111111111111111111111111 1101111111111111111111111111111111 -> 10000000000000000000000000000000
dqxor644 xor 1111111111111111111111111111111111 1110111111111111111111111111111111 -> 1000000000000000000000000000000
dqxor645 xor 1111111111111111111111111111111111 1111011111111111111111111111111111 -> 100000000000000000000000000000
dqxor646 xor 1111111111111111111111111111111111 1111101111111111111111111111111111 -> 10000000000000000000000000000
dqxor647 xor 1111111111111111111111111111111111 1111110111111111111111111111111111 -> 1000000000000000000000000000
dqxor648 xor 1111111111111111111111111111111111 1111111011111111111111111111111111 -> 100000000000000000000000000
dqxor649 xor 1111111111111111111111111111111111 1111111101111111111111111111111111 -> 10000000000000000000000000
dqxor650 xor 1111111111111111111111111111111111 1111111110111111111111111111111111 -> 1000000000000000000000000
dqxor651 xor 1111111111111111111111111111111111 1111111111011111111111111111111111 -> 100000000000000000000000
dqxor652 xor 1111111111111111111111111111111111 1111111111101111111111111111111111 -> 10000000000000000000000
dqxor653 xor 1111111111111111111111111111111111 1111111111110111111111111111111111 -> 1000000000000000000000
dqxor654 xor 1111111111111111111111111111111111 1111111111111011111111111111111111 -> 100000000000000000000
dqxor655 xor 1111111111111111111111111111111111 1111111111111101111111111111111111 -> 10000000000000000000
dqxor656 xor 1111111111111111111111111111111111 1111111111111110111111111111111111 -> 1000000000000000000
dqxor657 xor 1111111111111111111111111111111111 1111111111111111011111111111111111 -> 100000000000000000
dqxor658 xor 1111111111111111111111111111111111 1111111111111111101111111111111111 -> 10000000000000000
dqxor659 xor 1111111111111111111111111111111111 1111111111111111110111111111111111 -> 1000000000000000
dqxor660 xor 1111111111111111111111111111111111 1111111111111111111011111111111111 -> 100000000000000
dqxor661 xor 1111111111111111111111111111111111 1111111111111111111101111111111111 -> 10000000000000
dqxor662 xor 1111111111111111111111111111111111 1111111111111111111110111111111111 -> 1000000000000
dqxor663 xor 1111111111111111111111111111111111 1111111111111111111111011111111111 -> 100000000000
dqxor664 xor 1111111111111111111111111111111111 1111111111111111111111101111111111 -> 10000000000
dqxor665 xor 1111111111111111111111111111111111 1111111111111111111111110111111111 -> 1000000000
dqxor666 xor 1111111111111111111111111111111111 1111111111111111111111111011111111 -> 100000000
dqxor667 xor 1111111111111111111111111111111111 1111111111111111111111111101111111 -> 10000000
dqxor668 xor 1111111111111111111111111111111111 1111111111111111111111111110111111 -> 1000000
dqxor669 xor 1111111111111111111111111111111111 1111111111111111111111111111011111 -> 100000
dqxor670 xor 1111111111111111111111111111111111 1111111111111111111111111111101111 -> 10000
dqxor671 xor 1111111111111111111111111111111111 1111111111111111111111111111110111 -> 1000
dqxor672 xor 1111111111111111111111111111111111 1111111111111111111111111111111011 -> 100
dqxor673 xor 1111111111111111111111111111111111 1111111111111111111111111111111101 -> 10
dqxor674 xor 1111111111111111111111111111111111 1111111111111111111111111111111110 -> 1
dqxor675 xor 0111111111111111111111111111111111 1111111111111111111111111111111110 -> 1000000000000000000000000000000001
dqxor676 xor 1111111111111111111111111111111111 1111111111111111111111111111111110 -> 1
dqxor021 xor 1111111110000000 1111111110000000 -> 0
dqxor022 xor 111111110000000 111111110000000 -> 0
dqxor023 xor 11111110000000 11111110000000 -> 0
dqxor024 xor 1111110000000 1111110000000 -> 0
dqxor025 xor 111110000000 111110000000 -> 0
dqxor026 xor 11110000000 11110000000 -> 0
dqxor027 xor 1110000000 1110000000 -> 0
dqxor028 xor 110000000 110000000 -> 0
dqxor029 xor 10000000 10000000 -> 0
dqxor030 xor 1000000 1000000 -> 0
dqxor031 xor 100000 100000 -> 0
dqxor032 xor 10000 10000 -> 0
dqxor033 xor 1000 1000 -> 0
dqxor034 xor 100 100 -> 0
dqxor035 xor 10 10 -> 0
dqxor036 xor 1 1 -> 0
dqxor040 xor 111111111 111111111111 -> 111000000000
dqxor041 xor 11111111 111111111111 -> 111100000000
dqxor042 xor 11111111 111111111 -> 100000000
dqxor043 xor 1111111 100000010 -> 101111101
dqxor044 xor 111111 100000100 -> 100111011
dqxor045 xor 11111 100001000 -> 100010111
dqxor046 xor 1111 100010000 -> 100011111
dqxor047 xor 111 100100000 -> 100100111
dqxor048 xor 11 101000000 -> 101000011
dqxor049 xor 1 110000000 -> 110000001
dqxor050 xor 1111111111 1 -> 1111111110
dqxor051 xor 111111111 1 -> 111111110
dqxor052 xor 11111111 1 -> 11111110
dqxor053 xor 1111111 1 -> 1111110
dqxor054 xor 111111 1 -> 111110
dqxor055 xor 11111 1 -> 11110
dqxor056 xor 1111 1 -> 1110
dqxor057 xor 111 1 -> 110
dqxor058 xor 11 1 -> 10
dqxor059 xor 1 1 -> 0
dqxor060 xor 1111111111 0 -> 1111111111
dqxor061 xor 111111111 0 -> 111111111
dqxor062 xor 11111111 0 -> 11111111
dqxor063 xor 1111111 0 -> 1111111
dqxor064 xor 111111 0 -> 111111
dqxor065 xor 11111 0 -> 11111
dqxor066 xor 1111 0 -> 1111
dqxor067 xor 111 0 -> 111
dqxor068 xor 11 0 -> 11
dqxor069 xor 1 0 -> 1
dqxor070 xor 1 1111111111 -> 1111111110
dqxor071 xor 1 111111111 -> 111111110
dqxor072 xor 1 11111111 -> 11111110
dqxor073 xor 1 1111111 -> 1111110
dqxor074 xor 1 111111 -> 111110
dqxor075 xor 1 11111 -> 11110
dqxor076 xor 1 1111 -> 1110
dqxor077 xor 1 111 -> 110
dqxor078 xor 1 11 -> 10
dqxor079 xor 1 1 -> 0
dqxor080 xor 0 1111111111 -> 1111111111
dqxor081 xor 0 111111111 -> 111111111
dqxor082 xor 0 11111111 -> 11111111
dqxor083 xor 0 1111111 -> 1111111
dqxor084 xor 0 111111 -> 111111
dqxor085 xor 0 11111 -> 11111
dqxor086 xor 0 1111 -> 1111
dqxor087 xor 0 111 -> 111
dqxor088 xor 0 11 -> 11
dqxor089 xor 0 1 -> 1
dqxor090 xor 011111111 111101111 -> 100010000
dqxor091 xor 101111111 111101111 -> 10010000
dqxor092 xor 110111111 111101111 -> 1010000
dqxor093 xor 111011111 111101111 -> 110000
dqxor094 xor 111101111 111101111 -> 0
dqxor095 xor 111110111 111101111 -> 11000
dqxor096 xor 111111011 111101111 -> 10100
dqxor097 xor 111111101 111101111 -> 10010
dqxor098 xor 111111110 111101111 -> 10001
dqxor100 xor 111101111 011111111 -> 100010000
dqxor101 xor 111101111 101111111 -> 10010000
dqxor102 xor 111101111 110111111 -> 1010000
dqxor103 xor 111101111 111011111 -> 110000
dqxor104 xor 111101111 111101111 -> 0
dqxor105 xor 111101111 111110111 -> 11000
dqxor106 xor 111101111 111111011 -> 10100
dqxor107 xor 111101111 111111101 -> 10010
dqxor108 xor 111101111 111111110 -> 10001
-- non-0/1 should not be accepted, nor should signs
dqxor220 xor 111111112 111111111 -> NaN Invalid_operation
dqxor221 xor 333333333 333333333 -> NaN Invalid_operation
dqxor222 xor 555555555 555555555 -> NaN Invalid_operation
dqxor223 xor 777777777 777777777 -> NaN Invalid_operation
dqxor224 xor 999999999 999999999 -> NaN Invalid_operation
dqxor225 xor 222222222 999999999 -> NaN Invalid_operation
dqxor226 xor 444444444 999999999 -> NaN Invalid_operation
dqxor227 xor 666666666 999999999 -> NaN Invalid_operation
dqxor228 xor 888888888 999999999 -> NaN Invalid_operation
dqxor229 xor 999999999 222222222 -> NaN Invalid_operation
dqxor230 xor 999999999 444444444 -> NaN Invalid_operation
dqxor231 xor 999999999 666666666 -> NaN Invalid_operation
dqxor232 xor 999999999 888888888 -> NaN Invalid_operation
-- a few randoms
dqxor240 xor 567468689 -934981942 -> NaN Invalid_operation
dqxor241 xor 567367689 934981942 -> NaN Invalid_operation
dqxor242 xor -631917772 -706014634 -> NaN Invalid_operation
dqxor243 xor -756253257 138579234 -> NaN Invalid_operation
dqxor244 xor 835590149 567435400 -> NaN Invalid_operation
-- test MSD
dqxor250 xor 2000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqxor251 xor 7000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqxor252 xor 8000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqxor253 xor 9000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqxor254 xor 2000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqxor255 xor 7000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqxor256 xor 8000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqxor257 xor 9000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqxor258 xor 1000000111000111000111000000000000 2000000111000111000111000000000000 -> NaN Invalid_operation
dqxor259 xor 1000000111000111000111000000000000 7000000111000111000111000000000000 -> NaN Invalid_operation
dqxor260 xor 1000000111000111000111000000000000 8000000111000111000111000000000000 -> NaN Invalid_operation
dqxor261 xor 1000000111000111000111000000000000 9000000111000111000111000000000000 -> NaN Invalid_operation
dqxor262 xor 0000000111000111000111000000000000 2000000111000111000111000000000000 -> NaN Invalid_operation
dqxor263 xor 0000000111000111000111000000000000 7000000111000111000111000000000000 -> NaN Invalid_operation
dqxor264 xor 0000000111000111000111000000000000 8000000111000111000111000000000000 -> NaN Invalid_operation
dqxor265 xor 0000000111000111000111000000000000 9000000111000111000111000000000000 -> NaN Invalid_operation
-- test MSD-1
dqxor270 xor 0200000111000111000111001000000000 1000000111000111000111100000000010 -> NaN Invalid_operation
dqxor271 xor 0700000111000111000111000100000000 1000000111000111000111010000000100 -> NaN Invalid_operation
dqxor272 xor 0800000111000111000111000010000000 1000000111000111000111001000001000 -> NaN Invalid_operation
dqxor273 xor 0900000111000111000111000001000000 1000000111000111000111000100010000 -> NaN Invalid_operation
dqxor274 xor 1000000111000111000111000000100000 0200000111000111000111000010100000 -> NaN Invalid_operation
dqxor275 xor 1000000111000111000111000000010000 0700000111000111000111000001000000 -> NaN Invalid_operation
dqxor276 xor 1000000111000111000111000000001000 0800000111000111000111000010100000 -> NaN Invalid_operation
dqxor277 xor 1000000111000111000111000000000100 0900000111000111000111000000010000 -> NaN Invalid_operation
-- test LSD
dqxor280 xor 0010000111000111000111000000000002 1000000111000111000111000100000001 -> NaN Invalid_operation
dqxor281 xor 0001000111000111000111000000000007 1000000111000111000111001000000011 -> NaN Invalid_operation
dqxor282 xor 0000000111000111000111100000000008 1000000111000111000111010000000001 -> NaN Invalid_operation
dqxor283 xor 0000000111000111000111010000000009 1000000111000111000111100000000001 -> NaN Invalid_operation
dqxor284 xor 1000000111000111000111001000000000 0001000111000111000111000000000002 -> NaN Invalid_operation
dqxor285 xor 1000000111000111000111000100000000 0010000111000111000111000000000007 -> NaN Invalid_operation
dqxor286 xor 1000000111000111000111000010000000 0100000111000111000111000000000008 -> NaN Invalid_operation
dqxor287 xor 1000000111000111000111000001000000 1000000111000111000111000000000009 -> NaN Invalid_operation
-- test Middie
dqxor288 xor 0010000111000111000111000020000000 1000000111000111000111001000000000 -> NaN Invalid_operation
dqxor289 xor 0001000111000111000111000070000001 1000000111000111000111000100000000 -> NaN Invalid_operation
dqxor290 xor 0000000111000111000111100080000010 1000000111000111000111000010000000 -> NaN Invalid_operation
dqxor291 xor 0000000111000111000111010090000100 1000000111000111000111000001000000 -> NaN Invalid_operation
dqxor292 xor 1000000111000111000111001000001000 0000000111000111000111000020100000 -> NaN Invalid_operation
dqxor293 xor 1000000111000111000111000100010000 0000000111000111000111000070010000 -> NaN Invalid_operation
dqxor294 xor 1000000111000111000111000010100000 0000000111000111000111000080001000 -> NaN Invalid_operation
dqxor295 xor 1000000111000111000111000001000000 0000000111000111000111000090000100 -> NaN Invalid_operation
-- signs
dqxor296 xor -1000000111000111000111000001000000 -0000001110001110001110010000000100 -> NaN Invalid_operation
dqxor297 xor -1000000111000111000111000001000000 0000001110001110001110000010000100 -> NaN Invalid_operation
dqxor298 xor 1000000111000111000111000001000000 -0000001110001110001110001000000100 -> NaN Invalid_operation
dqxor299 xor 1000000111000111000111000001000000 0000001110001110001110000011000100 -> 1000001001001001001001000010000100
-- Nmax, Nmin, Ntiny-like
dqxor331 xor 2 9.99999999E+999 -> NaN Invalid_operation
dqxor332 xor 3 1E-999 -> NaN Invalid_operation
dqxor333 xor 4 1.00000000E-2821 -> NaN Invalid_operation
dqxor334 xor 5 1E-900 -> NaN Invalid_operation
dqxor335 xor 6 -1E-900 -> NaN Invalid_operation
dqxor336 xor 7 -1.00000000E-999 -> NaN Invalid_operation
dqxor337 xor 8 -1E-999 -> NaN Invalid_operation
dqxor338 xor 9 -9.99999999E+999 -> NaN Invalid_operation
dqxor341 xor 9.99999999E+999 -18 -> NaN Invalid_operation
dqxor342 xor 1E-999 01 -> NaN Invalid_operation
dqxor343 xor 1.00000000E-999 -18 -> NaN Invalid_operation
dqxor344 xor 1E-908 18 -> NaN Invalid_operation
dqxor345 xor -1E-907 -10 -> NaN Invalid_operation
dqxor346 xor -1.00000000E-999 18 -> NaN Invalid_operation
dqxor347 xor -1E-999 10 -> NaN Invalid_operation
dqxor348 xor -9.99999999E+2991 -18 -> NaN Invalid_operation
-- A few other non-integers
dqxor361 xor 1.0 1 -> NaN Invalid_operation
dqxor362 xor 1E+1 1 -> NaN Invalid_operation
dqxor363 xor 0.0 1 -> NaN Invalid_operation
dqxor364 xor 0E+1 1 -> NaN Invalid_operation
dqxor365 xor 9.9 1 -> NaN Invalid_operation
dqxor366 xor 9E+1 1 -> NaN Invalid_operation
dqxor371 xor 0 1.0 -> NaN Invalid_operation
dqxor372 xor 0 1E+1 -> NaN Invalid_operation
dqxor373 xor 0 0.0 -> NaN Invalid_operation
dqxor374 xor 0 0E+1 -> NaN Invalid_operation
dqxor375 xor 0 9.9 -> NaN Invalid_operation
dqxor376 xor 0 9E+1 -> NaN Invalid_operation
-- All Specials are in error
dqxor780 xor -Inf -Inf -> NaN Invalid_operation
dqxor781 xor -Inf -1000 -> NaN Invalid_operation
dqxor782 xor -Inf -1 -> NaN Invalid_operation
dqxor783 xor -Inf -0 -> NaN Invalid_operation
dqxor784 xor -Inf 0 -> NaN Invalid_operation
dqxor785 xor -Inf 1 -> NaN Invalid_operation
dqxor786 xor -Inf 1000 -> NaN Invalid_operation
dqxor787 xor -1000 -Inf -> NaN Invalid_operation
dqxor788 xor -Inf -Inf -> NaN Invalid_operation
dqxor789 xor -1 -Inf -> NaN Invalid_operation
dqxor790 xor -0 -Inf -> NaN Invalid_operation
dqxor791 xor 0 -Inf -> NaN Invalid_operation
dqxor792 xor 1 -Inf -> NaN Invalid_operation
dqxor793 xor 1000 -Inf -> NaN Invalid_operation
dqxor794 xor Inf -Inf -> NaN Invalid_operation
dqxor800 xor Inf -Inf -> NaN Invalid_operation
dqxor801 xor Inf -1000 -> NaN Invalid_operation
dqxor802 xor Inf -1 -> NaN Invalid_operation
dqxor803 xor Inf -0 -> NaN Invalid_operation
dqxor804 xor Inf 0 -> NaN Invalid_operation
dqxor805 xor Inf 1 -> NaN Invalid_operation
dqxor806 xor Inf 1000 -> NaN Invalid_operation
dqxor807 xor Inf Inf -> NaN Invalid_operation
dqxor808 xor -1000 Inf -> NaN Invalid_operation
dqxor809 xor -Inf Inf -> NaN Invalid_operation
dqxor810 xor -1 Inf -> NaN Invalid_operation
dqxor811 xor -0 Inf -> NaN Invalid_operation
dqxor812 xor 0 Inf -> NaN Invalid_operation
dqxor813 xor 1 Inf -> NaN Invalid_operation
dqxor814 xor 1000 Inf -> NaN Invalid_operation
dqxor815 xor Inf Inf -> NaN Invalid_operation
dqxor821 xor NaN -Inf -> NaN Invalid_operation
dqxor822 xor NaN -1000 -> NaN Invalid_operation
dqxor823 xor NaN -1 -> NaN Invalid_operation
dqxor824 xor NaN -0 -> NaN Invalid_operation
dqxor825 xor NaN 0 -> NaN Invalid_operation
dqxor826 xor NaN 1 -> NaN Invalid_operation
dqxor827 xor NaN 1000 -> NaN Invalid_operation
dqxor828 xor NaN Inf -> NaN Invalid_operation
dqxor829 xor NaN NaN -> NaN Invalid_operation
dqxor830 xor -Inf NaN -> NaN Invalid_operation
dqxor831 xor -1000 NaN -> NaN Invalid_operation
dqxor832 xor -1 NaN -> NaN Invalid_operation
dqxor833 xor -0 NaN -> NaN Invalid_operation
dqxor834 xor 0 NaN -> NaN Invalid_operation
dqxor835 xor 1 NaN -> NaN Invalid_operation
dqxor836 xor 1000 NaN -> NaN Invalid_operation
dqxor837 xor Inf NaN -> NaN Invalid_operation
dqxor841 xor sNaN -Inf -> NaN Invalid_operation
dqxor842 xor sNaN -1000 -> NaN Invalid_operation
dqxor843 xor sNaN -1 -> NaN Invalid_operation
dqxor844 xor sNaN -0 -> NaN Invalid_operation
dqxor845 xor sNaN 0 -> NaN Invalid_operation
dqxor846 xor sNaN 1 -> NaN Invalid_operation
dqxor847 xor sNaN 1000 -> NaN Invalid_operation
dqxor848 xor sNaN NaN -> NaN Invalid_operation
dqxor849 xor sNaN sNaN -> NaN Invalid_operation
dqxor850 xor NaN sNaN -> NaN Invalid_operation
dqxor851 xor -Inf sNaN -> NaN Invalid_operation
dqxor852 xor -1000 sNaN -> NaN Invalid_operation
dqxor853 xor -1 sNaN -> NaN Invalid_operation
dqxor854 xor -0 sNaN -> NaN Invalid_operation
dqxor855 xor 0 sNaN -> NaN Invalid_operation
dqxor856 xor 1 sNaN -> NaN Invalid_operation
dqxor857 xor 1000 sNaN -> NaN Invalid_operation
dqxor858 xor Inf sNaN -> NaN Invalid_operation
dqxor859 xor NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqxor861 xor NaN1 -Inf -> NaN Invalid_operation
dqxor862 xor +NaN2 -1000 -> NaN Invalid_operation
dqxor863 xor NaN3 1000 -> NaN Invalid_operation
dqxor864 xor NaN4 Inf -> NaN Invalid_operation
dqxor865 xor NaN5 +NaN6 -> NaN Invalid_operation
dqxor866 xor -Inf NaN7 -> NaN Invalid_operation
dqxor867 xor -1000 NaN8 -> NaN Invalid_operation
dqxor868 xor 1000 NaN9 -> NaN Invalid_operation
dqxor869 xor Inf +NaN10 -> NaN Invalid_operation
dqxor871 xor sNaN11 -Inf -> NaN Invalid_operation
dqxor872 xor sNaN12 -1000 -> NaN Invalid_operation
dqxor873 xor sNaN13 1000 -> NaN Invalid_operation
dqxor874 xor sNaN14 NaN17 -> NaN Invalid_operation
dqxor875 xor sNaN15 sNaN18 -> NaN Invalid_operation
dqxor876 xor NaN16 sNaN19 -> NaN Invalid_operation
dqxor877 xor -Inf +sNaN20 -> NaN Invalid_operation
dqxor878 xor -1000 sNaN21 -> NaN Invalid_operation
dqxor879 xor 1000 sNaN22 -> NaN Invalid_operation
dqxor880 xor Inf sNaN23 -> NaN Invalid_operation
dqxor881 xor +NaN25 +sNaN24 -> NaN Invalid_operation
dqxor882 xor -NaN26 NaN28 -> NaN Invalid_operation
dqxor883 xor -sNaN27 sNaN29 -> NaN Invalid_operation
dqxor884 xor 1000 -NaN30 -> NaN Invalid_operation
dqxor885 xor 1000 -sNaN31 -> NaN Invalid_operation
------------------------------------------------------------------------
-- dqXor.decTest -- digitwise logical XOR for decQuads --
-- 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
clamp: 1
precision: 34
maxExponent: 6144
minExponent: -6143
rounding: half_even
-- Sanity check (truth table)
dqxor001 xor 0 0 -> 0
dqxor002 xor 0 1 -> 1
dqxor003 xor 1 0 -> 1
dqxor004 xor 1 1 -> 0
dqxor005 xor 1100 1010 -> 110
-- and at msd and msd-1
dqxor006 xor 0000000000000000000000000000000000 0000000000000000000000000000000000 -> 0
dqxor007 xor 0000000000000000000000000000000000 1000000000000000000000000000000000 -> 1000000000000000000000000000000000
dqxor008 xor 1000000000000000000000000000000000 0000000000000000000000000000000000 -> 1000000000000000000000000000000000
dqxor009 xor 1000000000000000000000000000000000 1000000000000000000000000000000000 -> 0
dqxor010 xor 0000000000000000000000000000000000 0000000000000000000000000000000000 -> 0
dqxor011 xor 0000000000000000000000000000000000 0100000000000000000000000000000000 -> 100000000000000000000000000000000
dqxor012 xor 0100000000000000000000000000000000 0000000000000000000000000000000000 -> 100000000000000000000000000000000
dqxor013 xor 0100000000000000000000000000000000 0100000000000000000000000000000000 -> 0
-- Various lengths
-- 1234567890123456789012345678901234
dqxor601 xor 0111111111111111111111111111111111 1111111111111111111111111111111111 -> 1000000000000000000000000000000000
dqxor602 xor 1011111111111111111111111111111111 1111111111111111111111111111111111 -> 100000000000000000000000000000000
dqxor603 xor 1101111111111111111111111111111111 1111111111111111111111111111111111 -> 10000000000000000000000000000000
dqxor604 xor 1110111111111111111111111111111111 1111111111111111111111111111111111 -> 1000000000000000000000000000000
dqxor605 xor 1111011111111111111111111111111111 1111111111111111111111111111111111 -> 100000000000000000000000000000
dqxor606 xor 1111101111111111111111111111111111 1111111111111111111111111111111111 -> 10000000000000000000000000000
dqxor607 xor 1111110111111111111111111111111111 1111111111111111111111111111111111 -> 1000000000000000000000000000
dqxor608 xor 1111111011111111111111111111111111 1111111111111111111111111111111111 -> 100000000000000000000000000
dqxor609 xor 1111111101111111111111111111111111 1111111111111111111111111111111111 -> 10000000000000000000000000
dqxor610 xor 1111111110111111111111111111111111 1111111111111111111111111111111111 -> 1000000000000000000000000
dqxor611 xor 1111111111011111111111111111111111 1111111111111111111111111111111111 -> 100000000000000000000000
dqxor612 xor 1111111111101111111111111111111111 1111111111111111111111111111111111 -> 10000000000000000000000
dqxor613 xor 1111111111110111111111111111111111 1111111111111111111111111111111111 -> 1000000000000000000000
dqxor614 xor 1111111111111011111111111111111111 1111111111111111111111111111111111 -> 100000000000000000000
dqxor615 xor 1111111111111101111111111111111111 1111111111111111111111111111111111 -> 10000000000000000000
dqxor616 xor 1111111111111110111111111111111111 1111111111111111111111111111111111 -> 1000000000000000000
dqxor617 xor 1111111111111111011111111111111111 1111111111111111111111111111111111 -> 100000000000000000
dqxor618 xor 1111111111111111101111111111111111 1111111111111111111111111111111111 -> 10000000000000000
dqxor619 xor 1111111111111111110111111111111111 1111111111111111111111111111111111 -> 1000000000000000
dqxor620 xor 1111111111111111111011111111111111 1111111111111111111111111111111111 -> 100000000000000
dqxor621 xor 1111111111111111111101111111111111 1111111111111111111111111111111111 -> 10000000000000
dqxor622 xor 1111111111111111111110111111111111 1111111111111111111111111111111111 -> 1000000000000
dqxor623 xor 1111111111111111111111011111111111 1111111111111111111111111111111111 -> 100000000000
dqxor624 xor 1111111111111111111111101111111111 1111111111111111111111111111111111 -> 10000000000
dqxor625 xor 1111111111111111111111110111111111 1111111111111111111111111111111111 -> 1000000000
dqxor626 xor 1111111111111111111111111011111111 1111111111111111111111111111111111 -> 100000000
dqxor627 xor 1111111111111111111111111101111111 1111111111111111111111111111111111 -> 10000000
dqxor628 xor 1111111111111111111111111110111111 1111111111111111111111111111111111 -> 1000000
dqxor629 xor 1111111111111111111111111111011111 1111111111111111111111111111111111 -> 100000
dqxor630 xor 1111111111111111111111111111101111 1111111111111111111111111111111111 -> 10000
dqxor631 xor 1111111111111111111111111111110111 1111111111111111111111111111111111 -> 1000
dqxor632 xor 1111111111111111111111111111111011 1111111111111111111111111111111111 -> 100
dqxor633 xor 1111111111111111111111111111111101 1111111111111111111111111111111111 -> 10
dqxor634 xor 1111111111111111111111111111111110 1111111111111111111111111111111111 -> 1
dqxor641 xor 1111111111111111111111111111111111 0111111111111111111111111111111111 -> 1000000000000000000000000000000000
dqxor642 xor 1111111111111111111111111111111111 1011111111111111111111111111111111 -> 100000000000000000000000000000000
dqxor643 xor 1111111111111111111111111111111111 1101111111111111111111111111111111 -> 10000000000000000000000000000000
dqxor644 xor 1111111111111111111111111111111111 1110111111111111111111111111111111 -> 1000000000000000000000000000000
dqxor645 xor 1111111111111111111111111111111111 1111011111111111111111111111111111 -> 100000000000000000000000000000
dqxor646 xor 1111111111111111111111111111111111 1111101111111111111111111111111111 -> 10000000000000000000000000000
dqxor647 xor 1111111111111111111111111111111111 1111110111111111111111111111111111 -> 1000000000000000000000000000
dqxor648 xor 1111111111111111111111111111111111 1111111011111111111111111111111111 -> 100000000000000000000000000
dqxor649 xor 1111111111111111111111111111111111 1111111101111111111111111111111111 -> 10000000000000000000000000
dqxor650 xor 1111111111111111111111111111111111 1111111110111111111111111111111111 -> 1000000000000000000000000
dqxor651 xor 1111111111111111111111111111111111 1111111111011111111111111111111111 -> 100000000000000000000000
dqxor652 xor 1111111111111111111111111111111111 1111111111101111111111111111111111 -> 10000000000000000000000
dqxor653 xor 1111111111111111111111111111111111 1111111111110111111111111111111111 -> 1000000000000000000000
dqxor654 xor 1111111111111111111111111111111111 1111111111111011111111111111111111 -> 100000000000000000000
dqxor655 xor 1111111111111111111111111111111111 1111111111111101111111111111111111 -> 10000000000000000000
dqxor656 xor 1111111111111111111111111111111111 1111111111111110111111111111111111 -> 1000000000000000000
dqxor657 xor 1111111111111111111111111111111111 1111111111111111011111111111111111 -> 100000000000000000
dqxor658 xor 1111111111111111111111111111111111 1111111111111111101111111111111111 -> 10000000000000000
dqxor659 xor 1111111111111111111111111111111111 1111111111111111110111111111111111 -> 1000000000000000
dqxor660 xor 1111111111111111111111111111111111 1111111111111111111011111111111111 -> 100000000000000
dqxor661 xor 1111111111111111111111111111111111 1111111111111111111101111111111111 -> 10000000000000
dqxor662 xor 1111111111111111111111111111111111 1111111111111111111110111111111111 -> 1000000000000
dqxor663 xor 1111111111111111111111111111111111 1111111111111111111111011111111111 -> 100000000000
dqxor664 xor 1111111111111111111111111111111111 1111111111111111111111101111111111 -> 10000000000
dqxor665 xor 1111111111111111111111111111111111 1111111111111111111111110111111111 -> 1000000000
dqxor666 xor 1111111111111111111111111111111111 1111111111111111111111111011111111 -> 100000000
dqxor667 xor 1111111111111111111111111111111111 1111111111111111111111111101111111 -> 10000000
dqxor668 xor 1111111111111111111111111111111111 1111111111111111111111111110111111 -> 1000000
dqxor669 xor 1111111111111111111111111111111111 1111111111111111111111111111011111 -> 100000
dqxor670 xor 1111111111111111111111111111111111 1111111111111111111111111111101111 -> 10000
dqxor671 xor 1111111111111111111111111111111111 1111111111111111111111111111110111 -> 1000
dqxor672 xor 1111111111111111111111111111111111 1111111111111111111111111111111011 -> 100
dqxor673 xor 1111111111111111111111111111111111 1111111111111111111111111111111101 -> 10
dqxor674 xor 1111111111111111111111111111111111 1111111111111111111111111111111110 -> 1
dqxor675 xor 0111111111111111111111111111111111 1111111111111111111111111111111110 -> 1000000000000000000000000000000001
dqxor676 xor 1111111111111111111111111111111111 1111111111111111111111111111111110 -> 1
dqxor021 xor 1111111110000000 1111111110000000 -> 0
dqxor022 xor 111111110000000 111111110000000 -> 0
dqxor023 xor 11111110000000 11111110000000 -> 0
dqxor024 xor 1111110000000 1111110000000 -> 0
dqxor025 xor 111110000000 111110000000 -> 0
dqxor026 xor 11110000000 11110000000 -> 0
dqxor027 xor 1110000000 1110000000 -> 0
dqxor028 xor 110000000 110000000 -> 0
dqxor029 xor 10000000 10000000 -> 0
dqxor030 xor 1000000 1000000 -> 0
dqxor031 xor 100000 100000 -> 0
dqxor032 xor 10000 10000 -> 0
dqxor033 xor 1000 1000 -> 0
dqxor034 xor 100 100 -> 0
dqxor035 xor 10 10 -> 0
dqxor036 xor 1 1 -> 0
dqxor040 xor 111111111 111111111111 -> 111000000000
dqxor041 xor 11111111 111111111111 -> 111100000000
dqxor042 xor 11111111 111111111 -> 100000000
dqxor043 xor 1111111 100000010 -> 101111101
dqxor044 xor 111111 100000100 -> 100111011
dqxor045 xor 11111 100001000 -> 100010111
dqxor046 xor 1111 100010000 -> 100011111
dqxor047 xor 111 100100000 -> 100100111
dqxor048 xor 11 101000000 -> 101000011
dqxor049 xor 1 110000000 -> 110000001
dqxor050 xor 1111111111 1 -> 1111111110
dqxor051 xor 111111111 1 -> 111111110
dqxor052 xor 11111111 1 -> 11111110
dqxor053 xor 1111111 1 -> 1111110
dqxor054 xor 111111 1 -> 111110
dqxor055 xor 11111 1 -> 11110
dqxor056 xor 1111 1 -> 1110
dqxor057 xor 111 1 -> 110
dqxor058 xor 11 1 -> 10
dqxor059 xor 1 1 -> 0
dqxor060 xor 1111111111 0 -> 1111111111
dqxor061 xor 111111111 0 -> 111111111
dqxor062 xor 11111111 0 -> 11111111
dqxor063 xor 1111111 0 -> 1111111
dqxor064 xor 111111 0 -> 111111
dqxor065 xor 11111 0 -> 11111
dqxor066 xor 1111 0 -> 1111
dqxor067 xor 111 0 -> 111
dqxor068 xor 11 0 -> 11
dqxor069 xor 1 0 -> 1
dqxor070 xor 1 1111111111 -> 1111111110
dqxor071 xor 1 111111111 -> 111111110
dqxor072 xor 1 11111111 -> 11111110
dqxor073 xor 1 1111111 -> 1111110
dqxor074 xor 1 111111 -> 111110
dqxor075 xor 1 11111 -> 11110
dqxor076 xor 1 1111 -> 1110
dqxor077 xor 1 111 -> 110
dqxor078 xor 1 11 -> 10
dqxor079 xor 1 1 -> 0
dqxor080 xor 0 1111111111 -> 1111111111
dqxor081 xor 0 111111111 -> 111111111
dqxor082 xor 0 11111111 -> 11111111
dqxor083 xor 0 1111111 -> 1111111
dqxor084 xor 0 111111 -> 111111
dqxor085 xor 0 11111 -> 11111
dqxor086 xor 0 1111 -> 1111
dqxor087 xor 0 111 -> 111
dqxor088 xor 0 11 -> 11
dqxor089 xor 0 1 -> 1
dqxor090 xor 011111111 111101111 -> 100010000
dqxor091 xor 101111111 111101111 -> 10010000
dqxor092 xor 110111111 111101111 -> 1010000
dqxor093 xor 111011111 111101111 -> 110000
dqxor094 xor 111101111 111101111 -> 0
dqxor095 xor 111110111 111101111 -> 11000
dqxor096 xor 111111011 111101111 -> 10100
dqxor097 xor 111111101 111101111 -> 10010
dqxor098 xor 111111110 111101111 -> 10001
dqxor100 xor 111101111 011111111 -> 100010000
dqxor101 xor 111101111 101111111 -> 10010000
dqxor102 xor 111101111 110111111 -> 1010000
dqxor103 xor 111101111 111011111 -> 110000
dqxor104 xor 111101111 111101111 -> 0
dqxor105 xor 111101111 111110111 -> 11000
dqxor106 xor 111101111 111111011 -> 10100
dqxor107 xor 111101111 111111101 -> 10010
dqxor108 xor 111101111 111111110 -> 10001
-- non-0/1 should not be accepted, nor should signs
dqxor220 xor 111111112 111111111 -> NaN Invalid_operation
dqxor221 xor 333333333 333333333 -> NaN Invalid_operation
dqxor222 xor 555555555 555555555 -> NaN Invalid_operation
dqxor223 xor 777777777 777777777 -> NaN Invalid_operation
dqxor224 xor 999999999 999999999 -> NaN Invalid_operation
dqxor225 xor 222222222 999999999 -> NaN Invalid_operation
dqxor226 xor 444444444 999999999 -> NaN Invalid_operation
dqxor227 xor 666666666 999999999 -> NaN Invalid_operation
dqxor228 xor 888888888 999999999 -> NaN Invalid_operation
dqxor229 xor 999999999 222222222 -> NaN Invalid_operation
dqxor230 xor 999999999 444444444 -> NaN Invalid_operation
dqxor231 xor 999999999 666666666 -> NaN Invalid_operation
dqxor232 xor 999999999 888888888 -> NaN Invalid_operation
-- a few randoms
dqxor240 xor 567468689 -934981942 -> NaN Invalid_operation
dqxor241 xor 567367689 934981942 -> NaN Invalid_operation
dqxor242 xor -631917772 -706014634 -> NaN Invalid_operation
dqxor243 xor -756253257 138579234 -> NaN Invalid_operation
dqxor244 xor 835590149 567435400 -> NaN Invalid_operation
-- test MSD
dqxor250 xor 2000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqxor251 xor 7000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqxor252 xor 8000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqxor253 xor 9000000111000111000111000000000000 1000000111000111000111000000000000 -> NaN Invalid_operation
dqxor254 xor 2000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqxor255 xor 7000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqxor256 xor 8000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqxor257 xor 9000000111000111000111000000000000 0000000111000111000111000000000000 -> NaN Invalid_operation
dqxor258 xor 1000000111000111000111000000000000 2000000111000111000111000000000000 -> NaN Invalid_operation
dqxor259 xor 1000000111000111000111000000000000 7000000111000111000111000000000000 -> NaN Invalid_operation
dqxor260 xor 1000000111000111000111000000000000 8000000111000111000111000000000000 -> NaN Invalid_operation
dqxor261 xor 1000000111000111000111000000000000 9000000111000111000111000000000000 -> NaN Invalid_operation
dqxor262 xor 0000000111000111000111000000000000 2000000111000111000111000000000000 -> NaN Invalid_operation
dqxor263 xor 0000000111000111000111000000000000 7000000111000111000111000000000000 -> NaN Invalid_operation
dqxor264 xor 0000000111000111000111000000000000 8000000111000111000111000000000000 -> NaN Invalid_operation
dqxor265 xor 0000000111000111000111000000000000 9000000111000111000111000000000000 -> NaN Invalid_operation
-- test MSD-1
dqxor270 xor 0200000111000111000111001000000000 1000000111000111000111100000000010 -> NaN Invalid_operation
dqxor271 xor 0700000111000111000111000100000000 1000000111000111000111010000000100 -> NaN Invalid_operation
dqxor272 xor 0800000111000111000111000010000000 1000000111000111000111001000001000 -> NaN Invalid_operation
dqxor273 xor 0900000111000111000111000001000000 1000000111000111000111000100010000 -> NaN Invalid_operation
dqxor274 xor 1000000111000111000111000000100000 0200000111000111000111000010100000 -> NaN Invalid_operation
dqxor275 xor 1000000111000111000111000000010000 0700000111000111000111000001000000 -> NaN Invalid_operation
dqxor276 xor 1000000111000111000111000000001000 0800000111000111000111000010100000 -> NaN Invalid_operation
dqxor277 xor 1000000111000111000111000000000100 0900000111000111000111000000010000 -> NaN Invalid_operation
-- test LSD
dqxor280 xor 0010000111000111000111000000000002 1000000111000111000111000100000001 -> NaN Invalid_operation
dqxor281 xor 0001000111000111000111000000000007 1000000111000111000111001000000011 -> NaN Invalid_operation
dqxor282 xor 0000000111000111000111100000000008 1000000111000111000111010000000001 -> NaN Invalid_operation
dqxor283 xor 0000000111000111000111010000000009 1000000111000111000111100000000001 -> NaN Invalid_operation
dqxor284 xor 1000000111000111000111001000000000 0001000111000111000111000000000002 -> NaN Invalid_operation
dqxor285 xor 1000000111000111000111000100000000 0010000111000111000111000000000007 -> NaN Invalid_operation
dqxor286 xor 1000000111000111000111000010000000 0100000111000111000111000000000008 -> NaN Invalid_operation
dqxor287 xor 1000000111000111000111000001000000 1000000111000111000111000000000009 -> NaN Invalid_operation
-- test Middie
dqxor288 xor 0010000111000111000111000020000000 1000000111000111000111001000000000 -> NaN Invalid_operation
dqxor289 xor 0001000111000111000111000070000001 1000000111000111000111000100000000 -> NaN Invalid_operation
dqxor290 xor 0000000111000111000111100080000010 1000000111000111000111000010000000 -> NaN Invalid_operation
dqxor291 xor 0000000111000111000111010090000100 1000000111000111000111000001000000 -> NaN Invalid_operation
dqxor292 xor 1000000111000111000111001000001000 0000000111000111000111000020100000 -> NaN Invalid_operation
dqxor293 xor 1000000111000111000111000100010000 0000000111000111000111000070010000 -> NaN Invalid_operation
dqxor294 xor 1000000111000111000111000010100000 0000000111000111000111000080001000 -> NaN Invalid_operation
dqxor295 xor 1000000111000111000111000001000000 0000000111000111000111000090000100 -> NaN Invalid_operation
-- signs
dqxor296 xor -1000000111000111000111000001000000 -0000001110001110001110010000000100 -> NaN Invalid_operation
dqxor297 xor -1000000111000111000111000001000000 0000001110001110001110000010000100 -> NaN Invalid_operation
dqxor298 xor 1000000111000111000111000001000000 -0000001110001110001110001000000100 -> NaN Invalid_operation
dqxor299 xor 1000000111000111000111000001000000 0000001110001110001110000011000100 -> 1000001001001001001001000010000100
-- Nmax, Nmin, Ntiny-like
dqxor331 xor 2 9.99999999E+999 -> NaN Invalid_operation
dqxor332 xor 3 1E-999 -> NaN Invalid_operation
dqxor333 xor 4 1.00000000E-2821 -> NaN Invalid_operation
dqxor334 xor 5 1E-900 -> NaN Invalid_operation
dqxor335 xor 6 -1E-900 -> NaN Invalid_operation
dqxor336 xor 7 -1.00000000E-999 -> NaN Invalid_operation
dqxor337 xor 8 -1E-999 -> NaN Invalid_operation
dqxor338 xor 9 -9.99999999E+999 -> NaN Invalid_operation
dqxor341 xor 9.99999999E+999 -18 -> NaN Invalid_operation
dqxor342 xor 1E-999 01 -> NaN Invalid_operation
dqxor343 xor 1.00000000E-999 -18 -> NaN Invalid_operation
dqxor344 xor 1E-908 18 -> NaN Invalid_operation
dqxor345 xor -1E-907 -10 -> NaN Invalid_operation
dqxor346 xor -1.00000000E-999 18 -> NaN Invalid_operation
dqxor347 xor -1E-999 10 -> NaN Invalid_operation
dqxor348 xor -9.99999999E+2991 -18 -> NaN Invalid_operation
-- A few other non-integers
dqxor361 xor 1.0 1 -> NaN Invalid_operation
dqxor362 xor 1E+1 1 -> NaN Invalid_operation
dqxor363 xor 0.0 1 -> NaN Invalid_operation
dqxor364 xor 0E+1 1 -> NaN Invalid_operation
dqxor365 xor 9.9 1 -> NaN Invalid_operation
dqxor366 xor 9E+1 1 -> NaN Invalid_operation
dqxor371 xor 0 1.0 -> NaN Invalid_operation
dqxor372 xor 0 1E+1 -> NaN Invalid_operation
dqxor373 xor 0 0.0 -> NaN Invalid_operation
dqxor374 xor 0 0E+1 -> NaN Invalid_operation
dqxor375 xor 0 9.9 -> NaN Invalid_operation
dqxor376 xor 0 9E+1 -> NaN Invalid_operation
-- All Specials are in error
dqxor780 xor -Inf -Inf -> NaN Invalid_operation
dqxor781 xor -Inf -1000 -> NaN Invalid_operation
dqxor782 xor -Inf -1 -> NaN Invalid_operation
dqxor783 xor -Inf -0 -> NaN Invalid_operation
dqxor784 xor -Inf 0 -> NaN Invalid_operation
dqxor785 xor -Inf 1 -> NaN Invalid_operation
dqxor786 xor -Inf 1000 -> NaN Invalid_operation
dqxor787 xor -1000 -Inf -> NaN Invalid_operation
dqxor788 xor -Inf -Inf -> NaN Invalid_operation
dqxor789 xor -1 -Inf -> NaN Invalid_operation
dqxor790 xor -0 -Inf -> NaN Invalid_operation
dqxor791 xor 0 -Inf -> NaN Invalid_operation
dqxor792 xor 1 -Inf -> NaN Invalid_operation
dqxor793 xor 1000 -Inf -> NaN Invalid_operation
dqxor794 xor Inf -Inf -> NaN Invalid_operation
dqxor800 xor Inf -Inf -> NaN Invalid_operation
dqxor801 xor Inf -1000 -> NaN Invalid_operation
dqxor802 xor Inf -1 -> NaN Invalid_operation
dqxor803 xor Inf -0 -> NaN Invalid_operation
dqxor804 xor Inf 0 -> NaN Invalid_operation
dqxor805 xor Inf 1 -> NaN Invalid_operation
dqxor806 xor Inf 1000 -> NaN Invalid_operation
dqxor807 xor Inf Inf -> NaN Invalid_operation
dqxor808 xor -1000 Inf -> NaN Invalid_operation
dqxor809 xor -Inf Inf -> NaN Invalid_operation
dqxor810 xor -1 Inf -> NaN Invalid_operation
dqxor811 xor -0 Inf -> NaN Invalid_operation
dqxor812 xor 0 Inf -> NaN Invalid_operation
dqxor813 xor 1 Inf -> NaN Invalid_operation
dqxor814 xor 1000 Inf -> NaN Invalid_operation
dqxor815 xor Inf Inf -> NaN Invalid_operation
dqxor821 xor NaN -Inf -> NaN Invalid_operation
dqxor822 xor NaN -1000 -> NaN Invalid_operation
dqxor823 xor NaN -1 -> NaN Invalid_operation
dqxor824 xor NaN -0 -> NaN Invalid_operation
dqxor825 xor NaN 0 -> NaN Invalid_operation
dqxor826 xor NaN 1 -> NaN Invalid_operation
dqxor827 xor NaN 1000 -> NaN Invalid_operation
dqxor828 xor NaN Inf -> NaN Invalid_operation
dqxor829 xor NaN NaN -> NaN Invalid_operation
dqxor830 xor -Inf NaN -> NaN Invalid_operation
dqxor831 xor -1000 NaN -> NaN Invalid_operation
dqxor832 xor -1 NaN -> NaN Invalid_operation
dqxor833 xor -0 NaN -> NaN Invalid_operation
dqxor834 xor 0 NaN -> NaN Invalid_operation
dqxor835 xor 1 NaN -> NaN Invalid_operation
dqxor836 xor 1000 NaN -> NaN Invalid_operation
dqxor837 xor Inf NaN -> NaN Invalid_operation
dqxor841 xor sNaN -Inf -> NaN Invalid_operation
dqxor842 xor sNaN -1000 -> NaN Invalid_operation
dqxor843 xor sNaN -1 -> NaN Invalid_operation
dqxor844 xor sNaN -0 -> NaN Invalid_operation
dqxor845 xor sNaN 0 -> NaN Invalid_operation
dqxor846 xor sNaN 1 -> NaN Invalid_operation
dqxor847 xor sNaN 1000 -> NaN Invalid_operation
dqxor848 xor sNaN NaN -> NaN Invalid_operation
dqxor849 xor sNaN sNaN -> NaN Invalid_operation
dqxor850 xor NaN sNaN -> NaN Invalid_operation
dqxor851 xor -Inf sNaN -> NaN Invalid_operation
dqxor852 xor -1000 sNaN -> NaN Invalid_operation
dqxor853 xor -1 sNaN -> NaN Invalid_operation
dqxor854 xor -0 sNaN -> NaN Invalid_operation
dqxor855 xor 0 sNaN -> NaN Invalid_operation
dqxor856 xor 1 sNaN -> NaN Invalid_operation
dqxor857 xor 1000 sNaN -> NaN Invalid_operation
dqxor858 xor Inf sNaN -> NaN Invalid_operation
dqxor859 xor NaN sNaN -> NaN Invalid_operation
-- propagating NaNs
dqxor861 xor NaN1 -Inf -> NaN Invalid_operation
dqxor862 xor +NaN2 -1000 -> NaN Invalid_operation
dqxor863 xor NaN3 1000 -> NaN Invalid_operation
dqxor864 xor NaN4 Inf -> NaN Invalid_operation
dqxor865 xor NaN5 +NaN6 -> NaN Invalid_operation
dqxor866 xor -Inf NaN7 -> NaN Invalid_operation
dqxor867 xor -1000 NaN8 -> NaN Invalid_operation
dqxor868 xor 1000 NaN9 -> NaN Invalid_operation
dqxor869 xor Inf +NaN10 -> NaN Invalid_operation
dqxor871 xor sNaN11 -Inf -> NaN Invalid_operation
dqxor872 xor sNaN12 -1000 -> NaN Invalid_operation
dqxor873 xor sNaN13 1000 -> NaN Invalid_operation
dqxor874 xor sNaN14 NaN17 -> NaN Invalid_operation
dqxor875 xor sNaN15 sNaN18 -> NaN Invalid_operation
dqxor876 xor NaN16 sNaN19 -> NaN Invalid_operation
dqxor877 xor -Inf +sNaN20 -> NaN Invalid_operation
dqxor878 xor -1000 sNaN21 -> NaN Invalid_operation
dqxor879 xor 1000 sNaN22 -> NaN Invalid_operation
dqxor880 xor Inf sNaN23 -> NaN Invalid_operation
dqxor881 xor +NaN25 +sNaN24 -> NaN Invalid_operation
dqxor882 xor -NaN26 NaN28 -> NaN Invalid_operation
dqxor883 xor -sNaN27 sNaN29 -> NaN Invalid_operation
dqxor884 xor 1000 -NaN30 -> NaN Invalid_operation
dqxor885 xor 1000 -sNaN31 -> NaN Invalid_operation

File diff suppressed because it is too large Load diff

View file

@ -1,372 +1,372 @@
------------------------------------------------------------------------
-- dsEncode.decTest -- decimal four-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 decimal32.decTest]
version: 2.59
-- This set of tests is for the four-byte concrete representation.
-- Its characteristics are:
--
-- 1 bit sign
-- 5 bits combination field
-- 6 bits exponent continuation
-- 20 bits coefficient continuation
--
-- Total exponent length 8 bits
-- Total coefficient length 24 bits (7 digits)
--
-- Elimit = 191 (maximum encoded exponent)
-- Emax = 96 (largest exponent value)
-- Emin = -95 (smallest exponent value)
-- bias = 101 (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: 7
rounding: half_up
maxExponent: 96
minExponent: -95
-- General testcases
-- (mostly derived from the Strawman 4 document and examples)
decs001 apply #A23003D0 -> -7.50
decs002 apply -7.50 -> #A23003D0
-- derivative canonical plain strings
decs003 apply #A26003D0 -> -7.50E+3
decs004 apply -7.50E+3 -> #A26003D0
decs005 apply #A25003D0 -> -750
decs006 apply -750 -> #A25003D0
decs007 apply #A24003D0 -> -75.0
decs008 apply -75.0 -> #A24003D0
decs009 apply #A22003D0 -> -0.750
decs010 apply -0.750 -> #A22003D0
decs011 apply #A21003D0 -> -0.0750
decs012 apply -0.0750 -> #A21003D0
decs013 apply #A1f003D0 -> -0.000750
decs014 apply -0.000750 -> #A1f003D0
decs015 apply #A1d003D0 -> -0.00000750
decs016 apply -0.00000750 -> #A1d003D0
decs017 apply #A1c003D0 -> -7.50E-7
decs018 apply -7.50E-7 -> #A1c003D0
-- Normality
decs020 apply 1234567 -> #2654d2e7
decs021 apply -1234567 -> #a654d2e7
decs022 apply 1111111 -> #26524491
-- Nmax and similar
decs031 apply 9.999999E+96 -> #77f3fcff
decs032 apply #77f3fcff -> 9.999999E+96
decs033 apply 1.234567E+96 -> #47f4d2e7
decs034 apply #47f4d2e7 -> 1.234567E+96
-- fold-downs (more below)
decs035 apply 1.23E+96 -> #47f4c000 Clamped
decs036 apply #47f4c000 -> 1.230000E+96
decs037 apply 1E+96 -> #47f00000 Clamped
decs038 apply #47f00000 -> 1.000000E+96
decs051 apply 12345 -> #225049c5
decs052 apply #225049c5 -> 12345
decs053 apply 1234 -> #22500534
decs054 apply #22500534 -> 1234
decs055 apply 123 -> #225000a3
decs056 apply #225000a3 -> 123
decs057 apply 12 -> #22500012
decs058 apply #22500012 -> 12
decs059 apply 1 -> #22500001
decs060 apply #22500001 -> 1
decs061 apply 1.23 -> #223000a3
decs062 apply #223000a3 -> 1.23
decs063 apply 123.45 -> #223049c5
decs064 apply #223049c5 -> 123.45
-- Nmin and below
decs071 apply 1E-95 -> #00600001
decs072 apply #00600001 -> 1E-95
decs073 apply 1.000000E-95 -> #04000000
decs074 apply #04000000 -> 1.000000E-95
decs075 apply 1.000001E-95 -> #04000001
decs076 apply #04000001 -> 1.000001E-95
decs077 apply 0.100000E-95 -> #00020000 Subnormal
decs07x apply 1.00000E-96 -> 1.00000E-96 Subnormal
decs078 apply #00020000 -> 1.00000E-96 Subnormal
decs079 apply 0.000010E-95 -> #00000010 Subnormal
decs080 apply #00000010 -> 1.0E-100 Subnormal
decs081 apply 0.000001E-95 -> #00000001 Subnormal
decs082 apply #00000001 -> 1E-101 Subnormal
decs083 apply 1e-101 -> #00000001 Subnormal
decs084 apply #00000001 -> 1E-101 Subnormal
decs08x apply 1e-101 -> 1E-101 Subnormal
-- underflows cannot be tested; just check edge case
decs090 apply 1e-101 -> #00000001 Subnormal
-- same again, negatives --
-- Nmax and similar
decs122 apply -9.999999E+96 -> #f7f3fcff
decs123 apply #f7f3fcff -> -9.999999E+96
decs124 apply -1.234567E+96 -> #c7f4d2e7
decs125 apply #c7f4d2e7 -> -1.234567E+96
-- fold-downs (more below)
decs130 apply -1.23E+96 -> #c7f4c000 Clamped
decs131 apply #c7f4c000 -> -1.230000E+96
decs132 apply -1E+96 -> #c7f00000 Clamped
decs133 apply #c7f00000 -> -1.000000E+96
decs151 apply -12345 -> #a25049c5
decs152 apply #a25049c5 -> -12345
decs153 apply -1234 -> #a2500534
decs154 apply #a2500534 -> -1234
decs155 apply -123 -> #a25000a3
decs156 apply #a25000a3 -> -123
decs157 apply -12 -> #a2500012
decs158 apply #a2500012 -> -12
decs159 apply -1 -> #a2500001
decs160 apply #a2500001 -> -1
decs161 apply -1.23 -> #a23000a3
decs162 apply #a23000a3 -> -1.23
decs163 apply -123.45 -> #a23049c5
decs164 apply #a23049c5 -> -123.45
-- Nmin and below
decs171 apply -1E-95 -> #80600001
decs172 apply #80600001 -> -1E-95
decs173 apply -1.000000E-95 -> #84000000
decs174 apply #84000000 -> -1.000000E-95
decs175 apply -1.000001E-95 -> #84000001
decs176 apply #84000001 -> -1.000001E-95
decs177 apply -0.100000E-95 -> #80020000 Subnormal
decs178 apply #80020000 -> -1.00000E-96 Subnormal
decs179 apply -0.000010E-95 -> #80000010 Subnormal
decs180 apply #80000010 -> -1.0E-100 Subnormal
decs181 apply -0.000001E-95 -> #80000001 Subnormal
decs182 apply #80000001 -> -1E-101 Subnormal
decs183 apply -1e-101 -> #80000001 Subnormal
decs184 apply #80000001 -> -1E-101 Subnormal
-- underflow edge case
decs190 apply -1e-101 -> #80000001 Subnormal
-- zeros
decs400 apply 0E-400 -> #00000000 Clamped
decs401 apply 0E-101 -> #00000000
decs402 apply #00000000 -> 0E-101
decs403 apply 0.000000E-95 -> #00000000
decs404 apply #00000000 -> 0E-101
decs405 apply 0E-2 -> #22300000
decs406 apply #22300000 -> 0.00
decs407 apply 0 -> #22500000
decs408 apply #22500000 -> 0
decs409 apply 0E+3 -> #22800000
decs410 apply #22800000 -> 0E+3
decs411 apply 0E+90 -> #43f00000
decs412 apply #43f00000 -> 0E+90
-- clamped zeros...
decs413 apply 0E+91 -> #43f00000 Clamped
decs414 apply #43f00000 -> 0E+90
decs415 apply 0E+96 -> #43f00000 Clamped
decs416 apply #43f00000 -> 0E+90
decs417 apply 0E+400 -> #43f00000 Clamped
decs418 apply #43f00000 -> 0E+90
-- negative zeros
decs420 apply -0E-400 -> #80000000 Clamped
decs421 apply -0E-101 -> #80000000
decs422 apply #80000000 -> -0E-101
decs423 apply -0.000000E-95 -> #80000000
decs424 apply #80000000 -> -0E-101
decs425 apply -0E-2 -> #a2300000
decs426 apply #a2300000 -> -0.00
decs427 apply -0 -> #a2500000
decs428 apply #a2500000 -> -0
decs429 apply -0E+3 -> #a2800000
decs430 apply #a2800000 -> -0E+3
decs431 apply -0E+90 -> #c3f00000
decs432 apply #c3f00000 -> -0E+90
-- clamped zeros...
decs433 apply -0E+91 -> #c3f00000 Clamped
decs434 apply #c3f00000 -> -0E+90
decs435 apply -0E+96 -> #c3f00000 Clamped
decs436 apply #c3f00000 -> -0E+90
decs437 apply -0E+400 -> #c3f00000 Clamped
decs438 apply #c3f00000 -> -0E+90
-- Specials
decs500 apply Infinity -> #78000000
decs501 apply #78787878 -> #78000000
decs502 apply #78000000 -> Infinity
decs503 apply #79797979 -> #78000000
decs504 apply #79000000 -> Infinity
decs505 apply #7a7a7a7a -> #78000000
decs506 apply #7a000000 -> Infinity
decs507 apply #7b7b7b7b -> #78000000
decs508 apply #7b000000 -> Infinity
decs509 apply #7c7c7c7c -> #7c0c7c7c
decs510 apply NaN -> #7c000000
decs511 apply #7c000000 -> NaN
decs512 apply #7d7d7d7d -> #7c0d7d7d
decs513 apply #7d000000 -> NaN
decs514 apply #7e7e7e7e -> #7e0e7c7e
decs515 apply #7e000000 -> sNaN
decs516 apply #7f7f7f7f -> #7e0f7c7f
decs517 apply #7f000000 -> sNaN
decs518 apply #7fffffff -> sNaN999999
decs519 apply #7fffffff -> #7e03fcff
decs520 apply -Infinity -> #f8000000
decs521 apply #f8787878 -> #f8000000
decs522 apply #f8000000 -> -Infinity
decs523 apply #f9797979 -> #f8000000
decs524 apply #f9000000 -> -Infinity
decs525 apply #fa7a7a7a -> #f8000000
decs526 apply #fa000000 -> -Infinity
decs527 apply #fb7b7b7b -> #f8000000
decs528 apply #fb000000 -> -Infinity
decs529 apply -NaN -> #fc000000
decs530 apply #fc7c7c7c -> #fc0c7c7c
decs531 apply #fc000000 -> -NaN
decs532 apply #fd7d7d7d -> #fc0d7d7d
decs533 apply #fd000000 -> -NaN
decs534 apply #fe7e7e7e -> #fe0e7c7e
decs535 apply #fe000000 -> -sNaN
decs536 apply #ff7f7f7f -> #fe0f7c7f
decs537 apply #ff000000 -> -sNaN
decs538 apply #ffffffff -> -sNaN999999
decs539 apply #ffffffff -> #fe03fcff
-- diagnostic NaNs
decs540 apply NaN -> #7c000000
decs541 apply NaN0 -> #7c000000
decs542 apply NaN1 -> #7c000001
decs543 apply NaN12 -> #7c000012
decs544 apply NaN79 -> #7c000079
decs545 apply NaN12345 -> #7c0049c5
decs546 apply NaN123456 -> #7c028e56
decs547 apply NaN799799 -> #7c0f7fdf
decs548 apply NaN999999 -> #7c03fcff
-- fold-down full sequence
decs601 apply 1E+96 -> #47f00000 Clamped
decs602 apply #47f00000 -> 1.000000E+96
decs603 apply 1E+95 -> #43f20000 Clamped
decs604 apply #43f20000 -> 1.00000E+95
decs605 apply 1E+94 -> #43f04000 Clamped
decs606 apply #43f04000 -> 1.0000E+94
decs607 apply 1E+93 -> #43f00400 Clamped
decs608 apply #43f00400 -> 1.000E+93
decs609 apply 1E+92 -> #43f00080 Clamped
decs610 apply #43f00080 -> 1.00E+92
decs611 apply 1E+91 -> #43f00010 Clamped
decs612 apply #43f00010 -> 1.0E+91
decs613 apply 1E+90 -> #43f00001
decs614 apply #43f00001 -> 1E+90
-- Selected DPD codes
decs700 apply #22500000 -> 0
decs701 apply #22500009 -> 9
decs702 apply #22500010 -> 10
decs703 apply #22500019 -> 19
decs704 apply #22500020 -> 20
decs705 apply #22500029 -> 29
decs706 apply #22500030 -> 30
decs707 apply #22500039 -> 39
decs708 apply #22500040 -> 40
decs709 apply #22500049 -> 49
decs710 apply #22500050 -> 50
decs711 apply #22500059 -> 59
decs712 apply #22500060 -> 60
decs713 apply #22500069 -> 69
decs714 apply #22500070 -> 70
decs715 apply #22500071 -> 71
decs716 apply #22500072 -> 72
decs717 apply #22500073 -> 73
decs718 apply #22500074 -> 74
decs719 apply #22500075 -> 75
decs720 apply #22500076 -> 76
decs721 apply #22500077 -> 77
decs722 apply #22500078 -> 78
decs723 apply #22500079 -> 79
decs730 apply #2250029e -> 994
decs731 apply #2250029f -> 995
decs732 apply #225002a0 -> 520
decs733 apply #225002a1 -> 521
-- DPD: one of each of the huffman groups
decs740 apply #225003f7 -> 777
decs741 apply #225003f8 -> 778
decs742 apply #225003eb -> 787
decs743 apply #2250037d -> 877
decs744 apply #2250039f -> 997
decs745 apply #225003bf -> 979
decs746 apply #225003df -> 799
decs747 apply #2250006e -> 888
-- DPD all-highs cases (includes the 24 redundant codes)
decs750 apply #2250006e -> 888
decs751 apply #2250016e -> 888
decs752 apply #2250026e -> 888
decs753 apply #2250036e -> 888
decs754 apply #2250006f -> 889
decs755 apply #2250016f -> 889
decs756 apply #2250026f -> 889
decs757 apply #2250036f -> 889
decs760 apply #2250007e -> 898
decs761 apply #2250017e -> 898
decs762 apply #2250027e -> 898
decs763 apply #2250037e -> 898
decs764 apply #2250007f -> 899
decs765 apply #2250017f -> 899
decs766 apply #2250027f -> 899
decs767 apply #2250037f -> 899
decs770 apply #225000ee -> 988
decs771 apply #225001ee -> 988
decs772 apply #225002ee -> 988
decs773 apply #225003ee -> 988
decs774 apply #225000ef -> 989
decs775 apply #225001ef -> 989
decs776 apply #225002ef -> 989
decs777 apply #225003ef -> 989
decs780 apply #225000fe -> 998
decs781 apply #225001fe -> 998
decs782 apply #225002fe -> 998
decs783 apply #225003fe -> 998
decs784 apply #225000ff -> 999
decs785 apply #225001ff -> 999
decs786 apply #225002ff -> 999
decs787 apply #225003ff -> 999
-- narrowing case
decs790 apply 2.00E-99 -> #00000100 Subnormal
decs791 apply #00000100 -> 2.00E-99 Subnormal
------------------------------------------------------------------------
-- dsEncode.decTest -- decimal four-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 decimal32.decTest]
version: 2.59
-- This set of tests is for the four-byte concrete representation.
-- Its characteristics are:
--
-- 1 bit sign
-- 5 bits combination field
-- 6 bits exponent continuation
-- 20 bits coefficient continuation
--
-- Total exponent length 8 bits
-- Total coefficient length 24 bits (7 digits)
--
-- Elimit = 191 (maximum encoded exponent)
-- Emax = 96 (largest exponent value)
-- Emin = -95 (smallest exponent value)
-- bias = 101 (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: 7
rounding: half_up
maxExponent: 96
minExponent: -95
-- General testcases
-- (mostly derived from the Strawman 4 document and examples)
decs001 apply #A23003D0 -> -7.50
decs002 apply -7.50 -> #A23003D0
-- derivative canonical plain strings
decs003 apply #A26003D0 -> -7.50E+3
decs004 apply -7.50E+3 -> #A26003D0
decs005 apply #A25003D0 -> -750
decs006 apply -750 -> #A25003D0
decs007 apply #A24003D0 -> -75.0
decs008 apply -75.0 -> #A24003D0
decs009 apply #A22003D0 -> -0.750
decs010 apply -0.750 -> #A22003D0
decs011 apply #A21003D0 -> -0.0750
decs012 apply -0.0750 -> #A21003D0
decs013 apply #A1f003D0 -> -0.000750
decs014 apply -0.000750 -> #A1f003D0
decs015 apply #A1d003D0 -> -0.00000750
decs016 apply -0.00000750 -> #A1d003D0
decs017 apply #A1c003D0 -> -7.50E-7
decs018 apply -7.50E-7 -> #A1c003D0
-- Normality
decs020 apply 1234567 -> #2654d2e7
decs021 apply -1234567 -> #a654d2e7
decs022 apply 1111111 -> #26524491
-- Nmax and similar
decs031 apply 9.999999E+96 -> #77f3fcff
decs032 apply #77f3fcff -> 9.999999E+96
decs033 apply 1.234567E+96 -> #47f4d2e7
decs034 apply #47f4d2e7 -> 1.234567E+96
-- fold-downs (more below)
decs035 apply 1.23E+96 -> #47f4c000 Clamped
decs036 apply #47f4c000 -> 1.230000E+96
decs037 apply 1E+96 -> #47f00000 Clamped
decs038 apply #47f00000 -> 1.000000E+96
decs051 apply 12345 -> #225049c5
decs052 apply #225049c5 -> 12345
decs053 apply 1234 -> #22500534
decs054 apply #22500534 -> 1234
decs055 apply 123 -> #225000a3
decs056 apply #225000a3 -> 123
decs057 apply 12 -> #22500012
decs058 apply #22500012 -> 12
decs059 apply 1 -> #22500001
decs060 apply #22500001 -> 1
decs061 apply 1.23 -> #223000a3
decs062 apply #223000a3 -> 1.23
decs063 apply 123.45 -> #223049c5
decs064 apply #223049c5 -> 123.45
-- Nmin and below
decs071 apply 1E-95 -> #00600001
decs072 apply #00600001 -> 1E-95
decs073 apply 1.000000E-95 -> #04000000
decs074 apply #04000000 -> 1.000000E-95
decs075 apply 1.000001E-95 -> #04000001
decs076 apply #04000001 -> 1.000001E-95
decs077 apply 0.100000E-95 -> #00020000 Subnormal
decs07x apply 1.00000E-96 -> 1.00000E-96 Subnormal
decs078 apply #00020000 -> 1.00000E-96 Subnormal
decs079 apply 0.000010E-95 -> #00000010 Subnormal
decs080 apply #00000010 -> 1.0E-100 Subnormal
decs081 apply 0.000001E-95 -> #00000001 Subnormal
decs082 apply #00000001 -> 1E-101 Subnormal
decs083 apply 1e-101 -> #00000001 Subnormal
decs084 apply #00000001 -> 1E-101 Subnormal
decs08x apply 1e-101 -> 1E-101 Subnormal
-- underflows cannot be tested; just check edge case
decs090 apply 1e-101 -> #00000001 Subnormal
-- same again, negatives --
-- Nmax and similar
decs122 apply -9.999999E+96 -> #f7f3fcff
decs123 apply #f7f3fcff -> -9.999999E+96
decs124 apply -1.234567E+96 -> #c7f4d2e7
decs125 apply #c7f4d2e7 -> -1.234567E+96
-- fold-downs (more below)
decs130 apply -1.23E+96 -> #c7f4c000 Clamped
decs131 apply #c7f4c000 -> -1.230000E+96
decs132 apply -1E+96 -> #c7f00000 Clamped
decs133 apply #c7f00000 -> -1.000000E+96
decs151 apply -12345 -> #a25049c5
decs152 apply #a25049c5 -> -12345
decs153 apply -1234 -> #a2500534
decs154 apply #a2500534 -> -1234
decs155 apply -123 -> #a25000a3
decs156 apply #a25000a3 -> -123
decs157 apply -12 -> #a2500012
decs158 apply #a2500012 -> -12
decs159 apply -1 -> #a2500001
decs160 apply #a2500001 -> -1
decs161 apply -1.23 -> #a23000a3
decs162 apply #a23000a3 -> -1.23
decs163 apply -123.45 -> #a23049c5
decs164 apply #a23049c5 -> -123.45
-- Nmin and below
decs171 apply -1E-95 -> #80600001
decs172 apply #80600001 -> -1E-95
decs173 apply -1.000000E-95 -> #84000000
decs174 apply #84000000 -> -1.000000E-95
decs175 apply -1.000001E-95 -> #84000001
decs176 apply #84000001 -> -1.000001E-95
decs177 apply -0.100000E-95 -> #80020000 Subnormal
decs178 apply #80020000 -> -1.00000E-96 Subnormal
decs179 apply -0.000010E-95 -> #80000010 Subnormal
decs180 apply #80000010 -> -1.0E-100 Subnormal
decs181 apply -0.000001E-95 -> #80000001 Subnormal
decs182 apply #80000001 -> -1E-101 Subnormal
decs183 apply -1e-101 -> #80000001 Subnormal
decs184 apply #80000001 -> -1E-101 Subnormal
-- underflow edge case
decs190 apply -1e-101 -> #80000001 Subnormal
-- zeros
decs400 apply 0E-400 -> #00000000 Clamped
decs401 apply 0E-101 -> #00000000
decs402 apply #00000000 -> 0E-101
decs403 apply 0.000000E-95 -> #00000000
decs404 apply #00000000 -> 0E-101
decs405 apply 0E-2 -> #22300000
decs406 apply #22300000 -> 0.00
decs407 apply 0 -> #22500000
decs408 apply #22500000 -> 0
decs409 apply 0E+3 -> #22800000
decs410 apply #22800000 -> 0E+3
decs411 apply 0E+90 -> #43f00000
decs412 apply #43f00000 -> 0E+90
-- clamped zeros...
decs413 apply 0E+91 -> #43f00000 Clamped
decs414 apply #43f00000 -> 0E+90
decs415 apply 0E+96 -> #43f00000 Clamped
decs416 apply #43f00000 -> 0E+90
decs417 apply 0E+400 -> #43f00000 Clamped
decs418 apply #43f00000 -> 0E+90
-- negative zeros
decs420 apply -0E-400 -> #80000000 Clamped
decs421 apply -0E-101 -> #80000000
decs422 apply #80000000 -> -0E-101
decs423 apply -0.000000E-95 -> #80000000
decs424 apply #80000000 -> -0E-101
decs425 apply -0E-2 -> #a2300000
decs426 apply #a2300000 -> -0.00
decs427 apply -0 -> #a2500000
decs428 apply #a2500000 -> -0
decs429 apply -0E+3 -> #a2800000
decs430 apply #a2800000 -> -0E+3
decs431 apply -0E+90 -> #c3f00000
decs432 apply #c3f00000 -> -0E+90
-- clamped zeros...
decs433 apply -0E+91 -> #c3f00000 Clamped
decs434 apply #c3f00000 -> -0E+90
decs435 apply -0E+96 -> #c3f00000 Clamped
decs436 apply #c3f00000 -> -0E+90
decs437 apply -0E+400 -> #c3f00000 Clamped
decs438 apply #c3f00000 -> -0E+90
-- Specials
decs500 apply Infinity -> #78000000
decs501 apply #78787878 -> #78000000
decs502 apply #78000000 -> Infinity
decs503 apply #79797979 -> #78000000
decs504 apply #79000000 -> Infinity
decs505 apply #7a7a7a7a -> #78000000
decs506 apply #7a000000 -> Infinity
decs507 apply #7b7b7b7b -> #78000000
decs508 apply #7b000000 -> Infinity
decs509 apply #7c7c7c7c -> #7c0c7c7c
decs510 apply NaN -> #7c000000
decs511 apply #7c000000 -> NaN
decs512 apply #7d7d7d7d -> #7c0d7d7d
decs513 apply #7d000000 -> NaN
decs514 apply #7e7e7e7e -> #7e0e7c7e
decs515 apply #7e000000 -> sNaN
decs516 apply #7f7f7f7f -> #7e0f7c7f
decs517 apply #7f000000 -> sNaN
decs518 apply #7fffffff -> sNaN999999
decs519 apply #7fffffff -> #7e03fcff
decs520 apply -Infinity -> #f8000000
decs521 apply #f8787878 -> #f8000000
decs522 apply #f8000000 -> -Infinity
decs523 apply #f9797979 -> #f8000000
decs524 apply #f9000000 -> -Infinity
decs525 apply #fa7a7a7a -> #f8000000
decs526 apply #fa000000 -> -Infinity
decs527 apply #fb7b7b7b -> #f8000000
decs528 apply #fb000000 -> -Infinity
decs529 apply -NaN -> #fc000000
decs530 apply #fc7c7c7c -> #fc0c7c7c
decs531 apply #fc000000 -> -NaN
decs532 apply #fd7d7d7d -> #fc0d7d7d
decs533 apply #fd000000 -> -NaN
decs534 apply #fe7e7e7e -> #fe0e7c7e
decs535 apply #fe000000 -> -sNaN
decs536 apply #ff7f7f7f -> #fe0f7c7f
decs537 apply #ff000000 -> -sNaN
decs538 apply #ffffffff -> -sNaN999999
decs539 apply #ffffffff -> #fe03fcff
-- diagnostic NaNs
decs540 apply NaN -> #7c000000
decs541 apply NaN0 -> #7c000000
decs542 apply NaN1 -> #7c000001
decs543 apply NaN12 -> #7c000012
decs544 apply NaN79 -> #7c000079
decs545 apply NaN12345 -> #7c0049c5
decs546 apply NaN123456 -> #7c028e56
decs547 apply NaN799799 -> #7c0f7fdf
decs548 apply NaN999999 -> #7c03fcff
-- fold-down full sequence
decs601 apply 1E+96 -> #47f00000 Clamped
decs602 apply #47f00000 -> 1.000000E+96
decs603 apply 1E+95 -> #43f20000 Clamped
decs604 apply #43f20000 -> 1.00000E+95
decs605 apply 1E+94 -> #43f04000 Clamped
decs606 apply #43f04000 -> 1.0000E+94
decs607 apply 1E+93 -> #43f00400 Clamped
decs608 apply #43f00400 -> 1.000E+93
decs609 apply 1E+92 -> #43f00080 Clamped
decs610 apply #43f00080 -> 1.00E+92
decs611 apply 1E+91 -> #43f00010 Clamped
decs612 apply #43f00010 -> 1.0E+91
decs613 apply 1E+90 -> #43f00001
decs614 apply #43f00001 -> 1E+90
-- Selected DPD codes
decs700 apply #22500000 -> 0
decs701 apply #22500009 -> 9
decs702 apply #22500010 -> 10
decs703 apply #22500019 -> 19
decs704 apply #22500020 -> 20
decs705 apply #22500029 -> 29
decs706 apply #22500030 -> 30
decs707 apply #22500039 -> 39
decs708 apply #22500040 -> 40
decs709 apply #22500049 -> 49
decs710 apply #22500050 -> 50
decs711 apply #22500059 -> 59
decs712 apply #22500060 -> 60
decs713 apply #22500069 -> 69
decs714 apply #22500070 -> 70
decs715 apply #22500071 -> 71
decs716 apply #22500072 -> 72
decs717 apply #22500073 -> 73
decs718 apply #22500074 -> 74
decs719 apply #22500075 -> 75
decs720 apply #22500076 -> 76
decs721 apply #22500077 -> 77
decs722 apply #22500078 -> 78
decs723 apply #22500079 -> 79
decs730 apply #2250029e -> 994
decs731 apply #2250029f -> 995
decs732 apply #225002a0 -> 520
decs733 apply #225002a1 -> 521
-- DPD: one of each of the huffman groups
decs740 apply #225003f7 -> 777
decs741 apply #225003f8 -> 778
decs742 apply #225003eb -> 787
decs743 apply #2250037d -> 877
decs744 apply #2250039f -> 997
decs745 apply #225003bf -> 979
decs746 apply #225003df -> 799
decs747 apply #2250006e -> 888
-- DPD all-highs cases (includes the 24 redundant codes)
decs750 apply #2250006e -> 888
decs751 apply #2250016e -> 888
decs752 apply #2250026e -> 888
decs753 apply #2250036e -> 888
decs754 apply #2250006f -> 889
decs755 apply #2250016f -> 889
decs756 apply #2250026f -> 889
decs757 apply #2250036f -> 889
decs760 apply #2250007e -> 898
decs761 apply #2250017e -> 898
decs762 apply #2250027e -> 898
decs763 apply #2250037e -> 898
decs764 apply #2250007f -> 899
decs765 apply #2250017f -> 899
decs766 apply #2250027f -> 899
decs767 apply #2250037f -> 899
decs770 apply #225000ee -> 988
decs771 apply #225001ee -> 988
decs772 apply #225002ee -> 988
decs773 apply #225003ee -> 988
decs774 apply #225000ef -> 989
decs775 apply #225001ef -> 989
decs776 apply #225002ef -> 989
decs777 apply #225003ef -> 989
decs780 apply #225000fe -> 998
decs781 apply #225001fe -> 998
decs782 apply #225002fe -> 998
decs783 apply #225003fe -> 998
decs784 apply #225000ff -> 999
decs785 apply #225001ff -> 999
decs786 apply #225002ff -> 999
decs787 apply #225003ff -> 999
-- narrowing case
decs790 apply 2.00E-99 -> #00000100 Subnormal
decs791 apply #00000100 -> 2.00E-99 Subnormal

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

Some files were not shown because too many files have changed in this diff Show more