Previous Page Next Page Contents

Pref::floatFormat -- representation of floating point numbers

Introduction

Pref::floatFormat controls the representation of floating point numbers.

Call(s)

Pref::floatFormat( <modus>)

Parameters

modus - the kind of representation as character "e", "f", "g" or "h", or NIL

Returns

the previously defined representation

Related Functions

DIGITS, Pref::trailingZeroes, print

Details

Example 1

The default display:

>> Pref::floatFormat(NIL):
   12345.67890, 0.00012345
                          12345.6789, 0.00012345

The exponential representation:

>> Pref::floatFormat("e"):
   12345.67890, 0.00012345
                          1.23456789e4, 1.2345e-4

The mixed representation:

>> Pref::floatFormat("g"):
   12345.67890, 0.00000000012345
                       12345.6789, 0.00000000012345

Hexadecimal display:

>> Pref::floatFormat("h"):
   12345.67890, 0.00012345
      0x0.CE6B7318FC50481*2^(0x00000E),
      
         0x0.81725B672EE3425A*2^(-0x00000C)

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000