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