From: lionel@quark.zko.dec.com (Steve Lionel)
Subject: Re: How is sin and cos implemented on the ALPHA architecture?
Date: 1996/11/20 [thread overview]
Message-ID: <56vp9k$t7q$1@nntpd.lkg.dec.com> (raw)
In-Reply-To: 56tn8b$nkc@news0-alterdial.uu.net
In article <56tn8b$nkc@news0-alterdial.uu.net>, ian@adone.com (Ian Lintault) writes:
|>Hello,
|>
|>Does anyone know how sin and cos are implemented on the alpha. We
|>want to do some very fast sin and cos. Is there an assembler
|>instruction like in the pc or is it written in assembler in libm. We
|>are using C++.
The SIN and COS functions are implemented using a specially optimized software
routine. They are very fast. There is an alternate "fast math library"
entry point which is faster, but somewhat less precise - this may suit your
needs. You get at this using a -math_library fast switch when compiling
(I'm not sure if DEC C++ supports this.) There are also routines that will
return both the SIN and COS of an argument, this is faster than calling
the SIN and COS routines separately. Unfortunately, the sincos routine returns
values in registers F0 and F1, which is difficult to get at from languages
other than Fortran.
--
Steve Lionel mailto:lionel@quark.zko.dec.com
Fortran Development http://www.digital.com/info/slionel.html
Digital Equipment Corporation
110 Spit Brook Road, ZKO2-3/N30
Nashua, NH 03062-2698 "Free advice is worth every cent"
For information on Digital Fortran, see http://www.digital.com/info/hpc/fortran/
next prev parent reply other threads:[~1996-11-20 5:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-11-20 5:00 How is sin and cos implemented on the ALPHA architecture? Ian Lintault
1996-11-20 5:00 ` Steve Lionel [this message]
1996-11-20 5:00 ` Dirk Grunwald
1996-11-21 5:00 ` Steve Lionel
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox