Average Error: 22.1 → 0.1
Time: 11.0s
Precision: binary64
Cost: 1352
\[1 - \frac{\left(1 - x\right) \cdot y}{y + 1} \]
\[\begin{array}{l} t_0 := \left(x + \frac{1 - x}{y}\right) + \frac{-1 + \frac{1}{y}}{y \cdot y}\\ \mathbf{if}\;y \leq -5091452.155613959:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 123.42075535147804:\\ \;\;\;\;1 + \frac{y \cdot \left(x + -1\right)}{y + 1}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
(FPCore (x y) :precision binary64 (- 1.0 (/ (* (- 1.0 x) y) (+ y 1.0))))
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (+ (+ x (/ (- 1.0 x) y)) (/ (+ -1.0 (/ 1.0 y)) (* y y)))))
   (if (<= y -5091452.155613959)
     t_0
     (if (<= y 123.42075535147804)
       (+ 1.0 (/ (* y (+ x -1.0)) (+ y 1.0)))
       t_0))))
double code(double x, double y) {
	return 1.0 - (((1.0 - x) * y) / (y + 1.0));
}
double code(double x, double y) {
	double t_0 = (x + ((1.0 - x) / y)) + ((-1.0 + (1.0 / y)) / (y * y));
	double tmp;
	if (y <= -5091452.155613959) {
		tmp = t_0;
	} else if (y <= 123.42075535147804) {
		tmp = 1.0 + ((y * (x + -1.0)) / (y + 1.0));
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = 1.0d0 - (((1.0d0 - x) * y) / (y + 1.0d0))
end function
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    real(8) :: tmp
    t_0 = (x + ((1.0d0 - x) / y)) + (((-1.0d0) + (1.0d0 / y)) / (y * y))
    if (y <= (-5091452.155613959d0)) then
        tmp = t_0
    else if (y <= 123.42075535147804d0) then
        tmp = 1.0d0 + ((y * (x + (-1.0d0))) / (y + 1.0d0))
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double x, double y) {
	return 1.0 - (((1.0 - x) * y) / (y + 1.0));
}
public static double code(double x, double y) {
	double t_0 = (x + ((1.0 - x) / y)) + ((-1.0 + (1.0 / y)) / (y * y));
	double tmp;
	if (y <= -5091452.155613959) {
		tmp = t_0;
	} else if (y <= 123.42075535147804) {
		tmp = 1.0 + ((y * (x + -1.0)) / (y + 1.0));
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x, y):
	return 1.0 - (((1.0 - x) * y) / (y + 1.0))
def code(x, y):
	t_0 = (x + ((1.0 - x) / y)) + ((-1.0 + (1.0 / y)) / (y * y))
	tmp = 0
	if y <= -5091452.155613959:
		tmp = t_0
	elif y <= 123.42075535147804:
		tmp = 1.0 + ((y * (x + -1.0)) / (y + 1.0))
	else:
		tmp = t_0
	return tmp
function code(x, y)
	return Float64(1.0 - Float64(Float64(Float64(1.0 - x) * y) / Float64(y + 1.0)))
end
function code(x, y)
	t_0 = Float64(Float64(x + Float64(Float64(1.0 - x) / y)) + Float64(Float64(-1.0 + Float64(1.0 / y)) / Float64(y * y)))
	tmp = 0.0
	if (y <= -5091452.155613959)
		tmp = t_0;
	elseif (y <= 123.42075535147804)
		tmp = Float64(1.0 + Float64(Float64(y * Float64(x + -1.0)) / Float64(y + 1.0)));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp = code(x, y)
	tmp = 1.0 - (((1.0 - x) * y) / (y + 1.0));
end
function tmp_2 = code(x, y)
	t_0 = (x + ((1.0 - x) / y)) + ((-1.0 + (1.0 / y)) / (y * y));
	tmp = 0.0;
	if (y <= -5091452.155613959)
		tmp = t_0;
	elseif (y <= 123.42075535147804)
		tmp = 1.0 + ((y * (x + -1.0)) / (y + 1.0));
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_] := N[(1.0 - N[(N[(N[(1.0 - x), $MachinePrecision] * y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_] := Block[{t$95$0 = N[(N[(x + N[(N[(1.0 - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 + N[(1.0 / y), $MachinePrecision]), $MachinePrecision] / N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5091452.155613959], t$95$0, If[LessEqual[y, 123.42075535147804], N[(1.0 + N[(N[(y * N[(x + -1.0), $MachinePrecision]), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
1 - \frac{\left(1 - x\right) \cdot y}{y + 1}
\begin{array}{l}
t_0 := \left(x + \frac{1 - x}{y}\right) + \frac{-1 + \frac{1}{y}}{y \cdot y}\\
\mathbf{if}\;y \leq -5091452.155613959:\\
\;\;\;\;t_0\\

\mathbf{elif}\;y \leq 123.42075535147804:\\
\;\;\;\;1 + \frac{y \cdot \left(x + -1\right)}{y + 1}\\

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


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original22.1
Target0.2
Herbie0.1
\[\begin{array}{l} \mathbf{if}\;y < -3693.8482788297247:\\ \;\;\;\;\frac{1}{y} - \left(\frac{x}{y} - x\right)\\ \mathbf{elif}\;y < 6799310503.41891:\\ \;\;\;\;1 - \frac{\left(1 - x\right) \cdot y}{y + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{y} - \left(\frac{x}{y} - x\right)\\ \end{array} \]

Derivation

  1. Split input into 2 regimes
  2. if y < -5091452.155613959 or 123.420755351478036 < y

    1. Initial program 44.6

      \[1 - \frac{\left(1 - x\right) \cdot y}{y + 1} \]
    2. Taylor expanded in y around -inf 0.1

      \[\leadsto \color{blue}{\left(\frac{x}{{y}^{2}} + \left(-1 \cdot \frac{x - 1}{y} + \left(-1 \cdot \frac{x - 1}{{y}^{3}} + x\right)\right)\right) - \frac{1}{{y}^{2}}} \]
    3. Simplified0.1

      \[\leadsto \color{blue}{\left(x + \frac{1 - x}{y}\right) + \frac{-1 + x}{y \cdot y} \cdot \left(\frac{-1}{y} + 1\right)} \]
      Proof
      (+.f64 (+.f64 x (/.f64 (-.f64 1 x) y)) (*.f64 (/.f64 (+.f64 -1 x) (*.f64 y y)) (+.f64 (/.f64 -1 y) 1))): 0 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 x (Rewrite=> div-sub_binary64 (-.f64 (/.f64 1 y) (/.f64 x y)))) (*.f64 (/.f64 (+.f64 -1 x) (*.f64 y y)) (+.f64 (/.f64 -1 y) 1))): 0 points increase in error, 0 points decrease in error
      (+.f64 (Rewrite<= associate--l+_binary64 (-.f64 (+.f64 x (/.f64 1 y)) (/.f64 x y))) (*.f64 (/.f64 (+.f64 -1 x) (*.f64 y y)) (+.f64 (/.f64 -1 y) 1))): 0 points increase in error, 0 points decrease in error
      (+.f64 (-.f64 (Rewrite<= +-commutative_binary64 (+.f64 (/.f64 1 y) x)) (/.f64 x y)) (*.f64 (/.f64 (+.f64 -1 x) (*.f64 y y)) (+.f64 (/.f64 -1 y) 1))): 0 points increase in error, 0 points decrease in error
      (+.f64 (Rewrite=> associate--l+_binary64 (+.f64 (/.f64 1 y) (-.f64 x (/.f64 x y)))) (*.f64 (/.f64 (+.f64 -1 x) (*.f64 y y)) (+.f64 (/.f64 -1 y) 1))): 0 points increase in error, 0 points decrease in error
      (+.f64 (Rewrite=> +-commutative_binary64 (+.f64 (-.f64 x (/.f64 x y)) (/.f64 1 y))) (*.f64 (/.f64 (+.f64 -1 x) (*.f64 y y)) (+.f64 (/.f64 -1 y) 1))): 0 points increase in error, 0 points decrease in error
      (+.f64 (Rewrite<= associate--r-_binary64 (-.f64 x (-.f64 (/.f64 x y) (/.f64 1 y)))) (*.f64 (/.f64 (+.f64 -1 x) (*.f64 y y)) (+.f64 (/.f64 -1 y) 1))): 0 points increase in error, 0 points decrease in error
      (+.f64 (-.f64 x (Rewrite<= div-sub_binary64 (/.f64 (-.f64 x 1) y))) (*.f64 (/.f64 (+.f64 -1 x) (*.f64 y y)) (+.f64 (/.f64 -1 y) 1))): 0 points increase in error, 0 points decrease in error
      (+.f64 (Rewrite<= unsub-neg_binary64 (+.f64 x (neg.f64 (/.f64 (-.f64 x 1) y)))) (*.f64 (/.f64 (+.f64 -1 x) (*.f64 y y)) (+.f64 (/.f64 -1 y) 1))): 0 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 x (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (/.f64 (-.f64 x 1) y)))) (*.f64 (/.f64 (+.f64 -1 x) (*.f64 y y)) (+.f64 (/.f64 -1 y) 1))): 0 points increase in error, 0 points decrease in error
      (+.f64 (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 -1 (/.f64 (-.f64 x 1) y)) x)) (*.f64 (/.f64 (+.f64 -1 x) (*.f64 y y)) (+.f64 (/.f64 -1 y) 1))): 0 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (*.f64 -1 (/.f64 (-.f64 x 1) y)) x) (*.f64 (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 x -1)) (*.f64 y y)) (+.f64 (/.f64 -1 y) 1))): 0 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (*.f64 -1 (/.f64 (-.f64 x 1) y)) x) (*.f64 (/.f64 (+.f64 x (Rewrite<= metadata-eval (neg.f64 1))) (*.f64 y y)) (+.f64 (/.f64 -1 y) 1))): 0 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (*.f64 -1 (/.f64 (-.f64 x 1) y)) x) (*.f64 (/.f64 (Rewrite<= sub-neg_binary64 (-.f64 x 1)) (*.f64 y y)) (+.f64 (/.f64 -1 y) 1))): 0 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (*.f64 -1 (/.f64 (-.f64 x 1) y)) x) (*.f64 (/.f64 (-.f64 x 1) (Rewrite<= unpow2_binary64 (pow.f64 y 2))) (+.f64 (/.f64 -1 y) 1))): 0 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (*.f64 -1 (/.f64 (-.f64 x 1) y)) x) (*.f64 (/.f64 (-.f64 x 1) (pow.f64 y 2)) (+.f64 (/.f64 (Rewrite<= metadata-eval (neg.f64 1)) y) 1))): 0 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (*.f64 -1 (/.f64 (-.f64 x 1) y)) x) (*.f64 (/.f64 (-.f64 x 1) (pow.f64 y 2)) (+.f64 (Rewrite<= distribute-neg-frac_binary64 (neg.f64 (/.f64 1 y))) 1))): 0 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (*.f64 -1 (/.f64 (-.f64 x 1) y)) x) (Rewrite<= distribute-rgt-out_binary64 (+.f64 (*.f64 (neg.f64 (/.f64 1 y)) (/.f64 (-.f64 x 1) (pow.f64 y 2))) (*.f64 1 (/.f64 (-.f64 x 1) (pow.f64 y 2)))))): 2 points increase in error, 1 points decrease in error
      (+.f64 (+.f64 (*.f64 -1 (/.f64 (-.f64 x 1) y)) x) (+.f64 (*.f64 (Rewrite=> distribute-neg-frac_binary64 (/.f64 (neg.f64 1) y)) (/.f64 (-.f64 x 1) (pow.f64 y 2))) (*.f64 1 (/.f64 (-.f64 x 1) (pow.f64 y 2))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (*.f64 -1 (/.f64 (-.f64 x 1) y)) x) (+.f64 (*.f64 (/.f64 (Rewrite=> metadata-eval -1) y) (/.f64 (-.f64 x 1) (pow.f64 y 2))) (*.f64 1 (/.f64 (-.f64 x 1) (pow.f64 y 2))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (*.f64 -1 (/.f64 (-.f64 x 1) y)) x) (+.f64 (Rewrite<= times-frac_binary64 (/.f64 (*.f64 -1 (-.f64 x 1)) (*.f64 y (pow.f64 y 2)))) (*.f64 1 (/.f64 (-.f64 x 1) (pow.f64 y 2))))): 5 points increase in error, 5 points decrease in error
      (+.f64 (+.f64 (*.f64 -1 (/.f64 (-.f64 x 1) y)) x) (+.f64 (/.f64 (*.f64 -1 (-.f64 x 1)) (*.f64 y (Rewrite=> unpow2_binary64 (*.f64 y y)))) (*.f64 1 (/.f64 (-.f64 x 1) (pow.f64 y 2))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (*.f64 -1 (/.f64 (-.f64 x 1) y)) x) (+.f64 (/.f64 (*.f64 -1 (-.f64 x 1)) (Rewrite<= cube-mult_binary64 (pow.f64 y 3))) (*.f64 1 (/.f64 (-.f64 x 1) (pow.f64 y 2))))): 2 points increase in error, 1 points decrease in error
      (+.f64 (+.f64 (*.f64 -1 (/.f64 (-.f64 x 1) y)) x) (+.f64 (Rewrite<= associate-*r/_binary64 (*.f64 -1 (/.f64 (-.f64 x 1) (pow.f64 y 3)))) (*.f64 1 (/.f64 (-.f64 x 1) (pow.f64 y 2))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (*.f64 -1 (/.f64 (-.f64 x 1) y)) x) (+.f64 (*.f64 -1 (/.f64 (-.f64 x 1) (pow.f64 y 3))) (Rewrite=> *-lft-identity_binary64 (/.f64 (-.f64 x 1) (pow.f64 y 2))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-+l+_binary64 (+.f64 (+.f64 (+.f64 (*.f64 -1 (/.f64 (-.f64 x 1) y)) x) (*.f64 -1 (/.f64 (-.f64 x 1) (pow.f64 y 3)))) (/.f64 (-.f64 x 1) (pow.f64 y 2)))): 1 points increase in error, 0 points decrease in error
      (+.f64 (Rewrite<= associate-+r+_binary64 (+.f64 (*.f64 -1 (/.f64 (-.f64 x 1) y)) (+.f64 x (*.f64 -1 (/.f64 (-.f64 x 1) (pow.f64 y 3)))))) (/.f64 (-.f64 x 1) (pow.f64 y 2))): 0 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (*.f64 -1 (/.f64 (-.f64 x 1) y)) (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 -1 (/.f64 (-.f64 x 1) (pow.f64 y 3))) x))) (/.f64 (-.f64 x 1) (pow.f64 y 2))): 0 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (*.f64 -1 (/.f64 (-.f64 x 1) y)) (+.f64 (*.f64 -1 (/.f64 (-.f64 x 1) (pow.f64 y 3))) x)) (Rewrite=> div-sub_binary64 (-.f64 (/.f64 x (pow.f64 y 2)) (/.f64 1 (pow.f64 y 2))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate--l+_binary64 (-.f64 (+.f64 (+.f64 (*.f64 -1 (/.f64 (-.f64 x 1) y)) (+.f64 (*.f64 -1 (/.f64 (-.f64 x 1) (pow.f64 y 3))) x)) (/.f64 x (pow.f64 y 2))) (/.f64 1 (pow.f64 y 2)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (Rewrite<= +-commutative_binary64 (+.f64 (/.f64 x (pow.f64 y 2)) (+.f64 (*.f64 -1 (/.f64 (-.f64 x 1) y)) (+.f64 (*.f64 -1 (/.f64 (-.f64 x 1) (pow.f64 y 3))) x)))) (/.f64 1 (pow.f64 y 2))): 0 points increase in error, 0 points decrease in error
    4. Taylor expanded in x around 0 0.1

      \[\leadsto \left(x + \frac{1 - x}{y}\right) + \color{blue}{-1 \cdot \frac{1 - \frac{1}{y}}{{y}^{2}}} \]
    5. Simplified0.1

      \[\leadsto \left(x + \frac{1 - x}{y}\right) + \color{blue}{\frac{-1 + \frac{1}{y}}{y \cdot y}} \]
      Proof
      (/.f64 (+.f64 -1 (/.f64 1 y)) (*.f64 y y)): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (Rewrite<= metadata-eval (-.f64 0 1)) (/.f64 1 y)) (*.f64 y y)): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= associate--r-_binary64 (-.f64 0 (-.f64 1 (/.f64 1 y)))) (*.f64 y y)): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= neg-sub0_binary64 (neg.f64 (-.f64 1 (/.f64 1 y)))) (*.f64 y y)): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (-.f64 1 (/.f64 1 y)))) (*.f64 y y)): 0 points increase in error, 0 points decrease in error
      (/.f64 (*.f64 -1 (-.f64 1 (/.f64 1 y))) (Rewrite<= unpow2_binary64 (pow.f64 y 2))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-*r/_binary64 (*.f64 -1 (/.f64 (-.f64 1 (/.f64 1 y)) (pow.f64 y 2)))): 0 points increase in error, 0 points decrease in error

    if -5091452.155613959 < y < 123.420755351478036

    1. Initial program 0.1

      \[1 - \frac{\left(1 - x\right) \cdot y}{y + 1} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.1

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5091452.155613959:\\ \;\;\;\;\left(x + \frac{1 - x}{y}\right) + \frac{-1 + \frac{1}{y}}{y \cdot y}\\ \mathbf{elif}\;y \leq 123.42075535147804:\\ \;\;\;\;1 + \frac{y \cdot \left(x + -1\right)}{y + 1}\\ \mathbf{else}:\\ \;\;\;\;\left(x + \frac{1 - x}{y}\right) + \frac{-1 + \frac{1}{y}}{y \cdot y}\\ \end{array} \]

Alternatives

Alternative 1
Error0.1
Cost1096
\[\begin{array}{l} t_0 := x - \frac{1 - x}{y} \cdot \left(-1 + \frac{1}{y}\right)\\ \mathbf{if}\;y \leq -5091452.155613959:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 123.42075535147804:\\ \;\;\;\;1 - \frac{y \cdot \left(1 - x\right)}{y + 1}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 2
Error0.2
Cost968
\[\begin{array}{l} \mathbf{if}\;y \leq -225843333302.34818:\\ \;\;\;\;x + \frac{1}{y}\\ \mathbf{elif}\;y \leq 43535368.296954006:\\ \;\;\;\;1 + \frac{y \cdot \left(x + -1\right)}{y + 1}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{1 - x}{y}\\ \end{array} \]
Alternative 3
Error8.7
Cost712
\[\begin{array}{l} t_0 := x + \frac{1}{y}\\ \mathbf{if}\;y \leq -640.7827019995339:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 43535368.296954006:\\ \;\;\;\;1 - \frac{y}{y + 1}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 4
Error1.2
Cost712
\[\begin{array}{l} t_0 := x + \frac{1}{y}\\ \mathbf{if}\;y \leq -640.7827019995339:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 0.00014560340274072535:\\ \;\;\;\;1 + \left(y \cdot x - y\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 5
Error1.0
Cost712
\[\begin{array}{l} t_0 := x + \frac{1 - x}{y}\\ \mathbf{if}\;y \leq -640.7827019995339:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 0.00014560340274072535:\\ \;\;\;\;1 + \left(y \cdot x - y\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 6
Error16.2
Cost584
\[\begin{array}{l} t_0 := x - \frac{x}{y}\\ \mathbf{if}\;y \leq -640.7827019995339:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 0.00014560340274072535:\\ \;\;\;\;1 - y\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 7
Error9.0
Cost584
\[\begin{array}{l} t_0 := x + \frac{1}{y}\\ \mathbf{if}\;y \leq -640.7827019995339:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 0.00014560340274072535:\\ \;\;\;\;1 - y\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 8
Error16.4
Cost456
\[\begin{array}{l} \mathbf{if}\;y \leq -640.7827019995339:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 0.00014560340274072535:\\ \;\;\;\;1 - y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 9
Error16.7
Cost328
\[\begin{array}{l} \mathbf{if}\;y \leq -640.7827019995339:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 19591903660.924732:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 10
Error39.4
Cost64
\[1 \]

Error

Reproduce

herbie shell --seed 2022294 
(FPCore (x y)
  :name "Diagrams.Trail:splitAtParam  from diagrams-lib-1.3.0.3, D"
  :precision binary64

  :herbie-target
  (if (< y -3693.8482788297247) (- (/ 1.0 y) (- (/ x y) x)) (if (< y 6799310503.41891) (- 1.0 (/ (* (- 1.0 x) y) (+ y 1.0))) (- (/ 1.0 y) (- (/ x y) x))))

  (- 1.0 (/ (* (- 1.0 x) y) (+ y 1.0))))