
(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 17 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 -4.6e+24) (not (<= z 1.55e+35)))
(fma
(+
(+
(+ (/ 457.9610022158428 (pow z 2.0)) (/ t (pow z 2.0)))
(/ (+ a (+ -5864.8025282699045 (* t -15.234687407))) (pow z 3.0)))
(+ 3.13060547623 (/ -36.52704169880642 z)))
y
x)
(+
x
(*
(/
y
(fma
z
(fma z (fma z (+ z 15.234687407) 31.4690115749) 11.9400905721)
0.607771387771))
(fma z (fma z (fma z (fma z 3.13060547623 11.1667541262) t) a) b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.6e+24) || !(z <= 1.55e+35)) {
tmp = fma(((((457.9610022158428 / pow(z, 2.0)) + (t / pow(z, 2.0))) + ((a + (-5864.8025282699045 + (t * -15.234687407))) / pow(z, 3.0))) + (3.13060547623 + (-36.52704169880642 / z))), y, x);
} else {
tmp = x + ((y / fma(z, fma(z, fma(z, (z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)) * fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.6e+24) || !(z <= 1.55e+35)) tmp = fma(Float64(Float64(Float64(Float64(457.9610022158428 / (z ^ 2.0)) + Float64(t / (z ^ 2.0))) + Float64(Float64(a + Float64(-5864.8025282699045 + Float64(t * -15.234687407))) / (z ^ 3.0))) + Float64(3.13060547623 + Float64(-36.52704169880642 / z))), y, x); else tmp = Float64(x + Float64(Float64(y / fma(z, fma(z, fma(z, Float64(z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)) * fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.6e+24], N[Not[LessEqual[z, 1.55e+35]], $MachinePrecision]], N[(N[(N[(N[(N[(457.9610022158428 / N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision] + N[(t / N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a + N[(-5864.8025282699045 + N[(t * -15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[z, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.13060547623 + N[(-36.52704169880642 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision], N[(x + N[(N[(y / N[(z * N[(z * N[(z * N[(z + 15.234687407), $MachinePrecision] + 31.4690115749), $MachinePrecision] + 11.9400905721), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision] * N[(z * N[(z * N[(z * N[(z * 3.13060547623 + 11.1667541262), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{+24} \lor \neg \left(z \leq 1.55 \cdot 10^{+35}\right):\\
\;\;\;\;\mathsf{fma}\left(\left(\left(\frac{457.9610022158428}{{z}^{2}} + \frac{t}{{z}^{2}}\right) + \frac{a + \left(-5864.8025282699045 + t \cdot -15.234687407\right)}{{z}^{3}}\right) + \left(3.13060547623 + \frac{-36.52704169880642}{z}\right), y, x\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)} \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right), t\right), a\right), b\right)\\
\end{array}
\end{array}
if z < -4.5999999999999998e24 or 1.54999999999999993e35 < z Initial program 7.9%
Simplified14.5%
Taylor expanded in z around -inf 99.2%
Simplified99.2%
if -4.5999999999999998e24 < z < 1.54999999999999993e35Initial program 99.0%
Simplified99.7%
Final simplification99.5%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -2.25e+28) (not (<= z 6.2e+37)))
(fma
(+
(+
(+ (/ 457.9610022158428 (pow z 2.0)) (/ t (pow z 2.0)))
(/ (+ a (+ -5864.8025282699045 (* t -15.234687407))) (pow z 3.0)))
(+ 3.13060547623 (/ -36.52704169880642 z)))
y
x)
(+
x
(/
-1.0
(/
(/
(-
-0.607771387771
(* z (fma z (fma z (+ z 15.234687407) 31.4690115749) 11.9400905721)))
(fma z (fma z (fma z (fma z 3.13060547623 11.1667541262) t) a) b))
y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.25e+28) || !(z <= 6.2e+37)) {
tmp = fma(((((457.9610022158428 / pow(z, 2.0)) + (t / pow(z, 2.0))) + ((a + (-5864.8025282699045 + (t * -15.234687407))) / pow(z, 3.0))) + (3.13060547623 + (-36.52704169880642 / z))), y, x);
} else {
tmp = x + (-1.0 / (((-0.607771387771 - (z * fma(z, fma(z, (z + 15.234687407), 31.4690115749), 11.9400905721))) / fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b)) / y));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.25e+28) || !(z <= 6.2e+37)) tmp = fma(Float64(Float64(Float64(Float64(457.9610022158428 / (z ^ 2.0)) + Float64(t / (z ^ 2.0))) + Float64(Float64(a + Float64(-5864.8025282699045 + Float64(t * -15.234687407))) / (z ^ 3.0))) + Float64(3.13060547623 + Float64(-36.52704169880642 / z))), y, x); else tmp = Float64(x + Float64(-1.0 / Float64(Float64(Float64(-0.607771387771 - Float64(z * fma(z, fma(z, Float64(z + 15.234687407), 31.4690115749), 11.9400905721))) / fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b)) / y))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.25e+28], N[Not[LessEqual[z, 6.2e+37]], $MachinePrecision]], N[(N[(N[(N[(N[(457.9610022158428 / N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision] + N[(t / N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a + N[(-5864.8025282699045 + N[(t * -15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[z, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.13060547623 + N[(-36.52704169880642 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision], N[(x + N[(-1.0 / N[(N[(N[(-0.607771387771 - N[(z * N[(z * N[(z * N[(z + 15.234687407), $MachinePrecision] + 31.4690115749), $MachinePrecision] + 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * N[(z * N[(z * N[(z * 3.13060547623 + 11.1667541262), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.25 \cdot 10^{+28} \lor \neg \left(z \leq 6.2 \cdot 10^{+37}\right):\\
\;\;\;\;\mathsf{fma}\left(\left(\left(\frac{457.9610022158428}{{z}^{2}} + \frac{t}{{z}^{2}}\right) + \frac{a + \left(-5864.8025282699045 + t \cdot -15.234687407\right)}{{z}^{3}}\right) + \left(3.13060547623 + \frac{-36.52704169880642}{z}\right), y, x\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-1}{\frac{\frac{-0.607771387771 - z \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right)}{\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)}}{y}}\\
\end{array}
\end{array}
if z < -2.24999999999999985e28 or 6.2000000000000004e37 < z Initial program 7.1%
Simplified13.8%
Taylor expanded in z around -inf 99.2%
Simplified99.2%
if -2.24999999999999985e28 < z < 6.2000000000000004e37Initial program 99.0%
Simplified99.7%
Applied egg-rr99.0%
Simplified99.7%
Final simplification99.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+
0.607771387771
(*
z
(+
11.9400905721
(* z (+ 31.4690115749 (* z (+ z 15.234687407)))))))))
(if (or (<= z -4100000000000.0) (not (<= z 5e+34)))
(fma
(+
(+
(+ (/ 457.9610022158428 (pow z 2.0)) (/ t (pow z 2.0)))
(/ (+ a (+ -5864.8025282699045 (* t -15.234687407))) (pow z 3.0)))
(+ 3.13060547623 (/ -36.52704169880642 z)))
y
x)
(fma
(+
(/ b t_1)
(+
(/ (* z a) t_1)
(/
(* (pow z 2.0) (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))
t_1)))
y
x))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))));
double tmp;
if ((z <= -4100000000000.0) || !(z <= 5e+34)) {
tmp = fma(((((457.9610022158428 / pow(z, 2.0)) + (t / pow(z, 2.0))) + ((a + (-5864.8025282699045 + (t * -15.234687407))) / pow(z, 3.0))) + (3.13060547623 + (-36.52704169880642 / z))), y, x);
} else {
tmp = fma(((b / t_1) + (((z * a) / t_1) + ((pow(z, 2.0) * (t + (z * (11.1667541262 + (z * 3.13060547623))))) / t_1))), y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407))))))) tmp = 0.0 if ((z <= -4100000000000.0) || !(z <= 5e+34)) tmp = fma(Float64(Float64(Float64(Float64(457.9610022158428 / (z ^ 2.0)) + Float64(t / (z ^ 2.0))) + Float64(Float64(a + Float64(-5864.8025282699045 + Float64(t * -15.234687407))) / (z ^ 3.0))) + Float64(3.13060547623 + Float64(-36.52704169880642 / z))), y, x); else tmp = fma(Float64(Float64(b / t_1) + Float64(Float64(Float64(z * a) / t_1) + Float64(Float64((z ^ 2.0) * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623))))) / t_1))), y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -4100000000000.0], N[Not[LessEqual[z, 5e+34]], $MachinePrecision]], N[(N[(N[(N[(N[(457.9610022158428 / N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision] + N[(t / N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a + N[(-5864.8025282699045 + N[(t * -15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[z, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.13060547623 + N[(-36.52704169880642 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision], N[(N[(N[(b / t$95$1), $MachinePrecision] + N[(N[(N[(z * a), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(N[(N[Power[z, 2.0], $MachinePrecision] * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)\\
\mathbf{if}\;z \leq -4100000000000 \lor \neg \left(z \leq 5 \cdot 10^{+34}\right):\\
\;\;\;\;\mathsf{fma}\left(\left(\left(\frac{457.9610022158428}{{z}^{2}} + \frac{t}{{z}^{2}}\right) + \frac{a + \left(-5864.8025282699045 + t \cdot -15.234687407\right)}{{z}^{3}}\right) + \left(3.13060547623 + \frac{-36.52704169880642}{z}\right), y, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{b}{t_1} + \left(\frac{z \cdot a}{t_1} + \frac{{z}^{2} \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)}{t_1}\right), y, x\right)\\
\end{array}
\end{array}
if z < -4.1e12 or 4.9999999999999998e34 < z Initial program 9.3%
Simplified15.8%
Taylor expanded in z around -inf 99.2%
Simplified99.2%
if -4.1e12 < z < 4.9999999999999998e34Initial program 99.0%
Simplified99.6%
Taylor expanded in a around 0 99.7%
Final simplification99.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))
(t_2
(+
0.607771387771
(*
z
(+
11.9400905721
(* z (+ 31.4690115749 (* z (+ z 15.234687407)))))))))
(if (<= (/ (* y (+ b (* z (+ a (* z t_1))))) t_2) INFINITY)
(fma (+ (/ b t_2) (+ (/ (* z a) t_2) (/ (* (pow z 2.0) t_1) t_2))) y x)
(fma
(+
(+ 3.13060547623 (/ (+ 457.9610022158428 t) (pow z 2.0)))
(* 36.52704169880642 (/ -1.0 z)))
y
x))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t + (z * (11.1667541262 + (z * 3.13060547623)));
double t_2 = 0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))));
double tmp;
if (((y * (b + (z * (a + (z * t_1))))) / t_2) <= ((double) INFINITY)) {
tmp = fma(((b / t_2) + (((z * a) / t_2) + ((pow(z, 2.0) * t_1) / t_2))), y, x);
} else {
tmp = fma(((3.13060547623 + ((457.9610022158428 + t) / pow(z, 2.0))) + (36.52704169880642 * (-1.0 / z))), y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623)))) t_2 = Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407))))))) tmp = 0.0 if (Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * t_1))))) / t_2) <= Inf) tmp = fma(Float64(Float64(b / t_2) + Float64(Float64(Float64(z * a) / t_2) + Float64(Float64((z ^ 2.0) * t_1) / t_2))), y, x); else tmp = fma(Float64(Float64(3.13060547623 + Float64(Float64(457.9610022158428 + t) / (z ^ 2.0))) + Float64(36.52704169880642 * Float64(-1.0 / z))), y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(y * N[(b + N[(z * N[(a + N[(z * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], Infinity], N[(N[(N[(b / t$95$2), $MachinePrecision] + N[(N[(N[(z * a), $MachinePrecision] / t$95$2), $MachinePrecision] + N[(N[(N[Power[z, 2.0], $MachinePrecision] * t$95$1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision], N[(N[(N[(3.13060547623 + N[(N[(457.9610022158428 + t), $MachinePrecision] / N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(36.52704169880642 * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\\
t_2 := 0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)\\
\mathbf{if}\;\frac{y \cdot \left(b + z \cdot \left(a + z \cdot t_1\right)\right)}{t_2} \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(\frac{b}{t_2} + \left(\frac{z \cdot a}{t_2} + \frac{{z}^{2} \cdot t_1}{t_2}\right), y, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(3.13060547623 + \frac{457.9610022158428 + t}{{z}^{2}}\right) + 36.52704169880642 \cdot \frac{-1}{z}, y, x\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.0%
Simplified96.0%
Taylor expanded in a around 0 95.9%
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%
Simplified0.0%
Taylor expanded in b around 0 0.0%
Taylor expanded in z around -inf 100.0%
Final simplification97.5%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -2.9e+28) (not (<= z 6.5e+35)))
(fma
(+
(+ 3.13060547623 (/ (+ 457.9610022158428 t) (pow z 2.0)))
(* 36.52704169880642 (/ -1.0 z)))
y
x)
(+
x
(/
(*
y
(+
b
(*
z
(+ a (* z (+ t (+ (* z (* z 3.13060547623)) (* z 11.1667541262))))))))
(+
0.607771387771
(*
z
(+ 11.9400905721 (* z (+ 31.4690115749 (* z (+ z 15.234687407)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.9e+28) || !(z <= 6.5e+35)) {
tmp = fma(((3.13060547623 + ((457.9610022158428 + t) / pow(z, 2.0))) + (36.52704169880642 * (-1.0 / z))), y, x);
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + ((z * (z * 3.13060547623)) + (z * 11.1667541262)))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.9e+28) || !(z <= 6.5e+35)) tmp = fma(Float64(Float64(3.13060547623 + Float64(Float64(457.9610022158428 + t) / (z ^ 2.0))) + Float64(36.52704169880642 * Float64(-1.0 / z))), y, x); else tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(Float64(z * Float64(z * 3.13060547623)) + Float64(z * 11.1667541262)))))))) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407))))))))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.9e+28], N[Not[LessEqual[z, 6.5e+35]], $MachinePrecision]], N[(N[(N[(3.13060547623 + N[(N[(457.9610022158428 + t), $MachinePrecision] / N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(36.52704169880642 * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * N[(t + N[(N[(z * N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision] + N[(z * 11.1667541262), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+28} \lor \neg \left(z \leq 6.5 \cdot 10^{+35}\right):\\
\;\;\;\;\mathsf{fma}\left(\left(3.13060547623 + \frac{457.9610022158428 + t}{{z}^{2}}\right) + 36.52704169880642 \cdot \frac{-1}{z}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + \left(z \cdot \left(z \cdot 3.13060547623\right) + z \cdot 11.1667541262\right)\right)\right)\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\\
\end{array}
\end{array}
if z < -2.9000000000000001e28 or 6.5000000000000003e35 < z Initial program 7.1%
Simplified13.8%
Taylor expanded in b around 0 13.1%
Taylor expanded in z around -inf 96.4%
if -2.9000000000000001e28 < z < 6.5000000000000003e35Initial program 99.0%
*-commutative93.5%
distribute-lft-in93.5%
Applied egg-rr99.0%
Final simplification97.7%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -4.5e+30) (not (<= z 6.1e+59)))
(+ x (* 3.13060547623 y))
(+
x
(/
(*
y
(+
b
(*
z
(+ a (* z (+ t (+ (* z (* z 3.13060547623)) (* z 11.1667541262))))))))
(+
0.607771387771
(*
z
(+ 11.9400905721 (* z (+ 31.4690115749 (* z (+ z 15.234687407)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.5e+30) || !(z <= 6.1e+59)) {
tmp = x + (3.13060547623 * y);
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + ((z * (z * 3.13060547623)) + (z * 11.1667541262)))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-4.5d+30)) .or. (.not. (z <= 6.1d+59))) then
tmp = x + (3.13060547623d0 * y)
else
tmp = x + ((y * (b + (z * (a + (z * (t + ((z * (z * 3.13060547623d0)) + (z * 11.1667541262d0)))))))) / (0.607771387771d0 + (z * (11.9400905721d0 + (z * (31.4690115749d0 + (z * (z + 15.234687407d0))))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.5e+30) || !(z <= 6.1e+59)) {
tmp = x + (3.13060547623 * y);
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + ((z * (z * 3.13060547623)) + (z * 11.1667541262)))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4.5e+30) or not (z <= 6.1e+59): tmp = x + (3.13060547623 * y) else: tmp = x + ((y * (b + (z * (a + (z * (t + ((z * (z * 3.13060547623)) + (z * 11.1667541262)))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.5e+30) || !(z <= 6.1e+59)) tmp = Float64(x + Float64(3.13060547623 * y)); else tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(Float64(z * Float64(z * 3.13060547623)) + Float64(z * 11.1667541262)))))))) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407))))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -4.5e+30) || ~((z <= 6.1e+59))) tmp = x + (3.13060547623 * y); else tmp = x + ((y * (b + (z * (a + (z * (t + ((z * (z * 3.13060547623)) + (z * 11.1667541262)))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.5e+30], N[Not[LessEqual[z, 6.1e+59]], $MachinePrecision]], N[(x + N[(3.13060547623 * y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * N[(t + N[(N[(z * N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision] + N[(z * 11.1667541262), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+30} \lor \neg \left(z \leq 6.1 \cdot 10^{+59}\right):\\
\;\;\;\;x + 3.13060547623 \cdot y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + \left(z \cdot \left(z \cdot 3.13060547623\right) + z \cdot 11.1667541262\right)\right)\right)\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\\
\end{array}
\end{array}
if z < -4.49999999999999995e30 or 6.09999999999999973e59 < z Initial program 3.1%
Simplified7.1%
Taylor expanded in z around inf 93.9%
*-commutative93.9%
Simplified93.9%
if -4.49999999999999995e30 < z < 6.09999999999999973e59Initial program 95.8%
*-commutative88.5%
distribute-lft-in88.5%
Applied egg-rr95.8%
Final simplification94.9%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -1.3e+30) (not (<= z 2.9e+60)))
(+ x (* 3.13060547623 y))
(+
x
(/
(*
y
(+
b
(* z (+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))))))
(+
0.607771387771
(*
z
(+ 11.9400905721 (* z (+ 31.4690115749 (* z (+ z 15.234687407)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.3e+30) || !(z <= 2.9e+60)) {
tmp = x + (3.13060547623 * y);
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.3d+30)) .or. (.not. (z <= 2.9d+60))) then
tmp = x + (3.13060547623d0 * y)
else
tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262d0 + (z * 3.13060547623d0))))))))) / (0.607771387771d0 + (z * (11.9400905721d0 + (z * (31.4690115749d0 + (z * (z + 15.234687407d0))))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.3e+30) || !(z <= 2.9e+60)) {
tmp = x + (3.13060547623 * y);
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.3e+30) or not (z <= 2.9e+60): tmp = x + (3.13060547623 * y) else: tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.3e+30) || !(z <= 2.9e+60)) tmp = Float64(x + Float64(3.13060547623 * y)); else tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623))))))))) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407))))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.3e+30) || ~((z <= 2.9e+60))) tmp = x + (3.13060547623 * y); else tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.3e+30], N[Not[LessEqual[z, 2.9e+60]], $MachinePrecision]], N[(x + N[(3.13060547623 * y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+30} \lor \neg \left(z \leq 2.9 \cdot 10^{+60}\right):\\
\;\;\;\;x + 3.13060547623 \cdot y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\\
\end{array}
\end{array}
if z < -1.29999999999999994e30 or 2.9e60 < z Initial program 3.1%
Simplified7.1%
Taylor expanded in z around inf 93.9%
*-commutative93.9%
Simplified93.9%
if -1.29999999999999994e30 < z < 2.9e60Initial program 95.8%
Final simplification94.9%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -6.2e+27) (not (<= z 6.5e+34)))
(+ x (* 3.13060547623 y))
(+
x
(/
(* y (+ b (* z (+ a (* z (+ t (* z 11.1667541262)))))))
(+
0.607771387771
(*
z
(+ 11.9400905721 (* z (+ 31.4690115749 (* z (+ z 15.234687407)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.2e+27) || !(z <= 6.5e+34)) {
tmp = x + (3.13060547623 * y);
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-6.2d+27)) .or. (.not. (z <= 6.5d+34))) then
tmp = x + (3.13060547623d0 * y)
else
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262d0))))))) / (0.607771387771d0 + (z * (11.9400905721d0 + (z * (31.4690115749d0 + (z * (z + 15.234687407d0))))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.2e+27) || !(z <= 6.5e+34)) {
tmp = x + (3.13060547623 * y);
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6.2e+27) or not (z <= 6.5e+34): tmp = x + (3.13060547623 * y) else: tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6.2e+27) || !(z <= 6.5e+34)) tmp = Float64(x + Float64(3.13060547623 * y)); else tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * 11.1667541262))))))) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407))))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6.2e+27) || ~((z <= 6.5e+34))) tmp = x + (3.13060547623 * y); else tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6.2e+27], N[Not[LessEqual[z, 6.5e+34]], $MachinePrecision]], N[(x + N[(3.13060547623 * y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * N[(t + N[(z * 11.1667541262), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+27} \lor \neg \left(z \leq 6.5 \cdot 10^{+34}\right):\\
\;\;\;\;x + 3.13060547623 \cdot y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot 11.1667541262\right)\right)\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\\
\end{array}
\end{array}
if z < -6.19999999999999992e27 or 6.50000000000000017e34 < z Initial program 7.9%
Simplified14.4%
Taylor expanded in z around inf 90.7%
*-commutative90.7%
Simplified90.7%
if -6.19999999999999992e27 < z < 6.50000000000000017e34Initial program 99.0%
Taylor expanded in z around 0 97.4%
*-commutative94.1%
Simplified97.4%
Final simplification94.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -13.0)
(+ x (- (* 3.13060547623 y) (/ (* y 36.52704169880642) z)))
(if (<= z 1.85e+34)
(+
x
(/
(*
y
(+
b
(*
z
(+
a
(* z (+ t (+ (* z (* z 3.13060547623)) (* z 11.1667541262))))))))
(+ 0.607771387771 (* z 11.9400905721))))
(+ x (* 3.13060547623 y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -13.0) {
tmp = x + ((3.13060547623 * y) - ((y * 36.52704169880642) / z));
} else if (z <= 1.85e+34) {
tmp = x + ((y * (b + (z * (a + (z * (t + ((z * (z * 3.13060547623)) + (z * 11.1667541262)))))))) / (0.607771387771 + (z * 11.9400905721)));
} else {
tmp = x + (3.13060547623 * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-13.0d0)) then
tmp = x + ((3.13060547623d0 * y) - ((y * 36.52704169880642d0) / z))
else if (z <= 1.85d+34) then
tmp = x + ((y * (b + (z * (a + (z * (t + ((z * (z * 3.13060547623d0)) + (z * 11.1667541262d0)))))))) / (0.607771387771d0 + (z * 11.9400905721d0)))
else
tmp = x + (3.13060547623d0 * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -13.0) {
tmp = x + ((3.13060547623 * y) - ((y * 36.52704169880642) / z));
} else if (z <= 1.85e+34) {
tmp = x + ((y * (b + (z * (a + (z * (t + ((z * (z * 3.13060547623)) + (z * 11.1667541262)))))))) / (0.607771387771 + (z * 11.9400905721)));
} else {
tmp = x + (3.13060547623 * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -13.0: tmp = x + ((3.13060547623 * y) - ((y * 36.52704169880642) / z)) elif z <= 1.85e+34: tmp = x + ((y * (b + (z * (a + (z * (t + ((z * (z * 3.13060547623)) + (z * 11.1667541262)))))))) / (0.607771387771 + (z * 11.9400905721))) else: tmp = x + (3.13060547623 * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -13.0) tmp = Float64(x + Float64(Float64(3.13060547623 * y) - Float64(Float64(y * 36.52704169880642) / z))); elseif (z <= 1.85e+34) tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(Float64(z * Float64(z * 3.13060547623)) + Float64(z * 11.1667541262)))))))) / Float64(0.607771387771 + Float64(z * 11.9400905721)))); else tmp = Float64(x + Float64(3.13060547623 * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -13.0) tmp = x + ((3.13060547623 * y) - ((y * 36.52704169880642) / z)); elseif (z <= 1.85e+34) tmp = x + ((y * (b + (z * (a + (z * (t + ((z * (z * 3.13060547623)) + (z * 11.1667541262)))))))) / (0.607771387771 + (z * 11.9400905721))); else tmp = x + (3.13060547623 * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -13.0], N[(x + N[(N[(3.13060547623 * y), $MachinePrecision] - N[(N[(y * 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.85e+34], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * N[(t + N[(N[(z * N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision] + N[(z * 11.1667541262), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(3.13060547623 * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -13:\\
\;\;\;\;x + \left(3.13060547623 \cdot y - \frac{y \cdot 36.52704169880642}{z}\right)\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{+34}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + \left(z \cdot \left(z \cdot 3.13060547623\right) + z \cdot 11.1667541262\right)\right)\right)\right)}{0.607771387771 + z \cdot 11.9400905721}\\
\mathbf{else}:\\
\;\;\;\;x + 3.13060547623 \cdot y\\
\end{array}
\end{array}
if z < -13Initial program 13.1%
Simplified20.2%
Taylor expanded in z around -inf 86.4%
+-commutative86.4%
mul-1-neg86.4%
unsub-neg86.4%
*-commutative86.4%
distribute-rgt-out--86.4%
metadata-eval86.4%
Simplified86.4%
if -13 < z < 1.85000000000000004e34Initial program 99.0%
Taylor expanded in z around 0 96.4%
*-commutative96.4%
Simplified96.4%
*-commutative96.4%
distribute-lft-in96.4%
Applied egg-rr96.4%
if 1.85000000000000004e34 < z Initial program 8.3%
Simplified13.8%
Taylor expanded in z around inf 91.9%
*-commutative91.9%
Simplified91.9%
Final simplification92.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -13.0)
(+ x (- (* 3.13060547623 y) (/ (* y 36.52704169880642) z)))
(if (<= z 8.2e+33)
(+
x
(/
(*
y
(+
b
(* z (+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))))))
(+ 0.607771387771 (* z 11.9400905721))))
(+ x (* 3.13060547623 y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -13.0) {
tmp = x + ((3.13060547623 * y) - ((y * 36.52704169880642) / z));
} else if (z <= 8.2e+33) {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * 11.9400905721)));
} else {
tmp = x + (3.13060547623 * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-13.0d0)) then
tmp = x + ((3.13060547623d0 * y) - ((y * 36.52704169880642d0) / z))
else if (z <= 8.2d+33) then
tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262d0 + (z * 3.13060547623d0))))))))) / (0.607771387771d0 + (z * 11.9400905721d0)))
else
tmp = x + (3.13060547623d0 * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -13.0) {
tmp = x + ((3.13060547623 * y) - ((y * 36.52704169880642) / z));
} else if (z <= 8.2e+33) {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * 11.9400905721)));
} else {
tmp = x + (3.13060547623 * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -13.0: tmp = x + ((3.13060547623 * y) - ((y * 36.52704169880642) / z)) elif z <= 8.2e+33: tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * 11.9400905721))) else: tmp = x + (3.13060547623 * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -13.0) tmp = Float64(x + Float64(Float64(3.13060547623 * y) - Float64(Float64(y * 36.52704169880642) / z))); elseif (z <= 8.2e+33) tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623))))))))) / Float64(0.607771387771 + Float64(z * 11.9400905721)))); else tmp = Float64(x + Float64(3.13060547623 * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -13.0) tmp = x + ((3.13060547623 * y) - ((y * 36.52704169880642) / z)); elseif (z <= 8.2e+33) tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * 11.9400905721))); else tmp = x + (3.13060547623 * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -13.0], N[(x + N[(N[(3.13060547623 * y), $MachinePrecision] - N[(N[(y * 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e+33], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(3.13060547623 * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -13:\\
\;\;\;\;x + \left(3.13060547623 \cdot y - \frac{y \cdot 36.52704169880642}{z}\right)\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{+33}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{0.607771387771 + z \cdot 11.9400905721}\\
\mathbf{else}:\\
\;\;\;\;x + 3.13060547623 \cdot y\\
\end{array}
\end{array}
if z < -13Initial program 13.1%
Simplified20.2%
Taylor expanded in z around -inf 86.4%
+-commutative86.4%
mul-1-neg86.4%
unsub-neg86.4%
*-commutative86.4%
distribute-rgt-out--86.4%
metadata-eval86.4%
Simplified86.4%
if -13 < z < 8.1999999999999999e33Initial program 99.0%
Taylor expanded in z around 0 96.4%
*-commutative96.4%
Simplified96.4%
if 8.1999999999999999e33 < z Initial program 8.3%
Simplified13.8%
Taylor expanded in z around inf 91.9%
*-commutative91.9%
Simplified91.9%
Final simplification92.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -13.0)
(+ x (- (* 3.13060547623 y) (/ (* y 36.52704169880642) z)))
(if (<= z 9.5e+33)
(+
x
(/
(* y (+ b (* z (+ a (* z (+ t (* z 11.1667541262)))))))
(+ 0.607771387771 (* z 11.9400905721))))
(+ x (* 3.13060547623 y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -13.0) {
tmp = x + ((3.13060547623 * y) - ((y * 36.52704169880642) / z));
} else if (z <= 9.5e+33) {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * 11.9400905721)));
} else {
tmp = x + (3.13060547623 * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-13.0d0)) then
tmp = x + ((3.13060547623d0 * y) - ((y * 36.52704169880642d0) / z))
else if (z <= 9.5d+33) then
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262d0))))))) / (0.607771387771d0 + (z * 11.9400905721d0)))
else
tmp = x + (3.13060547623d0 * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -13.0) {
tmp = x + ((3.13060547623 * y) - ((y * 36.52704169880642) / z));
} else if (z <= 9.5e+33) {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * 11.9400905721)));
} else {
tmp = x + (3.13060547623 * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -13.0: tmp = x + ((3.13060547623 * y) - ((y * 36.52704169880642) / z)) elif z <= 9.5e+33: tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * 11.9400905721))) else: tmp = x + (3.13060547623 * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -13.0) tmp = Float64(x + Float64(Float64(3.13060547623 * y) - Float64(Float64(y * 36.52704169880642) / z))); elseif (z <= 9.5e+33) tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * 11.1667541262))))))) / Float64(0.607771387771 + Float64(z * 11.9400905721)))); else tmp = Float64(x + Float64(3.13060547623 * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -13.0) tmp = x + ((3.13060547623 * y) - ((y * 36.52704169880642) / z)); elseif (z <= 9.5e+33) tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * 11.9400905721))); else tmp = x + (3.13060547623 * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -13.0], N[(x + N[(N[(3.13060547623 * y), $MachinePrecision] - N[(N[(y * 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e+33], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * N[(t + N[(z * 11.1667541262), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(3.13060547623 * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -13:\\
\;\;\;\;x + \left(3.13060547623 \cdot y - \frac{y \cdot 36.52704169880642}{z}\right)\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+33}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot 11.1667541262\right)\right)\right)}{0.607771387771 + z \cdot 11.9400905721}\\
\mathbf{else}:\\
\;\;\;\;x + 3.13060547623 \cdot y\\
\end{array}
\end{array}
if z < -13Initial program 13.1%
Simplified20.2%
Taylor expanded in z around -inf 86.4%
+-commutative86.4%
mul-1-neg86.4%
unsub-neg86.4%
*-commutative86.4%
distribute-rgt-out--86.4%
metadata-eval86.4%
Simplified86.4%
if -13 < z < 9.5000000000000003e33Initial program 99.0%
Taylor expanded in z around 0 96.4%
*-commutative96.4%
Simplified96.4%
Taylor expanded in z around 0 96.2%
*-commutative96.2%
Simplified96.2%
if 9.5000000000000003e33 < z Initial program 8.3%
Simplified13.8%
Taylor expanded in z around inf 91.9%
*-commutative91.9%
Simplified91.9%
Final simplification92.6%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -1.9e+19) (not (<= z 1.35e+34)))
(+ x (* 3.13060547623 y))
(+
x
(/
(* y b)
(+
0.607771387771
(*
z
(+ 11.9400905721 (* z (+ 31.4690115749 (* z (+ z 15.234687407)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.9e+19) || !(z <= 1.35e+34)) {
tmp = x + (3.13060547623 * y);
} else {
tmp = x + ((y * b) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.9d+19)) .or. (.not. (z <= 1.35d+34))) then
tmp = x + (3.13060547623d0 * y)
else
tmp = x + ((y * b) / (0.607771387771d0 + (z * (11.9400905721d0 + (z * (31.4690115749d0 + (z * (z + 15.234687407d0))))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.9e+19) || !(z <= 1.35e+34)) {
tmp = x + (3.13060547623 * y);
} else {
tmp = x + ((y * b) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.9e+19) or not (z <= 1.35e+34): tmp = x + (3.13060547623 * y) else: tmp = x + ((y * b) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.9e+19) || !(z <= 1.35e+34)) tmp = Float64(x + Float64(3.13060547623 * y)); else tmp = Float64(x + Float64(Float64(y * b) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407))))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.9e+19) || ~((z <= 1.35e+34))) tmp = x + (3.13060547623 * y); else tmp = x + ((y * b) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.9e+19], N[Not[LessEqual[z, 1.35e+34]], $MachinePrecision]], N[(x + N[(3.13060547623 * y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * b), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+19} \lor \neg \left(z \leq 1.35 \cdot 10^{+34}\right):\\
\;\;\;\;x + 3.13060547623 \cdot y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot b}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\\
\end{array}
\end{array}
if z < -1.9e19 or 1.35e34 < z Initial program 7.9%
Simplified14.4%
Taylor expanded in z around inf 90.7%
*-commutative90.7%
Simplified90.7%
if -1.9e19 < z < 1.35e34Initial program 99.0%
Taylor expanded in z around 0 83.6%
*-commutative83.6%
Simplified83.6%
Final simplification87.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.8e+17) (not (<= z 6.2e+35))) (+ x (* 3.13060547623 y)) (+ x (* (* y b) 1.6453555072203998))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.8e+17) || !(z <= 6.2e+35)) {
tmp = x + (3.13060547623 * y);
} 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 <= (-1.8d+17)) .or. (.not. (z <= 6.2d+35))) then
tmp = x + (3.13060547623d0 * y)
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 <= -1.8e+17) || !(z <= 6.2e+35)) {
tmp = x + (3.13060547623 * y);
} else {
tmp = x + ((y * b) * 1.6453555072203998);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.8e+17) or not (z <= 6.2e+35): tmp = x + (3.13060547623 * y) else: tmp = x + ((y * b) * 1.6453555072203998) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.8e+17) || !(z <= 6.2e+35)) tmp = Float64(x + Float64(3.13060547623 * y)); 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 <= -1.8e+17) || ~((z <= 6.2e+35))) tmp = x + (3.13060547623 * y); else tmp = x + ((y * b) * 1.6453555072203998); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.8e+17], N[Not[LessEqual[z, 6.2e+35]], $MachinePrecision]], N[(x + N[(3.13060547623 * y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * b), $MachinePrecision] * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+17} \lor \neg \left(z \leq 6.2 \cdot 10^{+35}\right):\\
\;\;\;\;x + 3.13060547623 \cdot y\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot b\right) \cdot 1.6453555072203998\\
\end{array}
\end{array}
if z < -1.8e17 or 6.19999999999999973e35 < z Initial program 7.9%
Simplified14.4%
Taylor expanded in z around inf 90.7%
*-commutative90.7%
Simplified90.7%
if -1.8e17 < z < 6.19999999999999973e35Initial program 99.0%
Simplified99.7%
Taylor expanded in z around 0 83.0%
*-commutative83.0%
Simplified83.0%
Final simplification86.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.5e+19) (not (<= z 5.6e+33))) (+ x (* 3.13060547623 y)) (+ x (* y (* b 1.6453555072203998)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.5e+19) || !(z <= 5.6e+33)) {
tmp = x + (3.13060547623 * y);
} 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 <= (-2.5d+19)) .or. (.not. (z <= 5.6d+33))) then
tmp = x + (3.13060547623d0 * y)
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 <= -2.5e+19) || !(z <= 5.6e+33)) {
tmp = x + (3.13060547623 * y);
} else {
tmp = x + (y * (b * 1.6453555072203998));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.5e+19) or not (z <= 5.6e+33): tmp = x + (3.13060547623 * y) else: tmp = x + (y * (b * 1.6453555072203998)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.5e+19) || !(z <= 5.6e+33)) tmp = Float64(x + Float64(3.13060547623 * y)); 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 <= -2.5e+19) || ~((z <= 5.6e+33))) tmp = x + (3.13060547623 * y); else tmp = x + (y * (b * 1.6453555072203998)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.5e+19], N[Not[LessEqual[z, 5.6e+33]], $MachinePrecision]], N[(x + N[(3.13060547623 * y), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(b * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+19} \lor \neg \left(z \leq 5.6 \cdot 10^{+33}\right):\\
\;\;\;\;x + 3.13060547623 \cdot y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\
\end{array}
\end{array}
if z < -2.5e19 or 5.6000000000000002e33 < z Initial program 7.9%
Simplified14.4%
Taylor expanded in z around inf 90.7%
*-commutative90.7%
Simplified90.7%
if -2.5e19 < z < 5.6000000000000002e33Initial program 99.0%
Simplified99.7%
Taylor expanded in z around 0 83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in y around 0 83.0%
*-commutative83.0%
*-commutative83.0%
associate-*l*83.0%
*-commutative83.0%
Simplified83.0%
Final simplification86.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.25e+110) (not (<= y 3700000.0))) (* 3.13060547623 y) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.25e+110) || !(y <= 3700000.0)) {
tmp = 3.13060547623 * y;
} 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 <= (-2.25d+110)) .or. (.not. (y <= 3700000.0d0))) then
tmp = 3.13060547623d0 * y
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 <= -2.25e+110) || !(y <= 3700000.0)) {
tmp = 3.13060547623 * y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.25e+110) or not (y <= 3700000.0): tmp = 3.13060547623 * y else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.25e+110) || !(y <= 3700000.0)) tmp = Float64(3.13060547623 * y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.25e+110) || ~((y <= 3700000.0))) tmp = 3.13060547623 * y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.25e+110], N[Not[LessEqual[y, 3700000.0]], $MachinePrecision]], N[(3.13060547623 * y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.25 \cdot 10^{+110} \lor \neg \left(y \leq 3700000\right):\\
\;\;\;\;3.13060547623 \cdot y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.2500000000000001e110 or 3.7e6 < y Initial program 46.3%
Simplified54.1%
Taylor expanded in z around inf 56.5%
*-commutative56.5%
Simplified56.5%
+-commutative56.5%
fma-def56.5%
Applied egg-rr56.5%
Taylor expanded in y around inf 42.4%
if -2.2500000000000001e110 < y < 3.7e6Initial program 60.9%
Simplified60.8%
Taylor expanded in z around inf 75.9%
*-commutative75.9%
Simplified75.9%
Taylor expanded in x around inf 69.2%
Final simplification56.9%
(FPCore (x y z t a b) :precision binary64 (+ x (* 3.13060547623 y)))
double code(double x, double y, double z, double t, double a, double b) {
return x + (3.13060547623 * y);
}
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 + (3.13060547623d0 * y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + (3.13060547623 * y);
}
def code(x, y, z, t, a, b): return x + (3.13060547623 * y)
function code(x, y, z, t, a, b) return Float64(x + Float64(3.13060547623 * y)) end
function tmp = code(x, y, z, t, a, b) tmp = x + (3.13060547623 * y); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(3.13060547623 * y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + 3.13060547623 \cdot y
\end{array}
Initial program 54.1%
Simplified57.7%
Taylor expanded in z around inf 67.0%
*-commutative67.0%
Simplified67.0%
Final simplification67.0%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 54.1%
Simplified57.7%
Taylor expanded in z around inf 67.0%
*-commutative67.0%
Simplified67.0%
Taylor expanded in x around inf 46.4%
Final simplification46.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 2024020
(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))))