1 2Input: 1.23 3 4strtox consumes 4 bytes and returns 33 5with bits = #3fff 9d70 a3d7 a3d 70a4 6printf("%.21Lg") gives 1.23000000000000000002 7g_xfmt(0) gives 4 bytes: "1.23" 8 9strtoIx returns 33, consuming 4 bytes. 10fI[0] = #3fff 9d70 a3d7 a3d 70a3 11= 1.22999999999999999991 12fI[1] = #3fff 9d70 a3d7 a3d 70a4 13= 1.23000000000000000002 14fI[1] == strtox 15 16 17Input: 1.23e+20 18 19strtox consumes 8 bytes and returns 1 20with bits = #4041 d55e f90a 2da1 8000 21printf("%.21Lg") gives 123000000000000000000 22g_xfmt(0) gives 8 bytes: "1.23e+20" 23 24strtoIx returns 1, consuming 8 bytes. 25fI[0] == fI[1] == strtox 26 27 28Input: 1.23e-20 29 30strtox consumes 8 bytes and returns 17 31with bits = #3fbc e857 267b b3a9 84f2 32printf("%.21Lg") gives 1.22999999999999999997e-20 33g_xfmt(0) gives 8 bytes: "1.23e-20" 34 35strtoIx returns 17, consuming 8 bytes. 36fI[0] = #3fbc e857 267b b3a9 84f2 37= 1.22999999999999999997e-20 38fI[1] = #3fbc e857 267b b3a9 84f3 39= 1.23000000000000000004e-20 40fI[0] == strtox 41 42 43Input: 1.23456789 44 45strtox consumes 10 bytes and returns 33 46with bits = #3fff 9e06 5214 1ef0 dbf6 47printf("%.21Lg") gives 1.23456789000000000003 48g_xfmt(0) gives 10 bytes: "1.23456789" 49 50strtoIx returns 33, consuming 10 bytes. 51fI[0] = #3fff 9e06 5214 1ef0 dbf5 52= 1.23456788999999999992 53fI[1] = #3fff 9e06 5214 1ef0 dbf6 54= 1.23456789000000000003 55fI[1] == strtox 56 57 58Input: 1.23456589e+20 59 60strtox consumes 14 bytes and returns 1 61with bits = #4041 d629 bd33 5cc ba00 62printf("%.21Lg") gives 123456589000000000000 63g_xfmt(0) gives 14 bytes: "1.23456589e+20" 64 65strtoIx returns 1, consuming 14 bytes. 66fI[0] == fI[1] == strtox 67 68 69Input: 1.23e+30 70 71strtox consumes 8 bytes and returns 17 72with bits = #4062 f865 8274 7dbc 824a 73printf("%.21Lg") gives 1.22999999999999999999e+30 74g_xfmt(0) gives 8 bytes: "1.23e+30" 75 76strtoIx returns 17, consuming 8 bytes. 77fI[0] = #4062 f865 8274 7dbc 824a 78= 1.22999999999999999999e+30 79fI[1] = #4062 f865 8274 7dbc 824b 80= 1.23000000000000000006e+30 81fI[0] == strtox 82 83 84Input: 1.23e-30 85 86strtox consumes 8 bytes and returns 17 87with bits = #3f9b c794 337a 8085 54eb 88printf("%.21Lg") gives 1.22999999999999999999e-30 89g_xfmt(0) gives 8 bytes: "1.23e-30" 90 91strtoIx returns 17, consuming 8 bytes. 92fI[0] = #3f9b c794 337a 8085 54eb 93= 1.22999999999999999999e-30 94fI[1] = #3f9b c794 337a 8085 54ec 95= 1.23000000000000000007e-30 96fI[0] == strtox 97 98 99Input: 1.23456789e-20 100 101strtox consumes 14 bytes and returns 17 102with bits = #3fbc e934 a38 f3d6 d352 103printf("%.21Lg") gives 1.23456788999999999998e-20 104g_xfmt(0) gives 14 bytes: "1.23456789e-20" 105 106strtoIx returns 17, consuming 14 bytes. 107fI[0] = #3fbc e934 a38 f3d6 d352 108= 1.23456788999999999998e-20 109fI[1] = #3fbc e934 a38 f3d6 d353 110= 1.23456789000000000005e-20 111fI[0] == strtox 112 113 114Input: 1.23456789e-30 115 116strtox consumes 14 bytes and returns 17 117with bits = #3f9b c851 f19d decc a8fc 118printf("%.21Lg") gives 1.23456788999999999999e-30 119g_xfmt(0) gives 14 bytes: "1.23456789e-30" 120 121strtoIx returns 17, consuming 14 bytes. 122fI[0] = #3f9b c851 f19d decc a8fc 123= 1.23456788999999999999e-30 124fI[1] = #3f9b c851 f19d decc a8fd 125= 1.23456789000000000007e-30 126fI[0] == strtox 127 128 129Input: 1.234567890123456789 130 131strtox consumes 20 bytes and returns 17 132with bits = #3fff 9e06 5214 62cf db8d 133printf("%.21Lg") gives 1.23456789012345678899 134g_xfmt(0) gives 20 bytes: "1.234567890123456789" 135 136strtoIx returns 17, consuming 20 bytes. 137fI[0] = #3fff 9e06 5214 62cf db8d 138= 1.23456789012345678899 139fI[1] = #3fff 9e06 5214 62cf db8e 140= 1.23456789012345678909 141fI[0] == strtox 142 143 144Input: 1.23456789012345678901234567890123456789 145 146strtox consumes 40 bytes and returns 17 147with bits = #3fff 9e06 5214 62cf db8d 148printf("%.21Lg") gives 1.23456789012345678899 149g_xfmt(0) gives 20 bytes: "1.234567890123456789" 150 151strtoIx returns 17, consuming 40 bytes. 152fI[0] = #3fff 9e06 5214 62cf db8d 153= 1.23456789012345678899 154fI[1] = #3fff 9e06 5214 62cf db8e 155= 1.23456789012345678909 156fI[0] == strtox 157 158 159Input: 1.23e306 160 161strtox consumes 8 bytes and returns 17 162with bits = #43f7 e033 b668 e30f a6d5 163printf("%.21Lg") gives 1.22999999999999999997e+306 164g_xfmt(0) gives 9 bytes: "1.23e+306" 165 166strtoIx returns 17, consuming 8 bytes. 167fI[0] = #43f7 e033 b668 e30f a6d5 168= 1.22999999999999999997e+306 169fI[1] = #43f7 e033 b668 e30f a6d6 170= 1.23000000000000000005e+306 171fI[0] == strtox 172 173 174Input: 1.23e-306 175 176strtox consumes 9 bytes and returns 33 177with bits = #3c06 dd1d c2ed 1cb7 3f25 178printf("%.21Lg") gives 1.23000000000000000002e-306 179g_xfmt(0) gives 9 bytes: "1.23e-306" 180 181strtoIx returns 33, consuming 9 bytes. 182fI[0] = #3c06 dd1d c2ed 1cb7 3f24 183= 1.22999999999999999995e-306 184fI[1] = #3c06 dd1d c2ed 1cb7 3f25 185= 1.23000000000000000002e-306 186fI[1] == strtox 187 188 189Input: 1.23e-320 190 191strtox consumes 9 bytes and returns 33 192with bits = #3bd8 9b98 c371 844c 3f1a 193printf("%.21Lg") gives 1.23000000000000000002e-320 194g_xfmt(0) gives 9 bytes: "1.23e-320" 195 196strtoIx returns 33, consuming 9 bytes. 197fI[0] = #3bd8 9b98 c371 844c 3f19 198= 1.22999999999999999991e-320 199fI[1] = #3bd8 9b98 c371 844c 3f1a 200= 1.23000000000000000002e-320 201fI[1] == strtox 202 203 204Input: 1.23e-20 205 206strtox consumes 8 bytes and returns 17 207with bits = #3fbc e857 267b b3a9 84f2 208printf("%.21Lg") gives 1.22999999999999999997e-20 209g_xfmt(0) gives 8 bytes: "1.23e-20" 210 211strtoIx returns 17, consuming 8 bytes. 212fI[0] = #3fbc e857 267b b3a9 84f2 213= 1.22999999999999999997e-20 214fI[1] = #3fbc e857 267b b3a9 84f3 215= 1.23000000000000000004e-20 216fI[0] == strtox 217 218 219Input: 1.23456789e307 220 221strtox consumes 14 bytes and returns 17 222with bits = #43fb 8ca5 8a5e d766 de75 223printf("%.21Lg") gives 1.23456788999999999998e+307 224g_xfmt(0) gives 15 bytes: "1.23456789e+307" 225 226strtoIx returns 17, consuming 14 bytes. 227fI[0] = #43fb 8ca5 8a5e d766 de75 228= 1.23456788999999999998e+307 229fI[1] = #43fb 8ca5 8a5e d766 de76 230= 1.23456789000000000011e+307 231fI[0] == strtox 232 233 234Input: 1.23456589e-307 235 236strtox consumes 15 bytes and returns 17 237with bits = #3c03 b18c b5dc c22f d369 238printf("%.21Lg") gives 1.23456588999999999999e-307 239g_xfmt(0) gives 15 bytes: "1.23456589e-307" 240 241strtoIx returns 17, consuming 15 bytes. 242fI[0] = #3c03 b18c b5dc c22f d369 243= 1.23456588999999999999e-307 244fI[1] = #3c03 b18c b5dc c22f d36a 245= 1.23456589000000000009e-307 246fI[0] == strtox 247 248 249Input: 1.234567890123456789 250 251strtox consumes 20 bytes and returns 17 252with bits = #3fff 9e06 5214 62cf db8d 253printf("%.21Lg") gives 1.23456789012345678899 254g_xfmt(0) gives 20 bytes: "1.234567890123456789" 255 256strtoIx returns 17, consuming 20 bytes. 257fI[0] = #3fff 9e06 5214 62cf db8d 258= 1.23456789012345678899 259fI[1] = #3fff 9e06 5214 62cf db8e 260= 1.23456789012345678909 261fI[0] == strtox 262 263 264Input: 1.234567890123456789e301 265 266strtox consumes 24 bytes and returns 33 267with bits = #43e7 937a 8baf ab20 980c 268printf("%.21Lg") gives 1.234567890123456789e+301 269g_xfmt(0) gives 25 bytes: "1.234567890123456789e+301" 270 271strtoIx returns 33, consuming 24 bytes. 272fI[0] = #43e7 937a 8baf ab20 980b 273= 1.23456789012345678889e+301 274fI[1] = #43e7 937a 8baf ab20 980c 275= 1.234567890123456789e+301 276fI[1] == strtox 277 278 279Input: 1.234567890123456789e-301 280 281strtox consumes 25 bytes and returns 33 282with bits = #3c17 a953 271a 5d06 9ad9 283printf("%.21Lg") gives 1.23456789012345678902e-301 284g_xfmt(0) gives 25 bytes: "1.234567890123456789e-301" 285 286strtoIx returns 33, consuming 25 bytes. 287fI[0] = #3c17 a953 271a 5d06 9ad8 288= 1.23456789012345678892e-301 289fI[1] = #3c17 a953 271a 5d06 9ad9 290= 1.23456789012345678902e-301 291fI[1] == strtox 292 293 294Input: 1.234567890123456789e-321 295 296strtox consumes 25 bytes and returns 33 297with bits = #3bd4 f9e1 1b4c ea6d cce9 298printf("%.21Lg") gives 1.234567890123456789e-321 299g_xfmt(0) gives 25 bytes: "1.234567890123456789e-321" 300 301strtoIx returns 33, consuming 25 bytes. 302fI[0] = #3bd4 f9e1 1b4c ea6d cce8 303= 1.23456789012345678893e-321 304fI[1] = #3bd4 f9e1 1b4c ea6d cce9 305= 1.234567890123456789e-321 306fI[1] == strtox 307 308 309Input: 1e23 310 311strtox consumes 4 bytes and returns 1 312with bits = #404b a968 163f a57 b400 313printf("%.21Lg") gives 1e+23 314g_xfmt(0) gives 5 bytes: "1e+23" 315 316strtoIx returns 1, consuming 4 bytes. 317fI[0] == fI[1] == strtox 318 319 320Input: 1e310 321 322strtox consumes 5 bytes and returns 33 323with bits = #4404 de81 e40a 34b cf50 324printf("%.21Lg") gives 1e+310 325g_xfmt(0) gives 6 bytes: "1e+310" 326 327strtoIx returns 33, consuming 5 bytes. 328fI[0] = #4404 de81 e40a 34b cf4f 329= 9.9999999999999999994e+309 330fI[1] = #4404 de81 e40a 34b cf50 331= 1e+310 332fI[1] == strtox 333 334 335Input: 9.0259718793241475e-277 336 337strtox consumes 23 bytes and returns 33 338with bits = #3c69 ffff ffff ffff fcf7 339printf("%.21Lg") gives 9.02597187932414750016e-277 340g_xfmt(0) gives 23 bytes: "9.0259718793241475e-277" 341 342strtoIx returns 33, consuming 23 bytes. 343fI[0] = #3c69 ffff ffff ffff fcf6 344= 9.02597187932414749967e-277 345fI[1] = #3c69 ffff ffff ffff fcf7 346= 9.02597187932414750016e-277 347fI[1] == strtox 348 349 350Input: 9.025971879324147880346310405869e-277 351 352strtox consumes 37 bytes and returns 17 353with bits = #3c6a 8000 0 0 0 354printf("%.21Lg") gives 9.02597187932414788035e-277 355g_xfmt(0) gives 26 bytes: "9.0259718793241478803e-277" 356 357strtoIx returns 17, consuming 37 bytes. 358fI[0] = #3c6a 8000 0 0 0 359= 9.02597187932414788035e-277 360fI[1] = #3c6a 8000 0 0 1 361= 9.02597187932414788132e-277 362fI[0] == strtox 363 364 365Input: 9.025971879324147880346310405868e-277 366 367strtox consumes 37 bytes and returns 33 368with bits = #3c6a 8000 0 0 0 369printf("%.21Lg") gives 9.02597187932414788035e-277 370g_xfmt(0) gives 26 bytes: "9.0259718793241478803e-277" 371 372strtoIx returns 33, consuming 37 bytes. 373fI[0] = #3c69 ffff ffff ffff ffff 374= 9.02597187932414787986e-277 375fI[1] = #3c6a 8000 0 0 0 376= 9.02597187932414788035e-277 377fI[1] == strtox 378 379 380Input: 2.2250738585072014e-308 381 382strtox consumes 23 bytes and returns 17 383with bits = #3c01 8000 0 0 46 384printf("%.21Lg") gives 2.22507385850720139998e-308 385g_xfmt(0) gives 23 bytes: "2.2250738585072014e-308" 386 387strtoIx returns 17, consuming 23 bytes. 388fI[0] = #3c01 8000 0 0 46 389= 2.22507385850720139998e-308 390fI[1] = #3c01 8000 0 0 47 391= 2.22507385850720140022e-308 392fI[0] == strtox 393 394 395Input: 2.2250738585072013e-308 396 397strtox consumes 23 bytes and returns 17 398with bits = #3c00 ffff ffff ffff fd4f 399printf("%.21Lg") gives 2.22507385850720129998e-308 400g_xfmt(0) gives 23 bytes: "2.2250738585072013e-308" 401 402strtoIx returns 17, consuming 23 bytes. 403fI[0] = #3c00 ffff ffff ffff fd4f 404= 2.22507385850720129998e-308 405fI[1] = #3c00 ffff ffff ffff fd50 406= 2.2250738585072013001e-308 407fI[0] == strtox 408 409Rounding mode for strtor... changed from 1 (nearest) to 0 (toward zero) 410 411Input: 1.1 412 413strtox consumes 3 bytes and returns 17 414with bits = #3fff 8ccc cccc cccc cccc 415printf("%.21Lg") gives 1.09999999999999999991 416g_xfmt(0) gives 21 bytes: "1.0999999999999999999" 417 418strtoIx returns 33, consuming 3 bytes. 419fI[0] = #3fff 8ccc cccc cccc cccc 420= 1.09999999999999999991 421fI[1] = #3fff 8ccc cccc cccc cccd 422= 1.10000000000000000002 423fI[0] == strtox 424 425 426Input: -1.1 427 428strtox consumes 4 bytes and returns 25 429with bits = #bfff 8ccc cccc cccc cccc 430printf("%.21Lg") gives -1.09999999999999999991 431g_xfmt(0) gives 22 bytes: "-1.0999999999999999999" 432 433strtoIx returns 41, consuming 4 bytes. 434fI[0] = #bfff 8ccc cccc cccc cccd 435= -1.10000000000000000002 436fI[1] = #bfff 8ccc cccc cccc cccc 437= -1.09999999999999999991 438fI[1] == strtox 439 440 441Input: 1.2 442 443strtox consumes 3 bytes and returns 17 444with bits = #3fff 9999 9999 9999 9999 445printf("%.21Lg") gives 1.19999999999999999993 446g_xfmt(0) gives 21 bytes: "1.1999999999999999999" 447 448strtoIx returns 33, consuming 3 bytes. 449fI[0] = #3fff 9999 9999 9999 9999 450= 1.19999999999999999993 451fI[1] = #3fff 9999 9999 9999 999a 452= 1.20000000000000000004 453fI[0] == strtox 454 455 456Input: -1.2 457 458strtox consumes 4 bytes and returns 25 459with bits = #bfff 9999 9999 9999 9999 460printf("%.21Lg") gives -1.19999999999999999993 461g_xfmt(0) gives 22 bytes: "-1.1999999999999999999" 462 463strtoIx returns 41, consuming 4 bytes. 464fI[0] = #bfff 9999 9999 9999 999a 465= -1.20000000000000000004 466fI[1] = #bfff 9999 9999 9999 9999 467= -1.19999999999999999993 468fI[1] == strtox 469 470 471Input: 1.3 472 473strtox consumes 3 bytes and returns 17 474with bits = #3fff a666 6666 6666 6666 475printf("%.21Lg") gives 1.29999999999999999996 476g_xfmt(0) gives 3 bytes: "1.3" 477 478strtoIx returns 17, consuming 3 bytes. 479fI[0] = #3fff a666 6666 6666 6666 480= 1.29999999999999999996 481fI[1] = #3fff a666 6666 6666 6667 482= 1.30000000000000000007 483fI[0] == strtox 484 485 486Input: -1.3 487 488strtox consumes 4 bytes and returns 25 489with bits = #bfff a666 6666 6666 6666 490printf("%.21Lg") gives -1.29999999999999999996 491g_xfmt(0) gives 4 bytes: "-1.3" 492 493strtoIx returns 25, consuming 4 bytes. 494fI[0] = #bfff a666 6666 6666 6667 495= -1.30000000000000000007 496fI[1] = #bfff a666 6666 6666 6666 497= -1.29999999999999999996 498fI[1] == strtox 499 500 501Input: 1.4 502 503strtox consumes 3 bytes and returns 17 504with bits = #3fff b333 3333 3333 3333 505printf("%.21Lg") gives 1.39999999999999999998 506g_xfmt(0) gives 3 bytes: "1.4" 507 508strtoIx returns 17, consuming 3 bytes. 509fI[0] = #3fff b333 3333 3333 3333 510= 1.39999999999999999998 511fI[1] = #3fff b333 3333 3333 3334 512= 1.40000000000000000009 513fI[0] == strtox 514 515 516Input: -1.4 517 518strtox consumes 4 bytes and returns 25 519with bits = #bfff b333 3333 3333 3333 520printf("%.21Lg") gives -1.39999999999999999998 521g_xfmt(0) gives 4 bytes: "-1.4" 522 523strtoIx returns 25, consuming 4 bytes. 524fI[0] = #bfff b333 3333 3333 3334 525= -1.40000000000000000009 526fI[1] = #bfff b333 3333 3333 3333 527= -1.39999999999999999998 528fI[1] == strtox 529 530 531Input: 1.5 532 533strtox consumes 3 bytes and returns 1 534with bits = #3fff c000 0 0 0 535printf("%.21Lg") gives 1.5 536g_xfmt(0) gives 3 bytes: "1.5" 537 538strtoIx returns 1, consuming 3 bytes. 539fI[0] == fI[1] == strtox 540 541 542Input: -1.5 543 544strtox consumes 4 bytes and returns 9 545with bits = #bfff c000 0 0 0 546printf("%.21Lg") gives -1.5 547g_xfmt(0) gives 4 bytes: "-1.5" 548 549strtoIx returns 9, consuming 4 bytes. 550fI[0] == fI[1] == strtox 551 552 553Input: 1.6 554 555strtox consumes 3 bytes and returns 17 556with bits = #3fff cccc cccc cccc cccc 557printf("%.21Lg") gives 1.59999999999999999991 558g_xfmt(0) gives 21 bytes: "1.5999999999999999999" 559 560strtoIx returns 33, consuming 3 bytes. 561fI[0] = #3fff cccc cccc cccc cccc 562= 1.59999999999999999991 563fI[1] = #3fff cccc cccc cccc cccd 564= 1.60000000000000000002 565fI[0] == strtox 566 567 568Input: -1.6 569 570strtox consumes 4 bytes and returns 25 571with bits = #bfff cccc cccc cccc cccc 572printf("%.21Lg") gives -1.59999999999999999991 573g_xfmt(0) gives 22 bytes: "-1.5999999999999999999" 574 575strtoIx returns 41, consuming 4 bytes. 576fI[0] = #bfff cccc cccc cccc cccd 577= -1.60000000000000000002 578fI[1] = #bfff cccc cccc cccc cccc 579= -1.59999999999999999991 580fI[1] == strtox 581 582 583Input: 1.7 584 585strtox consumes 3 bytes and returns 17 586with bits = #3fff d999 9999 9999 9999 587printf("%.21Lg") gives 1.69999999999999999993 588g_xfmt(0) gives 21 bytes: "1.6999999999999999999" 589 590strtoIx returns 33, consuming 3 bytes. 591fI[0] = #3fff d999 9999 9999 9999 592= 1.69999999999999999993 593fI[1] = #3fff d999 9999 9999 999a 594= 1.70000000000000000004 595fI[0] == strtox 596 597 598Input: -1.7 599 600strtox consumes 4 bytes and returns 25 601with bits = #bfff d999 9999 9999 9999 602printf("%.21Lg") gives -1.69999999999999999993 603g_xfmt(0) gives 22 bytes: "-1.6999999999999999999" 604 605strtoIx returns 41, consuming 4 bytes. 606fI[0] = #bfff d999 9999 9999 999a 607= -1.70000000000000000004 608fI[1] = #bfff d999 9999 9999 9999 609= -1.69999999999999999993 610fI[1] == strtox 611 612 613Input: 1.8 614 615strtox consumes 3 bytes and returns 17 616with bits = #3fff e666 6666 6666 6666 617printf("%.21Lg") gives 1.79999999999999999996 618g_xfmt(0) gives 3 bytes: "1.8" 619 620strtoIx returns 17, consuming 3 bytes. 621fI[0] = #3fff e666 6666 6666 6666 622= 1.79999999999999999996 623fI[1] = #3fff e666 6666 6666 6667 624= 1.80000000000000000007 625fI[0] == strtox 626 627 628Input: -1.8 629 630strtox consumes 4 bytes and returns 25 631with bits = #bfff e666 6666 6666 6666 632printf("%.21Lg") gives -1.79999999999999999996 633g_xfmt(0) gives 4 bytes: "-1.8" 634 635strtoIx returns 25, consuming 4 bytes. 636fI[0] = #bfff e666 6666 6666 6667 637= -1.80000000000000000007 638fI[1] = #bfff e666 6666 6666 6666 639= -1.79999999999999999996 640fI[1] == strtox 641 642 643Input: 1.9 644 645strtox consumes 3 bytes and returns 17 646with bits = #3fff f333 3333 3333 3333 647printf("%.21Lg") gives 1.89999999999999999998 648g_xfmt(0) gives 3 bytes: "1.9" 649 650strtoIx returns 17, consuming 3 bytes. 651fI[0] = #3fff f333 3333 3333 3333 652= 1.89999999999999999998 653fI[1] = #3fff f333 3333 3333 3334 654= 1.90000000000000000009 655fI[0] == strtox 656 657 658Input: -1.9 659 660strtox consumes 4 bytes and returns 25 661with bits = #bfff f333 3333 3333 3333 662printf("%.21Lg") gives -1.89999999999999999998 663g_xfmt(0) gives 4 bytes: "-1.9" 664 665strtoIx returns 25, consuming 4 bytes. 666fI[0] = #bfff f333 3333 3333 3334 667= -1.90000000000000000009 668fI[1] = #bfff f333 3333 3333 3333 669= -1.89999999999999999998 670fI[1] == strtox 671 672Rounding mode for strtor... changed from 0 (toward zero) to 1 (nearest) 673 674Input: 1.1 675 676strtox consumes 3 bytes and returns 33 677with bits = #3fff 8ccc cccc cccc cccd 678printf("%.21Lg") gives 1.10000000000000000002 679g_xfmt(0) gives 3 bytes: "1.1" 680 681strtoIx returns 33, consuming 3 bytes. 682fI[0] = #3fff 8ccc cccc cccc cccc 683= 1.09999999999999999991 684fI[1] = #3fff 8ccc cccc cccc cccd 685= 1.10000000000000000002 686fI[1] == strtox 687 688 689Input: -1.1 690 691strtox consumes 4 bytes and returns 41 692with bits = #bfff 8ccc cccc cccc cccd 693printf("%.21Lg") gives -1.10000000000000000002 694g_xfmt(0) gives 4 bytes: "-1.1" 695 696strtoIx returns 41, consuming 4 bytes. 697fI[0] = #bfff 8ccc cccc cccc cccd 698= -1.10000000000000000002 699fI[1] = #bfff 8ccc cccc cccc cccc 700= -1.09999999999999999991 701fI[0] == strtox 702 703 704Input: 1.2 705 706strtox consumes 3 bytes and returns 33 707with bits = #3fff 9999 9999 9999 999a 708printf("%.21Lg") gives 1.20000000000000000004 709g_xfmt(0) gives 3 bytes: "1.2" 710 711strtoIx returns 33, consuming 3 bytes. 712fI[0] = #3fff 9999 9999 9999 9999 713= 1.19999999999999999993 714fI[1] = #3fff 9999 9999 9999 999a 715= 1.20000000000000000004 716fI[1] == strtox 717 718 719Input: -1.2 720 721strtox consumes 4 bytes and returns 41 722with bits = #bfff 9999 9999 9999 999a 723printf("%.21Lg") gives -1.20000000000000000004 724g_xfmt(0) gives 4 bytes: "-1.2" 725 726strtoIx returns 41, consuming 4 bytes. 727fI[0] = #bfff 9999 9999 9999 999a 728= -1.20000000000000000004 729fI[1] = #bfff 9999 9999 9999 9999 730= -1.19999999999999999993 731fI[0] == strtox 732 733 734Input: 1.3 735 736strtox consumes 3 bytes and returns 17 737with bits = #3fff a666 6666 6666 6666 738printf("%.21Lg") gives 1.29999999999999999996 739g_xfmt(0) gives 3 bytes: "1.3" 740 741strtoIx returns 17, consuming 3 bytes. 742fI[0] = #3fff a666 6666 6666 6666 743= 1.29999999999999999996 744fI[1] = #3fff a666 6666 6666 6667 745= 1.30000000000000000007 746fI[0] == strtox 747 748 749Input: -1.3 750 751strtox consumes 4 bytes and returns 25 752with bits = #bfff a666 6666 6666 6666 753printf("%.21Lg") gives -1.29999999999999999996 754g_xfmt(0) gives 4 bytes: "-1.3" 755 756strtoIx returns 25, consuming 4 bytes. 757fI[0] = #bfff a666 6666 6666 6667 758= -1.30000000000000000007 759fI[1] = #bfff a666 6666 6666 6666 760= -1.29999999999999999996 761fI[1] == strtox 762 763 764Input: 1.4 765 766strtox consumes 3 bytes and returns 17 767with bits = #3fff b333 3333 3333 3333 768printf("%.21Lg") gives 1.39999999999999999998 769g_xfmt(0) gives 3 bytes: "1.4" 770 771strtoIx returns 17, consuming 3 bytes. 772fI[0] = #3fff b333 3333 3333 3333 773= 1.39999999999999999998 774fI[1] = #3fff b333 3333 3333 3334 775= 1.40000000000000000009 776fI[0] == strtox 777 778 779Input: -1.4 780 781strtox consumes 4 bytes and returns 25 782with bits = #bfff b333 3333 3333 3333 783printf("%.21Lg") gives -1.39999999999999999998 784g_xfmt(0) gives 4 bytes: "-1.4" 785 786strtoIx returns 25, consuming 4 bytes. 787fI[0] = #bfff b333 3333 3333 3334 788= -1.40000000000000000009 789fI[1] = #bfff b333 3333 3333 3333 790= -1.39999999999999999998 791fI[1] == strtox 792 793 794Input: 1.5 795 796strtox consumes 3 bytes and returns 1 797with bits = #3fff c000 0 0 0 798printf("%.21Lg") gives 1.5 799g_xfmt(0) gives 3 bytes: "1.5" 800 801strtoIx returns 1, consuming 3 bytes. 802fI[0] == fI[1] == strtox 803 804 805Input: -1.5 806 807strtox consumes 4 bytes and returns 9 808with bits = #bfff c000 0 0 0 809printf("%.21Lg") gives -1.5 810g_xfmt(0) gives 4 bytes: "-1.5" 811 812strtoIx returns 9, consuming 4 bytes. 813fI[0] == fI[1] == strtox 814 815 816Input: 1.6 817 818strtox consumes 3 bytes and returns 33 819with bits = #3fff cccc cccc cccc cccd 820printf("%.21Lg") gives 1.60000000000000000002 821g_xfmt(0) gives 3 bytes: "1.6" 822 823strtoIx returns 33, consuming 3 bytes. 824fI[0] = #3fff cccc cccc cccc cccc 825= 1.59999999999999999991 826fI[1] = #3fff cccc cccc cccc cccd 827= 1.60000000000000000002 828fI[1] == strtox 829 830 831Input: -1.6 832 833strtox consumes 4 bytes and returns 41 834with bits = #bfff cccc cccc cccc cccd 835printf("%.21Lg") gives -1.60000000000000000002 836g_xfmt(0) gives 4 bytes: "-1.6" 837 838strtoIx returns 41, consuming 4 bytes. 839fI[0] = #bfff cccc cccc cccc cccd 840= -1.60000000000000000002 841fI[1] = #bfff cccc cccc cccc cccc 842= -1.59999999999999999991 843fI[0] == strtox 844 845 846Input: 1.7 847 848strtox consumes 3 bytes and returns 33 849with bits = #3fff d999 9999 9999 999a 850printf("%.21Lg") gives 1.70000000000000000004 851g_xfmt(0) gives 3 bytes: "1.7" 852 853strtoIx returns 33, consuming 3 bytes. 854fI[0] = #3fff d999 9999 9999 9999 855= 1.69999999999999999993 856fI[1] = #3fff d999 9999 9999 999a 857= 1.70000000000000000004 858fI[1] == strtox 859 860 861Input: -1.7 862 863strtox consumes 4 bytes and returns 41 864with bits = #bfff d999 9999 9999 999a 865printf("%.21Lg") gives -1.70000000000000000004 866g_xfmt(0) gives 4 bytes: "-1.7" 867 868strtoIx returns 41, consuming 4 bytes. 869fI[0] = #bfff d999 9999 9999 999a 870= -1.70000000000000000004 871fI[1] = #bfff d999 9999 9999 9999 872= -1.69999999999999999993 873fI[0] == strtox 874 875 876Input: 1.8 877 878strtox consumes 3 bytes and returns 17 879with bits = #3fff e666 6666 6666 6666 880printf("%.21Lg") gives 1.79999999999999999996 881g_xfmt(0) gives 3 bytes: "1.8" 882 883strtoIx returns 17, consuming 3 bytes. 884fI[0] = #3fff e666 6666 6666 6666 885= 1.79999999999999999996 886fI[1] = #3fff e666 6666 6666 6667 887= 1.80000000000000000007 888fI[0] == strtox 889 890 891Input: -1.8 892 893strtox consumes 4 bytes and returns 25 894with bits = #bfff e666 6666 6666 6666 895printf("%.21Lg") gives -1.79999999999999999996 896g_xfmt(0) gives 4 bytes: "-1.8" 897 898strtoIx returns 25, consuming 4 bytes. 899fI[0] = #bfff e666 6666 6666 6667 900= -1.80000000000000000007 901fI[1] = #bfff e666 6666 6666 6666 902= -1.79999999999999999996 903fI[1] == strtox 904 905 906Input: 1.9 907 908strtox consumes 3 bytes and returns 17 909with bits = #3fff f333 3333 3333 3333 910printf("%.21Lg") gives 1.89999999999999999998 911g_xfmt(0) gives 3 bytes: "1.9" 912 913strtoIx returns 17, consuming 3 bytes. 914fI[0] = #3fff f333 3333 3333 3333 915= 1.89999999999999999998 916fI[1] = #3fff f333 3333 3333 3334 917= 1.90000000000000000009 918fI[0] == strtox 919 920 921Input: -1.9 922 923strtox consumes 4 bytes and returns 25 924with bits = #bfff f333 3333 3333 3333 925printf("%.21Lg") gives -1.89999999999999999998 926g_xfmt(0) gives 4 bytes: "-1.9" 927 928strtoIx returns 25, consuming 4 bytes. 929fI[0] = #bfff f333 3333 3333 3334 930= -1.90000000000000000009 931fI[1] = #bfff f333 3333 3333 3333 932= -1.89999999999999999998 933fI[1] == strtox 934 935Rounding mode for strtor... changed from 1 (nearest) to 2 (toward +Infinity) 936 937Input: 1.1 938 939strtox consumes 3 bytes and returns 33 940with bits = #3fff 8ccc cccc cccc cccd 941printf("%.21Lg") gives 1.10000000000000000002 942g_xfmt(0) gives 3 bytes: "1.1" 943 944strtoIx returns 33, consuming 3 bytes. 945fI[0] = #3fff 8ccc cccc cccc cccc 946= 1.09999999999999999991 947fI[1] = #3fff 8ccc cccc cccc cccd 948= 1.10000000000000000002 949fI[1] == strtox 950 951 952Input: -1.1 953 954strtox consumes 4 bytes and returns 25 955with bits = #bfff 8ccc cccc cccc cccc 956printf("%.21Lg") gives -1.09999999999999999991 957g_xfmt(0) gives 22 bytes: "-1.0999999999999999999" 958 959strtoIx returns 41, consuming 4 bytes. 960fI[0] = #bfff 8ccc cccc cccc cccd 961= -1.10000000000000000002 962fI[1] = #bfff 8ccc cccc cccc cccc 963= -1.09999999999999999991 964fI[1] == strtox 965 966 967Input: 1.2 968 969strtox consumes 3 bytes and returns 33 970with bits = #3fff 9999 9999 9999 999a 971printf("%.21Lg") gives 1.20000000000000000004 972g_xfmt(0) gives 3 bytes: "1.2" 973 974strtoIx returns 33, consuming 3 bytes. 975fI[0] = #3fff 9999 9999 9999 9999 976= 1.19999999999999999993 977fI[1] = #3fff 9999 9999 9999 999a 978= 1.20000000000000000004 979fI[1] == strtox 980 981 982Input: -1.2 983 984strtox consumes 4 bytes and returns 25 985with bits = #bfff 9999 9999 9999 9999 986printf("%.21Lg") gives -1.19999999999999999993 987g_xfmt(0) gives 22 bytes: "-1.1999999999999999999" 988 989strtoIx returns 41, consuming 4 bytes. 990fI[0] = #bfff 9999 9999 9999 999a 991= -1.20000000000000000004 992fI[1] = #bfff 9999 9999 9999 9999 993= -1.19999999999999999993 994fI[1] == strtox 995 996 997Input: 1.3 998 999strtox consumes 3 bytes and returns 33 1000with bits = #3fff a666 6666 6666 6667 1001printf("%.21Lg") gives 1.30000000000000000007 1002g_xfmt(0) gives 21 bytes: "1.3000000000000000001" 1003 1004strtoIx returns 17, consuming 3 bytes. 1005fI[0] = #3fff a666 6666 6666 6666 1006= 1.29999999999999999996 1007fI[1] = #3fff a666 6666 6666 6667 1008= 1.30000000000000000007 1009fI[1] == strtox 1010 1011 1012Input: -1.3 1013 1014strtox consumes 4 bytes and returns 25 1015with bits = #bfff a666 6666 6666 6666 1016printf("%.21Lg") gives -1.29999999999999999996 1017g_xfmt(0) gives 4 bytes: "-1.3" 1018 1019strtoIx returns 25, consuming 4 bytes. 1020fI[0] = #bfff a666 6666 6666 6667 1021= -1.30000000000000000007 1022fI[1] = #bfff a666 6666 6666 6666 1023= -1.29999999999999999996 1024fI[1] == strtox 1025 1026 1027Input: 1.4 1028 1029strtox consumes 3 bytes and returns 33 1030with bits = #3fff b333 3333 3333 3334 1031printf("%.21Lg") gives 1.40000000000000000009 1032g_xfmt(0) gives 21 bytes: "1.4000000000000000001" 1033 1034strtoIx returns 17, consuming 3 bytes. 1035fI[0] = #3fff b333 3333 3333 3333 1036= 1.39999999999999999998 1037fI[1] = #3fff b333 3333 3333 3334 1038= 1.40000000000000000009 1039fI[1] == strtox 1040 1041 1042Input: -1.4 1043 1044strtox consumes 4 bytes and returns 25 1045with bits = #bfff b333 3333 3333 3333 1046printf("%.21Lg") gives -1.39999999999999999998 1047g_xfmt(0) gives 4 bytes: "-1.4" 1048 1049strtoIx returns 25, consuming 4 bytes. 1050fI[0] = #bfff b333 3333 3333 3334 1051= -1.40000000000000000009 1052fI[1] = #bfff b333 3333 3333 3333 1053= -1.39999999999999999998 1054fI[1] == strtox 1055 1056 1057Input: 1.5 1058 1059strtox consumes 3 bytes and returns 1 1060with bits = #3fff c000 0 0 0 1061printf("%.21Lg") gives 1.5 1062g_xfmt(0) gives 3 bytes: "1.5" 1063 1064strtoIx returns 1, consuming 3 bytes. 1065fI[0] == fI[1] == strtox 1066 1067 1068Input: -1.5 1069 1070strtox consumes 4 bytes and returns 9 1071with bits = #bfff c000 0 0 0 1072printf("%.21Lg") gives -1.5 1073g_xfmt(0) gives 4 bytes: "-1.5" 1074 1075strtoIx returns 9, consuming 4 bytes. 1076fI[0] == fI[1] == strtox 1077 1078 1079Input: 1.6 1080 1081strtox consumes 3 bytes and returns 33 1082with bits = #3fff cccc cccc cccc cccd 1083printf("%.21Lg") gives 1.60000000000000000002 1084g_xfmt(0) gives 3 bytes: "1.6" 1085 1086strtoIx returns 33, consuming 3 bytes. 1087fI[0] = #3fff cccc cccc cccc cccc 1088= 1.59999999999999999991 1089fI[1] = #3fff cccc cccc cccc cccd 1090= 1.60000000000000000002 1091fI[1] == strtox 1092 1093 1094Input: -1.6 1095 1096strtox consumes 4 bytes and returns 25 1097with bits = #bfff cccc cccc cccc cccc 1098printf("%.21Lg") gives -1.59999999999999999991 1099g_xfmt(0) gives 22 bytes: "-1.5999999999999999999" 1100 1101strtoIx returns 41, consuming 4 bytes. 1102fI[0] = #bfff cccc cccc cccc cccd 1103= -1.60000000000000000002 1104fI[1] = #bfff cccc cccc cccc cccc 1105= -1.59999999999999999991 1106fI[1] == strtox 1107 1108 1109Input: 1.7 1110 1111strtox consumes 3 bytes and returns 33 1112with bits = #3fff d999 9999 9999 999a 1113printf("%.21Lg") gives 1.70000000000000000004 1114g_xfmt(0) gives 3 bytes: "1.7" 1115 1116strtoIx returns 33, consuming 3 bytes. 1117fI[0] = #3fff d999 9999 9999 9999 1118= 1.69999999999999999993 1119fI[1] = #3fff d999 9999 9999 999a 1120= 1.70000000000000000004 1121fI[1] == strtox 1122 1123 1124Input: -1.7 1125 1126strtox consumes 4 bytes and returns 25 1127with bits = #bfff d999 9999 9999 9999 1128printf("%.21Lg") gives -1.69999999999999999993 1129g_xfmt(0) gives 22 bytes: "-1.6999999999999999999" 1130 1131strtoIx returns 41, consuming 4 bytes. 1132fI[0] = #bfff d999 9999 9999 999a 1133= -1.70000000000000000004 1134fI[1] = #bfff d999 9999 9999 9999 1135= -1.69999999999999999993 1136fI[1] == strtox 1137 1138 1139Input: 1.8 1140 1141strtox consumes 3 bytes and returns 33 1142with bits = #3fff e666 6666 6666 6667 1143printf("%.21Lg") gives 1.80000000000000000007 1144g_xfmt(0) gives 21 bytes: "1.8000000000000000001" 1145 1146strtoIx returns 17, consuming 3 bytes. 1147fI[0] = #3fff e666 6666 6666 6666 1148= 1.79999999999999999996 1149fI[1] = #3fff e666 6666 6666 6667 1150= 1.80000000000000000007 1151fI[1] == strtox 1152 1153 1154Input: -1.8 1155 1156strtox consumes 4 bytes and returns 25 1157with bits = #bfff e666 6666 6666 6666 1158printf("%.21Lg") gives -1.79999999999999999996 1159g_xfmt(0) gives 4 bytes: "-1.8" 1160 1161strtoIx returns 25, consuming 4 bytes. 1162fI[0] = #bfff e666 6666 6666 6667 1163= -1.80000000000000000007 1164fI[1] = #bfff e666 6666 6666 6666 1165= -1.79999999999999999996 1166fI[1] == strtox 1167 1168 1169Input: 1.9 1170 1171strtox consumes 3 bytes and returns 33 1172with bits = #3fff f333 3333 3333 3334 1173printf("%.21Lg") gives 1.90000000000000000009 1174g_xfmt(0) gives 21 bytes: "1.9000000000000000001" 1175 1176strtoIx returns 17, consuming 3 bytes. 1177fI[0] = #3fff f333 3333 3333 3333 1178= 1.89999999999999999998 1179fI[1] = #3fff f333 3333 3333 3334 1180= 1.90000000000000000009 1181fI[1] == strtox 1182 1183 1184Input: -1.9 1185 1186strtox consumes 4 bytes and returns 25 1187with bits = #bfff f333 3333 3333 3333 1188printf("%.21Lg") gives -1.89999999999999999998 1189g_xfmt(0) gives 4 bytes: "-1.9" 1190 1191strtoIx returns 25, consuming 4 bytes. 1192fI[0] = #bfff f333 3333 3333 3334 1193= -1.90000000000000000009 1194fI[1] = #bfff f333 3333 3333 3333 1195= -1.89999999999999999998 1196fI[1] == strtox 1197 1198Rounding mode for strtor... changed from 2 (toward +Infinity) to 3 (toward -Infinity) 1199 1200Input: 1.1 1201 1202strtox consumes 3 bytes and returns 17 1203with bits = #3fff 8ccc cccc cccc cccc 1204printf("%.21Lg") gives 1.09999999999999999991 1205g_xfmt(0) gives 21 bytes: "1.0999999999999999999" 1206 1207strtoIx returns 33, consuming 3 bytes. 1208fI[0] = #3fff 8ccc cccc cccc cccc 1209= 1.09999999999999999991 1210fI[1] = #3fff 8ccc cccc cccc cccd 1211= 1.10000000000000000002 1212fI[0] == strtox 1213 1214 1215Input: -1.1 1216 1217strtox consumes 4 bytes and returns 41 1218with bits = #bfff 8ccc cccc cccc cccd 1219printf("%.21Lg") gives -1.10000000000000000002 1220g_xfmt(0) gives 4 bytes: "-1.1" 1221 1222strtoIx returns 41, consuming 4 bytes. 1223fI[0] = #bfff 8ccc cccc cccc cccd 1224= -1.10000000000000000002 1225fI[1] = #bfff 8ccc cccc cccc cccc 1226= -1.09999999999999999991 1227fI[0] == strtox 1228 1229 1230Input: 1.2 1231 1232strtox consumes 3 bytes and returns 17 1233with bits = #3fff 9999 9999 9999 9999 1234printf("%.21Lg") gives 1.19999999999999999993 1235g_xfmt(0) gives 21 bytes: "1.1999999999999999999" 1236 1237strtoIx returns 33, consuming 3 bytes. 1238fI[0] = #3fff 9999 9999 9999 9999 1239= 1.19999999999999999993 1240fI[1] = #3fff 9999 9999 9999 999a 1241= 1.20000000000000000004 1242fI[0] == strtox 1243 1244 1245Input: -1.2 1246 1247strtox consumes 4 bytes and returns 41 1248with bits = #bfff 9999 9999 9999 999a 1249printf("%.21Lg") gives -1.20000000000000000004 1250g_xfmt(0) gives 4 bytes: "-1.2" 1251 1252strtoIx returns 41, consuming 4 bytes. 1253fI[0] = #bfff 9999 9999 9999 999a 1254= -1.20000000000000000004 1255fI[1] = #bfff 9999 9999 9999 9999 1256= -1.19999999999999999993 1257fI[0] == strtox 1258 1259 1260Input: 1.3 1261 1262strtox consumes 3 bytes and returns 17 1263with bits = #3fff a666 6666 6666 6666 1264printf("%.21Lg") gives 1.29999999999999999996 1265g_xfmt(0) gives 3 bytes: "1.3" 1266 1267strtoIx returns 17, consuming 3 bytes. 1268fI[0] = #3fff a666 6666 6666 6666 1269= 1.29999999999999999996 1270fI[1] = #3fff a666 6666 6666 6667 1271= 1.30000000000000000007 1272fI[0] == strtox 1273 1274 1275Input: -1.3 1276 1277strtox consumes 4 bytes and returns 41 1278with bits = #bfff a666 6666 6666 6667 1279printf("%.21Lg") gives -1.30000000000000000007 1280g_xfmt(0) gives 22 bytes: "-1.3000000000000000001" 1281 1282strtoIx returns 25, consuming 4 bytes. 1283fI[0] = #bfff a666 6666 6666 6667 1284= -1.30000000000000000007 1285fI[1] = #bfff a666 6666 6666 6666 1286= -1.29999999999999999996 1287fI[0] == strtox 1288 1289 1290Input: 1.4 1291 1292strtox consumes 3 bytes and returns 17 1293with bits = #3fff b333 3333 3333 3333 1294printf("%.21Lg") gives 1.39999999999999999998 1295g_xfmt(0) gives 3 bytes: "1.4" 1296 1297strtoIx returns 17, consuming 3 bytes. 1298fI[0] = #3fff b333 3333 3333 3333 1299= 1.39999999999999999998 1300fI[1] = #3fff b333 3333 3333 3334 1301= 1.40000000000000000009 1302fI[0] == strtox 1303 1304 1305Input: -1.4 1306 1307strtox consumes 4 bytes and returns 41 1308with bits = #bfff b333 3333 3333 3334 1309printf("%.21Lg") gives -1.40000000000000000009 1310g_xfmt(0) gives 22 bytes: "-1.4000000000000000001" 1311 1312strtoIx returns 25, consuming 4 bytes. 1313fI[0] = #bfff b333 3333 3333 3334 1314= -1.40000000000000000009 1315fI[1] = #bfff b333 3333 3333 3333 1316= -1.39999999999999999998 1317fI[0] == strtox 1318 1319 1320Input: 1.5 1321 1322strtox consumes 3 bytes and returns 1 1323with bits = #3fff c000 0 0 0 1324printf("%.21Lg") gives 1.5 1325g_xfmt(0) gives 3 bytes: "1.5" 1326 1327strtoIx returns 1, consuming 3 bytes. 1328fI[0] == fI[1] == strtox 1329 1330 1331Input: -1.5 1332 1333strtox consumes 4 bytes and returns 9 1334with bits = #bfff c000 0 0 0 1335printf("%.21Lg") gives -1.5 1336g_xfmt(0) gives 4 bytes: "-1.5" 1337 1338strtoIx returns 9, consuming 4 bytes. 1339fI[0] == fI[1] == strtox 1340 1341 1342Input: 1.6 1343 1344strtox consumes 3 bytes and returns 17 1345with bits = #3fff cccc cccc cccc cccc 1346printf("%.21Lg") gives 1.59999999999999999991 1347g_xfmt(0) gives 21 bytes: "1.5999999999999999999" 1348 1349strtoIx returns 33, consuming 3 bytes. 1350fI[0] = #3fff cccc cccc cccc cccc 1351= 1.59999999999999999991 1352fI[1] = #3fff cccc cccc cccc cccd 1353= 1.60000000000000000002 1354fI[0] == strtox 1355 1356 1357Input: -1.6 1358 1359strtox consumes 4 bytes and returns 41 1360with bits = #bfff cccc cccc cccc cccd 1361printf("%.21Lg") gives -1.60000000000000000002 1362g_xfmt(0) gives 4 bytes: "-1.6" 1363 1364strtoIx returns 41, consuming 4 bytes. 1365fI[0] = #bfff cccc cccc cccc cccd 1366= -1.60000000000000000002 1367fI[1] = #bfff cccc cccc cccc cccc 1368= -1.59999999999999999991 1369fI[0] == strtox 1370 1371 1372Input: 1.7 1373 1374strtox consumes 3 bytes and returns 17 1375with bits = #3fff d999 9999 9999 9999 1376printf("%.21Lg") gives 1.69999999999999999993 1377g_xfmt(0) gives 21 bytes: "1.6999999999999999999" 1378 1379strtoIx returns 33, consuming 3 bytes. 1380fI[0] = #3fff d999 9999 9999 9999 1381= 1.69999999999999999993 1382fI[1] = #3fff d999 9999 9999 999a 1383= 1.70000000000000000004 1384fI[0] == strtox 1385 1386 1387Input: -1.7 1388 1389strtox consumes 4 bytes and returns 41 1390with bits = #bfff d999 9999 9999 999a 1391printf("%.21Lg") gives -1.70000000000000000004 1392g_xfmt(0) gives 4 bytes: "-1.7" 1393 1394strtoIx returns 41, consuming 4 bytes. 1395fI[0] = #bfff d999 9999 9999 999a 1396= -1.70000000000000000004 1397fI[1] = #bfff d999 9999 9999 9999 1398= -1.69999999999999999993 1399fI[0] == strtox 1400 1401 1402Input: 1.8 1403 1404strtox consumes 3 bytes and returns 17 1405with bits = #3fff e666 6666 6666 6666 1406printf("%.21Lg") gives 1.79999999999999999996 1407g_xfmt(0) gives 3 bytes: "1.8" 1408 1409strtoIx returns 17, consuming 3 bytes. 1410fI[0] = #3fff e666 6666 6666 6666 1411= 1.79999999999999999996 1412fI[1] = #3fff e666 6666 6666 6667 1413= 1.80000000000000000007 1414fI[0] == strtox 1415 1416 1417Input: -1.8 1418 1419strtox consumes 4 bytes and returns 41 1420with bits = #bfff e666 6666 6666 6667 1421printf("%.21Lg") gives -1.80000000000000000007 1422g_xfmt(0) gives 22 bytes: "-1.8000000000000000001" 1423 1424strtoIx returns 25, consuming 4 bytes. 1425fI[0] = #bfff e666 6666 6666 6667 1426= -1.80000000000000000007 1427fI[1] = #bfff e666 6666 6666 6666 1428= -1.79999999999999999996 1429fI[0] == strtox 1430 1431 1432Input: 1.9 1433 1434strtox consumes 3 bytes and returns 17 1435with bits = #3fff f333 3333 3333 3333 1436printf("%.21Lg") gives 1.89999999999999999998 1437g_xfmt(0) gives 3 bytes: "1.9" 1438 1439strtoIx returns 17, consuming 3 bytes. 1440fI[0] = #3fff f333 3333 3333 3333 1441= 1.89999999999999999998 1442fI[1] = #3fff f333 3333 3333 3334 1443= 1.90000000000000000009 1444fI[0] == strtox 1445 1446 1447Input: -1.9 1448 1449strtox consumes 4 bytes and returns 41 1450with bits = #bfff f333 3333 3333 3334 1451printf("%.21Lg") gives -1.90000000000000000009 1452g_xfmt(0) gives 22 bytes: "-1.9000000000000000001" 1453 1454strtoIx returns 25, consuming 4 bytes. 1455fI[0] = #bfff f333 3333 3333 3334 1456= -1.90000000000000000009 1457fI[1] = #bfff f333 3333 3333 3333 1458= -1.89999999999999999998 1459fI[0] == strtox 1460 1461