Average Error: 3.7 → 0.6
Time: 15.4s
Precision: binary64
Cost: 1352
\[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
\[\begin{array}{l} \mathbf{if}\;z \cdot 3 \leq -2 \cdot 10^{-59}:\\ \;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\\ \mathbf{elif}\;z \cdot 3 \leq 2 \cdot 10^{-22}:\\ \;\;\;\;x - \left(y - \frac{t}{y}\right) \cdot \frac{0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{\frac{\frac{t}{z}}{y} - \frac{y}{z}}{3}\\ \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
(FPCore (x y z t)
 :precision binary64
 (if (<= (* z 3.0) -2e-59)
   (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y)))
   (if (<= (* z 3.0) 2e-22)
     (- x (* (- y (/ t y)) (/ 0.3333333333333333 z)))
     (+ x (/ (- (/ (/ t z) y) (/ y z)) 3.0)))))
double code(double x, double y, double z, double t) {
	return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z * 3.0) <= -2e-59) {
		tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
	} else if ((z * 3.0) <= 2e-22) {
		tmp = x - ((y - (t / y)) * (0.3333333333333333 / z));
	} else {
		tmp = x + ((((t / z) / y) - (y / z)) / 3.0);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((z * 3.0d0) <= (-2d-59)) then
        tmp = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
    else if ((z * 3.0d0) <= 2d-22) then
        tmp = x - ((y - (t / y)) * (0.3333333333333333d0 / z))
    else
        tmp = x + ((((t / z) / y) - (y / z)) / 3.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z * 3.0) <= -2e-59) {
		tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
	} else if ((z * 3.0) <= 2e-22) {
		tmp = x - ((y - (t / y)) * (0.3333333333333333 / z));
	} else {
		tmp = x + ((((t / z) / y) - (y / z)) / 3.0);
	}
	return tmp;
}
def code(x, y, z, t):
	return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
def code(x, y, z, t):
	tmp = 0
	if (z * 3.0) <= -2e-59:
		tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
	elif (z * 3.0) <= 2e-22:
		tmp = x - ((y - (t / y)) * (0.3333333333333333 / z))
	else:
		tmp = x + ((((t / z) / y) - (y / z)) / 3.0)
	return tmp
function code(x, y, z, t)
	return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y)))
end
function code(x, y, z, t)
	tmp = 0.0
	if (Float64(z * 3.0) <= -2e-59)
		tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y)));
	elseif (Float64(z * 3.0) <= 2e-22)
		tmp = Float64(x - Float64(Float64(y - Float64(t / y)) * Float64(0.3333333333333333 / z)));
	else
		tmp = Float64(x + Float64(Float64(Float64(Float64(t / z) / y) - Float64(y / z)) / 3.0));
	end
	return tmp
end
function tmp = code(x, y, z, t)
	tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z * 3.0) <= -2e-59)
		tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
	elseif ((z * 3.0) <= 2e-22)
		tmp = x - ((y - (t / y)) * (0.3333333333333333 / z));
	else
		tmp = x + ((((t / z) / y) - (y / z)) / 3.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], -2e-59], N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * 3.0), $MachinePrecision], 2e-22], N[(x - N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision] - N[(y / z), $MachinePrecision]), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]]]
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -2 \cdot 10^{-59}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\\

\mathbf{elif}\;z \cdot 3 \leq 2 \cdot 10^{-22}:\\
\;\;\;\;x - \left(y - \frac{t}{y}\right) \cdot \frac{0.3333333333333333}{z}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{\frac{t}{z}}{y} - \frac{y}{z}}{3}\\


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original3.7
Target1.7
Herbie0.6
\[\left(x - \frac{y}{z \cdot 3}\right) + \frac{\frac{t}{z \cdot 3}}{y} \]

Derivation

  1. Split input into 3 regimes
  2. if (*.f64 z 3) < -2.0000000000000001e-59

    1. Initial program 0.5

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]

    if -2.0000000000000001e-59 < (*.f64 z 3) < 2.0000000000000001e-22

    1. Initial program 13.1

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Simplified0.3

      \[\leadsto \color{blue}{x + \frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)} \]
      Proof
      (+.f64 x (*.f64 (/.f64 -1/3 z) (-.f64 y (/.f64 t y)))): 0 points increase in error, 0 points decrease in error
      (+.f64 x (*.f64 (/.f64 (Rewrite<= metadata-eval (/.f64 -1 3)) z) (-.f64 y (/.f64 t y)))): 0 points increase in error, 0 points decrease in error
      (+.f64 x (*.f64 (Rewrite<= associate-/r*_binary64 (/.f64 -1 (*.f64 3 z))) (-.f64 y (/.f64 t y)))): 32 points increase in error, 18 points decrease in error
      (+.f64 x (*.f64 (/.f64 -1 (Rewrite<= *-commutative_binary64 (*.f64 z 3))) (-.f64 y (/.f64 t y)))): 0 points increase in error, 0 points decrease in error
      (+.f64 x (Rewrite<= distribute-lft-out--_binary64 (-.f64 (*.f64 (/.f64 -1 (*.f64 z 3)) y) (*.f64 (/.f64 -1 (*.f64 z 3)) (/.f64 t y))))): 1 points increase in error, 0 points decrease in error
      (+.f64 x (-.f64 (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 -1 y) (*.f64 z 3))) (*.f64 (/.f64 -1 (*.f64 z 3)) (/.f64 t y)))): 6 points increase in error, 17 points decrease in error
      (+.f64 x (-.f64 (/.f64 (Rewrite<= neg-mul-1_binary64 (neg.f64 y)) (*.f64 z 3)) (*.f64 (/.f64 -1 (*.f64 z 3)) (/.f64 t y)))): 0 points increase in error, 0 points decrease in error
      (+.f64 x (-.f64 (Rewrite<= distribute-neg-frac_binary64 (neg.f64 (/.f64 y (*.f64 z 3)))) (*.f64 (/.f64 -1 (*.f64 z 3)) (/.f64 t y)))): 0 points increase in error, 0 points decrease in error
      (+.f64 x (-.f64 (neg.f64 (/.f64 y (*.f64 z 3))) (Rewrite<= times-frac_binary64 (/.f64 (*.f64 -1 t) (*.f64 (*.f64 z 3) y))))): 25 points increase in error, 31 points decrease in error
      (+.f64 x (-.f64 (neg.f64 (/.f64 y (*.f64 z 3))) (/.f64 (Rewrite<= neg-mul-1_binary64 (neg.f64 t)) (*.f64 (*.f64 z 3) y)))): 0 points increase in error, 0 points decrease in error
      (+.f64 x (-.f64 (neg.f64 (/.f64 y (*.f64 z 3))) (Rewrite<= distribute-neg-frac_binary64 (neg.f64 (/.f64 t (*.f64 (*.f64 z 3) y)))))): 0 points increase in error, 0 points decrease in error
      (+.f64 x (Rewrite<= unsub-neg_binary64 (+.f64 (neg.f64 (/.f64 y (*.f64 z 3))) (neg.f64 (neg.f64 (/.f64 t (*.f64 (*.f64 z 3) y))))))): 0 points increase in error, 0 points decrease in error
      (+.f64 x (Rewrite<= distribute-neg-in_binary64 (neg.f64 (+.f64 (/.f64 y (*.f64 z 3)) (neg.f64 (/.f64 t (*.f64 (*.f64 z 3) y))))))): 0 points increase in error, 0 points decrease in error
      (+.f64 x (neg.f64 (Rewrite<= sub-neg_binary64 (-.f64 (/.f64 y (*.f64 z 3)) (/.f64 t (*.f64 (*.f64 z 3) y)))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= sub-neg_binary64 (-.f64 x (-.f64 (/.f64 y (*.f64 z 3)) (/.f64 t (*.f64 (*.f64 z 3) y))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-+l-_binary64 (+.f64 (-.f64 x (/.f64 y (*.f64 z 3))) (/.f64 t (*.f64 (*.f64 z 3) y)))): 0 points increase in error, 0 points decrease in error

    if 2.0000000000000001e-22 < (*.f64 z 3)

    1. Initial program 0.4

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Simplified0.9

      \[\leadsto \color{blue}{\left(x - \frac{y}{z \cdot 3}\right) + \frac{\frac{t}{z}}{y \cdot 3}} \]
      Proof
      (+.f64 (-.f64 x (/.f64 y (*.f64 z 3))) (/.f64 (/.f64 t z) (*.f64 y 3))): 0 points increase in error, 0 points decrease in error
      (+.f64 (-.f64 x (/.f64 y (*.f64 z 3))) (/.f64 (/.f64 t z) (Rewrite<= *-commutative_binary64 (*.f64 3 y)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (-.f64 x (/.f64 y (*.f64 z 3))) (Rewrite<= associate-/r*_binary64 (/.f64 t (*.f64 z (*.f64 3 y))))): 29 points increase in error, 22 points decrease in error
      (+.f64 (-.f64 x (/.f64 y (*.f64 z 3))) (/.f64 t (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 z 3) y)))): 13 points increase in error, 12 points decrease in error
    3. Applied egg-rr0.9

      \[\leadsto \color{blue}{x - \frac{\frac{y}{z} - \frac{\frac{t}{z}}{y}}{3}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification0.6

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \cdot 3 \leq -2 \cdot 10^{-59}:\\ \;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\\ \mathbf{elif}\;z \cdot 3 \leq 2 \cdot 10^{-22}:\\ \;\;\;\;x - \left(y - \frac{t}{y}\right) \cdot \frac{0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{\frac{\frac{t}{z}}{y} - \frac{y}{z}}{3}\\ \end{array} \]

Alternatives

Alternative 1
Error30.8
Cost2032
\[\begin{array}{l} t_1 := \frac{y}{z \cdot -3}\\ t_2 := y \cdot \frac{-0.3333333333333333}{z}\\ t_3 := \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{if}\;x \leq -1.9 \cdot 10^{+192}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -5 \cdot 10^{+136}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -2.15 \cdot 10^{+30}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -1.02 \cdot 10^{-110}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.22 \cdot 10^{-149}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -6.9 \cdot 10^{-175}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq -2.35 \cdot 10^{-267}:\\ \;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\ \mathbf{elif}\;x \leq 4.9 \cdot 10^{-195}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 1.76 \cdot 10^{-152}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 1.25 \cdot 10^{-123}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 4.1 \cdot 10^{-14}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 10^{+30}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 2
Error30.6
Cost1508
\[\begin{array}{l} t_1 := 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\ \mathbf{if}\;x \leq -1.9 \cdot 10^{+192}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -1.5 \cdot 10^{+137}:\\ \;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;x \leq -3.6 \cdot 10^{+32}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -4.9 \cdot 10^{-110}:\\ \;\;\;\;\frac{y}{z \cdot -3}\\ \mathbf{elif}\;x \leq -8.5 \cdot 10^{-153}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -3.35 \cdot 10^{-174}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -3.1 \cdot 10^{-300}:\\ \;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\ \mathbf{elif}\;x \leq 7.4 \cdot 10^{-190}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 5.8 \cdot 10^{+30}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 3
Error0.7
Cost1352
\[\begin{array}{l} \mathbf{if}\;z \cdot 3 \leq -2 \cdot 10^{-81}:\\ \;\;\;\;\frac{t}{\left(z \cdot 3\right) \cdot y} + \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right)\\ \mathbf{elif}\;z \cdot 3 \leq 2 \cdot 10^{-22}:\\ \;\;\;\;x - \left(y - \frac{t}{y}\right) \cdot \frac{0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{\frac{\frac{t}{z}}{y} - \frac{y}{z}}{3}\\ \end{array} \]
Alternative 4
Error7.3
Cost1104
\[\begin{array}{l} t_1 := x + \frac{y \cdot -0.3333333333333333}{z}\\ \mathbf{if}\;y \leq -2.9 \cdot 10^{+89}:\\ \;\;\;\;x - \frac{\frac{y}{z}}{3}\\ \mathbf{elif}\;y \leq -0.00021:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\ \mathbf{elif}\;y \leq -2.5 \cdot 10^{-59}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 9 \cdot 10^{+25}:\\ \;\;\;\;x + \frac{\frac{t}{z}}{y} \cdot 0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error7.6
Cost1104
\[\begin{array}{l} t_1 := x + \frac{y \cdot -0.3333333333333333}{z}\\ \mathbf{if}\;y \leq -4.6 \cdot 10^{+100}:\\ \;\;\;\;x - \frac{\frac{y}{z}}{3}\\ \mathbf{elif}\;y \leq -0.0027:\\ \;\;\;\;\frac{\frac{t}{y} - y}{z \cdot 3}\\ \mathbf{elif}\;y \leq -5.8 \cdot 10^{-58}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.12 \cdot 10^{+26}:\\ \;\;\;\;x + \frac{\frac{t}{z}}{y} \cdot 0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error16.1
Cost976
\[\begin{array}{l} t_1 := \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ t_2 := x + \frac{y \cdot -0.3333333333333333}{z}\\ \mathbf{if}\;y \leq -2.4 \cdot 10^{-79}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-174}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-130}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 4 \cdot 10^{-90}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 7
Error16.1
Cost976
\[\begin{array}{l} t_1 := \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ t_2 := x + \frac{y \cdot -0.3333333333333333}{z}\\ \mathbf{if}\;y \leq -2.05 \cdot 10^{-79}:\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{-174}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{-123}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 6.4 \cdot 10^{-90}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Error16.2
Cost976
\[\begin{array}{l} t_1 := \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ t_2 := x + \frac{y \cdot -0.3333333333333333}{z}\\ \mathbf{if}\;y \leq -1.6 \cdot 10^{-79}:\\ \;\;\;\;x - \frac{\frac{y}{z}}{3}\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{-174}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{-129}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 3 \cdot 10^{-90}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 9
Error16.1
Cost976
\[\begin{array}{l} t_1 := x + \frac{y \cdot -0.3333333333333333}{z}\\ \mathbf{if}\;y \leq -1.85 \cdot 10^{-79}:\\ \;\;\;\;x - \frac{\frac{y}{z}}{3}\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{-177}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-124}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.15 \cdot 10^{-89}:\\ \;\;\;\;\frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Error2.0
Cost968
\[\begin{array}{l} t_1 := x - \left(y - \frac{t}{y}\right) \cdot \frac{0.3333333333333333}{z}\\ \mathbf{if}\;y \leq -2.16 \cdot 10^{-60}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{-36}:\\ \;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error2.0
Cost968
\[\begin{array}{l} t_1 := y - \frac{t}{y}\\ \mathbf{if}\;y \leq -1.75 \cdot 10^{-58}:\\ \;\;\;\;x - t_1 \cdot \frac{0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{-36}:\\ \;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{-0.3333333333333333}{\frac{z}{t_1}}\\ \end{array} \]
Alternative 12
Error2.0
Cost968
\[\begin{array}{l} t_1 := x + \frac{y - \frac{t}{y}}{z \cdot -3}\\ \mathbf{if}\;y \leq -2.6 \cdot 10^{-60}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{-36}:\\ \;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 13
Error29.1
Cost848
\[\begin{array}{l} t_1 := y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{if}\;x \leq -1.9 \cdot 10^{+192}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -1.5 \cdot 10^{+137}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -2.2 \cdot 10^{+30}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.9 \cdot 10^{+31}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 14
Error29.2
Cost848
\[\begin{array}{l} \mathbf{if}\;x \leq -1.9 \cdot 10^{+192}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -1.5 \cdot 10^{+137}:\\ \;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;x \leq -5 \cdot 10^{+33}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{+37}:\\ \;\;\;\;\frac{y}{z \cdot -3}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 15
Error29.2
Cost848
\[\begin{array}{l} \mathbf{if}\;x \leq -1.9 \cdot 10^{+192}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -1.5 \cdot 10^{+137}:\\ \;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;x \leq -5.8 \cdot 10^{+32}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 6 \cdot 10^{+33}:\\ \;\;\;\;\frac{y}{\frac{z}{-0.3333333333333333}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 16
Error12.1
Cost840
\[\begin{array}{l} \mathbf{if}\;x \leq -1.22 \cdot 10^{-149}:\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \mathbf{elif}\;x \leq 4.2 \cdot 10^{-102}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{\frac{y}{z}}{3}\\ \end{array} \]
Alternative 17
Error12.0
Cost840
\[\begin{array}{l} \mathbf{if}\;x \leq -1.22 \cdot 10^{-149}:\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \mathbf{elif}\;x \leq 6.8 \cdot 10^{-101}:\\ \;\;\;\;\frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;x - \frac{\frac{y}{z}}{3}\\ \end{array} \]
Alternative 18
Error1.8
Cost832
\[x + \frac{\frac{\frac{t}{z}}{y} - \frac{y}{z}}{3} \]
Alternative 19
Error37.1
Cost64
\[x \]

Error

Reproduce

herbie shell --seed 2022329 
(FPCore (x y z t)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, H"
  :precision binary64

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

  (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))