3 ms·
That depends on what you want. Some people don't care at all, but others have legitimate needs for a lot of the features described in the spec. So if you can at
by StefanKarpinski 12y ago
That depends on what you want. Some people don't care at all, but others have legitimate needs for a lot of the features described in the spec. So if you can at all, it's best to follow the spec, imo. That way languages don't do a lot of annoyingly different, similar things. And, as this essay points out, the spec is wildly successful – it is arguably the most successful spec of all time – so second-guessing it is usually a mistake. Kahan at al. have forgotten more about numerical analysis than most of us will ever know.
- gre 12y agoFactor has a library for setting up floating point environments that might interest you. I think we implemented all of the functionality you might need and it's nestable with dynamic scoping. I haven't needed to use it for anything though. Code: https://github.com/slavapestov/factor/blob/master/basis/math/floats/env/env.factor https://github.com/slavapestov/factor/blob/master/basis/math... Tests: https://github.com/slavapestov/factor/blob/master/basis/math/floats/env/env-tests.factor https://github.com/slavapestov/factor/blob/master/basis/math... Docs: http://docs.factorcode.org/content/article-math.floats.env.html http://docs.factorcode.org/content/article-math.floats.env.h...