Deutsch   English   Français   Italiano  
<87wmlrn5dr.fsf@nightsong.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Paul Rubin <no.email@nospam.invalid>
Newsgroups: comp.lang.python
Subject: Re: Relatively prime integers in NumPy
Date: Thu, 11 Jul 2024 11:35:44 -0700
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <87wmlrn5dr.fsf@nightsong.com>
References: <SA0PR09MB6363F3E6B493202E73869DF4DBDA2@SA0PR09MB6363.namprd09.prod.outlook.com>
	<00e801dad3bf$473daed0$d5b90c70$@gmail.com>
	<mailman.29.1720722147.2981.python-list@python.org>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Thu, 11 Jul 2024 20:35:45 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="682b26ab0de75d5eae664fc8da881298";
	logging-data="2724915"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18l0oVEd28Fd7w8ihSRM2h1"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:5JKBo2H4sutlVfrfpsb7qXu6yko=
	sha1:OkKQQFl+72BtGO7B1TFVRzex7r8=
Bytes: 1543

<avi.e.gross@gmail.com> writes:
> python to make some list or other data structure for divisors of each number
> involved

Two numbers a and b are coprime if math.gcd(a,b) == 1, I am pretty sure.
That is true by definition(?) when a and b are both > 0.  Experiment
indicates it seems to work even when one or both of a and b are
negative, but I don't have a proof and haven't examined the
implementation.  I don't know how gcd is mathematically defined in that
situation.