fx-utils
Documentation
Additional fixnum routines.
Fixnum Computations
Usage
(import fx-utils)
N N1 ... X1 ... Y1 ... below are fixnum.
fxrandom
- fxrandom #!optional Nprocedure
N fixnum limit.
fxlog2
- fxlog2 Nprocedure
Returns index of highest bit set, so N is treated as unsigned.
fxpow2log2
- fxpow2log2 Nprocedure
Returns fixnum 2^N.
fxdistance
- fxdistance X1 Y1 X2 Y2procedure
Pythagorean distance between the points X1 Y1 and X2 Y2.
fxdistance*
- fxdistance* X1 Y1 X2 Y2procedure
Pythagorean distance, inaccurate but useful for relative comparisons.
fxquo-and-mod
- fxquo-and-mod N Dprocedure
Returns the quotient & remainder values for fixnums D & D.
fxmax-and-min
- fxmax-and-min N ...procedure
Returns the maximum & minimum values for the fixnums N ....
Fixnum Inlines
Usage
(import fx-inlines)
N N1 ... X1 ... Y1 ... below are fixnum.
fxzero?
- fxzero? Nprocedure
fxpositive?
- fxpositive? Nprocedure
fxcardinal?
- fxcardinal? Nprocedure
fxnegative?
- fxnegative? Nprocedure
fxclosed-right?
fxclosedr?
- fxclosed-right? L N Hprocedure
- fxclosedr? L N Hprocedure
Returns N in (L .. H].
N, L & H are fixnum low & high limits.
fxclosed?
Returns N in [L .. H].
- fxclosed? L N Hprocedure
N, L & H are fixnum low & high limits.
fxclosed-left?
fxclosedl?
Returns N in [L .. H).
- fxclosed-left? L N Hprocedure
- fxclosedl? L N Hprocedure
N, L & H are fixnum low & high limits.
fxadd1
- fxadd1 Nprocedure
fxsub1
- fxsub1 Nprocedure
fxabs
- fxabs Nprocedure
fxsqr
- fxsqr Nprocedure
fxcub
- fxcub Nprocedure
Author
Repository
This egg is hosted on the CHICKEN Subversion repository:
https://anonymous@code.call-cc.org/svn/chicken-eggs/release/5/fx-utils
If you want to check out the source code repository of this egg and you are not familiar with Subversion, see this page.
Version history
- 4.0.0
- C5 port.
License
This code is in the public domain.