Liking cljdoc? Tell your friends :D

tupelo.math

Miscellaneous functions.

Miscellaneous functions.
raw docstring

->bigdec-2clj

(->bigdec-2 val)

Inputs: [val :- (s/cond-pre s/Num s/Str)] Returns: BigDecimal

Coerces a numeric value to a BigDecimal with 2 decimal digits. Also accepts a numeric value encoded as a String.

Inputs: [val :- (s/cond-pre s/Num s/Str)]
Returns: BigDecimal

Coerces a numeric value to a BigDecimal with 2 decimal digits. Also accepts
     a numeric value encoded as a String.
sourceraw docstring

->bigdec-Nclj

(->bigdec-N val N)

Inputs: [val :- (s/cond-pre s/Num s/Str) N :- s/Int] Returns: BigDecimal

Coerces a numeric value to a BigDecimal with N decimal digits. Also accepts a numeric value encoded as a String.

Inputs: [val :- (s/cond-pre s/Num s/Str) N :- s/Int]
Returns: BigDecimal

Coerces a numeric value to a BigDecimal with N decimal digits. Also accepts
     a numeric value encoded as a String.
sourceraw docstring

ceil->Longclj

(ceil->Long x)
source

factorialclj/s

(factorial n)

Inputs: [n :- s/Int] Returns: s/Int

Computes the factorial of N

Inputs: [n :- s/Int]
Returns: s/Int

Computes the factorial of N
sourceraw docstring

fibo-nthclj/s

(fibo-nth N)

Returns the N'th Fibonacci number (zero-based). Note that N=91 corresponds to approx 2^62

Returns the N'th Fibonacci number (zero-based). Note that
N=91 corresponds to approx 2^62
sourceraw docstring

fibo-thruclj/s

(fibo-thru limit)

Returns a vector of Fibonacci numbers up to limit (inclusive). Note that a 2^62 corresponds to 91'st Fibonacci number.

Returns a vector of Fibonacci numbers up to limit (inclusive). Note that a
2^62  corresponds to 91'st Fibonacci number.
sourceraw docstring

fibonacci-seqclj/s

A lazy seq of Fibonacci numbers. Note that, in the limit of (N -> infinity), the Fibonacci numbers are approximately equal to the exponential sequence (1.61803^N).

A lazy seq of Fibonacci numbers. Note that, in the limit of (N -> infinity), the Fibonacci
numbers are approximately equal to the exponential sequence (1.61803^N).
sourceraw docstring

floor->Longclj

(floor->Long x)
source

log2clj

(log2 x)

Inputs: [x :- s/Num] Returns: Double

Returns the log base-2 of x

Inputs: [x :- s/Num]
Returns: Double

Returns the log base-2 of x
sourceraw docstring

pow->BigIntegerclj

(pow->BigInteger base exp)

Inputs: [base :- s/Int exp :- s/Int] Returns: BigInteger

An BigInteger version of java.Math/pow( base, exp )

Inputs: [base :- s/Int exp :- s/Int]
Returns: BigInteger

An BigInteger version of java.Math/pow( base, exp )
sourceraw docstring

pow->Longclj

(pow->Long base exp)

Inputs: [base :- s/Int exp :- s/Int] Returns: s/Int

An Long (integer) version of java.Math/pow( base, exp )

Inputs: [base :- s/Int exp :- s/Int]
Returns: s/Int

An Long (integer) version of java.Math/pow( base, exp )
sourceraw docstring

pow2-nthclj/s

(pow2-nth N)

Returns the N'th pow2 number (zero-based). Note that N=91 corresponds to approx 2^62

Returns the N'th pow2 number (zero-based). Note that
N=91 corresponds to approx 2^62
sourceraw docstring

pow2-seqclj/s

A lazy seq of (2^N) numbers.

A lazy seq of (2^N) numbers.
sourceraw docstring

pow2-thruclj/s

(pow2-thru limit)

Returns a vector of pow2 numbers up to limit (inclusive). Note that a 2^62 corresponds to 91'st pow2 number.

Returns a vector of pow2 numbers up to limit (inclusive). Note that a
2^62  corresponds to 91'st pow2 number.
sourceraw docstring

pow2aug-nthclj/s

(pow2aug-nth N)

Returns the N'th pow2aug number (zero-based). Note that N=91 corresponds to approx 2^62

Returns the N'th pow2aug number (zero-based). Note that
N=91 corresponds to approx 2^62
sourceraw docstring

pow2aug-seqclj/s

A lazy seq of (2^N) numbers, augmented with (dec (2^N)) and (inc (2^N)) .

A lazy seq of (2^N) numbers, augmented with (dec (2^N)) and (inc (2^N)) .
sourceraw docstring

pow2aug-thruclj/s

(pow2aug-thru limit)

Returns a vector of pow2aug numbers up to limit (inclusive). Note that a 2^62 corresponds to 91'st pow2aug number.

Returns a vector of pow2aug numbers up to limit (inclusive). Note that a
2^62  corresponds to 91'st pow2aug number.
sourceraw docstring

round->Longclj

(round->Long x)
source

round-Nclj

(round-N val N)

Inputs: [val :- s/Num N :- s/Int] Returns: Double

Round a floating point number to N decimal places, returning a double.

       (round-decimals 3.14156  2) => 3.14
       (round-decimals 1234567 -2) => 1234500
Inputs: [val :- s/Num N :- s/Int]
Returns: Double

Round a floating point number to N decimal places, returning a double.

           (round-decimals 3.14156  2) => 3.14
           (round-decimals 1234567 -2) => 1234500
     
sourceraw docstring

same-signclj/s

(same-sign x y)

Inputs: [x :- s/Num y :- s/Num] Returns: s/Bool

Returns true iff x and y have the same sign, or are both zero.

Inputs: [x :- s/Num y :- s/Num]
Returns: s/Bool

Returns `true` iff x and y have the same sign, or are both zero.
sourceraw docstring

signumclj/s

(signum x)

Inputs: [x :- s/Num] Returns: s/Int

Returns either -1, 0, or +1, to indicate the sign of the input.

Inputs: [x :- s/Num]
Returns: s/Int

Returns either -1, 0, or +1, to indicate the sign of the input. 
sourceraw docstring

trunc->Longclj

(trunc->Long x)
source

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

× close