⬆️ version bump to v4.5

- Update obioptions.Version from "Release 4.4.29" to "/v/ Release v5"
- Update version.txt from 4.29 → .30
(automated by Makefile)
This commit is contained in:
Eric Coissac
2026-04-07 08:36:50 +02:00
parent 670edc1958
commit 8c7017a99d
392 changed files with 18875 additions and 141 deletions
+30
View File
@@ -0,0 +1,30 @@
# `obistats` Package: Normal Distribution Utilities
The `obistats` package provides a lightweight, efficient implementation of the **normal (Gaussian) distribution**, including core statistical operations.
## Core Type
- `NormalDist`: Represents a normal distribution with parameters:
- `Mu` (mean)
- `Sigma` (standard deviation)
## Predefined Constants
- `StdNormal`: A standard normal distribution (`Mu = 0`, `Sigma = 1`).
- `invSqrt2Pi`: Precomputed constant for performance optimization.
## Key Methods
| Method | Description |
|--------|-------------|
| `PDF(x)` | Computes the **probability density function** at point `x`. |
| `pdfEach(xs [])` | Vectorized PDF evaluation over a slice of values (optimized for standard normal). |
| `CDF(x)` | Computes the **cumulative distribution function** at point `x` via error function (`erfc`). |
| `cdfEach(xs [])` | Vectorized CDF evaluation over a slice. |
| `InvCDF(p)` | Computes the **inverse CDF (quantile function)** using Acklams algorithm with refinement. Handles edge cases (`p = 0`, `1`) and numerical stability. |
| `Rand(r *rand.Rand)` | Generates a random sample from the distribution (uses Gos built-in `NormFloat64`). |
| `Bounds()` | Returns a practical support interval: `[Mu 3·Sigma, Mu + 3·Sigma]` (≈99.7% coverage). |
## Implementation Notes
- Optimized paths for standard normal (`Mu = 0`, `Sigma = 1`) reduce computation cost.
- Uses Gos standard math library (`math.Erfc`, `math.Log`, etc.).
- Designed for performance and numerical accuracy in statistical applications.
> *Note: Duplicates functionality from an internal module (`bench`), likely for reuse in public packages.*