Options

Have you ever noticed the gold cap ?

MiniMFMiniMF Member Posts: 848 ★★★★

Comments

  • PikoluPikolu Member, Guardian Posts: 8,796 Guardian
    Yes
  • AxewAxew Member Posts: 619 ★★★★
    It’s the maximum value for a 54-bit twos complement integer.

    Weird number of bits but ok.
  • AxewAxew Member Posts: 619 ★★★★
    edited November 2022
    Ackbar67 said:

    Axew said:

    It’s the maximum value for a 54-bit twos complement integer.

    Weird number of bits but ok.

    It's actually the maximum number achievable while maintaining integer precision in the standard IEEE 754 double precision floating point encoding:

    1 sign bit, 11 exponent bits, 53 mantissa bits.

    So at a low level gold is likely stored as a double precision floating point number with a fixed exponent of 0, though there probably is a higher level data type that implements that behind the scenes

    For another example open up your browser's console and run console.log(Number.MAX_SAFE_INTEGER) to see a familiar value
    This is an awesome comment, thanks for the insight! I never thought I would learn about integer/FP representation through mcoc.
Sign In or Register to comment.