
(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 19 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 (pow (* (- y z) (/ (- t z) x)) -1.0))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return pow(((y - z) * ((t - z) / x)), -1.0);
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((y - z) * ((t - z) / x)) ** (-1.0d0)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return Math.pow(((y - z) * ((t - z) / x)), -1.0);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return math.pow(((y - z) * ((t - z) / x)), -1.0)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(Float64(y - z) * Float64(Float64(t - z) / x)) ^ -1.0 end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = ((y - z) * ((t - z) / x)) ^ -1.0;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[Power[N[(N[(y - z), $MachinePrecision] * N[(N[(t - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
{\left(\left(y - z\right) \cdot \frac{t - z}{x}\right)}^{-1}
\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%
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 (* y (- z)))) (t_2 (/ (/ x t) y)))
(if (<= y -4.5e+247)
t_1
(if (<= y -1.9e+231)
(/ (/ x y) t)
(if (<= y -7.8e+61)
t_1
(if (<= y -1.5e+43)
t_2
(if (<= y -6.6e+32)
t_1
(if (or (<= y -1.2e-75) (not (<= y 2.6e-83)))
t_2
(/ (/ x t) (- z))))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = x / (y * -z);
double t_2 = (x / t) / y;
double tmp;
if (y <= -4.5e+247) {
tmp = t_1;
} else if (y <= -1.9e+231) {
tmp = (x / y) / t;
} else if (y <= -7.8e+61) {
tmp = t_1;
} else if (y <= -1.5e+43) {
tmp = t_2;
} else if (y <= -6.6e+32) {
tmp = t_1;
} else if ((y <= -1.2e-75) || !(y <= 2.6e-83)) {
tmp = t_2;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x / (y * -z)
t_2 = (x / t) / y
if (y <= (-4.5d+247)) then
tmp = t_1
else if (y <= (-1.9d+231)) then
tmp = (x / y) / t
else if (y <= (-7.8d+61)) then
tmp = t_1
else if (y <= (-1.5d+43)) then
tmp = t_2
else if (y <= (-6.6d+32)) then
tmp = t_1
else if ((y <= (-1.2d-75)) .or. (.not. (y <= 2.6d-83))) then
tmp = t_2
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 t_1 = x / (y * -z);
double t_2 = (x / t) / y;
double tmp;
if (y <= -4.5e+247) {
tmp = t_1;
} else if (y <= -1.9e+231) {
tmp = (x / y) / t;
} else if (y <= -7.8e+61) {
tmp = t_1;
} else if (y <= -1.5e+43) {
tmp = t_2;
} else if (y <= -6.6e+32) {
tmp = t_1;
} else if ((y <= -1.2e-75) || !(y <= 2.6e-83)) {
tmp = t_2;
} else {
tmp = (x / t) / -z;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = x / (y * -z) t_2 = (x / t) / y tmp = 0 if y <= -4.5e+247: tmp = t_1 elif y <= -1.9e+231: tmp = (x / y) / t elif y <= -7.8e+61: tmp = t_1 elif y <= -1.5e+43: tmp = t_2 elif y <= -6.6e+32: tmp = t_1 elif (y <= -1.2e-75) or not (y <= 2.6e-83): tmp = t_2 else: tmp = (x / t) / -z return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(y * Float64(-z))) t_2 = Float64(Float64(x / t) / y) tmp = 0.0 if (y <= -4.5e+247) tmp = t_1; elseif (y <= -1.9e+231) tmp = Float64(Float64(x / y) / t); elseif (y <= -7.8e+61) tmp = t_1; elseif (y <= -1.5e+43) tmp = t_2; elseif (y <= -6.6e+32) tmp = t_1; elseif ((y <= -1.2e-75) || !(y <= 2.6e-83)) tmp = t_2; else tmp = Float64(Float64(x / t) / Float64(-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 / (y * -z);
t_2 = (x / t) / y;
tmp = 0.0;
if (y <= -4.5e+247)
tmp = t_1;
elseif (y <= -1.9e+231)
tmp = (x / y) / t;
elseif (y <= -7.8e+61)
tmp = t_1;
elseif (y <= -1.5e+43)
tmp = t_2;
elseif (y <= -6.6e+32)
tmp = t_1;
elseif ((y <= -1.2e-75) || ~((y <= 2.6e-83)))
tmp = t_2;
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_] := Block[{t$95$1 = N[(x / N[(y * (-z)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -4.5e+247], t$95$1, If[LessEqual[y, -1.9e+231], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, -7.8e+61], t$95$1, If[LessEqual[y, -1.5e+43], t$95$2, If[LessEqual[y, -6.6e+32], t$95$1, If[Or[LessEqual[y, -1.2e-75], N[Not[LessEqual[y, 2.6e-83]], $MachinePrecision]], t$95$2, N[(N[(x / t), $MachinePrecision] / (-z)), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot \left(-z\right)}\\
t_2 := \frac{\frac{x}{t}}{y}\\
\mathbf{if}\;y \leq -4.5 \cdot 10^{+247}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{+231}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;y \leq -7.8 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.5 \cdot 10^{+43}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -6.6 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.2 \cdot 10^{-75} \lor \neg \left(y \leq 2.6 \cdot 10^{-83}\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{-z}\\
\end{array}
\end{array}
if y < -4.50000000000000002e247 or -1.9e231 < y < -7.79999999999999975e61 or -1.50000000000000008e43 < y < -6.60000000000000039e32Initial program 95.2%
Taylor expanded in y around inf 88.5%
associate-/r*83.4%
Simplified83.4%
Taylor expanded in t around 0 72.2%
associate-*r/72.2%
neg-mul-172.2%
*-commutative72.2%
Simplified72.2%
if -4.50000000000000002e247 < y < -1.9e231Initial program 81.1%
Taylor expanded in z around 0 81.1%
*-un-lft-identity81.1%
times-frac99.7%
Applied egg-rr99.7%
associate-*l/99.7%
*-lft-identity99.7%
Simplified99.7%
if -7.79999999999999975e61 < y < -1.50000000000000008e43 or -6.60000000000000039e32 < y < -1.2000000000000001e-75 or 2.60000000000000009e-83 < y Initial program 86.4%
Taylor expanded in x around 0 86.4%
associate-/l/99.8%
Simplified99.8%
clear-num99.0%
inv-pow99.0%
Applied egg-rr99.0%
unpow-199.0%
Simplified99.0%
Taylor expanded in z around 0 50.7%
associate-/r*52.5%
Simplified52.5%
if -1.2000000000000001e-75 < y < 2.60000000000000009e-83Initial program 92.1%
Taylor expanded in t around inf 57.2%
associate-/r*57.1%
Simplified57.1%
Taylor expanded in y around 0 43.0%
mul-1-neg43.0%
associate-/r*40.1%
distribute-neg-frac240.1%
Simplified40.1%
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 (* y (- z)))) (t_2 (/ (/ x t) y)))
(if (<= y -6e+247)
(* x (/ (/ -1.0 y) z))
(if (<= y -3.7e+229)
(/ (/ x y) t)
(if (<= y -6.5e+62)
t_1
(if (<= y -9.2e+42)
t_2
(if (<= y -7.6e+32)
t_1
(if (or (<= y -4e-75) (not (<= y 1.35e-81)))
t_2
(/ (/ x t) (- z))))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = x / (y * -z);
double t_2 = (x / t) / y;
double tmp;
if (y <= -6e+247) {
tmp = x * ((-1.0 / y) / z);
} else if (y <= -3.7e+229) {
tmp = (x / y) / t;
} else if (y <= -6.5e+62) {
tmp = t_1;
} else if (y <= -9.2e+42) {
tmp = t_2;
} else if (y <= -7.6e+32) {
tmp = t_1;
} else if ((y <= -4e-75) || !(y <= 1.35e-81)) {
tmp = t_2;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x / (y * -z)
t_2 = (x / t) / y
if (y <= (-6d+247)) then
tmp = x * (((-1.0d0) / y) / z)
else if (y <= (-3.7d+229)) then
tmp = (x / y) / t
else if (y <= (-6.5d+62)) then
tmp = t_1
else if (y <= (-9.2d+42)) then
tmp = t_2
else if (y <= (-7.6d+32)) then
tmp = t_1
else if ((y <= (-4d-75)) .or. (.not. (y <= 1.35d-81))) then
tmp = t_2
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 t_1 = x / (y * -z);
double t_2 = (x / t) / y;
double tmp;
if (y <= -6e+247) {
tmp = x * ((-1.0 / y) / z);
} else if (y <= -3.7e+229) {
tmp = (x / y) / t;
} else if (y <= -6.5e+62) {
tmp = t_1;
} else if (y <= -9.2e+42) {
tmp = t_2;
} else if (y <= -7.6e+32) {
tmp = t_1;
} else if ((y <= -4e-75) || !(y <= 1.35e-81)) {
tmp = t_2;
} else {
tmp = (x / t) / -z;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = x / (y * -z) t_2 = (x / t) / y tmp = 0 if y <= -6e+247: tmp = x * ((-1.0 / y) / z) elif y <= -3.7e+229: tmp = (x / y) / t elif y <= -6.5e+62: tmp = t_1 elif y <= -9.2e+42: tmp = t_2 elif y <= -7.6e+32: tmp = t_1 elif (y <= -4e-75) or not (y <= 1.35e-81): tmp = t_2 else: tmp = (x / t) / -z return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(y * Float64(-z))) t_2 = Float64(Float64(x / t) / y) tmp = 0.0 if (y <= -6e+247) tmp = Float64(x * Float64(Float64(-1.0 / y) / z)); elseif (y <= -3.7e+229) tmp = Float64(Float64(x / y) / t); elseif (y <= -6.5e+62) tmp = t_1; elseif (y <= -9.2e+42) tmp = t_2; elseif (y <= -7.6e+32) tmp = t_1; elseif ((y <= -4e-75) || !(y <= 1.35e-81)) tmp = t_2; else tmp = Float64(Float64(x / t) / Float64(-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 / (y * -z);
t_2 = (x / t) / y;
tmp = 0.0;
if (y <= -6e+247)
tmp = x * ((-1.0 / y) / z);
elseif (y <= -3.7e+229)
tmp = (x / y) / t;
elseif (y <= -6.5e+62)
tmp = t_1;
elseif (y <= -9.2e+42)
tmp = t_2;
elseif (y <= -7.6e+32)
tmp = t_1;
elseif ((y <= -4e-75) || ~((y <= 1.35e-81)))
tmp = t_2;
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_] := Block[{t$95$1 = N[(x / N[(y * (-z)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -6e+247], N[(x * N[(N[(-1.0 / y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.7e+229], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, -6.5e+62], t$95$1, If[LessEqual[y, -9.2e+42], t$95$2, If[LessEqual[y, -7.6e+32], t$95$1, If[Or[LessEqual[y, -4e-75], N[Not[LessEqual[y, 1.35e-81]], $MachinePrecision]], t$95$2, N[(N[(x / t), $MachinePrecision] / (-z)), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot \left(-z\right)}\\
t_2 := \frac{\frac{x}{t}}{y}\\
\mathbf{if}\;y \leq -6 \cdot 10^{+247}:\\
\;\;\;\;x \cdot \frac{\frac{-1}{y}}{z}\\
\mathbf{elif}\;y \leq -3.7 \cdot 10^{+229}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;y \leq -6.5 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -9.2 \cdot 10^{+42}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -7.6 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4 \cdot 10^{-75} \lor \neg \left(y \leq 1.35 \cdot 10^{-81}\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{-z}\\
\end{array}
\end{array}
if y < -6e247Initial program 99.4%
clear-num99.7%
associate-/r/99.4%
Applied egg-rr99.4%
Taylor expanded in t around 0 99.4%
Taylor expanded in z around 0 99.4%
associate-/r*99.7%
Simplified99.7%
if -6e247 < y < -3.70000000000000002e229Initial program 81.1%
Taylor expanded in z around 0 81.1%
*-un-lft-identity81.1%
times-frac99.7%
Applied egg-rr99.7%
associate-*l/99.7%
*-lft-identity99.7%
Simplified99.7%
if -3.70000000000000002e229 < y < -6.5000000000000003e62 or -9.2e42 < y < -7.6000000000000006e32Initial program 94.7%
Taylor expanded in y around inf 87.0%
associate-/r*83.8%
Simplified83.8%
Taylor expanded in t around 0 68.4%
associate-*r/68.4%
neg-mul-168.4%
*-commutative68.4%
Simplified68.4%
if -6.5000000000000003e62 < y < -9.2e42 or -7.6000000000000006e32 < y < -3.9999999999999998e-75 or 1.34999999999999995e-81 < y Initial program 86.4%
Taylor expanded in x around 0 86.4%
associate-/l/99.8%
Simplified99.8%
clear-num99.0%
inv-pow99.0%
Applied egg-rr99.0%
unpow-199.0%
Simplified99.0%
Taylor expanded in z around 0 50.7%
associate-/r*52.5%
Simplified52.5%
if -3.9999999999999998e-75 < y < 1.34999999999999995e-81Initial program 92.1%
Taylor expanded in t around inf 57.2%
associate-/r*57.1%
Simplified57.1%
Taylor expanded in y around 0 43.0%
mul-1-neg43.0%
associate-/r*40.1%
distribute-neg-frac240.1%
Simplified40.1%
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 (* y (- z)))))
(if (<= t 1.65e-232)
t_1
(if (<= t 2.3e-186)
(/ (/ x y) t)
(if (<= t 4.5e-146)
t_1
(if (<= t 3.8e+106) (* x (/ (/ 1.0 y) t)) (/ (/ x t) (- z))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = x / (y * -z);
double tmp;
if (t <= 1.65e-232) {
tmp = t_1;
} else if (t <= 2.3e-186) {
tmp = (x / y) / t;
} else if (t <= 4.5e-146) {
tmp = t_1;
} else if (t <= 3.8e+106) {
tmp = x * ((1.0 / y) / t);
} 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) :: t_1
real(8) :: tmp
t_1 = x / (y * -z)
if (t <= 1.65d-232) then
tmp = t_1
else if (t <= 2.3d-186) then
tmp = (x / y) / t
else if (t <= 4.5d-146) then
tmp = t_1
else if (t <= 3.8d+106) then
tmp = x * ((1.0d0 / y) / t)
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 t_1 = x / (y * -z);
double tmp;
if (t <= 1.65e-232) {
tmp = t_1;
} else if (t <= 2.3e-186) {
tmp = (x / y) / t;
} else if (t <= 4.5e-146) {
tmp = t_1;
} else if (t <= 3.8e+106) {
tmp = x * ((1.0 / y) / t);
} else {
tmp = (x / t) / -z;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = x / (y * -z) tmp = 0 if t <= 1.65e-232: tmp = t_1 elif t <= 2.3e-186: tmp = (x / y) / t elif t <= 4.5e-146: tmp = t_1 elif t <= 3.8e+106: tmp = x * ((1.0 / y) / t) else: tmp = (x / t) / -z return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(y * Float64(-z))) tmp = 0.0 if (t <= 1.65e-232) tmp = t_1; elseif (t <= 2.3e-186) tmp = Float64(Float64(x / y) / t); elseif (t <= 4.5e-146) tmp = t_1; elseif (t <= 3.8e+106) tmp = Float64(x * Float64(Float64(1.0 / y) / t)); else tmp = Float64(Float64(x / t) / Float64(-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 / (y * -z);
tmp = 0.0;
if (t <= 1.65e-232)
tmp = t_1;
elseif (t <= 2.3e-186)
tmp = (x / y) / t;
elseif (t <= 4.5e-146)
tmp = t_1;
elseif (t <= 3.8e+106)
tmp = x * ((1.0 / y) / t);
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_] := Block[{t$95$1 = N[(x / N[(y * (-z)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 1.65e-232], t$95$1, If[LessEqual[t, 2.3e-186], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 4.5e-146], t$95$1, If[LessEqual[t, 3.8e+106], N[(x * N[(N[(1.0 / y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / (-z)), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot \left(-z\right)}\\
\mathbf{if}\;t \leq 1.65 \cdot 10^{-232}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-186}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-146}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{+106}:\\
\;\;\;\;x \cdot \frac{\frac{1}{y}}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{-z}\\
\end{array}
\end{array}
if t < 1.64999999999999993e-232 or 2.3000000000000001e-186 < t < 4.5000000000000001e-146Initial program 87.4%
Taylor expanded in y around inf 56.1%
associate-/r*59.6%
Simplified59.6%
Taylor expanded in t around 0 39.5%
associate-*r/39.5%
neg-mul-139.5%
*-commutative39.5%
Simplified39.5%
if 1.64999999999999993e-232 < t < 2.3000000000000001e-186Initial program 93.8%
Taylor expanded in z around 0 21.0%
*-un-lft-identity21.0%
times-frac26.6%
Applied egg-rr26.6%
associate-*l/26.7%
*-lft-identity26.7%
Simplified26.7%
if 4.5000000000000001e-146 < t < 3.7999999999999998e106Initial program 93.7%
Taylor expanded in z around 0 49.1%
clear-num49.2%
associate-/r/49.3%
*-commutative49.3%
associate-/r*50.5%
Applied egg-rr50.5%
if 3.7999999999999998e106 < t Initial program 93.1%
Taylor expanded in t around inf 93.1%
associate-/r*99.9%
Simplified99.9%
Taylor expanded in y around 0 63.8%
mul-1-neg63.8%
associate-/r*72.4%
distribute-neg-frac272.4%
Simplified72.4%
Final simplification46.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 (* y (- z)))))
(if (<= t 5.4e-230)
t_1
(if (<= t 2.3e-186)
(/ 1.0 (* t (/ y x)))
(if (<= t 1.22e-145)
t_1
(if (<= t 6.4e+105) (* x (/ (/ 1.0 y) t)) (/ (/ x t) (- z))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = x / (y * -z);
double tmp;
if (t <= 5.4e-230) {
tmp = t_1;
} else if (t <= 2.3e-186) {
tmp = 1.0 / (t * (y / x));
} else if (t <= 1.22e-145) {
tmp = t_1;
} else if (t <= 6.4e+105) {
tmp = x * ((1.0 / y) / t);
} 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) :: t_1
real(8) :: tmp
t_1 = x / (y * -z)
if (t <= 5.4d-230) then
tmp = t_1
else if (t <= 2.3d-186) then
tmp = 1.0d0 / (t * (y / x))
else if (t <= 1.22d-145) then
tmp = t_1
else if (t <= 6.4d+105) then
tmp = x * ((1.0d0 / y) / t)
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 t_1 = x / (y * -z);
double tmp;
if (t <= 5.4e-230) {
tmp = t_1;
} else if (t <= 2.3e-186) {
tmp = 1.0 / (t * (y / x));
} else if (t <= 1.22e-145) {
tmp = t_1;
} else if (t <= 6.4e+105) {
tmp = x * ((1.0 / y) / t);
} else {
tmp = (x / t) / -z;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = x / (y * -z) tmp = 0 if t <= 5.4e-230: tmp = t_1 elif t <= 2.3e-186: tmp = 1.0 / (t * (y / x)) elif t <= 1.22e-145: tmp = t_1 elif t <= 6.4e+105: tmp = x * ((1.0 / y) / t) else: tmp = (x / t) / -z return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(y * Float64(-z))) tmp = 0.0 if (t <= 5.4e-230) tmp = t_1; elseif (t <= 2.3e-186) tmp = Float64(1.0 / Float64(t * Float64(y / x))); elseif (t <= 1.22e-145) tmp = t_1; elseif (t <= 6.4e+105) tmp = Float64(x * Float64(Float64(1.0 / y) / t)); else tmp = Float64(Float64(x / t) / Float64(-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 / (y * -z);
tmp = 0.0;
if (t <= 5.4e-230)
tmp = t_1;
elseif (t <= 2.3e-186)
tmp = 1.0 / (t * (y / x));
elseif (t <= 1.22e-145)
tmp = t_1;
elseif (t <= 6.4e+105)
tmp = x * ((1.0 / y) / t);
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_] := Block[{t$95$1 = N[(x / N[(y * (-z)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 5.4e-230], t$95$1, If[LessEqual[t, 2.3e-186], N[(1.0 / N[(t * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.22e-145], t$95$1, If[LessEqual[t, 6.4e+105], N[(x * N[(N[(1.0 / y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / (-z)), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot \left(-z\right)}\\
\mathbf{if}\;t \leq 5.4 \cdot 10^{-230}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-186}:\\
\;\;\;\;\frac{1}{t \cdot \frac{y}{x}}\\
\mathbf{elif}\;t \leq 1.22 \cdot 10^{-145}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6.4 \cdot 10^{+105}:\\
\;\;\;\;x \cdot \frac{\frac{1}{y}}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{-z}\\
\end{array}
\end{array}
if t < 5.40000000000000023e-230 or 2.3000000000000001e-186 < t < 1.2199999999999999e-145Initial program 87.4%
Taylor expanded in y around inf 56.1%
associate-/r*59.6%
Simplified59.6%
Taylor expanded in t around 0 39.5%
associate-*r/39.5%
neg-mul-139.5%
*-commutative39.5%
Simplified39.5%
if 5.40000000000000023e-230 < t < 2.3000000000000001e-186Initial program 93.8%
Taylor expanded in z around 0 21.0%
clear-num20.9%
inv-pow20.9%
*-commutative20.9%
associate-/l*26.6%
Applied egg-rr26.6%
unpow-126.6%
associate-*r/20.9%
*-commutative20.9%
associate-/l*32.5%
Simplified32.5%
if 1.2199999999999999e-145 < t < 6.4e105Initial program 93.7%
Taylor expanded in z around 0 49.1%
clear-num49.2%
associate-/r/49.3%
*-commutative49.3%
associate-/r*50.5%
Applied egg-rr50.5%
if 6.4e105 < t Initial program 93.1%
Taylor expanded in t around inf 93.1%
associate-/r*99.9%
Simplified99.9%
Taylor expanded in y around 0 63.8%
mul-1-neg63.8%
associate-/r*72.4%
distribute-neg-frac272.4%
Simplified72.4%
Final simplification46.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 (* y (- z)))))
(if (<= t -3.3e-113)
(/ x (* y (+ z t)))
(if (<= t 5.5e-230)
t_1
(if (<= t 2.6e-186)
(/ 1.0 (* t (/ y x)))
(if (<= t 4.8e-145) t_1 (/ x (* (- y z) t))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = x / (y * -z);
double tmp;
if (t <= -3.3e-113) {
tmp = x / (y * (z + t));
} else if (t <= 5.5e-230) {
tmp = t_1;
} else if (t <= 2.6e-186) {
tmp = 1.0 / (t * (y / x));
} else if (t <= 4.8e-145) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x / (y * -z)
if (t <= (-3.3d-113)) then
tmp = x / (y * (z + t))
else if (t <= 5.5d-230) then
tmp = t_1
else if (t <= 2.6d-186) then
tmp = 1.0d0 / (t * (y / x))
else if (t <= 4.8d-145) then
tmp = t_1
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 t_1 = x / (y * -z);
double tmp;
if (t <= -3.3e-113) {
tmp = x / (y * (z + t));
} else if (t <= 5.5e-230) {
tmp = t_1;
} else if (t <= 2.6e-186) {
tmp = 1.0 / (t * (y / x));
} else if (t <= 4.8e-145) {
tmp = t_1;
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = x / (y * -z) tmp = 0 if t <= -3.3e-113: tmp = x / (y * (z + t)) elif t <= 5.5e-230: tmp = t_1 elif t <= 2.6e-186: tmp = 1.0 / (t * (y / x)) elif t <= 4.8e-145: tmp = t_1 else: tmp = x / ((y - z) * t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(y * Float64(-z))) tmp = 0.0 if (t <= -3.3e-113) tmp = Float64(x / Float64(y * Float64(z + t))); elseif (t <= 5.5e-230) tmp = t_1; elseif (t <= 2.6e-186) tmp = Float64(1.0 / Float64(t * Float64(y / x))); elseif (t <= 4.8e-145) tmp = t_1; 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)
t_1 = x / (y * -z);
tmp = 0.0;
if (t <= -3.3e-113)
tmp = x / (y * (z + t));
elseif (t <= 5.5e-230)
tmp = t_1;
elseif (t <= 2.6e-186)
tmp = 1.0 / (t * (y / x));
elseif (t <= 4.8e-145)
tmp = t_1;
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_] := Block[{t$95$1 = N[(x / N[(y * (-z)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.3e-113], N[(x / N[(y * N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e-230], t$95$1, If[LessEqual[t, 2.6e-186], N[(1.0 / N[(t * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.8e-145], t$95$1, 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}
t_1 := \frac{x}{y \cdot \left(-z\right)}\\
\mathbf{if}\;t \leq -3.3 \cdot 10^{-113}:\\
\;\;\;\;\frac{x}{y \cdot \left(z + t\right)}\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{-230}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{-186}:\\
\;\;\;\;\frac{1}{t \cdot \frac{y}{x}}\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{-145}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -3.3000000000000002e-113Initial program 91.4%
Taylor expanded in y around inf 57.2%
associate-/r*57.1%
Simplified57.1%
div-inv57.1%
associate-/l*57.2%
sub-neg57.2%
add-sqr-sqrt32.0%
sqrt-unprod65.8%
sqr-neg65.8%
sqrt-unprod25.3%
add-sqr-sqrt57.2%
+-commutative57.2%
Applied egg-rr57.2%
associate-/r*57.2%
associate-*r/57.2%
*-rgt-identity57.2%
Simplified57.2%
if -3.3000000000000002e-113 < t < 5.4999999999999997e-230 or 2.59999999999999993e-186 < t < 4.8000000000000003e-145Initial program 83.1%
Taylor expanded in y around inf 55.0%
associate-/r*62.4%
Simplified62.4%
Taylor expanded in t around 0 49.5%
associate-*r/49.5%
neg-mul-149.5%
*-commutative49.5%
Simplified49.5%
if 5.4999999999999997e-230 < t < 2.59999999999999993e-186Initial program 93.8%
Taylor expanded in z around 0 21.0%
clear-num20.9%
inv-pow20.9%
*-commutative20.9%
associate-/l*26.6%
Applied egg-rr26.6%
unpow-126.6%
associate-*r/20.9%
*-commutative20.9%
associate-/l*32.5%
Simplified32.5%
if 4.8000000000000003e-145 < t Initial program 93.4%
Taylor expanded in t around inf 81.0%
Final simplification61.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 (* y (- z)))))
(if (<= t 5.5e-230)
t_1
(if (<= t 2.3e-186)
(/ 1.0 (* t (/ y x)))
(if (<= t 4.5e-145) t_1 (/ x (* (- y z) t)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = x / (y * -z);
double tmp;
if (t <= 5.5e-230) {
tmp = t_1;
} else if (t <= 2.3e-186) {
tmp = 1.0 / (t * (y / x));
} else if (t <= 4.5e-145) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x / (y * -z)
if (t <= 5.5d-230) then
tmp = t_1
else if (t <= 2.3d-186) then
tmp = 1.0d0 / (t * (y / x))
else if (t <= 4.5d-145) then
tmp = t_1
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 t_1 = x / (y * -z);
double tmp;
if (t <= 5.5e-230) {
tmp = t_1;
} else if (t <= 2.3e-186) {
tmp = 1.0 / (t * (y / x));
} else if (t <= 4.5e-145) {
tmp = t_1;
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = x / (y * -z) tmp = 0 if t <= 5.5e-230: tmp = t_1 elif t <= 2.3e-186: tmp = 1.0 / (t * (y / x)) elif t <= 4.5e-145: tmp = t_1 else: tmp = x / ((y - z) * t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(y * Float64(-z))) tmp = 0.0 if (t <= 5.5e-230) tmp = t_1; elseif (t <= 2.3e-186) tmp = Float64(1.0 / Float64(t * Float64(y / x))); elseif (t <= 4.5e-145) tmp = t_1; 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)
t_1 = x / (y * -z);
tmp = 0.0;
if (t <= 5.5e-230)
tmp = t_1;
elseif (t <= 2.3e-186)
tmp = 1.0 / (t * (y / x));
elseif (t <= 4.5e-145)
tmp = t_1;
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_] := Block[{t$95$1 = N[(x / N[(y * (-z)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 5.5e-230], t$95$1, If[LessEqual[t, 2.3e-186], N[(1.0 / N[(t * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e-145], t$95$1, 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}
t_1 := \frac{x}{y \cdot \left(-z\right)}\\
\mathbf{if}\;t \leq 5.5 \cdot 10^{-230}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-186}:\\
\;\;\;\;\frac{1}{t \cdot \frac{y}{x}}\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-145}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < 5.4999999999999997e-230 or 2.3000000000000001e-186 < t < 4.5000000000000001e-145Initial program 87.4%
Taylor expanded in y around inf 56.1%
associate-/r*59.6%
Simplified59.6%
Taylor expanded in t around 0 39.5%
associate-*r/39.5%
neg-mul-139.5%
*-commutative39.5%
Simplified39.5%
if 5.4999999999999997e-230 < t < 2.3000000000000001e-186Initial program 93.8%
Taylor expanded in z around 0 21.0%
clear-num20.9%
inv-pow20.9%
*-commutative20.9%
associate-/l*26.6%
Applied egg-rr26.6%
unpow-126.6%
associate-*r/20.9%
*-commutative20.9%
associate-/l*32.5%
Simplified32.5%
if 4.5000000000000001e-145 < t Initial program 93.4%
Taylor expanded in t around inf 81.0%
Final simplification53.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))) (* (/ -1.0 (- t z)) (/ x 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 ((z <= -5e+56) || !(z <= 2.6e-93)) {
tmp = (-1.0 / (t - z)) * (x / 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 ((z <= (-5d+56)) .or. (.not. (z <= 2.6d-93))) then
tmp = ((-1.0d0) / (t - z)) * (x / 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 ((z <= -5e+56) || !(z <= 2.6e-93)) {
tmp = (-1.0 / (t - z)) * (x / 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 (z <= -5e+56) or not (z <= 2.6e-93): tmp = (-1.0 / (t - z)) * (x / 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 ((z <= -5e+56) || !(z <= 2.6e-93)) tmp = Float64(Float64(-1.0 / Float64(t - z)) * Float64(x / 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 ((z <= -5e+56) || ~((z <= 2.6e-93)))
tmp = (-1.0 / (t - z)) * (x / 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[Or[LessEqual[z, -5e+56], N[Not[LessEqual[z, 2.6e-93]], $MachinePrecision]], N[(N[(-1.0 / N[(t - z), $MachinePrecision]), $MachinePrecision] * N[(x / 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}\;z \leq -5 \cdot 10^{+56} \lor \neg \left(z \leq 2.6 \cdot 10^{-93}\right):\\
\;\;\;\;\frac{-1}{t - z} \cdot \frac{x}{z}\\
\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%
if -5.00000000000000024e56 < z < 2.5999999999999998e-93Initial program 93.6%
Taylor expanded in t around inf 81.1%
associate-/r*82.0%
Simplified82.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 (or (<= z -5e+56) (not (<= z 5.5e-91))) (/ 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 <= 5.5e-91)) {
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 <= 5.5d-91))) 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 <= 5.5e-91)) {
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 <= 5.5e-91): 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 <= 5.5e-91)) 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 <= 5.5e-91)))
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, 5.5e-91]], $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 5.5 \cdot 10^{-91}\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 5.49999999999999965e-91 < 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 < 5.49999999999999965e-91Initial program 93.6%
Taylor expanded in t around inf 80.4%
associate-/r*81.3%
Simplified81.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 (<= t -9.5e-144) (/ x (* y (- t z))) (if (<= t 3.3e+43) (/ (/ 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 <= -9.5e-144) {
tmp = x / (y * (t - z));
} else if (t <= 3.3e+43) {
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 <= (-9.5d-144)) then
tmp = x / (y * (t - z))
else if (t <= 3.3d+43) 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 <= -9.5e-144) {
tmp = x / (y * (t - z));
} else if (t <= 3.3e+43) {
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 <= -9.5e-144: tmp = x / (y * (t - z)) elif t <= 3.3e+43: 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 <= -9.5e-144) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (t <= 3.3e+43) 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 <= -9.5e-144)
tmp = x / (y * (t - z));
elseif (t <= 3.3e+43)
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, -9.5e-144], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.3e+43], 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 -9.5 \cdot 10^{-144}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{+43}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -9.49999999999999953e-144Initial program 91.4%
Taylor expanded in y around inf 57.1%
*-commutative57.1%
Simplified57.1%
if -9.49999999999999953e-144 < t < 3.3000000000000001e43Initial program 87.7%
associate-/l/97.2%
Simplified97.2%
Taylor expanded in t around 0 82.7%
associate-*r/82.7%
neg-mul-182.7%
Simplified82.7%
if 3.3000000000000001e43 < t Initial program 91.7%
Taylor expanded in t around inf 90.7%
associate-/r*95.7%
Simplified95.7%
Final simplification76.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 -5e+56) (not (<= z 1.7e-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 <= 1.7e-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 <= 1.7d-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 <= 1.7e-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 <= 1.7e-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 <= 1.7e-93)) tmp = Float64(x / Float64(z * Float64(-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 <= 1.7e-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, 1.7e-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 1.7 \cdot 10^{-93}\right):\\
\;\;\;\;\frac{x}{z \cdot \left(-t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -5.00000000000000024e56 or 1.70000000000000001e-93 < z Initial program 87.2%
Taylor expanded in t around inf 39.1%
Taylor expanded in y around 0 37.0%
associate-*r*37.0%
neg-mul-137.0%
Simplified37.0%
if -5.00000000000000024e56 < z < 1.70000000000000001e-93Initial program 93.6%
Taylor expanded in x around 0 93.6%
associate-/l/94.5%
Simplified94.5%
clear-num94.2%
inv-pow94.2%
Applied egg-rr94.2%
unpow-194.2%
Simplified94.2%
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 (<= t 7.2e+70) (/ x (* (- z 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 <= 7.2e+70) {
tmp = x / ((z - 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 <= 7.2d+70) then
tmp = x / ((z - 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 <= 7.2e+70) {
tmp = x / ((z - 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 <= 7.2e+70: tmp = x / ((z - 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 <= 7.2e+70) tmp = Float64(x / Float64(Float64(z - t) * 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 <= 7.2e+70)
tmp = x / ((z - 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, 7.2e+70], N[(x / N[(N[(z - t), $MachinePrecision] * N[(z - y), $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(z - t\right) \cdot \left(z - y\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%
Taylor expanded in t around inf 92.3%
associate-/r*99.8%
Simplified99.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 2.9e-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 <= 2.9e-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 <= 2.9d-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 <= 2.9e-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 <= 2.9e-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 <= 2.9e-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 <= 2.9e-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, 2.9e-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 2.9 \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 < 2.9000000000000002e-6Initial program 88.9%
Taylor expanded in y around inf 56.5%
*-commutative56.5%
Simplified56.5%
if 2.9000000000000002e-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.2e-56) (/ 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-56) {
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-56) 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-56) {
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-56: 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-56) 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.2e-56)
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-56], 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.2 \cdot 10^{-56}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 1.2e-56Initial program 88.6%
Taylor expanded in y around inf 55.6%
*-commutative55.6%
Simplified55.6%
if 1.2e-56 < t Initial program 93.2%
Taylor expanded in t around inf 87.2%
associate-/r*89.9%
Simplified89.9%
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 1.36e-7) (/ (/ 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.36e-7) {
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.36d-7) 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.36e-7) {
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.36e-7: 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.36e-7) 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.36e-7)
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.36e-7], 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.36 \cdot 10^{-7}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 1.36e-7Initial program 88.9%
Taylor expanded in y around inf 56.5%
associate-/r*60.3%
Simplified60.3%
if 1.36e-7 < t Initial program 92.8%
Taylor expanded in t around inf 86.5%
associate-/r*89.3%
Simplified89.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 (<= y -3e+63) (/ (/ x y) t) (/ (/ x t) y)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3e+63) {
tmp = (x / y) / 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 (y <= (-3d+63)) then
tmp = (x / y) / 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 (y <= -3e+63) {
tmp = (x / y) / 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 y <= -3e+63: tmp = (x / y) / 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 (y <= -3e+63) tmp = Float64(Float64(x / y) / 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 (y <= -3e+63)
tmp = (x / y) / 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[LessEqual[y, -3e+63], N[(N[(x / y), $MachinePrecision] / t), $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}\;y \leq -3 \cdot 10^{+63}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if y < -2.99999999999999999e63Initial program 92.6%
Taylor expanded in z around 0 46.1%
*-un-lft-identity46.1%
times-frac58.1%
Applied egg-rr58.1%
associate-*l/58.1%
*-lft-identity58.1%
Simplified58.1%
if -2.99999999999999999e63 < y Initial program 89.4%
Taylor expanded in x around 0 89.4%
associate-/l/97.5%
Simplified97.5%
clear-num97.1%
inv-pow97.1%
Applied egg-rr97.1%
unpow-197.1%
Simplified97.1%
Taylor expanded in z around 0 36.8%
associate-/r*40.3%
Simplified40.3%
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 (/ (/ 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%
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(Float64(x / 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[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{\frac{x}{t}}{y}
\end{array}
Initial program 89.9%
Taylor expanded in x around 0 89.9%
associate-/l/97.4%
Simplified97.4%
clear-num97.0%
inv-pow97.0%
Applied egg-rr97.0%
unpow-197.0%
Simplified97.0%
Taylor expanded in z around 0 38.2%
associate-/r*41.5%
Simplified41.5%
Final simplification41.5%
(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
:herbie-target
(if (< (/ x (* (- y z) (- t z))) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 (* (- y z) (- t z)))))
(/ x (* (- y z) (- t z))))