[fpc-devel] System / Math unit problems (BaseMath?)

J. Gareth Moreton gareth at moreton-family.com
Tue Apr 22 23:58:50 CEST 2025


Hi everyone,

Has there been any decision on what to do with mathematical 
functionality that's shared across units?  I bring this up because while 
trying to optimise an internal mathematical routine (ldexp), I 
discovered there are two different versions in use - one in the Math 
unit and a private one in the System unit - both of which are written 
differently.

This makes trying to optimise a version for a specific CPU extremely 
difficult or even to just maintain the Pascal code.

I would like to recommend an approach to merge these two versions for 
better maintainability and potentially smaller binaries (so only one 
version of ldexp is included).  What I've discovered so far... if you 
include the Math unit, that grants access to its own generic ldexp 
routine, while the internal sin and cos routines in the System unit use 
their own ldexp subroutine.

Kit


-- 
This email has been checked for viruses by Avast antivirus software.
www.avast.com


More information about the fpc-devel mailing list