Liking cljdoc? Tell your friends :D

helins.binf.float

Handling floating values, miscellaneous coercions.

Handling floating values, miscellaneous coercions.
raw docstring

b32clj/s

(b32 f32)

Converts a 32-bit float to a 32-bit integer preserving the bit pattern.

Opposite of from-b32.

See b64 for an example.

Converts a 32-bit float to a 32-bit integer preserving the bit pattern.

Opposite of [[from-b32]].

See [[b64]] for an example.
sourceraw docstring

b64clj/s

(b64 f64)

Converts a 64-bit float to a 64-bit integer preserving the bit pattern.

Opposite of from-b64.

(def bits
     (b64 42.24))

;; equals 4631166901565532406

(= 42.24
   (from-b64 bits))

Useful for places which can handle integers but not floats.

Converts a 64-bit float to a 64-bit integer preserving the bit pattern.

Opposite of [[from-b64]].

```clojure
(def bits
     (b64 42.24))

;; equals 4631166901565532406

(= 42.24
   (from-b64 bits))
```

Useful for places which can handle integers but not floats.
sourceraw docstring

f32clj/s

(f32 x)

Coerce x to a 32-bit float (no-op in JS since there no 32-bit floats).

Coerce `x` to a 32-bit float (no-op in JS since there no 32-bit floats).
sourceraw docstring

f64clj/s

(f64 x)

Coerce x to a 64-bit float.

Coerce `x` to a 64-bit float.
sourceraw docstring

from-b32clj/s

(from-b32 b32)

Interprets bits from a 32-bit integer as a 32-bit float.

Opposite of b32.

Interprets bits from a 32-bit integer as a 32-bit float.

Opposite of [[b32]].
sourceraw docstring

from-b64clj/s

(from-b64 b64)

Interprets bits from a 64-bits integer as a 64-bit float.

Opposite of b64.

Interprets bits from a 64-bits integer as a 64-bit float.

Opposite of [[b64]].
sourceraw docstring

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

× close