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.
In the branch of
\texdimenwithunit{<dim1>}{<dim2>}
handling thedim2=f sp
,f<65536
case, there is tantalizing code comment: https://github.com/jfbu/texdimens/blob/4cbca9bcab398c22f6cc79a2fc3bba1014700892/texdimens/texdimens.tex#L800-L806Now 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.