numbers: don't assume ECL is always built with longfloat
Fixes regression with windows builds (and all buidls without longfloat).
This commit is contained in:
parent
60870ae9b0
commit
60d19cd9ab
1 changed files with 8 additions and 7 deletions
|
|
@ -102,16 +102,17 @@ ecl_expt(cl_object x, cl_object y)
|
|||
z = x;
|
||||
if (!ecl_plusp(ty==t_complex?y->complex.real:y))
|
||||
z = ecl_divide(ecl_make_fixnum(1), z);
|
||||
} else if (tx == t_singlefloat && ty == t_singlefloat
|
||||
&& ecl_single_float(x) >= 0.0f) {
|
||||
} else if (tx == t_singlefloat && ty == t_singlefloat && ecl_single_float(x) >= 0.0f) {
|
||||
z = ecl_make_single_float(powf(ecl_single_float(x), ecl_single_float(y)));
|
||||
} else if (tx == t_doublefloat && ty == t_doublefloat
|
||||
&& ecl_double_float(x) >= 0.0) {
|
||||
} else if (tx == t_doublefloat && ty == t_doublefloat && ecl_double_float(x) >= 0.0) {
|
||||
z = ecl_make_double_float(pow(ecl_double_float(x), ecl_double_float(y)));
|
||||
} else if (tx == t_longfloat && ty == t_longfloat
|
||||
&& ecl_long_float(x) >= 0.0l) {
|
||||
}
|
||||
#ifdef ECL_LONG_FLOAT
|
||||
else if (tx == t_longfloat && ty == t_longfloat && ecl_long_float(x) >= 0.0l) {
|
||||
z = ecl_make_long_float(powl(ecl_long_float(x), ecl_long_float(y)));
|
||||
} else if (ty != t_fixnum && ty != t_bignum) {
|
||||
}
|
||||
#endif
|
||||
else if (ty != t_fixnum && ty != t_bignum) {
|
||||
/* The following could be just
|
||||
z = ecl_log1(x);
|
||||
however, Maxima expects EXPT to have double accuracy
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue