Instead of using floats, you might consider using rationals (or bigrats). This will preserve the precision because you retain the number as-is. 1/3 remains as 1/3, not 0.333..., so you don't get that rounding problem. Converting to a floating representation is not difficult, if needed; often it's not needed because you are interested in the integer values for times.
In reply to Re: losing precision reading numbers from file
by spiritway
in thread losing precision reading numbers from file
by iKnowNothing
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |