# Calculating Products in different Mathematica Versions

**URL:** <https://community.wolfram.com/t/calculating-products-in-different-mathematica-versions/17126>\
**Category:** Questions\
**Tags:** mathematica\
**Created:** [December 2, 2020, 5:25pm UTC](https://community.wolfram.com/t/calculating-products-in-different-mathematica-versions/17126 "2020-12-02T17:25:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jostadler](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@jostadler](https://community.wolfram.com/u/jostadler)\
**Post date:** [December 2, 2020, 5:25pm UTC](https://community.wolfram.com/t/calculating-products-in-different-mathematica-versions/17126/1 "2020-12-02T17:25:42Z")

</div>

Has anyone an idea, why calculating a product from small numbers in the new Mathematica 12.1 does not give the same results as Mathematica 11.2?  
For the complete example, which is a part of a likelihood computation, see the attached notebook.

**Calculation in Mathematica 12.1**

```
In[1]= 
$MachinePrecision

Times @@ {0.0016214960604198744`, 0.001620019767161015`, ..., *[many numbers]*, ... , 
 0.0016116789355172978`}

Out[1]= 15.9546

During evaluation of In[1]:= General::munfl: 2.0705*10^-191 8.36448*10^-186 is too small to represent as a normalized machine number; precision may be lost.

During evaluation of In[1]:= General::munfl: 3.24301*10^-189 1.03749*10^-186 is too small to represent as a normalized machine number; precision may be lost.

Out[2]= 0.

```

* * *

**Exactly the same calculation in Mathematica 11.2**

```
$MachinePrecision

Times @@ {0.0016214960604198744`, 0.001620019767161015`, ..., *[many numbers]*, ... , 0.0016116789355172978`}

Out[1]= 15.9546

Out[2]= 5.82698961568687*10^-751

```

P.S. Likelihood calculation is not the problem. Its just the surprising difference between two Mathematica versions.

[Times\_Test.nb](https://community.wolfram.com/uploads/short-url/1zFh0Hdydioa9jyaTP4eXN9jeEW.nb) (22.5 KB)

---

<div class="post-metadata">

**Author:** ![gianlucagorni](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@gianlucagorni](https://community.wolfram.com/u/gianlucagorni)\
**Post date:** [December 2, 2020, 8:29pm UTC](https://community.wolfram.com/t/calculating-products-in-different-mathematica-versions/17126/2 "2020-12-02T20:29:28Z")

</div>

It may be that the parameter `$MinMachineNumber` has changed in version 11.3.

---

<div class="post-metadata">

**Author:** ![danl](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/danl/32/41267_2.png) [@danl](https://community.wolfram.com/u/danl)\
**Post date:** [December 3, 2020, 12:29am UTC](https://community.wolfram.com/t/calculating-products-in-different-mathematica-versions/17126/3 "2020-12-03T00:29:13Z")

</div>

Machine arithmetic underflow now becomes 0. As benefits, this means packed arrays will not unpack due to underflow, and certain internal operations need no longer check for underflow.
