HP 15C: Difference between revisions

133 bytes added ,  14:09, 8 April 2022
m
no edit summary
mNo edit summary
mNo edit summary
Line 16: Line 16:
As with period HP calculators, numbers are stored as 7 bytes (56 bits), 10 digits decimal mantissa plus two digits exponent Binary Coded Decimal (BCD). Internally 13 digits are used for higher accuracy, but the result is always rounded to 10 digits when delivered to the X register.<ref>Eric A. Evett, Paul J. McClellan, and Joseph P. Tanzini: ''Scientific Pocket Calculator Extends Range of Built-In Functions'', HP Journal, May 1983</ref> In practice this results in a at worst 9th digit correct result for built-in functions, and at worst 5th digit correct result for individual components of complex result.<ref>''HP-15C Owner's Handbook,'' June 1987, Edition 1</ref> Numerical overflow will toggle flag 9, stop program execution (if any), return +/-9.999999999E99 and start blinking the display. Underflow is silent and return a 0. Flag 9 can be used standalone for blinking the display under program control without execution interruption.
As with period HP calculators, numbers are stored as 7 bytes (56 bits), 10 digits decimal mantissa plus two digits exponent Binary Coded Decimal (BCD). Internally 13 digits are used for higher accuracy, but the result is always rounded to 10 digits when delivered to the X register.<ref>Eric A. Evett, Paul J. McClellan, and Joseph P. Tanzini: ''Scientific Pocket Calculator Extends Range of Built-In Functions'', HP Journal, May 1983</ref> In practice this results in a at worst 9th digit correct result for built-in functions, and at worst 5th digit correct result for individual components of complex result.<ref>''HP-15C Owner's Handbook,'' June 1987, Edition 1</ref> Numerical overflow will toggle flag 9, stop program execution (if any), return +/-9.999999999E99 and start blinking the display. Underflow is silent and return a 0. Flag 9 can be used standalone for blinking the display under program control without execution interruption.


Matrix math is implemented for up to 8x8 and supports common operations like LU decomposition, transpose and inversion. Singular matrices are perturbed slightly to avoid singularity. Euclidean (or Frobenius) norm and element wise absolute max can be calculated. Even complex matrices can be solved, expressing a complex matrix as a real matrix up to twice its size.<syntaxhighlight lang="text">
Matrix math is implemented for up to 8x8 and supports common operations like LU decomposition, transpose and inversion. Singular matrices are perturbed slightly to avoid singularity. Euclidean (or Frobenius) norm and element wise absolute max can be calculated. Even complex matrices can be solved, expressing a complex matrix as a real matrix up to twice its size, as outlined below:<syntaxhighlight lang="text">
For the 2x2 complex matrix:
For the 2x2 complex matrix:
| a1+ib1 a2+ib2 |
| a1+ib1 a2+ib2 |
Line 38: Line 38:
     | b1 b2 | a1 a2 |
     | b1 b2 | a1 a2 |
     | b3 b4 | a3 a4 |
     | b3 b4 | a3 a4 |
Which exploits the following relations:
For inverting:
(Z^(-1))~ = (Z~)^(-1)
For multiplication:
(YX)^P = Y~X^P
</syntaxhighlight>
</syntaxhighlight>
60

edits