
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ x (- 1.0 z)) (/ (- t a) (- b y))))
(t_2 (+ (* x y) (* z (- t a))))
(t_3 (/ t_2 (+ y (* z (- b y))))))
(if (<= t_3 -5e+233)
t_1
(if (<= t_3 -2e-231)
t_3
(if (<= t_3 0.0)
(+
(- (+ (/ t (- b y)) (/ (/ (* x y) z) (- b y))) (/ a (- b y)))
(* (/ y z) (/ (- a t) (pow (- b y) 2.0))))
(if (<= t_3 1e+287) (/ t_2 (+ y (- (* z b) (* y z)))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / (1.0 - z)) + ((t - a) / (b - y));
double t_2 = (x * y) + (z * (t - a));
double t_3 = t_2 / (y + (z * (b - y)));
double tmp;
if (t_3 <= -5e+233) {
tmp = t_1;
} else if (t_3 <= -2e-231) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = (((t / (b - y)) + (((x * y) / z) / (b - y))) - (a / (b - y))) + ((y / z) * ((a - t) / pow((b - y), 2.0)));
} else if (t_3 <= 1e+287) {
tmp = t_2 / (y + ((z * b) - (y * z)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (x / (1.0d0 - z)) + ((t - a) / (b - y))
t_2 = (x * y) + (z * (t - a))
t_3 = t_2 / (y + (z * (b - y)))
if (t_3 <= (-5d+233)) then
tmp = t_1
else if (t_3 <= (-2d-231)) then
tmp = t_3
else if (t_3 <= 0.0d0) then
tmp = (((t / (b - y)) + (((x * y) / z) / (b - y))) - (a / (b - y))) + ((y / z) * ((a - t) / ((b - y) ** 2.0d0)))
else if (t_3 <= 1d+287) then
tmp = t_2 / (y + ((z * b) - (y * z)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / (1.0 - z)) + ((t - a) / (b - y));
double t_2 = (x * y) + (z * (t - a));
double t_3 = t_2 / (y + (z * (b - y)));
double tmp;
if (t_3 <= -5e+233) {
tmp = t_1;
} else if (t_3 <= -2e-231) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = (((t / (b - y)) + (((x * y) / z) / (b - y))) - (a / (b - y))) + ((y / z) * ((a - t) / Math.pow((b - y), 2.0)));
} else if (t_3 <= 1e+287) {
tmp = t_2 / (y + ((z * b) - (y * z)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x / (1.0 - z)) + ((t - a) / (b - y)) t_2 = (x * y) + (z * (t - a)) t_3 = t_2 / (y + (z * (b - y))) tmp = 0 if t_3 <= -5e+233: tmp = t_1 elif t_3 <= -2e-231: tmp = t_3 elif t_3 <= 0.0: tmp = (((t / (b - y)) + (((x * y) / z) / (b - y))) - (a / (b - y))) + ((y / z) * ((a - t) / math.pow((b - y), 2.0))) elif t_3 <= 1e+287: tmp = t_2 / (y + ((z * b) - (y * z))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x / Float64(1.0 - z)) + Float64(Float64(t - a) / Float64(b - y))) t_2 = Float64(Float64(x * y) + Float64(z * Float64(t - a))) t_3 = Float64(t_2 / Float64(y + Float64(z * Float64(b - y)))) tmp = 0.0 if (t_3 <= -5e+233) tmp = t_1; elseif (t_3 <= -2e-231) tmp = t_3; elseif (t_3 <= 0.0) tmp = Float64(Float64(Float64(Float64(t / Float64(b - y)) + Float64(Float64(Float64(x * y) / z) / Float64(b - y))) - Float64(a / Float64(b - y))) + Float64(Float64(y / z) * Float64(Float64(a - t) / (Float64(b - y) ^ 2.0)))); elseif (t_3 <= 1e+287) tmp = Float64(t_2 / Float64(y + Float64(Float64(z * b) - Float64(y * z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x / (1.0 - z)) + ((t - a) / (b - y)); t_2 = (x * y) + (z * (t - a)); t_3 = t_2 / (y + (z * (b - y))); tmp = 0.0; if (t_3 <= -5e+233) tmp = t_1; elseif (t_3 <= -2e-231) tmp = t_3; elseif (t_3 <= 0.0) tmp = (((t / (b - y)) + (((x * y) / z) / (b - y))) - (a / (b - y))) + ((y / z) * ((a - t) / ((b - y) ^ 2.0))); elseif (t_3 <= 1e+287) tmp = t_2 / (y + ((z * b) - (y * z))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -5e+233], t$95$1, If[LessEqual[t$95$3, -2e-231], t$95$3, If[LessEqual[t$95$3, 0.0], N[(N[(N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y / z), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 1e+287], N[(t$95$2 / N[(y + N[(N[(z * b), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z} + \frac{t - a}{b - y}\\
t_2 := x \cdot y + z \cdot \left(t - a\right)\\
t_3 := \frac{t_2}{y + z \cdot \left(b - y\right)}\\
\mathbf{if}\;t_3 \leq -5 \cdot 10^{+233}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_3 \leq -2 \cdot 10^{-231}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_3 \leq 0:\\
\;\;\;\;\left(\left(\frac{t}{b - y} + \frac{\frac{x \cdot y}{z}}{b - y}\right) - \frac{a}{b - y}\right) + \frac{y}{z} \cdot \frac{a - t}{{\left(b - y\right)}^{2}}\\
\mathbf{elif}\;t_3 \leq 10^{+287}:\\
\;\;\;\;\frac{t_2}{y + \left(z \cdot b - y \cdot z\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5.00000000000000009e233 or 1.0000000000000001e287 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 25.0%
Taylor expanded in x around 0 25.0%
Taylor expanded in z around inf 62.5%
Taylor expanded in y around inf 93.6%
mul-1-neg93.6%
unsub-neg93.6%
Simplified93.6%
if -5.00000000000000009e233 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2e-231Initial program 99.7%
if -2e-231 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 25.0%
Taylor expanded in z around inf 75.8%
associate--r+75.8%
associate-/r*91.5%
*-commutative91.5%
times-frac99.8%
Simplified99.8%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.0000000000000001e287Initial program 99.5%
sub-neg99.5%
distribute-lft-in99.6%
Applied egg-rr99.6%
Final simplification97.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ x (- 1.0 z)) (/ (- t a) (- b y))))
(t_2 (+ (* x y) (* z (- t a))))
(t_3 (/ t_2 (+ y (* z (- b y))))))
(if (<= t_3 -5e+233)
t_1
(if (<= t_3 -2e-231)
t_3
(if (<= t_3 0.0)
(-
(/ (* (/ y z) (- a t)) (pow (- b y) 2.0))
(- (/ (- a t) (- b y)) (/ (/ (* x y) z) (- b y))))
(if (<= t_3 1e+287) (/ t_2 (+ y (- (* z b) (* y z)))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / (1.0 - z)) + ((t - a) / (b - y));
double t_2 = (x * y) + (z * (t - a));
double t_3 = t_2 / (y + (z * (b - y)));
double tmp;
if (t_3 <= -5e+233) {
tmp = t_1;
} else if (t_3 <= -2e-231) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = (((y / z) * (a - t)) / pow((b - y), 2.0)) - (((a - t) / (b - y)) - (((x * y) / z) / (b - y)));
} else if (t_3 <= 1e+287) {
tmp = t_2 / (y + ((z * b) - (y * z)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (x / (1.0d0 - z)) + ((t - a) / (b - y))
t_2 = (x * y) + (z * (t - a))
t_3 = t_2 / (y + (z * (b - y)))
if (t_3 <= (-5d+233)) then
tmp = t_1
else if (t_3 <= (-2d-231)) then
tmp = t_3
else if (t_3 <= 0.0d0) then
tmp = (((y / z) * (a - t)) / ((b - y) ** 2.0d0)) - (((a - t) / (b - y)) - (((x * y) / z) / (b - y)))
else if (t_3 <= 1d+287) then
tmp = t_2 / (y + ((z * b) - (y * z)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / (1.0 - z)) + ((t - a) / (b - y));
double t_2 = (x * y) + (z * (t - a));
double t_3 = t_2 / (y + (z * (b - y)));
double tmp;
if (t_3 <= -5e+233) {
tmp = t_1;
} else if (t_3 <= -2e-231) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = (((y / z) * (a - t)) / Math.pow((b - y), 2.0)) - (((a - t) / (b - y)) - (((x * y) / z) / (b - y)));
} else if (t_3 <= 1e+287) {
tmp = t_2 / (y + ((z * b) - (y * z)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x / (1.0 - z)) + ((t - a) / (b - y)) t_2 = (x * y) + (z * (t - a)) t_3 = t_2 / (y + (z * (b - y))) tmp = 0 if t_3 <= -5e+233: tmp = t_1 elif t_3 <= -2e-231: tmp = t_3 elif t_3 <= 0.0: tmp = (((y / z) * (a - t)) / math.pow((b - y), 2.0)) - (((a - t) / (b - y)) - (((x * y) / z) / (b - y))) elif t_3 <= 1e+287: tmp = t_2 / (y + ((z * b) - (y * z))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x / Float64(1.0 - z)) + Float64(Float64(t - a) / Float64(b - y))) t_2 = Float64(Float64(x * y) + Float64(z * Float64(t - a))) t_3 = Float64(t_2 / Float64(y + Float64(z * Float64(b - y)))) tmp = 0.0 if (t_3 <= -5e+233) tmp = t_1; elseif (t_3 <= -2e-231) tmp = t_3; elseif (t_3 <= 0.0) tmp = Float64(Float64(Float64(Float64(y / z) * Float64(a - t)) / (Float64(b - y) ^ 2.0)) - Float64(Float64(Float64(a - t) / Float64(b - y)) - Float64(Float64(Float64(x * y) / z) / Float64(b - y)))); elseif (t_3 <= 1e+287) tmp = Float64(t_2 / Float64(y + Float64(Float64(z * b) - Float64(y * z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x / (1.0 - z)) + ((t - a) / (b - y)); t_2 = (x * y) + (z * (t - a)); t_3 = t_2 / (y + (z * (b - y))); tmp = 0.0; if (t_3 <= -5e+233) tmp = t_1; elseif (t_3 <= -2e-231) tmp = t_3; elseif (t_3 <= 0.0) tmp = (((y / z) * (a - t)) / ((b - y) ^ 2.0)) - (((a - t) / (b - y)) - (((x * y) / z) / (b - y))); elseif (t_3 <= 1e+287) tmp = t_2 / (y + ((z * b) - (y * z))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -5e+233], t$95$1, If[LessEqual[t$95$3, -2e-231], t$95$3, If[LessEqual[t$95$3, 0.0], N[(N[(N[(N[(y / z), $MachinePrecision] * N[(a - t), $MachinePrecision]), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a - t), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 1e+287], N[(t$95$2 / N[(y + N[(N[(z * b), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z} + \frac{t - a}{b - y}\\
t_2 := x \cdot y + z \cdot \left(t - a\right)\\
t_3 := \frac{t_2}{y + z \cdot \left(b - y\right)}\\
\mathbf{if}\;t_3 \leq -5 \cdot 10^{+233}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_3 \leq -2 \cdot 10^{-231}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_3 \leq 0:\\
\;\;\;\;\frac{\frac{y}{z} \cdot \left(a - t\right)}{{\left(b - y\right)}^{2}} - \left(\frac{a - t}{b - y} - \frac{\frac{x \cdot y}{z}}{b - y}\right)\\
\mathbf{elif}\;t_3 \leq 10^{+287}:\\
\;\;\;\;\frac{t_2}{y + \left(z \cdot b - y \cdot z\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5.00000000000000009e233 or 1.0000000000000001e287 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 25.0%
Taylor expanded in x around 0 25.0%
Taylor expanded in z around inf 62.5%
Taylor expanded in y around inf 93.6%
mul-1-neg93.6%
unsub-neg93.6%
Simplified93.6%
if -5.00000000000000009e233 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2e-231Initial program 99.7%
if -2e-231 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 25.0%
Taylor expanded in z around inf 75.8%
associate--r+75.8%
+-commutative75.8%
associate--l+75.8%
associate-/r*91.5%
*-commutative91.5%
div-sub91.4%
times-frac99.7%
associate-*r/91.4%
Simplified91.4%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.0000000000000001e287Initial program 99.5%
sub-neg99.5%
distribute-lft-in99.6%
Applied egg-rr99.6%
Final simplification96.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* x y) (* z (- t a))))
(t_2 (/ t_1 (+ y (* z (- b y)))))
(t_3 (/ (- t a) (- b y)))
(t_4 (+ (/ x (- 1.0 z)) t_3)))
(if (<= t_2 -5e+233)
t_4
(if (<= t_2 -2e-231)
t_2
(if (<= t_2 0.0)
(+
t_3
(/ (- (/ x (/ (- b y) y)) (/ y (/ (pow (- b y) 2.0) (- t a)))) z))
(if (<= t_2 1e+287) (/ t_1 (+ y (- (* z b) (* y z)))) t_4))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * y) + (z * (t - a));
double t_2 = t_1 / (y + (z * (b - y)));
double t_3 = (t - a) / (b - y);
double t_4 = (x / (1.0 - z)) + t_3;
double tmp;
if (t_2 <= -5e+233) {
tmp = t_4;
} else if (t_2 <= -2e-231) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t_3 + (((x / ((b - y) / y)) - (y / (pow((b - y), 2.0) / (t - a)))) / z);
} else if (t_2 <= 1e+287) {
tmp = t_1 / (y + ((z * b) - (y * z)));
} else {
tmp = t_4;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = (x * y) + (z * (t - a))
t_2 = t_1 / (y + (z * (b - y)))
t_3 = (t - a) / (b - y)
t_4 = (x / (1.0d0 - z)) + t_3
if (t_2 <= (-5d+233)) then
tmp = t_4
else if (t_2 <= (-2d-231)) then
tmp = t_2
else if (t_2 <= 0.0d0) then
tmp = t_3 + (((x / ((b - y) / y)) - (y / (((b - y) ** 2.0d0) / (t - a)))) / z)
else if (t_2 <= 1d+287) then
tmp = t_1 / (y + ((z * b) - (y * z)))
else
tmp = t_4
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * y) + (z * (t - a));
double t_2 = t_1 / (y + (z * (b - y)));
double t_3 = (t - a) / (b - y);
double t_4 = (x / (1.0 - z)) + t_3;
double tmp;
if (t_2 <= -5e+233) {
tmp = t_4;
} else if (t_2 <= -2e-231) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t_3 + (((x / ((b - y) / y)) - (y / (Math.pow((b - y), 2.0) / (t - a)))) / z);
} else if (t_2 <= 1e+287) {
tmp = t_1 / (y + ((z * b) - (y * z)));
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * y) + (z * (t - a)) t_2 = t_1 / (y + (z * (b - y))) t_3 = (t - a) / (b - y) t_4 = (x / (1.0 - z)) + t_3 tmp = 0 if t_2 <= -5e+233: tmp = t_4 elif t_2 <= -2e-231: tmp = t_2 elif t_2 <= 0.0: tmp = t_3 + (((x / ((b - y) / y)) - (y / (math.pow((b - y), 2.0) / (t - a)))) / z) elif t_2 <= 1e+287: tmp = t_1 / (y + ((z * b) - (y * z))) else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * y) + Float64(z * Float64(t - a))) t_2 = Float64(t_1 / Float64(y + Float64(z * Float64(b - y)))) t_3 = Float64(Float64(t - a) / Float64(b - y)) t_4 = Float64(Float64(x / Float64(1.0 - z)) + t_3) tmp = 0.0 if (t_2 <= -5e+233) tmp = t_4; elseif (t_2 <= -2e-231) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(t_3 + Float64(Float64(Float64(x / Float64(Float64(b - y) / y)) - Float64(y / Float64((Float64(b - y) ^ 2.0) / Float64(t - a)))) / z)); elseif (t_2 <= 1e+287) tmp = Float64(t_1 / Float64(y + Float64(Float64(z * b) - Float64(y * z)))); else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * y) + (z * (t - a)); t_2 = t_1 / (y + (z * (b - y))); t_3 = (t - a) / (b - y); t_4 = (x / (1.0 - z)) + t_3; tmp = 0.0; if (t_2 <= -5e+233) tmp = t_4; elseif (t_2 <= -2e-231) tmp = t_2; elseif (t_2 <= 0.0) tmp = t_3 + (((x / ((b - y) / y)) - (y / (((b - y) ^ 2.0) / (t - a)))) / z); elseif (t_2 <= 1e+287) tmp = t_1 / (y + ((z * b) - (y * z))); else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+233], t$95$4, If[LessEqual[t$95$2, -2e-231], t$95$2, If[LessEqual[t$95$2, 0.0], N[(t$95$3 + N[(N[(N[(x / N[(N[(b - y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] - N[(y / N[(N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+287], N[(t$95$1 / N[(y + N[(N[(z * b), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + z \cdot \left(t - a\right)\\
t_2 := \frac{t_1}{y + z \cdot \left(b - y\right)}\\
t_3 := \frac{t - a}{b - y}\\
t_4 := \frac{x}{1 - z} + t_3\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{+233}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t_2 \leq -2 \cdot 10^{-231}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;t_3 + \frac{\frac{x}{\frac{b - y}{y}} - \frac{y}{\frac{{\left(b - y\right)}^{2}}{t - a}}}{z}\\
\mathbf{elif}\;t_2 \leq 10^{+287}:\\
\;\;\;\;\frac{t_1}{y + \left(z \cdot b - y \cdot z\right)}\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5.00000000000000009e233 or 1.0000000000000001e287 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 25.0%
Taylor expanded in x around 0 25.0%
Taylor expanded in z around inf 62.5%
Taylor expanded in y around inf 93.6%
mul-1-neg93.6%
unsub-neg93.6%
Simplified93.6%
if -5.00000000000000009e233 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2e-231Initial program 99.7%
if -2e-231 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 25.0%
Taylor expanded in z around -inf 91.6%
associate--l+91.6%
mul-1-neg91.6%
distribute-lft-out--91.6%
associate-/l*91.5%
associate-/l*99.8%
div-sub99.7%
Simplified99.7%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.0000000000000001e287Initial program 99.5%
sub-neg99.5%
distribute-lft-in99.6%
Applied egg-rr99.6%
Final simplification97.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* x y) (* z (- t a))))
(t_2 (/ t_1 (+ y (* z (- b y)))))
(t_3 (/ (- t a) (- b y)))
(t_4 (+ (/ x (- 1.0 z)) t_3)))
(if (<= t_2 -5e+233)
t_4
(if (<= t_2 -2e-231)
t_2
(if (<= t_2 0.0)
t_3
(if (<= t_2 1e+287) (/ t_1 (+ y (- (* z b) (* y z)))) t_4))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * y) + (z * (t - a));
double t_2 = t_1 / (y + (z * (b - y)));
double t_3 = (t - a) / (b - y);
double t_4 = (x / (1.0 - z)) + t_3;
double tmp;
if (t_2 <= -5e+233) {
tmp = t_4;
} else if (t_2 <= -2e-231) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t_3;
} else if (t_2 <= 1e+287) {
tmp = t_1 / (y + ((z * b) - (y * z)));
} else {
tmp = t_4;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = (x * y) + (z * (t - a))
t_2 = t_1 / (y + (z * (b - y)))
t_3 = (t - a) / (b - y)
t_4 = (x / (1.0d0 - z)) + t_3
if (t_2 <= (-5d+233)) then
tmp = t_4
else if (t_2 <= (-2d-231)) then
tmp = t_2
else if (t_2 <= 0.0d0) then
tmp = t_3
else if (t_2 <= 1d+287) then
tmp = t_1 / (y + ((z * b) - (y * z)))
else
tmp = t_4
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * y) + (z * (t - a));
double t_2 = t_1 / (y + (z * (b - y)));
double t_3 = (t - a) / (b - y);
double t_4 = (x / (1.0 - z)) + t_3;
double tmp;
if (t_2 <= -5e+233) {
tmp = t_4;
} else if (t_2 <= -2e-231) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t_3;
} else if (t_2 <= 1e+287) {
tmp = t_1 / (y + ((z * b) - (y * z)));
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * y) + (z * (t - a)) t_2 = t_1 / (y + (z * (b - y))) t_3 = (t - a) / (b - y) t_4 = (x / (1.0 - z)) + t_3 tmp = 0 if t_2 <= -5e+233: tmp = t_4 elif t_2 <= -2e-231: tmp = t_2 elif t_2 <= 0.0: tmp = t_3 elif t_2 <= 1e+287: tmp = t_1 / (y + ((z * b) - (y * z))) else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * y) + Float64(z * Float64(t - a))) t_2 = Float64(t_1 / Float64(y + Float64(z * Float64(b - y)))) t_3 = Float64(Float64(t - a) / Float64(b - y)) t_4 = Float64(Float64(x / Float64(1.0 - z)) + t_3) tmp = 0.0 if (t_2 <= -5e+233) tmp = t_4; elseif (t_2 <= -2e-231) tmp = t_2; elseif (t_2 <= 0.0) tmp = t_3; elseif (t_2 <= 1e+287) tmp = Float64(t_1 / Float64(y + Float64(Float64(z * b) - Float64(y * z)))); else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * y) + (z * (t - a)); t_2 = t_1 / (y + (z * (b - y))); t_3 = (t - a) / (b - y); t_4 = (x / (1.0 - z)) + t_3; tmp = 0.0; if (t_2 <= -5e+233) tmp = t_4; elseif (t_2 <= -2e-231) tmp = t_2; elseif (t_2 <= 0.0) tmp = t_3; elseif (t_2 <= 1e+287) tmp = t_1 / (y + ((z * b) - (y * z))); else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+233], t$95$4, If[LessEqual[t$95$2, -2e-231], t$95$2, If[LessEqual[t$95$2, 0.0], t$95$3, If[LessEqual[t$95$2, 1e+287], N[(t$95$1 / N[(y + N[(N[(z * b), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + z \cdot \left(t - a\right)\\
t_2 := \frac{t_1}{y + z \cdot \left(b - y\right)}\\
t_3 := \frac{t - a}{b - y}\\
t_4 := \frac{x}{1 - z} + t_3\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{+233}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t_2 \leq -2 \cdot 10^{-231}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_2 \leq 10^{+287}:\\
\;\;\;\;\frac{t_1}{y + \left(z \cdot b - y \cdot z\right)}\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5.00000000000000009e233 or 1.0000000000000001e287 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 25.0%
Taylor expanded in x around 0 25.0%
Taylor expanded in z around inf 62.5%
Taylor expanded in y around inf 93.6%
mul-1-neg93.6%
unsub-neg93.6%
Simplified93.6%
if -5.00000000000000009e233 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2e-231Initial program 99.7%
if -2e-231 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 25.0%
Taylor expanded in z around inf 80.3%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.0000000000000001e287Initial program 99.5%
sub-neg99.5%
distribute-lft-in99.6%
Applied egg-rr99.6%
Final simplification95.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
(t_2 (/ (- t a) (- b y)))
(t_3 (+ (/ x (- 1.0 z)) t_2)))
(if (<= t_1 -5e+233)
t_3
(if (<= t_1 -2e-231)
t_1
(if (<= t_1 0.0) t_2 (if (<= t_1 1e+287) t_1 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
double t_2 = (t - a) / (b - y);
double t_3 = (x / (1.0 - z)) + t_2;
double tmp;
if (t_1 <= -5e+233) {
tmp = t_3;
} else if (t_1 <= -2e-231) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = t_2;
} else if (t_1 <= 1e+287) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
t_2 = (t - a) / (b - y)
t_3 = (x / (1.0d0 - z)) + t_2
if (t_1 <= (-5d+233)) then
tmp = t_3
else if (t_1 <= (-2d-231)) then
tmp = t_1
else if (t_1 <= 0.0d0) then
tmp = t_2
else if (t_1 <= 1d+287) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
double t_2 = (t - a) / (b - y);
double t_3 = (x / (1.0 - z)) + t_2;
double tmp;
if (t_1 <= -5e+233) {
tmp = t_3;
} else if (t_1 <= -2e-231) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = t_2;
} else if (t_1 <= 1e+287) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y))) t_2 = (t - a) / (b - y) t_3 = (x / (1.0 - z)) + t_2 tmp = 0 if t_1 <= -5e+233: tmp = t_3 elif t_1 <= -2e-231: tmp = t_1 elif t_1 <= 0.0: tmp = t_2 elif t_1 <= 1e+287: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) t_2 = Float64(Float64(t - a) / Float64(b - y)) t_3 = Float64(Float64(x / Float64(1.0 - z)) + t_2) tmp = 0.0 if (t_1 <= -5e+233) tmp = t_3; elseif (t_1 <= -2e-231) tmp = t_1; elseif (t_1 <= 0.0) tmp = t_2; elseif (t_1 <= 1e+287) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); t_2 = (t - a) / (b - y); t_3 = (x / (1.0 - z)) + t_2; tmp = 0.0; if (t_1 <= -5e+233) tmp = t_3; elseif (t_1 <= -2e-231) tmp = t_1; elseif (t_1 <= 0.0) tmp = t_2; elseif (t_1 <= 1e+287) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+233], t$95$3, If[LessEqual[t$95$1, -2e-231], t$95$1, If[LessEqual[t$95$1, 0.0], t$95$2, If[LessEqual[t$95$1, 1e+287], t$95$1, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
t_2 := \frac{t - a}{b - y}\\
t_3 := \frac{x}{1 - z} + t_2\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+233}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_1 \leq -2 \cdot 10^{-231}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 \leq 10^{+287}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5.00000000000000009e233 or 1.0000000000000001e287 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 25.0%
Taylor expanded in x around 0 25.0%
Taylor expanded in z around inf 62.5%
Taylor expanded in y around inf 93.6%
mul-1-neg93.6%
unsub-neg93.6%
Simplified93.6%
if -5.00000000000000009e233 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2e-231 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.0000000000000001e287Initial program 99.6%
if -2e-231 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 25.0%
Taylor expanded in z around inf 80.3%
Final simplification95.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (+ x (/ z (/ t_1 t))))
(t_3 (+ (/ x (- 1.0 z)) (/ (- t a) (- b y))))
(t_4 (* z (- t a))))
(if (<= z -8600.0)
t_3
(if (<= z -5.8e-75)
(/ t_4 t_1)
(if (<= z -5e-222)
t_2
(if (<= z -2.25e-234)
(/ t_4 (+ y (* z b)))
(if (<= z 6.8e-244) x (if (<= z 0.09) t_2 t_3))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = x + (z / (t_1 / t));
double t_3 = (x / (1.0 - z)) + ((t - a) / (b - y));
double t_4 = z * (t - a);
double tmp;
if (z <= -8600.0) {
tmp = t_3;
} else if (z <= -5.8e-75) {
tmp = t_4 / t_1;
} else if (z <= -5e-222) {
tmp = t_2;
} else if (z <= -2.25e-234) {
tmp = t_4 / (y + (z * b));
} else if (z <= 6.8e-244) {
tmp = x;
} else if (z <= 0.09) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = y + (z * (b - y))
t_2 = x + (z / (t_1 / t))
t_3 = (x / (1.0d0 - z)) + ((t - a) / (b - y))
t_4 = z * (t - a)
if (z <= (-8600.0d0)) then
tmp = t_3
else if (z <= (-5.8d-75)) then
tmp = t_4 / t_1
else if (z <= (-5d-222)) then
tmp = t_2
else if (z <= (-2.25d-234)) then
tmp = t_4 / (y + (z * b))
else if (z <= 6.8d-244) then
tmp = x
else if (z <= 0.09d0) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = x + (z / (t_1 / t));
double t_3 = (x / (1.0 - z)) + ((t - a) / (b - y));
double t_4 = z * (t - a);
double tmp;
if (z <= -8600.0) {
tmp = t_3;
} else if (z <= -5.8e-75) {
tmp = t_4 / t_1;
} else if (z <= -5e-222) {
tmp = t_2;
} else if (z <= -2.25e-234) {
tmp = t_4 / (y + (z * b));
} else if (z <= 6.8e-244) {
tmp = x;
} else if (z <= 0.09) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = x + (z / (t_1 / t)) t_3 = (x / (1.0 - z)) + ((t - a) / (b - y)) t_4 = z * (t - a) tmp = 0 if z <= -8600.0: tmp = t_3 elif z <= -5.8e-75: tmp = t_4 / t_1 elif z <= -5e-222: tmp = t_2 elif z <= -2.25e-234: tmp = t_4 / (y + (z * b)) elif z <= 6.8e-244: tmp = x elif z <= 0.09: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(x + Float64(z / Float64(t_1 / t))) t_3 = Float64(Float64(x / Float64(1.0 - z)) + Float64(Float64(t - a) / Float64(b - y))) t_4 = Float64(z * Float64(t - a)) tmp = 0.0 if (z <= -8600.0) tmp = t_3; elseif (z <= -5.8e-75) tmp = Float64(t_4 / t_1); elseif (z <= -5e-222) tmp = t_2; elseif (z <= -2.25e-234) tmp = Float64(t_4 / Float64(y + Float64(z * b))); elseif (z <= 6.8e-244) tmp = x; elseif (z <= 0.09) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = x + (z / (t_1 / t)); t_3 = (x / (1.0 - z)) + ((t - a) / (b - y)); t_4 = z * (t - a); tmp = 0.0; if (z <= -8600.0) tmp = t_3; elseif (z <= -5.8e-75) tmp = t_4 / t_1; elseif (z <= -5e-222) tmp = t_2; elseif (z <= -2.25e-234) tmp = t_4 / (y + (z * b)); elseif (z <= 6.8e-244) tmp = x; elseif (z <= 0.09) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(z / N[(t$95$1 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8600.0], t$95$3, If[LessEqual[z, -5.8e-75], N[(t$95$4 / t$95$1), $MachinePrecision], If[LessEqual[z, -5e-222], t$95$2, If[LessEqual[z, -2.25e-234], N[(t$95$4 / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e-244], x, If[LessEqual[z, 0.09], t$95$2, t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := x + \frac{z}{\frac{t_1}{t}}\\
t_3 := \frac{x}{1 - z} + \frac{t - a}{b - y}\\
t_4 := z \cdot \left(t - a\right)\\
\mathbf{if}\;z \leq -8600:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq -5.8 \cdot 10^{-75}:\\
\;\;\;\;\frac{t_4}{t_1}\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-222}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -2.25 \cdot 10^{-234}:\\
\;\;\;\;\frac{t_4}{y + z \cdot b}\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-244}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 0.09:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if z < -8600 or 0.089999999999999997 < z Initial program 47.8%
Taylor expanded in x around 0 47.8%
Taylor expanded in z around inf 80.7%
Taylor expanded in y around inf 86.6%
mul-1-neg86.6%
unsub-neg86.6%
Simplified86.6%
if -8600 < z < -5.8000000000000003e-75Initial program 84.6%
Taylor expanded in x around 0 76.0%
if -5.8000000000000003e-75 < z < -5.00000000000000008e-222 or 6.80000000000000018e-244 < z < 0.089999999999999997Initial program 87.0%
Taylor expanded in x around 0 87.0%
expm1-log1p-u73.6%
expm1-udef51.5%
associate-/l*49.2%
+-commutative49.2%
fma-udef49.2%
Applied egg-rr49.2%
expm1-def71.3%
expm1-log1p84.3%
Simplified84.3%
Taylor expanded in t around inf 71.0%
Taylor expanded in z around 0 70.6%
if -5.00000000000000008e-222 < z < -2.25000000000000005e-234Initial program 100.0%
Taylor expanded in x around 0 84.4%
Taylor expanded in b around inf 84.4%
*-commutative84.4%
Simplified84.4%
if -2.25000000000000005e-234 < z < 6.80000000000000018e-244Initial program 88.8%
Taylor expanded in z around 0 86.8%
Final simplification81.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2 (/ t_1 (+ y (* z b))))
(t_3 (/ (- t a) (- b y))))
(if (<= z -46000.0)
t_3
(if (<= z -1.7e-80)
(/ t_1 (* y (- 1.0 z)))
(if (<= z -6.8e-107)
(/ (* x y) (+ y (* z (- b y))))
(if (<= z -3.8e-234)
t_2
(if (<= z 3.3e-173)
x
(if (<= z 1.8e-127)
t_2
(if (<= z 6e+18) (/ x (- 1.0 z)) t_3)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = t_1 / (y + (z * b));
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -46000.0) {
tmp = t_3;
} else if (z <= -1.7e-80) {
tmp = t_1 / (y * (1.0 - z));
} else if (z <= -6.8e-107) {
tmp = (x * y) / (y + (z * (b - y)));
} else if (z <= -3.8e-234) {
tmp = t_2;
} else if (z <= 3.3e-173) {
tmp = x;
} else if (z <= 1.8e-127) {
tmp = t_2;
} else if (z <= 6e+18) {
tmp = x / (1.0 - z);
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = z * (t - a)
t_2 = t_1 / (y + (z * b))
t_3 = (t - a) / (b - y)
if (z <= (-46000.0d0)) then
tmp = t_3
else if (z <= (-1.7d-80)) then
tmp = t_1 / (y * (1.0d0 - z))
else if (z <= (-6.8d-107)) then
tmp = (x * y) / (y + (z * (b - y)))
else if (z <= (-3.8d-234)) then
tmp = t_2
else if (z <= 3.3d-173) then
tmp = x
else if (z <= 1.8d-127) then
tmp = t_2
else if (z <= 6d+18) then
tmp = x / (1.0d0 - z)
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = t_1 / (y + (z * b));
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -46000.0) {
tmp = t_3;
} else if (z <= -1.7e-80) {
tmp = t_1 / (y * (1.0 - z));
} else if (z <= -6.8e-107) {
tmp = (x * y) / (y + (z * (b - y)));
} else if (z <= -3.8e-234) {
tmp = t_2;
} else if (z <= 3.3e-173) {
tmp = x;
} else if (z <= 1.8e-127) {
tmp = t_2;
} else if (z <= 6e+18) {
tmp = x / (1.0 - z);
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = t_1 / (y + (z * b)) t_3 = (t - a) / (b - y) tmp = 0 if z <= -46000.0: tmp = t_3 elif z <= -1.7e-80: tmp = t_1 / (y * (1.0 - z)) elif z <= -6.8e-107: tmp = (x * y) / (y + (z * (b - y))) elif z <= -3.8e-234: tmp = t_2 elif z <= 3.3e-173: tmp = x elif z <= 1.8e-127: tmp = t_2 elif z <= 6e+18: tmp = x / (1.0 - z) else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(t_1 / Float64(y + Float64(z * b))) t_3 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -46000.0) tmp = t_3; elseif (z <= -1.7e-80) tmp = Float64(t_1 / Float64(y * Float64(1.0 - z))); elseif (z <= -6.8e-107) tmp = Float64(Float64(x * y) / Float64(y + Float64(z * Float64(b - y)))); elseif (z <= -3.8e-234) tmp = t_2; elseif (z <= 3.3e-173) tmp = x; elseif (z <= 1.8e-127) tmp = t_2; elseif (z <= 6e+18) tmp = Float64(x / Float64(1.0 - z)); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = t_1 / (y + (z * b)); t_3 = (t - a) / (b - y); tmp = 0.0; if (z <= -46000.0) tmp = t_3; elseif (z <= -1.7e-80) tmp = t_1 / (y * (1.0 - z)); elseif (z <= -6.8e-107) tmp = (x * y) / (y + (z * (b - y))); elseif (z <= -3.8e-234) tmp = t_2; elseif (z <= 3.3e-173) tmp = x; elseif (z <= 1.8e-127) tmp = t_2; elseif (z <= 6e+18) tmp = x / (1.0 - z); else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -46000.0], t$95$3, If[LessEqual[z, -1.7e-80], N[(t$95$1 / N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.8e-107], N[(N[(x * y), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.8e-234], t$95$2, If[LessEqual[z, 3.3e-173], x, If[LessEqual[z, 1.8e-127], t$95$2, If[LessEqual[z, 6e+18], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := \frac{t_1}{y + z \cdot b}\\
t_3 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -46000:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-80}:\\
\;\;\;\;\frac{t_1}{y \cdot \left(1 - z\right)}\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{-107}:\\
\;\;\;\;\frac{x \cdot y}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-234}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{-173}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-127}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 6 \cdot 10^{+18}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if z < -46000 or 6e18 < z Initial program 46.6%
Taylor expanded in z around inf 80.0%
if -46000 < z < -1.7e-80Initial program 84.6%
Taylor expanded in x around 0 76.0%
Taylor expanded in y around inf 61.7%
mul-1-neg61.7%
unsub-neg61.7%
Simplified61.7%
if -1.7e-80 < z < -6.79999999999999989e-107Initial program 100.0%
Taylor expanded in x around inf 94.8%
*-commutative94.8%
Simplified94.8%
if -6.79999999999999989e-107 < z < -3.79999999999999984e-234 or 3.3000000000000003e-173 < z < 1.8e-127Initial program 94.5%
Taylor expanded in x around 0 65.7%
Taylor expanded in b around inf 65.7%
*-commutative65.7%
Simplified65.7%
if -3.79999999999999984e-234 < z < 3.3000000000000003e-173Initial program 87.6%
Taylor expanded in z around 0 81.8%
if 1.8e-127 < z < 6e18Initial program 78.1%
Taylor expanded in y around inf 52.3%
mul-1-neg52.3%
unsub-neg52.3%
Simplified52.3%
Final simplification74.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2 (/ t_1 (+ y (* z b))))
(t_3 (/ (- t a) (- b y))))
(if (<= z -6700.0)
t_3
(if (<= z -3.75e-78)
(* (/ 1.0 (- 1.0 z)) (/ t_1 y))
(if (<= z -4.2e-113)
(/ (* x y) (+ y (* z (- b y))))
(if (<= z -3.3e-234)
t_2
(if (<= z 2.35e-173)
x
(if (<= z 1.8e-127)
t_2
(if (<= z 40000000000000.0) (/ x (- 1.0 z)) t_3)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = t_1 / (y + (z * b));
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -6700.0) {
tmp = t_3;
} else if (z <= -3.75e-78) {
tmp = (1.0 / (1.0 - z)) * (t_1 / y);
} else if (z <= -4.2e-113) {
tmp = (x * y) / (y + (z * (b - y)));
} else if (z <= -3.3e-234) {
tmp = t_2;
} else if (z <= 2.35e-173) {
tmp = x;
} else if (z <= 1.8e-127) {
tmp = t_2;
} else if (z <= 40000000000000.0) {
tmp = x / (1.0 - z);
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = z * (t - a)
t_2 = t_1 / (y + (z * b))
t_3 = (t - a) / (b - y)
if (z <= (-6700.0d0)) then
tmp = t_3
else if (z <= (-3.75d-78)) then
tmp = (1.0d0 / (1.0d0 - z)) * (t_1 / y)
else if (z <= (-4.2d-113)) then
tmp = (x * y) / (y + (z * (b - y)))
else if (z <= (-3.3d-234)) then
tmp = t_2
else if (z <= 2.35d-173) then
tmp = x
else if (z <= 1.8d-127) then
tmp = t_2
else if (z <= 40000000000000.0d0) then
tmp = x / (1.0d0 - z)
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = t_1 / (y + (z * b));
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -6700.0) {
tmp = t_3;
} else if (z <= -3.75e-78) {
tmp = (1.0 / (1.0 - z)) * (t_1 / y);
} else if (z <= -4.2e-113) {
tmp = (x * y) / (y + (z * (b - y)));
} else if (z <= -3.3e-234) {
tmp = t_2;
} else if (z <= 2.35e-173) {
tmp = x;
} else if (z <= 1.8e-127) {
tmp = t_2;
} else if (z <= 40000000000000.0) {
tmp = x / (1.0 - z);
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = t_1 / (y + (z * b)) t_3 = (t - a) / (b - y) tmp = 0 if z <= -6700.0: tmp = t_3 elif z <= -3.75e-78: tmp = (1.0 / (1.0 - z)) * (t_1 / y) elif z <= -4.2e-113: tmp = (x * y) / (y + (z * (b - y))) elif z <= -3.3e-234: tmp = t_2 elif z <= 2.35e-173: tmp = x elif z <= 1.8e-127: tmp = t_2 elif z <= 40000000000000.0: tmp = x / (1.0 - z) else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(t_1 / Float64(y + Float64(z * b))) t_3 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -6700.0) tmp = t_3; elseif (z <= -3.75e-78) tmp = Float64(Float64(1.0 / Float64(1.0 - z)) * Float64(t_1 / y)); elseif (z <= -4.2e-113) tmp = Float64(Float64(x * y) / Float64(y + Float64(z * Float64(b - y)))); elseif (z <= -3.3e-234) tmp = t_2; elseif (z <= 2.35e-173) tmp = x; elseif (z <= 1.8e-127) tmp = t_2; elseif (z <= 40000000000000.0) tmp = Float64(x / Float64(1.0 - z)); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = t_1 / (y + (z * b)); t_3 = (t - a) / (b - y); tmp = 0.0; if (z <= -6700.0) tmp = t_3; elseif (z <= -3.75e-78) tmp = (1.0 / (1.0 - z)) * (t_1 / y); elseif (z <= -4.2e-113) tmp = (x * y) / (y + (z * (b - y))); elseif (z <= -3.3e-234) tmp = t_2; elseif (z <= 2.35e-173) tmp = x; elseif (z <= 1.8e-127) tmp = t_2; elseif (z <= 40000000000000.0) tmp = x / (1.0 - z); else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6700.0], t$95$3, If[LessEqual[z, -3.75e-78], N[(N[(1.0 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.2e-113], N[(N[(x * y), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.3e-234], t$95$2, If[LessEqual[z, 2.35e-173], x, If[LessEqual[z, 1.8e-127], t$95$2, If[LessEqual[z, 40000000000000.0], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := \frac{t_1}{y + z \cdot b}\\
t_3 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -6700:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq -3.75 \cdot 10^{-78}:\\
\;\;\;\;\frac{1}{1 - z} \cdot \frac{t_1}{y}\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{-113}:\\
\;\;\;\;\frac{x \cdot y}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq -3.3 \cdot 10^{-234}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 2.35 \cdot 10^{-173}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-127}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 40000000000000:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if z < -6700 or 4e13 < z Initial program 46.6%
Taylor expanded in z around inf 80.0%
if -6700 < z < -3.75000000000000021e-78Initial program 84.6%
Taylor expanded in x around 0 76.0%
Taylor expanded in y around inf 61.7%
mul-1-neg61.7%
unsub-neg61.7%
Simplified61.7%
associate-/r*61.8%
div-inv61.7%
*-commutative61.7%
Applied egg-rr61.7%
if -3.75000000000000021e-78 < z < -4.2e-113Initial program 100.0%
Taylor expanded in x around inf 94.8%
*-commutative94.8%
Simplified94.8%
if -4.2e-113 < z < -3.30000000000000014e-234 or 2.35e-173 < z < 1.8e-127Initial program 94.5%
Taylor expanded in x around 0 65.7%
Taylor expanded in b around inf 65.7%
*-commutative65.7%
Simplified65.7%
if -3.30000000000000014e-234 < z < 2.35e-173Initial program 87.6%
Taylor expanded in z around 0 81.8%
if 1.8e-127 < z < 4e13Initial program 78.1%
Taylor expanded in y around inf 52.3%
mul-1-neg52.3%
unsub-neg52.3%
Simplified52.3%
Final simplification74.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a))) (t_2 (/ t_1 y)) (t_3 (/ (- t a) (- b y))))
(if (<= z -12200.0)
t_3
(if (<= z -1.12e-76)
(/ t_1 (* y (- 1.0 z)))
(if (<= z -5e-222)
(/ (* x y) (+ y (* z (- b y))))
(if (<= z -3.8e-234)
t_2
(if (<= z 4e-166)
x
(if (<= z 2.3e-127)
t_2
(if (<= z 305000000.0) (/ x (- 1.0 z)) t_3)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = t_1 / y;
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -12200.0) {
tmp = t_3;
} else if (z <= -1.12e-76) {
tmp = t_1 / (y * (1.0 - z));
} else if (z <= -5e-222) {
tmp = (x * y) / (y + (z * (b - y)));
} else if (z <= -3.8e-234) {
tmp = t_2;
} else if (z <= 4e-166) {
tmp = x;
} else if (z <= 2.3e-127) {
tmp = t_2;
} else if (z <= 305000000.0) {
tmp = x / (1.0 - z);
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = z * (t - a)
t_2 = t_1 / y
t_3 = (t - a) / (b - y)
if (z <= (-12200.0d0)) then
tmp = t_3
else if (z <= (-1.12d-76)) then
tmp = t_1 / (y * (1.0d0 - z))
else if (z <= (-5d-222)) then
tmp = (x * y) / (y + (z * (b - y)))
else if (z <= (-3.8d-234)) then
tmp = t_2
else if (z <= 4d-166) then
tmp = x
else if (z <= 2.3d-127) then
tmp = t_2
else if (z <= 305000000.0d0) then
tmp = x / (1.0d0 - z)
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = t_1 / y;
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -12200.0) {
tmp = t_3;
} else if (z <= -1.12e-76) {
tmp = t_1 / (y * (1.0 - z));
} else if (z <= -5e-222) {
tmp = (x * y) / (y + (z * (b - y)));
} else if (z <= -3.8e-234) {
tmp = t_2;
} else if (z <= 4e-166) {
tmp = x;
} else if (z <= 2.3e-127) {
tmp = t_2;
} else if (z <= 305000000.0) {
tmp = x / (1.0 - z);
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = t_1 / y t_3 = (t - a) / (b - y) tmp = 0 if z <= -12200.0: tmp = t_3 elif z <= -1.12e-76: tmp = t_1 / (y * (1.0 - z)) elif z <= -5e-222: tmp = (x * y) / (y + (z * (b - y))) elif z <= -3.8e-234: tmp = t_2 elif z <= 4e-166: tmp = x elif z <= 2.3e-127: tmp = t_2 elif z <= 305000000.0: tmp = x / (1.0 - z) else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(t_1 / y) t_3 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -12200.0) tmp = t_3; elseif (z <= -1.12e-76) tmp = Float64(t_1 / Float64(y * Float64(1.0 - z))); elseif (z <= -5e-222) tmp = Float64(Float64(x * y) / Float64(y + Float64(z * Float64(b - y)))); elseif (z <= -3.8e-234) tmp = t_2; elseif (z <= 4e-166) tmp = x; elseif (z <= 2.3e-127) tmp = t_2; elseif (z <= 305000000.0) tmp = Float64(x / Float64(1.0 - z)); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = t_1 / y; t_3 = (t - a) / (b - y); tmp = 0.0; if (z <= -12200.0) tmp = t_3; elseif (z <= -1.12e-76) tmp = t_1 / (y * (1.0 - z)); elseif (z <= -5e-222) tmp = (x * y) / (y + (z * (b - y))); elseif (z <= -3.8e-234) tmp = t_2; elseif (z <= 4e-166) tmp = x; elseif (z <= 2.3e-127) tmp = t_2; elseif (z <= 305000000.0) tmp = x / (1.0 - z); else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / y), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -12200.0], t$95$3, If[LessEqual[z, -1.12e-76], N[(t$95$1 / N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5e-222], N[(N[(x * y), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.8e-234], t$95$2, If[LessEqual[z, 4e-166], x, If[LessEqual[z, 2.3e-127], t$95$2, If[LessEqual[z, 305000000.0], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := \frac{t_1}{y}\\
t_3 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -12200:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq -1.12 \cdot 10^{-76}:\\
\;\;\;\;\frac{t_1}{y \cdot \left(1 - z\right)}\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-222}:\\
\;\;\;\;\frac{x \cdot y}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-234}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-166}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{-127}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 305000000:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if z < -12200 or 3.05e8 < z Initial program 46.6%
Taylor expanded in z around inf 80.0%
if -12200 < z < -1.12e-76Initial program 84.6%
Taylor expanded in x around 0 76.0%
Taylor expanded in y around inf 61.7%
mul-1-neg61.7%
unsub-neg61.7%
Simplified61.7%
if -1.12e-76 < z < -5.00000000000000008e-222Initial program 92.9%
Taylor expanded in x around inf 51.4%
*-commutative51.4%
Simplified51.4%
if -5.00000000000000008e-222 < z < -3.79999999999999984e-234 or 4.00000000000000016e-166 < z < 2.30000000000000019e-127Initial program 100.0%
Taylor expanded in x around 0 89.4%
Taylor expanded in z around 0 71.5%
if -3.79999999999999984e-234 < z < 4.00000000000000016e-166Initial program 88.0%
Taylor expanded in z around 0 79.8%
if 2.30000000000000019e-127 < z < 3.05e8Initial program 78.1%
Taylor expanded in y around inf 52.3%
mul-1-neg52.3%
unsub-neg52.3%
Simplified52.3%
Final simplification72.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y)))) (t_2 (/ (- t a) (- b y))))
(if (<= z -9500.0)
t_2
(if (<= z -4.5e-80)
(* (/ 1.0 (- 1.0 z)) (/ (* z (- t a)) y))
(if (<= z -1.5e-105)
(/ (* x y) t_1)
(if (<= z 0.8) (+ x (/ z (/ t_1 t))) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -9500.0) {
tmp = t_2;
} else if (z <= -4.5e-80) {
tmp = (1.0 / (1.0 - z)) * ((z * (t - a)) / y);
} else if (z <= -1.5e-105) {
tmp = (x * y) / t_1;
} else if (z <= 0.8) {
tmp = x + (z / (t_1 / t));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y + (z * (b - y))
t_2 = (t - a) / (b - y)
if (z <= (-9500.0d0)) then
tmp = t_2
else if (z <= (-4.5d-80)) then
tmp = (1.0d0 / (1.0d0 - z)) * ((z * (t - a)) / y)
else if (z <= (-1.5d-105)) then
tmp = (x * y) / t_1
else if (z <= 0.8d0) then
tmp = x + (z / (t_1 / t))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -9500.0) {
tmp = t_2;
} else if (z <= -4.5e-80) {
tmp = (1.0 / (1.0 - z)) * ((z * (t - a)) / y);
} else if (z <= -1.5e-105) {
tmp = (x * y) / t_1;
} else if (z <= 0.8) {
tmp = x + (z / (t_1 / t));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = (t - a) / (b - y) tmp = 0 if z <= -9500.0: tmp = t_2 elif z <= -4.5e-80: tmp = (1.0 / (1.0 - z)) * ((z * (t - a)) / y) elif z <= -1.5e-105: tmp = (x * y) / t_1 elif z <= 0.8: tmp = x + (z / (t_1 / t)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -9500.0) tmp = t_2; elseif (z <= -4.5e-80) tmp = Float64(Float64(1.0 / Float64(1.0 - z)) * Float64(Float64(z * Float64(t - a)) / y)); elseif (z <= -1.5e-105) tmp = Float64(Float64(x * y) / t_1); elseif (z <= 0.8) tmp = Float64(x + Float64(z / Float64(t_1 / t))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -9500.0) tmp = t_2; elseif (z <= -4.5e-80) tmp = (1.0 / (1.0 - z)) * ((z * (t - a)) / y); elseif (z <= -1.5e-105) tmp = (x * y) / t_1; elseif (z <= 0.8) tmp = x + (z / (t_1 / t)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9500.0], t$95$2, If[LessEqual[z, -4.5e-80], N[(N[(1.0 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] * N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.5e-105], N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[z, 0.8], N[(x + N[(z / N[(t$95$1 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -9500:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{-80}:\\
\;\;\;\;\frac{1}{1 - z} \cdot \frac{z \cdot \left(t - a\right)}{y}\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{-105}:\\
\;\;\;\;\frac{x \cdot y}{t_1}\\
\mathbf{elif}\;z \leq 0.8:\\
\;\;\;\;x + \frac{z}{\frac{t_1}{t}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -9500 or 0.80000000000000004 < z Initial program 47.8%
Taylor expanded in z around inf 77.9%
if -9500 < z < -4.5000000000000003e-80Initial program 84.6%
Taylor expanded in x around 0 76.0%
Taylor expanded in y around inf 61.7%
mul-1-neg61.7%
unsub-neg61.7%
Simplified61.7%
associate-/r*61.8%
div-inv61.7%
*-commutative61.7%
Applied egg-rr61.7%
if -4.5000000000000003e-80 < z < -1.5e-105Initial program 100.0%
Taylor expanded in x around inf 94.8%
*-commutative94.8%
Simplified94.8%
if -1.5e-105 < z < 0.80000000000000004Initial program 87.6%
Taylor expanded in x around 0 87.6%
expm1-log1p-u75.7%
expm1-udef56.6%
associate-/l*52.1%
+-commutative52.1%
fma-udef52.1%
Applied egg-rr52.1%
expm1-def71.2%
expm1-log1p81.8%
Simplified81.8%
Taylor expanded in t around inf 67.0%
Taylor expanded in z around 0 71.5%
Final simplification75.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (+ (/ x (- 1.0 z)) (/ (- t a) (- b y)))))
(if (<= z -7000.0)
t_2
(if (<= z -1.15e-75)
(* (/ 1.0 (- 1.0 z)) (/ (* z (- t a)) y))
(if (<= z -2.4e-102)
(/ (* x y) t_1)
(if (<= z 0.0116) (+ x (/ z (/ t_1 t))) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = (x / (1.0 - z)) + ((t - a) / (b - y));
double tmp;
if (z <= -7000.0) {
tmp = t_2;
} else if (z <= -1.15e-75) {
tmp = (1.0 / (1.0 - z)) * ((z * (t - a)) / y);
} else if (z <= -2.4e-102) {
tmp = (x * y) / t_1;
} else if (z <= 0.0116) {
tmp = x + (z / (t_1 / t));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y + (z * (b - y))
t_2 = (x / (1.0d0 - z)) + ((t - a) / (b - y))
if (z <= (-7000.0d0)) then
tmp = t_2
else if (z <= (-1.15d-75)) then
tmp = (1.0d0 / (1.0d0 - z)) * ((z * (t - a)) / y)
else if (z <= (-2.4d-102)) then
tmp = (x * y) / t_1
else if (z <= 0.0116d0) then
tmp = x + (z / (t_1 / t))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = (x / (1.0 - z)) + ((t - a) / (b - y));
double tmp;
if (z <= -7000.0) {
tmp = t_2;
} else if (z <= -1.15e-75) {
tmp = (1.0 / (1.0 - z)) * ((z * (t - a)) / y);
} else if (z <= -2.4e-102) {
tmp = (x * y) / t_1;
} else if (z <= 0.0116) {
tmp = x + (z / (t_1 / t));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = (x / (1.0 - z)) + ((t - a) / (b - y)) tmp = 0 if z <= -7000.0: tmp = t_2 elif z <= -1.15e-75: tmp = (1.0 / (1.0 - z)) * ((z * (t - a)) / y) elif z <= -2.4e-102: tmp = (x * y) / t_1 elif z <= 0.0116: tmp = x + (z / (t_1 / t)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(x / Float64(1.0 - z)) + Float64(Float64(t - a) / Float64(b - y))) tmp = 0.0 if (z <= -7000.0) tmp = t_2; elseif (z <= -1.15e-75) tmp = Float64(Float64(1.0 / Float64(1.0 - z)) * Float64(Float64(z * Float64(t - a)) / y)); elseif (z <= -2.4e-102) tmp = Float64(Float64(x * y) / t_1); elseif (z <= 0.0116) tmp = Float64(x + Float64(z / Float64(t_1 / t))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = (x / (1.0 - z)) + ((t - a) / (b - y)); tmp = 0.0; if (z <= -7000.0) tmp = t_2; elseif (z <= -1.15e-75) tmp = (1.0 / (1.0 - z)) * ((z * (t - a)) / y); elseif (z <= -2.4e-102) tmp = (x * y) / t_1; elseif (z <= 0.0116) tmp = x + (z / (t_1 / t)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7000.0], t$95$2, If[LessEqual[z, -1.15e-75], N[(N[(1.0 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] * N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.4e-102], N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[z, 0.0116], N[(x + N[(z / N[(t$95$1 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{x}{1 - z} + \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -7000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{-75}:\\
\;\;\;\;\frac{1}{1 - z} \cdot \frac{z \cdot \left(t - a\right)}{y}\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{-102}:\\
\;\;\;\;\frac{x \cdot y}{t_1}\\
\mathbf{elif}\;z \leq 0.0116:\\
\;\;\;\;x + \frac{z}{\frac{t_1}{t}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -7e3 or 0.0116 < z Initial program 47.8%
Taylor expanded in x around 0 47.8%
Taylor expanded in z around inf 80.7%
Taylor expanded in y around inf 86.6%
mul-1-neg86.6%
unsub-neg86.6%
Simplified86.6%
if -7e3 < z < -1.15e-75Initial program 84.6%
Taylor expanded in x around 0 76.0%
Taylor expanded in y around inf 61.7%
mul-1-neg61.7%
unsub-neg61.7%
Simplified61.7%
associate-/r*61.8%
div-inv61.7%
*-commutative61.7%
Applied egg-rr61.7%
if -1.15e-75 < z < -2.4e-102Initial program 100.0%
Taylor expanded in x around inf 93.5%
*-commutative93.5%
Simplified93.5%
if -2.4e-102 < z < 0.0116Initial program 87.7%
Taylor expanded in x around 0 87.7%
expm1-log1p-u75.0%
expm1-udef56.0%
associate-/l*51.5%
+-commutative51.5%
fma-udef51.5%
Applied egg-rr51.5%
expm1-def70.5%
expm1-log1p82.0%
Simplified82.0%
Taylor expanded in t around inf 67.3%
Taylor expanded in z around 0 71.8%
Final simplification79.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -520000.0) (not (<= z 12.8))) (+ (/ x (- 1.0 z)) (/ (- t a) (- b y))) (+ x (/ (* z (- t a)) (+ y (* z (- b y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -520000.0) || !(z <= 12.8)) {
tmp = (x / (1.0 - z)) + ((t - a) / (b - y));
} else {
tmp = x + ((z * (t - a)) / (y + (z * (b - y))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-520000.0d0)) .or. (.not. (z <= 12.8d0))) then
tmp = (x / (1.0d0 - z)) + ((t - a) / (b - y))
else
tmp = x + ((z * (t - a)) / (y + (z * (b - y))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -520000.0) || !(z <= 12.8)) {
tmp = (x / (1.0 - z)) + ((t - a) / (b - y));
} else {
tmp = x + ((z * (t - a)) / (y + (z * (b - y))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -520000.0) or not (z <= 12.8): tmp = (x / (1.0 - z)) + ((t - a) / (b - y)) else: tmp = x + ((z * (t - a)) / (y + (z * (b - y)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -520000.0) || !(z <= 12.8)) tmp = Float64(Float64(x / Float64(1.0 - z)) + Float64(Float64(t - a) / Float64(b - y))); else tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / Float64(y + Float64(z * Float64(b - y))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -520000.0) || ~((z <= 12.8))) tmp = (x / (1.0 - z)) + ((t - a) / (b - y)); else tmp = x + ((z * (t - a)) / (y + (z * (b - y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -520000.0], N[Not[LessEqual[z, 12.8]], $MachinePrecision]], N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -520000 \lor \neg \left(z \leq 12.8\right):\\
\;\;\;\;\frac{x}{1 - z} + \frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -5.2e5 or 12.800000000000001 < z Initial program 47.5%
Taylor expanded in x around 0 47.4%
Taylor expanded in z around inf 81.2%
Taylor expanded in y around inf 87.1%
mul-1-neg87.1%
unsub-neg87.1%
Simplified87.1%
if -5.2e5 < z < 12.800000000000001Initial program 87.9%
Taylor expanded in x around 0 87.9%
Taylor expanded in z around 0 89.2%
Final simplification88.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -20500.0)
t_1
(if (<= z -7e-83)
(* (/ z y) (/ (- t a) (- 1.0 z)))
(if (<= z 4e-166)
x
(if (<= z 1.9e-127)
(/ (* z (- t a)) y)
(if (<= z 270000000.0) (/ x (- 1.0 z)) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -20500.0) {
tmp = t_1;
} else if (z <= -7e-83) {
tmp = (z / y) * ((t - a) / (1.0 - z));
} else if (z <= 4e-166) {
tmp = x;
} else if (z <= 1.9e-127) {
tmp = (z * (t - a)) / y;
} else if (z <= 270000000.0) {
tmp = x / (1.0 - z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-20500.0d0)) then
tmp = t_1
else if (z <= (-7d-83)) then
tmp = (z / y) * ((t - a) / (1.0d0 - z))
else if (z <= 4d-166) then
tmp = x
else if (z <= 1.9d-127) then
tmp = (z * (t - a)) / y
else if (z <= 270000000.0d0) then
tmp = x / (1.0d0 - z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -20500.0) {
tmp = t_1;
} else if (z <= -7e-83) {
tmp = (z / y) * ((t - a) / (1.0 - z));
} else if (z <= 4e-166) {
tmp = x;
} else if (z <= 1.9e-127) {
tmp = (z * (t - a)) / y;
} else if (z <= 270000000.0) {
tmp = x / (1.0 - z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -20500.0: tmp = t_1 elif z <= -7e-83: tmp = (z / y) * ((t - a) / (1.0 - z)) elif z <= 4e-166: tmp = x elif z <= 1.9e-127: tmp = (z * (t - a)) / y elif z <= 270000000.0: tmp = x / (1.0 - z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -20500.0) tmp = t_1; elseif (z <= -7e-83) tmp = Float64(Float64(z / y) * Float64(Float64(t - a) / Float64(1.0 - z))); elseif (z <= 4e-166) tmp = x; elseif (z <= 1.9e-127) tmp = Float64(Float64(z * Float64(t - a)) / y); elseif (z <= 270000000.0) tmp = Float64(x / Float64(1.0 - z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -20500.0) tmp = t_1; elseif (z <= -7e-83) tmp = (z / y) * ((t - a) / (1.0 - z)); elseif (z <= 4e-166) tmp = x; elseif (z <= 1.9e-127) tmp = (z * (t - a)) / y; elseif (z <= 270000000.0) tmp = x / (1.0 - z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -20500.0], t$95$1, If[LessEqual[z, -7e-83], N[(N[(z / y), $MachinePrecision] * N[(N[(t - a), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e-166], x, If[LessEqual[z, 1.9e-127], N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 270000000.0], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -20500:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-83}:\\
\;\;\;\;\frac{z}{y} \cdot \frac{t - a}{1 - z}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-166}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-127}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right)}{y}\\
\mathbf{elif}\;z \leq 270000000:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -20500 or 2.7e8 < z Initial program 46.6%
Taylor expanded in z around inf 80.0%
if -20500 < z < -7.00000000000000061e-83Initial program 84.6%
Taylor expanded in x around 0 76.0%
Taylor expanded in y around inf 61.7%
times-frac60.9%
mul-1-neg60.9%
unsub-neg60.9%
Simplified60.9%
if -7.00000000000000061e-83 < z < 4.00000000000000016e-166Initial program 90.8%
Taylor expanded in z around 0 62.2%
if 4.00000000000000016e-166 < z < 1.90000000000000001e-127Initial program 100.0%
Taylor expanded in x around 0 94.4%
Taylor expanded in z around 0 78.6%
if 1.90000000000000001e-127 < z < 2.7e8Initial program 78.1%
Taylor expanded in y around inf 52.3%
mul-1-neg52.3%
unsub-neg52.3%
Simplified52.3%
Final simplification70.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -2.65e-77)
t_1
(if (<= z 4e-166)
x
(if (<= z 1.75e-127)
(/ (* z (- t a)) y)
(if (<= z 270000000.0) (/ x (- 1.0 z)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2.65e-77) {
tmp = t_1;
} else if (z <= 4e-166) {
tmp = x;
} else if (z <= 1.75e-127) {
tmp = (z * (t - a)) / y;
} else if (z <= 270000000.0) {
tmp = x / (1.0 - z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-2.65d-77)) then
tmp = t_1
else if (z <= 4d-166) then
tmp = x
else if (z <= 1.75d-127) then
tmp = (z * (t - a)) / y
else if (z <= 270000000.0d0) then
tmp = x / (1.0d0 - z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2.65e-77) {
tmp = t_1;
} else if (z <= 4e-166) {
tmp = x;
} else if (z <= 1.75e-127) {
tmp = (z * (t - a)) / y;
} else if (z <= 270000000.0) {
tmp = x / (1.0 - z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -2.65e-77: tmp = t_1 elif z <= 4e-166: tmp = x elif z <= 1.75e-127: tmp = (z * (t - a)) / y elif z <= 270000000.0: tmp = x / (1.0 - z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2.65e-77) tmp = t_1; elseif (z <= 4e-166) tmp = x; elseif (z <= 1.75e-127) tmp = Float64(Float64(z * Float64(t - a)) / y); elseif (z <= 270000000.0) tmp = Float64(x / Float64(1.0 - z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -2.65e-77) tmp = t_1; elseif (z <= 4e-166) tmp = x; elseif (z <= 1.75e-127) tmp = (z * (t - a)) / y; elseif (z <= 270000000.0) tmp = x / (1.0 - z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.65e-77], t$95$1, If[LessEqual[z, 4e-166], x, If[LessEqual[z, 1.75e-127], N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 270000000.0], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.65 \cdot 10^{-77}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-166}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{-127}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right)}{y}\\
\mathbf{elif}\;z \leq 270000000:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.65000000000000007e-77 or 2.7e8 < z Initial program 50.0%
Taylor expanded in z around inf 75.2%
if -2.65000000000000007e-77 < z < 4.00000000000000016e-166Initial program 90.8%
Taylor expanded in z around 0 62.2%
if 4.00000000000000016e-166 < z < 1.74999999999999995e-127Initial program 100.0%
Taylor expanded in x around 0 94.4%
Taylor expanded in z around 0 78.6%
if 1.74999999999999995e-127 < z < 2.7e8Initial program 78.1%
Taylor expanded in y around inf 52.3%
mul-1-neg52.3%
unsub-neg52.3%
Simplified52.3%
Final simplification68.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -2.95e-30)
t_1
(if (<= y 2.9e-47)
(/ (- t a) b)
(if (or (<= y 6.2e+193) (not (<= y 2.3e+223))) t_1 (/ t (- b y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -2.95e-30) {
tmp = t_1;
} else if (y <= 2.9e-47) {
tmp = (t - a) / b;
} else if ((y <= 6.2e+193) || !(y <= 2.3e+223)) {
tmp = t_1;
} else {
tmp = t / (b - y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-2.95d-30)) then
tmp = t_1
else if (y <= 2.9d-47) then
tmp = (t - a) / b
else if ((y <= 6.2d+193) .or. (.not. (y <= 2.3d+223))) then
tmp = t_1
else
tmp = t / (b - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -2.95e-30) {
tmp = t_1;
} else if (y <= 2.9e-47) {
tmp = (t - a) / b;
} else if ((y <= 6.2e+193) || !(y <= 2.3e+223)) {
tmp = t_1;
} else {
tmp = t / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -2.95e-30: tmp = t_1 elif y <= 2.9e-47: tmp = (t - a) / b elif (y <= 6.2e+193) or not (y <= 2.3e+223): tmp = t_1 else: tmp = t / (b - y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -2.95e-30) tmp = t_1; elseif (y <= 2.9e-47) tmp = Float64(Float64(t - a) / b); elseif ((y <= 6.2e+193) || !(y <= 2.3e+223)) tmp = t_1; else tmp = Float64(t / Float64(b - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -2.95e-30) tmp = t_1; elseif (y <= 2.9e-47) tmp = (t - a) / b; elseif ((y <= 6.2e+193) || ~((y <= 2.3e+223))) tmp = t_1; else tmp = t / (b - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.95e-30], t$95$1, If[LessEqual[y, 2.9e-47], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[Or[LessEqual[y, 6.2e+193], N[Not[LessEqual[y, 2.3e+223]], $MachinePrecision]], t$95$1, N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -2.95 \cdot 10^{-30}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-47}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{+193} \lor \neg \left(y \leq 2.3 \cdot 10^{+223}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b - y}\\
\end{array}
\end{array}
if y < -2.9499999999999999e-30 or 2.9e-47 < y < 6.19999999999999972e193 or 2.30000000000000004e223 < y Initial program 56.6%
Taylor expanded in y around inf 47.5%
mul-1-neg47.5%
unsub-neg47.5%
Simplified47.5%
if -2.9499999999999999e-30 < y < 2.9e-47Initial program 83.2%
Taylor expanded in y around 0 58.9%
if 6.19999999999999972e193 < y < 2.30000000000000004e223Initial program 51.8%
Taylor expanded in t around inf 50.6%
associate-/l*39.8%
+-commutative39.8%
fma-def39.6%
Simplified39.6%
Taylor expanded in z around inf 67.2%
Final simplification52.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t) y)))
(if (<= z -1.56e+236)
t_1
(if (<= z -13000000.0) (/ t b) (if (<= z 0.082) x t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -t / y;
double tmp;
if (z <= -1.56e+236) {
tmp = t_1;
} else if (z <= -13000000.0) {
tmp = t / b;
} else if (z <= 0.082) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = -t / y
if (z <= (-1.56d+236)) then
tmp = t_1
else if (z <= (-13000000.0d0)) then
tmp = t / b
else if (z <= 0.082d0) then
tmp = x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -t / y;
double tmp;
if (z <= -1.56e+236) {
tmp = t_1;
} else if (z <= -13000000.0) {
tmp = t / b;
} else if (z <= 0.082) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -t / y tmp = 0 if z <= -1.56e+236: tmp = t_1 elif z <= -13000000.0: tmp = t / b elif z <= 0.082: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-t) / y) tmp = 0.0 if (z <= -1.56e+236) tmp = t_1; elseif (z <= -13000000.0) tmp = Float64(t / b); elseif (z <= 0.082) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -t / y; tmp = 0.0; if (z <= -1.56e+236) tmp = t_1; elseif (z <= -13000000.0) tmp = t / b; elseif (z <= 0.082) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-t) / y), $MachinePrecision]}, If[LessEqual[z, -1.56e+236], t$95$1, If[LessEqual[z, -13000000.0], N[(t / b), $MachinePrecision], If[LessEqual[z, 0.082], x, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-t}{y}\\
\mathbf{if}\;z \leq -1.56 \cdot 10^{+236}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -13000000:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 0.082:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.5600000000000001e236 or 0.0820000000000000034 < z Initial program 37.6%
Taylor expanded in t around inf 18.7%
associate-/l*23.6%
+-commutative23.6%
fma-def23.6%
Simplified23.6%
Taylor expanded in b around 0 17.4%
mul-1-neg17.4%
*-rgt-identity17.4%
distribute-rgt-neg-in17.4%
mul-1-neg17.4%
distribute-lft-in17.4%
times-frac27.0%
mul-1-neg27.0%
unsub-neg27.0%
Simplified27.0%
Taylor expanded in z around inf 27.0%
associate-*r/27.0%
neg-mul-127.0%
Simplified27.0%
if -1.5600000000000001e236 < z < -1.3e7Initial program 64.2%
Taylor expanded in t around inf 42.9%
associate-/l*43.2%
+-commutative43.2%
fma-def43.2%
Simplified43.2%
Taylor expanded in b around inf 35.2%
if -1.3e7 < z < 0.0820000000000000034Initial program 87.0%
Taylor expanded in z around 0 51.3%
Final simplification40.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -7e-33) (not (<= z 6.2e-6))) (/ t (- b y)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -7e-33) || !(z <= 6.2e-6)) {
tmp = t / (b - y);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-7d-33)) .or. (.not. (z <= 6.2d-6))) then
tmp = t / (b - y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -7e-33) || !(z <= 6.2e-6)) {
tmp = t / (b - y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -7e-33) or not (z <= 6.2e-6): tmp = t / (b - y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -7e-33) || !(z <= 6.2e-6)) tmp = Float64(t / Float64(b - y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -7e-33) || ~((z <= 6.2e-6))) tmp = t / (b - y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -7e-33], N[Not[LessEqual[z, 6.2e-6]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{-33} \lor \neg \left(z \leq 6.2 \cdot 10^{-6}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -6.9999999999999997e-33 or 6.1999999999999999e-6 < z Initial program 50.0%
Taylor expanded in t around inf 28.5%
associate-/l*31.4%
+-commutative31.4%
fma-def31.4%
Simplified31.4%
Taylor expanded in z around inf 40.2%
if -6.9999999999999997e-33 < z < 6.1999999999999999e-6Initial program 87.2%
Taylor expanded in z around 0 54.2%
Final simplification46.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2.8e+129) (not (<= t 3.5e+138))) (/ t (- b y)) (/ x (- 1.0 z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.8e+129) || !(t <= 3.5e+138)) {
tmp = t / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-2.8d+129)) .or. (.not. (t <= 3.5d+138))) then
tmp = t / (b - y)
else
tmp = x / (1.0d0 - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.8e+129) || !(t <= 3.5e+138)) {
tmp = t / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -2.8e+129) or not (t <= 3.5e+138): tmp = t / (b - y) else: tmp = x / (1.0 - z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2.8e+129) || !(t <= 3.5e+138)) tmp = Float64(t / Float64(b - y)); else tmp = Float64(x / Float64(1.0 - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -2.8e+129) || ~((t <= 3.5e+138))) tmp = t / (b - y); else tmp = x / (1.0 - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2.8e+129], N[Not[LessEqual[t, 3.5e+138]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{+129} \lor \neg \left(t \leq 3.5 \cdot 10^{+138}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if t < -2.79999999999999975e129 or 3.4999999999999998e138 < t Initial program 70.7%
Taylor expanded in t around inf 54.6%
associate-/l*55.9%
+-commutative55.9%
fma-def55.9%
Simplified55.9%
Taylor expanded in z around inf 61.2%
if -2.79999999999999975e129 < t < 3.4999999999999998e138Initial program 64.4%
Taylor expanded in y around inf 40.3%
mul-1-neg40.3%
unsub-neg40.3%
Simplified40.3%
Final simplification46.0%
(FPCore (x y z t a b) :precision binary64 (if (<= z -57000000.0) (/ t b) (if (<= z 12.8) x (/ (- a) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -57000000.0) {
tmp = t / b;
} else if (z <= 12.8) {
tmp = x;
} else {
tmp = -a / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-57000000.0d0)) then
tmp = t / b
else if (z <= 12.8d0) then
tmp = x
else
tmp = -a / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -57000000.0) {
tmp = t / b;
} else if (z <= 12.8) {
tmp = x;
} else {
tmp = -a / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -57000000.0: tmp = t / b elif z <= 12.8: tmp = x else: tmp = -a / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -57000000.0) tmp = Float64(t / b); elseif (z <= 12.8) tmp = x; else tmp = Float64(Float64(-a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -57000000.0) tmp = t / b; elseif (z <= 12.8) tmp = x; else tmp = -a / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -57000000.0], N[(t / b), $MachinePrecision], If[LessEqual[z, 12.8], x, N[((-a) / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -57000000:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 12.8:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{-a}{b}\\
\end{array}
\end{array}
if z < -5.7e7Initial program 55.5%
Taylor expanded in t around inf 35.4%
associate-/l*38.1%
+-commutative38.1%
fma-def38.1%
Simplified38.1%
Taylor expanded in b around inf 28.7%
if -5.7e7 < z < 12.800000000000001Initial program 87.1%
Taylor expanded in z around 0 50.9%
if 12.800000000000001 < z Initial program 38.0%
Taylor expanded in b around inf 10.5%
Taylor expanded in a around inf 14.3%
associate-*r/14.3%
neg-mul-114.3%
Simplified14.3%
Final simplification35.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -13000000.0) (not (<= z 1.35e+44))) (/ t b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -13000000.0) || !(z <= 1.35e+44)) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-13000000.0d0)) .or. (.not. (z <= 1.35d+44))) then
tmp = t / b
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -13000000.0) || !(z <= 1.35e+44)) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -13000000.0) or not (z <= 1.35e+44): tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -13000000.0) || !(z <= 1.35e+44)) tmp = Float64(t / b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -13000000.0) || ~((z <= 1.35e+44))) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -13000000.0], N[Not[LessEqual[z, 1.35e+44]], $MachinePrecision]], N[(t / b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -13000000 \lor \neg \left(z \leq 1.35 \cdot 10^{+44}\right):\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.3e7 or 1.35e44 < z Initial program 46.1%
Taylor expanded in t around inf 29.2%
associate-/l*32.5%
+-commutative32.5%
fma-def32.5%
Simplified32.5%
Taylor expanded in b around inf 22.7%
if -1.3e7 < z < 1.35e44Initial program 86.4%
Taylor expanded in z around 0 47.9%
Final simplification35.2%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 66.1%
Taylor expanded in z around 0 25.4%
Final simplification25.4%
(FPCore (x y z t a b) :precision binary64 (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
def code(x, y, z, t, a, b): return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(z * t) + Float64(y * x)) / Float64(y + Float64(z * Float64(b - y)))) - Float64(a / Float64(Float64(b - y) + Float64(y / z)))) end
function tmp = code(x, y, z, t, a, b) tmp = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(z * t), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a / N[(N[(b - y), $MachinePrecision] + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{z \cdot t + y \cdot x}{y + z \cdot \left(b - y\right)} - \frac{a}{\left(b - y\right) + \frac{y}{z}}
\end{array}
herbie shell --seed 2023308
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:herbie-target
(- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))