[Oren Tirosh] > But why would you want to convert floating point numbers to rationals > in the first place? For one thing, to continue an exact calculation that has grown too large to continue in floating-point without losing information, but where the extreme expense of using rationals instead of floating point pushes you toward using fp just as long as you can. > Floating point numbers are generally inexact. The IEEE-754 standard mandates an "inexact flag" (and your HW has one) for this very kind of purpose. Your FPU knows for certain whether you've ever lost a bit of information when doing basic fp operations; unfortunately, it's still extremely clumsy to get at this info. > Converting them to exact rationals can give a false sense of > exactitude. So can printing more digits than warranted <wink>. > Any calculation involving a floating point number should taint > the result with inexactitude and yield a floating point result. How old are you? See -- integers can be inexact too. Representation has nothing to do with exactness, which is one part of this story Scheme got straight.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4