I guess this is just a basic C question... (rather than about integer maths as is used in axo.)
assuming so, then your issue with C, is 'type conversion'
C will keep its type, so your 64/40 is done as an integer and so equals 1, if you want to use floating point then you have to tell C to upcast it to float (or double or whatever )
in this constant example, you can do this by using float constants
e.g. (64-24) * (64/40.0f) , this results in a float expression
this is why your second example 'works' , since you have given it a float, and so will use float for the expression
(40.0 will also work, but is considered bad practice, as its unclear... it could be a double or could be float, depending on compiler/platform... many compilers will now give a warning for this. )
however, Id recommend you read up about type conversion in C, its an important topic, and one if you are not clear on is really easy to get yourself in a mess, and introduce some subtle (=nasty) bugs.
(e.g. things like operator precedence might change which parts of your expression are in float, and which in int)