
(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 17 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
(if (<= z -7.5e+26)
(+
(-
(fma (/ t z) (/ y z) (fma (/ y z) 11.1667541262 (* 3.13060547623 y)))
(fma
(/ y z)
(/ -556.47806218377 z)
(fma (/ (/ y z) z) 98.5170599679272 (* 47.69379582500642 (/ y z)))))
x)
(if (<= z 1.3e+56)
(+
(/
(/
y
(/
1.0
(fma (fma (fma (fma 3.13060547623 z 11.1667541262) z t) z a) z b)))
(+
(*
(+ (* (+ (* (+ 15.234687407 z) z) 31.4690115749) z) 11.9400905721)
z)
0.607771387771))
x)
(fma 3.13060547623 y x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -7.5e+26) {
tmp = (fma((t / z), (y / z), fma((y / z), 11.1667541262, (3.13060547623 * y))) - fma((y / z), (-556.47806218377 / z), fma(((y / z) / z), 98.5170599679272, (47.69379582500642 * (y / z))))) + x;
} else if (z <= 1.3e+56) {
tmp = ((y / (1.0 / fma(fma(fma(fma(3.13060547623, z, 11.1667541262), z, t), z, a), z, b))) / (((((((15.234687407 + z) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)) + x;
} else {
tmp = fma(3.13060547623, y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -7.5e+26) tmp = Float64(Float64(fma(Float64(t / z), Float64(y / z), fma(Float64(y / z), 11.1667541262, Float64(3.13060547623 * y))) - fma(Float64(y / z), Float64(-556.47806218377 / z), fma(Float64(Float64(y / z) / z), 98.5170599679272, Float64(47.69379582500642 * Float64(y / z))))) + x); elseif (z <= 1.3e+56) tmp = Float64(Float64(Float64(y / Float64(1.0 / fma(fma(fma(fma(3.13060547623, z, 11.1667541262), z, t), z, a), z, b))) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(15.234687407 + z) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)) + x); else tmp = fma(3.13060547623, y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -7.5e+26], N[(N[(N[(N[(t / z), $MachinePrecision] * N[(y / z), $MachinePrecision] + N[(N[(y / z), $MachinePrecision] * 11.1667541262 + N[(3.13060547623 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y / z), $MachinePrecision] * N[(-556.47806218377 / z), $MachinePrecision] + N[(N[(N[(y / z), $MachinePrecision] / z), $MachinePrecision] * 98.5170599679272 + N[(47.69379582500642 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 1.3e+56], N[(N[(N[(y / N[(1.0 / N[(N[(N[(N[(3.13060547623 * z + 11.1667541262), $MachinePrecision] * z + t), $MachinePrecision] * z + a), $MachinePrecision] * z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(15.234687407 + z), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(3.13060547623 * y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+26}:\\
\;\;\;\;\left(\mathsf{fma}\left(\frac{t}{z}, \frac{y}{z}, \mathsf{fma}\left(\frac{y}{z}, 11.1667541262, 3.13060547623 \cdot y\right)\right) - \mathsf{fma}\left(\frac{y}{z}, \frac{-556.47806218377}{z}, \mathsf{fma}\left(\frac{\frac{y}{z}}{z}, 98.5170599679272, 47.69379582500642 \cdot \frac{y}{z}\right)\right)\right) + x\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+56}:\\
\;\;\;\;\frac{\frac{y}{\frac{1}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(3.13060547623, z, 11.1667541262\right), z, t\right), z, a\right), z, b\right)}}}{\left(\left(\left(15.234687407 + z\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\end{array}
\end{array}
if z < -7.49999999999999941e26Initial program 6.5%
Taylor expanded in z around inf
Applied rewrites98.1%
if -7.49999999999999941e26 < z < 1.30000000000000005e56Initial program 97.8%
lift-*.f64N/A
lift-+.f64N/A
flip-+N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
Applied rewrites97.8%
if 1.30000000000000005e56 < z Initial program 2.3%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6497.6
Applied rewrites97.6%
Final simplification97.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(/
(*
(+
(* (+ (* (+ (* (+ (* 3.13060547623 z) 11.1667541262) z) t) z) a) z)
b)
y)
(+
(*
(+ (* (+ (* (+ 15.234687407 z) z) 31.4690115749) z) 11.9400905721)
z)
0.607771387771))))
(if (<= t_1 -5e+52)
(* 1.6453555072203998 (* b y))
(if (<= t_1 2e+89)
(* 1.0 x)
(if (<= t_1 INFINITY)
(* (* 1.6453555072203998 b) y)
(fma 3.13060547623 y x))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (((((((((3.13060547623 * z) + 11.1667541262) * z) + t) * z) + a) * z) + b) * y) / (((((((15.234687407 + z) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771);
double tmp;
if (t_1 <= -5e+52) {
tmp = 1.6453555072203998 * (b * y);
} else if (t_1 <= 2e+89) {
tmp = 1.0 * x;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (1.6453555072203998 * b) * y;
} else {
tmp = fma(3.13060547623, y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(3.13060547623 * z) + 11.1667541262) * z) + t) * z) + a) * z) + b) * y) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(15.234687407 + z) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)) tmp = 0.0 if (t_1 <= -5e+52) tmp = Float64(1.6453555072203998 * Float64(b * y)); elseif (t_1 <= 2e+89) tmp = Float64(1.0 * x); elseif (t_1 <= Inf) tmp = Float64(Float64(1.6453555072203998 * b) * y); else tmp = fma(3.13060547623, y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(N[(N[(N[(N[(3.13060547623 * z), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(15.234687407 + z), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+52], N[(1.6453555072203998 * N[(b * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+89], N[(1.0 * x), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(1.6453555072203998 * b), $MachinePrecision] * y), $MachinePrecision], N[(3.13060547623 * y + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(\left(\left(\left(3.13060547623 \cdot z + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right) \cdot y}{\left(\left(\left(15.234687407 + z\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+52}:\\
\;\;\;\;1.6453555072203998 \cdot \left(b \cdot y\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+89}:\\
\;\;\;\;1 \cdot x\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\left(1.6453555072203998 \cdot b\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, 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))) < -5e52Initial program 88.7%
Taylor expanded in b around inf
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f6457.3
Applied rewrites57.3%
Taylor expanded in b around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f6447.6
Applied rewrites47.6%
Taylor expanded in z around 0
Applied rewrites44.2%
if -5e52 < (/.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))) < 1.99999999999999999e89Initial program 99.7%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6463.3
Applied rewrites63.3%
Taylor expanded in x around inf
Applied rewrites63.3%
Taylor expanded in y around 0
Applied rewrites68.5%
if 1.99999999999999999e89 < (/.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 88.4%
Taylor expanded in b around inf
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f6473.6
Applied rewrites73.6%
Taylor expanded in b around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f6466.4
Applied rewrites66.4%
Taylor expanded in z around 0
Applied rewrites66.9%
Applied rewrites66.9%
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
+-commutativeN/A
lower-fma.f6497.6
Applied rewrites97.6%
Final simplification75.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* 1.6453555072203998 (* b y)))
(t_2
(/
(*
(+
(* (+ (* (+ (* (+ (* 3.13060547623 z) 11.1667541262) z) t) z) a) z)
b)
y)
(+
(*
(+ (* (+ (* (+ 15.234687407 z) z) 31.4690115749) z) 11.9400905721)
z)
0.607771387771))))
(if (<= t_2 -5e+52)
t_1
(if (<= t_2 2e+89)
(* 1.0 x)
(if (<= t_2 INFINITY) t_1 (fma 3.13060547623 y x))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.6453555072203998 * (b * y);
double t_2 = (((((((((3.13060547623 * z) + 11.1667541262) * z) + t) * z) + a) * z) + b) * y) / (((((((15.234687407 + z) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771);
double tmp;
if (t_2 <= -5e+52) {
tmp = t_1;
} else if (t_2 <= 2e+89) {
tmp = 1.0 * x;
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = fma(3.13060547623, y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(1.6453555072203998 * Float64(b * y)) t_2 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(3.13060547623 * z) + 11.1667541262) * z) + t) * z) + a) * z) + b) * y) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(15.234687407 + z) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)) tmp = 0.0 if (t_2 <= -5e+52) tmp = t_1; elseif (t_2 <= 2e+89) tmp = Float64(1.0 * x); elseif (t_2 <= Inf) tmp = t_1; else tmp = fma(3.13060547623, y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.6453555072203998 * N[(b * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(N[(N[(N[(N[(N[(3.13060547623 * z), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(15.234687407 + z), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+52], t$95$1, If[LessEqual[t$95$2, 2e+89], N[(1.0 * x), $MachinePrecision], If[LessEqual[t$95$2, Infinity], t$95$1, N[(3.13060547623 * y + x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1.6453555072203998 \cdot \left(b \cdot y\right)\\
t_2 := \frac{\left(\left(\left(\left(3.13060547623 \cdot z + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right) \cdot y}{\left(\left(\left(15.234687407 + z\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+89}:\\
\;\;\;\;1 \cdot x\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, 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))) < -5e52 or 1.99999999999999999e89 < (/.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 88.6%
Taylor expanded in b around inf
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f6462.8
Applied rewrites62.8%
Taylor expanded in b around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f6453.9
Applied rewrites53.9%
Taylor expanded in z around 0
Applied rewrites51.8%
if -5e52 < (/.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))) < 1.99999999999999999e89Initial program 99.7%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6463.3
Applied rewrites63.3%
Taylor expanded in x around inf
Applied rewrites63.3%
Taylor expanded in y around 0
Applied rewrites68.5%
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
+-commutativeN/A
lower-fma.f6497.6
Applied rewrites97.6%
Final simplification74.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(/
(*
(+
(* (+ (* (+ (* (+ (* 3.13060547623 z) 11.1667541262) z) t) z) a) z)
b)
y)
(+
(*
(+ (* (+ (* (+ 15.234687407 z) z) 31.4690115749) z) 11.9400905721)
z)
0.607771387771))))
(if (<= t_1 INFINITY) (+ t_1 x) (fma 3.13060547623 y x))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (((((((((3.13060547623 * z) + 11.1667541262) * z) + t) * z) + a) * z) + b) * y) / (((((((15.234687407 + z) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1 + x;
} else {
tmp = fma(3.13060547623, y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(3.13060547623 * z) + 11.1667541262) * z) + t) * z) + a) * z) + b) * y) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(15.234687407 + z) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)) tmp = 0.0 if (t_1 <= Inf) tmp = Float64(t_1 + x); else tmp = fma(3.13060547623, y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(N[(N[(N[(N[(3.13060547623 * z), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(15.234687407 + z), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], N[(t$95$1 + x), $MachinePrecision], N[(3.13060547623 * y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(\left(\left(\left(3.13060547623 \cdot z + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right) \cdot y}{\left(\left(\left(15.234687407 + z\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1 + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, 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))) < +inf.0Initial program 94.4%
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
+-commutativeN/A
lower-fma.f6497.6
Applied rewrites97.6%
Final simplification95.6%
(FPCore (x y z t a b)
:precision binary64
(if (<=
(/
(*
(+
(* (+ (* (+ (* (+ (* 3.13060547623 z) 11.1667541262) z) t) z) a) z)
b)
y)
(+
(*
(+ (* (+ (* (+ 15.234687407 z) z) 31.4690115749) z) 11.9400905721)
z)
0.607771387771))
INFINITY)
(fma
(* (/ y x) x)
(/
(fma (fma (fma (fma 3.13060547623 z 11.1667541262) z t) z a) z b)
(fma
(fma (fma (+ 15.234687407 z) z 31.4690115749) z 11.9400905721)
z
0.607771387771))
x)
(fma 3.13060547623 y x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((((((((((3.13060547623 * z) + 11.1667541262) * z) + t) * z) + a) * z) + b) * y) / (((((((15.234687407 + z) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)) <= ((double) INFINITY)) {
tmp = fma(((y / x) * x), (fma(fma(fma(fma(3.13060547623, z, 11.1667541262), z, t), z, a), z, b) / fma(fma(fma((15.234687407 + z), z, 31.4690115749), z, 11.9400905721), z, 0.607771387771)), x);
} else {
tmp = fma(3.13060547623, y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(3.13060547623 * z) + 11.1667541262) * z) + t) * z) + a) * z) + b) * y) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(15.234687407 + z) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)) <= Inf) tmp = fma(Float64(Float64(y / x) * x), Float64(fma(fma(fma(fma(3.13060547623, z, 11.1667541262), z, t), z, a), z, b) / fma(fma(fma(Float64(15.234687407 + z), z, 31.4690115749), z, 11.9400905721), z, 0.607771387771)), x); else tmp = fma(3.13060547623, y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(N[(N[(3.13060547623 * z), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(15.234687407 + z), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(y / x), $MachinePrecision] * x), $MachinePrecision] * N[(N[(N[(N[(N[(3.13060547623 * z + 11.1667541262), $MachinePrecision] * z + t), $MachinePrecision] * z + a), $MachinePrecision] * z + b), $MachinePrecision] / N[(N[(N[(N[(15.234687407 + z), $MachinePrecision] * z + 31.4690115749), $MachinePrecision] * z + 11.9400905721), $MachinePrecision] * z + 0.607771387771), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(3.13060547623 * y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(\left(\left(\left(3.13060547623 \cdot z + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right) \cdot y}{\left(\left(\left(15.234687407 + z\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{x} \cdot x, \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(3.13060547623, z, 11.1667541262\right), z, t\right), z, a\right), z, b\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(15.234687407 + z, z, 31.4690115749\right), z, 11.9400905721\right), z, 0.607771387771\right)}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, 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))) < +inf.0Initial program 94.4%
Taylor expanded in b around inf
lower-*.f6475.2
Applied rewrites75.2%
Taylor expanded in x around inf
+-commutativeN/A
distribute-lft-inN/A
times-fracN/A
associate-*r*N/A
*-rgt-identityN/A
lower-fma.f64N/A
Applied rewrites92.4%
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
+-commutativeN/A
lower-fma.f6497.6
Applied rewrites97.6%
Final simplification94.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+
(*
(+ (* (+ (* (+ 15.234687407 z) z) 31.4690115749) z) 11.9400905721)
z)
0.607771387771)))
(if (<=
(/
(*
(+
(* (+ (* (+ (* (+ (* 3.13060547623 z) 11.1667541262) z) t) z) a) z)
b)
y)
t_1)
INFINITY)
(+ (/ (* (fma (fma t z a) z b) y) t_1) x)
(fma 3.13060547623 y x))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((((((15.234687407 + z) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771;
double tmp;
if (((((((((((3.13060547623 * z) + 11.1667541262) * z) + t) * z) + a) * z) + b) * y) / t_1) <= ((double) INFINITY)) {
tmp = ((fma(fma(t, z, a), z, b) * y) / t_1) + x;
} else {
tmp = fma(3.13060547623, y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(15.234687407 + z) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(3.13060547623 * z) + 11.1667541262) * z) + t) * z) + a) * z) + b) * y) / t_1) <= Inf) tmp = Float64(Float64(Float64(fma(fma(t, z, a), z, b) * y) / t_1) + x); else tmp = fma(3.13060547623, y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(N[(15.234687407 + z), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(N[(N[(3.13060547623 * z), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] / t$95$1), $MachinePrecision], Infinity], N[(N[(N[(N[(N[(t * z + a), $MachinePrecision] * z + b), $MachinePrecision] * y), $MachinePrecision] / t$95$1), $MachinePrecision] + x), $MachinePrecision], N[(3.13060547623 * y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(\left(15.234687407 + z\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771\\
\mathbf{if}\;\frac{\left(\left(\left(\left(3.13060547623 \cdot z + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right) \cdot y}{t\_1} \leq \infty:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(t, z, a\right), z, b\right) \cdot y}{t\_1} + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, 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))) < +inf.0Initial program 94.4%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6490.6
Applied rewrites90.6%
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
+-commutativeN/A
lower-fma.f6497.6
Applied rewrites97.6%
Final simplification93.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -7.2e+26)
(-
(fma 3.13060547623 y x)
(/
(fma
(/ (fma t y (fma -98.5170599679272 y (* 556.47806218377 y))) z)
-1.0
(* 36.52704169880642 y))
z))
(if (<= z 1.02e+56)
(+
(/
(* (fma (fma t z a) z b) y)
(+
(*
(+ (* (+ (* (+ 15.234687407 z) z) 31.4690115749) z) 11.9400905721)
z)
0.607771387771))
x)
(fma 3.13060547623 y x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -7.2e+26) {
tmp = fma(3.13060547623, y, x) - (fma((fma(t, y, fma(-98.5170599679272, y, (556.47806218377 * y))) / z), -1.0, (36.52704169880642 * y)) / z);
} else if (z <= 1.02e+56) {
tmp = ((fma(fma(t, z, a), z, b) * y) / (((((((15.234687407 + z) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)) + x;
} else {
tmp = fma(3.13060547623, y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -7.2e+26) tmp = Float64(fma(3.13060547623, y, x) - Float64(fma(Float64(fma(t, y, fma(-98.5170599679272, y, Float64(556.47806218377 * y))) / z), -1.0, Float64(36.52704169880642 * y)) / z)); elseif (z <= 1.02e+56) tmp = Float64(Float64(Float64(fma(fma(t, z, a), z, b) * y) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(15.234687407 + z) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)) + x); else tmp = fma(3.13060547623, y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -7.2e+26], N[(N[(3.13060547623 * y + x), $MachinePrecision] - N[(N[(N[(N[(t * y + N[(-98.5170599679272 * y + N[(556.47806218377 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] * -1.0 + N[(36.52704169880642 * y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.02e+56], N[(N[(N[(N[(N[(t * z + a), $MachinePrecision] * z + b), $MachinePrecision] * y), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(15.234687407 + z), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(3.13060547623 * y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{+26}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right) - \frac{\mathsf{fma}\left(\frac{\mathsf{fma}\left(t, y, \mathsf{fma}\left(-98.5170599679272, y, 556.47806218377 \cdot y\right)\right)}{z}, -1, 36.52704169880642 \cdot y\right)}{z}\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{+56}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(t, z, a\right), z, b\right) \cdot y}{\left(\left(\left(15.234687407 + z\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\end{array}
\end{array}
if z < -7.20000000000000048e26Initial program 6.5%
Taylor expanded in z around -inf
Applied rewrites94.2%
if -7.20000000000000048e26 < z < 1.02e56Initial program 97.8%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6495.0
Applied rewrites95.0%
if 1.02e56 < z Initial program 2.3%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6497.6
Applied rewrites97.6%
Final simplification95.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -3.1e+27)
(fma 3.13060547623 y x)
(if (<= z 2.4e+28)
(+
(/
(fma (fma (* t z) y (* a y)) z (* b y))
(fma (fma 31.4690115749 z 11.9400905721) z 0.607771387771))
x)
(fma 3.13060547623 y x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.1e+27) {
tmp = fma(3.13060547623, y, x);
} else if (z <= 2.4e+28) {
tmp = (fma(fma((t * z), y, (a * y)), z, (b * y)) / fma(fma(31.4690115749, z, 11.9400905721), z, 0.607771387771)) + x;
} else {
tmp = fma(3.13060547623, y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.1e+27) tmp = fma(3.13060547623, y, x); elseif (z <= 2.4e+28) tmp = Float64(Float64(fma(fma(Float64(t * z), y, Float64(a * y)), z, Float64(b * y)) / fma(fma(31.4690115749, z, 11.9400905721), z, 0.607771387771)) + x); else tmp = fma(3.13060547623, y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.1e+27], N[(3.13060547623 * y + x), $MachinePrecision], If[LessEqual[z, 2.4e+28], N[(N[(N[(N[(N[(t * z), $MachinePrecision] * y + N[(a * y), $MachinePrecision]), $MachinePrecision] * z + N[(b * y), $MachinePrecision]), $MachinePrecision] / N[(N[(31.4690115749 * z + 11.9400905721), $MachinePrecision] * z + 0.607771387771), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(3.13060547623 * y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+27}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+28}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(t \cdot z, y, a \cdot y\right), z, b \cdot y\right)}{\mathsf{fma}\left(\mathsf{fma}\left(31.4690115749, z, 11.9400905721\right), z, 0.607771387771\right)} + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\end{array}
\end{array}
if z < -3.09999999999999996e27 or 2.39999999999999981e28 < z Initial program 9.0%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6492.7
Applied rewrites92.7%
if -3.09999999999999996e27 < z < 2.39999999999999981e28Initial program 97.7%
Taylor expanded in b around inf
lower-*.f6477.8
Applied rewrites77.8%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6476.1
Applied rewrites76.1%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6488.3
Applied rewrites88.3%
Final simplification90.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -3.1e+27)
(fma 3.13060547623 y x)
(if (<= z 4.4e-272)
(+
(fma
(* 1.6453555072203998 y)
b
(* (* (fma 1.6453555072203998 a (* -32.324150453290734 b)) y) z))
x)
(if (<= z 2.1e+78)
(+
(*
(/
b
(fma
(fma (fma (+ 15.234687407 z) z 31.4690115749) z 11.9400905721)
z
0.607771387771))
y)
x)
(fma 3.13060547623 y x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.1e+27) {
tmp = fma(3.13060547623, y, x);
} else if (z <= 4.4e-272) {
tmp = fma((1.6453555072203998 * y), b, ((fma(1.6453555072203998, a, (-32.324150453290734 * b)) * y) * z)) + x;
} else if (z <= 2.1e+78) {
tmp = ((b / fma(fma(fma((15.234687407 + z), z, 31.4690115749), z, 11.9400905721), z, 0.607771387771)) * y) + x;
} else {
tmp = fma(3.13060547623, y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.1e+27) tmp = fma(3.13060547623, y, x); elseif (z <= 4.4e-272) tmp = Float64(fma(Float64(1.6453555072203998 * y), b, Float64(Float64(fma(1.6453555072203998, a, Float64(-32.324150453290734 * b)) * y) * z)) + x); elseif (z <= 2.1e+78) tmp = Float64(Float64(Float64(b / fma(fma(fma(Float64(15.234687407 + z), z, 31.4690115749), z, 11.9400905721), z, 0.607771387771)) * y) + x); else tmp = fma(3.13060547623, y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.1e+27], N[(3.13060547623 * y + x), $MachinePrecision], If[LessEqual[z, 4.4e-272], N[(N[(N[(1.6453555072203998 * y), $MachinePrecision] * b + N[(N[(N[(1.6453555072203998 * a + N[(-32.324150453290734 * b), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 2.1e+78], N[(N[(N[(b / N[(N[(N[(N[(15.234687407 + z), $MachinePrecision] * z + 31.4690115749), $MachinePrecision] * z + 11.9400905721), $MachinePrecision] * z + 0.607771387771), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision] + x), $MachinePrecision], N[(3.13060547623 * y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+27}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-272}:\\
\;\;\;\;\mathsf{fma}\left(1.6453555072203998 \cdot y, b, \left(\mathsf{fma}\left(1.6453555072203998, a, -32.324150453290734 \cdot b\right) \cdot y\right) \cdot z\right) + x\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+78}:\\
\;\;\;\;\frac{b}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(15.234687407 + z, z, 31.4690115749\right), z, 11.9400905721\right), z, 0.607771387771\right)} \cdot y + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\end{array}
\end{array}
if z < -3.09999999999999996e27 or 2.1000000000000001e78 < z Initial program 4.0%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6496.1
Applied rewrites96.1%
if -3.09999999999999996e27 < z < 4.39999999999999976e-272Initial program 97.2%
Taylor expanded in z around 0
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
sub-negN/A
lower-fma.f64N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
metadata-eval88.6
Applied rewrites88.6%
if 4.39999999999999976e-272 < z < 2.1000000000000001e78Initial program 95.9%
Taylor expanded in b around inf
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f6472.5
Applied rewrites72.5%
Final simplification87.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -3.1e+27)
(fma 3.13060547623 y x)
(if (<= z 4.4e-272)
(+
(fma
(* 1.6453555072203998 y)
b
(* (* (fma 1.6453555072203998 a (* -32.324150453290734 b)) y) z))
x)
(if (<= z 2.4e+28)
(+
(* (/ b (fma (fma 31.4690115749 z 11.9400905721) z 0.607771387771)) y)
x)
(fma 3.13060547623 y x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.1e+27) {
tmp = fma(3.13060547623, y, x);
} else if (z <= 4.4e-272) {
tmp = fma((1.6453555072203998 * y), b, ((fma(1.6453555072203998, a, (-32.324150453290734 * b)) * y) * z)) + x;
} else if (z <= 2.4e+28) {
tmp = ((b / fma(fma(31.4690115749, z, 11.9400905721), z, 0.607771387771)) * y) + x;
} else {
tmp = fma(3.13060547623, y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.1e+27) tmp = fma(3.13060547623, y, x); elseif (z <= 4.4e-272) tmp = Float64(fma(Float64(1.6453555072203998 * y), b, Float64(Float64(fma(1.6453555072203998, a, Float64(-32.324150453290734 * b)) * y) * z)) + x); elseif (z <= 2.4e+28) tmp = Float64(Float64(Float64(b / fma(fma(31.4690115749, z, 11.9400905721), z, 0.607771387771)) * y) + x); else tmp = fma(3.13060547623, y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.1e+27], N[(3.13060547623 * y + x), $MachinePrecision], If[LessEqual[z, 4.4e-272], N[(N[(N[(1.6453555072203998 * y), $MachinePrecision] * b + N[(N[(N[(1.6453555072203998 * a + N[(-32.324150453290734 * b), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 2.4e+28], N[(N[(N[(b / N[(N[(31.4690115749 * z + 11.9400905721), $MachinePrecision] * z + 0.607771387771), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision] + x), $MachinePrecision], N[(3.13060547623 * y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+27}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-272}:\\
\;\;\;\;\mathsf{fma}\left(1.6453555072203998 \cdot y, b, \left(\mathsf{fma}\left(1.6453555072203998, a, -32.324150453290734 \cdot b\right) \cdot y\right) \cdot z\right) + x\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+28}:\\
\;\;\;\;\frac{b}{\mathsf{fma}\left(\mathsf{fma}\left(31.4690115749, z, 11.9400905721\right), z, 0.607771387771\right)} \cdot y + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\end{array}
\end{array}
if z < -3.09999999999999996e27 or 2.39999999999999981e28 < z Initial program 9.0%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6492.7
Applied rewrites92.7%
if -3.09999999999999996e27 < z < 4.39999999999999976e-272Initial program 97.2%
Taylor expanded in z around 0
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
sub-negN/A
lower-fma.f64N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
metadata-eval88.6
Applied rewrites88.6%
if 4.39999999999999976e-272 < z < 2.39999999999999981e28Initial program 98.3%
Taylor expanded in b around inf
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f6473.7
Applied rewrites73.7%
Taylor expanded in z around 0
Applied rewrites71.5%
Final simplification86.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -3.1e+27)
(fma 3.13060547623 y x)
(if (<= z 4.4e-272)
(fma
(* (fma 1.6453555072203998 a (* -32.324150453290734 b)) y)
z
(fma 1.6453555072203998 (* b y) x))
(if (<= z 2.4e+28)
(+
(* (/ b (fma (fma 31.4690115749 z 11.9400905721) z 0.607771387771)) y)
x)
(fma 3.13060547623 y x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.1e+27) {
tmp = fma(3.13060547623, y, x);
} else if (z <= 4.4e-272) {
tmp = fma((fma(1.6453555072203998, a, (-32.324150453290734 * b)) * y), z, fma(1.6453555072203998, (b * y), x));
} else if (z <= 2.4e+28) {
tmp = ((b / fma(fma(31.4690115749, z, 11.9400905721), z, 0.607771387771)) * y) + x;
} else {
tmp = fma(3.13060547623, y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.1e+27) tmp = fma(3.13060547623, y, x); elseif (z <= 4.4e-272) tmp = fma(Float64(fma(1.6453555072203998, a, Float64(-32.324150453290734 * b)) * y), z, fma(1.6453555072203998, Float64(b * y), x)); elseif (z <= 2.4e+28) tmp = Float64(Float64(Float64(b / fma(fma(31.4690115749, z, 11.9400905721), z, 0.607771387771)) * y) + x); else tmp = fma(3.13060547623, y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.1e+27], N[(3.13060547623 * y + x), $MachinePrecision], If[LessEqual[z, 4.4e-272], N[(N[(N[(1.6453555072203998 * a + N[(-32.324150453290734 * b), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision] * z + N[(1.6453555072203998 * N[(b * y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.4e+28], N[(N[(N[(b / N[(N[(31.4690115749 * z + 11.9400905721), $MachinePrecision] * z + 0.607771387771), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision] + x), $MachinePrecision], N[(3.13060547623 * y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+27}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-272}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(1.6453555072203998, a, -32.324150453290734 \cdot b\right) \cdot y, z, \mathsf{fma}\left(1.6453555072203998, b \cdot y, x\right)\right)\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+28}:\\
\;\;\;\;\frac{b}{\mathsf{fma}\left(\mathsf{fma}\left(31.4690115749, z, 11.9400905721\right), z, 0.607771387771\right)} \cdot y + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\end{array}
\end{array}
if z < -3.09999999999999996e27 or 2.39999999999999981e28 < z Initial program 9.0%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6492.7
Applied rewrites92.7%
if -3.09999999999999996e27 < z < 4.39999999999999976e-272Initial program 97.2%
Taylor expanded in z around 0
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
sub-negN/A
lower-fma.f64N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f6488.6
Applied rewrites88.6%
if 4.39999999999999976e-272 < z < 2.39999999999999981e28Initial program 98.3%
Taylor expanded in b around inf
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f6473.7
Applied rewrites73.7%
Taylor expanded in z around 0
Applied rewrites71.5%
Final simplification86.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1e+29)
(fma 3.13060547623 y x)
(if (<= z 2.4e+28)
(+
(/ (* b y) (fma (fma 31.4690115749 z 11.9400905721) z 0.607771387771))
x)
(fma 3.13060547623 y x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1e+29) {
tmp = fma(3.13060547623, y, x);
} else if (z <= 2.4e+28) {
tmp = ((b * y) / fma(fma(31.4690115749, z, 11.9400905721), z, 0.607771387771)) + x;
} else {
tmp = fma(3.13060547623, y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1e+29) tmp = fma(3.13060547623, y, x); elseif (z <= 2.4e+28) tmp = Float64(Float64(Float64(b * y) / fma(fma(31.4690115749, z, 11.9400905721), z, 0.607771387771)) + x); else tmp = fma(3.13060547623, y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1e+29], N[(3.13060547623 * y + x), $MachinePrecision], If[LessEqual[z, 2.4e+28], N[(N[(N[(b * y), $MachinePrecision] / N[(N[(31.4690115749 * z + 11.9400905721), $MachinePrecision] * z + 0.607771387771), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(3.13060547623 * y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+29}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+28}:\\
\;\;\;\;\frac{b \cdot y}{\mathsf{fma}\left(\mathsf{fma}\left(31.4690115749, z, 11.9400905721\right), z, 0.607771387771\right)} + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\end{array}
\end{array}
if z < -9.99999999999999914e28 or 2.39999999999999981e28 < z Initial program 9.0%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6492.7
Applied rewrites92.7%
if -9.99999999999999914e28 < z < 2.39999999999999981e28Initial program 97.7%
Taylor expanded in b around inf
lower-*.f6477.8
Applied rewrites77.8%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6476.1
Applied rewrites76.1%
Final simplification83.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1e+29)
(fma 3.13060547623 y x)
(if (<= z 2.4e+28)
(+
(* (/ b (fma (fma 31.4690115749 z 11.9400905721) z 0.607771387771)) y)
x)
(fma 3.13060547623 y x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1e+29) {
tmp = fma(3.13060547623, y, x);
} else if (z <= 2.4e+28) {
tmp = ((b / fma(fma(31.4690115749, z, 11.9400905721), z, 0.607771387771)) * y) + x;
} else {
tmp = fma(3.13060547623, y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1e+29) tmp = fma(3.13060547623, y, x); elseif (z <= 2.4e+28) tmp = Float64(Float64(Float64(b / fma(fma(31.4690115749, z, 11.9400905721), z, 0.607771387771)) * y) + x); else tmp = fma(3.13060547623, y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1e+29], N[(3.13060547623 * y + x), $MachinePrecision], If[LessEqual[z, 2.4e+28], N[(N[(N[(b / N[(N[(31.4690115749 * z + 11.9400905721), $MachinePrecision] * z + 0.607771387771), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision] + x), $MachinePrecision], N[(3.13060547623 * y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+29}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+28}:\\
\;\;\;\;\frac{b}{\mathsf{fma}\left(\mathsf{fma}\left(31.4690115749, z, 11.9400905721\right), z, 0.607771387771\right)} \cdot y + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\end{array}
\end{array}
if z < -9.99999999999999914e28 or 2.39999999999999981e28 < z Initial program 9.0%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6492.7
Applied rewrites92.7%
if -9.99999999999999914e28 < z < 2.39999999999999981e28Initial program 97.7%
Taylor expanded in b around inf
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f6477.8
Applied rewrites77.8%
Taylor expanded in z around 0
Applied rewrites76.0%
Final simplification83.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -3.1e+27)
(fma 3.13060547623 y x)
(if (<= z 9.8e+27)
(fma 1.6453555072203998 (* b y) x)
(fma 3.13060547623 y x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.1e+27) {
tmp = fma(3.13060547623, y, x);
} else if (z <= 9.8e+27) {
tmp = fma(1.6453555072203998, (b * y), x);
} else {
tmp = fma(3.13060547623, y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.1e+27) tmp = fma(3.13060547623, y, x); elseif (z <= 9.8e+27) tmp = fma(1.6453555072203998, Float64(b * y), x); else tmp = fma(3.13060547623, y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.1e+27], N[(3.13060547623 * y + x), $MachinePrecision], If[LessEqual[z, 9.8e+27], N[(1.6453555072203998 * N[(b * y), $MachinePrecision] + x), $MachinePrecision], N[(3.13060547623 * y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+27}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\mathbf{elif}\;z \leq 9.8 \cdot 10^{+27}:\\
\;\;\;\;\mathsf{fma}\left(1.6453555072203998, b \cdot y, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\end{array}
\end{array}
if z < -3.09999999999999996e27 or 9.8000000000000003e27 < z Initial program 9.0%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6492.7
Applied rewrites92.7%
if -3.09999999999999996e27 < z < 9.8000000000000003e27Initial program 97.7%
Taylor expanded in z around 0
+-commutativeN/A
lower-fma.f64N/A
lower-*.f6475.6
Applied rewrites75.6%
(FPCore (x y z t a b) :precision binary64 (if (<= x -2.3e-216) (* 1.0 x) (if (<= x 1.85e+27) (* 3.13060547623 y) (* 1.0 x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.3e-216) {
tmp = 1.0 * x;
} else if (x <= 1.85e+27) {
tmp = 3.13060547623 * y;
} else {
tmp = 1.0 * x;
}
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) :: tmp
if (x <= (-2.3d-216)) then
tmp = 1.0d0 * x
else if (x <= 1.85d+27) then
tmp = 3.13060547623d0 * y
else
tmp = 1.0d0 * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.3e-216) {
tmp = 1.0 * x;
} else if (x <= 1.85e+27) {
tmp = 3.13060547623 * y;
} else {
tmp = 1.0 * x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -2.3e-216: tmp = 1.0 * x elif x <= 1.85e+27: tmp = 3.13060547623 * y else: tmp = 1.0 * x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -2.3e-216) tmp = Float64(1.0 * x); elseif (x <= 1.85e+27) tmp = Float64(3.13060547623 * y); else tmp = Float64(1.0 * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -2.3e-216) tmp = 1.0 * x; elseif (x <= 1.85e+27) tmp = 3.13060547623 * y; else tmp = 1.0 * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.3e-216], N[(1.0 * x), $MachinePrecision], If[LessEqual[x, 1.85e+27], N[(3.13060547623 * y), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.3 \cdot 10^{-216}:\\
\;\;\;\;1 \cdot x\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{+27}:\\
\;\;\;\;3.13060547623 \cdot y\\
\mathbf{else}:\\
\;\;\;\;1 \cdot x\\
\end{array}
\end{array}
if x < -2.29999999999999997e-216 or 1.85000000000000001e27 < x Initial program 62.5%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6466.6
Applied rewrites66.6%
Taylor expanded in x around inf
Applied rewrites66.5%
Taylor expanded in y around 0
Applied rewrites60.7%
if -2.29999999999999997e-216 < x < 1.85000000000000001e27Initial program 47.1%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6453.2
Applied rewrites53.2%
Taylor expanded in y around inf
Applied rewrites43.6%
(FPCore (x y z t a b) :precision binary64 (fma 3.13060547623 y x))
double code(double x, double y, double z, double t, double a, double b) {
return fma(3.13060547623, y, x);
}
function code(x, y, z, t, a, b) return fma(3.13060547623, y, x) end
code[x_, y_, z_, t_, a_, b_] := N[(3.13060547623 * y + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(3.13060547623, y, x\right)
\end{array}
Initial program 57.5%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6462.2
Applied rewrites62.2%
(FPCore (x y z t a b) :precision binary64 (* 3.13060547623 y))
double code(double x, double y, double z, double t, double a, double b) {
return 3.13060547623 * y;
}
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 = 3.13060547623d0 * y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return 3.13060547623 * y;
}
def code(x, y, z, t, a, b): return 3.13060547623 * y
function code(x, y, z, t, a, b) return Float64(3.13060547623 * y) end
function tmp = code(x, y, z, t, a, b) tmp = 3.13060547623 * y; end
code[x_, y_, z_, t_, a_, b_] := N[(3.13060547623 * y), $MachinePrecision]
\begin{array}{l}
\\
3.13060547623 \cdot y
\end{array}
Initial program 57.5%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6462.2
Applied rewrites62.2%
Taylor expanded in y around inf
Applied rewrites22.6%
(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 2024254
(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))))