Section 4.15 Vocabulary
- floating-point:
-
A data type that represents numbers with an integer part and a fractional part. In C++, the default floating-point type is
double. - rounding error:
-
The difference between the number we want to represent and the nearest floating-point number.
- type cast:
-
An operation that explicitly converts one data type into another. In Java, it appears as a type name in parentheses, like
(int). - literal:
-
A value that appears in source code. For example,
"Hello"is a string literal, and74is an integer literal. - magic number:
-
A number that appears without explanation as part of an expression. It should generally be replaced with a constant.
- constant:
-
A variable, declared as
const, whose value cannot be changed. - NaN:
-
A special floating-point value that stands for βnot a numberβ.
- Inf:
-
A special floating-point value that stands for βtoo large to storeβ.
You have attempted of activities on this page.
