Permalink
Browse files

RootSample - divide out factors of 25

  • Loading branch information...
bobbymcr committed Aug 27, 2018
1 parent 21f8633 commit f7055a778c1799815766efd28e2affb1953a3cc0
@@ -10,7 +10,7 @@ namespace RootSample
public struct RootTerm
{
private static readonly List<ushort> Primes = new List<ushort>() { 2, 3 };
private static readonly List<ushort> Primes = new List<ushort>() { 2, 3, 5 };
private readonly int c;
private readonly int x;
@@ -40,5 +40,14 @@ public void FactorsOfNine(int n, string expected)
{
new RootTerm(n).ToString().Should().Be(expected, "sqrt({0}) is {1}", n, expected);
}
[Theory]
[InlineData(50, "5*sqrt(2)")]
[InlineData(1220703125, "15625*sqrt(5)")]
[InlineData(2147483625, "5*sqrt(85899345)")]
public void FactorsOfTwentyFive(int n, string expected)
{
new RootTerm(n).ToString().Should().Be(expected, "sqrt({0}) is {1}", n, expected);
}
}
}

0 comments on commit f7055a7

Please sign in to comment.