Skip to content

Commit

Permalink
Update lib/node_modules/@stdlib/math/base/special/maxabs/examples/c/e…
Browse files Browse the repository at this point in the history
…xample.c

Signed-off-by: Pranav <[email protected]>
  • Loading branch information
Pranavchiku authored Mar 10, 2024
1 parent f6896cb commit 6512f0a
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
#include <stdio.h>

int main( void ) {
double x;
double y;
double v;
int i;
double x;
double y;
double v;
int i;

for ( i = 0; i < 100; i++ ) {
x = ( ( (double)rand() / (double)RAND_MAX ) * 1000.0 ) - 500.0;
y = ( ( (double)rand() / (double)RAND_MAX ) * 1000.0 ) - 500.0;
v = stdlib_base_maxabs( x, y );
printf( "x: %lf, y: %lf, maxabs(x, y): %lf\n", x, y, v );
}
for ( i = 0; i < 100; i++ ) {
x = ( ( (double)rand() / (double)RAND_MAX ) * 1000.0 ) - 500.0;
y = ( ( (double)rand() / (double)RAND_MAX ) * 1000.0 ) - 500.0;
v = stdlib_base_maxabs( x, y );
printf( "x: %lf, y: %lf, maxabs(x, y): %lf\n", x, y, v );
}
}

0 comments on commit 6512f0a

Please sign in to comment.