[uClinux-dev] probelm with BIG numbers

Roope Anttinen roope.anttinen at indagon.com
Wed Mar 5 15:03:43 EST 2003


Damn...
from uClibs/Config
HAS_LONG_LONG = true

so, yes I have it defined :(
More strange...

unsigned long long llInt = 22022;
if((83 << 32) ==0) printf ("ZERO\n");
else printf("NON ZERO\n");
llInt += 38<<32;
printf("foo: %llu\n", llInt);

prints out:
NON ZERO
foo: 22022

..so I have found something thats not zero, not supposed to be zero, but
behaves like a zero ???


On Wed, 2003-03-05 at 19:20, Roope Anttinen wrote:
> Haven't checked that but this works anyway
> 
> long long int moduleid = atoll(identification);
> ..where that identification is a c string containig "358505201234". So I
> assume that long long int support is in place.
> 
> 
> On Wed, 2003-03-05 at 17:37, Richard Klingler wrote:
> > > Hi,
> > > 
> > > some code here...
> > > 
> > > unsigned long long int foo = 83;
> > > printf("16: %llu", foo<<16);
> > > printf("24: %llu", foo<<24);
> > > printf("30: %llu", foo<<30);
> > > printf("32: %llu", foo<<32);
> > > 
> > > that results to:
> > > 16: 5439488
> > > 24: 1392508928
> > > 30: 3221225472
> > > 32: 0
> > > 
> > 
> > Do you have "HAS_LONG_LONG = true" in uClibc?
> > 
> > 
> > Rick
> > 
> > 
> > Richard Klingler             mail: richard.klingler at violasystems.com
> > Viola Systems Ltd.           http://www.violasystems.com/
> > Lemminkäisenkatu 32          phon: +358 (0)201 226 226
> > 20520 Turku, Finland         mobile: +358 (0)40 748 4711
> > _______________________________________________
> > uClinux-dev mailing list
> > uClinux-dev at uclinux.org
> > http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> > This message was resent by uclinux-dev at uclinux.org
> 
> 
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev at uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev at uclinux.org





More information about the uClinux-dev mailing list