Skip to content

Commit 6fba45c

Browse files
committed
"made changes"
1 parent 520ce51 commit 6fba45c

File tree

1 file changed

+3
-8
lines changed
  • lib/node_modules/@stdlib/math/base/special/cosc/benchmark/c/native

1 file changed

+3
-8
lines changed

lib/node_modules/@stdlib/math/base/special/cosc/benchmark/c/native/benchmark.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,11 @@
2323
#include <time.h>
2424
#include <sys/time.h>
2525

26-
#define NAME "sinc_derivative"
26+
#define NAME "cosc"
2727
#define ITERATIONS 1000000
2828
#define REPEATS 3
2929

30-
double sinc_derivative(double x) {
31-
if( x == 0.0) {
32-
return 0.0;
33-
}
34-
return (cos ( x ) * x - sin( x ) ) / ( x * x );
35-
}
30+
3631

3732
/**
3833
* Prints the TAP version.
@@ -106,7 +101,7 @@ static double benchmark( void ) {
106101
t = tic();
107102
for ( i = 0; i < ITERATIONS; i++ ) {
108103
x = ( 2.0 * rand_double() ) - 2.0;
109-
y = sinc_derivative( x );
104+
y = cosc( x );
110105
if ( y != y ) {
111106
printf( "should not return NaN\n" );
112107
break;

0 commit comments

Comments
 (0)