What do routines such as maxval, minval, product, all return when
a mask is used and all elements of the mask evaluate as false.
G
|
|
0
|
|
|
|
Reply
|
genew1 (5)
|
5/10/2004 4:57:47 PM |
|
On Mon, 10 May 2004 09:57:47 -0700, Gene Wagenbreth <genew@isi.edu> wrote:
>What do routines such as maxval, minval, product, all return when
>a mask is used and all elements of the mask evaluate as false.
The standard sez (foir MAXVAL)... "the value of the negative number of the
largest magnitude supported by the processor for numbers of the type and kind
parameter of ARRAY..."
For MINVAL, it's the positive number of largest magnitude. For PRODUCT,
"one".
Steve Lionel
Software Products Division
Intel Corporation
Nashua, NH
User communities for Intel Software Development Products
http://softwareforums.intel.com/
Intel Fortran Support
http://developer.intel.com/software/products/support/
|
|
0
|
|
|
|
Reply
|
Steve.Lionel (766)
|
5/10/2004 5:47:07 PM
|
|
Gene Wagenbreth <genew@isi.edu> writes:
> What do routines such as maxval, minval, product, all return when
> a mask is used and all elements of the mask evaluate as false.
All these cases should be documented in any Fortran text. In general,
they return a "reasonable" extrapolation to the zero-size condition,
but the extrapolation is different for different cases. For example,
product is different from maxval/minval. Thus, although I can give
you the specific answers for those 3, I can't answer the "such as"
part of your question in other than the above very general terms. Do
note that having all elements of the mask be zero is just like having
a zero-sized array with no mask - that might help your intuition about
what the "reasonable" extrapolation is likely to be. I do recommend a
textbook for things like this (any textbook).
For those 3 cases:
Maxval returns the largest magnitude negative number and minval
returns the largest positive number that the processor supports for
that kind. The exact definition of "largest" is the subject of a
current interp. In particular, no it doesn't have to equal HUGE(x);
this question involves a fine point of distinction between "model
numbers" and processor-supported values. Also, it may be an
infinity on processors that support such (but if the processor is
going to return an infinity, one would hope that it defaults to
IEEE nonstop mode).
The "obvious" mathematical extrapolation of product to zero size is 1,
which is what you get.
--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain | experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
|
|
0
|
|
|
|
Reply
|
nospam47 (9742)
|
5/10/2004 5:58:07 PM
|
|
"Richard Maine" <nospam@see.signature> wrote in message
news:m1r7tsrwpc.fsf@macfortran.local...
> All these cases should be documented in any Fortran text. In general,
> they return a "reasonable" extrapolation to the zero-size condition,
> but the extrapolation is different for different cases. For example,
> product is different from maxval/minval. Thus, although I can give
> you the specific answers for those 3, I can't answer the "such as"
> part of your question in other than the above very general terms. Do
> note that having all elements of the mask be zero is just like having
> a zero-sized array with no mask - that might help your intuition about
> what the "reasonable" extrapolation is likely to be. I do recommend a
> textbook for things like this (any textbook).
The "such as" doesn't seem like such a long list:
SUM: Zero
COUNT: 0
ANY: .FALSE.
ALL: .TRUE.
MAXLOC & MINLOC: A processor-dependent result in F95; zero
is broadcast into the result in F03 -- thanks again for
making this change.
--
write(*,*) transfer((/17.392111325966148d0,6.5794487871554595D-85, &
6.0134700243160014d-154/),(/'x'/)); end
|
|
0
|
|
|
|
Reply
|
not_valid (1681)
|
5/11/2004 1:16:49 AM
|
|
|
3 Replies
37 Views
(page loaded in 0.05 seconds)
Similiar Articles: DCPS v2.7 problem with HP P2055dn printer - comp.os.vms... DCPS with HP printers (4000, 2300, 2420, 8150, etc ... code to the printer to print the value of Product Name ... Entering the IP address and subnet mask from the ... overlapping circles - find the form-faktor - comp.soft-sys.matlab ...... round objects" http://www.mathworks.com/products ... Iblobs3 = false(size(M,1),size(M,2),max(Ilabel ... what you were doing to acquire the binary mask. (threshold, imfill etc.) Histograms — opencv v2.1 documentation - Willow Garage... arrays[0].channels() to arrays[0].channels() + arrays[1].channels()-1 etc. mask ... not use mask hist, 2, histSize, ranges, true, // the histogram is uniform false); double maxVal = 0; ... Intrinsic functions in Fortran 90 - National Supercomputer Centre ...MAXVAL(ARRAY, dim, mask) returns the largest value in ... PRODUCT(ARRAY, dim, mask) returns the product of all the elements ... and FSOURCE if the condition in MASK is .FALSE. ... 7/17/2012 7:37:32 PM
|