Commit 6fead318 authored by Angus Gratton's avatar Angus Gratton Committed by Damien George

esp32: Enable workaround for math.gamma(-inf) result.

Without this commit, math.gamma(-float("inf")) returns inf instead of
raising a math domain ValueError. Needed for float/math_domain_special.py
test to pass on esp32.

Root cause is an upstream libm bug, has been reported to ESP-IDF.

This work was funded through GitHub Sponsors.
Signed-off-by: default avatarAngus Gratton <angus@redyak.com.au>
parent b0c89377
......@@ -282,6 +282,10 @@ typedef long mp_off_t;
#define MICROPY_PY_MACHINE_BOOTLOADER (0)
#endif
// Workaround for upstream bug https://github.com/espressif/esp-idf/issues/14273
// Can be removed if a fix is available in supported ESP-IDF versions.
#define MICROPY_PY_MATH_GAMMA_FIX_NEGINF (1)
#ifndef MICROPY_BOARD_STARTUP
#define MICROPY_BOARD_STARTUP boardctrl_startup
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment