]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/math/analysis/analysis.factor
Delete empty unit tests files, remove 1- and 1+, reorder IN: lines in a lot of places...
[factor.git] / extra / math / analysis / analysis.factor
index fa01b0376dcde26bc98664a6aec6f5f7e384c403..39d6450ba0cffc20d317b4e4608f473964bf746c 100755 (executable)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Doug Coleman, Slava Pestov, Aaron Schaefer.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: combinators.short-circuit kernel math math.constants math.functions
-    math.vectors sequences ;
+USING: combinators.short-circuit kernel math math.constants
+math.functions math.vectors sequences ;
 IN: math.analysis
 
 <PRIVATE
@@ -42,7 +42,7 @@ PRIVATE>
     #! gamma(x) = integral 0..inf [ t^(x-1) exp(-t) ] dt
     #! gamma(n+1) = n! for n > 0
     dup { [ 0.0 <= ] [ 1.0 mod zero? ] } 1&& [
-        drop 1./0.
+        drop 1/0.
     ] [
         [ abs gamma-lanczos6 ] keep dup 0 > [ drop ] [ gamma-neg ] if
     ] if ;
@@ -51,7 +51,7 @@ PRIVATE>
     #! gammaln(x) is an alternative when gamma(x)'s range
     #! varies too widely
     dup 0 < [
-        drop 1./0.
+        drop 1/0.
     ] [
         [ abs gammaln-lanczos6 ] keep dup 0 > [ drop ] [ gamma-neg ] if
     ] if ;
@@ -117,5 +117,5 @@ PRIVATE>
 : stirling-fact ( n -- fact )
     [ pi 2 * * sqrt ]
     [ [ e / ] keep ^ ]
-    [ 12 * recip 1+ ] tri * * ;
+    [ 12 * recip 1 + ] tri * * ;