You are viewing a single comment's thread from:

RE: The Programmer's Challenge of the Day

in #programming7 years ago (edited)

Answer is 'YES' and it happens like this because 'a' is in float but 0.7 is by default double so the binary representation of both vary and causes this result to occur.
To get correct result you need to use a < 0.7f : )

Sort:  

It's true.
It's damn true.

Thanks for the explanation.

Coin Marketplace

STEEM 0.20
TRX 0.14
JST 0.030
BTC 68010.47
ETH 3258.17
USDT 1.00
SBD 2.68