Re: How do I make a port of MicroPython for Casio calculators?
Posted: Tue Nov 13, 2018 6:31 pm
On PC, I can do things like printing fact(500), even though this number is hundreds of digits long. Obviously there is some kind of trick, as I assume python doesn't have a type for what is probably a 1 kb digit.
I looked around in MPy, but I've only found these long-int implementations:
- MICROPY_LONGINT_IMPL_NONE (int is limited to 2^31 bits)
- MICROPY_LONGINT_IMPL_LONGLONG (can't use it as Casio doesn't have 64-bit, and no long long)
- MICROPY_LONGINT_IMPL_MPZ (no idea what it is, throws a preprocessor error "incompatible MICROPY_LONGINT_IMPL")
Is there a way to enable "infinite size ints", or at least increase the int size beyond 2^31 bits?
I looked around in MPy, but I've only found these long-int implementations:
- MICROPY_LONGINT_IMPL_NONE (int is limited to 2^31 bits)
- MICROPY_LONGINT_IMPL_LONGLONG (can't use it as Casio doesn't have 64-bit, and no long long)
- MICROPY_LONGINT_IMPL_MPZ (no idea what it is, throws a preprocessor error "incompatible MICROPY_LONGINT_IMPL")
Is there a way to enable "infinite size ints", or at least increase the int size beyond 2^31 bits?