Maximum and minimum int and float values?
Maximum and minimum int and float values?
New member here... What is the range of integer and floating-point values available in MicroPython? I could not find these specifications in any online information after an hour of search time. Thanks --Jon
Re: Maximum and minimum int and float values?
It depends.
There are several different ways of configuring micropython.
The standard pyboard (STM32F405) has a notion of small ints which can store 31-bit signed integers. It also supports MPZ (multi-prrecision) which is essentually infinite precision integers, limited only by available memory.
MicroPython can be configured with single (32-bit) or double (64-bit) precision floating point numbers. The pyboard uses 32-bit by default since the hardware FPU supports 32-bit. You can recompile it to use double precision but then does everything in software. Other MCUs may support double precision in HW.
You can also see some configuration options here:
https://github.com/micropython/micropyt ... nfig.h#L69
There are several different ways of configuring micropython.
The standard pyboard (STM32F405) has a notion of small ints which can store 31-bit signed integers. It also supports MPZ (multi-prrecision) which is essentually infinite precision integers, limited only by available memory.
MicroPython can be configured with single (32-bit) or double (64-bit) precision floating point numbers. The pyboard uses 32-bit by default since the hardware FPU supports 32-bit. You can recompile it to use double precision but then does everything in software. Other MCUs may support double precision in HW.
You can also see some configuration options here:
https://github.com/micropython/micropyt ... nfig.h#L69
Re: Maximum and minimum int and float values?
Thanks for your help, Dave. I appreciate your clarifications. --Jon