You are not logged in.
Pages: 1
I think it would get airborne. Seen as it's not the wheels that drive it, it's the jet engines. So it's still going to be 'pushed' along at the same rate, no matter how quick the treadmill is moving.
My main fear is living forever.
I think in most computers they have tables like how ricky did it. The only difference being they can access the table quicker as it's part of the CPU, not stored in memory.
This is only small but I think computers execute ((n^2)-n) quicker than (n*(n-1)). As I said in the last post though I'm not very good in C/C++ so this could be wrong. It might not be worth the hassle of changing and testing as it would only be a very very small gain in speed, if any.
I'm not very good with C/C++ (I think it's one of those) but wouldn't this:
double xSquared = x*x; // compute x squared ahead of time
double sum = x; // add the first term to the accumulated sum
double previousTerm = x;
for (int n = 3; n < INFINITY; n+= 2) // continue on from the second term
{
// compute this term using the previous term
previousTerm = -previousTerm*xSquared/( (n*(n-1));
sum += previousTerm;
}
return sum;
Be a little quicker?
Pages: 1