2014-01-29 61 views

回答

7

您可以使用FLT_MIN,FLT_MAX:

NSLog(@"MIN=%f;MAX=%f", FLT_MIN, FLT_MAX); 

Output: 
MIN=0.000000;MAX=340282346638528859811704183484516925440.000000 
+0

這裏FLT_MIN值描述最低限度的負幅度值,實際最小值是-FLT_MAX –

4

您可以使用浮點值FLT_MINFLT_MAXDBL_MIN和​​雙重價值發現的最小幅度值。

請記住,這是最小幅度值,浮法的最低數值爲-FLT_MAX並雙擊它是-DBL_MAX

它們的值如下:

FLT_MIN:0.000000(magnitude value, in real minimum float value= -FLT_MAX) 

FLT_MAX:340282346638528859811704183484516925440.000000 

DBL_MIN:0.000000(magnitude value, in real minimum float value= -DBL_MAX) 

DBL_MAX:179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 
相關問題