Changeset da408f in git for Singular/LIB/solve.lib
- Timestamp:
- Jul 8, 1999, 12:18:13 PM (24 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- b719a30005f8bcbcca9d638b7908dda038ffee56
- Parents:
- 4deddb979be065737d63e926fc05f264a6b1078a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/solve.lib
r4deddb rda408f 1 1 /////////////////////////////////////////////////////////////////////////////// 2 2 3 version="$Id: solve.lib,v 1.1 1 1999-07-07 16:38:28 obachmanExp $";3 version="$Id: solve.lib,v 1.12 1999-07-08 10:18:13 wenk Exp $"; 4 4 info=" 5 5 LIBRARY: solve.lib PROCEDURES TO SOLVE POLYNOMIAL SYSTEMS … … 67 67 } 68 68 69 int digits= system("setFloatDigits",prec); 70 71 return(uressolve(gls,typ,polish)); 69 return(uressolve(gls,typ,prec,polish)); 72 70 73 71 } … … 81 79 // result is a list (x,y)-coordinates as strings 82 80 83 // now with complex coefficient field, precision is 10 digits84 ring rsc= (real, 10,I),(x,y),lp;81 // now with complex coefficient field, precision is 20 digits 82 ring rsc= (real,20,I),(x,y),lp; 85 83 ideal i = (2+3*I)*x2 + (0.35+I*45.0e-2)*y2 - 8, x2 + xy + (42.7)*y2; 86 ures_solve(i);84 list l= ures_solve(i); 87 85 // result is a list of (x,y)-coordinates of complex numbers 86 l; 87 // check the result 88 subst(subst(i[1],x,l[1][1]),y,l[1][2]); 88 89 } 89 90 /////////////////////////////////////////////////////////////////////////////// … … 126 127 } 127 128 128 int digits= system("setFloatDigits",prec); 129 130 return(laguerre(f,polish)); 129 return(laguerre(f,prec,polish)); 131 130 132 131 } … … 147 146 list l = laguerre_solve(f); 148 147 l; 148 // check result, value of substituted poly should be near to zero 149 subst(f,x,l[1]); 150 subst(f,x,l[2]); 149 151 } 150 152 /////////////////////////////////////////////////////////////////////////////// … … 244 246 ideal p = 2,3; 245 247 ideal v= 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16; 246 interpolate( p,v,3 ); 247 } 248 /////////////////////////////////////////////////////////////////////////////// 248 poly ip= interpolate( p,v,3 ); 249 ip; 250 // compute poly at point 2,3, result must be 2 251 subst(subst(ip,x,2),y,3); 252 // compute poly at point 2^15,3^15, result must be 16 253 subst(subst(ip,x,2^15),y,3^15); 254 } 255 ///////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset
for help on using the changeset viewer.