Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'feasible.': 0.09; 'implements': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'similar,': 0.09; 'subject:module': 0.09; 'python': 0.11; 'jan': 0.12; 'itself.': 0.14; 'decimal.': 0.16; 'fits': 0.16; 'initially,': 0.16; 'philosophy.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'module': 0.19; 'feb': 0.22; '>>>': 0.22; 'header:User-Agent:1': 0.23; 'math': 0.24; "i've": 0.25; 'extension': 0.26; 'least': 0.26; 'asking': 0.27; 'header:X -Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'function': 0.29; 'moved': 0.30; "i'm": 0.30; 'posting': 0.31; 'decimal': 0.31; 'extending': 0.31; 'stuff': 0.32; 'guess': 0.33; 'could': 0.34; 'there': 0.35; 'really': 0.36; 'library.': 0.36; 'thanks': 0.36; 'performance': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'anything': 0.39; '(from': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'algorithms': 0.60; 'received:173': 0.61; 'such': 0.63; 'finally': 0.65; 'worth': 0.66; 'subject': 0.69; '854': 0.84; 'received:fios.verizon.net': 0.84; 'routines': 0.84; 'speedy': 0.84; 'thing,': 0.91; 'ware': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: extend methods of decimal module Date: Wed, 19 Feb 2014 17:10:22 -0500 References: <02cdd9c7-aef7-4cc7-a813-cd1c9627ceb4@googlegroups.com> <94b1962a-0004-4c5b-b484-972a166b88b5@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-173-75-254-207.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 32 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1392847869 news.xs4all.nl 2866 [2001:888:2000:d::a6]:60002 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:66721 On 2/19/2014 4:54 PM, Zachary Ware wrote: > On Wed, Feb 19, 2014 at 3:30 PM, Mark H. Harris wrote: >>> >>> The decimal module implements IEEE 854 >>> >> >> Thanks Terry... ... long time. >> >> I would like to find out if there is some iron-clad policy about extending >> the implementation of an IEEE standard... decimal module in this case; I'm >> just thinking that this particular extension really fits the python >> "batteries included" philosophy. >> >> I guess what I'm really asking for are the same routines found in "bc -l" >> math library. I've finally moved my number crunching stuff to python (from bc) >> because the performance of "decimal" is finally way better than bc for the >> moment, and wrapping python are the math routines for control and processing >> is so much better. Anyway, sure would be nice to have a very speedy atan() >> function built-in for decimal. > > You might consider suggesting a "decimal.math" module on python-ideas. Or just dmath. I think this is a better idea than suggesting additions to decimal itself. For one thing, anything put in decimal would be subject to change if the function were to be added to the standard. It is worth noting in such a posting that Krah's speedup make such functions really feasible. The algorithms could be similar, at least initially, to the one used for floats. -- Terry Jan Reedy