fix sign of infinity returned by expt of 0.0 and a negative number, e.g. (expt 0.0 -1.0)

This commit is contained in:
Marius Gerbershagen 2017-08-25 17:42:17 +02:00
parent 436e6a62ca
commit a7fdcf5cf3

View file

@ -99,7 +99,7 @@ ecl_expt(cl_object x, cl_object y)
FEwrong_type_nth_arg(@[expt], 1, x, @[number]);
}
if (ecl_zerop(x)) {
z = ecl_times(x, y);
z = x;
if (!ecl_plusp(ty==t_complex?y->complex.real:y))
z = ecl_divide(ecl_make_fixnum(1), z);
} else if (ty != t_fixnum && ty != t_bignum) {