hoc was developed by brian kernighan and rob pike as a glorified interactive calculator. its basic functionality is to evaluate floating-point numerical expressions, e.g., "1+2*sin(0.7)". then, variables were added, conditionals, loops, user-defined functions, simple io, and more, using a syntax resembling c.