Bob Tennent wrote:
>  >|> It should be functionally identical to musixflx.c (up to round-off
> >|error).
>  >|
>  >|Is this just a throw-away line or are there actual systemic differences
> >|in the precision of the floating point variables used? Floating point
> >|calculations are a CPU function - it would be beneficial if the results
> >|strived to be *identical* on the same architecture (a guarantee which
> TeX  >|provides).
> 
> That's because TeX doesn't do floating-point! One of the reasons (the
> other being the lack of arrays) that a separate musiflx program was
> introduced.

Internally TeX does (at least the paragraphing algorithm uses floating point) - 
that's why the TRIP test can have rounding errors in some of the calculations 
and so numbers in logs are allowed to differ but still pass the TRIP test.

> The differences are in the last digit and since there are no significant
> numerical calculations involved, I'm guessing the differences arise from
> differences in the output formatting.
> 
>  >|I'm not terribly familiar with Lua, but I would anticipate  >|that C
> will be more flexible here - both scripts should use the same  >|floating
> point representation for calculations which will eliminate all  >|sources
> of non-algorithmic rounding error (if necessary, the C script  >|could be
> changed).
> 
> I think that's called moving the goalposts :+)

Possibly, but if two scripts were being maintained then I'd maintain that 
identical output is the more critical thing to have (and, yes, in the 16th 
decimal place - no optimising compiler re-orders floating point instructions 
without being told that unsafe optimisations are allowed precisely because the 
results can differ, the same algorithm over the same precision of floating 
point representation should produce *exactly* the same output regardless of 
language)
 
But that said...

<snip>

> I think it would be much better to
> incorporate the musixflx calculations into musixtex.tex and make LuaTeX a
> requirement for MusiXTeX.

I was thinking that binding musixtex to a specific TeX driver was too radical 
but if that's the plan then it seems like a very good idea - anyone who wishes 
to use an alternate TeX driver with musixtex can then be expected to install a 
lua interpreter themselves. And of course if luatex is the required driver (and 
musixflx.lua is still available in the distribution) then there'd be no need to 
maintain musixflx.c any more.


David

-------------------------------
[email protected] mailing list
If you want to unsubscribe or look at the archives, go to 
http://tug.org/mailman/listinfo/tex-music

Reply via email to