
(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 -3.25e+35) (not (<= z 4.5e+35)))
(+
x
(-
(fma
-1.0
(/ (* y 36.52704169880642) z)
(+ (* y 3.13060547623) (/ y (/ (* z z) t))))
(fma
-15.234687407
(/ (* y 36.52704169880642) (* z z))
(* 98.5170599679272 (/ y (* 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 <= -3.25e+35) || !(z <= 4.5e+35)) {
tmp = x + (fma(-1.0, ((y * 36.52704169880642) / z), ((y * 3.13060547623) + (y / ((z * z) / t)))) - fma(-15.234687407, ((y * 36.52704169880642) / (z * z)), (98.5170599679272 * (y / (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 <= -3.25e+35) || !(z <= 4.5e+35)) tmp = Float64(x + Float64(fma(-1.0, Float64(Float64(y * 36.52704169880642) / z), Float64(Float64(y * 3.13060547623) + Float64(y / Float64(Float64(z * z) / t)))) - fma(-15.234687407, Float64(Float64(y * 36.52704169880642) / Float64(z * z)), Float64(98.5170599679272 * Float64(y / Float64(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, -3.25e+35], N[Not[LessEqual[z, 4.5e+35]], $MachinePrecision]], N[(x + N[(N[(-1.0 * N[(N[(y * 36.52704169880642), $MachinePrecision] / z), $MachinePrecision] + N[(N[(y * 3.13060547623), $MachinePrecision] + N[(y / N[(N[(z * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-15.234687407 * N[(N[(y * 36.52704169880642), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(98.5170599679272 * N[(y / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 -3.25 \cdot 10^{+35} \lor \neg \left(z \leq 4.5 \cdot 10^{+35}\right):\\
\;\;\;\;x + \left(\mathsf{fma}\left(-1, \frac{y \cdot 36.52704169880642}{z}, y \cdot 3.13060547623 + \frac{y}{\frac{z \cdot z}{t}}\right) - \mathsf{fma}\left(-15.234687407, \frac{y \cdot 36.52704169880642}{z \cdot z}, 98.5170599679272 \cdot \frac{y}{z \cdot z}\right)\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 < -3.2500000000000002e35 or 4.4999999999999997e35 < z Initial program 7.3%
associate-*l/6.4%
*-commutative6.4%
fma-def6.4%
*-commutative6.4%
fma-def6.4%
*-commutative6.4%
fma-def6.4%
*-commutative6.4%
fma-def6.4%
Simplified6.4%
Taylor expanded in z around -inf 81.5%
fma-def81.5%
distribute-rgt-out--81.5%
metadata-eval81.5%
+-commutative81.5%
*-commutative81.5%
associate-/l*98.9%
unpow298.9%
fma-def98.9%
distribute-rgt-out--98.9%
metadata-eval98.9%
unpow298.9%
unpow298.9%
Simplified98.9%
if -3.2500000000000002e35 < z < 4.4999999999999997e35Initial program 99.2%
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 simplification99.4%
(FPCore (x y z t a b)
:precision binary64
(if (<=
(/
(*
y
(+
(* z (+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))))
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
-1.0
(/ (* y 36.52704169880642) z)
(+ (* y 3.13060547623) (/ y (/ (* z z) t))))
(fma
-15.234687407
(/ (* y 36.52704169880642) (* z z))
(* 98.5170599679272 (/ y (* z z))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((y * ((z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))) + 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(-1.0, ((y * 36.52704169880642) / z), ((y * 3.13060547623) + (y / ((z * z) / t)))) - fma(-15.234687407, ((y * 36.52704169880642) / (z * z)), (98.5170599679272 * (y / (z * z)))));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(y * Float64(Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623))))))) + 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(fma(-1.0, Float64(Float64(y * 36.52704169880642) / z), Float64(Float64(y * 3.13060547623) + Float64(y / Float64(Float64(z * z) / t)))) - fma(-15.234687407, Float64(Float64(y * 36.52704169880642) / Float64(z * z)), Float64(98.5170599679272 * Float64(y / Float64(z * z)))))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(y * N[(N[(z * N[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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[(-1.0 * N[(N[(y * 36.52704169880642), $MachinePrecision] / z), $MachinePrecision] + N[(N[(y * 3.13060547623), $MachinePrecision] + N[(y / N[(N[(z * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-15.234687407 * N[(N[(y * 36.52704169880642), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(98.5170599679272 * N[(y / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\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(\mathsf{fma}\left(-1, \frac{y \cdot 36.52704169880642}{z}, y \cdot 3.13060547623 + \frac{y}{\frac{z \cdot z}{t}}\right) - \mathsf{fma}\left(-15.234687407, \frac{y \cdot 36.52704169880642}{z \cdot z}, 98.5170599679272 \cdot \frac{y}{z \cdot z}\right)\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 96.4%
associate-/l*97.0%
fma-def97.0%
fma-def97.0%
fma-def97.0%
fma-def97.0%
fma-def97.0%
fma-def97.0%
fma-def97.0%
Simplified97.0%
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 82.2%
fma-def82.2%
distribute-rgt-out--82.2%
metadata-eval82.2%
+-commutative82.2%
*-commutative82.2%
associate-/l*99.9%
unpow299.9%
fma-def99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
unpow299.9%
unpow299.9%
Simplified99.9%
Final simplification98.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(/
(*
y
(+
(* z (+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))))
b))
(+
(*
z
(+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771))))
(if (<= t_1 INFINITY)
(+ t_1 x)
(+
x
(-
(fma
-1.0
(/ (* y 36.52704169880642) z)
(+ (* y 3.13060547623) (/ y (/ (* z z) t))))
(fma
-15.234687407
(/ (* y 36.52704169880642) (* z z))
(* 98.5170599679272 (/ y (* z z)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * ((z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))) + 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 + (fma(-1.0, ((y * 36.52704169880642) / z), ((y * 3.13060547623) + (y / ((z * z) / t)))) - fma(-15.234687407, ((y * 36.52704169880642) / (z * z)), (98.5170599679272 * (y / (z * z)))));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623))))))) + 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(fma(-1.0, Float64(Float64(y * 36.52704169880642) / z), Float64(Float64(y * 3.13060547623) + Float64(y / Float64(Float64(z * z) / t)))) - fma(-15.234687407, Float64(Float64(y * 36.52704169880642) / Float64(z * z)), Float64(98.5170599679272 * Float64(y / Float64(z * z)))))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[(z * N[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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[(N[(-1.0 * N[(N[(y * 36.52704169880642), $MachinePrecision] / z), $MachinePrecision] + N[(N[(y * 3.13060547623), $MachinePrecision] + N[(y / N[(N[(z * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-15.234687407 * N[(N[(y * 36.52704169880642), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(98.5170599679272 * N[(y / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\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 + \left(\mathsf{fma}\left(-1, \frac{y \cdot 36.52704169880642}{z}, y \cdot 3.13060547623 + \frac{y}{\frac{z \cdot z}{t}}\right) - \mathsf{fma}\left(-15.234687407, \frac{y \cdot 36.52704169880642}{z \cdot z}, 98.5170599679272 \cdot \frac{y}{z \cdot z}\right)\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 96.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 82.2%
fma-def82.2%
distribute-rgt-out--82.2%
metadata-eval82.2%
+-commutative82.2%
*-commutative82.2%
associate-/l*99.9%
unpow299.9%
fma-def99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
unpow299.9%
unpow299.9%
Simplified99.9%
Final simplification97.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(/
(*
y
(+
(* z (+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))))
b))
(+
(*
z
(+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771))))
(if (<= t_1 INFINITY) (+ t_1 x) (+ x (* y 3.13060547623)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * ((z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))) + 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.13060547623);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * ((z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))) + 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.13060547623);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * ((z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))) + 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.13060547623) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623))))))) + 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 * 3.13060547623)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * ((z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))) + 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.13060547623); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[(z * N[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 * 3.13060547623), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\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 + y \cdot 3.13060547623\\
\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 96.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 96.6%
*-commutative96.6%
Simplified96.6%
Final simplification96.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(* z (+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623))))))))
(t_2 (+ x (* y 3.13060547623))))
(if (<= z -1.04e+74)
t_2
(if (<= z -8.8e-7)
(+
x
(/
y
(/
(+
(*
z
(+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771)
t_1)))
(if (<= z 1.7e+37)
(+ x (/ (* y (+ t_1 b)) (+ 0.607771387771 (* z 11.9400905721))))
t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))));
double t_2 = x + (y * 3.13060547623);
double tmp;
if (z <= -1.04e+74) {
tmp = t_2;
} else if (z <= -8.8e-7) {
tmp = x + (y / (((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771) / t_1));
} else if (z <= 1.7e+37) {
tmp = x + ((y * (t_1 + b)) / (0.607771387771 + (z * 11.9400905721)));
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = z * (a + (z * (t + (z * (11.1667541262d0 + (z * 3.13060547623d0))))))
t_2 = x + (y * 3.13060547623d0)
if (z <= (-1.04d+74)) then
tmp = t_2
else if (z <= (-8.8d-7)) then
tmp = x + (y / (((z * ((z * ((z * (z + 15.234687407d0)) + 31.4690115749d0)) + 11.9400905721d0)) + 0.607771387771d0) / t_1))
else if (z <= 1.7d+37) then
tmp = x + ((y * (t_1 + b)) / (0.607771387771d0 + (z * 11.9400905721d0)))
else
tmp = t_2
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 = z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))));
double t_2 = x + (y * 3.13060547623);
double tmp;
if (z <= -1.04e+74) {
tmp = t_2;
} else if (z <= -8.8e-7) {
tmp = x + (y / (((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771) / t_1));
} else if (z <= 1.7e+37) {
tmp = x + ((y * (t_1 + b)) / (0.607771387771 + (z * 11.9400905721)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623)))))) t_2 = x + (y * 3.13060547623) tmp = 0 if z <= -1.04e+74: tmp = t_2 elif z <= -8.8e-7: tmp = x + (y / (((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771) / t_1)) elif z <= 1.7e+37: tmp = x + ((y * (t_1 + b)) / (0.607771387771 + (z * 11.9400905721))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623))))))) t_2 = Float64(x + Float64(y * 3.13060547623)) tmp = 0.0 if (z <= -1.04e+74) tmp = t_2; elseif (z <= -8.8e-7) tmp = Float64(x + Float64(y / Float64(Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771) / t_1))); elseif (z <= 1.7e+37) tmp = Float64(x + Float64(Float64(y * Float64(t_1 + b)) / Float64(0.607771387771 + Float64(z * 11.9400905721)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623)))))); t_2 = x + (y * 3.13060547623); tmp = 0.0; if (z <= -1.04e+74) tmp = t_2; elseif (z <= -8.8e-7) tmp = x + (y / (((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771) / t_1)); elseif (z <= 1.7e+37) tmp = x + ((y * (t_1 + b)) / (0.607771387771 + (z * 11.9400905721))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.04e+74], t$95$2, If[LessEqual[z, -8.8e-7], N[(x + N[(y / N[(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] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.7e+37], N[(x + N[(N[(y * N[(t$95$1 + b), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\\
t_2 := x + y \cdot 3.13060547623\\
\mathbf{if}\;z \leq -1.04 \cdot 10^{+74}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -8.8 \cdot 10^{-7}:\\
\;\;\;\;x + \frac{y}{\frac{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771}{t_1}}\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{+37}:\\
\;\;\;\;x + \frac{y \cdot \left(t_1 + b\right)}{0.607771387771 + z \cdot 11.9400905721}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -1.04e74 or 1.70000000000000003e37 < z Initial program 3.3%
associate-*l/2.3%
*-commutative2.3%
fma-def2.3%
*-commutative2.3%
fma-def2.3%
*-commutative2.3%
fma-def2.3%
*-commutative2.3%
fma-def2.3%
Simplified2.3%
Taylor expanded in z around inf 96.7%
*-commutative96.7%
Simplified96.7%
if -1.04e74 < z < -8.8000000000000004e-7Initial program 72.2%
associate-/l*77.7%
fma-def77.7%
fma-def77.7%
fma-def77.8%
fma-def77.8%
fma-def77.8%
fma-def77.8%
fma-def77.8%
Simplified77.8%
Taylor expanded in b around 0 71.9%
if -8.8000000000000004e-7 < z < 1.70000000000000003e37Initial program 99.1%
Taylor expanded in z around 0 96.9%
*-commutative91.1%
Simplified96.9%
Final simplification95.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -13.0)
(+
x
(/
y
(+
(/ 3.7269864963038164 z)
(-
0.31942702700572795
(/ (+ 3.241970391368047 (* t 0.10203362558171805)) (* z z))))))
(if (<= z 7.9e+37)
(+
x
(/
(*
y
(+
(* z (+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))))
b))
(+ 0.607771387771 (* z 11.9400905721))))
(+ x (* y 3.13060547623)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -13.0) {
tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - ((3.241970391368047 + (t * 0.10203362558171805)) / (z * z)))));
} else if (z <= 7.9e+37) {
tmp = x + ((y * ((z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))) + b)) / (0.607771387771 + (z * 11.9400905721)));
} else {
tmp = x + (y * 3.13060547623);
}
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 <= (-13.0d0)) then
tmp = x + (y / ((3.7269864963038164d0 / z) + (0.31942702700572795d0 - ((3.241970391368047d0 + (t * 0.10203362558171805d0)) / (z * z)))))
else if (z <= 7.9d+37) then
tmp = x + ((y * ((z * (a + (z * (t + (z * (11.1667541262d0 + (z * 3.13060547623d0))))))) + b)) / (0.607771387771d0 + (z * 11.9400905721d0)))
else
tmp = x + (y * 3.13060547623d0)
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 <= -13.0) {
tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - ((3.241970391368047 + (t * 0.10203362558171805)) / (z * z)))));
} else if (z <= 7.9e+37) {
tmp = x + ((y * ((z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))) + b)) / (0.607771387771 + (z * 11.9400905721)));
} else {
tmp = x + (y * 3.13060547623);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -13.0: tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - ((3.241970391368047 + (t * 0.10203362558171805)) / (z * z))))) elif z <= 7.9e+37: tmp = x + ((y * ((z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))) + b)) / (0.607771387771 + (z * 11.9400905721))) else: tmp = x + (y * 3.13060547623) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -13.0) tmp = Float64(x + Float64(y / Float64(Float64(3.7269864963038164 / z) + Float64(0.31942702700572795 - Float64(Float64(3.241970391368047 + Float64(t * 0.10203362558171805)) / Float64(z * z)))))); elseif (z <= 7.9e+37) tmp = Float64(x + Float64(Float64(y * Float64(Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623))))))) + b)) / Float64(0.607771387771 + Float64(z * 11.9400905721)))); else tmp = Float64(x + Float64(y * 3.13060547623)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -13.0) tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - ((3.241970391368047 + (t * 0.10203362558171805)) / (z * z))))); elseif (z <= 7.9e+37) tmp = x + ((y * ((z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))) + b)) / (0.607771387771 + (z * 11.9400905721))); else tmp = x + (y * 3.13060547623); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -13.0], N[(x + N[(y / N[(N[(3.7269864963038164 / z), $MachinePrecision] + N[(0.31942702700572795 - N[(N[(3.241970391368047 + N[(t * 0.10203362558171805), $MachinePrecision]), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.9e+37], N[(x + N[(N[(y * N[(N[(z * N[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -13:\\
\;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 - \frac{3.241970391368047 + t \cdot 0.10203362558171805}{z \cdot z}\right)}\\
\mathbf{elif}\;z \leq 7.9 \cdot 10^{+37}:\\
\;\;\;\;x + \frac{y \cdot \left(z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right) + b\right)}{0.607771387771 + z \cdot 11.9400905721}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\end{array}
\end{array}
if z < -13Initial program 18.2%
associate-/l*19.7%
fma-def19.7%
fma-def19.7%
fma-def19.7%
fma-def19.7%
fma-def19.7%
fma-def19.7%
fma-def19.7%
Simplified19.7%
Taylor expanded in z around inf 85.8%
associate-*r/85.8%
metadata-eval85.8%
mul-1-neg85.8%
*-commutative85.8%
unpow285.8%
Simplified85.8%
if -13 < z < 7.9000000000000001e37Initial program 99.1%
Taylor expanded in z around 0 96.4%
*-commutative90.5%
Simplified96.4%
if 7.9000000000000001e37 < z Initial program 6.7%
associate-*l/4.7%
*-commutative4.7%
fma-def4.7%
*-commutative4.7%
fma-def4.7%
*-commutative4.7%
fma-def4.7%
*-commutative4.7%
fma-def4.7%
Simplified4.7%
Taylor expanded in z around inf 93.5%
*-commutative93.5%
Simplified93.5%
Final simplification93.3%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -4.05e+68) (not (<= z 1.52e+26)))
(+ x (* y 3.13060547623))
(+
x
(/
(* y (+ b (* z a)))
(+
(* z (+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.05e+68) || !(z <= 1.52e+26)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + ((y * (b + (z * a))) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771));
}
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 <= (-4.05d+68)) .or. (.not. (z <= 1.52d+26))) then
tmp = x + (y * 3.13060547623d0)
else
tmp = x + ((y * (b + (z * a))) / ((z * ((z * ((z * (z + 15.234687407d0)) + 31.4690115749d0)) + 11.9400905721d0)) + 0.607771387771d0))
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 <= -4.05e+68) || !(z <= 1.52e+26)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + ((y * (b + (z * a))) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4.05e+68) or not (z <= 1.52e+26): tmp = x + (y * 3.13060547623) else: tmp = x + ((y * (b + (z * a))) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.05e+68) || !(z <= 1.52e+26)) tmp = Float64(x + Float64(y * 3.13060547623)); else 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))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -4.05e+68) || ~((z <= 1.52e+26))) tmp = x + (y * 3.13060547623); else tmp = x + ((y * (b + (z * a))) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.05e+68], N[Not[LessEqual[z, 1.52e+26]], $MachinePrecision]], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.05 \cdot 10^{+68} \lor \neg \left(z \leq 1.52 \cdot 10^{+26}\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;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}\\
\end{array}
\end{array}
if z < -4.0500000000000001e68 or 1.52e26 < z Initial program 5.4%
associate-*l/4.5%
*-commutative4.5%
fma-def4.5%
*-commutative4.5%
fma-def4.5%
*-commutative4.5%
fma-def4.5%
*-commutative4.5%
fma-def4.5%
Simplified4.5%
Taylor expanded in z around inf 94.8%
*-commutative94.8%
Simplified94.8%
if -4.0500000000000001e68 < z < 1.52e26Initial program 96.9%
Taylor expanded in z around 0 88.3%
associate-*r*86.0%
*-commutative86.0%
associate-*r*89.4%
distribute-lft-out90.7%
*-commutative90.7%
Simplified90.7%
Final simplification92.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.66e-19)
(+
x
(/
y
(+
(/ 3.7269864963038164 z)
(-
0.31942702700572795
(/ (+ 3.241970391368047 (* t 0.10203362558171805)) (* z z))))))
(if (<= z 1.5e+23)
(+ x (/ (* y (+ b (* z a))) (+ 0.607771387771 (* z 11.9400905721))))
(+ x (* y 3.13060547623)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.66e-19) {
tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - ((3.241970391368047 + (t * 0.10203362558171805)) / (z * z)))));
} else if (z <= 1.5e+23) {
tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * 11.9400905721)));
} else {
tmp = x + (y * 3.13060547623);
}
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.66d-19)) then
tmp = x + (y / ((3.7269864963038164d0 / z) + (0.31942702700572795d0 - ((3.241970391368047d0 + (t * 0.10203362558171805d0)) / (z * z)))))
else if (z <= 1.5d+23) then
tmp = x + ((y * (b + (z * a))) / (0.607771387771d0 + (z * 11.9400905721d0)))
else
tmp = x + (y * 3.13060547623d0)
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.66e-19) {
tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - ((3.241970391368047 + (t * 0.10203362558171805)) / (z * z)))));
} else if (z <= 1.5e+23) {
tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * 11.9400905721)));
} else {
tmp = x + (y * 3.13060547623);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.66e-19: tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - ((3.241970391368047 + (t * 0.10203362558171805)) / (z * z))))) elif z <= 1.5e+23: tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * 11.9400905721))) else: tmp = x + (y * 3.13060547623) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.66e-19) tmp = Float64(x + Float64(y / Float64(Float64(3.7269864963038164 / z) + Float64(0.31942702700572795 - Float64(Float64(3.241970391368047 + Float64(t * 0.10203362558171805)) / Float64(z * z)))))); elseif (z <= 1.5e+23) tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * a))) / Float64(0.607771387771 + Float64(z * 11.9400905721)))); else tmp = Float64(x + Float64(y * 3.13060547623)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.66e-19) tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - ((3.241970391368047 + (t * 0.10203362558171805)) / (z * z))))); elseif (z <= 1.5e+23) tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * 11.9400905721))); else tmp = x + (y * 3.13060547623); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.66e-19], N[(x + N[(y / N[(N[(3.7269864963038164 / z), $MachinePrecision] + N[(0.31942702700572795 - N[(N[(3.241970391368047 + N[(t * 0.10203362558171805), $MachinePrecision]), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e+23], 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 * 3.13060547623), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.66 \cdot 10^{-19}:\\
\;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 - \frac{3.241970391368047 + t \cdot 0.10203362558171805}{z \cdot z}\right)}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+23}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot a\right)}{0.607771387771 + z \cdot 11.9400905721}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\end{array}
\end{array}
if z < -1.65999999999999998e-19Initial program 20.7%
associate-/l*22.2%
fma-def22.2%
fma-def22.2%
fma-def22.2%
fma-def22.2%
fma-def22.2%
fma-def22.2%
fma-def22.2%
Simplified22.2%
Taylor expanded in z around inf 83.4%
associate-*r/83.4%
metadata-eval83.4%
mul-1-neg83.4%
*-commutative83.4%
unpow283.4%
Simplified83.4%
if -1.65999999999999998e-19 < z < 1.5e23Initial program 99.8%
Taylor expanded in z around 0 92.4%
associate-*r*89.9%
*-commutative89.9%
associate-*r*93.7%
distribute-lft-out95.1%
*-commutative95.1%
Simplified95.1%
Taylor expanded in z around 0 93.4%
*-commutative93.4%
Simplified93.4%
if 1.5e23 < z Initial program 12.4%
associate-*l/10.6%
*-commutative10.6%
fma-def10.6%
*-commutative10.6%
fma-def10.6%
*-commutative10.6%
fma-def10.6%
*-commutative10.6%
fma-def10.6%
Simplified10.6%
Taylor expanded in z around inf 88.1%
*-commutative88.1%
Simplified88.1%
Final simplification89.9%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -1e+38) (not (<= z 4.5e+22)))
(+ x (* y 3.13060547623))
(+
x
(+ (* y (* b 1.6453555072203998)) (* y (* (* z a) 1.6453555072203998))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1e+38) || !(z <= 4.5e+22)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + ((y * (b * 1.6453555072203998)) + (y * ((z * a) * 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 <= (-1d+38)) .or. (.not. (z <= 4.5d+22))) then
tmp = x + (y * 3.13060547623d0)
else
tmp = x + ((y * (b * 1.6453555072203998d0)) + (y * ((z * a) * 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 <= -1e+38) || !(z <= 4.5e+22)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + ((y * (b * 1.6453555072203998)) + (y * ((z * a) * 1.6453555072203998)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1e+38) or not (z <= 4.5e+22): tmp = x + (y * 3.13060547623) else: tmp = x + ((y * (b * 1.6453555072203998)) + (y * ((z * a) * 1.6453555072203998))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1e+38) || !(z <= 4.5e+22)) tmp = Float64(x + Float64(y * 3.13060547623)); else tmp = Float64(x + Float64(Float64(y * Float64(b * 1.6453555072203998)) + Float64(y * Float64(Float64(z * a) * 1.6453555072203998)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1e+38) || ~((z <= 4.5e+22))) tmp = x + (y * 3.13060547623); else tmp = x + ((y * (b * 1.6453555072203998)) + (y * ((z * a) * 1.6453555072203998))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1e+38], N[Not[LessEqual[z, 4.5e+22]], $MachinePrecision]], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(b * 1.6453555072203998), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[(z * a), $MachinePrecision] * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+38} \lor \neg \left(z \leq 4.5 \cdot 10^{+22}\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot \left(b \cdot 1.6453555072203998\right) + y \cdot \left(\left(z \cdot a\right) \cdot 1.6453555072203998\right)\right)\\
\end{array}
\end{array}
if z < -9.99999999999999977e37 or 4.4999999999999998e22 < z Initial program 8.3%
associate-*l/7.4%
*-commutative7.4%
fma-def7.4%
*-commutative7.4%
fma-def7.4%
*-commutative7.4%
fma-def7.4%
*-commutative7.4%
fma-def7.4%
Simplified7.4%
Taylor expanded in z around inf 91.2%
*-commutative91.2%
Simplified91.2%
if -9.99999999999999977e37 < z < 4.4999999999999998e22Initial program 98.5%
Taylor expanded in z around 0 89.6%
associate-*r*87.3%
*-commutative87.3%
associate-*r*90.8%
distribute-lft-out92.1%
*-commutative92.1%
Simplified92.1%
Taylor expanded in b around inf 90.8%
Taylor expanded in z around 0 88.4%
*-commutative88.4%
associate-*l*88.3%
Simplified88.3%
Taylor expanded in z around 0 87.7%
associate-*r*87.7%
*-commutative87.7%
associate-*l*87.7%
Simplified87.7%
Final simplification89.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -0.085)
(+ x (- (* y 3.13060547623) (/ (* y 36.52704169880642) z)))
(if (<= z 6e+22)
(+ x (/ (* y (+ b (* z a))) (+ 0.607771387771 (* z 11.9400905721))))
(+ x (* y 3.13060547623)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -0.085) {
tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z));
} else if (z <= 6e+22) {
tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * 11.9400905721)));
} else {
tmp = x + (y * 3.13060547623);
}
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.085d0)) then
tmp = x + ((y * 3.13060547623d0) - ((y * 36.52704169880642d0) / z))
else if (z <= 6d+22) then
tmp = x + ((y * (b + (z * a))) / (0.607771387771d0 + (z * 11.9400905721d0)))
else
tmp = x + (y * 3.13060547623d0)
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.085) {
tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z));
} else if (z <= 6e+22) {
tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * 11.9400905721)));
} else {
tmp = x + (y * 3.13060547623);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -0.085: tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z)) elif z <= 6e+22: tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * 11.9400905721))) else: tmp = x + (y * 3.13060547623) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -0.085) tmp = Float64(x + Float64(Float64(y * 3.13060547623) - Float64(Float64(y * 36.52704169880642) / z))); elseif (z <= 6e+22) tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * a))) / Float64(0.607771387771 + Float64(z * 11.9400905721)))); else tmp = Float64(x + Float64(y * 3.13060547623)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -0.085) tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z)); elseif (z <= 6e+22) tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * 11.9400905721))); else tmp = x + (y * 3.13060547623); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -0.085], N[(x + N[(N[(y * 3.13060547623), $MachinePrecision] - N[(N[(y * 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e+22], 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 * 3.13060547623), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.085:\\
\;\;\;\;x + \left(y \cdot 3.13060547623 - \frac{y \cdot 36.52704169880642}{z}\right)\\
\mathbf{elif}\;z \leq 6 \cdot 10^{+22}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot a\right)}{0.607771387771 + z \cdot 11.9400905721}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\end{array}
\end{array}
if z < -0.0850000000000000061Initial program 19.5%
associate-*l/20.8%
*-commutative20.8%
fma-def20.8%
*-commutative20.8%
fma-def20.8%
*-commutative20.8%
fma-def20.8%
*-commutative20.8%
fma-def20.8%
Simplified20.8%
Taylor expanded in z around -inf 84.6%
+-commutative84.6%
mul-1-neg84.6%
unsub-neg84.6%
*-commutative84.6%
distribute-rgt-out--84.6%
metadata-eval84.6%
Simplified84.6%
if -0.0850000000000000061 < z < 6e22Initial program 99.8%
Taylor expanded in z around 0 91.8%
associate-*r*89.3%
*-commutative89.3%
associate-*r*93.1%
distribute-lft-out94.5%
*-commutative94.5%
Simplified94.5%
Taylor expanded in z around 0 92.8%
*-commutative92.8%
Simplified92.8%
if 6e22 < z Initial program 12.4%
associate-*l/10.6%
*-commutative10.6%
fma-def10.6%
*-commutative10.6%
fma-def10.6%
*-commutative10.6%
fma-def10.6%
*-commutative10.6%
fma-def10.6%
Simplified10.6%
Taylor expanded in z around inf 88.1%
*-commutative88.1%
Simplified88.1%
Final simplification89.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -0.085)
(+ x (- (* y 3.13060547623) (/ (* y 36.52704169880642) z)))
(if (<= z 7.2e+22)
(+ x (* (* y b) (/ 1.0 (+ 0.607771387771 (* z 11.9400905721)))))
(+ x (* y 3.13060547623)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -0.085) {
tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z));
} else if (z <= 7.2e+22) {
tmp = x + ((y * b) * (1.0 / (0.607771387771 + (z * 11.9400905721))));
} else {
tmp = x + (y * 3.13060547623);
}
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.085d0)) then
tmp = x + ((y * 3.13060547623d0) - ((y * 36.52704169880642d0) / z))
else if (z <= 7.2d+22) then
tmp = x + ((y * b) * (1.0d0 / (0.607771387771d0 + (z * 11.9400905721d0))))
else
tmp = x + (y * 3.13060547623d0)
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.085) {
tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z));
} else if (z <= 7.2e+22) {
tmp = x + ((y * b) * (1.0 / (0.607771387771 + (z * 11.9400905721))));
} else {
tmp = x + (y * 3.13060547623);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -0.085: tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z)) elif z <= 7.2e+22: tmp = x + ((y * b) * (1.0 / (0.607771387771 + (z * 11.9400905721)))) else: tmp = x + (y * 3.13060547623) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -0.085) tmp = Float64(x + Float64(Float64(y * 3.13060547623) - Float64(Float64(y * 36.52704169880642) / z))); elseif (z <= 7.2e+22) tmp = Float64(x + Float64(Float64(y * b) * Float64(1.0 / Float64(0.607771387771 + Float64(z * 11.9400905721))))); else tmp = Float64(x + Float64(y * 3.13060547623)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -0.085) tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z)); elseif (z <= 7.2e+22) tmp = x + ((y * b) * (1.0 / (0.607771387771 + (z * 11.9400905721)))); else tmp = x + (y * 3.13060547623); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -0.085], N[(x + N[(N[(y * 3.13060547623), $MachinePrecision] - N[(N[(y * 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.2e+22], N[(x + N[(N[(y * b), $MachinePrecision] * N[(1.0 / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.085:\\
\;\;\;\;x + \left(y \cdot 3.13060547623 - \frac{y \cdot 36.52704169880642}{z}\right)\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+22}:\\
\;\;\;\;x + \left(y \cdot b\right) \cdot \frac{1}{0.607771387771 + z \cdot 11.9400905721}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\end{array}
\end{array}
if z < -0.0850000000000000061Initial program 19.5%
associate-*l/20.8%
*-commutative20.8%
fma-def20.8%
*-commutative20.8%
fma-def20.8%
*-commutative20.8%
fma-def20.8%
*-commutative20.8%
fma-def20.8%
Simplified20.8%
Taylor expanded in z around -inf 84.6%
+-commutative84.6%
mul-1-neg84.6%
unsub-neg84.6%
*-commutative84.6%
distribute-rgt-out--84.6%
metadata-eval84.6%
Simplified84.6%
if -0.0850000000000000061 < z < 7.2e22Initial program 99.8%
associate-/l*99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in z around 0 81.1%
Taylor expanded in b around inf 81.9%
div-inv81.9%
*-commutative81.9%
Applied egg-rr81.9%
if 7.2e22 < z Initial program 12.4%
associate-*l/10.6%
*-commutative10.6%
fma-def10.6%
*-commutative10.6%
fma-def10.6%
*-commutative10.6%
fma-def10.6%
*-commutative10.6%
fma-def10.6%
Simplified10.6%
Taylor expanded in z around inf 88.1%
*-commutative88.1%
Simplified88.1%
Final simplification83.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6.5e+21) (not (<= z 4.5e+22))) (+ x (* y 3.13060547623)) (+ x (* 1.6453555072203998 (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.5e+21) || !(z <= 4.5e+22)) {
tmp = x + (y * 3.13060547623);
} 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 <= (-6.5d+21)) .or. (.not. (z <= 4.5d+22))) then
tmp = x + (y * 3.13060547623d0)
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 <= -6.5e+21) || !(z <= 4.5e+22)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + (1.6453555072203998 * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6.5e+21) or not (z <= 4.5e+22): tmp = x + (y * 3.13060547623) else: tmp = x + (1.6453555072203998 * (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6.5e+21) || !(z <= 4.5e+22)) tmp = Float64(x + Float64(y * 3.13060547623)); 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 <= -6.5e+21) || ~((z <= 4.5e+22))) tmp = x + (y * 3.13060547623); else tmp = x + (1.6453555072203998 * (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6.5e+21], N[Not[LessEqual[z, 4.5e+22]], $MachinePrecision]], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], N[(x + N[(1.6453555072203998 * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+21} \lor \neg \left(z \leq 4.5 \cdot 10^{+22}\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x + 1.6453555072203998 \cdot \left(y \cdot b\right)\\
\end{array}
\end{array}
if z < -6.5e21 or 4.4999999999999998e22 < z Initial program 10.8%
associate-*l/10.8%
*-commutative10.8%
fma-def10.8%
*-commutative10.8%
fma-def10.8%
*-commutative10.8%
fma-def10.8%
*-commutative10.8%
fma-def10.8%
Simplified10.8%
Taylor expanded in z around inf 88.0%
*-commutative88.0%
Simplified88.0%
if -6.5e21 < z < 4.4999999999999998e22Initial program 99.8%
associate-*l/99.8%
*-commutative99.8%
fma-def99.8%
*-commutative99.8%
fma-def99.8%
*-commutative99.8%
fma-def99.8%
*-commutative99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in z around 0 80.8%
Final simplification83.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6e-66) (not (<= z 8.8e-64))) (+ x (* y 3.13060547623)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6e-66) || !(z <= 8.8e-64)) {
tmp = x + (y * 3.13060547623);
} 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 <= (-6d-66)) .or. (.not. (z <= 8.8d-64))) then
tmp = x + (y * 3.13060547623d0)
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 <= -6e-66) || !(z <= 8.8e-64)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6e-66) or not (z <= 8.8e-64): tmp = x + (y * 3.13060547623) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6e-66) || !(z <= 8.8e-64)) tmp = Float64(x + Float64(y * 3.13060547623)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6e-66) || ~((z <= 8.8e-64))) tmp = x + (y * 3.13060547623); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6e-66], N[Not[LessEqual[z, 8.8e-64]], $MachinePrecision]], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{-66} \lor \neg \left(z \leq 8.8 \cdot 10^{-64}\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -6.0000000000000004e-66 or 8.7999999999999998e-64 < z Initial program 35.4%
associate-*l/35.3%
*-commutative35.3%
fma-def35.3%
*-commutative35.3%
fma-def35.3%
*-commutative35.3%
fma-def35.3%
*-commutative35.3%
fma-def35.3%
Simplified35.3%
Taylor expanded in z around inf 76.4%
*-commutative76.4%
Simplified76.4%
if -6.0000000000000004e-66 < z < 8.7999999999999998e-64Initial program 99.8%
associate-/l*99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in z around 0 86.0%
Taylor expanded in b around inf 86.9%
Taylor expanded in x around inf 57.4%
Final simplification68.2%
(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 63.3%
associate-/l*63.6%
fma-def63.6%
fma-def63.6%
fma-def63.6%
fma-def63.6%
fma-def63.6%
fma-def63.6%
fma-def63.6%
Simplified63.6%
Taylor expanded in z around 0 66.7%
Taylor expanded in b around inf 67.1%
Taylor expanded in x around inf 51.9%
Final simplification51.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 2023224
(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))))