Search code examples
lispelisp

Where is the pow-mod function defined in Elisp


I would like to use the pow-mod function to help call perform modular arithmetic on 'bigpos' numbers.

I found it on this elisp documentation website

However when I call pow-mod, I cannot even get it to be recognized:

(require 'calc)
(require 'calc-ext)
(pow-mod message-encoded e n)

But it's not recognized! I'm confused because it's listed under computational lisp functions. So I assume that it was a part of the 'calc' functions. What is wrong? Is there some library I am missing? I tried `(require 'pow) but to no luck.

Where is pow-mod defined? Thank you!


Solution

  • Try something like

    (math-pow-mod 19 103 89)
    

    (In the documentation you linked, go up one level to 17.5.7 and check the first paragraph: "These functions are shown by their names as they conventionally appear in defmath. Their full Lisp names are generally gotten by prepending ‘calcFunc-’ or ‘math-’ to their apparent names.")