mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 17:40:27 +00:00
LibM: Implement the missing parts of the round family
This commit is contained in:
parent
03b2d30836
commit
c9601cdee3
Notes:
sideshowbarker
2024-07-18 21:21:47 +09:00
Author: https://github.com/RealKC Commit: https://github.com/SerenityOS/serenity/commit/c9601cdee34 Pull-request: https://github.com/SerenityOS/serenity/pull/5792
2 changed files with 36 additions and 0 deletions
|
@ -868,6 +868,36 @@ long double roundl(long double value) NOEXCEPT
|
|||
return internal_to_integer(value, RoundingMode::ToEven);
|
||||
}
|
||||
|
||||
long lroundf(float value) NOEXCEPT
|
||||
{
|
||||
return internal_to_integer(value, RoundingMode::ToEven);
|
||||
}
|
||||
|
||||
long lround(double value) NOEXCEPT
|
||||
{
|
||||
return internal_to_integer(value, RoundingMode::ToEven);
|
||||
}
|
||||
|
||||
long lroundl(long double value) NOEXCEPT
|
||||
{
|
||||
return internal_to_integer(value, RoundingMode::ToEven);
|
||||
}
|
||||
|
||||
long long llroundf(float value) NOEXCEPT
|
||||
{
|
||||
return internal_to_integer(value, RoundingMode::ToEven);
|
||||
}
|
||||
|
||||
long long llround(double value) NOEXCEPT
|
||||
{
|
||||
return internal_to_integer(value, RoundingMode::ToEven);
|
||||
}
|
||||
|
||||
long long llroundd(long double value) NOEXCEPT
|
||||
{
|
||||
return internal_to_integer(value, RoundingMode::ToEven);
|
||||
}
|
||||
|
||||
float floorf(float value) NOEXCEPT
|
||||
{
|
||||
return internal_to_integer(value, RoundingMode::Down);
|
||||
|
|
|
@ -123,6 +123,12 @@ long double truncl(long double) NOEXCEPT;
|
|||
double round(double) NOEXCEPT;
|
||||
float roundf(float) NOEXCEPT;
|
||||
long double roundl(long double) NOEXCEPT;
|
||||
long lroundf(float) NOEXCEPT;
|
||||
long lround(double) NOEXCEPT;
|
||||
long lroundl(long double) NOEXCEPT;
|
||||
long long llroundf(float) NOEXCEPT;
|
||||
long long llround(double) NOEXCEPT;
|
||||
long long llroundd(long double) NOEXCEPT;
|
||||
double rint(double) NOEXCEPT;
|
||||
float rintf(float) NOEXCEPT;
|
||||
long lrintl(long double) NOEXCEPT;
|
||||
|
|
Loading…
Reference in a new issue