John, all

>Has IBM established a standard in any of the various high-level languages 
>for the representation of the various floating-point formats and 
>precisions?
>I am specifically looking at both fixed-point and scientific notation.
>  John P. Baker

Here are some references and summary info I've collected:

Standard Scientific Notation:
  General description and references:
    http://en.wikipedia.org/wiki/Scientific_notation
  IBM Hursley generalized description of scientific notation conversion:
    http://www2.hursley.ibm.com/decimal/daconvs.html#reftonum
  Arithmetic Model:
    http://www2.hursley.ibm.com/decimal/damodel.html

Note this model is based on IEEE 854, ANSI X3-274 standards.  
Unfortunately these standards are only available in published form for a 
fee.  (Commentary:  It would be a tremendous service to the world if a  
non-profit organization could be started to move all standards 
publications to the public domain to help promote understanding and use of 
non-proprietary standards.  Charging for them makes them all proprietary!)

So in summary the standard form would appear to be:

  1.  Sign (+optional)

  2.  Mantissa (decimal digits with optional period up to maximum 
significant digits for binary format)

  3.  Exponent (optional)
     a.  E (E or e optional if sign included)
     b.  Sign (+optional if E or e)
     c.  Power of ten (exponent digits with no decimal up to maximum 
exponent) 

The maximum limits for each IBM fixed and floating point HFP, BFP, and DFP 
format can be found in the latest Principles of Operations Manual here:

http://publibfp.boulder.ibm.com/epubs/pdf/dz9zr006.pdf

In summary the significant decimal digits and base 10 exponents are as 
follows:

        Summary of IBM Fixed and Floating Point Scientific Notation Limits
        Type of number  32 bit  64 bit  128 bit
                                
        Fixed Point Integers                    
            Significant digits  10      19      39

        HFP Hexadecimal FP                      
            Significant digits  7       15      34
           Maximum exponent     75      75      75
                                
                                
        BFP Binary IEEE 754 FP                  
            Significant digits  7       16      34
           Maximum exponent     38      308     4932
                                
        DFP Decimal IEEE 754r FP                        
            Significant digits  7       16      34
            Maximum exponent    96      384     6144

All of these formats are supported by z390 on Windows and Linux with CTD 
and CFD conversion routine macros and supervisor calls for converting 
between EBCDIC/ASCII character scientific notation and any of the above 
binary formats.  All corrections and comments welcome.

Don Higgins
[EMAIL PROTECTED]
www.z390.org

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to