Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DeciMojo <!-- omit in toc -->

A comprehensive decimal and integer mathematics library for [Mojo](https://www.modular.com/mojo).
An arbitrary-precision decimal and integer mathematics library for [Mojo](https://www.modular.com/mojo).

**[中文·漢字»](https://zhuyuhao.com/decimojo/docs/readme_zht.html)** | **[Repository on GitHub»](https://github.com/forfudan/decimojo)** | **[Changelog](https://zhuyuhao.com/decimojo/docs/changelog.html)**

Expand All @@ -16,13 +16,13 @@ A comprehensive decimal and integer mathematics library for [Mojo](https://www.m

## Overview

DeciMojo provides a comprehensive decimal and integer mathematics library for Mojo, delivering exact calculations for financial modeling, scientific computing, and applications where floating-point approximation errors are unacceptable. Beyond basic arithmetic, the library includes advanced mathematical functions with guaranteed precision.
DeciMojo provides an arbitrary-precision decimal and integer mathematics library for Mojo, delivering exact calculations for financial modeling, scientific computing, and applications where floating-point approximation errors are unacceptable. Beyond basic arithmetic, the library includes advanced mathematical functions with guaranteed precision.

The core types are:

- A 128-bit fixed-point decimal implementation (`Decimal`) supporting up to 29 significant digits with a maximum of 28 decimal places[^fixed]. It features a complete set of mathematical functions including logarithms, exponentiation, roots, and trigonometric operations.
- A 128-bit fixed-point decimal implementation (`Decimal`) supporting up to 29 significant digits with a maximum of 28 decimal places[^fixed]. It features a complete set of mathematical functions including logarithms, exponentiation, roots, etc.
- An arbitrary-precision decimal implementation `BigDecimal` allowing for calculations with unlimited digits and decimal places[^arbitrary].
- A base-10 arbitrary-precision signed integer type (`BigInt`) and a base-10 arbitrary-precision unsigned integer type (`BigUInt`) supporting unlimited digits[^integer]. It features comprehensive arithmetic operations, comparison functions, and supports extremely large integer calculations efficiently.
- An arbitrary-precision decimal implementation `BigDecimal` allowing for calculations with unlimited digits and decimal places[^arbitrary]. It is currently under active development.

This repository includes [TOMLMojo](https://github.com/forfudan/decimojo/tree/main/src/tomlmojo), a lightweight TOML parser in pure Mojo. It parses configuration files and test data, supporting basic types, arrays, and nested tables. While created for DeciMojo's testing framework, it offers general-purpose structured data parsing with a clean, simple API.

Expand Down Expand Up @@ -232,7 +232,7 @@ If you find DeciMojo useful for your research, consider listing it in your citat
@software{Zhu.2025,
author = {Zhu, Yuhao},
year = {2025},
title = {A comprehensive decimal and integer mathematics library for Mojo},
title = {An arbitrary-precision decimal and integer mathematics library for Mojo},
url = {https://github.com/forfudan/decimojo},
version = {0.2.0},
note = {Computer Software}
Expand Down
2 changes: 1 addition & 1 deletion mojoproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["ZHU Yuhao 朱宇浩 <dr.yuhao.zhu@outlook.com>"]
channels = ["https://conda.modular.com/max", "https://repo.prefix.dev/modular-community", "conda-forge"]
# channels = ["https://conda.modular.com/max-nightly", "https://conda.modular.com/max", "https://repo.prefix.dev/modular-community", "conda-forge"]
description = "A comprehensive decimal and integer mathematics library for Mojo"
description = "An arbitrary-precision decimal and integer mathematics library for Mojo"
license = "Apache-2.0"
name = "decimojo"
platforms = ["osx-arm64", "linux-64"]
Expand Down
3 changes: 0 additions & 3 deletions src/decimojo/decimal/arithmetics.mojo
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# ===----------------------------------------------------------------------=== #
# DeciMojo: A fixed-point decimal arithmetic library in Mojo
# https://github.com/forfudan/decimojo
#
# Copyright 2025 Yuhao Zhu
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
3 changes: 0 additions & 3 deletions src/decimojo/decimal/comparison.mojo
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# ===----------------------------------------------------------------------=== #
# DeciMojo: A fixed-point decimal arithmetic library in Mojo
# https://github.com/forfudan/decimojo
#
# Copyright 2025 Yuhao Zhu
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
3 changes: 0 additions & 3 deletions src/decimojo/decimal/constants.mojo
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# ===----------------------------------------------------------------------=== #
# DeciMojo: A fixed-point decimal arithmetic library in Mojo
# https://github.com/forfudan/decimojo
#
# Copyright 2025 Yuhao Zhu
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
3 changes: 0 additions & 3 deletions src/decimojo/decimal/decimal.mojo
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# ===----------------------------------------------------------------------=== #
# DeciMojo: A fixed-point decimal arithmetic library in Mojo
# https://github.com/forfudan/decimojo
#
# Copyright 2025 Yuhao Zhu
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
3 changes: 0 additions & 3 deletions src/decimojo/decimal/rounding.mojo
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# ===----------------------------------------------------------------------=== #
# DeciMojo: A fixed-point decimal arithmetic library in Mojo
# https://github.com/forfudan/decimojo
#
# Copyright 2025 Yuhao Zhu
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
3 changes: 0 additions & 3 deletions src/decimojo/decimal/special.mojo
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# ===----------------------------------------------------------------------=== #
# DeciMojo: A fixed-point decimal arithmetic library in Mojo
# https://github.com/forfudan/decimojo
#
# Copyright 2025 Yuhao Zhu
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down