Python-checkins
Threads by month
- ----- 2026 -----
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
August 2007
- 7 participants
- 791 discussions
Author: georg.brandl
Date: Thu Aug 2 11:30:42 2007
New Revision: 56664
Added:
doctools/trunk/Doc-26/library/email-examples.rst
Modified:
doctools/trunk/Doc-26/TODO
doctools/trunk/Doc-26/library/email.charset.rst
doctools/trunk/Doc-26/library/email.encoders.rst
doctools/trunk/Doc-26/library/email.errors.rst
doctools/trunk/Doc-26/library/email.generator.rst
doctools/trunk/Doc-26/library/email.header.rst
doctools/trunk/Doc-26/library/email.iterators.rst
doctools/trunk/Doc-26/library/email.message.rst
doctools/trunk/Doc-26/library/email.mime.rst
doctools/trunk/Doc-26/library/email.parser.rst
doctools/trunk/Doc-26/library/email.rst
doctools/trunk/Doc-26/library/email.util.rst
doctools/trunk/Doc-3k/TODO
doctools/trunk/Doc-3k/library/email.charset.rst
doctools/trunk/Doc-3k/library/email.encoders.rst
doctools/trunk/Doc-3k/library/email.errors.rst
doctools/trunk/Doc-3k/library/email.generator.rst
doctools/trunk/Doc-3k/library/email.header.rst
doctools/trunk/Doc-3k/library/email.iterators.rst
doctools/trunk/Doc-3k/library/email.message.rst
doctools/trunk/Doc-3k/library/email.mime.rst
doctools/trunk/Doc-3k/library/email.parser.rst
doctools/trunk/Doc-3k/library/email.rst
doctools/trunk/Doc-3k/library/email.util.rst
Log:
Add the email package toctree.
Modified: doctools/trunk/Doc-26/TODO
==============================================================================
--- doctools/trunk/Doc-26/TODO (original)
+++ doctools/trunk/Doc-26/TODO Thu Aug 2 11:30:42 2007
@@ -5,7 +5,6 @@
* adjust all literal include paths
* remove all non-literal includes
* fix all duplicate labels and undefined label references
-* fix the email package docs: add a toctree
* split very large files and add toctrees
* integrate standalone HOWTOs
* find out which files get "comments disabled" metadata
Added: doctools/trunk/Doc-26/library/email-examples.rst
==============================================================================
--- (empty file)
+++ doctools/trunk/Doc-26/library/email-examples.rst Thu Aug 2 11:30:42 2007
@@ -0,0 +1,38 @@
+:mod:`email`: Examples
+----------------------
+
+Here are a few examples of how to use the :mod:`email` package to read, write,
+and send simple email messages, as well as more complex MIME messages.
+
+First, let's see how to create and send a simple text message:
+
+
+.. include:: ../includes/email-simple.py
+ :literal:
+
+Here's an example of how to send a MIME message containing a bunch of family
+pictures that may be residing in a directory:
+
+
+.. include:: ../includes/email-mime.py
+ :literal:
+
+Here's an example of how to send the entire contents of a directory as an email
+message: [#]_
+
+
+.. include:: ../includes/email-dir.py
+ :literal:
+
+And finally, here's an example of how to unpack a MIME message like the one
+above, into a directory of files:
+
+
+.. include:: ../includes/email-unpack.py
+ :literal:
+
+
+.. rubric:: Footnotes
+
+.. [#] Thanks to Matthew Dixon Cowles for the original inspiration and examples.
+
Modified: doctools/trunk/Doc-26/library/email.charset.rst
==============================================================================
--- doctools/trunk/Doc-26/library/email.charset.rst (original)
+++ doctools/trunk/Doc-26/library/email.charset.rst Thu Aug 2 11:30:42 2007
@@ -1,3 +1,6 @@
+:mod:`email`: Representing character sets
+-----------------------------------------
+
.. module:: email.charset
:synopsis: Character Sets
Modified: doctools/trunk/Doc-26/library/email.encoders.rst
==============================================================================
--- doctools/trunk/Doc-26/library/email.encoders.rst (original)
+++ doctools/trunk/Doc-26/library/email.encoders.rst Thu Aug 2 11:30:42 2007
@@ -1,3 +1,6 @@
+:mod:`email`: Encoders
+----------------------
+
.. module:: email.encoders
:synopsis: Encoders for email message payloads.
Modified: doctools/trunk/Doc-26/library/email.errors.rst
==============================================================================
--- doctools/trunk/Doc-26/library/email.errors.rst (original)
+++ doctools/trunk/Doc-26/library/email.errors.rst Thu Aug 2 11:30:42 2007
@@ -1,3 +1,6 @@
+:mod:`email`: Exception and Defect classes
+------------------------------------------
+
.. module:: email.errors
:synopsis: The exception classes used by the email package.
Modified: doctools/trunk/Doc-26/library/email.generator.rst
==============================================================================
--- doctools/trunk/Doc-26/library/email.generator.rst (original)
+++ doctools/trunk/Doc-26/library/email.generator.rst Thu Aug 2 11:30:42 2007
@@ -1,3 +1,6 @@
+:mod:`email`: Generating MIME documents
+---------------------------------------
+
.. module:: email.generator
:synopsis: Generate flat text email messages from a message structure.
Modified: doctools/trunk/Doc-26/library/email.header.rst
==============================================================================
--- doctools/trunk/Doc-26/library/email.header.rst (original)
+++ doctools/trunk/Doc-26/library/email.header.rst Thu Aug 2 11:30:42 2007
@@ -1,3 +1,6 @@
+:mod:`email`: Internationalized headers
+---------------------------------------
+
.. module:: email.header
:synopsis: Representing non-ASCII headers
Modified: doctools/trunk/Doc-26/library/email.iterators.rst
==============================================================================
--- doctools/trunk/Doc-26/library/email.iterators.rst (original)
+++ doctools/trunk/Doc-26/library/email.iterators.rst Thu Aug 2 11:30:42 2007
@@ -1,3 +1,6 @@
+:mod:`email`: Iterators
+-----------------------
+
.. module:: email.iterators
:synopsis: Iterate over a message object tree.
Modified: doctools/trunk/Doc-26/library/email.message.rst
==============================================================================
--- doctools/trunk/Doc-26/library/email.message.rst (original)
+++ doctools/trunk/Doc-26/library/email.message.rst Thu Aug 2 11:30:42 2007
@@ -1,3 +1,6 @@
+:mod:`email`: Representing an email message
+-------------------------------------------
+
.. module:: email.message
:synopsis: The base class representing email messages.
Modified: doctools/trunk/Doc-26/library/email.mime.rst
==============================================================================
--- doctools/trunk/Doc-26/library/email.mime.rst (original)
+++ doctools/trunk/Doc-26/library/email.mime.rst Thu Aug 2 11:30:42 2007
@@ -1,3 +1,6 @@
+:mod:`email`: Creating email and MIME objects from scratch
+----------------------------------------------------------
+
.. module:: email.mime.text
Modified: doctools/trunk/Doc-26/library/email.parser.rst
==============================================================================
--- doctools/trunk/Doc-26/library/email.parser.rst (original)
+++ doctools/trunk/Doc-26/library/email.parser.rst Thu Aug 2 11:30:42 2007
@@ -1,3 +1,6 @@
+:mod:`email`: Parsing email messages
+------------------------------------
+
.. module:: email.parser
:synopsis: Parse flat text email messages to produce a message object structure.
Modified: doctools/trunk/Doc-26/library/email.rst
==============================================================================
--- doctools/trunk/Doc-26/library/email.rst (original)
+++ doctools/trunk/Doc-26/library/email.rst Thu Aug 2 11:30:42 2007
@@ -52,6 +52,22 @@
examples. For users of the older :mod:`mimelib` package, or previous versions
of the :mod:`email` package, a section on differences and porting is provided.
+Contents of the :mod:`email` package documentation:
+
+.. toctree::
+
+ email.message.rst
+ email.parser.rst
+ email.generator.rst
+ email.mime.rst
+ email.header.rst
+ email.charset.rst
+ email.encoders.rst
+ email.errors.rst
+ email.util.rst
+ email.iterators.rst
+ email-examples.rst
+
.. seealso::
@@ -62,76 +78,6 @@
NNTP protocol client
-Representing an email message
------------------------------
-
-
-.. include:: email.message.rst
-
-
-Parsing email messages
-----------------------
-
-
-.. include:: email.parser.rst
-
-
-Generating MIME documents
--------------------------
-
-
-.. include:: email.generator.rst
-
-
-Creating email and MIME objects from scratch
---------------------------------------------
-
-
-.. include:: email.mime.rst
-
-
-Internationalized headers
--------------------------
-
-
-.. include:: email.header.rst
-
-
-Representing character sets
----------------------------
-
-
-.. include:: email.charset.rst
-
-
-Encoders
---------
-
-
-.. include:: email.encoders.rst
-
-
-Exception and Defect classes
-----------------------------
-
-
-.. include:: email.errors.rst
-
-
-Miscellaneous utilities
------------------------
-
-
-.. include:: email.util.rst
-
-
-Iterators
----------
-
-
-.. include:: email.iterators.rst
-
-
.. _email-pkg-history:
Package History
@@ -373,43 +319,6 @@
closely supported in the :func:`body_line_iterator` function in the
:mod:`email.iterators` module.
-
-Examples
---------
-
-Here are a few examples of how to use the :mod:`email` package to read, write,
-and send simple email messages, as well as more complex MIME messages.
-
-First, let's see how to create and send a simple text message:
-
-
-.. include:: ../includes/email-simple.py
- :literal:
-
-Here's an example of how to send a MIME message containing a bunch of family
-pictures that may be residing in a directory:
-
-
-.. include:: ../includes/email-mime.py
- :literal:
-
-Here's an example of how to send the entire contents of a directory as an email
-message: [#]_
-
-
-.. include:: ../includes/email-dir.py
- :literal:
-
-And finally, here's an example of how to unpack a MIME message like the one
-above, into a directory of files:
-
-
-.. include:: ../includes/email-unpack.py
- :literal:
-
.. rubric:: Footnotes
.. [#] Delivery Status Notifications (DSN) are defined in :rfc:`1894`.
-
-.. [#] Thanks to Matthew Dixon Cowles for the original inspiration and examples.
-
Modified: doctools/trunk/Doc-26/library/email.util.rst
==============================================================================
--- doctools/trunk/Doc-26/library/email.util.rst (original)
+++ doctools/trunk/Doc-26/library/email.util.rst Thu Aug 2 11:30:42 2007
@@ -1,3 +1,6 @@
+:mod:`email`: Miscellaneous utilities
+-------------------------------------
+
.. module:: email.utils
:synopsis: Miscellaneous email package utilities.
Modified: doctools/trunk/Doc-3k/TODO
==============================================================================
--- doctools/trunk/Doc-3k/TODO (original)
+++ doctools/trunk/Doc-3k/TODO Thu Aug 2 11:30:42 2007
@@ -5,7 +5,6 @@
* adjust all literal include paths
* remove all non-literal includes
* fix all duplicate labels and undefined label references
-* fix the email package docs: add a toctree
* split very large files and add toctrees
* integrate standalone HOWTOs
* find out which files get "comments disabled" metadata
@@ -14,5 +13,4 @@
* write "About these documents"
* finish "Documenting Python"
* extend copyright.rst
-* fix the "quadruple" index term
-* fix :file: and |version| in install
\ No newline at end of file
+* fix :file: and |version| in install
Modified: doctools/trunk/Doc-3k/library/email.charset.rst
==============================================================================
--- doctools/trunk/Doc-3k/library/email.charset.rst (original)
+++ doctools/trunk/Doc-3k/library/email.charset.rst Thu Aug 2 11:30:42 2007
@@ -1,3 +1,6 @@
+:mod:`email`: Representing character sets
+-----------------------------------------
+
.. module:: email.charset
:synopsis: Character Sets
Modified: doctools/trunk/Doc-3k/library/email.encoders.rst
==============================================================================
--- doctools/trunk/Doc-3k/library/email.encoders.rst (original)
+++ doctools/trunk/Doc-3k/library/email.encoders.rst Thu Aug 2 11:30:42 2007
@@ -1,3 +1,6 @@
+:mod:`email`: Encoders
+----------------------
+
.. module:: email.encoders
:synopsis: Encoders for email message payloads.
Modified: doctools/trunk/Doc-3k/library/email.errors.rst
==============================================================================
--- doctools/trunk/Doc-3k/library/email.errors.rst (original)
+++ doctools/trunk/Doc-3k/library/email.errors.rst Thu Aug 2 11:30:42 2007
@@ -1,3 +1,6 @@
+:mod:`email`: Exception and Defect classes
+------------------------------------------
+
.. module:: email.errors
:synopsis: The exception classes used by the email package.
Modified: doctools/trunk/Doc-3k/library/email.generator.rst
==============================================================================
--- doctools/trunk/Doc-3k/library/email.generator.rst (original)
+++ doctools/trunk/Doc-3k/library/email.generator.rst Thu Aug 2 11:30:42 2007
@@ -1,3 +1,6 @@
+:mod:`email`: Generating MIME documents
+---------------------------------------
+
.. module:: email.generator
:synopsis: Generate flat text email messages from a message structure.
Modified: doctools/trunk/Doc-3k/library/email.header.rst
==============================================================================
--- doctools/trunk/Doc-3k/library/email.header.rst (original)
+++ doctools/trunk/Doc-3k/library/email.header.rst Thu Aug 2 11:30:42 2007
@@ -1,3 +1,6 @@
+:mod:`email`: Internationalized headers
+---------------------------------------
+
.. module:: email.header
:synopsis: Representing non-ASCII headers
Modified: doctools/trunk/Doc-3k/library/email.iterators.rst
==============================================================================
--- doctools/trunk/Doc-3k/library/email.iterators.rst (original)
+++ doctools/trunk/Doc-3k/library/email.iterators.rst Thu Aug 2 11:30:42 2007
@@ -1,3 +1,6 @@
+:mod:`email`: Iterators
+-----------------------
+
.. module:: email.iterators
:synopsis: Iterate over a message object tree.
Modified: doctools/trunk/Doc-3k/library/email.message.rst
==============================================================================
--- doctools/trunk/Doc-3k/library/email.message.rst (original)
+++ doctools/trunk/Doc-3k/library/email.message.rst Thu Aug 2 11:30:42 2007
@@ -1,3 +1,6 @@
+:mod:`email`: Representing an email message
+-------------------------------------------
+
.. module:: email.message
:synopsis: The base class representing email messages.
Modified: doctools/trunk/Doc-3k/library/email.mime.rst
==============================================================================
--- doctools/trunk/Doc-3k/library/email.mime.rst (original)
+++ doctools/trunk/Doc-3k/library/email.mime.rst Thu Aug 2 11:30:42 2007
@@ -1,3 +1,6 @@
+:mod:`email`: Creating email and MIME objects from scratch
+----------------------------------------------------------
+
.. module:: email.mime.text
Modified: doctools/trunk/Doc-3k/library/email.parser.rst
==============================================================================
--- doctools/trunk/Doc-3k/library/email.parser.rst (original)
+++ doctools/trunk/Doc-3k/library/email.parser.rst Thu Aug 2 11:30:42 2007
@@ -1,3 +1,6 @@
+:mod:`email`: Parsing email messages
+------------------------------------
+
.. module:: email.parser
:synopsis: Parse flat text email messages to produce a message object structure.
Modified: doctools/trunk/Doc-3k/library/email.rst
==============================================================================
--- doctools/trunk/Doc-3k/library/email.rst (original)
+++ doctools/trunk/Doc-3k/library/email.rst Thu Aug 2 11:30:42 2007
@@ -52,6 +52,22 @@
examples. For users of the older :mod:`mimelib` package, or previous versions
of the :mod:`email` package, a section on differences and porting is provided.
+Contents of the :mod:`email` package documentation:
+
+.. toctree::
+
+ email.message.rst
+ email.parser.rst
+ email.generator.rst
+ email.mime.rst
+ email.header.rst
+ email.charset.rst
+ email.encoders.rst
+ email.errors.rst
+ email.util.rst
+ email.iterators.rst
+ email-examples.rst
+
.. seealso::
@@ -62,76 +78,6 @@
NNTP protocol client
-Representing an email message
------------------------------
-
-
-.. include:: email.message.rst
-
-
-Parsing email messages
-----------------------
-
-
-.. include:: email.parser.rst
-
-
-Generating MIME documents
--------------------------
-
-
-.. include:: email.generator.rst
-
-
-Creating email and MIME objects from scratch
---------------------------------------------
-
-
-.. include:: email.mime.rst
-
-
-Internationalized headers
--------------------------
-
-
-.. include:: email.header.rst
-
-
-Representing character sets
----------------------------
-
-
-.. include:: email.charset.rst
-
-
-Encoders
---------
-
-
-.. include:: email.encoders.rst
-
-
-Exception and Defect classes
-----------------------------
-
-
-.. include:: email.errors.rst
-
-
-Miscellaneous utilities
------------------------
-
-
-.. include:: email.util.rst
-
-
-Iterators
----------
-
-
-.. include:: email.iterators.rst
-
-
.. _email-pkg-history:
Package History
@@ -373,43 +319,6 @@
closely supported in the :func:`body_line_iterator` function in the
:mod:`email.iterators` module.
-
-Examples
---------
-
-Here are a few examples of how to use the :mod:`email` package to read, write,
-and send simple email messages, as well as more complex MIME messages.
-
-First, let's see how to create and send a simple text message:
-
-
-.. include:: ../includes/email-simple.py
- :literal:
-
-Here's an example of how to send a MIME message containing a bunch of family
-pictures that may be residing in a directory:
-
-
-.. include:: ../includes/email-mime.py
- :literal:
-
-Here's an example of how to send the entire contents of a directory as an email
-message: [#]_
-
-
-.. include:: ../includes/email-dir.py
- :literal:
-
-And finally, here's an example of how to unpack a MIME message like the one
-above, into a directory of files:
-
-
-.. include:: ../includes/email-unpack.py
- :literal:
-
.. rubric:: Footnotes
.. [#] Delivery Status Notifications (DSN) are defined in :rfc:`1894`.
-
-.. [#] Thanks to Matthew Dixon Cowles for the original inspiration and examples.
-
Modified: doctools/trunk/Doc-3k/library/email.util.rst
==============================================================================
--- doctools/trunk/Doc-3k/library/email.util.rst (original)
+++ doctools/trunk/Doc-3k/library/email.util.rst Thu Aug 2 11:30:42 2007
@@ -1,3 +1,6 @@
+:mod:`email`: Miscellaneous utilities
+-------------------------------------
+
.. module:: email.utils
:synopsis: Miscellaneous email package utilities.
1
0
Aug. 2, 2007
Author: georg.brandl
Date: Thu Aug 2 11:16:36 2007
New Revision: 56663
Modified:
doctools/trunk/Doc-26/TODO
doctools/trunk/Doc-26/library/datatypes.rst
doctools/trunk/Doc-26/library/stdtypes.rst
doctools/trunk/Doc-26/library/strings.rst
doctools/trunk/Doc-3k/library/datatypes.rst
doctools/trunk/Doc-3k/library/index.rst
doctools/trunk/Doc-3k/library/stdtypes.rst
doctools/trunk/Doc-3k/library/strings.rst
doctools/trunk/sphinx/templates/modindex.html
Log:
First few fixes in the new trees.
Modified: doctools/trunk/Doc-26/TODO
==============================================================================
--- doctools/trunk/Doc-26/TODO (original)
+++ doctools/trunk/Doc-26/TODO Thu Aug 2 11:16:36 2007
@@ -14,5 +14,4 @@
* write "About these documents"
* finish "Documenting Python"
* extend copyright.rst
-* fix the "quadruple" index term
-* fix :file: and |version| in install
\ No newline at end of file
+* fix :file: and |version| in install
Modified: doctools/trunk/Doc-26/library/datatypes.rst
==============================================================================
--- doctools/trunk/Doc-26/library/datatypes.rst (original)
+++ doctools/trunk/Doc-26/library/datatypes.rst Thu Aug 2 11:16:36 2007
@@ -9,6 +9,12 @@
types such as dates and times, fixed-type arrays, heap queues, synchronized
queues, and sets.
+Python also provides some built-in data types, in particular,
+:class:`dict`, :class:`list`, :class:`set` (which along with
+:class:`frozenset`, replaces the deprecated :mod:`sets` module), and
+:class:`tuple`. The :class:`str` class can be used to handle binary data
+and 8-bit text, and the :class:`unicode` class to handle Unicode text.
+
The following modules are documented in this chapter:
Modified: doctools/trunk/Doc-26/library/stdtypes.rst
==============================================================================
--- doctools/trunk/Doc-26/library/stdtypes.rst (original)
+++ doctools/trunk/Doc-26/library/stdtypes.rst Thu Aug 2 11:16:36 2007
@@ -1307,7 +1307,6 @@
+------------------------------+--------------------------------+---------------------+
.. index::
- quadruple: operations on; mutable; sequence; types
triple: operations on; sequence; types
triple: operations on; list; type
pair: subscript; assignment
Modified: doctools/trunk/Doc-26/library/strings.rst
==============================================================================
--- doctools/trunk/Doc-26/library/strings.rst (original)
+++ doctools/trunk/Doc-26/library/strings.rst Thu Aug 2 11:16:36 2007
@@ -6,7 +6,13 @@
***************
The modules described in this chapter provide a wide range of string
-manipulation operations. Here's an overview:
+manipulation operations.
+
+In addition, Python's built-in string classes support the sequence type
+methods described in the :ref:`typesseq` section, and also the
+string-specific methods described in the :ref:`string-methods` section.
+To output formatted strings use template strings or the ``%`` operator
+described in the :ref:`typesseq-strings` section.
.. toctree::
@@ -21,6 +27,4 @@
unicodedata.rst
stringprep.rst
fpformat.rst
-Information on the methods of string objects can be found in section
-:ref:`string-methods`, "String Methods."
Modified: doctools/trunk/Doc-3k/library/datatypes.rst
==============================================================================
--- doctools/trunk/Doc-3k/library/datatypes.rst (original)
+++ doctools/trunk/Doc-3k/library/datatypes.rst Thu Aug 2 11:16:36 2007
@@ -9,6 +9,11 @@
types such as dates and times, fixed-type arrays, heap queues, synchronized
queues, and sets.
+Python also provides some built-in data types, in particular,
+:class:`dict`, :class:`list`, :class:`set` and :class:`frozenset`, and
+:class:`tuple`. The :class:`str` class can be used to handle binary data
+and 8-bit text, and the :class:`unicode` class to handle Unicode text.
+
The following modules are documented in this chapter:
Modified: doctools/trunk/Doc-3k/library/index.rst
==============================================================================
--- doctools/trunk/Doc-3k/library/index.rst (original)
+++ doctools/trunk/Doc-3k/library/index.rst Thu Aug 2 11:16:36 2007
@@ -29,11 +29,11 @@
:maxdepth: 2
intro.rst
- constants.rst
- exceptions.rst
functions.rst
+ constants.rst
objects.rst
stdtypes.rst
+ exceptions.rst
strings.rst
datatypes.rst
Modified: doctools/trunk/Doc-3k/library/stdtypes.rst
==============================================================================
--- doctools/trunk/Doc-3k/library/stdtypes.rst (original)
+++ doctools/trunk/Doc-3k/library/stdtypes.rst Thu Aug 2 11:16:36 2007
@@ -1299,7 +1299,6 @@
+------------------------------+--------------------------------+---------------------+
.. index::
- quadruple: operations on; mutable; sequence; types
triple: operations on; sequence; types
triple: operations on; list; type
pair: subscript; assignment
Modified: doctools/trunk/Doc-3k/library/strings.rst
==============================================================================
--- doctools/trunk/Doc-3k/library/strings.rst (original)
+++ doctools/trunk/Doc-3k/library/strings.rst Thu Aug 2 11:16:36 2007
@@ -6,7 +6,13 @@
***************
The modules described in this chapter provide a wide range of string
-manipulation operations. Here's an overview:
+manipulation operations.
+
+In addition, Python's built-in string classes support the sequence type
+methods described in the :ref:`typesseq` section, and also the
+string-specific methods described in the :ref:`string-methods` section.
+To output formatted strings use template strings or the ``%`` operator
+described in the :ref:`typesseq-strings` section.
.. toctree::
@@ -21,6 +27,4 @@
unicodedata.rst
stringprep.rst
fpformat.rst
-Information on the methods of string objects can be found in section
-:ref:`string-methods`, "String Methods."
Modified: doctools/trunk/sphinx/templates/modindex.html
==============================================================================
--- doctools/trunk/sphinx/templates/modindex.html (original)
+++ doctools/trunk/sphinx/templates/modindex.html Thu Aug 2 11:16:36 2007
@@ -11,6 +11,7 @@
{%- endfor %}
</div>
{% endif %}
+{% if builder == 'web' %}
<form class="pfform" action="" method="get">
Show modules only available on these platforms:<br>
{% for pl in platforms -%}
@@ -20,6 +21,7 @@
{% endfor %}
<input type="submit" value="Apply">
</form>
+{% endif %}
<table width="100%" class="indextable" cellspacing="0" cellpadding="2">
{%- for modname, collapse, cgroup, indent, fname, synops, pform in modindexentries %}
1
0
Author: georg.brandl
Date: Thu Aug 2 10:54:17 2007
New Revision: 56661
Modified:
doctools/trunk/TODO
doctools/trunk/converter/filenamemap.py
doctools/trunk/converter/newfiles/conf.py
doctools/trunk/converter/newfiles/contents.rst
doctools/trunk/converter/newfiles/mac_index.rst
doctools/trunk/converter/newfiles/modules_index.rst
doctools/trunk/converter/newfiles/ref_index.rst
doctools/trunk/sphinx/builder.py
doctools/trunk/sphinx/style/searchtools.js
doctools/trunk/sphinx/templates/index.html
doctools/trunk/sphinx/templates/keyword_not_found.html
doctools/trunk/sphinx/templates/search.html
doctools/trunk/sphinx/web/application.py
doctools/trunk/sphinx/web/oldurls.py
Log:
Rename modules -> library, macmodules -> maclib. Use current version in index page whatsnew link.
Modified: doctools/trunk/TODO
==============================================================================
--- doctools/trunk/TODO (original)
+++ doctools/trunk/TODO Thu Aug 2 10:54:17 2007
@@ -5,7 +5,6 @@
- discuss and debug comments system
- write new Makefile, handle automatic checkout
- write a "printable" builder (export to latex, most probably)
-- discuss lib -> ref section move
- prepare for databases other than sqlite for comments
- look at the old tools/ scripts, what functionality should be rewritten
- add search via Xapian?
Modified: doctools/trunk/converter/filenamemap.py
==============================================================================
--- doctools/trunk/converter/filenamemap.py (original)
+++ doctools/trunk/converter/filenamemap.py Thu Aug 2 10:54:17 2007
@@ -12,7 +12,7 @@
_mapping = {
'lib': {
- '__newname__' : 'modules',
+ '__newname__' : 'library',
'asttable': '',
'compiler': '',
@@ -271,12 +271,11 @@
'libundoc': '',
'libintro': '',
- # -> ref
- 'libconsts': 'reference/consts',
- 'libexcs': 'reference/exceptions',
- 'libfuncs': 'reference/functions',
- 'libobjs': 'reference/objects',
- 'libstdtypes': 'reference/stdtypes',
+ 'libconsts': 'constants',
+ 'libexcs': 'exceptions',
+ 'libfuncs': 'functions',
+ 'libobjs': 'objects',
+ 'libstdtypes': 'stdtypes',
# mainfiles
'lib': None,
@@ -374,7 +373,7 @@
},
'mac': {
- '__newname__': 'macmodules',
+ '__newname__': 'maclib',
'mac': None,
'libaepack': 'aepack',
@@ -413,6 +412,7 @@
'whatsnew24': '2.4',
'whatsnew25': '2.5',
'whatsnew26': '2.6',
+ 'whatsnew30': '3.0',
},
'commontex': {
@@ -449,8 +449,8 @@
'includes',
'includes/sqlite3',
'install',
- 'macmodules',
- 'modules',
+ 'maclib',
+ 'library',
'reference',
'tutorial',
'whatsnew',
@@ -482,8 +482,8 @@
'ref_index.rst': 'reference/index.rst',
'tutorial_index.rst': 'tutorial/index.rst',
- 'modules_index.rst': 'modules/index.rst',
- 'mac_index.rst': 'macmodules/index.rst',
+ 'modules_index.rst': 'library/index.rst',
+ 'mac_index.rst': 'maclib/index.rst',
'ext_index.rst': 'extending/index.rst',
'api_index.rst': 'c-api/index.rst',
'dist_index.rst': 'distutils/index.rst',
Modified: doctools/trunk/converter/newfiles/conf.py
==============================================================================
--- doctools/trunk/converter/newfiles/conf.py (original)
+++ doctools/trunk/converter/newfiles/conf.py Thu Aug 2 10:54:17 2007
@@ -31,8 +31,8 @@
'whatsnew/2.3.rst',
'whatsnew/2.4.rst',
'whatsnew/2.5.rst',
- 'macmodules/scrap.rst',
- 'modules/xmllib.rst',
+ 'maclib/scrap.rst',
+ 'library/xmllib.rst',
]
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
Modified: doctools/trunk/converter/newfiles/contents.rst
==============================================================================
--- doctools/trunk/converter/newfiles/contents.rst (original)
+++ doctools/trunk/converter/newfiles/contents.rst Thu Aug 2 10:54:17 2007
@@ -7,8 +7,8 @@
whatsnew/2.6.rst
tutorial/index.rst
reference/index.rst
- modules/index.rst
- macmodules/index.rst
+ library/index.rst
+ maclib/index.rst
extending/index.rst
c-api/index.rst
distutils/index.rst
Modified: doctools/trunk/converter/newfiles/mac_index.rst
==============================================================================
--- doctools/trunk/converter/newfiles/mac_index.rst (original)
+++ doctools/trunk/converter/newfiles/mac_index.rst Thu Aug 2 10:54:17 2007
@@ -1,4 +1,4 @@
-.. _macmodules-index:
+.. _maclib-index:
##############################
Macintosh Library Modules
@@ -8,7 +8,7 @@
:Date: |today|
This library reference manual documents Python's extensions for the Macintosh.
-It should be used in conjunction with :ref:`modules-index`, which documents the
+It should be used in conjunction with :ref:`library-index`, which documents the
standard library and built-in types.
This manual assumes basic knowledge about the Python language. For an informal
Modified: doctools/trunk/converter/newfiles/modules_index.rst
==============================================================================
--- doctools/trunk/converter/newfiles/modules_index.rst (original)
+++ doctools/trunk/converter/newfiles/modules_index.rst Thu Aug 2 10:54:17 2007
@@ -1,4 +1,4 @@
-.. _modules-index:
+.. _library-index:
###############################
The Python standard library
@@ -29,6 +29,12 @@
:maxdepth: 2
intro.rst
+ functions.rst
+ constants.rst
+ objects.rst
+ stdtypes.rst
+ exceptions.rst
+
strings.rst
datatypes.rst
numeric.rst
Modified: doctools/trunk/converter/newfiles/ref_index.rst
==============================================================================
--- doctools/trunk/converter/newfiles/ref_index.rst (original)
+++ doctools/trunk/converter/newfiles/ref_index.rst Thu Aug 2 10:54:17 2007
@@ -10,7 +10,7 @@
This reference manual describes the syntax and "core semantics" of the
language. It is terse, but attempts to be exact and complete. The semantics of
non-essential built-in object types and of the built-in functions and modules
-are described in :ref:`modules-index`. For an informal introduction to the
+are described in :ref:`library-index`. For an informal introduction to the
language, see :ref:`tutorial-index`. For C or C++ programmers, two additional
manuals exist: :ref:`extending-index` describes the high-level picture of how to
write a Python extension module, and the :ref:`c-api-index` describes the
@@ -27,8 +27,4 @@
simple_stmts.rst
compound_stmts.rst
toplevel_components.rst
- functions.rst
- consts.rst
- objects.rst
- stdtypes.rst
- exceptions.rst
+
Modified: doctools/trunk/sphinx/builder.py
==============================================================================
--- doctools/trunk/sphinx/builder.py (original)
+++ doctools/trunk/sphinx/builder.py Thu Aug 2 10:54:17 2007
@@ -324,6 +324,7 @@
last_updated = self.last_updated,
builder = self.name,
release = self.config['release'],
+ version = self.config['version'],
parents = [],
len = len,
titles = {},
Modified: doctools/trunk/sphinx/style/searchtools.js
==============================================================================
--- doctools/trunk/sphinx/style/searchtools.js (original)
+++ doctools/trunk/sphinx/style/searchtools.js Thu Aug 2 10:54:17 2007
@@ -232,7 +232,7 @@
// auto default
if (areas.length == 1 && areas[0] == 'default') {
- areas = ['tutorial', 'modules', 'install', 'distutils'];
+ areas = ['tutorial', 'library', 'install', 'distutils'];
}
// update input fields
@@ -425,4 +425,4 @@
$(document).ready(function() {
Documentation.Search.init();
- });
\ No newline at end of file
+ });
Modified: doctools/trunk/sphinx/templates/index.html
==============================================================================
--- doctools/trunk/sphinx/templates/index.html (original)
+++ doctools/trunk/sphinx/templates/index.html Thu Aug 2 10:54:17 2007
@@ -14,15 +14,15 @@
<p><strong>Parts of the documentation:</strong></p>
<table class="contentstable" align="center"><tr>
<td width="50%">
- <p class="biglink"><a class="biglink" href="{{ pathto("whatsnew/2.6.rst") }}">What's new in Python 2.6?</a><br>
+ <p class="biglink"><a class="biglink" href="{{ pathto("whatsnew/" + version + ".rst") }}">What's new in Python {{ version }}?</a><br>
<span class="linkdescr">changes since previous major release</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("tutorial/index.rst") }}">Tutorial</a><br>
<span class="linkdescr">start here</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("reference/index.rst") }}">Language Reference</a><br>
- <span class="linkdescr">describes syntax, language elements and builtins</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("modules/index.rst") }}">Library Reference</a><br>
+ <span class="linkdescr">describes syntax and language elements</span></p>
+ <p class="biglink"><a class="biglink" href="{{ pathto("library/index.rst") }}">Library Reference</a><br>
<span class="linkdescr">keep this under your pillow</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("macmodules/index.rst") }}">Macintosh Library Modules</a><br>
+ <p class="biglink"><a class="biglink" href="{{ pathto("maclib/index.rst") }}">Macintosh Library Modules</a><br>
<span class="linkdescr">this too, if you use a Macintosh</span></p>
</td><td width="50%">
<p class="biglink"><a class="biglink" href="{{ pathto("extending/index.rst") }}">Extending and Embedding</a><br>
Modified: doctools/trunk/sphinx/templates/keyword_not_found.html
==============================================================================
--- doctools/trunk/sphinx/templates/keyword_not_found.html (original)
+++ doctools/trunk/sphinx/templates/keyword_not_found.html Thu Aug 2 10:54:17 2007
@@ -26,6 +26,6 @@
</p>
<p>
For a quick overview over all documented modules,
- <a href="{{ pathto('modules/index.rst') }}">click here</a>.
+ <a href="{{ pathto('library/index.rst') }}">click here</a>.
</p>
{% endblock %}
Modified: doctools/trunk/sphinx/templates/search.html
==============================================================================
--- doctools/trunk/sphinx/templates/search.html (original)
+++ doctools/trunk/sphinx/templates/search.html Thu Aug 2 10:54:17 2007
@@ -24,8 +24,8 @@
<ul class="fakelist">
{% for id, name, checked in [
('tutorial', 'Python Tutorial', true),
- ('modules', 'Library Reference', true),
- ('macmodules', 'Macintosh Library Modules', false),
+ ('library', 'Library Reference', true),
+ ('maclib', 'Macintosh Library Modules', false),
('extending', 'Extending and Embedding', false),
('c-api', 'Python/C API', false),
('install', 'Installing Python Modules', true),
Modified: doctools/trunk/sphinx/web/application.py
==============================================================================
--- doctools/trunk/sphinx/web/application.py (original)
+++ doctools/trunk/sphinx/web/application.py Thu Aug 2 10:54:17 2007
@@ -590,7 +590,7 @@
"""
Find keyword matches. If there is an exact match, just redirect:
http://docs.python.org/os.path.exists would automatically
- redirect to http://docs.python.org/modules/os.path/#os.path.exists.
+ redirect to http://docs.python.org/library/os.path/#os.path.exists.
Else, show a page with close matches.
Module references are processed first so that "os.path" is handled as
Modified: doctools/trunk/sphinx/web/oldurls.py
==============================================================================
--- doctools/trunk/sphinx/web/oldurls.py (original)
+++ doctools/trunk/sphinx/web/oldurls.py Thu Aug 2 10:54:17 2007
@@ -60,18 +60,18 @@
return 'bugs/'
if url == 'modindex.html' or url.endswith('/modindex.html'):
return 'modindex/'
- # modules, macmodules
+ # library, maclib
if url[:4] in ('lib/', 'mac/'):
- p = '' if url[0] == 'l' else 'mac'
+ p = 'library/' if url[0] == 'l' else 'maclib/'
m = _module_re.match(url[4:])
if m:
mn = m.group(1)
- return p + 'modules/' + special_module_names.get(mn, mn)
+ return p + special_module_names.get(mn, mn)
# module sub-pages
m = _modsub_re.match(url[4:])
if m and not _modobj_re.match(url[4:]):
mn = m.group(1)
- return p + 'modules/' + special_module_names.get(mn, mn)
+ return p + special_module_names.get(mn, mn)
# XXX: handle all others
# tutorial
elif url[:4] == 'tut/':
1
0
Author: georg.brandl
Date: Thu Aug 2 10:24:23 2007
New Revision: 56660
Modified:
doctools/trunk/sphinx/__init__.py
Log:
Don't color output if stdout is not a tty.
Modified: doctools/trunk/sphinx/__init__.py
==============================================================================
--- doctools/trunk/sphinx/__init__.py (original)
+++ doctools/trunk/sphinx/__init__.py Thu Aug 2 10:24:23 2007
@@ -99,7 +99,7 @@
elif opt == '-N':
nocolor()
- if sys.platform == 'win32':
+ if not sys.stdout.isatty() or sys.platform == 'win32':
# Windows' cmd box doesn't understand ANSI sequences
nocolor()
1
0
Author: brett.cannon
Date: Thu Aug 2 05:22:19 2007
New Revision: 56658
Modified:
sandbox/trunk/import_in_py/importlib.py
Log:
Reorganize stuff to make it more clear what is left to be done.
Modified: sandbox/trunk/import_in_py/importlib.py
==============================================================================
--- sandbox/trunk/import_in_py/importlib.py (original)
+++ sandbox/trunk/import_in_py/importlib.py Thu Aug 2 05:22:19 2007
@@ -100,10 +100,6 @@
# Required built-in modules.
-import imp, sys, marshal
-_importlib.imp = imp
-_importlib.sys = sys
-_importlib.marshal = marshal
try:
import posix as _os
except ImportError:
@@ -113,8 +109,13 @@
try:
import os2 as _os
except ImportError:
- raise ImportError('posix, nt, or os2 required for importlib')
+ raise ImportError('posix, nt, or os2 module required for importlib')
_importlib._os = _os
+import imp, sys, marshal
+_importlib.imp = imp
+_importlib.sys = sys
+_importlib.marshal = marshal
+
# XXX These all need to either go away or become built-in modules
# (<cough>Neal</cough>).
@@ -125,7 +126,8 @@
_importlib._r_long = _r_long #XXX Expose original from marshal.
_importlib._w_long = _w_long #XXX Expose original from marshal.
_importlib._case_ok = _case_ok #XXX Expose original from imp.
-_importlib.path_sep = sep # For os.path.join replacement.
+# For os.path.join replacement; pull from Include/osdefs.h:SEP .
+_importlib.path_sep = sep
# For allowing silent failure of .pyc creation when permission is denied.
_importlib.EACCES = EACCES
1
0
r56657 - sandbox/trunk/import_in_py/_importlib.py sandbox/trunk/import_in_py/importlib.py
by brett.cannon Aug. 2, 2007
by brett.cannon Aug. 2, 2007
Aug. 2, 2007
Author: brett.cannon
Date: Thu Aug 2 05:18:47 2007
New Revision: 56657
Modified:
sandbox/trunk/import_in_py/_importlib.py
sandbox/trunk/import_in_py/importlib.py
Log:
Change name of module used for posix stuff to _os instead of 'posix' as the
name varies depending on what platform you are using.
Modified: sandbox/trunk/import_in_py/_importlib.py
==============================================================================
--- sandbox/trunk/import_in_py/_importlib.py (original)
+++ sandbox/trunk/import_in_py/_importlib.py Thu Aug 2 05:18:47 2007
@@ -58,7 +58,8 @@
"""
from __future__ import with_statement
-# The injected modules are 'imp', 'sys', 'marshal', 'posix' (aka 'nt' & 'os2').
+# The injected modules are 'imp', 'sys', 'marshal', and '_os' (a.k.a. 'posix',
+# 'nt' & 'os2').
# XXX Could also expose Modules/getpath.c:joinpath()
def _path_join(*args):
@@ -68,7 +69,7 @@
def _path_exists(path):
"""Replacement for os.path.exists to help remove dependency on 'os'."""
try:
- posix.stat(path)
+ _os.stat(path)
except OSError:
return False
else:
@@ -78,7 +79,7 @@
def _path_is_mode_type(path, mode):
"""Test whether the path is the specified mode type."""
try:
- stat_info = posix.stat(path)
+ stat_info = _os.stat(path)
except OSError:
return False
return (stat_info.st_mode & 0170000) == mode
@@ -96,12 +97,12 @@
def _path_absolute(path):
"""Replacement for os.path.abspath."""
try:
- return posix._getfullpathname(path)
+ return _os._getfullpathname(path)
except AttributeError:
if path.startswith('/'):
return path
else:
- return _path_join(posix.getcwd(), path)
+ return _path_join(_os.getcwd(), path)
class _BuiltinFrozenBaseImporter(object):
@@ -300,7 +301,7 @@
PyPycHandler.
"""
- return int(posix.stat(path).st_mtime)
+ return int(_os.stat(path).st_mtime)
def split_path(self, path):
"""Split the specified path into a base path and the type of the
Modified: sandbox/trunk/import_in_py/importlib.py
==============================================================================
--- sandbox/trunk/import_in_py/importlib.py (original)
+++ sandbox/trunk/import_in_py/importlib.py Thu Aug 2 05:18:47 2007
@@ -105,16 +105,16 @@
_importlib.sys = sys
_importlib.marshal = marshal
try:
- import posix
+ import posix as _os
except ImportError:
try:
- import nt as posix
+ import nt as _os
except ImportError:
try:
- import os2 as posix
+ import os2 as _os
except ImportError:
raise ImportError('posix, nt, or os2 required for importlib')
-_importlib.posix = posix
+_importlib._os = _os
# XXX These all need to either go away or become built-in modules
# (<cough>Neal</cough>).
1
0
Author: facundo.batista
Date: Thu Aug 2 04:17:54 2007
New Revision: 56656
Modified:
python/branches/decimal-branch/Lib/decimal.py
Log:
sqrt() function was written brand new, now is around 10x
faster and does not have some subtle errors. Also
_fixexponents() was, well, fixed for small details.
Thanks Mark Dickinson.
Modified: python/branches/decimal-branch/Lib/decimal.py
==============================================================================
--- python/branches/decimal-branch/Lib/decimal.py (original)
+++ python/branches/decimal-branch/Lib/decimal.py Thu Aug 2 04:17:54 2007
@@ -1559,46 +1559,58 @@
"""Fix the exponents and return a copy with the exponent in bounds.
Only call if known to not be a special value.
"""
- folddown = context._clamp
- Emin = context.Emin
+
ans = self
- ans_adjusted = ans.adjusted()
- if ans_adjusted < Emin:
+ # deal with zeros first
+ if not ans:
Etiny = context.Etiny()
if ans._exp < Etiny:
- if not ans:
+ ans = Decimal(self)
+ ans._exp = Etiny
+ context._raise_error(Clamped)
+ else:
+ if context._clamp:
+ exp_max = context.Etop()
+ else:
+ exp_max = context.Emax
+ if ans._exp > exp_max:
ans = Decimal(self)
- ans._exp = Etiny
- context._raise_error(Clamped)
- return ans
- ans = ans._rescale(Etiny, context=context)
- # It isn't zero, and exp < Emin => subnormal
- context._raise_error(Subnormal)
- if not ans:
+ ans._exp = exp_max
context._raise_error(Clamped)
- if context.flags[Inexact]:
- context._raise_error(Underflow)
- else:
- if ans:
- # Only raise subnormal if non-zero.
- context._raise_error(Subnormal)
- else:
+ return ans
+
+ # self is nonzero; if adjusted exponent is > Emax, overflow
+ ans_adjusted = ans.adjusted()
+ if ans_adjusted > context.Emax:
+ context._raise_error(Inexact)
+ context._raise_error(Rounded)
+ c = context._raise_error(Overflow, 'above Emax', ans._sign)
+ return c
+
+ # Now check for subnormal results, and for the need to fold
+ # down. These two conditions are *not* mutually
+ # exclusive---when the precision is large and Emin and Emax
+ # are small it's quite possible to have Emin > Etop.
+ # (Actually, the specification requires Emin and Emax to be at
+ # least 5*precision, so this shouldn't happen, but it never
+ # hurts to be careful.)
+ if context._clamp:
Etop = context.Etop()
- if folddown and ans._exp > Etop:
+ if ans._exp > Etop:
context._raise_error(Clamped)
ans = ans._rescale(Etop, context=context)
- else:
- Emax = context.Emax
- if ans_adjusted > Emax:
+
+ if ans_adjusted < context.Emin:
+ context._raise_error(Subnormal)
+ Etiny = context.Etiny()
+ if ans._exp < Etiny:
+ ans_before_rescale = ans
+ ans = ans._rescale(Etiny, context=context)
+ if ans != ans_before_rescale:
+ context._raise_error(Underflow)
if not ans:
- ans = Decimal(self)
- ans._exp = Emax
context._raise_error(Clamped)
- return ans
- context._raise_error(Inexact)
- context._raise_error(Rounded)
- c = context._raise_error(Overflow, 'above Emax', ans._sign)
- return c
+
return ans
def _round(self, prec=None, rounding=None, context=None, forceExp=None, fromQuantize=False):
@@ -2068,11 +2080,7 @@
to_integral = to_integral_value
def sqrt(self, context=None):
- """Return the square root of self.
-
- Uses a converging algorithm (Xn+1 = 0.5*(Xn + self / Xn))
- Should quadratically approach the right answer.
- """
+ """Return the square root of self."""
if self._is_special:
ans = self._check_nans(context=context)
if ans:
@@ -2082,16 +2090,9 @@
return Decimal(self)
if not self:
- # exponent = self._exp / 2, using round_down.
- # if self._exp < 0:
- # exp = (self._exp+1) // 2
- # else:
- exp = (self._exp) // 2
- if self._sign == 1:
- # sqrt(-0) = -0
- return Decimal( (1, (0,), exp))
- else:
- return Decimal( (0, (0,), exp))
+ # exponent = self._exp // 2. sqrt(-0) = -0
+ ans = Decimal((self._sign, (0,), self._exp // 2))
+ return ans._fix(context)
if context is None:
context = getcontext()
@@ -2099,94 +2100,83 @@
if self._sign == 1:
return context._raise_error(InvalidOperation, 'sqrt(-x), x > 0')
- tmp = Decimal(self)
-
- expadd = tmp._exp // 2
- if tmp._exp & 1:
- tmp._int += (0,)
- tmp._exp = 0
- else:
- tmp._exp = 0
-
- context = context._shallow_copy()
- flags = context._ignore_all_flags()
- firstprec = context.prec
- context.prec = 3
- if tmp.adjusted() & 1 == 0:
- ans = Decimal( (0, (8,1,9), tmp.adjusted() - 2) )
- ans = ans.__add__(tmp.__mul__(Decimal((0, (2,5,9), -2)),
- context=context), context=context)
- ans._exp -= 1 + tmp.adjusted() // 2
- else:
- ans = Decimal( (0, (2,5,9), tmp._exp + len(tmp._int)- 3) )
- ans = ans.__add__(tmp.__mul__(Decimal((0, (8,1,9), -3)),
- context=context), context=context)
- ans._exp -= 1 + tmp.adjusted() // 2
-
- # ans is now a linear approximation.
- Emax, Emin = context.Emax, context.Emin
- context.Emax, context.Emin = DefaultContext.Emax, DefaultContext.Emin
-
- half = Decimal('0.5')
-
- maxp = firstprec + 2
- rounding = context._set_rounding(ROUND_HALF_EVEN)
- while 1:
- context.prec = min(2*context.prec - 2, maxp)
- ans = half.__mul__(ans.__add__(tmp.__div__(ans, context=context),
- context=context), context=context)
- if context.prec == maxp:
+ # At this point self represents a positive number. Let p be
+ # the desired precision and express self in the form c*100**e
+ # with c a positive real number and e an integer, c and e
+ # being chosen so that 100**(p-1) <= c < 100**p. Then the
+ # (exact) square root of self is sqrt(c)*10**e, and 10**(p-1)
+ # <= sqrt(c) < 10**p, so the closest representable Decimal at
+ # precision p is n*10**e where n = round_half_even(sqrt(c)),
+ # the closest integer to sqrt(c) with the even integer chosen
+ # in the case of a tie.
+ #
+ # To ensure correct rounding in all cases, we use the
+ # following trick: we compute the square root to an extra
+ # place (precision p+1 instead of precision p), rounding down.
+ # Then, if the result is inexact and its last digit is 0 or 5,
+ # we increase the last digit to 1 or 6 respectively; if it's
+ # exact we leave the last digit alone. Now the final round to
+ # p places (or fewer in the case of underflow) will round
+ # correctly and raise the appropriate flags.
+
+ # use an extra digit of precision
+ prec = context.prec+1
+
+ # write argument in the form c*100**e where e = self._exp//2
+ # is the 'ideal' exponent, to be used if the square root is
+ # exactly representable. l is the number of 'digits' of c in
+ # base 100, so that 100**(l-1) <= c < 100**l.
+ op = _WorkRep(self)
+ e = op.exp >> 1
+ if op.exp & 1:
+ c = op.int * 10
+ l = (len(self._int) >> 1) + 1
+ else:
+ c = op.int
+ l = len(self._int)+1 >> 1
+
+ # rescale so that c has exactly prec base 100 'digits'
+ shift = prec-l
+ if shift >= 0:
+ c *= 100**shift
+ exact = True
+ else:
+ c, remainder = divmod(c, 100**-shift)
+ exact = not remainder
+ e -= shift
+
+ # find n = floor(sqrt(c)) using Newton's method
+ n = 10**prec
+ while True:
+ q = c//n
+ if n <= q:
break
+ else:
+ n = n + q >> 1
+ exact = exact and n*n == c
- # Round to the answer's precision-- the only error can be 1 ulp.
- context.prec = firstprec
- prevexp = ans.adjusted()
- ans = ans._round(context=context)
-
- # Now, check if the other last digits are better.
- context.prec = firstprec + 1
- # In case we rounded up another digit and we should actually go lower.
- if prevexp != ans.adjusted():
- ans._int += (0,)
- ans._exp -= 1
-
-
- lower = ans.__sub__(Decimal((0, (5,), ans._exp-1)), context=context)
- context._set_rounding(ROUND_UP)
- if lower.__mul__(lower, context=context) > (tmp):
- ans = ans.__sub__(Decimal((0, (1,), ans._exp)), context=context)
-
+ if exact:
+ # result is exact; rescale to use ideal exponent e
+ if shift >= 0:
+ # assert n % 10**shift == 0
+ n //= 10**shift
+ else:
+ n *= 10**-shift
+ e += shift
else:
- upper = ans.__add__(Decimal((0, (5,), ans._exp-1)),context=context)
- context._set_rounding(ROUND_DOWN)
- if upper.__mul__(upper, context=context) < tmp:
- ans = ans.__add__(Decimal((0, (1,), ans._exp)),context=context)
+ # result is not exact; fix last digit as described above
+ if n % 5 == 0:
+ n += 1
- ans._exp += expadd
+ ans = Decimal((0, map(int, str(n)), e))
- context.prec = firstprec
- context.rounding = rounding
+ # round, and fit to current context
+ context = context._shallow_copy()
+ rounding = context._set_rounding(ROUND_HALF_EVEN)
ans = ans._fix(context)
+ context.rounding = rounding
- rounding = context._set_rounding_decision(NEVER_ROUND)
- if not ans.__mul__(ans, context=context) == self:
- # Only rounded/inexact if here.
- context._regard_flags(flags)
- context._raise_error(Rounded)
- context._raise_error(Inexact)
- else:
- # Exact answer, so let's set the exponent right.
- # if self._exp < 0:
- # exp = (self._exp +1)// 2
- # else:
- exp = self._exp // 2
- context.prec += ans._exp - exp
- ans = ans._rescale(exp, context=context)
- context.prec = firstprec
- context._regard_flags(flags)
- context.Emax, context.Emin = Emax, Emin
-
- return ans._fix(context)
+ return ans
def max(self, other, context=None):
"""Returns the larger value.
1
0
r56655 - python/branches/decimal-branch/Lib/test/decimaltestdata/squareroot_extra.decTest
by facundo.batista Aug. 2, 2007
by facundo.batista Aug. 2, 2007
Aug. 2, 2007
Author: facundo.batista
Date: Thu Aug 2 04:16:24 2007
New Revision: 56655
Added:
python/branches/decimal-branch/Lib/test/decimaltestdata/squareroot_extra.decTest
Log:
New tests for squareroot, coordinate with Cowlishaw,
maybe he'll keep this as a separated file or integrate
these tests in the standard squareroot.decTest file in
a later version. Thanks to Mark Dickinson.
Added: python/branches/decimal-branch/Lib/test/decimaltestdata/squareroot_extra.decTest
==============================================================================
--- (empty file)
+++ python/branches/decimal-branch/Lib/test/decimaltestdata/squareroot_extra.decTest Thu Aug 2 04:16:24 2007
@@ -0,0 +1,800 @@
+------------------------------------------------------------------------
+--
+-- Special thanks to Mark Dickinson for tests in the range 1000-1999.
+--
+-- Extra tests for the square root function, dealing with a variety of
+-- corner cases. In particular, these tests concentrate on
+-- (1) cases where the input precision exceeds the context precision, and
+-- (2) cases where the input exponent is outside the current context,
+-- and in particular when the result is subnormal
+--
+-- maxexponent and minexponent are set to 9 and -9 throughout these
+-- cases; only the precision changes. The rounding also does not
+-- change, and should be irrelevant. Ideally these tests could be
+-- run with all rounding modes to check that the rounding mode does
+-- not affect any of the results.
+
+version: 2.xx
+
+extended: 1
+rounding: down
+maxexponent: 9
+minexponent: -9
+
+-- exact results, input precision > context precision
+precision: 1
+sqtx1000 squareroot 0 -> 0
+sqtx1001 squareroot 1 -> 1
+sqtx1002 squareroot 4 -> 2
+sqtx1003 squareroot 9 -> 3
+sqtx1004 squareroot 16 -> 4
+sqtx1005 squareroot 25 -> 5
+sqtx1006 squareroot 36 -> 6
+sqtx1007 squareroot 49 -> 7
+sqtx1008 squareroot 64 -> 8
+sqtx1009 squareroot 81 -> 9
+sqtx1010 squareroot 100 -> 1E+1 Rounded
+sqtx1011 squareroot 121 -> 1E+1 Inexact Rounded
+
+precision: 2
+sqtx1012 squareroot 0 -> 0
+sqtx1013 squareroot 1 -> 1
+sqtx1014 squareroot 4 -> 2
+sqtx1015 squareroot 9 -> 3
+sqtx1016 squareroot 16 -> 4
+sqtx1017 squareroot 25 -> 5
+sqtx1018 squareroot 36 -> 6
+sqtx1019 squareroot 49 -> 7
+sqtx1020 squareroot 64 -> 8
+sqtx1021 squareroot 81 -> 9
+sqtx1022 squareroot 100 -> 10
+sqtx1023 squareroot 121 -> 11
+sqtx1024 squareroot 144 -> 12
+sqtx1025 squareroot 169 -> 13
+sqtx1026 squareroot 196 -> 14
+sqtx1027 squareroot 225 -> 15
+sqtx1028 squareroot 256 -> 16
+sqtx1029 squareroot 289 -> 17
+sqtx1030 squareroot 324 -> 18
+sqtx1031 squareroot 361 -> 19
+sqtx1032 squareroot 400 -> 20
+sqtx1033 squareroot 441 -> 21
+sqtx1034 squareroot 484 -> 22
+sqtx1035 squareroot 529 -> 23
+sqtx1036 squareroot 576 -> 24
+sqtx1037 squareroot 625 -> 25
+sqtx1038 squareroot 676 -> 26
+sqtx1039 squareroot 729 -> 27
+sqtx1040 squareroot 784 -> 28
+sqtx1041 squareroot 841 -> 29
+sqtx1042 squareroot 900 -> 30
+sqtx1043 squareroot 961 -> 31
+sqtx1044 squareroot 1024 -> 32
+sqtx1045 squareroot 1089 -> 33
+sqtx1046 squareroot 1156 -> 34
+sqtx1047 squareroot 1225 -> 35
+sqtx1048 squareroot 1296 -> 36
+sqtx1049 squareroot 1369 -> 37
+sqtx1050 squareroot 1444 -> 38
+sqtx1051 squareroot 1521 -> 39
+sqtx1052 squareroot 1600 -> 40
+sqtx1053 squareroot 1681 -> 41
+sqtx1054 squareroot 1764 -> 42
+sqtx1055 squareroot 1849 -> 43
+sqtx1056 squareroot 1936 -> 44
+sqtx1057 squareroot 2025 -> 45
+sqtx1058 squareroot 2116 -> 46
+sqtx1059 squareroot 2209 -> 47
+sqtx1060 squareroot 2304 -> 48
+sqtx1061 squareroot 2401 -> 49
+sqtx1062 squareroot 2500 -> 50
+sqtx1063 squareroot 2601 -> 51
+sqtx1064 squareroot 2704 -> 52
+sqtx1065 squareroot 2809 -> 53
+sqtx1066 squareroot 2916 -> 54
+sqtx1067 squareroot 3025 -> 55
+sqtx1068 squareroot 3136 -> 56
+sqtx1069 squareroot 3249 -> 57
+sqtx1070 squareroot 3364 -> 58
+sqtx1071 squareroot 3481 -> 59
+sqtx1072 squareroot 3600 -> 60
+sqtx1073 squareroot 3721 -> 61
+sqtx1074 squareroot 3844 -> 62
+sqtx1075 squareroot 3969 -> 63
+sqtx1076 squareroot 4096 -> 64
+sqtx1077 squareroot 4225 -> 65
+sqtx1078 squareroot 4356 -> 66
+sqtx1079 squareroot 4489 -> 67
+sqtx1080 squareroot 4624 -> 68
+sqtx1081 squareroot 4761 -> 69
+sqtx1082 squareroot 4900 -> 70
+sqtx1083 squareroot 5041 -> 71
+sqtx1084 squareroot 5184 -> 72
+sqtx1085 squareroot 5329 -> 73
+sqtx1086 squareroot 5476 -> 74
+sqtx1087 squareroot 5625 -> 75
+sqtx1088 squareroot 5776 -> 76
+sqtx1089 squareroot 5929 -> 77
+sqtx1090 squareroot 6084 -> 78
+sqtx1091 squareroot 6241 -> 79
+sqtx1092 squareroot 6400 -> 80
+sqtx1093 squareroot 6561 -> 81
+sqtx1094 squareroot 6724 -> 82
+sqtx1095 squareroot 6889 -> 83
+sqtx1096 squareroot 7056 -> 84
+sqtx1097 squareroot 7225 -> 85
+sqtx1098 squareroot 7396 -> 86
+sqtx1099 squareroot 7569 -> 87
+sqtx1100 squareroot 7744 -> 88
+sqtx1101 squareroot 7921 -> 89
+sqtx1102 squareroot 8100 -> 90
+sqtx1103 squareroot 8281 -> 91
+sqtx1104 squareroot 8464 -> 92
+sqtx1105 squareroot 8649 -> 93
+sqtx1106 squareroot 8836 -> 94
+sqtx1107 squareroot 9025 -> 95
+sqtx1108 squareroot 9216 -> 96
+sqtx1109 squareroot 9409 -> 97
+sqtx1110 squareroot 9604 -> 98
+sqtx1111 squareroot 9801 -> 99
+sqtx1112 squareroot 10000 -> 1.0E+2 Rounded
+sqtx1113 squareroot 10201 -> 1.0E+2 Inexact Rounded
+
+precision: 3
+sqtx1114 squareroot 841 -> 29
+sqtx1115 squareroot 1600 -> 40
+sqtx1116 squareroot 2209 -> 47
+sqtx1117 squareroot 9604 -> 98
+sqtx1118 squareroot 21316 -> 146
+sqtx1119 squareroot 52441 -> 229
+sqtx1120 squareroot 68644 -> 262
+sqtx1121 squareroot 69696 -> 264
+sqtx1122 squareroot 70225 -> 265
+sqtx1123 squareroot 76729 -> 277
+sqtx1124 squareroot 130321 -> 361
+sqtx1125 squareroot 171396 -> 414
+sqtx1126 squareroot 270400 -> 520
+sqtx1127 squareroot 279841 -> 529
+sqtx1128 squareroot 407044 -> 638
+sqtx1129 squareroot 408321 -> 639
+sqtx1130 squareroot 480249 -> 693
+sqtx1131 squareroot 516961 -> 719
+sqtx1132 squareroot 692224 -> 832
+sqtx1133 squareroot 829921 -> 911
+
+-- selection of random exact results
+precision: 6
+sqtx1134 squareroot 2.25E-12 -> 0.0000015
+sqtx1135 squareroot 8.41E-14 -> 2.9E-7
+sqtx1136 squareroot 6.241E-15 -> 7.9E-8
+sqtx1137 squareroot 5.041E+13 -> 7.1E+6
+sqtx1138 squareroot 4761 -> 69
+sqtx1139 squareroot 1.369E+17 -> 3.7E+8
+sqtx1140 squareroot 0.00002116 -> 0.0046
+sqtx1141 squareroot 7.29E+4 -> 2.7E+2
+sqtx1142 squareroot 4.624E-13 -> 6.8E-7
+sqtx1143 squareroot 3.969E+5 -> 6.3E+2
+sqtx1144 squareroot 3.73321E-11 -> 0.00000611
+sqtx1145 squareroot 5.61001E+17 -> 7.49E+8
+sqtx1146 squareroot 2.30400E-11 -> 0.00000480
+sqtx1147 squareroot 4.30336E+17 -> 6.56E+8
+sqtx1148 squareroot 0.057121 -> 0.239
+sqtx1149 squareroot 7.225E+17 -> 8.5E+8
+sqtx1150 squareroot 3.14721E+13 -> 5.61E+6
+sqtx1151 squareroot 4.61041E+17 -> 6.79E+8
+sqtx1152 squareroot 1.39876E-15 -> 3.74E-8
+sqtx1153 squareroot 6.19369E-9 -> 0.0000787
+sqtx1154 squareroot 1.620529E-10 -> 0.00001273
+sqtx1155 squareroot 1177.1761 -> 34.31
+sqtx1156 squareroot 67043344 -> 8188
+sqtx1157 squareroot 4.84E+6 -> 2.2E+3
+sqtx1158 squareroot 1.23904E+11 -> 3.52E+5
+sqtx1159 squareroot 32604100 -> 5710
+sqtx1160 squareroot 2.9757025E-11 -> 0.000005455
+sqtx1161 squareroot 6.3760225E-9 -> 0.00007985
+sqtx1162 squareroot 4.5198729E-11 -> 0.000006723
+sqtx1163 squareroot 1.4745600E-11 -> 0.000003840
+sqtx1164 squareroot 18964283.04 -> 4354.8
+sqtx1165 squareroot 3.308895529E+13 -> 5.7523E+6
+sqtx1166 squareroot 0.0028590409 -> 0.05347
+sqtx1167 squareroot 3572.213824 -> 59.768
+sqtx1168 squareroot 4.274021376E+15 -> 6.5376E+7
+sqtx1169 squareroot 4455476.64 -> 2110.8
+sqtx1170 squareroot 38.44 -> 6.2
+sqtx1171 squareroot 68.558400 -> 8.280
+sqtx1172 squareroot 715402009 -> 26747
+sqtx1173 squareroot 93.373569 -> 9.663
+sqtx1174 squareroot 2.62144000000E+15 -> 5.12000E+7
+sqtx1175 squareroot 7.48225000000E+15 -> 8.65000E+7
+sqtx1176 squareroot 3.38724000000E-9 -> 0.0000582000
+sqtx1177 squareroot 5.64001000000E-13 -> 7.51000E-7
+sqtx1178 squareroot 5.06944000000E-15 -> 7.12000E-8
+sqtx1179 squareroot 4.95616000000E+17 -> 7.04000E+8
+sqtx1180 squareroot 0.0000242064000000 -> 0.00492000
+sqtx1181 squareroot 1.48996000000E-15 -> 3.86000E-8
+sqtx1182 squareroot 9.37024000000E+17 -> 9.68000E+8
+sqtx1183 squareroot 7128900.0000 -> 2670.00
+sqtx1184 squareroot 8.2311610000E-10 -> 0.0000286900
+sqtx1185 squareroot 482747040000 -> 694800
+sqtx1186 squareroot 4.14478440000E+17 -> 6.43800E+8
+sqtx1187 squareroot 5.10510250000E-7 -> 0.000714500
+sqtx1188 squareroot 355096.810000 -> 595.900
+sqtx1189 squareroot 14288400.0000 -> 3780.00
+sqtx1190 squareroot 3.36168040000E-15 -> 5.79800E-8
+sqtx1191 squareroot 1.70899560000E-13 -> 4.13400E-7
+sqtx1192 squareroot 0.0000378348010000 -> 0.00615100
+sqtx1193 squareroot 2.00972890000E-13 -> 4.48300E-7
+sqtx1194 squareroot 4.07222659600E-13 -> 6.38140E-7
+sqtx1195 squareroot 131486012100 -> 362610
+sqtx1196 squareroot 818192611600 -> 904540
+sqtx1197 squareroot 9.8558323600E+16 -> 3.13940E+8
+sqtx1198 squareroot 5641.06144900 -> 75.1070
+sqtx1199 squareroot 4.58789475600E+17 -> 6.77340E+8
+sqtx1200 squareroot 3.21386948100E-9 -> 0.0000566910
+sqtx1201 squareroot 3.9441960000E-8 -> 0.000198600
+sqtx1202 squareroot 242723.728900 -> 492.670
+sqtx1203 squareroot 1874.89000000 -> 43.3000
+sqtx1204 squareroot 2.56722595684E+15 -> 5.06678E+7
+sqtx1205 squareroot 3.96437714689E-17 -> 6.29633E-9
+sqtx1206 squareroot 3.80106774784E-17 -> 6.16528E-9
+sqtx1207 squareroot 1.42403588496E-13 -> 3.77364E-7
+sqtx1208 squareroot 4604.84388100 -> 67.8590
+sqtx1209 squareroot 2157100869.16 -> 46444.6
+sqtx1210 squareroot 355288570.81 -> 18849.1
+sqtx1211 squareroot 4.69775901604E-11 -> 0.00000685402
+sqtx1212 squareroot 8.22115770436E+17 -> 9.06706E+8
+sqtx1213 squareroot 7.16443744900E+15 -> 8.46430E+7
+sqtx1214 squareroot 9.48995498896E+15 -> 9.74164E+7
+sqtx1215 squareroot 0.0000419091801129 -> 0.00647373
+sqtx1216 squareroot 5862627996.84 -> 76567.8
+sqtx1217 squareroot 9369537.3409 -> 3060.97
+sqtx1218 squareroot 7.74792529729E+17 -> 8.80223E+8
+sqtx1219 squareroot 1.08626931396E+17 -> 3.29586E+8
+sqtx1220 squareroot 8.89584739684E-7 -> 0.000943178
+sqtx1221 squareroot 4.0266040896E-18 -> 2.00664E-9
+sqtx1222 squareroot 9.27669480336E-7 -> 0.000963156
+sqtx1223 squareroot 0.00225497717956 -> 0.0474866
+
+-- test use of round-half-even for ties
+precision: 1
+sqtx1224 squareroot 225 -> 2E+1 Inexact Rounded
+sqtx1225 squareroot 625 -> 2E+1 Inexact Rounded
+sqtx1226 squareroot 1225 -> 4E+1 Inexact Rounded
+sqtx1227 squareroot 2025 -> 4E+1 Inexact Rounded
+sqtx1228 squareroot 3025 -> 6E+1 Inexact Rounded
+sqtx1229 squareroot 4225 -> 6E+1 Inexact Rounded
+sqtx1230 squareroot 5625 -> 8E+1 Inexact Rounded
+sqtx1231 squareroot 7225 -> 8E+1 Inexact Rounded
+sqtx1232 squareroot 9025 -> 1E+2 Inexact Rounded
+
+precision: 2
+sqtx1233 squareroot 11025 -> 1.0E+2 Inexact Rounded
+sqtx1234 squareroot 13225 -> 1.2E+2 Inexact Rounded
+sqtx1235 squareroot 15625 -> 1.2E+2 Inexact Rounded
+sqtx1236 squareroot 18225 -> 1.4E+2 Inexact Rounded
+sqtx1237 squareroot 21025 -> 1.4E+2 Inexact Rounded
+sqtx1238 squareroot 24025 -> 1.6E+2 Inexact Rounded
+sqtx1239 squareroot 27225 -> 1.6E+2 Inexact Rounded
+sqtx1240 squareroot 30625 -> 1.8E+2 Inexact Rounded
+sqtx1241 squareroot 34225 -> 1.8E+2 Inexact Rounded
+sqtx1242 squareroot 38025 -> 2.0E+2 Inexact Rounded
+sqtx1243 squareroot 42025 -> 2.0E+2 Inexact Rounded
+sqtx1244 squareroot 46225 -> 2.2E+2 Inexact Rounded
+sqtx1245 squareroot 50625 -> 2.2E+2 Inexact Rounded
+sqtx1246 squareroot 55225 -> 2.4E+2 Inexact Rounded
+sqtx1247 squareroot 60025 -> 2.4E+2 Inexact Rounded
+sqtx1248 squareroot 65025 -> 2.6E+2 Inexact Rounded
+sqtx1249 squareroot 70225 -> 2.6E+2 Inexact Rounded
+sqtx1250 squareroot 75625 -> 2.8E+2 Inexact Rounded
+sqtx1251 squareroot 81225 -> 2.8E+2 Inexact Rounded
+sqtx1252 squareroot 87025 -> 3.0E+2 Inexact Rounded
+sqtx1253 squareroot 93025 -> 3.0E+2 Inexact Rounded
+sqtx1254 squareroot 99225 -> 3.2E+2 Inexact Rounded
+sqtx1255 squareroot 105625 -> 3.2E+2 Inexact Rounded
+sqtx1256 squareroot 112225 -> 3.4E+2 Inexact Rounded
+sqtx1257 squareroot 119025 -> 3.4E+2 Inexact Rounded
+sqtx1258 squareroot 126025 -> 3.6E+2 Inexact Rounded
+sqtx1259 squareroot 133225 -> 3.6E+2 Inexact Rounded
+sqtx1260 squareroot 140625 -> 3.8E+2 Inexact Rounded
+sqtx1261 squareroot 148225 -> 3.8E+2 Inexact Rounded
+sqtx1262 squareroot 156025 -> 4.0E+2 Inexact Rounded
+sqtx1263 squareroot 164025 -> 4.0E+2 Inexact Rounded
+sqtx1264 squareroot 172225 -> 4.2E+2 Inexact Rounded
+sqtx1265 squareroot 180625 -> 4.2E+2 Inexact Rounded
+sqtx1266 squareroot 189225 -> 4.4E+2 Inexact Rounded
+sqtx1267 squareroot 198025 -> 4.4E+2 Inexact Rounded
+sqtx1268 squareroot 207025 -> 4.6E+2 Inexact Rounded
+sqtx1269 squareroot 216225 -> 4.6E+2 Inexact Rounded
+sqtx1270 squareroot 225625 -> 4.8E+2 Inexact Rounded
+sqtx1271 squareroot 235225 -> 4.8E+2 Inexact Rounded
+sqtx1272 squareroot 245025 -> 5.0E+2 Inexact Rounded
+sqtx1273 squareroot 255025 -> 5.0E+2 Inexact Rounded
+sqtx1274 squareroot 265225 -> 5.2E+2 Inexact Rounded
+sqtx1275 squareroot 275625 -> 5.2E+2 Inexact Rounded
+sqtx1276 squareroot 286225 -> 5.4E+2 Inexact Rounded
+sqtx1277 squareroot 297025 -> 5.4E+2 Inexact Rounded
+sqtx1278 squareroot 308025 -> 5.6E+2 Inexact Rounded
+sqtx1279 squareroot 319225 -> 5.6E+2 Inexact Rounded
+sqtx1280 squareroot 330625 -> 5.8E+2 Inexact Rounded
+sqtx1281 squareroot 342225 -> 5.8E+2 Inexact Rounded
+sqtx1282 squareroot 354025 -> 6.0E+2 Inexact Rounded
+sqtx1283 squareroot 366025 -> 6.0E+2 Inexact Rounded
+sqtx1284 squareroot 378225 -> 6.2E+2 Inexact Rounded
+sqtx1285 squareroot 390625 -> 6.2E+2 Inexact Rounded
+sqtx1286 squareroot 403225 -> 6.4E+2 Inexact Rounded
+sqtx1287 squareroot 416025 -> 6.4E+2 Inexact Rounded
+sqtx1288 squareroot 429025 -> 6.6E+2 Inexact Rounded
+sqtx1289 squareroot 442225 -> 6.6E+2 Inexact Rounded
+sqtx1290 squareroot 455625 -> 6.8E+2 Inexact Rounded
+sqtx1291 squareroot 469225 -> 6.8E+2 Inexact Rounded
+sqtx1292 squareroot 483025 -> 7.0E+2 Inexact Rounded
+sqtx1293 squareroot 497025 -> 7.0E+2 Inexact Rounded
+sqtx1294 squareroot 511225 -> 7.2E+2 Inexact Rounded
+sqtx1295 squareroot 525625 -> 7.2E+2 Inexact Rounded
+sqtx1296 squareroot 540225 -> 7.4E+2 Inexact Rounded
+sqtx1297 squareroot 555025 -> 7.4E+2 Inexact Rounded
+sqtx1298 squareroot 570025 -> 7.6E+2 Inexact Rounded
+sqtx1299 squareroot 585225 -> 7.6E+2 Inexact Rounded
+sqtx1300 squareroot 600625 -> 7.8E+2 Inexact Rounded
+sqtx1301 squareroot 616225 -> 7.8E+2 Inexact Rounded
+sqtx1302 squareroot 632025 -> 8.0E+2 Inexact Rounded
+sqtx1303 squareroot 648025 -> 8.0E+2 Inexact Rounded
+sqtx1304 squareroot 664225 -> 8.2E+2 Inexact Rounded
+sqtx1305 squareroot 680625 -> 8.2E+2 Inexact Rounded
+sqtx1306 squareroot 697225 -> 8.4E+2 Inexact Rounded
+sqtx1307 squareroot 714025 -> 8.4E+2 Inexact Rounded
+sqtx1308 squareroot 731025 -> 8.6E+2 Inexact Rounded
+sqtx1309 squareroot 748225 -> 8.6E+2 Inexact Rounded
+sqtx1310 squareroot 765625 -> 8.8E+2 Inexact Rounded
+sqtx1311 squareroot 783225 -> 8.8E+2 Inexact Rounded
+sqtx1312 squareroot 801025 -> 9.0E+2 Inexact Rounded
+sqtx1313 squareroot 819025 -> 9.0E+2 Inexact Rounded
+sqtx1314 squareroot 837225 -> 9.2E+2 Inexact Rounded
+sqtx1315 squareroot 855625 -> 9.2E+2 Inexact Rounded
+sqtx1316 squareroot 874225 -> 9.4E+2 Inexact Rounded
+sqtx1317 squareroot 893025 -> 9.4E+2 Inexact Rounded
+sqtx1318 squareroot 912025 -> 9.6E+2 Inexact Rounded
+sqtx1319 squareroot 931225 -> 9.6E+2 Inexact Rounded
+sqtx1320 squareroot 950625 -> 9.8E+2 Inexact Rounded
+sqtx1321 squareroot 970225 -> 9.8E+2 Inexact Rounded
+sqtx1322 squareroot 990025 -> 1.0E+3 Inexact Rounded
+
+precision: 6
+sqtx1323 squareroot 88975734963025 -> 9.43270E+6 Inexact Rounded
+sqtx1324 squareroot 71085555000625 -> 8.43122E+6 Inexact Rounded
+sqtx1325 squareroot 39994304.051025 -> 6324.10 Inexact Rounded
+sqtx1326 squareroot 0.000007327172265625 -> 0.00270688 Inexact Rounded
+sqtx1327 squareroot 1.0258600439025E-13 -> 3.20290E-7 Inexact Rounded
+sqtx1328 squareroot 0.0034580574275625 -> 0.0588052 Inexact Rounded
+sqtx1329 squareroot 7.6842317700625E-7 -> 0.000876598 Inexact Rounded
+sqtx1330 squareroot 1263834495.2025 -> 35550.4 Inexact Rounded
+sqtx1331 squareroot 433970666460.25 -> 658764 Inexact Rounded
+sqtx1332 squareroot 4.5879286230625E-7 -> 0.000677342 Inexact Rounded
+sqtx1333 squareroot 0.0029305603306225 -> 0.0541346 Inexact Rounded
+sqtx1334 squareroot 70218282.733225 -> 8379.64 Inexact Rounded
+sqtx1335 squareroot 11942519.082025 -> 3455.80 Inexact Rounded
+sqtx1336 squareroot 0.0021230668905625 -> 0.0460768 Inexact Rounded
+sqtx1337 squareroot 0.90081833411025 -> 0.949114 Inexact Rounded
+sqtx1338 squareroot 5.5104120936225E-17 -> 7.42322E-9 Inexact Rounded
+sqtx1339 squareroot 0.10530446854225 -> 0.324506 Inexact Rounded
+sqtx1340 squareroot 8.706069866025E-14 -> 2.95060E-7 Inexact Rounded
+sqtx1341 squareroot 23838.58800625 -> 154.398 Inexact Rounded
+sqtx1342 squareroot 0.0013426911275625 -> 0.0366428 Inexact Rounded
+
+-- test use of round-half-even in underflow situations
+
+-- precisions 2; all cases where result is both subnormal and a tie
+precision: 2
+sqtx1343 squareroot 2.5E-21 -> 0E-10 Underflow Subnormal Inexact Rounded Clamped
+sqtx1344 squareroot 2.25E-20 -> 2E-10 Underflow Subnormal Inexact Rounded
+sqtx1345 squareroot 6.25E-20 -> 2E-10 Underflow Subnormal Inexact Rounded
+sqtx1346 squareroot 1.225E-19 -> 4E-10 Underflow Subnormal Inexact Rounded
+sqtx1347 squareroot 2.025E-19 -> 4E-10 Underflow Subnormal Inexact Rounded
+sqtx1348 squareroot 3.025E-19 -> 6E-10 Underflow Subnormal Inexact Rounded
+sqtx1349 squareroot 4.225E-19 -> 6E-10 Underflow Subnormal Inexact Rounded
+sqtx1350 squareroot 5.625E-19 -> 8E-10 Underflow Subnormal Inexact Rounded
+sqtx1351 squareroot 7.225E-19 -> 8E-10 Underflow Subnormal Inexact Rounded
+sqtx1352 squareroot 9.025E-19 -> 1.0E-9 Underflow Subnormal Inexact Rounded
+
+-- precision 3, input precision <= 5
+precision: 3
+sqtx1353 squareroot 2.5E-23 -> 0E-11 Underflow Subnormal Inexact Rounded Clamped
+sqtx1354 squareroot 2.25E-22 -> 2E-11 Underflow Subnormal Inexact Rounded
+sqtx1355 squareroot 6.25E-22 -> 2E-11 Underflow Subnormal Inexact Rounded
+sqtx1356 squareroot 1.225E-21 -> 4E-11 Underflow Subnormal Inexact Rounded
+sqtx1357 squareroot 2.025E-21 -> 4E-11 Underflow Subnormal Inexact Rounded
+sqtx1358 squareroot 3.025E-21 -> 6E-11 Underflow Subnormal Inexact Rounded
+sqtx1359 squareroot 4.225E-21 -> 6E-11 Underflow Subnormal Inexact Rounded
+sqtx1360 squareroot 5.625E-21 -> 8E-11 Underflow Subnormal Inexact Rounded
+sqtx1361 squareroot 7.225E-21 -> 8E-11 Underflow Subnormal Inexact Rounded
+sqtx1362 squareroot 9.025E-21 -> 1.0E-10 Underflow Subnormal Inexact Rounded
+sqtx1363 squareroot 1.1025E-20 -> 1.0E-10 Underflow Subnormal Inexact Rounded
+sqtx1364 squareroot 1.3225E-20 -> 1.2E-10 Underflow Subnormal Inexact Rounded
+sqtx1365 squareroot 1.5625E-20 -> 1.2E-10 Underflow Subnormal Inexact Rounded
+sqtx1366 squareroot 1.8225E-20 -> 1.4E-10 Underflow Subnormal Inexact Rounded
+sqtx1367 squareroot 2.1025E-20 -> 1.4E-10 Underflow Subnormal Inexact Rounded
+sqtx1368 squareroot 2.4025E-20 -> 1.6E-10 Underflow Subnormal Inexact Rounded
+sqtx1369 squareroot 2.7225E-20 -> 1.6E-10 Underflow Subnormal Inexact Rounded
+sqtx1370 squareroot 3.0625E-20 -> 1.8E-10 Underflow Subnormal Inexact Rounded
+sqtx1371 squareroot 3.4225E-20 -> 1.8E-10 Underflow Subnormal Inexact Rounded
+sqtx1372 squareroot 3.8025E-20 -> 2.0E-10 Underflow Subnormal Inexact Rounded
+sqtx1373 squareroot 4.2025E-20 -> 2.0E-10 Underflow Subnormal Inexact Rounded
+sqtx1374 squareroot 4.6225E-20 -> 2.2E-10 Underflow Subnormal Inexact Rounded
+sqtx1375 squareroot 5.0625E-20 -> 2.2E-10 Underflow Subnormal Inexact Rounded
+sqtx1376 squareroot 5.5225E-20 -> 2.4E-10 Underflow Subnormal Inexact Rounded
+sqtx1377 squareroot 6.0025E-20 -> 2.4E-10 Underflow Subnormal Inexact Rounded
+sqtx1378 squareroot 6.5025E-20 -> 2.6E-10 Underflow Subnormal Inexact Rounded
+sqtx1379 squareroot 7.0225E-20 -> 2.6E-10 Underflow Subnormal Inexact Rounded
+sqtx1380 squareroot 7.5625E-20 -> 2.8E-10 Underflow Subnormal Inexact Rounded
+sqtx1381 squareroot 8.1225E-20 -> 2.8E-10 Underflow Subnormal Inexact Rounded
+sqtx1382 squareroot 8.7025E-20 -> 3.0E-10 Underflow Subnormal Inexact Rounded
+sqtx1383 squareroot 9.3025E-20 -> 3.0E-10 Underflow Subnormal Inexact Rounded
+sqtx1384 squareroot 9.9225E-20 -> 3.2E-10 Underflow Subnormal Inexact Rounded
+
+--precision 4, input precision <= 4
+precision: 4
+sqtx1385 squareroot 2.5E-25 -> 0E-12 Underflow Subnormal Inexact Rounded Clamped
+sqtx1386 squareroot 2.25E-24 -> 2E-12 Underflow Subnormal Inexact Rounded
+sqtx1387 squareroot 6.25E-24 -> 2E-12 Underflow Subnormal Inexact Rounded
+sqtx1388 squareroot 1.225E-23 -> 4E-12 Underflow Subnormal Inexact Rounded
+sqtx1389 squareroot 2.025E-23 -> 4E-12 Underflow Subnormal Inexact Rounded
+sqtx1390 squareroot 3.025E-23 -> 6E-12 Underflow Subnormal Inexact Rounded
+sqtx1391 squareroot 4.225E-23 -> 6E-12 Underflow Subnormal Inexact Rounded
+sqtx1392 squareroot 5.625E-23 -> 8E-12 Underflow Subnormal Inexact Rounded
+sqtx1393 squareroot 7.225E-23 -> 8E-12 Underflow Subnormal Inexact Rounded
+sqtx1394 squareroot 9.025E-23 -> 1.0E-11 Underflow Subnormal Inexact Rounded
+
+--precision 5, input precision <= 5
+precision: 5
+sqtx1395 squareroot 2.5E-27 -> 0E-13 Underflow Subnormal Inexact Rounded Clamped
+sqtx1396 squareroot 2.25E-26 -> 2E-13 Underflow Subnormal Inexact Rounded
+sqtx1397 squareroot 6.25E-26 -> 2E-13 Underflow Subnormal Inexact Rounded
+sqtx1398 squareroot 1.225E-25 -> 4E-13 Underflow Subnormal Inexact Rounded
+sqtx1399 squareroot 2.025E-25 -> 4E-13 Underflow Subnormal Inexact Rounded
+sqtx1400 squareroot 3.025E-25 -> 6E-13 Underflow Subnormal Inexact Rounded
+sqtx1401 squareroot 4.225E-25 -> 6E-13 Underflow Subnormal Inexact Rounded
+sqtx1402 squareroot 5.625E-25 -> 8E-13 Underflow Subnormal Inexact Rounded
+sqtx1403 squareroot 7.225E-25 -> 8E-13 Underflow Subnormal Inexact Rounded
+sqtx1404 squareroot 9.025E-25 -> 1.0E-12 Underflow Subnormal Inexact Rounded
+sqtx1405 squareroot 1.1025E-24 -> 1.0E-12 Underflow Subnormal Inexact Rounded
+sqtx1406 squareroot 1.3225E-24 -> 1.2E-12 Underflow Subnormal Inexact Rounded
+sqtx1407 squareroot 1.5625E-24 -> 1.2E-12 Underflow Subnormal Inexact Rounded
+sqtx1408 squareroot 1.8225E-24 -> 1.4E-12 Underflow Subnormal Inexact Rounded
+sqtx1409 squareroot 2.1025E-24 -> 1.4E-12 Underflow Subnormal Inexact Rounded
+sqtx1410 squareroot 2.4025E-24 -> 1.6E-12 Underflow Subnormal Inexact Rounded
+sqtx1411 squareroot 2.7225E-24 -> 1.6E-12 Underflow Subnormal Inexact Rounded
+sqtx1412 squareroot 3.0625E-24 -> 1.8E-12 Underflow Subnormal Inexact Rounded
+sqtx1413 squareroot 3.4225E-24 -> 1.8E-12 Underflow Subnormal Inexact Rounded
+sqtx1414 squareroot 3.8025E-24 -> 2.0E-12 Underflow Subnormal Inexact Rounded
+sqtx1415 squareroot 4.2025E-24 -> 2.0E-12 Underflow Subnormal Inexact Rounded
+sqtx1416 squareroot 4.6225E-24 -> 2.2E-12 Underflow Subnormal Inexact Rounded
+sqtx1417 squareroot 5.0625E-24 -> 2.2E-12 Underflow Subnormal Inexact Rounded
+sqtx1418 squareroot 5.5225E-24 -> 2.4E-12 Underflow Subnormal Inexact Rounded
+sqtx1419 squareroot 6.0025E-24 -> 2.4E-12 Underflow Subnormal Inexact Rounded
+sqtx1420 squareroot 6.5025E-24 -> 2.6E-12 Underflow Subnormal Inexact Rounded
+sqtx1421 squareroot 7.0225E-24 -> 2.6E-12 Underflow Subnormal Inexact Rounded
+sqtx1422 squareroot 7.5625E-24 -> 2.8E-12 Underflow Subnormal Inexact Rounded
+sqtx1423 squareroot 8.1225E-24 -> 2.8E-12 Underflow Subnormal Inexact Rounded
+sqtx1424 squareroot 8.7025E-24 -> 3.0E-12 Underflow Subnormal Inexact Rounded
+sqtx1425 squareroot 9.3025E-24 -> 3.0E-12 Underflow Subnormal Inexact Rounded
+sqtx1426 squareroot 9.9225E-24 -> 3.2E-12 Underflow Subnormal Inexact Rounded
+
+-- a random selection of values that Python2.5.1 rounds incorrectly
+precision: 1
+sqtx1427 squareroot 227 -> 2E+1 Inexact Rounded
+sqtx1428 squareroot 625 -> 2E+1 Inexact Rounded
+sqtx1429 squareroot 1215 -> 3E+1 Inexact Rounded
+sqtx1430 squareroot 2008 -> 4E+1 Inexact Rounded
+sqtx1431 squareroot 2020 -> 4E+1 Inexact Rounded
+sqtx1432 squareroot 2026 -> 5E+1 Inexact Rounded
+sqtx1433 squareroot 2027 -> 5E+1 Inexact Rounded
+sqtx1434 squareroot 2065 -> 5E+1 Inexact Rounded
+sqtx1435 squareroot 2075 -> 5E+1 Inexact Rounded
+sqtx1436 squareroot 2088 -> 5E+1 Inexact Rounded
+sqtx1437 squareroot 3049 -> 6E+1 Inexact Rounded
+sqtx1438 squareroot 3057 -> 6E+1 Inexact Rounded
+sqtx1439 squareroot 3061 -> 6E+1 Inexact Rounded
+sqtx1440 squareroot 3092 -> 6E+1 Inexact Rounded
+sqtx1441 squareroot 4222 -> 6E+1 Inexact Rounded
+sqtx1442 squareroot 5676 -> 8E+1 Inexact Rounded
+sqtx1443 squareroot 5686 -> 8E+1 Inexact Rounded
+sqtx1444 squareroot 7215 -> 8E+1 Inexact Rounded
+sqtx1445 squareroot 9086 -> 1E+2 Inexact Rounded
+sqtx1446 squareroot 9095 -> 1E+2 Inexact Rounded
+
+precision: 2
+sqtx1447 squareroot 1266 -> 36 Inexact Rounded
+sqtx1448 squareroot 2552 -> 51 Inexact Rounded
+sqtx1449 squareroot 5554 -> 75 Inexact Rounded
+sqtx1450 squareroot 7832 -> 88 Inexact Rounded
+sqtx1451 squareroot 13201 -> 1.1E+2 Inexact Rounded
+sqtx1452 squareroot 15695 -> 1.3E+2 Inexact Rounded
+sqtx1453 squareroot 18272 -> 1.4E+2 Inexact Rounded
+sqtx1454 squareroot 21026 -> 1.5E+2 Inexact Rounded
+sqtx1455 squareroot 24069 -> 1.6E+2 Inexact Rounded
+sqtx1456 squareroot 34277 -> 1.9E+2 Inexact Rounded
+sqtx1457 squareroot 46233 -> 2.2E+2 Inexact Rounded
+sqtx1458 squareroot 46251 -> 2.2E+2 Inexact Rounded
+sqtx1459 squareroot 46276 -> 2.2E+2 Inexact Rounded
+sqtx1460 squareroot 70214 -> 2.6E+2 Inexact Rounded
+sqtx1461 squareroot 81249 -> 2.9E+2 Inexact Rounded
+sqtx1462 squareroot 81266 -> 2.9E+2 Inexact Rounded
+sqtx1463 squareroot 93065 -> 3.1E+2 Inexact Rounded
+sqtx1464 squareroot 93083 -> 3.1E+2 Inexact Rounded
+sqtx1465 squareroot 99230 -> 3.2E+2 Inexact Rounded
+sqtx1466 squareroot 99271 -> 3.2E+2 Inexact Rounded
+
+precision: 3
+sqtx1467 squareroot 11349 -> 107 Inexact Rounded
+sqtx1468 squareroot 26738 -> 164 Inexact Rounded
+sqtx1469 squareroot 31508 -> 178 Inexact Rounded
+sqtx1470 squareroot 44734 -> 212 Inexact Rounded
+sqtx1471 squareroot 44738 -> 212 Inexact Rounded
+sqtx1472 squareroot 51307 -> 227 Inexact Rounded
+sqtx1473 squareroot 62259 -> 250 Inexact Rounded
+sqtx1474 squareroot 75901 -> 276 Inexact Rounded
+sqtx1475 squareroot 76457 -> 277 Inexact Rounded
+sqtx1476 squareroot 180287 -> 425 Inexact Rounded
+sqtx1477 squareroot 202053 -> 450 Inexact Rounded
+sqtx1478 squareroot 235747 -> 486 Inexact Rounded
+sqtx1479 squareroot 256537 -> 506 Inexact Rounded
+sqtx1480 squareroot 299772 -> 548 Inexact Rounded
+sqtx1481 squareroot 415337 -> 644 Inexact Rounded
+sqtx1482 squareroot 617067 -> 786 Inexact Rounded
+sqtx1483 squareroot 628022 -> 792 Inexact Rounded
+sqtx1484 squareroot 645629 -> 804 Inexact Rounded
+sqtx1485 squareroot 785836 -> 886 Inexact Rounded
+sqtx1486 squareroot 993066 -> 997 Inexact Rounded
+
+precision: 6
+sqtx1487 squareroot 14917781 -> 3862.35 Inexact Rounded
+sqtx1488 squareroot 17237238 -> 4151.78 Inexact Rounded
+sqtx1489 squareroot 18054463 -> 4249.05 Inexact Rounded
+sqtx1490 squareroot 19990694 -> 4471.10 Inexact Rounded
+sqtx1491 squareroot 29061855 -> 5390.90 Inexact Rounded
+sqtx1492 squareroot 49166257 -> 7011.87 Inexact Rounded
+sqtx1493 squareroot 53082086 -> 7285.75 Inexact Rounded
+sqtx1494 squareroot 56787909 -> 7535.78 Inexact Rounded
+sqtx1495 squareroot 81140019 -> 9007.78 Inexact Rounded
+sqtx1496 squareroot 87977554 -> 9379.64 Inexact Rounded
+sqtx1497 squareroot 93624683 -> 9675.98 Inexact Rounded
+sqtx1498 squareroot 98732747 -> 9936.44 Inexact Rounded
+sqtx1499 squareroot 99222813 -> 9961.06 Inexact Rounded
+sqtx1500 squareroot 143883626 -> 11995.2 Inexact Rounded
+sqtx1501 squareroot 180433301 -> 13432.5 Inexact Rounded
+sqtx1502 squareroot 227034020 -> 15067.6 Inexact Rounded
+sqtx1503 squareroot 283253992 -> 16830.2 Inexact Rounded
+sqtx1504 squareroot 617047954 -> 24840.4 Inexact Rounded
+sqtx1505 squareroot 736870094 -> 27145.4 Inexact Rounded
+sqtx1506 squareroot 897322915 -> 29955.3 Inexact Rounded
+
+-- results close to minimum normal
+precision: 1
+sqtx1507 squareroot 1E-20 -> 0E-9 Underflow Subnormal Inexact Rounded Clamped
+sqtx1508 squareroot 1E-19 -> 0E-9 Underflow Subnormal Inexact Rounded Clamped
+sqtx1509 squareroot 1E-18 -> 1E-9
+
+precision: 2
+sqtx1510 squareroot 8.1E-19 -> 9E-10 Subnormal
+sqtx1511 squareroot 8.10E-19 -> 9E-10 Subnormal Rounded
+sqtx1512 squareroot 9.0E-19 -> 9E-10 Underflow Subnormal Inexact Rounded
+sqtx1513 squareroot 9.02E-19 -> 9E-10 Underflow Subnormal Inexact Rounded
+sqtx1514 squareroot 9.03E-19 -> 1.0E-9 Underflow Subnormal Inexact Rounded
+sqtx1515 squareroot 9.1E-19 -> 1.0E-9 Underflow Subnormal Inexact Rounded
+sqtx1516 squareroot 9.9E-19 -> 1.0E-9 Underflow Subnormal Inexact Rounded
+sqtx1517 squareroot 9.91E-19 -> 1.0E-9 Underflow Subnormal Inexact Rounded
+sqtx1518 squareroot 9.92E-19 -> 1.0E-9 Underflow Subnormal Inexact Rounded
+sqtx1519 squareroot 9.95E-19 -> 1.0E-9 Underflow Subnormal Inexact Rounded
+sqtx1520 squareroot 9.98E-19 -> 1.0E-9 Underflow Subnormal Inexact Rounded
+sqtx1521 squareroot 9.99E-19 -> 1.0E-9 Underflow Subnormal Inexact Rounded
+sqtx1522 squareroot 1E-18 -> 1E-9
+sqtx1523 squareroot 1.0E-18 -> 1.0E-9
+sqtx1524 squareroot 1.00E-18 -> 1.0E-9
+sqtx1525 squareroot 1.000E-18 -> 1.0E-9 Rounded
+sqtx1526 squareroot 1.0000E-18 -> 1.0E-9 Rounded
+sqtx1527 squareroot 1.01E-18 -> 1.0E-9 Inexact Rounded
+sqtx1528 squareroot 1.02E-18 -> 1.0E-9 Inexact Rounded
+sqtx1529 squareroot 1.1E-18 -> 1.0E-9 Inexact Rounded
+
+precision: 3
+sqtx1530 squareroot 8.1E-19 -> 9E-10 Subnormal
+sqtx1531 squareroot 8.10E-19 -> 9.0E-10 Subnormal
+sqtx1532 squareroot 8.100E-19 -> 9.0E-10 Subnormal
+sqtx1533 squareroot 8.1000E-19 -> 9.0E-10 Subnormal Rounded
+sqtx1534 squareroot 9.9E-19 -> 9.9E-10 Underflow Subnormal Inexact Rounded
+sqtx1535 squareroot 9.91E-19 -> 1.00E-9 Underflow Subnormal Inexact Rounded
+sqtx1536 squareroot 9.99E-19 -> 1.00E-9 Underflow Subnormal Inexact Rounded
+sqtx1537 squareroot 9.998E-19 -> 1.00E-9 Underflow Subnormal Inexact Rounded
+sqtx1538 squareroot 1E-18 -> 1E-9
+sqtx1539 squareroot 1.0E-18 -> 1.0E-9
+sqtx1540 squareroot 1.00E-18 -> 1.0E-9
+sqtx1541 squareroot 1.000E-18 -> 1.00E-9
+sqtx1542 squareroot 1.0000E-18 -> 1.00E-9
+sqtx1543 squareroot 1.00000E-18 -> 1.00E-9 Rounded
+sqtx1544 squareroot 1.000000E-18 -> 1.00E-9 Rounded
+sqtx1545 squareroot 1.01E-18 -> 1.00E-9 Inexact Rounded
+sqtx1546 squareroot 1.02E-18 -> 1.01E-9 Inexact Rounded
+
+-- result exactly representable with precision p, but not necessarily
+-- exactly representable as a subnormal; check the correct flags are raised
+precision: 2
+sqtx1547 squareroot 1.21E-20 -> 1E-10 Underflow Subnormal Inexact Rounded
+sqtx1548 squareroot 1.44E-20 -> 1E-10 Underflow Subnormal Inexact Rounded
+sqtx1549 squareroot 9.61E-20 -> 3E-10 Underflow Subnormal Inexact Rounded
+sqtx1550 squareroot 8.836E-19 -> 9E-10 Underflow Subnormal Inexact Rounded
+sqtx1551 squareroot 9.216E-19 -> 1.0E-9 Underflow Subnormal Inexact Rounded
+
+precision: 3
+sqtx1552 squareroot 1.21E-22 -> 1E-11 Underflow Subnormal Inexact Rounded
+sqtx1553 squareroot 1.21E-20 -> 1.1E-10 Subnormal
+sqtx1554 squareroot 1.96E-22 -> 1E-11 Underflow Subnormal Inexact Rounded
+sqtx1555 squareroot 1.96E-20 -> 1.4E-10 Subnormal
+sqtx1556 squareroot 2.56E-22 -> 2E-11 Underflow Subnormal Inexact Rounded
+sqtx1557 squareroot 4.00E-22 -> 2E-11 Subnormal Rounded
+sqtx1558 squareroot 7.84E-22 -> 3E-11 Underflow Subnormal Inexact Rounded
+sqtx1559 squareroot 9.801E-21 -> 1.0E-10 Underflow Subnormal Inexact Rounded
+sqtx1560 squareroot 9.801E-19 -> 9.9E-10 Subnormal
+sqtx1561 squareroot 1.0201E-20 -> 1.0E-10 Underflow Subnormal Inexact Rounded
+sqtx1562 squareroot 1.1025E-20 -> 1.0E-10 Underflow Subnormal Inexact Rounded
+sqtx1563 squareroot 1.1236E-20 -> 1.1E-10 Underflow Subnormal Inexact Rounded
+sqtx1564 squareroot 1.2996E-20 -> 1.1E-10 Underflow Subnormal Inexact Rounded
+sqtx1565 squareroot 1.3225E-20 -> 1.2E-10 Underflow Subnormal Inexact Rounded
+
+-- A selection of subnormal results prone to double rounding errors
+precision: 2
+sqtx1566 squareroot 2.3E-21 -> 0E-10 Underflow Subnormal Inexact Rounded Clamped
+sqtx1567 squareroot 2.4E-21 -> 0E-10 Underflow Subnormal Inexact Rounded Clamped
+sqtx1568 squareroot 2.5E-21 -> 0E-10 Underflow Subnormal Inexact Rounded Clamped
+sqtx1569 squareroot 2.6E-21 -> 1E-10 Underflow Subnormal Inexact Rounded
+sqtx1570 squareroot 2.7E-21 -> 1E-10 Underflow Subnormal Inexact Rounded
+sqtx1571 squareroot 2.8E-21 -> 1E-10 Underflow Subnormal Inexact Rounded
+sqtx1572 squareroot 2.2E-20 -> 1E-10 Underflow Subnormal Inexact Rounded
+sqtx1573 squareroot 2.3E-20 -> 2E-10 Underflow Subnormal Inexact Rounded
+sqtx1574 squareroot 2.4E-20 -> 2E-10 Underflow Subnormal Inexact Rounded
+sqtx1575 squareroot 6.2E-20 -> 2E-10 Underflow Subnormal Inexact Rounded
+sqtx1576 squareroot 6.3E-20 -> 3E-10 Underflow Subnormal Inexact Rounded
+sqtx1577 squareroot 6.4E-20 -> 3E-10 Underflow Subnormal Inexact Rounded
+sqtx1578 squareroot 6.5E-20 -> 3E-10 Underflow Subnormal Inexact Rounded
+sqtx1579 squareroot 1.2E-19 -> 3E-10 Underflow Subnormal Inexact Rounded
+sqtx1580 squareroot 2.0E-19 -> 4E-10 Underflow Subnormal Inexact Rounded
+sqtx1581 squareroot 4.2E-19 -> 6E-10 Underflow Subnormal Inexact Rounded
+sqtx1582 squareroot 5.6E-19 -> 7E-10 Underflow Subnormal Inexact Rounded
+sqtx1583 squareroot 5.7E-19 -> 8E-10 Underflow Subnormal Inexact Rounded
+sqtx1584 squareroot 9.0E-19 -> 9E-10 Underflow Subnormal Inexact Rounded
+sqtx1585 squareroot 9.1E-19 -> 1.0E-9 Underflow Subnormal Inexact Rounded
+precision: 3
+sqtx1586 squareroot 2.6E-23 -> 1E-11 Underflow Subnormal Inexact Rounded
+sqtx1587 squareroot 2.22E-22 -> 1E-11 Underflow Subnormal Inexact Rounded
+sqtx1588 squareroot 6.07E-22 -> 2E-11 Underflow Subnormal Inexact Rounded
+sqtx1589 squareroot 6.25E-22 -> 2E-11 Underflow Subnormal Inexact Rounded
+sqtx1590 squareroot 6.45E-22 -> 3E-11 Underflow Subnormal Inexact Rounded
+sqtx1591 squareroot 6.50E-22 -> 3E-11 Underflow Subnormal Inexact Rounded
+sqtx1592 squareroot 1.22E-21 -> 3E-11 Underflow Subnormal Inexact Rounded
+sqtx1593 squareroot 1.24E-21 -> 4E-11 Underflow Subnormal Inexact Rounded
+sqtx1594 squareroot 4.18E-21 -> 6E-11 Underflow Subnormal Inexact Rounded
+sqtx1595 squareroot 7.19E-21 -> 8E-11 Underflow Subnormal Inexact Rounded
+sqtx1596 squareroot 8.94E-21 -> 9E-11 Underflow Subnormal Inexact Rounded
+sqtx1597 squareroot 1.81E-20 -> 1.3E-10 Underflow Subnormal Inexact Rounded
+sqtx1598 squareroot 4.64E-20 -> 2.2E-10 Underflow Subnormal Inexact Rounded
+sqtx1599 squareroot 5.06E-20 -> 2.2E-10 Underflow Subnormal Inexact Rounded
+sqtx1600 squareroot 5.08E-20 -> 2.3E-10 Underflow Subnormal Inexact Rounded
+sqtx1601 squareroot 7.00E-20 -> 2.6E-10 Underflow Subnormal Inexact Rounded
+sqtx1602 squareroot 1.81E-19 -> 4.3E-10 Underflow Subnormal Inexact Rounded
+sqtx1603 squareroot 6.64E-19 -> 8.1E-10 Underflow Subnormal Inexact Rounded
+sqtx1604 squareroot 7.48E-19 -> 8.6E-10 Underflow Subnormal Inexact Rounded
+sqtx1605 squareroot 9.91E-19 -> 1.00E-9 Underflow Subnormal Inexact Rounded
+precision: 4
+sqtx1606 squareroot 6.24E-24 -> 2E-12 Underflow Subnormal Inexact Rounded
+sqtx1607 squareroot 7.162E-23 -> 8E-12 Underflow Subnormal Inexact Rounded
+sqtx1608 squareroot 7.243E-23 -> 9E-12 Underflow Subnormal Inexact Rounded
+sqtx1609 squareroot 8.961E-23 -> 9E-12 Underflow Subnormal Inexact Rounded
+sqtx1610 squareroot 9.029E-23 -> 1.0E-11 Underflow Subnormal Inexact Rounded
+sqtx1611 squareroot 4.624E-22 -> 2.2E-11 Underflow Subnormal Inexact Rounded
+sqtx1612 squareroot 5.980E-22 -> 2.4E-11 Underflow Subnormal Inexact Rounded
+sqtx1613 squareroot 6.507E-22 -> 2.6E-11 Underflow Subnormal Inexact Rounded
+sqtx1614 squareroot 1.483E-21 -> 3.9E-11 Underflow Subnormal Inexact Rounded
+sqtx1615 squareroot 3.903E-21 -> 6.2E-11 Underflow Subnormal Inexact Rounded
+sqtx1616 squareroot 8.733E-21 -> 9.3E-11 Underflow Subnormal Inexact Rounded
+sqtx1617 squareroot 1.781E-20 -> 1.33E-10 Underflow Subnormal Inexact Rounded
+sqtx1618 squareroot 6.426E-20 -> 2.53E-10 Underflow Subnormal Inexact Rounded
+sqtx1619 squareroot 7.102E-20 -> 2.66E-10 Underflow Subnormal Inexact Rounded
+sqtx1620 squareroot 7.535E-20 -> 2.74E-10 Underflow Subnormal Inexact Rounded
+sqtx1621 squareroot 9.892E-20 -> 3.15E-10 Underflow Subnormal Inexact Rounded
+sqtx1622 squareroot 1.612E-19 -> 4.01E-10 Underflow Subnormal Inexact Rounded
+sqtx1623 squareroot 1.726E-19 -> 4.15E-10 Underflow Subnormal Inexact Rounded
+sqtx1624 squareroot 1.853E-19 -> 4.30E-10 Underflow Subnormal Inexact Rounded
+sqtx1625 squareroot 4.245E-19 -> 6.52E-10 Underflow Subnormal Inexact Rounded
+
+-- clamping and overflow for large exponents
+precision: 1
+sqtx1626 squareroot 1E+18 -> 1E+9
+sqtx1627 squareroot 1E+19 -> 3E+9 Inexact Rounded
+sqtx1628 squareroot 9E+19 -> 9E+9 Inexact Rounded
+sqtx1629 squareroot 9.1E+19 -> Infinity Overflow Inexact Rounded
+sqtx1630 squareroot 1E+20 -> Infinity Overflow Inexact Rounded
+
+precision: 2
+sqtx1631 squareroot 1E+18 -> 1E+9
+sqtx1632 squareroot 1.0E+18 -> 1.0E+9
+sqtx1633 squareroot 1.00E+18 -> 1.0E+9
+sqtx1634 squareroot 1.000E+18 -> 1.0E+9 Rounded
+sqtx1635 squareroot 1E+20 -> Infinity Overflow Inexact Rounded
+clamp: 1
+sqtx1636 squareroot 1E+18 -> 1.0E+9 Clamped
+sqtx1637 squareroot 1.0E+18 -> 1.0E+9
+sqtx1638 squareroot 1E+20 -> Infinity Overflow Inexact Rounded
+clamp: 0
+
+precision: 6
+sqtx1639 squareroot 1E+18 -> 1E+9
+sqtx1640 squareroot 1.0000000000E+18 -> 1.00000E+9
+sqtx1641 squareroot 1.00000000000E+18 -> 1.00000E+9 Rounded
+sqtx1642 squareroot 1E+20 -> Infinity Overflow Inexact Rounded
+clamp: 1
+sqtx1643 squareroot 1E+8 -> 1E+4
+sqtx1644 squareroot 1E+10 -> 1.0E+5 Clamped
+sqtx1645 squareroot 1.0E+10 -> 1.0E+5
+sqtx1646 squareroot 1E+12 -> 1.00E+6 Clamped
+sqtx1647 squareroot 1.0E+12 -> 1.00E+6 Clamped
+sqtx1648 squareroot 1.00E+12 -> 1.00E+6 Clamped
+sqtx1649 squareroot 1.000E+12 -> 1.00E+6
+sqtx1650 squareroot 1E+18 -> 1.00000E+9 Clamped
+sqtx1651 squareroot 1.00000000E+18 -> 1.00000E+9 Clamped
+sqtx1652 squareroot 1.000000000E+18 -> 1.00000E+9
+sqtx1653 squareroot 1E+20 -> Infinity Overflow Inexact Rounded
+clamp: 0
+
+-- The following example causes a TypeError in Python 2.5.1
+precision: 3
+maxexponent: 9
+minexponent: -9
+sqtx1654 squareroot 10000000000 -> 1.00E+5 Rounded
+
+
+-- Some additional edge cases
+precision: 2
+sqtx2000 squareroot 9980.01 -> 1.0E+2 Inexact Rounded
+precision: 3
+sqtx2001 squareroot 9980.01 -> 99.9
+precision: 4
+sqtx2002 squareroot 9980.01 -> 99.9
+
+-- Exact from over-precise
+precision: 4
+sqtx2003 squareroot 11025 -> 105
+precision: 3
+sqtx2004 squareroot 11025 -> 105
+precision: 2
+sqtx2005 squareroot 11025 -> 1.0E+2 Inexact Rounded
+precision: 1
+sqtx2006 squareroot 11025 -> 1E+2 Inexact Rounded
+
+-- Out-of-bounds zeros
+precision: 4
+sqtx2010 squareroot 0E-9 -> 0.00000
+sqtx2011 squareroot 0E-10 -> 0.00000
+sqtx2012 squareroot 0E-11 -> 0.000000
+sqtx2013 squareroot 0E-12 -> 0.000000
+sqtx2014 squareroot 0E-13 -> 0E-7
+sqtx2015 squareroot 0E-14 -> 0E-7
+sqtx2020 squareroot 0E-17 -> 0E-9
+sqtx2021 squareroot 0E-20 -> 0E-10
+sqtx2022 squareroot 0E-22 -> 0E-11
+sqtx2023 squareroot 0E-24 -> 0E-12
+sqtx2024 squareroot 0E-25 -> 0E-12 Clamped
+sqtx2025 squareroot 0E-26 -> 0E-12 Clamped
+sqtx2026 squareroot 0E-27 -> 0E-12 Clamped
+sqtx2027 squareroot 0E-28 -> 0E-12 Clamped
+
+sqtx2030 squareroot 0E+8 -> 0E+4
+sqtx2031 squareroot 0E+10 -> 0E+5
+sqtx2032 squareroot 0E+12 -> 0E+6
+sqtx2033 squareroot 0E+14 -> 0E+7
+sqtx2034 squareroot 0E+15 -> 0E+7
+sqtx2035 squareroot 0E+16 -> 0E+8
+sqtx2036 squareroot 0E+18 -> 0E+9
+sqtx2037 squareroot 0E+19 -> 0E+9
+sqtx2038 squareroot 0E+20 -> 0E+9 Clamped
+sqtx2039 squareroot 0E+21 -> 0E+9 Clamped
+sqtx2040 squareroot 0E+22 -> 0E+9 Clamped
+
1
0
r56654 - python/branches/decimal-branch/Lib/test/decimaltestdata/extra.decTest
by facundo.batista Aug. 2, 2007
by facundo.batista Aug. 2, 2007
Aug. 2, 2007
Author: facundo.batista
Date: Thu Aug 2 04:14:37 2007
New Revision: 56654
Added:
python/branches/decimal-branch/Lib/test/decimaltestdata/extra.decTest
Log:
Extra tests for folddown and clamping, to fix some subtle
errors that weren't discovered before. The idea is to use
always this file for this ours-only not-Cowlishaw tests.
Thanks to Mark Dickinson
Added: python/branches/decimal-branch/Lib/test/decimaltestdata/extra.decTest
==============================================================================
--- (empty file)
+++ python/branches/decimal-branch/Lib/test/decimaltestdata/extra.decTest Thu Aug 2 04:14:37 2007
@@ -0,0 +1,94 @@
+version: ?.??
+
+extended: 1
+rounding: half_even
+
+-- testing folddown and clamping
+maxexponent: 9
+minexponent: -9
+precision: 6
+clamp: 1
+extr0000 apply 1E+11 -> Infinity Overflow Inexact Rounded
+extr0001 apply 1E+10 -> Infinity Overflow Inexact Rounded
+extr0002 apply 1E+9 -> 1.00000E+9 Clamped
+extr0003 apply 1E+8 -> 1.0000E+8 Clamped
+extr0004 apply 1E+7 -> 1.000E+7 Clamped
+extr0005 apply 1E+6 -> 1.00E+6 Clamped
+extr0006 apply 1E+5 -> 1.0E+5 Clamped
+extr0007 apply 1E+4 -> 1E+4
+extr0008 apply 1E+3 -> 1E+3
+extr0009 apply 1E+2 -> 1E+2
+extr0010 apply 1E+1 -> 1E+1
+extr0011 apply 1 -> 1
+extr0012 apply 1E-1 -> 0.1
+extr0013 apply 1E-2 -> 0.01
+extr0014 apply 1E-3 -> 0.001
+extr0015 apply 1E-4 -> 0.0001
+extr0016 apply 1E-5 -> 0.00001
+extr0017 apply 1E-6 -> 0.000001
+extr0018 apply 1E-7 -> 1E-7
+extr0019 apply 1E-8 -> 1E-8
+extr0020 apply 1E-9 -> 1E-9
+extr0021 apply 1E-10 -> 1E-10 Subnormal
+extr0022 apply 1E-11 -> 1E-11 Subnormal
+extr0023 apply 1E-12 -> 1E-12 Subnormal
+extr0024 apply 1E-13 -> 1E-13 Subnormal
+extr0025 apply 1E-14 -> 1E-14 Subnormal
+extr0026 apply 1E-15 -> 0E-14 Inexact Rounded Subnormal Underflow Clamped
+extr0027 apply 1E-16 -> 0E-14 Inexact Rounded Subnormal Underflow Clamped
+clamp: 0
+
+-- large precision, small minimum and maximum exponent; in this case
+-- it's possible that folddown is required on a subnormal result
+maxexponent: 9
+minexponent: -9
+precision: 24
+clamp: 1
+extr0100 apply 1E+11 -> Infinity Overflow Inexact Rounded
+extr0101 apply 1E+10 -> Infinity Overflow Inexact Rounded
+extr0102 apply 1E+9 -> 1000000000.00000000000000 Clamped
+extr0103 apply 1E+8 -> 100000000.00000000000000 Clamped
+extr0104 apply 1E+7 -> 10000000.00000000000000 Clamped
+extr0105 apply 1E+6 -> 1000000.00000000000000 Clamped
+extr0106 apply 1E+5 -> 100000.00000000000000 Clamped
+extr0107 apply 1E+4 -> 10000.00000000000000 Clamped
+extr0108 apply 1E+3 -> 1000.00000000000000 Clamped
+extr0109 apply 1E+2 -> 100.00000000000000 Clamped
+extr0110 apply 1E+1 -> 10.00000000000000 Clamped
+extr0111 apply 1 -> 1.00000000000000 Clamped
+extr0112 apply 1E-1 -> 0.10000000000000 Clamped
+extr0113 apply 1E-2 -> 0.01000000000000 Clamped
+extr0114 apply 1E-3 -> 0.00100000000000 Clamped
+extr0115 apply 1E-4 -> 0.00010000000000 Clamped
+extr0116 apply 1E-5 -> 0.00001000000000 Clamped
+extr0117 apply 1E-6 -> 0.00000100000000 Clamped
+extr0118 apply 1E-7 -> 1.0000000E-7 Clamped
+extr0119 apply 1E-8 -> 1.000000E-8 Clamped
+extr0120 apply 1E-9 -> 1.00000E-9 Clamped
+extr0121 apply 1E-10 -> 1.0000E-10 Subnormal Clamped
+extr0122 apply 1E-11 -> 1.000E-11 Subnormal Clamped
+extr0123 apply 1E-12 -> 1.00E-12 Subnormal Clamped
+extr0124 apply 1E-13 -> 1.0E-13 Subnormal Clamped
+extr0125 apply 1E-14 -> 1E-14 Subnormal
+extr0126 apply 1E-15 -> 1E-15 Subnormal
+extr0127 apply 1E-16 -> 1E-16 Subnormal
+extr0128 apply 1E-17 -> 1E-17 Subnormal
+extr0129 apply 1E-18 -> 1E-18 Subnormal
+extr0130 apply 1E-19 -> 1E-19 Subnormal
+extr0131 apply 1E-20 -> 1E-20 Subnormal
+extr0132 apply 1E-21 -> 1E-21 Subnormal
+extr0133 apply 1E-22 -> 1E-22 Subnormal
+extr0134 apply 1E-23 -> 1E-23 Subnormal
+extr0135 apply 1E-24 -> 1E-24 Subnormal
+extr0136 apply 1E-25 -> 1E-25 Subnormal
+extr0137 apply 1E-26 -> 1E-26 Subnormal
+extr0138 apply 1E-27 -> 1E-27 Subnormal
+extr0139 apply 1E-28 -> 1E-28 Subnormal
+extr0140 apply 1E-29 -> 1E-29 Subnormal
+extr0141 apply 1E-30 -> 1E-30 Subnormal
+extr0142 apply 1E-31 -> 1E-31 Subnormal
+extr0143 apply 1E-32 -> 1E-32 Subnormal
+extr0144 apply 1E-33 -> 0E-32 Inexact Rounded Subnormal Underflow Clamped
+extr0145 apply 1E-34 -> 0E-32 Inexact Rounded Subnormal Underflow Clamped
+clamp: 0
+
1
0
The Buildbot has detected a new failure of alpha Debian trunk.
Full details are available at:
http://www.python.org/dev/buildbot/all/alpha%2520Debian%2520trunk/builds/78
Buildbot URL: http://www.python.org/dev/buildbot/all/
Build Reason:
Build Source Stamp: [branch trunk] HEAD
Blamelist: facundo.batista
Build had warnings: warnings test
Excerpt from the test logfile:
2 tests failed:
test_math test_pow
======================================================================
FAIL: testFloor (test.test_math.MathTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/pybot/buildarea/trunk.klose-debian-alpha/build/Lib/test/test_math.py", line 101, in testFloor
self.ftest('floor(1.23e167)', math.floor(1.23e167), 1.23e167)
File "/home/pybot/buildarea/trunk.klose-debian-alpha/build/Lib/test/test_math.py", line 20, in ftest
(name, value, expected))
AssertionError: floor(1.23e167) returned 1.2299999999999997e+167, expected 1.2299999999999999e+167
======================================================================
ERROR: test_bug705231 (test.test_pow.PowTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/pybot/buildarea/trunk.klose-debian-alpha/build/Lib/test/test_pow.py", line 112, in test_bug705231
eq(pow(a, 1.23e167), 1.0)
ValueError: negative number cannot be raised to a fractional power
make: *** [buildbottest] Error 1
sincerely,
-The Buildbot
1
0