SW500009 Microchip Technology, SW500009 Datasheet - Page 59

HI-TECH FOR DSPIC/PIC24

SW500009

Manufacturer Part Number
SW500009
Description
HI-TECH FOR DSPIC/PIC24
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC24 & DsPICr
Datasheet

Specifications of SW500009

Supported Families
PIC24
Core Architecture
PIC, DsPIC
Software Edition
Standard
Kit Contents
Software And Docs
Tool Type
Compiler
Mcu Supported Families
PIC24 MCUs And DsPIC DSCs
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
DSPIC3X/PIC24
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
025
778-1003
778-1003
C Language Features
quences, respectively, to hold values of these types. Where only long int is used in the declaration,
the type will be signed long. When specifying this type, the keyword int may be omitted. Thus
a variable declared as long will contain a signed long int and a variable declared as unsigned
long will contain an unsigned long int.
3.4.6 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
where 23 is the number of bits taken up by the mantissa, to give 0.302447676659. Add one to this
fraction. The floating-point number is then given by:
Variables may be declared using the signed long int and unsigned long int keyword se-
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.3, 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
1
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.
0
2
124
Format
1 302447676659
3.4
can be calculated manually as follows.
sign
Table 3.3: Floating-point formats
Sign
x
x
x 2
1 2 126764793256e 37 1 302447676659 2 77000e 37
exponent 127
biased exponent
xxxx xxxx
xxxx xxxx
x 1.mantissa.
xxx xxxx xxxx xxxx xxxx xxxx
xxx xxxx xxxx xxxx
Supported Data Types and Variables
3.4
(that is the bit to the left of the
mantissa
45
23

Related parts for SW500009