My variant of calc.

Maybe for merging with main version. Maybe for nothing.