mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-09 23:45:42 +00:00
[ci skip] fix product formula in overflow comment
This commit is contained in:
parent
6a1f64f042
commit
f961530962
@ -31,6 +31,6 @@ public class ByteTests
|
|||||||
Assert.AreEqual(8, Enumerable.Range(1, 2).Product(Double));
|
Assert.AreEqual(8, Enumerable.Range(1, 2).Product(Double));
|
||||||
Assert.AreEqual(48, Enumerable.Range(1, 3).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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,6 +35,6 @@ public class Int16Tests
|
|||||||
Assert.AreEqual(384, Enumerable.Range(1, 4).Product(Double));
|
Assert.AreEqual(384, Enumerable.Range(1, 4).Product(Double));
|
||||||
Assert.AreEqual(3840, Enumerable.Range(1, 5).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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,6 @@ public class Int32Tests
|
|||||||
Assert.AreEqual(10321920, Enumerable.Range(1, 8).Product(Double));
|
Assert.AreEqual(10321920, Enumerable.Range(1, 8).Product(Double));
|
||||||
Assert.AreEqual(185794560, Enumerable.Range(1, 9).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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,6 @@ public class UInt16Tests
|
|||||||
Assert.AreEqual(3840U, Enumerable.Range(1, 5).Product(Double));
|
Assert.AreEqual(3840U, Enumerable.Range(1, 5).Product(Double));
|
||||||
Assert.AreEqual(46080U, Enumerable.Range(1, 6).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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user