why not consfold sin(const)

Robert Dewar dewar@gnat.com
Sun Sep 19 21:12:00 GMT 2004


Luchezar Belev wrote:

> I see. I'm surprised that in the compiler there is no sin/cos/log/etc. funcs
> already implemented for other reasons.

Compilers barely use floating-point except to simulate target
arithmetic, they sure don't use sin and log!
> 
> What are the requirements for possible implementation of such functions?
>  - precision of somewhere about the long double (64-bit mantissa)
>  - the speed doesn't matter too much
> is this right?

Right, the speed does not matter, and the precision needs to match
the relevant precision on the target machine (i.e. the precision
that would be obtained for that particular operation on the target).




More information about the Gcc mailing list