A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.cppreference.com/w/cpp/language/../algorithm/../../cpp/../c/numeric/math/float_t.html below:

float_t, double_t - cppreference.com

typedef /* implementation-defined */ float_t

(since C99)

typedef /* implementation-defined */ double_t

(since C99)

The types float_t and double_t are floating types at least as wide as float and double, respectively, and such that double_t is at least as wide as float_t. The value of FLT_EVAL_METHOD determines the types of float_t and double_t.

FLT_EVAL_METHOD Explanation ​0​ float_t and double_t are equivalent to float and double, respectively 1 both float_t and double_t are equivalent to double 2 both float_t and double_t are equivalent to long double other both float_t and double_t are implementation defined [edit] Example
#include <float.h>
#include <math.h>
#include <stdio.h>
 
#define SHOW(expr) printf("%s = %d\n", #expr, (int)(expr))
 
int main()
{
    SHOW(FLT_EVAL_METHOD);
    SHOW(sizeof(float));
    SHOW(sizeof(float_t));
    SHOW(sizeof(double));
    SHOW(sizeof(double_t));
}

Possible output:

FLT_EVAL_METHOD = 1
sizeof(float) = 4
sizeof(float_t) = 8
sizeof(double) = 8
sizeof(double_t) = 8
[edit] References
[edit] See also specifies in what precision all arithmetic operations are done
(macro constant)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4