
(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 15 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 (<=
(/
(+
t
(* (+ 230661.510616 (* (+ 27464.7644705 (* (+ z (* y x)) y)) y)) y))
(+ i (* (+ c (* (+ b (* (+ a y) y)) y)) y)))
1e+272)
(fma
y
(+
(/ 230661.510616 t_1)
(fma x (/ (pow y 3.0) t_1) (/ (* (fma z y 27464.7644705) y) t_1)))
(/ t t_1))
(- (+ (/ z y) (+ (/ 27464.7644705 (* y y)) x)) (* (/ x (* y y)) b)))))
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 (((t + ((230661.510616 + ((27464.7644705 + ((z + (y * x)) * y)) * y)) * y)) / (i + ((c + ((b + ((a + y) * y)) * y)) * y))) <= 1e+272) {
tmp = fma(y, ((230661.510616 / t_1) + fma(x, (pow(y, 3.0) / t_1), ((fma(z, y, 27464.7644705) * y) / t_1))), (t / t_1));
} else {
tmp = ((z / y) + ((27464.7644705 / (y * y)) + x)) - ((x / (y * y)) * b);
}
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(t + Float64(Float64(230661.510616 + Float64(Float64(27464.7644705 + Float64(Float64(z + Float64(y * x)) * y)) * y)) * y)) / Float64(i + Float64(Float64(c + Float64(Float64(b + Float64(Float64(a + y) * y)) * y)) * y))) <= 1e+272) tmp = fma(y, Float64(Float64(230661.510616 / t_1) + fma(x, Float64((y ^ 3.0) / t_1), Float64(Float64(fma(z, y, 27464.7644705) * y) / t_1))), Float64(t / t_1)); else tmp = Float64(Float64(Float64(z / y) + Float64(Float64(27464.7644705 / Float64(y * y)) + x)) - Float64(Float64(x / Float64(y * y)) * b)); 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[(t + N[(N[(230661.510616 + N[(N[(27464.7644705 + N[(N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] / N[(i + N[(N[(c + N[(N[(b + N[(N[(a + y), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+272], N[(y * N[(N[(230661.510616 / t$95$1), $MachinePrecision] + N[(x * N[(N[Power[y, 3.0], $MachinePrecision] / t$95$1), $MachinePrecision] + N[(N[(N[(z * y + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z / y), $MachinePrecision] + N[(N[(27464.7644705 / N[(y * y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] - N[(N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision] * b), $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{t + \left(230661.510616 + \left(27464.7644705 + \left(z + y \cdot x\right) \cdot y\right) \cdot y\right) \cdot y}{i + \left(c + \left(b + \left(a + y\right) \cdot y\right) \cdot y\right) \cdot y} \leq 10^{+272}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{230661.510616}{t\_1} + \mathsf{fma}\left(x, \frac{{y}^{3}}{t\_1}, \frac{\mathsf{fma}\left(z, y, 27464.7644705\right) \cdot y}{t\_1}\right), \frac{t}{t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{z}{y} + \left(\frac{27464.7644705}{y \cdot y} + x\right)\right) - \frac{x}{y \cdot y} \cdot b\\
\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)) < 1.0000000000000001e272Initial program 89.3%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites89.8%
Taylor expanded in x around 0
Applied rewrites91.5%
if 1.0000000000000001e272 < (/.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 1.2%
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 rewrites71.1%
Taylor expanded in b around inf
Applied rewrites74.4%
Final simplification85.4%
(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 (<=
(/
(+
t
(* (+ 230661.510616 (* (+ 27464.7644705 (* (+ z (* y x)) y)) y)) y))
(+ i (* (+ c (* (+ b (* (+ a y) y)) y)) y)))
1e+272)
(fma
y
(/ (fma (fma z y 27464.7644705) y 230661.510616) t_1)
(fma x (/ (pow y 4.0) t_1) (/ t t_1)))
(- (+ (/ z y) (+ (/ 27464.7644705 (* y y)) x)) (* (/ x (* y y)) b)))))
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 (((t + ((230661.510616 + ((27464.7644705 + ((z + (y * x)) * y)) * y)) * y)) / (i + ((c + ((b + ((a + y) * y)) * y)) * y))) <= 1e+272) {
tmp = fma(y, (fma(fma(z, y, 27464.7644705), y, 230661.510616) / t_1), fma(x, (pow(y, 4.0) / t_1), (t / t_1)));
} else {
tmp = ((z / y) + ((27464.7644705 / (y * y)) + x)) - ((x / (y * y)) * b);
}
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(t + Float64(Float64(230661.510616 + Float64(Float64(27464.7644705 + Float64(Float64(z + Float64(y * x)) * y)) * y)) * y)) / Float64(i + Float64(Float64(c + Float64(Float64(b + Float64(Float64(a + y) * y)) * y)) * y))) <= 1e+272) tmp = fma(y, Float64(fma(fma(z, y, 27464.7644705), y, 230661.510616) / t_1), fma(x, Float64((y ^ 4.0) / t_1), Float64(t / t_1))); else tmp = Float64(Float64(Float64(z / y) + Float64(Float64(27464.7644705 / Float64(y * y)) + x)) - Float64(Float64(x / Float64(y * y)) * b)); 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[(t + N[(N[(230661.510616 + N[(N[(27464.7644705 + N[(N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] / N[(i + N[(N[(c + N[(N[(b + N[(N[(a + y), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+272], N[(y * N[(N[(N[(z * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(x * N[(N[Power[y, 4.0], $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z / y), $MachinePrecision] + N[(N[(27464.7644705 / N[(y * y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] - N[(N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision] * b), $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{t + \left(230661.510616 + \left(27464.7644705 + \left(z + y \cdot x\right) \cdot y\right) \cdot y\right) \cdot y}{i + \left(c + \left(b + \left(a + y\right) \cdot y\right) \cdot y\right) \cdot y} \leq 10^{+272}:\\
\;\;\;\;\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}^{4}}{t\_1}, \frac{t}{t\_1}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{z}{y} + \left(\frac{27464.7644705}{y \cdot y} + x\right)\right) - \frac{x}{y \cdot y} \cdot b\\
\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)) < 1.0000000000000001e272Initial program 89.3%
Taylor expanded in x around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
Applied rewrites91.1%
if 1.0000000000000001e272 < (/.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 1.2%
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 rewrites71.1%
Taylor expanded in b around inf
Applied rewrites74.4%
Final simplification85.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (/ t (fma (fma (fma (+ a y) y b) y c) y i)))
(t_2
(/
(+
t
(* (+ 230661.510616 (* (+ 27464.7644705 (* (+ z (* y x)) y)) y)) y))
(+ i (* (+ c (* (+ b (* (+ a y) y)) y)) y)))))
(if (<= t_2 -2e-231)
t_1
(if (<= t_2 2e-180)
(/ (fma (fma (fma (fma x y z) y 27464.7644705) y 230661.510616) y t) i)
(if (<= t_2 1e+272) t_1 (+ (/ (- z (* a x)) y) x))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = t / fma(fma(fma((a + y), y, b), y, c), y, i);
double t_2 = (t + ((230661.510616 + ((27464.7644705 + ((z + (y * x)) * y)) * y)) * y)) / (i + ((c + ((b + ((a + y) * y)) * y)) * y));
double tmp;
if (t_2 <= -2e-231) {
tmp = t_1;
} else if (t_2 <= 2e-180) {
tmp = fma(fma(fma(fma(x, y, z), y, 27464.7644705), y, 230661.510616), y, t) / i;
} else if (t_2 <= 1e+272) {
tmp = t_1;
} else {
tmp = ((z - (a * x)) / y) + x;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(t / fma(fma(fma(Float64(a + y), y, b), y, c), y, i)) t_2 = Float64(Float64(t + Float64(Float64(230661.510616 + Float64(Float64(27464.7644705 + Float64(Float64(z + Float64(y * x)) * y)) * y)) * y)) / Float64(i + Float64(Float64(c + Float64(Float64(b + Float64(Float64(a + y) * y)) * y)) * y))) tmp = 0.0 if (t_2 <= -2e-231) tmp = t_1; elseif (t_2 <= 2e-180) tmp = Float64(fma(fma(fma(fma(x, y, z), y, 27464.7644705), y, 230661.510616), y, t) / i); elseif (t_2 <= 1e+272) tmp = t_1; else tmp = Float64(Float64(Float64(z - Float64(a * x)) / y) + x); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(t / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t + N[(N[(230661.510616 + N[(N[(27464.7644705 + N[(N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] / N[(i + N[(N[(c + N[(N[(b + N[(N[(a + y), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e-231], t$95$1, If[LessEqual[t$95$2, 2e-180], N[(N[(N[(N[(N[(x * y + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / i), $MachinePrecision], If[LessEqual[t$95$2, 1e+272], t$95$1, N[(N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\
t_2 := \frac{t + \left(230661.510616 + \left(27464.7644705 + \left(z + y \cdot x\right) \cdot y\right) \cdot y\right) \cdot y}{i + \left(c + \left(b + \left(a + y\right) \cdot y\right) \cdot y\right) \cdot y}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{-231}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-180}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{i}\\
\mathbf{elif}\;t\_2 \leq 10^{+272}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z - a \cdot x}{y} + x\\
\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)) < -2e-231 or 2e-180 < (/.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)) < 1.0000000000000001e272Initial program 93.9%
Taylor expanded in t around inf
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
lower-+.f6467.7
Applied rewrites67.7%
if -2e-231 < (/.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)) < 2e-180Initial program 78.6%
Taylor expanded in i around inf
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
lower-fma.f6466.6
Applied rewrites66.6%
if 1.0000000000000001e272 < (/.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 1.2%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites2.7%
Taylor expanded in y around inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6472.2
Applied rewrites72.2%
Final simplification69.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 (<=
(/
(+
t
(* (+ 230661.510616 (* (+ 27464.7644705 (* (+ z (* y x)) y)) y)) y))
(+ i (* (+ c (* (+ b (* (+ a y) y)) y)) y)))
1e+272)
(fma
y
(/ (fma (fma (fma x y z) y 27464.7644705) y 230661.510616) t_1)
(/ t t_1))
(- (+ (/ z y) (+ (/ 27464.7644705 (* y y)) x)) (* (/ x (* y y)) b)))))
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 (((t + ((230661.510616 + ((27464.7644705 + ((z + (y * x)) * y)) * y)) * y)) / (i + ((c + ((b + ((a + y) * y)) * y)) * y))) <= 1e+272) {
tmp = fma(y, (fma(fma(fma(x, y, z), y, 27464.7644705), y, 230661.510616) / t_1), (t / t_1));
} else {
tmp = ((z / y) + ((27464.7644705 / (y * y)) + x)) - ((x / (y * y)) * b);
}
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(t + Float64(Float64(230661.510616 + Float64(Float64(27464.7644705 + Float64(Float64(z + Float64(y * x)) * y)) * y)) * y)) / Float64(i + Float64(Float64(c + Float64(Float64(b + Float64(Float64(a + y) * y)) * y)) * y))) <= 1e+272) tmp = fma(y, Float64(fma(fma(fma(x, y, z), y, 27464.7644705), y, 230661.510616) / t_1), Float64(t / t_1)); else tmp = Float64(Float64(Float64(z / y) + Float64(Float64(27464.7644705 / Float64(y * y)) + x)) - Float64(Float64(x / Float64(y * y)) * b)); 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[(t + N[(N[(230661.510616 + N[(N[(27464.7644705 + N[(N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] / N[(i + N[(N[(c + N[(N[(b + N[(N[(a + y), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+272], N[(y * N[(N[(N[(N[(x * y + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z / y), $MachinePrecision] + N[(N[(27464.7644705 / N[(y * y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] - N[(N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision] * b), $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{t + \left(230661.510616 + \left(27464.7644705 + \left(z + y \cdot x\right) \cdot y\right) \cdot y\right) \cdot y}{i + \left(c + \left(b + \left(a + y\right) \cdot y\right) \cdot y\right) \cdot y} \leq 10^{+272}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right)}{t\_1}, \frac{t}{t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{z}{y} + \left(\frac{27464.7644705}{y \cdot y} + x\right)\right) - \frac{x}{y \cdot y} \cdot b\\
\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)) < 1.0000000000000001e272Initial program 89.3%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites89.8%
if 1.0000000000000001e272 < (/.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 1.2%
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 rewrites71.1%
Taylor expanded in b around inf
Applied rewrites74.4%
Final simplification84.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(/
(+
t
(* (+ 230661.510616 (* (+ 27464.7644705 (* (+ z (* y x)) y)) y)) y))
(+ i (* (+ c (* (+ b (* (+ a y) y)) y)) y)))))
(if (<= t_1 1e+272)
t_1
(- (+ (/ z y) (+ (/ 27464.7644705 (* y y)) x)) (* (/ x (* y y)) b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (t + ((230661.510616 + ((27464.7644705 + ((z + (y * x)) * y)) * y)) * y)) / (i + ((c + ((b + ((a + y) * y)) * y)) * y));
double tmp;
if (t_1 <= 1e+272) {
tmp = t_1;
} else {
tmp = ((z / y) + ((27464.7644705 / (y * y)) + x)) - ((x / (y * y)) * b);
}
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) :: t_1
real(8) :: tmp
t_1 = (t + ((230661.510616d0 + ((27464.7644705d0 + ((z + (y * x)) * y)) * y)) * y)) / (i + ((c + ((b + ((a + y) * y)) * y)) * y))
if (t_1 <= 1d+272) then
tmp = t_1
else
tmp = ((z / y) + ((27464.7644705d0 / (y * y)) + x)) - ((x / (y * y)) * b)
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 t_1 = (t + ((230661.510616 + ((27464.7644705 + ((z + (y * x)) * y)) * y)) * y)) / (i + ((c + ((b + ((a + y) * y)) * y)) * y));
double tmp;
if (t_1 <= 1e+272) {
tmp = t_1;
} else {
tmp = ((z / y) + ((27464.7644705 / (y * y)) + x)) - ((x / (y * y)) * b);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (t + ((230661.510616 + ((27464.7644705 + ((z + (y * x)) * y)) * y)) * y)) / (i + ((c + ((b + ((a + y) * y)) * y)) * y)) tmp = 0 if t_1 <= 1e+272: tmp = t_1 else: tmp = ((z / y) + ((27464.7644705 / (y * y)) + x)) - ((x / (y * y)) * b) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(t + Float64(Float64(230661.510616 + Float64(Float64(27464.7644705 + Float64(Float64(z + Float64(y * x)) * y)) * y)) * y)) / Float64(i + Float64(Float64(c + Float64(Float64(b + Float64(Float64(a + y) * y)) * y)) * y))) tmp = 0.0 if (t_1 <= 1e+272) tmp = t_1; else tmp = Float64(Float64(Float64(z / y) + Float64(Float64(27464.7644705 / Float64(y * y)) + x)) - Float64(Float64(x / Float64(y * y)) * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (t + ((230661.510616 + ((27464.7644705 + ((z + (y * x)) * y)) * y)) * y)) / (i + ((c + ((b + ((a + y) * y)) * y)) * y)); tmp = 0.0; if (t_1 <= 1e+272) tmp = t_1; else tmp = ((z / y) + ((27464.7644705 / (y * y)) + x)) - ((x / (y * y)) * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(t + N[(N[(230661.510616 + N[(N[(27464.7644705 + N[(N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] / N[(i + N[(N[(c + N[(N[(b + N[(N[(a + y), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 1e+272], t$95$1, N[(N[(N[(z / y), $MachinePrecision] + N[(N[(27464.7644705 / N[(y * y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] - N[(N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t + \left(230661.510616 + \left(27464.7644705 + \left(z + y \cdot x\right) \cdot y\right) \cdot y\right) \cdot y}{i + \left(c + \left(b + \left(a + y\right) \cdot y\right) \cdot y\right) \cdot y}\\
\mathbf{if}\;t\_1 \leq 10^{+272}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{z}{y} + \left(\frac{27464.7644705}{y \cdot y} + x\right)\right) - \frac{x}{y \cdot y} \cdot b\\
\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)) < 1.0000000000000001e272Initial program 89.3%
if 1.0000000000000001e272 < (/.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 1.2%
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 rewrites71.1%
Taylor expanded in b around inf
Applied rewrites74.4%
Final simplification84.0%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(/
(+
t
(* (+ 230661.510616 (* (+ 27464.7644705 (* (+ z (* y x)) y)) y)) y))
(+ i (* (+ c (* (+ b (* (+ a y) y)) y)) y)))
1e+272)
(*
(/ -1.0 (fma (fma (fma (+ a y) y b) y c) y i))
(- (fma (fma (fma (fma y x z) y 27464.7644705) y 230661.510616) y t)))
(- (+ (/ z y) (+ (/ 27464.7644705 (* y y)) x)) (* (/ x (* y y)) b))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((t + ((230661.510616 + ((27464.7644705 + ((z + (y * x)) * y)) * y)) * y)) / (i + ((c + ((b + ((a + y) * y)) * y)) * y))) <= 1e+272) {
tmp = (-1.0 / fma(fma(fma((a + y), y, b), y, c), y, i)) * -fma(fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616), y, t);
} else {
tmp = ((z / y) + ((27464.7644705 / (y * y)) + x)) - ((x / (y * y)) * b);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(t + Float64(Float64(230661.510616 + Float64(Float64(27464.7644705 + Float64(Float64(z + Float64(y * x)) * y)) * y)) * y)) / Float64(i + Float64(Float64(c + Float64(Float64(b + Float64(Float64(a + y) * y)) * y)) * y))) <= 1e+272) tmp = Float64(Float64(-1.0 / fma(fma(fma(Float64(a + y), y, b), y, c), y, i)) * Float64(-fma(fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616), y, t))); else tmp = Float64(Float64(Float64(z / y) + Float64(Float64(27464.7644705 / Float64(y * y)) + x)) - Float64(Float64(x / Float64(y * y)) * b)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(t + N[(N[(230661.510616 + N[(N[(27464.7644705 + N[(N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] / N[(i + N[(N[(c + N[(N[(b + N[(N[(a + y), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+272], N[(N[(-1.0 / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision] * (-N[(N[(N[(N[(y * x + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision])), $MachinePrecision], N[(N[(N[(z / y), $MachinePrecision] + N[(N[(27464.7644705 / N[(y * y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] - N[(N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t + \left(230661.510616 + \left(27464.7644705 + \left(z + y \cdot x\right) \cdot y\right) \cdot y\right) \cdot y}{i + \left(c + \left(b + \left(a + y\right) \cdot y\right) \cdot y\right) \cdot y} \leq 10^{+272}:\\
\;\;\;\;\frac{-1}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)} \cdot \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)\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{z}{y} + \left(\frac{27464.7644705}{y \cdot y} + x\right)\right) - \frac{x}{y \cdot y} \cdot b\\
\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)) < 1.0000000000000001e272Initial program 89.3%
lift-/.f64N/A
frac-2negN/A
div-invN/A
lower-*.f64N/A
Applied rewrites89.2%
if 1.0000000000000001e272 < (/.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 1.2%
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 rewrites71.1%
Taylor expanded in b around inf
Applied rewrites74.4%
Final simplification83.9%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(/
(+
t
(* (+ 230661.510616 (* (+ 27464.7644705 (* (+ z (* y x)) y)) y)) y))
(+ i (* (+ c (* (+ b (* (+ a y) y)) y)) y)))
1e+272)
(/
(fma (fma (fma (fma x y z) y 27464.7644705) y 230661.510616) y t)
(fma (fma (fma y y b) y c) y i))
(- (+ (/ z y) (+ (/ 27464.7644705 (* y y)) x)) (* (/ x (* y y)) b))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((t + ((230661.510616 + ((27464.7644705 + ((z + (y * x)) * y)) * y)) * y)) / (i + ((c + ((b + ((a + y) * y)) * y)) * y))) <= 1e+272) {
tmp = fma(fma(fma(fma(x, y, z), y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma(y, y, b), y, c), y, i);
} else {
tmp = ((z / y) + ((27464.7644705 / (y * y)) + x)) - ((x / (y * y)) * b);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(t + Float64(Float64(230661.510616 + Float64(Float64(27464.7644705 + Float64(Float64(z + Float64(y * x)) * y)) * y)) * y)) / Float64(i + Float64(Float64(c + Float64(Float64(b + Float64(Float64(a + y) * y)) * y)) * y))) <= 1e+272) tmp = Float64(fma(fma(fma(fma(x, y, z), y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma(y, y, b), y, c), y, i)); else tmp = Float64(Float64(Float64(z / y) + Float64(Float64(27464.7644705 / Float64(y * y)) + x)) - Float64(Float64(x / Float64(y * y)) * b)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(t + N[(N[(230661.510616 + N[(N[(27464.7644705 + N[(N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] / N[(i + N[(N[(c + N[(N[(b + N[(N[(a + y), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+272], N[(N[(N[(N[(N[(x * y + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / N[(N[(N[(y * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z / y), $MachinePrecision] + N[(N[(27464.7644705 / N[(y * y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] - N[(N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t + \left(230661.510616 + \left(27464.7644705 + \left(z + y \cdot x\right) \cdot y\right) \cdot y\right) \cdot y}{i + \left(c + \left(b + \left(a + y\right) \cdot y\right) \cdot y\right) \cdot y} \leq 10^{+272}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, y, b\right), y, c\right), y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{z}{y} + \left(\frac{27464.7644705}{y \cdot y} + x\right)\right) - \frac{x}{y \cdot y} \cdot b\\
\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)) < 1.0000000000000001e272Initial program 89.3%
Taylor expanded in a 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
lower-fma.f64N/A
+-commutativeN/A
Applied rewrites83.4%
if 1.0000000000000001e272 < (/.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 1.2%
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 rewrites71.1%
Taylor expanded in b around inf
Applied rewrites74.4%
Final simplification80.2%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(/
(+
t
(* (+ 230661.510616 (* (+ 27464.7644705 (* (+ z (* y x)) y)) y)) y))
(+ i (* (+ c (* (+ b (* (+ a y) y)) y)) y)))
1e+272)
(/
(fma (fma (fma (fma x y z) y 27464.7644705) y 230661.510616) y t)
(fma (fma (fma y y b) y c) y i))
(- (+ (/ z y) (+ (/ 27464.7644705 (* y y)) x)) (* (/ x y) a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((t + ((230661.510616 + ((27464.7644705 + ((z + (y * x)) * y)) * y)) * y)) / (i + ((c + ((b + ((a + y) * y)) * y)) * y))) <= 1e+272) {
tmp = fma(fma(fma(fma(x, y, z), y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma(y, y, b), y, c), y, i);
} else {
tmp = ((z / y) + ((27464.7644705 / (y * y)) + x)) - ((x / y) * a);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(t + Float64(Float64(230661.510616 + Float64(Float64(27464.7644705 + Float64(Float64(z + Float64(y * x)) * y)) * y)) * y)) / Float64(i + Float64(Float64(c + Float64(Float64(b + Float64(Float64(a + y) * y)) * y)) * y))) <= 1e+272) tmp = Float64(fma(fma(fma(fma(x, y, z), y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma(y, y, b), y, c), y, i)); else tmp = Float64(Float64(Float64(z / y) + Float64(Float64(27464.7644705 / Float64(y * y)) + x)) - Float64(Float64(x / y) * a)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(t + N[(N[(230661.510616 + N[(N[(27464.7644705 + N[(N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] / N[(i + N[(N[(c + N[(N[(b + N[(N[(a + y), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+272], N[(N[(N[(N[(N[(x * y + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / N[(N[(N[(y * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z / y), $MachinePrecision] + N[(N[(27464.7644705 / N[(y * y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] - N[(N[(x / y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t + \left(230661.510616 + \left(27464.7644705 + \left(z + y \cdot x\right) \cdot y\right) \cdot y\right) \cdot y}{i + \left(c + \left(b + \left(a + y\right) \cdot y\right) \cdot y\right) \cdot y} \leq 10^{+272}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, y, b\right), y, c\right), y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{z}{y} + \left(\frac{27464.7644705}{y \cdot y} + x\right)\right) - \frac{x}{y} \cdot a\\
\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)) < 1.0000000000000001e272Initial program 89.3%
Taylor expanded in a 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
lower-fma.f64N/A
+-commutativeN/A
Applied rewrites83.4%
if 1.0000000000000001e272 < (/.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 1.2%
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 rewrites71.1%
Taylor expanded in y around inf
Applied rewrites74.2%
Final simplification80.1%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(/
(+
t
(* (+ 230661.510616 (* (+ 27464.7644705 (* (+ z (* y x)) y)) y)) y))
(+ i (* (+ c (* (+ b (* (+ a y) y)) y)) y)))
1e+272)
(/
(fma (fma (fma z y 27464.7644705) y 230661.510616) y t)
(fma (fma (fma (+ a y) y b) y c) y i))
(- (+ (/ z y) (+ (/ 27464.7644705 (* y y)) x)) (* (/ x y) a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((t + ((230661.510616 + ((27464.7644705 + ((z + (y * x)) * y)) * y)) * y)) / (i + ((c + ((b + ((a + y) * y)) * y)) * y))) <= 1e+272) {
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 = ((z / y) + ((27464.7644705 / (y * y)) + x)) - ((x / y) * a);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(t + Float64(Float64(230661.510616 + Float64(Float64(27464.7644705 + Float64(Float64(z + Float64(y * x)) * y)) * y)) * y)) / Float64(i + Float64(Float64(c + Float64(Float64(b + Float64(Float64(a + y) * y)) * y)) * y))) <= 1e+272) 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(Float64(Float64(z / y) + Float64(Float64(27464.7644705 / Float64(y * y)) + x)) - Float64(Float64(x / y) * a)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(t + N[(N[(230661.510616 + N[(N[(27464.7644705 + N[(N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] / N[(i + N[(N[(c + N[(N[(b + N[(N[(a + y), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+272], 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[(N[(N[(z / y), $MachinePrecision] + N[(N[(27464.7644705 / N[(y * y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] - N[(N[(x / y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t + \left(230661.510616 + \left(27464.7644705 + \left(z + y \cdot x\right) \cdot y\right) \cdot y\right) \cdot y}{i + \left(c + \left(b + \left(a + y\right) \cdot y\right) \cdot y\right) \cdot y} \leq 10^{+272}:\\
\;\;\;\;\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}:\\
\;\;\;\;\left(\frac{z}{y} + \left(\frac{27464.7644705}{y \cdot y} + x\right)\right) - \frac{x}{y} \cdot a\\
\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)) < 1.0000000000000001e272Initial program 89.3%
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 rewrites81.8%
if 1.0000000000000001e272 < (/.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 1.2%
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 rewrites71.1%
Taylor expanded in y around inf
Applied rewrites74.2%
Final simplification79.1%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(/
(+
t
(* (+ 230661.510616 (* (+ 27464.7644705 (* (+ z (* y x)) y)) y)) y))
(+ i (* (+ c (* (+ b (* (+ a y) y)) y)) y)))
1e+272)
(/
(fma (fma (fma z y 27464.7644705) y 230661.510616) y t)
(fma (fma (fma (+ a y) y b) y c) y i))
(+ (/ (- z (* a x)) y) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((t + ((230661.510616 + ((27464.7644705 + ((z + (y * x)) * y)) * y)) * y)) / (i + ((c + ((b + ((a + y) * y)) * y)) * y))) <= 1e+272) {
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 = ((z - (a * x)) / y) + x;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(t + Float64(Float64(230661.510616 + Float64(Float64(27464.7644705 + Float64(Float64(z + Float64(y * x)) * y)) * y)) * y)) / Float64(i + Float64(Float64(c + Float64(Float64(b + Float64(Float64(a + y) * y)) * y)) * y))) <= 1e+272) 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(Float64(Float64(z - Float64(a * x)) / y) + x); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(t + N[(N[(230661.510616 + N[(N[(27464.7644705 + N[(N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] / N[(i + N[(N[(c + N[(N[(b + N[(N[(a + y), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+272], 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[(N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t + \left(230661.510616 + \left(27464.7644705 + \left(z + y \cdot x\right) \cdot y\right) \cdot y\right) \cdot y}{i + \left(c + \left(b + \left(a + y\right) \cdot y\right) \cdot y\right) \cdot y} \leq 10^{+272}:\\
\;\;\;\;\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}:\\
\;\;\;\;\frac{z - a \cdot x}{y} + x\\
\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)) < 1.0000000000000001e272Initial program 89.3%
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 rewrites81.8%
if 1.0000000000000001e272 < (/.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 1.2%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites2.7%
Taylor expanded in y around inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6472.2
Applied rewrites72.2%
Final simplification78.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ i (* (+ c (* (+ b (* (+ a y) y)) y)) y))))
(if (<=
(/
(+
t
(* (+ 230661.510616 (* (+ 27464.7644705 (* (+ z (* y x)) y)) y)) y))
t_1)
1e+272)
(/ (fma 230661.510616 y t) t_1)
(+ (/ (- z (* a x)) y) x))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = i + ((c + ((b + ((a + y) * y)) * y)) * y);
double tmp;
if (((t + ((230661.510616 + ((27464.7644705 + ((z + (y * x)) * y)) * y)) * y)) / t_1) <= 1e+272) {
tmp = fma(230661.510616, y, t) / t_1;
} else {
tmp = ((z - (a * x)) / y) + x;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(i + Float64(Float64(c + Float64(Float64(b + Float64(Float64(a + y) * y)) * y)) * y)) tmp = 0.0 if (Float64(Float64(t + Float64(Float64(230661.510616 + Float64(Float64(27464.7644705 + Float64(Float64(z + Float64(y * x)) * y)) * y)) * y)) / t_1) <= 1e+272) tmp = Float64(fma(230661.510616, y, t) / t_1); else tmp = Float64(Float64(Float64(z - Float64(a * x)) / y) + x); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(i + N[(N[(c + N[(N[(b + N[(N[(a + y), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(t + N[(N[(230661.510616 + N[(N[(27464.7644705 + N[(N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], 1e+272], N[(N[(230661.510616 * y + t), $MachinePrecision] / t$95$1), $MachinePrecision], N[(N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i + \left(c + \left(b + \left(a + y\right) \cdot y\right) \cdot y\right) \cdot y\\
\mathbf{if}\;\frac{t + \left(230661.510616 + \left(27464.7644705 + \left(z + y \cdot x\right) \cdot y\right) \cdot y\right) \cdot y}{t\_1} \leq 10^{+272}:\\
\;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z - a \cdot x}{y} + x\\
\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)) < 1.0000000000000001e272Initial program 89.3%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6474.7
Applied rewrites74.7%
if 1.0000000000000001e272 < (/.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 1.2%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites2.7%
Taylor expanded in y around inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6472.2
Applied rewrites72.2%
Final simplification73.8%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(/
(+
t
(* (+ 230661.510616 (* (+ 27464.7644705 (* (+ z (* y x)) y)) y)) y))
(+ i (* (+ c (* (+ b (* (+ a y) y)) y)) y)))
1e+272)
(/ t (fma (fma (fma (+ a y) y b) y c) y i))
(+ (/ (- z (* a x)) y) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((t + ((230661.510616 + ((27464.7644705 + ((z + (y * x)) * y)) * y)) * y)) / (i + ((c + ((b + ((a + y) * y)) * y)) * y))) <= 1e+272) {
tmp = t / fma(fma(fma((a + y), y, b), y, c), y, i);
} else {
tmp = ((z - (a * x)) / y) + x;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(t + Float64(Float64(230661.510616 + Float64(Float64(27464.7644705 + Float64(Float64(z + Float64(y * x)) * y)) * y)) * y)) / Float64(i + Float64(Float64(c + Float64(Float64(b + Float64(Float64(a + y) * y)) * y)) * y))) <= 1e+272) tmp = Float64(t / fma(fma(fma(Float64(a + y), y, b), y, c), y, i)); else tmp = Float64(Float64(Float64(z - Float64(a * x)) / y) + x); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(t + N[(N[(230661.510616 + N[(N[(27464.7644705 + N[(N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] / N[(i + N[(N[(c + N[(N[(b + N[(N[(a + y), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+272], N[(t / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t + \left(230661.510616 + \left(27464.7644705 + \left(z + y \cdot x\right) \cdot y\right) \cdot y\right) \cdot y}{i + \left(c + \left(b + \left(a + y\right) \cdot y\right) \cdot y\right) \cdot y} \leq 10^{+272}:\\
\;\;\;\;\frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z - a \cdot x}{y} + x\\
\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)) < 1.0000000000000001e272Initial program 89.3%
Taylor expanded in t around inf
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
lower-+.f6462.1
Applied rewrites62.1%
if 1.0000000000000001e272 < (/.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 1.2%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites2.7%
Taylor expanded in y around inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6472.2
Applied rewrites72.2%
Final simplification65.7%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(/
(+
t
(* (+ 230661.510616 (* (+ 27464.7644705 (* (+ z (* y x)) y)) y)) y))
(+ i (* (+ c (* (+ b (* (+ a y) y)) y)) y)))
1e+272)
(* (/ -1.0 (fma (* b y) y i)) (- t))
(+ (/ (- z (* a x)) y) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((t + ((230661.510616 + ((27464.7644705 + ((z + (y * x)) * y)) * y)) * y)) / (i + ((c + ((b + ((a + y) * y)) * y)) * y))) <= 1e+272) {
tmp = (-1.0 / fma((b * y), y, i)) * -t;
} else {
tmp = ((z - (a * x)) / y) + x;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(t + Float64(Float64(230661.510616 + Float64(Float64(27464.7644705 + Float64(Float64(z + Float64(y * x)) * y)) * y)) * y)) / Float64(i + Float64(Float64(c + Float64(Float64(b + Float64(Float64(a + y) * y)) * y)) * y))) <= 1e+272) tmp = Float64(Float64(-1.0 / fma(Float64(b * y), y, i)) * Float64(-t)); else tmp = Float64(Float64(Float64(z - Float64(a * x)) / y) + x); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(t + N[(N[(230661.510616 + N[(N[(27464.7644705 + N[(N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] / N[(i + N[(N[(c + N[(N[(b + N[(N[(a + y), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+272], N[(N[(-1.0 / N[(N[(b * y), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision] * (-t)), $MachinePrecision], N[(N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t + \left(230661.510616 + \left(27464.7644705 + \left(z + y \cdot x\right) \cdot y\right) \cdot y\right) \cdot y}{i + \left(c + \left(b + \left(a + y\right) \cdot y\right) \cdot y\right) \cdot y} \leq 10^{+272}:\\
\;\;\;\;\frac{-1}{\mathsf{fma}\left(b \cdot y, y, i\right)} \cdot \left(-t\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{z - a \cdot x}{y} + x\\
\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)) < 1.0000000000000001e272Initial program 89.3%
lift-/.f64N/A
frac-2negN/A
div-invN/A
lower-*.f64N/A
Applied rewrites89.2%
Taylor expanded in t around inf
mul-1-negN/A
lower-neg.f6462.0
Applied rewrites62.0%
Taylor expanded in b around inf
lower-*.f6453.0
Applied rewrites53.0%
if 1.0000000000000001e272 < (/.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 1.2%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites2.7%
Taylor expanded in y around inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6472.2
Applied rewrites72.2%
Final simplification59.9%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(/
(+
t
(* (+ 230661.510616 (* (+ 27464.7644705 (* (+ z (* y x)) y)) y)) y))
(+ i (* (+ c (* (+ b (* (+ a y) y)) y)) y)))
1e+272)
(/ t i)
(+ (/ (- z (* a x)) y) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((t + ((230661.510616 + ((27464.7644705 + ((z + (y * x)) * y)) * y)) * y)) / (i + ((c + ((b + ((a + y) * y)) * y)) * y))) <= 1e+272) {
tmp = t / i;
} else {
tmp = ((z - (a * x)) / y) + x;
}
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 + ((230661.510616d0 + ((27464.7644705d0 + ((z + (y * x)) * y)) * y)) * y)) / (i + ((c + ((b + ((a + y) * y)) * y)) * y))) <= 1d+272) then
tmp = t / i
else
tmp = ((z - (a * x)) / y) + x
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 + ((230661.510616 + ((27464.7644705 + ((z + (y * x)) * y)) * y)) * y)) / (i + ((c + ((b + ((a + y) * y)) * y)) * y))) <= 1e+272) {
tmp = t / i;
} else {
tmp = ((z - (a * x)) / y) + x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((t + ((230661.510616 + ((27464.7644705 + ((z + (y * x)) * y)) * y)) * y)) / (i + ((c + ((b + ((a + y) * y)) * y)) * y))) <= 1e+272: tmp = t / i else: tmp = ((z - (a * x)) / y) + x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(t + Float64(Float64(230661.510616 + Float64(Float64(27464.7644705 + Float64(Float64(z + Float64(y * x)) * y)) * y)) * y)) / Float64(i + Float64(Float64(c + Float64(Float64(b + Float64(Float64(a + y) * y)) * y)) * y))) <= 1e+272) tmp = Float64(t / i); else tmp = Float64(Float64(Float64(z - Float64(a * x)) / y) + x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((t + ((230661.510616 + ((27464.7644705 + ((z + (y * x)) * y)) * y)) * y)) / (i + ((c + ((b + ((a + y) * y)) * y)) * y))) <= 1e+272) tmp = t / i; else tmp = ((z - (a * x)) / y) + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(t + N[(N[(230661.510616 + N[(N[(27464.7644705 + N[(N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] / N[(i + N[(N[(c + N[(N[(b + N[(N[(a + y), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+272], N[(t / i), $MachinePrecision], N[(N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t + \left(230661.510616 + \left(27464.7644705 + \left(z + y \cdot x\right) \cdot y\right) \cdot y\right) \cdot y}{i + \left(c + \left(b + \left(a + y\right) \cdot y\right) \cdot y\right) \cdot y} \leq 10^{+272}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;\frac{z - a \cdot x}{y} + x\\
\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)) < 1.0000000000000001e272Initial program 89.3%
Taylor expanded in y around 0
lower-/.f6449.9
Applied rewrites49.9%
if 1.0000000000000001e272 < (/.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 1.2%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites2.7%
Taylor expanded in y around inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6472.2
Applied rewrites72.2%
Final simplification57.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 57.6%
Taylor expanded in y around 0
lower-/.f6433.0
Applied rewrites33.0%
herbie shell --seed 2024249
(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)))