How do I get Real valued and Complex valued math functions in Ada 95?
(from Jonathan Parker) Complex type and functions are provided by compilers that support the numerics Annex. The packages that use Float for the Real number and for the Complex number are: Ada.Numerics.Elementary_Functions; Ada.Numerics.Complex_Types; Ada.Numerics.Complex_Elementary_Functions; The packages that use Long_Float for the Real number and for the Complex number are: Ada.Numerics.Long_Elementary_Functions; Ada.Numerics.Long_Complex_Types; Ada.Numerics.Long_Complex_Elementary_Functions; The generic versions are demonstrated in the following example. Keep in mind that the non-generic packages may have been better tuned for speed or accuracy. In practice you won’t always instantiate all three packages at the same time, but here is how you do it: with Ada.Numerics.Generic_Complex_Types; with Ada.Numerics.Generic_Elementary_Functions; with Ada.Numerics.