The a b/c key

03082017, 07:09 AM
(This post was last modified: 03082017 07:16 AM by Joe Horn.)
Post: #2




RE: The a b/c key
The fraction key actually works very differently in Home and in CAS.
In Home, pressing [a b/c] when a real number is the current result toggles an internal FRACTION DISPLAY MODE setting, without actually changing the number itself. And its accuracy is controlled by the current Home Setting Number Format and Decimal Places. For example, press PI Enter, then set in Home Settings "Fixed" format with 3 digits. Pressing [a b/c] will change the DISPLAY ONLY from 3.142 to 201/64, then to 3+9/64, then back to 3.142 without actually changing the real number that's there (namely, exactly 3.14159265359). So please note two things unique to Home: [a b/c] toggles the display only, without changing the number, AND the accuracy is controlled by the display settings in Home Settings. In CAS, pressing [a b/c] when a real number is the current result simply executes the EXACT function on it (returning a fraction approximation), thereby placing a new command and its result on the stack. The EXACT function's accuracy is controlled by the current value of "epsilon" (see CAS Settings, page 2), not by the display setting. Unfortunately, epsilon is only allowed to have values between 1E6 and 1E15. And pressing [a b/c] when an algebraic expression is the current result (e.g. a fraction) simply executes the APPROX function on it, thereby placing yet another new command and its result on the stack. Due to a fortuitous bug, there is a way to trick CAS's [a b/c] into using a value of epsilon larger than 1E6. For example, in CAS, put pi on the stack and press [a b/c] to obtain its approximate value. Now press CAS Settings, page down, and set epsilon to 1E3. Press CAS and then press [a b/c]. You will obtain 355/113, and epsilon will maintain its value of 1E3. This only happens if the [a b/c] key is pressed; typing "exact(approx(pi))" in CAS will result in epsilon being reset to 1E6. Also, any epsilon smaller than 1E15 will silently be treated as 1E15. Notice that Home returns 201/64 for a display setting of Fixed 3, while CAS returns 355/113 for an epsilon of 1E3. This is because Home uses the PDQ Algorithm for fraction approximations, while CAS uses the simple continued fraction algorithm. Therefore CAS's EXACT function will often miss simpler solutions that Home's [a b/c] key returns. If you obtain an improper fraction in CAS via the EXACT function, you can turn it into a mixed number with the PROPFRAC function, e.g. propfrac(355/113) > 3+16/113. <0ɸ0> Joe 

« Next Oldest  Next Newest »

Messages In This Thread 
The a b/c key  math7  03082017, 01:21 AM
RE: The a b/c key  Joe Horn  03082017 07:09 AM
RE: The a b/c key  math7  03082017, 08:14 PM
RE: The a b/c key  Han  03082017, 09:34 PM
RE: The a b/c key  Joe Horn  03092017, 03:50 AM
RE: The a b/c key  cyrille de brébisson  03092017, 06:16 AM
RE: The a b/c key  math7  03092017, 11:04 PM
RE: The a b/c key  Joe Horn  03102017, 03:06 AM
RE: The a b/c key  math7  03102017, 06:01 AM
RE: The a b/c key  Joe Horn  03102017, 11:55 PM
RE: The a b/c key  math7  03112017, 04:11 AM

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