Post Reply 
Extended Precision Library by G.E.
08-27-2021, 08:53 AM
Post: #1
Extended Precision Library by G.E.
Hello, I find it difficult to make ”Extended Precision Library” work.
The author of the program is G.E.
The library consists of 3 "hpprgm" programs.
After having transferred the three programs in the HP PRIME virtual calculator, ie "multiprecision", "mutiprecision2" and "testmulti", and after having opened them (shift program, EDIT, Check), I get an error message:

1) In “multiprecision”, I get an error on line 265;
2) In “multiprecision2”, I get an error on line 170;
3) In “testmulti”, I get an error on line 108;

Where am I doing wrong?
Yours sincerely, Roberto Mioni
Find all posts by this user
Quote this message in a reply
08-27-2021, 12:29 PM
Post: #2
RE: Extended Precision Library by G.E.
(08-27-2021 08:53 AM)robmio Wrote:  Hello, I find it difficult to make ”Extended Precision Library” work.
The author of the program is G.E.
The library consists of 3 "hpprgm" programs.
After having transferred the three programs in the HP PRIME virtual calculator, ie "multiprecision", "mutiprecision2" and "testmulti", and after having opened them (shift program, EDIT, Check), I get an error message:

1) In “multiprecision”, I get an error on line 265;
2) In “multiprecision2”, I get an error on line 170;
3) In “testmulti”, I get an error on line 108;

Where am I doing wrong?
Yours sincerely, Roberto Mioni

What error are you getting on those lines? It matters.

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
08-27-2021, 01:21 PM
Post: #3
RE: Extended Precision Library by G.E.
The error present in "multiprecision" is a "syntax error": the cursor is placed after the semicolon of "1000000▶m;xsetp(n);" on line 265.

The error present in "multiprecision2" is a "syntax error": the cursor is placed after the semicolon of "xx10mp(−b*a)▶g;xdivk(g,b,p)▶g;" before "xdivk(g,b,p)" on line 170.

The error present in "testmulti" is a "syntax error": the cursor is placed at the beginning of line 108, at the level of "xtof (U)▶f".

Thanks, Roberto


Attached File(s) Thumbnail(s)
           
Find all posts by this user
Quote this message in a reply
08-27-2021, 02:21 PM
Post: #4
RE: Extended Precision Library by G.E.
(08-27-2021 01:21 PM)robmio Wrote:  The error present in "multiprecision" is a "syntax error": the cursor is placed after the semicolon of "1000000▶m;xsetp(n);" on line 265.

The error present in "multiprecision2" is a "syntax error": the cursor is placed after the semicolon of "xx10mp(−b*a)▶g;xdivk(g,b,p)▶g;" before "xdivk(g,b,p)" on line 170.

The error present in "testmulti" is a "syntax error": the cursor is placed at the beginning of line 108, at the level of "xtof (U)▶f".

Thanks, Roberto

I just downloaded EPL and I get the same errors when checking the program.

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
08-27-2021, 03:26 PM
Post: #5
RE: Extended Precision Library by G.E.
(08-27-2021 01:21 PM)robmio Wrote:  The error present in "multiprecision" is a "syntax error": the cursor is placed after the semicolon of "1000000▶m;xsetp(n);" on line 265.

The error present in "multiprecision2" is a "syntax error": the cursor is placed after the semicolon of "xx10mp(−b*a)▶g;xdivk(g,b,p)▶g;" before "xdivk(g,b,p)" on line 170.

The error present in "testmulti" is a "syntax error": the cursor is placed at the beginning of line 108, at the level of "xtof (U)▶f".

Thanks, Roberto

It's a matter of cross references:
  • xsetp() called in multiprecision is defined in multiprecision2
  • xdivk() called in multiprecision2 is defined in multiprecision
Each program is requiring the other one to be compiled first, so it's a deadlock. This can happen when you develop programs and you add functions incrementally, you may not notice it as you start from existing compiled programs that you modify.

One way to solve this is simply to copy the content of multiprecision2 at the end of multiprecision and delete multiprecision2 . Then no more syntax errors.
Find all posts by this user
Quote this message in a reply
08-27-2021, 03:50 PM (This post was last modified: 08-27-2021 03:54 PM by roadrunner.)
Post: #6
RE: Extended Precision Library by G.E.
@Didier,

Since multiprecission has the line:

xsetp();

at the top of the program, shouldn't that allow it to compile?

@ everyone else:

This procedure should work:

1. Open multiprecision in the editor and rem out line 267: //xsetp(n);
2. Tap the check button, it should compile with no errors;
3. Open multiprecission2 and tap the check button, it should compile with no errors;
4. Open testmulit and tap the check button, it should compile with no errors;
5. Open multiprecision again and un rem line 267: xsetp(n);
6. Tap the check button and it should compile with no errors;
7. I repeated setps 3, 4, 5, and 6 to make sure everything worked, but that may not be necessary.
Find all posts by this user
Quote this message in a reply
08-27-2021, 04:04 PM
Post: #7
RE: Extended Precision Library by G.E.
(08-27-2021 03:50 PM)roadrunner Wrote:  @Didier,

Since multiprecission has the line:

xsetp();

at the top of the program, shouldn't that allow it to compile?

Apparently this is not working with the latest version of the Prime firmware. I tested with the previous virtual Prime (2020-01-16) and it compiled fine.

This may be linked to the changes in the last firmware around the functions declaration:
  • 1) There is no need to declare functions before using them now.
  • 2) Multiple functions with the same names, but different parameter count
    It is now possible to have more than one function in a program with the same name, as long as the parameter count is different
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)