On 2015/10/30 13:20:35, benko.pal wrote:
sorry to chime in that late, but:
am I right that the problem is that we get the rotation matrix
cos a   -sin a
sin a    cos a
inexact?  and if so, how the inexactness is present?  one of the
diagonals is
exactly +/-1 while the other is not exactly 0?
in that case I'd suggest (would have suggested) to perform a paranoid
normalization of the (cos a, sin a) vector, which e.g. normalizes (1,
1e-9) into
(1, 0).

cos x = 1 - x^2/2 + ...

So basically this "paranoid normalization" would suppress all low values
for approximately |x| < sqrt (2 ulp) where "ulp" is the relative
precision of our floats.

So that looks like quite a noticeable cutoff relying on numerics.  The
advantage would be that the code is simpler, but once the code gets out
of the clamped-down region, the precision would not be better.

I really think we should move everything to degrees except for the final
calculations.

https://codereview.appspot.com/269530043/

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to