dymokomi/luce-browser-foundation
Source of release 0.6.0
0.6.0 / src / ak / tests_string_conversions_1.lucb
#==============================================================================================
#
# tests_string_conversions_1 - parse_number over doubles and floats (generated cases)
#
# DESCRIPTION:
# Port of the simple_cases test of Tests/AK/TestStringConversions.cpp. Each C++
# DOES_PARSE_*_LIKE_CPP(value) became a check that parse_number of the text and of "-"
# and the text, over a StringView and over UTF-16 storage, gives the bits the C++
# compiler gives the literal (computed exactly when the cases were generated).
#
#==============================================================================================
## `u"text"sv`: a Utf16View with UTF-16 storage of ASCII text (the code units live in `storage`).
func test_conversions_utf16(text: str, storage: u16[]) -> Utf16View:
for i in 0..<text.length:
storage[i] = text.bytes[i]
return utf16_view_from_utf16(storage[..<text.length])
## DOES_PARSE_DOUBLE_LIKE_CPP: `text` and "-" `text` parse to `bits` and its negation.
func test_parse_double(text: str, bits: u64):
with memory.heap:
var negative_text = new u8[text.length + 1] else trap("out of memory")
negative_text[0] = '-'
copy_bytes(negative_text[1..], text.bytes)
let negative = (str)negative_text
let negative_bits = bits ^ 0x8000000000000000
assert((parse_number_string_view_f64(sv(text), TrimWhitespace.no) else trap("parse")).bits() == bits)
assert((parse_number_string_view_f64(sv(negative), TrimWhitespace.no) else trap("parse")).bits() == negative_bits)
let storage = new u16[text.length + 1] else trap("out of memory")
assert((parse_number_utf16_view_f64(test_conversions_utf16(text, storage), TrimWhitespace.no) else trap("parse")).bits() == bits)
assert((parse_number_utf16_view_f64(test_conversions_utf16(negative, storage), TrimWhitespace.no) else trap("parse")).bits() == negative_bits)
## DOES_PARSE_FLOAT_LIKE_CPP: the same for float.
func test_parse_float(text: str, bits: u32):
with memory.heap:
var negative_text = new u8[text.length + 1] else trap("out of memory")
negative_text[0] = '-'
copy_bytes(negative_text[1..], text.bytes)
let negative = (str)negative_text
let negative_bits = bits ^ 0x80000000
assert((parse_number_string_view_f32(sv(text), TrimWhitespace.no) else trap("parse")).bits() == bits)
assert((parse_number_string_view_f32(sv(negative), TrimWhitespace.no) else trap("parse")).bits() == negative_bits)
let storage = new u16[text.length + 1] else trap("out of memory")
assert((parse_number_utf16_view_f32(test_conversions_utf16(text, storage), TrimWhitespace.no) else trap("parse")).bits() == bits)
test "StringConversions: simple_cases (part 1)":
test_parse_double("2.22507385850720138309e-308", 0x10000000000000)
test_parse_double("10090518465521146875.", 0x43e1811722a41d0b)
test_parse_float("10090518465521146875.", 0x5f0c08b9)
test_parse_double("10052108125844341766.", 0x43e1700862a098a1)
test_parse_float("10052108125844341766.", 0x5f0b8043)
test_parse_double("0.", 0x0)
test_parse_float("0.", 0x0)
test_parse_double("2.2222222222223e-322", 0x2d)
test_parse_double("2.2250738585072013e-308", 0x10000000000000)
test_parse_double("1.0", 0x3ff0000000000000)
test_parse_float("1.0", 0x3f800000)
test_parse_double("0.54e-85", 0x2e3adaff1563baa9)
test_parse_double("123", 0x405ec00000000000)
test_parse_double("1e10", 0x4202a05f20000000)
test_parse_double("001234.0", 0x4093480000000000)
test_parse_float("001234.0", 0x449a4000)
test_parse_double("123.456", 0x405edd2f1a9fbe77)
test_parse_float("123.456", 0x42f6e979)
test_parse_double("0.456", 0x3fdd2f1a9fbe76c9)
test_parse_float("0.456", 0x3ee978d5)
test_parse_double("0.45689544977495495495197116546843576574949654", 0x3fdd3dc6699e6089)
test_parse_float("0.45689544977495495495197116546843576574949654", 0x3ee9ee33)
test_parse_double("0.45689544977495495495197116546843576574949654e81", 0x50aed3a6f8b79f2d)
test_parse_double("0.45689544977495495495197116546843576574949654e-81", 0x2f0bbcc5ca4ebbe9)
test_parse_double("7.2057594037927933e+8", 0x41c5798ee2308c3a)
test_parse_float("7.2057594037927933e+8", 0x4e2bcc77)
test_parse_double("234532.3426362", 0x410ca122bdb80c4b)
test_parse_float("234532.3426362", 0x48650916)
test_parse_double("860228122.6654514319E+90", 0x54792bb20990715f)
test_parse_double("69294956446009195", 0x436ec5eca9f618ed)
test "StringConversions: simple_cases (part 2)":
test_parse_double("69294956446009200", 0x436ec5eca9f618ee)
test_parse_double("69294956446009199", 0x436ec5eca9f618ee)
test_parse_double("69294956446009198", 0x436ec5eca9f618ee)
test_parse_double("69294956446009208", 0x436ec5eca9f618ef)
test_parse_double("69294956446009204", 0x436ec5eca9f618ee)
test_parse_double("69294956446009200", 0x436ec5eca9f618ee)
test_parse_double("69294956446009201", 0x436ec5eca9f618ee)
test_parse_double("69294956446009202", 0x436ec5eca9f618ee)
test_parse_double("69294956446009203", 0x436ec5eca9f618ee)
test_parse_double("69294956446009205", 0x436ec5eca9f618ef)
test_parse_double("69294956446009206", 0x436ec5eca9f618ef)
test_parse_double("69294956446009204.001", 0x436ec5eca9f618ef)
test_parse_float("69294956446009204.001", 0x5b762f65)
test_parse_double("69294956446009204.000", 0x436ec5eca9f618ee)
test_parse_float("69294956446009204.000", 0x5b762f65)
test_parse_double("69294956446009204.0001", 0x436ec5eca9f618ef)
test_parse_float("69294956446009204.0001", 0x5b762f65)
test_parse_double("69294956446009204.0000", 0x436ec5eca9f618ee)
test_parse_float("69294956446009204.0000", 0x5b762f65)
test_parse_double("69294956446009204.00001", 0x436ec5eca9f618ef)
test_parse_float("69294956446009204.00001", 0x5b762f65)
test_parse_double("69294956446009204.000001", 0x436ec5eca9f618ef)
test_parse_float("69294956446009204.000001", 0x5b762f65)
test_parse_double("69294956446009204.0000001", 0x436ec5eca9f618ef)
test_parse_float("69294956446009204.0000001", 0x5b762f65)
test_parse_double("69294956446009204.00000001", 0x436ec5eca9f618ef)
test_parse_float("69294956446009204.00000001", 0x5b762f65)
test_parse_double("69294956446009204.000000001", 0x436ec5eca9f618ef)
test_parse_float("69294956446009204.000000001", 0x5b762f65)
test_parse_double("69294956446009204.0000000001", 0x436ec5eca9f618ef)
test "StringConversions: simple_cases (part 3)":
test_parse_float("69294956446009204.0000000001", 0x5b762f65)
test_parse_double("69294956446009204.00000000001", 0x436ec5eca9f618ef)
test_parse_float("69294956446009204.00000000001", 0x5b762f65)
test_parse_double("69294956446009204.000000000001", 0x436ec5eca9f618ef)
test_parse_float("69294956446009204.000000000001", 0x5b762f65)
test_parse_double("69294956446009204.0000000000001", 0x436ec5eca9f618ef)
test_parse_float("69294956446009204.0000000000001", 0x5b762f65)
test_parse_double("69294956446009204.00000000000001", 0x436ec5eca9f618ef)
test_parse_float("69294956446009204.00000000000001", 0x5b762f65)
test_parse_double("69294956446009204.000000000000001", 0x436ec5eca9f618ef)
test_parse_float("69294956446009204.000000000000001", 0x5b762f65)
test_parse_double("69294956446009204.0000000000000001", 0x436ec5eca9f618ef)
test_parse_float("69294956446009204.0000000000000001", 0x5b762f65)
test_parse_double("69294956446009204.00000000000000001", 0x436ec5eca9f618ef)
test_parse_float("69294956446009204.00000000000000001", 0x5b762f65)
test_parse_double("69294956446009204.000000000000000001", 0x436ec5eca9f618ef)
test_parse_float("69294956446009204.000000000000000001", 0x5b762f65)
test_parse_double("69294956446009204.0000000000000000001", 0x436ec5eca9f618ef)
test_parse_float("69294956446009204.0000000000000000001", 0x5b762f65)
test_parse_double("69294956446009204.00000000000000000001", 0x436ec5eca9f618ef)
test_parse_float("69294956446009204.00000000000000000001", 0x5b762f65)
test_parse_double("69294956446009204.000000000000000000001", 0x436ec5eca9f618ef)
test_parse_float("69294956446009204.000000000000000000001", 0x5b762f65)
test_parse_double("69294956446009204.0000000000000000000001", 0x436ec5eca9f618ef)
test_parse_float("69294956446009204.0000000000000000000001", 0x5b762f65)
test_parse_double("69294956446009196", 0x436ec5eca9f618ee)
test_parse_double("69294956446009115", 0x436ec5eca9f618e3)
test_parse_double("692949564460091155", 0x43a33bb3ea39cf8e)
test_parse_double("6929495644600911557", 0x43d80aa0e4c84372)
test_parse_double("7.0420557077594588669468784357561207962098443483187940792729600000e+59", 0x4c5c0bee4d8e1912)
test "StringConversions: simple_cases (part 4)":
test_parse_double("7.0420557077594588669468784357561207962098443483187940792729600000e+59", 0x4c5c0bee4d8e1912)
test_parse_double("1.7339253062092163730578609458683877051596800000000000000000000000e+42", 0x48b3e78c6adb1d29)
test_parse_double("2.0972622234386619214559824785284023792871122537545728000000000000e+52", 0x4acc070675475037)
test_parse_double("1.0001803374372191849407179462120053338028379051879898808320000000e+57", 0x4bc4652f5ad52a71)
test_parse_double("1.8607245283054342363818436991534856973992070520151142825984000000e+58", 0x4c07b6e5a45b4b3f)
test_parse_double("1.9189205311132686907264385602245237137907390376574976000000000000e+52", 0x4ac9a4e4bef216e3)
test_parse_double("2.8184483231688951563253238886553506793085187889855201280000000000e+54", 0x4b3d6d0c9961223b)
test_parse_double("1.7664960224650106892054063261344555646357024359107788800000000000e+53", 0x4afd824900b40673)
test_parse_double("2.1470977154320536489471030463761883783915110400000000000000000000e+45", 0x495811de459fe681)
test_parse_double("4.4900312744003159009338275160799498340862630046359789166919680000e+61", 0x4cbbf108522e4647)
test_parse_double("2.2222222222223e-322", 0x2d)
test_parse_double("860228122.6654514319E+90", 0x54792bb20990715f)
test_parse_double("4.9406564584124653e-324", 0x1)
test_parse_double("4.9406564584124654e-324", 0x1)
test_parse_double("2.2250738585072009e-308", 0xfffffffffffff)
test_parse_double("2.2250738585072014e-308", 0x10000000000000)
test_parse_double("1.7976931348623157e308", 0x7fefffffffffffff)
test_parse_double("1.7976931348623158e308", 0x7fefffffffffffff)
test_parse_double("0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044501477170144022721148195934182639518696390927032912960468522194496444440421538910330590478162701758282983178260792422137401728773891892910553144148156412434867599762821265346585071045737627442980259622449029037796981144446145705102663115100318287949527959668236039986479250965780342141637013812613333119898765515451440315261253813266652951306000184917766328660755595837392240989947807556594098101021612198814605258742579179000071675999344145086087205681577915435923018910334964869420614052182892431445797605163650903606514140377217442262561590244668525767372446430075513332450079650686719491377688478005309963967709758965844137894433796621993967316936280457084866613206797017728916080020698679408551343728867675409720757232455434770912461317493580281734466552734375", 0x1fffffffffffff)
test_parse_double("0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072008890245868760858598876504231122409594654935248025624400092282356951787758888037591552642309780950434312085877387158357291821993020294379224223559819827501242041788969571311791082261043971979604000454897391938079198936081525613113376149842043271751033627391549782731594143828136275113838604094249464942286316695429105080201815926642134996606517803095075913058719846423906068637102005108723282784678843631944515866135041223479014792369585208321597621066375401613736583044193603714778355306682834535634005074073040135602968046375918583163124224521599262546494300836851861719422417646455137135420132217031370496583210154654068035397417906022589503023501937519773030945763173210852507299305089761582519159720757232455434770912461317493580281734466552734375", 0xfffffffffffff)
test_parse_double("9007199254740993.", 0x4340000000000000)
test_parse_float("9007199254740993.", 0x5a000000)
test_parse_double("9007199254740993.1", 0x4340000000000001)
test_parse_float("9007199254740993.1", 0x5a000000)
test_parse_double("9007199254740993.0000000000000000000000000000000000000000000000000", 0x4340000000000000)
test_parse_float("9007199254740993.0000000000000000000000000000000000000000000000000", 0x5a000000)
test_parse_double("9007199254740993.0000000000000000000000000000000000000000000000001", 0x4340000000000001)
test_parse_float("9007199254740993.0000000000000000000000000000000000000000000000001", 0x5a000000)
test_parse_double("9007199254740993.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", 0x4340000000000000)
test_parse_float("9007199254740993.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", 0x5a000000)
test "StringConversions: simple_cases (part 5)":
test_parse_double("9007199254740993.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", 0x4340000000000000)
test_parse_float("9007199254740993.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", 0x5a000000)
test_parse_double("9007199254740993.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", 0x4340000000000001)
test_parse_float("9007199254740993.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", 0x5a000000)
test_parse_double("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009007199254740993.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", 0x4340000000000000)
test_parse_float("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009007199254740993.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", 0x5a000000)
test_parse_double("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009007199254740993.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", 0x4340000000000001)
test_parse_float("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009007199254740993.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", 0x5a000000)
test_parse_double("1.17549414062751785924617589866280818433124586473279624003138594271817467598606476997247227700427174568176269531250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-38", 0x380fffffa0000000)
test_parse_float("1.17549414062751785924617589866280818433124586473279624003138594271817467598606476997247227700427174568176269531250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-38", 0x7ffffe)
test_parse_double("179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.", 0x7fefffffffffffff)
test_parse_double("179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858369.", 0x7fefffffffffffff)
test_parse_double("179769313486231579999999999999999999999999999999999999999917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.", 0x7fefffffffffffff)
test_parse_double("179769313486231580000000000000000000000000000000000000000000000000057260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.", 0x7fefffffffffffff)
test_parse_double("179769313486231580790000000000000000000000000000000000000000000000057260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.", 0x7fefffffffffffff)
test_parse_double("179769313486231580793700000000000000000000000000000000000000000000057260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.", 0x7fefffffffffffff)
test_parse_double("179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.", 0x7fefffffffffffff)
test_parse_double("7.2057594037927933e+16", 0x4370000000000000)
test_parse_float("7.2057594037927933e+16", 0x5b800000)
test_parse_double("7.3177701707893310e+15", 0x4339ff792393edd3)
test_parse_float("7.3177701707893310e+15", 0x59cffbc9)
test_parse_double("4.2523296908380055e94", 0x539462c55e93f941)
test_parse_double("4.2523296908380052e94", 0x539462c55e93f941)
test_parse_double("6865415254.161212", 0x41f9935ec5629453)
test_parse_float("6865415254.161212", 0x4fcc9af6)
test_parse_double("4.9406564584124654416987984e-324", 0x1)
test_parse_double("4.94065645841246544177987491e-324", 0x1)
test_parse_double("1.4821969375237396325297063786046641170951794078429742932767570475020265218106262555958995090849079771393896940863371531927799701310678193891963243880323456343789021395709342135835374515035469463110661559081709961921691500191622274606949531619374201918195088454200951461561942223787156967735130799756700603045611186809318747958358147744773659879163696332033824403891299986257959682272412496899735742714436070441803404780657158346504044105794804160581370804321322475109996680534260007162497295808277148680375104180318034518509429259235026831954987743714947574192329127781743623968254334611203409098600941053918033152755376981653597394514673304353113588214501752867512169200796980994429823492617107911270837728302633695687262616047519259154796600341796875e-323", 0x3)
test_parse_double("0.14821969375237396325297063786046641170951794078429742932767570475020265218106262555958995090849079771393896940863371531927799701310678193891963243880323456343789021395709342135835374515035469463110661559081709961921691500191622274606949531619374201918195088454200951461561942223787156967735130799756700603045611186809318747958358147744773659879163696332033824403891299986257959682272412496899735742714436070441803404780657158346504044105794804160581370804321322475109996680534260007162497295808277148680375104180318034518509429259235026831954987743714947574192329127781743623968254334611203409098600941053918033152755376981653597394514673304353113588214501752867512169200796980994429823492617107911270837728302633695687262616047519259154796600341796875e-322", 0x3)
test_parse_double("0000000000000000000000000000.14821969375237396325297063786046641170951794078429742932767570475020265218106262555958995090849079771393896940863371531927799701310678193891963243880323456343789021395709342135835374515035469463110661559081709961921691500191622274606949531619374201918195088454200951461561942223787156967735130799756700603045611186809318747958358147744773659879163696332033824403891299986257959682272412496899735742714436070441803404780657158346504044105794804160581370804321322475109996680534260007162497295808277148680375104180318034518509429259235026831954987743714947574192329127781743623968254334611203409098600941053918033152755376981653597394514673304353113588214501752867512169200796980994429823492617107911270837728302633695687262616047519259154796600341796875e-322", 0x3)
test "StringConversions: simple_cases (part 6)":
test_parse_double("0000000000000000000000000000.000000000014821969375237396325297063786046641170951794078429742932767570475020265218106262555958995090849079771393896940863371531927799701310678193891963243880323456343789021395709342135835374515035469463110661559081709961921691500191622274606949531619374201918195088454200951461561942223787156967735130799756700603045611186809318747958358147744773659879163696332033824403891299986257959682272412496899735742714436070441803404780657158346504044105794804160581370804321322475109996680534260007162497295808277148680375104180318034518509429259235026831954987743714947574192329127781743623968254334611203409098600941053918033152755376981653597394514673304353113588214501752867512169200796980994429823492617107911270837728302633695687262616047519259154796600341796875e-312", 0x3)
test_parse_double("6.422853395936205074295394307286877840745777433986221937532613872508781594512713774248897872701267900937355341040794330502046537234627217353184072348140164415641909271474048258861995623182036767347953342268740983499399650083036318996344797035062154164551204996820412300010174963641101352685223346561236927986431514284038124115288530689401919280970935077214657241686229994045115862318045415323218821842922297191448142071618101950151752445844415136251927e-323", 0xd)
test_parse_double("6.522853395936205074295394307286877840745777433986221937532613872508781594512713774248897872701267900937355341040794330502046537234627217353184072348140164415641909271474048258861995623182036767347953342268740983499399650083036318996344797035062154164551204996820412300010174963641101352685223346561236927986431514284038124115288530689401919280970935077214657241686229994045115862318045415323218821842922297191448142071618101950151752445844415136251927e-323", 0xd)
test_parse_double("7.522853395936205074295394307286877840745777433986221937532613872508781594512713774248897872701267900937355341040794330502046537234627217353184072348140164415641909271474048258861995623182036767347953342268740983499399650083036318996344797035062154164551204996820412300010174963641101352685223346561236927986431514284038124115288530689401919280970935077214657241686229994045115862318045415323218821842922297191448142071618101950151752445844415136251927e-323", 0xf)
test_parse_double("7.5228498395936205074295394307286877840745777433986221937532613872508781594512713774248897872701267900937355341040794330502046537234627217353184072348140164415641909271474048258861995623182036767347953342268740983499399650083036318996344797035062154164551204996820412300010174963641101352685223346561236927986431514284038124115288530689401919280970935077214657241686229994045115862318045415323218821842922297191448142071618101950151752445844415136251927e-323", 0xf)
test_parse_double("0.5228498395936205074295394307286877840745777433986221937532613872508781594512713774248897872701267900937355341040794330502046537234627217353184072348140164415641909271474048258861995623182036767347953342268740983499399650083036318996344797035062154164551204996820412300010174963641101352685223346561236927986431514284038124115288530689401919280970935077214657241686229994045115862318045415323218821842922297191448142071618101950151752445844415136251927e-323", 0x1)
test_parse_double("1e126", 0x5a17a2ecc414a03f)
test_parse_double("1e210", 0x6b88557f31326bbb)
test_parse_double("358416272e-33", 0x3adbbb2a68c9d0b9)
test_parse_float("358416272e-33", 0x16ddd953)
test_parse_double("89255e-22", 0x3c6494af6ce5221f)
test_parse_float("89255e-22", 0x2324a57b)
test_parse_double("8925.5e-21", 0x3c6494af6ce5221f)
test_parse_float("8925.5e-21", 0x2324a57b)
test_parse_double("8.9255e-18", 0x3c6494af6ce5221f)
test_parse_float("8.9255e-18", 0x2324a57b)
test_parse_double("8925500e-24", 0x3c6494af6ce5221f)
test_parse_float("8925500e-24", 0x2324a57b)
test_parse_double("89256e-22", 0x3c6494be89752a2b)
test_parse_float("89256e-22", 0x2324a5f4)
test_parse_double("89254e-22", 0x3c6494a050551a14)
test_parse_float("89254e-22", 0x2324a503)
test_parse_double("3.518437208883201171875e13", 0x42c0000000000002)
test_parse_float("3.518437208883201171875e13", 0x56000000)
test_parse_double("62.5364939768271845828", 0x404f44abd5aa7ca4)
test_parse_float("62.5364939768271845828", 0x427a255f)
test_parse_double("8.10109172351e-10", 0x3e0bd5cbaef0fd0c)
test_parse_float("8.10109172351e-10", 0x305eae5d)
test_parse_double("1.50000000000000011102230246251565404236316680908203125", 0x3ff8000000000000)
test_parse_float("1.50000000000000011102230246251565404236316680908203125", 0x3fc00000)
test "StringConversions: simple_cases (part 7)":
test_parse_double("9007199254740991.4999999999999999999999999999999995", 0x433fffffffffffff)
test_parse_float("9007199254740991.4999999999999999999999999999999995", 0x5a000000)
test_parse_double("7.4109846876186981626485318930233205854758970392148714663837852375101326090531312779794975454245398856969484704316857659638998506553390969459816219401617281718945106978546710679176872575177347315553307795408549809608457500958111373034747658096871009590975442271004757307809711118935784838675653998783503015228055934046593739791790738723868299395818481660169122019456499931289798411362062484498678713572180352209017023903285791732520220528974020802906854021606612375549983402671300035812486479041385743401875520901590172592547146296175134159774938718574737870961645638908718119841271673056017045493004705269590165763776884908267986972573366521765567941072508764337560846003984904972149117463085539556354188641513168478436313080237596295773983001708984375001e-324", 0x2)
test_parse_double("7.4109846876186981626485318930233205854758970392148714663837852375101326090531312779794975454245398856969484704316857659638998506553390969459816219401617281718945106978546710679176872575177347315553307795408549809608457500958111373034747658096871009590975442271004757307809711118935784838675653998783503015228055934046593739791790738723868299395818481660169122019456499931289798411362062484498678713572180352209017023903285791732520220528974020802906854021606612375549983402671300035812486479041385743401875520901590172592547146296175134159774938718574737870961645638908718119841271673056017045493004705269590165763776884908267986972573366521765567941072508764337560846003984904972149117463085539556354188641513168478436313080237596295773983001708984375e-324", 0x2)
test_parse_double("7.4109846876186981626485318930233205854758970392148714663837852375101326090531312779794975454245398856969484704316857659638998506553390969459816219401617281718945106978546710679176872575177347315553307795408549809608457500958111373034747658096871009590975442271004757307809711118935784838675653998783503015228055934046593739791790738723868299395818481660169122019456499931289798411362062484498678713572180352209017023903285791732520220528974020802906854021606612375549983402671300035812486479041385743401875520901590172592547146296175134159774938718574737870961645638908718119841271673056017045493004705269590165763776884908267986972573366521765567941072508764337560846003984904972149117463085539556354188641513168478436313080237596295773983001708984374999e-324", 0x1)
test_parse_double("2.4703282292062327208828439643411068618252990130716238221279284125033775363510437593264991818081799618989828234772285886546332835517796989819938739800539093906315035659515570226392290858392449105184435931802849936536152500319370457678249219365623669863658480757001585769269903706311928279558551332927834338409351978015531246597263579574622766465272827220056374006485499977096599470454020828166226237857393450736339007967761930577506740176324673600968951340535537458516661134223766678604162159680461914467291840300530057530849048765391711386591646239524912623653881879636239373280423891018672348497668235089863388587925628302755995657524455507255189313690836254779186948667994968324049705821028513185451396213837722826145437693412532098591327667236328125001e-324", 0x1)
test_parse_double("2.22507385850720138309e-308", 0x10000000000000)
test_parse_double("1e55", 0x4b5a19e96a19fc41)
test_parse_double("1e300", 0x7e37e43c8800759c)
test_parse_double("1e301", 0x7e6ddd4baa009303)
test_parse_double("1e302", 0x7ea2aa4f4a405be2)
test_parse_double("1e303", 0x7ed754e31cd072da)
test_parse_double("1e304", 0x7f0d2a1be4048f90)
test_parse_double("1e305", 0x7f423a516e82d9ba)
test_parse_double("1e299", 0x7e031cfd3999f7b0)
test_parse_double("3.4028235E38", 0x47efffffe54daff8)
test_parse_float("3.4028235E38", 0x7f7fffff)
test_parse_double("4e31", 0x467f8def8808b024)
test_parse_float("4e31", 0x73fc6f7c)
test_parse_double("9007199254740991.", 0x433fffffffffffff)
test_parse_float("9007199254740991.", 0x5a000000)
test_parse_double("7.038531E-26", 0x3ab5c87fb0000000)
test_parse_float("7.038531E-26", 0x15ae43fd)
test_parse_double("46116538.", 0x4185fd75d0000000)
test_parse_float("46116538.", 0x4c2febae)
test_parse_double("20040229.", 0x41731ca250000000)
test_parse_float("20040229.", 0x4b98e512)
test_parse_double("9771305410219737088.", 0x43e0f354d0000000)
test_parse_float("9771305410219737088.", 0x5f079aa6)
test_parse_double("1146.", 0x4091e80000000000)
test "StringConversions: simple_cases (part 8)":
test_parse_float("1146.", 0x448f4000)
test_parse_double("7.0064923216240854e-46", 0x3690000000000000)
test_parse_float("7.0064923216240854e-46", 0x1)
test_parse_double("1.1877630352973938", 0x3ff30113d0000000)
test_parse_float("1.1877630352973938", 0x3f98089f)
test_parse_double("2.1665680640000002384185791015625e9", 0x41e0246690000000)
test_parse_float("2.1665680640000002384185791015625e9", 0x4f012335)
test_parse_double("8.589934335999999523162841796875e+09", 0x41fffffff0000000)
test_parse_float("8.589934335999999523162841796875e+09", 0x4fffffff)
test_parse_double("0.09289376810193062", 0x3fb7c7e2d0000000)
test_parse_float("0.09289376810193062", 0x3dbe3f17)
test_parse_double("0", 0x0)
test_parse_double("1", 0x3ff0000000000000)
test_parse_double("2", 0x4000000000000000)
test_parse_double("20", 0x4034000000000000)
test_parse_double("200", 0x4069000000000000)
test_parse_double("234", 0x406d400000000000)
test_parse_double("8419841", 0x41600f4020000000)