summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Checkmate50 <dgeisler50@gmail.com>2016-07-22 10:29:55 -0600
committerGravatar Checkmate50 <dgeisler50@gmail.com>2016-07-22 10:29:55 -0600
commit07c34b257ba84db8ec26cba283aae74f87087181 (patch)
tree9e69f86b585466b78bc7cac4e4e356fad056b48b
parent86c78db45fad37209663bf87547a50a880760051 (diff)
Removed automatic exponent shifting
-rw-r--r--Source/Basetypes/BigFloat.cs3
1 files changed, 2 insertions, 1 deletions
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);