
(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 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0))))
(t_2 (fma y (/ b t) (+ a 1.0)))
(t_3 (* t (- (/ x b) (/ (fma z a z) (* b b))))))
(if (<= t_1 -2e+242)
(fma (/ z t_2) (/ y t) (/ x t_2))
(if (<= t_1 -1e-303)
t_1
(if (<= t_1 0.0)
(+ (/ z b) (/ (fma (* (- -1.0 a) t_3) (/ t (* y b)) t_3) y))
(if (<= t_1 2e+272)
t_1
(if (<= t_1 INFINITY)
(fma
y
(* z (/ 1.0 (fma (* y b) 1.0 (fma t a t))))
(/ x (+ 1.0 (fma y (/ b t) a))))
(/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double t_2 = fma(y, (b / t), (a + 1.0));
double t_3 = t * ((x / b) - (fma(z, a, z) / (b * b)));
double tmp;
if (t_1 <= -2e+242) {
tmp = fma((z / t_2), (y / t), (x / t_2));
} else if (t_1 <= -1e-303) {
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 <= 2e+272) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = fma(y, (z * (1.0 / fma((y * b), 1.0, fma(t, a, t)))), (x / (1.0 + fma(y, (b / t), a))));
} 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(Float64(y * b) / t) + Float64(a + 1.0))) t_2 = fma(y, Float64(b / t), Float64(a + 1.0)) t_3 = Float64(t * Float64(Float64(x / b) - Float64(fma(z, a, z) / Float64(b * b)))) tmp = 0.0 if (t_1 <= -2e+242) tmp = fma(Float64(z / t_2), Float64(y / t), Float64(x / t_2)); elseif (t_1 <= -1e-303) 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 <= 2e+272) tmp = t_1; elseif (t_1 <= Inf) tmp = fma(y, Float64(z * Float64(1.0 / fma(Float64(y * b), 1.0, fma(t, a, t)))), Float64(x / Float64(1.0 + fma(y, Float64(b / t), a)))); 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[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(b / t), $MachinePrecision] + N[(a + 1.0), $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, -2e+242], N[(N[(z / t$95$2), $MachinePrecision] * N[(y / t), $MachinePrecision] + N[(x / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-303], 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, 2e+272], t$95$1, If[LessEqual[t$95$1, Infinity], N[(y * N[(z * N[(1.0 / N[(N[(y * b), $MachinePrecision] * 1.0 + N[(t * a + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
t_2 := \mathsf{fma}\left(y, \frac{b}{t}, a + 1\right)\\
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 -2 \cdot 10^{+242}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{t\_2}, \frac{y}{t}, \frac{x}{t\_2}\right)\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-303}:\\
\;\;\;\;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 2 \cdot 10^{+272}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(y, z \cdot \frac{1}{\mathsf{fma}\left(y \cdot b, 1, \mathsf{fma}\left(t, a, t\right)\right)}, \frac{x}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\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))) < -2.0000000000000001e242Initial program 46.0%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-+.f64N/A
Applied rewrites90.4%
Applied rewrites90.9%
if -2.0000000000000001e242 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -9.99999999999999931e-304 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2.0000000000000001e272Initial program 98.5%
if -9.99999999999999931e-304 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0Initial program 55.5%
Taylor expanded in y around -inf
Applied rewrites81.7%
if 2.0000000000000001e272 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 46.5%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-+.f64N/A
Applied rewrites99.5%
Applied rewrites99.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
lower-/.f6496.7
Applied rewrites96.7%
Final simplification95.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t)))
(t_2 (/ t_1 (+ (/ (* y b) t) (+ a 1.0))))
(t_3 (fma y b (fma t a t))))
(if (<= t_2 (- INFINITY))
(* z (/ y t_3))
(if (<= t_2 -1e-303)
(/ t_1 (+ a 1.0))
(if (<= t_2 0.0)
(/ (fma t (/ x y) z) b)
(if (<= t_2 1e+107)
(/ (fma y (/ z t) x) (+ a 1.0))
(if (<= t_2 1e+295)
(/ (fma z (/ y t) x) (fma y (/ b t) 1.0))
(if (<= t_2 INFINITY) (* y (/ z t_3)) (/ z b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / (((y * b) / t) + (a + 1.0));
double t_3 = fma(y, b, fma(t, a, t));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = z * (y / t_3);
} else if (t_2 <= -1e-303) {
tmp = t_1 / (a + 1.0);
} else if (t_2 <= 0.0) {
tmp = fma(t, (x / y), z) / b;
} else if (t_2 <= 1e+107) {
tmp = fma(y, (z / t), x) / (a + 1.0);
} else if (t_2 <= 1e+295) {
tmp = fma(z, (y / t), x) / fma(y, (b / t), 1.0);
} else if (t_2 <= ((double) INFINITY)) {
tmp = y * (z / t_3);
} else {
tmp = z / b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(t_1 / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) t_3 = fma(y, b, fma(t, a, t)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(z * Float64(y / t_3)); elseif (t_2 <= -1e-303) tmp = Float64(t_1 / Float64(a + 1.0)); elseif (t_2 <= 0.0) tmp = Float64(fma(t, Float64(x / y), z) / b); elseif (t_2 <= 1e+107) tmp = Float64(fma(y, Float64(z / t), x) / Float64(a + 1.0)); elseif (t_2 <= 1e+295) tmp = Float64(fma(z, Float64(y / t), x) / fma(y, Float64(b / t), 1.0)); elseif (t_2 <= Inf) tmp = Float64(y * Float64(z / t_3)); else tmp = Float64(z / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y * b + N[(t * a + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(z * N[(y / t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1e-303], N[(t$95$1 / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[(N[(t * N[(x / y), $MachinePrecision] + z), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t$95$2, 1e+107], N[(N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+295], N[(N[(z * N[(y / t), $MachinePrecision] + x), $MachinePrecision] / N[(y * N[(b / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(y * N[(z / t$95$3), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{t\_1}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
t_3 := \mathsf{fma}\left(y, b, \mathsf{fma}\left(t, a, t\right)\right)\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;z \cdot \frac{y}{t\_3}\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-303}:\\
\;\;\;\;\frac{t\_1}{a + 1}\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{\mathsf{fma}\left(t, \frac{x}{y}, z\right)}{b}\\
\mathbf{elif}\;t\_2 \leq 10^{+107}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a + 1}\\
\mathbf{elif}\;t\_2 \leq 10^{+295}:\\
\;\;\;\;\frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{\mathsf{fma}\left(y, \frac{b}{t}, 1\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;y \cdot \frac{z}{t\_3}\\
\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 24.6%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-+.f64N/A
Applied rewrites86.6%
Applied rewrites86.6%
Taylor expanded in z around inf
Applied rewrites61.5%
Applied rewrites86.5%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -9.99999999999999931e-304Initial program 98.5%
Taylor expanded in y around 0
lower-+.f6476.2
Applied rewrites76.2%
if -9.99999999999999931e-304 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0Initial program 55.5%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-+.f64N/A
Applied rewrites63.1%
Taylor expanded in b around inf
Applied rewrites79.6%
if -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.9999999999999997e106Initial program 97.9%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
clear-numN/A
inv-powN/A
div-invN/A
unpow-prod-downN/A
inv-powN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f6497.9
Applied rewrites97.9%
Taylor expanded in b around 0
lower-/.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-+.f6477.3
Applied rewrites77.3%
if 9.9999999999999997e106 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.9999999999999998e294Initial program 99.8%
Taylor expanded in a around 0
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*r/N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6482.5
Applied rewrites82.5%
if 9.9999999999999998e294 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 37.5%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-+.f64N/A
Applied rewrites99.4%
Applied rewrites99.7%
Taylor expanded in z around inf
Applied rewrites53.1%
Applied rewrites99.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
lower-/.f6496.7
Applied rewrites96.7%
Final simplification81.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0))))
(t_2 (fma y (/ b t) (+ a 1.0))))
(if (<= t_1 -2e+242)
(fma (/ z t_2) (/ y t) (/ x t_2))
(if (<= t_1 -1e-303)
t_1
(if (<= t_1 0.0)
(/ (fma t (/ x y) z) b)
(if (<= t_1 2e+272)
t_1
(if (<= t_1 INFINITY)
(fma
y
(* z (/ 1.0 (fma (* y b) 1.0 (fma t a t))))
(/ x (+ 1.0 (fma y (/ b t) a))))
(/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double t_2 = fma(y, (b / t), (a + 1.0));
double tmp;
if (t_1 <= -2e+242) {
tmp = fma((z / t_2), (y / t), (x / t_2));
} else if (t_1 <= -1e-303) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = fma(t, (x / y), z) / b;
} else if (t_1 <= 2e+272) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = fma(y, (z * (1.0 / fma((y * b), 1.0, fma(t, a, t)))), (x / (1.0 + fma(y, (b / t), a))));
} 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(Float64(y * b) / t) + Float64(a + 1.0))) t_2 = fma(y, Float64(b / t), Float64(a + 1.0)) tmp = 0.0 if (t_1 <= -2e+242) tmp = fma(Float64(z / t_2), Float64(y / t), Float64(x / t_2)); elseif (t_1 <= -1e-303) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(fma(t, Float64(x / y), z) / b); elseif (t_1 <= 2e+272) tmp = t_1; elseif (t_1 <= Inf) tmp = fma(y, Float64(z * Float64(1.0 / fma(Float64(y * b), 1.0, fma(t, a, t)))), Float64(x / Float64(1.0 + fma(y, Float64(b / t), a)))); 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[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(b / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+242], N[(N[(z / t$95$2), $MachinePrecision] * N[(y / t), $MachinePrecision] + N[(x / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-303], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(t * N[(x / y), $MachinePrecision] + z), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t$95$1, 2e+272], t$95$1, If[LessEqual[t$95$1, Infinity], N[(y * N[(z * N[(1.0 / N[(N[(y * b), $MachinePrecision] * 1.0 + N[(t * a + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
t_2 := \mathsf{fma}\left(y, \frac{b}{t}, a + 1\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+242}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{t\_2}, \frac{y}{t}, \frac{x}{t\_2}\right)\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-303}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{\mathsf{fma}\left(t, \frac{x}{y}, z\right)}{b}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+272}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(y, z \cdot \frac{1}{\mathsf{fma}\left(y \cdot b, 1, \mathsf{fma}\left(t, a, t\right)\right)}, \frac{x}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\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))) < -2.0000000000000001e242Initial program 46.0%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-+.f64N/A
Applied rewrites90.4%
Applied rewrites90.9%
if -2.0000000000000001e242 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -9.99999999999999931e-304 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2.0000000000000001e272Initial program 98.5%
if -9.99999999999999931e-304 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0Initial program 55.5%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-+.f64N/A
Applied rewrites63.1%
Taylor expanded in b around inf
Applied rewrites79.6%
if 2.0000000000000001e272 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 46.5%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-+.f64N/A
Applied rewrites99.5%
Applied rewrites99.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
lower-/.f6496.7
Applied rewrites96.7%
Final simplification94.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0))))
(t_2 (fma y (/ b t) a))
(t_3 (/ x (+ 1.0 t_2))))
(if (<= t_1 -2e+242)
(fma y (/ z (fma t t_2 t)) t_3)
(if (<= t_1 -1e-303)
t_1
(if (<= t_1 0.0)
(/ (fma t (/ x y) z) b)
(if (<= t_1 2e+272)
t_1
(if (<= t_1 INFINITY)
(fma y (* z (/ 1.0 (fma (* y b) 1.0 (fma t a t)))) t_3)
(/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double t_2 = fma(y, (b / t), a);
double t_3 = x / (1.0 + t_2);
double tmp;
if (t_1 <= -2e+242) {
tmp = fma(y, (z / fma(t, t_2, t)), t_3);
} else if (t_1 <= -1e-303) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = fma(t, (x / y), z) / b;
} else if (t_1 <= 2e+272) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = fma(y, (z * (1.0 / fma((y * b), 1.0, fma(t, a, t)))), t_3);
} 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(Float64(y * b) / t) + Float64(a + 1.0))) t_2 = fma(y, Float64(b / t), a) t_3 = Float64(x / Float64(1.0 + t_2)) tmp = 0.0 if (t_1 <= -2e+242) tmp = fma(y, Float64(z / fma(t, t_2, t)), t_3); elseif (t_1 <= -1e-303) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(fma(t, Float64(x / y), z) / b); elseif (t_1 <= 2e+272) tmp = t_1; elseif (t_1 <= Inf) tmp = fma(y, Float64(z * Float64(1.0 / fma(Float64(y * b), 1.0, fma(t, a, t)))), t_3); 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[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]}, Block[{t$95$3 = N[(x / N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+242], N[(y * N[(z / N[(t * t$95$2 + t), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision], If[LessEqual[t$95$1, -1e-303], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(t * N[(x / y), $MachinePrecision] + z), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t$95$1, 2e+272], t$95$1, If[LessEqual[t$95$1, Infinity], N[(y * N[(z * N[(1.0 / N[(N[(y * b), $MachinePrecision] * 1.0 + N[(t * a + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
t_2 := \mathsf{fma}\left(y, \frac{b}{t}, a\right)\\
t_3 := \frac{x}{1 + t\_2}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+242}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z}{\mathsf{fma}\left(t, t\_2, t\right)}, t\_3\right)\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-303}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{\mathsf{fma}\left(t, \frac{x}{y}, z\right)}{b}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+272}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(y, z \cdot \frac{1}{\mathsf{fma}\left(y \cdot b, 1, \mathsf{fma}\left(t, a, t\right)\right)}, t\_3\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))) < -2.0000000000000001e242Initial program 46.0%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-+.f64N/A
Applied rewrites90.4%
if -2.0000000000000001e242 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -9.99999999999999931e-304 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2.0000000000000001e272Initial program 98.5%
if -9.99999999999999931e-304 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0Initial program 55.5%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-+.f64N/A
Applied rewrites63.1%
Taylor expanded in b around inf
Applied rewrites79.6%
if 2.0000000000000001e272 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 46.5%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-+.f64N/A
Applied rewrites99.5%
Applied rewrites99.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
lower-/.f6496.7
Applied rewrites96.7%
Final simplification94.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0))))
(t_2
(fma
y
(* z (/ 1.0 (fma (* y b) 1.0 (fma t a t))))
(/ x (+ 1.0 (fma y (/ b t) a))))))
(if (<= t_1 -2e+242)
t_2
(if (<= t_1 -1e-303)
t_1
(if (<= t_1 0.0)
(/ (fma t (/ x y) z) b)
(if (<= t_1 2e+272) 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)) / (((y * b) / t) + (a + 1.0));
double t_2 = fma(y, (z * (1.0 / fma((y * b), 1.0, fma(t, a, t)))), (x / (1.0 + fma(y, (b / t), a))));
double tmp;
if (t_1 <= -2e+242) {
tmp = t_2;
} else if (t_1 <= -1e-303) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = fma(t, (x / y), z) / b;
} else if (t_1 <= 2e+272) {
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(Float64(y * b) / t) + Float64(a + 1.0))) t_2 = fma(y, Float64(z * Float64(1.0 / fma(Float64(y * b), 1.0, fma(t, a, t)))), Float64(x / Float64(1.0 + fma(y, Float64(b / t), a)))) tmp = 0.0 if (t_1 <= -2e+242) tmp = t_2; elseif (t_1 <= -1e-303) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(fma(t, Float64(x / y), z) / b); elseif (t_1 <= 2e+272) 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[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(z * N[(1.0 / N[(N[(y * b), $MachinePrecision] * 1.0 + N[(t * a + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+242], t$95$2, If[LessEqual[t$95$1, -1e-303], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(t * N[(x / y), $MachinePrecision] + z), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t$95$1, 2e+272], 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}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
t_2 := \mathsf{fma}\left(y, z \cdot \frac{1}{\mathsf{fma}\left(y \cdot b, 1, \mathsf{fma}\left(t, a, t\right)\right)}, \frac{x}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+242}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-303}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{\mathsf{fma}\left(t, \frac{x}{y}, z\right)}{b}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+272}:\\
\;\;\;\;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))) < -2.0000000000000001e242 or 2.0000000000000001e272 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 46.2%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-+.f64N/A
Applied rewrites94.1%
Applied rewrites94.2%
if -2.0000000000000001e242 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -9.99999999999999931e-304 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2.0000000000000001e272Initial program 98.5%
if -9.99999999999999931e-304 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0Initial program 55.5%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-+.f64N/A
Applied rewrites63.1%
Taylor expanded in b around inf
Applied rewrites79.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
lower-/.f6496.7
Applied rewrites96.7%
Final simplification94.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0))))
(t_2 (fma y b (fma t a t))))
(if (<= t_1 (- INFINITY))
(* z (/ y t_2))
(if (<= t_1 -1e-303)
t_1
(if (<= t_1 0.0)
(/ (fma t (/ x y) z) b)
(if (<= t_1 1e+295)
t_1
(if (<= t_1 INFINITY) (* y (/ z 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)) / (((y * b) / t) + (a + 1.0));
double t_2 = fma(y, b, fma(t, a, t));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = z * (y / t_2);
} else if (t_1 <= -1e-303) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = fma(t, (x / y), z) / b;
} else if (t_1 <= 1e+295) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = y * (z / 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(Float64(y * b) / t) + Float64(a + 1.0))) t_2 = fma(y, b, fma(t, a, t)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(z * Float64(y / t_2)); elseif (t_1 <= -1e-303) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(fma(t, Float64(x / y), z) / b); elseif (t_1 <= 1e+295) tmp = t_1; elseif (t_1 <= Inf) tmp = Float64(y * Float64(z / 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[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * b + N[(t * a + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(z * N[(y / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-303], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(t * N[(x / y), $MachinePrecision] + z), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t$95$1, 1e+295], t$95$1, If[LessEqual[t$95$1, Infinity], N[(y * N[(z / t$95$2), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
t_2 := \mathsf{fma}\left(y, b, \mathsf{fma}\left(t, a, t\right)\right)\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;z \cdot \frac{y}{t\_2}\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-303}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{\mathsf{fma}\left(t, \frac{x}{y}, z\right)}{b}\\
\mathbf{elif}\;t\_1 \leq 10^{+295}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;y \cdot \frac{z}{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.0Initial program 24.6%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-+.f64N/A
Applied rewrites86.6%
Applied rewrites86.6%
Taylor expanded in z around inf
Applied rewrites61.5%
Applied rewrites86.5%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -9.99999999999999931e-304 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.9999999999999998e294Initial program 98.6%
if -9.99999999999999931e-304 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0Initial program 55.5%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-+.f64N/A
Applied rewrites63.1%
Taylor expanded in b around inf
Applied rewrites79.6%
if 9.9999999999999998e294 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 37.5%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-+.f64N/A
Applied rewrites99.4%
Applied rewrites99.7%
Taylor expanded in z around inf
Applied rewrites53.1%
Applied rewrites99.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
lower-/.f6496.7
Applied rewrites96.7%
Final simplification94.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t)))
(t_2 (/ t_1 (+ a 1.0)))
(t_3 (/ t_1 (+ (/ (* y b) t) (+ a 1.0))))
(t_4 (fma y b (fma t a t))))
(if (<= t_3 (- INFINITY))
(* z (/ y t_4))
(if (<= t_3 -1e-303)
t_2
(if (<= t_3 0.0)
(/ (fma t (/ x y) z) b)
(if (<= t_3 1e+295)
t_2
(if (<= t_3 INFINITY) (* y (/ z t_4)) (/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / (a + 1.0);
double t_3 = t_1 / (((y * b) / t) + (a + 1.0));
double t_4 = fma(y, b, fma(t, a, t));
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = z * (y / t_4);
} else if (t_3 <= -1e-303) {
tmp = t_2;
} else if (t_3 <= 0.0) {
tmp = fma(t, (x / y), z) / b;
} else if (t_3 <= 1e+295) {
tmp = t_2;
} else if (t_3 <= ((double) INFINITY)) {
tmp = y * (z / t_4);
} else {
tmp = z / b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(t_1 / Float64(a + 1.0)) t_3 = Float64(t_1 / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) t_4 = fma(y, b, fma(t, a, t)) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(z * Float64(y / t_4)); elseif (t_3 <= -1e-303) tmp = t_2; elseif (t_3 <= 0.0) tmp = Float64(fma(t, Float64(x / y), z) / b); elseif (t_3 <= 1e+295) tmp = t_2; elseif (t_3 <= Inf) tmp = Float64(y * Float64(z / t_4)); else tmp = Float64(z / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(y * b + N[(t * a + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(z * N[(y / t$95$4), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, -1e-303], t$95$2, If[LessEqual[t$95$3, 0.0], N[(N[(t * N[(x / y), $MachinePrecision] + z), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t$95$3, 1e+295], t$95$2, If[LessEqual[t$95$3, Infinity], N[(y * N[(z / t$95$4), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{t\_1}{a + 1}\\
t_3 := \frac{t\_1}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
t_4 := \mathsf{fma}\left(y, b, \mathsf{fma}\left(t, a, t\right)\right)\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;z \cdot \frac{y}{t\_4}\\
\mathbf{elif}\;t\_3 \leq -1 \cdot 10^{-303}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\frac{\mathsf{fma}\left(t, \frac{x}{y}, z\right)}{b}\\
\mathbf{elif}\;t\_3 \leq 10^{+295}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;y \cdot \frac{z}{t\_4}\\
\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 24.6%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-+.f64N/A
Applied rewrites86.6%
Applied rewrites86.6%
Taylor expanded in z around inf
Applied rewrites61.5%
Applied rewrites86.5%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -9.99999999999999931e-304 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.9999999999999998e294Initial program 98.6%
Taylor expanded in y around 0
lower-+.f6474.8
Applied rewrites74.8%
if -9.99999999999999931e-304 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0Initial program 55.5%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-+.f64N/A
Applied rewrites63.1%
Taylor expanded in b around inf
Applied rewrites79.6%
if 9.9999999999999998e294 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 37.5%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-+.f64N/A
Applied rewrites99.4%
Applied rewrites99.7%
Taylor expanded in z around inf
Applied rewrites53.1%
Applied rewrites99.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
lower-/.f6496.7
Applied rewrites96.7%
Final simplification79.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t)))
(t_2 (/ t_1 (+ (/ (* y b) t) (+ a 1.0))))
(t_3 (fma y b (fma t a t))))
(if (<= t_2 (- INFINITY))
(* z (/ y t_3))
(if (<= t_2 1e+295)
(/ t_1 (fma b (/ y t) (+ a 1.0)))
(if (<= t_2 INFINITY) (* y (/ z t_3)) (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / (((y * b) / t) + (a + 1.0));
double t_3 = fma(y, b, fma(t, a, t));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = z * (y / t_3);
} else if (t_2 <= 1e+295) {
tmp = t_1 / fma(b, (y / t), (a + 1.0));
} else if (t_2 <= ((double) INFINITY)) {
tmp = y * (z / t_3);
} else {
tmp = z / b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(t_1 / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) t_3 = fma(y, b, fma(t, a, t)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(z * Float64(y / t_3)); elseif (t_2 <= 1e+295) tmp = Float64(t_1 / fma(b, Float64(y / t), Float64(a + 1.0))); elseif (t_2 <= Inf) tmp = Float64(y * Float64(z / t_3)); else tmp = Float64(z / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y * b + N[(t * a + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(z * N[(y / t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+295], N[(t$95$1 / N[(b * N[(y / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(y * N[(z / t$95$3), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{t\_1}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
t_3 := \mathsf{fma}\left(y, b, \mathsf{fma}\left(t, a, t\right)\right)\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;z \cdot \frac{y}{t\_3}\\
\mathbf{elif}\;t\_2 \leq 10^{+295}:\\
\;\;\;\;\frac{t\_1}{\mathsf{fma}\left(b, \frac{y}{t}, a + 1\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;y \cdot \frac{z}{t\_3}\\
\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 24.6%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-+.f64N/A
Applied rewrites86.6%
Applied rewrites86.6%
Taylor expanded in z around inf
Applied rewrites61.5%
Applied rewrites86.5%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.9999999999999998e294Initial program 90.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6490.4
Applied rewrites90.4%
if 9.9999999999999998e294 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 37.5%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-+.f64N/A
Applied rewrites99.4%
Applied rewrites99.7%
Taylor expanded in z around inf
Applied rewrites53.1%
Applied rewrites99.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
lower-/.f6496.7
Applied rewrites96.7%
Final simplification91.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0))))
(t_2 (* z (/ y (fma y b (fma t a t))))))
(if (<= t_1 (- INFINITY))
t_2
(if (<= t_1 4e+219)
(/ (fma y (/ z t) x) (fma y (/ b t) (+ a 1.0)))
(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)) / (((y * b) / t) + (a + 1.0));
double t_2 = z * (y / fma(y, b, fma(t, a, t)));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_1 <= 4e+219) {
tmp = fma(y, (z / t), x) / fma(y, (b / t), (a + 1.0));
} 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(Float64(y * b) / t) + Float64(a + 1.0))) t_2 = Float64(z * Float64(y / fma(y, b, fma(t, a, t)))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = t_2; elseif (t_1 <= 4e+219) tmp = Float64(fma(y, Float64(z / t), x) / fma(y, Float64(b / t), Float64(a + 1.0))); 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[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(y / N[(y * b + N[(t * a + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, 4e+219], N[(N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision] / N[(y * N[(b / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
t_2 := z \cdot \frac{y}{\mathsf{fma}\left(y, b, \mathsf{fma}\left(t, a, t\right)\right)}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+219}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{\mathsf{fma}\left(y, \frac{b}{t}, a + 1\right)}\\
\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 3.99999999999999986e219 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 43.0%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-+.f64N/A
Applied rewrites85.2%
Applied rewrites85.3%
Taylor expanded in z around inf
Applied rewrites59.5%
Applied rewrites87.7%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 3.99999999999999986e219Initial program 90.1%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6486.2
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6484.6
Applied rewrites84.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
lower-/.f6496.7
Applied rewrites96.7%
Final simplification86.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0))))
(t_2 (* z (/ y (fma y b (fma t a t))))))
(if (<= t_1 (- INFINITY))
t_2
(if (<= t_1 2e+216)
(/ x (+ 1.0 (fma y (/ b t) a)))
(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)) / (((y * b) / t) + (a + 1.0));
double t_2 = z * (y / fma(y, b, fma(t, a, t)));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_1 <= 2e+216) {
tmp = x / (1.0 + fma(y, (b / t), a));
} 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(Float64(y * b) / t) + Float64(a + 1.0))) t_2 = Float64(z * Float64(y / fma(y, b, fma(t, a, t)))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = t_2; elseif (t_1 <= 2e+216) tmp = Float64(x / Float64(1.0 + fma(y, Float64(b / t), a))); 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[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(y / N[(y * b + N[(t * a + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, 2e+216], N[(x / N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
t_2 := z \cdot \frac{y}{\mathsf{fma}\left(y, b, \mathsf{fma}\left(t, a, t\right)\right)}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+216}:\\
\;\;\;\;\frac{x}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\
\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 2e216 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 46.2%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-+.f64N/A
Applied rewrites85.9%
Applied rewrites86.1%
Taylor expanded in z around inf
Applied rewrites59.0%
Applied rewrites85.6%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2e216Initial program 90.0%
Taylor expanded in x around inf
lower-/.f64N/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6465.4
Applied rewrites65.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
lower-/.f6496.7
Applied rewrites96.7%
Final simplification71.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (fma t (/ x y) z) b)))
(if (<= y -3.6e+140)
t_1
(if (<= y 1e+61) (/ (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 = fma(t, (x / y), z) / b;
double tmp;
if (y <= -3.6e+140) {
tmp = t_1;
} else if (y <= 1e+61) {
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(fma(t, Float64(x / y), z) / b) tmp = 0.0 if (y <= -3.6e+140) tmp = t_1; elseif (y <= 1e+61) 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[(N[(t * N[(x / y), $MachinePrecision] + z), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -3.6e+140], t$95$1, If[LessEqual[y, 1e+61], 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 := \frac{\mathsf{fma}\left(t, \frac{x}{y}, z\right)}{b}\\
\mathbf{if}\;y \leq -3.6 \cdot 10^{+140}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 10^{+61}:\\
\;\;\;\;\frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.6e140 or 9.99999999999999949e60 < y Initial program 46.7%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-+.f64N/A
Applied rewrites58.9%
Taylor expanded in b around inf
Applied rewrites80.3%
if -3.6e140 < y < 9.99999999999999949e60Initial program 87.6%
Taylor expanded in b around 0
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*r/N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-+.f6471.4
Applied rewrites71.4%
Final simplification74.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -3.2e+34)
t_1
(if (<= t 3.3e+57) (* z (/ y (fma y b (fma t a 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.2e+34) {
tmp = t_1;
} else if (t <= 3.3e+57) {
tmp = z * (y / fma(y, b, fma(t, a, 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.2e+34) tmp = t_1; elseif (t <= 3.3e+57) tmp = Float64(z * Float64(y / fma(y, b, fma(t, a, 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.2e+34], t$95$1, If[LessEqual[t, 3.3e+57], N[(z * N[(y / N[(y * b + N[(t * a + 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.2 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{+57}:\\
\;\;\;\;z \cdot \frac{y}{\mathsf{fma}\left(y, b, \mathsf{fma}\left(t, a, t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.1999999999999998e34 or 3.3000000000000001e57 < t Initial program 81.0%
Taylor expanded in y around 0
lower-/.f64N/A
lower-+.f6472.0
Applied rewrites72.0%
if -3.1999999999999998e34 < t < 3.3000000000000001e57Initial program 70.1%
Taylor expanded in x around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-+.f64N/A
Applied rewrites67.0%
Applied rewrites79.6%
Taylor expanded in z around inf
Applied rewrites54.9%
Applied rewrites62.2%
Final simplification65.9%
(FPCore (x y z t a b) :precision binary64 (if (<= y -6.5e-17) (/ z b) (if (<= y 9.8e-83) (/ x a) (if (<= y 9.4e+49) (/ x 1.0) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6.5e-17) {
tmp = z / b;
} else if (y <= 9.8e-83) {
tmp = x / a;
} else if (y <= 9.4e+49) {
tmp = x / 1.0;
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-6.5d-17)) then
tmp = z / b
else if (y <= 9.8d-83) then
tmp = x / a
else if (y <= 9.4d+49) then
tmp = x / 1.0d0
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6.5e-17) {
tmp = z / b;
} else if (y <= 9.8e-83) {
tmp = x / a;
} else if (y <= 9.4e+49) {
tmp = x / 1.0;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -6.5e-17: tmp = z / b elif y <= 9.8e-83: tmp = x / a elif y <= 9.4e+49: tmp = x / 1.0 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -6.5e-17) tmp = Float64(z / b); elseif (y <= 9.8e-83) tmp = Float64(x / a); elseif (y <= 9.4e+49) tmp = Float64(x / 1.0); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -6.5e-17) tmp = z / b; elseif (y <= 9.8e-83) tmp = x / a; elseif (y <= 9.4e+49) tmp = x / 1.0; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -6.5e-17], N[(z / b), $MachinePrecision], If[LessEqual[y, 9.8e-83], N[(x / a), $MachinePrecision], If[LessEqual[y, 9.4e+49], N[(x / 1.0), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{-17}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 9.8 \cdot 10^{-83}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;y \leq 9.4 \cdot 10^{+49}:\\
\;\;\;\;\frac{x}{1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -6.4999999999999996e-17 or 9.3999999999999995e49 < y Initial program 53.6%
Taylor expanded in y around inf
lower-/.f6459.2
Applied rewrites59.2%
if -6.4999999999999996e-17 < y < 9.8e-83Initial program 97.1%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
clear-numN/A
inv-powN/A
div-invN/A
unpow-prod-downN/A
inv-powN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f6497.1
Applied rewrites97.1%
Taylor expanded in a around inf
lower-/.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6442.3
Applied rewrites42.3%
Taylor expanded in y around 0
Applied rewrites36.6%
if 9.8e-83 < y < 9.3999999999999995e49Initial program 72.6%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
clear-numN/A
inv-powN/A
div-invN/A
unpow-prod-downN/A
inv-powN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f6472.6
Applied rewrites72.6%
Taylor expanded in t around inf
lower-/.f64N/A
lower-+.f6451.9
Applied rewrites51.9%
Taylor expanded in a around 0
Applied rewrites44.3%
(FPCore (x y z t a b) :precision binary64 (if (<= y -6.5e-17) (/ z b) (if (<= y 9.8e-83) (/ x a) (if (<= y 9.4e+49) (- x (* x a)) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6.5e-17) {
tmp = z / b;
} else if (y <= 9.8e-83) {
tmp = x / a;
} else if (y <= 9.4e+49) {
tmp = x - (x * a);
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-6.5d-17)) then
tmp = z / b
else if (y <= 9.8d-83) then
tmp = x / a
else if (y <= 9.4d+49) then
tmp = x - (x * a)
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6.5e-17) {
tmp = z / b;
} else if (y <= 9.8e-83) {
tmp = x / a;
} else if (y <= 9.4e+49) {
tmp = x - (x * a);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -6.5e-17: tmp = z / b elif y <= 9.8e-83: tmp = x / a elif y <= 9.4e+49: tmp = x - (x * a) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -6.5e-17) tmp = Float64(z / b); elseif (y <= 9.8e-83) tmp = Float64(x / a); elseif (y <= 9.4e+49) tmp = Float64(x - Float64(x * a)); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -6.5e-17) tmp = z / b; elseif (y <= 9.8e-83) tmp = x / a; elseif (y <= 9.4e+49) tmp = x - (x * a); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -6.5e-17], N[(z / b), $MachinePrecision], If[LessEqual[y, 9.8e-83], N[(x / a), $MachinePrecision], If[LessEqual[y, 9.4e+49], N[(x - N[(x * a), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{-17}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 9.8 \cdot 10^{-83}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;y \leq 9.4 \cdot 10^{+49}:\\
\;\;\;\;x - x \cdot a\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -6.4999999999999996e-17 or 9.3999999999999995e49 < y Initial program 53.6%
Taylor expanded in y around inf
lower-/.f6459.2
Applied rewrites59.2%
if -6.4999999999999996e-17 < y < 9.8e-83Initial program 97.1%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
clear-numN/A
inv-powN/A
div-invN/A
unpow-prod-downN/A
inv-powN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f6497.1
Applied rewrites97.1%
Taylor expanded in a around inf
lower-/.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6442.3
Applied rewrites42.3%
Taylor expanded in y around 0
Applied rewrites36.6%
if 9.8e-83 < y < 9.3999999999999995e49Initial program 72.6%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
clear-numN/A
inv-powN/A
div-invN/A
unpow-prod-downN/A
inv-powN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f6472.6
Applied rewrites72.6%
Taylor expanded in t around inf
lower-/.f64N/A
lower-+.f6451.9
Applied rewrites51.9%
Taylor expanded in a around 0
Applied rewrites44.3%
Final simplification47.9%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.7e+52) (/ z b) (if (<= y 1e+50) (/ x (+ a 1.0)) (/ z b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.7e+52) {
tmp = z / b;
} else if (y <= 1e+50) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-2.7d+52)) then
tmp = z / b
else if (y <= 1d+50) then
tmp = x / (a + 1.0d0)
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.7e+52) {
tmp = z / b;
} else if (y <= 1e+50) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.7e+52: tmp = z / b elif y <= 1e+50: tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.7e+52) tmp = Float64(z / b); elseif (y <= 1e+50) tmp = Float64(x / Float64(a + 1.0)); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.7e+52) tmp = z / b; elseif (y <= 1e+50) tmp = x / (a + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.7e+52], N[(z / b), $MachinePrecision], If[LessEqual[y, 1e+50], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{+52}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 10^{+50}:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -2.7e52 or 1.0000000000000001e50 < y Initial program 50.2%
Taylor expanded in y around inf
lower-/.f6461.9
Applied rewrites61.9%
if -2.7e52 < y < 1.0000000000000001e50Initial program 91.5%
Taylor expanded in y around 0
lower-/.f64N/A
lower-+.f6458.9
Applied rewrites58.9%
Final simplification60.2%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (- x (* x a)))) (if (<= t -1.35e+35) t_1 (if (<= t 1.95e+62) (/ z b) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x - (x * a);
double tmp;
if (t <= -1.35e+35) {
tmp = t_1;
} else if (t <= 1.95e+62) {
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 - (x * a)
if (t <= (-1.35d+35)) then
tmp = t_1
else if (t <= 1.95d+62) 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 - (x * a);
double tmp;
if (t <= -1.35e+35) {
tmp = t_1;
} else if (t <= 1.95e+62) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x - (x * a) tmp = 0 if t <= -1.35e+35: tmp = t_1 elif t <= 1.95e+62: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x - Float64(x * a)) tmp = 0.0 if (t <= -1.35e+35) tmp = t_1; elseif (t <= 1.95e+62) 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 - (x * a); tmp = 0.0; if (t <= -1.35e+35) tmp = t_1; elseif (t <= 1.95e+62) 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[(x * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.35e+35], t$95$1, If[LessEqual[t, 1.95e+62], N[(z / b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - x \cdot a\\
\mathbf{if}\;t \leq -1.35 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{+62}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.35000000000000001e35 or 1.95e62 < t Initial program 81.6%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
clear-numN/A
inv-powN/A
div-invN/A
unpow-prod-downN/A
inv-powN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f6481.6
Applied rewrites81.6%
Taylor expanded in t around inf
lower-/.f64N/A
lower-+.f6472.5
Applied rewrites72.5%
Taylor expanded in a around 0
Applied rewrites37.4%
if -1.35000000000000001e35 < t < 1.95e62Initial program 69.9%
Taylor expanded in y around inf
lower-/.f6448.6
Applied rewrites48.6%
Final simplification44.5%
(FPCore (x y z t a b) :precision binary64 (- x (* x a)))
double code(double x, double y, double z, double t, double a, double b) {
return x - (x * a);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x - (x * a)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x - (x * a);
}
def code(x, y, z, t, a, b): return x - (x * a)
function code(x, y, z, t, a, b) return Float64(x - Float64(x * a)) end
function tmp = code(x, y, z, t, a, b) tmp = x - (x * a); end
code[x_, y_, z_, t_, a_, b_] := N[(x - N[(x * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - x \cdot a
\end{array}
Initial program 74.2%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
clear-numN/A
inv-powN/A
div-invN/A
unpow-prod-downN/A
inv-powN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f6474.2
Applied rewrites74.2%
Taylor expanded in t around inf
lower-/.f64N/A
lower-+.f6441.0
Applied rewrites41.0%
Taylor expanded in a around 0
Applied rewrites20.5%
Final simplification20.5%
(FPCore (x y z t a b) :precision binary64 (* a (- x)))
double code(double x, double y, double z, double t, double a, double b) {
return a * -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 = a * -x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a * -x;
}
def code(x, y, z, t, a, b): return a * -x
function code(x, y, z, t, a, b) return Float64(a * Float64(-x)) end
function tmp = code(x, y, z, t, a, b) tmp = a * -x; end
code[x_, y_, z_, t_, a_, b_] := N[(a * (-x)), $MachinePrecision]
\begin{array}{l}
\\
a \cdot \left(-x\right)
\end{array}
Initial program 74.2%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
clear-numN/A
inv-powN/A
div-invN/A
unpow-prod-downN/A
inv-powN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f6474.2
Applied rewrites74.2%
Taylor expanded in t around inf
lower-/.f64N/A
lower-+.f6441.0
Applied rewrites41.0%
Taylor expanded in a around 0
Applied rewrites20.5%
Taylor expanded in a around inf
Applied rewrites3.5%
Final simplification3.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(if (< t -1.3659085366310088e-271)
t_1
(if (< t 3.036967103737246e-130) (/ z b) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 * ((x + ((y / t) * z)) * (1.0d0 / ((a + 1.0d0) + ((y / t) * b))))
if (t < (-1.3659085366310088d-271)) then
tmp = t_1
else if (t < 3.036967103737246d-130) then
tmp = z / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))) tmp = 0 if t < -1.3659085366310088e-271: tmp = t_1 elif t < 3.036967103737246e-130: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.0 * Float64(Float64(x + Float64(Float64(y / t) * z)) * Float64(1.0 / Float64(Float64(a + 1.0) + Float64(Float64(y / t) * b))))) tmp = 0.0 if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))); tmp = 0.0; if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 * N[(N[(x + N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.3659085366310088e-271], t$95$1, If[Less[t, 3.036967103737246e-130], N[(z / b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 \cdot \left(\left(x + \frac{y}{t} \cdot z\right) \cdot \frac{1}{\left(a + 1\right) + \frac{y}{t} \cdot b}\right)\\
\mathbf{if}\;t < -1.3659085366310088 \cdot 10^{-271}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t < 3.036967103737246 \cdot 10^{-130}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024238
(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))))