Fix float arithmetic codegen and math_log aliasing
El SDK CI - dev / build-and-test (pull_request) Failing after 10m8s
El SDK CI - dev / build-and-test (pull_request) Failing after 10m8s
Float + previously fell through to string concat (segfault); -, *, /, % operated on raw IEEE-754 bit patterns as integers (garbage results). Floats are now tracked via a __float_names typed-binding set (parallel to the existing int-tracking scheme) and arithmetic is emitted as real C double ops. Also fixes math_log, which was wrongly aliased to natural log (duplicating math_ln) — now uses log10 — and adds the missing <math.h> include. Rebuilt elc binary included.
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h> /* fmod, sin, sqrt, ... — used by codegen'd float arithmetic */
|
||||
|
||||
typedef int64_t el_val_t;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user