This article says that NASA uses 15 digits after the decimal point, which I’m counting as 16 in total, since that’s how we count significant digits in scientific notation. If you round pi to 3, that’s one significant digit, and if you round it to 1, that’s zero digits.

I know that 22/7 is an extremely good approximation for pi, since it’s written with 3 digits, but is accurate to almost 4 digits. Another good one is √10, which is accurate to a little over 2 digits.

I’ve heard that ‘field engineers’ used to use these approximations to save time when doing math by hand. But what field, exactly? Can anyone give examples of fields that use fewer than 16 digits? In the spirit of something like xkcd: Purity, could you rank different sciences by how many digits of pi they require?

  • Ephera
    link
    fedilink
    arrow-up
    13
    ·
    9 months ago

    As a computer scientist, same, but it’s called PI.

    It’s the computer that does the thing with the digits, not me. 🙃

    • hallettj@leminal.space
      link
      fedilink
      English
      arrow-up
      6
      ·
      9 months ago

      In which case you’re probably using a predefined 64-bit floating point number, which I think is accurate to 15 digits.

      • Ephera
        link
        fedilink
        arrow-up
        5
        ·
        9 months ago

        Well, you know what’s funny, after writing the comment above, I double-checked what the π constant is called in Rust, as that’s what I’m mostly coding with these days.

        And well, it actually makes you choose. There’s f32::consts::PI and f64::consts::PI. Which I guess, makes sense. If you’re calculating with 32-bit floats, you should be aware that π is going to be less precise.
        So, yeah, I’m a hoax, computer scientists do need to decide between 32-bit and 64-bit.

        In fact, the one time I needed π in Rust, was as a 32-bit float. I built a tiny gravity simulation in a game engine and game engines generally use 32-bit floats…

      • Ephera
        link
        fedilink
        arrow-up
        6
        ·
        9 months ago

        Yeah, math conventions and programming conventions don’t always align. As in, basically never…