Thu Feb 25 18:46:27 MST 1999
aquarius% maple
|\^/| Maple V Release 5.1 (WMI Campus Wide License)
._|\| |/|_. Copyright (c) 1981-1998 by Waterloo Maple Inc. All rights
\ MAPLE / reserved. Maple and Maple V are registered trademarks of
<____ ____> Waterloo Maple Inc.
| Type ? for help.
# ----------[ M a p l e ]----------
#interface(echo = 3);
# ---------- Initialization ----------
> readlib(showtime):
> on;
# ---------- Mathematics vs Computer Science ----------
# Is k really treated as a local variable in the following situations where it
# is clearly a mathematically local variable?
O1 := sum(k, k = 1..4);
10
time = 0.02, bytes = 54578
O2 := product(k, k = 1..3);
6
time = 0.02, bytes = 13766
O3 := limit(k, k = 0);
0
time = 0.02, bytes = 19158
O4 := int(k, k = 0..1);
1/2
time = 0.05, bytes = 38286
O5 := k:= 1:
time = 0.00, bytes = 4478
O6 := sum(k, k = 1..4);
`Error, `.(`summation variable previously assigned`,
` second argument evaluates to`, 1 = 1 .. 4)
time = 0.00, bytes = 4994
O7 := product(k, k = 1..3);
`Error, `.(`product variable previously assigned`,
` second argument evaluates to`, 1 = 1 .. 3)
time = 0.01, bytes = 4410
O8 := limit(k, k = 0);
Error, invalid arguments
time = 0.00, bytes = 4402
O9 := int(k, k = 0..1);
Error, wrong number (or type) of arguments
time = 0.01, bytes = 4774
# ---------- Quit ----------
O10 := quit
bytes used=344652, alloc=327620, time=0.22
real 0.68
user 0.28
sys 0.41