• Resolved ddangerfield

    (@ddangerfield)


    Hi
    I have a weird problem
    When multiplying some number by 1.1 , I got weird result
    1300*1.1=14300000000000002
    when
    520*1.1= 572

    Any clue ?
    Thanks

Viewing 1 replies (of 1 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @ddangerfield

    The issue you are reporting is caused by the way the javascript engine (implemented by the browsers) manages the mathematical operations with decimal operators. To fix it, I recommend you to use the PREC operation as the outermost operation in the equation.

    PREC(X,Y) returns the X rounded to Y decimals.

    In your case: PREC(1300*1.1, 2)

    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘Multiply by 1.1 problem’ is closed to new replies.