Average Error: 29.0 → 3.6
Time: 12.5s
Precision: binary64
Cost: 9224
\[\frac{\left(x \cdot x + y \cdot y\right) - z \cdot z}{y \cdot 2} \]
\[\begin{array}{l} t_0 := \frac{\left(x \cdot x + y \cdot y\right) - z \cdot z}{y \cdot 2}\\ \mathbf{if}\;t_0 \leq -\infty:\\ \;\;\;\;0.5 \cdot \left(y + \frac{x}{\frac{y}{x}}\right)\\ \mathbf{elif}\;t_0 \leq 2 \cdot 10^{+293}:\\ \;\;\;\;-0.5 \cdot \left(\frac{\mathsf{fma}\left(z, z, x \cdot \left(-x\right)\right)}{y} - y\right)\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \mathsf{fma}\left(\frac{z}{y}, -z, y\right)\\ \end{array} \]
(FPCore (x y z)
 :precision binary64
 (/ (- (+ (* x x) (* y y)) (* z z)) (* y 2.0)))
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (/ (- (+ (* x x) (* y y)) (* z z)) (* y 2.0))))
   (if (<= t_0 (- INFINITY))
     (* 0.5 (+ y (/ x (/ y x))))
     (if (<= t_0 2e+293)
       (* -0.5 (- (/ (fma z z (* x (- x))) y) y))
       (* 0.5 (fma (/ z y) (- z) y))))))
double code(double x, double y, double z) {
	return (((x * x) + (y * y)) - (z * z)) / (y * 2.0);
}
double code(double x, double y, double z) {
	double t_0 = (((x * x) + (y * y)) - (z * z)) / (y * 2.0);
	double tmp;
	if (t_0 <= -((double) INFINITY)) {
		tmp = 0.5 * (y + (x / (y / x)));
	} else if (t_0 <= 2e+293) {
		tmp = -0.5 * ((fma(z, z, (x * -x)) / y) - y);
	} else {
		tmp = 0.5 * fma((z / y), -z, y);
	}
	return tmp;
}
function code(x, y, z)
	return Float64(Float64(Float64(Float64(x * x) + Float64(y * y)) - Float64(z * z)) / Float64(y * 2.0))
end
function code(x, y, z)
	t_0 = Float64(Float64(Float64(Float64(x * x) + Float64(y * y)) - Float64(z * z)) / Float64(y * 2.0))
	tmp = 0.0
	if (t_0 <= Float64(-Inf))
		tmp = Float64(0.5 * Float64(y + Float64(x / Float64(y / x))));
	elseif (t_0 <= 2e+293)
		tmp = Float64(-0.5 * Float64(Float64(fma(z, z, Float64(x * Float64(-x))) / y) - y));
	else
		tmp = Float64(0.5 * fma(Float64(z / y), Float64(-z), y));
	end
	return tmp
end
code[x_, y_, z_] := N[(N[(N[(N[(x * x), $MachinePrecision] + N[(y * y), $MachinePrecision]), $MachinePrecision] - N[(z * z), $MachinePrecision]), $MachinePrecision] / N[(y * 2.0), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(x * x), $MachinePrecision] + N[(y * y), $MachinePrecision]), $MachinePrecision] - N[(z * z), $MachinePrecision]), $MachinePrecision] / N[(y * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(0.5 * N[(y + N[(x / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+293], N[(-0.5 * N[(N[(N[(z * z + N[(x * (-x)), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(N[(z / y), $MachinePrecision] * (-z) + y), $MachinePrecision]), $MachinePrecision]]]]
\frac{\left(x \cdot x + y \cdot y\right) - z \cdot z}{y \cdot 2}
\begin{array}{l}
t_0 := \frac{\left(x \cdot x + y \cdot y\right) - z \cdot z}{y \cdot 2}\\
\mathbf{if}\;t_0 \leq -\infty:\\
\;\;\;\;0.5 \cdot \left(y + \frac{x}{\frac{y}{x}}\right)\\

\mathbf{elif}\;t_0 \leq 2 \cdot 10^{+293}:\\
\;\;\;\;-0.5 \cdot \left(\frac{\mathsf{fma}\left(z, z, x \cdot \left(-x\right)\right)}{y} - y\right)\\

\mathbf{else}:\\
\;\;\;\;0.5 \cdot \mathsf{fma}\left(\frac{z}{y}, -z, y\right)\\


\end{array}

Error

Target

Original29.0
Target0.2
Herbie3.6
\[y \cdot 0.5 - \left(\frac{0.5}{y} \cdot \left(z + x\right)\right) \cdot \left(z - x\right) \]

Derivation

  1. Split input into 3 regimes
  2. if (/.f64 (-.f64 (+.f64 (*.f64 x x) (*.f64 y y)) (*.f64 z z)) (*.f64 y 2)) < -inf.0

    1. Initial program 64.0

      \[\frac{\left(x \cdot x + y \cdot y\right) - z \cdot z}{y \cdot 2} \]
    2. Taylor expanded in z around 0 64.0

      \[\leadsto \color{blue}{0.5 \cdot \frac{{y}^{2} + {x}^{2}}{y}} \]
    3. Simplified3.8

      \[\leadsto \color{blue}{0.5 \cdot \mathsf{fma}\left(x, \frac{x}{y}, y\right)} \]
      Proof
      (*.f64 1/2 (fma.f64 x (/.f64 x y) y)): 0 points increase in error, 0 points decrease in error
      (*.f64 1/2 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 x (/.f64 x y)) y))): 2 points increase in error, 0 points decrease in error
      (*.f64 1/2 (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 x y) x)) y)): 0 points increase in error, 0 points decrease in error
      (*.f64 1/2 (+.f64 (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 x x) y)) y)): 33 points increase in error, 16 points decrease in error
      (*.f64 1/2 (+.f64 (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 x 2)) y) y)): 0 points increase in error, 0 points decrease in error
      (Rewrite=> distribute-lft-in_binary64 (+.f64 (*.f64 1/2 (/.f64 (pow.f64 x 2) y)) (*.f64 1/2 y))): 0 points increase in error, 0 points decrease in error
      (+.f64 (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 1/2 (pow.f64 x 2)) y)) (*.f64 1/2 y)): 0 points increase in error, 0 points decrease in error
      (+.f64 (Rewrite<= associate-*l/_binary64 (*.f64 (/.f64 1/2 y) (pow.f64 x 2))) (*.f64 1/2 y)): 11 points increase in error, 3 points decrease in error
      (+.f64 (*.f64 (/.f64 1/2 y) (pow.f64 x 2)) (*.f64 1/2 (Rewrite<= /-rgt-identity_binary64 (/.f64 y 1)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (*.f64 (/.f64 1/2 y) (pow.f64 x 2)) (*.f64 1/2 (/.f64 y (Rewrite<= *-inverses_binary64 (/.f64 y y))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (*.f64 (/.f64 1/2 y) (pow.f64 x 2)) (*.f64 1/2 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 y y) y)))): 82 points increase in error, 15 points decrease in error
      (+.f64 (*.f64 (/.f64 1/2 y) (pow.f64 x 2)) (*.f64 1/2 (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 y 2)) y))): 0 points increase in error, 0 points decrease in error
      (+.f64 (*.f64 (/.f64 1/2 y) (pow.f64 x 2)) (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 1/2 (pow.f64 y 2)) y))): 0 points increase in error, 0 points decrease in error
      (+.f64 (*.f64 (/.f64 1/2 y) (pow.f64 x 2)) (Rewrite<= associate-*l/_binary64 (*.f64 (/.f64 1/2 y) (pow.f64 y 2)))): 20 points increase in error, 4 points decrease in error
      (Rewrite<= distribute-lft-in_binary64 (*.f64 (/.f64 1/2 y) (+.f64 (pow.f64 x 2) (pow.f64 y 2)))): 1 points increase in error, 3 points decrease in error
      (*.f64 (/.f64 1/2 y) (Rewrite<= +-commutative_binary64 (+.f64 (pow.f64 y 2) (pow.f64 x 2)))): 0 points increase in error, 0 points decrease in error
      (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 1/2 (+.f64 (pow.f64 y 2) (pow.f64 x 2))) y)): 8 points increase in error, 30 points decrease in error
      (Rewrite<= associate-*r/_binary64 (*.f64 1/2 (/.f64 (+.f64 (pow.f64 y 2) (pow.f64 x 2)) y))): 0 points increase in error, 0 points decrease in error
    4. Applied egg-rr3.8

      \[\leadsto 0.5 \cdot \color{blue}{\left(x \cdot \frac{x}{y} + y\right)} \]
    5. Applied egg-rr3.8

      \[\leadsto 0.5 \cdot \left(\color{blue}{\frac{x}{\frac{y}{x}}} + y\right) \]

    if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 x x) (*.f64 y y)) (*.f64 z z)) (*.f64 y 2)) < 1.9999999999999998e293

    1. Initial program 2.6

      \[\frac{\left(x \cdot x + y \cdot y\right) - z \cdot z}{y \cdot 2} \]
    2. Simplified1.8

      \[\leadsto \color{blue}{-0.5 \cdot \left(\frac{\mathsf{fma}\left(z, z, x \cdot \left(-x\right)\right)}{y} - y\right)} \]
      Proof
      (*.f64 -1/2 (-.f64 (/.f64 (fma.f64 z z (*.f64 x (neg.f64 x))) y) y)): 0 points increase in error, 0 points decrease in error
      (*.f64 (Rewrite<= metadata-eval (/.f64 -1 2)) (-.f64 (/.f64 (fma.f64 z z (*.f64 x (neg.f64 x))) y) y)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 -1 2) (-.f64 (/.f64 (fma.f64 z z (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 x x)))) y) y)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 -1 2) (-.f64 (/.f64 (Rewrite<= fma-neg_binary64 (-.f64 (*.f64 z z) (*.f64 x x))) y) y)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 -1 2) (-.f64 (/.f64 (-.f64 (*.f64 z z) (*.f64 x x)) y) (Rewrite<= /-rgt-identity_binary64 (/.f64 y 1)))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 -1 2) (-.f64 (/.f64 (-.f64 (*.f64 z z) (*.f64 x x)) y) (/.f64 y (Rewrite<= *-inverses_binary64 (/.f64 y y))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 -1 2) (-.f64 (/.f64 (-.f64 (*.f64 z z) (*.f64 x x)) y) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 y y) y)))): 65 points increase in error, 2 points decrease in error
      (*.f64 (/.f64 -1 2) (Rewrite<= div-sub_binary64 (/.f64 (-.f64 (-.f64 (*.f64 z z) (*.f64 x x)) (*.f64 y y)) y))): 2 points increase in error, 2 points decrease in error
      (*.f64 (/.f64 -1 2) (/.f64 (Rewrite<= associate--r+_binary64 (-.f64 (*.f64 z z) (+.f64 (*.f64 x x) (*.f64 y y)))) y)): 0 points increase in error, 0 points decrease in error
      (Rewrite<= times-frac_binary64 (/.f64 (*.f64 -1 (-.f64 (*.f64 z z) (+.f64 (*.f64 x x) (*.f64 y y)))) (*.f64 2 y))): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= neg-mul-1_binary64 (neg.f64 (-.f64 (*.f64 z z) (+.f64 (*.f64 x x) (*.f64 y y))))) (*.f64 2 y)): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= sub0-neg_binary64 (-.f64 0 (-.f64 (*.f64 z z) (+.f64 (*.f64 x x) (*.f64 y y))))) (*.f64 2 y)): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= associate-+l-_binary64 (+.f64 (-.f64 0 (*.f64 z z)) (+.f64 (*.f64 x x) (*.f64 y y)))) (*.f64 2 y)): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (Rewrite<= neg-sub0_binary64 (neg.f64 (*.f64 z z))) (+.f64 (*.f64 x x) (*.f64 y y))) (*.f64 2 y)): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 (+.f64 (*.f64 x x) (*.f64 y y)) (neg.f64 (*.f64 z z)))) (*.f64 2 y)): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= sub-neg_binary64 (-.f64 (+.f64 (*.f64 x x) (*.f64 y y)) (*.f64 z z))) (*.f64 2 y)): 0 points increase in error, 0 points decrease in error
      (/.f64 (-.f64 (+.f64 (*.f64 x x) (*.f64 y y)) (*.f64 z z)) (Rewrite<= *-commutative_binary64 (*.f64 y 2))): 0 points increase in error, 0 points decrease in error

    if 1.9999999999999998e293 < (/.f64 (-.f64 (+.f64 (*.f64 x x) (*.f64 y y)) (*.f64 z z)) (*.f64 y 2))

    1. Initial program 62.4

      \[\frac{\left(x \cdot x + y \cdot y\right) - z \cdot z}{y \cdot 2} \]
    2. Taylor expanded in x around 0 63.0

      \[\leadsto \color{blue}{0.5 \cdot \frac{{y}^{2} - {z}^{2}}{y}} \]
    3. Simplified7.2

      \[\leadsto \color{blue}{0.5 \cdot \mathsf{fma}\left(\frac{z}{y}, -z, y\right)} \]
      Proof
      (*.f64 1/2 (fma.f64 (/.f64 z y) (neg.f64 z) y)): 0 points increase in error, 0 points decrease in error
      (*.f64 1/2 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 (/.f64 z y) (neg.f64 z)) y))): 2 points increase in error, 0 points decrease in error
      (*.f64 1/2 (+.f64 (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 (/.f64 z y) z))) y)): 0 points increase in error, 0 points decrease in error
      (*.f64 1/2 (+.f64 (neg.f64 (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 z z) y))) y)): 34 points increase in error, 13 points decrease in error
      (*.f64 1/2 (+.f64 (neg.f64 (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 z 2)) y)) y)): 0 points increase in error, 0 points decrease in error
      (*.f64 1/2 (+.f64 (neg.f64 (/.f64 (pow.f64 z 2) y)) (Rewrite<= /-rgt-identity_binary64 (/.f64 y 1)))): 0 points increase in error, 0 points decrease in error
      (*.f64 1/2 (+.f64 (neg.f64 (/.f64 (pow.f64 z 2) y)) (/.f64 y (Rewrite<= *-inverses_binary64 (/.f64 y y))))): 0 points increase in error, 0 points decrease in error
      (*.f64 1/2 (+.f64 (neg.f64 (/.f64 (pow.f64 z 2) y)) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 y y) y)))): 96 points increase in error, 4 points decrease in error
      (*.f64 1/2 (+.f64 (neg.f64 (/.f64 (pow.f64 z 2) y)) (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 y 2)) y))): 0 points increase in error, 0 points decrease in error
      (*.f64 1/2 (Rewrite<= +-commutative_binary64 (+.f64 (/.f64 (pow.f64 y 2) y) (neg.f64 (/.f64 (pow.f64 z 2) y))))): 0 points increase in error, 0 points decrease in error
      (*.f64 1/2 (Rewrite<= sub-neg_binary64 (-.f64 (/.f64 (pow.f64 y 2) y) (/.f64 (pow.f64 z 2) y)))): 0 points increase in error, 0 points decrease in error
      (*.f64 1/2 (Rewrite<= div-sub_binary64 (/.f64 (-.f64 (pow.f64 y 2) (pow.f64 z 2)) y))): 1 points increase in error, 1 points decrease in error
  3. Recombined 3 regimes into one program.
  4. Final simplification3.6

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(x \cdot x + y \cdot y\right) - z \cdot z}{y \cdot 2} \leq -\infty:\\ \;\;\;\;0.5 \cdot \left(y + \frac{x}{\frac{y}{x}}\right)\\ \mathbf{elif}\;\frac{\left(x \cdot x + y \cdot y\right) - z \cdot z}{y \cdot 2} \leq 2 \cdot 10^{+293}:\\ \;\;\;\;-0.5 \cdot \left(\frac{\mathsf{fma}\left(z, z, x \cdot \left(-x\right)\right)}{y} - y\right)\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \mathsf{fma}\left(\frac{z}{y}, -z, y\right)\\ \end{array} \]

Alternatives

Alternative 1
Error4.0
Cost8968
\[\begin{array}{l} t_0 := \frac{\left(x \cdot x + y \cdot y\right) - z \cdot z}{y \cdot 2}\\ \mathbf{if}\;t_0 \leq -\infty:\\ \;\;\;\;0.5 \cdot \left(y + \frac{x}{\frac{y}{x}}\right)\\ \mathbf{elif}\;t_0 \leq 2 \cdot 10^{+293}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \mathsf{fma}\left(\frac{z}{y}, -z, y\right)\\ \end{array} \]
Alternative 2
Error4.0
Cost3016
\[\begin{array}{l} t_0 := \frac{\left(x \cdot x + y \cdot y\right) - z \cdot z}{y \cdot 2}\\ \mathbf{if}\;t_0 \leq -\infty:\\ \;\;\;\;0.5 \cdot \left(y + \frac{x}{\frac{y}{x}}\right)\\ \mathbf{elif}\;t_0 \leq 2 \cdot 10^{+293}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \left(z \cdot \frac{z}{y} - y\right)\\ \end{array} \]
Alternative 3
Error15.5
Cost1104
\[\begin{array}{l} t_0 := 0.5 \cdot \left(y + \frac{x}{\frac{y}{x}}\right)\\ \mathbf{if}\;z \leq -8.763625891249517 \cdot 10^{-27}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq -6.769695218842494 \cdot 10^{-51}:\\ \;\;\;\;\left(z \cdot z\right) \cdot \frac{-0.5}{y}\\ \mathbf{elif}\;z \leq 1.1833983197116277 \cdot 10^{-5}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 9.612382313073149 \cdot 10^{+27}:\\ \;\;\;\;\frac{z \cdot -0.5}{\frac{y}{z}}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 4
Error15.5
Cost1104
\[\begin{array}{l} t_0 := 0.5 \cdot \left(y + x \cdot \frac{x}{y}\right)\\ \mathbf{if}\;z \leq -8.763625891249517 \cdot 10^{-27}:\\ \;\;\;\;0.5 \cdot \left(y + \frac{x}{\frac{y}{x}}\right)\\ \mathbf{elif}\;z \leq -6.769695218842494 \cdot 10^{-51}:\\ \;\;\;\;\left(z \cdot z\right) \cdot \frac{-0.5}{y}\\ \mathbf{elif}\;z \leq 1.1833983197116277 \cdot 10^{-5}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 9.612382313073149 \cdot 10^{+27}:\\ \;\;\;\;\frac{z \cdot -0.5}{\frac{y}{z}}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 5
Error22.8
Cost844
\[\begin{array}{l} \mathbf{if}\;y \leq -1.2 \cdot 10^{-90}:\\ \;\;\;\;y \cdot 0.5\\ \mathbf{elif}\;y \leq 1.85 \cdot 10^{-144}:\\ \;\;\;\;\frac{z \cdot -0.5}{\frac{y}{z}}\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-9}:\\ \;\;\;\;0.5 \cdot \frac{x}{\frac{y}{x}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot 0.5\\ \end{array} \]
Alternative 6
Error22.8
Cost844
\[\begin{array}{l} \mathbf{if}\;y \leq -1.2 \cdot 10^{-90}:\\ \;\;\;\;y \cdot 0.5\\ \mathbf{elif}\;y \leq 1.85 \cdot 10^{-144}:\\ \;\;\;\;-0.5 \cdot \left(z \cdot \frac{z}{y}\right)\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-9}:\\ \;\;\;\;0.5 \cdot \frac{x}{\frac{y}{x}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot 0.5\\ \end{array} \]
Alternative 7
Error22.8
Cost844
\[\begin{array}{l} \mathbf{if}\;y \leq -1.2 \cdot 10^{-90}:\\ \;\;\;\;y \cdot 0.5\\ \mathbf{elif}\;y \leq 1.85 \cdot 10^{-144}:\\ \;\;\;\;-0.5 \cdot \left(z \cdot \frac{z}{y}\right)\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-9}:\\ \;\;\;\;\frac{x \cdot x}{y \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;y \cdot 0.5\\ \end{array} \]
Alternative 8
Error6.5
Cost840
\[\begin{array}{l} t_0 := 0.5 \cdot \left(y + \frac{x}{\frac{y}{x}}\right)\\ \mathbf{if}\;x \leq -13958959128885786:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 2.416259448912119 \cdot 10^{-40}:\\ \;\;\;\;-0.5 \cdot \left(z \cdot \frac{z}{y} - y\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 9
Error23.3
Cost712
\[\begin{array}{l} \mathbf{if}\;y \leq -3.3 \cdot 10^{-150}:\\ \;\;\;\;y \cdot 0.5\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-9}:\\ \;\;\;\;0.5 \cdot \frac{x}{\frac{y}{x}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot 0.5\\ \end{array} \]
Alternative 10
Error26.7
Cost192
\[y \cdot 0.5 \]

Error

Reproduce

herbie shell --seed 2022318 
(FPCore (x y z)
  :name "Diagrams.TwoD.Apollonian:initialConfig from diagrams-contrib-1.3.0.5, A"
  :precision binary64

  :herbie-target
  (- (* y 0.5) (* (* (/ 0.5 y) (+ z x)) (- z x)))

  (/ (- (+ (* x x) (* y y)) (* z z)) (* y 2.0)))