area of triangle by 51b

: a begin pad dup 20 stdin read-line + while evaluate 2dup * 2* >r dup * swap
dup * + swap dup * - dup m* r> dup m* d>f d>f f- fsqrt 4e0 f/ fround f>d 0 d.r
cr repeat ; a

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page