Your code reminded me, do you think $calc() would benefit from bit shifting and other bitwise operators built in?