I coud do it like this
long mask = 0;
mask = (long) Math.pow((long)2,(long)62);
mask = mask<<1;
Thanks & Regards
Praveen
Praveen Mathew
IBM Software Labs,Airport Road,
Bangalore - 560 017,India.
Ph : +91- 80 - 504 4609 (Direct)
+91 - 80 - 5262355 Extn: 3609
Email: [EMAIL PROTECTED]
"A. Rothman" <[EMAIL PROTECTED]>
05/07/2003 15:33
Please respond to "POI Developers List"
To: POI Developers List <[EMAIL PROTECTED]>
cc:
Subject: Re: New FFN & Fontable classes
as defined in java.lang.Long:
/**
* A constant holding the maximum value a <code>long</code> can
* have, 2<sup>63</sup>-1.
*/
public static final long MAX_VALUE = 0x7fffffffffffffffL;
you're trying to use a number larger than a long can contain! (don't
forget
the msb is the sign bit)
what u want is probably something like:
x = x | 0x8000000000000000L; // this is a bit-wise operator so sign
doesn't
matter
if this is what you're trying to get:
System.out.println(Long.toString(x >>> 63,2)); // prints '1'
Hope this helps!
Amichai
----- Original Message -----
From: "Ryan Ackley" <[EMAIL PROTECTED]>
To: "POI Developers List" <[EMAIL PROTECTED]>
Sent: Friday, July 04, 2003 9:18 PM
Subject: Re: New FFN & Fontable classes
> I need more details
>
> ----- Original Message -----
> From: "Praveen Mathew" <[EMAIL PROTECTED]>
> To: "POI Developers List" <[EMAIL PROTECTED]>
> Sent: Friday, July 04, 2003 7:19 AM
> Subject: Re: New FFN & Fontable classes
>
>
> > Hi ,
> >
> > I am unable to make the MSbit of a long in java like
> > long x = 0;
> > x = x | (long)Math.pow((long)2,(long)63);
> >
> > Isd there a way I can do this???
> >
> >
> >
> >
> > Thanks & Regards
> > Praveen
> >
> >
> >
> >
> >
> >
> > "Ryan Ackley" <[EMAIL PROTECTED]>
> > 04/07/2003 15:26
> > Please respond to "POI Developers List"
> >
> >
> > To: "POI Developers List" <[EMAIL PROTECTED]>
> > cc:
> > Subject: Re: New FFN & Fontable classes
> >
> >
> >
> > > Thanks Ryan for creating a Bugzilla acount for me. Does creating an
> > > attachement & submiting is all I have to do for sending new patches?
> > >
> > > still now I dont have a clear picture of whats happening with
> > > Bugzilla...what is this Bugzilla? & why does the patches sent are
> > > considered as BUGS!!
> >
> > They are not considered bugs. It simply gives a convenient way for you
to
> > upload attachments. You can't send attachments to the list and when
you
> > send
> > java code to the list, the line breaks get all messed up. When I try
to
> > copy
> > and paste from your last email, I get errors because my mail reader
has
> > wrapped some of the lines in the FontTable and Ffn classes.
> >
> > Ryan
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]