开发者

Platform-specific differences in reading floating point numbers from ASCII file?

开发者 https://www.devze.com 2023-03-08 03:25 出处:网络
I have a program that reads in floating point numbers from an ASCII data file using the << operator. I have noticed that whenever there is a number that is very small but nonzero (absolute value

I have a program that reads in floating point numbers from an ASCII data file using the << operator. I have noticed that whenever there is a number that is very small but nonzero (absolute value less than about 1.e-20) it will work correctly on my Windows machine but fail on my Linux machine. Why does this happen? Is the way that it parses floating point numbers affected by some platform-specif开发者_运维百科ic characteristic?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号