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

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

Re: bike shifting - output decimal in percent


From: Tomas Nordin
Subject: Re: bike shifting - output decimal in percent
Date: Sun, 19 May 2019 10:15:28 +0200

Emanuel Berg <moasenwood@zoho.eu> writes:

> Tomas Nordin wrote:
>
>> Why not just use good old %f?
>>
>> (format "%.0f%%" (* 0.127 100)) ;; -> "13%"
>
> Congrats, it works: 
>
> ;; (format "%.0f%%" (* 0.01 100)) ; "1%"
> ;; (format "%.0f%%" (* 0.1  100)) ; "10%"
> ;; (format "%.0f%%" (* 1    100)) ; "100%"
> ;; (format "%.0f%%" (* 2    100)) ; "200%"
>
>> Or respecting SI recommendations:
>>
>> (format "%.0f %%" (* 0.127 100)) ;; -> "13 %"
>
> Maybe if DIN recommended the same thing...

Straigh from the almighty Wikipedia:

"In German, the space is prescribed by the regulatory body in the
national standard DIN 5008."

https://en.wikipedia.org/wiki/Percent_sign

>
> --
> underground experts united
> http://user.it.uu.se/~embe8573
> https://dataswamp.org/~incal



reply via email to

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