View Single Post
  #4 (permalink)  
Old June 18th, 2012, 11:37 AM
AnTiDoD AnTiDoD is offline
Registered User
Points: 17, Level: 1
Points: 17, Level: 1 Points: 17, Level: 1 Points: 17, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2011
Location: Russia
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks, but you don't undestand situation.
Your code is right and I agree with it.
I'm saying about ambiguity in presentation float-point numbers in computer. The author had this in mind.

Next code never stopped, and you known why?) I know)
Code:
for (double x = 0.0; x!= 1.0; x+= 0.1)
	cout << x << endl;