
(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 (/ (fma y (/ z t) x) (+ a (fma y (/ b t) 1.0)))))
(if (<= t -5e-86)
t_1
(if (<= t -2.1e-260)
(* t (+ (/ x (* y b)) (/ z (* t b))))
(if (<= t 1.05e-109) (* 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 + fma(y, (b / t), 1.0));
double tmp;
if (t <= -5e-86) {
tmp = t_1;
} else if (t <= -2.1e-260) {
tmp = t * ((x / (y * b)) + (z / (t * b)));
} else if (t <= 1.05e-109) {
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 + fma(y, Float64(b / t), 1.0))) tmp = 0.0 if (t <= -5e-86) tmp = t_1; elseif (t <= -2.1e-260) tmp = Float64(t * Float64(Float64(x / Float64(y * b)) + Float64(z / Float64(t * b)))); elseif (t <= 1.05e-109) 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 + N[(y * N[(b / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5e-86], t$95$1, If[LessEqual[t, -2.1e-260], N[(t * N[(N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision] + N[(z / N[(t * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e-109], 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 + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}\\
\mathbf{if}\;t \leq -5 \cdot 10^{-86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.1 \cdot 10^{-260}:\\
\;\;\;\;t \cdot \left(\frac{x}{y \cdot b} + \frac{z}{t \cdot b}\right)\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-109}:\\
\;\;\;\;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 < -4.9999999999999999e-86 or 1.04999999999999998e-109 < t Initial program 77.9%
/-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.5
Applied egg-rr89.5%
if -4.9999999999999999e-86 < t < -2.10000000000000005e-260Initial program 63.9%
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-*.f6445.8
Simplified45.8%
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.6
Simplified71.6%
if -2.10000000000000005e-260 < t < 1.04999999999999998e-109Initial 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 simplification81.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (fma t (/ x (* z (* y b))) (/ 1.0 b)))))
(if (<= b -4.8e+198)
t_1
(if (<= b -4.2e-103)
(/ (fma y (/ z t) x) (+ a (/ (* y b) t)))
(if (<= b 4e+56) (/ (fma z (/ y t) x) (+ a 1.0)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * fma(t, (x / (z * (y * b))), (1.0 / b));
double tmp;
if (b <= -4.8e+198) {
tmp = t_1;
} else if (b <= -4.2e-103) {
tmp = fma(y, (z / t), x) / (a + ((y * b) / t));
} else if (b <= 4e+56) {
tmp = fma(z, (y / t), x) / (a + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(z * fma(t, Float64(x / Float64(z * Float64(y * b))), Float64(1.0 / b))) tmp = 0.0 if (b <= -4.8e+198) tmp = t_1; elseif (b <= -4.2e-103) tmp = Float64(fma(y, Float64(z / t), x) / Float64(a + Float64(Float64(y * b) / t))); elseif (b <= 4e+56) tmp = Float64(fma(z, Float64(y / t), x) / Float64(a + 1.0)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t * N[(x / N[(z * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.8e+198], t$95$1, If[LessEqual[b, -4.2e-103], N[(N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision] / N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4e+56], N[(N[(z * N[(y / t), $MachinePrecision] + x), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \mathsf{fma}\left(t, \frac{x}{z \cdot \left(y \cdot b\right)}, \frac{1}{b}\right)\\
\mathbf{if}\;b \leq -4.8 \cdot 10^{+198}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -4.2 \cdot 10^{-103}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a + \frac{y \cdot b}{t}}\\
\mathbf{elif}\;b \leq 4 \cdot 10^{+56}:\\
\;\;\;\;\frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -4.8000000000000003e198 or 4.00000000000000037e56 < b Initial program 51.4%
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-*.f6435.7
Simplified35.7%
Taylor expanded in z around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6467.7
Simplified67.7%
if -4.8000000000000003e198 < b < -4.20000000000000009e-103Initial program 75.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-/.f6468.7
Applied egg-rr68.7%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6465.1
Simplified65.1%
if -4.20000000000000009e-103 < b < 4.00000000000000037e56Initial program 84.8%
Taylor expanded in b around 0
/-lowering-/.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*r/N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6480.7
Simplified80.7%
Final simplification73.0%
(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 -2.2e-260)
(* t (+ (/ x (* y b)) (/ z (* t b))))
(if (<= t 1.95e-109) (* 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 <= -2.2e-260) {
tmp = t * ((x / (y * b)) + (z / (t * b)));
} else if (t <= 1.95e-109) {
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 <= -2.2e-260) tmp = Float64(t * Float64(Float64(x / Float64(y * b)) + Float64(z / Float64(t * b)))); elseif (t <= 1.95e-109) 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, -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, 1.95e-109], 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 -2.2 \cdot 10^{-260}:\\
\;\;\;\;t \cdot \left(\frac{x}{y \cdot b} + \frac{z}{t \cdot b}\right)\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{-109}:\\
\;\;\;\;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 1.95000000000000011e-109 < 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 < -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 < 1.95000000000000011e-109Initial 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.5e-16)
t_1
(if (<= t 6.2e-208)
(/ (fma x t (* y z)) (* y b))
(if (<= t 4.3e-110) (* 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.5e-16) {
tmp = t_1;
} else if (t <= 6.2e-208) {
tmp = fma(x, t, (y * z)) / (y * b);
} else if (t <= 4.3e-110) {
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.5e-16) tmp = t_1; elseif (t <= 6.2e-208) tmp = Float64(fma(x, t, Float64(y * z)) / Float64(y * b)); elseif (t <= 4.3e-110) 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.5e-16], t$95$1, If[LessEqual[t, 6.2e-208], N[(N[(x * t + N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.3e-110], 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.5 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{-208}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, t, y \cdot z\right)}{y \cdot b}\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{-110}:\\
\;\;\;\;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.49999999999999997e-16 or 4.30000000000000025e-110 < 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.49999999999999997e-16 < t < 6.1999999999999996e-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 6.1999999999999996e-208 < t < 4.30000000000000025e-110Initial 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 -6.9e+28)
(/ x (+ 1.0 (fma y (/ b t) a)))
(if (<= x 1.3e+103)
(* 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 <= -6.9e+28) {
tmp = x / (1.0 + fma(y, (b / t), a));
} else if (x <= 1.3e+103) {
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 <= -6.9e+28) tmp = Float64(x / Float64(1.0 + fma(y, Float64(b / t), a))); elseif (x <= 1.3e+103) 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, -6.9e+28], N[(x / N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.3e+103], 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 -6.9 \cdot 10^{+28}:\\
\;\;\;\;\frac{x}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{+103}:\\
\;\;\;\;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 < -6.9e28Initial 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 -6.9e28 < x < 1.3000000000000001e103Initial 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 1.3000000000000001e103 < 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.5e+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.5e+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.5e+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.5e+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.5 \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.49999999999999979e29 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.49999999999999979e29 < 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 -1.04e-16)
t_1
(if (<= t 1.95e-207)
(/ (fma x t (* y z)) (* y b))
(if (<= t 3.4e-111) (* 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 <= -1.04e-16) {
tmp = t_1;
} else if (t <= 1.95e-207) {
tmp = fma(x, t, (y * z)) / (y * b);
} else if (t <= 3.4e-111) {
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 <= -1.04e-16) tmp = t_1; elseif (t <= 1.95e-207) tmp = Float64(fma(x, t, Float64(y * z)) / Float64(y * b)); elseif (t <= 3.4e-111) 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, -1.04e-16], t$95$1, If[LessEqual[t, 1.95e-207], N[(N[(x * t + N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.4e-111], 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 -1.04 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{-207}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, t, y \cdot z\right)}{y \cdot b}\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-111}:\\
\;\;\;\;y \cdot \frac{z}{\mathsf{fma}\left(y, b, t\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.04000000000000001e-16 or 3.39999999999999997e-111 < t Initial program 77.3%
Taylor expanded in y around 0
/-lowering-/.f64N/A
+-lowering-+.f6457.5
Simplified57.5%
if -1.04000000000000001e-16 < t < 1.9500000000000001e-207Initial 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.9500000000000001e-207 < t < 3.39999999999999997e-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 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 -5e+35)
t_1
(if (<= t 2.1e-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 <= -5e+35) {
tmp = t_1;
} else if (t <= 2.1e-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 <= -5e+35) tmp = t_1; elseif (t <= 2.1e-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, -5e+35], t$95$1, If[LessEqual[t, 2.1e-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 -5 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.1 \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 < -5.00000000000000021e35 or 2.1000000000000001e-89 < t Initial program 76.5%
Taylor expanded in y around 0
/-lowering-/.f64N/A
+-lowering-+.f6460.2
Simplified60.2%
if -5.00000000000000021e35 < t < 2.1000000000000001e-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 (let* ((t_1 (/ x (+ a 1.0)))) (if (<= t -960000000000.0) t_1 (if (<= t 7.2e-41) (/ 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 <= -960000000000.0) {
tmp = t_1;
} else if (t <= 7.2e-41) {
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 <= (-960000000000.0d0)) then
tmp = t_1
else if (t <= 7.2d-41) 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 <= -960000000000.0) {
tmp = t_1;
} else if (t <= 7.2e-41) {
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 <= -960000000000.0: tmp = t_1 elif t <= 7.2e-41: 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 <= -960000000000.0) tmp = t_1; elseif (t <= 7.2e-41) 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 <= -960000000000.0) tmp = t_1; elseif (t <= 7.2e-41) 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, -960000000000.0], t$95$1, If[LessEqual[t, 7.2e-41], N[(z / b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -960000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{-41}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -9.6e11 or 7.2e-41 < t Initial program 78.5%
Taylor expanded in y around 0
/-lowering-/.f64N/A
+-lowering-+.f6461.5
Simplified61.5%
if -9.6e11 < t < 7.2e-41Initial 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 -5.8e+16) (/ x a) (if (<= a 2.8e+96) (/ z b) (/ x a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -5.8e+16) {
tmp = x / a;
} else if (a <= 2.8e+96) {
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 <= (-5.8d+16)) then
tmp = x / a
else if (a <= 2.8d+96) 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 <= -5.8e+16) {
tmp = x / a;
} else if (a <= 2.8e+96) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -5.8e+16: tmp = x / a elif a <= 2.8e+96: tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -5.8e+16) tmp = Float64(x / a); elseif (a <= 2.8e+96) 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 <= -5.8e+16) tmp = x / a; elseif (a <= 2.8e+96) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -5.8e+16], N[(x / a), $MachinePrecision], If[LessEqual[a, 2.8e+96], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.8 \cdot 10^{+16}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;a \leq 2.8 \cdot 10^{+96}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if a < -5.8e16 or 2.8e96 < 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 -5.8e16 < a < 2.8e96Initial program 71.6%
Taylor expanded in y around inf
/-lowering-/.f6446.4
Simplified46.4%
(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 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 -1 < a < 1Initial 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 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))))