# Floating points?

**URL:** <https://clash-lang.discourse.group/t/floating-points/96>\
**Category:** Clash Help\
**Created:** [October 26, 2025, 4:41am UTC](https://clash-lang.discourse.group/t/floating-points/96 "2025-10-26T04:41:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fossy](https://avatars.discourse-cdn.com/v4/letter/f/f1d935/32.png) [@fossy](https://clash-lang.discourse.group/u/fossy)\
**Post date:** [October 26, 2025, 4:41am UTC](https://clash-lang.discourse.group/t/floating-points/96/1 "2025-10-26T04:41:53Z")

</div>

Hi all,

I’m working on some DSP stuff and noticed that floating point primitives were missing. I understand the rationale for this given in the documentation. There is growing support for floating points in various shapes and sizes with DSP primitives in newer chips, and I am working on a block floating point implementation which plays well with fixed numbers for the most part, but does occasionally want to handle floating point values. I think it’s worth at least having types available to pass them around anyway.

I’m imagining something like SFixed, but you’d define the length of the significand and exponent part.

Best Regards,

Christopher

---

<div class="post-metadata">

**Author:** ![leonschoorl](https://yyz2.discourse-cdn.com/free1/user_avatar/clash-lang.discourse.group/leonschoorl/32/13_2.png) [@leonschoorl](https://clash-lang.discourse.group/u/leonschoorl)\
**Post date:** [October 27, 2025, 4:40pm UTC](https://clash-lang.discourse.group/t/floating-points/96/2 "2025-10-27T16:40:15Z")

</div>

There is a collection of Xilinx specific floating point primitives in clash-cores: [clash-cores/src/Clash/Cores/Xilinx/Floating.hs at main · clash-lang/clash-cores · GitHub](https://github.com/clash-lang/clash-cores/blob/main/src/Clash/Cores/Xilinx/Floating.hs)

Which might be interesting for you to have a look at.  
It doesn’t (currently) support changing the type/size of the numbers. Even though the underlying primitives do support that, to some extend.  
It does support configuring some of the pipelining/timing aspects of the implementation, which is exposed via a DSignal interface.

Having something like SFixed, but with two type parameters, for fractional and exponent size should definitely be possible.

---

<div class="post-metadata">

**Author:** ![lmbollen](https://yyz2.discourse-cdn.com/free1/user_avatar/clash-lang.discourse.group/lmbollen/32/10_2.png) [@lmbollen](https://clash-lang.discourse.group/u/lmbollen)\
**Post date:** [October 28, 2025, 8:05am UTC](https://clash-lang.discourse.group/t/floating-points/96/3 "2025-10-28T08:05:36Z")

</div>

Furthermore we’ve had an intern work on [FloPoCO](https://flopoco.org/) integration in Clash: [Add ClashFloPoCo by yourcomrade · Pull Request #23 · clash-lang/clash-cores · GitHub](https://github.com/clash-lang/clash-cores/pull/23)

It’s a crude work in progress at the moment and I’d like to find the time or resources to bring it in a usable state, but have not been able to do that yet.
