?

Average Error: 0.6 → 1.1
Time: 26.0s
Precision: binary64
Cost: 832

?

\[ \begin{array}{c}[z, t] = \mathsf{sort}([z, t])\\ \end{array} \]
\[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
\[1 - \frac{\frac{-1}{y - t}}{\frac{z - y}{x}} \]
(FPCore (x y z t) :precision binary64 (- 1.0 (/ x (* (- y z) (- y t)))))
(FPCore (x y z t)
 :precision binary64
 (- 1.0 (/ (/ -1.0 (- y t)) (/ (- z y) x))))
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 - ((-1.0 / (y - t)) / ((z - y) / x));
}
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 - (((-1.0d0) / (y - t)) / ((z - y) / x))
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 - ((-1.0 / (y - t)) / ((z - y) / x));
}
def code(x, y, z, t):
	return 1.0 - (x / ((y - z) * (y - t)))
def code(x, y, z, t):
	return 1.0 - ((-1.0 / (y - t)) / ((z - y) / x))
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(Float64(-1.0 / Float64(y - t)) / Float64(Float64(z - y) / x)))
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 - ((-1.0 / (y - t)) / ((z - y) / x));
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[(N[(-1.0 / N[(y - t), $MachinePrecision]), $MachinePrecision] / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}
1 - \frac{\frac{-1}{y - t}}{\frac{z - y}{x}}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 0.6

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

    \[\leadsto 1 - \color{blue}{\frac{\frac{-1}{t - y}}{y - z} \cdot x} \]
  3. Applied egg-rr1.1

    \[\leadsto 1 - \color{blue}{\frac{\frac{-1}{y - t}}{\frac{z - y}{x}}} \]
  4. Final simplification1.1

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

Alternatives

Alternative 1
Error18.5
Cost908
\[\begin{array}{l} t_1 := \frac{x}{y \cdot t} - -1\\ \mathbf{if}\;t \leq 1.1 \cdot 10^{-124}:\\ \;\;\;\;\frac{x}{y \cdot z} - -1\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{-25}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+20}:\\ \;\;\;\;\frac{\frac{-x}{z}}{t} - -1\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Error18.5
Cost844
\[\begin{array}{l} t_1 := \frac{x}{y \cdot t} - -1\\ \mathbf{if}\;t \leq 10^{-124}:\\ \;\;\;\;\frac{x}{y \cdot z} - -1\\ \mathbf{elif}\;t \leq 8.8 \cdot 10^{-26}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{+19}:\\ \;\;\;\;1 - \frac{x}{t \cdot z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 3
Error9.2
Cost840
\[\begin{array}{l} t_1 := 1 - \frac{x}{y \cdot \left(y - z\right)}\\ \mathbf{if}\;y \leq -5.3 \cdot 10^{-132}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{-58}:\\ \;\;\;\;\frac{\frac{-x}{z}}{t} - -1\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 4
Error6.6
Cost840
\[\begin{array}{l} t_1 := 1 - \frac{x}{y \cdot \left(y - z\right)}\\ \mathbf{if}\;y \leq -9 \cdot 10^{-85}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{-56}:\\ \;\;\;\;1 - \frac{x}{\left(t - y\right) \cdot z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error6.8
Cost840
\[\begin{array}{l} t_1 := 1 - \frac{x}{y \cdot \left(y - z\right)}\\ \mathbf{if}\;y \leq -7.4 \cdot 10^{-84}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{-57}:\\ \;\;\;\;1 - \frac{\frac{x}{z}}{t - y}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error6.9
Cost840
\[\begin{array}{l} \mathbf{if}\;y \leq -8.6 \cdot 10^{-85}:\\ \;\;\;\;1 - \frac{\frac{x}{y - z}}{y}\\ \mathbf{elif}\;y \leq 6 \cdot 10^{-58}:\\ \;\;\;\;1 - \frac{\frac{x}{z}}{t - y}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{x}{y \cdot \left(y - z\right)}\\ \end{array} \]
Alternative 7
Error4.2
Cost840
\[\begin{array}{l} \mathbf{if}\;t \leq -1.3 \cdot 10^{-192}:\\ \;\;\;\;1 - \frac{\frac{x}{z}}{t - y}\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{-61}:\\ \;\;\;\;1 - \frac{\frac{x}{y - z}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z} - -1\\ \end{array} \]
Alternative 8
Error18.1
Cost712
\[\begin{array}{l} t_1 := \frac{x}{y \cdot t} - -1\\ \mathbf{if}\;y \leq -1.36 \cdot 10^{-42}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{+14}:\\ \;\;\;\;1 - \frac{x}{t \cdot z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error0.6
Cost704
\[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
Alternative 10
Error1.2
Cost704
\[\frac{\frac{x}{y - z}}{t - y} - -1 \]
Alternative 11
Error25.1
Cost448
\[1 - \frac{x}{t \cdot z} \]

Error

Reproduce?

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