?

Average Accuracy: 83.2% → 97.8%
Time: 9.9s
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

Original83.2%
Target97.8%
Herbie97.8%
\[x + \frac{y}{\frac{a - t}{z - t}} \]

Derivation?

  1. Initial program 83.2%

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

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

    [Start]83.2

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

    associate-/l* [=>]97.8

    \[ x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
  3. Final simplification97.8%

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

Alternatives

Alternative 1
Accuracy87.0%
Cost841
\[\begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{-70} \lor \neg \left(z \leq 2.3 \cdot 10^{+45}\right):\\ \;\;\;\;x + \frac{z}{\frac{a - t}{y}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{\frac{a}{t} + -1}\\ \end{array} \]
Alternative 2
Accuracy83.3%
Cost840
\[\begin{array}{l} \mathbf{if}\;t \leq -2.9 \cdot 10^{+92}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-5}:\\ \;\;\;\;x + \frac{z}{\frac{a - t}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 3
Accuracy77.6%
Cost712
\[\begin{array}{l} \mathbf{if}\;t \leq -1.35 \cdot 10^{-10}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-6}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 4
Accuracy76.7%
Cost712
\[\begin{array}{l} \mathbf{if}\;t \leq -2.05 \cdot 10^{-10}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{-6}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 5
Accuracy95.4%
Cost704
\[x + \left(z - t\right) \cdot \frac{y}{a - t} \]
Alternative 6
Accuracy68.7%
Cost456
\[\begin{array}{l} \mathbf{if}\;t \leq -1.3 \cdot 10^{-10}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-5}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Alternative 7
Accuracy57.6%
Cost328
\[\begin{array}{l} \mathbf{if}\;x \leq -8.5 \cdot 10^{-176}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 3.1 \cdot 10^{-242}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 8
Accuracy55.1%
Cost64
\[x \]

Error

Reproduce?

herbie shell --seed 2023137 
(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))))