title: Python print and json.dumps changes float value
body: <p>Hitting below issue on a linux server with python 3.6.8.
  Json.dumps() call with simple float variable gives different results in each run.</p>
  <pre><code>$ python3
  Python 3.6.8 (default, Oct  8 2020, 16:04:18) 
  [GCC 4.8.5 20150623 (Red Hat 4.8.5-44.0.200)] on linux
  Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
  &gt;&gt;&gt; import json
  &gt;&gt;&gt; print(json.dumps(float(2341)))
  2373.0
  &gt;&gt;&gt; print(json.dumps(float(2341)))
  2342.28
  &gt;&gt;&gt; print(json.dumps(float(2341)))
  2342.28
  &gt;&gt;&gt; print(json.dumps(float(2341)))
  2342.3121632
  &gt;&gt;&gt; print(json.dumps(float(2341)))
  2342.28
  &gt;&gt;&gt; print(json.dumps(float(2341)))
  2341.0
  &gt;&gt;&gt; print(json.dumps(float(2341)))
  2341.0
  &gt;&gt;&gt; print(json.dumps(float(2341)))
  2373.0
  &gt;&gt;&gt; print(json.dumps(float(2341)))
  2342.28
  &gt;&gt;&gt; print(json.dumps(float(2341)))
  2342.28
  &gt;&gt;&gt; print(json.__file__)
  /usr/lib64/python3.6/json/__init__.py
  &gt;&gt;&gt; exit()
  $ which python3
  /usr/bin/python3
  $ 
  </code></pre>
  <p>No issues with 'Int' variable.
  Have verified files in python package folder, all seem intact.
  No issues seen related to server's memory/cpu.
  Rebooting server / reinstalling python package are not feasible options currently.
  Need some pointers in debugging/fixing this further.</p>
  <p>---- EDIT ----
  Issue seen with print(float(x)) also</p>
  <pre><code>$ python3
  Python 3.6.8 (default, Oct  8 2020, 16:04:18) 
  [GCC 4.8.5 20150623 (Red Hat 4.8.5-44.0.200)] on linux
  Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
  &gt;&gt;&gt; print(float(2341))
  2341.0
  &gt;&gt;&gt; print(float(2341))
  2341.0
  &gt;&gt;&gt; print(float(2341))
  2342.28
  &gt;&gt;&gt; print(float(2341))
  2342.312
  &gt;&gt;&gt; print(float(2341))
  2342.3121632
  &gt;&gt;&gt; print(float(2341))
  2342.28
  &gt;&gt;&gt; print(float(2341))
  2342.312
  &gt;&gt;&gt; print(float(2341))
  2342.28
  &gt;&gt;&gt; print(float(2341))
  2342.28
  &gt;&gt;&gt; print(float(2341))
  2342.312
  &gt;&gt;&gt; print(float(2341))
  2342.28
  &gt;&gt;&gt; print(float(2341))
  2341.0
  &gt;&gt;&gt; print(float(2341))
  2373.0
  &gt;&gt;&gt; exit()
  </code></pre>
  <p>----- EDIT ---- Different flavours of print + float. Same issue.</p>
  <pre><code>&gt;&gt;&gt; x = float(2341)
  &gt;&gt;&gt; for _ in range(20): print(x)
  ... 
  2342.312
  2342.28
  2342.28
  2342.28
  2342.312
  2342.312
  2373.0
  2342.28
  2373.0
  2373.0
  2373.0
  2373.0
  2342.3121632
  2342.3121632
  2373.0
  2342.28
  2373.0
  2342.28
  2342.28
  2373.0
  &gt;&gt;&gt;
  &gt;&gt;&gt; for _ in range(20): print(2341.0)
  ... 
  2373.0
  2342.28
  2342.312
  2342.28
  2342.28
  2342.28
  2342.28
  2373.0
  2342.28
  2342.28
  2373.0
  2373.0
  2342.28
  2373.0
  2342.312
  2373.0
  2373.0
  2342.28
  2342.3121632
  2342.3121632
  &gt;&gt;&gt; 
  &gt;&gt;&gt; import builtins
  &gt;&gt;&gt; print(builtins.float(2341))
  2342.28
  &gt;&gt;&gt; print(builtins.float(2341))
  2373.0
  &gt;&gt;&gt; print(builtins.float(2341))
  2342.3121632
  &gt;&gt;&gt; print(builtins.float(2341))
  2373.0
  &gt;&gt;&gt; 
  </code></pre>