Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [numbers]

The tag has no usage guidance.

2
votes
1answer
20 views

How to replace a digit by a letter?

I want to replace some digits by letters such that 1 ---> a 2 ---> b ... In emacs I have tried the following replacement: M-x query-replace-regexp RET \([0-9]+\) RET \,(string (+ ?a \#1)) RET ...
0
votes
4answers
63 views

Hоw add numbers in differents lines?

Numbers in many lines: add numbers 4900 5171 5700 4033 8583 4208 2299 2199 1699 1949 1799 2199 1899 2099 2699 2499 1549 1749 1749 2049 2149 2299 2180 2349 2499 I want to adding all this numbers. ...
2
votes
1answer
70 views

How to use fixed point decimals in emacs lisp?

How to use large decimal numbers with fixed precision, like money amount, in emacs lisp? For example, I'm writing a function that takes amount of money as a parameter. When I pass large float like ...
0
votes
1answer
14 views

Adjust end index in selected region

Following the advice given here, I wrote the following code to enclose the text selection in phpbb italics tags : (defun wrap-in-phpbb-italics-tag (b e) "does what its name says." (interactive "...
2
votes
1answer
41 views

How should one interpret the printed representation of integers in Emacs Lisp?

I'm getting to grips with Emacs Lisp in GNU Emacs 25.3.2. While trying to understand the printed representation of integers I got confused by the following echo area output produced by C-x C-e: 10 -&...
2
votes
2answers
33 views

floating-point addition

Why am I getting these results? (+ 5.2 42.4 -1) 46.6 (+ 5.2 42.45 -1) 46.650000000000006 Couldn't the 2nd operation just output 46.65? Where does the 0000000000006 come from?
2
votes
2answers
58 views

How can I use a char as a counter?

I have this LaTeX code: \begin{enumerate}[a] \affiliation{...} \affiliation{...} \affiliation{...} ... \affiliation{...} \end{enumerate} and, using a script written in Emacs Lisp, I want to ...
2
votes
1answer
41 views

Why does (format “%x” some-large-number) produces incorrect results?

I wanted the hexadecimal string for a large integer such as below: (format "%x" 2738188573457603759) This returns 2600000000f95c00 which is incorrect, it should be 2600000000f95caf. The value of ...
6
votes
2answers
433 views

Quickly Evaluate Infix Math Expression?

Is there a way to highlight and quickly evaluate a simple math expression without using elisp notation? For example, we can already evaluate the elisp expression (+ 1 1) in the following text snippet ...
1
vote
1answer
109 views

elisp replace float number with half value

I need to replace below string: (24.0000,28.0000) .. controls (27.3100,28.0000) and (29.9800,25.3100) .. (29.9800,22.0000) to: (12,14) .. controls (13.655,14) and (14.99,12.655) .. (14.99,11) The ...
0
votes
1answer
431 views

How to change the color of numbers for a theme?

Is there a way to set the color of numbers differently to that of regular text? for example, numbers such as: 1, 2F, 2.0f, 0x1234. Can this be changed by a theme author? If not, how can this be ...
2
votes
0answers
282 views

In Emacs Lisp, how to convert roman numerals to an integer?

In Emacs Lisp, how to write an Emacs Lisp function to convert a natural number from roman numerals representation to the equivalent Emacs Lisp integer value? The Emacs Lisp function should be callable ...
5
votes
3answers
285 views

How to increase the number of displayed digit decimals in Emacs calculator

Currently Emacs calculator (calculator not calc) only shows, up to three digit decimal values. For example calculating 22/7 gives 3.143. Is it possible to increase the number of displayed digit ...