Question: Slow numerical entry

On a whim I decided to write a routine to numerically calculate the volume of a sphere and compare the result with the well known formula (4/3)*Pi*r^3. What struck me was how slow the MAPLE code ran compared to the same code in VB. I realize that a program like MAPLE which is geared toward symbolic mathematics would not be expected to be as fast at numerical calculation as other vehicles, but I was struck by the difference. Below is the code in VB and MAPLE. Both routines give the same answer. The MAPLE roputine runs about 10 times slower than the VB routine. I was wondering - perhaps I'm not being fair to MAPLE. Is there some way I could have written the code to run significantly faster? Function TestSub() Dim i, j, k As Integer Dim temp1, temp2, temp3 Dim total As Long For i = 1 To 100 temp1 = (i * i) For j = 1 To 100 temp2 = temp1 + (j * j) For k = 1 To 100 If Sqr(temp2 + (k * k)) <>
Please Wait...