Re: Fortranspeak & Javaspeak



David.Paterson@xxxxxxxx wrote:
Thanks all of you.

integer*2 = short
integer*4 = int
integer*8 = long

Well, even more than that, Java guarantees 16, 32, and 64 bit
signed twos-complement values. The *2, *4, and *8 are commonly used
for 16, 32, and 64 bit values, but Fortran makes no guarantee of that.

Fortran also doesn't guarantee twos complement or even base 2, though
both are fairly popular.

Java guarantees IEEE standard representation for floating point, too.
Java doesn't allow one to see the internal representation to determine
endianness. There are ways to get values out as a binary representation
with a known endianness.

-- glen

.



Relevant Pages

  • Re: half full, half empty is really more like 1056964608 to 8388608
    ... How do I use fortran to show me the bit representation of my ... EQUIVALENCE ... Intermediate values obtained while calculating a floating-point word ...
    (comp.lang.fortran)
  • Re: Precision of literal real constants, parameters, and Fortran ?standard
    ... < platform claims standard IEEE representation of 32 and 64 bit reals. ... Fortran doesn't guaranteed them even within ... It is widely recognized that floating point varies between systems. ... IEEE has become popular enough that you can almost count on it. ...
    (comp.lang.fortran)
  • Re: GMP vs. straight C arithmetic
    ... >From: Thad Smith thadsmith@acm.org ... >pick the best representation for the specific target. ... You might want to take a look at how Fortran handles this. ... tomorrow that uses 64 bits for it's single precision tommorow... ...
    (comp.programming)
  • Re: DNUM and JNUM fonctions
    ... > I'm migrating a fortran 77 module from HP3000 server. ... Two fonctions (DNUM and JNUM) are used in this module. ... it's simply a routine that scans a character representation of a numeric ...
    (comp.lang.fortran)
  • Re: BASIC REAL EXPONENT QUESTION
    ... > then why does the FORTRAN maxexponent and minexponent functions ... I think you are confusing the machine representation with Fortran's ... The standard minexponent/maxexponent intrinsics relate to the ...
    (comp.lang.fortran)