Thread overview
printf bug for 64 bit integer output in binary
Dec 16, 2005
Carl Sturtivant
Dec 19, 2005
Walter Bright
Dec 19, 2005
Carl Sturtivant
Jan 22, 2006
Walter Bright
December 16, 2005
It seems that if bit 48 or above is set then there's a problem with printf
producing binary, shown by the short program below. If bit 56 or above is set
then the problem is more severe. Any chance of a fix?  :)
Carl.

#include <stdio.h>

int main(int argc, char* argv[]){
int i;
unsigned long long b;
for( i=48; i<56; ++i) {
b= 1ULL << i;
printf("%064llb\n%llu\n", b, b);
}
return 0;
}


December 19, 2005
"Carl Sturtivant" <Carl_member@pathlink.com> wrote in message news:dnvdtg$2pu7$1@digitaldaemon.com...
> It seems that if bit 48 or above is set then there's a problem with printf
> producing binary, shown by the short program below. If bit 56 or above is
> set
> then the problem is more severe. Any chance of a fix?  :)
> Carl.
>
> #include <stdio.h>
>
> int main(int argc, char* argv[]){
> int i;
> unsigned long long b;
> for( i=48; i<56; ++i) {
> b= 1ULL << i;
> printf("%064llb\n%llu\n", b, b);
> }
> return 0;
> }

Try downloading the latest beta and see if that works.


December 19, 2005
In article <do74cb$1gj9$4@digitaldaemon.com>, Walter Bright says...
>
>Try downloading the latest beta and see if that works.
>

If that's 8.45c, then that's what I ran under when I checked the bug still
existed. Otherwise, where do I get the latest beta?
Carl.


January 22, 2006
"Carl Sturtivant" <Carl_member@pathlink.com> wrote in message news:do78tm$1mkh$1@digitaldaemon.com...
> If that's 8.45c, then that's what I ran under when I checked the bug still
> existed. Otherwise, where do I get the latest beta?
> Carl.

Yes, the bug is still there. I'll check into it.