SW006013 Microchip Technology, SW006013 Datasheet - Page 151

MPLAB C Compiler For DsPIC DSCs

SW006013

Manufacturer Part Number
SW006013
Description
MPLAB C Compiler For DsPIC DSCs
Manufacturer
Microchip Technology
Series
DsPIC30F/33Fr
Type
MPLAB® C Compilerr
Datasheet

Specifications of SW006013

Supported Families
DsPIC30F, DsPIC33F
Core Architecture
DsPIC
Kit Contents
Software And Docs
Mcu Supported Families
DsPIC30F And DsPIC33F
Tool Function
Compiler
Tool Type
Compiler
Processor Series
dsPIC
Lead Free Status / RoHS Status
na
For Use With/related Products
dSPIC DSCs
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
3.3
© 2008 Microchip Technology Inc.
<MATH.H> MATHEMATICAL FUNCTIONS
The header file
mon mathematical operations. Error conditions may be handled with a domain error or
range error (see
A domain error occurs when the input argument is outside the domain over which the
function is defined. The error is reported by storing the value of
returning a particular value defined for each function.
A range error occurs when the result is too large or too small to be represented in the
target precision. The error is reported by storing the value of
returning
result underflowed (return value is too small).
Responses to special values, such as NaNs, zeros, and infinities, may vary depending
upon the function. Each function description includes a definition of the function's
response to such values.
HUGE_VAL
Description:
Include:
Remarks:
acos
Description:
Include:
Prototype:
Argument:
Return Value:
Remarks:
Example:
HUGE_VAL
math.h
errno.h
if the result overflowed (return value was too large) or a zero if the
HUGE_VAL is returned by a function on a range error (e.g., the function
tries to return a value too large to be represented in the target
precision).
<math.h>
-HUGE_VAL is returned if a function result is negative and is too large
(in magnitude) to be represented in the target precision. When the
printed result is +/- HUGE_VAL, it will be represented by +/- inf.
Calculates the trigonometric arc cosine function of a double precision
floating-point value.
<math.h>
double acos (double x);
x
Returns the arc cosine in radians in the range of 0 to pi (inclusive).
A domain error occurs if x is less than -1 or greater than 1.
#include <math.h>
#include <stdio.h> /* for printf, perror */
#include <errno.h> /* for errno
int main(void)
{
double x,y;
errno = 0;
x = -2.0;
y = acos (x);
if (errno)
printf("The arccosine of %f is %f\n\n", x, y);
consists of a macro and various functions that calculate com-
).
perror("Error");
value between -1 and 1 for which to return the arc cosine
/* for acos
ERANGE
EDOM
in
DS51456E-page 147
in
errno
*/
*/
errno
and
and

Related parts for SW006013