Re: RfD: Ambiguity in FATAN2



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

.



Relevant Pages

  • Re: Newbie question about double precision
    ... > equal to zero. ... In Fortran, KINDs are ... and that was duly noted in the new standard and the books ... would specify all variables and constants in a given scoping unit to be of a ...
    (comp.lang.fortran)
  • Re: Division by zero
    ... an item and a directional association ... specify how many times one item is included in or excluded from another ... sign&count, count is 1, 2, etc, but not zero. ... numbers beyond what is written in the referenced papers, ...
    (comp.theory)
  • Re: 0 ALLOCATE
    ... should take so it became a defacto "ambiguous condition". ... When there was general agreement as to what the correct response should be, ... When agreement could not be achieved (e.g. because there were inconsistent responses in existing code, or conflicting needs such as the need to avoid the overhead of checking for divide by zero in time-critical apps, or other reasons) we got "ambiguous conditions". ... has to specify what it means and what happens. ...
    (comp.lang.forth)
  • Re: Question about ALTER TABLE and ALTER COLUMN
    ... but I would like to further specify that the column be ... an integer with a default value of zero. ... syntax for a VBA statement to do what I want to do? ... ALTER COLUMN but I don't know the proper syntax. ...
    (microsoft.public.access.modulesdaovba)
  • Re: How to make Thread1 executed before Thread2 ?
    ... nano-seconds to run an unnecessary cpu cycle? ... "The number of milliseconds for which the thread is blocked. ... Specify ... zero to indicate that this thread should be suspended to allow ...
    (microsoft.public.dotnet.languages.vb)