Average Error: 15.3 → 0.1
Time: 12.3s
Precision: binary64
Cost: 40196
\[1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)} \]
\[\begin{array}{l} t_0 := \frac{0.5}{\mathsf{hypot}\left(1, x\right)}\\ t_1 := 0.5 + t_0\\ \mathbf{if}\;\mathsf{hypot}\left(1, x\right) \leq 1.02:\\ \;\;\;\;0.125 \cdot {x}^{2} + \left(0.0673828125 \cdot {x}^{6} + \left(-0.056243896484375 \cdot {x}^{8} + -0.0859375 \cdot {x}^{4}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - {t_1}^{1.5}}{t_0 + \left(1 + \left(0.5 + \sqrt{t_1}\right)\right)}\\ \end{array} \]
(FPCore (x)
 :precision binary64
 (- 1.0 (sqrt (* 0.5 (+ 1.0 (/ 1.0 (hypot 1.0 x)))))))
(FPCore (x)
 :precision binary64
 (let* ((t_0 (/ 0.5 (hypot 1.0 x))) (t_1 (+ 0.5 t_0)))
   (if (<= (hypot 1.0 x) 1.02)
     (+
      (* 0.125 (pow x 2.0))
      (+
       (* 0.0673828125 (pow x 6.0))
       (+ (* -0.056243896484375 (pow x 8.0)) (* -0.0859375 (pow x 4.0)))))
     (/ (- 1.0 (pow t_1 1.5)) (+ t_0 (+ 1.0 (+ 0.5 (sqrt t_1))))))))
double code(double x) {
	return 1.0 - sqrt((0.5 * (1.0 + (1.0 / hypot(1.0, x)))));
}
double code(double x) {
	double t_0 = 0.5 / hypot(1.0, x);
	double t_1 = 0.5 + t_0;
	double tmp;
	if (hypot(1.0, x) <= 1.02) {
		tmp = (0.125 * pow(x, 2.0)) + ((0.0673828125 * pow(x, 6.0)) + ((-0.056243896484375 * pow(x, 8.0)) + (-0.0859375 * pow(x, 4.0))));
	} else {
		tmp = (1.0 - pow(t_1, 1.5)) / (t_0 + (1.0 + (0.5 + sqrt(t_1))));
	}
	return tmp;
}
public static double code(double x) {
	return 1.0 - Math.sqrt((0.5 * (1.0 + (1.0 / Math.hypot(1.0, x)))));
}
public static double code(double x) {
	double t_0 = 0.5 / Math.hypot(1.0, x);
	double t_1 = 0.5 + t_0;
	double tmp;
	if (Math.hypot(1.0, x) <= 1.02) {
		tmp = (0.125 * Math.pow(x, 2.0)) + ((0.0673828125 * Math.pow(x, 6.0)) + ((-0.056243896484375 * Math.pow(x, 8.0)) + (-0.0859375 * Math.pow(x, 4.0))));
	} else {
		tmp = (1.0 - Math.pow(t_1, 1.5)) / (t_0 + (1.0 + (0.5 + Math.sqrt(t_1))));
	}
	return tmp;
}
def code(x):
	return 1.0 - math.sqrt((0.5 * (1.0 + (1.0 / math.hypot(1.0, x)))))
def code(x):
	t_0 = 0.5 / math.hypot(1.0, x)
	t_1 = 0.5 + t_0
	tmp = 0
	if math.hypot(1.0, x) <= 1.02:
		tmp = (0.125 * math.pow(x, 2.0)) + ((0.0673828125 * math.pow(x, 6.0)) + ((-0.056243896484375 * math.pow(x, 8.0)) + (-0.0859375 * math.pow(x, 4.0))))
	else:
		tmp = (1.0 - math.pow(t_1, 1.5)) / (t_0 + (1.0 + (0.5 + math.sqrt(t_1))))
	return tmp
function code(x)
	return Float64(1.0 - sqrt(Float64(0.5 * Float64(1.0 + Float64(1.0 / hypot(1.0, x))))))
end
function code(x)
	t_0 = Float64(0.5 / hypot(1.0, x))
	t_1 = Float64(0.5 + t_0)
	tmp = 0.0
	if (hypot(1.0, x) <= 1.02)
		tmp = Float64(Float64(0.125 * (x ^ 2.0)) + Float64(Float64(0.0673828125 * (x ^ 6.0)) + Float64(Float64(-0.056243896484375 * (x ^ 8.0)) + Float64(-0.0859375 * (x ^ 4.0)))));
	else
		tmp = Float64(Float64(1.0 - (t_1 ^ 1.5)) / Float64(t_0 + Float64(1.0 + Float64(0.5 + sqrt(t_1)))));
	end
	return tmp
end
function tmp = code(x)
	tmp = 1.0 - sqrt((0.5 * (1.0 + (1.0 / hypot(1.0, x)))));
end
function tmp_2 = code(x)
	t_0 = 0.5 / hypot(1.0, x);
	t_1 = 0.5 + t_0;
	tmp = 0.0;
	if (hypot(1.0, x) <= 1.02)
		tmp = (0.125 * (x ^ 2.0)) + ((0.0673828125 * (x ^ 6.0)) + ((-0.056243896484375 * (x ^ 8.0)) + (-0.0859375 * (x ^ 4.0))));
	else
		tmp = (1.0 - (t_1 ^ 1.5)) / (t_0 + (1.0 + (0.5 + sqrt(t_1))));
	end
	tmp_2 = tmp;
end
code[x_] := N[(1.0 - N[Sqrt[N[(0.5 * N[(1.0 + N[(1.0 / N[Sqrt[1.0 ^ 2 + x ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
code[x_] := Block[{t$95$0 = N[(0.5 / N[Sqrt[1.0 ^ 2 + x ^ 2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 + t$95$0), $MachinePrecision]}, If[LessEqual[N[Sqrt[1.0 ^ 2 + x ^ 2], $MachinePrecision], 1.02], N[(N[(0.125 * N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(0.0673828125 * N[Power[x, 6.0], $MachinePrecision]), $MachinePrecision] + N[(N[(-0.056243896484375 * N[Power[x, 8.0], $MachinePrecision]), $MachinePrecision] + N[(-0.0859375 * N[Power[x, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[Power[t$95$1, 1.5], $MachinePrecision]), $MachinePrecision] / N[(t$95$0 + N[(1.0 + N[(0.5 + N[Sqrt[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}
\begin{array}{l}
t_0 := \frac{0.5}{\mathsf{hypot}\left(1, x\right)}\\
t_1 := 0.5 + t_0\\
\mathbf{if}\;\mathsf{hypot}\left(1, x\right) \leq 1.02:\\
\;\;\;\;0.125 \cdot {x}^{2} + \left(0.0673828125 \cdot {x}^{6} + \left(-0.056243896484375 \cdot {x}^{8} + -0.0859375 \cdot {x}^{4}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{1 - {t_1}^{1.5}}{t_0 + \left(1 + \left(0.5 + \sqrt{t_1}\right)\right)}\\


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if (hypot.f64 1 x) < 1.02

    1. Initial program 29.6

      \[1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)} \]
    2. Simplified29.6

      \[\leadsto \color{blue}{1 - \sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}} \]
      Proof
      (-.f64 1 (sqrt.f64 (+.f64 1/2 (/.f64 1/2 (hypot.f64 1 x))))): 0 points increase in error, 0 points decrease in error
      (-.f64 1 (sqrt.f64 (+.f64 (Rewrite<= metadata-eval (*.f64 1 1/2)) (/.f64 1/2 (hypot.f64 1 x))))): 0 points increase in error, 0 points decrease in error
      (-.f64 1 (sqrt.f64 (+.f64 (*.f64 1 1/2) (/.f64 (Rewrite<= metadata-eval (*.f64 1 1/2)) (hypot.f64 1 x))))): 0 points increase in error, 0 points decrease in error
      (-.f64 1 (sqrt.f64 (+.f64 (*.f64 1 1/2) (Rewrite<= associate-*l/_binary64 (*.f64 (/.f64 1 (hypot.f64 1 x)) 1/2))))): 0 points increase in error, 0 points decrease in error
      (-.f64 1 (sqrt.f64 (Rewrite<= distribute-rgt-in_binary64 (*.f64 1/2 (+.f64 1 (/.f64 1 (hypot.f64 1 x))))))): 0 points increase in error, 0 points decrease in error
    3. Taylor expanded in x around 0 0.1

      \[\leadsto \color{blue}{0.125 \cdot {x}^{2} + \left(0.0673828125 \cdot {x}^{6} + \left(-0.056243896484375 \cdot {x}^{8} + -0.0859375 \cdot {x}^{4}\right)\right)} \]

    if 1.02 < (hypot.f64 1 x)

    1. Initial program 1.0

      \[1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)} \]
    2. Simplified1.0

      \[\leadsto \color{blue}{1 - \sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}} \]
      Proof
      (-.f64 1 (sqrt.f64 (+.f64 1/2 (/.f64 1/2 (hypot.f64 1 x))))): 0 points increase in error, 0 points decrease in error
      (-.f64 1 (sqrt.f64 (+.f64 (Rewrite<= metadata-eval (*.f64 1 1/2)) (/.f64 1/2 (hypot.f64 1 x))))): 0 points increase in error, 0 points decrease in error
      (-.f64 1 (sqrt.f64 (+.f64 (*.f64 1 1/2) (/.f64 (Rewrite<= metadata-eval (*.f64 1 1/2)) (hypot.f64 1 x))))): 0 points increase in error, 0 points decrease in error
      (-.f64 1 (sqrt.f64 (+.f64 (*.f64 1 1/2) (Rewrite<= associate-*l/_binary64 (*.f64 (/.f64 1 (hypot.f64 1 x)) 1/2))))): 0 points increase in error, 0 points decrease in error
      (-.f64 1 (sqrt.f64 (Rewrite<= distribute-rgt-in_binary64 (*.f64 1/2 (+.f64 1 (/.f64 1 (hypot.f64 1 x))))))): 0 points increase in error, 0 points decrease in error
    3. Applied egg-rr1.0

      \[\leadsto \color{blue}{\left(1 - {\left(0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}\right)}^{1.5}\right) \cdot \frac{1}{1 + \left(\frac{0.5}{\mathsf{hypot}\left(1, x\right)} + \left(0.5 + \sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}\right)\right)}} \]
    4. Simplified0.0

      \[\leadsto \color{blue}{\frac{1 - {\left(0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}\right)}^{1.5}}{\frac{0.5}{\mathsf{hypot}\left(1, x\right)} + \left(\left(0.5 + \sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}\right) + 1\right)}} \]
      Proof
      (/.f64 (-.f64 1 (pow.f64 (+.f64 1/2 (/.f64 1/2 (hypot.f64 1 x))) 3/2)) (+.f64 (/.f64 1/2 (hypot.f64 1 x)) (+.f64 (+.f64 1/2 (sqrt.f64 (+.f64 1/2 (/.f64 1/2 (hypot.f64 1 x))))) 1))): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= *-rgt-identity_binary64 (*.f64 (-.f64 1 (pow.f64 (+.f64 1/2 (/.f64 1/2 (hypot.f64 1 x))) 3/2)) 1)) (+.f64 (/.f64 1/2 (hypot.f64 1 x)) (+.f64 (+.f64 1/2 (sqrt.f64 (+.f64 1/2 (/.f64 1/2 (hypot.f64 1 x))))) 1))): 0 points increase in error, 0 points decrease in error
      (/.f64 (*.f64 (-.f64 1 (pow.f64 (+.f64 1/2 (/.f64 1/2 (hypot.f64 1 x))) 3/2)) 1) (Rewrite<= associate-+l+_binary64 (+.f64 (+.f64 (/.f64 1/2 (hypot.f64 1 x)) (+.f64 1/2 (sqrt.f64 (+.f64 1/2 (/.f64 1/2 (hypot.f64 1 x)))))) 1))): 1 points increase in error, 0 points decrease in error
      (/.f64 (*.f64 (-.f64 1 (pow.f64 (+.f64 1/2 (/.f64 1/2 (hypot.f64 1 x))) 3/2)) 1) (Rewrite<= +-commutative_binary64 (+.f64 1 (+.f64 (/.f64 1/2 (hypot.f64 1 x)) (+.f64 1/2 (sqrt.f64 (+.f64 1/2 (/.f64 1/2 (hypot.f64 1 x))))))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-*r/_binary64 (*.f64 (-.f64 1 (pow.f64 (+.f64 1/2 (/.f64 1/2 (hypot.f64 1 x))) 3/2)) (/.f64 1 (+.f64 1 (+.f64 (/.f64 1/2 (hypot.f64 1 x)) (+.f64 1/2 (sqrt.f64 (+.f64 1/2 (/.f64 1/2 (hypot.f64 1 x)))))))))): 117 points increase in error, 0 points decrease in error
  3. Recombined 2 regimes into one program.
  4. Final simplification0.1

    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{hypot}\left(1, x\right) \leq 1.02:\\ \;\;\;\;0.125 \cdot {x}^{2} + \left(0.0673828125 \cdot {x}^{6} + \left(-0.056243896484375 \cdot {x}^{8} + -0.0859375 \cdot {x}^{4}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - {\left(0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}\right)}^{1.5}}{\frac{0.5}{\mathsf{hypot}\left(1, x\right)} + \left(1 + \left(0.5 + \sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}\right)\right)}\\ \end{array} \]

Alternatives

Alternative 1
Error0.1
Cost33412
\[\begin{array}{l} t_0 := 0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}\\ \mathbf{if}\;\mathsf{hypot}\left(1, x\right) \leq 1.02:\\ \;\;\;\;0.125 \cdot {x}^{2} + \left(0.0673828125 \cdot {x}^{6} + \left(-0.056243896484375 \cdot {x}^{8} + -0.0859375 \cdot {x}^{4}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{0.25 + \frac{-0.25}{1 + x \cdot x}}{t_0}}{1 + \sqrt{t_0}}\\ \end{array} \]
Alternative 2
Error0.0
Cost27524
\[\begin{array}{l} t_0 := 0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}\\ \mathbf{if}\;\frac{1}{\mathsf{hypot}\left(1, x\right)} \leq 0.99995:\\ \;\;\;\;\frac{\frac{0.25 + \frac{-0.25}{1 + x \cdot x}}{t_0}}{1 + \sqrt{t_0}}\\ \mathbf{else}:\\ \;\;\;\;0.125 \cdot {x}^{2} + \left(0.0673828125 \cdot {x}^{6} + -0.0859375 \cdot {x}^{4}\right)\\ \end{array} \]
Alternative 3
Error0.0
Cost26756
\[\begin{array}{l} \mathbf{if}\;\mathsf{hypot}\left(1, x\right) \leq 1.00005:\\ \;\;\;\;0.125 \cdot {x}^{2} + \left(0.0673828125 \cdot {x}^{6} + -0.0859375 \cdot {x}^{4}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5 + \frac{-0.5}{\mathsf{hypot}\left(1, x\right)}}{1 + \sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}}\\ \end{array} \]
Alternative 4
Error0.5
Cost20360
\[\begin{array}{l} \mathbf{if}\;x \leq -0.72:\\ \;\;\;\;\frac{0.5 + \frac{-0.5}{\mathsf{hypot}\left(1, x\right)}}{1 + \sqrt{0.5 - \frac{0.5}{x}}}\\ \mathbf{elif}\;x \leq 0.013:\\ \;\;\;\;0.125 \cdot {x}^{2} + \left(0.0673828125 \cdot {x}^{6} + -0.0859375 \cdot {x}^{4}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{1}{1 - \sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}}}\\ \end{array} \]
Alternative 5
Error0.7
Cost13832
\[\begin{array}{l} \mathbf{if}\;x \leq -1.1:\\ \;\;\;\;\frac{0.5}{1 + \sqrt{0.5}}\\ \mathbf{elif}\;x \leq 0.0024:\\ \;\;\;\;\mathsf{fma}\left(0.125, x \cdot x, -0.0859375 \cdot {x}^{4}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{1}{1 - \sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}}}\\ \end{array} \]
Alternative 6
Error0.7
Cost13832
\[\begin{array}{l} \mathbf{if}\;x \leq -1:\\ \;\;\;\;\frac{0.5 + \frac{-0.5}{\mathsf{hypot}\left(1, x\right)}}{1 + \sqrt{0.5 + \frac{0.5}{x}}}\\ \mathbf{elif}\;x \leq 0.0024:\\ \;\;\;\;\mathsf{fma}\left(0.125, x \cdot x, -0.0859375 \cdot {x}^{4}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{1}{1 - \sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}}}\\ \end{array} \]
Alternative 7
Error0.5
Cost13832
\[\begin{array}{l} \mathbf{if}\;x \leq -0.62:\\ \;\;\;\;\frac{0.5 + \frac{-0.5}{\mathsf{hypot}\left(1, x\right)}}{1 + \sqrt{0.5 - \frac{0.5}{x}}}\\ \mathbf{elif}\;x \leq 0.0024:\\ \;\;\;\;\mathsf{fma}\left(0.125, x \cdot x, -0.0859375 \cdot {x}^{4}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{1}{1 - \sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}}}\\ \end{array} \]
Alternative 8
Error1.0
Cost13576
\[\begin{array}{l} \mathbf{if}\;x \leq -2.3:\\ \;\;\;\;\frac{0.5}{1 + \sqrt{0.5}}\\ \mathbf{elif}\;x \leq 0.038:\\ \;\;\;\;\frac{1}{\frac{8}{x \cdot x} + \left(5.5 + \left({x}^{4} \cdot 0.26953125 + x \cdot \left(x \cdot -0.53125\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;1 - \sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}\\ \end{array} \]
Alternative 9
Error0.7
Cost13576
\[\begin{array}{l} \mathbf{if}\;x \leq -1.1:\\ \;\;\;\;\frac{0.5}{1 + \sqrt{0.5}}\\ \mathbf{elif}\;x \leq 0.0024:\\ \;\;\;\;\mathsf{fma}\left(0.125, x \cdot x, -0.0859375 \cdot {x}^{4}\right)\\ \mathbf{else}:\\ \;\;\;\;1 - \sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}\\ \end{array} \]
Alternative 10
Error0.9
Cost8136
\[\begin{array}{l} t_0 := 0.5 + \frac{0.5}{x}\\ \mathbf{if}\;x \leq -2.3:\\ \;\;\;\;\frac{0.5}{1 + \sqrt{0.5}}\\ \mathbf{elif}\;x \leq 1.75:\\ \;\;\;\;\frac{1}{\frac{8}{x \cdot x} + \left(5.5 + \left({x}^{4} \cdot 0.26953125 + x \cdot \left(x \cdot -0.53125\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{t_0 \cdot \left(1 + \sqrt{t_0}\right)}{0.25 + \frac{-0.25}{x \cdot x}}}\\ \end{array} \]
Alternative 11
Error0.9
Cost7944
\[\begin{array}{l} \mathbf{if}\;x \leq -2.3:\\ \;\;\;\;\frac{0.5}{1 + \sqrt{0.5}}\\ \mathbf{elif}\;x \leq 1.75:\\ \;\;\;\;\frac{1}{\frac{8}{x \cdot x} + \left(5.5 + \left({x}^{4} \cdot 0.26953125 + x \cdot \left(x \cdot -0.53125\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{1 + \sqrt{0.5 + \frac{0.5}{x}}}{0.5 - \frac{0.5}{x}}}\\ \end{array} \]
Alternative 12
Error0.9
Cost7624
\[\begin{array}{l} \mathbf{if}\;x \leq -2.5:\\ \;\;\;\;\frac{0.5}{1 + \sqrt{0.5}}\\ \mathbf{elif}\;x \leq 1.85:\\ \;\;\;\;\frac{1}{5.5 + \left(\frac{8}{x \cdot x} + \left(x \cdot x\right) \cdot -0.53125\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{1 + \sqrt{0.5 + \frac{0.5}{x}}}{0.5 - \frac{0.5}{x}}}\\ \end{array} \]
Alternative 13
Error1.2
Cost7112
\[\begin{array}{l} \mathbf{if}\;x \leq -2.5:\\ \;\;\;\;\frac{0.5}{1 + \sqrt{0.5}}\\ \mathbf{elif}\;x \leq 1.85:\\ \;\;\;\;\frac{1}{5.5 + \left(\frac{8}{x \cdot x} + \left(x \cdot x\right) \cdot -0.53125\right)}\\ \mathbf{else}:\\ \;\;\;\;1 - \sqrt{0.5 + \frac{0.5}{x}}\\ \end{array} \]
Alternative 14
Error1.2
Cost6984
\[\begin{array}{l} t_0 := \frac{0.5}{1 + \sqrt{0.5}}\\ \mathbf{if}\;x \leq -2.5:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 2.5:\\ \;\;\;\;\frac{1}{5.5 + \left(\frac{8}{x \cdot x} + \left(x \cdot x\right) \cdot -0.53125\right)}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 15
Error1.6
Cost6856
\[\begin{array}{l} t_0 := 1 - \sqrt{0.5}\\ \mathbf{if}\;x \leq -2.5:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 2.5:\\ \;\;\;\;\frac{1}{5.5 + \left(\frac{8}{x \cdot x} + \left(x \cdot x\right) \cdot -0.53125\right)}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 16
Error26.2
Cost576
\[\frac{1}{\frac{8}{x \cdot x} + 5.5} \]
Alternative 17
Error31.4
Cost320
\[0.125 \cdot \left(x \cdot x\right) \]

Error

Reproduce

herbie shell --seed 2022330 
(FPCore (x)
  :name "Given's Rotation SVD example, simplified"
  :precision binary64
  (- 1.0 (sqrt (* 0.5 (+ 1.0 (/ 1.0 (hypot 1.0 x)))))))