summaryrefslogtreecommitdiff
path: root/src/math/scalbln.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/scalbln.c')
-rw-r--r--src/math/scalbln.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/math/scalbln.c b/src/math/scalbln.c
new file mode 100644
index 00000000..53854fda
--- /dev/null
+++ b/src/math/scalbln.c
@@ -0,0 +1,11 @@
+#include <limits.h>
+#include "libm.h"
+
+double scalbln(double x, long n)
+{
+ if (n > INT_MAX)
+ n = INT_MAX;
+ else if (n < INT_MIN)
+ n = INT_MIN;
+ return scalbn(x, n);
+}