Mail Archives: geda-user/2015/09/13/22:03:22
On Sep 13, 2015, at 7:38 PM, DJ Delorie <dj AT delorie DOT com> wrote:
>
> So... internally *every* value is a fraction?
Yep.
> I imagine integer
> overflow might be a non-trivial problem to solve.
Not one you need to worry about in a language that supports rationals. I use rationals in Mathematica all the time: floating point is poison to complicated algebra. The techniques are well know and efficient, although not as efficient as floating point hardware.
>
> But if the whole point is to defer imprecise operations, what is the
> advantage of this over just storing the angles as degrees and doing
> the math on the fly?
The problem is that you’ll accumulate error when you have both rotations and translations.
> Just speed? /me wonders what the speed
> difference would be, if you include all the division ops you've
> created a need for,
Huh? Division of rationals is easy.
> plus algorithms to find pythagorean triples as
> needed,
Have a table. Or use Euclid’s formula (https://en.wikipedia.org/wiki/Pythagorean_triple#Generating_a_triple).
> plus overflow protection of a sort, etc.
Taken care of automatically if you choose a suitable language.
>
> I'm not even sure we've covered all the advantages of storing
> rotations as a relationship rather than a transformation... like, if
> we "down symbol" we'd want to edit the unrotated symbol.
>
John Doty Noqsi Aerospace, Ltd.
http://www.noqsi.com/
jpd AT noqsi DOT com
- Raw text -