Skip to content

Lilica-codes/JavaCalcSpringBoot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

JavaCalcSpringBoot

Spring Boot を使って開発した、高精度計算対応の電卓 API です。
BigDecimal による高精度演算、角度モード(RAD/DEG/GRAD)、単項・二項演算、Gamma 関数などに対応しています。

✨ Features

  • BigDecimal による高精度計算
  • 単項演算(sin, cos, tan, sqrt, factorial など)
  • 二項演算(加減乗除、べき乗など)
  • 角度モード切り替え(RAD / DEG / GRAD)
  • Gamma 関数(Lanczos + reflection)
  • JSON ベースのシンプルな API 設計
  • Controller / Service / Logic の分離による保守性の高い構成

📁 Project Structure

src/
├─ main/
│   ├─ java/
│   │   └─ com.example.calc/
│   │        ├─ controller/
│   │        ├─ service/
│   │        └─ logic/
│   └─ resources/
└─ test/
pom.xml

🚀 API Endpoints

単項演算(Unary)

POST /calc/unary

Request

json
{
  "operator": "sin",
  "value": "1.57079632679",
  "angleMode": "RAD"
}

Response

json
{
  "result": "1"
}

二項演算(Binary)

POST /calc/binary

Request

json
{
  "operator": "+",
  "a": "1.2",
  "b": "3.4"
}

Response

json
{
  "result": "4.6"
}

🛠 Build & Run

Build

mvn clean package

Run

mvn spring-boot:run

🎯 Purpose

Spring Boot の学習と、 GUI 電卓アプリのバックエンド化を目的として開発しました。

About

Spring Boot の学習成果として開発した、高精度・多機能の電卓 API(unary/binary 対応)。

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages