comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: unsigned long long and min/max operator
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: unsigned long long and min/max operator [message #59248] Thu, 13 March 2008 13:03
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
R.G. Stockwell writes:

> They probably figured no one would notice.
> I mean, come on, who needs a number that large?

I was trying to write a number like that for the
hard drive spec sheet I was writing for the next
computer I want to buy. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: unsigned long long and min/max operator [message #59249 is a reply to message #59248] Thu, 13 March 2008 12:22 Go to previous message
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
"Jean H" <jghasban@DELTHIS.ucalgary.ANDTHIS.ca> wrote in message
news:frbiev$mql$1@news.ucalgary.ca...
>> I must have OCD or something, but here is where it fails.
>>
>> IDL> print, 1ull > 9223372036854775807ull
>> 9223372036854775807
>> IDL> print, 1ull > 9223372036854775808ull
>> 1
>>
>>
>> 9223372036854775808 is 2^63
>> OS STRING 'Win32'
>
> ... that is also the maximum long 64 value + 1 (= -9223372036854775808)
> ... as if IDL would not make a difference between LL and ULL...


They probably figured no one would notice.
I mean, come on, who needs a number that large?
:)
Re: unsigned long long and min/max operator [message #59255 is a reply to message #59249] Thu, 13 March 2008 08:49 Go to previous message
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
> I must have OCD or something, but here is where it fails.
>
> IDL> print, 1ull > 9223372036854775807ull
> 9223372036854775807
> IDL> print, 1ull > 9223372036854775808ull
> 1
>
>
> 9223372036854775808 is 2^63
> OS STRING 'Win32'

... that is also the maximum long 64 value + 1 (= -9223372036854775808)
... as if IDL would not make a difference between LL and ULL...

Jean
Re: unsigned long long and min/max operator [message #59261 is a reply to message #59255] Wed, 12 March 2008 17:21 Go to previous message
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
"F�LDY Lajos" <foldy@rmki.kfki.hu> wrote in message
news:Pine.LNX.4.64.0803122110040.851@bifur.rmki.kfki.hu...
> Hi guys,
>
> IDL Version 7.0 (linux x86_64 m64):
>
> IDL> print, 1ull < 18446744073709551615ull ; minimum
> 18446744073709551615
> IDL>
> IDL> print, 1ull > 18446744073709551615ull ; maximum
> 1
>
> Ouch!
>
> regards,
> lajos

I must have OCD or something, but here is where it fails.

IDL> print, 1ull > 9223372036854775807ull
9223372036854775807
IDL> print, 1ull > 9223372036854775808ull
1


9223372036854775808 is 2^63


IDL> help,!version,/st
** Structure !VERSION, 8 tags, length=76, data length=76:
ARCH STRING 'x86'
OS STRING 'Win32'
OS_FAMILY STRING 'Windows'
OS_NAME STRING 'Microsoft Windows'
RELEASE STRING '6.3'
BUILD_DATE STRING 'Mar 23 2006'
MEMORY_BITS INT 32
FILE_OFFSET_BITS
INT 64
Re: unsigned long long and min/max operator [message #59263 is a reply to message #59261] Wed, 12 March 2008 14:13 Go to previous message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On Mar 12, 3:25 pm, FÖLDY Lajos <fo...@rmki.kfki.hu> wrote:
> Hi guys,
>
> IDL Version 7.0 (linux x86_64 m64):
>
> IDL> print, 1ull < 18446744073709551615ull ; minimum
> 18446744073709551615
> IDL>
> IDL> print, 1ull > 18446744073709551615ull ; maximum
> 1
>
> Ouch!
>
> regards,
> lajos

FWIW - Same results in IDL 6.3 (Solaris)
Re: unsigned long long and min/max operator [message #59264 is a reply to message #59263] Wed, 12 March 2008 13:34 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
=?ISO-8859-2?Q?F=D6LDY_Lajos?= writes:

> IDL Version 7.0 (linux x86_64 m64):
>
> IDL> print, 1ull < 18446744073709551615ull ; minimum
> 18446744073709551615
> IDL>
> IDL> print, 1ull > 18446744073709551615ull ; maximum
> 1
>
> Ouch!

At least there is an easy work-around: just stand on
your head! :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Jpeg in a .sav file
Next Topic: Re: Jpeg in a .sav file

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 02:18:47 PDT 2025

Total time taken to generate the page: 1.51987 seconds