Fix NaN handling of flexpt to be consistent with expt.
This commit is contained in:
parent
1215fb6cec
commit
79c265ef89
|
@ -410,6 +410,9 @@
|
|||
(bin-exact 0.0 'flexpt 0.0 10.0 #t)
|
||||
(bin-exact +nan.0 'flexpt 0.0 -1.0 #t)
|
||||
(bin-exact +nan.0 'flexpt 0.0 0.0 #t)
|
||||
(bin-exact +nan.0 'flexpt +nan.0 2.7 #t)
|
||||
(bin-exact +nan.0 'flexpt 2.7 +nan.0 #t)
|
||||
(bin-exact +nan.0 'flexpt +nan.0 +nan.0 #t)
|
||||
|
||||
(un 1.0 'exact->inexact 1)
|
||||
(un 1073741823.0 'exact->inexact (sub1 (expt 2 30)))
|
||||
|
|
|
@ -2735,6 +2735,8 @@ double scheme_double_expt(double x, double y) {
|
|||
return not_a_number_val;
|
||||
else if ((x == 0.0) && (y <= 0))
|
||||
return not_a_number_val;
|
||||
else if (isnan(x) || isnan(y))
|
||||
return not_a_number_val;
|
||||
else
|
||||
return sch_pow(x, y);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user