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

BigInteger->binary-charsclj

(BigInteger->binary-chars bi)

Inputs: [bi :- BigInteger] Returns: [Character]

Converts a (positive) BigInteger into a binary char sequence

Inputs: [bi :- BigInteger]
Returns: [Character]

Converts a (positive) BigInteger into a binary char sequence
sourceraw docstring

BigInteger->binary-strclj

(BigInteger->binary-str bi)

Inputs: [bi :- BigInteger] Returns: s/Str

Converts a (positive) BigInteger into a binary String

Inputs: [bi :- BigInteger]
Returns: s/Str

Converts a (positive) BigInteger into a binary String
sourceraw docstring

BigInteger->hex-strclj

(BigInteger->hex-str bi min-width)

Inputs: [bi :- BigInteger min-width :- s/Int] Returns: s/Str

Converts a (positive) BigInteger into a hex string of min-width chars

Inputs: [bi :- BigInteger min-width :- s/Int]
Returns: s/Str

Converts a (positive) BigInteger into a hex string of `min-width` chars
sourceraw docstring

binary-chars->BigIntegerclj

(binary-chars->BigInteger bin-chars)

Inputs: [bin-chars :- [Character]] Returns: BigInteger

Converts a binary char sequence into a (positive) BigInteger

Inputs: [bin-chars :- [Character]]
Returns: BigInteger

Converts a binary char sequence into a (positive) BigInteger
sourceraw docstring

binary-str->BigIntegerclj

(binary-str->BigInteger bin-str)

Inputs: [bin-str :- s/Str] Returns: BigInteger

Converts a binary char sequence into a (positive) BigInteger

Inputs: [bin-str :- s/Str]
Returns: BigInteger

Converts a binary char sequence into a (positive) BigInteger
sourceraw docstring

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

log2clj

(log2 x)

Returns the log base-2 of x

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

round-Nclj/s

(round-N val N)

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

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

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

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

× close