vv

13065 Reputation

20 Badges

9 years, 21 days

MaplePrimes Activity


These are questions asked by vv

restart;
plot([sin(x), sin(x), x=0..420]);

The matrix A := op([1,1], %)  has equal columns, so the bug is in the PLOT engine.
plot(A) generates the same plot.
See also the "circle":
plot([cos(x), sin(x), x=0..5000*Pi]);

 

combine(2^n*4, icombine);

2^(2+n)

(1)

combine(2^n*4);

4*2^n

(2)

combine(2^n/4, icombine); # BUG

Error, (in compat) invalid input: igcd received undefined, which is not valid for its 2nd argument

 

combine(2^n/4);

(1/4)*2^n

(3)

combine(2^n/2^m, icombine); # BUG

Error, (in compat) invalid input: igcd received undefined, which is not valid for its 2nd argument

 

combine(2^n*2^(-m), icombine);

2^(n-m)

(4)

combine(2^n/2^m);

2^(n-m)

(5)

is(2^n/4 = 2^(n-2)); # ???

false

(6)

 


Download bug-icombine-is.mw

The  plots help page contains an entry for ternaryplot. But it is empty (Maple 2018&2019) and there is no such command.
Does somebody know about it?

searchtext and SearchText do not work well with non-ASCII characters.
Strangely, StringTools:-Search is OK.

restart;
m:=convert([77,97,116,104,195,169,109,97,116,105,113,117,101], bytes);
                      m := "Mathématique"
seq(searchtext(m[i..7], m), i=1..7);
                      1, 0, 0, 4, 0, 0, 1
seq(SearchText(m[i..7], m), i=1..7);
                      1, 0, 0, 4, 0, 0, 7
seq(StringTools:-Search(m[i..7], m), i=1..7);
                      1, 2, 3, 4, 5, 6, 7

 

Some mathematical functions and also some (not so) inert functions are implemented as objects.
For example, Perm is used to represent permutations.

p :=Perm([2,3,1,5,4]);  # ==> disjoint cycles representation
        p:=(1,2,3)(4,5);
lprint(p);
Perm([[1, 2, 3], [4, 5]])
    
Perm acts as an inert function (like RootOf) but it's an object.
Is it possible to convert it into a true inert form such as PERM([[1, 2, 3], [4, 5]]) and so, being able to extract the arguments with op?  

In this specific case we may use
convert(p, disjcyc);
       [[1, 2, 3], [4, 5]]
    
but this is possible only because Perm has a convert export.
So, is it possible to obtain the arguments directly (without convert)?
This would be useful for other situations.

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