
(FPCore (x y z t a b)
:precision binary64
(+
x
(/
(*
y
(+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b))
(+
(* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z)
0.607771387771))))
double code(double x, double y, double z, double t, double a, double b) {
return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
real(8) function code(x, y, z, t, a, b)
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
code = x + ((y * ((((((((z * 3.13060547623d0) + 11.1667541262d0) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407d0) * z) + 31.4690115749d0) * z) + 11.9400905721d0) * z) + 0.607771387771d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
def code(x, y, z, t, a, b): return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))
function code(x, y, z, t, a, b) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))) end
function tmp = code(x, y, z, t, a, b) tmp = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b)
:precision binary64
(+
x
(/
(*
y
(+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b))
(+
(* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z)
0.607771387771))))
double code(double x, double y, double z, double t, double a, double b) {
return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
real(8) function code(x, y, z, t, a, b)
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
code = x + ((y * ((((((((z * 3.13060547623d0) + 11.1667541262d0) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407d0) * z) + 31.4690115749d0) * z) + 11.9400905721d0) * z) + 0.607771387771d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
def code(x, y, z, t, a, b): return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))
function code(x, y, z, t, a, b) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))) end
function tmp = code(x, y, z, t, a, b) tmp = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (fma y 3.13060547623 x) (- (* t (/ y (* z z)))))))
(if (<= z -2.2e+50)
t_1
(if (<= z 1.5e+40)
(+
x
(/
y
(/
(fma
z
(fma z (fma z (+ z 15.234687407) 31.4690115749) 11.9400905721)
0.607771387771)
(fma z (fma z (fma z (fma z 3.13060547623 11.1667541262) t) a) b))))
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(y, 3.13060547623, x) - -(t * (y / (z * z)));
double tmp;
if (z <= -2.2e+50) {
tmp = t_1;
} else if (z <= 1.5e+40) {
tmp = x + (y / (fma(z, fma(z, fma(z, (z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771) / fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(fma(y, 3.13060547623, x) - Float64(-Float64(t * Float64(y / Float64(z * z))))) tmp = 0.0 if (z <= -2.2e+50) tmp = t_1; elseif (z <= 1.5e+40) tmp = Float64(x + Float64(y / Float64(fma(z, fma(z, fma(z, Float64(z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771) / fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * 3.13060547623 + x), $MachinePrecision] - (-N[(t * N[(y / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]}, If[LessEqual[z, -2.2e+50], t$95$1, If[LessEqual[z, 1.5e+40], N[(x + N[(y / N[(N[(z * N[(z * N[(z * N[(z + 15.234687407), $MachinePrecision] + 31.4690115749), $MachinePrecision] + 11.9400905721), $MachinePrecision] + 0.607771387771), $MachinePrecision] / N[(z * N[(z * N[(z * N[(z * 3.13060547623 + 11.1667541262), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, 3.13060547623, x\right) - \left(-t \cdot \frac{y}{z \cdot z}\right)\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+50}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+40}:\\
\;\;\;\;x + \frac{y}{\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right), t\right), a\right), b\right)}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.20000000000000017e50 or 1.5000000000000001e40 < z Initial program 4.8%
Taylor expanded in z around -inf
Applied rewrites88.5%
Taylor expanded in t around inf
Applied rewrites98.6%
if -2.20000000000000017e50 < z < 1.5000000000000001e40Initial program 96.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6498.4
Applied rewrites98.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* 1.6453555072203998 (* y b)))
(t_2
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
(+
(*
z
(+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771))))
(if (<= t_2 -1e+94)
t_1
(if (<= t_2 5e+118)
(fma y 3.13060547623 x)
(if (<= t_2 5e+304) t_1 (fma y 3.13060547623 x))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.6453555072203998 * (y * b);
double t_2 = (y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771);
double tmp;
if (t_2 <= -1e+94) {
tmp = t_1;
} else if (t_2 <= 5e+118) {
tmp = fma(y, 3.13060547623, x);
} else if (t_2 <= 5e+304) {
tmp = t_1;
} else {
tmp = fma(y, 3.13060547623, x);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(1.6453555072203998 * Float64(y * b)) t_2 = Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) tmp = 0.0 if (t_2 <= -1e+94) tmp = t_1; elseif (t_2 <= 5e+118) tmp = fma(y, 3.13060547623, x); elseif (t_2 <= 5e+304) tmp = t_1; else tmp = fma(y, 3.13060547623, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.6453555072203998 * N[(y * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * N[(N[(z * N[(N[(z * N[(N[(z * N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(N[(z * N[(N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision] + 31.4690115749), $MachinePrecision]), $MachinePrecision] + 11.9400905721), $MachinePrecision]), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+94], t$95$1, If[LessEqual[t$95$2, 5e+118], N[(y * 3.13060547623 + x), $MachinePrecision], If[LessEqual[t$95$2, 5e+304], t$95$1, N[(y * 3.13060547623 + x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1.6453555072203998 \cdot \left(y \cdot b\right)\\
t_2 := \frac{y \cdot \left(z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right) + b\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+94}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+118}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+304}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < -1e94 or 4.99999999999999972e118 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < 4.9999999999999997e304Initial program 91.1%
Applied rewrites91.2%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6467.4
Applied rewrites67.4%
Taylor expanded in y around inf
Applied rewrites55.4%
if -1e94 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < 4.99999999999999972e118 or 4.9999999999999997e304 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) Initial program 46.4%
Taylor expanded in z around inf
+-commutativeN/A
*-commutativeN/A
lower-fma.f6479.8
Applied rewrites79.8%
Final simplification74.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(fma
z
(fma z (fma z (+ z 15.234687407) 31.4690115749) 11.9400905721)
0.607771387771)))
(if (<=
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
(+
(*
z
(+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771))
INFINITY)
(fma
y
(/ (fma z (fma z (* z (fma z 3.13060547623 11.1667541262)) a) b) t_1)
(fma y (* t (/ (* z z) t_1)) x))
(- (fma y 3.13060547623 x) (- (* t (/ y (* z z))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(z, fma(z, fma(z, (z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771);
double tmp;
if (((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) <= ((double) INFINITY)) {
tmp = fma(y, (fma(z, fma(z, (z * fma(z, 3.13060547623, 11.1667541262)), a), b) / t_1), fma(y, (t * ((z * z) / t_1)), x));
} else {
tmp = fma(y, 3.13060547623, x) - -(t * (y / (z * z)));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(z, fma(z, fma(z, Float64(z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771) tmp = 0.0 if (Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) <= Inf) tmp = fma(y, Float64(fma(z, fma(z, Float64(z * fma(z, 3.13060547623, 11.1667541262)), a), b) / t_1), fma(y, Float64(t * Float64(Float64(z * z) / t_1)), x)); else tmp = Float64(fma(y, 3.13060547623, x) - Float64(-Float64(t * Float64(y / Float64(z * z))))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(z * N[(z * N[(z + 15.234687407), $MachinePrecision] + 31.4690115749), $MachinePrecision] + 11.9400905721), $MachinePrecision] + 0.607771387771), $MachinePrecision]}, If[LessEqual[N[(N[(y * N[(N[(z * N[(N[(z * N[(N[(z * N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(N[(z * N[(N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision] + 31.4690115749), $MachinePrecision]), $MachinePrecision] + 11.9400905721), $MachinePrecision]), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision], Infinity], N[(y * N[(N[(z * N[(z * N[(z * N[(z * 3.13060547623 + 11.1667541262), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision] + b), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(y * N[(t * N[(N[(z * z), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[(N[(y * 3.13060547623 + x), $MachinePrecision] - (-N[(t * N[(y / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)\\
\mathbf{if}\;\frac{y \cdot \left(z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right) + b\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771} \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, z \cdot \mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right), a\right), b\right)}{t\_1}, \mathsf{fma}\left(y, t \cdot \frac{z \cdot z}{t\_1}, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right) - \left(-t \cdot \frac{y}{z \cdot z}\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < +inf.0Initial program 89.6%
Taylor expanded in t around 0
Applied rewrites96.7%
if +inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) Initial program 0.0%
Taylor expanded in z around -inf
Applied rewrites89.5%
Taylor expanded in t around inf
Applied rewrites99.4%
Final simplification97.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (fma y 3.13060547623 x) (- (* t (/ y (* z z)))))))
(if (<= z -2.1e+50)
t_1
(if (<= z 1.45e+40)
(fma
(fma z (fma z (fma z (fma z 3.13060547623 11.1667541262) t) a) b)
(/
y
(fma
z
(fma z (fma z (+ z 15.234687407) 31.4690115749) 11.9400905721)
0.607771387771))
x)
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(y, 3.13060547623, x) - -(t * (y / (z * z)));
double tmp;
if (z <= -2.1e+50) {
tmp = t_1;
} else if (z <= 1.45e+40) {
tmp = fma(fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b), (y / fma(z, fma(z, fma(z, (z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(fma(y, 3.13060547623, x) - Float64(-Float64(t * Float64(y / Float64(z * z))))) tmp = 0.0 if (z <= -2.1e+50) tmp = t_1; elseif (z <= 1.45e+40) tmp = fma(fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b), Float64(y / fma(z, fma(z, fma(z, Float64(z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * 3.13060547623 + x), $MachinePrecision] - (-N[(t * N[(y / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]}, If[LessEqual[z, -2.1e+50], t$95$1, If[LessEqual[z, 1.45e+40], N[(N[(z * N[(z * N[(z * N[(z * 3.13060547623 + 11.1667541262), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + b), $MachinePrecision] * N[(y / N[(z * N[(z * N[(z * N[(z + 15.234687407), $MachinePrecision] + 31.4690115749), $MachinePrecision] + 11.9400905721), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, 3.13060547623, x\right) - \left(-t \cdot \frac{y}{z \cdot z}\right)\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{+50}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{+40}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right), t\right), a\right), b\right), \frac{y}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.1e50 or 1.45000000000000009e40 < z Initial program 4.8%
Taylor expanded in z around -inf
Applied rewrites88.5%
Taylor expanded in t around inf
Applied rewrites98.6%
if -2.1e50 < z < 1.45000000000000009e40Initial program 96.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites98.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (fma y 3.13060547623 x) (- (* t (/ y (* z z)))))))
(if (<= z -0.06)
t_1
(if (<= z 7.8)
(fma
(fma
z
(fma z 549.8376187179895 -32.324150453290734)
1.6453555072203998)
(* y (fma z (fma z (fma z (fma z 3.13060547623 11.1667541262) t) a) b))
x)
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(y, 3.13060547623, x) - -(t * (y / (z * z)));
double tmp;
if (z <= -0.06) {
tmp = t_1;
} else if (z <= 7.8) {
tmp = fma(fma(z, fma(z, 549.8376187179895, -32.324150453290734), 1.6453555072203998), (y * fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b)), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(fma(y, 3.13060547623, x) - Float64(-Float64(t * Float64(y / Float64(z * z))))) tmp = 0.0 if (z <= -0.06) tmp = t_1; elseif (z <= 7.8) tmp = fma(fma(z, fma(z, 549.8376187179895, -32.324150453290734), 1.6453555072203998), Float64(y * fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b)), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * 3.13060547623 + x), $MachinePrecision] - (-N[(t * N[(y / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]}, If[LessEqual[z, -0.06], t$95$1, If[LessEqual[z, 7.8], N[(N[(z * N[(z * 549.8376187179895 + -32.324150453290734), $MachinePrecision] + 1.6453555072203998), $MachinePrecision] * N[(y * N[(z * N[(z * N[(z * N[(z * 3.13060547623 + 11.1667541262), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, 3.13060547623, x\right) - \left(-t \cdot \frac{y}{z \cdot z}\right)\\
\mathbf{if}\;z \leq -0.06:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7.8:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, \mathsf{fma}\left(z, 549.8376187179895, -32.324150453290734\right), 1.6453555072203998\right), y \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right), t\right), a\right), b\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -0.059999999999999998 or 7.79999999999999982 < z Initial program 16.3%
Taylor expanded in z around -inf
Applied rewrites86.9%
Taylor expanded in t around inf
Applied rewrites95.2%
if -0.059999999999999998 < z < 7.79999999999999982Initial program 99.6%
Applied rewrites99.7%
Taylor expanded in z around 0
+-commutativeN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f6499.3
Applied rewrites99.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (fma y 3.13060547623 x) (- (* t (/ y (* z z)))))))
(if (<= z -0.06)
t_1
(if (<= z 0.05)
(fma
(fma z -32.324150453290734 1.6453555072203998)
(* y (fma z (fma z (fma z (fma z 3.13060547623 11.1667541262) t) a) b))
x)
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(y, 3.13060547623, x) - -(t * (y / (z * z)));
double tmp;
if (z <= -0.06) {
tmp = t_1;
} else if (z <= 0.05) {
tmp = fma(fma(z, -32.324150453290734, 1.6453555072203998), (y * fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b)), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(fma(y, 3.13060547623, x) - Float64(-Float64(t * Float64(y / Float64(z * z))))) tmp = 0.0 if (z <= -0.06) tmp = t_1; elseif (z <= 0.05) tmp = fma(fma(z, -32.324150453290734, 1.6453555072203998), Float64(y * fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b)), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * 3.13060547623 + x), $MachinePrecision] - (-N[(t * N[(y / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]}, If[LessEqual[z, -0.06], t$95$1, If[LessEqual[z, 0.05], N[(N[(z * -32.324150453290734 + 1.6453555072203998), $MachinePrecision] * N[(y * N[(z * N[(z * N[(z * N[(z * 3.13060547623 + 11.1667541262), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, 3.13060547623, x\right) - \left(-t \cdot \frac{y}{z \cdot z}\right)\\
\mathbf{if}\;z \leq -0.06:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.05:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, -32.324150453290734, 1.6453555072203998\right), y \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right), t\right), a\right), b\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -0.059999999999999998 or 0.050000000000000003 < z Initial program 16.3%
Taylor expanded in z around -inf
Applied rewrites86.9%
Taylor expanded in t around inf
Applied rewrites95.2%
if -0.059999999999999998 < z < 0.050000000000000003Initial program 99.6%
Applied rewrites99.7%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f6499.1
Applied rewrites99.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (fma y 3.13060547623 x) (- (* t (/ y (* z z)))))))
(if (<= z -0.06)
t_1
(if (<= z 7.8)
(fma
1.6453555072203998
(* y (fma z (fma z (fma z (fma z 3.13060547623 11.1667541262) t) a) b))
x)
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(y, 3.13060547623, x) - -(t * (y / (z * z)));
double tmp;
if (z <= -0.06) {
tmp = t_1;
} else if (z <= 7.8) {
tmp = fma(1.6453555072203998, (y * fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b)), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(fma(y, 3.13060547623, x) - Float64(-Float64(t * Float64(y / Float64(z * z))))) tmp = 0.0 if (z <= -0.06) tmp = t_1; elseif (z <= 7.8) tmp = fma(1.6453555072203998, Float64(y * fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b)), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * 3.13060547623 + x), $MachinePrecision] - (-N[(t * N[(y / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]}, If[LessEqual[z, -0.06], t$95$1, If[LessEqual[z, 7.8], N[(1.6453555072203998 * N[(y * N[(z * N[(z * N[(z * N[(z * 3.13060547623 + 11.1667541262), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, 3.13060547623, x\right) - \left(-t \cdot \frac{y}{z \cdot z}\right)\\
\mathbf{if}\;z \leq -0.06:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7.8:\\
\;\;\;\;\mathsf{fma}\left(1.6453555072203998, y \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right), t\right), a\right), b\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -0.059999999999999998 or 7.79999999999999982 < z Initial program 16.3%
Taylor expanded in z around -inf
Applied rewrites86.9%
Taylor expanded in t around inf
Applied rewrites95.2%
if -0.059999999999999998 < z < 7.79999999999999982Initial program 99.6%
Applied rewrites99.7%
Taylor expanded in z around 0
Applied rewrites97.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (fma y 3.13060547623 x) (- (* t (/ y (* z z)))))))
(if (<= z -1.45e+29)
t_1
(if (<= z 0.044)
(fma
y
(fma
z
(fma b -32.324150453290734 (* a 1.6453555072203998))
(* b 1.6453555072203998))
x)
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(y, 3.13060547623, x) - -(t * (y / (z * z)));
double tmp;
if (z <= -1.45e+29) {
tmp = t_1;
} else if (z <= 0.044) {
tmp = fma(y, fma(z, fma(b, -32.324150453290734, (a * 1.6453555072203998)), (b * 1.6453555072203998)), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(fma(y, 3.13060547623, x) - Float64(-Float64(t * Float64(y / Float64(z * z))))) tmp = 0.0 if (z <= -1.45e+29) tmp = t_1; elseif (z <= 0.044) tmp = fma(y, fma(z, fma(b, -32.324150453290734, Float64(a * 1.6453555072203998)), Float64(b * 1.6453555072203998)), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * 3.13060547623 + x), $MachinePrecision] - (-N[(t * N[(y / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]}, If[LessEqual[z, -1.45e+29], t$95$1, If[LessEqual[z, 0.044], N[(y * N[(z * N[(b * -32.324150453290734 + N[(a * 1.6453555072203998), $MachinePrecision]), $MachinePrecision] + N[(b * 1.6453555072203998), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, 3.13060547623, x\right) - \left(-t \cdot \frac{y}{z \cdot z}\right)\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{+29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.044:\\
\;\;\;\;\mathsf{fma}\left(y, \mathsf{fma}\left(z, \mathsf{fma}\left(b, -32.324150453290734, a \cdot 1.6453555072203998\right), b \cdot 1.6453555072203998\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.45e29 or 0.043999999999999997 < z Initial program 13.7%
Taylor expanded in z around -inf
Applied rewrites87.1%
Taylor expanded in t around inf
Applied rewrites96.3%
if -1.45e29 < z < 0.043999999999999997Initial program 99.6%
Applied rewrites99.7%
Taylor expanded in z around 0
+-commutativeN/A
associate-*r*N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
lower-fma.f64N/A
Applied rewrites89.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.45e+29)
(fma y 3.13060547623 x)
(if (<= z 3000.0)
(fma
y
(fma
z
(fma b -32.324150453290734 (* a 1.6453555072203998))
(* b 1.6453555072203998))
x)
(fma y (+ 3.13060547623 (/ -36.52704169880642 z)) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.45e+29) {
tmp = fma(y, 3.13060547623, x);
} else if (z <= 3000.0) {
tmp = fma(y, fma(z, fma(b, -32.324150453290734, (a * 1.6453555072203998)), (b * 1.6453555072203998)), x);
} else {
tmp = fma(y, (3.13060547623 + (-36.52704169880642 / z)), x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.45e+29) tmp = fma(y, 3.13060547623, x); elseif (z <= 3000.0) tmp = fma(y, fma(z, fma(b, -32.324150453290734, Float64(a * 1.6453555072203998)), Float64(b * 1.6453555072203998)), x); else tmp = fma(y, Float64(3.13060547623 + Float64(-36.52704169880642 / z)), x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.45e+29], N[(y * 3.13060547623 + x), $MachinePrecision], If[LessEqual[z, 3000.0], N[(y * N[(z * N[(b * -32.324150453290734 + N[(a * 1.6453555072203998), $MachinePrecision]), $MachinePrecision] + N[(b * 1.6453555072203998), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(y * N[(3.13060547623 + N[(-36.52704169880642 / z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+29}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
\mathbf{elif}\;z \leq 3000:\\
\;\;\;\;\mathsf{fma}\left(y, \mathsf{fma}\left(z, \mathsf{fma}\left(b, -32.324150453290734, a \cdot 1.6453555072203998\right), b \cdot 1.6453555072203998\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623 + \frac{-36.52704169880642}{z}, x\right)\\
\end{array}
\end{array}
if z < -1.45e29Initial program 9.7%
Taylor expanded in z around inf
+-commutativeN/A
*-commutativeN/A
lower-fma.f6495.4
Applied rewrites95.4%
if -1.45e29 < z < 3e3Initial program 99.6%
Applied rewrites99.7%
Taylor expanded in z around 0
+-commutativeN/A
associate-*r*N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
lower-fma.f64N/A
Applied rewrites89.9%
if 3e3 < z Initial program 16.4%
Applied rewrites16.4%
Taylor expanded in z around 0
Applied rewrites17.4%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites22.3%
Taylor expanded in z around inf
Applied rewrites85.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -2.65e+29)
(fma y 3.13060547623 x)
(if (<= z 4.4e-18)
(+ x (* b (fma y 1.6453555072203998 (* y (* z -32.324150453290734)))))
(fma y (+ 3.13060547623 (/ -36.52704169880642 z)) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.65e+29) {
tmp = fma(y, 3.13060547623, x);
} else if (z <= 4.4e-18) {
tmp = x + (b * fma(y, 1.6453555072203998, (y * (z * -32.324150453290734))));
} else {
tmp = fma(y, (3.13060547623 + (-36.52704169880642 / z)), x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.65e+29) tmp = fma(y, 3.13060547623, x); elseif (z <= 4.4e-18) tmp = Float64(x + Float64(b * fma(y, 1.6453555072203998, Float64(y * Float64(z * -32.324150453290734))))); else tmp = fma(y, Float64(3.13060547623 + Float64(-36.52704169880642 / z)), x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.65e+29], N[(y * 3.13060547623 + x), $MachinePrecision], If[LessEqual[z, 4.4e-18], N[(x + N[(b * N[(y * 1.6453555072203998 + N[(y * N[(z * -32.324150453290734), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(3.13060547623 + N[(-36.52704169880642 / z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.65 \cdot 10^{+29}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-18}:\\
\;\;\;\;x + b \cdot \mathsf{fma}\left(y, 1.6453555072203998, y \cdot \left(z \cdot -32.324150453290734\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623 + \frac{-36.52704169880642}{z}, x\right)\\
\end{array}
\end{array}
if z < -2.65e29Initial program 9.7%
Taylor expanded in z around inf
+-commutativeN/A
*-commutativeN/A
lower-fma.f6495.4
Applied rewrites95.4%
if -2.65e29 < z < 4.3999999999999997e-18Initial program 99.6%
Taylor expanded in b around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-+.f6483.6
Applied rewrites83.6%
Taylor expanded in z around 0
Applied rewrites83.0%
if 4.3999999999999997e-18 < z Initial program 24.6%
Applied rewrites24.6%
Taylor expanded in z around 0
Applied rewrites24.7%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites27.1%
Taylor expanded in z around inf
Applied rewrites81.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.45e+29)
(fma y 3.13060547623 x)
(if (<= z 4.4e-18)
(fma y (fma 1.6453555072203998 b (* b (* z -32.324150453290734))) x)
(fma y (+ 3.13060547623 (/ -36.52704169880642 z)) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.45e+29) {
tmp = fma(y, 3.13060547623, x);
} else if (z <= 4.4e-18) {
tmp = fma(y, fma(1.6453555072203998, b, (b * (z * -32.324150453290734))), x);
} else {
tmp = fma(y, (3.13060547623 + (-36.52704169880642 / z)), x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.45e+29) tmp = fma(y, 3.13060547623, x); elseif (z <= 4.4e-18) tmp = fma(y, fma(1.6453555072203998, b, Float64(b * Float64(z * -32.324150453290734))), x); else tmp = fma(y, Float64(3.13060547623 + Float64(-36.52704169880642 / z)), x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.45e+29], N[(y * 3.13060547623 + x), $MachinePrecision], If[LessEqual[z, 4.4e-18], N[(y * N[(1.6453555072203998 * b + N[(b * N[(z * -32.324150453290734), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(y * N[(3.13060547623 + N[(-36.52704169880642 / z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+29}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-18}:\\
\;\;\;\;\mathsf{fma}\left(y, \mathsf{fma}\left(1.6453555072203998, b, b \cdot \left(z \cdot -32.324150453290734\right)\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623 + \frac{-36.52704169880642}{z}, x\right)\\
\end{array}
\end{array}
if z < -1.45e29Initial program 9.7%
Taylor expanded in z around inf
+-commutativeN/A
*-commutativeN/A
lower-fma.f6495.4
Applied rewrites95.4%
if -1.45e29 < z < 4.3999999999999997e-18Initial program 99.6%
Applied rewrites99.7%
Taylor expanded in z around 0
Applied rewrites97.3%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites90.8%
Taylor expanded in z around 0
Applied rewrites82.9%
if 4.3999999999999997e-18 < z Initial program 24.6%
Applied rewrites24.6%
Taylor expanded in z around 0
Applied rewrites24.7%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites27.1%
Taylor expanded in z around inf
Applied rewrites81.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.45e+29)
(fma y 3.13060547623 x)
(if (<= z 44.0)
(fma (* y 1.6453555072203998) b x)
(fma y (+ 3.13060547623 (/ -36.52704169880642 z)) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.45e+29) {
tmp = fma(y, 3.13060547623, x);
} else if (z <= 44.0) {
tmp = fma((y * 1.6453555072203998), b, x);
} else {
tmp = fma(y, (3.13060547623 + (-36.52704169880642 / z)), x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.45e+29) tmp = fma(y, 3.13060547623, x); elseif (z <= 44.0) tmp = fma(Float64(y * 1.6453555072203998), b, x); else tmp = fma(y, Float64(3.13060547623 + Float64(-36.52704169880642 / z)), x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.45e+29], N[(y * 3.13060547623 + x), $MachinePrecision], If[LessEqual[z, 44.0], N[(N[(y * 1.6453555072203998), $MachinePrecision] * b + x), $MachinePrecision], N[(y * N[(3.13060547623 + N[(-36.52704169880642 / z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+29}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
\mathbf{elif}\;z \leq 44:\\
\;\;\;\;\mathsf{fma}\left(y \cdot 1.6453555072203998, b, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623 + \frac{-36.52704169880642}{z}, x\right)\\
\end{array}
\end{array}
if z < -1.45e29Initial program 9.7%
Taylor expanded in z around inf
+-commutativeN/A
*-commutativeN/A
lower-fma.f6495.4
Applied rewrites95.4%
if -1.45e29 < z < 44Initial program 99.6%
Applied rewrites99.7%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6480.6
Applied rewrites80.6%
Applied rewrites80.7%
if 44 < z Initial program 16.4%
Applied rewrites16.4%
Taylor expanded in z around 0
Applied rewrites17.4%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites22.3%
Taylor expanded in z around inf
Applied rewrites85.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.45e+29)
(fma y 3.13060547623 x)
(if (<= z 44.0)
(fma (* y 1.6453555072203998) b x)
(fma y 3.13060547623 x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.45e+29) {
tmp = fma(y, 3.13060547623, x);
} else if (z <= 44.0) {
tmp = fma((y * 1.6453555072203998), b, x);
} else {
tmp = fma(y, 3.13060547623, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.45e+29) tmp = fma(y, 3.13060547623, x); elseif (z <= 44.0) tmp = fma(Float64(y * 1.6453555072203998), b, x); else tmp = fma(y, 3.13060547623, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.45e+29], N[(y * 3.13060547623 + x), $MachinePrecision], If[LessEqual[z, 44.0], N[(N[(y * 1.6453555072203998), $MachinePrecision] * b + x), $MachinePrecision], N[(y * 3.13060547623 + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+29}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
\mathbf{elif}\;z \leq 44:\\
\;\;\;\;\mathsf{fma}\left(y \cdot 1.6453555072203998, b, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
\end{array}
\end{array}
if z < -1.45e29 or 44 < z Initial program 13.1%
Taylor expanded in z around inf
+-commutativeN/A
*-commutativeN/A
lower-fma.f6489.9
Applied rewrites89.9%
if -1.45e29 < z < 44Initial program 99.6%
Applied rewrites99.7%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6480.6
Applied rewrites80.6%
Applied rewrites80.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.45e+29)
(fma y 3.13060547623 x)
(if (<= z 44.0)
(fma y (* b 1.6453555072203998) x)
(fma y 3.13060547623 x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.45e+29) {
tmp = fma(y, 3.13060547623, x);
} else if (z <= 44.0) {
tmp = fma(y, (b * 1.6453555072203998), x);
} else {
tmp = fma(y, 3.13060547623, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.45e+29) tmp = fma(y, 3.13060547623, x); elseif (z <= 44.0) tmp = fma(y, Float64(b * 1.6453555072203998), x); else tmp = fma(y, 3.13060547623, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.45e+29], N[(y * 3.13060547623 + x), $MachinePrecision], If[LessEqual[z, 44.0], N[(y * N[(b * 1.6453555072203998), $MachinePrecision] + x), $MachinePrecision], N[(y * 3.13060547623 + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+29}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
\mathbf{elif}\;z \leq 44:\\
\;\;\;\;\mathsf{fma}\left(y, b \cdot 1.6453555072203998, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
\end{array}
\end{array}
if z < -1.45e29 or 44 < z Initial program 13.1%
Taylor expanded in z around inf
+-commutativeN/A
*-commutativeN/A
lower-fma.f6489.9
Applied rewrites89.9%
if -1.45e29 < z < 44Initial program 99.6%
Taylor expanded in z around 0
+-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6480.6
Applied rewrites80.6%
(FPCore (x y z t a b) :precision binary64 (fma y 3.13060547623 x))
double code(double x, double y, double z, double t, double a, double b) {
return fma(y, 3.13060547623, x);
}
function code(x, y, z, t, a, b) return fma(y, 3.13060547623, x) end
code[x_, y_, z_, t_, a_, b_] := N[(y * 3.13060547623 + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, 3.13060547623, x\right)
\end{array}
Initial program 56.4%
Taylor expanded in z around inf
+-commutativeN/A
*-commutativeN/A
lower-fma.f6466.0
Applied rewrites66.0%
(FPCore (x y z t a b) :precision binary64 (* y 3.13060547623))
double code(double x, double y, double z, double t, double a, double b) {
return y * 3.13060547623;
}
real(8) function code(x, y, z, t, a, b)
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
code = y * 3.13060547623d0
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return y * 3.13060547623;
}
def code(x, y, z, t, a, b): return y * 3.13060547623
function code(x, y, z, t, a, b) return Float64(y * 3.13060547623) end
function tmp = code(x, y, z, t, a, b) tmp = y * 3.13060547623; end
code[x_, y_, z_, t_, a_, b_] := N[(y * 3.13060547623), $MachinePrecision]
\begin{array}{l}
\\
y \cdot 3.13060547623
\end{array}
Initial program 56.4%
Taylor expanded in z around inf
+-commutativeN/A
*-commutativeN/A
lower-fma.f6466.0
Applied rewrites66.0%
Taylor expanded in y around inf
Applied rewrites20.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+
x
(*
(+ (- 3.13060547623 (/ 36.527041698806414 z)) (/ t (* z z)))
(/ y 1.0)))))
(if (< z -6.499344996252632e+53)
t_1
(if (< z 7.066965436914287e+59)
(+
x
(/
y
(/
(+
(*
(+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721)
z)
0.607771387771)
(+
(* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
b))))
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (((3.13060547623 - (36.527041698806414 / z)) + (t / (z * z))) * (y / 1.0));
double tmp;
if (z < -6.499344996252632e+53) {
tmp = t_1;
} else if (z < 7.066965436914287e+59) {
tmp = x + (y / ((((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) / ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = x + (((3.13060547623d0 - (36.527041698806414d0 / z)) + (t / (z * z))) * (y / 1.0d0))
if (z < (-6.499344996252632d+53)) then
tmp = t_1
else if (z < 7.066965436914287d+59) then
tmp = x + (y / ((((((((z + 15.234687407d0) * z) + 31.4690115749d0) * z) + 11.9400905721d0) * z) + 0.607771387771d0) / ((((((((z * 3.13060547623d0) + 11.1667541262d0) * z) + t) * z) + a) * z) + b)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (((3.13060547623 - (36.527041698806414 / z)) + (t / (z * z))) * (y / 1.0));
double tmp;
if (z < -6.499344996252632e+53) {
tmp = t_1;
} else if (z < 7.066965436914287e+59) {
tmp = x + (y / ((((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) / ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (((3.13060547623 - (36.527041698806414 / z)) + (t / (z * z))) * (y / 1.0)) tmp = 0 if z < -6.499344996252632e+53: tmp = t_1 elif z < 7.066965436914287e+59: tmp = x + (y / ((((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) / ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(Float64(3.13060547623 - Float64(36.527041698806414 / z)) + Float64(t / Float64(z * z))) * Float64(y / 1.0))) tmp = 0.0 if (z < -6.499344996252632e+53) tmp = t_1; elseif (z < 7.066965436914287e+59) tmp = Float64(x + Float64(y / Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (((3.13060547623 - (36.527041698806414 / z)) + (t / (z * z))) * (y / 1.0)); tmp = 0.0; if (z < -6.499344996252632e+53) tmp = t_1; elseif (z < 7.066965436914287e+59) tmp = x + (y / ((((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) / ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(N[(3.13060547623 - N[(36.527041698806414 / z), $MachinePrecision]), $MachinePrecision] + N[(t / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -6.499344996252632e+53], t$95$1, If[Less[z, 7.066965436914287e+59], N[(x + N[(y / N[(N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\left(3.13060547623 - \frac{36.527041698806414}{z}\right) + \frac{t}{z \cdot z}\right) \cdot \frac{y}{1}\\
\mathbf{if}\;z < -6.499344996252632 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 7.066965436914287 \cdot 10^{+59}:\\
\;\;\;\;x + \frac{y}{\frac{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}{\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024222
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, D"
:precision binary64
:alt
(! :herbie-platform default (if (< z -649934499625263200000000000000000000000000000000000000) (+ x (* (+ (- 313060547623/100000000000 (/ 18263520849403207/500000000000000 z)) (/ t (* z z))) (/ y 1))) (if (< z 706696543691428700000000000000000000000000000000000000000000) (+ x (/ y (/ (+ (* (+ (* (+ (* (+ z 15234687407/1000000000) z) 314690115749/10000000000) z) 119400905721/10000000000) z) 607771387771/1000000000000) (+ (* (+ (* (+ (* (+ (* z 313060547623/100000000000) 55833770631/5000000000) z) t) z) a) z) b)))) (+ x (* (+ (- 313060547623/100000000000 (/ 18263520849403207/500000000000000 z)) (/ t (* z z))) (/ y 1))))))
(+ x (/ (* y (+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b)) (+ (* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z) 0.607771387771))))