# HP Forums

Full Version: Exact, approx...: QPI
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi,
testing a program I get 7.19999999996, so (in CAS) I hit approx/exact (a b/c) and I get ... 35999357551/4999910771 :-)
That in Home is simply 36/5.
Lucky there is QPI program (by Han).
It would be nice to have a better rationalization in the Prime by default also in CAS...
For now, a part of QPI, a tip is to insert the "strange long long number or fraction" in the command line, to pass into Home, convert into fraction and then pass again in CAS...
Ora am I missing something?

Salvo
(06-09-2015 09:32 PM)salvomic Wrote: [ -> ]hi,
testing a program I get 7.19999999996, so (in CAS) I hit approx/exact (a b/c) and I get ... 35999357551/4999910771 :-)
That in Home is simply 36/5.
Lucky there is QPI program (by Han).
It would be nice to have a better rationalization in the Prime by default also in CAS...
For now, a part of QPI, a tip is to insert the "strange long long number or fraction" in the command line, to pass into Home, convert into fraction and then pass again in CAS...
Ora am I missing something?

Salvo

Good news: you can control the accuracy of the "exact" function by setting the value of "epsilon" on page 2 of CAS Settings. By changing epsilon to something more granular than the default 1e-12 (try 1e-10, for example), you'll get what you're looking for.

You can also control the accuracy of the "exact" function from within a program, but it must be a CAS program, e.g. epsilon:=1e-10 (notice that it's epsilon, not Epsilon).

By the way, this ability to control the accuracy of the "exact" function by altering the value of epsilon in CAS, closely parallels the ability to control the accuracy of the [a b/c] button in Home by altering the display setting (e.g. Fixed 4). One of the biggest differences is that [a b/c] can only be adjusted by powers of 10, whereas epsilon can have any value between 1e-6 and 1e-15 (I don't think that range is documented anywhere).
(06-10-2015 05:25 AM)Joe Horn Wrote: [ -> ]Good news: you can control the accuracy of the "exact" function by setting the value of "epsilon" on page 2 of CAS Settings. By changing epsilon to something more granular than the default 1e-12 (try 1e-10, for example), you'll get what you're looking for.

You can also control the accuracy of the "exact" function from within a program, but it must be a CAS program, e.g. epsilon:=1e-10 (notice that it's epsilon, not Epsilon).

By the way, this ability to control the accuracy of the "exact" function by altering the value of epsilon in CAS, closely parallels the ability to control the accuracy of the [a b/c] button in Home by altering the display setting (e.g. Fixed 4). One of the biggest differences is that [a b/c] can only be adjusted by powers of 10, whereas epsilon can have any value between 1e-6 and 1e-15 (I don't think that range is documented anywhere).

thank you, Joe,
I'll try on epsilon for curiosity. It's fun to experiment with the settings on the Prime :-)
Maybe 12 for epsilon is not good enough, or ...it's too good; luckily it could be varied...

Salvo

EDIT: Joe, thank you, with epsilon 1e-10 in CAS, with "a b/c" now I get 36/5 and not the ugly fraction
Reference URL's
• HP Forums: https://www.hpmuseum.org/forum/index.php
• :