help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Elisp function that performs numeric computations


From: Emanuel Berg
Subject: Re: Elisp function that performs numeric computations
Date: Fri, 21 Jan 2022 16:32:52 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Sergey Organov wrote:

>> (defun organov (dep top rep)
>>   (if (<= dep top)
>>       dep
>>     (+ rep
>>        (mod (1- (- dep top))
>>             (1+ (- top rep)) ))))
>
> Nice, thanks! Didn't know me could be cut to such a brief
> definition though :)

Heh, but here it actually becomes longer than yours!

But more clear, was the thought.

So if that's indeed so, that means one should do it, since the
penalty for being long (or, if you'd like, the gain from being
short) is approaching zero to the point (but not to the acutal
point actually) where it is infinitely small :)

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]