Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Floating value is too small
Message
From
23/02/2014 19:54:56
 
 
To
23/02/2014 19:28:10
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01595024
Message ID:
01595025
Views:
47
>I have this command:
>
>
>DECLARE @ModUser Int
>DECLARE @ModDate DateTime
>DECLARE @AvailableDiskSpace BigInt
>DECLARE @TotalDiskSpace BigInt
>DECLARE @AvailableDiskSpacePercent Float
>DECLARE @Numero Int
>
>SET @ModUser=1
>SET @ModDate='2014-02-23 18:24:58'
>SET @AvailableDiskSpace=4.34447218344401E-313
>SET @TotalDiskSpace=6.29967500442815E-313
>SET @AvailableDiskSpacePercent=68.963433516653
>SET @Numero=16
>
>UPDATE Storage
> SET ModUser=@ModUser,ModDate=@ModDate,AvailableDiskSpace=@AvailableDiskSpace,TotalDiskSpace=@TotalDiskSpace,
> AvailableDiskSpacePercent=@AvailableDiskSpacePercent
> WHERE Numero=@Numero
>
>
>I receive this:
>
>Warning: the floating point value '4.34447218344401E-313' is too small. It will be interpreted as 0.
>Warning: the floating point value '6.29967500442815E-313' is too small. It will be interpreted as 0.
>
>It is not clear what has to be adjusted.


IEEE-754 defines 32-bit floating point values to support an exponent range from about E-38 to E+38. See: https://en.wikipedia.org/wiki/IEEE_754

The value you're trying to populate requires 64-bit, which allows an exponent range of E-323 to E+308. If you need 32-bit only, it will have to be interpreted as zero. And even as it is, it's questionable as to why you would need to use such a small number for total or disk space.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform