addition - Adding fraction with integers in JavaScript -


here friend noticed while working on project. not have stackoverflow account asking on behalf of friend.

var = 1.75/3; 

so gives

a = 0.5833333333333334 

now when add 1 variable this:

1.5833333333333335 

notice difference in last digits

similarly when following

    0.5833333333333336+1 

i

    1.5833333333333335 

now replacing 6 7

it gives me

1.5833333333333337 

i can't understand going here. can please explain this?


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -

matlab - How to equate a structure array to structure array -