Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

finite(3) [osx man page]

FINITE(3)						   BSD Library Functions Manual 						 FINITE(3)

finite -- returns 1 for finite x, 0 for infinite x and NaNs. SYNOPSIS
#include <math.h> int finite(double x); DESCRIPTION
The finite() function returns 1 if -infinity < x < +infinity. It returns 0 if x is +-infinity or a NaN. BSD
December 11, 2006 BSD

Check Out this Related Man Page

POW(3)							   BSD Library Functions Manual 						    POW(3)

pow -- power function SYNOPSIS
#include <math.h> double pow(double x, double y); DESCRIPTION
The pow() functions compute x raised to the power y. SPECIAL VALUES
pow(+-0, y) returns +-infinity and raises the "divide-by-zero" floating-point exception for y an odd integer < 0. pow(+-0, y) returns +infinity and raises the "divide-by-zero" floating-point exception for y < 0 and not an odd integer. pow(+-0, y) returns +-0 for y an odd integer > 0. pow(+-0, y) returns +0 for y > 0 and not an odd integer. pow(-1, +-infinity) returns 1. pow(1, y) returns 1 for any y, even a NaN. pow(x, +-0) returns 1 for any x, even a NaN. pow(x, y) returns a NaN and raises the "invalid" floating-point exception for finite x < 0 and finite non-integer y. pow(x, -infinity) returns +infinity for |x| < 1. pow(x, -infinity) returns +0 for |x| > 1. pow(x, +infinity) returns +0 for |x| < 1. pow(x, +infinity) returns +infinity for |x| > 1. pow(-infinity, y) returns -0 for y an odd integer < 0. pow(-infinity, y) returns +0 for y < 0 and not an odd integer. pow(-infinity, y) returns -infinity for y an odd integer > 0. pow(-infinity, y) returns +infinity for y > 0 and not an odd integer. pow(+infinity, y) returns +0 for y < 0. pow(+infinity, y) returns +infinity for y > 0. A domain error occurs if x is finite and negative and y is finite and not an integer. A domain error can occur if x is 0 and y less than or equal to 0. Range errors may occur. SEE ALSO
math(3), infnan(3) STANDARDS
The pow() function conforms to ISO/IEC 9899:1999(E). 4th Berkeley Distribution July 12, 2003 4th Berkeley Distribution
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/ ... (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