
(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 12 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 -6.8e+47) (not (<= z 6.6e+35)))
(+
x
(+
(/
y
(-
(+ 0.31942702700572795 (/ 3.7269864963038164 z))
(/ 3.241970391368047 (* z z))))
(* 0.10203362558171805 (* 9.800690647801265 (/ y (/ (* z z) t))))))
(+
x
(/
(* y (+ b (* z (+ a (* z (+ t (* z 11.1667541262)))))))
(+
(* 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 <= -6.8e+47) || !(z <= 6.6e+35)) {
tmp = x + ((y / ((0.31942702700572795 + (3.7269864963038164 / z)) - (3.241970391368047 / (z * z)))) + (0.10203362558171805 * (9.800690647801265 * (y / ((z * z) / t)))));
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / ((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 <= (-6.8d+47)) .or. (.not. (z <= 6.6d+35))) then
tmp = x + ((y / ((0.31942702700572795d0 + (3.7269864963038164d0 / z)) - (3.241970391368047d0 / (z * z)))) + (0.10203362558171805d0 * (9.800690647801265d0 * (y / ((z * z) / t)))))
else
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262d0))))))) / ((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 <= -6.8e+47) || !(z <= 6.6e+35)) {
tmp = x + ((y / ((0.31942702700572795 + (3.7269864963038164 / z)) - (3.241970391368047 / (z * z)))) + (0.10203362558171805 * (9.800690647801265 * (y / ((z * z) / t)))));
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / ((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 <= -6.8e+47) or not (z <= 6.6e+35): tmp = x + ((y / ((0.31942702700572795 + (3.7269864963038164 / z)) - (3.241970391368047 / (z * z)))) + (0.10203362558171805 * (9.800690647801265 * (y / ((z * z) / t))))) else: tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / ((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 <= -6.8e+47) || !(z <= 6.6e+35)) tmp = Float64(x + Float64(Float64(y / Float64(Float64(0.31942702700572795 + Float64(3.7269864963038164 / z)) - Float64(3.241970391368047 / Float64(z * z)))) + Float64(0.10203362558171805 * Float64(9.800690647801265 * Float64(y / Float64(Float64(z * z) / t)))))); else tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * 11.1667541262))))))) / 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 <= -6.8e+47) || ~((z <= 6.6e+35))) tmp = x + ((y / ((0.31942702700572795 + (3.7269864963038164 / z)) - (3.241970391368047 / (z * z)))) + (0.10203362558171805 * (9.800690647801265 * (y / ((z * z) / t))))); else tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / ((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, -6.8e+47], N[Not[LessEqual[z, 6.6e+35]], $MachinePrecision]], N[(x + N[(N[(y / N[(N[(0.31942702700572795 + N[(3.7269864963038164 / z), $MachinePrecision]), $MachinePrecision] - N[(3.241970391368047 / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.10203362558171805 * N[(9.800690647801265 * N[(y / N[(N[(z * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * N[(t + N[(z * 11.1667541262), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 -6.8 \cdot 10^{+47} \lor \neg \left(z \leq 6.6 \cdot 10^{+35}\right):\\
\;\;\;\;x + \left(\frac{y}{\left(0.31942702700572795 + \frac{3.7269864963038164}{z}\right) - \frac{3.241970391368047}{z \cdot z}} + 0.10203362558171805 \cdot \left(9.800690647801265 \cdot \frac{y}{\frac{z \cdot z}{t}}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot 11.1667541262\right)\right)\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 < -6.7999999999999996e47 or 6.6000000000000003e35 < z Initial program 4.9%
associate-/l*12.1%
fma-def12.1%
fma-def12.1%
fma-def12.1%
fma-def12.1%
fma-def12.1%
fma-def12.1%
fma-def12.1%
Simplified12.1%
Taylor expanded in z around inf 93.7%
associate-*r/93.7%
metadata-eval93.7%
mul-1-neg93.7%
*-commutative93.7%
unpow293.7%
Simplified93.7%
Taylor expanded in t around 0 94.9%
associate--l+94.9%
associate-*r/94.9%
metadata-eval94.9%
associate-+r-94.9%
+-commutative94.9%
associate-*r/94.9%
metadata-eval94.9%
unpow294.9%
times-frac98.3%
unpow298.3%
Simplified98.3%
Taylor expanded in z around inf 94.9%
associate-/l*99.9%
unpow299.9%
Simplified99.9%
if -6.7999999999999996e47 < z < 6.6000000000000003e35Initial program 99.8%
Taylor expanded in z around 0 99.8%
*-commutative99.8%
Simplified99.8%
Final simplification99.8%
(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
(+
(/
y
(-
(+ 0.31942702700572795 (/ 3.7269864963038164 z))
(/ 3.241970391368047 (* z z))))
(* 0.10203362558171805 (* 9.800690647801265 (/ y (/ (* z z) t))))))))
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 + ((y / ((0.31942702700572795 + (3.7269864963038164 / z)) - (3.241970391368047 / (z * z)))) + (0.10203362558171805 * (9.800690647801265 * (y / ((z * z) / t)))));
}
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(y / Float64(Float64(0.31942702700572795 + Float64(3.7269864963038164 / z)) - Float64(3.241970391368047 / Float64(z * z)))) + Float64(0.10203362558171805 * Float64(9.800690647801265 * Float64(y / Float64(Float64(z * z) / t)))))); 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[(y / N[(N[(0.31942702700572795 + N[(3.7269864963038164 / z), $MachinePrecision]), $MachinePrecision] - N[(3.241970391368047 / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.10203362558171805 * N[(9.800690647801265 * N[(y / N[(N[(z * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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(\frac{y}{\left(0.31942702700572795 + \frac{3.7269864963038164}{z}\right) - \frac{3.241970391368047}{z \cdot z}} + 0.10203362558171805 \cdot \left(9.800690647801265 \cdot \frac{y}{\frac{z \cdot z}{t}}\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 93.2%
associate-/l*98.5%
fma-def98.5%
fma-def98.5%
fma-def98.5%
fma-def98.5%
fma-def98.5%
fma-def98.5%
fma-def98.5%
Simplified98.5%
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 95.7%
associate-*r/95.7%
metadata-eval95.7%
mul-1-neg95.7%
*-commutative95.7%
unpow295.7%
Simplified95.7%
Taylor expanded in t around 0 95.0%
associate--l+95.0%
associate-*r/95.0%
metadata-eval95.0%
associate-+r-95.0%
+-commutative95.0%
associate-*r/95.0%
metadata-eval95.0%
unpow295.0%
times-frac98.0%
unpow298.0%
Simplified98.0%
Taylor expanded in z around inf 95.0%
associate-/l*99.9%
unpow299.9%
Simplified99.9%
Final simplification99.1%
(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
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)))
(+
x
(+
(/
y
(-
(+ 0.31942702700572795 (/ 3.7269864963038164 z))
(/ 3.241970391368047 (* z z))))
(* 0.10203362558171805 (* 9.800690647801265 (/ y (/ (* z z) t))))))))
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(z, fma(z, fma(z, (z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)) * fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b));
} else {
tmp = x + ((y / ((0.31942702700572795 + (3.7269864963038164 / z)) - (3.241970391368047 / (z * z)))) + (0.10203362558171805 * (9.800690647801265 * (y / ((z * z) / t)))));
}
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(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))); else tmp = Float64(x + Float64(Float64(y / Float64(Float64(0.31942702700572795 + Float64(3.7269864963038164 / z)) - Float64(3.241970391368047 / Float64(z * z)))) + Float64(0.10203362558171805 * Float64(9.800690647801265 * Float64(y / Float64(Float64(z * z) / t)))))); 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[(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], N[(x + N[(N[(y / N[(N[(0.31942702700572795 + N[(3.7269864963038164 / z), $MachinePrecision]), $MachinePrecision] - N[(3.241970391368047 / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.10203362558171805 * N[(9.800690647801265 * N[(y / N[(N[(z * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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}{\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)\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{y}{\left(0.31942702700572795 + \frac{3.7269864963038164}{z}\right) - \frac{3.241970391368047}{z \cdot z}} + 0.10203362558171805 \cdot \left(9.800690647801265 \cdot \frac{y}{\frac{z \cdot z}{t}}\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 93.2%
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%
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 95.7%
associate-*r/95.7%
metadata-eval95.7%
mul-1-neg95.7%
*-commutative95.7%
unpow295.7%
Simplified95.7%
Taylor expanded in t around 0 95.0%
associate--l+95.0%
associate-*r/95.0%
metadata-eval95.0%
associate-+r-95.0%
+-commutative95.0%
associate-*r/95.0%
metadata-eval95.0%
unpow295.0%
times-frac98.0%
unpow298.0%
Simplified98.0%
Taylor expanded in z around inf 95.0%
associate-/l*99.9%
unpow299.9%
Simplified99.9%
Final simplification98.5%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -4.6e+23) (not (<= z 2.6e-34)))
(+
x
(+
(/
y
(-
(+ 0.31942702700572795 (/ 3.7269864963038164 z))
(/ 3.241970391368047 (* z z))))
(* 0.10203362558171805 (* 9.800690647801265 (/ y (/ (* z z) t))))))
(+
(* z (+ (* 1.6453555072203998 (* y a)) (* -32.324150453290734 (* y b))))
(+ x (* 1.6453555072203998 (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.6e+23) || !(z <= 2.6e-34)) {
tmp = x + ((y / ((0.31942702700572795 + (3.7269864963038164 / z)) - (3.241970391368047 / (z * z)))) + (0.10203362558171805 * (9.800690647801265 * (y / ((z * z) / t)))));
} else {
tmp = (z * ((1.6453555072203998 * (y * a)) + (-32.324150453290734 * (y * b)))) + (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 <= (-4.6d+23)) .or. (.not. (z <= 2.6d-34))) then
tmp = x + ((y / ((0.31942702700572795d0 + (3.7269864963038164d0 / z)) - (3.241970391368047d0 / (z * z)))) + (0.10203362558171805d0 * (9.800690647801265d0 * (y / ((z * z) / t)))))
else
tmp = (z * ((1.6453555072203998d0 * (y * a)) + ((-32.324150453290734d0) * (y * b)))) + (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 <= -4.6e+23) || !(z <= 2.6e-34)) {
tmp = x + ((y / ((0.31942702700572795 + (3.7269864963038164 / z)) - (3.241970391368047 / (z * z)))) + (0.10203362558171805 * (9.800690647801265 * (y / ((z * z) / t)))));
} else {
tmp = (z * ((1.6453555072203998 * (y * a)) + (-32.324150453290734 * (y * b)))) + (x + (1.6453555072203998 * (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4.6e+23) or not (z <= 2.6e-34): tmp = x + ((y / ((0.31942702700572795 + (3.7269864963038164 / z)) - (3.241970391368047 / (z * z)))) + (0.10203362558171805 * (9.800690647801265 * (y / ((z * z) / t))))) else: tmp = (z * ((1.6453555072203998 * (y * a)) + (-32.324150453290734 * (y * b)))) + (x + (1.6453555072203998 * (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.6e+23) || !(z <= 2.6e-34)) tmp = Float64(x + Float64(Float64(y / Float64(Float64(0.31942702700572795 + Float64(3.7269864963038164 / z)) - Float64(3.241970391368047 / Float64(z * z)))) + Float64(0.10203362558171805 * Float64(9.800690647801265 * Float64(y / Float64(Float64(z * z) / t)))))); else tmp = Float64(Float64(z * Float64(Float64(1.6453555072203998 * Float64(y * a)) + Float64(-32.324150453290734 * Float64(y * b)))) + 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 <= -4.6e+23) || ~((z <= 2.6e-34))) tmp = x + ((y / ((0.31942702700572795 + (3.7269864963038164 / z)) - (3.241970391368047 / (z * z)))) + (0.10203362558171805 * (9.800690647801265 * (y / ((z * z) / t))))); else tmp = (z * ((1.6453555072203998 * (y * a)) + (-32.324150453290734 * (y * b)))) + (x + (1.6453555072203998 * (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.6e+23], N[Not[LessEqual[z, 2.6e-34]], $MachinePrecision]], N[(x + N[(N[(y / N[(N[(0.31942702700572795 + N[(3.7269864963038164 / z), $MachinePrecision]), $MachinePrecision] - N[(3.241970391368047 / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.10203362558171805 * N[(9.800690647801265 * N[(y / N[(N[(z * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(N[(1.6453555072203998 * N[(y * a), $MachinePrecision]), $MachinePrecision] + N[(-32.324150453290734 * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x + N[(1.6453555072203998 * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{+23} \lor \neg \left(z \leq 2.6 \cdot 10^{-34}\right):\\
\;\;\;\;x + \left(\frac{y}{\left(0.31942702700572795 + \frac{3.7269864963038164}{z}\right) - \frac{3.241970391368047}{z \cdot z}} + 0.10203362558171805 \cdot \left(9.800690647801265 \cdot \frac{y}{\frac{z \cdot z}{t}}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(1.6453555072203998 \cdot \left(y \cdot a\right) + -32.324150453290734 \cdot \left(y \cdot b\right)\right) + \left(x + 1.6453555072203998 \cdot \left(y \cdot b\right)\right)\\
\end{array}
\end{array}
if z < -4.6000000000000001e23 or 2.5999999999999999e-34 < z Initial program 16.4%
associate-/l*22.7%
fma-def22.7%
fma-def22.7%
fma-def22.7%
fma-def22.7%
fma-def22.7%
fma-def22.7%
fma-def22.7%
Simplified22.7%
Taylor expanded in z around inf 88.6%
associate-*r/88.6%
metadata-eval88.6%
mul-1-neg88.6%
*-commutative88.6%
unpow288.6%
Simplified88.6%
Taylor expanded in t around 0 92.1%
associate--l+92.1%
associate-*r/92.1%
metadata-eval92.1%
associate-+r-92.1%
+-commutative92.1%
associate-*r/92.1%
metadata-eval92.1%
unpow292.1%
times-frac95.1%
unpow295.1%
Simplified95.1%
Taylor expanded in z around inf 92.1%
associate-/l*96.5%
unpow296.5%
Simplified96.5%
if -4.6000000000000001e23 < z < 2.5999999999999999e-34Initial program 99.8%
+-commutative99.8%
associate-*l/99.8%
*-commutative99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in z around 0 85.5%
Final simplification91.1%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -12.6) (not (<= z 1.05e+20)))
(+
x
(+
(/
y
(-
(+ 0.31942702700572795 (/ 3.7269864963038164 z))
(/ 3.241970391368047 (* z z))))
(* 0.10203362558171805 (* 9.800690647801265 (/ y (/ (* z z) t))))))
(+
x
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
(+ 0.607771387771 (* z 11.9400905721))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -12.6) || !(z <= 1.05e+20)) {
tmp = x + ((y / ((0.31942702700572795 + (3.7269864963038164 / z)) - (3.241970391368047 / (z * z)))) + (0.10203362558171805 * (9.800690647801265 * (y / ((z * z) / t)))));
} else {
tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * 11.9400905721)));
}
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 <= (-12.6d0)) .or. (.not. (z <= 1.05d+20))) then
tmp = x + ((y / ((0.31942702700572795d0 + (3.7269864963038164d0 / z)) - (3.241970391368047d0 / (z * z)))) + (0.10203362558171805d0 * (9.800690647801265d0 * (y / ((z * z) / t)))))
else
tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623d0) + 11.1667541262d0)) + t)) + a)) + b)) / (0.607771387771d0 + (z * 11.9400905721d0)))
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 <= -12.6) || !(z <= 1.05e+20)) {
tmp = x + ((y / ((0.31942702700572795 + (3.7269864963038164 / z)) - (3.241970391368047 / (z * z)))) + (0.10203362558171805 * (9.800690647801265 * (y / ((z * z) / t)))));
} else {
tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * 11.9400905721)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -12.6) or not (z <= 1.05e+20): tmp = x + ((y / ((0.31942702700572795 + (3.7269864963038164 / z)) - (3.241970391368047 / (z * z)))) + (0.10203362558171805 * (9.800690647801265 * (y / ((z * z) / t))))) else: tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * 11.9400905721))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -12.6) || !(z <= 1.05e+20)) tmp = Float64(x + Float64(Float64(y / Float64(Float64(0.31942702700572795 + Float64(3.7269864963038164 / z)) - Float64(3.241970391368047 / Float64(z * z)))) + Float64(0.10203362558171805 * Float64(9.800690647801265 * Float64(y / Float64(Float64(z * z) / t)))))); 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(z * 11.9400905721)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -12.6) || ~((z <= 1.05e+20))) tmp = x + ((y / ((0.31942702700572795 + (3.7269864963038164 / z)) - (3.241970391368047 / (z * z)))) + (0.10203362558171805 * (9.800690647801265 * (y / ((z * z) / t))))); else tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * 11.9400905721))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -12.6], N[Not[LessEqual[z, 1.05e+20]], $MachinePrecision]], N[(x + N[(N[(y / N[(N[(0.31942702700572795 + N[(3.7269864963038164 / z), $MachinePrecision]), $MachinePrecision] - N[(3.241970391368047 / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.10203362558171805 * N[(9.800690647801265 * N[(y / N[(N[(z * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -12.6 \lor \neg \left(z \leq 1.05 \cdot 10^{+20}\right):\\
\;\;\;\;x + \left(\frac{y}{\left(0.31942702700572795 + \frac{3.7269864963038164}{z}\right) - \frac{3.241970391368047}{z \cdot z}} + 0.10203362558171805 \cdot \left(9.800690647801265 \cdot \frac{y}{\frac{z \cdot z}{t}}\right)\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 + z \cdot 11.9400905721}\\
\end{array}
\end{array}
if z < -12.5999999999999996 or 1.05e20 < z Initial program 11.0%
associate-/l*17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
Simplified17.8%
Taylor expanded in z around inf 92.5%
associate-*r/92.5%
metadata-eval92.5%
mul-1-neg92.5%
*-commutative92.5%
unpow292.5%
Simplified92.5%
Taylor expanded in t around 0 94.4%
associate--l+94.4%
associate-*r/94.4%
metadata-eval94.4%
associate-+r-94.4%
+-commutative94.4%
associate-*r/94.4%
metadata-eval94.4%
unpow294.4%
times-frac97.6%
unpow297.6%
Simplified97.6%
Taylor expanded in z around inf 94.4%
associate-/l*99.1%
unpow299.1%
Simplified99.1%
if -12.5999999999999996 < z < 1.05e20Initial program 99.8%
Taylor expanded in z around 0 97.0%
*-commutative97.0%
Simplified97.0%
Final simplification98.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.75e+26)
(+
x
(/
y
(+
(/ 3.7269864963038164 z)
(+ 0.31942702700572795 (/ (* t -0.10203362558171805) (* z z))))))
(if (<= z 5.5e-48)
(+ x (* y (* b 1.6453555072203998)))
(if (<= z 1.46e+27)
(+
x
(/
(* a (* y z))
(+
0.607771387771
(* z (+ 11.9400905721 (* z (+ 31.4690115749 (* z z))))))))
(+ x (* y 3.13060547623))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.75e+26) {
tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 + ((t * -0.10203362558171805) / (z * z)))));
} else if (z <= 5.5e-48) {
tmp = x + (y * (b * 1.6453555072203998));
} else if (z <= 1.46e+27) {
tmp = x + ((a * (y * z)) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * z)))))));
} 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.75d+26)) then
tmp = x + (y / ((3.7269864963038164d0 / z) + (0.31942702700572795d0 + ((t * (-0.10203362558171805d0)) / (z * z)))))
else if (z <= 5.5d-48) then
tmp = x + (y * (b * 1.6453555072203998d0))
else if (z <= 1.46d+27) then
tmp = x + ((a * (y * z)) / (0.607771387771d0 + (z * (11.9400905721d0 + (z * (31.4690115749d0 + (z * z)))))))
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.75e+26) {
tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 + ((t * -0.10203362558171805) / (z * z)))));
} else if (z <= 5.5e-48) {
tmp = x + (y * (b * 1.6453555072203998));
} else if (z <= 1.46e+27) {
tmp = x + ((a * (y * z)) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * z)))))));
} else {
tmp = x + (y * 3.13060547623);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.75e+26: tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 + ((t * -0.10203362558171805) / (z * z))))) elif z <= 5.5e-48: tmp = x + (y * (b * 1.6453555072203998)) elif z <= 1.46e+27: tmp = x + ((a * (y * z)) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * z))))))) else: tmp = x + (y * 3.13060547623) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.75e+26) tmp = Float64(x + Float64(y / Float64(Float64(3.7269864963038164 / z) + Float64(0.31942702700572795 + Float64(Float64(t * -0.10203362558171805) / Float64(z * z)))))); elseif (z <= 5.5e-48) tmp = Float64(x + Float64(y * Float64(b * 1.6453555072203998))); elseif (z <= 1.46e+27) tmp = Float64(x + Float64(Float64(a * Float64(y * z)) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * z)))))))); 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.75e+26) tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 + ((t * -0.10203362558171805) / (z * z))))); elseif (z <= 5.5e-48) tmp = x + (y * (b * 1.6453555072203998)); elseif (z <= 1.46e+27) tmp = x + ((a * (y * z)) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * z))))))); else tmp = x + (y * 3.13060547623); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.75e+26], 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], If[LessEqual[z, 5.5e-48], N[(x + N[(y * N[(b * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.46e+27], N[(x + N[(N[(a * N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+26}:\\
\;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 + \frac{t \cdot -0.10203362558171805}{z \cdot z}\right)}\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-48}:\\
\;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\
\mathbf{elif}\;z \leq 1.46 \cdot 10^{+27}:\\
\;\;\;\;x + \frac{a \cdot \left(y \cdot z\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot z\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\end{array}
\end{array}
if z < -1.75e26Initial program 9.3%
associate-/l*13.5%
fma-def13.5%
fma-def13.5%
fma-def13.5%
fma-def13.5%
fma-def13.5%
fma-def13.5%
fma-def13.5%
Simplified13.5%
Taylor expanded in z around inf 95.0%
associate-*r/95.0%
metadata-eval95.0%
mul-1-neg95.0%
*-commutative95.0%
unpow295.0%
Simplified95.0%
Taylor expanded in t around inf 95.0%
associate-*r/95.0%
unpow295.0%
Simplified95.0%
Taylor expanded in y around 0 95.0%
associate--l+95.0%
associate-*r/95.0%
metadata-eval95.0%
cancel-sign-sub-inv95.0%
associate-*r/95.0%
metadata-eval95.0%
unpow295.0%
Simplified95.0%
if -1.75e26 < z < 5.50000000000000047e-48Initial program 99.8%
associate-/l*99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in z around 0 83.1%
Taylor expanded in y around 0 83.2%
*-commutative83.2%
associate-*l*83.2%
*-commutative83.2%
Simplified83.2%
if 5.50000000000000047e-48 < z < 1.46000000000000002e27Initial program 99.6%
Taylor expanded in a around inf 82.9%
associate-*r*75.5%
*-commutative75.5%
associate-*r*82.6%
Simplified82.6%
Taylor expanded in z around inf 82.5%
unpow282.5%
Simplified82.5%
if 1.46000000000000002e27 < z Initial program 9.9%
+-commutative9.9%
associate-*l/19.1%
*-commutative19.1%
fma-def19.1%
Simplified19.1%
Taylor expanded in z around inf 91.3%
Final simplification88.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.3e+26)
(+
x
(/
y
(+
(/ 3.7269864963038164 z)
(+ 0.31942702700572795 (/ (* t -0.10203362558171805) (* z z))))))
(if (<= z 1.95e-50)
(+ x (* y (* b 1.6453555072203998)))
(if (<= z 7.6e+21)
(+
x
(/
(* y (* z a))
(+
0.607771387771
(* z (+ 11.9400905721 (* z (+ 31.4690115749 (* z z))))))))
(+ x (* y 3.13060547623))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.3e+26) {
tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 + ((t * -0.10203362558171805) / (z * z)))));
} else if (z <= 1.95e-50) {
tmp = x + (y * (b * 1.6453555072203998));
} else if (z <= 7.6e+21) {
tmp = x + ((y * (z * a)) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * z)))))));
} 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.3d+26)) then
tmp = x + (y / ((3.7269864963038164d0 / z) + (0.31942702700572795d0 + ((t * (-0.10203362558171805d0)) / (z * z)))))
else if (z <= 1.95d-50) then
tmp = x + (y * (b * 1.6453555072203998d0))
else if (z <= 7.6d+21) then
tmp = x + ((y * (z * a)) / (0.607771387771d0 + (z * (11.9400905721d0 + (z * (31.4690115749d0 + (z * z)))))))
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.3e+26) {
tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 + ((t * -0.10203362558171805) / (z * z)))));
} else if (z <= 1.95e-50) {
tmp = x + (y * (b * 1.6453555072203998));
} else if (z <= 7.6e+21) {
tmp = x + ((y * (z * a)) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * z)))))));
} else {
tmp = x + (y * 3.13060547623);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.3e+26: tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 + ((t * -0.10203362558171805) / (z * z))))) elif z <= 1.95e-50: tmp = x + (y * (b * 1.6453555072203998)) elif z <= 7.6e+21: tmp = x + ((y * (z * a)) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * z))))))) else: tmp = x + (y * 3.13060547623) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.3e+26) tmp = Float64(x + Float64(y / Float64(Float64(3.7269864963038164 / z) + Float64(0.31942702700572795 + Float64(Float64(t * -0.10203362558171805) / Float64(z * z)))))); elseif (z <= 1.95e-50) tmp = Float64(x + Float64(y * Float64(b * 1.6453555072203998))); elseif (z <= 7.6e+21) tmp = Float64(x + Float64(Float64(y * Float64(z * a)) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * z)))))))); 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.3e+26) tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 + ((t * -0.10203362558171805) / (z * z))))); elseif (z <= 1.95e-50) tmp = x + (y * (b * 1.6453555072203998)); elseif (z <= 7.6e+21) tmp = x + ((y * (z * a)) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * z))))))); else tmp = x + (y * 3.13060547623); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.3e+26], 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], If[LessEqual[z, 1.95e-50], N[(x + N[(y * N[(b * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.6e+21], N[(x + N[(N[(y * N[(z * a), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+26}:\\
\;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 + \frac{t \cdot -0.10203362558171805}{z \cdot z}\right)}\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{-50}:\\
\;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{+21}:\\
\;\;\;\;x + \frac{y \cdot \left(z \cdot a\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot z\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\end{array}
\end{array}
if z < -1.30000000000000001e26Initial program 9.3%
associate-/l*13.5%
fma-def13.5%
fma-def13.5%
fma-def13.5%
fma-def13.5%
fma-def13.5%
fma-def13.5%
fma-def13.5%
Simplified13.5%
Taylor expanded in z around inf 95.0%
associate-*r/95.0%
metadata-eval95.0%
mul-1-neg95.0%
*-commutative95.0%
unpow295.0%
Simplified95.0%
Taylor expanded in t around inf 95.0%
associate-*r/95.0%
unpow295.0%
Simplified95.0%
Taylor expanded in y around 0 95.0%
associate--l+95.0%
associate-*r/95.0%
metadata-eval95.0%
cancel-sign-sub-inv95.0%
associate-*r/95.0%
metadata-eval95.0%
unpow295.0%
Simplified95.0%
if -1.30000000000000001e26 < z < 1.9500000000000001e-50Initial program 99.8%
associate-/l*99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in z around 0 83.1%
Taylor expanded in y around 0 83.2%
*-commutative83.2%
associate-*l*83.2%
*-commutative83.2%
Simplified83.2%
if 1.9500000000000001e-50 < z < 7.6e21Initial program 99.6%
Taylor expanded in a around inf 82.9%
associate-*r*75.5%
*-commutative75.5%
associate-*r*82.6%
Simplified82.6%
Taylor expanded in z around inf 82.5%
unpow282.5%
Simplified82.5%
Taylor expanded in a around 0 82.9%
*-commutative82.9%
Simplified82.9%
if 7.6e21 < z Initial program 9.9%
+-commutative9.9%
associate-*l/19.1%
*-commutative19.1%
fma-def19.1%
Simplified19.1%
Taylor expanded in z around inf 91.3%
Final simplification88.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.15e+24)
(+
x
(/
y
(+
(/ 3.7269864963038164 z)
(+ 0.31942702700572795 (/ (* t -0.10203362558171805) (* z z))))))
(if (<= z 1.12e+18)
(+
(* z (+ (* 1.6453555072203998 (* y a)) (* -32.324150453290734 (* y b))))
(+ x (* 1.6453555072203998 (* y b))))
(+ x (* y 3.13060547623)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.15e+24) {
tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 + ((t * -0.10203362558171805) / (z * z)))));
} else if (z <= 1.12e+18) {
tmp = (z * ((1.6453555072203998 * (y * a)) + (-32.324150453290734 * (y * b)))) + (x + (1.6453555072203998 * (y * b)));
} 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.15d+24)) then
tmp = x + (y / ((3.7269864963038164d0 / z) + (0.31942702700572795d0 + ((t * (-0.10203362558171805d0)) / (z * z)))))
else if (z <= 1.12d+18) then
tmp = (z * ((1.6453555072203998d0 * (y * a)) + ((-32.324150453290734d0) * (y * b)))) + (x + (1.6453555072203998d0 * (y * b)))
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.15e+24) {
tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 + ((t * -0.10203362558171805) / (z * z)))));
} else if (z <= 1.12e+18) {
tmp = (z * ((1.6453555072203998 * (y * a)) + (-32.324150453290734 * (y * b)))) + (x + (1.6453555072203998 * (y * b)));
} else {
tmp = x + (y * 3.13060547623);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.15e+24: tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 + ((t * -0.10203362558171805) / (z * z))))) elif z <= 1.12e+18: tmp = (z * ((1.6453555072203998 * (y * a)) + (-32.324150453290734 * (y * b)))) + (x + (1.6453555072203998 * (y * b))) else: tmp = x + (y * 3.13060547623) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.15e+24) tmp = Float64(x + Float64(y / Float64(Float64(3.7269864963038164 / z) + Float64(0.31942702700572795 + Float64(Float64(t * -0.10203362558171805) / Float64(z * z)))))); elseif (z <= 1.12e+18) tmp = Float64(Float64(z * Float64(Float64(1.6453555072203998 * Float64(y * a)) + Float64(-32.324150453290734 * Float64(y * b)))) + Float64(x + Float64(1.6453555072203998 * Float64(y * b)))); 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.15e+24) tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 + ((t * -0.10203362558171805) / (z * z))))); elseif (z <= 1.12e+18) tmp = (z * ((1.6453555072203998 * (y * a)) + (-32.324150453290734 * (y * b)))) + (x + (1.6453555072203998 * (y * b))); else tmp = x + (y * 3.13060547623); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.15e+24], 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], If[LessEqual[z, 1.12e+18], N[(N[(z * N[(N[(1.6453555072203998 * N[(y * a), $MachinePrecision]), $MachinePrecision] + N[(-32.324150453290734 * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x + N[(1.6453555072203998 * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+24}:\\
\;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 + \frac{t \cdot -0.10203362558171805}{z \cdot z}\right)}\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{+18}:\\
\;\;\;\;z \cdot \left(1.6453555072203998 \cdot \left(y \cdot a\right) + -32.324150453290734 \cdot \left(y \cdot b\right)\right) + \left(x + 1.6453555072203998 \cdot \left(y \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\end{array}
\end{array}
if z < -1.15e24Initial program 9.3%
associate-/l*13.5%
fma-def13.5%
fma-def13.5%
fma-def13.5%
fma-def13.5%
fma-def13.5%
fma-def13.5%
fma-def13.5%
Simplified13.5%
Taylor expanded in z around inf 95.0%
associate-*r/95.0%
metadata-eval95.0%
mul-1-neg95.0%
*-commutative95.0%
unpow295.0%
Simplified95.0%
Taylor expanded in t around inf 95.0%
associate-*r/95.0%
unpow295.0%
Simplified95.0%
Taylor expanded in y around 0 95.0%
associate--l+95.0%
associate-*r/95.0%
metadata-eval95.0%
cancel-sign-sub-inv95.0%
associate-*r/95.0%
metadata-eval95.0%
unpow295.0%
Simplified95.0%
if -1.15e24 < z < 1.12e18Initial program 99.8%
+-commutative99.8%
associate-*l/99.0%
*-commutative99.0%
fma-def99.1%
Simplified99.1%
Taylor expanded in z around 0 83.6%
if 1.12e18 < z Initial program 11.5%
+-commutative11.5%
associate-*l/20.6%
*-commutative20.6%
fma-def20.6%
Simplified20.6%
Taylor expanded in z around inf 89.8%
Final simplification87.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -2.3e+25)
(+
x
(/
y
(+
(/ 3.7269864963038164 z)
(+ 0.31942702700572795 (/ (* t -0.10203362558171805) (* z z))))))
(if (<= z 6e-30)
(+ x (* y (* b 1.6453555072203998)))
(+ x (* y 3.13060547623)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.3e+25) {
tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 + ((t * -0.10203362558171805) / (z * z)))));
} else if (z <= 6e-30) {
tmp = x + (y * (b * 1.6453555072203998));
} 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 <= (-2.3d+25)) then
tmp = x + (y / ((3.7269864963038164d0 / z) + (0.31942702700572795d0 + ((t * (-0.10203362558171805d0)) / (z * z)))))
else if (z <= 6d-30) then
tmp = x + (y * (b * 1.6453555072203998d0))
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 <= -2.3e+25) {
tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 + ((t * -0.10203362558171805) / (z * z)))));
} else if (z <= 6e-30) {
tmp = x + (y * (b * 1.6453555072203998));
} else {
tmp = x + (y * 3.13060547623);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2.3e+25: tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 + ((t * -0.10203362558171805) / (z * z))))) elif z <= 6e-30: tmp = x + (y * (b * 1.6453555072203998)) else: tmp = x + (y * 3.13060547623) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.3e+25) tmp = Float64(x + Float64(y / Float64(Float64(3.7269864963038164 / z) + Float64(0.31942702700572795 + Float64(Float64(t * -0.10203362558171805) / Float64(z * z)))))); elseif (z <= 6e-30) tmp = Float64(x + Float64(y * Float64(b * 1.6453555072203998))); 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 <= -2.3e+25) tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 + ((t * -0.10203362558171805) / (z * z))))); elseif (z <= 6e-30) tmp = x + (y * (b * 1.6453555072203998)); else tmp = x + (y * 3.13060547623); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.3e+25], 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], If[LessEqual[z, 6e-30], N[(x + N[(y * N[(b * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+25}:\\
\;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 + \frac{t \cdot -0.10203362558171805}{z \cdot z}\right)}\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-30}:\\
\;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\end{array}
\end{array}
if z < -2.2999999999999998e25Initial program 9.3%
associate-/l*13.5%
fma-def13.5%
fma-def13.5%
fma-def13.5%
fma-def13.5%
fma-def13.5%
fma-def13.5%
fma-def13.5%
Simplified13.5%
Taylor expanded in z around inf 95.0%
associate-*r/95.0%
metadata-eval95.0%
mul-1-neg95.0%
*-commutative95.0%
unpow295.0%
Simplified95.0%
Taylor expanded in t around inf 95.0%
associate-*r/95.0%
unpow295.0%
Simplified95.0%
Taylor expanded in y around 0 95.0%
associate--l+95.0%
associate-*r/95.0%
metadata-eval95.0%
cancel-sign-sub-inv95.0%
associate-*r/95.0%
metadata-eval95.0%
unpow295.0%
Simplified95.0%
if -2.2999999999999998e25 < z < 5.9999999999999998e-30Initial program 99.8%
associate-/l*99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in z around 0 82.0%
Taylor expanded in y around 0 82.1%
*-commutative82.1%
associate-*l*82.1%
*-commutative82.1%
Simplified82.1%
if 5.9999999999999998e-30 < z Initial program 22.5%
+-commutative22.5%
associate-*l/28.9%
*-commutative28.9%
fma-def28.9%
Simplified28.9%
Taylor expanded in z around inf 83.6%
Final simplification85.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6e+23) (not (<= z 6e-30))) (+ x (* y 3.13060547623)) (+ x (* y (* b 1.6453555072203998)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6e+23) || !(z <= 6e-30)) {
tmp = x + (y * 3.13060547623);
} 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 <= (-6d+23)) .or. (.not. (z <= 6d-30))) then
tmp = x + (y * 3.13060547623d0)
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 <= -6e+23) || !(z <= 6e-30)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + (y * (b * 1.6453555072203998));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6e+23) or not (z <= 6e-30): tmp = x + (y * 3.13060547623) else: tmp = x + (y * (b * 1.6453555072203998)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6e+23) || !(z <= 6e-30)) tmp = Float64(x + Float64(y * 3.13060547623)); 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 <= -6e+23) || ~((z <= 6e-30))) tmp = x + (y * 3.13060547623); else tmp = x + (y * (b * 1.6453555072203998)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6e+23], N[Not[LessEqual[z, 6e-30]], $MachinePrecision]], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(b * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+23} \lor \neg \left(z \leq 6 \cdot 10^{-30}\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\
\end{array}
\end{array}
if z < -6.0000000000000002e23 or 5.9999999999999998e-30 < z Initial program 15.8%
+-commutative15.8%
associate-*l/21.0%
*-commutative21.0%
fma-def21.0%
Simplified21.0%
Taylor expanded in z around inf 89.3%
if -6.0000000000000002e23 < z < 5.9999999999999998e-30Initial program 99.8%
associate-/l*99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in z around 0 82.0%
Taylor expanded in y around 0 82.1%
*-commutative82.1%
associate-*l*82.1%
*-commutative82.1%
Simplified82.1%
Final simplification85.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -9.5e-113) (not (<= z 5e-204))) (+ x (* y 3.13060547623)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -9.5e-113) || !(z <= 5e-204)) {
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 <= (-9.5d-113)) .or. (.not. (z <= 5d-204))) 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 <= -9.5e-113) || !(z <= 5e-204)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -9.5e-113) or not (z <= 5e-204): tmp = x + (y * 3.13060547623) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -9.5e-113) || !(z <= 5e-204)) 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 <= -9.5e-113) || ~((z <= 5e-204))) tmp = x + (y * 3.13060547623); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -9.5e-113], N[Not[LessEqual[z, 5e-204]], $MachinePrecision]], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{-113} \lor \neg \left(z \leq 5 \cdot 10^{-204}\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -9.49999999999999987e-113 or 5.0000000000000002e-204 < z Initial program 45.5%
+-commutative45.5%
associate-*l/48.9%
*-commutative48.9%
fma-def48.9%
Simplified48.9%
Taylor expanded in z around inf 73.2%
if -9.49999999999999987e-113 < z < 5.0000000000000002e-204Initial program 99.9%
+-commutative99.9%
associate-*l/99.9%
*-commutative99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in y around 0 52.4%
Final simplification68.9%
(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 56.8%
+-commutative56.8%
associate-*l/59.5%
*-commutative59.5%
fma-def59.5%
Simplified59.5%
Taylor expanded in y around 0 45.8%
Final simplification45.8%
(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 2023200
(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))))