3 ms·
Personally, I like Haskell's treatment of numbers. I wrote a comment about it here: https://news.ycombinator.com/item?id=18565234 https://news.ycombinator.com/
by jolmg 7y ago
Personally, I like Haskell's treatment of numbers. I wrote a comment about it here:
https://news.ycombinator.com/item?id=18565234 https://news.ycombinator.com/item?id=18565234
Don't really know much about surreal numbers, but I found the following library that defines Fractional and Num instances for it, so that should enable Haskell to work with surreal numbers as if they were native to the language:
https://github.com/Lacaranian/surreal https://github.com/Lacaranian/surreal
There's also this module on transcendental numbers:
https://hackage.haskell.org/package/numeric-prelude-0.4.2/docs/Algebra-Transcendental.html https://hackage.haskell.org/package/numeric-prelude-0.4.2/do...
auxym might be right, though, that you might be better served with a language that is specialized more in mathematics, rather than a general purpose language.
- igravious 7y agoThank you, I'll look into this but I find Haskell very hard for my C-family lineage head to wrap its brain around.