Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

finite(3) [freebsd man page]

FPCLASSIFY(3)						   BSD Library Functions Manual 					     FPCLASSIFY(3)

NAME
fpclassify, isfinite, isinf, isnan, isnormal -- classify a floating-point number LIBRARY
Math Library (libm, -lm) SYNOPSIS
#include <math.h> int fpclassify(real-floating x); int isfinite(real-floating x); int isinf(real-floating x); int isnan(real-floating x); int isnormal(real-floating x); DESCRIPTION
The fpclassify() macro takes an argument of x and returns one of the following manifest constants. FP_INFINITE Indicates that x is an infinite number. FP_NAN Indicates that x is not a number (NaN). FP_NORMAL Indicates that x is a normalized number. FP_SUBNORMAL Indicates that x is a denormalized number. FP_ZERO Indicates that x is zero (0 or -0). The isfinite() macro returns a non-zero value if and only if its argument has a finite (zero, subnormal, or normal) value. The isinf(), isnan(), and isnormal() macros return non-zero if and only if x is an infinity, NaN, or a non-zero normalized number, respectively. The symbol isnanf() is provided as an alias to isnan() for compatibility, and its use is deprecated. Similarly, finite() and finitef() are deprecated versions of isfinite(). SEE ALSO
isgreater(3), math(3), signbit(3) STANDARDS
The fpclassify(), isfinite(), isinf(), isnan(), and isnormal() macros conform to ISO/IEC 9899:1999 (``ISO C99''). HISTORY
The fpclassify(), isfinite(), isinf(), isnan(), and isnormal() macros were added in FreeBSD 5.1. 3BSD introduced isinf() and isnan() func- tions, which accepted double arguments; these have been superseded by the macros described above. BSD
January 26, 2005 BSD

Check Out this Related Man Page

FPCLASSIFY(3)						   BSD Library Functions Manual 					     FPCLASSIFY(3)

NAME
fpclassify, isfinite, isinf, isnan, isnormal -- classify a floating-point number LIBRARY
Math Library (libm, -lm) SYNOPSIS
#include <math.h> int fpclassify(real-floating x); int isfinite(real-floating x); int isinf(real-floating x); int isnan(real-floating x); int isnormal(real-floating x); DESCRIPTION
The fpclassify() macro takes an argument of x and returns one of the following manifest constants. FP_INFINITE Indicates that x is an infinite number. FP_NAN Indicates that x is not a number (NaN). FP_NORMAL Indicates that x is a normalized number. FP_SUBNORMAL Indicates that x is a denormalized number. FP_ZERO Indicates that x is zero (0 or -0). The isfinite() macro returns a non-zero value if and only if its argument has a finite (zero, subnormal, or normal) value. The isinf(), isnan(), and isnormal() macros return non-zero if and only if x is an infinity, NaN, or a non-zero normalized number, respectively. The symbol isnanf() is provided as an alias to isnan() for compatibility, and its use is deprecated. Similarly, finite() and finitef() are deprecated versions of isfinite(). SEE ALSO
isgreater(3), math(3), signbit(3) STANDARDS
The fpclassify(), isfinite(), isinf(), isnan(), and isnormal() macros conform to ISO/IEC 9899:1999 (``ISO C99''). HISTORY
The fpclassify(), isfinite(), isinf(), isnan(), and isnormal() macros were added in FreeBSD 5.1. 3BSD introduced isinf() and isnan() func- tions, which accepted double arguments; these have been superseded by the macros described above. BSD
January 26, 2005 BSD
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

the given code goes in infinite loop and does not increment variable i

code is as #!/bin/sh i=1; while do welcome $i times; i='expr $i+1'; done exit 0; (6 Replies)
Discussion started by: mrityunjay22
6 Replies

2. Shell Programming and Scripting

Which is more efficient - sleep or infinite while?

Hi i need to make a script to check disk space every hour. ****Note that cron is not allowed. So i need to use either sleep or while 1 ...pls suggest which is more efficient in this scenario? And is there any other way to do the task? Thanks, Ashish (7 Replies)
Discussion started by: ashish_uiit
7 Replies

3. Shell Programming and Scripting

Running a script in INFINITE LOOP

Hi All, I have a requirement as below. I supposed to get a file from Source system once in a month. But we dont know when the source system will send the file. My script has to wait for that file in LOOP once it gets the file then it has to FTP the file. I thought of scheduling the job... (5 Replies)
Discussion started by: Raamc
5 Replies

4. Shell Programming and Scripting

infinite loop to check process is running

Hi, I got a simple script working to check if a process is running and then email if it is not running anymore. My scenario is that I need to make sure the process is always running so instead of running the below script via cron I think it is better to a have a looping script to check... (12 Replies)
Discussion started by: yabai
12 Replies

5. Programming

Is my code in an Infinite Loop?

Production C code compiled without the dash-g option is running, and seems to be in an infinite loop. Is there a way to tell? Is there a diagnostic tool that will report what objects or what lines of code or even what functions are being executed? Or is my best option to kill it with a dump? ... (5 Replies)
Discussion started by: marcus121
5 Replies

6. Solaris

Infinite for loop is taking too much CPU usage %

Hi All, I wrote one simple for loop shell script which prints number..but this loop is infinite...but its taking lot of CPU (15.7) %. if i am using sleep cmd then cpu usage become 0.4 %. Is there anyway to reduce this CPU usage without using sleep cmd? i dont want 2 use sleep cmd... (7 Replies)
Discussion started by: pa.chidhambaram
7 Replies

7. Shell Programming and Scripting

infinite while do loop problem

hi all, this is how my scrip looks like #!/bin/sh bindir='/opt/apps/script/bin' datadir='/opt/apps/script/data' dir='/opt/apps/script' while : ; do ls -1rt /opt/apps/script/data/check.txt*|tail -1 > /dev/null 2>&1 if ;then chmod +rwx $bindir/dummy2.sh ... (8 Replies)
Discussion started by: tententen
8 Replies

8. Shell Programming and Scripting

Infinite while loop

what is the difference between while:,while true and while false? (6 Replies)
Discussion started by: proactiveaditya
6 Replies

9. Shell Programming and Scripting

30 Load average with fping script

Hi! I've make a script that gets a list of 200 Ip's and calls another script once per ip in a infinite loop with a pause of 10 seconds. So It calls over 200 times every 10 seconds the second script (that makes a fping). But this cause a load average of 30. I've been reading about this and I... (4 Replies)
Discussion started by: charlscross
4 Replies

10. Shell Programming and Scripting

Problem with pipes on infinite streams

Here is an example code that shows the issue I have: #!/bin/bash counter() { seq 1000 | while read NUM; do echo $NUM echo "debug: $NUM" >&2 sleep 0.1 # slow it down so we know when this loop really ends done } counter | grep --line-buffered "" | head -n1 ... (10 Replies)
Discussion started by: tokland
10 Replies

11. Programming

Infinite thread

I created a thread which pings a machine for every 15 seconds. I made my thread function in infinite loop. Main process also in infinite loop and will run for years. I wonder the thread will continue as long as main process continuous or will thread terminates at some point? Is there any life... (6 Replies)
Discussion started by: satish@123
6 Replies

12. Shell Programming and Scripting

My for loop decides to become an infinite loop?

Hi, I was debating if I should put this in the dummies or scripts section, I apologize in advance if I chose poorly. Fairly new to Unix and BASH scripting but I thought I made it fairly well given my limited understanding. However, the output indicates that it's looping and I'm ending up with a... (5 Replies)
Discussion started by: gotreef
5 Replies

13. Shell Programming and Scripting

How to stop infinite loop

Im unable to stop the below infinite loop (bash script). Can someone tell me why this isnt responding to signals eg: ctrl+c (SIGINT) or ctrl+z c=0 test_loop() { c=$(($c+1)) echo "count value is : $c " sleep 1 test_loop } Im using: SunOS 5.10 PS: If run this as... (13 Replies)
Discussion started by: Arun_Linux
13 Replies

14. Shell Programming and Scripting

Read function is going in infinite in another script having while loop

Hello Experts, I have created one user confirmation process that will ask for user input. I have created one func for it. The issue is if i call it as normal then it works fine but if i am calling it in another script(in while loop) . It is going in infinite loop and not asking for user input. ... (8 Replies)
Discussion started by: looney
8 Replies

15. UNIX for Beginners Questions & Answers

Is it a joke or a command?

Hello, I have found some commands in a forum under "top ten unix commands" topic and I'd like to ask: what does below command do: Could it really be a command or a joke? :(){ :|:& };: Thanks Boris (6 Replies)
Discussion started by: baris35
6 Replies