On Tue, 2005-06-21 at 10:15, Udi Kobi wrote: > Hi, > What c function is used to get f(1000.3) = 1000 ? > > Reagrads, > > -Udi > >
Udi If this were C on Unix or something similar you would use the round function. On palm you really don't have a set of floating point operations unless you use MathLib (this is a separate .prc file with numerouse math functions, run a google search and you'll find it). I know that you can write your own round function (either through some basic arithmetic or via bit manipulation and some knowledge of IEEE 754 floating point representation). Unfortunately I can't remember the trick to this (the basic arithmetic way). Hope this gives you a few leads. John -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
