From 07c34b257ba84db8ec26cba283aae74f87087181 Mon Sep 17 00:00:00 2001 From: Checkmate50 Date: Fri, 22 Jul 2016 10:29:55 -0600 Subject: Removed automatic exponent shifting --- Source/Basetypes/BigFloat.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Basetypes/BigFloat.cs b/Source/Basetypes/BigFloat.cs index 3816a22d..d27a3b00 100644 --- a/Source/Basetypes/BigFloat.cs +++ b/Source/Basetypes/BigFloat.cs @@ -151,7 +151,8 @@ namespace Microsoft.Basetypes sigSize = sigSize - 1; //Get rid of sign bit isNeg = sig < 0; sig = BIM.Abs(sig); - exp = exp + BIM.Pow(new BIM(2), expSize-1) - BIM.One; + //Uncomment if you want to shift the exponent for the user (i.e. 0e-1f24e8 --> 0e126f24e8) + //exp = exp + BIM.Pow(new BIM(2), expSize-1) - BIM.One; if (exp < 0 || exp >= BIM.Pow(new BIM(2), expSize)) throw new FormatException("The given exponent " + exp + " cannot fit in the bit size " + expSize); -- cgit v1.2.3