
(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: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (/ (/ 1.0 (- y z)) (/ (- t z) x)))
assert(y < t);
double code(double x, double y, double z, double t) {
return (1.0 / (y - z)) / ((t - z) / x);
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (1.0d0 / (y - z)) / ((t - z) / x)
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
return (1.0 / (y - z)) / ((t - z) / x);
}
[y, t] = sort([y, t]) def code(x, y, z, t): return (1.0 / (y - z)) / ((t - z) / x)
y, t = sort([y, t]) function code(x, y, z, t) return Float64(Float64(1.0 / Float64(y - z)) / Float64(Float64(t - z) / x)) end
y, t = num2cell(sort([y, t])){:}
function tmp = code(x, y, z, t)
tmp = (1.0 / (y - z)) / ((t - z) / x);
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(N[(1.0 / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\frac{\frac{1}{y - z}}{\frac{t - z}{x}}
\end{array}
Initial program 87.0%
add-cube-cbrt86.2%
*-commutative86.2%
times-frac97.2%
pow297.2%
Applied egg-rr97.2%
frac-times86.2%
unpow286.2%
add-cube-cbrt87.0%
associate-/r*96.8%
clear-num96.7%
associate-/l/96.0%
associate-/r*96.7%
Applied egg-rr96.7%
Final simplification96.7%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ 1.0 (* y (/ t x)))))
(if (<= y -3.3e+106)
(/ (/ (- x) y) z)
(if (<= y -7.5e+47)
t_1
(if (<= y -1.8e-10)
(/ (- x) (* y z))
(if (or (<= y -5.4e-104) (not (<= y 2.35e-194)))
t_1
(/ (- x) (* z t))))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = 1.0 / (y * (t / x));
double tmp;
if (y <= -3.3e+106) {
tmp = (-x / y) / z;
} else if (y <= -7.5e+47) {
tmp = t_1;
} else if (y <= -1.8e-10) {
tmp = -x / (y * z);
} else if ((y <= -5.4e-104) || !(y <= 2.35e-194)) {
tmp = t_1;
} else {
tmp = -x / (z * t);
}
return tmp;
}
NOTE: y 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 = 1.0d0 / (y * (t / x))
if (y <= (-3.3d+106)) then
tmp = (-x / y) / z
else if (y <= (-7.5d+47)) then
tmp = t_1
else if (y <= (-1.8d-10)) then
tmp = -x / (y * z)
else if ((y <= (-5.4d-104)) .or. (.not. (y <= 2.35d-194))) then
tmp = t_1
else
tmp = -x / (z * t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = 1.0 / (y * (t / x));
double tmp;
if (y <= -3.3e+106) {
tmp = (-x / y) / z;
} else if (y <= -7.5e+47) {
tmp = t_1;
} else if (y <= -1.8e-10) {
tmp = -x / (y * z);
} else if ((y <= -5.4e-104) || !(y <= 2.35e-194)) {
tmp = t_1;
} else {
tmp = -x / (z * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = 1.0 / (y * (t / x)) tmp = 0 if y <= -3.3e+106: tmp = (-x / y) / z elif y <= -7.5e+47: tmp = t_1 elif y <= -1.8e-10: tmp = -x / (y * z) elif (y <= -5.4e-104) or not (y <= 2.35e-194): tmp = t_1 else: tmp = -x / (z * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(1.0 / Float64(y * Float64(t / x))) tmp = 0.0 if (y <= -3.3e+106) tmp = Float64(Float64(Float64(-x) / y) / z); elseif (y <= -7.5e+47) tmp = t_1; elseif (y <= -1.8e-10) tmp = Float64(Float64(-x) / Float64(y * z)); elseif ((y <= -5.4e-104) || !(y <= 2.35e-194)) tmp = t_1; else tmp = Float64(Float64(-x) / Float64(z * t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = 1.0 / (y * (t / x));
tmp = 0.0;
if (y <= -3.3e+106)
tmp = (-x / y) / z;
elseif (y <= -7.5e+47)
tmp = t_1;
elseif (y <= -1.8e-10)
tmp = -x / (y * z);
elseif ((y <= -5.4e-104) || ~((y <= 2.35e-194)))
tmp = t_1;
else
tmp = -x / (z * t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(1.0 / N[(y * N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.3e+106], N[(N[((-x) / y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, -7.5e+47], t$95$1, If[LessEqual[y, -1.8e-10], N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -5.4e-104], N[Not[LessEqual[y, 2.35e-194]], $MachinePrecision]], t$95$1, N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{1}{y \cdot \frac{t}{x}}\\
\mathbf{if}\;y \leq -3.3 \cdot 10^{+106}:\\
\;\;\;\;\frac{\frac{-x}{y}}{z}\\
\mathbf{elif}\;y \leq -7.5 \cdot 10^{+47}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.8 \cdot 10^{-10}:\\
\;\;\;\;\frac{-x}{y \cdot z}\\
\mathbf{elif}\;y \leq -5.4 \cdot 10^{-104} \lor \neg \left(y \leq 2.35 \cdot 10^{-194}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\end{array}
\end{array}
if y < -3.30000000000000008e106Initial program 82.8%
Taylor expanded in t around 0 51.6%
associate-*r/51.6%
neg-mul-151.6%
Simplified51.6%
Taylor expanded in z around 0 51.6%
mul-1-neg51.6%
associate-/r*67.9%
distribute-neg-frac67.9%
distribute-neg-frac67.9%
Simplified67.9%
if -3.30000000000000008e106 < y < -7.4999999999999999e47 or -1.8e-10 < y < -5.3999999999999997e-104 or 2.3500000000000001e-194 < y Initial program 85.6%
Taylor expanded in z around 0 39.0%
clear-num39.0%
inv-pow39.0%
associate-/l*41.7%
Applied egg-rr41.7%
unpow-141.7%
associate-/r/41.8%
Simplified41.8%
if -7.4999999999999999e47 < y < -1.8e-10Initial program 90.4%
Taylor expanded in y around inf 52.6%
*-commutative52.6%
associate-/r*52.3%
Simplified52.3%
Taylor expanded in t around 0 42.9%
associate-*r/42.9%
neg-mul-142.9%
*-commutative42.9%
Simplified42.9%
if -5.3999999999999997e-104 < y < 2.3500000000000001e-194Initial program 90.7%
add-cube-cbrt89.8%
*-commutative89.8%
times-frac98.4%
pow298.4%
Applied egg-rr98.4%
frac-times89.8%
unpow289.8%
add-cube-cbrt90.7%
associate-/r*98.5%
clear-num98.4%
associate-/l/97.6%
associate-/r*98.4%
Applied egg-rr98.4%
Taylor expanded in t around inf 60.2%
associate-/r*63.4%
Simplified63.4%
Taylor expanded in y around 0 51.6%
associate-*r/51.6%
neg-mul-151.6%
*-commutative51.6%
Simplified51.6%
Final simplification48.5%
NOTE: y 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 z)))) (t_2 (/ (/ (- x) z) (- y z))))
(if (<= z -2.1e+162)
t_2
(if (<= z -3.1e-250)
t_1
(if (<= z 1.62e-198)
(/ (/ x (- t z)) y)
(if (<= z 3.1e+29) t_1 t_2))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * (t - z));
double t_2 = (-x / z) / (y - z);
double tmp;
if (z <= -2.1e+162) {
tmp = t_2;
} else if (z <= -3.1e-250) {
tmp = t_1;
} else if (z <= 1.62e-198) {
tmp = (x / (t - z)) / y;
} else if (z <= 3.1e+29) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: y 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 - z))
t_2 = (-x / z) / (y - z)
if (z <= (-2.1d+162)) then
tmp = t_2
else if (z <= (-3.1d-250)) then
tmp = t_1
else if (z <= 1.62d-198) then
tmp = (x / (t - z)) / y
else if (z <= 3.1d+29) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * (t - z));
double t_2 = (-x / z) / (y - z);
double tmp;
if (z <= -2.1e+162) {
tmp = t_2;
} else if (z <= -3.1e-250) {
tmp = t_1;
} else if (z <= 1.62e-198) {
tmp = (x / (t - z)) / y;
} else if (z <= 3.1e+29) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = x / ((y - z) * (t - z)) t_2 = (-x / z) / (y - z) tmp = 0 if z <= -2.1e+162: tmp = t_2 elif z <= -3.1e-250: tmp = t_1 elif z <= 1.62e-198: tmp = (x / (t - z)) / y elif z <= 3.1e+29: tmp = t_1 else: tmp = t_2 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(Float64(y - z) * Float64(t - z))) t_2 = Float64(Float64(Float64(-x) / z) / Float64(y - z)) tmp = 0.0 if (z <= -2.1e+162) tmp = t_2; elseif (z <= -3.1e-250) tmp = t_1; elseif (z <= 1.62e-198) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (z <= 3.1e+29) tmp = t_1; else tmp = t_2; end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = x / ((y - z) * (t - z));
t_2 = (-x / z) / (y - z);
tmp = 0.0;
if (z <= -2.1e+162)
tmp = t_2;
elseif (z <= -3.1e-250)
tmp = t_1;
elseif (z <= 1.62e-198)
tmp = (x / (t - z)) / y;
elseif (z <= 3.1e+29)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-x) / z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.1e+162], t$95$2, If[LessEqual[z, -3.1e-250], t$95$1, If[LessEqual[z, 1.62e-198], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 3.1e+29], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
t_2 := \frac{\frac{-x}{z}}{y - z}\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{+162}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{-250}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.62 \cdot 10^{-198}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{+29}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -2.1e162 or 3.0999999999999999e29 < z Initial program 76.2%
add-cube-cbrt76.0%
*-commutative76.0%
times-frac99.2%
pow299.2%
Applied egg-rr99.2%
frac-times76.0%
unpow276.0%
add-cube-cbrt76.2%
associate-/r*99.8%
clear-num99.7%
associate-/l/98.7%
associate-/r*99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 71.4%
associate-/r*89.6%
associate-*r/89.6%
neg-mul-189.6%
distribute-neg-frac89.6%
Simplified89.6%
if -2.1e162 < z < -3.1000000000000001e-250 or 1.62e-198 < z < 3.0999999999999999e29Initial program 95.7%
if -3.1000000000000001e-250 < z < 1.62e-198Initial program 77.8%
Taylor expanded in y around inf 77.8%
*-commutative77.8%
associate-/r*90.4%
Simplified90.4%
Final simplification93.0%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x t) y)))
(if (<= y -1.3e+106)
(/ (/ (- x) y) z)
(if (<= y -2.85e+47)
t_1
(if (<= y -1.82e-10)
(/ (- x) (* y z))
(if (or (<= y -6.6e-102) (not (<= y 1.85e-194)))
t_1
(/ (- x) (* z t))))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / t) / y;
double tmp;
if (y <= -1.3e+106) {
tmp = (-x / y) / z;
} else if (y <= -2.85e+47) {
tmp = t_1;
} else if (y <= -1.82e-10) {
tmp = -x / (y * z);
} else if ((y <= -6.6e-102) || !(y <= 1.85e-194)) {
tmp = t_1;
} else {
tmp = -x / (z * t);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x / t) / y
if (y <= (-1.3d+106)) then
tmp = (-x / y) / z
else if (y <= (-2.85d+47)) then
tmp = t_1
else if (y <= (-1.82d-10)) then
tmp = -x / (y * z)
else if ((y <= (-6.6d-102)) .or. (.not. (y <= 1.85d-194))) then
tmp = t_1
else
tmp = -x / (z * t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / t) / y;
double tmp;
if (y <= -1.3e+106) {
tmp = (-x / y) / z;
} else if (y <= -2.85e+47) {
tmp = t_1;
} else if (y <= -1.82e-10) {
tmp = -x / (y * z);
} else if ((y <= -6.6e-102) || !(y <= 1.85e-194)) {
tmp = t_1;
} else {
tmp = -x / (z * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (x / t) / y tmp = 0 if y <= -1.3e+106: tmp = (-x / y) / z elif y <= -2.85e+47: tmp = t_1 elif y <= -1.82e-10: tmp = -x / (y * z) elif (y <= -6.6e-102) or not (y <= 1.85e-194): tmp = t_1 else: tmp = -x / (z * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / t) / y) tmp = 0.0 if (y <= -1.3e+106) tmp = Float64(Float64(Float64(-x) / y) / z); elseif (y <= -2.85e+47) tmp = t_1; elseif (y <= -1.82e-10) tmp = Float64(Float64(-x) / Float64(y * z)); elseif ((y <= -6.6e-102) || !(y <= 1.85e-194)) tmp = t_1; else tmp = Float64(Float64(-x) / Float64(z * t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / t) / y;
tmp = 0.0;
if (y <= -1.3e+106)
tmp = (-x / y) / z;
elseif (y <= -2.85e+47)
tmp = t_1;
elseif (y <= -1.82e-10)
tmp = -x / (y * z);
elseif ((y <= -6.6e-102) || ~((y <= 1.85e-194)))
tmp = t_1;
else
tmp = -x / (z * t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -1.3e+106], N[(N[((-x) / y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, -2.85e+47], t$95$1, If[LessEqual[y, -1.82e-10], N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -6.6e-102], N[Not[LessEqual[y, 1.85e-194]], $MachinePrecision]], t$95$1, N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{t}}{y}\\
\mathbf{if}\;y \leq -1.3 \cdot 10^{+106}:\\
\;\;\;\;\frac{\frac{-x}{y}}{z}\\
\mathbf{elif}\;y \leq -2.85 \cdot 10^{+47}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.82 \cdot 10^{-10}:\\
\;\;\;\;\frac{-x}{y \cdot z}\\
\mathbf{elif}\;y \leq -6.6 \cdot 10^{-102} \lor \neg \left(y \leq 1.85 \cdot 10^{-194}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\end{array}
\end{array}
if y < -1.3000000000000001e106Initial program 82.8%
Taylor expanded in t around 0 51.6%
associate-*r/51.6%
neg-mul-151.6%
Simplified51.6%
Taylor expanded in z around 0 51.6%
mul-1-neg51.6%
associate-/r*67.9%
distribute-neg-frac67.9%
distribute-neg-frac67.9%
Simplified67.9%
if -1.3000000000000001e106 < y < -2.8499999999999998e47 or -1.8199999999999999e-10 < y < -6.6e-102 or 1.85000000000000004e-194 < y Initial program 85.6%
Taylor expanded in y around inf 58.3%
*-commutative58.3%
associate-/r*59.6%
Simplified59.6%
Taylor expanded in t around inf 41.8%
if -2.8499999999999998e47 < y < -1.8199999999999999e-10Initial program 90.4%
Taylor expanded in y around inf 52.6%
*-commutative52.6%
associate-/r*52.3%
Simplified52.3%
Taylor expanded in t around 0 42.9%
associate-*r/42.9%
neg-mul-142.9%
*-commutative42.9%
Simplified42.9%
if -6.6e-102 < y < 1.85000000000000004e-194Initial program 90.7%
add-cube-cbrt89.8%
*-commutative89.8%
times-frac98.4%
pow298.4%
Applied egg-rr98.4%
frac-times89.8%
unpow289.8%
add-cube-cbrt90.7%
associate-/r*98.5%
clear-num98.4%
associate-/l/97.6%
associate-/r*98.4%
Applied egg-rr98.4%
Taylor expanded in t around inf 60.2%
associate-/r*63.4%
Simplified63.4%
Taylor expanded in y around 0 51.6%
associate-*r/51.6%
neg-mul-151.6%
*-commutative51.6%
Simplified51.6%
Final simplification48.4%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x t) y)))
(if (<= y -4.2e+106)
(/ (/ (- x) y) z)
(if (<= y -5.6e+47)
t_1
(if (<= y -1.8e-10)
(/ (- x) (* y z))
(if (<= y -2.3e-104)
(* (/ x t) (/ 1.0 y))
(if (<= y 2.1e-194) (/ (- x) (* z t)) t_1)))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / t) / y;
double tmp;
if (y <= -4.2e+106) {
tmp = (-x / y) / z;
} else if (y <= -5.6e+47) {
tmp = t_1;
} else if (y <= -1.8e-10) {
tmp = -x / (y * z);
} else if (y <= -2.3e-104) {
tmp = (x / t) * (1.0 / y);
} else if (y <= 2.1e-194) {
tmp = -x / (z * t);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x / t) / y
if (y <= (-4.2d+106)) then
tmp = (-x / y) / z
else if (y <= (-5.6d+47)) then
tmp = t_1
else if (y <= (-1.8d-10)) then
tmp = -x / (y * z)
else if (y <= (-2.3d-104)) then
tmp = (x / t) * (1.0d0 / y)
else if (y <= 2.1d-194) then
tmp = -x / (z * t)
else
tmp = t_1
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / t) / y;
double tmp;
if (y <= -4.2e+106) {
tmp = (-x / y) / z;
} else if (y <= -5.6e+47) {
tmp = t_1;
} else if (y <= -1.8e-10) {
tmp = -x / (y * z);
} else if (y <= -2.3e-104) {
tmp = (x / t) * (1.0 / y);
} else if (y <= 2.1e-194) {
tmp = -x / (z * t);
} else {
tmp = t_1;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (x / t) / y tmp = 0 if y <= -4.2e+106: tmp = (-x / y) / z elif y <= -5.6e+47: tmp = t_1 elif y <= -1.8e-10: tmp = -x / (y * z) elif y <= -2.3e-104: tmp = (x / t) * (1.0 / y) elif y <= 2.1e-194: tmp = -x / (z * t) else: tmp = t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / t) / y) tmp = 0.0 if (y <= -4.2e+106) tmp = Float64(Float64(Float64(-x) / y) / z); elseif (y <= -5.6e+47) tmp = t_1; elseif (y <= -1.8e-10) tmp = Float64(Float64(-x) / Float64(y * z)); elseif (y <= -2.3e-104) tmp = Float64(Float64(x / t) * Float64(1.0 / y)); elseif (y <= 2.1e-194) tmp = Float64(Float64(-x) / Float64(z * t)); else tmp = t_1; end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / t) / y;
tmp = 0.0;
if (y <= -4.2e+106)
tmp = (-x / y) / z;
elseif (y <= -5.6e+47)
tmp = t_1;
elseif (y <= -1.8e-10)
tmp = -x / (y * z);
elseif (y <= -2.3e-104)
tmp = (x / t) * (1.0 / y);
elseif (y <= 2.1e-194)
tmp = -x / (z * t);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -4.2e+106], N[(N[((-x) / y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, -5.6e+47], t$95$1, If[LessEqual[y, -1.8e-10], N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.3e-104], N[(N[(x / t), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e-194], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{t}}{y}\\
\mathbf{if}\;y \leq -4.2 \cdot 10^{+106}:\\
\;\;\;\;\frac{\frac{-x}{y}}{z}\\
\mathbf{elif}\;y \leq -5.6 \cdot 10^{+47}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.8 \cdot 10^{-10}:\\
\;\;\;\;\frac{-x}{y \cdot z}\\
\mathbf{elif}\;y \leq -2.3 \cdot 10^{-104}:\\
\;\;\;\;\frac{x}{t} \cdot \frac{1}{y}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{-194}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -4.2000000000000001e106Initial program 82.8%
Taylor expanded in t around 0 51.6%
associate-*r/51.6%
neg-mul-151.6%
Simplified51.6%
Taylor expanded in z around 0 51.6%
mul-1-neg51.6%
associate-/r*67.9%
distribute-neg-frac67.9%
distribute-neg-frac67.9%
Simplified67.9%
if -4.2000000000000001e106 < y < -5.59999999999999976e47 or 2.1e-194 < y Initial program 83.7%
Taylor expanded in y around inf 58.4%
*-commutative58.4%
associate-/r*59.0%
Simplified59.0%
Taylor expanded in t around inf 41.2%
if -5.59999999999999976e47 < y < -1.8e-10Initial program 90.4%
Taylor expanded in y around inf 52.6%
*-commutative52.6%
associate-/r*52.3%
Simplified52.3%
Taylor expanded in t around 0 42.9%
associate-*r/42.9%
neg-mul-142.9%
*-commutative42.9%
Simplified42.9%
if -1.8e-10 < y < -2.2999999999999999e-104Initial program 99.7%
Taylor expanded in z around 0 40.9%
associate-/r*46.4%
div-inv46.4%
Applied egg-rr46.4%
if -2.2999999999999999e-104 < y < 2.1e-194Initial program 90.7%
add-cube-cbrt89.8%
*-commutative89.8%
times-frac98.4%
pow298.4%
Applied egg-rr98.4%
frac-times89.8%
unpow289.8%
add-cube-cbrt90.7%
associate-/r*98.5%
clear-num98.4%
associate-/l/97.6%
associate-/r*98.4%
Applied egg-rr98.4%
Taylor expanded in t around inf 60.2%
associate-/r*63.4%
Simplified63.4%
Taylor expanded in y around 0 51.6%
associate-*r/51.6%
neg-mul-151.6%
*-commutative51.6%
Simplified51.6%
Final simplification48.4%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= y -8.8e+213)
(/ (/ x (- t z)) y)
(if (<= y -3.5e+46)
(/ x (* y (- t z)))
(if (<= y -3.6e-103)
(/ (- x) (* z (- y z)))
(if (<= y 3.4e-133) (/ (/ (- x) z) (- t z)) (/ (/ x t) (- y z)))))))assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.8e+213) {
tmp = (x / (t - z)) / y;
} else if (y <= -3.5e+46) {
tmp = x / (y * (t - z));
} else if (y <= -3.6e-103) {
tmp = -x / (z * (y - z));
} else if (y <= 3.4e-133) {
tmp = (-x / z) / (t - z);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-8.8d+213)) then
tmp = (x / (t - z)) / y
else if (y <= (-3.5d+46)) then
tmp = x / (y * (t - z))
else if (y <= (-3.6d-103)) then
tmp = -x / (z * (y - z))
else if (y <= 3.4d-133) then
tmp = (-x / z) / (t - z)
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.8e+213) {
tmp = (x / (t - z)) / y;
} else if (y <= -3.5e+46) {
tmp = x / (y * (t - z));
} else if (y <= -3.6e-103) {
tmp = -x / (z * (y - z));
} else if (y <= 3.4e-133) {
tmp = (-x / z) / (t - z);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if y <= -8.8e+213: tmp = (x / (t - z)) / y elif y <= -3.5e+46: tmp = x / (y * (t - z)) elif y <= -3.6e-103: tmp = -x / (z * (y - z)) elif y <= 3.4e-133: tmp = (-x / z) / (t - z) else: tmp = (x / t) / (y - z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -8.8e+213) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (y <= -3.5e+46) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (y <= -3.6e-103) tmp = Float64(Float64(-x) / Float64(z * Float64(y - z))); elseif (y <= 3.4e-133) tmp = Float64(Float64(Float64(-x) / z) / Float64(t - z)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -8.8e+213)
tmp = (x / (t - z)) / y;
elseif (y <= -3.5e+46)
tmp = x / (y * (t - z));
elseif (y <= -3.6e-103)
tmp = -x / (z * (y - z));
elseif (y <= 3.4e-133)
tmp = (-x / z) / (t - z);
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -8.8e+213], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -3.5e+46], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.6e-103], N[((-x) / N[(z * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.4e-133], N[(N[((-x) / z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.8 \cdot 10^{+213}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;y \leq -3.5 \cdot 10^{+46}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{-103}:\\
\;\;\;\;\frac{-x}{z \cdot \left(y - z\right)}\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{-133}:\\
\;\;\;\;\frac{\frac{-x}{z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -8.7999999999999995e213Initial program 72.9%
Taylor expanded in y around inf 72.9%
*-commutative72.9%
associate-/r*95.4%
Simplified95.4%
if -8.7999999999999995e213 < y < -3.49999999999999985e46Initial program 93.7%
Taylor expanded in y around inf 93.7%
*-commutative93.7%
Simplified93.7%
if -3.49999999999999985e46 < y < -3.5999999999999998e-103Initial program 96.1%
add-cube-cbrt95.0%
*-commutative95.0%
times-frac98.6%
pow298.6%
Applied egg-rr98.6%
frac-times95.0%
unpow295.0%
add-cube-cbrt96.1%
associate-/r*96.1%
clear-num96.1%
associate-/l/96.1%
associate-/r*96.2%
Applied egg-rr96.2%
clear-num96.1%
associate-/r/96.1%
Applied egg-rr96.1%
Taylor expanded in t around 0 65.4%
mul-1-neg65.4%
Simplified65.4%
if -3.5999999999999998e-103 < y < 3.40000000000000006e-133Initial program 86.9%
add-cube-cbrt86.0%
*-commutative86.0%
times-frac98.4%
pow298.4%
Applied egg-rr98.4%
frac-times86.0%
unpow286.0%
add-cube-cbrt86.9%
associate-/r*98.7%
clear-num98.6%
associate-/l/97.9%
associate-/r*98.6%
Applied egg-rr98.6%
Taylor expanded in y around 0 79.1%
mul-1-neg79.1%
associate-/r*82.9%
distribute-neg-frac82.9%
distribute-neg-frac82.9%
Simplified82.9%
if 3.40000000000000006e-133 < y Initial program 85.5%
add-cube-cbrt84.7%
*-commutative84.7%
times-frac96.7%
pow296.7%
Applied egg-rr96.7%
frac-times84.7%
unpow284.7%
add-cube-cbrt85.5%
associate-/r*95.2%
clear-num95.2%
associate-/l/94.1%
associate-/r*95.2%
Applied egg-rr95.2%
Taylor expanded in t around inf 51.0%
associate-/r*55.3%
Simplified55.3%
Final simplification74.5%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= t -2.15e-122)
(/ (/ x y) t)
(if (<= t 1.48e-148)
(/ (/ (- x) y) z)
(if (or (<= t 3.2e-79) (not (<= t 5.5e-37)))
(/ x (* (- y z) t))
(- (/ (/ x z) y))))))assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.15e-122) {
tmp = (x / y) / t;
} else if (t <= 1.48e-148) {
tmp = (-x / y) / z;
} else if ((t <= 3.2e-79) || !(t <= 5.5e-37)) {
tmp = x / ((y - z) * t);
} else {
tmp = -((x / z) / y);
}
return tmp;
}
NOTE: y 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.15d-122)) then
tmp = (x / y) / t
else if (t <= 1.48d-148) then
tmp = (-x / y) / z
else if ((t <= 3.2d-79) .or. (.not. (t <= 5.5d-37))) then
tmp = x / ((y - z) * t)
else
tmp = -((x / z) / y)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.15e-122) {
tmp = (x / y) / t;
} else if (t <= 1.48e-148) {
tmp = (-x / y) / z;
} else if ((t <= 3.2e-79) || !(t <= 5.5e-37)) {
tmp = x / ((y - z) * t);
} else {
tmp = -((x / z) / y);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if t <= -2.15e-122: tmp = (x / y) / t elif t <= 1.48e-148: tmp = (-x / y) / z elif (t <= 3.2e-79) or not (t <= 5.5e-37): tmp = x / ((y - z) * t) else: tmp = -((x / z) / y) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -2.15e-122) tmp = Float64(Float64(x / y) / t); elseif (t <= 1.48e-148) tmp = Float64(Float64(Float64(-x) / y) / z); elseif ((t <= 3.2e-79) || !(t <= 5.5e-37)) tmp = Float64(x / Float64(Float64(y - z) * t)); else tmp = Float64(-Float64(Float64(x / z) / y)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -2.15e-122)
tmp = (x / y) / t;
elseif (t <= 1.48e-148)
tmp = (-x / y) / z;
elseif ((t <= 3.2e-79) || ~((t <= 5.5e-37)))
tmp = x / ((y - z) * t);
else
tmp = -((x / z) / y);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -2.15e-122], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 1.48e-148], N[(N[((-x) / y), $MachinePrecision] / z), $MachinePrecision], If[Or[LessEqual[t, 3.2e-79], N[Not[LessEqual[t, 5.5e-37]], $MachinePrecision]], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], (-N[(N[(x / z), $MachinePrecision] / y), $MachinePrecision])]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.15 \cdot 10^{-122}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;t \leq 1.48 \cdot 10^{-148}:\\
\;\;\;\;\frac{\frac{-x}{y}}{z}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-79} \lor \neg \left(t \leq 5.5 \cdot 10^{-37}\right):\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;-\frac{\frac{x}{z}}{y}\\
\end{array}
\end{array}
if t < -2.15000000000000009e-122Initial program 87.8%
Taylor expanded in z around 0 41.2%
associate-/r*45.2%
div-inv45.2%
Applied egg-rr45.2%
associate-*l/41.1%
un-div-inv41.2%
Applied egg-rr41.2%
if -2.15000000000000009e-122 < t < 1.47999999999999996e-148Initial program 84.3%
Taylor expanded in t around 0 77.1%
associate-*r/77.1%
neg-mul-177.1%
Simplified77.1%
Taylor expanded in z around 0 44.7%
mul-1-neg44.7%
associate-/r*48.3%
distribute-neg-frac48.3%
distribute-neg-frac48.3%
Simplified48.3%
if 1.47999999999999996e-148 < t < 3.19999999999999988e-79 or 5.4999999999999998e-37 < t Initial program 87.8%
Taylor expanded in t around inf 77.3%
if 3.19999999999999988e-79 < t < 5.4999999999999998e-37Initial program 100.0%
Taylor expanded in y around inf 53.2%
*-commutative53.2%
associate-/r*76.2%
Simplified76.2%
Taylor expanded in t around 0 52.3%
associate-*r/52.3%
neg-mul-152.3%
Simplified52.3%
Final simplification55.3%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= t -1.8e-122)
(/ (/ x y) t)
(if (<= t 2.95e-148)
(/ (/ (- x) y) z)
(if (or (<= t 1.02e-81) (not (<= t 5.2e-34)))
(/ x (* (- y z) t))
(/ x (* z (- y z)))))))assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.8e-122) {
tmp = (x / y) / t;
} else if (t <= 2.95e-148) {
tmp = (-x / y) / z;
} else if ((t <= 1.02e-81) || !(t <= 5.2e-34)) {
tmp = x / ((y - z) * t);
} else {
tmp = x / (z * (y - z));
}
return tmp;
}
NOTE: y 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.8d-122)) then
tmp = (x / y) / t
else if (t <= 2.95d-148) then
tmp = (-x / y) / z
else if ((t <= 1.02d-81) .or. (.not. (t <= 5.2d-34))) then
tmp = x / ((y - z) * t)
else
tmp = x / (z * (y - z))
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.8e-122) {
tmp = (x / y) / t;
} else if (t <= 2.95e-148) {
tmp = (-x / y) / z;
} else if ((t <= 1.02e-81) || !(t <= 5.2e-34)) {
tmp = x / ((y - z) * t);
} else {
tmp = x / (z * (y - z));
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if t <= -1.8e-122: tmp = (x / y) / t elif t <= 2.95e-148: tmp = (-x / y) / z elif (t <= 1.02e-81) or not (t <= 5.2e-34): tmp = x / ((y - z) * t) else: tmp = x / (z * (y - z)) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -1.8e-122) tmp = Float64(Float64(x / y) / t); elseif (t <= 2.95e-148) tmp = Float64(Float64(Float64(-x) / y) / z); elseif ((t <= 1.02e-81) || !(t <= 5.2e-34)) tmp = Float64(x / Float64(Float64(y - z) * t)); else tmp = Float64(x / Float64(z * Float64(y - z))); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -1.8e-122)
tmp = (x / y) / t;
elseif (t <= 2.95e-148)
tmp = (-x / y) / z;
elseif ((t <= 1.02e-81) || ~((t <= 5.2e-34)))
tmp = x / ((y - z) * t);
else
tmp = x / (z * (y - z));
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -1.8e-122], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 2.95e-148], N[(N[((-x) / y), $MachinePrecision] / z), $MachinePrecision], If[Or[LessEqual[t, 1.02e-81], N[Not[LessEqual[t, 5.2e-34]], $MachinePrecision]], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(x / N[(z * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.8 \cdot 10^{-122}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;t \leq 2.95 \cdot 10^{-148}:\\
\;\;\;\;\frac{\frac{-x}{y}}{z}\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{-81} \lor \neg \left(t \leq 5.2 \cdot 10^{-34}\right):\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z \cdot \left(y - z\right)}\\
\end{array}
\end{array}
if t < -1.79999999999999997e-122Initial program 87.8%
Taylor expanded in z around 0 41.2%
associate-/r*45.2%
div-inv45.2%
Applied egg-rr45.2%
associate-*l/41.1%
un-div-inv41.2%
Applied egg-rr41.2%
if -1.79999999999999997e-122 < t < 2.95000000000000008e-148Initial program 84.3%
Taylor expanded in t around 0 77.1%
associate-*r/77.1%
neg-mul-177.1%
Simplified77.1%
Taylor expanded in z around 0 44.7%
mul-1-neg44.7%
associate-/r*48.3%
distribute-neg-frac48.3%
distribute-neg-frac48.3%
Simplified48.3%
if 2.95000000000000008e-148 < t < 1.01999999999999998e-81 or 5.1999999999999999e-34 < t Initial program 87.8%
Taylor expanded in t around inf 77.3%
if 1.01999999999999998e-81 < t < 5.1999999999999999e-34Initial program 100.0%
Taylor expanded in t around 0 76.6%
associate-*r/76.6%
neg-mul-176.6%
Simplified76.6%
expm1-log1p-u73.9%
expm1-udef73.9%
add-sqr-sqrt50.0%
sqrt-unprod50.0%
sqr-neg50.0%
sqrt-unprod0.0%
add-sqr-sqrt50.0%
associate-/r*50.0%
Applied egg-rr50.0%
expm1-def50.0%
expm1-log1p50.2%
associate-/r*50.3%
Simplified50.3%
Final simplification55.3%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t -2.2e-122) (/ (/ x (- t z)) y) (if (<= t 2.1e+16) (/ (- x) (* z (- y z))) (/ (/ x t) (- y z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.2e-122) {
tmp = (x / (t - z)) / y;
} else if (t <= 2.1e+16) {
tmp = -x / (z * (y - z));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: y 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.2d-122)) then
tmp = (x / (t - z)) / y
else if (t <= 2.1d+16) then
tmp = -x / (z * (y - z))
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.2e-122) {
tmp = (x / (t - z)) / y;
} else if (t <= 2.1e+16) {
tmp = -x / (z * (y - z));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if t <= -2.2e-122: tmp = (x / (t - z)) / y elif t <= 2.1e+16: tmp = -x / (z * (y - z)) else: tmp = (x / t) / (y - z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -2.2e-122) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (t <= 2.1e+16) tmp = Float64(Float64(-x) / Float64(z * Float64(y - z))); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -2.2e-122)
tmp = (x / (t - z)) / y;
elseif (t <= 2.1e+16)
tmp = -x / (z * (y - z));
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -2.2e-122], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 2.1e+16], N[((-x) / N[(z * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.2 \cdot 10^{-122}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+16}:\\
\;\;\;\;\frac{-x}{z \cdot \left(y - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -2.2e-122Initial program 87.8%
Taylor expanded in y around inf 46.6%
*-commutative46.6%
associate-/r*55.6%
Simplified55.6%
if -2.2e-122 < t < 2.1e16Initial program 86.5%
add-cube-cbrt85.5%
*-commutative85.5%
times-frac95.1%
pow295.1%
Applied egg-rr95.1%
frac-times85.5%
unpow285.5%
add-cube-cbrt86.5%
associate-/r*94.3%
clear-num94.2%
associate-/l/94.2%
associate-/r*94.1%
Applied egg-rr94.1%
clear-num94.0%
associate-/r/94.0%
Applied egg-rr94.0%
Taylor expanded in t around 0 68.3%
mul-1-neg68.3%
Simplified68.3%
if 2.1e16 < t Initial program 86.6%
add-cube-cbrt85.7%
*-commutative85.7%
times-frac98.7%
pow298.7%
Applied egg-rr98.7%
frac-times85.7%
unpow285.7%
add-cube-cbrt86.6%
associate-/r*99.7%
clear-num99.6%
associate-/l/99.7%
associate-/r*99.7%
Applied egg-rr99.7%
Taylor expanded in t around inf 83.3%
associate-/r*88.1%
Simplified88.1%
Final simplification67.9%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t -1.95e-122) (/ (/ x (- t z)) y) (if (<= t 2.35e+16) (/ (/ (- x) z) (- y z)) (/ (/ x t) (- y z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.95e-122) {
tmp = (x / (t - z)) / y;
} else if (t <= 2.35e+16) {
tmp = (-x / z) / (y - z);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: y 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.95d-122)) then
tmp = (x / (t - z)) / y
else if (t <= 2.35d+16) then
tmp = (-x / z) / (y - z)
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.95e-122) {
tmp = (x / (t - z)) / y;
} else if (t <= 2.35e+16) {
tmp = (-x / z) / (y - z);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if t <= -1.95e-122: tmp = (x / (t - z)) / y elif t <= 2.35e+16: tmp = (-x / z) / (y - z) else: tmp = (x / t) / (y - z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -1.95e-122) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (t <= 2.35e+16) tmp = Float64(Float64(Float64(-x) / z) / Float64(y - z)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -1.95e-122)
tmp = (x / (t - z)) / y;
elseif (t <= 2.35e+16)
tmp = (-x / z) / (y - z);
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -1.95e-122], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 2.35e+16], N[(N[((-x) / z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.95 \cdot 10^{-122}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;t \leq 2.35 \cdot 10^{+16}:\\
\;\;\;\;\frac{\frac{-x}{z}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -1.94999999999999995e-122Initial program 87.8%
Taylor expanded in y around inf 46.6%
*-commutative46.6%
associate-/r*55.6%
Simplified55.6%
if -1.94999999999999995e-122 < t < 2.35e16Initial program 86.5%
add-cube-cbrt85.5%
*-commutative85.5%
times-frac95.1%
pow295.1%
Applied egg-rr95.1%
frac-times85.5%
unpow285.5%
add-cube-cbrt86.5%
associate-/r*94.3%
clear-num94.2%
associate-/l/94.2%
associate-/r*94.1%
Applied egg-rr94.1%
Taylor expanded in t around 0 68.3%
associate-/r*74.8%
associate-*r/74.8%
neg-mul-174.8%
distribute-neg-frac74.8%
Simplified74.8%
if 2.35e16 < t Initial program 86.6%
add-cube-cbrt85.7%
*-commutative85.7%
times-frac98.7%
pow298.7%
Applied egg-rr98.7%
frac-times85.7%
unpow285.7%
add-cube-cbrt86.6%
associate-/r*99.7%
clear-num99.6%
associate-/l/99.7%
associate-/r*99.7%
Applied egg-rr99.7%
Taylor expanded in t around inf 83.3%
associate-/r*88.1%
Simplified88.1%
Final simplification70.6%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -2e-113) (not (<= z 8e-23))) (/ (- x) (* y z)) (/ (/ x t) y)))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2e-113) || !(z <= 8e-23)) {
tmp = -x / (y * z);
} else {
tmp = (x / t) / y;
}
return tmp;
}
NOTE: y 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 <= (-2d-113)) .or. (.not. (z <= 8d-23))) then
tmp = -x / (y * z)
else
tmp = (x / t) / y
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2e-113) || !(z <= 8e-23)) {
tmp = -x / (y * z);
} else {
tmp = (x / t) / y;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -2e-113) or not (z <= 8e-23): tmp = -x / (y * z) else: tmp = (x / t) / y return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -2e-113) || !(z <= 8e-23)) tmp = Float64(Float64(-x) / Float64(y * z)); else tmp = Float64(Float64(x / t) / y); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -2e-113) || ~((z <= 8e-23)))
tmp = -x / (y * z);
else
tmp = (x / t) / y;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -2e-113], N[Not[LessEqual[z, 8e-23]], $MachinePrecision]], N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{-113} \lor \neg \left(z \leq 8 \cdot 10^{-23}\right):\\
\;\;\;\;\frac{-x}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -1.99999999999999996e-113 or 7.99999999999999968e-23 < z Initial program 84.1%
Taylor expanded in y around inf 34.8%
*-commutative34.8%
associate-/r*42.4%
Simplified42.4%
Taylor expanded in t around 0 30.3%
associate-*r/30.3%
neg-mul-130.3%
*-commutative30.3%
Simplified30.3%
if -1.99999999999999996e-113 < z < 7.99999999999999968e-23Initial program 91.9%
Taylor expanded in y around inf 73.5%
*-commutative73.5%
associate-/r*78.1%
Simplified78.1%
Taylor expanded in t around inf 67.0%
Final simplification44.0%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -2.7e-104) (/ (/ x y) t) (if (<= y 2.35e-194) (/ (- x) (* z t)) (/ (/ x t) y))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.7e-104) {
tmp = (x / y) / t;
} else if (y <= 2.35e-194) {
tmp = -x / (z * t);
} else {
tmp = (x / t) / y;
}
return tmp;
}
NOTE: y 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 <= (-2.7d-104)) then
tmp = (x / y) / t
else if (y <= 2.35d-194) then
tmp = -x / (z * t)
else
tmp = (x / t) / y
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.7e-104) {
tmp = (x / y) / t;
} else if (y <= 2.35e-194) {
tmp = -x / (z * t);
} else {
tmp = (x / t) / y;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if y <= -2.7e-104: tmp = (x / y) / t elif y <= 2.35e-194: tmp = -x / (z * t) else: tmp = (x / t) / y return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -2.7e-104) tmp = Float64(Float64(x / y) / t); elseif (y <= 2.35e-194) tmp = Float64(Float64(-x) / Float64(z * t)); else tmp = Float64(Float64(x / t) / y); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -2.7e-104)
tmp = (x / y) / t;
elseif (y <= 2.35e-194)
tmp = -x / (z * t);
else
tmp = (x / t) / y;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -2.7e-104], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, 2.35e-194], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{-104}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;y \leq 2.35 \cdot 10^{-194}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if y < -2.6999999999999998e-104Initial program 88.8%
Taylor expanded in z around 0 47.9%
associate-/r*49.2%
div-inv49.2%
Applied egg-rr49.2%
associate-*l/48.2%
un-div-inv48.2%
Applied egg-rr48.2%
if -2.6999999999999998e-104 < y < 2.3500000000000001e-194Initial program 90.7%
add-cube-cbrt89.8%
*-commutative89.8%
times-frac98.4%
pow298.4%
Applied egg-rr98.4%
frac-times89.8%
unpow289.8%
add-cube-cbrt90.7%
associate-/r*98.5%
clear-num98.4%
associate-/l/97.6%
associate-/r*98.4%
Applied egg-rr98.4%
Taylor expanded in t around inf 60.2%
associate-/r*63.4%
Simplified63.4%
Taylor expanded in y around 0 51.6%
associate-*r/51.6%
neg-mul-151.6%
*-commutative51.6%
Simplified51.6%
if 2.3500000000000001e-194 < y Initial program 82.5%
Taylor expanded in y around inf 52.3%
*-commutative52.3%
associate-/r*54.9%
Simplified54.9%
Taylor expanded in t around inf 36.8%
Final simplification44.9%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -6.1e-43) (not (<= z 80.0))) (/ x (* y z)) (/ x (* y t))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -6.1e-43) || !(z <= 80.0)) {
tmp = x / (y * z);
} else {
tmp = x / (y * t);
}
return tmp;
}
NOTE: y 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.1d-43)) .or. (.not. (z <= 80.0d0))) then
tmp = x / (y * z)
else
tmp = x / (y * t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -6.1e-43) || !(z <= 80.0)) {
tmp = x / (y * z);
} else {
tmp = x / (y * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -6.1e-43) or not (z <= 80.0): tmp = x / (y * z) else: tmp = x / (y * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -6.1e-43) || !(z <= 80.0)) tmp = Float64(x / Float64(y * z)); else tmp = Float64(x / Float64(y * t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -6.1e-43) || ~((z <= 80.0)))
tmp = x / (y * z);
else
tmp = x / (y * t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -6.1e-43], N[Not[LessEqual[z, 80.0]], $MachinePrecision]], N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.1 \cdot 10^{-43} \lor \neg \left(z \leq 80\right):\\
\;\;\;\;\frac{x}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -6.10000000000000037e-43 or 80 < z Initial program 82.4%
Taylor expanded in y around inf 32.6%
*-commutative32.6%
associate-/r*41.9%
Simplified41.9%
Taylor expanded in t around 0 31.0%
associate-*r/31.0%
neg-mul-131.0%
*-commutative31.0%
Simplified31.0%
expm1-log1p-u29.8%
expm1-udef44.5%
add-sqr-sqrt18.0%
sqrt-unprod41.5%
sqr-neg41.5%
sqrt-unprod26.3%
add-sqr-sqrt43.0%
*-commutative43.0%
associate-/r*43.0%
Applied egg-rr43.0%
expm1-def21.2%
expm1-log1p21.7%
associate-/l/24.5%
Simplified24.5%
if -6.10000000000000037e-43 < z < 80Initial program 92.5%
Taylor expanded in z around 0 56.5%
Final simplification39.2%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -9.6e+121) (not (<= z 2.7e+29))) (/ x (* y z)) (/ (/ x t) y)))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -9.6e+121) || !(z <= 2.7e+29)) {
tmp = x / (y * z);
} else {
tmp = (x / t) / y;
}
return tmp;
}
NOTE: y 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 <= (-9.6d+121)) .or. (.not. (z <= 2.7d+29))) then
tmp = x / (y * z)
else
tmp = (x / t) / y
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -9.6e+121) || !(z <= 2.7e+29)) {
tmp = x / (y * z);
} else {
tmp = (x / t) / y;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -9.6e+121) or not (z <= 2.7e+29): tmp = x / (y * z) else: tmp = (x / t) / y return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -9.6e+121) || !(z <= 2.7e+29)) tmp = Float64(x / Float64(y * z)); else tmp = Float64(Float64(x / t) / y); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -9.6e+121) || ~((z <= 2.7e+29)))
tmp = x / (y * z);
else
tmp = (x / t) / y;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -9.6e+121], N[Not[LessEqual[z, 2.7e+29]], $MachinePrecision]], N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.6 \cdot 10^{+121} \lor \neg \left(z \leq 2.7 \cdot 10^{+29}\right):\\
\;\;\;\;\frac{x}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -9.600000000000001e121 or 2.7e29 < z Initial program 78.9%
Taylor expanded in y around inf 30.8%
*-commutative30.8%
associate-/r*38.3%
Simplified38.3%
Taylor expanded in t around 0 29.6%
associate-*r/29.6%
neg-mul-129.6%
*-commutative29.6%
Simplified29.6%
expm1-log1p-u29.4%
expm1-udef51.7%
add-sqr-sqrt18.6%
sqrt-unprod48.4%
sqr-neg48.4%
sqrt-unprod32.7%
add-sqr-sqrt51.4%
*-commutative51.4%
associate-/r*51.3%
Applied egg-rr51.3%
expm1-def24.9%
expm1-log1p25.3%
associate-/l/29.4%
Simplified29.4%
if -9.600000000000001e121 < z < 2.7e29Initial program 92.0%
Taylor expanded in y around inf 60.8%
*-commutative60.8%
associate-/r*66.5%
Simplified66.5%
Taylor expanded in t around inf 51.3%
Final simplification42.9%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -2.15e-104) (/ x (* y (- t z))) (/ x (* (- y z) t))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.15e-104) {
tmp = x / (y * (t - z));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
NOTE: y 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 <= (-2.15d-104)) then
tmp = x / (y * (t - z))
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.15e-104) {
tmp = x / (y * (t - z));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if y <= -2.15e-104: tmp = x / (y * (t - z)) else: tmp = x / ((y - z) * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -2.15e-104) tmp = Float64(x / Float64(y * Float64(t - z))); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -2.15e-104)
tmp = x / (y * (t - z));
else
tmp = x / ((y - z) * t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -2.15e-104], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{-104}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if y < -2.15000000000000005e-104Initial program 88.9%
Taylor expanded in y around inf 74.8%
*-commutative74.8%
Simplified74.8%
if -2.15000000000000005e-104 < y Initial program 86.1%
Taylor expanded in t around inf 53.3%
Final simplification60.1%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -2.15e-104) (/ x (* y (- t z))) (/ (/ x t) (- y z))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.15e-104) {
tmp = x / (y * (t - z));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: y 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 <= (-2.15d-104)) then
tmp = x / (y * (t - z))
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.15e-104) {
tmp = x / (y * (t - z));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if y <= -2.15e-104: tmp = x / (y * (t - z)) else: tmp = (x / t) / (y - z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -2.15e-104) tmp = Float64(x / Float64(y * Float64(t - z))); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -2.15e-104)
tmp = x / (y * (t - z));
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -2.15e-104], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{-104}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -2.15000000000000005e-104Initial program 88.9%
Taylor expanded in y around inf 74.8%
*-commutative74.8%
Simplified74.8%
if -2.15000000000000005e-104 < y Initial program 86.1%
add-cube-cbrt85.3%
*-commutative85.3%
times-frac97.6%
pow297.6%
Applied egg-rr97.6%
frac-times85.3%
unpow285.3%
add-cube-cbrt86.1%
associate-/r*97.0%
clear-num96.9%
associate-/l/96.0%
associate-/r*97.0%
Applied egg-rr97.0%
Taylor expanded in t around inf 53.3%
associate-/r*57.9%
Simplified57.9%
Final simplification63.3%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t 5.7e-36) (/ (/ x (- t z)) y) (/ (/ x t) (- y z))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 5.7e-36) {
tmp = (x / (t - z)) / y;
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: y 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 <= 5.7d-36) then
tmp = (x / (t - z)) / y
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 5.7e-36) {
tmp = (x / (t - z)) / y;
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if t <= 5.7e-36: tmp = (x / (t - z)) / y else: tmp = (x / t) / (y - z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (t <= 5.7e-36) tmp = Float64(Float64(x / Float64(t - z)) / y); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= 5.7e-36)
tmp = (x / (t - z)) / y;
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, 5.7e-36], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 5.7 \cdot 10^{-36}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 5.6999999999999999e-36Initial program 87.3%
Taylor expanded in y around inf 51.0%
*-commutative51.0%
associate-/r*56.5%
Simplified56.5%
if 5.6999999999999999e-36 < t Initial program 86.2%
add-cube-cbrt85.3%
*-commutative85.3%
times-frac98.7%
pow298.7%
Applied egg-rr98.7%
frac-times85.3%
unpow285.3%
add-cube-cbrt86.2%
associate-/r*99.7%
clear-num99.6%
associate-/l/99.7%
associate-/r*99.7%
Applied egg-rr99.7%
Taylor expanded in t around inf 78.7%
associate-/r*81.2%
Simplified81.2%
Final simplification63.0%
NOTE: y 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(y < t);
double code(double x, double y, double z, double t) {
return (x / (t - z)) / (y - z);
}
NOTE: y 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 y < t;
public static double code(double x, double y, double z, double t) {
return (x / (t - z)) / (y - z);
}
[y, t] = sort([y, t]) def code(x, y, z, t): return (x / (t - z)) / (y - z)
y, t = sort([y, t]) function code(x, y, z, t) return Float64(Float64(x / Float64(t - z)) / Float64(y - z)) end
y, t = num2cell(sort([y, t])){:}
function tmp = code(x, y, z, t)
tmp = (x / (t - z)) / (y - z);
end
NOTE: y 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}
[y, t] = \mathsf{sort}([y, t])\\
\\
\frac{\frac{x}{t - z}}{y - z}
\end{array}
Initial program 87.0%
add-cube-cbrt86.2%
*-commutative86.2%
times-frac97.2%
pow297.2%
Applied egg-rr97.2%
Taylor expanded in x around 0 87.0%
associate-/r*96.8%
Simplified96.8%
Final simplification96.8%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (/ x (* y t)))
assert(y < t);
double code(double x, double y, double z, double t) {
return x / (y * t);
}
NOTE: y 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 y < t;
public static double code(double x, double y, double z, double t) {
return x / (y * t);
}
[y, t] = sort([y, t]) def code(x, y, z, t): return x / (y * t)
y, t = sort([y, t]) function code(x, y, z, t) return Float64(x / Float64(y * t)) end
y, t = num2cell(sort([y, t])){:}
function tmp = code(x, y, z, t)
tmp = x / (y * t);
end
NOTE: y 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}
[y, t] = \mathsf{sort}([y, t])\\
\\
\frac{x}{y \cdot t}
\end{array}
Initial program 87.0%
Taylor expanded in z around 0 33.4%
Final simplification33.4%
(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 2023320
(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))))