Skip to content

Conversation

@sdley
Copy link
Owner

@sdley sdley commented Nov 5, 2025

This pull request adds support for exponentiation operations to the calculator, improves input validation, and enhances the user interface for clarity and consistency. The most important changes are grouped below by theme.

New Features

  • Added support for exponentiation (power) operation in both backend (api/controller.js) and frontend logic (public/client.js), allowing users to calculate powers using the ^ operator. [1] [2]
  • Introduced a new unary exponential function (expoPressed) in the frontend, enabling users to compute e^x directly from the calculator UI. [1] [2]

Input Validation and Consistency

  • Improved operand validation logic in the backend (api/controller.js) to use consistent formatting and stricter checks for valid input.
  • Standardized string quoting and formatting throughout frontend code (public/client.js) for better readability and maintainability. [1] [2] [3] [4]

User Interface Enhancements

  • Updated the calculator UI to add a dedicated e^x button and made the equals button span the full width of the keypad for better accessibility (public/index.html, public/default.css). [1] [2]
  • Improved CSS and HTML formatting for consistency, including background image quoting and scaling adjustments for high-resolution screens. [1] [2] [3]

These changes collectively make the calculator more powerful, robust, and user-friendly.

@sdley sdley self-assigned this Nov 5, 2025
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.

2 participants