summaryrefslogtreecommitdiff
path: root/src/math/llroundl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/llroundl.c')
-rw-r--r--src/math/llroundl.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/math/llroundl.c b/src/math/llroundl.c
new file mode 100644
index 00000000..9e2cfdc7
--- /dev/null
+++ b/src/math/llroundl.c
@@ -0,0 +1,16 @@
+#include "libm.h"
+#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
+long long llroundl(long double x)
+{
+ return llround(x);
+}
+#else
+#define type long double
+#define roundit roundl
+#define dtype long long
+#define DTYPE_MIN LLONG_MIN
+#define DTYPE_MAX LLONG_MAX
+#define fn llroundl
+
+#include "lround.c"
+#endif