Skip to content
This repository was archived by the owner on Jan 25, 2026. It is now read-only.

divyansh0x0/JCalc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JCalc

A fully functional calculator written in java that can parse any mathematical expression (with correct syntax)

jcalc.mp4

Functions Supported:

  • All trigonometric functions
  • logarithms: log(base, input)
  • signum or sig,
  • ceil and floor,
  • power or pow,
  • round
  • absolute or abs

Operations Supported

  • Addition: +
  • Subtraction: -
  • Division: /
  • Multiplication: *
  • Power: ^
  • Remainder: %
  • Factorial: !

Syntax

The calculator can parse all valid mathematical expressions and supports:

  • Implicit multilication 2log(2,8) is same as 2*log(2,8)
  • Parenthesis supported are ( [ {} ] ) (The ordering does not matter)
     | |/ ___|  / \  | |   / ___|
  _  | | |     / _ \ | |  | |    
 | |_| | |___ / ___ \| |__| |___ 
  \___/ \____/_/   \_\_____\____|

Welcome to JCalc!
Write an expression and press enter to compute it OR write exit to quit
> sin(PI/6) + 2^(3*sqrt(144)) + 10*(2+3) + 4!
Solving sin(PI/6) + 2^(3*sqrt(144)) + 10*(2+3) + 4!
Result: 68719476810.5
>