Skip to content

Commit 0b14ced

Browse files
bench: replace M_PI in math/base/special/sincospi C benchmark
PR-URL: #11690 Reviewed-by: Athan Reines <kgryte@gmail.com>
1 parent a081627 commit 0b14ced

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • lib/node_modules/@stdlib/math/base/special/sincospi/benchmark/c

lib/node_modules/@stdlib/math/base/special/sincospi/benchmark/c/benchmark.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#define NAME "sincospi"
2626
#define ITERATIONS 1000000
2727
#define REPEATS 3
28+
#define PI 3.14159265358979323846
2829

2930
/**
3031
* Prints the TAP version.
@@ -102,8 +103,8 @@ static double benchmark( void ) {
102103

103104
t = tic();
104105
for ( i = 0; i < ITERATIONS; i++ ) {
105-
y = sin( M_PI * x[ i%100 ] );
106-
z = cos( M_PI * x[ i%100 ] );
106+
y = sin( PI * x[ i%100 ] );
107+
z = cos( PI * x[ i%100 ] );
107108
if ( y != y || z != z ) {
108109
printf( "should not return NaN\n" );
109110
break;

0 commit comments

Comments
 (0)