
(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 (<=
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
INFINITY)
(fma
y
(/ (fma (fma z y 27464.7644705) y 230661.510616) t_1)
(fma x (* y (* (/ y t_1) (* y y))) (/ t t_1)))
(- x (/ (fma -1.0 z (* a x)) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = fma(fma(fma((a + y), y, b), y, c), y, i);
double tmp;
if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= ((double) INFINITY)) {
tmp = fma(y, (fma(fma(z, y, 27464.7644705), y, 230661.510616) / t_1), fma(x, (y * ((y / t_1) * (y * y))), (t / t_1)));
} else {
tmp = x - (fma(-1.0, z, (a * x)) / y);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = fma(fma(fma(Float64(a + y), y, b), y, c), y, i) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) <= Inf) tmp = fma(y, Float64(fma(fma(z, y, 27464.7644705), y, 230661.510616) / t_1), fma(x, Float64(y * Float64(Float64(y / t_1) * Float64(y * y))), Float64(t / t_1))); else tmp = Float64(x - Float64(fma(-1.0, z, Float64(a * x)) / y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], Infinity], N[(y * N[(N[(N[(z * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(x * N[(y * N[(N[(y / t$95$1), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(-1.0 * z + N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)\\
\mathbf{if}\;\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, y, 27464.7644705\right), y, 230661.510616\right)}{t\_1}, \mathsf{fma}\left(x, y \cdot \left(\frac{y}{t\_1} \cdot \left(y \cdot y\right)\right), \frac{t}{t\_1}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\mathsf{fma}\left(-1, z, a \cdot x\right)}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 86.7%
Taylor expanded in x around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
Applied rewrites87.0%
Applied rewrites87.7%
Applied rewrites87.7%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-*.f6460.5
Applied rewrites60.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))))
(if (<= t_1 INFINITY) t_1 (- x (/ (fma -1.0 z (* a x)) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x - (fma(-1.0, z, (a * x)) / y);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(x - Float64(fma(-1.0, z, Float64(a * x)) / y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x - N[(N[(-1.0 * z + N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\mathsf{fma}\left(-1, z, a \cdot x\right)}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 86.7%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-*.f6460.5
Applied rewrites60.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
INFINITY)
(*
(- (fma (fma (fma (fma y x z) y 27464.7644705) y 230661.510616) y t))
(/ -1.0 (fma (fma (fma (+ a y) y b) y c) y i)))
(- x (/ (fma -1.0 z (* a x)) y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= ((double) INFINITY)) {
tmp = -fma(fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616), y, t) * (-1.0 / fma(fma(fma((a + y), y, b), y, c), y, i));
} else {
tmp = x - (fma(-1.0, z, (a * x)) / y);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) <= Inf) tmp = Float64(Float64(-fma(fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616), y, t)) * Float64(-1.0 / fma(fma(fma(Float64(a + y), y, b), y, c), y, i))); else tmp = Float64(x - Float64(fma(-1.0, z, Float64(a * x)) / y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], Infinity], N[((-N[(N[(N[(N[(y * x + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision]) * N[(-1.0 / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(-1.0 * z + N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \leq \infty:\\
\;\;\;\;\left(-\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, x, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)\right) \cdot \frac{-1}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\mathsf{fma}\left(-1, z, a \cdot x\right)}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 86.7%
lift-/.f64N/A
frac-2negN/A
div-invN/A
lower-*.f64N/A
Applied rewrites86.6%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-*.f6460.5
Applied rewrites60.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
INFINITY)
(/
(fma (fma (fma z y 27464.7644705) y 230661.510616) y t)
(fma (fma (fma (+ a y) y b) y c) y i))
(- x (/ (fma -1.0 z (* a x)) y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= ((double) INFINITY)) {
tmp = fma(fma(fma(z, y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma((a + y), y, b), y, c), y, i);
} else {
tmp = x - (fma(-1.0, z, (a * x)) / y);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) <= Inf) tmp = Float64(fma(fma(fma(z, y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma(Float64(a + y), y, b), y, c), y, i)); else tmp = Float64(x - Float64(fma(-1.0, z, Float64(a * x)) / y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(N[(z * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(-1.0 * z + N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \leq \infty:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z, y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\mathsf{fma}\left(-1, z, a \cdot x\right)}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 86.7%
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 rewrites79.5%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-*.f6460.5
Applied rewrites60.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
INFINITY)
(/ t i)
(* y (/ x a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= ((double) INFINITY)) {
tmp = t / i;
} else {
tmp = y * (x / a);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= Double.POSITIVE_INFINITY) {
tmp = t / i;
} else {
tmp = y * (x / a);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= math.inf: tmp = t / i else: tmp = y * (x / a) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) <= Inf) tmp = Float64(t / i); else tmp = Float64(y * Float64(x / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= Inf) tmp = t / i; else tmp = y * (x / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], Infinity], N[(t / i), $MachinePrecision], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \leq \infty:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{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)) < +inf.0Initial program 86.7%
Taylor expanded in y around 0
lower-/.f6442.3
Applied rewrites42.3%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
Taylor expanded in a around inf
associate-/r*N/A
lower-/.f64N/A
Applied rewrites0.5%
Taylor expanded in x around inf
Applied rewrites16.4%
Applied rewrites20.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (fma (fma (fma (fma y x z) y 27464.7644705) y 230661.510616) y t))
(t_2 (- x (/ (fma -1.0 z (* a x)) y))))
(if (<= y -1.55e+59)
t_2
(if (<= y 1.65e-6)
(/ t_1 (fma (fma (fma y y b) y c) y i))
(if (<= y 7.5e+65) (/ (/ t_1 y) (fma (fma (+ a y) y b) y c)) t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = fma(fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616), y, t);
double t_2 = x - (fma(-1.0, z, (a * x)) / y);
double tmp;
if (y <= -1.55e+59) {
tmp = t_2;
} else if (y <= 1.65e-6) {
tmp = t_1 / fma(fma(fma(y, y, b), y, c), y, i);
} else if (y <= 7.5e+65) {
tmp = (t_1 / y) / fma(fma((a + y), y, b), y, c);
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = fma(fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616), y, t) t_2 = Float64(x - Float64(fma(-1.0, z, Float64(a * x)) / y)) tmp = 0.0 if (y <= -1.55e+59) tmp = t_2; elseif (y <= 1.65e-6) tmp = Float64(t_1 / fma(fma(fma(y, y, b), y, c), y, i)); elseif (y <= 7.5e+65) tmp = Float64(Float64(t_1 / y) / fma(fma(Float64(a + y), y, b), y, c)); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(y * x + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(-1.0 * z + N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.55e+59], t$95$2, If[LessEqual[y, 1.65e-6], N[(t$95$1 / N[(N[(N[(y * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.5e+65], N[(N[(t$95$1 / y), $MachinePrecision] / N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \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)\\
t_2 := x - \frac{\mathsf{fma}\left(-1, z, a \cdot x\right)}{y}\\
\mathbf{if}\;y \leq -1.55 \cdot 10^{+59}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{-6}:\\
\;\;\;\;\frac{t\_1}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, y, b\right), y, c\right), y, i\right)}\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+65}:\\
\;\;\;\;\frac{\frac{t\_1}{y}}{\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.55000000000000007e59 or 7.50000000000000006e65 < y Initial program 1.7%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-*.f6461.2
Applied rewrites61.2%
if -1.55000000000000007e59 < y < 1.65000000000000008e-6Initial program 96.9%
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
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
Applied rewrites91.5%
if 1.65000000000000008e-6 < y < 7.50000000000000006e65Initial program 41.5%
Taylor expanded in i around 0
associate-/r*N/A
lower-/.f64N/A
Applied rewrites58.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (- x (/ (fma -1.0 z (* a x)) y))))
(if (<= y -42000000000.0)
t_1
(if (<= y -2.6e-235)
(/ (fma (fma (fma (fma y x z) y 27464.7644705) y 230661.510616) y t) i)
(if (<= y 62.0)
(/ t (fma (fma (fma (+ a y) y b) y c) y i))
(if (<= y 1.9e+87) (* y (+ (/ x a) (/ (/ z a) y))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x - (fma(-1.0, z, (a * x)) / y);
double tmp;
if (y <= -42000000000.0) {
tmp = t_1;
} else if (y <= -2.6e-235) {
tmp = fma(fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616), y, t) / i;
} else if (y <= 62.0) {
tmp = t / fma(fma(fma((a + y), y, b), y, c), y, i);
} else if (y <= 1.9e+87) {
tmp = y * ((x / a) + ((z / a) / y));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x - Float64(fma(-1.0, z, Float64(a * x)) / y)) tmp = 0.0 if (y <= -42000000000.0) tmp = t_1; elseif (y <= -2.6e-235) tmp = Float64(fma(fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616), y, t) / i); elseif (y <= 62.0) tmp = Float64(t / fma(fma(fma(Float64(a + y), y, b), y, c), y, i)); elseif (y <= 1.9e+87) tmp = Float64(y * Float64(Float64(x / a) + Float64(Float64(z / a) / y))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x - N[(N[(-1.0 * z + N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -42000000000.0], t$95$1, If[LessEqual[y, -2.6e-235], N[(N[(N[(N[(N[(y * x + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / i), $MachinePrecision], If[LessEqual[y, 62.0], N[(t / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e+87], N[(y * N[(N[(x / a), $MachinePrecision] + N[(N[(z / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{\mathsf{fma}\left(-1, z, a \cdot x\right)}{y}\\
\mathbf{if}\;y \leq -42000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.6 \cdot 10^{-235}:\\
\;\;\;\;\frac{\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)}{i}\\
\mathbf{elif}\;y \leq 62:\\
\;\;\;\;\frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{+87}:\\
\;\;\;\;y \cdot \left(\frac{x}{a} + \frac{\frac{z}{a}}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.2e10 or 1.90000000000000006e87 < y Initial program 9.3%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-*.f6457.4
Applied rewrites57.4%
if -4.2e10 < y < -2.6e-235Initial program 99.7%
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
*-commutativeN/A
lower-fma.f6478.9
Applied rewrites78.9%
if -2.6e-235 < y < 62Initial program 99.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-+.f6477.9
Applied rewrites77.9%
if 62 < y < 1.90000000000000006e87Initial program 29.8%
Taylor expanded in a around inf
associate-/r*N/A
lower-/.f64N/A
Applied rewrites37.7%
Taylor expanded in y around inf
Applied rewrites35.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (- x (/ (fma -1.0 z (* a x)) y))))
(if (<= y -6.5e+49)
t_1
(if (<= y 1.2)
(/ (fma 230661.510616 y t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
(if (<= y 6.6e+39)
(/
(/ (fma (fma (fma x y z) y 27464.7644705) y 230661.510616) (* y y))
a)
(if (<= y 1.25e+87) (* (/ y a) x) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x - (fma(-1.0, z, (a * x)) / y);
double tmp;
if (y <= -6.5e+49) {
tmp = t_1;
} else if (y <= 1.2) {
tmp = fma(230661.510616, y, t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
} else if (y <= 6.6e+39) {
tmp = (fma(fma(fma(x, y, z), y, 27464.7644705), y, 230661.510616) / (y * y)) / a;
} else if (y <= 1.25e+87) {
tmp = (y / a) * x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x - Float64(fma(-1.0, z, Float64(a * x)) / y)) tmp = 0.0 if (y <= -6.5e+49) tmp = t_1; elseif (y <= 1.2) tmp = Float64(fma(230661.510616, y, t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)); elseif (y <= 6.6e+39) tmp = Float64(Float64(fma(fma(fma(x, y, z), y, 27464.7644705), y, 230661.510616) / Float64(y * y)) / a); elseif (y <= 1.25e+87) tmp = Float64(Float64(y / a) * x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x - N[(N[(-1.0 * z + N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.5e+49], t$95$1, If[LessEqual[y, 1.2], N[(N[(230661.510616 * y + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.6e+39], N[(N[(N[(N[(N[(x * y + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] / N[(y * y), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 1.25e+87], N[(N[(y / a), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{\mathsf{fma}\left(-1, z, a \cdot x\right)}{y}\\
\mathbf{if}\;y \leq -6.5 \cdot 10^{+49}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.2:\\
\;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\
\mathbf{elif}\;y \leq 6.6 \cdot 10^{+39}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right)}{y \cdot y}}{a}\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{+87}:\\
\;\;\;\;\frac{y}{a} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.5000000000000005e49 or 1.24999999999999995e87 < y Initial program 3.7%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-*.f6462.5
Applied rewrites62.5%
if -6.5000000000000005e49 < y < 1.19999999999999996Initial program 97.5%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6485.3
Applied rewrites85.3%
if 1.19999999999999996 < y < 6.60000000000000042e39Initial program 55.3%
Taylor expanded in a around inf
associate-/r*N/A
lower-/.f64N/A
Applied rewrites56.8%
Taylor expanded in t around 0
Applied rewrites47.3%
Applied rewrites47.6%
if 6.60000000000000042e39 < y < 1.24999999999999995e87Initial program 3.5%
Taylor expanded in a around inf
associate-/r*N/A
lower-/.f64N/A
Applied rewrites19.1%
Taylor expanded in x around inf
Applied rewrites35.9%
Applied rewrites51.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (- x (/ (fma -1.0 z (* a x)) y))))
(if (<= y -6.5e+49)
t_1
(if (<= y 62.0)
(/ (fma 230661.510616 y t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
(if (<= y 1.9e+87) (* y (+ (/ x a) (/ (/ z a) y))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x - (fma(-1.0, z, (a * x)) / y);
double tmp;
if (y <= -6.5e+49) {
tmp = t_1;
} else if (y <= 62.0) {
tmp = fma(230661.510616, y, t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
} else if (y <= 1.9e+87) {
tmp = y * ((x / a) + ((z / a) / y));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x - Float64(fma(-1.0, z, Float64(a * x)) / y)) tmp = 0.0 if (y <= -6.5e+49) tmp = t_1; elseif (y <= 62.0) tmp = Float64(fma(230661.510616, y, t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)); elseif (y <= 1.9e+87) tmp = Float64(y * Float64(Float64(x / a) + Float64(Float64(z / a) / y))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x - N[(N[(-1.0 * z + N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.5e+49], t$95$1, If[LessEqual[y, 62.0], N[(N[(230661.510616 * y + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e+87], N[(y * N[(N[(x / a), $MachinePrecision] + N[(N[(z / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{\mathsf{fma}\left(-1, z, a \cdot x\right)}{y}\\
\mathbf{if}\;y \leq -6.5 \cdot 10^{+49}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 62:\\
\;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{+87}:\\
\;\;\;\;y \cdot \left(\frac{x}{a} + \frac{\frac{z}{a}}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.5000000000000005e49 or 1.90000000000000006e87 < y Initial program 3.7%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-*.f6462.5
Applied rewrites62.5%
if -6.5000000000000005e49 < y < 62Initial program 97.6%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6484.8
Applied rewrites84.8%
if 62 < y < 1.90000000000000006e87Initial program 29.8%
Taylor expanded in a around inf
associate-/r*N/A
lower-/.f64N/A
Applied rewrites37.7%
Taylor expanded in y around inf
Applied rewrites35.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (- x (/ (fma -1.0 z (* a x)) y))))
(if (<= y -42000000000.0)
t_1
(if (<= y -2.6e-235)
(/ (fma (fma (fma (fma y x z) y 27464.7644705) y 230661.510616) y t) i)
(if (<= y 2.05e+43)
(/ t (fma (fma (fma (+ a y) y b) y c) y i))
(if (<= y 1.25e+87) (* (/ y a) x) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x - (fma(-1.0, z, (a * x)) / y);
double tmp;
if (y <= -42000000000.0) {
tmp = t_1;
} else if (y <= -2.6e-235) {
tmp = fma(fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616), y, t) / i;
} else if (y <= 2.05e+43) {
tmp = t / fma(fma(fma((a + y), y, b), y, c), y, i);
} else if (y <= 1.25e+87) {
tmp = (y / a) * x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x - Float64(fma(-1.0, z, Float64(a * x)) / y)) tmp = 0.0 if (y <= -42000000000.0) tmp = t_1; elseif (y <= -2.6e-235) tmp = Float64(fma(fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616), y, t) / i); elseif (y <= 2.05e+43) tmp = Float64(t / fma(fma(fma(Float64(a + y), y, b), y, c), y, i)); elseif (y <= 1.25e+87) tmp = Float64(Float64(y / a) * x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x - N[(N[(-1.0 * z + N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -42000000000.0], t$95$1, If[LessEqual[y, -2.6e-235], N[(N[(N[(N[(N[(y * x + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / i), $MachinePrecision], If[LessEqual[y, 2.05e+43], N[(t / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.25e+87], N[(N[(y / a), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{\mathsf{fma}\left(-1, z, a \cdot x\right)}{y}\\
\mathbf{if}\;y \leq -42000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.6 \cdot 10^{-235}:\\
\;\;\;\;\frac{\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)}{i}\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{+43}:\\
\;\;\;\;\frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{+87}:\\
\;\;\;\;\frac{y}{a} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.2e10 or 1.24999999999999995e87 < y Initial program 9.3%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-*.f6457.4
Applied rewrites57.4%
if -4.2e10 < y < -2.6e-235Initial program 99.7%
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
*-commutativeN/A
lower-fma.f6478.9
Applied rewrites78.9%
if -2.6e-235 < y < 2.05e43Initial program 91.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-+.f6468.5
Applied rewrites68.5%
if 2.05e43 < y < 1.24999999999999995e87Initial program 3.5%
Taylor expanded in a around inf
associate-/r*N/A
lower-/.f64N/A
Applied rewrites20.7%
Taylor expanded in x around inf
Applied rewrites39.1%
Applied rewrites56.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (- x (/ (fma -1.0 z (* a x)) y))))
(if (<= y -6.5e+49)
t_1
(if (<= y 2.05e+43)
(/ t (fma (fma (fma (+ a y) y b) y c) y i))
(if (<= y 1.25e+87) (* (/ y a) x) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x - (fma(-1.0, z, (a * x)) / y);
double tmp;
if (y <= -6.5e+49) {
tmp = t_1;
} else if (y <= 2.05e+43) {
tmp = t / fma(fma(fma((a + y), y, b), y, c), y, i);
} else if (y <= 1.25e+87) {
tmp = (y / a) * x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x - Float64(fma(-1.0, z, Float64(a * x)) / y)) tmp = 0.0 if (y <= -6.5e+49) tmp = t_1; elseif (y <= 2.05e+43) tmp = Float64(t / fma(fma(fma(Float64(a + y), y, b), y, c), y, i)); elseif (y <= 1.25e+87) tmp = Float64(Float64(y / a) * x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x - N[(N[(-1.0 * z + N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.5e+49], t$95$1, If[LessEqual[y, 2.05e+43], N[(t / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.25e+87], N[(N[(y / a), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{\mathsf{fma}\left(-1, z, a \cdot x\right)}{y}\\
\mathbf{if}\;y \leq -6.5 \cdot 10^{+49}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{+43}:\\
\;\;\;\;\frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{+87}:\\
\;\;\;\;\frac{y}{a} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.5000000000000005e49 or 1.24999999999999995e87 < y Initial program 3.7%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-*.f6462.5
Applied rewrites62.5%
if -6.5000000000000005e49 < y < 2.05e43Initial program 92.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-+.f6464.7
Applied rewrites64.7%
if 2.05e43 < y < 1.24999999999999995e87Initial program 3.5%
Taylor expanded in a around inf
associate-/r*N/A
lower-/.f64N/A
Applied rewrites20.7%
Taylor expanded in x around inf
Applied rewrites39.1%
Applied rewrites56.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (- x (/ (fma -1.0 z (* a x)) y))))
(if (<= y -7000000000.0)
t_1
(if (<= y 9.6e-27) (/ t i) (if (<= y 1.25e+87) (* (/ y a) x) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x - (fma(-1.0, z, (a * x)) / y);
double tmp;
if (y <= -7000000000.0) {
tmp = t_1;
} else if (y <= 9.6e-27) {
tmp = t / i;
} else if (y <= 1.25e+87) {
tmp = (y / a) * x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x - Float64(fma(-1.0, z, Float64(a * x)) / y)) tmp = 0.0 if (y <= -7000000000.0) tmp = t_1; elseif (y <= 9.6e-27) tmp = Float64(t / i); elseif (y <= 1.25e+87) tmp = Float64(Float64(y / a) * x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x - N[(N[(-1.0 * z + N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7000000000.0], t$95$1, If[LessEqual[y, 9.6e-27], N[(t / i), $MachinePrecision], If[LessEqual[y, 1.25e+87], N[(N[(y / a), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{\mathsf{fma}\left(-1, z, a \cdot x\right)}{y}\\
\mathbf{if}\;y \leq -7000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 9.6 \cdot 10^{-27}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{+87}:\\
\;\;\;\;\frac{y}{a} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -7e9 or 1.24999999999999995e87 < y Initial program 9.3%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-*.f6457.4
Applied rewrites57.4%
if -7e9 < y < 9.60000000000000008e-27Initial program 99.7%
Taylor expanded in y around 0
lower-/.f6456.8
Applied rewrites56.8%
if 9.60000000000000008e-27 < y < 1.24999999999999995e87Initial program 42.8%
Taylor expanded in a around inf
associate-/r*N/A
lower-/.f64N/A
Applied rewrites34.5%
Taylor expanded in x around inf
Applied rewrites16.6%
Applied rewrites22.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -280.0) (* y (/ x a)) (if (<= y 9.6e-27) (/ t i) (* (/ y a) x))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -280.0) {
tmp = y * (x / a);
} else if (y <= 9.6e-27) {
tmp = t / i;
} else {
tmp = (y / a) * 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 (y <= (-280.0d0)) then
tmp = y * (x / a)
else if (y <= 9.6d-27) then
tmp = t / i
else
tmp = (y / a) * 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 (y <= -280.0) {
tmp = y * (x / a);
} else if (y <= 9.6e-27) {
tmp = t / i;
} else {
tmp = (y / a) * x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -280.0: tmp = y * (x / a) elif y <= 9.6e-27: tmp = t / i else: tmp = (y / a) * x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -280.0) tmp = Float64(y * Float64(x / a)); elseif (y <= 9.6e-27) tmp = Float64(t / i); else tmp = Float64(Float64(y / a) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -280.0) tmp = y * (x / a); elseif (y <= 9.6e-27) tmp = t / i; else tmp = (y / a) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -280.0], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.6e-27], N[(t / i), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -280:\\
\;\;\;\;y \cdot \frac{x}{a}\\
\mathbf{elif}\;y \leq 9.6 \cdot 10^{-27}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a} \cdot x\\
\end{array}
\end{array}
if y < -280Initial program 16.3%
Taylor expanded in a around inf
associate-/r*N/A
lower-/.f64N/A
Applied rewrites10.3%
Taylor expanded in x around inf
Applied rewrites14.2%
Applied rewrites18.3%
if -280 < y < 9.60000000000000008e-27Initial program 99.7%
Taylor expanded in y around 0
lower-/.f6456.8
Applied rewrites56.8%
if 9.60000000000000008e-27 < y Initial program 18.1%
Taylor expanded in a around inf
associate-/r*N/A
lower-/.f64N/A
Applied rewrites14.5%
Taylor expanded in x around inf
Applied rewrites14.9%
Applied rewrites20.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.5e-21) (not (<= y 9.5e-25))) (/ z a) (/ t i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.5e-21) || !(y <= 9.5e-25)) {
tmp = z / a;
} else {
tmp = t / i;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-1.5d-21)) .or. (.not. (y <= 9.5d-25))) then
tmp = z / a
else
tmp = t / i
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.5e-21) || !(y <= 9.5e-25)) {
tmp = z / a;
} else {
tmp = t / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.5e-21) or not (y <= 9.5e-25): tmp = z / a else: tmp = t / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.5e-21) || !(y <= 9.5e-25)) tmp = Float64(z / a); else tmp = Float64(t / i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.5e-21) || ~((y <= 9.5e-25))) tmp = z / a; else tmp = t / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.5e-21], N[Not[LessEqual[y, 9.5e-25]], $MachinePrecision]], N[(z / a), $MachinePrecision], N[(t / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{-21} \lor \neg \left(y \leq 9.5 \cdot 10^{-25}\right):\\
\;\;\;\;\frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i}\\
\end{array}
\end{array}
if y < -1.49999999999999996e-21 or 9.50000000000000065e-25 < y Initial program 19.1%
Taylor expanded in a around inf
associate-/r*N/A
lower-/.f64N/A
Applied rewrites12.5%
Taylor expanded in z around inf
Applied rewrites10.4%
if -1.49999999999999996e-21 < y < 9.50000000000000065e-25Initial program 99.7%
Taylor expanded in y around 0
lower-/.f6458.1
Applied rewrites58.1%
Final simplification32.6%
(FPCore (x y z t a b c i) :precision binary64 (/ z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return z / a;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = z / a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return z / a;
}
def code(x, y, z, t, a, b, c, i): return z / a
function code(x, y, z, t, a, b, c, i) return Float64(z / a) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = z / a; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(z / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{z}{a}
\end{array}
Initial program 56.6%
Taylor expanded in a around inf
associate-/r*N/A
lower-/.f64N/A
Applied rewrites11.4%
Taylor expanded in z around inf
Applied rewrites7.1%
herbie shell --seed 2024313
(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)))