Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

modf(3) [freebsd man page]

MODF(3) 						   BSD Library Functions Manual 						   MODF(3)

modf, modff, modfl -- extract signed integral and fractional values from floating-point number LIBRARY
Math Library (libm, -lm) SYNOPSIS
#include <math.h> double modf(double value, double *iptr); float modff(float value, float *iptr); long double modfl(long double value, long double *iptr); DESCRIPTION
The modf(), modff(), and modfl() functions break the argument value into integral and fractional parts, each of which has the same sign as the argument. It stores the integral part as a floating point number in the object pointed to by iptr. RETURN VALUES
These functions return the signed fractional part of value. SEE ALSO
frexp(3), ldexp(3), math(3) STANDARDS
The modf(), modff(), and modfl() functions conform to ISO/IEC 9899:1999 (``ISO C99''). BSD
March 29, 2008 BSD

Check Out this Related Man Page

modf(3M)						  Mathematical Library Functions						  modf(3M)

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)
Man Page

11 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

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 (2 Replies)
Discussion started by: bobby1015
2 Replies

2. Shell Programming and Scripting

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... (12 Replies)
Discussion started by: mohtashims
12 Replies

3. Shell Programming and Scripting

Executes scripts parallelly based on their success

Hi Team , I have one file which call X,Y,Z scripts , but here X may call again some sub scripts , Y calls, and similarly Z script also . Now requirement is Both X and Y should execute parallel bcz X and Y are independent... (9 Replies)
Discussion started by: chandini
9 Replies

4. Shell Programming and Scripting

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... (12 Replies)
Discussion started by: Nakul_sh
12 Replies

5. Shell Programming and Scripting

.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... (14 Replies)
Discussion started by: kekanap
14 Replies

6. AIX

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... (4 Replies)
Discussion started by: penchev
4 Replies

7. Shell Programming and Scripting

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) > <WEBSITE> (OVS0199262) I need to remove the data in... (3 Replies)
Discussion started by: LMHmedchem
3 Replies

8. UNIX for Dummies Questions & Answers

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... (2 Replies)
Discussion started by: squidGreen
2 Replies

9. AIX

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... (4 Replies)
Discussion started by: stephnane
4 Replies

10. AIX

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... (10 Replies)
Discussion started by: bobochacha29
10 Replies

11. Programming

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... (0 Replies)
Discussion started by: arunkumar_mca
0 Replies