Skip to content

libm/libm: Do not force floating point type size evaluation. #14456

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/libm/libm.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
#include <stdint.h>
#include <math.h>

#define FLT_EVAL_METHOD 0
// These lines verify that FLT_EVAL_METHOD==0, MicroPython's libm requires this.
// If compilation fails here then check the host compiler's FLT_EVAL_METHOD.
typedef float float_t;
typedef double double_t;

#define FORCE_EVAL(x) do { \
if (sizeof(x) == sizeof(float)) { \
Expand Down
5 changes: 4 additions & 1 deletion lib/libm_dbl/libm.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
#include <stdint.h>
#include <math.h>

#define FLT_EVAL_METHOD 0
// These lines verify that FLT_EVAL_METHOD==0, MicroPython's libm requires this.
// If compilation fails here then check the host compiler's FLT_EVAL_METHOD.
typedef float float_t;
typedef double double_t;

#define FORCE_EVAL(x) do { \
if (sizeof(x) == sizeof(float)) { \
Expand Down
Loading