calculator with bug for cos