Re: Data Type question / Sort

From: Tom Ogilvy (twogilvy_at_msn.com)
Date: 08/12/04


Date: Thu, 12 Aug 2004 16:00:19 -0400

A long can store numbers in this range: 2,147,483,648 to 2,147,483,647

A double can store numbers in this range: -1.79769313486231E308
to -4.94065645841247E-324 for negative values and from 4.94065645841247E-324
to 1.79769313486232E308 for positive values. But only approximately 15
significant digits.

-- 
Regards,
Tom Ogilvy
"Marston" <marston_gould@mac.com> wrote in message
news:4a0545c6.0408111645.2689633@posting.google.com...
> Hi
>
> I'm trying to prep some values for a multi-column sort in an array.
> The array contains something like 300,000 by 10 values
> I've seen quick sort routines that can sort on a single value, but not
> perform sorts within the initial sort.
>
> My idea was to concatenate all my values into a single value and then
> sort on it. The problem I'm facing is that my numbers would have to be
> on the order of ~10E+18-1 long
>
> The way the routine works is it looks at the numbers in each column
> whose length is fixed and never has a situation where there are
> leading zeros to cause problems.
>
>        Col 1   Col 2  Col 3 Col 4   Col 5 Col 6
> Row x: aaa     bbb    cc    ddddd   e     fff
>
> I only need to arrange based on these 6 columns not the entire 10 in
> the array
>
> My problem is when I create a number like aaabbbccdddddefff it appears
> to have
> problems with the "efff" portion. I checked each individual component
> (which I'm multiplying by some 1nnnn where n is some number of zeros -
> and they all work fine, its just once I tried to add things. Its like
> it drops values off.
> I have the variables defined as Double which I thought would work.
>
> Any thoughts?


Relevant Pages

  • [8FOLD] Template #3
    ... "You lead a very eventful life, don't you, Mr. Kidman?" ... lunatics collapsing in the middle of your store... ... threats have some sort of motivation behind them. ...
    (rec.arts.comics.creative)
  • Re: Rexxtacy
    ... I'd store the lines in an auxiliary area and never move them. ... Then I'd store and array of pointers contiguously and sort those. ... The Rexx-version uses the simplest bubble sort. ... CALL LineOut target,LineIn ...
    (comp.os.os2.programmer.misc)
  • Re: Bad feelings in Wickes
    ... to sort it out. ... insisted that I should approach the exit without the carrier bag, ... test if the machine would beep. ... A few years My brother and I went into a Wicks Store and bought a large ...
    (uk.legal)
  • C 128s ROM socket
    ... sort of a new topic, so I didn't reply to that. ... I've thought about that ROM socket in the C128 a lot and have on occasion ... So I'm hoping to use something on the IEC port to store more ... up trying to read/write to a serial flash ram chip via the user port.. ...
    (comp.sys.cbm)
  • Re: opendir()
    ... as a recursive function. ... I cant simply sort them cos they are not stored using array and if I ... another question here: this by using File::Find can I store the result ...
    (perl.beginners)