<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/91824>91824</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Numerical error introduced using ARM64 using clang-14 but not clang-13
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
phargogh
</td>
</tr>
</table>
<pre>
Hello! I am experiencing an issue with clang on ARM64 (reproducible on M1 mac and Raspberry Pi 4B) where chaining a series of mathematical operations together introduces some numerical error. I have a workaround where breaking some of the math onto a second line does not introduce the error. I have tested this on a Raspberry Pi 4B and also on the following debian versions on my M1 mac:
- debian buster (arm64, gcc 8.3.0, clang 7.0.1, no numerical issue)
- debian bullseye (arm64, gcc 10.2.1, clang 11.0.1-2, no numerical issue)
- debian bookworm (arm64, gcc 12.2.0, clang 13.0.1, no numerical issue)
- debian bookworm (arm64, gcc 12.2.0, clang 14.0.6, numerical issue present)
- debian trixie (arm64, gcc 13.2.0, clang 16.0.6, numerical issue present)
- debian sid (arm64, gcc 13.2.0, clang 16.0.6, numerical issue present)
A minimal reproducible sample is here in this gist: https://gist.github.com/phargogh/c4264b37e7f0beed31661eacce53d14a
Thank you!
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyslMmO4zYQhp-GuhQsiItl66BDTwZGcpggGOQFuJQlpilSIKn2-O0D0m704hxmgFxkc_v-qp_FkinZySOOZP-F7L82cstziOM6yziFaW5UMNfxd3QuEEYB_gC5AP5YMVr02voJpAeb0oZwsXkG7aSfIHh4-v6tF0DYMeIag9m0VQ7LwjcKi9QgvYHvMq0KY7zCXxbEF8IGuMwYEfQsra9wSEUpQTjDIvOMi8xWSwdhxSizDT5BDhPmGSNYn6sSJkhhQfDbgrHuxhhDbEv0s3xBkHAJ8VnGsHlzV1QR5XNRrCfDGfKMVRGCz6HGoYM34KxHMAET-JDfFOv2TyoZU0YDebap5C0_p1stkC6FslrOn4Nz4VKCMKis9PCCMdUUg4fleneO8CfSfSXd_bt73ay2lDEWx2VcekHYbzBpDceWt10Z3G7m0HYtLUMf3vlTL5Cw4QHpXMIrPkBp17Ib5kaltGB37KfBITxfQlwewaxl78Ol_Jfi_WmsaLu2r9iPTFgjJvT5kZ2j_WH_wwn-idz_MjlZ8z9ib98nWKy3i3Tw4fkluawOwSaoRW_9rTonmzLhTzDnvKZSX-xE2KnMtpPN86ZaHRbCTq9NgbCTFqwXih_wcO4UouG07ylKrXHPDRXyfTB_z9I_wzVshNHGjNwMfJANjvRA9_zIxH7fzKOh1Bz0gQ_HjvWKIWf0rDQqKag40l43dmQdE92edox3B75vD4NWRmF_lmIQhndEdLhI61rnXpY2xKmpDo0DPTLROKnQpdrlGPN4ea0hVppeHMuZndqmRETnbMrpjZJtdjj--bGZvD19A1sqb_bW8G7_66XtqAC15doo7hO82aIbP9v8zuEiev_ZrTH8gzoTdqqhJsJONZV_AwAA__-pWNO_">