Skip to content

Enhanced Calculator: Scientific Functions, Currency Conversion & 3D UI - #1

Open
srj0224 wants to merge 2 commits into
masterfrom
devin/1725378847-enhanced-calculator
Open

Enhanced Calculator: Scientific Functions, Currency Conversion & 3D UI#1
srj0224 wants to merge 2 commits into
masterfrom
devin/1725378847-enhanced-calculator

Conversation

@srj0224

@srj0224 srj0224 commented Sep 3, 2025

Copy link
Copy Markdown
Owner

Enhanced Calculator: Scientific Functions, Currency Conversion & 3D UI

Summary

This PR transforms the existing basic calculator into a comprehensive multi-mode application with three distinct functionalities:

🧮 Scientific Calculator Mode

  • Adds trigonometric functions (sin, cos, tan) with degree/radian toggle
  • Logarithmic functions (log, ln), square root, and exponentiation
  • Mathematical constants (π, e) as dedicated buttons
  • Enhanced expression parser using modified Shunting-yard algorithm

💱 Currency Conversion Mode

  • Real-time currency conversion using ExchangeRate-API
  • Support for 9 major world currencies (USD, EUR, GBP, JPY, CAD, AUD, CHF, CNY, INR)
  • Exchange rate caching and error handling for API failures
  • Clean conversion interface with dropdown selectors

🎨 Enhanced UI/UX

  • Subtle 3D visual effects using CSS perspective transforms
  • Mode toggle buttons for seamless switching between Basic/Scientific/Currency
  • Improved button animations with hover/active states
  • Enhanced dark theme support across all modes
  • Removed author attribution for professional appearance
  • Maintained responsive design for all screen sizes

Review & Testing Checklist for Human

This is a high-risk PR due to its scope and complexity. Please test thoroughly:

  • Test scientific functions accuracy - Verify sin(90°)=1, cos(0°)=1, tan(45°)=1, and that degree/radian toggle works correctly
  • Validate currency conversion - Test with different currency pairs, verify exchange rates are reasonable, and check error handling when offline
  • Cross-browser compatibility - Ensure 3D CSS transforms render correctly across different browsers and don't impact performance
  • Mobile responsiveness - Test scientific/currency modes on mobile viewport to ensure proper layout on small screens
  • Error handling robustness - Test invalid mathematical expressions, network failures, and edge cases in all modes

Notes

  • Session Details: Requested by @srj0224 | Link to Devin run
  • API Dependency: Currency conversion requires internet connection and relies on exchangerate-api.com
  • Browser Support: 3D CSS transforms may not work on older browsers
  • Mathematical Engine: Core calculation logic was significantly modified - thorough testing of edge cases recommended
  • State Persistence: Calculator mode and angle mode preferences are saved to localStorage

…d 3D UI effects

- Add scientific calculator mode with trigonometric functions (sin, cos, tan)
- Add logarithmic functions (log, ln), square root, and exponentiation
- Implement degree/radian toggle for trigonometric calculations
- Add currency conversion feature with real-time exchange rates via API
- Support for major world currencies (USD, EUR, GBP, JPY, CAD, AUD, CHF, CNY, INR)
- Enhance UI with subtle 3D visual effects using CSS transforms
- Add mode switching between Basic, Scientific, and Currency modes
- Improve button styling with hover animations and depth effects
- Maintain existing functionality: basic arithmetic, theme toggle, history
- Ensure responsive design across all screen sizes
- Add proper error handling for API failures and invalid inputs

Co-Authored-By: [email protected] <[email protected]>
@devin-ai-integration

Copy link
Copy Markdown

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

- Remove 'Made with ❤ by Harsh Trivedi' footer section
- Clean up calculator interface to look more like actual calculator
- Maintain all existing functionality and 3D styling effects

Co-Authored-By: [email protected] <[email protected]>
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