Re: RfD: Ambiguity in FATAN2
- From: "C. G. Montgomery" <cgm@xxxxxxxxxxxxxxxxxxx>
- Date: Thu, 26 Mar 2009 10:06:12 -0400
David N. Williams williams@xxxxxxxxx wrote:
Ed wrote:
> (...)
> The definition of FATAN2 would specify the required behaviours
> for systems with and without negative zero. As an example, refer
> to the ATAN2 definition in the Fortran 2003 final draft.
> http://www.dkuug.dk/jtc1/sc22/open/n3661.pdf
I find the language of this document on requirements with and
without signed zero pretty good. Thanks for the link!
As I read it, the Fortran document forbids having both ATAN2
arguments be zero, whether signed or not. Whereas Single UNIX
specifies the outcome for all four of the signed possibilities,
which I find more logical.
I see Fortran doesn't specify the behavior of FATAN2 for NaN,
at least I couldn't find it. For Single UNIX 3, that's an
optional specification, but it's there.
The Fortran Standards group tends to feel that some aspects of the IEEE
standards are inconsistent with Fortran's view of "internal
representations" of some quantities. They make specific accommodations
in some cases, but decline to follow those specs in the whole.
For Forth, the goal of working in a very wide range of hardware with a
minimum of restrictions may argue against specifications of numerical
results that are very detailed.
(...)
> Since the topic of float constant PI has cropped up, perhaps now
> is the time to standardize it.
Indeed. And I wonder if there shouldn't be some kind of
statement about the representation of mathematical constants in
general. Something to the effect that any such constant
supplied by the system must be exactly rounded according to the
number of significand bits in the default float and the default
rounding mode.
Maybe there should be a thread about pi, etc.?
There are a number of floating point issues that maybe deserve
threads -- we all know it's intrinsically complicated...
I have no doubt there are a number of worms in those cans, too. ;-)
cheers cgm
.
- References:
- RfD: Ambiguity in FATAN2
- From: C. G. Montgomery
- Re: RfD: Ambiguity in FATAN2
- From: Anton Ertl
- Re: RfD: Ambiguity in FATAN2
- From: David N. Williams
- Re: RfD: Ambiguity in FATAN2
- From: C. G. Montgomery
- Re: RfD: Ambiguity in FATAN2
- From: Anton Ertl
- Re: RfD: Ambiguity in FATAN2
- From: C. G. Montgomery
- Re: RfD: Ambiguity in FATAN2
- From: Ed
- Re: RfD: Ambiguity in FATAN2
- From: David N. Williams
- RfD: Ambiguity in FATAN2
- Prev by Date: Should not be Forth a part of Cyberpunk equipment?
- Next by Date: Re: RfD -- FVALUE vsn 2.0
- Previous by thread: Re: RfD: Ambiguity in FATAN2
- Next by thread: How to make Forth interesting?
- Index(es):
Relevant Pages
|