mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-04-29 04:41:33 -07:00
Fixed ATAN for builds without long floats. PI has to be of type LONG-FLOAT
This commit is contained in:
parent
2872c6252d
commit
37923e4ac5
2 changed files with 5 additions and 0 deletions
|
|
@ -487,6 +487,7 @@ ecl_atan2(cl_object y, cl_object x)
|
|||
#else
|
||||
double dy = ecl_to_double(y);
|
||||
double dx = ecl_to_double(x);
|
||||
double dz = ecl_atan2_double(dy, dx);
|
||||
if (type_of(x) == t_doublefloat || type_of(y) == t_doublefloat) {
|
||||
return ecl_make_doublefloat(dz);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -603,7 +603,11 @@ init_number(void)
|
|||
cl_core.imag_two =
|
||||
ecl_make_complex(ecl_make_singlefloat(0.0), ecl_make_singlefloat(2.0));
|
||||
|
||||
#ifdef ECL_LONG_FLOAT
|
||||
ECL_SET(@'pi', make_longfloat(M_PI));
|
||||
#else
|
||||
ECL_SET(@'pi', ecl_make_doublefloat(M_PI));
|
||||
#endif
|
||||
|
||||
init_big();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue