
(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 23 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 (/ (* y b) t))
(t_2 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) t_1)))
(t_3 (+ 1.0 (+ a t_1))))
(if (<= t_2 (- INFINITY))
(* z (+ (/ x (* z t_3)) (/ y (* t t_3))))
(if (<= t_2 1e+216)
t_2
(+ (/ x (* a (+ (+ 1.0 (/ 1.0 a)) (* b (/ y (* t a)))))) (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1);
double t_3 = 1.0 + (a + t_1);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = z * ((x / (z * t_3)) + (y / (t * t_3)));
} else if (t_2 <= 1e+216) {
tmp = t_2;
} else {
tmp = (x / (a * ((1.0 + (1.0 / a)) + (b * (y / (t * a)))))) + (z / b);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1);
double t_3 = 1.0 + (a + t_1);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = z * ((x / (z * t_3)) + (y / (t * t_3)));
} else if (t_2 <= 1e+216) {
tmp = t_2;
} else {
tmp = (x / (a * ((1.0 + (1.0 / a)) + (b * (y / (t * a)))))) + (z / b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1) t_3 = 1.0 + (a + t_1) tmp = 0 if t_2 <= -math.inf: tmp = z * ((x / (z * t_3)) + (y / (t * t_3))) elif t_2 <= 1e+216: tmp = t_2 else: tmp = (x / (a * ((1.0 + (1.0 / a)) + (b * (y / (t * a)))))) + (z / b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + t_1)) t_3 = Float64(1.0 + Float64(a + t_1)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(z * Float64(Float64(x / Float64(z * t_3)) + Float64(y / Float64(t * t_3)))); elseif (t_2 <= 1e+216) tmp = t_2; else tmp = Float64(Float64(x / Float64(a * Float64(Float64(1.0 + Float64(1.0 / a)) + Float64(b * Float64(y / Float64(t * a)))))) + Float64(z / b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * b) / t; t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1); t_3 = 1.0 + (a + t_1); tmp = 0.0; if (t_2 <= -Inf) tmp = z * ((x / (z * t_3)) + (y / (t * t_3))); elseif (t_2 <= 1e+216) tmp = t_2; else tmp = (x / (a * ((1.0 + (1.0 / a)) + (b * (y / (t * a)))))) + (z / b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(z * N[(N[(x / N[(z * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+216], t$95$2, N[(N[(x / N[(a * N[(N[(1.0 + N[(1.0 / a), $MachinePrecision]), $MachinePrecision] + N[(b * N[(y / N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z / b), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + t\_1}\\
t_3 := 1 + \left(a + t\_1\right)\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;z \cdot \left(\frac{x}{z \cdot t\_3} + \frac{y}{t \cdot t\_3}\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+216}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(\left(1 + \frac{1}{a}\right) + b \cdot \frac{y}{t \cdot a}\right)} + \frac{z}{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 40.8%
+-commutative40.8%
associate-/l*55.5%
fma-define55.5%
+-commutative55.5%
associate-/l*55.5%
fma-define55.5%
Simplified55.5%
Taylor expanded in z around inf 94.4%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1e216Initial program 90.5%
if 1e216 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 22.8%
+-commutative22.8%
associate-/l*31.9%
fma-define31.9%
+-commutative31.9%
associate-/l*37.8%
fma-define37.8%
Simplified37.8%
Taylor expanded in z around 0 34.7%
Taylor expanded in a around inf 34.7%
associate-+r+34.7%
associate-/l*34.7%
*-commutative34.7%
Simplified34.7%
Taylor expanded in y around inf 82.7%
Final simplification89.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t)) (t_2 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) t_1))))
(if (<= t_2 -1e+300)
(+
(/ (* y z) (* t (+ 1.0 (+ a t_1))))
(/ 1.0 (/ (+ 1.0 (* b (/ y t))) x)))
(if (<= t_2 1e+216)
t_2
(+ (/ x (* a (+ (+ 1.0 (/ 1.0 a)) (* b (/ y (* t a)))))) (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1);
double tmp;
if (t_2 <= -1e+300) {
tmp = ((y * z) / (t * (1.0 + (a + t_1)))) + (1.0 / ((1.0 + (b * (y / t))) / x));
} else if (t_2 <= 1e+216) {
tmp = t_2;
} else {
tmp = (x / (a * ((1.0 + (1.0 / a)) + (b * (y / (t * a)))))) + (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y * b) / t
t_2 = (x + ((y * z) / t)) / ((a + 1.0d0) + t_1)
if (t_2 <= (-1d+300)) then
tmp = ((y * z) / (t * (1.0d0 + (a + t_1)))) + (1.0d0 / ((1.0d0 + (b * (y / t))) / x))
else if (t_2 <= 1d+216) then
tmp = t_2
else
tmp = (x / (a * ((1.0d0 + (1.0d0 / a)) + (b * (y / (t * a)))))) + (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 t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1);
double tmp;
if (t_2 <= -1e+300) {
tmp = ((y * z) / (t * (1.0 + (a + t_1)))) + (1.0 / ((1.0 + (b * (y / t))) / x));
} else if (t_2 <= 1e+216) {
tmp = t_2;
} else {
tmp = (x / (a * ((1.0 + (1.0 / a)) + (b * (y / (t * a)))))) + (z / b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1) tmp = 0 if t_2 <= -1e+300: tmp = ((y * z) / (t * (1.0 + (a + t_1)))) + (1.0 / ((1.0 + (b * (y / t))) / x)) elif t_2 <= 1e+216: tmp = t_2 else: tmp = (x / (a * ((1.0 + (1.0 / a)) + (b * (y / (t * a)))))) + (z / b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + t_1)) tmp = 0.0 if (t_2 <= -1e+300) tmp = Float64(Float64(Float64(y * z) / Float64(t * Float64(1.0 + Float64(a + t_1)))) + Float64(1.0 / Float64(Float64(1.0 + Float64(b * Float64(y / t))) / x))); elseif (t_2 <= 1e+216) tmp = t_2; else tmp = Float64(Float64(x / Float64(a * Float64(Float64(1.0 + Float64(1.0 / a)) + Float64(b * Float64(y / Float64(t * a)))))) + Float64(z / b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * b) / t; t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1); tmp = 0.0; if (t_2 <= -1e+300) tmp = ((y * z) / (t * (1.0 + (a + t_1)))) + (1.0 / ((1.0 + (b * (y / t))) / x)); elseif (t_2 <= 1e+216) tmp = t_2; else tmp = (x / (a * ((1.0 + (1.0 / a)) + (b * (y / (t * a)))))) + (z / b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+300], N[(N[(N[(y * z), $MachinePrecision] / N[(t * N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+216], t$95$2, N[(N[(x / N[(a * N[(N[(1.0 + N[(1.0 / a), $MachinePrecision]), $MachinePrecision] + N[(b * N[(y / N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z / b), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + t\_1}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+300}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(1 + \left(a + t\_1\right)\right)} + \frac{1}{\frac{1 + b \cdot \frac{y}{t}}{x}}\\
\mathbf{elif}\;t\_2 \leq 10^{+216}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(\left(1 + \frac{1}{a}\right) + b \cdot \frac{y}{t \cdot a}\right)} + \frac{z}{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))) < -1.0000000000000001e300Initial program 46.4%
+-commutative46.4%
associate-/l*59.7%
fma-define59.6%
+-commutative59.6%
associate-/l*59.6%
fma-define59.6%
Simplified59.6%
Taylor expanded in z around 0 68.6%
clear-num68.6%
inv-pow68.6%
associate-*r/68.7%
+-commutative68.7%
fma-define68.7%
Applied egg-rr68.7%
unpow-168.7%
Simplified68.7%
Taylor expanded in a around 0 68.6%
associate-/l*68.7%
Simplified68.7%
if -1.0000000000000001e300 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1e216Initial program 90.4%
if 1e216 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 22.8%
+-commutative22.8%
associate-/l*31.9%
fma-define31.9%
+-commutative31.9%
associate-/l*37.8%
fma-define37.8%
Simplified37.8%
Taylor expanded in z around 0 34.7%
Taylor expanded in a around inf 34.7%
associate-+r+34.7%
associate-/l*34.7%
*-commutative34.7%
Simplified34.7%
Taylor expanded in y around inf 82.7%
Final simplification87.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t)))))
(if (<= t_1 (- INFINITY))
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(if (<= t_1 1e+216)
t_1
(+ (/ x (* a (+ (+ 1.0 (/ 1.0 a)) (* b (/ y (* t a)))))) (/ z b))))))
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 tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t_1 <= 1e+216) {
tmp = t_1;
} else {
tmp = (x / (a * ((1.0 + (1.0 / a)) + (b * (y / (t * a)))))) + (z / 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)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t_1 <= 1e+216) {
tmp = t_1;
} else {
tmp = (x / (a * ((1.0 + (1.0 / a)) + (b * (y / (t * a)))))) + (z / b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)) tmp = 0 if t_1 <= -math.inf: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) elif t_1 <= 1e+216: tmp = t_1 else: tmp = (x / (a * ((1.0 + (1.0 / a)) + (b * (y / (t * a)))))) + (z / b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); elseif (t_1 <= 1e+216) tmp = t_1; else tmp = Float64(Float64(x / Float64(a * Float64(Float64(1.0 + Float64(1.0 / a)) + Float64(b * Float64(y / Float64(t * a)))))) + Float64(z / b)); 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)); tmp = 0.0; if (t_1 <= -Inf) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); elseif (t_1 <= 1e+216) tmp = t_1; else tmp = (x / (a * ((1.0 + (1.0 / a)) + (b * (y / (t * a)))))) + (z / 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[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+216], t$95$1, N[(N[(x / N[(a * N[(N[(1.0 + N[(1.0 / a), $MachinePrecision]), $MachinePrecision] + N[(b * N[(y / N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z / b), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;t\_1 \leq 10^{+216}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(\left(1 + \frac{1}{a}\right) + b \cdot \frac{y}{t \cdot a}\right)} + \frac{z}{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 40.8%
+-commutative40.8%
associate-/l*55.5%
fma-define55.5%
+-commutative55.5%
associate-/l*55.5%
fma-define55.5%
Simplified55.5%
Taylor expanded in z around inf 65.5%
Taylor expanded in t around 0 65.5%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1e216Initial program 90.5%
if 1e216 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 22.8%
+-commutative22.8%
associate-/l*31.9%
fma-define31.9%
+-commutative31.9%
associate-/l*37.8%
fma-define37.8%
Simplified37.8%
Taylor expanded in z around 0 34.7%
Taylor expanded in a around inf 34.7%
associate-+r+34.7%
associate-/l*34.7%
*-commutative34.7%
Simplified34.7%
Taylor expanded in y around inf 82.7%
Final simplification87.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t)))))
(if (<= t_1 (- INFINITY))
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(if (<= t_1 5e+272) t_1 (/ z b)))))
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 tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t_1 <= 5e+272) {
tmp = t_1;
} else {
tmp = z / 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)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t_1 <= 5e+272) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)) tmp = 0 if t_1 <= -math.inf: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) elif t_1 <= 5e+272: tmp = t_1 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); elseif (t_1 <= 5e+272) tmp = t_1; else tmp = Float64(z / b); 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)); tmp = 0.0; if (t_1 <= -Inf) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); elseif (t_1 <= 5e+272) tmp = t_1; else tmp = z / 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[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+272], t$95$1, N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+272}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{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 40.8%
+-commutative40.8%
associate-/l*55.5%
fma-define55.5%
+-commutative55.5%
associate-/l*55.5%
fma-define55.5%
Simplified55.5%
Taylor expanded in z around inf 65.5%
Taylor expanded in t around 0 65.5%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 4.99999999999999973e272Initial program 90.7%
if 4.99999999999999973e272 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 9.0%
+-commutative9.0%
associate-/l*19.8%
fma-define19.8%
+-commutative19.8%
associate-/l*26.7%
fma-define26.7%
Simplified26.7%
Taylor expanded in y around inf 72.7%
Final simplification86.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t)) (t_2 (+ 1.0 (+ a t_1))))
(if (<= (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) t_1)) 1e+216)
(+ (/ x t_2) (/ (* y z) (* t t_2)))
(+ (/ x (* a (+ (+ 1.0 (/ 1.0 a)) (* b (/ y (* t a)))))) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = 1.0 + (a + t_1);
double tmp;
if (((x + ((y * z) / t)) / ((a + 1.0) + t_1)) <= 1e+216) {
tmp = (x / t_2) + ((y * z) / (t * t_2));
} else {
tmp = (x / (a * ((1.0 + (1.0 / a)) + (b * (y / (t * a)))))) + (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y * b) / t
t_2 = 1.0d0 + (a + t_1)
if (((x + ((y * z) / t)) / ((a + 1.0d0) + t_1)) <= 1d+216) then
tmp = (x / t_2) + ((y * z) / (t * t_2))
else
tmp = (x / (a * ((1.0d0 + (1.0d0 / a)) + (b * (y / (t * a)))))) + (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 t_1 = (y * b) / t;
double t_2 = 1.0 + (a + t_1);
double tmp;
if (((x + ((y * z) / t)) / ((a + 1.0) + t_1)) <= 1e+216) {
tmp = (x / t_2) + ((y * z) / (t * t_2));
} else {
tmp = (x / (a * ((1.0 + (1.0 / a)) + (b * (y / (t * a)))))) + (z / b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t t_2 = 1.0 + (a + t_1) tmp = 0 if ((x + ((y * z) / t)) / ((a + 1.0) + t_1)) <= 1e+216: tmp = (x / t_2) + ((y * z) / (t * t_2)) else: tmp = (x / (a * ((1.0 + (1.0 / a)) + (b * (y / (t * a)))))) + (z / b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(1.0 + Float64(a + t_1)) tmp = 0.0 if (Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + t_1)) <= 1e+216) tmp = Float64(Float64(x / t_2) + Float64(Float64(y * z) / Float64(t * t_2))); else tmp = Float64(Float64(x / Float64(a * Float64(Float64(1.0 + Float64(1.0 / a)) + Float64(b * Float64(y / Float64(t * a)))))) + Float64(z / b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * b) / t; t_2 = 1.0 + (a + t_1); tmp = 0.0; if (((x + ((y * z) / t)) / ((a + 1.0) + t_1)) <= 1e+216) tmp = (x / t_2) + ((y * z) / (t * t_2)); else tmp = (x / (a * ((1.0 + (1.0 / a)) + (b * (y / (t * a)))))) + (z / b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], 1e+216], N[(N[(x / t$95$2), $MachinePrecision] + N[(N[(y * z), $MachinePrecision] / N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(a * N[(N[(1.0 + N[(1.0 / a), $MachinePrecision]), $MachinePrecision] + N[(b * N[(y / N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z / b), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := 1 + \left(a + t\_1\right)\\
\mathbf{if}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + t\_1} \leq 10^{+216}:\\
\;\;\;\;\frac{x}{t\_2} + \frac{y \cdot z}{t \cdot t\_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(\left(1 + \frac{1}{a}\right) + b \cdot \frac{y}{t \cdot a}\right)} + \frac{z}{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))) < 1e216Initial program 86.2%
+-commutative86.2%
associate-/l*84.0%
fma-define84.0%
+-commutative84.0%
associate-/l*82.3%
fma-define82.3%
Simplified82.3%
Taylor expanded in z around 0 87.0%
if 1e216 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 22.8%
+-commutative22.8%
associate-/l*31.9%
fma-define31.9%
+-commutative31.9%
associate-/l*37.8%
fma-define37.8%
Simplified37.8%
Taylor expanded in z around 0 34.7%
Taylor expanded in a around inf 34.7%
associate-+r+34.7%
associate-/l*34.7%
*-commutative34.7%
Simplified34.7%
Taylor expanded in y around inf 82.7%
Final simplification86.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1.28e+206)
(+ (/ z b) (/ (* x t) (* y b)))
(if (<= y -2.3e-82)
(/ (+ x (/ y (/ t z))) (+ (+ a 1.0) (* y (/ b t))))
(if (<= y 1e-42)
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (* b (/ y t))))
(if (<= y 3.8e+191)
(/ (+ x (* y (/ z t))) (+ (+ a 1.0) (/ y (/ t b))))
(/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.28e+206) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (y <= -2.3e-82) {
tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t)));
} else if (y <= 1e-42) {
tmp = (x + ((y * z) / t)) / ((a + 1.0) + (b * (y / t)));
} else if (y <= 3.8e+191) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b)));
} 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 <= (-1.28d+206)) then
tmp = (z / b) + ((x * t) / (y * b))
else if (y <= (-2.3d-82)) then
tmp = (x + (y / (t / z))) / ((a + 1.0d0) + (y * (b / t)))
else if (y <= 1d-42) then
tmp = (x + ((y * z) / t)) / ((a + 1.0d0) + (b * (y / t)))
else if (y <= 3.8d+191) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y / (t / b)))
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 <= -1.28e+206) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (y <= -2.3e-82) {
tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t)));
} else if (y <= 1e-42) {
tmp = (x + ((y * z) / t)) / ((a + 1.0) + (b * (y / t)));
} else if (y <= 3.8e+191) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b)));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.28e+206: tmp = (z / b) + ((x * t) / (y * b)) elif y <= -2.3e-82: tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t))) elif y <= 1e-42: tmp = (x + ((y * z) / t)) / ((a + 1.0) + (b * (y / t))) elif y <= 3.8e+191: tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.28e+206) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); elseif (y <= -2.3e-82) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); elseif (y <= 1e-42) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); elseif (y <= 3.8e+191) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.28e+206) tmp = (z / b) + ((x * t) / (y * b)); elseif (y <= -2.3e-82) tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t))); elseif (y <= 1e-42) tmp = (x + ((y * z) / t)) / ((a + 1.0) + (b * (y / t))); elseif (y <= 3.8e+191) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.28e+206], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.3e-82], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e-42], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.8e+191], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.28 \cdot 10^{+206}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{elif}\;y \leq -2.3 \cdot 10^{-82}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;y \leq 10^{-42}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+191}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -1.27999999999999999e206Initial program 42.1%
+-commutative42.1%
associate-/l*51.5%
fma-define51.5%
+-commutative51.5%
associate-/l*51.5%
fma-define51.5%
Simplified51.5%
Taylor expanded in b around inf 37.6%
times-frac56.4%
associate-*r/61.1%
+-commutative61.1%
fma-define61.1%
Simplified61.1%
Taylor expanded in t around 0 75.8%
if -1.27999999999999999e206 < y < -2.29999999999999997e-82Initial program 77.5%
associate-/l*79.3%
associate-/l*81.1%
Simplified81.1%
clear-num81.0%
un-div-inv81.1%
Applied egg-rr81.1%
if -2.29999999999999997e-82 < y < 1.00000000000000004e-42Initial program 95.6%
*-commutative95.6%
associate-/l*95.7%
Applied egg-rr95.7%
if 1.00000000000000004e-42 < y < 3.7999999999999998e191Initial program 68.5%
associate-/l*75.8%
associate-/l*79.5%
Simplified79.5%
clear-num79.6%
un-div-inv79.6%
Applied egg-rr79.6%
if 3.7999999999999998e191 < y Initial program 27.5%
+-commutative27.5%
associate-/l*28.0%
fma-define28.0%
+-commutative28.0%
associate-/l*34.7%
fma-define34.7%
Simplified34.7%
Taylor expanded in y around inf 74.7%
Final simplification86.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1.2e+206)
(+ (/ z b) (/ (* x t) (* y b)))
(if (<= y -2e+29)
(/ (+ x (/ y (/ t z))) (+ (+ a 1.0) (* y (/ b t))))
(if (<= y 6e+149)
(/ (+ x (* z (/ y t))) (+ (+ a 1.0) (/ (* y b) t)))
(/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.2e+206) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (y <= -2e+29) {
tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t)));
} else if (y <= 6e+149) {
tmp = (x + (z * (y / t))) / ((a + 1.0) + ((y * b) / t));
} 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 <= (-1.2d+206)) then
tmp = (z / b) + ((x * t) / (y * b))
else if (y <= (-2d+29)) then
tmp = (x + (y / (t / z))) / ((a + 1.0d0) + (y * (b / t)))
else if (y <= 6d+149) then
tmp = (x + (z * (y / t))) / ((a + 1.0d0) + ((y * b) / t))
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 <= -1.2e+206) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (y <= -2e+29) {
tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t)));
} else if (y <= 6e+149) {
tmp = (x + (z * (y / t))) / ((a + 1.0) + ((y * b) / t));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.2e+206: tmp = (z / b) + ((x * t) / (y * b)) elif y <= -2e+29: tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t))) elif y <= 6e+149: tmp = (x + (z * (y / t))) / ((a + 1.0) + ((y * b) / t)) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.2e+206) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); elseif (y <= -2e+29) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); elseif (y <= 6e+149) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.2e+206) tmp = (z / b) + ((x * t) / (y * b)); elseif (y <= -2e+29) tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t))); elseif (y <= 6e+149) tmp = (x + (z * (y / t))) / ((a + 1.0) + ((y * b) / t)); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.2e+206], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2e+29], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6e+149], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+206}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{elif}\;y \leq -2 \cdot 10^{+29}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+149}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -1.2e206Initial program 42.1%
+-commutative42.1%
associate-/l*51.5%
fma-define51.5%
+-commutative51.5%
associate-/l*51.5%
fma-define51.5%
Simplified51.5%
Taylor expanded in b around inf 37.6%
times-frac56.4%
associate-*r/61.1%
+-commutative61.1%
fma-define61.1%
Simplified61.1%
Taylor expanded in t around 0 75.8%
if -1.2e206 < y < -1.99999999999999983e29Initial program 73.4%
associate-/l*73.5%
associate-/l*76.5%
Simplified76.5%
clear-num76.5%
un-div-inv76.6%
Applied egg-rr76.6%
if -1.99999999999999983e29 < y < 6.00000000000000007e149Initial program 88.7%
*-commutative88.7%
associate-/l*89.3%
Applied egg-rr89.3%
if 6.00000000000000007e149 < y Initial program 31.6%
+-commutative31.6%
associate-/l*36.1%
fma-define36.1%
+-commutative36.1%
associate-/l*48.8%
fma-define48.8%
Simplified48.8%
Taylor expanded in y around inf 62.8%
Final simplification84.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1.8e+206)
(+ (/ z b) (/ (* x t) (* y b)))
(if (<= y -5e+35)
(/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t))))
(if (<= y 2e+149)
(/ (+ x (* z (/ y t))) (+ (+ a 1.0) (/ (* y b) t)))
(/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.8e+206) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (y <= -5e+35) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else if (y <= 2e+149) {
tmp = (x + (z * (y / t))) / ((a + 1.0) + ((y * b) / t));
} 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 <= (-1.8d+206)) then
tmp = (z / b) + ((x * t) / (y * b))
else if (y <= (-5d+35)) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
else if (y <= 2d+149) then
tmp = (x + (z * (y / t))) / ((a + 1.0d0) + ((y * b) / t))
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 <= -1.8e+206) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (y <= -5e+35) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else if (y <= 2e+149) {
tmp = (x + (z * (y / t))) / ((a + 1.0) + ((y * b) / t));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.8e+206: tmp = (z / b) + ((x * t) / (y * b)) elif y <= -5e+35: tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) elif y <= 2e+149: tmp = (x + (z * (y / t))) / ((a + 1.0) + ((y * b) / t)) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.8e+206) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); elseif (y <= -5e+35) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); elseif (y <= 2e+149) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.8e+206) tmp = (z / b) + ((x * t) / (y * b)); elseif (y <= -5e+35) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); elseif (y <= 2e+149) tmp = (x + (z * (y / t))) / ((a + 1.0) + ((y * b) / t)); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.8e+206], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5e+35], 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], If[LessEqual[y, 2e+149], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+206}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{elif}\;y \leq -5 \cdot 10^{+35}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+149}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -1.80000000000000014e206Initial program 42.1%
+-commutative42.1%
associate-/l*51.5%
fma-define51.5%
+-commutative51.5%
associate-/l*51.5%
fma-define51.5%
Simplified51.5%
Taylor expanded in b around inf 37.6%
times-frac56.4%
associate-*r/61.1%
+-commutative61.1%
fma-define61.1%
Simplified61.1%
Taylor expanded in t around 0 75.8%
if -1.80000000000000014e206 < y < -5.00000000000000021e35Initial program 71.7%
associate-/l*71.8%
associate-/l*75.0%
Simplified75.0%
if -5.00000000000000021e35 < y < 2.0000000000000001e149Initial program 88.8%
*-commutative88.8%
associate-/l*89.4%
Applied egg-rr89.4%
if 2.0000000000000001e149 < y Initial program 31.6%
+-commutative31.6%
associate-/l*36.1%
fma-define36.1%
+-commutative36.1%
associate-/l*48.8%
fma-define48.8%
Simplified48.8%
Taylor expanded in y around inf 62.8%
Final simplification84.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -9e+205)
(+ (/ z b) (/ (* x t) (* y b)))
(if (<= y -4e+39)
(/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t))))
(if (<= y 3e+191)
(/ (+ x (* z (/ y t))) (+ (+ a 1.0) (* b (/ y t))))
(/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -9e+205) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (y <= -4e+39) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else if (y <= 3e+191) {
tmp = (x + (z * (y / t))) / ((a + 1.0) + (b * (y / t)));
} 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 <= (-9d+205)) then
tmp = (z / b) + ((x * t) / (y * b))
else if (y <= (-4d+39)) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
else if (y <= 3d+191) then
tmp = (x + (z * (y / t))) / ((a + 1.0d0) + (b * (y / t)))
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 <= -9e+205) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (y <= -4e+39) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else if (y <= 3e+191) {
tmp = (x + (z * (y / t))) / ((a + 1.0) + (b * (y / t)));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -9e+205: tmp = (z / b) + ((x * t) / (y * b)) elif y <= -4e+39: tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) elif y <= 3e+191: tmp = (x + (z * (y / t))) / ((a + 1.0) + (b * (y / t))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -9e+205) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); elseif (y <= -4e+39) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); elseif (y <= 3e+191) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -9e+205) tmp = (z / b) + ((x * t) / (y * b)); elseif (y <= -4e+39) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); elseif (y <= 3e+191) tmp = (x + (z * (y / t))) / ((a + 1.0) + (b * (y / t))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -9e+205], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4e+39], 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], If[LessEqual[y, 3e+191], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+205}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{elif}\;y \leq -4 \cdot 10^{+39}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+191}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -9.00000000000000071e205Initial program 42.1%
+-commutative42.1%
associate-/l*51.5%
fma-define51.5%
+-commutative51.5%
associate-/l*51.5%
fma-define51.5%
Simplified51.5%
Taylor expanded in b around inf 37.6%
times-frac56.4%
associate-*r/61.1%
+-commutative61.1%
fma-define61.1%
Simplified61.1%
Taylor expanded in t around 0 75.8%
if -9.00000000000000071e205 < y < -3.99999999999999976e39Initial program 71.7%
associate-/l*71.8%
associate-/l*75.0%
Simplified75.0%
if -3.99999999999999976e39 < y < 2.9999999999999997e191Initial program 86.8%
*-commutative86.8%
associate-/l*85.7%
Applied egg-rr85.7%
*-commutative86.8%
associate-/l*87.3%
Applied egg-rr87.3%
if 2.9999999999999997e191 < y Initial program 27.5%
+-commutative27.5%
associate-/l*28.0%
fma-define28.0%
+-commutative28.0%
associate-/l*34.7%
fma-define34.7%
Simplified34.7%
Taylor expanded in y around inf 74.7%
Final simplification84.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (+ a 1.0))))
(if (<= b -1.25e+96)
(+ (/ z b) (/ (* x t) (* y b)))
(if (<= b 1.25e-62)
(+ (* y (/ z t_1)) (/ x (+ a 1.0)))
(if (<= b 7.5e+38)
(/ (* y z) (+ (* y b) t_1))
(if (<= b 8.5e+191) (/ x (+ (+ a 1.0) (* b (/ y t)))) (/ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (a + 1.0);
double tmp;
if (b <= -1.25e+96) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (b <= 1.25e-62) {
tmp = (y * (z / t_1)) + (x / (a + 1.0));
} else if (b <= 7.5e+38) {
tmp = (y * z) / ((y * b) + t_1);
} else if (b <= 8.5e+191) {
tmp = x / ((a + 1.0) + (b * (y / t)));
} 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) :: t_1
real(8) :: tmp
t_1 = t * (a + 1.0d0)
if (b <= (-1.25d+96)) then
tmp = (z / b) + ((x * t) / (y * b))
else if (b <= 1.25d-62) then
tmp = (y * (z / t_1)) + (x / (a + 1.0d0))
else if (b <= 7.5d+38) then
tmp = (y * z) / ((y * b) + t_1)
else if (b <= 8.5d+191) then
tmp = x / ((a + 1.0d0) + (b * (y / t)))
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 t_1 = t * (a + 1.0);
double tmp;
if (b <= -1.25e+96) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (b <= 1.25e-62) {
tmp = (y * (z / t_1)) + (x / (a + 1.0));
} else if (b <= 7.5e+38) {
tmp = (y * z) / ((y * b) + t_1);
} else if (b <= 8.5e+191) {
tmp = x / ((a + 1.0) + (b * (y / t)));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (a + 1.0) tmp = 0 if b <= -1.25e+96: tmp = (z / b) + ((x * t) / (y * b)) elif b <= 1.25e-62: tmp = (y * (z / t_1)) + (x / (a + 1.0)) elif b <= 7.5e+38: tmp = (y * z) / ((y * b) + t_1) elif b <= 8.5e+191: tmp = x / ((a + 1.0) + (b * (y / t))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(a + 1.0)) tmp = 0.0 if (b <= -1.25e+96) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); elseif (b <= 1.25e-62) tmp = Float64(Float64(y * Float64(z / t_1)) + Float64(x / Float64(a + 1.0))); elseif (b <= 7.5e+38) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + t_1)); elseif (b <= 8.5e+191) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * (a + 1.0); tmp = 0.0; if (b <= -1.25e+96) tmp = (z / b) + ((x * t) / (y * b)); elseif (b <= 1.25e-62) tmp = (y * (z / t_1)) + (x / (a + 1.0)); elseif (b <= 7.5e+38) tmp = (y * z) / ((y * b) + t_1); elseif (b <= 8.5e+191) tmp = x / ((a + 1.0) + (b * (y / t))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.25e+96], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.25e-62], N[(N[(y * N[(z / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.5e+38], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.5e+191], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(a + 1\right)\\
\mathbf{if}\;b \leq -1.25 \cdot 10^{+96}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{elif}\;b \leq 1.25 \cdot 10^{-62}:\\
\;\;\;\;y \cdot \frac{z}{t\_1} + \frac{x}{a + 1}\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{+38}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t\_1}\\
\mathbf{elif}\;b \leq 8.5 \cdot 10^{+191}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if b < -1.2500000000000001e96Initial program 62.2%
+-commutative62.2%
associate-/l*55.2%
fma-define55.2%
+-commutative55.2%
associate-/l*55.1%
fma-define55.1%
Simplified55.1%
Taylor expanded in b around inf 49.8%
times-frac33.5%
associate-*r/35.9%
+-commutative35.9%
fma-define35.9%
Simplified35.9%
Taylor expanded in t around 0 64.2%
if -1.2500000000000001e96 < b < 1.25e-62Initial program 84.2%
+-commutative84.2%
associate-/l*86.8%
fma-define86.8%
+-commutative86.8%
associate-/l*86.2%
fma-define86.2%
Simplified86.2%
Taylor expanded in y around 0 78.7%
Taylor expanded in b around 0 75.3%
+-commutative75.3%
associate-/r*74.8%
associate-*r/76.8%
Simplified76.8%
Taylor expanded in y around 0 75.3%
associate-/l*78.7%
associate-/r*76.8%
associate-/l/78.7%
Simplified78.7%
if 1.25e-62 < b < 7.4999999999999999e38Initial program 77.8%
+-commutative77.8%
associate-/l*69.2%
fma-define69.2%
+-commutative69.2%
associate-/l*69.2%
fma-define69.2%
Simplified69.2%
Taylor expanded in z around inf 65.8%
Taylor expanded in t around 0 70.4%
if 7.4999999999999999e38 < b < 8.4999999999999999e191Initial program 79.8%
*-commutative79.8%
associate-/l*82.8%
Applied egg-rr82.8%
Taylor expanded in x around inf 77.9%
if 8.4999999999999999e191 < b Initial program 64.4%
+-commutative64.4%
associate-/l*54.5%
fma-define54.5%
+-commutative54.5%
associate-/l*54.5%
fma-define54.5%
Simplified54.5%
Taylor expanded in y around inf 79.8%
Final simplification75.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.45e-229) (not (<= t 3.4e-98))) (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t)))) (/ (* y z) (+ (* y b) (* t (+ a 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.45e-229) || !(t <= 3.4e-98)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (y * z) / ((y * b) + (t * (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 ((t <= (-1.45d-229)) .or. (.not. (t <= 3.4d-98))) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
else
tmp = (y * z) / ((y * b) + (t * (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 ((t <= -1.45e-229) || !(t <= 3.4e-98)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.45e-229) or not (t <= 3.4e-98): tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) else: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.45e-229) || !(t <= 3.4e-98)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); else tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.45e-229) || ~((t <= 3.4e-98))) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); else tmp = (y * z) / ((y * b) + (t * (a + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.45e-229], N[Not[LessEqual[t, 3.4e-98]], $MachinePrecision]], 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], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.45 \cdot 10^{-229} \lor \neg \left(t \leq 3.4 \cdot 10^{-98}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\end{array}
\end{array}
if t < -1.45e-229 or 3.4000000000000001e-98 < t Initial program 81.7%
associate-/l*83.2%
associate-/l*85.3%
Simplified85.3%
if -1.45e-229 < t < 3.4000000000000001e-98Initial program 67.7%
+-commutative67.7%
associate-/l*60.3%
fma-define60.3%
+-commutative60.3%
associate-/l*51.6%
fma-define51.6%
Simplified51.6%
Taylor expanded in z around inf 66.1%
Taylor expanded in t around 0 73.7%
Final simplification82.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y (/ z t)))))
(if (<= t -1.75e-229)
(/ t_1 (+ (+ a 1.0) (/ y (/ t b))))
(if (<= t 4.4e-98)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(/ t_1 (+ (+ a 1.0) (* y (/ b t))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * (z / t));
double tmp;
if (t <= -1.75e-229) {
tmp = t_1 / ((a + 1.0) + (y / (t / b)));
} else if (t <= 4.4e-98) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = t_1 / ((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 = x + (y * (z / t))
if (t <= (-1.75d-229)) then
tmp = t_1 / ((a + 1.0d0) + (y / (t / b)))
else if (t <= 4.4d-98) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else
tmp = t_1 / ((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 = x + (y * (z / t));
double tmp;
if (t <= -1.75e-229) {
tmp = t_1 / ((a + 1.0) + (y / (t / b)));
} else if (t <= 4.4e-98) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = t_1 / ((a + 1.0) + (y * (b / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * (z / t)) tmp = 0 if t <= -1.75e-229: tmp = t_1 / ((a + 1.0) + (y / (t / b))) elif t <= 4.4e-98: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) else: tmp = t_1 / ((a + 1.0) + (y * (b / t))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * Float64(z / t))) tmp = 0.0 if (t <= -1.75e-229) tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); elseif (t <= 4.4e-98) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); else tmp = Float64(t_1 / 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 = x + (y * (z / t)); tmp = 0.0; if (t <= -1.75e-229) tmp = t_1 / ((a + 1.0) + (y / (t / b))); elseif (t <= 4.4e-98) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); else tmp = t_1 / ((a + 1.0) + (y * (b / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.75e-229], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.4e-98], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{t}\\
\mathbf{if}\;t \leq -1.75 \cdot 10^{-229}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{-98}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\end{array}
\end{array}
if t < -1.7500000000000002e-229Initial program 80.9%
associate-/l*81.8%
associate-/l*83.5%
Simplified83.5%
clear-num83.5%
un-div-inv83.5%
Applied egg-rr83.5%
if -1.7500000000000002e-229 < t < 4.39999999999999993e-98Initial program 67.7%
+-commutative67.7%
associate-/l*60.3%
fma-define60.3%
+-commutative60.3%
associate-/l*51.6%
fma-define51.6%
Simplified51.6%
Taylor expanded in z around inf 66.1%
Taylor expanded in t around 0 73.7%
if 4.39999999999999993e-98 < t Initial program 82.6%
associate-/l*85.2%
associate-/l*87.7%
Simplified87.7%
Final simplification82.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1.96e+96)
(+ (/ z b) (/ (* x t) (* y b)))
(if (<= b 4.6e+39)
(/ (+ x (/ (* y z) t)) (+ a 1.0))
(if (<= b 7.5e+193) (/ x (+ (+ a 1.0) (* b (/ y t)))) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.96e+96) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (b <= 4.6e+39) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if (b <= 7.5e+193) {
tmp = x / ((a + 1.0) + (b * (y / t)));
} 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 (b <= (-1.96d+96)) then
tmp = (z / b) + ((x * t) / (y * b))
else if (b <= 4.6d+39) then
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
else if (b <= 7.5d+193) then
tmp = x / ((a + 1.0d0) + (b * (y / t)))
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 (b <= -1.96e+96) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (b <= 4.6e+39) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if (b <= 7.5e+193) {
tmp = x / ((a + 1.0) + (b * (y / t)));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.96e+96: tmp = (z / b) + ((x * t) / (y * b)) elif b <= 4.6e+39: tmp = (x + ((y * z) / t)) / (a + 1.0) elif b <= 7.5e+193: tmp = x / ((a + 1.0) + (b * (y / t))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.96e+96) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); elseif (b <= 4.6e+39) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); elseif (b <= 7.5e+193) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.96e+96) tmp = (z / b) + ((x * t) / (y * b)); elseif (b <= 4.6e+39) tmp = (x + ((y * z) / t)) / (a + 1.0); elseif (b <= 7.5e+193) tmp = x / ((a + 1.0) + (b * (y / t))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.96e+96], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.6e+39], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.5e+193], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.96 \cdot 10^{+96}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{elif}\;b \leq 4.6 \cdot 10^{+39}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{+193}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if b < -1.96e96Initial program 62.2%
+-commutative62.2%
associate-/l*55.2%
fma-define55.2%
+-commutative55.2%
associate-/l*55.1%
fma-define55.1%
Simplified55.1%
Taylor expanded in b around inf 49.8%
times-frac33.5%
associate-*r/35.9%
+-commutative35.9%
fma-define35.9%
Simplified35.9%
Taylor expanded in t around 0 64.2%
if -1.96e96 < b < 4.60000000000000024e39Initial program 83.3%
+-commutative83.3%
associate-/l*84.4%
fma-define84.4%
+-commutative84.4%
associate-/l*83.9%
fma-define83.8%
Simplified83.8%
Taylor expanded in b around 0 71.4%
if 4.60000000000000024e39 < b < 7.5000000000000008e193Initial program 79.8%
*-commutative79.8%
associate-/l*82.8%
Applied egg-rr82.8%
Taylor expanded in x around inf 77.9%
if 7.5000000000000008e193 < b Initial program 64.4%
+-commutative64.4%
associate-/l*54.5%
fma-define54.5%
+-commutative54.5%
associate-/l*54.5%
fma-define54.5%
Simplified54.5%
Taylor expanded in y around inf 79.8%
Final simplification71.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (/ b t))) (t_2 (+ x (* y (/ z t)))))
(if (or (<= a -1.0) (not (<= a 9.8e-22)))
(/ t_2 (+ a t_1))
(/ t_2 (+ 1.0 t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b / t);
double t_2 = x + (y * (z / t));
double tmp;
if ((a <= -1.0) || !(a <= 9.8e-22)) {
tmp = t_2 / (a + t_1);
} else {
tmp = t_2 / (1.0 + 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 = y * (b / t)
t_2 = x + (y * (z / t))
if ((a <= (-1.0d0)) .or. (.not. (a <= 9.8d-22))) then
tmp = t_2 / (a + t_1)
else
tmp = t_2 / (1.0d0 + 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 * (b / t);
double t_2 = x + (y * (z / t));
double tmp;
if ((a <= -1.0) || !(a <= 9.8e-22)) {
tmp = t_2 / (a + t_1);
} else {
tmp = t_2 / (1.0 + t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b / t) t_2 = x + (y * (z / t)) tmp = 0 if (a <= -1.0) or not (a <= 9.8e-22): tmp = t_2 / (a + t_1) else: tmp = t_2 / (1.0 + t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b / t)) t_2 = Float64(x + Float64(y * Float64(z / t))) tmp = 0.0 if ((a <= -1.0) || !(a <= 9.8e-22)) tmp = Float64(t_2 / Float64(a + t_1)); else tmp = Float64(t_2 / Float64(1.0 + t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b / t); t_2 = x + (y * (z / t)); tmp = 0.0; if ((a <= -1.0) || ~((a <= 9.8e-22))) tmp = t_2 / (a + t_1); else tmp = t_2 / (1.0 + t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[a, -1.0], N[Not[LessEqual[a, 9.8e-22]], $MachinePrecision]], N[(t$95$2 / N[(a + t$95$1), $MachinePrecision]), $MachinePrecision], N[(t$95$2 / N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{b}{t}\\
t_2 := x + y \cdot \frac{z}{t}\\
\mathbf{if}\;a \leq -1 \lor \neg \left(a \leq 9.8 \cdot 10^{-22}\right):\\
\;\;\;\;\frac{t\_2}{a + t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_2}{1 + t\_1}\\
\end{array}
\end{array}
if a < -1 or 9.7999999999999996e-22 < a Initial program 79.6%
associate-/l*76.8%
associate-/l*75.4%
Simplified75.4%
Taylor expanded in a around inf 74.4%
if -1 < a < 9.7999999999999996e-22Initial program 76.3%
associate-/l*77.9%
associate-/l*77.9%
Simplified77.9%
Taylor expanded in a around 0 77.9%
Final simplification76.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= a -63.0)
(+ (* y (/ z (* t (+ a 1.0)))) t_1)
(if (<= a 1.65)
(/ (+ x (* y (/ z t))) (+ 1.0 (* y (/ b t))))
(+ t_1 (/ (/ y (/ t z)) (+ a 1.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (a <= -63.0) {
tmp = (y * (z / (t * (a + 1.0)))) + t_1;
} else if (a <= 1.65) {
tmp = (x + (y * (z / t))) / (1.0 + (y * (b / t)));
} else {
tmp = t_1 + ((y / (t / z)) / (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) :: t_1
real(8) :: tmp
t_1 = x / (a + 1.0d0)
if (a <= (-63.0d0)) then
tmp = (y * (z / (t * (a + 1.0d0)))) + t_1
else if (a <= 1.65d0) then
tmp = (x + (y * (z / t))) / (1.0d0 + (y * (b / t)))
else
tmp = t_1 + ((y / (t / z)) / (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 t_1 = x / (a + 1.0);
double tmp;
if (a <= -63.0) {
tmp = (y * (z / (t * (a + 1.0)))) + t_1;
} else if (a <= 1.65) {
tmp = (x + (y * (z / t))) / (1.0 + (y * (b / t)));
} else {
tmp = t_1 + ((y / (t / z)) / (a + 1.0));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if a <= -63.0: tmp = (y * (z / (t * (a + 1.0)))) + t_1 elif a <= 1.65: tmp = (x + (y * (z / t))) / (1.0 + (y * (b / t))) else: tmp = t_1 + ((y / (t / z)) / (a + 1.0)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (a <= -63.0) tmp = Float64(Float64(y * Float64(z / Float64(t * Float64(a + 1.0)))) + t_1); elseif (a <= 1.65) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(1.0 + Float64(y * Float64(b / t)))); else tmp = Float64(t_1 + Float64(Float64(y / Float64(t / z)) / Float64(a + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + 1.0); tmp = 0.0; if (a <= -63.0) tmp = (y * (z / (t * (a + 1.0)))) + t_1; elseif (a <= 1.65) tmp = (x + (y * (z / t))) / (1.0 + (y * (b / t))); else tmp = t_1 + ((y / (t / z)) / (a + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -63.0], N[(N[(y * N[(z / N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[a, 1.65], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;a \leq -63:\\
\;\;\;\;y \cdot \frac{z}{t \cdot \left(a + 1\right)} + t\_1\\
\mathbf{elif}\;a \leq 1.65:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{1 + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \frac{\frac{y}{\frac{t}{z}}}{a + 1}\\
\end{array}
\end{array}
if a < -63Initial program 80.3%
+-commutative80.3%
associate-/l*75.3%
fma-define75.3%
+-commutative75.3%
associate-/l*73.6%
fma-define73.6%
Simplified73.6%
Taylor expanded in y around 0 67.2%
Taylor expanded in b around 0 71.0%
+-commutative71.0%
associate-/r*71.0%
associate-*r/67.7%
Simplified67.7%
Taylor expanded in y around 0 71.0%
associate-/l*72.6%
associate-/r*69.2%
associate-/l/72.6%
Simplified72.6%
if -63 < a < 1.6499999999999999Initial program 76.8%
associate-/l*78.5%
associate-/l*78.5%
Simplified78.5%
Taylor expanded in a around 0 78.5%
if 1.6499999999999999 < a Initial program 78.3%
+-commutative78.3%
associate-/l*77.0%
fma-define77.0%
+-commutative77.0%
associate-/l*75.8%
fma-define75.8%
Simplified75.8%
Taylor expanded in y around 0 63.0%
Taylor expanded in b around 0 63.1%
+-commutative63.1%
associate-/r*63.5%
associate-*r/65.9%
Simplified65.9%
clear-num75.8%
un-div-inv75.9%
Applied egg-rr66.0%
Final simplification73.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.25e-25)
(/ x (+ (+ a 1.0) (* b (/ y t))))
(if (<= t 9.2e-7)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(/ (+ x (/ (* y z) t)) (+ a 1.0)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.25e-25) {
tmp = x / ((a + 1.0) + (b * (y / t)));
} else if (t <= 9.2e-7) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = (x + ((y * z) / t)) / (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 (t <= (-1.25d-25)) then
tmp = x / ((a + 1.0d0) + (b * (y / t)))
else if (t <= 9.2d-7) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else
tmp = (x + ((y * z) / t)) / (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 (t <= -1.25e-25) {
tmp = x / ((a + 1.0) + (b * (y / t)));
} else if (t <= 9.2e-7) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = (x + ((y * z) / t)) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.25e-25: tmp = x / ((a + 1.0) + (b * (y / t))) elif t <= 9.2e-7: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) else: tmp = (x + ((y * z) / t)) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.25e-25) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); elseif (t <= 9.2e-7) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); else tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.25e-25) tmp = x / ((a + 1.0) + (b * (y / t))); elseif (t <= 9.2e-7) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); else tmp = (x + ((y * z) / t)) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.25e-25], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.2e-7], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.25 \cdot 10^{-25}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{elif}\;t \leq 9.2 \cdot 10^{-7}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\end{array}
\end{array}
if t < -1.2499999999999999e-25Initial program 83.6%
*-commutative83.6%
associate-/l*85.1%
Applied egg-rr85.1%
Taylor expanded in x around inf 74.1%
if -1.2499999999999999e-25 < t < 9.1999999999999998e-7Initial program 72.6%
+-commutative72.6%
associate-/l*66.5%
fma-define66.5%
+-commutative66.5%
associate-/l*61.9%
fma-define61.9%
Simplified61.9%
Taylor expanded in z around inf 59.8%
Taylor expanded in t around 0 66.0%
if 9.1999999999999998e-7 < t Initial program 83.1%
+-commutative83.1%
associate-/l*86.7%
fma-define86.7%
+-commutative86.7%
associate-/l*90.0%
fma-define90.0%
Simplified90.0%
Taylor expanded in b around 0 78.6%
Final simplification71.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.42e-9) (not (<= y 2.4e+49))) (+ (/ z b) (/ (* x t) (* y b))) (/ x (+ (+ a 1.0) (* b (/ y t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.42e-9) || !(y <= 2.4e+49)) {
tmp = (z / b) + ((x * t) / (y * b));
} else {
tmp = x / ((a + 1.0) + (b * (y / 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) :: tmp
if ((y <= (-1.42d-9)) .or. (.not. (y <= 2.4d+49))) then
tmp = (z / b) + ((x * t) / (y * b))
else
tmp = x / ((a + 1.0d0) + (b * (y / t)))
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.42e-9) || !(y <= 2.4e+49)) {
tmp = (z / b) + ((x * t) / (y * b));
} else {
tmp = x / ((a + 1.0) + (b * (y / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.42e-9) or not (y <= 2.4e+49): tmp = (z / b) + ((x * t) / (y * b)) else: tmp = x / ((a + 1.0) + (b * (y / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.42e-9) || !(y <= 2.4e+49)) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); else tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.42e-9) || ~((y <= 2.4e+49))) tmp = (z / b) + ((x * t) / (y * b)); else tmp = x / ((a + 1.0) + (b * (y / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.42e-9], N[Not[LessEqual[y, 2.4e+49]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.42 \cdot 10^{-9} \lor \neg \left(y \leq 2.4 \cdot 10^{+49}\right):\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\end{array}
\end{array}
if y < -1.4200000000000001e-9 or 2.4e49 < y Initial program 56.2%
+-commutative56.2%
associate-/l*61.6%
fma-define61.6%
+-commutative61.6%
associate-/l*65.2%
fma-define65.2%
Simplified65.2%
Taylor expanded in b around inf 35.8%
times-frac40.5%
associate-*r/44.0%
+-commutative44.0%
fma-define44.0%
Simplified44.0%
Taylor expanded in t around 0 59.0%
if -1.4200000000000001e-9 < y < 2.4e49Initial program 94.0%
*-commutative94.0%
associate-/l*94.0%
Applied egg-rr94.0%
Taylor expanded in x around inf 70.4%
Final simplification65.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4.2e-9) (not (<= y 1.05e+51))) (+ (/ z b) (/ (* x t) (* y b))) (/ x (+ 1.0 (+ a (/ (* y b) t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.2e-9) || !(y <= 1.05e+51)) {
tmp = (z / b) + ((x * t) / (y * b));
} else {
tmp = x / (1.0 + (a + ((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) :: tmp
if ((y <= (-4.2d-9)) .or. (.not. (y <= 1.05d+51))) then
tmp = (z / b) + ((x * t) / (y * b))
else
tmp = x / (1.0d0 + (a + ((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 tmp;
if ((y <= -4.2e-9) || !(y <= 1.05e+51)) {
tmp = (z / b) + ((x * t) / (y * b));
} else {
tmp = x / (1.0 + (a + ((y * b) / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4.2e-9) or not (y <= 1.05e+51): tmp = (z / b) + ((x * t) / (y * b)) else: tmp = x / (1.0 + (a + ((y * b) / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -4.2e-9) || !(y <= 1.05e+51)) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); else tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -4.2e-9) || ~((y <= 1.05e+51))) tmp = (z / b) + ((x * t) / (y * b)); else tmp = x / (1.0 + (a + ((y * b) / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4.2e-9], N[Not[LessEqual[y, 1.05e+51]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{-9} \lor \neg \left(y \leq 1.05 \cdot 10^{+51}\right):\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\end{array}
\end{array}
if y < -4.20000000000000039e-9 or 1.0500000000000001e51 < y Initial program 56.2%
+-commutative56.2%
associate-/l*61.6%
fma-define61.6%
+-commutative61.6%
associate-/l*65.2%
fma-define65.2%
Simplified65.2%
Taylor expanded in b around inf 35.8%
times-frac40.5%
associate-*r/44.0%
+-commutative44.0%
fma-define44.0%
Simplified44.0%
Taylor expanded in t around 0 59.0%
if -4.20000000000000039e-9 < y < 1.0500000000000001e51Initial program 94.0%
+-commutative94.0%
associate-/l*88.8%
fma-define88.8%
+-commutative88.8%
associate-/l*84.9%
fma-define84.9%
Simplified84.9%
Taylor expanded in z around 0 70.4%
Final simplification65.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -6.6e+23) (not (<= t 3.95e+24))) (/ x (+ a 1.0)) (+ (/ z b) (/ (* x t) (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -6.6e+23) || !(t <= 3.95e+24)) {
tmp = x / (a + 1.0);
} else {
tmp = (z / b) + ((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 <= (-6.6d+23)) .or. (.not. (t <= 3.95d+24))) then
tmp = x / (a + 1.0d0)
else
tmp = (z / b) + ((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 <= -6.6e+23) || !(t <= 3.95e+24)) {
tmp = x / (a + 1.0);
} else {
tmp = (z / b) + ((x * t) / (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -6.6e+23) or not (t <= 3.95e+24): tmp = x / (a + 1.0) else: tmp = (z / b) + ((x * t) / (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -6.6e+23) || !(t <= 3.95e+24)) tmp = Float64(x / Float64(a + 1.0)); else tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -6.6e+23) || ~((t <= 3.95e+24))) tmp = x / (a + 1.0); else tmp = (z / b) + ((x * t) / (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -6.6e+23], N[Not[LessEqual[t, 3.95e+24]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.6 \cdot 10^{+23} \lor \neg \left(t \leq 3.95 \cdot 10^{+24}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\end{array}
\end{array}
if t < -6.60000000000000059e23 or 3.9499999999999999e24 < t Initial program 84.1%
+-commutative84.1%
associate-/l*89.4%
fma-define89.4%
+-commutative89.4%
associate-/l*92.9%
fma-define92.9%
Simplified92.9%
Taylor expanded in y around 0 66.0%
if -6.60000000000000059e23 < t < 3.9499999999999999e24Initial program 73.5%
+-commutative73.5%
associate-/l*68.2%
fma-define68.2%
+-commutative68.2%
associate-/l*64.2%
fma-define64.2%
Simplified64.2%
Taylor expanded in b around inf 43.5%
times-frac35.0%
associate-*r/34.9%
+-commutative34.9%
fma-define34.9%
Simplified34.9%
Taylor expanded in t around 0 57.2%
Final simplification61.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.2e-10) (not (<= y 5e+49))) (/ z b) (/ x (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.2e-10) || !(y <= 5e+49)) {
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 <= (-3.2d-10)) .or. (.not. (y <= 5d+49))) 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 <= -3.2e-10) || !(y <= 5e+49)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.2e-10) or not (y <= 5e+49): tmp = z / b else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.2e-10) || !(y <= 5e+49)) 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 <= -3.2e-10) || ~((y <= 5e+49))) 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, -3.2e-10], N[Not[LessEqual[y, 5e+49]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{-10} \lor \neg \left(y \leq 5 \cdot 10^{+49}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -3.19999999999999981e-10 or 5.0000000000000004e49 < y Initial program 56.6%
+-commutative56.6%
associate-/l*61.9%
fma-define61.9%
+-commutative61.9%
associate-/l*65.5%
fma-define65.5%
Simplified65.5%
Taylor expanded in y around inf 54.2%
if -3.19999999999999981e-10 < y < 5.0000000000000004e49Initial program 93.9%
+-commutative93.9%
associate-/l*88.7%
fma-define88.7%
+-commutative88.7%
associate-/l*84.8%
fma-define84.8%
Simplified84.8%
Taylor expanded in y around 0 62.1%
Final simplification58.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -2.9e+137) (not (<= a 122000.0))) (/ x a) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -2.9e+137) || !(a <= 122000.0)) {
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 <= (-2.9d+137)) .or. (.not. (a <= 122000.0d0))) 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 <= -2.9e+137) || !(a <= 122000.0)) {
tmp = x / a;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -2.9e+137) or not (a <= 122000.0): tmp = x / a else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -2.9e+137) || !(a <= 122000.0)) 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 <= -2.9e+137) || ~((a <= 122000.0))) tmp = x / a; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -2.9e+137], N[Not[LessEqual[a, 122000.0]], $MachinePrecision]], N[(x / a), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.9 \cdot 10^{+137} \lor \neg \left(a \leq 122000\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if a < -2.89999999999999985e137 or 122000 < a Initial program 79.9%
+-commutative79.9%
associate-/l*78.2%
fma-define78.2%
+-commutative78.2%
associate-/l*77.4%
fma-define77.4%
Simplified77.4%
Taylor expanded in a around inf 68.7%
Taylor expanded in x around inf 50.0%
if -2.89999999999999985e137 < a < 122000Initial program 76.6%
+-commutative76.6%
associate-/l*76.6%
fma-define76.6%
+-commutative76.6%
associate-/l*75.9%
fma-define75.9%
Simplified75.9%
Taylor expanded in y around inf 42.2%
Final simplification45.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -7.5e-10) (not (<= a 1.0))) (/ x a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -7.5e-10) || !(a <= 1.0)) {
tmp = x / a;
} 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 ((a <= (-7.5d-10)) .or. (.not. (a <= 1.0d0))) then
tmp = x / a
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 ((a <= -7.5e-10) || !(a <= 1.0)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -7.5e-10) or not (a <= 1.0): tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -7.5e-10) || !(a <= 1.0)) tmp = Float64(x / a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -7.5e-10) || ~((a <= 1.0))) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -7.5e-10], N[Not[LessEqual[a, 1.0]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.5 \cdot 10^{-10} \lor \neg \left(a \leq 1\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -7.49999999999999995e-10 or 1 < a Initial program 79.3%
+-commutative79.3%
associate-/l*76.4%
fma-define76.4%
+-commutative76.4%
associate-/l*74.3%
fma-define74.3%
Simplified74.3%
Taylor expanded in a around inf 65.4%
Taylor expanded in x around inf 47.3%
if -7.49999999999999995e-10 < a < 1Initial program 76.6%
associate-/l*78.3%
associate-/l*79.1%
Simplified79.1%
Taylor expanded in a around 0 79.1%
Taylor expanded in y around 0 35.4%
Final simplification41.7%
(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 78.0%
associate-/l*77.3%
associate-/l*76.6%
Simplified76.6%
Taylor expanded in a around 0 45.6%
Taylor expanded in y around 0 18.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 2024130
(FPCore (x y z t a b)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:alt
(! :herbie-platform default (if (< t -1707385670788761/12500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b))))) (if (< t 1518483551868623/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ z b) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b))))))))
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))