Average Error: 0.7 → 0.7
Time: 12.8s
Precision: binary64
Cost: 704
\[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
\[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
(FPCore (x y z t) :precision binary64 (- 1.0 (/ x (* (- y z) (- y t)))))
(FPCore (x y z t) :precision binary64 (- 1.0 (/ x (* (- y z) (- y t)))))
double code(double x, double y, double z, double t) {
	return 1.0 - (x / ((y - z) * (y - t)));
}
double code(double x, double y, double z, double t) {
	return 1.0 - (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 = 1.0d0 - (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 = 1.0d0 - (x / ((y - z) * (y - t)))
end function
public static double code(double x, double y, double z, double t) {
	return 1.0 - (x / ((y - z) * (y - t)));
}
public static double code(double x, double y, double z, double t) {
	return 1.0 - (x / ((y - z) * (y - t)));
}
def code(x, y, z, t):
	return 1.0 - (x / ((y - z) * (y - t)))
def code(x, y, z, t):
	return 1.0 - (x / ((y - z) * (y - t)))
function code(x, y, z, t)
	return Float64(1.0 - Float64(x / Float64(Float64(y - z) * Float64(y - t))))
end
function code(x, y, z, t)
	return Float64(1.0 - Float64(x / Float64(Float64(y - z) * Float64(y - t))))
end
function tmp = code(x, y, z, t)
	tmp = 1.0 - (x / ((y - z) * (y - t)));
end
function tmp = code(x, y, z, t)
	tmp = 1.0 - (x / ((y - z) * (y - t)));
end
code[x_, y_, z_, t_] := N[(1.0 - N[(x / N[(N[(y - z), $MachinePrecision] * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_] := N[(1.0 - N[(x / N[(N[(y - z), $MachinePrecision] * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}
1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.7

    \[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
  2. Final simplification0.7

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

Alternatives

Alternative 1
Error17.0
Cost1241
\[\begin{array}{l} t_1 := 1 - \frac{x}{z \cdot t}\\ \mathbf{if}\;t \leq -4.5 \cdot 10^{-133}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.95 \cdot 10^{-289}:\\ \;\;\;\;1 + \frac{x}{y \cdot z}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-125}:\\ \;\;\;\;1 - \frac{\frac{x}{y}}{y}\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-42} \lor \neg \left(t \leq 8.2 \cdot 10^{+101}\right) \land t \leq 2.25 \cdot 10^{+164}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 2
Error17.0
Cost1241
\[\begin{array}{l} t_1 := 1 - \frac{x}{z \cdot t}\\ \mathbf{if}\;t \leq -2.5 \cdot 10^{-135}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.7 \cdot 10^{-289}:\\ \;\;\;\;1 + \frac{x}{y \cdot z}\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-125}:\\ \;\;\;\;1 + \frac{x}{y} \cdot \frac{-1}{y}\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{-41} \lor \neg \left(t \leq 6.2 \cdot 10^{+101}\right) \land t \leq 5.5 \cdot 10^{+164}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 3
Error8.5
Cost1104
\[\begin{array}{l} t_1 := 1 - \frac{x}{z \cdot \left(t - y\right)}\\ \mathbf{if}\;t \leq -3.3 \cdot 10^{-199}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-126}:\\ \;\;\;\;1 - \frac{x}{y \cdot \left(y - z\right)}\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-38}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-23}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{x}{t \cdot \left(z - y\right)}\\ \end{array} \]
Alternative 4
Error13.7
Cost972
\[\begin{array}{l} \mathbf{if}\;t \leq -3.2 \cdot 10^{-133}:\\ \;\;\;\;1 - \frac{x}{z \cdot t}\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-289}:\\ \;\;\;\;1 + \frac{x}{y \cdot z}\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{-125}:\\ \;\;\;\;1 + \frac{x}{y} \cdot \frac{-1}{y}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{x}{t \cdot \left(z - y\right)}\\ \end{array} \]
Alternative 5
Error9.6
Cost840
\[\begin{array}{l} \mathbf{if}\;t \leq -4.5 \cdot 10^{-133}:\\ \;\;\;\;1 - \frac{x}{z \cdot t}\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-54}:\\ \;\;\;\;1 - \frac{x}{y \cdot \left(y - z\right)}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{x}{t \cdot \left(z - y\right)}\\ \end{array} \]
Alternative 6
Error8.3
Cost840
\[\begin{array}{l} \mathbf{if}\;z \leq -1.06 \cdot 10^{-100}:\\ \;\;\;\;1 - \frac{x}{z \cdot \left(t - y\right)}\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{-206}:\\ \;\;\;\;1 - \frac{x}{y \cdot \left(y - t\right)}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{x}{t \cdot \left(z - y\right)}\\ \end{array} \]
Alternative 7
Error8.1
Cost840
\[\begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{-99}:\\ \;\;\;\;1 - \frac{x}{z \cdot \left(t - y\right)}\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-209}:\\ \;\;\;\;1 - \frac{\frac{x}{y - t}}{y}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{x}{t \cdot \left(z - y\right)}\\ \end{array} \]
Alternative 8
Error10.0
Cost712
\[\begin{array}{l} \mathbf{if}\;y \leq -7.6 \cdot 10^{-175}:\\ \;\;\;\;1\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{-58}:\\ \;\;\;\;1 - \frac{x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 9
Error13.1
Cost64
\[1 \]

Error

Reproduce

herbie shell --seed 2023016 
(FPCore (x y z t)
  :name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, A"
  :precision binary64
  (- 1.0 (/ x (* (- y z) (- y t)))))