
(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 (/ (/ 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 90.8%
associate-/l/96.1%
Simplified96.1%
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)) z)))
(if (<= y -3.7e+146)
(/ (/ x y) (- t z))
(if (<= y -1.25e+18)
(/ x (* (- t z) y))
(if (<= y -1.7e-101)
t_1
(if (<= y -1.55e-109)
(/ (/ x t) y)
(if (<= y 7.6e-44) t_1 (/ (/ x t) (- y z)))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / (z - t)) / z;
double tmp;
if (y <= -3.7e+146) {
tmp = (x / y) / (t - z);
} else if (y <= -1.25e+18) {
tmp = x / ((t - z) * y);
} else if (y <= -1.7e-101) {
tmp = t_1;
} else if (y <= -1.55e-109) {
tmp = (x / t) / y;
} else if (y <= 7.6e-44) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (x / (z - t)) / z
if (y <= (-3.7d+146)) then
tmp = (x / y) / (t - z)
else if (y <= (-1.25d+18)) then
tmp = x / ((t - z) * y)
else if (y <= (-1.7d-101)) then
tmp = t_1
else if (y <= (-1.55d-109)) then
tmp = (x / t) / y
else if (y <= 7.6d-44) then
tmp = t_1
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 t_1 = (x / (z - t)) / z;
double tmp;
if (y <= -3.7e+146) {
tmp = (x / y) / (t - z);
} else if (y <= -1.25e+18) {
tmp = x / ((t - z) * y);
} else if (y <= -1.7e-101) {
tmp = t_1;
} else if (y <= -1.55e-109) {
tmp = (x / t) / y;
} else if (y <= 7.6e-44) {
tmp = t_1;
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / (z - t)) / z tmp = 0 if y <= -3.7e+146: tmp = (x / y) / (t - z) elif y <= -1.25e+18: tmp = x / ((t - z) * y) elif y <= -1.7e-101: tmp = t_1 elif y <= -1.55e-109: tmp = (x / t) / y elif y <= 7.6e-44: tmp = t_1 else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / Float64(z - t)) / z) tmp = 0.0 if (y <= -3.7e+146) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= -1.25e+18) tmp = Float64(x / Float64(Float64(t - z) * y)); elseif (y <= -1.7e-101) tmp = t_1; elseif (y <= -1.55e-109) tmp = Float64(Float64(x / t) / y); elseif (y <= 7.6e-44) tmp = t_1; 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)
t_1 = (x / (z - t)) / z;
tmp = 0.0;
if (y <= -3.7e+146)
tmp = (x / y) / (t - z);
elseif (y <= -1.25e+18)
tmp = x / ((t - z) * y);
elseif (y <= -1.7e-101)
tmp = t_1;
elseif (y <= -1.55e-109)
tmp = (x / t) / y;
elseif (y <= 7.6e-44)
tmp = t_1;
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_] := Block[{t$95$1 = N[(N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[y, -3.7e+146], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.25e+18], N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.7e-101], t$95$1, If[LessEqual[y, -1.55e-109], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 7.6e-44], t$95$1, 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}
t_1 := \frac{\frac{x}{z - t}}{z}\\
\mathbf{if}\;y \leq -3.7 \cdot 10^{+146}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq -1.25 \cdot 10^{+18}:\\
\;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\
\mathbf{elif}\;y \leq -1.7 \cdot 10^{-101}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.55 \cdot 10^{-109}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;y \leq 7.6 \cdot 10^{-44}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -3.70000000000000004e146Initial program 75.2%
Taylor expanded in x around 0 75.2%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in y around inf 93.8%
if -3.70000000000000004e146 < y < -1.25e18Initial program 88.5%
Taylor expanded in y around inf 87.6%
*-commutative87.6%
Simplified87.6%
if -1.25e18 < y < -1.69999999999999995e-101 or -1.55e-109 < y < 7.6000000000000002e-44Initial program 93.4%
associate-/l/97.0%
div-inv96.9%
Applied egg-rr96.9%
associate-*l/93.9%
div-inv94.0%
div-inv94.0%
clear-num93.9%
associate-*l/94.4%
*-un-lft-identity94.4%
Applied egg-rr94.4%
Taylor expanded in y around 0 75.3%
associate-*r/75.3%
times-frac78.0%
associate-*l/78.1%
mul-1-neg78.1%
Simplified78.1%
if -1.69999999999999995e-101 < y < -1.55e-109Initial program 100.0%
associate-/l/100.0%
div-inv100.0%
Applied egg-rr100.0%
associate-*l/98.4%
div-inv100.0%
div-inv99.2%
clear-num99.2%
associate-*l/100.0%
*-un-lft-identity100.0%
Applied egg-rr100.0%
Taylor expanded in z around 0 52.0%
associate-/r*52.0%
Simplified52.0%
if 7.6000000000000002e-44 < y Initial program 93.6%
associate-/l/93.4%
Simplified93.4%
Taylor expanded in t around inf 51.2%
Final simplification74.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 (* z (- z t)))))
(if (<= y -1.75e+146)
(/ (/ x y) (- t z))
(if (<= y -2.2e+17)
(/ x (* (- t z) y))
(if (<= y -1.7e-101)
t_1
(if (<= y -1.25e-106)
(/ (/ x t) y)
(if (<= y 5.6e-87) t_1 (/ (/ x t) (- y z)))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = x / (z * (z - t));
double tmp;
if (y <= -1.75e+146) {
tmp = (x / y) / (t - z);
} else if (y <= -2.2e+17) {
tmp = x / ((t - z) * y);
} else if (y <= -1.7e-101) {
tmp = t_1;
} else if (y <= -1.25e-106) {
tmp = (x / t) / y;
} else if (y <= 5.6e-87) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x / (z * (z - t))
if (y <= (-1.75d+146)) then
tmp = (x / y) / (t - z)
else if (y <= (-2.2d+17)) then
tmp = x / ((t - z) * y)
else if (y <= (-1.7d-101)) then
tmp = t_1
else if (y <= (-1.25d-106)) then
tmp = (x / t) / y
else if (y <= 5.6d-87) then
tmp = t_1
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 t_1 = x / (z * (z - t));
double tmp;
if (y <= -1.75e+146) {
tmp = (x / y) / (t - z);
} else if (y <= -2.2e+17) {
tmp = x / ((t - z) * y);
} else if (y <= -1.7e-101) {
tmp = t_1;
} else if (y <= -1.25e-106) {
tmp = (x / t) / y;
} else if (y <= 5.6e-87) {
tmp = t_1;
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = x / (z * (z - t)) tmp = 0 if y <= -1.75e+146: tmp = (x / y) / (t - z) elif y <= -2.2e+17: tmp = x / ((t - z) * y) elif y <= -1.7e-101: tmp = t_1 elif y <= -1.25e-106: tmp = (x / t) / y elif y <= 5.6e-87: tmp = t_1 else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(z * Float64(z - t))) tmp = 0.0 if (y <= -1.75e+146) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= -2.2e+17) tmp = Float64(x / Float64(Float64(t - z) * y)); elseif (y <= -1.7e-101) tmp = t_1; elseif (y <= -1.25e-106) tmp = Float64(Float64(x / t) / y); elseif (y <= 5.6e-87) tmp = t_1; 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)
t_1 = x / (z * (z - t));
tmp = 0.0;
if (y <= -1.75e+146)
tmp = (x / y) / (t - z);
elseif (y <= -2.2e+17)
tmp = x / ((t - z) * y);
elseif (y <= -1.7e-101)
tmp = t_1;
elseif (y <= -1.25e-106)
tmp = (x / t) / y;
elseif (y <= 5.6e-87)
tmp = t_1;
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_] := Block[{t$95$1 = N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.75e+146], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.2e+17], N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.7e-101], t$95$1, If[LessEqual[y, -1.25e-106], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 5.6e-87], t$95$1, 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}
t_1 := \frac{x}{z \cdot \left(z - t\right)}\\
\mathbf{if}\;y \leq -1.75 \cdot 10^{+146}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq -2.2 \cdot 10^{+17}:\\
\;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\
\mathbf{elif}\;y \leq -1.7 \cdot 10^{-101}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.25 \cdot 10^{-106}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{-87}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -1.7500000000000001e146Initial program 75.2%
Taylor expanded in x around 0 75.2%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in y around inf 93.8%
if -1.7500000000000001e146 < y < -2.2e17Initial program 88.5%
Taylor expanded in y around inf 87.6%
*-commutative87.6%
Simplified87.6%
if -2.2e17 < y < -1.69999999999999995e-101 or -1.24999999999999996e-106 < y < 5.6000000000000002e-87Initial program 93.9%
Taylor expanded in y around 0 77.9%
associate-*r/77.9%
neg-mul-177.9%
Simplified77.9%
if -1.69999999999999995e-101 < y < -1.24999999999999996e-106Initial program 100.0%
associate-/l/100.0%
div-inv100.0%
Applied egg-rr100.0%
associate-*l/98.4%
div-inv100.0%
div-inv99.2%
clear-num99.2%
associate-*l/100.0%
*-un-lft-identity100.0%
Applied egg-rr100.0%
Taylor expanded in z around 0 52.0%
associate-/r*52.0%
Simplified52.0%
if 5.6000000000000002e-87 < y Initial program 92.7%
associate-/l/94.0%
Simplified94.0%
Taylor expanded in t around inf 55.5%
Final simplification74.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 (- z)) t)) (t_2 (/ x (* z (- y)))))
(if (<= z -2.6e+185)
t_2
(if (<= z -6e+61)
t_1
(if (<= z -1.05e-42)
t_2
(if (<= z 205000000000.0)
(/ (/ x t) y)
(if (<= z 1.1e+194) t_1 (/ (/ x z) y))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / -z) / t;
double t_2 = x / (z * -y);
double tmp;
if (z <= -2.6e+185) {
tmp = t_2;
} else if (z <= -6e+61) {
tmp = t_1;
} else if (z <= -1.05e-42) {
tmp = t_2;
} else if (z <= 205000000000.0) {
tmp = (x / t) / y;
} else if (z <= 1.1e+194) {
tmp = t_1;
} else {
tmp = (x / 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x / -z) / t
t_2 = x / (z * -y)
if (z <= (-2.6d+185)) then
tmp = t_2
else if (z <= (-6d+61)) then
tmp = t_1
else if (z <= (-1.05d-42)) then
tmp = t_2
else if (z <= 205000000000.0d0) then
tmp = (x / t) / y
else if (z <= 1.1d+194) then
tmp = t_1
else
tmp = (x / 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 t_1 = (x / -z) / t;
double t_2 = x / (z * -y);
double tmp;
if (z <= -2.6e+185) {
tmp = t_2;
} else if (z <= -6e+61) {
tmp = t_1;
} else if (z <= -1.05e-42) {
tmp = t_2;
} else if (z <= 205000000000.0) {
tmp = (x / t) / y;
} else if (z <= 1.1e+194) {
tmp = t_1;
} else {
tmp = (x / z) / y;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / -z) / t t_2 = x / (z * -y) tmp = 0 if z <= -2.6e+185: tmp = t_2 elif z <= -6e+61: tmp = t_1 elif z <= -1.05e-42: tmp = t_2 elif z <= 205000000000.0: tmp = (x / t) / y elif z <= 1.1e+194: tmp = t_1 else: tmp = (x / z) / y return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / Float64(-z)) / t) t_2 = Float64(x / Float64(z * Float64(-y))) tmp = 0.0 if (z <= -2.6e+185) tmp = t_2; elseif (z <= -6e+61) tmp = t_1; elseif (z <= -1.05e-42) tmp = t_2; elseif (z <= 205000000000.0) tmp = Float64(Float64(x / t) / y); elseif (z <= 1.1e+194) tmp = t_1; else tmp = Float64(Float64(x / z) / y); 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;
t_2 = x / (z * -y);
tmp = 0.0;
if (z <= -2.6e+185)
tmp = t_2;
elseif (z <= -6e+61)
tmp = t_1;
elseif (z <= -1.05e-42)
tmp = t_2;
elseif (z <= 205000000000.0)
tmp = (x / t) / y;
elseif (z <= 1.1e+194)
tmp = t_1;
else
tmp = (x / 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_] := Block[{t$95$1 = N[(N[(x / (-z)), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(z * (-y)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.6e+185], t$95$2, If[LessEqual[z, -6e+61], t$95$1, If[LessEqual[z, -1.05e-42], t$95$2, If[LessEqual[z, 205000000000.0], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1.1e+194], t$95$1, N[(N[(x / z), $MachinePrecision] / y), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{-z}}{t}\\
t_2 := \frac{x}{z \cdot \left(-y\right)}\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+185}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -6 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{-42}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 205000000000:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+194}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z}}{y}\\
\end{array}
\end{array}
if z < -2.60000000000000001e185 or -6e61 < z < -1.05000000000000003e-42Initial program 93.2%
associate-/l/95.5%
div-inv95.4%
div-inv95.3%
associate-*l*93.1%
Applied egg-rr93.1%
Taylor expanded in t around 0 76.6%
Taylor expanded in z around 0 49.1%
mul-1-neg49.1%
distribute-neg-frac249.1%
*-commutative49.1%
distribute-rgt-neg-out49.1%
Simplified49.1%
if -2.60000000000000001e185 < z < -6e61 or 2.05e11 < z < 1.1000000000000001e194Initial program 84.0%
associate-/l/99.7%
Simplified99.7%
Taylor expanded in t around inf 38.8%
Taylor expanded in y around 0 26.6%
associate-*r/26.6%
neg-mul-126.6%
Simplified26.6%
Taylor expanded in x around 0 26.6%
associate-*r/26.6%
times-frac41.1%
associate-*l/41.1%
mul-1-neg41.1%
distribute-frac-neg41.1%
Simplified41.1%
if -1.05000000000000003e-42 < z < 2.05e11Initial program 93.7%
associate-/l/93.1%
div-inv93.0%
Applied egg-rr93.0%
associate-*l/91.7%
div-inv91.9%
div-inv91.9%
clear-num91.8%
associate-*l/92.3%
*-un-lft-identity92.3%
Applied egg-rr92.3%
Taylor expanded in z around 0 57.6%
associate-/r*61.4%
Simplified61.4%
if 1.1000000000000001e194 < z Initial program 93.3%
associate-/l/99.9%
div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 56.4%
Taylor expanded in t around 0 53.9%
associate-*r/95.0%
neg-mul-195.0%
Simplified53.9%
un-div-inv53.9%
distribute-frac-neg53.9%
distribute-frac-neg53.9%
distribute-frac-neg253.9%
add-sqr-sqrt25.6%
sqrt-unprod37.8%
sqr-neg37.8%
sqrt-unprod28.2%
add-sqr-sqrt50.5%
Applied egg-rr50.5%
Final simplification52.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 (<= z -2.9e+185)
(/ x (* z (- y)))
(if (<= z -2.5e+84)
(/ (/ x (- z)) t)
(if (or (<= z -1.42e-39) (not (<= z 1.65e-26)))
(/ -1.0 (* y (/ z x)))
(/ (/ x t) y)))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.9e+185) {
tmp = x / (z * -y);
} else if (z <= -2.5e+84) {
tmp = (x / -z) / t;
} else if ((z <= -1.42e-39) || !(z <= 1.65e-26)) {
tmp = -1.0 / (y * (z / x));
} 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 <= (-2.9d+185)) then
tmp = x / (z * -y)
else if (z <= (-2.5d+84)) then
tmp = (x / -z) / t
else if ((z <= (-1.42d-39)) .or. (.not. (z <= 1.65d-26))) then
tmp = (-1.0d0) / (y * (z / x))
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 <= -2.9e+185) {
tmp = x / (z * -y);
} else if (z <= -2.5e+84) {
tmp = (x / -z) / t;
} else if ((z <= -1.42e-39) || !(z <= 1.65e-26)) {
tmp = -1.0 / (y * (z / x));
} 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 <= -2.9e+185: tmp = x / (z * -y) elif z <= -2.5e+84: tmp = (x / -z) / t elif (z <= -1.42e-39) or not (z <= 1.65e-26): tmp = -1.0 / (y * (z / x)) 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 <= -2.9e+185) tmp = Float64(x / Float64(z * Float64(-y))); elseif (z <= -2.5e+84) tmp = Float64(Float64(x / Float64(-z)) / t); elseif ((z <= -1.42e-39) || !(z <= 1.65e-26)) tmp = Float64(-1.0 / Float64(y * Float64(z / x))); 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 <= -2.9e+185)
tmp = x / (z * -y);
elseif (z <= -2.5e+84)
tmp = (x / -z) / t;
elseif ((z <= -1.42e-39) || ~((z <= 1.65e-26)))
tmp = -1.0 / (y * (z / x));
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, -2.9e+185], N[(x / N[(z * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.5e+84], N[(N[(x / (-z)), $MachinePrecision] / t), $MachinePrecision], If[Or[LessEqual[z, -1.42e-39], N[Not[LessEqual[z, 1.65e-26]], $MachinePrecision]], N[(-1.0 / N[(y * N[(z / x), $MachinePrecision]), $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 -2.9 \cdot 10^{+185}:\\
\;\;\;\;\frac{x}{z \cdot \left(-y\right)}\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{+84}:\\
\;\;\;\;\frac{\frac{x}{-z}}{t}\\
\mathbf{elif}\;z \leq -1.42 \cdot 10^{-39} \lor \neg \left(z \leq 1.65 \cdot 10^{-26}\right):\\
\;\;\;\;\frac{-1}{y \cdot \frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -2.89999999999999988e185Initial program 90.2%
associate-/l/100.0%
div-inv100.0%
div-inv100.0%
associate-*l*90.2%
Applied egg-rr90.2%
Taylor expanded in t around 0 90.2%
Taylor expanded in z around 0 59.9%
mul-1-neg59.9%
distribute-neg-frac259.9%
*-commutative59.9%
distribute-rgt-neg-out59.9%
Simplified59.9%
if -2.89999999999999988e185 < z < -2.5e84Initial program 71.4%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around inf 48.0%
Taylor expanded in y around 0 27.4%
associate-*r/27.4%
neg-mul-127.4%
Simplified27.4%
Taylor expanded in x around 0 27.4%
associate-*r/27.4%
times-frac47.2%
associate-*l/47.2%
mul-1-neg47.2%
distribute-frac-neg47.2%
Simplified47.2%
if -2.5e84 < z < -1.42000000000000005e-39 or 1.6499999999999999e-26 < z Initial program 91.6%
associate-/l/98.1%
div-inv98.0%
Applied egg-rr98.0%
Taylor expanded in y around inf 47.5%
Taylor expanded in t around 0 41.4%
associate-*r/77.8%
neg-mul-177.8%
Simplified41.4%
clear-num43.1%
frac-2neg43.1%
metadata-eval43.1%
frac-times44.3%
metadata-eval44.3%
add-sqr-sqrt20.2%
sqrt-unprod34.0%
sqr-neg34.0%
sqrt-unprod16.1%
add-sqr-sqrt29.9%
add-sqr-sqrt16.3%
sqrt-unprod27.2%
sqr-neg27.2%
sqrt-unprod19.3%
add-sqr-sqrt44.3%
Applied egg-rr44.3%
if -1.42000000000000005e-39 < z < 1.6499999999999999e-26Initial program 93.7%
associate-/l/92.6%
div-inv92.5%
Applied egg-rr92.5%
associate-*l/91.1%
div-inv91.3%
div-inv91.3%
clear-num91.2%
associate-*l/91.8%
*-un-lft-identity91.8%
Applied egg-rr91.8%
Taylor expanded in z around 0 61.3%
associate-/r*64.8%
Simplified64.8%
Final simplification54.1%
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_2 (/ x (* z (- y)))))
(if (<= z -1.05e+185)
t_2
(if (<= z -2.15e+61)
(/ t_1 t)
(if (<= z -1.42e-39)
t_2
(if (<= z 1.65e-26) (/ (/ x t) y) (/ t_1 y)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = x / -z;
double t_2 = x / (z * -y);
double tmp;
if (z <= -1.05e+185) {
tmp = t_2;
} else if (z <= -2.15e+61) {
tmp = t_1 / t;
} else if (z <= -1.42e-39) {
tmp = t_2;
} else if (z <= 1.65e-26) {
tmp = (x / t) / y;
} else {
tmp = t_1 / 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x / -z
t_2 = x / (z * -y)
if (z <= (-1.05d+185)) then
tmp = t_2
else if (z <= (-2.15d+61)) then
tmp = t_1 / t
else if (z <= (-1.42d-39)) then
tmp = t_2
else if (z <= 1.65d-26) then
tmp = (x / t) / y
else
tmp = t_1 / 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 t_1 = x / -z;
double t_2 = x / (z * -y);
double tmp;
if (z <= -1.05e+185) {
tmp = t_2;
} else if (z <= -2.15e+61) {
tmp = t_1 / t;
} else if (z <= -1.42e-39) {
tmp = t_2;
} else if (z <= 1.65e-26) {
tmp = (x / t) / y;
} else {
tmp = t_1 / y;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = x / -z t_2 = x / (z * -y) tmp = 0 if z <= -1.05e+185: tmp = t_2 elif z <= -2.15e+61: tmp = t_1 / t elif z <= -1.42e-39: tmp = t_2 elif z <= 1.65e-26: tmp = (x / t) / y else: tmp = t_1 / y return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(-z)) t_2 = Float64(x / Float64(z * Float64(-y))) tmp = 0.0 if (z <= -1.05e+185) tmp = t_2; elseif (z <= -2.15e+61) tmp = Float64(t_1 / t); elseif (z <= -1.42e-39) tmp = t_2; elseif (z <= 1.65e-26) tmp = Float64(Float64(x / t) / y); else tmp = Float64(t_1 / y); 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_2 = x / (z * -y);
tmp = 0.0;
if (z <= -1.05e+185)
tmp = t_2;
elseif (z <= -2.15e+61)
tmp = t_1 / t;
elseif (z <= -1.42e-39)
tmp = t_2;
elseif (z <= 1.65e-26)
tmp = (x / t) / y;
else
tmp = t_1 / 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_] := Block[{t$95$1 = N[(x / (-z)), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(z * (-y)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.05e+185], t$95$2, If[LessEqual[z, -2.15e+61], N[(t$95$1 / t), $MachinePrecision], If[LessEqual[z, -1.42e-39], t$95$2, If[LessEqual[z, 1.65e-26], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], N[(t$95$1 / y), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{-z}\\
t_2 := \frac{x}{z \cdot \left(-y\right)}\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{+185}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2.15 \cdot 10^{+61}:\\
\;\;\;\;\frac{t\_1}{t}\\
\mathbf{elif}\;z \leq -1.42 \cdot 10^{-39}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{-26}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{y}\\
\end{array}
\end{array}
if z < -1.05e185 or -2.1500000000000001e61 < z < -1.42000000000000005e-39Initial program 93.2%
associate-/l/95.5%
div-inv95.4%
div-inv95.3%
associate-*l*93.1%
Applied egg-rr93.1%
Taylor expanded in t around 0 76.6%
Taylor expanded in z around 0 49.1%
mul-1-neg49.1%
distribute-neg-frac249.1%
*-commutative49.1%
distribute-rgt-neg-out49.1%
Simplified49.1%
if -1.05e185 < z < -2.1500000000000001e61Initial program 77.0%
associate-/l/99.6%
Simplified99.6%
Taylor expanded in t around inf 47.0%
Taylor expanded in y around 0 26.9%
associate-*r/26.9%
neg-mul-126.9%
Simplified26.9%
Taylor expanded in x around 0 26.9%
associate-*r/26.9%
times-frac42.7%
associate-*l/42.8%
mul-1-neg42.8%
distribute-frac-neg42.8%
Simplified42.8%
if -1.42000000000000005e-39 < z < 1.6499999999999999e-26Initial program 93.7%
associate-/l/92.6%
div-inv92.5%
Applied egg-rr92.5%
associate-*l/91.1%
div-inv91.3%
div-inv91.3%
clear-num91.2%
associate-*l/91.8%
*-un-lft-identity91.8%
Applied egg-rr91.8%
Taylor expanded in z around 0 61.3%
associate-/r*64.8%
Simplified64.8%
if 1.6499999999999999e-26 < z Initial program 90.1%
associate-/l/99.8%
div-inv99.7%
div-inv99.6%
associate-*l*91.7%
Applied egg-rr91.7%
Taylor expanded in t around 0 80.4%
Taylor expanded in z around 0 35.0%
mul-1-neg35.0%
distribute-neg-frac235.0%
*-commutative35.0%
distribute-rgt-neg-out35.0%
Simplified35.0%
Taylor expanded in x around 0 35.0%
associate-/l/43.1%
neg-mul-143.1%
distribute-frac-neg243.1%
Simplified43.1%
Final simplification53.0%
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.7e+185)
(/ x (* z y))
(if (<= z -2.7e+24)
t_1
(if (<= z 260000000000.0)
(/ (/ x t) y)
(if (<= z 2.7e+191) t_1 (/ (/ x z) y)))))))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.7e+185) {
tmp = x / (z * y);
} else if (z <= -2.7e+24) {
tmp = t_1;
} else if (z <= 260000000000.0) {
tmp = (x / t) / y;
} else if (z <= 2.7e+191) {
tmp = t_1;
} else {
tmp = (x / 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) :: t_1
real(8) :: tmp
t_1 = (x / -z) / t
if (z <= (-2.7d+185)) then
tmp = x / (z * y)
else if (z <= (-2.7d+24)) then
tmp = t_1
else if (z <= 260000000000.0d0) then
tmp = (x / t) / y
else if (z <= 2.7d+191) then
tmp = t_1
else
tmp = (x / 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 t_1 = (x / -z) / t;
double tmp;
if (z <= -2.7e+185) {
tmp = x / (z * y);
} else if (z <= -2.7e+24) {
tmp = t_1;
} else if (z <= 260000000000.0) {
tmp = (x / t) / y;
} else if (z <= 2.7e+191) {
tmp = t_1;
} else {
tmp = (x / z) / y;
}
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.7e+185: tmp = x / (z * y) elif z <= -2.7e+24: tmp = t_1 elif z <= 260000000000.0: tmp = (x / t) / y elif z <= 2.7e+191: tmp = t_1 else: tmp = (x / z) / y return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / Float64(-z)) / t) tmp = 0.0 if (z <= -2.7e+185) tmp = Float64(x / Float64(z * y)); elseif (z <= -2.7e+24) tmp = t_1; elseif (z <= 260000000000.0) tmp = Float64(Float64(x / t) / y); elseif (z <= 2.7e+191) tmp = t_1; else tmp = Float64(Float64(x / z) / y); 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.7e+185)
tmp = x / (z * y);
elseif (z <= -2.7e+24)
tmp = t_1;
elseif (z <= 260000000000.0)
tmp = (x / t) / y;
elseif (z <= 2.7e+191)
tmp = t_1;
else
tmp = (x / 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_] := Block[{t$95$1 = N[(N[(x / (-z)), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[z, -2.7e+185], N[(x / N[(z * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.7e+24], t$95$1, If[LessEqual[z, 260000000000.0], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 2.7e+191], t$95$1, N[(N[(x / z), $MachinePrecision] / y), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{-z}}{t}\\
\mathbf{if}\;z \leq -2.7 \cdot 10^{+185}:\\
\;\;\;\;\frac{x}{z \cdot y}\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 260000000000:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+191}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z}}{y}\\
\end{array}
\end{array}
if z < -2.70000000000000007e185Initial program 90.2%
associate-/l/100.0%
div-inv100.0%
div-inv100.0%
associate-*l*90.2%
Applied egg-rr90.2%
Taylor expanded in t around 0 90.2%
Taylor expanded in z around 0 59.9%
mul-1-neg59.9%
distribute-neg-frac259.9%
*-commutative59.9%
distribute-rgt-neg-out59.9%
Simplified59.9%
frac-2neg59.9%
div-inv59.9%
add-sqr-sqrt22.4%
sqrt-unprod59.4%
sqr-neg59.4%
sqrt-unprod37.5%
add-sqr-sqrt59.8%
distribute-rgt-neg-out59.8%
remove-double-neg59.8%
add-sqr-sqrt17.0%
sqrt-unprod59.7%
sqr-neg59.7%
sqrt-unprod42.8%
add-sqr-sqrt59.9%
*-commutative59.9%
add-sqr-sqrt42.8%
sqrt-unprod59.7%
sqr-neg59.7%
sqrt-unprod17.0%
add-sqr-sqrt59.8%
Applied egg-rr59.8%
associate-*r/59.8%
*-rgt-identity59.8%
Simplified59.8%
if -2.70000000000000007e185 < z < -2.7e24 or 2.6e11 < z < 2.69999999999999996e191Initial program 84.8%
associate-/l/99.7%
Simplified99.7%
Taylor expanded in t around inf 40.5%
Taylor expanded in y around 0 28.6%
associate-*r/28.6%
neg-mul-128.6%
Simplified28.6%
Taylor expanded in x around 0 28.6%
associate-*r/28.6%
times-frac41.3%
associate-*l/41.4%
mul-1-neg41.4%
distribute-frac-neg41.4%
Simplified41.4%
if -2.7e24 < z < 2.6e11Initial program 94.3%
associate-/l/92.3%
div-inv92.2%
Applied egg-rr92.2%
associate-*l/92.5%
div-inv92.7%
div-inv92.7%
clear-num92.6%
associate-*l/93.1%
*-un-lft-identity93.1%
Applied egg-rr93.1%
Taylor expanded in z around 0 53.7%
associate-/r*57.8%
Simplified57.8%
if 2.69999999999999996e191 < z Initial program 93.3%
associate-/l/99.9%
div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 56.4%
Taylor expanded in t around 0 53.9%
associate-*r/95.0%
neg-mul-195.0%
Simplified53.9%
un-div-inv53.9%
distribute-frac-neg53.9%
distribute-frac-neg53.9%
distribute-frac-neg253.9%
add-sqr-sqrt25.6%
sqrt-unprod37.8%
sqr-neg37.8%
sqrt-unprod28.2%
add-sqr-sqrt50.5%
Applied egg-rr50.5%
Final simplification51.8%
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 z)))))
(if (<= z -4.8e+136)
t_1
(if (<= z 1.4e+48)
(/ x (* t (- y z)))
(if (<= z 2e+129) (/ -1.0 (* y (/ z x))) t_1)))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = x / (z * (t - z));
double tmp;
if (z <= -4.8e+136) {
tmp = t_1;
} else if (z <= 1.4e+48) {
tmp = x / (t * (y - z));
} else if (z <= 2e+129) {
tmp = -1.0 / (y * (z / x));
} else {
tmp = t_1;
}
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 - z))
if (z <= (-4.8d+136)) then
tmp = t_1
else if (z <= 1.4d+48) then
tmp = x / (t * (y - z))
else if (z <= 2d+129) then
tmp = (-1.0d0) / (y * (z / x))
else
tmp = t_1
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 - z));
double tmp;
if (z <= -4.8e+136) {
tmp = t_1;
} else if (z <= 1.4e+48) {
tmp = x / (t * (y - z));
} else if (z <= 2e+129) {
tmp = -1.0 / (y * (z / x));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = x / (z * (t - z)) tmp = 0 if z <= -4.8e+136: tmp = t_1 elif z <= 1.4e+48: tmp = x / (t * (y - z)) elif z <= 2e+129: tmp = -1.0 / (y * (z / x)) else: tmp = t_1 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(z * Float64(t - z))) tmp = 0.0 if (z <= -4.8e+136) tmp = t_1; elseif (z <= 1.4e+48) tmp = Float64(x / Float64(t * Float64(y - z))); elseif (z <= 2e+129) tmp = Float64(-1.0 / Float64(y * Float64(z / x))); else tmp = t_1; 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 - z));
tmp = 0.0;
if (z <= -4.8e+136)
tmp = t_1;
elseif (z <= 1.4e+48)
tmp = x / (t * (y - z));
elseif (z <= 2e+129)
tmp = -1.0 / (y * (z / x));
else
tmp = t_1;
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 * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.8e+136], t$95$1, If[LessEqual[z, 1.4e+48], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+129], N[(-1.0 / N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{z \cdot \left(t - z\right)}\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{+136}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+48}:\\
\;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+129}:\\
\;\;\;\;\frac{-1}{y \cdot \frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.8000000000000001e136 or 2e129 < z Initial program 84.5%
Taylor expanded in y around 0 84.5%
associate-*r/84.5%
neg-mul-184.5%
Simplified84.5%
add-sqr-sqrt36.7%
sqrt-unprod80.1%
sqr-neg80.1%
sqrt-unprod45.4%
add-sqr-sqrt82.1%
*-un-lft-identity82.1%
associate-/r*81.8%
Applied egg-rr81.8%
*-lft-identity81.8%
associate-/r*82.1%
Simplified82.1%
if -4.8000000000000001e136 < z < 1.40000000000000006e48Initial program 93.1%
Taylor expanded in t around inf 60.0%
if 1.40000000000000006e48 < z < 2e129Initial program 99.5%
associate-/l/99.6%
div-inv99.5%
Applied egg-rr99.5%
Taylor expanded in y around inf 28.5%
Taylor expanded in t around 0 28.6%
associate-*r/74.7%
neg-mul-174.7%
Simplified28.6%
clear-num28.6%
frac-2neg28.6%
metadata-eval28.6%
frac-times28.6%
metadata-eval28.6%
add-sqr-sqrt14.2%
sqrt-unprod21.5%
sqr-neg21.5%
sqrt-unprod7.8%
add-sqr-sqrt15.9%
add-sqr-sqrt7.6%
sqrt-unprod8.4%
sqr-neg8.4%
sqrt-unprod7.4%
add-sqr-sqrt28.6%
Applied egg-rr28.6%
Final simplification65.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 (<= t -2.1e-46) (/ (/ x y) (- t z)) (if (<= t 3.8e+51) (/ (/ x z) (- 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.1e-46) {
tmp = (x / y) / (t - z);
} else if (t <= 3.8e+51) {
tmp = (x / z) / (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.1d-46)) then
tmp = (x / y) / (t - z)
else if (t <= 3.8d+51) then
tmp = (x / z) / (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.1e-46) {
tmp = (x / y) / (t - z);
} else if (t <= 3.8e+51) {
tmp = (x / z) / (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.1e-46: tmp = (x / y) / (t - z) elif t <= 3.8e+51: tmp = (x / z) / (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.1e-46) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t <= 3.8e+51) tmp = Float64(Float64(x / z) / Float64(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.1e-46)
tmp = (x / y) / (t - z);
elseif (t <= 3.8e+51)
tmp = (x / z) / (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.1e-46], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.8e+51], N[(N[(x / z), $MachinePrecision] / N[(z - y), $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 -2.1 \cdot 10^{-46}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{+51}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -2.09999999999999987e-46Initial program 93.7%
Taylor expanded in x around 0 93.7%
associate-/l/95.3%
Simplified95.3%
Taylor expanded in y around inf 50.7%
if -2.09999999999999987e-46 < t < 3.7999999999999997e51Initial program 92.4%
associate-/l/95.6%
Simplified95.6%
Taylor expanded in t around 0 79.4%
associate-*r/79.4%
neg-mul-179.4%
Simplified79.4%
if 3.7999999999999997e51 < t Initial program 83.5%
associate-/l/96.6%
Simplified96.6%
Taylor expanded in t around inf 93.7%
Final simplification75.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 -2.1e-47) (/ (/ x t) y) (if (<= t 4.5e-141) (/ -1.0 (* y (/ z x))) (/ 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.1e-47) {
tmp = (x / t) / y;
} else if (t <= 4.5e-141) {
tmp = -1.0 / (y * (z / x));
} 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.1d-47)) then
tmp = (x / t) / y
else if (t <= 4.5d-141) then
tmp = (-1.0d0) / (y * (z / x))
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.1e-47) {
tmp = (x / t) / y;
} else if (t <= 4.5e-141) {
tmp = -1.0 / (y * (z / x));
} 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.1e-47: tmp = (x / t) / y elif t <= 4.5e-141: tmp = -1.0 / (y * (z / x)) 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.1e-47) tmp = Float64(Float64(x / t) / y); elseif (t <= 4.5e-141) tmp = Float64(-1.0 / Float64(y * Float64(z / x))); else tmp = Float64(x / Float64(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.1e-47)
tmp = (x / t) / y;
elseif (t <= 4.5e-141)
tmp = -1.0 / (y * (z / x));
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.1e-47], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 4.5e-141], N[(-1.0 / N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{-47}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-141}:\\
\;\;\;\;\frac{-1}{y \cdot \frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\
\end{array}
\end{array}
if t < -2.1000000000000001e-47Initial program 93.7%
associate-/l/96.8%
div-inv96.7%
Applied egg-rr96.7%
associate-*l/95.2%
div-inv95.3%
div-inv95.3%
clear-num95.2%
associate-*l/95.1%
*-un-lft-identity95.1%
Applied egg-rr95.1%
Taylor expanded in z around 0 47.5%
associate-/r*53.9%
Simplified53.9%
if -2.1000000000000001e-47 < t < 4.5e-141Initial program 92.0%
associate-/l/94.7%
div-inv94.6%
Applied egg-rr94.6%
Taylor expanded in y around inf 57.6%
Taylor expanded in t around 0 43.2%
associate-*r/80.2%
neg-mul-180.2%
Simplified43.2%
clear-num44.2%
frac-2neg44.2%
metadata-eval44.2%
frac-times44.9%
metadata-eval44.9%
add-sqr-sqrt21.3%
sqrt-unprod32.1%
sqr-neg32.1%
sqrt-unprod13.0%
add-sqr-sqrt21.7%
add-sqr-sqrt13.1%
sqrt-unprod28.1%
sqr-neg28.1%
sqrt-unprod23.5%
add-sqr-sqrt44.9%
Applied egg-rr44.9%
if 4.5e-141 < t Initial program 87.8%
Taylor expanded in t around inf 62.7%
Final simplification54.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 (or (<= z -2.6e+84) (not (<= z 0.16))) (/ x (* z y)) (/ x (* t y))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.6e+84) || !(z <= 0.16)) {
tmp = x / (z * y);
} 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 <= (-2.6d+84)) .or. (.not. (z <= 0.16d0))) then
tmp = x / (z * y)
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 <= -2.6e+84) || !(z <= 0.16)) {
tmp = x / (z * y);
} 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 <= -2.6e+84) or not (z <= 0.16): tmp = x / (z * y) 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 <= -2.6e+84) || !(z <= 0.16)) tmp = Float64(x / Float64(z * y)); else tmp = Float64(x / Float64(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 <= -2.6e+84) || ~((z <= 0.16)))
tmp = x / (z * y);
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, -2.6e+84], N[Not[LessEqual[z, 0.16]], $MachinePrecision]], N[(x / N[(z * y), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+84} \lor \neg \left(z \leq 0.16\right):\\
\;\;\;\;\frac{x}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot y}\\
\end{array}
\end{array}
if z < -2.6000000000000001e84 or 0.160000000000000003 < z Initial program 86.8%
associate-/l/99.8%
div-inv99.8%
div-inv99.7%
associate-*l*89.6%
Applied egg-rr89.6%
Taylor expanded in t around 0 79.7%
Taylor expanded in z around 0 40.7%
mul-1-neg40.7%
distribute-neg-frac240.7%
*-commutative40.7%
distribute-rgt-neg-out40.7%
Simplified40.7%
frac-2neg40.7%
div-inv40.7%
add-sqr-sqrt17.3%
sqrt-unprod42.7%
sqr-neg42.7%
sqrt-unprod17.8%
add-sqr-sqrt33.6%
distribute-rgt-neg-out33.6%
remove-double-neg33.6%
add-sqr-sqrt12.6%
sqrt-unprod35.5%
sqr-neg35.5%
sqrt-unprod24.4%
add-sqr-sqrt40.7%
*-commutative40.7%
add-sqr-sqrt24.4%
sqrt-unprod35.5%
sqr-neg35.5%
sqrt-unprod12.6%
add-sqr-sqrt33.6%
Applied egg-rr33.6%
associate-*r/33.6%
*-rgt-identity33.6%
Simplified33.6%
if -2.6000000000000001e84 < z < 0.160000000000000003Initial program 94.1%
Taylor expanded in z around 0 51.0%
Final simplification43.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 -3.8e+121) (/ x (* z y)) (if (<= z 1.4e+53) (/ (/ x t) y) (/ (/ x z) y))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.8e+121) {
tmp = x / (z * y);
} else if (z <= 1.4e+53) {
tmp = (x / t) / y;
} else {
tmp = (x / 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 (z <= (-3.8d+121)) then
tmp = x / (z * y)
else if (z <= 1.4d+53) then
tmp = (x / t) / y
else
tmp = (x / 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 (z <= -3.8e+121) {
tmp = x / (z * y);
} else if (z <= 1.4e+53) {
tmp = (x / t) / y;
} else {
tmp = (x / z) / y;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= -3.8e+121: tmp = x / (z * y) elif z <= 1.4e+53: tmp = (x / t) / y else: tmp = (x / z) / y return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -3.8e+121) tmp = Float64(x / Float64(z * y)); elseif (z <= 1.4e+53) tmp = Float64(Float64(x / t) / y); else tmp = Float64(Float64(x / 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 (z <= -3.8e+121)
tmp = x / (z * y);
elseif (z <= 1.4e+53)
tmp = (x / t) / y;
else
tmp = (x / 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[z, -3.8e+121], N[(x / N[(z * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e+53], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / z), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+121}:\\
\;\;\;\;\frac{x}{z \cdot y}\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+53}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z}}{y}\\
\end{array}
\end{array}
if z < -3.8e121Initial program 82.8%
associate-/l/99.9%
div-inv100.0%
div-inv100.0%
associate-*l*85.6%
Applied egg-rr85.6%
Taylor expanded in t around 0 77.9%
Taylor expanded in z around 0 50.4%
mul-1-neg50.4%
distribute-neg-frac250.4%
*-commutative50.4%
distribute-rgt-neg-out50.4%
Simplified50.4%
frac-2neg50.4%
div-inv50.4%
add-sqr-sqrt16.3%
sqrt-unprod53.0%
sqr-neg53.0%
sqrt-unprod34.2%
add-sqr-sqrt50.7%
distribute-rgt-neg-out50.7%
remove-double-neg50.7%
add-sqr-sqrt13.0%
sqrt-unprod50.1%
sqr-neg50.1%
sqrt-unprod37.5%
add-sqr-sqrt50.4%
*-commutative50.4%
add-sqr-sqrt37.5%
sqrt-unprod50.1%
sqr-neg50.1%
sqrt-unprod13.0%
add-sqr-sqrt50.7%
Applied egg-rr50.7%
associate-*r/50.7%
*-rgt-identity50.7%
Simplified50.7%
if -3.8e121 < z < 1.4e53Initial program 93.1%
associate-/l/93.9%
div-inv93.8%
Applied egg-rr93.8%
associate-*l/94.0%
div-inv94.2%
div-inv94.1%
clear-num94.1%
associate-*l/94.5%
*-un-lft-identity94.5%
Applied egg-rr94.5%
Taylor expanded in z around 0 45.1%
associate-/r*50.1%
Simplified50.1%
if 1.4e53 < z Initial program 89.0%
associate-/l/99.8%
div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 47.6%
Taylor expanded in t around 0 46.3%
associate-*r/86.8%
neg-mul-186.8%
Simplified46.3%
un-div-inv46.3%
distribute-frac-neg46.3%
distribute-frac-neg46.3%
distribute-frac-neg246.3%
add-sqr-sqrt26.7%
sqrt-unprod31.2%
sqr-neg31.2%
sqrt-unprod19.8%
add-sqr-sqrt41.8%
Applied egg-rr41.8%
Final simplification48.2%
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 -6.5e+121) (/ x (* z y)) (if (<= z 4.4e+45) (/ (/ x t) y) (/ (/ x z) t))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.5e+121) {
tmp = x / (z * y);
} else if (z <= 4.4e+45) {
tmp = (x / t) / y;
} 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) :: tmp
if (z <= (-6.5d+121)) then
tmp = x / (z * y)
else if (z <= 4.4d+45) then
tmp = (x / t) / y
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 tmp;
if (z <= -6.5e+121) {
tmp = x / (z * y);
} else if (z <= 4.4e+45) {
tmp = (x / t) / y;
} else {
tmp = (x / z) / t;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= -6.5e+121: tmp = x / (z * y) elif z <= 4.4e+45: tmp = (x / t) / y else: tmp = (x / z) / t return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -6.5e+121) tmp = Float64(x / Float64(z * y)); elseif (z <= 4.4e+45) tmp = Float64(Float64(x / t) / y); else tmp = Float64(Float64(x / 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 <= -6.5e+121)
tmp = x / (z * y);
elseif (z <= 4.4e+45)
tmp = (x / t) / y;
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_] := If[LessEqual[z, -6.5e+121], N[(x / N[(z * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4e+45], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / z), $MachinePrecision] / t), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+121}:\\
\;\;\;\;\frac{x}{z \cdot y}\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{+45}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z}}{t}\\
\end{array}
\end{array}
if z < -6.50000000000000019e121Initial program 82.8%
associate-/l/99.9%
div-inv100.0%
div-inv100.0%
associate-*l*85.6%
Applied egg-rr85.6%
Taylor expanded in t around 0 77.9%
Taylor expanded in z around 0 50.4%
mul-1-neg50.4%
distribute-neg-frac250.4%
*-commutative50.4%
distribute-rgt-neg-out50.4%
Simplified50.4%
frac-2neg50.4%
div-inv50.4%
add-sqr-sqrt16.3%
sqrt-unprod53.0%
sqr-neg53.0%
sqrt-unprod34.2%
add-sqr-sqrt50.7%
distribute-rgt-neg-out50.7%
remove-double-neg50.7%
add-sqr-sqrt13.0%
sqrt-unprod50.1%
sqr-neg50.1%
sqrt-unprod37.5%
add-sqr-sqrt50.4%
*-commutative50.4%
add-sqr-sqrt37.5%
sqrt-unprod50.1%
sqr-neg50.1%
sqrt-unprod13.0%
add-sqr-sqrt50.7%
Applied egg-rr50.7%
associate-*r/50.7%
*-rgt-identity50.7%
Simplified50.7%
if -6.50000000000000019e121 < z < 4.4000000000000001e45Initial program 93.0%
associate-/l/93.8%
div-inv93.7%
Applied egg-rr93.7%
associate-*l/93.9%
div-inv94.1%
div-inv94.0%
clear-num94.0%
associate-*l/94.4%
*-un-lft-identity94.4%
Applied egg-rr94.4%
Taylor expanded in z around 0 46.2%
associate-/r*51.4%
Simplified51.4%
if 4.4000000000000001e45 < z Initial program 89.6%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around inf 42.3%
Taylor expanded in y around 0 39.3%
associate-*r/39.3%
neg-mul-139.3%
Simplified39.3%
add-sqr-sqrt18.1%
sqrt-unprod42.6%
sqr-neg42.6%
sqrt-unprod17.9%
add-sqr-sqrt33.1%
*-un-lft-identity33.1%
associate-/r*31.6%
Applied egg-rr31.6%
*-lft-identity31.6%
associate-/r*33.1%
*-lft-identity33.1%
times-frac41.5%
associate-*l/41.5%
*-lft-identity41.5%
Simplified41.5%
Final simplification48.7%
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 -4.2e+122) (/ x (* z y)) (if (<= z 1.15e+45) (/ (/ x t) y) (/ x (* t z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.2e+122) {
tmp = x / (z * y);
} else if (z <= 1.15e+45) {
tmp = (x / t) / y;
} else {
tmp = 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 <= (-4.2d+122)) then
tmp = x / (z * y)
else if (z <= 1.15d+45) then
tmp = (x / t) / y
else
tmp = 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 <= -4.2e+122) {
tmp = x / (z * y);
} else if (z <= 1.15e+45) {
tmp = (x / t) / y;
} else {
tmp = x / (t * z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= -4.2e+122: tmp = x / (z * y) elif z <= 1.15e+45: tmp = (x / t) / y else: tmp = 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 <= -4.2e+122) tmp = Float64(x / Float64(z * y)); elseif (z <= 1.15e+45) tmp = Float64(Float64(x / t) / y); else tmp = Float64(x / Float64(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 <= -4.2e+122)
tmp = x / (z * y);
elseif (z <= 1.15e+45)
tmp = (x / t) / y;
else
tmp = 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, -4.2e+122], N[(x / N[(z * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.15e+45], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(t * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+122}:\\
\;\;\;\;\frac{x}{z \cdot y}\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{+45}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot z}\\
\end{array}
\end{array}
if z < -4.20000000000000032e122Initial program 82.8%
associate-/l/99.9%
div-inv100.0%
div-inv100.0%
associate-*l*85.6%
Applied egg-rr85.6%
Taylor expanded in t around 0 77.9%
Taylor expanded in z around 0 50.4%
mul-1-neg50.4%
distribute-neg-frac250.4%
*-commutative50.4%
distribute-rgt-neg-out50.4%
Simplified50.4%
frac-2neg50.4%
div-inv50.4%
add-sqr-sqrt16.3%
sqrt-unprod53.0%
sqr-neg53.0%
sqrt-unprod34.2%
add-sqr-sqrt50.7%
distribute-rgt-neg-out50.7%
remove-double-neg50.7%
add-sqr-sqrt13.0%
sqrt-unprod50.1%
sqr-neg50.1%
sqrt-unprod37.5%
add-sqr-sqrt50.4%
*-commutative50.4%
add-sqr-sqrt37.5%
sqrt-unprod50.1%
sqr-neg50.1%
sqrt-unprod13.0%
add-sqr-sqrt50.7%
Applied egg-rr50.7%
associate-*r/50.7%
*-rgt-identity50.7%
Simplified50.7%
if -4.20000000000000032e122 < z < 1.15000000000000006e45Initial program 93.0%
associate-/l/93.8%
div-inv93.7%
Applied egg-rr93.7%
associate-*l/93.9%
div-inv94.1%
div-inv94.0%
clear-num94.0%
associate-*l/94.4%
*-un-lft-identity94.4%
Applied egg-rr94.4%
Taylor expanded in z around 0 46.2%
associate-/r*51.4%
Simplified51.4%
if 1.15000000000000006e45 < z Initial program 89.6%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around inf 42.3%
Taylor expanded in y around 0 39.3%
associate-*r/39.3%
neg-mul-139.3%
Simplified39.3%
add-sqr-sqrt18.1%
sqrt-unprod42.6%
sqr-neg42.6%
sqrt-unprod17.9%
add-sqr-sqrt33.1%
*-un-lft-identity33.1%
associate-/r*31.6%
Applied egg-rr31.6%
*-lft-identity31.6%
associate-/l/33.1%
Simplified33.1%
Final simplification46.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 (<= z -2.6e+84) (/ x (* z y)) (if (<= z 2.4e+46) (/ x (* t y)) (/ x (* t z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.6e+84) {
tmp = x / (z * y);
} else if (z <= 2.4e+46) {
tmp = x / (t * y);
} else {
tmp = 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 <= (-2.6d+84)) then
tmp = x / (z * y)
else if (z <= 2.4d+46) then
tmp = x / (t * y)
else
tmp = 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 <= -2.6e+84) {
tmp = x / (z * y);
} else if (z <= 2.4e+46) {
tmp = x / (t * y);
} else {
tmp = x / (t * z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= -2.6e+84: tmp = x / (z * y) elif z <= 2.4e+46: tmp = x / (t * y) else: tmp = 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 <= -2.6e+84) tmp = Float64(x / Float64(z * y)); elseif (z <= 2.4e+46) tmp = Float64(x / Float64(t * y)); else tmp = Float64(x / Float64(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 <= -2.6e+84)
tmp = x / (z * y);
elseif (z <= 2.4e+46)
tmp = x / (t * y);
else
tmp = 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, -2.6e+84], N[(x / N[(z * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.4e+46], N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+84}:\\
\;\;\;\;\frac{x}{z \cdot y}\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+46}:\\
\;\;\;\;\frac{x}{t \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot z}\\
\end{array}
\end{array}
if z < -2.6000000000000001e84Initial program 80.0%
associate-/l/99.9%
div-inv99.9%
div-inv99.9%
associate-*l*84.8%
Applied egg-rr84.8%
Taylor expanded in t around 0 75.8%
Taylor expanded in z around 0 50.9%
mul-1-neg50.9%
distribute-neg-frac250.9%
*-commutative50.9%
distribute-rgt-neg-out50.9%
Simplified50.9%
frac-2neg50.9%
div-inv50.9%
add-sqr-sqrt16.8%
sqrt-unprod48.9%
sqr-neg48.9%
sqrt-unprod30.0%
add-sqr-sqrt47.0%
distribute-rgt-neg-out47.0%
remove-double-neg47.0%
add-sqr-sqrt14.0%
sqrt-unprod46.5%
sqr-neg46.5%
sqrt-unprod32.7%
add-sqr-sqrt50.9%
*-commutative50.9%
add-sqr-sqrt32.7%
sqrt-unprod46.5%
sqr-neg46.5%
sqrt-unprod14.0%
add-sqr-sqrt47.0%
Applied egg-rr47.0%
associate-*r/47.0%
*-rgt-identity47.0%
Simplified47.0%
if -2.6000000000000001e84 < z < 2.40000000000000008e46Initial program 94.0%
Taylor expanded in z around 0 47.0%
if 2.40000000000000008e46 < z Initial program 89.6%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around inf 42.3%
Taylor expanded in y around 0 39.3%
associate-*r/39.3%
neg-mul-139.3%
Simplified39.3%
add-sqr-sqrt18.1%
sqrt-unprod42.6%
sqr-neg42.6%
sqrt-unprod17.9%
add-sqr-sqrt33.1%
*-un-lft-identity33.1%
associate-/r*31.6%
Applied egg-rr31.6%
*-lft-identity31.6%
associate-/l/33.1%
Simplified33.1%
Final simplification43.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 6e+204) (/ x (* (- t z) (- y 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 <= 6e+204) {
tmp = x / ((t - z) * (y - 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 <= 6d+204) then
tmp = x / ((t - z) * (y - 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 <= 6e+204) {
tmp = x / ((t - z) * (y - 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 <= 6e+204: tmp = x / ((t - z) * (y - 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 <= 6e+204) tmp = Float64(x / Float64(Float64(t - z) * Float64(y - 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 <= 6e+204)
tmp = x / ((t - z) * (y - 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, 6e+204], N[(x / N[(N[(t - z), $MachinePrecision] * N[(y - 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 6 \cdot 10^{+204}:\\
\;\;\;\;\frac{x}{\left(t - z\right) \cdot \left(y - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 5.99999999999999965e204Initial program 93.0%
if 5.99999999999999965e204 < t Initial program 68.5%
associate-/l/98.3%
Simplified98.3%
Taylor expanded in t around inf 98.3%
Final simplification93.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.4e+40) (/ (/ 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 <= 1.4e+40) {
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 <= 1.4d+40) 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 <= 1.4e+40) {
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 <= 1.4e+40: 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 <= 1.4e+40) 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 <= 1.4e+40)
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, 1.4e+40], 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 1.4 \cdot 10^{+40}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 1.4000000000000001e40Initial program 93.3%
associate-/l/96.0%
div-inv95.9%
Applied egg-rr95.9%
associate-*l/97.5%
div-inv97.7%
div-inv97.6%
clear-num97.6%
associate-*l/97.6%
*-un-lft-identity97.6%
Applied egg-rr97.6%
Taylor expanded in y around inf 54.5%
associate-/l/56.9%
Simplified56.9%
if 1.4000000000000001e40 < t Initial program 82.2%
associate-/l/96.6%
Simplified96.6%
Taylor expanded in t around inf 92.2%
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.2e-69) (/ (/ 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.2e-69) {
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.2d-69) 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.2e-69) {
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.2e-69: 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.2e-69) 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 <= 1.2e-69)
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.2e-69], 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 1.2 \cdot 10^{-69}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 1.2000000000000001e-69Initial program 92.8%
Taylor expanded in x around 0 92.8%
associate-/l/97.6%
Simplified97.6%
Taylor expanded in y around inf 55.2%
if 1.2000000000000001e-69 < t Initial program 86.8%
associate-/l/97.7%
Simplified97.7%
Taylor expanded in t around inf 78.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 (<= t 6.5e-68) (/ 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 <= 6.5e-68) {
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 <= 6.5d-68) 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 <= 6.5e-68) {
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 <= 6.5e-68: 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 <= 6.5e-68) tmp = Float64(x / Float64(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 <= 6.5e-68)
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, 6.5e-68], N[(x / N[(N[(t - z), $MachinePrecision] * y), $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 6.5 \cdot 10^{-68}:\\
\;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 6.4999999999999997e-68Initial program 92.8%
Taylor expanded in y around inf 55.6%
*-commutative55.6%
Simplified55.6%
if 6.4999999999999997e-68 < t Initial program 86.8%
associate-/l/97.7%
Simplified97.7%
Taylor expanded in t around inf 78.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 -1.3e+18) (/ 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 (y <= -1.3e+18) {
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 (y <= (-1.3d+18)) 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 (y <= -1.3e+18) {
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 y <= -1.3e+18: 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 (y <= -1.3e+18) tmp = Float64(x / Float64(Float64(t - z) * y)); else tmp = Float64(x / Float64(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 (y <= -1.3e+18)
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[y, -1.3e+18], N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+18}:\\
\;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\
\end{array}
\end{array}
if y < -1.3e18Initial program 82.4%
Taylor expanded in y around inf 81.9%
*-commutative81.9%
Simplified81.9%
if -1.3e18 < y Initial program 93.5%
Taylor expanded in t around inf 53.4%
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 y)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return x / (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 = x / (t * y)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return x / (t * y);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return x / (t * y)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(x / Float64(t * y)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = x / (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[(x / N[(t * y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{x}{t \cdot y}
\end{array}
Initial program 90.8%
Taylor expanded in z around 0 36.6%
(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 2024107
(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))))