
(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
(let* ((t_1
(-
(+ 0.31942702700572795 (/ 3.7269864963038164 z))
(/ 3.241970391368047 (* z z)))))
(if (or (<= z -6e+53) (not (<= z 140000000000.0)))
(+
x
(+
(/ y t_1)
(* 0.10203362558171805 (/ y (/ (* (* z z) (pow t_1 2.0)) t)))))
(+
x
(*
(/
y
(+
0.607771387771
(*
z
(+ 11.9400905721 (* z (+ 31.4690115749 (* z (+ z 15.234687407))))))))
(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 t_1 = (0.31942702700572795 + (3.7269864963038164 / z)) - (3.241970391368047 / (z * z));
double tmp;
if ((z <= -6e+53) || !(z <= 140000000000.0)) {
tmp = x + ((y / t_1) + (0.10203362558171805 * (y / (((z * z) * pow(t_1, 2.0)) / t))));
} else {
tmp = x + ((y / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))))) * 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) t_1 = Float64(Float64(0.31942702700572795 + Float64(3.7269864963038164 / z)) - Float64(3.241970391368047 / Float64(z * z))) tmp = 0.0 if ((z <= -6e+53) || !(z <= 140000000000.0)) tmp = Float64(x + Float64(Float64(y / t_1) + Float64(0.10203362558171805 * Float64(y / Float64(Float64(Float64(z * z) * (t_1 ^ 2.0)) / t))))); else tmp = Float64(x + Float64(Float64(y / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407)))))))) * 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_] := Block[{t$95$1 = N[(N[(0.31942702700572795 + N[(3.7269864963038164 / z), $MachinePrecision]), $MachinePrecision] - N[(3.241970391368047 / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -6e+53], N[Not[LessEqual[z, 140000000000.0]], $MachinePrecision]], N[(x + N[(N[(y / t$95$1), $MachinePrecision] + N[(0.10203362558171805 * N[(y / N[(N[(N[(z * z), $MachinePrecision] * N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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}
t_1 := \left(0.31942702700572795 + \frac{3.7269864963038164}{z}\right) - \frac{3.241970391368047}{z \cdot z}\\
\mathbf{if}\;z \leq -6 \cdot 10^{+53} \lor \neg \left(z \leq 140000000000\right):\\
\;\;\;\;x + \left(\frac{y}{t_1} + 0.10203362558171805 \cdot \frac{y}{\frac{\left(z \cdot z\right) \cdot {t_1}^{2}}{t}}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\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 < -5.99999999999999996e53 or 1.4e11 < z Initial program 7.2%
associate-/l*12.5%
fma-def12.5%
fma-def12.5%
fma-def12.5%
fma-def12.5%
fma-def12.5%
fma-def12.5%
fma-def12.5%
Simplified12.5%
Taylor expanded in z around inf 88.0%
associate-*r/88.0%
metadata-eval88.0%
mul-1-neg88.0%
*-commutative88.0%
unpow288.0%
Simplified88.0%
Taylor expanded in t around 0 90.4%
associate-*r/90.4%
metadata-eval90.4%
+-commutative90.4%
associate-*r/90.4%
metadata-eval90.4%
unpow290.4%
associate-/l*99.3%
Simplified99.3%
if -5.99999999999999996e53 < z < 1.4e11Initial program 98.3%
associate-*l/99.0%
*-commutative99.0%
fma-def99.0%
*-commutative99.0%
fma-def99.0%
*-commutative99.0%
fma-def99.0%
*-commutative99.0%
fma-def99.0%
Simplified99.0%
Taylor expanded in y around 0 99.0%
Final simplification99.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(-
(+ 0.31942702700572795 (/ 3.7269864963038164 z))
(/ 3.241970391368047 (* z z)))))
(if (or (<= z -6e+53) (not (<= z 140000000000.0)))
(+
x
(+
(/ y t_1)
(* 0.10203362558171805 (/ y (/ (* (* z z) (pow t_1 2.0)) t)))))
(+
x
(/
(*
y
(+
b
(* z (+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))))))
(+
0.607771387771
(*
z
(+
11.9400905721
(* z (+ 31.4690115749 (* z (+ z 15.234687407))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (0.31942702700572795 + (3.7269864963038164 / z)) - (3.241970391368047 / (z * z));
double tmp;
if ((z <= -6e+53) || !(z <= 140000000000.0)) {
tmp = x + ((y / t_1) + (0.10203362558171805 * (y / (((z * z) * pow(t_1, 2.0)) / t))));
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))));
}
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 = (0.31942702700572795d0 + (3.7269864963038164d0 / z)) - (3.241970391368047d0 / (z * z))
if ((z <= (-6d+53)) .or. (.not. (z <= 140000000000.0d0))) then
tmp = x + ((y / t_1) + (0.10203362558171805d0 * (y / (((z * z) * (t_1 ** 2.0d0)) / t))))
else
tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262d0 + (z * 3.13060547623d0))))))))) / (0.607771387771d0 + (z * (11.9400905721d0 + (z * (31.4690115749d0 + (z * (z + 15.234687407d0))))))))
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 = (0.31942702700572795 + (3.7269864963038164 / z)) - (3.241970391368047 / (z * z));
double tmp;
if ((z <= -6e+53) || !(z <= 140000000000.0)) {
tmp = x + ((y / t_1) + (0.10203362558171805 * (y / (((z * z) * Math.pow(t_1, 2.0)) / t))));
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (0.31942702700572795 + (3.7269864963038164 / z)) - (3.241970391368047 / (z * z)) tmp = 0 if (z <= -6e+53) or not (z <= 140000000000.0): tmp = x + ((y / t_1) + (0.10203362558171805 * (y / (((z * z) * math.pow(t_1, 2.0)) / t)))) else: tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(0.31942702700572795 + Float64(3.7269864963038164 / z)) - Float64(3.241970391368047 / Float64(z * z))) tmp = 0.0 if ((z <= -6e+53) || !(z <= 140000000000.0)) tmp = Float64(x + Float64(Float64(y / t_1) + Float64(0.10203362558171805 * Float64(y / Float64(Float64(Float64(z * z) * (t_1 ^ 2.0)) / t))))); else tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623))))))))) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407))))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (0.31942702700572795 + (3.7269864963038164 / z)) - (3.241970391368047 / (z * z)); tmp = 0.0; if ((z <= -6e+53) || ~((z <= 140000000000.0))) tmp = x + ((y / t_1) + (0.10203362558171805 * (y / (((z * z) * (t_1 ^ 2.0)) / t)))); else tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(0.31942702700572795 + N[(3.7269864963038164 / z), $MachinePrecision]), $MachinePrecision] - N[(3.241970391368047 / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -6e+53], N[Not[LessEqual[z, 140000000000.0]], $MachinePrecision]], N[(x + N[(N[(y / t$95$1), $MachinePrecision] + N[(0.10203362558171805 * N[(y / N[(N[(N[(z * z), $MachinePrecision] * N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(0.31942702700572795 + \frac{3.7269864963038164}{z}\right) - \frac{3.241970391368047}{z \cdot z}\\
\mathbf{if}\;z \leq -6 \cdot 10^{+53} \lor \neg \left(z \leq 140000000000\right):\\
\;\;\;\;x + \left(\frac{y}{t_1} + 0.10203362558171805 \cdot \frac{y}{\frac{\left(z \cdot z\right) \cdot {t_1}^{2}}{t}}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\\
\end{array}
\end{array}
if z < -5.99999999999999996e53 or 1.4e11 < z Initial program 7.2%
associate-/l*12.5%
fma-def12.5%
fma-def12.5%
fma-def12.5%
fma-def12.5%
fma-def12.5%
fma-def12.5%
fma-def12.5%
Simplified12.5%
Taylor expanded in z around inf 88.0%
associate-*r/88.0%
metadata-eval88.0%
mul-1-neg88.0%
*-commutative88.0%
unpow288.0%
Simplified88.0%
Taylor expanded in t around 0 90.4%
associate-*r/90.4%
metadata-eval90.4%
+-commutative90.4%
associate-*r/90.4%
metadata-eval90.4%
unpow290.4%
associate-/l*99.3%
Simplified99.3%
if -5.99999999999999996e53 < z < 1.4e11Initial program 98.3%
Final simplification98.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ 0.31942702700572795 (/ 3.7269864963038164 z))))
(if (or (<= z -6e+53) (not (<= z 140000000000.0)))
(+
x
(+
(/ y t_1)
(* 0.10203362558171805 (* (/ y (* z z)) (/ t (pow t_1 2.0))))))
(+
x
(/
(*
y
(+
b
(* z (+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))))))
(+
0.607771387771
(*
z
(+
11.9400905721
(* z (+ 31.4690115749 (* z (+ z 15.234687407))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 0.31942702700572795 + (3.7269864963038164 / z);
double tmp;
if ((z <= -6e+53) || !(z <= 140000000000.0)) {
tmp = x + ((y / t_1) + (0.10203362558171805 * ((y / (z * z)) * (t / pow(t_1, 2.0)))));
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))));
}
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 = 0.31942702700572795d0 + (3.7269864963038164d0 / z)
if ((z <= (-6d+53)) .or. (.not. (z <= 140000000000.0d0))) then
tmp = x + ((y / t_1) + (0.10203362558171805d0 * ((y / (z * z)) * (t / (t_1 ** 2.0d0)))))
else
tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262d0 + (z * 3.13060547623d0))))))))) / (0.607771387771d0 + (z * (11.9400905721d0 + (z * (31.4690115749d0 + (z * (z + 15.234687407d0))))))))
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 = 0.31942702700572795 + (3.7269864963038164 / z);
double tmp;
if ((z <= -6e+53) || !(z <= 140000000000.0)) {
tmp = x + ((y / t_1) + (0.10203362558171805 * ((y / (z * z)) * (t / Math.pow(t_1, 2.0)))));
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 0.31942702700572795 + (3.7269864963038164 / z) tmp = 0 if (z <= -6e+53) or not (z <= 140000000000.0): tmp = x + ((y / t_1) + (0.10203362558171805 * ((y / (z * z)) * (t / math.pow(t_1, 2.0))))) else: tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(0.31942702700572795 + Float64(3.7269864963038164 / z)) tmp = 0.0 if ((z <= -6e+53) || !(z <= 140000000000.0)) tmp = Float64(x + Float64(Float64(y / t_1) + Float64(0.10203362558171805 * Float64(Float64(y / Float64(z * z)) * Float64(t / (t_1 ^ 2.0)))))); else tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623))))))))) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407))))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 0.31942702700572795 + (3.7269864963038164 / z); tmp = 0.0; if ((z <= -6e+53) || ~((z <= 140000000000.0))) tmp = x + ((y / t_1) + (0.10203362558171805 * ((y / (z * z)) * (t / (t_1 ^ 2.0))))); else tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(0.31942702700572795 + N[(3.7269864963038164 / z), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -6e+53], N[Not[LessEqual[z, 140000000000.0]], $MachinePrecision]], N[(x + N[(N[(y / t$95$1), $MachinePrecision] + N[(0.10203362558171805 * N[(N[(y / N[(z * z), $MachinePrecision]), $MachinePrecision] * N[(t / N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.31942702700572795 + \frac{3.7269864963038164}{z}\\
\mathbf{if}\;z \leq -6 \cdot 10^{+53} \lor \neg \left(z \leq 140000000000\right):\\
\;\;\;\;x + \left(\frac{y}{t_1} + 0.10203362558171805 \cdot \left(\frac{y}{z \cdot z} \cdot \frac{t}{{t_1}^{2}}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\\
\end{array}
\end{array}
if z < -5.99999999999999996e53 or 1.4e11 < z Initial program 7.2%
associate-/l*12.5%
fma-def12.5%
fma-def12.5%
fma-def12.5%
fma-def12.5%
fma-def12.5%
fma-def12.5%
fma-def12.5%
Simplified12.5%
Taylor expanded in z around inf 88.0%
associate-*r/88.0%
metadata-eval88.0%
mul-1-neg88.0%
*-commutative88.0%
unpow288.0%
Simplified88.0%
Taylor expanded in t around inf 88.0%
associate-*r/88.0%
*-commutative88.0%
unpow288.0%
times-frac88.0%
Simplified88.0%
Taylor expanded in t around 0 90.4%
+-commutative90.4%
associate-*r/90.4%
metadata-eval90.4%
times-frac99.2%
unpow299.2%
+-commutative99.2%
associate-*r/99.2%
metadata-eval99.2%
Simplified99.2%
if -5.99999999999999996e53 < z < 1.4e11Initial program 98.3%
Final simplification98.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -3.15e+112)
(+ x (/ y 0.31942702700572795))
(if (or (<= z -6e+53) (not (<= z 140000000000.0)))
(+
x
(fma
-36.52704169880642
(/ y z)
(-
(* y 3.13060547623)
(/ (- (* y -426.1874533207134) (* y t)) (* z z)))))
(+
x
(/
(*
y
(+
b
(* z (+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))))))
(+
0.607771387771
(*
z
(+
11.9400905721
(* z (+ 31.4690115749 (* z (+ z 15.234687407))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.15e+112) {
tmp = x + (y / 0.31942702700572795);
} else if ((z <= -6e+53) || !(z <= 140000000000.0)) {
tmp = x + fma(-36.52704169880642, (y / z), ((y * 3.13060547623) - (((y * -426.1874533207134) - (y * t)) / (z * z))));
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.15e+112) tmp = Float64(x + Float64(y / 0.31942702700572795)); elseif ((z <= -6e+53) || !(z <= 140000000000.0)) tmp = Float64(x + fma(-36.52704169880642, Float64(y / z), Float64(Float64(y * 3.13060547623) - Float64(Float64(Float64(y * -426.1874533207134) - Float64(y * t)) / Float64(z * z))))); else tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623))))))))) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407))))))))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.15e+112], N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -6e+53], N[Not[LessEqual[z, 140000000000.0]], $MachinePrecision]], N[(x + N[(-36.52704169880642 * N[(y / z), $MachinePrecision] + N[(N[(y * 3.13060547623), $MachinePrecision] - N[(N[(N[(y * -426.1874533207134), $MachinePrecision] - N[(y * t), $MachinePrecision]), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.15 \cdot 10^{+112}:\\
\;\;\;\;x + \frac{y}{0.31942702700572795}\\
\mathbf{elif}\;z \leq -6 \cdot 10^{+53} \lor \neg \left(z \leq 140000000000\right):\\
\;\;\;\;x + \mathsf{fma}\left(-36.52704169880642, \frac{y}{z}, y \cdot 3.13060547623 - \frac{y \cdot -426.1874533207134 - y \cdot t}{z \cdot z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\\
\end{array}
\end{array}
if z < -3.1499999999999998e112Initial 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 99.9%
if -3.1499999999999998e112 < z < -5.99999999999999996e53 or 1.4e11 < z Initial program 10.9%
associate-/l*19.0%
fma-def19.0%
fma-def19.0%
fma-def19.0%
fma-def19.0%
fma-def19.0%
fma-def19.0%
fma-def19.0%
Simplified19.0%
Taylor expanded in z around inf 81.8%
associate-*r/81.8%
metadata-eval81.8%
mul-1-neg81.8%
*-commutative81.8%
unpow281.8%
Simplified81.8%
Taylor expanded in t around inf 81.8%
associate-*r/81.8%
*-commutative81.8%
unpow281.8%
times-frac81.8%
Simplified81.8%
Taylor expanded in z around inf 91.8%
fma-def91.8%
+-commutative91.8%
mul-1-neg91.8%
unsub-neg91.8%
*-commutative91.8%
+-commutative91.8%
mul-1-neg91.8%
unsub-neg91.8%
*-commutative91.8%
unpow291.8%
Simplified91.8%
if -5.99999999999999996e53 < z < 1.4e11Initial program 98.3%
Final simplification96.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(/
(*
y
(+
b
(*
z
(+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))))))
(+
0.607771387771
(*
z
(+
11.9400905721
(* z (+ 31.4690115749 (* z (+ z 15.234687407))))))))))
(if (<= t_1 INFINITY)
(+ x t_1)
(+
x
(/
y
(+
(/ 3.7269864963038164 z)
(- 0.31942702700572795 (/ t (/ z (/ 0.10203362558171805 z))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = x + t_1;
} else {
tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - (t / (z / (0.10203362558171805 / z))))));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = x + t_1;
} else {
tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - (t / (z / (0.10203362558171805 / z))))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))) tmp = 0 if t_1 <= math.inf: tmp = x + t_1 else: tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - (t / (z / (0.10203362558171805 / z)))))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623))))))))) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407)))))))) tmp = 0.0 if (t_1 <= Inf) tmp = Float64(x + t_1); else tmp = Float64(x + Float64(y / Float64(Float64(3.7269864963038164 / z) + Float64(0.31942702700572795 - Float64(t / Float64(z / Float64(0.10203362558171805 / z))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))); tmp = 0.0; if (t_1 <= Inf) tmp = x + t_1; else tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - (t / (z / (0.10203362558171805 / z)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(b + N[(z * N[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], N[(x + t$95$1), $MachinePrecision], N[(x + N[(y / N[(N[(3.7269864963038164 / z), $MachinePrecision] + N[(0.31942702700572795 - N[(t / N[(z / N[(0.10203362558171805 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;x + t_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 - \frac{t}{\frac{z}{\frac{0.10203362558171805}{z}}}\right)}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 313060547623/100000000000) 55833770631/5000000000) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z 15234687407/1000000000) z) 314690115749/10000000000) z) 119400905721/10000000000) z) 607771387771/1000000000000)) < +inf.0Initial program 90.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.1%
associate-*r/95.1%
metadata-eval95.1%
mul-1-neg95.1%
*-commutative95.1%
unpow295.1%
Simplified95.1%
Taylor expanded in t around inf 95.1%
associate-*r/95.1%
*-commutative95.1%
unpow295.1%
times-frac95.1%
Simplified95.1%
Taylor expanded in y around 0 95.1%
associate--l+95.1%
associate-*r/95.1%
metadata-eval95.1%
*-commutative95.1%
associate-/r/95.1%
unpow295.1%
associate-/l*95.1%
Simplified95.1%
Final simplification92.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+
x
(/
y
(+
(/ 3.7269864963038164 z)
(- 0.31942702700572795 (/ t (/ z (/ 0.10203362558171805 z))))))))
(t_2
(+
x
(/
y
(/
(+
0.607771387771
(*
z
(+
11.9400905721
(* z (+ 31.4690115749 (* z (+ z 15.234687407)))))))
(* z (+ a (* z (+ t (* (* z z) 3.13060547623))))))))))
(if (<= z -2.75e+69)
t_1
(if (<= z -0.135)
t_2
(if (<= z 3e-9)
(+
x
(/
(*
y
(+
b
(*
z
(+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))))))
(+ 0.607771387771 (* z 11.9400905721))))
(if (<= z 6.5e+74) t_2 t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - (t / (z / (0.10203362558171805 / z))))));
double t_2 = x + (y / ((0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))) / (z * (a + (z * (t + ((z * z) * 3.13060547623)))))));
double tmp;
if (z <= -2.75e+69) {
tmp = t_1;
} else if (z <= -0.135) {
tmp = t_2;
} else if (z <= 3e-9) {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * 11.9400905721)));
} else if (z <= 6.5e+74) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = x + (y / ((3.7269864963038164d0 / z) + (0.31942702700572795d0 - (t / (z / (0.10203362558171805d0 / z))))))
t_2 = x + (y / ((0.607771387771d0 + (z * (11.9400905721d0 + (z * (31.4690115749d0 + (z * (z + 15.234687407d0))))))) / (z * (a + (z * (t + ((z * z) * 3.13060547623d0)))))))
if (z <= (-2.75d+69)) then
tmp = t_1
else if (z <= (-0.135d0)) then
tmp = t_2
else if (z <= 3d-9) then
tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262d0 + (z * 3.13060547623d0))))))))) / (0.607771387771d0 + (z * 11.9400905721d0)))
else if (z <= 6.5d+74) then
tmp = t_2
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 + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - (t / (z / (0.10203362558171805 / z))))));
double t_2 = x + (y / ((0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))) / (z * (a + (z * (t + ((z * z) * 3.13060547623)))))));
double tmp;
if (z <= -2.75e+69) {
tmp = t_1;
} else if (z <= -0.135) {
tmp = t_2;
} else if (z <= 3e-9) {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * 11.9400905721)));
} else if (z <= 6.5e+74) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - (t / (z / (0.10203362558171805 / z)))))) t_2 = x + (y / ((0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))) / (z * (a + (z * (t + ((z * z) * 3.13060547623))))))) tmp = 0 if z <= -2.75e+69: tmp = t_1 elif z <= -0.135: tmp = t_2 elif z <= 3e-9: tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * 11.9400905721))) elif z <= 6.5e+74: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y / Float64(Float64(3.7269864963038164 / z) + Float64(0.31942702700572795 - Float64(t / Float64(z / Float64(0.10203362558171805 / z))))))) t_2 = Float64(x + Float64(y / Float64(Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407))))))) / Float64(z * Float64(a + Float64(z * Float64(t + Float64(Float64(z * z) * 3.13060547623)))))))) tmp = 0.0 if (z <= -2.75e+69) tmp = t_1; elseif (z <= -0.135) tmp = t_2; elseif (z <= 3e-9) tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623))))))))) / Float64(0.607771387771 + Float64(z * 11.9400905721)))); elseif (z <= 6.5e+74) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - (t / (z / (0.10203362558171805 / z)))))); t_2 = x + (y / ((0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))) / (z * (a + (z * (t + ((z * z) * 3.13060547623))))))); tmp = 0.0; if (z <= -2.75e+69) tmp = t_1; elseif (z <= -0.135) tmp = t_2; elseif (z <= 3e-9) tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * 11.9400905721))); elseif (z <= 6.5e+74) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y / N[(N[(3.7269864963038164 / z), $MachinePrecision] + N[(0.31942702700572795 - N[(t / N[(z / N[(0.10203362558171805 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y / N[(N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * N[(a + N[(z * N[(t + N[(N[(z * z), $MachinePrecision] * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.75e+69], t$95$1, If[LessEqual[z, -0.135], t$95$2, If[LessEqual[z, 3e-9], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e+74], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 - \frac{t}{\frac{z}{\frac{0.10203362558171805}{z}}}\right)}\\
t_2 := x + \frac{y}{\frac{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}{z \cdot \left(a + z \cdot \left(t + \left(z \cdot z\right) \cdot 3.13060547623\right)\right)}}\\
\mathbf{if}\;z \leq -2.75 \cdot 10^{+69}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -0.135:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-9}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{0.607771387771 + z \cdot 11.9400905721}\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+74}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.75000000000000001e69 or 6.49999999999999962e74 < z Initial program 0.0%
associate-/l*0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
Simplified0.0%
Taylor expanded in z around inf 94.2%
associate-*r/94.2%
metadata-eval94.2%
mul-1-neg94.2%
*-commutative94.2%
unpow294.2%
Simplified94.2%
Taylor expanded in t around inf 94.2%
associate-*r/94.2%
*-commutative94.2%
unpow294.2%
times-frac94.2%
Simplified94.2%
Taylor expanded in y around 0 94.2%
associate--l+94.2%
associate-*r/94.2%
metadata-eval94.2%
*-commutative94.2%
associate-/r/94.2%
unpow294.2%
associate-/l*94.2%
Simplified94.2%
if -2.75000000000000001e69 < z < -0.13500000000000001 or 2.99999999999999998e-9 < z < 6.49999999999999962e74Initial program 66.1%
associate-/l*85.1%
fma-def85.1%
fma-def85.1%
fma-def85.1%
fma-def85.1%
fma-def85.1%
fma-def85.1%
fma-def85.1%
Simplified85.1%
Taylor expanded in b around 0 82.8%
Taylor expanded in z around inf 82.8%
*-commutative82.8%
unpow282.8%
Simplified82.8%
if -0.13500000000000001 < z < 2.99999999999999998e-9Initial program 99.7%
Taylor expanded in z around 0 99.7%
*-commutative99.7%
Simplified99.7%
Final simplification94.9%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -1.2e+55) (not (<= z 1.9e+26)))
(+ x (/ y 0.31942702700572795))
(+
x
(/
(* y (+ b (* z (+ a (* z (+ t (* z 11.1667541262)))))))
(+
0.607771387771
(*
z
(+ 11.9400905721 (* z (+ 31.4690115749 (* z (+ z 15.234687407)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.2e+55) || !(z <= 1.9e+26)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))));
}
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.2d+55)) .or. (.not. (z <= 1.9d+26))) then
tmp = x + (y / 0.31942702700572795d0)
else
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262d0))))))) / (0.607771387771d0 + (z * (11.9400905721d0 + (z * (31.4690115749d0 + (z * (z + 15.234687407d0))))))))
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.2e+55) || !(z <= 1.9e+26)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.2e+55) or not (z <= 1.9e+26): tmp = x + (y / 0.31942702700572795) else: tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.2e+55) || !(z <= 1.9e+26)) tmp = Float64(x + Float64(y / 0.31942702700572795)); else tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * 11.1667541262))))))) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407))))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.2e+55) || ~((z <= 1.9e+26))) tmp = x + (y / 0.31942702700572795); else tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.2e+55], N[Not[LessEqual[z, 1.9e+26]], $MachinePrecision]], N[(x + N[(y / 0.31942702700572795), $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[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+55} \lor \neg \left(z \leq 1.9 \cdot 10^{+26}\right):\\
\;\;\;\;x + \frac{y}{0.31942702700572795}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot 11.1667541262\right)\right)\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\\
\end{array}
\end{array}
if z < -1.2e55 or 1.9000000000000001e26 < z Initial program 6.4%
associate-/l*11.8%
fma-def11.8%
fma-def11.8%
fma-def11.8%
fma-def11.8%
fma-def11.8%
fma-def11.8%
fma-def11.8%
Simplified11.8%
Taylor expanded in z around inf 88.7%
if -1.2e55 < z < 1.9000000000000001e26Initial program 97.7%
Taylor expanded in z around 0 97.4%
*-commutative97.4%
Simplified97.4%
Final simplification93.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ y 0.31942702700572795))))
(if (<= z -1.1e+93)
t_1
(if (<= z -12.8)
(+ x (* (/ y z) (/ t z)))
(if (<= z 1.4e+20)
(+
x
(/
(*
y
(+
b
(*
z
(+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))))))
(+ 0.607771387771 (* z 11.9400905721))))
t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y / 0.31942702700572795);
double tmp;
if (z <= -1.1e+93) {
tmp = t_1;
} else if (z <= -12.8) {
tmp = x + ((y / z) * (t / z));
} else if (z <= 1.4e+20) {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * 11.9400905721)));
} 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 + (y / 0.31942702700572795d0)
if (z <= (-1.1d+93)) then
tmp = t_1
else if (z <= (-12.8d0)) then
tmp = x + ((y / z) * (t / z))
else if (z <= 1.4d+20) then
tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262d0 + (z * 3.13060547623d0))))))))) / (0.607771387771d0 + (z * 11.9400905721d0)))
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 + (y / 0.31942702700572795);
double tmp;
if (z <= -1.1e+93) {
tmp = t_1;
} else if (z <= -12.8) {
tmp = x + ((y / z) * (t / z));
} else if (z <= 1.4e+20) {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * 11.9400905721)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y / 0.31942702700572795) tmp = 0 if z <= -1.1e+93: tmp = t_1 elif z <= -12.8: tmp = x + ((y / z) * (t / z)) elif z <= 1.4e+20: tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * 11.9400905721))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y / 0.31942702700572795)) tmp = 0.0 if (z <= -1.1e+93) tmp = t_1; elseif (z <= -12.8) tmp = Float64(x + Float64(Float64(y / z) * Float64(t / z))); elseif (z <= 1.4e+20) tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623))))))))) / Float64(0.607771387771 + Float64(z * 11.9400905721)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y / 0.31942702700572795); tmp = 0.0; if (z <= -1.1e+93) tmp = t_1; elseif (z <= -12.8) tmp = x + ((y / z) * (t / z)); elseif (z <= 1.4e+20) tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * 11.9400905721))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.1e+93], t$95$1, If[LessEqual[z, -12.8], N[(x + N[(N[(y / z), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e+20], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{0.31942702700572795}\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{+93}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -12.8:\\
\;\;\;\;x + \frac{y}{z} \cdot \frac{t}{z}\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+20}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{0.607771387771 + z \cdot 11.9400905721}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.10000000000000011e93 or 1.4e20 < z Initial program 5.9%
associate-/l*9.3%
fma-def9.3%
fma-def9.3%
fma-def9.3%
fma-def9.3%
fma-def9.3%
fma-def9.3%
fma-def9.3%
Simplified9.3%
Taylor expanded in z around inf 92.0%
if -1.10000000000000011e93 < z < -12.800000000000001Initial program 49.4%
Taylor expanded in t around inf 48.9%
unpow248.9%
associate-*r*48.8%
*-commutative48.8%
Simplified48.8%
Taylor expanded in z around inf 71.9%
unpow271.9%
Simplified71.9%
Taylor expanded in y around 0 71.9%
unpow271.9%
times-frac75.4%
Simplified75.4%
if -12.800000000000001 < z < 1.4e20Initial program 98.9%
Taylor expanded in z around 0 96.8%
*-commutative96.8%
Simplified96.8%
Final simplification92.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ y 0.31942702700572795))))
(if (<= z -3.15e+94)
t_1
(if (<= z -1.56)
(+ x (* (/ y z) (/ t z)))
(if (<= z 8.2e+19)
(+
x
(+
(* z (* y (* a 1.6453555072203998)))
(* 1.6453555072203998 (* y b))))
t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y / 0.31942702700572795);
double tmp;
if (z <= -3.15e+94) {
tmp = t_1;
} else if (z <= -1.56) {
tmp = x + ((y / z) * (t / z));
} else if (z <= 8.2e+19) {
tmp = x + ((z * (y * (a * 1.6453555072203998))) + (1.6453555072203998 * (y * 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 + (y / 0.31942702700572795d0)
if (z <= (-3.15d+94)) then
tmp = t_1
else if (z <= (-1.56d0)) then
tmp = x + ((y / z) * (t / z))
else if (z <= 8.2d+19) then
tmp = x + ((z * (y * (a * 1.6453555072203998d0))) + (1.6453555072203998d0 * (y * 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 + (y / 0.31942702700572795);
double tmp;
if (z <= -3.15e+94) {
tmp = t_1;
} else if (z <= -1.56) {
tmp = x + ((y / z) * (t / z));
} else if (z <= 8.2e+19) {
tmp = x + ((z * (y * (a * 1.6453555072203998))) + (1.6453555072203998 * (y * b)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y / 0.31942702700572795) tmp = 0 if z <= -3.15e+94: tmp = t_1 elif z <= -1.56: tmp = x + ((y / z) * (t / z)) elif z <= 8.2e+19: tmp = x + ((z * (y * (a * 1.6453555072203998))) + (1.6453555072203998 * (y * b))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y / 0.31942702700572795)) tmp = 0.0 if (z <= -3.15e+94) tmp = t_1; elseif (z <= -1.56) tmp = Float64(x + Float64(Float64(y / z) * Float64(t / z))); elseif (z <= 8.2e+19) tmp = Float64(x + Float64(Float64(z * Float64(y * Float64(a * 1.6453555072203998))) + Float64(1.6453555072203998 * Float64(y * b)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y / 0.31942702700572795); tmp = 0.0; if (z <= -3.15e+94) tmp = t_1; elseif (z <= -1.56) tmp = x + ((y / z) * (t / z)); elseif (z <= 8.2e+19) tmp = x + ((z * (y * (a * 1.6453555072203998))) + (1.6453555072203998 * (y * b))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.15e+94], t$95$1, If[LessEqual[z, -1.56], N[(x + N[(N[(y / z), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e+19], N[(x + N[(N[(z * N[(y * N[(a * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.6453555072203998 * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{0.31942702700572795}\\
\mathbf{if}\;z \leq -3.15 \cdot 10^{+94}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.56:\\
\;\;\;\;x + \frac{y}{z} \cdot \frac{t}{z}\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{+19}:\\
\;\;\;\;x + \left(z \cdot \left(y \cdot \left(a \cdot 1.6453555072203998\right)\right) + 1.6453555072203998 \cdot \left(y \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -3.15e94 or 8.2e19 < z Initial program 5.9%
associate-/l*9.3%
fma-def9.3%
fma-def9.3%
fma-def9.3%
fma-def9.3%
fma-def9.3%
fma-def9.3%
fma-def9.3%
Simplified9.3%
Taylor expanded in z around inf 92.0%
if -3.15e94 < z < -1.5600000000000001Initial program 49.4%
Taylor expanded in t around inf 48.9%
unpow248.9%
associate-*r*48.8%
*-commutative48.8%
Simplified48.8%
Taylor expanded in z around inf 71.9%
unpow271.9%
Simplified71.9%
Taylor expanded in y around 0 71.9%
unpow271.9%
times-frac75.4%
Simplified75.4%
if -1.5600000000000001 < z < 8.2e19Initial program 98.9%
associate-*l/98.9%
*-commutative98.9%
fma-def98.9%
*-commutative98.9%
fma-def98.9%
*-commutative98.9%
fma-def98.9%
*-commutative98.9%
fma-def98.9%
Simplified98.9%
Taylor expanded in z around 0 79.4%
Taylor expanded in a around inf 83.5%
associate-*r*83.5%
Simplified83.5%
Final simplification86.4%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -6e+53) (not (<= z 2300000.0)))
(+ x (/ y 0.31942702700572795))
(+
x
(*
y
(+
(* z (- (* a 1.6453555072203998) (* b 32.324150453290734)))
(* b 1.6453555072203998))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6e+53) || !(z <= 2300000.0)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + (y * ((z * ((a * 1.6453555072203998) - (b * 32.324150453290734))) + (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+53)) .or. (.not. (z <= 2300000.0d0))) then
tmp = x + (y / 0.31942702700572795d0)
else
tmp = x + (y * ((z * ((a * 1.6453555072203998d0) - (b * 32.324150453290734d0))) + (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+53) || !(z <= 2300000.0)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + (y * ((z * ((a * 1.6453555072203998) - (b * 32.324150453290734))) + (b * 1.6453555072203998)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6e+53) or not (z <= 2300000.0): tmp = x + (y / 0.31942702700572795) else: tmp = x + (y * ((z * ((a * 1.6453555072203998) - (b * 32.324150453290734))) + (b * 1.6453555072203998))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6e+53) || !(z <= 2300000.0)) tmp = Float64(x + Float64(y / 0.31942702700572795)); else tmp = Float64(x + Float64(y * Float64(Float64(z * Float64(Float64(a * 1.6453555072203998) - Float64(b * 32.324150453290734))) + Float64(b * 1.6453555072203998)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6e+53) || ~((z <= 2300000.0))) tmp = x + (y / 0.31942702700572795); else tmp = x + (y * ((z * ((a * 1.6453555072203998) - (b * 32.324150453290734))) + (b * 1.6453555072203998))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6e+53], N[Not[LessEqual[z, 2300000.0]], $MachinePrecision]], N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(z * N[(N[(a * 1.6453555072203998), $MachinePrecision] - N[(b * 32.324150453290734), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+53} \lor \neg \left(z \leq 2300000\right):\\
\;\;\;\;x + \frac{y}{0.31942702700572795}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(z \cdot \left(a \cdot 1.6453555072203998 - b \cdot 32.324150453290734\right) + b \cdot 1.6453555072203998\right)\\
\end{array}
\end{array}
if z < -5.99999999999999996e53 or 2.3e6 < z Initial program 8.6%
associate-/l*13.9%
fma-def13.9%
fma-def13.9%
fma-def13.9%
fma-def13.9%
fma-def13.9%
fma-def13.9%
fma-def13.9%
Simplified13.9%
Taylor expanded in z around inf 86.8%
if -5.99999999999999996e53 < z < 2.3e6Initial program 98.3%
associate-*l/99.0%
*-commutative99.0%
fma-def99.0%
*-commutative99.0%
fma-def99.0%
*-commutative99.0%
fma-def99.0%
*-commutative99.0%
fma-def99.0%
Simplified99.0%
Taylor expanded in z around 0 79.2%
Taylor expanded in y around 0 89.4%
Final simplification88.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ y 0.31942702700572795))))
(if (<= z -1.02e+96)
t_1
(if (<= z -0.43)
(+ x (* (/ y z) (/ t z)))
(if (<= z 1.16e-24) (+ x (* 1.6453555072203998 (* y b))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y / 0.31942702700572795);
double tmp;
if (z <= -1.02e+96) {
tmp = t_1;
} else if (z <= -0.43) {
tmp = x + ((y / z) * (t / z));
} else if (z <= 1.16e-24) {
tmp = x + (1.6453555072203998 * (y * 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 + (y / 0.31942702700572795d0)
if (z <= (-1.02d+96)) then
tmp = t_1
else if (z <= (-0.43d0)) then
tmp = x + ((y / z) * (t / z))
else if (z <= 1.16d-24) then
tmp = x + (1.6453555072203998d0 * (y * 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 + (y / 0.31942702700572795);
double tmp;
if (z <= -1.02e+96) {
tmp = t_1;
} else if (z <= -0.43) {
tmp = x + ((y / z) * (t / z));
} else if (z <= 1.16e-24) {
tmp = x + (1.6453555072203998 * (y * b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y / 0.31942702700572795) tmp = 0 if z <= -1.02e+96: tmp = t_1 elif z <= -0.43: tmp = x + ((y / z) * (t / z)) elif z <= 1.16e-24: tmp = x + (1.6453555072203998 * (y * b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y / 0.31942702700572795)) tmp = 0.0 if (z <= -1.02e+96) tmp = t_1; elseif (z <= -0.43) tmp = Float64(x + Float64(Float64(y / z) * Float64(t / z))); elseif (z <= 1.16e-24) tmp = Float64(x + Float64(1.6453555072203998 * Float64(y * b))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y / 0.31942702700572795); tmp = 0.0; if (z <= -1.02e+96) tmp = t_1; elseif (z <= -0.43) tmp = x + ((y / z) * (t / z)); elseif (z <= 1.16e-24) tmp = x + (1.6453555072203998 * (y * b)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.02e+96], t$95$1, If[LessEqual[z, -0.43], N[(x + N[(N[(y / z), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.16e-24], N[(x + N[(1.6453555072203998 * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{0.31942702700572795}\\
\mathbf{if}\;z \leq -1.02 \cdot 10^{+96}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -0.43:\\
\;\;\;\;x + \frac{y}{z} \cdot \frac{t}{z}\\
\mathbf{elif}\;z \leq 1.16 \cdot 10^{-24}:\\
\;\;\;\;x + 1.6453555072203998 \cdot \left(y \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.02000000000000001e96 or 1.16e-24 < z Initial program 13.7%
associate-/l*16.8%
fma-def16.8%
fma-def16.8%
fma-def16.8%
fma-def16.8%
fma-def16.8%
fma-def16.8%
fma-def16.8%
Simplified16.8%
Taylor expanded in z around inf 85.5%
if -1.02000000000000001e96 < z < -0.429999999999999993Initial program 49.4%
Taylor expanded in t around inf 48.9%
unpow248.9%
associate-*r*48.8%
*-commutative48.8%
Simplified48.8%
Taylor expanded in z around inf 71.9%
unpow271.9%
Simplified71.9%
Taylor expanded in y around 0 71.9%
unpow271.9%
times-frac75.4%
Simplified75.4%
if -0.429999999999999993 < z < 1.16e-24Initial program 99.7%
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%
Taylor expanded in z around 0 84.5%
Final simplification84.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6.5e+15) (not (<= z 1.16e-24))) (+ x (/ y 0.31942702700572795)) (+ x (* 1.6453555072203998 (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.5e+15) || !(z <= 1.16e-24)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + (1.6453555072203998 * (y * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-6.5d+15)) .or. (.not. (z <= 1.16d-24))) then
tmp = x + (y / 0.31942702700572795d0)
else
tmp = x + (1.6453555072203998d0 * (y * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.5e+15) || !(z <= 1.16e-24)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + (1.6453555072203998 * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6.5e+15) or not (z <= 1.16e-24): tmp = x + (y / 0.31942702700572795) else: tmp = x + (1.6453555072203998 * (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6.5e+15) || !(z <= 1.16e-24)) tmp = Float64(x + Float64(y / 0.31942702700572795)); else tmp = Float64(x + Float64(1.6453555072203998 * Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6.5e+15) || ~((z <= 1.16e-24))) tmp = x + (y / 0.31942702700572795); else tmp = x + (1.6453555072203998 * (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6.5e+15], N[Not[LessEqual[z, 1.16e-24]], $MachinePrecision]], N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision], N[(x + N[(1.6453555072203998 * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+15} \lor \neg \left(z \leq 1.16 \cdot 10^{-24}\right):\\
\;\;\;\;x + \frac{y}{0.31942702700572795}\\
\mathbf{else}:\\
\;\;\;\;x + 1.6453555072203998 \cdot \left(y \cdot b\right)\\
\end{array}
\end{array}
if z < -6.5e15 or 1.16e-24 < z Initial program 17.2%
associate-/l*21.9%
fma-def21.9%
fma-def21.9%
fma-def21.9%
fma-def21.9%
fma-def21.9%
fma-def21.9%
fma-def21.9%
Simplified21.9%
Taylor expanded in z around inf 81.1%
if -6.5e15 < z < 1.16e-24Initial program 99.0%
associate-*l/99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in z around 0 82.7%
Final simplification81.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -9.6e-62) (not (<= z 4.6e-45))) (+ x (/ y 0.31942702700572795)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -9.6e-62) || !(z <= 4.6e-45)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-9.6d-62)) .or. (.not. (z <= 4.6d-45))) then
tmp = x + (y / 0.31942702700572795d0)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -9.6e-62) || !(z <= 4.6e-45)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -9.6e-62) or not (z <= 4.6e-45): tmp = x + (y / 0.31942702700572795) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -9.6e-62) || !(z <= 4.6e-45)) tmp = Float64(x + Float64(y / 0.31942702700572795)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -9.6e-62) || ~((z <= 4.6e-45))) tmp = x + (y / 0.31942702700572795); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -9.6e-62], N[Not[LessEqual[z, 4.6e-45]], $MachinePrecision]], N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.6 \cdot 10^{-62} \lor \neg \left(z \leq 4.6 \cdot 10^{-45}\right):\\
\;\;\;\;x + \frac{y}{0.31942702700572795}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -9.59999999999999934e-62 or 4.59999999999999983e-45 < z Initial program 26.6%
associate-/l*31.3%
fma-def31.3%
fma-def31.3%
fma-def31.3%
fma-def31.3%
fma-def31.3%
fma-def31.3%
fma-def31.3%
Simplified31.3%
Taylor expanded in z around inf 74.2%
if -9.59999999999999934e-62 < z < 4.59999999999999983e-45Initial program 99.7%
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 inf 52.9%
Taylor expanded in x around inf 52.9%
Final simplification66.0%
(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 54.9%
associate-/l*57.8%
fma-def57.8%
fma-def57.8%
fma-def57.8%
fma-def57.8%
fma-def57.8%
fma-def57.8%
fma-def57.8%
Simplified57.8%
Taylor expanded in z around inf 65.9%
Taylor expanded in x around inf 48.2%
Final simplification48.2%
(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 2023240
(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))))