Currently Emacs calculator (calculator
not calc
) only shows, up to three digit decimal values.
For example calculating 22/7
gives 3.143
.
Is it possible to increase the number of displayed digit decimal in Emacs calculator?
3 Answers
p
From the manual, available in emacs here:
(info "(calc)Precision")
7.2 Precision
The ‘p’ (‘calc-precision’) command controls the precision to which floating-point calculations are carried. The precision must be at least 3 digits and may be arbitrarily high, within the limits of memory and time. This affects only floats: Integer and rational calculations are always carried out with as many digits as necessary.
The ‘p’ key prompts for the current precision. If you wish you can instead give the precision as a numeric prefix argument.
-
I use calculator by
M-x calculator
. Contrary to the calc-mode (M-x calc
), it seems that precisionp
doesn't work there.– NameFeb 13, 2015 at 14:34 -
Right you are. I'll leave this here for others looking for
calc
, but I see @SueD.Nymme has given you the correct answer forcalculator
.– TylerFeb 13, 2015 at 15:08
This is an easy one: p the number entered afterwards controls the precision of floating-point calculations.
-
-
@Name oh... I haven't even though about it. But I see the answer has already been given. I'll live it until the evening and then remove. No need to duplicate the answers.– wvxvwFeb 13, 2015 at 17:31
-
calc
or something else?calculator
, I thoughtcalc
was it!quick-calc
; I have been using it with my custom math commands likealog10
,dbv
,next2pow
, etc