A library for Probability Density Functions in Solidity.
This library inclues a number of probability density functions, including:
- pdf: The probability density function
- pdfDifference: The difference between two pdfs
- isMinimumPoint: Checks if a point is the minimum point of a curve given by pdf2 - pdf1
- isMaximumPoint: Checks if a point is the maximum point of a curve given by pdf2 - pdf1
- pdfDerivativeAtX: The first derivative of a pdf at a given x
- pdfSecondDerivativeAtX: The second derivative of a pdf at a given x
There are tests for each of these functions. And these test are run against reference data calculated in typescript based on pdf-reference.
This project is licensed under MIT.
Foundry template from PaulRBerg