FINITE(3) BSD Library Functions Manual FINITE(3)NAME
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

ATAN2(3) BSD Library Functions Manual ATAN2(3)NAME
atan2 -- arc tangent function of two variables
SYNOPSIS
#include <math.h>
double
atan2(double y, double x);
DESCRIPTION
The atan2() function computes the principal value of the arc tangent of y/x, using the signs of both arguments to determine the quadrant of
the return value.
SPECIAL VALUES
atan2(+-0, -0) returns +-pi.
atan2(+-0, +0) returns +-0.
atan2(+-0, x) returns +-pi for x < 0.
atan2(+-0, x) returns +-0 for x > 0.
atan2(y, +-0) returns -pi/2 for y > 0.
atan2(+-y, -infinity) returns +-pi for finite y > 0.
atan2(+-y, +infinity) returns +-0 for finite y > 0.
atan2(+-infinity, +x) returns +-pi/2 for finite x.
atan2(+-infinity, -infinity) returns +-3*pi/4.
atan2(+-infinity, +infinity) returns +-pi/4.
NOTES
The atan2() function is used mostly to convert from rectangular (x,y) to polar (r,theta) coordinates that must satisfy x = r*cos theta and y
= r*sin theta. In general, conversions to polar coordinates should be computed thus:
r := hypot(x,y); ... := sqrt(x*x+y*y)
theta := atan2(y,x).
SEE ALSO acos(3), asin(3), atan(3), cos(3), cosh(3), sin(3), sinh(3), tan(3), tanh(3), math(3),
STANDARDS
The atan2() function conforms to ISO/IEC 9899:1999(E).
BSD November 18, 2002 BSD

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)

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)

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)

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)

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)

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)

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)

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)

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)

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)

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)

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)

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)