# Overview of different number representations, philosophies and use cases

**URL:** <https://discourse.julialang.org/t/overview-of-different-number-representations-philosophies-and-use-cases/102910>\
**Category:** General Usage\
**Tags:** performance, numbers, numerics, fixed-point\
**Created:** [August 17, 2023, 2:59pm UTC](https://discourse.julialang.org/t/overview-of-different-number-representations-philosophies-and-use-cases/102910 "2023-08-17T14:59:31Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![i9e1](https://avatars.discourse-cdn.com/v4/letter/i/ac91a4/32.png) [@i9e1](https://discourse.julialang.org/u/i9e1)\
**Post date:** [August 17, 2023, 4:26pm UTC](https://discourse.julialang.org/t/overview-of-different-number-representations-philosophies-and-use-cases/102910/5 "2023-08-17T16:26:49Z")

</div>

> [@tim.holy](#):
>
> So for us, integers are about counting things.

I consider this to be the better alternative. My workflow often starts with stating the domains of variables in a mathematical sense. At least in my head, at least to the point that I can distinguish logics / counting from “number crunching”.

This reminds me of a half-page long footnote from the first chapter of the [Wizard Book](https://en.wikipedia.org/wiki/Structure_and_Interpretation_of_Computer_Programs):

> [@](#):
>
> The characterization of numbers as “simple data” is a barefaced bluff. In fact, the treatment of numbers is one of the trickiest and most confusing aspects of any programming language.  
> […] Is the real number 2.00 different from the integer 2? […]  
> Above and beyond these questions, of course, lies a collection of issues concerning roundoff and truncation errors – the entire science of numerical analysis.

There was / is also a discussion on what a number in Julia is / should be: [Interface for number](https://discourse.julialang.org/t/interface-for-number/2723/16). I’m unsure if the proposed interface / testset exists now. I think my intention was focused practical scalars used for number crunching: `T <: Real`. Hopefully more advanced stuff like quaternions can be parameterized with underlying `T`.

Different number formats come to my mind only when I have to think of some sort of scaling or restrictions: How long will these calculations take with large inputs? Will it work on a microcontroller, accelerator, etc.? Is inexactness a problem, what can go wrong? Such things…

---

_[View the full topic](https://discourse.julialang.org/t/overview-of-different-number-representations-philosophies-and-use-cases/102910)._
