?

Average Error: 15.5 → 0.0
Time: 43.0s
Precision: binary64
Cost: 33668

?

\[1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)} \]
\[\begin{array}{l} t_0 := \frac{\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}}{-2}\\ t_1 := t_0 + 1\\ \mathbf{if}\;x \leq -0.0305:\\ \;\;\;\;\frac{\sqrt{\frac{0.25}{\mathsf{hypot}\left(1, x\right)} - \left(-0.5 + \frac{-0.25}{\mathsf{hypot}\left(1, x\right)}\right)}}{-2} + t_1\\ \mathbf{elif}\;x \leq 0.03:\\ \;\;\;\;\left(-0.0859375 \cdot {x}^{4} + -0.056243896484375 \cdot {x}^{8}\right) + \left(0.125 \cdot {x}^{2} + 0.0673828125 \cdot {x}^{6}\right)\\ \mathbf{else}:\\ \;\;\;\;t_0 + t_1\\ \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 (/ (sqrt (+ 0.5 (/ 0.5 (hypot 1.0 x)))) -2.0)) (t_1 (+ t_0 1.0)))
   (if (<= x -0.0305)
     (+
      (/
       (sqrt (- (/ 0.25 (hypot 1.0 x)) (+ -0.5 (/ -0.25 (hypot 1.0 x)))))
       -2.0)
      t_1)
     (if (<= x 0.03)
       (+
        (+ (* -0.0859375 (pow x 4.0)) (* -0.056243896484375 (pow x 8.0)))
        (+ (* 0.125 (pow x 2.0)) (* 0.0673828125 (pow x 6.0))))
       (+ t_0 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 = sqrt((0.5 + (0.5 / hypot(1.0, x)))) / -2.0;
	double t_1 = t_0 + 1.0;
	double tmp;
	if (x <= -0.0305) {
		tmp = (sqrt(((0.25 / hypot(1.0, x)) - (-0.5 + (-0.25 / hypot(1.0, x))))) / -2.0) + t_1;
	} else if (x <= 0.03) {
		tmp = ((-0.0859375 * pow(x, 4.0)) + (-0.056243896484375 * pow(x, 8.0))) + ((0.125 * pow(x, 2.0)) + (0.0673828125 * pow(x, 6.0)));
	} else {
		tmp = t_0 + 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 = Math.sqrt((0.5 + (0.5 / Math.hypot(1.0, x)))) / -2.0;
	double t_1 = t_0 + 1.0;
	double tmp;
	if (x <= -0.0305) {
		tmp = (Math.sqrt(((0.25 / Math.hypot(1.0, x)) - (-0.5 + (-0.25 / Math.hypot(1.0, x))))) / -2.0) + t_1;
	} else if (x <= 0.03) {
		tmp = ((-0.0859375 * Math.pow(x, 4.0)) + (-0.056243896484375 * Math.pow(x, 8.0))) + ((0.125 * Math.pow(x, 2.0)) + (0.0673828125 * Math.pow(x, 6.0)));
	} else {
		tmp = t_0 + 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 = math.sqrt((0.5 + (0.5 / math.hypot(1.0, x)))) / -2.0
	t_1 = t_0 + 1.0
	tmp = 0
	if x <= -0.0305:
		tmp = (math.sqrt(((0.25 / math.hypot(1.0, x)) - (-0.5 + (-0.25 / math.hypot(1.0, x))))) / -2.0) + t_1
	elif x <= 0.03:
		tmp = ((-0.0859375 * math.pow(x, 4.0)) + (-0.056243896484375 * math.pow(x, 8.0))) + ((0.125 * math.pow(x, 2.0)) + (0.0673828125 * math.pow(x, 6.0)))
	else:
		tmp = t_0 + 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(sqrt(Float64(0.5 + Float64(0.5 / hypot(1.0, x)))) / -2.0)
	t_1 = Float64(t_0 + 1.0)
	tmp = 0.0
	if (x <= -0.0305)
		tmp = Float64(Float64(sqrt(Float64(Float64(0.25 / hypot(1.0, x)) - Float64(-0.5 + Float64(-0.25 / hypot(1.0, x))))) / -2.0) + t_1);
	elseif (x <= 0.03)
		tmp = Float64(Float64(Float64(-0.0859375 * (x ^ 4.0)) + Float64(-0.056243896484375 * (x ^ 8.0))) + Float64(Float64(0.125 * (x ^ 2.0)) + Float64(0.0673828125 * (x ^ 6.0))));
	else
		tmp = Float64(t_0 + 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 = sqrt((0.5 + (0.5 / hypot(1.0, x)))) / -2.0;
	t_1 = t_0 + 1.0;
	tmp = 0.0;
	if (x <= -0.0305)
		tmp = (sqrt(((0.25 / hypot(1.0, x)) - (-0.5 + (-0.25 / hypot(1.0, x))))) / -2.0) + t_1;
	elseif (x <= 0.03)
		tmp = ((-0.0859375 * (x ^ 4.0)) + (-0.056243896484375 * (x ^ 8.0))) + ((0.125 * (x ^ 2.0)) + (0.0673828125 * (x ^ 6.0)));
	else
		tmp = t_0 + 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[(N[Sqrt[N[(0.5 + N[(0.5 / N[Sqrt[1.0 ^ 2 + x ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / -2.0), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 + 1.0), $MachinePrecision]}, If[LessEqual[x, -0.0305], N[(N[(N[Sqrt[N[(N[(0.25 / N[Sqrt[1.0 ^ 2 + x ^ 2], $MachinePrecision]), $MachinePrecision] - N[(-0.5 + N[(-0.25 / N[Sqrt[1.0 ^ 2 + x ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / -2.0), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 0.03], N[(N[(N[(-0.0859375 * N[Power[x, 4.0], $MachinePrecision]), $MachinePrecision] + N[(-0.056243896484375 * N[Power[x, 8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(0.125 * N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(0.0673828125 * N[Power[x, 6.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + t$95$1), $MachinePrecision]]]]]
1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}
\begin{array}{l}
t_0 := \frac{\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}}{-2}\\
t_1 := t_0 + 1\\
\mathbf{if}\;x \leq -0.0305:\\
\;\;\;\;\frac{\sqrt{\frac{0.25}{\mathsf{hypot}\left(1, x\right)} - \left(-0.5 + \frac{-0.25}{\mathsf{hypot}\left(1, x\right)}\right)}}{-2} + t_1\\

\mathbf{elif}\;x \leq 0.03:\\
\;\;\;\;\left(-0.0859375 \cdot {x}^{4} + -0.056243896484375 \cdot {x}^{8}\right) + \left(0.125 \cdot {x}^{2} + 0.0673828125 \cdot {x}^{6}\right)\\

\mathbf{else}:\\
\;\;\;\;t_0 + t_1\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 3 regimes
  2. if x < -0.030499999999999999

    1. Initial program 1.0

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

      \[\leadsto \color{blue}{\frac{\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}}{-2} + \left(\frac{\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}}{-2} + 1\right)} \]
    3. Applied egg-rr0.1

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

      \[\leadsto \frac{\sqrt{\color{blue}{\frac{0.25}{\mathsf{hypot}\left(1, x\right)} - \left(-0.5 + \frac{-0.25}{\mathsf{hypot}\left(1, x\right)}\right)}}}{-2} + \left(\frac{\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}}{-2} + 1\right) \]
      Proof

      [Start]0.1

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

      rational_best-simplify-51 [=>]0.1

      \[ \frac{\sqrt{\color{blue}{\frac{0.25}{\mathsf{hypot}\left(1, x\right)} - \left(-0.25 - \left(\frac{0.25}{\mathsf{hypot}\left(1, x\right)} + 0.25\right)\right)}}}{-2} + \left(\frac{\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}}{-2} + 1\right) \]

      rational_best-simplify-3 [=>]0.1

      \[ \frac{\sqrt{\frac{0.25}{\mathsf{hypot}\left(1, x\right)} - \left(-0.25 - \color{blue}{\left(0.25 + \frac{0.25}{\mathsf{hypot}\left(1, x\right)}\right)}\right)}}{-2} + \left(\frac{\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}}{-2} + 1\right) \]

      rational_best-simplify-57 [=>]0.1

      \[ \frac{\sqrt{\frac{0.25}{\mathsf{hypot}\left(1, x\right)} - \color{blue}{\left(\left(-0.25 - 0.25\right) + \left(-\frac{0.25}{\mathsf{hypot}\left(1, x\right)}\right)\right)}}}{-2} + \left(\frac{\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}}{-2} + 1\right) \]

      metadata-eval [=>]0.1

      \[ \frac{\sqrt{\frac{0.25}{\mathsf{hypot}\left(1, x\right)} - \left(\color{blue}{-0.5} + \left(-\frac{0.25}{\mathsf{hypot}\left(1, x\right)}\right)\right)}}{-2} + \left(\frac{\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}}{-2} + 1\right) \]

      rational_best-simplify-13 [=>]0.1

      \[ \frac{\sqrt{\frac{0.25}{\mathsf{hypot}\left(1, x\right)} - \left(-0.5 + \color{blue}{\frac{\frac{0.25}{\mathsf{hypot}\left(1, x\right)}}{-1}}\right)}}{-2} + \left(\frac{\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}}{-2} + 1\right) \]

      rational_best-simplify-49 [=>]0.1

      \[ \frac{\sqrt{\frac{0.25}{\mathsf{hypot}\left(1, x\right)} - \left(-0.5 + \color{blue}{\frac{\frac{0.25}{-1}}{\mathsf{hypot}\left(1, x\right)}}\right)}}{-2} + \left(\frac{\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}}{-2} + 1\right) \]

      metadata-eval [=>]0.1

      \[ \frac{\sqrt{\frac{0.25}{\mathsf{hypot}\left(1, x\right)} - \left(-0.5 + \frac{\color{blue}{-0.25}}{\mathsf{hypot}\left(1, x\right)}\right)}}{-2} + \left(\frac{\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}}{-2} + 1\right) \]

    if -0.030499999999999999 < x < 0.029999999999999999

    1. Initial program 29.5

      \[1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)} \]
    2. Applied egg-rr29.5

      \[\leadsto \color{blue}{\frac{\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}}{-2} + \left(\frac{\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}}{-2} + 1\right)} \]
    3. Taylor expanded in x around 0 0.0

      \[\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)} \]
    4. Simplified0.0

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

      [Start]0.0

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

      rational_best-simplify-47 [=>]0.0

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

      rational_best-simplify-3 [=>]0.0

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

      rational_best-simplify-3 [=>]0.0

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

    if 0.029999999999999999 < x

    1. Initial program 1.0

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

      \[\leadsto \color{blue}{\frac{\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}}{-2} + \left(\frac{\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}}{-2} + 1\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification0.0

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

Alternatives

Alternative 1
Error0.1
Cost40132
\[\begin{array}{l} \mathbf{if}\;\mathsf{hypot}\left(1, x\right) \leq 2:\\ \;\;\;\;\left(-0.0859375 \cdot {x}^{4} + -0.056243896484375 \cdot {x}^{8}\right) + \left(0.125 \cdot {x}^{2} + 0.0673828125 \cdot {x}^{6}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}}{-2} + \left(\frac{\sqrt{\frac{0.25}{\mathsf{hypot}\left(1, x\right)} - \left(-0.5 + \frac{-0.25}{\mathsf{hypot}\left(1, x\right)}\right)}}{-2} + 1\right)\\ \end{array} \]
Alternative 2
Error0.1
Cost33668
\[\begin{array}{l} \mathbf{if}\;\mathsf{hypot}\left(1, x\right) \leq 2:\\ \;\;\;\;\left(-0.0859375 \cdot {x}^{4} + -0.056243896484375 \cdot {x}^{8}\right) + \left(0.125 \cdot {x}^{2} + 0.0673828125 \cdot {x}^{6}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{\frac{0.5 + \left(0.5 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}{2}}}{-2} + \left(\frac{\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}}{-2} + 1\right)\\ \end{array} \]
Alternative 3
Error0.1
Cost33412
\[\begin{array}{l} t_0 := \frac{\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}}{-2}\\ \mathbf{if}\;\mathsf{hypot}\left(1, x\right) \leq 2:\\ \;\;\;\;\left(-0.0859375 \cdot {x}^{4} + -0.056243896484375 \cdot {x}^{8}\right) + \left(0.125 \cdot {x}^{2} + 0.0673828125 \cdot {x}^{6}\right)\\ \mathbf{else}:\\ \;\;\;\;t_0 + \left(t_0 + 1\right)\\ \end{array} \]
Alternative 4
Error0.4
Cost27080
\[\begin{array}{l} t_0 := \sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}\\ \mathbf{if}\;x \leq -0.031:\\ \;\;\;\;1 - t_0\\ \mathbf{elif}\;x \leq 1.02:\\ \;\;\;\;\left(-0.0859375 \cdot {x}^{4} + -0.056243896484375 \cdot {x}^{8}\right) + \left(0.125 \cdot {x}^{2} + 0.0673828125 \cdot {x}^{6}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t_0}{-2} + \left(\frac{\sqrt{0.5 + \frac{0.5}{x}}}{-2} + 1\right)\\ \end{array} \]
Alternative 5
Error0.4
Cost20616
\[\begin{array}{l} t_0 := \sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}\\ \mathbf{if}\;x \leq -0.012:\\ \;\;\;\;1 - t_0\\ \mathbf{elif}\;x \leq 1.05:\\ \;\;\;\;0.125 \cdot {x}^{2} + \left(0.0673828125 \cdot {x}^{6} + -0.0859375 \cdot {x}^{4}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t_0}{-2} + \left(\frac{\sqrt{0.5 + \frac{0.5}{x}}}{-2} + 1\right)\\ \end{array} \]
Alternative 6
Error0.4
Cost20360
\[\begin{array}{l} t_0 := \frac{\sqrt{0.5 + \frac{0.5}{x}}}{-2}\\ \mathbf{if}\;x \leq -0.012:\\ \;\;\;\;1 - \sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}\\ \mathbf{elif}\;x \leq 1.2:\\ \;\;\;\;0.125 \cdot {x}^{2} + \left(0.0673828125 \cdot {x}^{6} + -0.0859375 \cdot {x}^{4}\right)\\ \mathbf{else}:\\ \;\;\;\;t_0 + \left(t_0 + 1\right)\\ \end{array} \]
Alternative 7
Error0.5
Cost20100
\[\begin{array}{l} \mathbf{if}\;\frac{1}{\mathsf{hypot}\left(1, x\right)} \leq 0.999995:\\ \;\;\;\;1 - \sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}\\ \mathbf{else}:\\ \;\;\;\;0.125 \cdot {x}^{2} + -0.0859375 \cdot {x}^{4}\\ \end{array} \]
Alternative 8
Error0.8
Cost19908
\[\begin{array}{l} \mathbf{if}\;\mathsf{hypot}\left(1, x\right) \leq 1:\\ \;\;\;\;0.125 \cdot {x}^{2}\\ \mathbf{else}:\\ \;\;\;\;1 - \sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}\\ \end{array} \]
Alternative 9
Error0.5
Cost14152
\[\begin{array}{l} t_0 := \frac{\sqrt{0.5 + \frac{0.5}{x}}}{-2}\\ \mathbf{if}\;x \leq -0.0023:\\ \;\;\;\;1 - \sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}\\ \mathbf{elif}\;x \leq 1.1:\\ \;\;\;\;0.125 \cdot {x}^{2} + -0.0859375 \cdot {x}^{4}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \left(t_0 + 1\right)\\ \end{array} \]
Alternative 10
Error1.0
Cost7240
\[\begin{array}{l} \mathbf{if}\;x \leq -1.25:\\ \;\;\;\;1 - \sqrt{0.5 - \frac{0.5}{x}}\\ \mathbf{elif}\;x \leq 1.25:\\ \;\;\;\;0.125 \cdot {x}^{2}\\ \mathbf{else}:\\ \;\;\;\;\left(-1 - \sqrt{0.5 + \frac{0.5}{x}}\right) + 2\\ \end{array} \]
Alternative 11
Error1.2
Cost7112
\[\begin{array}{l} \mathbf{if}\;x \leq -1.55:\\ \;\;\;\;1 - \sqrt{0.5}\\ \mathbf{elif}\;x \leq 1.25:\\ \;\;\;\;0.125 \cdot {x}^{2}\\ \mathbf{else}:\\ \;\;\;\;1 - \sqrt{0.5 + \frac{0.5}{x}}\\ \end{array} \]
Alternative 12
Error1.0
Cost7112
\[\begin{array}{l} \mathbf{if}\;x \leq -1.25:\\ \;\;\;\;1 - \sqrt{0.5 - \frac{0.5}{x}}\\ \mathbf{elif}\;x \leq 1.25:\\ \;\;\;\;0.125 \cdot {x}^{2}\\ \mathbf{else}:\\ \;\;\;\;1 - \sqrt{0.5 + \frac{0.5}{x}}\\ \end{array} \]
Alternative 13
Error1.5
Cost6920
\[\begin{array}{l} t_0 := 1 - \sqrt{0.5}\\ \mathbf{if}\;x \leq -1.55:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 1.5:\\ \;\;\;\;0.125 \cdot {x}^{2}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 14
Error16.4
Cost6856
\[\begin{array}{l} t_0 := 1 - \sqrt{0.5}\\ \mathbf{if}\;x \leq -2.2 \cdot 10^{-77}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 2.15 \cdot 10^{-77}:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 15
Error45.8
Cost64
\[0 \]

Error

Reproduce?

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