SW500008 Microchip Technology, SW500008 Datasheet - Page 60

PICC-18 STD

SW500008

Manufacturer Part Number
SW500008
Description
PICC-18 STD
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC18r
Datasheets

Specifications of SW500008

Supported Families
PIC18
Core Architecture
PIC
Software Edition
Standard
Kit Contents
Software And Docs
Mcu Supported Families
PIC18
Tool Function
Compiler
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
PIC18 Series
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
015
778-1001
778-1001
Supported Data Types and Variables
3.4.7 Floating Point Types and Variables
Floating point is implemented using either a IEEE 754 32-bit format or a modified (truncated) 24-bit
form of this.
default, or if the --double=24 option is used. The 32-bit format is used for double values if the
--double=32 option is used.
The value of this number is (-1)
radix point) is the implied bit, which is assumed to be 1 unless the exponent is zero (in which case
the float is zero).
number to the right of the decimal point in the mantissa. Convert this to decimal and divide it by 2
46
Format
32-bit
24-bit
The 24-bit format is used for all float values. For double values, the 24-bit format is the
This format is described in 3.7, where:
Here are some examples of the IEEE 754 32-bit formats:
Note that the most significant bit of the mantissa column in
The 32-bit example in
The sign bit is zero; the biased exponent is 251, so the exponent is 251-127=124. Take the binary
IEEE 754 32-bit
modified IEEE 754 24-bit
sign is the sign bit
The exponent is 8-bits which is stored as excess 127 (i.e. an exponent of 0 is stored as 127).
mantissa is the mantissa, which is to the right of the radix point. There is an implied bit to the
left of the radix point which is always 1 except for a zero value, where the implied bit is zero.
A zero value is indicated by a zero exponent.
Format
Number
7DA6B69Bh
42123Ah
Table 3.8: Floating-point format example IEEE 754
3.8
can be calculated manually as follows.
biased expo-
nent
11111011b
10000100b
sign
Table 3.7: Floating-point formats
Sign
x
x
(251)
(132)
x 2
exponent 127
biased exponent
xxxx xxxx
xxxx xxxx
1.01001101011011010011011b
1.001001000111010b
x 1.mantissa.
(1.302447676659)
(1.142395019531)
1.mantissa
xxx xxxx xxxx xxxx xxxx xxxx
xxx xxxx xxxx xxxx
3.8
(that is the bit to the left of the
mantissa
C Language Features
2.77000e+37
36.557
decimal
23

Related parts for SW500008