Plaster
New
List
Login
text
default
anonymous
2022.03.04 01:38:29
(sb-alien:define-alien-type nil (sb-alien:union float-int-64 (f sb-alien:double) (i sb-alien:unsigned-long) (c (sb-alien:array sb-alien:unsigned-char 8)))) (defun-export reinterpret-int-as-double (int) (sb-alien:with-alien ((conv (sb-alien:union float-int-64))) (setf (sb-alien:slot conv 'i) int) (sb-alien:slot conv 'f))) (defun-export reinterpret-double-as-int (float) "This function requires a double-float" (sb-alien:with-alien ((conv (sb-alien:union float-int-64))) (setf (sb-alien:slot conv 'f) float) (sb-alien:slot conv 'i)))
Raw
Annotate
Repaste
Edit