maximum value for type float in c#

前端 未结 8 1614
你的背包
你的背包 2021-02-12 14:27

when i do this:

float x = float.MaxValue;

I have the result: 3.40282347E+38

What is E+38? how can I represent the maximum number withou

8条回答
  •  再見小時候
    2021-02-12 15:30

    This is called E-Notation (exponential notation), and is used with scientific notation.

    From the E Notation section of the Wikipedia article on Scientific Notation:

    Because super-scripted exponents like 10^7 cannot always be conveniently displayed, the letter E or e is often used to represent times ten raised to the power of (which would be written as "x 10^b") and is followed by the value of the exponent.

    So, 3.40282347E+38 equals 3.40282347 * 1038 and would be read "3.40282347 times 10 to the power of 38".

提交回复
热议问题