See the article for links. I'm not really into z80 programming lately, but this sounds like something to try. Sounds like you could do trig functions without the use of sine/cosine, eliminating the need for look-up tables. I dont know about square-root use though."Dr. Norman Wildberger, of the South Wales University, has redefined trigonometry without the use of sines, cosines, or tangents. In his book about Rational Trigonometry (sample PDF chapter), he explains that by replacing distance and angles with new concepts: quadrance, and spread, one can express trigonometric problems with simple algebra and fractional numbers. Is this the beginning of a new era for math?"
Trigonometry without sine/cosine
Moderator: MaxCoderz Staff
Trigonometry without sine/cosine
An interesting news item on Slashdot catched my attention:
-
- Calc Wizard
- Posts: 526
- Joined: Tue 08 Mar, 2005 1:37 am
- Location: who wants to know?
- Contact:
It looks like you have to choose between trigs and divs/sqrs, I'd prefer the trig LUTs. Also, how does one rotate linearly using spread?
After a very short moment of thinking, I think trigs are better. Trig is not easy to use in order to obtain numerical results but they are beautifully simple in mathematical expressions at high levels and are very intuitive (compared to 'quadrance' and 'spread'). Seeing angles and real lengths is natural for us humans, squares and nonlinear relationships mess things up badly.
This might be interesting to people that have a bad habit of solving problems using numbers (from experience, american books are the worst ). As long as algebra and common sense is used, numerical drawbacks will never be a problem and therefore the talk about truncated Taylor-series to find values for trigs is just bulloney. Answers are obtained in the end with the proper precision needed, numbers will never be as precise no matter what operations are used.
lecks: You're a little fed up, aren't you? Duck posted this topic in the TI discussion forum because he thought this might be of use for calcs. TI discussion section: threads that relate to TI calculators, such as new ideas to improve programming tech currently used.
Grab a cool drink, relax and use your logic.
After a very short moment of thinking, I think trigs are better. Trig is not easy to use in order to obtain numerical results but they are beautifully simple in mathematical expressions at high levels and are very intuitive (compared to 'quadrance' and 'spread'). Seeing angles and real lengths is natural for us humans, squares and nonlinear relationships mess things up badly.
This might be interesting to people that have a bad habit of solving problems using numbers (from experience, american books are the worst ). As long as algebra and common sense is used, numerical drawbacks will never be a problem and therefore the talk about truncated Taylor-series to find values for trigs is just bulloney. Answers are obtained in the end with the proper precision needed, numbers will never be as precise no matter what operations are used.
lecks: You're a little fed up, aren't you? Duck posted this topic in the TI discussion forum because he thought this might be of use for calcs. TI discussion section: threads that relate to TI calculators, such as new ideas to improve programming tech currently used.
Grab a cool drink, relax and use your logic.
-
- Calc Wizard
- Posts: 526
- Joined: Tue 08 Mar, 2005 1:37 am
- Location: who wants to know?
- Contact:
The main thing that spreads screw up is angles adding up to 180 in a triangle. If you know 2 spreads of a triangle, you can still calculate the third (using the "Triple Spread Formula"), but it's much more work.
Example: you have spreads of 1/3 and 1/2. Calculate the other spread:
(5/6 + x)^2 = 2(13/36 + x^2) + 2/3*x
25/36 + x^2 + x = 26/36 + 2*x^2
x^2 - x + 1/36 = 0
x = (3 + 2*sqrt(2))/6 (we take the pos. root because spreads can't be negative.
And there goes the "rational" part of Rational Trigonometry.
Example: you have spreads of 1/3 and 1/2. Calculate the other spread:
(5/6 + x)^2 = 2(13/36 + x^2) + 2/3*x
25/36 + x^2 + x = 26/36 + 2*x^2
x^2 - x + 1/36 = 0
x = (3 + 2*sqrt(2))/6 (we take the pos. root because spreads can't be negative.
And there goes the "rational" part of Rational Trigonometry.
-
- Calc Wizard
- Posts: 526
- Joined: Tue 08 Mar, 2005 1:37 am
- Location: who wants to know?
- Contact:
True. But angles are far less nasty.
But spreads do have their moments, some theorems look quite nice when written in RatTrig form.
Edit: whatever happens to side-angle-side triangle congruence?
Edit: formulas for whatever he called the square of the area of a triangle (x,y,z = quadrances of sides, X,Y,Z = spreads, b,h = quadrances of base/height)
A2 = x*y*Z / 4
A2 = 2(xy+xz+yz) - x^2 - y^2 - z^2
A2 = b*h / 4
But spreads do have their moments, some theorems look quite nice when written in RatTrig form.
Edit: whatever happens to side-angle-side triangle congruence?
Edit: formulas for whatever he called the square of the area of a triangle (x,y,z = quadrances of sides, X,Y,Z = spreads, b,h = quadrances of base/height)
A2 = x*y*Z / 4
A2 = 2(xy+xz+yz) - x^2 - y^2 - z^2
A2 = b*h / 4
-
- Calc King
- Posts: 2195
- Joined: Sun 27 Mar, 2005 4:06 am
- Location: sleeping
- Contact:
- benryves
- Maxcoderz Staff
- Posts: 3088
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
I love my .dbsin assembler directive too much.
I can't see how a LUT is going to be "beaten" (other than reasons of space) for speed...
I read that this was for "simplifying" trig. Has anyone ever found "normal" trig to be difficult? When integrating some of the more "exciting" trig functions things can get a bit sticky, but for most basic geometry trig is dead simple!
I can't see how a LUT is going to be "beaten" (other than reasons of space) for speed...
I read that this was for "simplifying" trig. Has anyone ever found "normal" trig to be difficult? When integrating some of the more "exciting" trig functions things can get a bit sticky, but for most basic geometry trig is dead simple!
I was going to say that.....Dwedit wrote:Lookup tables are fast when memory access is not a bottleneck. On fast PC's, it's sometimes faster to calculate something than to wait for RAM to give you your lookup table result.
hm... so basically this idea was put on hold because of the difficulty to calculate back in the 1900s?
Currently coming up with a new signature idea... since my forum avatar changer was killed by an upgrade...
-
- Regular Member
- Posts: 136
- Joined: Tue 11 Jan, 2005 10:10 pm
- Location: No longer in the Midwest... now in Seattle
- Contact:
If the LUT's are used frequently, they will be cached, and likely quicker than all but the simplest of calculations. I don't recall offhand how trig functions are numerically approximated, but I think there are a fair number of computations required. Do you have any emperical evidence of what you claim?Dwedit wrote:Lookup tables are fast when memory access is not a bottleneck. On fast PC's, it's sometimes faster to calculate something than to wait for RAM to give you your lookup table result.