floating points


I have an entry field where the user enters a string that should correspond to a floating point number (an FM frequency).  When I retrieve the string from the entry field and convert it (using strtod) to a floating point, the number does not come out exact (i.e. if I enter the string 85.3 the floating point number I get is 85.299995).


I’m sorry this is not necessarily a gtk question, but the other day I saw a message on this Gtk-list were someone mentioned a similar issue with floating point representation and I forget if there was a solution included in the message.


Any help would be appreciated,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]