GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
gcc/modula2

Enable complex arc functions in Modula-2 libraries

Modula-2 now supports complex arc trig functions in its ISO libraries by leveraging GCC's built-in functions.

This change enables the complex arc sine, cosine, and tangent functions for the Modula-2 ISO libraries by ensuring proper testing and use of GCC’s built-in trig functions. It addresses an incomplete set of builtin tests and filters these functions based on LONGREAL support, improving the completeness of the Modula-2 math library.

In Details

This commit refactors Modula-2's built-in function handling (m2builtins.cc) to correctly test and enable complex arc trigonometric functions (arcsin, arccos, arctan) for the ISO libraries. It introduces data_type_supported and param_data_type_supported to verify LONGREAL support for these complex math functions, resolving issues found in PR127204.

For Context
builtin functions
Functions that are recognized and often implemented directly by the compiler, potentially offering performance advantages or specific hardware optimizations.
ISO libraries
Standard libraries defined by the International Organization for Standardization, which Modula-2 aims to implement for portability and compatibility.
LONGREAL
A floating-point data type in Modula-2, typically representing double-precision floating-point numbers, which is necessary for complex number calculations.
PR127204
A Public Relations (bug report) number indicating an issue filed by a user, in this case related to incomplete testing of builtin functions.
Filed Under: modula2librarymath