Put brackets around nine / forty to ensure that we don't divide where we don't have to

This commit is contained in:
Gwilym Kuiper 2021-06-05 21:58:32 +01:00
parent aa39b2b6ad
commit 3357a4b69d

View file

@ -263,7 +263,7 @@ impl<I: FixedWidthSignedInteger, const N: usize> Num<I, N> {
x -= one / four + (x + one / four).floor();
x *= (x.abs() - one / two) * sixteen;
x += x * (x.abs() - one) * nine / forty;
x += x * (x.abs() - one) * (nine / forty);
x
}