?

Average Error: 1.9 → 1.9
Time: 13.6s
Precision: binary64
Cost: 576

?

\[\frac{x - y}{z - y} \cdot t \]
\[\frac{x - y}{z - y} \cdot t \]
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
	return ((x - y) / (z - y)) * t;
}
double code(double x, double y, double z, double t) {
	return ((x - y) / (z - y)) * t;
}
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 - y)) * t
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
    code = ((x - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
	return ((x - y) / (z - y)) * t;
}
public static double code(double x, double y, double z, double t) {
	return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t):
	return ((x - y) / (z - y)) * t
def code(x, y, z, t):
	return ((x - y) / (z - y)) * t
function code(x, y, z, t)
	return Float64(Float64(Float64(x - y) / Float64(z - y)) * t)
end
function code(x, y, z, t)
	return Float64(Float64(Float64(x - y) / Float64(z - y)) * t)
end
function tmp = code(x, y, z, t)
	tmp = ((x - y) / (z - y)) * t;
end
function tmp = code(x, y, z, t)
	tmp = ((x - y) / (z - y)) * t;
end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\frac{x - y}{z - y} \cdot t
\frac{x - y}{z - y} \cdot t

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original1.9
Target2.0
Herbie1.9
\[\frac{t}{\frac{z - y}{x - y}} \]

Derivation?

  1. Initial program 1.9

    \[\frac{x - y}{z - y} \cdot t \]
  2. Final simplification1.9

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

Alternatives

Alternative 1
Error18.6
Cost1241
\[\begin{array}{l} t_1 := x \cdot \frac{t}{z - y}\\ t_2 := t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{if}\;y \leq -1.42 \cdot 10^{+91}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -3.1 \cdot 10^{-93}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{-307}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-99}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{+55} \lor \neg \left(y \leq 3.6 \cdot 10^{+87}\right):\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 2
Error18.5
Cost1241
\[\begin{array}{l} t_1 := x \cdot \frac{t}{z - y}\\ \mathbf{if}\;y \leq -1.55 \cdot 10^{+91}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -1.3 \cdot 10^{-93}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.65 \cdot 10^{-307}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{-99}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.92 \cdot 10^{+56} \lor \neg \left(y \leq 3.7 \cdot 10^{+87}\right):\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{t}{\frac{y}{x}}\\ \end{array} \]
Alternative 3
Error8.1
Cost1104
\[\begin{array}{l} t_1 := \left(x - y\right) \cdot \frac{t}{z - y}\\ t_2 := t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{if}\;y \leq -3.1 \cdot 10^{+122}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -2.7 \cdot 10^{-111}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.35 \cdot 10^{-307}:\\ \;\;\;\;\frac{t}{\frac{z}{x - y}}\\ \mathbf{elif}\;y \leq 1.95 \cdot 10^{+149}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Error21.8
Cost976
\[\begin{array}{l} t_1 := x \cdot \frac{t}{z - y}\\ \mathbf{if}\;y \leq -1.75 \cdot 10^{+93}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -9.2 \cdot 10^{-94}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -2.2 \cdot 10^{-307}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{+73}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
Alternative 5
Error18.9
Cost976
\[\begin{array}{l} t_1 := x \cdot \frac{t}{z - y}\\ t_2 := t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{if}\;y \leq -1.42 \cdot 10^{+91}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -9.4 \cdot 10^{-94}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -7.5 \cdot 10^{-308}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq 1.08 \cdot 10^{-63}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 6
Error18.1
Cost713
\[\begin{array}{l} \mathbf{if}\;y \leq -1.42 \cdot 10^{+91} \lor \neg \left(y \leq 1.08 \cdot 10^{-63}\right):\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{z}{x - y}}\\ \end{array} \]
Alternative 7
Error27.0
Cost584
\[\begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{+93}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{-99}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
Alternative 8
Error25.9
Cost584
\[\begin{array}{l} \mathbf{if}\;y \leq -1.42 \cdot 10^{+91}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 1.08 \cdot 10^{-63}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
Alternative 9
Error26.0
Cost584
\[\begin{array}{l} \mathbf{if}\;y \leq -1.42 \cdot 10^{+91}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 1.08 \cdot 10^{-63}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
Alternative 10
Error39.5
Cost64
\[t \]

Error

Reproduce?

herbie shell --seed 2023055 
(FPCore (x y z t)
  :name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
  :precision binary64

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

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