Fixed ATAN for builds without long floats. PI has to be of type LONG-FLOAT

This commit is contained in:
jjgarcia 2008-08-02 15:25:58 +00:00
parent 2872c6252d
commit 37923e4ac5
2 changed files with 5 additions and 0 deletions

View file

@ -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 {

View file

@ -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();