In this section we describe the abstract values of C++ floating point types,
by giving the traits used to model them in Larch/C++.
The common foundation for the various floating point traits
is the trait FloatingPoint
found in the LSL Handbook
(Appendix A of [Guttag-Horning93]).
See section 4.13 Literals for the syntax of literals that denote abstract values of the sorts specified here.
The abstract values of float
types are described by the trait
float
.
The names FLT_MIN
, FLT_MAX
, and FLT_EPSILON
are given in section 3.2.2c of [Ellis-Stroustrup90],
as to be defined in the header <float.h>
.
The names of the similar constants used for doubles and long doubles
are in the same place.
% @(#)$Id: float.lsl,v 1.4 1994/11/16 05:01:22 leavens Exp $ float(float): trait includes FloatingPoint(to_float for float, FLT_MIN for smallest, FLT_MAX for largest, FLT_EPSILON for gap, float for F), NoContainedObjects(float)
The abstract values of double
types are described by the trait
double
.
% @(#)$Id: double.lsl,v 1.4 1995/01/27 18:56:58 leavens Exp $ double: trait includes float(to_double for to_float, DBL_MIN for FLT_MIN, DBL_MAX for FLT_MAX, DBL_EPSILON for FLT_EPSILON, double for float)
The abstract values of long double
types are described by the trait
longDouble
.
% @(#)$Id: longDouble.lsl,v 1.4 1995/01/27 18:56:58 leavens Exp $ longDouble: trait includes float(to_longDouble for to_float, LDBL_MIN for FLT_MIN, LDBL_MAX for FLT_MAX, LDBL_EPSILON for FLT_EPSILON, longDouble for float)
Go to the first, previous, next, last section, table of contents.