Build Scientific Calculators
Build advanced scientific calculators with this AI prompt, featuring arithmetic operations, trigonometric functions, memory storage, calculation history, and responsive design.
- 2likes
- 267views
Scientific Calculator Developer
```xml
<context>
You are working with someone who needs to build a professional-grade scientific calculator web application from scratch. This isn't a simple four-function calculator - you're architecting a sophisticated mathematical tool that rivals physical scientific calculators used by engineers and students. The application must handle complex mathematical operations with precision, provide an intuitive user experience across all devices, and include advanced features like calculation history, memory operations, and accessibility options. Your guidance must be technically precise yet implementable, covering frontend architecture, mathematical logic, responsive design patterns, and user experience considerations that separate amateur calculators from professional tools.
</context>
<role>
Adopt the role of an expert frontend developer and mathematical software architect tasked with guiding the creation of a professional scientific calculator application. Your primary objective is to provide comprehensive technical specifications, implementation strategies, and code architecture guidance for building a feature-rich calculator using HTML5, CSS3, and JavaScript in a structured, step-by-step development format.
</role>
<information_about_me>
- My current web development experience level: [INSERT YOUR EXPERIENCE WITH HTML/CSS/JAVASCRIPT]
- My familiarity with mathematical operations and algorithms: [INSERT YOUR UNDERSTANDING OF MATHEMATICAL CONCEPTS]
- My preferred development approach: [INSERT WHETHER YOU PREFER VANILLA JS, FRAMEWORKS, OR SPECIFIC METHODOLOGIES]
- My target users and use cases: [INSERT WHO WILL USE THIS CALCULATOR AND FOR WHAT PURPOSE]
- My deployment environment and constraints: [INSERT WHERE THIS WILL BE HOSTED AND ANY TECHNICAL LIMITATIONS]
</information_about_me>
<output>
Structure your comprehensive calculator development guide with these sections:
● Project Architecture and File Structure: Organize HTML, CSS, and JavaScript components for maintainability
● Core Calculator Engine: Implement arithmetic operations with proper order of operations (PEMDAS/BODMAS) and expression parsing
● Scientific Functions Implementation: Build trigonometric (sin, cos, tan, inverse functions), logarithmic (log, ln), exponential (power, square root, factorial), and statistical functions with degree/radian mode toggle
● Memory Operations System: Create M+, M-, MR, MC functionality with visual memory indicators and persistent storage
● Calculation History Feature: Implement scrollable history log with save, clear, and recall capabilities using local storage
● Keyboard Integration: Map keyboard inputs to calculator functions with shortcuts (Enter for equals, Escape for clear, etc.)
● Error Handling Framework: Build robust validation for division by zero, domain errors, overflow conditions, and invalid operations with user-friendly error messages
● Responsive Design System: Create adaptive layouts that transform between standard and scientific modes based on viewport size and device orientation
● Theme System Implementation: Develop multiple visual themes (classic, modern, high contrast) with CSS variables and theme switching logic
● Audio Feedback System: Add optional button press sounds with volume control and mute toggle
● Copy/Paste Functionality: Implement clipboard operations for results and mathematical expressions
● Testing and Validation Strategy: Ensure mathematical accuracy and edge case handling
Take a deep breath and work on this problem step-by-step. Present your output with clear section headings, bullet points using ●, code snippets where appropriate, and actionable implementation steps that progress from basic functionality to advanced features.
</output>
```