diff options
Diffstat (limited to 'Lib/test/decimaltestdata/max.decTest')
-rw-r--r-- | Lib/test/decimaltestdata/max.decTest | 60 |
1 files changed, 54 insertions, 6 deletions
diff --git a/Lib/test/decimaltestdata/max.decTest b/Lib/test/decimaltestdata/max.decTest index 9798ae2aaa..88d0b5e1b1 100644 --- a/Lib/test/decimaltestdata/max.decTest +++ b/Lib/test/decimaltestdata/max.decTest @@ -1,6 +1,6 @@ ------------------------------------------------------------------------ -- max.decTest -- decimal maximum -- --- Copyright (c) IBM Corporation, 1981, 2004. All rights reserved. -- +-- Copyright (c) IBM Corporation, 1981, 2007. All rights reserved. -- ------------------------------------------------------------------------ -- Please see the document "General Decimal Arithmetic Testcases" -- -- at http://www2.hursley.ibm.com/decimal for the description of -- @@ -17,7 +17,7 @@ -- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK -- -- mfc@uk.ibm.com -- ------------------------------------------------------------------------ -version: 2.39 +version: 2.56 -- we assume that base comparison is tested in compare.decTest, so -- these mainly cover special cases and rounding @@ -331,6 +331,33 @@ maxx465 max -1E+3 1000 -> 1000 maxx466 max -1000 -1E+3 -> -1000 maxx467 max -1E+3 -1000 -> -1000 +-- rounding (results treated as though plus) +maxexponent: 999999999 +minexponent: -999999999 +precision: 3 + +maxx470 max 1 .5 -> 1 +maxx471 max 10 5 -> 10 +maxx472 max 100 50 -> 100 +maxx473 max 1000 500 -> 1.00E+3 Rounded +maxx474 max 10000 5000 -> 1.00E+4 Rounded +maxx475 max 6 .5 -> 6 +maxx476 max 66 5 -> 66 +maxx477 max 666 50 -> 666 +maxx478 max 6666 500 -> 6.67E+3 Rounded Inexact +maxx479 max 66666 5000 -> 6.67E+4 Rounded Inexact +maxx480 max 33333 5000 -> 3.33E+4 Rounded Inexact +maxx481 max .5 1 -> 1 +maxx482 max .5 10 -> 10 +maxx483 max .5 100 -> 100 +maxx484 max .5 1000 -> 1.00E+3 Rounded +maxx485 max .5 10000 -> 1.00E+4 Rounded +maxx486 max .5 6 -> 6 +maxx487 max .5 66 -> 66 +maxx488 max .5 666 -> 666 +maxx489 max .5 6666 -> 6.67E+3 Rounded Inexact +maxx490 max .5 66666 -> 6.67E+4 Rounded Inexact +maxx491 max .5 33333 -> 3.33E+4 Rounded Inexact -- overflow tests maxexponent: 999999999 @@ -348,13 +375,13 @@ maxx511 max 0.1E-999 0 -> 1E-1000 Subnormal maxx512 max 0.10E-999 0 -> 1.0E-1000 Subnormal maxx513 max 0.100E-999 0 -> 1.0E-1000 Subnormal Rounded maxx514 max 0.01E-999 0 -> 1E-1001 Subnormal --- next is rounded to Emin +-- next is rounded to Nmin maxx515 max 0.999E-999 0 -> 1.00E-999 Inexact Rounded Subnormal Underflow maxx516 max 0.099E-999 0 -> 1.0E-1000 Inexact Rounded Subnormal Underflow maxx517 max 0.009E-999 0 -> 1E-1001 Inexact Rounded Subnormal Underflow -maxx518 max 0.001E-999 0 -> 0E-1001 Inexact Rounded Subnormal Underflow -maxx519 max 0.0009E-999 0 -> 0E-1001 Inexact Rounded Subnormal Underflow -maxx520 max 0.0001E-999 0 -> 0E-1001 Inexact Rounded Subnormal Underflow +maxx518 max 0.001E-999 0 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped +maxx519 max 0.0009E-999 0 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped +maxx520 max 0.0001E-999 0 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped maxx530 max -1.00E-999 0 -> 0 maxx531 max -0.1E-999 0 -> 0 @@ -368,6 +395,27 @@ maxx538 max -0.001E-999 0 -> 0 maxx539 max -0.0009E-999 0 -> 0 maxx540 max -0.0001E-999 0 -> 0 +-- misalignment traps for little-endian +precision: 9 +maxx551 max 1.0 0.1 -> 1.0 +maxx552 max 0.1 1.0 -> 1.0 +maxx553 max 10.0 0.1 -> 10.0 +maxx554 max 0.1 10.0 -> 10.0 +maxx555 max 100 1.0 -> 100 +maxx556 max 1.0 100 -> 100 +maxx557 max 1000 10.0 -> 1000 +maxx558 max 10.0 1000 -> 1000 +maxx559 max 10000 100.0 -> 10000 +maxx560 max 100.0 10000 -> 10000 +maxx661 max 100000 1000.0 -> 100000 +maxx662 max 1000.0 100000 -> 100000 +maxx663 max 1000000 10000.0 -> 1000000 +maxx664 max 10000.0 1000000 -> 1000000 + +-- payload decapitate +precision: 5 +maxx670 max 11 -sNaN12345678901 -> -NaN78901 Invalid_operation + -- Null tests maxx900 max 10 # -> NaN Invalid_operation maxx901 max # 10 -> NaN Invalid_operation |