(j3.2006) What does this mean?
Mon Oct 31 17:32:43 EDT 2011
On 10/31/11 3:10 PM, Van Snyder wrote:
> Does the following
> [13.7.1p2] "A program is prohibited from invoking an intrinsic procedure
> under circumstances where a value to be returned... is outside the range
> of values representable by objects of the specified type and type
> mean "not greater than the most positive value and not less than the
> most negative value," or "not a member of the set of valid values," as
> specified by
For integer results, the first option seems reasonable. For reals
results, I would exclude the values in the interval (-tiny, tiny),
except for zero. Ultimately, this rule is to disallow expressions like
EXP(big_num). The processor has to be given a reasonable chance to
represent the result.
> [4.1.2p1] "For each type, there is a set of valid values.... The sets
> of valid values for... real are processor dependent."
Is this materially different? The square root of 2 is likely not one of
these "valid values", but the SQRT function returns an "approximation"
so it can hit one of the valid values and be reasonably close to correct.
If you consider Infinity to be in the set of valid values, it is a bit
less clear (for either case).
> [4.2p1] "A type might be parameterized. In this case, the set of
> values... depend[s] on the values of the parameters."
> J3 mailing list
> J3 at j3-fortran.org
Bill Long longb at cray.com
Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc./Cray Plaza, Suite 210/380 Jackson St./St. Paul, MN 55101
More information about the J3