modf(3M) Mathematical Library Functions modf(3M)NAME
modf, modff, modfl - decompose floating-point number
SYNOPSIS
c99 [ flag... ] file... -lm [ library... ]
#include <math.h>
double modf(double x, double *iptr);
float modff(float x, float *iptr);
long double modfl(long double x, long double *iptr);
DESCRIPTION
These functions break the argument x into integral and fractional parts, each of which has the same sign as the argument. It stores the
integral part as a double for the modf() function, a float for the modff() function, or a long double for themodfl() function in the object
pointed to by iptr.
RETURN VALUES
Upon successful completion, these functions return the signed fractional part of x.
If x is NaN, a NaN is returned and *iptr is set to NaN.
If x is +-Inf, +-0 is returned and *iptr is set to +-Inf.
ERRORS
No errors are defined.
USAGE
These functions compute the function result and *iptr such that:
a = modf(x, &iptr) ;
x == a+*iptr ;
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO frexp(3M), isnan(3M), ldexp(3M), attributes(5), standards(5)SunOS 5.11 12 Jul 2006 modf(3M)
Check Out this Related Man Page
MODF(3) Linux Programmer's Manual MODF(3)NAME
modf, modff, modfl - extract signed integral and fractional values from floating-point number
SYNOPSIS
#include <math.h>
double modf(double x, double *iptr);
float modff(float x, float *iptr);
long double modfl(long double x, long double *iptr);
Link with -lm.
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
modf(), modfl():
_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L;
or cc -std=c99
DESCRIPTION
The modf() function breaks the argument x into an integral part and a fractional part, each of which has the same sign as x. The integral
part is stored in the location pointed to by iptr.
RETURN VALUE
The modf() function returns the fractional part of x.
If x is a NaN, a NaN is returned, and *iptr is set to a NaN.
If x is positive infinity (negative infinity), +0 (-0) is returned, and *iptr is set to positive infinity (negative infinity).
ERRORS
No errors occur.
ATTRIBUTES
Multithreading (see pthreads(7))
The modf(), modff(), and modfl() functions are thread-safe.
CONFORMING TO
C99, POSIX.1-2001. The variant returning double also conforms to SVr4, 4.3BSD, C89.
SEE ALSO frexp(3), ldexp(3)COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
2013-06-21 MODF(3)
Hi
I just want to clean up the space in UNIX. Is there any special command that does this process or do I need to manually type the following
rm <filename>
Any help would be really appreciated. Thanks (2 Replies)
Hi,
I have variable called fname that has the value M201401151630_P008949.csv.txt
I need to grep and store this in a variable called prcid for the number before ".csv" and the letter "P" excluding all zeros in the beginning.
Desired output 8949
Likewise for M201401151630_P108949.csv.txt... (12 Replies)
Hi Team ,
I have one Master.sh file which call X,Y,Z scripts ,
but here X may call again some sub scripts X_sub1.sh , X_sub2.sh
Y calls Y_sub1.sh,Y_sub2.sh and similarly Z script also .
Now requirement is Both X and Y should execute parallel bcz X and Y are independent... (9 Replies)
Hi friends,
i need a command which can be used to change the values in file.
I have file which contain some values.
Data_Center_costing=XXXX
Financial_loss=XXXX
operational_cost=XXX
I am not aware about the values of XXXX, They may be 4 digit or less/more than that. but i need these... (12 Replies)
Hall0 Team,
I need you help. I have a .csv file called Pax.csv. It has 13 fields
The fields that i am interested in is field 7, field 10(CallDuration),field 12 and field 13(TelkomAsif)
Field 12(Cost) is affected by what is on field 7(CallType)
if field7= VoIS Community Sharecall then Cost... (14 Replies)
Hi 2 ALL,
try to run NFS Server in AIX 7.1 :
1. Step by step on NFS Server node
mkdir /tmp/test
chgrp staff /tmp/test
chmod 775 /tmp/test-- create export directory (fs)
mknfsexp -d /tmp/test -t ro
exportfs -va
show mount -e
:/# exportfs -av
exports: 1831-187 re-exported /tmp/test... (4 Replies)
Hello,
I have some data that looks like the following,
> <SALTDATA> (OVS0199262)
HCl
> <IDNUMBER> (OVS0199262)
OVS0199262
> <SUPPLIER> (OVS0199262)
TimTec
> <EMAIL> (OVS0199262)
info@timtec.net
> <WEBSITE> (OVS0199262)
http://www.timtec.net
I need to remove the data in... (3 Replies)
So i am trying to read in file
readFile <GivenFile> modFile
looking for a regular file under the directories in the GivenFile and print them out is my over all goal.
basically I am looking for anything that looks like a directory in the given file and printing it out.
Since I am trying to do... (2 Replies)
Hello.
In an informix context, on AIX 5.3 TL 12, we encounter this problem :
Sometimes in the day (probably when users exits from their session), a child process lose its parent (PPID is now "1") and this child is consumming lot of CPU "USER".
I tried, on different cases, "truss -p... (4 Replies)
Hi
We meet errors while running configuration scripts to prepare compiling source code on AIX 7.2. This error does not happen on AIX5.3 and AIX6.1
With the “/usr/bin/sh” from AIX7.2, sometimes , the script runs sucessfully, sometimes not. It’s unstable, and I don’t know why.
When... (10 Replies)
Hi All,
I am having a strange issue. Below is the code snippet. If I print fraction * (double)::pow((double)10,scalingFactor) which is a double I am getting 154 when I type cast that to int as (int)( ((fraction) * ((double)::pow((double)10,scalingFactor)))) it is becoming 153. Not sure why... (0 Replies)