# Should \`Stdlib.Float.min\_float\` be negative?

**URL:** <https://discuss.ocaml.org/t/should-stdlib-float-min-float-be-negative/17631>\
**Category:** Learning\
**Tags:** stdlib\
**Created:** [December 23, 2025, 9:25pm UTC](https://discuss.ocaml.org/t/should-stdlib-float-min-float-be-negative/17631 "2025-12-23T21:25:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yawaramin](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/yawaramin/32/3384_2.png) [@yawaramin](https://discuss.ocaml.org/u/yawaramin)\
**Post date:** [December 23, 2025, 9:25pm UTC](https://discuss.ocaml.org/t/should-stdlib-float-min-float-be-negative/17631/1 "2025-12-23T21:25:09Z")

</div>

`Float.min_float` is a positive number:

```auto
# Float.min_float;;
- : float = 2.22507385850720138e-308

```

This is a bit surprising to me. Shouldn’t it be a negative number?

---

<div class="post-metadata">

**Author:** ![dbuenzli](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/dbuenzli/32/18_2.png) [@dbuenzli](https://discuss.ocaml.org/u/dbuenzli)\
**Post date:** [December 23, 2025, 10:06pm UTC](https://discuss.ocaml.org/t/should-stdlib-float-min-float-be-negative/17631/2 "2025-12-23T22:06:22Z")

</div>

I’m pretty sure I got as surprised as you are at some point.

But it mirrors what [C says about this](https://en.cppreference.com/w/c/types/limits.html#Limits_of_floating-point_types) (`DBL_MIN`). So as a consolation it’s less surprising polyglotally speaking. The number you are seeking for is ` ~-. max_float`.

---

<div class="post-metadata">

**Author:** ![yawaramin](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/yawaramin/32/3384_2.png) [@yawaramin](https://discuss.ocaml.org/u/yawaramin)\
**Post date:** [December 23, 2025, 10:08pm UTC](https://discuss.ocaml.org/t/should-stdlib-float-min-float-be-negative/17631/3 "2025-12-23T22:08:35Z")

</div>

Oh that makes sense–thanks!
