X^Y on the Elektronika B3-19M - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: Not HP Calculators (/forum-7.html) +--- Forum: Not quite HP Calculators - but related (/forum-8.html) +--- Thread: X^Y on the Elektronika B3-19M (/thread-10795.html) |
X^Y on the Elektronika B3-19M - Harald - 05-24-2018 10:22 PM The Elektronika B3-19M has a 3 level stack (x, y, z). It has an X^Y function that works as expected. The result is identical to pressing 'ln', '*', 'e^x'. What puzzles me is, that the later leves the z register intact an duplicates its contents into y (as expected), while the dedicated 'x^y' places ln10 in both z and y register. The manual says that z is lost, but I have no idea what ln10 might be used for in calculating x^y. Any thoughts? Cheers, Harald RE: X^Y on the Elektronika B3-19M - burkhard - 05-24-2018 11:52 PM That is very strange. Perhaps work of Moose and Squirrel? RE: X^Y on the Elektronika B3-19M - mfleming - 05-25-2018 01:10 AM Is meant to confuse! RE: X^Y on the Elektronika B3-19M - watchmaker - 08-07-2018 05:23 PM The result of "x^y" differs slightly from the result of "ln"+"*"+"e^x" (unlike B3-21, B3-34!). E. g., 8 | 8 x^y gives 16777188, 8 | 8 ln * e^x gives 16777173. But the same operation with DECIMAL logarithms (8 | 8 lg * | 10 ln * e^x) gives 16777188. Most probably it uses a similar algorithm, directly placing ln(10) in Z. RE: X^Y on the Elektronika B3-19M - Harald - 08-08-2018 07:07 AM (08-07-2018 05:23 PM)watchmaker Wrote: The result of "x^y" differs slightly from the result of "ln"+"*"+"e^x" (unlike B3-21, B3-34!). E. g., 8 | 8 x^y gives 16777188, 8 | 8 ln * e^x gives 16777173. But the same operation with DECIMAL logarithms (8 | 8 lg * | 10 ln * e^x) gives 16777188. Most probably it uses a similar algorithm, directly placing ln(10) in Z. Thanks for the hint, that is interesting! So the result is a bit closer to the correct 16777216. I still wonder why you would make the calculation more complicated and loose a register for this minor improvement. But I guess that is what they must have done. Cheers, Harald RE: X^Y on the Elektronika B3-19M - Albert Chan - 08-08-2018 11:43 AM (08-07-2018 05:23 PM)watchmaker Wrote: The result of "x^y" differs slightly from the result of "ln"+"*"+"e^x" (unlike B3-21, B3-34!). E. g., 8 | 8 x^y gives 16777188, 8 | 8 ln * e^x gives 16777173. But the same operation with DECIMAL logarithms (8 | 8 lg * | 10 ln * e^x) gives 16777188. Most probably it uses a similar algorithm, directly placing ln(10) in Z. Perhaps ln(10) is needed to reduce argument for exp(x), for speed and accuracy. ln(8 ^ 8) = 8 ln(8) = 16.63553233 = 7 ln(10) + 0.517436682 8^8 = 10^7 * exp(0.517436682) = 10^7 * 1.6777216 |