Re: Doubt about formula transcription
  Home FAQ Contact Sign in
comp.lang.fortran only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: Doubt about formula transcription         

Group: comp.lang.fortran · Group Profile
Author: Terence
Date: May 4, 2008 20:50

On May 5, 12:55 pm, glen herrmannsfeldt ugcs.caltech.edu> wrote:
> On Apr 7, 3:36 pm, Leonardo Marques gmail.com> wrote:
>
>  > I've transcripted to fortran as: 2*atan((sin(a)*cos(a))/(0.8-
>  > cos(a)**2))-((pi)*4/9)
>
> I would use atan2(sin(a)*cos(a),0.8-cos(a)**2)-pi*4/9
>
> You might also want it in double precision.  Likely it won't
> come out exactly zero, but should be close if a is close
> to a solution.
>
> -- glen

Small typo there Glen (and biy, do I make them with this small type
face). Should be
atan2(sin(a)*cos(a)/0.8-cos(a)**2)-pi*4/9

And I would still prefer seeing that 4/9 as 4.0/9.0 !
no comments
diggit! del.icio.us! reddit!