circuitpython/ports/unix
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
..
coverage-frzmpy ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
coverage-frzstr ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
modules all: Update Makefiles and others to build with new ports/ dir layout. 2017-09-06 14:09:13 +10:00
.gitignore ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
alloc.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
coverage.c tests/unix/extra_coverage: Don't test stream objs with NULL write fun. 2018-06-18 12:35:56 +10:00
fatfs_port.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
fdfile.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
file.c unix: Use MP_STREAM_GET_FILENO to allow uselect to poll general objects. 2018-07-20 13:09:49 +10:00
gccollect.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
input.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
input.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
main.c ports: Call gc_sweep_all() when doing a soft reset. 2018-06-12 11:56:25 +10:00
Makefile unix/Makefile: Build libffi inside $BUILD. 2018-09-10 11:34:46 +03:00
modffi.c py/objstr: Remove "make_qstr_if_not_already" arg from mp_obj_new_str. 2017-11-16 13:17:51 +11:00
modjni.c unix/modjni: Get building under coverage and nanbox builds. 2018-09-20 16:04:08 +10:00
modmachine.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
modos.c unix/modos: Include extmod/vfs.h for MP_S_IFDIR, etc. 2018-09-14 13:22:50 +10:00
modtermios.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
modtime.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
moduos_vfs.c unix/moduos_vfs: Add missing uos functions from traditional uos module. 2018-06-06 14:28:23 +10:00
moduselect.c unix: Use MP_STREAM_GET_FILENO to allow uselect to poll general objects. 2018-07-20 13:09:49 +10:00
modusocket.c unix: Use MP_STREAM_GET_FILENO to allow uselect to poll general objects. 2018-07-20 13:09:49 +10:00
mpconfigport_coverage.h py/modmath: Add math.factorial, optimised and non-opt implementations. 2018-09-26 15:03:04 +10:00
mpconfigport_fast.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
mpconfigport_freedos.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
mpconfigport_minimal.h py/objstr: Make % (__mod__) formatting operator configurable. 2018-09-20 14:41:08 +10:00
mpconfigport_nanbox.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
mpconfigport.h py/mpconfig.h: Introduce MICROPY_DEBUG_PRINTER for debugging output. 2018-08-02 14:04:44 +10:00
mpconfigport.mk ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
mphalport.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
mpthreadport.c unix: Add support for using the Python stack. 2017-12-11 13:49:09 +11:00
mpthreadport.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
qstrdefsport.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
unix_mphal.c extmod/uos_dupterm: Update uos.dupterm() and helper funcs to have index. 2017-10-13 20:01:57 +11:00