Plan 9 from Bell Labs’s /usr/web/sources/contrib/maht/imgfs/gauss.rc
#!/bin/rc . /bin/maths.rc e = 2.71828 pi = 3.14159 sd = 0.84 scale = 5 fn gauss { div `{exp `{div -`{mul $1 $1} `{mul $sd $sd} }} `{sqrt `{mul 2 $pi $sd}} } gauss 0 gauss 0.5 gauss 2