X^Y on the Elektronika B3-19M
05-24-2018, 10:22 PM
Post: #1
 Harald Senior Member Posts: 803 Joined: Dec 2013
X^Y on the Elektronika B3-19M
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
05-24-2018, 11:52 PM
Post: #2
 burkhard Senior Member Posts: 374 Joined: Nov 2017
RE: X^Y on the Elektronika B3-19M
That is very strange.
Perhaps work of Moose and Squirrel?
05-25-2018, 01:10 AM
Post: #3
 mfleming Senior Member Posts: 908 Joined: Jul 2015
RE: X^Y on the Elektronika B3-19M
Is meant to confuse!

Remember kids, "In a democracy, you get the government you deserve."
08-07-2018, 05:23 PM
Post: #4
 watchmaker Junior Member Posts: 7 Joined: Aug 2018
RE: X^Y on the Elektronika B3-19M
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.
08-08-2018, 07:07 AM
Post: #5
 Harald Senior Member Posts: 803 Joined: Dec 2013
RE: X^Y on the Elektronika B3-19M
(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
08-08-2018, 11:43 AM
Post: #6
 Albert Chan Senior Member Posts: 2,349 Joined: Jul 2018
RE: X^Y on the Elektronika B3-19M
(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
 « Next Oldest | Next Newest »

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