> a1 := op(1,evalf(Pi,10000)):
How many digits are in the integer a1 ?
How long (in seconds) does it take to square a1 ?
> st := time(): a2 := a1^2: t2 := time()-st;
How long does it take to square a2, where a2 has almost double the number of digits (19999 digits) that a1 has.
> st := time(): a4 := a2^2: t4 := time()-st;
The ratio of the computation times should be close to 3 if Karatsuba's algorithm is used for integer multiplication.
> almost_3 := t4/t2;