[Bug fortran/38823] Diagnose and treat (-2.0)**2.0 properly

dominiq at lps dot ens dot fr gcc-bugzilla@gcc.gnu.org
Tue Jan 13 11:37:00 GMT 2009



------- Comment #3 from dominiq at lps dot ens dot fr  2009-01-13 11:37 -------
> - Mathematica:
>   -2^2 = 4, -2.0^2.0 = -4.0
>   2.0^1.9 = -3.73213      <------- probably -2.0^1.9!

Apparently Mathematica parse "-2.0^a" as "-(2.0^a)". (-2.0)^1.9 gives "3.54947-
1.15329 I". I don't know if the fortran standard says how "-a**b" should be
parsed (nor have the time right now to decipher the legalese).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38823



More information about the Gcc-bugs mailing list