5^1/4 = http://www.wolframalpha.com/input/?i=5%5E1%2F4&dataset=

log_4(5) = http://www.wolframalpha.com/input/?i=log4%285%29

Is that what you meant?

]]>Here’s my code:

import math

import time

def y(x,r):

square = x ** 2

return math.sqrt(r – square)

while 1:

n = input(“n “)

i = 0.00

cx = 2.00 / n

area = 0.00

oldTime = time.clock()

while i < n:

x = -1 + (cx * i)

area += y(x,1) * cx

i += 1

piCalc = 2.00 * area

newTime = time.clock()

timeDiff = newTime – oldTime

print piCalc

print "Calculation completed in " + str(timeDiff) + " seconds of CPU time"

I love doing this sort of problem with my students, because lots of them think they might be doctors someday.

]]>