coreutils
[Top][All Lists]
Advanced

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

Re: [seq] Scentific notation


From: Pádraig Brady
Subject: Re: [seq] Scentific notation
Date: Sun, 27 Jan 2013 12:27:37 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

On 01/26/2013 09:03 PM, Dmitry Bogatov wrote:
Hello! I found in seq.c:152 following line:

     if (! arg[strcspn (arg, "xX")] && isfinite (ret.value))

where arg is checked to be valid double (check for `xstrtold'
success) just before. I checked for `git blame`, it refers to
86e4b778, and commit message talk about scentific notation.

Can you point me to documention about "xX" symbols in double?
I found only about "1e-6" -- like style.

That line is basically avoiding the equal width logic
in the presence of "hex float constants".
Before 86e4b778, numbers in scientific notation also
bypassed the equal width logic, but 86e4b778 removed
that limitation (and 64d4a280 recently improved this support)

Hex consts are complicated and have the form: 0xA.BpC
where A=hex, B=hex/16 and C = 2^-dec, for example...

$ seq 0x10.8p0 18
16.5
17.5

thanks,
Pádraig.



reply via email to

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