(FPCore (x) :precision binary64 (sqrt (* 2.0 (pow x 2.0))))
(FPCore (x) :precision binary64 (fabs (* (pow 2.0 0.25) (* (pow 2.0 0.25) x))))
double code(double x) {
return sqrt((2.0 * pow(x, 2.0)));
}
double code(double x) {
return fabs((pow(2.0, 0.25) * (pow(2.0, 0.25) * x)));
}
real(8) function code(x)
real(8), intent (in) :: x
code = sqrt((2.0d0 * (x ** 2.0d0)))
end function
real(8) function code(x)
real(8), intent (in) :: x
code = abs(((2.0d0 ** 0.25d0) * ((2.0d0 ** 0.25d0) * x)))
end function
public static double code(double x) {
return Math.sqrt((2.0 * Math.pow(x, 2.0)));
}
public static double code(double x) {
return Math.abs((Math.pow(2.0, 0.25) * (Math.pow(2.0, 0.25) * x)));
}
def code(x): return math.sqrt((2.0 * math.pow(x, 2.0)))
def code(x): return math.fabs((math.pow(2.0, 0.25) * (math.pow(2.0, 0.25) * x)))
function code(x) return sqrt(Float64(2.0 * (x ^ 2.0))) end
function code(x) return abs(Float64((2.0 ^ 0.25) * Float64((2.0 ^ 0.25) * x))) end
function tmp = code(x) tmp = sqrt((2.0 * (x ^ 2.0))); end
function tmp = code(x) tmp = abs(((2.0 ^ 0.25) * ((2.0 ^ 0.25) * x))); end
code[x_] := N[Sqrt[N[(2.0 * N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
code[x_] := N[Abs[N[(N[Power[2.0, 0.25], $MachinePrecision] * N[(N[Power[2.0, 0.25], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\sqrt{2 \cdot {x}^{2}}
\left|{2}^{0.25} \cdot \left({2}^{0.25} \cdot x\right)\right|
Results
Initial program 30.5
Applied egg-rr0.4
Applied egg-rr1.4
Applied egg-rr0.4
Final simplification0.4
herbie shell --seed 2022210
(FPCore (x)
:name "sqrt D"
:precision binary64
(sqrt (* 2.0 (pow x 2.0))))