
(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 20 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 (+ y (* z (- b y))))
(t_2 (/ (* x y) t_1))
(t_3 (* z (- t a)))
(t_4 (/ (- t a) (- b y)))
(t_5 (/ (+ t_3 (* x y)) t_1))
(t_6 (+ (/ x (- 1.0 z)) t_4)))
(if (<= t_5 (- INFINITY))
t_6
(if (<= t_5 -2e-263)
(- (+ (/ (* z t) t_1) t_2) (/ (* z a) t_1))
(if (<= t_5 0.0)
(-
(+ t_4 (* (/ y z) (/ x (- b y))))
(/ y (/ (pow (- b y) 2.0) (/ (- t a) z))))
(if (<= t_5 2e+298) (+ t_2 (/ t_3 t_1)) t_6))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = (x * y) / t_1;
double t_3 = z * (t - a);
double t_4 = (t - a) / (b - y);
double t_5 = (t_3 + (x * y)) / t_1;
double t_6 = (x / (1.0 - z)) + t_4;
double tmp;
if (t_5 <= -((double) INFINITY)) {
tmp = t_6;
} else if (t_5 <= -2e-263) {
tmp = (((z * t) / t_1) + t_2) - ((z * a) / t_1);
} else if (t_5 <= 0.0) {
tmp = (t_4 + ((y / z) * (x / (b - y)))) - (y / (pow((b - y), 2.0) / ((t - a) / z)));
} else if (t_5 <= 2e+298) {
tmp = t_2 + (t_3 / t_1);
} else {
tmp = t_6;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = (x * y) / t_1;
double t_3 = z * (t - a);
double t_4 = (t - a) / (b - y);
double t_5 = (t_3 + (x * y)) / t_1;
double t_6 = (x / (1.0 - z)) + t_4;
double tmp;
if (t_5 <= -Double.POSITIVE_INFINITY) {
tmp = t_6;
} else if (t_5 <= -2e-263) {
tmp = (((z * t) / t_1) + t_2) - ((z * a) / t_1);
} else if (t_5 <= 0.0) {
tmp = (t_4 + ((y / z) * (x / (b - y)))) - (y / (Math.pow((b - y), 2.0) / ((t - a) / z)));
} else if (t_5 <= 2e+298) {
tmp = t_2 + (t_3 / t_1);
} else {
tmp = t_6;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = (x * y) / t_1 t_3 = z * (t - a) t_4 = (t - a) / (b - y) t_5 = (t_3 + (x * y)) / t_1 t_6 = (x / (1.0 - z)) + t_4 tmp = 0 if t_5 <= -math.inf: tmp = t_6 elif t_5 <= -2e-263: tmp = (((z * t) / t_1) + t_2) - ((z * a) / t_1) elif t_5 <= 0.0: tmp = (t_4 + ((y / z) * (x / (b - y)))) - (y / (math.pow((b - y), 2.0) / ((t - a) / z))) elif t_5 <= 2e+298: tmp = t_2 + (t_3 / t_1) else: tmp = t_6 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(x * y) / t_1) t_3 = Float64(z * Float64(t - a)) t_4 = Float64(Float64(t - a) / Float64(b - y)) t_5 = Float64(Float64(t_3 + Float64(x * y)) / t_1) t_6 = Float64(Float64(x / Float64(1.0 - z)) + t_4) tmp = 0.0 if (t_5 <= Float64(-Inf)) tmp = t_6; elseif (t_5 <= -2e-263) tmp = Float64(Float64(Float64(Float64(z * t) / t_1) + t_2) - Float64(Float64(z * a) / t_1)); elseif (t_5 <= 0.0) tmp = Float64(Float64(t_4 + Float64(Float64(y / z) * Float64(x / Float64(b - y)))) - Float64(y / Float64((Float64(b - y) ^ 2.0) / Float64(Float64(t - a) / z)))); elseif (t_5 <= 2e+298) tmp = Float64(t_2 + Float64(t_3 / t_1)); else tmp = t_6; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = (x * y) / t_1; t_3 = z * (t - a); t_4 = (t - a) / (b - y); t_5 = (t_3 + (x * y)) / t_1; t_6 = (x / (1.0 - z)) + t_4; tmp = 0.0; if (t_5 <= -Inf) tmp = t_6; elseif (t_5 <= -2e-263) tmp = (((z * t) / t_1) + t_2) - ((z * a) / t_1); elseif (t_5 <= 0.0) tmp = (t_4 + ((y / z) * (x / (b - y)))) - (y / (((b - y) ^ 2.0) / ((t - a) / z))); elseif (t_5 <= 2e+298) tmp = t_2 + (t_3 / t_1); else tmp = t_6; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$3 + N[(x * y), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision]}, If[LessEqual[t$95$5, (-Infinity)], t$95$6, If[LessEqual[t$95$5, -2e-263], N[(N[(N[(N[(z * t), $MachinePrecision] / t$95$1), $MachinePrecision] + t$95$2), $MachinePrecision] - N[(N[(z * a), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, 0.0], N[(N[(t$95$4 + N[(N[(y / z), $MachinePrecision] * N[(x / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[(N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision] / N[(N[(t - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, 2e+298], N[(t$95$2 + N[(t$95$3 / t$95$1), $MachinePrecision]), $MachinePrecision], t$95$6]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{x \cdot y}{t_1}\\
t_3 := z \cdot \left(t - a\right)\\
t_4 := \frac{t - a}{b - y}\\
t_5 := \frac{t_3 + x \cdot y}{t_1}\\
t_6 := \frac{x}{1 - z} + t_4\\
\mathbf{if}\;t_5 \leq -\infty:\\
\;\;\;\;t_6\\
\mathbf{elif}\;t_5 \leq -2 \cdot 10^{-263}:\\
\;\;\;\;\left(\frac{z \cdot t}{t_1} + t_2\right) - \frac{z \cdot a}{t_1}\\
\mathbf{elif}\;t_5 \leq 0:\\
\;\;\;\;\left(t_4 + \frac{y}{z} \cdot \frac{x}{b - y}\right) - \frac{y}{\frac{{\left(b - y\right)}^{2}}{\frac{t - a}{z}}}\\
\mathbf{elif}\;t_5 \leq 2 \cdot 10^{+298}:\\
\;\;\;\;t_2 + \frac{t_3}{t_1}\\
\mathbf{else}:\\
\;\;\;\;t_6\\
\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.9999999999999999e298 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 17.8%
Taylor expanded in x around 0 17.8%
Taylor expanded in z around inf 61.9%
Taylor expanded in y around inf 92.4%
neg-mul-192.4%
sub-neg92.4%
Simplified92.4%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2e-263Initial program 99.7%
Taylor expanded in t around 0 99.7%
if -2e-263 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 14.8%
Taylor expanded in z around inf 74.2%
associate--r+74.2%
+-commutative74.2%
associate--l+74.2%
*-commutative74.2%
times-frac84.0%
div-sub84.1%
associate-/l*89.7%
*-commutative89.7%
associate-/l*89.7%
Simplified89.7%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.9999999999999999e298Initial program 99.6%
Taylor expanded in x around 0 99.7%
Final simplification96.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (* z (- t a)))
(t_3 (+ (/ (* x y) t_1) (/ t_2 t_1)))
(t_4 (/ (- t a) (- b y)))
(t_5 (/ (+ t_2 (* x y)) t_1))
(t_6 (+ (/ x (- 1.0 z)) t_4)))
(if (<= t_5 (- INFINITY))
t_6
(if (<= t_5 -2e-263)
t_3
(if (<= t_5 0.0) t_4 (if (<= t_5 2e+298) t_3 t_6))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = z * (t - a);
double t_3 = ((x * y) / t_1) + (t_2 / t_1);
double t_4 = (t - a) / (b - y);
double t_5 = (t_2 + (x * y)) / t_1;
double t_6 = (x / (1.0 - z)) + t_4;
double tmp;
if (t_5 <= -((double) INFINITY)) {
tmp = t_6;
} else if (t_5 <= -2e-263) {
tmp = t_3;
} else if (t_5 <= 0.0) {
tmp = t_4;
} else if (t_5 <= 2e+298) {
tmp = t_3;
} else {
tmp = t_6;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = z * (t - a);
double t_3 = ((x * y) / t_1) + (t_2 / t_1);
double t_4 = (t - a) / (b - y);
double t_5 = (t_2 + (x * y)) / t_1;
double t_6 = (x / (1.0 - z)) + t_4;
double tmp;
if (t_5 <= -Double.POSITIVE_INFINITY) {
tmp = t_6;
} else if (t_5 <= -2e-263) {
tmp = t_3;
} else if (t_5 <= 0.0) {
tmp = t_4;
} else if (t_5 <= 2e+298) {
tmp = t_3;
} else {
tmp = t_6;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = z * (t - a) t_3 = ((x * y) / t_1) + (t_2 / t_1) t_4 = (t - a) / (b - y) t_5 = (t_2 + (x * y)) / t_1 t_6 = (x / (1.0 - z)) + t_4 tmp = 0 if t_5 <= -math.inf: tmp = t_6 elif t_5 <= -2e-263: tmp = t_3 elif t_5 <= 0.0: tmp = t_4 elif t_5 <= 2e+298: tmp = t_3 else: tmp = t_6 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(z * Float64(t - a)) t_3 = Float64(Float64(Float64(x * y) / t_1) + Float64(t_2 / t_1)) t_4 = Float64(Float64(t - a) / Float64(b - y)) t_5 = Float64(Float64(t_2 + Float64(x * y)) / t_1) t_6 = Float64(Float64(x / Float64(1.0 - z)) + t_4) tmp = 0.0 if (t_5 <= Float64(-Inf)) tmp = t_6; elseif (t_5 <= -2e-263) tmp = t_3; elseif (t_5 <= 0.0) tmp = t_4; elseif (t_5 <= 2e+298) tmp = t_3; else tmp = t_6; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = z * (t - a); t_3 = ((x * y) / t_1) + (t_2 / t_1); t_4 = (t - a) / (b - y); t_5 = (t_2 + (x * y)) / t_1; t_6 = (x / (1.0 - z)) + t_4; tmp = 0.0; if (t_5 <= -Inf) tmp = t_6; elseif (t_5 <= -2e-263) tmp = t_3; elseif (t_5 <= 0.0) tmp = t_4; elseif (t_5 <= 2e+298) tmp = t_3; else tmp = t_6; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$2 + N[(x * y), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision]}, If[LessEqual[t$95$5, (-Infinity)], t$95$6, If[LessEqual[t$95$5, -2e-263], t$95$3, If[LessEqual[t$95$5, 0.0], t$95$4, If[LessEqual[t$95$5, 2e+298], t$95$3, t$95$6]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := z \cdot \left(t - a\right)\\
t_3 := \frac{x \cdot y}{t_1} + \frac{t_2}{t_1}\\
t_4 := \frac{t - a}{b - y}\\
t_5 := \frac{t_2 + x \cdot y}{t_1}\\
t_6 := \frac{x}{1 - z} + t_4\\
\mathbf{if}\;t_5 \leq -\infty:\\
\;\;\;\;t_6\\
\mathbf{elif}\;t_5 \leq -2 \cdot 10^{-263}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_5 \leq 0:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t_5 \leq 2 \cdot 10^{+298}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_6\\
\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.9999999999999999e298 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 17.8%
Taylor expanded in x around 0 17.8%
Taylor expanded in z around inf 61.9%
Taylor expanded in y around inf 92.4%
neg-mul-192.4%
sub-neg92.4%
Simplified92.4%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2e-263 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.9999999999999999e298Initial program 99.7%
Taylor expanded in x around 0 99.7%
if -2e-263 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 14.8%
Taylor expanded in z around inf 79.9%
Final simplification95.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (/ (* x y) t_1))
(t_3 (* z (- t a)))
(t_4 (/ (- t a) (- b y)))
(t_5 (/ (+ t_3 (* x y)) t_1))
(t_6 (+ (/ x (- 1.0 z)) t_4)))
(if (<= t_5 (- INFINITY))
t_6
(if (<= t_5 -2e-263)
(- (+ (/ (* z t) t_1) t_2) (/ (* z a) t_1))
(if (<= t_5 0.0) t_4 (if (<= t_5 2e+298) (+ t_2 (/ t_3 t_1)) t_6))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = (x * y) / t_1;
double t_3 = z * (t - a);
double t_4 = (t - a) / (b - y);
double t_5 = (t_3 + (x * y)) / t_1;
double t_6 = (x / (1.0 - z)) + t_4;
double tmp;
if (t_5 <= -((double) INFINITY)) {
tmp = t_6;
} else if (t_5 <= -2e-263) {
tmp = (((z * t) / t_1) + t_2) - ((z * a) / t_1);
} else if (t_5 <= 0.0) {
tmp = t_4;
} else if (t_5 <= 2e+298) {
tmp = t_2 + (t_3 / t_1);
} else {
tmp = t_6;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = (x * y) / t_1;
double t_3 = z * (t - a);
double t_4 = (t - a) / (b - y);
double t_5 = (t_3 + (x * y)) / t_1;
double t_6 = (x / (1.0 - z)) + t_4;
double tmp;
if (t_5 <= -Double.POSITIVE_INFINITY) {
tmp = t_6;
} else if (t_5 <= -2e-263) {
tmp = (((z * t) / t_1) + t_2) - ((z * a) / t_1);
} else if (t_5 <= 0.0) {
tmp = t_4;
} else if (t_5 <= 2e+298) {
tmp = t_2 + (t_3 / t_1);
} else {
tmp = t_6;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = (x * y) / t_1 t_3 = z * (t - a) t_4 = (t - a) / (b - y) t_5 = (t_3 + (x * y)) / t_1 t_6 = (x / (1.0 - z)) + t_4 tmp = 0 if t_5 <= -math.inf: tmp = t_6 elif t_5 <= -2e-263: tmp = (((z * t) / t_1) + t_2) - ((z * a) / t_1) elif t_5 <= 0.0: tmp = t_4 elif t_5 <= 2e+298: tmp = t_2 + (t_3 / t_1) else: tmp = t_6 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(x * y) / t_1) t_3 = Float64(z * Float64(t - a)) t_4 = Float64(Float64(t - a) / Float64(b - y)) t_5 = Float64(Float64(t_3 + Float64(x * y)) / t_1) t_6 = Float64(Float64(x / Float64(1.0 - z)) + t_4) tmp = 0.0 if (t_5 <= Float64(-Inf)) tmp = t_6; elseif (t_5 <= -2e-263) tmp = Float64(Float64(Float64(Float64(z * t) / t_1) + t_2) - Float64(Float64(z * a) / t_1)); elseif (t_5 <= 0.0) tmp = t_4; elseif (t_5 <= 2e+298) tmp = Float64(t_2 + Float64(t_3 / t_1)); else tmp = t_6; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = (x * y) / t_1; t_3 = z * (t - a); t_4 = (t - a) / (b - y); t_5 = (t_3 + (x * y)) / t_1; t_6 = (x / (1.0 - z)) + t_4; tmp = 0.0; if (t_5 <= -Inf) tmp = t_6; elseif (t_5 <= -2e-263) tmp = (((z * t) / t_1) + t_2) - ((z * a) / t_1); elseif (t_5 <= 0.0) tmp = t_4; elseif (t_5 <= 2e+298) tmp = t_2 + (t_3 / t_1); else tmp = t_6; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$3 + N[(x * y), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision]}, If[LessEqual[t$95$5, (-Infinity)], t$95$6, If[LessEqual[t$95$5, -2e-263], N[(N[(N[(N[(z * t), $MachinePrecision] / t$95$1), $MachinePrecision] + t$95$2), $MachinePrecision] - N[(N[(z * a), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, 0.0], t$95$4, If[LessEqual[t$95$5, 2e+298], N[(t$95$2 + N[(t$95$3 / t$95$1), $MachinePrecision]), $MachinePrecision], t$95$6]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{x \cdot y}{t_1}\\
t_3 := z \cdot \left(t - a\right)\\
t_4 := \frac{t - a}{b - y}\\
t_5 := \frac{t_3 + x \cdot y}{t_1}\\
t_6 := \frac{x}{1 - z} + t_4\\
\mathbf{if}\;t_5 \leq -\infty:\\
\;\;\;\;t_6\\
\mathbf{elif}\;t_5 \leq -2 \cdot 10^{-263}:\\
\;\;\;\;\left(\frac{z \cdot t}{t_1} + t_2\right) - \frac{z \cdot a}{t_1}\\
\mathbf{elif}\;t_5 \leq 0:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t_5 \leq 2 \cdot 10^{+298}:\\
\;\;\;\;t_2 + \frac{t_3}{t_1}\\
\mathbf{else}:\\
\;\;\;\;t_6\\
\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.9999999999999999e298 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 17.8%
Taylor expanded in x around 0 17.8%
Taylor expanded in z around inf 61.9%
Taylor expanded in y around inf 92.4%
neg-mul-192.4%
sub-neg92.4%
Simplified92.4%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2e-263Initial program 99.7%
Taylor expanded in t around 0 99.7%
if -2e-263 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 14.8%
Taylor expanded in z around inf 79.9%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.9999999999999999e298Initial program 99.6%
Taylor expanded in x around 0 99.7%
Final simplification95.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y)))
(t_2 (/ (+ (* z (- t a)) (* x y)) (+ y (* z (- b y)))))
(t_3 (+ (/ x (- 1.0 z)) t_1)))
(if (<= t_2 (- INFINITY))
t_3
(if (<= t_2 -2e-263)
t_2
(if (<= t_2 0.0) t_1 (if (<= t_2 2e+298) t_2 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double t_2 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y)));
double t_3 = (x / (1.0 - z)) + t_1;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_3;
} else if (t_2 <= -2e-263) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t_1;
} else if (t_2 <= 2e+298) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double t_2 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y)));
double t_3 = (x / (1.0 - z)) + t_1;
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_3;
} else if (t_2 <= -2e-263) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t_1;
} else if (t_2 <= 2e+298) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) t_2 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y))) t_3 = (x / (1.0 - z)) + t_1 tmp = 0 if t_2 <= -math.inf: tmp = t_3 elif t_2 <= -2e-263: tmp = t_2 elif t_2 <= 0.0: tmp = t_1 elif t_2 <= 2e+298: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) t_2 = Float64(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / Float64(y + Float64(z * Float64(b - y)))) t_3 = Float64(Float64(x / Float64(1.0 - z)) + t_1) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_3; elseif (t_2 <= -2e-263) tmp = t_2; elseif (t_2 <= 0.0) tmp = t_1; elseif (t_2 <= 2e+298) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); t_2 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y))); t_3 = (x / (1.0 - z)) + t_1; tmp = 0.0; if (t_2 <= -Inf) tmp = t_3; elseif (t_2 <= -2e-263) tmp = t_2; elseif (t_2 <= 0.0) tmp = t_1; elseif (t_2 <= 2e+298) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$3, If[LessEqual[t$95$2, -2e-263], t$95$2, If[LessEqual[t$95$2, 0.0], t$95$1, If[LessEqual[t$95$2, 2e+298], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
t_2 := \frac{z \cdot \left(t - a\right) + x \cdot y}{y + z \cdot \left(b - y\right)}\\
t_3 := \frac{x}{1 - z} + t_1\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_2 \leq -2 \cdot 10^{-263}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+298}:\\
\;\;\;\;t_2\\
\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)))) < -inf.0 or 1.9999999999999999e298 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 17.8%
Taylor expanded in x around 0 17.8%
Taylor expanded in z around inf 61.9%
Taylor expanded in y around inf 92.4%
neg-mul-192.4%
sub-neg92.4%
Simplified92.4%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2e-263 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.9999999999999999e298Initial program 99.7%
if -2e-263 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 14.8%
Taylor expanded in z around inf 79.9%
Final simplification95.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (+ (/ x (- 1.0 z)) (/ (- t a) (- b y))))
(t_3 (* z (- t a))))
(if (<= z -1.2e-16)
t_2
(if (<= z -1.15e-76)
(/ (+ t_3 (* x y)) (* z b))
(if (<= z -2.3e-120)
(/ (- (* x y) (* z a)) t_1)
(if (<= z 0.00021) (+ x (/ t_3 t_1)) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = (x / (1.0 - z)) + ((t - a) / (b - y));
double t_3 = z * (t - a);
double tmp;
if (z <= -1.2e-16) {
tmp = t_2;
} else if (z <= -1.15e-76) {
tmp = (t_3 + (x * y)) / (z * b);
} else if (z <= -2.3e-120) {
tmp = ((x * y) - (z * a)) / t_1;
} else if (z <= 0.00021) {
tmp = x + (t_3 / 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) :: t_3
real(8) :: tmp
t_1 = y + (z * (b - y))
t_2 = (x / (1.0d0 - z)) + ((t - a) / (b - y))
t_3 = z * (t - a)
if (z <= (-1.2d-16)) then
tmp = t_2
else if (z <= (-1.15d-76)) then
tmp = (t_3 + (x * y)) / (z * b)
else if (z <= (-2.3d-120)) then
tmp = ((x * y) - (z * a)) / t_1
else if (z <= 0.00021d0) then
tmp = x + (t_3 / 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 = y + (z * (b - y));
double t_2 = (x / (1.0 - z)) + ((t - a) / (b - y));
double t_3 = z * (t - a);
double tmp;
if (z <= -1.2e-16) {
tmp = t_2;
} else if (z <= -1.15e-76) {
tmp = (t_3 + (x * y)) / (z * b);
} else if (z <= -2.3e-120) {
tmp = ((x * y) - (z * a)) / t_1;
} else if (z <= 0.00021) {
tmp = x + (t_3 / t_1);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = (x / (1.0 - z)) + ((t - a) / (b - y)) t_3 = z * (t - a) tmp = 0 if z <= -1.2e-16: tmp = t_2 elif z <= -1.15e-76: tmp = (t_3 + (x * y)) / (z * b) elif z <= -2.3e-120: tmp = ((x * y) - (z * a)) / t_1 elif z <= 0.00021: tmp = x + (t_3 / t_1) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(x / Float64(1.0 - z)) + Float64(Float64(t - a) / Float64(b - y))) t_3 = Float64(z * Float64(t - a)) tmp = 0.0 if (z <= -1.2e-16) tmp = t_2; elseif (z <= -1.15e-76) tmp = Float64(Float64(t_3 + Float64(x * y)) / Float64(z * b)); elseif (z <= -2.3e-120) tmp = Float64(Float64(Float64(x * y) - Float64(z * a)) / t_1); elseif (z <= 0.00021) tmp = Float64(x + Float64(t_3 / t_1)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = (x / (1.0 - z)) + ((t - a) / (b - y)); t_3 = z * (t - a); tmp = 0.0; if (z <= -1.2e-16) tmp = t_2; elseif (z <= -1.15e-76) tmp = (t_3 + (x * y)) / (z * b); elseif (z <= -2.3e-120) tmp = ((x * y) - (z * a)) / t_1; elseif (z <= 0.00021) tmp = x + (t_3 / t_1); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.2e-16], t$95$2, If[LessEqual[z, -1.15e-76], N[(N[(t$95$3 + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.3e-120], N[(N[(N[(x * y), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[z, 0.00021], N[(x + N[(t$95$3 / t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{x}{1 - z} + \frac{t - a}{b - y}\\
t_3 := z \cdot \left(t - a\right)\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{-16}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{-76}:\\
\;\;\;\;\frac{t_3 + x \cdot y}{z \cdot b}\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{-120}:\\
\;\;\;\;\frac{x \cdot y - z \cdot a}{t_1}\\
\mathbf{elif}\;z \leq 0.00021:\\
\;\;\;\;x + \frac{t_3}{t_1}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -1.20000000000000002e-16 or 2.1000000000000001e-4 < z Initial program 43.6%
Taylor expanded in x around 0 43.7%
Taylor expanded in z around inf 83.0%
Taylor expanded in y around inf 87.7%
neg-mul-187.7%
sub-neg87.7%
Simplified87.7%
if -1.20000000000000002e-16 < z < -1.15000000000000003e-76Initial program 100.0%
Taylor expanded in b around inf 90.0%
if -1.15000000000000003e-76 < z < -2.29999999999999986e-120Initial program 92.5%
Taylor expanded in t around 0 89.9%
+-commutative89.9%
mul-1-neg89.9%
unsub-neg89.9%
*-commutative89.9%
*-commutative89.9%
Simplified89.9%
if -2.29999999999999986e-120 < z < 2.1000000000000001e-4Initial program 86.9%
Taylor expanded in x around 0 86.9%
Taylor expanded in z around 0 92.1%
Final simplification89.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ x (- 1.0 z)) (/ (- t a) (- b y)))))
(if (<= z -5.3e-14)
t_1
(if (<= z -8.4e-85)
(/ (+ (- t a) (/ x (/ z y))) b)
(if (<= z 4.4e-122)
(- x (/ (* z a) y))
(if (<= z 5e-7) (/ (* 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 = (x / (1.0 - z)) + ((t - a) / (b - y));
double tmp;
if (z <= -5.3e-14) {
tmp = t_1;
} else if (z <= -8.4e-85) {
tmp = ((t - a) + (x / (z / y))) / b;
} else if (z <= 4.4e-122) {
tmp = x - ((z * a) / y);
} else if (z <= 5e-7) {
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 = (x / (1.0d0 - z)) + ((t - a) / (b - y))
if (z <= (-5.3d-14)) then
tmp = t_1
else if (z <= (-8.4d-85)) then
tmp = ((t - a) + (x / (z / y))) / b
else if (z <= 4.4d-122) then
tmp = x - ((z * a) / y)
else if (z <= 5d-7) 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 = (x / (1.0 - z)) + ((t - a) / (b - y));
double tmp;
if (z <= -5.3e-14) {
tmp = t_1;
} else if (z <= -8.4e-85) {
tmp = ((t - a) + (x / (z / y))) / b;
} else if (z <= 4.4e-122) {
tmp = x - ((z * a) / y);
} else if (z <= 5e-7) {
tmp = (z * (t - a)) / (y + (z * b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x / (1.0 - z)) + ((t - a) / (b - y)) tmp = 0 if z <= -5.3e-14: tmp = t_1 elif z <= -8.4e-85: tmp = ((t - a) + (x / (z / y))) / b elif z <= 4.4e-122: tmp = x - ((z * a) / y) elif z <= 5e-7: 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(x / Float64(1.0 - z)) + Float64(Float64(t - a) / Float64(b - y))) tmp = 0.0 if (z <= -5.3e-14) tmp = t_1; elseif (z <= -8.4e-85) tmp = Float64(Float64(Float64(t - a) + Float64(x / Float64(z / y))) / b); elseif (z <= 4.4e-122) tmp = Float64(x - Float64(Float64(z * a) / y)); elseif (z <= 5e-7) tmp = Float64(Float64(z * 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 = (x / (1.0 - z)) + ((t - a) / (b - y)); tmp = 0.0; if (z <= -5.3e-14) tmp = t_1; elseif (z <= -8.4e-85) tmp = ((t - a) + (x / (z / y))) / b; elseif (z <= 4.4e-122) tmp = x - ((z * a) / y); elseif (z <= 5e-7) 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[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.3e-14], t$95$1, If[LessEqual[z, -8.4e-85], N[(N[(N[(t - a), $MachinePrecision] + N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 4.4e-122], N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e-7], N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z} + \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -5.3 \cdot 10^{-14}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -8.4 \cdot 10^{-85}:\\
\;\;\;\;\frac{\left(t - a\right) + \frac{x}{\frac{z}{y}}}{b}\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-122}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-7}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right)}{y + z \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -5.3000000000000001e-14 or 4.99999999999999977e-7 < z Initial program 43.6%
Taylor expanded in x around 0 43.7%
Taylor expanded in z around inf 83.0%
Taylor expanded in y around inf 87.7%
neg-mul-187.7%
sub-neg87.7%
Simplified87.7%
if -5.3000000000000001e-14 < z < -8.3999999999999999e-85Initial program 100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in b around inf 90.5%
associate--l+90.5%
sub-neg90.5%
+-commutative90.5%
associate-+r+90.5%
sub-neg90.5%
associate-/l*90.5%
Simplified90.5%
if -8.3999999999999999e-85 < z < 4.4e-122Initial program 86.2%
Taylor expanded in t around 0 69.9%
+-commutative69.9%
mul-1-neg69.9%
unsub-neg69.9%
*-commutative69.9%
*-commutative69.9%
Simplified69.9%
Taylor expanded in z around 0 56.4%
Taylor expanded in y around 0 68.9%
associate-*r/68.9%
neg-mul-168.9%
distribute-rgt-neg-in68.9%
Simplified68.9%
if 4.4e-122 < z < 4.99999999999999977e-7Initial program 91.9%
Taylor expanded in x around 0 82.9%
Taylor expanded in b around inf 82.9%
*-commutative50.0%
Simplified82.9%
Final simplification80.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ x (- 1.0 z)) (/ (- t a) (- b y)))) (t_2 (* z (- t a))))
(if (<= z -6.2e-17)
t_1
(if (<= z -6e-86)
(/ (+ t_2 (* x y)) (* z b))
(if (<= z 1.2e-120)
(- x (/ (* z a) y))
(if (<= z 0.000105) (/ t_2 (+ y (* z b))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / (1.0 - z)) + ((t - a) / (b - y));
double t_2 = z * (t - a);
double tmp;
if (z <= -6.2e-17) {
tmp = t_1;
} else if (z <= -6e-86) {
tmp = (t_2 + (x * y)) / (z * b);
} else if (z <= 1.2e-120) {
tmp = x - ((z * a) / y);
} else if (z <= 0.000105) {
tmp = t_2 / (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) :: t_2
real(8) :: tmp
t_1 = (x / (1.0d0 - z)) + ((t - a) / (b - y))
t_2 = z * (t - a)
if (z <= (-6.2d-17)) then
tmp = t_1
else if (z <= (-6d-86)) then
tmp = (t_2 + (x * y)) / (z * b)
else if (z <= 1.2d-120) then
tmp = x - ((z * a) / y)
else if (z <= 0.000105d0) then
tmp = t_2 / (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 = (x / (1.0 - z)) + ((t - a) / (b - y));
double t_2 = z * (t - a);
double tmp;
if (z <= -6.2e-17) {
tmp = t_1;
} else if (z <= -6e-86) {
tmp = (t_2 + (x * y)) / (z * b);
} else if (z <= 1.2e-120) {
tmp = x - ((z * a) / y);
} else if (z <= 0.000105) {
tmp = t_2 / (y + (z * b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x / (1.0 - z)) + ((t - a) / (b - y)) t_2 = z * (t - a) tmp = 0 if z <= -6.2e-17: tmp = t_1 elif z <= -6e-86: tmp = (t_2 + (x * y)) / (z * b) elif z <= 1.2e-120: tmp = x - ((z * a) / y) elif z <= 0.000105: tmp = t_2 / (y + (z * b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x / Float64(1.0 - z)) + Float64(Float64(t - a) / Float64(b - y))) t_2 = Float64(z * Float64(t - a)) tmp = 0.0 if (z <= -6.2e-17) tmp = t_1; elseif (z <= -6e-86) tmp = Float64(Float64(t_2 + Float64(x * y)) / Float64(z * b)); elseif (z <= 1.2e-120) tmp = Float64(x - Float64(Float64(z * a) / y)); elseif (z <= 0.000105) tmp = Float64(t_2 / 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 = (x / (1.0 - z)) + ((t - a) / (b - y)); t_2 = z * (t - a); tmp = 0.0; if (z <= -6.2e-17) tmp = t_1; elseif (z <= -6e-86) tmp = (t_2 + (x * y)) / (z * b); elseif (z <= 1.2e-120) tmp = x - ((z * a) / y); elseif (z <= 0.000105) tmp = t_2 / (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[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.2e-17], t$95$1, If[LessEqual[z, -6e-86], N[(N[(t$95$2 + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e-120], N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.000105], N[(t$95$2 / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z} + \frac{t - a}{b - y}\\
t_2 := z \cdot \left(t - a\right)\\
\mathbf{if}\;z \leq -6.2 \cdot 10^{-17}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -6 \cdot 10^{-86}:\\
\;\;\;\;\frac{t_2 + x \cdot y}{z \cdot b}\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-120}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\mathbf{elif}\;z \leq 0.000105:\\
\;\;\;\;\frac{t_2}{y + z \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -6.1999999999999997e-17 or 1.05e-4 < z Initial program 43.6%
Taylor expanded in x around 0 43.7%
Taylor expanded in z around inf 83.0%
Taylor expanded in y around inf 87.7%
neg-mul-187.7%
sub-neg87.7%
Simplified87.7%
if -6.1999999999999997e-17 < z < -6.0000000000000002e-86Initial program 100.0%
Taylor expanded in b around inf 90.9%
if -6.0000000000000002e-86 < z < 1.2e-120Initial program 86.2%
Taylor expanded in t around 0 69.9%
+-commutative69.9%
mul-1-neg69.9%
unsub-neg69.9%
*-commutative69.9%
*-commutative69.9%
Simplified69.9%
Taylor expanded in z around 0 56.4%
Taylor expanded in y around 0 68.9%
associate-*r/68.9%
neg-mul-168.9%
distribute-rgt-neg-in68.9%
Simplified68.9%
if 1.2e-120 < z < 1.05e-4Initial program 91.9%
Taylor expanded in x around 0 82.9%
Taylor expanded in b around inf 82.9%
*-commutative50.0%
Simplified82.9%
Final simplification80.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -1.75e-85)
t_1
(if (<= z 2.4e-70)
(- x (/ (* z a) y))
(if (<= z 8.5e+21)
(/ (* z t) (+ y (* z b)))
(if (<= z 4.8e+148) (- (/ x (- 1.0 z)) (/ (- t a) y)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.75e-85) {
tmp = t_1;
} else if (z <= 2.4e-70) {
tmp = x - ((z * a) / y);
} else if (z <= 8.5e+21) {
tmp = (z * t) / (y + (z * b));
} else if (z <= 4.8e+148) {
tmp = (x / (1.0 - z)) - ((t - a) / y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-1.75d-85)) then
tmp = t_1
else if (z <= 2.4d-70) then
tmp = x - ((z * a) / y)
else if (z <= 8.5d+21) then
tmp = (z * t) / (y + (z * b))
else if (z <= 4.8d+148) then
tmp = (x / (1.0d0 - z)) - ((t - a) / y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.75e-85) {
tmp = t_1;
} else if (z <= 2.4e-70) {
tmp = x - ((z * a) / y);
} else if (z <= 8.5e+21) {
tmp = (z * t) / (y + (z * b));
} else if (z <= 4.8e+148) {
tmp = (x / (1.0 - z)) - ((t - a) / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -1.75e-85: tmp = t_1 elif z <= 2.4e-70: tmp = x - ((z * a) / y) elif z <= 8.5e+21: tmp = (z * t) / (y + (z * b)) elif z <= 4.8e+148: tmp = (x / (1.0 - z)) - ((t - a) / y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.75e-85) tmp = t_1; elseif (z <= 2.4e-70) tmp = Float64(x - Float64(Float64(z * a) / y)); elseif (z <= 8.5e+21) tmp = Float64(Float64(z * t) / Float64(y + Float64(z * b))); elseif (z <= 4.8e+148) tmp = Float64(Float64(x / Float64(1.0 - z)) - Float64(Float64(t - a) / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.75e-85) tmp = t_1; elseif (z <= 2.4e-70) tmp = x - ((z * a) / y); elseif (z <= 8.5e+21) tmp = (z * t) / (y + (z * b)); elseif (z <= 4.8e+148) tmp = (x / (1.0 - z)) - ((t - a) / y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.75e-85], t$95$1, If[LessEqual[z, 2.4e-70], N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e+21], N[(N[(z * t), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.8e+148], N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.75 \cdot 10^{-85}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-70}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+21}:\\
\;\;\;\;\frac{z \cdot t}{y + z \cdot b}\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{+148}:\\
\;\;\;\;\frac{x}{1 - z} - \frac{t - a}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.74999999999999989e-85 or 4.79999999999999989e148 < z Initial program 40.0%
Taylor expanded in z around inf 81.1%
if -1.74999999999999989e-85 < z < 2.4000000000000001e-70Initial program 87.1%
Taylor expanded in t around 0 70.7%
+-commutative70.7%
mul-1-neg70.7%
unsub-neg70.7%
*-commutative70.7%
*-commutative70.7%
Simplified70.7%
Taylor expanded in z around 0 57.1%
Taylor expanded in y around 0 68.8%
associate-*r/68.8%
neg-mul-168.8%
distribute-rgt-neg-in68.8%
Simplified68.8%
if 2.4000000000000001e-70 < z < 8.5e21Initial program 85.5%
Taylor expanded in t around inf 60.3%
*-commutative60.3%
Simplified60.3%
Taylor expanded in b around inf 60.3%
*-commutative60.3%
Simplified60.3%
if 8.5e21 < z < 4.79999999999999989e148Initial program 77.2%
Taylor expanded in x around 0 77.2%
Taylor expanded in z around inf 80.6%
Taylor expanded in y around inf 87.3%
neg-mul-187.3%
sub-neg87.3%
Simplified87.3%
Taylor expanded in y around -inf 72.4%
+-commutative72.4%
mul-1-neg72.4%
unsub-neg72.4%
Simplified72.4%
Final simplification74.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6e-51) (not (<= z 1.4e-5))) (+ (/ x (- 1.0 z)) (/ (- t a) (- b y))) (+ x (/ (* z (- t a)) (+ y (* z (- b y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6e-51) || !(z <= 1.4e-5)) {
tmp = (x / (1.0 - z)) + ((t - a) / (b - y));
} else {
tmp = x + ((z * (t - a)) / (y + (z * (b - y))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-6d-51)) .or. (.not. (z <= 1.4d-5))) then
tmp = (x / (1.0d0 - z)) + ((t - a) / (b - y))
else
tmp = x + ((z * (t - a)) / (y + (z * (b - y))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6e-51) || !(z <= 1.4e-5)) {
tmp = (x / (1.0 - z)) + ((t - a) / (b - y));
} else {
tmp = x + ((z * (t - a)) / (y + (z * (b - y))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6e-51) or not (z <= 1.4e-5): tmp = (x / (1.0 - z)) + ((t - a) / (b - y)) else: tmp = x + ((z * (t - a)) / (y + (z * (b - y)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6e-51) || !(z <= 1.4e-5)) tmp = Float64(Float64(x / Float64(1.0 - z)) + Float64(Float64(t - a) / Float64(b - y))); else tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / Float64(y + Float64(z * Float64(b - y))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6e-51) || ~((z <= 1.4e-5))) tmp = (x / (1.0 - z)) + ((t - a) / (b - y)); else tmp = x + ((z * (t - a)) / (y + (z * (b - y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6e-51], N[Not[LessEqual[z, 1.4e-5]], $MachinePrecision]], N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{-51} \lor \neg \left(z \leq 1.4 \cdot 10^{-5}\right):\\
\;\;\;\;\frac{x}{1 - z} + \frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -6.00000000000000005e-51 or 1.39999999999999998e-5 < z Initial program 46.1%
Taylor expanded in x around 0 46.1%
Taylor expanded in z around inf 83.7%
Taylor expanded in y around inf 85.9%
neg-mul-185.9%
sub-neg85.9%
Simplified85.9%
if -6.00000000000000005e-51 < z < 1.39999999999999998e-5Initial program 87.9%
Taylor expanded in x around 0 88.0%
Taylor expanded in z around 0 87.7%
Final simplification86.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))) (t_2 (/ (- a) b)) (t_3 (/ x (- 1.0 z))))
(if (<= y -1.2e+94)
t_3
(if (<= y -9.2e-144)
t_1
(if (<= y 2.5e-275)
t_2
(if (<= y 2.2e-190)
t_1
(if (<= y 1.6e-122) t_2 (if (<= y 6.8e+24) t_1 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 / b;
double t_3 = x / (1.0 - z);
double tmp;
if (y <= -1.2e+94) {
tmp = t_3;
} else if (y <= -9.2e-144) {
tmp = t_1;
} else if (y <= 2.5e-275) {
tmp = t_2;
} else if (y <= 2.2e-190) {
tmp = t_1;
} else if (y <= 1.6e-122) {
tmp = t_2;
} else if (y <= 6.8e+24) {
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 = t / (b - y)
t_2 = -a / b
t_3 = x / (1.0d0 - z)
if (y <= (-1.2d+94)) then
tmp = t_3
else if (y <= (-9.2d-144)) then
tmp = t_1
else if (y <= 2.5d-275) then
tmp = t_2
else if (y <= 2.2d-190) then
tmp = t_1
else if (y <= 1.6d-122) then
tmp = t_2
else if (y <= 6.8d+24) 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 = t / (b - y);
double t_2 = -a / b;
double t_3 = x / (1.0 - z);
double tmp;
if (y <= -1.2e+94) {
tmp = t_3;
} else if (y <= -9.2e-144) {
tmp = t_1;
} else if (y <= 2.5e-275) {
tmp = t_2;
} else if (y <= 2.2e-190) {
tmp = t_1;
} else if (y <= 1.6e-122) {
tmp = t_2;
} else if (y <= 6.8e+24) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) t_2 = -a / b t_3 = x / (1.0 - z) tmp = 0 if y <= -1.2e+94: tmp = t_3 elif y <= -9.2e-144: tmp = t_1 elif y <= 2.5e-275: tmp = t_2 elif y <= 2.2e-190: tmp = t_1 elif y <= 1.6e-122: tmp = t_2 elif y <= 6.8e+24: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) t_2 = Float64(Float64(-a) / b) t_3 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -1.2e+94) tmp = t_3; elseif (y <= -9.2e-144) tmp = t_1; elseif (y <= 2.5e-275) tmp = t_2; elseif (y <= 2.2e-190) tmp = t_1; elseif (y <= 1.6e-122) tmp = t_2; elseif (y <= 6.8e+24) tmp = t_1; 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 / b; t_3 = x / (1.0 - z); tmp = 0.0; if (y <= -1.2e+94) tmp = t_3; elseif (y <= -9.2e-144) tmp = t_1; elseif (y <= 2.5e-275) tmp = t_2; elseif (y <= 2.2e-190) tmp = t_1; elseif (y <= 1.6e-122) tmp = t_2; elseif (y <= 6.8e+24) tmp = t_1; 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) / b), $MachinePrecision]}, Block[{t$95$3 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.2e+94], t$95$3, If[LessEqual[y, -9.2e-144], t$95$1, If[LessEqual[y, 2.5e-275], t$95$2, If[LessEqual[y, 2.2e-190], t$95$1, If[LessEqual[y, 1.6e-122], t$95$2, If[LessEqual[y, 6.8e+24], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
t_2 := \frac{-a}{b}\\
t_3 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -1.2 \cdot 10^{+94}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq -9.2 \cdot 10^{-144}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{-275}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{-190}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-122}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+24}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if y < -1.19999999999999991e94 or 6.8000000000000001e24 < y Initial program 50.8%
Taylor expanded in y around inf 64.6%
mul-1-neg64.6%
unsub-neg64.6%
Simplified64.6%
if -1.19999999999999991e94 < y < -9.2e-144 or 2.49999999999999992e-275 < y < 2.20000000000000004e-190 or 1.6000000000000001e-122 < y < 6.8000000000000001e24Initial program 72.2%
Taylor expanded in t around inf 35.6%
*-commutative35.6%
Simplified35.6%
Taylor expanded in z around inf 39.7%
if -9.2e-144 < y < 2.49999999999999992e-275 or 2.20000000000000004e-190 < y < 1.6000000000000001e-122Initial program 78.0%
Taylor expanded in t around 0 52.8%
+-commutative52.8%
mul-1-neg52.8%
unsub-neg52.8%
*-commutative52.8%
*-commutative52.8%
Simplified52.8%
Taylor expanded in y around 0 46.0%
associate-*r/46.0%
neg-mul-146.0%
Simplified46.0%
Final simplification50.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -7.2e-88)
t_1
(if (<= z 3.2e-119)
(- x (/ (* z a) y))
(if (<= z 0.00024) (/ (* 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 = (t - a) / (b - y);
double tmp;
if (z <= -7.2e-88) {
tmp = t_1;
} else if (z <= 3.2e-119) {
tmp = x - ((z * a) / y);
} else if (z <= 0.00024) {
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 = (t - a) / (b - y)
if (z <= (-7.2d-88)) then
tmp = t_1
else if (z <= 3.2d-119) then
tmp = x - ((z * a) / y)
else if (z <= 0.00024d0) 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 = (t - a) / (b - y);
double tmp;
if (z <= -7.2e-88) {
tmp = t_1;
} else if (z <= 3.2e-119) {
tmp = x - ((z * a) / y);
} else if (z <= 0.00024) {
tmp = (z * (t - a)) / (y + (z * b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -7.2e-88: tmp = t_1 elif z <= 3.2e-119: tmp = x - ((z * a) / y) elif z <= 0.00024: 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(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -7.2e-88) tmp = t_1; elseif (z <= 3.2e-119) tmp = Float64(x - Float64(Float64(z * a) / y)); elseif (z <= 0.00024) tmp = Float64(Float64(z * 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 = (t - a) / (b - y); tmp = 0.0; if (z <= -7.2e-88) tmp = t_1; elseif (z <= 3.2e-119) tmp = x - ((z * a) / y); elseif (z <= 0.00024) 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[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.2e-88], t$95$1, If[LessEqual[z, 3.2e-119], N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.00024], N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -7.2 \cdot 10^{-88}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-119}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\mathbf{elif}\;z \leq 0.00024:\\
\;\;\;\;\frac{z \cdot \left(t - a\right)}{y + z \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -7.1999999999999999e-88 or 2.40000000000000006e-4 < z Initial program 47.9%
Taylor expanded in z around inf 76.8%
if -7.1999999999999999e-88 < z < 3.19999999999999993e-119Initial program 86.2%
Taylor expanded in t around 0 69.9%
+-commutative69.9%
mul-1-neg69.9%
unsub-neg69.9%
*-commutative69.9%
*-commutative69.9%
Simplified69.9%
Taylor expanded in z around 0 56.4%
Taylor expanded in y around 0 68.9%
associate-*r/68.9%
neg-mul-168.9%
distribute-rgt-neg-in68.9%
Simplified68.9%
if 3.19999999999999993e-119 < z < 2.40000000000000006e-4Initial program 91.9%
Taylor expanded in x around 0 82.9%
Taylor expanded in b around inf 82.9%
*-commutative50.0%
Simplified82.9%
Final simplification74.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))))
(if (<= z -1.75e-78)
t_1
(if (<= z 1.95e-67)
x
(if (or (<= z 9.5e+214) (not (<= z 9e+256))) t_1 (/ (- a) b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -1.75e-78) {
tmp = t_1;
} else if (z <= 1.95e-67) {
tmp = x;
} else if ((z <= 9.5e+214) || !(z <= 9e+256)) {
tmp = t_1;
} else {
tmp = -a / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = t / (b - y)
if (z <= (-1.75d-78)) then
tmp = t_1
else if (z <= 1.95d-67) then
tmp = x
else if ((z <= 9.5d+214) .or. (.not. (z <= 9d+256))) then
tmp = t_1
else
tmp = -a / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -1.75e-78) {
tmp = t_1;
} else if (z <= 1.95e-67) {
tmp = x;
} else if ((z <= 9.5e+214) || !(z <= 9e+256)) {
tmp = t_1;
} else {
tmp = -a / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) tmp = 0 if z <= -1.75e-78: tmp = t_1 elif z <= 1.95e-67: tmp = x elif (z <= 9.5e+214) or not (z <= 9e+256): tmp = t_1 else: tmp = -a / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) tmp = 0.0 if (z <= -1.75e-78) tmp = t_1; elseif (z <= 1.95e-67) tmp = x; elseif ((z <= 9.5e+214) || !(z <= 9e+256)) tmp = t_1; else tmp = Float64(Float64(-a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t / (b - y); tmp = 0.0; if (z <= -1.75e-78) tmp = t_1; elseif (z <= 1.95e-67) tmp = x; elseif ((z <= 9.5e+214) || ~((z <= 9e+256))) tmp = t_1; else tmp = -a / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.75e-78], t$95$1, If[LessEqual[z, 1.95e-67], x, If[Or[LessEqual[z, 9.5e+214], N[Not[LessEqual[z, 9e+256]], $MachinePrecision]], t$95$1, N[((-a) / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
\mathbf{if}\;z \leq -1.75 \cdot 10^{-78}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{-67}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+214} \lor \neg \left(z \leq 9 \cdot 10^{+256}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-a}{b}\\
\end{array}
\end{array}
if z < -1.75e-78 or 1.9499999999999999e-67 < z < 9.49999999999999921e214 or 8.9999999999999996e256 < z Initial program 53.6%
Taylor expanded in t around inf 29.4%
*-commutative29.4%
Simplified29.4%
Taylor expanded in z around inf 41.5%
if -1.75e-78 < z < 1.9499999999999999e-67Initial program 87.5%
Taylor expanded in z around 0 50.6%
if 9.49999999999999921e214 < z < 8.9999999999999996e256Initial program 21.3%
Taylor expanded in t around 0 21.0%
+-commutative21.0%
mul-1-neg21.0%
unsub-neg21.0%
*-commutative21.0%
*-commutative21.0%
Simplified21.0%
Taylor expanded in y around 0 72.4%
associate-*r/72.4%
neg-mul-172.4%
Simplified72.4%
Final simplification46.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- a) b)))
(if (<= z -7.5e+136)
t_1
(if (<= z -7.5e+36)
(- (/ x z))
(if (<= z -6e-79) (/ t b) (if (<= z 0.00076) (+ x (* x z)) 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 <= -7.5e+136) {
tmp = t_1;
} else if (z <= -7.5e+36) {
tmp = -(x / z);
} else if (z <= -6e-79) {
tmp = t / b;
} else if (z <= 0.00076) {
tmp = x + (x * z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = -a / b
if (z <= (-7.5d+136)) then
tmp = t_1
else if (z <= (-7.5d+36)) then
tmp = -(x / z)
else if (z <= (-6d-79)) then
tmp = t / b
else if (z <= 0.00076d0) then
tmp = x + (x * z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -a / b;
double tmp;
if (z <= -7.5e+136) {
tmp = t_1;
} else if (z <= -7.5e+36) {
tmp = -(x / z);
} else if (z <= -6e-79) {
tmp = t / b;
} else if (z <= 0.00076) {
tmp = x + (x * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -a / b tmp = 0 if z <= -7.5e+136: tmp = t_1 elif z <= -7.5e+36: tmp = -(x / z) elif z <= -6e-79: tmp = t / b elif z <= 0.00076: tmp = x + (x * z) 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 <= -7.5e+136) tmp = t_1; elseif (z <= -7.5e+36) tmp = Float64(-Float64(x / z)); elseif (z <= -6e-79) tmp = Float64(t / b); elseif (z <= 0.00076) tmp = Float64(x + Float64(x * z)); 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 <= -7.5e+136) tmp = t_1; elseif (z <= -7.5e+36) tmp = -(x / z); elseif (z <= -6e-79) tmp = t / b; elseif (z <= 0.00076) tmp = x + (x * z); 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, -7.5e+136], t$95$1, If[LessEqual[z, -7.5e+36], (-N[(x / z), $MachinePrecision]), If[LessEqual[z, -6e-79], N[(t / b), $MachinePrecision], If[LessEqual[z, 0.00076], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-a}{b}\\
\mathbf{if}\;z \leq -7.5 \cdot 10^{+136}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{+36}:\\
\;\;\;\;-\frac{x}{z}\\
\mathbf{elif}\;z \leq -6 \cdot 10^{-79}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 0.00076:\\
\;\;\;\;x + x \cdot z\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -7.5000000000000002e136 or 7.6000000000000004e-4 < z Initial program 40.1%
Taylor expanded in t around 0 24.3%
+-commutative24.3%
mul-1-neg24.3%
unsub-neg24.3%
*-commutative24.3%
*-commutative24.3%
Simplified24.3%
Taylor expanded in y around 0 30.7%
associate-*r/30.7%
neg-mul-130.7%
Simplified30.7%
if -7.5000000000000002e136 < z < -7.50000000000000054e36Initial program 48.1%
Taylor expanded in y around inf 44.0%
mul-1-neg44.0%
unsub-neg44.0%
Simplified44.0%
Taylor expanded in z around inf 44.0%
associate-*r/44.0%
mul-1-neg44.0%
Simplified44.0%
if -7.50000000000000054e36 < z < -5.99999999999999999e-79Initial program 80.2%
Taylor expanded in t around inf 42.9%
*-commutative42.9%
Simplified42.9%
Taylor expanded in y around 0 43.8%
if -5.99999999999999999e-79 < z < 7.6000000000000004e-4Initial program 86.8%
Taylor expanded in y around inf 47.3%
mul-1-neg47.3%
unsub-neg47.3%
Simplified47.3%
Taylor expanded in z around 0 46.9%
*-commutative46.9%
Simplified46.9%
Final simplification40.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- a) b)))
(if (<= z -7.8e+136)
t_1
(if (<= z -6e+37)
(- (/ x z))
(if (<= z -7e-80) (/ t b) (if (<= z 0.00032) x 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 <= -7.8e+136) {
tmp = t_1;
} else if (z <= -6e+37) {
tmp = -(x / z);
} else if (z <= -7e-80) {
tmp = t / b;
} else if (z <= 0.00032) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = -a / b
if (z <= (-7.8d+136)) then
tmp = t_1
else if (z <= (-6d+37)) then
tmp = -(x / z)
else if (z <= (-7d-80)) then
tmp = t / b
else if (z <= 0.00032d0) then
tmp = x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -a / b;
double tmp;
if (z <= -7.8e+136) {
tmp = t_1;
} else if (z <= -6e+37) {
tmp = -(x / z);
} else if (z <= -7e-80) {
tmp = t / b;
} else if (z <= 0.00032) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -a / b tmp = 0 if z <= -7.8e+136: tmp = t_1 elif z <= -6e+37: tmp = -(x / z) elif z <= -7e-80: tmp = t / b elif z <= 0.00032: tmp = x 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 <= -7.8e+136) tmp = t_1; elseif (z <= -6e+37) tmp = Float64(-Float64(x / z)); elseif (z <= -7e-80) tmp = Float64(t / b); elseif (z <= 0.00032) tmp = x; 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 <= -7.8e+136) tmp = t_1; elseif (z <= -6e+37) tmp = -(x / z); elseif (z <= -7e-80) tmp = t / b; elseif (z <= 0.00032) tmp = x; 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, -7.8e+136], t$95$1, If[LessEqual[z, -6e+37], (-N[(x / z), $MachinePrecision]), If[LessEqual[z, -7e-80], N[(t / b), $MachinePrecision], If[LessEqual[z, 0.00032], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-a}{b}\\
\mathbf{if}\;z \leq -7.8 \cdot 10^{+136}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -6 \cdot 10^{+37}:\\
\;\;\;\;-\frac{x}{z}\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-80}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 0.00032:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -7.80000000000000038e136 or 3.20000000000000026e-4 < z Initial program 40.1%
Taylor expanded in t around 0 24.3%
+-commutative24.3%
mul-1-neg24.3%
unsub-neg24.3%
*-commutative24.3%
*-commutative24.3%
Simplified24.3%
Taylor expanded in y around 0 30.7%
associate-*r/30.7%
neg-mul-130.7%
Simplified30.7%
if -7.80000000000000038e136 < z < -6.00000000000000043e37Initial program 48.1%
Taylor expanded in y around inf 44.0%
mul-1-neg44.0%
unsub-neg44.0%
Simplified44.0%
Taylor expanded in z around inf 44.0%
associate-*r/44.0%
mul-1-neg44.0%
Simplified44.0%
if -6.00000000000000043e37 < z < -7.00000000000000029e-80Initial program 80.2%
Taylor expanded in t around inf 42.9%
*-commutative42.9%
Simplified42.9%
Taylor expanded in y around 0 43.8%
if -7.00000000000000029e-80 < z < 3.20000000000000026e-4Initial program 86.8%
Taylor expanded in z around 0 46.7%
Final simplification39.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.1e-84) (not (<= z 1.35e-67))) (/ (- t a) (- b y)) (- x (/ a (/ y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.1e-84) || !(z <= 1.35e-67)) {
tmp = (t - a) / (b - y);
} else {
tmp = x - (a / (y / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-2.1d-84)) .or. (.not. (z <= 1.35d-67))) then
tmp = (t - a) / (b - y)
else
tmp = x - (a / (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.1e-84) || !(z <= 1.35e-67)) {
tmp = (t - a) / (b - y);
} else {
tmp = x - (a / (y / z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.1e-84) or not (z <= 1.35e-67): tmp = (t - a) / (b - y) else: tmp = x - (a / (y / z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.1e-84) || !(z <= 1.35e-67)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x - Float64(a / Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.1e-84) || ~((z <= 1.35e-67))) tmp = (t - a) / (b - y); else tmp = x - (a / (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.1e-84], N[Not[LessEqual[z, 1.35e-67]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x - N[(a / N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{-84} \lor \neg \left(z \leq 1.35 \cdot 10^{-67}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{a}{\frac{y}{z}}\\
\end{array}
\end{array}
if z < -2.09999999999999998e-84 or 1.35000000000000008e-67 < z Initial program 51.7%
Taylor expanded in z around inf 73.7%
if -2.09999999999999998e-84 < z < 1.35000000000000008e-67Initial program 87.3%
Taylor expanded in t around 0 70.3%
+-commutative70.3%
mul-1-neg70.3%
unsub-neg70.3%
*-commutative70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in z around 0 56.9%
Taylor expanded in y around 0 68.4%
mul-1-neg68.4%
*-commutative68.4%
unsub-neg68.4%
*-commutative68.4%
associate-/l*67.4%
Simplified67.4%
Final simplification71.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6e-84) (not (<= z 2.1e-67))) (/ (- t a) (- b y)) (- x (/ (* z a) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6e-84) || !(z <= 2.1e-67)) {
tmp = (t - a) / (b - y);
} else {
tmp = x - ((z * 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 <= (-6d-84)) .or. (.not. (z <= 2.1d-67))) then
tmp = (t - a) / (b - y)
else
tmp = x - ((z * 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 <= -6e-84) || !(z <= 2.1e-67)) {
tmp = (t - a) / (b - y);
} else {
tmp = x - ((z * a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6e-84) or not (z <= 2.1e-67): tmp = (t - a) / (b - y) else: tmp = x - ((z * a) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6e-84) || !(z <= 2.1e-67)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x - Float64(Float64(z * a) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6e-84) || ~((z <= 2.1e-67))) tmp = (t - a) / (b - y); else tmp = x - ((z * a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6e-84], N[Not[LessEqual[z, 2.1e-67]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{-84} \lor \neg \left(z \leq 2.1 \cdot 10^{-67}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\end{array}
\end{array}
if z < -6.0000000000000002e-84 or 2.1000000000000002e-67 < z Initial program 51.7%
Taylor expanded in z around inf 73.7%
if -6.0000000000000002e-84 < z < 2.1000000000000002e-67Initial program 87.3%
Taylor expanded in t around 0 70.3%
+-commutative70.3%
mul-1-neg70.3%
unsub-neg70.3%
*-commutative70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in z around 0 56.9%
Taylor expanded in y around 0 68.4%
associate-*r/68.4%
neg-mul-168.4%
distribute-rgt-neg-in68.4%
Simplified68.4%
Final simplification71.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.55e+111) (not (<= y 2.5e+39))) (/ 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 <= -1.55e+111) || !(y <= 2.5e+39)) {
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 <= (-1.55d+111)) .or. (.not. (y <= 2.5d+39))) 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 <= -1.55e+111) || !(y <= 2.5e+39)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.55e+111) or not (y <= 2.5e+39): 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 <= -1.55e+111) || !(y <= 2.5e+39)) 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 <= -1.55e+111) || ~((y <= 2.5e+39))) 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, -1.55e+111], N[Not[LessEqual[y, 2.5e+39]], $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 -1.55 \cdot 10^{+111} \lor \neg \left(y \leq 2.5 \cdot 10^{+39}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -1.55e111 or 2.50000000000000008e39 < y Initial program 50.8%
Taylor expanded in y around inf 66.2%
mul-1-neg66.2%
unsub-neg66.2%
Simplified66.2%
if -1.55e111 < y < 2.50000000000000008e39Initial program 73.6%
Taylor expanded in y around 0 52.7%
Final simplification57.6%
(FPCore (x y z t a b) :precision binary64 (if (<= z -2.35e-80) (/ t b) (if (<= z 0.000245) x (/ (- a) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.35e-80) {
tmp = t / b;
} else if (z <= 0.000245) {
tmp = x;
} else {
tmp = -a / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-2.35d-80)) then
tmp = t / b
else if (z <= 0.000245d0) then
tmp = x
else
tmp = -a / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.35e-80) {
tmp = t / b;
} else if (z <= 0.000245) {
tmp = x;
} else {
tmp = -a / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2.35e-80: tmp = t / b elif z <= 0.000245: tmp = x else: tmp = -a / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.35e-80) tmp = Float64(t / b); elseif (z <= 0.000245) tmp = x; else tmp = Float64(Float64(-a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -2.35e-80) tmp = t / b; elseif (z <= 0.000245) tmp = x; else tmp = -a / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.35e-80], N[(t / b), $MachinePrecision], If[LessEqual[z, 0.000245], x, N[((-a) / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.35 \cdot 10^{-80}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 0.000245:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{-a}{b}\\
\end{array}
\end{array}
if z < -2.34999999999999986e-80Initial program 50.0%
Taylor expanded in t around inf 30.0%
*-commutative30.0%
Simplified30.0%
Taylor expanded in y around 0 34.6%
if -2.34999999999999986e-80 < z < 2.4499999999999999e-4Initial program 86.8%
Taylor expanded in z around 0 46.7%
if 2.4499999999999999e-4 < z Initial program 45.2%
Taylor expanded in t around 0 30.4%
+-commutative30.4%
mul-1-neg30.4%
unsub-neg30.4%
*-commutative30.4%
*-commutative30.4%
Simplified30.4%
Taylor expanded in y around 0 26.8%
associate-*r/26.8%
neg-mul-126.8%
Simplified26.8%
Final simplification38.1%
(FPCore (x y z t a b) :precision binary64 (if (<= z -2.05e-79) (/ t b) (if (<= z 2e-67) x (/ t b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.05e-79) {
tmp = t / b;
} else if (z <= 2e-67) {
tmp = x;
} else {
tmp = t / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-2.05d-79)) then
tmp = t / b
else if (z <= 2d-67) then
tmp = x
else
tmp = t / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.05e-79) {
tmp = t / b;
} else if (z <= 2e-67) {
tmp = x;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2.05e-79: tmp = t / b elif z <= 2e-67: tmp = x else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.05e-79) tmp = Float64(t / b); elseif (z <= 2e-67) tmp = x; else tmp = Float64(t / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -2.05e-79) tmp = t / b; elseif (z <= 2e-67) tmp = x; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.05e-79], N[(t / b), $MachinePrecision], If[LessEqual[z, 2e-67], x, N[(t / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.05 \cdot 10^{-79}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-67}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -2.04999999999999997e-79 or 1.99999999999999989e-67 < z Initial program 51.4%
Taylor expanded in t around inf 27.6%
*-commutative27.6%
Simplified27.6%
Taylor expanded in y around 0 28.8%
if -2.04999999999999997e-79 < z < 1.99999999999999989e-67Initial program 87.5%
Taylor expanded in z around 0 50.6%
Final simplification37.1%
(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 65.2%
Taylor expanded in z around 0 23.0%
Final simplification23.0%
(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 2023290
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:herbie-target
(- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))