Skip to content

Commit 0012f7b

Browse files
authored
Update example.c
Signed-off-by: JaySoni1 <[email protected]>
1 parent 3a0f7c5 commit 0012f7b

File tree

1 file changed

+10
-12
lines changed
  • lib/node_modules/@stdlib/number/float32/base/normalize/examples/c

1 file changed

+10
-12
lines changed

lib/node_modules/@stdlib/number/float32/base/normalize/examples/c/example.c

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,14 @@
2121
#include <inttypes.h>
2222

2323
int main( void ) {
24-
// Declare the array as const to address the lint warning
25-
const float x[] = { 4.0f, 0.0f, -0.0f, 1.0f, -1.0f, 3.14f, -3.14f, 1.0e-38f, -1.0e-38f, 1.0f/0.0f, -1.0f/0.0f, 0.0f/0.0f };
26-
int32_t exp;
27-
float y;
28-
int i;
29-
30-
for ( i = 0; i < 12; i++ ) {
31-
stdlib_base_float32_normalize( x[ i ], &y, &exp );
32-
printf( "%f => y: %f, exp: %" PRId32 "\n", x[ i ], y, exp );
33-
}
34-
35-
return 0;
24+
const float x[] = { 4.0f, 0.0f, -0.0f, 1.0f, -1.0f, 3.14f, -3.14f, 1.0e-38f, -1.0e-38f, 1.0f/0.0f, -1.0f/0.0f, 0.0f/0.0f };
25+
int32_t exp;
26+
float y;
27+
int i;
28+
29+
for ( i = 0; i < 12; i++ ) {
30+
stdlib_base_float32_normalize( x[ i ], &y, &exp );
31+
printf( "%f => y: %f, exp: %" PRId32 "\n", x[ i ], y, exp );
32+
}
33+
return 0;
3634
}

0 commit comments

Comments
 (0)