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

Home » Public Forums » archive » Re: TOTAL gives totally different result on identical array
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: TOTAL gives totally different result on identical array [message #76885] Fri, 08 July 2011 12:10 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 7/8/11 12:48 PM, Liam Gumley wrote:
> If you just want to compute the total over all dimensions of an array,
> you could use it as a drop in replacement for TOTAL. However it would
> take a bit more work to support all the optional keywords accepted by
> TOTAL.

Certainly no drop in replacement for TOTAL, but a DLM implementation of
the Kahan summation:

http://michaelgalloy.com/2011/07/08/dlm-implementing-kahan-s ummation.html

It doesn't implement the keywords of TOTAL, but it does support all
numeric IDL types, i.e., in the manner of /PRESERVE_TYPE. It also shows
how you can use C macros to implement an algorithm for multiple data
types (ugly, but better than copying code).

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL, A Guide to Learning IDL: http://modernidl.idldev.com
Research Mathematician
Tech-X Corporation
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Variable is undefined: Actually a function
Next Topic: Weighted correlation

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

Current Time: Fri Oct 10 04:40:43 PDT 2025

Total time taken to generate the page: 0.08562 seconds