aboutsummaryrefslogtreecommitdiff
path: root/math/powf.c
diff options
context:
space:
mode:
Diffstat (limited to 'math/powf.c')
-rw-r--r--math/powf.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/math/powf.c b/math/powf.c
index 05c80bb2eb67..3f3f41ca276a 100644
--- a/math/powf.c
+++ b/math/powf.c
@@ -1,13 +1,14 @@
/*
* Single-precision pow function.
*
- * Copyright (c) 2017-2019, Arm Limited.
+ * Copyright (c) 2017-2024, Arm Limited.
* SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
*/
#include <math.h>
#include <stdint.h>
#include "math_config.h"
+#include "test_defs.h"
/*
POWF_LOG2_POLY_ORDER = 5
@@ -219,3 +220,12 @@ powf (float x, float y)
strong_alias (powf, __powf_finite)
hidden_alias (powf, __ieee754_powf)
#endif
+
+TEST_ULP (powf, 0.4)
+TEST_ULP_NONNEAREST (powf, 0.5)
+TEST_INTERVAL2 (powf, 0x1p-1, 0x1p1, 0x1p-7, 0x1p7, 50000)
+TEST_INTERVAL2 (powf, 0x1p-1, 0x1p1, -0x1p-7, -0x1p7, 50000)
+TEST_INTERVAL2 (powf, 0x1p-70, 0x1p70, 0x1p-1, 0x1p1, 50000)
+TEST_INTERVAL2 (powf, 0x1p-70, 0x1p70, -0x1p-1, -0x1p1, 50000)
+TEST_INTERVAL2 (powf, 0x1.ep-1, 0x1.1p0, 0x1p8, 0x1p14, 50000)
+TEST_INTERVAL2 (powf, 0x1.ep-1, 0x1.1p0, -0x1p8, -0x1p14, 50000)