Re: Integer Coersion



On 2007-02-07 12:06:55 -0400, "PJH" <abc@xxxxxxxxxxx> said:


Gordon Sande wrote
On 2007-02-07 09:38:24 -0400, mecej4 <mecej4@xxxxxxxxxxxxx> said:


It has been repeatedly observed in the past that byte size is not a unique
specification of a floating point format. There can be an exchange between
the lengths of the exponent and significand fields.

There have been major vendors with popular computers lines for which this
was true. Consider the various VAXen.

I think this is confusing a number of separate (but related) issues, none of
which are covered much by the standard.

1) Storage bit length for a type kind
2) Bits per storage byte
3) Data representation within the bitfield of a type kind

Fortran type kind parameters will not guarantee any of these and it is very
difficult at runtime to check what these values actually are - hence all the
messing around with the Transfer function to maybe, if you are lucky, find
out how many bits there are in a non-default floating point type kind. The
only useful standard function we have is bit_size, which only works on
integers.

It is difficult to believe that in 2007 we are still messing around in the
dark like this. All we need are a few simple, standard intrinsic inquiry
functions (or modules) to either tell us what is going on in the compiler or
to tell us that the compiler is in a little world of its own where the
question doesn't make any sense.

Paul Holden

The bundle of related isuues is confused because the situation is not simple.
It is worth pointing out to those who advocate byte size that it does not
even address the simplest of the complicatons, namely floating point formats.
That assumes that those advocates would listen when all the evidence is to
the contrary.

Being able to pose a question is no guarantee that an answer exists. How is
a "portable" code supposed to proceed when the intrinsic response is that there
is no such solution?



.



Relevant Pages

  • Re: Integer Coersion
    ... which are covered much by the standard. ... Data representation within the bitfield of a type kind ... out how many bits there are in a non-default floating point type kind. ... to tell us that the compiler is in a little world of its own where the ...
    (comp.lang.fortran)
  • Re: Integer Coersion
    ... specification of a floating point format. ... which are covered much by the standard. ... out how many bits there are in a non-default floating point type kind. ... It is worth pointing out to those who advocate byte size that it does not ...
    (comp.lang.fortran)
  • Re: Range and precision of floating-point numbers
    ... values of operations with floating operands and values subject to the ... to a format whose range and precision may be greater than required by ... this is required by the standard. ...
    (comp.std.c)
  • Re: short float ???
    ... already in the proposed revision to the IEEE 754 standard. ... a format for something does not mean that the format deserves ... I doubt that the IEEE 754 standard covers only one platform. ... So, in my opinion, the existence of the standard for a small floating point type is an argument in favour of there being a type in C that can be mapped on to it. ...
    (comp.std.c)
  • Re: Sine code for ANSI C
    ... >> shell script) fully conforming. ... limits mentioned in the standard. ... adding a few more translation limits. ... minimal accuracy requirements for the floating point operations. ...
    (comp.lang.c)