
(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 15 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)) (+ (+ a 1.0) (/ (* y b) t)))))
(if (<= t_1 (- INFINITY))
(+ (* (/ y t) (/ z (+ a 1.0))) (/ x (+ a 1.0)))
(if (or (<= t_1 -1e-322) (and (not (<= t_1 0.0)) (<= t_1 1e+298)))
t_1
(+ (/ z b) (* (/ t y) (/ x 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 / t) * (z / (a + 1.0))) + (x / (a + 1.0));
} else if ((t_1 <= -1e-322) || (!(t_1 <= 0.0) && (t_1 <= 1e+298))) {
tmp = t_1;
} else {
tmp = (z / b) + ((t / y) * (x / 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 / t) * (z / (a + 1.0))) + (x / (a + 1.0));
} else if ((t_1 <= -1e-322) || (!(t_1 <= 0.0) && (t_1 <= 1e+298))) {
tmp = t_1;
} else {
tmp = (z / b) + ((t / y) * (x / 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 / t) * (z / (a + 1.0))) + (x / (a + 1.0)) elif (t_1 <= -1e-322) or (not (t_1 <= 0.0) and (t_1 <= 1e+298)): tmp = t_1 else: tmp = (z / b) + ((t / y) * (x / 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(Float64(y / t) * Float64(z / Float64(a + 1.0))) + Float64(x / Float64(a + 1.0))); elseif ((t_1 <= -1e-322) || (!(t_1 <= 0.0) && (t_1 <= 1e+298))) tmp = t_1; else tmp = Float64(Float64(z / b) + Float64(Float64(t / y) * Float64(x / 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 / t) * (z / (a + 1.0))) + (x / (a + 1.0)); elseif ((t_1 <= -1e-322) || (~((t_1 <= 0.0)) && (t_1 <= 1e+298))) tmp = t_1; else tmp = (z / b) + ((t / y) * (x / 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[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$1, -1e-322], And[N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision], LessEqual[t$95$1, 1e+298]]], t$95$1, N[(N[(z / b), $MachinePrecision] + N[(N[(t / y), $MachinePrecision] * N[(x / b), $MachinePrecision]), $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}{t} \cdot \frac{z}{a + 1} + \frac{x}{a + 1}\\
\mathbf{elif}\;t_1 \leq -1 \cdot 10^{-322} \lor \neg \left(t_1 \leq 0\right) \land t_1 \leq 10^{+298}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{t}{y} \cdot \frac{x}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 25.6%
+-commutative25.6%
*-commutative25.6%
associate-*r/68.1%
fma-def68.1%
associate-+l+68.1%
+-commutative68.1%
associate-*r/67.9%
fma-def67.9%
Simplified67.9%
Taylor expanded in b around 0 14.3%
Taylor expanded in y around 0 19.2%
+-commutative19.2%
times-frac67.2%
fma-def67.2%
Simplified67.2%
fma-udef67.2%
Applied egg-rr67.2%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -9.88131e-323 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 9.9999999999999996e297Initial program 99.2%
if -9.88131e-323 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -0.0 or 9.9999999999999996e297 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 24.6%
+-commutative24.6%
*-commutative24.6%
associate-*r/24.3%
fma-def24.3%
associate-+l+24.3%
+-commutative24.3%
associate-*r/34.6%
fma-def34.6%
Simplified34.6%
Taylor expanded in b around inf 28.1%
Taylor expanded in t around 0 72.3%
+-commutative72.3%
times-frac86.0%
Simplified86.0%
Final simplification92.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 -1e-322)
(/ (+ x (/ z (/ t y))) (+ (+ a 1.0) (/ 1.0 (/ (/ t b) y))))
(if (or (<= t_1 0.0) (not (<= t_1 1e+298)))
(+ (/ z b) (* (/ t y) (/ x b)))
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 tmp;
if (t_1 <= -1e-322) {
tmp = (x + (z / (t / y))) / ((a + 1.0) + (1.0 / ((t / b) / y)));
} else if ((t_1 <= 0.0) || !(t_1 <= 1e+298)) {
tmp = (z / b) + ((t / y) * (x / 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 = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
if (t_1 <= (-1d-322)) then
tmp = (x + (z / (t / y))) / ((a + 1.0d0) + (1.0d0 / ((t / b) / y)))
else if ((t_1 <= 0.0d0) .or. (.not. (t_1 <= 1d+298))) then
tmp = (z / b) + ((t / y) * (x / 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 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= -1e-322) {
tmp = (x + (z / (t / y))) / ((a + 1.0) + (1.0 / ((t / b) / y)));
} else if ((t_1 <= 0.0) || !(t_1 <= 1e+298)) {
tmp = (z / b) + ((t / y) * (x / b));
} 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)) tmp = 0 if t_1 <= -1e-322: tmp = (x + (z / (t / y))) / ((a + 1.0) + (1.0 / ((t / b) / y))) elif (t_1 <= 0.0) or not (t_1 <= 1e+298): tmp = (z / b) + ((t / y) * (x / b)) else: tmp = t_1 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 <= -1e-322) tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / Float64(Float64(a + 1.0) + Float64(1.0 / Float64(Float64(t / b) / y)))); elseif ((t_1 <= 0.0) || !(t_1 <= 1e+298)) tmp = Float64(Float64(z / b) + Float64(Float64(t / y) * Float64(x / b))); 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)); tmp = 0.0; if (t_1 <= -1e-322) tmp = (x + (z / (t / y))) / ((a + 1.0) + (1.0 / ((t / b) / y))); elseif ((t_1 <= 0.0) || ~((t_1 <= 1e+298))) tmp = (z / b) + ((t / y) * (x / b)); else tmp = t_1; 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, -1e-322], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(1.0 / N[(N[(t / b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$1, 0.0], N[Not[LessEqual[t$95$1, 1e+298]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(N[(t / y), $MachinePrecision] * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\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 -1 \cdot 10^{-322}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{\left(a + 1\right) + \frac{1}{\frac{\frac{t}{b}}{y}}}\\
\mathbf{elif}\;t_1 \leq 0 \lor \neg \left(t_1 \leq 10^{+298}\right):\\
\;\;\;\;\frac{z}{b} + \frac{t}{y} \cdot \frac{x}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -9.88131e-323Initial program 83.3%
*-commutative83.3%
associate-/l*90.9%
associate-*l/87.1%
Simplified87.1%
associate-/r/88.6%
clear-num88.6%
Applied egg-rr88.6%
if -9.88131e-323 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -0.0 or 9.9999999999999996e297 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 24.6%
+-commutative24.6%
*-commutative24.6%
associate-*r/24.3%
fma-def24.3%
associate-+l+24.3%
+-commutative24.3%
associate-*r/34.6%
fma-def34.6%
Simplified34.6%
Taylor expanded in b around inf 28.1%
Taylor expanded in t around 0 72.3%
+-commutative72.3%
times-frac86.0%
Simplified86.0%
if -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 9.9999999999999996e297Initial program 99.6%
Final simplification91.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -1.2e-94)
t_1
(if (<= t 8.5e-57)
(/ z b)
(if (<= t 1.9e+62)
(/ (+ x (/ (* y z) t)) a)
(if (<= t 4.9e+89)
(/ z b)
(if (<= t 2.25e+157)
t_1
(if (<= t 7.2e+169)
(/ (* z (/ y t)) (+ a 1.0))
(if (<= t 4.7e+201) (/ x (+ 1.0 (* y (/ b t)))) t_1)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -1.2e-94) {
tmp = t_1;
} else if (t <= 8.5e-57) {
tmp = z / b;
} else if (t <= 1.9e+62) {
tmp = (x + ((y * z) / t)) / a;
} else if (t <= 4.9e+89) {
tmp = z / b;
} else if (t <= 2.25e+157) {
tmp = t_1;
} else if (t <= 7.2e+169) {
tmp = (z * (y / t)) / (a + 1.0);
} else if (t <= 4.7e+201) {
tmp = x / (1.0 + (y * (b / t)));
} 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 = x / (a + 1.0d0)
if (t <= (-1.2d-94)) then
tmp = t_1
else if (t <= 8.5d-57) then
tmp = z / b
else if (t <= 1.9d+62) then
tmp = (x + ((y * z) / t)) / a
else if (t <= 4.9d+89) then
tmp = z / b
else if (t <= 2.25d+157) then
tmp = t_1
else if (t <= 7.2d+169) then
tmp = (z * (y / t)) / (a + 1.0d0)
else if (t <= 4.7d+201) then
tmp = x / (1.0d0 + (y * (b / t)))
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 / (a + 1.0);
double tmp;
if (t <= -1.2e-94) {
tmp = t_1;
} else if (t <= 8.5e-57) {
tmp = z / b;
} else if (t <= 1.9e+62) {
tmp = (x + ((y * z) / t)) / a;
} else if (t <= 4.9e+89) {
tmp = z / b;
} else if (t <= 2.25e+157) {
tmp = t_1;
} else if (t <= 7.2e+169) {
tmp = (z * (y / t)) / (a + 1.0);
} else if (t <= 4.7e+201) {
tmp = x / (1.0 + (y * (b / t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -1.2e-94: tmp = t_1 elif t <= 8.5e-57: tmp = z / b elif t <= 1.9e+62: tmp = (x + ((y * z) / t)) / a elif t <= 4.9e+89: tmp = z / b elif t <= 2.25e+157: tmp = t_1 elif t <= 7.2e+169: tmp = (z * (y / t)) / (a + 1.0) elif t <= 4.7e+201: tmp = x / (1.0 + (y * (b / t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -1.2e-94) tmp = t_1; elseif (t <= 8.5e-57) tmp = Float64(z / b); elseif (t <= 1.9e+62) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / a); elseif (t <= 4.9e+89) tmp = Float64(z / b); elseif (t <= 2.25e+157) tmp = t_1; elseif (t <= 7.2e+169) tmp = Float64(Float64(z * Float64(y / t)) / Float64(a + 1.0)); elseif (t <= 4.7e+201) tmp = Float64(x / Float64(1.0 + Float64(y * Float64(b / t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + 1.0); tmp = 0.0; if (t <= -1.2e-94) tmp = t_1; elseif (t <= 8.5e-57) tmp = z / b; elseif (t <= 1.9e+62) tmp = (x + ((y * z) / t)) / a; elseif (t <= 4.9e+89) tmp = z / b; elseif (t <= 2.25e+157) tmp = t_1; elseif (t <= 7.2e+169) tmp = (z * (y / t)) / (a + 1.0); elseif (t <= 4.7e+201) tmp = x / (1.0 + (y * (b / t))); else tmp = t_1; 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[t, -1.2e-94], t$95$1, If[LessEqual[t, 8.5e-57], N[(z / b), $MachinePrecision], If[LessEqual[t, 1.9e+62], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 4.9e+89], N[(z / b), $MachinePrecision], If[LessEqual[t, 2.25e+157], t$95$1, If[LessEqual[t, 7.2e+169], N[(N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.7e+201], N[(x / N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -1.2 \cdot 10^{-94}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-57}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+62}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\
\mathbf{elif}\;t \leq 4.9 \cdot 10^{+89}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{+157}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{+169}:\\
\;\;\;\;\frac{z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{elif}\;t \leq 4.7 \cdot 10^{+201}:\\
\;\;\;\;\frac{x}{1 + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.2e-94 or 4.89999999999999996e89 < t < 2.24999999999999992e157 or 4.6999999999999998e201 < t Initial program 78.1%
+-commutative78.1%
*-commutative78.1%
associate-*r/86.5%
fma-def86.5%
associate-+l+86.5%
+-commutative86.5%
associate-*r/90.9%
fma-def90.9%
Simplified90.9%
Taylor expanded in y around 0 61.8%
if -1.2e-94 < t < 8.49999999999999955e-57 or 1.89999999999999992e62 < t < 4.89999999999999996e89Initial program 54.3%
+-commutative54.3%
*-commutative54.3%
associate-*r/48.1%
fma-def48.1%
associate-+l+48.1%
+-commutative48.1%
associate-*r/46.3%
fma-def46.3%
Simplified46.3%
Taylor expanded in y around inf 61.8%
if 8.49999999999999955e-57 < t < 1.89999999999999992e62Initial program 99.6%
+-commutative99.6%
*-commutative99.6%
associate-*r/99.6%
fma-def99.7%
associate-+l+99.7%
+-commutative99.7%
associate-*r/99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in a around inf 59.1%
if 2.24999999999999992e157 < t < 7.20000000000000019e169Initial program 76.3%
+-commutative76.3%
*-commutative76.3%
associate-*r/100.0%
fma-def100.0%
associate-+l+100.0%
+-commutative100.0%
associate-*r/99.6%
fma-def99.6%
Simplified99.6%
Taylor expanded in b around 0 52.1%
Taylor expanded in y around inf 5.8%
associate-/r*52.1%
associate-/l*75.9%
associate-/r/75.9%
Simplified75.9%
if 7.20000000000000019e169 < t < 4.6999999999999998e201Initial program 76.3%
+-commutative76.3%
*-commutative76.3%
associate-*r/76.3%
fma-def76.3%
associate-+l+76.3%
+-commutative76.3%
associate-*r/100.0%
fma-def100.0%
Simplified100.0%
Taylor expanded in z around 0 76.3%
Taylor expanded in a around 0 76.3%
associate-*r/100.0%
Simplified100.0%
Final simplification62.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ z b) (* (/ t y) (/ x b)))))
(if (<= b -4e+64)
t_1
(if (<= b 1.9e-56)
(+ (* (/ y t) (/ z (+ a 1.0))) (/ x (+ a 1.0)))
(if (<= b 1.45e+141)
(/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* b (/ y t))))
t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((t / y) * (x / b));
double tmp;
if (b <= -4e+64) {
tmp = t_1;
} else if (b <= 1.9e-56) {
tmp = ((y / t) * (z / (a + 1.0))) + (x / (a + 1.0));
} else if (b <= 1.45e+141) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (b * (y / t)));
} 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 / b) + ((t / y) * (x / b))
if (b <= (-4d+64)) then
tmp = t_1
else if (b <= 1.9d-56) then
tmp = ((y / t) * (z / (a + 1.0d0))) + (x / (a + 1.0d0))
else if (b <= 1.45d+141) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (b * (y / t)))
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 / b) + ((t / y) * (x / b));
double tmp;
if (b <= -4e+64) {
tmp = t_1;
} else if (b <= 1.9e-56) {
tmp = ((y / t) * (z / (a + 1.0))) + (x / (a + 1.0));
} else if (b <= 1.45e+141) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (b * (y / t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z / b) + ((t / y) * (x / b)) tmp = 0 if b <= -4e+64: tmp = t_1 elif b <= 1.9e-56: tmp = ((y / t) * (z / (a + 1.0))) + (x / (a + 1.0)) elif b <= 1.45e+141: tmp = (x + (y * (z / t))) / ((a + 1.0) + (b * (y / t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z / b) + Float64(Float64(t / y) * Float64(x / b))) tmp = 0.0 if (b <= -4e+64) tmp = t_1; elseif (b <= 1.9e-56) tmp = Float64(Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))) + Float64(x / Float64(a + 1.0))); elseif (b <= 1.45e+141) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z / b) + ((t / y) * (x / b)); tmp = 0.0; if (b <= -4e+64) tmp = t_1; elseif (b <= 1.9e-56) tmp = ((y / t) * (z / (a + 1.0))) + (x / (a + 1.0)); elseif (b <= 1.45e+141) tmp = (x + (y * (z / t))) / ((a + 1.0) + (b * (y / t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z / b), $MachinePrecision] + N[(N[(t / y), $MachinePrecision] * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4e+64], t$95$1, If[LessEqual[b, 1.9e-56], N[(N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.45e+141], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{b} + \frac{t}{y} \cdot \frac{x}{b}\\
\mathbf{if}\;b \leq -4 \cdot 10^{+64}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 1.9 \cdot 10^{-56}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1} + \frac{x}{a + 1}\\
\mathbf{elif}\;b \leq 1.45 \cdot 10^{+141}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if b < -4.00000000000000009e64 or 1.45000000000000003e141 < b Initial program 44.5%
+-commutative44.5%
*-commutative44.5%
associate-*r/42.3%
fma-def42.3%
associate-+l+42.3%
+-commutative42.3%
associate-*r/47.7%
fma-def47.7%
Simplified47.7%
Taylor expanded in b around inf 34.6%
Taylor expanded in t around 0 66.0%
+-commutative66.0%
times-frac80.2%
Simplified80.2%
if -4.00000000000000009e64 < b < 1.9000000000000001e-56Initial program 87.3%
+-commutative87.3%
*-commutative87.3%
associate-*r/90.0%
fma-def90.1%
associate-+l+90.1%
+-commutative90.1%
associate-*r/90.1%
fma-def90.1%
Simplified90.1%
Taylor expanded in b around 0 80.5%
Taylor expanded in y around 0 79.8%
+-commutative79.8%
times-frac86.8%
fma-def86.8%
Simplified86.8%
fma-udef86.8%
Applied egg-rr86.8%
if 1.9000000000000001e-56 < b < 1.45000000000000003e141Initial program 68.5%
*-commutative68.5%
associate-/l*78.0%
associate-*l/80.3%
Simplified80.3%
associate-/r/78.0%
Applied egg-rr78.0%
Final simplification83.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ z b) (* (/ t y) (/ x b)))))
(if (<= b -1.5e+123)
t_1
(if (<= b 5.8e-204)
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ y (/ t b))))
(if (<= b 1.2e+141)
(/ (+ x (/ z (/ t y))) (+ (+ a 1.0) (* b (/ y t))))
t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((t / y) * (x / b));
double tmp;
if (b <= -1.5e+123) {
tmp = t_1;
} else if (b <= 5.8e-204) {
tmp = (x + ((y * z) / t)) / ((a + 1.0) + (y / (t / b)));
} else if (b <= 1.2e+141) {
tmp = (x + (z / (t / y))) / ((a + 1.0) + (b * (y / t)));
} 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 / b) + ((t / y) * (x / b))
if (b <= (-1.5d+123)) then
tmp = t_1
else if (b <= 5.8d-204) then
tmp = (x + ((y * z) / t)) / ((a + 1.0d0) + (y / (t / b)))
else if (b <= 1.2d+141) then
tmp = (x + (z / (t / y))) / ((a + 1.0d0) + (b * (y / t)))
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 / b) + ((t / y) * (x / b));
double tmp;
if (b <= -1.5e+123) {
tmp = t_1;
} else if (b <= 5.8e-204) {
tmp = (x + ((y * z) / t)) / ((a + 1.0) + (y / (t / b)));
} else if (b <= 1.2e+141) {
tmp = (x + (z / (t / y))) / ((a + 1.0) + (b * (y / t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z / b) + ((t / y) * (x / b)) tmp = 0 if b <= -1.5e+123: tmp = t_1 elif b <= 5.8e-204: tmp = (x + ((y * z) / t)) / ((a + 1.0) + (y / (t / b))) elif b <= 1.2e+141: tmp = (x + (z / (t / y))) / ((a + 1.0) + (b * (y / t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z / b) + Float64(Float64(t / y) * Float64(x / b))) tmp = 0.0 if (b <= -1.5e+123) tmp = t_1; elseif (b <= 5.8e-204) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); elseif (b <= 1.2e+141) tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z / b) + ((t / y) * (x / b)); tmp = 0.0; if (b <= -1.5e+123) tmp = t_1; elseif (b <= 5.8e-204) tmp = (x + ((y * z) / t)) / ((a + 1.0) + (y / (t / b))); elseif (b <= 1.2e+141) tmp = (x + (z / (t / y))) / ((a + 1.0) + (b * (y / t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z / b), $MachinePrecision] + N[(N[(t / y), $MachinePrecision] * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.5e+123], t$95$1, If[LessEqual[b, 5.8e-204], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.2e+141], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{b} + \frac{t}{y} \cdot \frac{x}{b}\\
\mathbf{if}\;b \leq -1.5 \cdot 10^{+123}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 5.8 \cdot 10^{-204}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{elif}\;b \leq 1.2 \cdot 10^{+141}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if b < -1.50000000000000004e123 or 1.19999999999999999e141 < b Initial program 40.7%
+-commutative40.7%
*-commutative40.7%
associate-*r/39.4%
fma-def39.4%
associate-+l+39.4%
+-commutative39.4%
associate-*r/45.8%
fma-def45.8%
Simplified45.8%
Taylor expanded in b around inf 32.6%
Taylor expanded in t around 0 67.2%
+-commutative67.2%
times-frac84.1%
Simplified84.1%
if -1.50000000000000004e123 < b < 5.80000000000000018e-204Initial program 85.2%
associate-/l*85.2%
Simplified85.2%
if 5.80000000000000018e-204 < b < 1.19999999999999999e141Initial program 75.6%
*-commutative75.6%
associate-/l*86.4%
associate-*l/86.3%
Simplified86.3%
Final simplification85.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -2.15e+72) (not (<= b 1.8e+141))) (+ (/ z b) (* (/ t y) (/ x b))) (/ (+ x (/ z (/ t y))) (+ (+ a 1.0) (* b (/ y t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2.15e+72) || !(b <= 1.8e+141)) {
tmp = (z / b) + ((t / y) * (x / b));
} else {
tmp = (x + (z / (t / y))) / ((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 ((b <= (-2.15d+72)) .or. (.not. (b <= 1.8d+141))) then
tmp = (z / b) + ((t / y) * (x / b))
else
tmp = (x + (z / (t / y))) / ((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 ((b <= -2.15e+72) || !(b <= 1.8e+141)) {
tmp = (z / b) + ((t / y) * (x / b));
} else {
tmp = (x + (z / (t / y))) / ((a + 1.0) + (b * (y / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -2.15e+72) or not (b <= 1.8e+141): tmp = (z / b) + ((t / y) * (x / b)) else: tmp = (x + (z / (t / y))) / ((a + 1.0) + (b * (y / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -2.15e+72) || !(b <= 1.8e+141)) tmp = Float64(Float64(z / b) + Float64(Float64(t / y) * Float64(x / b))); else tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / 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 ((b <= -2.15e+72) || ~((b <= 1.8e+141))) tmp = (z / b) + ((t / y) * (x / b)); else tmp = (x + (z / (t / y))) / ((a + 1.0) + (b * (y / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -2.15e+72], N[Not[LessEqual[b, 1.8e+141]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(N[(t / y), $MachinePrecision] * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.15 \cdot 10^{+72} \lor \neg \left(b \leq 1.8 \cdot 10^{+141}\right):\\
\;\;\;\;\frac{z}{b} + \frac{t}{y} \cdot \frac{x}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\end{array}
\end{array}
if b < -2.1500000000000001e72 or 1.8000000000000001e141 < b Initial program 44.5%
+-commutative44.5%
*-commutative44.5%
associate-*r/42.3%
fma-def42.3%
associate-+l+42.3%
+-commutative42.3%
associate-*r/47.7%
fma-def47.7%
Simplified47.7%
Taylor expanded in b around inf 34.6%
Taylor expanded in t around 0 66.0%
+-commutative66.0%
times-frac80.2%
Simplified80.2%
if -2.1500000000000001e72 < b < 1.8000000000000001e141Initial program 82.7%
*-commutative82.7%
associate-/l*87.1%
associate-*l/84.5%
Simplified84.5%
Final simplification83.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ 1.0 (+ a (* b (/ y t)))))))
(if (<= t -6.4e-156)
t_1
(if (<= t 1.9e-36)
(+ (/ z b) (* (/ t y) (/ x b)))
(if (<= t 5e+61)
(/ (+ x (/ (* y z) t)) a)
(if (<= t 2e+69) (/ z b) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 + (a + (b * (y / t))));
double tmp;
if (t <= -6.4e-156) {
tmp = t_1;
} else if (t <= 1.9e-36) {
tmp = (z / b) + ((t / y) * (x / b));
} else if (t <= 5e+61) {
tmp = (x + ((y * z) / t)) / a;
} else if (t <= 2e+69) {
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 = x / (1.0d0 + (a + (b * (y / t))))
if (t <= (-6.4d-156)) then
tmp = t_1
else if (t <= 1.9d-36) then
tmp = (z / b) + ((t / y) * (x / b))
else if (t <= 5d+61) then
tmp = (x + ((y * z) / t)) / a
else if (t <= 2d+69) 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 = x / (1.0 + (a + (b * (y / t))));
double tmp;
if (t <= -6.4e-156) {
tmp = t_1;
} else if (t <= 1.9e-36) {
tmp = (z / b) + ((t / y) * (x / b));
} else if (t <= 5e+61) {
tmp = (x + ((y * z) / t)) / a;
} else if (t <= 2e+69) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 + (a + (b * (y / t)))) tmp = 0 if t <= -6.4e-156: tmp = t_1 elif t <= 1.9e-36: tmp = (z / b) + ((t / y) * (x / b)) elif t <= 5e+61: tmp = (x + ((y * z) / t)) / a elif t <= 2e+69: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 + Float64(a + Float64(b * Float64(y / t))))) tmp = 0.0 if (t <= -6.4e-156) tmp = t_1; elseif (t <= 1.9e-36) tmp = Float64(Float64(z / b) + Float64(Float64(t / y) * Float64(x / b))); elseif (t <= 5e+61) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / a); elseif (t <= 2e+69) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 + (a + (b * (y / t)))); tmp = 0.0; if (t <= -6.4e-156) tmp = t_1; elseif (t <= 1.9e-36) tmp = (z / b) + ((t / y) * (x / b)); elseif (t <= 5e+61) tmp = (x + ((y * z) / t)) / a; elseif (t <= 2e+69) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 + N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.4e-156], t$95$1, If[LessEqual[t, 1.9e-36], N[(N[(z / b), $MachinePrecision] + N[(N[(t / y), $MachinePrecision] * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e+61], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 2e+69], N[(z / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\
\mathbf{if}\;t \leq -6.4 \cdot 10^{-156}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-36}:\\
\;\;\;\;\frac{z}{b} + \frac{t}{y} \cdot \frac{x}{b}\\
\mathbf{elif}\;t \leq 5 \cdot 10^{+61}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\
\mathbf{elif}\;t \leq 2 \cdot 10^{+69}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -6.39999999999999964e-156 or 2.0000000000000001e69 < t Initial program 76.4%
+-commutative76.4%
*-commutative76.4%
associate-*r/83.9%
fma-def83.9%
associate-+l+83.9%
+-commutative83.9%
associate-*r/88.8%
fma-def88.8%
Simplified88.8%
Taylor expanded in z around 0 62.6%
div-inv62.6%
*-commutative62.6%
associate-*l*66.8%
div-inv66.8%
Applied egg-rr66.8%
if -6.39999999999999964e-156 < t < 1.89999999999999985e-36Initial program 53.2%
+-commutative53.2%
*-commutative53.2%
associate-*r/45.7%
fma-def45.7%
associate-+l+45.7%
+-commutative45.7%
associate-*r/42.3%
fma-def42.3%
Simplified42.3%
Taylor expanded in b around inf 39.1%
Taylor expanded in t around 0 70.4%
+-commutative70.4%
times-frac68.5%
Simplified68.5%
if 1.89999999999999985e-36 < t < 5.00000000000000018e61Initial program 99.6%
+-commutative99.6%
*-commutative99.6%
associate-*r/99.7%
fma-def99.7%
associate-+l+99.7%
+-commutative99.7%
associate-*r/99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in a around inf 67.7%
if 5.00000000000000018e61 < t < 2.0000000000000001e69Initial program 50.0%
+-commutative50.0%
*-commutative50.0%
associate-*r/50.0%
fma-def50.0%
associate-+l+50.0%
+-commutative50.0%
associate-*r/49.2%
fma-def49.2%
Simplified49.2%
Taylor expanded in y around inf 100.0%
Final simplification67.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -4.4e+64) (not (<= b 1800000000000.0))) (+ (/ z b) (* (/ t y) (/ x b))) (+ (* (/ y t) (/ z (+ a 1.0))) (/ x (+ a 1.0)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -4.4e+64) || !(b <= 1800000000000.0)) {
tmp = (z / b) + ((t / y) * (x / b));
} else {
tmp = ((y / t) * (z / (a + 1.0))) + (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 ((b <= (-4.4d+64)) .or. (.not. (b <= 1800000000000.0d0))) then
tmp = (z / b) + ((t / y) * (x / b))
else
tmp = ((y / t) * (z / (a + 1.0d0))) + (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 ((b <= -4.4e+64) || !(b <= 1800000000000.0)) {
tmp = (z / b) + ((t / y) * (x / b));
} else {
tmp = ((y / t) * (z / (a + 1.0))) + (x / (a + 1.0));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -4.4e+64) or not (b <= 1800000000000.0): tmp = (z / b) + ((t / y) * (x / b)) else: tmp = ((y / t) * (z / (a + 1.0))) + (x / (a + 1.0)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -4.4e+64) || !(b <= 1800000000000.0)) tmp = Float64(Float64(z / b) + Float64(Float64(t / y) * Float64(x / b))); else tmp = Float64(Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))) + Float64(x / Float64(a + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -4.4e+64) || ~((b <= 1800000000000.0))) tmp = (z / b) + ((t / y) * (x / b)); else tmp = ((y / t) * (z / (a + 1.0))) + (x / (a + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -4.4e+64], N[Not[LessEqual[b, 1800000000000.0]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(N[(t / y), $MachinePrecision] * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.4 \cdot 10^{+64} \lor \neg \left(b \leq 1800000000000\right):\\
\;\;\;\;\frac{z}{b} + \frac{t}{y} \cdot \frac{x}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1} + \frac{x}{a + 1}\\
\end{array}
\end{array}
if b < -4.40000000000000004e64 or 1.8e12 < b Initial program 48.0%
+-commutative48.0%
*-commutative48.0%
associate-*r/47.1%
fma-def47.1%
associate-+l+47.1%
+-commutative47.1%
associate-*r/51.3%
fma-def51.3%
Simplified51.3%
Taylor expanded in b around inf 32.5%
Taylor expanded in t around 0 62.7%
+-commutative62.7%
times-frac73.9%
Simplified73.9%
if -4.40000000000000004e64 < b < 1.8e12Initial program 86.0%
+-commutative86.0%
*-commutative86.0%
associate-*r/90.5%
fma-def90.6%
associate-+l+90.6%
+-commutative90.6%
associate-*r/90.6%
fma-def90.6%
Simplified90.6%
Taylor expanded in b around 0 77.7%
Taylor expanded in y around 0 76.4%
+-commutative76.4%
times-frac84.4%
fma-def84.4%
Simplified84.4%
fma-udef84.4%
Applied egg-rr84.4%
Final simplification79.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.22e+67) (not (<= b 760000000000.0))) (+ (/ z b) (* (/ t y) (/ x b))) (/ x (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.22e+67) || !(b <= 760000000000.0)) {
tmp = (z / b) + ((t / y) * (x / 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 ((b <= (-1.22d+67)) .or. (.not. (b <= 760000000000.0d0))) then
tmp = (z / b) + ((t / y) * (x / 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 ((b <= -1.22e+67) || !(b <= 760000000000.0)) {
tmp = (z / b) + ((t / y) * (x / b));
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.22e+67) or not (b <= 760000000000.0): tmp = (z / b) + ((t / y) * (x / b)) else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.22e+67) || !(b <= 760000000000.0)) tmp = Float64(Float64(z / b) + Float64(Float64(t / y) * Float64(x / 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 ((b <= -1.22e+67) || ~((b <= 760000000000.0))) tmp = (z / b) + ((t / y) * (x / b)); else tmp = x / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.22e+67], N[Not[LessEqual[b, 760000000000.0]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(N[(t / y), $MachinePrecision] * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.22 \cdot 10^{+67} \lor \neg \left(b \leq 760000000000\right):\\
\;\;\;\;\frac{z}{b} + \frac{t}{y} \cdot \frac{x}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if b < -1.22000000000000004e67 or 7.6e11 < b Initial program 48.0%
+-commutative48.0%
*-commutative48.0%
associate-*r/47.1%
fma-def47.1%
associate-+l+47.1%
+-commutative47.1%
associate-*r/51.3%
fma-def51.3%
Simplified51.3%
Taylor expanded in b around inf 32.5%
Taylor expanded in t around 0 62.7%
+-commutative62.7%
times-frac73.9%
Simplified73.9%
if -1.22000000000000004e67 < b < 7.6e11Initial program 86.0%
+-commutative86.0%
*-commutative86.0%
associate-*r/90.5%
fma-def90.6%
associate-+l+90.6%
+-commutative90.6%
associate-*r/90.6%
fma-def90.6%
Simplified90.6%
Taylor expanded in y around 0 53.7%
Final simplification62.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -5.8e+65) (not (<= b 66000000000000.0))) (+ (/ z b) (* (/ t y) (/ x b))) (/ (+ x (/ (* y z) t)) (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -5.8e+65) || !(b <= 66000000000000.0)) {
tmp = (z / b) + ((t / y) * (x / b));
} 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 ((b <= (-5.8d+65)) .or. (.not. (b <= 66000000000000.0d0))) then
tmp = (z / b) + ((t / y) * (x / b))
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 ((b <= -5.8e+65) || !(b <= 66000000000000.0)) {
tmp = (z / b) + ((t / y) * (x / b));
} else {
tmp = (x + ((y * z) / t)) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -5.8e+65) or not (b <= 66000000000000.0): tmp = (z / b) + ((t / y) * (x / b)) else: tmp = (x + ((y * z) / t)) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -5.8e+65) || !(b <= 66000000000000.0)) tmp = Float64(Float64(z / b) + Float64(Float64(t / y) * Float64(x / b))); 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 ((b <= -5.8e+65) || ~((b <= 66000000000000.0))) tmp = (z / b) + ((t / y) * (x / b)); else tmp = (x + ((y * z) / t)) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -5.8e+65], N[Not[LessEqual[b, 66000000000000.0]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(N[(t / y), $MachinePrecision] * N[(x / b), $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}\;b \leq -5.8 \cdot 10^{+65} \lor \neg \left(b \leq 66000000000000\right):\\
\;\;\;\;\frac{z}{b} + \frac{t}{y} \cdot \frac{x}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\end{array}
\end{array}
if b < -5.8000000000000001e65 or 6.6e13 < b Initial program 48.0%
+-commutative48.0%
*-commutative48.0%
associate-*r/47.1%
fma-def47.1%
associate-+l+47.1%
+-commutative47.1%
associate-*r/51.3%
fma-def51.3%
Simplified51.3%
Taylor expanded in b around inf 32.5%
Taylor expanded in t around 0 62.7%
+-commutative62.7%
times-frac73.9%
Simplified73.9%
if -5.8000000000000001e65 < b < 6.6e13Initial program 86.0%
+-commutative86.0%
*-commutative86.0%
associate-*r/90.5%
fma-def90.6%
associate-+l+90.6%
+-commutative90.6%
associate-*r/90.6%
fma-def90.6%
Simplified90.6%
Taylor expanded in b around 0 77.7%
Final simplification76.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -1.06e-94)
t_1
(if (<= t 3.55e-106)
(/ z b)
(if (<= t 2.55e+29)
(/ (/ z a) (/ t y))
(if (<= t 1.1e+72) (/ z b) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -1.06e-94) {
tmp = t_1;
} else if (t <= 3.55e-106) {
tmp = z / b;
} else if (t <= 2.55e+29) {
tmp = (z / a) / (t / y);
} else if (t <= 1.1e+72) {
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 = x / (a + 1.0d0)
if (t <= (-1.06d-94)) then
tmp = t_1
else if (t <= 3.55d-106) then
tmp = z / b
else if (t <= 2.55d+29) then
tmp = (z / a) / (t / y)
else if (t <= 1.1d+72) 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 = x / (a + 1.0);
double tmp;
if (t <= -1.06e-94) {
tmp = t_1;
} else if (t <= 3.55e-106) {
tmp = z / b;
} else if (t <= 2.55e+29) {
tmp = (z / a) / (t / y);
} else if (t <= 1.1e+72) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -1.06e-94: tmp = t_1 elif t <= 3.55e-106: tmp = z / b elif t <= 2.55e+29: tmp = (z / a) / (t / y) elif t <= 1.1e+72: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -1.06e-94) tmp = t_1; elseif (t <= 3.55e-106) tmp = Float64(z / b); elseif (t <= 2.55e+29) tmp = Float64(Float64(z / a) / Float64(t / y)); elseif (t <= 1.1e+72) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + 1.0); tmp = 0.0; if (t <= -1.06e-94) tmp = t_1; elseif (t <= 3.55e-106) tmp = z / b; elseif (t <= 2.55e+29) tmp = (z / a) / (t / y); elseif (t <= 1.1e+72) tmp = z / b; else tmp = t_1; 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[t, -1.06e-94], t$95$1, If[LessEqual[t, 3.55e-106], N[(z / b), $MachinePrecision], If[LessEqual[t, 2.55e+29], N[(N[(z / a), $MachinePrecision] / N[(t / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.1e+72], N[(z / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -1.06 \cdot 10^{-94}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.55 \cdot 10^{-106}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 2.55 \cdot 10^{+29}:\\
\;\;\;\;\frac{\frac{z}{a}}{\frac{t}{y}}\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+72}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.06e-94 or 1.1e72 < t Initial program 76.8%
+-commutative76.8%
*-commutative76.8%
associate-*r/85.1%
fma-def85.1%
associate-+l+85.1%
+-commutative85.1%
associate-*r/90.4%
fma-def90.4%
Simplified90.4%
Taylor expanded in y around 0 59.3%
if -1.06e-94 < t < 3.5499999999999998e-106 or 2.55e29 < t < 1.1e72Initial program 55.4%
+-commutative55.4%
*-commutative55.4%
associate-*r/49.8%
fma-def49.8%
associate-+l+49.8%
+-commutative49.8%
associate-*r/46.7%
fma-def46.7%
Simplified46.7%
Taylor expanded in y around inf 64.7%
if 3.5499999999999998e-106 < t < 2.55e29Initial program 88.8%
+-commutative88.8%
*-commutative88.8%
associate-*r/82.8%
fma-def82.9%
associate-+l+82.9%
+-commutative82.9%
associate-*r/82.9%
fma-def82.9%
Simplified82.9%
Taylor expanded in b around 0 62.3%
Taylor expanded in y around inf 38.3%
associate-/r*38.5%
associate-/l*32.4%
associate-/r/38.5%
Simplified38.5%
Taylor expanded in a around inf 37.1%
*-commutative37.1%
times-frac42.9%
Simplified42.9%
clear-num42.8%
un-div-inv48.7%
Applied egg-rr48.7%
Final simplification60.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -6.8e-95) (not (<= t 2.6e+68))) (/ x (+ a 1.0)) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -6.8e-95) || !(t <= 2.6e+68)) {
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 ((t <= (-6.8d-95)) .or. (.not. (t <= 2.6d+68))) 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 ((t <= -6.8e-95) || !(t <= 2.6e+68)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -6.8e-95) or not (t <= 2.6e+68): tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -6.8e-95) || !(t <= 2.6e+68)) 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 ((t <= -6.8e-95) || ~((t <= 2.6e+68))) tmp = x / (a + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -6.8e-95], N[Not[LessEqual[t, 2.6e+68]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.8 \cdot 10^{-95} \lor \neg \left(t \leq 2.6 \cdot 10^{+68}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -6.79999999999999986e-95 or 2.5999999999999998e68 < t Initial program 76.8%
+-commutative76.8%
*-commutative76.8%
associate-*r/85.1%
fma-def85.1%
associate-+l+85.1%
+-commutative85.1%
associate-*r/90.4%
fma-def90.4%
Simplified90.4%
Taylor expanded in y around 0 59.3%
if -6.79999999999999986e-95 < t < 2.5999999999999998e68Initial program 60.4%
+-commutative60.4%
*-commutative60.4%
associate-*r/54.7%
fma-def54.7%
associate-+l+54.7%
+-commutative54.7%
associate-*r/52.2%
fma-def52.2%
Simplified52.2%
Taylor expanded in y around inf 58.0%
Final simplification58.7%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.0) (/ x a) (if (<= a 1.0) x (/ x a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.0) {
tmp = x / a;
} else if (a <= 1.0) {
tmp = x;
} else {
tmp = x / a;
}
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 <= (-1.0d0)) then
tmp = x / a
else if (a <= 1.0d0) then
tmp = x
else
tmp = x / a
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 <= -1.0) {
tmp = x / a;
} else if (a <= 1.0) {
tmp = x;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.0: tmp = x / a elif a <= 1.0: tmp = x else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.0) tmp = Float64(x / a); elseif (a <= 1.0) tmp = x; else tmp = Float64(x / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.0) tmp = x / a; elseif (a <= 1.0) tmp = x; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.0], N[(x / a), $MachinePrecision], If[LessEqual[a, 1.0], x, N[(x / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;a \leq 1:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if a < -1 or 1 < a Initial program 66.2%
+-commutative66.2%
*-commutative66.2%
associate-*r/68.1%
fma-def68.1%
associate-+l+68.1%
+-commutative68.1%
associate-*r/70.4%
fma-def70.4%
Simplified70.4%
Taylor expanded in y around 0 41.5%
Taylor expanded in a around inf 40.9%
if -1 < a < 1Initial program 73.0%
+-commutative73.0%
*-commutative73.0%
associate-*r/75.3%
fma-def75.3%
associate-+l+75.3%
+-commutative75.3%
associate-*r/76.8%
fma-def76.8%
Simplified76.8%
Taylor expanded in y around 0 40.0%
Taylor expanded in a around 0 39.6%
Final simplification40.3%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.62e-65) (/ z b) (if (<= y 5.1e-23) x (/ z b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.62e-65) {
tmp = z / b;
} else if (y <= 5.1e-23) {
tmp = x;
} 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.62d-65)) then
tmp = z / b
else if (y <= 5.1d-23) then
tmp = x
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.62e-65) {
tmp = z / b;
} else if (y <= 5.1e-23) {
tmp = x;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.62e-65: tmp = z / b elif y <= 5.1e-23: tmp = x else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.62e-65) tmp = Float64(z / b); elseif (y <= 5.1e-23) tmp = x; 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.62e-65) tmp = z / b; elseif (y <= 5.1e-23) tmp = x; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.62e-65], N[(z / b), $MachinePrecision], If[LessEqual[y, 5.1e-23], x, N[(z / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.62 \cdot 10^{-65}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 5.1 \cdot 10^{-23}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -1.6200000000000001e-65 or 5.10000000000000011e-23 < y Initial program 52.5%
+-commutative52.5%
*-commutative52.5%
associate-*r/55.7%
fma-def55.7%
associate-+l+55.7%
+-commutative55.7%
associate-*r/61.5%
fma-def61.5%
Simplified61.5%
Taylor expanded in y around inf 47.5%
if -1.6200000000000001e-65 < y < 5.10000000000000011e-23Initial program 93.7%
+-commutative93.7%
*-commutative93.7%
associate-*r/94.3%
fma-def94.3%
associate-+l+94.3%
+-commutative94.3%
associate-*r/90.7%
fma-def90.7%
Simplified90.7%
Taylor expanded in y around 0 63.1%
Taylor expanded in a around 0 36.8%
Final simplification43.1%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 69.6%
+-commutative69.6%
*-commutative69.6%
associate-*r/71.7%
fma-def71.7%
associate-+l+71.7%
+-commutative71.7%
associate-*r/73.6%
fma-def73.6%
Simplified73.6%
Taylor expanded in y around 0 40.8%
Taylor expanded in a around 0 21.5%
Final simplification21.5%
(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 2023258
(FPCore (x y z t a b)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:herbie-target
(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))))