# Language manual: floatarray documentation?

**URL:** <https://discuss.ocaml.org/t/language-manual-floatarray-documentation/17844>\
**Category:** Learning\
**Tags:** documentation\
**Created:** [February 25, 2026, 8:06am UTC](https://discuss.ocaml.org/t/language-manual-floatarray-documentation/17844 "2026-02-25T08:06:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Piero\_Furiesi](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/piero_furiesi/32/5482_2.png) [@Piero\_Furiesi](https://discuss.ocaml.org/u/Piero_Furiesi)\
**Post date:** [February 25, 2026, 8:06am UTC](https://discuss.ocaml.org/t/language-manual-floatarray-documentation/17844/1 "2026-02-25T08:06:00Z")

</div>

Hi everyone,

I put myself in the shoes of a beginner looking for the predefined types in the OCaml manual.

The `floatarray` type has been introduced since release 4.6.0 to make the choice between boxed vs. unboxed representations easier, but I cannot find any description of it in the language manual, despite it being mentioned in _[Chapter 22 Interfacing C with OCaml](https://ocaml.org/manual/5.4/intfc.html)_ and in the documentation for some modules.

Is this a gap in the manual, or am I missing something?

---

<div class="post-metadata">

**Author:** ![nojb](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/nojb/32/519_2.png) [@nojb](https://discuss.ocaml.org/u/nojb)\
**Post date:** [February 25, 2026, 8:27am UTC](https://discuss.ocaml.org/t/language-manual-floatarray-documentation/17844/2 "2026-02-25T08:27:45Z")

</div>

What kind of documentation are you looking for? The type and the associated module are documented in the manual [OCaml library : Float.Array](https://ocaml.org/manual/5.1/api/Float.Array.html) (though I agree there is not much discussion of what `floatarray` is).

The thing is that 99.9% of OCaml users are using the standard mode (“flat-float-array”) which renders the use of `floatarray` essentially unnecessary. If memory serves, last time this was discussed, there was no agreement among the maintainers about turning off this optimization by default.

Cheers,  
Nicolas

---

<div class="post-metadata">

**Author:** ![Piero\_Furiesi](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/piero_furiesi/32/5482_2.png) [@Piero\_Furiesi](https://discuss.ocaml.org/u/Piero_Furiesi)\
**Post date:** [February 25, 2026, 8:35am UTC](https://discuss.ocaml.org/t/language-manual-floatarray-documentation/17844/3 "2026-02-25T08:35:15Z")

</div>

> [@nojb](#):
>
> What kind of documentation are you looking for? The type and the associated module are documented in the manual [OCaml library : Float.Array](https://ocaml.org/manual/5.1/api/Float.Array.html) (though I agree there is not much discussion of what `floatarray` is).
> 
> The thing is that 99.9% of OCaml users are using the standard mode (“flat-float-array”) which renders the use of `floatarray` essentially unnecessary. If memory serves, last time this was discussed, there was no agreement among the maintainers about turning off this optimization by default.

Hi nojb,

the point of my question is: imagine a newcomer who’s looking at `type t = floatarray`and thinking _“What the heck_ `floatarray` _stands for? Is this just a typo, does it mean_ `float array` _or is it somewhat different? Let me read TFM…”_

Well, the The Fabulous Manual says nothing about it: our newcomer will get infos about `float`, `‘a array` and no more.

---

<div class="post-metadata">

**Author:** ![nojb](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/nojb/32/519_2.png) [@nojb](https://discuss.ocaml.org/u/nojb)\
**Post date:** [February 25, 2026, 8:43am UTC](https://discuss.ocaml.org/t/language-manual-floatarray-documentation/17844/4 "2026-02-25T08:43:16Z")

</div>

Right. The answer to your question then is that indeed there is no beginner-friendly explanation of what `floatarray` is for in the manual, at the moment. Adding a bit more explanation at the top of the `Float.Array` module would be the simplest way of addressing this concern. PRs in this direction would be welcome.

Cheers,  
Nicolas

---

<div class="post-metadata">

**Author:** ![octachron](https://avatars.discourse-cdn.com/v4/letter/o/49beb7/32.png) [@octachron](https://discuss.ocaml.org/u/octachron)\
**Post date:** [February 25, 2026, 9:40am UTC](https://discuss.ocaml.org/t/language-manual-floatarray-documentation/17844/5 "2026-02-25T09:40:25Z")

</div>

> [@Piero\_Furiesi](#):
>
> Well, the The Fabulous Manual says nothing about it: our newcomer will get infos about `float`, `‘a array` and no more.

The manual is laconic on the subject but it does say that `Float.Array.t` is a packed representation of float arrays: [OCaml library : Float.Array](https://ocaml.org/manual/5.4/api/Float.Array.html) .

---

<div class="post-metadata">

**Author:** ![Piero\_Furiesi](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/piero_furiesi/32/5482_2.png) [@Piero\_Furiesi](https://discuss.ocaml.org/u/Piero_Furiesi)\
**Post date:** [February 25, 2026, 10:26am UTC](https://discuss.ocaml.org/t/language-manual-floatarray-documentation/17844/6 "2026-02-25T10:26:25Z")

</div>

Yep. The unusual thing is that it makes use of floatarray without defining its meaning. floatarray is not listed in the type index neither.

---

<div class="post-metadata">

**Author:** ![nojb](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/nojb/32/519_2.png) [@nojb](https://discuss.ocaml.org/u/nojb)\
**Post date:** [February 25, 2026, 12:53pm UTC](https://discuss.ocaml.org/t/language-manual-floatarray-documentation/17844/7 "2026-02-25T12:53:00Z")

</div>

I made an attempt in this direction over at [Expand doc of Float.Array by nojb · Pull Request #14586 · ocaml/ocaml · GitHub](https://github.com/ocaml/ocaml/pull/14586). Feel free to chime in.

Cheers,  
Nicolas
