Skip to content

Commit 5b4fb9a

Browse files
committed
Uncomment tests for sincos()
1 parent 0cf89fa commit 5b4fb9a

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

test/libm-test.c

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@
145145
#include <argp.h>
146146
#endif
147147

148+
// Some native libm implementations don't have sincos defined, so we have to do it ourselves
149+
void FUNC(sincos) (FLOAT x, FLOAT * s, FLOAT * c);
150+
148151
/* Possible exceptions */
149152
#define NO_EXCEPTION 0x0
150153
#define INVALID_EXCEPTION 0x1
@@ -224,13 +227,6 @@ static FLOAT max_error, real_max_error, imag_max_error;
224227
#define MANT_DIG CHOOSE ((LDBL_MANT_DIG-1), (DBL_MANT_DIG-1), (FLT_MANT_DIG-1), \
225228
(LDBL_MANT_DIG-1), (DBL_MANT_DIG-1), (FLT_MANT_DIG-1))
226229

227-
#ifndef SYS_MATH_H
228-
void FUNC(sincos) (int n, FLOAT *s, FLOAT *c)
229-
{
230-
*s = FUNC(sin) ( *s );
231-
*c = FUNC(cos) ( *c );
232-
}
233-
#endif
234230

235231
static void
236232
init_max_error (void)
@@ -3952,7 +3948,7 @@ sin_test (void)
39523948

39533949
}
39543950

3955-
#if 0 /* XXX scp XXX */
3951+
39563952
static void
39573953
sincos_test (void)
39583954
{
@@ -3999,7 +3995,6 @@ sincos_test (void)
39993995

40003996
print_max_error ("sincos", DELTAsincos, 0);
40013997
}
4002-
#endif
40033998

40043999
static void
40054000
sinh_test (void)
@@ -4434,7 +4429,6 @@ check_ulp (void)
44344429
int
44354430
main (int argc, char **argv)
44364431
{
4437-
44384432
#if 0 /* XXX scp XXX */
44394433
int remaining;
44404434
#endif
@@ -4490,9 +4484,7 @@ main (int argc, char **argv)
44904484
atan2_test ();
44914485
cos_test ();
44924486
sin_test ();
4493-
#if 0 /* XXX scp XXX */
44944487
sincos_test ();
4495-
#endif
44964488
tan_test ();
44974489

44984490
/* Hyperbolic functions: */

0 commit comments

Comments
 (0)