Repository URL to install this package:
------------------------------------------------------------------------ -- exp.decTest -- decimal natural exponentiation -- -- 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 -- Tests of the exponential function. Currently all testcases here -- show results which are correctly rounded (within <= 0.5 ulp). extended: 1 precision: 9 rounding: half_even maxExponent: 384 minexponent: -383 -- basics (examples in specificiation, etc.) expx001 exp -Infinity -> 0 expx002 exp -10 -> 0.0000453999298 Inexact Rounded expx003 exp -1 -> 0.367879441 Inexact Rounded expx004 exp 0 -> 1 expx005 exp -0 -> 1 expx006 exp 1 -> 2.71828183 Inexact Rounded expx007 exp 0.693147181 -> 2.00000000 Inexact Rounded expx008 exp 10 -> 22026.4658 Inexact Rounded expx009 exp +Infinity -> Infinity -- tiny edge cases precision: 7 expx011 exp 0.1 -> 1.105171 Inexact Rounded expx012 exp 0.01 -> 1.010050 Inexact Rounded expx013 exp 0.001 -> 1.001001 Inexact Rounded expx014 exp 0.0001 -> 1.000100 Inexact Rounded expx015 exp 0.00001 -> 1.000010 Inexact Rounded expx016 exp 0.000001 -> 1.000001 Inexact Rounded expx017 exp 0.0000001 -> 1.000000 Inexact Rounded expx018 exp 0.0000003 -> 1.000000 Inexact Rounded expx019 exp 0.0000004 -> 1.000000 Inexact Rounded expx020 exp 0.0000005 -> 1.000001 Inexact Rounded expx021 exp 0.0000008 -> 1.000001 Inexact Rounded expx022 exp 0.0000009 -> 1.000001 Inexact Rounded expx023 exp 0.0000010 -> 1.000001 Inexact Rounded expx024 exp 0.0000011 -> 1.000001 Inexact Rounded expx025 exp 0.00000009 -> 1.000000 Inexact Rounded expx026 exp 0.00000005 -> 1.000000 Inexact Rounded expx027 exp 0.00000004 -> 1.000000 Inexact Rounded expx028 exp 0.00000001 -> 1.000000 Inexact Rounded -- and some more zeros expx030 exp 0.00000000 -> 1 expx031 exp 0E+100 -> 1 expx032 exp 0E-100 -> 1 expx033 exp -0.00000000 -> 1 expx034 exp -0E+100 -> 1 expx035 exp -0E-100 -> 1 -- basic e=0, e=1, e=2, e=4, e>=8 cases precision: 7 expx041 exp 1 -> 2.718282 Inexact Rounded expx042 exp -1 -> 0.3678794 Inexact Rounded expx043 exp 10 -> 22026.47 Inexact Rounded expx044 exp -10 -> 0.00004539993 Inexact Rounded expx045 exp 100 -> 2.688117E+43 Inexact Rounded expx046 exp -100 -> 3.720076E-44 Inexact Rounded expx047 exp 1000 -> Infinity Overflow Inexact Rounded expx048 exp -1000 -> 0E-389 Underflow Inexact Rounded Clamped Subnormal expx049 exp 100000000 -> Infinity Overflow Inexact Rounded expx050 exp -100000000 -> 0E-389 Underflow Inexact Rounded Clamped Subnormal -- miscellanea -- similar to 'VF bug' test, at 17, but with last digit corrected for decimal precision: 16 expx055 exp -5.42410311287441459172E+2 -> 2.717658486884572E-236 Inexact Rounded -- result from NetRexx/Java prototype -> 2.7176584868845721117677929628617246054459644711108E-236 -- result from Rexx (series) version -> 2.717658486884572111767792962861724605446E-236 precision: 17 expx056 exp -5.42410311287441459172E+2 -> 2.7176584868845721E-236 Inexact Rounded precision: 18 expx057 exp -5.42410311287441459172E+2 -> 2.71765848688457211E-236 Inexact Rounded precision: 19 expx058 exp -5.42410311287441459172E+2 -> 2.717658486884572112E-236 Inexact Rounded precision: 20 expx059 exp -5.42410311287441459172E+2 -> 2.7176584868845721118E-236 Inexact Rounded -- rounding in areas of ..500.., ..499.., ..100.., ..999.. sequences precision: 50 expx101 exp -9E-8 -> 0.99999991000000404999987850000273374995079250073811 Inexact Rounded precision: 31 expx102 exp -9E-8 -> 0.9999999100000040499998785000027 Inexact Rounded precision: 30 expx103 exp -9E-8 -> 0.999999910000004049999878500003 Inexact Rounded precision: 29 expx104 exp -9E-8 -> 0.99999991000000404999987850000 Inexact Rounded precision: 28 expx105 exp -9E-8 -> 0.9999999100000040499998785000 Inexact Rounded precision: 27 expx106 exp -9E-8 -> 0.999999910000004049999878500 Inexact Rounded precision: 26 expx107 exp -9E-8 -> 0.99999991000000404999987850 Inexact Rounded precision: 25 expx108 exp -9E-8 -> 0.9999999100000040499998785 Inexact Rounded precision: 24 expx109 exp -9E-8 -> 0.999999910000004049999879 Inexact Rounded precision: 23 expx110 exp -9E-8 -> 0.99999991000000404999988 Inexact Rounded precision: 22 expx111 exp -9E-8 -> 0.9999999100000040499999 Inexact Rounded precision: 21 expx112 exp -9E-8 -> 0.999999910000004050000 Inexact Rounded precision: 20 expx113 exp -9E-8 -> 0.99999991000000405000 Inexact Rounded precision: 19 expx114 exp -9E-8 -> 0.9999999100000040500 Inexact Rounded precision: 18 expx115 exp -9E-8 -> 0.999999910000004050 Inexact Rounded precision: 17 expx116 exp -9E-8 -> 0.99999991000000405 Inexact Rounded precision: 16 expx117 exp -9E-8 -> 0.9999999100000040 Inexact Rounded precision: 15 expx118 exp -9E-8 -> 0.999999910000004 Inexact Rounded precision: 14 expx119 exp -9E-8 -> 0.99999991000000 Inexact Rounded precision: 13 expx120 exp -9E-8 -> 0.9999999100000 Inexact Rounded precision: 12 expx121 exp -9E-8 -> 0.999999910000 Inexact Rounded precision: 11 expx122 exp -9E-8 -> 0.99999991000 Inexact Rounded precision: 10 expx123 exp -9E-8 -> 0.9999999100 Inexact Rounded precision: 9 expx124 exp -9E-8 -> 0.999999910 Inexact Rounded precision: 8 expx125 exp -9E-8 -> 0.99999991 Inexact Rounded precision: 7 expx126 exp -9E-8 -> 0.9999999 Inexact Rounded precision: 6 expx127 exp -9E-8 -> 1.00000 Inexact Rounded precision: 5 expx128 exp -9E-8 -> 1.0000 Inexact Rounded precision: 4 expx129 exp -9E-8 -> 1.000 Inexact Rounded precision: 3 expx130 exp -9E-8 -> 1.00 Inexact Rounded precision: 2 expx131 exp -9E-8 -> 1.0 Inexact Rounded precision: 1 expx132 exp -9E-8 -> 1 Inexact Rounded -- sanity checks, with iteration counts [normalized so 0<=|x|<1] precision: 50 expx210 exp 0 -> 1 -- iterations: 2 expx211 exp -1E-40 -> 0.99999999999999999999999999999999999999990000000000 Inexact Rounded -- iterations: 8 expx212 exp -9E-7 -> 0.99999910000040499987850002733749507925073811240510 Inexact Rounded -- iterations: 6 expx213 exp -9E-8 -> 0.99999991000000404999987850000273374995079250073811 Inexact Rounded -- iterations: 15 expx214 exp -0.003 -> 0.99700449550337297601206623409756091074177480489845 Inexact Rounded -- iterations: 14 expx215 exp -0.001 -> 0.99900049983337499166805535716765597470235590236008 Inexact Rounded -- iterations: 26 expx216 exp -0.1 -> 0.90483741803595957316424905944643662119470536098040 Inexact Rounded -- iterations: 39 expx217 exp -0.7 -> 0.49658530379140951470480009339752896170766716571182 Inexact Rounded -- iterations: 41 expx218 exp -0.9 -> 0.40656965974059911188345423964562598783370337617038 Inexact Rounded -- iterations: 43 expx219 exp -0.99 -> 0.37157669102204569053152411990820138691802885490501 Inexact Rounded -- iterations: 26 expx220 exp -1 -> 0.36787944117144232159552377016146086744581113103177 Inexact Rounded -- iterations: 26 expx221 exp -1.01 -> 0.36421897957152331975704629563734548959589139192482 Inexact Rounded -- iterations: 27 expx222 exp -1.1 -> 0.33287108369807955328884690643131552161247952156921 Inexact Rounded -- iterations: 28 expx223 exp -1.5 -> 0.22313016014842982893328047076401252134217162936108 Inexact Rounded -- iterations: 30 expx224 exp -2 -> 0.13533528323661269189399949497248440340763154590958 Inexact Rounded -- iterations: 36 expx225 exp -5 -> 0.0067379469990854670966360484231484242488495850273551 Inexact Rounded -- iterations: 26 expx226 exp -10 -> 0.000045399929762484851535591515560550610237918088866565 Inexact Rounded -- iterations: 28 expx227 exp -14 -> 8.3152871910356788406398514256526229460765836498457E-7 Inexact Rounded -- iterations: 29 expx228 exp -15 -> 3.0590232050182578837147949770228963937082078081856E-7 Inexact Rounded -- iterations: 30 expx233 exp 0 -> 1 -- iterations: 2 expx234 exp 1E-40 -> 1.0000000000000000000000000000000000000001000000000 Inexact Rounded -- iterations: 7 expx235 exp 9E-7 -> 1.0000009000004050001215000273375049207507381125949 Inexact Rounded -- iterations: 6 expx236 exp 9E-8 -> 1.0000000900000040500001215000027337500492075007381 Inexact Rounded -- iterations: 15 expx237 exp 0.003 -> 1.0030045045033770260129340913489002053318727195619 Inexact Rounded -- iterations: 13 expx238 exp 0.001 -> 1.0010005001667083416680557539930583115630762005807 Inexact Rounded -- iterations: 25 expx239 exp 0.1 -> 1.1051709180756476248117078264902466682245471947375 Inexact Rounded -- iterations: 38 expx240 exp 0.7 -> 2.0137527074704765216245493885830652700175423941459 Inexact Rounded -- iterations: 41 expx241 exp 0.9 -> 2.4596031111569496638001265636024706954217723064401 Inexact Rounded -- iterations: 42 expx242 exp 0.99 -> 2.6912344723492622890998794040710139721802931841030 Inexact Rounded -- iterations: 26 expx243 exp 1 -> 2.7182818284590452353602874713526624977572470937000 Inexact Rounded -- iterations: 26 expx244 exp 1.01 -> 2.7456010150169164939897763166603876240737508195960 Inexact Rounded -- iterations: 26 expx245 exp 1.1 -> 3.0041660239464331120584079535886723932826810260163 Inexact Rounded -- iterations: 28 expx246 exp 1.5 -> 4.4816890703380648226020554601192758190057498683697 Inexact Rounded -- iterations: 29 expx247 exp 2 -> 7.3890560989306502272304274605750078131803155705518 Inexact Rounded -- iterations: 36 expx248 exp 5 -> 148.41315910257660342111558004055227962348766759388 Inexact Rounded -- iterations: 26 expx249 exp 10 -> 22026.465794806716516957900645284244366353512618557 Inexact Rounded -- iterations: 28 expx250 exp 14 -> 1202604.2841647767777492367707678594494124865433761 Inexact Rounded -- iterations: 28 expx251 exp 15 -> 3269017.3724721106393018550460917213155057385438200 Inexact Rounded -- iterations: 29 -- a biggie [result verified 3 ways] precision: 250 expx260 exp 1 -> 2.718281828459045235360287471352662497757247093699959574966967627724076630353547594571382178525166427427466391932003059921817413596629043572900334295260595630738132328627943490763233829880753195251019011573834187930702154089149934884167509244761460668 Inexact Rounded -- extreme range boundaries precision: 16 maxExponent: 999999 minExponent: -999999 -- Ntiny boundary expx290 exp -2302618.022332529 -> 0E-1000014 Underflow Subnormal Inexact Rounded Clamped expx291 exp -2302618.022332528 -> 1E-1000014 Underflow Subnormal Inexact Rounded -- Nmax/10 and Nmax boundary expx292 exp 2302582.790408952 -> 9.999999993100277E+999998 Inexact Rounded expx293 exp 2302582.790408953 -> 1.000000000310028E+999999 Inexact Rounded expx294 exp 2302585.092993946 -> 9.999999003159870E+999999 Inexact Rounded expx295 exp 2302585.092994036 -> 9.999999903159821E+999999 Inexact Rounded expx296 exp 2302585.092994045 -> 9.999999993159820E+999999 Inexact Rounded expx297 exp 2302585.092994046 -> Infinity Overflow Inexact Rounded -- 0<-x<<1 effects precision: 30 expx320 exp -4.9999999999999E-8 -> 0.999999950000001250000979166617 Inexact Rounded expx321 exp -5.0000000000000E-8 -> 0.999999950000001249999979166667 Inexact Rounded expx322 exp -5.0000000000001E-8 -> 0.999999950000001249998979166717 Inexact Rounded precision: 20 expx323 exp -4.9999999999999E-8 -> 0.99999995000000125000 Inexact Rounded expx324 exp -5.0000000000000E-8 -> 0.99999995000000125000 Inexact Rounded expx325 exp -5.0000000000001E-8 -> 0.99999995000000125000 Inexact Rounded precision: 14 expx326 exp -4.9999999999999E-8 -> 0.99999995000000 Inexact Rounded expx327 exp -5.0000000000000E-8 -> 0.99999995000000 Inexact Rounded expx328 exp -5.0000000000001E-8 -> 0.99999995000000 Inexact Rounded -- overprecise and 0<-x<<1 precision: 8 expx330 exp -4.9999999999999E-8 -> 0.99999995 Inexact Rounded expx331 exp -5.0000000000000E-8 -> 0.99999995 Inexact Rounded expx332 exp -5.0000000000001E-8 -> 0.99999995 Inexact Rounded precision: 7 expx333 exp -4.9999999999999E-8 -> 1.000000 Inexact Rounded expx334 exp -5.0000000000000E-8 -> 1.000000 Inexact Rounded expx335 exp -5.0000000000001E-8 -> 1.000000 Inexact Rounded precision: 3 expx336 exp -4.9999999999999E-8 -> 1.00 Inexact Rounded expx337 exp -5.0000000000000E-8 -> 1.00 Inexact Rounded expx338 exp -5.0000000000001E-8 -> 1.00 Inexact Rounded -- 0<x<<1 effects precision: 30 expx340 exp 4.9999999999999E-8 -> 1.00000005000000124999902083328 Inexact Rounded expx341 exp 5.0000000000000E-8 -> 1.00000005000000125000002083333 Inexact Rounded expx342 exp 5.0000000000001E-8 -> 1.00000005000000125000102083338 Inexact Rounded precision: 20 expx343 exp 4.9999999999999E-8 -> 1.0000000500000012500 Inexact Rounded expx344 exp 5.0000000000000E-8 -> 1.0000000500000012500 Inexact Rounded expx345 exp 5.0000000000001E-8 -> 1.0000000500000012500 Inexact Rounded precision: 14 expx346 exp 4.9999999999999E-8 -> 1.0000000500000 Inexact Rounded expx347 exp 5.0000000000000E-8 -> 1.0000000500000 Inexact Rounded expx348 exp 5.0000000000001E-8 -> 1.0000000500000 Inexact Rounded -- overprecise and 0<x<<1 precision: 8 expx350 exp 4.9999999999999E-8 -> 1.0000001 Inexact Rounded expx351 exp 5.0000000000000E-8 -> 1.0000001 Inexact Rounded expx352 exp 5.0000000000001E-8 -> 1.0000001 Inexact Rounded precision: 7 expx353 exp 4.9999999999999E-8 -> 1.000000 Inexact Rounded expx354 exp 5.0000000000000E-8 -> 1.000000 Inexact Rounded expx355 exp 5.0000000000001E-8 -> 1.000000 Inexact Rounded precision: 3 expx356 exp 4.9999999999999E-8 -> 1.00 Inexact Rounded expx357 exp 5.0000000000000E-8 -> 1.00 Inexact Rounded expx358 exp 5.0000000000001E-8 -> 1.00 Inexact Rounded -- cases near 1 -- 1 2345678901234567890 precision: 20 expx401 exp 0.99999999999996 -> 2.7182818284589365041 Inexact Rounded expx402 exp 0.99999999999997 -> 2.7182818284589636869 Inexact Rounded expx403 exp 0.99999999999998 -> 2.7182818284589908697 Inexact Rounded expx404 exp 0.99999999999999 -> 2.7182818284590180525 Inexact Rounded expx405 exp 1.0000000000000 -> 2.7182818284590452354 Inexact Rounded expx406 exp 1.0000000000001 -> 2.7182818284593170635 Inexact Rounded expx407 exp 1.0000000000002 -> 2.7182818284595888917 Inexact Rounded precision: 14 expx411 exp 0.99999999999996 -> 2.7182818284589 Inexact Rounded expx412 exp 0.99999999999997 -> 2.7182818284590 Inexact Rounded expx413 exp 0.99999999999998 -> 2.7182818284590 Inexact Rounded expx414 exp 0.99999999999999 -> 2.7182818284590 Inexact Rounded expx415 exp 1.0000000000000 -> 2.7182818284590 Inexact Rounded expx416 exp 1.0000000000001 -> 2.7182818284593 Inexact Rounded expx417 exp 1.0000000000002 -> 2.7182818284596 Inexact Rounded -- overprecise... precision: 7 expx421 exp 0.99999999999996 -> 2.718282 Inexact Rounded expx422 exp 0.99999999999997 -> 2.718282 Inexact Rounded expx423 exp 0.99999999999998 -> 2.718282 Inexact Rounded expx424 exp 0.99999999999999 -> 2.718282 Inexact Rounded expx425 exp 1.0000000000001 -> 2.718282 Inexact Rounded expx426 exp 1.0000000000002 -> 2.718282 Inexact Rounded expx427 exp 1.0000000000003 -> 2.718282 Inexact Rounded precision: 2Loading ...