1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-09 22:55:42 +00:00

[ci skip] fix product formula in overflow comment

This commit is contained in:
Oliver Booth 2022-04-22 09:12:35 +01:00
parent 6a1f64f042
commit f961530962
No known key found for this signature in database
GPG Key ID: 32A00B35503AF634
4 changed files with 4 additions and 4 deletions

View File

@ -31,6 +31,6 @@ public class ByteTests
Assert.AreEqual(8, Enumerable.Range(1, 2).Product(Double));
Assert.AreEqual(48, Enumerable.Range(1, 3).Product(Double));
// Π_(i=1)^(n(i*2)) will overflow at i=4 for byte
// Π_(i=1)^n (2i) will overflow at i=4 for byte
}
}

View File

@ -35,6 +35,6 @@ public class Int16Tests
Assert.AreEqual(384, Enumerable.Range(1, 4).Product(Double));
Assert.AreEqual(3840, Enumerable.Range(1, 5).Product(Double));
// Π_(i=1)^(n(i*2)) will overflow at i=6 for short
// Π_(i=1)^n (2i) will overflow at i=6 for short
}
}

View File

@ -38,6 +38,6 @@ public class Int32Tests
Assert.AreEqual(10321920, Enumerable.Range(1, 8).Product(Double));
Assert.AreEqual(185794560, Enumerable.Range(1, 9).Product(Double));
// Π_(i=1)^(n(i*2)) will overflow at i=10 for int
// Π_(i=1)^n (2i) will overflow at i=10 for int
}
}

View File

@ -38,6 +38,6 @@ public class UInt16Tests
Assert.AreEqual(3840U, Enumerable.Range(1, 5).Product(Double));
Assert.AreEqual(46080U, Enumerable.Range(1, 6).Product(Double));
// Π_(i=1)^(n(i*2)) will overflow at i=7 for ushort
// Π_(i=1)^n (2i) will overflow at i=7 for ushort
}
}