C_R

3507 Reputation

21 Badges

6 years, 48 days

MaplePrimes Activity


These are replies submitted by C_R

@sand15 

I send a SCR

@sand15 

Thank you for the answer. I still have it with Maple 2025. This seems to be a regression and migth explain other things I saw with typesetting recently that did not make sense to me.

I will report this.

kernelopts(version)

`Maple 2025.1, X86 64 WINDOWS, Jun 12 2025, Build ID 1932578`

(1)

`‰`;
`#mi("‰")`

`‰`

 

`#mi("‰")`

(2)

`‰`;
`#mi("‰")`;

`‰`

 

`#mi("‰")`

(3)

`‰`;
`#mi("‰")`;

`‰`

 

`#mi("‰")`

(4)
 

 

Download mi_reply.mw

@Anthrazit 

This is an impressive mail thread. You attracted the attention of many top shots. I could not find a round2 function but a Rnd2 which works nicely on units – with the difference of rounding to zero and returning floats (not integer). Not sure how important that is for you.

rnd2 := (x::realcons, n::integer) -> evalf[length(trunc(x)) + n](round(x*10^n)/10^n);
Rnd2 := (super, n::integer) -> evalindets(super, float, x -> rnd2(x, n));
Rnd2(1.25*Unit('mm'), 0);
                          1. Unit(mm)

Rnd2(0.25*Unit('mm'), 0);
Error, (in rnd2) invalid input: expected evalf[] index to be of type posint but received 0

From a natural language persepective Maple needs output 1 mm and even 0 mm because it reads as most pepole expect. Mathematically I do not see a need and we are used to things like this which from a dimensional persepective could be interpreted that the units of lhs and rhs do not fit

Engineering needs math, but math does not need engineering. However, how important is engineering for Maplesoft?
The topic is worth beeing discussed in a post. My current opinion is that the unit packages should handle 1 mm and 0 mm display ... somehow.

My personal number one unit painpoint is that convert/units cannot convert (naturally readable in- and output) x=1 m to x=1000 mm. For that, homebrew code is required. Awkward. My post on this did not resonnate so I assume that Maplesoft will put their priorities on something else. Too bad ... for me.

@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 look 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

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