Ezio Melotti
38386149ab
#19069 : use imperative mood in float object docstrings. Patch by Marco Buttu.
2013-10-06 00:44:32 +03:00
Mark Dickinson
115bc79df8
Issue #9742 : Sneaky fix for build failure on Solaris 9.
2012-11-17 20:18:52 +00:00
Mark Dickinson
1abe6cd842
Issue #13889 : Add missing _Py_SET_53BIT_PRECISION_* calls around uses of dtoa.c functions in float round.
2012-01-27 21:16:01 +00:00
Mark Dickinson
874d59ee91
Issue #11144 : Fix corner cases where float-to-int conversion unnecessarily returned a long.
2011-03-26 12:18:00 +00:00
Mark Dickinson
ecf8ec67ce
Merged revisions 87032 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r87032 | mark.dickinson | 2010-12-04 12:25:30 +0000 (Sat, 04 Dec 2010) | 3 lines
Issue #10596 : Fix float.__mod__ to have the same behaviour as
float.__divmod__ with respect to signed zeros.
........
2010-12-04 12:30:41 +00:00
Benjamin Peterson
cf76d1f0c7
add space
2010-07-02 19:41:39 +00:00
Antoine Pitrou
c83ea137d7
Untabify C files. Will watch buildbots.
2010-05-09 14:46:46 +00:00
Brett Cannon
a8ac944924
Add back in a line that was unneeded which advanced a pointer, but commented
...
out as it is currently unneeded.
This effectively adds back in the line removed in r80809 as a comment.
2010-05-06 17:56:36 +00:00
Brett Cannon
6f38175cbc
Remove an unneeded variable increment.
...
Found using Clang's static analyzer.
2010-05-05 20:16:09 +00:00
Ezio Melotti
bce3e17bd2
#7482 : clarify error message in case of division by zero of float and complex numbers.
2010-02-22 16:30:58 +00:00
Mark Dickinson
99d652ef66
Issue #7534 : Fix handling of nans, infinities, and negative zero in **
...
operator, on IEEE 754 platforms. Thanks Marcos Donolo for original patch.
2009-12-30 12:12:23 +00:00
Mark Dickinson
31f0cfef0e
Include ieeefp.h (when available) in pyport.h instead of individually in
...
Objects/floatobject.c and Objects/complexobject.c. This should silence
compiler warnings about implicit declaration of the 'finite' function
on Solaris.
2009-11-28 12:30:36 +00:00
Mark Dickinson
bd15a06fd3
Issue #7117 , continued: Change round implementation to use the correctly-rounded
...
string <-> float conversions; this makes sure that the result of the round
operation is correctly rounded, and hence displays nicely using the new float
repr.
2009-11-18 19:33:35 +00:00
Mark Dickinson
8568b19850
Issue #7117 : Use PyOS_string_to_double instead of PyOS_ascii_strtod in
...
floatobject.c. Also, remove limitation on length of unicode inputs to
float().
2009-10-26 21:11:20 +00:00
Eric Smith
cfaf79c56e
Start to remove _PyOS_double_to_string, as mentioned in issue 7117.
2009-10-26 14:48:55 +00:00
Eric Smith
8c3fb39440
Removed unused function PyFloat_AsStringEx. It is unused in floatobject.c, and it's not declared in any .h file.
2009-10-24 19:50:44 +00:00
Eric Smith
b327258d4f
Removed usage of unsafe PyFloat_AsString.
2009-10-16 14:26:36 +00:00
Benjamin Peterson
bf9ec9ba67
add underscores
2009-06-16 23:13:09 +00:00
Mark Dickinson
b1d45856c2
Issue #5981 : Fix some float.fromhex bugs related to inf and nan handling.
2009-05-11 15:33:08 +00:00
Eric Smith
a985a3aee4
Issue #5920 : Changed format.__float__ and complex.__float__ to use a precision of 12 when using the empty presentation type. This more closely matches str()'s behavior and reduces surprises when adding alignment flags to an empty format string. Patch by Mark Dickinson.
2009-05-05 18:26:08 +00:00
Mark Dickinson
777e4ff503
Eliminate some locale-dependent calls to isspace and tolower.
2009-05-03 20:59:48 +00:00
Mark Dickinson
df108ca324
Remove format_float and use _PyOS_double_to_string instead.
2009-04-29 21:56:53 +00:00
Mark Dickinson
6d6b220215
Backport r71967 changes from py3k to trunk.
...
(Internal plumbing changes for float parsing.)
2009-04-26 16:04:05 +00:00
Eric Smith
068f06568b
Issue #5835 , deprecate PyOS_ascii_formatd.
...
If anyone wants to clean up the documentation, feel free. It's my first documentation foray, and it's not that great.
Will port to py3k with a different strategy.
2009-04-25 21:40:15 +00:00
Benjamin Peterson
99d36f1563
call __float__ on str subclasses #5759
...
tests by R. David Murray
2009-04-15 21:26:36 +00:00