Microchip’s ANSI C compiler provides full floating point math capability, enabling both the single and double precision floating point operations found in any standard ANSI C compiler. These include functions such as sin, cos, tan, and other common mathematical operations. |
|||
Description |
Features • Compatible with the Microchip PIC24and dsPIC families • Support for double or single precision floating point • Includes common operations such as sin, cos, tan, etc. Devices Supported Getting Started • See Chapter 3 of the 16-bit Language Tools for complete documentation of the Floating Point Math Library • Start writing floating point code! |
||
Common Floating Point Math Functions |
|||
Function |
Description |
||
sin/sinf* |
Sin of a double/single precision floating point variable |
||
cos/cosf* |
Cos of a double/single precision floating point variable |
||
tan/tanf* |
Tan of a double/single precision floating point variable |
||
exp/expf* |
Calculates the exponential function of a double/single precision floating point variable |
||
fabs/fabsf* |
Calculates the absolute value of a double/single precision floating point variable |
||
fmod/fmodf* |
Calculates the remainder of x/y as a double/single precision floating point value |
||
log/logf* |
Calculates the log of a double/single precision variable |
||
sqrt/sqrtf* |
Calculates the square root of a double/single precision variable |
||
pow/powf* |
Calculates x raised to the power of y |
||
floor/floorf* |
Calculates the floor of a double/single precision floating point variable |
||
ceil/ceilf* |
Calculates the ceiling of a double/single precision floating point variable |
||
asin/asinf* |
Arc sin of a double/single precision floating point variable |
||
acos/acosf* |
Arc cos of a double/single precision floating point variable |
||
atan/atanf* |
Arc tan of a double/single precision floating point variable |
||
*- “f” denotes single precision floating point number |
|||
A complete list of floating point math functions is available in the16-Bit Language Tools document |
Title
|
Document Category
|
Date
|
|
---|---|---|---|
16-Bit Language Tools Libraries Reference Manual | Software | 19 Jun 2015 | Download |