Skip to content

Commit 73a539a

Browse files
committed
feat: updated code using fmodf
1 parent 34b0233 commit 73a539a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

lib/node_modules/@stdlib/math/base/special/gcdf/manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"dependencies": [
3939
"@stdlib/math/base/napi/binary",
4040
"@stdlib/math/base/assert/is-nanf",
41-
"@stdlib/math/base/special/fmod",
41+
"@stdlib/math/base/special/fmodf",
4242
"@stdlib/math/base/assert/is-integerf",
4343
"@stdlib/constants/float32/pinf",
4444
"@stdlib/constants/float32/ninf"
@@ -56,7 +56,7 @@
5656
"libpath": [],
5757
"dependencies": [
5858
"@stdlib/math/base/assert/is-nanf",
59-
"@stdlib/math/base/special/fmod",
59+
"@stdlib/math/base/special/fmodf",
6060
"@stdlib/math/base/assert/is-integerf",
6161
"@stdlib/constants/float32/pinf",
6262
"@stdlib/constants/float32/ninf"
@@ -74,7 +74,7 @@
7474
"libpath": [],
7575
"dependencies": [
7676
"@stdlib/math/base/assert/is-nanf",
77-
"@stdlib/math/base/special/fmod",
77+
"@stdlib/math/base/special/fmodf",
7878
"@stdlib/math/base/assert/is-integerf",
7979
"@stdlib/constants/float32/pinf",
8080
"@stdlib/constants/float32/ninf"

lib/node_modules/@stdlib/math/base/special/gcdf/src/main.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
*/
1818

1919
#include "stdlib/math/base/special/gcdf.h"
20-
#include "stdlib/math/base/special/fmod.h"
20+
#include "stdlib/math/base/special/fmodf.h"
2121
#include "stdlib/math/base/assert/is_nanf.h"
2222
#include "stdlib/math/base/assert/is_integerf.h"
2323
#include "stdlib/constants/float32/pinf.h"
24-
#include "stdlib//constants/float32/ninf.h"
24+
#include "stdlib/constants/float32/ninf.h"
2525
#include <stdint.h>
2626

2727
// 2^32 - 1
@@ -56,19 +56,19 @@ static float largeIntegersf( const float a, const float b ) {
5656
k = 1.0;
5757

5858
// Reduce `a` and/or `b` to odd numbers and keep track of the greatest power of 2 dividing both `a` and `b`...
59-
while ( stdlib_base_fmod( ac, 2.0 ) == 0.0 && stdlib_base_fmod( bc, 2.0 ) == 0.0 ) {
59+
while ( stdlib_base_fmodf( ac, 2.0 ) == 0.0 && stdlib_base_fmodf(f bc, 2.0 ) == 0.0 ) {
6060
ac /= 2.0; // right shift
6161
bc /= 2.0; // right shift
6262
k *= 2.0; // left shift
6363
}
6464
// Reduce `a` to an odd number...
65-
while ( stdlib_base_fmod( ac, 2.0 ) == 0.0 ) {
65+
while ( stdlib_base_fmodf( ac, 2.0 ) == 0.0 ) {
6666
ac /= 2.0; // right shift
6767
}
6868
// Henceforth, `a` is always odd...
6969
while ( bc ) {
7070
// Remove all factors of 2 in `b`, as they are not common...
71-
while ( stdlib_base_fmod( bc, 2.0 ) == 0.0 ) {
71+
while ( stdlib_base_fmodf( bc, 2.0 ) == 0.0 ) {
7272
bc /= 2.0; // right shift
7373
}
7474
// `a` and `b` are both odd. Swap values such that `b` is the larger of the two values, and then set `b` to the difference (which is even)...

0 commit comments

Comments
 (0)