Datasheet

Development Systems Ordering Guide
DS30177T-page 12 © 2005 Microchip Technology Inc.
dsPIC30F Math Library
The dsPIC30F Math Library is the compiled version of
the math library that is distributed with the highly
optimized, ANSI-compliant dsPIC30F MPLAB
®
C30
C Compiler (SW006012). It contains advanced single
and double-precision, floating-point arithmetic and
trigonometric functions from the standard ‘C’ header
file <math.h>. The library delivers small program code
size and data size, reduced cycles and high accuracy.
Features
The math library is callable from either MPLAB C30
or dsPIC30F Assembly language.
The functions are IEEE-754 compliant, with signed
zero, signed infinity, NaN (Not a Number) and
denormal support and operate in the
“Round-to-Nearest” mode.
Compatible with MPLAB ASM30 and MPLAB
LINK30, which are available at no charge from
Microchip’s web site.
Total library memory usage
(1,2)
:
- Code size: 5250 bytes
- Data size: 4 bytes
dsPIC
®
DSC Math Library Function and Performance
Function Group Function
Performance
(Cycles)
(1,2,3,4)
Basic Floating Point Addition 122
Subtraction 124
Multiplication 109
Division 361
Remainder 385
Trigonometric and
Hyperbolic
acos 478
asic 363
atan 696
atan2 3206
cos 3249
sin 2238
tan 2460
cosh 1049
sinh 525
tanh 338
Logarithmic and
Exponential
exp 530
frexp 39
Idexp 44
log 2889
log10 3007
Power Functions pow 2134
sqrt 493
Rounding Functions ceil 94
floor 51
Absolute Value Function fabs 6
Modular Arithmetic
Functions
modf 151
fmod 129
Note 1: Results are based on using the dsPIC30F
MPLAB
®
C30 Compiler (SW006012) version 1.20.
2: Maximum “Memory Usage” when all functions in the
library are loaded. Most applications will use less.
3: All performance statistics represented here are for
32-bit IEEE754 floating-point input and output data
types.
4: Performance (in instruction cycles) listed here
represent an average number of instruction cycles
required to perform the floating-point operation.
Ordering Information:
SW300020 dsPIC30F Math Library (Free download: www.microchip.com)
DS51443
“dsPIC30F Math Library Product Overview”
(Available at: www.microchip.com)
F
R
E
E