]> gitweb.factorcode.org Git - factor.git/commitdiff
inf -> 1./0.
authorDoug Coleman <erg@trifocus.net>
Fri, 27 Jan 2006 15:17:32 +0000 (15:17 +0000)
committerDoug Coleman <erg@trifocus.net>
Fri, 27 Jan 2006 15:17:32 +0000 (15:17 +0000)
contrib/math/analysis.factor
contrib/math/utils.factor

index fae767205301842f727aaf618068eb7f4576246e..064f3f4088bf2e09ca1ae6ed8a54eb7f816a0355 100644 (file)
@@ -41,7 +41,7 @@ IN: math-contrib
     #! gamma(x) = integral 0..inf [ t^(x-1) exp(-t) ] dt
     #! gamma(n+1) = n! for n > 0
     dup Z:(-inf,0]? [
-            drop inf
+            drop 1./0.
         ] [
             dup abs gamma-lanczos6 swap dup 0 > [ drop ] [ gamma-neg ] if
     ] if ;
@@ -50,7 +50,7 @@ IN: math-contrib
     #! gammaln(x) is an alternative when gamma(x)'s range
     #! varies too widely
     dup 0 < [
-            drop inf
+            drop 1./0.
         ] [
             dup abs gammaln-lanczos6 swap dup 0 > [ drop ] [ gamma-neg ] if
     ] if ;
index 16e44cd0fe09b67bf4dcd047dfd891eb75b203ef..25105740e98cd1e42deadb82218186f190aed4e9 100644 (file)
@@ -45,7 +45,7 @@ USING: errors kernel sequences math sequences-internals namespaces arrays ;
 
 : minmax ( seq -- min max )
     #! find the min and max of a seq in one pass
-    inf -inf rot [ dup pick max -rot nip pick min -rot nip ] each ;
+    1./0. -1./0. rot [ dup pick max -rot nip pick min -rot nip ] each ;
 
 : absminmax ( seq -- min max )
     #! find the absolute values of the min and max of a seq in one pass