Re: implementation of DACOSD



"Michel OLAGNON" <molagnon@xxxxxxxxxxxxxxxxx> wrote in message
news:429712AC.4070005@xxxxxxxxxxxxxxxxxxxx

> By the way, those functions are very bad implementations.

> Hint: real*8 pi
> real*8 zero
> zero = 0.0
> pi = 2 * acos(zero)

Not to mention that it also makes sense to reduce the
argument while a circle is still an integral number of
degrees, rather than a transcendental number of radians:

dcosd = cos(mod(angle,real(360,kind(angle)))*pi/180)

--
write(*,*) transfer((/17.392111325966148d0,6.5794487871554595D-85, &
6.0134700243160014d-154/),(/'x'/)); end


.



Relevant Pages