bytebuild/cbits/bytebuild_custom.c

12 lines
259 B
C
Raw Normal View History

2020-12-18 13:03:04 -05:00
#include "Rts.h"
#include <stdint.h>
2021-01-22 11:13:02 -05:00
#include <string.h>
2020-12-18 13:03:04 -05:00
HsInt bytebuild_paste_double(char *s0, HsInt off, double n) {
2021-01-22 11:13:02 -05:00
char* start = s0 + off;
memset(start,0,32);
sprintf(s0 + off,"%.14g", n);
size_t r = strlen(start);
return (HsInt)r;
2020-12-18 13:03:04 -05:00
}