aboutsummaryrefslogtreecommitdiff
path: root/contrib/arm-optimized-routines/math/log2.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/arm-optimized-routines/math/log2.c')
-rw-r--r--contrib/arm-optimized-routines/math/log2.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/contrib/arm-optimized-routines/math/log2.c b/contrib/arm-optimized-routines/math/log2.c
index 55102b772969..6462915a24f0 100644
--- a/contrib/arm-optimized-routines/math/log2.c
+++ b/contrib/arm-optimized-routines/math/log2.c
@@ -1,14 +1,16 @@
/*
* Double-precision log2(x) function.
*
- * Copyright (c) 2018-2019, Arm Limited.
- * SPDX-License-Identifier: MIT
+ * Copyright (c) 2018-2024, Arm Limited.
+ * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
*/
#include <float.h>
#include <math.h>
#include <stdint.h>
#include "math_config.h"
+#include "test_defs.h"
+#include "test_sig.h"
#define T __log2_data.tab
#define T2 __log2_data.tab2
@@ -139,3 +141,10 @@ hidden_alias (log2, __ieee754_log2)
long double log2l (long double x) { return log2 (x); }
# endif
#endif
+
+TEST_SIG (S, D, 1, log2, 0.01, 11.1)
+TEST_ULP (log2, 0.05)
+TEST_ULP_NONNEAREST (log2, 0.5)
+TEST_INTERVAL (log2, 0, 0xffff000000000000, 10000)
+TEST_INTERVAL (log2, 0x1p-4, 0x1p4, 40000)
+TEST_INTERVAL (log2, 0, inf, 40000)