
(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));
}
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));
}
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 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]
\begin{array}{l}
\\
\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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));
}
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));
}
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 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]
\begin{array}{l}
\\
\frac{x}{\left(y - z\right) \cdot \left(t - z\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 (* (- y z) (/ (- z t) x))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return -1.0 / ((y - z) * ((z - t) / x));
}
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) * ((z - t) / x))
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return -1.0 / ((y - z) * ((z - t) / x));
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return -1.0 / ((y - z) * ((z - t) / x))
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(z - t) / x))) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = -1.0 / ((y - z) * ((z - t) / x));
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[(y - z), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{-1}{\left(y - z\right) \cdot \frac{z - t}{x}}
\end{array}
Initial program 89.9%
associate-/l/97.6%
clear-num97.2%
inv-pow97.2%
div-inv96.8%
clear-num96.9%
Applied egg-rr96.9%
unpow-196.9%
Applied egg-rr96.9%
Final simplification96.9%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x t) y)) (t_2 (/ (- x) (* y z))))
(if (<= y -1.45e+179)
(/ (/ x y) (- z))
(if (<= y -2.8e+135)
t_1
(if (<= y -4e+62)
t_2
(if (<= y -7.2e+42)
t_1
(if (<= y -7e+32)
t_2
(if (or (<= y -2.2e-79) (not (<= y 1.8e-81)))
t_1
(/ (- x) (* z t))))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / t) / y;
double t_2 = -x / (y * z);
double tmp;
if (y <= -1.45e+179) {
tmp = (x / y) / -z;
} else if (y <= -2.8e+135) {
tmp = t_1;
} else if (y <= -4e+62) {
tmp = t_2;
} else if (y <= -7.2e+42) {
tmp = t_1;
} else if (y <= -7e+32) {
tmp = t_2;
} else if ((y <= -2.2e-79) || !(y <= 1.8e-81)) {
tmp = t_1;
} else {
tmp = -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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x / t) / y
t_2 = -x / (y * z)
if (y <= (-1.45d+179)) then
tmp = (x / y) / -z
else if (y <= (-2.8d+135)) then
tmp = t_1
else if (y <= (-4d+62)) then
tmp = t_2
else if (y <= (-7.2d+42)) then
tmp = t_1
else if (y <= (-7d+32)) then
tmp = t_2
else if ((y <= (-2.2d-79)) .or. (.not. (y <= 1.8d-81))) then
tmp = t_1
else
tmp = -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 t_1 = (x / t) / y;
double t_2 = -x / (y * z);
double tmp;
if (y <= -1.45e+179) {
tmp = (x / y) / -z;
} else if (y <= -2.8e+135) {
tmp = t_1;
} else if (y <= -4e+62) {
tmp = t_2;
} else if (y <= -7.2e+42) {
tmp = t_1;
} else if (y <= -7e+32) {
tmp = t_2;
} else if ((y <= -2.2e-79) || !(y <= 1.8e-81)) {
tmp = t_1;
} else {
tmp = -x / (z * t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / t) / y t_2 = -x / (y * z) tmp = 0 if y <= -1.45e+179: tmp = (x / y) / -z elif y <= -2.8e+135: tmp = t_1 elif y <= -4e+62: tmp = t_2 elif y <= -7.2e+42: tmp = t_1 elif y <= -7e+32: tmp = t_2 elif (y <= -2.2e-79) or not (y <= 1.8e-81): tmp = t_1 else: tmp = -x / (z * t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / t) / y) t_2 = Float64(Float64(-x) / Float64(y * z)) tmp = 0.0 if (y <= -1.45e+179) tmp = Float64(Float64(x / y) / Float64(-z)); elseif (y <= -2.8e+135) tmp = t_1; elseif (y <= -4e+62) tmp = t_2; elseif (y <= -7.2e+42) tmp = t_1; elseif (y <= -7e+32) tmp = t_2; elseif ((y <= -2.2e-79) || !(y <= 1.8e-81)) tmp = t_1; else tmp = Float64(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)
t_1 = (x / t) / y;
t_2 = -x / (y * z);
tmp = 0.0;
if (y <= -1.45e+179)
tmp = (x / y) / -z;
elseif (y <= -2.8e+135)
tmp = t_1;
elseif (y <= -4e+62)
tmp = t_2;
elseif (y <= -7.2e+42)
tmp = t_1;
elseif (y <= -7e+32)
tmp = t_2;
elseif ((y <= -2.2e-79) || ~((y <= 1.8e-81)))
tmp = t_1;
else
tmp = -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_] := Block[{t$95$1 = N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.45e+179], N[(N[(x / y), $MachinePrecision] / (-z)), $MachinePrecision], If[LessEqual[y, -2.8e+135], t$95$1, If[LessEqual[y, -4e+62], t$95$2, If[LessEqual[y, -7.2e+42], t$95$1, If[LessEqual[y, -7e+32], t$95$2, If[Or[LessEqual[y, -2.2e-79], N[Not[LessEqual[y, 1.8e-81]], $MachinePrecision]], t$95$1, N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{t}}{y}\\
t_2 := \frac{-x}{y \cdot z}\\
\mathbf{if}\;y \leq -1.45 \cdot 10^{+179}:\\
\;\;\;\;\frac{\frac{x}{y}}{-z}\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{+135}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4 \cdot 10^{+62}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -7.2 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -7 \cdot 10^{+32}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -2.2 \cdot 10^{-79} \lor \neg \left(y \leq 1.8 \cdot 10^{-81}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\end{array}
\end{array}
if y < -1.45000000000000009e179Initial program 91.2%
associate-/l/95.6%
div-inv95.5%
Applied egg-rr95.5%
Taylor expanded in y around inf 95.5%
Taylor expanded in t around 0 78.1%
mul-1-neg78.1%
associate-/r*78.1%
distribute-neg-frac278.1%
Simplified78.1%
if -1.45000000000000009e179 < y < -2.80000000000000002e135 or -4.00000000000000014e62 < y < -7.2000000000000002e42 or -7.0000000000000002e32 < y < -2.1999999999999999e-79 or 1.7999999999999999e-81 < y Initial program 87.0%
associate-/l/98.2%
clear-num97.5%
inv-pow97.5%
div-inv97.5%
clear-num97.5%
Applied egg-rr97.5%
Taylor expanded in z around 0 52.0%
associate-/r*53.7%
Simplified53.7%
if -2.80000000000000002e135 < y < -4.00000000000000014e62 or -7.2000000000000002e42 < y < -7.0000000000000002e32Initial program 95.0%
associate-/l/99.9%
div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 70.6%
Taylor expanded in t around 0 65.1%
associate-*r/65.1%
neg-mul-165.1%
*-commutative65.1%
Simplified65.1%
if -2.1999999999999999e-79 < y < 1.7999999999999999e-81Initial program 92.1%
Taylor expanded in y around 0 77.9%
associate-*r/77.9%
neg-mul-177.9%
Simplified77.9%
Taylor expanded in z around 0 43.0%
associate-*r/43.0%
neg-mul-143.0%
*-commutative43.0%
Simplified43.0%
Final simplification52.5%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x t) y)) (t_2 (/ (- x) (* y z))))
(if (<= y -2.3e+62)
t_2
(if (<= y -2.95e+44)
t_1
(if (<= y -7.6e+32)
t_2
(if (or (<= y -3.1e-78) (not (<= y 3.2e-81)))
t_1
(/ (- x) (* z t))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / t) / y;
double t_2 = -x / (y * z);
double tmp;
if (y <= -2.3e+62) {
tmp = t_2;
} else if (y <= -2.95e+44) {
tmp = t_1;
} else if (y <= -7.6e+32) {
tmp = t_2;
} else if ((y <= -3.1e-78) || !(y <= 3.2e-81)) {
tmp = t_1;
} else {
tmp = -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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x / t) / y
t_2 = -x / (y * z)
if (y <= (-2.3d+62)) then
tmp = t_2
else if (y <= (-2.95d+44)) then
tmp = t_1
else if (y <= (-7.6d+32)) then
tmp = t_2
else if ((y <= (-3.1d-78)) .or. (.not. (y <= 3.2d-81))) then
tmp = t_1
else
tmp = -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 t_1 = (x / t) / y;
double t_2 = -x / (y * z);
double tmp;
if (y <= -2.3e+62) {
tmp = t_2;
} else if (y <= -2.95e+44) {
tmp = t_1;
} else if (y <= -7.6e+32) {
tmp = t_2;
} else if ((y <= -3.1e-78) || !(y <= 3.2e-81)) {
tmp = t_1;
} else {
tmp = -x / (z * t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / t) / y t_2 = -x / (y * z) tmp = 0 if y <= -2.3e+62: tmp = t_2 elif y <= -2.95e+44: tmp = t_1 elif y <= -7.6e+32: tmp = t_2 elif (y <= -3.1e-78) or not (y <= 3.2e-81): tmp = t_1 else: tmp = -x / (z * t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / t) / y) t_2 = Float64(Float64(-x) / Float64(y * z)) tmp = 0.0 if (y <= -2.3e+62) tmp = t_2; elseif (y <= -2.95e+44) tmp = t_1; elseif (y <= -7.6e+32) tmp = t_2; elseif ((y <= -3.1e-78) || !(y <= 3.2e-81)) tmp = t_1; else tmp = Float64(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)
t_1 = (x / t) / y;
t_2 = -x / (y * z);
tmp = 0.0;
if (y <= -2.3e+62)
tmp = t_2;
elseif (y <= -2.95e+44)
tmp = t_1;
elseif (y <= -7.6e+32)
tmp = t_2;
elseif ((y <= -3.1e-78) || ~((y <= 3.2e-81)))
tmp = t_1;
else
tmp = -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_] := Block[{t$95$1 = N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.3e+62], t$95$2, If[LessEqual[y, -2.95e+44], t$95$1, If[LessEqual[y, -7.6e+32], t$95$2, If[Or[LessEqual[y, -3.1e-78], N[Not[LessEqual[y, 3.2e-81]], $MachinePrecision]], t$95$1, N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{t}}{y}\\
t_2 := \frac{-x}{y \cdot z}\\
\mathbf{if}\;y \leq -2.3 \cdot 10^{+62}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -2.95 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -7.6 \cdot 10^{+32}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -3.1 \cdot 10^{-78} \lor \neg \left(y \leq 3.2 \cdot 10^{-81}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\end{array}
\end{array}
if y < -2.29999999999999984e62 or -2.94999999999999982e44 < y < -7.6000000000000006e32Initial program 93.7%
associate-/l/97.8%
div-inv97.7%
Applied egg-rr97.7%
Taylor expanded in y around inf 85.6%
Taylor expanded in t around 0 66.9%
associate-*r/66.9%
neg-mul-166.9%
*-commutative66.9%
Simplified66.9%
if -2.29999999999999984e62 < y < -2.94999999999999982e44 or -7.6000000000000006e32 < y < -3.10000000000000018e-78 or 3.2e-81 < y Initial program 86.4%
associate-/l/98.2%
clear-num97.4%
inv-pow97.4%
div-inv97.4%
clear-num97.4%
Applied egg-rr97.4%
Taylor expanded in z around 0 50.7%
associate-/r*52.5%
Simplified52.5%
if -3.10000000000000018e-78 < y < 3.2e-81Initial program 92.1%
Taylor expanded in y around 0 77.9%
associate-*r/77.9%
neg-mul-177.9%
Simplified77.9%
Taylor expanded in z around 0 43.0%
associate-*r/43.0%
neg-mul-143.0%
*-commutative43.0%
Simplified43.0%
Final simplification51.4%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x t) y)))
(if (<= y -1.3e+63)
(/ (- x) (* y z))
(if (<= y -1.45e+45)
t_1
(if (<= y -6.5e+32)
(/ (/ x (- z)) y)
(if (or (<= y -1.4e-76) (not (<= y 1.15e-81)))
t_1
(/ (- x) (* z t))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / t) / y;
double tmp;
if (y <= -1.3e+63) {
tmp = -x / (y * z);
} else if (y <= -1.45e+45) {
tmp = t_1;
} else if (y <= -6.5e+32) {
tmp = (x / -z) / y;
} else if ((y <= -1.4e-76) || !(y <= 1.15e-81)) {
tmp = t_1;
} else {
tmp = -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) :: t_1
real(8) :: tmp
t_1 = (x / t) / y
if (y <= (-1.3d+63)) then
tmp = -x / (y * z)
else if (y <= (-1.45d+45)) then
tmp = t_1
else if (y <= (-6.5d+32)) then
tmp = (x / -z) / y
else if ((y <= (-1.4d-76)) .or. (.not. (y <= 1.15d-81))) then
tmp = t_1
else
tmp = -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 t_1 = (x / t) / y;
double tmp;
if (y <= -1.3e+63) {
tmp = -x / (y * z);
} else if (y <= -1.45e+45) {
tmp = t_1;
} else if (y <= -6.5e+32) {
tmp = (x / -z) / y;
} else if ((y <= -1.4e-76) || !(y <= 1.15e-81)) {
tmp = t_1;
} else {
tmp = -x / (z * t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / t) / y tmp = 0 if y <= -1.3e+63: tmp = -x / (y * z) elif y <= -1.45e+45: tmp = t_1 elif y <= -6.5e+32: tmp = (x / -z) / y elif (y <= -1.4e-76) or not (y <= 1.15e-81): tmp = t_1 else: tmp = -x / (z * t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / t) / y) tmp = 0.0 if (y <= -1.3e+63) tmp = Float64(Float64(-x) / Float64(y * z)); elseif (y <= -1.45e+45) tmp = t_1; elseif (y <= -6.5e+32) tmp = Float64(Float64(x / Float64(-z)) / y); elseif ((y <= -1.4e-76) || !(y <= 1.15e-81)) tmp = t_1; else tmp = Float64(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)
t_1 = (x / t) / y;
tmp = 0.0;
if (y <= -1.3e+63)
tmp = -x / (y * z);
elseif (y <= -1.45e+45)
tmp = t_1;
elseif (y <= -6.5e+32)
tmp = (x / -z) / y;
elseif ((y <= -1.4e-76) || ~((y <= 1.15e-81)))
tmp = t_1;
else
tmp = -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_] := Block[{t$95$1 = N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -1.3e+63], N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.45e+45], t$95$1, If[LessEqual[y, -6.5e+32], N[(N[(x / (-z)), $MachinePrecision] / y), $MachinePrecision], If[Or[LessEqual[y, -1.4e-76], N[Not[LessEqual[y, 1.15e-81]], $MachinePrecision]], t$95$1, N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{t}}{y}\\
\mathbf{if}\;y \leq -1.3 \cdot 10^{+63}:\\
\;\;\;\;\frac{-x}{y \cdot z}\\
\mathbf{elif}\;y \leq -1.45 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -6.5 \cdot 10^{+32}:\\
\;\;\;\;\frac{\frac{x}{-z}}{y}\\
\mathbf{elif}\;y \leq -1.4 \cdot 10^{-76} \lor \neg \left(y \leq 1.15 \cdot 10^{-81}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\end{array}
\end{array}
if y < -1.3000000000000001e63Initial program 92.8%
associate-/l/97.5%
div-inv97.4%
Applied egg-rr97.4%
Taylor expanded in y around inf 88.1%
Taylor expanded in t around 0 69.1%
associate-*r/69.1%
neg-mul-169.1%
*-commutative69.1%
Simplified69.1%
if -1.3000000000000001e63 < y < -1.4499999999999999e45 or -6.4999999999999994e32 < y < -1.40000000000000005e-76 or 1.14999999999999996e-81 < y Initial program 86.4%
associate-/l/98.2%
clear-num97.4%
inv-pow97.4%
div-inv97.4%
clear-num97.4%
Applied egg-rr97.4%
Taylor expanded in z around 0 50.7%
associate-/r*52.5%
Simplified52.5%
if -1.4499999999999999e45 < y < -6.4999999999999994e32Initial program 99.7%
associate-/l/99.7%
div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in y around inf 68.8%
un-div-inv68.8%
Applied egg-rr68.8%
Taylor expanded in t around 0 52.5%
associate-*r/52.5%
neg-mul-152.5%
Simplified52.5%
if -1.40000000000000005e-76 < y < 1.14999999999999996e-81Initial program 92.1%
Taylor expanded in y around 0 77.9%
associate-*r/77.9%
neg-mul-177.9%
Simplified77.9%
Taylor expanded in z around 0 43.0%
associate-*r/43.0%
neg-mul-143.0%
*-commutative43.0%
Simplified43.0%
Final simplification51.4%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (* z t))))
(if (<= z -2.65e+236)
t_1
(if (<= z -7e+61)
(/ x (* y z))
(if (or (<= z -1.6e+46) (not (<= z 5.6e-19))) t_1 (/ x (* y t)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = x / (z * t);
double tmp;
if (z <= -2.65e+236) {
tmp = t_1;
} else if (z <= -7e+61) {
tmp = x / (y * z);
} else if ((z <= -1.6e+46) || !(z <= 5.6e-19)) {
tmp = t_1;
} else {
tmp = 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) :: t_1
real(8) :: tmp
t_1 = x / (z * t)
if (z <= (-2.65d+236)) then
tmp = t_1
else if (z <= (-7d+61)) then
tmp = x / (y * z)
else if ((z <= (-1.6d+46)) .or. (.not. (z <= 5.6d-19))) then
tmp = t_1
else
tmp = 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 t_1 = x / (z * t);
double tmp;
if (z <= -2.65e+236) {
tmp = t_1;
} else if (z <= -7e+61) {
tmp = x / (y * z);
} else if ((z <= -1.6e+46) || !(z <= 5.6e-19)) {
tmp = t_1;
} else {
tmp = x / (y * t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = x / (z * t) tmp = 0 if z <= -2.65e+236: tmp = t_1 elif z <= -7e+61: tmp = x / (y * z) elif (z <= -1.6e+46) or not (z <= 5.6e-19): tmp = t_1 else: tmp = x / (y * t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(z * t)) tmp = 0.0 if (z <= -2.65e+236) tmp = t_1; elseif (z <= -7e+61) tmp = Float64(x / Float64(y * z)); elseif ((z <= -1.6e+46) || !(z <= 5.6e-19)) tmp = t_1; else tmp = 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)
t_1 = x / (z * t);
tmp = 0.0;
if (z <= -2.65e+236)
tmp = t_1;
elseif (z <= -7e+61)
tmp = x / (y * z);
elseif ((z <= -1.6e+46) || ~((z <= 5.6e-19)))
tmp = t_1;
else
tmp = 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_] := Block[{t$95$1 = N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.65e+236], t$95$1, If[LessEqual[z, -7e+61], N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -1.6e+46], N[Not[LessEqual[z, 5.6e-19]], $MachinePrecision]], t$95$1, N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{z \cdot t}\\
\mathbf{if}\;z \leq -2.65 \cdot 10^{+236}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7 \cdot 10^{+61}:\\
\;\;\;\;\frac{x}{y \cdot z}\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{+46} \lor \neg \left(z \leq 5.6 \cdot 10^{-19}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -2.64999999999999989e236 or -7.00000000000000036e61 < z < -1.5999999999999999e46 or 5.60000000000000005e-19 < z Initial program 89.2%
Taylor expanded in y around 0 84.0%
associate-*r/84.0%
neg-mul-184.0%
Simplified84.0%
add-sqr-sqrt41.6%
sqrt-unprod66.0%
sqr-neg66.0%
sqrt-unprod31.1%
add-sqr-sqrt65.8%
*-un-lft-identity65.8%
times-frac65.7%
Applied egg-rr65.7%
associate-*l/65.7%
*-lft-identity65.7%
Simplified65.7%
Taylor expanded in t around inf 39.1%
*-commutative39.1%
Simplified39.1%
if -2.64999999999999989e236 < z < -7.00000000000000036e61Initial program 76.3%
associate-/l/99.7%
div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 42.2%
Taylor expanded in t around 0 32.8%
mul-1-neg32.8%
associate-/r*39.7%
distribute-neg-frac239.7%
Simplified39.7%
div-inv39.7%
associate-/l*34.3%
add-sqr-sqrt34.3%
sqrt-unprod44.2%
sqr-neg44.2%
sqrt-unprod0.0%
add-sqr-sqrt30.4%
Applied egg-rr30.4%
associate-/r*30.4%
associate-*r/30.4%
*-commutative30.4%
*-rgt-identity30.4%
Simplified30.4%
if -1.5999999999999999e46 < z < 5.60000000000000005e-19Initial program 95.0%
Taylor expanded in z around 0 58.5%
Final simplification46.9%
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.25e+237)
(/ x (* z t))
(if (or (<= z -2.5e+68) (not (<= z 1.65e+216)))
(/ x (* y z))
(/ (/ x t) y))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.25e+237) {
tmp = x / (z * t);
} else if ((z <= -2.5e+68) || !(z <= 1.65e+216)) {
tmp = x / (y * z);
} else {
tmp = (x / t) / 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 (z <= (-1.25d+237)) then
tmp = x / (z * t)
else if ((z <= (-2.5d+68)) .or. (.not. (z <= 1.65d+216))) then
tmp = x / (y * z)
else
tmp = (x / t) / 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 (z <= -1.25e+237) {
tmp = x / (z * t);
} else if ((z <= -2.5e+68) || !(z <= 1.65e+216)) {
tmp = x / (y * z);
} else {
tmp = (x / t) / y;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= -1.25e+237: tmp = x / (z * t) elif (z <= -2.5e+68) or not (z <= 1.65e+216): tmp = x / (y * z) else: tmp = (x / t) / y return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -1.25e+237) tmp = Float64(x / Float64(z * t)); elseif ((z <= -2.5e+68) || !(z <= 1.65e+216)) tmp = Float64(x / Float64(y * z)); else tmp = Float64(Float64(x / t) / 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 (z <= -1.25e+237)
tmp = x / (z * t);
elseif ((z <= -2.5e+68) || ~((z <= 1.65e+216)))
tmp = x / (y * z);
else
tmp = (x / t) / 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[z, -1.25e+237], N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -2.5e+68], N[Not[LessEqual[z, 1.65e+216]], $MachinePrecision]], N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+237}:\\
\;\;\;\;\frac{x}{z \cdot t}\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{+68} \lor \neg \left(z \leq 1.65 \cdot 10^{+216}\right):\\
\;\;\;\;\frac{x}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -1.2500000000000001e237Initial program 91.2%
Taylor expanded in y around 0 91.2%
associate-*r/91.2%
neg-mul-191.2%
Simplified91.2%
add-sqr-sqrt67.0%
sqrt-unprod81.0%
sqr-neg81.0%
sqrt-unprod24.2%
add-sqr-sqrt91.2%
*-un-lft-identity91.2%
times-frac91.1%
Applied egg-rr91.1%
associate-*l/91.1%
*-lft-identity91.1%
Simplified91.1%
Taylor expanded in t around inf 56.6%
*-commutative56.6%
Simplified56.6%
if -1.2500000000000001e237 < z < -2.5000000000000002e68 or 1.65e216 < z Initial program 80.4%
associate-/l/99.8%
div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 51.9%
Taylor expanded in t around 0 44.5%
mul-1-neg44.5%
associate-/r*48.9%
distribute-neg-frac248.9%
Simplified48.9%
div-inv48.9%
associate-/l*45.5%
add-sqr-sqrt20.4%
sqrt-unprod62.7%
sqr-neg62.7%
sqrt-unprod25.1%
add-sqr-sqrt43.1%
Applied egg-rr43.1%
associate-/r*43.1%
associate-*r/43.1%
*-commutative43.1%
*-rgt-identity43.1%
Simplified43.1%
if -2.5000000000000002e68 < z < 1.65e216Initial program 93.2%
associate-/l/96.5%
clear-num96.3%
inv-pow96.3%
div-inv95.7%
clear-num95.8%
Applied egg-rr95.8%
Taylor expanded in z around 0 47.5%
associate-/r*52.4%
Simplified52.4%
Final simplification50.5%
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 (<= z -1.35e+89) (not (<= z 5.5e+179))) (/ (/ x z) (- z)) (/ x (* (- y z) t))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.35e+89) || !(z <= 5.5e+179)) {
tmp = (x / z) / -z;
} else {
tmp = x / ((y - 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 ((z <= (-1.35d+89)) .or. (.not. (z <= 5.5d+179))) then
tmp = (x / z) / -z
else
tmp = x / ((y - 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 ((z <= -1.35e+89) || !(z <= 5.5e+179)) {
tmp = (x / z) / -z;
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if (z <= -1.35e+89) or not (z <= 5.5e+179): tmp = (x / z) / -z else: tmp = x / ((y - z) * t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -1.35e+89) || !(z <= 5.5e+179)) tmp = Float64(Float64(x / z) / Float64(-z)); else tmp = Float64(x / Float64(Float64(y - 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 ((z <= -1.35e+89) || ~((z <= 5.5e+179)))
tmp = (x / z) / -z;
else
tmp = x / ((y - 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[z, -1.35e+89], N[Not[LessEqual[z, 5.5e+179]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / (-z)), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+89} \lor \neg \left(z \leq 5.5 \cdot 10^{+179}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{-z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if z < -1.35e89 or 5.4999999999999998e179 < z Initial program 82.9%
Taylor expanded in y around 0 82.9%
associate-*r/82.9%
neg-mul-182.9%
Simplified82.9%
add-sqr-sqrt43.3%
sqrt-unprod69.9%
sqr-neg69.9%
sqrt-unprod33.2%
add-sqr-sqrt74.3%
*-un-lft-identity74.3%
times-frac74.0%
Applied egg-rr74.0%
associate-*l/74.0%
*-lft-identity74.0%
Simplified74.0%
Taylor expanded in t around 0 74.0%
associate-*r/54.7%
neg-mul-154.7%
Simplified74.0%
if -1.35e89 < z < 5.4999999999999998e179Initial program 93.5%
Taylor expanded in t around inf 65.8%
Final simplification68.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 (or (<= z -1.6e+89) (not (<= z 3.8e+98))) (/ x (* z (- t z))) (/ x (* (- y z) t))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.6e+89) || !(z <= 3.8e+98)) {
tmp = x / (z * (t - z));
} else {
tmp = x / ((y - 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 ((z <= (-1.6d+89)) .or. (.not. (z <= 3.8d+98))) then
tmp = x / (z * (t - z))
else
tmp = x / ((y - 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 ((z <= -1.6e+89) || !(z <= 3.8e+98)) {
tmp = x / (z * (t - z));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if (z <= -1.6e+89) or not (z <= 3.8e+98): tmp = x / (z * (t - z)) else: tmp = x / ((y - z) * t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -1.6e+89) || !(z <= 3.8e+98)) tmp = Float64(x / Float64(z * Float64(t - z))); else tmp = Float64(x / Float64(Float64(y - 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 ((z <= -1.6e+89) || ~((z <= 3.8e+98)))
tmp = x / (z * (t - z));
else
tmp = x / ((y - 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[z, -1.6e+89], N[Not[LessEqual[z, 3.8e+98]], $MachinePrecision]], N[(x / N[(z * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+89} \lor \neg \left(z \leq 3.8 \cdot 10^{+98}\right):\\
\;\;\;\;\frac{x}{z \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if z < -1.59999999999999994e89 or 3.7999999999999999e98 < z Initial program 85.4%
Taylor expanded in y around 0 85.4%
associate-*r/85.4%
neg-mul-185.4%
Simplified85.4%
add-sqr-sqrt46.7%
sqrt-unprod71.4%
sqr-neg71.4%
sqrt-unprod31.3%
add-sqr-sqrt72.4%
*-un-lft-identity72.4%
times-frac72.2%
Applied egg-rr72.2%
associate-*l/72.2%
*-lft-identity72.2%
Simplified72.2%
Taylor expanded in x around 0 72.4%
if -1.59999999999999994e89 < z < 3.7999999999999999e98Initial program 92.9%
Taylor expanded in t around inf 66.8%
Final simplification69.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 (or (<= z -5e+56) (not (<= z 1.2e-88))) (/ x (* z (- z t))) (/ (/ x t) (- y z))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5e+56) || !(z <= 1.2e-88)) {
tmp = x / (z * (z - t));
} else {
tmp = (x / t) / (y - 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 <= (-5d+56)) .or. (.not. (z <= 1.2d-88))) then
tmp = x / (z * (z - t))
else
tmp = (x / t) / (y - 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 <= -5e+56) || !(z <= 1.2e-88)) {
tmp = x / (z * (z - t));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if (z <= -5e+56) or not (z <= 1.2e-88): tmp = x / (z * (z - t)) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -5e+56) || !(z <= 1.2e-88)) tmp = Float64(x / Float64(z * Float64(z - t))); else tmp = Float64(Float64(x / t) / Float64(y - 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 <= -5e+56) || ~((z <= 1.2e-88)))
tmp = x / (z * (z - t));
else
tmp = (x / t) / (y - 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[Or[LessEqual[z, -5e+56], N[Not[LessEqual[z, 1.2e-88]], $MachinePrecision]], N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+56} \lor \neg \left(z \leq 1.2 \cdot 10^{-88}\right):\\
\;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if z < -5.00000000000000024e56 or 1.2e-88 < z Initial program 87.2%
Taylor expanded in y around 0 79.9%
associate-*r/79.9%
neg-mul-179.9%
Simplified79.9%
if -5.00000000000000024e56 < z < 1.2e-88Initial program 93.6%
associate-/l/94.6%
Simplified94.6%
Taylor expanded in t around inf 81.3%
Final simplification80.5%
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 (<= z -5e+56) (not (<= z 2.6e-93))) (/ (/ x z) (- z t)) (/ (/ x t) (- y z))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5e+56) || !(z <= 2.6e-93)) {
tmp = (x / z) / (z - t);
} else {
tmp = (x / t) / (y - 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 <= (-5d+56)) .or. (.not. (z <= 2.6d-93))) then
tmp = (x / z) / (z - t)
else
tmp = (x / t) / (y - 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 <= -5e+56) || !(z <= 2.6e-93)) {
tmp = (x / z) / (z - t);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if (z <= -5e+56) or not (z <= 2.6e-93): tmp = (x / z) / (z - t) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -5e+56) || !(z <= 2.6e-93)) tmp = Float64(Float64(x / z) / Float64(z - t)); else tmp = Float64(Float64(x / t) / Float64(y - 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 <= -5e+56) || ~((z <= 2.6e-93)))
tmp = (x / z) / (z - t);
else
tmp = (x / t) / (y - 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[Or[LessEqual[z, -5e+56], N[Not[LessEqual[z, 2.6e-93]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+56} \lor \neg \left(z \leq 2.6 \cdot 10^{-93}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if z < -5.00000000000000024e56 or 2.5999999999999998e-93 < z Initial program 87.2%
Taylor expanded in y around 0 79.4%
associate-*r/79.4%
neg-mul-179.4%
Simplified79.4%
neg-mul-179.4%
*-commutative79.4%
times-frac86.8%
Applied egg-rr86.8%
associate-*l/86.8%
associate-*r/86.8%
neg-mul-186.8%
Simplified86.8%
if -5.00000000000000024e56 < z < 2.5999999999999998e-93Initial program 93.6%
associate-/l/94.6%
Simplified94.6%
Taylor expanded in t around inf 82.0%
Final simplification84.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 (<= z -5e+56) (* (/ -1.0 (- t z)) (/ x z)) (if (<= z 2.6e-93) (/ (/ x t) (- y z)) (/ (/ x z) (- z t)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -5e+56) {
tmp = (-1.0 / (t - z)) * (x / z);
} else if (z <= 2.6e-93) {
tmp = (x / t) / (y - z);
} else {
tmp = (x / z) / (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 (z <= (-5d+56)) then
tmp = ((-1.0d0) / (t - z)) * (x / z)
else if (z <= 2.6d-93) then
tmp = (x / t) / (y - z)
else
tmp = (x / z) / (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 (z <= -5e+56) {
tmp = (-1.0 / (t - z)) * (x / z);
} else if (z <= 2.6e-93) {
tmp = (x / t) / (y - z);
} else {
tmp = (x / z) / (z - t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= -5e+56: tmp = (-1.0 / (t - z)) * (x / z) elif z <= 2.6e-93: tmp = (x / t) / (y - z) else: tmp = (x / z) / (z - t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -5e+56) tmp = Float64(Float64(-1.0 / Float64(t - z)) * Float64(x / z)); elseif (z <= 2.6e-93) tmp = Float64(Float64(x / t) / Float64(y - z)); else tmp = Float64(Float64(x / z) / 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 (z <= -5e+56)
tmp = (-1.0 / (t - z)) * (x / z);
elseif (z <= 2.6e-93)
tmp = (x / t) / (y - z);
else
tmp = (x / z) / (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[LessEqual[z, -5e+56], N[(N[(-1.0 / N[(t - z), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e-93], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+56}:\\
\;\;\;\;\frac{-1}{t - z} \cdot \frac{x}{z}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-93}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\end{array}
\end{array}
if z < -5.00000000000000024e56Initial program 82.1%
Taylor expanded in y around 0 79.2%
associate-*r/79.2%
neg-mul-179.2%
Simplified79.2%
neg-mul-179.2%
*-commutative79.2%
times-frac92.4%
Applied egg-rr92.4%
if -5.00000000000000024e56 < z < 2.5999999999999998e-93Initial program 93.6%
associate-/l/94.6%
Simplified94.6%
Taylor expanded in t around inf 82.0%
if 2.5999999999999998e-93 < z Initial program 91.1%
Taylor expanded in y around 0 79.5%
associate-*r/79.5%
neg-mul-179.5%
Simplified79.5%
neg-mul-179.5%
*-commutative79.5%
times-frac82.7%
Applied egg-rr82.7%
associate-*l/82.7%
associate-*r/82.7%
neg-mul-182.7%
Simplified82.7%
Final simplification84.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 (<= z -5e+56) (not (<= z 2.6e-93))) (/ (- x) (* z t)) (/ (/ x t) y)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5e+56) || !(z <= 2.6e-93)) {
tmp = -x / (z * t);
} else {
tmp = (x / t) / 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 ((z <= (-5d+56)) .or. (.not. (z <= 2.6d-93))) then
tmp = -x / (z * t)
else
tmp = (x / t) / 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 ((z <= -5e+56) || !(z <= 2.6e-93)) {
tmp = -x / (z * t);
} else {
tmp = (x / t) / y;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if (z <= -5e+56) or not (z <= 2.6e-93): tmp = -x / (z * t) else: tmp = (x / t) / y return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -5e+56) || !(z <= 2.6e-93)) tmp = Float64(Float64(-x) / Float64(z * t)); else tmp = Float64(Float64(x / t) / 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 ((z <= -5e+56) || ~((z <= 2.6e-93)))
tmp = -x / (z * t);
else
tmp = (x / t) / 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[Or[LessEqual[z, -5e+56], N[Not[LessEqual[z, 2.6e-93]], $MachinePrecision]], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+56} \lor \neg \left(z \leq 2.6 \cdot 10^{-93}\right):\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -5.00000000000000024e56 or 2.5999999999999998e-93 < z Initial program 87.2%
Taylor expanded in y around 0 79.4%
associate-*r/79.4%
neg-mul-179.4%
Simplified79.4%
Taylor expanded in z around 0 37.0%
associate-*r/37.0%
neg-mul-137.0%
*-commutative37.0%
Simplified37.0%
if -5.00000000000000024e56 < z < 2.5999999999999998e-93Initial program 93.6%
associate-/l/94.6%
clear-num94.4%
inv-pow94.4%
div-inv93.5%
clear-num93.5%
Applied egg-rr93.5%
Taylor expanded in z around 0 62.5%
associate-/r*66.1%
Simplified66.1%
Final simplification49.3%
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 (<= z -3.5e+64) (not (<= z 9.5e+24))) (/ (/ x z) (- z)) (/ (/ x t) y)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.5e+64) || !(z <= 9.5e+24)) {
tmp = (x / z) / -z;
} else {
tmp = (x / t) / 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 ((z <= (-3.5d+64)) .or. (.not. (z <= 9.5d+24))) then
tmp = (x / z) / -z
else
tmp = (x / t) / 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 ((z <= -3.5e+64) || !(z <= 9.5e+24)) {
tmp = (x / z) / -z;
} else {
tmp = (x / t) / y;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if (z <= -3.5e+64) or not (z <= 9.5e+24): tmp = (x / z) / -z else: tmp = (x / t) / y return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -3.5e+64) || !(z <= 9.5e+24)) tmp = Float64(Float64(x / z) / Float64(-z)); else tmp = Float64(Float64(x / t) / 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 ((z <= -3.5e+64) || ~((z <= 9.5e+24)))
tmp = (x / z) / -z;
else
tmp = (x / t) / 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[Or[LessEqual[z, -3.5e+64], N[Not[LessEqual[z, 9.5e+24]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / (-z)), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+64} \lor \neg \left(z \leq 9.5 \cdot 10^{+24}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{-z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -3.4999999999999999e64 or 9.5000000000000001e24 < z Initial program 86.5%
Taylor expanded in y around 0 82.6%
associate-*r/82.6%
neg-mul-182.6%
Simplified82.6%
add-sqr-sqrt43.9%
sqrt-unprod64.4%
sqr-neg64.4%
sqrt-unprod28.9%
add-sqr-sqrt64.5%
*-un-lft-identity64.5%
times-frac64.3%
Applied egg-rr64.3%
associate-*l/64.3%
*-lft-identity64.3%
Simplified64.3%
Taylor expanded in t around 0 62.1%
associate-*r/50.1%
neg-mul-150.1%
Simplified62.1%
if -3.4999999999999999e64 < z < 9.5000000000000001e24Initial program 93.2%
associate-/l/95.4%
clear-num95.2%
inv-pow95.2%
div-inv94.5%
clear-num94.6%
Applied egg-rr94.6%
Taylor expanded in z around 0 54.4%
associate-/r*58.7%
Simplified58.7%
Final simplification60.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 (or (<= z -1.1e+45) (not (<= z 1.45e-16))) (/ x (* z t)) (/ x (* y t))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.1e+45) || !(z <= 1.45e-16)) {
tmp = x / (z * t);
} else {
tmp = 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 ((z <= (-1.1d+45)) .or. (.not. (z <= 1.45d-16))) then
tmp = x / (z * t)
else
tmp = 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 ((z <= -1.1e+45) || !(z <= 1.45e-16)) {
tmp = x / (z * t);
} else {
tmp = x / (y * t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if (z <= -1.1e+45) or not (z <= 1.45e-16): tmp = x / (z * t) else: tmp = x / (y * t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -1.1e+45) || !(z <= 1.45e-16)) tmp = Float64(x / Float64(z * t)); else tmp = 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 ((z <= -1.1e+45) || ~((z <= 1.45e-16)))
tmp = x / (z * t);
else
tmp = 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[Or[LessEqual[z, -1.1e+45], N[Not[LessEqual[z, 1.45e-16]], $MachinePrecision]], N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+45} \lor \neg \left(z \leq 1.45 \cdot 10^{-16}\right):\\
\;\;\;\;\frac{x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -1.1e45 or 1.4499999999999999e-16 < z Initial program 85.4%
Taylor expanded in y around 0 81.1%
associate-*r/81.1%
neg-mul-181.1%
Simplified81.1%
add-sqr-sqrt40.7%
sqrt-unprod60.5%
sqr-neg60.5%
sqrt-unprod27.7%
add-sqr-sqrt60.6%
*-un-lft-identity60.6%
times-frac60.4%
Applied egg-rr60.4%
associate-*l/60.4%
*-lft-identity60.4%
Simplified60.4%
Taylor expanded in t around inf 33.5%
*-commutative33.5%
Simplified33.5%
if -1.1e45 < z < 1.4499999999999999e-16Initial program 95.0%
Taylor expanded in z around 0 58.5%
Final simplification45.3%
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.2e+70) (/ x (* (- y z) (- t z))) (/ (/ x t) (- y z))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 7.2e+70) {
tmp = x / ((y - z) * (t - z));
} else {
tmp = (x / t) / (y - 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 (t <= 7.2d+70) then
tmp = x / ((y - z) * (t - z))
else
tmp = (x / t) / (y - 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 (t <= 7.2e+70) {
tmp = x / ((y - z) * (t - z));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= 7.2e+70: tmp = x / ((y - z) * (t - z)) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= 7.2e+70) tmp = Float64(x / Float64(Float64(y - z) * Float64(t - z))); else tmp = Float64(Float64(x / t) / Float64(y - 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 (t <= 7.2e+70)
tmp = x / ((y - z) * (t - z));
else
tmp = (x / t) / (y - 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[t, 7.2e+70], N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 7.2 \cdot 10^{+70}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 7.1999999999999999e70Initial program 89.3%
if 7.1999999999999999e70 < t Initial program 92.3%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around inf 99.8%
Final simplification91.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 3.45e-6) (/ x (* y (- t z))) (/ x (* (- y z) t))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 3.45e-6) {
tmp = x / (y * (t - z));
} else {
tmp = x / ((y - 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 (t <= 3.45d-6) then
tmp = x / (y * (t - z))
else
tmp = x / ((y - 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 (t <= 3.45e-6) {
tmp = x / (y * (t - z));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= 3.45e-6: tmp = x / (y * (t - z)) else: tmp = x / ((y - z) * t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= 3.45e-6) tmp = Float64(x / Float64(y * Float64(t - z))); else tmp = Float64(x / Float64(Float64(y - 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 (t <= 3.45e-6)
tmp = x / (y * (t - z));
else
tmp = x / ((y - 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[LessEqual[t, 3.45e-6], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.45 \cdot 10^{-6}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < 3.45e-6Initial program 88.9%
Taylor expanded in y around inf 56.5%
*-commutative56.5%
Simplified56.5%
if 3.45e-6 < t Initial program 92.8%
Taylor expanded in t around inf 86.5%
Final simplification64.5%
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 1.7e-51) (/ x (* y (- t z))) (/ (/ x t) (- y z))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 1.7e-51) {
tmp = x / (y * (t - z));
} else {
tmp = (x / t) / (y - 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 (t <= 1.7d-51) then
tmp = x / (y * (t - z))
else
tmp = (x / t) / (y - 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 (t <= 1.7e-51) {
tmp = x / (y * (t - z));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= 1.7e-51: tmp = x / (y * (t - z)) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= 1.7e-51) tmp = Float64(x / Float64(y * Float64(t - z))); else tmp = Float64(Float64(x / t) / Float64(y - 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 (t <= 1.7e-51)
tmp = x / (y * (t - z));
else
tmp = (x / t) / (y - 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[t, 1.7e-51], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.7 \cdot 10^{-51}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 1.70000000000000001e-51Initial program 88.7%
Taylor expanded in y around inf 55.9%
*-commutative55.9%
Simplified55.9%
if 1.70000000000000001e-51 < t Initial program 93.1%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around inf 89.8%
Final simplification65.3%
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 0.00039) (/ (/ x y) (- t z)) (/ (/ x t) (- y z))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 0.00039) {
tmp = (x / y) / (t - z);
} else {
tmp = (x / t) / (y - 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 (t <= 0.00039d0) then
tmp = (x / y) / (t - z)
else
tmp = (x / t) / (y - 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 (t <= 0.00039) {
tmp = (x / y) / (t - z);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= 0.00039: tmp = (x / y) / (t - z) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= 0.00039) tmp = Float64(Float64(x / y) / Float64(t - z)); else tmp = Float64(Float64(x / t) / Float64(y - 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 (t <= 0.00039)
tmp = (x / y) / (t - z);
else
tmp = (x / t) / (y - 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[t, 0.00039], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 0.00039:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 3.89999999999999993e-4Initial program 88.9%
associate-/l/96.8%
clear-num96.3%
inv-pow96.3%
div-inv95.8%
clear-num95.9%
Applied egg-rr95.9%
Taylor expanded in y around inf 56.5%
associate-/r*60.3%
Simplified60.3%
if 3.89999999999999993e-4 < t Initial program 92.8%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around inf 89.3%
Final simplification68.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 2.75e-7) (/ (/ x (- t z)) y) (/ (/ x t) (- y z))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 2.75e-7) {
tmp = (x / (t - z)) / y;
} else {
tmp = (x / t) / (y - 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 (t <= 2.75d-7) then
tmp = (x / (t - z)) / y
else
tmp = (x / t) / (y - 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 (t <= 2.75e-7) {
tmp = (x / (t - z)) / y;
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= 2.75e-7: tmp = (x / (t - z)) / y else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= 2.75e-7) tmp = Float64(Float64(x / Float64(t - z)) / y); else tmp = Float64(Float64(x / t) / Float64(y - 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 (t <= 2.75e-7)
tmp = (x / (t - z)) / y;
else
tmp = (x / t) / (y - 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[t, 2.75e-7], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.75 \cdot 10^{-7}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 2.7500000000000001e-7Initial program 88.9%
associate-/l/96.8%
div-inv96.7%
Applied egg-rr96.7%
Taylor expanded in y around inf 60.5%
un-div-inv60.5%
Applied egg-rr60.5%
if 2.7500000000000001e-7 < t Initial program 92.8%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around inf 89.3%
Final simplification68.2%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (/ (/ x (- t z)) (- y z)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return (x / (t - z)) / (y - z);
}
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 = (x / (t - z)) / (y - z)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return (x / (t - z)) / (y - z);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return (x / (t - z)) / (y - z)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(Float64(x / Float64(t - z)) / Float64(y - z)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = (x / (t - z)) / (y - z);
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{\frac{x}{t - z}}{y - z}
\end{array}
Initial program 89.9%
associate-/l/97.6%
Simplified97.6%
Final simplification97.6%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (/ x (* y t)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return x / (y * t);
}
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 = x / (y * t)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return x / (y * t);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return x / (y * t)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(x / Float64(y * t)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = x / (y * t);
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{x}{y \cdot t}
\end{array}
Initial program 89.9%
Taylor expanded in z around 0 38.2%
Final simplification38.2%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* (- y z) (- t z)))) (if (< (/ x t_1) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if ((x / t_1) < 0.0) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = x * (1.0 / t_1);
}
return tmp;
}
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) :: t_1
real(8) :: tmp
t_1 = (y - z) * (t - z)
if ((x / t_1) < 0.0d0) then
tmp = (x / (y - z)) / (t - z)
else
tmp = x * (1.0d0 / t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if ((x / t_1) < 0.0) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = x * (1.0 / t_1);
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - z) * (t - z) tmp = 0 if (x / t_1) < 0.0: tmp = (x / (y - z)) / (t - z) else: tmp = x * (1.0 / t_1) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - z) * Float64(t - z)) tmp = 0.0 if (Float64(x / t_1) < 0.0) tmp = Float64(Float64(x / Float64(y - z)) / Float64(t - z)); else tmp = Float64(x * Float64(1.0 / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - z) * (t - z); tmp = 0.0; if ((x / t_1) < 0.0) tmp = (x / (y - z)) / (t - z); else tmp = x * (1.0 / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[Less[N[(x / t$95$1), $MachinePrecision], 0.0], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
\mathbf{if}\;\frac{x}{t\_1} < 0:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1}{t\_1}\\
\end{array}
\end{array}
herbie shell --seed 2024067
(FPCore (x y z t)
:name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
:precision binary64
:alt
(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))))