
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -2.2e+27) (not (<= z 1.5e+28)))
(+
(+ (/ (* x (/ y z)) (- b y)) (/ (- t a) (- b y)))
(* y (/ (- a t) (* z (pow (- b y) 2.0)))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.2e+27) || !(z <= 1.5e+28)) {
tmp = (((x * (y / z)) / (b - y)) + ((t - a) / (b - y))) + (y * ((a - t) / (z * pow((b - y), 2.0))));
} else {
tmp = ((x * y) + (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 <= (-2.2d+27)) .or. (.not. (z <= 1.5d+28))) then
tmp = (((x * (y / z)) / (b - y)) + ((t - a) / (b - y))) + (y * ((a - t) / (z * ((b - y) ** 2.0d0))))
else
tmp = ((x * y) + (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 <= -2.2e+27) || !(z <= 1.5e+28)) {
tmp = (((x * (y / z)) / (b - y)) + ((t - a) / (b - y))) + (y * ((a - t) / (z * Math.pow((b - y), 2.0))));
} else {
tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.2e+27) or not (z <= 1.5e+28): tmp = (((x * (y / z)) / (b - y)) + ((t - a) / (b - y))) + (y * ((a - t) / (z * math.pow((b - y), 2.0)))) else: tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.2e+27) || !(z <= 1.5e+28)) tmp = Float64(Float64(Float64(Float64(x * Float64(y / z)) / Float64(b - y)) + Float64(Float64(t - a) / Float64(b - y))) + Float64(y * Float64(Float64(a - t) / Float64(z * (Float64(b - y) ^ 2.0))))); else tmp = Float64(Float64(Float64(x * y) + 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 <= -2.2e+27) || ~((z <= 1.5e+28))) tmp = (((x * (y / z)) / (b - y)) + ((t - a) / (b - y))) + (y * ((a - t) / (z * ((b - y) ^ 2.0)))); else tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.2e+27], N[Not[LessEqual[z, 1.5e+28]], $MachinePrecision]], N[(N[(N[(N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $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], 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}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+27} \lor \neg \left(z \leq 1.5 \cdot 10^{+28}\right):\\
\;\;\;\;\left(\frac{x \cdot \frac{y}{z}}{b - y} + \frac{t - a}{b - y}\right) + y \cdot \frac{a - t}{z \cdot {\left(b - y\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -2.1999999999999999e27 or 1.5e28 < z Initial program 44.6%
Taylor expanded in z around inf 64.4%
associate--r+64.4%
+-commutative64.4%
associate--l+64.4%
associate-/r*68.9%
associate-/l*71.2%
div-sub72.0%
associate-/l*91.5%
Simplified91.5%
if -2.1999999999999999e27 < z < 1.5e28Initial program 92.3%
Final simplification91.9%
(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_2) t_1)))
(if (<= t_3 (- INFINITY))
(* x (+ (/ y t_1) (/ t_2 (* x t_1))))
(if (<= t_3 -4e-276)
t_3
(if (or (<= t_3 0.0) (not (<= t_3 1e+298)))
(/ (- t a) (- b y))
(+ (/ (* x y) t_1) (/ t_2 t_1)))))))
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_2) / t_1;
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = x * ((y / t_1) + (t_2 / (x * t_1)));
} else if (t_3 <= -4e-276) {
tmp = t_3;
} else if ((t_3 <= 0.0) || !(t_3 <= 1e+298)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) / t_1) + (t_2 / t_1);
}
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_2) / t_1;
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = x * ((y / t_1) + (t_2 / (x * t_1)));
} else if (t_3 <= -4e-276) {
tmp = t_3;
} else if ((t_3 <= 0.0) || !(t_3 <= 1e+298)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) / t_1) + (t_2 / t_1);
}
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_2) / t_1 tmp = 0 if t_3 <= -math.inf: tmp = x * ((y / t_1) + (t_2 / (x * t_1))) elif t_3 <= -4e-276: tmp = t_3 elif (t_3 <= 0.0) or not (t_3 <= 1e+298): tmp = (t - a) / (b - y) else: tmp = ((x * y) / t_1) + (t_2 / t_1) 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_2) / t_1) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(x * Float64(Float64(y / t_1) + Float64(t_2 / Float64(x * t_1)))); elseif (t_3 <= -4e-276) tmp = t_3; elseif ((t_3 <= 0.0) || !(t_3 <= 1e+298)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(x * y) / t_1) + Float64(t_2 / t_1)); 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_2) / t_1; tmp = 0.0; if (t_3 <= -Inf) tmp = x * ((y / t_1) + (t_2 / (x * t_1))); elseif (t_3 <= -4e-276) tmp = t_3; elseif ((t_3 <= 0.0) || ~((t_3 <= 1e+298))) tmp = (t - a) / (b - y); else tmp = ((x * y) / t_1) + (t_2 / t_1); 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$2), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(t$95$2 / N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, -4e-276], t$95$3, If[Or[LessEqual[t$95$3, 0.0], N[Not[LessEqual[t$95$3, 1e+298]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]
\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\_2}{t\_1}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_1} + \frac{t\_2}{x \cdot t\_1}\right)\\
\mathbf{elif}\;t\_3 \leq -4 \cdot 10^{-276}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq 0 \lor \neg \left(t\_3 \leq 10^{+298}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{t\_1} + \frac{t\_2}{t\_1}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0Initial program 27.5%
Taylor expanded in x around inf 78.0%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4e-276Initial program 99.4%
if -4e-276 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or 9.9999999999999996e297 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 16.9%
Taylor expanded in z around inf 79.6%
if 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 9.9999999999999996e297Initial program 99.6%
Taylor expanded in x around 0 99.6%
Final simplification91.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (* y (- 1.0 z)))
(t_3 (* z (- t a)))
(t_4 (/ (+ (* x y) t_3) t_1)))
(if (<= t_4 (- INFINITY))
(+ (* x (/ y t_2)) (* z (/ (- t a) t_2)))
(if (<= t_4 -4e-276)
t_4
(if (or (<= t_4 0.0) (not (<= t_4 1e+298)))
(/ (- t a) (- b y))
(+ (/ (* x y) t_1) (/ t_3 t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = y * (1.0 - z);
double t_3 = z * (t - a);
double t_4 = ((x * y) + t_3) / t_1;
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = (x * (y / t_2)) + (z * ((t - a) / t_2));
} else if (t_4 <= -4e-276) {
tmp = t_4;
} else if ((t_4 <= 0.0) || !(t_4 <= 1e+298)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) / t_1) + (t_3 / t_1);
}
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 = y * (1.0 - z);
double t_3 = z * (t - a);
double t_4 = ((x * y) + t_3) / t_1;
double tmp;
if (t_4 <= -Double.POSITIVE_INFINITY) {
tmp = (x * (y / t_2)) + (z * ((t - a) / t_2));
} else if (t_4 <= -4e-276) {
tmp = t_4;
} else if ((t_4 <= 0.0) || !(t_4 <= 1e+298)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) / t_1) + (t_3 / t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = y * (1.0 - z) t_3 = z * (t - a) t_4 = ((x * y) + t_3) / t_1 tmp = 0 if t_4 <= -math.inf: tmp = (x * (y / t_2)) + (z * ((t - a) / t_2)) elif t_4 <= -4e-276: tmp = t_4 elif (t_4 <= 0.0) or not (t_4 <= 1e+298): tmp = (t - a) / (b - y) else: tmp = ((x * y) / t_1) + (t_3 / t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(y * Float64(1.0 - z)) t_3 = Float64(z * Float64(t - a)) t_4 = Float64(Float64(Float64(x * y) + t_3) / t_1) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = Float64(Float64(x * Float64(y / t_2)) + Float64(z * Float64(Float64(t - a) / t_2))); elseif (t_4 <= -4e-276) tmp = t_4; elseif ((t_4 <= 0.0) || !(t_4 <= 1e+298)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(x * y) / t_1) + Float64(t_3 / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = y * (1.0 - z); t_3 = z * (t - a); t_4 = ((x * y) + t_3) / t_1; tmp = 0.0; if (t_4 <= -Inf) tmp = (x * (y / t_2)) + (z * ((t - a) / t_2)); elseif (t_4 <= -4e-276) tmp = t_4; elseif ((t_4 <= 0.0) || ~((t_4 <= 1e+298))) tmp = (t - a) / (b - y); else tmp = ((x * y) / t_1) + (t_3 / t_1); 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[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(x * y), $MachinePrecision] + t$95$3), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], N[(N[(x * N[(y / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(t - a), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, -4e-276], t$95$4, If[Or[LessEqual[t$95$4, 0.0], N[Not[LessEqual[t$95$4, 1e+298]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t$95$3 / t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := y \cdot \left(1 - z\right)\\
t_3 := z \cdot \left(t - a\right)\\
t_4 := \frac{x \cdot y + t\_3}{t\_1}\\
\mathbf{if}\;t\_4 \leq -\infty:\\
\;\;\;\;x \cdot \frac{y}{t\_2} + z \cdot \frac{t - a}{t\_2}\\
\mathbf{elif}\;t\_4 \leq -4 \cdot 10^{-276}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_4 \leq 0 \lor \neg \left(t\_4 \leq 10^{+298}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{t\_1} + \frac{t\_3}{t\_1}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0Initial program 27.5%
Taylor expanded in x around 0 27.5%
Taylor expanded in b around 0 19.4%
associate-/l*70.3%
*-rgt-identity70.3%
mul-1-neg70.3%
*-commutative70.3%
distribute-lft-neg-out70.3%
neg-mul-170.3%
*-commutative70.3%
distribute-lft-in70.3%
neg-mul-170.3%
sub-neg70.3%
*-lft-identity70.3%
associate-*r*70.3%
neg-mul-170.3%
*-commutative70.3%
distribute-rgt-neg-out70.3%
distribute-lft-neg-out70.3%
neg-mul-170.3%
distribute-rgt-in70.3%
Simplified70.3%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4e-276Initial program 99.4%
if -4e-276 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or 9.9999999999999996e297 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 16.9%
Taylor expanded in z around inf 79.6%
if 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 9.9999999999999996e297Initial program 99.6%
Taylor expanded in x around 0 99.6%
Final simplification91.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
(t_2 (* y (- 1.0 z))))
(if (<= t_1 (- INFINITY))
(+ (* x (/ y t_2)) (* z (/ (- t a) t_2)))
(if (or (<= t_1 -4e-276) (and (not (<= t_1 0.0)) (<= t_1 1e+298)))
t_1
(/ (- t a) (- b y))))))
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 = y * (1.0 - z);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (x * (y / t_2)) + (z * ((t - a) / t_2));
} else if ((t_1 <= -4e-276) || (!(t_1 <= 0.0) && (t_1 <= 1e+298))) {
tmp = t_1;
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
double t_2 = y * (1.0 - z);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (x * (y / t_2)) + (z * ((t - a) / t_2));
} else if ((t_1 <= -4e-276) || (!(t_1 <= 0.0) && (t_1 <= 1e+298))) {
tmp = t_1;
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y))) t_2 = y * (1.0 - z) tmp = 0 if t_1 <= -math.inf: tmp = (x * (y / t_2)) + (z * ((t - a) / t_2)) elif (t_1 <= -4e-276) or (not (t_1 <= 0.0) and (t_1 <= 1e+298)): tmp = t_1 else: tmp = (t - a) / (b - y) 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(y * Float64(1.0 - z)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(x * Float64(y / t_2)) + Float64(z * Float64(Float64(t - a) / t_2))); elseif ((t_1 <= -4e-276) || (!(t_1 <= 0.0) && (t_1 <= 1e+298))) tmp = t_1; else tmp = Float64(Float64(t - a) / Float64(b - y)); 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 = y * (1.0 - z); tmp = 0.0; if (t_1 <= -Inf) tmp = (x * (y / t_2)) + (z * ((t - a) / t_2)); elseif ((t_1 <= -4e-276) || (~((t_1 <= 0.0)) && (t_1 <= 1e+298))) tmp = t_1; else tmp = (t - a) / (b - y); 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[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x * N[(y / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(t - a), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$1, -4e-276], And[N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision], LessEqual[t$95$1, 1e+298]]], t$95$1, N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]]]]]
\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 := y \cdot \left(1 - z\right)\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;x \cdot \frac{y}{t\_2} + z \cdot \frac{t - a}{t\_2}\\
\mathbf{elif}\;t\_1 \leq -4 \cdot 10^{-276} \lor \neg \left(t\_1 \leq 0\right) \land t\_1 \leq 10^{+298}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\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.5%
Taylor expanded in x around 0 27.5%
Taylor expanded in b around 0 19.4%
associate-/l*70.3%
*-rgt-identity70.3%
mul-1-neg70.3%
*-commutative70.3%
distribute-lft-neg-out70.3%
neg-mul-170.3%
*-commutative70.3%
distribute-lft-in70.3%
neg-mul-170.3%
sub-neg70.3%
*-lft-identity70.3%
associate-*r*70.3%
neg-mul-170.3%
*-commutative70.3%
distribute-rgt-neg-out70.3%
distribute-lft-neg-out70.3%
neg-mul-170.3%
distribute-rgt-in70.3%
Simplified70.3%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4e-276 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 9.9999999999999996e297Initial program 99.5%
if -4e-276 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or 9.9999999999999996e297 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 16.9%
Taylor expanded in z around inf 79.6%
Final simplification91.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a))) (t_2 (/ (+ (* x y) t_1) (+ y (* z (- b y))))))
(if (<= t_2 (- INFINITY))
(+ (/ x (- 1.0 z)) (/ t_1 (* y (- 1.0 z))))
(if (or (<= t_2 -4e-276) (and (not (<= t_2 0.0)) (<= t_2 1e+298)))
t_2
(/ (- t a) (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = ((x * y) + t_1) / (y + (z * (b - y)));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (x / (1.0 - z)) + (t_1 / (y * (1.0 - z)));
} else if ((t_2 <= -4e-276) || (!(t_2 <= 0.0) && (t_2 <= 1e+298))) {
tmp = t_2;
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = ((x * y) + t_1) / (y + (z * (b - y)));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = (x / (1.0 - z)) + (t_1 / (y * (1.0 - z)));
} else if ((t_2 <= -4e-276) || (!(t_2 <= 0.0) && (t_2 <= 1e+298))) {
tmp = t_2;
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = ((x * y) + t_1) / (y + (z * (b - y))) tmp = 0 if t_2 <= -math.inf: tmp = (x / (1.0 - z)) + (t_1 / (y * (1.0 - z))) elif (t_2 <= -4e-276) or (not (t_2 <= 0.0) and (t_2 <= 1e+298)): tmp = t_2 else: tmp = (t - a) / (b - y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(Float64(Float64(x * y) + t_1) / Float64(y + Float64(z * Float64(b - y)))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(x / Float64(1.0 - z)) + Float64(t_1 / Float64(y * Float64(1.0 - z)))); elseif ((t_2 <= -4e-276) || (!(t_2 <= 0.0) && (t_2 <= 1e+298))) tmp = t_2; else tmp = Float64(Float64(t - a) / Float64(b - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = ((x * y) + t_1) / (y + (z * (b - y))); tmp = 0.0; if (t_2 <= -Inf) tmp = (x / (1.0 - z)) + (t_1 / (y * (1.0 - z))); elseif ((t_2 <= -4e-276) || (~((t_2 <= 0.0)) && (t_2 <= 1e+298))) tmp = t_2; else tmp = (t - a) / (b - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 / N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$2, -4e-276], And[N[Not[LessEqual[t$95$2, 0.0]], $MachinePrecision], LessEqual[t$95$2, 1e+298]]], t$95$2, N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := \frac{x \cdot y + t\_1}{y + z \cdot \left(b - y\right)}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\frac{x}{1 - z} + \frac{t\_1}{y \cdot \left(1 - z\right)}\\
\mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-276} \lor \neg \left(t\_2 \leq 0\right) \land t\_2 \leq 10^{+298}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\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.5%
Taylor expanded in b around 0 19.4%
mul-1-neg19.4%
*-commutative19.4%
Simplified19.4%
Taylor expanded in y around inf 70.3%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4e-276 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 9.9999999999999996e297Initial program 99.5%
if -4e-276 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or 9.9999999999999996e297 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 16.9%
Taylor expanded in z around inf 79.6%
Final simplification91.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3900000000000.0) (not (<= z 1.32e+20))) (/ (- t a) (- b y)) (/ (+ (* x y) (* z (- t a))) (+ y (* z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3900000000000.0) || !(z <= 1.32e+20)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) + (z * (t - a))) / (y + (z * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-3900000000000.0d0)) .or. (.not. (z <= 1.32d+20))) then
tmp = (t - a) / (b - y)
else
tmp = ((x * y) + (z * (t - a))) / (y + (z * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3900000000000.0) || !(z <= 1.32e+20)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) + (z * (t - a))) / (y + (z * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3900000000000.0) or not (z <= 1.32e+20): tmp = (t - a) / (b - y) else: tmp = ((x * y) + (z * (t - a))) / (y + (z * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3900000000000.0) || !(z <= 1.32e+20)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3900000000000.0) || ~((z <= 1.32e+20))) tmp = (t - a) / (b - y); else tmp = ((x * y) + (z * (t - a))) / (y + (z * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3900000000000.0], N[Not[LessEqual[z, 1.32e+20]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3900000000000 \lor \neg \left(z \leq 1.32 \cdot 10^{+20}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot b}\\
\end{array}
\end{array}
if z < -3.9e12 or 1.32e20 < z Initial program 45.9%
Taylor expanded in z around inf 82.5%
if -3.9e12 < z < 1.32e20Initial program 92.1%
Taylor expanded in b around inf 90.2%
*-commutative90.2%
Simplified90.2%
Final simplification86.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -2.2e+226)
(/ (- a t) y)
(if (or (<= z -6.6e-23) (not (<= z 1.9e-7)))
(/ (- t a) b)
(+ x (/ (* z t) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.2e+226) {
tmp = (a - t) / y;
} else if ((z <= -6.6e-23) || !(z <= 1.9e-7)) {
tmp = (t - a) / b;
} 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 <= (-2.2d+226)) then
tmp = (a - t) / y
else if ((z <= (-6.6d-23)) .or. (.not. (z <= 1.9d-7))) then
tmp = (t - a) / b
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 <= -2.2e+226) {
tmp = (a - t) / y;
} else if ((z <= -6.6e-23) || !(z <= 1.9e-7)) {
tmp = (t - a) / b;
} else {
tmp = x + ((z * t) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2.2e+226: tmp = (a - t) / y elif (z <= -6.6e-23) or not (z <= 1.9e-7): tmp = (t - a) / b else: tmp = x + ((z * t) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.2e+226) tmp = Float64(Float64(a - t) / y); elseif ((z <= -6.6e-23) || !(z <= 1.9e-7)) tmp = Float64(Float64(t - a) / b); 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 <= -2.2e+226) tmp = (a - t) / y; elseif ((z <= -6.6e-23) || ~((z <= 1.9e-7))) tmp = (t - a) / b; else tmp = x + ((z * t) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.2e+226], N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision], If[Or[LessEqual[z, -6.6e-23], N[Not[LessEqual[z, 1.9e-7]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], N[(x + N[(N[(z * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+226}:\\
\;\;\;\;\frac{a - t}{y}\\
\mathbf{elif}\;z \leq -6.6 \cdot 10^{-23} \lor \neg \left(z \leq 1.9 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot t}{y}\\
\end{array}
\end{array}
if z < -2.19999999999999994e226Initial program 28.7%
Taylor expanded in b around 0 29.0%
mul-1-neg29.0%
*-commutative29.0%
Simplified29.0%
Taylor expanded in z around -inf 65.6%
mul-1-neg65.6%
unsub-neg65.6%
associate-*r/65.6%
mul-1-neg65.6%
sub-neg65.6%
mul-1-neg65.6%
remove-double-neg65.6%
Simplified65.6%
Taylor expanded in z around inf 65.6%
div-sub74.7%
Simplified74.7%
if -2.19999999999999994e226 < z < -6.60000000000000041e-23 or 1.90000000000000007e-7 < z Initial program 53.9%
Taylor expanded in y around 0 51.7%
if -6.60000000000000041e-23 < z < 1.90000000000000007e-7Initial program 91.6%
Taylor expanded in b around 0 68.9%
mul-1-neg68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in z around 0 68.2%
mul-1-neg68.2%
+-commutative68.2%
unsub-neg68.2%
Simplified68.2%
Taylor expanded in t around inf 58.6%
Final simplification55.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.02e+227)
(/ (- a t) y)
(if (or (<= z -3.4e-28) (not (<= z 1.5e-7)))
(/ (- t a) b)
(+ x (* z (/ t y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.02e+227) {
tmp = (a - t) / y;
} else if ((z <= -3.4e-28) || !(z <= 1.5e-7)) {
tmp = (t - a) / b;
} 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 <= (-1.02d+227)) then
tmp = (a - t) / y
else if ((z <= (-3.4d-28)) .or. (.not. (z <= 1.5d-7))) then
tmp = (t - a) / b
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 <= -1.02e+227) {
tmp = (a - t) / y;
} else if ((z <= -3.4e-28) || !(z <= 1.5e-7)) {
tmp = (t - a) / b;
} else {
tmp = x + (z * (t / y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.02e+227: tmp = (a - t) / y elif (z <= -3.4e-28) or not (z <= 1.5e-7): tmp = (t - a) / b else: tmp = x + (z * (t / y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.02e+227) tmp = Float64(Float64(a - t) / y); elseif ((z <= -3.4e-28) || !(z <= 1.5e-7)) tmp = Float64(Float64(t - a) / b); else tmp = Float64(x + Float64(z * Float64(t / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.02e+227) tmp = (a - t) / y; elseif ((z <= -3.4e-28) || ~((z <= 1.5e-7))) tmp = (t - a) / b; else tmp = x + (z * (t / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.02e+227], N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision], If[Or[LessEqual[z, -3.4e-28], N[Not[LessEqual[z, 1.5e-7]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], N[(x + N[(z * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.02 \cdot 10^{+227}:\\
\;\;\;\;\frac{a - t}{y}\\
\mathbf{elif}\;z \leq -3.4 \cdot 10^{-28} \lor \neg \left(z \leq 1.5 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\
\end{array}
\end{array}
if z < -1.0200000000000001e227Initial program 28.7%
Taylor expanded in b around 0 29.0%
mul-1-neg29.0%
*-commutative29.0%
Simplified29.0%
Taylor expanded in z around -inf 65.6%
mul-1-neg65.6%
unsub-neg65.6%
associate-*r/65.6%
mul-1-neg65.6%
sub-neg65.6%
mul-1-neg65.6%
remove-double-neg65.6%
Simplified65.6%
Taylor expanded in z around inf 65.6%
div-sub74.7%
Simplified74.7%
if -1.0200000000000001e227 < z < -3.4000000000000001e-28 or 1.4999999999999999e-7 < z Initial program 53.9%
Taylor expanded in y around 0 51.7%
if -3.4000000000000001e-28 < z < 1.4999999999999999e-7Initial program 91.6%
Taylor expanded in b around 0 68.9%
mul-1-neg68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in z around 0 68.2%
mul-1-neg68.2%
+-commutative68.2%
unsub-neg68.2%
Simplified68.2%
Taylor expanded in t around inf 57.7%
Final simplification55.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- a t) y)))
(if (<= z -1.55e+83)
t_1
(if (<= z -3.5e-17)
(/ a (- b))
(if (<= z 23000000000.0) (/ x (- 1.0 z)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - t) / y;
double tmp;
if (z <= -1.55e+83) {
tmp = t_1;
} else if (z <= -3.5e-17) {
tmp = a / -b;
} else if (z <= 23000000000.0) {
tmp = x / (1.0 - 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 - t) / y
if (z <= (-1.55d+83)) then
tmp = t_1
else if (z <= (-3.5d-17)) then
tmp = a / -b
else if (z <= 23000000000.0d0) then
tmp = x / (1.0d0 - 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 - t) / y;
double tmp;
if (z <= -1.55e+83) {
tmp = t_1;
} else if (z <= -3.5e-17) {
tmp = a / -b;
} else if (z <= 23000000000.0) {
tmp = x / (1.0 - z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a - t) / y tmp = 0 if z <= -1.55e+83: tmp = t_1 elif z <= -3.5e-17: tmp = a / -b elif z <= 23000000000.0: tmp = x / (1.0 - z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - t) / y) tmp = 0.0 if (z <= -1.55e+83) tmp = t_1; elseif (z <= -3.5e-17) tmp = Float64(a / Float64(-b)); elseif (z <= 23000000000.0) tmp = Float64(x / Float64(1.0 - z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a - t) / y; tmp = 0.0; if (z <= -1.55e+83) tmp = t_1; elseif (z <= -3.5e-17) tmp = a / -b; elseif (z <= 23000000000.0) tmp = x / (1.0 - z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[z, -1.55e+83], t$95$1, If[LessEqual[z, -3.5e-17], N[(a / (-b)), $MachinePrecision], If[LessEqual[z, 23000000000.0], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a - t}{y}\\
\mathbf{if}\;z \leq -1.55 \cdot 10^{+83}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-17}:\\
\;\;\;\;\frac{a}{-b}\\
\mathbf{elif}\;z \leq 23000000000:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.54999999999999996e83 or 2.3e10 < z Initial program 46.8%
Taylor expanded in b around 0 26.1%
mul-1-neg26.1%
*-commutative26.1%
Simplified26.1%
Taylor expanded in z around -inf 49.3%
mul-1-neg49.3%
unsub-neg49.3%
associate-*r/49.3%
mul-1-neg49.3%
sub-neg49.3%
mul-1-neg49.3%
remove-double-neg49.3%
Simplified49.3%
Taylor expanded in z around inf 42.3%
div-sub43.2%
Simplified43.2%
if -1.54999999999999996e83 < z < -3.5000000000000002e-17Initial program 66.6%
Taylor expanded in x around 0 66.7%
Taylor expanded in b around inf 69.1%
+-commutative69.1%
*-commutative69.1%
Simplified69.1%
Taylor expanded in a around inf 48.9%
neg-mul-148.9%
Simplified48.9%
if -3.5000000000000002e-17 < z < 2.3e10Initial program 91.3%
Taylor expanded in y around inf 48.5%
mul-1-neg48.5%
unsub-neg48.5%
Simplified48.5%
Final simplification46.1%
(FPCore (x y z t a b) :precision binary64 (if (<= z -2.5e+156) (/ t b) (if (<= z -1.3e-18) (/ a (- b)) (if (<= z 2.4e-7) (+ x (* z x)) (/ t b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.5e+156) {
tmp = t / b;
} else if (z <= -1.3e-18) {
tmp = a / -b;
} else if (z <= 2.4e-7) {
tmp = x + (z * 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.5d+156)) then
tmp = t / b
else if (z <= (-1.3d-18)) then
tmp = a / -b
else if (z <= 2.4d-7) then
tmp = x + (z * 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.5e+156) {
tmp = t / b;
} else if (z <= -1.3e-18) {
tmp = a / -b;
} else if (z <= 2.4e-7) {
tmp = x + (z * x);
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2.5e+156: tmp = t / b elif z <= -1.3e-18: tmp = a / -b elif z <= 2.4e-7: tmp = x + (z * x) else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.5e+156) tmp = Float64(t / b); elseif (z <= -1.3e-18) tmp = Float64(a / Float64(-b)); elseif (z <= 2.4e-7) tmp = Float64(x + Float64(z * 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.5e+156) tmp = t / b; elseif (z <= -1.3e-18) tmp = a / -b; elseif (z <= 2.4e-7) tmp = x + (z * x); else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.5e+156], N[(t / b), $MachinePrecision], If[LessEqual[z, -1.3e-18], N[(a / (-b)), $MachinePrecision], If[LessEqual[z, 2.4e-7], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision], N[(t / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+156}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-18}:\\
\;\;\;\;\frac{a}{-b}\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-7}:\\
\;\;\;\;x + z \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -2.49999999999999996e156 or 2.39999999999999979e-7 < z Initial program 48.0%
Taylor expanded in x around 0 48.0%
Taylor expanded in b around inf 51.1%
+-commutative51.1%
*-commutative51.1%
Simplified51.1%
Taylor expanded in t around inf 29.4%
if -2.49999999999999996e156 < z < -1.3e-18Initial program 58.4%
Taylor expanded in x around 0 58.5%
Taylor expanded in b around inf 64.2%
+-commutative64.2%
*-commutative64.2%
Simplified64.2%
Taylor expanded in a around inf 41.9%
neg-mul-141.9%
Simplified41.9%
if -1.3e-18 < z < 2.39999999999999979e-7Initial program 91.8%
Taylor expanded in y around inf 49.3%
mul-1-neg49.3%
unsub-neg49.3%
Simplified49.3%
Taylor expanded in z around 0 49.2%
*-commutative49.2%
Simplified49.2%
Final simplification40.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.2e-23) (not (<= z 2.25e-7))) (/ (- t a) (- b y)) (+ x (/ (* z (- t a)) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.2e-23) || !(z <= 2.25e-7)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * (t - a)) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-2.2d-23)) .or. (.not. (z <= 2.25d-7))) then
tmp = (t - a) / (b - y)
else
tmp = x + ((z * (t - a)) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.2e-23) || !(z <= 2.25e-7)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * (t - a)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.2e-23) or not (z <= 2.25e-7): tmp = (t - a) / (b - y) else: tmp = x + ((z * (t - a)) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.2e-23) || !(z <= 2.25e-7)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.2e-23) || ~((z <= 2.25e-7))) tmp = (t - a) / (b - y); else tmp = x + ((z * (t - a)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.2e-23], N[Not[LessEqual[z, 2.25e-7]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{-23} \lor \neg \left(z \leq 2.25 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\
\end{array}
\end{array}
if z < -2.1999999999999999e-23 or 2.2499999999999999e-7 < z Initial program 52.0%
Taylor expanded in z around inf 79.9%
if -2.1999999999999999e-23 < z < 2.2499999999999999e-7Initial program 91.6%
Taylor expanded in b around 0 68.9%
mul-1-neg68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in z around 0 68.2%
mul-1-neg68.2%
+-commutative68.2%
unsub-neg68.2%
Simplified68.2%
Taylor expanded in y around 0 76.5%
Final simplification78.5%
(FPCore (x y z t a b) :precision binary64 (if (<= z -6.3e+156) (/ t b) (if (<= z -6.9e-18) (/ a (- b)) (if (<= z 1.5e-7) x (/ t b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -6.3e+156) {
tmp = t / b;
} else if (z <= -6.9e-18) {
tmp = a / -b;
} else if (z <= 1.5e-7) {
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 <= (-6.3d+156)) then
tmp = t / b
else if (z <= (-6.9d-18)) then
tmp = a / -b
else if (z <= 1.5d-7) 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 <= -6.3e+156) {
tmp = t / b;
} else if (z <= -6.9e-18) {
tmp = a / -b;
} else if (z <= 1.5e-7) {
tmp = x;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -6.3e+156: tmp = t / b elif z <= -6.9e-18: tmp = a / -b elif z <= 1.5e-7: tmp = x else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -6.3e+156) tmp = Float64(t / b); elseif (z <= -6.9e-18) tmp = Float64(a / Float64(-b)); elseif (z <= 1.5e-7) 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 <= -6.3e+156) tmp = t / b; elseif (z <= -6.9e-18) tmp = a / -b; elseif (z <= 1.5e-7) tmp = x; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -6.3e+156], N[(t / b), $MachinePrecision], If[LessEqual[z, -6.9e-18], N[(a / (-b)), $MachinePrecision], If[LessEqual[z, 1.5e-7], x, N[(t / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.3 \cdot 10^{+156}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq -6.9 \cdot 10^{-18}:\\
\;\;\;\;\frac{a}{-b}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-7}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -6.29999999999999982e156 or 1.4999999999999999e-7 < z Initial program 48.0%
Taylor expanded in x around 0 48.0%
Taylor expanded in b around inf 51.1%
+-commutative51.1%
*-commutative51.1%
Simplified51.1%
Taylor expanded in t around inf 29.4%
if -6.29999999999999982e156 < z < -6.9000000000000003e-18Initial program 58.4%
Taylor expanded in x around 0 58.5%
Taylor expanded in b around inf 64.2%
+-commutative64.2%
*-commutative64.2%
Simplified64.2%
Taylor expanded in a around inf 41.9%
neg-mul-141.9%
Simplified41.9%
if -6.9000000000000003e-18 < z < 1.4999999999999999e-7Initial program 91.8%
Taylor expanded in z around 0 48.9%
Final simplification39.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.7e-28) (not (<= z 1.5e-7))) (/ (- 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 <= -2.7e-28) || !(z <= 1.5e-7)) {
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 <= (-2.7d-28)) .or. (.not. (z <= 1.5d-7))) 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 <= -2.7e-28) || !(z <= 1.5e-7)) {
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 <= -2.7e-28) or not (z <= 1.5e-7): 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 <= -2.7e-28) || !(z <= 1.5e-7)) 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 <= -2.7e-28) || ~((z <= 1.5e-7))) 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, -2.7e-28], N[Not[LessEqual[z, 1.5e-7]], $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 -2.7 \cdot 10^{-28} \lor \neg \left(z \leq 1.5 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\end{array}
\end{array}
if z < -2.6999999999999999e-28 or 1.4999999999999999e-7 < z Initial program 52.0%
Taylor expanded in z around inf 79.9%
if -2.6999999999999999e-28 < z < 1.4999999999999999e-7Initial program 91.6%
Taylor expanded in b around 0 68.9%
mul-1-neg68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in z around 0 68.2%
mul-1-neg68.2%
+-commutative68.2%
unsub-neg68.2%
Simplified68.2%
Taylor expanded in a around inf 67.5%
associate-*r/67.5%
mul-1-neg67.5%
*-commutative67.5%
Simplified67.5%
Final simplification74.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.2e-23) (not (<= z 1.55e-7))) (/ (- t a) (- b y)) (- x (* a (/ z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.2e-23) || !(z <= 1.55e-7)) {
tmp = (t - a) / (b - y);
} else {
tmp = x - (a * (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 ((z <= (-2.2d-23)) .or. (.not. (z <= 1.55d-7))) then
tmp = (t - a) / (b - y)
else
tmp = x - (a * (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 ((z <= -2.2e-23) || !(z <= 1.55e-7)) {
tmp = (t - a) / (b - y);
} else {
tmp = x - (a * (z / y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.2e-23) or not (z <= 1.55e-7): tmp = (t - a) / (b - y) else: tmp = x - (a * (z / y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.2e-23) || !(z <= 1.55e-7)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x - Float64(a * Float64(z / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.2e-23) || ~((z <= 1.55e-7))) tmp = (t - a) / (b - y); else tmp = x - (a * (z / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.2e-23], N[Not[LessEqual[z, 1.55e-7]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x - N[(a * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{-23} \lor \neg \left(z \leq 1.55 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot \frac{z}{y}\\
\end{array}
\end{array}
if z < -2.1999999999999999e-23 or 1.55e-7 < z Initial program 52.0%
Taylor expanded in z around inf 79.9%
if -2.1999999999999999e-23 < z < 1.55e-7Initial program 91.6%
Taylor expanded in b around 0 68.9%
mul-1-neg68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in z around 0 68.2%
mul-1-neg68.2%
+-commutative68.2%
unsub-neg68.2%
Simplified68.2%
Taylor expanded in a around inf 67.5%
mul-1-neg67.5%
associate-/l*62.4%
distribute-rgt-neg-in62.4%
mul-1-neg62.4%
associate-*r/62.4%
mul-1-neg62.4%
Simplified62.4%
Final simplification72.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -9e-35) (not (<= z 1.6e-7))) (/ (- 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 <= -9e-35) || !(z <= 1.6e-7)) {
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 <= (-9d-35)) .or. (.not. (z <= 1.6d-7))) 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 <= -9e-35) || !(z <= 1.6e-7)) {
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 <= -9e-35) or not (z <= 1.6e-7): 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 <= -9e-35) || !(z <= 1.6e-7)) 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 <= -9e-35) || ~((z <= 1.6e-7))) 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, -9e-35], N[Not[LessEqual[z, 1.6e-7]], $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 -9 \cdot 10^{-35} \lor \neg \left(z \leq 1.6 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot t}{y}\\
\end{array}
\end{array}
if z < -9.0000000000000002e-35 or 1.6e-7 < z Initial program 52.4%
Taylor expanded in z around inf 79.5%
if -9.0000000000000002e-35 < z < 1.6e-7Initial program 91.5%
Taylor expanded in b around 0 68.6%
mul-1-neg68.6%
*-commutative68.6%
Simplified68.6%
Taylor expanded in z around 0 67.9%
mul-1-neg67.9%
+-commutative67.9%
unsub-neg67.9%
Simplified67.9%
Taylor expanded in t around inf 59.1%
Final simplification71.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.55e-13) (not (<= y 7.5e+44))) (/ 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-13) || !(y <= 7.5e+44)) {
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-13)) .or. (.not. (y <= 7.5d+44))) 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-13) || !(y <= 7.5e+44)) {
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-13) or not (y <= 7.5e+44): 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-13) || !(y <= 7.5e+44)) 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-13) || ~((y <= 7.5e+44))) 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-13], N[Not[LessEqual[y, 7.5e+44]], $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^{-13} \lor \neg \left(y \leq 7.5 \cdot 10^{+44}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -1.55e-13 or 7.50000000000000027e44 < y Initial program 53.4%
Taylor expanded in y around inf 48.0%
mul-1-neg48.0%
unsub-neg48.0%
Simplified48.0%
if -1.55e-13 < y < 7.50000000000000027e44Initial program 80.4%
Taylor expanded in y around 0 55.7%
Final simplification52.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.85e-19) (not (<= y 1.65e+21))) (/ x (- 1.0 z)) (/ t b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.85e-19) || !(y <= 1.65e+21)) {
tmp = x / (1.0 - z);
} 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 ((y <= (-1.85d-19)) .or. (.not. (y <= 1.65d+21))) then
tmp = x / (1.0d0 - z)
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 ((y <= -1.85e-19) || !(y <= 1.65e+21)) {
tmp = x / (1.0 - z);
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.85e-19) or not (y <= 1.65e+21): tmp = x / (1.0 - z) else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.85e-19) || !(y <= 1.65e+21)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(t / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.85e-19) || ~((y <= 1.65e+21))) tmp = x / (1.0 - z); else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.85e-19], N[Not[LessEqual[y, 1.65e+21]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(t / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{-19} \lor \neg \left(y \leq 1.65 \cdot 10^{+21}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if y < -1.85000000000000003e-19 or 1.65e21 < y Initial program 56.0%
Taylor expanded in y around inf 45.9%
mul-1-neg45.9%
unsub-neg45.9%
Simplified45.9%
if -1.85000000000000003e-19 < y < 1.65e21Initial program 80.1%
Taylor expanded in x around 0 80.1%
Taylor expanded in b around inf 65.6%
+-commutative65.6%
*-commutative65.6%
Simplified65.6%
Taylor expanded in t around inf 32.5%
Final simplification39.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.6e-32) (not (<= z 1.5e-7))) (/ t b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.6e-32) || !(z <= 1.5e-7)) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-2.6d-32)) .or. (.not. (z <= 1.5d-7))) then
tmp = t / b
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.6e-32) || !(z <= 1.5e-7)) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.6e-32) or not (z <= 1.5e-7): tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.6e-32) || !(z <= 1.5e-7)) tmp = Float64(t / b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.6e-32) || ~((z <= 1.5e-7))) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.6e-32], N[Not[LessEqual[z, 1.5e-7]], $MachinePrecision]], N[(t / b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{-32} \lor \neg \left(z \leq 1.5 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.5999999999999997e-32 or 1.4999999999999999e-7 < z Initial program 52.4%
Taylor expanded in x around 0 52.4%
Taylor expanded in b around inf 55.5%
+-commutative55.5%
*-commutative55.5%
Simplified55.5%
Taylor expanded in t around inf 28.3%
if -2.5999999999999997e-32 < z < 1.4999999999999999e-7Initial program 91.5%
Taylor expanded in z around 0 50.5%
Final simplification37.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 68.4%
Taylor expanded in z around 0 23.2%
(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 2024145
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:alt
(! :herbie-platform default (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))