Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Java
question regarding java puzzlers #2
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="=?ISO-8859-1?Q?Arne_Vajh=F8j?=, post: 2838141"] All real numbers can not be represented exact in a fixed number of bits because there are an infinite number of them. Floating point are based on 1/2 1/4 1/8 and not on 1/10 1/100 1/1000, which mean that numbers that are exact representable in a small number of decimals are not necessarily exact representable in a computer floating point. So just because some math works in decimals does not mean that the same math works in computer floating points. When you use float and double types you should expect this type of noise. If you can not live with that chose another data type (BigDecimal would be obvious). Arne [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Java
question regarding java puzzlers #2
Top