(rontolisp) docs
← Functions

linalg:randn

(linalg:randn shape &optional element-type)

Returns an array of standard-normal draws (numpy's np.random.randn, but taking a shape designator like linalg:zeros; double by default, 'single-float for #f). The Gaussians are built by Irwin-Hall -- the sum of 12 uniforms minus 6 -- rather than Box-Muller, so a sequence seeded with linalg:seed stays bit-identical across backends (WASM's log/cos are polynomial approximations); the tails clip at +/- 6 sigma, which is fine for weight initialization but not a distribution-exact np.random.randn.