<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/76438>76438</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
basic properties of floor and ceiling function
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
k-arrows
</td>
</tr>
</table>
<pre>
There are other formulas that hold, but I'll list the basic ones.
https://alive2.llvm.org/ce/z/0BPgKF
If I understand correctly, these transformations require `nnan` flag.
Original functions:
```cpp
#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);
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykk8uOnDwQhZ-m2JS6BWUamgWL6ekfafQvkkVewJgCnLjtji9zydNH0D2TyU2ZKBICBFXnO7bryBD0ZJlb2B1gd8xkirPz7aeN9N49hKx3w1P7YWbPKD2jizN7HJ0_JSMDxllGnJ0ZgG6xTxHvgGpj0OgQMc6MvQxaobMctgj5EfKbOcZzAHED1AF10uh7pq0x96et8xNQpxio-wLU5Yf30__dpelyvxvxDpMd2Ico7YDKec8qmqeFHmcOjNFLGxZ7MmpnA3r-nLRnhCq3VlqochyNnLavZd95PWkrDY7JqrVtsXcpqPLLpc7n6xcS2iqTBkYQt-ok4wziv9dyvXMGg1cF0H40TkZ8BGquFfXh8oLoOSZvMcRhoYmb0TjngfZL8SIN4oiPIA7PjcdfMehNjMdnvReYYm2urD8hxN8t45Uygjgu1M1Pa9y8BVz-0_79QL7a-h34-ZizoRVDIxqZcVvUuaj2hRBNNrdNU3LFiouq30nVc15V46Copl0u61GOmW4pJ1EQ1QWV-12zHQtR9qLayT3LppYFlDmfpDYvs57pEBK3dVWKfWZkzyasISSy_IDrTyBaMunbpWfTpylAmS_ZCt9Uoo6G20vOzt6d2UfNAd2I647gGhTWRtvpZcCz5E37fRAnHefUb5U7AXWL-PWxOXv3kVUE6lZLAahbLX8NAAD__xB3Pq0">