Skip to content

Welcome to the Sexagesimal Calculator

PyPI version Python versions Coverage Status Pepy Total Downloads Conventional Commits License: MIT GitHub stars GitHub issues uv Ruff

A robust, modern Python library for high-precision sexagesimal (base-60) arithmetic, born from a project for the History of Mathematics in India (HoMI) initiative at Indian Institute of Technology, Gandhinagar.

This library provides a Sexagesimal class that represents numbers as immutable objects, allowing for intuitive and accurate calculations. It is ideal for applications in historical mathematics, astronomy, and any domain requiring base-60 computation.


Features

  • Immutable Objects: Sexagesimal numbers are immutable, ensuring predictable and bug-free calculations.
  • Intuitive API: Use standard Python operators (+, -, *, /, **, round()) for all arithmetic.
  • High Precision: Backed by Python's Decimal and sympy.Rational for conversions, guaranteeing precision.
  • Educational Tools: Generate beautiful, step-by-step explanations of calculations, perfect for teaching or validation.
  • Fully Typed and Tested: High test coverage with a comprehensive pytest and hypothesis suite.

Ready to get started? Check out the User Guide.