maximum value for type float in c#

前端 未结 8 1653
你的背包
你的背包 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:10

    Old question, but here's the min and max in string format.

    Using float.Parse
    -340282356779733642999999999999999999999 to 340282356779733642999999999999999999999
    Using float.MinValue.ToString("#") and float.MaxValue.ToString("#")
    -340282300000000000000000000000000000000 to 340282300000000000000000000000000000000
    Using float.MinValue.ToString() and float.MaxValue.ToString()
    -3.402823E+38 to 3.402823E+38
    

提交回复
热议问题