title: C++ floating point type that doesn't use scientific notation to represent very small values?
body: <p>I'm writing an algorithm that deals with <a href="https://en.wikipedia.org/wiki/Logit-normal_distribution" rel="nofollow noreferrer">Logit-normal distributions</a> transformations which have the characteristic that, with high enough sigmas/means, the values can be &quot;compressed&quot; towards the edges at 0 and 1 very tightly. I'm encountering the problem where values that should be different collide because the C++ double can't represent sufficient digits. For example, I'm applying the sigmoid/logistic function to two high enough but different values, the outcome is identical when it shouldn't be if doubles could hold higher precision.</p>
  <p>I can deal with that by aggregating samples that collide onto the same value. But the issue is that around 1, the collision happens, because numbers are represented like this: 0.999999999953 for example. But around 0 it doesn't happen, because C++ starts to represent values in scientific notation, like so: 0.12949384e-300. The latter can achieve much higher precision therefore no collision happens here. But I would need symmetrical behavior for both the values around 0 and 1 to make sure the result is computed the same way on both sides.</p>
  <p>Is there such a type in C++ that does not automatically switch to scientific notations when representing extremely small values? So I could achieve the same behavior around 0 that I get around 1?</p>