1

I am trying to run a simple addition operation in eshell. Trying with an illustrative minimal example:

 ~/$ (+ 1 -4) 

eshell returns:

-3 

Since the above operation worked out, I tried the real which is bigger:

~/$ (+ 0 -171.055,81 -826.735,77 -528.986,10 256.257,51 97.045,11 17.349,00 10.755,83 -4,03 505.312,10 60.000,00 3.827,32 48.832,18 907,99 14.858,23 131.439,91 8.688,42 3.483,25 64.395,72 -437,19 17.413,90 2.017,70 149,00 30.612,72 21.566,77 17.915,59 18.250,70 12.780,69 7.969,96 1.834,31 3.608,93 4.107,56 5.323,56 49.792,66 1.278,27 13.524,78 130.737,01 7.200,00 5.439,65 5.463,08 135.775,31 20.212,66 4.312,81 303.029,90 94.248,43 -78.887,90 -20.212,66 -4.312,81 -297.278,33 -57.037,81 -6.003,83 -60.000,00 -12.086,73 -104.505,00 35.400,44 -100,00 -49.541,92 44.066,93) 

Unfortunately, it returns an error message:

Symbol’s function definition is void: ,

What is causing this error? How can I fix the operation?

2
  • 1
    emacs.stackexchange.com/tags/elisp/info Commented Sep 19, 2022 at 19:38
  • ok, @Drew I thought this could be related to something on how Elisp was dealing with floating point numbers Commented Sep 19, 2022 at 22:18

2 Answers 2

3

Eshell doesn’t like your numbers. It expects you to use a period for the decimal separator, and it also expects you not to use any thousands separator. Like this:

~/$ (+ 0 -171055.81 -826735.77 -528986.10 … 
1

@db48x answered your question. But see also the Elisp manual, node Numbers, and its subnodes (e.g. Integer Basics and Float Basics) for info on the representation (syntax) of numbers (numerals) in Elisp.

That tells you exactly what representations are allowed for numerals in Elisp.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.