in reply to Large floating point literals

You're slightly wrong. The values you are seeing displayed are subject to rounding. The biggest is:

$double = 1.797693134862314e+308;

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^2: Large floating point literals
by ig (Vicar) on May 20, 2009 at 22:03 UTC

    Thanks!! I had, foolishly, not considered that the displayed base 10 might be rounded.

    Several literals slightly larger than 1.797693134862314e+308 are converted to non-infinite numbers, including two in the following test that are converted to what I believe is the largest possible value.

      Indeed. You are correct. I chose the wrong reference:

      printf "%.20g\n", unpack 'd', scalar reverse pack 'NN', 0x7fefffff, 0x +ffffffff;; 1.7976931348623157e+308 printf "%.20g\n", unpack 'd', scalar reverse pack 'NN', 0x7fffffff, 0x +ffffffff;; 1.#QNAN printf "%.20g\n", unpack 'd', scalar reverse pack 'NN', 0xffefffff, 0x +ffffffff;; -1.7976931348623157e+308 printf "%.20g\n", unpack 'd', scalar reverse pack 'NN', 0xffffffff, 0x +ffffffff;; -1.#QNAN

      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.