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

    <tr>
        <th>Summary</th>
        <td>
            Create bugprone-accuracy-lost-in-floating-point-calculation check
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-tidy,
            check-request
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          PiotrZSL
      </td>
    </tr>
</table>

<pre>
    I'm adding this here so, i wouldn't forget. 

```
int test(int a)
{
   return int((double)a * 0.01); // could be done as a/100;
}
```
Example not the best but, idea is to find all expressions (sometimes multiline) where input is an integer and output is an integer, but calculation is done on floating-point. Sometimes by changing order of operation entire calculation could be done fully on integers.

Check could have also other names.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsUk-PqzYQ_zTmMgI5JiRw4LDJNlKlHirtrbcBD-DW2NQe726-fWU2fe9F70kIDMz8_sz8MEYzO6JeNBfRvBaYePGh_9N4Dn-9_VEMXt_734U6r4BaGzcDLybCQoEgeqGuYODDJ6udUGeGyYeZuAIhX4V8edxP8nHtr8YxMEUWqs1HFKp71J0vXwcACMQpODAulwnVap8GS0J1CEK9gKzkIffVFxDqJtQNxqwBBgLtHQHGjHs7SCnqy__or7-U89snrpslcJ6BF4KBIsOQeLemCcFEYA-TcRrQWqDPLVCMxrsIQrXRr8RmpQhrsmyscVklfOwDMm5LnAFwt0IzBUCnwSf-6UfmGxLDiHZMFtl4lwt2O97BZD2ycXO5eeO4grdvvMMdxgXdnHfjg6YAfgK_UfjCIMcm0BPs86ymZO09UzyExOrH5V0XGv95dCz4ToA2evC8UACHK8Wq0H2tu7rDgvrDWZ5VfWw7VSz9MJwa2Sqt6-OpnQ5Y42HsBsQTnnV9bnRheiXVUSp5OjTNsVFVPdWnmuQ0TtQeuqkTR0krGltZ-75WPsyFiTFR38q2aQuLA9m4B1ep0aKbSzb6LpQS6po_ZelloH_TnjaV4x36DFUOaY7iKK2JHL-Ds2FL_TUQMsGQ5i14RyWOYwo43kvrI5fGlc-rKJ8mmymLFGy_MG9R1C9f8ZwNL2moRr8Kdct8j0e5Bf83jSzUbXcWhbrt5v4LAAD__5AAKR8">