Skip to content

Commit 5decaa9

Browse files
Merge pull request #118 from ktsu-dev/fix/radix-is-ten
2 parents 92b1d20 + 0ca4ab3 commit 5decaa9

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎PreciseNumber.Test/PreciseNumberTests.cs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,8 @@ public void TestDivisionWithSmallNumbers()
969969
[TestMethod]
970970
public void TestRadix()
971971
{
972-
Assert.AreEqual(2, PreciseNumber.Radix);
972+
// The type stores significand × 10^exponent, so like decimal it is base 10.
973+
Assert.AreEqual(10, PreciseNumber.Radix);
973974
}
974975

975976
[TestMethod]

‎PreciseNumber/PreciseNumber.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,10 +434,10 @@ private static PreciseNumber ConstantTo(PreciseNumber constant, int significantD
434434
/// </summary>
435435
internal static CultureInfo InvariantCulture { get; } = CultureInfo.InvariantCulture;
436436

437-
private const int BinaryRadix = 2;
437+
private const int DecimalRadix = 10;
438438

439439
/// <inheritdoc/>
440-
public static int Radix => BinaryRadix;
440+
public static int Radix => DecimalRadix;
441441

442442
/// <inheritdoc/>
443443
public static PreciseNumber AdditiveIdentity => Zero;

0 commit comments

Comments
 (0)