Skip to content

batman1140/calc

Repository files navigation

Advanced Scientific Calculator

A modern, elegant calculator application built with Vue.js and Go, capable of performing advanced mathematical and physics calculations.

Features

1. Algebraic Calculations

  • Basic arithmetic operations (+, -, *, /)
  • Power operations (use ^ for exponents)
  • Parentheses for operation grouping
  • Example: 2 * (3 + 4) - 5^2 = -11

2. Calculus Operations

  • Derivatives
    • Numerical derivatives of mathematical functions
    • Evaluate at specific points
  • Integrals
    • Numerical integration using trapezoidal rule
    • Definite integrals with upper and lower bounds

3. Matrix Operations

  • Matrix Addition
  • Matrix Multiplication
  • Determinant Calculation
  • Input format: [[1,2],[3,4]]

4. Physics Formulas

  • Velocity (v = d/t)
  • Force (F = ma)
  • Kinetic Energy (KE = ½mv²)
  • Potential Energy (PE = mgh)
  • Ohm's Law (I = V/R)

5. Unit Conversions

  • Length: Meters ↔ Feet
  • Mass: Kilograms ↔ Pounds
  • Temperature: Celsius ↔ Fahrenheit

Technology Stack

  • Frontend: Vue.js with Vite

    • Modern, responsive UI
    • Real-time calculations
    • Elegant glass-morphism design
  • Backend: Go

    • Fast and efficient calculations
    • RESTful API
    • Powered by high-performance mathematical libraries

Getting Started

Prerequisites

  • Node.js (v14 or higher)
  • Go (v1.16 or higher)
  • npm or yarn

Installation

  1. Clone the repository
git clone <repository-url>
cd calc
  1. Install frontend dependencies
npm install
  1. Install Go dependencies
go mod tidy

Running the Application

  1. Start the backend server
cd backend
go run main.go
  1. Start the frontend development server (in a new terminal)
npm run dev
  1. Open your browser and navigate to the URL shown in the terminal (typically http://localhost:5173)

Usage Examples

Algebraic Calculations

  • Input: 2 * (3 + 4) - 5^2
  • Result: -11 (2 * 7 - 25)

Calculus

  • Derivative of x² at x = 2
  • Result: 4

Matrix Operations

  • Adding matrices:
    • Matrix 1: [[1,2],[3,4]]
    • Matrix 2: [[1,1],[1,1]]
    • Result: [[2,3],[4,5]]

Physics Calculations

  • Velocity:
    • Distance: 100 meters
    • Time: 20 seconds
    • Result: 5 m/s

Unit Conversion

  • Converting 100 meters to feet
  • Result: 328.084 feet

Developer

Developed by Vignesh

License

This project is licensed under the MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published