Annotation of OpenXM_contrib/PHC/Ada/Root_Counts/Implift/ts_fewsolve.adb, Revision 1.1
1.1 ! maekawa 1: with text_io,integer_io; use text_io,integer_io;
! 2: with Communications_with_User; use Communications_with_User;
! 3: with Standard_Floating_Numbers; use Standard_Floating_Numbers;
! 4: with Numbers_io; use Numbers_io;
! 5: with Standard_Complex_Poly_Systems; use Standard_Complex_Poly_Systems;
! 6: with Standard_Complex_Poly_Systems_io; use Standard_Complex_Poly_Systems_io;
! 7: with Standard_Complex_Laur_Systems; use Standard_Complex_Laur_Systems;
! 8: with Standard_Poly_Laur_Convertors; use Standard_Poly_Laur_Convertors;
! 9: with Standard_Complex_Solutions; use Standard_Complex_Solutions;
! 10: with Standard_Complex_Solutions_io; use Standard_Complex_Solutions_io;
! 11: with Standard_Root_Refiners; use Standard_Root_Refiners;
! 12: with Transforming_Laurent_Systems; use Transforming_Laurent_Systems;
! 13: with Fewnomial_System_Solvers; use Fewnomial_System_Solvers;
! 14:
! 15: procedure ts_fewsolve is
! 16:
! 17: -- DESCRIPTION :
! 18: -- Test on the resolution of fewnomial systems.
! 19:
! 20: ans : character;
! 21: lp : Link_to_Poly_Sys;
! 22:
! 23: procedure Call_Root_Refiner ( file : in file_type; p : in Poly_Sys;
! 24: sols : in out Solution_List ) is
! 25:
! 26: epsxa,epsfa,tolsing : double_float;
! 27: numit : natural;
! 28: max : constant natural := 5;
! 29:
! 30: begin
! 31: epsxa := 1.0E-14;
! 32: epsfa := 1.0E-14;
! 33: tolsing := 1.0E-08;
! 34: Reporting_Root_Refiner(file,p,sols,epsxa,epsfa,tolsing,numit,max,false);
! 35: end Call_Root_Refiner;
! 36:
! 37: begin
! 38: loop
! 39: get(lp);
! 40: declare
! 41: l : Laur_Sys(lp'range) := Polynomial_to_Laurent_System(lp.all);
! 42: sols : Solution_List;
! 43: fail : boolean;
! 44: begin
! 45: Shift(l);
! 46: if not Is_Fewnomial_System(l)
! 47: then put_line("The system has too many terms ...");
! 48: else Solve(l,sols,fail);
! 49: if fail
! 50: then put_line("A failure occured ...");
! 51: else put_line("These are the solutions : ");
! 52: Call_Root_Refiner(Standard_Output,lp.all,sols);
! 53: end if;
! 54: end if;
! 55: Clear(sols); Clear(lp); Clear(l);
! 56: end;
! 57: put("Do you want more tests ? (y/n) "); Ask_Yes_or_No(ans);
! 58: exit when ans /= 'y';
! 59: end loop;
! 60: end ts_fewsolve;
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>