
(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 25 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 (- (* z (- y b)) y))
(t_2 (- (* z (- a t)) (* y x)))
(t_3 (/ t_2 t_1))
(t_4 (/ (- a t) (- y b))))
(if (<= t_3 (- INFINITY))
(+ (* z (/ (- a t) t_1)) (* x (/ y (+ y (* z (- b y))))))
(if (<= t_3 -2e-294)
(/ t_2 (- (- (* z y) (* z b)) y))
(if (<= t_3 0.0)
(+ t_4 (/ 1.0 (/ (- 1.0 z) x)))
(if (<= t_3 2e+297) t_3 (+ t_4 (/ x (- 1.0 z)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * (y - b)) - y;
double t_2 = (z * (a - t)) - (y * x);
double t_3 = t_2 / t_1;
double t_4 = (a - t) / (y - b);
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = (z * ((a - t) / t_1)) + (x * (y / (y + (z * (b - y)))));
} else if (t_3 <= -2e-294) {
tmp = t_2 / (((z * y) - (z * b)) - y);
} else if (t_3 <= 0.0) {
tmp = t_4 + (1.0 / ((1.0 - z) / x));
} else if (t_3 <= 2e+297) {
tmp = t_3;
} else {
tmp = t_4 + (x / (1.0 - z));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * (y - b)) - y;
double t_2 = (z * (a - t)) - (y * x);
double t_3 = t_2 / t_1;
double t_4 = (a - t) / (y - b);
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = (z * ((a - t) / t_1)) + (x * (y / (y + (z * (b - y)))));
} else if (t_3 <= -2e-294) {
tmp = t_2 / (((z * y) - (z * b)) - y);
} else if (t_3 <= 0.0) {
tmp = t_4 + (1.0 / ((1.0 - z) / x));
} else if (t_3 <= 2e+297) {
tmp = t_3;
} else {
tmp = t_4 + (x / (1.0 - z));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z * (y - b)) - y t_2 = (z * (a - t)) - (y * x) t_3 = t_2 / t_1 t_4 = (a - t) / (y - b) tmp = 0 if t_3 <= -math.inf: tmp = (z * ((a - t) / t_1)) + (x * (y / (y + (z * (b - y))))) elif t_3 <= -2e-294: tmp = t_2 / (((z * y) - (z * b)) - y) elif t_3 <= 0.0: tmp = t_4 + (1.0 / ((1.0 - z) / x)) elif t_3 <= 2e+297: tmp = t_3 else: tmp = t_4 + (x / (1.0 - z)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * Float64(y - b)) - y) t_2 = Float64(Float64(z * Float64(a - t)) - Float64(y * x)) t_3 = Float64(t_2 / t_1) t_4 = Float64(Float64(a - t) / Float64(y - b)) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(Float64(z * Float64(Float64(a - t) / t_1)) + Float64(x * Float64(y / Float64(y + Float64(z * Float64(b - y)))))); elseif (t_3 <= -2e-294) tmp = Float64(t_2 / Float64(Float64(Float64(z * y) - Float64(z * b)) - y)); elseif (t_3 <= 0.0) tmp = Float64(t_4 + Float64(1.0 / Float64(Float64(1.0 - z) / x))); elseif (t_3 <= 2e+297) tmp = t_3; else tmp = Float64(t_4 + Float64(x / Float64(1.0 - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z * (y - b)) - y; t_2 = (z * (a - t)) - (y * x); t_3 = t_2 / t_1; t_4 = (a - t) / (y - b); tmp = 0.0; if (t_3 <= -Inf) tmp = (z * ((a - t) / t_1)) + (x * (y / (y + (z * (b - y))))); elseif (t_3 <= -2e-294) tmp = t_2 / (((z * y) - (z * b)) - y); elseif (t_3 <= 0.0) tmp = t_4 + (1.0 / ((1.0 - z) / x)); elseif (t_3 <= 2e+297) tmp = t_3; else tmp = t_4 + (x / (1.0 - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision] - N[(y * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(N[(z * N[(N[(a - t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x * N[(y / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, -2e-294], N[(t$95$2 / N[(N[(N[(z * y), $MachinePrecision] - N[(z * b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 0.0], N[(t$95$4 + N[(1.0 / N[(N[(1.0 - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+297], t$95$3, N[(t$95$4 + N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(y - b\right) - y\\
t_2 := z \cdot \left(a - t\right) - y \cdot x\\
t_3 := \frac{t\_2}{t\_1}\\
t_4 := \frac{a - t}{y - b}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;z \cdot \frac{a - t}{t\_1} + x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;t\_3 \leq -2 \cdot 10^{-294}:\\
\;\;\;\;\frac{t\_2}{\left(z \cdot y - z \cdot b\right) - y}\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;t\_4 + \frac{1}{\frac{1 - z}{x}}\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+297}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_4 + \frac{x}{1 - 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 24.8%
Simplified24.8%
Taylor expanded in a around 0 23.5%
+-commutative23.5%
mul-1-neg23.5%
unsub-neg23.5%
div-sub23.5%
unsub-neg23.5%
distribute-lft-neg-out23.5%
distribute-rgt-out24.8%
sub-neg24.8%
associate-/l*49.6%
associate-*r/99.9%
Simplified99.9%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.00000000000000003e-294Initial program 99.7%
Simplified99.7%
sub-neg99.7%
distribute-lft-in99.7%
Applied egg-rr99.7%
if -2.00000000000000003e-294 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0Initial program 24.7%
Simplified24.7%
Taylor expanded in a around 0 24.7%
+-commutative24.7%
mul-1-neg24.7%
unsub-neg24.7%
div-sub24.7%
unsub-neg24.7%
distribute-lft-neg-out24.7%
distribute-rgt-out24.7%
sub-neg24.7%
associate-/l*31.4%
associate-*r/32.5%
Simplified32.5%
Taylor expanded in z around inf 57.5%
Taylor expanded in y around inf 71.8%
clear-num72.3%
inv-pow72.3%
sub-neg72.3%
metadata-eval72.3%
Applied egg-rr72.3%
unpow-172.3%
+-commutative72.3%
Simplified72.3%
if 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2e297Initial program 99.5%
if 2e297 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 16.2%
Simplified16.2%
Taylor expanded in a around 0 14.3%
+-commutative14.3%
mul-1-neg14.3%
unsub-neg14.3%
div-sub16.1%
unsub-neg16.1%
distribute-lft-neg-out16.1%
distribute-rgt-out16.2%
sub-neg16.2%
associate-/l*32.4%
associate-*r/49.8%
Simplified49.8%
Taylor expanded in z around inf 86.1%
Taylor expanded in y around inf 93.2%
Final simplification95.7%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -2e+14) (not (<= z 135000000000.0)))
(+
(/ (- a t) (- y b))
(/ (+ (* (- a t) (/ y (pow (- y b) 2.0))) (* x (/ y (- b y)))) z))
(+ (/ (* z (- a t)) (- (* z (- y b)) y)) (* x (/ y (+ y (* z (- b y))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2e+14) || !(z <= 135000000000.0)) {
tmp = ((a - t) / (y - b)) + ((((a - t) * (y / pow((y - b), 2.0))) + (x * (y / (b - y)))) / z);
} else {
tmp = ((z * (a - t)) / ((z * (y - b)) - y)) + (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 <= (-2d+14)) .or. (.not. (z <= 135000000000.0d0))) then
tmp = ((a - t) / (y - b)) + ((((a - t) * (y / ((y - b) ** 2.0d0))) + (x * (y / (b - y)))) / z)
else
tmp = ((z * (a - t)) / ((z * (y - b)) - y)) + (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 <= -2e+14) || !(z <= 135000000000.0)) {
tmp = ((a - t) / (y - b)) + ((((a - t) * (y / Math.pow((y - b), 2.0))) + (x * (y / (b - y)))) / z);
} else {
tmp = ((z * (a - t)) / ((z * (y - b)) - y)) + (x * (y / (y + (z * (b - y)))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2e+14) or not (z <= 135000000000.0): tmp = ((a - t) / (y - b)) + ((((a - t) * (y / math.pow((y - b), 2.0))) + (x * (y / (b - y)))) / z) else: tmp = ((z * (a - t)) / ((z * (y - b)) - y)) + (x * (y / (y + (z * (b - y))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2e+14) || !(z <= 135000000000.0)) tmp = Float64(Float64(Float64(a - t) / Float64(y - b)) + Float64(Float64(Float64(Float64(a - t) * Float64(y / (Float64(y - b) ^ 2.0))) + Float64(x * Float64(y / Float64(b - y)))) / z)); else tmp = Float64(Float64(Float64(z * Float64(a - t)) / Float64(Float64(z * Float64(y - b)) - y)) + Float64(x * Float64(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 <= -2e+14) || ~((z <= 135000000000.0))) tmp = ((a - t) / (y - b)) + ((((a - t) * (y / ((y - b) ^ 2.0))) + (x * (y / (b - y)))) / z); else tmp = ((z * (a - t)) / ((z * (y - b)) - y)) + (x * (y / (y + (z * (b - y))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2e+14], N[Not[LessEqual[z, 135000000000.0]], $MachinePrecision]], N[(N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(a - t), $MachinePrecision] * N[(y / N[Power[N[(y - b), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] + N[(x * N[(y / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+14} \lor \neg \left(z \leq 135000000000\right):\\
\;\;\;\;\frac{a - t}{y - b} + \frac{\left(a - t\right) \cdot \frac{y}{{\left(y - b\right)}^{2}} + x \cdot \frac{y}{b - y}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(a - t\right)}{z \cdot \left(y - b\right) - y} + x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -2e14 or 1.35e11 < z Initial program 48.2%
Simplified48.2%
Taylor expanded in z around inf 67.8%
Simplified93.4%
if -2e14 < z < 1.35e11Initial program 83.6%
Simplified83.6%
div-sub83.7%
associate-/l*96.6%
Applied egg-rr96.6%
Final simplification95.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- (* z (- a t)) (* y x)) (- (* z (- y b)) y)))
(t_2 (/ (- a t) (- y b)))
(t_3 (+ t_2 (/ x (- 1.0 z)))))
(if (<= t_1 -5e+302)
t_3
(if (<= t_1 -2e-294)
t_1
(if (<= t_1 0.0)
(+ t_2 (/ 1.0 (/ (- 1.0 z) x)))
(if (<= t_1 2e+297) t_1 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((z * (a - t)) - (y * x)) / ((z * (y - b)) - y);
double t_2 = (a - t) / (y - b);
double t_3 = t_2 + (x / (1.0 - z));
double tmp;
if (t_1 <= -5e+302) {
tmp = t_3;
} else if (t_1 <= -2e-294) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = t_2 + (1.0 / ((1.0 - z) / x));
} else if (t_1 <= 2e+297) {
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 = ((z * (a - t)) - (y * x)) / ((z * (y - b)) - y)
t_2 = (a - t) / (y - b)
t_3 = t_2 + (x / (1.0d0 - z))
if (t_1 <= (-5d+302)) then
tmp = t_3
else if (t_1 <= (-2d-294)) then
tmp = t_1
else if (t_1 <= 0.0d0) then
tmp = t_2 + (1.0d0 / ((1.0d0 - z) / x))
else if (t_1 <= 2d+297) 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 = ((z * (a - t)) - (y * x)) / ((z * (y - b)) - y);
double t_2 = (a - t) / (y - b);
double t_3 = t_2 + (x / (1.0 - z));
double tmp;
if (t_1 <= -5e+302) {
tmp = t_3;
} else if (t_1 <= -2e-294) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = t_2 + (1.0 / ((1.0 - z) / x));
} else if (t_1 <= 2e+297) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((z * (a - t)) - (y * x)) / ((z * (y - b)) - y) t_2 = (a - t) / (y - b) t_3 = t_2 + (x / (1.0 - z)) tmp = 0 if t_1 <= -5e+302: tmp = t_3 elif t_1 <= -2e-294: tmp = t_1 elif t_1 <= 0.0: tmp = t_2 + (1.0 / ((1.0 - z) / x)) elif t_1 <= 2e+297: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(z * Float64(a - t)) - Float64(y * x)) / Float64(Float64(z * Float64(y - b)) - y)) t_2 = Float64(Float64(a - t) / Float64(y - b)) t_3 = Float64(t_2 + Float64(x / Float64(1.0 - z))) tmp = 0.0 if (t_1 <= -5e+302) tmp = t_3; elseif (t_1 <= -2e-294) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(t_2 + Float64(1.0 / Float64(Float64(1.0 - z) / x))); elseif (t_1 <= 2e+297) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((z * (a - t)) - (y * x)) / ((z * (y - b)) - y); t_2 = (a - t) / (y - b); t_3 = t_2 + (x / (1.0 - z)); tmp = 0.0; if (t_1 <= -5e+302) tmp = t_3; elseif (t_1 <= -2e-294) tmp = t_1; elseif (t_1 <= 0.0) tmp = t_2 + (1.0 / ((1.0 - z) / x)); elseif (t_1 <= 2e+297) 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[(z * N[(a - t), $MachinePrecision]), $MachinePrecision] - N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+302], t$95$3, If[LessEqual[t$95$1, -2e-294], t$95$1, If[LessEqual[t$95$1, 0.0], N[(t$95$2 + N[(1.0 / N[(N[(1.0 - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+297], t$95$1, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \left(a - t\right) - y \cdot x}{z \cdot \left(y - b\right) - y}\\
t_2 := \frac{a - t}{y - b}\\
t_3 := t\_2 + \frac{x}{1 - z}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+302}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-294}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t\_2 + \frac{1}{\frac{1 - z}{x}}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+297}:\\
\;\;\;\;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)))) < -5e302 or 2e297 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 19.8%
Simplified19.8%
Taylor expanded in a around 0 18.2%
+-commutative18.2%
mul-1-neg18.2%
unsub-neg18.2%
div-sub19.4%
unsub-neg19.4%
distribute-lft-neg-out19.4%
distribute-rgt-out19.8%
sub-neg19.8%
associate-/l*38.6%
associate-*r/66.1%
Simplified66.1%
Taylor expanded in z around inf 89.4%
Taylor expanded in y around inf 93.0%
if -5e302 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.00000000000000003e-294 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2e297Initial program 99.6%
if -2.00000000000000003e-294 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0Initial program 24.7%
Simplified24.7%
Taylor expanded in a around 0 24.7%
+-commutative24.7%
mul-1-neg24.7%
unsub-neg24.7%
div-sub24.7%
unsub-neg24.7%
distribute-lft-neg-out24.7%
distribute-rgt-out24.7%
sub-neg24.7%
associate-/l*31.4%
associate-*r/32.5%
Simplified32.5%
Taylor expanded in z around inf 57.5%
Taylor expanded in y around inf 71.8%
clear-num72.3%
inv-pow72.3%
sub-neg72.3%
metadata-eval72.3%
Applied egg-rr72.3%
unpow-172.3%
+-commutative72.3%
Simplified72.3%
Final simplification94.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- (* z (- a t)) (* y x)) (- (* z (- y b)) y)))
(t_2 (/ (- a t) (- y b))))
(if (<= t_1 -1e+251)
(+ t_2 (* x (/ y (+ y (* z (- b y))))))
(if (<= t_1 -2e-294)
t_1
(if (<= t_1 0.0)
(+ t_2 (/ 1.0 (/ (- 1.0 z) x)))
(if (<= t_1 2e+297) t_1 (+ t_2 (/ x (- 1.0 z)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((z * (a - t)) - (y * x)) / ((z * (y - b)) - y);
double t_2 = (a - t) / (y - b);
double tmp;
if (t_1 <= -1e+251) {
tmp = t_2 + (x * (y / (y + (z * (b - y)))));
} else if (t_1 <= -2e-294) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = t_2 + (1.0 / ((1.0 - z) / x));
} else if (t_1 <= 2e+297) {
tmp = t_1;
} else {
tmp = t_2 + (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((z * (a - t)) - (y * x)) / ((z * (y - b)) - y)
t_2 = (a - t) / (y - b)
if (t_1 <= (-1d+251)) then
tmp = t_2 + (x * (y / (y + (z * (b - y)))))
else if (t_1 <= (-2d-294)) then
tmp = t_1
else if (t_1 <= 0.0d0) then
tmp = t_2 + (1.0d0 / ((1.0d0 - z) / x))
else if (t_1 <= 2d+297) then
tmp = t_1
else
tmp = t_2 + (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 t_1 = ((z * (a - t)) - (y * x)) / ((z * (y - b)) - y);
double t_2 = (a - t) / (y - b);
double tmp;
if (t_1 <= -1e+251) {
tmp = t_2 + (x * (y / (y + (z * (b - y)))));
} else if (t_1 <= -2e-294) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = t_2 + (1.0 / ((1.0 - z) / x));
} else if (t_1 <= 2e+297) {
tmp = t_1;
} else {
tmp = t_2 + (x / (1.0 - z));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((z * (a - t)) - (y * x)) / ((z * (y - b)) - y) t_2 = (a - t) / (y - b) tmp = 0 if t_1 <= -1e+251: tmp = t_2 + (x * (y / (y + (z * (b - y))))) elif t_1 <= -2e-294: tmp = t_1 elif t_1 <= 0.0: tmp = t_2 + (1.0 / ((1.0 - z) / x)) elif t_1 <= 2e+297: tmp = t_1 else: tmp = t_2 + (x / (1.0 - z)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(z * Float64(a - t)) - Float64(y * x)) / Float64(Float64(z * Float64(y - b)) - y)) t_2 = Float64(Float64(a - t) / Float64(y - b)) tmp = 0.0 if (t_1 <= -1e+251) tmp = Float64(t_2 + Float64(x * Float64(y / Float64(y + Float64(z * Float64(b - y)))))); elseif (t_1 <= -2e-294) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(t_2 + Float64(1.0 / Float64(Float64(1.0 - z) / x))); elseif (t_1 <= 2e+297) tmp = t_1; else tmp = Float64(t_2 + Float64(x / Float64(1.0 - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((z * (a - t)) - (y * x)) / ((z * (y - b)) - y); t_2 = (a - t) / (y - b); tmp = 0.0; if (t_1 <= -1e+251) tmp = t_2 + (x * (y / (y + (z * (b - y))))); elseif (t_1 <= -2e-294) tmp = t_1; elseif (t_1 <= 0.0) tmp = t_2 + (1.0 / ((1.0 - z) / x)); elseif (t_1 <= 2e+297) tmp = t_1; else tmp = t_2 + (x / (1.0 - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision] - N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+251], N[(t$95$2 + N[(x * N[(y / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-294], t$95$1, If[LessEqual[t$95$1, 0.0], N[(t$95$2 + N[(1.0 / N[(N[(1.0 - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+297], t$95$1, N[(t$95$2 + N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \left(a - t\right) - y \cdot x}{z \cdot \left(y - b\right) - y}\\
t_2 := \frac{a - t}{y - b}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+251}:\\
\;\;\;\;t\_2 + x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-294}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t\_2 + \frac{1}{\frac{1 - z}{x}}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+297}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2 + \frac{x}{1 - z}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1e251Initial program 38.7%
Simplified38.7%
Taylor expanded in a around 0 37.7%
+-commutative37.7%
mul-1-neg37.7%
unsub-neg37.7%
div-sub37.7%
unsub-neg37.7%
distribute-lft-neg-out37.7%
distribute-rgt-out38.7%
sub-neg38.7%
associate-/l*58.9%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in z around inf 96.8%
if -1e251 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.00000000000000003e-294 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2e297Initial program 99.6%
if -2.00000000000000003e-294 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0Initial program 24.7%
Simplified24.7%
Taylor expanded in a around 0 24.7%
+-commutative24.7%
mul-1-neg24.7%
unsub-neg24.7%
div-sub24.7%
unsub-neg24.7%
distribute-lft-neg-out24.7%
distribute-rgt-out24.7%
sub-neg24.7%
associate-/l*31.4%
associate-*r/32.5%
Simplified32.5%
Taylor expanded in z around inf 57.5%
Taylor expanded in y around inf 71.8%
clear-num72.3%
inv-pow72.3%
sub-neg72.3%
metadata-eval72.3%
Applied egg-rr72.3%
unpow-172.3%
+-commutative72.3%
Simplified72.3%
if 2e297 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 16.2%
Simplified16.2%
Taylor expanded in a around 0 14.3%
+-commutative14.3%
mul-1-neg14.3%
unsub-neg14.3%
div-sub16.1%
unsub-neg16.1%
distribute-lft-neg-out16.1%
distribute-rgt-out16.2%
sub-neg16.2%
associate-/l*32.4%
associate-*r/49.8%
Simplified49.8%
Taylor expanded in z around inf 86.1%
Taylor expanded in y around inf 93.2%
Final simplification95.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (* z (- a t)) (* y x)))
(t_2 (/ t_1 (- (* z (- y b)) y)))
(t_3 (/ (- a t) (- y b))))
(if (<= t_2 -5e+302)
(+ t_3 (* x (/ y (+ y (* z (- b y))))))
(if (<= t_2 -2e-294)
(/ t_1 (- (- (* z y) (* z b)) y))
(if (<= t_2 0.0)
(+ t_3 (/ 1.0 (/ (- 1.0 z) x)))
(if (<= t_2 2e+297) t_2 (+ t_3 (/ x (- 1.0 z)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * (a - t)) - (y * x);
double t_2 = t_1 / ((z * (y - b)) - y);
double t_3 = (a - t) / (y - b);
double tmp;
if (t_2 <= -5e+302) {
tmp = t_3 + (x * (y / (y + (z * (b - y)))));
} else if (t_2 <= -2e-294) {
tmp = t_1 / (((z * y) - (z * b)) - y);
} else if (t_2 <= 0.0) {
tmp = t_3 + (1.0 / ((1.0 - z) / x));
} else if (t_2 <= 2e+297) {
tmp = t_2;
} else {
tmp = t_3 + (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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (z * (a - t)) - (y * x)
t_2 = t_1 / ((z * (y - b)) - y)
t_3 = (a - t) / (y - b)
if (t_2 <= (-5d+302)) then
tmp = t_3 + (x * (y / (y + (z * (b - y)))))
else if (t_2 <= (-2d-294)) then
tmp = t_1 / (((z * y) - (z * b)) - y)
else if (t_2 <= 0.0d0) then
tmp = t_3 + (1.0d0 / ((1.0d0 - z) / x))
else if (t_2 <= 2d+297) then
tmp = t_2
else
tmp = t_3 + (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 t_1 = (z * (a - t)) - (y * x);
double t_2 = t_1 / ((z * (y - b)) - y);
double t_3 = (a - t) / (y - b);
double tmp;
if (t_2 <= -5e+302) {
tmp = t_3 + (x * (y / (y + (z * (b - y)))));
} else if (t_2 <= -2e-294) {
tmp = t_1 / (((z * y) - (z * b)) - y);
} else if (t_2 <= 0.0) {
tmp = t_3 + (1.0 / ((1.0 - z) / x));
} else if (t_2 <= 2e+297) {
tmp = t_2;
} else {
tmp = t_3 + (x / (1.0 - z));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z * (a - t)) - (y * x) t_2 = t_1 / ((z * (y - b)) - y) t_3 = (a - t) / (y - b) tmp = 0 if t_2 <= -5e+302: tmp = t_3 + (x * (y / (y + (z * (b - y))))) elif t_2 <= -2e-294: tmp = t_1 / (((z * y) - (z * b)) - y) elif t_2 <= 0.0: tmp = t_3 + (1.0 / ((1.0 - z) / x)) elif t_2 <= 2e+297: tmp = t_2 else: tmp = t_3 + (x / (1.0 - z)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * Float64(a - t)) - Float64(y * x)) t_2 = Float64(t_1 / Float64(Float64(z * Float64(y - b)) - y)) t_3 = Float64(Float64(a - t) / Float64(y - b)) tmp = 0.0 if (t_2 <= -5e+302) tmp = Float64(t_3 + Float64(x * Float64(y / Float64(y + Float64(z * Float64(b - y)))))); elseif (t_2 <= -2e-294) tmp = Float64(t_1 / Float64(Float64(Float64(z * y) - Float64(z * b)) - y)); elseif (t_2 <= 0.0) tmp = Float64(t_3 + Float64(1.0 / Float64(Float64(1.0 - z) / x))); elseif (t_2 <= 2e+297) tmp = t_2; else tmp = Float64(t_3 + Float64(x / Float64(1.0 - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z * (a - t)) - (y * x); t_2 = t_1 / ((z * (y - b)) - y); t_3 = (a - t) / (y - b); tmp = 0.0; if (t_2 <= -5e+302) tmp = t_3 + (x * (y / (y + (z * (b - y))))); elseif (t_2 <= -2e-294) tmp = t_1 / (((z * y) - (z * b)) - y); elseif (t_2 <= 0.0) tmp = t_3 + (1.0 / ((1.0 - z) / x)); elseif (t_2 <= 2e+297) tmp = t_2; else tmp = t_3 + (x / (1.0 - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision] - N[(y * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+302], N[(t$95$3 + N[(x * N[(y / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -2e-294], N[(t$95$1 / N[(N[(N[(z * y), $MachinePrecision] - N[(z * b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[(t$95$3 + N[(1.0 / N[(N[(1.0 - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+297], t$95$2, N[(t$95$3 + N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(a - t\right) - y \cdot x\\
t_2 := \frac{t\_1}{z \cdot \left(y - b\right) - y}\\
t_3 := \frac{a - t}{y - b}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+302}:\\
\;\;\;\;t\_3 + x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-294}:\\
\;\;\;\;\frac{t\_1}{\left(z \cdot y - z \cdot b\right) - y}\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t\_3 + \frac{1}{\frac{1 - z}{x}}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+297}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3 + \frac{x}{1 - z}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5e302Initial program 27.5%
Simplified27.5%
Taylor expanded in a around 0 26.3%
+-commutative26.3%
mul-1-neg26.3%
unsub-neg26.3%
div-sub26.3%
unsub-neg26.3%
distribute-lft-neg-out26.3%
distribute-rgt-out27.5%
sub-neg27.5%
associate-/l*51.4%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in z around inf 96.3%
if -5e302 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.00000000000000003e-294Initial program 99.7%
Simplified99.7%
sub-neg99.7%
distribute-lft-in99.8%
Applied egg-rr99.8%
if -2.00000000000000003e-294 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0Initial program 24.7%
Simplified24.7%
Taylor expanded in a around 0 24.7%
+-commutative24.7%
mul-1-neg24.7%
unsub-neg24.7%
div-sub24.7%
unsub-neg24.7%
distribute-lft-neg-out24.7%
distribute-rgt-out24.7%
sub-neg24.7%
associate-/l*31.4%
associate-*r/32.5%
Simplified32.5%
Taylor expanded in z around inf 57.5%
Taylor expanded in y around inf 71.8%
clear-num72.3%
inv-pow72.3%
sub-neg72.3%
metadata-eval72.3%
Applied egg-rr72.3%
unpow-172.3%
+-commutative72.3%
Simplified72.3%
if 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2e297Initial program 99.5%
if 2e297 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 16.2%
Simplified16.2%
Taylor expanded in a around 0 14.3%
+-commutative14.3%
mul-1-neg14.3%
unsub-neg14.3%
div-sub16.1%
unsub-neg16.1%
distribute-lft-neg-out16.1%
distribute-rgt-out16.2%
sub-neg16.2%
associate-/l*32.4%
associate-*r/49.8%
Simplified49.8%
Taylor expanded in z around inf 86.1%
Taylor expanded in y around inf 93.2%
Final simplification95.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- a t) (- y b))) (t_2 (+ t_1 (/ x (- 1.0 z)))))
(if (<= z -1.5e-89)
t_2
(if (<= z -2.8e-150)
(/ (+ (* y x) (* z (- t a))) (* z b))
(if (<= z -5.2e-174)
t_2
(if (<= z 1.3e-82)
(* x (/ y (+ y (* z b))))
(if (<= z 1.36e+17)
(* z (/ (- a t) (- (* z (- y b)) y)))
(+ t_1 (/ 1.0 (/ (- 1.0 z) x))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - t) / (y - b);
double t_2 = t_1 + (x / (1.0 - z));
double tmp;
if (z <= -1.5e-89) {
tmp = t_2;
} else if (z <= -2.8e-150) {
tmp = ((y * x) + (z * (t - a))) / (z * b);
} else if (z <= -5.2e-174) {
tmp = t_2;
} else if (z <= 1.3e-82) {
tmp = x * (y / (y + (z * b)));
} else if (z <= 1.36e+17) {
tmp = z * ((a - t) / ((z * (y - b)) - y));
} else {
tmp = t_1 + (1.0 / ((1.0 - z) / 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (a - t) / (y - b)
t_2 = t_1 + (x / (1.0d0 - z))
if (z <= (-1.5d-89)) then
tmp = t_2
else if (z <= (-2.8d-150)) then
tmp = ((y * x) + (z * (t - a))) / (z * b)
else if (z <= (-5.2d-174)) then
tmp = t_2
else if (z <= 1.3d-82) then
tmp = x * (y / (y + (z * b)))
else if (z <= 1.36d+17) then
tmp = z * ((a - t) / ((z * (y - b)) - y))
else
tmp = t_1 + (1.0d0 / ((1.0d0 - z) / x))
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 - t) / (y - b);
double t_2 = t_1 + (x / (1.0 - z));
double tmp;
if (z <= -1.5e-89) {
tmp = t_2;
} else if (z <= -2.8e-150) {
tmp = ((y * x) + (z * (t - a))) / (z * b);
} else if (z <= -5.2e-174) {
tmp = t_2;
} else if (z <= 1.3e-82) {
tmp = x * (y / (y + (z * b)));
} else if (z <= 1.36e+17) {
tmp = z * ((a - t) / ((z * (y - b)) - y));
} else {
tmp = t_1 + (1.0 / ((1.0 - z) / x));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a - t) / (y - b) t_2 = t_1 + (x / (1.0 - z)) tmp = 0 if z <= -1.5e-89: tmp = t_2 elif z <= -2.8e-150: tmp = ((y * x) + (z * (t - a))) / (z * b) elif z <= -5.2e-174: tmp = t_2 elif z <= 1.3e-82: tmp = x * (y / (y + (z * b))) elif z <= 1.36e+17: tmp = z * ((a - t) / ((z * (y - b)) - y)) else: tmp = t_1 + (1.0 / ((1.0 - z) / x)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - t) / Float64(y - b)) t_2 = Float64(t_1 + Float64(x / Float64(1.0 - z))) tmp = 0.0 if (z <= -1.5e-89) tmp = t_2; elseif (z <= -2.8e-150) tmp = Float64(Float64(Float64(y * x) + Float64(z * Float64(t - a))) / Float64(z * b)); elseif (z <= -5.2e-174) tmp = t_2; elseif (z <= 1.3e-82) tmp = Float64(x * Float64(y / Float64(y + Float64(z * b)))); elseif (z <= 1.36e+17) tmp = Float64(z * Float64(Float64(a - t) / Float64(Float64(z * Float64(y - b)) - y))); else tmp = Float64(t_1 + Float64(1.0 / Float64(Float64(1.0 - z) / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a - t) / (y - b); t_2 = t_1 + (x / (1.0 - z)); tmp = 0.0; if (z <= -1.5e-89) tmp = t_2; elseif (z <= -2.8e-150) tmp = ((y * x) + (z * (t - a))) / (z * b); elseif (z <= -5.2e-174) tmp = t_2; elseif (z <= 1.3e-82) tmp = x * (y / (y + (z * b))); elseif (z <= 1.36e+17) tmp = z * ((a - t) / ((z * (y - b)) - y)); else tmp = t_1 + (1.0 / ((1.0 - z) / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.5e-89], t$95$2, If[LessEqual[z, -2.8e-150], N[(N[(N[(y * x), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.2e-174], t$95$2, If[LessEqual[z, 1.3e-82], N[(x * N[(y / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.36e+17], N[(z * N[(N[(a - t), $MachinePrecision] / N[(N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(1.0 / N[(N[(1.0 - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a - t}{y - b}\\
t_2 := t\_1 + \frac{x}{1 - z}\\
\mathbf{if}\;z \leq -1.5 \cdot 10^{-89}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-150}:\\
\;\;\;\;\frac{y \cdot x + z \cdot \left(t - a\right)}{z \cdot b}\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{-174}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-82}:\\
\;\;\;\;x \cdot \frac{y}{y + z \cdot b}\\
\mathbf{elif}\;z \leq 1.36 \cdot 10^{+17}:\\
\;\;\;\;z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \frac{1}{\frac{1 - z}{x}}\\
\end{array}
\end{array}
if z < -1.5e-89 or -2.79999999999999996e-150 < z < -5.2000000000000004e-174Initial program 61.3%
Simplified61.3%
Taylor expanded in a around 0 61.2%
+-commutative61.2%
mul-1-neg61.2%
unsub-neg61.2%
div-sub61.2%
unsub-neg61.2%
distribute-lft-neg-out61.2%
distribute-rgt-out61.4%
sub-neg61.4%
associate-/l*63.0%
associate-*r/68.2%
Simplified68.2%
Taylor expanded in z around inf 81.8%
Taylor expanded in y around inf 78.2%
if -1.5e-89 < z < -2.79999999999999996e-150Initial program 81.9%
Simplified81.9%
Taylor expanded in b around inf 75.9%
associate-*r/75.9%
*-commutative75.9%
cancel-sign-sub-inv75.9%
*-commutative75.9%
+-commutative75.9%
distribute-lft-in75.9%
neg-mul-175.9%
distribute-rgt-neg-in75.9%
remove-double-neg75.9%
*-commutative75.9%
neg-mul-175.9%
unsub-neg75.9%
Simplified75.9%
if -5.2000000000000004e-174 < z < 1.3e-82Initial program 79.4%
Simplified79.4%
Taylor expanded in x around inf 50.9%
associate-*r/68.8%
neg-mul-168.8%
distribute-rgt-neg-in68.8%
distribute-neg-frac68.8%
Simplified68.8%
Taylor expanded in y around 0 68.8%
mul-1-neg68.8%
distribute-lft-neg-out68.8%
*-commutative68.8%
Simplified68.8%
if 1.3e-82 < z < 1.36e17Initial program 96.0%
Simplified96.0%
Taylor expanded in x around 0 81.4%
associate-/l*81.2%
Simplified81.2%
if 1.36e17 < z Initial program 43.6%
Simplified43.6%
Taylor expanded in a around 0 43.3%
+-commutative43.3%
mul-1-neg43.3%
unsub-neg43.3%
div-sub43.3%
unsub-neg43.3%
distribute-lft-neg-out43.3%
distribute-rgt-out43.6%
sub-neg43.6%
associate-/l*58.1%
associate-*r/60.4%
Simplified60.4%
Taylor expanded in z around inf 86.0%
Taylor expanded in y around inf 89.8%
clear-num90.0%
inv-pow90.0%
sub-neg90.0%
metadata-eval90.0%
Applied egg-rr90.0%
unpow-190.0%
+-commutative90.0%
Simplified90.0%
Final simplification78.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ (- a t) (- y b)) (/ x (- 1.0 z)))))
(if (<= z -6.2e-93)
t_1
(if (<= z -2.8e-150)
(/ (+ (* y x) (* z (- t a))) (* z b))
(if (<= z -7.8e-174)
t_1
(if (<= z 2.1e-83)
(* x (/ y (+ y (* z b))))
(if (<= z 9.2e+17) (* z (/ (- a t) (- (* z (- y b)) y))) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((a - t) / (y - b)) + (x / (1.0 - z));
double tmp;
if (z <= -6.2e-93) {
tmp = t_1;
} else if (z <= -2.8e-150) {
tmp = ((y * x) + (z * (t - a))) / (z * b);
} else if (z <= -7.8e-174) {
tmp = t_1;
} else if (z <= 2.1e-83) {
tmp = x * (y / (y + (z * b)));
} else if (z <= 9.2e+17) {
tmp = z * ((a - t) / ((z * (y - b)) - 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 = ((a - t) / (y - b)) + (x / (1.0d0 - z))
if (z <= (-6.2d-93)) then
tmp = t_1
else if (z <= (-2.8d-150)) then
tmp = ((y * x) + (z * (t - a))) / (z * b)
else if (z <= (-7.8d-174)) then
tmp = t_1
else if (z <= 2.1d-83) then
tmp = x * (y / (y + (z * b)))
else if (z <= 9.2d+17) then
tmp = z * ((a - t) / ((z * (y - b)) - 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 = ((a - t) / (y - b)) + (x / (1.0 - z));
double tmp;
if (z <= -6.2e-93) {
tmp = t_1;
} else if (z <= -2.8e-150) {
tmp = ((y * x) + (z * (t - a))) / (z * b);
} else if (z <= -7.8e-174) {
tmp = t_1;
} else if (z <= 2.1e-83) {
tmp = x * (y / (y + (z * b)));
} else if (z <= 9.2e+17) {
tmp = z * ((a - t) / ((z * (y - b)) - y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((a - t) / (y - b)) + (x / (1.0 - z)) tmp = 0 if z <= -6.2e-93: tmp = t_1 elif z <= -2.8e-150: tmp = ((y * x) + (z * (t - a))) / (z * b) elif z <= -7.8e-174: tmp = t_1 elif z <= 2.1e-83: tmp = x * (y / (y + (z * b))) elif z <= 9.2e+17: tmp = z * ((a - t) / ((z * (y - b)) - y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(a - t) / Float64(y - b)) + Float64(x / Float64(1.0 - z))) tmp = 0.0 if (z <= -6.2e-93) tmp = t_1; elseif (z <= -2.8e-150) tmp = Float64(Float64(Float64(y * x) + Float64(z * Float64(t - a))) / Float64(z * b)); elseif (z <= -7.8e-174) tmp = t_1; elseif (z <= 2.1e-83) tmp = Float64(x * Float64(y / Float64(y + Float64(z * b)))); elseif (z <= 9.2e+17) tmp = Float64(z * Float64(Float64(a - t) / Float64(Float64(z * Float64(y - b)) - y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((a - t) / (y - b)) + (x / (1.0 - z)); tmp = 0.0; if (z <= -6.2e-93) tmp = t_1; elseif (z <= -2.8e-150) tmp = ((y * x) + (z * (t - a))) / (z * b); elseif (z <= -7.8e-174) tmp = t_1; elseif (z <= 2.1e-83) tmp = x * (y / (y + (z * b))); elseif (z <= 9.2e+17) tmp = z * ((a - t) / ((z * (y - b)) - y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision] + N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.2e-93], t$95$1, If[LessEqual[z, -2.8e-150], N[(N[(N[(y * x), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.8e-174], t$95$1, If[LessEqual[z, 2.1e-83], N[(x * N[(y / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.2e+17], N[(z * N[(N[(a - t), $MachinePrecision] / N[(N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a - t}{y - b} + \frac{x}{1 - z}\\
\mathbf{if}\;z \leq -6.2 \cdot 10^{-93}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-150}:\\
\;\;\;\;\frac{y \cdot x + z \cdot \left(t - a\right)}{z \cdot b}\\
\mathbf{elif}\;z \leq -7.8 \cdot 10^{-174}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-83}:\\
\;\;\;\;x \cdot \frac{y}{y + z \cdot b}\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{+17}:\\
\;\;\;\;z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.19999999999999999e-93 or -2.79999999999999996e-150 < z < -7.7999999999999997e-174 or 9.2e17 < z Initial program 52.8%
Simplified52.8%
Taylor expanded in a around 0 52.6%
+-commutative52.6%
mul-1-neg52.6%
unsub-neg52.6%
div-sub52.6%
unsub-neg52.6%
distribute-lft-neg-out52.6%
distribute-rgt-out52.9%
sub-neg52.9%
associate-/l*60.6%
associate-*r/64.4%
Simplified64.4%
Taylor expanded in z around inf 83.8%
Taylor expanded in y around inf 83.7%
if -6.19999999999999999e-93 < z < -2.79999999999999996e-150Initial program 81.9%
Simplified81.9%
Taylor expanded in b around inf 75.9%
associate-*r/75.9%
*-commutative75.9%
cancel-sign-sub-inv75.9%
*-commutative75.9%
+-commutative75.9%
distribute-lft-in75.9%
neg-mul-175.9%
distribute-rgt-neg-in75.9%
remove-double-neg75.9%
*-commutative75.9%
neg-mul-175.9%
unsub-neg75.9%
Simplified75.9%
if -7.7999999999999997e-174 < z < 2.0999999999999999e-83Initial program 79.4%
Simplified79.4%
Taylor expanded in x around inf 50.9%
associate-*r/68.8%
neg-mul-168.8%
distribute-rgt-neg-in68.8%
distribute-neg-frac68.8%
Simplified68.8%
Taylor expanded in y around 0 68.8%
mul-1-neg68.8%
distribute-lft-neg-out68.8%
*-commutative68.8%
Simplified68.8%
if 2.0999999999999999e-83 < z < 9.2e17Initial program 96.0%
Simplified96.0%
Taylor expanded in x around 0 81.4%
associate-/l*81.2%
Simplified81.2%
Final simplification78.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- a t) (- y b))))
(if (<= z -1.65e+38)
(- t_1 (/ x z))
(if (<= z 1.4e+22)
(+
(/ (* z (- a t)) (- (* z (- y b)) y))
(* x (/ y (+ y (* z (- b y))))))
(+ t_1 (/ 1.0 (/ (- 1.0 z) x)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - t) / (y - b);
double tmp;
if (z <= -1.65e+38) {
tmp = t_1 - (x / z);
} else if (z <= 1.4e+22) {
tmp = ((z * (a - t)) / ((z * (y - b)) - y)) + (x * (y / (y + (z * (b - y)))));
} else {
tmp = t_1 + (1.0 / ((1.0 - z) / 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) :: t_1
real(8) :: tmp
t_1 = (a - t) / (y - b)
if (z <= (-1.65d+38)) then
tmp = t_1 - (x / z)
else if (z <= 1.4d+22) then
tmp = ((z * (a - t)) / ((z * (y - b)) - y)) + (x * (y / (y + (z * (b - y)))))
else
tmp = t_1 + (1.0d0 / ((1.0d0 - z) / x))
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 - t) / (y - b);
double tmp;
if (z <= -1.65e+38) {
tmp = t_1 - (x / z);
} else if (z <= 1.4e+22) {
tmp = ((z * (a - t)) / ((z * (y - b)) - y)) + (x * (y / (y + (z * (b - y)))));
} else {
tmp = t_1 + (1.0 / ((1.0 - z) / x));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a - t) / (y - b) tmp = 0 if z <= -1.65e+38: tmp = t_1 - (x / z) elif z <= 1.4e+22: tmp = ((z * (a - t)) / ((z * (y - b)) - y)) + (x * (y / (y + (z * (b - y))))) else: tmp = t_1 + (1.0 / ((1.0 - z) / x)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - t) / Float64(y - b)) tmp = 0.0 if (z <= -1.65e+38) tmp = Float64(t_1 - Float64(x / z)); elseif (z <= 1.4e+22) tmp = Float64(Float64(Float64(z * Float64(a - t)) / Float64(Float64(z * Float64(y - b)) - y)) + Float64(x * Float64(y / Float64(y + Float64(z * Float64(b - y)))))); else tmp = Float64(t_1 + Float64(1.0 / Float64(Float64(1.0 - z) / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a - t) / (y - b); tmp = 0.0; if (z <= -1.65e+38) tmp = t_1 - (x / z); elseif (z <= 1.4e+22) tmp = ((z * (a - t)) / ((z * (y - b)) - y)) + (x * (y / (y + (z * (b - y))))); else tmp = t_1 + (1.0 / ((1.0 - z) / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.65e+38], N[(t$95$1 - N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e+22], N[(N[(N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] + N[(x * N[(y / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(1.0 / N[(N[(1.0 - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a - t}{y - b}\\
\mathbf{if}\;z \leq -1.65 \cdot 10^{+38}:\\
\;\;\;\;t\_1 - \frac{x}{z}\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+22}:\\
\;\;\;\;\frac{z \cdot \left(a - t\right)}{z \cdot \left(y - b\right) - y} + x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \frac{1}{\frac{1 - z}{x}}\\
\end{array}
\end{array}
if z < -1.65e38Initial program 50.0%
Simplified50.0%
Taylor expanded in a around 0 49.8%
+-commutative49.8%
mul-1-neg49.8%
unsub-neg49.8%
div-sub49.8%
unsub-neg49.8%
distribute-lft-neg-out49.8%
distribute-rgt-out50.1%
sub-neg50.1%
associate-/l*54.3%
associate-*r/56.6%
Simplified56.6%
Taylor expanded in z around inf 84.3%
Taylor expanded in y around inf 90.3%
Taylor expanded in z around inf 90.3%
if -1.65e38 < z < 1.4e22Initial program 83.6%
Simplified83.6%
div-sub83.7%
associate-/l*96.1%
Applied egg-rr96.1%
if 1.4e22 < z Initial program 43.6%
Simplified43.6%
Taylor expanded in a around 0 43.3%
+-commutative43.3%
mul-1-neg43.3%
unsub-neg43.3%
div-sub43.3%
unsub-neg43.3%
distribute-lft-neg-out43.3%
distribute-rgt-out43.6%
sub-neg43.6%
associate-/l*58.1%
associate-*r/60.4%
Simplified60.4%
Taylor expanded in z around inf 86.0%
Taylor expanded in y around inf 89.8%
clear-num90.0%
inv-pow90.0%
sub-neg90.0%
metadata-eval90.0%
Applied egg-rr90.0%
unpow-190.0%
+-commutative90.0%
Simplified90.0%
Final simplification93.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))) (t_2 (/ a (- y b))) (t_3 (/ x (- 1.0 z))))
(if (<= y -2.35e+36)
t_3
(if (<= y -2.05e-172)
t_1
(if (<= y -1e-248)
t_2
(if (<= y 1.75e-268) t_1 (if (<= y 11.2) t_2 t_3)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double t_2 = a / (y - b);
double t_3 = x / (1.0 - z);
double tmp;
if (y <= -2.35e+36) {
tmp = t_3;
} else if (y <= -2.05e-172) {
tmp = t_1;
} else if (y <= -1e-248) {
tmp = t_2;
} else if (y <= 1.75e-268) {
tmp = t_1;
} else if (y <= 11.2) {
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) :: tmp
t_1 = t / (b - y)
t_2 = a / (y - b)
t_3 = x / (1.0d0 - z)
if (y <= (-2.35d+36)) then
tmp = t_3
else if (y <= (-2.05d-172)) then
tmp = t_1
else if (y <= (-1d-248)) then
tmp = t_2
else if (y <= 1.75d-268) then
tmp = t_1
else if (y <= 11.2d0) 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 = t / (b - y);
double t_2 = a / (y - b);
double t_3 = x / (1.0 - z);
double tmp;
if (y <= -2.35e+36) {
tmp = t_3;
} else if (y <= -2.05e-172) {
tmp = t_1;
} else if (y <= -1e-248) {
tmp = t_2;
} else if (y <= 1.75e-268) {
tmp = t_1;
} else if (y <= 11.2) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) t_2 = a / (y - b) t_3 = x / (1.0 - z) tmp = 0 if y <= -2.35e+36: tmp = t_3 elif y <= -2.05e-172: tmp = t_1 elif y <= -1e-248: tmp = t_2 elif y <= 1.75e-268: tmp = t_1 elif y <= 11.2: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) t_2 = Float64(a / Float64(y - b)) t_3 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -2.35e+36) tmp = t_3; elseif (y <= -2.05e-172) tmp = t_1; elseif (y <= -1e-248) tmp = t_2; elseif (y <= 1.75e-268) tmp = t_1; elseif (y <= 11.2) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t / (b - y); t_2 = a / (y - b); t_3 = x / (1.0 - z); tmp = 0.0; if (y <= -2.35e+36) tmp = t_3; elseif (y <= -2.05e-172) tmp = t_1; elseif (y <= -1e-248) tmp = t_2; elseif (y <= 1.75e-268) tmp = t_1; elseif (y <= 11.2) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a / N[(y - b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.35e+36], t$95$3, If[LessEqual[y, -2.05e-172], t$95$1, If[LessEqual[y, -1e-248], t$95$2, If[LessEqual[y, 1.75e-268], t$95$1, If[LessEqual[y, 11.2], t$95$2, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
t_2 := \frac{a}{y - b}\\
t_3 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -2.35 \cdot 10^{+36}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq -2.05 \cdot 10^{-172}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1 \cdot 10^{-248}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{-268}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 11.2:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y < -2.34999999999999994e36 or 11.199999999999999 < y Initial program 49.7%
Simplified49.7%
Taylor expanded in y around -inf 62.4%
mul-1-neg62.4%
unsub-neg62.4%
Simplified62.4%
if -2.34999999999999994e36 < y < -2.05e-172 or -9.9999999999999998e-249 < y < 1.75000000000000003e-268Initial program 81.1%
Simplified81.1%
Taylor expanded in a around 0 79.2%
+-commutative79.2%
mul-1-neg79.2%
unsub-neg79.2%
div-sub80.6%
unsub-neg80.6%
distribute-lft-neg-out80.6%
distribute-rgt-out81.1%
sub-neg81.1%
associate-/l*85.0%
associate-*r/84.7%
Simplified84.7%
Taylor expanded in z around inf 81.8%
Taylor expanded in y around inf 57.8%
Taylor expanded in t around inf 44.7%
associate-*r/44.7%
neg-mul-144.7%
Simplified44.7%
if -2.05e-172 < y < -9.9999999999999998e-249 or 1.75000000000000003e-268 < y < 11.199999999999999Initial program 83.9%
Simplified83.9%
Taylor expanded in a around inf 41.9%
*-commutative41.9%
Simplified41.9%
Taylor expanded in z around inf 46.6%
Final simplification53.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (/ (- a t) (- y b)) (/ x z))))
(if (<= z -1.75e+36)
t_1
(if (<= z 1.6e-81)
(* x (/ y (+ y (* z (- b y)))))
(if (<= z 2.1e+16) (* z (/ (- a t) (- (* z (- y b)) y))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((a - t) / (y - b)) - (x / z);
double tmp;
if (z <= -1.75e+36) {
tmp = t_1;
} else if (z <= 1.6e-81) {
tmp = x * (y / (y + (z * (b - y))));
} else if (z <= 2.1e+16) {
tmp = z * ((a - t) / ((z * (y - b)) - 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 = ((a - t) / (y - b)) - (x / z)
if (z <= (-1.75d+36)) then
tmp = t_1
else if (z <= 1.6d-81) then
tmp = x * (y / (y + (z * (b - y))))
else if (z <= 2.1d+16) then
tmp = z * ((a - t) / ((z * (y - b)) - 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 = ((a - t) / (y - b)) - (x / z);
double tmp;
if (z <= -1.75e+36) {
tmp = t_1;
} else if (z <= 1.6e-81) {
tmp = x * (y / (y + (z * (b - y))));
} else if (z <= 2.1e+16) {
tmp = z * ((a - t) / ((z * (y - b)) - y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((a - t) / (y - b)) - (x / z) tmp = 0 if z <= -1.75e+36: tmp = t_1 elif z <= 1.6e-81: tmp = x * (y / (y + (z * (b - y)))) elif z <= 2.1e+16: tmp = z * ((a - t) / ((z * (y - b)) - y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(a - t) / Float64(y - b)) - Float64(x / z)) tmp = 0.0 if (z <= -1.75e+36) tmp = t_1; elseif (z <= 1.6e-81) tmp = Float64(x * Float64(y / Float64(y + Float64(z * Float64(b - y))))); elseif (z <= 2.1e+16) tmp = Float64(z * Float64(Float64(a - t) / Float64(Float64(z * Float64(y - b)) - y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((a - t) / (y - b)) - (x / z); tmp = 0.0; if (z <= -1.75e+36) tmp = t_1; elseif (z <= 1.6e-81) tmp = x * (y / (y + (z * (b - y)))); elseif (z <= 2.1e+16) tmp = z * ((a - t) / ((z * (y - b)) - y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.75e+36], t$95$1, If[LessEqual[z, 1.6e-81], N[(x * N[(y / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+16], N[(z * N[(N[(a - t), $MachinePrecision] / N[(N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a - t}{y - b} - \frac{x}{z}\\
\mathbf{if}\;z \leq -1.75 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-81}:\\
\;\;\;\;x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+16}:\\
\;\;\;\;z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.7499999999999999e36 or 2.1e16 < z Initial program 46.3%
Simplified46.3%
Taylor expanded in a around 0 46.0%
+-commutative46.0%
mul-1-neg46.0%
unsub-neg46.0%
div-sub46.0%
unsub-neg46.0%
distribute-lft-neg-out46.0%
distribute-rgt-out46.3%
sub-neg46.3%
associate-/l*56.5%
associate-*r/58.8%
Simplified58.8%
Taylor expanded in z around inf 85.2%
Taylor expanded in y around inf 90.0%
Taylor expanded in z around inf 90.0%
if -1.7499999999999999e36 < z < 1.6e-81Initial program 80.8%
Simplified80.8%
Taylor expanded in x around inf 48.1%
associate-*r/62.5%
neg-mul-162.5%
distribute-rgt-neg-in62.5%
distribute-neg-frac62.5%
Simplified62.5%
if 1.6e-81 < z < 2.1e16Initial program 96.0%
Simplified96.0%
Taylor expanded in x around 0 81.4%
associate-/l*81.2%
Simplified81.2%
Final simplification76.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ (- a t) (- y b)) (/ x (- 1.0 z)))))
(if (<= z -7.8e-174)
t_1
(if (<= z 9e-85)
(* x (/ y (+ y (* z b))))
(if (<= z 2.1e+16) (* z (/ (- a t) (- (* z (- y b)) y))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((a - t) / (y - b)) + (x / (1.0 - z));
double tmp;
if (z <= -7.8e-174) {
tmp = t_1;
} else if (z <= 9e-85) {
tmp = x * (y / (y + (z * b)));
} else if (z <= 2.1e+16) {
tmp = z * ((a - t) / ((z * (y - b)) - 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 = ((a - t) / (y - b)) + (x / (1.0d0 - z))
if (z <= (-7.8d-174)) then
tmp = t_1
else if (z <= 9d-85) then
tmp = x * (y / (y + (z * b)))
else if (z <= 2.1d+16) then
tmp = z * ((a - t) / ((z * (y - b)) - 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 = ((a - t) / (y - b)) + (x / (1.0 - z));
double tmp;
if (z <= -7.8e-174) {
tmp = t_1;
} else if (z <= 9e-85) {
tmp = x * (y / (y + (z * b)));
} else if (z <= 2.1e+16) {
tmp = z * ((a - t) / ((z * (y - b)) - y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((a - t) / (y - b)) + (x / (1.0 - z)) tmp = 0 if z <= -7.8e-174: tmp = t_1 elif z <= 9e-85: tmp = x * (y / (y + (z * b))) elif z <= 2.1e+16: tmp = z * ((a - t) / ((z * (y - b)) - y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(a - t) / Float64(y - b)) + Float64(x / Float64(1.0 - z))) tmp = 0.0 if (z <= -7.8e-174) tmp = t_1; elseif (z <= 9e-85) tmp = Float64(x * Float64(y / Float64(y + Float64(z * b)))); elseif (z <= 2.1e+16) tmp = Float64(z * Float64(Float64(a - t) / Float64(Float64(z * Float64(y - b)) - y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((a - t) / (y - b)) + (x / (1.0 - z)); tmp = 0.0; if (z <= -7.8e-174) tmp = t_1; elseif (z <= 9e-85) tmp = x * (y / (y + (z * b))); elseif (z <= 2.1e+16) tmp = z * ((a - t) / ((z * (y - b)) - y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision] + N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.8e-174], t$95$1, If[LessEqual[z, 9e-85], N[(x * N[(y / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+16], N[(z * N[(N[(a - t), $MachinePrecision] / N[(N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a - t}{y - b} + \frac{x}{1 - z}\\
\mathbf{if}\;z \leq -7.8 \cdot 10^{-174}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-85}:\\
\;\;\;\;x \cdot \frac{y}{y + z \cdot b}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+16}:\\
\;\;\;\;z \cdot \frac{a - t}{z \cdot \left(y - b\right) - y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.7999999999999997e-174 or 2.1e16 < z Initial program 55.8%
Simplified55.8%
Taylor expanded in a around 0 55.0%
+-commutative55.0%
mul-1-neg55.0%
unsub-neg55.0%
div-sub55.6%
unsub-neg55.6%
distribute-lft-neg-out55.6%
distribute-rgt-out55.8%
sub-neg55.8%
associate-/l*62.2%
associate-*r/65.9%
Simplified65.9%
Taylor expanded in z around inf 83.9%
Taylor expanded in y around inf 80.2%
if -7.7999999999999997e-174 < z < 9.00000000000000008e-85Initial program 79.4%
Simplified79.4%
Taylor expanded in x around inf 50.9%
associate-*r/68.8%
neg-mul-168.8%
distribute-rgt-neg-in68.8%
distribute-neg-frac68.8%
Simplified68.8%
Taylor expanded in y around 0 68.8%
mul-1-neg68.8%
distribute-lft-neg-out68.8%
*-commutative68.8%
Simplified68.8%
if 9.00000000000000008e-85 < z < 2.1e16Initial program 96.0%
Simplified96.0%
Taylor expanded in x around 0 81.4%
associate-/l*81.2%
Simplified81.2%
Final simplification77.0%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= y -2.9e+41)
(and (not (<= y 12.0)) (or (<= y 1.35e+101) (not (<= y 6e+159)))))
(/ x (- 1.0 z))
(/ (- a t) (- y b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.9e+41) || (!(y <= 12.0) && ((y <= 1.35e+101) || !(y <= 6e+159)))) {
tmp = x / (1.0 - z);
} else {
tmp = (a - t) / (y - 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 <= (-2.9d+41)) .or. (.not. (y <= 12.0d0)) .and. (y <= 1.35d+101) .or. (.not. (y <= 6d+159))) then
tmp = x / (1.0d0 - z)
else
tmp = (a - t) / (y - 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 <= -2.9e+41) || (!(y <= 12.0) && ((y <= 1.35e+101) || !(y <= 6e+159)))) {
tmp = x / (1.0 - z);
} else {
tmp = (a - t) / (y - b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.9e+41) or (not (y <= 12.0) and ((y <= 1.35e+101) or not (y <= 6e+159))): tmp = x / (1.0 - z) else: tmp = (a - t) / (y - b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.9e+41) || (!(y <= 12.0) && ((y <= 1.35e+101) || !(y <= 6e+159)))) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(Float64(a - t) / Float64(y - b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.9e+41) || (~((y <= 12.0)) && ((y <= 1.35e+101) || ~((y <= 6e+159))))) tmp = x / (1.0 - z); else tmp = (a - t) / (y - b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.9e+41], And[N[Not[LessEqual[y, 12.0]], $MachinePrecision], Or[LessEqual[y, 1.35e+101], N[Not[LessEqual[y, 6e+159]], $MachinePrecision]]]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+41} \lor \neg \left(y \leq 12\right) \land \left(y \leq 1.35 \cdot 10^{+101} \lor \neg \left(y \leq 6 \cdot 10^{+159}\right)\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{a - t}{y - b}\\
\end{array}
\end{array}
if y < -2.89999999999999988e41 or 12 < y < 1.35000000000000003e101 or 6.0000000000000004e159 < y Initial program 50.1%
Simplified50.1%
Taylor expanded in y around -inf 66.7%
mul-1-neg66.7%
unsub-neg66.7%
Simplified66.7%
if -2.89999999999999988e41 < y < 12 or 1.35000000000000003e101 < y < 6.0000000000000004e159Initial program 79.3%
Simplified79.3%
Taylor expanded in z around inf 66.3%
Final simplification66.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- a t) (- y b))) (t_2 (/ x (- 1.0 z))))
(if (<= y -1.4e+45)
t_2
(if (<= y 11.2)
t_1
(if (<= y 1.85e+101)
(* x (/ y (- y (* z y))))
(if (<= y 6e+159) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - t) / (y - b);
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -1.4e+45) {
tmp = t_2;
} else if (y <= 11.2) {
tmp = t_1;
} else if (y <= 1.85e+101) {
tmp = x * (y / (y - (z * y)));
} else if (y <= 6e+159) {
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 - t) / (y - b)
t_2 = x / (1.0d0 - z)
if (y <= (-1.4d+45)) then
tmp = t_2
else if (y <= 11.2d0) then
tmp = t_1
else if (y <= 1.85d+101) then
tmp = x * (y / (y - (z * y)))
else if (y <= 6d+159) 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 - t) / (y - b);
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -1.4e+45) {
tmp = t_2;
} else if (y <= 11.2) {
tmp = t_1;
} else if (y <= 1.85e+101) {
tmp = x * (y / (y - (z * y)));
} else if (y <= 6e+159) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a - t) / (y - b) t_2 = x / (1.0 - z) tmp = 0 if y <= -1.4e+45: tmp = t_2 elif y <= 11.2: tmp = t_1 elif y <= 1.85e+101: tmp = x * (y / (y - (z * y))) elif y <= 6e+159: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - t) / Float64(y - b)) t_2 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -1.4e+45) tmp = t_2; elseif (y <= 11.2) tmp = t_1; elseif (y <= 1.85e+101) tmp = Float64(x * Float64(y / Float64(y - Float64(z * y)))); elseif (y <= 6e+159) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a - t) / (y - b); t_2 = x / (1.0 - z); tmp = 0.0; if (y <= -1.4e+45) tmp = t_2; elseif (y <= 11.2) tmp = t_1; elseif (y <= 1.85e+101) tmp = x * (y / (y - (z * y))); elseif (y <= 6e+159) 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[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.4e+45], t$95$2, If[LessEqual[y, 11.2], t$95$1, If[LessEqual[y, 1.85e+101], N[(x * N[(y / N[(y - N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6e+159], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a - t}{y - b}\\
t_2 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -1.4 \cdot 10^{+45}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 11.2:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{+101}:\\
\;\;\;\;x \cdot \frac{y}{y - z \cdot y}\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+159}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.4e45 or 6.0000000000000004e159 < y Initial program 45.7%
Simplified45.7%
Taylor expanded in y around -inf 66.2%
mul-1-neg66.2%
unsub-neg66.2%
Simplified66.2%
if -1.4e45 < y < 11.199999999999999 or 1.8499999999999999e101 < y < 6.0000000000000004e159Initial program 79.3%
Simplified79.3%
Taylor expanded in z around inf 66.3%
if 11.199999999999999 < y < 1.8499999999999999e101Initial program 79.6%
Simplified79.6%
Taylor expanded in x around inf 65.9%
associate-*r/72.4%
neg-mul-172.4%
distribute-rgt-neg-in72.4%
distribute-neg-frac72.4%
Simplified72.4%
Taylor expanded in y around inf 69.9%
*-commutative69.9%
Simplified69.9%
Final simplification66.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (/ (- a t) (- y b)) (/ x z))))
(if (<= z -1.75e+36)
t_1
(if (<= z 1.15e-79)
(* x (/ y (+ y (* z b))))
(if (<= z 10.0) (/ (- t a) b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((a - t) / (y - b)) - (x / z);
double tmp;
if (z <= -1.75e+36) {
tmp = t_1;
} else if (z <= 1.15e-79) {
tmp = x * (y / (y + (z * b)));
} else if (z <= 10.0) {
tmp = (t - a) / b;
} 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 = ((a - t) / (y - b)) - (x / z)
if (z <= (-1.75d+36)) then
tmp = t_1
else if (z <= 1.15d-79) then
tmp = x * (y / (y + (z * b)))
else if (z <= 10.0d0) then
tmp = (t - a) / b
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 = ((a - t) / (y - b)) - (x / z);
double tmp;
if (z <= -1.75e+36) {
tmp = t_1;
} else if (z <= 1.15e-79) {
tmp = x * (y / (y + (z * b)));
} else if (z <= 10.0) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((a - t) / (y - b)) - (x / z) tmp = 0 if z <= -1.75e+36: tmp = t_1 elif z <= 1.15e-79: tmp = x * (y / (y + (z * b))) elif z <= 10.0: tmp = (t - a) / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(a - t) / Float64(y - b)) - Float64(x / z)) tmp = 0.0 if (z <= -1.75e+36) tmp = t_1; elseif (z <= 1.15e-79) tmp = Float64(x * Float64(y / Float64(y + Float64(z * b)))); elseif (z <= 10.0) tmp = Float64(Float64(t - a) / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((a - t) / (y - b)) - (x / z); tmp = 0.0; if (z <= -1.75e+36) tmp = t_1; elseif (z <= 1.15e-79) tmp = x * (y / (y + (z * b))); elseif (z <= 10.0) tmp = (t - a) / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.75e+36], t$95$1, If[LessEqual[z, 1.15e-79], N[(x * N[(y / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 10.0], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a - t}{y - b} - \frac{x}{z}\\
\mathbf{if}\;z \leq -1.75 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-79}:\\
\;\;\;\;x \cdot \frac{y}{y + z \cdot b}\\
\mathbf{elif}\;z \leq 10:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.7499999999999999e36 or 10 < z Initial program 48.5%
Simplified48.5%
Taylor expanded in a around 0 48.2%
+-commutative48.2%
mul-1-neg48.2%
unsub-neg48.2%
div-sub48.2%
unsub-neg48.2%
distribute-lft-neg-out48.2%
distribute-rgt-out48.5%
sub-neg48.5%
associate-/l*58.3%
associate-*r/60.4%
Simplified60.4%
Taylor expanded in z around inf 85.3%
Taylor expanded in y around inf 89.0%
Taylor expanded in z around inf 88.5%
if -1.7499999999999999e36 < z < 1.15000000000000006e-79Initial program 81.0%
Simplified81.0%
Taylor expanded in x around inf 47.7%
associate-*r/62.0%
neg-mul-162.0%
distribute-rgt-neg-in62.0%
distribute-neg-frac62.0%
Simplified62.0%
Taylor expanded in y around 0 60.8%
mul-1-neg60.8%
distribute-lft-neg-out60.8%
*-commutative60.8%
Simplified60.8%
if 1.15000000000000006e-79 < z < 10Initial program 95.0%
Simplified95.0%
Taylor expanded in y around 0 58.1%
mul-1-neg58.1%
distribute-neg-frac258.1%
Simplified58.1%
Final simplification73.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (/ (- a t) (- y b)) (/ x z))))
(if (<= z -1.75e+36)
t_1
(if (<= z 3.5e-76)
(* x (/ y (+ y (* z (- b y)))))
(if (<= z 36.0) (/ (- t a) b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((a - t) / (y - b)) - (x / z);
double tmp;
if (z <= -1.75e+36) {
tmp = t_1;
} else if (z <= 3.5e-76) {
tmp = x * (y / (y + (z * (b - y))));
} else if (z <= 36.0) {
tmp = (t - a) / b;
} 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 = ((a - t) / (y - b)) - (x / z)
if (z <= (-1.75d+36)) then
tmp = t_1
else if (z <= 3.5d-76) then
tmp = x * (y / (y + (z * (b - y))))
else if (z <= 36.0d0) then
tmp = (t - a) / b
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 = ((a - t) / (y - b)) - (x / z);
double tmp;
if (z <= -1.75e+36) {
tmp = t_1;
} else if (z <= 3.5e-76) {
tmp = x * (y / (y + (z * (b - y))));
} else if (z <= 36.0) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((a - t) / (y - b)) - (x / z) tmp = 0 if z <= -1.75e+36: tmp = t_1 elif z <= 3.5e-76: tmp = x * (y / (y + (z * (b - y)))) elif z <= 36.0: tmp = (t - a) / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(a - t) / Float64(y - b)) - Float64(x / z)) tmp = 0.0 if (z <= -1.75e+36) tmp = t_1; elseif (z <= 3.5e-76) tmp = Float64(x * Float64(y / Float64(y + Float64(z * Float64(b - y))))); elseif (z <= 36.0) tmp = Float64(Float64(t - a) / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((a - t) / (y - b)) - (x / z); tmp = 0.0; if (z <= -1.75e+36) tmp = t_1; elseif (z <= 3.5e-76) tmp = x * (y / (y + (z * (b - y)))); elseif (z <= 36.0) tmp = (t - a) / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.75e+36], t$95$1, If[LessEqual[z, 3.5e-76], N[(x * N[(y / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 36.0], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a - t}{y - b} - \frac{x}{z}\\
\mathbf{if}\;z \leq -1.75 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-76}:\\
\;\;\;\;x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq 36:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.7499999999999999e36 or 36 < z Initial program 48.5%
Simplified48.5%
Taylor expanded in a around 0 48.2%
+-commutative48.2%
mul-1-neg48.2%
unsub-neg48.2%
div-sub48.2%
unsub-neg48.2%
distribute-lft-neg-out48.2%
distribute-rgt-out48.5%
sub-neg48.5%
associate-/l*58.3%
associate-*r/60.4%
Simplified60.4%
Taylor expanded in z around inf 85.3%
Taylor expanded in y around inf 89.0%
Taylor expanded in z around inf 88.5%
if -1.7499999999999999e36 < z < 3.49999999999999997e-76Initial program 81.0%
Simplified81.0%
Taylor expanded in x around inf 47.7%
associate-*r/62.0%
neg-mul-162.0%
distribute-rgt-neg-in62.0%
distribute-neg-frac62.0%
Simplified62.0%
if 3.49999999999999997e-76 < z < 36Initial program 95.0%
Simplified95.0%
Taylor expanded in y around 0 58.1%
mul-1-neg58.1%
distribute-neg-frac258.1%
Simplified58.1%
Final simplification74.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (/ (- a t) (- y b)) (/ x z))))
(if (<= z -1.75e+36)
t_1
(if (<= z 4.4e-81)
(* x (/ y (+ y (* z (- b y)))))
(if (<= z 1.0) (* z (/ (- t a) (+ y (* z b)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((a - t) / (y - b)) - (x / z);
double tmp;
if (z <= -1.75e+36) {
tmp = t_1;
} else if (z <= 4.4e-81) {
tmp = x * (y / (y + (z * (b - y))));
} else if (z <= 1.0) {
tmp = z * ((t - a) / (y + (z * b)));
} 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 = ((a - t) / (y - b)) - (x / z)
if (z <= (-1.75d+36)) then
tmp = t_1
else if (z <= 4.4d-81) then
tmp = x * (y / (y + (z * (b - y))))
else if (z <= 1.0d0) then
tmp = z * ((t - a) / (y + (z * b)))
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 = ((a - t) / (y - b)) - (x / z);
double tmp;
if (z <= -1.75e+36) {
tmp = t_1;
} else if (z <= 4.4e-81) {
tmp = x * (y / (y + (z * (b - y))));
} else if (z <= 1.0) {
tmp = z * ((t - a) / (y + (z * b)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((a - t) / (y - b)) - (x / z) tmp = 0 if z <= -1.75e+36: tmp = t_1 elif z <= 4.4e-81: tmp = x * (y / (y + (z * (b - y)))) elif z <= 1.0: tmp = z * ((t - a) / (y + (z * b))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(a - t) / Float64(y - b)) - Float64(x / z)) tmp = 0.0 if (z <= -1.75e+36) tmp = t_1; elseif (z <= 4.4e-81) tmp = Float64(x * Float64(y / Float64(y + Float64(z * Float64(b - y))))); elseif (z <= 1.0) tmp = Float64(z * Float64(Float64(t - a) / Float64(y + Float64(z * b)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((a - t) / (y - b)) - (x / z); tmp = 0.0; if (z <= -1.75e+36) tmp = t_1; elseif (z <= 4.4e-81) tmp = x * (y / (y + (z * (b - y)))); elseif (z <= 1.0) tmp = z * ((t - a) / (y + (z * b))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.75e+36], t$95$1, If[LessEqual[z, 4.4e-81], N[(x * N[(y / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.0], N[(z * N[(N[(t - a), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a - t}{y - b} - \frac{x}{z}\\
\mathbf{if}\;z \leq -1.75 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-81}:\\
\;\;\;\;x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;z \cdot \frac{t - a}{y + z \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.7499999999999999e36 or 1 < z Initial program 48.5%
Simplified48.5%
Taylor expanded in a around 0 48.2%
+-commutative48.2%
mul-1-neg48.2%
unsub-neg48.2%
div-sub48.2%
unsub-neg48.2%
distribute-lft-neg-out48.2%
distribute-rgt-out48.5%
sub-neg48.5%
associate-/l*58.3%
associate-*r/60.4%
Simplified60.4%
Taylor expanded in z around inf 85.3%
Taylor expanded in y around inf 89.0%
Taylor expanded in z around inf 88.5%
if -1.7499999999999999e36 < z < 4.3999999999999998e-81Initial program 80.8%
Simplified80.8%
Taylor expanded in x around inf 48.1%
associate-*r/62.5%
neg-mul-162.5%
distribute-rgt-neg-in62.5%
distribute-neg-frac62.5%
Simplified62.5%
if 4.3999999999999998e-81 < z < 1Initial program 95.2%
Simplified95.2%
Taylor expanded in x around 0 81.7%
associate-/l*81.6%
Simplified81.6%
Taylor expanded in y around 0 80.4%
mul-1-neg19.0%
distribute-lft-neg-out19.0%
*-commutative19.0%
Simplified80.4%
Final simplification76.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- a t) (- y b))))
(if (<= z -2.2e-6)
(+ t_1 (/ x (- 1.0 z)))
(if (<= z 1.85)
(- x (/ (* z (- t a)) (- (* z (- y b)) y)))
(+ t_1 (/ 1.0 (/ (- 1.0 z) x)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - t) / (y - b);
double tmp;
if (z <= -2.2e-6) {
tmp = t_1 + (x / (1.0 - z));
} else if (z <= 1.85) {
tmp = x - ((z * (t - a)) / ((z * (y - b)) - y));
} else {
tmp = t_1 + (1.0 / ((1.0 - z) / 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) :: t_1
real(8) :: tmp
t_1 = (a - t) / (y - b)
if (z <= (-2.2d-6)) then
tmp = t_1 + (x / (1.0d0 - z))
else if (z <= 1.85d0) then
tmp = x - ((z * (t - a)) / ((z * (y - b)) - y))
else
tmp = t_1 + (1.0d0 / ((1.0d0 - z) / x))
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 - t) / (y - b);
double tmp;
if (z <= -2.2e-6) {
tmp = t_1 + (x / (1.0 - z));
} else if (z <= 1.85) {
tmp = x - ((z * (t - a)) / ((z * (y - b)) - y));
} else {
tmp = t_1 + (1.0 / ((1.0 - z) / x));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a - t) / (y - b) tmp = 0 if z <= -2.2e-6: tmp = t_1 + (x / (1.0 - z)) elif z <= 1.85: tmp = x - ((z * (t - a)) / ((z * (y - b)) - y)) else: tmp = t_1 + (1.0 / ((1.0 - z) / x)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - t) / Float64(y - b)) tmp = 0.0 if (z <= -2.2e-6) tmp = Float64(t_1 + Float64(x / Float64(1.0 - z))); elseif (z <= 1.85) tmp = Float64(x - Float64(Float64(z * Float64(t - a)) / Float64(Float64(z * Float64(y - b)) - y))); else tmp = Float64(t_1 + Float64(1.0 / Float64(Float64(1.0 - z) / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a - t) / (y - b); tmp = 0.0; if (z <= -2.2e-6) tmp = t_1 + (x / (1.0 - z)); elseif (z <= 1.85) tmp = x - ((z * (t - a)) / ((z * (y - b)) - y)); else tmp = t_1 + (1.0 / ((1.0 - z) / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.2e-6], N[(t$95$1 + N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.85], N[(x - N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(1.0 / N[(N[(1.0 - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a - t}{y - b}\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{-6}:\\
\;\;\;\;t\_1 + \frac{x}{1 - z}\\
\mathbf{elif}\;z \leq 1.85:\\
\;\;\;\;x - \frac{z \cdot \left(t - a\right)}{z \cdot \left(y - b\right) - y}\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \frac{1}{\frac{1 - z}{x}}\\
\end{array}
\end{array}
if z < -2.2000000000000001e-6Initial program 51.1%
Simplified51.1%
Taylor expanded in a around 0 50.9%
+-commutative50.9%
mul-1-neg50.9%
unsub-neg50.9%
div-sub50.9%
unsub-neg50.9%
distribute-lft-neg-out50.9%
distribute-rgt-out51.2%
sub-neg51.2%
associate-/l*55.0%
associate-*r/58.8%
Simplified58.8%
Taylor expanded in z around inf 83.9%
Taylor expanded in y around inf 85.9%
if -2.2000000000000001e-6 < z < 1.8500000000000001Initial program 83.9%
Simplified83.9%
div-sub83.9%
associate-/l*96.6%
Applied egg-rr96.6%
Taylor expanded in z around 0 77.1%
mul-1-neg77.1%
Simplified77.1%
if 1.8500000000000001 < z Initial program 47.5%
Simplified47.5%
Taylor expanded in a around 0 47.2%
+-commutative47.2%
mul-1-neg47.2%
unsub-neg47.2%
div-sub47.2%
unsub-neg47.2%
distribute-lft-neg-out47.2%
distribute-rgt-out47.5%
sub-neg47.5%
associate-/l*61.0%
associate-*r/63.1%
Simplified63.1%
Taylor expanded in z around inf 86.0%
Taylor expanded in y around inf 88.2%
clear-num88.4%
inv-pow88.4%
sub-neg88.4%
metadata-eval88.4%
Applied egg-rr88.4%
unpow-188.4%
+-commutative88.4%
Simplified88.4%
Final simplification82.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (/ a b))))
(if (<= z -1.05e+221)
t_1
(if (<= z -1.36e+98)
(/ x (- z))
(if (or (<= z -15.5) (not (<= z 3.3e-70))) t_1 x)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -(a / b);
double tmp;
if (z <= -1.05e+221) {
tmp = t_1;
} else if (z <= -1.36e+98) {
tmp = x / -z;
} else if ((z <= -15.5) || !(z <= 3.3e-70)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = -(a / b)
if (z <= (-1.05d+221)) then
tmp = t_1
else if (z <= (-1.36d+98)) then
tmp = x / -z
else if ((z <= (-15.5d0)) .or. (.not. (z <= 3.3d-70))) then
tmp = t_1
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 t_1 = -(a / b);
double tmp;
if (z <= -1.05e+221) {
tmp = t_1;
} else if (z <= -1.36e+98) {
tmp = x / -z;
} else if ((z <= -15.5) || !(z <= 3.3e-70)) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -(a / b) tmp = 0 if z <= -1.05e+221: tmp = t_1 elif z <= -1.36e+98: tmp = x / -z elif (z <= -15.5) or not (z <= 3.3e-70): tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a, b) t_1 = Float64(-Float64(a / b)) tmp = 0.0 if (z <= -1.05e+221) tmp = t_1; elseif (z <= -1.36e+98) tmp = Float64(x / Float64(-z)); elseif ((z <= -15.5) || !(z <= 3.3e-70)) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -(a / b); tmp = 0.0; if (z <= -1.05e+221) tmp = t_1; elseif (z <= -1.36e+98) tmp = x / -z; elseif ((z <= -15.5) || ~((z <= 3.3e-70))) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = (-N[(a / b), $MachinePrecision])}, If[LessEqual[z, -1.05e+221], t$95$1, If[LessEqual[z, -1.36e+98], N[(x / (-z)), $MachinePrecision], If[Or[LessEqual[z, -15.5], N[Not[LessEqual[z, 3.3e-70]], $MachinePrecision]], t$95$1, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -\frac{a}{b}\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{+221}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.36 \cdot 10^{+98}:\\
\;\;\;\;\frac{x}{-z}\\
\mathbf{elif}\;z \leq -15.5 \lor \neg \left(z \leq 3.3 \cdot 10^{-70}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.05000000000000001e221 or -1.36000000000000004e98 < z < -15.5 or 3.30000000000000016e-70 < z Initial program 54.0%
Simplified54.0%
Taylor expanded in a around inf 28.1%
*-commutative28.1%
Simplified28.1%
Taylor expanded in y around 0 30.4%
associate-*r/30.4%
mul-1-neg30.4%
Simplified30.4%
if -1.05000000000000001e221 < z < -1.36000000000000004e98Initial program 58.0%
Simplified58.0%
Taylor expanded in x around inf 17.6%
associate-*r/21.6%
neg-mul-121.6%
distribute-rgt-neg-in21.6%
distribute-neg-frac21.6%
Simplified21.6%
Taylor expanded in z around inf 21.6%
mul-1-neg21.6%
associate-/r*43.8%
sub-neg43.8%
mul-1-neg43.8%
distribute-neg-frac243.8%
mul-1-neg43.8%
sub-neg43.8%
Simplified43.8%
Taylor expanded in y around inf 33.9%
associate-*r/33.9%
neg-mul-133.9%
Simplified33.9%
if -15.5 < z < 3.30000000000000016e-70Initial program 81.6%
Simplified81.6%
Taylor expanded in z around 0 48.9%
Final simplification39.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -0.43) (not (<= z 2.05e-78))) (/ (- a t) (- y b)) (* x (/ y (+ y (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -0.43) || !(z <= 2.05e-78)) {
tmp = (a - t) / (y - b);
} else {
tmp = x * (y / (y + (z * 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 <= (-0.43d0)) .or. (.not. (z <= 2.05d-78))) then
tmp = (a - t) / (y - b)
else
tmp = x * (y / (y + (z * 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 <= -0.43) || !(z <= 2.05e-78)) {
tmp = (a - t) / (y - b);
} else {
tmp = x * (y / (y + (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -0.43) or not (z <= 2.05e-78): tmp = (a - t) / (y - b) else: tmp = x * (y / (y + (z * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -0.43) || !(z <= 2.05e-78)) tmp = Float64(Float64(a - t) / Float64(y - b)); else tmp = Float64(x * Float64(y / Float64(y + Float64(z * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -0.43) || ~((z <= 2.05e-78))) tmp = (a - t) / (y - b); else tmp = x * (y / (y + (z * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -0.43], N[Not[LessEqual[z, 2.05e-78]], $MachinePrecision]], N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.43 \lor \neg \left(z \leq 2.05 \cdot 10^{-78}\right):\\
\;\;\;\;\frac{a - t}{y - b}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{y + z \cdot b}\\
\end{array}
\end{array}
if z < -0.429999999999999993 or 2.0499999999999999e-78 < z Initial program 55.4%
Simplified55.4%
Taylor expanded in z around inf 70.5%
if -0.429999999999999993 < z < 2.0499999999999999e-78Initial program 81.3%
Simplified81.3%
Taylor expanded in x around inf 48.0%
associate-*r/62.7%
neg-mul-162.7%
distribute-rgt-neg-in62.7%
distribute-neg-frac62.7%
Simplified62.7%
Taylor expanded in y around 0 61.4%
mul-1-neg61.4%
distribute-lft-neg-out61.4%
*-commutative61.4%
Simplified61.4%
Final simplification66.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -0.45) (not (<= z 2.5e-71))) (/ a (- y b)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -0.45) || !(z <= 2.5e-71)) {
tmp = a / (y - 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 <= (-0.45d0)) .or. (.not. (z <= 2.5d-71))) then
tmp = a / (y - 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 <= -0.45) || !(z <= 2.5e-71)) {
tmp = a / (y - b);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -0.45) or not (z <= 2.5e-71): tmp = a / (y - b) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -0.45) || !(z <= 2.5e-71)) tmp = Float64(a / Float64(y - b)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -0.45) || ~((z <= 2.5e-71))) tmp = a / (y - b); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -0.45], N[Not[LessEqual[z, 2.5e-71]], $MachinePrecision]], N[(a / N[(y - b), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.45 \lor \neg \left(z \leq 2.5 \cdot 10^{-71}\right):\\
\;\;\;\;\frac{a}{y - b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -0.450000000000000011 or 2.49999999999999999e-71 < z Initial program 54.7%
Simplified54.7%
Taylor expanded in a around inf 26.5%
*-commutative26.5%
Simplified26.5%
Taylor expanded in z around inf 42.2%
if -0.450000000000000011 < z < 2.49999999999999999e-71Initial program 81.6%
Simplified81.6%
Taylor expanded in z around 0 48.9%
Final simplification45.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1e-91) (not (<= y 9.2))) (/ x (- 1.0 z)) (/ a (- y b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1e-91) || !(y <= 9.2)) {
tmp = x / (1.0 - z);
} else {
tmp = a / (y - 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 <= (-1d-91)) .or. (.not. (y <= 9.2d0))) then
tmp = x / (1.0d0 - z)
else
tmp = a / (y - 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 <= -1e-91) || !(y <= 9.2)) {
tmp = x / (1.0 - z);
} else {
tmp = a / (y - b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1e-91) or not (y <= 9.2): tmp = x / (1.0 - z) else: tmp = a / (y - b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1e-91) || !(y <= 9.2)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(a / Float64(y - b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1e-91) || ~((y <= 9.2))) tmp = x / (1.0 - z); else tmp = a / (y - b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1e-91], N[Not[LessEqual[y, 9.2]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(a / N[(y - b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{-91} \lor \neg \left(y \leq 9.2\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{y - b}\\
\end{array}
\end{array}
if y < -1.00000000000000002e-91 or 9.1999999999999993 < y Initial program 56.1%
Simplified56.1%
Taylor expanded in y around -inf 53.8%
mul-1-neg53.8%
unsub-neg53.8%
Simplified53.8%
if -1.00000000000000002e-91 < y < 9.1999999999999993Initial program 81.7%
Simplified81.7%
Taylor expanded in a around inf 36.3%
*-commutative36.3%
Simplified36.3%
Taylor expanded in z around inf 40.0%
Final simplification48.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4.1e+43) (not (<= y 10.0))) (/ 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 <= -4.1e+43) || !(y <= 10.0)) {
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 <= (-4.1d+43)) .or. (.not. (y <= 10.0d0))) 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 <= -4.1e+43) || !(y <= 10.0)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4.1e+43) or not (y <= 10.0): 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 <= -4.1e+43) || !(y <= 10.0)) 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 <= -4.1e+43) || ~((y <= 10.0))) 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, -4.1e+43], N[Not[LessEqual[y, 10.0]], $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 -4.1 \cdot 10^{+43} \lor \neg \left(y \leq 10\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -4.1e43 or 10 < y Initial program 49.7%
Simplified49.7%
Taylor expanded in y around -inf 62.6%
mul-1-neg62.6%
unsub-neg62.6%
Simplified62.6%
if -4.1e43 < y < 10Initial program 82.0%
Simplified82.0%
Taylor expanded in y around 0 54.6%
mul-1-neg54.6%
distribute-neg-frac254.6%
Simplified54.6%
Final simplification58.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -0.43) (not (<= z 3.6e-70))) (- (/ a b)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -0.43) || !(z <= 3.6e-70)) {
tmp = -(a / 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 <= (-0.43d0)) .or. (.not. (z <= 3.6d-70))) then
tmp = -(a / 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 <= -0.43) || !(z <= 3.6e-70)) {
tmp = -(a / b);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -0.43) or not (z <= 3.6e-70): tmp = -(a / b) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -0.43) || !(z <= 3.6e-70)) tmp = Float64(-Float64(a / b)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -0.43) || ~((z <= 3.6e-70))) tmp = -(a / b); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -0.43], N[Not[LessEqual[z, 3.6e-70]], $MachinePrecision]], (-N[(a / b), $MachinePrecision]), x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.43 \lor \neg \left(z \leq 3.6 \cdot 10^{-70}\right):\\
\;\;\;\;-\frac{a}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -0.429999999999999993 or 3.6000000000000002e-70 < z Initial program 54.7%
Simplified54.7%
Taylor expanded in a around inf 26.5%
*-commutative26.5%
Simplified26.5%
Taylor expanded in y around 0 27.6%
associate-*r/27.6%
mul-1-neg27.6%
Simplified27.6%
if -0.429999999999999993 < z < 3.6000000000000002e-70Initial program 81.6%
Simplified81.6%
Taylor expanded in z around 0 48.9%
Final simplification37.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.9e+38) (not (<= z 0.19))) (/ a y) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.9e+38) || !(z <= 0.19)) {
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 <= (-2.9d+38)) .or. (.not. (z <= 0.19d0))) 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 <= -2.9e+38) || !(z <= 0.19)) {
tmp = a / y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.9e+38) or not (z <= 0.19): tmp = a / y else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.9e+38) || !(z <= 0.19)) 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 <= -2.9e+38) || ~((z <= 0.19))) tmp = a / y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.9e+38], N[Not[LessEqual[z, 0.19]], $MachinePrecision]], N[(a / y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+38} \lor \neg \left(z \leq 0.19\right):\\
\;\;\;\;\frac{a}{y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.90000000000000007e38 or 0.19 < z Initial program 48.5%
Simplified48.5%
Taylor expanded in a around inf 23.9%
*-commutative23.9%
Simplified23.9%
Taylor expanded in z around inf 43.8%
Taylor expanded in y around inf 21.4%
if -2.90000000000000007e38 < z < 0.19Initial program 83.0%
Simplified83.0%
Taylor expanded in z around 0 43.3%
Final simplification32.9%
(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.7%
Simplified66.7%
Taylor expanded in z around 0 24.4%
Final simplification24.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 2024048
(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)))))