Post Reply 
X^Y on the Elektronika B3-19M
05-24-2018, 10:22 PM
Post: #1
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
Find all posts by this user
Quote this message in a reply
05-24-2018, 11:52 PM
Post: #2
RE: X^Y on the Elektronika B3-19M
That is very strange.
Perhaps work of Moose and Squirrel?
Find all posts by this user
Quote this message in a reply
05-25-2018, 01:10 AM
Post: #3
RE: X^Y on the Elektronika B3-19M
Is meant to confuse!
[Image: rockybullwinkle65.jpg]
Find all posts by this user
Quote this message in a reply
08-07-2018, 05:23 PM
Post: #4
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.
Find all posts by this user
Quote this message in a reply
08-08-2018, 07:07 AM
Post: #5
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
Find all posts by this user
Quote this message in a reply
08-08-2018, 11:43 AM
Post: #6
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
Find all posts by this user
Quote this message in a reply
Post Reply 




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