From 28a20e6eba2919e008f70874b4c12a3ce7ad049c Mon Sep 17 00:00:00 2001 From: Checkmate50 Date: Thu, 17 Sep 2015 03:14:27 -0600 Subject: Added initial support for float addition --- Source/Basetypes/BigFloat.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Source/Basetypes') diff --git a/Source/Basetypes/BigFloat.cs b/Source/Basetypes/BigFloat.cs index 1fb05005..33860a4f 100644 --- a/Source/Basetypes/BigFloat.cs +++ b/Source/Basetypes/BigFloat.cs @@ -17,7 +17,7 @@ namespace Microsoft.Basetypes /// /// A representation of a 32-bit floating point value - /// Note that this value has a 1-bit sign, 8-bit exponent, and 23-bit mantissa + /// Note that this value has a 1-bit sign, 8-bit exponent, and 24-bit mantissa /// public struct BigFloat { @@ -85,17 +85,17 @@ namespace Microsoft.Basetypes [Pure] public static BigFloat FromInt(int v) { - return new BigFloat(v, 0, 23, 8); //TODO: modify for correct fp representation + return new BigFloat(v, 0, 24, 8); //TODO: modify for correct fp representation } [Pure] public static BigFloat FromBigInt(BIM v) { - return new BigFloat(0, v, 8, 23); //TODO: modify for correct fp representation + return new BigFloat(0, v, 8, 24); //TODO: modify for correct fp representation } public static BigFloat FromBigDec(BIM v) { - return new BigFloat(0, v, 8, 23); //TODO: modify for correct fp representation + return new BigFloat(0, v, 8, 24); //TODO: modify for correct fp representation } [Pure] @@ -107,9 +107,9 @@ namespace Microsoft.Basetypes { switch (vals.Length) { case 1: - return Round(vals[0], 8, 23); + return Round(vals[0], 8, 24); case 2: - return new BigFloat(Int32.Parse(vals[0]), BIM.Parse(vals[1]), 8, 23); + return new BigFloat(Int32.Parse(vals[0]), BIM.Parse(vals[1]), 8, 24); case 3: return Round(vals[0], Int32.Parse(vals[1]), Int32.Parse(vals[2])); case 4: -- cgit v1.2.3