• egg

## Documentation

### Fixnum Computations

#### Usage

`(import fx-utils)`

N N1 ... X1 ... Y1 ... below are fixnum.

#### fxrandom

[procedure] (fxrandom [N]) -> fixnum

N fixnum limit.

#### fxlog2

[procedure] (fxlog2 N) -> fixnum

Returns index of highest bit set, so N is treated as unsigned.

#### fxpow2log2

[procedure] (fxpow2log2 N) -> fixnum

Returns fixnum 2^N.

#### fxdistance

[procedure] (fxdistance X1 Y1 X2 Y2) -> fixnum

Pythagorean distance between the points X1 Y1 and X2 Y2.

#### fxdistance*

[procedure] (fxdistance* X1 Y1 X2 Y2) -> fixnum

Pythagorean distance, inaccurate but useful for relative comparisons.

#### fxquo-and-mod

[procedure] (fxquo-and-mod N D) -> (values fixnum fixnum)

Returns the quotient & remainder values for fixnums D & D.

#### fxmax-and-min

[procedure] (fxmax-and-min N ...) -> (values fixnum fixnum)

Returns the maximum & minimum values for the fixnums N ....

### Fixnum Inlines

#### Usage

`(import fx-inlines)`

N N1 ... X1 ... Y1 ... below are fixnum.

#### fxzero?

[procedure] (fxzero? N) -> boolean

#### fxpositive?

[procedure] (fxpositive? N) -> boolean

#### fxcardinal?

[procedure] (fxcardinal? N) -> boolean

#### fxnegative?

[procedure] (fxnegative? N) -> boolean

#### fxclosedr?

[procedure] (fxclosed-right? L N H) -> boolean
[procedure] (fxclosedr? L N H) -> boolean

Returns N in (L .. H].

N, L & H are fixnum low & high limits.

#### fxclosed?

Returns N in [L .. H].

[procedure] (fxclosed? L N H) -> boolean

N, L & H are fixnum low & high limits.

#### fxclosedl?

Returns N in [L .. H).

[procedure] (fxclosed-left? L N H) -> boolean
[procedure] (fxclosedl? L N H) -> boolean

N, L & H are fixnum low & high limits.

#### fxsub1

[procedure] (fxsub1 N) -> fixnum

#### fxabs

[procedure] (fxabs N) -> fixnum

#### fxsqr

[procedure] (fxsqr N) -> fixnum

#### fxcub

[procedure] (fxcub N) -> fixnum

Kon Lovett

## 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.

4.0.0
C5 port.