
(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 14 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 (or (<= z -5e+48) (not (<= z 8.2e+14)))
(+
x
(-
(-
(fma y 3.13060547623 (/ y (/ (* z z) t)))
(/ (* y 36.52704169880642) z))
(/ (/ (* y -457.9610022158428) z) z)))
(+
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)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5e+48) || !(z <= 8.2e+14)) {
tmp = x + ((fma(y, 3.13060547623, (y / ((z * z) / t))) - ((y * 36.52704169880642) / z)) - (((y * -457.9610022158428) / z) / z));
} else {
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));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5e+48) || !(z <= 8.2e+14)) tmp = Float64(x + Float64(Float64(fma(y, 3.13060547623, Float64(y / Float64(Float64(z * z) / t))) - Float64(Float64(y * 36.52704169880642) / z)) - Float64(Float64(Float64(y * -457.9610022158428) / z) / z))); else tmp = Float64(x + Float64(Float64(y / 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))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5e+48], N[Not[LessEqual[z, 8.2e+14]], $MachinePrecision]], N[(x + N[(N[(N[(y * 3.13060547623 + N[(y / N[(N[(z * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y * 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(y * -457.9610022158428), $MachinePrecision] / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y / N[(z * N[(z * N[(z * N[(z + 15.234687407), $MachinePrecision] + 31.4690115749), $MachinePrecision] + 11.9400905721), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision] * N[(z * N[(z * N[(z * N[(z * 3.13060547623 + 11.1667541262), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+48} \lor \neg \left(z \leq 8.2 \cdot 10^{+14}\right):\\
\;\;\;\;x + \left(\left(\mathsf{fma}\left(y, 3.13060547623, \frac{y}{\frac{z \cdot z}{t}}\right) - \frac{y \cdot 36.52704169880642}{z}\right) - \frac{\frac{y \cdot -457.9610022158428}{z}}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \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)} \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)\\
\end{array}
\end{array}
if z < -4.99999999999999973e48 or 8.2e14 < z Initial program 8.9%
associate-*l/8.9%
*-commutative8.9%
fma-def8.9%
*-commutative8.9%
fma-def8.9%
*-commutative8.9%
fma-def8.9%
*-commutative8.9%
fma-def8.9%
Simplified8.9%
Taylor expanded in z around -inf 86.9%
+-commutative86.9%
mul-1-neg86.9%
unsub-neg86.9%
+-commutative86.9%
*-commutative86.9%
fma-def86.9%
associate-/l*97.2%
unpow297.2%
distribute-rgt-out--97.2%
metadata-eval97.2%
+-commutative97.2%
fma-def97.2%
Simplified97.2%
Taylor expanded in y around 0 97.2%
*-commutative97.2%
associate-*l/97.2%
metadata-eval97.2%
distribute-rgt-out97.2%
unpow297.2%
associate-/r*97.2%
distribute-rgt-out97.2%
metadata-eval97.2%
Simplified97.2%
if -4.99999999999999973e48 < z < 8.2e14Initial program 99.0%
associate-*l/99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
Simplified99.7%
Final simplification98.5%
(FPCore (x y z t a b)
:precision binary64
(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)
(+
x
(/
y
(/
(fma
(fma (fma (+ z 15.234687407) z 31.4690115749) z 11.9400905721)
z
0.607771387771)
(fma (fma (fma (fma z 3.13060547623 11.1667541262) z t) z a) z b))))
(+
x
(-
(-
(fma y 3.13060547623 (/ y (/ (* z z) t)))
(/ (* y 36.52704169880642) z))
(/ (/ (* y -457.9610022158428) z) z)))))
double code(double x, double y, double z, double t, double a, double b) {
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 = x + (y / (fma(fma(fma((z + 15.234687407), z, 31.4690115749), z, 11.9400905721), z, 0.607771387771) / fma(fma(fma(fma(z, 3.13060547623, 11.1667541262), z, t), z, a), z, b)));
} else {
tmp = x + ((fma(y, 3.13060547623, (y / ((z * z) / t))) - ((y * 36.52704169880642) / z)) - (((y * -457.9610022158428) / z) / z));
}
return tmp;
}
function code(x, y, z, t, a, b) 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 = Float64(x + Float64(y / Float64(fma(fma(fma(Float64(z + 15.234687407), z, 31.4690115749), z, 11.9400905721), z, 0.607771387771) / fma(fma(fma(fma(z, 3.13060547623, 11.1667541262), z, t), z, a), z, b)))); else tmp = Float64(x + Float64(Float64(fma(y, 3.13060547623, Float64(y / Float64(Float64(z * z) / t))) - Float64(Float64(y * 36.52704169880642) / z)) - Float64(Float64(Float64(y * -457.9610022158428) / z) / z))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := 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[(x + N[(y / N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z + 31.4690115749), $MachinePrecision] * z + 11.9400905721), $MachinePrecision] * z + 0.607771387771), $MachinePrecision] / N[(N[(N[(N[(z * 3.13060547623 + 11.1667541262), $MachinePrecision] * z + t), $MachinePrecision] * z + a), $MachinePrecision] * z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(y * 3.13060547623 + N[(y / N[(N[(z * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y * 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(y * -457.9610022158428), $MachinePrecision] / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\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:\\
\;\;\;\;x + \frac{y}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z + 15.234687407, z, 31.4690115749\right), z, 11.9400905721\right), z, 0.607771387771\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right), z, t\right), z, a\right), z, b\right)}}\\
\mathbf{else}:\\
\;\;\;\;x + \left(\left(\mathsf{fma}\left(y, 3.13060547623, \frac{y}{\frac{z \cdot z}{t}}\right) - \frac{y \cdot 36.52704169880642}{z}\right) - \frac{\frac{y \cdot -457.9610022158428}{z}}{z}\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 313060547623/100000000000) 55833770631/5000000000) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z 15234687407/1000000000) z) 314690115749/10000000000) z) 119400905721/10000000000) z) 607771387771/1000000000000)) < +inf.0Initial program 95.1%
associate-/l*96.4%
fma-def96.4%
fma-def96.4%
fma-def96.4%
fma-def96.4%
fma-def96.4%
fma-def96.4%
fma-def96.4%
Simplified96.4%
if +inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 313060547623/100000000000) 55833770631/5000000000) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z 15234687407/1000000000) z) 314690115749/10000000000) z) 119400905721/10000000000) z) 607771387771/1000000000000)) Initial program 0.0%
associate-*l/0.0%
*-commutative0.0%
fma-def0.0%
*-commutative0.0%
fma-def0.0%
*-commutative0.0%
fma-def0.0%
*-commutative0.0%
fma-def0.0%
Simplified0.0%
Taylor expanded in z around -inf 86.5%
+-commutative86.5%
mul-1-neg86.5%
unsub-neg86.5%
+-commutative86.5%
*-commutative86.5%
fma-def86.6%
associate-/l*97.6%
unpow297.6%
distribute-rgt-out--97.6%
metadata-eval97.6%
+-commutative97.6%
fma-def97.6%
Simplified97.6%
Taylor expanded in y around 0 97.6%
*-commutative97.6%
associate-*l/97.6%
metadata-eval97.6%
distribute-rgt-out97.6%
unpow297.6%
associate-/r*97.6%
distribute-rgt-out97.6%
metadata-eval97.6%
Simplified97.6%
Final simplification96.9%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -1.75e+28) (not (<= z 1.8e+14)))
(+
x
(-
(-
(fma y 3.13060547623 (/ y (/ (* z z) t)))
(/ (* y 36.52704169880642) z))
(/ (/ (* y -457.9610022158428) z) z)))
(+
x
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
(+
0.607771387771
(+
(* 31.4690115749 (pow z 2.0))
(+
(pow z 4.0)
(+ (* 15.234687407 (pow z 3.0)) (* z 11.9400905721)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.75e+28) || !(z <= 1.8e+14)) {
tmp = x + ((fma(y, 3.13060547623, (y / ((z * z) / t))) - ((y * 36.52704169880642) / z)) - (((y * -457.9610022158428) / z) / z));
} else {
tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + ((31.4690115749 * pow(z, 2.0)) + (pow(z, 4.0) + ((15.234687407 * pow(z, 3.0)) + (z * 11.9400905721))))));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.75e+28) || !(z <= 1.8e+14)) tmp = Float64(x + Float64(Float64(fma(y, 3.13060547623, Float64(y / Float64(Float64(z * z) / t))) - Float64(Float64(y * 36.52704169880642) / z)) - Float64(Float64(Float64(y * -457.9610022158428) / z) / z))); else tmp = Float64(x + Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / Float64(0.607771387771 + Float64(Float64(31.4690115749 * (z ^ 2.0)) + Float64((z ^ 4.0) + Float64(Float64(15.234687407 * (z ^ 3.0)) + Float64(z * 11.9400905721))))))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.75e+28], N[Not[LessEqual[z, 1.8e+14]], $MachinePrecision]], N[(x + N[(N[(N[(y * 3.13060547623 + N[(y / N[(N[(z * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y * 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(y * -457.9610022158428), $MachinePrecision] / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + 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[(0.607771387771 + N[(N[(31.4690115749 * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[Power[z, 4.0], $MachinePrecision] + N[(N[(15.234687407 * N[Power[z, 3.0], $MachinePrecision]), $MachinePrecision] + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+28} \lor \neg \left(z \leq 1.8 \cdot 10^{+14}\right):\\
\;\;\;\;x + \left(\left(\mathsf{fma}\left(y, 3.13060547623, \frac{y}{\frac{z \cdot z}{t}}\right) - \frac{y \cdot 36.52704169880642}{z}\right) - \frac{\frac{y \cdot -457.9610022158428}{z}}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \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)}{0.607771387771 + \left(31.4690115749 \cdot {z}^{2} + \left({z}^{4} + \left(15.234687407 \cdot {z}^{3} + z \cdot 11.9400905721\right)\right)\right)}\\
\end{array}
\end{array}
if z < -1.75e28 or 1.8e14 < z Initial program 9.7%
associate-*l/10.3%
*-commutative10.3%
fma-def10.3%
*-commutative10.3%
fma-def10.3%
*-commutative10.3%
fma-def10.3%
*-commutative10.3%
fma-def10.3%
Simplified10.3%
Taylor expanded in z around -inf 86.4%
+-commutative86.4%
mul-1-neg86.4%
unsub-neg86.4%
+-commutative86.4%
*-commutative86.4%
fma-def86.4%
associate-/l*97.3%
unpow297.3%
distribute-rgt-out--97.3%
metadata-eval97.3%
+-commutative97.3%
fma-def97.3%
Simplified97.3%
Taylor expanded in y around 0 97.3%
*-commutative97.3%
associate-*l/97.3%
metadata-eval97.3%
distribute-rgt-out97.3%
unpow297.3%
associate-/r*97.3%
distribute-rgt-out97.3%
metadata-eval97.3%
Simplified97.3%
if -1.75e28 < z < 1.8e14Initial program 99.6%
Taylor expanded in z around 0 99.7%
Final simplification98.5%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -1.6e+28) (not (<= z 8.2e+14)))
(+
x
(-
(-
(fma y 3.13060547623 (/ y (/ (* z z) t)))
(/ (* y 36.52704169880642) z))
(/ (/ (* y -457.9610022158428) z) z)))
(+
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
(+
(* z (+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771))
x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.6e+28) || !(z <= 8.2e+14)) {
tmp = x + ((fma(y, 3.13060547623, (y / ((z * z) / t))) - ((y * 36.52704169880642) / z)) - (((y * -457.9610022158428) / z) / z));
} else {
tmp = ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) + x;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.6e+28) || !(z <= 8.2e+14)) tmp = Float64(x + Float64(Float64(fma(y, 3.13060547623, Float64(y / Float64(Float64(z * z) / t))) - Float64(Float64(y * 36.52704169880642) / z)) - Float64(Float64(Float64(y * -457.9610022158428) / z) / z))); else tmp = Float64(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)) + x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.6e+28], N[Not[LessEqual[z, 8.2e+14]], $MachinePrecision]], N[(x + N[(N[(N[(y * 3.13060547623 + N[(y / N[(N[(z * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y * 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(y * -457.9610022158428), $MachinePrecision] / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(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] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+28} \lor \neg \left(z \leq 8.2 \cdot 10^{+14}\right):\\
\;\;\;\;x + \left(\left(\mathsf{fma}\left(y, 3.13060547623, \frac{y}{\frac{z \cdot z}{t}}\right) - \frac{y \cdot 36.52704169880642}{z}\right) - \frac{\frac{y \cdot -457.9610022158428}{z}}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\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} + x\\
\end{array}
\end{array}
if z < -1.6e28 or 8.2e14 < z Initial program 9.7%
associate-*l/10.3%
*-commutative10.3%
fma-def10.3%
*-commutative10.3%
fma-def10.3%
*-commutative10.3%
fma-def10.3%
*-commutative10.3%
fma-def10.3%
Simplified10.3%
Taylor expanded in z around -inf 86.4%
+-commutative86.4%
mul-1-neg86.4%
unsub-neg86.4%
+-commutative86.4%
*-commutative86.4%
fma-def86.4%
associate-/l*97.3%
unpow297.3%
distribute-rgt-out--97.3%
metadata-eval97.3%
+-commutative97.3%
fma-def97.3%
Simplified97.3%
Taylor expanded in y around 0 97.3%
*-commutative97.3%
associate-*l/97.3%
metadata-eval97.3%
distribute-rgt-out97.3%
unpow297.3%
associate-/r*97.3%
distribute-rgt-out97.3%
metadata-eval97.3%
Simplified97.3%
if -1.6e28 < z < 8.2e14Initial program 99.6%
Final simplification98.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(/
(*
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_1 INFINITY)
(+ t_1 x)
(+
x
(/
y
(+
(/ 3.7269864963038164 z)
(- 0.31942702700572795 (/ (* t 0.10203362558171805) (* z z)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (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_1 <= ((double) INFINITY)) {
tmp = t_1 + x;
} else {
tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - ((t * 0.10203362558171805) / (z * z)))));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (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_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1 + x;
} else {
tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - ((t * 0.10203362558171805) / (z * z)))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771) tmp = 0 if t_1 <= math.inf: tmp = t_1 + x else: tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - ((t * 0.10203362558171805) / (z * z))))) return tmp
function code(x, y, z, t, a, b) t_1 = 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_1 <= Inf) tmp = Float64(t_1 + x); else tmp = Float64(x + Float64(y / Float64(Float64(3.7269864963038164 / z) + Float64(0.31942702700572795 - Float64(Float64(t * 0.10203362558171805) / Float64(z * z)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771); tmp = 0.0; if (t_1 <= Inf) tmp = t_1 + x; else tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - ((t * 0.10203362558171805) / (z * z))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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$1, Infinity], N[(t$95$1 + x), $MachinePrecision], N[(x + N[(y / N[(N[(3.7269864963038164 / z), $MachinePrecision] + N[(0.31942702700572795 - N[(N[(t * 0.10203362558171805), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \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_1 \leq \infty:\\
\;\;\;\;t_1 + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 - \frac{t \cdot 0.10203362558171805}{z \cdot z}\right)}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 313060547623/100000000000) 55833770631/5000000000) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z 15234687407/1000000000) z) 314690115749/10000000000) z) 119400905721/10000000000) z) 607771387771/1000000000000)) < +inf.0Initial program 95.1%
if +inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 313060547623/100000000000) 55833770631/5000000000) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z 15234687407/1000000000) z) 314690115749/10000000000) z) 119400905721/10000000000) z) 607771387771/1000000000000)) Initial program 0.0%
associate-/l*0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
Simplified0.0%
Taylor expanded in z around inf 94.9%
associate-*r/94.9%
metadata-eval94.9%
mul-1-neg94.9%
*-commutative94.9%
unpow294.9%
Simplified94.9%
Taylor expanded in t around inf 94.9%
associate-*r/94.9%
unpow294.9%
Simplified94.9%
Final simplification95.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.05e+68)
(+ x (/ y 0.31942702700572795))
(if (<= z 7.8e+58)
(+
x
(/
(* y (+ b (* z a)))
(+
(*
z
(+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771)))
(+
x
(/
y
(+
(/ 3.7269864963038164 z)
(- 0.31942702700572795 (/ (* t 0.10203362558171805) (* z z)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.05e+68) {
tmp = x + (y / 0.31942702700572795);
} else if (z <= 7.8e+58) {
tmp = x + ((y * (b + (z * a))) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771));
} else {
tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - ((t * 0.10203362558171805) / (z * z)))));
}
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 (z <= (-1.05d+68)) then
tmp = x + (y / 0.31942702700572795d0)
else if (z <= 7.8d+58) then
tmp = x + ((y * (b + (z * a))) / ((z * ((z * ((z * (z + 15.234687407d0)) + 31.4690115749d0)) + 11.9400905721d0)) + 0.607771387771d0))
else
tmp = x + (y / ((3.7269864963038164d0 / z) + (0.31942702700572795d0 - ((t * 0.10203362558171805d0) / (z * z)))))
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 (z <= -1.05e+68) {
tmp = x + (y / 0.31942702700572795);
} else if (z <= 7.8e+58) {
tmp = x + ((y * (b + (z * a))) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771));
} else {
tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - ((t * 0.10203362558171805) / (z * z)))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.05e+68: tmp = x + (y / 0.31942702700572795) elif z <= 7.8e+58: tmp = x + ((y * (b + (z * a))) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) else: tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - ((t * 0.10203362558171805) / (z * z))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.05e+68) tmp = Float64(x + Float64(y / 0.31942702700572795)); elseif (z <= 7.8e+58) tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * a))) / Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771))); else tmp = Float64(x + Float64(y / Float64(Float64(3.7269864963038164 / z) + Float64(0.31942702700572795 - Float64(Float64(t * 0.10203362558171805) / Float64(z * z)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.05e+68) tmp = x + (y / 0.31942702700572795); elseif (z <= 7.8e+58) tmp = x + ((y * (b + (z * a))) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)); else tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - ((t * 0.10203362558171805) / (z * z))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.05e+68], N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.8e+58], N[(x + N[(N[(y * N[(b + N[(z * a), $MachinePrecision]), $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]), $MachinePrecision], N[(x + N[(y / N[(N[(3.7269864963038164 / z), $MachinePrecision] + N[(0.31942702700572795 - N[(N[(t * 0.10203362558171805), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+68}:\\
\;\;\;\;x + \frac{y}{0.31942702700572795}\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{+58}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot a\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 - \frac{t \cdot 0.10203362558171805}{z \cdot z}\right)}\\
\end{array}
\end{array}
if z < -1.05e68Initial program 1.9%
associate-/l*3.6%
fma-def3.6%
fma-def3.6%
fma-def3.6%
fma-def3.6%
fma-def3.6%
fma-def3.6%
fma-def3.6%
Simplified3.6%
Taylor expanded in z around inf 90.8%
if -1.05e68 < z < 7.8000000000000002e58Initial program 96.3%
Taylor expanded in z around 0 93.9%
associate-*r*89.9%
*-commutative89.9%
associate-*r*93.9%
distribute-lft-out96.0%
*-commutative96.0%
Simplified96.0%
if 7.8000000000000002e58 < z Initial program 3.6%
associate-/l*3.6%
fma-def3.6%
fma-def3.6%
fma-def3.6%
fma-def3.6%
fma-def3.6%
fma-def3.6%
fma-def3.6%
Simplified3.6%
Taylor expanded in z around inf 98.1%
associate-*r/98.1%
metadata-eval98.1%
mul-1-neg98.1%
*-commutative98.1%
unpow298.1%
Simplified98.1%
Taylor expanded in t around inf 98.1%
associate-*r/98.1%
unpow298.1%
Simplified98.1%
Final simplification95.3%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -1.56e+69) (not (<= z 6.6e+14)))
(+
x
(/
y
(+
(/ 3.7269864963038164 z)
(- 0.31942702700572795 (/ (* t 0.10203362558171805) (* z z))))))
(+
x
(/
(* y (+ b (* z a)))
(+ 0.607771387771 (* z (+ 11.9400905721 (* z 31.4690115749))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.56e+69) || !(z <= 6.6e+14)) {
tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - ((t * 0.10203362558171805) / (z * z)))));
} else {
tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
}
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 ((z <= (-1.56d+69)) .or. (.not. (z <= 6.6d+14))) then
tmp = x + (y / ((3.7269864963038164d0 / z) + (0.31942702700572795d0 - ((t * 0.10203362558171805d0) / (z * z)))))
else
tmp = x + ((y * (b + (z * a))) / (0.607771387771d0 + (z * (11.9400905721d0 + (z * 31.4690115749d0)))))
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 ((z <= -1.56e+69) || !(z <= 6.6e+14)) {
tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - ((t * 0.10203362558171805) / (z * z)))));
} else {
tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.56e+69) or not (z <= 6.6e+14): tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - ((t * 0.10203362558171805) / (z * z))))) else: tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.56e+69) || !(z <= 6.6e+14)) tmp = Float64(x + Float64(y / Float64(Float64(3.7269864963038164 / z) + Float64(0.31942702700572795 - Float64(Float64(t * 0.10203362558171805) / Float64(z * z)))))); else tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * a))) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * 31.4690115749)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.56e+69) || ~((z <= 6.6e+14))) tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - ((t * 0.10203362558171805) / (z * z))))); else tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.56e+69], N[Not[LessEqual[z, 6.6e+14]], $MachinePrecision]], N[(x + N[(y / N[(N[(3.7269864963038164 / z), $MachinePrecision] + N[(0.31942702700572795 - N[(N[(t * 0.10203362558171805), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(b + N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * 31.4690115749), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.56 \cdot 10^{+69} \lor \neg \left(z \leq 6.6 \cdot 10^{+14}\right):\\
\;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 - \frac{t \cdot 0.10203362558171805}{z \cdot z}\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot a\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)}\\
\end{array}
\end{array}
if z < -1.56000000000000007e69 or 6.6e14 < z Initial program 7.6%
associate-/l*8.4%
fma-def8.4%
fma-def8.4%
fma-def8.4%
fma-def8.4%
fma-def8.4%
fma-def8.4%
fma-def8.4%
Simplified8.4%
Taylor expanded in z around inf 93.9%
associate-*r/93.9%
metadata-eval93.9%
mul-1-neg93.9%
*-commutative93.9%
unpow293.9%
Simplified93.9%
Taylor expanded in t around inf 93.9%
associate-*r/93.9%
unpow293.9%
Simplified93.9%
if -1.56000000000000007e69 < z < 6.6e14Initial program 96.8%
Taylor expanded in z around 0 93.6%
associate-*r*89.4%
*-commutative89.4%
associate-*r*93.6%
distribute-lft-out95.8%
*-commutative95.8%
Simplified95.8%
Taylor expanded in z around 0 94.9%
*-commutative94.9%
Simplified94.9%
Final simplification94.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -0.41)
(+ x (/ y (+ (/ 3.7269864963038164 z) 0.31942702700572795)))
(if (<= z 7.8e+14)
(+ x (/ (* y (+ b (* z a))) (+ 0.607771387771 (* z 11.9400905721))))
(+
x
(/
y
(+
(/ 3.7269864963038164 z)
(- 0.31942702700572795 (/ (* t 0.10203362558171805) (* z z)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -0.41) {
tmp = x + (y / ((3.7269864963038164 / z) + 0.31942702700572795));
} else if (z <= 7.8e+14) {
tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * 11.9400905721)));
} else {
tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - ((t * 0.10203362558171805) / (z * z)))));
}
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 (z <= (-0.41d0)) then
tmp = x + (y / ((3.7269864963038164d0 / z) + 0.31942702700572795d0))
else if (z <= 7.8d+14) then
tmp = x + ((y * (b + (z * a))) / (0.607771387771d0 + (z * 11.9400905721d0)))
else
tmp = x + (y / ((3.7269864963038164d0 / z) + (0.31942702700572795d0 - ((t * 0.10203362558171805d0) / (z * z)))))
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 (z <= -0.41) {
tmp = x + (y / ((3.7269864963038164 / z) + 0.31942702700572795));
} else if (z <= 7.8e+14) {
tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * 11.9400905721)));
} else {
tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - ((t * 0.10203362558171805) / (z * z)))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -0.41: tmp = x + (y / ((3.7269864963038164 / z) + 0.31942702700572795)) elif z <= 7.8e+14: tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * 11.9400905721))) else: tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - ((t * 0.10203362558171805) / (z * z))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -0.41) tmp = Float64(x + Float64(y / Float64(Float64(3.7269864963038164 / z) + 0.31942702700572795))); elseif (z <= 7.8e+14) tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * a))) / Float64(0.607771387771 + Float64(z * 11.9400905721)))); else tmp = Float64(x + Float64(y / Float64(Float64(3.7269864963038164 / z) + Float64(0.31942702700572795 - Float64(Float64(t * 0.10203362558171805) / Float64(z * z)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -0.41) tmp = x + (y / ((3.7269864963038164 / z) + 0.31942702700572795)); elseif (z <= 7.8e+14) tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * 11.9400905721))); else tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - ((t * 0.10203362558171805) / (z * z))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -0.41], N[(x + N[(y / N[(N[(3.7269864963038164 / z), $MachinePrecision] + 0.31942702700572795), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.8e+14], N[(x + N[(N[(y * N[(b + N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(3.7269864963038164 / z), $MachinePrecision] + N[(0.31942702700572795 - N[(N[(t * 0.10203362558171805), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.41:\\
\;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + 0.31942702700572795}\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{+14}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot a\right)}{0.607771387771 + z \cdot 11.9400905721}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 - \frac{t \cdot 0.10203362558171805}{z \cdot z}\right)}\\
\end{array}
\end{array}
if z < -0.409999999999999976Initial program 10.6%
associate-/l*13.4%
fma-def13.4%
fma-def13.4%
fma-def13.4%
fma-def13.4%
fma-def13.4%
fma-def13.4%
fma-def13.4%
Simplified13.4%
Taylor expanded in z around inf 84.9%
associate-*r/84.9%
metadata-eval84.9%
Simplified84.9%
if -0.409999999999999976 < z < 7.8e14Initial program 99.7%
Taylor expanded in z around 0 95.5%
associate-*r*91.0%
*-commutative91.0%
associate-*r*95.5%
distribute-lft-out97.1%
*-commutative97.1%
Simplified97.1%
Taylor expanded in z around 0 96.6%
*-commutative96.6%
Simplified96.6%
if 7.8e14 < z Initial program 12.8%
associate-/l*12.8%
fma-def12.8%
fma-def12.8%
fma-def12.8%
fma-def12.8%
fma-def12.8%
fma-def12.8%
fma-def12.8%
Simplified12.8%
Taylor expanded in z around inf 95.3%
associate-*r/95.3%
metadata-eval95.3%
mul-1-neg95.3%
*-commutative95.3%
unpow295.3%
Simplified95.3%
Taylor expanded in t around inf 95.3%
associate-*r/95.3%
unpow295.3%
Simplified95.3%
Final simplification93.2%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -1.56e+69) (not (<= z 1.2e+14)))
(+ x (/ y 0.31942702700572795))
(+
x
(+ (* (* a 1.6453555072203998) (* y z)) (* 1.6453555072203998 (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.56e+69) || !(z <= 1.2e+14)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + (((a * 1.6453555072203998) * (y * z)) + (1.6453555072203998 * (y * b)));
}
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 ((z <= (-1.56d+69)) .or. (.not. (z <= 1.2d+14))) then
tmp = x + (y / 0.31942702700572795d0)
else
tmp = x + (((a * 1.6453555072203998d0) * (y * z)) + (1.6453555072203998d0 * (y * b)))
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 ((z <= -1.56e+69) || !(z <= 1.2e+14)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + (((a * 1.6453555072203998) * (y * z)) + (1.6453555072203998 * (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.56e+69) or not (z <= 1.2e+14): tmp = x + (y / 0.31942702700572795) else: tmp = x + (((a * 1.6453555072203998) * (y * z)) + (1.6453555072203998 * (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.56e+69) || !(z <= 1.2e+14)) tmp = Float64(x + Float64(y / 0.31942702700572795)); else tmp = Float64(x + Float64(Float64(Float64(a * 1.6453555072203998) * Float64(y * z)) + Float64(1.6453555072203998 * Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.56e+69) || ~((z <= 1.2e+14))) tmp = x + (y / 0.31942702700572795); else tmp = x + (((a * 1.6453555072203998) * (y * z)) + (1.6453555072203998 * (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.56e+69], N[Not[LessEqual[z, 1.2e+14]], $MachinePrecision]], N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(a * 1.6453555072203998), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(1.6453555072203998 * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.56 \cdot 10^{+69} \lor \neg \left(z \leq 1.2 \cdot 10^{+14}\right):\\
\;\;\;\;x + \frac{y}{0.31942702700572795}\\
\mathbf{else}:\\
\;\;\;\;x + \left(\left(a \cdot 1.6453555072203998\right) \cdot \left(y \cdot z\right) + 1.6453555072203998 \cdot \left(y \cdot b\right)\right)\\
\end{array}
\end{array}
if z < -1.56000000000000007e69 or 1.2e14 < z Initial program 7.6%
associate-/l*8.4%
fma-def8.4%
fma-def8.4%
fma-def8.4%
fma-def8.4%
fma-def8.4%
fma-def8.4%
fma-def8.4%
Simplified8.4%
Taylor expanded in z around inf 93.7%
if -1.56000000000000007e69 < z < 1.2e14Initial program 96.8%
associate-*l/97.6%
*-commutative97.6%
fma-def97.6%
*-commutative97.6%
fma-def97.6%
*-commutative97.6%
fma-def97.6%
*-commutative97.6%
fma-def97.6%
Simplified97.6%
Taylor expanded in z around 0 84.5%
Taylor expanded in a around inf 92.6%
associate-*r*92.6%
*-commutative92.6%
Simplified92.6%
Final simplification93.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -0.42)
(+ x (/ y (+ (/ 3.7269864963038164 z) 0.31942702700572795)))
(if (<= z 1.06e+14)
(+ x (/ (* y (+ b (* z a))) (+ 0.607771387771 (* z 11.9400905721))))
(+ x (/ y 0.31942702700572795)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -0.42) {
tmp = x + (y / ((3.7269864963038164 / z) + 0.31942702700572795));
} else if (z <= 1.06e+14) {
tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * 11.9400905721)));
} else {
tmp = x + (y / 0.31942702700572795);
}
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 (z <= (-0.42d0)) then
tmp = x + (y / ((3.7269864963038164d0 / z) + 0.31942702700572795d0))
else if (z <= 1.06d+14) then
tmp = x + ((y * (b + (z * a))) / (0.607771387771d0 + (z * 11.9400905721d0)))
else
tmp = x + (y / 0.31942702700572795d0)
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 (z <= -0.42) {
tmp = x + (y / ((3.7269864963038164 / z) + 0.31942702700572795));
} else if (z <= 1.06e+14) {
tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * 11.9400905721)));
} else {
tmp = x + (y / 0.31942702700572795);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -0.42: tmp = x + (y / ((3.7269864963038164 / z) + 0.31942702700572795)) elif z <= 1.06e+14: tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * 11.9400905721))) else: tmp = x + (y / 0.31942702700572795) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -0.42) tmp = Float64(x + Float64(y / Float64(Float64(3.7269864963038164 / z) + 0.31942702700572795))); elseif (z <= 1.06e+14) tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * a))) / Float64(0.607771387771 + Float64(z * 11.9400905721)))); else tmp = Float64(x + Float64(y / 0.31942702700572795)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -0.42) tmp = x + (y / ((3.7269864963038164 / z) + 0.31942702700572795)); elseif (z <= 1.06e+14) tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * 11.9400905721))); else tmp = x + (y / 0.31942702700572795); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -0.42], N[(x + N[(y / N[(N[(3.7269864963038164 / z), $MachinePrecision] + 0.31942702700572795), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.06e+14], N[(x + N[(N[(y * N[(b + N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.42:\\
\;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + 0.31942702700572795}\\
\mathbf{elif}\;z \leq 1.06 \cdot 10^{+14}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot a\right)}{0.607771387771 + z \cdot 11.9400905721}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{0.31942702700572795}\\
\end{array}
\end{array}
if z < -0.419999999999999984Initial program 10.6%
associate-/l*13.4%
fma-def13.4%
fma-def13.4%
fma-def13.4%
fma-def13.4%
fma-def13.4%
fma-def13.4%
fma-def13.4%
Simplified13.4%
Taylor expanded in z around inf 84.9%
associate-*r/84.9%
metadata-eval84.9%
Simplified84.9%
if -0.419999999999999984 < z < 1.06e14Initial program 99.7%
Taylor expanded in z around 0 95.5%
associate-*r*91.0%
*-commutative91.0%
associate-*r*95.5%
distribute-lft-out97.1%
*-commutative97.1%
Simplified97.1%
Taylor expanded in z around 0 96.6%
*-commutative96.6%
Simplified96.6%
if 1.06e14 < z Initial program 12.8%
associate-/l*12.8%
fma-def12.8%
fma-def12.8%
fma-def12.8%
fma-def12.8%
fma-def12.8%
fma-def12.8%
fma-def12.8%
Simplified12.8%
Taylor expanded in z around inf 95.0%
Final simplification93.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.56e+69) (not (<= z 16800000000000.0))) (+ x (/ y 0.31942702700572795)) (+ x (* 1.6453555072203998 (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.56e+69) || !(z <= 16800000000000.0)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + (1.6453555072203998 * (y * b));
}
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 ((z <= (-1.56d+69)) .or. (.not. (z <= 16800000000000.0d0))) then
tmp = x + (y / 0.31942702700572795d0)
else
tmp = x + (1.6453555072203998d0 * (y * b))
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 ((z <= -1.56e+69) || !(z <= 16800000000000.0)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + (1.6453555072203998 * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.56e+69) or not (z <= 16800000000000.0): tmp = x + (y / 0.31942702700572795) else: tmp = x + (1.6453555072203998 * (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.56e+69) || !(z <= 16800000000000.0)) tmp = Float64(x + Float64(y / 0.31942702700572795)); else tmp = Float64(x + Float64(1.6453555072203998 * Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.56e+69) || ~((z <= 16800000000000.0))) tmp = x + (y / 0.31942702700572795); else tmp = x + (1.6453555072203998 * (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.56e+69], N[Not[LessEqual[z, 16800000000000.0]], $MachinePrecision]], N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision], N[(x + N[(1.6453555072203998 * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.56 \cdot 10^{+69} \lor \neg \left(z \leq 16800000000000\right):\\
\;\;\;\;x + \frac{y}{0.31942702700572795}\\
\mathbf{else}:\\
\;\;\;\;x + 1.6453555072203998 \cdot \left(y \cdot b\right)\\
\end{array}
\end{array}
if z < -1.56000000000000007e69 or 1.68e13 < z Initial program 7.6%
associate-/l*8.4%
fma-def8.4%
fma-def8.4%
fma-def8.4%
fma-def8.4%
fma-def8.4%
fma-def8.4%
fma-def8.4%
Simplified8.4%
Taylor expanded in z around inf 93.7%
if -1.56000000000000007e69 < z < 1.68e13Initial program 96.8%
associate-*l/97.6%
*-commutative97.6%
fma-def97.6%
*-commutative97.6%
fma-def97.6%
*-commutative97.6%
fma-def97.6%
*-commutative97.6%
fma-def97.6%
Simplified97.6%
Taylor expanded in z around 0 82.0%
Final simplification87.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.56e+69) (not (<= z 5.6e+14))) (+ x (/ y 0.31942702700572795)) (+ x (* y (* b 1.6453555072203998)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.56e+69) || !(z <= 5.6e+14)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + (y * (b * 1.6453555072203998));
}
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 ((z <= (-1.56d+69)) .or. (.not. (z <= 5.6d+14))) then
tmp = x + (y / 0.31942702700572795d0)
else
tmp = x + (y * (b * 1.6453555072203998d0))
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 ((z <= -1.56e+69) || !(z <= 5.6e+14)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + (y * (b * 1.6453555072203998));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.56e+69) or not (z <= 5.6e+14): tmp = x + (y / 0.31942702700572795) else: tmp = x + (y * (b * 1.6453555072203998)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.56e+69) || !(z <= 5.6e+14)) tmp = Float64(x + Float64(y / 0.31942702700572795)); else tmp = Float64(x + Float64(y * Float64(b * 1.6453555072203998))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.56e+69) || ~((z <= 5.6e+14))) tmp = x + (y / 0.31942702700572795); else tmp = x + (y * (b * 1.6453555072203998)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.56e+69], N[Not[LessEqual[z, 5.6e+14]], $MachinePrecision]], N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(b * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.56 \cdot 10^{+69} \lor \neg \left(z \leq 5.6 \cdot 10^{+14}\right):\\
\;\;\;\;x + \frac{y}{0.31942702700572795}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\
\end{array}
\end{array}
if z < -1.56000000000000007e69 or 5.6e14 < z Initial program 7.6%
associate-/l*8.4%
fma-def8.4%
fma-def8.4%
fma-def8.4%
fma-def8.4%
fma-def8.4%
fma-def8.4%
fma-def8.4%
Simplified8.4%
Taylor expanded in z around inf 93.7%
if -1.56000000000000007e69 < z < 5.6e14Initial program 96.8%
Taylor expanded in z around 0 82.5%
Taylor expanded in z around 0 82.0%
*-commutative82.0%
associate-*l*82.0%
Simplified82.0%
Final simplification87.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6.5e-31) (not (<= z 1.4e-24))) (+ x (/ y 0.31942702700572795)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.5e-31) || !(z <= 1.4e-24)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = 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 ((z <= (-6.5d-31)) .or. (.not. (z <= 1.4d-24))) then
tmp = x + (y / 0.31942702700572795d0)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.5e-31) || !(z <= 1.4e-24)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6.5e-31) or not (z <= 1.4e-24): tmp = x + (y / 0.31942702700572795) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6.5e-31) || !(z <= 1.4e-24)) tmp = Float64(x + Float64(y / 0.31942702700572795)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6.5e-31) || ~((z <= 1.4e-24))) tmp = x + (y / 0.31942702700572795); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6.5e-31], N[Not[LessEqual[z, 1.4e-24]], $MachinePrecision]], N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{-31} \lor \neg \left(z \leq 1.4 \cdot 10^{-24}\right):\\
\;\;\;\;x + \frac{y}{0.31942702700572795}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -6.49999999999999967e-31 or 1.4000000000000001e-24 < z Initial program 19.1%
associate-/l*20.4%
fma-def20.4%
fma-def20.4%
fma-def20.4%
fma-def20.4%
fma-def20.4%
fma-def20.4%
fma-def20.4%
Simplified20.4%
Taylor expanded in z around inf 86.5%
if -6.49999999999999967e-31 < z < 1.4000000000000001e-24Initial program 99.7%
associate-/l*99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in z around inf 34.9%
Taylor expanded in x around inf 42.3%
Final simplification66.8%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
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
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 55.0%
associate-/l*55.7%
fma-def55.7%
fma-def55.7%
fma-def55.7%
fma-def55.7%
fma-def55.7%
fma-def55.7%
fma-def55.7%
Simplified55.7%
Taylor expanded in z around inf 63.5%
Taylor expanded in x around inf 45.9%
Final simplification45.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 2023199
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, D"
:precision binary64
:herbie-target
(if (< z -6.499344996252632e+53) (+ x (* (+ (- 3.13060547623 (/ 36.527041698806414 z)) (/ t (* z z))) (/ y 1.0))) (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)))) (+ x (* (+ (- 3.13060547623 (/ 36.527041698806414 z)) (/ t (* z z))) (/ y 1.0)))))
(+ 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))))