We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6e1fdc commit 5c58688Copy full SHA for 5c58688
2 files changed
src/libc/powf.c
@@ -32,8 +32,8 @@ float powf(float arg1, float arg2) {
32
return expf( arg2 * logf( arg1 ) );
33
}
34
if ( arg1 < 0.0 ){
35
- temp = arg2;
36
- if ( temp == arg2 ){
+ temp = (long)arg2;
+ if ( (float)temp == arg2 ){
37
result = expf( arg2 * logf( -arg1 ) );
38
return temp & 1 ? -result : result;
39
src/libc/powl.c
@@ -18,8 +18,8 @@ long double powl(long double x, long double y) {
18
return expl( y * logl( x ) );
19
20
if ( x < 0.0L ){
21
- temp = y;
22
- if ( temp == y ){
+ temp = (long)y;
+ if ( (long double)temp == y ){
23
result = expl( y * logl( -x ) );
24
25
0 commit comments