Re: Sin & Cos speed worries



Julian V. Noble wrote:
[...]

I would be very surprised if sin/cos and sqrt are defined as high
level C functions. Since Pentia and advanced PowerPC architectures
all include these functions in hardware, any implementations of C
for PC or Mac would almost certainly default to the (vastly faster)
hardware versions. It is very hard to beat them using e.g. a lookup
table or rational approximation in high-level C unless you do it
with inline assembler.

Actually, as far as I know, the PowerPC architecture does not
include any elementary floating point functions except square
root, reciprocal square root estimate, and reciprocal estimate.
And which of those are included depends on the cpu generation.

On the other hand, Apple, Motorola, and IBM are claimed to have
very good software implementations of elementary functions, for
some useful definition of good.

-- David

.


Quantcast