Hello,

> This behavior was shown in ruby ree 1.8.6, 1.8.6, 1.8.7, 1.9.1
>
> -27**1/3.0 =A0 =A0 =A0 =3D> -9.0
> -27 ** 1/3.0 =A0 =A0 =3D> -9.0
> -27 ** (1/3.0) =A0 =3D> -3.0
> -27**(1/3.0) =A0 =A0 =3D> -3.0
> (-27)**(1/3.0) =A0 =3D> NaN
> (-27) ** (1/3.0) =3D> NaN
>
> OK, the first two expression are evaluated as (-27**1)/3 =3D> -9
> The second two are correct (what I expected).
> But the last two, WHY??

As Matz said, the second two are evaluated as - (27**(1/3.0)), that is
you take the cubic root of +27 which is 3 and then distribute the
minus.
That way, you take the cubic root of a positive number which does not
raise any problem.

Cheers,

--=20
JJ Fleck
PCSI1 Lyc=E9e Kl=E9ber