On Thu, Sep 16, 2021 at 06:33:58PM -, Jonatan wrote:
> Currently, math.factorial only supports integers and not floats,
> whereas the "mathematical" version supports both integers and floats.
That's questionable.
(Warning: maths geek post follows.)
Mathematicians typically only use the n
Not really, That was the first option that came to my mind.
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message arch
Is there a reason you defined it as n * math.gamma(n), instead of
math.gamma(n+1)?
Damian (he/him)
On Thu, Sep 16, 2021 at 2:35 PM Jonatan wrote:
> Currently, math.factorial only supports integers and not floats, whereas
> the "mathematical" version supports both integers and floats.
> I.e:
> `
Currently, math.factorial only supports integers and not floats, whereas the
"mathematical" version supports both integers and floats.
I.e:
```
import math
def better_factorial(n):
return n * math.gamma(n)
print(math.factorial(10) == better_factorial(10))
```
This ends up in `True`, as tha
On Wed, Sep 15, 2021 at 4:20 AM Steven D'Aprano wrote:
> On Wed, Sep 15, 2021 at 08:53:21PM +1000, Chris Angelico wrote:
>
> > Sometimes there is no valid path to something,
>
> I don't understand what you mean by that. If there is no valid path to
> something, where exactly are you cd'ing to, an
Thank you Julien
--
Sharif
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org
Thank you Steve
--
Sharif
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org