Hacker News new | ask | show | jobs
by kens 2184 days ago
A couple other ways to compute the exponential function: The Intel 8087 coprocessor used CORDIC. The chip contained a ROM with the values of log2(1+2^-n) for various n. These constants allowed the exponential to be rapidly computed with shifts and adds.

The Sinclair Scientific calculator was notable for cramming transcendental functions into a chip designed as a 4-function calculator, so they took some severe shortcuts. Exponentials were based on computing 0.99^n through repeated multiplication. Multiplying by 0.99 is super-cheap in BCD since you shift by two digits and subtract. To compute 10^x, it computes .99^(-229.15*x). Slow and inaccurate, but easy to implement.

1 comments

I was going to say there is a great article about the Sinclair Scientific here:

http://files.righto.com/calculator/sinclair_scientific_simul...

And then I noticed who I'm replying to...

Despite its flaws, this calculator was quite an achievement, doing everything it did with a ROM that holds only 320 instructions.

That calculator is a hack in the most positive and brilliant sense of the word. Crazy constraints required crazy solutions. Amazing!
Yes, I like that article :-)