Liking cljdoc? Tell your friends :D

provisdom.math.core


===clj

(=== number)
(=== number1 number2)
(=== number1 number2 & more)

Equality for numbers that works with NaN.

Equality for numbers that works with NaN.
sourceraw docstring

absclj

(abs number)

Returns absolute value of number.

Returns absolute value of `number`.
sourceraw docstring

abs'clj

(abs' number)

Returns absolute value of number as a long if possible.

Returns absolute value of `number` as a long if possible.
sourceraw docstring

acosclj

(acos number)

Returns inverse cosine of number.

Returns inverse cosine of `number`.
sourceraw docstring

acoshclj

(acosh number)

Returns inverse hyperbolic cosine of number.

Returns inverse hyperbolic cosine of `number`.
sourceraw docstring

angle->radians'clj

(angle->radians' angle)

Returns the reduced radians from the angle, where radians = angle × PI / 180. Returns a long if possible.

Returns the reduced radians from the `angle`, where
radians = `angle` × PI / 180. Returns a long if possible.
sourceraw docstring

asinclj

(asin number)

Returns inverse sine of number.

Returns inverse sine of `number`.
sourceraw docstring

asinhclj

(asinh number)

Returns inverse hyperbolic sine of number.

Returns inverse hyperbolic sine of `number`.
sourceraw docstring

atanclj

(atan number)

Returns inverse tangent of number.

Returns inverse tangent of `number`.
sourceraw docstring

atan2clj

(atan2 number1 number2)

Returns inverse tangent with two arguments.

Returns inverse tangent with two arguments.
sourceraw docstring

atanhclj

(atanh number)

Returns inverse hyperbolic tangent.

Returns inverse hyperbolic tangent.
sourceraw docstring

cbrtclj

(cbrt number)

Returns cube root of number.

Returns cube root of `number`.
sourceraw docstring

ceilclj

(ceil number)

Rounds up. Returns a double.

Rounds up. Returns a double.
sourceraw docstring

ceil'clj

(ceil' number)

Rounds up. Returns a long if possible, otherwise a double.

Rounds up. Returns a long if possible, otherwise a double.
sourceraw docstring

corr?clj

(corr? x)

Returns true if x is between -1 and 1, inclusive.

Returns true if `x` is between -1 and 1, inclusive.
sourceraw docstring

cosclj

(cos number)

Returns cosine of number.

Returns cosine of `number`.
sourceraw docstring

cubeclj

(cube number)

Returns cube of number.

Returns cube of `number`.
sourceraw docstring

cube'clj

(cube' number)

Returns cube of number as a long if possible.

Returns cube of `number` as a long if possible.
sourceraw docstring

dbl-closeclj

source

dbl-digitsclj

source

divclj

(div number2)
(div number1 number2)
(div number1 number2 zero-div-by-zero)

Returns number1 divided by number2. Or 1 divided by number2. Dividing a positive number divided by zero returns Inf+. Dividing a negative number divided by zero returns Inf-. Dividing zero by zero will return NaN by default. Optionally, can include alternative return value for 0/0, zero-div-by-zero.

Returns `number1` divided by `number2`. Or 1 divided by `number2`. Dividing a
positive number divided by zero returns Inf+. Dividing a negative number
divided by zero returns Inf-. Dividing zero by zero will return NaN by
default. Optionally, can include alternative return value for 0/0,
`zero-div-by-zero`.
sourceraw docstring

double-finite?clj

(double-finite? x)

Returns true if x is a double and finite.

Returns true if `x` is a double and finite.
sourceraw docstring

Eclj

source

expclj

(exp number)

Returns e^number.

Returns e^`number`.
sourceraw docstring

finite+?clj

(finite+? x)

Returns true if x is a positive finite number.

Returns true if `x` is a positive finite number.
sourceraw docstring

finite-?clj

(finite-? x)

Returns true if x is a negative finite number.

Returns true if `x` is a negative finite number.
sourceraw docstring

finite-non+?clj

(finite-non+? x)

Returns true if x is a non-positive finite number.

Returns true if `x` is a non-positive finite number.
sourceraw docstring

finite-non-?clj

(finite-non-? x)

Returns true if x is a non-negative finite number.

Returns true if `x` is a non-negative finite number.
sourceraw docstring

finite?clj

(finite? x)

Returns true if x is a finite number.

Returns true if `x` is a finite number.
sourceraw docstring

floorclj

(floor number)

Rounds down. Returns a double.

Rounds down. Returns a double.
sourceraw docstring

floor'clj

(floor' number)

Rounds down. Returns a long if possible, otherwise a double.

Rounds down. Returns a long if possible, otherwise a double.
sourceraw docstring

halfclj

source

half-log-two-piclj

source

hypotclj

(hypot number1 number2)

Returns hypotenuse with sides number1 and number2.

Returns hypotenuse with sides `number1` and `number2`.
sourceraw docstring

inf+clj

source

inf+?clj

(inf+? x)

Returns true if x is Inf+.

Returns true if `x` is Inf+.
sourceraw docstring

inf-clj

source

inf-?clj

(inf-? x)

Returns true if x is Inf-.

Returns true if `x` is Inf-.
sourceraw docstring

inf?clj

(inf? x)

Returns true if x is Inf+ or Inf-.

Returns true if `x` is Inf+ or Inf-.
sourceraw docstring

int+?clj

(int+? x)

Returns true if x is an int and is positive.

Returns true if `x` is an int and is positive.
sourceraw docstring

int-?clj

(int-? x)

Returns true if x is an int and is negative.

Returns true if `x` is an int and is negative.
sourceraw docstring

int-non+?clj

(int-non+? x)

Returns true if x is an int and is non-positive.

Returns true if `x` is an int and is non-positive.
sourceraw docstring

int-non-?clj

(int-non-? x)

Returns true if x is an int and is non-negative.

Returns true if `x` is an int and is non-negative.
sourceraw docstring

int?clj

(int? x)

Returns true is x is an integer that is within the int range.

Returns true is `x` is an integer that is within the int range.
sourceraw docstring

inv-log-twoclj

source

inv-piclj

source

inv-sqrt-piclj

source

inv-sqrt-twoclj

source

inv-sqrt-two-piclj

source

inv-two-piclj

source

logclj

(log number)

Returns log number.

Returns log `number`.
sourceraw docstring

log-halfclj

source

log-piclj

source

log-pi-squaredclj

source

log-tenclj

source

log-twoclj

source

log-two-piclj

source

log-two-pi-eclj

source

log10clj

(log10 number)

Returns base 10 log of number.

Returns base 10 log of `number`.
sourceraw docstring

log2clj

(log2 number)

Returns base 2 log of number.

Returns base 2 log of `number`.
sourceraw docstring

lognclj

(logn number base)

Returns base log of number.

Returns `base` log of `number`.
sourceraw docstring

long+?clj

(long+? x)

Returns true if x is a long and is positive.

Returns true if `x` is a long and is positive.
sourceraw docstring

long-?clj

(long-? x)

Returns true if x is a long and is negative.

Returns true if `x` is a long and is negative.
sourceraw docstring

long-able+?clj

(long-able+? x)

Returns true if x is a number that can be converted to a long, and is positive.

Returns true if `x` is a number that can be converted to a long, and is
positive.
sourceraw docstring

long-able-?clj

(long-able-? x)

Returns true if x is a number that can be converted to a long, and is negative.

Returns true if `x` is a number that can be converted to a long, and is
negative.
sourceraw docstring

long-able-non+?clj

(long-able-non+? x)

Returns true if x is a number that can be converted to a long, and is non+.

Returns true if `x` is a number that can be converted to a long, and is
non+.
sourceraw docstring

long-able-non-?clj

(long-able-non-? x)

Returns true if x is a number that can be converted to a long, and is non-.

Returns true if `x` is a number that can be converted to a long, and is
non-.
sourceraw docstring

long-able?clj

(long-able? x)

Returns true if x is a number that can be converted to a long.

Returns true if `x` is a number that can be converted to a long.
sourceraw docstring

long-digitsclj

source

long-non+?clj

(long-non+? x)

Returns true if x is a long and is non-positive.

Returns true if `x` is a long and is non-positive.
sourceraw docstring

long-non-?clj

(long-non-? x)

Returns true if x is a long and is non-negative.

Returns true if `x` is a long and is non-negative.
sourceraw docstring

long?clj

(long? x)

Returns true if x is a long.

Returns true if `x` is a long.
sourceraw docstring

max-dblclj

source

max-intclj

source

max-longclj

source

max-sglclj

source

maybe-long-ableclj

(maybe-long-able x)

Returns x as a long if possible. Otherwise returns x.

Returns `x` as a long if possible.  Otherwise returns x.
sourceraw docstring

mdlclj

source

min-dblclj

source

min-intclj

source

min-longclj

source

min-sglclj

source

mod'clj

(mod' numerator divisor)

Modulus of numerator and divisor. Truncates toward negative infinity. Has sign of divisor unless numerical rounding error with quot'. Will stay consistent with quot'. Returns a long if possible.

Modulus of `numerator` and `divisor`. Truncates toward negative infinity. Has
sign of `divisor` unless numerical rounding error with [[quot']]. Will stay
consistent with [[quot']]. Returns a long if possible.
sourceraw docstring

nanclj

source

nan?clj

(nan? x)

Returns true if x is NaN.

Returns true if `x` is NaN.
sourceraw docstring

neg?clj

(neg? x)

Returns true if x is a number that is negative.

Returns true if `x` is a number that is negative.
sourceraw docstring

next-downclj

(next-down number)

Returns number minus smallest amount to make a change.

Returns `number` minus smallest amount to make a change.
sourceraw docstring

next-upclj

(next-up number)

Returns number plus smallest amount to make a change.

Returns `number` plus smallest amount to make a change.
sourceraw docstring

non+?clj

(non+? x)

Returns true if x is non-positive.

Returns true if `x` is non-positive.
sourceraw docstring

non-?clj

(non-? x)

Returns true if x is non-negative.

Returns true if `x` is non-negative.
sourceraw docstring

num?clj

(num? x)

Returns true if x is a number and not NaN.

Returns true if `x` is a number and not NaN.
sourceraw docstring

numbers?clj

(numbers? x)

Returns true if a collection of numbers.

Returns true if a collection of numbers.
sourceraw docstring

one-clj

(one- number)
(one- number & numbers)

Returns (1 - number). Will always return a double if numbers is used.

Returns (1 - `number`). Will always return a double if `numbers` is used.
sourceraw docstring

one?clj

(one? x)

Returns true if x if equal to one.

Returns true if `x` if equal to one.
sourceraw docstring

open-corr?clj

(open-corr? x)

Returns true if x is between -1 and 1, exclusive.

Returns true if `x` is between -1 and 1, exclusive.
sourceraw docstring

open-prob?clj

(open-prob? x)

Returns true if x is between 0 and 1, exclusive.

Returns true if `x` is between 0 and 1, exclusive.
sourceraw docstring

PIclj

source

pi-squaredclj

source

pos?clj

(pos? x)

Returns true if x is a number that is positive.

Returns true if `x` is a number that is positive.
sourceraw docstring

powclj

(pow number1 number2)

Returns number1 to the power of number2.

Returns `number1` to the power of `number2`.
sourceraw docstring

prob?clj

(prob? x)

Returns true if x is between 0 and 1, inclusive.

Returns true if `x` is between 0 and 1, inclusive.
sourceraw docstring

quad-closeclj

source

quad-digitsclj

source

quot'clj

(quot' numerator divisor)

Quotient of dividing numerator by divisor. Returns a long if possible.

Quotient of dividing `numerator` by `divisor`. Returns a long if possible.
sourceraw docstring

quot-and-mod'clj

(quot-and-mod' numerator divisor)

Returns a tuple of longs if possible. Quotient of dividing numerator by divisor. Modulus of numerator and divisor. Truncates toward negative infinity. Has sign of divisor unless numerical rounding error with quot'. Will stay consistent with quot'.

Returns a tuple of longs if possible. Quotient of dividing `numerator` by
`divisor`. Modulus of `numerator` and `divisor`. Truncates toward negative
infinity. Has sign of `divisor` unless numerical rounding error with
[[quot']]. Will stay consistent with [[quot']].
sourceraw docstring

quot-and-rem'clj

(quot-and-rem' numerator divisor)

Returns a tuple of longs if possible. Quotient of dividing numerator by divisor. Remainder of dividing numerator by divisor. Has sign of numerator unless numerical rounding error with quot'. Will stay consistent with quot'.

Returns a tuple of longs if possible. Quotient of dividing `numerator` by
`divisor`. Remainder of dividing `numerator` by `divisor`. Has sign of
`numerator` unless numerical rounding error with [[quot']]. Will stay
consistent with [[quot']].
sourceraw docstring

radians->angle'clj

(radians->angle' radians)

Returns the reduced angle from radians, where angles = 180 × radians / PI. Returns a long if possible.

Returns the reduced angle from `radians`, where
angles = 180 × `radians` / PI. Returns a long if possible.
sourceraw docstring

reduce-angle'clj

(reduce-angle' angle)

Returns an angle between 0 and 360. Returns a long if possible.

Returns an `angle` between 0 and 360. Returns a long if possible.
sourceraw docstring

reduce-radians'clj

(reduce-radians' radians)

Returns radians between 0 and 2 × PI. Returns a long if possible.

Returns `radians` between 0 and 2 × PI. Returns a long if possible.
sourceraw docstring

rem'clj

(rem' numerator divisor)

Remainder of dividing numerator by divisor. Has sign of numerator unless numerical rounding error with quot'. Will stay consistent with quot'. Returns a long if possible.

Remainder of dividing `numerator` by `divisor`. Has sign of `numerator`
unless numerical rounding error with [[quot']]. Will stay consistent with
[[quot']]. Returns a long if possible.
sourceraw docstring

roughly-ceilclj

(roughly-ceil number accu)

Rounds up unless within accu, then rounds down. Returns a double.

Rounds up unless within `accu`, then rounds down. Returns a double.
sourceraw docstring

roughly-ceil'clj

(roughly-ceil' number accu)

Rounds up unless within accu, then rounds down. Returns a long if possible, otherwise a double.

Rounds up unless within `accu`, then rounds down. Returns a long if possible,
otherwise a double.
sourceraw docstring

roughly-corr?clj

(roughly-corr? number accu)

Returns true if number is a corr or within accu of a corr.

Returns true if `number` is a corr or within `accu` of a corr.
sourceraw docstring

roughly-floorclj

(roughly-floor number accu)

Rounds down unless within accu, then rounds up. Returns a double.

Rounds down unless within `accu`, then rounds up. Returns a double.
sourceraw docstring

roughly-floor'clj

(roughly-floor' number accu)

Rounds down unless within accu, then rounds up. Returns a long if possible, otherwise a double.

Rounds down unless within `accu`, then rounds up. Returns a long if possible,
otherwise a double.
sourceraw docstring

roughly-non+?clj

(roughly-non+? number accu)

Returns true if number is negative or within accu to zero.

Returns true if `number` is negative or within `accu` to zero.
sourceraw docstring

roughly-non-?clj

(roughly-non-? number accu)

Returns true if number is positive or within accu to zero.

Returns true if `number` is positive or within `accu` to zero.
sourceraw docstring

roughly-prob?clj

(roughly-prob? number accu)

Returns true if number is a prob or within accu of a prob.

Returns true if `number` is a prob or within `accu` of a prob.
sourceraw docstring

roughly-round+?clj

(roughly-round+? number accu)

Returns true if number is positive and roughly a whole number, or within double accuracy.

Returns true if `number` is positive and roughly a whole number, or within
double accuracy.
sourceraw docstring

roughly-round-?clj

(roughly-round-? number accu)

Returns true if number is negative and roughly a whole number, or within double accuracy.

Returns true if `number` is negative and roughly a whole number, or within
double accuracy.
sourceraw docstring

roughly-round-non+?clj

(roughly-round-non+? number accu)

Returns true if number is non+ and roughly a whole number, or within double accuracy.

Returns true if `number` is non+ and roughly a whole number, or within
double accuracy.
sourceraw docstring

roughly-round-non-?clj

(roughly-round-non-? number accu)

Returns true if number is non- and roughly a whole number, or within double accuracy.

Returns true if `number` is non- and roughly a whole number, or within
double accuracy.
sourceraw docstring

roughly-round?clj

(roughly-round? number accu)

Returns true if number is equal to a whole number or within accu of a whole number, or within double accuracy.

Returns true if `number` is equal to a whole number or within `accu` of a
whole number, or within double accuracy.
sourceraw docstring

roughly?clj

(roughly? number1 number2 accu)

Returns true if number1 and number2 are within accu of each other, or within double accuracy.

Returns true if `number1` and `number2` are within `accu` of each other, or
within double accuracy.
sourceraw docstring

roundclj

(round number type)

Returns a long if possible. Otherwise, returns number. type: :up :down :away-from-zero :toward-zero.

Returns a long if possible. Otherwise, returns `number`.
`type`:
  `:up`
  `:down`
  `:away-from-zero`
  `:toward-zero`.
sourceraw docstring

sgl-closeclj

source

sgl-digitsclj

source

sgnclj

(sgn number)

Returns 1 if number positive, 0 if 0, -1 if negative.

Returns 1 if `number` positive, 0 if 0, -1 if negative.
sourceraw docstring

sinclj

(sin number)

Returns sine of number.

Returns sine of `number`.
sourceraw docstring

single-finite?clj

(single-finite? x)

Returns true if x is a single and finite.

Returns true if `x` is a single and finite.
sourceraw docstring

single?clj

(single? x)

Returns true if x is a single.

Returns true if `x` is a single.
sourceraw docstring

sqclj

(sq number)

Returns square of number.

Returns square of `number`.
sourceraw docstring

sq'clj

(sq' number)

Returns square of number as a long if possible.

Returns square of `number` as a long if possible.
sourceraw docstring

sqrtclj

(sqrt number)

Returns square root of number.

Returns square root of `number`.
sourceraw docstring

sqrt-halfclj

source

sqrt-half-piclj

source

sqrt-piclj

source

sqrt-twoclj

source

sqrt-two-piclj

source

tanclj

(tan number)

Returns tangent of number.

Returns tangent of `number`.
sourceraw docstring

tiny-dblclj

source

tiny-sglclj

source

two-piclj

source

two-pi-eclj

source

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

× close