c++.rtl - printf bug for 64 bit integer output in binary
- Carl Sturtivant (14/14) Dec 16 2005 It seems that if bit 48 or above is set then there's a problem with prin...
- Walter Bright (3/18) Dec 19 2005 Try downloading the latest beta and see if that works.
- Carl Sturtivant (4/5) Dec 19 2005 If that's 8.45c, then that's what I ran under when I checked the bug sti...
- Walter Bright (3/6) Jan 22 2006 Yes, the bug is still there. I'll check into it.
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; }
Dec 16 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.
Dec 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.
Dec 19 2005
"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.
Jan 22 2006