Hi, using @code_typed in the code below, shows that julia checks for the sign of a number X when raised to the power of a real number (pow function). is it possible to avoid this if X is positive X=abs(…)?
code:
cTime+(abs(q[i]/df))^(1/3)
@code_typed:
%25 = Base.abs_float(%24)::Float64
│ %26 = $(Expr(:foreigncall, "llvm.pow.f64", Float64, svec(Float64, Float64), 0, :(:llvmcall), :(%25), 0.3333333333333333, 0.3333333333333333, :(%25)))::Float64
│ %27 = Base.ne_float(%26, %26)::Bool
│ %28 = Base.add_float(%25, 0.3333333333333333)::Float64
│ %29 = Base.ne_float(%28, %28)::Bool
│ %30 = Base.not_int(%29)::Bool
│ %31 = Base.and_int(%27, %30)::Bool
└─── goto #7 if not %31
6 ── invoke Base.Math.throw_exp_domainerror(%25::Float64)::Union{}
└─── unreachable
thanks