Next: , Up: built-in numerics   [Contents][Index]


6.13.1 Type of number values

Core Type: <number>
Parent Type: <top>

Type of numeric values.

Constructor on <number>: <number> type-constructor Z

Validate Z as number object and return Z itself. If Z is not a <number>: raise and exception.

Type predicate on <number>: <boolean> type-predicate obj

The type predicate is number?. Return #t if obj is a <number> object, otherwise return #f.

Equality predicate on <number>: <boolean> equality-predicate this {Z <number>}

The equality predicate is =.

Hash function on <number>: <non-negative-fixnum> hash-function this

The hash function is number-hash.

Methods: predicates

Method on <number>: <boolean> zero? this

Apply zero? to the argument and return its return value.

Method on <number>: <boolean> nan? this

Apply nan? to the argument and return its return value.

Method on <number>: <boolean> finite? this
Method on <number>: <boolean> infinite? this

Apply finite?, infinite? to the argument and return its return value.

Method on <number>: <boolean> odd? this
Method on <number>: <boolean> even? this

Apply odd?, even? to the argument and return its return value.

Methods: exactness

Method on <number>: <number> exact this

Apply exact to the argument and return its return value.

Method on <number>: <number> inexact this

Apply inexact to the argument and return its return value.

Methods: complex numbers

Method on <number>: <real> magnitude this

Apply magnitude to the argument and return its return value.

Method on <number>: <real> angle this

Apply angle to the argument and return its return value.

Method on <number>: <real> real-part this

Apply real-part to the argument and return its return value.

Method on <number>: <real> imag-part this

Apply imag-part to the argument and return its return value.

Method on <number>: <number> complex-conjugate this

Apply complex-conjugate to the argument and return its return value.

Methods: comparison

Method on <number>: <boolean> = this {Z <number>} …

Apply = to the arguments and return its return value.

Method on <number>: <boolean> != this {Z <number>} …

Apply != to the arguments and return its return value.

Methods: arithmetics

Method on <number>: <number> + this {Z <number>} …

Apply + to the arguments and return its return value.

Method on <number>: <number> - this {Z <number>} …

Apply - to the arguments and return its return value.

Method on <number>: <number> * this {Z <number>} …

Apply * to the arguments and return its return value.

Method on <number>: <number> / this {Z <number>} …

Apply / to the arguments and return its return value.

Method on <number>: <number> add1 this

Apply add1 to the arguments and return its return value.

Method on <number>: <number> sub1 this

Apply sub1 to the arguments and return its return value.

Methods: exponentiation and logarithms

Method on <number>: <number> exp this

Apply exp to the argument and return its return value.

Method on <number>: <number> log this
Method on <number>: <number> log this {Z <number>}

Apply log to the arguments and return its return value.

Method on <number>: <number> expt this {Z <number>}

Apply expt to the arguments and return its return value.

Method on <number>: <number> square this

Apply square to the arguments and return its return value.

Method on <number>: <number> cube this

Apply cube to the arguments and return its return value.

Method on <number>: <number> sqrt this

Apply sqrt to the arguments and return its return value.

Method on <number>: <number> cbrt this

Apply cbrt to the arguments and return its return value.

Methods: trigonometric functions

Method on <number>: <number> sin this
Method on <number>: <number> cos this
Method on <number>: <number> tan this

Apply sin, cos, tan to the argument and return its return value.

Method on <number>: <number> asin this
Method on <number>: <number> acos this
Method on <number>: <number> atan this
Method on <number>: <number> atan this {Z <number>}

Apply asin, acos, atan to the argument and return its return value.

Methods: hyperbolic functions

Method on <number>: <number> sinh this
Method on <number>: <number> cosh this
Method on <number>: <number> tanh this

Apply sinh, cosh, tanh to the argument and return its return value.

Method on <number>: <number> asinh this
Method on <number>: <number> acosh this
Method on <number>: <number> atanh this

Apply asinh, acosh, atanh to the argument and return its return value.


Next: , Up: built-in numerics   [Contents][Index]