A calculator for electric circuits