Or, actually, it should return 123.45, because (in the standard) lowercase "e" is not recognized as "exponential notation".
But many implementations treat "E" and "e" the same in this context.
Ed
I suppose this happens because 1.2345e+06 is normalized
representation of 123.45e4 and floating numbers are stored
in that way. When you force type conversation it understands
you have floating number. If you want canonical integer you
should do explicit convert to integer.
воскресенье, 31 октября 2021 г. в 04:54:47 UTC+3, ed de moel:
Or, actually, it should return 123.45, because (in the
standard) lowercase "e" is not recognized as "exponential
notation".
But many implementations treat "E" and "e" the same in this
context.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 59:37:29 |
Calls: | 6,653 |
Calls today: | 5 |
Files: | 12,200 |
Messages: | 5,331,283 |