Liking cljdoc? Tell your friends :D

automaton-optimization.maths

Implements all mathematical basics functions compatible both with clj and cljs compiler and aiming at return the same results.

Implements all mathematical basics functions compatible both with clj and cljs compiler and aiming at return the same results.
raw docstring

absclj/s

(abs x)

Absolute value of x.

Absolute value of `x`.
raw docstring

abs-doubleclj/s

(abs-double x)

Absolute value of x, optimized for x∊ℝ.

Absolute value of `x`, optimized for `x∊ℝ`.
raw docstring

abs-intclj/s

(abs-int x)

Absolute value of x, optimized for x∊ℕ.

Absolute value of `x`, optimized for `x∊ℕ`.
raw docstring

approx=clj/s

(approx= e x y)

Returns true for an approximate numerical equality.

Returns true for an approximate numerical equality.
raw docstring

atanclj/s

(atan x)

Returns the arctangeant of x, where x as a multiple of PI.

Returns the arctangeant of `x`, where `x` as a multiple of `PI`.
raw docstring

ceilclj/s

(ceil x)

Returns the ceiling of x (the upper rounded value).

Returns the ceiling of `x` (the upper rounded value).
raw docstring

clampclj/s

(clamp lower upper x)

Returns the clamped value between lower and upper.

Returns the clamped value between `lower` and `upper`.
raw docstring

clamp-doubleclj/s

(clamp-double lower upper x)

Returns the clamped value between lower and upper, where x∊ℝ.

Returns the clamped value between `lower` and `upper`, where `x∊ℝ`.
raw docstring

clamp-integerclj/s

(clamp-integer lower upper x)

Returns the clamped value between lower and upper, where (x,n)∊ℕ².

Returns the clamped value between `lower` and `upper`, where `(x,n)∊ℕ²`.
raw docstring

cosclj/s

(cos x)

Returns the cosinus of x, where x is a multiple of PI.

Returns the cosinus of `x`, where `x` is a multiple of `PI`.
raw docstring

D-0x1p-53clj/s


expclj/s

(exp x)

Returns the exponential of x, where x∊ℝ.

Returns the exponential of `x`, where `x∊ℝ`.
raw docstring

floorclj/s

(floor x)

Returns the floor of x (the lower rounded value).

Returns the floor of `x` (the lower rounded value).
raw docstring

HALF_LOG_2_PIclj/s

Half of log of twice PI

Half of log of twice PI
raw docstring

HALF_PIclj/s

Half PI

Half  PI
raw docstring

infinite?clj/s

(infinite? x)

Returns true if x is infinite.

Returns true if `x` is infinite.
raw docstring

infinityclj/s

Returns infinite for reals.

Returns infinite for reals.
raw docstring

infinity-integerclj/s

Returns infinite for integer.

Returns infinite for integer.
raw docstring

infinity-longclj/s

Returns infinite for integer.

Returns infinite for integer.
raw docstring

interval-affine-fnclj/s

(interval-affine-fn a b x1 x2 x)

Returns an affine function with coefficient a and b, defined in [x1; x2[.

If

  • x1 if not a number (typically nil), is interprated like an interval starting at -infinite
  • x2 if not a number (typically nil), is interprated like a non ending interval (infinite)
Returns an affine function with coefficient `a` and `b`, defined in `[x1; x2[`.

If
* `x1` if not a number (typically nil), is interprated like an interval starting at -infinite
* `x2` if not a number (typically nil), is interprated like a non ending interval (infinite)
raw docstring

LANCZOS_Gclj/s

The Lanczos constant.

The Lanczos constant.
raw docstring

logclj/s

(log x)

Returns the neperian logarithm of x, where x∊ℝ.

Returns the neperian logarithm of `x`, where `x∊ℝ`.
raw docstring

log1pclj/s

(log1p x)

Returns (ln 1+x) the natural logarithm of 1+x, where x∊ℝ.

Returns `(ln 1+x)` the natural logarithm of `1+x`, where `x∊ℝ`.
raw docstring

long->unit-doubleclj/s

(long->unit-double l)

Returns a unit float (a floating number between 0 and 1), based on the value of l.

Returns a unit float (a floating number between 0 and 1), based on the value of `l`.
raw docstring

maxclj/s

Like clojure.core/max, but transducer and nil-friendly.

Like clojure.core/max, but transducer and nil-friendly.
raw docstring

max-doubleclj/s

Like clojure.core/max, but transducer and nil-friendly.

Like `clojure.core/max,` but transducer and nil-friendly.
raw docstring

max-longclj/s

Like clojure.core/max, but transducer and nil-friendly.

Like clojure.core/max, but transducer and nil-friendly.
raw docstring

minclj/s

Like clojure.core/min, but transducer and nil-friendly.

Like `clojure.core/min,` but transducer and nil-friendly.
raw docstring

min-doubleclj/s

Like clojure.core/min, but transducer and nil-friendly.

Like `clojure.core/min,` but transducer and nil-friendly.
raw docstring

min-longclj/s

Like clojure.core/min, but transducer and nil-friendly.

Like clojure.core/min, but transducer and nil-friendly.
raw docstring

nanclj/s

Returns nan.

Returns nan.
raw docstring

negative-infinityclj/s

Returns minus infinite for reals.

Returns minus infinite for reals.
raw docstring

negative-infinity-integerclj/s

Returns minus infinite for integer.

Returns minus infinite for integer.
raw docstring

negative-infinity-longclj/s

Returns minus infinite for integer.

Returns minus infinite for integer.
raw docstring

PIclj/s

Value of PI based on platform constant value

According to maths.com, the first values are: 3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989

Value of PI based on platform constant value

According to [maths.com](http://www.math.com/tables/constants/pi.htm), the first values are:
3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989
raw docstring

polynomial-valueclj/s

(polynomial-value x coefficients)

Evaluates a polynomial at the given value x, for the coefficients given in descending order (so the last element of coefficients is the constant term).

Evaluates a polynomial at the given value `x`, for the `coefficients` given in descending order (so the last element of coefficients is the constant term).
raw docstring

powclj/s

(pow x n)

Power n of x, where (x,n)∊ℝ².

Power `n` of `x`, where `(x,n)∊ℝ²`.
raw docstring

proportionclj/s

(proportion f coll)

Calculates the proportion of inputs for which pred returns true.

Calculates the proportion of inputs for which `pred` returns true.
raw docstring

rootclj/s

(root x n)

Return the n root of x, where (x,n)∊ℝ².

Return the `n` root of `x`, where `(x,n)∊ℝ²`.
raw docstring

signumclj/s

(signum x)

Returns the sign of x for double and float numbers.

Returns the sign of `x` for `double` and `float` numbers.
raw docstring

sinclj/s

(sin x)

Returns the sinus of x, where x as a multiple of PI.

Returns the sinus of `x`, where `x` as a multiple of `PI`.
raw docstring

sqrtclj/s

(sqrt x)

Square root of x, where x∊[0;+∞[.

Square root of `x`, where `x∊[0;+∞[`.
raw docstring

SQRT_2_PIclj/s

Square root of twice pi.

Square root of twice pi.
raw docstring

squareclj/s

(square x)

Square of x.

Square of `x`.
raw docstring

square-doubleclj/s

(square-double x)

Square of x, optimized for x as a double.

Square of `x`, optimized for `x` as a double.
raw docstring

square-intclj/s

(square-int x)

Square of x, optimized for x as an integer.

Square of `x`, optimized for `x` as an integer.
raw docstring

tanclj/s

(tan x)

Returns the tangeant of x, where x as a multiple of PI.

Returns the tangeant of `x`, where `x` as a multiple of `PI`.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close