-
Notifications
You must be signed in to change notification settings - Fork 15.4k
Open
Labels
floating-pointFloating-point mathFloating-point mathgood first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contributellvm:optimizationsmissed-optimization
Description
There are other formulas that hold, but I'll list the basic ones.
https://alive2.llvm.org/ce/z/dQgZ84
If I understand correctly, these transformations require nnan flag.
Original functions:
#include <cmath>
bool src1(float x)
{
return std::floor(x) <= x;
}
bool src2(float x)
{
return x <= std::ceil(x);
}
bool src3(float x)
{
return std::ceil(x) == -std::floor(-x);
}
bool src4(float x)
{
return std::floor(x) == -std::ceil(-x);
}Metadata
Metadata
Assignees
Labels
floating-pointFloating-point mathFloating-point mathgood first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contributellvm:optimizationsmissed-optimization