Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added power functionality #19

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

added power functionality #19

wants to merge 1 commit into from

Conversation

stargazer4
Copy link
Contributor

New Operation Addition:

  • api/controller.js: Added exponentiation operation in the exports.calculate function. This operation takes two numbers and returns the result of raising the first number to the power of the second number.
  • public/client.js: Added a case for the exponentiation operation in the calculate function. This case appends operation=pow to the uri when the operation is exponentiation.
  • public/index.html: Added a button for the exponentiation operation in the user interface. This button calls the operationPressed function with '^' as the argument when clicked.

Test Addition:

  • test/arithmetic.test.js: Added tests for the subtraction operation in the Arithmetic describe block. These tests cover various cases including subtracting two positive integers, subtracting a positive integer from zero, subtracting a negative integer from a positive integer, subtracting two negative integers, subtracting an integer from a floating point number, and subtracting with negative exponent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant