what does 10.0F mean?

as the title says I wonder what it means

and how that counting system works.


Comments

  • The numbers you are referring to are in hexidecimal.

    The counting system is base 16.


    The numbers are:


    0 1 2 3 4 5 6 7 8 9 A B C D E F


    To find the equivalent number in decimal:


    Rightmost number: # x 1.

    2nd number: # x 16.

    3rd number: # x 16^2.


    etc.


    Matthew Gross




    URL:http://acheronx.resnet.tamu.edu

  • : as the title says I wonder what it means

    : and how that counting system works.


    Assuming a C/C++ context, it means to store the floating point number as a "float" instead of a "double". Similar to the "long" vs "int" constants such as "10" vs "10L".


    double d1 = 10.0;

    float f1 = 10.0F;

    float f2 = (float) 10.0;

    // f1 and f2 get you to the same place




Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories