diff options
author | dos-reis <gdr@axiomatics.org> | 2009-04-16 14:14:09 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2009-04-16 14:14:09 +0000 |
commit | 6ad3412bc13d3ae7a5f7f68260a90ae1bd536e03 (patch) | |
tree | 0a10a69312041e038b82a49fb87018deea7c2a5b | |
parent | e7e3cddc7d075a5c2ed67b24fcb885329ad1eb3b (diff) | |
download | open-axiom-6ad3412bc13d3ae7a5f7f68260a90ae1bd536e03.tar.gz |
Fix SF/2763053
* interp/sys-os.boot ($NaNvalue): Remove.
(quietDoubleNaN): Import.
* include/cfuns.h (quiet_double_NaN): Rename from NANQ.
* lib/cfuns-c.c (quiet_double_NaN): Likewise.
* algebra/draw.spad.pamphlet: Replace $NaNvalue with quietDoubleNaN.
* algebra/plot.spad.pamphlet: Likewise.
* algebra/plot3d.spad.pamphlet: Likewise.
-rw-r--r-- | src/ChangeLog | 11 | ||||
-rw-r--r-- | src/algebra/draw.spad.pamphlet | 8 | ||||
-rw-r--r-- | src/algebra/plot.spad.pamphlet | 6 | ||||
-rw-r--r-- | src/algebra/plot3d.spad.pamphlet | 6 | ||||
-rw-r--r-- | src/include/cfuns.h | 2 | ||||
-rw-r--r-- | src/interp/sys-os.boot | 6 | ||||
-rw-r--r-- | src/lib/cfuns-c.c | 2 |
7 files changed, 26 insertions, 15 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 217b1308..e20f0f34 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +2009-04-16 Gabriel Dos Reis <gdr@cs.tamu.edu> + + Fix SF/2763053 + * interp/sys-os.boot ($NaNvalue): Remove. + (quietDoubleNaN): Import. + * include/cfuns.h (quiet_double_NaN): Rename from NANQ. + * lib/cfuns-c.c (quiet_double_NaN): Likewise. + * algebra/draw.spad.pamphlet: Replace $NaNvalue with quietDoubleNaN. + * algebra/plot.spad.pamphlet: Likewise. + * algebra/plot3d.spad.pamphlet: Likewise. + 2009-04-15 Gabriel Dos Reis <gdr@cs.tamu.edu> Fix SF/2760823 diff --git a/src/algebra/draw.spad.pamphlet b/src/algebra/draw.spad.pamphlet index de5dc3e3..52f12b71 100644 --- a/src/algebra/draw.spad.pamphlet +++ b/src/algebra/draw.spad.pamphlet @@ -318,9 +318,9 @@ TopLevelDrawFunctionsForCompiledFunctions(): myTrap1: (SF-> SF, SF) -> SF myTrap1(ff:SF-> SF, f:SF):SF == s := trapNumericErrors(ff(f))$Lisp :: Union(SF, "failed") - s case "failed" => _$NaNvalue$Lisp + s case "failed" => quietDoubleNaN()$Lisp r:=s::SF - r >max()$SF or r < min()$SF => _$NaNvalue$Lisp + r >max()$SF or r < min()$SF => quietDoubleNaN()$Lisp r makePt2: (SF,SF) -> Point SF @@ -493,9 +493,9 @@ TopLevelDrawFunctionsForCompiledFunctions(): myTrap2: ((SF, SF) -> SF, SF, SF) -> SF myTrap2(ff:(SF, SF) -> SF, u:SF, v:SF):SF == s := trapNumericErrors(ff(u, v))$Lisp :: Union(SF, "failed") - s case "failed" => _$NaNvalue$Lisp + s case "failed" => quietDoubleNaN()$Lisp r:SF := s::SF - r >max()$SF or r < min()$SF => _$NaNvalue$Lisp + r >max()$SF or r < min()$SF => quietDoubleNaN()$Lisp r recolor(ptFunc,colFunc) == diff --git a/src/algebra/plot.spad.pamphlet b/src/algebra/plot.spad.pamphlet index 5b5eefd3..0ab68ee1 100644 --- a/src/algebra/plot.spad.pamphlet +++ b/src/algebra/plot.spad.pamphlet @@ -284,7 +284,7 @@ Plot(): Exports == Implementation where xDiff = 0 or yDiff = 0 => curve l := lo tRange; h := hi tRange (tDiff := h-l) = 0 => curve --- if (EQL(yDiff, _$NaNvalue$Lisp)$Lisp) then yDiff := 1::F +-- if (EQL(yDiff, quietDoubleNaN()$Lisp)$Lisp) then yDiff := 1::F t := curve.knots #t < 3 => curve p := curve.points; f := curve.source @@ -477,9 +477,9 @@ Plot(): Exports == Implementation where myTrap: (F-> F, F) -> F myTrap(ff:F-> F, f:F):F == s := trapNumericErrors(ff(f))$Lisp :: Union(F, "failed") - s case "failed" => _$NaNvalue$Lisp + s case "failed" => quietDoubleNaN()$Lisp r:F:=s::F - r > max()$F or r < min()$F => _$NaNvalue$Lisp + r > max()$F or r < min()$F => quietDoubleNaN()$Lisp r plot(f:F -> F,xRange:R) == diff --git a/src/algebra/plot3d.spad.pamphlet b/src/algebra/plot3d.spad.pamphlet index faf926ad..658b3a32 100644 --- a/src/algebra/plot3d.spad.pamphlet +++ b/src/algebra/plot3d.spad.pamphlet @@ -192,11 +192,11 @@ Plot3D(): Exports == Implementation where select(l,f,g) == m := f first l - if (EQL(m, _$NaNvalue$Lisp)$Lisp) then m := 0 + if (EQL(m, quietDoubleNaN()$Lisp)$Lisp) then m := 0 -- for p in rest l repeat m := g(m,fp) for p in rest l repeat fp : F := f p - if (EQL(fp, _$NaNvalue$Lisp)$Lisp) then fp := 0 + if (EQL(fp, quietDoubleNaN()$Lisp)$Lisp) then fp := 0 m := g(m,fp) m @@ -447,7 +447,7 @@ Plot3D(): Exports == Implementation where myTrap(ff:F-> F, f:F):F == s := trapNumericErrors(ff(f))$Lisp :: Union(F, "failed") if (s) case "failed" then - r:F := _$NaNvalue$Lisp + r:F := quietDoubleNaN()$Lisp else r:F := s r diff --git a/src/include/cfuns.h b/src/include/cfuns.h index 4d0a8f05..46f4cad5 100644 --- a/src/include/cfuns.h +++ b/src/include/cfuns.h @@ -64,7 +64,7 @@ OPENAXIOM_EXPORT int oa_copy_file(const char*, const char*); OPENAXIOM_EXPORT double plus_infinity(void); OPENAXIOM_EXPORT double minus_infinity(void); -OPENAXIOM_EXPORT double NANQ(void); +OPENAXIOM_EXPORT double quiet_double_NaN(void); OPENAXIOM_EXPORT openaxiom_byteorder oa_get_host_byteorder(void); diff --git a/src/interp/sys-os.boot b/src/interp/sys-os.boot index c4f45e66..aae3dad3 100644 --- a/src/interp/sys-os.boot +++ b/src/interp/sys-os.boot @@ -198,16 +198,16 @@ runProgram(prog,args) == ++ numeric limits + +import quiet__double__NaN: () -> double for quietDoubleNaN + )if %hasFeature KEYWORD::GCL import plus__infinity: () -> double for plusInfinity import minus__infinity: () -> double for minusInfinity -import NANQ: () -> double for NaNQ - $plusInfinity := plusInfinity() $minusInfinity := minusInfinity() -$NaNvalue := NaNQ() )elseif %hasFeature KEYWORD::SBCL $plusInfinity == SB_-EXT::DOUBLE_-FLOAT_-POSITIVE_-INFINITY diff --git a/src/lib/cfuns-c.c b/src/lib/cfuns-c.c index 4a443b82..e7fa22ec 100644 --- a/src/lib/cfuns-c.c +++ b/src/lib/cfuns-c.c @@ -667,7 +667,7 @@ minus_infinity(void) } OPENAXIOM_EXPORT double -NANQ(void) +quiet_double_NaN(void) { #ifdef NAN return NAN; |