Forum Discussion

FICO's avatar
FICO
Community Manager
16 years ago

Changing Display format for a real.

Changing Display format for a real.

We have an issue where if the value of the real has four decimal places, the value is stored in exponential notation instead of standard decimal format.  Various applications that call our service cannot handle this format.

For instance,  0.0009 is being stored in the real as:  9.0E-4.

Is there a way to change the value of reals from Exponential Notation to decimal formats? 

3 Replies

  • FICO's avatar
    FICO
    Community Manager

    Where exactly it is stored in exponential format?

  • FICO's avatar
    FICO
    Community Manager

    In any variable defined as a 'real'.

  • FICO's avatar
    FICO
    Community Manager

    Blaze real values are stored as double in the underlying language (Java or .NET) and use IEEE 754 floating point format - an exponential number. For display purposes you could format them differently for other applications that call Blaze, depending on the integration mechanism. That's why I asked where exactly you see exponential representation.

    Alternatively, you could use Blaze "money" datatype (represented by BigDecimal number) and ignore the currency part, or just import BigDecimal type into Blaze and use it instead of real for certain properties in your object model.