Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Floating value is too small
Message
De
23/02/2014 19:54:56
 
 
À
23/02/2014 19:28:10
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01595024
Message ID:
01595025
Vues:
48
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform