f1 = f2 * d;
the multiplication may be executed using single-precision arithmetic if the implementation can ascertain
that the result would be the same as if it were executed using double-precision arithmetic (for example, if d
f1 = f2 * d;
the multiplication may be executed using single-precision arithmetic if the implementation can ascertain
that the result would be the same as if it were executed using double-precision arithmetic (for example, if d
13 EXAMPLE 4 Implementations employing wide registers have to take care to honor appropriate
semantics. Values are independent of whether they are represented in a register or in memory. For
13 EXAMPLE 4 Implementations employing wide registers have to take care to honor appropriate
semantics. Values are independent of whether they are represented in a register or in memory. For
- z = x + x * y; // not equivalent to z = x * (<a href="#1.0">1.0</a> + y);
- y = x / <a href="#5.0">5.0</a>; // not equivalent to y = x * 0.2;
+ z = x + x * y; // not equivalent to z = x * (1.0 + y);
+ y = x / 5.0; // not equivalent to y = x * 0.2;
(<a href="#6.7.2.3">6.7.2.3</a>), the goto statement (<a href="#6.8.6.1">6.8.6.1</a>).
30) A function declaration can contain the storage-class specifier static only if it is at file scope; see
(<a href="#6.7.2.3">6.7.2.3</a>), the goto statement (<a href="#6.8.6.1">6.8.6.1</a>).
30) A function declaration can contain the storage-class specifier static only if it is at file scope; see
31) As specified in <a href="#6.2.1">6.2.1</a>, the later declaration might hide the prior declaration.
32) There is only one name space for tags even though three are possible.
31) As specified in <a href="#6.2.1">6.2.1</a>, the later declaration might hide the prior declaration.
32) There is only one name space for tags even though three are possible.
<a name="6.2.4" href="#6.2.4"><b> 6.2.4 Storage durations of objects</b></a>
1 An object has a storage duration that determines its lifetime. There are four storage
durations: static, thread, automatic, and allocated. Allocated storage is described in
<a name="6.2.4" href="#6.2.4"><b> 6.2.4 Storage durations of objects</b></a>
1 An object has a storage duration that determines its lifetime. There are four storage
durations: static, thread, automatic, and allocated. Allocated storage is described in
2 The lifetime of an object is the portion of program execution during which storage is
guaranteed to be reserved for it. An object exists, has a constant address,33) and retains
its last-stored value throughout its lifetime.34) If an object is referred to outside of its
2 The lifetime of an object is the portion of program execution during which storage is
guaranteed to be reserved for it. An object exists, has a constant address,33) and retains
its last-stored value throughout its lifetime.34) If an object is referred to outside of its
object (in which case it is an lvalue) or a function (in which case it is a function
designator).91)
3 A constant is a primary expression. Its type depends on its form and value, as detailed in
object (in which case it is an lvalue) or a function (in which case it is a function
designator).91)
3 A constant is a primary expression. Its type depends on its form and value, as detailed in
4 A string literal is a primary expression. It is an lvalue with type as detailed in <a href="#6.4.5">6.4.5</a>.
5 A parenthesized expression is a primary expression. Its type and value are identical to
those of the unparenthesized expression. It is an lvalue, a function designator, or a void
4 A string literal is a primary expression. It is an lvalue with type as detailed in <a href="#6.4.5">6.4.5</a>.
5 A parenthesized expression is a primary expression. Its type and value are identical to
those of the unparenthesized expression. It is an lvalue, a function designator, or a void
extern creates an external definition. The following example shows an entire translation unit.
inline double fahr(double t)
{
extern creates an external definition. The following example shows an entire translation unit.
inline double fahr(double t)
{
}
extern double fahr(double); // creates an external definition
double convert(int is_fahr, double temp)
}
extern double fahr(double); // creates an external definition
double convert(int is_fahr, double temp)
24 EXAMPLE 1 Provided that <a href="#7.3"><complex.h></a> has been #included, the declarations
int i = <a href="#3.5">3.5</a>;
double complex c = 5 + 3 * I;
24 EXAMPLE 1 Provided that <a href="#7.3"><complex.h></a> has been #included, the declarations
int i = <a href="#3.5">3.5</a>;
double complex c = 5 + 3 * I;
<a name="7.20.2" href="#7.20.2"><b> 7.20.2 Limits of specified-width integer types</b></a>
1 The following object-like macros specify the minimum and maximum limits of the types *
declared in <a href="#7.20"><stdint.h></a>. Each macro name corresponds to a similar type name in
<a name="7.20.2" href="#7.20.2"><b> 7.20.2 Limits of specified-width integer types</b></a>
1 The following object-like macros specify the minimum and maximum limits of the types *
declared in <a href="#7.20"><stdint.h></a>. Each macro name corresponds to a similar type name in
2 Each instance of any defined macro shall be replaced by a constant expression suitable
for use in #if preprocessing directives, and this expression shall have the same type as
would an expression that is an object of the corresponding type converted according to
2 Each instance of any defined macro shall be replaced by a constant expression suitable
for use in #if preprocessing directives, and this expression shall have the same type as
would an expression that is an object of the corresponding type converted according to
int day, hour, min;
fprintf(stdout, "%s, %s %d, %.2d:%.2d\n",
weekday, month, day, hour, min);
int day, hour, min;
fprintf(stdout, "%s, %s %d, %.2d:%.2d\n",
weekday, month, day, hour, min);
17 EXAMPLE 2 In this example, multibyte characters do not have a state-dependent encoding, and the
members of the extended character set that consist of more than one byte each consist of exactly two bytes,
17 EXAMPLE 2 In this example, multibyte characters do not have a state-dependent encoding, and the
members of the extended character set that consist of more than one byte each consist of exactly two bytes,
int day, hour, min;
fwprintf(stdout, L"%ls, %ls %d, %.2d:%.2d\n",
weekday, month, day, hour, min);
int day, hour, min;
fwprintf(stdout, L"%ls, %ls %d, %.2d:%.2d\n",
weekday, month, day, hour, min);
Forward references: the btowc function (<a href="#7.28.6.1.1">7.28.6.1.1</a>), the mbrtowc function
(<a href="#7.28.6.3.2">7.28.6.3.2</a>).
Forward references: the btowc function (<a href="#7.28.6.1.1">7.28.6.1.1</a>), the mbrtowc function
(<a href="#7.28.6.3.2">7.28.6.3.2</a>).
conversion is subject to default rounding modes and raises no execution-time floating-point exceptions
(even where the state of the FENV_ACCESS pragma is ''on''). Library functions, for example
strtod, provide execution-time conversion of numeric strings.
conversion is subject to default rounding modes and raises no execution-time floating-point exceptions
(even where the state of the FENV_ACCESS pragma is ''on''). Library functions, for example
strtod, provide execution-time conversion of numeric strings.
IEC 60559 machines and others that round perfectly.
1 x x and x/1 (->) x The expressions 1 x x, x/1, and x are equivalent (on IEC 60559
machines, among others).355)
IEC 60559 machines and others that round perfectly.
1 x x and x/1 (->) x The expressions 1 x x, x/1, and x are equivalent (on IEC 60559
machines, among others).355)
infinite, or NaN.
x - y (<->) x + (-y) The expressions x - y, x + (-y), and (-y) + x are equivalent (on
IEC 60559 machines, among others).
infinite, or NaN.
x - y (<->) x + (-y) The expressions x - y, x + (-y), and (-y) + x are equivalent (on
IEC 60559 machines, among others).
int recalc = 0;
if ( isinf(a) || isinf(b) ) { // z is infinite
/* "Box" the infinity and change NaNs in the other factor to 0 */
int recalc = 0;
if ( isinf(a) || isinf(b) ) { // z is infinite
/* "Box" the infinity and change NaNs in the other factor to 0 */
- a = copysign(isinf(a) ? <a href="#1.0">1.0</a> : 0.0, a);
- b = copysign(isinf(b) ? <a href="#1.0">1.0</a> : 0.0, b);
+ a = copysign(isinf(a) ? 1.0 : 0.0, a);
+ b = copysign(isinf(b) ? 1.0 : 0.0, b);
if (isnan(c)) c = copysign(0.0, c);
if (isnan(d)) d = copysign(0.0, d);
recalc = 1;
}
if ( isinf(c) || isinf(d) ) { // w is infinite
/* "Box" the infinity and change NaNs in the other factor to 0 */
if (isnan(c)) c = copysign(0.0, c);
if (isnan(d)) d = copysign(0.0, d);
recalc = 1;
}
if ( isinf(c) || isinf(d) ) { // w is infinite
/* "Box" the infinity and change NaNs in the other factor to 0 */
- c = copysign(isinf(c) ? <a href="#1.0">1.0</a> : 0.0, c);
- d = copysign(isinf(d) ? <a href="#1.0">1.0</a> : 0.0, d);
+ c = copysign(isinf(c) ? 1.0 : 0.0, c);
+ d = copysign(isinf(d) ? 1.0 : 0.0, d);
if (isnan(a)) a = copysign(0.0, a);
if (isnan(b)) b = copysign(0.0, b);
recalc = 1;
if (isnan(a)) a = copysign(0.0, a);
if (isnan(b)) b = copysign(0.0, b);
recalc = 1;
- a = copysign(isinf(a) ? <a href="#1.0">1.0</a> : 0.0, a);
- b = copysign(isinf(b) ? <a href="#1.0">1.0</a> : 0.0, b);
+ a = copysign(isinf(a) ? 1.0 : 0.0, a);
+ b = copysign(isinf(b) ? 1.0 : 0.0, b);
x = INFINITY * ( a * c + b * d );
y = INFINITY * ( b * c - a * d );
}
else if (isinf(logbw) &&
isfinite(a) && isfinite(b)) {
x = INFINITY * ( a * c + b * d );
y = INFINITY * ( b * c - a * d );
}
else if (isinf(logbw) &&
isfinite(a) && isfinite(b)) {
- c = copysign(isinf(c) ? <a href="#1.0">1.0</a> : 0.0, c);
- d = copysign(isinf(d) ? <a href="#1.0">1.0</a> : 0.0, d);
+ c = copysign(isinf(c) ? 1.0 : 0.0, c);
+ d = copysign(isinf(d) ? 1.0 : 0.0, d);
scaleF scalbnf(x, n), scalbn(x, n), scalbnl(x, n),
scalblnf(x, li), scalbln(x, li), scalblnl(x, li)
intpartF modff(x, &y), modf(x, &y), modfl(x, &y)
scaleF scalbnf(x, n), scalbn(x, n), scalbnl(x, n),
scalblnf(x, li), scalbln(x, li), scalblnl(x, li)
intpartF modff(x, &y), modf(x, &y), modfl(x, &y)