[issue35658] Reggie_Linear_Regression_Solution.ipynb devide by 10 diff with multiply by .1

2019-01-04 Thread Steven D'Aprano
Steven D'Aprano added the comment: Not a bug. 0.1 is a binary floating point value, please read the FAQs: https://docs.python.org/3/faq/design.html#why-are-floating-point-calculations-so-inaccurate 1/10 = 0.1 in decimal cannot be represented *exactly* in binary floating point, so when you

[issue35658] Reggie_Linear_Regression_Solution.ipynb devide by 10 diff with multiply by .1

2019-01-04 Thread Bart van den Donk
New submission from Bart van den Donk : possible_ms1 = [i*.1 for i in range(-100, 101, 1)] #your list comprehension here print(possible_ms1) possible_ms2 = [i/10 for i in range(-100, 101, 1)] #your list comprehension here print(possible_ms2) Multiply by .1 gives dirty results. Divide by 10