
(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 18 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
(-
(+ (/ z y) (+ (/ 27464.7644705 (* y y)) x))
(fma a (+ (/ (- z (* a x)) (* y y)) (/ x y)) (* (/ b y) (/ x y))))))
(if (<= y -6.2e+47)
t_1
(if (<= y 1.12e+38)
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (fma (* (fma (+ a y) y b) y) y (* c y)) i))
(if (<= y 1.25e+106)
(/
(+
(+ (fma x y (/ t (pow y 3.0))) (/ 230661.510616 (* y y)))
(+ (/ 27464.7644705 y) z))
a)
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((z / y) + ((27464.7644705 / (y * y)) + x)) - fma(a, (((z - (a * x)) / (y * y)) + (x / y)), ((b / y) * (x / y)));
double tmp;
if (y <= -6.2e+47) {
tmp = t_1;
} else if (y <= 1.12e+38) {
tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (fma((fma((a + y), y, b) * y), y, (c * y)) + i);
} else if (y <= 1.25e+106) {
tmp = ((fma(x, y, (t / pow(y, 3.0))) + (230661.510616 / (y * y))) + ((27464.7644705 / y) + z)) / a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(z / y) + Float64(Float64(27464.7644705 / Float64(y * y)) + x)) - fma(a, Float64(Float64(Float64(z - Float64(a * x)) / Float64(y * y)) + Float64(x / y)), Float64(Float64(b / y) * Float64(x / y)))) tmp = 0.0 if (y <= -6.2e+47) tmp = t_1; elseif (y <= 1.12e+38) tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(fma(Float64(fma(Float64(a + y), y, b) * y), y, Float64(c * y)) + i)); elseif (y <= 1.25e+106) tmp = Float64(Float64(Float64(fma(x, y, Float64(t / (y ^ 3.0))) + Float64(230661.510616 / Float64(y * y))) + Float64(Float64(27464.7644705 / y) + z)) / a); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(z / y), $MachinePrecision] + N[(N[(27464.7644705 / N[(y * y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / N[(y * y), $MachinePrecision]), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision] + N[(N[(b / y), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.2e+47], t$95$1, If[LessEqual[y, 1.12e+38], 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[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y), $MachinePrecision] * y + N[(c * y), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.25e+106], N[(N[(N[(N[(x * y + N[(t / N[Power[y, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(230661.510616 / N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(27464.7644705 / y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\frac{z}{y} + \left(\frac{27464.7644705}{y \cdot y} + x\right)\right) - \mathsf{fma}\left(a, \frac{z - a \cdot x}{y \cdot y} + \frac{x}{y}, \frac{b}{y} \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -6.2 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.12 \cdot 10^{+38}:\\
\;\;\;\;\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right) \cdot y, y, c \cdot y\right) + i}\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{+106}:\\
\;\;\;\;\frac{\left(\mathsf{fma}\left(x, y, \frac{t}{{y}^{3}}\right) + \frac{230661.510616}{y \cdot y}\right) + \left(\frac{27464.7644705}{y} + z\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.2000000000000001e47 or 1.25e106 < y Initial program 1.6%
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 rewrites68.5%
if -6.2000000000000001e47 < y < 1.1199999999999999e38Initial program 94.6%
lift-*.f64N/A
*-commutativeN/A
lift-+.f64N/A
distribute-rgt-inN/A
lower-fma.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-*.f6494.6
Applied rewrites94.6%
if 1.1199999999999999e38 < y < 1.25e106Initial program 9.2%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites17.9%
Taylor expanded in a around inf
Applied rewrites68.3%
Final simplification83.9%
(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)
(+ (* (+ (* (+ (* (+ a y) y) b) y) c) y) i))
INFINITY)
(fma
y
(/ (fma (fma (fma x y z) y 27464.7644705) y 230661.510616) t_1)
(/ 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 = 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) / (((((((a + y) * y) + b) * y) + c) * y) + i)) <= ((double) INFINITY)) {
tmp = fma(y, (fma(fma(fma(x, y, z), y, 27464.7644705), y, 230661.510616) / t_1), (t / t_1));
} else {
tmp = ((z - (a * x)) / y) + x;
}
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(a + y) * y) + b) * y) + c) * y) + i)) <= Inf) 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 - Float64(a * x)) / y) + x); 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[(a + y), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], Infinity], 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 - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + x), $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(a + y\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(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right)}{t\_1}, \frac{t}{t\_1}\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)) < +inf.0Initial program 90.4%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites90.9%
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 t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites0.3%
Taylor expanded in y around inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6461.4
Applied rewrites61.4%
Final simplification79.9%
(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)
(+ (* (+ (* (+ (* (+ a y) y) b) y) c) y) i))))
(if (<= t_1 INFINITY) 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 = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((a + y) * y) + b) * y) + c) * y) + i);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = ((z - (a * x)) / y) + x;
}
return tmp;
}
public static 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) / (((((((a + y) * y) + b) * y) + c) * y) + i);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = ((z - (a * x)) / y) + x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((a + y) * y) + b) * y) + c) * y) + i) tmp = 0 if t_1 <= math.inf: 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(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(a + y) * y) + b) * y) + c) * y) + i)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; 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) t_1 = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((a + y) * y) + b) * y) + c) * y) + i); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = ((z - (a * x)) / y) + x; end tmp_2 = 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[(a + y), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], 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{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(a + y\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;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)) < +inf.0Initial program 90.4%
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 t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites0.3%
Taylor expanded in y around inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6461.4
Applied rewrites61.4%
Final simplification79.6%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ a y) y) b) y) c) y) i))
INFINITY)
(*
(/ (- -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 (* 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 ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((a + y) * y) + b) * y) + c) * y) + i)) <= ((double) INFINITY)) {
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 - (a * x)) / y) + x;
}
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(a + y) * y) + b) * y) + c) * y) + i)) <= Inf) tmp = Float64(Float64(Float64(-(-1.0)) / fma(fma(fma(Float64(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 = 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[(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[(a + y), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], Infinity], 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 - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + x), $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(a + y\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \leq \infty:\\
\;\;\;\;\frac{--1}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)} \cdot \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)\\
\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)) < +inf.0Initial program 90.4%
lift-/.f64N/A
frac-2negN/A
div-invN/A
lower-*.f64N/A
Applied rewrites90.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 t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites0.3%
Taylor expanded in y around inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6461.4
Applied rewrites61.4%
Final simplification79.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ a y) y) b) y) c) y) i))
INFINITY)
(/
(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 (* 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 ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((a + y) * y) + b) * y) + c) * y) + i)) <= ((double) INFINITY)) {
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 - (a * x)) / y) + x;
}
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(a + y) * y) + b) * y) + c) * y) + i)) <= Inf) 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 - Float64(a * x)) / y) + x); 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[(a + y), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], Infinity], 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 - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + x), $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(a + y\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \leq \infty:\\
\;\;\;\;\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}:\\
\;\;\;\;\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)) < +inf.0Initial program 90.4%
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 rewrites85.9%
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 t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites0.3%
Taylor expanded in y around inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6461.4
Applied rewrites61.4%
Final simplification76.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(-
(+ (/ z y) (+ (/ 27464.7644705 (* y y)) x))
(fma a (+ (/ (- z (* a x)) (* y y)) (/ x y)) (* (/ b y) (/ x y))))))
(if (<= y -6.2e+47)
t_1
(if (<= y 2.5e+25)
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (fma (* (fma (+ a y) y b) y) y (* c y)) i))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((z / y) + ((27464.7644705 / (y * y)) + x)) - fma(a, (((z - (a * x)) / (y * y)) + (x / y)), ((b / y) * (x / y)));
double tmp;
if (y <= -6.2e+47) {
tmp = t_1;
} else if (y <= 2.5e+25) {
tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (fma((fma((a + y), y, b) * y), y, (c * y)) + i);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(z / y) + Float64(Float64(27464.7644705 / Float64(y * y)) + x)) - fma(a, Float64(Float64(Float64(z - Float64(a * x)) / Float64(y * y)) + Float64(x / y)), Float64(Float64(b / y) * Float64(x / y)))) tmp = 0.0 if (y <= -6.2e+47) tmp = t_1; elseif (y <= 2.5e+25) tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(fma(Float64(fma(Float64(a + y), y, b) * y), y, Float64(c * y)) + i)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(z / y), $MachinePrecision] + N[(N[(27464.7644705 / N[(y * y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / N[(y * y), $MachinePrecision]), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision] + N[(N[(b / y), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.2e+47], t$95$1, If[LessEqual[y, 2.5e+25], 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[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y), $MachinePrecision] * y + N[(c * y), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\frac{z}{y} + \left(\frac{27464.7644705}{y \cdot y} + x\right)\right) - \mathsf{fma}\left(a, \frac{z - a \cdot x}{y \cdot y} + \frac{x}{y}, \frac{b}{y} \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -6.2 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+25}:\\
\;\;\;\;\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right) \cdot y, y, c \cdot y\right) + i}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.2000000000000001e47 or 2.50000000000000012e25 < y Initial program 3.4%
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 rewrites62.6%
if -6.2000000000000001e47 < y < 2.50000000000000012e25Initial program 95.2%
lift-*.f64N/A
*-commutativeN/A
lift-+.f64N/A
distribute-rgt-inN/A
lower-fma.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-*.f6495.2
Applied rewrites95.2%
Final simplification81.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (/ (- z (* a x)) y) x)))
(if (<= y -510000000.0)
t_1
(if (<= y 4100.0)
(/ (fma 230661.510616 y t) (+ (* (+ (* (+ (* (+ a y) y) b) y) c) y) i))
(if (<= y 8e+98)
(/
(+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616)
(fma (fma (+ a y) y b) y c))
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((z - (a * x)) / y) + x;
double tmp;
if (y <= -510000000.0) {
tmp = t_1;
} else if (y <= 4100.0) {
tmp = fma(230661.510616, y, t) / (((((((a + y) * y) + b) * y) + c) * y) + i);
} else if (y <= 8e+98) {
tmp = ((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) / fma(fma((a + y), y, b), y, c);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(z - Float64(a * x)) / y) + x) tmp = 0.0 if (y <= -510000000.0) tmp = t_1; elseif (y <= 4100.0) tmp = Float64(fma(230661.510616, y, t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(a + y) * y) + b) * y) + c) * y) + i)); elseif (y <= 8e+98) tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) / fma(fma(Float64(a + y), y, b), y, c)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[y, -510000000.0], t$95$1, If[LessEqual[y, 4100.0], N[(N[(230661.510616 * y + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(a + y), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e+98], N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] / N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - a \cdot x}{y} + x\\
\mathbf{if}\;y \leq -510000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4100:\\
\;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{\left(\left(\left(a + y\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\
\mathbf{elif}\;y \leq 8 \cdot 10^{+98}:\\
\;\;\;\;\frac{\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616}{\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.1e8 or 7.99999999999999998e98 < y Initial program 6.3%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites6.4%
Taylor expanded in y around inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6460.4
Applied rewrites60.4%
if -5.1e8 < y < 4100Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6491.7
Applied rewrites91.7%
if 4100 < y < 7.99999999999999998e98Initial program 36.1%
Taylor expanded in i around 0
associate-/r*N/A
lower-/.f64N/A
Applied rewrites40.1%
Taylor expanded in t around 0
Applied rewrites49.9%
Final simplification75.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (/ (- z (* a x)) y) x)))
(if (<= y -1.52e+47)
t_1
(if (<= y 6000000.0)
(/
(fma (fma (fma z y 27464.7644705) y 230661.510616) y t)
(fma (fma (fma (+ a y) y b) y c) y i))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((z - (a * x)) / y) + x;
double tmp;
if (y <= -1.52e+47) {
tmp = t_1;
} else if (y <= 6000000.0) {
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 = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(z - Float64(a * x)) / y) + x) tmp = 0.0 if (y <= -1.52e+47) tmp = t_1; elseif (y <= 6000000.0) 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 = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[y, -1.52e+47], t$95$1, If[LessEqual[y, 6000000.0], 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], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - a \cdot x}{y} + x\\
\mathbf{if}\;y \leq -1.52 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6000000:\\
\;\;\;\;\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}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.52e47 or 6e6 < y Initial program 6.8%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites8.6%
Taylor expanded in y around inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6459.1
Applied rewrites59.1%
if -1.52e47 < y < 6e6Initial program 97.0%
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 rewrites91.5%
Final simplification77.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (/ (- z (* a x)) y) x)))
(if (<= y -510000000.0)
t_1
(if (<= y 6000000.0)
(/ (fma 230661.510616 y t) (+ (* (+ (* (+ (* (+ a y) y) b) y) c) y) i))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((z - (a * x)) / y) + x;
double tmp;
if (y <= -510000000.0) {
tmp = t_1;
} else if (y <= 6000000.0) {
tmp = fma(230661.510616, y, t) / (((((((a + y) * y) + b) * y) + c) * y) + i);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(z - Float64(a * x)) / y) + x) tmp = 0.0 if (y <= -510000000.0) tmp = t_1; elseif (y <= 6000000.0) tmp = Float64(fma(230661.510616, y, t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(a + y) * y) + b) * y) + c) * y) + i)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[y, -510000000.0], t$95$1, If[LessEqual[y, 6000000.0], N[(N[(230661.510616 * y + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(a + y), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - a \cdot x}{y} + x\\
\mathbf{if}\;y \leq -510000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6000000:\\
\;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{\left(\left(\left(a + y\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.1e8 or 6e6 < y Initial program 10.4%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites12.1%
Taylor expanded in y around inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6455.2
Applied rewrites55.2%
if -5.1e8 < y < 6e6Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6491.1
Applied rewrites91.1%
Final simplification73.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (/ (- z (* a x)) y) x)))
(if (<= y -1.5e+19)
t_1
(if (<= y -2e-39)
(/ (fma (fma (fma (fma x y z) y 27464.7644705) y 230661.510616) y t) i)
(if (<= y 6000000.0)
(/ t (fma (fma (fma (+ a y) y b) y c) y i))
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((z - (a * x)) / y) + x;
double tmp;
if (y <= -1.5e+19) {
tmp = t_1;
} else if (y <= -2e-39) {
tmp = fma(fma(fma(fma(x, y, z), y, 27464.7644705), y, 230661.510616), y, t) / i;
} else if (y <= 6000000.0) {
tmp = t / fma(fma(fma((a + y), y, b), y, c), y, i);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(z - Float64(a * x)) / y) + x) tmp = 0.0 if (y <= -1.5e+19) tmp = t_1; elseif (y <= -2e-39) tmp = Float64(fma(fma(fma(fma(x, y, z), y, 27464.7644705), y, 230661.510616), y, t) / i); elseif (y <= 6000000.0) tmp = Float64(t / fma(fma(fma(Float64(a + y), y, b), y, c), y, i)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[y, -1.5e+19], t$95$1, If[LessEqual[y, -2e-39], N[(N[(N[(N[(N[(x * y + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / i), $MachinePrecision], If[LessEqual[y, 6000000.0], N[(t / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - a \cdot x}{y} + x\\
\mathbf{if}\;y \leq -1.5 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2 \cdot 10^{-39}:\\
\;\;\;\;\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}\;y \leq 6000000:\\
\;\;\;\;\frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.5e19 or 6e6 < y Initial program 8.9%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites10.7%
Taylor expanded in y around inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6456.0
Applied rewrites56.0%
if -1.5e19 < y < -1.99999999999999986e-39Initial program 99.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.f6458.3
Applied rewrites58.3%
if -1.99999999999999986e-39 < y < 6e6Initial program 99.8%
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-+.f6485.3
Applied rewrites85.3%
Final simplification70.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (/ (- z (* a x)) y) x)))
(if (<= y -510000000.0)
t_1
(if (<= y 6000000.0) (/ t (fma (fma (fma (+ a y) y b) y c) y i)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((z - (a * x)) / y) + x;
double tmp;
if (y <= -510000000.0) {
tmp = t_1;
} else if (y <= 6000000.0) {
tmp = t / fma(fma(fma((a + y), y, b), y, c), y, i);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(z - Float64(a * x)) / y) + x) tmp = 0.0 if (y <= -510000000.0) tmp = t_1; elseif (y <= 6000000.0) tmp = Float64(t / fma(fma(fma(Float64(a + y), y, b), y, c), y, i)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[y, -510000000.0], t$95$1, If[LessEqual[y, 6000000.0], N[(t / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - a \cdot x}{y} + x\\
\mathbf{if}\;y \leq -510000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6000000:\\
\;\;\;\;\frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.1e8 or 6e6 < y Initial program 10.4%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites12.1%
Taylor expanded in y around inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6455.2
Applied rewrites55.2%
if -5.1e8 < y < 6e6Initial program 99.8%
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-+.f6480.0
Applied rewrites80.0%
Final simplification68.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (/ (- z (* a x)) y) x)))
(if (<= y -510000000.0)
t_1
(if (<= y 6000000.0) (/ t (fma (+ (* b y) c) y i)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((z - (a * x)) / y) + x;
double tmp;
if (y <= -510000000.0) {
tmp = t_1;
} else if (y <= 6000000.0) {
tmp = t / fma(((b * y) + c), y, i);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(z - Float64(a * x)) / y) + x) tmp = 0.0 if (y <= -510000000.0) tmp = t_1; elseif (y <= 6000000.0) tmp = Float64(t / fma(Float64(Float64(b * y) + c), y, i)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[y, -510000000.0], t$95$1, If[LessEqual[y, 6000000.0], N[(t / N[(N[(N[(b * y), $MachinePrecision] + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - a \cdot x}{y} + x\\
\mathbf{if}\;y \leq -510000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6000000:\\
\;\;\;\;\frac{t}{\mathsf{fma}\left(b \cdot y + c, y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.1e8 or 6e6 < y Initial program 10.4%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites12.1%
Taylor expanded in y around inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6455.2
Applied rewrites55.2%
if -5.1e8 < y < 6e6Initial program 99.8%
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-+.f6480.0
Applied rewrites80.0%
Taylor expanded in y around 0
Applied rewrites78.6%
Final simplification67.3%
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (+ (/ (- z (* a x)) y) x))) (if (<= y -1000000.0) t_1 (if (<= y 26000.0) (/ t (+ (* c y) i)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((z - (a * x)) / y) + x;
double tmp;
if (y <= -1000000.0) {
tmp = t_1;
} else if (y <= 26000.0) {
tmp = t / ((c * y) + i);
} else {
tmp = t_1;
}
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 = ((z - (a * x)) / y) + x
if (y <= (-1000000.0d0)) then
tmp = t_1
else if (y <= 26000.0d0) then
tmp = t / ((c * y) + i)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((z - (a * x)) / y) + x;
double tmp;
if (y <= -1000000.0) {
tmp = t_1;
} else if (y <= 26000.0) {
tmp = t / ((c * y) + i);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = ((z - (a * x)) / y) + x tmp = 0 if y <= -1000000.0: tmp = t_1 elif y <= 26000.0: tmp = t / ((c * y) + i) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(z - Float64(a * x)) / y) + x) tmp = 0.0 if (y <= -1000000.0) tmp = t_1; elseif (y <= 26000.0) tmp = Float64(t / Float64(Float64(c * y) + i)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = ((z - (a * x)) / y) + x; tmp = 0.0; if (y <= -1000000.0) tmp = t_1; elseif (y <= 26000.0) tmp = t / ((c * y) + i); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[y, -1000000.0], t$95$1, If[LessEqual[y, 26000.0], N[(t / N[(N[(c * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - a \cdot x}{y} + x\\
\mathbf{if}\;y \leq -1000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 26000:\\
\;\;\;\;\frac{t}{c \cdot y + i}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1e6 or 26000 < y Initial program 10.4%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites12.1%
Taylor expanded in y around inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6455.2
Applied rewrites55.2%
if -1e6 < y < 26000Initial program 99.8%
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-+.f6480.0
Applied rewrites80.0%
Taylor expanded in y around 0
Applied rewrites72.2%
Final simplification64.0%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 1.65e+22) (/ t (+ (* c y) i)) (/ z y)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 1.65e+22) {
tmp = t / ((c * y) + i);
} else {
tmp = z / y;
}
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 <= 1.65d+22) then
tmp = t / ((c * y) + i)
else
tmp = z / y
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 <= 1.65e+22) {
tmp = t / ((c * y) + i);
} else {
tmp = z / y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 1.65e+22: tmp = t / ((c * y) + i) else: tmp = z / y return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 1.65e+22) tmp = Float64(t / Float64(Float64(c * y) + i)); else tmp = Float64(z / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= 1.65e+22) tmp = t / ((c * y) + i); else tmp = z / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 1.65e+22], N[(t / N[(N[(c * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], N[(z / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.65 \cdot 10^{+22}:\\
\;\;\;\;\frac{t}{c \cdot y + i}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{y}\\
\end{array}
\end{array}
if y < 1.6499999999999999e22Initial program 74.7%
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-+.f6457.2
Applied rewrites57.2%
Taylor expanded in y around 0
Applied rewrites51.8%
if 1.6499999999999999e22 < y Initial program 6.4%
Taylor expanded in z around inf
associate-/l*N/A
lower-*.f64N/A
lower-pow.f64N/A
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-+.f645.0
Applied rewrites5.0%
Taylor expanded in y around inf
Applied rewrites19.9%
Final simplification43.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a -2.2e+100) (/ z a) (if (<= a 3e+103) (/ z y) (/ z a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= -2.2e+100) {
tmp = z / a;
} else if (a <= 3e+103) {
tmp = z / y;
} else {
tmp = z / a;
}
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 (a <= (-2.2d+100)) then
tmp = z / a
else if (a <= 3d+103) then
tmp = z / y
else
tmp = z / a
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 (a <= -2.2e+100) {
tmp = z / a;
} else if (a <= 3e+103) {
tmp = z / y;
} else {
tmp = z / a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= -2.2e+100: tmp = z / a elif a <= 3e+103: tmp = z / y else: tmp = z / a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= -2.2e+100) tmp = Float64(z / a); elseif (a <= 3e+103) tmp = Float64(z / y); else tmp = Float64(z / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= -2.2e+100) tmp = z / a; elseif (a <= 3e+103) tmp = z / y; else tmp = z / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, -2.2e+100], N[(z / a), $MachinePrecision], If[LessEqual[a, 3e+103], N[(z / y), $MachinePrecision], N[(z / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.2 \cdot 10^{+100}:\\
\;\;\;\;\frac{z}{a}\\
\mathbf{elif}\;a \leq 3 \cdot 10^{+103}:\\
\;\;\;\;\frac{z}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{a}\\
\end{array}
\end{array}
if a < -2.2000000000000001e100 or 3e103 < a Initial program 54.5%
Taylor expanded in z around inf
associate-/l*N/A
lower-*.f64N/A
lower-pow.f64N/A
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-+.f6414.0
Applied rewrites14.0%
Taylor expanded in a around inf
Applied rewrites14.4%
if -2.2000000000000001e100 < a < 3e103Initial program 58.1%
Taylor expanded in z around inf
associate-/l*N/A
lower-*.f64N/A
lower-pow.f64N/A
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-+.f649.5
Applied rewrites9.5%
Taylor expanded in y around inf
Applied rewrites11.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 2.85e+18) (/ (fma 230661.510616 y t) i) (/ z y)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 2.85e+18) {
tmp = fma(230661.510616, y, t) / i;
} else {
tmp = z / y;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 2.85e+18) tmp = Float64(fma(230661.510616, y, t) / i); else tmp = Float64(z / y); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 2.85e+18], N[(N[(230661.510616 * y + t), $MachinePrecision] / i), $MachinePrecision], N[(z / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.85 \cdot 10^{+18}:\\
\;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{i}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{y}\\
\end{array}
\end{array}
if y < 2.85e18Initial program 75.1%
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.f6447.2
Applied rewrites47.2%
Taylor expanded in y around 0
Applied rewrites44.3%
if 2.85e18 < y Initial program 6.3%
Taylor expanded in z around inf
associate-/l*N/A
lower-*.f64N/A
lower-pow.f64N/A
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-+.f645.0
Applied rewrites5.0%
Taylor expanded in y around inf
Applied rewrites19.7%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 19000000000.0) (/ t i) (/ z y)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 19000000000.0) {
tmp = t / i;
} else {
tmp = z / y;
}
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 <= 19000000000.0d0) then
tmp = t / i
else
tmp = z / y
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 <= 19000000000.0) {
tmp = t / i;
} else {
tmp = z / y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 19000000000.0: tmp = t / i else: tmp = z / y return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 19000000000.0) tmp = Float64(t / i); else tmp = Float64(z / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= 19000000000.0) tmp = t / i; else tmp = z / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 19000000000.0], N[(t / i), $MachinePrecision], N[(z / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 19000000000:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{y}\\
\end{array}
\end{array}
if y < 1.9e10Initial program 75.3%
Taylor expanded in y around 0
lower-/.f6441.8
Applied rewrites41.8%
if 1.9e10 < y Initial program 8.8%
Taylor expanded in z around inf
associate-/l*N/A
lower-*.f64N/A
lower-pow.f64N/A
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-+.f644.9
Applied rewrites4.9%
Taylor expanded in y around inf
Applied rewrites19.0%
(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 56.8%
Taylor expanded in z around inf
associate-/l*N/A
lower-*.f64N/A
lower-pow.f64N/A
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-+.f6411.1
Applied rewrites11.1%
Taylor expanded in a around inf
Applied rewrites7.4%
herbie shell --seed 2024268
(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)))