C++ cout prints " inf " after operations between two big decimal number (long double)
<p>My program takes a vector of long doubles as input (<code>vector&lt;long double&gt;</code>) and calculates different solutions using some methods. </p>

<p>Everything works fine until I try these two numbers: 1.18973e+4932 and 1.18973e+4932. </p>

<p>It outputs the following:</p>

<pre><code>&lt;2: 1.18973e+4932 1.18973e+4932 &gt;

Min: 1.18973e+4932
Max: 1.18973e+4932
Range: 0
Midrange: inf
Median: inf
Mean: inf
Variance: inf
StdVariance : inf
</code></pre>

<p>After some researches, I found out that the value is exceeding the space in memory available for its own type.</p>

<p><strong>So the question is:</strong> is it possible to handle this inside my code? Or the only solution is to input a smaller number?</p>