   help float number
  example:   m_fX = 0.2f;   m_fY = 0.2f;   m_fDir = 0.0f;   m_esStatus = esIdle;   m_fMoveStep = 0.05f;m_fX = (0.20000000)m_fmoveStep = (0.050000001)how to solve this problem? 
  It is in the nature of floating-point numbers that they are not exact. There's no way around this; deal with the slight deviations, or use integer types if you need absolute accuracy.Edit: ... Or fixed-point numbers, or large precision numbers such as the GNU MP library, but not floating-point.   [edited by - Miserable on May 29, 2004 3:47:29 AM];  Depending on what you consider the problem:1. Display less digits -- the formatting code will round appropriately.2. Floating point numbers are almost always off by a tiny bit. They sacrifice precision in order to extend their range. That cannot be fixed -- that''s the way they work.   John BoltonPage 44 StudiosCurrent project: NHL Faceoff 2005 PS2 ;  example:float a = 0.05f;float b = 0.1f;void func(){   b=b+a;}this func() be called by anything no-limit times; the ''b'' is error.hmm~~!!!! it''s is not exact also accept.but every called ADD 0.0000000001f,i can''t accept autoadd a ''0.000000000001f''  