1.0.1 • Published 2 years ago

@partylikeits1983/statistics_solidity v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

statistics_solidity

Statitics Functions in Solidity

Usage

With npm:

$ npm i statistics_solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "@partylikeits1983/statistics_solidity/contracts/Statistics.sol";

contract model {

    function test(int x) public view returns (int y) {

        y = Statistics.pdf(x);

        return y;
    }
}

Version 1.0

FunctionsDescriptionGas Estimation
pdfProbability Density Function32869
cdfCumulative Distribution Function31522
errError Function30137

Testing

npx hardhat test tests/stats.test.js
node stats.js

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.