19132 Reputation

29 Badges

14 years, 288 days

Social Networks and Content at

MaplePrimes Activity

These are replies submitted by acer

You can upload and attach your worksheet, so that people don't have to re-type the expressions using just an image of your code.

(Also, I converted your Post into a Question.)

@Scot Gould I checked, by running the 2D Input case and its 2D parsing through the debugger (Typesetting, which can sometimes be tricky).

It parsed through this inert form (which I assigned to name foo),

foo := _Inert_FUNCTION(_Inert_TABLEREF(_Inert_NAME("evalf"),_Inert_EXPSEQ(_Inert_INTPOS(30))),_Inert_EXPSEQ(_Inert_FUNCTION(_Inert_NAME("^"),_Inert_EXPSEQ(_Inert_FLOAT(_Inert_INTPOS(30),_Inert_INTNEG(1)),_Inert_FLOAT(_Inert_INTPOS(12),_Inert_INTNEG(1))))));

And that turns into this,



And that involves the prefix form for `^`, which as shown earlier does not involve the automatic simplification

@Lisa6 You have now posted eight (8) times in this thread, but you still have not stated explicitly what files you put where, and what you tried.

Notice that in my last Reply I stated where I put the files as well as what I executed in Maple, and I showed the output.

So, you executed these Maple commands?

libname := "/home/usr/maple2020/FGb/FGblib", libname;

Show the output from both.

Where did you put the files FGblib.ind and FGblib.lib? What directory are they in? Where did you put the .so files? What directory are they in? What are their names?

What do you see if you execute in a Linux terminal,
    cd /home/usr/maple2020/FGb
    ls -l *

Which Maple interface did you launch, and how?

@Scot Gould That old Question and Answer you showed is unrelated to your primary query here, about evalf[30](3.0^(1.2)) producing only a 10-digit result under default Digits=10 when entered in 1D plaintext Maple Notation.

That old post relates to evalf's numeric model (atomic operations are supposed to attain accuracy with 0.6 ulps, but bets are off for compound operations which may incur additional roundoff error and loss of precision) and the special remeber table mechanisms with evalf that allow prior results to be re-used and rounded when requested under lower working precision. I don't see how any of that relates to your primary query here.

In case the original question is altered, here it is:

  1. a1 = x and for every n >= 1 ,   

write the Maple procedure that calculates the term a100 for x = 2.


In case the original question is altered, here it is (with followup comment):


Type the Maple command string that calculates this expression for the number of n arb
itrarily entered from the keyboard.Can you help me please ?

In the question, an arbitrary number of n will be entered on the keyboard. The first
a = x ^ n will be taken using the for loop. Then with i for a general repetition tota
l expression that will go from i = 2 to n, the desired total will be obtained.


In case the question is altered, here is the original:

by using its expansion Write the Maple  program.

@serge17 Yes, they are different.

The cat command will evaluate its first argument, which makes the difference in your example. 

As you saw, it makes the difference between concatenating with the name and concatenating with the assigned value of the name.

It is important to understand the difference. Understanding the difference and using straightforwardly comprehensible code is much better than using hackish methods like a double use of ||, etc.

@HaHu Please do not submit duplicates of this topic.

It's been explained to you: you cannot assign to a name as expression that depends on that same name. (If you could then subsequent evaluation would result in an infinite loop.)

You may need to understand the difference between an equation such as, say,
   u[6] = ....some expression involving u[6]...
which is OK, and the assignment,
   u[6] := ....some expression involving u[6]...
which is not OK.

But don't submit duplicates of the topic just because you don't properly understand the issues already explained.


save G, cat(mypath,"foo.m");


On a guess (from the error message it gave that contained a slightly different .so file name!) I tried the following:

I copied the file to the new name in the same location.

The Linux directory I chose (to contain both .so files as well as the FGblib subdirectory) was this:

The I ran Maple 2020 (64bit Linux) and prepended libname with the subdirectory's location.

This is what happened:

libname := "/home/acer/mapleprimes/FGb/FGblib", libname:


Path set to /home/acer/mapleprimes/FGb/FGblib/../
    FGb/Maple interface package Version 1.68
    JC Faugere (
    Type ?FGb for documentation
[ModuleUnload, cpu, date, fgb, fgb_gbasis, fgb_gbasis_elim, fgb_gbasis_lm,
    fgb_hilbert, fgb_interface, fgb_matrixn, fgb_matrixn_radical,
    fgb_matrixn_radical2, fgb_multi, fgb_normalForm, pseudo_fgb_normalForm]

open simulation
                   2       4
                 [y  + x, y  + y]

The tar file from the website unpacked and contained the file, but when I tried all the above without copying to the new file name I got only this:

with(FGb); failed
Error, (in pack_fgb_find_path) cannot find a valid path !

That is why I tried copying the file to the new name with the name containing the extra character.

This looks like an oversight/mistake by the author (3rd party). Also, I notice that on the webpage the example does not show the printing of the discovered file location.

@serge17 I'm glad that worked for you, and that you have a solution.

The backslash is the "escape" character in a string (eg, "\n" is a new-line character), which is pretty common even without Maple. To get a literal backslash you can thus escape the backslash, so that "\\" denotes one backslash character.

In modern Maple you can use a forwardslash "/" instead, for file locations even on MS-Windows. I am not sure whether that worked in ancient Maple 7 (2001).

@Lisa6 There are no extra or renaming steps of which I'm aware, for the two Library .ind/.lib files. But note that you have not told us what exactly you have done.

The instructions seem simple:
  1) Create a folder, named as your choice.
  2) Put the unpackage (un-tarred) files/folders there.
  3) Run it in Maple by prepending libname with the sublocation that contains the .lib/.ind files
  4) Add that Maple statement (for libname) to a user initialization file, if you want it automatic for other sessions.

If you cannot understand that then I don't really see how you are going to figure out how to use the 3rd package altogether.

If you follow the instructions and it doesn't work then you should ask the author of the 3rd party site. (Maybe that version from 2015 is no longer relevant to Maple 2020, or maybe you made a mistake, etc. You haven't explained why you want something that -- at least in part -- is bunded with Maple proper.)

You haven't told use exactly where you put the files and exactly what steps you took. You haven't! So how could I guess what step you might possible have done wrong?

You issues are all about using a 3rd party's .lib/.ind pair of Library files, adjusting libname to include their location, and having the happen automatically in a user initialization file. Since you asked (a day or so ago) the same questions (which are not so common) have been repeated under another member handle. I really hope that is not you or a close associate.

It will not help to ask the same question over and over (in diferent places), especially without explicit details.

@serge17 Did you try specifying the precise location when you call the save command?

For example,

    save G, "C:\\\\Users\\Serge\\foo.m" ;

or some other location.

@mmcdara Sorry, I interpreted the first part of your question as meaning that you wanted to use it as a predicate (to test for the quality). Now I understand that you want it actually to split the terms.

(I think its a little clumsy to use the a=... and f=... form in the return as you described, but it should be obvious how to change that. It's just a matter of style. It would be a little cleaner without it, I'd suggest.)

This solution uses the same basic mechanisms as my earlier answer: selectremove and depends. Indeed the key part is essentially the same as before, except I use not to switch the position.

I have assumed that you always have an expression which is actually a product, mostly because you didn't state whether you wanted case of a non-product rejected or handled as 1*expression.


F := proc(ee::algebraic, nm::name)
       Equate([a,f],[selectremove(not depends,ee,nm)]);
end proc:

F( (A+B)*(t^2+y), t );

[a = A+B, f = t^2+y]

F( (A+B)*(t^2+y)*t^5, t );

[a = A+B, f = (t^2+y)*t^5]

F( (t^2+y)*t^5, t );

[a = 1, f = (t^2+y)*t^5]

F( (A+B)*c*(t^2+y)*t^5, t );

[a = (A+B)*c, f = (t^2+y)*t^5]

F( 3*t,t );

[a = 3, f = t]


Without the a=... and f=... aspect the above could be, say,


F := proc(ee::algebraic, nm::name)
       [selectremove(not depends,ee,nm)];
end proc:

F( (A+B)*(t^2+y), t );

[A+B, t^2+y]

F( (A+B)*(t^2+y)*t^5, t );

[A+B, (t^2+y)*t^5]

F( (t^2+y)*t^5, t );

[1, (t^2+y)*t^5]

F( (A+B)*c*(t^2+y)*t^5, t );

[(A+B)*c, (t^2+y)*t^5]

F( 3*t,t );

[3, t]


2 3 4 5 6 7 8 Last Page 4 of 424