Run Code  | API  | Code Wall  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

floating point limitations

Language: Layout:
+ ] Show input
Absolute running time: 0.17 sec, cpu time: 0.13 sec, memory peak: 6 Mb, absolute service time: 0,18 sec 
edit mode |  history  | discussion
Is 0.1 equal to 0.10000000000000001? Let's see:
True
No shit, really?! How about this: does 0.1 + 0.1 + 0.1 == 0.3?
False
Well, I'll be damned! Maybe atleast 0.1 * 3 == 0.3?
False
Dude, you are killing me! Why?
Oh, it's because i didn't read the documentation... https://docs.python.org/3/tutorial/floatingpoint.html

    
                
λ
.NET NoSQL database for rapid development