delorie.com/archives/browse.cgi | search |
> I agree, but we may have different ideas of what the fix would be. If you > want to stop using floating point entirely, it's a huge effort, and ints > won't do what you want either, you need rationals. We use nanometers, I think that's as fixed-point as we need to get :-) It would be rare to have a valid case where a floating format is preferable to non-overflowing nanometers. > My claim on this is that if your float type entirely contains the set of > your int type, there's no doubt about how the conversion in one direction > should work. But using a floating type means you can ignore overflow issues and the loss of precision therein.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |