Liking cljdoc? Tell your friends :D

sicmutils.value

The home of most of the protocol-based extensible generic operations offered by SICMUtils. The bulk of the others live in sicmutils.generic.

See the Generics cljdocs for a detailed discussion of how to use and extend the generic operations defined in sicmutils.generic and sicmutils.value.

The home of most of the protocol-based extensible generic operations offered by
SICMUtils. The bulk of the others live in [[sicmutils.generic]].

See [the `Generics`
cljdocs](https://cljdoc.org/d/sicmutils/sicmutils/CURRENT/doc/basics/generics)
for a detailed discussion of how to use and extend the generic operations
defined in [[sicmutils.generic]] and [[sicmutils.value]].
raw docstring

=clj/smultimethod

source

add-object-symbols!clj/s

(add-object-symbols! o->syms)
source

almost-integral?clj/s

(almost-integral? x)

Returns true if x is either:

  • integral?,
  • a floating point number either < [[absolute-integer-tolerance]] (if near zero) or within [[relative-integer-tolerance]] of the closest integer,

false otherwise.

Returns true if `x` is either:

- [[integral?]],
- a floating point number either < [[absolute-integer-tolerance]] (if near
  zero) or within [[relative-integer-tolerance]] of the closest integer,

false otherwise.
sourceraw docstring

argument-kindclj/s

(argument-kind & args)
source

compareclj/s≠

(compare x y)
clj

Comparator. Returns a negative number, zero, or a positive number when x is logically 'less than', 'equal to', or 'greater than' y. Same as Java x.compareTo(y) except it also works for nil, and compares numbers and collections in a type-independent manner. x must implement Comparable

Comparator. Returns a negative number, zero, or a positive number
when x is logically 'less than', 'equal to', or 'greater than'
y. Same as Java x.compareTo(y) except it also works for nil, and
compares numbers and collections in a type-independent manner. x
must implement Comparable
cljs

Comparator. Clone of [[cljs.core/compare]] that works with the expanded SICMUtils numeric tower.

Returns a negative number, zero, or a positive number when x is logically 'less than', 'equal to', or 'greater than' y. Uses IComparable if available and google.array.defaultCompare for objects of the same type and special-cases nil to be less than any other object.

Comparator. Clone of [[cljs.core/compare]] that works with the expanded
    SICMUtils numeric tower.

Returns a negative number, zero, or a positive number when x is logically
'less than', 'equal to', or 'greater than' y. Uses IComparable if available
and google.array.defaultCompare for objects of the same type and special-cases
nil to be less than any other object.
source (clj)source (cljs)raw docstring

exact-zero?clj/s

(exact-zero? n)

Returns true if the supplied argument is an exact numerical zero, false otherwise.

Returns true if the supplied argument is an exact numerical zero, false
otherwise.
sourceraw docstring

integral?clj/s

(integral? x)

Returns true if x is an integral number, false otherwise.

Returns true if x is an integral number, false otherwise.
sourceraw docstring

kind-predicateclj/s

(kind-predicate x)

Returns a predicate that returns true if its argument matches the supplied kind-keyword k, false otherwise.

Returns a predicate that returns true if its argument matches the supplied
kind-keyword `k`, false otherwise.
sourceraw docstring

machine-epsilonclj/s

source

native-integral?clj/s

(native-integral? x)

Returns true if x is an integral number that Clojure's math operations work with, false otherwise.

Returns true if x is an integral number that Clojure's math operations work
with, false otherwise.
sourceraw docstring

number?clj/s

(number? x)

Returns true if x is any number type in the numeric tower:

  • integral
  • floating point
  • complex

false otherwise.

Returns true if `x` is any number type in the numeric tower:

- integral
- floating point
- complex

false otherwise.
sourceraw docstring

numeric-zero?clj/s

(numeric-zero? x)

Returns true if x is both a number? and [[zero?]], false otherwise.

Returns `true` if `x` is both a [[number?]] and [[zero?]], false otherwise.
sourceraw docstring

Numericalclj/sprotocol

numerical?clj/s

(numerical? _)
source

object-name-mapclj/s

source

principal-valueclj/s

(principal-value cuthigh)
source

real?clj/s

(real? x)

Returns true if x is either an integral number or a floating point number (ie, in the numeric tower but not complex), false otherwise.

Returns true if `x` is either an integral number or a floating point number (ie,
in the numeric tower but not complex), false otherwise.
sourceraw docstring

scalar?clj/s

(scalar? x)

Returns true for anything that derives from ::scalar, ie, any numeric type in the numeric tower that responds true to number?, plus symbolic expressions generated by sicmutils.abstract.number/literal-number,

false otherwise.

Returns true for anything that derives from `::scalar`, ie, any numeric type in
the numeric tower that responds true to [[number?]], plus symbolic expressions
generated by [[sicmutils.abstract.number/literal-number]],

false otherwise.
sourceraw docstring

seqtypeclj/s

source

sqrt-machine-epsilonclj/s

source

twopiclj/s

source

Valueclj/sprotocol

zero-likeclj/s

(zero-like this)

identity?clj/s

(identity? this)

freezeclj/s

(freeze this)

Freezing an expression means removing wrappers and other metadata from subexpressions, so that the result is basically a pure S-expression with the same structure as the input. Doing this will rob an expression of useful information for further computation; so this is intended to be done just before simplification and printing, to simplify those processes.

Freezing an expression means removing wrappers and other metadata from
subexpressions, so that the result is basically a pure S-expression with the
same structure as the input. Doing this will rob an expression of useful
information for further computation; so this is intended to be done just
before simplification and printing, to simplify those processes.

zero?clj/s

(zero? this)

one?clj/s

(one? this)

exact?clj/s

(exact? this)

Entries that are exact are available for gcd, among other operations.

Entries that are exact are available for `gcd`, among
other operations.

kindclj/s

(kind this)

identity-likeclj/s

(identity-like this)

one-likeclj/s

(one-like this)
source

withinclj/s

(within ε)

Returns a function that tests whether two values are within ε of each other.

Returns a function that tests whether two values are within ε of each other.
sourceraw docstring

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

× close