On Fri, 19 Oct 2018 at 15:30, Bernhard Reutner-Fischer
<rep.dot....@gmail.com> wrote:
>
> On Fri, 19 Oct 2018 at 11:03, Cristian Ionescu-Idbohrn
> <cristian.ionescu-idbo...@axis.com> wrote:
> >
> > The documentation on this page:
> >
> >         
> > http://pubs.opengroup.org/onlinepubs/9699919799/utilities/printf.html
> >
> > (search for 'ISO/IEC 646:1991') shows this example:
> >
> >         printf "%d\n" 3 +3 -3 \'3 \"+3 "'-3"
> >
> > busybox ash can't handle the '+3' argument (tested with v1.30.0.git,
> > v1.27.2 and v1.22.1):
> >
> > $ printf "%d\n" +3
> > ash: invalid number '+3'
> > 0
> >
> > dash v0.5.10.2 can:
> >
> > $ printf "%d\n" +3
> > 3
>
> right. Also "%d" '  42' was moaning about the leading whitespace.
> 3db4e7f84cf795de8559ea0d96eaa491999ccf24
> Thanks for mentioning!

Oh, an I should mention that on a 64bit box we diverge from coreutils printf:

$ printf "%f\n" '  +18446744073709551614'
18446744073709551614.000000
$ ./busybox printf "%f\n" '  +18446744073709551614'
18446744073709551616.000000

and
$ printf "%f\n" '  +1844674407370955100'
1844674407370955100.000000
$ ./busybox printf "%f\n" '  +1844674407370955100'
1844674407370955008.000000

not off by much but still, always returning ULLONG_MAX or the result
+-2 could be considered not ideal..
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to