Question Floating point range

Joined
Mar 18, 2015
Messages
6
Programming Experience
Beginner
THe float point range is (+,-)1.5e−45 to (+,-)3.4e38.
Q1: Does that mean
+1.5e−45 to +3.4e38 & -1.5e−45 to -3.4e38, please elaborate ?
Q2: If yes to Q1, then zero (infact values b/w
-1.5e−45 to +1.5e−45) does not fall in any of range in Q1. How "0" (they) is mentioned in float?

Regards
 
Joined
Mar 18, 2015
Messages
6
Programming Experience
Beginner
range in my book for C#

gg.JPG

the range in my book is confusing. lowest value could be (+ or -) 1.5*10^(-45). so if lowest is +1.5 * 10^(-45) then we can't express zero in floating point? am i right?
 

JohnH

C# Forum Moderator
Staff member
Joined
Apr 23, 2011
Messages
811
Location
Norway
Programming Experience
10+
That doesn't correspond to C# data types, although C# float data type is represented by System.Single CLR type, but this is still a C# forum. Have a look here also: 4.1.6 Floating point types that talks about positive/negative/simple zero, and Single.Epsilon Field (System) for "smallest positive Single value that is greater than zero".
 
Top Bottom