Trigonometry

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Trigonometry

cadet1620
Administrator
You can do a lot with a very simple computer!

I present for your enjoyment, Trigonometry: A Sequel to Floating Point.

Trig screen shot

Here's the source: Trig_1_0.zip. The test program is too big to run on the CPU emulator so I needed to split it in two. Trig-test.hack and Trig-plot.hack are included in the source zip. Warning: Trig-plot.hack takes about 40 minutes on my home PC.

The trig functions are built around the CORDIC algorithm.

--Mark

Reply | Threaded
Open this post in threaded view
|

Re: Trigonometry

ybakos
let mind = blown;
Reply | Threaded
Open this post in threaded view
|

Re: Trigonometry

cadet1620
Administrator
In reply to this post by cadet1620
cadet1620 wrote
The test program is too big to run on the CPU emulator so I needed to split it in two.
My VMTranslator has learned some good optimization tricks since 2013.

Here is the complete test program that can be run on the CPU Emulator:
    Trig.hack  (26016 instructions)

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: Trigonometry

Lozminda
In reply to this post by cadet1620
Awesome !!!