# modf(3m) [opensolaris man page]

```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			   |
+-----------------------------+-----------------------------+

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(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			   |
+-----------------------------+-----------------------------+

frexp(3M), isnan(3M), ldexp(3M), attributes(5), standards(5)

SunOS 5.11							    12 Jul 2006 							  modf(3M)```
Man Page

## Clean up the space

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

## Grep for a Number in a String

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...

## Executes scripts parallelly based on their success

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...

## Change the numbers

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...

## .csv file manipulation

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...

## AIX NFS Server and NFS Client

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...

## sed replace characters using a wildcard

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...

## ARGV how to use it?

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...

## Process lose its parent then consume high CPU usage ...

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...

## Compiling problem - AIX 7.2

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...

## Very strange output with casting

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...