C_R

3657 Reputation

21 Badges

6 years, 157 days

MaplePrimes Activity


These are replies submitted by C_R

@Anthrazit 

OK understood. In Maple no unit means Unit(1).

is(round(1.25)=Units:-Unit(1))
                              true
Units:-Split(round(0.25));
Units:-Split(round(0.25*Unit('mm')));
Units:-Split(round(1.25*Unit('mm')))
                              0, 1

                              0, 1

                          1, Unit(mm)

If you want to preserve the unit in the second output, you could do it this way.

c:=0.25*Unit('mm');
`%*`(round~([Units:-Split(c)])[]);
                       c := 0.25 Unit(mm)

                       

This would also produce 1 * mm for the input 1.25 mm. Quite some effort. Both outputs can be used for further computations using the value command. What I do not like is the * which is not needed in this case.

@Anthrazit 

Can you clairfy the example?

round(1.25) = Unit();
Error, (in Unit) invalid input: Units:-Unit:-ModuleApply uses a 1st argument, expr, which is missing

Under Windows "worksheet" and command line mode use both the same mserver executable. The difference is the calling task which is the Java GUI in the first instance and the command line interface in the second instance. So maybe the levels of recursion do not occur in the mserver task but in the Java GUI.

Under Windows there is also an addtional mserver task running that does something in parallel. If you have the same und Linux: What happens when you kill this process (if possible)? Is Maple still crashing?

@sand15 

It looks different with 2025. Changing Ditigs also has an effect but less pronounced to what i have seen. 

Thanks for sharing

Stranger_things_reply.mw

@acer 

I send a software change request

@nm 

I use that from time to time (if I have no time or am out of options). It's better than simplify/symbolic, which I never use because I do not know what else simplify/symbolic does. However what makes me feel uneasy using it with products or quotients under roots is

sqrt(1/c)/sqrt(a/c)

(1/c)^(1/2)/(a/c)^(1/2)

(1)

(1@@0 = `@`(sqrt, 1@@0^2))((1/c)^(1/2)/(a/c)^(1/2))

(1/c)^(1/2)/(a/c)^(1/2) = (1/a)^(1/2)

(2)

subs(a = -1, c = 1, (1/c)^(1/2)/(a/c)^(1/2) = (1/a)^(1/2))

-I = I

(3)

NULL

Download sqrt_with_quotients.mw

@sand15 

Efficient way to extract the factors!

When I press Alt (left key to spacebar) nothing happens; i.e. no hotkeys appear at all. I remember this working but not exactly when.

@dharr 

Simplification with the context menu works on v(t) but not on v(10 s). The output (1) does not fit to what lprint returns. It looks to me as if the interface and not the kernel does something wrong. 

 

@acer 

It's new to me that the Typesetting can be used this way in an assignement to a name. Out of curiosity I tried

D := Typesetting:-mo("D",mathvariant="italic");

This overrides the mo. In the other direction (overriding mi with mathvariant="operator") I had no success. Possibly this parameter does not exist.

Instead of playing arround: Is there a way to list options with their parameters?

I assume that Typesetting instructions are processed by the GUI before passing (whatever) to the kernel. Is that correct?

@dharr 

I hope not. I doubt that such a code hybrid can be maintained over a period of more than 15 years. Unless it is very well documented. Better not to touch.

@acer 

I tried this

Typesetting:-mi("D",mathvariant="italic")

D; "_noterminate"

(1)

D

D

(2)

local D;

Warning, A new binding for the name `D` has been created. The global instance of this name is still accessible using the :- prefix, :-`D`.  See ?protect for details.

 

D

(3)

D

D

(4)

Typesetting:-mi("D",mathvariant="italic")

D; "_noterminate"

(5)

D

D

(6)
 

 

Download D_in_mi_attempt.mw

@acer 

Since I use D quite often (copying formulas from text books one to one), I will ask support whether this can be fixed one day. 
Thank you for the explanations.

@dharr 

Interesting finding. The help page of typesetting mentions a redesign from hard coded to a rule based system. Why these exception?

I am not using Mapleflow either but I remember that Mapleflow recognises Maple code.

In Maple conversion to a value in percent could be done like this

By name

pu := 100*`&%;`;

100*`&%;`

(1)

x := 0.1;

.1

(2)

x := x*pu;

10.0*`&%;`

(3)

x:=eval(x, `&%;` = 1/100);

.1000000000

(4)

By equation

restart:
percent:=pu = 100*`&%;`;

pu = 100*`&%;`

(5)

x:=0.1*pu

.1*pu

(6)

x:=eval(x,percent)

10.0*`&%;`

(7)

x:=eval(x, `&%;` = 1/100);

.1000000000

(8)

 

NULL


 

Download Convert_to_percent.mw


The name pu is assignet to a product of 100 and a new name `&%;` that prints as % but appart from that does nothing.

Not sure if that is of any help.

3 4 5 6 7 8 9 Last Page 5 of 72