2.01+0.01
I run following JSP and get a wired result. Can someone tell me the reason? Thanks
Code :
<hr>
<%= 1.01+0.01 %>
<hr>
<%= 2.01+0.01 %>
<hr>
<%= 3.01+0.01 %>
<hr>
<%= 4.01+0.01 %>
<hr>
<%= 5.01+0.01 %>
<hr>
Output
1.02
2.0199999999999996
3.0199999999999996
4.02
5.02
What Every Computer Scientist Should Know About Floating-Point Arithmetic.
Similar Messages
Maybe you are looking for
-
[SOLVED] Problem with murmur after upgrading to 1.2.3-4
I've been running Murmur on my server for a long time without problems. The last version I had running was 1.2.3-3. After upgrading to 1.2.3-4, the already-running murmurd process crashed after a while (some hours after the upgrade, after constant us
-
How can I make my AVCHD mov. files work in premier pro?
I used Panasonic HDC-SD60 for a short film for work. This has over about 40 clips with around 3 hours of footage However when I import the .mov files from the media browser the audio seems fine but the footage is in a sort of slow mo, and out of syn
-
Time Machine and File Vault question
I just completed a clean install of OS x mavericks and then used my time machine back up to restore the mac. The whole process was confusing for many reasons and I just want to get some clarification/verification on my next actions. When I enter time
-
SQL Developer Error Creating User Home
SQL Developer was running fine on my Windows 7 64-bit machine until Monday morning. Now when I kick it off (from my Desktop shortcut), I get a small box saying: "Error creating user home in directory C:\Users\<username>\AppData\Roaming\SQL Developer"
-
BDC steps differ when inputing same record with different other field value
CODEDATE-- ETC...(there is of course other field) 11----01.10.2007 (do process A C D) 12----01.10.2007 (do process A C D) 12----01.11.2007 (Having same code field so do process A B C D) 13----01.11.2007 (do process A C D) 14----01.10.2007 (