
(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 19 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 (if (or (<= z -37000000.0) (not (<= z 340000000.0))) (+ (* (/ y (- b y)) (/ x z)) (/ (- t a) (- b y))) (/ (fma x y (* 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 <= -37000000.0) || !(z <= 340000000.0)) {
tmp = ((y / (b - y)) * (x / z)) + ((t - a) / (b - y));
} else {
tmp = fma(x, y, (z * (t - a))) / (y + (z * (b - y)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -37000000.0) || !(z <= 340000000.0)) tmp = Float64(Float64(Float64(y / Float64(b - y)) * Float64(x / z)) + Float64(Float64(t - a) / Float64(b - y))); else tmp = Float64(fma(x, y, Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -37000000.0], N[Not[LessEqual[z, 340000000.0]], $MachinePrecision]], N[(N[(N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -37000000 \lor \neg \left(z \leq 340000000\right):\\
\;\;\;\;\frac{y}{b - y} \cdot \frac{x}{z} + \frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -3.7e7 or 3.4e8 < z Initial program 44.8%
Taylor expanded in z around -inf 63.8%
associate--l+63.8%
mul-1-neg63.8%
distribute-lft-out--63.8%
associate-/l*70.3%
associate-/l*89.8%
div-sub90.5%
Simplified90.5%
Taylor expanded in x around inf 82.4%
associate-*r/82.4%
associate-*r*82.4%
times-frac99.7%
mul-1-neg99.7%
Simplified99.7%
if -3.7e7 < z < 3.4e8Initial program 87.9%
fma-define87.9%
Simplified87.9%
Final simplification93.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y)))
(t_2 (/ (+ (* z (- t a)) (* x y)) (+ y (* z (- b y))))))
(if (<= t_2 (- INFINITY))
(+ x (* z (/ t y)))
(if (<= t_2 -4e-290)
t_2
(if (<= t_2 0.0) t_1 (if (<= t_2 5e+307) t_2 (- t_1 (/ x z))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double t_2 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y)));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = x + (z * (t / y));
} else if (t_2 <= -4e-290) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t_1;
} else if (t_2 <= 5e+307) {
tmp = t_2;
} else {
tmp = t_1 - (x / z);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double t_2 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y)));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = x + (z * (t / y));
} else if (t_2 <= -4e-290) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t_1;
} else if (t_2 <= 5e+307) {
tmp = t_2;
} else {
tmp = t_1 - (x / z);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) t_2 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y))) tmp = 0 if t_2 <= -math.inf: tmp = x + (z * (t / y)) elif t_2 <= -4e-290: tmp = t_2 elif t_2 <= 0.0: tmp = t_1 elif t_2 <= 5e+307: tmp = t_2 else: tmp = t_1 - (x / z) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) t_2 = Float64(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / Float64(y + Float64(z * Float64(b - y)))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(x + Float64(z * Float64(t / y))); elseif (t_2 <= -4e-290) tmp = t_2; elseif (t_2 <= 0.0) tmp = t_1; elseif (t_2 <= 5e+307) tmp = t_2; else tmp = Float64(t_1 - Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); t_2 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y))); tmp = 0.0; if (t_2 <= -Inf) tmp = x + (z * (t / y)); elseif (t_2 <= -4e-290) tmp = t_2; elseif (t_2 <= 0.0) tmp = t_1; elseif (t_2 <= 5e+307) tmp = t_2; else tmp = t_1 - (x / z); 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]}, Block[{t$95$2 = N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(x + N[(z * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -4e-290], t$95$2, If[LessEqual[t$95$2, 0.0], t$95$1, If[LessEqual[t$95$2, 5e+307], t$95$2, N[(t$95$1 - N[(x / z), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
t_2 := \frac{z \cdot \left(t - a\right) + x \cdot y}{y + z \cdot \left(b - y\right)}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\
\mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-290}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+307}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1 - \frac{x}{z}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0Initial program 38.1%
Taylor expanded in z around 0 25.7%
Taylor expanded in t around inf 66.6%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4.0000000000000003e-290 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 5e307Initial program 99.6%
if -4.0000000000000003e-290 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 18.4%
Taylor expanded in z around inf 82.7%
if 5e307 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 7.2%
Taylor expanded in z around -inf 26.8%
associate--l+26.8%
mul-1-neg26.8%
distribute-lft-out--26.8%
associate-/l*39.6%
associate-/l*86.3%
div-sub86.3%
Simplified86.3%
Taylor expanded in y around inf 80.4%
Final simplification90.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ (* x y) (* z t)) (+ y (* z (- b y)))))
(t_2 (/ (- t a) (- b y))))
(if (<= z -2.55e+26)
(- t_2 (/ x z))
(if (<= z 7e-151)
t_1
(if (<= z 2.6e-67) (- x (/ (* z a) y)) (if (<= z 1.52e-19) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x * y) + (z * t)) / (y + (z * (b - y)));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -2.55e+26) {
tmp = t_2 - (x / z);
} else if (z <= 7e-151) {
tmp = t_1;
} else if (z <= 2.6e-67) {
tmp = x - ((z * a) / y);
} else if (z <= 1.52e-19) {
tmp = t_1;
} 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 = ((x * y) + (z * t)) / (y + (z * (b - y)))
t_2 = (t - a) / (b - y)
if (z <= (-2.55d+26)) then
tmp = t_2 - (x / z)
else if (z <= 7d-151) then
tmp = t_1
else if (z <= 2.6d-67) then
tmp = x - ((z * a) / y)
else if (z <= 1.52d-19) then
tmp = t_1
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 = ((x * y) + (z * t)) / (y + (z * (b - y)));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -2.55e+26) {
tmp = t_2 - (x / z);
} else if (z <= 7e-151) {
tmp = t_1;
} else if (z <= 2.6e-67) {
tmp = x - ((z * a) / y);
} else if (z <= 1.52e-19) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x * y) + (z * t)) / (y + (z * (b - y))) t_2 = (t - a) / (b - y) tmp = 0 if z <= -2.55e+26: tmp = t_2 - (x / z) elif z <= 7e-151: tmp = t_1 elif z <= 2.6e-67: tmp = x - ((z * a) / y) elif z <= 1.52e-19: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x * y) + Float64(z * t)) / Float64(y + Float64(z * Float64(b - y)))) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2.55e+26) tmp = Float64(t_2 - Float64(x / z)); elseif (z <= 7e-151) tmp = t_1; elseif (z <= 2.6e-67) tmp = Float64(x - Float64(Float64(z * a) / y)); elseif (z <= 1.52e-19) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x * y) + (z * t)) / (y + (z * (b - y))); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -2.55e+26) tmp = t_2 - (x / z); elseif (z <= 7e-151) tmp = t_1; elseif (z <= 2.6e-67) tmp = x - ((z * a) / y); elseif (z <= 1.52e-19) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $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]}, If[LessEqual[z, -2.55e+26], N[(t$95$2 - N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e-151], t$95$1, If[LessEqual[z, 2.6e-67], N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.52e-19], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot y + z \cdot t}{y + z \cdot \left(b - y\right)}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.55 \cdot 10^{+26}:\\
\;\;\;\;t\_2 - \frac{x}{z}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-151}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-67}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\mathbf{elif}\;z \leq 1.52 \cdot 10^{-19}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -2.5499999999999999e26Initial program 33.8%
Taylor expanded in z around -inf 53.9%
associate--l+53.9%
mul-1-neg53.9%
distribute-lft-out--53.9%
associate-/l*61.9%
associate-/l*88.9%
div-sub88.9%
Simplified88.9%
Taylor expanded in y around inf 77.7%
if -2.5499999999999999e26 < z < 6.99999999999999991e-151 or 2.5999999999999999e-67 < z < 1.5199999999999999e-19Initial program 88.8%
Taylor expanded in a around 0 71.9%
if 6.99999999999999991e-151 < z < 2.5999999999999999e-67Initial program 79.9%
Taylor expanded in z around 0 54.5%
Taylor expanded in a around inf 79.8%
if 1.5199999999999999e-19 < z Initial program 56.2%
Taylor expanded in z around inf 78.8%
Final simplification75.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))) (t_2 (+ y (* z (- b y)))))
(if (<= z -4.2e+25)
(- t_1 (/ x z))
(if (<= z 3.3e-152)
(/ (+ (* x y) (* z t)) t_2)
(if (<= z 1.2e-105)
(- x (/ (* z a) y))
(if (<= z 1.08e+66) (/ (- (* x y) (* z a)) t_2) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double t_2 = y + (z * (b - y));
double tmp;
if (z <= -4.2e+25) {
tmp = t_1 - (x / z);
} else if (z <= 3.3e-152) {
tmp = ((x * y) + (z * t)) / t_2;
} else if (z <= 1.2e-105) {
tmp = x - ((z * a) / y);
} else if (z <= 1.08e+66) {
tmp = ((x * y) - (z * a)) / t_2;
} 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) :: tmp
t_1 = (t - a) / (b - y)
t_2 = y + (z * (b - y))
if (z <= (-4.2d+25)) then
tmp = t_1 - (x / z)
else if (z <= 3.3d-152) then
tmp = ((x * y) + (z * t)) / t_2
else if (z <= 1.2d-105) then
tmp = x - ((z * a) / y)
else if (z <= 1.08d+66) then
tmp = ((x * y) - (z * a)) / t_2
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 t_2 = y + (z * (b - y));
double tmp;
if (z <= -4.2e+25) {
tmp = t_1 - (x / z);
} else if (z <= 3.3e-152) {
tmp = ((x * y) + (z * t)) / t_2;
} else if (z <= 1.2e-105) {
tmp = x - ((z * a) / y);
} else if (z <= 1.08e+66) {
tmp = ((x * y) - (z * a)) / t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) t_2 = y + (z * (b - y)) tmp = 0 if z <= -4.2e+25: tmp = t_1 - (x / z) elif z <= 3.3e-152: tmp = ((x * y) + (z * t)) / t_2 elif z <= 1.2e-105: tmp = x - ((z * a) / y) elif z <= 1.08e+66: tmp = ((x * y) - (z * a)) / t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) t_2 = Float64(y + Float64(z * Float64(b - y))) tmp = 0.0 if (z <= -4.2e+25) tmp = Float64(t_1 - Float64(x / z)); elseif (z <= 3.3e-152) tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) / t_2); elseif (z <= 1.2e-105) tmp = Float64(x - Float64(Float64(z * a) / y)); elseif (z <= 1.08e+66) tmp = Float64(Float64(Float64(x * y) - Float64(z * a)) / t_2); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); t_2 = y + (z * (b - y)); tmp = 0.0; if (z <= -4.2e+25) tmp = t_1 - (x / z); elseif (z <= 3.3e-152) tmp = ((x * y) + (z * t)) / t_2; elseif (z <= 1.2e-105) tmp = x - ((z * a) / y); elseif (z <= 1.08e+66) tmp = ((x * y) - (z * a)) / t_2; 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]}, Block[{t$95$2 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.2e+25], N[(t$95$1 - N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.3e-152], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[z, 1.2e-105], N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.08e+66], N[(N[(N[(x * y), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
t_2 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -4.2 \cdot 10^{+25}:\\
\;\;\;\;t\_1 - \frac{x}{z}\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{-152}:\\
\;\;\;\;\frac{x \cdot y + z \cdot t}{t\_2}\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-105}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\mathbf{elif}\;z \leq 1.08 \cdot 10^{+66}:\\
\;\;\;\;\frac{x \cdot y - z \cdot a}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.1999999999999998e25Initial program 33.8%
Taylor expanded in z around -inf 53.9%
associate--l+53.9%
mul-1-neg53.9%
distribute-lft-out--53.9%
associate-/l*61.9%
associate-/l*88.9%
div-sub88.9%
Simplified88.9%
Taylor expanded in y around inf 77.7%
if -4.1999999999999998e25 < z < 3.29999999999999998e-152Initial program 87.9%
Taylor expanded in a around 0 69.6%
if 3.29999999999999998e-152 < z < 1.20000000000000007e-105Initial program 70.6%
Taylor expanded in z around 0 41.4%
Taylor expanded in a around inf 85.1%
if 1.20000000000000007e-105 < z < 1.08000000000000008e66Initial program 96.4%
Taylor expanded in t around 0 73.3%
+-commutative73.3%
mul-1-neg73.3%
unsub-neg73.3%
*-commutative73.3%
*-commutative73.3%
Simplified73.3%
if 1.08000000000000008e66 < z Initial program 47.3%
Taylor expanded in z around inf 84.4%
Final simplification76.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ a (- b))) (t_2 (/ x (- 1.0 z))))
(if (<= y -1.15e+58)
t_2
(if (<= y -4.6e-179)
(/ t (- b y))
(if (<= y -1.1e-264)
t_1
(if (<= y -1.6e-300) (/ t b) (if (<= y 1.9e-125) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / -b;
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -1.15e+58) {
tmp = t_2;
} else if (y <= -4.6e-179) {
tmp = t / (b - y);
} else if (y <= -1.1e-264) {
tmp = t_1;
} else if (y <= -1.6e-300) {
tmp = t / b;
} else if (y <= 1.9e-125) {
tmp = t_1;
} 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 = a / -b
t_2 = x / (1.0d0 - z)
if (y <= (-1.15d+58)) then
tmp = t_2
else if (y <= (-4.6d-179)) then
tmp = t / (b - y)
else if (y <= (-1.1d-264)) then
tmp = t_1
else if (y <= (-1.6d-300)) then
tmp = t / b
else if (y <= 1.9d-125) then
tmp = t_1
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 = a / -b;
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -1.15e+58) {
tmp = t_2;
} else if (y <= -4.6e-179) {
tmp = t / (b - y);
} else if (y <= -1.1e-264) {
tmp = t_1;
} else if (y <= -1.6e-300) {
tmp = t / b;
} else if (y <= 1.9e-125) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a / -b t_2 = x / (1.0 - z) tmp = 0 if y <= -1.15e+58: tmp = t_2 elif y <= -4.6e-179: tmp = t / (b - y) elif y <= -1.1e-264: tmp = t_1 elif y <= -1.6e-300: tmp = t / b elif y <= 1.9e-125: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a / Float64(-b)) t_2 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -1.15e+58) tmp = t_2; elseif (y <= -4.6e-179) tmp = Float64(t / Float64(b - y)); elseif (y <= -1.1e-264) tmp = t_1; elseif (y <= -1.6e-300) tmp = Float64(t / b); elseif (y <= 1.9e-125) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a / -b; t_2 = x / (1.0 - z); tmp = 0.0; if (y <= -1.15e+58) tmp = t_2; elseif (y <= -4.6e-179) tmp = t / (b - y); elseif (y <= -1.1e-264) tmp = t_1; elseif (y <= -1.6e-300) tmp = t / b; elseif (y <= 1.9e-125) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a / (-b)), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.15e+58], t$95$2, If[LessEqual[y, -4.6e-179], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.1e-264], t$95$1, If[LessEqual[y, -1.6e-300], N[(t / b), $MachinePrecision], If[LessEqual[y, 1.9e-125], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{-b}\\
t_2 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -1.15 \cdot 10^{+58}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -4.6 \cdot 10^{-179}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{elif}\;y \leq -1.1 \cdot 10^{-264}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.6 \cdot 10^{-300}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-125}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.15000000000000001e58 or 1.9000000000000001e-125 < y Initial program 51.8%
Taylor expanded in y around inf 51.6%
mul-1-neg51.6%
unsub-neg51.6%
Simplified51.6%
if -1.15000000000000001e58 < y < -4.59999999999999975e-179Initial program 79.3%
Taylor expanded in t around inf 37.3%
*-commutative37.3%
Simplified37.3%
Taylor expanded in z around inf 38.5%
if -4.59999999999999975e-179 < y < -1.09999999999999997e-264 or -1.60000000000000011e-300 < y < 1.9000000000000001e-125Initial program 85.1%
Taylor expanded in b around inf 61.6%
Taylor expanded in a around inf 45.8%
associate-*r/45.8%
neg-mul-145.8%
Simplified45.8%
if -1.09999999999999997e-264 < y < -1.60000000000000011e-300Initial program 90.9%
Taylor expanded in t around inf 58.1%
*-commutative58.1%
Simplified58.1%
Taylor expanded in y around 0 67.0%
Final simplification48.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -7.8e+33)
t_1
(if (<= z -9.2e-26)
(/ x (- 1.0 z))
(if (<= z -6.4e-27)
(/ a (- b))
(if (<= z 1.8e-35) (+ x (* z (/ t y))) 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 <= -7.8e+33) {
tmp = t_1;
} else if (z <= -9.2e-26) {
tmp = x / (1.0 - z);
} else if (z <= -6.4e-27) {
tmp = a / -b;
} else if (z <= 1.8e-35) {
tmp = x + (z * (t / y));
} 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 <= (-7.8d+33)) then
tmp = t_1
else if (z <= (-9.2d-26)) then
tmp = x / (1.0d0 - z)
else if (z <= (-6.4d-27)) then
tmp = a / -b
else if (z <= 1.8d-35) then
tmp = x + (z * (t / y))
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 <= -7.8e+33) {
tmp = t_1;
} else if (z <= -9.2e-26) {
tmp = x / (1.0 - z);
} else if (z <= -6.4e-27) {
tmp = a / -b;
} else if (z <= 1.8e-35) {
tmp = x + (z * (t / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -7.8e+33: tmp = t_1 elif z <= -9.2e-26: tmp = x / (1.0 - z) elif z <= -6.4e-27: tmp = a / -b elif z <= 1.8e-35: tmp = x + (z * (t / y)) 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 <= -7.8e+33) tmp = t_1; elseif (z <= -9.2e-26) tmp = Float64(x / Float64(1.0 - z)); elseif (z <= -6.4e-27) tmp = Float64(a / Float64(-b)); elseif (z <= 1.8e-35) tmp = Float64(x + Float64(z * Float64(t / y))); 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 <= -7.8e+33) tmp = t_1; elseif (z <= -9.2e-26) tmp = x / (1.0 - z); elseif (z <= -6.4e-27) tmp = a / -b; elseif (z <= 1.8e-35) tmp = x + (z * (t / y)); 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, -7.8e+33], t$95$1, If[LessEqual[z, -9.2e-26], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.4e-27], N[(a / (-b)), $MachinePrecision], If[LessEqual[z, 1.8e-35], N[(x + N[(z * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -7.8 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -9.2 \cdot 10^{-26}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;z \leq -6.4 \cdot 10^{-27}:\\
\;\;\;\;\frac{a}{-b}\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-35}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.8000000000000004e33 or 1.80000000000000009e-35 < z Initial program 47.9%
Taylor expanded in z around inf 78.2%
if -7.8000000000000004e33 < z < -9.20000000000000035e-26Initial program 60.8%
Taylor expanded in y around inf 55.6%
mul-1-neg55.6%
unsub-neg55.6%
Simplified55.6%
if -9.20000000000000035e-26 < z < -6.39999999999999982e-27Initial program 98.4%
Taylor expanded in b around inf 98.4%
Taylor expanded in a around inf 100.0%
associate-*r/100.0%
neg-mul-1100.0%
Simplified100.0%
if -6.39999999999999982e-27 < z < 1.80000000000000009e-35Initial program 89.2%
Taylor expanded in z around 0 53.5%
Taylor expanded in t around inf 59.4%
Final simplification69.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -7.8e+33)
t_1
(if (<= z -7.5e-87)
(/ x (- 1.0 z))
(if (<= z -1.05e-110)
(/ (- t a) b)
(if (<= z 4e-36) (- x (* a (/ z y))) 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 <= -7.8e+33) {
tmp = t_1;
} else if (z <= -7.5e-87) {
tmp = x / (1.0 - z);
} else if (z <= -1.05e-110) {
tmp = (t - a) / b;
} else if (z <= 4e-36) {
tmp = x - (a * (z / y));
} 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 <= (-7.8d+33)) then
tmp = t_1
else if (z <= (-7.5d-87)) then
tmp = x / (1.0d0 - z)
else if (z <= (-1.05d-110)) then
tmp = (t - a) / b
else if (z <= 4d-36) then
tmp = x - (a * (z / y))
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 <= -7.8e+33) {
tmp = t_1;
} else if (z <= -7.5e-87) {
tmp = x / (1.0 - z);
} else if (z <= -1.05e-110) {
tmp = (t - a) / b;
} else if (z <= 4e-36) {
tmp = x - (a * (z / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -7.8e+33: tmp = t_1 elif z <= -7.5e-87: tmp = x / (1.0 - z) elif z <= -1.05e-110: tmp = (t - a) / b elif z <= 4e-36: tmp = x - (a * (z / y)) 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 <= -7.8e+33) tmp = t_1; elseif (z <= -7.5e-87) tmp = Float64(x / Float64(1.0 - z)); elseif (z <= -1.05e-110) tmp = Float64(Float64(t - a) / b); elseif (z <= 4e-36) tmp = Float64(x - Float64(a * Float64(z / y))); 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 <= -7.8e+33) tmp = t_1; elseif (z <= -7.5e-87) tmp = x / (1.0 - z); elseif (z <= -1.05e-110) tmp = (t - a) / b; elseif (z <= 4e-36) tmp = x - (a * (z / y)); 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, -7.8e+33], t$95$1, If[LessEqual[z, -7.5e-87], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.05e-110], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 4e-36], N[(x - N[(a * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -7.8 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-87}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{-110}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-36}:\\
\;\;\;\;x - a \cdot \frac{z}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.8000000000000004e33 or 3.9999999999999998e-36 < z Initial program 47.9%
Taylor expanded in z around inf 78.2%
if -7.8000000000000004e33 < z < -7.5000000000000002e-87Initial program 77.2%
Taylor expanded in y around inf 51.4%
mul-1-neg51.4%
unsub-neg51.4%
Simplified51.4%
if -7.5000000000000002e-87 < z < -1.05000000000000001e-110Initial program 99.4%
Taylor expanded in y around 0 80.3%
if -1.05000000000000001e-110 < z < 3.9999999999999998e-36Initial program 88.4%
Taylor expanded in z around 0 55.0%
Taylor expanded in a around inf 62.7%
mul-1-neg62.7%
associate-/l*61.7%
Simplified61.7%
Final simplification69.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -7.8e+33)
t_1
(if (<= z -3.2e-87)
(/ x (- 1.0 z))
(if (<= z -4.8e-111)
(/ (- t a) b)
(if (<= z 2e-36) (- x (/ (* z a) y)) 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 <= -7.8e+33) {
tmp = t_1;
} else if (z <= -3.2e-87) {
tmp = x / (1.0 - z);
} else if (z <= -4.8e-111) {
tmp = (t - a) / b;
} else if (z <= 2e-36) {
tmp = x - ((z * a) / y);
} 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 <= (-7.8d+33)) then
tmp = t_1
else if (z <= (-3.2d-87)) then
tmp = x / (1.0d0 - z)
else if (z <= (-4.8d-111)) then
tmp = (t - a) / b
else if (z <= 2d-36) then
tmp = x - ((z * a) / y)
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 <= -7.8e+33) {
tmp = t_1;
} else if (z <= -3.2e-87) {
tmp = x / (1.0 - z);
} else if (z <= -4.8e-111) {
tmp = (t - a) / b;
} else if (z <= 2e-36) {
tmp = x - ((z * a) / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -7.8e+33: tmp = t_1 elif z <= -3.2e-87: tmp = x / (1.0 - z) elif z <= -4.8e-111: tmp = (t - a) / b elif z <= 2e-36: tmp = x - ((z * a) / y) 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 <= -7.8e+33) tmp = t_1; elseif (z <= -3.2e-87) tmp = Float64(x / Float64(1.0 - z)); elseif (z <= -4.8e-111) tmp = Float64(Float64(t - a) / b); elseif (z <= 2e-36) tmp = Float64(x - Float64(Float64(z * a) / y)); 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 <= -7.8e+33) tmp = t_1; elseif (z <= -3.2e-87) tmp = x / (1.0 - z); elseif (z <= -4.8e-111) tmp = (t - a) / b; elseif (z <= 2e-36) tmp = x - ((z * a) / y); 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, -7.8e+33], t$95$1, If[LessEqual[z, -3.2e-87], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.8e-111], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 2e-36], N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -7.8 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-87}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-111}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-36}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.8000000000000004e33 or 1.9999999999999999e-36 < z Initial program 47.9%
Taylor expanded in z around inf 78.2%
if -7.8000000000000004e33 < z < -3.19999999999999979e-87Initial program 77.2%
Taylor expanded in y around inf 51.4%
mul-1-neg51.4%
unsub-neg51.4%
Simplified51.4%
if -3.19999999999999979e-87 < z < -4.8000000000000001e-111Initial program 99.4%
Taylor expanded in y around 0 80.3%
if -4.8000000000000001e-111 < z < 1.9999999999999999e-36Initial program 88.4%
Taylor expanded in z around 0 55.0%
Taylor expanded in a around inf 62.7%
Final simplification70.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -7.8e+33)
t_1
(if (<= z -1.8e-87)
(/ x (- 1.0 z))
(if (<= z -1.4e-155)
(/ (+ (- t a) (* x (/ y z))) b)
(if (<= z 2.4e-35) (- x (/ (* z a) y)) 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 <= -7.8e+33) {
tmp = t_1;
} else if (z <= -1.8e-87) {
tmp = x / (1.0 - z);
} else if (z <= -1.4e-155) {
tmp = ((t - a) + (x * (y / z))) / b;
} else if (z <= 2.4e-35) {
tmp = x - ((z * a) / y);
} 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 <= (-7.8d+33)) then
tmp = t_1
else if (z <= (-1.8d-87)) then
tmp = x / (1.0d0 - z)
else if (z <= (-1.4d-155)) then
tmp = ((t - a) + (x * (y / z))) / b
else if (z <= 2.4d-35) then
tmp = x - ((z * a) / y)
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 <= -7.8e+33) {
tmp = t_1;
} else if (z <= -1.8e-87) {
tmp = x / (1.0 - z);
} else if (z <= -1.4e-155) {
tmp = ((t - a) + (x * (y / z))) / b;
} else if (z <= 2.4e-35) {
tmp = x - ((z * a) / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -7.8e+33: tmp = t_1 elif z <= -1.8e-87: tmp = x / (1.0 - z) elif z <= -1.4e-155: tmp = ((t - a) + (x * (y / z))) / b elif z <= 2.4e-35: tmp = x - ((z * a) / y) 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 <= -7.8e+33) tmp = t_1; elseif (z <= -1.8e-87) tmp = Float64(x / Float64(1.0 - z)); elseif (z <= -1.4e-155) tmp = Float64(Float64(Float64(t - a) + Float64(x * Float64(y / z))) / b); elseif (z <= 2.4e-35) tmp = Float64(x - Float64(Float64(z * a) / y)); 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 <= -7.8e+33) tmp = t_1; elseif (z <= -1.8e-87) tmp = x / (1.0 - z); elseif (z <= -1.4e-155) tmp = ((t - a) + (x * (y / z))) / b; elseif (z <= 2.4e-35) tmp = x - ((z * a) / y); 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, -7.8e+33], t$95$1, If[LessEqual[z, -1.8e-87], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.4e-155], N[(N[(N[(t - a), $MachinePrecision] + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 2.4e-35], N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -7.8 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-87}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;z \leq -1.4 \cdot 10^{-155}:\\
\;\;\;\;\frac{\left(t - a\right) + x \cdot \frac{y}{z}}{b}\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-35}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.8000000000000004e33 or 2.4000000000000001e-35 < z Initial program 47.9%
Taylor expanded in z around inf 78.2%
if -7.8000000000000004e33 < z < -1.79999999999999996e-87Initial program 77.2%
Taylor expanded in y around inf 51.4%
mul-1-neg51.4%
unsub-neg51.4%
Simplified51.4%
if -1.79999999999999996e-87 < z < -1.4e-155Initial program 88.7%
Taylor expanded in z around -inf 54.6%
associate--l+54.6%
mul-1-neg54.6%
distribute-lft-out--54.6%
associate-/l*54.6%
associate-/l*43.2%
div-sub49.1%
Simplified49.1%
Taylor expanded in x around inf 66.4%
associate-*r/66.4%
associate-*r*66.4%
times-frac60.9%
mul-1-neg60.9%
Simplified60.9%
Taylor expanded in b around inf 65.9%
mul-1-neg65.9%
associate--r+65.9%
associate-*l/65.8%
distribute-lft-neg-in65.8%
cancel-sign-sub65.8%
associate-*l/65.9%
associate-/l*65.9%
Simplified65.9%
if -1.4e-155 < z < 2.4000000000000001e-35Initial program 89.0%
Taylor expanded in z around 0 58.0%
Taylor expanded in a around inf 65.6%
Final simplification70.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -0.03)
(- t_1 (/ x z))
(if (<= z -3.5e-85)
(+ x (* z (/ t y)))
(if (<= z -1.32e-164)
(/ (+ (- t a) (* x (/ y z))) b)
(if (<= z 1.75e-35) (- x (/ (* z a) y)) 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 <= -0.03) {
tmp = t_1 - (x / z);
} else if (z <= -3.5e-85) {
tmp = x + (z * (t / y));
} else if (z <= -1.32e-164) {
tmp = ((t - a) + (x * (y / z))) / b;
} else if (z <= 1.75e-35) {
tmp = x - ((z * a) / y);
} 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 <= (-0.03d0)) then
tmp = t_1 - (x / z)
else if (z <= (-3.5d-85)) then
tmp = x + (z * (t / y))
else if (z <= (-1.32d-164)) then
tmp = ((t - a) + (x * (y / z))) / b
else if (z <= 1.75d-35) then
tmp = x - ((z * a) / y)
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 <= -0.03) {
tmp = t_1 - (x / z);
} else if (z <= -3.5e-85) {
tmp = x + (z * (t / y));
} else if (z <= -1.32e-164) {
tmp = ((t - a) + (x * (y / z))) / b;
} else if (z <= 1.75e-35) {
tmp = x - ((z * a) / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -0.03: tmp = t_1 - (x / z) elif z <= -3.5e-85: tmp = x + (z * (t / y)) elif z <= -1.32e-164: tmp = ((t - a) + (x * (y / z))) / b elif z <= 1.75e-35: tmp = x - ((z * a) / y) 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 <= -0.03) tmp = Float64(t_1 - Float64(x / z)); elseif (z <= -3.5e-85) tmp = Float64(x + Float64(z * Float64(t / y))); elseif (z <= -1.32e-164) tmp = Float64(Float64(Float64(t - a) + Float64(x * Float64(y / z))) / b); elseif (z <= 1.75e-35) tmp = Float64(x - Float64(Float64(z * a) / y)); 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 <= -0.03) tmp = t_1 - (x / z); elseif (z <= -3.5e-85) tmp = x + (z * (t / y)); elseif (z <= -1.32e-164) tmp = ((t - a) + (x * (y / z))) / b; elseif (z <= 1.75e-35) tmp = x - ((z * a) / y); 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, -0.03], N[(t$95$1 - N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.5e-85], N[(x + N[(z * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.32e-164], N[(N[(N[(t - a), $MachinePrecision] + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 1.75e-35], N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -0.03:\\
\;\;\;\;t\_1 - \frac{x}{z}\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-85}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\
\mathbf{elif}\;z \leq -1.32 \cdot 10^{-164}:\\
\;\;\;\;\frac{\left(t - a\right) + x \cdot \frac{y}{z}}{b}\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{-35}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -0.029999999999999999Initial program 37.7%
Taylor expanded in z around -inf 54.1%
associate--l+54.1%
mul-1-neg54.1%
distribute-lft-out--54.1%
associate-/l*61.8%
associate-/l*86.6%
div-sub86.6%
Simplified86.6%
Taylor expanded in y around inf 74.8%
if -0.029999999999999999 < z < -3.49999999999999978e-85Initial program 80.0%
Taylor expanded in z around 0 42.9%
Taylor expanded in t around inf 60.4%
if -3.49999999999999978e-85 < z < -1.3199999999999999e-164Initial program 90.8%
Taylor expanded in z around -inf 53.8%
associate--l+53.8%
mul-1-neg53.8%
distribute-lft-out--53.8%
associate-/l*53.7%
associate-/l*44.5%
div-sub49.2%
Simplified49.2%
Taylor expanded in x around inf 63.3%
associate-*r/63.3%
associate-*r*63.3%
times-frac54.5%
mul-1-neg54.5%
Simplified54.5%
Taylor expanded in b around inf 62.9%
mul-1-neg62.9%
associate--r+62.9%
associate-*l/58.2%
distribute-lft-neg-in58.2%
cancel-sign-sub58.2%
associate-*l/62.9%
associate-/l*62.9%
Simplified62.9%
if -1.3199999999999999e-164 < z < 1.74999999999999998e-35Initial program 88.4%
Taylor expanded in z around 0 59.6%
Taylor expanded in a around inf 66.3%
if 1.74999999999999998e-35 < z Initial program 57.3%
Taylor expanded in z around inf 78.1%
Final simplification71.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -56000000000.0) (not (<= z 1000000000.0))) (+ (* (/ y (- b y)) (/ x z)) (/ (- t a) (- b y))) (/ (+ (* z (- t a)) (* x y)) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -56000000000.0) || !(z <= 1000000000.0)) {
tmp = ((y / (b - y)) * (x / z)) + ((t - a) / (b - y));
} else {
tmp = ((z * (t - a)) + (x * y)) / (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 <= (-56000000000.0d0)) .or. (.not. (z <= 1000000000.0d0))) then
tmp = ((y / (b - y)) * (x / z)) + ((t - a) / (b - y))
else
tmp = ((z * (t - a)) + (x * y)) / (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 <= -56000000000.0) || !(z <= 1000000000.0)) {
tmp = ((y / (b - y)) * (x / z)) + ((t - a) / (b - y));
} else {
tmp = ((z * (t - a)) + (x * y)) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -56000000000.0) or not (z <= 1000000000.0): tmp = ((y / (b - y)) * (x / z)) + ((t - a) / (b - y)) else: tmp = ((z * (t - a)) + (x * y)) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -56000000000.0) || !(z <= 1000000000.0)) tmp = Float64(Float64(Float64(y / Float64(b - y)) * Float64(x / z)) + Float64(Float64(t - a) / Float64(b - y))); else tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / 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 <= -56000000000.0) || ~((z <= 1000000000.0))) tmp = ((y / (b - y)) * (x / z)) + ((t - a) / (b - y)); else tmp = ((z * (t - a)) + (x * y)) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -56000000000.0], N[Not[LessEqual[z, 1000000000.0]], $MachinePrecision]], N[(N[(N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -56000000000 \lor \neg \left(z \leq 1000000000\right):\\
\;\;\;\;\frac{y}{b - y} \cdot \frac{x}{z} + \frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + x \cdot y}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -5.6e10 or 1e9 < z Initial program 44.8%
Taylor expanded in z around -inf 63.8%
associate--l+63.8%
mul-1-neg63.8%
distribute-lft-out--63.8%
associate-/l*70.3%
associate-/l*89.8%
div-sub90.5%
Simplified90.5%
Taylor expanded in x around inf 82.4%
associate-*r/82.4%
associate-*r*82.4%
times-frac99.7%
mul-1-neg99.7%
Simplified99.7%
if -5.6e10 < z < 1e9Initial program 87.9%
Final simplification93.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ a (- b))) (t_2 (/ t (- b y))))
(if (<= z -1.6e+85)
t_2
(if (<= z -6.4e-27)
t_1
(if (<= z 6.6e-20) (+ x (* z x)) (if (<= z 2.5e+42) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / -b;
double t_2 = t / (b - y);
double tmp;
if (z <= -1.6e+85) {
tmp = t_2;
} else if (z <= -6.4e-27) {
tmp = t_1;
} else if (z <= 6.6e-20) {
tmp = x + (z * x);
} else if (z <= 2.5e+42) {
tmp = t_1;
} 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 = a / -b
t_2 = t / (b - y)
if (z <= (-1.6d+85)) then
tmp = t_2
else if (z <= (-6.4d-27)) then
tmp = t_1
else if (z <= 6.6d-20) then
tmp = x + (z * x)
else if (z <= 2.5d+42) then
tmp = t_1
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 = a / -b;
double t_2 = t / (b - y);
double tmp;
if (z <= -1.6e+85) {
tmp = t_2;
} else if (z <= -6.4e-27) {
tmp = t_1;
} else if (z <= 6.6e-20) {
tmp = x + (z * x);
} else if (z <= 2.5e+42) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a / -b t_2 = t / (b - y) tmp = 0 if z <= -1.6e+85: tmp = t_2 elif z <= -6.4e-27: tmp = t_1 elif z <= 6.6e-20: tmp = x + (z * x) elif z <= 2.5e+42: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a / Float64(-b)) t_2 = Float64(t / Float64(b - y)) tmp = 0.0 if (z <= -1.6e+85) tmp = t_2; elseif (z <= -6.4e-27) tmp = t_1; elseif (z <= 6.6e-20) tmp = Float64(x + Float64(z * x)); elseif (z <= 2.5e+42) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a / -b; t_2 = t / (b - y); tmp = 0.0; if (z <= -1.6e+85) tmp = t_2; elseif (z <= -6.4e-27) tmp = t_1; elseif (z <= 6.6e-20) tmp = x + (z * x); elseif (z <= 2.5e+42) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a / (-b)), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e+85], t$95$2, If[LessEqual[z, -6.4e-27], t$95$1, If[LessEqual[z, 6.6e-20], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e+42], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{-b}\\
t_2 := \frac{t}{b - y}\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{+85}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -6.4 \cdot 10^{-27}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{-20}:\\
\;\;\;\;x + z \cdot x\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.60000000000000009e85 or 2.50000000000000003e42 < z Initial program 39.9%
Taylor expanded in t around inf 19.9%
*-commutative19.9%
Simplified19.9%
Taylor expanded in z around inf 41.3%
if -1.60000000000000009e85 < z < -6.39999999999999982e-27 or 6.6e-20 < z < 2.50000000000000003e42Initial program 78.1%
Taylor expanded in b around inf 52.2%
Taylor expanded in a around inf 38.1%
associate-*r/38.1%
neg-mul-138.1%
Simplified38.1%
if -6.39999999999999982e-27 < z < 6.6e-20Initial program 89.4%
Taylor expanded in z around 0 53.5%
Taylor expanded in y around inf 49.4%
*-commutative49.4%
Simplified49.4%
Final simplification44.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ a (- b))))
(if (<= z -5.7e+141)
(/ a y)
(if (<= z -6.2e-27)
t_1
(if (<= z 9.5e-20) x (if (<= z 5.4e+163) t_1 (/ t b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / -b;
double tmp;
if (z <= -5.7e+141) {
tmp = a / y;
} else if (z <= -6.2e-27) {
tmp = t_1;
} else if (z <= 9.5e-20) {
tmp = x;
} else if (z <= 5.4e+163) {
tmp = t_1;
} else {
tmp = t / 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) :: t_1
real(8) :: tmp
t_1 = a / -b
if (z <= (-5.7d+141)) then
tmp = a / y
else if (z <= (-6.2d-27)) then
tmp = t_1
else if (z <= 9.5d-20) then
tmp = x
else if (z <= 5.4d+163) then
tmp = t_1
else
tmp = t / b
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 = a / -b;
double tmp;
if (z <= -5.7e+141) {
tmp = a / y;
} else if (z <= -6.2e-27) {
tmp = t_1;
} else if (z <= 9.5e-20) {
tmp = x;
} else if (z <= 5.4e+163) {
tmp = t_1;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a / -b tmp = 0 if z <= -5.7e+141: tmp = a / y elif z <= -6.2e-27: tmp = t_1 elif z <= 9.5e-20: tmp = x elif z <= 5.4e+163: tmp = t_1 else: tmp = t / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a / Float64(-b)) tmp = 0.0 if (z <= -5.7e+141) tmp = Float64(a / y); elseif (z <= -6.2e-27) tmp = t_1; elseif (z <= 9.5e-20) tmp = x; elseif (z <= 5.4e+163) tmp = t_1; else tmp = Float64(t / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a / -b; tmp = 0.0; if (z <= -5.7e+141) tmp = a / y; elseif (z <= -6.2e-27) tmp = t_1; elseif (z <= 9.5e-20) tmp = x; elseif (z <= 5.4e+163) tmp = t_1; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a / (-b)), $MachinePrecision]}, If[LessEqual[z, -5.7e+141], N[(a / y), $MachinePrecision], If[LessEqual[z, -6.2e-27], t$95$1, If[LessEqual[z, 9.5e-20], x, If[LessEqual[z, 5.4e+163], t$95$1, N[(t / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{-b}\\
\mathbf{if}\;z \leq -5.7 \cdot 10^{+141}:\\
\;\;\;\;\frac{a}{y}\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-27}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-20}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{+163}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -5.69999999999999998e141Initial program 25.9%
Taylor expanded in z around inf 87.4%
Taylor expanded in b around 0 47.5%
associate-*r/47.5%
mul-1-neg47.5%
Simplified47.5%
Taylor expanded in t around 0 38.4%
if -5.69999999999999998e141 < z < -6.1999999999999997e-27 or 9.5e-20 < z < 5.39999999999999998e163Initial program 63.4%
Taylor expanded in b around inf 41.7%
Taylor expanded in a around inf 31.9%
associate-*r/31.9%
neg-mul-131.9%
Simplified31.9%
if -6.1999999999999997e-27 < z < 9.5e-20Initial program 89.4%
Taylor expanded in z around 0 49.4%
if 5.39999999999999998e163 < z Initial program 41.3%
Taylor expanded in t around inf 23.8%
*-commutative23.8%
Simplified23.8%
Taylor expanded in y around 0 35.0%
Final simplification40.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ a (- b))))
(if (<= z -8.5e+141)
(/ a y)
(if (<= z -6.2e-27)
t_1
(if (<= z 2.85e-21) (+ x (* z x)) (if (<= z 1.6e+161) t_1 (/ t b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / -b;
double tmp;
if (z <= -8.5e+141) {
tmp = a / y;
} else if (z <= -6.2e-27) {
tmp = t_1;
} else if (z <= 2.85e-21) {
tmp = x + (z * x);
} else if (z <= 1.6e+161) {
tmp = t_1;
} else {
tmp = t / 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) :: t_1
real(8) :: tmp
t_1 = a / -b
if (z <= (-8.5d+141)) then
tmp = a / y
else if (z <= (-6.2d-27)) then
tmp = t_1
else if (z <= 2.85d-21) then
tmp = x + (z * x)
else if (z <= 1.6d+161) then
tmp = t_1
else
tmp = t / b
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 = a / -b;
double tmp;
if (z <= -8.5e+141) {
tmp = a / y;
} else if (z <= -6.2e-27) {
tmp = t_1;
} else if (z <= 2.85e-21) {
tmp = x + (z * x);
} else if (z <= 1.6e+161) {
tmp = t_1;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a / -b tmp = 0 if z <= -8.5e+141: tmp = a / y elif z <= -6.2e-27: tmp = t_1 elif z <= 2.85e-21: tmp = x + (z * x) elif z <= 1.6e+161: tmp = t_1 else: tmp = t / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a / Float64(-b)) tmp = 0.0 if (z <= -8.5e+141) tmp = Float64(a / y); elseif (z <= -6.2e-27) tmp = t_1; elseif (z <= 2.85e-21) tmp = Float64(x + Float64(z * x)); elseif (z <= 1.6e+161) tmp = t_1; else tmp = Float64(t / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a / -b; tmp = 0.0; if (z <= -8.5e+141) tmp = a / y; elseif (z <= -6.2e-27) tmp = t_1; elseif (z <= 2.85e-21) tmp = x + (z * x); elseif (z <= 1.6e+161) tmp = t_1; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a / (-b)), $MachinePrecision]}, If[LessEqual[z, -8.5e+141], N[(a / y), $MachinePrecision], If[LessEqual[z, -6.2e-27], t$95$1, If[LessEqual[z, 2.85e-21], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+161], t$95$1, N[(t / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{-b}\\
\mathbf{if}\;z \leq -8.5 \cdot 10^{+141}:\\
\;\;\;\;\frac{a}{y}\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-27}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.85 \cdot 10^{-21}:\\
\;\;\;\;x + z \cdot x\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+161}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -8.4999999999999996e141Initial program 25.9%
Taylor expanded in z around inf 87.4%
Taylor expanded in b around 0 47.5%
associate-*r/47.5%
mul-1-neg47.5%
Simplified47.5%
Taylor expanded in t around 0 38.4%
if -8.4999999999999996e141 < z < -6.1999999999999997e-27 or 2.8499999999999998e-21 < z < 1.60000000000000001e161Initial program 63.4%
Taylor expanded in b around inf 41.7%
Taylor expanded in a around inf 31.9%
associate-*r/31.9%
neg-mul-131.9%
Simplified31.9%
if -6.1999999999999997e-27 < z < 2.8499999999999998e-21Initial program 89.4%
Taylor expanded in z around 0 53.5%
Taylor expanded in y around inf 49.4%
*-commutative49.4%
Simplified49.4%
if 1.60000000000000001e161 < z Initial program 41.3%
Taylor expanded in t around inf 23.8%
*-commutative23.8%
Simplified23.8%
Taylor expanded in y around 0 35.0%
Final simplification40.7%
(FPCore (x y z t a b) :precision binary64 (if (<= z -18.0) (/ a y) (if (<= z 2.45e-11) x (if (<= z 5.7e+94) (/ t (- y)) (/ t b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -18.0) {
tmp = a / y;
} else if (z <= 2.45e-11) {
tmp = x;
} else if (z <= 5.7e+94) {
tmp = t / -y;
} else {
tmp = t / 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 <= (-18.0d0)) then
tmp = a / y
else if (z <= 2.45d-11) then
tmp = x
else if (z <= 5.7d+94) then
tmp = t / -y
else
tmp = t / 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 <= -18.0) {
tmp = a / y;
} else if (z <= 2.45e-11) {
tmp = x;
} else if (z <= 5.7e+94) {
tmp = t / -y;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -18.0: tmp = a / y elif z <= 2.45e-11: tmp = x elif z <= 5.7e+94: tmp = t / -y else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -18.0) tmp = Float64(a / y); elseif (z <= 2.45e-11) tmp = x; elseif (z <= 5.7e+94) tmp = Float64(t / Float64(-y)); else tmp = Float64(t / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -18.0) tmp = a / y; elseif (z <= 2.45e-11) tmp = x; elseif (z <= 5.7e+94) tmp = t / -y; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -18.0], N[(a / y), $MachinePrecision], If[LessEqual[z, 2.45e-11], x, If[LessEqual[z, 5.7e+94], N[(t / (-y)), $MachinePrecision], N[(t / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -18:\\
\;\;\;\;\frac{a}{y}\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-11}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.7 \cdot 10^{+94}:\\
\;\;\;\;\frac{t}{-y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -18Initial program 38.2%
Taylor expanded in z around inf 72.7%
Taylor expanded in b around 0 33.1%
associate-*r/33.1%
mul-1-neg33.1%
Simplified33.1%
Taylor expanded in t around 0 26.2%
if -18 < z < 2.4499999999999999e-11Initial program 87.1%
Taylor expanded in z around 0 47.5%
if 2.4499999999999999e-11 < z < 5.7000000000000002e94Initial program 86.2%
Taylor expanded in z around inf 65.0%
Taylor expanded in b around 0 34.7%
associate-*r/34.7%
mul-1-neg34.7%
Simplified34.7%
Taylor expanded in t around inf 26.2%
mul-1-neg26.2%
distribute-neg-frac226.2%
Simplified26.2%
if 5.7000000000000002e94 < z Initial program 43.4%
Taylor expanded in t around inf 23.6%
*-commutative23.6%
Simplified23.6%
Taylor expanded in y around 0 31.6%
Final simplification37.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.8e+57) (not (<= y 2.5e-77))) (/ x (- 1.0 z)) (/ (- t a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.8e+57) || !(y <= 2.5e-77)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - 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 ((y <= (-3.8d+57)) .or. (.not. (y <= 2.5d-77))) then
tmp = x / (1.0d0 - z)
else
tmp = (t - 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 ((y <= -3.8e+57) || !(y <= 2.5e-77)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.8e+57) or not (y <= 2.5e-77): tmp = x / (1.0 - z) else: tmp = (t - a) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.8e+57) || !(y <= 2.5e-77)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(Float64(t - a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.8e+57) || ~((y <= 2.5e-77))) tmp = x / (1.0 - z); else tmp = (t - a) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.8e+57], N[Not[LessEqual[y, 2.5e-77]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+57} \lor \neg \left(y \leq 2.5 \cdot 10^{-77}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -3.7999999999999999e57 or 2.49999999999999982e-77 < y Initial program 51.1%
Taylor expanded in y around inf 52.4%
mul-1-neg52.4%
unsub-neg52.4%
Simplified52.4%
if -3.7999999999999999e57 < y < 2.49999999999999982e-77Initial program 83.0%
Taylor expanded in y around 0 62.4%
Final simplification57.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -16.0) (not (<= z 580.0))) (/ a y) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -16.0) || !(z <= 580.0)) {
tmp = a / 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 <= (-16.0d0)) .or. (.not. (z <= 580.0d0))) then
tmp = a / 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 <= -16.0) || !(z <= 580.0)) {
tmp = a / y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -16.0) or not (z <= 580.0): tmp = a / y else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -16.0) || !(z <= 580.0)) tmp = Float64(a / y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -16.0) || ~((z <= 580.0))) tmp = a / y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -16.0], N[Not[LessEqual[z, 580.0]], $MachinePrecision]], N[(a / y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -16 \lor \neg \left(z \leq 580\right):\\
\;\;\;\;\frac{a}{y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -16 or 580 < z Initial program 46.0%
Taylor expanded in z around inf 76.5%
Taylor expanded in b around 0 34.9%
associate-*r/34.9%
mul-1-neg34.9%
Simplified34.9%
Taylor expanded in t around 0 23.2%
if -16 < z < 580Initial program 87.6%
Taylor expanded in z around 0 45.8%
Final simplification34.1%
(FPCore (x y z t a b) :precision binary64 (if (<= y -7e+53) x (if (<= y 3e-87) (/ t b) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7e+53) {
tmp = x;
} else if (y <= 3e-87) {
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 (y <= (-7d+53)) then
tmp = x
else if (y <= 3d-87) 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 (y <= -7e+53) {
tmp = x;
} else if (y <= 3e-87) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -7e+53: tmp = x elif y <= 3e-87: tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -7e+53) tmp = x; elseif (y <= 3e-87) 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 (y <= -7e+53) tmp = x; elseif (y <= 3e-87) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -7e+53], x, If[LessEqual[y, 3e-87], N[(t / b), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+53}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-87}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -7.00000000000000038e53 or 3.00000000000000016e-87 < y Initial program 51.4%
Taylor expanded in z around 0 37.7%
if -7.00000000000000038e53 < y < 3.00000000000000016e-87Initial program 82.9%
Taylor expanded in t around inf 33.0%
*-commutative33.0%
Simplified33.0%
Taylor expanded in y around 0 33.3%
Final simplification35.6%
(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.2%
Taylor expanded in z around 0 23.8%
Final simplification23.8%
(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 2024082
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:alt
(- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))