List Archives > 
Maple User Group List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[MUG] bug in Map ?
| [MUG] bug in Map ? |
|
Author: Jean Brillet
Posted: Mon, 21 Oct 2002 11:19:45 +0200
|
>> From: Jean Brillet "brillet"
Hello,
It seems there is a small bug in the function Map of the
LinearAlgebra package ("inplace" map for Matrix and Vector).
Let A be a Matrix with numerical entries and with "datatype=anything".
Then Map(evalf[n],A) applies evalf[Digits] whatever is n. The same
occurs for Map(x->evalf[n](x),A). Map(evalf,A,n) does nothing.
However Map(x->evalf(x,n),A) works fine.
Jean Brillet
Jean Brillet
"brillet"
http://www.observ.u-bordeaux.fr
Tel : 05 57 77 61 57
Observatoire de Bordeaux
B.P. 89
33270 Floirac (France)
|
| [MUG] Re: bug in Map ? |
|
Author: Carl Devore
Posted: Wed, 23 Oct 2002 13:09:02 -0400
|
>> From: Carl Devore "devore"
On Mon, 21 Oct 2002, Jean Brillet wrote:
> Let A be a Matrix with numerical entries and with "datatype=anything".
> Then Map(evalf[n],A) applies evalf[Digits] whatever is n. The same
> occurs for Map(x->evalf[n](x),A). Map(evalf,A,n) does nothing.
> However Map(x->evalf(x,n),A) works fine.
The problem with your final solution, Map(x->evalf(x,n), A), is that it
generates 1 extra high-level procedure call per represented entry of A.
It is hard to imagine a situation where this would be worth the extra time
compared to the extra memory that is required by regular map.
|
Previous by date: [MUG] Re: Question about programming maple with graphic commands, Raphael Giromini
Next by date: [MUG] Re: Maple and PseudoRandomGenerator, Carl Devore
Previous thread: [MUG] Maple and PseudoRandomGenerator, Jerome BENOIT
Next thread: [MUG] Maple and PseudoRandomGenerator, Jerome BENOIT
|