ln.decTest 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611
  1. ------------------------------------------------------------------------
  2. -- ln.decTest -- decimal natural logarithm --
  3. -- Copyright (c) IBM Corporation, 2005, 2008. All rights reserved. --
  4. ------------------------------------------------------------------------
  5. -- Please see the document "General Decimal Arithmetic Testcases" --
  6. -- at http://www2.hursley.ibm.com/decimal for the description of --
  7. -- these testcases. --
  8. -- --
  9. -- These testcases are experimental ('beta' versions), and they --
  10. -- may contain errors. They are offered on an as-is basis. In --
  11. -- particular, achieving the same results as the tests here is not --
  12. -- a guarantee that an implementation complies with any Standard --
  13. -- or specification. The tests are not exhaustive. --
  14. -- --
  15. -- Please send comments, suggestions, and corrections to the author: --
  16. -- Mike Cowlishaw, IBM Fellow --
  17. -- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
  18. -- mfc@uk.ibm.com --
  19. ------------------------------------------------------------------------
  20. version: 2.59
  21. extended: 1
  22. precision: 16
  23. rounding: half_even
  24. maxExponent: 384
  25. minexponent: -383
  26. -- basics (examples in specification)
  27. precision: 9
  28. lnxs001 ln 0 -> -Infinity
  29. lnxs002 ln 1.000 -> 0
  30. lnxs003 ln 2.71828183 -> 1.00000000 Inexact Rounded
  31. lnxs004 ln 10 -> 2.30258509 Inexact Rounded
  32. lnxs005 ln +Infinity -> Infinity
  33. -- basics
  34. precision: 16
  35. lnx0001 ln 0 -> -Infinity
  36. lnx0002 ln 1E-9 -> -20.72326583694641 Inexact Rounded
  37. lnx0003 ln 0.0007 -> -7.264430222920869 Inexact Rounded
  38. lnx0004 ln 0.1 -> -2.302585092994046 Inexact Rounded
  39. lnx0005 ln 0.7 -> -0.3566749439387324 Inexact Rounded
  40. lnx0006 ln 1 -> 0
  41. lnx0007 ln 1.000 -> 0
  42. lnx0008 ln 1.5 -> 0.4054651081081644 Inexact Rounded
  43. lnx0009 ln 2 -> 0.6931471805599453 Inexact Rounded
  44. lnx0010 ln 2.718281828459045 -> 0.9999999999999999 Inexact Rounded
  45. lnx0011 ln 2.718281828459046 -> 1.000000000000000 Inexact Rounded
  46. lnx0012 ln 2.718281828459047 -> 1.000000000000001 Inexact Rounded
  47. lnx0013 ln 10 -> 2.302585092994046 Inexact Rounded
  48. lnx0014 ln 10.5 -> 2.351375257163478 Inexact Rounded
  49. lnx0015 ln 9999 -> 9.210240366975849 Inexact Rounded
  50. lnx0016 ln 1E6 -> 13.81551055796427 Inexact Rounded
  51. lnx0017 ln 1E+9 -> 20.72326583694641 Inexact Rounded
  52. lnx0018 ln +Infinity -> Infinity
  53. -- notable cases
  54. -- negatives
  55. lnx0021 ln -1E-9 -> NaN Invalid_operation
  56. lnx0022 ln -0.0007 -> NaN Invalid_operation
  57. lnx0023 ln -0.1 -> NaN Invalid_operation
  58. lnx0024 ln -0.7 -> NaN Invalid_operation
  59. lnx0025 ln -1 -> NaN Invalid_operation
  60. lnx0026 ln -1.5 -> NaN Invalid_operation
  61. lnx0027 ln -2 -> NaN Invalid_operation
  62. lnx0029 ln -10.5 -> NaN Invalid_operation
  63. lnx0028 ln -9999 -> NaN Invalid_operation
  64. lnx0030 ln -2.718281828459045 -> NaN Invalid_operation
  65. lnx0031 ln -2.718281828459046 -> NaN Invalid_operation
  66. lnx0032 ln -0 -> -Infinity
  67. lnx0033 ln -0E+17 -> -Infinity
  68. lnx0034 ln -0E-17 -> -Infinity
  69. -- other zeros
  70. lnx0041 ln 0 -> -Infinity
  71. lnx0042 ln 0E+17 -> -Infinity
  72. lnx0043 ln 0E-17 -> -Infinity
  73. -- infinities
  74. lnx0045 ln -Infinity -> NaN Invalid_operation
  75. lnx0046 ln +Infinity -> Infinity
  76. -- ones
  77. lnx0050 ln 1 -> 0
  78. lnx0051 ln 1.0 -> 0
  79. lnx0052 ln 1.000000000000000 -> 0
  80. lnx0053 ln 1.000000000000000000 -> 0
  81. -- lower precision basics
  82. Precision: 7
  83. lnx0101 ln 0 -> -Infinity
  84. lnx0102 ln 1E-9 -> -20.72327 Inexact Rounded
  85. lnx0103 ln 0.0007 -> -7.264430 Inexact Rounded
  86. lnx0104 ln 0.1 -> -2.302585 Inexact Rounded
  87. lnx0105 ln 0.7 -> -0.3566749 Inexact Rounded
  88. lnx0106 ln 1 -> 0
  89. lnx0107 ln 1.5 -> 0.4054651 Inexact Rounded
  90. lnx0108 ln 2 -> 0.6931472 Inexact Rounded
  91. lnx0109 ln 2.718281828459045 -> 1.000000 Inexact Rounded
  92. lnx0110 ln 2.718281828459046 -> 1.000000 Inexact Rounded
  93. lnx0111 ln 2.718281828459047 -> 1.000000 Inexact Rounded
  94. lnx0112 ln 10 -> 2.302585 Inexact Rounded
  95. lnx0113 ln 10.5 -> 2.351375 Inexact Rounded
  96. lnx0114 ln 9999 -> 9.210240 Inexact Rounded
  97. lnx0115 ln 1E6 -> 13.81551 Inexact Rounded
  98. lnx0116 ln 1E+9 -> 20.72327 Inexact Rounded
  99. lnx0117 ln +Infinity -> Infinity
  100. Precision: 2
  101. lnx0121 ln 0 -> -Infinity
  102. lnx0122 ln 1E-9 -> -21 Inexact Rounded
  103. lnx0123 ln 0.0007 -> -7.3 Inexact Rounded
  104. lnx0124 ln 0.1 -> -2.3 Inexact Rounded
  105. lnx0125 ln 0.7 -> -0.36 Inexact Rounded
  106. lnx0126 ln 1 -> 0
  107. lnx0127 ln 1.5 -> 0.41 Inexact Rounded
  108. lnx0128 ln 2 -> 0.69 Inexact Rounded
  109. lnx0129 ln 2.718281828459045 -> 1.0 Inexact Rounded
  110. lnx0130 ln 2.718281828459046 -> 1.0 Inexact Rounded
  111. lnx0131 ln 2.718281828459047 -> 1.0 Inexact Rounded
  112. lnx0132 ln 10 -> 2.3 Inexact Rounded
  113. lnx0133 ln 10.5 -> 2.4 Inexact Rounded
  114. lnx0134 ln 9999 -> 9.2 Inexact Rounded
  115. lnx0135 ln 1E6 -> 14 Inexact Rounded
  116. lnx0136 ln 1E+9 -> 21 Inexact Rounded
  117. lnx0137 ln +Infinity -> Infinity
  118. Precision: 1
  119. lnx0141 ln 0 -> -Infinity
  120. lnx0142 ln 1E-9 -> -2E+1 Inexact Rounded
  121. lnx0143 ln 0.0007 -> -7 Inexact Rounded
  122. lnx0144 ln 0.1 -> -2 Inexact Rounded
  123. lnx0145 ln 0.7 -> -0.4 Inexact Rounded
  124. lnx0146 ln 1 -> 0
  125. lnx0147 ln 1.5 -> 0.4 Inexact Rounded
  126. lnx0148 ln 2 -> 0.7 Inexact Rounded
  127. lnx0149 ln 2.718281828459045 -> 1 Inexact Rounded
  128. lnx0150 ln 2.718281828459046 -> 1 Inexact Rounded
  129. lnx0151 ln 2.718281828459047 -> 1 Inexact Rounded
  130. lnx0152 ln 10 -> 2 Inexact Rounded
  131. lnx0153 ln 10.5 -> 2 Inexact Rounded
  132. lnx0154 ln 9999 -> 9 Inexact Rounded
  133. lnx0155 ln 1E6 -> 1E+1 Inexact Rounded
  134. lnx0156 ln 1E+9 -> 2E+1 Inexact Rounded
  135. lnx0157 ln +Infinity -> Infinity
  136. -- group low-precision ln(1)s:
  137. precision: 1
  138. lnx0161 ln 1 -> 0
  139. precision: 2
  140. lnx0162 ln 1 -> 0
  141. precision: 3
  142. lnx0163 ln 1 -> 0
  143. precision: 4
  144. lnx0164 ln 1 -> 0
  145. precision: 5
  146. lnx0165 ln 1 -> 0
  147. precision: 6
  148. lnx0166 ln 1 -> 0
  149. precision: 7
  150. lnx0167 ln 1 -> 0
  151. precision: 8
  152. lnx0168 ln 1 -> 0
  153. -- edge-test ln(2) and ln(10) in case of lookasides
  154. precision: 45
  155. lnx201 ln 2 -> 0.693147180559945309417232121458176568075500134 Inexact Rounded
  156. lnx202 ln 10 -> 2.30258509299404568401799145468436420760110149 Inexact Rounded
  157. precision: 44
  158. lnx203 ln 2 -> 0.69314718055994530941723212145817656807550013 Inexact Rounded
  159. lnx204 ln 10 -> 2.3025850929940456840179914546843642076011015 Inexact Rounded
  160. precision: 43
  161. lnx205 ln 2 -> 0.6931471805599453094172321214581765680755001 Inexact Rounded
  162. lnx206 ln 10 -> 2.302585092994045684017991454684364207601101 Inexact Rounded
  163. precision: 42
  164. lnx207 ln 2 -> 0.693147180559945309417232121458176568075500 Inexact Rounded
  165. lnx208 ln 10 -> 2.30258509299404568401799145468436420760110 Inexact Rounded
  166. precision: 41
  167. lnx209 ln 2 -> 0.69314718055994530941723212145817656807550 Inexact Rounded
  168. lnx210 ln 10 -> 2.3025850929940456840179914546843642076011 Inexact Rounded
  169. precision: 40
  170. lnx211 ln 2 -> 0.6931471805599453094172321214581765680755 Inexact Rounded
  171. lnx212 ln 10 -> 2.302585092994045684017991454684364207601 Inexact Rounded
  172. precision: 39
  173. lnx213 ln 2 -> 0.693147180559945309417232121458176568076 Inexact Rounded
  174. lnx214 ln 10 -> 2.30258509299404568401799145468436420760 Inexact Rounded
  175. precision: 38
  176. lnx215 ln 2 -> 0.69314718055994530941723212145817656808 Inexact Rounded
  177. lnx216 ln 10 -> 2.3025850929940456840179914546843642076 Inexact Rounded
  178. precision: 37
  179. lnx217 ln 2 -> 0.6931471805599453094172321214581765681 Inexact Rounded
  180. lnx218 ln 10 -> 2.302585092994045684017991454684364208 Inexact Rounded
  181. precision: 36
  182. lnx219 ln 2 -> 0.693147180559945309417232121458176568 Inexact Rounded
  183. lnx220 ln 10 -> 2.30258509299404568401799145468436421 Inexact Rounded
  184. precision: 35
  185. lnx221 ln 2 -> 0.69314718055994530941723212145817657 Inexact Rounded
  186. lnx222 ln 10 -> 2.3025850929940456840179914546843642 Inexact Rounded
  187. precision: 34
  188. lnx223 ln 2 -> 0.6931471805599453094172321214581766 Inexact Rounded
  189. lnx224 ln 10 -> 2.302585092994045684017991454684364 Inexact Rounded
  190. precision: 33
  191. lnx225 ln 2 -> 0.693147180559945309417232121458177 Inexact Rounded
  192. lnx226 ln 10 -> 2.30258509299404568401799145468436 Inexact Rounded
  193. precision: 32
  194. lnx227 ln 2 -> 0.69314718055994530941723212145818 Inexact Rounded
  195. lnx228 ln 10 -> 2.3025850929940456840179914546844 Inexact Rounded
  196. precision: 31
  197. lnx229 ln 2 -> 0.6931471805599453094172321214582 Inexact Rounded
  198. lnx230 ln 10 -> 2.302585092994045684017991454684 Inexact Rounded
  199. precision: 30
  200. lnx231 ln 2 -> 0.693147180559945309417232121458 Inexact Rounded
  201. lnx232 ln 10 -> 2.30258509299404568401799145468 Inexact Rounded
  202. -- extreme input range values
  203. maxExponent: 384
  204. minExponent: -383
  205. Precision: 16
  206. lnx0901 ln 1e-400 -> -921.0340371976183 Inexact Rounded
  207. lnx0902 ln 1e+400 -> 921.0340371976183 Inexact Rounded
  208. lnx0903 ln 1e-999999 -> -2302582.790408953 Inexact Rounded
  209. lnx0904 ln 1e+999999 -> 2302582.790408953 Inexact Rounded
  210. lnx0905 ln 1e-1000013 -> -2302615.026600255 Inexact Rounded
  211. lnx0906 ln 2e-1000013 -> -2302614.333453074 Inexact Rounded
  212. lnx0910 ln 9.999999e+999999 -> 2302585.092993946 Inexact Rounded
  213. lnx0911 ln 9.9999999e+999999 -> 2302585.092994036 Inexact Rounded
  214. lnx0912 ln 9.99999999e+999999 -> 2302585.092994045 Inexact Rounded
  215. lnx0913 ln 9.999999999e+999999 -> 2302585.092994046 Inexact Rounded
  216. lnx0914 ln 9.999999999999e+999999 -> 2302585.092994046 Inexact Rounded
  217. lnx0915 ln 9.999999999999999e+999999 -> 2302585.092994046 Inexact Rounded
  218. lnx0916 ln 9.999999999999999999999999e+999999 -> 2302585.092994046 Inexact Rounded
  219. -- randoms
  220. -- P=50, within 0-999
  221. Precision: 50
  222. maxExponent: 384
  223. minExponent: -383
  224. lnx1501 ln 0.00098800906574486388604608477869812518857023768951 -> -6.9198186844033787995945147836955586009548513043689 Inexact Rounded
  225. lnx1502 ln 158.15866624664623070184595045304145949900714987827 -> 5.0635987458895647454907806507503825602758392287684 Inexact Rounded
  226. lnx1503 ln 0.00565661412059571925040285814021799775249288309321 -> -5.1749297776760632102047540300491550931651318975237 Inexact Rounded
  227. lnx1504 ln 0.00000006914232532620489602008402091666547903180607 -> -16.487098770877825308138976818688771638172333034347 Inexact Rounded
  228. lnx1505 ln 0.00025380374621297657504661540749355251231770070723 -> -8.2789492423005003205242162741569033124260321954589 Inexact Rounded
  229. lnx1506 ln 83.033654063877426261108592599182418953442677554806 -> 4.4192459962647137976949249810815698465031609843669 Inexact Rounded
  230. lnx1507 ln 0.00000000416863228092481651627734668440663678118729 -> -19.295677845122141772791294599714950175284915666430 Inexact Rounded
  231. lnx1508 ln 0.00000140847873187820570181214271960511080523457669 -> -13.473000349581967189668305314384952251556809480339 Inexact Rounded
  232. lnx1509 ln 66.176106555181527101630351127583944689752069132522 -> 4.1923194696232505883666171116966137694013431504252 Inexact Rounded
  233. lnx1510 ln 0.00000000000009899043487403590900111602024562297908 -> -29.943753166877840985821508112917991506656545174163 Inexact Rounded
  234. lnx1511 ln 0.00000000000324618296721747097510453388683912733569 -> -26.453541281444586819009546418577507163362590139422 Inexact Rounded
  235. lnx1512 ln 72.646968818463546449499147579023555008392860423385 -> 4.2856116660689646882852128853423566276718230426479 Inexact Rounded
  236. lnx1513 ln 0.00000000000000066755483124635612574263153825990523 -> -34.942910142802769319262875080398852491588707172483 Inexact Rounded
  237. lnx1514 ln 61.002910447202398204114909451851111424657671911002 -> 4.1109215752843377323363182051446177066434038096529 Inexact Rounded
  238. lnx1515 ln 917.06917611331980999227893584010544542312239174774 -> 6.8211829068303114128752453661946446979787826282907 Inexact Rounded
  239. lnx1516 ln 0.00000000170823794883673083358549749078972003965194 -> -20.187803436976150477297246666771626827057191023004 Inexact Rounded
  240. lnx1517 ln 0.53731767845358224445809761315159249898566542910649 -> -0.62116577939968409211736413628236285160048357000961 Inexact Rounded
  241. lnx1518 ln 0.00000000000000008965291392882804161299758708033373 -> -36.950585970980857376081265073276303670820056916206 Inexact Rounded
  242. lnx1519 ln 0.00000000006990244916026429904498278982530170295668 -> -23.383920429244457578373523508427783144589480420753 Inexact Rounded
  243. lnx1520 ln 4.0312542977070300070506064666536478373801988540614 -> 1.3940775676592451945795752796421391871302024763305 Inexact Rounded
  244. lnx1521 ln 271.84991311551875601432518819562391699324632396423 -> 5.6052501239873862517916679747146539808077431873478 Inexact Rounded
  245. lnx1522 ln 7.4118671629373864667229445746862314443895404818689 -> 2.0030823863706344628239147639318289961917060121141 Inexact Rounded
  246. lnx1523 ln 0.00000000000002026311452625364905357321664186034258 -> -31.529974180054438792043856877314043794320951134754 Inexact Rounded
  247. lnx1524 ln 0.00000000000009563398651261756952398250624737809347 -> -29.978248130576972953141284136962670021368834792579 Inexact Rounded
  248. lnx1525 ln 0.00000000009556772669409858653026558223465197808991 -> -23.071185939748285541228206161472956661196956741186 Inexact Rounded
  249. lnx1526 ln 6.8441648298027301292342057248737326152250794026761 -> 1.9233964395801946597272589473417948024361005082908 Inexact Rounded
  250. lnx1527 ln 0.00000000000073059699884439979394945822035704264577 -> -27.944914388353724718836101828677771967128509603158 Inexact Rounded
  251. lnx1528 ln 0.00000000000000002610078280419082263138064745416787 -> -38.184566367516207885573773320135965798717120735115 Inexact Rounded
  252. lnx1529 ln 0.00000000000000000150259517166294243088546806083283 -> -41.039337946266676108538170837580051699618334928421 Inexact Rounded
  253. lnx1530 ln 0.00000000000000087919160541714580707181969708502091 -> -34.667528818827671507514319744047440696187358676848 Inexact Rounded
  254. lnx1531 ln 0.00000000000395726725120787763271849577708068584598 -> -26.255467416961357741818735787226671938678424748431 Inexact Rounded
  255. lnx1532 ln 0.00000000002014334901669366218018377213150715938355 -> -24.628146955635359035289123027319969201693737159108 Inexact Rounded
  256. lnx1533 ln 0.00000008097927101101093117753938766241442896030637 -> -16.329072628469715178637178365710373398203190937454 Inexact Rounded
  257. lnx1534 ln 0.00000000000017115834162632864392039668116243984176 -> -29.396187292434898225453626794459285157263177528034 Inexact Rounded
  258. lnx1535 ln 0.39168317593866334087305459933723864294857086105035 -> -0.93730199062757240485836637306785037368746737693029 Inexact Rounded
  259. lnx1536 ln 79.335036798971515026519630103325369729637514127617 -> 4.3736798570287828823772149735170431010616961976965 Inexact Rounded
  260. lnx1537 ln 0.00000000000000056004952129926137413602116591493625 -> -35.118506463181870020730685884333000241039028127213 Inexact Rounded
  261. lnx1538 ln 0.00000006006035907843890918832481099660639553666078 -> -16.627915795747112566532705974853114454405010472043 Inexact Rounded
  262. lnx1539 ln 0.00000000085242024937414906371333826574632450587590 -> -20.882941460268101080186482230657774997273494107221 Inexact Rounded
  263. lnx1540 ln 0.00000000000043671099499262350316173246550771951561 -> -28.459504757285639221776305968469058854558726593945 Inexact Rounded
  264. -- P=34, within 0-999
  265. Precision: 34
  266. lnx1201 ln 0.0086732880815927182997566810334394 -> -4.747507311920844752486938187973721 Inexact Rounded
  267. lnx1202 ln 0.0007104103693460260609792222569854 -> -7.249667769903503023005549250347695 Inexact Rounded
  268. lnx1203 ln 786.8398945385105190697541493392742 -> 6.668024790031836340471824147010546 Inexact Rounded
  269. lnx1204 ln 0.7723073620282687656895190171967399 -> -0.2583726708506850868786816238217326 Inexact Rounded
  270. lnx1205 ln 0.0061057951517197631287183938412200 -> -5.098516933918797347064454103742635 Inexact Rounded
  271. lnx1206 ln 0.6181379708184393730103917562498745 -> -0.4810435926903365087463387760350021 Inexact Rounded
  272. lnx1207 ln 09.13888261229039989110753389096760 -> 2.212538125507975574509563027696021 Inexact Rounded
  273. lnx1208 ln 802.0105417063143696497292158147174 -> 6.687121752052341737234832203350214 Inexact Rounded
  274. lnx1209 ln 778.7749710387773713523028497333058 -> 6.657722135126935472086625031413031 Inexact Rounded
  275. lnx1210 ln 0.0024457295895346502513567679390616 -> -6.013411799940245345321348290398517 Inexact Rounded
  276. lnx1211 ln 0.0000511296947872828310338864217860 -> -9.881145118237281798081573131711636 Inexact Rounded
  277. lnx1212 ln 0.0000246803508602554924938685155658 -> -10.60950314264825661825360971430218 Inexact Rounded
  278. lnx1213 ln 9.027898199253511668242977766616082 -> 2.200319582778899029786017830557293 Inexact Rounded
  279. lnx1214 ln 0.0991812396542505631850692800904188 -> -2.310806398964672258823043180400384 Inexact Rounded
  280. lnx1215 ln 0.0000000000070238810143028811223924 -> -25.68170519961636647174714538290075 Inexact Rounded
  281. lnx1216 ln 2.630101665342826494730394729313167 -> 0.9670225014664367465128243039749559 Inexact Rounded
  282. lnx1217 ln 0.0056878928594359587691526063254683 -> -5.169415422904037819736637399445096 Inexact Rounded
  283. lnx1218 ln 567.3436047121057843908106573095590 -> 6.340965124964258486463444360787970 Inexact Rounded
  284. lnx1219 ln 1.199291248124655996614605745649725 -> 0.1817307557425911805765087755675657 Inexact Rounded
  285. lnx1220 ln 25.02050448582031098696267479135557 -> 3.219695668137659139544178905459317 Inexact Rounded
  286. lnx1221 ln 0.0000000000009939597023558756961300 -> -27.63707972996537636504396558259058 Inexact Rounded
  287. lnx1222 ln 0.0000007988551670159429716506430403 -> -14.04008617542597230988198612376415 Inexact Rounded
  288. lnx1223 ln 4.681515800176129184873770605589795 -> 1.543621946415383338972124445445748 Inexact Rounded
  289. lnx1224 ln 15.95126669161103011206658749345781 -> 2.769538242479483539275986395443539 Inexact Rounded
  290. lnx1225 ln 0.0301626783922211213675457279076066 -> -3.501149933677283341023932281826341 Inexact Rounded
  291. lnx1226 ln 000.0040544064881821770528475185674 -> -5.507950967557021671647165889608324 Inexact Rounded
  292. lnx1227 ln 29.01617095935593792095913785100360 -> 3.367853293862745651888450004473297 Inexact Rounded
  293. lnx1228 ln 78.01836167344736733024804243195323 -> 4.356944205055768575987781375003992 Inexact Rounded
  294. lnx1229 ln 0.0000000096545319316965321158634893 -> -18.45583840160965814462095477365013 Inexact Rounded
  295. lnx1230 ln 97.95475237720579752770587185074428 -> 4.584505661612812742208619358214729 Inexact Rounded
  296. lnx1231 ln 528.0609262050423246402564228432371 -> 6.269211667589138113396583894315956 Inexact Rounded
  297. lnx1232 ln 0.0000002250064349732969696660452972 -> -15.30713683526963996712167701738724 Inexact Rounded
  298. lnx1233 ln 47.97063637767998658567199049725754 -> 3.870589081585660692195989854842372 Inexact Rounded
  299. lnx1234 ln 0.0005394311344541432318853513414361 -> -7.524995428393925934087126702974121 Inexact Rounded
  300. lnx1235 ln 0.0000000090973385649567471674972633 -> -18.51528393158931783447035004125791 Inexact Rounded
  301. lnx1236 ln 0.0000000000238776490227576197317977 -> -24.45807828188389561331158879207262 Inexact Rounded
  302. lnx1237 ln 0.0000236587000231921532145326218758 -> -10.65177964499823314952429277979034 Inexact Rounded
  303. lnx1238 ln 499.1277448846130709827154556125942 -> 6.212862064761427967461188083514774 Inexact Rounded
  304. lnx1239 ln 0.0000003960192300284787663712417647 -> -14.74180306619298548093697608293284 Inexact Rounded
  305. lnx1240 ln 41.08268350829477451667228892495136 -> 3.715586706887278039173584859218960 Inexact Rounded
  306. -- P=16, within 0-99
  307. Precision: 16
  308. lnx1101 ln 7.964875261033948 -> 2.075041282352241 Inexact Rounded
  309. lnx1102 ln 13.54527396845394 -> 2.606037701870263 Inexact Rounded
  310. lnx1103 ln 0.0008026554341331 -> -7.127585034321814 Inexact Rounded
  311. lnx1104 ln 0.0000030582233261 -> -12.69767642300625 Inexact Rounded
  312. lnx1105 ln 0.0004477497509672 -> -7.711276073210766 Inexact Rounded
  313. lnx1106 ln 7.616268622474371 -> 2.030286567675148 Inexact Rounded
  314. lnx1107 ln 51.58329925806381 -> 3.943197962309569 Inexact Rounded
  315. lnx1108 ln 0.0018197497951263 -> -6.309056262549345 Inexact Rounded
  316. lnx1109 ln 2.956282457072984 -> 1.083932552334575 Inexact Rounded
  317. lnx1110 ln 0.3843325579189906 -> -0.9562470649400558 Inexact Rounded
  318. lnx1111 ln 0.0074466329265663 -> -4.899993304919237 Inexact Rounded
  319. lnx1112 ln 0.0003372478532993 -> -7.994692428206378 Inexact Rounded
  320. lnx1113 ln 0.0084792263167809 -> -4.770136069569271 Inexact Rounded
  321. lnx1114 ln 5.926756998151102 -> 1.779477182834305 Inexact Rounded
  322. lnx1115 ln 9.025699152180897 -> 2.200075969604119 Inexact Rounded
  323. lnx1116 ln 1.910124643533526 -> 0.6471684983238183 Inexact Rounded
  324. lnx1117 ln 0.8158922711411020 -> -0.2034729533939387 Inexact Rounded
  325. lnx1118 ln 0.0067080016475322 -> -5.004454189414139 Inexact Rounded
  326. lnx1119 ln 0.0047583242092716 -> -5.347859729601094 Inexact Rounded
  327. lnx1120 ln 0.0386647411641339 -> -3.252827175263113 Inexact Rounded
  328. lnx1121 ln 0.0050226427841761 -> -5.293799032774131 Inexact Rounded
  329. lnx1122 ln 6.927937541637261 -> 1.935562155866906 Inexact Rounded
  330. lnx1123 ln 0.0000095745343513 -> -11.55640365579814 Inexact Rounded
  331. lnx1124 ln 1.602465492956538 -> 0.4715433763243936 Inexact Rounded
  332. lnx1125 ln 38.98415625087535 -> 3.663155313610213 Inexact Rounded
  333. lnx1126 ln 5.343182042276734 -> 1.675821363568112 Inexact Rounded
  334. lnx1127 ln 55.89763703245816 -> 4.023522107934110 Inexact Rounded
  335. lnx1128 ln 0.7445257810280847 -> -0.2950077988101030 Inexact Rounded
  336. lnx1129 ln 1.631407314946094 -> 0.4894430257201248 Inexact Rounded
  337. lnx1130 ln 0.0005462451932602 -> -7.512442611116852 Inexact Rounded
  338. lnx1131 ln 0.0000864173269362 -> -9.356322359017317 Inexact Rounded
  339. lnx1132 ln 5.227161719132849 -> 1.653868438439637 Inexact Rounded
  340. lnx1133 ln 60.57078466941998 -> 4.103812675662452 Inexact Rounded
  341. lnx1134 ln 0.0992864325333160 -> -2.309746348350318 Inexact Rounded
  342. lnx1135 ln 09.48564268447325 -> 2.249779359074983 Inexact Rounded
  343. lnx1136 ln 0.0036106089355634 -> -5.623878840650787 Inexact Rounded
  344. lnx1137 ln 1.805176865587172 -> 0.5906585734593707 Inexact Rounded
  345. lnx1138 ln 62.59363259642255 -> 4.136663557220559 Inexact Rounded
  346. lnx1139 ln 4.373828261137201 -> 1.475638657912000 Inexact Rounded
  347. lnx1140 ln 0.994483524148738 -> -0.005531747794938690 Inexact Rounded
  348. -- P=7, within 0-9
  349. Precision: 7
  350. lnx1001 ln 0.0912025 -> -2.394673 Inexact Rounded
  351. lnx1002 ln 0.9728626 -> -0.02751242 Inexact Rounded
  352. lnx1003 ln 0.3886032 -> -0.9451965 Inexact Rounded
  353. lnx1004 ln 8.798639 -> 2.174597 Inexact Rounded
  354. lnx1005 ln 2.459121 -> 0.8998040 Inexact Rounded
  355. lnx1006 ln 2.013193 -> 0.6997220 Inexact Rounded
  356. lnx1007 ln 9.064857 -> 2.204405 Inexact Rounded
  357. lnx1008 ln 5.796417 -> 1.757240 Inexact Rounded
  358. lnx1009 ln 0.1143471 -> -2.168517 Inexact Rounded
  359. lnx1010 ln 0.5341542 -> -0.6270707 Inexact Rounded
  360. lnx1011 ln 6.693781 -> 1.901179 Inexact Rounded
  361. lnx1012 ln 0.0081779 -> -4.806320 Inexact Rounded
  362. lnx1013 ln 8.313616 -> 2.117895 Inexact Rounded
  363. lnx1014 ln 3.486925 -> 1.249020 Inexact Rounded
  364. lnx1015 ln 0.1801401 -> -1.714020 Inexact Rounded
  365. lnx1016 ln 0.5227148 -> -0.6487193 Inexact Rounded
  366. lnx1017 ln 7.818111 -> 2.056443 Inexact Rounded
  367. lnx1018 ln 0.0870671 -> -2.441076 Inexact Rounded
  368. lnx1019 ln 8.153966 -> 2.098504 Inexact Rounded
  369. lnx1020 ln 2.040975 -> 0.7134276 Inexact Rounded
  370. lnx1021 ln 1.481642 -> 0.3931509 Inexact Rounded
  371. lnx1022 ln 0.2610123 -> -1.343188 Inexact Rounded
  372. lnx1023 ln 0.466723 -> -0.7620193 Inexact Rounded
  373. lnx1024 ln 0.0518756 -> -2.958907 Inexact Rounded
  374. lnx1025 ln 2.056410 -> 0.7209617 Inexact Rounded
  375. lnx1026 ln 0.181522 -> -1.706378 Inexact Rounded
  376. lnx1027 ln 0.515551 -> -0.6625190 Inexact Rounded
  377. lnx1028 ln 8.425089 -> 2.131214 Inexact Rounded
  378. lnx1029 ln 2.077091 -> 0.7309684 Inexact Rounded
  379. lnx1030 ln 6.212705 -> 1.826596 Inexact Rounded
  380. lnx1031 ln 5.729343 -> 1.745601 Inexact Rounded
  381. lnx1032 ln 4.831251 -> 1.575105 Inexact Rounded
  382. lnx1033 ln 2.029760 -> 0.7079176 Inexact Rounded
  383. lnx1034 ln 8.615060 -> 2.153512 Inexact Rounded
  384. lnx1035 ln 0.0611511 -> -2.794407 Inexact Rounded
  385. lnx1036 ln 5.195269 -> 1.647748 Inexact Rounded
  386. lnx1037 ln 9.617686 -> 2.263604 Inexact Rounded
  387. lnx1038 ln 0.0049382 -> -5.310754 Inexact Rounded
  388. lnx1039 ln 2.786840 -> 1.024908 Inexact Rounded
  389. lnx1040 ln 0.0091073 -> -4.698679 Inexact Rounded
  390. -- from here 3-digit tests are based on reverse exp tests
  391. precision: 9
  392. rounding: half_even
  393. maxExponent: 384
  394. minexponent: -383
  395. lnx001 ln 0 -> -Infinity
  396. lnx002 ln 0.367879441 -> -1.00000000 Inexact Rounded
  397. lnx003 ln 1 -> 0
  398. lnx005 ln 2.71828183 -> 1.00000000 Inexact Rounded
  399. lnx006 ln 2.00000000 -> 0.693147181 Inexact Rounded
  400. lnx007 ln +Infinity -> Infinity
  401. -- tiny edge cases
  402. precision: 7
  403. lnx011 ln 1.105171 -> 0.1000001 Inexact Rounded
  404. lnx012 ln 1.010050 -> 0.009999835 Inexact Rounded
  405. lnx013 ln 1.000010 -> 0.000009999950 Inexact Rounded
  406. lnx014 ln 1.000001 -> 9.999995E-7 Inexact Rounded
  407. lnx015 ln 1.000000 -> 0
  408. -- basic e=0, e=1, e=2, e=4, e>=8 cases
  409. precision: 7
  410. lnx041 ln 2.718282 -> 1.000000 Inexact Rounded
  411. lnx042 ln 0.3678794 -> -1.000000 Inexact Rounded
  412. lnx043 ln 22026.47 -> 10.00000 Inexact Rounded
  413. lnx044 ln 0.00004539993 -> -10.00000 Inexact Rounded
  414. lnx045 ln 2.688117E+43 -> 100.0000 Inexact Rounded
  415. lnx046 ln 3.720076E-44 -> -100.0000 Inexact Rounded
  416. lnx047 ln Infinity -> Infinity
  417. lnx048 ln 0E-389 -> -Infinity
  418. -- miscellanea
  419. precision: 16
  420. lnx055 ln 2.717658486884572E-236 -> -542.4103112874415 Inexact Rounded
  421. precision: 17
  422. lnx056 ln 2.7176584868845721E-236 -> -542.41031128744146 Inexact Rounded
  423. precision: 18
  424. lnx057 ln 2.71765848688457211E-236 -> -542.410311287441459 Inexact Rounded
  425. precision: 19
  426. lnx058 ln 2.717658486884572112E-236 -> -542.4103112874414592 Inexact Rounded
  427. precision: 20
  428. lnx059 ln 2.7176584868845721118E-236 -> -542.41031128744145917 Inexact Rounded
  429. -- inputs ending in ..500.., ..499.., ..100.., ..999.. sequences
  430. precision: 50
  431. lnx102 ln 0.9999999100000040499998785000027 -> -9.0000000000000000000000033749953829996446124861750E-8 Inexact Rounded
  432. precision: 30
  433. lnx103 ln 0.999999910000004049999878500003 -> -8.99999999999999999999997337499E-8 Inexact Rounded
  434. precision: 29
  435. lnx104 ln 0.99999991000000404999987850000 -> -9.0000000000000000000002733750E-8 Inexact Rounded
  436. precision: 28
  437. lnx105 ln 0.9999999100000040499998785000 -> -9.000000000000000000000273375E-8 Inexact Rounded
  438. precision: 27
  439. lnx106 ln 0.999999910000004049999878500 -> -9.00000000000000000000027338E-8 Inexact Rounded
  440. precision: 26
  441. lnx107 ln 0.99999991000000404999987850 -> -9.0000000000000000000002734E-8 Inexact Rounded
  442. precision: 25
  443. lnx108 ln 0.9999999100000040499998785 -> -9.000000000000000000000273E-8 Inexact Rounded
  444. precision: 24
  445. lnx109 ln 0.999999910000004049999879 -> -8.99999999999999995000027E-8 Inexact Rounded
  446. precision: 23
  447. lnx110 ln 0.99999991000000404999988 -> -8.9999999999999998500003E-8 Inexact Rounded
  448. precision: 22
  449. lnx111 ln 0.9999999100000040499999 -> -8.999999999999997850000E-8 Inexact Rounded
  450. precision: 21
  451. lnx112 ln 0.999999910000004050000 -> -8.99999999999998785000E-8 Inexact Rounded
  452. precision: 20
  453. lnx113 ln 0.99999991000000405000 -> -8.9999999999999878500E-8 Inexact Rounded
  454. precision: 19
  455. lnx114 ln 0.9999999100000040500 -> -8.999999999999987850E-8 Inexact Rounded
  456. precision: 18
  457. lnx115 ln 0.999999910000004050 -> -8.99999999999998785E-8 Inexact Rounded
  458. -- next may be a > 0.5ulp case; a more precise answer is:
  459. -- -8.99999999999998784999918E-8
  460. precision: 17
  461. lnx116 ln 0.99999991000000405 -> -8.9999999999999878E-8 Inexact Rounded
  462. precision: 16
  463. lnx117 ln 0.9999999100000040 -> -9.000000004999988E-8 Inexact Rounded
  464. precision: 15
  465. lnx118 ln 0.999999910000004 -> -9.00000000499999E-8 Inexact Rounded
  466. precision: 14
  467. lnx119 ln 0.99999991000000 -> -9.0000004050000E-8 Inexact Rounded
  468. precision: 13
  469. lnx120 ln 0.9999999100000 -> -9.000000405000E-8 Inexact Rounded
  470. precision: 12
  471. lnx121 ln 0.999999910000 -> -9.00000040500E-8 Inexact Rounded
  472. precision: 11
  473. lnx122 ln 0.99999991000 -> -9.0000004050E-8 Inexact Rounded
  474. precision: 10
  475. lnx123 ln 0.9999999100 -> -9.000000405E-8 Inexact Rounded
  476. precision: 9
  477. lnx124 ln 0.999999910 -> -9.00000041E-8 Inexact Rounded
  478. precision: 8
  479. lnx125 ln 0.99999991 -> -9.0000004E-8 Inexact Rounded
  480. precision: 7
  481. lnx126 ln 0.9999999 -> -1.000000E-7 Inexact Rounded
  482. precision: 16
  483. lnx126b ln 0.9999999 -> -1.000000050000003E-7 Inexact Rounded
  484. precision: 6
  485. lnx127 ln 0.999999 -> -0.00000100000 Inexact Rounded
  486. precision: 5
  487. lnx128 ln 0.99999 -> -0.000010000 Inexact Rounded
  488. precision: 4
  489. lnx129 ln 0.9999 -> -0.0001000 Inexact Rounded
  490. precision: 3
  491. lnx130 ln 0.999 -> -0.00100 Inexact Rounded
  492. precision: 2
  493. lnx131 ln 0.99 -> -0.010 Inexact Rounded
  494. precision: 1
  495. lnx132 ln 0.9 -> -0.1 Inexact Rounded
  496. -- cases near 1 -- 1 2345678901234567890
  497. precision: 20
  498. lnx401 ln 2.7182818284589365041 -> 0.99999999999996000000 Inexact Rounded
  499. lnx402 ln 2.7182818284589636869 -> 0.99999999999997000000 Inexact Rounded
  500. lnx403 ln 2.7182818284589908697 -> 0.99999999999997999999 Inexact Rounded
  501. lnx404 ln 2.7182818284590180525 -> 0.99999999999998999998 Inexact Rounded
  502. lnx405 ln 2.7182818284590452354 -> 1.0000000000000000000 Inexact Rounded
  503. lnx406 ln 2.7182818284593170635 -> 1.0000000000001000000 Inexact Rounded
  504. lnx407 ln 2.7182818284595888917 -> 1.0000000000002000000 Inexact Rounded
  505. precision: 14
  506. lnx411 ln 2.7182818284589 -> 0.99999999999995 Inexact Rounded
  507. lnx413 ln 2.7182818284590 -> 0.99999999999998 Inexact Rounded
  508. lnx416 ln 2.7182818284591 -> 1.0000000000000 Inexact Rounded
  509. lnx417 ln 2.7182818284592 -> 1.0000000000001 Inexact Rounded
  510. -- overflows, including some exp overprecise borderlines
  511. precision: 7
  512. maxExponent: 384
  513. minExponent: -383
  514. lnx709 ln 9.999999E+384 -> 886.4953 Inexact Rounded
  515. lnx711 ln 9.999992E+384 -> 886.4953 Inexact Rounded
  516. precision: 16
  517. lnx722 ln 9.999999999999999E+384 -> 886.4952608027076 Inexact Rounded
  518. lnx724 ln 9.999999999999917E+384 -> 886.4952608027076 Inexact Rounded
  519. lnx726 ln 9.999999999999117E+384 -> 886.4952608027075 Inexact Rounded
  520. -- and more...
  521. precision: 15
  522. maxExponent: 999
  523. minExponent: -999
  524. lnx731 ln 9.99999999999999E+999 -> 2302.58509299405 Inexact Rounded
  525. -- next may be a > 0.5ulp case; a more precise answer is:
  526. -- 2302.58509299404495001799145442
  527. lnx732 ln 9.99999999999266E+999 -> 2302.58509299404 Inexact Rounded
  528. lnx733 ln 9.99999999999265E+999 -> 2302.58509299404 Inexact Rounded
  529. lnx734 ln 9.99999999999264E+999 -> 2302.58509299404 Inexact Rounded
  530. -- subnormals and underflows for exp, including underflow-to-zero edge point
  531. precision: 7
  532. maxExponent: 384
  533. minExponent: -383
  534. lnx751 ln 0E-389 -> -Infinity
  535. lnx758 ln 1.000001E-383 -> -881.8901 Inexact Rounded
  536. lnx759 ln 9.99991E-384 -> -881.8901 Inexact Rounded
  537. lnx760 ln 4.4605E-385 -> -885.0000 Inexact Rounded
  538. lnx761 ln 2.221E-386 -> -887.9999 Inexact Rounded
  539. lnx762 ln 3.01E-387 -> -889.9985 Inexact Rounded
  540. lnx763 ln 1.7E-388 -> -892.8724 Inexact Rounded
  541. lnx764 ln 1.5E-388 -> -892.9976 Inexact Rounded
  542. lnx765 ln 9E-389 -> -893.5084 Inexact Rounded
  543. lnx766 ln 1E-389 -> -895.7056 Inexact Rounded
  544. lnx774 ln 0E-389 -> -Infinity
  545. -- special values
  546. lnx820 ln Infinity -> Infinity
  547. lnx821 ln 0 -> -Infinity
  548. lnx822 ln NaN -> NaN
  549. lnx823 ln sNaN -> NaN Invalid_operation
  550. -- propagating NaNs
  551. lnx824 ln sNaN123 -> NaN123 Invalid_operation
  552. lnx825 ln -sNaN321 -> -NaN321 Invalid_operation
  553. lnx826 ln NaN456 -> NaN456
  554. lnx827 ln -NaN654 -> -NaN654
  555. lnx828 ln NaN1 -> NaN1
  556. -- Invalid operations due to restrictions
  557. -- [next two probably skipped by most test harnesses]
  558. precision: 100000000
  559. lnx901 ln 1 -> NaN Invalid_context
  560. precision: 99999999
  561. lnx902 ln 0 -> NaN Invalid_context
  562. precision: 9
  563. maxExponent: 1000000
  564. minExponent: -999999
  565. lnx903 ln 1 -> NaN Invalid_context
  566. maxExponent: 999999
  567. minExponent: -999999
  568. lnx904 ln 0 -> -Infinity
  569. maxExponent: 999999
  570. minExponent: -1000000
  571. lnx905 ln 1 -> NaN Invalid_context
  572. maxExponent: 999999
  573. minExponent: -999998
  574. lnx906 ln 0 -> -Infinity
  575. -- payload decapitate
  576. precision: 5
  577. lnx910 ln -sNaN1234567890 -> -NaN67890 Invalid_operation
  578. -- Null test
  579. lnx900 ln # -> NaN Invalid_operation