Re: TOTAL(): was Declaration of variables in IDL [message #26945 is a reply to message #26932] |
Wed, 03 October 2001 18:08  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
Wayne Landsman <landsman@mpb.gsfc.nasa.gov> writes:
> Craig Markwardt wrote:
>
>> The output of TOTAL is always a floating point type.
>
> Unless, of course, one supplies the /DOUBLE keyword to TOTAL()...
When I said "a floating point type" I meant a generic floating point
type, either float, double, complex, or double complex, as opposed to
an integer type. I think I am in hearty agreement with your wishes
for an integer-aware version of TOTAL().
Craig
> I mention this because at least a couple of times (e.g. when doing
> checksums) I have wished that TOTAL() also had a /L64 keyword. For
> example, according to MACHAR() on my Solaris machine, one loses
> precision with TOTAL() when totaling an integer array that sums to
> more than 2^53, but with a L64 output, one could sum up to 2^64-1
> without losing any precision.
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|