c - Compile time constants as floats -


To change the compiler (MSCV 2005) after changing the file with the pair double Warns about conversion from float to code constant

  ... float r; R = (q1 + q2) * 0.5; ...  

Even q1, q2 both floats 0.5 as double Is considered in.

How to optimize this behavior, so that all in-code stabilizations are considered as float s? Use a f suffix for

Code>:

  float q1 = ...; float q2 = ...; float r = (q1 + q2) * 0.5 f;  

The standard (§6.4.4.2 floating constant) states:

An unrecognized floating continuous type is double if the letter f or F , then its type is float if the letter sticks with L or L , its type is < C Ode is a long double .

Fixed your question is not a suffix and therefore type is double .


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -