Post Reply 
Solver inside of HP basic
02-26-2015, 03:33 PM (This post was last modified: 02-26-2015 04:26 PM by Thomas Ritschel.)
Post: #6
RE: Solver inside of HP basic
I've got it working using the following code without the use of local variables:
Code:
EXPORT Kepler()
BEGIN
  M:=60*pi/180;   <-- use the "pi" key (shift + 3)
  A:=0.15;
  HAngle:=0;
  PRINT(FNROOT(E-A*SIN(E)-M,E));
  HAngle:=1;
END;

Obviously the solution isn't stored in the variable E. Therefore one needs to get the return value of FNROOT instead. This wasn't clear to me...

Anyway, I'm still wondering why one cannot use local variables here.

Edit: Equation corrected...
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Solver inside of HP basic - Powersoft - 02-25-2015, 01:06 PM
RE: Solver inside of HP basic - Angus - 02-25-2015, 01:41 PM
RE: Solver inside of HP basic - Powersoft - 02-26-2015, 02:59 PM
RE: Solver inside of HP basic - Thomas Ritschel - 02-26-2015 03:33 PM
RE: Solver inside of HP basic - Powersoft - 03-06-2015, 04:18 PM



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