OK, there were a few problems with sprintf. One is known in sfio: that is,
that "%.0f", 0.6 should give 1, but gives 0. The other one is this one
above. It seems sprintf is implemented in perl, except for with e/f/g, and
that the local sprintf is used.
So, first, we need to determine how much we care, and second, whether or
not this can be fixed. Murr, you said you ported sfio 2000; maybe we can
test with that? Or maybe you know something more about it? I am kinda
scared about moving to sfio 2000 at this point (how much might break?),
but maybe we can pull the sprintf code out if it is better now.
Anyway, lemme know what you think, and if you have it, please send me
your sfio 2000 port.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This should be sprintf "%010g". This does indeed not zero pad and it seems to be a logic error in sfio98. I'd suggest not fixing it for now and eventually migrating to sfio2000, which no longer has this bug.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=3660
OK, there were a few problems with sprintf. One is known in sfio: that is,
that "%.0f", 0.6 should give 1, but gives 0. The other one is this one
above. It seems sprintf is implemented in perl, except for with e/f/g, and
that the local sprintf is used.
So, first, we need to determine how much we care, and second, whether or
not this can be fixed. Murr, you said you ported sfio 2000; maybe we can
test with that? Or maybe you know something more about it? I am kinda
scared about moving to sfio 2000 at this point (how much might break?),
but maybe we can pull the sprintf code out if it is better now.
Anyway, lemme know what you think, and if you have it, please send me
your sfio 2000 port.
Logged In: YES
user_id=37219
This should be sprintf "%010g". This does indeed not zero pad and it seems to be a logic error in sfio98. I'd suggest not fixing it for now and eventually migrating to sfio2000, which no longer has this bug.