Post Reply 
help with exact command. [Solved]
04-27-2016, 08:03 AM
Post: #8
RE: help with exact command. [Solved]
(04-27-2016 06:02 AM)Spybot Wrote:  We can actually restore epsilon on FW 8151...
[…]
I know the User might have a different value assigned to epsilon, that the part I'm still figuring out.

Yes it's possible with 8151 but it's much simpler with the latest firmware thanks to the CAS access to local variables …

On 8151, instead of restoring a fixed value as in your example:
Code:
CAS("0.00000000001▶epsilon");
you have to build a string with the saved value of epsilon like that:
Code:
STRING(saved_epsilon)+"▶epsilon"▶restore_epsilon;
CAS(EVAL(restore_epsilon));

So this program should work on both 8151 and 10077 (not tested on 8151 as I don’t have a 8151 firmware on hand):
Code:
EXPORT z()
BEGIN
LOCAL M, saved_epsilon, restore_epsilon;
PRINT;
CAS("epsilon")▶saved_epsilon;
CAS("0.001▶epsilon");
PRINT("temporary epsilon ="+CAS("epsilon"));
M:=0.333;
M:=exact(M);
PRINT("number...= "+M);
STRING(saved_epsilon)+"▶epsilon"▶restore_epsilon;
CAS(EVAL(restore_epsilon));
PRINT("epsilon already restored="+CAS("epsilon"));
END;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
help with exact command. [Solved] - Spybot - 04-25-2016, 07:54 PM
RE: help with exact command. - Spybot - 04-25-2016, 08:33 PM
RE: help with exact command. - DrD - 04-25-2016, 09:27 PM
RE: help with exact command. - Spybot - 04-25-2016, 11:18 PM
RE: help with exact command. [Solved] - Didier Lachieze - 04-27-2016 08:03 AM



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