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

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

Re: Floating Point computations in elisp


From: Jean Louis
Subject: Re: Floating Point computations in elisp
Date: Fri, 18 Dec 2020 21:21:50 +0300
User-agent: Mutt/2.0 (3d08634) (2020-11-07)

* Emanuel Berg via Users list for the GNU Emacs text editor 
<help-gnu-emacs@gnu.org> [2020-12-18 20:09]:
> (defun compute-space-distance (dist num-beams beam-width)
>   (let*((spaces         (1+ num-beams))
>         (dist-covered   (* num-beams beam-width))
>         (dist-uncovered (- dist dist-covered))
>         (space          (/ dist-uncovered spaces 1.0) ))
>     space ))
> 
> ;; (insert (format "\n;; %.2f" (compute-space-distance 262 16 12)))
> ;; 4.12

If I wish to arrive to Tau Ceti from Earth and it is maybe 11.8 light
years distant, how many years do I need to get there provided I trave
5,000 km per hour?




reply via email to

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