From 9dafdadac7aa84fbdaea1a9cb4dddfbdea37c755 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Wed, 30 Oct 2024 23:56:02 -0700 Subject: [PATCH] Add missing ansi_fp.h --- libc/ansi_fp.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 libc/ansi_fp.h diff --git a/libc/ansi_fp.h b/libc/ansi_fp.h new file mode 100644 index 00000000..a76e3ada --- /dev/null +++ b/libc/ansi_fp.h @@ -0,0 +1,26 @@ +#ifndef _ANSI_FP +#define _ANSI_FP + +#define SIGDIGLEN 36 +typedef struct decimal { + char sgn; + char unused; + short exp; + struct { + unsigned char length; + unsigned char text[SIGDIGLEN]; + unsigned char unused; + } sig; +} decimal; + +typedef struct decform { + char style; + char unused; + short digits; +} decform; + + +void __num2dec(const decform* f, double x, decimal* d); +double __dec2num(const decimal* d); + +#endif // _ANSI_FP