We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 520ce51 commit 6fba45cCopy full SHA for 6fba45c
lib/node_modules/@stdlib/math/base/special/cosc/benchmark/c/native/benchmark.c
@@ -23,16 +23,11 @@
23
#include <time.h>
24
#include <sys/time.h>
25
26
-#define NAME "sinc_derivative"
+#define NAME "cosc"
27
#define ITERATIONS 1000000
28
#define REPEATS 3
29
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
-}
+
36
37
/**
38
* Prints the TAP version.
@@ -106,7 +101,7 @@ static double benchmark( void ) {
106
101
t = tic();
107
102
for ( i = 0; i < ITERATIONS; i++ ) {
108
103
x = ( 2.0 * rand_double() ) - 2.0;
109
- y = sinc_derivative( x );
104
+ y = cosc( x );
110
105
if ( y != y ) {
111
printf( "should not return NaN\n" );
112
break;
0 commit comments