Fix parsing of binary floating point number
* tccpp.c (parse_number): `shift' should be 1 while parsing binary floating point number. * tests/tests2/70_floating_point_literals.c: New test cases for floating point number parsing.
This commit is contained in:
53
tests/tests2/70_floating_point_literals.expect
Normal file
53
tests/tests2/70_floating_point_literals.expect
Normal file
@ -0,0 +1,53 @@
|
||||
0.123000
|
||||
122999996416.000000
|
||||
0.000000
|
||||
122999996416.000000
|
||||
|
||||
123.123001
|
||||
123122997002240.000000
|
||||
0.000000
|
||||
123122997002240.000000
|
||||
|
||||
123.000000
|
||||
123000003231744.000000
|
||||
0.000000
|
||||
123000003231744.000000
|
||||
|
||||
123000003231744.000000
|
||||
0.000000
|
||||
123000003231744.000000
|
||||
|
||||
|
||||
428.000000
|
||||
0.000026
|
||||
428.000000
|
||||
|
||||
1756112.000000
|
||||
0.104672
|
||||
1756592.000000
|
||||
|
||||
1753088.000000
|
||||
0.104492
|
||||
1753088.000000
|
||||
|
||||
1753088.000000
|
||||
0.104492
|
||||
1753088.000000
|
||||
|
||||
|
||||
3424.000000
|
||||
0.000204
|
||||
3424.000000
|
||||
|
||||
1756112.000000
|
||||
0.104672
|
||||
1756112.000000
|
||||
|
||||
1753088.000000
|
||||
0.104492
|
||||
1753088.000000
|
||||
|
||||
1753088.000000
|
||||
0.104492
|
||||
1753088.000000
|
||||
|
||||
Reference in New Issue
Block a user