Meme of two women fighting while a man smokes from a pipe in the background.

The women fighting are labeled “mathematicians defining pi” and “engineers just using 3 because it’s within tolerance”

The man smoking is labeled “astrophysicists” and the pipe is labeled “pi = 1”

  • Kogasa@programming.dev
    link
    fedilink
    English
    arrow-up
    6
    ·
    18 hours ago

    It’s a number and complexity refers to functions. The natural inclusion of numbers into functions maps pi to the constant function x -> pi which is O(1).

    If you want the time complexity of an algorithm that produces the nth digit of pi, the best known ones are something like O(n log n) with O(1) being impossible.