Math Bug?

Working on some math for my app where I’m converting pounds to kilograms then performing medication calculations (dosing and volume):

The initial factors are the patient’s weight in pounds and the number used to perform the conversion. The patient’s weight is dynamic, based on user specific input, and the conversion is static. Note: I’ve tried both factors [*0.454 and /2.205] and they both produce the correct weight in kgs, see below.

From here, I take the value from the sheet where the calculation is being performed then math it further for each specific medication:

The problem, however, is that the product I’m being given is 22.7:

4.5 * 5 = 22.5 not 22.7. Can someone please tell me if this is a bug or user error?

Math uses the true underlying value. You are cutting it off at 1 decimal place, but all decimals are there underneath. You need to use a Round in your formula if you want a true rounded value.

round(lbs*0.454, 1)


As always, @Jeff_Hager coming in clutch. File this one under “User Error” lol.

Thank you sir!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.