mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
LibWeb: Remove usage of math functions from std namespace
Fixes compilation error with clang from Homebrew introduced in https://github.com/LadybirdBrowser/ladybird/pull/1962
This commit is contained in:
parent
df7cac539e
commit
04289fe24e
Notes:
github-actions[bot]
2024-10-30 16:11:31 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 04289fe24e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2059
Reviewed-by: https://github.com/gmta ✅
1 changed files with 4 additions and 4 deletions
|
@ -256,16 +256,16 @@ fraction_exit:
|
||||||
}
|
}
|
||||||
|
|
||||||
// 14.6. Multiply value by ten raised to the exponentth power.
|
// 14.6. Multiply value by ten raised to the exponentth power.
|
||||||
value *= std::pow(10, exponent);
|
value *= pow(10, exponent);
|
||||||
}
|
}
|
||||||
|
|
||||||
conversion: {
|
conversion: {
|
||||||
// 15. Conversion: Let S be the set of finite IEEE 754 double-precision floating-point values except −0,
|
// 15. Conversion: Let S be the set of finite IEEE 754 double-precision floating-point values except −0,
|
||||||
// but with two special values added: 2^1024 and −2^1024.
|
// but with two special values added: 2^1024 and −2^1024.
|
||||||
if (!std::isfinite(value)) {
|
if (!isfinite(value)) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
if ((value == 0) && std::signbit(value)) {
|
if ((value == 0) && signbit(value)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -274,7 +274,7 @@ conversion: {
|
||||||
double rounded_value = value;
|
double rounded_value = value;
|
||||||
|
|
||||||
// 17. If rounded-value is 2^1024 or −2^1024, return an error.
|
// 17. If rounded-value is 2^1024 or −2^1024, return an error.
|
||||||
if (std::abs(rounded_value) >= std::pow(2, 1024)) {
|
if (abs(rounded_value) >= pow(2, 1024)) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue