
(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 16 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
(+
x
(+
(/
(- (* y -47.69379582500642) (- (* y -11.1667541262) (* y (/ t z))))
z)
(* y 3.13060547623)))))
(if (<= z -4.1e+15)
t_1
(if (<= z 3.5e-11)
(+
x
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
(+ 0.607771387771 (* z (+ 11.9400905721 (* z 31.4690115749))))))
(if (<= z 1.65e+42)
(+
x
(/
(+ (* z (+ (* y a) (* t (* y z)))) (* y b))
(+
(*
z
(+
(* z (+ (* z (+ z 15.234687407)) 31.4690115749))
11.9400905721))
0.607771387771)))
t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((((y * -47.69379582500642) - ((y * -11.1667541262) - (y * (t / z)))) / z) + (y * 3.13060547623));
double tmp;
if (z <= -4.1e+15) {
tmp = t_1;
} else if (z <= 3.5e-11) {
tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
} else if (z <= 1.65e+42) {
tmp = x + (((z * ((y * a) + (t * (y * z)))) + (y * b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771));
} 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 * (-47.69379582500642d0)) - ((y * (-11.1667541262d0)) - (y * (t / z)))) / z) + (y * 3.13060547623d0))
if (z <= (-4.1d+15)) then
tmp = t_1
else if (z <= 3.5d-11) then
tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623d0) + 11.1667541262d0)) + t)) + a)) + b)) / (0.607771387771d0 + (z * (11.9400905721d0 + (z * 31.4690115749d0)))))
else if (z <= 1.65d+42) then
tmp = x + (((z * ((y * a) + (t * (y * z)))) + (y * b)) / ((z * ((z * ((z * (z + 15.234687407d0)) + 31.4690115749d0)) + 11.9400905721d0)) + 0.607771387771d0))
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 * -47.69379582500642) - ((y * -11.1667541262) - (y * (t / z)))) / z) + (y * 3.13060547623));
double tmp;
if (z <= -4.1e+15) {
tmp = t_1;
} else if (z <= 3.5e-11) {
tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
} else if (z <= 1.65e+42) {
tmp = x + (((z * ((y * a) + (t * (y * z)))) + (y * b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((((y * -47.69379582500642) - ((y * -11.1667541262) - (y * (t / z)))) / z) + (y * 3.13060547623)) tmp = 0 if z <= -4.1e+15: tmp = t_1 elif z <= 3.5e-11: tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749))))) elif z <= 1.65e+42: tmp = x + (((z * ((y * a) + (t * (y * z)))) + (y * b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(Float64(Float64(y * -47.69379582500642) - Float64(Float64(y * -11.1667541262) - Float64(y * Float64(t / z)))) / z) + Float64(y * 3.13060547623))) tmp = 0.0 if (z <= -4.1e+15) tmp = t_1; elseif (z <= 3.5e-11) tmp = Float64(x + Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * 31.4690115749)))))); elseif (z <= 1.65e+42) tmp = Float64(x + Float64(Float64(Float64(z * Float64(Float64(y * a) + Float64(t * Float64(y * z)))) + Float64(y * b)) / Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + ((((y * -47.69379582500642) - ((y * -11.1667541262) - (y * (t / z)))) / z) + (y * 3.13060547623)); tmp = 0.0; if (z <= -4.1e+15) tmp = t_1; elseif (z <= 3.5e-11) tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749))))); elseif (z <= 1.65e+42) tmp = x + (((z * ((y * a) + (t * (y * z)))) + (y * b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)); 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[(N[(y * -47.69379582500642), $MachinePrecision] - N[(N[(y * -11.1667541262), $MachinePrecision] - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.1e+15], t$95$1, If[LessEqual[z, 3.5e-11], N[(x + N[(N[(y * N[(N[(z * N[(N[(z * N[(N[(z * N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * 31.4690115749), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e+42], N[(x + N[(N[(N[(z * N[(N[(y * a), $MachinePrecision] + N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * 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]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\frac{y \cdot -47.69379582500642 - \left(y \cdot -11.1667541262 - y \cdot \frac{t}{z}\right)}{z} + y \cdot 3.13060547623\right)\\
\mathbf{if}\;z \leq -4.1 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-11}:\\
\;\;\;\;x + \frac{y \cdot \left(z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right) + b\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)}\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{+42}:\\
\;\;\;\;x + \frac{z \cdot \left(y \cdot a + t \cdot \left(y \cdot z\right)\right) + y \cdot b}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.1e15 or 1.6499999999999999e42 < z Initial program 8.8%
Taylor expanded in z around -inf 89.4%
Taylor expanded in t around inf 89.4%
*-commutative89.4%
associate-/l*98.4%
Simplified98.4%
if -4.1e15 < z < 3.50000000000000019e-11Initial program 99.7%
Taylor expanded in z around 0 99.7%
*-commutative99.7%
Simplified99.7%
if 3.50000000000000019e-11 < z < 1.6499999999999999e42Initial program 93.0%
Taylor expanded in z around 0 99.8%
Final simplification99.1%
(FPCore (x y z t a b)
:precision binary64
(if (<=
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
(+
(*
z
(+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771))
INFINITY)
(fma
y
(/
(fma z (fma z (fma z (fma z 3.13060547623 11.1667541262) t) a) b)
(fma
z
(fma z (fma z (+ z 15.234687407) 31.4690115749) 11.9400905721)
0.607771387771))
x)
(+
x
(+
(/ (- (* y -47.69379582500642) (- (* y -11.1667541262) (* y (/ t z)))) z)
(* y 3.13060547623)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) <= ((double) INFINITY)) {
tmp = fma(y, (fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b) / fma(z, fma(z, fma(z, (z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)), x);
} else {
tmp = x + ((((y * -47.69379582500642) - ((y * -11.1667541262) - (y * (t / z)))) / z) + (y * 3.13060547623));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) <= Inf) tmp = fma(y, Float64(fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b) / fma(z, fma(z, fma(z, Float64(z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)), x); else tmp = Float64(x + Float64(Float64(Float64(Float64(y * -47.69379582500642) - Float64(Float64(y * -11.1667541262) - Float64(y * Float64(t / z)))) / z) + Float64(y * 3.13060547623))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(y * N[(N[(z * N[(N[(z * N[(N[(z * N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(N[(z * N[(N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision] + 31.4690115749), $MachinePrecision]), $MachinePrecision] + 11.9400905721), $MachinePrecision]), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision], Infinity], N[(y * N[(N[(z * N[(z * N[(z * N[(z * 3.13060547623 + 11.1667541262), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + b), $MachinePrecision] / N[(z * N[(z * N[(z * N[(z + 15.234687407), $MachinePrecision] + 31.4690115749), $MachinePrecision] + 11.9400905721), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(N[(N[(N[(y * -47.69379582500642), $MachinePrecision] - N[(N[(y * -11.1667541262), $MachinePrecision] - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right) + b\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771} \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\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)}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)}, x\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{y \cdot -47.69379582500642 - \left(y \cdot -11.1667541262 - y \cdot \frac{t}{z}\right)}{z} + y \cdot 3.13060547623\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < +inf.0Initial program 95.4%
Simplified97.8%
if +inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) Initial program 0.0%
Taylor expanded in z around -inf 89.6%
Taylor expanded in t around inf 89.6%
*-commutative89.6%
associate-/l*99.9%
Simplified99.9%
Final simplification98.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
(+
(*
z
(+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771))))
(if (<= t_1 4e+305)
(+ t_1 x)
(fma
y
(-
3.13060547623
(/ (- 36.52704169880642 (/ (+ t 457.9610022158428) z)) z))
x))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771);
double tmp;
if (t_1 <= 4e+305) {
tmp = t_1 + x;
} else {
tmp = fma(y, (3.13060547623 - ((36.52704169880642 - ((t + 457.9610022158428) / z)) / z)), x);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) tmp = 0.0 if (t_1 <= 4e+305) tmp = Float64(t_1 + x); else tmp = fma(y, Float64(3.13060547623 - Float64(Float64(36.52704169880642 - Float64(Float64(t + 457.9610022158428) / z)) / z)), x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[(z * N[(N[(z * N[(N[(z * N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(N[(z * N[(N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision] + 31.4690115749), $MachinePrecision]), $MachinePrecision] + 11.9400905721), $MachinePrecision]), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 4e+305], N[(t$95$1 + x), $MachinePrecision], N[(y * N[(3.13060547623 - N[(N[(36.52704169880642 - N[(N[(t + 457.9610022158428), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right) + b\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771}\\
\mathbf{if}\;t\_1 \leq 4 \cdot 10^{+305}:\\
\;\;\;\;t\_1 + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623 - \frac{36.52704169880642 - \frac{t + 457.9610022158428}{z}}{z}, x\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < 3.9999999999999998e305Initial program 98.4%
if 3.9999999999999998e305 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) Initial program 2.9%
Simplified5.5%
Taylor expanded in z around -inf 97.3%
mul-1-neg97.3%
unsub-neg97.3%
mul-1-neg97.3%
unsub-neg97.3%
+-commutative97.3%
Simplified97.3%
Final simplification97.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
(+
(*
z
(+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771))))
(if (<= t_1 4e+305)
(+ t_1 x)
(+
x
(+
(/
(- (* y -47.69379582500642) (- (* y -11.1667541262) (* y (/ t z))))
z)
(* y 3.13060547623))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771);
double tmp;
if (t_1 <= 4e+305) {
tmp = t_1 + x;
} else {
tmp = x + ((((y * -47.69379582500642) - ((y * -11.1667541262) - (y * (t / z)))) / z) + (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) :: t_1
real(8) :: tmp
t_1 = (y * ((z * ((z * ((z * ((z * 3.13060547623d0) + 11.1667541262d0)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407d0)) + 31.4690115749d0)) + 11.9400905721d0)) + 0.607771387771d0)
if (t_1 <= 4d+305) then
tmp = t_1 + x
else
tmp = x + ((((y * (-47.69379582500642d0)) - ((y * (-11.1667541262d0)) - (y * (t / z)))) / z) + (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 t_1 = (y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771);
double tmp;
if (t_1 <= 4e+305) {
tmp = t_1 + x;
} else {
tmp = x + ((((y * -47.69379582500642) - ((y * -11.1667541262) - (y * (t / z)))) / z) + (y * 3.13060547623));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771) tmp = 0 if t_1 <= 4e+305: tmp = t_1 + x else: tmp = x + ((((y * -47.69379582500642) - ((y * -11.1667541262) - (y * (t / z)))) / z) + (y * 3.13060547623)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) tmp = 0.0 if (t_1 <= 4e+305) tmp = Float64(t_1 + x); else tmp = Float64(x + Float64(Float64(Float64(Float64(y * -47.69379582500642) - Float64(Float64(y * -11.1667541262) - Float64(y * Float64(t / z)))) / z) + Float64(y * 3.13060547623))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771); tmp = 0.0; if (t_1 <= 4e+305) tmp = t_1 + x; else tmp = x + ((((y * -47.69379582500642) - ((y * -11.1667541262) - (y * (t / z)))) / z) + (y * 3.13060547623)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[(z * N[(N[(z * N[(N[(z * N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(N[(z * N[(N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision] + 31.4690115749), $MachinePrecision]), $MachinePrecision] + 11.9400905721), $MachinePrecision]), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 4e+305], N[(t$95$1 + x), $MachinePrecision], N[(x + N[(N[(N[(N[(y * -47.69379582500642), $MachinePrecision] - N[(N[(y * -11.1667541262), $MachinePrecision] - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right) + b\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771}\\
\mathbf{if}\;t\_1 \leq 4 \cdot 10^{+305}:\\
\;\;\;\;t\_1 + x\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{y \cdot -47.69379582500642 - \left(y \cdot -11.1667541262 - y \cdot \frac{t}{z}\right)}{z} + y \cdot 3.13060547623\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < 3.9999999999999998e305Initial program 98.4%
if 3.9999999999999998e305 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) Initial program 2.9%
Taylor expanded in z around -inf 87.7%
Taylor expanded in t around inf 87.6%
*-commutative87.6%
associate-/l*97.2%
Simplified97.2%
Final simplification97.9%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -3.4e+15) (not (<= z 1.06e+18)))
(+
x
(+
(/ (- (* y -47.69379582500642) (- (* y -11.1667541262) (* y (/ t z)))) z)
(* y 3.13060547623)))
(+
x
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
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 <= -3.4e+15) || !(z <= 1.06e+18)) {
tmp = x + ((((y * -47.69379582500642) - ((y * -11.1667541262) - (y * (t / z)))) / z) + (y * 3.13060547623));
} else {
tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + 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 <= (-3.4d+15)) .or. (.not. (z <= 1.06d+18))) then
tmp = x + ((((y * (-47.69379582500642d0)) - ((y * (-11.1667541262d0)) - (y * (t / z)))) / z) + (y * 3.13060547623d0))
else
tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623d0) + 11.1667541262d0)) + t)) + a)) + 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 <= -3.4e+15) || !(z <= 1.06e+18)) {
tmp = x + ((((y * -47.69379582500642) - ((y * -11.1667541262) - (y * (t / z)))) / z) + (y * 3.13060547623));
} else {
tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.4e+15) or not (z <= 1.06e+18): tmp = x + ((((y * -47.69379582500642) - ((y * -11.1667541262) - (y * (t / z)))) / z) + (y * 3.13060547623)) else: tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.4e+15) || !(z <= 1.06e+18)) tmp = Float64(x + Float64(Float64(Float64(Float64(y * -47.69379582500642) - Float64(Float64(y * -11.1667541262) - Float64(y * Float64(t / z)))) / z) + Float64(y * 3.13060547623))); else tmp = Float64(x + Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / Float64(0.607771387771 + Float64(z * 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 <= -3.4e+15) || ~((z <= 1.06e+18))) tmp = x + ((((y * -47.69379582500642) - ((y * -11.1667541262) - (y * (t / z)))) / z) + (y * 3.13060547623)); else tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + 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, -3.4e+15], N[Not[LessEqual[z, 1.06e+18]], $MachinePrecision]], N[(x + N[(N[(N[(N[(y * -47.69379582500642), $MachinePrecision] - N[(N[(y * -11.1667541262), $MachinePrecision] - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(N[(z * N[(N[(z * N[(N[(z * N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * 31.4690115749), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{+15} \lor \neg \left(z \leq 1.06 \cdot 10^{+18}\right):\\
\;\;\;\;x + \left(\frac{y \cdot -47.69379582500642 - \left(y \cdot -11.1667541262 - y \cdot \frac{t}{z}\right)}{z} + y \cdot 3.13060547623\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right) + b\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)}\\
\end{array}
\end{array}
if z < -3.4e15 or 1.06e18 < z Initial program 10.2%
Taylor expanded in z around -inf 88.9%
Taylor expanded in t around inf 88.9%
*-commutative88.9%
associate-/l*97.6%
Simplified97.6%
if -3.4e15 < z < 1.06e18Initial program 99.7%
Taylor expanded in z around 0 97.1%
*-commutative97.1%
Simplified97.1%
Final simplification97.3%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -0.41) (not (<= z 3.4e+15)))
(+
x
(+
(/ (- (* y -47.69379582500642) (- (* y -11.1667541262) (* y (/ t z)))) z)
(* y 3.13060547623)))
(+
x
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
(+ 0.607771387771 (* z 11.9400905721))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -0.41) || !(z <= 3.4e+15)) {
tmp = x + ((((y * -47.69379582500642) - ((y * -11.1667541262) - (y * (t / z)))) / z) + (y * 3.13060547623));
} else {
tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * 11.9400905721)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-0.41d0)) .or. (.not. (z <= 3.4d+15))) then
tmp = x + ((((y * (-47.69379582500642d0)) - ((y * (-11.1667541262d0)) - (y * (t / z)))) / z) + (y * 3.13060547623d0))
else
tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623d0) + 11.1667541262d0)) + t)) + a)) + b)) / (0.607771387771d0 + (z * 11.9400905721d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -0.41) || !(z <= 3.4e+15)) {
tmp = x + ((((y * -47.69379582500642) - ((y * -11.1667541262) - (y * (t / z)))) / z) + (y * 3.13060547623));
} else {
tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * 11.9400905721)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -0.41) or not (z <= 3.4e+15): tmp = x + ((((y * -47.69379582500642) - ((y * -11.1667541262) - (y * (t / z)))) / z) + (y * 3.13060547623)) else: tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * 11.9400905721))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -0.41) || !(z <= 3.4e+15)) tmp = Float64(x + Float64(Float64(Float64(Float64(y * -47.69379582500642) - Float64(Float64(y * -11.1667541262) - Float64(y * Float64(t / z)))) / z) + Float64(y * 3.13060547623))); else tmp = Float64(x + Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / Float64(0.607771387771 + Float64(z * 11.9400905721)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -0.41) || ~((z <= 3.4e+15))) tmp = x + ((((y * -47.69379582500642) - ((y * -11.1667541262) - (y * (t / z)))) / z) + (y * 3.13060547623)); else tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * 11.9400905721))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -0.41], N[Not[LessEqual[z, 3.4e+15]], $MachinePrecision]], N[(x + N[(N[(N[(N[(y * -47.69379582500642), $MachinePrecision] - N[(N[(y * -11.1667541262), $MachinePrecision] - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(N[(z * N[(N[(z * N[(N[(z * N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.41 \lor \neg \left(z \leq 3.4 \cdot 10^{+15}\right):\\
\;\;\;\;x + \left(\frac{y \cdot -47.69379582500642 - \left(y \cdot -11.1667541262 - y \cdot \frac{t}{z}\right)}{z} + y \cdot 3.13060547623\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right) + b\right)}{0.607771387771 + z \cdot 11.9400905721}\\
\end{array}
\end{array}
if z < -0.409999999999999976 or 3.4e15 < z Initial program 11.7%
Taylor expanded in z around -inf 88.2%
Taylor expanded in t around inf 88.2%
*-commutative88.2%
associate-/l*96.8%
Simplified96.8%
if -0.409999999999999976 < z < 3.4e15Initial program 99.7%
Taylor expanded in z around 0 97.0%
*-commutative97.0%
Simplified97.0%
Final simplification96.9%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -3.2e+15) (not (<= z 3.4e+15)))
(+
x
(+
(/ (- (* y -47.69379582500642) (- (* y -11.1667541262) (* y (/ t z)))) z)
(* y 3.13060547623)))
(+
x
(/
(* y (+ b (* z (+ a (* z (+ t (* z 11.1667541262)))))))
0.607771387771))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.2e+15) || !(z <= 3.4e+15)) {
tmp = x + ((((y * -47.69379582500642) - ((y * -11.1667541262) - (y * (t / z)))) / z) + (y * 3.13060547623));
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / 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 <= (-3.2d+15)) .or. (.not. (z <= 3.4d+15))) then
tmp = x + ((((y * (-47.69379582500642d0)) - ((y * (-11.1667541262d0)) - (y * (t / z)))) / z) + (y * 3.13060547623d0))
else
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262d0))))))) / 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 <= -3.2e+15) || !(z <= 3.4e+15)) {
tmp = x + ((((y * -47.69379582500642) - ((y * -11.1667541262) - (y * (t / z)))) / z) + (y * 3.13060547623));
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / 0.607771387771);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.2e+15) or not (z <= 3.4e+15): tmp = x + ((((y * -47.69379582500642) - ((y * -11.1667541262) - (y * (t / z)))) / z) + (y * 3.13060547623)) else: tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / 0.607771387771) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.2e+15) || !(z <= 3.4e+15)) tmp = Float64(x + Float64(Float64(Float64(Float64(y * -47.69379582500642) - Float64(Float64(y * -11.1667541262) - Float64(y * Float64(t / z)))) / z) + Float64(y * 3.13060547623))); else tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * 11.1667541262))))))) / 0.607771387771)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.2e+15) || ~((z <= 3.4e+15))) tmp = x + ((((y * -47.69379582500642) - ((y * -11.1667541262) - (y * (t / z)))) / z) + (y * 3.13060547623)); else tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / 0.607771387771); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.2e+15], N[Not[LessEqual[z, 3.4e+15]], $MachinePrecision]], N[(x + N[(N[(N[(N[(y * -47.69379582500642), $MachinePrecision] - N[(N[(y * -11.1667541262), $MachinePrecision] - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * N[(t + N[(z * 11.1667541262), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 0.607771387771), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+15} \lor \neg \left(z \leq 3.4 \cdot 10^{+15}\right):\\
\;\;\;\;x + \left(\frac{y \cdot -47.69379582500642 - \left(y \cdot -11.1667541262 - y \cdot \frac{t}{z}\right)}{z} + y \cdot 3.13060547623\right)\\
\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}\\
\end{array}
\end{array}
if z < -3.2e15 or 3.4e15 < z Initial program 10.2%
Taylor expanded in z around -inf 88.9%
Taylor expanded in t around inf 88.9%
*-commutative88.9%
associate-/l*97.6%
Simplified97.6%
if -3.2e15 < z < 3.4e15Initial program 99.7%
Taylor expanded in z around 0 95.6%
*-commutative95.6%
Simplified95.6%
Taylor expanded in z around 0 96.2%
Taylor expanded in z around 0 96.2%
*-commutative96.2%
Simplified96.2%
Final simplification96.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -7.2e+22)
(+ x (* y 3.13060547623))
(if (<= z 5.8e+14)
(+
x
(/
(* y (+ b (* z (+ a (* z (+ t (* z 11.1667541262)))))))
0.607771387771))
(+ x (- (* y 3.13060547623) (/ (* y 36.52704169880642) z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -7.2e+22) {
tmp = x + (y * 3.13060547623);
} else if (z <= 5.8e+14) {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / 0.607771387771);
} else {
tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-7.2d+22)) then
tmp = x + (y * 3.13060547623d0)
else if (z <= 5.8d+14) then
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262d0))))))) / 0.607771387771d0)
else
tmp = x + ((y * 3.13060547623d0) - ((y * 36.52704169880642d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -7.2e+22) {
tmp = x + (y * 3.13060547623);
} else if (z <= 5.8e+14) {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / 0.607771387771);
} else {
tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -7.2e+22: tmp = x + (y * 3.13060547623) elif z <= 5.8e+14: tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / 0.607771387771) else: tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -7.2e+22) tmp = Float64(x + Float64(y * 3.13060547623)); elseif (z <= 5.8e+14) tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * 11.1667541262))))))) / 0.607771387771)); else tmp = Float64(x + Float64(Float64(y * 3.13060547623) - Float64(Float64(y * 36.52704169880642) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -7.2e+22) tmp = x + (y * 3.13060547623); elseif (z <= 5.8e+14) tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / 0.607771387771); else tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -7.2e+22], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e+14], 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] / 0.607771387771), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * 3.13060547623), $MachinePrecision] - N[(N[(y * 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{+22}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{+14}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot 11.1667541262\right)\right)\right)}{0.607771387771}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot 3.13060547623 - \frac{y \cdot 36.52704169880642}{z}\right)\\
\end{array}
\end{array}
if z < -7.2e22Initial program 7.6%
Simplified13.1%
Taylor expanded in z around inf 96.1%
+-commutative96.1%
*-commutative96.1%
Simplified96.1%
if -7.2e22 < z < 5.8e14Initial program 99.7%
Taylor expanded in z around 0 96.2%
*-commutative96.2%
Simplified96.2%
Taylor expanded in z around 0 96.8%
Taylor expanded in z around 0 96.8%
*-commutative96.8%
Simplified96.8%
if 5.8e14 < z Initial program 17.0%
Taylor expanded in z around -inf 94.6%
+-commutative94.6%
mul-1-neg94.6%
unsub-neg94.6%
*-commutative94.6%
distribute-rgt-out--94.6%
metadata-eval94.6%
Simplified94.6%
Final simplification96.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -3.2e+15)
(+ x (* y 3.13060547623))
(if (<= z 5.8e+14)
(+
x
(/
(* y b)
(+
0.607771387771
(* z (+ 11.9400905721 (* z (+ 31.4690115749 (* z 15.234687407))))))))
(+ x (- (* y 3.13060547623) (/ (* y 36.52704169880642) z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.2e+15) {
tmp = x + (y * 3.13060547623);
} else if (z <= 5.8e+14) {
tmp = x + ((y * b) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * 15.234687407)))))));
} else {
tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-3.2d+15)) then
tmp = x + (y * 3.13060547623d0)
else if (z <= 5.8d+14) then
tmp = x + ((y * b) / (0.607771387771d0 + (z * (11.9400905721d0 + (z * (31.4690115749d0 + (z * 15.234687407d0)))))))
else
tmp = x + ((y * 3.13060547623d0) - ((y * 36.52704169880642d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.2e+15) {
tmp = x + (y * 3.13060547623);
} else if (z <= 5.8e+14) {
tmp = x + ((y * b) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * 15.234687407)))))));
} else {
tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -3.2e+15: tmp = x + (y * 3.13060547623) elif z <= 5.8e+14: tmp = x + ((y * b) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * 15.234687407))))))) else: tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.2e+15) tmp = Float64(x + Float64(y * 3.13060547623)); elseif (z <= 5.8e+14) tmp = Float64(x + Float64(Float64(y * b) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * 15.234687407)))))))); else tmp = Float64(x + Float64(Float64(y * 3.13060547623) - Float64(Float64(y * 36.52704169880642) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -3.2e+15) tmp = x + (y * 3.13060547623); elseif (z <= 5.8e+14) tmp = x + ((y * b) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * 15.234687407))))))); else tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.2e+15], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e+14], N[(x + N[(N[(y * b), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * 3.13060547623), $MachinePrecision] - N[(N[(y * 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+15}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{+14}:\\
\;\;\;\;x + \frac{y \cdot b}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot 15.234687407\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot 3.13060547623 - \frac{y \cdot 36.52704169880642}{z}\right)\\
\end{array}
\end{array}
if z < -3.2e15Initial program 7.6%
Simplified13.1%
Taylor expanded in z around inf 96.1%
+-commutative96.1%
*-commutative96.1%
Simplified96.1%
if -3.2e15 < z < 5.8e14Initial program 99.7%
Taylor expanded in z around 0 80.1%
*-commutative80.1%
Simplified80.1%
Taylor expanded in z around 0 80.2%
*-commutative80.2%
Simplified80.2%
if 5.8e14 < z Initial program 17.0%
Taylor expanded in z around -inf 94.6%
+-commutative94.6%
mul-1-neg94.6%
unsub-neg94.6%
*-commutative94.6%
distribute-rgt-out--94.6%
metadata-eval94.6%
Simplified94.6%
Final simplification87.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -3.2e+15)
(+ x (* y 3.13060547623))
(if (<= z 5.8e+14)
(+ x (/ (* y b) (+ 0.607771387771 (* z 11.9400905721))))
(+ x (- (* y 3.13060547623) (/ (* y 36.52704169880642) z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.2e+15) {
tmp = x + (y * 3.13060547623);
} else if (z <= 5.8e+14) {
tmp = x + ((y * b) / (0.607771387771 + (z * 11.9400905721)));
} else {
tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-3.2d+15)) then
tmp = x + (y * 3.13060547623d0)
else if (z <= 5.8d+14) then
tmp = x + ((y * b) / (0.607771387771d0 + (z * 11.9400905721d0)))
else
tmp = x + ((y * 3.13060547623d0) - ((y * 36.52704169880642d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.2e+15) {
tmp = x + (y * 3.13060547623);
} else if (z <= 5.8e+14) {
tmp = x + ((y * b) / (0.607771387771 + (z * 11.9400905721)));
} else {
tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -3.2e+15: tmp = x + (y * 3.13060547623) elif z <= 5.8e+14: tmp = x + ((y * b) / (0.607771387771 + (z * 11.9400905721))) else: tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.2e+15) tmp = Float64(x + Float64(y * 3.13060547623)); elseif (z <= 5.8e+14) tmp = Float64(x + Float64(Float64(y * b) / Float64(0.607771387771 + Float64(z * 11.9400905721)))); else tmp = Float64(x + Float64(Float64(y * 3.13060547623) - Float64(Float64(y * 36.52704169880642) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -3.2e+15) tmp = x + (y * 3.13060547623); elseif (z <= 5.8e+14) tmp = x + ((y * b) / (0.607771387771 + (z * 11.9400905721))); else tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.2e+15], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e+14], N[(x + N[(N[(y * b), $MachinePrecision] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * 3.13060547623), $MachinePrecision] - N[(N[(y * 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+15}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{+14}:\\
\;\;\;\;x + \frac{y \cdot b}{0.607771387771 + z \cdot 11.9400905721}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot 3.13060547623 - \frac{y \cdot 36.52704169880642}{z}\right)\\
\end{array}
\end{array}
if z < -3.2e15Initial program 7.6%
Simplified13.1%
Taylor expanded in z around inf 96.1%
+-commutative96.1%
*-commutative96.1%
Simplified96.1%
if -3.2e15 < z < 5.8e14Initial program 99.7%
Taylor expanded in z around 0 80.1%
*-commutative80.1%
Simplified80.1%
Taylor expanded in z around 0 80.2%
*-commutative96.2%
Simplified80.2%
if 5.8e14 < z Initial program 17.0%
Taylor expanded in z around -inf 94.6%
+-commutative94.6%
mul-1-neg94.6%
unsub-neg94.6%
*-commutative94.6%
distribute-rgt-out--94.6%
metadata-eval94.6%
Simplified94.6%
Final simplification87.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -6e-10)
(+ x (* y 3.13060547623))
(if (<= z 5.8e+14)
(+ x (* (* y b) 1.6453555072203998))
(+ x (- (* y 3.13060547623) (/ (* y 36.52704169880642) z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -6e-10) {
tmp = x + (y * 3.13060547623);
} else if (z <= 5.8e+14) {
tmp = x + ((y * b) * 1.6453555072203998);
} else {
tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-6d-10)) then
tmp = x + (y * 3.13060547623d0)
else if (z <= 5.8d+14) then
tmp = x + ((y * b) * 1.6453555072203998d0)
else
tmp = x + ((y * 3.13060547623d0) - ((y * 36.52704169880642d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -6e-10) {
tmp = x + (y * 3.13060547623);
} else if (z <= 5.8e+14) {
tmp = x + ((y * b) * 1.6453555072203998);
} else {
tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -6e-10: tmp = x + (y * 3.13060547623) elif z <= 5.8e+14: tmp = x + ((y * b) * 1.6453555072203998) else: tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -6e-10) tmp = Float64(x + Float64(y * 3.13060547623)); elseif (z <= 5.8e+14) tmp = Float64(x + Float64(Float64(y * b) * 1.6453555072203998)); else tmp = Float64(x + Float64(Float64(y * 3.13060547623) - Float64(Float64(y * 36.52704169880642) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -6e-10) tmp = x + (y * 3.13060547623); elseif (z <= 5.8e+14) tmp = x + ((y * b) * 1.6453555072203998); else tmp = x + ((y * 3.13060547623) - ((y * 36.52704169880642) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -6e-10], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e+14], N[(x + N[(N[(y * b), $MachinePrecision] * 1.6453555072203998), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * 3.13060547623), $MachinePrecision] - N[(N[(y * 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{-10}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{+14}:\\
\;\;\;\;x + \left(y \cdot b\right) \cdot 1.6453555072203998\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot 3.13060547623 - \frac{y \cdot 36.52704169880642}{z}\right)\\
\end{array}
\end{array}
if z < -6e-10Initial program 11.5%
Simplified16.7%
Taylor expanded in z around inf 92.2%
+-commutative92.2%
*-commutative92.2%
Simplified92.2%
if -6e-10 < z < 5.8e14Initial program 99.7%
Simplified99.6%
Taylor expanded in z around 0 80.9%
+-commutative80.9%
*-commutative80.9%
Simplified80.9%
if 5.8e14 < z Initial program 17.0%
Taylor expanded in z around -inf 94.6%
+-commutative94.6%
mul-1-neg94.6%
unsub-neg94.6%
*-commutative94.6%
distribute-rgt-out--94.6%
metadata-eval94.6%
Simplified94.6%
Final simplification86.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6e-10) (not (<= z 5.8e+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 <= -6e-10) || !(z <= 5.8e+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 <= (-6d-10)) .or. (.not. (z <= 5.8d+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 <= -6e-10) || !(z <= 5.8e+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 <= -6e-10) or not (z <= 5.8e+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 <= -6e-10) || !(z <= 5.8e+14)) tmp = Float64(x + Float64(y * 3.13060547623)); else tmp = Float64(x + Float64(Float64(y * b) * 1.6453555072203998)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6e-10) || ~((z <= 5.8e+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, -6e-10], N[Not[LessEqual[z, 5.8e+14]], $MachinePrecision]], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * b), $MachinePrecision] * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{-10} \lor \neg \left(z \leq 5.8 \cdot 10^{+14}\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot b\right) \cdot 1.6453555072203998\\
\end{array}
\end{array}
if z < -6e-10 or 5.8e14 < z Initial program 13.8%
Simplified16.9%
Taylor expanded in z around inf 93.2%
+-commutative93.2%
*-commutative93.2%
Simplified93.2%
if -6e-10 < z < 5.8e14Initial program 99.7%
Simplified99.6%
Taylor expanded in z around 0 80.9%
+-commutative80.9%
*-commutative80.9%
Simplified80.9%
Final simplification86.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6e-10) (not (<= z 5.8e+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 <= -6e-10) || !(z <= 5.8e+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 <= (-6d-10)) .or. (.not. (z <= 5.8d+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 <= -6e-10) || !(z <= 5.8e+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 <= -6e-10) or not (z <= 5.8e+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 <= -6e-10) || !(z <= 5.8e+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 <= -6e-10) || ~((z <= 5.8e+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, -6e-10], N[Not[LessEqual[z, 5.8e+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 -6 \cdot 10^{-10} \lor \neg \left(z \leq 5.8 \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 < -6e-10 or 5.8e14 < z Initial program 13.8%
Simplified16.9%
Taylor expanded in z around inf 93.2%
+-commutative93.2%
*-commutative93.2%
Simplified93.2%
if -6e-10 < z < 5.8e14Initial program 99.7%
Taylor expanded in z around 0 80.9%
associate-*r*80.9%
*-commutative80.9%
Simplified80.9%
Final simplification86.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6e-10) (not (<= z 5.8e+14))) (+ x (* y 3.13060547623)) (+ x (* b (* y 1.6453555072203998)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6e-10) || !(z <= 5.8e+14)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + (b * (y * 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-10)) .or. (.not. (z <= 5.8d+14))) then
tmp = x + (y * 3.13060547623d0)
else
tmp = x + (b * (y * 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-10) || !(z <= 5.8e+14)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + (b * (y * 1.6453555072203998));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6e-10) or not (z <= 5.8e+14): tmp = x + (y * 3.13060547623) else: tmp = x + (b * (y * 1.6453555072203998)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6e-10) || !(z <= 5.8e+14)) tmp = Float64(x + Float64(y * 3.13060547623)); else tmp = Float64(x + Float64(b * Float64(y * 1.6453555072203998))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6e-10) || ~((z <= 5.8e+14))) tmp = x + (y * 3.13060547623); else tmp = x + (b * (y * 1.6453555072203998)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6e-10], N[Not[LessEqual[z, 5.8e+14]], $MachinePrecision]], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], N[(x + N[(b * N[(y * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{-10} \lor \neg \left(z \leq 5.8 \cdot 10^{+14}\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x + b \cdot \left(y \cdot 1.6453555072203998\right)\\
\end{array}
\end{array}
if z < -6e-10 or 5.8e14 < z Initial program 13.8%
Simplified16.9%
Taylor expanded in z around inf 93.2%
+-commutative93.2%
*-commutative93.2%
Simplified93.2%
if -6e-10 < z < 5.8e14Initial program 99.7%
Taylor expanded in z around 0 81.9%
*-commutative81.9%
Simplified81.9%
Taylor expanded in z around 0 80.9%
*-commutative80.9%
associate-*l*80.9%
Simplified80.9%
Final simplification86.9%
(FPCore (x y z t a b) :precision binary64 (+ x (* y 3.13060547623)))
double code(double x, double y, double z, double t, double a, double b) {
return x + (y * 3.13060547623);
}
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 * 3.13060547623d0)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + (y * 3.13060547623);
}
def code(x, y, z, t, a, b): return x + (y * 3.13060547623)
function code(x, y, z, t, a, b) return Float64(x + Float64(y * 3.13060547623)) end
function tmp = code(x, y, z, t, a, b) tmp = x + (y * 3.13060547623); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot 3.13060547623
\end{array}
Initial program 57.8%
Simplified59.2%
Taylor expanded in z around inf 66.0%
+-commutative66.0%
*-commutative66.0%
Simplified66.0%
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 57.8%
Simplified59.2%
Taylor expanded in y around 0 48.4%
(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 2024099
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, D"
:precision binary64
:alt
(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))))