Re: Determining validity of mathematical expression before evaluation

Heime <[email protected]>
Newsgroups gmane.emacs.help
Message-ID <T0Vv4TGU_4u77t4A1B2qH3jCPY3EjoY-gxTNheLeQGtlRjaM9liEhaViGy-UUWJBwUVQK5C5Tk6DtF8_LxeZKEMAS6QaKCXBKHm0uNDSp9M=@protonmail.com>
On Saturday, March 28th, 2026 at 3:40 AM, Rudolf Adamkovič <[email protected]> wrote:

> Heime <[email protected]> writes:
> 
> [I forgot to CC the list; sorry for the duplicate message.]
> 
> >> Is it possible to determine whether an elisp mathematical expression
> >> is valid before evaluating it?
> 
> That depends entirely on what you consider a valid mathematical
> expression. :)

Valid for lisp eval.
 
> > I call bc.
> 
> Why not Lisp instead?
> 
> (string-to-number (calc-eval "10 + 5 * 2")) => 20

I'll consider lisp then.
 
> Rudy
> --
> "One can begin to reason only when a clear picture has been formed in
> the imagination."
> 
> --- Walter Warwick Sawyer, Mathematician's Delight, 1943
> 
> Rudolf Adamkovič <[email protected]> [he/him]
> http://adamkovic.org
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.