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