You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
% Computing C = ceil(r * 65536/f) in \numexpr is the delicate
% part, as r can be as large as f-1 hence 65535 and r*65536 would
% overflow. We could compute R=round(r*65536/f) ("scaling operation")
% then C=R+1 if R*f-65536*r<0, else C=R.
%
% The problem is then: how to get the sign of R*f-65536*r without
% overflow? I considered various ways.
Now my nephew who is good at maths says she sees various methods but as she was educated in LaTeX she can not help with the Plain e-TeX in the code!
Experience with the "up" and "down" macros has shown that it may be more efficient to do one or two more \numexpr than opt for the (admittedly clever and admired) detour hijacking TeX's built-in dimension input process. So please spell out what you have in mind and improve your software if possible. Thanks.
The text was updated successfully, but these errors were encountered:
In the branch of
\texdimenwithunit{<dim1>}{<dim2>}
handling thedim2=f sp
,f<65536
case, there is tantalizing code comment:texdimens/texdimens/texdimens.tex
Lines 800 to 806 in 4cbca9b
Now my nephew who is good at maths says she sees various methods but as she was educated in LaTeX she can not help with the Plain e-TeX in the code!
Experience with the "up" and "down" macros has shown that it may be more efficient to do one or two more
\numexpr
than opt for the (admittedly clever and admired) detour hijacking TeX's built-in dimension input process. So please spell out what you have in mind and improve your software if possible. Thanks.The text was updated successfully, but these errors were encountered: