1*61293Sbostic.\" Copyright (c) 1991, 1993 2*61293Sbostic.\" The Regents of the University of California. All rights reserved. 348922Scael.\" 448922Scael.\" %sccs.include.redist.man% 548922Scael.\" 6*61293Sbostic.\" @(#)fmod.3 8.1 (Berkeley) 06/04/93 748922Scael.\" 848922Scael.Dd 948922Scael.Dt FMOD 3 1048922Scael.Os 1148922Scael.Sh NAME 1248922Scael.Nm fmod 1348922Scael.Nd floating-point remainder function 1448922Scael.Sh SYNOPSIS 1548922Scael.Fd #include <math.h> 1648922Scael.Ft double 1748922Scael.Fn fmod "double x" "double y" 1848922Scael.Sh DESCRIPTION 1948922ScaelThe 2048922Scael.Fn fmod 2148922Scaelfunction computes the floating-point remainder of 2248922Scael.Fa x Ns / Fa y . 2348922Scael.Sh RETURN VALUES 2448922ScaelThe 2548922Scael.Fn fmod 2648922Scaelfunction returns the value 2748922Scael.Sm off 2848922Scael.Fa x - Em i * Fa y , 2948922Scael.Sm on 3048922Scaelfor some integer 3148922Scael.Em i 3248922Scaelsuch that, if 3348922Scael.Fa y 3448922Scaelis non-zero, the result has the same sign as 3548922Scael.Fa x 3648922Scaeland magnitude less than the magnitude of 3748922Scael.Fa y . 3848922ScaelIf 3948922Scael.Fa y 4048922Scaelis zero, whether a domain error occurs or the 4148922Scael.Fn fmod 4248922Scaelfunction returns zero is implementation-defined. 4348922Scael.Sh SEE ALSO 4448922Scael.Xr math 3 4548922Scael.Sh STANDARDS 4648922ScaelThe 4748922Scael.Fn fmod 4848922Scaelfunction conforms to 4948922Scael.St -ansiC . 50