1*d7c02372Sabhinav.\" $NetBSD: modf.3,v 1.3 2017/02/01 15:57:47 abhinav Exp $ 251086becSdrochner.\" 351086becSdrochner.\" Copyright (c) 1991, 1993 451086becSdrochner.\" The Regents of the University of California. All rights reserved. 551086becSdrochner.\" 651086becSdrochner.\" This code is derived from software contributed to Berkeley by 751086becSdrochner.\" the American National Standards Committee X3, on Information 851086becSdrochner.\" Processing Systems. 951086becSdrochner.\" 1051086becSdrochner.\" Redistribution and use in source and binary forms, with or without 1151086becSdrochner.\" modification, are permitted provided that the following conditions 1251086becSdrochner.\" are met: 1351086becSdrochner.\" 1. Redistributions of source code must retain the above copyright 1451086becSdrochner.\" notice, this list of conditions and the following disclaimer. 1551086becSdrochner.\" 2. Redistributions in binary form must reproduce the above copyright 1651086becSdrochner.\" notice, this list of conditions and the following disclaimer in the 1751086becSdrochner.\" documentation and/or other materials provided with the distribution. 1851086becSdrochner.\" 3. Neither the name of the University nor the names of its contributors 1951086becSdrochner.\" may be used to endorse or promote products derived from this software 2051086becSdrochner.\" without specific prior written permission. 2151086becSdrochner.\" 2251086becSdrochner.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2351086becSdrochner.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2451086becSdrochner.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2551086becSdrochner.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2651086becSdrochner.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2751086becSdrochner.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2851086becSdrochner.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2951086becSdrochner.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 3051086becSdrochner.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3151086becSdrochner.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3251086becSdrochner.\" SUCH DAMAGE. 3351086becSdrochner.\" 3451086becSdrochner.\" @(#)modf.3 8.1 (Berkeley) 6/4/93 3551086becSdrochner.\" 36720dd069Snros.Dd March 7, 2016 3751086becSdrochner.Dt MODF 3 3851086becSdrochner.Os 3951086becSdrochner.Sh NAME 40*d7c02372Sabhinav.Nm modf , 41*d7c02372Sabhinav.Nm modff , 42*d7c02372Sabhinav.Nm modfl 4351086becSdrochner.Nd extract signed integral and fractional values from floating-point number 4451086becSdrochner.Sh LIBRARY 4551086becSdrochner.Lb libm 4651086becSdrochner.Sh SYNOPSIS 4751086becSdrochner.In math.h 4851086becSdrochner.Ft double 4951086becSdrochner.Fn modf "double value" "double *iptr" 5051086becSdrochner.Ft float 5151086becSdrochner.Fn modff "float value" "float *iptr" 52720dd069Snros.Ft long double 53720dd069Snros.Fn modfl "long double value" "long double *iptr" 5451086becSdrochner.Sh DESCRIPTION 5551086becSdrochnerThe 5651086becSdrochner.Fn modf 5751086becSdrochnerfunction breaks the argument 5851086becSdrochner.Fa value 5951086becSdrochnerinto integral and fractional parts, each of which has the 6051086becSdrochnersame sign as the argument. 6151086becSdrochnerIt stores the integral part as a 6251086becSdrochner.Em double 6351086becSdrochnerin the object pointed to by 6451086becSdrochner.Fa iptr . 6551086becSdrochner.Sh RETURN VALUES 6651086becSdrochnerThe 6751086becSdrochner.Fn modf 6851086becSdrochnerfunction returns the signed fractional part of 6951086becSdrochner.Fa value . 7051086becSdrochner.Sh SEE ALSO 7151086becSdrochner.Xr frexp 3 , 7251086becSdrochner.Xr ldexp 3 , 7351086becSdrochner.Xr math 3 7451086becSdrochner.Sh STANDARDS 7551086becSdrochnerThe 7651086becSdrochner.Fn modf 7751086becSdrochnerfunction conforms to 7851086becSdrochner.St -ansiC . 79