# Bug hopping

19 views

### peter....@gmail.com

Jul 4, 2023, 2:35:59 AMJul 4
to
Maple has developed a sophisticated strategy to ensure that the experience of its users is one of hopping from bug to bug.

It is based on two pillars: To change basic definitions (which are in fact fixed since Euclid) from time to time, and, secondly, to rely on the fact that their long-time users can't always adapt that quickly.

A nice example with the current Maple version (2023) is:

restart; with(numtheory):
A027375 := n -> local d; add(mobius(d)*2^(n/d), d = divisors(n)):
seq(A027375(n), n = 1..9);

> 2, 2, 6, 12, 30, 54, 126, 240, 504

restart; with(NumberTheory):
A027375 := n -> local d; add(Moebius(d)*2^(n/d), d = divisors(n)):
seq(A027375(n), n = 1..9);

> 2, -2, -2, 0, -2, 2, -2, 0, 0

If you have nothing better to do, you can waste your time trying to find the bug.

### acer

Jul 5, 2023, 3:35:56 AMJul 5
to
In your second example you call `divisors(n)` even though `numtheory` hasn't been loaded.

restart; with(NumberTheory):
A027375 := n -> local d; add(Moebius(d)*2^(n/d), d = Divisors(n)):

### peter....@gmail.com

Jul 5, 2023, 4:44:49 AMJul 5
to
Of course, that's the bug. But do you understand the frustration
of a long-time Maple user who has written 'divisors' hundreds
of times and now has to realize that from now on, he has to
write 'Divisors' with a capital 'D,' contrary to his practiced
routine, and without that there is any reason to believe that
the meaning of this term has changed in the last 2000 years,
just because Maple has changed some internal routines for
whatever reason? And that precisely such mistakes are inevitably
provoked as a result?