
(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 20 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
(let* ((t_1 (* (- y z) (- t z))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 5e+167)))
(/ (/ x (- t z)) (- y z))
(/ x t_1))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 5e+167)) {
tmp = (x / (t - z)) / (y - z);
} else {
tmp = x / t_1;
}
return tmp;
}
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 5e+167)) {
tmp = (x / (t - z)) / (y - z);
} else {
tmp = x / t_1;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (y - z) * (t - z) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 5e+167): tmp = (x / (t - z)) / (y - z) else: tmp = x / t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(y - z) * Float64(t - z)) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 5e+167)) tmp = Float64(Float64(x / Float64(t - z)) / Float64(y - z)); else tmp = Float64(x / t_1); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (y - z) * (t - z);
tmp = 0.0;
if ((t_1 <= -Inf) || ~((t_1 <= 5e+167)))
tmp = (x / (t - z)) / (y - z);
else
tmp = x / 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[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 5e+167]], $MachinePrecision]], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], N[(x / t$95$1), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
\mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 5 \cdot 10^{+167}\right):\\
\;\;\;\;\frac{\frac{x}{t - z}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t_1}\\
\end{array}
\end{array}
if (*.f64 (-.f64 y z) (-.f64 t z)) < -inf.0 or 4.9999999999999997e167 < (*.f64 (-.f64 y z) (-.f64 t z)) Initial program 80.1%
associate-/l/99.1%
Simplified99.1%
if -inf.0 < (*.f64 (-.f64 y z) (-.f64 t z)) < 4.9999999999999997e167Initial program 98.2%
Final simplification98.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 (* (- y z) (- t z))) (t_2 (/ x (- t z))))
(if (<= t_1 (- INFINITY))
(* t_2 (/ 1.0 y))
(if (<= t_1 1e+297) (/ x t_1) (* t_2 (/ -1.0 z))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double t_2 = x / (t - z);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_2 * (1.0 / y);
} else if (t_1 <= 1e+297) {
tmp = x / t_1;
} else {
tmp = t_2 * (-1.0 / z);
}
return tmp;
}
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double t_2 = x / (t - z);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = t_2 * (1.0 / y);
} else if (t_1 <= 1e+297) {
tmp = x / t_1;
} else {
tmp = t_2 * (-1.0 / z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (y - z) * (t - z) t_2 = x / (t - z) tmp = 0 if t_1 <= -math.inf: tmp = t_2 * (1.0 / y) elif t_1 <= 1e+297: tmp = x / t_1 else: tmp = t_2 * (-1.0 / z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(y - z) * Float64(t - z)) t_2 = Float64(x / Float64(t - z)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(t_2 * Float64(1.0 / y)); elseif (t_1 <= 1e+297) tmp = Float64(x / t_1); else tmp = Float64(t_2 * Float64(-1.0 / z)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (y - z) * (t - z);
t_2 = x / (t - z);
tmp = 0.0;
if (t_1 <= -Inf)
tmp = t_2 * (1.0 / y);
elseif (t_1 <= 1e+297)
tmp = x / t_1;
else
tmp = t_2 * (-1.0 / 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_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(t$95$2 * N[(1.0 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+297], N[(x / t$95$1), $MachinePrecision], N[(t$95$2 * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
t_2 := \frac{x}{t - z}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;t_2 \cdot \frac{1}{y}\\
\mathbf{elif}\;t_1 \leq 10^{+297}:\\
\;\;\;\;\frac{x}{t_1}\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot \frac{-1}{z}\\
\end{array}
\end{array}
if (*.f64 (-.f64 y z) (-.f64 t z)) < -inf.0Initial program 75.2%
associate-/l/99.8%
div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 90.2%
if -inf.0 < (*.f64 (-.f64 y z) (-.f64 t z)) < 1e297Initial program 98.5%
if 1e297 < (*.f64 (-.f64 y z) (-.f64 t z)) Initial program 71.1%
associate-/l/99.9%
div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 81.3%
Final simplification93.3%
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)) (t_2 (/ (/ x z) z)))
(if (<= z -1.55e+40)
t_2
(if (<= z -9.5e-38)
(/ (/ (- x) y) z)
(if (<= z 2.5e-99)
t_1
(if (<= z 2.8e-62)
(/ (- x) (* z t))
(if (<= z 2.45e-55)
(/ x (* z z))
(if (<= z 1.16e-38)
(/ (- x) (* y z))
(if (<= z 7.8e+50) t_1 t_2)))))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / t) / y;
double t_2 = (x / z) / z;
double tmp;
if (z <= -1.55e+40) {
tmp = t_2;
} else if (z <= -9.5e-38) {
tmp = (-x / y) / z;
} else if (z <= 2.5e-99) {
tmp = t_1;
} else if (z <= 2.8e-62) {
tmp = -x / (z * t);
} else if (z <= 2.45e-55) {
tmp = x / (z * z);
} else if (z <= 1.16e-38) {
tmp = -x / (y * z);
} else if (z <= 7.8e+50) {
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 / t) / y
t_2 = (x / z) / z
if (z <= (-1.55d+40)) then
tmp = t_2
else if (z <= (-9.5d-38)) then
tmp = (-x / y) / z
else if (z <= 2.5d-99) then
tmp = t_1
else if (z <= 2.8d-62) then
tmp = -x / (z * t)
else if (z <= 2.45d-55) then
tmp = x / (z * z)
else if (z <= 1.16d-38) then
tmp = -x / (y * z)
else if (z <= 7.8d+50) 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 / t) / y;
double t_2 = (x / z) / z;
double tmp;
if (z <= -1.55e+40) {
tmp = t_2;
} else if (z <= -9.5e-38) {
tmp = (-x / y) / z;
} else if (z <= 2.5e-99) {
tmp = t_1;
} else if (z <= 2.8e-62) {
tmp = -x / (z * t);
} else if (z <= 2.45e-55) {
tmp = x / (z * z);
} else if (z <= 1.16e-38) {
tmp = -x / (y * z);
} else if (z <= 7.8e+50) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (x / t) / y t_2 = (x / z) / z tmp = 0 if z <= -1.55e+40: tmp = t_2 elif z <= -9.5e-38: tmp = (-x / y) / z elif z <= 2.5e-99: tmp = t_1 elif z <= 2.8e-62: tmp = -x / (z * t) elif z <= 2.45e-55: tmp = x / (z * z) elif z <= 1.16e-38: tmp = -x / (y * z) elif z <= 7.8e+50: tmp = t_1 else: tmp = t_2 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / t) / y) t_2 = Float64(Float64(x / z) / z) tmp = 0.0 if (z <= -1.55e+40) tmp = t_2; elseif (z <= -9.5e-38) tmp = Float64(Float64(Float64(-x) / y) / z); elseif (z <= 2.5e-99) tmp = t_1; elseif (z <= 2.8e-62) tmp = Float64(Float64(-x) / Float64(z * t)); elseif (z <= 2.45e-55) tmp = Float64(x / Float64(z * z)); elseif (z <= 1.16e-38) tmp = Float64(Float64(-x) / Float64(y * z)); elseif (z <= 7.8e+50) 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 / t) / y;
t_2 = (x / z) / z;
tmp = 0.0;
if (z <= -1.55e+40)
tmp = t_2;
elseif (z <= -9.5e-38)
tmp = (-x / y) / z;
elseif (z <= 2.5e-99)
tmp = t_1;
elseif (z <= 2.8e-62)
tmp = -x / (z * t);
elseif (z <= 2.45e-55)
tmp = x / (z * z);
elseif (z <= 1.16e-38)
tmp = -x / (y * z);
elseif (z <= 7.8e+50)
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[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -1.55e+40], t$95$2, If[LessEqual[z, -9.5e-38], N[(N[((-x) / y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 2.5e-99], t$95$1, If[LessEqual[z, 2.8e-62], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.45e-55], N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.16e-38], N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.8e+50], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{t}}{y}\\
t_2 := \frac{\frac{x}{z}}{z}\\
\mathbf{if}\;z \leq -1.55 \cdot 10^{+40}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -9.5 \cdot 10^{-38}:\\
\;\;\;\;\frac{\frac{-x}{y}}{z}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-99}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-62}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-55}:\\
\;\;\;\;\frac{x}{z \cdot z}\\
\mathbf{elif}\;z \leq 1.16 \cdot 10^{-38}:\\
\;\;\;\;\frac{-x}{y \cdot z}\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{+50}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -1.5499999999999999e40 or 7.79999999999999935e50 < z Initial program 80.9%
Taylor expanded in z around inf 68.8%
unpow268.8%
associate-/r*74.9%
Simplified74.9%
if -1.5499999999999999e40 < z < -9.5000000000000009e-38Initial program 94.8%
associate-/r*94.7%
Simplified94.7%
Taylor expanded in y around inf 59.1%
clear-num59.1%
inv-pow59.1%
div-inv59.1%
clear-num59.0%
Applied egg-rr59.0%
unpow-159.0%
Simplified59.0%
Taylor expanded in t around 0 42.9%
associate-*r/42.9%
associate-/r*44.2%
neg-mul-144.2%
Simplified44.2%
if -9.5000000000000009e-38 < z < 2.49999999999999985e-99 or 1.15999999999999995e-38 < z < 7.79999999999999935e50Initial program 94.2%
Taylor expanded in z around 0 63.7%
*-un-lft-identity63.7%
times-frac64.4%
Applied egg-rr64.4%
associate-*l/64.5%
*-lft-identity64.5%
Simplified64.5%
if 2.49999999999999985e-99 < z < 2.80000000000000002e-62Initial program 99.6%
Taylor expanded in t around inf 31.2%
Taylor expanded in y around 0 30.0%
associate-*r/30.0%
neg-mul-130.0%
*-commutative30.0%
Simplified30.0%
if 2.80000000000000002e-62 < z < 2.45000000000000018e-55Initial program 75.9%
Taylor expanded in z around inf 75.2%
unpow275.2%
Simplified75.2%
if 2.45000000000000018e-55 < z < 1.15999999999999995e-38Initial program 99.8%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in y around inf 31.4%
Taylor expanded in t around 0 17.7%
associate-*r/17.7%
neg-mul-117.7%
*-commutative17.7%
Simplified17.7%
Final simplification65.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 (* (- y z) (- t z))))) (if (<= t_1 -5e-245) t_1 (/ (/ x (- y z)) (- t z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * (t - z));
double tmp;
if (t_1 <= -5e-245) {
tmp = t_1;
} else {
tmp = (x / (y - z)) / (t - 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) :: t_1
real(8) :: tmp
t_1 = x / ((y - z) * (t - z))
if (t_1 <= (-5d-245)) then
tmp = t_1
else
tmp = (x / (y - z)) / (t - z)
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 tmp;
if (t_1 <= -5e-245) {
tmp = t_1;
} else {
tmp = (x / (y - z)) / (t - z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = x / ((y - z) * (t - z)) tmp = 0 if t_1 <= -5e-245: tmp = t_1 else: tmp = (x / (y - z)) / (t - z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(Float64(y - z) * Float64(t - z))) tmp = 0.0 if (t_1 <= -5e-245) tmp = t_1; else tmp = Float64(Float64(x / Float64(y - z)) / Float64(t - z)); 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));
tmp = 0.0;
if (t_1 <= -5e-245)
tmp = t_1;
else
tmp = (x / (y - z)) / (t - 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_] := Block[{t$95$1 = N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-245], t$95$1, N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]]]
\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)}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{-245}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\
\end{array}
\end{array}
if (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) < -4.9999999999999997e-245Initial program 98.3%
if -4.9999999999999997e-245 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) Initial program 85.6%
associate-/r*96.2%
Simplified96.2%
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 (/ (/ x z) z)) (t_2 (/ (- x) (* y z))))
(if (<= z -1e+34)
t_1
(if (<= z -4e-39)
t_2
(if (<= z 1.06e-97)
(/ (/ x t) y)
(if (<= z 2e-63)
(/ (- x) (* z t))
(if (<= z 2.45e-55) (/ x (* z z)) (if (<= z 7.5e-25) t_2 t_1))))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double t_2 = -x / (y * z);
double tmp;
if (z <= -1e+34) {
tmp = t_1;
} else if (z <= -4e-39) {
tmp = t_2;
} else if (z <= 1.06e-97) {
tmp = (x / t) / y;
} else if (z <= 2e-63) {
tmp = -x / (z * t);
} else if (z <= 2.45e-55) {
tmp = x / (z * z);
} else if (z <= 7.5e-25) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = (x / z) / z
t_2 = -x / (y * z)
if (z <= (-1d+34)) then
tmp = t_1
else if (z <= (-4d-39)) then
tmp = t_2
else if (z <= 1.06d-97) then
tmp = (x / t) / y
else if (z <= 2d-63) then
tmp = -x / (z * t)
else if (z <= 2.45d-55) then
tmp = x / (z * z)
else if (z <= 7.5d-25) then
tmp = t_2
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 / z) / z;
double t_2 = -x / (y * z);
double tmp;
if (z <= -1e+34) {
tmp = t_1;
} else if (z <= -4e-39) {
tmp = t_2;
} else if (z <= 1.06e-97) {
tmp = (x / t) / y;
} else if (z <= 2e-63) {
tmp = -x / (z * t);
} else if (z <= 2.45e-55) {
tmp = x / (z * z);
} else if (z <= 7.5e-25) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (x / z) / z t_2 = -x / (y * z) tmp = 0 if z <= -1e+34: tmp = t_1 elif z <= -4e-39: tmp = t_2 elif z <= 1.06e-97: tmp = (x / t) / y elif z <= 2e-63: tmp = -x / (z * t) elif z <= 2.45e-55: tmp = x / (z * z) elif z <= 7.5e-25: tmp = t_2 else: tmp = t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / z) t_2 = Float64(Float64(-x) / Float64(y * z)) tmp = 0.0 if (z <= -1e+34) tmp = t_1; elseif (z <= -4e-39) tmp = t_2; elseif (z <= 1.06e-97) tmp = Float64(Float64(x / t) / y); elseif (z <= 2e-63) tmp = Float64(Float64(-x) / Float64(z * t)); elseif (z <= 2.45e-55) tmp = Float64(x / Float64(z * z)); elseif (z <= 7.5e-25) tmp = t_2; 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 / z) / z;
t_2 = -x / (y * z);
tmp = 0.0;
if (z <= -1e+34)
tmp = t_1;
elseif (z <= -4e-39)
tmp = t_2;
elseif (z <= 1.06e-97)
tmp = (x / t) / y;
elseif (z <= 2e-63)
tmp = -x / (z * t);
elseif (z <= 2.45e-55)
tmp = x / (z * z);
elseif (z <= 7.5e-25)
tmp = t_2;
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 / z), $MachinePrecision] / z), $MachinePrecision]}, Block[{t$95$2 = N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e+34], t$95$1, If[LessEqual[z, -4e-39], t$95$2, If[LessEqual[z, 1.06e-97], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 2e-63], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.45e-55], N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e-25], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
t_2 := \frac{-x}{y \cdot z}\\
\mathbf{if}\;z \leq -1 \cdot 10^{+34}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-39}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.06 \cdot 10^{-97}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-63}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-55}:\\
\;\;\;\;\frac{x}{z \cdot z}\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-25}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -9.99999999999999946e33 or 7.49999999999999989e-25 < z Initial program 81.7%
Taylor expanded in z around inf 62.9%
unpow262.9%
associate-/r*68.2%
Simplified68.2%
if -9.99999999999999946e33 < z < -3.99999999999999972e-39 or 2.45000000000000018e-55 < z < 7.49999999999999989e-25Initial program 96.2%
associate-/r*96.1%
Simplified96.1%
Taylor expanded in y around inf 51.7%
Taylor expanded in t around 0 36.1%
associate-*r/36.1%
neg-mul-136.1%
*-commutative36.1%
Simplified36.1%
if -3.99999999999999972e-39 < z < 1.06000000000000006e-97Initial program 95.2%
Taylor expanded in z around 0 68.7%
*-un-lft-identity68.7%
times-frac66.8%
Applied egg-rr66.8%
associate-*l/66.9%
*-lft-identity66.9%
Simplified66.9%
if 1.06000000000000006e-97 < z < 2.00000000000000013e-63Initial program 99.6%
Taylor expanded in t around inf 31.2%
Taylor expanded in y around 0 30.0%
associate-*r/30.0%
neg-mul-130.0%
*-commutative30.0%
Simplified30.0%
if 2.00000000000000013e-63 < z < 2.45000000000000018e-55Initial program 75.9%
Taylor expanded in z around inf 75.2%
unpow275.2%
Simplified75.2%
Final simplification63.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 z) z)))
(if (<= t -1.25e-133)
(/ (/ x y) t)
(if (<= t -3.3e-233)
t_1
(if (<= t 2.7e-243)
(/ (- x) (* y z))
(if (<= t 3e+56)
t_1
(if (<= t 8e+205) (/ (/ x t) y) (* (/ -1.0 z) (/ x t)))))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double tmp;
if (t <= -1.25e-133) {
tmp = (x / y) / t;
} else if (t <= -3.3e-233) {
tmp = t_1;
} else if (t <= 2.7e-243) {
tmp = -x / (y * z);
} else if (t <= 3e+56) {
tmp = t_1;
} else if (t <= 8e+205) {
tmp = (x / t) / y;
} else {
tmp = (-1.0 / z) * (x / 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 / z) / z
if (t <= (-1.25d-133)) then
tmp = (x / y) / t
else if (t <= (-3.3d-233)) then
tmp = t_1
else if (t <= 2.7d-243) then
tmp = -x / (y * z)
else if (t <= 3d+56) then
tmp = t_1
else if (t <= 8d+205) then
tmp = (x / t) / y
else
tmp = ((-1.0d0) / z) * (x / 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 / z) / z;
double tmp;
if (t <= -1.25e-133) {
tmp = (x / y) / t;
} else if (t <= -3.3e-233) {
tmp = t_1;
} else if (t <= 2.7e-243) {
tmp = -x / (y * z);
} else if (t <= 3e+56) {
tmp = t_1;
} else if (t <= 8e+205) {
tmp = (x / t) / y;
} else {
tmp = (-1.0 / z) * (x / t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (x / z) / z tmp = 0 if t <= -1.25e-133: tmp = (x / y) / t elif t <= -3.3e-233: tmp = t_1 elif t <= 2.7e-243: tmp = -x / (y * z) elif t <= 3e+56: tmp = t_1 elif t <= 8e+205: tmp = (x / t) / y else: tmp = (-1.0 / z) * (x / t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / z) tmp = 0.0 if (t <= -1.25e-133) tmp = Float64(Float64(x / y) / t); elseif (t <= -3.3e-233) tmp = t_1; elseif (t <= 2.7e-243) tmp = Float64(Float64(-x) / Float64(y * z)); elseif (t <= 3e+56) tmp = t_1; elseif (t <= 8e+205) tmp = Float64(Float64(x / t) / y); else tmp = Float64(Float64(-1.0 / z) * Float64(x / t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / z) / z;
tmp = 0.0;
if (t <= -1.25e-133)
tmp = (x / y) / t;
elseif (t <= -3.3e-233)
tmp = t_1;
elseif (t <= 2.7e-243)
tmp = -x / (y * z);
elseif (t <= 3e+56)
tmp = t_1;
elseif (t <= 8e+205)
tmp = (x / t) / y;
else
tmp = (-1.0 / z) * (x / 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 / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[t, -1.25e-133], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, -3.3e-233], t$95$1, If[LessEqual[t, 2.7e-243], N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e+56], t$95$1, If[LessEqual[t, 8e+205], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], N[(N[(-1.0 / z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
\mathbf{if}\;t \leq -1.25 \cdot 10^{-133}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;t \leq -3.3 \cdot 10^{-233}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{-243}:\\
\;\;\;\;\frac{-x}{y \cdot z}\\
\mathbf{elif}\;t \leq 3 \cdot 10^{+56}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 8 \cdot 10^{+205}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{z} \cdot \frac{x}{t}\\
\end{array}
\end{array}
if t < -1.25e-133Initial program 88.1%
Taylor expanded in t around inf 71.4%
div-inv71.3%
associate-/r*71.4%
Applied egg-rr71.4%
*-commutative71.4%
associate-*l/76.3%
associate-*r/75.6%
associate-*l/75.8%
*-lft-identity75.8%
Simplified75.8%
Taylor expanded in y around inf 52.1%
if -1.25e-133 < t < -3.3e-233 or 2.7000000000000001e-243 < t < 3.00000000000000006e56Initial program 90.3%
Taylor expanded in z around inf 57.3%
unpow257.3%
associate-/r*63.0%
Simplified63.0%
if -3.3e-233 < t < 2.7000000000000001e-243Initial program 96.6%
associate-/r*88.7%
Simplified88.7%
Taylor expanded in y around inf 65.7%
Taylor expanded in t around 0 73.3%
associate-*r/73.3%
neg-mul-173.3%
*-commutative73.3%
Simplified73.3%
if 3.00000000000000006e56 < t < 8.00000000000000013e205Initial program 92.5%
Taylor expanded in z around 0 67.0%
*-un-lft-identity67.0%
times-frac70.4%
Applied egg-rr70.4%
associate-*l/70.4%
*-lft-identity70.4%
Simplified70.4%
if 8.00000000000000013e205 < t Initial program 70.6%
Taylor expanded in t around inf 70.6%
Taylor expanded in y around 0 46.4%
associate-*r/46.4%
neg-mul-146.4%
*-commutative46.4%
Simplified46.4%
neg-mul-146.4%
times-frac75.4%
Applied egg-rr75.4%
Final simplification60.9%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= t -7.2e-133)
(/ (/ x y) t)
(if (<= t -4.8e-233)
(/ (/ x z) z)
(if (<= t 2.9e-242)
(/ (- x) (* y z))
(if (<= t 6.2e+56)
(* (/ x z) (/ 1.0 z))
(if (<= t 4.8e+205) (/ (/ x t) y) (* (/ -1.0 z) (/ x t))))))))assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -7.2e-133) {
tmp = (x / y) / t;
} else if (t <= -4.8e-233) {
tmp = (x / z) / z;
} else if (t <= 2.9e-242) {
tmp = -x / (y * z);
} else if (t <= 6.2e+56) {
tmp = (x / z) * (1.0 / z);
} else if (t <= 4.8e+205) {
tmp = (x / t) / y;
} else {
tmp = (-1.0 / z) * (x / 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 (t <= (-7.2d-133)) then
tmp = (x / y) / t
else if (t <= (-4.8d-233)) then
tmp = (x / z) / z
else if (t <= 2.9d-242) then
tmp = -x / (y * z)
else if (t <= 6.2d+56) then
tmp = (x / z) * (1.0d0 / z)
else if (t <= 4.8d+205) then
tmp = (x / t) / y
else
tmp = ((-1.0d0) / z) * (x / 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 (t <= -7.2e-133) {
tmp = (x / y) / t;
} else if (t <= -4.8e-233) {
tmp = (x / z) / z;
} else if (t <= 2.9e-242) {
tmp = -x / (y * z);
} else if (t <= 6.2e+56) {
tmp = (x / z) * (1.0 / z);
} else if (t <= 4.8e+205) {
tmp = (x / t) / y;
} else {
tmp = (-1.0 / z) * (x / t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if t <= -7.2e-133: tmp = (x / y) / t elif t <= -4.8e-233: tmp = (x / z) / z elif t <= 2.9e-242: tmp = -x / (y * z) elif t <= 6.2e+56: tmp = (x / z) * (1.0 / z) elif t <= 4.8e+205: tmp = (x / t) / y else: tmp = (-1.0 / z) * (x / t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -7.2e-133) tmp = Float64(Float64(x / y) / t); elseif (t <= -4.8e-233) tmp = Float64(Float64(x / z) / z); elseif (t <= 2.9e-242) tmp = Float64(Float64(-x) / Float64(y * z)); elseif (t <= 6.2e+56) tmp = Float64(Float64(x / z) * Float64(1.0 / z)); elseif (t <= 4.8e+205) tmp = Float64(Float64(x / t) / y); else tmp = Float64(Float64(-1.0 / z) * Float64(x / t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -7.2e-133)
tmp = (x / y) / t;
elseif (t <= -4.8e-233)
tmp = (x / z) / z;
elseif (t <= 2.9e-242)
tmp = -x / (y * z);
elseif (t <= 6.2e+56)
tmp = (x / z) * (1.0 / z);
elseif (t <= 4.8e+205)
tmp = (x / t) / y;
else
tmp = (-1.0 / z) * (x / 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[t, -7.2e-133], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, -4.8e-233], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, 2.9e-242], N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.2e+56], N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.8e+205], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], N[(N[(-1.0 / z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.2 \cdot 10^{-133}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;t \leq -4.8 \cdot 10^{-233}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{-242}:\\
\;\;\;\;\frac{-x}{y \cdot z}\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{+56}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{+205}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{z} \cdot \frac{x}{t}\\
\end{array}
\end{array}
if t < -7.2000000000000008e-133Initial program 88.1%
Taylor expanded in t around inf 71.4%
div-inv71.3%
associate-/r*71.4%
Applied egg-rr71.4%
*-commutative71.4%
associate-*l/76.3%
associate-*r/75.6%
associate-*l/75.8%
*-lft-identity75.8%
Simplified75.8%
Taylor expanded in y around inf 52.1%
if -7.2000000000000008e-133 < t < -4.7999999999999998e-233Initial program 87.6%
Taylor expanded in z around inf 61.3%
unpow261.3%
associate-/r*70.0%
Simplified70.0%
if -4.7999999999999998e-233 < t < 2.9000000000000001e-242Initial program 96.6%
associate-/r*88.7%
Simplified88.7%
Taylor expanded in y around inf 65.7%
Taylor expanded in t around 0 73.3%
associate-*r/73.3%
neg-mul-173.3%
*-commutative73.3%
Simplified73.3%
if 2.9000000000000001e-242 < t < 6.20000000000000009e56Initial program 91.8%
Taylor expanded in z around inf 55.1%
unpow255.1%
Simplified55.1%
associate-/r*59.1%
div-inv59.2%
Applied egg-rr59.2%
if 6.20000000000000009e56 < t < 4.79999999999999972e205Initial program 92.5%
Taylor expanded in z around 0 67.0%
*-un-lft-identity67.0%
times-frac70.4%
Applied egg-rr70.4%
associate-*l/70.4%
*-lft-identity70.4%
Simplified70.4%
if 4.79999999999999972e205 < t Initial program 70.6%
Taylor expanded in t around inf 70.6%
Taylor expanded in y around 0 46.4%
associate-*r/46.4%
neg-mul-146.4%
*-commutative46.4%
Simplified46.4%
neg-mul-146.4%
times-frac75.4%
Applied egg-rr75.4%
Final simplification60.9%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= t -4.6e-132)
(/ (/ x y) t)
(if (<= t -3.8e-233)
(/ (/ x z) z)
(if (<= t 4.2e-244)
(/ (- x) (* y z))
(if (<= t 7.5e+57)
(/ 1.0 (/ z (/ x z)))
(if (<= t 7.2e+205) (/ (/ x t) y) (* (/ -1.0 z) (/ x t))))))))assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4.6e-132) {
tmp = (x / y) / t;
} else if (t <= -3.8e-233) {
tmp = (x / z) / z;
} else if (t <= 4.2e-244) {
tmp = -x / (y * z);
} else if (t <= 7.5e+57) {
tmp = 1.0 / (z / (x / z));
} else if (t <= 7.2e+205) {
tmp = (x / t) / y;
} else {
tmp = (-1.0 / z) * (x / 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 (t <= (-4.6d-132)) then
tmp = (x / y) / t
else if (t <= (-3.8d-233)) then
tmp = (x / z) / z
else if (t <= 4.2d-244) then
tmp = -x / (y * z)
else if (t <= 7.5d+57) then
tmp = 1.0d0 / (z / (x / z))
else if (t <= 7.2d+205) then
tmp = (x / t) / y
else
tmp = ((-1.0d0) / z) * (x / 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 (t <= -4.6e-132) {
tmp = (x / y) / t;
} else if (t <= -3.8e-233) {
tmp = (x / z) / z;
} else if (t <= 4.2e-244) {
tmp = -x / (y * z);
} else if (t <= 7.5e+57) {
tmp = 1.0 / (z / (x / z));
} else if (t <= 7.2e+205) {
tmp = (x / t) / y;
} else {
tmp = (-1.0 / z) * (x / t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if t <= -4.6e-132: tmp = (x / y) / t elif t <= -3.8e-233: tmp = (x / z) / z elif t <= 4.2e-244: tmp = -x / (y * z) elif t <= 7.5e+57: tmp = 1.0 / (z / (x / z)) elif t <= 7.2e+205: tmp = (x / t) / y else: tmp = (-1.0 / z) * (x / t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -4.6e-132) tmp = Float64(Float64(x / y) / t); elseif (t <= -3.8e-233) tmp = Float64(Float64(x / z) / z); elseif (t <= 4.2e-244) tmp = Float64(Float64(-x) / Float64(y * z)); elseif (t <= 7.5e+57) tmp = Float64(1.0 / Float64(z / Float64(x / z))); elseif (t <= 7.2e+205) tmp = Float64(Float64(x / t) / y); else tmp = Float64(Float64(-1.0 / z) * Float64(x / t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -4.6e-132)
tmp = (x / y) / t;
elseif (t <= -3.8e-233)
tmp = (x / z) / z;
elseif (t <= 4.2e-244)
tmp = -x / (y * z);
elseif (t <= 7.5e+57)
tmp = 1.0 / (z / (x / z));
elseif (t <= 7.2e+205)
tmp = (x / t) / y;
else
tmp = (-1.0 / z) * (x / 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[t, -4.6e-132], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, -3.8e-233], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, 4.2e-244], N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.5e+57], N[(1.0 / N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.2e+205], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], N[(N[(-1.0 / z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{-132}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{-233}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{-244}:\\
\;\;\;\;\frac{-x}{y \cdot z}\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{+57}:\\
\;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{+205}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{z} \cdot \frac{x}{t}\\
\end{array}
\end{array}
if t < -4.60000000000000006e-132Initial program 88.1%
Taylor expanded in t around inf 71.4%
div-inv71.3%
associate-/r*71.4%
Applied egg-rr71.4%
*-commutative71.4%
associate-*l/76.3%
associate-*r/75.6%
associate-*l/75.8%
*-lft-identity75.8%
Simplified75.8%
Taylor expanded in y around inf 52.1%
if -4.60000000000000006e-132 < t < -3.8e-233Initial program 87.6%
Taylor expanded in z around inf 61.3%
unpow261.3%
associate-/r*70.0%
Simplified70.0%
if -3.8e-233 < t < 4.20000000000000003e-244Initial program 96.6%
associate-/r*88.7%
Simplified88.7%
Taylor expanded in y around inf 65.7%
Taylor expanded in t around 0 73.3%
associate-*r/73.3%
neg-mul-173.3%
*-commutative73.3%
Simplified73.3%
if 4.20000000000000003e-244 < t < 7.5000000000000006e57Initial program 91.8%
Taylor expanded in z around inf 55.1%
unpow255.1%
Simplified55.1%
clear-num55.1%
inv-pow55.1%
Applied egg-rr55.1%
unpow-155.1%
associate-/l*59.1%
Simplified59.1%
if 7.5000000000000006e57 < t < 7.20000000000000003e205Initial program 92.5%
Taylor expanded in z around 0 67.0%
*-un-lft-identity67.0%
times-frac70.4%
Applied egg-rr70.4%
associate-*l/70.4%
*-lft-identity70.4%
Simplified70.4%
if 7.20000000000000003e205 < t Initial program 70.6%
Taylor expanded in t around inf 70.6%
Taylor expanded in y around 0 46.4%
associate-*r/46.4%
neg-mul-146.4%
*-commutative46.4%
Simplified46.4%
neg-mul-146.4%
times-frac75.4%
Applied egg-rr75.4%
Final simplification60.9%
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) z) (- t z))))
(if (<= y -4.5e-5)
(/ (/ x y) (- t z))
(if (<= y -1.4e-33)
t_1
(if (<= y -2.8e-58)
(/ x (* y (- t z)))
(if (<= y 4.2e-111) t_1 (/ (/ x t) (- y z))))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (-x / z) / (t - z);
double tmp;
if (y <= -4.5e-5) {
tmp = (x / y) / (t - z);
} else if (y <= -1.4e-33) {
tmp = t_1;
} else if (y <= -2.8e-58) {
tmp = x / (y * (t - z));
} else if (y <= 4.2e-111) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (-x / z) / (t - z)
if (y <= (-4.5d-5)) then
tmp = (x / y) / (t - z)
else if (y <= (-1.4d-33)) then
tmp = t_1
else if (y <= (-2.8d-58)) then
tmp = x / (y * (t - z))
else if (y <= 4.2d-111) then
tmp = t_1
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 t_1 = (-x / z) / (t - z);
double tmp;
if (y <= -4.5e-5) {
tmp = (x / y) / (t - z);
} else if (y <= -1.4e-33) {
tmp = t_1;
} else if (y <= -2.8e-58) {
tmp = x / (y * (t - z));
} else if (y <= 4.2e-111) {
tmp = t_1;
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (-x / z) / (t - z) tmp = 0 if y <= -4.5e-5: tmp = (x / y) / (t - z) elif y <= -1.4e-33: tmp = t_1 elif y <= -2.8e-58: tmp = x / (y * (t - z)) elif y <= 4.2e-111: tmp = t_1 else: tmp = (x / t) / (y - z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(Float64(-x) / z) / Float64(t - z)) tmp = 0.0 if (y <= -4.5e-5) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= -1.4e-33) tmp = t_1; elseif (y <= -2.8e-58) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (y <= 4.2e-111) tmp = t_1; 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)
t_1 = (-x / z) / (t - z);
tmp = 0.0;
if (y <= -4.5e-5)
tmp = (x / y) / (t - z);
elseif (y <= -1.4e-33)
tmp = t_1;
elseif (y <= -2.8e-58)
tmp = x / (y * (t - z));
elseif (y <= 4.2e-111)
tmp = t_1;
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_] := Block[{t$95$1 = N[(N[((-x) / z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.5e-5], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.4e-33], t$95$1, If[LessEqual[y, -2.8e-58], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.2e-111], t$95$1, N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{-x}{z}}{t - z}\\
\mathbf{if}\;y \leq -4.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq -1.4 \cdot 10^{-33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-58}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{-111}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -4.50000000000000028e-5Initial program 89.1%
associate-/r*97.5%
Simplified97.5%
Taylor expanded in y around inf 92.0%
if -4.50000000000000028e-5 < y < -1.4e-33 or -2.8000000000000001e-58 < y < 4.1999999999999997e-111Initial program 90.8%
Taylor expanded in y around 0 70.0%
mul-1-neg70.0%
distribute-frac-neg70.0%
associate-/r*73.6%
Simplified73.6%
if -1.4e-33 < y < -2.8000000000000001e-58Initial program 100.0%
Taylor expanded in y around inf 100.0%
*-commutative100.0%
Simplified100.0%
if 4.1999999999999997e-111 < y Initial program 86.7%
associate-/l/97.7%
Simplified97.7%
Taylor expanded in t around inf 58.0%
Final simplification72.3%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= y -6e-5)
(/ (/ x y) (- t z))
(if (<= y -1.45e-36)
(* (/ x (- t z)) (/ -1.0 z))
(if (<= y -2.4e-58)
(/ x (* y (- t z)))
(if (<= y 2.5e-113) (/ (/ (- 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 <= -6e-5) {
tmp = (x / y) / (t - z);
} else if (y <= -1.45e-36) {
tmp = (x / (t - z)) * (-1.0 / z);
} else if (y <= -2.4e-58) {
tmp = x / (y * (t - z));
} else if (y <= 2.5e-113) {
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 <= (-6d-5)) then
tmp = (x / y) / (t - z)
else if (y <= (-1.45d-36)) then
tmp = (x / (t - z)) * ((-1.0d0) / z)
else if (y <= (-2.4d-58)) then
tmp = x / (y * (t - z))
else if (y <= 2.5d-113) 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 <= -6e-5) {
tmp = (x / y) / (t - z);
} else if (y <= -1.45e-36) {
tmp = (x / (t - z)) * (-1.0 / z);
} else if (y <= -2.4e-58) {
tmp = x / (y * (t - z));
} else if (y <= 2.5e-113) {
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 <= -6e-5: tmp = (x / y) / (t - z) elif y <= -1.45e-36: tmp = (x / (t - z)) * (-1.0 / z) elif y <= -2.4e-58: tmp = x / (y * (t - z)) elif y <= 2.5e-113: 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 <= -6e-5) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= -1.45e-36) tmp = Float64(Float64(x / Float64(t - z)) * Float64(-1.0 / z)); elseif (y <= -2.4e-58) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (y <= 2.5e-113) 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 <= -6e-5)
tmp = (x / y) / (t - z);
elseif (y <= -1.45e-36)
tmp = (x / (t - z)) * (-1.0 / z);
elseif (y <= -2.4e-58)
tmp = x / (y * (t - z));
elseif (y <= 2.5e-113)
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, -6e-5], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.45e-36], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.4e-58], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e-113], 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 -6 \cdot 10^{-5}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq -1.45 \cdot 10^{-36}:\\
\;\;\;\;\frac{x}{t - z} \cdot \frac{-1}{z}\\
\mathbf{elif}\;y \leq -2.4 \cdot 10^{-58}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{-113}:\\
\;\;\;\;\frac{\frac{-x}{z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -6.00000000000000015e-5Initial program 89.1%
associate-/r*97.5%
Simplified97.5%
Taylor expanded in y around inf 92.0%
if -6.00000000000000015e-5 < y < -1.45000000000000006e-36Initial program 100.0%
associate-/l/99.6%
div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in y around 0 64.7%
if -1.45000000000000006e-36 < y < -2.4000000000000001e-58Initial program 100.0%
Taylor expanded in y around inf 100.0%
*-commutative100.0%
Simplified100.0%
if -2.4000000000000001e-58 < y < 2.4999999999999999e-113Initial program 90.0%
Taylor expanded in y around 0 72.4%
mul-1-neg72.4%
distribute-frac-neg72.4%
associate-/r*76.3%
Simplified76.3%
if 2.4999999999999999e-113 < y Initial program 86.7%
associate-/l/97.7%
Simplified97.7%
Taylor expanded in t around inf 58.0%
Final simplification73.1%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= y -6.6e-55)
(/ x (* y (- t z)))
(if (<= y -1.25e-203)
(/ (/ x z) z)
(if (or (<= y 4.1e-256) (not (<= y 6.4e-114)))
(/ x (* (- y z) t))
(* (/ x z) (/ 1.0 z))))))assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -6.6e-55) {
tmp = x / (y * (t - z));
} else if (y <= -1.25e-203) {
tmp = (x / z) / z;
} else if ((y <= 4.1e-256) || !(y <= 6.4e-114)) {
tmp = x / ((y - z) * t);
} else {
tmp = (x / z) * (1.0 / 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 <= (-6.6d-55)) then
tmp = x / (y * (t - z))
else if (y <= (-1.25d-203)) then
tmp = (x / z) / z
else if ((y <= 4.1d-256) .or. (.not. (y <= 6.4d-114))) then
tmp = x / ((y - z) * t)
else
tmp = (x / z) * (1.0d0 / 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 <= -6.6e-55) {
tmp = x / (y * (t - z));
} else if (y <= -1.25e-203) {
tmp = (x / z) / z;
} else if ((y <= 4.1e-256) || !(y <= 6.4e-114)) {
tmp = x / ((y - z) * t);
} else {
tmp = (x / z) * (1.0 / z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if y <= -6.6e-55: tmp = x / (y * (t - z)) elif y <= -1.25e-203: tmp = (x / z) / z elif (y <= 4.1e-256) or not (y <= 6.4e-114): tmp = x / ((y - z) * t) else: tmp = (x / z) * (1.0 / z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -6.6e-55) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (y <= -1.25e-203) tmp = Float64(Float64(x / z) / z); elseif ((y <= 4.1e-256) || !(y <= 6.4e-114)) tmp = Float64(x / Float64(Float64(y - z) * t)); else tmp = Float64(Float64(x / z) * Float64(1.0 / z)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -6.6e-55)
tmp = x / (y * (t - z));
elseif (y <= -1.25e-203)
tmp = (x / z) / z;
elseif ((y <= 4.1e-256) || ~((y <= 6.4e-114)))
tmp = x / ((y - z) * t);
else
tmp = (x / z) * (1.0 / 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, -6.6e-55], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.25e-203], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[Or[LessEqual[y, 4.1e-256], N[Not[LessEqual[y, 6.4e-114]], $MachinePrecision]], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.6 \cdot 10^{-55}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq -1.25 \cdot 10^{-203}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{elif}\;y \leq 4.1 \cdot 10^{-256} \lor \neg \left(y \leq 6.4 \cdot 10^{-114}\right):\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\
\end{array}
\end{array}
if y < -6.5999999999999999e-55Initial program 90.9%
Taylor expanded in y around inf 84.0%
*-commutative84.0%
Simplified84.0%
if -6.5999999999999999e-55 < y < -1.25e-203Initial program 87.1%
Taylor expanded in z around inf 55.0%
unpow255.0%
associate-/r*61.2%
Simplified61.2%
if -1.25e-203 < y < 4.1e-256 or 6.4000000000000003e-114 < y Initial program 88.6%
Taylor expanded in t around inf 59.2%
if 4.1e-256 < y < 6.4000000000000003e-114Initial program 88.6%
Taylor expanded in z around inf 51.1%
unpow251.1%
Simplified51.1%
associate-/r*55.5%
div-inv55.6%
Applied egg-rr55.6%
Final simplification65.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 (* (- y z) t))))
(if (<= t -4.4e-105)
t_1
(if (<= t -8.5e-233)
(/ (/ x z) z)
(if (<= t 6.2e-242)
(/ (- x) (* y z))
(if (<= t 2.4e+56) (/ 1.0 (/ z (/ x z))) t_1))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * t);
double tmp;
if (t <= -4.4e-105) {
tmp = t_1;
} else if (t <= -8.5e-233) {
tmp = (x / z) / z;
} else if (t <= 6.2e-242) {
tmp = -x / (y * z);
} else if (t <= 2.4e+56) {
tmp = 1.0 / (z / (x / z));
} 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 / ((y - z) * t)
if (t <= (-4.4d-105)) then
tmp = t_1
else if (t <= (-8.5d-233)) then
tmp = (x / z) / z
else if (t <= 6.2d-242) then
tmp = -x / (y * z)
else if (t <= 2.4d+56) then
tmp = 1.0d0 / (z / (x / z))
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 / ((y - z) * t);
double tmp;
if (t <= -4.4e-105) {
tmp = t_1;
} else if (t <= -8.5e-233) {
tmp = (x / z) / z;
} else if (t <= 6.2e-242) {
tmp = -x / (y * z);
} else if (t <= 2.4e+56) {
tmp = 1.0 / (z / (x / z));
} else {
tmp = t_1;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = x / ((y - z) * t) tmp = 0 if t <= -4.4e-105: tmp = t_1 elif t <= -8.5e-233: tmp = (x / z) / z elif t <= 6.2e-242: tmp = -x / (y * z) elif t <= 2.4e+56: tmp = 1.0 / (z / (x / z)) else: tmp = t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(Float64(y - z) * t)) tmp = 0.0 if (t <= -4.4e-105) tmp = t_1; elseif (t <= -8.5e-233) tmp = Float64(Float64(x / z) / z); elseif (t <= 6.2e-242) tmp = Float64(Float64(-x) / Float64(y * z)); elseif (t <= 2.4e+56) tmp = Float64(1.0 / Float64(z / Float64(x / z))); 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 / ((y - z) * t);
tmp = 0.0;
if (t <= -4.4e-105)
tmp = t_1;
elseif (t <= -8.5e-233)
tmp = (x / z) / z;
elseif (t <= 6.2e-242)
tmp = -x / (y * z);
elseif (t <= 2.4e+56)
tmp = 1.0 / (z / (x / z));
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[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.4e-105], t$95$1, If[LessEqual[t, -8.5e-233], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, 6.2e-242], N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.4e+56], N[(1.0 / N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{if}\;t \leq -4.4 \cdot 10^{-105}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -8.5 \cdot 10^{-233}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{-242}:\\
\;\;\;\;\frac{-x}{y \cdot z}\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{+56}:\\
\;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -4.40000000000000008e-105 or 2.40000000000000013e56 < t Initial program 87.8%
Taylor expanded in t around inf 77.1%
if -4.40000000000000008e-105 < t < -8.5000000000000005e-233Initial program 83.9%
Taylor expanded in z around inf 59.6%
unpow259.6%
associate-/r*69.6%
Simplified69.6%
if -8.5000000000000005e-233 < t < 6.20000000000000031e-242Initial program 96.6%
associate-/r*88.7%
Simplified88.7%
Taylor expanded in y around inf 65.7%
Taylor expanded in t around 0 73.3%
associate-*r/73.3%
neg-mul-173.3%
*-commutative73.3%
Simplified73.3%
if 6.20000000000000031e-242 < t < 2.40000000000000013e56Initial program 91.8%
Taylor expanded in z around inf 55.1%
unpow255.1%
Simplified55.1%
clear-num55.1%
inv-pow55.1%
Applied egg-rr55.1%
unpow-155.1%
associate-/l*59.1%
Simplified59.1%
Final simplification72.4%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= y -3.4e-55)
(/ x (* y (- t z)))
(if (<= y -1.75e-206)
(/ (/ x z) z)
(if (<= y 6.6e-256)
(/ x (* (- y z) t))
(if (<= y 1.75e-116) (* (/ x z) (/ 1.0 z)) (/ (/ x t) (- y z)))))))assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.4e-55) {
tmp = x / (y * (t - z));
} else if (y <= -1.75e-206) {
tmp = (x / z) / z;
} else if (y <= 6.6e-256) {
tmp = x / ((y - z) * t);
} else if (y <= 1.75e-116) {
tmp = (x / z) * (1.0 / 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 <= (-3.4d-55)) then
tmp = x / (y * (t - z))
else if (y <= (-1.75d-206)) then
tmp = (x / z) / z
else if (y <= 6.6d-256) then
tmp = x / ((y - z) * t)
else if (y <= 1.75d-116) then
tmp = (x / z) * (1.0d0 / 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 <= -3.4e-55) {
tmp = x / (y * (t - z));
} else if (y <= -1.75e-206) {
tmp = (x / z) / z;
} else if (y <= 6.6e-256) {
tmp = x / ((y - z) * t);
} else if (y <= 1.75e-116) {
tmp = (x / z) * (1.0 / z);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if y <= -3.4e-55: tmp = x / (y * (t - z)) elif y <= -1.75e-206: tmp = (x / z) / z elif y <= 6.6e-256: tmp = x / ((y - z) * t) elif y <= 1.75e-116: tmp = (x / z) * (1.0 / 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 <= -3.4e-55) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (y <= -1.75e-206) tmp = Float64(Float64(x / z) / z); elseif (y <= 6.6e-256) tmp = Float64(x / Float64(Float64(y - z) * t)); elseif (y <= 1.75e-116) tmp = Float64(Float64(x / z) * Float64(1.0 / 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 <= -3.4e-55)
tmp = x / (y * (t - z));
elseif (y <= -1.75e-206)
tmp = (x / z) / z;
elseif (y <= 6.6e-256)
tmp = x / ((y - z) * t);
elseif (y <= 1.75e-116)
tmp = (x / z) * (1.0 / 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, -3.4e-55], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.75e-206], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 6.6e-256], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e-116], N[(N[(x / z), $MachinePrecision] * N[(1.0 / 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 -3.4 \cdot 10^{-55}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq -1.75 \cdot 10^{-206}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{elif}\;y \leq 6.6 \cdot 10^{-256}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{-116}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -3.39999999999999973e-55Initial program 90.9%
Taylor expanded in y around inf 84.0%
*-commutative84.0%
Simplified84.0%
if -3.39999999999999973e-55 < y < -1.74999999999999995e-206Initial program 87.9%
Taylor expanded in z around inf 54.8%
unpow254.8%
associate-/r*60.7%
Simplified60.7%
if -1.74999999999999995e-206 < y < 6.6e-256Initial program 93.7%
Taylor expanded in t around inf 74.9%
if 6.6e-256 < y < 1.74999999999999992e-116Initial program 88.6%
Taylor expanded in z around inf 51.1%
unpow251.1%
Simplified51.1%
associate-/r*55.5%
div-inv55.6%
Applied egg-rr55.6%
if 1.74999999999999992e-116 < y Initial program 86.7%
associate-/l/97.7%
Simplified97.7%
Taylor expanded in t around inf 58.0%
Final simplification66.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.6e-57)
(/ (/ x y) (- t z))
(if (<= y -1.6e-202)
(/ (/ x z) z)
(if (<= y 1.6e-243)
(/ x (* (- y z) t))
(if (<= y 2e-113) (* (/ x z) (/ 1.0 z)) (/ (/ x t) (- y z)))))))assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.6e-57) {
tmp = (x / y) / (t - z);
} else if (y <= -1.6e-202) {
tmp = (x / z) / z;
} else if (y <= 1.6e-243) {
tmp = x / ((y - z) * t);
} else if (y <= 2e-113) {
tmp = (x / z) * (1.0 / 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.6d-57)) then
tmp = (x / y) / (t - z)
else if (y <= (-1.6d-202)) then
tmp = (x / z) / z
else if (y <= 1.6d-243) then
tmp = x / ((y - z) * t)
else if (y <= 2d-113) then
tmp = (x / z) * (1.0d0 / 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.6e-57) {
tmp = (x / y) / (t - z);
} else if (y <= -1.6e-202) {
tmp = (x / z) / z;
} else if (y <= 1.6e-243) {
tmp = x / ((y - z) * t);
} else if (y <= 2e-113) {
tmp = (x / z) * (1.0 / 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.6e-57: tmp = (x / y) / (t - z) elif y <= -1.6e-202: tmp = (x / z) / z elif y <= 1.6e-243: tmp = x / ((y - z) * t) elif y <= 2e-113: tmp = (x / z) * (1.0 / 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.6e-57) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= -1.6e-202) tmp = Float64(Float64(x / z) / z); elseif (y <= 1.6e-243) tmp = Float64(x / Float64(Float64(y - z) * t)); elseif (y <= 2e-113) tmp = Float64(Float64(x / z) * Float64(1.0 / 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.6e-57)
tmp = (x / y) / (t - z);
elseif (y <= -1.6e-202)
tmp = (x / z) / z;
elseif (y <= 1.6e-243)
tmp = x / ((y - z) * t);
elseif (y <= 2e-113)
tmp = (x / z) * (1.0 / 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.6e-57], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.6e-202], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 1.6e-243], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2e-113], N[(N[(x / z), $MachinePrecision] * N[(1.0 / 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 -2.6 \cdot 10^{-57}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq -1.6 \cdot 10^{-202}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-243}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{elif}\;y \leq 2 \cdot 10^{-113}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -2.59999999999999985e-57Initial program 90.9%
associate-/r*96.5%
Simplified96.5%
Taylor expanded in y around inf 87.8%
if -2.59999999999999985e-57 < y < -1.6000000000000001e-202Initial program 87.1%
Taylor expanded in z around inf 55.0%
unpow255.0%
associate-/r*61.2%
Simplified61.2%
if -1.6000000000000001e-202 < y < 1.5999999999999999e-243Initial program 94.4%
Taylor expanded in t around inf 74.9%
if 1.5999999999999999e-243 < y < 1.99999999999999996e-113Initial program 87.9%
Taylor expanded in z around inf 54.1%
unpow254.1%
Simplified54.1%
associate-/r*58.8%
div-inv58.8%
Applied egg-rr58.8%
if 1.99999999999999996e-113 < y Initial program 86.7%
associate-/l/97.7%
Simplified97.7%
Taylor expanded in t around inf 58.0%
Final simplification68.6%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= y -6.8e-56)
(/ (/ x y) (- t z))
(if (<= y -4.3e-205)
(/ (/ x z) z)
(if (<= y 2.3e-249)
(/ (/ x (- y z)) t)
(if (<= y 3.1e-114) (* (/ x z) (/ 1.0 z)) (/ (/ x t) (- y z)))))))assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -6.8e-56) {
tmp = (x / y) / (t - z);
} else if (y <= -4.3e-205) {
tmp = (x / z) / z;
} else if (y <= 2.3e-249) {
tmp = (x / (y - z)) / t;
} else if (y <= 3.1e-114) {
tmp = (x / z) * (1.0 / 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 <= (-6.8d-56)) then
tmp = (x / y) / (t - z)
else if (y <= (-4.3d-205)) then
tmp = (x / z) / z
else if (y <= 2.3d-249) then
tmp = (x / (y - z)) / t
else if (y <= 3.1d-114) then
tmp = (x / z) * (1.0d0 / 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 <= -6.8e-56) {
tmp = (x / y) / (t - z);
} else if (y <= -4.3e-205) {
tmp = (x / z) / z;
} else if (y <= 2.3e-249) {
tmp = (x / (y - z)) / t;
} else if (y <= 3.1e-114) {
tmp = (x / z) * (1.0 / z);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if y <= -6.8e-56: tmp = (x / y) / (t - z) elif y <= -4.3e-205: tmp = (x / z) / z elif y <= 2.3e-249: tmp = (x / (y - z)) / t elif y <= 3.1e-114: tmp = (x / z) * (1.0 / 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 <= -6.8e-56) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= -4.3e-205) tmp = Float64(Float64(x / z) / z); elseif (y <= 2.3e-249) tmp = Float64(Float64(x / Float64(y - z)) / t); elseif (y <= 3.1e-114) tmp = Float64(Float64(x / z) * Float64(1.0 / 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 <= -6.8e-56)
tmp = (x / y) / (t - z);
elseif (y <= -4.3e-205)
tmp = (x / z) / z;
elseif (y <= 2.3e-249)
tmp = (x / (y - z)) / t;
elseif (y <= 3.1e-114)
tmp = (x / z) * (1.0 / 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, -6.8e-56], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.3e-205], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 2.3e-249], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, 3.1e-114], N[(N[(x / z), $MachinePrecision] * N[(1.0 / 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 -6.8 \cdot 10^{-56}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq -4.3 \cdot 10^{-205}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{-249}:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t}\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{-114}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -6.79999999999999964e-56Initial program 90.9%
associate-/r*96.5%
Simplified96.5%
Taylor expanded in y around inf 87.8%
if -6.79999999999999964e-56 < y < -4.2999999999999999e-205Initial program 87.9%
Taylor expanded in z around inf 54.8%
unpow254.8%
associate-/r*60.7%
Simplified60.7%
if -4.2999999999999999e-205 < y < 2.2999999999999998e-249Initial program 93.9%
Taylor expanded in t around inf 75.6%
div-inv75.5%
associate-/r*75.6%
Applied egg-rr75.6%
*-commutative75.6%
associate-*l/75.4%
associate-*r/75.5%
associate-*l/75.6%
*-lft-identity75.6%
Simplified75.6%
if 2.2999999999999998e-249 < y < 3.1e-114Initial program 88.3%
Taylor expanded in z around inf 52.6%
unpow252.6%
Simplified52.6%
associate-/r*57.1%
div-inv57.2%
Applied egg-rr57.2%
if 3.1e-114 < y Initial program 86.7%
associate-/l/97.7%
Simplified97.7%
Taylor expanded in t around inf 58.0%
Final simplification68.3%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -220000000000.0) (not (<= z 5.8e+97))) (/ x (* y z)) (/ x (* y t))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -220000000000.0) || !(z <= 5.8e+97)) {
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 <= (-220000000000.0d0)) .or. (.not. (z <= 5.8d+97))) 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 <= -220000000000.0) || !(z <= 5.8e+97)) {
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 <= -220000000000.0) or not (z <= 5.8e+97): 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 <= -220000000000.0) || !(z <= 5.8e+97)) 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 <= -220000000000.0) || ~((z <= 5.8e+97)))
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, -220000000000.0], N[Not[LessEqual[z, 5.8e+97]], $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 -220000000000 \lor \neg \left(z \leq 5.8 \cdot 10^{+97}\right):\\
\;\;\;\;\frac{x}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -2.2e11 or 5.79999999999999974e97 < z Initial program 79.9%
associate-/r*99.9%
Simplified99.9%
Taylor expanded in y around inf 40.3%
Taylor expanded in t around 0 35.6%
associate-*r/35.6%
neg-mul-135.6%
*-commutative35.6%
Simplified35.6%
expm1-log1p-u35.4%
expm1-udef58.6%
add-sqr-sqrt31.6%
sqrt-unprod57.4%
sqr-neg57.4%
sqrt-unprod27.0%
add-sqr-sqrt58.3%
*-commutative58.3%
Applied egg-rr58.3%
expm1-def34.2%
expm1-log1p34.5%
Simplified34.5%
if -2.2e11 < z < 5.79999999999999974e97Initial program 94.4%
Taylor expanded in z around 0 53.6%
Final simplification46.5%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -3.5e-8) (not (<= z 1.6e-109))) (/ x (* z z)) (/ x (* y t))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.5e-8) || !(z <= 1.6e-109)) {
tmp = x / (z * 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 <= (-3.5d-8)) .or. (.not. (z <= 1.6d-109))) then
tmp = x / (z * 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 <= -3.5e-8) || !(z <= 1.6e-109)) {
tmp = x / (z * z);
} else {
tmp = x / (y * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -3.5e-8) or not (z <= 1.6e-109): tmp = x / (z * z) else: tmp = x / (y * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -3.5e-8) || !(z <= 1.6e-109)) tmp = Float64(x / Float64(z * 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 <= -3.5e-8) || ~((z <= 1.6e-109)))
tmp = x / (z * 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, -3.5e-8], N[Not[LessEqual[z, 1.6e-109]], $MachinePrecision]], N[(x / N[(z * 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 -3.5 \cdot 10^{-8} \lor \neg \left(z \leq 1.6 \cdot 10^{-109}\right):\\
\;\;\;\;\frac{x}{z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -3.50000000000000024e-8 or 1.6000000000000001e-109 < z Initial program 83.9%
Taylor expanded in z around inf 57.9%
unpow257.9%
Simplified57.9%
if -3.50000000000000024e-8 < z < 1.6000000000000001e-109Initial program 95.6%
Taylor expanded in z around 0 66.5%
Final simplification61.7%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -38000000000.0) (not (<= z 1.6e-109))) (/ x (* z z)) (/ (/ x t) y)))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -38000000000.0) || !(z <= 1.6e-109)) {
tmp = x / (z * 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 <= (-38000000000.0d0)) .or. (.not. (z <= 1.6d-109))) then
tmp = x / (z * 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 <= -38000000000.0) || !(z <= 1.6e-109)) {
tmp = x / (z * z);
} else {
tmp = (x / t) / y;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -38000000000.0) or not (z <= 1.6e-109): tmp = x / (z * z) else: tmp = (x / t) / y return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -38000000000.0) || !(z <= 1.6e-109)) tmp = Float64(x / Float64(z * 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 <= -38000000000.0) || ~((z <= 1.6e-109)))
tmp = x / (z * 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, -38000000000.0], N[Not[LessEqual[z, 1.6e-109]], $MachinePrecision]], N[(x / N[(z * 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 -38000000000 \lor \neg \left(z \leq 1.6 \cdot 10^{-109}\right):\\
\;\;\;\;\frac{x}{z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -3.8e10 or 1.6000000000000001e-109 < z Initial program 84.2%
Taylor expanded in z around inf 58.4%
unpow258.4%
Simplified58.4%
if -3.8e10 < z < 1.6000000000000001e-109Initial program 94.9%
Taylor expanded in z around 0 64.9%
*-un-lft-identity64.9%
times-frac63.9%
Applied egg-rr63.9%
associate-*l/64.0%
*-lft-identity64.0%
Simplified64.0%
Final simplification60.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 -18000000000.0) (not (<= z 1.6e-109))) (/ (/ x z) z) (/ (/ x t) y)))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -18000000000.0) || !(z <= 1.6e-109)) {
tmp = (x / z) / 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 <= (-18000000000.0d0)) .or. (.not. (z <= 1.6d-109))) then
tmp = (x / z) / 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 <= -18000000000.0) || !(z <= 1.6e-109)) {
tmp = (x / z) / z;
} else {
tmp = (x / t) / y;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -18000000000.0) or not (z <= 1.6e-109): tmp = (x / z) / z else: tmp = (x / t) / y return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -18000000000.0) || !(z <= 1.6e-109)) tmp = Float64(Float64(x / z) / 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 <= -18000000000.0) || ~((z <= 1.6e-109)))
tmp = (x / z) / 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, -18000000000.0], N[Not[LessEqual[z, 1.6e-109]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -18000000000 \lor \neg \left(z \leq 1.6 \cdot 10^{-109}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -1.8e10 or 1.6000000000000001e-109 < z Initial program 84.2%
Taylor expanded in z around inf 58.4%
unpow258.4%
associate-/r*62.8%
Simplified62.8%
if -1.8e10 < z < 1.6000000000000001e-109Initial program 94.9%
Taylor expanded in z around 0 64.9%
*-un-lft-identity64.9%
times-frac63.9%
Applied egg-rr63.9%
associate-*l/64.0%
*-lft-identity64.0%
Simplified64.0%
Final simplification63.3%
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 89.0%
Taylor expanded in z around 0 39.6%
Final simplification39.6%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* (- y z) (- t z)))) (if (< (/ x t_1) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if ((x / t_1) < 0.0) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = x * (1.0 / t_1);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (y - z) * (t - z)
if ((x / t_1) < 0.0d0) then
tmp = (x / (y - z)) / (t - z)
else
tmp = x * (1.0d0 / t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if ((x / t_1) < 0.0) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = x * (1.0 / t_1);
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - z) * (t - z) tmp = 0 if (x / t_1) < 0.0: tmp = (x / (y - z)) / (t - z) else: tmp = x * (1.0 / t_1) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - z) * Float64(t - z)) tmp = 0.0 if (Float64(x / t_1) < 0.0) tmp = Float64(Float64(x / Float64(y - z)) / Float64(t - z)); else tmp = Float64(x * Float64(1.0 / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - z) * (t - z); tmp = 0.0; if ((x / t_1) < 0.0) tmp = (x / (y - z)) / (t - z); else tmp = x * (1.0 / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[Less[N[(x / t$95$1), $MachinePrecision], 0.0], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
\mathbf{if}\;\frac{x}{t_1} < 0:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1}{t_1}\\
\end{array}
\end{array}
herbie shell --seed 2023181
(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))))