Skip to content

Commit 0d18ce7

Browse files
Updated examples
Signed-off-by: Harsh Mathur <[email protected]>
1 parent afef364 commit 0d18ce7

File tree

1 file changed

+9
-3
lines changed
  • lib/node_modules/@stdlib/math/base/special/lcmf

1 file changed

+9
-3
lines changed

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,15 @@ double stdlib_base_lcmf( const float a, const float b );
173173
#include <stdio.h>
174174
175175
int main( void ) {
176-
double v;
177-
v = stdlib_base_lcmf( 10.0, 12.0 );
178-
printf( "lcm(10.0, 12.0) = %lf\n", v );
176+
const float a[] = { 24.0f, 32.0f, 48.0f, 116.0f, 33.0f };
177+
const float b[] = { 12.0f, 6.0f, 15.0f, 52.0f, 22.0f };
178+
179+
float out;
180+
int i;
181+
for (i = 0; i < 5; i++) {
182+
out = lcmf(a[i], b[i]);
183+
printf("lcm(%f, %f) = %f\n", a[i], b[i], out);
184+
}
179185
}
180186
```
181187

0 commit comments

Comments
 (0)