
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2 (+ (* x y) t_1))
(t_3 (/ t_2 (+ y (* z (- b y)))))
(t_4 (- (/ (- t a) (- b y)) (/ x z))))
(if (<= t_3 (- INFINITY))
t_4
(if (<= t_3 -1e-247)
(/ t_2 (+ y (- (* z b) (* y z))))
(if (<= t_3 0.0)
(-
(+ (/ t (- b y)) (* x (/ (/ y z) (- b y))))
(+ (/ a (- b y)) (* (/ y z) (/ (- t a) (pow (- b y) 2.0)))))
(if (<= t_3 1e+296) (/ (fma x y t_1) (fma z (- b y) y)) t_4))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = (x * y) + t_1;
double t_3 = t_2 / (y + (z * (b - y)));
double t_4 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_4;
} else if (t_3 <= -1e-247) {
tmp = t_2 / (y + ((z * b) - (y * z)));
} else if (t_3 <= 0.0) {
tmp = ((t / (b - y)) + (x * ((y / z) / (b - y)))) - ((a / (b - y)) + ((y / z) * ((t - a) / pow((b - y), 2.0))));
} else if (t_3 <= 1e+296) {
tmp = fma(x, y, t_1) / fma(z, (b - y), y);
} else {
tmp = t_4;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(Float64(x * y) + t_1) t_3 = Float64(t_2 / Float64(y + Float64(z * Float64(b - y)))) t_4 = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_4; elseif (t_3 <= -1e-247) tmp = Float64(t_2 / Float64(y + Float64(Float64(z * b) - Float64(y * z)))); elseif (t_3 <= 0.0) tmp = Float64(Float64(Float64(t / Float64(b - y)) + Float64(x * Float64(Float64(y / z) / Float64(b - y)))) - Float64(Float64(a / Float64(b - y)) + Float64(Float64(y / z) * Float64(Float64(t - a) / (Float64(b - y) ^ 2.0))))); elseif (t_3 <= 1e+296) tmp = Float64(fma(x, y, t_1) / fma(z, Float64(b - y), y)); else tmp = t_4; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$4, If[LessEqual[t$95$3, -1e-247], N[(t$95$2 / N[(y + N[(N[(z * b), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 0.0], N[(N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(y / z), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(y / z), $MachinePrecision] * N[(N[(t - a), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 1e+296], N[(N[(x * y + t$95$1), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := x \cdot y + t\_1\\
t_3 := \frac{t\_2}{y + z \cdot \left(b - y\right)}\\
t_4 := \frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 \leq -1 \cdot 10^{-247}:\\
\;\;\;\;\frac{t\_2}{y + \left(z \cdot b - y \cdot z\right)}\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\left(\frac{t}{b - y} + x \cdot \frac{\frac{y}{z}}{b - y}\right) - \left(\frac{a}{b - y} + \frac{y}{z} \cdot \frac{t - a}{{\left(b - y\right)}^{2}}\right)\\
\mathbf{elif}\;t\_3 \leq 10^{+296}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t\_1\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0 or 9.99999999999999981e295 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 26.8%
Taylor expanded in z around -inf 47.4%
associate--l+47.4%
mul-1-neg47.4%
distribute-lft-out--47.4%
associate-/l*55.5%
associate-/l*68.5%
div-sub69.6%
Simplified69.6%
Taylor expanded in y around inf 86.3%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1e-247Initial program 99.6%
sub-neg99.6%
distribute-lft-in99.6%
Applied egg-rr99.6%
if -1e-247 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0Initial program 38.4%
fma-define38.4%
div-inv38.4%
+-commutative38.4%
fma-undefine38.4%
fma-define38.4%
+-commutative38.4%
fma-define38.4%
Applied egg-rr38.4%
Taylor expanded in z around inf 62.9%
associate-/l*62.9%
associate-/r*80.7%
times-frac96.1%
Simplified96.1%
if 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 9.99999999999999981e295Initial program 99.5%
fma-define99.6%
+-commutative99.6%
fma-define99.6%
Simplified99.6%
Final simplification94.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* x y) (* z (- t a))))
(t_2 (/ t_1 (+ y (- (* z b) (* y z)))))
(t_3 (/ t_1 (+ y (* z (- b y)))))
(t_4 (- (/ (- t a) (- b y)) (/ x z))))
(if (<= t_3 (- INFINITY))
t_4
(if (<= t_3 -1e-247)
t_2
(if (<= t_3 0.0)
(-
(+ (/ t (- b y)) (* x (/ (/ y z) (- b y))))
(+ (/ a (- b y)) (* (/ y z) (/ (- t a) (pow (- b y) 2.0)))))
(if (<= t_3 1e+296) t_2 t_4))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * y) + (z * (t - a));
double t_2 = t_1 / (y + ((z * b) - (y * z)));
double t_3 = t_1 / (y + (z * (b - y)));
double t_4 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_4;
} else if (t_3 <= -1e-247) {
tmp = t_2;
} else if (t_3 <= 0.0) {
tmp = ((t / (b - y)) + (x * ((y / z) / (b - y)))) - ((a / (b - y)) + ((y / z) * ((t - a) / pow((b - y), 2.0))));
} else if (t_3 <= 1e+296) {
tmp = t_2;
} else {
tmp = t_4;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * y) + (z * (t - a));
double t_2 = t_1 / (y + ((z * b) - (y * z)));
double t_3 = t_1 / (y + (z * (b - y)));
double t_4 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = t_4;
} else if (t_3 <= -1e-247) {
tmp = t_2;
} else if (t_3 <= 0.0) {
tmp = ((t / (b - y)) + (x * ((y / z) / (b - y)))) - ((a / (b - y)) + ((y / z) * ((t - a) / Math.pow((b - y), 2.0))));
} else if (t_3 <= 1e+296) {
tmp = t_2;
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * y) + (z * (t - a)) t_2 = t_1 / (y + ((z * b) - (y * z))) t_3 = t_1 / (y + (z * (b - y))) t_4 = ((t - a) / (b - y)) - (x / z) tmp = 0 if t_3 <= -math.inf: tmp = t_4 elif t_3 <= -1e-247: tmp = t_2 elif t_3 <= 0.0: tmp = ((t / (b - y)) + (x * ((y / z) / (b - y)))) - ((a / (b - y)) + ((y / z) * ((t - a) / math.pow((b - y), 2.0)))) elif t_3 <= 1e+296: tmp = t_2 else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * y) + Float64(z * Float64(t - a))) t_2 = Float64(t_1 / Float64(y + Float64(Float64(z * b) - Float64(y * z)))) t_3 = Float64(t_1 / Float64(y + Float64(z * Float64(b - y)))) t_4 = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_4; elseif (t_3 <= -1e-247) tmp = t_2; elseif (t_3 <= 0.0) tmp = Float64(Float64(Float64(t / Float64(b - y)) + Float64(x * Float64(Float64(y / z) / Float64(b - y)))) - Float64(Float64(a / Float64(b - y)) + Float64(Float64(y / z) * Float64(Float64(t - a) / (Float64(b - y) ^ 2.0))))); elseif (t_3 <= 1e+296) tmp = t_2; else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * y) + (z * (t - a)); t_2 = t_1 / (y + ((z * b) - (y * z))); t_3 = t_1 / (y + (z * (b - y))); t_4 = ((t - a) / (b - y)) - (x / z); tmp = 0.0; if (t_3 <= -Inf) tmp = t_4; elseif (t_3 <= -1e-247) tmp = t_2; elseif (t_3 <= 0.0) tmp = ((t / (b - y)) + (x * ((y / z) / (b - y)))) - ((a / (b - y)) + ((y / z) * ((t - a) / ((b - y) ^ 2.0)))); elseif (t_3 <= 1e+296) tmp = t_2; else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(y + N[(N[(z * b), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$4, If[LessEqual[t$95$3, -1e-247], t$95$2, If[LessEqual[t$95$3, 0.0], N[(N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(y / z), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(y / z), $MachinePrecision] * N[(N[(t - a), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 1e+296], t$95$2, t$95$4]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + z \cdot \left(t - a\right)\\
t_2 := \frac{t\_1}{y + \left(z \cdot b - y \cdot z\right)}\\
t_3 := \frac{t\_1}{y + z \cdot \left(b - y\right)}\\
t_4 := \frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 \leq -1 \cdot 10^{-247}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\left(\frac{t}{b - y} + x \cdot \frac{\frac{y}{z}}{b - y}\right) - \left(\frac{a}{b - y} + \frac{y}{z} \cdot \frac{t - a}{{\left(b - y\right)}^{2}}\right)\\
\mathbf{elif}\;t\_3 \leq 10^{+296}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0 or 9.99999999999999981e295 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 26.8%
Taylor expanded in z around -inf 47.4%
associate--l+47.4%
mul-1-neg47.4%
distribute-lft-out--47.4%
associate-/l*55.5%
associate-/l*68.5%
div-sub69.6%
Simplified69.6%
Taylor expanded in y around inf 86.3%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1e-247 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 9.99999999999999981e295Initial program 99.6%
sub-neg99.6%
distribute-lft-in99.6%
Applied egg-rr99.6%
if -1e-247 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0Initial program 38.4%
fma-define38.4%
div-inv38.4%
+-commutative38.4%
fma-undefine38.4%
fma-define38.4%
+-commutative38.4%
fma-define38.4%
Applied egg-rr38.4%
Taylor expanded in z around inf 62.9%
associate-/l*62.9%
associate-/r*80.7%
times-frac96.1%
Simplified96.1%
Final simplification94.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* x y) (* z (- t a))))
(t_2 (/ t_1 (+ y (- (* z b) (* y z)))))
(t_3 (/ t_1 (+ y (* z (- b y)))))
(t_4 (/ (- t a) (- b y)))
(t_5 (- t_4 (/ x z))))
(if (<= t_3 (- INFINITY))
t_5
(if (<= t_3 -1e-247)
t_2
(if (<= t_3 0.0)
(-
t_4
(/ (- (* x (/ y (- y b))) (* y (/ (- a t) (pow (- b y) 2.0)))) z))
(if (<= t_3 1e+296) t_2 t_5))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * y) + (z * (t - a));
double t_2 = t_1 / (y + ((z * b) - (y * z)));
double t_3 = t_1 / (y + (z * (b - y)));
double t_4 = (t - a) / (b - y);
double t_5 = t_4 - (x / z);
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_5;
} else if (t_3 <= -1e-247) {
tmp = t_2;
} else if (t_3 <= 0.0) {
tmp = t_4 - (((x * (y / (y - b))) - (y * ((a - t) / pow((b - y), 2.0)))) / z);
} else if (t_3 <= 1e+296) {
tmp = t_2;
} else {
tmp = t_5;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * y) + (z * (t - a));
double t_2 = t_1 / (y + ((z * b) - (y * z)));
double t_3 = t_1 / (y + (z * (b - y)));
double t_4 = (t - a) / (b - y);
double t_5 = t_4 - (x / z);
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = t_5;
} else if (t_3 <= -1e-247) {
tmp = t_2;
} else if (t_3 <= 0.0) {
tmp = t_4 - (((x * (y / (y - b))) - (y * ((a - t) / Math.pow((b - y), 2.0)))) / z);
} else if (t_3 <= 1e+296) {
tmp = t_2;
} else {
tmp = t_5;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * y) + (z * (t - a)) t_2 = t_1 / (y + ((z * b) - (y * z))) t_3 = t_1 / (y + (z * (b - y))) t_4 = (t - a) / (b - y) t_5 = t_4 - (x / z) tmp = 0 if t_3 <= -math.inf: tmp = t_5 elif t_3 <= -1e-247: tmp = t_2 elif t_3 <= 0.0: tmp = t_4 - (((x * (y / (y - b))) - (y * ((a - t) / math.pow((b - y), 2.0)))) / z) elif t_3 <= 1e+296: tmp = t_2 else: tmp = t_5 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * y) + Float64(z * Float64(t - a))) t_2 = Float64(t_1 / Float64(y + Float64(Float64(z * b) - Float64(y * z)))) t_3 = Float64(t_1 / Float64(y + Float64(z * Float64(b - y)))) t_4 = Float64(Float64(t - a) / Float64(b - y)) t_5 = Float64(t_4 - Float64(x / z)) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_5; elseif (t_3 <= -1e-247) tmp = t_2; elseif (t_3 <= 0.0) tmp = Float64(t_4 - Float64(Float64(Float64(x * Float64(y / Float64(y - b))) - Float64(y * Float64(Float64(a - t) / (Float64(b - y) ^ 2.0)))) / z)); elseif (t_3 <= 1e+296) tmp = t_2; else tmp = t_5; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * y) + (z * (t - a)); t_2 = t_1 / (y + ((z * b) - (y * z))); t_3 = t_1 / (y + (z * (b - y))); t_4 = (t - a) / (b - y); t_5 = t_4 - (x / z); tmp = 0.0; if (t_3 <= -Inf) tmp = t_5; elseif (t_3 <= -1e-247) tmp = t_2; elseif (t_3 <= 0.0) tmp = t_4 - (((x * (y / (y - b))) - (y * ((a - t) / ((b - y) ^ 2.0)))) / z); elseif (t_3 <= 1e+296) tmp = t_2; else tmp = t_5; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(y + N[(N[(z * b), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 - N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$5, If[LessEqual[t$95$3, -1e-247], t$95$2, If[LessEqual[t$95$3, 0.0], N[(t$95$4 - N[(N[(N[(x * N[(y / N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(N[(a - t), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 1e+296], t$95$2, t$95$5]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + z \cdot \left(t - a\right)\\
t_2 := \frac{t\_1}{y + \left(z \cdot b - y \cdot z\right)}\\
t_3 := \frac{t\_1}{y + z \cdot \left(b - y\right)}\\
t_4 := \frac{t - a}{b - y}\\
t_5 := t\_4 - \frac{x}{z}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t\_3 \leq -1 \cdot 10^{-247}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;t\_4 - \frac{x \cdot \frac{y}{y - b} - y \cdot \frac{a - t}{{\left(b - y\right)}^{2}}}{z}\\
\mathbf{elif}\;t\_3 \leq 10^{+296}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_5\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0 or 9.99999999999999981e295 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 26.8%
Taylor expanded in z around -inf 47.4%
associate--l+47.4%
mul-1-neg47.4%
distribute-lft-out--47.4%
associate-/l*55.5%
associate-/l*68.5%
div-sub69.6%
Simplified69.6%
Taylor expanded in y around inf 86.3%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1e-247 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 9.99999999999999981e295Initial program 99.6%
sub-neg99.6%
distribute-lft-in99.6%
Applied egg-rr99.6%
if -1e-247 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0Initial program 38.4%
Taylor expanded in z around -inf 80.7%
associate--l+80.7%
mul-1-neg80.7%
distribute-lft-out--80.7%
associate-/l*80.8%
associate-/l*96.1%
div-sub96.0%
Simplified96.0%
Final simplification94.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* x y) (* z (- t a)))) (t_2 (/ t_1 (+ y (* z (- b y))))))
(if (or (<= t_2 (- INFINITY))
(and (not (<= t_2 -2e-256))
(or (<= t_2 0.0) (not (<= t_2 1e+296)))))
(- (/ (- t a) (- b y)) (/ x z))
(/ t_1 (+ y (- (* z b) (* y z)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * y) + (z * (t - a));
double t_2 = t_1 / (y + (z * (b - y)));
double tmp;
if ((t_2 <= -((double) INFINITY)) || (!(t_2 <= -2e-256) && ((t_2 <= 0.0) || !(t_2 <= 1e+296)))) {
tmp = ((t - a) / (b - y)) - (x / z);
} else {
tmp = t_1 / (y + ((z * b) - (y * z)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * y) + (z * (t - a));
double t_2 = t_1 / (y + (z * (b - y)));
double tmp;
if ((t_2 <= -Double.POSITIVE_INFINITY) || (!(t_2 <= -2e-256) && ((t_2 <= 0.0) || !(t_2 <= 1e+296)))) {
tmp = ((t - a) / (b - y)) - (x / z);
} else {
tmp = t_1 / (y + ((z * b) - (y * z)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * y) + (z * (t - a)) t_2 = t_1 / (y + (z * (b - y))) tmp = 0 if (t_2 <= -math.inf) or (not (t_2 <= -2e-256) and ((t_2 <= 0.0) or not (t_2 <= 1e+296))): tmp = ((t - a) / (b - y)) - (x / z) else: tmp = t_1 / (y + ((z * b) - (y * z))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * y) + Float64(z * Float64(t - a))) t_2 = Float64(t_1 / Float64(y + Float64(z * Float64(b - y)))) tmp = 0.0 if ((t_2 <= Float64(-Inf)) || (!(t_2 <= -2e-256) && ((t_2 <= 0.0) || !(t_2 <= 1e+296)))) tmp = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)); else tmp = Float64(t_1 / Float64(y + Float64(Float64(z * b) - Float64(y * z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * y) + (z * (t - a)); t_2 = t_1 / (y + (z * (b - y))); tmp = 0.0; if ((t_2 <= -Inf) || (~((t_2 <= -2e-256)) && ((t_2 <= 0.0) || ~((t_2 <= 1e+296))))) tmp = ((t - a) / (b - y)) - (x / z); else tmp = t_1 / (y + ((z * b) - (y * z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$2, (-Infinity)], And[N[Not[LessEqual[t$95$2, -2e-256]], $MachinePrecision], Or[LessEqual[t$95$2, 0.0], N[Not[LessEqual[t$95$2, 1e+296]], $MachinePrecision]]]], N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(y + N[(N[(z * b), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + z \cdot \left(t - a\right)\\
t_2 := \frac{t\_1}{y + z \cdot \left(b - y\right)}\\
\mathbf{if}\;t\_2 \leq -\infty \lor \neg \left(t\_2 \leq -2 \cdot 10^{-256}\right) \land \left(t\_2 \leq 0 \lor \neg \left(t\_2 \leq 10^{+296}\right)\right):\\
\;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{y + \left(z \cdot b - y \cdot z\right)}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0 or -1.99999999999999995e-256 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or 9.99999999999999981e295 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 28.8%
Taylor expanded in z around -inf 54.2%
associate--l+54.2%
mul-1-neg54.2%
distribute-lft-out--54.2%
associate-/l*60.6%
associate-/l*74.2%
div-sub75.1%
Simplified75.1%
Taylor expanded in y around inf 84.0%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1.99999999999999995e-256 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 9.99999999999999981e295Initial program 99.6%
sub-neg99.6%
distribute-lft-in99.6%
Applied egg-rr99.6%
Final simplification92.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y))))))
(if (or (<= t_1 (- INFINITY))
(and (not (<= t_1 -2e-256))
(or (<= t_1 0.0) (not (<= t_1 1e+296)))))
(- (/ (- t a) (- b y)) (/ x z))
t_1)))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
double tmp;
if ((t_1 <= -((double) INFINITY)) || (!(t_1 <= -2e-256) && ((t_1 <= 0.0) || !(t_1 <= 1e+296)))) {
tmp = ((t - a) / (b - y)) - (x / z);
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || (!(t_1 <= -2e-256) && ((t_1 <= 0.0) || !(t_1 <= 1e+296)))) {
tmp = ((t - a) / (b - y)) - (x / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y))) tmp = 0 if (t_1 <= -math.inf) or (not (t_1 <= -2e-256) and ((t_1 <= 0.0) or not (t_1 <= 1e+296))): tmp = ((t - a) / (b - y)) - (x / z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || (!(t_1 <= -2e-256) && ((t_1 <= 0.0) || !(t_1 <= 1e+296)))) tmp = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); tmp = 0.0; if ((t_1 <= -Inf) || (~((t_1 <= -2e-256)) && ((t_1 <= 0.0) || ~((t_1 <= 1e+296))))) tmp = ((t - a) / (b - y)) - (x / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], And[N[Not[LessEqual[t$95$1, -2e-256]], $MachinePrecision], Or[LessEqual[t$95$1, 0.0], N[Not[LessEqual[t$95$1, 1e+296]], $MachinePrecision]]]], N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision], t$95$1]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq -2 \cdot 10^{-256}\right) \land \left(t\_1 \leq 0 \lor \neg \left(t\_1 \leq 10^{+296}\right)\right):\\
\;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0 or -1.99999999999999995e-256 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or 9.99999999999999981e295 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 28.8%
Taylor expanded in z around -inf 54.2%
associate--l+54.2%
mul-1-neg54.2%
distribute-lft-out--54.2%
associate-/l*60.6%
associate-/l*74.2%
div-sub75.1%
Simplified75.1%
Taylor expanded in y around inf 84.0%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1.99999999999999995e-256 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 9.99999999999999981e295Initial program 99.6%
Final simplification92.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* z (- t a)) (+ y (* z (- b y)))))
(t_2 (- (/ (- t a) (- b y)) (/ x z))))
(if (<= z -510000000.0)
t_2
(if (<= z -8e-160)
t_1
(if (<= z 6.2e-68)
(/ (* x (- y (/ (* z (- a t)) x))) y)
(if (<= z 3.4e+20) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * (t - a)) / (y + (z * (b - y)));
double t_2 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (z <= -510000000.0) {
tmp = t_2;
} else if (z <= -8e-160) {
tmp = t_1;
} else if (z <= 6.2e-68) {
tmp = (x * (y - ((z * (a - t)) / x))) / y;
} else if (z <= 3.4e+20) {
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 = (z * (t - a)) / (y + (z * (b - y)))
t_2 = ((t - a) / (b - y)) - (x / z)
if (z <= (-510000000.0d0)) then
tmp = t_2
else if (z <= (-8d-160)) then
tmp = t_1
else if (z <= 6.2d-68) then
tmp = (x * (y - ((z * (a - t)) / x))) / y
else if (z <= 3.4d+20) 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 = (z * (t - a)) / (y + (z * (b - y)));
double t_2 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (z <= -510000000.0) {
tmp = t_2;
} else if (z <= -8e-160) {
tmp = t_1;
} else if (z <= 6.2e-68) {
tmp = (x * (y - ((z * (a - t)) / x))) / y;
} else if (z <= 3.4e+20) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z * (t - a)) / (y + (z * (b - y))) t_2 = ((t - a) / (b - y)) - (x / z) tmp = 0 if z <= -510000000.0: tmp = t_2 elif z <= -8e-160: tmp = t_1 elif z <= 6.2e-68: tmp = (x * (y - ((z * (a - t)) / x))) / y elif z <= 3.4e+20: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * Float64(t - a)) / Float64(y + Float64(z * Float64(b - y)))) t_2 = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)) tmp = 0.0 if (z <= -510000000.0) tmp = t_2; elseif (z <= -8e-160) tmp = t_1; elseif (z <= 6.2e-68) tmp = Float64(Float64(x * Float64(y - Float64(Float64(z * Float64(a - t)) / x))) / y); elseif (z <= 3.4e+20) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z * (t - a)) / (y + (z * (b - y))); t_2 = ((t - a) / (b - y)) - (x / z); tmp = 0.0; if (z <= -510000000.0) tmp = t_2; elseif (z <= -8e-160) tmp = t_1; elseif (z <= 6.2e-68) tmp = (x * (y - ((z * (a - t)) / x))) / y; elseif (z <= 3.4e+20) 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[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -510000000.0], t$95$2, If[LessEqual[z, -8e-160], t$95$1, If[LessEqual[z, 6.2e-68], N[(N[(x * N[(y - N[(N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 3.4e+20], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
t_2 := \frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{if}\;z \leq -510000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-160}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-68}:\\
\;\;\;\;\frac{x \cdot \left(y - \frac{z \cdot \left(a - t\right)}{x}\right)}{y}\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -5.1e8 or 3.4e20 < z Initial program 48.6%
Taylor expanded in z around -inf 67.7%
associate--l+67.7%
mul-1-neg67.7%
distribute-lft-out--67.7%
associate-/l*72.2%
associate-/l*83.2%
div-sub83.9%
Simplified83.9%
Taylor expanded in y around inf 86.3%
if -5.1e8 < z < -7.9999999999999999e-160 or 6.1999999999999999e-68 < z < 3.4e20Initial program 92.7%
Taylor expanded in x around 0 73.6%
if -7.9999999999999999e-160 < z < 6.1999999999999999e-68Initial program 90.1%
Taylor expanded in x around inf 88.6%
Taylor expanded in z around 0 68.5%
Final simplification79.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- a) b)))
(if (<= z -2.1e+257)
t_1
(if (<= z -2.3e-153)
(/ t b)
(if (<= z 6.5e-68)
x
(if (<= z 4.9e+122) (/ t b) (if (<= z 3.45e+280) (/ a y) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -a / b;
double tmp;
if (z <= -2.1e+257) {
tmp = t_1;
} else if (z <= -2.3e-153) {
tmp = t / b;
} else if (z <= 6.5e-68) {
tmp = x;
} else if (z <= 4.9e+122) {
tmp = t / b;
} else if (z <= 3.45e+280) {
tmp = a / y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = -a / b
if (z <= (-2.1d+257)) then
tmp = t_1
else if (z <= (-2.3d-153)) then
tmp = t / b
else if (z <= 6.5d-68) then
tmp = x
else if (z <= 4.9d+122) then
tmp = t / b
else if (z <= 3.45d+280) then
tmp = a / y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -a / b;
double tmp;
if (z <= -2.1e+257) {
tmp = t_1;
} else if (z <= -2.3e-153) {
tmp = t / b;
} else if (z <= 6.5e-68) {
tmp = x;
} else if (z <= 4.9e+122) {
tmp = t / b;
} else if (z <= 3.45e+280) {
tmp = a / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -a / b tmp = 0 if z <= -2.1e+257: tmp = t_1 elif z <= -2.3e-153: tmp = t / b elif z <= 6.5e-68: tmp = x elif z <= 4.9e+122: tmp = t / b elif z <= 3.45e+280: tmp = a / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-a) / b) tmp = 0.0 if (z <= -2.1e+257) tmp = t_1; elseif (z <= -2.3e-153) tmp = Float64(t / b); elseif (z <= 6.5e-68) tmp = x; elseif (z <= 4.9e+122) tmp = Float64(t / b); elseif (z <= 3.45e+280) tmp = Float64(a / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -a / b; tmp = 0.0; if (z <= -2.1e+257) tmp = t_1; elseif (z <= -2.3e-153) tmp = t / b; elseif (z <= 6.5e-68) tmp = x; elseif (z <= 4.9e+122) tmp = t / b; elseif (z <= 3.45e+280) tmp = a / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-a) / b), $MachinePrecision]}, If[LessEqual[z, -2.1e+257], t$95$1, If[LessEqual[z, -2.3e-153], N[(t / b), $MachinePrecision], If[LessEqual[z, 6.5e-68], x, If[LessEqual[z, 4.9e+122], N[(t / b), $MachinePrecision], If[LessEqual[z, 3.45e+280], N[(a / y), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-a}{b}\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{+257}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{-153}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-68}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4.9 \cdot 10^{+122}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 3.45 \cdot 10^{+280}:\\
\;\;\;\;\frac{a}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.10000000000000013e257 or 3.45000000000000019e280 < z Initial program 29.0%
Taylor expanded in a around inf 24.8%
mul-1-neg24.8%
distribute-lft-neg-out24.8%
*-commutative24.8%
Simplified24.8%
Taylor expanded in y around 0 58.1%
associate-*r/58.1%
mul-1-neg58.1%
Simplified58.1%
if -2.10000000000000013e257 < z < -2.29999999999999997e-153 or 6.4999999999999997e-68 < z < 4.8999999999999998e122Initial program 69.4%
Taylor expanded in b around inf 44.7%
Taylor expanded in t around inf 40.9%
if -2.29999999999999997e-153 < z < 6.4999999999999997e-68Initial program 90.1%
Taylor expanded in z around 0 51.9%
if 4.8999999999999998e122 < z < 3.45000000000000019e280Initial program 33.6%
Taylor expanded in a around inf 20.7%
mul-1-neg20.7%
distribute-lft-neg-out20.7%
*-commutative20.7%
Simplified20.7%
Taylor expanded in y around -inf 20.2%
Taylor expanded in z around inf 38.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -8.6e+73)
(- t_1 (/ x z))
(if (or (<= z -1.2e-153) (not (<= z 6.2e-68)))
t_1
(/ (* x y) (+ y (* z (- b y))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -8.6e+73) {
tmp = t_1 - (x / z);
} else if ((z <= -1.2e-153) || !(z <= 6.2e-68)) {
tmp = t_1;
} else {
tmp = (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) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-8.6d+73)) then
tmp = t_1 - (x / z)
else if ((z <= (-1.2d-153)) .or. (.not. (z <= 6.2d-68))) then
tmp = t_1
else
tmp = (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 t_1 = (t - a) / (b - y);
double tmp;
if (z <= -8.6e+73) {
tmp = t_1 - (x / z);
} else if ((z <= -1.2e-153) || !(z <= 6.2e-68)) {
tmp = t_1;
} else {
tmp = (x * y) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -8.6e+73: tmp = t_1 - (x / z) elif (z <= -1.2e-153) or not (z <= 6.2e-68): tmp = t_1 else: tmp = (x * y) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -8.6e+73) tmp = Float64(t_1 - Float64(x / z)); elseif ((z <= -1.2e-153) || !(z <= 6.2e-68)) tmp = t_1; else tmp = Float64(Float64(x * y) / Float64(y + Float64(z * Float64(b - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -8.6e+73) tmp = t_1 - (x / z); elseif ((z <= -1.2e-153) || ~((z <= 6.2e-68))) tmp = t_1; else tmp = (x * y) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.6e+73], N[(t$95$1 - N[(x / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -1.2e-153], N[Not[LessEqual[z, 6.2e-68]], $MachinePrecision]], t$95$1, N[(N[(x * y), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -8.6 \cdot 10^{+73}:\\
\;\;\;\;t\_1 - \frac{x}{z}\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-153} \lor \neg \left(z \leq 6.2 \cdot 10^{-68}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -8.60000000000000026e73Initial program 52.3%
Taylor expanded in z around -inf 65.5%
associate--l+65.5%
mul-1-neg65.5%
distribute-lft-out--65.5%
associate-/l*65.5%
associate-/l*78.7%
div-sub78.7%
Simplified78.7%
Taylor expanded in y around inf 86.5%
if -8.60000000000000026e73 < z < -1.2000000000000001e-153 or 6.1999999999999999e-68 < z Initial program 60.8%
Taylor expanded in z around inf 73.9%
if -1.2000000000000001e-153 < z < 6.1999999999999999e-68Initial program 90.1%
Taylor expanded in x around inf 58.3%
*-commutative58.3%
Simplified58.3%
Final simplification72.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -700.0) (not (<= z 1.3e+20))) (- (/ (- t a) (- b y)) (/ x z)) (/ (+ (* x y) (* z (- t a))) (+ y (* z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -700.0) || !(z <= 1.3e+20)) {
tmp = ((t - a) / (b - y)) - (x / z);
} else {
tmp = ((x * y) + (z * (t - a))) / (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 <= (-700.0d0)) .or. (.not. (z <= 1.3d+20))) then
tmp = ((t - a) / (b - y)) - (x / z)
else
tmp = ((x * y) + (z * (t - a))) / (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 <= -700.0) || !(z <= 1.3e+20)) {
tmp = ((t - a) / (b - y)) - (x / z);
} else {
tmp = ((x * y) + (z * (t - a))) / (y + (z * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -700.0) or not (z <= 1.3e+20): tmp = ((t - a) / (b - y)) - (x / z) else: tmp = ((x * y) + (z * (t - a))) / (y + (z * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -700.0) || !(z <= 1.3e+20)) tmp = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)); else tmp = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -700.0) || ~((z <= 1.3e+20))) tmp = ((t - a) / (b - y)) - (x / z); else tmp = ((x * y) + (z * (t - a))) / (y + (z * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -700.0], N[Not[LessEqual[z, 1.3e+20]], $MachinePrecision]], N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -700 \lor \neg \left(z \leq 1.3 \cdot 10^{+20}\right):\\
\;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot b}\\
\end{array}
\end{array}
if z < -700 or 1.3e20 < z Initial program 49.6%
Taylor expanded in z around -inf 67.2%
associate--l+67.2%
mul-1-neg67.2%
distribute-lft-out--67.2%
associate-/l*71.7%
associate-/l*82.6%
div-sub83.3%
Simplified83.3%
Taylor expanded in y around inf 85.4%
if -700 < z < 1.3e20Initial program 90.8%
Taylor expanded in b around inf 90.8%
*-commutative90.8%
Simplified90.8%
Final simplification87.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1460.0) (not (<= z 2.35e+20))) (- (/ (- t a) (- b y)) (/ x z)) (/ (+ (* x y) (* z t)) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1460.0) || !(z <= 2.35e+20)) {
tmp = ((t - a) / (b - y)) - (x / z);
} else {
tmp = ((x * y) + (z * t)) / (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 <= (-1460.0d0)) .or. (.not. (z <= 2.35d+20))) then
tmp = ((t - a) / (b - y)) - (x / z)
else
tmp = ((x * y) + (z * t)) / (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 <= -1460.0) || !(z <= 2.35e+20)) {
tmp = ((t - a) / (b - y)) - (x / z);
} else {
tmp = ((x * y) + (z * t)) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1460.0) or not (z <= 2.35e+20): tmp = ((t - a) / (b - y)) - (x / z) else: tmp = ((x * y) + (z * t)) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1460.0) || !(z <= 2.35e+20)) tmp = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)); else tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) / 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 <= -1460.0) || ~((z <= 2.35e+20))) tmp = ((t - a) / (b - y)) - (x / z); else tmp = ((x * y) + (z * t)) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1460.0], N[Not[LessEqual[z, 2.35e+20]], $MachinePrecision]], N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1460 \lor \neg \left(z \leq 2.35 \cdot 10^{+20}\right):\\
\;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y + z \cdot t}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -1460 or 2.35e20 < z Initial program 49.2%
Taylor expanded in z around -inf 67.4%
associate--l+67.4%
mul-1-neg67.4%
distribute-lft-out--67.4%
associate-/l*71.9%
associate-/l*83.0%
div-sub83.6%
Simplified83.6%
Taylor expanded in y around inf 85.7%
if -1460 < z < 2.35e20Initial program 90.9%
Taylor expanded in a around 0 72.9%
Final simplification80.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -1.15e-35)
(- t_1 (/ x z))
(if (<= z 6.4e-68) (/ (* x (- y (/ (* z (- a t)) x))) y) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.15e-35) {
tmp = t_1 - (x / z);
} else if (z <= 6.4e-68) {
tmp = (x * (y - ((z * (a - t)) / x))) / y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-1.15d-35)) then
tmp = t_1 - (x / z)
else if (z <= 6.4d-68) then
tmp = (x * (y - ((z * (a - t)) / x))) / y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.15e-35) {
tmp = t_1 - (x / z);
} else if (z <= 6.4e-68) {
tmp = (x * (y - ((z * (a - t)) / x))) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -1.15e-35: tmp = t_1 - (x / z) elif z <= 6.4e-68: tmp = (x * (y - ((z * (a - t)) / x))) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.15e-35) tmp = Float64(t_1 - Float64(x / z)); elseif (z <= 6.4e-68) tmp = Float64(Float64(x * Float64(y - Float64(Float64(z * Float64(a - t)) / x))) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.15e-35) tmp = t_1 - (x / z); elseif (z <= 6.4e-68) tmp = (x * (y - ((z * (a - t)) / x))) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.15e-35], N[(t$95$1 - N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.4e-68], N[(N[(x * N[(y - N[(N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{-35}:\\
\;\;\;\;t\_1 - \frac{x}{z}\\
\mathbf{elif}\;z \leq 6.4 \cdot 10^{-68}:\\
\;\;\;\;\frac{x \cdot \left(y - \frac{z \cdot \left(a - t\right)}{x}\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.1499999999999999e-35Initial program 61.1%
Taylor expanded in z around -inf 64.8%
associate--l+64.8%
mul-1-neg64.8%
distribute-lft-out--64.8%
associate-/l*65.8%
associate-/l*77.4%
div-sub77.4%
Simplified77.4%
Taylor expanded in y around inf 81.6%
if -1.1499999999999999e-35 < z < 6.3999999999999998e-68Initial program 90.0%
Taylor expanded in x around inf 87.7%
Taylor expanded in z around 0 62.4%
if 6.3999999999999998e-68 < z Initial program 46.8%
Taylor expanded in z around inf 81.3%
Final simplification74.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.15e-157) (not (<= z 6.2e-68))) (/ (- t a) (- 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 <= -1.15e-157) || !(z <= 6.2e-68)) {
tmp = (t - a) / (b - y);
} else {
tmp = (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 <= (-1.15d-157)) .or. (.not. (z <= 6.2d-68))) then
tmp = (t - a) / (b - y)
else
tmp = (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 <= -1.15e-157) || !(z <= 6.2e-68)) {
tmp = (t - a) / (b - y);
} else {
tmp = (x * y) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.15e-157) or not (z <= 6.2e-68): tmp = (t - a) / (b - y) else: tmp = (x * y) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.15e-157) || !(z <= 6.2e-68)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(x * y) / Float64(y + Float64(z * Float64(b - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.15e-157) || ~((z <= 6.2e-68))) tmp = (t - a) / (b - y); else tmp = (x * y) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.15e-157], N[Not[LessEqual[z, 6.2e-68]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{-157} \lor \neg \left(z \leq 6.2 \cdot 10^{-68}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -1.14999999999999994e-157 or 6.1999999999999999e-68 < z Initial program 58.0%
Taylor expanded in z around inf 75.3%
if -1.14999999999999994e-157 < z < 6.1999999999999999e-68Initial program 90.1%
Taylor expanded in x around inf 58.3%
*-commutative58.3%
Simplified58.3%
Final simplification70.7%
(FPCore (x y z t a b) :precision binary64 (if (<= z -6.2e+257) (/ (- a) b) (if (or (<= z -2.3e-153) (not (<= z 6.8e-68))) (/ t (- b y)) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -6.2e+257) {
tmp = -a / b;
} else if ((z <= -2.3e-153) || !(z <= 6.8e-68)) {
tmp = t / (b - y);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-6.2d+257)) then
tmp = -a / b
else if ((z <= (-2.3d-153)) .or. (.not. (z <= 6.8d-68))) then
tmp = t / (b - y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -6.2e+257) {
tmp = -a / b;
} else if ((z <= -2.3e-153) || !(z <= 6.8e-68)) {
tmp = t / (b - y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -6.2e+257: tmp = -a / b elif (z <= -2.3e-153) or not (z <= 6.8e-68): tmp = t / (b - y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -6.2e+257) tmp = Float64(Float64(-a) / b); elseif ((z <= -2.3e-153) || !(z <= 6.8e-68)) tmp = Float64(t / Float64(b - y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -6.2e+257) tmp = -a / b; elseif ((z <= -2.3e-153) || ~((z <= 6.8e-68))) tmp = t / (b - y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -6.2e+257], N[((-a) / b), $MachinePrecision], If[Or[LessEqual[z, -2.3e-153], N[Not[LessEqual[z, 6.8e-68]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+257}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{-153} \lor \neg \left(z \leq 6.8 \cdot 10^{-68}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -6.2000000000000001e257Initial program 46.4%
Taylor expanded in a around inf 37.6%
mul-1-neg37.6%
distribute-lft-neg-out37.6%
*-commutative37.6%
Simplified37.6%
Taylor expanded in y around 0 64.7%
associate-*r/64.7%
mul-1-neg64.7%
Simplified64.7%
if -6.2000000000000001e257 < z < -2.29999999999999997e-153 or 6.80000000000000037e-68 < z Initial program 58.7%
Taylor expanded in t around inf 36.1%
*-commutative36.1%
Simplified36.1%
Taylor expanded in z around inf 48.0%
if -2.29999999999999997e-153 < z < 6.80000000000000037e-68Initial program 90.1%
Taylor expanded in z around 0 51.9%
Final simplification49.8%
(FPCore (x y z t a b) :precision binary64 (if (<= z -2.3e-153) (/ t b) (if (<= z 6.8e-68) x (if (<= z 5.1e+122) (/ t b) (/ a y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.3e-153) {
tmp = t / b;
} else if (z <= 6.8e-68) {
tmp = x;
} else if (z <= 5.1e+122) {
tmp = t / b;
} else {
tmp = a / 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 <= (-2.3d-153)) then
tmp = t / b
else if (z <= 6.8d-68) then
tmp = x
else if (z <= 5.1d+122) then
tmp = t / b
else
tmp = a / 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 <= -2.3e-153) {
tmp = t / b;
} else if (z <= 6.8e-68) {
tmp = x;
} else if (z <= 5.1e+122) {
tmp = t / b;
} else {
tmp = a / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2.3e-153: tmp = t / b elif z <= 6.8e-68: tmp = x elif z <= 5.1e+122: tmp = t / b else: tmp = a / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.3e-153) tmp = Float64(t / b); elseif (z <= 6.8e-68) tmp = x; elseif (z <= 5.1e+122) tmp = Float64(t / b); else tmp = Float64(a / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -2.3e-153) tmp = t / b; elseif (z <= 6.8e-68) tmp = x; elseif (z <= 5.1e+122) tmp = t / b; else tmp = a / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.3e-153], N[(t / b), $MachinePrecision], If[LessEqual[z, 6.8e-68], x, If[LessEqual[z, 5.1e+122], N[(t / b), $MachinePrecision], N[(a / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{-153}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-68}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.1 \cdot 10^{+122}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{y}\\
\end{array}
\end{array}
if z < -2.29999999999999997e-153 or 6.80000000000000037e-68 < z < 5.1e122Initial program 67.6%
Taylor expanded in b around inf 44.2%
Taylor expanded in t around inf 38.7%
if -2.29999999999999997e-153 < z < 6.80000000000000037e-68Initial program 90.1%
Taylor expanded in z around 0 51.9%
if 5.1e122 < z Initial program 28.5%
Taylor expanded in a around inf 18.5%
mul-1-neg18.5%
distribute-lft-neg-out18.5%
*-commutative18.5%
Simplified18.5%
Taylor expanded in y around -inf 18.4%
Taylor expanded in z around inf 31.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.3e-153) (not (<= z 6e-68))) (/ (- t a) (- b y)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.3e-153) || !(z <= 6e-68)) {
tmp = (t - a) / (b - y);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-2.3d-153)) .or. (.not. (z <= 6d-68))) then
tmp = (t - a) / (b - y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.3e-153) || !(z <= 6e-68)) {
tmp = (t - a) / (b - y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.3e-153) or not (z <= 6e-68): tmp = (t - a) / (b - y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.3e-153) || !(z <= 6e-68)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.3e-153) || ~((z <= 6e-68))) tmp = (t - a) / (b - y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.3e-153], N[Not[LessEqual[z, 6e-68]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{-153} \lor \neg \left(z \leq 6 \cdot 10^{-68}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.29999999999999997e-153 or 6e-68 < z Initial program 58.0%
Taylor expanded in z around inf 75.3%
if -2.29999999999999997e-153 < z < 6e-68Initial program 90.1%
Taylor expanded in z around 0 51.9%
Final simplification69.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.15e+22) (not (<= y 6.6e+58))) (/ x (- 1.0 z)) (/ (- t a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.15e+22) || !(y <= 6.6e+58)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-3.15d+22)) .or. (.not. (y <= 6.6d+58))) then
tmp = x / (1.0d0 - z)
else
tmp = (t - a) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.15e+22) || !(y <= 6.6e+58)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.15e+22) or not (y <= 6.6e+58): tmp = x / (1.0 - z) else: tmp = (t - a) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.15e+22) || !(y <= 6.6e+58)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(Float64(t - a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.15e+22) || ~((y <= 6.6e+58))) tmp = x / (1.0 - z); else tmp = (t - a) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.15e+22], N[Not[LessEqual[y, 6.6e+58]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.15 \cdot 10^{+22} \lor \neg \left(y \leq 6.6 \cdot 10^{+58}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -3.1500000000000001e22 or 6.59999999999999966e58 < y Initial program 50.4%
Taylor expanded in y around inf 54.8%
mul-1-neg54.8%
unsub-neg54.8%
Simplified54.8%
if -3.1500000000000001e22 < y < 6.59999999999999966e58Initial program 76.4%
Taylor expanded in y around 0 55.2%
Final simplification55.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.45e+75) (not (<= y 1.12e+69))) (/ x (- 1.0 z)) (/ t (- b y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.45e+75) || !(y <= 1.12e+69)) {
tmp = x / (1.0 - z);
} else {
tmp = t / (b - y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-2.45d+75)) .or. (.not. (y <= 1.12d+69))) then
tmp = x / (1.0d0 - z)
else
tmp = t / (b - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.45e+75) || !(y <= 1.12e+69)) {
tmp = x / (1.0 - z);
} else {
tmp = t / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.45e+75) or not (y <= 1.12e+69): tmp = x / (1.0 - z) else: tmp = t / (b - y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.45e+75) || !(y <= 1.12e+69)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(t / Float64(b - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.45e+75) || ~((y <= 1.12e+69))) tmp = x / (1.0 - z); else tmp = t / (b - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.45e+75], N[Not[LessEqual[y, 1.12e+69]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.45 \cdot 10^{+75} \lor \neg \left(y \leq 1.12 \cdot 10^{+69}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b - y}\\
\end{array}
\end{array}
if y < -2.45000000000000005e75 or 1.12e69 < y Initial program 48.1%
Taylor expanded in y around inf 57.3%
mul-1-neg57.3%
unsub-neg57.3%
Simplified57.3%
if -2.45000000000000005e75 < y < 1.12e69Initial program 76.1%
Taylor expanded in t around inf 41.4%
*-commutative41.4%
Simplified41.4%
Taylor expanded in z around inf 43.6%
Final simplification48.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.3e-49) (not (<= z 7.6e-28))) (/ a y) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.3e-49) || !(z <= 7.6e-28)) {
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 <= (-3.3d-49)) .or. (.not. (z <= 7.6d-28))) 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 <= -3.3e-49) || !(z <= 7.6e-28)) {
tmp = a / y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.3e-49) or not (z <= 7.6e-28): tmp = a / y else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.3e-49) || !(z <= 7.6e-28)) 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 <= -3.3e-49) || ~((z <= 7.6e-28))) tmp = a / y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.3e-49], N[Not[LessEqual[z, 7.6e-28]], $MachinePrecision]], N[(a / y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{-49} \lor \neg \left(z \leq 7.6 \cdot 10^{-28}\right):\\
\;\;\;\;\frac{a}{y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.3e-49 or 7.60000000000000018e-28 < z Initial program 53.3%
Taylor expanded in a around inf 24.3%
mul-1-neg24.3%
distribute-lft-neg-out24.3%
*-commutative24.3%
Simplified24.3%
Taylor expanded in y around -inf 18.0%
Taylor expanded in z around inf 21.9%
if -3.3e-49 < z < 7.60000000000000018e-28Initial program 90.4%
Taylor expanded in z around 0 42.9%
Final simplification29.5%
(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%
Taylor expanded in z around 0 17.5%
(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 2024086
(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)))))