Skip to content

Commit 0ff8838

Browse files
refactored examples and readme
1 parent ecb48f6 commit 0ff8838

File tree

1 file changed

+4
-7
lines changed
  • lib/node_modules/@stdlib/math/base/special/expf

1 file changed

+4
-7
lines changed

lib/node_modules/@stdlib/math/base/special/expf/README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,17 +171,14 @@ float stdlib_base_expf( const float x );
171171
#include <stdio.h>
172172
173173
int main( void ) {
174-
float x[ 100 ];
174+
float x;
175175
float v;
176176
int i;
177-
178-
for ( i = 0; i < 100; i++ ) {
179-
x[ i ] = ( ( (float)rand() / (float)RAND_MAX ) * 100.0f );
180-
}
181177
182178
for ( i = 0; i < 100; i++ ) {
183-
v = stdlib_base_expf( x[ i ] );
184-
printf( "e^%f = %f\n", x[ i ], v );
179+
x = ( (float)rand() / (float)RAND_MAX ) * 100.0f;
180+
v = stdlib_base_expf( x );
181+
printf( "e^%f = %f\n", x, v );
185182
}
186183
}
187184
```

0 commit comments

Comments
 (0)