[Python-Dev] Google Summer of Code proposal: improvement of long int and adding new types/modules.

Mateusz Rukowicz mateusz.rukowicz at vp.pl
Fri Apr 21 12:12:28 CEST 2006


Guido van Rossum wrote:

>On 4/21/06, Mateusz Rukowicz <mateusz.rukowicz at vp.pl> wrote:
>  
>
>>Next thing I would add is multi precision floating point type to the
>>core and fraction type, which in some cases highly improves operations,
>>which would have to be done using floating point instead.
>>Of course, math module will need update to support multi precision
>>floating points, and with that, one could compute asin or any other
>>function provided with math with precision limited by memory and time.
>>It would be also good idea to add function which computes pi and exp
>>with unlimited precision.
>>    
>>
>
>I would suggest doing this as a separate module first, rather than as
>a patch to the Python core.
>
>Can you show us some practical applications of these operations?
>
>  
>
Multi precision float is mostly used by physicians and mathematicians, 
interpreted languages are particularly good for physics simulations, in 
which small error would grow so much, that results are useless. Rational 
numbers would be used in codes where precision is of 
critical-importance, and one cannot accept rounding of results. So 
fraction (and also multi precision floating) would mostly be used in 
linear-programming algorithms, like solving set of equations or some 
optimizing methods.

>>And last thing - It would be nice to add some number-theory functions to
>>math module (or new one), like prime-tests, factorizations etc.
>>    
>>
>
>Probably better a new module. But how many people do you think need these?
>
>  
>
Mostly cryptography would exploit fast number-theory algorithms. Adding 
these as a module would boost and make easier to code everything which 
is related to cryptography, such as ssl, rsa etc. Also hobbyist looking 
for huge primes etc. would appreciate that, but it is not main purpose 
of these ;).

I understand that most of these improvements have quite limited 
audience, but I still think python should be friendly to them ;)

Best regards,
Mateusz Rukowicz.



More information about the Python-Dev mailing list