Debug.Log(1 + 20 / 40);

This is my calculation and it debugs 1 for some reason instead of 1.5 which it should do but it dosent.

Whats the chance that C# (it has nothing to do with unity) has maths wrong? Is it more likely that you have done something wrong and simply dont understand enough to realise?

1+20/40 is 1 when doing the math using integers not floating point or decimal numbers.

There is no such thing as 1.5 using integers they are whole numbers.

Instead: 1.0 + 20.0 / 40.0 = 1.5