vv

11977 Reputation

19 Badges

7 years, 259 days

MaplePrimes Activity


These are questions asked by vv

If f is a procedure e.g.  f := x -> x^2;  then f[a](b)  evaluates to f(b)  (= b^2).
Do you know where is this feature documented?
(I have used this in the past, but I need now a reference and I cannot find it).

 

1/0;
Error, numeric exception: division by zero
lastexception;
            0, "numeric exception: division by zero"
lastexception; # ???
            Typesetting:-Typeset, "invalid input: %1 expects %2 arguments, but received %3", type, 2, 3

 

So, printing lastexception produces a new error!
When typesetting=standard, it's OK.

 

L:=[1,2,0,4]:
s := sum(1/L[i], i=1..nops(L));

Error, (in limit/mrv/limsimpl) too many levels of recursion

So, this error cannot be caught by try

try    # bug
  s := sum(1/L[i], i=1..nops(L));
  catch:  s:=infinity
end try;

Error, (in limit/mrv/limsimpl) too many levels of recursion

Strangely, for L:=[1, 2, 0.0, 4]  it's OK.

Everything works with add instead of sum, but this is another thing.

 

seq(x) in the help page:  When x is a sparse Matrix, Vector or rtable, only the nonzero entries are scanned.
Is the statement correct/complete?

V := Vector(6, [11,22,0,44], storage=sparse):
entries(V);
seq(V);

                        [11], [22], [44]
                      11, 22, 44, 0, 0, 0

 

add(add(1,i=1..j),j=1..4);

10

(1)

S:=%add(%add(1,i=1..j),j=1..4);

%add(%add(1, i = 1 .. j), j = 1 .. 4)

(2)

value(S);

Error, (in value) unable to execute add

 

It seems that the inner add is evaluated prematurely.

 

eval(subs(%add=add, S));  # ok

10

(3)

subs[eval](%add=add, S);  # ?

Error, unable to execute add

 

 

 

A strange fact about filenames. 
Some  filenames containing the "%" character cannot be loaded by Maple.  E.g.  "%add.mw"  or "xx%abyy.mw".  But "xx%yy.mw" is OK.
This happens in Windows, but I suspect that it is not OS related.  It seems that Maple is trying to do some hex manipulations with the filename.

2 3 4 5 6 7 8 Last Page 4 of 12