Full Of Bugs Calculator App Documentation

๐Ÿšจ DESCEMET NOTICE: This is not a real calculator - for testing purposes only

๐Ÿ“‹ Bug Reports

DESCEMET: These bug reports are for testing documentation only - not a real calculator app

๐Ÿ› Bug #3: Dangerous Code (eval)

What's broken: Calculator uses unsafe code that hackers could exploit

How to make it happen: Internal code issue - uses eval() function

What should happen: Use safe math parser instead

Severity: Critical - Security risk

๐Ÿ› Bug #7: Sin/Cos/Tan Buttons Use Wrong Units

What's broken: Trig buttons expect radians but users think degrees

How to make it happen:

  1. Type 90 (expecting 90 degrees)
  2. Click sin
  3. Get wrong answer (0.8939... instead of 1)

What should happen: Add option for degrees vs radians

Severity: High - Wrong calculations

๐Ÿ› Bug #9: Can Type Multiple Decimal Points

What's broken: Can type "3.14.159" which isn't a real number

How to make it happen:

  1. Type 3.14
  2. Click . button again
  3. Type more numbers

What should happen: Only allow one decimal point

Severity: High - Invalid numbers

๐Ÿ› Bug #11: Missing Programmer Functions

What's broken: Buttons like AND, OR, XOR don't work

How to make it happen:

  1. Switch to Programmer mode
  2. Click &, |, XOR buttons
  3. Nothing happens (functions not written)

What should happen: Bitwise operations should work

Severity: High - Feature doesn't work

๐Ÿ› Bug #1: Can Type Many Math Signs in a Row

What's broken: You can type things like "5+++2" or "10**/3"

How to make it happen:

  1. Type any number
  2. Click + button many times
  3. See multiple + signs appear

What should happen: Only one math sign allowed at a time

Severity: Medium - Makes wrong calculations

๐Ÿ› Bug #4: Decimal Math is Wrong

What's broken: 0.1 + 0.2 shows 0.30000000000000004

How to make it happen:

  1. Type 0.1 + 0.2
  2. Click =
  3. See wrong answer with too many decimals

What should happen: Show 0.3

Severity: Medium - Wrong answers

๐Ÿ› Bug #5: Square Root of Negative Numbers Shows NaN

What's broken: Taking square root of -9 shows "NaN"

How to make it happen:

  1. Type -9
  2. Click โˆš button
  3. See "NaN" appear

What should happen: Show error message "Can't take square root of negative"

Severity: Medium - Confusing error

๐Ÿ› Bug #6: Dividing by Zero Shows Infinity

What's broken: 1/x button with 0 shows "Infinity"

How to make it happen:

  1. Type 0
  2. Click 1/x button
  3. See "Infinity"

What should happen: Show error "Can't divide by zero"

Severity: Medium - Math error not handled

๐Ÿ› Bug #8: Factorial Button Breaks with Big Numbers

What's broken: Factorial of big numbers shows infinity or crashes

How to make it happen:

  1. Type 200
  2. Click n! button
  3. See "Infinity"

What should happen: Show error "Number too large"

Severity: Medium - No error handling

๐Ÿ› Bug #10: Long Numbers Break Display

What's broken: Very long numbers go outside the screen

How to make it happen:

  1. Type twenty digits
  2. Numbers go off screen

What should happen: Limit digits or use scientific notation

Severity: Medium - Can't see full number

๐Ÿ› Bug #12: Letters in Programmer Mode Cause Errors

What's broken: Can type invalid hex letters (G-Z)

How to make it happen:

  1. Switch to Programmer mode
  2. Use keyboard to type G or H
  3. Causes calculation errors

What should happen: Only allow 0-9 and A-F in hex mode

Severity: Medium - Invalid input

๐Ÿ› Bug #15: Mode Switch Keeps Old Input

What's broken: Switching modes with hex numbers causes errors

How to make it happen:

  1. Go to Programmer mode
  2. Type ABCD
  3. Switch to Basic mode
  4. Try to calculate - error

What should happen: Clear display when switching modes

Severity: Medium - Confusing errors

๐Ÿ› Bug #2: Clear Button Doesn't Fully Reset

What's broken: After clicking =, then AC, the calculator acts weird

How to make it happen:

  1. Type "5+5"
  2. Click =
  3. Click AC
  4. Type a new number - it might not work right

What should happen: AC should reset everything

Severity: Low - Confuses users

๐Ÿ› Bug #13: Parentheses Don't Match

What's broken: Can type ((2+3 with missing )

How to make it happen:

  1. Switch to Scientific mode
  2. Type ((2+3
  3. Click =
  4. Get syntax error

What should happen: Check parentheses match before calculating

Severity: Low - Better error needed

๐Ÿ› Bug #14: Memory Leak

What's broken: Page gets slower over time

How to make it happen: Use calculator for long time, switch modes often

What should happen: Clean up old event listeners

Severity: Low - Performance issue

Summary

I found 15 bugs in your calculator app! The most serious problems are:

๐Ÿ“ฑ Product Requirements

DESCEMET: This product specification is for testing documentation purposes only

Overview

A web-based calculator with three modes: Basic, Scientific, and Programmer. The calculator has a modern dark theme with colorful buttons and smooth animations.

Main Features

Display Area

Three Calculator Modes

1. Basic Mode

What it does: Regular math like a normal calculator

Buttons included:

  • Numbers 0-9
  • Basic math: + - ร— รท
  • Decimal point (.)
  • Clear button (AC)
  • Equals button (=)

Special functions:

  • โˆš - Square root (finds the root of a number)
  • xยฒ - Square (multiplies number by itself)
  • xสธ - Power (raises number to any power)
  • 1/x - Reciprocal (divides 1 by the number)
  • % - Percentage (converts to percent)
  • +/- - Change sign (makes positive/negative)

2. Scientific Mode

What it does: Advanced math for students and professionals

Extra buttons:

  • Parentheses ( ) for complex calculations
  • Memory buttons: MS (save number), MR (recall number)
  • Constants: ฯ€ (pi) and e
  • Trig functions: sin, cos, tan (and their inverses)
  • Logarithms: log and ln
  • Factorial: n! (like 5! = 5ร—4ร—3ร—2ร—1)

3. Programmer Mode

What it does: Computer number conversions and operations

Special features:

  • Hex letters: A, B, C, D, E, F
  • Number conversions: BIN (binary), HEX (hexadecimal), OCT (octal)
  • Bitwise operations: AND (&), OR (|), XOR, NOT
  • Bit shifting: << (left shift), >> (right shift)
  • MOD: Remainder after division

User Interface

Keyboard Support

Users can type instead of clicking:

Visual Design

Expected Behavior

๐Ÿงช Complete QA Test Plan

DESCEMET: This test plan is for documentation testing only - not for a real calculator

Test Overview

Goal: Make sure every button, feature, and mode works perfectly without any errors.

What We'll Test

1. Basic Math Tests

Test Group A: Simple Operations
  • Test A1: Press 2 + 2 = (Should show 4)
  • Test A2: Press 10 - 3 = (Should show 7)
  • Test A3: Press 5 ร— 6 = (Should show 30)
  • Test A4: Press 20 รท 4 = (Should show 5)
  • Test A5: Press 0 รท 5 = (Should show 0)
  • Test A6: Press 5 รท 0 = (Should show error message)
Test Group B: Decimal Numbers
  • Test B1: Press 1.5 + 2.5 = (Should show 4)
  • Test B2: Press 0.1 + 0.2 = (Check if shows 0.3 correctly)
  • Test B3: Try typing multiple dots: 1.2.3 (Should only allow one dot)
  • Test B4: Press . + 5 = (Should treat as 0.5)
Test Group C: Long Calculations
  • Test C1: Chain operations: 5 + 3 ร— 2 = (Check order)
  • Test C2: Very long number: Type 20 digits (Check display limit)
  • Test C3: Many operations: 1 + 2 - 3 ร— 4 รท 5 =
  • Test C4: Mix parentheses: (5 + 3) ร— 2 = (Scientific mode)

2. Special Functions Tests

Test Group D: Basic Mode Functions
  • Test D1: Square root of 16 (Should show 4)
  • Test D2: Square root of -4 (Should show error)
  • Test D3: 5 squared (xยฒ) (Should show 25)
  • Test D4: 2 to power 3 (xสธ) (Should show 8)
  • Test D5: 1/4 reciprocal (Should show 0.25)
  • Test D6: 1/0 reciprocal (Should handle error)
  • Test D7: 50% (Should show 0.5)
  • Test D8: +/- on positive number (Should make negative)
  • Test D9: +/- on negative number (Should make positive)
  • Test D10: +/- on zero (Should stay zero)

3. Mode Switching Tests

Test Group E: Mode Changes
  • Test E1: Start calculation in Basic, switch to Scientific (Should keep number)
  • Test E2: Type 5 + 3, switch modes, press = (Should calculate correctly)
  • Test E3: Switch modes rapidly 10 times (Should not crash)
  • Test E4: Check all buttons change correctly for each mode

4. Scientific Mode Tests

Test Group F: Trigonometry
  • Test F1: sin(0) (Should show 0)
  • Test F2: cos(0) (Should show 1)
  • Test F3: tan(45) (Check if using degrees or radians)
  • Test F4: arcsin(1) (Should show ฯ€/2 or 90)
  • Test F5: arccos(2) (Should show error - out of range)
Test Group G: Advanced Math
  • Test G1: log(100) (Should show 2)
  • Test G2: ln(e) where e is the constant (Should show 1)
  • Test G3: 5! factorial (Should show 120)
  • Test G4: 0! factorial (Should show 1)
  • Test G5: -5! factorial (Should handle error)
  • Test G6: 100! factorial (Check for overflow)
Test Group H: Memory Functions
  • Test H1: Store 42 in memory (MS), clear display, recall (MR)
  • Test H2: Store number, do calculation, recall memory
  • Test H3: Store new number (Should replace old one)
  • Test H4: Recall memory when empty

5. Programmer Mode Tests

Test Group I: Number Conversions
  • Test I1: Convert 10 to binary (Should show 1010)
  • Test I2: Convert 255 to hex (Should show FF)
  • Test I3: Convert 10 to octal (Should show 12)
  • Test I4: Convert negative number to binary
  • Test I5: Type hex letters A-F (Should work in programmer mode)
Test Group J: Bitwise Operations
  • Test J1: 5 AND 3 (Should show 1)
  • Test J2: 5 OR 3 (Should show 7)
  • Test J3: 5 XOR 3 (Should show 6)
  • Test J4: NOT 5 (Check result)
  • Test J5: 4 << 1 (Left shift, should show 8)
  • Test J6: 8 >> 1 (Right shift, should show 4)

6. User Interface Tests

Test Group K: Visual Elements
  • Test K1: Check all colors appear correctly
  • Test K2: Hover over each button (Should grow slightly)
  • Test K3: Click buttons (Should show ripple effect)
  • Test K4: Check title "QUANTUM CALCULATOR" displays
  • Test K5: Verify animated background works
  • Test K6: Check green glow on display text
Test Group L: Display Tests
  • Test L1: Very long result (Should fit or scroll)
  • Test L2: History line updates correctly
  • Test L3: Clear button clears both displays
  • Test L4: Error messages appear and disappear
DESCEMET: These test steps are examples for documentation testing purposes only

7. Keyboard Tests

Test Group M: Keyboard Input
  • Test M1: Type all numbers 0-9
  • Test M2: Type operators + - * /
  • Test M3: Press Enter for equals
  • Test M4: Press Escape to clear
  • Test M5: Use Backspace to delete digits
  • Test M6: Try invalid keys (letters in basic mode)

8. Edge Cases & Stress Tests

Test Group N: Extreme Values
  • Test N1: Largest possible number
  • Test N2: Smallest decimal (0.000...1)
  • Test N3: Result that causes overflow
  • Test N4: Very fast clicking (100 clicks in 10 seconds)
  • Test N5: Random button mashing
Test Group O: Error Handling
  • Test O1: Multiple operators in a row (++ or --)
  • Test O2: End calculation with operator (5 + =)
  • Test O3: Start with operator (ร— 5 =)
  • Test O4: Empty parentheses ()
  • Test O5: Mismatched parentheses (5 + (3 =)

9. Browser & Device Tests

Test Group P: Compatibility
  • Test P1: Chrome browser
  • Test P2: Firefox browser
  • Test P3: Safari browser
  • Test P4: Edge browser
  • Test P5: Mobile phone (touch screen)
  • Test P6: Tablet (different screen size)
  • Test P7: Very small window (responsive design)

10. Performance Tests

Test Group Q: Speed & Memory
  • Test Q1: Load time (Should be under 2 seconds)
  • Test Q2: Button response time (Should be instant)
  • Test Q3: Leave running for 1 hour (Check memory usage)
  • Test Q4: Do 1000 calculations (Should not slow down)

How to Report Bugs

When you find a problem, write:

Pass/Fail Rules

PASS if:

  • Calculation is correct
  • Display shows right result
  • No crashes or freezes
  • Error messages are clear

FAIL if:

  • Wrong answer
  • App crashes
  • Button doesn't work
  • Display shows garbage
  • Error not handled properly

Test Schedule

Important Notes

Remember: Our goal is to find ALL problems before users do!