Georgi Guninski on Mon, 02 Sep 2024 17:40:50 +0200
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
How to show few decimal digits of a real number?
|
- To: pari-dev@pari.math.u-bordeaux.fr
- Subject: How to show few decimal digits of a real number?
- From: Georgi Guninski <gguninski@gmail.com>
- Date: Mon, 2 Sep 2024 18:40:24 +0300
- Delivery-date: Mon, 02 Sep 2024 17:40:50 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725291647; x=1725896447; darn=pari.math.u-bordeaux.fr; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=sSJ5RyAzeE3ZMEFgeSDmLdQHv8ZuYjdb12baxCUOJQw=; b=HQPI/QYk1V1Yrf55HzUoJGN4yr+uM24EOQouRRFO2I+OVb9iUPU9ttw6r5RFq2RCOY TAdGx4Bv3g4la0LXWt3lBmumSbEvUPZHZUggzWWPwhRYI2IcHlpVs/5OkckG0bKTPhIM VewKDAf9f/YYngTr8Q9UPoKF9doOdOUOHG/VM3oatPUi2043ObtTHslMU4ibSi7EDNR3 ucSGw+HSkP+o1TJeRrVgoupyZqEqcT2JMQtQVbF1QoZqdYgo6t0Huxh/gAeLbkNEeYXZ wP+F17a6AoqAJufogeHDR6UAeAK36n7W8FgvIuTMC6Enp7bjPZpypDEwQBI3Eqjpmsko 4deg==
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