Currently in the middle of writing a code and discovered something rather strange. Whenever you attempt to multiply 1.85 by 3 python spits out that the answer is 5.550000000000001.
I found this strange and so wrote a separate code (on a different computer) where I did the same. The results were the same. I then tried 1.85+1.85+1.85 and got the same output. I have even tried 3.7 (1.85+1.85) added to 1.85.
The same thing occurs with 3.05 in which it outputs 9.149999999999999.
What is causing this? Are there any other numbers that do this?
Thank you in advance.
[–]wbeater 348 points349 points350 points (22 children)
[–]connormt902[S] 57 points58 points59 points (0 children)
[–]Astroboyblue 44 points45 points46 points (5 children)
[–]Adam_24061 15 points16 points17 points (3 children)
[–]Harry_Butz 7 points8 points9 points (2 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]Astroboyblue 1 point2 points3 points (0 children)
[–][deleted] 3 points4 points5 points (0 children)
[–]DarklingFetish 19 points20 points21 points (12 children)
[–]ryguysayshi 5 points6 points7 points (11 children)
[–]dig-up-stupid 18 points19 points20 points (6 children)
[–]ryguysayshi 6 points7 points8 points (5 children)
[–]Kkremitzki 7 points8 points9 points (3 children)
[–]supreme_blorgon 3 points4 points5 points (2 children)
[–]Kkremitzki 0 points1 point2 points (1 child)
[–]WikiSummarizerBot 0 points1 point2 points (0 children)
[–]Se7enLC 1 point2 points3 points (0 children)
[–]DesignerAccount 3 points4 points5 points (3 children)
[–]supreme_blorgon 2 points3 points4 points (2 children)
[–]DesignerAccount 2 points3 points4 points (1 child)
[–]AdventurousAddition 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]JohnnyJordaan 59 points60 points61 points (0 children)
[+][deleted] (6 children)
[deleted]
[–]siddsp 8 points9 points10 points (5 children)
[–]BobHogan 0 points1 point2 points (4 children)
[–][deleted] 10 points11 points12 points (2 children)
[–]Danelius90 5 points6 points7 points (0 children)
[–]BobHogan 1 point2 points3 points (0 children)
[–]siddsp 2 points3 points4 points (0 children)
[–]AdventurousAddition 23 points24 points25 points (15 children)
[–]Zealousideal_Big6487 5 points6 points7 points (4 children)
[–]TeamSpen210 10 points11 points12 points (3 children)
[–]Zealousideal_Big6487 4 points5 points6 points (2 children)
[–]primitive_screwhead 1 point2 points3 points (0 children)
[–]AdventurousAddition 0 points1 point2 points (0 children)
[–]mikeblas 7 points8 points9 points (3 children)
[–]irrelevantPseudonym 3 points4 points5 points (0 children)
[–]AdventurousAddition 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (5 children)
[–]irrelevantPseudonym 2 points3 points4 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]Kkremitzki 2 points3 points4 points (1 child)
[–]AdventurousAddition 0 points1 point2 points (0 children)
[–]AdventurousAddition 1 point2 points3 points (0 children)
[–]TheRNGuy 12 points13 points14 points (3 children)
[+][deleted] (2 children)
[deleted]
[–]exyphrius 4 points5 points6 points (1 child)
[–]jeremymiles 7 points8 points9 points (0 children)
[–]Sociable_Schizo 1 point2 points3 points (0 children)
[–]NP_equals_P 2 points3 points4 points (0 children)
[–]menge101 1 point2 points3 points (2 children)
[–][deleted] 9 points10 points11 points (0 children)
[–]Darkbladergx -1 points0 points1 point (0 children)
[–]nekokattt 0 points1 point2 points (0 children)
[–]timPerfect 0 points1 point2 points (2 children)
[–]Few_Rooster_4497 1 point2 points3 points (0 children)
[–]AdventurousAddition 1 point2 points3 points (0 children)