Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2025-04

System / Math unit problems (BaseMath?)

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

J. Gareth Moreton

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

Reply by email