Jan-27-2018, 11:30 PM
Here's a simple code I ran for practice as part of my class. Below are the results. Can anyone tell me why the increment when to the ?trillionth+? decimal place and not the thousandth that I specified?
4.9870000000002195
4.98800000000022
4.98900000000022
4.9900000000002205
4.991000000000221
4.992000000000221
4.9930000000002215
4.994000000000222
4.995000000000222
4.9960000000002225
4.997000000000223
4.998000000000223
4.9990000000002235
5.000000000000224
import os import sys import re votes=3 while True: votes=votes + .001 print(votes) if votes>=5: breakResult(portion of...)
4.9870000000002195
4.98800000000022
4.98900000000022
4.9900000000002205
4.991000000000221
4.992000000000221
4.9930000000002215
4.994000000000222
4.995000000000222
4.9960000000002225
4.997000000000223
4.998000000000223
4.9990000000002235
5.000000000000224