diff options
Diffstat (limited to 'lib/libc/riscv/gen/infinity.c')
-rw-r--r-- | lib/libc/riscv/gen/infinity.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/libc/riscv/gen/infinity.c b/lib/libc/riscv/gen/infinity.c new file mode 100644 index 000000000000..ae44d5195a3b --- /dev/null +++ b/lib/libc/riscv/gen/infinity.c @@ -0,0 +1,11 @@ +/* + * infinity.c + */ + +#include <math.h> + +/* bytes for +Infinity on riscv */ +const union __infinity_un __infinity = { { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } }; + +/* bytes for NaN */ +const union __nan_un __nan = { { 0, 0, 0xc0, 0xff } }; |