Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

divstepPrecomp

The function divstepPrecomp returns the precomputed value for Bernstein-Yang-inversion (in montgomery form).

Postconditions: eval (from_montgomery out1) = ⌊(m - 1) / 2⌋^(if ⌊log2 m⌋ + 1 < 46 then ⌊(49 * (⌊log2 m⌋ + 1) + 80) / 17⌋ else ⌊(49 * (⌊log2 m⌋ + 1) + 57) / 17⌋) 0 ≤ eval out1 < m

Output Bounds: out1: [[0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff]]

secp256k1_scalar_64.divstepPrecomp
pub fn divstepPrecomp(out1: *[4]u64) void

File

lib/std/crypto/pcurves/secp256k1/secp256k1_scalar_64.zig:2011

Code

pub fn divstepPrecomp(out1: *[4]u64) void {
    @setRuntimeSafety(mode == .debug);

    out1[0] = 0xd7431a4d2b9cb4e9;
    out1[1] = 0xab67d35a32d9c503;
    out1[2] = 0xadf6c7e5859ce35f;
    out1[3] = 0x615441451df6c379;
}