Seems like the literal -0.4^2.5 should throw the same error, though?

On Thursday, September 18, 2014 6:42:56 AM UTC-5, Tim Holy wrote:
>
>
> http://docs.julialang.org/en/latest/manual/faq/#why-does-julia-give-a-domainerror-for-certain-seemingly-sensible-operations
>  
>
> On Thursday, September 18, 2014 03:24:00 AM Florian Oswald wrote: 
> > # define a variable gamma: 
> > 
> > gamma = 1.4 
> > mgamma = 1.0-gamma 
> > 
> > julia> mgamma 
> > -0.3999999999999999 
> > 
> > # this works: 
> > 
> > julia> -0.399999999999^2.5 
> > -0.10119288512475567 
> > 
> > # this doesn't: 
> > 
> > julia> mgamma^2.5 
> > ERROR: DomainError 
> > in ^ at math.jl:252 
>
>

Reply via email to