Post Reply 
Bugs when using ANS
06-20-2014, 05:15 PM
Post: #4
RE: Bugs when using ANS
(06-19-2014 10:17 AM)slawek39 Wrote:  2. approx(Ans) return wrong answer in Home (not from last element in History)

Yes, this is unexpected (and IMHO very annoying) but it's not really a bug. Here's why. There are two totally independent system variables which are both called Ans: one in Home, and one in CAS. All CAS functions (even when called from Home) use the CAS Ans. Since approx() is a CAS function, approx(Ans) will always use CAS's Ans (which is always whatever is at the bottom of the history stack in CAS), not Home's Ans (which is NOT always whatever is at the bottom of Home's history stack).

Try this:
CAS: 1+2 Enter --> 3
CAS: Ans Enter --> 3 (as expected)
Home: 5+6 Enter --> 11 (as expected)
Home: Ans Enter --> 11 (as expected)
Home: approx(Ans) --> 3 (yikes!!! it used CAS's Ans!)
Home: Ans --> 3 (Home's Ans got changed by the previous command!)

Solution: Use EVAL (Shift comma), not approx (Shift Enter) in Home when you want to evaluate Ans (or anything else):

CAS: 1+2 Enter --> 3
CAS: Ans Enter --> 3 (as expected)
Home: 5+6 Enter --> 11 (as expected)
Home: Ans Enter --> 11 (as expected)
Home: EVAL(Ans) --> 11 (ahh)

Personal opinion: Having two different values for Ans is a misfeature, since it makes Ans almost useless, since, to use Ans correctly, you have to memorize which functions are CAS functions and which are not. I hope that a future firmware update resolves this by having only one Ans, which is shared by both Home and CAS.

<0|ΙΈ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Bugs when using ANS - slawek39 - 06-19-2014, 10:17 AM
RE: Bugs when using ANS - Thomas Radtke - 06-19-2014, 10:44 AM
RE: Bugs when using ANS - slawek39 - 06-19-2014, 10:52 AM
RE: Bugs when using ANS - Joe Horn - 06-20-2014 05:15 PM
RE: Bugs when using ANS - Helge Gabert - 06-20-2014, 06:05 PM
RE: Bugs when using ANS - slawek39 - 06-24-2014, 06:39 PM



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