# Decimo v0.9.0 — now with a CLI calculator and Python bindings

**URL:** <https://forum.modular.com/t/decimo-v0-9-0-now-with-a-cli-calculator-and-python-bindings/2899>\
**Category:** Community Showcase\
**Created:** [March 28, 2026, 11:53am UTC](https://forum.modular.com/t/decimo-v0-9-0-now-with-a-cli-calculator-and-python-bindings/2899 "2026-03-28T11:53:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![forfudan](https://sea1.discourse-cdn.com/flex001/user_avatar/forum.modular.com/forfudan/32/925_2.png) [@forfudan](https://forum.modular.com/u/forfudan)\
**Post date:** [March 28, 2026, 11:53am UTC](https://forum.modular.com/t/decimo-v0-9-0-now-with-a-cli-calculator-and-python-bindings/2899/1 "2026-03-28T11:53:09Z")

</div>

[![Version](https://us1.discourse-cdn.com/flex001/uploads/modular/original/2X/1/13b0c02dc2200938de25f6dd83a75940c353ae0c.svg)](https://github.com/forfudan/decimo/releases) [![Mojo](https://us1.discourse-cdn.com/flex001/uploads/modular/original/1X/4f8660dae62554838f90625d71cb0c1da06ad174.svg)](https://docs.modular.com/mojo/manual/) [![pixi](https://us1.discourse-cdn.com/flex001/uploads/modular/original/1X/2ab5f35faf7b38108c400ffe2449a463e267ab6f.svg)](https://prefix.dev/channels/modular-community/packages/decimo)

Hi Mojicians,

[Decimo](https://github.com/forfudan/decimo) (previously known as DeciMojo) just hit **v0.9.0** (compatible with **Mojo v0.26.2** ) and is available right away via:

```auto
pixi add decimo

```

This time around, I wanted to experiment with a couple of features and see how far Mojo can go as a general-purpose language. Let me walk you through what’s new in Decimo.

## CLI Arbitrary-Precision Calculator

This is probably the most fun part. Since [ArgMojo](https://github.com/forfudan/argmojo) is now fully functional (supports subcommands, autocompletion, interactive prompting, compile-time validation — basically everything you’d expect from a CLI framework), I thought: why not dogfood it and build an actual app?

So `decimo` is now also a **command-line calculator**. You type an expression, it evaluates it with arbitrary precision. It’s got a proper tokenizer, a shunting-yard parser, and an RPN evaluator under the hood — all in pure Mojo, compiled to a single native binary with zero runtime dependencies.

```sh
% decimo 1/3+1/7  
0.47619047619047619047619047619047619047619047619048

% decimo "sqrt(2)" -p 50
1.4142135623730950488016887242096980785696718753769

% decimo "pi * sqrt(11.1^15)" --engineering -p 100
217.3062481188781475831859094865556029360927703474185717693262086138432884379636518929905574763204566E+6

```

You can also configure output formatting — scientific notation (`-s`), engineering notation (`-e`), digit delimiters (`-d`), rounding modes (`-r`), precision (`-p`), and more.

Here’s a quick demo of calculating an expression:

![Calculation demo](https://us1.discourse-cdn.com/flex001/uploads/modular/original/2X/7/7f89c34f658d6b7b3b2a87c8161b991c4ad98e05.gif)

And here’s what `decimo -h` looks like (automatically generated by [ArgMojo](https://github.com/forfudan/argmojo)):

![Help output](https://us1.discourse-cdn.com/flex001/uploads/modular/original/2X/7/7ba4eaa2c10b3f9848b9c49befa883dbcfd65cb4.gif)

Honestly, it makes me really happy to see that Mojo can be used as an application programming language — building real tools with proper argument parsing, coloured error messages, the whole thing. It just works.

* * *

## Python Bindings

Also new in this release: Decimo now has **Python bindings** via Mojo’s `PythonModuleBuilder`. The `BigDecimal` type is exposed as a native CPython extension module (`_decimo.so`) with a Pythonic `Decimal` wrapper.

It’s available on PyPI: **[pypi.org/project/decimo](https://pypi.org/project/decimo/)**

```python
from decimo import Decimal

a = Decimal("1.234567890123456789012345678901234567890")
b = Decimal("9.876543210987654321098765432109876543210")
print(a + b)
print(a * b)

```

Still at an early stage — no pre-built wheels yet — but it already proves that Mojo’s interoperability with Python is very strong. Calling Mojo from Python and vice versa is becoming genuinely practical.

* * *

## Other Highlights

- A bunch of new `BigDecimal` methods aligned with Python’s `decimal.Decimal` and IEEE 754: `as_tuple()`, `adjusted()`, `fma()`, `scaleb()`, `same_quantum()`, `copy_abs()`, `copy_sign()`, ` __float__ ()`, engineering notation, digit-group delimiters, and the `ROUND_HALF_DOWN` rounding mode (7 modes total now).
- `TOMLMojo` is merged into Decimo as the sub-package `decimo.toml`.
- Codebase updated to **Mojo v0.26.2** syntax (`byte=` slicing, `out` parameter convention, etc.).

Full changelog: [github.com/forfudan/decimo/releases](https://github.com/forfudan/decimo/releases)

* * *

I’m very optimistic about the future of Mojo. Each release feels like a step closer to a language that’s both fast _and_ pleasant to build real software with.

As always, feedback and issues are welcome on the [repo](https://github.com/forfudan/decimo). Happy hacking! 🔥

---

<div class="post-metadata">

**Author:** ![Photon](https://avatars.discourse-cdn.com/v4/letter/p/b5a626/32.png) [@Photon](https://forum.modular.com/u/Photon)\
**Post date:** [March 31, 2026, 5:24pm UTC](https://forum.modular.com/t/decimo-v0-9-0-now-with-a-cli-calculator-and-python-bindings/2899/2 "2026-03-31T17:24:19Z")

</div>

The calculator is a pretty cool “pythonic” addition 🙂

---

<div class="post-metadata">

**Author:** ![forfudan](https://sea1.discourse-cdn.com/flex001/user_avatar/forum.modular.com/forfudan/32/925_2.png) [@forfudan](https://forum.modular.com/u/forfudan)\
**Post date:** [April 1, 2026, 9:41am UTC](https://forum.modular.com/t/decimo-v0-9-0-now-with-a-cli-calculator-and-python-bindings/2899/3 "2026-04-01T09:41:47Z")

</div>

Yes, finally we are all Pythonistas 😃

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex001/uploads/modular/original/1X/2751e0fbdc595a99718b216730957e9db4448cfd.jpeg) [@system](https://forum.modular.com/u/system)\
**Post date:** [September 28, 2026, 9:42am UTC](https://forum.modular.com/t/decimo-v0-9-0-now-with-a-cli-calculator-and-python-bindings/2899/4 "2026-09-28T09:42:37Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
