[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math

Search:


View post   

>> No.14856942 [View]
File: 8 KB, 463x227, inverses.png [View same] [iqdb] [saucenao] [google]
14856942

Reposting again from >>14855733

Here's a fun exercise:

This function I've written in Python creates a list of the inverses mod a prime p (inv[0] = 0 to keep the list at length p); e.g. when p = 7, then inv[3] = 5.
See if you can understand how it works.
It's a cool application of the division algorithm.

>> No.14855733 [View]
File: 8 KB, 463x227, inverses.png [View same] [iqdb] [saucenao] [google]
14855733

Here's a fun exercise:
This function I've written in Python creates a list of the inverses mod a prime p (inv[0] = 0 to keep the list at length p); e.g. when p = 7, then inv[3] = 5.
See if you can understand how it works.

It's a cool application of the division algorithm.

Navigation
View posts[+24][+48][+96]