Calc ported to Go as example