generators.normalCdf
This function gives the standard normal cumulative distribution, `P(Z <= x)`. Below 0.75 in size, `x` uses the series of `0.5 + phi(x) * (x + x^3/3 + x^5/15 + ...)`. The tails use the continued fraction of the Mills ratio, so a lower tail has no cancellation. On 2026-11-09 the error was at most 4.4 ulps from -38 to 9, against `mpmath`. `normalCdf(-37)` is approximately 5.7e-300, not 0.
CLI- Package
- @procedures/generators · README
- Path
["generators","normalCdf"]- CLI
mark generators normalCdf --x <number>- As data
{"$proc":["generators","normalCdf"],"input":{}}
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/generators/register"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["generators","normalCdf"], { x: 1 });
console.log(JSON.stringify(result));From the command line
$ mark generators normalCdf --x <number>
As data, in a program
{ "$proc": ["generators", "normalCdf"], "input": { "x": 1 } }Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
x | number | yes | A number. `-Infinity` gives 0 and `Infinity` gives 1. `NaN` throws a `RangeError`. |
Output
The schema does not list fields (number).
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"x": {
"type": "number",
"description": "A number. `-Infinity` gives 0 and `Infinity` gives 1. `NaN` throws a `RangeError`."
}
},
"required": [
"x"
],
"additionalProperties": false
},
"output": {
"type": "number"
}
}