Generation

generate functionThu, 17 Nov 2022

calc pi using Ramanujan formula

import math def pi_ramanujan(): return math.sqrt(8/9801) * ((1103 + 26390 * i)/(99**(4*i))) pi_ramanujan()

Questions about programming?Chat with your personal AI assistant