mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-21 18:00:16 +00:00
LibM: Implement fma
This commit is contained in:
parent
6c650d1b8d
commit
6187cf72cc
Notes:
sideshowbarker
2024-07-17 09:35:51 +09:00
Author: https://github.com/timschumi
Commit: 6187cf72cc
Pull-request: https://github.com/SerenityOS/serenity/pull/13971
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/bgianfo ✅
Reviewed-by: https://github.com/kleinesfilmroellchen
Reviewed-by: https://github.com/linusg
1 changed files with 16 additions and 0 deletions
|
@ -1116,6 +1116,22 @@ float fminf(float x, float y) NOEXCEPT
|
||||||
return x < y ? x : y;
|
return x < y ? x : y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/fma.html
|
||||||
|
long double fmal(long double x, long double y, long double z) NOEXCEPT
|
||||||
|
{
|
||||||
|
return (x * y) + z;
|
||||||
|
}
|
||||||
|
|
||||||
|
double fma(double x, double y, double z) NOEXCEPT
|
||||||
|
{
|
||||||
|
return (x * y) + z;
|
||||||
|
}
|
||||||
|
|
||||||
|
float fmaf(float x, float y, float z) NOEXCEPT
|
||||||
|
{
|
||||||
|
return (x * y) + z;
|
||||||
|
}
|
||||||
|
|
||||||
long double nearbyintl(long double value) NOEXCEPT
|
long double nearbyintl(long double value) NOEXCEPT
|
||||||
{
|
{
|
||||||
return internal_to_integer(value, RoundingMode { fegetround() });
|
return internal_to_integer(value, RoundingMode { fegetround() });
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue