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?
Platform-specific differences in reading floating point numbers from ASCII file?
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
0
0
0
精彩评论