http://www.r6rs.org/final/html/r6rs-lib/r6rs-lib-Z-H-3.html#node_sec_2.8
-- Procedure: bytevector-ieee-double-native-set! BYTEVECTOR K X
-- Procedure: bytevector-ieee-double-set! BYTEVECTOR K X ENDIANNESS
K, ..., K+7 must be valid indices of BYTEVECTOR.
For `BYTEVECTOR-IEEE-DOUBLE-NATIVE-SET!', K must be a multiple of 8.
These procedures store an IEEE 754 double-precision representation of X into elements K through K+7 of BYTEVECTOR, and return unspecified values.
Here it is in use:
> (define bv (make-bytevector 8))
> (bytevector-ieee-double-native-set! bv 0 1.0)
> bv
#vu8(0 0 0 0 0 0 240 63)
To verify the result, here is a C program which accesses the bytes directly:
#include <stdio.h>
int main(void)
{
double x = 1.0;
unsigned char *p = &x;
for (size_t i = 0; i < sizeof(double); i++)
printf("%u ", p[i]);
puts("");
return 0;
}
0 0 0 0 0 0 240 63