[Gambas-user] How to get mantissa and exponent ?

Benoît Minisini gambas at ...1...
Sun Aug 21 17:37:44 CEST 2011


> How to get mantissa and exponent of normed float ?
> 
> for example:
> float number	= 	27.52
> normed:		= 	0.2752 * 10^2
> 
> function I'm looking for should return 0.2752 and  2
> 
> wally
> 

Soomething like that:

Exponent = Int(Log10(Value)) + 1
Mantissa = Value / 10 ^ Exponent

-- 
Benoît Minisini




More information about the User mailing list