?

Average Error: 16.58% → 2.03%
Time: 10.7s
Precision: binary64
Cost: 704

?

\[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
\[x + \frac{y}{\frac{a - t}{z - t}} \]
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- a t))))
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- a t) (- z t)))))
double code(double x, double y, double z, double t, double a) {
	return x + ((y * (z - t)) / (a - t));
}
double code(double x, double y, double z, double t, double a) {
	return x + (y / ((a - t) / (z - t)));
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x + ((y * (z - t)) / (a - t))
end function
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x + (y / ((a - t) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + ((y * (z - t)) / (a - t));
}
public static double code(double x, double y, double z, double t, double a) {
	return x + (y / ((a - t) / (z - t)));
}
def code(x, y, z, t, a):
	return x + ((y * (z - t)) / (a - t))
def code(x, y, z, t, a):
	return x + (y / ((a - t) / (z - t)))
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t)))
end
function code(x, y, z, t, a)
	return Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t))))
end
function tmp = code(x, y, z, t, a)
	tmp = x + ((y * (z - t)) / (a - t));
end
function tmp = code(x, y, z, t, a)
	tmp = x + (y / ((a - t) / (z - t)));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x + \frac{y \cdot \left(z - t\right)}{a - t}
x + \frac{y}{\frac{a - t}{z - t}}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original16.58%
Target2.03%
Herbie2.03%
\[x + \frac{y}{\frac{a - t}{z - t}} \]

Derivation?

  1. Initial program 16.58

    \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
  2. Simplified2.03

    \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    Proof

    [Start]16.58

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

    associate-/l* [=>]2.03

    \[ x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
  3. Final simplification2.03

    \[\leadsto x + \frac{y}{\frac{a - t}{z - t}} \]

Alternatives

Alternative 1
Error16.2%
Cost972
\[\begin{array}{l} t_1 := x + y \cdot \frac{t - z}{t}\\ \mathbf{if}\;t \leq -4 \cdot 10^{-49}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{-14}:\\ \;\;\;\;x + \frac{z - t}{\frac{a}{y}}\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{+179}:\\ \;\;\;\;x - t \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Error19.82%
Cost841
\[\begin{array}{l} \mathbf{if}\;x \leq -1.75 \cdot 10^{-93} \lor \neg \left(x \leq 1.8 \cdot 10^{-96}\right):\\ \;\;\;\;x - t \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]
Alternative 3
Error20.91%
Cost840
\[\begin{array}{l} \mathbf{if}\;t \leq -8 \cdot 10^{-48}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-13}:\\ \;\;\;\;x + \frac{z - t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 4
Error4.74%
Cost836
\[\begin{array}{l} \mathbf{if}\;t \leq 2.15 \cdot 10^{+192}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 5
Error22.41%
Cost712
\[\begin{array}{l} \mathbf{if}\;t \leq -2.4 \cdot 10^{-46}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{-14}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 6
Error22.32%
Cost712
\[\begin{array}{l} \mathbf{if}\;t \leq -6.1 \cdot 10^{-49}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{-14}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 7
Error30.97%
Cost456
\[\begin{array}{l} \mathbf{if}\;t \leq -5.4 \cdot 10^{-69}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-26}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 8
Error42.45%
Cost328
\[\begin{array}{l} \mathbf{if}\;x \leq -9.5 \cdot 10^{-161}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 4.3 \cdot 10^{-103}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 9
Error44.47%
Cost64
\[x \]

Error

Reproduce?

herbie shell --seed 2023090 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
  :precision binary64

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

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