>>> int(1.999999999999999)

>>> int(1.999999999999999)
1
>>> int(1.9999999999999999)
2

LMAO

Other urls found in this thread:

floating-point-gui.de
youtube.com/watch?v=sD0NjbwqlYw
twitter.com/SFWRedditImages

>>> .1 + .2
0.30000000000000004


really causes electrical signals to flow through your neurons

Yes, that's right.

What did you expect?

>current year
>not knowing how floats work
i shiggy diggy do

>pi = 3
LMAO

>>> print(Fraction('0.1') + Fraction('0.2'))
3/10

...

Obviously, since 1.99999... is equal to 2, then at some point it flips over from being in the 1 to the 2 range. Kudos to python for figuring out that happens at 16 9s.

>1.99999... is equal to 2

floating-point-gui.de
get educated

oh boy...here we go again

In theory it's not equal but in every practical situation it's equal.

1/9 = 0.111...
9 * 1/9 = 9 * 0.111...
1 = 0.999...

Thanks user I did.

You think that's weird?

1 + 2 + 3 +4 +5 +... = -1/12

it's almost as if the computer has a finite amount of memory and you just passed the max amount of 9s it can handle before it rounds it off to save memory

> LMAO

that's not how this works at all but you've kind of got it I guess

Ramanujan summation is basically bullshit.

>Ramanujan summation is basically bullshit.
brainlet detected

tard detected

Nice try, but no. 1/9 equals zero followed by an infinite number of 1s. However, infinity minus infinity equals infinity, so no matter how many 1s you have following the zero (even if you have an actual infinite number of them) you still need to add an infinite number of 1s for it to be exactly equal.

Try using decimal.Decimal if you actually care about precision

>R
not even once

>1 + 2 + 3 +4 +5 +... = -1/12
That sum doesn't actually converge to -1/12. That is just what brainlets that don't understand analytic continuation interpret it as.

what you should be saying is
>the analytic continuation of riemann zeta function with an input of -1 is equal to -1/12

this video explains it pretty well even if it's over twenty minutes long
youtube.com/watch?v=sD0NjbwqlYw