News for hackers. Stuff that matters.
Re:Common Lisp: Numbers by jolmg on Friday June 14, 2019 @03:28PM (#20185950)
Sounds similar to how Haskell does all number computations by default. When you do 1/3 for example it leaves the types generic/ambiguous using typeclasses until it finds something to refine them. 1/3 could be a floating-point number, or a fixed-point number, or a rational (datatype holding the numerator and denominator), or any other user-defined datatype. You could put these computations in a library, keeping their types generic with typeclasses, and a user of your library can use their own number datatypes. Your library would automatically support that datatype in your number computations.
Re:Common Lisp: Numbers by nestorD on Friday June 14, 2019 @03:50PM (#20186140)
No really, computable real store the AST of the computation to lazily compute digits as they are needed (which is an interesting idea but memory hungry at scale) while Haskell approach is more akind to a form of general type deduction.

Note that I first meet computable numbers in Haskell : https://wiki.haskell.org/Applications_and_libraries/Mathemat...

Re:Common Lisp: Numbers by mbrock on Friday June 14, 2019 @05:28PM (#20186810)
http://hackage.haskell.org/package/exact-real-0.12.2

I’ve used this package to get exact real computations in Haskell which get evaluated at n bits when needed for printing or equality checking etc.