# \[ANN\] euler 0.3

**URL:** <https://discuss.ocaml.org/t/ann-euler-0-3/14877>\
**Category:** Community\
**Tags:** overflow, arithmetic, library, announce\
**Created:** [June 28, 2024, 11:23pm UTC](https://discuss.ocaml.org/t/ann-euler-0-3/14877 "2024-06-28T23:23:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![glen](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/glen/32/4656_2.png) [@glen](https://discuss.ocaml.org/u/glen)\
**Post date:** [June 28, 2024, 11:23pm UTC](https://discuss.ocaml.org/t/ann-euler-0-3/14877/1 "2024-06-28T23:23:35Z")

</div>

It is my pleasure to announce the release of Euler version 0.3. 🙂

Euler is an arithmetic library for OCaml integers. For more details, please read **[the repo](https://github.com/gmevel/euler-lib)**’s README or browse **[the docs](https://gmevel.github.io/euler-lib/index.html/euler/Euler/index.html)**.

In version 0.3:

- some amount of optimization (🪄 magic tricks to compute logarithms, see source code of [`log2sup`](https://github.com/gmevel/euler-lib/blob/0.3/src/Arith.ml#L621-L695) and [`logsup`](https://github.com/gmevel/euler-lib/blob/0.3/src/Arith.ml#L697-L750));
- new functions (for instance: root extraction, multiplicative order);
- `Arith.gcdext` now returns minimal coefficients and avoids overflows (which was [not trivial](https://github.com/gmevel/euler-lib/blob/0.3/src/Arith.ml#L1390-L1514));
- factorization now performs some steps of Fermat’s factor searching, which I think closes the gap with [Owl](https://github.com/owlbarn/owl) (mentioning this because @struktured [had asked me](https://discuss.ocaml.org/t/ann-euler-an-arithmetic-library-for-native-integers/12482/9) how Euler compared with Owl, and Fermat’s algorithm was the only integer arithmetic operation that I found in Owl not provided by Euler).

The full list of changes is found in the changelog, in the repo.

Happy factorizing!

(This is a new topic because I cannot edit [the initial one](https://discuss.ocaml.org/t/ann-euler-an-arithmetic-library-for-native-integers/12482).)

---

<div class="post-metadata">

**Author:** ![struktured](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/struktured/32/385_2.png) [@struktured](https://discuss.ocaml.org/u/struktured)\
**Post date:** [June 28, 2024, 11:49pm UTC](https://discuss.ocaml.org/t/ann-euler-0-3/14877/2 "2024-06-28T23:49:29Z")

</div>

Great stuff, and now that owl is being rebranded / refactored (need to catch up on that), it manifests euler clearly as it’s own thing and not equal to, or part of, a “fat math” library (although it’s sort of an integer fat math library…).

While I don’t have an immediate use case for the library right now I am still going to play with the api this weekend and see if my desktop has any juice to it.

Thanks for the hard work!

Edit: I did not see euler 0.3 on opam yet, even after an opam update (ocaml version 5.1.1).

---

<div class="post-metadata">

**Author:** ![glen](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/glen/32/4656_2.png) [@glen](https://discuss.ocaml.org/u/glen)\
**Post date:** [June 29, 2024, 12:15pm UTC](https://discuss.ocaml.org/t/ann-euler-0-3/14877/3 "2024-06-29T12:15:37Z")

</div>

> [@struktured](#):
>
> Edit: I did not see euler 0.3 on opam yet, even after an opam update (ocaml version 5.1.1).

I did the announcement a bit eagerly, the [opam PR](https://github.com/ocaml/opam-repository/pull/26161) is still pending. It should land soon. _Edit:_ it is now available on opam.

I’ve seen the news about Owl, it’s great that they got volunteers to maintain it. 🙂
