5 ms·
Julia has the type hierarchy that you're describing and it's very easily extendable.
by s1t5 7y ago
Julia has the type hierarchy that you're describing and it's very easily extendable.
- elcritch 7y agoNot my area, but it oooks like there’s a surreal numbers package: https://github.com/mroughan/SurrealNumbers.jl https://github.com/mroughan/SurrealNumbers.jl And a nice paper: https://arxiv.org/pdf/1810.10373 https://arxiv.org/pdf/1810.10373
- igravious 7y agoSpotted that package, and paper – but I don't know Julia so I haven't dug into it yet. Must get in touch with the author. I've made a Ruby implementation and the naive recursive addition/subtraction has pathological code paths.
- elcritch 7y agoYah, Julia follows the lisp-y tradition of defining numerical in the language. All the built-in types are defined in Julia. Check out https://github.com/JuliaLang/julia/blob/381693d3dfc9b7072707f6d544f82f6637fc5e7c/base/docs/basedocs.jl#L1458-L1462 https://github.com/JuliaLang/julia/blob/381693d3dfc9b7072707... Still for interactive things it can be a bit slow still. I’d recommend using repl/notebooks. Good luck!
- igravious 7y agothanks for the tip. do you use Julia? Is it difficult to pick up?
- s1t5 7y agoIt's more difficult to pick up than Python or R but it's worth it.