Array indexing vs. pointers...

Aashi Deacon aash at ms.uky.edu
Tue Oct 4 10:42:59 AEST 1988


>    o	Try very hard to replace divides with other operations, as in:
>		x / 10
>	with:
>		x * .1
>    o	See if some calculations can be done using integer math.

Are these two points contradictory?
Thanks for those good hints but I got stopped when I saw this first point.

According to theory, '.1' cannot be represented exactly as a floating
point number because in base2 it is irrational.  Wouldn't then the
first be better in this case?

aash
aash at ms.uky.edu



More information about the Comp.lang.c mailing list