← All procedures

statistics.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/statistics · README
Path
["statistics","normalCdf"]
CLI
mark statistics normalCdf --x <number>
As data
{"$proc":["statistics","normalCdf"],"input":{}}

Use it

In TypeScript

import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/statistics/register"; // registers its procedures

const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["statistics","normalCdf"], { x: 1 });
console.log(JSON.stringify(result));

From the command line

$ mark statistics normalCdf --x <number>

As data, in a program

{ "$proc": ["statistics", "normalCdf"], "input": { "x": 1 } }

Input

FieldTypeRequiredDefaultDescription
xnumberyesA 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"
  }
}