What is the fastest way to get the value of π?

后端 未结 23 1749
自闭症患者
自闭症患者 2020-11-28 00:33

I\'m looking for the fastest way to obtain the value of π, as a personal challenge. More specifically, I\'m using ways that don\'t involve using #define constan

23条回答
  •  北海茫月
    2020-11-28 01:10

    Brent's method posted above by Chris is very good; Brent generally is a giant in the field of arbitrary-precision arithmetic.

    If all you want is the Nth digit, the famous BBP formula is useful in hex

提交回复
热议问题