<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/113671>113671</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [clang] buggy implementation of `-0.0 + 0.0i`
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Sh0g0-1758
      </td>
    </tr>
</table>

<pre>
    I am not sure if I should call this a bug, since gcc and even GNU MPC (infinite precision) also give the same result but it certainly feels wrong. Consider `-0.0 + 0.0i` and `-0.0 - 0.0i`. The real part in the former is `0.0` and in the latter is `-0.0`. I would have expected the real part in both to be `-0.0` but that is not the case. I checked the ISO SPEC for C23 but did not find any reference to this. 

https://godbolt.org/z/hxhcn6aof

cc: @lntue 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxskkFzozgQhX-NuHSZEjLY-MAhcdZbPuxuqrL7A1qiQdoRkktqnHh-_RTEmclMzQWq1HyvH08Pc3ZjIOpE8yiapwJntjF1L1aOclPtm7bQsb91Z8AJQmTIcyJwA5wh2zj7Hgx6D2xdBgQ9j0IdIbtgCEZjAEMPdKUAf_79H_z1fAShWhcGFxwTXBIZl10MQh0AfY4wuisBW4KME0GiPHsGPTM4BkOJ0QV_g4HIZ3hNMYwlHGPIrqcEYic3spQg1CPIUjqxk-v6j_PNx2kJ_9pFHD1cMDG4sK4cYpoogcsLIUv5wd_HHpm_jzfv8xLO8LqGYPFKQG8XMkz9-v1P-jqyBY6g6RO9_hhb5EV0iXbBDGZaZI0l8-UudX75B16e_zguFuGotivYu36FBhd6wHCDRAMlWoLnuN5HCUI-Cfnw_rTMlyy2D0KdhDqNsdfRcxnTKNTpq1An-2ZN2GEcPkPGiO0DiFr6wDNB0Xfb_rA9YEFdtVeHtpHNoSpsJ7HSe0Rd66ap9zXuDvtG6ao1bdseetUWrlNS1ZVUTSXltqpKlLuasNdGm7rH_U7UkiZ0vvT-Oi22CpfzTF1VbXf7qvCoyee1o0oZj2EUSi11Td0CbPQ85sWmy5x_SLBjvxb7nWieloKON3DTxdNEgZFdDBCH35WnmJPvfknNsZ11aeIk1GnZcn9tLin-T4aFOq2us1Cnu_Frp74FAAD__2niDiE">