aboutsummaryrefslogtreecommitdiff
path: root/math/sinf.c
diff options
context:
space:
mode:
Diffstat (limited to 'math/sinf.c')
-rw-r--r--math/sinf.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/math/sinf.c b/math/sinf.c
index 8dd8ae458794..e244e115d32b 100644
--- a/math/sinf.c
+++ b/math/sinf.c
@@ -1,13 +1,15 @@
/*
* Single-precision sin function.
*
- * Copyright (c) 2018-2021, Arm Limited.
+ * Copyright (c) 2018-2024, Arm Limited.
* SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
*/
#include <math.h>
#include "math_config.h"
#include "sincosf.h"
+#include "test_defs.h"
+#include "test_sig.h"
/* Fast sinf implementation. Worst-case ULP is 0.5607, maximum relative
error is 0.5303 * 2^-23. A single-step range reduction is used for
@@ -65,3 +67,9 @@ sinf (float y)
else
return __math_invalidf (y);
}
+
+TEST_SIG (S, F, 1, sin, -3.1, 3.1)
+TEST_ULP (sinf, 0.06)
+TEST_ULP_NONNEAREST (sinf, 0.5)
+TEST_INTERVAL (sinf, 0, 0xffff0000, 10000)
+TEST_SYM_INTERVAL (sinf, 0x1p-14, 0x1p54, 50000)