Converted arithmetic to floating-point

replaced 8 with mul so that we can do floating point arithmetic