# \#floats

**URL:** https://forum.elixirforum.com/tag/floats/2091.md

[Latest](https://forum.elixirforum.com/latest.md) · [Categories](https://forum.elixirforum.com/categories.md) · [Tags](https://forum.elixirforum.com/tags.md)

---

## [How can I get the fractional part of a float only?](https://forum.elixirforum.com/t/how-can-i-get-the-fractional-part-of-a-float-only/29979)

<div class="topic-metadata">

**Author:** [@dimitarvp](https://forum.elixirforum.com/u/dimitarvp)\
**Replies:** 32\
**Last updated:** [May 23, 2023, 4:01am UTC](https://forum.elixirforum.com/t/how-can-i-get-the-fractional-part-of-a-float-only/29979 "2023-05-23T04:01:42Z")

</div>

So I have a float and I am interested in splitting it to an integer and the fractional part: {3, 0.14} = magic\_function(3.14) Is there such a thing somewhere in Elixir? If not, I’d guess it should be done like this: d…

---

## [Double equals roughness precision](https://forum.elixirforum.com/t/double-equals-roughness-precision/38496)

<div class="topic-metadata">

**Author:** [@cenotaph](https://forum.elixirforum.com/u/cenotaph)\
**Replies:** 21\
**Last updated:** [March 29, 2021, 11:40am UTC](https://forum.elixirforum.com/t/double-equals-roughness-precision/38496 "2021-03-29T11:40:57Z")

</div>

Me being a curious monkey with iex. That’s pretty impressive roughness precision, 16 digits iex(52)\> 4 == 3.9999999999999998 true iex(53)\> 4 == 3.999999999999999 false

---

## [erlang float to bit syntax](https://forum.elixirforum.com/t/erlang-float-to-bit-syntax/36842)

<div class="topic-metadata">

**Author:** [@balaji](https://forum.elixirforum.com/u/balaji)\
**Replies:** 1\
**Last updated:** [January 14, 2021, 3:33pm UTC](https://forum.elixirforum.com/t/erlang-float-to-bit-syntax/36842 "2021-01-14T15:33:53Z")

</div>

I am new to erlang, can anybody explain, what happens in this code snippet?, I am following Programming Erlang software for concurrent world By Joe Armstrong. $ \<\<2.03:64/float\>\>. $ \<\<64,0,61,112,163,215,10,61\>\> $ \<\<2…

---

## [Erlang: How to see a float in its actual bitwise representation?](https://forum.elixirforum.com/t/erlang-how-to-see-a-float-in-its-actual-bitwise-representation/27942)

<div class="topic-metadata">

**Author:** [@Qqwy](https://forum.elixirforum.com/u/Qqwy)\
**Replies:** 2\
**Last updated:** [January 2, 2020, 1:06pm UTC](https://forum.elixirforum.com/t/erlang-how-to-see-a-float-in-its-actual-bitwise-representation/27942 "2020-01-02T13:06:42Z")

</div>

This is a question about a rudimentary operation on the BEAM. That is why I’ve tagged it ‘Erlang’. Recently, an issue came up on the repository of Rational, the elixir library providing rational numbers, about how float…
