Just for completeness, you can also define your own basic floating point types, rather than using one called Float , which may or may not have the required range.
For example, Float defined somewhere in the sources of the compiler or RTS (Runtime System), possibly as type Float is digits 7; next to type Long_Float is digits 15; that gives you 7 and 15 digits respectively.
You can also define your needs to meet the accuracy and range required by your application. The philosophy is to indicate what you need (in range and accuracy) and let the compiler satisfy it most efficiently. This is programming in a problem area, stating what you want, not in the solution domain, tying your program to something that supports a specific computer or compiler.
The compiler will use the next top-level plugin with the highest accuracy (usually with 32-bit or 64-bit IEEE floats) or complains that it cannot do this
(e.g. if you declare
type Extra_Long_Float is digits 33 range 0.0 .. Long_Float'Last * Long_Float'Last;
your compiler may complain if it does not support 128-bit floats.
source share