Name | Description | Notes | Source | Availability | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CMPLXL() |
Create constant of type
long double complex |
? | M | (·) | <complex.h> |
C11 | |||||
LDBL_ |
Representable decimal digits in any real floating-point type | L | M | <float.h> |
C89 | C90 | C95 | C99 | C11 | ||
LDBL_ |
Decimal digits of precision of
long double |
L | M | <float.h> |
C89 | C90 | C95 | C99 | C11 | ||
LDBL_ |
Smallest x of type
long double such that
1.0 + x != 1.0 |
L | M | <float.h> |
C89 | C90 | C95 | C99 | C11 | ||
LDBL_ |
Determinant whether
long double has subnormal
values |
L | M | <float.h> |
C11 | ||||||
LDBL_ |
Number of base-FLT_ digits in mantissa
of
long double |
L | M | <float.h> |
C89 | C90 | C95 | C99 | C11 | ||
LDBL_ |
Maximum value of
long double |
L | M | <float.h> |
C89 | C90 | C95 | C99 | C11 | ||
LDBL_ |
Maximum integral base-10 exponent yielding
long double |
L | M | <float.h> |
C89 | C90 | C95 | C99 | C11 | ||
LDBL_ |
One plus maximum integral exponent of base
FLT_ yielding
long double |
L | M | <float.h> |
C89 | C90 | C95 | C99 | C11 | ||
LDBL_ |
Minimum normalized value of
long double |
L | M | <float.h> |
C89 | C90 | C95 | C99 | C11 | ||
LDBL_ |
Minimum integral base-10 exponent yielding
normalized
long double |
L | M | <float.h> |
C89 | C90 | C95 | C99 | C11 | ||
LDBL_ |
One plus minimum integral exponent of base
FLT_ yielding normalized
long double |
L | M | <float.h> |
C89 | C90 | C95 | C99 | C11 | ||
LDBL_ |
Minimum positive value of
long double |
L | M | <float.h> |
C11 | ||||||
long double |
‘Long’ floating-point type | L | T | Native | C89 | C90 | C95 | C99 | C11 | ||
long double _Complex |
‘Long’ floating-point complex type | L | ? | T | Native | C99 | C11 | ||||
long double _Imaginary |
‘Long’ floating-point imaginary type | L | ? | T | Native | C99 | C11 | ||||
long double complex |
‘Long’ floating-point complex type | ? | T | <complex.h> |
C99 | C11 | |||||
long double imaginary |
‘Long’ floating-point imaginary type | ? | T | <complex.h> |
C99 | C11 |
long double
is intended to be a native
real
floating-point type of a natural size, capable of
representing a practical range of real numbers. (double
is
usually less capable but more compact.) A floating-point
constant of type long double
is suffixed with an
l
or L
.
Various macros in <float.h>
describe the capabilities of
long double
. It supports
LDBL_
decimal digits of precision, or
LDBL_
digits in the native
base FLT_
.
long double
has a range of ±LDBL_
.
The smallest positive non-zero value it can take is
LDBL_
, which could be
subnormal. The smallest positive normalized value it can take is
LDBL_
.
From C11, if subnormal values are
possible,
LDBL_
expands to
1
. If not, it expends to 0
. If it is undeterminable, it expands to
-1
.
LDBL_
is the lowest
integer x
that you can give to
powl(10.0L, x)
and still get a
normalized value.
LDBL_
is the highest
integer x
that you can give to
powl(10.0L, x)
and still get a
normalized value.
LDBL_
is the lowest integer
x
that you can give to powl(FLT_
and still get a
normalized value.
LDBL_
is the highest integer
x
that you can give to powl(FLT_
and still get a
normalized value.
LDBL_
is the smallest value you can
add to 1.0L
to yield something other
than 1.0L
.
LDBL_
is the number of
decimal digits that long double
can retain without rounding
error.
From C99, if __STDC_
is
defined,
long double _Complex
is a complex floating-point
type that has the same representation as an array of two long double
s, the first being the real
part, and the second the imaginary part, of the complex
number it represents. If imaginary
is defined in <complex.h>
,
long double _Imaginary
is an imaginary floating-point
type that has the same representation as a long double
.
long double imaginary
and
long double complex
are alternative names for
these types, available in <complex.h>
.
#include <complex.h>
long double complex CMPLXL(long double re, long double im);
The macro
CMPLXL
expands to a constant
expression suitable to initialize a
long double complex
with static
or thread-local storage, with a value
re + I *
im
, a complex number with a real component
re
and an imaginary component
im
, provided re
and im
are similarly suitable.
If
CMPLXL
is unavailable, a portable
implementation could be:
#define CMPLXL(RE, IM) \ (*(long double _Complex *) (long double[2]) { (RE), (IM) })
This information derives from a comp.std.c thread in May 2009.
TODO: This needs checking.
A value of type
long double complex
can be split into
cartesian co-ordinates with creall
and cimagl
, or into polar co-ordinates
with cargl
and cabsl
.