Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

math.h implementation

Status
Not open for further replies.

greatkingrat

Programmer
Aug 7, 2001
88
0
0
KR
Can I get a reliable and accurate source code in C
for math.h which doesn't use harware FPU instructions?

Thank you so much.
Hee S. Chung
heesc@netian.com
 
Could you post the link, i am very curious about this...
Thanks. [red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal...
 
could you share the link? Ion Filipski
1c.bmp


filipski@excite.com
 
Sure,


Actually it was needed to make a program for PalmOS.
I'm not using CodeWarrior and currently PRC tools doesn't
support math.h for double precision floating point.
Only single precision version of math.h is present.

So I downloaded the source code of PRC and I found the
math library which is called 'Cephes Math Library'
is used in PRC source codes.

Download *.shar files in the above site. You need the
unix command 'sh' to generate c code from .shar files.

If you use Windows, you need to download cygnus-win32
which contains 'sh' command.

I didn't fully test its accuracy but my test for cosine
function was successful. Results of cephes' function and
standard math.h function were exactly the same.
( I tested it using Cygnus-win32 and I think some modification
is needed to be compiled using another compilers )

And the single precision of this library is already used
in the PRC tools. PRC tools is officially distributed for
PalmOS developers.
Hee S. Chung
heesc@netian.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top