
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
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 + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\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 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
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 + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0))))
(t_2 (+ (+ a 1.0) (/ y (/ t b)))))
(if (<= t_1 (- INFINITY))
(* z (+ (/ x (* z t_2)) (/ y (* t t_2))))
(if (<= t_1 -2e-315)
t_1
(if (<= t_1 0.0)
(/ (+ (* t (/ x b)) (* y (/ z b))) y)
(if (<= t_1 1e+268)
t_1
(if (<= t_1 INFINITY)
(* (/ y t) (/ z (+ (+ a 1.0) (* b (/ y t)))))
(/ (+ z (* t (/ x y))) b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double t_2 = (a + 1.0) + (y / (t / b));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = z * ((x / (z * t_2)) + (y / (t * t_2)));
} else if (t_1 <= -2e-315) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((t * (x / b)) + (y * (z / b))) / y;
} else if (t_1 <= 1e+268) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (y / t) * (z / ((a + 1.0) + (b * (y / t))));
} else {
tmp = (z + (t * (x / y))) / b;
}
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)) / (((y * b) / t) + (a + 1.0));
double t_2 = (a + 1.0) + (y / (t / b));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = z * ((x / (z * t_2)) + (y / (t * t_2)));
} else if (t_1 <= -2e-315) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((t * (x / b)) + (y * (z / b))) / y;
} else if (t_1 <= 1e+268) {
tmp = t_1;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = (y / t) * (z / ((a + 1.0) + (b * (y / t))));
} else {
tmp = (z + (t * (x / y))) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)) t_2 = (a + 1.0) + (y / (t / b)) tmp = 0 if t_1 <= -math.inf: tmp = z * ((x / (z * t_2)) + (y / (t * t_2))) elif t_1 <= -2e-315: tmp = t_1 elif t_1 <= 0.0: tmp = ((t * (x / b)) + (y * (z / b))) / y elif t_1 <= 1e+268: tmp = t_1 elif t_1 <= math.inf: tmp = (y / t) * (z / ((a + 1.0) + (b * (y / t)))) else: tmp = (z + (t * (x / y))) / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) t_2 = Float64(Float64(a + 1.0) + Float64(y / Float64(t / b))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(z * Float64(Float64(x / Float64(z * t_2)) + Float64(y / Float64(t * t_2)))); elseif (t_1 <= -2e-315) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(t * Float64(x / b)) + Float64(y * Float64(z / b))) / y); elseif (t_1 <= 1e+268) tmp = t_1; elseif (t_1 <= Inf) tmp = Float64(Float64(y / t) * Float64(z / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t))))); else tmp = Float64(Float64(z + Float64(t * Float64(x / y))) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)); t_2 = (a + 1.0) + (y / (t / b)); tmp = 0.0; if (t_1 <= -Inf) tmp = z * ((x / (z * t_2)) + (y / (t * t_2))); elseif (t_1 <= -2e-315) tmp = t_1; elseif (t_1 <= 0.0) tmp = ((t * (x / b)) + (y * (z / b))) / y; elseif (t_1 <= 1e+268) tmp = t_1; elseif (t_1 <= Inf) tmp = (y / t) * (z / ((a + 1.0) + (b * (y / t)))); else tmp = (z + (t * (x / y))) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(z * N[(N[(x / N[(z * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-315], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$1, 1e+268], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[(y / t), $MachinePrecision] * N[(z / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
t_2 := \left(a + 1\right) + \frac{y}{\frac{t}{b}}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;z \cdot \left(\frac{x}{z \cdot t\_2} + \frac{y}{t \cdot t\_2}\right)\\
\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-315}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{t \cdot \frac{x}{b} + y \cdot \frac{z}{b}}{y}\\
\mathbf{elif}\;t\_1 \leq 10^{+268}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 24.4%
associate-/l*62.4%
associate-/l*62.4%
Simplified62.4%
Taylor expanded in z around inf 85.5%
associate-+r+85.5%
associate-*r/85.5%
*-commutative85.5%
associate-/r/85.5%
associate-+r+85.5%
associate-*r/70.6%
*-commutative70.6%
associate-/r/85.4%
Simplified85.4%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -2.0000000019e-315 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.9999999999999997e267Initial program 99.5%
if -2.0000000019e-315 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0Initial program 54.3%
associate-/l*54.2%
associate-/l*69.2%
Simplified69.2%
Taylor expanded in b around inf 58.5%
Taylor expanded in y around 0 77.7%
associate-/l*86.6%
associate-/l*86.7%
Simplified86.7%
if 9.9999999999999997e267 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 36.6%
associate-/l*58.0%
associate-/l*57.8%
Simplified57.8%
clear-num57.9%
un-div-inv57.9%
Applied egg-rr57.9%
associate-/r/62.9%
Applied egg-rr62.9%
Taylor expanded in x around 0 51.8%
times-frac83.6%
associate-+r+83.6%
associate-/l*83.6%
Simplified83.6%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 0.0%
associate-/l*0.7%
associate-/l*14.8%
Simplified14.8%
Taylor expanded in y around -inf 67.1%
+-commutative67.1%
mul-1-neg67.1%
unsub-neg67.1%
distribute-lft-out--67.1%
mul-1-neg67.1%
associate-/l*67.1%
associate-/l*71.7%
distribute-lft-out--71.7%
Simplified71.7%
Taylor expanded in b around inf 81.7%
cancel-sign-sub-inv81.7%
metadata-eval81.7%
*-lft-identity81.7%
Simplified81.7%
associate-/l*91.1%
Applied egg-rr91.1%
Final simplification94.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0)))))
(if (<= t_1 (- INFINITY))
(* y (/ z (* t (+ (+ a 1.0) (/ y (/ t b))))))
(if (<= t_1 -2e-315)
t_1
(if (<= t_1 0.0)
(/ (+ (* t (/ x b)) (* y (/ z b))) y)
(if (<= t_1 1e+268)
t_1
(if (<= t_1 INFINITY)
(* (/ y t) (/ z (+ (+ a 1.0) (* b (/ y t)))))
(/ (+ z (* t (/ x y))) b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = y * (z / (t * ((a + 1.0) + (y / (t / b)))));
} else if (t_1 <= -2e-315) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((t * (x / b)) + (y * (z / b))) / y;
} else if (t_1 <= 1e+268) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (y / t) * (z / ((a + 1.0) + (b * (y / t))));
} else {
tmp = (z + (t * (x / y))) / b;
}
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)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = y * (z / (t * ((a + 1.0) + (y / (t / b)))));
} else if (t_1 <= -2e-315) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((t * (x / b)) + (y * (z / b))) / y;
} else if (t_1 <= 1e+268) {
tmp = t_1;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = (y / t) * (z / ((a + 1.0) + (b * (y / t))));
} else {
tmp = (z + (t * (x / y))) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)) tmp = 0 if t_1 <= -math.inf: tmp = y * (z / (t * ((a + 1.0) + (y / (t / b))))) elif t_1 <= -2e-315: tmp = t_1 elif t_1 <= 0.0: tmp = ((t * (x / b)) + (y * (z / b))) / y elif t_1 <= 1e+268: tmp = t_1 elif t_1 <= math.inf: tmp = (y / t) * (z / ((a + 1.0) + (b * (y / t)))) else: tmp = (z + (t * (x / y))) / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(y * Float64(z / Float64(t * Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))))); elseif (t_1 <= -2e-315) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(t * Float64(x / b)) + Float64(y * Float64(z / b))) / y); elseif (t_1 <= 1e+268) tmp = t_1; elseif (t_1 <= Inf) tmp = Float64(Float64(y / t) * Float64(z / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t))))); else tmp = Float64(Float64(z + Float64(t * Float64(x / y))) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)); tmp = 0.0; if (t_1 <= -Inf) tmp = y * (z / (t * ((a + 1.0) + (y / (t / b))))); elseif (t_1 <= -2e-315) tmp = t_1; elseif (t_1 <= 0.0) tmp = ((t * (x / b)) + (y * (z / b))) / y; elseif (t_1 <= 1e+268) tmp = t_1; elseif (t_1 <= Inf) tmp = (y / t) * (z / ((a + 1.0) + (b * (y / t)))); else tmp = (z + (t * (x / y))) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(y * N[(z / N[(t * N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-315], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$1, 1e+268], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[(y / t), $MachinePrecision] * N[(z / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;y \cdot \frac{z}{t \cdot \left(\left(a + 1\right) + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-315}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{t \cdot \frac{x}{b} + y \cdot \frac{z}{b}}{y}\\
\mathbf{elif}\;t\_1 \leq 10^{+268}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 24.4%
associate-/l*62.4%
associate-/l*62.4%
Simplified62.4%
Taylor expanded in x around 0 56.5%
associate-/l*80.9%
associate-+r+80.9%
associate-*r/66.1%
*-commutative66.1%
associate-/r/80.7%
Simplified80.7%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -2.0000000019e-315 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.9999999999999997e267Initial program 99.5%
if -2.0000000019e-315 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0Initial program 54.3%
associate-/l*54.2%
associate-/l*69.2%
Simplified69.2%
Taylor expanded in b around inf 58.5%
Taylor expanded in y around 0 77.7%
associate-/l*86.6%
associate-/l*86.7%
Simplified86.7%
if 9.9999999999999997e267 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 36.6%
associate-/l*58.0%
associate-/l*57.8%
Simplified57.8%
clear-num57.9%
un-div-inv57.9%
Applied egg-rr57.9%
associate-/r/62.9%
Applied egg-rr62.9%
Taylor expanded in x around 0 51.8%
times-frac83.6%
associate-+r+83.6%
associate-/l*83.6%
Simplified83.6%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 0.0%
associate-/l*0.7%
associate-/l*14.8%
Simplified14.8%
Taylor expanded in y around -inf 67.1%
+-commutative67.1%
mul-1-neg67.1%
unsub-neg67.1%
distribute-lft-out--67.1%
mul-1-neg67.1%
associate-/l*67.1%
associate-/l*71.7%
distribute-lft-out--71.7%
Simplified71.7%
Taylor expanded in b around inf 81.7%
cancel-sign-sub-inv81.7%
metadata-eval81.7%
*-lft-identity81.7%
Simplified81.7%
associate-/l*91.1%
Applied egg-rr91.1%
Final simplification94.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ z (* t (/ x y))) b)))
(if (<= y -1.35e+59)
t_1
(if (<= y -4.5e+23)
(/ (+ x (* z (* y (/ 1.0 t)))) (+ a 1.0))
(if (<= y -120000.0)
(/ (+ z (/ (* x t) y)) b)
(if (<= y 2.5e-25)
(/ (+ x (/ (* y z) t)) (+ a 1.0))
(if (or (<= y 5.6e+28) (not (<= y 6e+179)))
t_1
(/ x (+ (+ a 1.0) (/ y (/ t b)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + (t * (x / y))) / b;
double tmp;
if (y <= -1.35e+59) {
tmp = t_1;
} else if (y <= -4.5e+23) {
tmp = (x + (z * (y * (1.0 / t)))) / (a + 1.0);
} else if (y <= -120000.0) {
tmp = (z + ((x * t) / y)) / b;
} else if (y <= 2.5e-25) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if ((y <= 5.6e+28) || !(y <= 6e+179)) {
tmp = t_1;
} else {
tmp = x / ((a + 1.0) + (y / (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) :: t_1
real(8) :: tmp
t_1 = (z + (t * (x / y))) / b
if (y <= (-1.35d+59)) then
tmp = t_1
else if (y <= (-4.5d+23)) then
tmp = (x + (z * (y * (1.0d0 / t)))) / (a + 1.0d0)
else if (y <= (-120000.0d0)) then
tmp = (z + ((x * t) / y)) / b
else if (y <= 2.5d-25) then
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
else if ((y <= 5.6d+28) .or. (.not. (y <= 6d+179))) then
tmp = t_1
else
tmp = x / ((a + 1.0d0) + (y / (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 t_1 = (z + (t * (x / y))) / b;
double tmp;
if (y <= -1.35e+59) {
tmp = t_1;
} else if (y <= -4.5e+23) {
tmp = (x + (z * (y * (1.0 / t)))) / (a + 1.0);
} else if (y <= -120000.0) {
tmp = (z + ((x * t) / y)) / b;
} else if (y <= 2.5e-25) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if ((y <= 5.6e+28) || !(y <= 6e+179)) {
tmp = t_1;
} else {
tmp = x / ((a + 1.0) + (y / (t / b)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + (t * (x / y))) / b tmp = 0 if y <= -1.35e+59: tmp = t_1 elif y <= -4.5e+23: tmp = (x + (z * (y * (1.0 / t)))) / (a + 1.0) elif y <= -120000.0: tmp = (z + ((x * t) / y)) / b elif y <= 2.5e-25: tmp = (x + ((y * z) / t)) / (a + 1.0) elif (y <= 5.6e+28) or not (y <= 6e+179): tmp = t_1 else: tmp = x / ((a + 1.0) + (y / (t / b))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + Float64(t * Float64(x / y))) / b) tmp = 0.0 if (y <= -1.35e+59) tmp = t_1; elseif (y <= -4.5e+23) tmp = Float64(Float64(x + Float64(z * Float64(y * Float64(1.0 / t)))) / Float64(a + 1.0)); elseif (y <= -120000.0) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); elseif (y <= 2.5e-25) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); elseif ((y <= 5.6e+28) || !(y <= 6e+179)) tmp = t_1; else tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + (t * (x / y))) / b; tmp = 0.0; if (y <= -1.35e+59) tmp = t_1; elseif (y <= -4.5e+23) tmp = (x + (z * (y * (1.0 / t)))) / (a + 1.0); elseif (y <= -120000.0) tmp = (z + ((x * t) / y)) / b; elseif (y <= 2.5e-25) tmp = (x + ((y * z) / t)) / (a + 1.0); elseif ((y <= 5.6e+28) || ~((y <= 6e+179))) tmp = t_1; else tmp = x / ((a + 1.0) + (y / (t / b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -1.35e+59], t$95$1, If[LessEqual[y, -4.5e+23], N[(N[(x + N[(z * N[(y * N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -120000.0], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 2.5e-25], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 5.6e+28], N[Not[LessEqual[y, 6e+179]], $MachinePrecision]], t$95$1, N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z + t \cdot \frac{x}{y}}{b}\\
\mathbf{if}\;y \leq -1.35 \cdot 10^{+59}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4.5 \cdot 10^{+23}:\\
\;\;\;\;\frac{x + z \cdot \left(y \cdot \frac{1}{t}\right)}{a + 1}\\
\mathbf{elif}\;y \leq -120000:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{-25}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{+28} \lor \neg \left(y \leq 6 \cdot 10^{+179}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\end{array}
\end{array}
if y < -1.3500000000000001e59 or 2.49999999999999981e-25 < y < 5.6000000000000003e28 or 5.9999999999999996e179 < y Initial program 44.0%
associate-/l*50.7%
associate-/l*59.8%
Simplified59.8%
Taylor expanded in y around -inf 52.4%
+-commutative52.4%
mul-1-neg52.4%
unsub-neg52.4%
distribute-lft-out--52.4%
mul-1-neg52.4%
associate-/l*56.8%
associate-/l*60.4%
distribute-lft-out--60.4%
Simplified60.4%
Taylor expanded in b around inf 67.9%
cancel-sign-sub-inv67.9%
metadata-eval67.9%
*-lft-identity67.9%
Simplified67.9%
associate-/l*74.3%
Applied egg-rr74.3%
if -1.3500000000000001e59 < y < -4.49999999999999979e23Initial program 83.2%
associate-/l*91.5%
associate-/l*91.5%
Simplified91.5%
Taylor expanded in b around 0 66.9%
associate-*r/75.1%
*-commutative75.1%
div-inv75.1%
associate-*l*75.1%
Applied egg-rr75.1%
if -4.49999999999999979e23 < y < -1.2e5Initial program 51.7%
associate-/l*51.5%
associate-/l*51.7%
Simplified51.7%
Taylor expanded in y around -inf 100.0%
+-commutative100.0%
mul-1-neg100.0%
unsub-neg100.0%
distribute-lft-out--100.0%
mul-1-neg100.0%
associate-/l*77.9%
associate-/l*77.9%
distribute-lft-out--77.9%
Simplified77.9%
Taylor expanded in b around inf 100.0%
cancel-sign-sub-inv100.0%
metadata-eval100.0%
*-lft-identity100.0%
Simplified100.0%
if -1.2e5 < y < 2.49999999999999981e-25Initial program 95.2%
associate-/l*88.7%
associate-/l*86.4%
Simplified86.4%
Taylor expanded in b around 0 81.4%
if 5.6000000000000003e28 < y < 5.9999999999999996e179Initial program 59.3%
associate-/l*77.8%
associate-/l*84.9%
Simplified84.9%
Taylor expanded in x around inf 59.5%
associate-+r+59.5%
associate-*r/62.8%
*-commutative62.8%
associate-/r/63.0%
Simplified63.0%
Final simplification77.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ z (* t (/ x y))) b)))
(if (<= y -3.8e+57)
t_1
(if (<= y -2.3e+21)
(/ (+ x (* z (/ y t))) (+ a 1.0))
(if (<= y -1900.0)
(/ (+ z (/ (* x t) y)) b)
(if (<= y 2.5e-25)
(/ (+ x (/ (* y z) t)) (+ a 1.0))
(if (or (<= y 1.22e+26) (not (<= y 6e+179)))
t_1
(/ x (+ (+ a 1.0) (/ y (/ t b)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + (t * (x / y))) / b;
double tmp;
if (y <= -3.8e+57) {
tmp = t_1;
} else if (y <= -2.3e+21) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if (y <= -1900.0) {
tmp = (z + ((x * t) / y)) / b;
} else if (y <= 2.5e-25) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if ((y <= 1.22e+26) || !(y <= 6e+179)) {
tmp = t_1;
} else {
tmp = x / ((a + 1.0) + (y / (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) :: t_1
real(8) :: tmp
t_1 = (z + (t * (x / y))) / b
if (y <= (-3.8d+57)) then
tmp = t_1
else if (y <= (-2.3d+21)) then
tmp = (x + (z * (y / t))) / (a + 1.0d0)
else if (y <= (-1900.0d0)) then
tmp = (z + ((x * t) / y)) / b
else if (y <= 2.5d-25) then
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
else if ((y <= 1.22d+26) .or. (.not. (y <= 6d+179))) then
tmp = t_1
else
tmp = x / ((a + 1.0d0) + (y / (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 t_1 = (z + (t * (x / y))) / b;
double tmp;
if (y <= -3.8e+57) {
tmp = t_1;
} else if (y <= -2.3e+21) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if (y <= -1900.0) {
tmp = (z + ((x * t) / y)) / b;
} else if (y <= 2.5e-25) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if ((y <= 1.22e+26) || !(y <= 6e+179)) {
tmp = t_1;
} else {
tmp = x / ((a + 1.0) + (y / (t / b)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + (t * (x / y))) / b tmp = 0 if y <= -3.8e+57: tmp = t_1 elif y <= -2.3e+21: tmp = (x + (z * (y / t))) / (a + 1.0) elif y <= -1900.0: tmp = (z + ((x * t) / y)) / b elif y <= 2.5e-25: tmp = (x + ((y * z) / t)) / (a + 1.0) elif (y <= 1.22e+26) or not (y <= 6e+179): tmp = t_1 else: tmp = x / ((a + 1.0) + (y / (t / b))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + Float64(t * Float64(x / y))) / b) tmp = 0.0 if (y <= -3.8e+57) tmp = t_1; elseif (y <= -2.3e+21) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); elseif (y <= -1900.0) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); elseif (y <= 2.5e-25) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); elseif ((y <= 1.22e+26) || !(y <= 6e+179)) tmp = t_1; else tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + (t * (x / y))) / b; tmp = 0.0; if (y <= -3.8e+57) tmp = t_1; elseif (y <= -2.3e+21) tmp = (x + (z * (y / t))) / (a + 1.0); elseif (y <= -1900.0) tmp = (z + ((x * t) / y)) / b; elseif (y <= 2.5e-25) tmp = (x + ((y * z) / t)) / (a + 1.0); elseif ((y <= 1.22e+26) || ~((y <= 6e+179))) tmp = t_1; else tmp = x / ((a + 1.0) + (y / (t / b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -3.8e+57], t$95$1, If[LessEqual[y, -2.3e+21], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1900.0], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 2.5e-25], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 1.22e+26], N[Not[LessEqual[y, 6e+179]], $MachinePrecision]], t$95$1, N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z + t \cdot \frac{x}{y}}{b}\\
\mathbf{if}\;y \leq -3.8 \cdot 10^{+57}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.3 \cdot 10^{+21}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{elif}\;y \leq -1900:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{-25}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{elif}\;y \leq 1.22 \cdot 10^{+26} \lor \neg \left(y \leq 6 \cdot 10^{+179}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\end{array}
\end{array}
if y < -3.7999999999999999e57 or 2.49999999999999981e-25 < y < 1.2200000000000001e26 or 5.9999999999999996e179 < y Initial program 44.0%
associate-/l*50.7%
associate-/l*59.8%
Simplified59.8%
Taylor expanded in y around -inf 52.4%
+-commutative52.4%
mul-1-neg52.4%
unsub-neg52.4%
distribute-lft-out--52.4%
mul-1-neg52.4%
associate-/l*56.8%
associate-/l*60.4%
distribute-lft-out--60.4%
Simplified60.4%
Taylor expanded in b around inf 67.9%
cancel-sign-sub-inv67.9%
metadata-eval67.9%
*-lft-identity67.9%
Simplified67.9%
associate-/l*74.3%
Applied egg-rr74.3%
if -3.7999999999999999e57 < y < -2.3e21Initial program 83.2%
associate-/l*91.5%
associate-/l*91.5%
Simplified91.5%
Taylor expanded in b around 0 66.9%
*-commutative83.2%
associate-/l*91.3%
Applied egg-rr75.0%
if -2.3e21 < y < -1900Initial program 51.7%
associate-/l*51.5%
associate-/l*51.7%
Simplified51.7%
Taylor expanded in y around -inf 100.0%
+-commutative100.0%
mul-1-neg100.0%
unsub-neg100.0%
distribute-lft-out--100.0%
mul-1-neg100.0%
associate-/l*77.9%
associate-/l*77.9%
distribute-lft-out--77.9%
Simplified77.9%
Taylor expanded in b around inf 100.0%
cancel-sign-sub-inv100.0%
metadata-eval100.0%
*-lft-identity100.0%
Simplified100.0%
if -1900 < y < 2.49999999999999981e-25Initial program 95.2%
associate-/l*88.7%
associate-/l*86.4%
Simplified86.4%
Taylor expanded in b around 0 81.4%
if 1.2200000000000001e26 < y < 5.9999999999999996e179Initial program 59.3%
associate-/l*77.8%
associate-/l*84.9%
Simplified84.9%
Taylor expanded in x around inf 59.5%
associate-+r+59.5%
associate-*r/62.8%
*-commutative62.8%
associate-/r/63.0%
Simplified63.0%
Final simplification77.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t)))))
(t_2 (/ (+ z (/ (* x t) y)) b)))
(if (<= t -5.4e-101)
t_1
(if (<= t -7.6e-295)
t_2
(if (<= t 1.5e-276)
(/ (* y z) (* t (+ 1.0 (+ a (/ (* y b) t)))))
(if (<= t 2.25e-235) t_2 t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
double t_2 = (z + ((x * t) / y)) / b;
double tmp;
if (t <= -5.4e-101) {
tmp = t_1;
} else if (t <= -7.6e-295) {
tmp = t_2;
} else if (t <= 1.5e-276) {
tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
} else if (t <= 2.25e-235) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
t_2 = (z + ((x * t) / y)) / b
if (t <= (-5.4d-101)) then
tmp = t_1
else if (t <= (-7.6d-295)) then
tmp = t_2
else if (t <= 1.5d-276) then
tmp = (y * z) / (t * (1.0d0 + (a + ((y * b) / t))))
else if (t <= 2.25d-235) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
double t_2 = (z + ((x * t) / y)) / b;
double tmp;
if (t <= -5.4e-101) {
tmp = t_1;
} else if (t <= -7.6e-295) {
tmp = t_2;
} else if (t <= 1.5e-276) {
tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
} else if (t <= 2.25e-235) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) t_2 = (z + ((x * t) / y)) / b tmp = 0 if t <= -5.4e-101: tmp = t_1 elif t <= -7.6e-295: tmp = t_2 elif t <= 1.5e-276: tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t)))) elif t <= 2.25e-235: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))) t_2 = Float64(Float64(z + Float64(Float64(x * t) / y)) / b) tmp = 0.0 if (t <= -5.4e-101) tmp = t_1; elseif (t <= -7.6e-295) tmp = t_2; elseif (t <= 1.5e-276) tmp = Float64(Float64(y * z) / Float64(t * Float64(1.0 + Float64(a + Float64(Float64(y * b) / t))))); elseif (t <= 2.25e-235) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); t_2 = (z + ((x * t) / y)) / b; tmp = 0.0; if (t <= -5.4e-101) tmp = t_1; elseif (t <= -7.6e-295) tmp = t_2; elseif (t <= 1.5e-276) tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t)))); elseif (t <= 2.25e-235) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[t, -5.4e-101], t$95$1, If[LessEqual[t, -7.6e-295], t$95$2, If[LessEqual[t, 1.5e-276], N[(N[(y * z), $MachinePrecision] / N[(t * N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.25e-235], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
t_2 := \frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{if}\;t \leq -5.4 \cdot 10^{-101}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -7.6 \cdot 10^{-295}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{-276}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{y \cdot b}{t}\right)\right)}\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{-235}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.4000000000000003e-101 or 2.2499999999999999e-235 < t Initial program 77.5%
associate-/l*81.3%
associate-/l*85.6%
Simplified85.6%
if -5.4000000000000003e-101 < t < -7.60000000000000037e-295 or 1.49999999999999994e-276 < t < 2.2499999999999999e-235Initial program 54.6%
associate-/l*46.5%
associate-/l*41.9%
Simplified41.9%
Taylor expanded in y around -inf 66.8%
+-commutative66.8%
mul-1-neg66.8%
unsub-neg66.8%
distribute-lft-out--66.8%
mul-1-neg66.8%
associate-/l*66.8%
associate-/l*64.7%
distribute-lft-out--64.7%
Simplified64.7%
Taylor expanded in b around inf 81.7%
cancel-sign-sub-inv81.7%
metadata-eval81.7%
*-lft-identity81.7%
Simplified81.7%
if -7.60000000000000037e-295 < t < 1.49999999999999994e-276Initial program 71.4%
associate-/l*61.5%
associate-/l*61.5%
Simplified61.5%
Taylor expanded in x around 0 80.5%
Final simplification84.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ z (* t (/ x y))) b)))
(if (<= y -3.4e+59)
t_1
(if (<= y 2.4e-23)
(/ (+ x (* z (/ y t))) (+ (/ (* y b) t) (+ a 1.0)))
(if (<= y 8e+25)
t_1
(/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + (t * (x / y))) / b;
double tmp;
if (y <= -3.4e+59) {
tmp = t_1;
} else if (y <= 2.4e-23) {
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0));
} else if (y <= 8e+25) {
tmp = t_1;
} else {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
}
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 = (z + (t * (x / y))) / b
if (y <= (-3.4d+59)) then
tmp = t_1
else if (y <= 2.4d-23) then
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0d0))
else if (y <= 8d+25) then
tmp = t_1
else
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + (t * (x / y))) / b;
double tmp;
if (y <= -3.4e+59) {
tmp = t_1;
} else if (y <= 2.4e-23) {
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0));
} else if (y <= 8e+25) {
tmp = t_1;
} else {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + (t * (x / y))) / b tmp = 0 if y <= -3.4e+59: tmp = t_1 elif y <= 2.4e-23: tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0)) elif y <= 8e+25: tmp = t_1 else: tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + Float64(t * Float64(x / y))) / b) tmp = 0.0 if (y <= -3.4e+59) tmp = t_1; elseif (y <= 2.4e-23) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))); elseif (y <= 8e+25) tmp = t_1; else tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + (t * (x / y))) / b; tmp = 0.0; if (y <= -3.4e+59) tmp = t_1; elseif (y <= 2.4e-23) tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0)); elseif (y <= 8e+25) tmp = t_1; else tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -3.4e+59], t$95$1, If[LessEqual[y, 2.4e-23], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e+25], t$95$1, N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z + t \cdot \frac{x}{y}}{b}\\
\mathbf{if}\;y \leq -3.4 \cdot 10^{+59}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{-23}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{elif}\;y \leq 8 \cdot 10^{+25}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\end{array}
\end{array}
if y < -3.40000000000000006e59 or 2.39999999999999996e-23 < y < 8.00000000000000072e25Initial program 42.8%
associate-/l*48.9%
associate-/l*56.6%
Simplified56.6%
Taylor expanded in y around -inf 56.1%
+-commutative56.1%
mul-1-neg56.1%
unsub-neg56.1%
distribute-lft-out--56.1%
mul-1-neg56.1%
associate-/l*60.5%
associate-/l*62.1%
distribute-lft-out--62.1%
Simplified62.1%
Taylor expanded in b around inf 71.8%
cancel-sign-sub-inv71.8%
metadata-eval71.8%
*-lft-identity71.8%
Simplified71.8%
associate-/l*77.4%
Applied egg-rr77.4%
if -3.40000000000000006e59 < y < 2.39999999999999996e-23Initial program 93.1%
*-commutative93.1%
associate-/l*93.6%
Applied egg-rr93.6%
if 8.00000000000000072e25 < y Initial program 50.8%
associate-/l*65.6%
associate-/l*76.1%
Simplified76.1%
Final simplification86.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ z (* t (/ x y))) b)))
(if (<= y -9.8e+58)
t_1
(if (<= y 2.5e-25)
(/ (+ x (* z (/ y t))) (+ a 1.0))
(if (or (<= y 2.45e+38) (not (<= y 6e+179)))
t_1
(/ x (+ (+ a 1.0) (/ y (/ t b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + (t * (x / y))) / b;
double tmp;
if (y <= -9.8e+58) {
tmp = t_1;
} else if (y <= 2.5e-25) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if ((y <= 2.45e+38) || !(y <= 6e+179)) {
tmp = t_1;
} else {
tmp = x / ((a + 1.0) + (y / (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) :: t_1
real(8) :: tmp
t_1 = (z + (t * (x / y))) / b
if (y <= (-9.8d+58)) then
tmp = t_1
else if (y <= 2.5d-25) then
tmp = (x + (z * (y / t))) / (a + 1.0d0)
else if ((y <= 2.45d+38) .or. (.not. (y <= 6d+179))) then
tmp = t_1
else
tmp = x / ((a + 1.0d0) + (y / (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 t_1 = (z + (t * (x / y))) / b;
double tmp;
if (y <= -9.8e+58) {
tmp = t_1;
} else if (y <= 2.5e-25) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if ((y <= 2.45e+38) || !(y <= 6e+179)) {
tmp = t_1;
} else {
tmp = x / ((a + 1.0) + (y / (t / b)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + (t * (x / y))) / b tmp = 0 if y <= -9.8e+58: tmp = t_1 elif y <= 2.5e-25: tmp = (x + (z * (y / t))) / (a + 1.0) elif (y <= 2.45e+38) or not (y <= 6e+179): tmp = t_1 else: tmp = x / ((a + 1.0) + (y / (t / b))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + Float64(t * Float64(x / y))) / b) tmp = 0.0 if (y <= -9.8e+58) tmp = t_1; elseif (y <= 2.5e-25) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); elseif ((y <= 2.45e+38) || !(y <= 6e+179)) tmp = t_1; else tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + (t * (x / y))) / b; tmp = 0.0; if (y <= -9.8e+58) tmp = t_1; elseif (y <= 2.5e-25) tmp = (x + (z * (y / t))) / (a + 1.0); elseif ((y <= 2.45e+38) || ~((y <= 6e+179))) tmp = t_1; else tmp = x / ((a + 1.0) + (y / (t / b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -9.8e+58], t$95$1, If[LessEqual[y, 2.5e-25], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 2.45e+38], N[Not[LessEqual[y, 6e+179]], $MachinePrecision]], t$95$1, N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z + t \cdot \frac{x}{y}}{b}\\
\mathbf{if}\;y \leq -9.8 \cdot 10^{+58}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{-25}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{elif}\;y \leq 2.45 \cdot 10^{+38} \lor \neg \left(y \leq 6 \cdot 10^{+179}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\end{array}
\end{array}
if y < -9.80000000000000037e58 or 2.49999999999999981e-25 < y < 2.45000000000000001e38 or 5.9999999999999996e179 < y Initial program 44.0%
associate-/l*50.7%
associate-/l*59.8%
Simplified59.8%
Taylor expanded in y around -inf 52.4%
+-commutative52.4%
mul-1-neg52.4%
unsub-neg52.4%
distribute-lft-out--52.4%
mul-1-neg52.4%
associate-/l*56.8%
associate-/l*60.4%
distribute-lft-out--60.4%
Simplified60.4%
Taylor expanded in b around inf 67.9%
cancel-sign-sub-inv67.9%
metadata-eval67.9%
*-lft-identity67.9%
Simplified67.9%
associate-/l*74.3%
Applied egg-rr74.3%
if -9.80000000000000037e58 < y < 2.49999999999999981e-25Initial program 93.0%
associate-/l*87.9%
associate-/l*85.9%
Simplified85.9%
Taylor expanded in b around 0 78.1%
*-commutative93.0%
associate-/l*93.5%
Applied egg-rr78.4%
if 2.45000000000000001e38 < y < 5.9999999999999996e179Initial program 59.3%
associate-/l*77.8%
associate-/l*84.9%
Simplified84.9%
Taylor expanded in x around inf 59.5%
associate-+r+59.5%
associate-*r/62.8%
*-commutative62.8%
associate-/r/63.0%
Simplified63.0%
Final simplification75.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ z (* t (/ x y))) b)))
(if (<= y -2.3e-12)
t_1
(if (<= y -3.1e-155)
(/ (+ x (/ (* y z) t)) a)
(if (<= y 3e-36) (/ x (+ a 1.0)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + (t * (x / y))) / b;
double tmp;
if (y <= -2.3e-12) {
tmp = t_1;
} else if (y <= -3.1e-155) {
tmp = (x + ((y * z) / t)) / a;
} else if (y <= 3e-36) {
tmp = x / (a + 1.0);
} 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 = (z + (t * (x / y))) / b
if (y <= (-2.3d-12)) then
tmp = t_1
else if (y <= (-3.1d-155)) then
tmp = (x + ((y * z) / t)) / a
else if (y <= 3d-36) then
tmp = x / (a + 1.0d0)
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 = (z + (t * (x / y))) / b;
double tmp;
if (y <= -2.3e-12) {
tmp = t_1;
} else if (y <= -3.1e-155) {
tmp = (x + ((y * z) / t)) / a;
} else if (y <= 3e-36) {
tmp = x / (a + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + (t * (x / y))) / b tmp = 0 if y <= -2.3e-12: tmp = t_1 elif y <= -3.1e-155: tmp = (x + ((y * z) / t)) / a elif y <= 3e-36: tmp = x / (a + 1.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + Float64(t * Float64(x / y))) / b) tmp = 0.0 if (y <= -2.3e-12) tmp = t_1; elseif (y <= -3.1e-155) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / a); elseif (y <= 3e-36) tmp = Float64(x / Float64(a + 1.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + (t * (x / y))) / b; tmp = 0.0; if (y <= -2.3e-12) tmp = t_1; elseif (y <= -3.1e-155) tmp = (x + ((y * z) / t)) / a; elseif (y <= 3e-36) tmp = x / (a + 1.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -2.3e-12], t$95$1, If[LessEqual[y, -3.1e-155], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 3e-36], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z + t \cdot \frac{x}{y}}{b}\\
\mathbf{if}\;y \leq -2.3 \cdot 10^{-12}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.1 \cdot 10^{-155}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-36}:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.29999999999999989e-12 or 3.0000000000000002e-36 < y Initial program 53.6%
associate-/l*62.1%
associate-/l*69.1%
Simplified69.1%
Taylor expanded in y around -inf 47.7%
+-commutative47.7%
mul-1-neg47.7%
unsub-neg47.7%
distribute-lft-out--47.7%
mul-1-neg47.7%
associate-/l*49.2%
associate-/l*52.2%
distribute-lft-out--52.3%
Simplified52.3%
Taylor expanded in b around inf 58.8%
cancel-sign-sub-inv58.8%
metadata-eval58.8%
*-lft-identity58.8%
Simplified58.8%
associate-/l*62.8%
Applied egg-rr62.8%
if -2.29999999999999989e-12 < y < -3.1e-155Initial program 99.8%
associate-/l*96.4%
associate-/l*96.5%
Simplified96.5%
Taylor expanded in a around inf 65.4%
if -3.1e-155 < y < 3.0000000000000002e-36Initial program 94.4%
associate-/l*86.3%
associate-/l*83.0%
Simplified83.0%
Taylor expanded in y around 0 68.2%
Final simplification65.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -0.0017) (not (<= t 2e-105))) (/ x (+ 1.0 (+ a (* b (/ y t))))) (/ (+ z (/ (* x t) y)) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -0.0017) || !(t <= 2e-105)) {
tmp = x / (1.0 + (a + (b * (y / t))));
} else {
tmp = (z + ((x * t) / y)) / 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 ((t <= (-0.0017d0)) .or. (.not. (t <= 2d-105))) then
tmp = x / (1.0d0 + (a + (b * (y / t))))
else
tmp = (z + ((x * t) / y)) / 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 ((t <= -0.0017) || !(t <= 2e-105)) {
tmp = x / (1.0 + (a + (b * (y / t))));
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -0.0017) or not (t <= 2e-105): tmp = x / (1.0 + (a + (b * (y / t)))) else: tmp = (z + ((x * t) / y)) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -0.0017) || !(t <= 2e-105)) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(b * Float64(y / t))))); else tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -0.0017) || ~((t <= 2e-105))) tmp = x / (1.0 + (a + (b * (y / t)))); else tmp = (z + ((x * t) / y)) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -0.0017], N[Not[LessEqual[t, 2e-105]], $MachinePrecision]], N[(x / N[(1.0 + N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.0017 \lor \neg \left(t \leq 2 \cdot 10^{-105}\right):\\
\;\;\;\;\frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\end{array}
\end{array}
if t < -0.00169999999999999991 or 1.99999999999999993e-105 < t Initial program 77.6%
associate-/l*84.6%
associate-/l*91.0%
Simplified91.0%
clear-num91.0%
un-div-inv91.0%
Applied egg-rr91.0%
Taylor expanded in x around inf 63.6%
associate-/l*67.4%
Simplified67.4%
if -0.00169999999999999991 < t < 1.99999999999999993e-105Initial program 67.1%
associate-/l*60.0%
associate-/l*57.2%
Simplified57.2%
Taylor expanded in y around -inf 53.2%
+-commutative53.2%
mul-1-neg53.2%
unsub-neg53.2%
distribute-lft-out--53.2%
mul-1-neg53.2%
associate-/l*53.1%
associate-/l*52.2%
distribute-lft-out--52.2%
Simplified52.2%
Taylor expanded in b around inf 65.1%
cancel-sign-sub-inv65.1%
metadata-eval65.1%
*-lft-identity65.1%
Simplified65.1%
Final simplification66.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -0.0065)
(/ x (+ 1.0 (+ a (* b (/ y t)))))
(if (<= t 2.25e-105)
(/ (+ z (/ (* x t) y)) b)
(/ x (+ (+ a 1.0) (/ y (/ t b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -0.0065) {
tmp = x / (1.0 + (a + (b * (y / t))));
} else if (t <= 2.25e-105) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = x / ((a + 1.0) + (y / (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 (t <= (-0.0065d0)) then
tmp = x / (1.0d0 + (a + (b * (y / t))))
else if (t <= 2.25d-105) then
tmp = (z + ((x * t) / y)) / b
else
tmp = x / ((a + 1.0d0) + (y / (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 (t <= -0.0065) {
tmp = x / (1.0 + (a + (b * (y / t))));
} else if (t <= 2.25e-105) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = x / ((a + 1.0) + (y / (t / b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -0.0065: tmp = x / (1.0 + (a + (b * (y / t)))) elif t <= 2.25e-105: tmp = (z + ((x * t) / y)) / b else: tmp = x / ((a + 1.0) + (y / (t / b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -0.0065) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(b * Float64(y / t))))); elseif (t <= 2.25e-105) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); else tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -0.0065) tmp = x / (1.0 + (a + (b * (y / t)))); elseif (t <= 2.25e-105) tmp = (z + ((x * t) / y)) / b; else tmp = x / ((a + 1.0) + (y / (t / b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -0.0065], N[(x / N[(1.0 + N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.25e-105], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.0065:\\
\;\;\;\;\frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{-105}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\end{array}
\end{array}
if t < -0.0064999999999999997Initial program 72.7%
associate-/l*84.2%
associate-/l*95.6%
Simplified95.6%
clear-num95.5%
un-div-inv95.6%
Applied egg-rr95.6%
Taylor expanded in x around inf 60.7%
associate-/l*66.3%
Simplified66.3%
if -0.0064999999999999997 < t < 2.2499999999999999e-105Initial program 67.1%
associate-/l*60.0%
associate-/l*57.2%
Simplified57.2%
Taylor expanded in y around -inf 53.2%
+-commutative53.2%
mul-1-neg53.2%
unsub-neg53.2%
distribute-lft-out--53.2%
mul-1-neg53.2%
associate-/l*53.1%
associate-/l*52.2%
distribute-lft-out--52.2%
Simplified52.2%
Taylor expanded in b around inf 65.1%
cancel-sign-sub-inv65.1%
metadata-eval65.1%
*-lft-identity65.1%
Simplified65.1%
if 2.2499999999999999e-105 < t Initial program 81.5%
associate-/l*84.9%
associate-/l*87.3%
Simplified87.3%
Taylor expanded in x around inf 65.9%
associate-+r+65.9%
associate-*r/68.2%
*-commutative68.2%
associate-/r/68.2%
Simplified68.2%
Final simplification66.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -380000.0)
(/ z b)
(if (<= y -3.1e-155)
(/ (+ x (/ (* y z) t)) a)
(if (<= y 1.22e-23) (/ x (+ a 1.0)) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -380000.0) {
tmp = z / b;
} else if (y <= -3.1e-155) {
tmp = (x + ((y * z) / t)) / a;
} else if (y <= 1.22e-23) {
tmp = x / (a + 1.0);
} else {
tmp = 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 (y <= (-380000.0d0)) then
tmp = z / b
else if (y <= (-3.1d-155)) then
tmp = (x + ((y * z) / t)) / a
else if (y <= 1.22d-23) then
tmp = x / (a + 1.0d0)
else
tmp = 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 (y <= -380000.0) {
tmp = z / b;
} else if (y <= -3.1e-155) {
tmp = (x + ((y * z) / t)) / a;
} else if (y <= 1.22e-23) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -380000.0: tmp = z / b elif y <= -3.1e-155: tmp = (x + ((y * z) / t)) / a elif y <= 1.22e-23: tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -380000.0) tmp = Float64(z / b); elseif (y <= -3.1e-155) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / a); elseif (y <= 1.22e-23) tmp = Float64(x / Float64(a + 1.0)); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -380000.0) tmp = z / b; elseif (y <= -3.1e-155) tmp = (x + ((y * z) / t)) / a; elseif (y <= 1.22e-23) tmp = x / (a + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -380000.0], N[(z / b), $MachinePrecision], If[LessEqual[y, -3.1e-155], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 1.22e-23], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -380000:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -3.1 \cdot 10^{-155}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\
\mathbf{elif}\;y \leq 1.22 \cdot 10^{-23}:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -3.8e5 or 1.22000000000000007e-23 < y Initial program 50.3%
associate-/l*59.5%
associate-/l*67.2%
Simplified67.2%
Taylor expanded in y around inf 52.6%
if -3.8e5 < y < -3.1e-155Initial program 99.8%
associate-/l*97.0%
associate-/l*97.1%
Simplified97.1%
Taylor expanded in a around inf 60.1%
if -3.1e-155 < y < 1.22000000000000007e-23Initial program 93.7%
associate-/l*86.0%
associate-/l*82.9%
Simplified82.9%
Taylor expanded in y around 0 65.9%
Final simplification58.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.45e+33) (not (<= y 8e-24))) (/ z b) (/ x (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.45e+33) || !(y <= 8e-24)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
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.45d+33)) .or. (.not. (y <= 8d-24))) then
tmp = z / b
else
tmp = x / (a + 1.0d0)
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.45e+33) || !(y <= 8e-24)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.45e+33) or not (y <= 8e-24): tmp = z / b else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.45e+33) || !(y <= 8e-24)) tmp = Float64(z / b); else tmp = Float64(x / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.45e+33) || ~((y <= 8e-24))) tmp = z / b; else tmp = x / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.45e+33], N[Not[LessEqual[y, 8e-24]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+33} \lor \neg \left(y \leq 8 \cdot 10^{-24}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -1.45000000000000012e33 or 7.99999999999999939e-24 < y Initial program 48.5%
associate-/l*58.4%
associate-/l*66.6%
Simplified66.6%
Taylor expanded in y around inf 54.2%
if -1.45000000000000012e33 < y < 7.99999999999999939e-24Initial program 94.1%
associate-/l*88.1%
associate-/l*86.0%
Simplified86.0%
Taylor expanded in y around 0 58.4%
Final simplification56.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -5e+62) (not (<= a 2.2e+102))) (/ x a) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -5e+62) || !(a <= 2.2e+102)) {
tmp = x / a;
} else {
tmp = 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 ((a <= (-5d+62)) .or. (.not. (a <= 2.2d+102))) then
tmp = x / a
else
tmp = 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 ((a <= -5e+62) || !(a <= 2.2e+102)) {
tmp = x / a;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -5e+62) or not (a <= 2.2e+102): tmp = x / a else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -5e+62) || !(a <= 2.2e+102)) tmp = Float64(x / a); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -5e+62) || ~((a <= 2.2e+102))) tmp = x / a; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -5e+62], N[Not[LessEqual[a, 2.2e+102]], $MachinePrecision]], N[(x / a), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5 \cdot 10^{+62} \lor \neg \left(a \leq 2.2 \cdot 10^{+102}\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if a < -5.00000000000000029e62 or 2.20000000000000007e102 < a Initial program 77.7%
associate-/l*79.7%
associate-/l*82.4%
Simplified82.4%
clear-num82.4%
un-div-inv82.4%
Applied egg-rr82.4%
associate-/r/80.6%
Applied egg-rr80.6%
Taylor expanded in x around inf 63.3%
associate-+r+63.3%
associate-/l*64.3%
Simplified64.3%
Taylor expanded in a around inf 58.3%
if -5.00000000000000029e62 < a < 2.20000000000000007e102Initial program 70.4%
associate-/l*71.2%
associate-/l*73.6%
Simplified73.6%
Taylor expanded in y around inf 39.4%
Final simplification46.8%
(FPCore (x y z t a b) :precision binary64 (/ x a))
double code(double x, double y, double z, double t, double a, double b) {
return x / a;
}
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 / a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / a;
}
def code(x, y, z, t, a, b): return x / a
function code(x, y, z, t, a, b) return Float64(x / a) end
function tmp = code(x, y, z, t, a, b) tmp = x / a; end
code[x_, y_, z_, t_, a_, b_] := N[(x / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{a}
\end{array}
Initial program 73.3%
associate-/l*74.5%
associate-/l*77.1%
Simplified77.1%
clear-num77.1%
un-div-inv77.6%
Applied egg-rr77.6%
associate-/r/76.2%
Applied egg-rr76.2%
Taylor expanded in x around inf 51.1%
associate-+r+51.1%
associate-/l*53.4%
Simplified53.4%
Taylor expanded in a around inf 27.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(if (< t -1.3659085366310088e-271)
t_1
(if (< t 3.036967103737246e-130) (/ z b) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 * ((x + ((y / t) * z)) * (1.0d0 / ((a + 1.0d0) + ((y / t) * b))))
if (t < (-1.3659085366310088d-271)) then
tmp = t_1
else if (t < 3.036967103737246d-130) then
tmp = z / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))) tmp = 0 if t < -1.3659085366310088e-271: tmp = t_1 elif t < 3.036967103737246e-130: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.0 * Float64(Float64(x + Float64(Float64(y / t) * z)) * Float64(1.0 / Float64(Float64(a + 1.0) + Float64(Float64(y / t) * b))))) tmp = 0.0 if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))); tmp = 0.0; if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 * N[(N[(x + N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.3659085366310088e-271], t$95$1, If[Less[t, 3.036967103737246e-130], N[(z / b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 \cdot \left(\left(x + \frac{y}{t} \cdot z\right) \cdot \frac{1}{\left(a + 1\right) + \frac{y}{t} \cdot b}\right)\\
\mathbf{if}\;t < -1.3659085366310088 \cdot 10^{-271}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t < 3.036967103737246 \cdot 10^{-130}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024098
(FPCore (x y z t a b)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:alt
(if (< t -1.3659085366310088e-271) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b))))) (if (< t 3.036967103737246e-130) (/ z b) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))