<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/123761>123761</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
expm1(x) is not folded at the compilation time when x is constant
</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>
Consider the following C++ example. The function exp(x) is folded, but expm1(x) is not. I still don't have a good idea of how to list these kinds of issues exhaustively.
https://godbolt.org/z/ravEhEEqh
```cpp
#include <cmath>
double f1() {
return std::exp(0.)-1.;
}
double f2() {
return std::expm1(0.);
}
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxsUtGOmzAQ_JrlZRUEawjwwEOSC1Lf-wMGL8E9Y1Nskly_vnJyVZvqJCRkze7s7sxI7_XFMrdQHqF8S-QWJre27zu5ru7mk96pj_bkrNeKVwwT4-iMcTdtL3gCOgIdke9yXgyn-D3Cmx2Cdhb5vgDVd6AGtY9dihXQCfstRGzO_0GtCyl-Qx-0MaicBaoCTvLKKPHinEKtWKIbcXI3DA6N9iEu4xnftVU-Qtr7jT3yfZKbD_rK5iOF7DCFsHgQB6AOqLs41TsTUrdegLpfQN0qr-fpfP45QXaAffb8hmWJTxLaDmZTjCBOwyzDBOIcgeyg3NYbxjFeEY-A6gjZAXHlsK0WfVBxpjg8VchSoGaXpyBiFVRvryT0SvIFx0OtB8sLxZ99E9UK1YhGJtzmlaiKKhdEydRK1ShV1bmq6rIex7rIRT8UI4-8r2mvmkS3lFGZ5ZTnRVkSpdyLchxUPhZNVY-ihiLjWWqTGnOdo27JQ-g2J1Ht88TIno1_pIfI8u1pAxDFMK1tbNr128VDkUXT_F-aoIPh9oskfGYF5cNiHNy8aCMfmQp6ZrxNbPEeiwdnfZA2JNtq2v-M1mHa-nRwM1AXZ37-dsvqfvAQgLpnYIC6z1OuLf0OAAD__1ax8sU">