• Aido@lemmy.world
    link
    fedilink
    English
    arrow-up
    34
    ·
    1 day ago

    FYI OP, Discord breaks external image links after a pretty short period.

    For future generations:

            • wewbull@feddit.uk
              link
              fedilink
              English
              arrow-up
              2
              ·
              edit-2
              17 hours ago

              1 is always 1. It’s 1 × b⁰ where b is the base. Anything raised to the zeroth power is 1.

              10 is the base. 1 × b¹ + 0 × b⁰

            • mexicancartel@lemmy.dbzer0.com
              link
              fedilink
              English
              arrow-up
              3
              ·
              edit-2
              1 day ago

              That doesn’t make it rational but simply makes it writable in 2 digits(10)

              Also you should have 3.1415… “number of characters” in that base… The base becoming irrational will make the number irrational

            • Gobbel2000@programming.dev
              link
              fedilink
              English
              arrow-up
              6
              ·
              1 day ago

              Writing the same number a different way does not make it rational. There are no two natural numbers p and q so that p/q = 1 base pi.

            • very_well_lost@lemmy.world
              link
              fedilink
              English
              arrow-up
              5
              ·
              1 day ago

              Even in base π, π is still considered an irrational number; using an irrational based doesn’t change the fundamental identity of whole numbers or irrational numbers, it just changes the way we write them.

        • Kinda. Technicaly no since an irrational number is a number that cannot be defined as a ratio of 2 existing rational numbers. Any number that can be represented in any rational base can by definition be represented as a ratio of somthing/base^n. This ignore the case of an irrational base but its practically useless cos any rational and most other irrational numbers will be irrational.

          What u think ur trying to say is that some numbers cannot be represented in one base but can in another for example 1/3 can be represented as a decimal in base 3 but cannot jn base 10 ie u get 0.333(3 repeating forever).

          Tieing back to floating point which uses base 2 u end up with simmillar issues with base10 base2 conversions hence most of the errors with floating point errors (yes at very large and very small numbers u lose accuracy but in practice most errors arise from base convention).

  • Ragdoll X@lemmy.worldOP
    link
    fedilink
    English
    arrow-up
    39
    arrow-down
    1
    ·
    edit-2
    1 day ago

    For those who are curious, that’s the IEEE 754 representation of the number 300.

      • Silverchase@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        12
        ·
        edit-2
        1 day ago

        Each section of the binary number represents a different component needed to construct the number 300. It uses clever math to be able to represent decimals. It’s like asking you whether a number is positive or negative, then the position of the decimal point, then what the digits are.

        Specifically…

        The first 0 means the number is positive. The number formed by the next eight bits (the exponent) and the number from the remaining bits (the mantissa) multiply to get 300.

        The exponent bits choose the value of N in the formula 2N-127 . For the mantissa, we start with the number 1, then each “1” bit starting from the left adds to it 0.5, then 0.25, and so on. Specifically, we have 28×1.171875.

  • frezik@midwest.social
    link
    fedilink
    English
    arrow-up
    10
    ·
    1 day ago

    Have had too many debates with senior programmers who don’t understand why multiplying by 0.1 doesn’t work.

    “It works in <favorite language>, why doesn’t it work in <not favorite language>?”