For a school assignment, we were to find some way to overcome Elisp's limited floating point precision. I found this, which I thought was pretty useful, but it gives no description of how to actually use it. I then found this, which says that in order to use calc's arbitrary precision math I need to first set the precision using this:

(calc-eval '(calc-precision 20) 'eval)

Unfortunately, Emacs then tells me that calc-precision's function definition is void. Can anyone help me fix this problem?


1 Answer 1


"function definition is void" most probably means the file where the function is defined has not be loaded yet. In this case you need to first

(require 'calc-ext)

Now, how can you find this is calc-ext? Just use calc, this triggers loading of necessary files, then ask for the docstring of calc-precision:

C-h f calc-precision

calc-precision is an interactive compiled Lisp function in ‘calc-ext.el’.

(calc-precision N)

Not documented.

By the way, be sure to read section Precision of calc manual, for the distinction between precision and accuracy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.