SW006010 Microchip Technology, SW006010 Datasheet - Page 107

no-image

SW006010

Manufacturer Part Number
SW006010
Description
MPLAB 17C SOFTWARE
Manufacturer
Microchip Technology
Datasheets

Specifications of SW006010

Tool Function
Compiler
Tool Type
Compiler
Processor Series
PIC17C
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
MPLAB®
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
5.1
5.2
5.3
 2002 Microchip Technology Inc.
INTRODUCTION
HIGHLIGHTS
32-BIT INTEGER AND 32-BIT FLOATING POINT MATH LIBRARIES
This chapter documents math library functions. For more information on math libraries,
see the Embedded Control Handbook, Volume 2 (DS00167). See the MPASM™ User's
Guide with MPLINK™ and MPLIB™ (DS33014) for more information on creating and
using libraries in general.
This chapter is organized as follows:
• 32-Bit Integer and 32-Bit Floating Point Math Libraries
• Decimal/Floating Point and Floating Point/Decimal Conversions
The math routines used by MPLAB-C17 are based on the Microchip Application Note
AN575. Source code for the routines may be found in the c:\mcc\src\math
directory, where c:\mcc is the compiler install directory. These source files have been
compiled into object code and added to a library called cmath17.lib, which may be
found in the c:\mcc\lib folder. The cmath17.lib file must be included during the
linking process when using floating point or 32-bit integer routine function calls in your
C code.
The mathematical functions performed by the floating point library routines are: 32-bit
signed and unsigned integer multiplication; 32-bit signed and unsigned integer division;
32-bit floating point multiplication and division. The routines also contain conversion
functions to go from 8, 16 and 32-bit signed and unsigned integers to 32-bit floating
point, as well as a 32-bit floating point conversion to 32-bit integer. Calling conventions
will be discussed later.
5.3.1
Floating point numbers are represented in a modified IEEE-754 format. This format
allows the floating-point routines to take advantage of the processor architecture and
reduce the amount of overhead required in the calculations. The representation is
shown below:
where s is the sign bit, y is the LSb of the exponent and x is a placeholder for the
mantissa and exponent bits.
IEEE-754
Microchip
Format
Floating Point Representation
Chapter 5. Math Library
sxxx xxxx
xxxx xxxy
Exponent
MPLAB
yxxx xxxx
sxxx xxxx
Mantissa 0
®
C17 C COMPILER
xxxx xxxx
xxxx xxxx
Mantissa 1
LIBRARIES
apRNOVS^-page 103
xxxx xxxx
xxxx xxxx
Mantissa 2

Related parts for SW006010