I had a variable 1:80 8 in one varialbe say var=1:80 8
i comapred the below
if
then
--
else
----
thought if condition is true its always going in the else condition....its not giving any compilation errror also....is there any problem bcoz of space...
can some one help... (3 Replies)
Hi
I know its a dumb question but can any one please explain me the difference of executing a shell script in the following 2 ways.
. script.sh
sh script.sh
I have a problem if I execute the following code as sh script.sh
DB_CNT_ALW=0.20
SCT_VAR=0.05
if ; then
echo "== Difference... (3 Replies)
Hi,
As all of us know that size of int is machine as well as compiler dependent
we can get the range and size of an int , float and char etc in
/usr/include/limits.h
header file of a compiler
but could any one tell me how to get info of precision of float and ... (6 Replies)
HI!
What is the notation which correspond to C's
doubleandfloatin Perl??
Please tell me.
Thanks.
Well what I want to do is, for example, calculatingsqrt(2)in two way: float and double. (5 Replies)
i am adding two floating point numbers and i want to store in a character pointer...
float f1 ;
float f2 ;
char *c = NULL;
printf("Enter 2 floating numbers\n");
scanf("%f %f",&f1,&f2);
f1 = f1+f2;
sprintf(c, "%f", f1 );
when i execute this, i am... (3 Replies)
I have a file with 2 columns . One of the line looks like the following.
Is it possible to convert every float no in column 2 to integer.
input
NM_032881 6.03787973608527e-05
output
0.0000603787..... (2 Replies)
:confused:We have two servers one active and one stand by
as follows Active 202.61.9.9
Stand by 202.61.9.10
Float IP 202.61.9.8
What is use of this float IP?
How it is configured? (1 Reply)
Hi,
I have small problem to print float value in the fallowing code
float Cx, W,f=250000, Cr=92.00,pi=3.14;
W=2*pi*f;
Cx = 1/W.Cr; //Cx value will be come around like 7.07E-9.
printf("capacitance value: %.10f",Cx);
I am trying to print Cx value using above code but it was not... (3 Replies)
Discussion started by: veerubiji
3 Replies
LEARN ABOUT POSIX
ceill
CEIL(P) POSIX Programmer's Manual CEIL(P)
NAME
ceil, ceilf, ceill - ceiling value function
SYNOPSIS
#include <math.h>
double ceil(double x);
float ceilf(float x);
long double ceill(long double x);
DESCRIPTION
These functions shall compute the smallest integral value not less than x.
An application wishing to check for error situations should set errno to zero and call feclearexcept(FE_ALL_EXCEPT) before calling these
functions. On return, if errno is non-zero or fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is non-zero, an error
has occurred.
RETURN VALUE
Upon successful completion, ceil(), ceilf(), and ceill() shall return the smallest integral value not less than x, expressed as a type dou-
ble, float, or long double, respectively.
If x is NaN, a NaN shall be returned.
If x is +-0 or +-Inf, x shall be returned.
If the correct value would cause overflow, a range error shall occur and ceil(), ceilf(), and ceill() shall return the value of the macro
HUGE_VAL, HUGE_VALF, and HUGE_VALL, respectively.
ERRORS
These functions shall fail if:
Range Error
The result overflows.
If the integer expression (math_errhandling & MATH_ERRNO) is non-zero, then errno shall be set to [ERANGE]. If the integer expression
(math_errhandling & MATH_ERREXCEPT) is non-zero, then the overflow floating-point exception shall be raised.
The following sections are informative.
EXAMPLES
None.
APPLICATION USAGE
The integral value returned by these functions need not be expressible as an int or long. The return value should be tested before assign-
ing it to an integer type to avoid the undefined results of an integer overflow.
The ceil() function can only overflow when the floating-point representation has DBL_MANT_DIG > DBL_MAX_EXP.
On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling & MATH_ERREXCEPT) are independent of each other, but at
least one of them must be non-zero.
RATIONALE
None.
FUTURE DIRECTIONS
None.
SEE ALSO
feclearexcept() , fetestexcept() , floor() , isnan() , the Base Definitions volume of IEEE Std 1003.1-2001, Section 4.18, Treatment of
Error Conditions for Mathematical Functions, <math.h>
COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technol-
ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE
and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained
online at http://www.opengroup.org/unix/online.html .
IEEE /The Open Group 2003 CEIL(P)