Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
760 lines (642 sloc) 27.3 KB
# Author: Hrvoje Abraham
# Date: 13 November 2016
# Version: 3
# Format: TOML v0.4.0
# License: MIT
#
# The collection of tests for string to IEEE-754 double precision floating point
# value conversion. Originally used to test custom implementation of
# StringToDouble method for Wolfram Mathematica [1]. All the tests are designed
# for round-half-to-even rounding rule.
#
# The formatting tests check the following valid input formats: integers, C99
# language standard decimal double precision floating constants (section
# 6.4.4.2) and Infinity & NaN strings (section 7.19.6.1.8).
#
# The only non-standardized constraint is that NaN value string can't contain
# closing parenthesis ")" inside optional parentheses, e.g. input
# "nan(type_0)_123)" is not allowed, while "nan(type_0_123)" is valid. This
# practice is widely spread among standard-compliant implementations.
#
# Perl compatible formatting compliance RegEx:
# (?i)^[-+]?((((\d+\.?)|(\d*\.\d+))(e[-+]?\d+)?)|(inf(inity)?)|(nan(\([^)]*\))?))$
#
# IEEE-754 NaN value has no unique binary representation. In this collection its
# sign is preserved and mantissa is coded to 1.
#
# The conversion tests are custom designed during StringToDouble implementation and
# collected from David Gay's strtod development history [2], Rick Regan's
# blog [3], GCC test suite [4], Python bug tracker [5] and other sources.
#
# References:
# [1] https://github.com/ahrvoje/numerics/blob/master/strtod/StringToDouble.wl
# [2] http://www.netlib.org/fp/changes
# [3] http://www.exploringbinary.com/
# [4] https://gcc.gnu.org/viewcvs/gcc/trunk/gcc/testsuite/gcc.dg/float-exact-1.c
# [5] http://bugs.python.org/
# strtod(string) method should not accept the following inputs
negativeFormattingTests = [
"inf1", "inf+", ".E", "1.0e", "2.45+e+3", "23e.23", "e9", "+e", "e+", ".",
"e", ".7+", ".21e", "+", "", "infe", "nan(err", "nan)", "NAN(test_)_)",
"nan0", "-.e+", "-+12.34"
]
# formatting tests are designed to detect possible errors in floating point
# string parsing
[[FormattingTests]]
UID = "F0"
str = "12.34E-56"
hex = "348834c13cbf331d"
int = "6813403993551645*2^-235"
[[FormattingTests]]
UID = "F1"
str = "-456."
hex = "c07c800000000000"
int = "-8022036836253696*2^-44"
[[FormattingTests]]
UID = "F2"
str = "+123"
hex = "405ec00000000000"
int = "8655355533852672*2^-46"
[[FormattingTests]]
UID = "F3"
str = "nan"
hex = "7ff0000000000001"
int = "nan"
[[FormattingTests]]
UID = "F4"
str = "NaN"
hex = "7ff0000000000001"
int = "nan"
[[FormattingTests]]
UID = "F5"
str = "NAN"
hex = "7ff0000000000001"
int = "nan"
[[FormattingTests]]
UID = "F6"
str = "inf"
hex = "7ff0000000000000"
int = "inf"
[[FormattingTests]]
UID = "F7"
str = "Inf"
hex = "7ff0000000000000"
int = "inf"
[[FormattingTests]]
UID = "F8"
str = "INF"
hex = "7ff0000000000000"
int = "inf"
[[FormattingTests]]
UID = "F9"
str = "-inf"
hex = "fff0000000000000"
int = "-inf"
[[FormattingTests]]
UID = "F10"
str = "+inF"
hex = "7ff0000000000000"
int = "inf"
[[FormattingTests]]
UID = "F11"
str = "+INF"
hex = "7ff0000000000000"
int = "inf"
[[FormattingTests]]
UID = "F12"
str = "1.0"
hex = "3ff0000000000000"
int = "4503599627370496*2^-52"
[[FormattingTests]]
UID = "F13"
str = "1e2"
hex = "4059000000000000"
int = "7036874417766400*2^-46"
[[FormattingTests]]
UID = "F14"
str = "7.e22"
hex = "44ada56a4b0835c0"
int = "8344650268554688*2^23"
[[FormattingTests]]
UID = "F15"
str = "7.0e22"
hex = "44ada56a4b0835c0"
int = "8344650268554688*2^23"
[[FormattingTests]]
UID = "F16"
str = "7.0e+22"
hex = "44ada56a4b0835c0"
int = "8344650268554688*2^23"
[[FormattingTests]]
UID = "F17"
str = "7.0e-22"
hex = "3b8a71fc0e147309"
int = "7443676776395529*2^-123"
[[FormattingTests]]
UID = "F18"
str = "-1.13e1"
hex = "c02699999999999a"
int = "-6361334473660826*2^-49"
[[FormattingTests]]
UID = "F19"
str = "+1.13e+1"
hex = "402699999999999a"
int = "6361334473660826*2^-49"
[[FormattingTests]]
UID = "F20"
str = "23e-45"
hex = "36e069d1347fd4b5"
int = "4619946877244597*2^-197"
[[FormattingTests]]
UID = "F21"
str = ".13e2"
hex = "402a000000000000"
int = "7318349394477056*2^-49"
[[FormattingTests]]
UID = "F22"
str = "-.13e-5"
hex = "beb5cf751db94e6b"
int = "-6139076427730539*2^-72"
[[FormattingTests]]
UID = "F23"
str = "123"
hex = "405ec00000000000"
int = "8655355533852672*2^-46"
[[FormattingTests]]
UID = "F24"
str = "+nan"
hex = "7ff0000000000001"
int = "nan"
[[FormattingTests]]
UID = "F25"
str = "infinity"
hex = "7ff0000000000000"
int = "inf"
[[FormattingTests]]
UID = "F26"
str = "Infinity"
hex = "7ff0000000000000"
int = "inf"
[[FormattingTests]]
UID = "F27"
str = "nan(type-0)"
hex = "7ff0000000000001"
int = "nan"
[[FormattingTests]]
UID = "F28"
str = "+nan(catch_22)"
hex = "7ff0000000000001"
int = "nan"
[[FormattingTests]]
UID = "F29"
str = "INFINITY"
hex = "7ff0000000000000"
int = "inf"
[[FormattingTests]]
UID = "F30"
str = "0.00000001e+8"
hex = "3ff0000000000000"
int = "4503599627370496*2^-52"
[[FormattingTests]]
UID = "F31"
str = "-infinity"
hex = "fff0000000000000"
int = "-inf"
[[FormattingTests]]
UID = "F32"
str = "123.e-45"
hex = "3705f1a59c73408e"
int = "6176668107620494*2^-195"
[[FormattingTests]]
UID = "F33"
str = "678."
hex = "4085300000000000"
int = "5963751069057024*2^-43"
[[FormattingTests]]
UID = "F34"
str = "-nan()"
hex = "fff0000000000001"
int = "-nan"
# conversion tests are specially designed to detect possible conversion
# algorithm weakness
[[ConversionTests]]
UID = "C0"
str = "0.000e+00"
hex = "0000000000000000"
int = "0"
[[ConversionTests]]
UID = "C1"
str = "1e-400"
hex = "0000000000000000"
int = "0"
[[ConversionTests]]
UID = "C2"
str = "2.4703282292062326e-324"
hex = "0000000000000000"
int = "0"
[[ConversionTests]]
UID = "C3"
str = "2.4703282292062327e-324"
hex = "0000000000000000"
int = "0"
[[ConversionTests]]
UID = "C4"
str = "2.4703282292062328e-324"
hex = "0000000000000001"
int = "1*2^-1074"
[[ConversionTests]]
UID = "C5"
str = "4.9406564584124654e-324"
hex = "0000000000000001"
int = "1*2^-1074"
[[ConversionTests]]
UID = "C6"
str = "1e-320"
hex = "00000000000007e8"
int = "2024*2^-1074"
[[ConversionTests]]
UID = "C7"
str = "2.2250738585072009e-308"
hex = "000fffffffffffff"
int = "4503599627370495*2^-1074"
[[ConversionTests]]
UID = "C8"
str = "2.2250738585072014e-308"
hex = "0010000000000000"
int = "4503599627370496*2^-1074"
[[ConversionTests]]
UID = "C9"
str = "1e-25"
hex = "3abef2d0f5da7dd9"
int = "8711228593176025*2^-136"
[[ConversionTests]]
UID = "C10"
str = "1.0e-23"
hex = "3b282db34012b251"
int = "6805647338418769*2^-129"
[[ConversionTests]]
UID = "C11"
str = "1.2345678901234567890"
hex = "3ff3c0ca428c59fb"
int = "5559999489923579*2^-52"
[[ConversionTests]]
UID = "C12"
str = "1.13e1"
hex = "402699999999999a"
int = "6361334473660826*2^-49"
[[ConversionTests]]
UID = "C13"
str = "1e+19"
hex = "43e158e460913d00"
int = "4882812500000000*2^11"
[[ConversionTests]]
UID = "C14"
str = "1.9e+22"
hex = "449017f7df96be18"
int = "4529953002929688*2^22"
[[ConversionTests]]
UID = "C15"
str = "2.7e22"
hex = "4496deb1154f79ec"
int = "6437301635742188*2^22"
[[ConversionTests]]
UID = "C16"
str = "3.1e22"
hex = "449a420db02bd7d6"
int = "7390975952148438*2^22"
[[ConversionTests]]
UID = "C17"
str = "7e22"
hex = "44ada56a4b0835c0"
int = "8344650268554688*2^23"
[[ConversionTests]]
UID = "C18"
str = "1.7976931348623158e+308"
hex = "7fefffffffffffff"
int = "9007199254740991*2^971"
[[ConversionTests]]
UID = "C19"
str = "1.7976931348623159e+308"
hex = "7ff0000000000000"
int = "inf"
[[ConversionTests]]
UID = "C20"
str = "1e+400"
hex = "7ff0000000000000"
int = "inf"
[[ConversionTests]]
UID = "C21"
str = "2.225073858507201136057409796709131975934819546351645648023426109724822222021076945516529523908135087914149158913039621106870086438694594645527657207407820621743379988141063267329253552286881372149012981122451451889849057222307285255133155755015914397476397983411801999323962548289017107081850690630666655994938275772572015763062690663332647565300009245888316433037779791869612049497390377829704905051080609940730262937128958950003583799967207254304360284078895771796150945516748243471030702609144621572289880258182545180325707018860872113128079512233426288368622321503775666622503982534335974568884423900265498198385487948292206894721689831099698365846814022854243330660339850886445804001034933970427567186443383770486037861622771738545623065874679014086723327636718749999999999999999999999999999999999999e-308"
hex = "000fffffffffffff"
int = "4503599627370495*2^-1074"
[[ConversionTests]]
# 2^-1022 - 2^-1075 : halfway case between normal and subnormal numbers
UID = "C22"
str = "2.22507385850720113605740979670913197593481954635164564802342610972482222202107694551652952390813508791414915891303962110687008643869459464552765720740782062174337998814106326732925355228688137214901298112245145188984905722230728525513315575501591439747639798341180199932396254828901710708185069063066665599493827577257201576306269066333264756530000924588831643303777979186961204949739037782970490505108060994073026293712895895000358379996720725430436028407889577179615094551674824347103070260914462157228988025818254518032570701886087211312807951223342628836862232150377566662250398253433597456888442390026549819838548794829220689472168983109969836584681402285424333066033985088644580400103493397042756718644338377048603786162277173854562306587467901408672332763671875e-308"
hex = "0010000000000000"
int = "4503599627370496*2^-1074"
[[ConversionTests]]
UID = "C23"
str = "0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000222507385850720138309023271733240406421921598046233183055332741688720443481391819585428315901251102056406733973103581100515243416155346010885601238537771882113077799353200233047961014744258363607192156504694250373420837525080665061665815894872049117996859163964850063590877011830487479978088775374994945158045160505091539985658247081864511353793580499211598108576605199243335211435239014879569960959128889160299264151106346631339366347758651302937176204732563178148566435087212282863764204484681140761391147706280168985324411002416144742161856716615054015428508471675290190316132277889672970737312333408698898317506783884692609277397797285865965494109136909540613646756870239867831529068098461721092462539672851562500000000000000001"
hex = "0010000000000000"
int = "4503599627370496*2^-1074"
[[ConversionTests]]
# 2^971 * (2^53 - 1 + 1/2) : the smallest number resolving to inf
UID = "C24"
str = "179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497792"
hex = "7ff0000000000000"
int = "inf"
[[ConversionTests]]
UID = "C25"
str = "179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497791.9999999999999999999999999999999999999999999999999999999999999999999999"
hex = "7fefffffffffffff"
int = "9007199254740991*2^971"
# tests 26-32 are problematic cases from David Gay's strtod development history
# http://www.netlib.org/fp/changes
[[ConversionTests]]
UID = "C26"
str = "2.2250738585072012e-308"
hex = "0010000000000000"
int = "4503599627370496*2^-1074"
[[ConversionTests]]
UID = "C27"
str = "8.44291197326099e-309"
hex = "0006123400000001"
int = "1708864407863297*2^-1074"
[[ConversionTests]]
UID = "C28"
str = "35184372088831.999999999999999999999999999999999999"
hex = "42c0000000000000"
int = "4503599627370496*2^-7"
[[ConversionTests]]
UID = "C29"
str = "2.47032822920623272e-324"
hex = "0000000000000000"
int = "0"
[[ConversionTests]]
UID = "C30"
str = "1.100000000000000088817841970012523233890533447265626"
hex = "3ff199999999999a"
int = "4953959590107546*2^-52"
[[ConversionTests]]
UID = "C31"
str = ".010000000000000000057612911342378542997169"
hex = "3f847ae147ae147b"
int = "5764607523034235*2^-59"
[[ConversionTests]]
UID = "C32"
str = "1.8254370818746402660437411213933955878019332885742187"
hex = "3ffd34fd8378ea83"
int = "8221037761718915*2^-52"
# tests 33-63 are from Rick Regan's blog
# http://www.exploringbinary.com/
[[ConversionTests]]
UID = "C33"
str = "6929495644600919.5"
hex = "43389e56ee5e7a58"
int = "6929495644600920"
[[ConversionTests]]
UID = "C34"
str = "3.7455744005952583e15"
hex = "432a9d28ff412a75"
int = "7491148801190517*2^-1"
[[ConversionTests]]
UID = "C35"
str = "2.2250738585072011e-308"
hex = "000fffffffffffff"
int = "4503599627370495*2^-1074"
[[ConversionTests]]
UID = "C36"
str = "5.0216813883093451685872615018317116712748411717802652598273e58"
hex = "4c20000000000001"
int = "4503599627370497*2^143"
[[ConversionTests]]
# 2^-1047 + 2^-1075
UID = "C37"
str = "6.631236871469758276785396630275967243399099947355303144249971758736286630139265439618068200788048744105960420552601852889715006376325666595539603330361800519107591783233358492337208057849499360899425128640718856616503093444922854759159988160304439909868291973931426625698663157749836252274523485312442358651207051292453083278116143932569727918709786004497872322193856150225415211997283078496319412124640111777216148110752815101775295719811974338451936095907419622417538473679495148632480391435931767981122396703443803335529756003353209830071832230689201383015598792184172909927924176339315507402234836120730914783168400715462440053817592702766213559042115986763819482654128770595766806872783349146967171293949598850675682115696218943412532098591327667236328125E-316"
hex = "0000000008000000"
int = "134217728*2^-1074"
[[ConversionTests]]
# 2^-1058 - 2^-1075
UID = "C38"
str = "3.237883913302901289588352412501532174863037669423108059901297049552301970670676565786835742587799557860615776559838283435514391084153169252689190564396459577394618038928365305143463955100356696665629202017331344031730044369360205258345803431471660032699580731300954848363975548690010751530018881758184174569652173110473696022749934638425380623369774736560008997404060967498028389191878963968575439222206416981462690113342524002724385941651051293552601421155333430225237291523843322331326138431477823591142408800030775170625915670728657003151953664260769822494937951845801530895238439819708403389937873241463484205608000027270531106827387907791444918534771598750162812548862768493201518991668028251730299953143924168545708663913273994694463908672332763671875E-319"
hex = "0000000000010000"
int = "65536*2^-1074"
[[ConversionTests]]
# (2^-1027 + 2^-1066) + 2^-1075
UID = "C39"
str = "6.953355807847677105972805215521891690222119817145950754416205607980030131549636688806115726399441880065386399864028691275539539414652831584795668560082999889551357784961446896042113198284213107935110217162654939802416034676213829409720583759540476786936413816541621287843248433202369209916612249676005573022703244799714622116542188837770376022371172079559125853382801396219552418839469770514904192657627060319372847562301074140442660237844114174497210955449896389180395827191602886654488182452409583981389442783377001505462015745017848754574668342161759496661766020028752888783387074850773192997102997936619876226688096314989645766000479009083731736585750335262099860150896718774401964796827166283225641992040747894382698751809812609536720628966577351093292236328125E-310"
hex = "0000800000000100"
int = "140737488355584*2^-1074"
[[ConversionTests]]
# (2^-1058 + 2^-1063) - 2^-1075
UID = "C40"
str = "3.339068557571188581835713701280943911923401916998521771655656997328440314559615318168849149074662609099998113009465566426808170378434065722991659642619467706034884424989741080790766778456332168200464651593995817371782125010668346652995912233993254584461125868481633343674905074271064409763090708017856584019776878812425312008812326260363035474811532236853359905334625575404216060622858633280744301892470300555678734689978476870369853549413277156622170245846166991655321535529623870646888786637528995592800436177901746286272273374471701452991433047257863864601424252024791567368195056077320885329384322332391564645264143400798619665040608077549162173963649264049738362290606875883456826586710961041737908872035803481241600376705491726170293986797332763671875E-319"
hex = "0000000000010800"
int = "67584*2^-1074"
[[ConversionTests]]
UID = "C41"
str = "8.533e+68"
hex = "4e3fa69165a8eea2"
int = "8908867684069026*2^176"
[[ConversionTests]]
UID = "C42"
str = "4.1006e-184"
hex = "19dbe0d1c7ea60c9"
int = "7847015978000585*2^-662"
[[ConversionTests]]
UID = "C43"
str = "9.998e+307"
hex = "7fe1cc0a350ca87b"
int = "5009418815842427*2^971"
[[ConversionTests]]
UID = "C44"
str = "9.9538452227e-280"
hex = "0602117ae45cde43"
int = "5085769095765571*2^-979"
[[ConversionTests]]
UID = "C45"
str = "6.47660115e-260"
hex = "0a1fdd9e333badad"
int = "8969395812150701*2^-914"
[[ConversionTests]]
UID = "C46"
str = "7.4e+47"
hex = "49e033d7eca0adef"
int = "4560602108308975*2^107"
[[ConversionTests]]
UID = "C47"
str = "5.92e+48"
hex = "4a1033d7eca0adef"
int = "4560602108308975*2^110"
[[ConversionTests]]
UID = "C48"
str = "7.35e+66"
hex = "4dd172b70eababa9"
int = "4911205154794409*2^170"
[[ConversionTests]]
UID = "C49"
str = "8.32116e+55"
hex = "4b8b2628393e02cd"
int = "7641778572100301*2^133"
[[ConversionTests]]
UID = "C50"
str = "-0.91276999999999997026378650843980722129344940185546876"
hex = "bfed35696e58a32f"
int = "-8221501263749935*2^-53"
[[ConversionTests]]
UID = "C51"
str = "-266.240000000000009094947017729282379150390624"
hex = "c070a3d70a3d70a4"
int = "-4683743612465316*2^-44"
[[ConversionTests]]
UID = "C52"
str = "8.255628858767918002472043289952338102302250764062685473021474535926245152950286865234374e-17"
hex = "3c97cb9433617c9c"
int = "6697761841970332*2^-106"
[[ConversionTests]]
UID = "C53"
str = "9214843084008499"
hex = "43405e6cec57761a"
int = "4607421542004250*2^1"
[[ConversionTests]]
# 2^-1 + 2^-53 + 2^-54
UID = "C54"
str = "0.500000000000000166533453693773481063544750213623046875"
hex = "3fe0000000000002"
int = "4503599627370498*2^-53"
[[ConversionTests]]
UID = "C55"
str = "3.518437208883201171875e13"
hex = "42c0000000000002"
int = "4503599627370498*2^-7"
[[ConversionTests]]
UID = "C56"
str = "62.5364939768271845828"
hex = "404f44abd5aa7ca4"
int = "8801229092846756*2^-47"
[[ConversionTests]]
UID = "C57"
str = "8.10109172351e-10"
hex = "3e0bd5cbaef0fd0c"
int = "7834895161294092*2^-83"
[[ConversionTests]]
UID = "C58"
str = "1.50000000000000011102230246251565404236316680908203125"
hex = "3ff8000000000000"
int = "6755399441055744*2^-52"
[[ConversionTests]]
UID = "C59"
str = "9007199254740991.4999999999999999999999999999999995"
hex = "433fffffffffffff"
int = "9007199254740991"
[[ConversionTests]]
UID = "C60"
str = "30078505129381147446200"
hex = "44997a3c7271b021"
int = "7171274454446113*2^22"
[[ConversionTests]]
UID = "C61"
str = "1777820000000000000001"
hex = "4458180d5bad2e3e"
int = "6781845092773438*2^18"
[[ConversionTests]]
# 2^-1 + 2^-53 + 2^-54 + 2^-65
UID = "C62"
str = "0.50000000000000016656055874808561867439493653364479541778564453125"
hex = "3fe0000000000002"
int = "4503599627370498*2^-53"
[[ConversionTests]]
UID = "C63"
str = "0.3932922657273"
hex = "3fd92bb352c4623a"
int = "7084923605508666*2^-54"
# tests 64-72 are from GCC float-exact-1.c test suite
[[ConversionTests]]
UID = "C64"
str = "2.4703282292062327208828439643411068618252990130716238221279284125033775363510437593264991818081799618989828234772285886546332835517796989819938739800539093906315035659515570226392290858392449105184435931802849936536152500319370457678249219365623669863658480757001585769269903706311928279558551332927834338409351978015531246597263579574622766465272827220056374006485499977096599470454020828166226237857393450736339007967761930577506740176324673600968951340535537458516661134223766678604162159680461914467291840300530057530849048765391711386591646239524912623653881879636239373280423891018672348497668235089863388587925628302755995657524455507255189313690836254779186948667994968324049705821028513185451396213837722826145437693412532098591327667236328124999e-324"
hex = "0000000000000000"
int = "0"
[[ConversionTests]]
UID = "C65"
str = "2.4703282292062327208828439643411068618252990130716238221279284125033775363510437593264991818081799618989828234772285886546332835517796989819938739800539093906315035659515570226392290858392449105184435931802849936536152500319370457678249219365623669863658480757001585769269903706311928279558551332927834338409351978015531246597263579574622766465272827220056374006485499977096599470454020828166226237857393450736339007967761930577506740176324673600968951340535537458516661134223766678604162159680461914467291840300530057530849048765391711386591646239524912623653881879636239373280423891018672348497668235089863388587925628302755995657524455507255189313690836254779186948667994968324049705821028513185451396213837722826145437693412532098591327667236328125e-324"
hex = "0000000000000000"
int = "0"
[[ConversionTests]]
UID = "C66"
str = "2.4703282292062327208828439643411068618252990130716238221279284125033775363510437593264991818081799618989828234772285886546332835517796989819938739800539093906315035659515570226392290858392449105184435931802849936536152500319370457678249219365623669863658480757001585769269903706311928279558551332927834338409351978015531246597263579574622766465272827220056374006485499977096599470454020828166226237857393450736339007967761930577506740176324673600968951340535537458516661134223766678604162159680461914467291840300530057530849048765391711386591646239524912623653881879636239373280423891018672348497668235089863388587925628302755995657524455507255189313690836254779186948667994968324049705821028513185451396213837722826145437693412532098591327667236328125001e-324"
hex = "0000000000000001"
int = "1*2^-1074"
[[ConversionTests]]
UID = "C67"
str = "7.4109846876186981626485318930233205854758970392148714663837852375101326090531312779794975454245398856969484704316857659638998506553390969459816219401617281718945106978546710679176872575177347315553307795408549809608457500958111373034747658096871009590975442271004757307809711118935784838675653998783503015228055934046593739791790738723868299395818481660169122019456499931289798411362062484498678713572180352209017023903285791732520220528974020802906854021606612375549983402671300035812486479041385743401875520901590172592547146296175134159774938718574737870961645638908718119841271673056017045493004705269590165763776884908267986972573366521765567941072508764337560846003984904972149117463085539556354188641513168478436313080237596295773983001708984374999e-324"
hex = "0000000000000001"
int = "1*2^-1074"
[[ConversionTests]]
UID = "C68"
str = "7.4109846876186981626485318930233205854758970392148714663837852375101326090531312779794975454245398856969484704316857659638998506553390969459816219401617281718945106978546710679176872575177347315553307795408549809608457500958111373034747658096871009590975442271004757307809711118935784838675653998783503015228055934046593739791790738723868299395818481660169122019456499931289798411362062484498678713572180352209017023903285791732520220528974020802906854021606612375549983402671300035812486479041385743401875520901590172592547146296175134159774938718574737870961645638908718119841271673056017045493004705269590165763776884908267986972573366521765567941072508764337560846003984904972149117463085539556354188641513168478436313080237596295773983001708984375e-324"
hex = "0000000000000002"
int = "2*2^-1074"
[[ConversionTests]]
UID = "C69"
str = "7.4109846876186981626485318930233205854758970392148714663837852375101326090531312779794975454245398856969484704316857659638998506553390969459816219401617281718945106978546710679176872575177347315553307795408549809608457500958111373034747658096871009590975442271004757307809711118935784838675653998783503015228055934046593739791790738723868299395818481660169122019456499931289798411362062484498678713572180352209017023903285791732520220528974020802906854021606612375549983402671300035812486479041385743401875520901590172592547146296175134159774938718574737870961645638908718119841271673056017045493004705269590165763776884908267986972573366521765567941072508764337560846003984904972149117463085539556354188641513168478436313080237596295773983001708984375001e-324"
hex = "0000000000000002"
int = "2*2^-1074"
[[ConversionTests]]
UID = "C70"
str = "8.9884656743115805365666807213050294962762414131308158973971342756154045415486693752413698006024096935349884403114202125541629105369684531108613657287705365884742938136589844238179474556051429647415148697857438797685859063890851407391008830874765563025951597582513936655578157348020066364210154316532161708031999e+307"
hex = "7fe0000000000000"
int = "4503599627370496*2^971"
[[ConversionTests]]
UID = "C71"
str = "8.9884656743115805365666807213050294962762414131308158973971342756154045415486693752413698006024096935349884403114202125541629105369684531108613657287705365884742938136589844238179474556051429647415148697857438797685859063890851407391008830874765563025951597582513936655578157348020066364210154316532161708032e+307"
hex = "7fe0000000000000"
int = "4503599627370496*2^971"
[[ConversionTests]]
UID = "C72"
str = "8.9884656743115805365666807213050294962762414131308158973971342756154045415486693752413698006024096935349884403114202125541629105369684531108613657287705365884742938136589844238179474556051429648741514697857438797685859063890851407391008830874765563025951597582513936655578157348020066364210154316532161708032001e+307"
hex = "7fe0000000000001"
int = "4503599627370497*2^971"
# tests from various online posts, bug reports...
[[ConversionTests]]
UID = "C73"
str = "1.00000005960464477550"
hex = "3ff0000010000000"
int = "4503599895805952*2^-52"
[[ConversionTests]]
UID = "C74"
str = "7.7071415537864938e-45"
hex = "36c6000000000000"
int = "6192449487634432*2^-199"
# issues from Python bug tracker
# http://bugs.python.org/issue7632
[[ConversionTests]]
UID = "C75"
str = "2183167012312112312312.23538020374420446192e-370"
hex = "0000000000000000"
int = "0"
[[ConversionTests]]
UID = "C76"
str = "94393431193180696942841837085033647913224148539854e-358"
hex = "0006c9a143590c14"
int = "1910544317090836*2^-1074"
[[ConversionTests]]
UID = "C77"
str = "99999999999999994487665465554760717039532578546e-47"
hex = "3ff0000000000000"
int = "4503599627370496*2^-52"
[[ConversionTests]]
UID = "C78"
str = "10000000000000000000000000000000000000000e-17"
hex = "44b52d02c7e14af6"
int = "5960464477539062*2^24"
[[ConversionTests]]
UID = "C79"
str = "104308485241983990666713401708072175773165034278685682646111762292409330928739751702404658197872319129036519947435319418387839758990478549477777586673075945844895981012024387992135617064532141489278815239849108105951619997829153633535314849999674266169258928940692239684771590065027025835804863585454872499320500023126142553932654370362024104462255244034053203998964360882487378334860197725139151265590832887433736189468858614521708567646743455601905935595381852723723645799866672558576993978025033590728687206296379801363024094048327273913079612469982585674824156000783167963081616214710691759864332339239688734656548790656486646106983450809073750535624894296242072010195710276073042036425579852459556183541199012652571123898996574563824424330960027873516082763671875e-1075"
hex = "0007802665fd9600"
int = "2111227245204992*2^-1074"
[[ConversionTests]]
UID = "C80"
str = "10.900000000000000012345678912345678912345"
hex = "4025cccccccccccd"
int = "6136154492292301*2^-49"