I
Immortal Nephi
I want to use single precision floating point. I don’t need to use
double precision floating point because single precision floating
point is faster.
How do I tell C++ Compiler to treat all floating point numbers with
float data type instead of double data type? I don’t need to use
casting operator.
For example:
float x = 1.0 / 3.5;
1.0 / 3.5 always use double data type. Doing casting operator is
annoying.
float x = float( 1.0 / 3.5 ); // Too annoying
double precision floating point because single precision floating
point is faster.
How do I tell C++ Compiler to treat all floating point numbers with
float data type instead of double data type? I don’t need to use
casting operator.
For example:
float x = 1.0 / 3.5;
1.0 / 3.5 always use double data type. Doing casting operator is
annoying.
float x = float( 1.0 / 3.5 ); // Too annoying