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

Home » Public Forums » archive » multiplication
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: multiplication [message #19600 is a reply to message #19427] Thu, 30 March 2000 00:00 Go to previous messageGo to previous message
Harald Frey is currently offline  Harald Frey
Messages: 41
Registered: March 1997
Member
"J.D. Smith" wrote:

>
> Loop Method:
>
> % Loop limit expression too large for loop variable type.
> <LONG ( 99999)>.
>
> Log Method:
>
> Average Time: 0.050116260
> 7.92382e+10
>
>
> Morals: IDL loops are pitifully slow, and you can't loop over very large arrays
> without trickery, and for many operations, compiled C is *significantly* faster.
>
> --
> J.D. Smith |*| WORK: (607) 255-5842
> Cornell University Dept. of Astronomy |*| (607) 255-6263
> 304 Space Sciences Bldg. |*| FAX: (607) 255-5875
> Ithaca, NY 14853 |*|

You can ideed loop over very large arrays. But I think what you tried to do was something
like

for i=0,1000000l do j=i

% Loop limit expression too large for loop variable type.
<LONG ( 1000000)>.
% Execution halted at: $MAIN$

But if you change your code slightly you get a good result:

for i=0l,1000000l do j=i

Harald

=========================================================
Harald U. Frey
Space Sciences Lab phone: 510-643-3323
University of California fax: 510-643-2624
Berkeley, CA 94720-7450 email: hfrey@ssl.berkeley.edu
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Polygon Problems
Next Topic: Zooming and panning in plots

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

Current Time: Mon Dec 01 04:43:13 PST 2025

Total time taken to generate the page: 2.72799 seconds