circuitpython/ports
Christopher Swenson 8c656754aa py/modmath: Add math.factorial, optimised and non-opt implementations.
This commit adds the math.factorial function in two variants:
- squared difference, which is faster than the naive version, relatively
  compact, and non-recursive;
- a mildly optimised recursive version, faster than the above one.

There are some more optimisations that could be done, but they tend to take
more code, and more storage space.  The recursive version seems like a
sensible compromise.

The new function is disabled by default, and uses the non-optimised version
by default if it is enabled.  The options are MICROPY_PY_MATH_FACTORIAL
and MICROPY_OPT_MATH_FACTORIAL.
2018-09-26 15:03:04 +10:00
..
bare-arm py/objstr: Make % (__mod__) formatting operator configurable. 2018-09-20 14:41:08 +10:00
cc3200 cc3200/mods: Access dict map directly instead of using helper func. 2018-07-08 22:08:24 +10:00
esp32 esp32/machine_rtc: Fix locals dict entry, init qstr points to init meth. 2018-09-20 17:52:16 +10:00
esp8266 esp8266/main: Increase heap by 2kb, now that axtls rodata is in ROM. 2018-09-08 00:09:03 +10:00
minimal py/objstr: Make % (__mod__) formatting operator configurable. 2018-09-20 14:41:08 +10:00
nrf nrf/uart: Fix UART.writechar() to write just 1 byte. 2018-08-02 22:21:24 +02:00
pic16bit all: Update Makefiles and others to build with new ports/ dir layout. 2017-09-06 14:09:13 +10:00
qemu-arm qemu-arm/test_main: Include setjmp.h because it's used by gc_collect. 2017-12-20 15:42:06 +11:00
stm32 stm32/usbd_conf: Allocate enough space in USB HS TX FIFO for CDC packet. 2018-09-26 12:00:56 +10:00
teensy stm32/pin: In pin AF object, remove union of periph ptr types. 2018-04-11 16:14:58 +10:00
unix py/modmath: Add math.factorial, optimised and non-opt implementations. 2018-09-26 15:03:04 +10:00
windows windows/msvc: Support custom compiler for header generation. 2018-08-14 15:07:19 +10:00
zephyr zephyr/CMakeLists: Update for latest Zephyr CMake usage refactorings. 2018-09-14 13:21:13 +10:00