
(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))))
(t_2 (* (/ z (+ 1.0 (fma y (/ b t) a))) (/ y t)))
(t_3 (* t (- (/ x b) (/ (fma z a z) (* b b))))))
(if (<= t_1 (- INFINITY))
t_2
(if (<= t_1 -2e-319)
t_1
(if (<= t_1 0.0)
(+ (/ z b) (/ (fma (* (- -1.0 a) t_3) (/ t (* y b)) t_3) y))
(if (<= t_1 5e+306) t_1 (if (<= t_1 INFINITY) t_2 (/ 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 t_2 = (z / (1.0 + fma(y, (b / t), a))) * (y / t);
double t_3 = t * ((x / b) - (fma(z, a, z) / (b * b)));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_1 <= -2e-319) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (z / b) + (fma(((-1.0 - a) * t_3), (t / (y * b)), t_3) / y);
} else if (t_1 <= 5e+306) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_2;
} 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))) t_2 = Float64(Float64(z / Float64(1.0 + fma(y, Float64(b / t), a))) * Float64(y / t)) t_3 = Float64(t * Float64(Float64(x / b) - Float64(fma(z, a, z) / Float64(b * b)))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = t_2; elseif (t_1 <= -2e-319) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(z / b) + Float64(fma(Float64(Float64(-1.0 - a) * t_3), Float64(t / Float64(y * b)), t_3) / y)); elseif (t_1 <= 5e+306) tmp = t_1; elseif (t_1 <= Inf) tmp = t_2; else tmp = Float64(z / b); end return 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]}, Block[{t$95$2 = N[(N[(z / N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(x / b), $MachinePrecision] - N[(N[(z * a + z), $MachinePrecision] / N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, -2e-319], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(z / b), $MachinePrecision] + N[(N[(N[(N[(-1.0 - a), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t / N[(y * b), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+306], t$95$1, If[LessEqual[t$95$1, Infinity], t$95$2, 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}}\\
t_2 := \frac{z}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)} \cdot \frac{y}{t}\\
t_3 := t \cdot \left(\frac{x}{b} - \frac{\mathsf{fma}\left(z, a, z\right)}{b \cdot b}\right)\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-319}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{z}{b} + \frac{\mathsf{fma}\left(\left(-1 - a\right) \cdot t\_3, \frac{t}{y \cdot b}, t\_3\right)}{y}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+306}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_2\\
\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.0 or 4.99999999999999993e306 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 39.0%
/-lowering-/.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
associate-+l+N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6475.9
Applied egg-rr75.9%
Taylor expanded in z around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6437.9
Simplified37.9%
*-commutativeN/A
*-commutativeN/A
distribute-lft1-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*l/N/A
associate-*r/N/A
associate-+r+N/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr89.4%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.99998e-319 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 4.99999999999999993e306Initial program 98.5%
if -1.99998e-319 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 0.0Initial program 45.7%
Taylor expanded in y around -inf
Simplified73.3%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 0.0%
Taylor expanded in y around inf
/-lowering-/.f6495.9
Simplified95.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
(t_2 (* (/ z (+ 1.0 (fma y (/ b t) a))) (/ y t))))
(if (<= t_1 (- INFINITY))
t_2
(if (<= t_1 -2e-319)
t_1
(if (<= t_1 0.0)
(fma t (- (/ x (* y b)) (/ (fma z a z) (* b (* y b)))) (/ z b))
(if (<= t_1 5e+306) t_1 (if (<= t_1 INFINITY) t_2 (/ 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 t_2 = (z / (1.0 + fma(y, (b / t), a))) * (y / t);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_1 <= -2e-319) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = fma(t, ((x / (y * b)) - (fma(z, a, z) / (b * (y * b)))), (z / b));
} else if (t_1 <= 5e+306) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_2;
} 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))) t_2 = Float64(Float64(z / Float64(1.0 + fma(y, Float64(b / t), a))) * Float64(y / t)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = t_2; elseif (t_1 <= -2e-319) tmp = t_1; elseif (t_1 <= 0.0) tmp = fma(t, Float64(Float64(x / Float64(y * b)) - Float64(fma(z, a, z) / Float64(b * Float64(y * b)))), Float64(z / b)); elseif (t_1 <= 5e+306) tmp = t_1; elseif (t_1 <= Inf) tmp = t_2; else tmp = Float64(z / b); end return 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]}, Block[{t$95$2 = N[(N[(z / N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, -2e-319], t$95$1, If[LessEqual[t$95$1, 0.0], N[(t * N[(N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision] - N[(N[(z * a + z), $MachinePrecision] / N[(b * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+306], t$95$1, If[LessEqual[t$95$1, Infinity], t$95$2, 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}}\\
t_2 := \frac{z}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)} \cdot \frac{y}{t}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-319}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(t, \frac{x}{y \cdot b} - \frac{\mathsf{fma}\left(z, a, z\right)}{b \cdot \left(y \cdot b\right)}, \frac{z}{b}\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+306}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_2\\
\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.0 or 4.99999999999999993e306 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 39.0%
/-lowering-/.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
associate-+l+N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6475.9
Applied egg-rr75.9%
Taylor expanded in z around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6437.9
Simplified37.9%
*-commutativeN/A
*-commutativeN/A
distribute-lft1-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*l/N/A
associate-*r/N/A
associate-+r+N/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr89.4%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.99998e-319 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 4.99999999999999993e306Initial program 98.5%
if -1.99998e-319 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 0.0Initial program 45.7%
Taylor expanded in y around inf
sub-negN/A
associate-+l+N/A
sub-negN/A
associate-/l*N/A
associate-/l*N/A
distribute-lft-out--N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified65.6%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 0.0%
Taylor expanded in y around inf
/-lowering-/.f6495.9
Simplified95.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
(t_2 (* (/ z (+ 1.0 (fma y (/ b t) a))) (/ y t))))
(if (<= t_1 (- INFINITY))
t_2
(if (<= t_1 -2e-319)
t_1
(if (<= t_1 0.0)
(/ (* y z) (fma b y (fma t a t)))
(if (<= t_1 5e+306) t_1 (if (<= t_1 INFINITY) t_2 (/ 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 t_2 = (z / (1.0 + fma(y, (b / t), a))) * (y / t);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_1 <= -2e-319) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (y * z) / fma(b, y, fma(t, a, t));
} else if (t_1 <= 5e+306) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_2;
} 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))) t_2 = Float64(Float64(z / Float64(1.0 + fma(y, Float64(b / t), a))) * Float64(y / t)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = t_2; elseif (t_1 <= -2e-319) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(y * z) / fma(b, y, fma(t, a, t))); elseif (t_1 <= 5e+306) tmp = t_1; elseif (t_1 <= Inf) tmp = t_2; else tmp = Float64(z / b); end return 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]}, Block[{t$95$2 = N[(N[(z / N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, -2e-319], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(y * z), $MachinePrecision] / N[(b * y + N[(t * a + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+306], t$95$1, If[LessEqual[t$95$1, Infinity], t$95$2, 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}}\\
t_2 := \frac{z}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)} \cdot \frac{y}{t}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-319}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{y \cdot z}{\mathsf{fma}\left(b, y, \mathsf{fma}\left(t, a, t\right)\right)}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+306}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_2\\
\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.0 or 4.99999999999999993e306 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 39.0%
/-lowering-/.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
associate-+l+N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6475.9
Applied egg-rr75.9%
Taylor expanded in z around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6437.9
Simplified37.9%
*-commutativeN/A
*-commutativeN/A
distribute-lft1-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*l/N/A
associate-*r/N/A
associate-+r+N/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr89.4%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.99998e-319 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 4.99999999999999993e306Initial program 98.5%
if -1.99998e-319 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 0.0Initial program 45.7%
/-lowering-/.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
associate-+l+N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6457.6
Applied egg-rr57.6%
Taylor expanded in z around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6445.7
Simplified45.7%
Taylor expanded in t around 0
accelerator-lowering-fma.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f6462.4
Simplified62.4%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 0.0%
Taylor expanded in y around inf
/-lowering-/.f6495.9
Simplified95.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t))
(t_2 (+ x (/ (* y z) t)))
(t_3 (/ t_2 (+ (+ a 1.0) t_1)))
(t_4 (fma y (/ z t) x)))
(if (<= t_3 -1e+138)
(/ t_4 (+ a 1.0))
(if (<= t_3 -2e-319)
(/ t_4 (+ a t_1))
(if (<= t_3 0.0)
(/ (* y z) (fma b y (fma t a t)))
(if (<= t_3 5e+306)
(/ t_2 (+ a 1.0))
(if (<= t_3 INFINITY)
(* (/ z (+ 1.0 (fma y (/ b t) a))) (/ y t))
(/ 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);
double t_3 = t_2 / ((a + 1.0) + t_1);
double t_4 = fma(y, (z / t), x);
double tmp;
if (t_3 <= -1e+138) {
tmp = t_4 / (a + 1.0);
} else if (t_3 <= -2e-319) {
tmp = t_4 / (a + t_1);
} else if (t_3 <= 0.0) {
tmp = (y * z) / fma(b, y, fma(t, a, t));
} else if (t_3 <= 5e+306) {
tmp = t_2 / (a + 1.0);
} else if (t_3 <= ((double) INFINITY)) {
tmp = (z / (1.0 + fma(y, (b / t), a))) * (y / t);
} else {
tmp = z / b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(x + Float64(Float64(y * z) / t)) t_3 = Float64(t_2 / Float64(Float64(a + 1.0) + t_1)) t_4 = fma(y, Float64(z / t), x) tmp = 0.0 if (t_3 <= -1e+138) tmp = Float64(t_4 / Float64(a + 1.0)); elseif (t_3 <= -2e-319) tmp = Float64(t_4 / Float64(a + t_1)); elseif (t_3 <= 0.0) tmp = Float64(Float64(y * z) / fma(b, y, fma(t, a, t))); elseif (t_3 <= 5e+306) tmp = Float64(t_2 / Float64(a + 1.0)); elseif (t_3 <= Inf) tmp = Float64(Float64(z / Float64(1.0 + fma(y, Float64(b / t), a))) * Float64(y / t)); else tmp = Float64(z / b); end return 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[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / N[(N[(a + 1.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t$95$3, -1e+138], N[(t$95$4 / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, -2e-319], N[(t$95$4 / N[(a + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 0.0], N[(N[(y * z), $MachinePrecision] / N[(b * y + N[(t * a + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 5e+306], N[(t$95$2 / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(N[(z / N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := x + \frac{y \cdot z}{t}\\
t_3 := \frac{t\_2}{\left(a + 1\right) + t\_1}\\
t_4 := \mathsf{fma}\left(y, \frac{z}{t}, x\right)\\
\mathbf{if}\;t\_3 \leq -1 \cdot 10^{+138}:\\
\;\;\;\;\frac{t\_4}{a + 1}\\
\mathbf{elif}\;t\_3 \leq -2 \cdot 10^{-319}:\\
\;\;\;\;\frac{t\_4}{a + t\_1}\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\frac{y \cdot z}{\mathsf{fma}\left(b, y, \mathsf{fma}\left(t, a, t\right)\right)}\\
\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+306}:\\
\;\;\;\;\frac{t\_2}{a + 1}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\frac{z}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)} \cdot \frac{y}{t}\\
\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))) < -1e138Initial program 47.7%
/-lowering-/.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
associate-+l+N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6473.7
Applied egg-rr73.7%
Taylor expanded in y around 0
Simplified69.2%
if -1e138 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.99998e-319Initial program 97.0%
/-lowering-/.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
associate-+l+N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6492.0
Applied egg-rr92.0%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6481.4
Simplified81.4%
if -1.99998e-319 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 0.0Initial program 45.7%
/-lowering-/.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
associate-+l+N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6457.6
Applied egg-rr57.6%
Taylor expanded in z around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6445.7
Simplified45.7%
Taylor expanded in t around 0
accelerator-lowering-fma.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f6462.4
Simplified62.4%
if 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 4.99999999999999993e306Initial program 99.8%
Taylor expanded in y around 0
+-lowering-+.f6474.3
Simplified74.3%
if 4.99999999999999993e306 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 57.0%
/-lowering-/.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
associate-+l+N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6492.5
Applied egg-rr92.5%
Taylor expanded in z around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6441.3
Simplified41.3%
*-commutativeN/A
*-commutativeN/A
distribute-lft1-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*l/N/A
associate-*r/N/A
associate-+r+N/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr99.8%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 0.0%
Taylor expanded in y around inf
/-lowering-/.f6495.9
Simplified95.9%
Final simplification76.9%
(FPCore (x y z t a b) :precision binary64 (if (<= (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))) INFINITY) (/ (fma y (/ z t) x) (+ a (fma y (/ b t) 1.0))) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))) <= ((double) INFINITY)) {
tmp = fma(y, (z / t), x) / (a + fma(y, (b / t), 1.0));
} else {
tmp = z / b;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) <= Inf) tmp = Float64(fma(y, Float64(z / t), x) / Float64(a + fma(y, Float64(b / t), 1.0))); else tmp = Float64(z / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[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], Infinity], N[(N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision] / N[(a + N[(y * N[(b / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq \infty:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}\\
\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 80.4%
/-lowering-/.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
associate-+l+N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6480.5
Applied egg-rr80.5%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 0.0%
Taylor expanded in y around inf
/-lowering-/.f6495.9
Simplified95.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (fma y (/ z t) x) (+ a 1.0))))
(if (<= t -1.65e-16)
t_1
(if (<= t -2.2e-260)
(* t (+ (/ x (* y b)) (/ z (* t b))))
(if (<= t 8e-111) (* y (/ z (fma a t (fma y b t)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(y, (z / t), x) / (a + 1.0);
double tmp;
if (t <= -1.65e-16) {
tmp = t_1;
} else if (t <= -2.2e-260) {
tmp = t * ((x / (y * b)) + (z / (t * b)));
} else if (t <= 8e-111) {
tmp = y * (z / fma(a, t, fma(y, b, t)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(fma(y, Float64(z / t), x) / Float64(a + 1.0)) tmp = 0.0 if (t <= -1.65e-16) tmp = t_1; elseif (t <= -2.2e-260) tmp = Float64(t * Float64(Float64(x / Float64(y * b)) + Float64(z / Float64(t * b)))); elseif (t <= 8e-111) tmp = Float64(y * Float64(z / fma(a, t, fma(y, b, t)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.65e-16], t$95$1, If[LessEqual[t, -2.2e-260], N[(t * N[(N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision] + N[(z / N[(t * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8e-111], N[(y * N[(z / N[(a * t + N[(y * b + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a + 1}\\
\mathbf{if}\;t \leq -1.65 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.2 \cdot 10^{-260}:\\
\;\;\;\;t \cdot \left(\frac{x}{y \cdot b} + \frac{z}{t \cdot b}\right)\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-111}:\\
\;\;\;\;y \cdot \frac{z}{\mathsf{fma}\left(a, t, \mathsf{fma}\left(y, b, t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.64999999999999994e-16 or 8.00000000000000071e-111 < t Initial program 77.3%
/-lowering-/.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
associate-+l+N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6489.2
Applied egg-rr89.2%
Taylor expanded in y around 0
Simplified74.1%
if -1.64999999999999994e-16 < t < -2.20000000000000017e-260Initial program 67.0%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*r/N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6448.3
Simplified48.3%
Taylor expanded in t around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6471.9
Simplified71.9%
if -2.20000000000000017e-260 < t < 8.00000000000000071e-111Initial program 67.1%
/-lowering-/.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
associate-+l+N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6454.7
Applied egg-rr54.7%
Taylor expanded in z around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6446.2
Simplified46.2%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-*r/N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6448.0
Applied egg-rr48.0%
Taylor expanded in t around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
associate-+l+N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6470.7
Simplified70.7%
Final simplification72.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (fma y (/ z t) x) (+ a 1.0))))
(if (<= t -1.04e-16)
t_1
(if (<= t 1.7e-208)
(/ (fma x t (* y z)) (* y b))
(if (<= t 2.2e-111) (* y (/ z (fma a t (fma y b t)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(y, (z / t), x) / (a + 1.0);
double tmp;
if (t <= -1.04e-16) {
tmp = t_1;
} else if (t <= 1.7e-208) {
tmp = fma(x, t, (y * z)) / (y * b);
} else if (t <= 2.2e-111) {
tmp = y * (z / fma(a, t, fma(y, b, t)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(fma(y, Float64(z / t), x) / Float64(a + 1.0)) tmp = 0.0 if (t <= -1.04e-16) tmp = t_1; elseif (t <= 1.7e-208) tmp = Float64(fma(x, t, Float64(y * z)) / Float64(y * b)); elseif (t <= 2.2e-111) tmp = Float64(y * Float64(z / fma(a, t, fma(y, b, t)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.04e-16], t$95$1, If[LessEqual[t, 1.7e-208], N[(N[(x * t + N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.2e-111], N[(y * N[(z / N[(a * t + N[(y * b + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a + 1}\\
\mathbf{if}\;t \leq -1.04 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{-208}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, t, y \cdot z\right)}{y \cdot b}\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-111}:\\
\;\;\;\;y \cdot \frac{z}{\mathsf{fma}\left(a, t, \mathsf{fma}\left(y, b, t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.04000000000000001e-16 or 2.2e-111 < t Initial program 77.3%
/-lowering-/.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
associate-+l+N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6489.2
Applied egg-rr89.2%
Taylor expanded in y around 0
Simplified74.1%
if -1.04000000000000001e-16 < t < 1.7e-208Initial program 62.0%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*r/N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6443.1
Simplified43.1%
Taylor expanded in t around 0
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6468.0
Simplified68.0%
if 1.7e-208 < t < 2.2e-111Initial program 79.1%
/-lowering-/.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
associate-+l+N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6461.6
Applied egg-rr61.6%
Taylor expanded in z around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6461.8
Simplified61.8%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-*r/N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6459.4
Applied egg-rr59.4%
Taylor expanded in t around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
associate-+l+N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6472.6
Simplified72.6%
Final simplification72.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= x -2.9e+28)
(/ x (+ 1.0 (fma y (/ b t) a)))
(if (<= x 3.5e+102)
(* y (/ z (fma a t (fma y b t))))
(/ x (fma b (/ y t) (+ a 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.9e+28) {
tmp = x / (1.0 + fma(y, (b / t), a));
} else if (x <= 3.5e+102) {
tmp = y * (z / fma(a, t, fma(y, b, t)));
} else {
tmp = x / fma(b, (y / t), (a + 1.0));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -2.9e+28) tmp = Float64(x / Float64(1.0 + fma(y, Float64(b / t), a))); elseif (x <= 3.5e+102) tmp = Float64(y * Float64(z / fma(a, t, fma(y, b, t)))); else tmp = Float64(x / fma(b, Float64(y / t), Float64(a + 1.0))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.9e+28], N[(x / N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.5e+102], N[(y * N[(z / N[(a * t + N[(y * b + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(b * N[(y / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.9 \cdot 10^{+28}:\\
\;\;\;\;\frac{x}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{+102}:\\
\;\;\;\;y \cdot \frac{z}{\mathsf{fma}\left(a, t, \mathsf{fma}\left(y, b, t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(b, \frac{y}{t}, a + 1\right)}\\
\end{array}
\end{array}
if x < -2.9000000000000001e28Initial program 77.5%
Taylor expanded in x around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6471.0
Simplified71.0%
if -2.9000000000000001e28 < x < 3.50000000000000011e102Initial program 70.8%
/-lowering-/.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
associate-+l+N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6471.7
Applied egg-rr71.7%
Taylor expanded in z around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6447.0
Simplified47.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-*r/N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6451.7
Applied egg-rr51.7%
Taylor expanded in t around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
associate-+l+N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6463.4
Simplified63.4%
if 3.50000000000000011e102 < x Initial program 73.1%
Taylor expanded in x around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6477.9
Simplified77.9%
+-commutativeN/A
associate-+r+N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6477.9
Applied egg-rr77.9%
Final simplification67.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ 1.0 (fma y (/ b t) a)))))
(if (<= x -3.2e+29)
t_1
(if (<= x 9e+101) (* y (/ z (fma a t (fma y b t)))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 + fma(y, (b / t), a));
double tmp;
if (x <= -3.2e+29) {
tmp = t_1;
} else if (x <= 9e+101) {
tmp = y * (z / fma(a, t, fma(y, b, t)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 + fma(y, Float64(b / t), a))) tmp = 0.0 if (x <= -3.2e+29) tmp = t_1; elseif (x <= 9e+101) tmp = Float64(y * Float64(z / fma(a, t, fma(y, b, t)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.2e+29], t$95$1, If[LessEqual[x, 9e+101], N[(y * N[(z / N[(a * t + N[(y * b + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\
\mathbf{if}\;x \leq -3.2 \cdot 10^{+29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 9 \cdot 10^{+101}:\\
\;\;\;\;y \cdot \frac{z}{\mathsf{fma}\left(a, t, \mathsf{fma}\left(y, b, t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.19999999999999987e29 or 9.0000000000000004e101 < x Initial program 75.9%
Taylor expanded in x around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6473.6
Simplified73.6%
if -3.19999999999999987e29 < x < 9.0000000000000004e101Initial program 70.8%
/-lowering-/.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
associate-+l+N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6471.7
Applied egg-rr71.7%
Taylor expanded in z around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6447.0
Simplified47.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-*r/N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6451.7
Applied egg-rr51.7%
Taylor expanded in t around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
associate-+l+N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6463.4
Simplified63.4%
Final simplification67.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -4.15e-16)
t_1
(if (<= t 8e-208)
(/ (fma x t (* y z)) (* y b))
(if (<= t 1.65e-109) (* y (/ z (fma 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 <= -4.15e-16) {
tmp = t_1;
} else if (t <= 8e-208) {
tmp = fma(x, t, (y * z)) / (y * b);
} else if (t <= 1.65e-109) {
tmp = y * (z / fma(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 <= -4.15e-16) tmp = t_1; elseif (t <= 8e-208) tmp = Float64(fma(x, t, Float64(y * z)) / Float64(y * b)); elseif (t <= 1.65e-109) tmp = Float64(y * Float64(z / fma(y, b, t))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.15e-16], t$95$1, If[LessEqual[t, 8e-208], N[(N[(x * t + N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.65e-109], N[(y * N[(z / N[(y * b + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -4.15 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-208}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, t, y \cdot z\right)}{y \cdot b}\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{-109}:\\
\;\;\;\;y \cdot \frac{z}{\mathsf{fma}\left(y, b, t\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.14999999999999989e-16 or 1.64999999999999995e-109 < t Initial program 77.3%
Taylor expanded in y around 0
/-lowering-/.f64N/A
+-lowering-+.f6457.5
Simplified57.5%
if -4.14999999999999989e-16 < t < 8.0000000000000008e-208Initial program 62.0%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*r/N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6443.1
Simplified43.1%
Taylor expanded in t around 0
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6468.0
Simplified68.0%
if 8.0000000000000008e-208 < t < 1.64999999999999995e-109Initial program 79.1%
/-lowering-/.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
associate-+l+N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6461.6
Applied egg-rr61.6%
Taylor expanded in z around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6461.8
Simplified61.8%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-*r/N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6459.4
Applied egg-rr59.4%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6454.5
Simplified54.5%
Final simplification60.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -3.5e+34)
t_1
(if (<= t 2.3e-89) (* y (/ z (fma a t (fma 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 <= -3.5e+34) {
tmp = t_1;
} else if (t <= 2.3e-89) {
tmp = y * (z / fma(a, t, fma(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 <= -3.5e+34) tmp = t_1; elseif (t <= 2.3e-89) tmp = Float64(y * Float64(z / fma(a, t, fma(y, b, t)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.5e+34], t$95$1, If[LessEqual[t, 2.3e-89], N[(y * N[(z / N[(a * t + N[(y * 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 -3.5 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-89}:\\
\;\;\;\;y \cdot \frac{z}{\mathsf{fma}\left(a, t, \mathsf{fma}\left(y, b, t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.49999999999999998e34 or 2.3e-89 < t Initial program 76.5%
Taylor expanded in y around 0
/-lowering-/.f64N/A
+-lowering-+.f6460.2
Simplified60.2%
if -3.49999999999999998e34 < t < 2.3e-89Initial program 69.0%
/-lowering-/.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
associate-+l+N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6457.6
Applied egg-rr57.6%
Taylor expanded in z around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6444.0
Simplified44.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-*r/N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6445.8
Applied egg-rr45.8%
Taylor expanded in t around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
associate-+l+N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6463.0
Simplified63.0%
Final simplification61.6%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ a 1.0) -4e+19) (/ x a) (if (<= (+ a 1.0) 2.0) x (/ x a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a + 1.0) <= -4e+19) {
tmp = x / a;
} else if ((a + 1.0) <= 2.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) <= (-4d+19)) then
tmp = x / a
else if ((a + 1.0d0) <= 2.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) <= -4e+19) {
tmp = x / a;
} else if ((a + 1.0) <= 2.0) {
tmp = x;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a + 1.0) <= -4e+19: tmp = x / a elif (a + 1.0) <= 2.0: tmp = x else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(a + 1.0) <= -4e+19) tmp = Float64(x / a); elseif (Float64(a + 1.0) <= 2.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) <= -4e+19) tmp = x / a; elseif ((a + 1.0) <= 2.0) tmp = x; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(a + 1.0), $MachinePrecision], -4e+19], N[(x / a), $MachinePrecision], If[LessEqual[N[(a + 1.0), $MachinePrecision], 2.0], x, N[(x / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a + 1 \leq -4 \cdot 10^{+19}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;a + 1 \leq 2:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if (+.f64 a #s(literal 1 binary64)) < -4e19 or 2 < (+.f64 a #s(literal 1 binary64)) Initial program 73.0%
Taylor expanded in x around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6456.7
Simplified56.7%
Taylor expanded in a around inf
/-lowering-/.f6449.0
Simplified49.0%
if -4e19 < (+.f64 a #s(literal 1 binary64)) < 2Initial program 72.8%
Taylor expanded in x around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6444.3
Simplified44.3%
Taylor expanded in a around 0
/-lowering-/.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6442.5
Simplified42.5%
Taylor expanded in b around 0
Simplified30.5%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ x (+ a 1.0)))) (if (<= t -2.8e+17) t_1 (if (<= t 5.4e-52) (/ 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 <= -2.8e+17) {
tmp = t_1;
} else if (t <= 5.4e-52) {
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 <= (-2.8d+17)) then
tmp = t_1
else if (t <= 5.4d-52) 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 <= -2.8e+17) {
tmp = t_1;
} else if (t <= 5.4e-52) {
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 <= -2.8e+17: tmp = t_1 elif t <= 5.4e-52: 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 <= -2.8e+17) tmp = t_1; elseif (t <= 5.4e-52) 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 <= -2.8e+17) tmp = t_1; elseif (t <= 5.4e-52) 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, -2.8e+17], t$95$1, If[LessEqual[t, 5.4e-52], N[(z / b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -2.8 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{-52}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.8e17 or 5.40000000000000019e-52 < t Initial program 78.5%
Taylor expanded in y around 0
/-lowering-/.f64N/A
+-lowering-+.f6461.5
Simplified61.5%
if -2.8e17 < t < 5.40000000000000019e-52Initial program 67.5%
Taylor expanded in y around inf
/-lowering-/.f6454.4
Simplified54.4%
Final simplification57.9%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.45e+15) (/ x a) (if (<= a 1.5e+95) (/ z b) (/ x a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.45e+15) {
tmp = x / a;
} else if (a <= 1.5e+95) {
tmp = z / b;
} 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.45d+15)) then
tmp = x / a
else if (a <= 1.5d+95) then
tmp = z / b
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.45e+15) {
tmp = x / a;
} else if (a <= 1.5e+95) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.45e+15: tmp = x / a elif a <= 1.5e+95: tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.45e+15) tmp = Float64(x / a); elseif (a <= 1.5e+95) tmp = Float64(z / b); 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.45e+15) tmp = x / a; elseif (a <= 1.5e+95) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.45e+15], N[(x / a), $MachinePrecision], If[LessEqual[a, 1.5e+95], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.45 \cdot 10^{+15}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{+95}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if a < -1.45e15 or 1.49999999999999996e95 < a Initial program 74.5%
Taylor expanded in x around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6461.1
Simplified61.1%
Taylor expanded in a around inf
/-lowering-/.f6455.0
Simplified55.0%
if -1.45e15 < a < 1.49999999999999996e95Initial program 71.6%
Taylor expanded in y around inf
/-lowering-/.f6446.4
Simplified46.4%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 72.9%
Taylor expanded in x around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6450.7
Simplified50.7%
Taylor expanded in a around 0
/-lowering-/.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6427.5
Simplified27.5%
Taylor expanded in b around 0
Simplified16.7%
(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 2024196
(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))))