?

Average Error: 7.4 → 7.4
Time: 8.0s
Precision: binary64
Cost: 576

?

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

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original7.4
Target8.2
Herbie7.4
\[\begin{array}{l} \mathbf{if}\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} < 0:\\ \;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{1}{\left(y - z\right) \cdot \left(t - z\right)}\\ \end{array} \]

Derivation?

  1. Initial program 7.4

    \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
  2. Final simplification7.4

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

Alternatives

Alternative 1
Error19.4
Cost976
\[\begin{array}{l} t_1 := \frac{x}{\left(t - z\right) \cdot y}\\ \mathbf{if}\;t \leq -4.8 \cdot 10^{-85}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{-29}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\ \mathbf{elif}\;t \leq 55:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1000000:\\ \;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \end{array} \]
Alternative 2
Error19.9
Cost844
\[\begin{array}{l} t_1 := \frac{x}{z \cdot \left(z - t\right)}\\ \mathbf{if}\;z \leq -2 \cdot 10^{+107}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-22}:\\ \;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-57}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 3
Error34.7
Cost780
\[\begin{array}{l} t_1 := \frac{x}{z \cdot \left(-t\right)}\\ \mathbf{if}\;z \leq -5.5 \cdot 10^{+111}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -3.75 \cdot 10^{-41}:\\ \;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-85}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 4
Error23.3
Cost712
\[\begin{array}{l} t_1 := \frac{x}{t \cdot \left(y - z\right)}\\ \mathbf{if}\;t \leq -1.05 \cdot 10^{-102}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{-194}:\\ \;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error17.6
Cost712
\[\begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{-41}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-57}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\ \end{array} \]
Alternative 6
Error34.1
Cost648
\[\begin{array}{l} t_1 := \frac{x}{y \cdot \left(-z\right)}\\ \mathbf{if}\;z \leq -1.04 \cdot 10^{-45}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-39}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Error40.2
Cost320
\[\frac{x}{y \cdot t} \]

Error

Reproduce?

herbie shell --seed 2023090 
(FPCore (x y z t)
  :name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
  :precision binary64

  :herbie-target
  (if (< (/ x (* (- y z) (- t z))) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 (* (- y z) (- t z)))))

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