Lisp HUG Maillist Archive

Lisp calculator

Hello list,

Does it exist some lisp library to interpret arithmetic expressions?

The top level function could be a function of one (string) argument, as for
exemple :

(calculator ³(5*9+3)/200²) => 0.24

Thanks

Denis


-------------------------------------------------------
Denis Pousseur
70 rue de Wansijn
1180 Bruxelles, Belgique

Tel : 32 (0)2 219 31 09
Mail :  denis.pousseur@gmail.com
-------------------------------------------------------



Re: Lisp calculator

Denis Pousseur wrote:

> Does it exist some lisp library to interpret arithmetic expressions?
>
> The top level function could be a function of one (string) argument, as for
> exemple :
>
> (calculator ³(5*9+3)/200²) => 0.24

You could have a look at Mark Kantrowitz' good old infix library:

http://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/lisp/code/syntax/infix/0.html

Arthur




Re: Lisp calculator

Unable to parse email body. Email id is 9476

Re: Lisp calculator

Hi,

There is some elisp (for emacs) code here :
http://barzilay.org/misc/calculator.el
This one should be easy to port.

Denis Pousseur a écrit :
> Hello list,
>
> Does it exist some lisp library to interpret arithmetic expressions?
>
> The top level function could be a function of one (string) argument, as for
> exemple :
>
> (calculator ³(5*9+3)/200²) => 0.24
>
> Thanks
>
> Denis
>
>
> -------------------------------------------------------
> Denis Pousseur
> 70 rue de Wansijn
> 1180 Bruxelles, Belgique
>
> Tel : 32 (0)2 219 31 09
> Mail :  denis.pousseur@gmail.com
> -------------------------------------------------------
>
>
>
>
>   




Updated at: 2020-12-10 08:40 UTC