On May 5, 12:55Â pm, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote: On Apr 7, 3:36 pm, Leonardo Marques <surf...@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...
On Apr 7, 3:36 pm, Leonardo Marques <surf...@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
...8b90-74cbef524878@u3g2000hsc.googlegroups.com... hey guys, im with a little problem when im transcripting a math formula from maple to fortran, because when i put a solution on the equation, i got a result diferent from zero. The formula is: 2*arctan(sin(a)*cos(a)/(.8-cos(a)^2))-4/9*Pi ; I've transcripted to fortran as: 2*atan((sin(a)*cos(a))/(0.8- ...
... folding and 2) you can prove the sequence of code in question is a bottleneck of your program. Other than that, legibility and correctness are more important. I think I agree. Those who need the speed should use the compiler optimization options, and the compilers should then do it. I doubt many check the generated code even when it is known to have bottlenecks. -- glen
... Marques <surf...@gmail.com> wrote: hey guys, im with a little problem when im transcripting a math formula from maple to fortran, because when i put a solution on the equation, i got a result diferent from zero. The formula is: 2*arctan(sin(a)*cos(a)/(.8-cos(a)^2))-4/9*Pi ; I've transcripted to fortran as: 2*atan((sin(a)*cos(a))/(0.8- cos(...
... Marques <surf3r0@gmail.com> said: hey guys, im with a little problem when im transcripting a math formula from maple to fortran, because when i put a solution on the equation, i got a result diferent from zero. The formula is: 2*arctan(sin(a)*cos(a)/(.8-cos(a)^2))-4/9*Pi ; I've transcripted to fortran as: 2*atan((sin(a)*cos(a))/(0.8- cos...
...@u3g2000hsc.googlegroups.com... hey guys, im with a little problem when im transcripting a math formula from maple to fortran, because when i put a solution on the equation, i got a result diferent from zero. The formula is: 2*arctan(sin(a)*cos(a)/(.8-cos(a)^2))-4/9*Pi ; I've transcripted to fortran as: 2*atan((sin(a)*cos(a))/(0.8- ...
...@u3g2000hsc.googlegroups.com... hey guys, im with a little problem when im transcripting a math formula from maple to fortran, because when i put a solution on the equation, i got a result diferent from zero. The formula is: 2*arctan(sin(a)*cos(a)/(.8-cos(a)^2))-4/9*Pi ; I've transcripted to fortran as: 2*atan((sin(a)*cos(a))/(0.8- ...
...8b90-74cbef524878@u3g2000hsc.googlegroups.com... hey guys, im with a little problem when im transcripting a math formula from maple to fortran, because when i put a solution on the equation, i got a result diferent from zero. The formula is: 2*arctan(sin(a)*cos(a)/(.8-cos(a)^2))-4/9*Pi ; I've transcripted to fortran as: 2*atan((sin(a)*cos(a))/(0.8- ...
hey guys, im with a little problem when im transcripting a math formula from maple to fortran, because when i put a solution on the equation, i got a result diferent from zero. The formula is: 2*arctan(sin(a)*cos(a)/(.8-cos(a)^2))-4/9*Pi ; I've transcripted to fortran as: 2*atan((sin(a)*cos(a))/(0.8- cos(a)**2))-((pi)*4/9) There's correct?! a piece of my code:...