"Ben Combee" <[EMAIL PROTECTED]> ??? news:[EMAIL PROTECTED] ???... > At 02:03 AM 3/7/2004, you wrote: > >hi, i have problem when using functions like sin, cos, tan : > > > >------------------------------------------------------ > >include "MathLib.h" > > > >double value; > >FlpCompDouble temp; > >Char str[10]; > > > >value = cos(0.5); > >temp.d=value; > >FlpFToA(temp.fd, str); > >WinDrawChars(str, StrLen(str), 80, 80); > >------------------------------------------------------ > > > >The screen displays(draws) sth like "pppppppppp"(error) instead of the > >desired answer. > > Have you tried stepping through the code using the debugger? I just tried > this, and I saw a valid value in str after the FlpFToA call. The string > was "8.7758256e-01", which is the right value for the cosine of 0.5. > > What device/ROM image/simulator are you using to test your code? I was > using POSE 3.5 with a Palm OS 4.1 debug ROM for my testing.
I am using Simulator OS 5.3 debug how to use the debugger? i'm using CW > > > -- Ben Combee, senior DTS engineer, PalmSource, Inc. > Read "Combee on Palm OS" at http://palmos.combee.net/ > > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
