SW006013 Microchip Technology, SW006013 Datasheet - Page 169

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
© 2008 Microchip Technology Inc.
fmod (Continued)
fmodf
Description:
Include:
Prototype:
Arguments:
Return Value:
Remarks:
Example:
Output:
For fmod(7.000000, 3.000000) the remainder is
1.000000
For fmod(7.000000, 7.000000) the remainder is
0.000000
For fmod(-5.000000, 3.000000) the remainder is
-2.000000
For fmod(5.000000, -3.000000) the remainder is
2.000000
For fmod(-5.000000, -5.000000) the remainder is
-0.000000
Error: domain error
For fmod(7.000000, 0.000000) the remainder is nan
Calculates the remainder of x/y as a single precision value.
<math.h>
float fmodf(float x, float y);
x
y
Returns the remainder of x divided by y.
If y = 0, a domain error occurs. If y is non-zero, the result will have the
same sign as x and the magnitude of the result will be less than the
magnitude of y.
#include <math.h>
#include <stdio.h> /* for printf, perror */
#include <errno.h> /* for errno
int main(void)
{
float x,y,z;
errno = 0;
x = 7.0F;
y = 3.0F;
z = fmodf (x, y);
if (errno)
printf("For fmodf (%f, %f) the remainder is"
errno = 0;
x = -5.0F;
y = 3.0F;
z = fmodf (x, y);
if (errno)
printf("For fmodf (%f, %f) the remainder is"
perror("Error");
perror("Error");
a single precision floating-point value
a single precision floating-point value
" %f\n\n", x, y, z);
" %f\n\n", x, y, z);
/* for fmodf
DS51456E-page 165
*/
*/

Related parts for SW006013