| Alternative 1 | |
|---|---|
| Accuracy | 48.4% |
| Cost | 46536 |
(FPCore (x y z)
:precision binary64
(/
(*
(- x 2.0)
(+
(*
(+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y)
x)
z))
(+
(* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x)
47.066876606)))(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
47.066876606
(*
x
(+
313.399215894
(* x (+ 263.505074721 (* x (+ x 43.3400022514))))))))
(t_1
(/
(*
(- x 2.0)
(+
z
(*
x
(+
y
(*
x
(+
137.519416416
(* x (+ (* x 4.16438922228) 78.6994924154))))))))
t_0)))
(if (<= t_1 1e+263)
(* (+ x -2.0) (+ 4.16438922228 (/ z t_0)))
(if (<= t_1 2e+303)
t_1
(+
(* x 4.16438922228)
(- (/ 3655.1204654076414 x) (/ (- 130977.50649958357 y) (* x x))))))))double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
double code(double x, double y, double z) {
double t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))));
double t_1 = ((x - 2.0) * (z + (x * (y + (x * (137.519416416 + (x * ((x * 4.16438922228) + 78.6994924154)))))))) / t_0;
double tmp;
if (t_1 <= 1e+263) {
tmp = (x + -2.0) * (4.16438922228 + (z / t_0));
} else if (t_1 <= 2e+303) {
tmp = t_1;
} else {
tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - ((130977.50649958357 - y) / (x * x)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((x - 2.0d0) * ((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z)) / (((((((x + 43.3400022514d0) * x) + 263.505074721d0) * x) + 313.399215894d0) * x) + 47.066876606d0)
end function
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 47.066876606d0 + (x * (313.399215894d0 + (x * (263.505074721d0 + (x * (x + 43.3400022514d0))))))
t_1 = ((x - 2.0d0) * (z + (x * (y + (x * (137.519416416d0 + (x * ((x * 4.16438922228d0) + 78.6994924154d0)))))))) / t_0
if (t_1 <= 1d+263) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + (z / t_0))
else if (t_1 <= 2d+303) then
tmp = t_1
else
tmp = (x * 4.16438922228d0) + ((3655.1204654076414d0 / x) - ((130977.50649958357d0 - y) / (x * x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
public static double code(double x, double y, double z) {
double t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))));
double t_1 = ((x - 2.0) * (z + (x * (y + (x * (137.519416416 + (x * ((x * 4.16438922228) + 78.6994924154)))))))) / t_0;
double tmp;
if (t_1 <= 1e+263) {
tmp = (x + -2.0) * (4.16438922228 + (z / t_0));
} else if (t_1 <= 2e+303) {
tmp = t_1;
} else {
tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - ((130977.50649958357 - y) / (x * x)));
}
return tmp;
}
def code(x, y, z): return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)
def code(x, y, z): t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))) t_1 = ((x - 2.0) * (z + (x * (y + (x * (137.519416416 + (x * ((x * 4.16438922228) + 78.6994924154)))))))) / t_0 tmp = 0 if t_1 <= 1e+263: tmp = (x + -2.0) * (4.16438922228 + (z / t_0)) elif t_1 <= 2e+303: tmp = t_1 else: tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - ((130977.50649958357 - y) / (x * x))) return tmp
function code(x, y, z) return Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) end
function code(x, y, z) t_0 = Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * Float64(263.505074721 + Float64(x * Float64(x + 43.3400022514))))))) t_1 = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)))))))) / t_0) tmp = 0.0 if (t_1 <= 1e+263) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(z / t_0))); elseif (t_1 <= 2e+303) tmp = t_1; else tmp = Float64(Float64(x * 4.16438922228) + Float64(Float64(3655.1204654076414 / x) - Float64(Float64(130977.50649958357 - y) / Float64(x * x)))); end return tmp end
function tmp = code(x, y, z) tmp = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606); end
function tmp_2 = code(x, y, z) t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))); t_1 = ((x - 2.0) * (z + (x * (y + (x * (137.519416416 + (x * ((x * 4.16438922228) + 78.6994924154)))))))) / t_0; tmp = 0.0; if (t_1 <= 1e+263) tmp = (x + -2.0) * (4.16438922228 + (z / t_0)); elseif (t_1 <= 2e+303) tmp = t_1; else tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - ((130977.50649958357 - y) / (x * x))); end tmp_2 = tmp; end
code[x_, y_, z_] := N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision] * x), $MachinePrecision] + 137.519416416), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 43.3400022514), $MachinePrecision] * x), $MachinePrecision] + 263.505074721), $MachinePrecision] * x), $MachinePrecision] + 313.399215894), $MachinePrecision] * x), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_] := Block[{t$95$0 = N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * N[(263.505074721 + N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * N[(137.519416416 + N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[t$95$1, 1e+263], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(z / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+303], t$95$1, N[(N[(x * 4.16438922228), $MachinePrecision] + N[(N[(3655.1204654076414 / x), $MachinePrecision] - N[(N[(130977.50649958357 - y), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\begin{array}{l}
t_0 := 47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)\\
t_1 := \frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right)\right)\right)\right)}{t_0}\\
\mathbf{if}\;t_1 \leq 10^{+263}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{z}{t_0}\right)\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+303}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228 + \left(\frac{3655.1204654076414}{x} - \frac{130977.50649958357 - y}{x \cdot x}\right)\\
\end{array}
Results
| Original | 57.9% |
|---|---|
| Target | 98.7% |
| Herbie | 71.1% |
if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < 1.00000000000000002e263Initial program 94.9%
Simplified99.0%
[Start]94.9 | \[ \frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\] |
|---|---|
associate-*r/ [<=]99.0 | \[ \color{blue}{\left(x - 2\right) \cdot \frac{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}}
\] |
sub-neg [=>]99.0 | \[ \color{blue}{\left(x + \left(-2\right)\right)} \cdot \frac{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\] |
metadata-eval [=>]99.0 | \[ \left(x + \color{blue}{-2}\right) \cdot \frac{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\] |
*-commutative [=>]99.0 | \[ \left(x + -2\right) \cdot \frac{\color{blue}{x \cdot \left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right)} + z}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\] |
fma-def [=>]99.0 | \[ \left(x + -2\right) \cdot \frac{\color{blue}{\mathsf{fma}\left(x, \left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y, z\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\] |
*-commutative [=>]99.0 | \[ \left(x + -2\right) \cdot \frac{\mathsf{fma}\left(x, \color{blue}{x \cdot \left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right)} + y, z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\] |
fma-def [=>]99.0 | \[ \left(x + -2\right) \cdot \frac{\mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(x, \left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416, y\right)}, z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\] |
*-commutative [=>]99.0 | \[ \left(x + -2\right) \cdot \frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \color{blue}{x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right)} + 137.519416416, y\right), z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\] |
fma-def [=>]99.0 | \[ \left(x + -2\right) \cdot \frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(x, x \cdot 4.16438922228 + 78.6994924154, 137.519416416\right)}, y\right), z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\] |
fma-def [=>]99.0 | \[ \left(x + -2\right) \cdot \frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right)}, 137.519416416\right), y\right), z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\] |
*-commutative [=>]99.0 | \[ \left(x + -2\right) \cdot \frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right)}{\color{blue}{x \cdot \left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right)} + 47.066876606}
\] |
Taylor expanded in z around 0 99.0%
Taylor expanded in x around inf 49.9%
if 1.00000000000000002e263 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < 2e303Initial program 99.4%
if 2e303 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) Initial program 0.3%
Simplified6.8%
[Start]0.3 | \[ \frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\] |
|---|---|
*-commutative [=>]0.3 | \[ \frac{\color{blue}{\left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right) \cdot \left(x - 2\right)}}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\] |
associate-*r/ [<=]6.8 | \[ \color{blue}{\left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right) \cdot \frac{x - 2}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}}
\] |
*-commutative [=>]6.8 | \[ \left(\color{blue}{x \cdot \left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right)} + z\right) \cdot \frac{x - 2}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\] |
fma-def [=>]6.8 | \[ \color{blue}{\mathsf{fma}\left(x, \left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y, z\right)} \cdot \frac{x - 2}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\] |
*-commutative [=>]6.8 | \[ \mathsf{fma}\left(x, \color{blue}{x \cdot \left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right)} + y, z\right) \cdot \frac{x - 2}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\] |
fma-def [=>]6.8 | \[ \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(x, \left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416, y\right)}, z\right) \cdot \frac{x - 2}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\] |
*-commutative [=>]6.8 | \[ \mathsf{fma}\left(x, \mathsf{fma}\left(x, \color{blue}{x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right)} + 137.519416416, y\right), z\right) \cdot \frac{x - 2}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\] |
fma-def [=>]6.8 | \[ \mathsf{fma}\left(x, \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(x, x \cdot 4.16438922228 + 78.6994924154, 137.519416416\right)}, y\right), z\right) \cdot \frac{x - 2}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\] |
fma-def [=>]6.8 | \[ \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right)}, 137.519416416\right), y\right), z\right) \cdot \frac{x - 2}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\] |
Taylor expanded in x around inf 99.1%
Simplified99.1%
[Start]99.1 | \[ \left(\frac{y}{{x}^{2}} + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - \left(110.1139242984811 + 130977.50649958357 \cdot \frac{1}{{x}^{2}}\right)
\] |
|---|---|
associate--l+ [=>]99.1 | \[ \color{blue}{\frac{y}{{x}^{2}} + \left(\left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right) - \left(110.1139242984811 + 130977.50649958357 \cdot \frac{1}{{x}^{2}}\right)\right)}
\] |
+-commutative [=>]99.1 | \[ \color{blue}{\left(\left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right) - \left(110.1139242984811 + 130977.50649958357 \cdot \frac{1}{{x}^{2}}\right)\right) + \frac{y}{{x}^{2}}}
\] |
associate--r+ [=>]99.1 | \[ \color{blue}{\left(\left(\left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right) - 110.1139242984811\right) - 130977.50649958357 \cdot \frac{1}{{x}^{2}}\right)} + \frac{y}{{x}^{2}}
\] |
associate-+l- [=>]99.1 | \[ \color{blue}{\left(\left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right) - 110.1139242984811\right) - \left(130977.50649958357 \cdot \frac{1}{{x}^{2}} - \frac{y}{{x}^{2}}\right)}
\] |
associate-*r/ [=>]99.1 | \[ \left(\left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right) - 110.1139242984811\right) - \left(\color{blue}{\frac{130977.50649958357 \cdot 1}{{x}^{2}}} - \frac{y}{{x}^{2}}\right)
\] |
metadata-eval [=>]99.1 | \[ \left(\left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right) - 110.1139242984811\right) - \left(\frac{\color{blue}{130977.50649958357}}{{x}^{2}} - \frac{y}{{x}^{2}}\right)
\] |
div-sub [<=]99.1 | \[ \left(\left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right) - 110.1139242984811\right) - \color{blue}{\frac{130977.50649958357 - y}{{x}^{2}}}
\] |
unsub-neg [<=]99.1 | \[ \left(\left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right) - 110.1139242984811\right) - \frac{\color{blue}{130977.50649958357 + \left(-y\right)}}{{x}^{2}}
\] |
mul-1-neg [<=]99.1 | \[ \left(\left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right) - 110.1139242984811\right) - \frac{130977.50649958357 + \color{blue}{-1 \cdot y}}{{x}^{2}}
\] |
sub-neg [=>]99.1 | \[ \color{blue}{\left(\left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right) + \left(-110.1139242984811\right)\right)} - \frac{130977.50649958357 + -1 \cdot y}{{x}^{2}}
\] |
+-commutative [=>]99.1 | \[ \color{blue}{\left(\left(-110.1139242984811\right) + \left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right)\right)} - \frac{130977.50649958357 + -1 \cdot y}{{x}^{2}}
\] |
associate-+r- [<=]99.1 | \[ \color{blue}{\left(-110.1139242984811\right) + \left(\left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right) - \frac{130977.50649958357 + -1 \cdot y}{{x}^{2}}\right)}
\] |
unsub-neg [<=]99.1 | \[ \left(-110.1139242984811\right) + \color{blue}{\left(\left(4.16438922228 \cdot x + 3655.1204654076414 \cdot \frac{1}{x}\right) + \left(-\frac{130977.50649958357 + -1 \cdot y}{{x}^{2}}\right)\right)}
\] |
Taylor expanded in x around inf 99.1%
Simplified99.1%
[Start]99.1 | \[ 4.16438922228 \cdot x + \left(\frac{3655.1204654076414}{x} - \frac{130977.50649958357 - y}{x \cdot x}\right)
\] |
|---|---|
*-commutative [=>]99.1 | \[ \color{blue}{x \cdot 4.16438922228} + \left(\frac{3655.1204654076414}{x} - \frac{130977.50649958357 - y}{x \cdot x}\right)
\] |
Final simplification67.6%
| Alternative 1 | |
|---|---|
| Accuracy | 48.4% |
| Cost | 46536 |
| Alternative 2 | |
|---|---|
| Accuracy | 48.4% |
| Cost | 3656 |
| Alternative 3 | |
|---|---|
| Accuracy | 48.7% |
| Cost | 2505 |
| Alternative 4 | |
|---|---|
| Accuracy | 48.3% |
| Cost | 2377 |
| Alternative 5 | |
|---|---|
| Accuracy | 48.3% |
| Cost | 2121 |
| Alternative 6 | |
|---|---|
| Accuracy | 48.5% |
| Cost | 1993 |
| Alternative 7 | |
|---|---|
| Accuracy | 48.5% |
| Cost | 1993 |
| Alternative 8 | |
|---|---|
| Accuracy | 48.6% |
| Cost | 1736 |
| Alternative 9 | |
|---|---|
| Accuracy | 48.5% |
| Cost | 1353 |
| Alternative 10 | |
|---|---|
| Accuracy | 48.5% |
| Cost | 1353 |
| Alternative 11 | |
|---|---|
| Accuracy | 48.9% |
| Cost | 1225 |
| Alternative 12 | |
|---|---|
| Accuracy | 46.8% |
| Cost | 840 |
| Alternative 13 | |
|---|---|
| Accuracy | 46.9% |
| Cost | 840 |
| Alternative 14 | |
|---|---|
| Accuracy | 46.8% |
| Cost | 585 |
| Alternative 15 | |
|---|---|
| Accuracy | 46.5% |
| Cost | 584 |
| Alternative 16 | |
|---|---|
| Accuracy | 46.5% |
| Cost | 584 |
| Alternative 17 | |
|---|---|
| Accuracy | 46.5% |
| Cost | 456 |
| Alternative 18 | |
|---|---|
| Accuracy | 46.1% |
| Cost | 192 |
| Alternative 19 | |
|---|---|
| Accuracy | 3.3% |
| Cost | 64 |
herbie shell --seed 2023159
(FPCore (x y z)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, C"
:precision binary64
:herbie-target
(if (< x -3.326128725870005e+62) (- (+ (/ y (* x x)) (* 4.16438922228 x)) 110.1139242984811) (if (< x 9.429991714554673e+55) (* (/ (- x 2.0) 1.0) (/ (+ (* (+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y) x) z) (+ (* (+ (+ (* 263.505074721 x) (+ (* 43.3400022514 (* x x)) (* x (* x x)))) 313.399215894) x) 47.066876606))) (- (+ (/ y (* x x)) (* 4.16438922228 x)) 110.1139242984811)))
(/ (* (- x 2.0) (+ (* (+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y) x) z)) (+ (* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x) 47.066876606)))