
(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)));
}
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)));
}
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 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]
\begin{array}{l}
\\
1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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)));
}
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)));
}
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 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]
\begin{array}{l}
\\
1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}
\end{array}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (- 1.0 (pow (* (- y z) (/ (- y t) x)) -1.0)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return 1.0 - pow(((y - z) * ((y - t) / x)), -1.0);
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this 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 - (((y - z) * ((y - t) / x)) ** (-1.0d0))
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return 1.0 - Math.pow(((y - z) * ((y - t) / x)), -1.0);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return 1.0 - math.pow(((y - z) * ((y - t) / x)), -1.0)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(1.0 - (Float64(Float64(y - z) * Float64(Float64(y - t) / x)) ^ -1.0)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = 1.0 - (((y - z) * ((y - t) / x)) ^ -1.0);
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(1.0 - N[Power[N[(N[(y - z), $MachinePrecision] * N[(N[(y - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
1 - {\left(\left(y - z\right) \cdot \frac{y - t}{x}\right)}^{-1}
\end{array}
Initial program 98.3%
clear-num98.3%
inv-pow98.3%
associate-/l*97.8%
Applied egg-rr97.8%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= y -5e-67) (not (<= y 3.5e-150))) (+ 1.0 (/ x (* y (- t y)))) (- 1.0 (/ x (* z t)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5e-67) || !(y <= 3.5e-150)) {
tmp = 1.0 + (x / (y * (t - y)));
} else {
tmp = 1.0 - (x / (z * t));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this 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
real(8) :: tmp
if ((y <= (-5d-67)) .or. (.not. (y <= 3.5d-150))) then
tmp = 1.0d0 + (x / (y * (t - y)))
else
tmp = 1.0d0 - (x / (z * t))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5e-67) || !(y <= 3.5e-150)) {
tmp = 1.0 + (x / (y * (t - y)));
} else {
tmp = 1.0 - (x / (z * t));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if (y <= -5e-67) or not (y <= 3.5e-150): tmp = 1.0 + (x / (y * (t - y))) else: tmp = 1.0 - (x / (z * t)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if ((y <= -5e-67) || !(y <= 3.5e-150)) tmp = Float64(1.0 + Float64(x / Float64(y * Float64(t - y)))); else tmp = Float64(1.0 - Float64(x / Float64(z * t))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((y <= -5e-67) || ~((y <= 3.5e-150)))
tmp = 1.0 + (x / (y * (t - y)));
else
tmp = 1.0 - (x / (z * t));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[y, -5e-67], N[Not[LessEqual[y, 3.5e-150]], $MachinePrecision]], N[(1.0 + N[(x / N[(y * N[(t - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{-67} \lor \neg \left(y \leq 3.5 \cdot 10^{-150}\right):\\
\;\;\;\;1 + \frac{x}{y \cdot \left(t - y\right)}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{x}{z \cdot t}\\
\end{array}
\end{array}
if y < -4.9999999999999999e-67 or 3.4999999999999998e-150 < y Initial program 99.8%
Taylor expanded in z around 0 90.2%
if -4.9999999999999999e-67 < y < 3.4999999999999998e-150Initial program 95.9%
Taylor expanded in y around 0 78.2%
Final simplification85.6%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= t -2e-162)
(+ 1.0 (* (/ x z) (/ -1.0 (- t y))))
(if (<= t 2.05e-57)
(+ 1.0 (/ (/ x y) (- z y)))
(- 1.0 (/ x (* t (- z y)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2e-162) {
tmp = 1.0 + ((x / z) * (-1.0 / (t - y)));
} else if (t <= 2.05e-57) {
tmp = 1.0 + ((x / y) / (z - y));
} else {
tmp = 1.0 - (x / (t * (z - y)));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this 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
real(8) :: tmp
if (t <= (-2d-162)) then
tmp = 1.0d0 + ((x / z) * ((-1.0d0) / (t - y)))
else if (t <= 2.05d-57) then
tmp = 1.0d0 + ((x / y) / (z - y))
else
tmp = 1.0d0 - (x / (t * (z - y)))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2e-162) {
tmp = 1.0 + ((x / z) * (-1.0 / (t - y)));
} else if (t <= 2.05e-57) {
tmp = 1.0 + ((x / y) / (z - y));
} else {
tmp = 1.0 - (x / (t * (z - y)));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -2e-162: tmp = 1.0 + ((x / z) * (-1.0 / (t - y))) elif t <= 2.05e-57: tmp = 1.0 + ((x / y) / (z - y)) else: tmp = 1.0 - (x / (t * (z - y))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -2e-162) tmp = Float64(1.0 + Float64(Float64(x / z) * Float64(-1.0 / Float64(t - y)))); elseif (t <= 2.05e-57) tmp = Float64(1.0 + Float64(Float64(x / y) / Float64(z - y))); else tmp = Float64(1.0 - Float64(x / Float64(t * Float64(z - y)))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -2e-162)
tmp = 1.0 + ((x / z) * (-1.0 / (t - y)));
elseif (t <= 2.05e-57)
tmp = 1.0 + ((x / y) / (z - y));
else
tmp = 1.0 - (x / (t * (z - y)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -2e-162], N[(1.0 + N[(N[(x / z), $MachinePrecision] * N[(-1.0 / N[(t - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.05e-57], N[(1.0 + N[(N[(x / y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(x / N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-162}:\\
\;\;\;\;1 + \frac{x}{z} \cdot \frac{-1}{t - y}\\
\mathbf{elif}\;t \leq 2.05 \cdot 10^{-57}:\\
\;\;\;\;1 + \frac{\frac{x}{y}}{z - y}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{x}{t \cdot \left(z - y\right)}\\
\end{array}
\end{array}
if t < -1.99999999999999991e-162Initial program 99.9%
Taylor expanded in z around inf 79.4%
associate-*r/79.4%
neg-mul-179.4%
*-commutative79.4%
Simplified79.4%
neg-mul-179.4%
times-frac78.5%
Applied egg-rr78.5%
if -1.99999999999999991e-162 < t < 2.0500000000000001e-57Initial program 95.1%
Taylor expanded in t around 0 84.5%
associate-/r*83.6%
Simplified83.6%
if 2.0500000000000001e-57 < t Initial program 99.7%
Taylor expanded in t around inf 95.3%
associate-*r/95.3%
neg-mul-195.3%
Simplified95.3%
Final simplification85.0%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= t -7.8e-162)
(- 1.0 (/ x (* z (- t y))))
(if (<= t 2.2e-57)
(+ 1.0 (/ (/ x y) (- z y)))
(- 1.0 (/ x (* t (- z y)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -7.8e-162) {
tmp = 1.0 - (x / (z * (t - y)));
} else if (t <= 2.2e-57) {
tmp = 1.0 + ((x / y) / (z - y));
} else {
tmp = 1.0 - (x / (t * (z - y)));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this 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
real(8) :: tmp
if (t <= (-7.8d-162)) then
tmp = 1.0d0 - (x / (z * (t - y)))
else if (t <= 2.2d-57) then
tmp = 1.0d0 + ((x / y) / (z - y))
else
tmp = 1.0d0 - (x / (t * (z - y)))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -7.8e-162) {
tmp = 1.0 - (x / (z * (t - y)));
} else if (t <= 2.2e-57) {
tmp = 1.0 + ((x / y) / (z - y));
} else {
tmp = 1.0 - (x / (t * (z - y)));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -7.8e-162: tmp = 1.0 - (x / (z * (t - y))) elif t <= 2.2e-57: tmp = 1.0 + ((x / y) / (z - y)) else: tmp = 1.0 - (x / (t * (z - y))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -7.8e-162) tmp = Float64(1.0 - Float64(x / Float64(z * Float64(t - y)))); elseif (t <= 2.2e-57) tmp = Float64(1.0 + Float64(Float64(x / y) / Float64(z - y))); else tmp = Float64(1.0 - Float64(x / Float64(t * Float64(z - y)))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -7.8e-162)
tmp = 1.0 - (x / (z * (t - y)));
elseif (t <= 2.2e-57)
tmp = 1.0 + ((x / y) / (z - y));
else
tmp = 1.0 - (x / (t * (z - y)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -7.8e-162], N[(1.0 - N[(x / N[(z * N[(t - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.2e-57], N[(1.0 + N[(N[(x / y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(x / N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.8 \cdot 10^{-162}:\\
\;\;\;\;1 - \frac{x}{z \cdot \left(t - y\right)}\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-57}:\\
\;\;\;\;1 + \frac{\frac{x}{y}}{z - y}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{x}{t \cdot \left(z - y\right)}\\
\end{array}
\end{array}
if t < -7.7999999999999999e-162Initial program 99.9%
Taylor expanded in z around inf 79.2%
associate-*r/79.2%
neg-mul-179.2%
*-commutative79.2%
Simplified79.2%
if -7.7999999999999999e-162 < t < 2.19999999999999999e-57Initial program 95.2%
Taylor expanded in t around 0 84.7%
associate-/r*83.8%
Simplified83.8%
if 2.19999999999999999e-57 < t Initial program 99.7%
Taylor expanded in t around inf 95.3%
associate-*r/95.3%
neg-mul-195.3%
Simplified95.3%
Final simplification85.4%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t -4.5e-81) (- 1.0 (* x (/ (/ 1.0 t) z))) (if (<= t 6e-57) (+ 1.0 (/ (/ x y) (- z y))) (- 1.0 (/ x (* t (- z y)))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4.5e-81) {
tmp = 1.0 - (x * ((1.0 / t) / z));
} else if (t <= 6e-57) {
tmp = 1.0 + ((x / y) / (z - y));
} else {
tmp = 1.0 - (x / (t * (z - y)));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this 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
real(8) :: tmp
if (t <= (-4.5d-81)) then
tmp = 1.0d0 - (x * ((1.0d0 / t) / z))
else if (t <= 6d-57) then
tmp = 1.0d0 + ((x / y) / (z - y))
else
tmp = 1.0d0 - (x / (t * (z - y)))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4.5e-81) {
tmp = 1.0 - (x * ((1.0 / t) / z));
} else if (t <= 6e-57) {
tmp = 1.0 + ((x / y) / (z - y));
} else {
tmp = 1.0 - (x / (t * (z - y)));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -4.5e-81: tmp = 1.0 - (x * ((1.0 / t) / z)) elif t <= 6e-57: tmp = 1.0 + ((x / y) / (z - y)) else: tmp = 1.0 - (x / (t * (z - y))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -4.5e-81) tmp = Float64(1.0 - Float64(x * Float64(Float64(1.0 / t) / z))); elseif (t <= 6e-57) tmp = Float64(1.0 + Float64(Float64(x / y) / Float64(z - y))); else tmp = Float64(1.0 - Float64(x / Float64(t * Float64(z - y)))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -4.5e-81)
tmp = 1.0 - (x * ((1.0 / t) / z));
elseif (t <= 6e-57)
tmp = 1.0 + ((x / y) / (z - y));
else
tmp = 1.0 - (x / (t * (z - y)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -4.5e-81], N[(1.0 - N[(x * N[(N[(1.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e-57], N[(1.0 + N[(N[(x / y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(x / N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{-81}:\\
\;\;\;\;1 - x \cdot \frac{\frac{1}{t}}{z}\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-57}:\\
\;\;\;\;1 + \frac{\frac{x}{y}}{z - y}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{x}{t \cdot \left(z - y\right)}\\
\end{array}
\end{array}
if t < -4.5e-81Initial program 99.9%
Taylor expanded in y around 0 75.0%
clear-num75.1%
inv-pow75.1%
*-commutative75.1%
associate-/l*72.9%
Applied egg-rr72.9%
unpow-172.9%
associate-*r/75.1%
*-commutative75.1%
associate-/l*73.9%
Simplified73.9%
associate-/r*73.9%
associate-/r/75.1%
Applied egg-rr75.1%
if -4.5e-81 < t < 6.00000000000000001e-57Initial program 96.0%
Taylor expanded in t around 0 82.4%
associate-/r*81.7%
Simplified81.7%
if 6.00000000000000001e-57 < t Initial program 99.7%
Taylor expanded in t around inf 95.3%
associate-*r/95.3%
neg-mul-195.3%
Simplified95.3%
Final simplification83.6%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -8.6e-60) (+ 1.0 (/ (/ x y) (- z y))) (if (<= y 6.6e-150) (- 1.0 (/ x (* z t))) (- 1.0 (/ x (* y (- y t)))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.6e-60) {
tmp = 1.0 + ((x / y) / (z - y));
} else if (y <= 6.6e-150) {
tmp = 1.0 - (x / (z * t));
} else {
tmp = 1.0 - (x / (y * (y - t)));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this 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
real(8) :: tmp
if (y <= (-8.6d-60)) then
tmp = 1.0d0 + ((x / y) / (z - y))
else if (y <= 6.6d-150) then
tmp = 1.0d0 - (x / (z * t))
else
tmp = 1.0d0 - (x / (y * (y - t)))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.6e-60) {
tmp = 1.0 + ((x / y) / (z - y));
} else if (y <= 6.6e-150) {
tmp = 1.0 - (x / (z * t));
} else {
tmp = 1.0 - (x / (y * (y - t)));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= -8.6e-60: tmp = 1.0 + ((x / y) / (z - y)) elif y <= 6.6e-150: tmp = 1.0 - (x / (z * t)) else: tmp = 1.0 - (x / (y * (y - t))) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -8.6e-60) tmp = Float64(1.0 + Float64(Float64(x / y) / Float64(z - y))); elseif (y <= 6.6e-150) tmp = Float64(1.0 - Float64(x / Float64(z * t))); else tmp = Float64(1.0 - Float64(x / Float64(y * Float64(y - t)))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -8.6e-60)
tmp = 1.0 + ((x / y) / (z - y));
elseif (y <= 6.6e-150)
tmp = 1.0 - (x / (z * t));
else
tmp = 1.0 - (x / (y * (y - t)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -8.6e-60], N[(1.0 + N[(N[(x / y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.6e-150], N[(1.0 - N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(x / N[(y * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.6 \cdot 10^{-60}:\\
\;\;\;\;1 + \frac{\frac{x}{y}}{z - y}\\
\mathbf{elif}\;y \leq 6.6 \cdot 10^{-150}:\\
\;\;\;\;1 - \frac{x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{x}{y \cdot \left(y - t\right)}\\
\end{array}
\end{array}
if y < -8.6000000000000001e-60Initial program 99.7%
Taylor expanded in t around 0 90.3%
associate-/r*90.3%
Simplified90.3%
if -8.6000000000000001e-60 < y < 6.6000000000000003e-150Initial program 96.0%
Taylor expanded in y around 0 78.1%
if 6.6000000000000003e-150 < y Initial program 99.9%
Taylor expanded in z around 0 89.0%
Final simplification85.0%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= z -1.5e-101) (+ 1.0 (/ x (* y (- z y)))) (if (<= z 7.2e-46) (- 1.0 (/ x (* y (- y t)))) (/ (- z (/ x t)) z))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.5e-101) {
tmp = 1.0 + (x / (y * (z - y)));
} else if (z <= 7.2e-46) {
tmp = 1.0 - (x / (y * (y - t)));
} else {
tmp = (z - (x / t)) / z;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this 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
real(8) :: tmp
if (z <= (-1.5d-101)) then
tmp = 1.0d0 + (x / (y * (z - y)))
else if (z <= 7.2d-46) then
tmp = 1.0d0 - (x / (y * (y - t)))
else
tmp = (z - (x / t)) / z
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.5e-101) {
tmp = 1.0 + (x / (y * (z - y)));
} else if (z <= 7.2e-46) {
tmp = 1.0 - (x / (y * (y - t)));
} else {
tmp = (z - (x / t)) / z;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= -1.5e-101: tmp = 1.0 + (x / (y * (z - y))) elif z <= 7.2e-46: tmp = 1.0 - (x / (y * (y - t))) else: tmp = (z - (x / t)) / z return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -1.5e-101) tmp = Float64(1.0 + Float64(x / Float64(y * Float64(z - y)))); elseif (z <= 7.2e-46) tmp = Float64(1.0 - Float64(x / Float64(y * Float64(y - t)))); else tmp = Float64(Float64(z - Float64(x / t)) / z); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (z <= -1.5e-101)
tmp = 1.0 + (x / (y * (z - y)));
elseif (z <= 7.2e-46)
tmp = 1.0 - (x / (y * (y - t)));
else
tmp = (z - (x / t)) / z;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[z, -1.5e-101], N[(1.0 + N[(x / N[(y * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.2e-46], N[(1.0 - N[(x / N[(y * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z - N[(x / t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{-101}:\\
\;\;\;\;1 + \frac{x}{y \cdot \left(z - y\right)}\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-46}:\\
\;\;\;\;1 - \frac{x}{y \cdot \left(y - t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z - \frac{x}{t}}{z}\\
\end{array}
\end{array}
if z < -1.5000000000000002e-101Initial program 99.6%
Taylor expanded in t around 0 77.6%
if -1.5000000000000002e-101 < z < 7.2e-46Initial program 95.7%
Taylor expanded in z around 0 87.1%
if 7.2e-46 < z Initial program 99.9%
Taylor expanded in y around 0 78.8%
Taylor expanded in z around 0 75.7%
Final simplification80.4%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -4.5e-79) 1.0 (if (<= y 7e-64) (/ (- z (/ x t)) z) 1.0)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.5e-79) {
tmp = 1.0;
} else if (y <= 7e-64) {
tmp = (z - (x / t)) / z;
} else {
tmp = 1.0;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this 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
real(8) :: tmp
if (y <= (-4.5d-79)) then
tmp = 1.0d0
else if (y <= 7d-64) then
tmp = (z - (x / t)) / z
else
tmp = 1.0d0
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.5e-79) {
tmp = 1.0;
} else if (y <= 7e-64) {
tmp = (z - (x / t)) / z;
} else {
tmp = 1.0;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= -4.5e-79: tmp = 1.0 elif y <= 7e-64: tmp = (z - (x / t)) / z else: tmp = 1.0 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -4.5e-79) tmp = 1.0; elseif (y <= 7e-64) tmp = Float64(Float64(z - Float64(x / t)) / z); else tmp = 1.0; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -4.5e-79)
tmp = 1.0;
elseif (y <= 7e-64)
tmp = (z - (x / t)) / z;
else
tmp = 1.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -4.5e-79], 1.0, If[LessEqual[y, 7e-64], N[(N[(z - N[(x / t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], 1.0]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.5 \cdot 10^{-79}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 7 \cdot 10^{-64}:\\
\;\;\;\;\frac{z - \frac{x}{t}}{z}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -4.5000000000000003e-79 or 7.0000000000000006e-64 < y Initial program 99.8%
Taylor expanded in y around 0 51.1%
Taylor expanded in x around 0 86.4%
if -4.5000000000000003e-79 < y < 7.0000000000000006e-64Initial program 96.3%
Taylor expanded in y around 0 73.3%
Taylor expanded in z around 0 71.1%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -7e-67) 1.0 (if (<= y 1.05e-60) (- 1.0 (/ x (* z t))) 1.0)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7e-67) {
tmp = 1.0;
} else if (y <= 1.05e-60) {
tmp = 1.0 - (x / (z * t));
} else {
tmp = 1.0;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this 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
real(8) :: tmp
if (y <= (-7d-67)) then
tmp = 1.0d0
else if (y <= 1.05d-60) then
tmp = 1.0d0 - (x / (z * t))
else
tmp = 1.0d0
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7e-67) {
tmp = 1.0;
} else if (y <= 1.05e-60) {
tmp = 1.0 - (x / (z * t));
} else {
tmp = 1.0;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= -7e-67: tmp = 1.0 elif y <= 1.05e-60: tmp = 1.0 - (x / (z * t)) else: tmp = 1.0 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -7e-67) tmp = 1.0; elseif (y <= 1.05e-60) tmp = Float64(1.0 - Float64(x / Float64(z * t))); else tmp = 1.0; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -7e-67)
tmp = 1.0;
elseif (y <= 1.05e-60)
tmp = 1.0 - (x / (z * t));
else
tmp = 1.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -7e-67], 1.0, If[LessEqual[y, 1.05e-60], N[(1.0 - N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{-67}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{-60}:\\
\;\;\;\;1 - \frac{x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -7.0000000000000001e-67 or 1.04999999999999996e-60 < y Initial program 99.8%
Taylor expanded in y around 0 50.1%
Taylor expanded in x around 0 86.6%
if -7.0000000000000001e-67 < y < 1.04999999999999996e-60Initial program 96.4%
Taylor expanded in y around 0 73.6%
Final simplification80.8%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= x -1.35e+174) (/ x (* t (- z))) (if (<= x 3.6e+171) 1.0 (+ 1.0 (/ x (* y t))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.35e+174) {
tmp = x / (t * -z);
} else if (x <= 3.6e+171) {
tmp = 1.0;
} else {
tmp = 1.0 + (x / (y * t));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this 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
real(8) :: tmp
if (x <= (-1.35d+174)) then
tmp = x / (t * -z)
else if (x <= 3.6d+171) then
tmp = 1.0d0
else
tmp = 1.0d0 + (x / (y * t))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.35e+174) {
tmp = x / (t * -z);
} else if (x <= 3.6e+171) {
tmp = 1.0;
} else {
tmp = 1.0 + (x / (y * t));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if x <= -1.35e+174: tmp = x / (t * -z) elif x <= 3.6e+171: tmp = 1.0 else: tmp = 1.0 + (x / (y * t)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (x <= -1.35e+174) tmp = Float64(x / Float64(t * Float64(-z))); elseif (x <= 3.6e+171) tmp = 1.0; else tmp = Float64(1.0 + Float64(x / Float64(y * t))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (x <= -1.35e+174)
tmp = x / (t * -z);
elseif (x <= 3.6e+171)
tmp = 1.0;
else
tmp = 1.0 + (x / (y * t));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[x, -1.35e+174], N[(x / N[(t * (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.6e+171], 1.0, N[(1.0 + N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \cdot 10^{+174}:\\
\;\;\;\;\frac{x}{t \cdot \left(-z\right)}\\
\mathbf{elif}\;x \leq 3.6 \cdot 10^{+171}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{x}{y \cdot t}\\
\end{array}
\end{array}
if x < -1.35e174Initial program 99.2%
Taylor expanded in y around 0 60.5%
Taylor expanded in x around inf 43.1%
associate-*r/43.1%
mul-1-neg43.1%
Simplified43.1%
if -1.35e174 < x < 3.60000000000000018e171Initial program 98.0%
Taylor expanded in y around 0 65.4%
Taylor expanded in x around 0 83.4%
if 3.60000000000000018e171 < x Initial program 99.7%
Taylor expanded in t around inf 53.8%
associate-*r/53.8%
neg-mul-153.8%
Simplified53.8%
Taylor expanded in y around inf 45.5%
*-commutative45.5%
Simplified45.5%
Final simplification75.0%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (+ 1.0 (* (/ x (- y t)) (/ 1.0 (- z y)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return 1.0 + ((x / (y - t)) * (1.0 / (z - y)));
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this 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 - t)) * (1.0d0 / (z - y)))
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return 1.0 + ((x / (y - t)) * (1.0 / (z - y)));
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return 1.0 + ((x / (y - t)) * (1.0 / (z - y)))
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(1.0 + Float64(Float64(x / Float64(y - t)) * Float64(1.0 / Float64(z - y)))) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = 1.0 + ((x / (y - t)) * (1.0 / (z - y)));
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(1.0 + N[(N[(x / N[(y - t), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
1 + \frac{x}{y - t} \cdot \frac{1}{z - y}
\end{array}
Initial program 98.3%
*-un-lft-identity98.3%
times-frac97.4%
Applied egg-rr97.4%
Final simplification97.4%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= x -1.35e+174) (/ x (* t (- z))) 1.0))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.35e+174) {
tmp = x / (t * -z);
} else {
tmp = 1.0;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this 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
real(8) :: tmp
if (x <= (-1.35d+174)) then
tmp = x / (t * -z)
else
tmp = 1.0d0
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.35e+174) {
tmp = x / (t * -z);
} else {
tmp = 1.0;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if x <= -1.35e+174: tmp = x / (t * -z) else: tmp = 1.0 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (x <= -1.35e+174) tmp = Float64(x / Float64(t * Float64(-z))); else tmp = 1.0; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (x <= -1.35e+174)
tmp = x / (t * -z);
else
tmp = 1.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[x, -1.35e+174], N[(x / N[(t * (-z)), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \cdot 10^{+174}:\\
\;\;\;\;\frac{x}{t \cdot \left(-z\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < -1.35e174Initial program 99.2%
Taylor expanded in y around 0 60.5%
Taylor expanded in x around inf 43.1%
associate-*r/43.1%
mul-1-neg43.1%
Simplified43.1%
if -1.35e174 < x Initial program 98.2%
Taylor expanded in y around 0 60.7%
Taylor expanded in x around 0 77.7%
Final simplification73.4%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (+ 1.0 (/ x (* (- y z) (- t y)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return 1.0 + (x / ((y - z) * (t - y)));
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this 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) * (t - y)))
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return 1.0 + (x / ((y - z) * (t - y)));
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return 1.0 + (x / ((y - z) * (t - y)))
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(1.0 + Float64(x / Float64(Float64(y - z) * Float64(t - y)))) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = 1.0 + (x / ((y - z) * (t - y)));
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(1.0 + N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
1 + \frac{x}{\left(y - z\right) \cdot \left(t - y\right)}
\end{array}
Initial program 98.3%
Final simplification98.3%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 1.0)
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return 1.0;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this 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
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return 1.0;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return 1.0
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return 1.0 end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = 1.0;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := 1.0
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
1
\end{array}
Initial program 98.3%
Taylor expanded in y around 0 60.6%
Taylor expanded in x around 0 71.7%
herbie shell --seed 2024107
(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)))))