
(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 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2 (+ y (* z (- b y))))
(t_3 (/ (+ (* x y) t_1) t_2))
(t_4 (/ t_1 t_2))
(t_5
(+
(+ (* (/ y z) (/ x (- b y))) (/ (- t a) (- b y)))
(* (/ y z) (/ (- a t) (pow (- b y) 2.0))))))
(if (<= t_3 (- INFINITY))
(+ x t_4)
(if (<= t_3 -5e-206)
(+ t_4 (/ (* x y) t_2))
(if (<= t_3 0.0)
t_5
(if (<= t_3 5e+224)
t_3
(if (<= t_3 INFINITY)
(-
(+ (* (/ z y) (/ (- t a) (- 1.0 z))) (/ x (- 1.0 z)))
(* (/ b y) (/ (* x z) (pow (- 1.0 z) 2.0))))
t_5)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = y + (z * (b - y));
double t_3 = ((x * y) + t_1) / t_2;
double t_4 = t_1 / t_2;
double t_5 = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + ((y / z) * ((a - t) / pow((b - y), 2.0)));
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = x + t_4;
} else if (t_3 <= -5e-206) {
tmp = t_4 + ((x * y) / t_2);
} else if (t_3 <= 0.0) {
tmp = t_5;
} else if (t_3 <= 5e+224) {
tmp = t_3;
} else if (t_3 <= ((double) INFINITY)) {
tmp = (((z / y) * ((t - a) / (1.0 - z))) + (x / (1.0 - z))) - ((b / y) * ((x * z) / pow((1.0 - z), 2.0)));
} else {
tmp = t_5;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = y + (z * (b - y));
double t_3 = ((x * y) + t_1) / t_2;
double t_4 = t_1 / t_2;
double t_5 = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + ((y / z) * ((a - t) / Math.pow((b - y), 2.0)));
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = x + t_4;
} else if (t_3 <= -5e-206) {
tmp = t_4 + ((x * y) / t_2);
} else if (t_3 <= 0.0) {
tmp = t_5;
} else if (t_3 <= 5e+224) {
tmp = t_3;
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = (((z / y) * ((t - a) / (1.0 - z))) + (x / (1.0 - z))) - ((b / y) * ((x * z) / Math.pow((1.0 - z), 2.0)));
} else {
tmp = t_5;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = y + (z * (b - y)) t_3 = ((x * y) + t_1) / t_2 t_4 = t_1 / t_2 t_5 = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + ((y / z) * ((a - t) / math.pow((b - y), 2.0))) tmp = 0 if t_3 <= -math.inf: tmp = x + t_4 elif t_3 <= -5e-206: tmp = t_4 + ((x * y) / t_2) elif t_3 <= 0.0: tmp = t_5 elif t_3 <= 5e+224: tmp = t_3 elif t_3 <= math.inf: tmp = (((z / y) * ((t - a) / (1.0 - z))) + (x / (1.0 - z))) - ((b / y) * ((x * z) / math.pow((1.0 - z), 2.0))) else: tmp = t_5 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(y + Float64(z * Float64(b - y))) t_3 = Float64(Float64(Float64(x * y) + t_1) / t_2) t_4 = Float64(t_1 / t_2) t_5 = Float64(Float64(Float64(Float64(y / z) * Float64(x / Float64(b - y))) + Float64(Float64(t - a) / Float64(b - y))) + Float64(Float64(y / z) * Float64(Float64(a - t) / (Float64(b - y) ^ 2.0)))) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(x + t_4); elseif (t_3 <= -5e-206) tmp = Float64(t_4 + Float64(Float64(x * y) / t_2)); elseif (t_3 <= 0.0) tmp = t_5; elseif (t_3 <= 5e+224) tmp = t_3; elseif (t_3 <= Inf) tmp = Float64(Float64(Float64(Float64(z / y) * Float64(Float64(t - a) / Float64(1.0 - z))) + Float64(x / Float64(1.0 - z))) - Float64(Float64(b / y) * Float64(Float64(x * z) / (Float64(1.0 - z) ^ 2.0)))); else tmp = t_5; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = y + (z * (b - y)); t_3 = ((x * y) + t_1) / t_2; t_4 = t_1 / t_2; t_5 = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + ((y / z) * ((a - t) / ((b - y) ^ 2.0))); tmp = 0.0; if (t_3 <= -Inf) tmp = x + t_4; elseif (t_3 <= -5e-206) tmp = t_4 + ((x * y) / t_2); elseif (t_3 <= 0.0) tmp = t_5; elseif (t_3 <= 5e+224) tmp = t_3; elseif (t_3 <= Inf) tmp = (((z / y) * ((t - a) / (1.0 - z))) + (x / (1.0 - z))) - ((b / y) * ((x * z) / ((1.0 - z) ^ 2.0))); else tmp = t_5; 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[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 / t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[(y / z), $MachinePrecision] * N[(x / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y / z), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(x + t$95$4), $MachinePrecision], If[LessEqual[t$95$3, -5e-206], N[(t$95$4 + N[(N[(x * y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 0.0], t$95$5, If[LessEqual[t$95$3, 5e+224], t$95$3, If[LessEqual[t$95$3, Infinity], N[(N[(N[(N[(z / y), $MachinePrecision] * N[(N[(t - a), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b / y), $MachinePrecision] * N[(N[(x * z), $MachinePrecision] / N[Power[N[(1.0 - z), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$5]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := y + z \cdot \left(b - y\right)\\
t_3 := \frac{x \cdot y + t_1}{t_2}\\
t_4 := \frac{t_1}{t_2}\\
t_5 := \left(\frac{y}{z} \cdot \frac{x}{b - y} + \frac{t - a}{b - y}\right) + \frac{y}{z} \cdot \frac{a - t}{{\left(b - y\right)}^{2}}\\
\mathbf{if}\;t_3 \leq -\infty:\\
\;\;\;\;x + t_4\\
\mathbf{elif}\;t_3 \leq -5 \cdot 10^{-206}:\\
\;\;\;\;t_4 + \frac{x \cdot y}{t_2}\\
\mathbf{elif}\;t_3 \leq 0:\\
\;\;\;\;t_5\\
\mathbf{elif}\;t_3 \leq 5 \cdot 10^{+224}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\left(\frac{z}{y} \cdot \frac{t - a}{1 - z} + \frac{x}{1 - z}\right) - \frac{b}{y} \cdot \frac{x \cdot z}{{\left(1 - z\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;t_5\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0Initial program 46.0%
Taylor expanded in x around 0 46.0%
Taylor expanded in z around 0 78.1%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5e-206Initial program 99.6%
Taylor expanded in x around 0 99.6%
if -5e-206 < (/.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 12.1%
Taylor expanded in z around inf 52.0%
associate--r+52.0%
+-commutative52.0%
associate--l+52.0%
*-commutative52.0%
times-frac64.7%
div-sub64.7%
times-frac99.8%
Simplified99.8%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 4.99999999999999964e224Initial program 99.5%
if 4.99999999999999964e224 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 32.6%
Taylor expanded in y around inf 53.5%
mul-1-neg53.5%
times-frac79.8%
mul-1-neg79.8%
times-frac79.8%
*-commutative79.8%
mul-1-neg79.8%
Simplified79.8%
Final simplification95.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y)))))
(if (or (<= z -6.2e+58) (not (<= z 1.65e+16)))
(+
(+ (* (/ y z) (/ x (- b y))) (/ (- t a) (- b y)))
(* (/ y z) (/ (- a t) (pow (- b y) 2.0))))
(+ (/ (* z (- t a)) t_1) (/ (* x y) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double tmp;
if ((z <= -6.2e+58) || !(z <= 1.65e+16)) {
tmp = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + ((y / z) * ((a - t) / pow((b - y), 2.0)));
} else {
tmp = ((z * (t - a)) / t_1) + ((x * y) / 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 = y + (z * (b - y))
if ((z <= (-6.2d+58)) .or. (.not. (z <= 1.65d+16))) then
tmp = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + ((y / z) * ((a - t) / ((b - y) ** 2.0d0)))
else
tmp = ((z * (t - a)) / t_1) + ((x * y) / 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 = y + (z * (b - y));
double tmp;
if ((z <= -6.2e+58) || !(z <= 1.65e+16)) {
tmp = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + ((y / z) * ((a - t) / Math.pow((b - y), 2.0)));
} else {
tmp = ((z * (t - a)) / t_1) + ((x * y) / t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) tmp = 0 if (z <= -6.2e+58) or not (z <= 1.65e+16): tmp = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + ((y / z) * ((a - t) / math.pow((b - y), 2.0))) else: tmp = ((z * (t - a)) / t_1) + ((x * y) / t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) tmp = 0.0 if ((z <= -6.2e+58) || !(z <= 1.65e+16)) tmp = Float64(Float64(Float64(Float64(y / z) * Float64(x / Float64(b - y))) + Float64(Float64(t - a) / Float64(b - y))) + Float64(Float64(y / z) * Float64(Float64(a - t) / (Float64(b - y) ^ 2.0)))); else tmp = Float64(Float64(Float64(z * Float64(t - a)) / t_1) + Float64(Float64(x * y) / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); tmp = 0.0; if ((z <= -6.2e+58) || ~((z <= 1.65e+16))) tmp = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + ((y / z) * ((a - t) / ((b - y) ^ 2.0))); else tmp = ((z * (t - a)) / t_1) + ((x * y) / 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]}, If[Or[LessEqual[z, -6.2e+58], N[Not[LessEqual[z, 1.65e+16]], $MachinePrecision]], N[(N[(N[(N[(y / z), $MachinePrecision] * N[(x / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y / z), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -6.2 \cdot 10^{+58} \lor \neg \left(z \leq 1.65 \cdot 10^{+16}\right):\\
\;\;\;\;\left(\frac{y}{z} \cdot \frac{x}{b - y} + \frac{t - a}{b - y}\right) + \frac{y}{z} \cdot \frac{a - t}{{\left(b - y\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right)}{t_1} + \frac{x \cdot y}{t_1}\\
\end{array}
\end{array}
if z < -6.1999999999999998e58 or 1.65e16 < z Initial program 40.6%
Taylor expanded in z around inf 67.4%
associate--r+67.4%
+-commutative67.4%
associate--l+67.4%
*-commutative67.4%
times-frac73.4%
div-sub74.4%
times-frac90.3%
Simplified90.3%
if -6.1999999999999998e58 < z < 1.65e16Initial program 89.6%
Taylor expanded in x around 0 89.6%
Final simplification89.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y)))))
(if (<= z -1.15e+36)
(- (/ t (- b y)) (/ a (- b y)))
(if (<= z 4.8e+30)
(+ (/ (* z (- t a)) t_1) (/ (* x y) t_1))
(/ (- t a) (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double tmp;
if (z <= -1.15e+36) {
tmp = (t / (b - y)) - (a / (b - y));
} else if (z <= 4.8e+30) {
tmp = ((z * (t - a)) / t_1) + ((x * y) / t_1);
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = y + (z * (b - y))
if (z <= (-1.15d+36)) then
tmp = (t / (b - y)) - (a / (b - y))
else if (z <= 4.8d+30) then
tmp = ((z * (t - a)) / t_1) + ((x * y) / t_1)
else
tmp = (t - a) / (b - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double tmp;
if (z <= -1.15e+36) {
tmp = (t / (b - y)) - (a / (b - y));
} else if (z <= 4.8e+30) {
tmp = ((z * (t - a)) / t_1) + ((x * y) / t_1);
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) tmp = 0 if z <= -1.15e+36: tmp = (t / (b - y)) - (a / (b - y)) elif z <= 4.8e+30: tmp = ((z * (t - a)) / t_1) + ((x * y) / t_1) else: tmp = (t - a) / (b - y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) tmp = 0.0 if (z <= -1.15e+36) tmp = Float64(Float64(t / Float64(b - y)) - Float64(a / Float64(b - y))); elseif (z <= 4.8e+30) tmp = Float64(Float64(Float64(z * Float64(t - a)) / t_1) + Float64(Float64(x * y) / 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 = y + (z * (b - y)); tmp = 0.0; if (z <= -1.15e+36) tmp = (t / (b - y)) - (a / (b - y)); elseif (z <= 4.8e+30) tmp = ((z * (t - a)) / t_1) + ((x * y) / 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[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.15e+36], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.8e+30], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{+36}:\\
\;\;\;\;\frac{t}{b - y} - \frac{a}{b - y}\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{+30}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right)}{t_1} + \frac{x \cdot y}{t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\end{array}
\end{array}
if z < -1.14999999999999998e36Initial program 43.7%
Taylor expanded in z around inf 72.4%
associate--r+72.4%
+-commutative72.4%
associate--l+72.4%
*-commutative72.4%
times-frac79.6%
div-sub79.5%
times-frac90.7%
Simplified90.7%
Taylor expanded in z around inf 84.1%
if -1.14999999999999998e36 < z < 4.7999999999999999e30Initial program 88.2%
Taylor expanded in x around 0 88.3%
if 4.7999999999999999e30 < z Initial program 42.2%
Taylor expanded in z around inf 83.2%
Final simplification86.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -1.95e-69)
t_1
(if (<= z 1.12e-128)
x
(if (<= z 4.3e-63)
(/ (- t a) b)
(if (<= z 1200000000.0) (/ x (- 1.0 z)) 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.95e-69) {
tmp = t_1;
} else if (z <= 1.12e-128) {
tmp = x;
} else if (z <= 4.3e-63) {
tmp = (t - a) / b;
} else if (z <= 1200000000.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 = (t - a) / (b - y)
if (z <= (-1.95d-69)) then
tmp = t_1
else if (z <= 1.12d-128) then
tmp = x
else if (z <= 4.3d-63) then
tmp = (t - a) / b
else if (z <= 1200000000.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 = (t - a) / (b - y);
double tmp;
if (z <= -1.95e-69) {
tmp = t_1;
} else if (z <= 1.12e-128) {
tmp = x;
} else if (z <= 4.3e-63) {
tmp = (t - a) / b;
} else if (z <= 1200000000.0) {
tmp = x / (1.0 - z);
} 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.95e-69: tmp = t_1 elif z <= 1.12e-128: tmp = x elif z <= 4.3e-63: tmp = (t - a) / b elif z <= 1200000000.0: tmp = x / (1.0 - z) 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.95e-69) tmp = t_1; elseif (z <= 1.12e-128) tmp = x; elseif (z <= 4.3e-63) tmp = Float64(Float64(t - a) / b); elseif (z <= 1200000000.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 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.95e-69) tmp = t_1; elseif (z <= 1.12e-128) tmp = x; elseif (z <= 4.3e-63) tmp = (t - a) / b; elseif (z <= 1200000000.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[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.95e-69], t$95$1, If[LessEqual[z, 1.12e-128], x, If[LessEqual[z, 4.3e-63], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 1200000000.0], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.95 \cdot 10^{-69}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{-128}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{-63}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;z \leq 1200000000:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.9499999999999999e-69 or 1.2e9 < z Initial program 54.1%
Taylor expanded in z around inf 79.0%
if -1.9499999999999999e-69 < z < 1.12e-128Initial program 88.4%
Taylor expanded in z around 0 59.8%
if 1.12e-128 < z < 4.2999999999999999e-63Initial program 88.7%
Taylor expanded in y around 0 68.3%
if 4.2999999999999999e-63 < z < 1.2e9Initial program 86.3%
Taylor expanded in y around inf 51.8%
mul-1-neg51.8%
unsub-neg51.8%
Simplified51.8%
Final simplification70.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -7.6e+35)
(- (/ t (- b y)) (/ a (- b y)))
(if (<= z 4.95e+30)
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y))))
(/ (- t a) (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -7.6e+35) {
tmp = (t / (b - y)) - (a / (b - y));
} else if (z <= 4.95e+30) {
tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
} else {
tmp = (t - a) / (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 <= (-7.6d+35)) then
tmp = (t / (b - y)) - (a / (b - y))
else if (z <= 4.95d+30) then
tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
else
tmp = (t - a) / (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 <= -7.6e+35) {
tmp = (t / (b - y)) - (a / (b - y));
} else if (z <= 4.95e+30) {
tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -7.6e+35: tmp = (t / (b - y)) - (a / (b - y)) elif z <= 4.95e+30: tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))) else: tmp = (t - a) / (b - y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -7.6e+35) tmp = Float64(Float64(t / Float64(b - y)) - Float64(a / Float64(b - y))); elseif (z <= 4.95e+30) tmp = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))); else tmp = Float64(Float64(t - a) / Float64(b - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -7.6e+35) tmp = (t / (b - y)) - (a / (b - y)); elseif (z <= 4.95e+30) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); else tmp = (t - a) / (b - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -7.6e+35], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.95e+30], 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], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.6 \cdot 10^{+35}:\\
\;\;\;\;\frac{t}{b - y} - \frac{a}{b - y}\\
\mathbf{elif}\;z \leq 4.95 \cdot 10^{+30}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\end{array}
\end{array}
if z < -7.5999999999999999e35Initial program 43.7%
Taylor expanded in z around inf 72.4%
associate--r+72.4%
+-commutative72.4%
associate--l+72.4%
*-commutative72.4%
times-frac79.6%
div-sub79.5%
times-frac90.7%
Simplified90.7%
Taylor expanded in z around inf 84.1%
if -7.5999999999999999e35 < z < 4.9500000000000001e30Initial program 88.2%
if 4.9500000000000001e30 < z Initial program 42.2%
Taylor expanded in z around inf 83.2%
Final simplification86.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))) (t_2 (/ x (- 1.0 z))))
(if (<= y -2.8e-23)
t_2
(if (<= y -1.05e-224)
t_1
(if (<= y -3.7e-287) (/ (- a) b) (if (<= y 5.8e-8) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -2.8e-23) {
tmp = t_2;
} else if (y <= -1.05e-224) {
tmp = t_1;
} else if (y <= -3.7e-287) {
tmp = -a / b;
} else if (y <= 5.8e-8) {
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 / (b - y)
t_2 = x / (1.0d0 - z)
if (y <= (-2.8d-23)) then
tmp = t_2
else if (y <= (-1.05d-224)) then
tmp = t_1
else if (y <= (-3.7d-287)) then
tmp = -a / b
else if (y <= 5.8d-8) 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 / (b - y);
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -2.8e-23) {
tmp = t_2;
} else if (y <= -1.05e-224) {
tmp = t_1;
} else if (y <= -3.7e-287) {
tmp = -a / b;
} else if (y <= 5.8e-8) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) t_2 = x / (1.0 - z) tmp = 0 if y <= -2.8e-23: tmp = t_2 elif y <= -1.05e-224: tmp = t_1 elif y <= -3.7e-287: tmp = -a / b elif y <= 5.8e-8: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) t_2 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -2.8e-23) tmp = t_2; elseif (y <= -1.05e-224) tmp = t_1; elseif (y <= -3.7e-287) tmp = Float64(Float64(-a) / b); elseif (y <= 5.8e-8) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t / (b - y); t_2 = x / (1.0 - z); tmp = 0.0; if (y <= -2.8e-23) tmp = t_2; elseif (y <= -1.05e-224) tmp = t_1; elseif (y <= -3.7e-287) tmp = -a / b; elseif (y <= 5.8e-8) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.8e-23], t$95$2, If[LessEqual[y, -1.05e-224], t$95$1, If[LessEqual[y, -3.7e-287], N[((-a) / b), $MachinePrecision], If[LessEqual[y, 5.8e-8], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
t_2 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -2.8 \cdot 10^{-23}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.05 \cdot 10^{-224}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -3.7 \cdot 10^{-287}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{-8}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -2.7999999999999997e-23 or 5.8000000000000003e-8 < y Initial program 57.3%
Taylor expanded in y around inf 57.4%
mul-1-neg57.4%
unsub-neg57.4%
Simplified57.4%
if -2.7999999999999997e-23 < y < -1.05000000000000003e-224 or -3.70000000000000027e-287 < y < 5.8000000000000003e-8Initial program 79.2%
Taylor expanded in t around inf 40.7%
*-commutative40.7%
Simplified40.7%
Taylor expanded in z around inf 50.4%
if -1.05000000000000003e-224 < y < -3.70000000000000027e-287Initial program 94.7%
Taylor expanded in b around inf 84.2%
Taylor expanded in a around inf 65.5%
associate-*r/65.5%
neg-mul-165.5%
Simplified65.5%
Final simplification55.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.04e-22)
(- (/ t (- b y)) (/ a (- b y)))
(if (<= z 62.0)
(+ x (/ (* z (- t a)) (+ y (* z (- b y)))))
(/ (- t a) (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.04e-22) {
tmp = (t / (b - y)) - (a / (b - y));
} else if (z <= 62.0) {
tmp = x + ((z * (t - a)) / (y + (z * (b - y))));
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-1.04d-22)) then
tmp = (t / (b - y)) - (a / (b - y))
else if (z <= 62.0d0) then
tmp = x + ((z * (t - a)) / (y + (z * (b - y))))
else
tmp = (t - a) / (b - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.04e-22) {
tmp = (t / (b - y)) - (a / (b - y));
} else if (z <= 62.0) {
tmp = x + ((z * (t - a)) / (y + (z * (b - y))));
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.04e-22: tmp = (t / (b - y)) - (a / (b - y)) elif z <= 62.0: tmp = x + ((z * (t - a)) / (y + (z * (b - y)))) else: tmp = (t - a) / (b - y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.04e-22) tmp = Float64(Float64(t / Float64(b - y)) - Float64(a / Float64(b - y))); elseif (z <= 62.0) tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / Float64(y + Float64(z * Float64(b - y))))); else tmp = Float64(Float64(t - a) / Float64(b - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.04e-22) tmp = (t / (b - y)) - (a / (b - y)); elseif (z <= 62.0) tmp = x + ((z * (t - a)) / (y + (z * (b - y)))); else tmp = (t - a) / (b - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.04e-22], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 62.0], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.04 \cdot 10^{-22}:\\
\;\;\;\;\frac{t}{b - y} - \frac{a}{b - y}\\
\mathbf{elif}\;z \leq 62:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\end{array}
\end{array}
if z < -1.04e-22Initial program 56.2%
Taylor expanded in z around inf 75.1%
associate--r+75.1%
+-commutative75.1%
associate--l+75.1%
*-commutative75.1%
times-frac80.5%
div-sub80.5%
times-frac90.2%
Simplified90.2%
Taylor expanded in z around inf 81.5%
if -1.04e-22 < z < 62Initial program 88.3%
Taylor expanded in x around 0 88.3%
Taylor expanded in z around 0 83.7%
if 62 < z Initial program 45.6%
Taylor expanded in z around inf 80.3%
Final simplification82.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2e-36) (not (<= z 9.2e-5))) (/ (- 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 <= -2e-36) || !(z <= 9.2e-5)) {
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 <= (-2d-36)) .or. (.not. (z <= 9.2d-5))) 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 <= -2e-36) || !(z <= 9.2e-5)) {
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 <= -2e-36) or not (z <= 9.2e-5): 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 <= -2e-36) || !(z <= 9.2e-5)) 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 <= -2e-36) || ~((z <= 9.2e-5))) 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, -2e-36], N[Not[LessEqual[z, 9.2e-5]], $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 \cdot 10^{-36} \lor \neg \left(z \leq 9.2 \cdot 10^{-5}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\
\end{array}
\end{array}
if z < -1.9999999999999999e-36 or 9.20000000000000001e-5 < z Initial program 52.1%
Taylor expanded in z around inf 81.2%
if -1.9999999999999999e-36 < z < 9.20000000000000001e-5Initial program 88.1%
Taylor expanded in x around 0 88.1%
Taylor expanded in z around 0 83.4%
Taylor expanded in z around 0 72.0%
Final simplification76.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.05e-50) (not (<= z 0.000115))) (/ t b) (+ x (* x z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.05e-50) || !(z <= 0.000115)) {
tmp = t / b;
} else {
tmp = x + (x * z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.05d-50)) .or. (.not. (z <= 0.000115d0))) then
tmp = t / b
else
tmp = x + (x * z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.05e-50) || !(z <= 0.000115)) {
tmp = t / b;
} else {
tmp = x + (x * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.05e-50) or not (z <= 0.000115): tmp = t / b else: tmp = x + (x * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.05e-50) || !(z <= 0.000115)) tmp = Float64(t / b); else tmp = Float64(x + Float64(x * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.05e-50) || ~((z <= 0.000115))) tmp = t / b; else tmp = x + (x * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.05e-50], N[Not[LessEqual[z, 0.000115]], $MachinePrecision]], N[(t / b), $MachinePrecision], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{-50} \lor \neg \left(z \leq 0.000115\right):\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x + x \cdot z\\
\end{array}
\end{array}
if z < -1.05e-50 or 1.15e-4 < z Initial program 53.8%
Taylor expanded in t around inf 25.8%
*-commutative25.8%
Simplified25.8%
Taylor expanded in y around 0 32.6%
if -1.05e-50 < z < 1.15e-4Initial program 87.6%
Taylor expanded in y around inf 53.9%
mul-1-neg53.9%
unsub-neg53.9%
Simplified53.9%
Taylor expanded in z around 0 53.9%
*-commutative53.9%
Simplified53.9%
Final simplification42.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5.6e-52) (not (<= z 1.3e-19))) (/ t (- b y)) (+ x (* x z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.6e-52) || !(z <= 1.3e-19)) {
tmp = t / (b - y);
} else {
tmp = x + (x * z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-5.6d-52)) .or. (.not. (z <= 1.3d-19))) then
tmp = t / (b - y)
else
tmp = x + (x * z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.6e-52) || !(z <= 1.3e-19)) {
tmp = t / (b - y);
} else {
tmp = x + (x * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.6e-52) or not (z <= 1.3e-19): tmp = t / (b - y) else: tmp = x + (x * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.6e-52) || !(z <= 1.3e-19)) tmp = Float64(t / Float64(b - y)); else tmp = Float64(x + Float64(x * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -5.6e-52) || ~((z <= 1.3e-19))) tmp = t / (b - y); else tmp = x + (x * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.6e-52], N[Not[LessEqual[z, 1.3e-19]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.6 \cdot 10^{-52} \lor \neg \left(z \leq 1.3 \cdot 10^{-19}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + x \cdot z\\
\end{array}
\end{array}
if z < -5.59999999999999989e-52 or 1.30000000000000006e-19 < z Initial program 54.5%
Taylor expanded in t around inf 25.4%
*-commutative25.4%
Simplified25.4%
Taylor expanded in z around inf 47.9%
if -5.59999999999999989e-52 < z < 1.30000000000000006e-19Initial program 87.4%
Taylor expanded in y around inf 54.8%
mul-1-neg54.8%
unsub-neg54.8%
Simplified54.8%
Taylor expanded in z around 0 54.8%
*-commutative54.8%
Simplified54.8%
Final simplification51.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.65e-12) (not (<= y 9.8e-14))) (/ 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 <= -2.65e-12) || !(y <= 9.8e-14)) {
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 <= (-2.65d-12)) .or. (.not. (y <= 9.8d-14))) 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 <= -2.65e-12) || !(y <= 9.8e-14)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.65e-12) or not (y <= 9.8e-14): 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 <= -2.65e-12) || !(y <= 9.8e-14)) 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 <= -2.65e-12) || ~((y <= 9.8e-14))) 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, -2.65e-12], N[Not[LessEqual[y, 9.8e-14]], $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 -2.65 \cdot 10^{-12} \lor \neg \left(y \leq 9.8 \cdot 10^{-14}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -2.64999999999999982e-12 or 9.79999999999999989e-14 < y Initial program 57.5%
Taylor expanded in y around inf 58.3%
mul-1-neg58.3%
unsub-neg58.3%
Simplified58.3%
if -2.64999999999999982e-12 < y < 9.79999999999999989e-14Initial program 80.8%
Taylor expanded in y around 0 65.9%
Final simplification62.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -8.6e-42) (not (<= z 4200000000000.0))) (/ a y) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -8.6e-42) || !(z <= 4200000000000.0)) {
tmp = a / y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-8.6d-42)) .or. (.not. (z <= 4200000000000.0d0))) then
tmp = a / y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -8.6e-42) || !(z <= 4200000000000.0)) {
tmp = a / y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -8.6e-42) or not (z <= 4200000000000.0): tmp = a / y else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -8.6e-42) || !(z <= 4200000000000.0)) tmp = Float64(a / y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -8.6e-42) || ~((z <= 4200000000000.0))) tmp = a / y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -8.6e-42], N[Not[LessEqual[z, 4200000000000.0]], $MachinePrecision]], N[(a / y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.6 \cdot 10^{-42} \lor \neg \left(z \leq 4200000000000\right):\\
\;\;\;\;\frac{a}{y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -8.6000000000000002e-42 or 4.2e12 < z Initial program 52.1%
Taylor expanded in z around inf 79.9%
Taylor expanded in t around 0 35.3%
associate-*r/35.3%
neg-mul-135.3%
Simplified35.3%
Taylor expanded in b around 0 14.2%
if -8.6000000000000002e-42 < z < 4.2e12Initial program 88.1%
Taylor expanded in z around 0 51.7%
Final simplification31.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.7e-50) (not (<= z 3.9e-5))) (/ t b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.7e-50) || !(z <= 3.9e-5)) {
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 <= (-1.7d-50)) .or. (.not. (z <= 3.9d-5))) 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 <= -1.7e-50) || !(z <= 3.9e-5)) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.7e-50) or not (z <= 3.9e-5): tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.7e-50) || !(z <= 3.9e-5)) 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 <= -1.7e-50) || ~((z <= 3.9e-5))) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.7e-50], N[Not[LessEqual[z, 3.9e-5]], $MachinePrecision]], N[(t / b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{-50} \lor \neg \left(z \leq 3.9 \cdot 10^{-5}\right):\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.70000000000000007e-50 or 3.8999999999999999e-5 < z Initial program 53.8%
Taylor expanded in t around inf 25.8%
*-commutative25.8%
Simplified25.8%
Taylor expanded in y around 0 32.6%
if -1.70000000000000007e-50 < z < 3.8999999999999999e-5Initial program 87.6%
Taylor expanded in z around 0 53.9%
Final simplification42.2%
(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 69.1%
Taylor expanded in z around 0 26.3%
Final simplification26.3%
(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 2024021
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:herbie-target
(- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))