Commit 616133e
committed
Improve NotImplementedError for sqrt(Mod(a,n), all=True)
When sqrt(Mod(a,n), all=True) is called for a non-square 'a' with the default extend=True, the resulting NotImplementedError was very generic.
Improved the error message to suggest trying extend=False to find roots only within the base ring Zmod(n), as discussed in the issue.
Included a doctest .1 parent 871ba9d commit 616133e
1 file changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1174 | 1174 | | |
1175 | 1175 | | |
1176 | 1176 | | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
1177 | 1191 | | |
1178 | 1192 | | |
1179 | 1193 | | |
| |||
1260 | 1274 | | |
1261 | 1275 | | |
1262 | 1276 | | |
1263 | | - | |
| 1277 | + | |
1264 | 1278 | | |
1265 | 1279 | | |
1266 | 1280 | | |
| |||
0 commit comments