Topic : An introduction to C
Author : Tom Torfs
Page : << Previous 21  Next >>
Go to page :


      /* monetary nonnegative sign [""] */
   char *negative_sign;       /* monetary negative sign [""] */
   char int_frac_digits;      /* int. monetary decimal digits [CHAR_MAX] */
   char frac_digits;          /* monetary decimal digits [CHAR_MAX] */
   char p_cs_precedes;        /* 1 if currency symbol precedes nonnegative
                                 value [CHAR_MAX] */
   char p_sep_by_space;       /* 1 if currency symbol is separated by space
                                 from nonnegative value [CHAR_MAX] */
   char n_cs_precedes;        /* 1 if currency symbol precedes negative
                                 value [CHAR_MAX] */
   char n_sep_by_space;       /* 1 if currency symbol is separated by space
                                 from negative value [CHAR_MAX] */
   char p_sign_posn;          /* indicates positioning of positive sign
                                 for nonnegative values [CHAR_MAX] */
   char n_sign_posn;          /* indicates positioning of negative sign
                                 for negative values [CHAR_MAX] */
  };


Structure which contains at least the above specified members related to the formatting of numeric values [*]. The values between the square brackets [ ] are those for the C locale. See the explanation of localeconv() for more information.
[*] The order of the members may be different
Macros

LC_ALL                        /* all categories */
LC_COLLATE                    /* strcoll() and strxfrm() */
LC_CTYPE                      /* character handling */
LC_MONETARY                   /* localeconv() monetary formatting */
LC_NUMERIC                    /* decimal point */
LC_TIME                       /* strftime() */


Constant integers used by the setlocale() function. Your implementation may define additional macro definitions, starting with LC_ followed by an uppercase letter.

NULL

Explained in 16.12. stddef.h.
Functions

char *setlocale(int category, const char *locale);

Selects the specified locale for the specified category of the program (one of the above specified LC_ macros). For locale, use "C" for the minimal environment for C translation (this is also the default at program startup) or "" for the implementation's native locale.

struct lconv *localeconv(void);

Returns a pointer to a lconv structure describing the formatting of numeric quantities in the current locale. The members of this structure can point to an empty string or have values CHAR_MAX, which indicates that the information is not available in the current locale.
The structure may not be modified. Subsequent calls to the localeconv() function may overwrite its contents.16.8. math.h (mathematics)
Macros

HUGE_VAL

Positive double constant, which indicates that the result of a mathematical function is too large to fit in a double.
Functions

double acos(double x);

Returns the principal value of the arc cosine of x in radians. Will cause a domain error for arguments outside the range [-1, +1].

double asin(double x);

Returns the principal value of the arc sine of x in radians. Will cause a domain error for arguments outside the range [-1, +1].

double atan(double x);

Returns the principal value of the arc tangent of x in radians.

double atan2(double y, double x);

Returns the principal value of the arc tangent of y/x in radians, using the signs of the arguments to determine the quadrant. May cause a domain error if both arguments are 0.

double ceil(double x);

Returns the smallest integral value not less than x.

double cos(double x);

Returns the cosine of x (measured in radians). Accuracy may be lost if x is of large magnitude.

double cosh(double x);

Returns the hyperbolic cosine of x. Will cause a range error if x is too large in magnitude.

double exp(double x);

Returns e raised to the power x. Will cause a range error if x is too large in magnitude.

double fabs(double x);

Returns the absolute value of x.

double floor(double x);

Returns the largest integral value not greater than x.

double fmod(double x, double y);

Returns the remainder of x/y. If y is nonzero, the result has the same sign as x. May cause a domain error if y is 0.

double frexp(double value, int *exp);

Breaks value into a normalized fraction (returned; magnitude in interval [1/2, 1[ or zero) and an integral power of 2 (stored in the integer pointed to by exp) so that the returned value multiplied by x raised to the power *exp equals value.

double ldexp(double x, int exp);

Returns x multiplied by 2 raised to the power exp. May cause a range error.

double log(double x);

Returns the natural logarithm of x. Will cause a domain error if the argument is negative. May cause a range error if the argument is 0.

double log10(double x);

Returns the base-10 logarithm of x. Will cause a domain error if the argument is negative. May cause a range error if the argument is 0.

double modf(double value, double *iptr);

Breaks value into a fractional part (returned) and an integral part (stored in the double pointed to by iptr), both with the same sign as value.

double pow(double x, double y);

Returns x raised to the power y. Will cause a domain error if x is negative and y is not an integer. May cause a domain error if x is 0 and y is negative or 0. May cause a range error.

double sin(double x);

Returns the sine of x (measured in radians). Accuracy may be lost if x is of large magnitude.

double sinh(double x);

Returns the hyperbolic sine of x. Will cause a range error if x is too large in magnitude.

double sqrt(double x);

Returns the nonnegative square root of x. Will cause a domain error if the argument is negative.

double tan(double x);

Returns the tangent of x (measured in radians). Accuracy may be lost if x is of large magnitude.

double tanh(double x);

Returns the hyperbolic tangent of x.16.9. setjmp.h (non-local jumps)
Types

jmp_buf

A type that is used for holding the information necessary for performing non-local jumps.
Macros

int setjmp(jmp_buf env);

Sets up for a longjmp() to this position using the specified jmp_buf variable. The return value will be 0 when the setjmp() function is originally called. When a longjmp() is performed using the jmp_buf variable, the code will continue at this position with a return value different from 0.
The setjmp() macro may only be used as an expression on its own, or compared with an integral constant, or the logical ! operator.
Functions

void longjmp(jmp_buf env, int val);

The longjmp() function performs a non-local jump to the setjmp() macro that was last used in combination with the specified jmp_buf variable. This setjmp() macro will then return with the value specified in val. However, if val is set to 0, setjmp() will return with the value 1.16.10. signal.h (signal handling)
Types

sig_atomic_t

An integral type that can be accessed as an atomic entity, even in the presence of asynchronous interrupts.
Macros

SIGABRT                       /* abnormal program termination */
SIGFPE                        /* arithmetic error */
SIGILL    


Page : << Previous 21  Next >>