Next: iklib sentinel, Previous: iklib readline, Up: iklib [Index]
Convert between an exact integer and a machine word. This operation shows at the Scheme level the internal representation of values. Care must be taken when using these functions because it is very easy to cause undefined behaviour.
;; on 32-bit platforms (integer->machine-word #b11100) ⇒ #b111 ;; on 64-bit platforms (integer->machine-word #b111000) ⇒ #b111 (integer->machine-word #x3F) ⇒ #t (integer->machine-word #x2F) ⇒ #f (machine-word->integer #t) ⇒ #x3F (machine-word->integer #f) ⇒ #x2F
Convert a flonum to a bytevector and vice versa. The flonum’s memory block is copied byte by byte in the data area of the bytevector; and vice versa.
For bytevector->flonum
: if the bytevector does not have the
length of a flonum’s memory block, the return value is #f
.
Convert a bignum to a bytevector and vice versa. The bignum’s memory block is copied byte by byte in the data area of the bytevector; and vice versa.