From 4f8acf953ccf1a978a3378db7fb1e8d5a7afbca1 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Fri, 30 Nov 2018 21:15:23 +0000 Subject: math: add double precision error handling functions --- src/math/__math_divzero.c | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 src/math/__math_divzero.c (limited to 'src/math/__math_divzero.c') diff --git a/src/math/__math_divzero.c b/src/math/__math_divzero.c new file mode 100644 index 00000000..59d21350 --- /dev/null +++ b/src/math/__math_divzero.c @@ -0,0 +1,6 @@ +#include "libm.h" + +double __math_divzero(uint32_t sign) +{ + return fp_barrier(sign ? -1.0 : 1.0) / 0.0; +} -- cgit v1.2.1