fmod, fmodf, fmodl - floating-point remainder function


   #include <math.h>

   double fmod(double x, double y);
   float fmodf(float x, float y);
   long double fmodl(long double x, long double y);

   Link with -lm.

   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

   fmodf(), fmodl():
       _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
           || /* Since glibc 2.19: */ _DEFAULT_SOURCE
           || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE


   These  functions  compute the floating-point remainder of dividing x by
   y.  The return value is x - n * y, where n is the quotient of  x  /  y,
   rounded toward zero to an integer.


   On  success, these functions return the value x - n*y, for some integer
   n, such that the returned value has the same sign as x and a  magnitude
   less than the magnitude of y.

   If x or y is a NaN, a NaN is returned.

   If x is an infinity, a domain error occurs, and a NaN is returned.

   If y is zero, a domain error occurs, and a NaN is returned.

   If x is +0 (-0), and y is not zero, +0 (-0) is returned.


   See  math_error(7) for information on how to determine whether an error
   has occurred when calling these functions.

   The following errors can occur:

   Domain error: x is an infinity
          errno is set to EDOM (but see BUGS).  An invalid  floating-point
          exception (FE_INVALID) is raised.

   Domain error: y is zero
          errno  is  set  to  EDOM.   An  invalid floating-point exception
          (FE_INVALID) is raised.


   For  an  explanation  of  the  terms  used   in   this   section,   see

   │InterfaceAttributeValue   │
   │fmod(), fmodf(), fmodl() │ Thread safety │ MT-Safe │


   C99, POSIX.1-2001, POSIX.1-2008.

   The variant returning double also conforms to SVr4, 4.3BSD, C89.


   Before version 2.10, the glibc implementation did not set errno to EDOM
   when a domain error occurred for an infinite x.




   This page is part of release 4.09 of the Linux  man-pages  project.   A
   description  of  the project, information about reporting bugs, and the
   latest    version    of    this    page,    can     be     found     at

                              2016-03-15                           FMOD(3)

More Linux Commands

XtBuildEventMask(3) - retrieve a widget's event mask........
The XtBuildEventMask function returns the event mask representing the logical OR of all event masks for event handlers registered on the widget with XtAddEventH

safe(n) Creating and manipulating safe interpreters.........
Safe Tcl is a mechanism for executing untrusted Tcl scripts safely and for providing mediated access by such scripts to potentially dangerous functionality. Saf

Tcl_SetServiceMode(3) - the event queue and notifier interfa
The interfaces described here are used to customize the Tcl event loop. The two most common customizations are to add new sources of events and to merge Tcls ev

ldap_syntax_free(3) - Schema definition handling routines...
These routines are used to parse schema definitions in the syntax defined in RFC 4512 into structs and handle these structs. These routines handle four kinds of

Tie::Hash(3pm) - base class definitions for tied hashes.....
This module provides some skeletal methods for hash-tying classes. See perltie for a list of the functions required in order to tie a hash to a package. The bas

fabsf(3) - absolute value of floating-point number (ManPage)
These functions return the absolute value of the floating-point number x. RETURN VALUE These functions return the absolute value of x. If x is a NaN, a NaN is r

ssh_config(5) - OpenSSH SSH client configuration files......
ssh-add(1) obtains configuration data from the following sources in the following order: 1. command-line options 2. users configuration file (~/.ssh/config) 3.

addpart(8) - simple wrapper around the "add partition" ioctl
addpart is a program that informs the Linux kernel of a new partition. This command doesnt manipulate partitions on the hard drive. PARAMETERS device Specify th

truncate(1) - shrink or extend the size of a file to the spe
Shrink or extend the size of each FILE to the specified size A FILE argument that does not exist is created. If a FILE is larger than the specified size, the ex

catanhl(3) - complex arc tangents hyperbolic (Man Page).....
The catanh() function calculates the complex arc hyperbolic tangent of z. If y = catanh(z), then z = ctanh(y). The imaginary part of y is chosen in the interval

XCreateGC(3) - create or free graphics contexts and graphics
The XCreateGC function creates a graphics context and returns a GC. The GC can be used with any destination drawable having the same root and depth as the speci

XSetAccessControl(3) - control host access and host control
The XAddHost function adds the specified host to the access control list for that display. The server must be on the same host as the client issuing the command

We can't live, work or learn in freedom unless the software we use is free.