We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi, I don't know where I can relay bugreports.
1.0 / 7.0 = 0,14285714285714285714285714285714 (windows calculator)
but Processing 2.0 says
double f = 1.0 / 7.0; println (f);
0.1428571492433548
This is wrong!
Answers
your 1.0 and 7.0 are floats.
Thank you Koogs, but double or not the result of 1/7 is a repetativ sequence of 142857 and this is not given in f : 142857 149243 3548
because computers, specifically the way they handle numbers, is never exact.
doubles are better than floats, as you can see, at the cost of speed and storage space.
how would you write 1/3 as a decimal? computers have the same problem (but using binary).
also this: http://www.jpl.nasa.gov/edu/news/2016/3/16/how-many-decimals-of-pi-do-we-really-need/
Why I am so currious about the division by 7 is that I am experimenting with numbers and their divisions.
Here are - I hope you can understand german - the results of my excursions
https://processing8.wordpress.com/2016/03/25/division-durch-7/