math vocabulary
Factor handbook > Vocabulary index


Documentation
Arithmetic

Meta-data
Authors:Slava Pestov


Words

Builtin classes
bignum
fixnum
float


Tuple classes
ClassSuperclassSlots
complex tuplereal imaginary
log2-expects-positive tuplex
ratio tuplenumerator denominator


Union classes
integer
number
rational
real


Generic words
WordStack effect
*( x y -- z )
+( x y -- z )
-( x y -- z )
/( x y -- z )
/f( x y -- z )
/i( x y -- z )
/mod( x y -- z w )
<( x y -- ? )
<=( x y -- ? )
>( x y -- ? )
>=( x y -- ? )
>bignum( x -- n )
>fixnum( x -- n )
>float( x -- y )
>fraction( a/b -- a b )
>integer( x -- n )
>rect( z -- x y )
abs( x -- y )
bit?( x n -- ? )
bitand( x y -- z )
bitnot( x -- y )
bitor( x y -- z )
bitxor( x y -- z )
denominator( a/b -- b )
fp-infinity?( x -- ? )
fp-nan-payload( x -- bits )
fp-nan?( x -- ? )
fp-qnan?( x -- ? )
fp-sign( x -- ? )
fp-snan?( x -- ? )
fp-special?( x -- ? )
imaginary-part( z -- y )
integer>fixnum( x -- y )
integer>fixnum-strict( x -- y )
mod( x y -- z )
neg?( x -- ? )
next-float( m -- n )
number=( x y -- ? )
numerator( a/b -- a )
prev-float( m -- n )
real-part( z -- x )
recip( x -- y )
shift( x n -- y )
simple-gcd( x y -- d )
u<( x y -- ? )
u<=( x y -- ? )
u>( x y -- ? )
u>=( x y -- ? )
unordered?( x y -- ? )


Primitives
WordStack effect
bits>double( n -- x )
bits>float( n -- x )
double>bits( x -- n )
float>bits( x -- n )


Ordinary words
WordStack effect
(all-integers?)( ... i n quot: ( ... i -- ... ? ) -- ... ? )
(each-integer)( ... i n quot: ( ... i -- ... ) -- ... )
(find-integer)( ... i n quot: ( ... i -- ... ? ) -- ... i/f )
2/( x -- y )
2^( n -- 2^n )
<fp-nan>( payload -- nan )
?1+( x -- y )
align( m w -- n )
all-integers?( ... n quot: ( ... i -- ... ? ) -- ... ? )
each-integer( ... n quot: ( ... i -- ... ) -- ... )
even?( n -- ? )
find-integer( ... n quot: ( ... i -- ... ? ) -- ... i/f )
find-last-integer( ... n quot: ( ... i -- ... ? ) -- ... i/f )
fp-bitwise=( x y -- ? )
gcd( x y -- a d )
if-zero( ..a n quot1: ( ..a -- ..b ) quot2: ( ..a n -- ..b ) -- ..b )
log2( x -- n )
log2-expects-positive( x -- * )
neg( x -- -x )
next-power-of-2( m -- n )
odd?( n -- ? )
power-of-2?( n -- ? )
rect>( x y -- z )
rem( x y -- z )
sgn( x -- n )
sq( x -- y )
times( ... n quot: ( ... -- ... ) -- ... )
unless-zero( ..a n quot: ( ..a n -- ..b ) -- ..b )
when-zero( ..a n quot: ( ..a -- ..b ) -- ..b )
zero?( x -- ? )


Class predicate words
WordStack effect
bignum?( object -- ? )
complex?( object -- ? )
fixnum?( object -- ? )
float?( object -- ? )
integer?( object -- ? )
log2-expects-positive?( object -- ? )
number?( object -- ? )
ratio?( object -- ? )
rational?( object -- ? )
real?( object -- ? )


Files


Children from resource:core
VocabularySummary
math.floatsFloating point number implementation
math.integersInteger implementation
math.orderGeneric protocol for totally-ordered objects
math.parserConverting numbers to and from strings
math.ratiosRational number implementation


Children from resource:basis
VocabularySummary
math.bitsVirtual sequence for bits of an integer
math.bitwiseBitwise arithmetic utilities
math.combinatoricsPermutations and combinations
math.complexComplex number implementation
math.constantsMathematical constants
math.floatsFloating point number implementation
math.functionsElementary complex-valued functions
math.intervalsInterval arithmetic
math.libmLow-level binding to math functions in the C standard library
math.matricesMatrix arithmetic
math.partial-dispatchPartially-dispatched math operations, used by the compiler
math.polynomialsPolynomial arithmetic
math.primesPrime numbers test and generation
math.quaternionsQuaternion arithmetic and Euler angles
math.rangesVirtual sequence consisting of a range of numbers
math.rectanglesmath.rectangles vocabulary
math.statisticsMean, median, standard deviation, and other statistical routines
math.vectorsVector arithmetic


Children from resource:extra
VocabularySummary
math.affine-transformsAffine transforms for two-dimensional vectors
math.algebraVarious algebra-related words
math.analysisVarious special functions from complex analysis
math.approxApproximating rational numbers.
math.binpackBin-packing algorithms.
math.blasmath.blas vocabulary
math.cardinalitymath.cardinality vocabulary
math.combinatoricsPermutations and combinations
math.combinatorsmath.combinators vocabulary
math.compareComparison functions.
math.continued-fractionsContinued fractions
math.derivativesmath.derivatives vocabulary
math.distancesmath.distances vocabulary
math.dualmath.dual vocabulary
math.extrasmath.extras vocabulary
math.factorialsmath.factorials vocabulary
math.financeMoving averages and other calculations useful for finance.
math.floating-pointmath.floating-point vocabulary
math.function-toolsmath.function-tools vocabulary
math.hashcodesmath.hashcodes vocabulary
math.matricesMatrix arithmetic
math.numerical-integrationNumerical integration using Simpson's method
math.pointsmath.points vocabulary
math.primesPrime numbers test and generation
math.quadraticQuadratic equation solver
math.secant-methodmath.secant-method vocabulary
math.similaritymath.similarity vocabulary
math.splinesCommon parametric curves
math.textmath.text vocabulary
math.transformsmath.transforms vocabulary
math.trigmath.trig vocabulary
math.unicodemath.unicode vocabulary
math.vectorsVector arithmetic


Children
VocabularySummary
math.privatemath.private vocabulary