Stretto

185 Reputation

5 Badges

2 years, 260 days

MaplePrimes Activity


These are questions asked by Stretto

Given some intert expression like 4%*5 %+ 3 is there a way to progressively convert it to a non-inert expression(and evaluated expression)?

I'd like to see the stages without having to hard code it all. Value simply converts the expression all the way down. I'd like to see intermediate stages. Ideally it should followthe order of operations and hault when it reaches a fixed point(when the output equals the input).

e.g., value(exp, 3) will value the expression 3 times carrying out one one reduction of inert operations.

Using insert sequences: `%*`(seq(...))

 

Behaves very poorly when the sequence has one element. E.g., if this is a double sequence(say a double sum) then when the inner seq/sum has one element the inert visual is poorly displayed with extra junk rather than just showing one element.

`%+`(floor(5 %/ (2 %* 3 %* 5)))

 

E.g., rathernt han just showing:

(floor(5 %/ (2 %* 3 %* 5)))

 

Is there any way to get it to play nice without having to modify the functions/(this is a global problem so it deserves a global solution rather than ad-hoc that has to be applied to every usage).

 

 

How difficult is it to animate a process using a binary tree for visualization purposes, something that isn't too slow or too complex to implement(as I will then just go with python or something) but also nice to look at(not just boring straight lines).

I'd like to animate, say, a ball moving through different branchings of a multi-tree(binary mainly but ultimately different branchings per node).

 

As an aside. Is there anything like C++ objects/structs in maple that are easy to create using . notation?

 

 

f := n->local p := round(n) mod 2; 1/2 + (-1)^p/n/2^p;
f := proc (n) options operator, arrow; `if`(1 < modr(n-1/2, 2),

   1/2+1/n, 1/2-(1/2)/n) end proc


     f := proc (n) local p; options operator, arrow; p :=

f := n->local p := round(n) mod 2; 1/2 + (-1)^p/n/2^p;

f~([$1..10]);

Correct plot
plot('f'(n),n=1..10,0..1);

 

Wrong plot

plot(f(n),n=1..10,0..1);

 

Can someone explain why I have to put ' ' around f to get the right plot? Clearly it has something to do with round and/or mod. Why does maple have this stupid issues? Cause it seems like it is very error prone. I know it's wrong only cause I know what to expect.

4 %+ 3 %* 2;
                        %*(%+(4, 3), 2)

= (4+3)*2

It makes using % very difficult in complex expressions because one has to constantly use a ton of paranethesis just to get things to work out.

1 + 4%^3  %* 2 %- 6 %/ 4;

1 + ((((4 %^ 3) %* 2) %- 6) %/ 4)

= 1 + (4^3*2 - 6)/4

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