
(FPCore (x y z t a b c i) :precision binary64 (/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
code = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
def code(x, y, z, t, a, b, c, i): return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
code = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
def code(x, y, z, t, a, b, c, i): return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\end{array}
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (fma (fma (fma (+ a y) y b) y c) y i)))
(if (<=
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
INFINITY)
(fma
y
(/ (fma (fma z y 27464.7644705) y 230661.510616) t_1)
(fma x (/ (pow y 3.0) (+ c (* y (+ b (* y (+ a y)))))) (/ t t_1)))
(-
(+ (+ x (/ 27464.7644705 (* y y))) (/ z y))
(fma a (+ (/ x y) (/ (- z (* a x)) (* y y))) (* (/ x y) (/ b y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = fma(fma(fma((a + y), y, b), y, c), y, i);
double tmp;
if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= ((double) INFINITY)) {
tmp = fma(y, (fma(fma(z, y, 27464.7644705), y, 230661.510616) / t_1), fma(x, (pow(y, 3.0) / (c + (y * (b + (y * (a + y)))))), (t / t_1)));
} else {
tmp = ((x + (27464.7644705 / (y * y))) + (z / y)) - fma(a, ((x / y) + ((z - (a * x)) / (y * y))), ((x / y) * (b / y)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = fma(fma(fma(Float64(a + y), y, b), y, c), y, i) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) <= Inf) tmp = fma(y, Float64(fma(fma(z, y, 27464.7644705), y, 230661.510616) / t_1), fma(x, Float64((y ^ 3.0) / Float64(c + Float64(y * Float64(b + Float64(y * Float64(a + y)))))), Float64(t / t_1))); else tmp = Float64(Float64(Float64(x + Float64(27464.7644705 / Float64(y * y))) + Float64(z / y)) - fma(a, Float64(Float64(x / y) + Float64(Float64(z - Float64(a * x)) / Float64(y * y))), Float64(Float64(x / y) * Float64(b / y)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], Infinity], N[(y * N[(N[(N[(z * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(x * N[(N[Power[y, 3.0], $MachinePrecision] / N[(c + N[(y * N[(b + N[(y * N[(a + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x + N[(27464.7644705 / N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(N[(x / y), $MachinePrecision] + N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x / y), $MachinePrecision] * N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)\\
\mathbf{if}\;\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, y, 27464.7644705\right), y, 230661.510616\right)}{t\_1}, \mathsf{fma}\left(x, \frac{{y}^{3}}{c + y \cdot \left(b + y \cdot \left(a + y\right)\right)}, \frac{t}{t\_1}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x + \frac{27464.7644705}{y \cdot y}\right) + \frac{z}{y}\right) - \mathsf{fma}\left(a, \frac{x}{y} + \frac{z - a \cdot x}{y \cdot y}, \frac{x}{y} \cdot \frac{b}{y}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 87.3%
Taylor expanded in x around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
Applied rewrites91.3%
Taylor expanded in i around 0
Applied rewrites92.3%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
Taylor expanded in y around inf
lower--.f64N/A
associate-+r+N/A
lower-+.f64N/A
lower-+.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
associate-+r+N/A
associate-/l*N/A
associate-/l*N/A
distribute-lft-outN/A
lower-fma.f64N/A
Applied rewrites69.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (fma (fma (fma (+ a y) y b) y c) y i)))
(if (<=
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
INFINITY)
(fma
y
(/ (fma (fma z y 27464.7644705) y 230661.510616) t_1)
(fma x (* (* y y) (/ (* y y) t_1)) (/ t t_1)))
(-
(+ (+ x (/ 27464.7644705 (* y y))) (/ z y))
(fma a (+ (/ x y) (/ (- z (* a x)) (* y y))) (* (/ x y) (/ b y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = fma(fma(fma((a + y), y, b), y, c), y, i);
double tmp;
if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= ((double) INFINITY)) {
tmp = fma(y, (fma(fma(z, y, 27464.7644705), y, 230661.510616) / t_1), fma(x, ((y * y) * ((y * y) / t_1)), (t / t_1)));
} else {
tmp = ((x + (27464.7644705 / (y * y))) + (z / y)) - fma(a, ((x / y) + ((z - (a * x)) / (y * y))), ((x / y) * (b / y)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = fma(fma(fma(Float64(a + y), y, b), y, c), y, i) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) <= Inf) tmp = fma(y, Float64(fma(fma(z, y, 27464.7644705), y, 230661.510616) / t_1), fma(x, Float64(Float64(y * y) * Float64(Float64(y * y) / t_1)), Float64(t / t_1))); else tmp = Float64(Float64(Float64(x + Float64(27464.7644705 / Float64(y * y))) + Float64(z / y)) - fma(a, Float64(Float64(x / y) + Float64(Float64(z - Float64(a * x)) / Float64(y * y))), Float64(Float64(x / y) * Float64(b / y)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], Infinity], N[(y * N[(N[(N[(z * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(x * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x + N[(27464.7644705 / N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(N[(x / y), $MachinePrecision] + N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x / y), $MachinePrecision] * N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)\\
\mathbf{if}\;\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, y, 27464.7644705\right), y, 230661.510616\right)}{t\_1}, \mathsf{fma}\left(x, \left(y \cdot y\right) \cdot \frac{y \cdot y}{t\_1}, \frac{t}{t\_1}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x + \frac{27464.7644705}{y \cdot y}\right) + \frac{z}{y}\right) - \mathsf{fma}\left(a, \frac{x}{y} + \frac{z - a \cdot x}{y \cdot y}, \frac{x}{y} \cdot \frac{b}{y}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 87.3%
Taylor expanded in x around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
Applied rewrites91.3%
Applied rewrites92.2%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
Taylor expanded in y around inf
lower--.f64N/A
associate-+r+N/A
lower-+.f64N/A
lower-+.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
associate-+r+N/A
associate-/l*N/A
associate-/l*N/A
distribute-lft-outN/A
lower-fma.f64N/A
Applied rewrites69.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (fma (fma (+ a y) y b) y c)) (t_2 (fma t_1 y i)))
(if (<=
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
INFINITY)
(fma
y
(/ (fma (fma z y 27464.7644705) y 230661.510616) t_2)
(fma x (* y (/ (* y y) t_1)) (/ t t_2)))
(-
(+ (+ x (/ 27464.7644705 (* y y))) (/ z y))
(fma a (+ (/ x y) (/ (- z (* a x)) (* y y))) (* (/ x y) (/ b y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = fma(fma((a + y), y, b), y, c);
double t_2 = fma(t_1, y, i);
double tmp;
if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= ((double) INFINITY)) {
tmp = fma(y, (fma(fma(z, y, 27464.7644705), y, 230661.510616) / t_2), fma(x, (y * ((y * y) / t_1)), (t / t_2)));
} else {
tmp = ((x + (27464.7644705 / (y * y))) + (z / y)) - fma(a, ((x / y) + ((z - (a * x)) / (y * y))), ((x / y) * (b / y)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = fma(fma(Float64(a + y), y, b), y, c) t_2 = fma(t_1, y, i) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) <= Inf) tmp = fma(y, Float64(fma(fma(z, y, 27464.7644705), y, 230661.510616) / t_2), fma(x, Float64(y * Float64(Float64(y * y) / t_1)), Float64(t / t_2))); else tmp = Float64(Float64(Float64(x + Float64(27464.7644705 / Float64(y * y))) + Float64(z / y)) - fma(a, Float64(Float64(x / y) + Float64(Float64(z - Float64(a * x)) / Float64(y * y))), Float64(Float64(x / y) * Float64(b / y)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * y + i), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], Infinity], N[(y * N[(N[(N[(z * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] / t$95$2), $MachinePrecision] + N[(x * N[(y * N[(N[(y * y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(t / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x + N[(27464.7644705 / N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(N[(x / y), $MachinePrecision] + N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x / y), $MachinePrecision] * N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right)\\
t_2 := \mathsf{fma}\left(t\_1, y, i\right)\\
\mathbf{if}\;\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, y, 27464.7644705\right), y, 230661.510616\right)}{t\_2}, \mathsf{fma}\left(x, y \cdot \frac{y \cdot y}{t\_1}, \frac{t}{t\_2}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x + \frac{27464.7644705}{y \cdot y}\right) + \frac{z}{y}\right) - \mathsf{fma}\left(a, \frac{x}{y} + \frac{z - a \cdot x}{y \cdot y}, \frac{x}{y} \cdot \frac{b}{y}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 87.3%
Taylor expanded in x around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
Applied rewrites91.3%
Taylor expanded in i around 0
Applied rewrites92.3%
Applied rewrites91.1%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
Taylor expanded in y around inf
lower--.f64N/A
associate-+r+N/A
lower-+.f64N/A
lower-+.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
associate-+r+N/A
associate-/l*N/A
associate-/l*N/A
distribute-lft-outN/A
lower-fma.f64N/A
Applied rewrites69.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (fma (fma (fma (+ a y) y b) y c) y i)))
(if (<=
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
INFINITY)
(fma
y
(/ (fma (fma (fma y x z) y 27464.7644705) y 230661.510616) t_1)
(/ t t_1))
(-
(+ (+ x (/ 27464.7644705 (* y y))) (/ z y))
(fma a (+ (/ x y) (/ (- z (* a x)) (* y y))) (* (/ x y) (/ b y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = fma(fma(fma((a + y), y, b), y, c), y, i);
double tmp;
if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= ((double) INFINITY)) {
tmp = fma(y, (fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616) / t_1), (t / t_1));
} else {
tmp = ((x + (27464.7644705 / (y * y))) + (z / y)) - fma(a, ((x / y) + ((z - (a * x)) / (y * y))), ((x / y) * (b / y)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = fma(fma(fma(Float64(a + y), y, b), y, c), y, i) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) <= Inf) tmp = fma(y, Float64(fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616) / t_1), Float64(t / t_1)); else tmp = Float64(Float64(Float64(x + Float64(27464.7644705 / Float64(y * y))) + Float64(z / y)) - fma(a, Float64(Float64(x / y) + Float64(Float64(z - Float64(a * x)) / Float64(y * y))), Float64(Float64(x / y) * Float64(b / y)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], Infinity], N[(y * N[(N[(N[(N[(y * x + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x + N[(27464.7644705 / N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(N[(x / y), $MachinePrecision] + N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x / y), $MachinePrecision] * N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)\\
\mathbf{if}\;\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, x, z\right), y, 27464.7644705\right), y, 230661.510616\right)}{t\_1}, \frac{t}{t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x + \frac{27464.7644705}{y \cdot y}\right) + \frac{z}{y}\right) - \mathsf{fma}\left(a, \frac{x}{y} + \frac{z - a \cdot x}{y \cdot y}, \frac{x}{y} \cdot \frac{b}{y}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 87.3%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites91.0%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
Taylor expanded in y around inf
lower--.f64N/A
associate-+r+N/A
lower-+.f64N/A
lower-+.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
associate-+r+N/A
associate-/l*N/A
associate-/l*N/A
distribute-lft-outN/A
lower-fma.f64N/A
Applied rewrites69.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (fma (fma (fma (+ a y) y b) y c) y i)))
(if (<=
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
INFINITY)
(fma
y
(/ (fma (fma (fma y x z) y 27464.7644705) y 230661.510616) t_1)
(/ t t_1))
(- x (/ (fma -1.0 z (* a x)) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = fma(fma(fma((a + y), y, b), y, c), y, i);
double tmp;
if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= ((double) INFINITY)) {
tmp = fma(y, (fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616) / t_1), (t / t_1));
} else {
tmp = x - (fma(-1.0, z, (a * x)) / y);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = fma(fma(fma(Float64(a + y), y, b), y, c), y, i) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) <= Inf) tmp = fma(y, Float64(fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616) / t_1), Float64(t / t_1)); else tmp = Float64(x - Float64(fma(-1.0, z, Float64(a * x)) / y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], Infinity], N[(y * N[(N[(N[(N[(y * x + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(-1.0 * z + N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)\\
\mathbf{if}\;\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, x, z\right), y, 27464.7644705\right), y, 230661.510616\right)}{t\_1}, \frac{t}{t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\mathsf{fma}\left(-1, z, a \cdot x\right)}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 87.3%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites91.0%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
lower-fma.f64N/A
lower-*.f6469.1
Applied rewrites69.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))))
(if (<= t_1 5e+256) t_1 (- x (/ (fma -1.0 z (* a x)) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
double tmp;
if (t_1 <= 5e+256) {
tmp = t_1;
} else {
tmp = x - (fma(-1.0, z, (a * x)) / y);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) tmp = 0.0 if (t_1 <= 5e+256) tmp = t_1; else tmp = Float64(x - Float64(fma(-1.0, z, Float64(a * x)) / y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+256], t$95$1, N[(x - N[(N[(-1.0 * z + N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{+256}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\mathsf{fma}\left(-1, z, a \cdot x\right)}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < 5.00000000000000015e256Initial program 89.8%
if 5.00000000000000015e256 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 2.9%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
lower-fma.f64N/A
lower-*.f6467.4
Applied rewrites67.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
5e+256)
(*
(- (fma (fma (fma (fma y x z) y 27464.7644705) y 230661.510616) y t))
(/ -1.0 (fma (fma (fma (+ a y) y b) y c) y i)))
(- x (/ (fma -1.0 z (* a x)) y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= 5e+256) {
tmp = -fma(fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616), y, t) * (-1.0 / fma(fma(fma((a + y), y, b), y, c), y, i));
} else {
tmp = x - (fma(-1.0, z, (a * x)) / y);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) <= 5e+256) tmp = Float64(Float64(-fma(fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616), y, t)) * Float64(-1.0 / fma(fma(fma(Float64(a + y), y, b), y, c), y, i))); else tmp = Float64(x - Float64(fma(-1.0, z, Float64(a * x)) / y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], 5e+256], N[((-N[(N[(N[(N[(y * x + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision]) * N[(-1.0 / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(-1.0 * z + N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \leq 5 \cdot 10^{+256}:\\
\;\;\;\;\left(-\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, x, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)\right) \cdot \frac{-1}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\mathsf{fma}\left(-1, z, a \cdot x\right)}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < 5.00000000000000015e256Initial program 89.8%
lift-/.f64N/A
frac-2negN/A
div-invN/A
lower-*.f64N/A
Applied rewrites89.6%
if 5.00000000000000015e256 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 2.9%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
lower-fma.f64N/A
lower-*.f6467.4
Applied rewrites67.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
5e+256)
(/
(fma y (fma y (fma x (* y y) 27464.7644705) 230661.510616) t)
(fma y (fma y (fma y (+ a y) b) c) i))
(- x (/ (fma -1.0 z (* a x)) y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= 5e+256) {
tmp = fma(y, fma(y, fma(x, (y * y), 27464.7644705), 230661.510616), t) / fma(y, fma(y, fma(y, (a + y), b), c), i);
} else {
tmp = x - (fma(-1.0, z, (a * x)) / y);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) <= 5e+256) tmp = Float64(fma(y, fma(y, fma(x, Float64(y * y), 27464.7644705), 230661.510616), t) / fma(y, fma(y, fma(y, Float64(a + y), b), c), i)); else tmp = Float64(x - Float64(fma(-1.0, z, Float64(a * x)) / y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], 5e+256], N[(N[(y * N[(y * N[(x * N[(y * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] + 230661.510616), $MachinePrecision] + t), $MachinePrecision] / N[(y * N[(y * N[(y * N[(a + y), $MachinePrecision] + b), $MachinePrecision] + c), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(-1.0 * z + N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \leq 5 \cdot 10^{+256}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(x, y \cdot y, 27464.7644705\right), 230661.510616\right), t\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, a + y, b\right), c\right), i\right)}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\mathsf{fma}\left(-1, z, a \cdot x\right)}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < 5.00000000000000015e256Initial program 89.8%
Taylor expanded in x around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
Applied rewrites91.6%
Taylor expanded in i around 0
Applied rewrites92.5%
Taylor expanded in c around 0
Applied rewrites86.7%
Taylor expanded in z around 0
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-+.f6485.0
Applied rewrites85.0%
if 5.00000000000000015e256 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 2.9%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
lower-fma.f64N/A
lower-*.f6467.4
Applied rewrites67.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
5e+256)
(/
(fma (fma (fma z y 27464.7644705) y 230661.510616) y t)
(fma (fma (fma (+ a y) y b) y c) y i))
(- x (/ (fma -1.0 z (* a x)) y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= 5e+256) {
tmp = fma(fma(fma(z, y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma((a + y), y, b), y, c), y, i);
} else {
tmp = x - (fma(-1.0, z, (a * x)) / y);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) <= 5e+256) tmp = Float64(fma(fma(fma(z, y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma(Float64(a + y), y, b), y, c), y, i)); else tmp = Float64(x - Float64(fma(-1.0, z, Float64(a * x)) / y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], 5e+256], N[(N[(N[(N[(z * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(-1.0 * z + N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \leq 5 \cdot 10^{+256}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z, y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\mathsf{fma}\left(-1, z, a \cdot x\right)}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < 5.00000000000000015e256Initial program 89.8%
Taylor expanded in x around 0
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites84.5%
if 5.00000000000000015e256 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 2.9%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
lower-fma.f64N/A
lower-*.f6467.4
Applied rewrites67.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
5e+256)
(/
(fma (fma 27464.7644705 y 230661.510616) y t)
(+ (* y (fma y (fma a y b) c)) i))
(- x (/ (fma -1.0 z (* a x)) y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= 5e+256) {
tmp = fma(fma(27464.7644705, y, 230661.510616), y, t) / ((y * fma(y, fma(a, y, b), c)) + i);
} else {
tmp = x - (fma(-1.0, z, (a * x)) / y);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) <= 5e+256) tmp = Float64(fma(fma(27464.7644705, y, 230661.510616), y, t) / Float64(Float64(y * fma(y, fma(a, y, b), c)) + i)); else tmp = Float64(x - Float64(fma(-1.0, z, Float64(a * x)) / y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], 5e+256], N[(N[(N[(27464.7644705 * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / N[(N[(y * N[(y * N[(a * y + b), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(-1.0 * z + N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \leq 5 \cdot 10^{+256}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(27464.7644705, y, 230661.510616\right), y, t\right)}{y \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(a, y, b\right), c\right) + i}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\mathsf{fma}\left(-1, z, a \cdot x\right)}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < 5.00000000000000015e256Initial program 89.8%
Taylor expanded in y around 0
lower-*.f6470.4
Applied rewrites70.4%
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f6470.5
lift-+.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-+.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-fma.f64N/A
lower-*.f64N/A
lift-fma.f6470.5
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6470.5
Applied rewrites70.5%
Taylor expanded in y around 0
Applied rewrites67.9%
Taylor expanded in y around 0
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6479.0
Applied rewrites79.0%
if 5.00000000000000015e256 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 2.9%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
lower-fma.f64N/A
lower-*.f6467.4
Applied rewrites67.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
5e+256)
(/ (fma 230661.510616 y t) i)
(* (/ x t) t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= 5e+256) {
tmp = fma(230661.510616, y, t) / i;
} else {
tmp = (x / t) * t;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) <= 5e+256) tmp = Float64(fma(230661.510616, y, t) / i); else tmp = Float64(Float64(x / t) * t); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], 5e+256], N[(N[(230661.510616 * y + t), $MachinePrecision] / i), $MachinePrecision], N[(N[(x / t), $MachinePrecision] * t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \leq 5 \cdot 10^{+256}:\\
\;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{i}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t} \cdot t\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < 5.00000000000000015e256Initial program 89.8%
Taylor expanded in y around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-/.f6449.6
Applied rewrites49.6%
Taylor expanded in t around 0
Applied rewrites18.9%
Taylor expanded in i around inf
Applied rewrites51.5%
if 5.00000000000000015e256 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 2.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites5.8%
Taylor expanded in y around inf
Applied rewrites44.3%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
5e+256)
(/ t i)
(* (/ x t) t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= 5e+256) {
tmp = t / i;
} else {
tmp = (x / t) * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= 5d+256) then
tmp = t / i
else
tmp = (x / t) * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= 5e+256) {
tmp = t / i;
} else {
tmp = (x / t) * t;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= 5e+256: tmp = t / i else: tmp = (x / t) * t return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) <= 5e+256) tmp = Float64(t / i); else tmp = Float64(Float64(x / t) * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= 5e+256) tmp = t / i; else tmp = (x / t) * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], 5e+256], N[(t / i), $MachinePrecision], N[(N[(x / t), $MachinePrecision] * t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \leq 5 \cdot 10^{+256}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t} \cdot t\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < 5.00000000000000015e256Initial program 89.8%
Taylor expanded in y around 0
lower-/.f6443.7
Applied rewrites43.7%
if 5.00000000000000015e256 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 2.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites5.8%
Taylor expanded in y around inf
Applied rewrites44.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -3.3e+63) (not (<= y 6.6e+23))) (- x (/ (fma -1.0 z (* a x)) y)) (/ (fma (fma 27464.7644705 y 230661.510616) y t) (+ (* y (fma b y c)) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -3.3e+63) || !(y <= 6.6e+23)) {
tmp = x - (fma(-1.0, z, (a * x)) / y);
} else {
tmp = fma(fma(27464.7644705, y, 230661.510616), y, t) / ((y * fma(b, y, c)) + i);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -3.3e+63) || !(y <= 6.6e+23)) tmp = Float64(x - Float64(fma(-1.0, z, Float64(a * x)) / y)); else tmp = Float64(fma(fma(27464.7644705, y, 230661.510616), y, t) / Float64(Float64(y * fma(b, y, c)) + i)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -3.3e+63], N[Not[LessEqual[y, 6.6e+23]], $MachinePrecision]], N[(x - N[(N[(-1.0 * z + N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(27464.7644705 * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / N[(N[(y * N[(b * y + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{+63} \lor \neg \left(y \leq 6.6 \cdot 10^{+23}\right):\\
\;\;\;\;x - \frac{\mathsf{fma}\left(-1, z, a \cdot x\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(27464.7644705, y, 230661.510616\right), y, t\right)}{y \cdot \mathsf{fma}\left(b, y, c\right) + i}\\
\end{array}
\end{array}
if y < -3.3000000000000002e63 or 6.60000000000000059e23 < y Initial program 6.2%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
lower-fma.f64N/A
lower-*.f6463.7
Applied rewrites63.7%
if -3.3000000000000002e63 < y < 6.60000000000000059e23Initial program 95.3%
Taylor expanded in y around 0
lower-*.f6477.7
Applied rewrites77.7%
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f6477.7
lift-+.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-+.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-fma.f64N/A
lower-*.f64N/A
lift-fma.f6477.7
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6477.7
Applied rewrites77.7%
Taylor expanded in y around 0
Applied rewrites75.6%
Taylor expanded in y around 0
lower-*.f64N/A
+-commutativeN/A
lower-fma.f6482.8
Applied rewrites82.8%
Final simplification73.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -3.3e+63) (not (<= y 3.8e+19))) (- x (/ (fma -1.0 z (* a x)) y)) (/ (fma 230661.510616 y t) (+ (* c y) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -3.3e+63) || !(y <= 3.8e+19)) {
tmp = x - (fma(-1.0, z, (a * x)) / y);
} else {
tmp = fma(230661.510616, y, t) / ((c * y) + i);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -3.3e+63) || !(y <= 3.8e+19)) tmp = Float64(x - Float64(fma(-1.0, z, Float64(a * x)) / y)); else tmp = Float64(fma(230661.510616, y, t) / Float64(Float64(c * y) + i)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -3.3e+63], N[Not[LessEqual[y, 3.8e+19]], $MachinePrecision]], N[(x - N[(N[(-1.0 * z + N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(230661.510616 * y + t), $MachinePrecision] / N[(N[(c * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{+63} \lor \neg \left(y \leq 3.8 \cdot 10^{+19}\right):\\
\;\;\;\;x - \frac{\mathsf{fma}\left(-1, z, a \cdot x\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{c \cdot y + i}\\
\end{array}
\end{array}
if y < -3.3000000000000002e63 or 3.8e19 < y Initial program 6.2%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
lower-fma.f64N/A
lower-*.f6463.7
Applied rewrites63.7%
if -3.3000000000000002e63 < y < 3.8e19Initial program 95.3%
Taylor expanded in y around 0
lower-*.f6477.7
Applied rewrites77.7%
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f6477.7
lift-+.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-+.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-fma.f64N/A
lower-*.f64N/A
lift-fma.f6477.7
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6477.7
Applied rewrites77.7%
Taylor expanded in y around 0
Applied rewrites75.6%
Final simplification69.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -2.5e+58) (not (<= y 580.0))) (- x (/ (fma -1.0 z (* a x)) y)) (/ (fma 230661.510616 y t) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.5e+58) || !(y <= 580.0)) {
tmp = x - (fma(-1.0, z, (a * x)) / y);
} else {
tmp = fma(230661.510616, y, t) / i;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -2.5e+58) || !(y <= 580.0)) tmp = Float64(x - Float64(fma(-1.0, z, Float64(a * x)) / y)); else tmp = Float64(fma(230661.510616, y, t) / i); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -2.5e+58], N[Not[LessEqual[y, 580.0]], $MachinePrecision]], N[(x - N[(N[(-1.0 * z + N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(230661.510616 * y + t), $MachinePrecision] / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{+58} \lor \neg \left(y \leq 580\right):\\
\;\;\;\;x - \frac{\mathsf{fma}\left(-1, z, a \cdot x\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{i}\\
\end{array}
\end{array}
if y < -2.49999999999999993e58 or 580 < y Initial program 9.1%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
lower-fma.f64N/A
lower-*.f6461.3
Applied rewrites61.3%
if -2.49999999999999993e58 < y < 580Initial program 95.9%
Taylor expanded in y around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-/.f6457.1
Applied rewrites57.1%
Taylor expanded in t around 0
Applied rewrites21.1%
Taylor expanded in i around inf
Applied rewrites59.2%
Final simplification60.2%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -72000000000.0) (not (<= y 9e-7))) (/ (* x y) a) (/ t i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -72000000000.0) || !(y <= 9e-7)) {
tmp = (x * y) / a;
} else {
tmp = t / i;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-72000000000.0d0)) .or. (.not. (y <= 9d-7))) then
tmp = (x * y) / a
else
tmp = t / i
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -72000000000.0) || !(y <= 9e-7)) {
tmp = (x * y) / a;
} else {
tmp = t / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -72000000000.0) or not (y <= 9e-7): tmp = (x * y) / a else: tmp = t / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -72000000000.0) || !(y <= 9e-7)) tmp = Float64(Float64(x * y) / a); else tmp = Float64(t / i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -72000000000.0) || ~((y <= 9e-7))) tmp = (x * y) / a; else tmp = t / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -72000000000.0], N[Not[LessEqual[y, 9e-7]], $MachinePrecision]], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision], N[(t / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -72000000000 \lor \neg \left(y \leq 9 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{x \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i}\\
\end{array}
\end{array}
if y < -7.2e10 or 8.99999999999999959e-7 < y Initial program 12.1%
Taylor expanded in a around inf
associate-/r*N/A
lower-/.f64N/A
Applied rewrites9.6%
Taylor expanded in x around inf
Applied rewrites19.0%
if -7.2e10 < y < 8.99999999999999959e-7Initial program 99.7%
Taylor expanded in y around 0
lower-/.f6454.0
Applied rewrites54.0%
Final simplification35.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= t -3.3e-162) (not (<= t 4.2e-210))) (/ t i) (* y (/ 230661.510616 i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((t <= -3.3e-162) || !(t <= 4.2e-210)) {
tmp = t / i;
} else {
tmp = y * (230661.510616 / i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((t <= (-3.3d-162)) .or. (.not. (t <= 4.2d-210))) then
tmp = t / i
else
tmp = y * (230661.510616d0 / i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((t <= -3.3e-162) || !(t <= 4.2e-210)) {
tmp = t / i;
} else {
tmp = y * (230661.510616 / i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (t <= -3.3e-162) or not (t <= 4.2e-210): tmp = t / i else: tmp = y * (230661.510616 / i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((t <= -3.3e-162) || !(t <= 4.2e-210)) tmp = Float64(t / i); else tmp = Float64(y * Float64(230661.510616 / i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((t <= -3.3e-162) || ~((t <= 4.2e-210))) tmp = t / i; else tmp = y * (230661.510616 / i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[t, -3.3e-162], N[Not[LessEqual[t, 4.2e-210]], $MachinePrecision]], N[(t / i), $MachinePrecision], N[(y * N[(230661.510616 / i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.3 \cdot 10^{-162} \lor \neg \left(t \leq 4.2 \cdot 10^{-210}\right):\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{230661.510616}{i}\\
\end{array}
\end{array}
if t < -3.30000000000000013e-162 or 4.20000000000000032e-210 < t Initial program 49.1%
Taylor expanded in y around 0
lower-/.f6430.1
Applied rewrites30.1%
if -3.30000000000000013e-162 < t < 4.20000000000000032e-210Initial program 63.9%
Taylor expanded in y around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-/.f6433.2
Applied rewrites33.2%
Taylor expanded in t around 0
Applied rewrites29.1%
Applied rewrites29.5%
Final simplification30.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= t -3.3e-162) (not (<= t 4.2e-210))) (/ t i) (* 230661.510616 (/ y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((t <= -3.3e-162) || !(t <= 4.2e-210)) {
tmp = t / i;
} else {
tmp = 230661.510616 * (y / i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((t <= (-3.3d-162)) .or. (.not. (t <= 4.2d-210))) then
tmp = t / i
else
tmp = 230661.510616d0 * (y / i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((t <= -3.3e-162) || !(t <= 4.2e-210)) {
tmp = t / i;
} else {
tmp = 230661.510616 * (y / i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (t <= -3.3e-162) or not (t <= 4.2e-210): tmp = t / i else: tmp = 230661.510616 * (y / i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((t <= -3.3e-162) || !(t <= 4.2e-210)) tmp = Float64(t / i); else tmp = Float64(230661.510616 * Float64(y / i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((t <= -3.3e-162) || ~((t <= 4.2e-210))) tmp = t / i; else tmp = 230661.510616 * (y / i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[t, -3.3e-162], N[Not[LessEqual[t, 4.2e-210]], $MachinePrecision]], N[(t / i), $MachinePrecision], N[(230661.510616 * N[(y / i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.3 \cdot 10^{-162} \lor \neg \left(t \leq 4.2 \cdot 10^{-210}\right):\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;230661.510616 \cdot \frac{y}{i}\\
\end{array}
\end{array}
if t < -3.30000000000000013e-162 or 4.20000000000000032e-210 < t Initial program 49.1%
Taylor expanded in y around 0
lower-/.f6430.1
Applied rewrites30.1%
if -3.30000000000000013e-162 < t < 4.20000000000000032e-210Initial program 63.9%
Taylor expanded in y around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-/.f6433.2
Applied rewrites33.2%
Taylor expanded in t around 0
Applied rewrites29.1%
Final simplification29.9%
(FPCore (x y z t a b c i) :precision binary64 (/ t i))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return t / i;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
code = t / i
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return t / i;
}
def code(x, y, z, t, a, b, c, i): return t / i
function code(x, y, z, t, a, b, c, i) return Float64(t / i) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = t / i; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(t / i), $MachinePrecision]
\begin{array}{l}
\\
\frac{t}{i}
\end{array}
Initial program 52.1%
Taylor expanded in y around 0
lower-/.f6426.6
Applied rewrites26.6%
(FPCore (x y z t a b c i) :precision binary64 (/ z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return z / a;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
code = z / a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return z / a;
}
def code(x, y, z, t, a, b, c, i): return z / a
function code(x, y, z, t, a, b, c, i) return Float64(z / a) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = z / a; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(z / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{z}{a}
\end{array}
Initial program 52.1%
Taylor expanded in a around inf
associate-/r*N/A
lower-/.f64N/A
Applied rewrites8.3%
Taylor expanded in z around inf
Applied rewrites5.3%
herbie shell --seed 2024324
(FPCore (x y z t a b c i)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2"
:precision binary64
(/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))