aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/interp/boot-pkg.lisp3
-rw-r--r--src/interp/sfsfun.boot10
-rw-r--r--src/lisp/core.lisp.in4
3 files changed, 9 insertions, 8 deletions
diff --git a/src/interp/boot-pkg.lisp b/src/interp/boot-pkg.lisp
index 8f3e4d91..c4248655 100644
--- a/src/interp/boot-pkg.lisp
+++ b/src/interp/boot-pkg.lisp
@@ -69,9 +69,6 @@
(defmacro |conjugate| (z)
`(conjugate ,z))
-(defmacro |integerAndFractionalParts| (x)
- `(multiple-value-list (floor ,x)))
-
(defmacro |sqrt| (x)
`(sqrt ,x))
diff --git a/src/interp/sfsfun.boot b/src/interp/sfsfun.boot
index d855c4af..7f60b846 100644
--- a/src/interp/sfsfun.boot
+++ b/src/interp/sfsfun.boot
@@ -80,10 +80,10 @@ nangenericcomplex () ==
fracpart(x) ==
- second(MULTIPLE_-VALUE_-LIST(FLOOR(x)))
+ second integerAndFractionalParts x
intpart(x) ==
- first(MULTIPLE_-VALUE_-LIST(FLOOR(x)))
+ first integerAndFractionalParts x
negintp(x) ==
if ZEROP IMAGPART(x) and x<0.0 and ZEROP fracpart(x)
@@ -155,7 +155,7 @@ gammaRatapprox (x) ==
result := gammaRatapprox(reducedarg)/prod
else
Pi := PI
- lx := MULTIPLE_-VALUE_-LIST(FLOOR(x))
+ lx := integerAndFractionalParts x
intpartx := first(lx)+1
restx := second(lx)
if ZEROP restx -- case of negative non-integer value
@@ -237,7 +237,7 @@ cgammaG(z1,z2) ==
LOG(2*PI) + PI*z2 - COMPLEX(0.0,1.0)*PI*(z1-.5)
logH(z1,z2,z) ==
- z1bar := second(MULTIPLE_-VALUE_-LIST(FLOOR(z1))) ---frac part of z1
+ z1bar := second integerAndFractionalParts z1 ---frac part of z1
piz1bar := PI*z1bar
piz2 := PI*z2
twopiz2 := 2.0*piz2
@@ -809,7 +809,7 @@ besselIcheb(z,v,n) ==
besselIback(v,z) ==
ipv := IMAGPART(v)
rpv := REALPART(v)
- lm := MULTIPLE_-VALUE_-LIST(FLOOR(rpv))
+ lm := integerAndFractionalParts rpv
m := first(lm) --- floor of real part of v
n := 2*MAX(20,m+10) --- how large the back recurrence should be
tv := second(lm)+(v-rpv) --- fractional part of real part of v
diff --git a/src/lisp/core.lisp.in b/src/lisp/core.lisp.in
index 61877e29..cd1a6775 100644
--- a/src/lisp/core.lisp.in
+++ b/src/lisp/core.lisp.in
@@ -223,6 +223,7 @@
"fixnum?"
"double"
"%fNaN?"
+ "integerAndFractionalParts"
))
(in-package "AxiomCore")
@@ -1478,6 +1479,9 @@
(defmacro |double| (x)
`(float ,x 1.0d0))
+(defmacro |integerAndFractionalParts| (x)
+ `(multiple-value-list (floor ,x)))
+
;;
;; -*- Native Datatype correspondance -*-
;;