Skip to main content
Inspiring
August 27, 2010
Question

CF8 max decimal number?

  • August 27, 2010
  • 2 replies
  • 1090 views

Hi All,

What is the max decimal numbers in CF8?

Tks

Johnny

    This topic has been closed for replies.

    2 replies

    Participating Frequently
    August 27, 2010

    Note that there is a precisionEvaluate function that internally uses BigDecimal.

    jfb00Author
    Inspiring
    August 27, 2010

    Maybe that's why my 15 digit long decimal is cutting to 12?

    Thanks for you reply.

    Johnny

    BKBK
    Community Expert
    Community Expert
    August 27, 2010

    jfb00 wrote:

    Maybe that's why my 15 digit long decimal is cutting to 12?

    Just 12? Is your 15 digit decimal perhaps being truncated by some other process? Restriction by a function or by the display field? Database field length?  the following displays 20 decimals (in CF9.0.1 at least):

    <cfset x = 0.12345678901234567890>
    <cfoutput>#x#</cfoutput>

    Inspiring
    August 27, 2010

    CF uses java.lang.Doubles for its floating point numbers:

    http://download.oracle.com/javase/6/docs/api/java/lang/Double.html

    --

    Adam

    jfb00Author
    Inspiring
    August 27, 2010

    Thanks for you reply and help Adam.

    Rgds

    Johnny