returns a, and
getdenom(temp)
returns b.
(Credit to Frank Westlake)
[2.12] Testing equivalence of symbolic expressions
The CAS (computer algebra system) of the 89/92+ does the best it can, but it can return expressions in
unexpected forms. To test if two expressions expr1 and expr2 are equal, just try
expr1 - expr2
which will return 0 if the two expressions are equivalent, or
expr1 = expr2
which will return true if the expressions are equivalent.
These tests may fail even if the expressions are equivalent, if the CAS does not include the necessary
identities. As a last resort, you can calculate a numeric result for the two expressions, substituting
numbers for the variables. As an example, consider the trigonometric identity
and
✕
=
tan
−
1 b
a
✕
=
sin
−
1
b
a2
+
b2
where a and b are the sides of a right triangle. The CAS cannot recognize that these two equations are
equal, because, in general, the two arguments are not equal. However, executing
approx(tan
(b/a)-sin
(b/(
√
(a^2+b^2))))|a=2 and b=3
returns 0.0. This approach requires care, because it can indicate that expressions are equal when they
are not, or vice versa. For example, round-off errors in evaluating the functions may return a result that
is very small, but not zero. Further, you need to be careful in selecting the numbers to use for the
variables. These guidelines help somewhat:
1. Don't use 0 or 1. These cause sum and product terms to drop out when they should not.
2. Use numbers that are relatively prime. This prevents equality of specific ratios.
3. Don't use pi, fractions of pi, or multiples of pi for trigonometric expressions in radians. These
can cause trigonometric identities to return equal values when they are not, in general, equal.
Similarly, don't use even multiples of 90° for trigonometric functions in Degree mode.
4. Don't use integers, for the same reasons as 1 and 2 above.
5. Try using random numbers. In this case the condition would be ...)|a=rand() and b=rand().
Using this method repeatedly with the example above, I got several results of 0, but also
40E-15, -40E-15, 10E-15, and so on. If you use random numbers, make sure the numbers are
valid for the function arguments. See tip [6.20] for functions to generate random numbers in a
specific range.
6. Repeat the calculation with different values.
2 - 7
Summary of Contents for TI-92+
Page 52: ...Component side of PCB GraphLink I O connector detail 1 41...
Page 53: ...LCD connector detail PCB switch side 1 42...
Page 54: ...Key pad sheet contact side Key pad sheet key side 1 43...
Page 55: ...Key cap detail 1 44...
Page 57: ...Component side of PCB with shield removed A detail view of the intergrated circuits 1 46...
Page 410: ...void extensionroutine2 void Credit to Bhuvanesh Bhatt 10 4...