ucsb-cs56-projects / cs56-utilities-calculator

-
1 stars 10 forks source link

Bug in the ^ operator #14

Closed kjorg50 closed 7 years ago

kjorg50 commented 10 years ago

It seems like any exponent greater than 2, for any number, generates the incorrect result. Here are some of the incorrect results that I experienced

2 ^ 3 = 16 2 ^ 4 = 256 3 ^ 3 = 81

If you input two numbers x ^ y it seems like the calculator is returning x ^ (y+1). Fix this bug.

~estimated 50

mastergberry commented 10 years ago

This issue is referring to https://github.com/twodimension/cs56-utilities-calculator (a fork with some further improvements to this project). I would recommend pulling the fork linked up above first and handling https://github.com/UCSB-CS56-Projects/cs56-utilities-calculator/issues/16 before fixing this bug. This way the code will be much easier to follow.

MadRubicant commented 7 years ago

F16 CLOSED: References a pruned fork