Varying possible loss of precision

Posted by szupie on Stack Overflow See other posts from Stack Overflow or by szupie
Published on 2010-04-23T07:08:44Z Indexed on 2010/04/23 7:13 UTC
Read the original article Hit count: 241

Filed under:
|

In Java, when you do

int b;
b = b + 1.0;

You get a possible loss of precision error. But why is it that if you do

int b;
b += 1.0;

There isn't any error?

© Stack Overflow or respective owner

Related posts about java

Related posts about precision