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!

High-quality C math libraries

Status
Not open for further replies.

WebDrake

Programmer
Sep 29, 2005
106
0
0
PL
Could anyone recommend a really good math library for C?

I note that the standard math.h library often takes variable values as input. My practice is where possible to pass pointers to functions. Do all these maths functions really need to use the passed data destructively? Is there a math library that allows better speed performance?

Many thanks,

-- Joe

 
Passing a pointer doesn't necessarily mean that it is faster. The function still has to dereference the pointer which is sometimes not as efficient as you might think. It is often faster to operate off a value on the stack than operate off a dereferenced pointer.

Just have a look at the assembler coding if you can. You will see what your compiler generates and how efficient/inefficient it is. Some are better than others. When using Intel 8086, it was really inefficient to have 32 bit pointers. With the 32-bit systems, it is not as messy. With 64 bits, it is probably back to the 8086 segmented addressing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top