db3a0f1435
strings and floating point.
1469 lines
39 KiB
Plaintext
1469 lines
39 KiB
Plaintext
|
|
Input: 1.23
|
|
|
|
strtoQ consumes 4 bytes and returns 17
|
|
with bits = #3fff3ae1 47ae147a e147ae14 7ae147ae
|
|
printf("%.35Lg") gives 1.23
|
|
g_Qfmt(0) gives 4 bytes: "1.23"
|
|
|
|
strtoIQ returns 17, consuming 4 bytes.
|
|
fI[0] = #3fff3ae1 47ae147a e147ae14 7ae147ae
|
|
= 1.23
|
|
fI[1] = #3fff3ae1 47ae147a e147ae14 7ae147af
|
|
= 1.2300000000000000000000000000000002
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: 1.23e+20
|
|
|
|
strtoQ consumes 8 bytes and returns 1
|
|
with bits = #4041aabd f2145b43 0 0
|
|
printf("%.35Lg") gives 123000000000000000000
|
|
g_Qfmt(0) gives 8 bytes: "1.23e+20"
|
|
|
|
strtoIQ returns 1, consuming 8 bytes.
|
|
fI[0] == fI[1] = #4041aabd f2145b43 0 0
|
|
= 123000000000000000000
|
|
|
|
|
|
Input: 1.23e-20
|
|
|
|
strtoQ consumes 8 bytes and returns 17
|
|
with bits = #3fbcd0ae 4cf76753 9e4cbca ad934841
|
|
printf("%.35Lg") gives 1.2299999999999999999999999999999999e-20
|
|
g_Qfmt(0) gives 8 bytes: "1.23e-20"
|
|
|
|
strtoIQ returns 17, consuming 8 bytes.
|
|
fI[0] = #3fbcd0ae 4cf76753 9e4cbca ad934841
|
|
= 1.2299999999999999999999999999999999e-20
|
|
fI[1] = #3fbcd0ae 4cf76753 9e4cbca ad934842
|
|
= 1.2300000000000000000000000000000001e-20
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: 1.23456789
|
|
|
|
strtoQ consumes 10 bytes and returns 17
|
|
with bits = #3fff3c0c a4283de1 b7eb6945 1304948f
|
|
printf("%.35Lg") gives 1.2345678899999999999999999999999999
|
|
g_Qfmt(0) gives 10 bytes: "1.23456789"
|
|
|
|
strtoIQ returns 17, consuming 10 bytes.
|
|
fI[0] = #3fff3c0c a4283de1 b7eb6945 1304948f
|
|
= 1.2345678899999999999999999999999999
|
|
fI[1] = #3fff3c0c a4283de1 b7eb6945 13049490
|
|
= 1.2345678900000000000000000000000001
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: 1.23456589e+20
|
|
|
|
strtoQ consumes 14 bytes and returns 1
|
|
with bits = #4041ac53 7a660b99 74000000 0
|
|
printf("%.35Lg") gives 123456589000000000000
|
|
g_Qfmt(0) gives 14 bytes: "1.23456589e+20"
|
|
|
|
strtoIQ returns 1, consuming 14 bytes.
|
|
fI[0] == fI[1] = #4041ac53 7a660b99 74000000 0
|
|
= 123456589000000000000
|
|
|
|
|
|
Input: 1.23e+30
|
|
|
|
strtoQ consumes 8 bytes and returns 1
|
|
with bits = #4062f0cb 4e8fb79 4945600 0
|
|
printf("%.35Lg") gives 1230000000000000000000000000000
|
|
g_Qfmt(0) gives 8 bytes: "1.23e+30"
|
|
|
|
strtoIQ returns 1, consuming 8 bytes.
|
|
fI[0] == fI[1] = #4062f0cb 4e8fb79 4945600 0
|
|
= 1230000000000000000000000000000
|
|
|
|
|
|
Input: 1.23e-30
|
|
|
|
strtoQ consumes 8 bytes and returns 17
|
|
with bits = #3f9b8f28 66f5010a a9d63f9e d7e8ba14
|
|
printf("%.35Lg") gives 1.2299999999999999999999999999999999e-30
|
|
g_Qfmt(0) gives 8 bytes: "1.23e-30"
|
|
|
|
strtoIQ returns 17, consuming 8 bytes.
|
|
fI[0] = #3f9b8f28 66f5010a a9d63f9e d7e8ba14
|
|
= 1.2299999999999999999999999999999999e-30
|
|
fI[1] = #3f9b8f28 66f5010a a9d63f9e d7e8ba15
|
|
= 1.2300000000000000000000000000000001e-30
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: 1.23456789e-20
|
|
|
|
strtoQ consumes 14 bytes and returns 33
|
|
with bits = #3fbcd268 1471e7ad a6a4a029 d86c1fa2
|
|
printf("%.35Lg") gives 1.2345678900000000000000000000000001e-20
|
|
g_Qfmt(0) gives 14 bytes: "1.23456789e-20"
|
|
|
|
strtoIQ returns 33, consuming 14 bytes.
|
|
fI[0] = #3fbcd268 1471e7ad a6a4a029 d86c1fa1
|
|
= 1.2345678899999999999999999999999999e-20
|
|
fI[1] = #3fbcd268 1471e7ad a6a4a029 d86c1fa2
|
|
= 1.2345678900000000000000000000000001e-20
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: 1.23456789e-30
|
|
|
|
strtoQ consumes 14 bytes and returns 17
|
|
with bits = #3f9b90a3 e33bbd99 51f85855 5a6b19d4
|
|
printf("%.35Lg") gives 1.23456789e-30
|
|
g_Qfmt(0) gives 14 bytes: "1.23456789e-30"
|
|
|
|
strtoIQ returns 17, consuming 14 bytes.
|
|
fI[0] = #3f9b90a3 e33bbd99 51f85855 5a6b19d4
|
|
= 1.23456789e-30
|
|
fI[1] = #3f9b90a3 e33bbd99 51f85855 5a6b19d5
|
|
= 1.2345678900000000000000000000000001e-30
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: 1.234567890123456789
|
|
|
|
strtoQ consumes 20 bytes and returns 17
|
|
with bits = #3fff3c0c a428c59f b71a4194 68dd175b
|
|
printf("%.35Lg") gives 1.234567890123456789
|
|
g_Qfmt(0) gives 20 bytes: "1.234567890123456789"
|
|
|
|
strtoIQ returns 17, consuming 20 bytes.
|
|
fI[0] = #3fff3c0c a428c59f b71a4194 68dd175b
|
|
= 1.234567890123456789
|
|
fI[1] = #3fff3c0c a428c59f b71a4194 68dd175c
|
|
= 1.2345678901234567890000000000000002
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: 1.23456789012345678901234567890123456789
|
|
|
|
strtoQ consumes 40 bytes and returns 17
|
|
with bits = #3fff3c0c a428c59f b71a7be1 6b6b6d5b
|
|
printf("%.35Lg") gives 1.2345678901234567890123456789012346
|
|
g_Qfmt(0) gives 36 bytes: "1.2345678901234567890123456789012346"
|
|
|
|
strtoIQ returns 17, consuming 40 bytes.
|
|
fI[0] = #3fff3c0c a428c59f b71a7be1 6b6b6d5b
|
|
= 1.2345678901234567890123456789012346
|
|
fI[1] = #3fff3c0c a428c59f b71a7be1 6b6b6d5c
|
|
= 1.2345678901234567890123456789012347
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: 1.23e306
|
|
|
|
strtoQ consumes 8 bytes and returns 33
|
|
with bits = #43f7c067 6cd1c61f 4daac5f1 e9fa3b55
|
|
printf("%.35Lg") gives 1.23e+306
|
|
g_Qfmt(0) gives 9 bytes: "1.23e+306"
|
|
|
|
strtoIQ returns 33, consuming 8 bytes.
|
|
fI[0] = #43f7c067 6cd1c61f 4daac5f1 e9fa3b54
|
|
= 1.2299999999999999999999999999999999e+306
|
|
fI[1] = #43f7c067 6cd1c61f 4daac5f1 e9fa3b55
|
|
= 1.23e+306
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: 1.23e-306
|
|
|
|
strtoQ consumes 9 bytes and returns 17
|
|
with bits = #3c06ba3b 85da396e 7e496ab7 d233c3dd
|
|
printf("%.35Lg") gives 1.23e-306
|
|
g_Qfmt(0) gives 9 bytes: "1.23e-306"
|
|
|
|
strtoIQ returns 17, consuming 9 bytes.
|
|
fI[0] = #3c06ba3b 85da396e 7e496ab7 d233c3dd
|
|
= 1.23e-306
|
|
fI[1] = #3c06ba3b 85da396e 7e496ab7 d233c3de
|
|
= 1.2300000000000000000000000000000001e-306
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: 1.23e-320
|
|
|
|
strtoQ consumes 9 bytes and returns 33
|
|
with bits = #3bd83731 86e30898 7e33b2e8 355f847b
|
|
printf("%.35Lg") gives 1.2300000000000000000000000000000001e-320
|
|
g_Qfmt(0) gives 9 bytes: "1.23e-320"
|
|
|
|
strtoIQ returns 33, consuming 9 bytes.
|
|
fI[0] = #3bd83731 86e30898 7e33b2e8 355f847a
|
|
= 1.2299999999999999999999999999999999e-320
|
|
fI[1] = #3bd83731 86e30898 7e33b2e8 355f847b
|
|
= 1.2300000000000000000000000000000001e-320
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: 1.23e-20
|
|
|
|
strtoQ consumes 8 bytes and returns 17
|
|
with bits = #3fbcd0ae 4cf76753 9e4cbca ad934841
|
|
printf("%.35Lg") gives 1.2299999999999999999999999999999999e-20
|
|
g_Qfmt(0) gives 8 bytes: "1.23e-20"
|
|
|
|
strtoIQ returns 17, consuming 8 bytes.
|
|
fI[0] = #3fbcd0ae 4cf76753 9e4cbca ad934841
|
|
= 1.2299999999999999999999999999999999e-20
|
|
fI[1] = #3fbcd0ae 4cf76753 9e4cbca ad934842
|
|
= 1.2300000000000000000000000000000001e-20
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: 1.23456789e307
|
|
|
|
strtoQ consumes 14 bytes and returns 17
|
|
with bits = #43fb194b 14bdaecd bcea468c 902464cf
|
|
printf("%.35Lg") gives 1.2345678899999999999999999999999999e+307
|
|
g_Qfmt(0) gives 15 bytes: "1.23456789e+307"
|
|
|
|
strtoIQ returns 17, consuming 14 bytes.
|
|
fI[0] = #43fb194b 14bdaecd bcea468c 902464cf
|
|
= 1.2345678899999999999999999999999999e+307
|
|
fI[1] = #43fb194b 14bdaecd bcea468c 902464d0
|
|
= 1.2345678900000000000000000000000001e+307
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: 1.23456589e-307
|
|
|
|
strtoQ consumes 15 bytes and returns 17
|
|
with bits = #3c036319 6bb9845f a6d234e3 39163574
|
|
printf("%.35Lg") gives 1.23456589e-307
|
|
g_Qfmt(0) gives 15 bytes: "1.23456589e-307"
|
|
|
|
strtoIQ returns 17, consuming 15 bytes.
|
|
fI[0] = #3c036319 6bb9845f a6d234e3 39163574
|
|
= 1.23456589e-307
|
|
fI[1] = #3c036319 6bb9845f a6d234e3 39163575
|
|
= 1.2345658900000000000000000000000002e-307
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: 1.234567890123456789
|
|
|
|
strtoQ consumes 20 bytes and returns 17
|
|
with bits = #3fff3c0c a428c59f b71a4194 68dd175b
|
|
printf("%.35Lg") gives 1.234567890123456789
|
|
g_Qfmt(0) gives 20 bytes: "1.234567890123456789"
|
|
|
|
strtoIQ returns 17, consuming 20 bytes.
|
|
fI[0] = #3fff3c0c a428c59f b71a4194 68dd175b
|
|
= 1.234567890123456789
|
|
fI[1] = #3fff3c0c a428c59f b71a4194 68dd175c
|
|
= 1.2345678901234567890000000000000002
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: 1.234567890123456789e301
|
|
|
|
strtoQ consumes 24 bytes and returns 33
|
|
with bits = #43e726f5 175f5641 3017ea80 763990ef
|
|
printf("%.35Lg") gives 1.2345678901234567890000000000000001e+301
|
|
g_Qfmt(0) gives 25 bytes: "1.234567890123456789e+301"
|
|
|
|
strtoIQ returns 33, consuming 24 bytes.
|
|
fI[0] = #43e726f5 175f5641 3017ea80 763990ee
|
|
= 1.2345678901234567889999999999999999e+301
|
|
fI[1] = #43e726f5 175f5641 3017ea80 763990ef
|
|
= 1.2345678901234567890000000000000001e+301
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: 1.234567890123456789e-301
|
|
|
|
strtoQ consumes 25 bytes and returns 17
|
|
with bits = #3c1752a6 4e34ba0d 35b19b04 3222fce5
|
|
printf("%.35Lg") gives 1.234567890123456789e-301
|
|
g_Qfmt(0) gives 25 bytes: "1.234567890123456789e-301"
|
|
|
|
strtoIQ returns 17, consuming 25 bytes.
|
|
fI[0] = #3c1752a6 4e34ba0d 35b19b04 3222fce5
|
|
= 1.234567890123456789e-301
|
|
fI[1] = #3c1752a6 4e34ba0d 35b19b04 3222fce6
|
|
= 1.2345678901234567890000000000000002e-301
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: 1.234567890123456789e-321
|
|
|
|
strtoQ consumes 25 bytes and returns 17
|
|
with bits = #3bd4f3c2 3699d4db 99d1ea94 2fecd7de
|
|
printf("%.35Lg") gives 1.234567890123456789e-321
|
|
g_Qfmt(0) gives 25 bytes: "1.234567890123456789e-321"
|
|
|
|
strtoIQ returns 17, consuming 25 bytes.
|
|
fI[0] = #3bd4f3c2 3699d4db 99d1ea94 2fecd7de
|
|
= 1.234567890123456789e-321
|
|
fI[1] = #3bd4f3c2 3699d4db 99d1ea94 2fecd7df
|
|
= 1.2345678901234567890000000000000001e-321
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: 1e23
|
|
|
|
strtoQ consumes 4 bytes and returns 1
|
|
with bits = #404b52d0 2c7e14af 68000000 0
|
|
printf("%.35Lg") gives 100000000000000000000000
|
|
g_Qfmt(0) gives 5 bytes: "1e+23"
|
|
|
|
strtoIQ returns 1, consuming 4 bytes.
|
|
fI[0] == fI[1] = #404b52d0 2c7e14af 68000000 0
|
|
= 100000000000000000000000
|
|
|
|
|
|
Input: 1e310
|
|
|
|
strtoQ consumes 5 bytes and returns 33
|
|
with bits = #4404bd03 c8140697 9e9ff00e fefd4cbd
|
|
printf("%.35Lg") gives 1e+310
|
|
g_Qfmt(0) gives 6 bytes: "1e+310"
|
|
|
|
strtoIQ returns 33, consuming 5 bytes.
|
|
fI[0] = #4404bd03 c8140697 9e9ff00e fefd4cbc
|
|
= 9.9999999999999999999999999999999992e+309
|
|
fI[1] = #4404bd03 c8140697 9e9ff00e fefd4cbd
|
|
= 1e+310
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: 9.0259718793241475e-277
|
|
|
|
strtoQ consumes 23 bytes and returns 17
|
|
with bits = #3c69ffff ffffffff f9ed5779 ac118fe1
|
|
printf("%.35Lg") gives 9.0259718793241474999999999999999997e-277
|
|
g_Qfmt(0) gives 23 bytes: "9.0259718793241475e-277"
|
|
|
|
strtoIQ returns 17, consuming 23 bytes.
|
|
fI[0] = #3c69ffff ffffffff f9ed5779 ac118fe1
|
|
= 9.0259718793241474999999999999999997e-277
|
|
fI[1] = #3c69ffff ffffffff f9ed5779 ac118fe2
|
|
= 9.0259718793241475000000000000000006e-277
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: 9.025971879324147880346310405869e-277
|
|
|
|
strtoQ consumes 37 bytes and returns 33
|
|
with bits = #3c6a0000 0 0 9a
|
|
printf("%.35Lg") gives 9.0259718793241478803463104058690004e-277
|
|
g_Qfmt(0) gives 37 bytes: "9.025971879324147880346310405869e-277"
|
|
|
|
strtoIQ returns 33, consuming 37 bytes.
|
|
fI[0] = #3c6a0000 0 0 99
|
|
= 9.0259718793241478803463104058689987e-277
|
|
fI[1] = #3c6a0000 0 0 9a
|
|
= 9.0259718793241478803463104058690004e-277
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: 9.025971879324147880346310405868e-277
|
|
|
|
strtoQ consumes 37 bytes and returns 17
|
|
with bits = #3c69ffff ffffffff ffffffff fffffcb5
|
|
printf("%.35Lg") gives 9.025971879324147880346310405868e-277
|
|
g_Qfmt(0) gives 37 bytes: "9.025971879324147880346310405868e-277"
|
|
|
|
strtoIQ returns 17, consuming 37 bytes.
|
|
fI[0] = #3c69ffff ffffffff ffffffff fffffcb5
|
|
= 9.025971879324147880346310405868e-277
|
|
fI[1] = #3c69ffff ffffffff ffffffff fffffcb6
|
|
= 9.0259718793241478803463104058680009e-277
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: 2.2250738585072014e-308
|
|
|
|
strtoQ consumes 23 bytes and returns 33
|
|
with bits = #3c010000 0 8c304c cf867de0
|
|
printf("%.35Lg") gives 2.2250738585072014000000000000000001e-308
|
|
g_Qfmt(0) gives 23 bytes: "2.2250738585072014e-308"
|
|
|
|
strtoIQ returns 33, consuming 23 bytes.
|
|
fI[0] = #3c010000 0 8c304c cf867ddf
|
|
= 2.2250738585072013999999999999999997e-308
|
|
fI[1] = #3c010000 0 8c304c cf867de0
|
|
= 2.2250738585072014000000000000000001e-308
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: 2.2250738585072013e-308
|
|
|
|
strtoQ consumes 23 bytes and returns 33
|
|
with bits = #3c00ffff ffffffff fa9e4c4f 4c1e8a10
|
|
printf("%.35Lg") gives 2.2250738585072013e-308
|
|
g_Qfmt(0) gives 23 bytes: "2.2250738585072013e-308"
|
|
|
|
strtoIQ returns 33, consuming 23 bytes.
|
|
fI[0] = #3c00ffff ffffffff fa9e4c4f 4c1e8a0f
|
|
= 2.2250738585072012999999999999999998e-308
|
|
fI[1] = #3c00ffff ffffffff fa9e4c4f 4c1e8a10
|
|
= 2.2250738585072013e-308
|
|
fI[1] == strtod
|
|
|
|
Rounding mode for strtor... changed from 1 (nearest) to 0 (toward zero)
|
|
|
|
Input: 1.1
|
|
|
|
strtoQ consumes 3 bytes and returns 17
|
|
with bits = #3fff1999 99999999 99999999 99999999
|
|
printf("%.35Lg") gives 1.0999999999999999999999999999999999
|
|
g_Qfmt(0) gives 36 bytes: "1.0999999999999999999999999999999999"
|
|
|
|
strtoIQ returns 33, consuming 3 bytes.
|
|
fI[0] = #3fff1999 99999999 99999999 99999999
|
|
= 1.0999999999999999999999999999999999
|
|
fI[1] = #3fff1999 99999999 99999999 9999999a
|
|
= 1.1000000000000000000000000000000001
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: -1.1
|
|
|
|
strtoQ consumes 4 bytes and returns 25
|
|
with bits = #bfff1999 99999999 99999999 99999999
|
|
printf("%.35Lg") gives -1.0999999999999999999999999999999999
|
|
g_Qfmt(0) gives 37 bytes: "-1.0999999999999999999999999999999999"
|
|
|
|
strtoIQ returns 41, consuming 4 bytes.
|
|
fI[0] = #bfff1999 99999999 99999999 9999999a
|
|
= -1.1000000000000000000000000000000001
|
|
fI[1] = #bfff1999 99999999 99999999 99999999
|
|
= -1.0999999999999999999999999999999999
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: 1.2
|
|
|
|
strtoQ consumes 3 bytes and returns 17
|
|
with bits = #3fff3333 33333333 33333333 33333333
|
|
printf("%.35Lg") gives 1.2
|
|
g_Qfmt(0) gives 3 bytes: "1.2"
|
|
|
|
strtoIQ returns 17, consuming 3 bytes.
|
|
fI[0] = #3fff3333 33333333 33333333 33333333
|
|
= 1.2
|
|
fI[1] = #3fff3333 33333333 33333333 33333334
|
|
= 1.2000000000000000000000000000000002
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: -1.2
|
|
|
|
strtoQ consumes 4 bytes and returns 25
|
|
with bits = #bfff3333 33333333 33333333 33333333
|
|
printf("%.35Lg") gives -1.2
|
|
g_Qfmt(0) gives 4 bytes: "-1.2"
|
|
|
|
strtoIQ returns 25, consuming 4 bytes.
|
|
fI[0] = #bfff3333 33333333 33333333 33333334
|
|
= -1.2000000000000000000000000000000002
|
|
fI[1] = #bfff3333 33333333 33333333 33333333
|
|
= -1.2
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: 1.3
|
|
|
|
strtoQ consumes 3 bytes and returns 17
|
|
with bits = #3fff4ccc cccccccc cccccccc cccccccc
|
|
printf("%.35Lg") gives 1.2999999999999999999999999999999998
|
|
g_Qfmt(0) gives 36 bytes: "1.2999999999999999999999999999999998"
|
|
|
|
strtoIQ returns 33, consuming 3 bytes.
|
|
fI[0] = #3fff4ccc cccccccc cccccccc cccccccc
|
|
= 1.2999999999999999999999999999999998
|
|
fI[1] = #3fff4ccc cccccccc cccccccc cccccccd
|
|
= 1.3
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: -1.3
|
|
|
|
strtoQ consumes 4 bytes and returns 25
|
|
with bits = #bfff4ccc cccccccc cccccccc cccccccc
|
|
printf("%.35Lg") gives -1.2999999999999999999999999999999998
|
|
g_Qfmt(0) gives 37 bytes: "-1.2999999999999999999999999999999998"
|
|
|
|
strtoIQ returns 41, consuming 4 bytes.
|
|
fI[0] = #bfff4ccc cccccccc cccccccc cccccccd
|
|
= -1.3
|
|
fI[1] = #bfff4ccc cccccccc cccccccc cccccccc
|
|
= -1.2999999999999999999999999999999998
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: 1.4
|
|
|
|
strtoQ consumes 3 bytes and returns 17
|
|
with bits = #3fff6666 66666666 66666666 66666666
|
|
printf("%.35Lg") gives 1.3999999999999999999999999999999999
|
|
g_Qfmt(0) gives 3 bytes: "1.4"
|
|
|
|
strtoIQ returns 17, consuming 3 bytes.
|
|
fI[0] = #3fff6666 66666666 66666666 66666666
|
|
= 1.3999999999999999999999999999999999
|
|
fI[1] = #3fff6666 66666666 66666666 66666667
|
|
= 1.4000000000000000000000000000000001
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: -1.4
|
|
|
|
strtoQ consumes 4 bytes and returns 25
|
|
with bits = #bfff6666 66666666 66666666 66666666
|
|
printf("%.35Lg") gives -1.3999999999999999999999999999999999
|
|
g_Qfmt(0) gives 4 bytes: "-1.4"
|
|
|
|
strtoIQ returns 25, consuming 4 bytes.
|
|
fI[0] = #bfff6666 66666666 66666666 66666667
|
|
= -1.4000000000000000000000000000000001
|
|
fI[1] = #bfff6666 66666666 66666666 66666666
|
|
= -1.3999999999999999999999999999999999
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: 1.5
|
|
|
|
strtoQ consumes 3 bytes and returns 1
|
|
with bits = #3fff8000 0 0 0
|
|
printf("%.35Lg") gives 1.5
|
|
g_Qfmt(0) gives 3 bytes: "1.5"
|
|
|
|
strtoIQ returns 1, consuming 3 bytes.
|
|
fI[0] == fI[1] = #3fff8000 0 0 0
|
|
= 1.5
|
|
|
|
|
|
Input: -1.5
|
|
|
|
strtoQ consumes 4 bytes and returns 9
|
|
with bits = #bfff8000 0 0 0
|
|
printf("%.35Lg") gives -1.5
|
|
g_Qfmt(0) gives 4 bytes: "-1.5"
|
|
|
|
strtoIQ returns 9, consuming 4 bytes.
|
|
fI[0] == fI[1] = #bfff8000 0 0 0
|
|
= -1.5
|
|
|
|
|
|
Input: 1.6
|
|
|
|
strtoQ consumes 3 bytes and returns 17
|
|
with bits = #3fff9999 99999999 99999999 99999999
|
|
printf("%.35Lg") gives 1.5999999999999999999999999999999999
|
|
g_Qfmt(0) gives 36 bytes: "1.5999999999999999999999999999999999"
|
|
|
|
strtoIQ returns 33, consuming 3 bytes.
|
|
fI[0] = #3fff9999 99999999 99999999 99999999
|
|
= 1.5999999999999999999999999999999999
|
|
fI[1] = #3fff9999 99999999 99999999 9999999a
|
|
= 1.6000000000000000000000000000000001
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: -1.6
|
|
|
|
strtoQ consumes 4 bytes and returns 25
|
|
with bits = #bfff9999 99999999 99999999 99999999
|
|
printf("%.35Lg") gives -1.5999999999999999999999999999999999
|
|
g_Qfmt(0) gives 37 bytes: "-1.5999999999999999999999999999999999"
|
|
|
|
strtoIQ returns 41, consuming 4 bytes.
|
|
fI[0] = #bfff9999 99999999 99999999 9999999a
|
|
= -1.6000000000000000000000000000000001
|
|
fI[1] = #bfff9999 99999999 99999999 99999999
|
|
= -1.5999999999999999999999999999999999
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: 1.7
|
|
|
|
strtoQ consumes 3 bytes and returns 17
|
|
with bits = #3fffb333 33333333 33333333 33333333
|
|
printf("%.35Lg") gives 1.7
|
|
g_Qfmt(0) gives 3 bytes: "1.7"
|
|
|
|
strtoIQ returns 17, consuming 3 bytes.
|
|
fI[0] = #3fffb333 33333333 33333333 33333333
|
|
= 1.7
|
|
fI[1] = #3fffb333 33333333 33333333 33333334
|
|
= 1.7000000000000000000000000000000002
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: -1.7
|
|
|
|
strtoQ consumes 4 bytes and returns 25
|
|
with bits = #bfffb333 33333333 33333333 33333333
|
|
printf("%.35Lg") gives -1.7
|
|
g_Qfmt(0) gives 4 bytes: "-1.7"
|
|
|
|
strtoIQ returns 25, consuming 4 bytes.
|
|
fI[0] = #bfffb333 33333333 33333333 33333334
|
|
= -1.7000000000000000000000000000000002
|
|
fI[1] = #bfffb333 33333333 33333333 33333333
|
|
= -1.7
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: 1.8
|
|
|
|
strtoQ consumes 3 bytes and returns 17
|
|
with bits = #3fffcccc cccccccc cccccccc cccccccc
|
|
printf("%.35Lg") gives 1.7999999999999999999999999999999998
|
|
g_Qfmt(0) gives 36 bytes: "1.7999999999999999999999999999999998"
|
|
|
|
strtoIQ returns 33, consuming 3 bytes.
|
|
fI[0] = #3fffcccc cccccccc cccccccc cccccccc
|
|
= 1.7999999999999999999999999999999998
|
|
fI[1] = #3fffcccc cccccccc cccccccc cccccccd
|
|
= 1.8
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: -1.8
|
|
|
|
strtoQ consumes 4 bytes and returns 25
|
|
with bits = #bfffcccc cccccccc cccccccc cccccccc
|
|
printf("%.35Lg") gives -1.7999999999999999999999999999999998
|
|
g_Qfmt(0) gives 37 bytes: "-1.7999999999999999999999999999999998"
|
|
|
|
strtoIQ returns 41, consuming 4 bytes.
|
|
fI[0] = #bfffcccc cccccccc cccccccc cccccccd
|
|
= -1.8
|
|
fI[1] = #bfffcccc cccccccc cccccccc cccccccc
|
|
= -1.7999999999999999999999999999999998
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: 1.9
|
|
|
|
strtoQ consumes 3 bytes and returns 17
|
|
with bits = #3fffe666 66666666 66666666 66666666
|
|
printf("%.35Lg") gives 1.8999999999999999999999999999999999
|
|
g_Qfmt(0) gives 3 bytes: "1.9"
|
|
|
|
strtoIQ returns 17, consuming 3 bytes.
|
|
fI[0] = #3fffe666 66666666 66666666 66666666
|
|
= 1.8999999999999999999999999999999999
|
|
fI[1] = #3fffe666 66666666 66666666 66666667
|
|
= 1.9000000000000000000000000000000001
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: -1.9
|
|
|
|
strtoQ consumes 4 bytes and returns 25
|
|
with bits = #bfffe666 66666666 66666666 66666666
|
|
printf("%.35Lg") gives -1.8999999999999999999999999999999999
|
|
g_Qfmt(0) gives 4 bytes: "-1.9"
|
|
|
|
strtoIQ returns 25, consuming 4 bytes.
|
|
fI[0] = #bfffe666 66666666 66666666 66666667
|
|
= -1.9000000000000000000000000000000001
|
|
fI[1] = #bfffe666 66666666 66666666 66666666
|
|
= -1.8999999999999999999999999999999999
|
|
fI[1] == strtod
|
|
|
|
Rounding mode for strtor... changed from 0 (toward zero) to 1 (nearest)
|
|
|
|
Input: 1.1
|
|
|
|
strtoQ consumes 3 bytes and returns 33
|
|
with bits = #3fff1999 99999999 99999999 9999999a
|
|
printf("%.35Lg") gives 1.1000000000000000000000000000000001
|
|
g_Qfmt(0) gives 3 bytes: "1.1"
|
|
|
|
strtoIQ returns 33, consuming 3 bytes.
|
|
fI[0] = #3fff1999 99999999 99999999 99999999
|
|
= 1.0999999999999999999999999999999999
|
|
fI[1] = #3fff1999 99999999 99999999 9999999a
|
|
= 1.1000000000000000000000000000000001
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: -1.1
|
|
|
|
strtoQ consumes 4 bytes and returns 41
|
|
with bits = #bfff1999 99999999 99999999 9999999a
|
|
printf("%.35Lg") gives -1.1000000000000000000000000000000001
|
|
g_Qfmt(0) gives 4 bytes: "-1.1"
|
|
|
|
strtoIQ returns 41, consuming 4 bytes.
|
|
fI[0] = #bfff1999 99999999 99999999 9999999a
|
|
= -1.1000000000000000000000000000000001
|
|
fI[1] = #bfff1999 99999999 99999999 99999999
|
|
= -1.0999999999999999999999999999999999
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: 1.2
|
|
|
|
strtoQ consumes 3 bytes and returns 17
|
|
with bits = #3fff3333 33333333 33333333 33333333
|
|
printf("%.35Lg") gives 1.2
|
|
g_Qfmt(0) gives 3 bytes: "1.2"
|
|
|
|
strtoIQ returns 17, consuming 3 bytes.
|
|
fI[0] = #3fff3333 33333333 33333333 33333333
|
|
= 1.2
|
|
fI[1] = #3fff3333 33333333 33333333 33333334
|
|
= 1.2000000000000000000000000000000002
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: -1.2
|
|
|
|
strtoQ consumes 4 bytes and returns 25
|
|
with bits = #bfff3333 33333333 33333333 33333333
|
|
printf("%.35Lg") gives -1.2
|
|
g_Qfmt(0) gives 4 bytes: "-1.2"
|
|
|
|
strtoIQ returns 25, consuming 4 bytes.
|
|
fI[0] = #bfff3333 33333333 33333333 33333334
|
|
= -1.2000000000000000000000000000000002
|
|
fI[1] = #bfff3333 33333333 33333333 33333333
|
|
= -1.2
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: 1.3
|
|
|
|
strtoQ consumes 3 bytes and returns 33
|
|
with bits = #3fff4ccc cccccccc cccccccc cccccccd
|
|
printf("%.35Lg") gives 1.3
|
|
g_Qfmt(0) gives 3 bytes: "1.3"
|
|
|
|
strtoIQ returns 33, consuming 3 bytes.
|
|
fI[0] = #3fff4ccc cccccccc cccccccc cccccccc
|
|
= 1.2999999999999999999999999999999998
|
|
fI[1] = #3fff4ccc cccccccc cccccccc cccccccd
|
|
= 1.3
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: -1.3
|
|
|
|
strtoQ consumes 4 bytes and returns 41
|
|
with bits = #bfff4ccc cccccccc cccccccc cccccccd
|
|
printf("%.35Lg") gives -1.3
|
|
g_Qfmt(0) gives 4 bytes: "-1.3"
|
|
|
|
strtoIQ returns 41, consuming 4 bytes.
|
|
fI[0] = #bfff4ccc cccccccc cccccccc cccccccd
|
|
= -1.3
|
|
fI[1] = #bfff4ccc cccccccc cccccccc cccccccc
|
|
= -1.2999999999999999999999999999999998
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: 1.4
|
|
|
|
strtoQ consumes 3 bytes and returns 17
|
|
with bits = #3fff6666 66666666 66666666 66666666
|
|
printf("%.35Lg") gives 1.3999999999999999999999999999999999
|
|
g_Qfmt(0) gives 3 bytes: "1.4"
|
|
|
|
strtoIQ returns 17, consuming 3 bytes.
|
|
fI[0] = #3fff6666 66666666 66666666 66666666
|
|
= 1.3999999999999999999999999999999999
|
|
fI[1] = #3fff6666 66666666 66666666 66666667
|
|
= 1.4000000000000000000000000000000001
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: -1.4
|
|
|
|
strtoQ consumes 4 bytes and returns 25
|
|
with bits = #bfff6666 66666666 66666666 66666666
|
|
printf("%.35Lg") gives -1.3999999999999999999999999999999999
|
|
g_Qfmt(0) gives 4 bytes: "-1.4"
|
|
|
|
strtoIQ returns 25, consuming 4 bytes.
|
|
fI[0] = #bfff6666 66666666 66666666 66666667
|
|
= -1.4000000000000000000000000000000001
|
|
fI[1] = #bfff6666 66666666 66666666 66666666
|
|
= -1.3999999999999999999999999999999999
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: 1.5
|
|
|
|
strtoQ consumes 3 bytes and returns 1
|
|
with bits = #3fff8000 0 0 0
|
|
printf("%.35Lg") gives 1.5
|
|
g_Qfmt(0) gives 3 bytes: "1.5"
|
|
|
|
strtoIQ returns 1, consuming 3 bytes.
|
|
fI[0] == fI[1] = #3fff8000 0 0 0
|
|
= 1.5
|
|
|
|
|
|
Input: -1.5
|
|
|
|
strtoQ consumes 4 bytes and returns 9
|
|
with bits = #bfff8000 0 0 0
|
|
printf("%.35Lg") gives -1.5
|
|
g_Qfmt(0) gives 4 bytes: "-1.5"
|
|
|
|
strtoIQ returns 9, consuming 4 bytes.
|
|
fI[0] == fI[1] = #bfff8000 0 0 0
|
|
= -1.5
|
|
|
|
|
|
Input: 1.6
|
|
|
|
strtoQ consumes 3 bytes and returns 33
|
|
with bits = #3fff9999 99999999 99999999 9999999a
|
|
printf("%.35Lg") gives 1.6000000000000000000000000000000001
|
|
g_Qfmt(0) gives 3 bytes: "1.6"
|
|
|
|
strtoIQ returns 33, consuming 3 bytes.
|
|
fI[0] = #3fff9999 99999999 99999999 99999999
|
|
= 1.5999999999999999999999999999999999
|
|
fI[1] = #3fff9999 99999999 99999999 9999999a
|
|
= 1.6000000000000000000000000000000001
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: -1.6
|
|
|
|
strtoQ consumes 4 bytes and returns 41
|
|
with bits = #bfff9999 99999999 99999999 9999999a
|
|
printf("%.35Lg") gives -1.6000000000000000000000000000000001
|
|
g_Qfmt(0) gives 4 bytes: "-1.6"
|
|
|
|
strtoIQ returns 41, consuming 4 bytes.
|
|
fI[0] = #bfff9999 99999999 99999999 9999999a
|
|
= -1.6000000000000000000000000000000001
|
|
fI[1] = #bfff9999 99999999 99999999 99999999
|
|
= -1.5999999999999999999999999999999999
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: 1.7
|
|
|
|
strtoQ consumes 3 bytes and returns 17
|
|
with bits = #3fffb333 33333333 33333333 33333333
|
|
printf("%.35Lg") gives 1.7
|
|
g_Qfmt(0) gives 3 bytes: "1.7"
|
|
|
|
strtoIQ returns 17, consuming 3 bytes.
|
|
fI[0] = #3fffb333 33333333 33333333 33333333
|
|
= 1.7
|
|
fI[1] = #3fffb333 33333333 33333333 33333334
|
|
= 1.7000000000000000000000000000000002
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: -1.7
|
|
|
|
strtoQ consumes 4 bytes and returns 25
|
|
with bits = #bfffb333 33333333 33333333 33333333
|
|
printf("%.35Lg") gives -1.7
|
|
g_Qfmt(0) gives 4 bytes: "-1.7"
|
|
|
|
strtoIQ returns 25, consuming 4 bytes.
|
|
fI[0] = #bfffb333 33333333 33333333 33333334
|
|
= -1.7000000000000000000000000000000002
|
|
fI[1] = #bfffb333 33333333 33333333 33333333
|
|
= -1.7
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: 1.8
|
|
|
|
strtoQ consumes 3 bytes and returns 33
|
|
with bits = #3fffcccc cccccccc cccccccc cccccccd
|
|
printf("%.35Lg") gives 1.8
|
|
g_Qfmt(0) gives 3 bytes: "1.8"
|
|
|
|
strtoIQ returns 33, consuming 3 bytes.
|
|
fI[0] = #3fffcccc cccccccc cccccccc cccccccc
|
|
= 1.7999999999999999999999999999999998
|
|
fI[1] = #3fffcccc cccccccc cccccccc cccccccd
|
|
= 1.8
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: -1.8
|
|
|
|
strtoQ consumes 4 bytes and returns 41
|
|
with bits = #bfffcccc cccccccc cccccccc cccccccd
|
|
printf("%.35Lg") gives -1.8
|
|
g_Qfmt(0) gives 4 bytes: "-1.8"
|
|
|
|
strtoIQ returns 41, consuming 4 bytes.
|
|
fI[0] = #bfffcccc cccccccc cccccccc cccccccd
|
|
= -1.8
|
|
fI[1] = #bfffcccc cccccccc cccccccc cccccccc
|
|
= -1.7999999999999999999999999999999998
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: 1.9
|
|
|
|
strtoQ consumes 3 bytes and returns 17
|
|
with bits = #3fffe666 66666666 66666666 66666666
|
|
printf("%.35Lg") gives 1.8999999999999999999999999999999999
|
|
g_Qfmt(0) gives 3 bytes: "1.9"
|
|
|
|
strtoIQ returns 17, consuming 3 bytes.
|
|
fI[0] = #3fffe666 66666666 66666666 66666666
|
|
= 1.8999999999999999999999999999999999
|
|
fI[1] = #3fffe666 66666666 66666666 66666667
|
|
= 1.9000000000000000000000000000000001
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: -1.9
|
|
|
|
strtoQ consumes 4 bytes and returns 25
|
|
with bits = #bfffe666 66666666 66666666 66666666
|
|
printf("%.35Lg") gives -1.8999999999999999999999999999999999
|
|
g_Qfmt(0) gives 4 bytes: "-1.9"
|
|
|
|
strtoIQ returns 25, consuming 4 bytes.
|
|
fI[0] = #bfffe666 66666666 66666666 66666667
|
|
= -1.9000000000000000000000000000000001
|
|
fI[1] = #bfffe666 66666666 66666666 66666666
|
|
= -1.8999999999999999999999999999999999
|
|
fI[1] == strtod
|
|
|
|
Rounding mode for strtor... changed from 1 (nearest) to 2 (toward +Infinity)
|
|
|
|
Input: 1.1
|
|
|
|
strtoQ consumes 3 bytes and returns 33
|
|
with bits = #3fff1999 99999999 99999999 9999999a
|
|
printf("%.35Lg") gives 1.1000000000000000000000000000000001
|
|
g_Qfmt(0) gives 3 bytes: "1.1"
|
|
|
|
strtoIQ returns 33, consuming 3 bytes.
|
|
fI[0] = #3fff1999 99999999 99999999 99999999
|
|
= 1.0999999999999999999999999999999999
|
|
fI[1] = #3fff1999 99999999 99999999 9999999a
|
|
= 1.1000000000000000000000000000000001
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: -1.1
|
|
|
|
strtoQ consumes 4 bytes and returns 25
|
|
with bits = #bfff1999 99999999 99999999 99999999
|
|
printf("%.35Lg") gives -1.0999999999999999999999999999999999
|
|
g_Qfmt(0) gives 37 bytes: "-1.0999999999999999999999999999999999"
|
|
|
|
strtoIQ returns 41, consuming 4 bytes.
|
|
fI[0] = #bfff1999 99999999 99999999 9999999a
|
|
= -1.1000000000000000000000000000000001
|
|
fI[1] = #bfff1999 99999999 99999999 99999999
|
|
= -1.0999999999999999999999999999999999
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: 1.2
|
|
|
|
strtoQ consumes 3 bytes and returns 33
|
|
with bits = #3fff3333 33333333 33333333 33333334
|
|
printf("%.35Lg") gives 1.2000000000000000000000000000000002
|
|
g_Qfmt(0) gives 36 bytes: "1.2000000000000000000000000000000002"
|
|
|
|
strtoIQ returns 17, consuming 3 bytes.
|
|
fI[0] = #3fff3333 33333333 33333333 33333333
|
|
= 1.2
|
|
fI[1] = #3fff3333 33333333 33333333 33333334
|
|
= 1.2000000000000000000000000000000002
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: -1.2
|
|
|
|
strtoQ consumes 4 bytes and returns 25
|
|
with bits = #bfff3333 33333333 33333333 33333333
|
|
printf("%.35Lg") gives -1.2
|
|
g_Qfmt(0) gives 4 bytes: "-1.2"
|
|
|
|
strtoIQ returns 25, consuming 4 bytes.
|
|
fI[0] = #bfff3333 33333333 33333333 33333334
|
|
= -1.2000000000000000000000000000000002
|
|
fI[1] = #bfff3333 33333333 33333333 33333333
|
|
= -1.2
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: 1.3
|
|
|
|
strtoQ consumes 3 bytes and returns 33
|
|
with bits = #3fff4ccc cccccccc cccccccc cccccccd
|
|
printf("%.35Lg") gives 1.3
|
|
g_Qfmt(0) gives 3 bytes: "1.3"
|
|
|
|
strtoIQ returns 33, consuming 3 bytes.
|
|
fI[0] = #3fff4ccc cccccccc cccccccc cccccccc
|
|
= 1.2999999999999999999999999999999998
|
|
fI[1] = #3fff4ccc cccccccc cccccccc cccccccd
|
|
= 1.3
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: -1.3
|
|
|
|
strtoQ consumes 4 bytes and returns 25
|
|
with bits = #bfff4ccc cccccccc cccccccc cccccccc
|
|
printf("%.35Lg") gives -1.2999999999999999999999999999999998
|
|
g_Qfmt(0) gives 37 bytes: "-1.2999999999999999999999999999999998"
|
|
|
|
strtoIQ returns 41, consuming 4 bytes.
|
|
fI[0] = #bfff4ccc cccccccc cccccccc cccccccd
|
|
= -1.3
|
|
fI[1] = #bfff4ccc cccccccc cccccccc cccccccc
|
|
= -1.2999999999999999999999999999999998
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: 1.4
|
|
|
|
strtoQ consumes 3 bytes and returns 33
|
|
with bits = #3fff6666 66666666 66666666 66666667
|
|
printf("%.35Lg") gives 1.4000000000000000000000000000000001
|
|
g_Qfmt(0) gives 36 bytes: "1.4000000000000000000000000000000001"
|
|
|
|
strtoIQ returns 17, consuming 3 bytes.
|
|
fI[0] = #3fff6666 66666666 66666666 66666666
|
|
= 1.3999999999999999999999999999999999
|
|
fI[1] = #3fff6666 66666666 66666666 66666667
|
|
= 1.4000000000000000000000000000000001
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: -1.4
|
|
|
|
strtoQ consumes 4 bytes and returns 25
|
|
with bits = #bfff6666 66666666 66666666 66666666
|
|
printf("%.35Lg") gives -1.3999999999999999999999999999999999
|
|
g_Qfmt(0) gives 4 bytes: "-1.4"
|
|
|
|
strtoIQ returns 25, consuming 4 bytes.
|
|
fI[0] = #bfff6666 66666666 66666666 66666667
|
|
= -1.4000000000000000000000000000000001
|
|
fI[1] = #bfff6666 66666666 66666666 66666666
|
|
= -1.3999999999999999999999999999999999
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: 1.5
|
|
|
|
strtoQ consumes 3 bytes and returns 1
|
|
with bits = #3fff8000 0 0 0
|
|
printf("%.35Lg") gives 1.5
|
|
g_Qfmt(0) gives 3 bytes: "1.5"
|
|
|
|
strtoIQ returns 1, consuming 3 bytes.
|
|
fI[0] == fI[1] = #3fff8000 0 0 0
|
|
= 1.5
|
|
|
|
|
|
Input: -1.5
|
|
|
|
strtoQ consumes 4 bytes and returns 9
|
|
with bits = #bfff8000 0 0 0
|
|
printf("%.35Lg") gives -1.5
|
|
g_Qfmt(0) gives 4 bytes: "-1.5"
|
|
|
|
strtoIQ returns 9, consuming 4 bytes.
|
|
fI[0] == fI[1] = #bfff8000 0 0 0
|
|
= -1.5
|
|
|
|
|
|
Input: 1.6
|
|
|
|
strtoQ consumes 3 bytes and returns 33
|
|
with bits = #3fff9999 99999999 99999999 9999999a
|
|
printf("%.35Lg") gives 1.6000000000000000000000000000000001
|
|
g_Qfmt(0) gives 3 bytes: "1.6"
|
|
|
|
strtoIQ returns 33, consuming 3 bytes.
|
|
fI[0] = #3fff9999 99999999 99999999 99999999
|
|
= 1.5999999999999999999999999999999999
|
|
fI[1] = #3fff9999 99999999 99999999 9999999a
|
|
= 1.6000000000000000000000000000000001
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: -1.6
|
|
|
|
strtoQ consumes 4 bytes and returns 25
|
|
with bits = #bfff9999 99999999 99999999 99999999
|
|
printf("%.35Lg") gives -1.5999999999999999999999999999999999
|
|
g_Qfmt(0) gives 37 bytes: "-1.5999999999999999999999999999999999"
|
|
|
|
strtoIQ returns 41, consuming 4 bytes.
|
|
fI[0] = #bfff9999 99999999 99999999 9999999a
|
|
= -1.6000000000000000000000000000000001
|
|
fI[1] = #bfff9999 99999999 99999999 99999999
|
|
= -1.5999999999999999999999999999999999
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: 1.7
|
|
|
|
strtoQ consumes 3 bytes and returns 33
|
|
with bits = #3fffb333 33333333 33333333 33333334
|
|
printf("%.35Lg") gives 1.7000000000000000000000000000000002
|
|
g_Qfmt(0) gives 36 bytes: "1.7000000000000000000000000000000002"
|
|
|
|
strtoIQ returns 17, consuming 3 bytes.
|
|
fI[0] = #3fffb333 33333333 33333333 33333333
|
|
= 1.7
|
|
fI[1] = #3fffb333 33333333 33333333 33333334
|
|
= 1.7000000000000000000000000000000002
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: -1.7
|
|
|
|
strtoQ consumes 4 bytes and returns 25
|
|
with bits = #bfffb333 33333333 33333333 33333333
|
|
printf("%.35Lg") gives -1.7
|
|
g_Qfmt(0) gives 4 bytes: "-1.7"
|
|
|
|
strtoIQ returns 25, consuming 4 bytes.
|
|
fI[0] = #bfffb333 33333333 33333333 33333334
|
|
= -1.7000000000000000000000000000000002
|
|
fI[1] = #bfffb333 33333333 33333333 33333333
|
|
= -1.7
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: 1.8
|
|
|
|
strtoQ consumes 3 bytes and returns 33
|
|
with bits = #3fffcccc cccccccc cccccccc cccccccd
|
|
printf("%.35Lg") gives 1.8
|
|
g_Qfmt(0) gives 3 bytes: "1.8"
|
|
|
|
strtoIQ returns 33, consuming 3 bytes.
|
|
fI[0] = #3fffcccc cccccccc cccccccc cccccccc
|
|
= 1.7999999999999999999999999999999998
|
|
fI[1] = #3fffcccc cccccccc cccccccc cccccccd
|
|
= 1.8
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: -1.8
|
|
|
|
strtoQ consumes 4 bytes and returns 25
|
|
with bits = #bfffcccc cccccccc cccccccc cccccccc
|
|
printf("%.35Lg") gives -1.7999999999999999999999999999999998
|
|
g_Qfmt(0) gives 37 bytes: "-1.7999999999999999999999999999999998"
|
|
|
|
strtoIQ returns 41, consuming 4 bytes.
|
|
fI[0] = #bfffcccc cccccccc cccccccc cccccccd
|
|
= -1.8
|
|
fI[1] = #bfffcccc cccccccc cccccccc cccccccc
|
|
= -1.7999999999999999999999999999999998
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: 1.9
|
|
|
|
strtoQ consumes 3 bytes and returns 33
|
|
with bits = #3fffe666 66666666 66666666 66666667
|
|
printf("%.35Lg") gives 1.9000000000000000000000000000000001
|
|
g_Qfmt(0) gives 36 bytes: "1.9000000000000000000000000000000001"
|
|
|
|
strtoIQ returns 17, consuming 3 bytes.
|
|
fI[0] = #3fffe666 66666666 66666666 66666666
|
|
= 1.8999999999999999999999999999999999
|
|
fI[1] = #3fffe666 66666666 66666666 66666667
|
|
= 1.9000000000000000000000000000000001
|
|
fI[1] == strtod
|
|
|
|
|
|
Input: -1.9
|
|
|
|
strtoQ consumes 4 bytes and returns 25
|
|
with bits = #bfffe666 66666666 66666666 66666666
|
|
printf("%.35Lg") gives -1.8999999999999999999999999999999999
|
|
g_Qfmt(0) gives 4 bytes: "-1.9"
|
|
|
|
strtoIQ returns 25, consuming 4 bytes.
|
|
fI[0] = #bfffe666 66666666 66666666 66666667
|
|
= -1.9000000000000000000000000000000001
|
|
fI[1] = #bfffe666 66666666 66666666 66666666
|
|
= -1.8999999999999999999999999999999999
|
|
fI[1] == strtod
|
|
|
|
Rounding mode for strtor... changed from 2 (toward +Infinity) to 3 (toward -Infinity)
|
|
|
|
Input: 1.1
|
|
|
|
strtoQ consumes 3 bytes and returns 17
|
|
with bits = #3fff1999 99999999 99999999 99999999
|
|
printf("%.35Lg") gives 1.0999999999999999999999999999999999
|
|
g_Qfmt(0) gives 36 bytes: "1.0999999999999999999999999999999999"
|
|
|
|
strtoIQ returns 33, consuming 3 bytes.
|
|
fI[0] = #3fff1999 99999999 99999999 99999999
|
|
= 1.0999999999999999999999999999999999
|
|
fI[1] = #3fff1999 99999999 99999999 9999999a
|
|
= 1.1000000000000000000000000000000001
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: -1.1
|
|
|
|
strtoQ consumes 4 bytes and returns 41
|
|
with bits = #bfff1999 99999999 99999999 9999999a
|
|
printf("%.35Lg") gives -1.1000000000000000000000000000000001
|
|
g_Qfmt(0) gives 4 bytes: "-1.1"
|
|
|
|
strtoIQ returns 41, consuming 4 bytes.
|
|
fI[0] = #bfff1999 99999999 99999999 9999999a
|
|
= -1.1000000000000000000000000000000001
|
|
fI[1] = #bfff1999 99999999 99999999 99999999
|
|
= -1.0999999999999999999999999999999999
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: 1.2
|
|
|
|
strtoQ consumes 3 bytes and returns 17
|
|
with bits = #3fff3333 33333333 33333333 33333333
|
|
printf("%.35Lg") gives 1.2
|
|
g_Qfmt(0) gives 3 bytes: "1.2"
|
|
|
|
strtoIQ returns 17, consuming 3 bytes.
|
|
fI[0] = #3fff3333 33333333 33333333 33333333
|
|
= 1.2
|
|
fI[1] = #3fff3333 33333333 33333333 33333334
|
|
= 1.2000000000000000000000000000000002
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: -1.2
|
|
|
|
strtoQ consumes 4 bytes and returns 41
|
|
with bits = #bfff3333 33333333 33333333 33333334
|
|
printf("%.35Lg") gives -1.2000000000000000000000000000000002
|
|
g_Qfmt(0) gives 37 bytes: "-1.2000000000000000000000000000000002"
|
|
|
|
strtoIQ returns 25, consuming 4 bytes.
|
|
fI[0] = #bfff3333 33333333 33333333 33333334
|
|
= -1.2000000000000000000000000000000002
|
|
fI[1] = #bfff3333 33333333 33333333 33333333
|
|
= -1.2
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: 1.3
|
|
|
|
strtoQ consumes 3 bytes and returns 17
|
|
with bits = #3fff4ccc cccccccc cccccccc cccccccc
|
|
printf("%.35Lg") gives 1.2999999999999999999999999999999998
|
|
g_Qfmt(0) gives 36 bytes: "1.2999999999999999999999999999999998"
|
|
|
|
strtoIQ returns 33, consuming 3 bytes.
|
|
fI[0] = #3fff4ccc cccccccc cccccccc cccccccc
|
|
= 1.2999999999999999999999999999999998
|
|
fI[1] = #3fff4ccc cccccccc cccccccc cccccccd
|
|
= 1.3
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: -1.3
|
|
|
|
strtoQ consumes 4 bytes and returns 41
|
|
with bits = #bfff4ccc cccccccc cccccccc cccccccd
|
|
printf("%.35Lg") gives -1.3
|
|
g_Qfmt(0) gives 4 bytes: "-1.3"
|
|
|
|
strtoIQ returns 41, consuming 4 bytes.
|
|
fI[0] = #bfff4ccc cccccccc cccccccc cccccccd
|
|
= -1.3
|
|
fI[1] = #bfff4ccc cccccccc cccccccc cccccccc
|
|
= -1.2999999999999999999999999999999998
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: 1.4
|
|
|
|
strtoQ consumes 3 bytes and returns 17
|
|
with bits = #3fff6666 66666666 66666666 66666666
|
|
printf("%.35Lg") gives 1.3999999999999999999999999999999999
|
|
g_Qfmt(0) gives 3 bytes: "1.4"
|
|
|
|
strtoIQ returns 17, consuming 3 bytes.
|
|
fI[0] = #3fff6666 66666666 66666666 66666666
|
|
= 1.3999999999999999999999999999999999
|
|
fI[1] = #3fff6666 66666666 66666666 66666667
|
|
= 1.4000000000000000000000000000000001
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: -1.4
|
|
|
|
strtoQ consumes 4 bytes and returns 41
|
|
with bits = #bfff6666 66666666 66666666 66666667
|
|
printf("%.35Lg") gives -1.4000000000000000000000000000000001
|
|
g_Qfmt(0) gives 37 bytes: "-1.4000000000000000000000000000000001"
|
|
|
|
strtoIQ returns 25, consuming 4 bytes.
|
|
fI[0] = #bfff6666 66666666 66666666 66666667
|
|
= -1.4000000000000000000000000000000001
|
|
fI[1] = #bfff6666 66666666 66666666 66666666
|
|
= -1.3999999999999999999999999999999999
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: 1.5
|
|
|
|
strtoQ consumes 3 bytes and returns 1
|
|
with bits = #3fff8000 0 0 0
|
|
printf("%.35Lg") gives 1.5
|
|
g_Qfmt(0) gives 3 bytes: "1.5"
|
|
|
|
strtoIQ returns 1, consuming 3 bytes.
|
|
fI[0] == fI[1] = #3fff8000 0 0 0
|
|
= 1.5
|
|
|
|
|
|
Input: -1.5
|
|
|
|
strtoQ consumes 4 bytes and returns 9
|
|
with bits = #bfff8000 0 0 0
|
|
printf("%.35Lg") gives -1.5
|
|
g_Qfmt(0) gives 4 bytes: "-1.5"
|
|
|
|
strtoIQ returns 9, consuming 4 bytes.
|
|
fI[0] == fI[1] = #bfff8000 0 0 0
|
|
= -1.5
|
|
|
|
|
|
Input: 1.6
|
|
|
|
strtoQ consumes 3 bytes and returns 17
|
|
with bits = #3fff9999 99999999 99999999 99999999
|
|
printf("%.35Lg") gives 1.5999999999999999999999999999999999
|
|
g_Qfmt(0) gives 36 bytes: "1.5999999999999999999999999999999999"
|
|
|
|
strtoIQ returns 33, consuming 3 bytes.
|
|
fI[0] = #3fff9999 99999999 99999999 99999999
|
|
= 1.5999999999999999999999999999999999
|
|
fI[1] = #3fff9999 99999999 99999999 9999999a
|
|
= 1.6000000000000000000000000000000001
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: -1.6
|
|
|
|
strtoQ consumes 4 bytes and returns 41
|
|
with bits = #bfff9999 99999999 99999999 9999999a
|
|
printf("%.35Lg") gives -1.6000000000000000000000000000000001
|
|
g_Qfmt(0) gives 4 bytes: "-1.6"
|
|
|
|
strtoIQ returns 41, consuming 4 bytes.
|
|
fI[0] = #bfff9999 99999999 99999999 9999999a
|
|
= -1.6000000000000000000000000000000001
|
|
fI[1] = #bfff9999 99999999 99999999 99999999
|
|
= -1.5999999999999999999999999999999999
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: 1.7
|
|
|
|
strtoQ consumes 3 bytes and returns 17
|
|
with bits = #3fffb333 33333333 33333333 33333333
|
|
printf("%.35Lg") gives 1.7
|
|
g_Qfmt(0) gives 3 bytes: "1.7"
|
|
|
|
strtoIQ returns 17, consuming 3 bytes.
|
|
fI[0] = #3fffb333 33333333 33333333 33333333
|
|
= 1.7
|
|
fI[1] = #3fffb333 33333333 33333333 33333334
|
|
= 1.7000000000000000000000000000000002
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: -1.7
|
|
|
|
strtoQ consumes 4 bytes and returns 41
|
|
with bits = #bfffb333 33333333 33333333 33333334
|
|
printf("%.35Lg") gives -1.7000000000000000000000000000000002
|
|
g_Qfmt(0) gives 37 bytes: "-1.7000000000000000000000000000000002"
|
|
|
|
strtoIQ returns 25, consuming 4 bytes.
|
|
fI[0] = #bfffb333 33333333 33333333 33333334
|
|
= -1.7000000000000000000000000000000002
|
|
fI[1] = #bfffb333 33333333 33333333 33333333
|
|
= -1.7
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: 1.8
|
|
|
|
strtoQ consumes 3 bytes and returns 17
|
|
with bits = #3fffcccc cccccccc cccccccc cccccccc
|
|
printf("%.35Lg") gives 1.7999999999999999999999999999999998
|
|
g_Qfmt(0) gives 36 bytes: "1.7999999999999999999999999999999998"
|
|
|
|
strtoIQ returns 33, consuming 3 bytes.
|
|
fI[0] = #3fffcccc cccccccc cccccccc cccccccc
|
|
= 1.7999999999999999999999999999999998
|
|
fI[1] = #3fffcccc cccccccc cccccccc cccccccd
|
|
= 1.8
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: -1.8
|
|
|
|
strtoQ consumes 4 bytes and returns 41
|
|
with bits = #bfffcccc cccccccc cccccccc cccccccd
|
|
printf("%.35Lg") gives -1.8
|
|
g_Qfmt(0) gives 4 bytes: "-1.8"
|
|
|
|
strtoIQ returns 41, consuming 4 bytes.
|
|
fI[0] = #bfffcccc cccccccc cccccccc cccccccd
|
|
= -1.8
|
|
fI[1] = #bfffcccc cccccccc cccccccc cccccccc
|
|
= -1.7999999999999999999999999999999998
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: 1.9
|
|
|
|
strtoQ consumes 3 bytes and returns 17
|
|
with bits = #3fffe666 66666666 66666666 66666666
|
|
printf("%.35Lg") gives 1.8999999999999999999999999999999999
|
|
g_Qfmt(0) gives 3 bytes: "1.9"
|
|
|
|
strtoIQ returns 17, consuming 3 bytes.
|
|
fI[0] = #3fffe666 66666666 66666666 66666666
|
|
= 1.8999999999999999999999999999999999
|
|
fI[1] = #3fffe666 66666666 66666666 66666667
|
|
= 1.9000000000000000000000000000000001
|
|
fI[0] == strtod
|
|
|
|
|
|
Input: -1.9
|
|
|
|
strtoQ consumes 4 bytes and returns 41
|
|
with bits = #bfffe666 66666666 66666666 66666667
|
|
printf("%.35Lg") gives -1.9000000000000000000000000000000001
|
|
g_Qfmt(0) gives 37 bytes: "-1.9000000000000000000000000000000001"
|
|
|
|
strtoIQ returns 25, consuming 4 bytes.
|
|
fI[0] = #bfffe666 66666666 66666666 66666667
|
|
= -1.9000000000000000000000000000000001
|
|
fI[1] = #bfffe666 66666666 66666666 66666666
|
|
= -1.8999999999999999999999999999999999
|
|
fI[0] == strtod
|
|
|