...braries/UniswapV2Library.sol)
```
// given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut) {
require(amountIn > 0, 'UniswapV2Libr...
...invdenoms[i])
for j in range(len(ys)):
if nums[i][j] and ys[i]:
b[j] += nums[i][j] * yslice
return [x % self.modulus for x in b]
```
请参见 [这篇文章的 "M of N" 部分](https://blog.ethereum.org/2014/08/16/secret-sharing-erasure-coding-guide-as...