Hi Julia community,
I am a new Julia user. Like what I see till now but with sometimes its head twisting.
For example today I saw something and I wanted to know the difference between
(-(0.5/1))^1.5
vs
-(0.5/1)^1.5
First one gives me error:
ERROR: DomainError with -0.5:
Exponentiation yielding a complex result requires a complex argument.
Replace x^y with (x+0im)^y, Complex(x)^y, or similar.
Stacktrace:
[1] throw_exp_domainerror(::Float64) at .\math.jl:37
[2] ^(::Float64, ::Float64) at .\math.jl:872
[3] top-level scope at REPL[9]:1
and the second code gives me answer: -0.35355339059327373
I was wondering what I am doing wrong in the first example of (-(0.5/1))^1.5
that its expecting a complex number?