|
| 03 Feb 2016 03:30 PM |
print(0.1 + 0.2 == 0.3) darn you floating point accuracy
|
|
|
| Report Abuse |
|
|
|
| 03 Feb 2016 03:34 PM |
sometimes you just gotta make it a string print(tostring(0.1 + 0.2)== "0.3") --true
|
|
|
| Report Abuse |
|
|
|
| 03 Feb 2016 03:50 PM |
| I'm one of about 10 people that gets the joke |
|
|
| Report Abuse |
|
|
fixylol
|
  |
| Joined: 14 Dec 2012 |
| Total Posts: 7412 |
|
|
| 03 Feb 2016 03:57 PM |
"> print(0.1 + 0.2 == 0.3) false"
i just dont know
Number of times opinion has changed: A lot. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 03 Feb 2016 03:58 PM |
| I would like to see you add a repeating number to a repeating number and express the correct answer, even if it does go on forever. Oh wait |
|
|
| Report Abuse |
|
|
| |
|
|
| 03 Feb 2016 04:00 PM |
fixy 0.1+0.2 == 0.300000000000000003
somewhere around that
|
|
|
| Report Abuse |
|
|