Changeset da408f in git for Singular/LIB/solve.lib


Ignore:
Timestamp:
Jul 8, 1999, 12:18:13 PM (24 years ago)
Author:
Moritz Wenk <wenk@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
b719a30005f8bcbcca9d638b7908dda038ffee56
Parents:
4deddb979be065737d63e926fc05f264a6b1078a
Message:
*wenk: changed uressolve CMD_3 -> CMD_M (4)
	       laguerre  CMD2_ -> CMD_3
       removed "setFloatDigits" in extra.cc
       fixed output (2.2e33 -> 2.2e+33)
       adapted solve.lib to uressolve, laguerre, extended examples


git-svn-id: file:///usr/local/Singular/svn/trunk@3247 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/solve.lib

    r4deddb rda408f  
    11///////////////////////////////////////////////////////////////////////////////
    22
    3 version="$Id: solve.lib,v 1.11 1999-07-07 16:38:28 obachman Exp $";
     3version="$Id: solve.lib,v 1.12 1999-07-08 10:18:13 wenk Exp $";
    44info="
    55LIBRARY: solve.lib     PROCEDURES TO SOLVE POLYNOMIAL SYSTEMS
     
    6767  }
    6868
    69   int digits= system("setFloatDigits",prec);
    70 
    71   return(uressolve(gls,typ,polish));
     69  return(uressolve(gls,typ,prec,polish));
    7270
    7371}
     
    8179  // result is a list (x,y)-coordinates as strings
    8280
    83   // now with complex coefficient field, precision is 10 digits
    84   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;
    8583  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);
    8785  // 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]);
    8889}
    8990///////////////////////////////////////////////////////////////////////////////
     
    126127  }
    127128
    128   int digits= system("setFloatDigits",prec);
    129 
    130   return(laguerre(f,polish));
     129  return(laguerre(f,prec,polish));
    131130
    132131}
     
    147146  list l = laguerre_solve(f);
    148147  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]);
    149151}
    150152///////////////////////////////////////////////////////////////////////////////
     
    244246  ideal p = 2,3;
    245247  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.