Title |
Title
Floating Point Routines
|
---|---|
Name |
Name
AN660
|
Date |
Date
06/24/2015
|
Application Categories |
Application Categories
Algorithms (Building Blocks) /
Math
|
Product Categories |
Product Categories
16-bit MCUs
8-bit MCU
dsPIC DSCs
|
Description |
Description
This application note presents implementations of the following math routines for the Microchip PICmicro microcontroller family: square root function, exponential function, base 10 exponential function, natural log function, common log function, trigonometric sine function trigonometric cosine function trigonometric sine and cosine functions power function, floor function, largest integer not greater than x, as float, floating point logical comparison tests integer random number generator Routines for the PIC16CXXX and PIC17CXXX families are provided in a modified IEEE 754 32-bit format together with versions in 24-bit reduced format. The techniques and methods of approximation pre-sented here attempt to balance the usually conflicting goals of execution speed verses memory consumption, while still achieving full machine precision estimates. Although 32-bit arithmetic routines are available and constitute extended precision for the 24-bit versions, no extended precision routines are currently supported for use in the 32-bit routines, thereby requiring more sophisticated error control algorithms for full or nearly full machine precision function estimation. Differences in algorithms used for the PIC16CXXX and PIC17CXXX families are a result of performance and memory considerations and reflect the significant platform dependence in algorithm design.
|
Title | Title | Download | Date | Size |
---|---|---|---|---|
AN660 Source Code - Floating Point Routines 343.0 KB 06/24/2015 | AN660 Source Code - Floating Point Routines | Download | 06/24/2015 | 343.0 KB |