acer

33044 Reputation

29 Badges

20 years, 170 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@C_R 

Btw, while I used value for most of the example checks, I threw in one with a call to simplify instead, to illustrate its effect.

I'm a bit on the fence about whether it's mostly a good thing that this next example returns zero.

    simplify( sqrt(2) - %sqrt(2) )

Also, the following will return 2*3^(1/2)

   simplify( %sqrt(12) )

So I'm not sure what gemini means by its claim that "Simplification" is "Blocked". It doesn't seem to be a claim about "Evaluation", which has a separate line in what you showed. Perhaps it's just some sort of claim about immediate arithmetic cancellation (though, logically, that seems just a consequence about lack of immediate evaluation).

ps. evala and radnormal seem to leave %sqrt alone. And they can do a kind of simplification.

@C_R That's really interesting.

Except for perhaps one minor spot ( about explanation of [op(u)] vs [u] ) it seems like an accurate explanation, broken into steps properly. Up until the point that it misinterprets %sqrt, of course.

I wonder how it might ever learn that %sqrt is an inert form.

The explanation made a weakness apparent to me: the denominator of the content might not be numeric.

M := 1/(11*Q(sqrt(5)));

    1/11/Q(5^(1/2))

C := content(M);

    1/11/Q(5^(1/2))

irem(C, 11);

   irem(1/11/Q(5^(1/2)),11)

rem(C, 11, ':-__x');

         0

And so I tentatively offer a revision that also handles this additional example:

G:=proc(ee,k::posint:=2)
    subsindets(ee,`*`,
               u->`if`(rem(denom(content(u)),k,':-__x')=0 and
                       member(sqrt(k),[(uu->`if`(uu::`*`,op(uu),uu))(numer(content(u)))]),
                       u*sqrt(k)/%sqrt(k),u));
end proc:

 

-13/7/(sqrt(11)*sqrt(5))*(x+a);
G( %, 5 );
G( %, 11 );
simplify(% - %%%);

-(13/385)*11^(1/2)*5^(1/2)*(x+a)

-(13/77)*11^(1/2)*(x+a)/%sqrt(5)

-(13/7)*(x+a)/(%sqrt(5)*%sqrt(11))

0

Download unrat02b.mw

This is a benefit of trying to concoct "unit test" examples, and trying to find examples that "break" your code.

ps. There is some dodginess to using rem here. But I haven't thought of the fatal counterexample yet. ;)  And I know that I can't just handle the numerator the same way (tempting as may be).

Looking at the code in the routines, it seems to me that (perhaps since at least Maple 2021) the passed option prolog=true might be simply disregarded.

If that's true, then the change in Maple 2026 is merely that passing it throws an error. But if it was simply ignoring it previously then one solution now is to stop passing it in one's code.

You could allow it through the first few layers (see below), but once inside XMLTools:-NSXML:-ParseFile it seems simply to be ignored, and that's seems true of even the deeper level
XMLTools:-NSXML:-Parser:-parseFileImpl routine.

I don't really see the point of doing this, but that's why I asked for an input file where passing prolog=true make it return some different result (and without emitting an error).

restart;

if parse(String(kernelopts(version))[8..11])=2026 then
kernelopts(opaquemodules=false):
unprotect(XMLTools:-NSXML:-ParseFile):
_hah:=ToInert(eval(XMLTools:-NSXML:-ParseFile)):
XMLTools:-NSXML:-ParseFile:=FromInert(subsop([1,2,1,-1]=[op([1,2,1,-1],_hah),
                                                         subs("validate"="prolog",op([1,2,1,-2],_hah))][],
                                             _hah)):
_hah:='_hah':
protect(XMLTools:-NSXML:-ParseFile):
kernelopts(opaquemodules=true):
end if:

 

file := FileTools:-JoinPath( [ "help", "XMLTools", "SimpleDocument3.xml" ], base = datadir ):

 

XMLTools:-ParseFile(file, prolog=true);

_XML_Document(_XML_Comment(" DOCTYPE declaration "), _XML_DTD("DOCUMENT", "", "SimpleDocument.dtd"), _XML_Comment(" Document Element "), _XML_Element(_XML_ElementType("DOCUMENT"), [], [_XML_Text("
    "), _XML_Element(_XML_ElementType("HEADER"), [], [_XML_Text("
        "), _XML_Element(_XML_ElementType("AUTHOR"), [], [_XML_Text("
            "), _XML_Entity("WMI"), _XML_Text("
        ")]), _XML_Text("
    ")]), _XML_Text("
    "), _XML_Element(_XML_ElementType("SECTION"), [], []), _XML_Text("
")]))

XMLTools:-ParseFile(file, prolog=false);

_XML_Document(_XML_Comment(" DOCTYPE declaration "), _XML_DTD("DOCUMENT", "", "SimpleDocument.dtd"), _XML_Comment(" Document Element "), _XML_Element(_XML_ElementType("DOCUMENT"), [], [_XML_Text("
    "), _XML_Element(_XML_ElementType("HEADER"), [], [_XML_Text("
        "), _XML_Element(_XML_ElementType("AUTHOR"), [], [_XML_Text("
            "), _XML_Entity("WMI"), _XML_Text("
        ")]), _XML_Text("
    ")]), _XML_Text("
    "), _XML_Element(_XML_ElementType("SECTION"), [], []), _XML_Text("
")]))

XMLTools:-ParseFile(file);

_XML_Document(_XML_Comment(" DOCTYPE declaration "), _XML_DTD("DOCUMENT", "", "SimpleDocument.dtd"), _XML_Comment(" Document Element "), _XML_Element(_XML_ElementType("DOCUMENT"), [], [_XML_Text("
    "), _XML_Element(_XML_ElementType("HEADER"), [], [_XML_Text("
        "), _XML_Element(_XML_ElementType("AUTHOR"), [], [_XML_Text("
            "), _XML_Entity("WMI"), _XML_Text("
        ")]), _XML_Text("
    ")]), _XML_Text("
    "), _XML_Element(_XML_ElementType("SECTION"), [], []), _XML_Text("
")]))


Download xmlparse01.mw

@nm You seem to have linked to this same page, rather than to some older Question thread.

It looks as if the $ terminator has been added at the end of the parameter specification of,
    XMLTools:-NSXML:-ParseFile
which means that it's only accepting explicitly specified parameters (which doesn't include, say prolog::boolean).

Do you have an example of an input file for which option prolog=true passed to ParseFile made a concrete difference in some earlier Maple version?

ps. I have a hazy recollection that the internal parser being used by ParseFile may have been switched at some point in the past. But I don't know whether it might have just silently ignored prolog=true after that.

What would you want to happen to, say,

    sqrt(2)/14?

Would you want it to become

    1/(7*%sqrt(2))

?

limit(S2, c__1=infinity);

     y(x) = x exp(2 Pi)

odetest(%, ode);

           0

@C_R On Linux the users Favorites palette items are stored in a file separate from the GUI preferences file.

On Linux (at least), it is a file named   Favorites.properties

Perhaps you had such a file from an earlier version (say, 2025) under your Maple folder,
    C:\Users\<User ID>\AppData\Roaming\Maple
and that got imported into your new Maple 2026 installation even though you did not import the other maple.ini regular GUI preferences file.

@C_R That's really great to hear, that you're up and running ok.

If it's not too much trouble, could you please send both your Maple 2025 and the problematic "imported" Maple 2026 maple.ini preferences file (suitably renamed, say) to tech support. I can imagine that a GUI developer might be interested in trying to deduce what went awry.

@C_R Then I suggest that you send an email with a full description of all your Maple 2026.0 GUI problems (including those I mentioned above), as well as details of your OS, to
    support@maplesoft.com

Your 2026.0 installation appears to be broken in several serious ways, including at least these:

- palettes malfunctioning
- Expression Labels malfunctioning
- Help-page output malfunctioning

I somehow doubt that these are all broken in every 2026.0 installation on Windows 11 (the most common platform). I'd be surprised if Maplesoft's QA team had not noticed that all these were faulty.

It's possible that there's something special about your machine (eg. language pack, or other...).

Have you tried uninstalling and then re-installing?

At this point I suggest contacting Maplesoft's technical support directly, rather than posting various distinct Mapleprimes threads about features giving problems.

@Andiguys So, did this work for you?

I've submitted a bug report against this.  (...noting that in some versions I couldn't interrupt the original example call.)

For such problems, it's not a bad idea to directly submit a report.

Does it switch back to 2D Output in the Help Examples if you toggle the input back to 2D?

@alexsid I see the same thing in Maple 2026 (and 2025) when running under the GNOME desktop management system (default) on Linux ubuntu 24.04 LTS.

I have (almost) trained my wrist to not slide the mouse pointer over to the right of Recent Documents, when the full list pops up, but instead use the arrow keys to move the highlighted selection up or down. Often it takes a few tries.

I'm a little slow and half figured it might be intentional. But now I'll submit a bug report.

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