From: "Rick Bensene" <rickb at
bensene.com>
---snip---
Slightly off-topic, but still within the "Classic Computer" realm: I'm
currently in the process of doing this for the Wang 720C calculator. I
have successfully dumped the microcode out of the machine, and have
written a simulator in Perl that simulates the hardware environment of
the calculator, and executes the microcode. I've still got a few minor
glitches in the simulation, but for the most part, everything works.
The only problem I have at this point is that for some reason, the base
10 logarithm function gives a result that is the base e logarithm rather
than the base 10 log. The base e logarithm function (clearly) works
fine. The microcode appears to be heavily shared for these two
functions, so there's probably something wrong with some implementation
of the machine's logic in the simulation that causes a branch to be
missed, or mis-interpreted.
---snip---
Hi Rick
I was going to mention that calculating logs is generally done the same
way in calculators, regardless of the base. They usually calculate it in
base 2 and then multiply by a constant to change to a different
base.
as an example:
log2(n)*ln(2)=ln(n)
log2(n)*log(2)=log(n)
or if calculates the natural log first
ln(n)*log(e)=log(n)
or even
log(n)*ln(10)=log(n) if it does decimal log first.
I hope this helps some.
Dwight
_________________________________________________________________
http://liveearth.msn.com