Thread overview | ||||||
---|---|---|---|---|---|---|
|
December 16, 2005 printf bug for 64 bit integer output in binary | ||||
---|---|---|---|---|
| ||||
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 Re: printf bug for 64 bit integer output in binary | ||||
---|---|---|---|---|
| ||||
Posted in reply to Carl Sturtivant | "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 Re: printf bug for 64 bit integer output in binary | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | 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 Re: printf bug for 64 bit integer output in binary | ||||
---|---|---|---|---|
| ||||
Posted in reply to Carl Sturtivant | "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. |
Copyright © 1999-2021 by the D Language Foundation