1⍝!/usr/bin/env xetal2⍝│ Two rows on very different scales, made alike by layer norm and by3⍝│ RMS norm. Run with "just demo-lib Norm rows".45"nm:"u̲se<"Norm"67m ← 24r̲eshape0.010.020.030.06100.0200.0300.0600.08ᵘr̲ound ← { a → (f̲loatf̲loor0.5+1000.0× a) ÷1000.0 }9⍝│ Layer norm: nearly the same row twice (a row's scale does not10⍝│ matter), but not quite: the small row's variance (0.00035) is not11⍝│ large next to eps (0.00001), which keeps a constant row from dividing12⍝│ by 0; the large row's is.13ᵘr̲ound (4r̲eshape1.0, 4r̲eshape0.0) ⁿᵐl̲ayerm14⍝│ RMS norm: likewise, and not centered.15ᵘr̲ound (4r̲eshape1.0) ⁿᵐr̲msm