Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

is_nan(3) [php man page]

IS_NAN(3)								 1								 IS_NAN(3)

is_nan - Finds whether a value is not a number

SYNOPSIS
bool is_nan (float $val) DESCRIPTION
Checks whether $val is 'not a number', like the result of acos(1.01). PARAMETERS
o $val - The value to check RETURN VALUES
Returns TRUE if $val is 'not a number', else FALSE. EXAMPLES
Example #1 is_nan(3) example <?php // Invalid calculation, will return a // NaN value $nan = acos(8); var_dump($nan, is_nan($nan)); ?> The above example will output: float(NAN) bool(true) SEE ALSO
is_finite(3), is_infinite(3). PHP Documentation Group IS_NAN(3)

Check Out this Related Man Page

nan(3M) 						  Mathematical Library Functions						   nan(3M)

NAME
nan, nanf, nanl - return quiet NaN SYNOPSIS
c99 [ flag... ] file... -lm [ library... ] #include <math.h> double nan(const char *tagp); float nanf(const char *tagp); long double nanl(const char *tagp); DESCRIPTION
The function call nan("n-char-sequence") is equivalent to: strtod("NAN(n-char-sequence)", (char **) NULL); The function call nan(" ") is equivalent to: strtod("NAN()", (char **) NULL) If tagp does not point to an n-char sequence or an empty string, the function call is equivalent to: strtod("NAN", (char **) NULL) Function calls to nanf() and nanl() are equivalent to the corresponding function calls to strtof() and strtold(). See strtod(3C). RETURN VALUES
These functions return a quiet NaN. ERRORS
No errors are defined. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
math.h(3HEAD), strtod(3C), attributes(5), standards(5) SunOS 5.11 12 Jul 2006 nan(3M)
Man Page

We Also Found This Discussion For You

1. Programming

Where is nanosleep?

I use nanosleep under solaris10,like follows: #include <pthread.h> #include <time.h> #include <sys/time.h> struct to_info{ void (*to_fn)(void *); void *to_arg; struct timespec to_wait; }; void *timeout_helper(void *arg){ struct to_info *tip; nanosleep(&tip->to_wait,NULL);... (1 Reply)
Discussion started by: konvalo
1 Replies