1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-21 16:28:47 +00:00
This commit is contained in:
Oliver Booth 2024-11-14 16:15:37 +00:00
parent 0be10d819f
commit 44d3aec9a6
Signed by: oliverbooth
GPG Key ID: 2A862C3F46178E8E
2 changed files with 3 additions and 5 deletions

View File

@ -9,8 +9,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- X1OD: `IBinaryInteger<T>.Factorial` now starts at `IBinaryInteger<T>.MultiplicativeIdentity` not
`IBinaryInteger<T>.One`.
- X10D: Removed `IEnumerable<T>.GreatestCommonFactor` for all integer types in favour of generic math.
- X10D: Removed `IEnumerable<T>.LowestCommonMultiple` for all integer types in favour of generic math.
- X10D: Removed `IEnumerable<T>.Product` for all integer types in favour of generic math.

View File

@ -69,12 +69,12 @@ public static class BinaryIntegerExtensions
return 1;
}
TInteger result = TInteger.MultiplicativeIdentity;
long result = 1L;
for (TInteger i = TInteger.One; i <= value; i++)
{
result *= i;
result *= long.CreateChecked(i);
}
return long.CreateChecked(result);
return result;
}
}