C_R

3042 Reputation

20 Badges

5 years, 185 days

MaplePrimes Activity


These are questions asked by C_R

Maple formats output depending on typesetting options "extened" and "standard" for the GUI (or interface). An example taken from

restart;
ts_standard:=proc(k::anything)
     interface(typesetting=standard):
     print(k);
     interface(typesetting=extended): 
     NULL;
end proc:
k:=3/8*ln(55/52)+sin(x)+3/4*exp(x);
                    3   /55\            3       
               k := - ln|--| + sin(x) + - exp(x)
                    8   \52/            4       

ts_standard(k);
                               

Why is the input two times returned and why one time as a list?
Somehow the first interface statement is responsible for that.

I am only interested in the reformated input inside the list.
Is it possible to fix the code?

Other observation with typesetting=standard:

restart;
interface(typesetting=standard);
expr:=cos(x)^2;
((x->x)=combine[trig])(expr);
                      

((x->x)=combine[trig])(expr);#subsequent call
                          2   1            1
                    cos(x)  = - cos(2 x) + -
                              2            2

(with Maple 2024.1 this only accurs in Math-1D)
but

restart;
expr:=cos(x)^2;
interface(typesetting=standard);
((x->x)=combine[trig])(expr);
                                      2
                        expr := cos(x) 

                            extended

                          2   1            1
                    cos(x)  = - cos(2 x) + -
                              2            2

GUI state after interupting with :

After switching to untitled 17 and back to test_timeout:

Sometimes it is necessary to switch back and forth twice.

Does this mean that the kernel did not receive the interupt?

For the legend in the image below I would have expected a black image and not a white

 

 

I was wondering if Maple could be setup in a way that no parallel processing is performed (as on a single core)?

I know, it's a poor way to test an algorithim/method for thread safety (i.e. deterministic behaviour). But it is better than nothing.

Are there other ways to test for thread safety?

expr:=cos(x)^2;
expr=combine[trig](expr);
(x->x=combine[trig])(expr);

Update:
Same outcome with

expr=`combine/trig`(expr);
(x->x=`combine/trig`)(expr);
                          2   1            1
                    cos(x)  = - cos(2 x) + -
                              2            2

                           2               
                     cos(x)  = combine/trig
First 9 10 11 12 13 14 15 Last Page 11 of 39