Skip to content

Commit ccedb23

Browse files
committed
feat: updated c code using stdlib_base_maxf
1 parent 2c47328 commit ccedb23

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

lib/node_modules/@stdlib/math/base/special/cinvf/benchmark/julia/benchmark.jl

100644100755
File mode changed.

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
"@stdlib/math/base/special/absf",
4343
"@stdlib/constants/float32/max",
4444
"@stdlib/constants/float32/eps",
45-
"@stdlib/constants/float32/smallest-normal"
45+
"@stdlib/constants/float32/smallest-normal",
46+
"@stdlib/math/base/special/maxf"
4647
]
4748
},
4849
{
@@ -61,7 +62,8 @@
6162
"@stdlib/math/base/special/absf",
6263
"@stdlib/constants/float32/max",
6364
"@stdlib/constants/float32/eps",
64-
"@stdlib/constants/float32/smallest-normal"
65+
"@stdlib/constants/float32/smallest-normal",
66+
"@stdlib/math/base/special/maxf"
6567
]
6668
},
6769
{
@@ -80,7 +82,8 @@
8082
"@stdlib/math/base/special/absf",
8183
"@stdlib/constants/float32/max",
8284
"@stdlib/constants/float32/eps",
83-
"@stdlib/constants/float32/smallest-normal"
85+
"@stdlib/constants/float32/smallest-normal",
86+
"@stdlib/math/base/special/maxf"
8487
]
8588
}
8689
]

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#include "stdlib/math/base/special/cinvf.h"
2020
#include "stdlib/math/base/special/absf.h"
21+
#include "stdlib/math/base/special/maxf"
2122
#include "stdlib/constants/float32/max.h"
2223
#include "stdlib/constants/float32/eps.h"
2324
#include "stdlib/constants/float32/smallest_normal.h"
@@ -70,8 +71,7 @@ stdlib_complex64_t stdlib_base_cinvf( const stdlib_complex64_t z ) {
7071

7172
stdlib_complex64_reim( z, &re, &im );
7273

73-
// TODO: replace `fmaxf` with stdlib maxf implementation once available
74-
ab = fmaxf( stdlib_base_absf( re ), stdlib_base_absf( im ) );
74+
ab = stdlib_base_maxf( stdlib_base_absf( re ), stdlib_base_absf( im ) );
7575
s = 1.0f;
7676
if ( ab >= LARGE_THRESHOLD ) {
7777
re *= 0.5f;

0 commit comments

Comments
 (0)