Re: What's wrong with long long?

From: Andrey Tarasevich (andreytarasevich_at_hotmail.com)
Date: 06/16/04


Date: Wed, 16 Jun 2004 10:54:16 -0700

Malcolm wrote:
>> ...
>> Why is long long not used so much?
>>
> A number must ultimately represent something in the real world. You seldom
> need a number above 4 billion, which is about the number of adults in the
> world. An exception is memory size, which can exceed 4GB on large systems
> and may soon be around that on desktop PCs, but in C we use size_t for
> amounts of memory.

Sometimes calculating a value from the "real world" requires a [short]
trip into the realm of "unreal". For example, calculating the Euclidean
distance between two point with "read world"s 'unsigned long'
coordinates might easily involve values that extend beyond 'unsigned
long' range.

-- 
Best regards,
Andrey Tarasevich


Relevant Pages

  • Re: traumatized by pointer casting
    ... >The underlying hardware reads memory in chunks. ... >Since efficency is very important to C programmers, usually compilers ... Thank you for your enlightening article Malcolm. ...
    (comp.lang.c)
  • Re: External Mail - Your message did not reach ...
    ... DNS ... Malcolm ... > Right click on the Smallbusiness SMTP COnnector and then ... > "The days pass by so quickly now, the nights are seldom ...
    (microsoft.public.windows.server.sbs)
  • Re: External Mail - Your message did not reach ...
    ... Kevin Weilbacher [SBS-MVP] ... "The days pass by so quickly now, the nights are seldom long" ... "Malcolm " wrote in message ...
    (microsoft.public.windows.server.sbs)
  • Re: Upgrading memory in DS20E
    ... "Malcolm Dunnett" wrote in message ... >> the system down and doing a show memory from the SRM console. ... >> there is know way to tell the configuration from a running system. ... > auction on Ebay with a current price of $295. ...
    (comp.os.vms)
  • Re: Memory stick v floppy drive?
    ... > not produce bootable CD nor memory stick. ... >> Floppy drives are very seldom used these days, ... You need them very seldom (I can't remember the last time ... then buy and install one myself. ...
    (microsoft.public.windowsxp.basics)