void-packages/srcpkgs/giac/patches/invmod.patch

15 lines
380 B
Diff

--- a/src/modpoly.cc 2020-02-18 10:07:10.000000000 -0300
+++ b/src/modpoly.cc 2021-03-08 02:18:09.443740199 -0300
@@ -92,7 +92,10 @@
gen invenv(const gen & g,environment * env){
if (g.type==_USER)
return g._USERptr->inv();
- return invmod(g,env->modulo);
+ if (env->moduloon)
+ return invmod(g,env->modulo);
+ else
+ return gen(1)/g;
}
/*