?

Average Error: 47.27% → 0.59%
Time: 26.5s
Precision: binary64

?

\[\sqrt{2 \cdot {x}^{2}} \]
\[\begin{array}{l} t_0 := \sqrt[3]{{16}^{0.125}}\\ \left|t_0 \cdot \left({t_0}^{2} \cdot x\right)\right| \end{array} \]
(FPCore (x) :precision binary64 (sqrt (* 2.0 (pow x 2.0))))
(FPCore (x)
 :precision binary64
 (let* ((t_0 (cbrt (pow 16.0 0.125)))) (fabs (* t_0 (* (pow t_0 2.0) x)))))
double code(double x) {
	return sqrt((2.0 * pow(x, 2.0)));
}
double code(double x) {
	double t_0 = cbrt(pow(16.0, 0.125));
	return fabs((t_0 * (pow(t_0, 2.0) * x)));
}
public static double code(double x) {
	return Math.sqrt((2.0 * Math.pow(x, 2.0)));
}
public static double code(double x) {
	double t_0 = Math.cbrt(Math.pow(16.0, 0.125));
	return Math.abs((t_0 * (Math.pow(t_0, 2.0) * x)));
}
function code(x)
	return sqrt(Float64(2.0 * (x ^ 2.0)))
end
function code(x)
	t_0 = cbrt((16.0 ^ 0.125))
	return abs(Float64(t_0 * Float64((t_0 ^ 2.0) * x)))
end
code[x_] := N[Sqrt[N[(2.0 * N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
code[x_] := Block[{t$95$0 = N[Power[N[Power[16.0, 0.125], $MachinePrecision], 1/3], $MachinePrecision]}, N[Abs[N[(t$95$0 * N[(N[Power[t$95$0, 2.0], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\sqrt{2 \cdot {x}^{2}}
\begin{array}{l}
t_0 := \sqrt[3]{{16}^{0.125}}\\
\left|t_0 \cdot \left({t_0}^{2} \cdot x\right)\right|
\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 47.27

    \[\sqrt{2 \cdot {x}^{2}} \]
  2. Simplified0.69

    \[\leadsto \color{blue}{\left|x \cdot \sqrt{2}\right|} \]
    Proof
  3. Applied egg-rr0.68

    \[\leadsto \left|\color{blue}{{4}^{0.125} \cdot \left({4}^{0.125} \cdot x\right)}\right| \]
  4. Taylor expanded in x around 0 0.87

    \[\leadsto \left|\color{blue}{{\left({4}^{0.125}\right)}^{2} \cdot x}\right| \]
  5. Applied egg-rr0.59

    \[\leadsto \left|\color{blue}{\sqrt[3]{{16}^{0.125}} \cdot \left({\left(\sqrt[3]{{16}^{0.125}}\right)}^{2} \cdot x\right)}\right| \]

Reproduce?

herbie shell --seed 2023136 
(FPCore (x)
  :name "sqrt D (should all be same)"
  :precision binary64
  (sqrt (* 2.0 (pow x 2.0))))