This is a tutorial that documents GiNaC @value{VERSION}, an open
framework for symbolic computation within the C++ programming language.
-Copyright (C) 1999-2021 Johannes Gutenberg University Mainz, Germany
+Copyright (C) 1999-2022 Johannes Gutenberg University Mainz, Germany
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@page
@vskip 0pt plus 1filll
-Copyright @copyright{} 1999-2021 Johannes Gutenberg University Mainz, Germany
+Copyright @copyright{} 1999-2022 Johannes Gutenberg University Mainz, Germany
@sp 2
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
ex machin_pi(int degr)
@{
symbol x;
- ex pi_expansion = series_to_poly(atan(x).series(x,degr));
+ ex pi_expansion = series_to_poly(atan(x).series(x==0,degr));
ex pi_approx = 16*pi_expansion.subs(x==numeric(1,5))
-4*pi_expansion.subs(x==numeric(1,239));
return pi_approx;