
(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 16 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 y (fma y (fma y (+ y a) b) c) i)))
(if (<=
(/
(+
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
t)
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
INFINITY)
(fma
(fma y (fma y z 27464.7644705) 230661.510616)
(/ y t_1)
(fma x (/ (* y (* y (* y y))) t_1) (/ t t_1)))
(+ x (/ (- z (* x a)) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = fma(y, fma(y, fma(y, (y + a), b), c), i);
double tmp;
if ((((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)) <= ((double) INFINITY)) {
tmp = fma(fma(y, fma(y, z, 27464.7644705), 230661.510616), (y / t_1), fma(x, ((y * (y * (y * y))) / t_1), (t / t_1)));
} else {
tmp = x + ((z - (x * a)) / y);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = fma(y, fma(y, fma(y, Float64(y + a), b), c), i) tmp = 0.0 if (Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)) <= Inf) tmp = fma(fma(y, fma(y, z, 27464.7644705), 230661.510616), Float64(y / t_1), fma(x, Float64(Float64(y * Float64(y * Float64(y * y))) / t_1), Float64(t / t_1))); else tmp = Float64(x + Float64(Float64(z - Float64(x * a)) / y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(y * N[(y * N[(y * N[(y + a), $MachinePrecision] + b), $MachinePrecision] + c), $MachinePrecision] + i), $MachinePrecision]}, If[LessEqual[N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(y * N[(y * z + 27464.7644705), $MachinePrecision] + 230661.510616), $MachinePrecision] * N[(y / t$95$1), $MachinePrecision] + N[(x * N[(N[(y * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - N[(x * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)\\
\mathbf{if}\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right) + t}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i} \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(y, \mathsf{fma}\left(y, z, 27464.7644705\right), 230661.510616\right), \frac{y}{t\_1}, \mathsf{fma}\left(x, \frac{y \cdot \left(y \cdot \left(y \cdot y\right)\right)}{t\_1}, \frac{t}{t\_1}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z - x \cdot a}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 87.4%
Taylor expanded in x around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
Simplified90.6%
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr90.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
--lowering--.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6464.7
Simplified64.7%
Final simplification81.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (fma y (fma y (fma y (+ y a) b) c) i)))
(if (<=
(/
(+
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
t)
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
INFINITY)
(fma
y
(/ (fma y (fma y (fma y x z) 27464.7644705) 230661.510616) t_1)
(/ t t_1))
(+ x (/ (- z (* x a)) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = fma(y, fma(y, fma(y, (y + a), b), c), i);
double tmp;
if ((((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)) <= ((double) INFINITY)) {
tmp = fma(y, (fma(y, fma(y, fma(y, x, z), 27464.7644705), 230661.510616) / t_1), (t / t_1));
} else {
tmp = x + ((z - (x * a)) / y);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = fma(y, fma(y, fma(y, Float64(y + a), b), c), i) tmp = 0.0 if (Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)) <= Inf) tmp = fma(y, Float64(fma(y, fma(y, fma(y, x, z), 27464.7644705), 230661.510616) / t_1), Float64(t / t_1)); else tmp = Float64(x + Float64(Float64(z - Float64(x * a)) / y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(y * N[(y * N[(y * N[(y + a), $MachinePrecision] + b), $MachinePrecision] + c), $MachinePrecision] + i), $MachinePrecision]}, If[LessEqual[N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], Infinity], N[(y * N[(N[(y * N[(y * N[(y * x + z), $MachinePrecision] + 27464.7644705), $MachinePrecision] + 230661.510616), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - N[(x * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)\\
\mathbf{if}\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right) + t}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i} \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right), 230661.510616\right)}{t\_1}, \frac{t}{t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z - x \cdot a}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 87.4%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
Simplified89.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
--lowering--.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6464.7
Simplified64.7%
Final simplification81.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(/
(+
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
t)
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
(if (<= t_1 INFINITY) t_1 (+ x (/ (- z (* x a)) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x + ((z - (x * a)) / y);
}
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 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x + ((z - (x * a)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x + ((z - (x * a)) / y) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(x + Float64(Float64(z - Float64(x * a)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = x + ((z - (x * a)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x + N[(N[(z - N[(x * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right) + t}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z - x \cdot a}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 87.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 y around -inf
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6464.7
Simplified64.7%
Final simplification79.8%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(/
(+
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
t)
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
INFINITY)
(*
(fma y (fma y (fma y (fma x y z) 27464.7644705) 230661.510616) t)
(/ 1.0 (fma y (fma y (fma y (+ y a) b) c) i)))
(+ x (/ (- z (* x a)) y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)) <= ((double) INFINITY)) {
tmp = fma(y, fma(y, fma(y, fma(x, y, z), 27464.7644705), 230661.510616), t) * (1.0 / fma(y, fma(y, fma(y, (y + a), b), c), i));
} else {
tmp = x + ((z - (x * a)) / y);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)) <= Inf) tmp = Float64(fma(y, fma(y, fma(y, fma(x, y, z), 27464.7644705), 230661.510616), t) * Float64(1.0 / fma(y, fma(y, fma(y, Float64(y + a), b), c), i))); else tmp = Float64(x + Float64(Float64(z - Float64(x * a)) / y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(y * N[(y * N[(y * N[(x * y + z), $MachinePrecision] + 27464.7644705), $MachinePrecision] + 230661.510616), $MachinePrecision] + t), $MachinePrecision] * N[(1.0 / N[(y * N[(y * N[(y * N[(y + a), $MachinePrecision] + b), $MachinePrecision] + c), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - N[(x * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right) + t}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i} \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(x, y, z\right), 27464.7644705\right), 230661.510616\right), t\right) \cdot \frac{1}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z - x \cdot a}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 87.4%
div-invN/A
*-lowering-*.f64N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
Applied egg-rr87.3%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6464.7
Simplified64.7%
Final simplification79.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (/ (- z (* x a)) y))))
(if (<= y -1.95e+37)
t_1
(if (<= y 1.8e+23)
(/
(fma y (fma y (fma y z 27464.7644705) 230661.510616) t)
(fma y (fma y (fma y (+ y a) b) c) i))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z - (x * a)) / y);
double tmp;
if (y <= -1.95e+37) {
tmp = t_1;
} else if (y <= 1.8e+23) {
tmp = fma(y, fma(y, fma(y, z, 27464.7644705), 230661.510616), t) / fma(y, fma(y, fma(y, (y + a), b), c), i);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z - Float64(x * a)) / y)) tmp = 0.0 if (y <= -1.95e+37) tmp = t_1; elseif (y <= 1.8e+23) tmp = Float64(fma(y, fma(y, fma(y, z, 27464.7644705), 230661.510616), t) / fma(y, fma(y, fma(y, Float64(y + a), b), c), i)); 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[(z - N[(x * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.95e+37], t$95$1, If[LessEqual[y, 1.8e+23], N[(N[(y * N[(y * N[(y * z + 27464.7644705), $MachinePrecision] + 230661.510616), $MachinePrecision] + t), $MachinePrecision] / N[(y * N[(y * N[(y * N[(y + a), $MachinePrecision] + b), $MachinePrecision] + c), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z - x \cdot a}{y}\\
\mathbf{if}\;y \leq -1.95 \cdot 10^{+37}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{+23}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, z, 27464.7644705\right), 230661.510616\right), t\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.9499999999999999e37 or 1.7999999999999999e23 < y Initial program 8.0%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6459.1
Simplified59.1%
if -1.9499999999999999e37 < y < 1.7999999999999999e23Initial program 96.9%
Taylor expanded in x around 0
/-lowering-/.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
+-lowering-+.f6492.1
Simplified92.1%
Final simplification77.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (/ (- z (* x a)) y))))
(if (<= y -1.25e+34)
t_1
(if (<= y 1.6e+23)
(/
(fma y (fma y (fma y z 27464.7644705) 230661.510616) t)
(+ i (* y (+ c (* y b)))))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z - (x * a)) / y);
double tmp;
if (y <= -1.25e+34) {
tmp = t_1;
} else if (y <= 1.6e+23) {
tmp = fma(y, fma(y, fma(y, z, 27464.7644705), 230661.510616), t) / (i + (y * (c + (y * b))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z - Float64(x * a)) / y)) tmp = 0.0 if (y <= -1.25e+34) tmp = t_1; elseif (y <= 1.6e+23) tmp = Float64(fma(y, fma(y, fma(y, z, 27464.7644705), 230661.510616), t) / Float64(i + Float64(y * Float64(c + Float64(y * b))))); 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[(z - N[(x * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.25e+34], t$95$1, If[LessEqual[y, 1.6e+23], N[(N[(y * N[(y * N[(y * z + 27464.7644705), $MachinePrecision] + 230661.510616), $MachinePrecision] + t), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z - x \cdot a}{y}\\
\mathbf{if}\;y \leq -1.25 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{+23}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, z, 27464.7644705\right), 230661.510616\right), t\right)}{i + y \cdot \left(c + y \cdot b\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.25e34 or 1.6e23 < y Initial program 8.8%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6458.6
Simplified58.6%
if -1.25e34 < y < 1.6e23Initial program 96.9%
Taylor expanded in x around 0
/-lowering-/.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
+-lowering-+.f6492.1
Simplified92.1%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6485.3
Simplified85.3%
Final simplification73.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (/ (- z (* x a)) y))))
(if (<= y -5.4e+32)
t_1
(if (<= y -1.5e-203)
(/ (fma y (fma y (fma y (fma y x z) 27464.7644705) 230661.510616) t) i)
(if (<= y 1.55e+22) (/ t (fma y (fma y (fma y (+ y a) b) c) i)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z - (x * a)) / y);
double tmp;
if (y <= -5.4e+32) {
tmp = t_1;
} else if (y <= -1.5e-203) {
tmp = fma(y, fma(y, fma(y, fma(y, x, z), 27464.7644705), 230661.510616), t) / i;
} else if (y <= 1.55e+22) {
tmp = t / fma(y, fma(y, fma(y, (y + a), b), c), i);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z - Float64(x * a)) / y)) tmp = 0.0 if (y <= -5.4e+32) tmp = t_1; elseif (y <= -1.5e-203) tmp = Float64(fma(y, fma(y, fma(y, fma(y, x, z), 27464.7644705), 230661.510616), t) / i); elseif (y <= 1.55e+22) tmp = Float64(t / fma(y, fma(y, fma(y, Float64(y + a), b), c), i)); 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[(z - N[(x * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.4e+32], t$95$1, If[LessEqual[y, -1.5e-203], N[(N[(y * N[(y * N[(y * N[(y * x + z), $MachinePrecision] + 27464.7644705), $MachinePrecision] + 230661.510616), $MachinePrecision] + t), $MachinePrecision] / i), $MachinePrecision], If[LessEqual[y, 1.55e+22], N[(t / N[(y * N[(y * N[(y * N[(y + a), $MachinePrecision] + b), $MachinePrecision] + c), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z - x \cdot a}{y}\\
\mathbf{if}\;y \leq -5.4 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.5 \cdot 10^{-203}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right), 230661.510616\right), t\right)}{i}\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+22}:\\
\;\;\;\;\frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.40000000000000025e32 or 1.5500000000000001e22 < y Initial program 8.8%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6458.6
Simplified58.6%
if -5.40000000000000025e32 < y < -1.5000000000000001e-203Initial program 95.1%
Taylor expanded in i around inf
/-lowering-/.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6460.0
Simplified60.0%
if -1.5000000000000001e-203 < y < 1.5500000000000001e22Initial program 97.7%
Taylor expanded in t around inf
/-lowering-/.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
+-lowering-+.f6475.4
Simplified75.4%
Final simplification65.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (/ (- z (* x a)) y))))
(if (<= y -8e+18)
t_1
(if (<= y -6.2e-204)
(/ (fma y (fma y (fma y z 27464.7644705) 230661.510616) t) i)
(if (<= y 1.8e+23) (/ t (fma y (fma y (fma y (+ y a) b) c) i)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z - (x * a)) / y);
double tmp;
if (y <= -8e+18) {
tmp = t_1;
} else if (y <= -6.2e-204) {
tmp = fma(y, fma(y, fma(y, z, 27464.7644705), 230661.510616), t) / i;
} else if (y <= 1.8e+23) {
tmp = t / fma(y, fma(y, fma(y, (y + a), b), c), i);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z - Float64(x * a)) / y)) tmp = 0.0 if (y <= -8e+18) tmp = t_1; elseif (y <= -6.2e-204) tmp = Float64(fma(y, fma(y, fma(y, z, 27464.7644705), 230661.510616), t) / i); elseif (y <= 1.8e+23) tmp = Float64(t / fma(y, fma(y, fma(y, Float64(y + a), b), c), i)); 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[(z - N[(x * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8e+18], t$95$1, If[LessEqual[y, -6.2e-204], N[(N[(y * N[(y * N[(y * z + 27464.7644705), $MachinePrecision] + 230661.510616), $MachinePrecision] + t), $MachinePrecision] / i), $MachinePrecision], If[LessEqual[y, 1.8e+23], N[(t / N[(y * N[(y * N[(y * N[(y + a), $MachinePrecision] + b), $MachinePrecision] + c), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z - x \cdot a}{y}\\
\mathbf{if}\;y \leq -8 \cdot 10^{+18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -6.2 \cdot 10^{-204}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, z, 27464.7644705\right), 230661.510616\right), t\right)}{i}\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{+23}:\\
\;\;\;\;\frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -8e18 or 1.7999999999999999e23 < y Initial program 9.5%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6457.2
Simplified57.2%
if -8e18 < y < -6.1999999999999998e-204Initial program 99.3%
Taylor expanded in x around 0
/-lowering-/.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
+-lowering-+.f6491.6
Simplified91.6%
Taylor expanded in y around 0
Simplified58.9%
if -6.1999999999999998e-204 < y < 1.7999999999999999e23Initial program 97.7%
Taylor expanded in t around inf
/-lowering-/.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
+-lowering-+.f6475.4
Simplified75.4%
Final simplification64.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (/ (- z (* x a)) y))))
(if (<= y -1.85e+34)
t_1
(if (<= y 9e+22)
(/ (fma y 230661.510616 t) (fma y (fma y (fma y (+ y a) b) c) i))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z - (x * a)) / y);
double tmp;
if (y <= -1.85e+34) {
tmp = t_1;
} else if (y <= 9e+22) {
tmp = fma(y, 230661.510616, t) / fma(y, fma(y, fma(y, (y + a), b), c), i);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z - Float64(x * a)) / y)) tmp = 0.0 if (y <= -1.85e+34) tmp = t_1; elseif (y <= 9e+22) tmp = Float64(fma(y, 230661.510616, t) / fma(y, fma(y, fma(y, Float64(y + a), b), c), i)); 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[(z - N[(x * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.85e+34], t$95$1, If[LessEqual[y, 9e+22], N[(N[(y * 230661.510616 + t), $MachinePrecision] / N[(y * N[(y * N[(y * N[(y + a), $MachinePrecision] + b), $MachinePrecision] + c), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z - x \cdot a}{y}\\
\mathbf{if}\;y \leq -1.85 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+22}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, 230661.510616, t\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.85000000000000004e34 or 8.9999999999999996e22 < y Initial program 8.0%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6459.1
Simplified59.1%
if -1.85000000000000004e34 < y < 8.9999999999999996e22Initial program 96.9%
Taylor expanded in x around 0
/-lowering-/.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
+-lowering-+.f6492.1
Simplified92.1%
Taylor expanded in y around 0
Simplified82.0%
Final simplification72.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (/ (- z (* x a)) y))))
(if (<= y -9e+14)
t_1
(if (<= y 1.4e-9)
(/ (fma y (fma y (fma y z 27464.7644705) 230661.510616) t) i)
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z - (x * a)) / y);
double tmp;
if (y <= -9e+14) {
tmp = t_1;
} else if (y <= 1.4e-9) {
tmp = fma(y, fma(y, fma(y, z, 27464.7644705), 230661.510616), t) / i;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z - Float64(x * a)) / y)) tmp = 0.0 if (y <= -9e+14) tmp = t_1; elseif (y <= 1.4e-9) tmp = Float64(fma(y, fma(y, fma(y, z, 27464.7644705), 230661.510616), t) / i); 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[(z - N[(x * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9e+14], t$95$1, If[LessEqual[y, 1.4e-9], N[(N[(y * N[(y * N[(y * z + 27464.7644705), $MachinePrecision] + 230661.510616), $MachinePrecision] + t), $MachinePrecision] / i), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z - x \cdot a}{y}\\
\mathbf{if}\;y \leq -9 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{-9}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, z, 27464.7644705\right), 230661.510616\right), t\right)}{i}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -9e14 or 1.39999999999999992e-9 < y Initial program 15.8%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6452.5
Simplified52.5%
if -9e14 < y < 1.39999999999999992e-9Initial program 99.6%
Taylor expanded in x around 0
/-lowering-/.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
+-lowering-+.f6496.4
Simplified96.4%
Taylor expanded in y around 0
Simplified67.8%
Final simplification60.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (/ (- z (* x a)) y))))
(if (<= y -470000.0)
t_1
(if (<= y 10600000000.0) (fma y (/ 230661.510616 i) (/ t i)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z - (x * a)) / y);
double tmp;
if (y <= -470000.0) {
tmp = t_1;
} else if (y <= 10600000000.0) {
tmp = fma(y, (230661.510616 / i), (t / i));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z - Float64(x * a)) / y)) tmp = 0.0 if (y <= -470000.0) tmp = t_1; elseif (y <= 10600000000.0) tmp = fma(y, Float64(230661.510616 / i), Float64(t / i)); 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[(z - N[(x * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -470000.0], t$95$1, If[LessEqual[y, 10600000000.0], N[(y * N[(230661.510616 / i), $MachinePrecision] + N[(t / i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z - x \cdot a}{y}\\
\mathbf{if}\;y \leq -470000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 10600000000:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{230661.510616}{i}, \frac{t}{i}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.7e5 or 1.06e10 < y Initial program 14.6%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6454.1
Simplified54.1%
if -4.7e5 < y < 1.06e10Initial program 98.1%
Taylor expanded in y around 0
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f6447.8
Simplified47.8%
Taylor expanded in i around inf
/-lowering-/.f6462.2
Simplified62.2%
Final simplification58.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (/ (- z (* x a)) y))))
(if (<= y -290000.0)
t_1
(if (<= y 23500000000.0) (fma 230661.510616 (/ y i) (/ t i)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z - (x * a)) / y);
double tmp;
if (y <= -290000.0) {
tmp = t_1;
} else if (y <= 23500000000.0) {
tmp = fma(230661.510616, (y / i), (t / i));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z - Float64(x * a)) / y)) tmp = 0.0 if (y <= -290000.0) tmp = t_1; elseif (y <= 23500000000.0) tmp = fma(230661.510616, Float64(y / i), Float64(t / i)); 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[(z - N[(x * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -290000.0], t$95$1, If[LessEqual[y, 23500000000.0], N[(230661.510616 * N[(y / i), $MachinePrecision] + N[(t / i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z - x \cdot a}{y}\\
\mathbf{if}\;y \leq -290000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 23500000000:\\
\;\;\;\;\mathsf{fma}\left(230661.510616, \frac{y}{i}, \frac{t}{i}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.9e5 or 2.35e10 < y Initial program 14.6%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6454.1
Simplified54.1%
if -2.9e5 < y < 2.35e10Initial program 98.1%
Taylor expanded in y around 0
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f6447.8
Simplified47.8%
Taylor expanded in c around 0
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6462.2
Simplified62.2%
Final simplification58.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (/ (- z (* x a)) y))))
(if (<= y -57000.0)
t_1
(if (<= y 430000000000.0) (/ (fma 230661.510616 y t) i) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z - (x * a)) / y);
double tmp;
if (y <= -57000.0) {
tmp = t_1;
} else if (y <= 430000000000.0) {
tmp = fma(230661.510616, y, t) / i;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z - Float64(x * a)) / y)) tmp = 0.0 if (y <= -57000.0) tmp = t_1; elseif (y <= 430000000000.0) tmp = Float64(fma(230661.510616, y, t) / i); 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[(z - N[(x * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -57000.0], t$95$1, If[LessEqual[y, 430000000000.0], N[(N[(230661.510616 * y + t), $MachinePrecision] / i), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z - x \cdot a}{y}\\
\mathbf{if}\;y \leq -57000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 430000000000:\\
\;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{i}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -57000 or 4.3e11 < y Initial program 14.6%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-lowering-+.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6454.1
Simplified54.1%
if -57000 < y < 4.3e11Initial program 98.1%
Taylor expanded in y around 0
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f6447.8
Simplified47.8%
Taylor expanded in i around inf
/-lowering-/.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f6462.2
Simplified62.2%
Final simplification58.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -1.25e-16) x (if (<= y 2050000000.0) (/ (fma 230661.510616 y t) i) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -1.25e-16) {
tmp = x;
} else if (y <= 2050000000.0) {
tmp = fma(230661.510616, y, t) / i;
} else {
tmp = x;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -1.25e-16) tmp = x; elseif (y <= 2050000000.0) tmp = Float64(fma(230661.510616, y, t) / i); else tmp = x; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1.25e-16], x, If[LessEqual[y, 2050000000.0], N[(N[(230661.510616 * y + t), $MachinePrecision] / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{-16}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2050000000:\\
\;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.2500000000000001e-16 or 2.05e9 < y Initial program 19.7%
Taylor expanded in y around inf
Simplified40.3%
if -1.2500000000000001e-16 < y < 2.05e9Initial program 98.9%
Taylor expanded in y around 0
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f6450.2
Simplified50.2%
Taylor expanded in i around inf
/-lowering-/.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f6465.7
Simplified65.7%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -1.25e+39) x (if (<= y 3.2e+23) (/ t i) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -1.25e+39) {
tmp = x;
} else if (y <= 3.2e+23) {
tmp = t / i;
} else {
tmp = 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 <= (-1.25d+39)) then
tmp = x
else if (y <= 3.2d+23) then
tmp = t / i
else
tmp = 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 <= -1.25e+39) {
tmp = x;
} else if (y <= 3.2e+23) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -1.25e+39: tmp = x elif y <= 3.2e+23: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -1.25e+39) tmp = x; elseif (y <= 3.2e+23) tmp = Float64(t / i); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -1.25e+39) tmp = x; elseif (y <= 3.2e+23) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1.25e+39], x, If[LessEqual[y, 3.2e+23], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{+39}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+23}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.25000000000000004e39 or 3.2e23 < y Initial program 8.1%
Taylor expanded in y around inf
Simplified46.8%
if -1.25000000000000004e39 < y < 3.2e23Initial program 95.7%
Taylor expanded in y around 0
/-lowering-/.f6449.2
Simplified49.2%
(FPCore (x y z t a b c i) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return x;
}
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
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return x;
}
def code(x, y, z, t, a, b, c, i): return x
function code(x, y, z, t, a, b, c, i) return x end
function tmp = code(x, y, z, t, a, b, c, i) tmp = x; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 58.0%
Taylor expanded in y around inf
Simplified22.6%
herbie shell --seed 2024198
(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)))