
(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.7e+59) (not (<= z 6.5e+16)))
(+
x
(+
(/
y
(+
(/ 3.7269864963038164 z)
(- 0.31942702700572795 (/ 3.241970391368047 (* z z)))))
(* 0.10203362558171805 (* 9.800690647801265 (* t (/ y (* z z)))))))
(+
(/
(*
y
(+
(* z (+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))))
b))
(+
(* z (+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771))
x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.7e+59) || !(z <= 6.5e+16)) {
tmp = x + ((y / ((3.7269864963038164 / z) + (0.31942702700572795 - (3.241970391368047 / (z * z))))) + (0.10203362558171805 * (9.800690647801265 * (t * (y / (z * z))))));
} else {
tmp = ((y * ((z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-6.7d+59)) .or. (.not. (z <= 6.5d+16))) then
tmp = x + ((y / ((3.7269864963038164d0 / z) + (0.31942702700572795d0 - (3.241970391368047d0 / (z * z))))) + (0.10203362558171805d0 * (9.800690647801265d0 * (t * (y / (z * z))))))
else
tmp = ((y * ((z * (a + (z * (t + (z * (11.1667541262d0 + (z * 3.13060547623d0))))))) + b)) / ((z * ((z * ((z * (z + 15.234687407d0)) + 31.4690115749d0)) + 11.9400905721d0)) + 0.607771387771d0)) + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.7e+59) || !(z <= 6.5e+16)) {
tmp = x + ((y / ((3.7269864963038164 / z) + (0.31942702700572795 - (3.241970391368047 / (z * z))))) + (0.10203362558171805 * (9.800690647801265 * (t * (y / (z * z))))));
} else {
tmp = ((y * ((z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) + x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6.7e+59) or not (z <= 6.5e+16): tmp = x + ((y / ((3.7269864963038164 / z) + (0.31942702700572795 - (3.241970391368047 / (z * z))))) + (0.10203362558171805 * (9.800690647801265 * (t * (y / (z * z)))))) else: tmp = ((y * ((z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) + x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6.7e+59) || !(z <= 6.5e+16)) tmp = Float64(x + Float64(Float64(y / Float64(Float64(3.7269864963038164 / z) + Float64(0.31942702700572795 - Float64(3.241970391368047 / Float64(z * z))))) + Float64(0.10203362558171805 * Float64(9.800690647801265 * Float64(t * Float64(y / Float64(z * z))))))); else tmp = Float64(Float64(Float64(y * Float64(Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623))))))) + b)) / Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) + x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6.7e+59) || ~((z <= 6.5e+16))) tmp = x + ((y / ((3.7269864963038164 / z) + (0.31942702700572795 - (3.241970391368047 / (z * z))))) + (0.10203362558171805 * (9.800690647801265 * (t * (y / (z * z)))))); else tmp = ((y * ((z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6.7e+59], N[Not[LessEqual[z, 6.5e+16]], $MachinePrecision]], N[(x + N[(N[(y / N[(N[(3.7269864963038164 / z), $MachinePrecision] + N[(0.31942702700572795 - N[(3.241970391368047 / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.10203362558171805 * N[(9.800690647801265 * N[(t * N[(y / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * N[(N[(z * N[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(N[(z * N[(N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision] + 31.4690115749), $MachinePrecision]), $MachinePrecision] + 11.9400905721), $MachinePrecision]), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.7 \cdot 10^{+59} \lor \neg \left(z \leq 6.5 \cdot 10^{+16}\right):\\
\;\;\;\;x + \left(\frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 - \frac{3.241970391368047}{z \cdot z}\right)} + 0.10203362558171805 \cdot \left(9.800690647801265 \cdot \left(t \cdot \frac{y}{z \cdot z}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right) + b\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771} + x\\
\end{array}
\end{array}
if z < -6.7000000000000004e59 or 6.5e16 < z Initial program 10.8%
associate-/l*15.3%
fma-def15.3%
fma-def15.3%
fma-def15.3%
fma-def15.3%
fma-def15.3%
fma-def15.3%
fma-def15.3%
Simplified15.3%
Taylor expanded in z around inf 89.9%
associate-*r/89.9%
metadata-eval89.9%
mul-1-neg89.9%
*-commutative89.9%
unpow289.9%
Simplified89.9%
Taylor expanded in t around 0 79.0%
associate--l+79.0%
associate-*r/79.0%
metadata-eval79.0%
associate-*r/79.0%
metadata-eval79.0%
unpow279.0%
times-frac96.0%
unpow296.0%
Simplified96.0%
Taylor expanded in z around inf 79.0%
associate-*l/96.0%
unpow296.0%
*-commutative96.0%
Simplified96.0%
if -6.7000000000000004e59 < z < 6.5e16Initial program 98.3%
Final simplification97.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+
(*
z
(+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771))
(t_2
(* z (+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))))))
(if (<= (/ (* y (+ t_2 b)) t_1) INFINITY)
(+ (* y (+ (/ b t_1) (/ t_2 t_1))) x)
(+
x
(+
(/
y
(+
(/ 3.7269864963038164 z)
(- 0.31942702700572795 (/ 3.241970391368047 (* z z)))))
(* 0.10203362558171805 (* 9.800690647801265 (* t (/ y (* z z))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771;
double t_2 = z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))));
double tmp;
if (((y * (t_2 + b)) / t_1) <= ((double) INFINITY)) {
tmp = (y * ((b / t_1) + (t_2 / t_1))) + x;
} else {
tmp = x + ((y / ((3.7269864963038164 / z) + (0.31942702700572795 - (3.241970391368047 / (z * z))))) + (0.10203362558171805 * (9.800690647801265 * (t * (y / (z * z))))));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771;
double t_2 = z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))));
double tmp;
if (((y * (t_2 + b)) / t_1) <= Double.POSITIVE_INFINITY) {
tmp = (y * ((b / t_1) + (t_2 / t_1))) + x;
} else {
tmp = x + ((y / ((3.7269864963038164 / z) + (0.31942702700572795 - (3.241970391368047 / (z * z))))) + (0.10203362558171805 * (9.800690647801265 * (t * (y / (z * z))))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771 t_2 = z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623)))))) tmp = 0 if ((y * (t_2 + b)) / t_1) <= math.inf: tmp = (y * ((b / t_1) + (t_2 / t_1))) + x else: tmp = x + ((y / ((3.7269864963038164 / z) + (0.31942702700572795 - (3.241970391368047 / (z * z))))) + (0.10203362558171805 * (9.800690647801265 * (t * (y / (z * z)))))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771) t_2 = Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623))))))) tmp = 0.0 if (Float64(Float64(y * Float64(t_2 + b)) / t_1) <= Inf) tmp = Float64(Float64(y * Float64(Float64(b / t_1) + Float64(t_2 / t_1))) + x); else tmp = Float64(x + Float64(Float64(y / Float64(Float64(3.7269864963038164 / z) + Float64(0.31942702700572795 - Float64(3.241970391368047 / Float64(z * z))))) + Float64(0.10203362558171805 * Float64(9.800690647801265 * Float64(t * Float64(y / Float64(z * z))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771; t_2 = z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623)))))); tmp = 0.0; if (((y * (t_2 + b)) / t_1) <= Inf) tmp = (y * ((b / t_1) + (t_2 / t_1))) + x; else tmp = x + ((y / ((3.7269864963038164 / z) + (0.31942702700572795 - (3.241970391368047 / (z * z))))) + (0.10203362558171805 * (9.800690647801265 * (t * (y / (z * z)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(z * N[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(y * N[(t$95$2 + b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], Infinity], N[(N[(y * N[(N[(b / t$95$1), $MachinePrecision] + N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(N[(y / N[(N[(3.7269864963038164 / z), $MachinePrecision] + N[(0.31942702700572795 - N[(3.241970391368047 / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.10203362558171805 * N[(9.800690647801265 * N[(t * N[(y / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771\\
t_2 := z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\\
\mathbf{if}\;\frac{y \cdot \left(t_2 + b\right)}{t_1} \leq \infty:\\
\;\;\;\;y \cdot \left(\frac{b}{t_1} + \frac{t_2}{t_1}\right) + x\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 - \frac{3.241970391368047}{z \cdot z}\right)} + 0.10203362558171805 \cdot \left(9.800690647801265 \cdot \left(t \cdot \frac{y}{z \cdot z}\right)\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 90.6%
+-commutative90.6%
associate-*l/94.6%
*-commutative94.6%
fma-def94.7%
Simplified94.7%
Taylor expanded in y around 0 95.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 96.8%
associate-*r/96.8%
metadata-eval96.8%
mul-1-neg96.8%
*-commutative96.8%
unpow296.8%
Simplified96.8%
Taylor expanded in t around 0 80.7%
associate--l+80.7%
associate-*r/80.7%
metadata-eval80.7%
associate-*r/80.7%
metadata-eval80.7%
unpow280.7%
times-frac99.5%
unpow299.5%
Simplified99.5%
Taylor expanded in z around inf 80.7%
associate-*l/99.5%
unpow299.5%
*-commutative99.5%
Simplified99.5%
Final simplification97.0%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -4e+18) (not (<= z 2e+16)))
(+
x
(+
(/
y
(+
(/ 3.7269864963038164 z)
(- 0.31942702700572795 (/ 3.241970391368047 (* z z)))))
(* 0.10203362558171805 (* 9.800690647801265 (* t (/ y (* z z)))))))
(+
x
(/
(*
y
(+
(* z (+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))))
b))
(+ 0.607771387771 (* z (+ 11.9400905721 (* z 31.4690115749))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4e+18) || !(z <= 2e+16)) {
tmp = x + ((y / ((3.7269864963038164 / z) + (0.31942702700572795 - (3.241970391368047 / (z * z))))) + (0.10203362558171805 * (9.800690647801265 * (t * (y / (z * z))))));
} else {
tmp = x + ((y * ((z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))) + b)) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-4d+18)) .or. (.not. (z <= 2d+16))) then
tmp = x + ((y / ((3.7269864963038164d0 / z) + (0.31942702700572795d0 - (3.241970391368047d0 / (z * z))))) + (0.10203362558171805d0 * (9.800690647801265d0 * (t * (y / (z * z))))))
else
tmp = x + ((y * ((z * (a + (z * (t + (z * (11.1667541262d0 + (z * 3.13060547623d0))))))) + b)) / (0.607771387771d0 + (z * (11.9400905721d0 + (z * 31.4690115749d0)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4e+18) || !(z <= 2e+16)) {
tmp = x + ((y / ((3.7269864963038164 / z) + (0.31942702700572795 - (3.241970391368047 / (z * z))))) + (0.10203362558171805 * (9.800690647801265 * (t * (y / (z * z))))));
} else {
tmp = x + ((y * ((z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))) + b)) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4e+18) or not (z <= 2e+16): tmp = x + ((y / ((3.7269864963038164 / z) + (0.31942702700572795 - (3.241970391368047 / (z * z))))) + (0.10203362558171805 * (9.800690647801265 * (t * (y / (z * z)))))) else: tmp = x + ((y * ((z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))) + b)) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4e+18) || !(z <= 2e+16)) tmp = Float64(x + Float64(Float64(y / Float64(Float64(3.7269864963038164 / z) + Float64(0.31942702700572795 - Float64(3.241970391368047 / Float64(z * z))))) + Float64(0.10203362558171805 * Float64(9.800690647801265 * Float64(t * Float64(y / Float64(z * z))))))); else tmp = Float64(x + Float64(Float64(y * Float64(Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623))))))) + b)) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * 31.4690115749)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -4e+18) || ~((z <= 2e+16))) tmp = x + ((y / ((3.7269864963038164 / z) + (0.31942702700572795 - (3.241970391368047 / (z * z))))) + (0.10203362558171805 * (9.800690647801265 * (t * (y / (z * z)))))); else tmp = x + ((y * ((z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))) + b)) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4e+18], N[Not[LessEqual[z, 2e+16]], $MachinePrecision]], N[(x + N[(N[(y / N[(N[(3.7269864963038164 / z), $MachinePrecision] + N[(0.31942702700572795 - N[(3.241970391368047 / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.10203362558171805 * N[(9.800690647801265 * N[(t * N[(y / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(N[(z * N[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * 31.4690115749), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+18} \lor \neg \left(z \leq 2 \cdot 10^{+16}\right):\\
\;\;\;\;x + \left(\frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 - \frac{3.241970391368047}{z \cdot z}\right)} + 0.10203362558171805 \cdot \left(9.800690647801265 \cdot \left(t \cdot \frac{y}{z \cdot z}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right) + b\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)}\\
\end{array}
\end{array}
if z < -4e18 or 2e16 < z Initial program 15.4%
associate-/l*20.3%
fma-def20.3%
fma-def20.3%
fma-def20.3%
fma-def20.3%
fma-def20.3%
fma-def20.3%
fma-def20.3%
Simplified20.3%
Taylor expanded in z around inf 87.6%
associate-*r/87.6%
metadata-eval87.6%
mul-1-neg87.6%
*-commutative87.6%
unpow287.6%
Simplified87.6%
Taylor expanded in t around 0 77.3%
associate--l+77.3%
associate-*r/77.3%
metadata-eval77.3%
associate-*r/77.3%
metadata-eval77.3%
unpow277.3%
times-frac93.4%
unpow293.4%
Simplified93.4%
Taylor expanded in z around inf 77.3%
associate-*l/93.4%
unpow293.4%
*-commutative93.4%
Simplified93.4%
if -4e18 < z < 2e16Initial program 99.0%
Taylor expanded in z around 0 97.1%
*-commutative97.1%
Simplified97.1%
Final simplification95.2%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -6.5e+67) (not (<= z 1.45e-27)))
(+
x
(+
(/
y
(+
(/ 3.7269864963038164 z)
(- 0.31942702700572795 (/ 3.241970391368047 (* z z)))))
(* 0.10203362558171805 (* 9.800690647801265 (* t (/ y (* z z)))))))
(+
x
(/
(* y (+ b (* z a)))
(+
(* z (+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.5e+67) || !(z <= 1.45e-27)) {
tmp = x + ((y / ((3.7269864963038164 / z) + (0.31942702700572795 - (3.241970391368047 / (z * z))))) + (0.10203362558171805 * (9.800690647801265 * (t * (y / (z * z))))));
} else {
tmp = x + ((y * (b + (z * a))) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-6.5d+67)) .or. (.not. (z <= 1.45d-27))) then
tmp = x + ((y / ((3.7269864963038164d0 / z) + (0.31942702700572795d0 - (3.241970391368047d0 / (z * z))))) + (0.10203362558171805d0 * (9.800690647801265d0 * (t * (y / (z * z))))))
else
tmp = x + ((y * (b + (z * a))) / ((z * ((z * ((z * (z + 15.234687407d0)) + 31.4690115749d0)) + 11.9400905721d0)) + 0.607771387771d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.5e+67) || !(z <= 1.45e-27)) {
tmp = x + ((y / ((3.7269864963038164 / z) + (0.31942702700572795 - (3.241970391368047 / (z * z))))) + (0.10203362558171805 * (9.800690647801265 * (t * (y / (z * z))))));
} else {
tmp = x + ((y * (b + (z * a))) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6.5e+67) or not (z <= 1.45e-27): tmp = x + ((y / ((3.7269864963038164 / z) + (0.31942702700572795 - (3.241970391368047 / (z * z))))) + (0.10203362558171805 * (9.800690647801265 * (t * (y / (z * z)))))) else: tmp = x + ((y * (b + (z * a))) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6.5e+67) || !(z <= 1.45e-27)) tmp = Float64(x + Float64(Float64(y / Float64(Float64(3.7269864963038164 / z) + Float64(0.31942702700572795 - Float64(3.241970391368047 / Float64(z * z))))) + Float64(0.10203362558171805 * Float64(9.800690647801265 * Float64(t * Float64(y / Float64(z * z))))))); else tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * a))) / Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6.5e+67) || ~((z <= 1.45e-27))) tmp = x + ((y / ((3.7269864963038164 / z) + (0.31942702700572795 - (3.241970391368047 / (z * z))))) + (0.10203362558171805 * (9.800690647801265 * (t * (y / (z * z)))))); else tmp = x + ((y * (b + (z * a))) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6.5e+67], N[Not[LessEqual[z, 1.45e-27]], $MachinePrecision]], N[(x + N[(N[(y / N[(N[(3.7269864963038164 / z), $MachinePrecision] + N[(0.31942702700572795 - N[(3.241970391368047 / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.10203362558171805 * N[(9.800690647801265 * N[(t * N[(y / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(b + N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(N[(z * N[(N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision] + 31.4690115749), $MachinePrecision]), $MachinePrecision] + 11.9400905721), $MachinePrecision]), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+67} \lor \neg \left(z \leq 1.45 \cdot 10^{-27}\right):\\
\;\;\;\;x + \left(\frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 - \frac{3.241970391368047}{z \cdot z}\right)} + 0.10203362558171805 \cdot \left(9.800690647801265 \cdot \left(t \cdot \frac{y}{z \cdot z}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot a\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771}\\
\end{array}
\end{array}
if z < -6.4999999999999995e67 or 1.45000000000000002e-27 < z Initial program 14.4%
associate-/l*18.0%
fma-def18.0%
fma-def18.0%
fma-def18.0%
fma-def18.0%
fma-def18.0%
fma-def18.0%
fma-def18.0%
Simplified18.0%
Taylor expanded in z around inf 86.4%
associate-*r/86.4%
metadata-eval86.4%
mul-1-neg86.4%
*-commutative86.4%
unpow286.4%
Simplified86.4%
Taylor expanded in t around 0 77.3%
associate--l+77.3%
associate-*r/77.3%
metadata-eval77.3%
associate-*r/77.3%
metadata-eval77.3%
unpow277.3%
times-frac93.2%
unpow293.2%
Simplified93.2%
Taylor expanded in z around inf 77.4%
associate-*l/94.0%
unpow294.0%
*-commutative94.0%
Simplified94.0%
if -6.4999999999999995e67 < z < 1.45000000000000002e-27Initial program 96.7%
Taylor expanded in z around 0 91.6%
+-commutative89.4%
associate-*r*86.0%
*-commutative86.0%
associate-*r*90.6%
distribute-lft-out92.2%
*-commutative92.2%
Simplified94.4%
Final simplification94.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -6.5e+67)
(+
x
(/
y
(+
(+ (/ 3.7269864963038164 z) 0.31942702700572795)
(* -0.10203362558171805 (/ t (* z z))))))
(if (<= z 1.7e+16)
(+
x
(/
(* y (+ b (* z a)))
(+
(*
z
(+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771)))
(+ x (* y 3.13060547623)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -6.5e+67) {
tmp = x + (y / (((3.7269864963038164 / z) + 0.31942702700572795) + (-0.10203362558171805 * (t / (z * z)))));
} else if (z <= 1.7e+16) {
tmp = x + ((y * (b + (z * a))) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771));
} 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 <= (-6.5d+67)) then
tmp = x + (y / (((3.7269864963038164d0 / z) + 0.31942702700572795d0) + ((-0.10203362558171805d0) * (t / (z * z)))))
else if (z <= 1.7d+16) then
tmp = x + ((y * (b + (z * a))) / ((z * ((z * ((z * (z + 15.234687407d0)) + 31.4690115749d0)) + 11.9400905721d0)) + 0.607771387771d0))
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 <= -6.5e+67) {
tmp = x + (y / (((3.7269864963038164 / z) + 0.31942702700572795) + (-0.10203362558171805 * (t / (z * z)))));
} else if (z <= 1.7e+16) {
tmp = x + ((y * (b + (z * a))) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771));
} else {
tmp = x + (y * 3.13060547623);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -6.5e+67: tmp = x + (y / (((3.7269864963038164 / z) + 0.31942702700572795) + (-0.10203362558171805 * (t / (z * z))))) elif z <= 1.7e+16: tmp = x + ((y * (b + (z * a))) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) else: tmp = x + (y * 3.13060547623) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -6.5e+67) tmp = Float64(x + Float64(y / Float64(Float64(Float64(3.7269864963038164 / z) + 0.31942702700572795) + Float64(-0.10203362558171805 * Float64(t / Float64(z * z)))))); elseif (z <= 1.7e+16) tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * a))) / Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771))); else tmp = Float64(x + Float64(y * 3.13060547623)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -6.5e+67) tmp = x + (y / (((3.7269864963038164 / z) + 0.31942702700572795) + (-0.10203362558171805 * (t / (z * z))))); elseif (z <= 1.7e+16) tmp = x + ((y * (b + (z * a))) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)); else tmp = x + (y * 3.13060547623); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -6.5e+67], N[(x + N[(y / N[(N[(N[(3.7269864963038164 / z), $MachinePrecision] + 0.31942702700572795), $MachinePrecision] + N[(-0.10203362558171805 * N[(t / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.7e+16], N[(x + N[(N[(y * N[(b + N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(N[(z * N[(N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision] + 31.4690115749), $MachinePrecision]), $MachinePrecision] + 11.9400905721), $MachinePrecision]), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+67}:\\
\;\;\;\;x + \frac{y}{\left(\frac{3.7269864963038164}{z} + 0.31942702700572795\right) + -0.10203362558171805 \cdot \frac{t}{z \cdot z}}\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{+16}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot a\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\end{array}
\end{array}
if z < -6.4999999999999995e67Initial program 0.2%
associate-/l*0.2%
fma-def0.2%
fma-def0.2%
fma-def0.2%
fma-def0.2%
fma-def0.2%
fma-def0.2%
fma-def0.2%
Simplified0.2%
Taylor expanded in z around inf 93.1%
associate-*r/93.1%
metadata-eval93.1%
mul-1-neg93.1%
*-commutative93.1%
unpow293.1%
Simplified93.1%
Taylor expanded in t around inf 93.1%
associate-*r/93.1%
unpow293.1%
Simplified93.1%
Taylor expanded in y around 0 93.1%
cancel-sign-sub-inv93.1%
associate-*r/93.1%
metadata-eval93.1%
metadata-eval93.1%
unpow293.1%
Simplified93.1%
if -6.4999999999999995e67 < z < 1.7e16Initial program 96.8%
Taylor expanded in z around 0 89.8%
+-commutative87.7%
associate-*r*84.4%
*-commutative84.4%
associate-*r*88.9%
distribute-lft-out90.4%
*-commutative90.4%
Simplified92.5%
if 1.7e16 < z Initial program 17.9%
+-commutative17.9%
associate-*l/23.9%
*-commutative23.9%
fma-def23.9%
Simplified23.9%
Taylor expanded in z around inf 87.3%
Final simplification91.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -8e+47)
(+
x
(/
y
(+
(+ (/ 3.7269864963038164 z) 0.31942702700572795)
(* -0.10203362558171805 (/ t (* z z))))))
(if (<= z 1.25e+16)
(+
x
(/
y
(/
(+
0.607771387771
(* z (+ 11.9400905721 (* (+ z 15.234687407) (* z z)))))
b)))
(+ x (* y 3.13060547623)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -8e+47) {
tmp = x + (y / (((3.7269864963038164 / z) + 0.31942702700572795) + (-0.10203362558171805 * (t / (z * z)))));
} else if (z <= 1.25e+16) {
tmp = x + (y / ((0.607771387771 + (z * (11.9400905721 + ((z + 15.234687407) * (z * z))))) / 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 <= (-8d+47)) then
tmp = x + (y / (((3.7269864963038164d0 / z) + 0.31942702700572795d0) + ((-0.10203362558171805d0) * (t / (z * z)))))
else if (z <= 1.25d+16) then
tmp = x + (y / ((0.607771387771d0 + (z * (11.9400905721d0 + ((z + 15.234687407d0) * (z * z))))) / 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 <= -8e+47) {
tmp = x + (y / (((3.7269864963038164 / z) + 0.31942702700572795) + (-0.10203362558171805 * (t / (z * z)))));
} else if (z <= 1.25e+16) {
tmp = x + (y / ((0.607771387771 + (z * (11.9400905721 + ((z + 15.234687407) * (z * z))))) / b));
} else {
tmp = x + (y * 3.13060547623);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -8e+47: tmp = x + (y / (((3.7269864963038164 / z) + 0.31942702700572795) + (-0.10203362558171805 * (t / (z * z))))) elif z <= 1.25e+16: tmp = x + (y / ((0.607771387771 + (z * (11.9400905721 + ((z + 15.234687407) * (z * z))))) / b)) else: tmp = x + (y * 3.13060547623) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -8e+47) tmp = Float64(x + Float64(y / Float64(Float64(Float64(3.7269864963038164 / z) + 0.31942702700572795) + Float64(-0.10203362558171805 * Float64(t / Float64(z * z)))))); elseif (z <= 1.25e+16) tmp = Float64(x + Float64(y / Float64(Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(Float64(z + 15.234687407) * Float64(z * z))))) / 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 <= -8e+47) tmp = x + (y / (((3.7269864963038164 / z) + 0.31942702700572795) + (-0.10203362558171805 * (t / (z * z))))); elseif (z <= 1.25e+16) tmp = x + (y / ((0.607771387771 + (z * (11.9400905721 + ((z + 15.234687407) * (z * z))))) / b)); else tmp = x + (y * 3.13060547623); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -8e+47], N[(x + N[(y / N[(N[(N[(3.7269864963038164 / z), $MachinePrecision] + 0.31942702700572795), $MachinePrecision] + N[(-0.10203362558171805 * N[(t / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.25e+16], N[(x + N[(y / N[(N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(N[(z + 15.234687407), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+47}:\\
\;\;\;\;x + \frac{y}{\left(\frac{3.7269864963038164}{z} + 0.31942702700572795\right) + -0.10203362558171805 \cdot \frac{t}{z \cdot z}}\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+16}:\\
\;\;\;\;x + \frac{y}{\frac{0.607771387771 + z \cdot \left(11.9400905721 + \left(z + 15.234687407\right) \cdot \left(z \cdot z\right)\right)}{b}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\end{array}
\end{array}
if z < -8.0000000000000004e47Initial program 7.0%
associate-/l*10.2%
fma-def10.2%
fma-def10.2%
fma-def10.2%
fma-def10.2%
fma-def10.2%
fma-def10.2%
fma-def10.2%
Simplified10.2%
Taylor expanded in z around inf 90.7%
associate-*r/90.7%
metadata-eval90.7%
mul-1-neg90.7%
*-commutative90.7%
unpow290.7%
Simplified90.7%
Taylor expanded in t around inf 90.7%
associate-*r/90.7%
unpow290.7%
Simplified90.7%
Taylor expanded in y around 0 90.7%
cancel-sign-sub-inv90.7%
associate-*r/90.7%
metadata-eval90.7%
metadata-eval90.7%
unpow290.7%
Simplified90.7%
if -8.0000000000000004e47 < z < 1.25e16Initial program 99.0%
associate-/l*99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in b around inf 78.7%
Taylor expanded in z around inf 78.7%
cube-mult78.7%
unpow278.7%
distribute-rgt-out78.7%
unpow278.7%
Simplified78.7%
if 1.25e16 < z Initial program 17.9%
+-commutative17.9%
associate-*l/23.9%
*-commutative23.9%
fma-def23.9%
Simplified23.9%
Taylor expanded in z around inf 87.3%
Final simplification83.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -5.4e+16)
(+
x
(/
y
(+
(+ (/ 3.7269864963038164 z) 0.31942702700572795)
(* -0.10203362558171805 (/ t (* z z))))))
(if (<= z 2.7e+15)
(+
x
(/
(* y (+ b (* z a)))
(+ 0.607771387771 (* z (+ 11.9400905721 (* z 31.4690115749))))))
(+ x (* y 3.13060547623)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -5.4e+16) {
tmp = x + (y / (((3.7269864963038164 / z) + 0.31942702700572795) + (-0.10203362558171805 * (t / (z * z)))));
} else if (z <= 2.7e+15) {
tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
} 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 <= (-5.4d+16)) then
tmp = x + (y / (((3.7269864963038164d0 / z) + 0.31942702700572795d0) + ((-0.10203362558171805d0) * (t / (z * z)))))
else if (z <= 2.7d+15) then
tmp = x + ((y * (b + (z * a))) / (0.607771387771d0 + (z * (11.9400905721d0 + (z * 31.4690115749d0)))))
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 <= -5.4e+16) {
tmp = x + (y / (((3.7269864963038164 / z) + 0.31942702700572795) + (-0.10203362558171805 * (t / (z * z)))));
} else if (z <= 2.7e+15) {
tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
} else {
tmp = x + (y * 3.13060547623);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -5.4e+16: tmp = x + (y / (((3.7269864963038164 / z) + 0.31942702700572795) + (-0.10203362558171805 * (t / (z * z))))) elif z <= 2.7e+15: tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749))))) else: tmp = x + (y * 3.13060547623) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -5.4e+16) tmp = Float64(x + Float64(y / Float64(Float64(Float64(3.7269864963038164 / z) + 0.31942702700572795) + Float64(-0.10203362558171805 * Float64(t / Float64(z * z)))))); elseif (z <= 2.7e+15) tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * a))) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * 31.4690115749)))))); 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 <= -5.4e+16) tmp = x + (y / (((3.7269864963038164 / z) + 0.31942702700572795) + (-0.10203362558171805 * (t / (z * z))))); elseif (z <= 2.7e+15) tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749))))); else tmp = x + (y * 3.13060547623); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -5.4e+16], N[(x + N[(y / N[(N[(N[(3.7269864963038164 / z), $MachinePrecision] + 0.31942702700572795), $MachinePrecision] + N[(-0.10203362558171805 * N[(t / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e+15], N[(x + N[(N[(y * N[(b + N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * 31.4690115749), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \cdot 10^{+16}:\\
\;\;\;\;x + \frac{y}{\left(\frac{3.7269864963038164}{z} + 0.31942702700572795\right) + -0.10203362558171805 \cdot \frac{t}{z \cdot z}}\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+15}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot a\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\end{array}
\end{array}
if z < -5.4e16Initial program 14.0%
associate-/l*17.0%
fma-def17.0%
fma-def17.0%
fma-def17.0%
fma-def17.0%
fma-def17.0%
fma-def17.0%
fma-def17.0%
Simplified17.0%
Taylor expanded in z around inf 86.9%
associate-*r/86.9%
metadata-eval86.9%
mul-1-neg86.9%
*-commutative86.9%
unpow286.9%
Simplified86.9%
Taylor expanded in t around inf 86.9%
associate-*r/86.9%
unpow286.9%
Simplified86.9%
Taylor expanded in y around 0 86.9%
cancel-sign-sub-inv86.9%
associate-*r/86.9%
metadata-eval86.9%
metadata-eval86.9%
unpow286.9%
Simplified86.9%
if -5.4e16 < z < 2.7e15Initial program 99.0%
Taylor expanded in z around 0 97.1%
*-commutative97.1%
Simplified97.1%
Taylor expanded in z around 0 91.2%
+-commutative91.2%
associate-*r*87.6%
*-commutative87.6%
associate-*r*92.5%
distribute-lft-out94.1%
*-commutative94.1%
Simplified94.1%
if 2.7e15 < z Initial program 17.9%
+-commutative17.9%
associate-*l/23.9%
*-commutative23.9%
fma-def23.9%
Simplified23.9%
Taylor expanded in z around inf 87.3%
Final simplification90.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -6.2e+18)
(+
x
(/
y
(+
(+ (/ 3.7269864963038164 z) 0.31942702700572795)
(* -0.10203362558171805 (/ t (* z z))))))
(if (<= z 7.5e+15)
(+ 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 <= -6.2e+18) {
tmp = x + (y / (((3.7269864963038164 / z) + 0.31942702700572795) + (-0.10203362558171805 * (t / (z * z)))));
} else if (z <= 7.5e+15) {
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 <= (-6.2d+18)) then
tmp = x + (y / (((3.7269864963038164d0 / z) + 0.31942702700572795d0) + ((-0.10203362558171805d0) * (t / (z * z)))))
else if (z <= 7.5d+15) 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 <= -6.2e+18) {
tmp = x + (y / (((3.7269864963038164 / z) + 0.31942702700572795) + (-0.10203362558171805 * (t / (z * z)))));
} else if (z <= 7.5e+15) {
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 <= -6.2e+18: tmp = x + (y / (((3.7269864963038164 / z) + 0.31942702700572795) + (-0.10203362558171805 * (t / (z * z))))) elif z <= 7.5e+15: 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 <= -6.2e+18) tmp = Float64(x + Float64(y / Float64(Float64(Float64(3.7269864963038164 / z) + 0.31942702700572795) + Float64(-0.10203362558171805 * Float64(t / Float64(z * z)))))); elseif (z <= 7.5e+15) 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 <= -6.2e+18) tmp = x + (y / (((3.7269864963038164 / z) + 0.31942702700572795) + (-0.10203362558171805 * (t / (z * z))))); elseif (z <= 7.5e+15) 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, -6.2e+18], N[(x + N[(y / N[(N[(N[(3.7269864963038164 / z), $MachinePrecision] + 0.31942702700572795), $MachinePrecision] + N[(-0.10203362558171805 * N[(t / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e+15], 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 -6.2 \cdot 10^{+18}:\\
\;\;\;\;x + \frac{y}{\left(\frac{3.7269864963038164}{z} + 0.31942702700572795\right) + -0.10203362558171805 \cdot \frac{t}{z \cdot z}}\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+15}:\\
\;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\end{array}
\end{array}
if z < -6.2e18Initial program 12.7%
associate-/l*15.7%
fma-def15.7%
fma-def15.7%
fma-def15.7%
fma-def15.7%
fma-def15.7%
fma-def15.7%
fma-def15.7%
Simplified15.7%
Taylor expanded in z around inf 88.2%
associate-*r/88.2%
metadata-eval88.2%
mul-1-neg88.2%
*-commutative88.2%
unpow288.2%
Simplified88.2%
Taylor expanded in t around inf 88.2%
associate-*r/88.2%
unpow288.2%
Simplified88.2%
Taylor expanded in y around 0 88.2%
cancel-sign-sub-inv88.2%
associate-*r/88.2%
metadata-eval88.2%
metadata-eval88.2%
unpow288.2%
Simplified88.2%
if -6.2e18 < z < 7.5e15Initial program 99.0%
associate-/l*99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in b around inf 79.6%
Taylor expanded in z around 0 78.9%
*-commutative78.9%
associate-*l*78.9%
Simplified78.9%
if 7.5e15 < z Initial program 17.9%
+-commutative17.9%
associate-*l/23.9%
*-commutative23.9%
fma-def23.9%
Simplified23.9%
Taylor expanded in z around inf 87.3%
Final simplification83.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* 1.6453555072203998 (* y b))) (t_2 (+ x (* y 3.13060547623))))
(if (<= z -1.22e-18)
t_2
(if (<= z -4e-181)
t_1
(if (<= z -5e-245) x (if (<= z 1.3e-49) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.6453555072203998 * (y * b);
double t_2 = x + (y * 3.13060547623);
double tmp;
if (z <= -1.22e-18) {
tmp = t_2;
} else if (z <= -4e-181) {
tmp = t_1;
} else if (z <= -5e-245) {
tmp = x;
} else if (z <= 1.3e-49) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 1.6453555072203998d0 * (y * b)
t_2 = x + (y * 3.13060547623d0)
if (z <= (-1.22d-18)) then
tmp = t_2
else if (z <= (-4d-181)) then
tmp = t_1
else if (z <= (-5d-245)) then
tmp = x
else if (z <= 1.3d-49) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.6453555072203998 * (y * b);
double t_2 = x + (y * 3.13060547623);
double tmp;
if (z <= -1.22e-18) {
tmp = t_2;
} else if (z <= -4e-181) {
tmp = t_1;
} else if (z <= -5e-245) {
tmp = x;
} else if (z <= 1.3e-49) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.6453555072203998 * (y * b) t_2 = x + (y * 3.13060547623) tmp = 0 if z <= -1.22e-18: tmp = t_2 elif z <= -4e-181: tmp = t_1 elif z <= -5e-245: tmp = x elif z <= 1.3e-49: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.6453555072203998 * Float64(y * b)) t_2 = Float64(x + Float64(y * 3.13060547623)) tmp = 0.0 if (z <= -1.22e-18) tmp = t_2; elseif (z <= -4e-181) tmp = t_1; elseif (z <= -5e-245) tmp = x; elseif (z <= 1.3e-49) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.6453555072203998 * (y * b); t_2 = x + (y * 3.13060547623); tmp = 0.0; if (z <= -1.22e-18) tmp = t_2; elseif (z <= -4e-181) tmp = t_1; elseif (z <= -5e-245) tmp = x; elseif (z <= 1.3e-49) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.6453555072203998 * N[(y * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.22e-18], t$95$2, If[LessEqual[z, -4e-181], t$95$1, If[LessEqual[z, -5e-245], x, If[LessEqual[z, 1.3e-49], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1.6453555072203998 \cdot \left(y \cdot b\right)\\
t_2 := x + y \cdot 3.13060547623\\
\mathbf{if}\;z \leq -1.22 \cdot 10^{-18}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-181}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-245}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-49}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -1.2200000000000001e-18 or 1.29999999999999997e-49 < z Initial program 24.8%
+-commutative24.8%
associate-*l/28.9%
*-commutative28.9%
fma-def28.9%
Simplified28.9%
Taylor expanded in z around inf 81.8%
if -1.2200000000000001e-18 < z < -4.00000000000000019e-181 or -4.9999999999999997e-245 < z < 1.29999999999999997e-49Initial program 99.7%
+-commutative99.7%
associate-*l/99.7%
*-commutative99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in z around 0 82.3%
fma-def82.3%
Simplified82.3%
Taylor expanded in y around inf 54.2%
if -4.00000000000000019e-181 < z < -4.9999999999999997e-245Initial program 99.8%
+-commutative99.8%
associate-*l/99.8%
*-commutative99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in y around 0 77.6%
Final simplification71.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4.35e+18) (not (<= z 4.6e+14))) (+ 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 <= -4.35e+18) || !(z <= 4.6e+14)) {
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 <= (-4.35d+18)) .or. (.not. (z <= 4.6d+14))) 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 <= -4.35e+18) || !(z <= 4.6e+14)) {
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 <= -4.35e+18) or not (z <= 4.6e+14): 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 <= -4.35e+18) || !(z <= 4.6e+14)) 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 <= -4.35e+18) || ~((z <= 4.6e+14))) 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, -4.35e+18], N[Not[LessEqual[z, 4.6e+14]], $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 -4.35 \cdot 10^{+18} \lor \neg \left(z \leq 4.6 \cdot 10^{+14}\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\
\end{array}
\end{array}
if z < -4.35e18 or 4.6e14 < z Initial program 15.4%
+-commutative15.4%
associate-*l/19.4%
*-commutative19.4%
fma-def19.4%
Simplified19.4%
Taylor expanded in z around inf 87.4%
if -4.35e18 < z < 4.6e14Initial program 99.0%
associate-/l*99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in b around inf 79.6%
Taylor expanded in z around 0 78.9%
*-commutative78.9%
associate-*l*78.9%
Simplified78.9%
Final simplification83.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.3e+214) (not (<= y 5500000000.0))) (* 1.6453555072203998 (* y b)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.3e+214) || !(y <= 5500000000.0)) {
tmp = 1.6453555072203998 * (y * b);
} 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 ((y <= (-3.3d+214)) .or. (.not. (y <= 5500000000.0d0))) then
tmp = 1.6453555072203998d0 * (y * b)
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 ((y <= -3.3e+214) || !(y <= 5500000000.0)) {
tmp = 1.6453555072203998 * (y * b);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.3e+214) or not (y <= 5500000000.0): tmp = 1.6453555072203998 * (y * b) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.3e+214) || !(y <= 5500000000.0)) tmp = Float64(1.6453555072203998 * Float64(y * b)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.3e+214) || ~((y <= 5500000000.0))) tmp = 1.6453555072203998 * (y * b); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.3e+214], N[Not[LessEqual[y, 5500000000.0]], $MachinePrecision]], N[(1.6453555072203998 * N[(y * b), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{+214} \lor \neg \left(y \leq 5500000000\right):\\
\;\;\;\;1.6453555072203998 \cdot \left(y \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -3.30000000000000011e214 or 5.5e9 < y Initial program 60.2%
+-commutative60.2%
associate-*l/63.5%
*-commutative63.5%
fma-def63.5%
Simplified63.5%
Taylor expanded in z around 0 43.6%
fma-def43.6%
Simplified43.6%
Taylor expanded in y around inf 36.9%
if -3.30000000000000011e214 < y < 5.5e9Initial program 52.8%
+-commutative52.8%
associate-*l/54.8%
*-commutative54.8%
fma-def54.8%
Simplified54.8%
Taylor expanded in y around 0 51.4%
Final simplification46.6%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 55.2%
+-commutative55.2%
associate-*l/57.7%
*-commutative57.7%
fma-def57.7%
Simplified57.7%
Taylor expanded in y around 0 37.5%
Final simplification37.5%
(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 2023238
(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))))