Email or username:

Password:

Forgot your password?
⛧ esoterik ⛧

here's the current version of binary arithmetic on natural numbers in #modal:

paste.sr.ht/~d6/92210f8df9c7fe

supports:
- comparison
- addition/subtraction
- summation
- multiplication/division/remainder
- exponentiation
- gcd/lcm

still some rough edges but it works well for fairly large numbers. on my machine it takes about 33s to compute 13^13; there is still a lot of room for optimization.

5 comments | Expand all CWs
⛧ esoterik ⛧

language by @wryl

website describing modal by @neauoire: wiki.xxiivv.com/site/modal

implementation i'm using: git.sr.ht/~rabbits/modal

Devine Lu Linvega

@d6 @wryl "So, huh, what's your contribution to the ecosystem?"
"The concept of numbers."

VOLTUR (with the good hair)

@d6 oh, very nice!

(wryl)

@d6 This is quite beautiful. Thank you for writing this!

⛧ esoterik ⛧

@wryl thanks for your help with forcing evaluation order. i still plan to add more types which may improve performance even more.

Go Up