How to show few decimal digits of a real number?

Georgi Guninski <[email protected]> Mon, 2 Sep 2024 18:40:24 +0300
Newsgroups gmane.comp.mathematics.pari.devel
Message-ID <CAGUWgD9o=qNk=4TYs=vOSTgqADSzyusKzhTQFCRGuP_JLQ++Tw@mail.gmail.com>
I have real number A and want to show only few fractional digits,
how to do it directly without floor/round?

The following doesn't work:
? precision(Pi)
%3 = 38
? precision(Pi,2)
%4 = 3.141592653589793239