danilopedraza / symstatic

The Symstatic programming language code repository
https://symstatic.org/book
GNU General Public License v3.0
2 stars 0 forks source link

Integer exponentiation #40

Closed danilopedraza closed 1 month ago

danilopedraza commented 1 month ago

I implemented the exponentiation on integers badly. When the exponent is non-negative, The result is an integer and I can keep going. When the exponent is negative, I can return a fraction.

danilopedraza commented 1 month ago

The library implements exponentiation between BigInt and BigUInt, something that I haven't noticed.

danilopedraza commented 1 month ago

Done. Integer exponentiation is now implemented for arbitrary integers.

danilopedraza commented 1 month ago

Important note: I don't return a fraction when the exponent is an integer: I return a decimal.