122-32000 Parallax Inc, 122-32000 Datasheet - Page 217

MANUAL PROPELLER

122-32000

Manufacturer Part Number
122-32000
Description
MANUAL PROPELLER
Manufacturer
Parallax Inc
Datasheets

Specifications of 122-32000

Accessory Type
Manual
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With/related Products
Propeller Education (PE) Kit
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Here,
constant.
expressions, every value within the expression must be a floating-point value; you cannot mix
integer and floating-point values like
You can, however, use the
value, such as in the following:
The
form of that value so that it can be used in the floating-point expression.
About Floating Point
The Propeller compiler handles floating-point constants as a single-precision real number as
described by the IEEE-754 standard. Single-precision real numbers are stored in 32 bits, with
a 1-bit sign, an 8-bit exponent, and a 23-bit mantissa (the fractional part). This provides
approximately 7.2 significant decimal digits.
Floating-point constant expressions can be defined and used for many compile-time purposes,
but for run-time floating-point operations, the FloatMath and FloatString objects provide
math functions compatible with single-precision numbers.
See Constant Assignment ‘=’ in the Operators section on page 254,
TRUNC
information.
CON
FLOAT
Two
Ratio
Two
on page 314, as well as the the FloatMath and FloatString objects for more
is defined as an integer constant and
directive in this example converts the integer constant,
This causes an error on the
= 2
= float(Two) / 5.0
FLOAT
directive to convert an integer value to a floating-point
Ratio = 2 / 5.0
4: Spin Language Reference –
Ratio
Ratio
line because, for floating-point constant
appears to be defined as a floating-point
.
Propeller Manual v1.0 · Page 217
Two
ROUND
, into the floating-point
on page 303, and

Related parts for 122-32000