Cube root results in integer only...



Hi newsgroup,

I'm using a fortran compiler within Aspen Plus 2006.5 - sorry but I
don't really know which Fortran this software uses...

When I try to receive a cube root from this statement:

PI = ACOS(-1)
MM = PI ** (1./3.)

I always get MM = 1 instead of the result I wanted (1.46459...)

Does anyone know why this might be the reason? It seems like the
statement is somehow truncated, as for a real number such as 1.6995
the result is also shown as 1, whereas for 2.5865 it is shown as 2
etc...

Thanks a lot and best regards,

Christopher
.



Relevant Pages

  • Re: Cube root results in integer only...
    ... I'm using a fortran compiler within Aspen Plus 2006.5 - sorry but I ... When I try to receive a cube root from this statement: ... they're at the intersecition of the unit circle and an equilateral triangle ...
    (comp.lang.fortran)
  • Re: Cube root results in integer only...
    ... I'm using a fortran compiler within Aspen Plus 2006.5 - sorry but I ... you also have an incorrect argument type for the ACOS function. ... Some compilers may forgive this mistake, ...
    (comp.lang.fortran)
  • Re: Poor performance
    ... not fortran compiler As far as I know about fortran, end statements need to designate the end of program. ... Matlab do not need those command mendatory. ... There is no reason why an 'if' or 'for' could not be used, if that made the calculations easier. ...
    (comp.soft-sys.matlab)
  • Re: Poor performance
    ... > I thinks the reason why ode functions do not use end statements. ... not fortran compiler As far as I know about fortran, end statements> need to designate the end of program. ... But that is not a reason to _not_ use a final 'end' statement, especially since Matlab can do better optimization if you put the final 'end' statement in. ... There is no reason why an 'if' or 'for' could not be used, if that made the calculations easier. ...
    (comp.soft-sys.matlab)
  • Re: Lahey FORTRAN for DOS
    ... The only reason I still use DOS ... I want the FORTRAN compiler for. ... It doesn't really replace a laptop ...
    (comp.lang.fortran)