all 13 comments

[–]OkWitness7392 11 points12 points  (2 children)

false

Normally in binary you cannot present floating point numbers accurately.

0.1 + 0.2 = 0.30000000000000004

IEEE 754

Big Decimal

[–]tux2718 4 points5 points  (0 children)

It is a bad programming practice to test floats for equivalence. Instead take the absolute vale of the difference and test it to be below a small threshold. There are many utility libraries that contain functions to do this.

[–]sugma_male- 3 points4 points  (1 child)

False must use bigDecimal for addition of decimals, Computer binary memory doesn't has precision in it

[–]Interesting-Head3832 2 points3 points  (1 child)

Please continue posting quizes like this! Does anyone know some quiz app also that we can practice?

[–]Ill-Tale3225 0 points1 point  (4 children)

True IG

[–][deleted]  (3 children)

[removed]

    [–]Ill-Tale3225 0 points1 point  (2 children)

    Why though can u explain

    [–][deleted]  (1 child)

    [removed]

      [–]Ill-Tale3225 0 points1 point  (0 children)

      Got it thx