New submission from Ananthakrishnan <ananthakrishnan15.2...@gmail.com>:

If we have to find the gcd of three or more numbers, now we should use 
gcd(a, gcd(b, gcd(c, gcd(d, e)))))
which will create lot of problems.

math.gcd should take "n" number of arguments,like:

gcd(a,b,c,....)

gcd(4,6,8)    //returns 2
gcd(2,5,8,6)    //returns 1
gcd(6,30,40,60,20,40)    //returns 2

----------
components: Library (Lib)
messages: 362069
nosy: Ananthakrishnan, mark.dickinson, serhiy.storchaka, steven.daprano
priority: normal
severity: normal
status: open
title: Update math.gcd() to accept "n" arguments.
versions: Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39648>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to