summaryrefslogtreecommitdiff
path: root/src/math/lrintl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/lrintl.c')
-rw-r--r--src/math/lrintl.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/math/lrintl.c b/src/math/lrintl.c
new file mode 100644
index 00000000..7c09653e
--- /dev/null
+++ b/src/math/lrintl.c
@@ -0,0 +1,14 @@
+#include "libm.h"
+#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
+long lrintl(long double x)
+{
+ return lrint(x);
+}
+#else
+#define type long double
+#define roundit rintl
+#define dtype long
+#define fn lrintl
+
+#include "lrint.c"
+#endif