
(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 17 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) (* z (- t a))) t_1))
(t_3 (/ (- t a) (- b y)))
(t_4
(+
(+ t_3 (* (/ y z) (/ x (- b y))))
(* y (/ (- a t) (* z (pow (- b y) 2.0)))))))
(if (<= t_2 (- INFINITY))
t_3
(if (<= t_2 -2e-205)
(/ (+ (* x y) (- (* z t) (* z a))) t_1)
(if (<= t_2 0.0)
t_4
(if (<= t_2 1e+308)
(- (+ (/ (* z t) t_1) (/ (* x y) t_1)) (/ (* z a) t_1))
(if (<= t_2 INFINITY)
(-
(/ x (- 1.0 z))
(/
(+
(* z (/ (- t a) (+ z -1.0)))
(/ (* z (* x b)) (pow (+ z -1.0) 2.0)))
y))
t_4)))))))
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) + (z * (t - a))) / t_1;
double t_3 = (t - a) / (b - y);
double t_4 = (t_3 + ((y / z) * (x / (b - y)))) + (y * ((a - t) / (z * pow((b - y), 2.0))));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_3;
} else if (t_2 <= -2e-205) {
tmp = ((x * y) + ((z * t) - (z * a))) / t_1;
} else if (t_2 <= 0.0) {
tmp = t_4;
} else if (t_2 <= 1e+308) {
tmp = (((z * t) / t_1) + ((x * y) / t_1)) - ((z * a) / t_1);
} else if (t_2 <= ((double) INFINITY)) {
tmp = (x / (1.0 - z)) - (((z * ((t - a) / (z + -1.0))) + ((z * (x * b)) / pow((z + -1.0), 2.0))) / y);
} 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 = y + (z * (b - y));
double t_2 = ((x * y) + (z * (t - a))) / t_1;
double t_3 = (t - a) / (b - y);
double t_4 = (t_3 + ((y / z) * (x / (b - y)))) + (y * ((a - t) / (z * Math.pow((b - y), 2.0))));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_3;
} else if (t_2 <= -2e-205) {
tmp = ((x * y) + ((z * t) - (z * a))) / t_1;
} else if (t_2 <= 0.0) {
tmp = t_4;
} else if (t_2 <= 1e+308) {
tmp = (((z * t) / t_1) + ((x * y) / t_1)) - ((z * a) / t_1);
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = (x / (1.0 - z)) - (((z * ((t - a) / (z + -1.0))) + ((z * (x * b)) / Math.pow((z + -1.0), 2.0))) / y);
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = ((x * y) + (z * (t - a))) / t_1 t_3 = (t - a) / (b - y) t_4 = (t_3 + ((y / z) * (x / (b - y)))) + (y * ((a - t) / (z * math.pow((b - y), 2.0)))) tmp = 0 if t_2 <= -math.inf: tmp = t_3 elif t_2 <= -2e-205: tmp = ((x * y) + ((z * t) - (z * a))) / t_1 elif t_2 <= 0.0: tmp = t_4 elif t_2 <= 1e+308: tmp = (((z * t) / t_1) + ((x * y) / t_1)) - ((z * a) / t_1) elif t_2 <= math.inf: tmp = (x / (1.0 - z)) - (((z * ((t - a) / (z + -1.0))) + ((z * (x * b)) / math.pow((z + -1.0), 2.0))) / y) else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / t_1) t_3 = Float64(Float64(t - a) / Float64(b - y)) t_4 = Float64(Float64(t_3 + Float64(Float64(y / z) * Float64(x / Float64(b - y)))) + Float64(y * Float64(Float64(a - t) / Float64(z * (Float64(b - y) ^ 2.0))))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_3; elseif (t_2 <= -2e-205) tmp = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(z * a))) / t_1); elseif (t_2 <= 0.0) tmp = t_4; elseif (t_2 <= 1e+308) tmp = Float64(Float64(Float64(Float64(z * t) / t_1) + Float64(Float64(x * y) / t_1)) - Float64(Float64(z * a) / t_1)); elseif (t_2 <= Inf) tmp = Float64(Float64(x / Float64(1.0 - z)) - Float64(Float64(Float64(z * Float64(Float64(t - a) / Float64(z + -1.0))) + Float64(Float64(z * Float64(x * b)) / (Float64(z + -1.0) ^ 2.0))) / y)); else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = ((x * y) + (z * (t - a))) / t_1; t_3 = (t - a) / (b - y); t_4 = (t_3 + ((y / z) * (x / (b - y)))) + (y * ((a - t) / (z * ((b - y) ^ 2.0)))); tmp = 0.0; if (t_2 <= -Inf) tmp = t_3; elseif (t_2 <= -2e-205) tmp = ((x * y) + ((z * t) - (z * a))) / t_1; elseif (t_2 <= 0.0) tmp = t_4; elseif (t_2 <= 1e+308) tmp = (((z * t) / t_1) + ((x * y) / t_1)) - ((z * a) / t_1); elseif (t_2 <= Inf) tmp = (x / (1.0 - z)) - (((z * ((t - a) / (z + -1.0))) + ((z * (x * b)) / ((z + -1.0) ^ 2.0))) / y); else tmp = t_4; 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[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 + N[(N[(y / z), $MachinePrecision] * N[(x / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[(a - t), $MachinePrecision] / N[(z * N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$3, If[LessEqual[t$95$2, -2e-205], N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$2, 0.0], t$95$4, If[LessEqual[t$95$2, 1e+308], N[(N[(N[(N[(z * t), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(z * a), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(z * N[(N[(t - a), $MachinePrecision] / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(x * b), $MachinePrecision]), $MachinePrecision] / N[Power[N[(z + -1.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{x \cdot y + z \cdot \left(t - a\right)}{t\_1}\\
t_3 := \frac{t - a}{b - y}\\
t_4 := \left(t\_3 + \frac{y}{z} \cdot \frac{x}{b - y}\right) + y \cdot \frac{a - t}{z \cdot {\left(b - y\right)}^{2}}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-205}:\\
\;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{t\_1}\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_2 \leq 10^{+308}:\\
\;\;\;\;\left(\frac{z \cdot t}{t\_1} + \frac{x \cdot y}{t\_1}\right) - \frac{z \cdot a}{t\_1}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\frac{x}{1 - z} - \frac{z \cdot \frac{t - a}{z + -1} + \frac{z \cdot \left(x \cdot b\right)}{{\left(z + -1\right)}^{2}}}{y}\\
\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.0Initial program 27.3%
Taylor expanded in z around inf 58.5%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2e-205Initial program 99.6%
sub-neg99.6%
distribute-lft-in99.7%
Applied egg-rr99.7%
if -2e-205 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 9.9%
Taylor expanded in z around inf 54.3%
associate--r+54.3%
+-commutative54.3%
associate--l+54.3%
*-commutative54.3%
times-frac61.3%
div-sub61.3%
associate-/l*98.4%
Simplified98.4%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1e308Initial program 99.5%
Taylor expanded in t around 0 99.6%
if 1e308 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 21.9%
Taylor expanded in x around 0 21.9%
Taylor expanded in y around -inf 65.1%
mul-1-neg65.1%
unsub-neg65.1%
associate-*r/65.1%
mul-1-neg65.1%
sub-neg65.1%
metadata-eval65.1%
Simplified67.6%
Final simplification91.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (/ (+ (* x y) (* z (- t a))) t_1))
(t_3 (/ (- t a) (- b y))))
(if (<= t_2 (- INFINITY))
t_3
(if (<= t_2 -2e-205)
(/ (+ (* x y) (- (* z t) (* z a))) t_1)
(if (<= t_2 0.0)
t_3
(if (<= t_2 1e+308)
(- (+ (/ (* z t) t_1) (/ (* x y) t_1)) (/ (* z a) t_1))
(if (<= t_2 INFINITY)
(-
(/ x (- 1.0 z))
(/
(+
(* z (/ (- t a) (+ z -1.0)))
(/ (* z (* x b)) (pow (+ z -1.0) 2.0)))
y))
t_3)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = ((x * y) + (z * (t - a))) / t_1;
double t_3 = (t - a) / (b - y);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_3;
} else if (t_2 <= -2e-205) {
tmp = ((x * y) + ((z * t) - (z * a))) / t_1;
} else if (t_2 <= 0.0) {
tmp = t_3;
} else if (t_2 <= 1e+308) {
tmp = (((z * t) / t_1) + ((x * y) / t_1)) - ((z * a) / t_1);
} else if (t_2 <= ((double) INFINITY)) {
tmp = (x / (1.0 - z)) - (((z * ((t - a) / (z + -1.0))) + ((z * (x * b)) / pow((z + -1.0), 2.0))) / y);
} 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 = y + (z * (b - y));
double t_2 = ((x * y) + (z * (t - a))) / t_1;
double t_3 = (t - a) / (b - y);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_3;
} else if (t_2 <= -2e-205) {
tmp = ((x * y) + ((z * t) - (z * a))) / t_1;
} else if (t_2 <= 0.0) {
tmp = t_3;
} else if (t_2 <= 1e+308) {
tmp = (((z * t) / t_1) + ((x * y) / t_1)) - ((z * a) / t_1);
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = (x / (1.0 - z)) - (((z * ((t - a) / (z + -1.0))) + ((z * (x * b)) / Math.pow((z + -1.0), 2.0))) / y);
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = ((x * y) + (z * (t - a))) / t_1 t_3 = (t - a) / (b - y) tmp = 0 if t_2 <= -math.inf: tmp = t_3 elif t_2 <= -2e-205: tmp = ((x * y) + ((z * t) - (z * a))) / t_1 elif t_2 <= 0.0: tmp = t_3 elif t_2 <= 1e+308: tmp = (((z * t) / t_1) + ((x * y) / t_1)) - ((z * a) / t_1) elif t_2 <= math.inf: tmp = (x / (1.0 - z)) - (((z * ((t - a) / (z + -1.0))) + ((z * (x * b)) / math.pow((z + -1.0), 2.0))) / y) else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / t_1) t_3 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_3; elseif (t_2 <= -2e-205) tmp = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(z * a))) / t_1); elseif (t_2 <= 0.0) tmp = t_3; elseif (t_2 <= 1e+308) tmp = Float64(Float64(Float64(Float64(z * t) / t_1) + Float64(Float64(x * y) / t_1)) - Float64(Float64(z * a) / t_1)); elseif (t_2 <= Inf) tmp = Float64(Float64(x / Float64(1.0 - z)) - Float64(Float64(Float64(z * Float64(Float64(t - a) / Float64(z + -1.0))) + Float64(Float64(z * Float64(x * b)) / (Float64(z + -1.0) ^ 2.0))) / y)); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = ((x * y) + (z * (t - a))) / t_1; t_3 = (t - a) / (b - y); tmp = 0.0; if (t_2 <= -Inf) tmp = t_3; elseif (t_2 <= -2e-205) tmp = ((x * y) + ((z * t) - (z * a))) / t_1; elseif (t_2 <= 0.0) tmp = t_3; elseif (t_2 <= 1e+308) tmp = (((z * t) / t_1) + ((x * y) / t_1)) - ((z * a) / t_1); elseif (t_2 <= Inf) tmp = (x / (1.0 - z)) - (((z * ((t - a) / (z + -1.0))) + ((z * (x * b)) / ((z + -1.0) ^ 2.0))) / y); else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$3, If[LessEqual[t$95$2, -2e-205], N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$2, 0.0], t$95$3, If[LessEqual[t$95$2, 1e+308], N[(N[(N[(N[(z * t), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(z * a), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(z * N[(N[(t - a), $MachinePrecision] / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(x * b), $MachinePrecision]), $MachinePrecision] / N[Power[N[(z + -1.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{x \cdot y + z \cdot \left(t - a\right)}{t\_1}\\
t_3 := \frac{t - a}{b - y}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-205}:\\
\;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{t\_1}\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 10^{+308}:\\
\;\;\;\;\left(\frac{z \cdot t}{t\_1} + \frac{x \cdot y}{t\_1}\right) - \frac{z \cdot a}{t\_1}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\frac{x}{1 - z} - \frac{z \cdot \frac{t - a}{z + -1} + \frac{z \cdot \left(x \cdot b\right)}{{\left(z + -1\right)}^{2}}}{y}\\
\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 -2e-205 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 15.1%
Taylor expanded in z around inf 78.5%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2e-205Initial program 99.6%
sub-neg99.6%
distribute-lft-in99.7%
Applied egg-rr99.7%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1e308Initial program 99.5%
Taylor expanded in t around 0 99.6%
if 1e308 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 21.9%
Taylor expanded in x around 0 21.9%
Taylor expanded in y around -inf 65.1%
mul-1-neg65.1%
unsub-neg65.1%
associate-*r/65.1%
mul-1-neg65.1%
sub-neg65.1%
metadata-eval65.1%
Simplified67.6%
Final simplification88.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ (* x y) (- (* z t) (* z a))) (+ y (* z (- b y)))))
(t_2 (/ (- t a) (- b y))))
(if (<= z -7.2e+58)
t_2
(if (<= z -4.5e-187)
t_1
(if (<= z -2.65e-278)
(+ x (* t (/ z y)))
(if (<= z 140000000000.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - y)));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -7.2e+58) {
tmp = t_2;
} else if (z <= -4.5e-187) {
tmp = t_1;
} else if (z <= -2.65e-278) {
tmp = x + (t * (z / y));
} else if (z <= 140000000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - y)))
t_2 = (t - a) / (b - y)
if (z <= (-7.2d+58)) then
tmp = t_2
else if (z <= (-4.5d-187)) then
tmp = t_1
else if (z <= (-2.65d-278)) then
tmp = x + (t * (z / y))
else if (z <= 140000000000.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - y)));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -7.2e+58) {
tmp = t_2;
} else if (z <= -4.5e-187) {
tmp = t_1;
} else if (z <= -2.65e-278) {
tmp = x + (t * (z / y));
} else if (z <= 140000000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - y))) t_2 = (t - a) / (b - y) tmp = 0 if z <= -7.2e+58: tmp = t_2 elif z <= -4.5e-187: tmp = t_1 elif z <= -2.65e-278: tmp = x + (t * (z / y)) elif z <= 140000000000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(z * a))) / Float64(y + Float64(z * Float64(b - y)))) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -7.2e+58) tmp = t_2; elseif (z <= -4.5e-187) tmp = t_1; elseif (z <= -2.65e-278) tmp = Float64(x + Float64(t * Float64(z / y))); elseif (z <= 140000000000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - y))); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -7.2e+58) tmp = t_2; elseif (z <= -4.5e-187) tmp = t_1; elseif (z <= -2.65e-278) tmp = x + (t * (z / y)); elseif (z <= 140000000000.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.2e+58], t$95$2, If[LessEqual[z, -4.5e-187], t$95$1, If[LessEqual[z, -2.65e-278], N[(x + N[(t * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 140000000000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{y + z \cdot \left(b - y\right)}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -7.2 \cdot 10^{+58}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{-187}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.65 \cdot 10^{-278}:\\
\;\;\;\;x + t \cdot \frac{z}{y}\\
\mathbf{elif}\;z \leq 140000000000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -7.19999999999999993e58 or 1.4e11 < z Initial program 34.3%
Taylor expanded in z around inf 88.2%
if -7.19999999999999993e58 < z < -4.4999999999999998e-187 or -2.65e-278 < z < 1.4e11Initial program 86.8%
sub-neg86.8%
distribute-lft-in86.8%
Applied egg-rr86.8%
if -4.4999999999999998e-187 < z < -2.65e-278Initial program 54.7%
Taylor expanded in z around 0 29.8%
*-commutative29.8%
Simplified29.8%
Taylor expanded in t around inf 81.9%
associate-/l*82.1%
Simplified82.1%
Final simplification87.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
(t_2 (/ (- t a) (- b y))))
(if (<= z -1.22e+59)
t_2
(if (<= z -4.5e-187)
t_1
(if (<= z -1.4e-277)
(+ x (* t (/ z y)))
(if (<= z 140000000000.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -1.22e+59) {
tmp = t_2;
} else if (z <= -4.5e-187) {
tmp = t_1;
} else if (z <= -1.4e-277) {
tmp = x + (t * (z / y));
} else if (z <= 140000000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
t_2 = (t - a) / (b - y)
if (z <= (-1.22d+59)) then
tmp = t_2
else if (z <= (-4.5d-187)) then
tmp = t_1
else if (z <= (-1.4d-277)) then
tmp = x + (t * (z / y))
else if (z <= 140000000000.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -1.22e+59) {
tmp = t_2;
} else if (z <= -4.5e-187) {
tmp = t_1;
} else if (z <= -1.4e-277) {
tmp = x + (t * (z / y));
} else if (z <= 140000000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y))) t_2 = (t - a) / (b - y) tmp = 0 if z <= -1.22e+59: tmp = t_2 elif z <= -4.5e-187: tmp = t_1 elif z <= -1.4e-277: tmp = x + (t * (z / y)) elif z <= 140000000000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.22e+59) tmp = t_2; elseif (z <= -4.5e-187) tmp = t_1; elseif (z <= -1.4e-277) tmp = Float64(x + Float64(t * Float64(z / y))); elseif (z <= 140000000000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.22e+59) tmp = t_2; elseif (z <= -4.5e-187) tmp = t_1; elseif (z <= -1.4e-277) tmp = x + (t * (z / y)); elseif (z <= 140000000000.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.22e+59], t$95$2, If[LessEqual[z, -4.5e-187], t$95$1, If[LessEqual[z, -1.4e-277], N[(x + N[(t * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 140000000000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.22 \cdot 10^{+59}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{-187}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.4 \cdot 10^{-277}:\\
\;\;\;\;x + t \cdot \frac{z}{y}\\
\mathbf{elif}\;z \leq 140000000000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.22e59 or 1.4e11 < z Initial program 34.3%
Taylor expanded in z around inf 88.2%
if -1.22e59 < z < -4.4999999999999998e-187 or -1.39999999999999988e-277 < z < 1.4e11Initial program 86.8%
if -4.4999999999999998e-187 < z < -1.39999999999999988e-277Initial program 54.7%
Taylor expanded in z around 0 29.8%
*-commutative29.8%
Simplified29.8%
Taylor expanded in t around inf 81.9%
associate-/l*82.1%
Simplified82.1%
Final simplification87.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* z t) y))) (t_2 (/ (- t a) (- b y))))
(if (<= z -9.5e-28)
t_2
(if (<= z 7.5e-232)
t_1
(if (<= z 9e-146) (- x (* z (/ a y))) (if (<= z 1.16e-36) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((z * t) / y);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -9.5e-28) {
tmp = t_2;
} else if (z <= 7.5e-232) {
tmp = t_1;
} else if (z <= 9e-146) {
tmp = x - (z * (a / y));
} else if (z <= 1.16e-36) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((z * t) / y)
t_2 = (t - a) / (b - y)
if (z <= (-9.5d-28)) then
tmp = t_2
else if (z <= 7.5d-232) then
tmp = t_1
else if (z <= 9d-146) then
tmp = x - (z * (a / y))
else if (z <= 1.16d-36) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((z * t) / y);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -9.5e-28) {
tmp = t_2;
} else if (z <= 7.5e-232) {
tmp = t_1;
} else if (z <= 9e-146) {
tmp = x - (z * (a / y));
} else if (z <= 1.16e-36) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((z * t) / y) t_2 = (t - a) / (b - y) tmp = 0 if z <= -9.5e-28: tmp = t_2 elif z <= 7.5e-232: tmp = t_1 elif z <= 9e-146: tmp = x - (z * (a / y)) elif z <= 1.16e-36: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(z * t) / y)) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -9.5e-28) tmp = t_2; elseif (z <= 7.5e-232) tmp = t_1; elseif (z <= 9e-146) tmp = Float64(x - Float64(z * Float64(a / y))); elseif (z <= 1.16e-36) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + ((z * t) / y); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -9.5e-28) tmp = t_2; elseif (z <= 7.5e-232) tmp = t_1; elseif (z <= 9e-146) tmp = x - (z * (a / y)); elseif (z <= 1.16e-36) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(z * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.5e-28], t$95$2, If[LessEqual[z, 7.5e-232], t$95$1, If[LessEqual[z, 9e-146], N[(x - N[(z * N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.16e-36], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z \cdot t}{y}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -9.5 \cdot 10^{-28}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-232}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-146}:\\
\;\;\;\;x - z \cdot \frac{a}{y}\\
\mathbf{elif}\;z \leq 1.16 \cdot 10^{-36}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -9.50000000000000001e-28 or 1.16000000000000002e-36 < z Initial program 43.6%
Taylor expanded in z around inf 81.3%
if -9.50000000000000001e-28 < z < 7.5000000000000006e-232 or 9.0000000000000001e-146 < z < 1.16000000000000002e-36Initial program 79.5%
Taylor expanded in z around 0 46.0%
*-commutative46.0%
Simplified46.0%
Taylor expanded in t around inf 63.9%
if 7.5000000000000006e-232 < z < 9.0000000000000001e-146Initial program 83.0%
Taylor expanded in z around 0 47.7%
*-commutative47.7%
Simplified47.7%
Taylor expanded in a around inf 60.8%
associate-*r/60.8%
neg-mul-160.8%
Simplified60.8%
Final simplification72.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) b)) (t_2 (/ x (- 1.0 z))))
(if (<= y -2.8e-22)
t_2
(if (<= y 1.25e-17)
t_1
(if (<= y 8.2e+23) (+ x (* t (/ z y))) (if (<= y 2.95e+68) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / b;
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -2.8e-22) {
tmp = t_2;
} else if (y <= 1.25e-17) {
tmp = t_1;
} else if (y <= 8.2e+23) {
tmp = x + (t * (z / y));
} else if (y <= 2.95e+68) {
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 = (t - a) / b
t_2 = x / (1.0d0 - z)
if (y <= (-2.8d-22)) then
tmp = t_2
else if (y <= 1.25d-17) then
tmp = t_1
else if (y <= 8.2d+23) then
tmp = x + (t * (z / y))
else if (y <= 2.95d+68) 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 = (t - a) / b;
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -2.8e-22) {
tmp = t_2;
} else if (y <= 1.25e-17) {
tmp = t_1;
} else if (y <= 8.2e+23) {
tmp = x + (t * (z / y));
} else if (y <= 2.95e+68) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / b t_2 = x / (1.0 - z) tmp = 0 if y <= -2.8e-22: tmp = t_2 elif y <= 1.25e-17: tmp = t_1 elif y <= 8.2e+23: tmp = x + (t * (z / y)) elif y <= 2.95e+68: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / b) t_2 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -2.8e-22) tmp = t_2; elseif (y <= 1.25e-17) tmp = t_1; elseif (y <= 8.2e+23) tmp = Float64(x + Float64(t * Float64(z / y))); elseif (y <= 2.95e+68) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / b; t_2 = x / (1.0 - z); tmp = 0.0; if (y <= -2.8e-22) tmp = t_2; elseif (y <= 1.25e-17) tmp = t_1; elseif (y <= 8.2e+23) tmp = x + (t * (z / y)); elseif (y <= 2.95e+68) 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[(t - a), $MachinePrecision] / b), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.8e-22], t$95$2, If[LessEqual[y, 1.25e-17], t$95$1, If[LessEqual[y, 8.2e+23], N[(x + N[(t * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.95e+68], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b}\\
t_2 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -2.8 \cdot 10^{-22}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{+23}:\\
\;\;\;\;x + t \cdot \frac{z}{y}\\
\mathbf{elif}\;y \leq 2.95 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -2.79999999999999995e-22 or 2.94999999999999993e68 < y Initial program 46.1%
Taylor expanded in y around inf 54.2%
mul-1-neg54.2%
unsub-neg54.2%
Simplified54.2%
if -2.79999999999999995e-22 < y < 1.25e-17 or 8.19999999999999992e23 < y < 2.94999999999999993e68Initial program 74.1%
Taylor expanded in y around 0 60.4%
if 1.25e-17 < y < 8.19999999999999992e23Initial program 98.8%
Taylor expanded in z around 0 63.1%
*-commutative63.1%
Simplified63.1%
Taylor expanded in t around inf 61.3%
associate-/l*61.3%
Simplified61.3%
Final simplification57.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) b)) (t_2 (/ x (- 1.0 z))))
(if (<= y -3.5e-22)
t_2
(if (<= y 3.3e-13)
t_1
(if (<= y 9.8e+23) (+ x (* z (/ t y))) (if (<= y 3e+68) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / b;
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -3.5e-22) {
tmp = t_2;
} else if (y <= 3.3e-13) {
tmp = t_1;
} else if (y <= 9.8e+23) {
tmp = x + (z * (t / y));
} else if (y <= 3e+68) {
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 = (t - a) / b
t_2 = x / (1.0d0 - z)
if (y <= (-3.5d-22)) then
tmp = t_2
else if (y <= 3.3d-13) then
tmp = t_1
else if (y <= 9.8d+23) then
tmp = x + (z * (t / y))
else if (y <= 3d+68) 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 = (t - a) / b;
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -3.5e-22) {
tmp = t_2;
} else if (y <= 3.3e-13) {
tmp = t_1;
} else if (y <= 9.8e+23) {
tmp = x + (z * (t / y));
} else if (y <= 3e+68) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / b t_2 = x / (1.0 - z) tmp = 0 if y <= -3.5e-22: tmp = t_2 elif y <= 3.3e-13: tmp = t_1 elif y <= 9.8e+23: tmp = x + (z * (t / y)) elif y <= 3e+68: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / b) t_2 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -3.5e-22) tmp = t_2; elseif (y <= 3.3e-13) tmp = t_1; elseif (y <= 9.8e+23) tmp = Float64(x + Float64(z * Float64(t / y))); elseif (y <= 3e+68) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / b; t_2 = x / (1.0 - z); tmp = 0.0; if (y <= -3.5e-22) tmp = t_2; elseif (y <= 3.3e-13) tmp = t_1; elseif (y <= 9.8e+23) tmp = x + (z * (t / y)); elseif (y <= 3e+68) 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[(t - a), $MachinePrecision] / b), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.5e-22], t$95$2, If[LessEqual[y, 3.3e-13], t$95$1, If[LessEqual[y, 9.8e+23], N[(x + N[(z * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3e+68], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b}\\
t_2 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -3.5 \cdot 10^{-22}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{-13}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 9.8 \cdot 10^{+23}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -3.50000000000000005e-22 or 3.0000000000000002e68 < y Initial program 46.1%
Taylor expanded in y around inf 54.2%
mul-1-neg54.2%
unsub-neg54.2%
Simplified54.2%
if -3.50000000000000005e-22 < y < 3.3000000000000001e-13 or 9.8000000000000006e23 < y < 3.0000000000000002e68Initial program 74.1%
Taylor expanded in y around 0 60.4%
if 3.3000000000000001e-13 < y < 9.8000000000000006e23Initial program 98.8%
Taylor expanded in z around 0 63.1%
*-commutative63.1%
Simplified63.1%
Taylor expanded in t around inf 61.3%
Final simplification57.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) b)) (t_2 (/ x (- 1.0 z))))
(if (<= y -3.5e-22)
t_2
(if (<= y 7.6e-23)
t_1
(if (<= y 2.4e+23) (/ (* z (- t a)) y) (if (<= y 4.05e+68) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / b;
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -3.5e-22) {
tmp = t_2;
} else if (y <= 7.6e-23) {
tmp = t_1;
} else if (y <= 2.4e+23) {
tmp = (z * (t - a)) / y;
} else if (y <= 4.05e+68) {
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 = (t - a) / b
t_2 = x / (1.0d0 - z)
if (y <= (-3.5d-22)) then
tmp = t_2
else if (y <= 7.6d-23) then
tmp = t_1
else if (y <= 2.4d+23) then
tmp = (z * (t - a)) / y
else if (y <= 4.05d+68) 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 = (t - a) / b;
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -3.5e-22) {
tmp = t_2;
} else if (y <= 7.6e-23) {
tmp = t_1;
} else if (y <= 2.4e+23) {
tmp = (z * (t - a)) / y;
} else if (y <= 4.05e+68) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / b t_2 = x / (1.0 - z) tmp = 0 if y <= -3.5e-22: tmp = t_2 elif y <= 7.6e-23: tmp = t_1 elif y <= 2.4e+23: tmp = (z * (t - a)) / y elif y <= 4.05e+68: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / b) t_2 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -3.5e-22) tmp = t_2; elseif (y <= 7.6e-23) tmp = t_1; elseif (y <= 2.4e+23) tmp = Float64(Float64(z * Float64(t - a)) / y); elseif (y <= 4.05e+68) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / b; t_2 = x / (1.0 - z); tmp = 0.0; if (y <= -3.5e-22) tmp = t_2; elseif (y <= 7.6e-23) tmp = t_1; elseif (y <= 2.4e+23) tmp = (z * (t - a)) / y; elseif (y <= 4.05e+68) 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[(t - a), $MachinePrecision] / b), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.5e-22], t$95$2, If[LessEqual[y, 7.6e-23], t$95$1, If[LessEqual[y, 2.4e+23], N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 4.05e+68], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b}\\
t_2 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -3.5 \cdot 10^{-22}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 7.6 \cdot 10^{-23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+23}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right)}{y}\\
\mathbf{elif}\;y \leq 4.05 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -3.50000000000000005e-22 or 4.0500000000000001e68 < y Initial program 46.1%
Taylor expanded in y around inf 54.2%
mul-1-neg54.2%
unsub-neg54.2%
Simplified54.2%
if -3.50000000000000005e-22 < y < 7.60000000000000023e-23 or 2.4e23 < y < 4.0500000000000001e68Initial program 73.9%
Taylor expanded in y around 0 60.8%
if 7.60000000000000023e-23 < y < 2.4e23Initial program 98.9%
Taylor expanded in z around 0 78.1%
Taylor expanded in x around 0 63.6%
Final simplification57.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -2.4e-29)
t_1
(if (<= z -4.8e-246)
(+ x (/ (* z t) y))
(if (<= z 1.75e-55) (- x (/ (* z a) y)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2.4e-29) {
tmp = t_1;
} else if (z <= -4.8e-246) {
tmp = x + ((z * t) / y);
} else if (z <= 1.75e-55) {
tmp = x - ((z * a) / y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-2.4d-29)) then
tmp = t_1
else if (z <= (-4.8d-246)) then
tmp = x + ((z * t) / y)
else if (z <= 1.75d-55) then
tmp = x - ((z * a) / y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2.4e-29) {
tmp = t_1;
} else if (z <= -4.8e-246) {
tmp = x + ((z * t) / y);
} else if (z <= 1.75e-55) {
tmp = x - ((z * a) / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -2.4e-29: tmp = t_1 elif z <= -4.8e-246: tmp = x + ((z * t) / y) elif z <= 1.75e-55: tmp = x - ((z * a) / y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2.4e-29) tmp = t_1; elseif (z <= -4.8e-246) tmp = Float64(x + Float64(Float64(z * t) / y)); elseif (z <= 1.75e-55) tmp = Float64(x - Float64(Float64(z * a) / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -2.4e-29) tmp = t_1; elseif (z <= -4.8e-246) tmp = x + ((z * t) / y); elseif (z <= 1.75e-55) tmp = x - ((z * a) / y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.4e-29], t$95$1, If[LessEqual[z, -4.8e-246], N[(x + N[(N[(z * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.75e-55], N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.4 \cdot 10^{-29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-246}:\\
\;\;\;\;x + \frac{z \cdot t}{y}\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{-55}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.39999999999999992e-29 or 1.75000000000000013e-55 < z Initial program 45.2%
Taylor expanded in z around inf 79.7%
if -2.39999999999999992e-29 < z < -4.7999999999999996e-246Initial program 82.0%
Taylor expanded in z around 0 52.5%
*-commutative52.5%
Simplified52.5%
Taylor expanded in t around inf 63.9%
if -4.7999999999999996e-246 < z < 1.75000000000000013e-55Initial program 77.8%
Taylor expanded in z around 0 40.7%
*-commutative40.7%
Simplified40.7%
Taylor expanded in a around inf 64.7%
associate-*r/64.7%
associate-*r*64.7%
neg-mul-164.7%
*-commutative64.7%
Simplified64.7%
Final simplification72.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -1.16e-28)
t_1
(if (<= z -1.65e-192)
(/ (+ (* x y) (* z (- t a))) y)
(if (<= z 1.25e-51) (- x (/ (* z a) y)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.16e-28) {
tmp = t_1;
} else if (z <= -1.65e-192) {
tmp = ((x * y) + (z * (t - a))) / y;
} else if (z <= 1.25e-51) {
tmp = x - ((z * a) / y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-1.16d-28)) then
tmp = t_1
else if (z <= (-1.65d-192)) then
tmp = ((x * y) + (z * (t - a))) / y
else if (z <= 1.25d-51) then
tmp = x - ((z * a) / y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.16e-28) {
tmp = t_1;
} else if (z <= -1.65e-192) {
tmp = ((x * y) + (z * (t - a))) / y;
} else if (z <= 1.25e-51) {
tmp = x - ((z * a) / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -1.16e-28: tmp = t_1 elif z <= -1.65e-192: tmp = ((x * y) + (z * (t - a))) / y elif z <= 1.25e-51: tmp = x - ((z * a) / y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.16e-28) tmp = t_1; elseif (z <= -1.65e-192) tmp = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / y); elseif (z <= 1.25e-51) tmp = Float64(x - Float64(Float64(z * a) / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.16e-28) tmp = t_1; elseif (z <= -1.65e-192) tmp = ((x * y) + (z * (t - a))) / y; elseif (z <= 1.25e-51) tmp = x - ((z * a) / y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.16e-28], t$95$1, If[LessEqual[z, -1.65e-192], N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1.25e-51], N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.16 \cdot 10^{-28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.65 \cdot 10^{-192}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y}\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-51}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.1600000000000001e-28 or 1.25000000000000001e-51 < z Initial program 45.2%
Taylor expanded in z around inf 79.7%
if -1.1600000000000001e-28 < z < -1.64999999999999995e-192Initial program 92.1%
Taylor expanded in z around 0 70.7%
if -1.64999999999999995e-192 < z < 1.25000000000000001e-51Initial program 73.9%
Taylor expanded in z around 0 39.1%
*-commutative39.1%
Simplified39.1%
Taylor expanded in a around inf 64.7%
associate-*r/64.7%
associate-*r*64.7%
neg-mul-164.7%
*-commutative64.7%
Simplified64.7%
Final simplification73.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4.5e-29) (not (<= z 1.45e-38))) (/ (- t a) (- b y)) (+ x (/ (* z t) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.5e-29) || !(z <= 1.45e-38)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * t) / 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 <= (-4.5d-29)) .or. (.not. (z <= 1.45d-38))) then
tmp = (t - a) / (b - y)
else
tmp = x + ((z * t) / 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 <= -4.5e-29) || !(z <= 1.45e-38)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * t) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4.5e-29) or not (z <= 1.45e-38): tmp = (t - a) / (b - y) else: tmp = x + ((z * t) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.5e-29) || !(z <= 1.45e-38)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(Float64(z * t) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -4.5e-29) || ~((z <= 1.45e-38))) tmp = (t - a) / (b - y); else tmp = x + ((z * t) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.5e-29], N[Not[LessEqual[z, 1.45e-38]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{-29} \lor \neg \left(z \leq 1.45 \cdot 10^{-38}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot t}{y}\\
\end{array}
\end{array}
if z < -4.4999999999999998e-29 or 1.44999999999999997e-38 < z Initial program 43.6%
Taylor expanded in z around inf 81.3%
if -4.4999999999999998e-29 < z < 1.44999999999999997e-38Initial program 80.1%
Taylor expanded in z around 0 46.3%
*-commutative46.3%
Simplified46.3%
Taylor expanded in t around inf 59.5%
Final simplification70.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= x -2.45e-157) (not (<= x 2.3e-133))) (/ x (- 1.0 z)) (* t (/ z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -2.45e-157) || !(x <= 2.3e-133)) {
tmp = x / (1.0 - z);
} else {
tmp = t * (z / 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 ((x <= (-2.45d-157)) .or. (.not. (x <= 2.3d-133))) then
tmp = x / (1.0d0 - z)
else
tmp = t * (z / 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 ((x <= -2.45e-157) || !(x <= 2.3e-133)) {
tmp = x / (1.0 - z);
} else {
tmp = t * (z / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (x <= -2.45e-157) or not (x <= 2.3e-133): tmp = x / (1.0 - z) else: tmp = t * (z / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((x <= -2.45e-157) || !(x <= 2.3e-133)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(t * Float64(z / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((x <= -2.45e-157) || ~((x <= 2.3e-133))) tmp = x / (1.0 - z); else tmp = t * (z / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -2.45e-157], N[Not[LessEqual[x, 2.3e-133]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(t * N[(z / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.45 \cdot 10^{-157} \lor \neg \left(x \leq 2.3 \cdot 10^{-133}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{z}{y}\\
\end{array}
\end{array}
if x < -2.4499999999999999e-157 or 2.3e-133 < x Initial program 61.3%
Taylor expanded in y around inf 38.2%
mul-1-neg38.2%
unsub-neg38.2%
Simplified38.2%
if -2.4499999999999999e-157 < x < 2.3e-133Initial program 61.7%
Taylor expanded in z around 0 38.0%
*-commutative38.0%
Simplified38.0%
Taylor expanded in t around inf 22.1%
Taylor expanded in x around 0 22.1%
associate-*r/22.0%
Simplified22.0%
Final simplification34.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= x -5.6e-160) (not (<= x 2.2e-131))) (/ x (- 1.0 z)) (/ (* z t) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -5.6e-160) || !(x <= 2.2e-131)) {
tmp = x / (1.0 - z);
} else {
tmp = (z * t) / 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 ((x <= (-5.6d-160)) .or. (.not. (x <= 2.2d-131))) then
tmp = x / (1.0d0 - z)
else
tmp = (z * t) / 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 ((x <= -5.6e-160) || !(x <= 2.2e-131)) {
tmp = x / (1.0 - z);
} else {
tmp = (z * t) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (x <= -5.6e-160) or not (x <= 2.2e-131): tmp = x / (1.0 - z) else: tmp = (z * t) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((x <= -5.6e-160) || !(x <= 2.2e-131)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(Float64(z * t) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((x <= -5.6e-160) || ~((x <= 2.2e-131))) tmp = x / (1.0 - z); else tmp = (z * t) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -5.6e-160], N[Not[LessEqual[x, 2.2e-131]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(N[(z * t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.6 \cdot 10^{-160} \lor \neg \left(x \leq 2.2 \cdot 10^{-131}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot t}{y}\\
\end{array}
\end{array}
if x < -5.60000000000000032e-160 or 2.2e-131 < x Initial program 61.3%
Taylor expanded in y around inf 38.2%
mul-1-neg38.2%
unsub-neg38.2%
Simplified38.2%
if -5.60000000000000032e-160 < x < 2.2e-131Initial program 61.7%
Taylor expanded in z around 0 40.0%
Taylor expanded in t around inf 22.1%
*-commutative22.1%
Simplified22.1%
Final simplification34.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.5e-22) (not (<= y 3.8e+68))) (/ 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.5e-22) || !(y <= 3.8e+68)) {
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.5d-22)) .or. (.not. (y <= 3.8d+68))) 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.5e-22) || !(y <= 3.8e+68)) {
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.5e-22) or not (y <= 3.8e+68): 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.5e-22) || !(y <= 3.8e+68)) 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.5e-22) || ~((y <= 3.8e+68))) 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.5e-22], N[Not[LessEqual[y, 3.8e+68]], $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.5 \cdot 10^{-22} \lor \neg \left(y \leq 3.8 \cdot 10^{+68}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -3.50000000000000005e-22 or 3.8000000000000001e68 < y Initial program 46.1%
Taylor expanded in y around inf 54.2%
mul-1-neg54.2%
unsub-neg54.2%
Simplified54.2%
if -3.50000000000000005e-22 < y < 3.8000000000000001e68Initial program 75.4%
Taylor expanded in y around 0 57.4%
Final simplification55.9%
(FPCore (x y z t a b) :precision binary64 (if (<= x -3.5e-70) x (if (<= x 1.55e-132) (* t (/ z y)) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -3.5e-70) {
tmp = x;
} else if (x <= 1.55e-132) {
tmp = t * (z / 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 (x <= (-3.5d-70)) then
tmp = x
else if (x <= 1.55d-132) then
tmp = t * (z / 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 (x <= -3.5e-70) {
tmp = x;
} else if (x <= 1.55e-132) {
tmp = t * (z / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -3.5e-70: tmp = x elif x <= 1.55e-132: tmp = t * (z / y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -3.5e-70) tmp = x; elseif (x <= 1.55e-132) tmp = Float64(t * Float64(z / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -3.5e-70) tmp = x; elseif (x <= 1.55e-132) tmp = t * (z / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -3.5e-70], x, If[LessEqual[x, 1.55e-132], N[(t * N[(z / y), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.5 \cdot 10^{-70}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.55 \cdot 10^{-132}:\\
\;\;\;\;t \cdot \frac{z}{y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -3.49999999999999974e-70 or 1.55000000000000004e-132 < x Initial program 59.9%
Taylor expanded in z around 0 32.9%
if -3.49999999999999974e-70 < x < 1.55000000000000004e-132Initial program 64.5%
Taylor expanded in z around 0 35.2%
*-commutative35.2%
Simplified35.2%
Taylor expanded in t around inf 23.3%
Taylor expanded in x around 0 20.2%
associate-*r/19.0%
Simplified19.0%
Final simplification28.3%
(FPCore (x y z t a b) :precision binary64 (if (<= x -1.45e-70) (+ x (* x z)) (if (<= x 8.2e-131) (* t (/ z y)) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.45e-70) {
tmp = x + (x * z);
} else if (x <= 8.2e-131) {
tmp = t * (z / 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 (x <= (-1.45d-70)) then
tmp = x + (x * z)
else if (x <= 8.2d-131) then
tmp = t * (z / 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 (x <= -1.45e-70) {
tmp = x + (x * z);
} else if (x <= 8.2e-131) {
tmp = t * (z / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -1.45e-70: tmp = x + (x * z) elif x <= 8.2e-131: tmp = t * (z / y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1.45e-70) tmp = Float64(x + Float64(x * z)); elseif (x <= 8.2e-131) tmp = Float64(t * Float64(z / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -1.45e-70) tmp = x + (x * z); elseif (x <= 8.2e-131) tmp = t * (z / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.45e-70], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.2e-131], N[(t * N[(z / y), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{-70}:\\
\;\;\;\;x + x \cdot z\\
\mathbf{elif}\;x \leq 8.2 \cdot 10^{-131}:\\
\;\;\;\;t \cdot \frac{z}{y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.44999999999999986e-70Initial program 58.8%
Taylor expanded in z around 0 21.3%
*-commutative21.3%
Simplified21.3%
Taylor expanded in y around inf 29.6%
*-commutative29.6%
Simplified29.6%
if -1.44999999999999986e-70 < x < 8.2000000000000004e-131Initial program 64.5%
Taylor expanded in z around 0 35.2%
*-commutative35.2%
Simplified35.2%
Taylor expanded in t around inf 23.3%
Taylor expanded in x around 0 20.2%
associate-*r/19.0%
Simplified19.0%
if 8.2000000000000004e-131 < x Initial program 60.8%
Taylor expanded in z around 0 36.2%
Final simplification28.4%
(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 61.4%
Taylor expanded in z around 0 24.5%
Final simplification24.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 2024066
(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)))))