<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Objects/longobject.c, branch v2.2a3</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Objects/longobject.c?h=v2.2a3</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Objects/longobject.c?h=v2.2a3'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2001-09-06T21:59:14Z</updated>
<entry>
<title>long_true_divide:  reliably force underflow to 0 when the denominator</title>
<updated>2001-09-06T21:59:14Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-09-06T21:59:14Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=e56ed9ba1513b3719ce0fe8b85da6b3367d7da64'/>
<id>urn:sha1:e56ed9ba1513b3719ce0fe8b85da6b3367d7da64</id>
<content type='text'>
has more bits than the numerator than can be counted in a C int (yes,
that's unlikely, and no, I'm not adding a test case with a 2 gigabit
long).
</content>
</entry>
<entry>
<title>Make the error msgs in our pow() implementations consistent.</title>
<updated>2001-09-05T06:24:58Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-09-05T06:24:58Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=4c483c4d8eac8603ff299adbd373e4f14da61ff9'/>
<id>urn:sha1:4c483c4d8eac8603ff299adbd373e4f14da61ff9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Try to recover from that glibc's ldexp apparently doesn't set errno on</title>
<updated>2001-09-05T05:38:10Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-09-05T05:38:10Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=57f282a2a06c01417abec74926e770fb12f95610'/>
<id>urn:sha1:57f282a2a06c01417abec74926e770fb12f95610</id>
<content type='text'>
overflow.  Needs testing on Linux (test_long.py and test_long_future.py
especially).
</content>
</entry>
<entry>
<title>Change long/long true division to return as many good bits as it can;</title>
<updated>2001-09-04T06:17:36Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-09-04T06:17:36Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=e2a600099d3b61327aba5be94d30d40773faa2c9'/>
<id>urn:sha1:e2a600099d3b61327aba5be94d30d40773faa2c9</id>
<content type='text'>
e.g., (1L &lt;&lt; 40000)/(1L &lt;&lt; 40001) returns 0.5, not Inf or NaN or whatever.
</content>
</entry>
<entry>
<title>Move long_true_divide next to the other division routines (for clarity!).</title>
<updated>2001-09-04T05:31:47Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-09-04T05:31:47Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=20dab9f168745bdc7099f4daf33edc34fda2448b'/>
<id>urn:sha1:20dab9f168745bdc7099f4daf33edc34fda2448b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Raise OverflowError when appropriate on long-&gt;float conversion.  Most of</title>
<updated>2001-09-04T05:14:19Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-09-04T05:14:19Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=9fffa3eea3a7e99b0179988e7a016a45bf63ab96'/>
<id>urn:sha1:9fffa3eea3a7e99b0179988e7a016a45bf63ab96</id>
<content type='text'>
the fiddling is simply due to that no caller of PyLong_AsDouble ever
checked for failure (so that's fixing old bugs).  PyLong_AsDouble is much
faster for big inputs now too, but that's more of a happy consequence
than a design goal.
</content>
</entry>
<entry>
<title>Introduce new private API function _PyLong_AsScaledDouble.  Not used yet,</title>
<updated>2001-09-04T02:50:49Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-09-04T02:50:49Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=a1c1b0f46865bddd9a84dfae6c146a0e010a4496'/>
<id>urn:sha1:a1c1b0f46865bddd9a84dfae6c146a0e010a4496</id>
<content type='text'>
but will be the foundation for Good Things:
+ Speed PyLong_AsDouble.
+ Give PyLong_AsDouble the ability to detect overflow.
+ Make true division of long/long nearly as accurate as possible (no
  spurious infinities or NaNs).
+ Return non-insane results from math.log and math.log10 when passing a
  long that can't be approximated by a double better than HUGE_VAL.
</content>
</entry>
<entry>
<title>New restriction on pow(x, y, z):  If z is not None, x and y must be of</title>
<updated>2001-09-03T08:35:41Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-09-03T08:35:41Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=32f453eaa476c78376cd721d29ba8ab726e400bb'/>
<id>urn:sha1:32f453eaa476c78376cd721d29ba8ab726e400bb</id>
<content type='text'>
integer types, and y must be &gt;= 0.  See discussion at
http://sf.net/tracker/index.php?func=detail&amp;aid=457066&amp;group_id=5470&amp;atid=105470
</content>
</entry>
<entry>
<title>Add warning mode for classic division, almost exactly as specified in</title>
<updated>2001-08-31T17:40:15Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-08-31T17:40:15Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=393661d15fa76ec46e9f7b71e97bf2ed38470620'/>
<id>urn:sha1:393661d15fa76ec46e9f7b71e97bf2ed38470620</id>
<content type='text'>
PEP 238.  Changes:

- add a new flag variable Py_DivisionWarningFlag, declared in
  pydebug.h, defined in object.c, set in main.c, and used in
  {int,long,float,complex}object.c.  When this flag is set, the
  classic division operator issues a DeprecationWarning message.

- add a new API PyRun_SimpleStringFlags() to match
  PyRun_SimpleString().  The main() function calls this so that
  commands run with -c can also benefit from -Dnew.

- While I was at it, I changed the usage message in main() somewhat:
  alphabetized the options, split it in *four* parts to fit in under
  512 bytes (not that I still believe this is necessary -- doc strings
  elsewhere are much longer), and perhaps most visibly, don't display
  the full list of options on each command line error.  Instead, the
  full list is only displayed when -h is used, and otherwise a brief
  reminder of -h is displayed.  When -h is used, write to stdout so
  that you can do `python -h | more'.

Notes:

- I don't want to use the -W option to control whether the classic
  division warning is issued or not, because the machinery to decide
  whether to display the warning or not is very expensive (it involves
  calling into the warnings.py module).  You can use -Werror to turn
  the warnings into exceptions though.

- The -Dnew option doesn't select future division for all of the
  program -- only for the __main__ module.  I don't know if I'll ever
  change this -- it would require changes to the .pyc file magic
  number to do it right, and a more global notion of compiler flags.

- You can usefully combine -Dwarn and -Dnew: this gives the __main__
  module new division, and warns about classic division everywhere
  else.
</content>
</entry>
<entry>
<title>Ah, the joy of writing test cases...</title>
<updated>2001-08-30T15:54:44Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-08-30T15:54:44Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=13228a6f099cbf4855fa0dc0ee921f174bc967ff'/>
<id>urn:sha1:13228a6f099cbf4855fa0dc0ee921f174bc967ff</id>
<content type='text'>
long_subtype_new(): fix a typo (type-&gt;ob_size instead of
tmp-&gt;ob_size).
</content>
</entry>
</feed>
