in reply to Highest scalar = ???

On a system that uses IEEE 64-bit doubles:

The maximum real a scalar can hold is 1.797693134862314e308

The maximum integer a scalar can hold (accurately) is 9007199254740992


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: Highest scalar = ???
by ikegami (Patriarch) on Oct 01, 2007 at 16:29 UTC

    And (on a Perl using 32-bit ints),
    For the operations requiring an integer: 4294967295 (e.g. bitwise ops)
    For the operations requiring a signed integer: 2147483647 (e.g. for (a .. b))

Re^2: Highest scalar = ???
by halley (Prior) on Oct 01, 2007 at 16:30 UTC
    Just to be clear for the Anonymous Monk, a loop that keeps adding a constant to an integer does NOT roll around to turn negative. It merely turns the whole long integer to a real number, and adds the constant to that. A very small constant (like 1) will generally not even advance the real value, so such a loop will go forever.
    # will not work! $i = 1; while ($i > 0) { $i++ }
    Also see Equality checking - Comparing floats.

    --
    [ e d @ h a l l e y . c c ]