17db96d56Sopenharmony_ci------------------------------------------------------------------------ 27db96d56Sopenharmony_ci-- nexttoward.decTest -- decimal next toward rhs [754r nextafter] -- 37db96d56Sopenharmony_ci-- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. -- 47db96d56Sopenharmony_ci------------------------------------------------------------------------ 57db96d56Sopenharmony_ci-- Please see the document "General Decimal Arithmetic Testcases" -- 67db96d56Sopenharmony_ci-- at http://www2.hursley.ibm.com/decimal for the description of -- 77db96d56Sopenharmony_ci-- these testcases. -- 87db96d56Sopenharmony_ci-- -- 97db96d56Sopenharmony_ci-- These testcases are experimental ('beta' versions), and they -- 107db96d56Sopenharmony_ci-- may contain errors. They are offered on an as-is basis. In -- 117db96d56Sopenharmony_ci-- particular, achieving the same results as the tests here is not -- 127db96d56Sopenharmony_ci-- a guarantee that an implementation complies with any Standard -- 137db96d56Sopenharmony_ci-- or specification. The tests are not exhaustive. -- 147db96d56Sopenharmony_ci-- -- 157db96d56Sopenharmony_ci-- Please send comments, suggestions, and corrections to the author: -- 167db96d56Sopenharmony_ci-- Mike Cowlishaw, IBM Fellow -- 177db96d56Sopenharmony_ci-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK -- 187db96d56Sopenharmony_ci-- mfc@uk.ibm.com -- 197db96d56Sopenharmony_ci------------------------------------------------------------------------ 207db96d56Sopenharmony_civersion: 2.59 217db96d56Sopenharmony_ci 227db96d56Sopenharmony_ciextended: 1 237db96d56Sopenharmony_ciprecision: 9 247db96d56Sopenharmony_cirounding: half_up 257db96d56Sopenharmony_cimaxExponent: 384 267db96d56Sopenharmony_ciminexponent: -383 277db96d56Sopenharmony_ci 287db96d56Sopenharmony_ci-- Sanity check with a scattering of numerics 297db96d56Sopenharmony_cinextt001 nexttoward 10 10 -> 10 307db96d56Sopenharmony_cinextt002 nexttoward -10 -10 -> -10 317db96d56Sopenharmony_cinextt003 nexttoward 1 10 -> 1.00000001 327db96d56Sopenharmony_cinextt004 nexttoward 1 -10 -> 0.999999999 337db96d56Sopenharmony_cinextt005 nexttoward -1 10 -> -0.999999999 347db96d56Sopenharmony_cinextt006 nexttoward -1 -10 -> -1.00000001 357db96d56Sopenharmony_cinextt007 nexttoward 0 10 -> 1E-391 Underflow Subnormal Inexact Rounded 367db96d56Sopenharmony_cinextt008 nexttoward 0 -10 -> -1E-391 Underflow Subnormal Inexact Rounded 377db96d56Sopenharmony_cinextt009 nexttoward 9.99999999E+384 +Infinity -> Infinity Overflow Inexact Rounded 387db96d56Sopenharmony_cinextt010 nexttoward -9.99999999E+384 -Infinity -> -Infinity Overflow Inexact Rounded 397db96d56Sopenharmony_ci 407db96d56Sopenharmony_ci------- lhs=rhs 417db96d56Sopenharmony_ci-- finites 427db96d56Sopenharmony_cinextt101 nexttoward 7 7 -> 7 437db96d56Sopenharmony_cinextt102 nexttoward -7 -7 -> -7 447db96d56Sopenharmony_cinextt103 nexttoward 75 75 -> 75 457db96d56Sopenharmony_cinextt104 nexttoward -75 -75 -> -75 467db96d56Sopenharmony_cinextt105 nexttoward 7.50 7.5 -> 7.50 477db96d56Sopenharmony_cinextt106 nexttoward -7.50 -7.50 -> -7.50 487db96d56Sopenharmony_cinextt107 nexttoward 7.500 7.5000 -> 7.500 497db96d56Sopenharmony_cinextt108 nexttoward -7.500 -7.5 -> -7.500 507db96d56Sopenharmony_ci 517db96d56Sopenharmony_ci-- zeros 527db96d56Sopenharmony_cinextt111 nexttoward 0 0 -> 0 537db96d56Sopenharmony_cinextt112 nexttoward -0 -0 -> -0 547db96d56Sopenharmony_cinextt113 nexttoward 0E+4 0 -> 0E+4 557db96d56Sopenharmony_cinextt114 nexttoward -0E+4 -0 -> -0E+4 567db96d56Sopenharmony_cinextt115 nexttoward 0.0000 0.00000 -> 0.0000 577db96d56Sopenharmony_cinextt116 nexttoward -0.0000 -0.00 -> -0.0000 587db96d56Sopenharmony_cinextt117 nexttoward 0E-141 0 -> 0E-141 597db96d56Sopenharmony_cinextt118 nexttoward -0E-141 -000 -> -0E-141 607db96d56Sopenharmony_ci 617db96d56Sopenharmony_ci-- full coefficients, alternating bits 627db96d56Sopenharmony_cinextt121 nexttoward 268268268 268268268 -> 268268268 637db96d56Sopenharmony_cinextt122 nexttoward -268268268 -268268268 -> -268268268 647db96d56Sopenharmony_cinextt123 nexttoward 134134134 134134134 -> 134134134 657db96d56Sopenharmony_cinextt124 nexttoward -134134134 -134134134 -> -134134134 667db96d56Sopenharmony_ci 677db96d56Sopenharmony_ci-- Nmax, Nmin, Ntiny 687db96d56Sopenharmony_cinextt131 nexttoward 9.99999999E+384 9.99999999E+384 -> 9.99999999E+384 697db96d56Sopenharmony_cinextt132 nexttoward 1E-383 1E-383 -> 1E-383 707db96d56Sopenharmony_cinextt133 nexttoward 1.00000000E-383 1.00000000E-383 -> 1.00000000E-383 717db96d56Sopenharmony_cinextt134 nexttoward 1E-391 1E-391 -> 1E-391 727db96d56Sopenharmony_ci 737db96d56Sopenharmony_cinextt135 nexttoward -1E-391 -1E-391 -> -1E-391 747db96d56Sopenharmony_cinextt136 nexttoward -1.00000000E-383 -1.00000000E-383 -> -1.00000000E-383 757db96d56Sopenharmony_cinextt137 nexttoward -1E-383 -1E-383 -> -1E-383 767db96d56Sopenharmony_cinextt138 nexttoward -9.99999999E+384 -9.99999999E+384 -> -9.99999999E+384 777db96d56Sopenharmony_ci 787db96d56Sopenharmony_ci------- lhs<rhs 797db96d56Sopenharmony_cinextt201 nexttoward 0.999999995 Infinity -> 0.999999996 807db96d56Sopenharmony_cinextt202 nexttoward 0.999999996 Infinity -> 0.999999997 817db96d56Sopenharmony_cinextt203 nexttoward 0.999999997 Infinity -> 0.999999998 827db96d56Sopenharmony_cinextt204 nexttoward 0.999999998 Infinity -> 0.999999999 837db96d56Sopenharmony_cinextt205 nexttoward 0.999999999 Infinity -> 1.00000000 847db96d56Sopenharmony_cinextt206 nexttoward 1.00000000 Infinity -> 1.00000001 857db96d56Sopenharmony_cinextt207 nexttoward 1.0 Infinity -> 1.00000001 867db96d56Sopenharmony_cinextt208 nexttoward 1 Infinity -> 1.00000001 877db96d56Sopenharmony_cinextt209 nexttoward 1.00000001 Infinity -> 1.00000002 887db96d56Sopenharmony_cinextt210 nexttoward 1.00000002 Infinity -> 1.00000003 897db96d56Sopenharmony_cinextt211 nexttoward 1.00000003 Infinity -> 1.00000004 907db96d56Sopenharmony_cinextt212 nexttoward 1.00000004 Infinity -> 1.00000005 917db96d56Sopenharmony_cinextt213 nexttoward 1.00000005 Infinity -> 1.00000006 927db96d56Sopenharmony_cinextt214 nexttoward 1.00000006 Infinity -> 1.00000007 937db96d56Sopenharmony_cinextt215 nexttoward 1.00000007 Infinity -> 1.00000008 947db96d56Sopenharmony_cinextt216 nexttoward 1.00000008 Infinity -> 1.00000009 957db96d56Sopenharmony_cinextt217 nexttoward 1.00000009 Infinity -> 1.00000010 967db96d56Sopenharmony_cinextt218 nexttoward 1.00000010 Infinity -> 1.00000011 977db96d56Sopenharmony_cinextt219 nexttoward 1.00000011 Infinity -> 1.00000012 987db96d56Sopenharmony_ci 997db96d56Sopenharmony_cinextt221 nexttoward -0.999999995 Infinity -> -0.999999994 1007db96d56Sopenharmony_cinextt222 nexttoward -0.999999996 Infinity -> -0.999999995 1017db96d56Sopenharmony_cinextt223 nexttoward -0.999999997 Infinity -> -0.999999996 1027db96d56Sopenharmony_cinextt224 nexttoward -0.999999998 Infinity -> -0.999999997 1037db96d56Sopenharmony_cinextt225 nexttoward -0.999999999 Infinity -> -0.999999998 1047db96d56Sopenharmony_cinextt226 nexttoward -1.00000000 Infinity -> -0.999999999 1057db96d56Sopenharmony_cinextt227 nexttoward -1.0 Infinity -> -0.999999999 1067db96d56Sopenharmony_cinextt228 nexttoward -1 Infinity -> -0.999999999 1077db96d56Sopenharmony_cinextt229 nexttoward -1.00000001 Infinity -> -1.00000000 1087db96d56Sopenharmony_cinextt230 nexttoward -1.00000002 Infinity -> -1.00000001 1097db96d56Sopenharmony_cinextt231 nexttoward -1.00000003 Infinity -> -1.00000002 1107db96d56Sopenharmony_cinextt232 nexttoward -1.00000004 Infinity -> -1.00000003 1117db96d56Sopenharmony_cinextt233 nexttoward -1.00000005 Infinity -> -1.00000004 1127db96d56Sopenharmony_cinextt234 nexttoward -1.00000006 Infinity -> -1.00000005 1137db96d56Sopenharmony_cinextt235 nexttoward -1.00000007 Infinity -> -1.00000006 1147db96d56Sopenharmony_cinextt236 nexttoward -1.00000008 Infinity -> -1.00000007 1157db96d56Sopenharmony_cinextt237 nexttoward -1.00000009 Infinity -> -1.00000008 1167db96d56Sopenharmony_cinextt238 nexttoward -1.00000010 Infinity -> -1.00000009 1177db96d56Sopenharmony_cinextt239 nexttoward -1.00000011 Infinity -> -1.00000010 1187db96d56Sopenharmony_cinextt240 nexttoward -1.00000012 Infinity -> -1.00000011 1197db96d56Sopenharmony_ci 1207db96d56Sopenharmony_ci-- input operand is >precision 1217db96d56Sopenharmony_cinextt241 nexttoward 1.00000010998 Infinity -> 1.00000011 1227db96d56Sopenharmony_cinextt242 nexttoward 1.00000010999 Infinity -> 1.00000011 1237db96d56Sopenharmony_cinextt243 nexttoward 1.00000011000 Infinity -> 1.00000012 1247db96d56Sopenharmony_cinextt244 nexttoward 1.00000011001 Infinity -> 1.00000012 1257db96d56Sopenharmony_cinextt245 nexttoward 1.00000011002 Infinity -> 1.00000012 1267db96d56Sopenharmony_cinextt246 nexttoward 1.00000011002 Infinity -> 1.00000012 1277db96d56Sopenharmony_cinextt247 nexttoward 1.00000011052 Infinity -> 1.00000012 1287db96d56Sopenharmony_cinextt248 nexttoward 1.00000011552 Infinity -> 1.00000012 1297db96d56Sopenharmony_cinextt249 nexttoward -1.00000010998 Infinity -> -1.00000010 1307db96d56Sopenharmony_cinextt250 nexttoward -1.00000010999 Infinity -> -1.00000010 1317db96d56Sopenharmony_cinextt251 nexttoward -1.00000011000 Infinity -> -1.00000010 1327db96d56Sopenharmony_cinextt252 nexttoward -1.00000011001 Infinity -> -1.00000011 1337db96d56Sopenharmony_cinextt253 nexttoward -1.00000011002 Infinity -> -1.00000011 1347db96d56Sopenharmony_cinextt254 nexttoward -1.00000011002 Infinity -> -1.00000011 1357db96d56Sopenharmony_cinextt255 nexttoward -1.00000011052 Infinity -> -1.00000011 1367db96d56Sopenharmony_cinextt256 nexttoward -1.00000011552 Infinity -> -1.00000011 1377db96d56Sopenharmony_ci-- ultra-tiny inputs 1387db96d56Sopenharmony_cinextt260 nexttoward 1E-99999 Infinity -> 1E-391 Underflow Subnormal Inexact Rounded 1397db96d56Sopenharmony_cinextt261 nexttoward 1E-999999999 Infinity -> 1E-391 Underflow Subnormal Inexact Rounded 1407db96d56Sopenharmony_cinextt262 nexttoward 1E-391 Infinity -> 2E-391 Underflow Subnormal Inexact Rounded 1417db96d56Sopenharmony_cinextt263 nexttoward -1E-99999 Infinity -> -0E-391 Underflow Subnormal Inexact Rounded Clamped 1427db96d56Sopenharmony_cinextt264 nexttoward -1E-999999999 Infinity -> -0E-391 Underflow Subnormal Inexact Rounded Clamped 1437db96d56Sopenharmony_cinextt265 nexttoward -1E-391 Infinity -> -0E-391 Underflow Subnormal Inexact Rounded Clamped 1447db96d56Sopenharmony_ci 1457db96d56Sopenharmony_ci-- Zeros 1467db96d56Sopenharmony_cinextt300 nexttoward 0 Infinity -> 1E-391 Underflow Subnormal Inexact Rounded 1477db96d56Sopenharmony_cinextt301 nexttoward 0.00 Infinity -> 1E-391 Underflow Subnormal Inexact Rounded 1487db96d56Sopenharmony_cinextt302 nexttoward 0E-300 Infinity -> 1E-391 Underflow Subnormal Inexact Rounded 1497db96d56Sopenharmony_cinextt303 nexttoward 0E+300 Infinity -> 1E-391 Underflow Subnormal Inexact Rounded 1507db96d56Sopenharmony_cinextt304 nexttoward 0E+30000 Infinity -> 1E-391 Underflow Subnormal Inexact Rounded 1517db96d56Sopenharmony_cinextt305 nexttoward -0 Infinity -> 1E-391 Underflow Subnormal Inexact Rounded 1527db96d56Sopenharmony_cinextt306 nexttoward -0.00 Infinity -> 1E-391 Underflow Subnormal Inexact Rounded 1537db96d56Sopenharmony_cinextt307 nexttoward -0E-300 Infinity -> 1E-391 Underflow Subnormal Inexact Rounded 1547db96d56Sopenharmony_cinextt308 nexttoward -0E+300 Infinity -> 1E-391 Underflow Subnormal Inexact Rounded 1557db96d56Sopenharmony_cinextt309 nexttoward -0E+30000 Infinity -> 1E-391 Underflow Subnormal Inexact Rounded 1567db96d56Sopenharmony_ci 1577db96d56Sopenharmony_ci-- specials 1587db96d56Sopenharmony_cinextt350 nexttoward Inf Infinity -> Infinity 1597db96d56Sopenharmony_cinextt351 nexttoward -Inf Infinity -> -9.99999999E+384 1607db96d56Sopenharmony_cinextt352 nexttoward NaN Infinity -> NaN 1617db96d56Sopenharmony_cinextt353 nexttoward sNaN Infinity -> NaN Invalid_operation 1627db96d56Sopenharmony_cinextt354 nexttoward NaN77 Infinity -> NaN77 1637db96d56Sopenharmony_cinextt355 nexttoward sNaN88 Infinity -> NaN88 Invalid_operation 1647db96d56Sopenharmony_cinextt356 nexttoward -NaN Infinity -> -NaN 1657db96d56Sopenharmony_cinextt357 nexttoward -sNaN Infinity -> -NaN Invalid_operation 1667db96d56Sopenharmony_cinextt358 nexttoward -NaN77 Infinity -> -NaN77 1677db96d56Sopenharmony_cinextt359 nexttoward -sNaN88 Infinity -> -NaN88 Invalid_operation 1687db96d56Sopenharmony_ci 1697db96d56Sopenharmony_ci-- Nmax, Nmin, Ntiny, subnormals 1707db96d56Sopenharmony_cimaxExponent: 999 1717db96d56Sopenharmony_ciminexponent: -999 1727db96d56Sopenharmony_cinextt370 nexttoward 9.99999999E+999 Infinity -> Infinity Overflow Inexact Rounded 1737db96d56Sopenharmony_cinextt371 nexttoward 9.99999998E+999 Infinity -> 9.99999999E+999 1747db96d56Sopenharmony_cinextt372 nexttoward 1E-999 Infinity -> 1.00000001E-999 1757db96d56Sopenharmony_cinextt373 nexttoward 1.00000000E-999 Infinity -> 1.00000001E-999 1767db96d56Sopenharmony_cinextt374 nexttoward 0.999999999E-999 Infinity -> 1.00000000E-999 1777db96d56Sopenharmony_cinextt375 nexttoward 0.99999999E-999 Infinity -> 1.00000000E-999 1787db96d56Sopenharmony_cinextt376 nexttoward 9E-1007 Infinity -> 1.0E-1006 Underflow Subnormal Inexact Rounded 1797db96d56Sopenharmony_cinextt377 nexttoward 9.9E-1006 Infinity -> 1.00E-1005 Underflow Subnormal Inexact Rounded 1807db96d56Sopenharmony_cinextt378 nexttoward 9.9999E-1003 Infinity -> 1.00000E-1002 Underflow Subnormal Inexact Rounded 1817db96d56Sopenharmony_cinextt379 nexttoward 9.9999998E-1000 Infinity -> 9.9999999E-1000 Underflow Subnormal Inexact Rounded 1827db96d56Sopenharmony_cinextt380 nexttoward 9.9999997E-1000 Infinity -> 9.9999998E-1000 Underflow Subnormal Inexact Rounded 1837db96d56Sopenharmony_cinextt381 nexttoward 0E-1007 Infinity -> 1E-1007 Underflow Subnormal Inexact Rounded 1847db96d56Sopenharmony_cinextt382 nexttoward 1E-1007 Infinity -> 2E-1007 Underflow Subnormal Inexact Rounded 1857db96d56Sopenharmony_cinextt383 nexttoward 2E-1007 Infinity -> 3E-1007 Underflow Subnormal Inexact Rounded 1867db96d56Sopenharmony_ci 1877db96d56Sopenharmony_cinextt385 nexttoward -0E-1007 Infinity -> 1E-1007 Underflow Subnormal Inexact Rounded 1887db96d56Sopenharmony_cinextt386 nexttoward -1E-1007 Infinity -> -0E-1007 Underflow Subnormal Inexact Rounded Clamped 1897db96d56Sopenharmony_cinextt387 nexttoward -2E-1007 Infinity -> -1E-1007 Underflow Subnormal Inexact Rounded 1907db96d56Sopenharmony_cinextt388 nexttoward -10E-1007 Infinity -> -9E-1007 Underflow Subnormal Inexact Rounded 1917db96d56Sopenharmony_cinextt389 nexttoward -100E-1007 Infinity -> -9.9E-1006 Underflow Subnormal Inexact Rounded 1927db96d56Sopenharmony_cinextt390 nexttoward -100000E-1007 Infinity -> -9.9999E-1003 Underflow Subnormal Inexact Rounded 1937db96d56Sopenharmony_cinextt391 nexttoward -1.0000E-999 Infinity -> -9.9999999E-1000 Underflow Subnormal Inexact Rounded 1947db96d56Sopenharmony_cinextt392 nexttoward -1.00000000E-999 Infinity -> -9.9999999E-1000 Underflow Subnormal Inexact Rounded 1957db96d56Sopenharmony_cinextt393 nexttoward -1E-999 Infinity -> -9.9999999E-1000 Underflow Subnormal Inexact Rounded 1967db96d56Sopenharmony_cinextt394 nexttoward -9.99999998E+999 Infinity -> -9.99999997E+999 1977db96d56Sopenharmony_cinextt395 nexttoward -9.99999999E+999 Infinity -> -9.99999998E+999 1987db96d56Sopenharmony_ci 1997db96d56Sopenharmony_ci------- lhs>rhs 2007db96d56Sopenharmony_cimaxExponent: 384 2017db96d56Sopenharmony_ciminexponent: -383 2027db96d56Sopenharmony_cinextt401 nexttoward 0.999999995 -Infinity -> 0.999999994 2037db96d56Sopenharmony_cinextt402 nexttoward 0.999999996 -Infinity -> 0.999999995 2047db96d56Sopenharmony_cinextt403 nexttoward 0.999999997 -Infinity -> 0.999999996 2057db96d56Sopenharmony_cinextt404 nexttoward 0.999999998 -Infinity -> 0.999999997 2067db96d56Sopenharmony_cinextt405 nexttoward 0.999999999 -Infinity -> 0.999999998 2077db96d56Sopenharmony_cinextt406 nexttoward 1.00000000 -Infinity -> 0.999999999 2087db96d56Sopenharmony_cinextt407 nexttoward 1.0 -Infinity -> 0.999999999 2097db96d56Sopenharmony_cinextt408 nexttoward 1 -Infinity -> 0.999999999 2107db96d56Sopenharmony_cinextt409 nexttoward 1.00000001 -Infinity -> 1.00000000 2117db96d56Sopenharmony_cinextt410 nexttoward 1.00000002 -Infinity -> 1.00000001 2127db96d56Sopenharmony_cinextt411 nexttoward 1.00000003 -Infinity -> 1.00000002 2137db96d56Sopenharmony_cinextt412 nexttoward 1.00000004 -Infinity -> 1.00000003 2147db96d56Sopenharmony_cinextt413 nexttoward 1.00000005 -Infinity -> 1.00000004 2157db96d56Sopenharmony_cinextt414 nexttoward 1.00000006 -Infinity -> 1.00000005 2167db96d56Sopenharmony_cinextt415 nexttoward 1.00000007 -Infinity -> 1.00000006 2177db96d56Sopenharmony_cinextt416 nexttoward 1.00000008 -Infinity -> 1.00000007 2187db96d56Sopenharmony_cinextt417 nexttoward 1.00000009 -Infinity -> 1.00000008 2197db96d56Sopenharmony_cinextt418 nexttoward 1.00000010 -Infinity -> 1.00000009 2207db96d56Sopenharmony_cinextt419 nexttoward 1.00000011 -Infinity -> 1.00000010 2217db96d56Sopenharmony_cinextt420 nexttoward 1.00000012 -Infinity -> 1.00000011 2227db96d56Sopenharmony_ci 2237db96d56Sopenharmony_cinextt421 nexttoward -0.999999995 -Infinity -> -0.999999996 2247db96d56Sopenharmony_cinextt422 nexttoward -0.999999996 -Infinity -> -0.999999997 2257db96d56Sopenharmony_cinextt423 nexttoward -0.999999997 -Infinity -> -0.999999998 2267db96d56Sopenharmony_cinextt424 nexttoward -0.999999998 -Infinity -> -0.999999999 2277db96d56Sopenharmony_cinextt425 nexttoward -0.999999999 -Infinity -> -1.00000000 2287db96d56Sopenharmony_cinextt426 nexttoward -1.00000000 -Infinity -> -1.00000001 2297db96d56Sopenharmony_cinextt427 nexttoward -1.0 -Infinity -> -1.00000001 2307db96d56Sopenharmony_cinextt428 nexttoward -1 -Infinity -> -1.00000001 2317db96d56Sopenharmony_cinextt429 nexttoward -1.00000001 -Infinity -> -1.00000002 2327db96d56Sopenharmony_cinextt430 nexttoward -1.00000002 -Infinity -> -1.00000003 2337db96d56Sopenharmony_cinextt431 nexttoward -1.00000003 -Infinity -> -1.00000004 2347db96d56Sopenharmony_cinextt432 nexttoward -1.00000004 -Infinity -> -1.00000005 2357db96d56Sopenharmony_cinextt433 nexttoward -1.00000005 -Infinity -> -1.00000006 2367db96d56Sopenharmony_cinextt434 nexttoward -1.00000006 -Infinity -> -1.00000007 2377db96d56Sopenharmony_cinextt435 nexttoward -1.00000007 -Infinity -> -1.00000008 2387db96d56Sopenharmony_cinextt436 nexttoward -1.00000008 -Infinity -> -1.00000009 2397db96d56Sopenharmony_cinextt437 nexttoward -1.00000009 -Infinity -> -1.00000010 2407db96d56Sopenharmony_cinextt438 nexttoward -1.00000010 -Infinity -> -1.00000011 2417db96d56Sopenharmony_cinextt439 nexttoward -1.00000011 -Infinity -> -1.00000012 2427db96d56Sopenharmony_ci 2437db96d56Sopenharmony_ci-- input operand is >precision 2447db96d56Sopenharmony_cinextt441 nexttoward 1.00000010998 -Infinity -> 1.00000010 2457db96d56Sopenharmony_cinextt442 nexttoward 1.00000010999 -Infinity -> 1.00000010 2467db96d56Sopenharmony_cinextt443 nexttoward 1.00000011000 -Infinity -> 1.00000010 2477db96d56Sopenharmony_cinextt444 nexttoward 1.00000011001 -Infinity -> 1.00000011 2487db96d56Sopenharmony_cinextt445 nexttoward 1.00000011002 -Infinity -> 1.00000011 2497db96d56Sopenharmony_cinextt446 nexttoward 1.00000011002 -Infinity -> 1.00000011 2507db96d56Sopenharmony_cinextt447 nexttoward 1.00000011052 -Infinity -> 1.00000011 2517db96d56Sopenharmony_cinextt448 nexttoward 1.00000011552 -Infinity -> 1.00000011 2527db96d56Sopenharmony_cinextt449 nexttoward -1.00000010998 -Infinity -> -1.00000011 2537db96d56Sopenharmony_cinextt450 nexttoward -1.00000010999 -Infinity -> -1.00000011 2547db96d56Sopenharmony_cinextt451 nexttoward -1.00000011000 -Infinity -> -1.00000012 2557db96d56Sopenharmony_cinextt452 nexttoward -1.00000011001 -Infinity -> -1.00000012 2567db96d56Sopenharmony_cinextt453 nexttoward -1.00000011002 -Infinity -> -1.00000012 2577db96d56Sopenharmony_cinextt454 nexttoward -1.00000011002 -Infinity -> -1.00000012 2587db96d56Sopenharmony_cinextt455 nexttoward -1.00000011052 -Infinity -> -1.00000012 2597db96d56Sopenharmony_cinextt456 nexttoward -1.00000011552 -Infinity -> -1.00000012 2607db96d56Sopenharmony_ci-- ultra-tiny inputs 2617db96d56Sopenharmony_cinextt460 nexttoward 1E-99999 -Infinity -> 0E-391 Underflow Subnormal Inexact Rounded Clamped 2627db96d56Sopenharmony_cinextt461 nexttoward 1E-999999999 -Infinity -> 0E-391 Underflow Subnormal Inexact Rounded Clamped 2637db96d56Sopenharmony_cinextt462 nexttoward 1E-391 -Infinity -> 0E-391 Underflow Subnormal Inexact Rounded Clamped 2647db96d56Sopenharmony_cinextt463 nexttoward -1E-99999 -Infinity -> -1E-391 Underflow Subnormal Inexact Rounded 2657db96d56Sopenharmony_cinextt464 nexttoward -1E-999999999 -Infinity -> -1E-391 Underflow Subnormal Inexact Rounded 2667db96d56Sopenharmony_cinextt465 nexttoward -1E-391 -Infinity -> -2E-391 Underflow Subnormal Inexact Rounded 2677db96d56Sopenharmony_ci 2687db96d56Sopenharmony_ci-- Zeros 2697db96d56Sopenharmony_cinextt500 nexttoward -0 -Infinity -> -1E-391 Underflow Subnormal Inexact Rounded 2707db96d56Sopenharmony_cinextt501 nexttoward 0 -Infinity -> -1E-391 Underflow Subnormal Inexact Rounded 2717db96d56Sopenharmony_cinextt502 nexttoward 0.00 -Infinity -> -1E-391 Underflow Subnormal Inexact Rounded 2727db96d56Sopenharmony_cinextt503 nexttoward -0.00 -Infinity -> -1E-391 Underflow Subnormal Inexact Rounded 2737db96d56Sopenharmony_cinextt504 nexttoward 0E-300 -Infinity -> -1E-391 Underflow Subnormal Inexact Rounded 2747db96d56Sopenharmony_cinextt505 nexttoward 0E+300 -Infinity -> -1E-391 Underflow Subnormal Inexact Rounded 2757db96d56Sopenharmony_cinextt506 nexttoward 0E+30000 -Infinity -> -1E-391 Underflow Subnormal Inexact Rounded 2767db96d56Sopenharmony_cinextt507 nexttoward -0E+30000 -Infinity -> -1E-391 Underflow Subnormal Inexact Rounded 2777db96d56Sopenharmony_cinextt508 nexttoward 0.00 -0.0000 -> -0.00 2787db96d56Sopenharmony_ci 2797db96d56Sopenharmony_ci-- specials 2807db96d56Sopenharmony_cinextt550 nexttoward Inf -Infinity -> 9.99999999E+384 2817db96d56Sopenharmony_cinextt551 nexttoward -Inf -Infinity -> -Infinity 2827db96d56Sopenharmony_cinextt552 nexttoward NaN -Infinity -> NaN 2837db96d56Sopenharmony_cinextt553 nexttoward sNaN -Infinity -> NaN Invalid_operation 2847db96d56Sopenharmony_cinextt554 nexttoward NaN77 -Infinity -> NaN77 2857db96d56Sopenharmony_cinextt555 nexttoward sNaN88 -Infinity -> NaN88 Invalid_operation 2867db96d56Sopenharmony_cinextt556 nexttoward -NaN -Infinity -> -NaN 2877db96d56Sopenharmony_cinextt557 nexttoward -sNaN -Infinity -> -NaN Invalid_operation 2887db96d56Sopenharmony_cinextt558 nexttoward -NaN77 -Infinity -> -NaN77 2897db96d56Sopenharmony_cinextt559 nexttoward -sNaN88 -Infinity -> -NaN88 Invalid_operation 2907db96d56Sopenharmony_ci 2917db96d56Sopenharmony_ci-- Nmax, Nmin, Ntiny, subnormals 2927db96d56Sopenharmony_cimaxExponent: 999 2937db96d56Sopenharmony_ciminexponent: -999 2947db96d56Sopenharmony_cinextt570 nexttoward 9.99999999E+999 -Infinity -> 9.99999998E+999 2957db96d56Sopenharmony_cinextt571 nexttoward 9.99999998E+999 -Infinity -> 9.99999997E+999 2967db96d56Sopenharmony_cinextt572 nexttoward 1E-999 -Infinity -> 9.9999999E-1000 Underflow Subnormal Inexact Rounded 2977db96d56Sopenharmony_cinextt573 nexttoward 1.00000000E-999 -Infinity -> 9.9999999E-1000 Underflow Subnormal Inexact Rounded 2987db96d56Sopenharmony_cinextt574 nexttoward 9E-1007 -Infinity -> 8E-1007 Underflow Subnormal Inexact Rounded 2997db96d56Sopenharmony_cinextt575 nexttoward 9.9E-1006 -Infinity -> 9.8E-1006 Underflow Subnormal Inexact Rounded 3007db96d56Sopenharmony_cinextt576 nexttoward 9.9999E-1003 -Infinity -> 9.9998E-1003 Underflow Subnormal Inexact Rounded 3017db96d56Sopenharmony_cinextt577 nexttoward 9.9999999E-1000 -Infinity -> 9.9999998E-1000 Underflow Subnormal Inexact Rounded 3027db96d56Sopenharmony_cinextt578 nexttoward 9.9999998E-1000 -Infinity -> 9.9999997E-1000 Underflow Subnormal Inexact Rounded 3037db96d56Sopenharmony_cinextt579 nexttoward 9.9999997E-1000 -Infinity -> 9.9999996E-1000 Underflow Subnormal Inexact Rounded 3047db96d56Sopenharmony_cinextt580 nexttoward 0E-1007 -Infinity -> -1E-1007 Underflow Subnormal Inexact Rounded 3057db96d56Sopenharmony_cinextt581 nexttoward 1E-1007 -Infinity -> 0E-1007 Underflow Subnormal Inexact Rounded Clamped 3067db96d56Sopenharmony_cinextt582 nexttoward 2E-1007 -Infinity -> 1E-1007 Underflow Subnormal Inexact Rounded 3077db96d56Sopenharmony_ci 3087db96d56Sopenharmony_cinextt583 nexttoward -0E-1007 -Infinity -> -1E-1007 Underflow Subnormal Inexact Rounded 3097db96d56Sopenharmony_cinextt584 nexttoward -1E-1007 -Infinity -> -2E-1007 Underflow Subnormal Inexact Rounded 3107db96d56Sopenharmony_cinextt585 nexttoward -2E-1007 -Infinity -> -3E-1007 Underflow Subnormal Inexact Rounded 3117db96d56Sopenharmony_cinextt586 nexttoward -10E-1007 -Infinity -> -1.1E-1006 Underflow Subnormal Inexact Rounded 3127db96d56Sopenharmony_cinextt587 nexttoward -100E-1007 -Infinity -> -1.01E-1005 Underflow Subnormal Inexact Rounded 3137db96d56Sopenharmony_cinextt588 nexttoward -100000E-1007 -Infinity -> -1.00001E-1002 Underflow Subnormal Inexact Rounded 3147db96d56Sopenharmony_cinextt589 nexttoward -1.0000E-999 -Infinity -> -1.00000001E-999 3157db96d56Sopenharmony_cinextt590 nexttoward -1.00000000E-999 -Infinity -> -1.00000001E-999 3167db96d56Sopenharmony_cinextt591 nexttoward -1E-999 -Infinity -> -1.00000001E-999 3177db96d56Sopenharmony_cinextt592 nexttoward -9.99999998E+999 -Infinity -> -9.99999999E+999 3187db96d56Sopenharmony_cinextt593 nexttoward -9.99999999E+999 -Infinity -> -Infinity Overflow Inexact Rounded 3197db96d56Sopenharmony_ci 3207db96d56Sopenharmony_ci 3217db96d56Sopenharmony_ci 3227db96d56Sopenharmony_ci 3237db96d56Sopenharmony_ci------- Specials 3247db96d56Sopenharmony_cimaxExponent: 384 3257db96d56Sopenharmony_ciminexponent: -383 3267db96d56Sopenharmony_cinextt780 nexttoward -Inf -Inf -> -Infinity 3277db96d56Sopenharmony_cinextt781 nexttoward -Inf -1000 -> -9.99999999E+384 3287db96d56Sopenharmony_cinextt782 nexttoward -Inf -1 -> -9.99999999E+384 3297db96d56Sopenharmony_cinextt783 nexttoward -Inf -0 -> -9.99999999E+384 3307db96d56Sopenharmony_cinextt784 nexttoward -Inf 0 -> -9.99999999E+384 3317db96d56Sopenharmony_cinextt785 nexttoward -Inf 1 -> -9.99999999E+384 3327db96d56Sopenharmony_cinextt786 nexttoward -Inf 1000 -> -9.99999999E+384 3337db96d56Sopenharmony_cinextt787 nexttoward -1000 -Inf -> -1000.00001 3347db96d56Sopenharmony_cinextt788 nexttoward -Inf -Inf -> -Infinity 3357db96d56Sopenharmony_cinextt789 nexttoward -1 -Inf -> -1.00000001 3367db96d56Sopenharmony_cinextt790 nexttoward -0 -Inf -> -1E-391 Underflow Subnormal Inexact Rounded 3377db96d56Sopenharmony_cinextt791 nexttoward 0 -Inf -> -1E-391 Underflow Subnormal Inexact Rounded 3387db96d56Sopenharmony_cinextt792 nexttoward 1 -Inf -> 0.999999999 3397db96d56Sopenharmony_cinextt793 nexttoward 1000 -Inf -> 999.999999 3407db96d56Sopenharmony_cinextt794 nexttoward Inf -Inf -> 9.99999999E+384 3417db96d56Sopenharmony_ci 3427db96d56Sopenharmony_cinextt800 nexttoward Inf -Inf -> 9.99999999E+384 3437db96d56Sopenharmony_cinextt801 nexttoward Inf -1000 -> 9.99999999E+384 3447db96d56Sopenharmony_cinextt802 nexttoward Inf -1 -> 9.99999999E+384 3457db96d56Sopenharmony_cinextt803 nexttoward Inf -0 -> 9.99999999E+384 3467db96d56Sopenharmony_cinextt804 nexttoward Inf 0 -> 9.99999999E+384 3477db96d56Sopenharmony_cinextt805 nexttoward Inf 1 -> 9.99999999E+384 3487db96d56Sopenharmony_cinextt806 nexttoward Inf 1000 -> 9.99999999E+384 3497db96d56Sopenharmony_cinextt807 nexttoward Inf Inf -> Infinity 3507db96d56Sopenharmony_cinextt808 nexttoward -1000 Inf -> -999.999999 3517db96d56Sopenharmony_cinextt809 nexttoward -Inf Inf -> -9.99999999E+384 3527db96d56Sopenharmony_cinextt810 nexttoward -1 Inf -> -0.999999999 3537db96d56Sopenharmony_cinextt811 nexttoward -0 Inf -> 1E-391 Underflow Subnormal Inexact Rounded 3547db96d56Sopenharmony_cinextt812 nexttoward 0 Inf -> 1E-391 Underflow Subnormal Inexact Rounded 3557db96d56Sopenharmony_cinextt813 nexttoward 1 Inf -> 1.00000001 3567db96d56Sopenharmony_cinextt814 nexttoward 1000 Inf -> 1000.00001 3577db96d56Sopenharmony_cinextt815 nexttoward Inf Inf -> Infinity 3587db96d56Sopenharmony_ci 3597db96d56Sopenharmony_cinextt821 nexttoward NaN -Inf -> NaN 3607db96d56Sopenharmony_cinextt822 nexttoward NaN -1000 -> NaN 3617db96d56Sopenharmony_cinextt823 nexttoward NaN -1 -> NaN 3627db96d56Sopenharmony_cinextt824 nexttoward NaN -0 -> NaN 3637db96d56Sopenharmony_cinextt825 nexttoward NaN 0 -> NaN 3647db96d56Sopenharmony_cinextt826 nexttoward NaN 1 -> NaN 3657db96d56Sopenharmony_cinextt827 nexttoward NaN 1000 -> NaN 3667db96d56Sopenharmony_cinextt828 nexttoward NaN Inf -> NaN 3677db96d56Sopenharmony_cinextt829 nexttoward NaN NaN -> NaN 3687db96d56Sopenharmony_cinextt830 nexttoward -Inf NaN -> NaN 3697db96d56Sopenharmony_cinextt831 nexttoward -1000 NaN -> NaN 3707db96d56Sopenharmony_cinextt832 nexttoward -1 NaN -> NaN 3717db96d56Sopenharmony_cinextt833 nexttoward -0 NaN -> NaN 3727db96d56Sopenharmony_cinextt834 nexttoward 0 NaN -> NaN 3737db96d56Sopenharmony_cinextt835 nexttoward 1 NaN -> NaN 3747db96d56Sopenharmony_cinextt836 nexttoward 1000 NaN -> NaN 3757db96d56Sopenharmony_cinextt837 nexttoward Inf NaN -> NaN 3767db96d56Sopenharmony_ci 3777db96d56Sopenharmony_cinextt841 nexttoward sNaN -Inf -> NaN Invalid_operation 3787db96d56Sopenharmony_cinextt842 nexttoward sNaN -1000 -> NaN Invalid_operation 3797db96d56Sopenharmony_cinextt843 nexttoward sNaN -1 -> NaN Invalid_operation 3807db96d56Sopenharmony_cinextt844 nexttoward sNaN -0 -> NaN Invalid_operation 3817db96d56Sopenharmony_cinextt845 nexttoward sNaN 0 -> NaN Invalid_operation 3827db96d56Sopenharmony_cinextt846 nexttoward sNaN 1 -> NaN Invalid_operation 3837db96d56Sopenharmony_cinextt847 nexttoward sNaN 1000 -> NaN Invalid_operation 3847db96d56Sopenharmony_cinextt848 nexttoward sNaN NaN -> NaN Invalid_operation 3857db96d56Sopenharmony_cinextt849 nexttoward sNaN sNaN -> NaN Invalid_operation 3867db96d56Sopenharmony_cinextt850 nexttoward NaN sNaN -> NaN Invalid_operation 3877db96d56Sopenharmony_cinextt851 nexttoward -Inf sNaN -> NaN Invalid_operation 3887db96d56Sopenharmony_cinextt852 nexttoward -1000 sNaN -> NaN Invalid_operation 3897db96d56Sopenharmony_cinextt853 nexttoward -1 sNaN -> NaN Invalid_operation 3907db96d56Sopenharmony_cinextt854 nexttoward -0 sNaN -> NaN Invalid_operation 3917db96d56Sopenharmony_cinextt855 nexttoward 0 sNaN -> NaN Invalid_operation 3927db96d56Sopenharmony_cinextt856 nexttoward 1 sNaN -> NaN Invalid_operation 3937db96d56Sopenharmony_cinextt857 nexttoward 1000 sNaN -> NaN Invalid_operation 3947db96d56Sopenharmony_cinextt858 nexttoward Inf sNaN -> NaN Invalid_operation 3957db96d56Sopenharmony_cinextt859 nexttoward NaN sNaN -> NaN Invalid_operation 3967db96d56Sopenharmony_ci 3977db96d56Sopenharmony_ci-- propagating NaNs 3987db96d56Sopenharmony_cinextt861 nexttoward NaN1 -Inf -> NaN1 3997db96d56Sopenharmony_cinextt862 nexttoward +NaN2 -1000 -> NaN2 4007db96d56Sopenharmony_cinextt863 nexttoward NaN3 1000 -> NaN3 4017db96d56Sopenharmony_cinextt864 nexttoward NaN4 Inf -> NaN4 4027db96d56Sopenharmony_cinextt865 nexttoward NaN5 +NaN6 -> NaN5 4037db96d56Sopenharmony_cinextt866 nexttoward -Inf NaN7 -> NaN7 4047db96d56Sopenharmony_cinextt867 nexttoward -1000 NaN8 -> NaN8 4057db96d56Sopenharmony_cinextt868 nexttoward 1000 NaN9 -> NaN9 4067db96d56Sopenharmony_cinextt869 nexttoward Inf +NaN10 -> NaN10 4077db96d56Sopenharmony_cinextt871 nexttoward sNaN11 -Inf -> NaN11 Invalid_operation 4087db96d56Sopenharmony_cinextt872 nexttoward sNaN12 -1000 -> NaN12 Invalid_operation 4097db96d56Sopenharmony_cinextt873 nexttoward sNaN13 1000 -> NaN13 Invalid_operation 4107db96d56Sopenharmony_cinextt874 nexttoward sNaN14 NaN17 -> NaN14 Invalid_operation 4117db96d56Sopenharmony_cinextt875 nexttoward sNaN15 sNaN18 -> NaN15 Invalid_operation 4127db96d56Sopenharmony_cinextt876 nexttoward NaN16 sNaN19 -> NaN19 Invalid_operation 4137db96d56Sopenharmony_cinextt877 nexttoward -Inf +sNaN20 -> NaN20 Invalid_operation 4147db96d56Sopenharmony_cinextt878 nexttoward -1000 sNaN21 -> NaN21 Invalid_operation 4157db96d56Sopenharmony_cinextt879 nexttoward 1000 sNaN22 -> NaN22 Invalid_operation 4167db96d56Sopenharmony_cinextt880 nexttoward Inf sNaN23 -> NaN23 Invalid_operation 4177db96d56Sopenharmony_cinextt881 nexttoward +NaN25 +sNaN24 -> NaN24 Invalid_operation 4187db96d56Sopenharmony_cinextt882 nexttoward -NaN26 NaN28 -> -NaN26 4197db96d56Sopenharmony_cinextt883 nexttoward -sNaN27 sNaN29 -> -NaN27 Invalid_operation 4207db96d56Sopenharmony_cinextt884 nexttoward 1000 -NaN30 -> -NaN30 4217db96d56Sopenharmony_cinextt885 nexttoward 1000 -sNaN31 -> -NaN31 Invalid_operation 4227db96d56Sopenharmony_ci 4237db96d56Sopenharmony_ci-- Null tests 4247db96d56Sopenharmony_cinextt900 nexttoward 1 # -> NaN Invalid_operation 4257db96d56Sopenharmony_cinextt901 nexttoward # 1 -> NaN Invalid_operation 4267db96d56Sopenharmony_ci 427