MATH.PAS
type definitions
Depending upon whether or not MATH.PAS
is compiled to do
floating
point manipulations in hardware or software, the
routines
will return different values.
float = either "real" or
"double" depending upon the
status of the N option.
xfloat = either "real" or
"extended" depending upon the
status of the N option.
The "float" type is expected
to be the primary storage
mechanism
for application programs. The
"xfloat" type is
provided
to maximize precision in expressions.
There are only a
few
functions where it is important to know the difference. They
are:
deg2dms -- returns "float"
values through the DMS
arguments
modf -- returns a
"float" value through one of its
arguments
poly -- expects the polynomial coefficients to be an
array of "float"
rad2dms -- returns "float"
values through the DMS
arguments
remf -- returns a "float" value through one of its
arguments
(Because
of Turbo Pascal's strong type-checking, you may run into
an
occasional problem where you've declared a "real" or "double"
variable
-- or you're redefined "float" in another unit -- and
can't
pass the variable to one of the above routines. In those
cases,
you should be able to do variable type-casting --
"math.float(x)"
to bypass the type-checking. This
should be done
with
care.)
For
programmer convenience, MATH.PAS defines a structured type
called
"floatray" which is the largest array that can hold
elements
of type "float" (as defined above).
There is normally
no need
to refer to "floatray" in application programs.