Re: [Python-ideas] Add the imath module

On 2018-07-13 14:11, Steven D'Aprano wrote:
What it *actually* does is:
is_almost_certainly_prime_except_for_a_ludicrously_microscopic_chance_of_error_thousands_of_times_less_likely_than_a_stray_cosmic_ray_flipping_a_bit_in_memory_and_causing_the_wrong_result_to_be_returned()
That's just a long variant of is_probable_prime()
That's besides the point. I agree that probable primes are good enough, just don't call them "prime".

Should we call sort then probable_sort, since the non-zero probability exists of it going wrong due to a stray cosmic ray? It's pointless to worry about failure modes which are order of magnitudes unlikelier than hardware failure. Stephan Op vr 13 jul. 2018 14:45 schreef Jeroen Demeyer <J.Demeyer@ugent.be>:

Stephan Houben wrote:
Should we call sort then probable_sort, since the non-zero probability exists of it going wrong due to a stray cosmic ray?
And in the interests of full disclosure, we should call Python a probable language, running on a probable computer. -- Probable Greg

I think the extra 9 characters of "_probable" are worth the extra accuracy. Dont teach people to lie in their function names. It's a bad example. and if you really want to lie, just from imath import is_probably_prime as is_prime 2018-07-13 14:44 GMT+02:00 Jeroen Demeyer <J.Demeyer@ugent.be>:

On Fri, Jul 13, 2018 at 02:51:18PM +0200, Jacco van Dorp wrote:
In what way is is_probable_prime(11) # returns True less true than isprime(11) # returns True If you want to *lie*, then claiming that 11 is a probable prime is certainly a lie. -- Steve

Should we call sort then probable_sort, since the non-zero probability exists of it going wrong due to a stray cosmic ray? It's pointless to worry about failure modes which are order of magnitudes unlikelier than hardware failure. Stephan Op vr 13 jul. 2018 14:45 schreef Jeroen Demeyer <J.Demeyer@ugent.be>:

Stephan Houben wrote:
Should we call sort then probable_sort, since the non-zero probability exists of it going wrong due to a stray cosmic ray?
And in the interests of full disclosure, we should call Python a probable language, running on a probable computer. -- Probable Greg

I think the extra 9 characters of "_probable" are worth the extra accuracy. Dont teach people to lie in their function names. It's a bad example. and if you really want to lie, just from imath import is_probably_prime as is_prime 2018-07-13 14:44 GMT+02:00 Jeroen Demeyer <J.Demeyer@ugent.be>:

On Fri, Jul 13, 2018 at 02:51:18PM +0200, Jacco van Dorp wrote:
In what way is is_probable_prime(11) # returns True less true than isprime(11) # returns True If you want to *lie*, then claiming that 11 is a probable prime is certainly a lie. -- Steve
participants (6)
-
Chris Angelico
-
Greg Ewing
-
Jacco van Dorp
-
Jeroen Demeyer
-
Stephan Houben
-
Steven D'Aprano