3
$\begingroup$

In some program environments like GLSL there is support for single and double precision numbers for arithmetic and square roots computation, but only single precision trigonometric functions are available. To support the double precision versions one would have to implement them manually.

The more precise versions could just be implemented from scratch e.g. via Taylor or Padé approximations. But is there a way of making use of already present single precision implementation to improve performance?

$\endgroup$
  • 1
    $\begingroup$ I have been professionally involved with math libraries and x87 floating-point processors (which include FSIN, FCOS, FSINCOS, FPTAN instructions). To the best of my knowledge, the answer is "no", at least not in any way that is useful in practice. For what it is worth, you would not want to use Taylor or Padé approximations for your own double-precision approximations to trigonometric functions, but use polynomial minimax approxiations instead. $\endgroup$ – njuffa Apr 24 '15 at 20:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.