#! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create the files: # Ada/ # Ada/Continuation/ # Ada/Continuation/READ_ME # Ada/Homotopy/ # Ada/Homotopy/READ_ME # Ada/Homotopy/makefile # Ada/Main/ # Ada/Main/READ_ME # Ada/Math_Lib/ # Ada/Math_Lib/Matrices/ # Ada/Math_Lib/Matrices/READ_ME # Ada/Math_Lib/Numbers/ # Ada/Math_Lib/Numbers/READ_ME # Ada/Math_Lib/Polynomials/ # Ada/Math_Lib/Polynomials/READ_ME # Ada/Math_Lib/READ_ME # Ada/Math_Lib/Supports/ # Ada/Math_Lib/Supports/READ_ME # Ada/Objects/ # Ada/Objects/Continuation/ # Ada/Objects/Continuation/makefile # Ada/Objects/Homotopy/ # Ada/Objects/Homotopy/makefile # Ada/Objects/Main/ # Ada/Objects/Main/makefile # Ada/Objects/Math_Lib/ # Ada/Objects/Math_Lib/Matrices/ # Ada/Objects/Math_Lib/Matrices/makefile # Ada/Objects/Math_Lib/Numbers/ # Ada/Objects/Math_Lib/Numbers/makefile # Ada/Objects/Math_Lib/Polynomials/ # Ada/Objects/Math_Lib/Polynomials/makefile # Ada/Objects/Math_Lib/Supports/ # Ada/Objects/Math_Lib/Supports/makefile # Ada/Objects/Math_Lib/makeall # Ada/Objects/Math_Lib/makeclean # Ada/Objects/Math_Lib/makefile # Ada/Objects/READ_ME # Ada/Objects/Root_Counts/ # Ada/Objects/Root_Counts/Dynlift/ # Ada/Objects/Root_Counts/Dynlift/makefile # Ada/Objects/Root_Counts/Implift/ # Ada/Objects/Root_Counts/Implift/makefile # Ada/Objects/Root_Counts/Product/ # Ada/Objects/Root_Counts/Product/makefile # Ada/Objects/Root_Counts/Stalift/ # Ada/Objects/Root_Counts/Stalift/makefile # Ada/Objects/Root_Counts/Symmetry/ # Ada/Objects/Root_Counts/Symmetry/makefile # Ada/Objects/Root_Counts/makeall # Ada/Objects/Root_Counts/makeclean # Ada/Objects/Root_Counts/makefile # Ada/Objects/Root_Counts/makelog # Ada/Objects/System/ # Ada/Objects/System/makefile # Ada/Objects/makeall # Ada/Objects/makeclean # Ada/Objects/makefile # Ada/Objects/makelib # Ada/READ_ME # Ada/Root_Counts/ # Ada/Root_Counts/Dynlift/ # Ada/Root_Counts/Dynlift/READ_ME # Ada/Root_Counts/Implift/ # Ada/Root_Counts/Implift/READ_ME # Ada/Root_Counts/Product/ # Ada/Root_Counts/Product/READ_ME # Ada/Root_Counts/READ_ME # Ada/Root_Counts/Stalift/ # Ada/Root_Counts/Stalift/READ_ME # Ada/Root_Counts/Symmetry/ # Ada/Root_Counts/Symmetry/READ_ME # Ada/System/ # Ada/System/READ_ME # Demo/ # Demo/READ_ME # Demo/boon # Demo/butcher # Demo/butcher8 # Demo/camera1s # Demo/caprasse # Demo/cassou # Demo/chemequ # Demo/chemequs # Demo/cohn2 # Demo/cohn3 # Demo/comb3000 # Demo/comb3000s # Demo/conform1 # Demo/cpdm5 # Demo/cyclic5 # Demo/cyclic6 # Demo/cyclic7 # Demo/cyclic8 # Demo/d1 # Demo/des18_3 # Demo/des22_24 # Demo/discret3s # Demo/eco5 # Demo/eco6 # Demo/eco7 # Demo/eco8 # Demo/extcyc5 # Demo/extcyc6 # Demo/extcyc7 # Demo/extcyc8 # Demo/fbrfive12 # Demo/fbrfive4 # Demo/fourbar # Demo/gaukwa2 # Demo/gaukwa3 # Demo/gaukwa4 # Demo/geneig # Demo/heart # Demo/i1 # Demo/ipp # Demo/ipp2 # Demo/katsura5 # Demo/kin1 # Demo/kinema # Demo/ku10 # Demo/lorentz # Demo/lumped # Demo/mickey # Demo/noon3 # Demo/noon4 # Demo/noon5 # Demo/proddeco # Demo/puma # Demo/quadfor2 # Demo/quadgrid # Demo/rabmo # Demo/rbpl # Demo/rbpl24 # Demo/rbpl24es # Demo/rbpl24s # Demo/redcyc5 # Demo/redcyc6 # Demo/redcyc7 # Demo/redcyc8 # Demo/redeco5 # Demo/redeco6 # Demo/redeco7 # Demo/redeco8 # Demo/rediff3 # Demo/reimer5 # Demo/rose # Demo/s9_1 # Demo/sendra # Demo/solotarev # Demo/sparse5 # Demo/speer # Demo/trinks # Demo/virasoro # Demo/wood # Demo/wright # GNAT/ # GNAT/Continuation/ # GNAT/Continuation/bablpoco.adb # GNAT/Continuation/bablpoco.ads # GNAT/Continuation/black_box_polynomial_continuations.adb # GNAT/Continuation/black_box_polynomial_continuations.ads # GNAT/Continuation/continuation_data.adb # GNAT/Continuation/continuation_data.ads # GNAT/Continuation/continuation_parameters.adb # GNAT/Continuation/continuation_parameters.ads # GNAT/Continuation/continuation_parameters_io.adb # GNAT/Continuation/continuation_parameters_io.ads # GNAT/Continuation/correctors.adb # GNAT/Continuation/correctors.ads # GNAT/Continuation/directions_of_solution_paths.adb # GNAT/Continuation/directions_of_solution_paths.ads # GNAT/Continuation/dispatch_predictors.adb # GNAT/Continuation/dispatch_predictors.ads # GNAT/Continuation/driver_for_winding_numbers.adb # GNAT/Continuation/driver_for_winding_numbers.ads # GNAT/Continuation/drivers_for_path_directions.adb # GNAT/Continuation/drivers_for_path_directions.ads # GNAT/Continuation/drivers_for_polynomial_continuation.adb # GNAT/Continuation/drivers_for_polynomial_continuation.ads # GNAT/Continuation/increment_and_fix_continuation.adb # GNAT/Continuation/increment_and_fix_continuation.ads # GNAT/Continuation/mainpoco.adb # GNAT/Continuation/mainpoco.ads # GNAT/Continuation/makefile # GNAT/Continuation/path_trackers.adb # GNAT/Continuation/path_trackers.ads # GNAT/Continuation/predictors.adb # GNAT/Continuation/predictors.ads # GNAT/Continuation/process_io.adb # GNAT/Continuation/process_io.ads # GNAT/Continuation/root_refiners.adb # GNAT/Continuation/root_refiners.ads # GNAT/Continuation/scanners_for_continuation.adb # GNAT/Continuation/scanners_for_continuation.ads # GNAT/Continuation/valipoco.adb # GNAT/Continuation/valipoco.ads # GNAT/Continuation/vlprs_algorithm.adb # GNAT/Continuation/vlprs_algorithm.ads # GNAT/Continuation/vlprs_tables.adb # GNAT/Continuation/vlprs_tables.ads # GNAT/Homotopy/ # GNAT/Homotopy/driver_for_homotopy_construction.adb # GNAT/Homotopy/driver_for_homotopy_construction.ads # GNAT/Homotopy/drivers_for_reduction.adb # GNAT/Homotopy/drivers_for_reduction.ads # GNAT/Homotopy/drivers_for_scaling.adb # GNAT/Homotopy/drivers_for_scaling.ads # GNAT/Homotopy/floating_equalities.adb # GNAT/Homotopy/floating_equalities.ads # GNAT/Homotopy/homogenization.adb # GNAT/Homotopy/homogenization.ads # GNAT/Homotopy/homotopy.adb # GNAT/Homotopy/homotopy.ads # GNAT/Homotopy/mainred.adb # GNAT/Homotopy/mainred.ads # GNAT/Homotopy/mainscal.adb # GNAT/Homotopy/mainscal.ads # GNAT/Homotopy/makefile # GNAT/Homotopy/projective_transformations.adb # GNAT/Homotopy/projective_transformations.ads # GNAT/Homotopy/reduction_of_overconstrained_systems.adb # GNAT/Homotopy/reduction_of_overconstrained_systems.ads # GNAT/Homotopy/reduction_of_polynomial_systems.adb # GNAT/Homotopy/reduction_of_polynomial_systems.ads # GNAT/Homotopy/reduction_of_polynomials.adb # GNAT/Homotopy/reduction_of_polynomials.ads # GNAT/Homotopy/scaling.adb # GNAT/Homotopy/scaling.ads # GNAT/Homotopy/solutions.adb # GNAT/Homotopy/solutions.ads # GNAT/Homotopy/solutions_io.adb # GNAT/Homotopy/solutions_io.ads # GNAT/Main/ # GNAT/Main/bablphc.adb # GNAT/Main/bablphc.ads # GNAT/Main/bablroco.adb # GNAT/Main/bablroco.ads # GNAT/Main/bablvali.adb # GNAT/Main/bablvali.ads # GNAT/Main/black_box_root_counting.adb # GNAT/Main/black_box_root_counting.ads # GNAT/Main/dispatch.adb # GNAT/Main/dispatch.ads # GNAT/Main/driver_for_own_start_system.adb # GNAT/Main/driver_for_own_start_system.ads # GNAT/Main/driver_for_root_counts.adb # GNAT/Main/driver_for_root_counts.ads # GNAT/Main/driver_for_root_refining.adb # GNAT/Main/driver_for_root_refining.ads # GNAT/Main/mainphc.adb # GNAT/Main/mainphc.ads # GNAT/Main/mainroco.adb # GNAT/Main/mainroco.ads # GNAT/Main/mainvali.adb # GNAT/Main/mainvali.ads # GNAT/Main/makefile # GNAT/Main/makelog # GNAT/Main/phcpack.adb # GNAT/Main/phcpack.ads # GNAT/Main/use_phc.adb # GNAT/Math_Lib/ # GNAT/Math_Lib/Matrices/ # GNAT/Math_Lib/Matrices/complex_linear_system_solvers.adb # GNAT/Math_Lib/Matrices/complex_linear_system_solvers.ads # GNAT/Math_Lib/Matrices/complex_matrices.adb # GNAT/Math_Lib/Matrices/complex_matrices.ads # GNAT/Math_Lib/Matrices/complex_matrices_io.adb # GNAT/Math_Lib/Matrices/complex_matrices_io.ads # GNAT/Math_Lib/Matrices/complex_norms.adb # GNAT/Math_Lib/Matrices/complex_norms.ads # GNAT/Math_Lib/Matrices/complex_vectors.ads # GNAT/Math_Lib/Matrices/complex_vectors_io.adb # GNAT/Math_Lib/Matrices/complex_vectors_io.ads # GNAT/Math_Lib/Matrices/complex_vectors_of_vectors.ads # GNAT/Math_Lib/Matrices/complex_vectors_of_vectors_io.adb # GNAT/Math_Lib/Matrices/complex_vectors_of_vectors_io.ads # GNAT/Math_Lib/Matrices/float_linear_system_solvers.adb # GNAT/Math_Lib/Matrices/float_linear_system_solvers.ads # GNAT/Math_Lib/Matrices/float_matrices.adb # GNAT/Math_Lib/Matrices/float_matrices.ads # GNAT/Math_Lib/Matrices/float_matrices_io.adb # GNAT/Math_Lib/Matrices/float_matrices_io.ads # GNAT/Math_Lib/Matrices/float_vectors.ads # GNAT/Math_Lib/Matrices/float_vectors_io.adb # GNAT/Math_Lib/Matrices/float_vectors_io.ads # GNAT/Math_Lib/Matrices/float_vectors_of_vectors.ads # GNAT/Math_Lib/Matrices/float_vectors_of_vectors_io.adb # GNAT/Math_Lib/Matrices/float_vectors_of_vectors_io.ads # GNAT/Math_Lib/Matrices/greatest_common_divisor.adb # GNAT/Math_Lib/Matrices/greatest_common_divisor.ads # GNAT/Math_Lib/Matrices/integer_linear_inequality_solvers.adb # GNAT/Math_Lib/Matrices/integer_linear_inequality_solvers.ads # GNAT/Math_Lib/Matrices/integer_linear_system_solvers.adb # GNAT/Math_Lib/Matrices/integer_linear_system_solvers.ads # GNAT/Math_Lib/Matrices/integer_matrices.adb # GNAT/Math_Lib/Matrices/integer_matrices.ads # GNAT/Math_Lib/Matrices/integer_matrices_io.adb # GNAT/Math_Lib/Matrices/integer_matrices_io.ads # GNAT/Math_Lib/Matrices/integer_vectors.ads # GNAT/Math_Lib/Matrices/integer_vectors_io.adb # GNAT/Math_Lib/Matrices/integer_vectors_io.ads # GNAT/Math_Lib/Matrices/integer_vectors_of_vectors.ads # GNAT/Math_Lib/Matrices/integer_vectors_of_vectors_io.adb # GNAT/Math_Lib/Matrices/integer_vectors_of_vectors_io.ads # GNAT/Math_Lib/Matrices/makefile # GNAT/Math_Lib/Matrices/natural_vectors.ads # GNAT/Math_Lib/Matrices/natural_vectors_io.adb # GNAT/Math_Lib/Matrices/natural_vectors_io.ads # GNAT/Math_Lib/Matrices/natural_vectors_of_vectors.ads # GNAT/Math_Lib/Matrices/natural_vectors_of_vectors_io.adb # GNAT/Math_Lib/Matrices/natural_vectors_of_vectors_io.ads # GNAT/Math_Lib/Matrices/vectors.adb # GNAT/Math_Lib/Matrices/vectors.ads # GNAT/Math_Lib/Numbers/ # GNAT/Math_Lib/Numbers/complex_instantiation_parameters.adb # GNAT/Math_Lib/Numbers/complex_instantiation_parameters.ads # GNAT/Math_Lib/Numbers/complex_numbers.adb # GNAT/Math_Lib/Numbers/complex_numbers.ads # GNAT/Math_Lib/Numbers/complex_numbers_io.adb # GNAT/Math_Lib/Numbers/complex_numbers_io.ads # GNAT/Math_Lib/Numbers/float_instantiation_parameters.adb # GNAT/Math_Lib/Numbers/float_instantiation_parameters.ads # GNAT/Math_Lib/Numbers/floating_point_numbers.ads # GNAT/Math_Lib/Numbers/integer_instantiation_parameters.adb # GNAT/Math_Lib/Numbers/integer_instantiation_parameters.ads # GNAT/Math_Lib/Numbers/integer_io.ads # GNAT/Math_Lib/Numbers/makefile # GNAT/Math_Lib/Numbers/mathematical_functions.adb # GNAT/Math_Lib/Numbers/mathematical_functions.ads # GNAT/Math_Lib/Numbers/natural_instantiation_parameters.adb # GNAT/Math_Lib/Numbers/natural_instantiation_parameters.ads # GNAT/Math_Lib/Numbers/numbers_io.adb # GNAT/Math_Lib/Numbers/numbers_io.ads # GNAT/Math_Lib/Numbers/random_number_generators.adb # GNAT/Math_Lib/Numbers/random_number_generators.ads # GNAT/Math_Lib/Numbers/strings_to_natural_numbers.adb # GNAT/Math_Lib/Numbers/strings_to_natural_numbers.ads # GNAT/Math_Lib/Polynomials/ # GNAT/Math_Lib/Polynomials/complex_laurent_polynomial_systems.adb # GNAT/Math_Lib/Polynomials/complex_laurent_polynomial_systems.ads # GNAT/Math_Lib/Polynomials/complex_multivariate_laurent_polynomials.ads # GNAT/Math_Lib/Polynomials/complex_multivariate_polynomials.ads # GNAT/Math_Lib/Polynomials/complex_multivariate_polynomials_io.adb # GNAT/Math_Lib/Polynomials/complex_multivariate_polynomials_io.ads # GNAT/Math_Lib/Polynomials/complex_polynomial_systems.adb # GNAT/Math_Lib/Polynomials/complex_polynomial_systems.ads # GNAT/Math_Lib/Polynomials/complex_polynomial_systems_io.adb # GNAT/Math_Lib/Polynomials/complex_polynomial_systems_io.ads # GNAT/Math_Lib/Polynomials/exponent_vectors.adb # GNAT/Math_Lib/Polynomials/exponent_vectors.ads # GNAT/Math_Lib/Polynomials/integer_graded_lexicographical_ordening.adb # GNAT/Math_Lib/Polynomials/integer_graded_lexicographical_ordening.ads # GNAT/Math_Lib/Polynomials/jacobi_matrices.adb # GNAT/Math_Lib/Polynomials/jacobi_matrices.ads # GNAT/Math_Lib/Polynomials/laurent_jacobi_matrices.adb # GNAT/Math_Lib/Polynomials/laurent_jacobi_matrices.ads # GNAT/Math_Lib/Polynomials/laurent_polynomial_randomizers.adb # GNAT/Math_Lib/Polynomials/laurent_polynomial_randomizers.ads # GNAT/Math_Lib/Polynomials/laurent_to_polynomial_converters.adb # GNAT/Math_Lib/Polynomials/laurent_to_polynomial_converters.ads # GNAT/Math_Lib/Polynomials/lists.adb # GNAT/Math_Lib/Polynomials/lists.ads # GNAT/Math_Lib/Polynomials/makefile # GNAT/Math_Lib/Polynomials/multivariate_laurent_polynomials.adb # GNAT/Math_Lib/Polynomials/multivariate_laurent_polynomials.ads # GNAT/Math_Lib/Polynomials/multivariate_polynomials.adb # GNAT/Math_Lib/Polynomials/multivariate_polynomials.ads # GNAT/Math_Lib/Polynomials/natural_graded_lexicographical_ordening.adb # GNAT/Math_Lib/Polynomials/natural_graded_lexicographical_ordening.ads # GNAT/Math_Lib/Polynomials/polynomial_randomizers.adb # GNAT/Math_Lib/Polynomials/polynomial_randomizers.ads # GNAT/Math_Lib/Polynomials/polynomial_to_laurent_converters.adb # GNAT/Math_Lib/Polynomials/polynomial_to_laurent_converters.ads # GNAT/Math_Lib/Polynomials/substitutors.adb # GNAT/Math_Lib/Polynomials/substitutors.ads # GNAT/Math_Lib/Polynomials/symbol_table.adb # GNAT/Math_Lib/Polynomials/symbol_table.ads # GNAT/Math_Lib/Polynomials/symbol_table_io.adb # GNAT/Math_Lib/Polynomials/symbol_table_io.ads # GNAT/Math_Lib/Supports/ # GNAT/Math_Lib/Supports/arrays_of_float_vector_lists.adb # GNAT/Math_Lib/Supports/arrays_of_float_vector_lists.ads # GNAT/Math_Lib/Supports/arrays_of_float_vector_lists_io.adb # GNAT/Math_Lib/Supports/arrays_of_float_vector_lists_io.ads # GNAT/Math_Lib/Supports/arrays_of_integer_vector_lists.adb # GNAT/Math_Lib/Supports/arrays_of_integer_vector_lists.ads # GNAT/Math_Lib/Supports/arrays_of_integer_vector_lists_io.adb # GNAT/Math_Lib/Supports/arrays_of_integer_vector_lists_io.ads # GNAT/Math_Lib/Supports/dictionaries.adb # GNAT/Math_Lib/Supports/dictionaries.ads # GNAT/Math_Lib/Supports/face_enumerators.adb # GNAT/Math_Lib/Supports/face_enumerators.ads # GNAT/Math_Lib/Supports/face_enumerators_utilities.adb # GNAT/Math_Lib/Supports/face_enumerators_utilities.ads # GNAT/Math_Lib/Supports/farkas_lemma.adb # GNAT/Math_Lib/Supports/farkas_lemma.ads # GNAT/Math_Lib/Supports/float_face_enumerators.adb # GNAT/Math_Lib/Supports/float_face_enumerators.ads # GNAT/Math_Lib/Supports/float_faces_of_polytope.adb # GNAT/Math_Lib/Supports/float_faces_of_polytope.ads # GNAT/Math_Lib/Supports/float_linear_inequality_solvers.adb # GNAT/Math_Lib/Supports/float_linear_inequality_solvers.ads # GNAT/Math_Lib/Supports/float_support_functions.adb # GNAT/Math_Lib/Supports/float_support_functions.ads # GNAT/Math_Lib/Supports/float_to_integer_rounding.adb # GNAT/Math_Lib/Supports/float_to_integer_rounding.ads # GNAT/Math_Lib/Supports/givens_rotations.adb # GNAT/Math_Lib/Supports/givens_rotations.ads # GNAT/Math_Lib/Supports/integer_faces_of_polytope.adb # GNAT/Math_Lib/Supports/integer_faces_of_polytope.ads # GNAT/Math_Lib/Supports/integer_faces_of_polytope_io.adb # GNAT/Math_Lib/Supports/integer_faces_of_polytope_io.ads # GNAT/Math_Lib/Supports/integer_farkas_lemma.adb # GNAT/Math_Lib/Supports/integer_farkas_lemma.ads # GNAT/Math_Lib/Supports/integer_support_functions.adb # GNAT/Math_Lib/Supports/integer_support_functions.ads # GNAT/Math_Lib/Supports/linear_programming.adb # GNAT/Math_Lib/Supports/linear_programming.ads # GNAT/Math_Lib/Supports/lists_of_float_vectors.adb # GNAT/Math_Lib/Supports/lists_of_float_vectors.ads # GNAT/Math_Lib/Supports/lists_of_float_vectors_io.adb # GNAT/Math_Lib/Supports/lists_of_float_vectors_io.ads # GNAT/Math_Lib/Supports/lists_of_integer_vectors.adb # GNAT/Math_Lib/Supports/lists_of_integer_vectors.ads # GNAT/Math_Lib/Supports/lists_of_integer_vectors_io.adb # GNAT/Math_Lib/Supports/lists_of_integer_vectors_io.ads # GNAT/Math_Lib/Supports/makefile # GNAT/Objects/ # GNAT/Objects/READ_ME # GNAT/Objects/dispatch.adb # GNAT/Objects/makefile # GNAT/Objects/use_phc.adb # GNAT/READ_ME # GNAT/Root_Counts/ # GNAT/Root_Counts/Dynlift/ # GNAT/Root_Counts/Dynlift/babldmvc.adb # GNAT/Root_Counts/Dynlift/babldmvc.ads # GNAT/Root_Counts/Dynlift/black_box_mixed_volume_computations.adb # GNAT/Root_Counts/Dynlift/black_box_mixed_volume_computations.ads # GNAT/Root_Counts/Dynlift/cayley_embedding.adb # GNAT/Root_Counts/Dynlift/cayley_embedding.ads # GNAT/Root_Counts/Dynlift/cayley_trick.adb # GNAT/Root_Counts/Dynlift/cayley_trick.ads # GNAT/Root_Counts/Dynlift/common_faces_of_polytope.adb # GNAT/Root_Counts/Dynlift/common_faces_of_polytope.ads # GNAT/Root_Counts/Dynlift/driver_for_minkowski_polynomials.adb # GNAT/Root_Counts/Dynlift/driver_for_minkowski_polynomials.ads # GNAT/Root_Counts/Dynlift/drivers_for_dynamic_lifting.adb # GNAT/Root_Counts/Dynlift/drivers_for_dynamic_lifting.ads # GNAT/Root_Counts/Dynlift/dynamic_bkk_computations.adb # GNAT/Root_Counts/Dynlift/dynamic_bkk_computations.ads # GNAT/Root_Counts/Dynlift/dynamic_lifting_functions.adb # GNAT/Root_Counts/Dynlift/dynamic_lifting_functions.ads # GNAT/Root_Counts/Dynlift/dynamic_mixed_subdivisions.adb # GNAT/Root_Counts/Dynlift/dynamic_mixed_subdivisions.ads # GNAT/Root_Counts/Dynlift/dynamic_polyhedral_continuation.adb # GNAT/Root_Counts/Dynlift/dynamic_polyhedral_continuation.ads # GNAT/Root_Counts/Dynlift/dynamic_triangulations.adb # GNAT/Root_Counts/Dynlift/dynamic_triangulations.ads # GNAT/Root_Counts/Dynlift/enumerate_faces_of_polytope.adb # GNAT/Root_Counts/Dynlift/enumerate_faces_of_polytope.ads # GNAT/Root_Counts/Dynlift/flatten_mixed_subdivisions.adb # GNAT/Root_Counts/Dynlift/flatten_mixed_subdivisions.ads # GNAT/Root_Counts/Dynlift/frequency_graph.adb # GNAT/Root_Counts/Dynlift/frequency_graph.ads # GNAT/Root_Counts/Dynlift/global_dynamic_triangulation.adb # GNAT/Root_Counts/Dynlift/global_dynamic_triangulation.ads # GNAT/Root_Counts/Dynlift/initial_mixed_cell.adb # GNAT/Root_Counts/Dynlift/initial_mixed_cell.ads # GNAT/Root_Counts/Dynlift/makefile # GNAT/Root_Counts/Dynlift/minkowski_polynomials.adb # GNAT/Root_Counts/Dynlift/minkowski_polynomials.ads # GNAT/Root_Counts/Dynlift/simplices.adb # GNAT/Root_Counts/Dynlift/simplices.ads # GNAT/Root_Counts/Dynlift/simplices_io.adb # GNAT/Root_Counts/Dynlift/simplices_io.ads # GNAT/Root_Counts/Dynlift/triangulations.adb # GNAT/Root_Counts/Dynlift/triangulations.ads # GNAT/Root_Counts/Dynlift/triangulations_and_subdivisions.adb # GNAT/Root_Counts/Dynlift/triangulations_and_subdivisions.ads # GNAT/Root_Counts/Dynlift/triangulations_io.adb # GNAT/Root_Counts/Dynlift/triangulations_io.ads # GNAT/Root_Counts/Dynlift/unfolding_subdivisions.adb # GNAT/Root_Counts/Dynlift/unfolding_subdivisions.ads # GNAT/Root_Counts/Implift/ # GNAT/Root_Counts/Implift/arrays_of_lists_utilities.adb # GNAT/Root_Counts/Implift/arrays_of_lists_utilities.ads # GNAT/Root_Counts/Implift/binomials.adb # GNAT/Root_Counts/Implift/binomials.ads # GNAT/Root_Counts/Implift/driver_for_polyhedral_continuation.adb # GNAT/Root_Counts/Implift/driver_for_polyhedral_continuation.ads # GNAT/Root_Counts/Implift/drivers_for_implicit_lifting.adb # GNAT/Root_Counts/Implift/drivers_for_implicit_lifting.ads # GNAT/Root_Counts/Implift/drivers_for_vertex_points.adb # GNAT/Root_Counts/Implift/drivers_for_vertex_points.ads # GNAT/Root_Counts/Implift/durand_kerner.adb # GNAT/Root_Counts/Implift/durand_kerner.ads # GNAT/Root_Counts/Implift/face_enumerator_of_sum.adb # GNAT/Root_Counts/Implift/face_enumerator_of_sum.ads # GNAT/Root_Counts/Implift/fewnomials.adb # GNAT/Root_Counts/Implift/fewnomials.ads # GNAT/Root_Counts/Implift/generic_position.adb # GNAT/Root_Counts/Implift/generic_position.ads # GNAT/Root_Counts/Implift/integer_vectors_utilities.adb # GNAT/Root_Counts/Implift/integer_vectors_utilities.ads # GNAT/Root_Counts/Implift/lists_of_vectors_utilities.adb # GNAT/Root_Counts/Implift/lists_of_vectors_utilities.ads # GNAT/Root_Counts/Implift/makefile # GNAT/Root_Counts/Implift/mixed_homotopy_continuation.adb # GNAT/Root_Counts/Implift/mixed_homotopy_continuation.ads # GNAT/Root_Counts/Implift/power_lists.adb # GNAT/Root_Counts/Implift/power_lists.ads # GNAT/Root_Counts/Implift/set_structures_and_volumes.adb # GNAT/Root_Counts/Implift/set_structures_and_volumes.ads # GNAT/Root_Counts/Implift/transformations.adb # GNAT/Root_Counts/Implift/transformations.ads # GNAT/Root_Counts/Implift/transformations_io.adb # GNAT/Root_Counts/Implift/transformations_io.ads # GNAT/Root_Counts/Implift/transforming_integer_vector_lists.adb # GNAT/Root_Counts/Implift/transforming_integer_vector_lists.ads # GNAT/Root_Counts/Implift/transforming_laurent_systems.adb # GNAT/Root_Counts/Implift/transforming_laurent_systems.ads # GNAT/Root_Counts/Implift/transforming_solutions.adb # GNAT/Root_Counts/Implift/transforming_solutions.ads # GNAT/Root_Counts/Implift/trees_of_vectors.adb # GNAT/Root_Counts/Implift/trees_of_vectors.ads # GNAT/Root_Counts/Implift/trees_of_vectors_io.adb # GNAT/Root_Counts/Implift/trees_of_vectors_io.ads # GNAT/Root_Counts/Implift/vertices.adb # GNAT/Root_Counts/Implift/vertices.ads # GNAT/Root_Counts/Implift/volumes.adb # GNAT/Root_Counts/Implift/volumes.ads # GNAT/Root_Counts/Product/ # GNAT/Root_Counts/Product/construct_random_product_start_system.adb # GNAT/Root_Counts/Product/construct_random_product_start_system.ads # GNAT/Root_Counts/Product/degree_sets_tables.adb # GNAT/Root_Counts/Product/degree_sets_tables.ads # GNAT/Root_Counts/Product/degree_sets_tables_io.adb # GNAT/Root_Counts/Product/degree_sets_tables_io.ads # GNAT/Root_Counts/Product/degree_structure.adb # GNAT/Root_Counts/Product/degree_structure.ads # GNAT/Root_Counts/Product/degrees_in_sets_of_unknowns.adb # GNAT/Root_Counts/Product/degrees_in_sets_of_unknowns.ads # GNAT/Root_Counts/Product/driver_for_interpolating_homotopies.adb # GNAT/Root_Counts/Product/driver_for_interpolating_homotopies.ads # GNAT/Root_Counts/Product/drivers_for_m_homogenization.adb # GNAT/Root_Counts/Product/drivers_for_m_homogenization.ads # GNAT/Root_Counts/Product/drivers_for_multi_homogenization.adb # GNAT/Root_Counts/Product/drivers_for_multi_homogenization.ads # GNAT/Root_Counts/Product/drivers_for_set_structures.adb # GNAT/Root_Counts/Product/drivers_for_set_structures.ads # GNAT/Root_Counts/Product/generate.adb # GNAT/Root_Counts/Product/generate.ads # GNAT/Root_Counts/Product/interpolating_homotopies.adb # GNAT/Root_Counts/Product/interpolating_homotopies.ads # GNAT/Root_Counts/Product/m_homogeneous_bezout_numbers.adb # GNAT/Root_Counts/Product/m_homogeneous_bezout_numbers.ads # GNAT/Root_Counts/Product/m_homogeneous_start_systems.adb # GNAT/Root_Counts/Product/m_homogeneous_start_systems.ads # GNAT/Root_Counts/Product/makefile # GNAT/Root_Counts/Product/partitions_of_sets_of_unknowns.adb # GNAT/Root_Counts/Product/partitions_of_sets_of_unknowns.ads # GNAT/Root_Counts/Product/partitions_of_sets_of_unknowns_io.adb # GNAT/Root_Counts/Product/partitions_of_sets_of_unknowns_io.ads # GNAT/Root_Counts/Product/random_product_start_systems.adb # GNAT/Root_Counts/Product/random_product_start_systems.ads # GNAT/Root_Counts/Product/random_product_system.adb # GNAT/Root_Counts/Product/random_product_system.ads # GNAT/Root_Counts/Product/random_product_system_io.adb # GNAT/Root_Counts/Product/random_product_system_io.ads # GNAT/Root_Counts/Product/set_structure.adb # GNAT/Root_Counts/Product/set_structure.ads # GNAT/Root_Counts/Product/set_structure_io.adb # GNAT/Root_Counts/Product/set_structure_io.ads # GNAT/Root_Counts/Product/sets_of_unknowns.adb # GNAT/Root_Counts/Product/sets_of_unknowns.ads # GNAT/Root_Counts/Product/sets_of_unknowns_io.adb # GNAT/Root_Counts/Product/sets_of_unknowns_io.ads # GNAT/Root_Counts/Product/total_degree_start_systems.adb # GNAT/Root_Counts/Product/total_degree_start_systems.ads # GNAT/Root_Counts/Stalift/ # GNAT/Root_Counts/Stalift/bkk_bound_computations.adb # GNAT/Root_Counts/Stalift/bkk_bound_computations.ads # GNAT/Root_Counts/Stalift/contributions_to_mixed_volume.adb # GNAT/Root_Counts/Stalift/contributions_to_mixed_volume.ads # GNAT/Root_Counts/Stalift/driver_for_criterion.adb # GNAT/Root_Counts/Stalift/driver_for_criterion.ads # GNAT/Root_Counts/Stalift/drivers_for_lifting_functions.adb # GNAT/Root_Counts/Stalift/drivers_for_lifting_functions.ads # GNAT/Root_Counts/Stalift/drivers_for_mixed_contributions.adb # GNAT/Root_Counts/Stalift/drivers_for_mixed_contributions.ads # GNAT/Root_Counts/Stalift/drivers_for_static_lifting.adb # GNAT/Root_Counts/Stalift/drivers_for_static_lifting.ads # GNAT/Root_Counts/Stalift/float_integer_convertors.adb # GNAT/Root_Counts/Stalift/float_integer_convertors.ads # GNAT/Root_Counts/Stalift/float_lifting_functions.adb # GNAT/Root_Counts/Stalift/float_lifting_functions.ads # GNAT/Root_Counts/Stalift/float_lifting_utilities.adb # GNAT/Root_Counts/Stalift/float_lifting_utilities.ads # GNAT/Root_Counts/Stalift/float_mixed_subdivisions.adb # GNAT/Root_Counts/Stalift/float_mixed_subdivisions.ads # GNAT/Root_Counts/Stalift/float_mixed_subdivisions_io.adb # GNAT/Root_Counts/Stalift/float_mixed_subdivisions_io.ads # GNAT/Root_Counts/Stalift/float_polyhedral_continuation.adb # GNAT/Root_Counts/Stalift/float_polyhedral_continuation.ads # GNAT/Root_Counts/Stalift/float_pruning_methods.adb # GNAT/Root_Counts/Stalift/float_pruning_methods.ads # GNAT/Root_Counts/Stalift/inner_normal_cones.adb # GNAT/Root_Counts/Stalift/inner_normal_cones.ads # GNAT/Root_Counts/Stalift/integer_lifting_functions.adb # GNAT/Root_Counts/Stalift/integer_lifting_functions.ads # GNAT/Root_Counts/Stalift/integer_lifting_utilities.adb # GNAT/Root_Counts/Stalift/integer_lifting_utilities.ads # GNAT/Root_Counts/Stalift/integer_mixed_subdivisions.adb # GNAT/Root_Counts/Stalift/integer_mixed_subdivisions.ads # GNAT/Root_Counts/Stalift/integer_mixed_subdivisions_io.adb # GNAT/Root_Counts/Stalift/integer_mixed_subdivisions_io.ads # GNAT/Root_Counts/Stalift/integer_polyhedral_continuation.adb # GNAT/Root_Counts/Stalift/integer_polyhedral_continuation.ads # GNAT/Root_Counts/Stalift/integer_pruning_methods.adb # GNAT/Root_Counts/Stalift/integer_pruning_methods.ads # GNAT/Root_Counts/Stalift/makefile # GNAT/Root_Counts/Stalift/mixed_coherent_subdivisions.adb # GNAT/Root_Counts/Stalift/mixed_coherent_subdivisions.ads # GNAT/Root_Counts/Stalift/mixed_volume_computation.adb # GNAT/Root_Counts/Stalift/mixed_volume_computation.ads # GNAT/Root_Counts/Stalift/normal_cone_intersections.adb # GNAT/Root_Counts/Stalift/normal_cone_intersections.ads # GNAT/Root_Counts/Stalift/pruning_statistics.adb # GNAT/Root_Counts/Stalift/pruning_statistics.ads # GNAT/Root_Counts/Symmetry/ # GNAT/Root_Counts/Symmetry/drivers_for_orbits_of_solutions.adb # GNAT/Root_Counts/Symmetry/drivers_for_orbits_of_solutions.ads # GNAT/Root_Counts/Symmetry/drivers_for_symmetric_lifting.adb # GNAT/Root_Counts/Symmetry/drivers_for_symmetric_lifting.ads # GNAT/Root_Counts/Symmetry/drivers_for_symmetric_set_structures.adb # GNAT/Root_Counts/Symmetry/drivers_for_symmetric_set_structures.ads # GNAT/Root_Counts/Symmetry/drivers_for_symmetry_group_io.adb # GNAT/Root_Counts/Symmetry/drivers_for_symmetry_group_io.ads # GNAT/Root_Counts/Symmetry/equivariant_polynomial_systems.adb # GNAT/Root_Counts/Symmetry/equivariant_polynomial_systems.ads # GNAT/Root_Counts/Symmetry/faces_of_symmetric_polytopes.adb # GNAT/Root_Counts/Symmetry/faces_of_symmetric_polytopes.ads # GNAT/Root_Counts/Symmetry/generating_mixed_cells.adb # GNAT/Root_Counts/Symmetry/generating_mixed_cells.ads # GNAT/Root_Counts/Symmetry/linear_symmetric_reduction.adb # GNAT/Root_Counts/Symmetry/linear_symmetric_reduction.ads # GNAT/Root_Counts/Symmetry/mainsmvc.adb # GNAT/Root_Counts/Symmetry/mainsmvc.ads # GNAT/Root_Counts/Symmetry/makefile # GNAT/Root_Counts/Symmetry/orbits_of_solutions.adb # GNAT/Root_Counts/Symmetry/orbits_of_solutions.ads # GNAT/Root_Counts/Symmetry/orbits_of_solutions_io.adb # GNAT/Root_Counts/Symmetry/orbits_of_solutions_io.ads # GNAT/Root_Counts/Symmetry/permutations.adb # GNAT/Root_Counts/Symmetry/permutations.ads # GNAT/Root_Counts/Symmetry/permutations_of_faces.adb # GNAT/Root_Counts/Symmetry/permutations_of_faces.ads # GNAT/Root_Counts/Symmetry/permute_operations.adb # GNAT/Root_Counts/Symmetry/permute_operations.ads # GNAT/Root_Counts/Symmetry/symbolic_symmetry_group_io.adb # GNAT/Root_Counts/Symmetry/symbolic_symmetry_group_io.ads # GNAT/Root_Counts/Symmetry/symmetric_bkk_bound_solvers.adb # GNAT/Root_Counts/Symmetry/symmetric_bkk_bound_solvers.ads # GNAT/Root_Counts/Symmetry/symmetric_lifting_functions.adb # GNAT/Root_Counts/Symmetry/symmetric_lifting_functions.ads # GNAT/Root_Counts/Symmetry/symmetric_polyhedral_continuation.adb # GNAT/Root_Counts/Symmetry/symmetric_polyhedral_continuation.ads # GNAT/Root_Counts/Symmetry/symmetric_randomize.adb # GNAT/Root_Counts/Symmetry/symmetric_randomize.ads # GNAT/Root_Counts/Symmetry/symmetric_set_structure.adb # GNAT/Root_Counts/Symmetry/symmetric_set_structure.ads # GNAT/Root_Counts/Symmetry/symmetry_group.adb # GNAT/Root_Counts/Symmetry/symmetry_group.ads # GNAT/Root_Counts/Symmetry/symmetry_group_io.adb # GNAT/Root_Counts/Symmetry/symmetry_group_io.ads # GNAT/Root_Counts/Symmetry/templates.adb # GNAT/Root_Counts/Symmetry/templates.ads # GNAT/System/ # GNAT/System/READ_ME # GNAT/System/bye_bye_message.adb # GNAT/System/bye_bye_message.ads # GNAT/System/communications_with_user.adb # GNAT/System/communications_with_user.ads # GNAT/System/file_operations.adb # GNAT/System/file_operations.ads # GNAT/System/machines.adb # GNAT/System/machines.ads # GNAT/System/makefile # GNAT/System/sun_timing_package.adb # GNAT/System/system_call.adb # GNAT/System/system_call.ads # GNAT/System/timing_package.adb # GNAT/System/timing_package.ads # GNAT/System/unix_command_line.adb # GNAT/System/unix_command_line.ads # GNAT/System/unix_resource_usage.adb # GNAT/System/unix_resource_usage.ads # READ_ME # This archive created: Tue Nov 7 15:37:36 2000 export PATH; PATH=/bin:$PATH if test ! -d 'Ada' then mkdir 'Ada' fi cd 'Ada' if test ! -d 'Continuation' then mkdir 'Continuation' fi cd 'Continuation' if test -f 'READ_ME' then echo shar: will not over-write existing file "'READ_ME'" else cat << "SHAR_EOF" > 'READ_ME' Increment-and-fix tracking of solution paths of polynomial homotopies. This library of continuation routines is organized in three layers: 0. The basic data structures 1. Increment-and-Fix continuation 2. Driver routines conpar_io : 0.0. Continuation_Parameters_io |-- conpar : 0.0.0. Continuation_Parameters |-- cont_data : 0.0.1. Continuation_Data process_io : 0.1. Process_io continue : 1.0. Increment_and_Fix_Continuation |-- pathtrac : 1.0.1. Path_Trackers |-- dispred : 1.0.2. Dispatch_Predictors |-----|-- predictors : 1.0.3. Predictors |-- correctors : 1.0.4. Correctors |-- dirpaths : 1.0.5. Directions_of_Solution_Paths |-- vlprsalg : 1.0.5.0. vLpRs_Algorithm |-- vlrpstab : 1.0.5.0.0. vLpRs_Tables rootrefi : 1.1. Root_Refiners drivwind : 2.0. Driver_for_Winding_Numbers |-- drivpoco : 2.0.0. Drivers_for_Polynomial_Continuation | |-- drivpadi : 2.0.0.0. Drivers_for_Path_Directions |-----|-- drivproc : 2.0.1. Driver_for_Process_io 0. The basic data structures The package Continuation_Data defines records of data to allow better management during continuation. Settings of the continuation parameters can be determined interactively by the routines in Continuation_Parameters_io, default values are contained in the package Continuation_Parameters. In Process_io are the primitive operations for output during continuation, depending on the output mode. 1. Increment-and-Fix continuation There is a rich variety of predictors available. Increment-and-fix continuation with a polyhedral end game for the computation of the directions of the solution paths. 2. Driver routines batchpoco Batch_Polynomial_Continuations mainpoco poco as called by the main program scanpoco Scanners_for_Continuation bablpoco batch processing and black box version of poco valipoco validation of computed path directions 3. target routines : poco poco (Polynomial Continuation) postpoco stand-alone routine for validation of path directions SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'Homotopy' then mkdir 'Homotopy' fi cd 'Homotopy' if test -f 'READ_ME' then echo shar: will not over-write existing file "'READ_ME'" else cat << "SHAR_EOF" > 'READ_ME' Polynomial homotopies, solutions of systems, scaling and reduction. 1. Representation of solutions of families of systems : equals Floating_Equalities solutions Solutions solutions_io Solutions_io 2. Homotopy with homogenization : homzers Homogenization projtrans Projective_Transformations homotopy Homotopy drivhoco Driver_for_Homotopy_Construction 3. Scaling and reduction : scaling Scaling drivscals Drivers_for_Scaling mainscal mainscal (as tool called by phc) redupoly Reduction_of_Polynomials redufull Reduction_of_Polynomial_Systems reduover Reduction_of_Overconstrained_Systems drivreds Driver_for_Reduction mainred mainred (as tool called by phc) SHAR_EOF fi # end of overwriting check if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' ADAPATH=/cw/vads.dec/v6.1.0d all: solutions sparsity projtrans drivhoco drivscal drivred climp # possible options for the compiler (normal,optim,suppress): # normal : without optimizations # optim : optimize as far as possible # suppress : same as optim, but with the suppression of all checks normal= optim= -O suppress= -O -S options=$(suppress) makeoptions=$(options) -v -f # compiling commands : # ada : invoke the Ada compiler directly # a.make : check dependencies before compiling compile=ada $(options) # Making an Ada library : ada.lib: a.mklib . $(ADAPATH)/verdixlib a.path -a ../System a.path -a ../Math_Lib/Numbers a.path -a ../Math_Lib/Matrices a.path -a ../Math_Lib/Polynomials # Cleaning unnecessary instantiations : cleaninst: a.cleaninst # Cleaning the Ada library : clean: a.rmlib -f # Cleaning the .imports directory : climp: @-rm -f .imports/* # The solutions : sols: ada.lib equals.a equalsB.a solutions.a solutionsB.a $(compile) equals.a equalsB.a solutions.a solutionsB.a solutions: sols solutions_io.a solutions_ioB.a condsols.a condsolsB.a $(compile) solutions_io.a solutions_ioB.a $(compile) condsols.a condsolsB.a # The homotopy : homotopy: ada.lib homotopy.a homotopyB.a $(compile) homotopy.a homotopyB.a # Adding homogeneous equations : homzers: ada.lib homzers.a homzersB.a $(compile) homzers.a homzersB.a projtrans: homzers projtrans.a projtransB.a $(compile) projtrans.a projtransB.a # The interactive driver for the construction of the homotopy : drivhoco: homotopy homzers drivhoco.a drivhocoB.a $(compile) drivhoco.a drivhocoB.a # Scaling and reduction : scaling: solutions scaling.a scalingB.a $(compile) scaling.a scalingB.a drivscal: scaling drivscals.a drivscalsB.a mainscal.a mainscalB.a $(compile) drivscals.a drivscalsB.a mainscal.a mainscalB.a redufull: ada.lib redupoly.a redupolyB.a redufull.a redufullB.a $(compile) redupoly.a redupolyB.a redufull.a redufullB.a reduover: redufull reduover.a reduoverB.a $(compile) reduover.a reduoverB.a drivred: reduover ratio.a drivreds.a drivredsB.a mainred.a mainredB.a $(compile) ratio.a drivreds.a drivredsB.a mainred.a mainredB.a # Some tools usepert: ada.lib perturb.a pert.a $(compile) perturb.a pert.a a.ld -o /tmp/pert Use_Perturb evalfj: ada.lib evalfj.a $(compile) evalfj.a a.ld -o /tmp/evalfj evalfj # Sampling polynomial systems : samplers: ada.lib samplers.a samplersB.a $(compile) samplers.a samplersB.a # Measuring the sparsity of a polynomial system : sparsity: ada.lib sparsity.a sparsityB.a $(compile) sparsity.a sparsityB.a avsp: sparsity avsp.a $(compile) avsp.a @-make climp a.ld -o /tmp/avsp avsp # Test routines : ts_drivred: drivred ts_drivred.a $(compile) ts_drivred.a @-make climp a.ld -o /tmp/ts_drivred ts_drivred ts_drivscal: drivscal ts_drivscal.a $(compile) ts_drivscal.a @-make climp a.ld -o /tmp/ts_drivscal ts_drivscal ts_nterms: sparsity ts_nterms.a $(compile) ts_nterms.a @-make climp a.ld -o /tmp/ts_nterms ts_nterms ts_sam: samplers ts_samplers.a $(compile) ts_samplers.a @-make climp a.ld -o /tmp/ts_sam ts_samplers SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'Main' then mkdir 'Main' fi cd 'Main' if test -f 'READ_ME' then echo shar: will not over-write existing file "'READ_ME'" else cat << "SHAR_EOF" > 'READ_ME' Main interactive drivers and dispatcher for the software package phc. 1. Separate drivers : drivroco Driver_for_Root_Counts drivowst Driver_for_Own_Start_System drivrore Driver_for_Root_Refining 2. Main drivers : mainroco root counting mainvali validation of the results bablvali black-box version of validation mainphc the program bablphc black-box version of the program 3. PHCPACK : phcpack the package as server package use_phc an example of how to use phcpack 4. The main dispatcher : dispatch scans options and arguments and calls drivers SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'Math_Lib' then mkdir 'Math_Lib' fi cd 'Math_Lib' if test ! -d 'Matrices' then mkdir 'Matrices' fi cd 'Matrices' if test -f 'READ_ME' then echo shar: will not over-write existing file "'READ_ME'" else cat << "SHAR_EOF" > 'READ_ME' Integer and floating-point vectors, matrices and linear-system solvers. 1. Vectors of natural, integer, floating-point, and complex numbers vectors Vectors nat_vec Natural_Vectors nat_vec_io Natural_Vectors_io int_vec Integer_Vectors int_vec_io Integer_Vectors_io flt_vec Float_Vectors flt_vec_io Float_Vectors_io cmp_vec Complex_Vectors cmp_vec_io Complex_Vectors_io 2. Vectors of vectors nat_vvc Natural_Vectors_of_Vectors nat_vvc_io Natural_Vectors_of_Vectors_io int_vvc Integer_Vectors_of_Vectors int_vvc_io Integer_Vectors_of_Vectors_io flt_vvc Float_Vectors_of_Vectors flt_vvc_io Float_Vectors_of_Vectors_io cmp_vvc Complex_Vectors_of_Vectors cmp_vvc_io Complex_Vectors_of_Vectors_io 3. Matrices of natural, integer, floating-point, and complex numbers nat_mat Natural_Matrices nat_mat_io Natural_Matrices_io int_mat Integer_Matrices int_mat_io Integer_Matrices_io flt_mat Float_Matrices flt_mat_io Float_Matrices_io cmp_mat Complex_Matrices cmp_mat_io Complex_Matrices_io 4. The linear-system solvers gcd Greatest_Common_Divisor int_lss Integer_Linear_System_Solvers int_lis Integer_Linear_Inequality_Solvers flt_lss Float_Linear_System_Solvers cmp_lss Complex_Linear_System_Solvers SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'Numbers' then mkdir 'Numbers' fi cd 'Numbers' if test -f 'READ_ME' then echo shar: will not over-write existing file "'READ_ME'" else cat << "SHAR_EOF" > 'READ_ME' Basic number definitions and coefficient rings and fields. The definition of floating-point numbers is such that it is independent of the pre-defined type "float". 1. Floating-point and complex numbers float Floating_Point_Numbers mathfun Mathematical_Functions complex Complex_Numbers complex_io Complex_Numbers_io numbers_io Numbers_io 2. Instantiation packages to define coefficient rings nat_inst Natural_Instantiation_Parameters int_inst Integer_Instantiation_Parameters flt_inst Float_Instantiation_Parameters cmp_inst Complex_Instantiation_Parameters 3. Random number generators random Random_Number_Generators 4. Conversions: strings to numbers. strnum Strings_to_Natural_Numbers SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'Polynomials' then mkdir 'Polynomials' fi cd 'Polynomials' if test -f 'READ_ME' then echo shar: will not over-write existing file "'READ_ME'" else cat << "SHAR_EOF" > 'READ_ME' Multivariate polynomials and polynomial systems over any ring or field. Three different representations of polynomials are implemented: as a list of terms, a nested Horner scheme with fixed coefficient and with parametric coefficients. The i/o-routines provide readable formats. 1. Multivariate Polynomials : nat_grad_lex Natural_Graded_Lexicographical_Ordening int_grad_lex Integer_Graded_Lexicographical_Ordening lists generic lists of items mul_poly Multivariate_Polynomials mul_laur Multivariate_Laurent_Polynomials cmp_mpoly Complex_Multivariate_Polynomials cmp_mlaur Complex_Multivariate_Laurent_Polynomials symtab Symbol_Table symtab_io Symbol_Table_io cmp_mpoly_io Complex_Multivariate_Polynomials_io 2. Vectors of polynomials : cmp_polsys Complex_Polynomial_Systems cmp_polsys_io Complex_Polynomial_Systems_io jacobi Jacobi_Matrices cmp_laursys Complex_Laurent_Systems laurjaco Laurent_Jacobi_Matrices expvec Exponent_Vectors 3. Converters, randomizers and substitutors : pollaco Polynomial_to_Laurent_Converters lapolco Laurent_to_Polynomial_Converters polrand Polynomial_Randomizers laurrand Laurent_Polynomial_Randomizers substits Substitutors SHAR_EOF fi # end of overwriting check cd .. if test -f 'READ_ME' then echo shar: will not over-write existing file "'READ_ME'" else cat << "SHAR_EOF" > 'READ_ME' Mathematical library with basic data structures and operations. Math_Lib : 1. general mathematical library |-- Numbers : 1.1. number representations |-- Matrices : 1.2. matrices and linear-system solvers |-- Polynomials : 1.3. multivariate polynomial systems |-- Supports : 1.4. support sets and linear programming The directory Numbers specifies the coefficient rings and contains definitions of floating-point and complex numbers. The coefficient rings are implemented by means of packages that can be used for instantiating generic packages. In Matrices we find a generic package vectors, matrices of integer, floating-point and complex numbers. Solvers of linear systems are provided. The directory Polynomials contains the packages to deal with multivariate polynomials and systems. To deal with support sets and polytopes, linear-programming methods have been implemented in the directory Supports. SHAR_EOF fi # end of overwriting check if test ! -d 'Supports' then mkdir 'Supports' fi cd 'Supports' if test -f 'READ_ME' then echo shar: will not over-write existing file "'READ_ME'" else cat << "SHAR_EOF" > 'READ_ME' Support sets, polytopes, and feasibility of linear-inequality systems. This library contains three different methods for deciding on the feasibility of a linear-inequality system. These algorithms are independent from the data structures for support sets and faces of polytopes. 1. Linear-programming solver, efficient to extract vertices : dictios Dictionaries lp Linear_Programming 2. Implementation of Farkas lemma with generation of k-faces : givens Givens_Rotations farkas Farkas_Lemma int_farkas Integer_Farkas_Lemma facenu_ut Face_Enumerators_Utilities facenum Face_Enumerators fltfanum Float_Face_Enumerators 3. Primal-dual algorithm with inconsistency proof : flt_lis Float_Linear_Inequality_Solvers 4. Integer and floating-point lists, support function and faces : lstivc Lists_of_Integer_Vectors lstivc_io Lists_of_Integer_Vectors_io arrlivc Arrays_of_Integer_Vector_Lists arrlivc_io Arrays_of_Integer_Vector_Lists_io intsupfu Integer_Support_Functions intfaces Integer_Faces_of_Polytope intfaces_io Integer_Faces_of_Polytope_io lstfvc Lists_of_Float_Vectors lstfvc_io Lists_of_Float_Vectors_io arrlfvc Arrays_of_Float_Vector_Lists arrlfvc_io Arrays_of_Float_Vector_Lists_io fltsupfu Float_Support_Functions fltfaces Float_Faces_of_Polytope SHAR_EOF fi # end of overwriting check cd .. cd .. if test ! -d 'Objects' then mkdir 'Objects' fi cd 'Objects' if test ! -d 'Continuation' then mkdir 'Continuation' fi cd 'Continuation' if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' all: bablpoco drivwind valipoco climp # possible options for the compiler (normal,optim,suppress): # normal : without optimizations # optim : optimize as far as possible # suppress : same as optim, but with the suppression of all checks normal= optim= -O suppress= -O -S options=$(suppress) makeoptions=$(options) -v -f # compiling commands : # ada : invoke the Ada compiler directly # a.make : check dependencies before compiling compile=ada $(options) # compile=a.make $(makeoptions) # Making an Ada library : ada.lib: @-../makelib a.path -a ../System a.path -a ../Math_Lib/Numbers a.path -a ../Math_Lib/Matrices a.path -a ../Math_Lib/Polynomials a.path -a ../Homotopy # Cleaning superfluous instantations : cleaninst: @-a.cleaninst # Cleaning the Ada library : clean: a.rmlib -f # Cleaning the .imports directory : climp: @-rm -f .imports/* # Establishing the links : linkrc = ../../Continuation links: @-ln -s $(linkrc)/process_io.a process_io.a @-ln -s $(linkrc)/process_ioB.a process_ioB.a @-ln -s $(linkrc)/cont_data.a cont_data.a @-ln -s $(linkrc)/cont_dataB.a cont_dataB.a @-ln -s $(linkrc)/conpar.a conpar.a @-ln -s $(linkrc)/conparB.a conparB.a @-ln -s $(linkrc)/conpar_io.a conpar_io.a @-ln -s $(linkrc)/conpar_ioB.a conpar_ioB.a @-ln -s $(linkrc)/predictors.a predictors.a @-ln -s $(linkrc)/predictorsB.a predictorsB.a @-ln -s $(linkrc)/dispred.a dispred.a @-ln -s $(linkrc)/dispredB.a dispredB.a @-ln -s $(linkrc)/correctors.a correctors.a @-ln -s $(linkrc)/correctorsB.a correctorsB.a @-ln -s $(linkrc)/pathtrac.a pathtrac.a @-ln -s $(linkrc)/pathtracB.a pathtracB.a @-ln -s $(linkrc)/continue.a continue.a @-ln -s $(linkrc)/continueB.a continueB.a @-ln -s $(linkrc)/rootrefi.a rootrefi.a @-ln -s $(linkrc)/rootrefiB.a rootrefiB.a @-ln -s $(linkrc)/drivpoco.a drivpoco.a @-ln -s $(linkrc)/drivpocoB.a drivpocoB.a @-ln -s $(linkrc)/vlprstab.a vlrpstab.a @-ln -s $(linkrc)/vlprstabB.a vlrpstabB.a @-ln -s $(linkrc)/vlprsalg.a vlrpsalg.a @-ln -s $(linkrc)/vlprsalgB.a vlrpsalgB.a @-ln -s $(linkrc)/dirpaths.a dirpaths.a @-ln -s $(linkrc)/dirpathsB.a dirpathsB.a @-ln -s $(linkrc)/drivpadi.a drivpadi.a @-ln -s $(linkrc)/drivpadiB.a drivpadiB.a @-ln -s $(linkrc)/drivwind.a drivwind.a @-ln -s $(linkrc)/drivwindB.a drivwindB.a @-ln -s $(linkrc)/mainpoco.a mainpoco.a @-ln -s $(linkrc)/mainpocoB.a mainpocoB.a @-ln -s $(linkrc)/scanpoco.a scanpoco.a @-ln -s $(linkrc)/scanpocoB.a scanpocoB.a @-ln -s $(linkrc)/blackpoco.a blackpoco.a @-ln -s $(linkrc)/blackpocoB.a blackpocoB.a @-ln -s $(linkrc)/bablpoco.a bablpoco.a @-ln -s $(linkrc)/bablpocoB.a bablpocoB.a @-ln -s $(linkrc)/valipoco.a valipoco.a @-ln -s $(linkrc)/valipocoB.a valipocoB.a # the package the manages the i/o during continuation : proc_io: ada.lib process_io.a process_ioB.a $(compile) process_io.a process_ioB.a # The data and parameters for the continuation : condat: ada.lib cont_data.a cont_dataB.a $(compile) cont_data.a cont_dataB.a conpar: condat conpar.a conparB.a conpar_io.a conpar_ioB.a $(compile) conpar.a conparB.a conpar_io.a conpar_ioB.a # predictor-corrector based on increment-and-fix : pc_fix: proc_io condat predictors.a predictorsB.a correctors.a correctorsB.a $(compile) predictors.a predictorsB.a correctors.a correctorsB.a # The vLpRs-Algorithm for extrapolating path directions : vlprs: ada.lib vlprstab.a vlprstabB.a vlprsalg.a vlprsalgB.a $(compile) vlprstab.a vlprstabB.a vlprsalg.a vlprsalgB.a dirpaths: vlprs dirpaths.a dirpathsB.a $(compile) dirpaths.a dirpathsB.a # the path trackers and the main continuation routines : # ( Note : optimizing causes run-time error on IBM RS/6000...) pathtrac: conpar pc_fix dirpaths dispred.a dispredB.a pathtrac.a pathtracB.a ada dispred.a dispredB.a pathtrac.a pathtracB.a continue: pathtrac continue.a continueB.a ada continue.a continueB.a # roots refinement : roots: ada.lib rootrefi.a rootrefiB.a $(compile) rootrefi.a rootrefiB.a # The interactive drivers : drivpadi : continue drivpadi.a drivpadiB.a $(compile) drivpadi.a drivpadiB.a drivpoco: drivpadi proc_io roots drivpoco.a drivpocoB.a mainpoco.a mainpocoB.a $(compile) drivpoco.a drivpocoB.a mainpoco.a mainpocoB.a drivwind: drivpoco drivwind.a drivwindB.a $(compile) drivwind.a drivwindB.a blackpoco: drivpoco scanpoco.a scanpocoB.a blackpoco.a blackpocoB.a $(compile) scanpoco.a scanpocoB.a blackpoco.a blackpocoB.a bablpoco: blackpoco bablpoco.a bablpocoB.a $(compile) bablpoco.a bablpocoB.a valipoco: ada.lib valipoco.a valipocoB.a $(compile) valipoco.a valipocoB.a SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'Homotopy' then mkdir 'Homotopy' fi cd 'Homotopy' if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' all: solutions projtrans drivhoco drivscal drivred climp # possible options for the compiler (normal,optim,suppress): # normal : without optimizations # optim : optimize as far as possible # suppress : same as optim, but with the suppression of all checks normal= optim= -O suppress= -O -S options=$(suppress) makeoptions=$(options) -v -f # compiling command : # ada : compile the file # a.make : verifies dependencies before compiling compile=ada $(options) # Making an Ada library : ada.lib: @-../makelib a.path -a ../System a.path -a ../Math_Lib/Numbers a.path -a ../Math_Lib/Matrices a.path -a ../Math_Lib/Polynomials # Cleaning unnecessary instantiations : cleaninst: a.cleaninst # Cleaning the Ada library : clean: a.rmlib -f # Cleaning the .imports directory : climp: @-rm -f .imports/* # Establishing the links : linkrc = ../../Homotopy links: @-ln -s $(linkrc)/equals.a equals.a @-ln -s $(linkrc)/equalsB.a equalsB.a @-ln -s $(linkrc)/solutions.a solutions.a @-ln -s $(linkrc)/solutionsB.a solutionsB.a @-ln -s $(linkrc)/solutions_io.a solutions_io.a @-ln -s $(linkrc)/solutions_ioB.a solutions_ioB.a @-ln -s $(linkrc)/homotopy.a homotopy.a @-ln -s $(linkrc)/homotopyB.a homotopyB.a @-ln -s $(linkrc)/homzers.a homzers.a @-ln -s $(linkrc)/homzersB.a homzersB.a @-ln -s $(linkrc)/drivhoco.a drivhoco.a @-ln -s $(linkrc)/drivhocoB.a drivhocoB.a @-ln -s $(linkrc)/projtrans.a projtrans.a @-ln -s $(linkrc)/projtransB.a projtransB.a @-ln -s $(linkrc)/scaling.a scaling.a @-ln -s $(linkrc)/scalingB.a scalingB.a @-ln -s $(linkrc)/drivscals.a drivscals.a @-ln -s $(linkrc)/drivscalsB.a drivscalsB.a @-ln -s $(linkrc)/mainscal.a mainscal.a @-ln -s $(linkrc)/mainscalB.a mainscalB.a @-ln -s $(linkrc)/redupoly.a redupoly.a @-ln -s $(linkrc)/redupolyB.a redupolyB.a @-ln -s $(linkrc)/redufull.a redufull.a @-ln -s $(linkrc)/redufullB.a redufullB.a @-ln -s $(linkrc)/reduover.a reduover.a @-ln -s $(linkrc)/reduoverB.a reduoverB.a @-ln -s $(linkrc)/drivreds.a drivreds.a @-ln -s $(linkrc)/drivredsB.a drivredsB.a @-ln -s $(linkrc)/mainred.a mainred.a @-ln -s $(linkrc)/mainredB.a mainredB.a # The solutions : # for IBM RS/6000 optimizer on solutions causes STORAGE_ERROR # when clustering of solutions during continuation appears. sols: ada.lib equals.a equalsB.a solutions.a solutionsB.a $(compile) equals.a equalsB.a solutions.a ada solutionsB.a solutions: sols solutions_io.a solutions_ioB.a $(compile) solutions_io.a solutions_ioB.a # The homotopy : homotopy: ada.lib homotopy.a homotopyB.a $(compile) homotopy.a homotopyB.a # parametric homotopies : parahoms: ada.lib parahoms.a parahomsB.a parahoms_io.a parahoms_ioB.a ada parahoms.a parahomsB.a parahoms_io.a parahoms_ioB.a # Adding homogeneous equations : homzers: ada.lib homzers.a homzersB.a $(compile) homzers.a homzersB.a projtrans: homzers projtrans.a projtransB.a $(compile) projtrans.a projtransB.a # The interactive driver for the construction of the homotopy : drivhoco: homotopy homzers drivhoco.a drivhocoB.a $(compile) drivhoco.a drivhocoB.a # Scaling and reduction : scaling: solutions scaling.a scalingB.a $(compile) scaling.a scalingB.a drivscal: scaling drivscals.a drivscalsB.a mainscal.a mainscalB.a $(compile) drivscals.a drivscalsB.a mainscal.a mainscalB.a redufull: ada.lib redupoly.a redupolyB.a redufull.a redufullB.a $(compile) redupoly.a redupolyB.a redufull.a redufullB.a reduover: redufull reduover.a reduoverB.a $(compile) reduover.a reduoverB.a drivred: reduover drivreds.a drivredsB.a mainred.a mainredB.a $(compile) drivreds.a drivredsB.a mainred.a mainredB.a SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'Main' then mkdir 'Main' fi cd 'Main' if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' all: drivroco drivrore climp # possible options for the compiler (normal,optim,suppress): # normal : without optimizations # optim : optimize as far as possible # suppress : same as optim, but with the suppression of all checks normal= optim= -O suppress= -O -S options=$(suppress) # Making an Ada library : ada.lib: @-../makelib a.path -a ../System a.path -a ../Math_Lib/Numbers a.path -a ../Math_Lib/Matrices a.path -a ../Math_Lib/Supports a.path -a ../Math_Lib/Polynomials a.path -a ../Homotopy a.path -a ../Continuation a.path -a ../Root_Counts/Product a.path -a ../Root_Counts/Implift a.path -a ../Root_Counts/Stalift a.path -a ../Root_Counts/Dynlift a.path -a ../Root_Counts/Symmetry # Cleaning the Ada library : clean: a.rmlib -f # Cleaning imports : climp: @-rm -f .imports/* # Cleaning superfluous instantiations : cleaninst: @-a.cleaninst # Installing everything : install: @-./makeall # Cleaning everything : cleanall: @-./makeclean # Establishing the links : linkrc = ../../Main links: @-ln -s $(linkrc)/drivowst.a drivowst.a @-ln -s $(linkrc)/drivowstB.a drivowstB.a @-ln -s $(linkrc)/drivroco.a drivroco.a @-ln -s $(linkrc)/drivrocoB.a drivrocoB.a @-ln -s $(linkrc)/blackroco.a blackroco.a @-ln -s $(linkrc)/blackrocoB.a blackrocoB.a @-ln -s $(linkrc)/bablroco.a bablroco.a @-ln -s $(linkrc)/bablrocoB.a bablrocoB.a @-ln -s $(linkrc)/mainroco.a mainroco.a @-ln -s $(linkrc)/mainrocoB.a mainrocoB.a @-ln -s $(linkrc)/drivrore.a drivrore.a @-ln -s $(linkrc)/drivroreB.a drivroreB.a @-ln -s $(linkrc)/mainvali.a mainvali.a @-ln -s $(linkrc)/mainvaliB.a mainvaliB.a @-ln -s $(linkrc)/bablvali.a bablvali.a @-ln -s $(linkrc)/bablvaliB.a bablvaliB.a @-ln -s $(linkrc)/bablphc.a bablphc.a @-ln -s $(linkrc)/bablphcB.a bablphcB.a @-ln -s $(linkrc)/mainphc.a mainphc.a @-ln -s $(linkrc)/mainphcB.a mainphcB.a @-ln -s $(linkrc)/dispatch.a dispatch.a @-ln -s $(linkrc)/dispatchB.a dispatchB.a @-ln -s $(linkrc)/phcpack.a phcpack.a @-ln -s $(linkrc)/phcpackB.a phcpackB.a @-ln -s $(linkrc)/use_phc.a use_phc.a # The interactive driver for the preprocessing : drivprep: ada.lib drivprep.a drivprepB.a ada $(options) drivprep.a drivprepB.a # The interactive driver for the root counting methods : drivowst: ada.lib drivowst.a drivowstB.a ada $(options) drivowst.a drivowstB.a drivroco: drivowst drivroco.a drivrocoB.a mainroco.a mainrocoB.a ada $(options) drivroco.a drivrocoB.a mainroco.a mainrocoB.a roco: drivroco blackroco.a blackrocoB.a bablroco.a bablrocoB.a ada $(options) blackroco.a bablroco.a bablrocoB.a ada blackrocoB.a # The driver for root refining : validate: ada.lib mainvali.a mainvaliB.a bablvali.a bablvaliB.a ada $(options) mainvali.a mainvaliB.a bablvali.a bablvaliB.a drivrore: validate drivrore.a drivroreB.a ada $(options) drivrore.a drivroreB.a # The main interactive dispatcher: bablphc: roco drivrore mainphc.a mainphcB.a bablphc.a bablphcB.a ada $(options) mainphc.a mainphcB.a bablphc.a bablphcB.a phc: bablphc dispatch.a dispatchB.a ada $(options) dispatch.a dispatchB.a @-make climp a.ld -o ../../../bin/phc dispatch SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'Math_Lib' then mkdir 'Math_Lib' fi cd 'Math_Lib' if test ! -d 'Matrices' then mkdir 'Matrices' fi cd 'Matrices' if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' all: vec vec_io mat_io lss vvc vvc_io climp vec: vectors nat_vec int_vec flt_vec cmp_vec cmp_norms vec_io: vec nat_vec_io int_vec_io flt_vec_io cmp_vec_io mat: vec nat_mat int_mat flt_mat cmp_mat mat_io: mat int_mat_io flt_mat_io cmp_mat_io lss: mat gcd int_lss int_lis flt_lss cmp_lss vvc: vec nat_vvc int_vvc flt_vvc cmp_vvc vvc_io: vvc nat_vvc_io int_vvc_io flt_vvc_io cmp_vvc_io # possible options for the compiler (normal,optim,suppress): # normal : without optimizations # optim : optimize as far as possible # suppress : same as optim, but with the suppression of all checks normal= optim= -O suppress= -O -S options=$(suppress) makeoptions=$(options) -v -f # compiling command : # ada : compile the file # a.make : verifies dependencies before compiling compile=ada $(options) # Making an Ada library : ada.lib: @-../../makelib a.path -a ../Numbers # Cleaning the Ada library : clean: a.rmlib -f # Cleaning the .imports directory : climp: @-rm -f .imports/* # Establishing the links : linkrc = ../../../Math_Lib/Matrices links: @-ln -s $(linkrc)/gcd.a gcd.a @-ln -s $(linkrc)/gcdB.a gcdB.a @-ln -s $(linkrc)/vectors.a vectors.a @-ln -s $(linkrc)/vectorsB.a vectorsB.a @-ln -s $(linkrc)/nat_vec.a nat_vec.a @-ln -s $(linkrc)/nat_vec_io.a nat_vec_io.a @-ln -s $(linkrc)/nat_vec_ioB.a nat_vec_ioB.a @-ln -s $(linkrc)/int_vec.a int_vec.a @-ln -s $(linkrc)/int_vec_io.a int_vec_io.a @-ln -s $(linkrc)/int_vec_ioB.a int_vec_ioB.a @-ln -s $(linkrc)/flt_vec.a flt_vec.a @-ln -s $(linkrc)/flt_vec_io.a flt_vec_io.a @-ln -s $(linkrc)/flt_vec_ioB.a flt_vec_ioB.a @-ln -s $(linkrc)/cmp_vec.a cmp_vec.a @-ln -s $(linkrc)/cmp_vec_io.a cmp_vec_io.a @-ln -s $(linkrc)/cmp_vec_ioB.a cmp_vec_ioB.a @-ln -s $(linkrc)/cmp_norms.a cmp_norms.a @-ln -s $(linkrc)/cmp_normsB.a cmp_normsB.a @-ln -s $(linkrc)/nat_vvc.a nat_vvc.a @-ln -s $(linkrc)/nat_vvc_io.a nat_vvc_io.a @-ln -s $(linkrc)/nat_vvc_ioB.a nat_vvc_ioB.a @-ln -s $(linkrc)/nat_mat.a nat_mat.a @-ln -s $(linkrc)/nat_matB.a nat_matB.a @-ln -s $(linkrc)/nat_mat_io.a nat_mat_io.a @-ln -s $(linkrc)/nat_mat_ioB.a nat_mat_ioB.a @-ln -s $(linkrc)/int_mat.a int_mat.a @-ln -s $(linkrc)/int_matB.a int_matB.a @-ln -s $(linkrc)/int_mat_io.a int_mat_io.a @-ln -s $(linkrc)/int_mat_ioB.a int_mat_ioB.a @-ln -s $(linkrc)/int_lss.a int_lss.a @-ln -s $(linkrc)/int_lssB.a int_lssB.a @-ln -s $(linkrc)/int_lis.a int_lis.a @-ln -s $(linkrc)/int_lisB.a int_lisB.a @-ln -s $(linkrc)/int_vvc.a int_vvc.a @-ln -s $(linkrc)/int_vvc_io.a int_vvc_io.a @-ln -s $(linkrc)/int_vvc_ioB.a int_vvc_ioB.a @-ln -s $(linkrc)/flt_mat.a flt_mat.a @-ln -s $(linkrc)/flt_matB.a flt_matB.a @-ln -s $(linkrc)/flt_mat_io.a flt_mat_io.a @-ln -s $(linkrc)/flt_mat_ioB.a flt_mat_ioB.a @-ln -s $(linkrc)/flt_lss.a flt_lss.a @-ln -s $(linkrc)/flt_lssB.a flt_lssB.a @-ln -s $(linkrc)/flt_vvc.a flt_vvc.a @-ln -s $(linkrc)/flt_vvc_io.a flt_vvc_io.a @-ln -s $(linkrc)/flt_vvc_ioB.a flt_vvc_ioB.a @-ln -s $(linkrc)/cmp_mat.a cmp_mat.a @-ln -s $(linkrc)/cmp_matB.a cmp_matB.a @-ln -s $(linkrc)/cmp_mat_io.a cmp_mat_io.a @-ln -s $(linkrc)/cmp_mat_ioB.a cmp_mat_ioB.a @-ln -s $(linkrc)/cmp_lss.a cmp_lss.a @-ln -s $(linkrc)/cmp_lssB.a cmp_lssB.a @-ln -s $(linkrc)/cmp_vvc.a cmp_vvc.a @-ln -s $(linkrc)/cmp_vvc_io.a cmp_vvc_io.a @-ln -s $(linkrc)/cmp_vvc_ioB.a cmp_vvc_ioB.a # Greatest common divisor : gcd: ada.lib gcd.a gcdB.a $(compile) gcd.a gcdB.a # The vectors package : vectors: ada.lib vectors.a vectorsB.a $(compile) vectors.a vectorsB.a # Instantiation of natural, integer, float and complex vectors : nat_vec: vectors nat_vec.a $(compile) nat_vec.a int_vec: vectors int_vec.a $(compile) int_vec.a flt_vec: vectors flt_vec.a $(compile) flt_vec.a cmp_vec: vectors cmp_vec.a $(compile) cmp_vec.a # Norms of complex vectors : cmp_norms: cmp_vec cmp_norms.a cmp_normsB.a $(compile) cmp_norms.a cmp_normsB.a # Input/Output operations of all the vector packages : nat_vec_io: nat_vec nat_vec_io.a nat_vec_ioB.a $(compile) nat_vec_io.a nat_vec_ioB.a int_vec_io: int_vec int_vec_io.a int_vec_ioB.a $(compile) int_vec_io.a int_vec_ioB.a flt_vec_io: flt_vec flt_vec_io.a flt_vec_ioB.a $(compile) flt_vec_io.a flt_vec_ioB.a cmp_vec_io: cmp_vec cmp_vec_io.a cmp_vec_ioB.a $(compile) cmp_vec_io.a cmp_vec_ioB.a # Matrices with natural, integer, float and complex components : nat_mat: nat_vec nat_mat.a nat_matB.a $(compile) nat_mat.a nat_matB.a int_mat: int_vec int_mat.a int_matB.a $(compile) int_mat.a int_matB.a flt_mat: flt_vec flt_mat.a flt_matB.a $(compile) flt_mat.a flt_matB.a cmp_mat: cmp_vec cmp_mat.a cmp_matB.a $(compile) cmp_mat.a cmp_matB.a # Input/Output operations of all the vector packages : nat_mat_io: nat_mat nat_mat_io.a nat_mat_ioB.a $(compile) nat_mat_io.a nat_mat_ioB.a int_mat_io: int_mat int_mat_io.a int_mat_ioB.a $(compile) int_mat_io.a int_mat_ioB.a flt_mat_io: flt_mat flt_mat_io.a flt_mat_ioB.a $(compile) flt_mat_io.a flt_mat_ioB.a cmp_mat_io: cmp_mat cmp_mat_io.a cmp_mat_ioB.a $(compile) cmp_mat_io.a cmp_mat_ioB.a # Linear system solvers : int_lss: int_mat gcd int_lss.a int_lssB.a ada int_lss.a int_lssB.a flt_lss: flt_mat int_vec flt_lss.a flt_lssB.a $(compile) flt_lss.a flt_lssB.a cmp_lss: cmp_mat int_vec cmp_lss.a cmp_lssB.a $(compile) cmp_lss.a cmp_lssB.a # Linear inequality solvers : int_lis: int_lss int_lis.a int_lisB.a $(compile) int_lis.a int_lisB.a # Vectors of Vectors : nat_vvc: nat_vec nat_vvc.a $(compile) nat_vvc.a int_vvc: int_vec int_vvc.a $(compile) int_vvc.a flt_vvc: flt_vec flt_vvc.a $(compile) flt_vvc.a cmp_vvc: cmp_vec cmp_vvc.a $(compile) cmp_vvc.a # Input/Output operations of all the vectors of vectors packages : nat_vvc_io: nat_vvc nat_vvc_io.a nat_vvc_ioB.a $(compile) nat_vvc_io.a nat_vvc_ioB.a int_vvc_io: int_vvc int_vvc_io.a int_vvc_ioB.a $(compile) int_vvc_io.a int_vvc_ioB.a flt_vvc_io: flt_vvc flt_vvc_io.a flt_vvc_ioB.a $(compile) flt_vvc_io.a flt_vvc_ioB.a cmp_vvc_io: cmp_vvc cmp_vvc_io.a cmp_vvc_ioB.a $(compile) cmp_vvc_io.a cmp_vvc_ioB.a SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'Numbers' then mkdir 'Numbers' fi cd 'Numbers' if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' all: complex_io random nat_inst int_inst flt_inst cmp_inst strnum climp # possible options for the compiler (normal,optim,suppress): # normal : without optimizations # optim : optimize as far as possible # suppress : same as optim, but with the suppression of all checks normal= optim= -O suppress= -O -S options=$(suppress) makeoptions=$(options) -v -f # compiling command : # ada : compile the file # a.make : verifies dependencies before compiling compile=ada $(options) # Making an Ada library : ada.lib: @-../../makelib a.path -a ../../System # Cleaning the Ada library : clean: a.rmlib -f # Cleaning the .imports directory : climp: @-rm -f .imports/* # Establishing the links : linkrc=../../../Math_Lib/Numbers links: @-ln -s $(linkrc)/float.a float.a @-ln -s $(linkrc)/mathfun.a mathfun.a @-ln -s $(linkrc)/mathfunB.a mathfunB.a @-ln -s $(linkrc)/numbers_io.a numbers_io.a @-ln -s $(linkrc)/numbers_ioB.a numbers_ioB.a @-ln -s $(linkrc)/complex.a complex.a @-ln -s $(linkrc)/complexB.a complexB.a @-ln -s $(linkrc)/complex_io.a complex_io.a @-ln -s $(linkrc)/complex_ioB.a complex_ioB.a @-ln -s $(linkrc)/random.a random.a @-ln -s $(linkrc)/randomB.a randomB.a @-ln -s $(linkrc)/nat_inst.a nat_inst.a @-ln -s $(linkrc)/nat_instB.a nat_instB.a @-ln -s $(linkrc)/int_inst.a int_inst.a @-ln -s $(linkrc)/int_instB.a int_instB.a @-ln -s $(linkrc)/flt_inst.a flt_inst.a @-ln -s $(linkrc)/flt_instB.a flt_instB.a @-ln -s $(linkrc)/cmp_inst.a cmp_inst.a @-ln -s $(linkrc)/cmp_instB.a cmp_instB.a @-ln -s $(linkrc)/strnum.a strnum.a @-ln -s $(linkrc)/strnumB.a strnumB.a # Floating point numbers and user friendly i/o of numbers : float: ada.lib float.a numbers_io.a numbers_ioB.a mathfun.a mathfunB.a $(compile) float.a numbers_io.a numbers_ioB.a mathfun.a mathfunB.a # Complex numbers : complex: float complex.a complexB.a $(compile) complex.a complexB.a complex_io: complex complex_io.a complex_ioB.a $(compile) complex_io.a complex_ioB.a # Random number generators : random: complex random.a randomB.a $(compile) random.a randomB.a # instantiation packages : nat_inst: ada.lib nat_inst.a nat_instB.a $(compile) nat_inst.a nat_instB.a int_inst: ada.lib int_inst.a int_instB.a $(compile) int_inst.a int_instB.a flt_inst: float flt_inst.a flt_instB.a $(compile) flt_inst.a flt_instB.a cmp_inst: complex cmp_inst.a cmp_instB.a $(compile) cmp_inst.a cmp_instB.a # string conversions : strnum: ada.lib strnum.a strnumB.a $(compile) strnum.a strnumB.a SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'Polynomials' then mkdir 'Polynomials' fi cd 'Polynomials' if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' all: cmp_polsys_io jacobi pollaco tools climp # possible options for the compiler (normal,optim,suppress): # normal : without optimizations # optim : optimize as far as possible # suppress : same as optim, but with the suppression of all checks normal= optim= -O suppress= -O -S options=$(suppress) makeoptions=$(options) -v -f # compiling command : # ada : compile the file # a.make : verifies dependencies before compiling compile=ada $(options) # Making an Ada library : ada.lib: @-../../makelib a.path -a ../../System a.path -a ../Numbers a.path -a ../Matrices # Cleaning the Ada library : clean: a.rmlib -f # Cleaning the .imports directory : climp: @-rm -f .imports/* # Establishing the links : linkrc = ../../../Math_Lib/Polynomials links: @-ln -s $(linkrc)/nat_grad_lex.a nat_grad_lex.a @-ln -s $(linkrc)/nat_grad_lexB.a nat_grad_lexB.a @-ln -s $(linkrc)/int_grad_lex.a int_grad_lex.a @-ln -s $(linkrc)/int_grad_lexB.a int_grad_lexB.a @-ln -s $(linkrc)/lists.a lists.a @-ln -s $(linkrc)/listsB.a listsB.a @-ln -s $(linkrc)/expvec.a expvec.a @-ln -s $(linkrc)/expvecB.a expvecB.a @-ln -s $(linkrc)/mul_poly.a mul_poly.a @-ln -s $(linkrc)/mul_polyB.a mul_polyB.a @-ln -s $(linkrc)/mul_laur.a mul_laur.a @-ln -s $(linkrc)/mul_laurB.a mul_laurB.a @-ln -s $(linkrc)/cmp_mpoly.a cmp_mpoly.a @-ln -s $(linkrc)/cmp_mlaur.a cmp_mlaur.a @-ln -s $(linkrc)/symtab.a symtab.a @-ln -s $(linkrc)/symtabB.a symtabB.a @-ln -s $(linkrc)/symtab_io.a symtab_io.a @-ln -s $(linkrc)/symtab_ioB.a symtab_ioB.a @-ln -s $(linkrc)/cmp_mpoly_io.a cmp_mpoly_io.a @-ln -s $(linkrc)/cmp_mpoly_ioB.a cmp_mpoly_ioB.a @-ln -s $(linkrc)/cmp_polsys.a cmp_polsys.a @-ln -s $(linkrc)/cmp_polsysB.a cmp_polsysB.a @-ln -s $(linkrc)/cmp_laursys.a cmp_laursys.a @-ln -s $(linkrc)/cmp_laursysB.a cmp_laursysB.a @-ln -s $(linkrc)/pollaco.a pollaco.a @-ln -s $(linkrc)/pollacoB.a pollacoB.a @-ln -s $(linkrc)/lapolco.a lapolco.a @-ln -s $(linkrc)/lapolcoB.a lapolcoB.a @-ln -s $(linkrc)/cmp_polsys_io.a cmp_polsys_io.a @-ln -s $(linkrc)/cmp_polsys_ioB.a cmp_polsys_ioB.a @-ln -s $(linkrc)/jacobi.a jacobi.a @-ln -s $(linkrc)/jacobiB.a jacobiB.a @-ln -s $(linkrc)/laurjaco.a laurjaco.a @-ln -s $(linkrc)/laurjacoB.a laurjacoB.a @-ln -s $(linkrc)/polrand.a polrand.a @-ln -s $(linkrc)/polrandB.a polrandB.a @-ln -s $(linkrc)/laurrand.a laurrand.a @-ln -s $(linkrc)/laurrandB.a laurrandB.a @-ln -s $(linkrc)/substits.a substits.a @-ln -s $(linkrc)/substitsB.a substitsB.a # Term ordenings : nat_grad_lex: ada.lib nat_grad_lex.a nat_grad_lexB.a $(compile) nat_grad_lex.a nat_grad_lexB.a int_grad_lex: ada.lib int_grad_lex.a int_grad_lexB.a $(compile) int_grad_lex.a int_grad_lexB.a # Generic lists : lists: ada.lib lists.a listsB.a $(compile) lists.a listsB.a # Generic multivariate polynomials : mul_poly: lists mul_poly.a mul_polyB.a $(compile) mul_poly.a mul_polyB.a mul_laur: lists mul_laur.a mul_laurB.a $(compile) mul_laur.a mul_laurB.a # Complex multivariate polynomials : cmp_mpoly: mul_poly nat_grad_lex cmp_mpoly.a $(compile) cmp_mpoly.a cmp_mlaur: mul_laur int_grad_lex cmp_mlaur.a $(compile) cmp_mlaur.a # Input/Output operations of multivariate polynomials : symtab: ada.lib symtab.a symtabB.a symtab_io.a symtab_ioB.a ada symtab.a symtabB.a symtab_io.a symtab_ioB.a # Optimizing causes a run time error : cmp_mpoly_io: symtab cmp_mpoly cmp_mpoly_io.a cmp_mpoly_ioB.a ada cmp_mpoly_io.a cmp_mpoly_ioB.a # Complex polynomial systems : cmp_polsys: cmp_mpoly cmp_polsys.a cmp_polsysB.a $(compile) cmp_polsys.a cmp_polsysB.a cmp_laursys: cmp_mlaur cmp_laursys.a cmp_laursysB.a expvec.a expvecB.a $(compile) cmp_laursys.a cmp_laursysB.a expvec.a expvecB.a # Converters between the polynomial systems : pollaco: cmp_polsys cmp_laursys pollaco.a pollacoB.a lapolco.a lapolcoB.a $(compile) pollaco.a pollacoB.a lapolco.a lapolcoB.a # Input/Output operations of complex polynomial systems : cmp_polsys_io: cmp_polsys cmp_mpoly_io cmp_polsys_io.a cmp_polsys_ioB.a $(compile) cmp_polsys_io.a cmp_polsys_ioB.a # The package Jacobi_Matrices : jacobi: cmp_polsys cmp_laursys jacobi.a jacobiB.a laurjaco.a laurjacoB.a $(compile) jacobi.a jacobiB.a laurjaco.a laurjacoB.a # Some tools: randomizers and substitutors : tools: rand substits rand: cmp_polsys cmp_laursys polrand.a polrandB.a laurrand.a laurrandB.a $(compile) polrand.a polrandB.a $(compile) laurrand.a laurrandB.a substits: cmp_polsys substits.a substitsB.a $(compile) substits.a substitsB.a SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'Supports' then mkdir 'Supports' fi cd 'Supports' if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' all: lp facenum fltfanum data climp # possible options for the compiler (normal,optim,suppress): # normal : without optimizations # optim : optimize as far as possible # suppress : same as optim, but with the suppression of all checks normal= optim= -O suppress= -O -S options=$(suppress) makeoptions=$(options) -v -f # compiling command : # ada : compile the file # a.make : verifies dependencies before compiling compile=ada $(options) # Making an Ada library : ada.lib: @-../../makelib a.path -a ../../System a.path -a ../Numbers a.path -a ../Matrices a.path -a ../Polynomials # Cleaning the Ada library : clean: a.rmlib -f # Cleaning the .imports directory : climp: @-rm -f .imports/* # Establishing the links : linkrc = ../../../Math_Lib/Supports links: @-ln -s $(linkrc)/dictios.a dictios.a @-ln -s $(linkrc)/dictiosB.a dictiosB.a @-ln -s $(linkrc)/lp.a lp.a @-ln -s $(linkrc)/lpB.a lpB.a @-ln -s $(linkrc)/givens.a givens.a @-ln -s $(linkrc)/givensB.a givensB.a @-ln -s $(linkrc)/farkas.a farkas.a @-ln -s $(linkrc)/farkasB.a farkasB.a @-ln -s $(linkrc)/int_farkas.a int_farkas.a @-ln -s $(linkrc)/int_farkasB.a int_farkasB.a @-ln -s $(linkrc)/facenu_ut.a facenu_ut.a @-ln -s $(linkrc)/facenu_utB.a facenu_utB.a @-ln -s $(linkrc)/facenum.a facenum.a @-ln -s $(linkrc)/facenumB.a facenumB.a @-ln -s $(linkrc)/flt_lis.a flt_lis.a @-ln -s $(linkrc)/flt_lisB.a flt_lisB.a @-ln -s $(linkrc)/fltintro.a fltintro.a @-ln -s $(linkrc)/fltintroB.a fltintroB.a @-ln -s $(linkrc)/fltfanum.a fltfanum.a @-ln -s $(linkrc)/fltfanumB.a fltfanumB.a @-ln -s $(linkrc)/lstivc.a lstivc.a @-ln -s $(linkrc)/lstivcB.a lstivcB.a @-ln -s $(linkrc)/lstivc_io.a lstivc_io.a @-ln -s $(linkrc)/lstivc_ioB.a lstivc_ioB.a @-ln -s $(linkrc)/arrlivc.a arrlivc.a @-ln -s $(linkrc)/arrlivcB.a arrlivcB.a @-ln -s $(linkrc)/arrlivc_io.a arrlivc_io.a @-ln -s $(linkrc)/arrlivc_ioB.a arrlivc_ioB.a @-ln -s $(linkrc)/intsupfu.a intsupfu.a @-ln -s $(linkrc)/intsupfuB.a intsupfuB.a @-ln -s $(linkrc)/intfaces.a intfaces.a @-ln -s $(linkrc)/intfacesB.a intfacesB.a @-ln -s $(linkrc)/intfaces_io.a intfaces_io.a @-ln -s $(linkrc)/intfaces_ioB.a intfaces_ioB.a @-ln -s $(linkrc)/lstfvc.a lstfvc.a @-ln -s $(linkrc)/lstfvcB.a lstfvcB.a @-ln -s $(linkrc)/lstfvc_io.a lstfvc_io.a @-ln -s $(linkrc)/lstfvc_ioB.a lstfvc_ioB.a @-ln -s $(linkrc)/arrlfvc.a arrlfvc.a @-ln -s $(linkrc)/arrlfvcB.a arrlfvcB.a @-ln -s $(linkrc)/arrlfvc_io.a arrlfvc_io.a @-ln -s $(linkrc)/arrlfvc_ioB.a arrlfvc_ioB.a @-ln -s $(linkrc)/fltsupfu.a fltsupfu.a @-ln -s $(linkrc)/fltsupfuB.a fltsupfuB.a @-ln -s $(linkrc)/fltfaces.a fltfaces.a @-ln -s $(linkrc)/fltfacesB.a fltfacesB.a # Linear programming and the simplex method : lp: ada.lib dictios.a dictiosB.a lp.a lpB.a $(compile) dictios.a dictiosB.a lp.a lpB.a # Farkas lemma and complementary slackness : farkas: ada.lib givens.a givensB.a farkas.a farkasB.a flt_lis.a flt_lisB.a ada givens.a givensB.a flt_lis.a flt_lisB.a ada farkas.a farkasB.a int_farkas: farkas int_farkas.a int_farkasB.a fltintro.a fltintroB.a $(compile) int_farkas.a int_farkasB.a ada fltintro.a fltintroB.a # Enumeration of faces : facenum: int_farkas facenu_ut.a facenu_utB.a facenum.a facenumB.a $(compile) facenu_ut.a facenu_utB.a facenum.a facenumB.a fltfanum: farkas fltfanum.a fltfanumB.a $(compile) fltfanum.a fltfanumB.a # data structures: lstivc: ada.lib lstivc.a lstivcB.a lstivc_io.a lstivc_ioB.a $(compile) lstivc.a lstivcB.a lstivc_io.a lstivc_ioB.a arrlivc: lstivc arrlivc.a arrlivcB.a arrlivc_io.a arrlivc_ioB.a $(compile) arrlivc.a arrlivcB.a arrlivc_io.a arrlivc_ioB.a intfaces: lstivc intfaces.a intfacesB.a intfaces_io.a intfaces_ioB.a $(compile) intfaces.a intfacesB.a intfaces_io.a intfaces_ioB.a intsupfu: lstivc intsupfu.a intsupfuB.a $(compile) intsupfu.a intsupfuB.a lstfvc: ada.lib lstfvc.a lstfvcB.a lstfvc_io.a lstfvc_ioB.a $(compile) lstfvc.a lstfvcB.a lstfvc_io.a lstfvc_ioB.a arrlfvc: lstfvc arrlfvc.a arrlfvcB.a arrlfvc_io.a arrlfvc_ioB.a $(compile) arrlfvc.a arrlfvcB.a arrlfvc_io.a arrlfvc_ioB.a fltfaces: lstfvc fltsupfu.a fltsupfuB.a fltfaces.a fltfacesB.a $(compile) fltsupfu.a fltsupfuB.a fltfaces.a fltfacesB.a data: arrlivc intfaces intsupfu arrlfvc fltfaces SHAR_EOF fi # end of overwriting check cd .. if test -f 'makeall' then echo shar: will not over-write existing file "'makeall'" else cat << "SHAR_EOF" > 'makeall' echo '**** Making the Numbers Library ****' cd Numbers make all echo '**** Making the Matrices Library ****' cd ../Matrices make all echo '**** Making the Polynomials Library ****' cd ../Polynomials make all echo '**** Making the Supports Library ****' cd ../Supports make all cd .. SHAR_EOF fi # end of overwriting check if test -f 'makeclean' then echo shar: will not over-write existing file "'makeclean'" else cat << "SHAR_EOF" > 'makeclean' echo '**** Cleaning the Supports Library ****' cd Supports make clean echo '**** Cleaning the Polynomials Library ****' cd ../Polynomials make clean echo '**** Cleaning the Matrices Library ****' cd ../Matrices make clean echo '**** Cleaning the Numbers Library ****' cd ../Numbers make clean cd .. SHAR_EOF fi # end of overwriting check if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' # Making the library with the root counts: all: @-./makeall clean: @-./makeclean SHAR_EOF fi # end of overwriting check cd .. if test -f 'READ_ME' then echo shar: will not over-write existing file "'READ_ME'" else cat << "SHAR_EOF" > 'READ_ME' This directory mirrors the tree structure of the package and contains the makefiles to install phc with the VADS compiler, for DEC/Ultrix, IBM RS6000/AIX and SUN/Solaris. To install the packages, do : 0. Make sure you have a VADS compiler installed, the file PHC/READ_ME contains information on obtaining it; 1. Set the right ADAPATH in makelib. 2. Type make all > makelog & If all goes well, you can find the executable as file phc in the directory PHC/bin. To clean the auxiliary files type make clean SHAR_EOF fi # end of overwriting check if test ! -d 'Root_Counts' then mkdir 'Root_Counts' fi cd 'Root_Counts' if test ! -d 'Dynlift' then mkdir 'Dynlift' fi cd 'Dynlift' if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' all: drivdynl babldmvc climp # possible options for the compiler (normal,optim,suppress): # normal : without optimizations # optim : optimize as far as possible # suppress : same as optim, but with the suppression of all checks normal= optim= -O suppress= -O -S options=$(suppress) makeoptions=$(options) -v -f # compiling command : # ada : compile the file # a.make : verifies dependencies before compiling compile=ada $(options) # compile=a.make $(makeoptions) # Making an Ada library : ada.lib: @-../../makelib a.path -a ../../System a.path -a ../../Math_Lib/Numbers a.path -a ../../Math_Lib/Matrices a.path -a ../../Math_Lib/Polynomials a.path -a ../../Math_Lib/Supports a.path -a ../../Homotopy a.path -a ../../Continuation a.path -a ../Product a.path -a ../Implift a.path -a ../Stalift # Cleaning the Ada library : clean: a.rmlib -f # Cleaning the .imports directory : climp: @-rm -f .imports/* # Establishing the links : linkrc = ../../../Root_Counts/Dynlift links: @-ln -s $(linkrc)/simplex.a simplex.a @-ln -s $(linkrc)/simplexB.a simplexB.a @-ln -s $(linkrc)/simplex_io.a simplex_io.a @-ln -s $(linkrc)/simplex_ioB.a simplex_ioB.a @-ln -s $(linkrc)/triangle.a triangle.a @-ln -s $(linkrc)/triangleB.a triangleB.a @-ln -s $(linkrc)/triangle_io.a triangle_io.a @-ln -s $(linkrc)/triangle_ioB.a triangle_ioB.a @-ln -s $(linkrc)/glodyntri.a glodyntri.a @-ln -s $(linkrc)/glodyntriB.a glodyntriB.a @-ln -s $(linkrc)/dynlift.a dynlift.a @-ln -s $(linkrc)/dynliftB.a dynliftB.a @-ln -s $(linkrc)/dyntri.a dyntri.a @-ln -s $(linkrc)/dyntriB.a dyntriB.a @-ln -s $(linkrc)/cayemb.a cayemb.a @-ln -s $(linkrc)/cayembB.a cayembB.a @-ln -s $(linkrc)/cayley.a cayley.a @-ln -s $(linkrc)/cayleyB.a cayleyB.a @-ln -s $(linkrc)/minkpoly.a minkpoly.a @-ln -s $(linkrc)/minkpolyB.a minkpolyB.a @-ln -s $(linkrc)/drivmink.a drivmink.a @-ln -s $(linkrc)/drivminkB.a drivminkB.a @-ln -s $(linkrc)/commfaces.a commfaces.a @-ln -s $(linkrc)/commfacesB.a commfacesB.a @-ln -s $(linkrc)/enumfaces.a enumfaces.a @-ln -s $(linkrc)/enumfacesB.a enumfacesB.a @-ln -s $(linkrc)/freqgraph.a freqgraph.a @-ln -s $(linkrc)/freqgraphB.a freqgraphB.a @-ln -s $(linkrc)/initmice.a initmice.a @-ln -s $(linkrc)/initmiceB.a initmiceB.a @-ln -s $(linkrc)/flatmisu.a flatmisu.a @-ln -s $(linkrc)/flatmisuB.a flatmisuB.a @-ln -s $(linkrc)/unfolding.a unfolding.a @-ln -s $(linkrc)/unfoldingB.a unfoldingB.a @-ln -s $(linkrc)/triamisu.a triamisu.a @-ln -s $(linkrc)/triamisuB.a triamisuB.a @-ln -s $(linkrc)/dymisudi.a dymisudi.a @-ln -s $(linkrc)/dymisudiB.a dymisudiB.a @-ln -s $(linkrc)/dynpolco.a dynpolco.a @-ln -s $(linkrc)/dynpolcoB.a dynpolcoB.a @-ln -s $(linkrc)/drivdynl.a drivdynl.a @-ln -s $(linkrc)/drivdynlB.a drivdynlB.a @-ln -s $(linkrc)/dbkkcomp.a dbkkcomp.a @-ln -s $(linkrc)/dbkkcompB.a dbkkcompB.a @-ln -s $(linkrc)/blackmvc.a blackmvc.a @-ln -s $(linkrc)/blackmvcB.a blackmvcB.a @-ln -s $(linkrc)/babldmvc.a babldmvc.a @-ln -s $(linkrc)/babldmvcB.a babldmvcB.a # simplices : simplex: ada.lib simplex.a simplexB.a simplex_io.a simplex_ioB.a $(compile) simplex.a simplexB.a simplex_io.a simplex_ioB.a # triangulations : triangle: simplex triangle.a triangleB.a triangle_io.a triangle_ioB.a $(compile) triangle.a triangleB.a triangle_io.a triangle_ioB.a # utilities and dynamic lifting dyntri: triangle glodyntri.a glodyntriB.a dynlift.a dynliftB.a dyntri.a dyntriB.a $(compile) glodyntri.a glodyntriB.a dynlift.a dynliftB.a $(compile) dyntri.a dyntriB.a # The Cayley trick : flatmisu: ada.lib flatmisu.a flatmisuB.a $(compile) flatmisu.a flatmisuB.a cayley: dyntri flatmisu cayemb.a cayembB.a cayley.a cayleyB.a $(compile) cayemb.a cayembB.a cayley.a cayleyB.a minkpoly: cayley minkpoly.a minkpolyB.a drivmink.a drivminkB.a $(compile) minkpoly.a minkpolyB.a drivmink.a drivminkB.a # Dynamic mixed subdivisions : fac_util: ada.lib commfaces.a commfacesB.a enumfaces.a enumfacesB.a $(compile) commfaces.a commfacesB.a enumfaces.a enumfacesB.a initmice: ada.lib freqgraph.a freqgraphB.a initmice.a initmiceB.a $(compile) freqgraph.a freqgraphB.a initmice.a initmiceB.a unfolding: flatmisu unfolding.a unfoldingB.a triamisu.a triamisuB.a $(compile) unfolding.a unfoldingB.a triamisu.a triamisuB.a dymisudi: dyntri fac_util initmice unfolding dymisudi.a dymisudiB.a $(compile) dymisudi.a dymisudiB.a dynpolco: dymisudi dynpolco.a dynpolcoB.a $(compile) dynpolco.a dynpolcoB.a # The drivers : drivdynl: minkpoly dynpolco drivdynl.a drivdynlB.a $(compile) drivdynl.a drivdynlB.a blackmvc: dynpolco dbkkcomp.a dbkkcompB.a blackmvc.a blackmvcB.a ada dbkkcomp.a dbkkcompB.a $(compile) blackmvc.a blackmvcB.a babldmvc: blackmvc babldmvc.a babldmvcB.a $(compile) babldmvc.a babldmvcB.a SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'Implift' then mkdir 'Implift' fi cd 'Implift' if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' all: drivimpl climp # possible options for the compiler (normal,optim,suppress): # normal : without optimizations # optim : optimize as far as possible # suppress : same as optim, but with the suppression of all checks normal= optim= -O suppress= -O -S options=$(suppress) makeoptions=$(options) -v -f # compiling command : # ada : compile the file # a.make : verifies dependencies before compiling compile=ada $(options) # Making an Ada library : ada.lib: @-../../makelib a.path -a ../../System a.path -a ../../Math_Lib/Numbers a.path -a ../../Math_Lib/Matrices a.path -a ../../Math_Lib/Polynomials a.path -a ../../Math_Lib/Supports a.path -a ../../Homotopy a.path -a ../../Continuation a.path -a ../Product # Cleaning the Ada library : clean: a.rmlib -f # Cleaning the .imports directory : climp: @-rm -f .imports/* # Establishing the links : linkrc = ../../../Root_Counts/Implift links: @-ln -s $(linkrc)/transfo.a transfo.a @-ln -s $(linkrc)/transfoB.a transfoB.a @-ln -s $(linkrc)/transfo_io.a transfo_io.a @-ln -s $(linkrc)/transfo_ioB.a transfo_ioB.a @-ln -s $(linkrc)/intvec_ut.a intvec_ut.a @-ln -s $(linkrc)/intvec_utB.a intvec_utB.a @-ln -s $(linkrc)/lstivc_ut.a lstivc_ut.a @-ln -s $(linkrc)/lstivc_utB.a lstivc_utB.a @-ln -s $(linkrc)/arrlivc_ut.a arrlivc_ut.a @-ln -s $(linkrc)/arrlivc_utB.a arrlivc_utB.a @-ln -s $(linkrc)/transols.a transols.a @-ln -s $(linkrc)/transolsB.a transolsB.a @-ln -s $(linkrc)/tranlaur.a tranlaur.a @-ln -s $(linkrc)/tranlaurB.a tranlaurB.a @-ln -s $(linkrc)/tranlists.a tranlists.a @-ln -s $(linkrc)/tranlistsB.a tranlistsB.a @-ln -s $(linkrc)/binom.a binom.a @-ln -s $(linkrc)/binomB.a binomB.a @-ln -s $(linkrc)/fewnom.a fewnom.a @-ln -s $(linkrc)/fewnomB.a fewnomB.a @-ln -s $(linkrc)/tv.a tv.a @-ln -s $(linkrc)/tvB.a tvB.a @-ln -s $(linkrc)/tv_io.a tv_io.a @-ln -s $(linkrc)/tv_ioB.a tv_ioB.a @-ln -s $(linkrc)/powlis.a powlis.a @-ln -s $(linkrc)/powlisB.a powlisB.a @-ln -s $(linkrc)/durker.a durker.a @-ln -s $(linkrc)/durkerB.a durkerB.a @-ln -s $(linkrc)/mihoco.a mihoco.a @-ln -s $(linkrc)/mihocoB.a mihocoB.a @-ln -s $(linkrc)/facenusu.a facenusu.a @-ln -s $(linkrc)/facenusuB.a facenusuB.a @-ln -s $(linkrc)/volumes.a volumes.a @-ln -s $(linkrc)/volumesB.a volumesB.a @-ln -s $(linkrc)/vertices.a vertices.a @-ln -s $(linkrc)/verticesB.a verticesB.a @-ln -s $(linkrc)/setsvol.a setsvol.a @-ln -s $(linkrc)/setsvolB.a setsvolB.a @-ln -s $(linkrc)/genpos.a genpos.a @-ln -s $(linkrc)/genposB.a genposB.a @-ln -s $(linkrc)/drivpts.a drivpts.a @-ln -s $(linkrc)/drivptsB.a drivptsB.a @-ln -s $(linkrc)/drivplc.a drivplc.a @-ln -s $(linkrc)/drivplcB.a drivplcB.a @-ln -s $(linkrc)/drivimpl.a drivimpl.a @-ln -s $(linkrc)/drivimplB.a drivimplB.a # Unimodular transformations : transfo: ada.lib transfo.a transfoB.a transfo_io.a transfo_ioB.a $(compile) transfo.a transfoB.a transfo_io.a transfo_ioB.a intvec_ut: transfo intvec_ut.a intvec_utB.a $(compile) intvec_ut.a intvec_utB.a tranlists: intvec_ut tranlists.a tranlistsB.a $(compile) tranlists.a tranlistsB.a transform: tranlists transols.a transolsB.a tranlaur.a tranlaurB.a $(compile) transols.a transolsB.a tranlaur.a tranlaurB.a # Utilities for lists of integer vectors : lstivc_ut: intvec_ut lstivc_ut.a lstivc_utB.a $(compile) lstivc_ut.a lstivc_utB.a arrlivc_ut: transform lstivc_ut arrlivc_ut.a arrlivc_utB.a $(compile) arrlivc_ut.a arrlivc_utB.a # solving binomial and fewnomial systems : bi: ada.lib transform binom.a binomB.a $(compile) binom.a binomB.a few: bi fewnom.a fewnomB.a $(compile) fewnom.a fewnomB.a # auxiliairy data structure : tv: ada.lib tv.a tvB.a tv_io.a tv_ioB.a $(compile) tv.a tvB.a tv_io.a tv_ioB.a # computing volumes and mixed volumes : vol: arrlivc_ut tv facenusu.a facenusuB.a volumes.a volumesB.a $(compile) facenusu.a facenusuB.a volumes.a volumesB.a # constructing support sets powlis: ada.lib powlis.a powlisB.a $(compile) powlis.a powlisB.a # The method of Durand-Kerner : durker: ada.lib durker.a durkerB.a $(compile) durker.a durkerB.a # mixed homotopy continuation : mihoco: few vol powlis durker mihoco.a mihocoB.a $(compile) mihoco.a mihocoB.a # extracting the vertices : vertices: ada.lib vertices.a verticesB.a drivpts.a drivptsB.a $(compile) vertices.a verticesB.a drivpts.a drivptsB.a # checking generic position : genpos: powlis tv genpos.a genposB.a $(compile) genpos.a genposB.a # an interactive driver for computing the BKK bound and for # constructing a random coefficient start system : drivplc: ada.lib drivplc.a drivplcB.a $(compile) drivplc.a drivplcB.a setsvol: mihoco vol setsvol.a setsvolB.a $(compile) setsvol.a setsvolB.a drivimpl: setsvol vertices genpos drivplc drivimpl.a drivimplB.a $(compile) drivimpl.a drivimplB.a SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'Product' then mkdir 'Product' fi cd 'Product' if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' all: startsys drivmhom drivmuho drivss climp # possible options for the compiler (normal,optim,suppress): # normal : without optimizations # optim : optimize as far as possible # suppress : same as optim, but with the suppression of all checks # WARNING : Optimizer produces wrong results with enumeration strategy # in the package m_Homogeneous_Bezout_Numbers! normal= optim= -O suppress= -O -S options=$(normal) makeoptions=$(options) -v -f # compiling command : # ada : compile the file # a.make : verifies dependencies before compiling compile=ada $(options) # Making an Ada library : ada.lib: @-../../makelib a.path -a ../../System a.path -a ../../Math_Lib/Numbers a.path -a ../../Math_Lib/Matrices a.path -a ../../Math_Lib/Polynomials a.path -a ../../Math_Lib/Supports a.path -a ../../Homotopy # Cleaning the Ada library : clean: a.rmlib -f # Cleaning the .imports directory : climp: @-rm -f .imports/* # Establishing the links : linkrc = ../../../Root_Counts/Product links: @-ln -s $(linkrc)/startsys.a startsys.a @-ln -s $(linkrc)/startsysB.a startsysB.a @-ln -s $(linkrc)/sets.a sets.a @-ln -s $(linkrc)/setsB.a setsB.a @-ln -s $(linkrc)/sets_io.a sets_io.a @-ln -s $(linkrc)/sets_ioB.a sets_ioB.a @-ln -s $(linkrc)/partsets.a partsets.a @-ln -s $(linkrc)/partsetsB.a partsetsB.a @-ln -s $(linkrc)/partsets_io.a partsets_io.a @-ln -s $(linkrc)/partsets_ioB.a partsets_ioB.a @-ln -s $(linkrc)/degsets.a degsets.a @-ln -s $(linkrc)/degsetsB.a degsetsB.a @-ln -s $(linkrc)/mhombez.a mhombez.a @-ln -s $(linkrc)/mhombezB.a mhombezB.a @-ln -s $(linkrc)/mhomstart.a mhomstart.a @-ln -s $(linkrc)/mhomstartB.a mhomstartB.a @-ln -s $(linkrc)/generate.a generate.a @-ln -s $(linkrc)/generateB.a generateB.a @-ln -s $(linkrc)/intehom.a intehom.a @-ln -s $(linkrc)/intehomB.a intehomB.a @-ln -s $(linkrc)/drivinho.a drivinho.a @-ln -s $(linkrc)/drivinhoB.a drivinhoB.a @-ln -s $(linkrc)/drivmhom.a drivmhom.a @-ln -s $(linkrc)/drivmhomB.a drivmhomB.a @-ln -s $(linkrc)/rps.a rps.a @-ln -s $(linkrc)/rpsB.a rpsB.a @-ln -s $(linkrc)/rps_io.a rps_io.a @-ln -s $(linkrc)/rps_ioB.a rps_ioB.a @-ln -s $(linkrc)/rpss.a rpss.a @-ln -s $(linkrc)/rpssB.a rpssB.a @-ln -s $(linkrc)/ds.a ds.a @-ln -s $(linkrc)/dsB.a dsB.a @-ln -s $(linkrc)/drivmuho.a drivmuho.a @-ln -s $(linkrc)/drivmuhoB.a drivmuhoB.a @-ln -s $(linkrc)/ss.a ss.a @-ln -s $(linkrc)/ssB.a ssB.a @-ln -s $(linkrc)/ss_io.a ss_io.a @-ln -s $(linkrc)/ss_ioB.a ss_ioB.a @-ln -s $(linkrc)/crpss.a crpss.a @-ln -s $(linkrc)/crpssB.a crpssB.a @-ln -s $(linkrc)/persets.a persets.a @-ln -s $(linkrc)/persetsB.a persetsB.a @-ln -s $(linkrc)/drivss.a drivss.a @-ln -s $(linkrc)/drivssB.a drivssB.a # Start systems based on the total degree : startsys: ada.lib startsys.a startsysB.a $(compile) startsys.a startsysB.a # Sets of unknowns : sets: ada.lib sets.a setsB.a sets_io.a sets_ioB.a $(compile) sets.a setsB.a sets_io.a sets_ioB.a partsets: sets partsets.a partsetsB.a partsets_io.a partsets_ioB.a $(compile) partsets.a partsetsB.a partsets_io.a partsets_ioB.a degsets: partsets degsets.a degsetsB.a generate.a generateB.a $(compile) degsets.a degsetsB.a generate.a generateB.a # Random product systems : rps: ada.lib rps.a rpsB.a rps_io.a rps_ioB.a $(compile) rps.a rpsB.a rps_io.a rps_ioB.a # m-homogenization (interpolating and linear-product start systems) : mhom: degsets mhombez.a mhombezB.a rps mhomstart.a mhomstartB.a $(compile) mhombez.a mhombezB.a $(compile) mhomstart.a mhomstartB.a intehom: degsets intehom.a intehomB.a drivinho.a drivinhoB.a $(compile) intehom.a intehomB.a drivinho.a drivinhoB.a drivmhom: mhom intehom drivmhom.a drivmhomB.a $(compile) drivmhom.a drivmhomB.a # Projective transformations: mprojtrans: sets mprojtrans.a mprojtransB.a $(compile) mprojtrans.a mprojtransB.a # multi-homogenization (the GBQ-Algorithm) : muho: degsets ds.a dsB.a rps rpss.a rpssB.a $(compile) ds.a dsB.a $(compile) rpss.a rpssB.a drivmuho: muho drivmuho.a drivmuhoB.a $(compile) drivmuho.a drivmuhoB.a # set-structure analysis (Symbolic Homotopy Construction) : ss: degsets ss.a ssB.a ss_io.a ss_ioB.a rps crpss.a crpssB.a $(compile) ss.a ssB.a ss_io.a ss_ioB.a crpss.a crpssB.a drivss: ss persets.a persetsB.a drivss.a drivssB.a $(compile) persets.a persetsB.a drivss.a drivssB.a SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'Stalift' then mkdir 'Stalift' fi cd 'Stalift' if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' all: bkkcomp drivstal climp # possible options for the compiler (normal,optim,suppress): # normal : without optimizations # optim : optimize as far as possible # suppress : same as optim, but with the suppression of all checks normal= optim= -O suppress= -O -S options=$(suppress) makeoptions=$(options) -v -f # compiling command : # ada : compile the file # a.make : verifies dependencies before compiling compile=ada $(options) # Making an Ada library : ada.lib: @-../../makelib a.path -a ../../System a.path -a ../../Math_Lib/Numbers a.path -a ../../Math_Lib/Matrices a.path -a ../../Math_Lib/Polynomials a.path -a ../../Math_Lib/Supports a.path -a ../../Homotopy a.path -a ../../Continuation a.path -a ../Product a.path -a ../Implift # Cleaning the Ada library : clean: a.rmlib -f # Cleaning the .imports directory : climp: @-rm -f .imports/* # Establishing the links : linkrc = ../../../Root_Counts/Stalift links: @-ln -s $(linkrc)/intlift.a intlift.a @-ln -s $(linkrc)/intliftB.a intliftB.a @-ln -s $(linkrc)/intlift_ut.a intlift_ut.a @-ln -s $(linkrc)/intlift_utB.a intlift_utB.a @-ln -s $(linkrc)/intmisu.a intmisu.a @-ln -s $(linkrc)/intmisuB.a intmisuB.a @-ln -s $(linkrc)/intmisu_io.a intmisu_io.a @-ln -s $(linkrc)/intmisu_ioB.a intmisu_ioB.a @-ln -s $(linkrc)/intprune.a intprune.a @-ln -s $(linkrc)/intpruneB.a intpruneB.a @-ln -s $(linkrc)/comisudi.a comisudi.a @-ln -s $(linkrc)/comisudiB.a comisudiB.a @-ln -s $(linkrc)/mivoco.a mivoco.a @-ln -s $(linkrc)/mivocoB.a mivocoB.a @-ln -s $(linkrc)/intpolco.a intpolco.a @-ln -s $(linkrc)/intpolcoB.a intpolcoB.a @-ln -s $(linkrc)/bkkcomp.a bkkcomp.a @-ln -s $(linkrc)/bkkcompB.a bkkcompB.a @-ln -s $(linkrc)/fltmisu.a fltmisu.a @-ln -s $(linkrc)/fltmisuB.a fltmisuB.a @-ln -s $(linkrc)/fltmisu_io.a fltmisu_io.a @-ln -s $(linkrc)/fltmisu_ioB.a fltmisu_ioB.a @-ln -s $(linkrc)/fltpolco.a fltpolco.a @-ln -s $(linkrc)/fltpolcoB.a fltpolcoB.a @-ln -s $(linkrc)/fltlift.a fltlift.a @-ln -s $(linkrc)/fltliftB.a fltliftB.a @-ln -s $(linkrc)/fltlift_ut.a fltlift_ut.a @-ln -s $(linkrc)/fltlift_utB.a fltlift_utB.a @-ln -s $(linkrc)/fltprune.a fltprune.a @-ln -s $(linkrc)/fltpruneB.a fltpruneB.a @-ln -s $(linkrc)/cofltint.a cofltint.a @-ln -s $(linkrc)/cofltintB.a cofltintB.a @-ln -s $(linkrc)/inncones.a inncones.a @-ln -s $(linkrc)/innconesB.a innconesB.a @-ln -s $(linkrc)/noconint.a noconint.a @-ln -s $(linkrc)/noconintB.a noconintB.a @-ln -s $(linkrc)/contrimv.a contrimv.a @-ln -s $(linkrc)/contrimvB.a contrimvB.a @-ln -s $(linkrc)/drivcomv.a drivcomv.a @-ln -s $(linkrc)/drivcomvB.a drivcomvB.a @-ln -s $(linkrc)/drivcrit.a drivcrit.a @-ln -s $(linkrc)/drivcritB.a drivcritB.a @-ln -s $(linkrc)/drivlift.a drivlift.a @-ln -s $(linkrc)/drivliftB.a drivliftB.a @-ln -s $(linkrc)/prunstat.a prunstat.a @-ln -s $(linkrc)/prunstatB.a prunstatB.a @-ln -s $(linkrc)/drivstal.a drivstal.a @-ln -s $(linkrc)/drivstalB.a drivstalB.a # Integer regular mixed subdivisions : lift: ada.lib intlift.a intliftB.a $(compile) intlift.a intliftB.a misudi: ada.lib intmisu.a mivoco.a intmisuB.a intmisu_io.a intmisu_ioB.a $(compile) intmisu.a mivoco.a intmisuB.a $(compile) intmisu_io.a intmisu_ioB.a intlift_ut: misudi lift intlift_ut.a intlift_utB.a $(compile) intlift_ut.a intlift_utB.a comisudi: intlift_ut intprune.a intpruneB.a comisudi.a comisudiB.a $(compile) intprune.a intpruneB.a comisudi.a comisudiB.a # Floating-point regular mixed subdivisions : fltmisu: ada.lib fltmisu.a fltmisuB.a $(compile) fltmisu.a fltmisuB.a fltpolco: fltmisu fltpolco.a fltpolcoB.a $(compile) fltpolco.a fltpolcoB.a fltprune: fltpolco fltprune.a fltpruneB.a fltlift.a fltliftB.a $(compile) fltprune.a fltpruneB.a fltlift.a fltliftB.a cofltint: fltmisu cofltint.a cofltintB.a fltlift_ut.a fltlift_utB.a $(compile) cofltint.a cofltintB.a fltlift_ut.a fltlift_utB.a fltmisu_io: cofltint fltmisu_io.a fltmisu_ioB.a $(compile) fltmisu_io.a fltmisu_ioB.a drivlift: fltmisu_io fltprune drivlift.a drivliftB.a $(compile) drivlift.a drivliftB.a # Computing the mixed volume, based on a coherent mixed subdivision : mixvol: comisudi mixvol.a $(compile) mixvol.a @-make climp a.ld -o /tmp/mixvol mixed_volume mivoco: comisudi misudi mivocoB.a $(compile) mivocoB.a # Polyhedral homotopy continuation : intpolco: misudi bkkcomp.a intpolco.a intpolcoB.a $(compile) bkkcomp.a $(compile) intpolco.a intpolcoB.a # Black box routines for computing BKK bound : bkkcomp: mivoco intpolco bkkcompB.a ada bkkcompB.a # note that optimization for bkkcompB.a causes an assertion_error # Computing zero contributions and essential sets : norcones: ada.lib inncones.a innconesB.a noconint.a noconintB.a $(compile) inncones.a innconesB.a noconint.a noconintB.a drivcomv: norcones contrimv.a contrimvB.a drivcomv.a drivcomvB.a $(compile) contrimv.a contrimvB.a drivcomv.a drivcomvB.a drivcrit: drivcomv drivcrit.a drivcritB.a $(compile) drivcrit.a drivcritB.a # Drivers for constructing a regular mixed subdivision : prunstat: ada.lib prunstat.a prunstatB.a $(compile) prunstat.a prunstatB.a drivstal: intlift_ut bkkcomp drivcrit prunstat drivlift drivstal.a drivstalB.a $(compile) drivstal.a drivstalB.a SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'Symmetry' then mkdir 'Symmetry' fi cd 'Symmetry' if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' all: drivsss drivsyml climp # possible options for the compiler (normal,optim,suppress): # normal : without optimizations # optim : optimize as far as possible # suppress : same as optim, but with the suppression of all checks normal= optim= -O suppress= -O -S options=$(suppress) makeoptions=$(options) -v -f # compiling command : # ada : compile the file # a.make : verifies dependencies before compiling compile=ada $(options) # compile=a.make $(makeoptions) # NOTE : # drivgrp_io raises exceptions when optimized # Making an Ada library : ada.lib: @-../../makelib a.path -a ../../System a.path -a ../../Math_Lib/Numbers a.path -a ../../Math_Lib/Matrices a.path -a ../../Math_Lib/Polynomials a.path -a ../../Math_Lib/Supports a.path -a ../../Homotopy a.path -a ../../Continuation a.path -a ../Product a.path -a ../Implift a.path -a ../Stalift a.path -a ../Dynlift # Cleaning the Ada library : clean: a.rmlib -f # Cleaning the .imports directory : climp: @-rm -f .imports/* # Establishing the links : linkrc = ../../../Root_Counts/Symmetry links: @-ln -s $(linkrc)/perms.a perms.a @-ln -s $(linkrc)/permsB.a permsB.a @-ln -s $(linkrc)/permops.a permops.a @-ln -s $(linkrc)/permopsB.a permopsB.a @-ln -s $(linkrc)/templates.a templates.a @-ln -s $(linkrc)/templatesB.a templatesB.a @-ln -s $(linkrc)/symgrp.a symgrp.a @-ln -s $(linkrc)/symgrpB.a symgrpB.a @-ln -s $(linkrc)/symgrp_io.a symgrp_io.a @-ln -s $(linkrc)/symgrp_ioB.a symgrp_ioB.a @-ln -s $(linkrc)/sbsymgrp_io.a sbsymgrp_io.a @-ln -s $(linkrc)/sbsymgrp_ioB.a sbsymgrp_ioB.a @-ln -s $(linkrc)/orbits.a orbits.a @-ln -s $(linkrc)/orbitsB.a orbitsB.a @-ln -s $(linkrc)/orbits_io.a orbits_io.a @-ln -s $(linkrc)/orbits_ioB.a orbits_ioB.a @-ln -s $(linkrc)/equpsys.a equpsys.a @-ln -s $(linkrc)/equpsysB.a equpsysB.a @-ln -s $(linkrc)/sym_ss.a sym_ss.a @-ln -s $(linkrc)/sym_ssB.a sym_ssB.a @-ln -s $(linkrc)/lsymred.a lsymred.a @-ln -s $(linkrc)/lsymredB.a lsymredB.a @-ln -s $(linkrc)/drivgrp_io.a drivgrp_io.a @-ln -s $(linkrc)/drivgrp_ioB.a drivgrp_ioB.a @-ln -s $(linkrc)/drivorbi.a drivorbi.a @-ln -s $(linkrc)/drivorbiB.a drivorbiB.a @-ln -s $(linkrc)/drivsss.a drivsss.a @-ln -s $(linkrc)/drivsssB.a drivsssB.a @-ln -s $(linkrc)/symlift.a symlift.a @-ln -s $(linkrc)/symliftB.a symliftB.a @-ln -s $(linkrc)/symrand.a symrand.a @-ln -s $(linkrc)/symrandB.a symrandB.a @-ln -s $(linkrc)/symbkk.a symbkk.a @-ln -s $(linkrc)/symbkkB.a symbkkB.a @-ln -s $(linkrc)/sympolco.a sympolco.a @-ln -s $(linkrc)/sympolcoB.a sympolcoB.a @-ln -s $(linkrc)/faceperm.a faceperm.a @-ln -s $(linkrc)/facepermB.a facepermB.a @-ln -s $(linkrc)/facesypo.a facesypo.a @-ln -s $(linkrc)/facesypoB.a facesypoB.a @-ln -s $(linkrc)/gencells.a gencells.a @-ln -s $(linkrc)/gencellsB.a gencellsB.a @-ln -s $(linkrc)/drivsyml.a drivsyml.a @-ln -s $(linkrc)/drivsymlB.a drivsymlB.a @-ln -s $(linkrc)/mainsmvc.a mainsmvc.a @-ln -s $(linkrc)/mainsmvcB.a mainsmvcB.a # Working with permutation groups : perms: ada.lib perms.a permsB.a $(compile) perms.a permsB.a symgrp: perms symgrp.a symgrpB.a symgrp_io.a symgrp_ioB.a $(compile) symgrp.a symgrpB.a symgrp_io.a symgrp_ioB.a sbsymgrp_io: symgrp sbsymgrp_io.a sbsymgrp_ioB.a ada sbsymgrp_io.a sbsymgrp_ioB.a drivgrp_io: sbsymgrp_io drivgrp_io.a drivgrp_ioB.a ada drivgrp_io.a drivgrp_ioB.a # Applying the symmetry : permops: symgrp permops.a permopsB.a $(compile) permops.a permopsB.a orbits: permops orbits.a orbitsB.a orbits_io.a orbits_ioB.a $(compile) orbits.a orbitsB.a orbits_io.a orbits_ioB.a drivorbi: orbits drivorbi.a drivorbiB.a $(compile) drivorbi.a drivorbiB.a equpsys: permops equpsys.a equpsysB.a $(compile) equpsys.a equpsysB.a # Symmetric set structure analysis : sym_ss: permops templates.a templatesB.a sym_ss.a sym_ssB.a $(compile) templates.a templatesB.a $(compile) sym_ss.a sym_ssB.a lsymred: permops lsymred.a lsymredB.a $(compile) lsymred.a lsymredB.a # The interactive driver needed in the main program : drivsss: drivgrp_io sym_ss lsymred drivorbi equpsys drivsss.a drivsssB.a $(compile) drivsss.a drivsssB.a # Symmetric lifting algorithm : symlift: ada.lib symlift.a symliftB.a $(compile) symlift.a symliftB.a sympolco: ada.lib symbkk.a sympolco.a sympolcoB.a $(compile) symbkk.a sympolco.a sympolcoB.a symbkk: symlift sympolco symbkk.a symbkkB.a ada symbkkB.a # Symmetric randomize : symrand: ada.lib symrand.a symrandB.a $(compile) symrand.a symrandB.a # Computing the mixed volume, based on a symmetric subdivision : facesypo: ada.lib faceperm.a facepermB.a facesypo.a facesypoB.a $(compile) faceperm.a facepermB.a facesypo.a facesypoB.a gencells: facesypo gencells.a gencellsB.a $(compile) gencells.a gencellsB.a drivsyml: symrand gencells symbkk drivsyml.a drivsymlB.a mainsmvc.a mainsmvcB.a $(compile) drivsyml.a drivsymlB.a mainsmvc.a mainsmvcB.a SHAR_EOF fi # end of overwriting check cd .. if test -f 'makeall' then echo shar: will not over-write existing file "'makeall'" else cat << "SHAR_EOF" > 'makeall' echo '**** Making the Product Library ****' cd Product make echo '**** Making the Implift Library ****' cd ../Implift make echo '**** Making the Stalift Library ****' cd ../Stalift make echo '**** Making the Dynlift Library ****' cd ../Dynlift make echo '**** Making the Symmetry Library ****' cd ../Symmetry make cd .. SHAR_EOF fi # end of overwriting check if test -f 'makeclean' then echo shar: will not over-write existing file "'makeclean'" else cat << "SHAR_EOF" > 'makeclean' echo '**** Cleaning the Symmetry Library ****' cd Symmetry make clean echo '**** Cleaning the Dynlift Library ****' cd ../Dynlift make clean echo '**** Cleaning the Stalift Library ****' cd ../Stalift make clean echo '**** Cleaning the Implift Library ****' cd ../Implift make clean echo '**** Cleaning the Product Library ****' cd ../Product make clean cd .. SHAR_EOF fi # end of overwriting check if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' # Making the library with the root counts: all: @-./makeall clean: @-./makeclean SHAR_EOF fi # end of overwriting check if test -f 'makelog' then echo shar: will not over-write existing file "'makelog'" else cat << "SHAR_EOF" > 'makelog' **** Making the directory Bezout **** ada -O -S startsys.a startsysB.a startsys.a: startsysB.a: ada -O -S sets.a setsB.a sets_io.a sets_ioB.a sets.a: setsB.a: sets_io.a: sets_ioB.a: ada -O -S partsets.a partsetsB.a partsets_io.a partsets_ioB.a partsets.a: partsetsB.a: partsets_io.a: partsets_ioB.a: ada -O -S degsets.a degsetsB.a degsets.a: degsetsB.a: ada -O -S lstivc.a lstivcB.a lstivc_io.a lstivc_ioB.a lstivc.a: lstivcB.a: lstivc_io.a: lstivc_ioB.a: ada -O -S rps.a rpsB.a rps_io.a rps_ioB.a rps.a: rpsB.a: rps_io.a: rps_ioB.a: ada -O -S mhombez.a mhombezB.a mhombez.a: mhombezB.a: ada -O -S mhomstart.a mhomstartB.a mhomstart.a: mhomstartB.a: ada -O -S intehom.a intehomB.a drivinho.a drivinhoB.a intehom.a: intehomB.a: drivinho.a: drivinhoB.a: ada -O -S drivmhom.a drivmhomB.a drivmhom.a: drivmhomB.a: ada -O -S ds.a dsB.a ds.a: dsB.a: ada -O -S rpss.a rpssB.a rpss.a: rpssB.a: ada -O -S drivmuho.a drivmuhoB.a drivmuho.a: drivmuhoB.a: ada -O -S ss.a ssB.a ss_io.a ss_ioB.a crpss.a crpssB.a ss.a: ssB.a: ss_io.a: ss_ioB.a: crpss.a: crpssB.a: ada -O -S persets.a persetsB.a drivss.a drivssB.a persets.a: persetsB.a: drivss.a: drivssB.a: **** Making the directory BKK **** ada -O -S arrlivc.a arrlivcB.a arrlivc_io.a arrlivc_ioB.a arrlivc.a: arrlivcB.a: arrlivc_io.a: arrlivc_ioB.a: ada -O -S transfo.a transfoB.a transfo_io.a transfo_ioB.a transfo.a: transfoB.a: transfo_io.a: transfo_ioB.a: ada -O -S intvec_ut.a intvec_utB.a intvec_ut.a: intvec_utB.a: ada -O -S lstivc_ut.a lstivc_utB.a lstivc_ut.a: lstivc_utB.a: ada -O -S arrlivc_ut.a arrlivc_utB.a arrlivc_ut.a: arrlivc_utB.a: ada -O -S tv.a tvB.a tv_io.a tv_ioB.a tv.a: tvB.a: tv_io.a: tv_ioB.a: ada -O -S facenusu.a facenusuB.a volumes.a volumesB.a facenusu.a: facenusuB.a: volumes.a: volumesB.a: ada -O -S transols.a transolsB.a tranlaur.a tranlaurB.a transols.a: transolsB.a: tranlaur.a: tranlaurB.a: ada -O -S binom.a binomB.a binom.a: binomB.a: ada -O -S fewnom.a fewnomB.a fewnom.a: fewnomB.a: ada -O -S durker.a durkerB.a durker.a: durkerB.a: ada -O -S mixcont.a mixcontB.a mixcont.a: mixcontB.a: ada -O -S powlis.a powlisB.a powlis.a: powlisB.a: ada -O -S mihoco.a mihocoB.a mihoco.a: mihocoB.a: ada -O -S vertices.a verticesB.a drivpts.a drivptsB.a vertices.a: verticesB.a: drivpts.a: drivptsB.a: ada -O -S setsvol.a setsvolB.a setsvol.a: setsvolB.a: ada -O -S drivmibb.a drivmibbB.a drivmibb.a: drivmibbB.a: ada -O -S lattipts.a lattiptsB.a lattspar.a lattsparB.a lattipts.a: lattiptsB.a: lattspar.a: lattsparB.a: **** Making the directory MVC **** ada -O -S subdiv.a subdivB.a subdiv.a: subdivB.a: ada -O -S subdiv_io.a subdiv_ioB.a subdiv_io.a: subdiv_ioB.a: ada -O -S int_rand.a int_randB.a int_rand.a: int_randB.a: ada -O -S lift.a liftB.a lift.a: liftB.a: ada -O -S cosubdiv.a cosubdivB.a cosubdiv.a: cosubdivB.a: ada -O -S faces.a facesB.a faces_io.a faces_ioB.a faces.a: facesB.a: faces_io.a: faces_ioB.a: ada -O -S misudi.a misudiB.a misudi.a: misudiB.a: ada -O -S mivoco.a ada -O -S misudi_io.a misudi_ioB.a misudi_io.a: misudi_ioB.a: ada -O -S lift_ut.a lift_utB.a lift_ut.a: lift_utB.a: ada -O -S liftfaces.a liftfacesB.a liftfaces.a: liftfacesB.a: ada -O -S statlift.a statliftB.a comisudi.a comisudiB.a statlift.a: statliftB.a: comisudi.a: comisudiB.a: ada -O -S mivocoB.a ada -O -S bkkcomp.a ada -O -S polyhoco.a polyhocoB.a polyhoco.a: polyhocoB.a: ada -O -S bkkcompB.a ada -O -S connect.a connectB.a drivconn.a drivconnB.a connect.a: connectB.a: drivconn.a: drivconnB.a: ada -O -S drivmvc.a drivmvcB.a drivmvc.a: drivmvcB.a: **** Making the directory DMVC **** ada -O -S simplex.a simplexB.a simplex_io.a simplex_ioB.a simplex.a: simplexB.a: simplex_io.a: simplex_ioB.a: ada -O -S triangle.a triangleB.a triangle_io.a triangle_ioB.a triangle.a: triangleB.a: triangle_io.a: triangle_ioB.a: ada -O -S glodyntri.a glodyntriB.a dynlift.a dynliftB.a glodyntri.a: glodyntriB.a: dynlift.a: dynliftB.a: ada -O -S dyntri.a dyntriB.a dyntri.a: dyntriB.a: ada -O -S cayuti.a cayutiB.a cayley.a cayleyB.a cayuti.a: cayutiB.a: cayley.a: cayleyB.a: ada -O -S commfaces.a commfacesB.a enumfaces.a enumfacesB.a commfaces.a: commfacesB.a: enumfaces.a: enumfacesB.a: ada -O -S freqgraph.a freqgraphB.a initmice.a initmiceB.a freqgraph.a: freqgraphB.a: initmice.a: initmiceB.a: ada -O -S flatmisu.a flatmisuB.a flatmisu.a: flatmisuB.a: ada -O -S unfolding.a unfoldingB.a unfolding.a: unfoldingB.a: ada -O -S dymisudi.a dymisudiB.a dymisudi.a: dymisudiB.a: ada -O -S dypolhoc.a dypolhocB.a dypolhoc.a: dypolhocB.a: ada -O -S drivdmvc.a drivdmvcB.a maindmvc.a maindmvcB.a drivdmvc.a: drivdmvcB.a: maindmvc.a: maindmvcB.a: ada -O -S dbkkcomp.a dbkkcompB.a batchmvc.a batchmvcB.a dbkkcomp.a: dbkkcompB.a: batchmvc.a: batchmvcB.a: ada -O -S babldmvc.a babldmvcB.a babldmvc.a: babldmvcB.a: SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'System' then mkdir 'System' fi cd 'System' if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' all: cmdline timing byemess communication file_ops climp # possible options for the compiler (normal,optim,suppress): # normal : without optimizations # optim : optimize as far as possible # suppress : same as optim, but with the suppression of all checks normal= optim= -O suppress= -O -S options=$(suppress) makeoptions=$(options) -v -f # compiling command : # ada : compile the file # a.make : verifies dependencies before compiling compile=ada $(options) # Making an Ada library : ada.lib: @-../makelib # Cleaning the Ada library : clean: a.rmlib -f # Cleaning the .imports directory : climp: @-rm -f .imports/* # command line package : cmdline: ada.lib ucmdline.a ucmdlineB.a $(compile) ucmdline.a ucmdlineB.a # The timing package : timing: ada.lib rusage.a rusageB.a timing.a timingB.a $(compile) rusage.a rusageB.a timing.a timingB.a # System calls : machines: ada.lib system_call.a system_callB.a machines.a machinesB.a $(compile) system_call.a system_callB.a $(compile) machines.a machinesB.a byemess: machines byemess.a byemessB.a $(compile) byemess.a byemessB.a # Communications with user : communication: ada.lib commuser.a commuserB.a $(compile) commuser.a commuserB.a # file operations : file_ops: ada.lib file_ops.a file_opsB.a $(compile) file_ops.a file_opsB.a # Making the links with the original sources : linkrc = ../../System links: @-ln -s $(linkrc)/byemess.a byemess.a @-ln -s $(linkrc)/byemessB.a byemessB.a @-ln -s $(linkrc)/commuser.a commuser.a @-ln -s $(linkrc)/commuserB.a commuserB.a @-ln -s $(linkrc)/rusage.a rusage.a @-ln -s $(linkrc)/rusageB.a rusageB.a @-ln -s $(linkrc)/timing.a timing.a @-ln -s $(linkrc)/timingB.a timingB.a @-ln -s $(linkrc)/ucmdline.a ucmdline.a @-ln -s $(linkrc)/ucmdlineB.a ucmdlineB.a @-ln -s $(linkrc)/system_call.a system_call.a @-ln -s $(linkrc)/system_callB.a system_callB.a @-ln -s $(linkrc)/machines.a machines.a @-ln -s $(linkrc)/machinesB.a machinesB.a @-ln -s $(linkrc)/file_ops.a file_ops.a @-ln -s $(linkrc)/file_opsB.a file_opsB.a SHAR_EOF fi # end of overwriting check cd .. if test -f 'makeall' then echo shar: will not over-write existing file "'makeall'" else cat << "SHAR_EOF" > 'makeall' echo '**** Making the System Library ****' cd System make all echo '**** Making the Mathematical Library ****' cd ../Math_Lib make all echo '**** Making the Homotopy Library ****' cd ../Homotopy make all echo '**** Making the Continuation Library ****' cd ../Continuation make all echo '**** Making the Root Count Library ****' cd ../Root_Counts make all echo '**** Making the Main Driver ****' cd ../Main make phc cd .. SHAR_EOF fi # end of overwriting check if test -f 'makeclean' then echo shar: will not over-write existing file "'makeclean'" else cat << "SHAR_EOF" > 'makeclean' echo '**** Cleaning the Main Library ****' cd Main make clean echo '**** Cleaning the Root Count Library ****' cd ../Root_Counts make clean echo '**** Cleaning the Continuation Library ****' cd ../Continuation make clean echo '**** Cleaning the Homotopy Library ****' cd ../Homotopy make clean echo '**** Cleaning the Mathematical Library ****' cd ../Math_Lib make clean echo '**** Cleaning the System Library ****' cd ../System make clean cd .. SHAR_EOF fi # end of overwriting check if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' # Making the Ada libraries all: @-./makeall # Cleaning all Ada libraries clean: @-./makeclean SHAR_EOF fi # end of overwriting check if test -f 'makelib' then echo shar: will not over-write existing file "'makelib'" else cat << "SHAR_EOF" > 'makelib' #!/bin/csh -f # # Create an ada.lib for VADS compiler with settings of ADAPATH. # # USAGE : remove # for target of interest. # # for SUN/Solaris : # set ADAPATH=/cw/sun5ada/Ada6.2.3-0/self # # for IBM/RS6000 AIX : # set ADAPATH=/disks/zeno/lv02/vads/self # # for DEC/Ultrix : set ADAPATH=/cw/vads.dec/v6.1.0d # a.mklib . $ADAPATH/verdixlib SHAR_EOF fi # end of overwriting check cd .. if test -f 'READ_ME' then echo shar: will not over-write existing file "'READ_ME'" else cat << "SHAR_EOF" > 'READ_ME' The Ada sources of PHC are organized in the following tree of directories: Ada : sources of PHC |-- System : 0. UNIX dependencies, e.g.: timing package |-- Math_Lib : 1. general mathematical library | |-- Numbers : 1.1. number representations | |-- Matrices : 1.2. matrices and linear-system solvers | |-- Polynomials : 1.3. multivariate polynomial systems | |-- Supports : 1.4. support sets and linear programming |-- Homotopy : 2. homotopy and solution lists |-- Continuation : 3. path-tracking routines |-- Root_Counts : 4. root counts and homotopy construction | |-- Product : 4.1. linear-product start systems | |-- Implift : 4.2. implicit lifting | |-- Stalift : 4.3. static lifting | |-- Dynlift : 4.4. dynamic lifting | |-- Symmetry : 4.5. exploitation of symmetry relations |-- Main : 5. main dispatcher |-- Objects : 6. to install, type: make all SHAR_EOF fi # end of overwriting check if test ! -d 'Root_Counts' then mkdir 'Root_Counts' fi cd 'Root_Counts' if test ! -d 'Dynlift' then mkdir 'Dynlift' fi cd 'Dynlift' if test -f 'READ_ME' then echo shar: will not over-write existing file "'READ_ME'" else cat << "SHAR_EOF" > 'READ_ME' Mixed-volume computation and polyhedral continuation by dynamic lifting. The aim of dynamic lifting is to control the heights of the lifting values, to obtain a stable evaluation of the polyhedral homotopy. When all supports are equal, then the mixed volume is reduced to an ordinary volume, which is computed by a regular triangulation. 1. Dynamic construction of regular triangulations : simplex Simplices simplex_io Simplices_io triangle Triangulations triangle_io Triangulations_io glodyntri Global_Dynamic_Triangulation dynlift Dynamic_Lifting_Functions dyntri Dynamic_Triangulations 2. The Cayley trick : cayemb Cayley_Embedding cayley Cayley_Trick minkpoly Minkowski_Polynomials drivmink Driver_for_Minkowski_Polynomials 3. Dynamic construction of mixed subdivisions : commfaces Common_Faces_of_Polytope enumfaces Enumerate_Faces_of_Polytope freqgraph Frequency_Graph initmice Initial_Mixed_Cell flatmisu Flatten_Mixed_Subdivisions unfolding Unfolding_Subdivisions triamisu Triangulations_and_Subdivisions dymisudi Dynamic_Mixed_Subdivisions dynpolco Dynamic_Polyhedral_Continuation 4. The drivers and black-box computing : drivdynl Drivers_for_Dynamic_Lifting dbkkcomp Dynamic_BKK_Bound_Computations blackmvc Black_Box_Mixed_Volume_Computations babldmvc babldmvc maindmvc maindmvc SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'Implift' then mkdir 'Implift' fi cd 'Implift' if test -f 'READ_ME' then echo shar: will not over-write existing file "'READ_ME'" else cat << "SHAR_EOF" > 'READ_ME' Mixed-volume computation and polyhedral continuation by implicit lifting. This directory contains software for the computation of mixed volumes, according to the recursive formula Bershtein used in his proof. Also the homotopy method of Bernshtein has been implemented. 1. Utilities : arr_livc_ut Arrays_of_Integer_Vector_Lists_Utilities intvec_ut Integer_Vectors_Utilities 2. Computation of the mixed volume : volumes Volumes tv Trees_of_Vectors tv_io Trees_of_Vectors_io 3. Univariate, binomial and fewnomial system solvers : durker Durand_Kerner (procedure) binom Binomials fewnom Fewnomials 4. Transformations, applied to solutions and systems : transfo Transformations transfo_io Transformations_io transols Transforming_Solutions tranlaur Transforming_Laurent_Systems tranlists Transforming_Integer_Vector_Lists 5. Mixed-homotopy continuation : mihoco Mixed_Homotopy_Continuation setsvol Set_Structures_and_Volumes 6. Support sets and vertices of polytopes : powlis Power_Lists vertices Vertices 7. Main drivers : drivpts Driver_for_Vertex_Points drivimpl Drivers_for_Implicit_Lifting SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'Product' then mkdir 'Product' fi cd 'Product' if test -f 'READ_ME' then echo shar: will not over-write existing file "'READ_ME'" else cat << "SHAR_EOF" > 'READ_ME' Generalized Bezout numbers and linear-product start systems. Four types of start systems are implemented, based on total degree, m-homogeneous, multi-homegenous, and generalized Bezout number. 1. Total degree startsys Total_Degree_Start_Systems 2. m-homogeneous Bezout number sets Sets_of_Unknowns sets_io Sets_of_Unknowns_io degsets Degrees_In_Sets partsets Partitions_of_Sets_of_Unknowns partsets_io Partitions_of_Sets_of_Unknowns_io mhombez m_Homogeneous_Bezout_Numbers rps Random_Product_System rps_io Random_Product_System_io mhomstart m_Homogeneous_Start_Systems intehom Interpolating_Homotopies drivinho Driver_for_Interpolating_Homotopies drivmhom Drivers_for_m_homogenization 3. multi-homogeneous Bezout number ds Degree_Structure rpss Random_Product_Start_Systems drivmuho Drivers_for_Multi_Homogenization 4. Bezout number based on set structure ss Set_Structure ss_io Set_Structure_io generate Generate persets Degree_Sets_Tables crpss Construct_Random_Product_Start_System drivss Drivers_for_Set_Structures SHAR_EOF fi # end of overwriting check cd .. if test -f 'READ_ME' then echo shar: will not over-write existing file "'READ_ME'" else cat << "SHAR_EOF" > 'READ_ME' The root-counting library is organized as follows : Root_Counts : 4. root counts and homotopy construction |-- Product : 4.1. linear-product start systems |-- Implift : 4.2. implicit lifting |-- Stalift : 4.3. static lifting |-- Dynlift : 4.4. dynamic lifting |-- Symmetry : 4.5. exploitation of symmetry relations The root counts that are available in the directory Product are based on Bezout's theorem. The corresponding start systems are in general linear-product systems. Implicit lifting is the name we gave to the algorithm Bernshtein used in his proof that the mixed volume of the Newton polytopes of a polynomial system is a generically exact upper bound on the number of its isolated complex solutions with all components different from zero. Static lifting is the general procedure to compute mixed volumes of polytopes. Subdivisions induced by an integer-valued or floating-point lifting functions can be computed. In order to deal with non-fine subdivisions induced by a nongeneric integer lifting, recursive algorithms have been implemented. Dynamic lifting allows to have a control of the lifting values to obtain a numerically stable polyhedral continuation. When some or all supports are equal, the Cayley trick is recommended to use. The Symmetry library provides routines to construct start systems that are invariant under a given permutation symmetry. Hereby symmetric homotopies can be constructed, so that only the generating solution paths need to be computed. SHAR_EOF fi # end of overwriting check if test ! -d 'Stalift' then mkdir 'Stalift' fi cd 'Stalift' if test -f 'READ_ME' then echo shar: will not over-write existing file "'READ_ME'" else cat << "SHAR_EOF" > 'READ_ME' Mixed-volume computation and polyhedral continuation by static lifting. The algorithm used is based on the construction of a mixed subdivision, based on Betke's formula for mixed volumes and the polyhedral homotopy continuation methods developed by Huber and Sturmfels. This library features integer-valued and floating-point lifting functions. The implementation of integer static lifting typically induces nested subdivisions, with non-fine cells recursively refined by subdivisions. 1. Integer-valued lifting, mixed subdivisions and polyhedral continuation : intlift Integer_Lifting_Functions intlift_ut Integer_Lifting_Utilities intmisu Integer_Mixed_Subdivisions intmisu_io Integer_Mixed_Subdivisions_io comisudi Mixed_Coherent_Subdivisions bkkcomp BKK_Bound_Computations mivoco Mixed_Volume_Computation intprune Integer_Pruning_Methods intpolco Integer_Polyhedral_Continuation 2. Floating-point lifting, mixed subdivisions and polyhedral continuation : cofltint Float_Integer_Convertors fltlift Float_Lifting_Functions fltlift_ut Float_Lifting_Utilities fltmisu Float_Mixed_Subdivisions fltmisu_io Float_Mixed_Subdivisions_io fltprune Float_Pruning_Methods fltpolco Float_Polyhedral_Continuation 3. Influence of points to mixed volume : inncones Inner_Normal_Cones noconint Normal_Cone_Intersections contrimv Contributions_to_Mixed_Volume 4. Driver packages : drivcomv Drivers_for_Mixed_Contributions drivcrit Driver_for_Criterion drivlift Driver_for_Lifting_Functions prunstat Pruning_Statistics drivstal Drivers_for_Static_Lifting SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'Symmetry' then mkdir 'Symmetry' fi cd 'Symmetry' if test -f 'READ_ME' then echo shar: will not over-write existing file "'READ_ME'" else cat << "SHAR_EOF" > 'READ_ME' Exploitation of permutation symmetry to construct symmetric homotopies. If the polynomial system is invariant under permutations of its unknowns, then it suffices to compute the generators of the solution set. This is accomplished by the construction of a homotopy that has the same symmetric structure as the polynomial system. 1. Permutations, symmetry groups and equivariant systems : perms Permutations permops Permute_Operations symgrp Symmetry_Group symgrp_io Symmetry_Group_io sbsymgrp_io Symbolic_Symmetry_Group_io equpsys Equivariant_Polynomial_Systems 2. Symmetric linear-product start systems with drivers : sym_ss Symmetric_Set_Structure lsymred Linear_Symmetric_Reduce templates Templates orbits Orbits_of_Solutions orbits_io Orbits_of_Solutions_io drivgrp_io Drivers_for_Symmetry_Group_io drivorbi Drivers_for_Orbits_of_Solutions drivsss Driver_for_Symmetric_Set_Structures 3. Data structures for symmetric lifting : faceperm Permutations_of_Faces facesypo Faces_of_Symmetric_Polytopes gencells Generating_Mixed_Cells 4. Symmetric integer and floating-point lifting : symlift Symmetric_Lifting_Functions symrand function Symmetric_Randomize sympolco Symmetric_Polyhedral_Continuation symbkk Symmetric_BBK_Bound_Solvers 5. Drivers and target routine : drivsyml Driver_for_Symmetric_Lifting mainsmvc mainsmvc, as called by phc SHAR_EOF fi # end of overwriting check cd .. cd .. if test ! -d 'System' then mkdir 'System' fi cd 'System' if test -f 'READ_ME' then echo shar: will not over-write existing file "'READ_ME'" else cat << "SHAR_EOF" > 'READ_ME' UNIX dependent features and general utilities. 1. Command-line arguments, timing and system calls : ucmdline Unix_Command_Line rusage Unix_Resource_Usage timing Timing_Package system_call System_Call machines Machines byemess Bye_Bye_Message 2. Dialogues with user commuser Communications_with_User file_ops File_Operations SHAR_EOF fi # end of overwriting check cd .. cd .. if test ! -d 'Demo' then mkdir 'Demo' fi cd 'Demo' if test -f 'READ_ME' then echo shar: will not over-write existing file "'READ_ME'" else cat << "SHAR_EOF" > 'READ_ME' This directory contains the test database of polynomial systems. Besides the algebraic formulation and a short decription, every file contains various root counts, references and the list of solutions. Below is an overview of the application database. ------------------------------------------------------------------------------ filename : title contains short description of the application ============================================================================== boon : neurofysiology, posted by Sjirk Boon butcher : Butcher's problem, from PoSSo test suite butcher8 : 8-variable version of Butcher's problem camera1s : camera displacement between two positions, scaled 1st frame caprasse : the system caprasse of the PoSSo test suite cassou : the system of Pierrette Cassou-Nogues chemequ : chemical equilibrium of hydrocarbon combustion cohn2 : the system cohn2 from the PoSSo test suite cohn3 : the system cohn3 from the PoSSo test suite comb3000 : Model A combustion chemistry example for a temparature of 3000 deg conform1 : conformal analysis of cyclic molecules, first instance cpdm5 : 5-dimensional system of Caprasse and Demaret cyclic5 : cyclic 5-roots problem cyclic6 : cyclic 6-roots problem cyclic7 : cyclic 7-roots problem cyclic8 : cyclic 8-roots problem d1 : a sparse system, known as benchmark D1 des18_3 : a "dessin d'enfant", called des18_3 des22_24 : a "dessin d'enfant", called des22_24 discret3s : system discret3, every equation divided by average coefficient eco5 : 5-dimensional economics problem eco6 : 6-dimensional economics problem eco7 : 7-dimensional economics problem eco8 : 8-dimensional economics problem extcyc5 : extended cyclic 5-roots problem, to exploit the symmetry extcyc6 : extended cyclic 6-roots problem, to exploit the symmetry extcyc7 : extended cyclic 7-roots problem, to exploit the symmetry extcyc8 : extended cyclic 8-roots problem, to exploit the symmetry fourbar : a four-bar design problem, so-called 5-point problem fbrfive4 : Four-bar linkage through five points, 4-dimensional version fbrfive12 : Four-bar linkage whose coupler curve passes through five points gaukwa2 : Gaussian quadrature formula with 2 knots and 2 weights gaukwa3 : Gaussian quadrature formula with 3 knots and 3 weights gaukwa4 : Gaussian quadrature formula with 4 knots and 4 weights geneig : generalized eigenvalue problem heart : heart-dipole problem i1 : Benchmark i1 from the Interval Arithmetic Benchmarks ipp : six-revolute-joint problem of mechanics ipp2 : 6R inverse position problem katsura5 : a problem of magnetism in physics kinema : robot kinematics problem kin1 : kinematics problem ku10 : 10-dimensional system of Ku lorentz : equilibrium points of a 4-dimensional Lorentz attractor lumped : lumped-parameter chemically reacting system mickey : Mickey-mouse example to illustrate homotopy continuation noon3 : A neural network modeled by an adaptive Lotka-Volterra system, n=3 noon4 : A neural network modeled by an adaptive Lotka-Volterra system, n=4 noon5 : A neural network modeled by an adaptive Lotka-Volterra system, n=5 proddeco : system with a product-decomposition structure puma : hand position and orientation of PUMA robot quadfor2 : Gaussian quadrature formula with 2 knots and 2 weights over [-1,+1] quadgrid : interpolating quadrature formula for function defined on a grid rabmo : optimal multi-dimensional quadrature formulas rbpl : parallel robot, the so-called left-hand problem rbpl24 : parallel robot with 24 real solutions redcyc5 : reduced cyclic 5-roots problem redcyc6 : reduced cyclic 6-roots problem redcyc7 : reduced cyclic 7-roots problem redcyc8 : reduced cyclic 8-roots problem redeco5 : reduced 5-dimensional economics problem redeco6 : reduced 6-dimensional economics problem redeco7 : reduced 7-dimensional economics problem redeco8 : reduced 8-dimensional economics problem rediff3 : 3-dimensional reaction-diffusion problem reimer5 : The 5-dimensional system of Reimer rose : the system rose, a general economic equilibrium model s9_1 : small system from constructive Galois theory, called s9_1 sendra : the system sendra of the PoSSo test suite solotarev : the system solotarev of the PoSSo test suite sparse5 : a 5-dimensional sparse symmetric polynomial system speer : the system of E.R. speer trinks : system of Trinks from the PoSSo test suite virasoro : the construction of Virasoro algebras wood : system derived from optimizing the Wood function wright : system of A.H. Wright ======================================================================== CHARACTERISTICS OF THE POLYNOMIAL SYSTEMS ------------------------------------------------------------------------ name : n : D : bz : bs : mv : #sols ======================================================================== boon : 6 : 1024 : 344 : 216 : 20 : 8 butcher : 7 : 4608 : 2090 : 605 : 24 : 5 butcher8 : 8 : 4608 : 1461 : 587 : 26 : 16 camera1s : 6 : 64 : 20 : 20 : 20 : 20 caprasse : 4 : 144 : 62 : 94 : 48 : 48 cassou : 4 : 1344 : 368 : 361 : 24 : 16 chemequ : 5 : 108 : 56 : 44 : 16 : 16 cohn2 : 4 : 900 : 468 : 358 : 124 : 18 cohn3 : 4 : 1080 : 484 : 358 : 213 : 102 comb3000 : 10 : 96 : 66 : 28 : 16 : 16 conform1 : 3 : 64 : 16 : 16 : 16 : 16 cpdm5 : 5 : 243 : 243 : 243 : 242 : 157 cyclic5 : 5 : 120 : 120 : 106 : 70 : 70 cyclic6 : 6 : 720 : 720 : 588 : 156 : 156 cyclic7 : 7 : 5040 : 5040 : 4200 : 924 : 924 cyclic8 : 8 : 40320 : 40320 : 30365 : 2560 : 1152 d1 : 12 : 4068 : 320 : 896 : 192 : 48 des18_3 : 8 : 324 : 544 : 241 : 46 : 46 des22_24 : 10 : 256 : 128 : 82 : 42 : 42 discret3s : 8 : 256 : 128 : 128 : 128 : 128 eco5 : 5 : 54 : 20 : 16 : 8 : 8 eco6 : 6 : 162 : 48 : 36 : 16 : 16 eco7 : 7 : 486 : 112 : 80 : 32 : 32 eco8 : 8 : 1458 : 256 : 176 : 64 : 64 extcyc5 : 5 : 120 : 120 : 106 : 70 : 70 extcyc6 : 6 : 720 : 720 : 588 : 156 : 156 extcyc7 : 7 : 5040 : 5040 : 4200 : 924 : 924 extcyc8 : 8 : 40320 : 40320 : 30365 : 2560 : 1152 fbrfive12 : 12 : 4096 : 96 : 96 : 36 : 36 fbrfive4 : 4 : 256 : 96 : 194 : 36 : 36 fourbar : 4 : 256 : 96 : 96 : 80 : 36 gaukwa2 : 2 : 24 : 11 : 11 : 5 : 2 gaukwa3 : 3 : 720 : 225 : 225 : 49 : 6 gaukwa4 : 4 : 40320 : 6769 : 6769 : 729 : 24 geneig : 6 : 243 : 10 : 10 : 10 : 10 heart : 8 : 576 : 193 : 193 : 121 : 4 i1 : 10 : 59049 : 452 : 437 : 66 : 66 ipp : 8 : 256 : 96 : 96 : 64 : 48 ipp2 : 11 : 1024 : 576 : 848 : 288 : 16 katsura5 : 6 : 32 : 32 : 32 : 32 : 32 kin1 : 12 : 4608 : 320 : 896 : 192 : 48 kinema : 9 : 64 : 240 : 64 : 64 : 40 ku10 : 10 : 1024 : 2 : 2 : 2 : 2 lorentz : 4 : 16 : 14 : 12 : 12 : 11 lumped : 4 : 16 : 8 : 11 : 7 : 4 mickey : 2 : 4 : 4 : 4 : 4 : 4 noon3 : 3 : 27 : 29 : 21 : 21 : 21 noon4 : 4 : 81 : 81 : 73 : 73 : 73 noon5 : 5 : 243 : 243 : 233 : 233 : 233 proddeco : 4 : 256 : 96 : 96 : 26 : 6 puma : 8 : 128 : 16 : 32 : 16 : 16 quadfor2 : 4 : 24 : 11 : 11 : 4 : 2 quadgrid : 5 : 120 : 10 : 10 : 10 : 5 rabmo : 9 : 36000 : 22740 : 7090 : 136 : 16 rbpl : 6 : 486 : 160 : 160 : 160 : 150 rbpl24 : 9 : 576 : 80 : 80 : 80 : 40 redcyc5 : 4 : 24 : 24 : 19 : 14 : 14 redcyc6 : 5 : 120 : 96 : 83 : 26 : 26 redcyc7 : 6 : 720 : 720 : 511 : 132 : 132 redcyc8 : 7 : 5040 : 3960 : 3107 : 320 : 144 redeco5 : 5 : 8 : 12 : 8 : 8 : 8 redeco6 : 6 : 16 : 28 : 16 : 16 : 16 redeco7 : 7 : 32 : 64 : 32 : 32 : 32 redeco8 : 8 : 64 : 144 : 64 : 64 : 64 rediff3 : 3 : 8 : 8 : 8 : 7 : 7 reimer5 : 5 : 720 : 720 : 720 : 720 : 144 rose : 3 : 216 : 144 : 136 : 136 : 136 s9_1 : 8 : 16 : 41 : 10 : 10 : 10 sendra : 2 : 49 : 49 : 46 : 46 : 46 solotarev : 4 : 36 : 10 : 8 : 6 : 6 sparse5 : 5 : 100000 : 3840 : 3840 : 160 : 160 speer : 4 : 625 : 384 : 246 : 96 : 43 trinks : 6 : 24 : 24 : 18 : 10 : 10 virasoro : 8 : 256 : 3072 : 256 : 200 : 200 wood : 4 : 36 : 25 : 16 : 9 : 9 wright : 5 : 32 : 32 : 32 : 32 : 32 ==================================================================== n : dimension = #equations = #variables D : total degre of the system bz : m-homogeneous Bezout number, heuristic output bs : generalized Bezout number, heuristic output mv : mixed volume #sols : number of isolated solutions in C* ==================================================================== =============================================================================== TIMING INFORMATION SUMMARY on SPARCserver-1000 ------------------------------------------------------------------------------- name | root counts | start system | continuation | total =============================================================================== boon | 0h 0m 0s190ms | 0h 0m 5s868ms | 0h 0m14s394ms | 0h 0m20s937ms | butcher | 0h 0m13s267ms | 0h 0m29s 23ms | 0h 1m44s962ms | 0h 2m28s449ms | butcher8 | 0h 0m50s513ms | 0h 0m25s188ms | 0h 4m20s602ms | 0h 5m38s507ms | camera1s | 0h 0m 8s258ms | 0h 0m 0s110ms | 0h 0m34s406ms | 0h 0m44s682ms | caprasse | 0h 0m 0s769ms | 0h 0m10s 4ms | 0h 0m17s 80ms | 0h 0m28s888ms | cassou | 0h 0m 1s145ms | 0h 0m10s688ms | 0h 1m 3s439ms | 0h 1m15s972ms | chemequ | 0h 0m 1s116ms | 0h 0m 4s827ms | 0h 0m 6s886ms | 0h 0m13s378ms | cohn2 | 0h 0m 3s989ms | 0h 0m49s953ms | 0h 2m49s 74ms | 0h 3m46s619ms | cohn3 | 0h 0m 4s991ms | 0h 1m12s618ms | 0h16m15s864ms | 0h17m37s282ms | comb3000 | 0h 0m 7s814ms | 0h 0m 5s630ms | 0h 0m18s162ms | 0h 0m33s118ms | conform1 | 0h 0m 0s 42ms | 0h 0m 0s 45ms | 0h 0m 3s880ms | 0h 0m 4s310ms | cpdm5 | 0h 0m18s683ms | 0h 2m27s225ms | 0h 9m51s598ms | 0h12m43s370ms | cyclic5 | 0h 0m 0s562ms | 0h 0m11s768ms | 0h 0m32s469ms | 0h 0m45s993ms | cyclic6 | 0h 0m 6s 40ms | 0h 1m15s816ms | 0h 2m44s292ms | 0h 4m 9s434ms | cyclic7 | 0h 1m15s 74ms | 0h15m49s391ms | 0h27m50s521ms | 0h45m21s434ms | cyclic8 | 0h14m41s 38ms | 1h25m14s851ms | 2h54m28s884ms | 4h35m54s367ms | d1 | 0h 0m15s182ms | 0h 5m34s397ms | 0h13m30s348ms | 0h19m25s426ms | des18_3 | 0h 3m51s209ms | 0h 1m19s587ms | 0h 1m44s 25ms | 0h 6m57s913ms | des22_24 | 0h 0m23s538ms | 0h 0m50s660ms | 0h 1m22s251ms | 0h 2m40s 53ms | discret3s | 0h 2m20s 4ms | 0h 0m 0s719ms | 0h56m20s922ms | 0h58m52s121ms | eco5 | 0h 0m 0s281ms | 0h 0m 1s222ms | 0h 0m 2s829ms | 0h 0m 4s686ms | eco6 | 0h 0m 2s217ms | 0h 0m 4s132ms | 0h 0m 6s771ms | 0h 0m13s785ms | eco7 | 0h 0m22s215ms | 0h 0m20s511ms | 0h 0m34s 19ms | 0h 1m18s249ms | eco8 | 0h 5m28s 66ms | 0h 1m 1s471ms | 0h 1m55s472ms | 0h 8m27s528ms | extcyc5 | 0h 0m 2s355ms | 0h 0m36s607ms | 0h 0m37s521ms | 0h 1m17s726ms | extcyc6 | 0h 0m30s 15ms | 0h 1m45s137ms | 0h 2m56s572ms | 0h 5m15s706ms | extcyc7 | 0h 9m15s674ms | 0h17m22s278ms | 0h30m29s581ms | 0h57m33s835ms | extcyc8 | 1h58m58s816ms | 1h36m57s179ms | 3h58m54s943ms | 7h36m30s580ms | fbrfive12 | 0h 1m30s161ms | 0h 1m 6s686ms | 0h 2m18s859ms | 0h 4m58s570ms | fbrfive4 | 0h 0m 0s463ms | 0h 0m17s283ms | 0h 1m 2s690ms | 0h 1m21s972ms | fourbar | 0h 0m 0s625ms | 0h 0m 8s706ms | 0h 2m 1s 20ms | 0h 2m12s565ms | gaukwa2 | 0h 0m 0s 55ms | 0h 0m 0s705ms | 0h 0m 1s460ms | 0h 0m 2s391ms | gaukwa3 | 0h 0m 1s430ms | 0h 0m22s803ms | 0h 0m52s615ms | 0h 1m17s674ms | gaukwa4 | 0h 1m18s940ms | 0h27m42s595ms | 0h52m30s671ms | 1h21m42s787ms | geneig | 0h 0m 0s476ms | 0h 0m 0s303ms | 0h 0m11s314ms | 0h 0m14s648ms | heart | 0h 1m10s899ms | 0h 3m14s236ms | 0h 4m39s 75ms | 0h 9m 6s712ms | i1 | 0h 0m37s869ms | 0h 0m49s215ms | 0h 1m59s959ms | 0h 3m29s913ms | ipp | 0h 1m 4s541ms | 0h 1m21s 14ms | 0h 1m47s940ms | 0h 4m16s287ms | ipp2 | 0h 8m21s346ms | 0h11m59s944ms | 0h27m18s539ms | 0h47m48s632ms | katsura5 | 0h 0m12s382ms | 0h 0m 0s 8ms | 0h 0m27s511ms | 0h 0m41s303ms | kin1 | 0h 2m 2s926ms | 0h 5m39s399ms | 0h11m37s403ms | 0h19m25s259ms | kinema | 0h 2m28s847ms | 0h 0m 0s 22ms | 0h 3m11s205ms | 0h 5m42s168ms | ku10 | 0h 0m 1s547ms | 0h 0m 2s253ms | 0h 0m 3s611ms | 0h 0m 8s357ms | lorentz | 0h 0m 0s173ms | 0h 0m 0s 23ms | 0h 0m 6s633ms | 0h 0m 7s256ms | lumped | 0h 0m 0s289ms | 0h 0m 0s714ms | 0h 0m 1s975ms | 0h 0m 3s255ms | mickey | 0h 0m 0s 8ms | 0h 0m 0s 2ms | 0h 0m 0s175ms | 0h 0m 0s248ms | noon3 | 0h 0m 0s 58ms | 0h 0m 0s 33ms | 0h 0m 4s639ms | 0h 0m 5s154ms | noon4 | 0h 0m 0s399ms | 0h 0m 0s103ms | 0h 0m51s160ms | 0h 0m53s163ms | noon5 | 0h 0m 2s922ms | 0h 0m 0s316ms | 0h 7m 9s741ms | 0h 7m17s834ms | proddeco | 0h 0m 0s299ms | 0h 0m10s135ms | 0h 0m42s488ms | 0h 0m54s 26ms | puma | 0h 0m 2s457ms | 0h 0m 0s420ms | 0h 0m34s 43ms | 0h 0m40s105ms | quadfor2 | 0h 0m 0s 24ms | 0h 0m 0s183ms | 0h 0m 0s910ms | 0h 0m 1s271ms | quadgrid | 0h 0m 4s451ms | 0h 0m 0s159ms | 0h 0m14s627ms | 0h 0m20s443ms | rabmo | 0h 1m10s899ms | 0h 3m14s236ms | 0h 4m39s 75ms | 0h 9m 6s712ms | rbpl | 0h 1m32s693ms | 0h 0m 0s670ms | 0h10m24s859ms | 0h12m 4s957ms | rbpl24 | 3h19m40s323ms | 0h 0m 1s331ms | 0h 9m55s836ms | 3h29m47s764ms | redcyc5 | 0h 0m 0s348ms | 0h 0m 2s767ms | 0h 0m 3s505ms | 0h 0m 6s995ms | redcyc6 | 0h 0m 3s559ms | 0h 0m 9s911ms | 0h 0m17s549ms | 0h 0m31s863ms | redcyc7 | 0h 0m54s118ms | 0h 1m56s885ms | 0h 3m12s794ms | 0h 6m 7s216ms | redcyc8 | 0h 9m58s283ms | 0h10m54s911ms | 0h18m11s414ms | 0h39m14s893ms | redeco5 | 0h 0m 0s290ms | 0h 0m 0s 3ms | 0h 0m 3s109ms | 0h 0m 3s671ms | redeco6 | 0h 0m 2s389ms | 0h 0m 0s 6ms | 0h 0m 7s958ms | 0h 0m10s860ms | redeco7 | 0h 0m22s751ms | 0h 0m 0s 10ms | 0h 0m24s990ms | 0h 0m48s725ms | redeco8 | 0h 4m30s648ms | 0h 0m 0s 18ms | 0h 1m20s991ms | 0h 5m53s618ms | rediff3 | 0h 0m 0s 28ms | 0h 0m 0s225ms | 0h 0m 0s568ms | 0h 0m 1s 2ms | reimer5 | 0h 0m 0s913ms | 0h 0m 0s 65ms | 0h 9m20s820ms | 0h 9m30s537ms | rose | 0h 0m 0s 86ms | 0h 0m 0s347ms | 0h 2m26s320ms | 0h 2m30s262ms | s9_1 | 0h 0m 0s663ms | 0h 0m 0s 65ms | 0h 0m14s843ms | 0h 0m17s344ms | sendra | 0h 0m 0s 50ms | 0h 0m 0s131ms | 0h 0m18s328ms | 0h 0m19s474ms | solotarev | 0h 0m 0s 79ms | 0h 0m 0s365ms | 0h 0m 1s 37ms | 0h 0m 1s695ms | sparse5 | 0h 0m 0s396ms | 0h 0m21s672ms | 0h 3m45s456ms | 0h 4m11s 36ms | speer | 0h 0m 1s554ms | 0h 0m52s 9ms | 0h13m35s109ms | 0h14m31s786ms | trinks | 0h 0m 0s666ms | 0h 0m 1s855ms | 0h 0m 5s962ms | 0h 0m 8s967ms | virasoro | 3h40m50s731ms | 0h 7m 0s273ms | 0h 7m42s993ms | 3h55m41s856ms | wood | 0h 0m 0s 55ms | 0h 0m 0s761ms | 0h 0m 2s860ms | 0h 0m 3s912ms | wright | 0h 0m 1s332ms | 0h 0m 0s 6ms | 0h 0m13s251ms | 0h 0m15s210ms | =============================================================================== SHAR_EOF fi # end of overwriting check if test -f 'boon' then echo shar: will not over-write existing file "'boon'" else cat << "SHAR_EOF" > 'boon' 6 s1**2+g1**2 - 1; s2**2+g2**2 - 1; C1*g1**3+C2*g2**3 - 1.2; C1*s1**3+C2*s2**3 - 1.2; C1*g1**2*s1+C2*g2**2*s2 - 0.7; C1*g1*s1**2+C2*g2*s2**2 - 0.7; TITLE : neurofysiology, posted by Sjirk Boon ROOT COUNTS : total degree : 1024 3-homogeneous Bezout number : 344 with partition : {s1 s2 }{g1 g2 }{C1 C2 } generalized Bezout number : 216 based on the set structure : {s1 g1 }{s1 g1 } {s2 g2 }{s2 g2 } {g1 g2 }{g1 g2 }{g1 g2 }{C1 C2 } {s1 s2 }{s1 s2 }{s1 s2 }{C1 C2 } {s1 s2 }{g1 g2 }{g1 g2 }{C1 C2 } {s1 s2 }{s1 s2 }{g1 g2 }{C1 C2 } mixed volume : 20 NOTE : There are only 8 finite solutions for general values of the constant terms. It can be proved that it is equivalent to a quadrature formula problem, so that there is only one solution upon symmetry. REFERENCES : The system has been posted to the newsgroup sci.math.num-analysis by Sjirk Boon. P. Van Hentenryck, D. McAllester and D. Kapur: `Solving Polynomial Systems Using a Branch and Prune Approach' SIAM J. Numerical Analysis, Vol. 34, No. 2, pp 797-827, 1997. SYMMETRY GROUP : g2 s2 g1 s1 C2 C1 g1 s1 g2 s2 C1 C2 s2 g2 s1 g1 C2 C1 s1 g1 s2 g2 C1 C2 -s1 s2 -g1 g2 -C1 C2 s1 -s2 g1 -g2 C1 -C2 THE GENERATING SOLUTIONS : 1 6 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 8 the solution for t : s1 : -4.02451939639181E-01 -6.67657107123736E-67 g1 : -9.15441115681758E-01 3.52374584315305E-67 s2 : 9.15441115681758E-01 4.26558707329054E-67 g2 : 4.02451939639181E-01 -7.41841230137484E-67 C1 : -1.44169513021472E+00 -1.24258406048029E-66 C2 : 1.44169513021472E+00 -1.07566978369935E-66 == err : 3.255E-15 = rco : 1.566E-02 = res : 2.220E-16 == SHAR_EOF fi # end of overwriting check if test -f 'butcher' then echo shar: will not over-write existing file "'butcher'" else cat << "SHAR_EOF" > 'butcher' 7 z*u+y*v+t*w-w**2-1/2*w-1/2; z*u**2+y*v**2-t*w**2+w**3+w**2-1/3*t+4/3*w; x*z*v-t*w**2+w**3-1/2*t*w+w**2-1/6*t+2/3*w; z*u**3+y*v**3+t*w**3-w**4-3/2*w**3+t*w-5/2*w**2-1/4*w-1/4; x*z*u*v+t*w**3-w**4+1/2*t*w**2-3/2*w**3+1/2*t*w-7/4*w**2-3/8*w-1/8; x*z*v**2+t*w**3-w**4+t*w**2-3/2*w**3+2/3*t*w-7/6*w**2-1/12*w-1/12; -t*w**3+w**4-t*w**2+3/2*w**3-1/3*t*w+13/12*w**2+7/24*w+1/24; TITLE : Butcher's problem ROOT COUNTS : total degree : 4608 4-homogeneous Bezout number : 1361 with partition : {{z y t }{u v }{w }{x }} multi-homogeneous Bezout number 1209, with the following degree structure : The partition for equation 1 : {{z y t }{u v }{w }} The partition for equation 2 : {{z y t }{u v }{w }} The partition for equation 3 : {{z t }{v }{w }{x }} The partition for equation 4 : {{z y t }{u v }{w }} The partition for equation 5 : {{z t }{u }{v }{w }{x }} The partition for equation 6 : {{z t }{v }{w }{x }} The partition for equation 7 : {{t }{w }} generalized Bezout number : 605 based on the set structure : {z y t w }{u v w } {z y t w }{u v w }{u v w } {z t w }{v w }{w x } {z y t w }{u v w }{u v w }{u v w } {z t w }{u w }{v w }{w x } {z t w }{v w }{v w }{w x } {t w }{w }{w }{w } mixed volume: 24 REFERENCES : The example has been retrieved from the POSSO test suite, available by anonymous ftp from the site gauss.dm.unipi.it, from the directory pub/posso. See also W. Boege, R. Gebauer, and H. Kredel: "Some examples for solving systems of algebraic equations by calculating Groebner bases", J. Symbolic Computation, 2:83-98, 1986. C. Butcher: "An application of the Runge-Kutta space". BIT, 24, pages 425--440, 1984. NOTE: There are 5 regular solutions and two singular solutions The two singular solutions belong to a manifold of solutions: t=-1=w, z=0=y, with u and v arbitrary complex numbers. There are 3 regular real solutions. THE SOLUTIONS : 7 7 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z : -2.29379273840329E-02 7.44087924070508E-36 u : 8.16496580927762E-01 -1.29774576330781E-35 y : -4.58758547680744E-02 -6.84137712178571E-36 v : 4.08248290463845E-01 -1.10731567847459E-35 t : -1.00000000000000E+00 3.37954625861408E-37 w : -9.08248290463859E-01 -3.28550671054829E-36 x : 8.16496580927830E-01 -6.65800000305744E-35 == err : 4.965E-14 = rco : 1.736E-04 = res : 3.331E-16 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z : 2.88808493551858E-01 -1.92592994438724E-34 u : 7.21933058546343E-01 9.62964972193618E-34 y : -2.44033884709223E-01 -9.14816723583937E-34 v : -6.24774425776102E-01 1.73333694994851E-33 t : 1.27806694145366E+00 -1.17963209093718E-33 w : 2.78066941453658E-01 -5.05556610401649E-34 x : -1.13792449427108E+00 -5.87408633038107E-33 == err : 2.785E-15 = rco : 1.273E-02 = res : 8.327E-17 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z : -2.27062072615966E-01 -3.85185988877447E-34 u : -8.16496580927726E-01 1.92592994438724E-34 y : -4.54124145231932E-01 3.61111864572607E-34 v : -4.08248290463863E-01 1.38426214752833E-34 t : -1.00000000000000E+00 -2.46383615932351E-35 w : -9.17517095361370E-02 1.55165254308542E-36 x : -8.16496580927726E-01 0.00000000000000E+00 == err : 8.898E-16 = rco : 2.386E-03 = res : 2.776E-17 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z : 7.32450810630072E-16 1.37145635748911E-15 u : 4.17630643926077E-01 -7.58875284416709E-01 y : 1.67709576191771E-15 -4.57212901658091E-15 v : 4.94521940247853E-01 -3.05129784662510E-02 t : -1.00000000000000E+00 4.68824600419586E-16 w : -1.00000000000000E+00 3.75059625315153E-15 x : -1.50630009976240E+00 -2.13582124544133E+00 == err : 0.000E+00 = rco : 2.854E-17 = res : 0.000E+00 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z : 1.27097621050230E-16 3.03259676112193E-17 u : 2.34958226863350E+00 -1.87549206427436E+00 y : -1.91328685223823E-15 -3.04962129204523E-16 v : 1.73977586284498E+00 4.84530770879628E-01 t : -1.00000000000000E+00 -3.24271157948272E-15 w : -9.99999999999994E-01 -2.68584216774777E-15 x : 5.62376352154760E+00 -2.71542574259875E+00 == err : 0.000E+00 = rco : 8.236E-19 = res : 0.000E+00 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z : 3.59196576269340E-01 -1.71748996563448E-01 u : 1.38903347072683E+00 -3.85150602548912E-01 y : 2.35528602162567E-01 9.24893027822689E-02 v : 1.22905387955472E+00 3.00007066016267E-01 t : 6.10966529273171E-01 3.85150602548917E-01 w : -3.89033470726829E-01 3.85150602548913E-01 x : 3.87782471854638E-01 -2.22654061728370E-01 == err : 4.135E-15 = rco : 1.198E-03 = res : 2.776E-16 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z : 3.59196576269339E-01 1.71748996563450E-01 u : 1.38903347072683E+00 3.85150602548910E-01 y : 2.35528602162569E-01 -9.24893027822688E-02 v : 1.22905387955472E+00 -3.00007066016269E-01 t : 6.10966529273174E-01 -3.85150602548915E-01 w : -3.89033470726829E-01 -3.85150602548913E-01 x : 3.87782471854640E-01 2.22654061728369E-01 == err : 5.151E-15 = rco : 1.198E-03 = res : 4.965E-16 == SHAR_EOF fi # end of overwriting check if test -f 'butcher8' then echo shar: will not over-write existing file "'butcher8'" else cat << "SHAR_EOF" > 'butcher8' 8 b1 + b2 + b3 - (a+b); b2*c2 + b3*c3 - (1/2 + 1/2*b + b**2 - a*b); b2*c2**2 + b3*c3**2 - (a*(1/3+b**2) - 4/3*b - b**2 - b**3); b3*a32*c2 - (a*(1/6 + 1/2*b + b**2) - 2/3*b - b**2 - b**3); b2*c2*83 + b3*c3**3 - (1/4 + 1/4*b + 5/2*b**2 + 3/2*b**3 + b**4 - a*(b+b**3)); b3*c3*a32*c2 - (1/8 + 3/8*b + 7/4*b**2 + 3/2*b**3 + b**4 - a*(1/2*b + 1/2*b**2 + b**3)); b3*a32*c2**2 - (1/12 + 1/12*b + 7/6*b**2 + 3/2*b**3 + b**4 - a*(2/3*b + b**2 + b**3)); 1/24 + 7/24*b + 13/12*b**2 + 3/2*b**3 + b**4 - a*(1/3*b + b**2 + b**3); TITLE : 8-variable version of Butcher's problem ROOT COUNTS : total degree : 4608 6-homogeneous Bezout number : 1461 with partition : {b1 }{b2 b3 a }{b }{c2 }{c3 }{a32 } generalized Bezout number : 587 based on the set structure : {b1 b2 b3 a b } {b2 b3 a b }{b c2 c3 } {b2 b3 a b }{b c2 c3 }{b c2 c3 } {b3 a b }{b c2 }{b a32 } {b2 b3 a b }{b c2 c3 }{b c3 }{b c3 } {b3 a b }{b c2 }{b c3 }{b a32 } {b3 a b }{b c2 }{b c2 }{b a32 } {a b }{b }{b }{b } mixed volume : 26 REFERENCES : W. Boege, R. Gebauer, and H. Kredel: "Some examples for solving systems of algebraic equations by calculating Groebner bases", J. Symbolic Computation, 2:83-98, 1986. C. Butcher: "An application of the Runge-Kutta space". BIT, 24, pages 425--440, 1984. NOTE : The system has 16 regular solutions. Four paths converged to highly singular solutions, which indicates that the system probably has an infinite component of solutions. THE SOLUTIONS : 20 8 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b1 : -1.54868742915591E+00 1.10984586753349E-01 b2 : 2.45505205023205E-03 -1.98840610261098E-04 b3 : 1.90480330453772E-01 7.11458772979691E-02 a : -9.02280049972086E-01 1.32262749440421E-01 b : -4.53471996679816E-01 4.96688740006357E-02 c2 : 3.67885421140448E-01 2.23562655640229E-01 c3 : 4.80574364999927E-01 2.62040941134371E-01 a32 : 6.09280158170986E-01 -4.30372908822721E-01 == err : 3.846E-15 = rco : 2.015E-04 = res : 2.225E-16 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b1 : -1.71888103839571E+00 -1.93162394224810E-57 b2 : -4.21182839890999E-02 3.09856376715262E-56 b3 : 1.72262192175605E-02 -3.16228744359792E-56 a : -1.11411504415350E+00 5.97409466674670E-58 b : -6.29658059013750E-01 -3.14635652448659E-57 c2 : 7.55553790471265E+00 -1.12918354661068E-54 c3 : 1.15147156906762E+01 1.38662719944969E-54 a32 : -2.84251025589465E-02 -2.00729580802689E-56 == err : 5.907E-14 = rco : 1.869E-06 = res : 7.105E-15 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b1 : -8.91439313414223E-01 2.84072246785365E+00 b2 : 2.75139464570149E-02 -1.84200109581071E-02 b3 : 7.50735107390070E-04 -9.51801936712548E-04 a : -1.88754000466580E-01 1.32962334709711E+00 b : -6.74420631383238E-01 1.49172730786171E+00 c2 : 7.27675649003600E+00 2.77127125872537E+00 c3 : 1.81312600660805E+01 -1.71806056022904E+01 a32 : 8.95628415149649E+00 4.01389814545182E-01 == err : 5.070E-13 = rco : 6.346E-08 = res : 2.220E-15 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b1 : 3.26056134161109E+00 -1.79278659840263E+00 b2 : -1.14798576732338E-02 -2.35765602643108E-02 b3 : -3.16020516034117E-04 4.68070394354158E-04 a : 1.92851446497257E+00 -8.78141159303192E-01 b : 1.32025099844925E+00 -9.37753928969399E-01 c2 : -5.18539450338994E+00 9.50585171067483E+00 c3 : -3.13463433262412E+00 -3.53140384372959E+01 a32 : -1.07841734207531E+01 1.50126695694059E+01 == err : 7.313E-13 = rco : 1.391E-08 = res : 6.033E-15 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b1 : -3.55858011781411E+00 3.42390300587920E-57 b2 : -2.81832179394210E-02 -5.28227039015323E-60 b3 : 1.00704763099191E-03 8.53233735362993E-61 a : -1.63035345948598E+00 1.58430190205247E-57 b : -1.95540282863656E+00 1.83516720544125E-57 c2 : -6.53590540536284E+00 5.89817388035679E-57 c3 : -2.61177367346545E+01 -1.19880166312717E-56 a32 : -6.85719071588913E+00 -1.41386907113005E-57 == err : 1.956E-12 = rco : 5.160E-08 = res : 1.721E-15 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b1 : -8.34275476922321E-01 -9.23993308456822E-57 b2 : 1.54297081464225E-01 7.64684117343577E-57 b3 : -7.22435800199501E-02 -8.28407793788875E-57 a : -6.11410030984530E-01 -1.08330249957007E-56 b : -1.40811944493516E-01 8.76200551122849E-58 c2 : 7.50008412839803E+00 1.63132611699963E-55 c3 : 1.09893902739762E+01 -1.93719976393706E-55 a32 : -1.08167128370528E-02 6.96977711120448E-58 == err : 6.169E-15 = rco : 4.006E-06 = res : 1.421E-14 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b1 : -2.00000000000000E+00 -4.95496457394533E-16 b2 : 9.81697592740941E-18 1.44253943690846E-18 b3 : 3.48443312844541E-16 4.02010615093877E-17 a : -1.00000000000000E+00 -5.04280951614286E-17 b : -1.00000000000000E+00 -4.03424761286809E-16 c2 : 5.06282151098845E-01 4.53679915659373E-02 c3 : 5.96260455108259E-01 9.16597652437176E-02 a32 : 3.72557168652312E-01 1.02268973958993E-02 == err : 9.973E-313 = rco : 1.138E-18 = res : 0.000E+00 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b1 : -2.00000000000001E+00 -9.23785533592253E-17 b2 : 2.04391768504228E-15 1.24148748189622E-15 b3 : -1.63658692022580E-15 -1.25746237041559E-15 a : -1.00000000000000E+00 -1.20392713198447E-17 b : -1.00000000000001E+00 -9.63141705587465E-17 c2 : 8.86985542366175E+00 1.27740351671357E-01 c3 : 8.79337014820927E+00 -7.75638432783920E-02 a32 : -3.85504280503917E-03 -1.57263018605654E-03 == err : 9.973E-313 = rco : 3.574E-20 = res : 0.000E+00 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b1 : -8.91439313414197E-01 -2.84072246785366E+00 b2 : 2.75139464570150E-02 1.84200109581070E-02 b3 : 7.50735107390112E-04 9.51801936712518E-04 a : -1.88754000466566E-01 -1.32962334709712E+00 b : -6.74420631383226E-01 -1.49172730786172E+00 c2 : 7.27675649003601E+00 -2.77127125872534E+00 c3 : 1.81312600660803E+01 1.71806056022907E+01 a32 : 8.95628415149655E+00 -4.01389814544759E-01 == err : 1.335E-12 = rco : 6.346E-08 = res : 7.161E-15 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b1 : -2.00000000000000E+00 -2.92392686882682E-16 b2 : 7.85137967194930E-18 -1.55451732201970E-18 b3 : -2.11129408981433E-17 8.85844138615643E-17 a : -1.00000000000000E+00 -2.28180878006245E-17 b : -1.00000000000000E+00 -1.82544702542522E-16 c2 : 1.76172086709783E+00 3.51234877536242E-01 c3 : 1.76866072663750E+00 -1.74512275061876E-01 a32 : 7.83679152587805E-01 -4.63247687258756E-01 == err : 9.973E-313 = rco : 2.354E-19 = res : 0.000E+00 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b1 : -7.09869839778797E-01 -5.79229632491348E-64 b2 : -1.39629197970438E-01 -9.49556774575980E-65 b3 : 5.87691127059789E-02 1.16320704885558E-64 a : -6.59713826937515E-01 -4.98517306652389E-64 b : -1.31016098105741E-01 -5.93472984109987E-65 c2 : -7.38286882089761E+00 -3.79822709830392E-64 c3 : -1.13263580832817E+01 -3.03858167864314E-63 a32 : 1.29806460468640E-02 -2.55193383167295E-65 == err : 3.133E-14 = rco : 3.389E-06 = res : 1.421E-14 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b1 : -1.89270285756505E+00 4.60244253126165E-55 b2 : 2.14134038122082E-05 -2.55765927920093E-57 b3 : -4.34643527786413E-02 -1.86949335771393E-55 a : -9.97315422530658E-01 1.20378007534946E-56 b : -9.38830374409218E-01 2.58877435559023E-55 c2 : 2.72352838082211E-01 -1.82759504045115E-54 c3 : 5.59735904846106E-01 -5.06204954762337E-56 a32 : 4.33249618635895E-01 -1.24796447950472E-53 == err : 1.365E-13 = rco : 1.194E-04 = res : 2.001E-16 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b1 : -4.71553639145464E-01 -6.01085225033391E-01 b2 : -5.07627521635982E-05 -7.28211053839031E-04 b3 : 5.11602857020603E-01 -1.71702170405392E-01 a : 3.45354921336824E-01 -4.21485360244454E-01 b : -3.05356466213849E-01 -3.52030246248168E-01 c2 : 1.11004417986242E+00 -1.03964923338075E-01 c3 : 9.83164051899763E-01 3.93783706265552E-01 a32 : 1.78910560306613E-01 2.52079968211080E-01 == err : 2.764E-15 = rco : 5.202E-04 = res : 7.837E-17 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b1 : 8.06827148509337E-01 -3.58891745739919E-54 b2 : -1.42448574529814E-03 -8.66641999656054E-56 b3 : 7.54607190707658E-01 -4.07831529249908E-55 a : 1.35012723779024E+00 -2.93638701059934E-54 b : 2.09882615681460E-01 -9.38012517274788E-55 c2 : -3.98538306917890E-01 5.87277402119867E-54 c3 : 4.83769670358321E-01 3.26265223399926E-54 a32 : -7.74627768583179E-01 -2.61012178719941E-54 == err : 2.812E-15 = rco : 1.222E-03 = res : 1.665E-16 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b1 : -1.54868742915591E+00 -1.10984586753349E-01 b2 : 2.45505205023205E-03 1.98840610261100E-04 b3 : 1.90480330453771E-01 -7.11458772979697E-02 a : -9.02280049972086E-01 -1.32262749440421E-01 b : -4.53471996679816E-01 -4.96688740006359E-02 c2 : 3.67885421140447E-01 -2.23562655640230E-01 c3 : 4.80574364999928E-01 -2.62040941134371E-01 a32 : 6.09280158170985E-01 4.30372908822724E-01 == err : 4.639E-15 = rco : 2.015E-04 = res : 2.238E-16 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b1 : -4.71553639145464E-01 6.01085225033390E-01 b2 : -5.07627521635952E-05 7.28211053839031E-04 b3 : 5.11602857020603E-01 1.71702170405392E-01 a : 3.45354921336824E-01 4.21485360244453E-01 b : -3.05356466213849E-01 3.52030246248168E-01 c2 : 1.11004417986242E+00 1.03964923338074E-01 c3 : 9.83164051899762E-01 -3.93783706265552E-01 a32 : 1.78910560306613E-01 -2.52079968211080E-01 == err : 2.599E-15 = rco : 5.202E-04 = res : 1.608E-16 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b1 : -6.20681684032930E-01 -3.70920615068742E-67 b2 : 8.95850880561880E-04 1.73869038313473E-69 b3 : -5.38246012441459E-01 2.04006338287808E-67 a : -1.07134874113107E+00 -7.41841230137484E-68 b : -8.66831044627572E-02 -8.34571383904670E-68 c2 : -3.29372192907320E-01 5.19288861096239E-67 c3 : -6.90389957944890E-01 0.00000000000000E+00 a32 : -5.03421273025244E-01 -7.41841230137484E-67 == err : 6.017E-16 = rco : 1.903E-03 = res : 9.660E-17 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b1 : -1.73994795522882E+00 3.32344871101593E-65 b2 : 4.99670061024409E-02 4.53413359860030E-63 b3 : -2.37928809546032E-02 -4.57686365345622E-63 a : -1.11228981517644E+00 -1.38635289088093E-63 b : -6.01484014904543E-01 1.37567037716695E-63 c2 : -7.31987332040536E+00 -1.09996656766882E-61 c3 : -1.08338550646840E+01 8.14339889876360E-62 a32 : 2.03036070257183E-02 -3.60831574338872E-64 == err : 2.974E-14 = rco : 2.286E-06 = res : 4.441E-16 == solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b1 : -2.00000000000000E+00 3.13212001649522E-17 b2 : -2.87669384196252E-15 -7.47661995621575E-16 b3 : 2.80406118127485E-15 7.91594866046253E-16 a : -1.00000000000000E+00 8.36156339884810E-18 b : -1.00000000000000E+00 6.68925071907823E-17 c2 : -8.64056895134541E+00 -4.60767532370001E-01 c3 : -9.21942041985285E+00 2.48894218752857E-01 a32 : -2.88994579001811E-03 4.80205697111369E-03 == err : 9.973E-313 = rco : 1.548E-19 = res : 0.000E+00 == solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b1 : 3.26056134161102E+00 1.79278659840270E+00 b2 : -1.14798576732334E-02 2.35765602643111E-02 b3 : -3.16020516034195E-04 -4.68070394354121E-04 a : 1.92851446497254E+00 8.78141159303226E-01 b : 1.32025099844921E+00 9.37753928969435E-01 c2 : -5.18539450338971E+00 -9.50585171067495E+00 c3 : -3.13463433262608E+00 3.53140384372956E+01 a32 : -1.07841734207505E+01 -1.50126695694069E+01 == err : 1.006E-12 = rco : 1.391E-08 = res : 1.123E-14 == SHAR_EOF fi # end of overwriting check if test -f 'camera1s' then echo shar: will not over-write existing file "'camera1s'" else cat << "SHAR_EOF" > 'camera1s' 6 - d1*q1 - d2*q2 - d3*q3 + 1; - 3.6*d1*q1 + 4.1*d1*q2 + 2.0*d1*q3 + 0.1*d1 + 4.1*d2*q1 + 1.8*d2*q2 + 3.7*d2*q3 - 0.2*d2 + 2.0*d3*q1 + 3.7*d3*q2 - 4.0*d3*q3 + 0.3*d3 + 0.1*q1 - 0.2*q2 + 0.3*q3 + 5.8; - 2.140796*d1*q1 - 3.998792*d1*q2 + 3.715992*d1*q3 - 0.2828*d1 - 3.998792*d2*q1 - 1.575196*d2*q2 - 3.998792*d2*q3 + 3.715992*d3*q1 - 3.998792*d3*q2 - 2.140796*d3*q3 + 0.2828*d3 - 0.2828*q1 + 0.2828*q3 + 5.856788; 0.3464*d1*q1 + 0.1732*d1*q2 - 5.999648*d1*q3 - 0.1732*d1 + 0.1732*d2* q1 - 5.999648*d2*q2 - 0.1732*d2*q3 + 0.3464*d2 - 5.999648*d3*q1 - 0.1732*d3*q2 - 0.3464*d3*q3 - 0.1732*d3 - 0.1732*q1 + 0.3464*q2 - 0.1732*q3 + 5.999648; - 5701.3*d1*q1 - 2.9*d1*q2 + 3796.7*d1*q3 - 1902.7*d1 - 2.9*d2*q1 - 5698.7*d2*q2 + 1897.3*d2*q3 + 3803.3*d2 + 3796.7*d3*q1 + 1897.3*d3*q2 + 5703.1*d3*q3 + 0.7*d3 - 1902.7*q1 + 3803.3*q2 + 0.7*q3 + 5696.9; - 6.8*d1*q1 - 3.2*d1*q2 + 1.3*d1*q3 + 5.1*d1 - 3.2*d2*q1 - 4.8*d2*q2 - 0.7*d2*q3 - 7.1*d2 + 1.3*d3*q1 - 0.7*d3*q2 + 9.0*d3*q3 - d3 + 5.1*q1 - 7.1*q2 - q3 + 2.6; TITLE : camera displacement between two positions, scaled first frame. ROOT COUNTS : total degree : 64 2-homogeneous Bezout bound : 20 with partition : {{d1 d2 d3 }{q1 q2 q3 }} mixed volume : 20 REFERENCES : Ioannis Z. Emiris: `Sparse Elimination and Application in Kinematics' PhD Thesis, Computer Science, University of California at Berkeley, 1994. Ioannis Z. Emiris: `A general Solver Based on Sparse Resultants: Numerical Issues and Kinematic Applications', INRIA Rapport de Recherche no 3110, January 1997, 29 pages Available via anonymous ftp to ftp.inria.fr NOTE : This system models the displacement of a camera between two positions in a static environment, coordinates of matched points in first instance. The coordinates of the frames have been scaled, i.e., all components have been divided by 1000. THE SOLUTIONS : 20 6 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : d1 : -1.00187746343441E+01 -1.02003169143904E-67 q1 : 2.16349900882507E+00 -2.81088278606781E-68 d2 : 5.27096688651916E+00 4.40468230394131E-68 q2 : 4.14807645389239E+00 -5.44789653382215E-68 d3 : 3.46044449033976E-01 3.18759903574700E-69 q3 : 2.34430970383515E+00 -3.44840259321721E-68 == err : 3.403E-14 = rco : 1.837E-06 = res : 2.183E-11 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : d1 : -4.00074964087066E-01 1.86690458335834E-60 q1 : 7.14374212666202E+01 -2.54894705781192E-57 d2 : 4.15805732418402E-01 -7.46761833343337E-60 q2 : 6.27398271488606E+01 -2.30998327114206E-57 d3 : -3.88155169000059E-01 5.60071375007503E-60 q3 : -8.99831883542215E+00 2.04114901113845E-58 == err : 1.114E-13 = rco : 4.472E-08 = res : 2.910E-11 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : d1 : -4.11362919961996E-03 6.34702729602409E-01 q1 : 1.07073370333179E+00 -5.28986736899611E+00 d2 : 2.97394007311655E-01 -3.71117214378002E+00 q2 : 7.08792243065625E-02 1.94181773315705E-01 d3 : 2.72180047596179E-02 5.59540380075883E-01 q3 : -1.15287061420216E+00 5.47490578453015E+00 == err : 2.672E-15 = rco : 5.284E-06 = res : 3.750E-12 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : d1 : 2.39689707893600E-02 2.03752779273601E-71 q1 : -1.85992426440753E+02 -3.33828553561868E-67 d2 : -1.86554926678331E-02 -2.32493948224955E-71 q2 : -1.07460371835044E+02 -2.22552369041245E-67 d3 : -2.54759702551365E-02 -4.75423151638402E-71 q3 : -1.35552083903577E+02 -1.94733322911090E-67 == err : 2.907E-13 = rco : 2.823E-09 = res : 1.819E-11 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : d1 : -2.56263047259548E+00 1.00151652128078E-60 q1 : 8.11735863421135E+00 2.17805534725140E-60 d2 : 1.35645958316042E+00 -1.25918824762972E-60 q2 : 1.57220206476798E+01 4.04495993060974E-60 d3 : 5.38269606136141E-02 -4.80095905225616E-62 q3 : 8.83395631861776E+00 2.17805534725140E-60 == err : 4.462E-14 = rco : 4.721E-07 = res : 2.842E-14 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : d1 : -4.11362919961983E-03 -6.34702729602409E-01 q1 : 1.07073370333179E+00 5.28986736899611E+00 d2 : 2.97394007311654E-01 3.71117214378002E+00 q2 : 7.08792243065624E-02 -1.94181773315705E-01 d3 : 2.72180047596180E-02 -5.59540380075882E-01 q3 : -1.15287061420216E+00 -5.47490578453015E+00 == err : 3.759E-15 = rco : 5.284E-06 = res : 4.547E-12 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : d1 : 4.31525045865282E-03 4.59858703221669E-73 q1 : 1.53964291762927E+01 1.26779507103574E-70 d2 : 1.57557671967738E-01 -4.10335458259335E-72 q2 : 1.19603230035780E+01 8.15011117094404E-71 d3 : 3.44291835195695E-02 0.00000000000000E+00 q3 : -2.76184329480271E+01 0.00000000000000E+00 == err : 3.066E-14 = rco : 3.142E-07 = res : 4.775E-12 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : d1 : 2.54964137276597E+01 -1.44890865261227E-70 q1 : 3.54809887556081E-01 -2.26391976970668E-72 d2 : 1.30967935950199E+01 -5.43340744729603E-71 q2 : -3.56996638737865E-01 -1.13195988485334E-72 d3 : -9.06123055507048E+00 9.05567907882671E-71 q3 : 3.72010001913294E-01 4.24484956820002E-72 == err : 1.310E-14 = rco : 3.754E-07 = res : 1.455E-11 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : d1 : 1.07073370333179E+00 -5.28986736899611E+00 q1 : -4.11362919961994E-03 6.34702729602409E-01 d2 : 7.08792243065625E-02 1.94181773315705E-01 q2 : 2.97394007311655E-01 -3.71117214378002E+00 d3 : -1.15287061420216E+00 5.47490578453015E+00 q3 : 2.72180047596179E-02 5.59540380075883E-01 == err : 4.664E-15 = rco : 4.608E-06 = res : 1.095E-11 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : d1 : 7.14374212666199E+01 -4.35611069450280E-59 q1 : -4.00074964087066E-01 -9.72346137165803E-63 d2 : 6.27398271488603E+01 -3.98272977783113E-59 q2 : 4.15805732418403E-01 1.40990189889042E-61 d3 : -8.99831883542212E+00 4.01862763508772E-60 q3 : -3.88155169000059E-01 -8.75111523449223E-62 == err : 1.433E-13 = rco : 4.472E-08 = res : 1.455E-11 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : d1 : -5.44504357673233E-02 -9.33452291679171E-61 q1 : -2.53902514663185E+01 8.96114200012004E-59 d2 : -1.30887818487475E-02 -2.91703841149741E-62 q2 : -1.35197609918457E+01 5.60071375007503E-59 d3 : 1.18597460143422E-02 1.26404997831554E-61 q3 : -4.71736458922360E+01 -1.19481893334934E-58 == err : 3.343E-14 = rco : 1.800E-07 = res : 5.230E-12 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : d1 : 1.52525122261781E+01 1.03234741498625E-69 q1 : 2.94025403132356E+00 -2.51861074379868E-71 d2 : -1.59650216570430E+01 -1.08668148945921E-69 q2 : 2.07407537095237E+00 -2.00922879561468E-71 d3 : 1.51939278512973E+01 1.03234741498625E-69 q3 : -7.06440260233406E-01 -3.50907564304535E-71 == err : 1.971E-13 = rco : 4.927E-07 = res : 5.821E-11 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : d1 : 2.16349900882506E+00 -3.41840438847353E-64 q1 : -1.00187746343442E+01 -1.51929083932157E-63 d2 : 4.14807645389238E+00 -7.21663148677745E-64 q2 : 5.27096688651919E+00 3.41840438847353E-64 d3 : 2.34430970383515E+00 -1.70920219423676E-64 q3 : 3.46044449033977E-01 3.32344871101593E-65 == err : 9.576E-15 = rco : 1.830E-06 = res : 1.455E-11 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : d1 : 2.94025403132356E+00 -1.11276184520623E-67 q1 : 1.52525122261781E+01 -3.17137125883775E-66 d2 : 2.07407537095237E+00 -4.40468230394131E-68 q2 : -1.59650216570430E+01 2.96736492054994E-66 d3 : -7.06440260233406E-01 -9.27301537671855E-69 q3 : 1.51939278512973E+01 -3.26410141260493E-66 == err : 2.443E-14 = rco : 4.927E-07 = res : 4.366E-11 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : d1 : -1.85992426440753E+02 4.07831529249908E-56 q1 : 2.39689707893600E-02 1.92913473613695E-59 d2 : -1.07460371835044E+02 2.03915764624954E-56 q2 : -1.86554926678331E-02 8.71222138900560E-60 d3 : -1.35552083903577E+02 1.01957882312477E-56 q3 : -2.54759702551365E-02 -8.82890292546549E-60 == err : 2.534E-13 = rco : 2.823E-09 = res : 2.274E-13 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : d1 : 1.07073370333179E+00 5.28986736899611E+00 q1 : -4.11362919961979E-03 -6.34702729602409E-01 d2 : 7.08792243065624E-02 -1.94181773315705E-01 q2 : 2.97394007311654E-01 3.71117214378002E+00 d3 : -1.15287061420216E+00 -5.47490578453015E+00 q3 : 2.72180047596180E-02 -5.59540380075883E-01 == err : 4.058E-15 = rco : 4.608E-06 = res : 1.819E-12 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : d1 : 3.54809887556081E-01 -5.11261178461591E-75 q1 : 2.54964137276597E+01 3.53737464016668E-74 d2 : -3.56996638737865E-01 2.76357393763022E-75 q2 : 1.30967935950199E+01 1.76868732008334E-74 d3 : 3.72010001913294E-01 -5.52714787526044E-76 q3 : -9.06123055507050E+00 -1.06121239205001E-73 == err : 4.185E-14 = rco : 3.753E-07 = res : 7.276E-12 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : d1 : -2.53902514663185E+01 5.11150998216783E-64 q1 : -5.44504357673233E-02 -2.04006338287808E-67 d2 : -1.35197609918457E+01 3.03858167864314E-64 q2 : -1.30887818487475E-02 0.00000000000000E+00 d3 : -4.71736458922361E+01 6.07716335728627E-64 q3 : 1.18597460143422E-02 -2.07715544438496E-66 == err : 4.941E-14 = rco : 1.800E-07 = res : 7.276E-12 == solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : d1 : 8.11735863421133E+00 -4.98062349335469E-71 q1 : -2.56263047259548E+00 -1.58474383879467E-71 d2 : 1.57220206476798E+01 1.81113581576534E-70 q2 : 1.35645958316043E+00 -1.01876389636801E-71 d3 : 8.83395631861774E+00 -4.52783953941336E-71 q3 : 5.38269606136141E-02 -3.11288968334668E-72 == err : 2.370E-14 = rco : 4.722E-07 = res : 2.910E-11 == solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : d1 : 1.53964291762927E+01 4.40468230394131E-68 q1 : 4.31525045865282E-03 -8.15011117094404E-71 d2 : 1.19603230035780E+01 2.46314470944087E-68 q2 : 1.57557671967738E-01 -3.62227163153069E-71 d3 : -2.76184329480271E+01 1.85460307534371E-68 q3 : 3.44291835195695E-02 -1.44890865261227E-70 == err : 4.201E-14 = rco : 3.241E-07 = res : 2.842E-14 == SHAR_EOF fi # end of overwriting check if test -f 'caprasse' then echo shar: will not over-write existing file "'caprasse'" else cat << "SHAR_EOF" > 'caprasse' 4 y**2*z+2*x*y*t-2*x-z; -x**3*z+4*x*y**2*z+4*x**2*y*t+2*y**3*t+4*x**2-10*y**2+4*x*z-10*y*t+2; 2*y*z*t+x*t**2-x-2*z; -x*z**3+4*y*z**2*t+4*x*z*t**2+2*y*t**3+4*x*z+4*z**2-10*y*t-10*t**2+2; TITLE : the system caprasse of the PoSSo test suite ROOT COUNTS : total degree : 144 2-homogeneous Bezout number : 62 with partition : {y x }{z t } generalized Bezout number : 94 based on the set structure : {y }{y x }{z t } {y x }{y x }{y z t }{x t } {y x }{z t }{t } {y z }{z t }{z t }{x t } mixed volume : 48 NOTE : There are 54 isolated solutions, so 6 ones with zero components which are not counted by the mixed volume. REFERENCES : The PoSSo test suite. THE SOLUTIONS : 48 4 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.06079387292675E-07 5.77350327054609E-01 z : 1.45317416603335E-07 1.15470048989962E+00 x : -3.92380293112556E-08 -1.15470054776460E+00 t : -1.06079387291484E-07 -5.77350211324643E-01 == err : 1.533E-07 = rco : 2.130E-08 = res : 4.384E-13 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.06079387292675E-07 5.77350327054609E-01 z : -1.45317416603335E-07 -1.15470048989962E+00 x : 3.92380293112556E-08 1.15470054776460E+00 t : -1.06079387291484E-07 -5.77350211324643E-01 == err : 1.533E-07 = rco : 2.130E-08 = res : 4.384E-13 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.05994025912692E-07 -5.77350327116111E-01 z : 1.45274862525765E-07 1.15470048990682E+00 x : -3.92808366117427E-08 -1.15470054783331E+00 t : 1.05994025915353E-07 5.77350211263141E-01 == err : 1.534E-07 = rco : 2.130E-08 = res : 4.378E-13 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.05994025912692E-07 -5.77350327116111E-01 z : -1.45274862525765E-07 -1.15470048990682E+00 x : 3.92808366117427E-08 1.15470054783331E+00 t : 1.05994025915353E-07 5.77350211263141E-01 == err : 1.534E-07 = rco : 2.130E-08 = res : 4.378E-13 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -8.77313232090609E-08 5.77350349491674E-01 z : 9.35035689166768E-08 -1.15470051672660E+00 x : -1.81234892107680E-07 1.15470059702865E+00 t : -8.77313231729429E-08 -5.77350188887578E-01 == err : 1.906E-07 = rco : 1.434E-08 = res : 4.983E-13 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.00000000000000E+00 4.07831529249908E-56 z : -2.00000000000000E+00 1.01957882312477E-56 x : 2.00000000000000E+00 0.00000000000000E+00 t : -1.00000000000000E+00 4.07831529249908E-56 == err : 2.755E-40 = rco : 3.999E-02 = res : 1.387E-54 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.00000000000000E+00 3.25541656235428E-150 z : -4.74778387287990E-66 -2.00000000000000E+00 x : -4.74778387287990E-66 2.00000000000000E+00 t : -1.00000000000000E+00 -1.18694596821997E-66 == err : 3.207E-50 = rco : 5.880E-02 = res : 1.045E-64 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.00000000000000E+00 0.00000000000000E+00 z : -3.56083790465993E-66 2.00000000000000E+00 x : 4.74778387287990E-66 -2.00000000000000E+00 t : -1.00000000000000E+00 -4.74778387287990E-66 == err : 3.207E-50 = rco : 5.880E-02 = res : 1.045E-64 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -8.77513880611068E-08 5.77350349703671E-01 z : -9.34852953226433E-08 1.15470051629058E+00 x : 1.81236683363123E-07 -1.15470059680462E+00 t : -8.77513880198494E-08 -5.77350188675580E-01 == err : 1.905E-07 = rco : 1.442E-08 = res : 4.985E-13 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.00000000000000E+00 -3.39859607708257E-57 z : 2.00000000000000E+00 -1.69929803854128E-56 x : -2.00000000000000E+00 0.00000000000000E+00 t : -1.00000000000000E+00 1.01957882312477E-56 == err : 3.673E-40 = rco : 3.999E-02 = res : 2.447E-55 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 8.76784229248577E-08 -5.77350349659721E-01 z : 9.34252745994218E-08 -1.15470051648474E+00 x : -1.81103697507645E-07 1.15470059695484E+00 t : 8.76784228915865E-08 5.77350188719531E-01 == err : 1.906E-07 = rco : 1.439E-08 = res : 4.984E-13 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.00000000000000E+00 4.07831529249908E-56 z : -2.00000000000000E+00 -1.01957882312477E-56 x : 2.00000000000000E+00 -3.05873646937431E-56 t : 1.00000000000000E+00 5.09789411562385E-57 == err : 3.214E-40 = rco : 3.999E-02 = res : 2.896E-54 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.00000000000000E+00 0.00000000000000E+00 z : 0.00000000000000E+00 -2.00000000000000E+00 x : 0.00000000000000E+00 2.00000000000000E+00 t : 1.00000000000000E+00 5.93472984109987E-67 == err : 2.138E-50 = rco : 5.880E-02 = res : 1.424E-65 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.00000000000000E+00 4.74778387287990E-66 z : -4.74778387287990E-66 2.00000000000000E+00 x : 3.56083790465993E-66 -2.00000000000000E+00 t : 1.00000000000000E+00 0.00000000000000E+00 == err : 3.207E-50 = rco : 5.880E-02 = res : 1.045E-64 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 8.77405950783069E-08 -5.77350349472713E-01 z : -9.35144851768356E-08 1.15470051674896E+00 x : 1.81255080253416E-07 -1.15470059703204E+00 t : 8.77405950748513E-08 5.77350188906539E-01 == err : 1.904E-07 = rco : 1.433E-08 = res : 4.989E-13 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.00000000000000E+00 4.07831529249908E-56 z : 2.00000000000000E+00 1.01957882312477E-56 x : -2.00000000000000E+00 0.00000000000000E+00 t : 1.00000000000000E+00 -3.21909202921851E-120 == err : 2.755E-40 = rco : 3.999E-02 = res : 1.713E-54 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 4.98607301189714E-08 5.77350213814064E-01 z : 1.50798591339040E-07 -1.15470064822190E+00 x : -1.00937861254465E-07 1.15470059284634E+00 t : 4.98607300501771E-08 -5.77350324565188E-01 == err : 1.860E-07 = rco : 8.075E-09 = res : 3.479E-13 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -5.01523750950706E-08 -5.77350213905358E-01 z : 1.50859133388934E-07 -1.15470064802726E+00 x : -1.00706758298574E-07 1.15470059274299E+00 t : -5.01523750856486E-08 5.77350324473893E-01 == err : 1.863E-07 = rco : 7.978E-09 = res : 3.478E-13 == solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 5.00878414230803E-08 5.77350213853182E-01 z : -1.50738519457209E-07 1.15470064813160E+00 x : 1.00650678045970E-07 -1.15470059279515E+00 t : 5.00878413993948E-08 -5.77350324526070E-01 == err : 1.862E-07 = rco : 7.980E-09 = res : 3.479E-13 == solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -4.99744070211252E-08 -5.77350213733803E-01 z : -1.50410208193325E-07 1.15470064837104E+00 x : 1.00435801156692E-07 -1.15470059291522E+00 t : -4.99744070521402E-08 5.77350324645449E-01 == err : 1.868E-07 = rco : 7.962E-09 = res : 3.474E-13 == solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 4.35129158956362E-08 5.77350358962175E-01 z : -1.21675118777727E-07 -1.15470065364167E+00 x : 1.65188034697681E-07 1.15470074341422E+00 t : 4.35129159442658E-08 -5.77350179417076E-01 == err : 2.632E-07 = rco : 1.337E-08 = res : 6.667E-13 == solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -4.37472610290454E-08 -5.77350358904876E-01 z : 1.21150500984062E-07 1.15470065383538E+00 x : -1.64897762006051E-07 -1.15470074355063E+00 t : -4.37472610149285E-08 5.77350179474376E-01 == err : 2.632E-07 = rco : 1.330E-08 = res : 6.671E-13 == solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -4.38381107605702E-08 -5.77350358852071E-01 z : -1.21029587513588E-07 -1.15470065385332E+00 x : 1.64867698259043E-07 1.15470074351576E+00 t : -4.38381107303348E-08 5.77350179527181E-01 == err : 2.633E-07 = rco : 1.328E-08 = res : 6.674E-13 == solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 4.39494246527390E-08 5.77350358863699E-01 z : 1.20674859668386E-07 1.15470065401861E+00 x : -1.64624284280550E-07 -1.15470074369268E+00 t : 4.39494245715835E-08 -5.77350179515552E-01 == err : 2.634E-07 = rco : 1.324E-08 = res : 6.669E-13 == solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -8.03633037684401E-08 -1.73205070031825E+00 z : -2.00000002853558E+00 -1.49454216126415E-07 x : -1.99999984277204E+00 -1.02608911068846E-08 t : -8.03633035704206E-08 1.73205091481951E+00 == err : 1.600E-07 = rco : 1.797E-08 = res : 7.452E-13 == solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 8.09400644530456E-08 1.73205069904967E+00 z : 2.00000002839131E+00 1.50295919644092E-07 x : 1.99999984043052E+00 1.01036152794788E-08 t : 8.09400648734116E-08 -1.73205091608809E+00 == err : 1.567E-07 = rco : 1.793E-08 = res : 7.383E-13 == solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -9.61047376416230E-08 -1.73205074565506E+00 z : 2.00000008738129E+00 1.40899654114353E-07 x : 1.99999998014341E+00 -2.55586339770353E-08 t : -9.61047372351930E-08 1.73205086948269E+00 == err : 1.643E-07 = rco : 2.723E-09 = res : 3.708E-13 == solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 9.13950441969567E-08 1.73205074015760E+00 z : -2.00000008801649E+00 -1.39894670756851E-07 x : -1.99999997125673E+00 1.84061895395854E-08 t : 9.13950444132389E-08 -1.73205087498016E+00 == err : 1.646E-07 = rco : 2.862E-09 = res : 3.744E-13 == solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -8.09400644530456E-08 -1.73205069904967E+00 z : 2.00000002839131E+00 1.50295919644092E-07 x : 1.99999984043052E+00 1.01036152794788E-08 t : -8.09400648734116E-08 1.73205091608809E+00 == err : 1.567E-07 = rco : 1.793E-08 = res : 7.383E-13 == solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 8.03072751517330E-08 1.73205070036440E+00 z : -2.00000002852399E+00 -1.49379363774783E-07 x : -1.99999984284040E+00 -1.02830832993386E-08 t : 8.03072747998243E-08 -1.73205091477335E+00 == err : 1.598E-07 = rco : 1.796E-08 = res : 7.441E-13 == solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -9.13950441969567E-08 -1.73205074015760E+00 z : -2.00000008801649E+00 -1.39894670756851E-07 x : -1.99999997125673E+00 1.84061895395854E-08 t : -9.13950444132389E-08 1.73205087498016E+00 == err : 1.646E-07 = rco : 2.862E-09 = res : 3.744E-13 == solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 9.34115735173893E-08 1.73205074298615E+00 z : 2.00000008817823E+00 1.39641870549700E-07 x : 1.99999997631766E+00 -2.21517205363262E-08 t : 9.34115732159578E-08 -1.73205087215160E+00 == err : 1.649E-07 = rco : 2.748E-09 = res : 3.760E-13 == solution 33 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.00000000000000E+00 1.38662719944969E-54 z : -1.03527618041008E+00 -2.61012178719941E-54 x : -1.03527618041008E+00 2.73922305764310E-54 t : -1.00000000000000E+00 -5.70964140949871E-55 == err : 2.972E-15 = rco : 5.099E-02 = res : 3.553E-15 == solution 34 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.00000000000000E+00 -4.89397835099889E-55 z : 1.03527618041008E+00 1.79445872869959E-54 x : 1.03527618041008E+00 -9.45130671136214E-55 t : 1.00000000000000E+00 5.70964140949871E-55 == err : 2.972E-15 = rco : 5.099E-02 = res : 3.553E-15 == solution 35 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -6.87146778792226E-08 1.73205075848417E+00 z : -2.00000012423210E+00 6.72451725057925E-08 x : -2.00000003921490E+00 -5.17721413751262E-08 t : -6.87146785355248E-08 -1.73205085665358E+00 == err : 1.394E-07 = rco : 6.697E-09 = res : 4.134E-13 == solution 36 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 6.64123385764048E-08 -1.73205075991201E+00 z : 2.00000012220410E+00 -6.55381358439691E-08 x : 2.00000003965998E+00 4.94914088517632E-08 t : 6.64123386132757E-08 1.73205085522575E+00 == err : 1.387E-07 = rco : 6.542E-09 = res : 3.937E-13 == solution 37 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.00000000000000E+00 1.38662719944969E-54 z : 1.03527618041008E+00 2.61012178719941E-54 x : 1.03527618041008E+00 -2.73922305764310E-54 t : -1.00000000000000E+00 -5.70964140949871E-55 == err : 2.972E-15 = rco : 5.099E-02 = res : 3.553E-15 == solution 38 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.00000000000000E+00 -1.06036197604976E-54 z : -1.03527618041008E+00 -1.71289242284961E-54 x : -1.03527618041008E+00 1.80792937639691E-54 t : 1.00000000000000E+00 5.30180988024880E-55 == err : 2.972E-15 = rco : 5.099E-02 = res : 3.553E-15 == solution 39 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -6.70676624484987E-08 1.73205075948725E+00 z : 2.00000012231556E+00 -6.59142382481208E-08 x : 2.00000003903574E+00 5.02503608947312E-08 t : -6.70676627223605E-08 -1.73205085565051E+00 == err : 1.383E-07 = rco : 6.559E-09 = res : 3.800E-13 == solution 40 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 6.71985300364174E-08 -1.73205075841178E+00 z : -2.00000012262647E+00 6.46883747124073E-08 x : -2.00000003748388E+00 -5.17028939308009E-08 t : 6.71985305285384E-08 1.73205085672598E+00 == err : 1.380E-07 = rco : 6.569E-09 = res : 3.831E-13 == solution 41 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.00000000000000E+00 9.27301537671855E-69 z : -3.86370330515627E+00 8.90209476164981E-67 x : -3.86370330515627E+00 1.48368246027497E-67 t : -1.00000000000000E+00 -1.39095230650778E-68 == err : 3.119E-15 = rco : 1.227E-02 = res : 7.105E-15 == solution 42 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.00000000000000E+00 -5.56380922603113E-68 z : 3.86370330515627E+00 -5.93472984109987E-67 x : 3.86370330515627E+00 2.78190461301557E-68 t : 1.00000000000000E+00 2.78190461301557E-68 == err : 3.119E-15 = rco : 1.227E-02 = res : 7.105E-15 == solution 43 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.00000000000000E+00 1.04321422988084E-68 z : 3.86370330515627E+00 -7.41841230137484E-67 x : 3.86370330515627E+00 -1.03857772219248E-66 t : -1.00000000000000E+00 -1.28001759201242E-68 == err : 3.119E-15 = rco : 1.227E-02 = res : 7.105E-15 == solution 44 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.00000000000000E+00 5.21607114940419E-69 z : -3.86370330515627E+00 5.37834891849676E-67 x : -3.86370330515627E+00 -4.82196799589365E-67 t : 1.00000000000000E+00 -4.34672595783682E-70 == err : 3.119E-15 = rco : 1.227E-02 = res : 7.105E-15 == solution 45 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.47770838224294E-07 1.73205083400279E+00 z : -1.99999988873008E+00 1.92142362285763E-07 x : -1.99999993451496E+00 -6.38042375209335E-08 t : -1.47770838368828E-07 -1.73205078113496E+00 == err : 2.221E-07 = rco : 7.753E-09 = res : 8.620E-13 == solution 46 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.47452975307093E-07 -1.73205083375888E+00 z : 1.99999988868296E+00 -1.92059110471295E-07 x : 1.99999993404537E+00 6.33369348504009E-08 t : 1.47452975725790E-07 1.73205078137888E+00 == err : 2.214E-07 = rco : 7.754E-09 = res : 8.582E-13 == solution 47 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.47770838224294E-07 1.73205083400279E+00 z : 1.99999988873008E+00 -1.92142362285763E-07 x : 1.99999993451496E+00 6.38042375209335E-08 t : -1.47770838368828E-07 -1.73205078113496E+00 == err : 2.221E-07 = rco : 7.753E-09 = res : 8.620E-13 == solution 48 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.47452975307093E-07 -1.73205083375888E+00 z : -1.99999988868296E+00 1.92059110471295E-07 x : -1.99999993404537E+00 -6.33369348504009E-08 t : 1.47452975725790E-07 1.73205078137888E+00 == err : 2.214E-07 = rco : 7.754E-09 = res : 8.582E-13 == SHAR_EOF fi # end of overwriting check if test -f 'cassou' then echo shar: will not over-write existing file "'cassou'" else cat << "SHAR_EOF" > 'cassou' 4 15.0*b**4*c*d**2 + 6.0*b**4*c**3 + 21.0*b**4*c**2*d - 144.0*b**2*c - 8.0*b**2*c**2*e - 28.0*b**2*c*d*e - 648.0*b**2*d + 36.0*b**2*d**2*e + 9.0*b**4*d**3 - 120.0; 30.0*c**3*b**4*d - 32.0*d*e**2*c - 720.0*d*b**2*c - 24.0*c**3*b**2*e - 432.0*c**2*b**2 + 576.0*e*c - 576.0*d*e + 16.0*c*b**2*d**2*e + 16.0*d**2*e**2 + 16.0*e**2*c**2 + 9.0*c**4*b**4 + 5184.0 + 39.0*d**2*b**4*c**2 + 18.0*d**3*b**4*c - 432.0*d**2*b**2 + 24.0*d**3*b**2*e - 16.0*c**2*b**2*d*e - 240.0*c; 216.0*d*b**2*c - 162.0*d**2*b**2 - 81.0*c**2*b**2 + 5184.0 + 1008.0*e*c - 1008.0*d*e + 15.0*c**2*b**2*d*e - 15.0*c**3*b**2*e - 80.0*d*e**2*c + 40.0*d**2*e**2 + 40.0*e**2*c**2; 261.0 + 4.0*d*b**2*c - 3.0*d**2*b**2 - 4.0*c**2*b**2 + 22.0*e*c - 22.0*d*e; TITLE : the system of Pierrette Cassou-Nogu`es ROOT COUNTS : total degree : 1344 2-homogeneous Bezout bound : 368, with partition {{b},{c,d,e}} generalized Bezout bound : 312 based on (see T.Y.Li, Tianjun Wang and Xiaoshen Wang) {b} {b} {b} {b} {c d} {c d} {c d e} {b} {b} {b} {b} {c d} {c d} {c d e} {c d e} {b} {b} {e} {c d} {c d} {c d e} {b} {b} {c d} {c d e} mixed volume : 24 REFERENCES : Obtained by electronic mail by Carlo Traverso. See the POSSO test suite. T.Y. Li, Tianjun Wang, Xiaoshen Wang: "Random Product Homotopy with Minimal BKK Bound", in: "The Mathematics of Numerical Analysis" , Edited by Renegar, J. and Shub, M. and Smale, S. , Lectures in Applied Mathematics vol 32, 1996. Proceedings of the AMS-SIAM Summer Seminar in Applied Mathematics, Park City, Utah, July 17-August 11, 1995, Park City, Utah". NOTE : The system is deficient w.r.t. face normal (0,0,0,-1), with corresponding double component of solutions at infinity (b,c,c,e). The corresponding face system is -8*b**2*c**2*e - 28*b**2*c*d*e + 36*b**2*d**2*e = 0 16*c**2*e**2 - 32*c*d*e**2 + 16*d**2*e**2 = 0 40*c**2*e**2 - 80*c*d*e**2 + 40*d**2*e**2 = 0 22*c*e - 22*d*e = 0 THE SOLUTIONS : 16 4 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b : -7.54821372735305E-78 1.47284085072902E+01 c : 5.11897562286027E-01 -2.36672343825525E-79 d : -2.87205751065023E-01 1.32304584187543E-79 e : -3.80894550509321E+01 -1.98024646165642E-77 == err : 3.573E-13 = rco : 1.763E-05 = res : 1.091E-11 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b : 7.54821372735305E-78 -1.47284085072902E+01 c : 5.11897562286027E-01 -2.36672343825525E-79 d : -2.87205751065023E-01 1.32304584187543E-79 e : -3.80894550509321E+01 -1.98024646165642E-77 == err : 3.573E-13 = rco : 1.763E-05 = res : 1.091E-11 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b : -6.68640299606734E-03 8.94855573620861E-02 c : 5.62348716108504E+01 7.98084362941689E+01 d : 1.09694720379898E+01 -5.08259658932153E+01 e : -7.52233440839102E-02 -5.99175264541474E-02 == err : 2.650E-13 = rco : 3.639E-07 = res : 1.728E-11 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b : -6.68640299606762E-03 -8.94855573620861E-02 c : 5.62348716108506E+01 -7.98084362941687E+01 d : 1.09694720379896E+01 5.08259658932153E+01 e : -7.52233440839101E-02 5.99175264541477E-02 == err : 1.771E-13 = rco : 3.639E-07 = res : 1.029E-11 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b : 6.68640299606752E-03 8.94855573620863E-02 c : 5.62348716108503E+01 -7.98084362941685E+01 d : 1.09694720379896E+01 5.08259658932152E+01 e : -7.52233440839104E-02 5.99175264541477E-02 == err : 8.458E-14 = rco : 3.639E-07 = res : 9.095E-12 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b : 6.68640299606761E-03 -8.94855573620862E-02 c : 5.62348716108505E+01 7.98084362941687E+01 d : 1.09694720379896E+01 -5.08259658932153E+01 e : -7.52233440839102E-02 -5.99175264541477E-02 == err : 3.486E-13 = rco : 3.639E-07 = res : 2.301E-11 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b : -5.38538073236606E-04 1.52598333728220E-03 c : -1.07543281631105E+03 5.30600350408460E+03 d : 2.56422532949456E+02 9.41056507764428E+03 e : -3.08017284129789E-03 7.79451935745435E-05 == err : 3.507E-10 = rco : 4.323E-14 = res : 6.269E-10 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b : -8.34114996980346E-02 -2.50448888097739E-75 c : 4.02749534214863E+01 -2.91833407813751E-72 d : 5.17567280407121E+01 -3.90879897738419E-72 e : 8.62858019518498E-01 7.18529223783858E-75 == err : 7.684E-13 = rco : 8.909E-08 = res : 3.638E-12 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b : 5.38538073236606E-04 -1.52598333728220E-03 c : -1.07543281631105E+03 5.30600350408460E+03 d : 2.56422532949456E+02 9.41056507764428E+03 e : -3.08017284129789E-03 7.79451935745435E-05 == err : 3.507E-10 = rco : 4.323E-14 = res : 6.269E-10 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b : 8.34114996980346E-02 2.50448888097739E-75 c : 4.02749534214863E+01 -2.91833407813751E-72 d : 5.17567280407121E+01 -3.90879897738419E-72 e : 8.62858019518498E-01 7.18529223783858E-75 == err : 7.684E-13 = rco : 8.909E-08 = res : 3.638E-12 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b : -4.73975992311414E+01 -1.72623882440134E-70 c : 7.08768865860076E-02 -5.42213206563050E-73 d : 3.41971008721347E-03 -9.43069606216313E-75 e : -1.46865638657142E+02 -6.10126377935950E-70 == err : 4.169E-12 = rco : 9.519E-08 = res : 1.734E-12 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b : 4.73975992311414E+01 1.72623882440134E-70 c : 7.08768865860076E-02 -5.42213206563050E-73 d : 3.41971008721347E-03 -9.43069606216313E-75 e : -1.46865638657142E+02 -6.10126377935950E-70 == err : 4.169E-12 = rco : 9.519E-08 = res : 1.734E-12 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b : 5.38538073236603E-04 1.52598333728219E-03 c : -1.07543281631105E+03 -5.30600350408462E+03 d : 2.56422532949454E+02 -9.41056507764432E+03 e : -3.08017284129789E-03 -7.79451935745534E-05 == err : 1.891E-10 = rco : 4.323E-14 = res : 4.973E-10 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b : -4.33810415852418E-82 1.94275907300796E-03 c : 3.88078816153025E+03 -1.35263989994167E-75 d : 7.35174304802575E+03 -2.58599272171609E-75 e : 8.76917468831414E-03 1.82532392122536E-81 == err : 3.453E-10 = rco : 2.633E-14 = res : 2.328E-10 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b : 4.33810415852418E-82 -1.94275907300796E-03 c : 3.88078816153025E+03 -1.35263989994167E-75 d : 7.35174304802575E+03 -2.58599272171609E-75 e : 8.76917468831414E-03 1.82532392122536E-81 == err : 3.453E-10 = rco : 2.633E-14 = res : 2.328E-10 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : b : -5.38538073236603E-04 -1.52598333728219E-03 c : -1.07543281631105E+03 -5.30600350408462E+03 d : 2.56422532949454E+02 -9.41056507764432E+03 e : -3.08017284129789E-03 -7.79451935745534E-05 == err : 1.891E-10 = rco : 4.323E-14 = res : 4.973E-10 == SHAR_EOF fi # end of overwriting check if test -f 'chemequ' then echo shar: will not over-write existing file "'chemequ'" else cat << "SHAR_EOF" > 'chemequ' 5 y1*y2 + y1 - 3*y5; 2*y1*y2 + y1 + 1.9230E-06*y2**2 + y2*y3**2 + 5.4518E-04*y2*y3 + 3.4074E-05*y2*y4 + 4.4975E-07*y2 - 10*y5; 2*y2*y3**2 + 5.4518E-04*y2*y3 + 3.8600E-01*y3**2 + 4.1062E-04*y3 - 8*y5; 3.4074E-05*y2*y4 + 2*y4**2 - 40*y5; y1*y2 + y1 + 9.6150E-07*y2**2 + y2*y3**2 + 5.4518E-04*y2*y3 + 3.4074E-05*y2*y4 + 4.4975E-07*y2 + 1.930E-01*y3**2 + 4.1062E-04*y3 + y4**2 - 1; TITLE : chemical equilibrium of hydrocarbon combustion ROOT COUNTS : total degree : 108 3-homogeneous Bezout number : 56 with partition {y1 }{y2 y5 y4 }{y3 } generalized Bezout bound is 44, based on {y1 y5 }{y2 } {y1 y2 y5 }{y2 y3 y4 }{y3 } {y2 y5 }{y3 }{y3 } {y2 y5 y4 }{y4 } {y1 y2 y4 }{y2 y3 y4 }{y3 } mixed volume : 16 REFERENCES : This polynomial system describes the equilibrium of the products of hydrocarbon combustion. Keith Meintjes and Alexander P. Morgan: "Chemical equilibrium systems as numerical test problems", ACM Toms, Vol 16, No 2, 143-151, 1990. NOTES : Although the total degree equals 108, there are only 4 real and 12 complex solutions and an infinite number of solutions at infinity. A typographical error has occured in equation (2d), instead of `+ 4Ry5', it should be a `- 4Ry5'. Applying m-homogenization straight to it renders B = 56. Simple linear reduction makes the total degree equal to 48. With m-homogenization, no better upper bound can then be computed. The constants are : R = 10; p = 40; sqrt(p) = 6.3246 1/sqrt(p) = 0.1581 1/p = 0.0250 R5 = 1.930E-01 (2*R5 = 3.8600E-01) R6 = 2.597E-03/sqrt(p) = 4.1062E-04 R7 = 3.448E-03/sqrt(p) = 5.4518E-04 R8 = 1.799E-05/p = 4.4975E-07 R9 = 2.155E-04/sqrt(p) = 3.4074E-05 R10 = 3.846E-05/p = 9.6150E-07 (2*R10 = 1.9230E-06) THE SOLUTIONS : 16 5 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.38630037350383E-03 -1.91542055776285E-03 y2 : -2.86049955834289E+01 3.80706213979012E+01 y5 : 3.70633555200751E-02 3.26197913397758E-05 y3 : 2.49295017279909E-02 -4.99248345039094E-02 y4 : 8.61212433038939E-01 5.44767381799444E-05 == err : 3.011E-13 = rco : 5.147E-07 = res : 8.576E-17 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.73113619227222E-01 1.00759753038847E-04 y2 : -3.58157473618939E-01 -3.08119934353537E-04 y5 : 3.70372379206193E-02 3.77737915199671E-06 y3 : -5.09180689373301E-04 -9.47109079516830E-01 y4 : 8.60668351965905E-01 4.38916852917806E-05 == err : 4.344E-16 = rco : 8.635E-03 = res : 1.110E-16 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.22212992907913E-03 -2.80225128764545E-03 y2 : -1.56097422221056E+01 3.33169447718268E+01 y5 : 3.70724848710101E-02 7.41778676457834E-05 y3 : -3.44166565964789E-02 5.35200064242835E-02 y4 : -8.60942156715559E-01 -1.14522296229995E-03 == err : 1.696E-13 = rco : 6.970E-07 = res : 8.066E-17 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.57729760800450E-03 -2.22202282076660E-03 y2 : -2.46854897571808E+01 3.32492893427509E+01 y5 : 3.70799153440935E-02 6.18914044395885E-05 y3 : -2.72118749521147E-02 5.34657885776007E-02 y4 : 8.61371584905004E-01 4.35393767521562E-04 == err : 3.503E-13 = rco : 6.000E-07 = res : 1.164E-16 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 2.75718040490632E-03 9.65745061263782E-53 y2 : 3.92422451862829E+01 -4.91788706656964E-49 y5 : 3.69850432923516E-02 3.26265223399926E-54 y3 : -6.13876389840001E-02 -3.54976563059120E-52 y4 : 8.59724420833890E-01 0.00000000000000E+00 == err : 1.040E-13 = rco : 1.092E-06 = res : 8.544E-17 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 2.15330286265060E-03 1.01559609334694E-57 y2 : 5.05496866626878E+01 -1.10930175955975E-53 y5 : 3.70006959531691E-02 1.20726496390506E-58 y3 : -5.41447465741199E-02 -1.24261169068331E-56 y4 : -8.60671332237121E-01 -1.29812098696183E-57 == err : 1.156E-13 = rco : 6.918E-07 = res : 5.551E-17 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 3.11410764809440E-03 -1.01957882312477E-56 y2 : 3.45978628309741E+01 3.42447978480563E-51 y5 : 3.69518589659172E-02 -1.78426294046835E-56 y3 : 6.50418355152163E-02 -1.30506089359970E-54 y4 : 8.59378045022829E-01 -2.38326549905415E-55 == err : 1.053E-13 = rco : 1.352E-06 = res : 1.110E-16 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.22212992907914E-03 2.80225128764545E-03 y2 : -1.56097422221056E+01 -3.33169447718267E+01 y5 : 3.70724848710101E-02 -7.41778676457844E-05 y3 : -3.44166565964790E-02 -5.35200064242836E-02 y4 : -8.60942156715559E-01 1.14522296229997E-03 == err : 3.128E-13 = rco : 6.970E-07 = res : 5.606E-17 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 2.47099675027988E-03 -2.61375006529336E-46 y2 : 4.38792820192678E+01 1.88334513605255E-42 y5 : 3.69655200081684E-02 -4.44748047759341E-48 y3 : 5.77844154385579E-02 -3.34997914127652E-45 y4 : -8.60205478426535E-01 2.73691106313441E-47 == err : 2.720E-13 = rco : 8.217E-07 = res : 2.821E-16 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.57729760800454E-03 2.22202282076661E-03 y2 : -2.46854897571809E+01 -3.32492893427503E+01 y5 : 3.70799153440935E-02 -6.18914044395882E-05 y3 : -2.72118749521145E-02 -5.34657885776011E-02 y4 : 8.61371584905004E-01 -4.35393767521564E-04 == err : 1.414E-14 = rco : 6.000E-07 = res : 2.068E-16 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.73116100360128E-01 -1.00769456612651E-04 y2 : -3.58173414218133E-01 3.08154503561680E-04 y5 : 3.70368488968581E-02 -3.77667010792754E-06 y3 : -5.09203021995388E-04 9.47058402634478E-01 y4 : -8.60657729853578E-01 4.38784276875199E-05 == err : 5.643E-16 = rco : 8.634E-03 = res : 9.714E-17 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.05873332033354E-03 -2.45884369206460E-03 y2 : -1.74700517946024E+01 3.81184217502881E+01 y5 : 3.70548778315729E-02 4.66799125262148E-05 y3 : 3.21415658535543E-02 -4.99961359811686E-02 y4 : -8.60721535891716E-01 -8.66896553728644E-04 == err : 2.351E-13 = rco : 5.781E-07 = res : 1.141E-16 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.38630037350383E-03 1.91542055776285E-03 y2 : -2.86049955834289E+01 -3.80706213979012E+01 y5 : 3.70633555200751E-02 -3.26197913397761E-05 y3 : 2.49295017279909E-02 4.99248345039094E-02 y4 : 8.61212433038939E-01 -5.44767381799484E-05 == err : 2.778E-13 = rco : 5.147E-07 = res : 8.565E-17 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.73116100360128E-01 1.00769456612651E-04 y2 : -3.58173414218133E-01 -3.08154503561680E-04 y5 : 3.70368488968581E-02 3.77667010792754E-06 y3 : -5.09203021995389E-04 -9.47058402634478E-01 y4 : -8.60657729853578E-01 -4.38784276875199E-05 == err : 6.410E-16 = rco : 8.634E-03 = res : 1.110E-16 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.73113619227222E-01 -1.00759753038847E-04 y2 : -3.58157473618939E-01 3.08119934353537E-04 y5 : 3.70372379206193E-02 -3.77737915199671E-06 y3 : -5.09180689373301E-04 9.47109079516830E-01 y4 : 8.60668351965905E-01 -4.38916852917806E-05 == err : 4.344E-16 = rco : 8.635E-03 = res : 1.110E-16 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.05873332033354E-03 2.45884369206460E-03 y2 : -1.74700517946023E+01 -3.81184217502881E+01 y5 : 3.70548778315729E-02 -4.66799125262152E-05 y3 : 3.21415658535544E-02 4.99961359811686E-02 y4 : -8.60721535891716E-01 8.66896553728648E-04 == err : 2.423E-13 = rco : 5.781E-07 = res : 1.123E-16 == SHAR_EOF fi # end of overwriting check if test -f 'chemequs' then echo shar: will not over-write existing file "'chemequs'" else cat << "SHAR_EOF" > 'chemequs' 5 4.00649105280831E+00*y1*y2+ 5.26610813156747E-01*y1-4.73964757724582E-01* y5; 7.43133120490877E+00*y2*y3**2+ 5.31324863453933E+00*y1*y2+ 4.31363490603044E+00*y2**2+ 8.06989849429520E-01*y2*y3+ 1.49987275886495E-01*y2*y4+ 3.49185128215561E-01*y1+ 1.32605295558012E-01*y2-1.04758859585902E+00*y5; 1.88743868807074E+01*y2*y3**2+ 1.02481225819107E+00*y2*y3+ 4.78801780852764E-01*y3**2-1.06428266510309E+00*y5+ 1.01454213888243E-01*y3; 6.77344896993456E-02*y2*y4+ 7.80160463417002E+00*y4**2 -1.89237063040101E+00*y5; 3.89976792151467E+00*y2*y3**2+ 1.39412684031101E+00*y1*y2+ 1.13184129248280E+00*y2**2+ 4.23487130504208E-01*y2*y3+ 7.87093928408356E-02*y2*y4+ 9.89285552709683E-02*y3**2+ 4.53284262319986E+00*y4**2+ 1.83243206921733E-01*y1+ 6.95877849581671E-02*y2+ 4.19243169406760E-02*y3-2.03370256289491E+04; TITLE : scaled chemical equilibrium of hydrocarbon combustion SCALING COEFFICIENTS : 2 -1.67599894525044E+01 -0.00000000000000E+00 2.92753020454682E+00 0.00000000000000E+00 -1.84969093088580E+01 0.00000000000000E+00 -7.63798150414614E+00 0.00000000000000E+00 -6.06570250071970E+00 0.00000000000000E+00 1.58347985028662E+01 0.00000000000000E+00 1.52420534735530E+01 0.00000000000000E+00 1.55867906790425E+01 0.00000000000000E+00 1.40951758894744E+01 0.00000000000000E+00 1.43118210742736E+01 0.00000000000000E+00 THE SOLUTIONS : 16 5 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.92128055936496E+04 1.11826992898724E+01 y2 : -4.70760063942816E-02 -4.04991018427422E-05 y5 : 1.37013424264189E+04 1.39738188217081E+00 y3 : -1.01422302049308E-01 -1.88652054449720E+02 y4 : 5.76493255946996E+01 2.93995480431725E-03 == err : 4.584E-11 = rco : 5.476E-07 = res : 7.729E-12 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.92130809591834E+04 1.11837762292716E+01 y2 : -4.70781016172068E-02 -4.05036455990043E-05 y5 : 1.37011985132098E+04 1.39711958249263E+00 y3 : -1.01426750422921E-01 -1.88641960260808E+02 y4 : -5.76486141039022E+01 -2.93906678288265E-03 == err : 4.399E-11 = rco : 5.477E-07 = res : 7.276E-12 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.92128055936496E+04 -1.11826992898724E+01 y2 : -4.70760063942816E-02 4.04991018427422E-05 y5 : 1.37013424264189E+04 -1.39738188217081E+00 y3 : -1.01422302049308E-01 1.88652054449720E+02 y4 : 5.76493255946996E+01 -2.93995480431725E-03 == err : 4.584E-11 = rco : 5.476E-07 = res : 7.729E-12 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.92130809591834E+04 -1.11837762292716E+01 y2 : -4.70781016172068E-02 4.05036455990043E-05 y5 : 1.37011985132098E+04 -1.39711958249263E+00 y3 : -1.01426750422921E-01 1.88641960260808E+02 y4 : -5.76486141039022E+01 2.93906678288265E-03 == err : 4.399E-11 = rco : 5.477E-07 = res : 7.276E-12 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.75054466778545E+02 2.46608514515580E+02 y2 : -3.24464616614846E+00 -4.37026691608221E+00 y5 : 1.37171302665961E+04 -2.28957496046617E+01 y3 : -5.42025858073689E+00 -1.06497034777504E+01 y4 : 5.76964295745106E+01 -2.91635645814359E-02 == err : 2.083E-12 = rco : 1.249E-04 = res : 3.733E-12 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 2.38981713102819E+02 8.21073318940323E-47 y2 : 6.64422090237807E+00 -2.13821176807376E-48 y5 : 1.36878243014970E+04 -4.85801713706358E-47 y3 : -1.07849432549813E+01 -1.88162635590491E-48 y4 : -5.76495252193579E+01 1.14928882533964E-49 == err : 2.584E-11 = rco : 2.547E-04 = res : 5.457E-12 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.53856869779712E+02 -2.12580633289596E+02 y2 : -3.75982369259928E+00 5.00397994840807E+00 y5 : 1.37110042206992E+04 1.20671776870211E+01 y3 : 4.96563893125412E+00 -9.94439056801148E+00 y4 : 5.76857692571830E+01 3.64896328475527E-03 == err : 2.584E-11 = rco : 1.736E-04 = res : 2.679E-12 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.35636611621907E+02 -3.11004468940250E+02 y2 : -2.05173528067404E+00 4.37915950564526E+00 y5 : 1.37143814801902E+04 2.74409330213757E+01 y3 : -6.85535923436421E+00 1.06605029816151E+01 y4 : -5.76676655965436E+01 -7.67093750819953E-02 == err : 4.479E-11 = rco : 1.081E-04 = res : 3.393E-12 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.35636611621905E+02 3.11004468940250E+02 y2 : -2.05173528067402E+00 -4.37915950564529E+00 y5 : 1.37143814801902E+04 -2.74409330213757E+01 y3 : -6.85535923436423E+00 -1.06605029816151E+01 y4 : -5.76676655965436E+01 7.67093750819955E-02 == err : 4.481E-11 = rco : 1.081E-04 = res : 3.471E-12 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 2.74240584868995E+02 -1.24283559019287E-49 y2 : 5.76746686323101E+00 -8.35238971903811E-53 y5 : 1.36748115150506E+04 1.33638235504610E-51 y3 : 1.15099188925743E+01 -1.51387063657566E-51 y4 : -5.76183213788255E+01 -1.30506089359971E-53 == err : 3.634E-11 = rco : 1.878E-04 = res : 3.638E-12 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 3.45615469814633E+02 -1.23160997841048E-47 y2 : 4.54752261736269E+00 2.84649441624819E-49 y5 : 1.36697578277809E+04 4.10536659470161E-48 y3 : 1.29555044508551E+01 -7.05609883464340E-49 y4 : 5.75628981980042E+01 8.68648530779964E-51 == err : 4.105E-11 = rco : 1.274E-04 = res : 3.251E-12 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 3.06002331547060E+02 8.24798484755014E-52 y2 : 5.15797748585056E+00 4.56771312759897E-54 y5 : 1.36820338463285E+04 1.14845358636774E-52 y3 : -1.22276350872455E+01 -1.76183220635960E-53 y4 : 5.75860991578912E+01 2.34503129318697E-55 == err : 2.232E-11 = rco : 1.639E-04 = res : 3.606E-12 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.75054466778544E+02 -2.46608514515580E+02 y2 : -3.24464616614846E+00 4.37026691608223E+00 y5 : 1.37171302665961E+04 2.28957496046615E+01 y3 : -5.42025858073690E+00 1.06497034777503E+01 y4 : 5.76964295745106E+01 2.91635645814354E-02 == err : 1.716E-12 = rco : 1.249E-04 = res : 4.383E-12 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.53856869779711E+02 2.12580633289596E+02 y2 : -3.75982369259929E+00 -5.00397994840809E+00 y5 : 1.37110042206992E+04 -1.20671776870213E+01 y3 : 4.96563893125412E+00 9.94439056801145E+00 y4 : 5.76857692571830E+01 -3.64896328475550E-03 == err : 2.582E-11 = rco : 1.736E-04 = res : 2.711E-12 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.17502236680716E+02 2.72891792406016E+02 y2 : -2.29625327005255E+00 -5.01026279844028E+00 y5 : 1.37078680334543E+04 -1.72684979189792E+01 y3 : 6.40219016229585E+00 9.95859291329695E+00 y4 : -5.76528879627690E+01 5.80665032804691E-02 == err : 4.649E-11 = rco : 1.454E-04 = res : 4.400E-12 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.17502236680718E+02 -2.72891792406017E+02 y2 : -2.29625327005256E+00 5.01026279844024E+00 y5 : 1.37078680334543E+04 1.72684979189795E+01 y3 : 6.40219016229584E+00 -9.95859291329699E+00 y4 : -5.76528879627690E+01 -5.80665032804696E-02 == err : 4.705E-11 = rco : 1.454E-04 = res : 4.436E-12 == SHAR_EOF fi # end of overwriting check if test -f 'cohn2' then echo shar: will not over-write existing file "'cohn2'" else cat << "SHAR_EOF" > 'cohn2' 4 x**3*y**2+4*x**2*y**2*z-x**2*y*z**2+288*x**2*y**2+207*x**2*y*z+1152*x*y**2*z+ 156*x*y*z**2+x*z**3-3456*x**2*y+20736*x*y**2+19008*x*y*z+82944*y**2*z +432*x*z**2- 497664*x*y+62208*x*z+2985984*x; y**3*t**3+4*y**3*t**2-y**2*z*t**2+4*y**2*t**3-48*y**2*t**2-5*y*z*t**2 +108*y*z*t+ z**2*t+144*z*t-1728*z; -x**2*z**2*t+4*x*z**2*t**2+z**3*t**2+x**3*z+156*x**2*z*t+207*x*z**2*t+ 1152*x*z*t**2+288*z**2*t**2+432*x**2*z+19008*x*z*t-3456*z**2*t+82944*x*t**2+ 20736*z*t**2+62208*x*z-497664*z*t+2985984*z; y**3*t**3-x*y**2*t**2+4*y**3*t**2+4*y**2*t**3-5*x*y**2*t-48*y**2*t**2+x**2*y+ 108*x*y*t+144*x*y-1728*x; TITLE : the system cohn2 from the PoSSo test suite ROOT COUNTS : total degree : 900 2-homogeneous Bezout number is 450 with partition : {x y z }{t } generalized Bezout number : 358 based on the set structure : {x }{x z }{x z }{y }{y z } {y z }{y }{y z }{t }{t }{t } {x z }{x t }{z }{x z }{t } {y }{x y }{x y }{t }{t }{t } mixed volume : 124 REFERENCES : From PoSSo test suite. THE SOLUTIONS : 18 4 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.23997158246700E+02 -7.54108290873468E+01 y : 4.81861750852218E+01 2.85294148295339E+01 z : -1.61588268408412E+01 1.78870081595856E+01 t : -3.05964654408600E+00 1.82602611365708E-01 == err : 2.401E-13 = rco : 2.653E-04 = res : 4.265E-06 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 6.02393786358094E+02 2.51345585423244E-88 y : 2.08383161251585E+01 -5.10545720390964E-89 z : 6.02393786358094E+02 -9.73964143515069E-88 t : 2.08383161251585E+01 -6.13636683162216E-89 == err : 5.985E-13 = rco : 5.275E-06 = res : 5.035E-04 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -5.97960427705686E+01 6.80828237761971E+00 y : -4.99290642112624E-01 9.33089973938555E+00 z : -5.97960427705686E+01 6.80828237761971E+00 t : -4.99290642112627E-01 9.33089973938555E+00 == err : 1.830E-14 = rco : 5.344E-04 = res : 2.107E-07 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -8.42105246557411E+02 -1.12909149701848E-89 y : -7.66022331457492E+00 8.43750439348047E-92 z : -1.09615038022715E+01 -3.68182009897330E-91 t : -2.18804311393714E+01 -2.87642195232289E-91 == err : 9.157E-14 = rco : 7.570E-07 = res : 9.507E-06 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -5.97960427705686E+01 -6.80828237761971E+00 y : -4.99290642112623E-01 -9.33089973938555E+00 z : -5.97960427705686E+01 -6.80828237761971E+00 t : -4.99290642112629E-01 -9.33089973938555E+00 == err : 2.214E-14 = rco : 5.344E-04 = res : 9.424E-08 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 2.30226349318897E+00 2.29757961177032E+02 y : 1.17605675035346E+00 -2.87963907718388E+00 z : 2.30226349318902E+00 -2.29757961177032E+02 t : 1.17605675035346E+00 2.87963907718388E+00 == err : 4.355E-13 = rco : 5.736E-07 = res : 3.279E-06 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 4.35414647301048E-01 -7.37888274251716E+00 y : 1.83176559758234E+00 -4.11273135653901E+00 z : 4.35414647301049E-01 -7.37888274251716E+00 t : 1.83176559758234E+00 -4.11273135653901E+00 == err : 1.640E-15 = rco : 2.781E-04 = res : 5.890E-09 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 4.35414647301048E-01 7.37888274251716E+00 y : 1.83176559758234E+00 4.11273135653901E+00 z : 4.35414647301049E-01 7.37888274251716E+00 t : 1.83176559758234E+00 4.11273135653901E+00 == err : 1.640E-15 = rco : 2.781E-04 = res : 5.890E-09 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 6.02648764055773E+02 -8.10922451376730E+02 y : 1.17711982346853E+00 9.71239630969622E-01 z : 6.02648764055773E+02 -8.10922451376730E+02 t : 1.17711982346853E+00 9.71239630969621E-01 == err : 4.823E-13 = rco : 1.265E-09 = res : 3.553E-04 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.09615038022715E+01 -4.29545678213551E-91 y : -2.18804311393714E+01 4.14204761134496E-91 z : -8.42105246557411E+02 1.62000084354825E-89 t : -7.66022331457492E+00 0.00000000000000E+00 == err : 1.783E-13 = rco : 7.580E-07 = res : 1.144E-05 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.61588268408412E+01 1.78870081595856E+01 y : -3.05964654408600E+00 1.82602611365708E-01 z : -1.23997158246700E+02 -7.54108290873469E+01 t : 4.81861750852218E+01 2.85294148295338E+01 == err : 2.167E-13 = rco : 3.095E-04 = res : 5.150E-06 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.36567442620473E+02 6.73357734978399E+01 y : -1.33747712198973E+01 -2.20687866697351E+00 z : 1.36567442620473E+02 6.73357734978399E+01 t : -1.33747712198973E+01 -2.20687866697351E+00 == err : 2.057E-13 = rco : 1.822E-05 = res : 2.861E-06 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.61588268408412E+01 -1.78870081595856E+01 y : -3.05964654408600E+00 -1.82602611365708E-01 z : -1.23997158246700E+02 7.54108290873469E+01 t : 4.81861750852218E+01 -2.85294148295338E+01 == err : 2.167E-13 = rco : 3.095E-04 = res : 5.150E-06 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 2.30226349318900E+00 -2.29757961177032E+02 y : 1.17605675035346E+00 2.87963907718388E+00 z : 2.30226349318901E+00 2.29757961177032E+02 t : 1.17605675035346E+00 -2.87963907718388E+00 == err : 3.868E-13 = rco : 5.736E-07 = res : 5.030E-06 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.36567442620473E+02 -6.73357734978399E+01 y : -1.33747712198973E+01 2.20687866697351E+00 z : 1.36567442620473E+02 -6.73357734978399E+01 t : -1.33747712198973E+01 2.20687866697351E+00 == err : 2.057E-13 = rco : 1.822E-05 = res : 2.861E-06 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -6.71049434640517E+01 7.06909459002873E-89 y : -1.21079632432404E+01 2.07409198908829E-89 z : -6.71049434640517E+01 -6.28363963558109E-89 t : -1.21079632432404E+01 -2.25818299403695E-89 == err : 5.000E-14 = rco : 3.370E-04 = res : 5.960E-08 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 6.02648764055773E+02 8.10922451376730E+02 y : 1.17711982346853E+00 -9.71239630969622E-01 z : 6.02648764055773E+02 8.10922451376730E+02 t : 1.17711982346853E+00 -9.71239630969621E-01 == err : 5.276E-13 = rco : 1.265E-09 = res : 3.200E-04 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.23997158246700E+02 7.54108290873468E+01 y : 4.81861750852218E+01 -2.85294148295339E+01 z : -1.61588268408412E+01 -1.78870081595856E+01 t : -3.05964654408600E+00 -1.82602611365708E-01 == err : 2.401E-13 = rco : 2.653E-04 = res : 4.265E-06 == SHAR_EOF fi # end of overwriting check if test -f 'cohn3' then echo shar: will not over-write existing file "'cohn3'" else cat << "SHAR_EOF" > 'cohn3' 4 -x**3*y**2+2*x**2*y**2*z-x**2*y*z**2-144*x**2*y**2-207*x**2*y*z+288*x*y**2*z+ 78*x*y*z**2+x*z**3-3456*x**2*y-5184*x*y**2-9504*x*y*z-432*x*z**2 -248832*x*y+62208*x*z- 2985984*x; -x**3*z*t**2+x**2*z**2*t**2-6*x**3*z*t+4*x**2*z**2*t+32*x**3*t**2- 72*x**2*z*t**2-87*x*z**2*t**2-z**3*t**2-8*x**3*z-432*x**2*z*t-414*x*z**2*t+ 2592*x*z*t**2+864*z**2*t**2-1728*x**2*z-20736*x*z*t+3456*z**2*t -186624*z*t**2- 124416*x*z-1492992*z*t-2985984*z; x**2*y*t**3-2*x*y**2*t**3+y**3*t**3+8*x**2*y*t**2-12*x*y**2*t**2+4*y**3*t**2- 24*x*y*t**3+24*y**2*t**3+20*x**2*y*t-20*x*y**2*t-160*x*y*t**2+96*y**2*t**2+ 128*x*t**3+16*x**2*y+96*x*y*t+2304*x*t**2+1152*x*y+13824*x*t+27648*x; y**3*t**3-y**2*z*t**3+4*y**3*t**2-2*y**2*z*t**2+72*y**2*t**3+71*y*z*t**3+ 288*y**2*t**2+360*y*z*t**2+6*z**2*t**2+1728*y*t**3-464*z*t**3+432*y*z*t +8*z**2*t+ 6912*y*t**2-4320*z*t**2+13824*t**3+z**2-13824*z*t+55296*t**2 -13824*z; TITLE : the system cohn3 of the PoSSo test suite ROOT COUNTS : total degree : 1080 4-homogeneous Bezout number : 484 with partition : {x }{y }{z }{t } generalized Bezout number : 358 based on the set structure : {x }{x z }{x z }{y }{y z } {x z }{x }{x z }{z }{t }{t } {x y }{x y }{y }{t }{t }{t } {y z }{y }{y z }{t }{t }{t } mixed volume : 213 REFERENCES : See the PoSSo test suite. NOTE : From the 213 solution paths, 110 converged to finite solutions. There are eight highly singular solutons with zero components that are probably not isolated. THE SOLUTIONS : 110 4 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -5.90025910876502E+01 9.05968631491992E+01 y : -1.24470124803460E+01 1.48215132733852E+00 z : -2.23391011090995E+01 1.12694463772267E+02 t : -1.57668178930181E+00 -8.81145149033887E-01 == err : 2.092E-13 = rco : 4.393E-05 = res : 8.303E-07 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -4.75237862577888E+01 7.26655253495034E+01 y : 4.23960676753163E+00 1.33414276853263E+00 z : 1.73065046112821E+01 2.34401754015708E+01 t : 3.67233021072878E+00 2.80272443883883E+00 == err : 5.124E-13 = rco : 1.522E-04 = res : 3.216E-07 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.40246376149928E-15 -1.56330977595380E-14 y : -1.41047824499298E+01 -1.24522535036075E+00 z : 4.94733706737937E-30 -1.16787578659798E-29 t : -4.00000000000000E+00 1.94231431971054E-15 == err : 1.000E+00 = rco : 2.347E-45 = res : 0.000E+00 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.73479724455398E-23 -1.72730331549100E-23 y : -1.63664827987990E-01 8.99747150382565E-01 z : 5.27316319318461E-32 1.15081788448822E-31 t : -4.00000000000000E+00 -7.61302346493491E-17 == err : 1.000E+00 = rco : 3.322E-55 = res : 0.000E+00 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.15417338443690E+02 -5.91366391700831E+00 y : 1.96890371347932E+01 9.70398553201232E-01 z : -1.32140895076904E+02 -7.12174593042846E+00 t : -3.09135262007609E+00 2.52859880154546E+00 == err : 3.660E-13 = rco : 2.150E-06 = res : 1.745E-06 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.03302157935977E+02 -9.16426430477752E+01 y : -3.22060599304688E+01 -4.18355911008650E+00 z : 1.07346601969591E+01 -7.71926655426994E+00 t : -2.10604087089205E+00 -2.67477198024287E-01 == err : 3.324E-12 = rco : 6.821E-08 = res : 9.731E-07 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 6.68556236411628E+01 4.27536498963258E+01 y : -5.44706132076126E-01 -2.49934464978134E-01 z : 4.42309143010364E+01 -1.82114412418737E+01 t : -4.72244119762751E+00 1.45097259349270E+00 == err : 4.257E-14 = rco : 1.311E-05 = res : 1.581E-07 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -5.54814709220945E+02 1.53035670370211E-70 y : 2.35728724524423E+02 -2.47788671825376E-70 z : -2.29231590383505E+02 7.41787462042954E-71 t : -3.16542128786290E+00 2.16636668922940E-73 == err : 1.474E-10 = rco : 5.199E-08 = res : 5.291E-04 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -2.94221963968203E+01 8.53953295709482E+01 y : 1.27485524204371E+01 -3.00415156168674E+00 z : -1.56886195883811E+01 4.04142643613680E+01 t : -3.91211641536325E+00 6.08097324454460E-02 == err : 1.232E-13 = rco : 3.407E-05 = res : 1.682E-07 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.95155385045113E+01 -2.15126788805253E+01 y : -2.47745787064000E+01 -1.53147685941519E+01 z : 9.90904197528797E-01 1.90361396699111E+00 t : -1.48885295224396E+00 3.24355010359249E+00 == err : 2.889E-14 = rco : 2.034E-04 = res : 7.561E-09 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.15417338443690E+02 5.91366391700830E+00 y : 1.96890371347932E+01 -9.70398553201227E-01 z : -1.32140895076904E+02 7.12174593042841E+00 t : -3.09135262007609E+00 -2.52859880154545E+00 == err : 3.341E-13 = rco : 2.150E-06 = res : 9.977E-07 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.94037656375018E+02 -1.71986457096191E+02 y : -5.38088804148083E+00 -6.25658447597274E+00 z : -9.99792888925945E+01 -9.26448653450820E+01 t : -4.34259914486433E+00 1.73209488006281E-01 == err : 4.292E-13 = rco : 1.411E-05 = res : 3.894E-06 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -5.51474093412094E+01 3.17991831982990E+01 y : 4.47835234957661E+00 -3.24758213619845E+01 z : -1.52946209970679E+01 3.28859076159695E+01 t : -3.26779253793638E+00 -1.13274107715288E+00 == err : 3.442E-14 = rco : 6.767E-04 = res : 2.677E-07 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -4.32053491608623E+00 -3.54113856102330E+01 y : 9.22724506685155E+00 9.50868554903783E+00 z : 4.08744340115474E+01 -8.78753052173523E+01 t : -3.55344358605169E+00 1.14842194921460E-01 == err : 4.159E-14 = rco : 1.379E-05 = res : 1.661E-07 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -3.67175799075120E+02 -2.70253969014031E+02 y : 4.07046675085270E+01 -6.37716658240660E+00 z : 5.09650158801639E+01 3.56456575848226E+01 t : -9.25779956822003E-01 -3.39426675858697E-01 == err : 1.113E-11 = rco : 2.078E-09 = res : 2.556E-05 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -5.32000418163571E+00 -6.92915479755255E+01 y : 6.74948308842807E+00 -4.54695423061668E+00 z : -6.16659230123665E+00 -3.30825508313059E+01 t : -3.85451500388188E+00 6.82926038699057E-03 == err : 3.833E-14 = rco : 1.712E-05 = res : 4.577E-08 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 6.56082600642310E+00 -5.59666169423734E+00 y : 1.36658954508639E+01 1.44709128953531E+01 z : 1.17578162124766E+02 -6.09882844370304E+01 t : -4.14382573040973E+00 5.76336435532046E-02 == err : 8.665E-14 = rco : 2.241E-05 = res : 4.269E-08 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 3.10794649489447E+01 -7.29076124125570E+01 y : 3.04625639633620E+01 2.71803678500534E+00 z : -1.89143126735536E+01 -1.18969218646880E+02 t : -3.79254220981305E+00 7.86053428474938E-01 == err : 6.207E-13 = rco : 4.433E-06 = res : 9.670E-07 == solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.47158690384518E-01 2.09967066818492E+00 y : 4.70387306656191E+00 -3.82406855671726E+00 z : -3.84021723647312E+01 -8.11622239746174E+01 t : -2.87278969498408E+00 1.41847325368532E-01 == err : 3.685E-14 = rco : 1.207E-05 = res : 1.920E-08 == solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.49670074255171E+00 1.56352733820812E+01 y : -5.49652458928811E+00 -4.50322259225535E+00 z : 3.70924818325976E+00 -1.57262848687786E+01 t : -3.87880817799792E+00 -1.86991514426376E+00 == err : 4.077E-14 = rco : 1.119E-04 = res : 6.857E-09 == solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.53384304815887E+02 -4.52934159264766E+01 y : -8.82163299586144E+00 1.46649514711003E+01 z : -3.29249972531800E+01 -2.14363623748437E+01 t : -1.18196738301936E+00 -7.33297411295405E-01 == err : 9.120E-13 = rco : 3.210E-06 = res : 5.065E-07 == solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.84565666627906E+02 -2.45619255187000E+01 y : -2.91961341780703E+01 -1.68494429987170E+01 z : -5.08995755798776E+01 -3.36363772417751E+00 t : -1.42030494548864E+00 -4.80448865374001E-02 == err : 2.773E-13 = rco : 2.968E-06 = res : 3.468E-06 == solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.23641833668441E+01 -1.01363629037311E+01 y : -2.23542825758755E+01 -1.39275471408572E+00 z : 3.22580783906562E-01 3.39717063847288E-01 t : -1.57657821921990E+00 -2.77149313380845E-01 == err : 3.208E-12 = rco : 2.970E-06 = res : 2.713E-09 == solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 4.38690954142053E+01 -2.74553351381583E+00 y : -8.45731874864540E+01 -1.62187380923472E+01 z : 1.64804721431097E+03 1.69475294343830E+03 t : -8.77435940624859E-01 8.74530703654212E-01 == err : 8.300E-12 = rco : 5.135E-08 = res : 5.206E-04 == solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -5.51474093412094E+01 -3.17991831982990E+01 y : 4.47835234957661E+00 3.24758213619845E+01 z : -1.52946209970679E+01 -3.28859076159695E+01 t : -3.26779253793638E+00 1.13274107715288E+00 == err : 3.637E-14 = rco : 6.767E-04 = res : 1.945E-07 == solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 3.18180074222563E+01 -1.04656489956962E+01 y : 2.16357590608116E+01 -2.28185147849885E+01 z : 2.45814917547326E+02 4.15690266520049E+01 t : -4.81579037827382E+00 5.54343988237546E-01 == err : 8.667E-14 = rco : 4.396E-05 = res : 4.991E-07 == solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -2.94221963968203E+01 -8.53953295709482E+01 y : 1.27485524204371E+01 3.00415156168674E+00 z : -1.56886195883811E+01 -4.04142643613680E+01 t : -3.91211641536325E+00 -6.08097324454460E-02 == err : 1.377E-13 = rco : 3.407E-05 = res : 2.878E-07 == solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.38643620113823E+02 4.72962470942713E+02 y : 3.16879697038077E-01 1.62891631258779E-01 z : 3.27402484761064E+02 3.06477072961032E+02 t : -2.57565374715927E+00 7.05698454202092E+00 == err : 3.149E-13 = rco : 9.147E-07 = res : 1.173E-03 == solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.18582235303358E+02 -5.15238608867121E+01 y : -3.52365327844198E+01 1.24766691413796E+01 z : -4.55110744713282E+01 -5.46225757480811E+01 t : -2.22042352712598E+00 -2.57486752597812E-01 == err : 5.516E-13 = rco : 9.552E-06 = res : 3.046E-06 == solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.16306434539640E+00 -1.10898175150358E+00 y : 1.46456558498127E+00 -6.08879951055675E+00 z : -1.02206596913200E+01 -4.49708552249859E+01 t : -3.86849796895066E+00 2.83092083039473E-02 == err : 5.289E-14 = rco : 5.054E-05 = res : 1.164E-08 == solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 6.11845118393073E+01 -1.74580237494074E+01 y : 9.78725452773493E+00 -4.64067196361947E+00 z : -6.59887470792611E+01 -2.00098380594418E+01 t : -3.75322023588982E+00 -4.77294922650263E+00 == err : 3.883E-13 = rco : 6.718E-06 = res : 4.111E-07 == solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.02280506931627E+01 1.53433693447170E+01 y : -2.82414326803866E+00 -4.95573001623424E+00 z : 1.43959567068680E+00 -2.39123142578890E+01 t : -4.93613037429977E+00 -1.61609324481464E+00 == err : 7.536E-14 = rco : 1.517E-04 = res : 6.788E-09 == solution 33 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 6.68556236411628E+01 -4.27536498963258E+01 y : -5.44706132076126E-01 2.49934464978134E-01 z : 4.42309143010364E+01 1.82114412418737E+01 t : -4.72244119762751E+00 -1.45097259349270E+00 == err : 4.257E-14 = rco : 1.311E-05 = res : 1.581E-07 == solution 34 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 4.55460738808707E+01 -4.95021445242884E+00 y : 3.99827220861756E+01 4.72129512951692E+01 z : 1.53094850935343E+02 -8.72057246069333E+02 t : -1.65376315431575E+00 -1.95770056600529E+00 == err : 1.425E-12 = rco : 1.101E-06 = res : 3.823E-05 == solution 35 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.02280506931627E+01 -1.53433693447172E+01 y : -2.82414326803866E+00 4.95573001623424E+00 z : 1.43959567068678E+00 2.39123142578890E+01 t : -4.93613037429976E+00 1.61609324481465E+00 == err : 5.868E-14 = rco : 1.517E-04 = res : 3.870E-09 == solution 36 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.38643620113823E+02 -4.72962470942713E+02 y : 3.16879697038077E-01 -1.62891631258779E-01 z : 3.27402484761064E+02 -3.06477072961032E+02 t : -2.57565374715927E+00 -7.05698454202092E+00 == err : 3.149E-13 = rco : 9.147E-07 = res : 1.173E-03 == solution 37 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.61331390985520E+01 -5.29882840355185E+01 y : 2.84252111164308E-01 -1.04050005047977E+00 z : 4.42118558535036E+01 -2.36223893933577E+01 t : -5.10550358482768E+00 1.06870938987001E+00 == err : 5.683E-14 = rco : 6.429E-05 = res : 1.250E-07 == solution 38 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.95628136007603E+00 -9.88231778152994E+00 y : 3.77345063676659E+00 -2.50268662913768E+00 z : 1.37964779570617E+02 -3.38119001246323E+01 t : -6.30203694848904E+00 -1.29587542796947E+00 == err : 8.398E-14 = rco : 7.810E-05 = res : 2.037E-07 == solution 39 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -2.68839507549391E+01 -1.61841359010936E+02 y : 2.12929524965850E+00 -9.86736872793279E+01 z : 6.90507318004237E+01 -2.01461780660285E+01 t : -9.10682446967734E+00 -2.15217905588659E+00 == err : 7.121E-14 = rco : 2.115E-03 = res : 6.915E-06 == solution 40 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 2.15124522884158E+02 -7.39670564406729E-73 y : -7.22943075500396E+01 -3.36534216254920E-73 z : -9.49867582814775E+02 -5.02141384467411E-72 t : -2.62692861962936E+00 3.18188835201761E-75 == err : 5.389E-11 = rco : 8.607E-09 = res : 2.052E-04 == solution 41 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.95155385045113E+01 2.15126788805253E+01 y : -2.47745787064000E+01 1.53147685941519E+01 z : 9.90904197528795E-01 -1.90361396699110E+00 t : -1.48885295224396E+00 -3.24355010359249E+00 == err : 3.705E-14 = rco : 2.034E-04 = res : 4.537E-08 == solution 42 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 3.18180074222563E+01 1.04656489956962E+01 y : 2.16357590608116E+01 2.28185147849885E+01 z : 2.45814917547326E+02 -4.15690266520049E+01 t : -4.81579037827382E+00 -5.54343988237546E-01 == err : 8.667E-14 = rco : 4.396E-05 = res : 4.991E-07 == solution 43 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.44172826756610E+01 -5.25515290224040E-02 y : 1.76122593202485E+01 3.77531000568061E+01 z : 3.42987468923465E+01 -4.72671482737403E+01 t : -1.37849310664662E+00 1.40078129646555E+00 == err : 4.915E-14 = rco : 1.126E-03 = res : 4.364E-08 == solution 44 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 2.61286940511566E+01 9.70875765023535E+00 y : -2.12381190661376E+01 7.13825080033217E-01 z : 1.11859187582493E+03 -4.25672432291713E+02 t : -1.24734072423751E+00 -1.98308413190112E-02 == err : 6.939E-13 = rco : 6.804E-08 = res : 4.984E-06 == solution 45 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 6.90692208796891E+00 -1.01620446430065E+01 y : -1.70482623536743E+00 -2.99274429016964E+00 z : 2.25474529061888E+01 -2.24212348305634E+01 t : -6.48637663009983E+00 2.64404805705264E+00 == err : 2.681E-13 = rco : 1.932E-05 = res : 4.012E-08 == solution 46 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.23641833668421E+01 1.01363629037303E+01 y : -2.23542825758759E+01 1.39275471408637E+00 z : 3.22580783906473E-01 -3.39717063847070E-01 t : -1.57657821921985E+00 2.77149313380793E-01 == err : 1.191E-12 = rco : 2.970E-06 = res : 4.063E-09 == solution 47 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 2.17719937483726E+02 -2.57243599750467E-98 y : 2.23848168454726E+02 -2.25311389506519E-98 z : 4.68358211022472E+02 1.78591779887856E-98 t : 5.09222910029949E+01 -1.42587677062464E-98 == err : 2.936E-12 = rco : 2.020E-03 = res : 3.600E-03 == solution 48 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -2.71207947537349E+01 -1.36390013495954E+01 y : -2.25651452134900E+01 3.11445237180190E+00 z : 8.25825146990195E-02 2.71451467613092E+00 t : -1.55213906330023E+00 -4.64414918056402E-01 == err : 7.316E-13 = rco : 4.071E-06 = res : 2.235E-08 == solution 49 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.40493359539128E+01 3.89543438225118E+00 y : -1.97969233771770E+00 3.59617821067995E+00 z : 1.35484669856475E+01 2.29660554083659E+01 t : -7.60793408042875E+00 -5.41389864952358E-01 == err : 1.948E-13 = rco : 1.570E-05 = res : 2.608E-08 == solution 50 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.49670074255171E+00 -1.56352733820812E+01 y : -5.49652458928811E+00 4.50322259225535E+00 z : 3.70924818325976E+00 1.57262848687786E+01 t : -3.87880817799792E+00 1.86991514426376E+00 == err : 4.077E-14 = rco : 1.119E-04 = res : 6.857E-09 == solution 51 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -6.12545551076520E-01 5.78094846473460E-87 y : -1.65966809249845E+02 8.04305873354380E-85 z : 1.27321718362375E+04 -1.64721842862977E-83 t : 9.05975195550916E-02 -1.72800089978480E-88 == err : 2.869E-11 = rco : 1.191E-08 = res : 1.799E-04 == solution 52 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 6.90692208796894E+00 1.01620446430064E+01 y : -1.70482623536742E+00 2.99274429016964E+00 z : 2.25474529061887E+01 2.24212348305635E+01 t : -6.48637663009983E+00 -2.64404805705262E+00 == err : 1.512E-13 = rco : 1.932E-05 = res : 1.054E-08 == solution 53 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.98617893255504E-11 2.11140289513889E-11 y : -2.39995167716312E+01 -5.13921405870086E-04 z : -2.12611601365150E-14 -6.84039265586517E-19 t : -3.99999992699017E+00 1.57124866598780E-11 == err : 1.000E+00 = rco : 7.758E-24 = res : 0.000E+00 == solution 54 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.40493359539128E+01 -3.89543438225110E+00 y : -1.97969233771770E+00 -3.59617821067996E+00 z : 1.35484669856475E+01 -2.29660554083659E+01 t : -7.60793408042873E+00 5.41389864952340E-01 == err : 1.074E-13 = rco : 1.570E-05 = res : 1.490E-08 == solution 55 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 2.32981425777751E+01 2.07087453360424E+01 y : -2.75323090372018E+01 8.96973163351926E+00 z : 3.42160342680490E+02 2.04134935305509E+02 t : -2.17530220691479E+00 1.11195875276292E+00 == err : 4.612E-13 = rco : 1.372E-06 = res : 1.039E-06 == solution 56 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 4.48669943585602E+01 -2.52670543451553E+00 y : 5.31415575883297E+02 2.07857171593999E+02 z : -7.41520680923965E+03 -9.61609229051597E+03 t : 1.14867977230226E-01 -2.47757014416861E-01 == err : 6.822E-12 = rco : 2.307E-10 = res : 7.360E-02 == solution 57 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -9.20631036492830E+01 5.55101311684177E+01 y : -4.13356413147581E+01 9.57186355167354E+01 z : 4.18879854259126E+01 3.50881037259118E+01 t : -3.39943775888036E+00 6.28332372374137E+00 == err : 4.014E-14 = rco : 6.639E-03 = res : 3.302E-06 == solution 58 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -4.04896290427301E+00 4.78964731178102E+00 y : 2.56716585206498E+00 2.90030021884871E+00 z : 1.21132044352706E+02 9.79993155086884E+00 t : -5.10469359778637E+00 1.61649342724133E+00 == err : 2.115E-13 = rco : 7.989E-05 = res : 5.588E-08 == solution 59 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 2.24184552787327E+02 1.84540413259196E-71 y : -6.81769571392291E+01 8.41231906614640E-72 z : -8.88323528329940E+02 1.25700607838323E-70 t : -2.66557572810209E+00 -7.92454826615466E-74 == err : 4.557E-11 = rco : 8.741E-09 = res : 4.276E-04 == solution 60 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.69488370092423E-61 -1.92980431503067E-61 y : -2.89848782266713E-06 7.52458838186333E-06 z : 7.37487502333139E-36 -6.62596466884364E-36 t : -4.00000000000000E+00 -6.23937902400528E-22 == err : 1.000E+00 = rco : 1.101E-73 = res : 0.000E+00 == solution 61 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 6.56082600642310E+00 5.59666169423734E+00 y : 1.36658954508639E+01 -1.44709128953531E+01 z : 1.17578162124766E+02 6.09882844370304E+01 t : -4.14382573040973E+00 -5.76336435532046E-02 == err : 8.665E-14 = rco : 2.241E-05 = res : 4.269E-08 == solution 62 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 4.48669943585602E+01 2.52670543451556E+00 y : 5.31415575883295E+02 -2.07857171594000E+02 z : -7.41520680923965E+03 9.61609229051599E+03 t : 1.14867977230225E-01 2.47757014416862E-01 == err : 2.160E-11 = rco : 2.307E-10 = res : 4.906E-02 == solution 63 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.03302157935981E+02 9.16426430477709E+01 y : -3.22060599304685E+01 4.18355911008687E+00 z : 1.07346601969594E+01 7.71926655426916E+00 t : -2.10604087089204E+00 2.67477198024292E-01 == err : 4.965E-12 = rco : 6.821E-08 = res : 1.608E-06 == solution 64 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 8.04561501868579E-80 1.83741022558426E-79 y : -2.40000000000000E+01 4.69956614509083E-24 z : -1.62974100058296E+02 -3.67847000352996E-08 t : -2.90432807731661E+00 -1.43340733870114E-10 == err : 1.085E-06 = rco : 1.885E-10 = res : 3.796E-08 == solution 65 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.47158690384518E-01 -2.09967066818492E+00 y : 4.70387306656191E+00 3.82406855671726E+00 z : -3.84021723647312E+01 8.11622239746174E+01 t : -2.87278969498408E+00 -1.41847325368532E-01 == err : 3.685E-14 = rco : 1.207E-05 = res : 1.920E-08 == solution 66 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -4.32053491608623E+00 3.54113856102330E+01 y : 9.22724506685154E+00 -9.50868554903783E+00 z : 4.08744340115474E+01 8.78753052173523E+01 t : -3.55344358605169E+00 -1.14842194921460E-01 == err : 3.539E-14 = rco : 1.379E-05 = res : 1.993E-07 == solution 67 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -4.10683079181047E+00 -2.41672650075629E+01 y : -2.90547855648737E+00 6.48768060233834E+00 z : -7.05051626186873E+00 2.69424916214519E+01 t : -4.00641481816847E+00 1.17563011066139E+00 == err : 8.318E-14 = rco : 1.017E-05 = res : 1.570E-08 == solution 68 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 5.07599781895322E+01 2.21202123036599E+00 y : 5.31513692227724E+01 1.46376024298338E+00 z : -8.23400904912380E+02 1.67773856322652E+02 t : 6.52735765371554E+00 -9.73432388723326E+00 == err : 2.671E-13 = rco : 1.397E-05 = res : 1.304E-04 == solution 69 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -5.32000418163571E+00 6.92915479755255E+01 y : 6.74948308842807E+00 4.54695423061668E+00 z : -6.16659230123665E+00 3.30825508313059E+01 t : -3.85451500388188E+00 -6.82926038699059E-03 == err : 3.934E-14 = rco : 1.712E-05 = res : 1.734E-08 == solution 70 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.61331390985520E+01 5.29882840355185E+01 y : 2.84252111164308E-01 1.04050005047977E+00 z : 4.42118558535036E+01 2.36223893933577E+01 t : -5.10550358482768E+00 -1.06870938987001E+00 == err : 5.683E-14 = rco : 6.429E-05 = res : 1.250E-07 == solution 71 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 2.32981425777751E+01 -2.07087453360424E+01 y : -2.75323090372018E+01 -8.96973163351926E+00 z : 3.42160342680490E+02 -2.04134935305509E+02 t : -2.17530220691479E+00 -1.11195875276292E+00 == err : 3.815E-13 = rco : 1.372E-06 = res : 1.314E-06 == solution 72 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.53384304815887E+02 4.52934159264769E+01 y : -8.82163299586139E+00 -1.46649514711003E+01 z : -3.29249972531800E+01 2.14363623748437E+01 t : -1.18196738301936E+00 7.33297411295406E-01 == err : 7.152E-13 = rco : 3.210E-06 = res : 5.970E-07 == solution 73 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.02001100043030E+02 8.29549455981089E+01 y : 2.53611581401022E+00 -7.17995769453416E+00 z : -7.12699182759858E+00 3.43827337744101E+01 t : -6.05102207702594E-01 1.91382906661638E+00 == err : 5.427E-13 = rco : 7.881E-06 = res : 2.524E-07 == solution 74 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 5.07599781895322E+01 -2.21202123036596E+00 y : 5.31513692227723E+01 -1.46376024298340E+00 z : -8.23400904912378E+02 -1.67773856322650E+02 t : 6.52735765371548E+00 9.73432388723330E+00 == err : 6.859E-12 = rco : 1.397E-05 = res : 1.526E-04 == solution 75 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 2.61286940511566E+01 -9.70875765023535E+00 y : -2.12381190661376E+01 -7.13825080033217E-01 z : 1.11859187582493E+03 4.25672432291713E+02 t : -1.24734072423751E+00 1.98308413190112E-02 == err : 6.939E-13 = rco : 6.804E-08 = res : 4.984E-06 == solution 76 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 7.00991599534891E+01 -2.60592904472966E+01 y : -1.98812862154641E+00 3.26792066776005E+00 z : 4.78299571417954E+02 2.53993923833339E+02 t : -2.96604195467693E+00 5.12080732066024E+00 == err : 2.554E-13 = rco : 2.950E-06 = res : 7.644E-06 == solution 77 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 3.10794649489455E+01 7.29076124125571E+01 y : 3.04625639633621E+01 -2.71803678500554E+00 z : -1.89143126735541E+01 1.18969218646881E+02 t : -3.79254220981306E+00 -7.86053428474945E-01 == err : 3.770E-13 = rco : 4.433E-06 = res : 6.187E-07 == solution 78 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 5.75562044510810E+01 6.11150460593231E+00 y : -2.13137785647554E+01 3.10106279403484E+01 z : 8.81546895491994E+02 4.61318600272472E+02 t : -3.11337804605700E+00 1.23235257958191E+00 == err : 1.373E-12 = rco : 1.397E-06 = res : 3.301E-05 == solution 79 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -4.04896290427301E+00 -4.78964731178102E+00 y : 2.56716585206498E+00 -2.90030021884871E+00 z : 1.21132044352706E+02 -9.79993155086885E+00 t : -5.10469359778637E+00 -1.61649342724133E+00 == err : 2.046E-13 = rco : 7.989E-05 = res : 8.886E-08 == solution 80 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.51964711740014E-10 2.41909728055753E-10 y : -2.40031402908505E+01 -4.99959296831382E-03 z : -1.38247246804984E-14 -9.64881030414686E-18 t : -3.99999991397518E+00 -2.71871694993950E-11 == err : 1.000E+00 = rco : 8.158E-25 = res : 0.000E+00 == solution 81 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 6.11845118393073E+01 1.74580237494072E+01 y : 9.78725452773496E+00 4.64067196361948E+00 z : -6.59887470792613E+01 2.00098380594416E+01 t : -3.75322023588984E+00 4.77294922650262E+00 == err : 1.054E-13 = rco : 6.718E-06 = res : 7.297E-08 == solution 82 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 7.00991599534890E+01 2.60592904472966E+01 y : -1.98812862154641E+00 -3.26792066776005E+00 z : 4.78299571417954E+02 -2.53993923833339E+02 t : -2.96604195467693E+00 -5.12080732066023E+00 == err : 2.701E-13 = rco : 2.950E-06 = res : 1.910E-05 == solution 83 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 2.75560959227384E+01 5.20066863253400E+00 y : 1.21542277867312E+01 -4.71360964404412E-01 z : -1.07630426429282E+02 -2.73303063394899E+00 t : -9.69169270409334E+00 -7.50158510907063E-01 == err : 3.882E-13 = rco : 1.053E-03 = res : 3.372E-07 == solution 84 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.31810639554578E+02 -1.82662703814071E+01 y : -1.77812496263624E+01 -1.21216260205370E+02 z : -9.61714049405551E+02 -1.97526702081302E+03 t : -1.38065121443922E+00 1.60159969897741E+00 == err : 9.297E-12 = rco : 2.370E-08 = res : 1.015E-03 == solution 85 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 2.75560959227384E+01 -5.20066863253397E+00 y : 1.21542277867312E+01 4.71360964404412E-01 z : -1.07630426429282E+02 2.73303063394902E+00 t : -9.69169270409334E+00 7.50158510907066E-01 == err : 3.206E-13 = rco : 1.053E-03 = res : 2.666E-07 == solution 86 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 5.05499346933165E+00 5.19766077700013E+00 y : -2.09049429539725E+01 1.10980171731875E+00 z : 1.71338864579986E+03 -2.21166332740105E+02 t : 1.92617882880983E-01 -2.22714964444266E+00 == err : 1.243E-12 = rco : 7.916E-09 = res : 4.265E-06 == solution 87 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 2.49419619001070E+02 8.11200858414064E+01 y : -9.77475180434459E+00 5.63094590794654E+00 z : -1.00659270883161E+03 -2.78255219738780E+02 t : -1.11068780164045E+00 4.21280115547008E-01 == err : 1.253E-12 = rco : 2.339E-08 = res : 1.251E-04 == solution 88 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.02233200347170E-17 -2.81056298171063E-17 y : -4.88734280549570E-01 4.80582567417680E+00 z : 2.81673211854176E-31 1.24169614334347E-30 t : -4.00000000000000E+00 -3.60638027170449E-16 == err : 1.000E+00 = rco : 9.399E-49 = res : 0.000E+00 == solution 89 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -9.20631036492829E+01 -5.55101311684177E+01 y : -4.13356413147580E+01 -9.57186355167354E+01 z : 4.18879854259126E+01 -3.50881037259118E+01 t : -3.39943775888036E+00 -6.28332372374137E+00 == err : 4.164E-14 = rco : 6.639E-03 = res : 4.531E-06 == solution 90 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.44172826756610E+01 5.25515290224040E-02 y : 1.76122593202485E+01 -3.77531000568061E+01 z : 3.42987468923465E+01 4.72671482737403E+01 t : -1.37849310664662E+00 -1.40078129646555E+00 == err : 4.867E-14 = rco : 1.126E-03 = res : 4.364E-08 == solution 91 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 6.98520398474938E+01 -3.20486410822187E+02 y : 3.05165151323504E+01 -1.00014847280249E+01 z : -4.47795825093724E+00 7.32778076297379E+01 t : -1.11643283976672E+00 -1.13118764287412E+00 == err : 8.825E-12 = rco : 1.454E-08 = res : 6.831E-06 == solution 92 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -4.60059071134581E-01 4.05996087171871E-01 y : 3.22940165564754E+00 2.78708938021953E+00 z : 5.17137400362922E+01 -3.05073857031893E+02 t : -1.92942336014045E+00 1.87095795922582E+00 == err : 5.298E-13 = rco : 7.980E-07 = res : 3.235E-07 == solution 93 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -4.10683079181038E+00 2.41672650075629E+01 y : -2.90547855648737E+00 -6.48768060233833E+00 z : -7.05051626186871E+00 -2.69424916214519E+01 t : -4.00641481816847E+00 -1.17563011066139E+00 == err : 1.064E-13 = rco : 1.017E-05 = res : 1.337E-08 == solution 94 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -5.49954634599366E+01 -1.44523711618365E-87 y : -1.01595173126731E+02 -6.28363963558109E-87 z : 1.38200698564026E+04 -6.91200359913920E-88 t : 7.43654905104309E-05 1.68750087869609E-91 == err : 3.779E-11 = rco : 2.284E-09 = res : 2.014E-02 == solution 95 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.95628136007603E+00 9.88231778152994E+00 y : 3.77345063676659E+00 2.50268662913768E+00 z : 1.37964779570617E+02 3.38119001246323E+01 t : -6.30203694848904E+00 1.29587542796947E+00 == err : 8.398E-14 = rco : 7.810E-05 = res : 2.037E-07 == solution 96 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.61043366222372E+01 4.28112638641501E+01 y : -2.21448715359015E+00 3.43745228463158E+00 z : 2.24852186190915E+01 2.47962317273294E+00 t : -1.10596684314867E+00 -5.53522451184705E+00 == err : 1.072E-13 = rco : 2.957E-04 = res : 2.980E-08 == solution 97 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.25084826931110E-31 -5.93818381391986E-32 y : 7.99553024248291E+00 1.20299447935335E-03 z : -7.40703864347129E-06 8.59304540113935E-12 t : -4.00000000000000E+00 -2.15450029387210E-19 == err : 1.000E+00 = rco : 2.224E-18 = res : 0.000E+00 == solution 98 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -2.96192555235841E+01 -8.27730960224508E+01 y : -2.29112682374218E+01 -6.52861657606554E+00 z : -1.82209545736459E+00 -1.52598632447351E+02 t : -1.41928514678328E+00 -2.98331835076289E-02 == err : 4.886E-13 = rco : 5.735E-06 = res : 6.951E-07 == solution 99 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -4.75237862577883E+01 -7.26655253495039E+01 y : 4.23960676753162E+00 -1.33414276853262E+00 z : 1.73065046112820E+01 -2.34401754015710E+01 t : 3.67233021072876E+00 -2.80272443883887E+00 == err : 1.330E-13 = rco : 1.522E-04 = res : 2.982E-07 == solution 100 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.94037656375018E+02 1.71986457096191E+02 y : -5.38088804148083E+00 6.25658447597274E+00 z : -9.99792888925945E+01 9.26448653450820E+01 t : -4.34259914486433E+00 -1.73209488006281E-01 == err : 4.292E-13 = rco : 1.411E-05 = res : 3.894E-06 == solution 101 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.84565666627906E+02 2.45619255187003E+01 y : -2.91961341780703E+01 1.68494429987169E+01 z : -5.08995755798777E+01 3.36363772417757E+00 t : -1.42030494548865E+00 4.80448865374015E-02 == err : 4.168E-13 = rco : 2.968E-06 = res : 1.551E-06 == solution 102 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.04903884116783E+02 -8.02510651185497E+01 y : -3.30062488687553E+01 -8.26793204969145E-01 z : -2.22497855899903E+01 -2.76155070847792E+00 t : -1.78780256759007E+00 -1.06938086607702E-02 == err : 8.081E-13 = rco : 5.261E-07 = res : 1.046E-06 == solution 103 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.02001100043030E+02 -8.29549455981090E+01 y : 2.53611581401025E+00 7.17995769453415E+00 z : -7.12699182759859E+00 -3.43827337744099E+01 t : -6.05102207702589E-01 -1.91382906661638E+00 == err : 1.476E-12 = rco : 7.881E-06 = res : 2.738E-07 == solution 104 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.61043366222373E+01 -4.28112638641499E+01 y : -2.21448715359015E+00 -3.43745228463158E+00 z : 2.24852186190916E+01 -2.47962317273290E+00 t : -1.10596684314869E+00 5.53522451184704E+00 == err : 1.165E-13 = rco : 2.957E-04 = res : 6.144E-08 == solution 105 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -2.71207947537353E+01 1.36390013495971E+01 y : -2.25651452134905E+01 -3.11445237180190E+00 z : 8.25825146986806E-02 -2.71451467613094E+00 t : -1.55213906330022E+00 4.64414918056386E-01 == err : 1.210E-12 = rco : 4.071E-06 = res : 1.510E-08 == solution 106 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -8.78220136135356E-26 -1.52020471515372E-25 y : 1.51720376470113E-01 -4.24973832152855E-01 z : 4.57076454154463E-31 4.49013892531636E-31 t : -4.00000000000000E+00 3.43640945817186E-17 == err : 1.000E+00 = rco : 1.379E-57 = res : 0.000E+00 == solution 107 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -4.60059071134581E-01 -4.05996087171871E-01 y : 3.22940165564754E+00 -2.78708938021953E+00 z : 5.17137400362922E+01 3.05073857031893E+02 t : -1.92942336014045E+00 -1.87095795922582E+00 == err : 5.298E-13 = rco : 7.980E-07 = res : 3.235E-07 == solution 108 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.16306434539640E+00 1.10898175150358E+00 y : 1.46456558498127E+00 6.08879951055675E+00 z : -1.02206596913200E+01 4.49708552249859E+01 t : -3.86849796895066E+00 -2.83092083039473E-02 == err : 5.289E-14 = rco : 5.054E-05 = res : 1.164E-08 == solution 109 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 5.05499346933165E+00 -5.19766077700013E+00 y : -2.09049429539725E+01 -1.10980171731875E+00 z : 1.71338864579986E+03 2.21166332740104E+02 t : 1.92617882880983E-01 2.22714964444266E+00 == err : 1.238E-12 = rco : 7.916E-09 = res : 7.864E-06 == solution 110 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.46459210866945E+02 5.79679373737119E-65 y : 4.78083383035261E+01 -2.90616301906359E-65 z : -1.05730249351772E+02 8.06643669625568E-66 t : -3.29666970014919E+00 -1.70978012767557E-67 == err : 4.167E-11 = rco : 1.811E-07 = res : 2.728E-06 == SHAR_EOF fi # end of overwriting check if test -f 'comb3000' then echo shar: will not over-write existing file "'comb3000'" else cat << "SHAR_EOF" > 'comb3000' 10 x2 + 2*x6 + x9 + 2*x10 - 1.0E-5; x3 + x8 - 3.0E-5; x1 + x3 + 2*x5 + 2*x8 + x9 + x10 - 5.0E-5; x4 + 2*x7 - 1.0E-5; 0.5140437E-7 * x5 - x1**2; 0.1006932E-6 * x6 - x2**2; 0.7816278E-15 * x7 - x4**2; 0.1496236E-6 * x8 - x1*x3; 0.6194411E-7 * x9 - x1*x2; 0.2089296E-14 * x10 - x1*x2**2; TITLE : Model A combustion chemistry example for a temparature of 3000 degrees ROOT COUNTS : total degree : 96 5-homogeneous Bezout number : 44 with partition : {x2 x6 x9 x10 }{x3 x8 }{x1 }{x5 }{x4 x7 } mixed volume : 16 REFERENCES : A.P. Morgan: `Solving Polynomial Systems Using Continuation for Engineering and Scientific Problems', Prentice-Hall, Englewood Cliffs, N.J., 1987. Chapter 9. NOTE : The system should be scaled properly. See the file comb3000s. THE SOLUTIONS : 16 10 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : 2.44157718332959E-07 -2.69135029358109E-68 x6 : 5.92025990052519E-07 -1.39548002247951E-67 x9 : 5.53814405529183E-07 1.66914276780934E-67 x10 : 4.00898794801641E-06 6.95476153253892E-68 x3 : 1.54714076656939E-05 9.27301537671856E-67 x8 : 1.45285923343061E-05 -9.08755506918418E-67 x1 : 1.40505656302463E-07 5.30735744001309E-68 x5 : 3.84049827922917E-07 2.90136321227487E-67 x4 : 6.25149147668167E-11 -8.25298368527951E-67 x7 : 4.99996874254262E-06 4.12163150278652E-67 == err : 4.098E-19 = rco : 1.302E-15 = res : 2.753E-21 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : -8.91664127240689E-08 -9.91828751827260E-08 x6 : -1.87360573646801E-08 1.75657962676780E-07 x9 : -7.91642740880272E-07 1.14477345706777E-06 x10 : 5.45914063416685E-06 -6.98453253619300E-07 x3 : 4.73669630616887E-10 7.13749004225551E-06 x8 : 2.99995263303694E-05 -7.13749004225551E-06 x1 : -1.49581864476755E-07 -6.28891662707340E-07 x5 : -7.25872117958961E-06 3.66003075075719E-06 x4 : 6.25149147668167E-11 -1.65059673705590E-66 x7 : 4.99996874254262E-06 8.24326300557305E-67 == err : 8.070E-19 = rco : 1.843E-15 = res : 1.388E-20 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : 2.44157718332959E-07 6.52530446799852E-55 x6 : 5.92025990052519E-07 4.24144790419904E-54 x9 : 5.53814405529183E-07 -3.75205006909915E-54 x10 : 4.00898794801641E-06 -2.61012178719941E-54 x3 : 1.54714076656939E-05 -2.54486874251943E-53 x8 : 1.45285923343061E-05 2.54486874251943E-53 x1 : 1.40505656302463E-07 -8.97229364349797E-55 x5 : 3.84049827922917E-07 -8.93151049057298E-54 x4 : -6.25153055807167E-11 1.14702617601537E-55 x7 : 5.00003125765279E-06 -5.70326904185418E-56 == err : 4.098E-19 = rco : 1.302E-15 = res : 2.753E-21 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : -8.91664127240689E-08 -9.91828751827260E-08 x6 : -1.87360573646801E-08 1.75657962676780E-07 x9 : -7.91642740880272E-07 1.14477345706777E-06 x10 : 5.45914063416685E-06 -6.98453253619300E-07 x3 : 4.73669630616975E-10 7.13749004225551E-06 x8 : 2.99995263303694E-05 -7.13749004225551E-06 x1 : -1.49581864476755E-07 -6.28891662707340E-07 x5 : -7.25872117958961E-06 3.66003075075719E-06 x4 : -6.25153055807167E-11 -4.63650768835928E-69 x7 : 5.00003125765279E-06 2.31825384417964E-69 == err : 8.068E-19 = rco : 1.843E-15 = res : 1.395E-20 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : 7.04569390653156E-08 -9.69102131998154E-08 x6 : -4.39692964369002E-08 -1.35619823110719E-07 x9 : 8.31555564214474E-07 9.93970971497191E-07 x10 : 4.59296304479701E-06 -3.12910556037969E-07 x3 : -1.40318385913825E-07 -6.90383625579641E-06 x8 : 3.01403183859138E-05 6.90383625579641E-06 x1 : -1.62832772240636E-07 6.49907434653423E-07 x5 : -7.70100211134234E-06 -4.11740205295453E-06 x4 : 6.25149147668167E-11 0.00000000000000E+00 x7 : 4.99996874254262E-06 0.00000000000000E+00 == err : 8.466E-19 = rco : 2.446E-15 = res : 8.375E-21 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : -8.91664127240689E-08 9.91828751827260E-08 x6 : -1.87360573646801E-08 -1.75657962676780E-07 x9 : -7.91642740880272E-07 -1.14477345706777E-06 x10 : 5.45914063416685E-06 6.98453253619300E-07 x3 : 4.73669630616939E-10 -7.13749004225551E-06 x8 : 2.99995263303694E-05 7.13749004225551E-06 x1 : -1.49581864476755E-07 6.28891662707340E-07 x5 : -7.25872117958961E-06 -3.66003075075719E-06 x4 : 6.25149147668167E-11 -1.42581726046354E-56 x7 : 4.99996874254262E-06 7.09033777052028E-57 == err : 8.069E-19 = rco : 1.843E-15 = res : 1.388E-20 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : 7.04569390653156E-08 -9.69102131998154E-08 x6 : -4.39692964369002E-08 -1.35619823110719E-07 x9 : 8.31555564214474E-07 9.93970971497191E-07 x10 : 4.59296304479701E-06 -3.12910556037969E-07 x3 : -1.40318385913825E-07 -6.90383625579641E-06 x8 : 3.01403183859138E-05 6.90383625579641E-06 x1 : -1.62832772240636E-07 6.49907434653423E-07 x5 : -7.70100211134234E-06 -4.11740205295453E-06 x4 : -6.25153055807167E-11 0.00000000000000E+00 x7 : 5.00003125765279E-06 0.00000000000000E+00 == err : 8.468E-19 = rco : 2.446E-15 = res : 8.565E-21 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : -8.91664127240689E-08 9.91828751827260E-08 x6 : -1.87360573646801E-08 -1.75657962676780E-07 x9 : -7.91642740880272E-07 -1.14477345706777E-06 x10 : 5.45914063416685E-06 6.98453253619300E-07 x3 : 4.73669630616637E-10 -7.13749004225551E-06 x8 : 2.99995263303694E-05 7.13749004225551E-06 x1 : -1.49581864476755E-07 6.28891662707340E-07 x5 : -7.25872117958961E-06 -3.66003075075719E-06 x4 : -6.25153055807167E-11 -4.63650768835928E-69 x7 : 5.00003125765279E-06 2.31825384417964E-69 == err : 9.068E-19 = rco : 1.843E-15 = res : 1.474E-20 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : 7.04569390653156E-08 9.69102131998154E-08 x6 : -4.39692964369002E-08 1.35619823110719E-07 x9 : 8.31555564214474E-07 -9.93970971497191E-07 x10 : 4.59296304479701E-06 3.12910556037969E-07 x3 : -1.40318385913825E-07 6.90383625579641E-06 x8 : 3.01403183859138E-05 -6.90383625579641E-06 x1 : -1.62832772240636E-07 -6.49907434653423E-07 x5 : -7.70100211134234E-06 4.11740205295453E-06 x4 : -6.25153055807167E-11 0.00000000000000E+00 x7 : 5.00003125765279E-06 0.00000000000000E+00 == err : 8.467E-19 = rco : 2.446E-15 = res : 1.525E-20 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : -2.60313982923272E-07 -1.28338532813785E-65 x6 : 6.72968678176653E-07 4.36944484550978E-65 x9 : -6.17521153048185E-07 -8.60535826959482E-66 x10 : 4.76594888980908E-06 -3.29377506181043E-65 x3 : 1.51354874557977E-05 -1.54302975868597E-65 x8 : 1.48645125442023E-05 1.54302975868597E-65 x1 : 1.46944846381988E-07 8.25298368527951E-67 x5 : 4.20057436327419E-07 1.28338532813785E-65 x4 : -6.25153055807167E-11 -1.66914276780934E-66 x7 : 5.00003125765279E-06 8.34571383904670E-67 == err : 3.791E-19 = rco : 1.325E-15 = res : 1.482E-21 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : 7.04569390653156E-08 9.69102131998154E-08 x6 : -4.39692964369002E-08 1.35619823110719E-07 x9 : 8.31555564214474E-07 -9.93970971497191E-07 x10 : 4.59296304479701E-06 3.12910556037969E-07 x3 : -1.40318385913825E-07 6.90383625579641E-06 x8 : 3.01403183859138E-05 -6.90383625579641E-06 x1 : -1.62832772240636E-07 -6.49907434653423E-07 x5 : -7.70100211134234E-06 4.11740205295453E-06 x4 : 6.25149147668167E-11 -3.56454315115886E-57 x7 : 4.99996874254262E-06 1.75240110224570E-57 == err : 8.468E-19 = rco : 2.446E-15 = res : 8.565E-21 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : -2.60313982923272E-07 -1.03487250547164E-54 x6 : 6.72968678176653E-07 3.54813430447420E-54 x9 : -6.17521153048185E-07 -3.97635741018660E-55 x10 : 4.76594888980908E-06 -2.85482070474935E-54 x3 : 1.51354874557977E-05 -3.28304381046176E-54 x8 : 1.48645125442023E-05 3.28304381046176E-54 x1 : 1.46944846381988E-07 3.13839106493093E-56 x5 : 4.20057436327419E-07 -4.39693367472557E-56 x4 : 6.25149147668167E-11 3.54462950226971E-57 x7 : 4.99996874254262E-06 -1.77231475113485E-57 == err : 3.791E-19 = rco : 1.325E-15 = res : 1.482E-21 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : -2.94190576551449E-08 -1.46096250884933E-06 x6 : -2.11885804732594E-05 8.53685060755712E-07 x9 : -2.35403168406488E-09 6.04925907316275E-07 x10 : 2.62044670179290E-05 -4.25666759989186E-07 x3 : 3.62020323688239E-05 1.79872021664988E-07 x8 : -6.20203236882388E-06 -1.79872021664988E-07 x1 : -2.56361634369072E-08 -6.16039194939472E-10 x5 : 1.27777730079002E-08 6.14456766419239E-10 x4 : -6.25153055807167E-11 1.53683970830301E-50 x7 : 5.00003125765279E-06 -7.68419854151506E-51 == err : 4.634E-19 = rco : 6.286E-16 = res : 1.211E-20 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : -2.94190576551449E-08 1.46096250884933E-06 x6 : -2.11885804732594E-05 -8.53685060755712E-07 x9 : -2.35403168406488E-09 -6.04925907316275E-07 x10 : 2.62044670179290E-05 4.25666759989186E-07 x3 : 3.62020323688239E-05 -1.79872021664988E-07 x8 : -6.20203236882388E-06 1.79872021664988E-07 x1 : -2.56361634369072E-08 6.16039194939473E-10 x5 : 1.27777730079003E-08 -6.14456766419239E-10 x4 : -6.25153055807167E-11 1.05638191171578E-64 x7 : 5.00003125765279E-06 -5.28669782977005E-65 == err : 4.619E-19 = rco : 6.286E-16 = res : 6.776E-21 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : -2.94190576551449E-08 -1.46096250884933E-06 x6 : -2.11885804732594E-05 8.53685060755713E-07 x9 : -2.35403168406489E-09 6.04925907316275E-07 x10 : 2.62044670179290E-05 -4.25666759989186E-07 x3 : 3.62020323688239E-05 1.79872021664988E-07 x8 : -6.20203236882388E-06 -1.79872021664988E-07 x1 : -2.56361634369072E-08 -6.16039194939473E-10 x5 : 1.27777730079002E-08 6.14456766419239E-10 x4 : 6.25149147668167E-11 1.48368246027497E-67 x7 : 4.99996874254262E-06 -7.41841230137484E-68 == err : 4.523E-19 = rco : 6.286E-16 = res : 2.131E-21 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : -2.94190576551449E-08 1.46096250884933E-06 x6 : -2.11885804732594E-05 -8.53685060755712E-07 x9 : -2.35403168406488E-09 -6.04925907316275E-07 x10 : 2.62044670179290E-05 4.25666759989186E-07 x3 : 3.62020323688239E-05 -1.79872021664988E-07 x8 : -6.20203236882388E-06 1.79872021664988E-07 x1 : -2.56361634369072E-08 6.16039194939473E-10 x5 : 1.27777730079003E-08 -6.14456766419239E-10 x4 : 6.25149147668167E-11 -3.13214614463929E-51 x7 : 4.99996874254262E-06 1.56607307231965E-51 == err : 4.619E-19 = rco : 6.286E-16 = res : 6.776E-21 == SHAR_EOF fi # end of overwriting check if test -f 'comb3000s' then echo shar: will not over-write existing file "'comb3000s'" else cat << "SHAR_EOF" > 'comb3000s' 10 1.01815483301669E-01*x2+ 9.89610100506422E-01*x6+ 1.34637048100730E+00*x9 + 3.46970317210432E+00*x10-2.12454115933396E+00; 5.76739795357135E-01*x3+ 7.89949754301577E-01*x8-2.19492968782850E+00; 7.19621954936988E-01*x9+ 9.27261335190857E-01*x10+ 8.95128807036246E-01* x3+ 2.45208250541714E+00*x8+ 8.73159766974099E-02*x1+ 1.37722259176202E+00* x5-5.67773314994310E+00; 2.50030218520604E-03*x4+ 1.99987913687438E+01*x7-1.99987913687440E+01; -1.37722259176203E+00*x1**2+ 7.26099038733160E-01*x5; -9.89610100506425E-01*x2**2+ 1.01049898287039E+00*x6; -1.99987913687438E+01*x4**2+ 5.00030217607503E-02*x7; -1.93702197268146E+00*x3*x1+ 5.16256404988361E-01*x8; -9.68877757611935E-01*x2*x1+ 1.03212194948595E+00*x9; -3.21732159608141E+00*x2**2*x1+ 3.10817545009477E-01*x10; TITLE : Scaled combustion 3000 system SCALING COEFFICIENTS : 2 -2.09927628911180E+01 0.00000000000000E+00 -1.87118596376527E+01 0.00000000000000E+00 -1.72677163168645E+01 0.00000000000000E+00 -1.69019795204076E+01 0.00000000000000E+00 -1.69528602213804E+01 0.00000000000000E+00 -1.64990199020811E+01 0.00000000000000E+00 -2.03106379581088E+01 0.00000000000000E+00 -1.73312656724251E+01 0.00000000000000E+00 -2.95751631982476E+01 0.00000000000000E+00 -1.76096404744368E+01 0.00000000000000E+00 1.76967917680959E+01 0.00000000000000E+00 1.61588526990590E+01 0.00000000000000E+00 1.67930274244024E+01 0.00000000000000E+00 2.09314813823738E+01 0.00000000000000E+00 4.10830376681950E+01 0.00000000000000E+00 4.19704579126793E+01 0.00000000000000E+00 6.34721673044322E+01 0.00000000000000E+00 3.82173384987886E+01 0.00000000000000E+00 4.12577874079963E+01 0.00000000000000E+00 6.39820238920280E+01 0.00000000000000E+00 THE SOLUTIONS : 16 10 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : -1.86059828740544E-01 -2.06960762541829E-01 x6 : -8.04468851207845E-03 7.54221428177794E-02 x9 : -1.24919374734789E-01 1.80642576613376E-01 x10 : 6.68539549153760E-01 -8.55342726210761E-02 x3 : 6.00890004375879E-05 9.05451003291456E-01 x8 : 2.77852486206704E+00 -6.61066888749059E-01 x1 : -1.94531617853427E-01 -8.17875302122625E-01 x5 : -1.19699116509037E+00 6.03553210575737E-01 x4 : 5.00028654637741E-02 0.00000000000000E+00 x7 : 9.99993748508534E-01 0.00000000000000E+00 == err : 3.870E-15 = rco : 3.057E-02 = res : 4.466E-16 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : -1.86059828740544E-01 2.06960762541829E-01 x6 : -8.04468851207845E-03 -7.54221428177794E-02 x9 : -1.24919374734789E-01 -1.80642576613376E-01 x10 : 6.68539549153760E-01 8.55342726210761E-02 x3 : 6.00890004375376E-05 -9.05451003291456E-01 x8 : 2.77852486206704E+00 6.61066888749059E-01 x1 : -1.94531617853427E-01 8.17875302122625E-01 x5 : -1.19699116509037E+00 -6.03553210575737E-01 x4 : 5.00028654637741E-02 0.00000000000000E+00 x7 : 9.99993748508534E-01 0.00000000000000E+00 == err : 3.909E-15 = rco : 3.057E-02 = res : 4.466E-16 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : -1.86059828740544E-01 -2.06960762541829E-01 x6 : -8.04468851207844E-03 7.54221428177794E-02 x9 : -1.24919374734789E-01 1.80642576613376E-01 x10 : 6.68539549153760E-01 -8.55342726210761E-02 x3 : 6.00890004375771E-05 9.05451003291456E-01 x8 : 2.77852486206704E+00 -6.61066888749059E-01 x1 : -1.94531617853427E-01 -8.17875302122625E-01 x5 : -1.19699116509037E+00 6.03553210575737E-01 x4 : -5.00031780582155E-02 -6.68191177523049E-52 x7 : 1.00000625153057E+00 2.02799644626429E-56 == err : 3.862E-15 = rco : 3.057E-02 = res : 1.787E-15 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : -1.86059828740544E-01 2.06960762541829E-01 x6 : -8.04468851207845E-03 -7.54221428177794E-02 x9 : -1.24919374734789E-01 -1.80642576613376E-01 x10 : 6.68539549153760E-01 8.55342726210761E-02 x3 : 6.00890004375431E-05 -9.05451003291456E-01 x8 : 2.77852486206704E+00 6.61066888749059E-01 x1 : -1.94531617853427E-01 8.17875302122625E-01 x5 : -1.19699116509037E+00 -6.03553210575737E-01 x4 : -5.00031780582155E-02 -6.68191177523049E-52 x7 : 1.00000625153057E+00 2.02799644626429E-56 == err : 3.905E-15 = rco : 3.057E-02 = res : 1.787E-15 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : 1.47019551595541E-01 -2.02218493716526E-01 x6 : -1.88790676205397E-02 -5.82309934130346E-02 x9 : 1.31217524995428E-01 1.56846296759940E-01 x10 : 5.62465349221964E-01 -3.83197825587805E-02 x3 : -1.78005745092096E-02 -8.75810043497502E-01 x8 : 2.79156487551271E+00 6.39426118570114E-01 x1 : -2.11764459109627E-01 8.45206370172961E-01 x5 : -1.26992499939779E+00 -6.78975505268015E-01 x4 : 5.00028654637741E-02 0.00000000000000E+00 x7 : 9.99993748508534E-01 0.00000000000000E+00 == err : 3.983E-15 = rco : 2.820E-02 = res : 1.696E-15 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : 1.47019551595541E-01 2.02218493716526E-01 x6 : -1.88790676205397E-02 5.82309934130346E-02 x9 : 1.31217524995428E-01 -1.56846296759940E-01 x10 : 5.62465349221964E-01 3.83197825587805E-02 x3 : -1.78005745092096E-02 8.75810043497502E-01 x8 : 2.79156487551271E+00 -6.39426118570114E-01 x1 : -2.11764459109627E-01 -8.45206370172961E-01 x5 : -1.26992499939779E+00 6.78975505268015E-01 x4 : 5.00028654637741E-02 0.00000000000000E+00 x7 : 9.99993748508534E-01 0.00000000000000E+00 == err : 3.983E-15 = rco : 2.820E-02 = res : 1.696E-15 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : 1.47019551595541E-01 -2.02218493716526E-01 x6 : -1.88790676205397E-02 -5.82309934130346E-02 x9 : 1.31217524995428E-01 1.56846296759940E-01 x10 : 5.62465349221964E-01 -3.83197825587805E-02 x3 : -1.78005745092096E-02 -8.75810043497502E-01 x8 : 2.79156487551271E+00 6.39426118570114E-01 x1 : -2.11764459109627E-01 8.45206370172961E-01 x5 : -1.26992499939779E+00 -6.78975505268015E-01 x4 : -5.00031780582155E-02 -6.68191177523049E-52 x7 : 1.00000625153057E+00 2.02799644626429E-56 == err : 3.982E-15 = rco : 2.820E-02 = res : 1.787E-15 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : 1.47019551595541E-01 2.02218493716526E-01 x6 : -1.88790676205397E-02 5.82309934130346E-02 x9 : 1.31217524995428E-01 -1.56846296759940E-01 x10 : 5.62465349221964E-01 3.83197825587805E-02 x3 : -1.78005745092096E-02 8.75810043497502E-01 x8 : 2.79156487551271E+00 -6.39426118570114E-01 x1 : -2.11764459109627E-01 -8.45206370172961E-01 x5 : -1.26992499939779E+00 6.78975505268015E-01 x4 : -5.00031780582155E-02 -6.68191177523049E-52 x7 : 1.00000625153057E+00 2.02799644626429E-56 == err : 4.143E-15 = rco : 2.820E-02 = res : 1.787E-15 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : 5.09473711803257E-01 3.76784128151749E-62 x6 : 2.54197806311466E-01 4.37555761724612E-62 x9 : 8.73906191331919E-02 -7.29259602874353E-63 x10 : 4.90950348220657E-01 -1.09388940431153E-62 x3 : 1.96267896841884E+00 -1.45851920574871E-61 x8 : 1.34562307974978E+00 8.75111523449223E-62 x1 : 1.82727984663697E-01 -4.86173068582902E-63 x5 : 6.33313003219931E-02 -3.88938454866321E-62 x4 : -5.00031780582155E-02 0.00000000000000E+00 x7 : 1.00000625153057E+00 -4.49240602645200E-68 == err : 4.199E-15 = rco : 1.323E-02 = res : 1.787E-15 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : -5.43186314238694E-01 -2.67276471009220E-50 x6 : 2.88952114574660E-01 4.27642353614751E-50 x9 : -9.74433950325977E-02 6.68191177523049E-51 x10 : 5.83649613666546E-01 -1.33638235504610E-50 x3 : 1.92006464751952E+00 0.00000000000000E+00 x8 : 1.37673565948149E+00 1.33638235504610E-50 x1 : 1.91102168714801E-01 4.67733824266134E-51 x5 : 6.92690940558830E-02 -4.24177834860113E-51 x4 : -5.00031780582155E-02 -6.68191177523049E-52 x7 : 1.00000625153057E+00 0.00000000000000E+00 == err : 1.866E-15 = rco : 1.382E-02 = res : 1.787E-15 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : 5.09473711803257E-01 -1.09388940431153E-62 x6 : 2.54197806311466E-01 -6.14591440950899E-63 x9 : 8.73906191331919E-02 -1.67121992325372E-63 x10 : 4.90950348220657E-01 2.73472351077882E-63 x3 : 1.96267896841884E+00 -1.94469227433161E-62 x8 : 1.34562307974978E+00 1.09388940431153E-62 x1 : 1.82727984663697E-01 -4.25401435010039E-63 x5 : 6.33313003219931E-02 -7.29259602874353E-63 x4 : 5.00028654637741E-02 8.50802870020078E-63 x7 : 9.99993748508534E-01 -1.00562853777006E-66 == err : 4.199E-15 = rco : 1.323E-02 = res : 4.466E-16 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : -5.43186314238694E-01 -1.38983764924794E-49 x6 : 2.88952114574660E-01 1.06910588403688E-49 x9 : -9.74433950325977E-02 -5.34552942018439E-51 x10 : 5.83649613666546E-01 -2.20503088582606E-50 x3 : 1.92006464751952E+00 5.34552942018439E-51 x8 : 1.37673565948149E+00 -1.15835244136451E-51 x1 : 1.91102168714802E-01 4.00914706513829E-51 x5 : 6.92690940558830E-02 1.33638235504610E-50 x4 : 5.00028654637741E-02 -1.27447751260484E-57 x7 : 9.99993748508534E-01 0.00000000000000E+00 == err : 5.106E-16 = rco : 1.382E-02 = res : 4.466E-16 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : -6.13875187057624E-02 -3.04852943937588E+00 x6 : -9.09772673101517E+00 3.66546187787673E-01 x9 : -3.71460699244571E-04 9.54558946865301E-02 x10 : 3.20906233049526E+00 -5.21281796683996E-02 x3 : 4.59253411710302E+00 2.28182878738084E-02 x8 : -5.74425774005525E-01 -1.66595591771224E-02 x1 : -3.33398996354360E-02 -8.01160633154974E-04 x5 : 2.10710413330012E-03 1.01326294609844E-04 x4 : -5.00031780582155E-02 -6.68191177523049E-52 x7 : 1.00000625153057E+00 2.02799644626429E-56 == err : 8.039E-15 = rco : 1.868E-03 = res : 1.787E-15 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : -6.13875187057624E-02 3.04852943937588E+00 x6 : -9.09772673101517E+00 -3.66546187787673E-01 x9 : -3.71460699244571E-04 -9.54558946865301E-02 x10 : 3.20906233049526E+00 5.21281796683996E-02 x3 : 4.59253411710302E+00 -2.28182878738084E-02 x8 : -5.74425774005525E-01 1.66595591771224E-02 x1 : -3.33398996354360E-02 8.01160633154974E-04 x5 : 2.10710413330012E-03 -1.01326294609844E-04 x4 : -5.00031780582155E-02 -6.68191177523049E-52 x7 : 1.00000625153057E+00 2.02799644626429E-56 == err : 8.039E-15 = rco : 1.868E-03 = res : 1.787E-15 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : -6.13875187057624E-02 -3.04852943937588E+00 x6 : -9.09772673101517E+00 3.66546187787673E-01 x9 : -3.71460699244571E-04 9.54558946865301E-02 x10 : 3.20906233049526E+00 -5.21281796683996E-02 x3 : 4.59253411710302E+00 2.28182878738084E-02 x8 : -5.74425774005525E-01 -1.66595591771224E-02 x1 : -3.33398996354360E-02 -8.01160633154974E-04 x5 : 2.10710413330012E-03 1.01326294609844E-04 x4 : 5.00028654637741E-02 0.00000000000000E+00 x7 : 9.99993748508534E-01 0.00000000000000E+00 == err : 8.044E-15 = rco : 1.868E-03 = res : 1.777E-15 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x2 : -6.13875187057624E-02 3.04852943937588E+00 x6 : -9.09772673101517E+00 -3.66546187787673E-01 x9 : -3.71460699244571E-04 -9.54558946865301E-02 x10 : 3.20906233049526E+00 5.21281796683996E-02 x3 : 4.59253411710302E+00 -2.28182878738084E-02 x8 : -5.74425774005525E-01 1.66595591771224E-02 x1 : -3.33398996354360E-02 8.01160633154974E-04 x5 : 2.10710413330012E-03 -1.01326294609844E-04 x4 : 5.00028654637741E-02 0.00000000000000E+00 x7 : 9.99993748508534E-01 0.00000000000000E+00 == err : 8.044E-15 = rco : 1.868E-03 = res : 1.777E-15 == SHAR_EOF fi # end of overwriting check if test -f 'conform1' then echo shar: will not over-write existing file "'conform1'" else cat << "SHAR_EOF" > 'conform1' 3 -9 - t2**2 - t3**2 - 3*t2**2*t3**2 + 8*t2*t3; -9 - t3**2 - t1**2 - 3*t3**2*t1**2 + 8*t3*t1; -9 - t1**2 - t2**2 - 3*t1**2*t2**2 + 8*t1*t2; TITLE : conformal analysis of cyclic molecules, first instance ROOT COUNTS : total degree : 64 3-homogeneous Bezout bound : 16 mixed volume : 16 REFERENCES : Ioannis Z. Emiris: `Sparse Elimination and Application in Kinematics' PhD Thesis, Computer Science, University of California at Berkeley, 1994. Ioannis Z. Emiris: `A general Solver Based on Sparse Resultants: Numerical Issues and Kinematic Applications', INRIA Rapport de Recherche no 3110, January 1997, 29 pages Available via anonymous ftp to ftp.inria.fr THE SOLUTIONS : 16 3 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : t2 : 1.16877089448037E+00 -6.05000333706056E-01 t3 : 1.16877089448037E+00 -6.05000333706056E-01 t1 : 5.35201484207521E-01 1.20233530218111E+00 == err : 2.569E-15 = rco : 2.564E-01 = res : 1.831E-15 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : t2 : 1.16877089448037E+00 -6.05000333706056E-01 t3 : 5.35201484207521E-01 1.20233530218111E+00 t1 : 1.16877089448037E+00 -6.05000333706056E-01 == err : 2.702E-15 = rco : 2.157E-01 = res : 2.979E-15 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : t2 : 1.16877089448037E+00 6.05000333706056E-01 t3 : 1.16877089448037E+00 6.05000333706056E-01 t1 : 5.35201484207521E-01 -1.20233530218111E+00 == err : 2.569E-15 = rco : 2.564E-01 = res : 1.831E-15 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : t2 : 5.35201484207521E-01 1.20233530218111E+00 t3 : 1.16877089448037E+00 -6.05000333706056E-01 t1 : 1.16877089448037E+00 -6.05000333706056E-01 == err : 2.786E-15 = rco : 2.494E-01 = res : 3.878E-15 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : t2 : 1.16877089448037E+00 6.05000333706056E-01 t3 : 1.16877089448037E+00 6.05000333706056E-01 t1 : 1.16877089448037E+00 6.05000333706056E-01 == err : 2.569E-15 = rco : 4.545E-01 = res : 1.831E-15 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : t2 : 5.35201484207521E-01 -1.20233530218111E+00 t3 : 1.16877089448037E+00 6.05000333706056E-01 t1 : 1.16877089448037E+00 6.05000333706056E-01 == err : 2.569E-15 = rco : 2.494E-01 = res : 3.202E-15 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : t2 : 1.16877089448037E+00 6.05000333706056E-01 t3 : 5.35201484207521E-01 -1.20233530218111E+00 t1 : 1.16877089448037E+00 6.05000333706056E-01 == err : 2.688E-15 = rco : 2.157E-01 = res : 2.220E-15 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : t2 : 1.16877089448037E+00 -6.05000333706056E-01 t3 : 1.16877089448037E+00 -6.05000333706056E-01 t1 : 1.16877089448037E+00 -6.05000333706056E-01 == err : 2.569E-15 = rco : 4.545E-01 = res : 1.831E-15 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : t2 : -5.35201484207521E-01 -1.20233530218111E+00 t3 : -1.16877089448037E+00 6.05000333706056E-01 t1 : -1.16877089448037E+00 6.05000333706056E-01 == err : 2.816E-15 = rco : 2.157E-01 = res : 5.515E-15 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : t2 : -1.16877089448037E+00 6.05000333706056E-01 t3 : -1.16877089448037E+00 6.05000333706056E-01 t1 : -5.35201484207521E-01 -1.20233530218111E+00 == err : 2.569E-15 = rco : 2.564E-01 = res : 1.831E-15 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : t2 : -1.16877089448037E+00 -6.05000333706056E-01 t3 : -5.35201484207521E-01 1.20233530218111E+00 t1 : -1.16877089448037E+00 -6.05000333706056E-01 == err : 2.702E-15 = rco : 2.157E-01 = res : 2.979E-15 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : t2 : -1.16877089448037E+00 6.05000333706056E-01 t3 : -5.35201484207521E-01 -1.20233530218111E+00 t1 : -1.16877089448037E+00 6.05000333706056E-01 == err : 2.683E-15 = rco : 2.032E-01 = res : 2.442E-15 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : t2 : -1.16877089448037E+00 6.05000333706056E-01 t3 : -1.16877089448037E+00 6.05000333706056E-01 t1 : -1.16877089448037E+00 6.05000333706056E-01 == err : 2.569E-15 = rco : 4.545E-01 = res : 1.831E-15 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : t2 : -5.35201484207521E-01 1.20233530218111E+00 t3 : -1.16877089448037E+00 -6.05000333706056E-01 t1 : -1.16877089448037E+00 -6.05000333706056E-01 == err : 2.569E-15 = rco : 2.494E-01 = res : 3.202E-15 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : t2 : -1.16877089448037E+00 -6.05000333706056E-01 t3 : -1.16877089448037E+00 -6.05000333706056E-01 t1 : -5.35201484207521E-01 1.20233530218111E+00 == err : 2.569E-15 = rco : 2.564E-01 = res : 1.831E-15 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : t2 : -1.16877089448037E+00 -6.05000333706056E-01 t3 : -1.16877089448037E+00 -6.05000333706056E-01 t1 : -1.16877089448037E+00 -6.05000333706056E-01 == err : 2.569E-15 = rco : 4.545E-01 = res : 1.831E-15 == SHAR_EOF fi # end of overwriting check if test -f 'cpdm5' then echo shar: will not over-write existing file "'cpdm5'" else cat << "SHAR_EOF" > 'cpdm5' 5 4*x1^3+ 3*x1^2*x2+ 3*x1^2*x3+ 3*x1^2*x4+ 3*x1^2*x5+ 3*x1*x2^2+ 3*x1*x3^2+ 3* x1*x4^2+ 3*x1*x5^2+x2^3+x3^3+x4^3+x5^3+ 2*x1^2+ 3*x1*x2+ 3*x1*x3+ 3*x1*x4+ 3* x1*x5-x2^2-x3^2-x4^2-x5^2-6*x1; x1^3+ 3*x1^2*x2+ 3*x1*x2^2+ 4*x2^3+ 3*x2^2*x3+ 3*x2^2*x4+ 3*x2^2*x5+ 3*x2* x3^2+ 3*x2*x4^2+ 3*x2*x5^2+x3^3+x4^3+x5^3-x1^2+ 3*x1*x2+ 2*x2^2+ 3*x2*x3+ 3* x2*x4+ 3*x2*x5-x3^2-x4^2-x5^2-6*x2; x1^3+ 3*x1^2*x3+ 3*x1*x3^2+x2^3+ 3*x2^2*x3+ 3*x2*x3^2+ 4*x3^3+ 3*x3^2*x4+ 3* x3^2*x5+ 3*x3*x4^2+ 3*x3*x5^2+x4^3+x5^3-x1^2+ 3*x1*x3-x2^2+ 3*x2*x3+ 2*x3^2+ 3*x3*x4+ 3*x3*x5-x4^2-x5^2-6*x3; x1^3+ 3*x1^2*x4+ 3*x1*x4^2+x2^3+ 3*x2^2*x4+ 3*x2*x4^2+x3^3+ 3*x3^2*x4+ 3*x3* x4^2+ 4*x4^3+ 3*x4^2*x5+ 3*x4*x5^2+x5^3-x1^2+ 3*x1*x4-x2^2+ 3*x2*x4-x3^2+ 3* x3*x4+ 2*x4^2+ 3*x4*x5-x5^2-6*x4; x1^3+ 3*x1^2*x5+ 3*x1*x5^2+x2^3+ 3*x2^2*x5+ 3*x2*x5^2+x3^3+ 3*x3^2*x5+ 3*x3* x5^2+x4^3+ 3*x4^2*x5+ 3*x4*x5^2+ 4*x5^3-x1^2+ 3*x1*x5-x2^2+ 3*x2*x5-x3^2+ 3* x3*x5-x4^2+ 3*x4*x5+ 2*x5^2-6*x5; TITLE : 5-dimensional system of Caprasse and Demaret ROOT COUNTS : total degree : 243 1-homogeneous Bezout number : 243 with partition : {x1 x2 x3 x4 x5 } generalized Bezout number : 243 based on the set structure : {x1 x2 x3 x4 x5 }{x1 x2 x3 x4 x5 }{x1 x2 x3 x4 x5 } {x1 x2 x3 x4 x5 }{x1 x2 x3 x4 x5 }{x1 x2 x3 x4 x5 } {x1 x2 x3 x4 x5 }{x1 x2 x3 x4 x5 }{x1 x2 x3 x4 x5 } {x1 x2 x3 x4 x5 }{x1 x2 x3 x4 x5 }{x1 x2 x3 x4 x5 } {x1 x2 x3 x4 x5 }{x1 x2 x3 x4 x5 }{x1 x2 x3 x4 x5 } mixed volume : 242 TIMINGS ON IDEFIX : | 0h 0m18s683ms | 0h 2m27s225ms | 0h 9m51s598ms | 0h12m43s370ms | REFERENCES : Karin Gatermann: "Symbolic solution of polynomial equation systems with symmetry", Proceedings of ISSAC-90, pp 112-119, ACM New York, 1990. NOTE : The system is invariant under the full permutation group. There are 16 generating regular solutions: 1*30 + 2*20 + 6*10 + 5*5 + 2*1 = 157. THE GENERATING SOLUTIONS : 70 5 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 10 the solution for t : x1 : -7.14528281929819E-01 2.52510084749171E-01 x2 : -6.59289338833372E-01 -1.92751663923179E-01 x3 : -7.14528281929819E-01 2.52510084749171E-01 x4 : -6.59289338833372E-01 -1.92751663923179E-01 x5 : -6.59289338833372E-01 -1.92751663923179E-01 == err : 3.686E-16 = rco : 4.506E-02 = res : 2.289E-15 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.83942224305208E-11 -2.73185706878767E-09 x2 : -1.08730803438954E-10 -2.24035535646042E-09 x3 : 1.17268037991046E-09 1.70277769599000E-09 x4 : -1.01555535404099E-09 3.26943472925809E-09 x5 : 1.00000000000000E+00 -7.92068212766022E-25 == err : 3.424E-09 = rco : 1.408E-10 = res : 4.745E-17 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 10 the solution for t : x1 : -1.41249176055410E-01 2.18721386387620E-01 x2 : 7.04722661876695E-01 -1.70177633386801E-01 x3 : 7.04722661876695E-01 -1.70177633386801E-01 x4 : -1.41249176055410E-01 2.18721386387620E-01 x5 : -1.41249176055410E-01 2.18721386387620E-01 == err : 5.094E-16 = rco : 6.857E-02 = res : 8.400E-16 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 10 the solution for t : x1 : -2.46444379946875E-01 -2.81115427257892E-01 x2 : 5.31788514888782E-01 1.01543895901308E-01 x3 : 5.31788514888782E-01 1.01543895901308E-01 x4 : 5.31788514888782E-01 1.01543895901308E-01 x5 : -2.46444379946875E-01 -2.81115427257892E-01 == err : 6.214E-16 = rco : 4.392E-02 = res : 8.331E-16 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.00000000000385E+00 -1.13181040361968E-13 x2 : 2.00581949817066E-06 -1.23595570918621E-07 x3 : -2.00582650182479E-06 1.23596436887828E-07 x4 : 2.00582081803173E-06 -1.23595608287217E-07 x5 : -2.00582536068879E-06 1.23595081861131E-07 == err : 6.438E-07 = rco : 4.517E-12 = res : 3.315E-12 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.00000000000120E+00 3.22532856343824E-12 x2 : 1.33105248505530E-06 -4.46273869878504E-07 x3 : -1.33105253465193E-06 4.46260505961555E-07 x4 : 1.33104484500407E-06 -4.46268334699166E-07 x5 : -1.33104838214523E-06 4.46272022630425E-07 == err : 2.105E-06 = rco : 4.202E-12 = res : 3.544E-11 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 20 the solution for t : x1 : 7.03055190851750E-18 -6.44073062647062E-88 x2 : 7.03055190851727E-18 3.92727477223818E-88 x3 : -5.64579455317661E-01 -7.60909487121148E-89 x4 : 1.29663026288654E+00 -9.32727758406568E-90 x5 : 7.40711867277992E-18 2.47418310651005E-88 == err : 1.813E-15 = rco : 5.905E-02 = res : 1.256E-16 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 5 the solution for t : x1 : 5.39470704070311E-01 -4.55433475784457E-93 x2 : 5.39470704070311E-01 -4.73411112986475E-93 x3 : -1.03307267830805E+00 2.58877975709060E-92 x4 : 5.39470704070311E-01 -4.58429748651460E-93 x5 : 5.39470704070311E-01 -4.07493109912409E-93 == err : 4.015E-15 = rco : 7.320E-02 = res : 1.332E-15 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 10 the solution for t : x1 : -2.46444379946875E-01 2.81115427257892E-01 x2 : 5.31788514888781E-01 -1.01543895901308E-01 x3 : 5.31788514888781E-01 -1.01543895901308E-01 x4 : -2.46444379946875E-01 2.81115427257892E-01 x5 : 5.31788514888782E-01 -1.01543895901308E-01 == err : 1.178E-15 = rco : 4.458E-02 = res : 6.684E-16 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 10 the solution for t : x1 : -7.14528281929819E-01 -2.52510084749171E-01 x2 : -6.59289338833372E-01 1.92751663923179E-01 x3 : -6.59289338833372E-01 1.92751663923179E-01 x4 : -6.59289338833372E-01 1.92751663923179E-01 x5 : -7.14528281929819E-01 -2.52510084749171E-01 == err : 4.317E-16 = rco : 4.900E-02 = res : 2.047E-15 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.41682034998645E-07 4.60256070777176E-07 x2 : -2.41687210918473E-07 -4.60246591389333E-07 x3 : 1.00000000000052E+00 -9.73174768028820E-13 x4 : 2.41683784909837E-07 4.60252678133532E-07 x5 : -2.41680174665929E-07 -4.60259237997071E-07 == err : 1.172E-06 = rco : 9.639E-13 = res : 1.099E-11 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 30 the solution for t : x1 : 3.99999999999998E+00 -3.07063870414130E-15 x2 : 2.44491619191890E-15 2.44948974278317E+00 x3 : -1.67719179690985E-15 -2.44948974278317E+00 x4 : -1.64305366824672E-15 -2.44948974278317E+00 x5 : 1.86061920693788E-15 2.44948974278317E+00 == err : 6.162E-14 = rco : 1.735E-03 = res : 8.527E-14 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 10 the solution for t : x1 : -1.41249176055410E-01 -2.18721386387620E-01 x2 : 7.04722661876694E-01 1.70177633386801E-01 x3 : -1.41249176055410E-01 -2.18721386387620E-01 x4 : 7.04722661876695E-01 1.70177633386801E-01 x5 : -1.41249176055410E-01 -2.18721386387620E-01 == err : 7.330E-16 = rco : 7.149E-02 = res : 4.344E-16 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -9.47234556715119E-07 -4.98918687084268E-07 x2 : 9.47230332365349E-07 4.98920847972896E-07 x3 : 1.00000000000110E+00 3.48884930533935E-13 x4 : 9.47232899822851E-07 4.98918634250396E-07 x5 : -9.47231982888635E-07 -4.98921841793815E-07 == err : 8.658E-07 = rco : 1.582E-12 = res : 5.996E-12 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 20 the solution for t : x1 : -1.36602540378444E+00 9.30604859102100E-01 x2 : 1.47301762038126E-16 -2.40510607563068E-16 x3 : 1.16448289217466E-16 -2.64807509197290E-16 x4 : -1.36602540378444E+00 -9.30604859102100E-01 x5 : 3.25450723314038E-16 -7.06830322662388E-17 == err : 1.213E-15 = rco : 5.692E-02 = res : 1.099E-14 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 5 the solution for t : x1 : 4.19280598356873E-01 -6.75616933617679E-85 x2 : 4.19280598356873E-01 1.00538234169297E-86 x3 : 4.19280598356873E-01 1.41557833710371E-84 x4 : -3.98321789535573E-01 -1.60861174670876E-86 x5 : 4.19280598356873E-01 -4.10195995410734E-85 == err : 3.605E-16 = rco : 9.766E-02 = res : 8.882E-16 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 5 the solution for t : x1 : -6.18542962347862E-01 1.26253786807459E-01 x2 : -6.18542962347862E-01 1.26253786807459E-01 x3 : -6.18542962347862E-01 1.26253786807459E-01 x4 : -6.18542962347862E-01 1.26253786807459E-01 x5 : -8.09522762847745E-01 -3.22354838770713E-01 == err : 7.190E-16 = rco : 4.430E-02 = res : 9.992E-16 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : x1 : 1.20748996751590E-08 -1.03588355124174E-06 x2 : 9.99999999999212E-01 4.51922453873987E-13 x3 : -1.20749691809630E-08 1.03587629140883E-06 x4 : -1.20717836281458E-08 1.03589059954204E-06 x5 : 1.20742174665521E-08 -1.03588469547649E-06 == err : 7.453E-07 = rco : 1.304E-12 = res : 4.444E-12 == solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.76488304420505E-06 4.02416865306740E-08 x2 : 1.76487585678768E-06 -4.02415207542454E-08 x3 : 1.76487557023133E-06 -4.02414881448511E-08 x4 : 1.00000000000299E+00 -1.00010715927163E-13 x5 : -1.76487735268394E-06 4.02416224005702E-08 == err : 3.608E-07 = rco : 3.192E-12 = res : 1.042E-12 == solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.39288278774108E-07 -1.09723499520237E-06 x2 : 9.99999999999023E-01 1.30411280524220E-12 x3 : -3.39288094837170E-07 -1.09724184823549E-06 x4 : 3.39289213656249E-07 1.09723951131343E-06 x5 : 3.39290091461178E-07 1.09723341978602E-06 == err : 7.554E-07 = rco : 9.354E-13 = res : 4.565E-12 == solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 5 the solution for t : x1 : -8.09522762847745E-01 3.22354838770713E-01 x2 : -6.18542962347862E-01 -1.26253786807459E-01 x3 : -6.18542962347862E-01 -1.26253786807459E-01 x4 : -6.18542962347862E-01 -1.26253786807459E-01 x5 : -6.18542962347862E-01 -1.26253786807459E-01 == err : 5.918E-16 = rco : 3.586E-02 = res : 1.617E-15 == solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.12443080584216E-06 -8.82439167417479E-06 x2 : 2.12443585149308E-06 -8.82439006869776E-06 x3 : 9.99999999934887E-01 -3.31426461382853E-11 x4 : -2.12425711171936E-06 8.82445986676751E-06 x5 : -2.12441420528640E-06 8.82442130404364E-06 == err : 3.053E-06 = rco : 1.055E-10 = res : 7.457E-11 == solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.63357974448310E-08 -2.73448055100480E-08 x2 : -3.63294908447495E-08 3.26151157471226E-08 x3 : 2.13360653665632E-08 -1.31105558574512E-08 x4 : 1.00000000000000E+00 -5.01602678243805E-18 x5 : -1.13423722197688E-08 7.84024563542466E-09 == err : 4.868E-08 = rco : 2.008E-09 = res : 9.078E-15 == solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -9.33362447183088E-07 5.56376754631716E-07 x2 : 1.00000000000021E+00 -9.56249087878385E-13 x3 : 9.33362014696560E-07 -5.56374978419852E-07 x4 : -9.33361756080783E-07 5.56376413932018E-07 x5 : 9.33361555165149E-07 -5.56375321396619E-07 == err : 6.000E-07 = rco : 1.682E-12 = res : 2.880E-12 == solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.00000000000000E+00 -2.06678053507989E-17 x2 : 7.98651612925928E-08 -5.37279424969728E-08 x3 : 3.23807574747865E-08 3.28659814414440E-08 x4 : -9.30489800490665E-08 -2.39933238120156E-08 x5 : -1.91969388032839E-08 4.48552849295448E-08 == err : 9.624E-08 = rco : 1.252E-08 = res : 2.226E-14 == solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.58856928345159E-07 7.91534602665034E-07 x2 : -6.58856730832936E-07 -7.91535667852539E-07 x3 : 6.58857012438805E-07 7.91534417386401E-07 x4 : -6.58856751552365E-07 -7.91535837874826E-07 x5 : 9.99999999999847E-01 8.28558643284717E-13 == err : 4.670E-07 = rco : 1.273E-12 = res : 1.745E-12 == solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 5 the solution for t : x1 : 1.80043999353911E+00 2.92604772168262E-97 x2 : -3.46665377731460E-01 -1.31672147475718E-97 x3 : -3.46665377731460E-01 -9.40236152870886E-98 x4 : -3.46665377731460E-01 -1.02411670258892E-97 x5 : -3.46665377731460E-01 -8.77814316504787E-98 == err : 2.374E-16 = rco : 1.183E-01 = res : 4.441E-15 == solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.22329769468137E-06 1.82284329366085E-07 x2 : -1.22329779059227E-06 1.82284223885365E-07 x3 : 1.22329321905719E-06 -1.82284813635897E-07 x4 : 1.00000000000158E+00 -2.71715883798281E-13 x5 : 1.22329753836482E-06 -1.82282924467902E-07 == err : 4.556E-07 = rco : 1.861E-12 = res : 1.661E-12 == solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.85365101370553E-08 2.31833599918749E-07 x2 : 6.85363441237071E-08 2.31833818986850E-07 x3 : 1.00000000000102E+00 -1.98404988006356E-12 x4 : -6.85343382770471E-08 -2.31837660318179E-07 x5 : -6.85415893928744E-08 -2.31823806437780E-07 == err : 1.511E-06 = rco : 6.492E-13 = res : 1.827E-11 == solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.06790054458823E-08 4.27015940310905E-08 x2 : 1.00000000000000E+00 -2.94701280788776E-17 x3 : 3.07749389853742E-08 -1.12137061576620E-08 x4 : -2.19195108929354E-08 2.35999538069697E-08 x5 : -2.95344336489430E-08 -5.50878415919878E-08 == err : 6.278E-08 = rco : 2.599E-09 = res : 9.065E-15 == solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.58034329249613E-06 1.82383706665688E-07 x2 : -1.58035006957731E-06 -1.82383721130346E-07 x3 : 1.58034311694340E-06 1.82383777515276E-07 x4 : 1.00000000000239E+00 3.87101467298296E-13 x5 : -1.58034349729392E-06 -1.82384924355020E-07 == err : 4.527E-07 = rco : 3.018E-12 = res : 1.640E-12 == solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.12741574648292E-06 4.06418735308416E-07 x2 : 1.00000000000467E+00 -8.98882226960542E-13 x3 : 2.12740972851169E-06 -4.06419724386414E-07 x4 : 2.12740368364328E-06 -4.06416613077725E-07 x5 : -2.12741167537045E-06 4.06420298802405E-07 == err : 9.413E-07 = rco : 6.040E-12 = res : 7.088E-12 == solution 33 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.00000000000253E+00 1.19570926794940E-14 x2 : 1.56013353138360E-06 1.45580106215678E-08 x3 : 1.56013121833876E-06 1.45564503366529E-08 x4 : -1.56013800613712E-06 -1.45583828707133E-08 x5 : -1.56013433805935E-06 -1.45561139587857E-08 == err : 3.214E-07 = rco : 2.370E-12 = res : 8.261E-13 == solution 34 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.10574130722525E-08 1.22618257726077E-08 x2 : -4.50335066213957E-08 -1.52250848973138E-08 x3 : 1.00000000000000E+00 -9.15557689383856E-16 x4 : -4.48430837311346E-08 -1.52666791934493E-08 x5 : 3.88191763104292E-08 1.82299410648284E-08 == err : 5.497E-08 = rco : 2.285E-10 = res : 2.083E-14 == solution 35 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.99999999999173E-01 8.66825711488376E-13 x2 : -6.06570733166918E-07 -1.26223262765081E-06 x3 : 6.06567443587057E-07 1.26224041238278E-06 x4 : -6.06564169571726E-07 -1.26224590710479E-06 x5 : 6.06569940566573E-07 1.26223552189568E-06 == err : 8.801E-07 = rco : 3.000E-12 = res : 6.197E-12 == solution 36 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.87975462243034E-07 1.22689993570450E-06 x2 : 9.99999999999392E-01 2.14933861370464E-12 x3 : -9.87976005234645E-07 -1.22690167953119E-06 x4 : -9.87975220534314E-07 -1.22690258693196E-06 x5 : 9.87977588609036E-07 1.22689788274281E-06 == err : 5.349E-07 = rco : 2.911E-12 = res : 2.289E-12 == solution 37 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.00000000000092E+00 -1.23832328793530E-12 x2 : 1.23789425810892E-06 -6.35826328396672E-07 x3 : -1.23789476967823E-06 6.35829021062348E-07 x4 : -1.23789983536899E-06 6.35826440079815E-07 x5 : 1.23789757831565E-06 -6.35825417775628E-07 == err : 6.274E-07 = rco : 2.780E-12 = res : 3.149E-12 == solution 38 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -6.06153488697881E-07 -1.41236741463083E-06 x2 : 9.99999999998420E-01 2.40203679331461E-12 x3 : 6.06156254067564E-07 1.41236257165849E-06 x4 : -6.06153449425084E-07 -1.41236514488342E-06 x5 : 6.06155423763572E-07 1.41236278174538E-06 == err : 8.315E-07 = rco : 3.014E-12 = res : 5.532E-12 == solution 39 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.86084296316812E-07 -7.30778499410633E-07 x2 : -4.86082692944142E-07 7.30781403271460E-07 x3 : 9.99999999999692E-01 -6.67676337187957E-13 x4 : -4.86085536225188E-07 7.30778078171977E-07 x5 : 4.86084855890910E-07 -7.30778979003792E-07 == err : 2.095E-07 = rco : 9.828E-13 = res : 3.509E-13 == solution 40 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.50298520182002E-08 2.83328368084155E-08 x2 : -5.17822724559726E-08 -3.15004716768060E-08 x3 : 1.00000000000000E+00 2.75165772160330E-15 x4 : -5.18516482893771E-08 -3.14515989860647E-08 x5 : 4.86040703829226E-08 3.46192255994820E-08 == err : 5.278E-08 = rco : 9.253E-11 = res : 1.799E-14 == solution 41 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.00000000000000E+00 -1.20234165680045E-16 x2 : -4.83072562020273E-08 -3.07063576874070E-08 x3 : 4.37818008702659E-08 3.35323593706863E-08 x4 : 3.97146192131285E-08 1.92823844114386E-08 x5 : -3.51891634539242E-08 -2.21083857340154E-08 == err : 5.868E-08 = rco : 3.152E-10 = res : 2.034E-14 == solution 42 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.17969080242938E-06 -5.40957311428327E-10 x2 : 1.17968682180604E-06 5.40954990659907E-10 x3 : 1.00000000000136E+00 8.27730422216852E-16 x4 : -1.17968189408058E-06 -5.40964738651929E-10 x5 : 1.17968178363661E-06 5.40964576229083E-10 == err : 1.672E-07 = rco : 1.352E-12 = res : 2.230E-13 == solution 43 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -9.24167979087086E-07 1.80601218827263E-07 x2 : 9.24162842104799E-07 -1.80602756817206E-07 x3 : -9.24167739255373E-07 1.80600948307571E-07 x4 : 1.00000000000114E+00 -4.06668631989315E-14 x5 : 9.24169447745892E-07 -1.80599288317039E-07 == err : 6.595E-07 = rco : 1.105E-12 = res : 3.480E-12 == solution 44 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -6.38862154187861E-07 6.48963368921438E-07 x2 : -6.38862235761796E-07 6.48963347224553E-07 x3 : 6.38862502218008E-07 -6.48962277217123E-07 x4 : 6.38861918764901E-07 -6.48962462825607E-07 x5 : 9.99999999999990E-01 -6.58701087533589E-13 == err : 4.129E-07 = rco : 8.654E-13 = res : 1.364E-12 == solution 45 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.65888989125180E-09 -3.55371249267651E-08 x2 : -5.85292629947695E-09 -3.36832735810937E-08 x3 : 1.31844607213824E-08 3.44145283436354E-08 x4 : -2.67264453061346E-09 3.48058701642695E-08 x5 : 1.00000000000000E+00 -1.53669253330835E-20 == err : 3.685E-08 = rco : 3.618E-10 = res : 9.561E-15 == solution 46 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.99999999998927E-01 -1.87904944722461E-12 x2 : -7.02027187320632E-07 1.22756306712486E-06 x3 : -7.02024896954381E-07 1.22756038104069E-06 x4 : 7.02028366868379E-07 -1.22755816108898E-06 x5 : 7.02026937519209E-07 -1.22755964992824E-06 == err : 4.079E-07 = rco : 1.619E-12 = res : 1.331E-12 == solution 47 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.54650597087958E-07 -7.78299677278527E-07 x2 : 9.99999999999030E-01 -6.72657388629456E-13 x3 : -1.54663194499264E-07 -7.78305279628151E-07 x4 : 1.54656730127230E-07 7.78304890814088E-07 x5 : 1.54659971096885E-07 7.78302084064756E-07 == err : 9.962E-07 = rco : 5.047E-13 = res : 7.939E-12 == solution 48 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.42060831046389E-06 3.65064047133631E-07 x2 : 1.00000000000208E+00 6.26489425951522E-13 x3 : -1.42061002648891E-06 -3.65065970060977E-07 x4 : 1.42060339068538E-06 3.65067038894502E-07 x5 : -1.42060791916345E-06 -3.65066995435433E-07 == err : 6.748E-07 = rco : 2.886E-12 = res : 3.643E-12 == solution 49 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -6.94682180954926E-07 1.16354890998851E-07 x2 : 6.94681695079244E-07 -1.16354725608351E-07 x3 : -6.94682271263906E-07 1.16354899230200E-07 x4 : 6.94681637823491E-07 -1.16354679361033E-07 x5 : 1.00000000000037E+00 -1.28419889113769E-13 == err : 3.186E-07 = rco : 6.497E-13 = res : 8.116E-13 == solution 50 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.99999999999347E-01 -2.45700483866080E-12 x2 : -1.08271790538082E-06 1.21985463231754E-06 x3 : -1.08271888742779E-06 1.21985422209211E-06 x4 : 1.08271871626140E-06 -1.21985165425562E-06 x5 : 1.08272003421151E-06 -1.21984982913952E-06 == err : 6.197E-07 = rco : 2.604E-12 = res : 3.072E-12 == solution 51 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.07774338776101E-06 -1.88645148968429E-07 x2 : -1.07774462552923E-06 1.88645598318364E-07 x3 : -1.07774475451970E-06 1.88645600070991E-07 x4 : 1.07774330782751E-06 -1.88645080374699E-07 x5 : 1.00000000000089E+00 -3.23015409133179E-13 == err : 4.958E-07 = rco : 1.579E-12 = res : 1.966E-12 == solution 52 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.43444323770434E-07 1.34648776748338E-06 x2 : 8.43444372217756E-07 1.34648770762209E-06 x3 : -8.43440044963702E-07 -1.34649475839431E-06 x4 : 9.99999999998792E-01 2.28667961615859E-12 x5 : -8.43445027372318E-07 -1.34648757675001E-06 == err : 3.276E-07 = rco : 3.213E-12 = res : 8.596E-13 == solution 53 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.00000000000063E+00 4.35812975294944E-13 x2 : -8.80830083174325E-07 -3.54019797288083E-07 x3 : 8.80840108321036E-07 3.54013446700936E-07 x4 : 8.80833826616588E-07 3.54016630480154E-07 x5 : -8.80845752290805E-07 -3.54011587331932E-07 == err : 4.343E-07 = rco : 1.295E-12 = res : 1.509E-12 == solution 54 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.92705717096136E-07 -1.83406206460452E-09 x2 : -4.92705727906632E-07 -1.83406197368206E-09 x3 : 1.00000000000024E+00 1.94799111544824E-15 x4 : 4.92705070055773E-07 1.83408154617958E-09 x5 : 4.92705653030769E-07 1.83403664813366E-09 == err : 4.678E-08 = rco : 2.363E-13 = res : 1.501E-14 == solution 55 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.78558559035624E-07 5.29764928665936E-07 x2 : -3.78560476938104E-07 -5.29762481915087E-07 x3 : -3.78560244971064E-07 -5.29762857793054E-07 x4 : 1.00000000000026E+00 -2.45486266535439E-13 x5 : 3.78561384605609E-07 5.29761147501003E-07 == err : 8.710E-07 = rco : 8.544E-13 = res : 6.068E-12 == solution 56 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.96721117949059E-07 -1.08184484771298E-06 x2 : -3.96720081006479E-07 1.08184572769350E-06 x3 : 3.96721262809358E-07 -1.08184464703314E-06 x4 : -3.96719885571923E-07 1.08184581271033E-06 x5 : 9.99999999999195E-01 -6.81885905041855E-13 == err : 5.225E-07 = rco : 1.928E-12 = res : 2.184E-12 == solution 57 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.04091245708007E-01 9.05970135746373E-82 x2 : 3.04091245708007E-01 1.81194027149275E-82 x3 : 3.04091245708007E-01 -9.22442320032671E-82 x4 : 3.04091245708007E-01 -3.62388054298549E-82 x5 : 3.04091245708007E-01 2.55318856437614E-82 == err : 4.057E-16 = rco : 2.125E-01 = res : 3.331E-16 == solution 58 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -9.03297814307222E-07 5.74765213809762E-07 x2 : 1.00000000000043E+00 -8.00982707761738E-13 x3 : -9.03295414834526E-07 5.74766653139927E-07 x4 : 9.03291765705812E-07 -5.74767415183087E-07 x5 : 9.03300180459563E-07 -5.74762048818479E-07 == err : 4.943E-07 = rco : 1.016E-12 = res : 1.955E-12 == solution 59 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.66389539285958E-08 -5.01298060687665E-09 x2 : -2.48821090614598E-08 6.05539841797498E-09 x3 : -2.94817421297925E-08 4.57942926226050E-09 x4 : 1.00000000000000E+00 -7.45235205476876E-17 x5 : 2.77248971350939E-08 -5.62184684978828E-09 == err : 2.870E-08 = rco : 6.215E-11 = res : 5.987E-15 == solution 60 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -6.16591245708008E-01 5.56381379732994E-84 x2 : -6.16591245708008E-01 1.80164515631381E-84 x3 : -6.16591245708007E-01 -9.52298154051585E-84 x4 : -6.16591245708008E-01 5.72665781828318E-84 x5 : -6.16591245708007E-01 3.05636231874664E-84 == err : 1.124E-15 = rco : 8.566E-02 = res : 1.332E-15 == solution 61 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.63206670003076E-07 -9.36425885188195E-07 x2 : -2.63206646400207E-07 -9.36425790901187E-07 x3 : 2.63207541296957E-07 9.36424915060640E-07 x4 : 2.63207699983628E-07 9.36425586257462E-07 x5 : 9.99999999999358E-01 3.91590426922297E-13 == err : 4.410E-07 = rco : 1.119E-12 = res : 1.556E-12 == solution 62 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.64109817728802E-07 -9.60085394264516E-07 x2 : -5.64110661692026E-07 9.60084110525369E-07 x3 : 9.99999999999683E-01 -5.82646810562509E-13 x4 : 5.64108444309706E-07 -9.60087882715373E-07 x5 : -5.64106649830123E-07 9.60090914394952E-07 == err : 7.595E-07 = rco : 1.879E-12 = res : 4.615E-12 == solution 63 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.54782332780576E-08 -3.70540833923582E-08 x2 : 1.00000000000000E+00 4.35936137919293E-19 x3 : 2.32268671523204E-08 2.77819682696953E-08 x4 : -1.21019355516642E-08 -1.07202271461614E-08 x5 : 2.43533014511612E-08 1.99923422675164E-08 == err : 5.131E-08 = rco : 2.301E-09 = res : 1.039E-14 == solution 64 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.34346494177636E-07 9.04339948429487E-07 x2 : 3.34347268920525E-07 -9.04339285420627E-07 x3 : 3.34347320809658E-07 -9.04339197032378E-07 x4 : -3.34346413119316E-07 9.04339975183301E-07 x5 : 9.99999999999439E-01 -4.80386594082435E-13 == err : 4.372E-07 = rco : 1.351E-12 = res : 1.530E-12 == solution 65 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.99999999999007E-01 -3.99057426482604E-12 x2 : -1.15626663684348E-06 1.02733965476728E-06 x3 : 1.15626630520210E-06 -1.02732871622070E-06 x4 : 1.15626767931486E-06 -1.02733789537572E-06 x5 : -1.15626436806318E-06 1.02733892855193E-06 == err : 1.434E-06 = rco : 2.453E-12 = res : 1.646E-11 == solution 66 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.54852696159722E-07 -8.85421356648851E-07 x2 : -4.54852376023737E-07 8.85421254411180E-07 x3 : -4.54852222189907E-07 8.85421522189185E-07 x4 : 9.99999999999636E-01 -4.59232850313549E-13 x5 : 4.54852994824043E-07 -8.85420042252963E-07 == err : 6.375E-07 = rco : 1.513E-12 = res : 3.252E-12 == solution 67 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.99484386216088E-08 -1.00882414701756E-06 x2 : -3.99486240404141E-08 -1.00882409686281E-06 x3 : 3.99493612516937E-08 1.00882183892582E-06 x4 : 9.99999999999213E-01 4.02975841993915E-13 x5 : 3.99500621954223E-08 1.00882519602702E-06 == err : 6.289E-07 = rco : 1.079E-12 = res : 3.164E-12 == solution 68 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.94275587846130E-07 -1.25624940614933E-06 x2 : 2.94277319162299E-07 1.25624854110376E-06 x3 : -2.94275715318459E-07 -1.25624967931879E-06 x4 : 9.99999999998829E-01 5.22639092516003E-13 x5 : 2.94277496776390E-07 1.25624897644708E-06 == err : 6.221E-07 = rco : 2.324E-12 = res : 3.096E-12 == solution 69 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.43667114974019E-07 -5.32726341126562E-07 x2 : 4.43667206266718E-07 5.32725837448733E-07 x3 : 4.43667242979847E-07 5.32725773932584E-07 x4 : -4.43667126883301E-07 -5.32726396814224E-07 x5 : 9.99999999999931E-01 3.75519822754863E-13 == err : 3.143E-07 = rco : 5.767E-13 = res : 7.906E-13 == solution 70 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.33265383949542E-06 3.29772740949587E-07 x2 : 1.33265397758919E-06 3.29772598616631E-07 x3 : -1.33265639478179E-06 -3.29773229446862E-07 x4 : -1.33265539574640E-06 -3.29774204789839E-07 x5 : 1.00000000000132E+00 6.98223494698609E-13 == err : 6.225E-07 = rco : 2.216E-12 = res : 3.100E-12 == SHAR_EOF fi # end of overwriting check if test -f 'cyclic5' then echo shar: will not over-write existing file "'cyclic5'" else cat << "SHAR_EOF" > 'cyclic5' 5 a + b + c + d + e; a*b + b*c + c*d + d*e + e*a; a*b*c + b*c*d + c*d*e + d*e*a + e*a*b; a*b*c*d + b*c*d*e + c*d*e*a + d*e*a*b + e*a*b*c; a*b*c*d*e - 1; TITLE : cyclic 5-roots problem ROOT COUNTS : total degree : 120 5-homogeneous Bezout number : 120 with partition : {a }{b }{c }{d }{e } generalized Bezout number : 106 based on the set structure : {a b c d e } {a c e }{b d e } {a d }{b d e }{c e } {a e }{b e }{c e }{d e } {a }{b }{c }{d }{e } mixed volume : 70 = 14*5 SYMMETRY GROUP : b c d e a e d c b a SYMMETRIC SET STRUCTURE : { a b c d e } { a } { b } { c } { d } { e } { a } { b } { c } { d } { e } { a } { b } { c } { d } { e } { a } { b } { c } { d } { e } with generalized Bezout bound : 120, leading to 12 generating solutions. REFERENCES : See G\"oran Bj\"ork and Ralf Fr\"oberg: `A faster way to count the solutions of inhomogeneous systems of algebraic equations, with applications to cyclic n-roots', in J. Symbolic Computation (1991) 12, pp 329--336. THE GENERATING SOLUTIONS : 7 5 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 10 the solution for t : a : 3.09016994374947E-01 -9.51056516295154E-01 b : 3.09016994374947E-01 -9.51056516295154E-01 c : -8.09016994374948E-01 2.48989828488278E+00 d : -1.18033988749895E-01 3.63271264002680E-01 e : 3.09016994374948E-01 -9.51056516295154E-01 == err : 8.556E-16 = rco : 6.220E-02 = res : 7.022E-16 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 10 the solution for t : a : 1.00000000000000E+00 -3.31628872515627E-75 b : 1.00000000000000E+00 -8.84343660041671E-75 c : -2.61803398874990E+00 3.31628872515627E-75 d : -3.81966011250105E-01 1.65814436257813E-75 e : 1.00000000000000E+00 6.90893484407556E-75 == err : 4.713E-15 = rco : 6.850E-02 = res : 4.441E-16 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 10 the solution for t : a : 3.09016994374948E-01 9.51056516295154E-01 b : 3.09016994374947E-01 9.51056516295154E-01 c : -8.09016994374948E-01 -2.48989828488278E+00 d : -1.18033988749895E-01 -3.63271264002680E-01 e : 3.09016994374947E-01 9.51056516295154E-01 == err : 6.582E-16 = rco : 6.220E-02 = res : 4.965E-16 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 10 the solution for t : a : -8.09016994374947E-01 5.87785252292473E-01 b : -8.09016994374947E-01 5.87785252292473E-01 c : 2.11803398874990E+00 -1.53884176858763E+00 d : 3.09016994374947E-01 -2.24513988289793E-01 e : -8.09016994374948E-01 5.87785252292473E-01 == err : 5.945E-15 = rco : 6.765E-02 = res : 4.003E-16 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 10 the solution for t : a : -8.09016994374947E-01 -5.87785252292473E-01 b : -8.09016994374947E-01 -5.87785252292473E-01 c : 2.11803398874990E+00 1.53884176858763E+00 d : 3.09016994374947E-01 2.24513988289793E-01 e : -8.09016994374948E-01 -5.87785252292473E-01 == err : 5.945E-15 = rco : 6.765E-02 = res : 4.003E-16 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 10 the solution for t : a : 1.00000000000000E+00 -7.24393703353565E-18 b : -8.09016994374947E-01 -5.87785252292473E-01 c : 3.09016994374947E-01 9.51056516295154E-01 d : 3.09016994374947E-01 -9.51056516295154E-01 e : -8.09016994374948E-01 5.87785252292473E-01 == err : 7.269E-16 = rco : 2.571E-01 = res : 4.442E-16 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 10 the solution for t : a : -8.09016994374947E-01 5.87785252292473E-01 b : -8.09016994374947E-01 -5.87785252292473E-01 c : 3.09016994374947E-01 -9.51056516295153E-01 d : 1.00000000000000E+00 2.82553319327192E-17 e : 3.09016994374947E-01 9.51056516295153E-01 == err : 6.769E-16 = rco : 2.221E-01 = res : 7.022E-16 == SHAR_EOF fi # end of overwriting check if test -f 'cyclic6' then echo shar: will not over-write existing file "'cyclic6'" else cat << "SHAR_EOF" > 'cyclic6' 6 z0 + z1 + z2 + z3 + z4 + z5; z0*z1 + z1*z2 + z2*z3 + z3*z4 + z4*z5 + z5*z0; z0*z1*z2 + z1*z2*z3 + z2*z3*z4 + z3*z4*z5 + z4*z5*z0 + z5*z0*z1; z0*z1*z2*z3 + z1*z2*z3*z4 + z2*z3*z4*z5 + z3*z4*z5*z0 + z4*z5*z0*z1 + z5*z0*z1*z2; z0*z1*z2*z3*z4 + z1*z2*z3*z4*z5 + z2*z3*z4*z5*z0 + z3*z4*z5*z0*z1 + z4*z5*z0*z1*z2 + z5*z0*z1*z2*z3; z0*z1*z2*z3*z4*z5 - 1; TITLE : cyclic 6-roots problem ROOT COUNTS : total degree : 6! = 720 bound based on set structure analysis : 504 with set structure {z0 z1 z2 z3 z4 z5 } {z0 z2 z4 }{z1 z3 z5 } {z0 z3 }{z1 z4 }{z2 z5 } {z0 }{z1 }{z2 }{z3 }{z4 }{z5 } {z0 }{z1 }{z2 }{z3 }{z4 }{z5 } {z0 }{z1 }{z2 }{z3 }{z4 }{z5 } mixed volume : 156 = 13*12 SYMMETRY GROUP : z1 z2 z3 z4 z5 z0 z5 z4 z3 z2 z1 z0 SYMMETRIC SET STRUCTURE : {z0 z1 z2 z3 z4 z5 } {z0 }{z1 }{z2 }{z3 }{z4 }{z5 } {z0 }{z1 }{z2 }{z3 }{z4 }{z5 } {z0 }{z1 }{z2 }{z3 }{z4 }{z5 } {z0 }{z1 }{z2 }{z3 }{z4 }{z5 } {z0 }{z1 }{z2 }{z3 }{z4 }{z5 } with generalized Bezout bound : 720 and 60 generating solutions REFERENCES : See G\"oran Bj\"ork and Ralf Fr\"oberg: `A faster way to count the solutions of inhomogeneous systems of algebraic equations, with applications to cyclic n-roots', in J. Symbolic Computation (1991) 12, pp 329--336. THE GENERATING SOLUTIONS : 13 6 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : z0 : 8.86365602936828E-18 1.00000000000000E+00 z1 : -9.30604859102100E-01 -3.66025403784439E-01 z2 : 9.30604859102100E-01 3.66025403784439E-01 z3 : -4.26190968730363E-17 -1.00000000000000E+00 z4 : -9.30604859102100E-01 3.66025403784439E-01 z5 : 9.30604859102100E-01 -3.66025403784439E-01 == err : 6.592E-16 = rco : 2.143E-01 = res : 4.530E-16 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : z0 : -8.66025403784439E-01 5.00000000000000E-01 z1 : -1.48315131443269E-01 -9.88940150759876E-01 z2 : 1.48315131443269E-01 9.88940150759876E-01 z3 : 8.66025403784439E-01 -5.00000000000000E-01 z4 : -7.82289727658830E-01 -6.22914746975437E-01 z5 : 7.82289727658831E-01 6.22914746975437E-01 == err : 6.084E-16 = rco : 2.286E-01 = res : 4.965E-16 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : z0 : -8.66025403784439E-01 -5.00000000000000E-01 z1 : 7.82289727658830E-01 -6.22914746975437E-01 z2 : -7.82289727658831E-01 6.22914746975437E-01 z3 : 8.66025403784439E-01 5.00000000000000E-01 z4 : 1.48315131443269E-01 -9.88940150759876E-01 z5 : -1.48315131443269E-01 9.88940150759876E-01 == err : 4.762E-16 = rco : 2.399E-01 = res : 2.483E-16 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : z0 : -1.86602540378444E+00 -3.23205080756888E+00 z1 : -1.33974596215561E-01 -2.32050807568877E-01 z2 : 5.00000000000000E-01 8.66025403784438E-01 z3 : 5.00000000000000E-01 8.66025403784439E-01 z4 : 5.00000000000000E-01 8.66025403784439E-01 z5 : 5.00000000000000E-01 8.66025403784439E-01 == err : 3.111E-15 = rco : 3.021E-02 = res : 8.006E-16 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : z0 : -1.86602540378444E+00 3.23205080756888E+00 z1 : -1.33974596215561E-01 2.32050807568877E-01 z2 : 5.00000000000000E-01 -8.66025403784438E-01 z3 : 5.00000000000000E-01 -8.66025403784439E-01 z4 : 5.00000000000000E-01 -8.66025403784439E-01 z5 : 5.00000000000000E-01 -8.66025403784439E-01 == err : 3.111E-15 = rco : 3.021E-02 = res : 8.006E-16 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : z0 : 3.73205080756888E+00 1.18072616964182E-79 z1 : 2.67949192431123E-01 9.44580935713455E-79 z2 : -1.00000000000000E+00 2.15904213877361E-78 z3 : -1.00000000000000E+00 -5.39760534693403E-79 z4 : -1.00000000000000E+00 -5.39760534693403E-79 z5 : -1.00000000000000E+00 -2.15904213877361E-78 == err : 2.484E-15 = rco : 3.113E-02 = res : 3.331E-16 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : z0 : 1.86602540378444E+00 3.23205080756888E+00 z1 : 1.33974596215561E-01 2.32050807568877E-01 z2 : -5.00000000000000E-01 -8.66025403784438E-01 z3 : -5.00000000000000E-01 -8.66025403784439E-01 z4 : -5.00000000000000E-01 -8.66025403784439E-01 z5 : -5.00000000000000E-01 -8.66025403784439E-01 == err : 3.111E-15 = rco : 3.021E-02 = res : 8.006E-16 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : z0 : 1.86602540378444E+00 -3.23205080756888E+00 z1 : 1.33974596215561E-01 -2.32050807568877E-01 z2 : -5.00000000000000E-01 8.66025403784438E-01 z3 : -5.00000000000000E-01 8.66025403784439E-01 z4 : -5.00000000000000E-01 8.66025403784439E-01 z5 : -5.00000000000000E-01 8.66025403784439E-01 == err : 3.111E-15 = rco : 3.021E-02 = res : 8.006E-16 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : z0 : -3.73205080756888E+00 -1.18072616964182E-79 z1 : -2.67949192431123E-01 -9.44580935713455E-79 z2 : 1.00000000000000E+00 -2.15904213877361E-78 z3 : 1.00000000000000E+00 5.39760534693403E-79 z4 : 1.00000000000000E+00 5.39760534693403E-79 z5 : 1.00000000000000E+00 2.15904213877361E-78 == err : 2.484E-15 = rco : 3.113E-02 = res : 3.331E-16 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : z0 : -8.66025403784439E-01 -5.00000000000000E-01 z1 : -8.66025403784439E-01 5.00000000000000E-01 z2 : -5.17587871677573E-17 1.00000000000000E+00 z3 : 8.66025403784439E-01 5.00000000000000E-01 z4 : 8.66025403784439E-01 -5.00000000000000E-01 z5 : 7.00201700631743E-17 -1.00000000000000E+00 == err : 5.113E-16 = rco : 2.821E-01 = res : 4.996E-16 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : z0 : 1.51132949714153E-77 2.29663026288654E+00 z1 : -8.09640802040104E-79 1.00000000000000E+00 z2 : -3.10362307448707E-78 4.35420544682339E-01 z3 : -5.39760534693403E-78 -4.35420544682339E-01 z4 : 1.21446120306016E-78 -1.00000000000000E+00 z5 : -6.47712641632083E-78 -2.29663026288654E+00 == err : 1.915E-15 = rco : 8.556E-02 = res : 6.661E-16 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : z0 : -1.98894015075988E+00 1.14831513144327E+00 z1 : -8.66025403784439E-01 5.00000000000000E-01 z2 : -3.77085253024563E-01 2.17710272341170E-01 z3 : 3.77085253024563E-01 -2.17710272341169E-01 z4 : 8.66025403784439E-01 -5.00000000000000E-01 z5 : 1.98894015075988E+00 -1.14831513144327E+00 == err : 4.422E-15 = rco : 8.405E-02 = res : 1.193E-15 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : z0 : -1.98894015075988E+00 -1.14831513144327E+00 z1 : -8.66025403784439E-01 -5.00000000000000E-01 z2 : -3.77085253024563E-01 -2.17710272341170E-01 z3 : 3.77085253024563E-01 2.17710272341169E-01 z4 : 8.66025403784439E-01 5.00000000000000E-01 z5 : 1.98894015075988E+00 1.14831513144327E+00 == err : 4.422E-15 = rco : 8.405E-02 = res : 1.193E-15 == SHAR_EOF fi # end of overwriting check if test -f 'cyclic7' then echo shar: will not over-write existing file "'cyclic7'" else cat << "SHAR_EOF" > 'cyclic7' 7 z0 + z1 + z2 + z3 + z4 + z5 + z6; z0*z1 + z1*z2 + z2*z3 + z3*z4 + z4*z5 + z5*z6 + z6*z0; z0*z1*z2 + z1*z2*z3 + z2*z3*z4 + z3*z4*z5 + z4*z5*z6 + z5*z6*z0 + z6*z0*z1; z0*z1*z2*z3 + z1*z2*z3*z4 + z2*z3*z4*z5 + z3*z4*z5*z6 + z4*z5*z6*z0 + z5*z6*z0*z1 + z6*z0*z1*z2; z0*z1*z2*z3*z4 + z1*z2*z3*z4*z5 + z2*z3*z4*z5*z6 + z3*z4*z5*z6*z0 + z4*z5*z6*z0*z1 + z5*z6*z0*z1*z2 + z6*z0*z1*z2*z3; z0*z1*z2*z3*z4*z5 + z1*z2*z3*z4*z5*z6 + z2*z3*z4*z5*z6*z0 + z3*z4*z5*z6*z0*z1 + z4*z5*z6*z0*z1*z2 + z5*z6*z0*z1*z2*z3 + z6*z0*z1*z2*z3*z4; z0*z1*z2*z3*z4*z5*z6 - 1; TITLE : cyclic 7-roots problem ROOT COUNTS : total degree : 7! = 5040 bound based on set structure analysis : 3960 with set structure {z0 z1 z2 z3 z4 z5 z6 } {z0 z2 z4 }{z1 z3 z5 }{z6 } {z0 z3 }{z1 z4 }{z2 z5 }{z6 } {z0 }{z1 }{z2 }{z3 }{z4 }{z5 }{z6 } {z0 }{z1 }{z2 }{z3 }{z4 }{z5 }{z6 } {z0 }{z1 }{z2 }{z3 }{z4 }{z5 }{z6 } {z0 }{z1 }{z2 }{z3 }{z4 }{z5 }{z6 } mixed volume : 924 = 132*7 = 66*14 REFERENCES : Goeran Bjoerk and Ralf Froeberg: `A faster way to count the solutions of inhomogeneous systems of algebraic equations, with applications to cyclic n-roots', in J. Symbolic Computation (1991) 12, pp 329-336. Backelin, J. and Froeberg, R.: "How we proved that there are exactly 924 cyclic 7-roots" , Proceedings of ISSAC-91, pp 103-111, ACM, New York, 1991. THE SYMMETRY GROUP : z3 z2 z1 z0 z6 z5 z4 z5 z6 z0 z1 z2 z3 z4 z4 z5 z6 z0 z1 z2 z3 z2 z1 z0 z6 z5 z4 z3 z4 z3 z2 z1 z0 z6 z5 z6 z0 z1 z2 z3 z4 z5 z3 z4 z5 z6 z0 z1 z2 z1 z0 z6 z5 z4 z3 z2 z5 z4 z3 z2 z1 z0 z6 z0 z1 z2 z3 z4 z5 z6 z2 z3 z4 z5 z6 z0 z1 z0 z6 z5 z4 z3 z2 z1 z1 z2 z3 z4 z5 z6 z0 z6 z5 z4 z3 z2 z1 z0 The orbits of solutions : 0 0 294 0 0 0 630 THE GENERATING SOLUTIONS : 66 7 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 7.02333926597258E-01 -7.11847635066998E-01 z1 : -9.00968867902419E-01 -4.33883739117558E-01 z2 : -1.18646851083002E-01 9.92936515960657E-01 z3 : -6.15773527982914E-01 7.87923195645030E-01 z4 : 7.50189717916991E-01 -6.61222645658500E-01 z5 : -4.92290427160941E-02 9.98787515617439E-01 z6 : 2.32094645170181E-01 -9.72693207380071E-01 == err : 9.890E-16 = rco : 4.114E-02 = res : 6.004E-16 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -1.18646851083002E-01 -9.92936515960657E-01 z1 : -9.00968867902419E-01 4.33883739117558E-01 z2 : 7.02333926597258E-01 7.11847635066998E-01 z3 : 2.32094645170181E-01 9.72693207380070E-01 z4 : -4.92290427160941E-02 -9.98787515617440E-01 z5 : 7.50189717916991E-01 6.61222645658500E-01 z6 : -6.15773527982914E-01 -7.87923195645030E-01 == err : 5.201E-16 = rco : 4.405E-02 = res : 4.847E-16 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -8.50284129943065E-01 -5.26323948122224E-01 z1 : -2.22520933956314E-01 9.74927912181824E-01 z2 : 9.94442932548583E-01 -1.05277034077595E-01 z3 : 9.05190816642172E-01 4.25005394632442E-01 z4 : -8.11577330094496E-01 -5.84245014764088E-01 z5 : 9.84700319877142E-01 -1.74256362965188E-01 z6 : -9.99951675074021E-01 -9.83094688516943E-03 == err : 5.463E-16 = rco : 3.627E-02 = res : 4.578E-16 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -9.41640116320652E-01 3.36621287704193E-01 z1 : 6.23489801858734E-01 7.81831482468030E-01 z2 : 5.37716127351810E-01 -8.43125949301629E-01 z3 : 8.96659840654965E-01 -4.42720148803521E-01 z4 : -9.62791334751220E-01 2.70245898633011E-01 z5 : 4.77711496743870E-01 -8.78516776094077E-01 z6 : -6.31145815537507E-01 7.75664205393994E-01 == err : 8.284E-16 = rco : 4.586E-02 = res : 4.578E-16 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -3.23921889150932E-01 9.46083828066462E-01 z1 : 1.00000000000000E+00 -1.06195743257842E-16 z2 : -3.23921889150932E-01 -9.46083828066462E-01 z3 : 2.12925716127124E-01 -9.77068390345196E-01 z4 : -3.89003826976192E-01 9.21236138347751E-01 z5 : -3.89003826976192E-01 -9.21236138347751E-01 z6 : 2.12925716127124E-01 9.77068390345196E-01 == err : 7.424E-16 = rco : 4.615E-02 = res : 5.551E-16 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 5.37716127351810E-01 8.43125949301629E-01 z1 : 6.23489801858734E-01 -7.81831482468030E-01 z2 : -9.41640116320652E-01 -3.36621287704193E-01 z3 : -6.31145815537506E-01 -7.75664205393994E-01 z4 : 4.77711496743870E-01 8.78516776094077E-01 z5 : -9.62791334751221E-01 -2.70245898633011E-01 z6 : 8.96659840654965E-01 4.42720148803522E-01 == err : 1.180E-15 = rco : 3.684E-02 = res : 8.899E-16 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 9.94442932548583E-01 1.05277034077595E-01 z1 : -2.22520933956314E-01 -9.74927912181824E-01 z2 : -8.50284129943065E-01 5.26323948122224E-01 z3 : -9.99951675074021E-01 9.83094688516931E-03 z4 : 9.84700319877142E-01 1.74256362965188E-01 z5 : -8.11577330094496E-01 5.84245014764088E-01 z6 : 9.05190816642172E-01 -4.25005394632442E-01 == err : 5.966E-16 = rco : 5.469E-02 = res : 6.474E-16 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 6.23489801858734E-01 -7.81831482468030E-01 z1 : 4.95155660487904E-02 9.98773352026809E-01 z2 : 6.23489801858734E-01 -7.81831482468030E-01 z3 : -9.84750268836890E-01 1.73973871675235E-01 z4 : 4.95155660487906E-02 9.98773352026809E-01 z5 : -9.84750268836891E-01 1.73973871675236E-01 z6 : 6.23489801858734E-01 -7.81831482468030E-01 == err : 9.445E-16 = rco : 3.966E-02 = res : 5.979E-16 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -2.22520933956315E-01 -9.74927912181823E-01 z1 : 8.11744900929367E-01 5.84012170947809E-01 z2 : -2.22520933956314E-01 -9.74927912181824E-01 z3 : -4.77963499994895E-01 8.78379697324927E-01 z4 : 8.11744900929367E-01 5.84012170947809E-01 z5 : -4.77963499994895E-01 8.78379697324926E-01 z6 : -2.22520933956314E-01 -9.74927912181824E-01 == err : 9.522E-16 = rco : 5.827E-02 = res : 7.816E-16 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -9.00968867902419E-01 -4.33883739117558E-01 z1 : 9.62713768831786E-01 -2.70522086532133E-01 z2 : -9.00968867902419E-01 -4.33883739117558E-01 z3 : 3.88739533021843E-01 9.21347695208470E-01 z4 : 9.62713768831786E-01 -2.70522086532133E-01 z5 : 3.88739533021843E-01 9.21347695208470E-01 z6 : -9.00968867902419E-01 -4.33883739117558E-01 == err : 3.191E-16 = rco : 5.134E-02 = res : 5.467E-16 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -9.00968867902419E-01 4.33883739117558E-01 z1 : 3.88739533021843E-01 -9.21347695208470E-01 z2 : -9.00968867902419E-01 4.33883739117558E-01 z3 : 9.62713768831786E-01 2.70522086532133E-01 z4 : 3.88739533021843E-01 -9.21347695208470E-01 z5 : 9.62713768831786E-01 2.70522086532133E-01 z6 : -9.00968867902420E-01 4.33883739117558E-01 == err : 8.546E-16 = rco : 4.158E-02 = res : 9.486E-16 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -2.22520933956314E-01 9.74927912181824E-01 z1 : -4.77963499994895E-01 -8.78379697324927E-01 z2 : -2.22520933956314E-01 9.74927912181824E-01 z3 : 8.11744900929367E-01 -5.84012170947808E-01 z4 : -4.77963499994895E-01 -8.78379697324927E-01 z5 : 8.11744900929367E-01 -5.84012170947809E-01 z6 : -2.22520933956315E-01 9.74927912181823E-01 == err : 1.380E-15 = rco : 4.946E-02 = res : 4.441E-16 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 6.23489801858734E-01 7.81831482468030E-01 z1 : -9.84750268836891E-01 -1.73973871675236E-01 z2 : 6.23489801858734E-01 7.81831482468030E-01 z3 : 4.95155660487904E-02 -9.98773352026809E-01 z4 : -9.84750268836891E-01 -1.73973871675236E-01 z5 : 4.95155660487905E-02 -9.98773352026809E-01 z6 : 6.23489801858733E-01 7.81831482468030E-01 == err : 5.366E-16 = rco : 5.932E-02 = res : 7.022E-16 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 1.00000000000000E+00 -4.68329982977893E-17 z1 : -7.50000000000000E-01 6.61437827766148E-01 z2 : 1.00000000000000E+00 1.62334608588841E-17 z3 : -7.50000000000000E-01 -6.61437827766148E-01 z4 : -7.50000000000000E-01 6.61437827766148E-01 z5 : -7.50000000000000E-01 -6.61437827766148E-01 z6 : 1.00000000000000E+00 4.00343518165533E-17 == err : 4.386E-16 = rco : 5.109E-02 = res : 2.134E-16 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 8.96659840654965E-01 4.42720148803522E-01 z1 : 6.23489801858734E-01 -7.81831482468030E-01 z2 : -6.31145815537507E-01 -7.75664205393994E-01 z3 : -7.09298122652920E-01 7.04908627554695E-01 z4 : -5.75611274604122E-01 -8.17723462148799E-01 z5 : 9.25306986115515E-01 3.79218909662773E-01 z6 : -5.29401415834666E-01 8.48371463989832E-01 == err : 6.351E-16 = rco : 3.487E-02 = res : 6.753E-16 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 2.12925716127123E-01 9.77068390345196E-01 z1 : 1.00000000000000E+00 -4.13966840285641E-16 z2 : 2.12925716127124E-01 -9.77068390345195E-01 z3 : -9.93359903237232E-01 -1.15048262222933E-01 z4 : 2.80434187110108E-01 -9.59873255539445E-01 z5 : 2.80434187110108E-01 9.59873255539445E-01 z6 : -9.93359903237232E-01 1.15048262222934E-01 == err : 7.124E-16 = rco : 2.880E-02 = res : 4.965E-16 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -6.31145815537507E-01 7.75664205393994E-01 z1 : 6.23489801858734E-01 7.81831482468030E-01 z2 : 8.96659840654965E-01 -4.42720148803522E-01 z3 : -5.29401415834666E-01 -8.48371463989832E-01 z4 : 9.25306986115515E-01 -3.79218909662773E-01 z5 : -5.75611274604122E-01 8.17723462148799E-01 z6 : -7.09298122652919E-01 -7.04908627554695E-01 == err : 6.524E-16 = rco : 2.965E-02 = res : 3.511E-16 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -9.99951675074021E-01 -9.83094688516918E-03 z1 : -2.22520933956315E-01 9.74927912181824E-01 z2 : 9.05190816642172E-01 4.25005394632442E-01 z3 : 3.33207135512255E-01 -9.42853649748315E-01 z4 : 8.73404751753220E-01 4.86995009845990E-01 z5 : -9.98209706211262E-01 5.98112232413395E-02 z6 : 1.08879611333952E-01 -9.94054943268111E-01 == err : 1.080E-15 = rco : 3.272E-02 = res : 7.018E-16 == solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -6.15773527982914E-01 -7.87923195645030E-01 z1 : -9.00968867902419E-01 4.33883739117558E-01 z2 : 2.32094645170181E-01 9.72693207380070E-01 z3 : 9.44903917631569E-01 -3.27347806536889E-01 z4 : 1.63810925110668E-01 9.86491754052910E-01 z5 : -6.69135869274128E-01 -7.43140086693456E-01 z6 : 8.45068777247042E-01 -5.34657611675163E-01 == err : 8.342E-16 = rco : 2.719E-02 = res : 6.280E-16 == solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 2.32094645170181E-01 -9.72693207380070E-01 z1 : -9.00968867902419E-01 -4.33883739117558E-01 z2 : -6.15773527982914E-01 7.87923195645030E-01 z3 : 8.45068777247042E-01 5.34657611675163E-01 z4 : -6.69135869274127E-01 7.43140086693456E-01 z5 : 1.63810925110668E-01 -9.86491754052910E-01 z6 : 9.44903917631569E-01 3.27347806536889E-01 == err : 4.872E-16 = rco : 3.072E-02 = res : 2.220E-16 == solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 9.05190816642172E-01 -4.25005394632442E-01 z1 : -2.22520933956314E-01 -9.74927912181824E-01 z2 : -9.99951675074021E-01 9.83094688516958E-03 z3 : 1.08879611333951E-01 9.94054943268111E-01 z4 : -9.98209706211262E-01 -5.98112232413392E-02 z5 : 8.73404751753220E-01 -4.86995009845990E-01 z6 : 3.33207135512254E-01 9.42853649748315E-01 == err : 7.137E-16 = rco : 3.201E-02 = res : 8.990E-16 == solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 6.23489801858734E-01 -7.81831482468030E-01 z1 : 6.23489801858734E-01 -7.81831482468030E-01 z2 : 6.23489801858734E-01 -7.81831482468030E-01 z3 : -1.30129898621501E-01 1.63177731615431E-01 z4 : -2.98731911067217E+00 3.74597968072472E+00 z5 : 6.23489801858734E-01 -7.81831482468030E-01 z6 : 6.23489801858733E-01 -7.81831482468030E-01 == err : 4.411E-15 = rco : 1.895E-02 = res : 1.093E-15 == solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -9.00968867902419E-01 -4.33883739117558E-01 z1 : -9.00968867902419E-01 -4.33883739117558E-01 z2 : -9.00968867902419E-01 -4.33883739117558E-01 z3 : 1.88043151775295E-01 9.05568091355542E-02 z4 : 4.31680118773680E+00 2.07886188645224E+00 z5 : -9.00968867902419E-01 -4.33883739117558E-01 z6 : -9.00968867902419E-01 -4.33883739117558E-01 == err : 3.414E-15 = rco : 1.876E-02 = res : 1.373E-15 == solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -2.22520933956314E-01 9.74927912181824E-01 z1 : -2.22520933956315E-01 9.74927912181824E-01 z2 : -2.22520933956314E-01 9.74927912181824E-01 z3 : 4.64428231072460E-02 -2.03479303105326E-01 z4 : 1.06616184667433E+00 -4.67116025780379E+00 z5 : -2.22520933956314E-01 9.74927912181824E-01 z6 : -2.22520933956314E-01 9.74927912181824E-01 == err : 4.547E-15 = rco : 1.713E-02 = res : 1.110E-15 == solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 1.00000000000000E+00 -9.27301537671855E-69 z1 : 1.00000000000000E+00 -7.82410672410628E-69 z2 : 1.00000000000000E+00 4.63650768835928E-69 z3 : -2.08712152522080E-01 9.44876243409917E-70 z4 : -4.79128784747792E+00 2.60803557470209E-69 z5 : 1.00000000000000E+00 3.47738076626946E-69 z6 : 1.00000000000000E+00 0.00000000000000E+00 == err : 3.841E-16 = rco : 1.931E-02 = res : 4.441E-16 == solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -2.22520933956314E-01 -9.74927912181824E-01 z1 : -2.22520933956314E-01 -9.74927912181824E-01 z2 : -2.22520933956315E-01 -9.74927912181824E-01 z3 : 4.64428231072460E-02 2.03479303105326E-01 z4 : 1.06616184667433E+00 4.67116025780379E+00 z5 : -2.22520933956314E-01 -9.74927912181824E-01 z6 : -2.22520933956314E-01 -9.74927912181824E-01 == err : 4.382E-15 = rco : 1.713E-02 = res : 8.882E-16 == solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -9.00968867902419E-01 4.33883739117558E-01 z1 : -9.00968867902419E-01 4.33883739117558E-01 z2 : -9.00968867902419E-01 4.33883739117558E-01 z3 : 1.88043151775295E-01 -9.05568091355542E-02 z4 : 4.31680118773680E+00 -2.07886188645224E+00 z5 : -9.00968867902419E-01 4.33883739117558E-01 z6 : -9.00968867902419E-01 4.33883739117558E-01 == err : 3.414E-15 = rco : 1.876E-02 = res : 1.373E-15 == solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 6.23489801858734E-01 7.81831482468030E-01 z1 : 6.23489801858733E-01 7.81831482468030E-01 z2 : 6.23489801858734E-01 7.81831482468030E-01 z3 : -1.30129898621501E-01 -1.63177731615431E-01 z4 : -2.98731911067217E+00 -3.74597968072472E+00 z5 : 6.23489801858734E-01 7.81831482468030E-01 z6 : 6.23489801858734E-01 7.81831482468030E-01 == err : 4.173E-15 = rco : 1.895E-02 = res : 1.422E-15 == solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 4.98683989663453E-01 2.18487731575197E+00 z1 : 2.71951686409406E-01 1.19149818909847E+00 z2 : 1.82074863011689E-01 7.97722096976399E-01 z3 : 9.92924719364000E-02 4.35028743764536E-01 z4 : -6.47488057698249E-02 -2.83683053558614E-01 z5 : -2.22520933956314E-01 -9.74927912181824E-01 z6 : -7.64733271294809E-01 -3.35051537985093E+00 == err : 4.473E-15 = rco : 2.809E-02 = res : 2.165E-15 == solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 2.01913025269052E+00 9.72361881762186E-01 z1 : 1.10110989861538E+00 5.30266579690896E-01 z2 : 7.37206069939177E-01 3.55019732113556E-01 z3 : 4.02027011307322E-01 1.93606004720654E-01 z4 : -2.62162562394806E-01 -1.26250836050884E-01 z5 : -9.00968867902419E-01 -4.33883739117558E-01 z6 : -3.09634180225517E+00 -1.49111962311885E+00 == err : 4.909E-15 = rco : 3.025E-02 = res : 1.625E-15 == solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 2.01913025269052E+00 -9.72361881762186E-01 z1 : 1.10110989861538E+00 -5.30266579690896E-01 z2 : 7.37206069939177E-01 -3.55019732113556E-01 z3 : 4.02027011307322E-01 -1.93606004720654E-01 z4 : -2.62162562394806E-01 1.26250836050884E-01 z5 : -9.00968867902419E-01 4.33883739117558E-01 z6 : -3.09634180225517E+00 1.49111962311885E+00 == err : 4.909E-15 = rco : 3.025E-02 = res : 1.625E-15 == solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 4.98683989663453E-01 -2.18487731575197E+00 z1 : 2.71951686409406E-01 -1.19149818909847E+00 z2 : 1.82074863011689E-01 -7.97722096976399E-01 z3 : 9.92924719364000E-02 -4.35028743764536E-01 z4 : -6.47488057698249E-02 2.83683053558614E-01 z5 : -2.22520933956314E-01 9.74927912181824E-01 z6 : -7.64733271294809E-01 3.35051537985093E+00 == err : 4.473E-15 = rco : 2.809E-02 = res : 2.165E-15 == solution 33 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -1.39728148887974E+00 -1.75213556760548E+00 z1 : -7.61991692466278E-01 -9.55507359981189E-01 z2 : -5.10162429413949E-01 -6.39723452250741E-01 z3 : -2.78211323999942E-01 -3.48865965784555E-01 z4 : 1.81422122234771E-01 2.27496145656997E-01 z5 : 6.23489801858734E-01 7.81831482468030E-01 z6 : 2.14273501066640E+00 2.68690471749694E+00 == err : 5.144E-15 = rco : 3.019E-02 = res : 1.457E-15 == solution 34 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -2.24106550694846E+00 5.27109897161526E-82 z1 : -1.22213978511701E+00 -6.85242866309984E-81 z2 : -8.18237007073836E-01 6.46533233237184E-82 z3 : -4.46216318487560E-01 1.97666211435572E-82 z4 : 2.90978491859721E-01 -2.63554948580763E-82 z5 : 1.00000000000000E+00 -2.63554948580763E-82 z6 : 3.43668012576714E+00 6.85242866309984E-81 == err : 4.195E-15 = rco : 3.422E-02 = res : 8.882E-16 == solution 35 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -1.39728148887974E+00 1.75213556760548E+00 z1 : -7.61991692466278E-01 9.55507359981189E-01 z2 : -5.10162429413949E-01 6.39723452250741E-01 z3 : -2.78211323999942E-01 3.48865965784555E-01 z4 : 1.81422122234771E-01 -2.27496145656997E-01 z5 : 6.23489801858734E-01 -7.81831482468030E-01 z6 : 2.14273501066640E+00 -2.68690471749694E+00 == err : 5.187E-15 = rco : 3.019E-02 = res : 1.743E-15 == solution 36 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -2.09452437557619E+00 -9.17671088372892E+00 z1 : -2.36404821190821E-02 -1.03575719666237E-01 z2 : 1.71381735631466E+00 7.50872444828425E+00 z3 : 9.92924719364000E-02 4.35028743764536E-01 z4 : -2.22520933956314E-01 -9.74927912181824E-01 z5 : 4.98683989663453E-01 2.18487731575197E+00 z6 : 2.88919737370774E-02 1.26584007776234E-01 == err : 4.452E-15 = rco : 4.333E-03 = res : 2.809E-15 == solution 37 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 9.41270710281754E+00 2.56386253979366E-78 z1 : 1.06239362287250E-01 4.84941105388604E-80 z2 : -7.70182528827206E+00 -9.44580935713455E-79 z3 : -4.46216318487560E-01 -1.68675167091688E-80 z4 : 1.00000000000000E+00 -3.45784092537961E-79 z5 : -2.24106550694846E+00 -1.55181153724353E-78 z6 : -1.29839351396707E-01 5.48194293047987E-80 == err : 5.864E-15 = rco : 2.425E-03 = res : 8.882E-16 == solution 38 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -2.09452437557619E+00 9.17671088372892E+00 z1 : -2.36404821190820E-02 1.03575719666237E-01 z2 : 1.71381735631466E+00 -7.50872444828425E+00 z3 : 9.92924719364000E-02 -4.35028743764536E-01 z4 : -2.22520933956314E-01 9.74927912181824E-01 z5 : 4.98683989663453E-01 -2.18487731575197E+00 z6 : 2.88919737370774E-02 -1.26584007776234E-01 == err : 4.814E-15 = rco : 4.333E-03 = res : 2.809E-15 == solution 39 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -8.48055606232257E+00 -4.08402055298887E+00 z1 : -9.57183579666183E-02 -4.60955317506567E-02 z2 : 6.93910481075670E+00 3.34169675410565E+00 z3 : 4.02027011307322E-01 1.93606004720654E-01 z4 : -9.00968867902419E-01 -4.33883739117558E-01 z5 : 2.01913025269052E+00 9.72361881762185E-01 z6 : 1.16981213437076E-01 5.63351832686018E-02 == err : 6.055E-15 = rco : 2.334E-03 = res : 2.815E-15 == solution 40 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 5.86872688649000E+00 -7.35915074823319E+00 z1 : 6.62391589420755E-02 -8.30612781134985E-02 z2 : -4.80200952293533E+00 6.02152948283950E+00 z3 : -2.78211323999942E-01 3.48865965784555E-01 z4 : 6.23489801858733E-01 -7.81831482468030E-01 z5 : -1.39728148887974E+00 1.75213556760548E+00 z6 : -8.09535114757994E-02 1.01512492585175E-01 == err : 5.446E-15 = rco : 4.767E-03 = res : 1.332E-15 == solution 41 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 5.86872688649000E+00 7.35915074823319E+00 z1 : 6.62391589420755E-02 8.30612781134985E-02 z2 : -4.80200952293533E+00 -6.02152948283950E+00 z3 : -2.78211323999942E-01 -3.48865965784555E-01 z4 : 6.23489801858734E-01 7.81831482468030E-01 z5 : -1.39728148887974E+00 -1.75213556760548E+00 z6 : -8.09535114757994E-02 -1.01512492585175E-01 == err : 7.231E-15 = rco : 4.767E-03 = res : 4.302E-15 == solution 42 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -8.48055606232257E+00 4.08402055298887E+00 z1 : -9.57183579666183E-02 4.60955317506567E-02 z2 : 6.93910481075670E+00 -3.34169675410565E+00 z3 : 4.02027011307322E-01 -1.93606004720654E-01 z4 : -9.00968867902419E-01 4.33883739117558E-01 z5 : 2.01913025269052E+00 -9.72361881762185E-01 z6 : 1.16981213437076E-01 -5.63351832686018E-02 == err : 6.055E-15 = rco : 2.334E-03 = res : 2.815E-15 == solution 43 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -4.80200952293533E+00 6.02152948283950E+00 z1 : 1.81422122234771E-01 -2.27496145656997E-01 z2 : 2.27642801083762E-01 -2.85455043713478E-01 z3 : 1.70767329856746E+00 -2.14135458608923E+00 z4 : 2.14273501066640E+00 -2.68690471749694E+00 z5 : -8.09535114757994E-02 1.01512492585175E-01 z6 : 6.23489801858734E-01 -7.81831482468030E-01 == err : 4.659E-15 = rco : 4.239E-03 = res : 3.938E-15 == solution 44 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 6.93910481075670E+00 3.34169675410564E+00 z1 : -2.62162562394806E-01 -1.26250836050884E-01 z2 : -3.28953378494942E-01 -1.58415597854150E-01 z3 : -2.46765941314644E+00 -1.18836214123281E+00 z4 : -3.09634180225517E+00 -1.49111962311885E+00 z5 : 1.16981213437076E-01 5.63351832686018E-02 z6 : -9.00968867902419E-01 -4.33883739117558E-01 == err : 5.864E-15 = rco : 4.189E-03 = res : 2.809E-15 == solution 45 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 1.71381735631466E+00 -7.50872444828425E+00 z1 : -6.47488057698250E-02 2.83683053558614E-01 z2 : -8.12447750622028E-02 3.55956617288985E-01 z3 : -6.09461543968584E-01 2.67022549318013E+00 z4 : -7.64733271294809E-01 3.35051537985093E+00 z5 : 2.88919737370774E-02 -1.26584007776234E-01 z6 : -2.22520933956314E-01 9.74927912181824E-01 == err : 4.109E-15 = rco : 3.780E-03 = res : 1.986E-15 == solution 46 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -7.70182528827206E+00 -3.70920615068742E-68 z1 : 2.90978491859721E-01 -2.60803557470209E-69 z2 : 3.65110704946766E-01 7.96899758936751E-70 z3 : 2.73889531709513E+00 -1.73869038313473E-68 z4 : 3.43668012576714E+00 3.47738076626946E-68 z5 : -1.29839351396707E-01 3.18759903574700E-69 z6 : 1.00000000000000E+00 7.53432499358383E-69 == err : 4.501E-15 = rco : 4.316E-03 = res : 1.443E-15 == solution 47 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 1.71381735631466E+00 7.50872444828425E+00 z1 : -6.47488057698249E-02 -2.83683053558614E-01 z2 : -8.12447750622028E-02 -3.55956617288985E-01 z3 : -6.09461543968584E-01 -2.67022549318013E+00 z4 : -7.64733271294809E-01 -3.35051537985093E+00 z5 : 2.88919737370774E-02 1.26584007776234E-01 z6 : -2.22520933956314E-01 -9.74927912181824E-01 == err : 3.753E-15 = rco : 3.780E-03 = res : 1.986E-15 == solution 48 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 6.93910481075670E+00 -3.34169675410564E+00 z1 : -2.62162562394806E-01 1.26250836050884E-01 z2 : -3.28953378494942E-01 1.58415597854151E-01 z3 : -2.46765941314644E+00 1.18836214123281E+00 z4 : -3.09634180225517E+00 1.49111962311885E+00 z5 : 1.16981213437076E-01 -5.63351832686018E-02 z6 : -9.00968867902419E-01 4.33883739117558E-01 == err : 5.835E-15 = rco : 4.189E-03 = res : 1.986E-15 == solution 49 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -4.80200952293533E+00 -6.02152948283950E+00 z1 : 1.81422122234771E-01 2.27496145656997E-01 z2 : 2.27642801083762E-01 2.85455043713478E-01 z3 : 1.70767329856746E+00 2.14135458608923E+00 z4 : 2.14273501066640E+00 2.68690471749694E+00 z5 : -8.09535114757994E-02 -1.01512492585175E-01 z6 : 6.23489801858734E-01 7.81831482468030E-01 == err : 4.659E-15 = rco : 4.239E-03 = res : 3.938E-15 == solution 50 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 1.08879611333951E-01 9.94054943268111E-01 z1 : -2.22520933956314E-01 -9.74927912181824E-01 z2 : 3.33207135512255E-01 9.42853649748315E-01 z3 : 9.94442932548583E-01 1.05277034077595E-01 z4 : -7.43653020345663E-01 -6.68565767393735E-01 z5 : 3.79928404850253E-01 -9.25015895640687E-01 z6 : -8.50284129943064E-01 5.26323948122224E-01 == err : 1.654E-15 = rco : 2.108E-02 = res : 8.882E-16 == solution 51 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 9.44903917631570E-01 -3.27347806536888E-01 z1 : -9.00968867902419E-01 4.33883739117558E-01 z2 : 8.45068777247042E-01 -5.34657611675163E-01 z3 : -1.18646851083003E-01 -9.92936515960657E-01 z4 : -4.86325063134662E-01 8.73777965484978E-01 z5 : -9.86365839355786E-01 -1.64567405496826E-01 z6 : 7.02333926597258E-01 7.11847635066997E-01 == err : 2.347E-15 = rco : 1.942E-02 = res : 9.037E-16 == solution 52 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -5.29401415834666E-01 -8.48371463989832E-01 z1 : 6.23489801858733E-01 7.81831482468030E-01 z2 : -7.09298122652920E-01 -7.04908627554695E-01 z3 : -9.41640116320652E-01 3.36621287704192E-01 z4 : 9.60088034855840E-01 2.79697989493404E-01 z5 : 5.90456907418543E-02 9.98255281180529E-01 z6 : 5.37716127351810E-01 -8.43125949301628E-01 == err : 2.400E-15 = rco : 2.107E-02 = res : 9.550E-16 == solution 53 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -7.09298122652920E-01 7.04908627554695E-01 z1 : 6.23489801858733E-01 -7.81831482468030E-01 z2 : -5.29401415834666E-01 8.48371463989832E-01 z3 : 5.37716127351811E-01 8.43125949301628E-01 z4 : 5.90456907418543E-02 -9.98255281180529E-01 z5 : 9.60088034855840E-01 -2.79697989493403E-01 z6 : -9.41640116320652E-01 -3.36621287704193E-01 == err : 1.484E-15 = rco : 2.101E-02 = res : 1.047E-15 == solution 54 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 8.45068777247042E-01 5.34657611675163E-01 z1 : -9.00968867902419E-01 -4.33883739117558E-01 z2 : 9.44903917631569E-01 3.27347806536889E-01 z3 : 7.02333926597258E-01 -7.11847635066999E-01 z4 : -9.86365839355785E-01 1.64567405496825E-01 z5 : -4.86325063134662E-01 -8.73777965484978E-01 z6 : -1.18646851083002E-01 9.92936515960657E-01 == err : 6.971E-16 = rco : 2.015E-02 = res : 7.022E-16 == solution 55 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 3.33207135512255E-01 -9.42853649748315E-01 z1 : -2.22520933956314E-01 9.74927912181824E-01 z2 : 1.08879611333951E-01 -9.94054943268111E-01 z3 : -8.50284129943064E-01 -5.26323948122224E-01 z4 : 3.79928404850253E-01 9.25015895640687E-01 z5 : -7.43653020345662E-01 6.68565767393735E-01 z6 : 9.94442932548582E-01 -1.05277034077595E-01 == err : 8.055E-16 = rco : 1.867E-02 = res : 7.448E-16 == solution 56 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -9.93359903237232E-01 -1.15048262222934E-01 z1 : 1.00000000000000E+00 -2.96345150853299E-17 z2 : -9.93359903237232E-01 1.15048262222934E-01 z3 : -3.23921889150931E-01 9.46083828066462E-01 z4 : 8.17281792388164E-01 -5.76238207541630E-01 z5 : 8.17281792388164E-01 5.76238207541630E-01 z6 : -3.23921889150932E-01 -9.46083828066462E-01 == err : 1.021E-15 = rco : 2.234E-02 = res : 9.155E-16 == solution 57 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -2.22520933956314E-01 9.74927912181824E-01 z1 : 6.23489801858734E-01 -7.81831482468030E-01 z2 : -9.00968867902419E-01 4.33883739117558E-01 z3 : 1.00000000000000E+00 -1.09163032030768E-16 z4 : -9.00968867902419E-01 -4.33883739117558E-01 z5 : 6.23489801858734E-01 7.81831482468030E-01 z6 : -2.22520933956314E-01 -9.74927912181823E-01 == err : 5.713E-16 = rco : 1.510E-01 = res : 4.743E-16 == solution 58 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -7.50000000000000E-01 -6.61437827766148E-01 z1 : 1.00000000000000E+00 5.06085104185183E-17 z2 : -7.50000000000000E-01 6.61437827766148E-01 z3 : -7.50000000000000E-01 -6.61437827766148E-01 z4 : -7.50000000000000E-01 6.61437827766148E-01 z5 : 1.00000000000000E+00 -1.69801715560064E-16 z6 : 1.00000000000000E+00 1.32078189358470E-16 == err : 8.324E-16 = rco : 4.185E-02 = res : 4.965E-16 == solution 59 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 4.95155660487905E-02 -9.98773352026809E-01 z1 : 6.23489801858734E-01 7.81831482468030E-01 z2 : -9.84750268836891E-01 -1.73973871675236E-01 z3 : 4.95155660487904E-02 -9.98773352026809E-01 z4 : -9.84750268836891E-01 -1.73973871675236E-01 z5 : 6.23489801858734E-01 7.81831482468030E-01 z6 : 6.23489801858733E-01 7.81831482468030E-01 == err : 8.079E-16 = rco : 3.918E-02 = res : 6.661E-16 == solution 60 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 8.11744900929367E-01 -5.84012170947809E-01 z1 : -2.22520933956315E-01 9.74927912181824E-01 z2 : -4.77963499994895E-01 -8.78379697324927E-01 z3 : 8.11744900929367E-01 -5.84012170947809E-01 z4 : -4.77963499994895E-01 -8.78379697324927E-01 z5 : -2.22520933956314E-01 9.74927912181824E-01 z6 : -2.22520933956315E-01 9.74927912181824E-01 == err : 6.617E-16 = rco : 4.059E-02 = res : 7.109E-16 == solution 61 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 9.62713768831786E-01 2.70522086532133E-01 z1 : -9.00968867902419E-01 4.33883739117558E-01 z2 : 3.88739533021843E-01 -9.21347695208470E-01 z3 : 9.62713768831786E-01 2.70522086532133E-01 z4 : 3.88739533021843E-01 -9.21347695208470E-01 z5 : -9.00968867902419E-01 4.33883739117558E-01 z6 : -9.00968867902419E-01 4.33883739117558E-01 == err : 5.862E-16 = rco : 3.698E-02 = res : 7.550E-16 == solution 62 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 3.88739533021843E-01 9.21347695208470E-01 z1 : -9.00968867902419E-01 -4.33883739117558E-01 z2 : 9.62713768831786E-01 -2.70522086532133E-01 z3 : 3.88739533021843E-01 9.21347695208470E-01 z4 : 9.62713768831786E-01 -2.70522086532133E-01 z5 : -9.00968867902419E-01 -4.33883739117558E-01 z6 : -9.00968867902419E-01 -4.33883739117558E-01 == err : 5.453E-16 = rco : 4.007E-02 = res : 4.578E-16 == solution 63 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -4.77963499994895E-01 8.78379697324927E-01 z1 : -2.22520933956314E-01 -9.74927912181823E-01 z2 : 8.11744900929367E-01 5.84012170947809E-01 z3 : -4.77963499994895E-01 8.78379697324927E-01 z4 : 8.11744900929367E-01 5.84012170947809E-01 z5 : -2.22520933956314E-01 -9.74927912181824E-01 z6 : -2.22520933956315E-01 -9.74927912181824E-01 == err : 6.390E-16 = rco : 4.065E-02 = res : 1.047E-15 == solution 64 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -9.84750268836891E-01 1.73973871675236E-01 z1 : 6.23489801858734E-01 -7.81831482468030E-01 z2 : 4.95155660487904E-02 9.98773352026809E-01 z3 : -9.84750268836891E-01 1.73973871675236E-01 z4 : 4.95155660487905E-02 9.98773352026809E-01 z5 : 6.23489801858733E-01 -7.81831482468030E-01 z6 : 6.23489801858734E-01 -7.81831482468030E-01 == err : 9.220E-16 = rco : 4.157E-02 = res : 5.551E-16 == solution 65 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 1.00000000000000E+00 -2.89246087392537E-17 z1 : -2.22520933956314E-01 -9.74927912181824E-01 z2 : -9.00968867902419E-01 4.33883739117558E-01 z3 : 6.23489801858734E-01 7.81831482468030E-01 z4 : 6.23489801858734E-01 -7.81831482468030E-01 z5 : -9.00968867902419E-01 -4.33883739117558E-01 z6 : -2.22520933956315E-01 9.74927912181824E-01 == err : 6.303E-16 = rco : 9.831E-02 = res : 4.124E-16 == solution 66 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 6.23489801858734E-01 7.81831482468030E-01 z1 : 1.00000000000000E+00 -6.67389580099766E-17 z2 : 6.23489801858734E-01 -7.81831482468030E-01 z3 : -2.22520933956314E-01 -9.74927912181824E-01 z4 : -9.00968867902419E-01 -4.33883739117558E-01 z5 : -9.00968867902419E-01 4.33883739117558E-01 z6 : -2.22520933956314E-01 9.74927912181824E-01 == err : 6.129E-16 = rco : 2.328E-01 = res : 4.003E-16 == SHAR_EOF fi # end of overwriting check if test -f 'cyclic8' then echo shar: will not over-write existing file "'cyclic8'" else cat << "SHAR_EOF" > 'cyclic8' 8 z0 + z1 + z2 + z3 + z4 + z5 + z6 + z7; z0*z1 + z1*z2 + z2*z3 + z3*z4 + z4*z5 + z5*z6 + z6*z7 + z7*z0; z0*z1*z2 + z1*z2*z3 + z2*z3*z4 + z3*z4*z5 + z4*z5*z6 + z5*z6*z7 + z6*z7*z0 + z7*z0*z1; z0*z1*z2*z3 + z1*z2*z3*z4 + z2*z3*z4*z5 + z3*z4*z5*z6 + z4*z5*z6*z7 + z5*z6*z7*z0 + z6*z7*z0*z1 + z7*z0*z1*z2; z0*z1*z2*z3*z4 + z1*z2*z3*z4*z5 + z2*z3*z4*z5*z6 + z3*z4*z5*z6*z7 + z4*z5*z6*z7*z0 + z5*z6*z7*z0*z1 + z6*z7*z0*z1*z2 + z7*z0*z1*z2*z3; z0*z1*z2*z3*z4*z5 + z1*z2*z3*z4*z5*z6 + z2*z3*z4*z5*z6*z7 + z3*z4*z5*z6*z7*z0 + z4*z5*z6*z7*z0*z1 + z5*z6*z7*z0*z1*z2 + z6*z7*z0*z1*z2*z3 + z7*z0*z1*z2*z3*z4; z0*z1*z2*z3*z4*z5*z6 + z1*z2*z3*z4*z5*z6*z7 + z2*z3*z4*z5*z6*z7*z0 + z3*z4*z5*z6*z7*z0*z1 + z4*z5*z6*z7*z0*z1*z2 + z5*z6*z7*z0*z1*z2*z3 + z6*z7*z0*z1*z2*z3*z4 + z7*z0*z1*z2*z3*z4*z5; z0*z1*z2*z3*z4*z5*z6*z7 - 1; TITLE : cyclic 8-roots problem ROOT COUNTS : total degree : 8! = 40320 bound based on set structure analysis : 20352 with set structure : {z0 z1 z2 z3 z4 z5 z6 z7 } {z0 z2 z4 z6 }{z1 z3 z5 z7 } {z0 z4 }{z1 z5 }{z2 z6 }{z3 z7 } {z0 z4 }{z1 z5 }{z2 z6 }{z3 z7 } {z0 }{z1 }{z2 }{z3 }{z4 }{z5 }{z6 }{z7 } {z0 }{z1 }{z2 }{z3 }{z4 }{z5 }{z6 }{z7 } {z0 }{z1 }{z2 }{z3 }{z4 }{z5 }{z6 }{z7 } {z0 }{z1 }{z2 }{z3 }{z4 }{z5 }{z6 }{z7 } mixed volume : 2560 = 320*8 = 160*16 REFERENCES : G\"oran Bj\"ork and Ralf Fr\"oberg: `A faster way to count the solutions of inhomogeneous systems of algebraic equations, with applications to cyclic n-roots', in J. Symbolic Computation (1991) 12, pp 329-336. G. Bj\"{o}rk and R. Fr\"{o}berg, R.: "Methods to ``divide out'' certain solutions from systems of algebraic equations, applied to find all cyclic 8-roots " , In: Analysis, Algebra and Computers in Math. research, M. Gyllenberg and L.E.Persson eds., Lect. Notes in Applied Math. vol. 564, pp 57-70, Dekker, 1994. NOTE : The list of generating solutions contains also 36 singular solutions, that are not isolated. There are 72*16 = 1152 isolated regular solutions. THE GENERATING SOLUTIONS : 108 8 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 9.23879532511287E-01 -3.82683432365090E-01 z1 : 3.52406229691418E-01 9.35847129222866E-01 z2 : 8.91867121275053E-01 4.52297510482370E-01 z3 : -8.72025885096329E-01 -4.89459759042522E-01 z4 : -9.23879532511287E-01 3.82683432365089E-01 z5 : -2.70515101984913E-01 9.62715731458717E-01 z6 : 3.10822652595037E-01 -9.50467926146793E-01 z7 : -4.12555016480266E-01 -9.10932685974638E-01 == err : 1.116E-15 = rco : 3.921E-02 = res : 5.237E-16 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -6.43594252905583E-01 7.65366864730180E-01 z1 : -9.63206867716885E-01 2.68761102064691E-01 z2 : 9.63206867716885E-01 2.68761102064691E-01 z3 : 6.43594252905583E-01 7.65366864730180E-01 z4 : -6.43594252905583E-01 -7.65366864730180E-01 z5 : -9.63206867716885E-01 -2.68761102064691E-01 z6 : 9.63206867716885E-01 -2.68761102064691E-01 z7 : 6.43594252905583E-01 -7.65366864730180E-01 == err : 7.580E-16 = rco : 1.274E-01 = res : 1.378E-15 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -3.33333333333333E-01 9.42809041582063E-01 z1 : -1.00000000000000E+00 -5.44323984047672E-17 z2 : -1.00000000000000E+00 7.51420126215849E-17 z3 : 1.00000000000000E+00 1.41388005847489E-17 z4 : -3.33333333333333E-01 -9.42809041582064E-01 z5 : 3.33333333333333E-01 -9.42809041582063E-01 z6 : 3.33333333333333E-01 9.42809041582064E-01 z7 : 1.00000000000000E+00 2.28855443530215E-18 == err : 7.401E-16 = rco : 3.581E-02 = res : 4.484E-16 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -7.65366864730180E-01 -6.43594252905583E-01 z1 : -2.68761102064691E-01 -9.63206867716885E-01 z2 : -2.68761102064691E-01 9.63206867716885E-01 z3 : -7.65366864730180E-01 6.43594252905583E-01 z4 : 7.65366864730180E-01 -6.43594252905583E-01 z5 : 2.68761102064691E-01 -9.63206867716885E-01 z6 : 2.68761102064691E-01 9.63206867716885E-01 z7 : 7.65366864730179E-01 6.43594252905583E-01 == err : 7.251E-16 = rco : 1.667E-01 = res : 6.087E-16 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.12633161969683E+00 2.71920507200175E+00 z1 : 3.82683432365090E-01 -9.23879532511287E-01 z2 : -1.30020863168295E-01 3.13898131252354E-01 z3 : 5.09709953396439E+00 -1.23054868236624E+01 z4 : -3.82241952894593E-02 9.22813706786104E-02 z5 : -3.82683432365090E-01 9.23879532511287E-01 z6 : -3.83125421732843E+00 9.24946589237340E+00 z7 : 2.87313615186211E-02 -6.93636426436996E-02 == err : 1.795E-14 = rco : 1.260E-03 = res : 2.583E-15 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 3.82683432365090E-01 9.23879532511287E-01 z1 : 8.76671142655794E-01 4.81090124233064E-01 z2 : -5.81579360246291E-01 -8.13489672789713E-01 z3 : 9.80601882939922E-01 -1.96010069064527E-01 z4 : -3.82683432365090E-01 -9.23879532511287E-01 z5 : -8.31990290087486E-01 5.54790192054745E-01 z6 : -1.63985354626545E-01 -9.86462773483119E-01 z7 : -2.79718020635393E-01 9.60082199049549E-01 == err : 7.038E-16 = rco : 4.502E-02 = res : 9.421E-16 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 8.46611438391424E-01 2.04390081662477E+00 z1 : -1.73179506874628E+00 -4.18092314221812E+00 z2 : -3.82683432365090E-01 -9.23879532511287E-01 z3 : -8.45634752342521E-02 -2.04154288791933E-01 z4 : 1.72979719816894E-01 4.17609985597444E-01 z5 : 2.87645454906416E-01 6.94437558390047E-01 z6 : 3.82683432365090E-01 9.23879532511287E-01 z7 : 5.09121930865802E-01 1.22912907039780E+00 == err : 5.866E-15 = rco : 1.200E-02 = res : 1.056E-15 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -4.55089796082886E-01 -4.55089808294726E-01 z1 : -2.65245846331099E+00 -2.65245839213517E+00 z2 : 4.55089849058192E-01 4.55089823221073E-01 z3 : -4.55089743107580E-01 -4.55089793368379E-01 z4 : 2.65245846331099E+00 2.65245839213517E+00 z5 : 4.55089796082886E-01 4.55089808294726E-01 z6 : 4.55089872066263E-01 4.55089897903381E-01 z7 : -4.55089978016875E-01 -4.55089927756075E-01 == err : 4.834E-07 = rco : 1.338E-08 = res : 1.640E-13 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.00000000000000E+00 -1.21543267145725E-63 z1 : 1.00000000000000E+00 6.07716335728627E-63 z2 : -5.82842712474619E+00 -2.67395187720596E-62 z3 : -1.71572875253810E-01 6.07716335728627E-64 z4 : 1.00000000000000E+00 9.72346137165803E-63 z5 : 1.00000000000000E+00 -9.72346137165803E-63 z6 : 1.00000000000000E+00 8.50802870020078E-63 z7 : 1.00000000000000E+00 0.00000000000000E+00 == err : 1.513E-16 = rco : 9.599E-03 = res : 8.882E-16 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -7.07106781186548E-01 7.07106781186547E-01 z1 : -9.02368927062183E-01 -4.30964406271151E-01 z2 : 4.30964406271151E-01 9.02368927062182E-01 z3 : 9.02368927062182E-01 4.30964406271151E-01 z4 : -7.07106781186548E-01 7.07106781186548E-01 z5 : 7.07106781186548E-01 -7.07106781186548E-01 z6 : 7.07106781186548E-01 -7.07106781186548E-01 z7 : -4.30964406271151E-01 -9.02368927062182E-01 == err : 9.257E-16 = rco : 2.693E-02 = res : 6.956E-16 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -4.54362834171248E-08 -1.55377372731884E+00 z1 : -7.57438932408027E-08 1.55377386889903E+00 z2 : 1.51538048887316E-08 1.55377414995114E+00 z3 : -2.59998187250919E-09 2.66585438035582E-01 z4 : 4.54362834633503E-08 -1.55377422074124E+00 z5 : 7.57438931945772E-08 1.55377407916105E+00 z6 : 2.59998187250919E-09 -2.66585438035582E-01 z7 : -1.51538048887316E-08 -1.55377414995114E+00 == err : 2.504E-07 = rco : 8.332E-09 = res : 1.260E-13 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 2.04390081662477E+00 -8.46611438391424E-01 z1 : -4.18092314221812E+00 1.73179506874628E+00 z2 : -9.23879532511287E-01 3.82683432365090E-01 z3 : -2.04154288791933E-01 8.45634752342521E-02 z4 : 4.17609985597444E-01 -1.72979719816894E-01 z5 : 6.94437558390047E-01 -2.87645454906416E-01 z6 : 9.23879532511287E-01 -3.82683432365090E-01 z7 : 1.22912907039780E+00 -5.09121930865802E-01 == err : 5.866E-15 = rco : 1.200E-02 = res : 1.056E-15 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 4.89459759042523E-01 -8.72025885096329E-01 z1 : -4.52297510482370E-01 8.91867121275053E-01 z2 : -9.35847129222866E-01 3.52406229691418E-01 z3 : 3.82683432365090E-01 9.23879532511287E-01 z4 : 9.10932685974637E-01 -4.12555016480266E-01 z5 : 9.50467926146792E-01 3.10822652595038E-01 z6 : -9.62715731458717E-01 -2.70515101984913E-01 z7 : -3.82683432365090E-01 -9.23879532511287E-01 == err : 6.627E-16 = rco : 3.223E-02 = res : 8.951E-16 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 9.42809041582063E-01 -3.33333333333333E-01 z1 : -9.42809041582063E-01 -3.33333333333333E-01 z2 : 2.48450158922611E-18 -1.00000000000000E+00 z3 : -9.42809041582063E-01 3.33333333333333E-01 z4 : 1.38195496603460E-17 1.00000000000000E+00 z5 : 5.64046412950889E-17 1.00000000000000E+00 z6 : 3.61537493426347E-17 -1.00000000000000E+00 z7 : 9.42809041582064E-01 3.33333333333333E-01 == err : 6.212E-16 = rco : 3.765E-02 = res : 6.661E-16 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -9.02368927062182E-01 -4.30964406271150E-01 z1 : 4.30964406271151E-01 9.02368927062182E-01 z2 : -7.07106781186548E-01 7.07106781186548E-01 z3 : 9.02368927062182E-01 4.30964406271151E-01 z4 : 7.07106781186548E-01 -7.07106781186548E-01 z5 : 7.07106781186547E-01 -7.07106781186547E-01 z6 : -7.07106781186547E-01 7.07106781186548E-01 z7 : -4.30964406271151E-01 -9.02368927062183E-01 == err : 8.503E-16 = rco : 4.013E-02 = res : 1.166E-15 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 9.62715731458717E-01 -2.70515101984913E-01 z1 : -9.50467926146792E-01 3.10822652595038E-01 z2 : -9.10932685974638E-01 -4.12555016480266E-01 z3 : -3.82683432365090E-01 9.23879532511287E-01 z4 : 9.35847129222866E-01 3.52406229691418E-01 z5 : 4.52297510482370E-01 8.91867121275053E-01 z6 : -4.89459759042523E-01 -8.72025885096329E-01 z7 : 3.82683432365090E-01 -9.23879532511287E-01 == err : 7.952E-16 = rco : 3.374E-02 = res : 7.216E-16 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -7.65366864730180E-01 6.43594252905583E-01 z1 : 9.02811773189119E-01 -4.30035931279141E-01 z2 : 9.02811773189119E-01 4.30035931279141E-01 z3 : -7.65366864730180E-01 -6.43594252905583E-01 z4 : 7.65366864730180E-01 6.43594252905583E-01 z5 : -9.02811773189119E-01 -4.30035931279141E-01 z6 : -9.02811773189119E-01 4.30035931279141E-01 z7 : 7.65366864730180E-01 -6.43594252905583E-01 == err : 7.457E-16 = rco : 1.727E-01 = res : 5.551E-16 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -9.50467926146792E-01 -3.10822652595038E-01 z1 : 9.62715731458717E-01 2.70515101984914E-01 z2 : 3.82683432365090E-01 9.23879532511287E-01 z3 : -4.89459759042523E-01 8.72025885096329E-01 z4 : 4.52297510482370E-01 -8.91867121275053E-01 z5 : 9.35847129222866E-01 -3.52406229691418E-01 z6 : -3.82683432365090E-01 -9.23879532511287E-01 z7 : -9.10932685974637E-01 4.12555016480266E-01 == err : 9.049E-16 = rco : 3.361E-02 = res : 9.014E-16 == solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 6.43594252905583E-01 7.65366864730180E-01 z1 : -4.30035931279141E-01 -9.02811773189119E-01 z2 : 4.30035931279141E-01 -9.02811773189119E-01 z3 : -6.43594252905583E-01 7.65366864730180E-01 z4 : 6.43594252905583E-01 -7.65366864730180E-01 z5 : -4.30035931279141E-01 9.02811773189119E-01 z6 : 4.30035931279141E-01 9.02811773189119E-01 z7 : -6.43594252905583E-01 -7.65366864730180E-01 == err : 6.990E-16 = rco : 1.727E-01 = res : 6.661E-16 == solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -9.96285960708424E-01 -8.61062395839697E-02 z1 : 9.42465650118430E-01 3.34303003795725E-01 z2 : 3.34303003795725E-01 9.42465650118430E-01 z3 : -8.61062395839696E-02 -9.96285960708424E-01 z4 : 8.61062395839696E-02 9.96285960708425E-01 z5 : -3.34303003795725E-01 -9.42465650118430E-01 z6 : -9.42465650118431E-01 -3.34303003795725E-01 z7 : 9.96285960708424E-01 8.61062395839696E-02 == err : 5.444E-16 = rco : 1.843E-01 = res : 6.685E-16 == solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -2.09868401921292E+00 4.55089880650539E-01 z1 : 4.55089917887853E-01 -2.09868419093585E+00 z2 : 4.55089851109627E-01 -9.86841442443102E-02 z3 : 2.09868415705925E+00 -4.55089718633880E-01 z4 : 9.86841050814692E-02 -4.55089878836027E-01 z5 : -4.55089847403522E-01 9.86840982654772E-02 z6 : -4.55090103798619E-01 2.09868408755212E+00 z7 : -9.86840607231331E-02 4.55089866181923E-01 == err : 2.464E-07 = rco : 3.404E-09 = res : 5.053E-14 == solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -2.65245771581878E+00 2.65245839047795E+00 z1 : 4.55089922329370E-01 -4.55089855690928E-01 z2 : -4.55089926335178E-01 4.55089761467192E-01 z3 : 2.65245771581878E+00 -2.65245839047795E+00 z4 : 4.55089924332274E-01 -4.55089808579060E-01 z5 : 4.55089798795085E-01 -4.55089865433526E-01 z6 : -4.55089794789277E-01 4.55089959657263E-01 z7 : -4.55089924332274E-01 4.55089808579060E-01 == err : 4.793E-07 = rco : 1.216E-08 = res : 1.581E-13 == solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -4.90939950721154E-08 -3.75114262114129E+00 z1 : 8.42319788644279E-09 -6.43594180814842E-01 z2 : -3.78882243750293E-08 -6.43594355105084E-01 z3 : -2.10418285997484E-08 6.43594294887563E-01 z4 : -8.42319788644277E-09 6.43594180814842E-01 z5 : 4.90939950721154E-08 3.75114262114129E+00 z6 : 3.78882243726359E-08 -6.43594150706082E-01 z7 : 2.10418286021418E-08 6.43594210923602E-01 == err : 4.232E-07 = rco : 1.152E-08 = res : 1.241E-13 == solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -7.07106781186548E-01 -7.07106781186548E-01 z1 : 4.12132034355964E+00 4.12132034355964E+00 z2 : 1.21320343559643E-01 1.21320343559643E-01 z3 : -7.07106781186548E-01 -7.07106781186548E-01 z4 : -7.07106781186548E-01 -7.07106781186548E-01 z5 : -7.07106781186548E-01 -7.07106781186548E-01 z6 : -7.07106781186548E-01 -7.07106781186548E-01 z7 : -7.07106781186548E-01 -7.07106781186547E-01 == err : 3.301E-15 = rco : 9.913E-03 = res : 1.404E-15 == solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -3.75114221445076E+00 -4.35518870865890E-07 z1 : -6.43594250591905E-01 7.47232249051920E-08 z2 : -6.43594269810060E-01 -1.69397735047196E-07 z3 : 6.43594240628461E-01 -1.99512852382499E-08 z4 : 6.43594250591905E-01 -7.47232249051919E-08 z5 : 3.75114221445076E+00 4.35518870865890E-07 z6 : -6.43594236001105E-01 1.69397735048624E-07 z7 : 6.43594265182704E-01 1.99512852368221E-08 == err : 4.355E-07 = rco : 1.027E-08 = res : 2.151E-13 == solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.78940420671098E-08 -1.00000010356659E+00 z1 : 1.78940421144863E-08 -9.99999896433413E-01 z2 : -1.00000004918262E+00 9.96105635621212E-09 z3 : -9.99999950817385E-01 -9.96105618931202E-09 z4 : -1.17341700470943E-08 9.99999978172029E-01 z5 : 1.17341700053134E-08 1.00000002182797E+00 z6 : 1.00000003255600E+00 3.80118419396644E-09 z7 : 9.99999967443999E-01 -3.80118425082557E-09 == err : 1.048E-07 = rco : 1.250E-08 = res : 2.298E-14 == solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 7.07106781186548E-01 7.07106781186548E-01 z1 : 7.07106781186548E-01 7.07106781186548E-01 z2 : 9.02368927062183E-01 -4.30964406271151E-01 z3 : -7.07106781186547E-01 -7.07106781186548E-01 z4 : 4.30964406271151E-01 -9.02368927062183E-01 z5 : -9.02368927062183E-01 4.30964406271151E-01 z6 : -4.30964406271151E-01 9.02368927062182E-01 z7 : -7.07106781186548E-01 -7.07106781186547E-01 == err : 7.533E-16 = rco : 3.860E-02 = res : 8.083E-16 == solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -3.82683432365090E-01 9.23879532511287E-01 z1 : -1.73179506874628E+00 4.18092314221812E+00 z2 : 8.46611438391424E-01 -2.04390081662477E+00 z3 : 5.09121930865802E-01 -1.22912907039780E+00 z4 : 3.82683432365090E-01 -9.23879532511287E-01 z5 : 2.87645454906416E-01 -6.94437558390047E-01 z6 : 1.72979719816894E-01 -4.17609985597444E-01 z7 : -8.45634752342521E-02 2.04154288791933E-01 == err : 5.761E-15 = rco : 1.260E-02 = res : 2.701E-15 == solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -9.58650325538158E-01 -9.58650325538158E-01 z1 : -2.40524707834419E+00 -2.40524707834419E+00 z2 : 2.40524707834419E+00 2.40524707834419E+00 z3 : 9.58650325538158E-01 9.58650325538158E-01 z4 : 5.21566609513552E-01 5.21566609513552E-01 z5 : 2.07878851408567E-01 2.07878851408567E-01 z6 : -2.07878851408567E-01 -2.07878851408567E-01 z7 : -5.21566609513552E-01 -5.21566609513552E-01 == err : 4.939E-15 = rco : 2.178E-02 = res : 2.512E-15 == solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 3.82683432365090E-01 -9.23879532511287E-01 z1 : 1.73179506874628E+00 -4.18092314221812E+00 z2 : -8.46611438391424E-01 2.04390081662477E+00 z3 : -5.09121930865802E-01 1.22912907039780E+00 z4 : -3.82683432365090E-01 9.23879532511287E-01 z5 : -2.87645454906416E-01 6.94437558390047E-01 z6 : -1.72979719816894E-01 4.17609985597444E-01 z7 : 8.45634752342521E-02 -2.04154288791933E-01 == err : 5.761E-15 = rco : 1.260E-02 = res : 2.701E-15 == solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 9.99999998026740E-01 4.88412983343476E-09 z1 : 1.71622527368305E-08 -9.99999911703050E-01 z2 : -1.71622526262534E-08 -1.00000008829695E+00 z3 : -9.99999919277846E-01 -1.59510695312325E-08 z4 : -1.00000008072215E+00 1.59510694774992E-08 z5 : 6.09531312758212E-09 1.00000000954806E+00 z6 : -6.09531300385727E-09 9.99999990451943E-01 z7 : 1.00000000197326E+00 -4.88412990422813E-09 == err : 9.064E-08 = rco : 1.295E-08 = res : 2.111E-14 == solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 9.23879532511287E-01 3.82683432365090E-01 z1 : 1.22912907039780E+00 5.09121930865802E-01 z2 : 2.04390081662477E+00 8.46611438391424E-01 z3 : -4.18092314221812E+00 -1.73179506874628E+00 z4 : -9.23879532511287E-01 -3.82683432365090E-01 z5 : -2.04154288791933E-01 -8.45634752342521E-02 z6 : 4.17609985597444E-01 1.72979719816894E-01 z7 : 6.94437558390047E-01 2.87645454906416E-01 == err : 5.711E-15 = rco : 1.200E-02 = res : 3.655E-15 == solution 33 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -9.23879532511287E-01 3.82683432365090E-01 z1 : -1.22912907039780E+00 5.09121930865802E-01 z2 : -2.04390081662477E+00 8.46611438391424E-01 z3 : 4.18092314221812E+00 -1.73179506874628E+00 z4 : 9.23879532511287E-01 -3.82683432365090E-01 z5 : 2.04154288791933E-01 -8.45634752342521E-02 z6 : -4.17609985597444E-01 1.72979719816894E-01 z7 : -6.94437558390047E-01 2.87645454906416E-01 == err : 5.711E-15 = rco : 1.200E-02 = res : 3.655E-15 == solution 34 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -9.23879532511287E-01 -3.82683432365090E-01 z1 : -1.22912907039780E+00 -5.09121930865802E-01 z2 : -2.04390081662477E+00 -8.46611438391424E-01 z3 : 4.18092314221813E+00 1.73179506874628E+00 z4 : 9.23879532511287E-01 3.82683432365090E-01 z5 : 2.04154288791933E-01 8.45634752342521E-02 z6 : -4.17609985597444E-01 -1.72979719816894E-01 z7 : -6.94437558390047E-01 -2.87645454906416E-01 == err : 5.828E-15 = rco : 1.200E-02 = res : 3.331E-15 == solution 35 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -3.82683432365090E-01 -9.23879532511287E-01 z1 : -5.09121930865802E-01 -1.22912907039780E+00 z2 : -8.46611438391424E-01 -2.04390081662477E+00 z3 : 1.73179506874628E+00 4.18092314221812E+00 z4 : 3.82683432365090E-01 9.23879532511287E-01 z5 : 8.45634752342521E-02 2.04154288791933E-01 z6 : -1.72979719816894E-01 -4.17609985597444E-01 z7 : -2.87645454906416E-01 -6.94437558390047E-01 == err : 5.711E-15 = rco : 1.200E-02 = res : 3.655E-15 == solution 36 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -9.62715731458717E-01 2.70515101984913E-01 z1 : 9.50467926146792E-01 -3.10822652595038E-01 z2 : 9.10932685974638E-01 4.12555016480266E-01 z3 : 3.82683432365090E-01 -9.23879532511287E-01 z4 : -9.35847129222866E-01 -3.52406229691418E-01 z5 : -4.52297510482370E-01 -8.91867121275053E-01 z6 : 4.89459759042523E-01 8.72025885096329E-01 z7 : -3.82683432365090E-01 9.23879532511287E-01 == err : 7.952E-16 = rco : 3.374E-02 = res : 7.216E-16 == solution 37 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -4.55089766261880E-01 -2.09868428758893E+00 z1 : 2.09868399404678E+00 4.55089702608633E-01 z2 : 9.86840802945147E-02 4.55089867640841E-01 z3 : 4.55090013543592E-01 2.09868408082420E+00 z4 : 4.55089833368041E-01 9.86841411356636E-02 z5 : -9.86841499147301E-02 -4.55089873853424E-01 z6 : -2.09868415311040E+00 -4.55089422254102E-01 z7 : -4.55089851965917E-01 -9.86842085128825E-02 == err : 4.403E-07 = rco : 5.496E-09 = res : 1.935E-13 == solution 38 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -3.75114209661916E+00 4.79568647160308E-07 z1 : -6.43594270808611E-01 -8.22809716693889E-08 z2 : -6.43594235421337E-01 1.64094700065461E-07 z3 : 6.43594234583772E-01 -4.67243275576930E-10 z4 : 6.43594270808611E-01 8.22809716693889E-08 z5 : 3.75114209661916E+00 -4.79568647160308E-07 z6 : -6.43594270389828E-01 -1.64094700063192E-07 z7 : 6.43594271227393E-01 4.67243273308093E-10 == err : 4.906E-07 = rco : 1.413E-08 = res : 2.053E-13 == solution 39 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -4.55089814331784E-01 2.09868416287812E+00 z1 : 2.09868408764483E+00 -4.55089798017795E-01 z2 : 9.86841086064015E-02 -4.55089813711141E-01 z3 : 4.55089882981010E-01 -2.09868432952543E+00 z4 : 4.55089878604822E-01 -9.86840998284796E-02 z5 : -9.86840935800806E-02 4.55089849789819E-01 z6 : -2.09868421037735E+00 4.55089930005557E-01 z7 : -4.55089839547846E-01 9.86840984093480E-02 == err : 2.162E-07 = rco : 2.839E-09 = res : 5.191E-14 == solution 40 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -9.42809041582063E-01 -3.33333333333334E-01 z1 : 9.42809041582064E-01 -3.33333333333333E-01 z2 : -1.56815194503985E-16 -1.00000000000000E+00 z3 : 9.42809041582063E-01 3.33333333333333E-01 z4 : 1.51746139997604E-16 1.00000000000000E+00 z5 : -1.31933683703550E-16 1.00000000000000E+00 z6 : -1.08261501868312E-16 -1.00000000000000E+00 z7 : -9.42809041582064E-01 3.33333333333333E-01 == err : 1.098E-15 = rco : 3.765E-02 = res : 7.419E-16 == solution 41 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 4.55089735316983E-01 2.09868405149143E+00 z1 : -2.09868422175574E+00 -4.55089772238004E-01 z2 : -9.86840984934792E-02 -4.55089818556228E-01 z3 : -4.55089929617578E-01 -2.09868430718191E+00 z4 : -4.55089846095894E-01 -9.86840800902626E-02 z5 : 9.86840890803947E-02 4.55089887554623E-01 z6 : 2.09868449338673E+00 4.55089943547523E-01 z7 : 4.55089778178582E-01 9.86840954728356E-02 == err : 3.896E-07 = rco : 4.810E-09 = res : 1.499E-13 == solution 42 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.16219673325424E+00 1.80579091551375E+00 z1 : -1.16219666066578E+00 -1.80579080272769E+00 z2 : 2.52016891805636E-01 -3.91577273032970E-01 z3 : 1.16219677464849E+00 -1.80579116788270E+00 z4 : -2.52016951827752E-01 -3.91577328655640E-01 z5 : -2.52016936849173E-01 3.91577305382313E-01 z6 : 1.16219671040664E+00 1.80579105358506E+00 z7 : 2.52016905736183E-01 3.91577297817881E-01 == err : 3.035E-07 = rco : 4.047E-09 = res : 1.017E-13 == solution 43 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.06520474836866E-09 -2.66585499194977E-01 z1 : -6.20846819765530E-09 -1.55377379348807E+00 z2 : 5.33543394882677E-08 -1.55377423323145E+00 z3 : 4.09374032164142E-08 1.55377407591256E+00 z4 : 6.20846819765530E-09 1.55377379348807E+00 z5 : -1.06520474836866E-09 2.66585499194977E-01 z6 : -5.33543396117349E-08 -1.55377371482862E+00 z7 : -4.09374030929470E-08 1.55377387214751E+00 == err : 2.654E-07 = rco : 9.653E-09 = res : 1.212E-13 == solution 44 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -4.50775592640477E-02 -4.50775592640477E-02 z1 : -1.10919936252800E+01 -1.10919936252800E+01 z2 : -2.07878851408567E-01 -2.07878851408567E-01 z3 : 2.07878851408567E-01 2.07878851408567E-01 z4 : 1.10919936252800E+01 1.10919936252800E+01 z5 : 4.50775592640477E-02 4.50775592640477E-02 z6 : 2.40524707834419E+00 2.40524707834419E+00 z7 : -2.40524707834419E+00 -2.40524707834419E+00 == err : 6.033E-14 = rco : 6.385E-04 = res : 5.329E-15 == solution 45 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 3.33333333333333E-01 -9.42809041582064E-01 z1 : 1.00000000000000E+00 6.74730605314265E-17 z2 : 1.00000000000000E+00 -8.58734166449800E-17 z3 : -1.00000000000000E+00 5.08954648636300E-17 z4 : 3.33333333333333E-01 9.42809041582063E-01 z5 : -3.33333333333333E-01 9.42809041582064E-01 z6 : -3.33333333333333E-01 -9.42809041582063E-01 z7 : -1.00000000000000E+00 -2.03326710809610E-16 == err : 1.058E-15 = rco : 4.758E-02 = res : 4.965E-16 == solution 46 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -3.91577345860177E-01 -2.52016950379346E-01 z1 : -1.80579077670246E+00 1.16219682765026E+00 z2 : -3.91577357858581E-01 2.52016880312450E-01 z3 : -1.80579104251650E+00 -1.16219663953768E+00 z4 : 1.80579083542035E+00 -1.16219650625178E+00 z5 : 3.91577287700386E-01 2.52016990836492E-01 z6 : 1.80579110024272E+00 1.16219631795960E+00 z7 : 3.91577299574271E-01 -2.52016920590003E-01 == err : 3.840E-07 = rco : 5.432E-09 = res : 1.297E-13 == solution 47 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -8.91867121275053E-01 4.52297510482370E-01 z1 : 8.72025885096329E-01 -4.89459759042523E-01 z2 : 9.23879532511287E-01 3.82683432365090E-01 z3 : 2.70515101984914E-01 9.62715731458717E-01 z4 : -3.10822652595038E-01 -9.50467926146793E-01 z5 : 4.12555016480266E-01 -9.10932685974637E-01 z6 : -9.23879532511286E-01 -3.82683432365090E-01 z7 : -3.52406229691418E-01 9.35847129222866E-01 == err : 9.758E-16 = rco : 3.124E-02 = res : 1.303E-15 == solution 48 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -9.02368927062182E-01 -4.30964406271151E-01 z1 : -7.07106781186547E-01 7.07106781186548E-01 z2 : -7.07106781186548E-01 7.07106781186547E-01 z3 : 7.07106781186548E-01 -7.07106781186548E-01 z4 : 4.30964406271151E-01 9.02368927062183E-01 z5 : 9.02368927062182E-01 4.30964406271151E-01 z6 : -4.30964406271151E-01 -9.02368927062183E-01 z7 : 7.07106781186547E-01 -7.07106781186548E-01 == err : 7.176E-16 = rco : 3.566E-02 = res : 6.452E-16 == solution 49 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.21320343559643E-01 -1.21320343559643E-01 z1 : -4.12132034355964E+00 -4.12132034355964E+00 z2 : 7.07106781186548E-01 7.07106781186548E-01 z3 : 7.07106781186548E-01 7.07106781186548E-01 z4 : 7.07106781186548E-01 7.07106781186548E-01 z5 : 7.07106781186548E-01 7.07106781186548E-01 z6 : 7.07106781186547E-01 7.07106781186547E-01 z7 : 7.07106781186548E-01 7.07106781186548E-01 == err : 3.295E-15 = rco : 1.096E-02 = res : 3.382E-15 == solution 50 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.16219687151264E+00 1.80579079170737E+00 z1 : -2.52016870801098E-01 3.91577354604836E-01 z2 : 1.16219674711298E+00 1.80579089798552E+00 z3 : 1.16219668236010E+00 -1.80579079737419E+00 z4 : -2.52016936619296E-01 -3.91577318325042E-01 z5 : -1.16219656798664E+00 -1.80579095901461E+00 z6 : 2.52016898935479E-01 -3.91577324732638E-01 z7 : 2.52016918511113E-01 3.91577355148749E-01 == err : 2.520E-07 = rco : 3.184E-09 = res : 6.432E-14 == solution 51 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 2.91703841149741E-62 -1.71572875253810E-01 z1 : 3.88938454866321E-62 -5.82842712474619E+00 z2 : -3.49595339853895E-62 1.00000000000000E+00 z3 : 0.00000000000000E+00 1.00000000000000E+00 z4 : -9.72346137165804E-62 1.00000000000000E+00 z5 : -3.88938454866321E-62 1.00000000000000E+00 z6 : 7.77876909732643E-62 1.00000000000000E+00 z7 : 0.00000000000000E+00 1.00000000000000E+00 == err : 2.250E-16 = rco : 8.006E-03 = res : 2.498E-16 == solution 52 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -3.13898131252354E-01 1.30020863168295E-01 z1 : 1.23054868236624E+01 -5.09709953396439E+00 z2 : -9.22813706786104E-02 3.82241952894593E-02 z3 : -9.23879532511287E-01 3.82683432365090E-01 z4 : -9.24946589237340E+00 3.83125421732842E+00 z5 : 6.93636426436996E-02 -2.87313615186211E-02 z6 : -2.71920507200175E+00 1.12633161969684E+00 z7 : 9.23879532511287E-01 -3.82683432365090E-01 == err : 1.870E-14 = rco : 1.138E-03 = res : 4.148E-15 == solution 53 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.30020863168295E-01 3.13898131252354E-01 z1 : -5.09709953396439E+00 -1.23054868236624E+01 z2 : 3.82241952894593E-02 9.22813706786105E-02 z3 : 3.82683432365090E-01 9.23879532511287E-01 z4 : 3.83125421732842E+00 9.24946589237340E+00 z5 : -2.87313615186211E-02 -6.93636426436996E-02 z6 : 1.12633161969683E+00 2.71920507200175E+00 z7 : -3.82683432365090E-01 -9.23879532511287E-01 == err : 1.738E-14 = rco : 1.152E-03 = res : 5.558E-15 == solution 54 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -7.07106781186548E-01 7.07106781186548E-01 z1 : 4.12132034355964E+00 -4.12132034355964E+00 z2 : 1.21320343559643E-01 -1.21320343559643E-01 z3 : -7.07106781186548E-01 7.07106781186548E-01 z4 : -7.07106781186548E-01 7.07106781186548E-01 z5 : -7.07106781186548E-01 7.07106781186548E-01 z6 : -7.07106781186548E-01 7.07106781186548E-01 z7 : -7.07106781186548E-01 7.07106781186548E-01 == err : 3.494E-15 = rco : 9.913E-03 = res : 8.906E-16 == solution 55 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 3.13898131252354E-01 -1.30020863168295E-01 z1 : -1.23054868236624E+01 5.09709953396439E+00 z2 : 9.22813706786105E-02 -3.82241952894593E-02 z3 : 9.23879532511287E-01 -3.82683432365090E-01 z4 : 9.24946589237340E+00 -3.83125421732843E+00 z5 : -6.93636426436996E-02 2.87313615186211E-02 z6 : 2.71920507200175E+00 -1.12633161969683E+00 z7 : -9.23879532511287E-01 3.82683432365090E-01 == err : 1.734E-14 = rco : 1.021E-03 = res : 2.502E-15 == solution 56 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.30020863168295E-01 -3.13898131252354E-01 z1 : 5.09709953396439E+00 1.23054868236624E+01 z2 : -3.82241952894593E-02 -9.22813706786105E-02 z3 : -3.82683432365090E-01 -9.23879532511287E-01 z4 : -3.83125421732842E+00 -9.24946589237340E+00 z5 : 2.87313615186211E-02 6.93636426436996E-02 z6 : -1.12633161969683E+00 -2.71920507200175E+00 z7 : 3.82683432365090E-01 9.23879532511287E-01 == err : 1.738E-14 = rco : 1.152E-03 = res : 5.558E-15 == solution 57 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 3.13898131252354E-01 1.30020863168295E-01 z1 : -1.23054868236624E+01 -5.09709953396439E+00 z2 : 9.22813706786104E-02 3.82241952894593E-02 z3 : 9.23879532511287E-01 3.82683432365090E-01 z4 : 9.24946589237340E+00 3.83125421732842E+00 z5 : -6.93636426436996E-02 -2.87313615186211E-02 z6 : 2.71920507200175E+00 1.12633161969684E+00 z7 : -9.23879532511287E-01 -3.82683432365090E-01 == err : 1.870E-14 = rco : 1.138E-03 = res : 4.148E-15 == solution 58 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 4.55089884661263E-01 4.55089845420556E-01 z1 : -4.55089742280174E-01 -4.55089792843591E-01 z2 : -4.55089907653736E-01 -4.55089901992381E-01 z3 : -2.65245781302842E+00 -2.65245784602522E+00 z4 : 4.55089836463192E-01 4.55089875703899E-01 z5 : -4.55089978844281E-01 -4.55089928280864E-01 z6 : 2.65245781302842E+00 2.65245784602522E+00 z7 : 4.55089907653736E-01 4.55089901992381E-01 == err : 3.645E-07 = rco : 1.080E-08 = res : 1.429E-13 == solution 59 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.55377397499837E+00 7.68739709406695E-09 z1 : -1.55377393584503E+00 1.45660648771518E-07 z2 : -1.55377399263837E+00 -6.89866258379062E-08 z3 : -2.66585465026187E-01 1.18362337489515E-08 z4 : 1.55377397306170E+00 -7.68739709570874E-09 z5 : -1.55377401221504E+00 -1.45660648769876E-07 z6 : 2.66585465026187E-01 -1.18362337489515E-08 z7 : 1.55377399263837E+00 6.89866258379062E-08 == err : 1.500E-07 = rco : 3.726E-09 = res : 2.965E-14 == solution 60 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 2.09868413632237E+00 -4.55089957366403E-01 z1 : 9.86841157292716E-02 -4.55089907233021E-01 z2 : 4.55089850133312E-01 -2.09868389824163E+00 z3 : 4.55089846970918E-01 -9.86841207603778E-02 z4 : -9.86841257350621E-02 4.55089869912081E-01 z5 : -2.09868399878550E+00 4.55089844078713E-01 z6 : -4.55089885430551E-01 9.86841170421831E-02 z7 : -4.55089939204757E-01 2.09868405256845E+00 == err : 2.161E-07 = rco : 3.317E-09 = res : 3.818E-14 == solution 61 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 9.86841289820799E-02 -4.55089844007652E-01 z1 : 2.09868408816961E+00 -4.55089954142305E-01 z2 : 4.55089866048024E-01 -9.86840931754068E-02 z3 : 4.55089772878631E-01 -2.09868404461382E+00 z4 : -2.09868421245705E+00 4.55089809274654E-01 z5 : -9.86841687378843E-02 4.55089855525992E-01 z6 : -4.55089605679759E-01 2.09868413669282E+00 z7 : -4.55089869203645E-01 9.86841344457132E-02 == err : 2.593E-07 = rco : 3.572E-09 = res : 6.843E-14 == solution 62 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -5.86050157973074E-17 1.00000000000000E+00 z1 : 2.98866403134070E-17 -1.00000000000000E+00 z2 : 1.14995953502573E-17 -1.00000000000000E+00 z3 : -9.42809041582064E-01 -3.33333333333333E-01 z4 : 3.26258273952043E-17 1.00000000000000E+00 z5 : -9.42809041582063E-01 3.33333333333333E-01 z6 : 9.42809041582064E-01 3.33333333333333E-01 z7 : 9.42809041582063E-01 -3.33333333333333E-01 == err : 6.290E-16 = rco : 3.921E-02 = res : 6.106E-16 == solution 63 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.96263071700389E-17 1.00000000000000E+00 z1 : -1.12335503773107E-17 -1.00000000000000E+00 z2 : -1.75107532849400E-17 -1.00000000000000E+00 z3 : 9.42809041582063E-01 -3.33333333333333E-01 z4 : -2.66973508410820E-17 1.00000000000000E+00 z5 : 9.42809041582064E-01 3.33333333333333E-01 z6 : -9.42809041582064E-01 3.33333333333333E-01 z7 : -9.42809041582063E-01 -3.33333333333333E-01 == err : 6.623E-16 = rco : 3.310E-02 = res : 7.380E-16 == solution 64 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -8.91867121275053E-01 -4.52297510482370E-01 z1 : 8.72025885096329E-01 4.89459759042523E-01 z2 : 9.23879532511287E-01 -3.82683432365090E-01 z3 : 2.70515101984914E-01 -9.62715731458717E-01 z4 : -3.10822652595037E-01 9.50467926146792E-01 z5 : 4.12555016480266E-01 9.10932685974637E-01 z6 : -9.23879532511287E-01 3.82683432365090E-01 z7 : -3.52406229691418E-01 -9.35847129222866E-01 == err : 7.152E-16 = rco : 3.124E-02 = res : 6.753E-16 == solution 65 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.16219654013414E+00 1.80579088623745E+00 z1 : 2.52016940737644E-01 3.91577348556042E-01 z2 : 1.16219654899453E+00 1.80579081960188E+00 z3 : -2.52016915304533E-01 3.91577346399625E-01 z4 : -2.52016905570545E-01 -3.91577331275208E-01 z5 : 1.16219653477559E+00 -1.80579070561868E+00 z6 : 2.52016943820956E-01 -3.91577373272767E-01 z7 : -1.16219660731951E+00 -1.80579099062834E+00 == err : 2.141E-07 = rco : 4.687E-09 = res : 3.441E-14 == solution 66 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 4.30964406271151E-01 -9.02368927062183E-01 z1 : 7.07106781186548E-01 7.07106781186548E-01 z2 : -7.07106781186548E-01 -7.07106781186548E-01 z3 : -7.07106781186548E-01 -7.07106781186548E-01 z4 : -9.02368927062183E-01 4.30964406271151E-01 z5 : 7.07106781186548E-01 7.07106781186548E-01 z6 : -4.30964406271151E-01 9.02368927062183E-01 z7 : 9.02368927062182E-01 -4.30964406271151E-01 == err : 7.912E-16 = rco : 8.691E-02 = res : 6.753E-16 == solution 67 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 8.31990290087486E-01 -5.54790192054745E-01 z1 : 3.82683432365090E-01 9.23879532511287E-01 z2 : -9.80601882939922E-01 1.96010069064527E-01 z3 : 5.81579360246292E-01 8.13489672789713E-01 z4 : -8.76671142655794E-01 -4.81090124233064E-01 z5 : -3.82683432365090E-01 -9.23879532511287E-01 z6 : 2.79718020635393E-01 -9.60082199049549E-01 z7 : 1.63985354626545E-01 9.86462773483119E-01 == err : 6.981E-16 = rco : 5.162E-02 = res : 6.823E-16 == solution 68 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -9.02368927062183E-01 -4.30964406271151E-01 z1 : -4.30964406271151E-01 -9.02368927062182E-01 z2 : 9.02368927062182E-01 4.30964406271151E-01 z3 : 7.07106781186548E-01 -7.07106781186548E-01 z4 : 4.30964406271151E-01 9.02368927062183E-01 z5 : -7.07106781186548E-01 7.07106781186548E-01 z6 : -7.07106781186548E-01 7.07106781186548E-01 z7 : 7.07106781186548E-01 -7.07106781186548E-01 == err : 8.370E-16 = rco : 3.110E-02 = res : 6.753E-16 == solution 69 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.80579121742852E+00 -1.16219679886871E+00 z1 : -3.91577316477008E-01 2.52016944743145E-01 z2 : 3.91577316875133E-01 2.52016944999377E-01 z3 : 1.80579113166500E+00 -1.16219686078610E+00 z4 : 3.91577280886611E-01 -2.52016873127099E-01 z5 : 1.80579084884554E+00 1.16219678628223E+00 z6 : -1.80579078207757E+00 1.16219674331075E+00 z7 : -3.91577262289192E-01 -2.52016886553595E-01 == err : 3.582E-07 = rco : 8.240E-09 = res : 1.249E-13 == solution 70 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -9.23879532511287E-01 -3.82683432365089E-01 z1 : 5.54790192054745E-01 -8.31990290087486E-01 z2 : -9.86462773483118E-01 -1.63985354626545E-01 z3 : 9.60082199049549E-01 -2.79718020635393E-01 z4 : 9.23879532511287E-01 3.82683432365090E-01 z5 : 4.81090124233064E-01 8.76671142655794E-01 z6 : -8.13489672789713E-01 -5.81579360246292E-01 z7 : -1.96010069064527E-01 9.80601882939922E-01 == err : 1.045E-15 = rco : 5.260E-02 = res : 1.099E-15 == solution 71 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -3.82683432365090E-01 9.23879532511287E-01 z1 : -8.76671142655794E-01 4.81090124233064E-01 z2 : 5.81579360246292E-01 -8.13489672789713E-01 z3 : -9.80601882939922E-01 -1.96010069064527E-01 z4 : 3.82683432365090E-01 -9.23879532511287E-01 z5 : 8.31990290087486E-01 5.54790192054745E-01 z6 : 1.63985354626545E-01 -9.86462773483119E-01 z7 : 2.79718020635393E-01 9.60082199049549E-01 == err : 7.472E-16 = rco : 4.699E-02 = res : 4.965E-16 == solution 72 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 8.71132905637176E-01 -4.91047310058951E-01 z1 : 9.96285960708424E-01 8.61062395839698E-02 z2 : -9.96285960708424E-01 -8.61062395839696E-02 z3 : -8.71132905637176E-01 4.91047310058951E-01 z4 : 4.91047310058951E-01 -8.71132905637176E-01 z5 : -8.61062395839697E-02 -9.96285960708424E-01 z6 : 8.61062395839696E-02 9.96285960708425E-01 z7 : -4.91047310058951E-01 8.71132905637176E-01 == err : 4.228E-16 = rco : 1.362E-01 = res : 5.979E-16 == solution 73 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 3.11150763893057E-61 5.82842712474619E+00 z1 : 2.33363072919793E-61 1.71572875253810E-01 z2 : -3.11150763893057E-61 -1.00000000000000E+00 z3 : -3.11150763893057E-61 -1.00000000000000E+00 z4 : 4.66726145839586E-61 -1.00000000000000E+00 z5 : -9.33452291679171E-61 -1.00000000000000E+00 z6 : 1.55575381946529E-61 -1.00000000000000E+00 z7 : -3.88938454866321E-61 -1.00000000000000E+00 == err : 2.041E-16 = rco : 8.546E-03 = res : 1.554E-15 == solution 74 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -4.12132034355964E+00 4.12132034355964E+00 z1 : -1.21320343559643E-01 1.21320343559643E-01 z2 : 7.07106781186548E-01 -7.07106781186548E-01 z3 : 7.07106781186547E-01 -7.07106781186548E-01 z4 : 7.07106781186548E-01 -7.07106781186548E-01 z5 : 7.07106781186548E-01 -7.07106781186548E-01 z6 : 7.07106781186548E-01 -7.07106781186548E-01 z7 : 7.07106781186547E-01 -7.07106781186548E-01 == err : 3.578E-15 = rco : 8.728E-03 = res : 1.116E-15 == solution 75 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.63985354626545E-01 9.86462773483118E-01 z1 : -2.79718020635393E-01 -9.60082199049549E-01 z2 : 3.82683432365090E-01 -9.23879532511287E-01 z3 : 8.76671142655794E-01 -4.81090124233064E-01 z4 : -5.81579360246292E-01 8.13489672789713E-01 z5 : 9.80601882939922E-01 1.96010069064527E-01 z6 : -3.82683432365089E-01 9.23879532511287E-01 z7 : -8.31990290087486E-01 -5.54790192054745E-01 == err : 7.955E-16 = rco : 4.777E-02 = res : 7.109E-16 == solution 76 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -9.42465650118430E-01 3.34303003795725E-01 z1 : -3.34303003795725E-01 9.42465650118430E-01 z2 : 8.61062395839697E-02 -9.96285960708424E-01 z3 : -8.61062395839696E-02 9.96285960708424E-01 z4 : 3.34303003795725E-01 -9.42465650118430E-01 z5 : 9.42465650118430E-01 -3.34303003795725E-01 z6 : -9.96285960708424E-01 8.61062395839696E-02 z7 : 9.96285960708424E-01 -8.61062395839696E-02 == err : 6.800E-16 = rco : 1.982E-01 = res : 9.037E-16 == solution 77 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.80579076635641E+00 -1.16219648467055E+00 z1 : 3.91577351820645E-01 2.52016910410016E-01 z2 : -3.91577333484638E-01 2.52016898609067E-01 z3 : -1.80579060541611E+00 -1.16219648320799E+00 z4 : -3.91577395001227E-01 -2.52016955003151E-01 z5 : -1.80579103601289E+00 1.16219658073445E+00 z6 : 1.80579089163574E+00 1.16219648781415E+00 z7 : 3.91577360102075E-01 -2.52016954686001E-01 == err : 3.290E-07 = rco : 5.187E-09 = res : 8.121E-14 == solution 78 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.80579097021334E+00 1.16219649479281E+00 z1 : -3.91577322766642E-01 -2.52016883772983E-01 z2 : 3.91577369763687E-01 -2.52016914020012E-01 z3 : 1.80579068526901E+00 1.16219698210802E+00 z4 : 3.91577377685499E-01 2.52016846819006E-01 z5 : 1.80579092000877E+00 -1.16219679589622E+00 z6 : -1.80579074385034E+00 -1.16219668252166E+00 z7 : -3.91577315896650E-01 2.52016952491035E-01 == err : 3.996E-07 = rco : 5.344E-09 = res : 1.646E-13 == solution 79 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.16219655362009E+00 1.80579086462699E+00 z1 : 1.16219663257498E+00 -1.80579098730504E+00 z2 : -2.52016896871854E-01 -3.91577353659727E-01 z3 : -1.16219675128522E+00 -1.80579079606582E+00 z4 : 2.52016936681852E-01 -3.91577343935929E-01 z5 : 2.52016916667726E-01 3.91577312838502E-01 z6 : -1.16219642341959E+00 1.80579099241973E+00 z7 : -2.52016967967985E-01 3.91577311081297E-01 == err : 2.399E-07 = rco : 3.633E-09 = res : 4.840E-14 == solution 80 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.49498218589242E-61 -7.37606572855018E-01 z1 : 1.67729708661101E-61 -2.93985090992536E-01 z2 : -1.28835863174469E-61 2.93985090992536E-01 z3 : 3.50044609379689E-61 7.37606572855018E-01 z4 : 1.45851920574871E-61 1.35573629194945E+00 z5 : 0.00000000000000E+00 3.40153303905261E+00 z6 : -6.22301527786114E-61 -3.40153303905261E+00 z7 : -4.37555761724612E-62 -1.35573629194945E+00 == err : 4.765E-15 = rco : 1.796E-02 = res : 1.332E-15 == solution 81 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -7.37606572855018E-01 4.01092781580894E-62 z1 : -2.93985090992536E-01 2.09054419490648E-61 z2 : 2.93985090992536E-01 -3.95015618223608E-62 z3 : 7.37606572855018E-01 9.72346137165804E-62 z4 : 1.35573629194945E+00 3.98661916237979E-61 z5 : 3.40153303905261E+00 4.29047733024411E-61 z6 : -3.40153303905261E+00 -8.36217677962591E-61 z7 : -1.35573629194945E+00 -3.42752013350946E-61 == err : 4.765E-15 = rco : 1.796E-02 = res : 1.332E-15 == solution 82 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 5.21566609513552E-01 -5.21566609513552E-01 z1 : 2.07878851408567E-01 -2.07878851408567E-01 z2 : -2.07878851408567E-01 2.07878851408567E-01 z3 : -5.21566609513552E-01 5.21566609513552E-01 z4 : -9.58650325538158E-01 9.58650325538158E-01 z5 : -2.40524707834419E+00 2.40524707834419E+00 z6 : 2.40524707834419E+00 -2.40524707834419E+00 z7 : 9.58650325538158E-01 -9.58650325538158E-01 == err : 4.921E-15 = rco : 2.231E-02 = res : 8.882E-16 == solution 83 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -9.02368927062182E-01 4.30964406271151E-01 z1 : -7.07106781186548E-01 -7.07106781186548E-01 z2 : -4.30964406271151E-01 9.02368927062183E-01 z3 : 7.07106781186548E-01 7.07106781186548E-01 z4 : 7.07106781186548E-01 7.07106781186548E-01 z5 : -7.07106781186548E-01 -7.07106781186548E-01 z6 : 9.02368927062183E-01 -4.30964406271151E-01 z7 : 4.30964406271151E-01 -9.02368927062182E-01 == err : 8.944E-16 = rco : 2.704E-02 = res : 9.037E-16 == solution 84 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -9.23879532511287E-01 -3.82683432365090E-01 z1 : -8.72025885096329E-01 4.89459759042523E-01 z2 : 8.91867121275053E-01 -4.52297510482370E-01 z3 : 3.52406229691418E-01 -9.35847129222866E-01 z4 : 9.23879532511287E-01 3.82683432365090E-01 z5 : -4.12555016480266E-01 9.10932685974638E-01 z6 : 3.10822652595037E-01 9.50467926146792E-01 z7 : -2.70515101984913E-01 -9.62715731458717E-01 == err : 8.848E-16 = rco : 3.272E-02 = res : 8.896E-16 == solution 85 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.88504402031877E-01 -1.88504383557728E-01 z1 : -1.09868400888077E+00 1.09868415617465E+00 z2 : 1.09868410511717E+00 -1.09868417317374E+00 z3 : -1.88504402031877E-01 1.88504383557728E-01 z4 : -1.09868405699897E+00 1.09868416467420E+00 z5 : -1.09868421805485E+00 1.09868407076097E+00 z6 : 1.09868412181845E+00 -1.09868405376188E+00 z7 : 1.09868405699897E+00 -1.09868416467420E+00 == err : 1.121E-07 = rco : 3.790E-09 = res : 2.340E-14 == solution 86 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 3.83125421732842E+00 -9.24946589237340E+00 z1 : 3.82683432365090E-01 -9.23879532511287E-01 z2 : 3.82241952894593E-02 -9.22813706786105E-02 z3 : -5.09709953396439E+00 1.23054868236624E+01 z4 : 1.30020863168295E-01 -3.13898131252354E-01 z5 : -3.82683432365090E-01 9.23879532511287E-01 z6 : 1.12633161969684E+00 -2.71920507200175E+00 z7 : -2.87313615186211E-02 6.93636426436996E-02 == err : 1.283E-14 = rco : 1.220E-03 = res : 7.117E-15 == solution 87 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 2.16501993427599E-08 -3.75114177310700E+00 z1 : -3.71458696251139E-09 -6.43594326314524E-01 z2 : 3.40168003813908E-08 -6.43594151056910E-01 z3 : 2.65876264611106E-08 6.43594207936374E-01 z4 : 3.71458696251138E-09 6.43594326314524E-01 z5 : -2.16501993427599E-08 3.75114177310700E+00 z6 : -3.40168003861353E-08 -6.43594354754256E-01 z7 : -2.65876264563661E-08 6.43594297874792E-01 == err : 4.286E-07 = rco : 1.092E-08 = res : 1.263E-13 == solution 88 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.23054868236624E+01 5.09709953396439E+00 z1 : -3.13898131252354E-01 -1.30020863168295E-01 z2 : 9.23879532511287E-01 3.82683432365090E-01 z3 : -2.71920507200175E+00 -1.12633161969683E+00 z4 : 6.93636426436996E-02 2.87313615186211E-02 z5 : -9.24946589237340E+00 -3.83125421732842E+00 z6 : -9.23879532511287E-01 -3.82683432365090E-01 z7 : -9.22813706786104E-02 -3.82241952894593E-02 == err : 1.716E-14 = rco : 1.236E-03 = res : 3.534E-15 == solution 89 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 3.33333333333333E-01 -9.42809041582063E-01 z1 : 3.33333333333334E-01 9.42809041582063E-01 z2 : -3.33333333333334E-01 9.42809041582064E-01 z3 : 1.00000000000000E+00 -1.18857422904136E-16 z4 : -1.00000000000000E+00 5.24952284910094E-17 z5 : -1.00000000000000E+00 -1.40166625356244E-17 z6 : -3.33333333333333E-01 -9.42809041582063E-01 z7 : 1.00000000000000E+00 8.96387840449157E-17 == err : 6.591E-16 = rco : 3.455E-02 = res : 7.448E-16 == solution 90 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 9.23879532511287E-01 -3.82683432365090E-01 z1 : 9.60082199049549E-01 2.79718020635393E-01 z2 : -9.86462773483119E-01 1.63985354626545E-01 z3 : 5.54790192054745E-01 8.31990290087486E-01 z4 : -9.23879532511287E-01 3.82683432365090E-01 z5 : -1.96010069064527E-01 -9.80601882939922E-01 z6 : -8.13489672789713E-01 5.81579360246291E-01 z7 : 4.81090124233064E-01 -8.76671142655794E-01 == err : 1.053E-15 = rco : 4.594E-02 = res : 9.155E-16 == solution 91 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.55377396988086E+00 -7.57321362681488E-08 z1 : 1.55377394545991E+00 1.07898111436291E-08 z2 : -1.55377401089851E+00 -1.40674461321847E-07 z3 : -1.55377396988086E+00 7.57321362681488E-08 z4 : -2.66585468930758E-01 -1.29935803736726E-08 z5 : 1.55377400260016E+00 -1.07898112144496E-08 z6 : -1.55377393716156E+00 1.40674461392668E-07 z7 : 2.66585468930758E-01 1.29935803736727E-08 == err : 1.464E-07 = rco : 2.782E-09 = res : 2.876E-14 == solution 92 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.00000000000000E+00 1.13440684872793E-75 z1 : -1.00000000000000E+00 -1.24460305557223E-59 z2 : -1.00000000000000E+00 -7.21022300886600E-60 z3 : -1.00000000000000E+00 0.00000000000000E+00 z4 : 5.82842712474619E+00 2.36474580558723E-59 z5 : 1.71572875253810E-01 1.24460305557223E-60 z6 : -1.00000000000000E+00 9.95682444457783E-60 z7 : -1.00000000000000E+00 0.00000000000000E+00 == err : 7.850E-17 = rco : 1.291E-02 = res : 1.110E-15 == solution 93 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.09868405463927E+00 -1.09868406567937E+00 z1 : -1.09868422264309E+00 -1.09868420353325E+00 z2 : 1.09868412194961E+00 1.09868411897925E+00 z3 : 1.09868405463927E+00 1.09868406567937E+00 z4 : 1.88504402436736E-01 1.88504400542555E-01 z5 : -1.09868400429253E+00 -1.09868402340237E+00 z6 : 1.09868410498601E+00 1.09868410795637E+00 z7 : -1.88504402436736E-01 -1.88504400542555E-01 == err : 1.422E-07 = rco : 3.216E-09 = res : 2.804E-14 == solution 94 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -4.55089798807667E-01 4.55089961096642E-01 z1 : 2.65245842563678E+00 -2.65245780286837E+00 z2 : 4.55089802546758E-01 -4.55089909396925E-01 z3 : 4.55089914838605E-01 -4.55089863427247E-01 z4 : -4.55089922316788E-01 4.55089760027813E-01 z5 : -4.55089802546758E-01 4.55089909396925E-01 z6 : -2.65245842563678E+00 2.65245780286837E+00 z7 : 4.55089806285850E-01 -4.55089857697208E-01 == err : 4.419E-07 = rco : 8.920E-09 = res : 1.326E-13 == solution 95 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -9.96285960708424E-01 8.61062395839697E-02 z1 : 9.96285960708424E-01 -8.61062395839696E-02 z2 : 8.71132905637176E-01 4.91047310058951E-01 z3 : -4.91047310058951E-01 -8.71132905637176E-01 z4 : 8.61062395839697E-02 -9.96285960708424E-01 z5 : -8.61062395839697E-02 9.96285960708424E-01 z6 : 4.91047310058951E-01 8.71132905637176E-01 z7 : -8.71132905637176E-01 -4.91047310058951E-01 == err : 3.631E-16 = rco : 1.724E-01 = res : 5.165E-16 == solution 96 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.96010069064527E-01 9.80601882939922E-01 z1 : 9.23879532511287E-01 -3.82683432365090E-01 z2 : -5.54790192054745E-01 -8.31990290087486E-01 z3 : 9.86462773483118E-01 -1.63985354626545E-01 z4 : -9.60082199049549E-01 -2.79718020635393E-01 z5 : -9.23879532511287E-01 3.82683432365090E-01 z6 : -4.81090124233064E-01 8.76671142655794E-01 z7 : 8.13489672789713E-01 -5.81579360246292E-01 == err : 1.165E-15 = rco : 4.960E-02 = res : 7.917E-16 == solution 97 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 2.09868373507338E+00 4.55089787979379E-01 z1 : 9.86841318934415E-02 4.55089839336587E-01 z2 : -4.55089872249228E-01 -9.86841390303943E-02 z3 : -4.55089846969098E-01 -2.09868389157532E+00 z4 : -9.86841164154167E-02 -4.55089908678579E-01 z5 : -2.09868399656144E+00 -4.55089985402017E-01 z6 : 4.55090022613074E-01 2.09868416816328E+00 z7 : 4.55089942615295E-01 9.86841292070621E-02 == err : 3.850E-07 = rco : 7.626E-09 = res : 1.135E-13 == solution 98 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 3.33333333333334E-01 -9.42809041582064E-01 z1 : -1.00000000000000E+00 -5.29936890956617E-17 z2 : 1.00000000000000E+00 -1.92408865311576E-16 z3 : 1.00000000000000E+00 2.00495235477486E-16 z4 : 3.33333333333333E-01 9.42809041582063E-01 z5 : -1.00000000000000E+00 -1.19034615671931E-16 z6 : -3.33333333333333E-01 9.42809041582063E-01 z7 : -3.33333333333333E-01 -9.42809041582063E-01 == err : 1.418E-15 = rco : 8.808E-02 = res : 6.959E-16 == solution 99 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 7.07106771897931E-01 -7.07106786879801E-01 z1 : -7.07106827811084E-01 -7.07106680972764E-01 z2 : -7.07106734562012E-01 -7.07106881400332E-01 z3 : -7.07106651156506E-01 7.07106875699257E-01 z4 : -7.07106911216589E-01 7.07106686673839E-01 z5 : 7.07106823381468E-01 7.07106760658907E-01 z6 : 7.07106738991628E-01 7.07106801714189E-01 z7 : 7.07106790475164E-01 -7.07106775493295E-01 == err : 1.608E-07 = rco : 1.878E-08 = res : 6.712E-14 == solution 100 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.09868410817929E+00 -1.09868417043399E+00 z1 : -1.09868401017488E+00 1.09868415522594E+00 z2 : -1.09868416775854E+00 1.09868406410566E+00 z3 : -1.88504383028540E-01 1.88504400812562E-01 z4 : 1.09868411875633E+00 -1.09868405650163E+00 z5 : -1.09868421676074E+00 1.09868407170968E+00 z6 : 1.88504383028539E-01 -1.88504400812562E-01 z7 : 1.09868416775854E+00 -1.09868406410566E+00 == err : 1.099E-07 = rco : 2.705E-09 = res : 2.351E-14 == solution 101 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.09868411777227E+00 1.09868413898455E+00 z1 : -1.09868400744266E+00 -1.09868402033238E+00 z2 : -1.09868416432816E+00 -1.09868414727716E+00 z3 : -1.88504383617099E-01 -1.88504386542589E-01 z4 : 1.09868410916335E+00 1.09868408795107E+00 z5 : -1.09868421949296E+00 -1.09868420660324E+00 z6 : 1.88504383617099E-01 1.88504386542589E-01 z7 : 1.09868416432816E+00 1.09868414727716E+00 == err : 1.388E-07 = rco : 2.372E-09 = res : 2.421E-14 == solution 102 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.10919936252800E+01 1.10919936252800E+01 z1 : -4.50775592640477E-02 4.50775592640477E-02 z2 : -2.40524707834419E+00 2.40524707834419E+00 z3 : 2.40524707834419E+00 -2.40524707834419E+00 z4 : 4.50775592640477E-02 -4.50775592640477E-02 z5 : 1.10919936252800E+01 -1.10919936252800E+01 z6 : 2.07878851408567E-01 -2.07878851408567E-01 z7 : -2.07878851408567E-01 2.07878851408567E-01 == err : 6.197E-14 = rco : 5.829E-04 = res : 1.998E-15 == solution 103 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 7.07106768829381E-01 -7.07106781913272E-01 z1 : 7.07106796263741E-01 7.07106748898934E-01 z2 : 7.07106766109354E-01 7.07106813474162E-01 z3 : -7.07106682953436E-01 7.07106842376368E-01 z4 : -7.07106879419659E-01 7.07106719996727E-01 z5 : -7.07106826572450E-01 -7.07106727598217E-01 z6 : -7.07106735800645E-01 -7.07106834774878E-01 z7 : 7.07106793543714E-01 -7.07106780459823E-01 == err : 1.153E-07 = rco : 1.244E-08 = res : 3.041E-14 == solution 104 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 9.02368927062183E-01 -4.30964406271151E-01 z1 : 7.07106781186548E-01 7.07106781186547E-01 z2 : 4.30964406271151E-01 -9.02368927062182E-01 z3 : -7.07106781186548E-01 -7.07106781186547E-01 z4 : -7.07106781186548E-01 -7.07106781186548E-01 z5 : 7.07106781186548E-01 7.07106781186548E-01 z6 : -9.02368927062182E-01 4.30964406271151E-01 z7 : -4.30964406271151E-01 9.02368927062182E-01 == err : 7.427E-16 = rco : 3.466E-02 = res : 1.295E-15 == solution 105 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.05542339112525E-57 -1.56864478186269E+01 z1 : 2.03803750349952E-59 -2.93985090992536E-01 z2 : 3.01816240976265E-59 2.93985090992536E-01 z3 : 4.13208214449980E-58 1.56864478186269E+01 z4 : -9.33452291679171E-60 6.37492956698932E-02 z5 : 3.78359328893957E-58 3.40153303905261E+00 z6 : 2.43942198892157E-58 -3.40153303905261E+00 z7 : -4.97841222228891E-60 -6.37492956698932E-02 == err : 4.537E-14 = rco : 1.129E-03 = res : 4.940E-15 == solution 106 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.56864478186269E+01 -4.72949161117447E-59 z1 : 2.93985090992536E-01 -3.79214993494663E-61 z2 : -2.93985090992536E-01 -1.17653882597062E-60 z3 : -1.56864478186269E+01 5.84963436118947E-59 z4 : -6.37492956698932E-02 1.45851920574871E-62 z5 : -3.40153303905261E+00 -1.71132920141181E-60 z6 : 3.40153303905261E+00 -8.55664600705907E-60 z7 : 6.37492956698932E-02 3.98661916237979E-61 == err : 5.575E-14 = rco : 1.129E-03 = res : 8.882E-15 == solution 107 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -4.55089866025937E-01 -9.86840219842762E-02 z1 : -4.55089913318303E-01 -2.09868397202084E+00 z2 : 2.09868422035769E+00 4.55089967168990E-01 z3 : 9.86841528271900E-02 4.55089837254986E-01 z4 : 4.55089679053226E-01 2.09868422095106E+00 z5 : 4.55089894115099E-01 9.86840905797406E-02 z6 : -9.86840787374992E-02 -4.55089839503633E-01 z7 : -2.09868408827146E+00 -4.55090282446025E-01 == err : 4.218E-07 = rco : 5.507E-09 = res : 1.814E-13 == solution 108 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -5.54790192054745E-01 8.31990290087486E-01 z1 : 9.86462773483118E-01 1.63985354626545E-01 z2 : -9.60082199049549E-01 2.79718020635393E-01 z3 : -9.23879532511287E-01 -3.82683432365090E-01 z4 : -4.81090124233064E-01 -8.76671142655794E-01 z5 : 8.13489672789713E-01 5.81579360246292E-01 z6 : 1.96010069064527E-01 -9.80601882939922E-01 z7 : 9.23879532511287E-01 3.82683432365089E-01 == err : 7.632E-16 = rco : 4.440E-02 = res : 1.295E-15 == SHAR_EOF fi # end of overwriting check if test -f 'd1' then echo shar: will not over-write existing file "'d1'" else cat << "SHAR_EOF" > 'd1' 12 x1**2 + x2**2 - 1; x3**2 + x4**2 - 1; x5**2 + x6**2 - 1; x7**2 + x8**2 - 1; x9**2 + x10**2 - 1; x11**2 + x12**2 - 1; 3*x3 + 2*x5 + x7 - 3.9701; 3*x1*x4 + 2*x1*x6 + x1*x8 - 1.7172; 3*x2*x4 + 2*x2*x6 + x2*x8 - 4.0616; x3*x9 + x5*x9 + x7*x9 - 1.9791; x2*x4*x9 + x2*x6*x9 + x2*x8*x9 + x1*x10 - 1.9115; - x3*x10*x11 - x5*x10*x11 - x7*x10*x11 + x4*x12 + x6*x12 + x8*x12 - 0.4077; TITLE : a sparse system, known as benchmark D1 ROOT COUNTS : total degree : 4068 3-homogeneous Bezout number : 320 with partition : {x1 x2 }{x3 x4 x5 x6 x7 x8 }{x9 x10 }{x11 x12 } mixed volume : 192 REFERENCES : H. Hong and V. Stahl: `Safe Starting Regions by Fixed Points and Tightening', Computing 53(3-4): 322-335, 1995. NOTE : The system is deficient w.r.t. the face normals (1,1,0,0, 0,0,0,0, 0,0,0,0) (0,0,1,1, 1,1,1,1, 0,0,0,0) (0,0,2,2, 2,2,2,2, -2,0,1,1) (0,0,2,2, 2,2,0,0, -2,0,1,1) (0,0,2,2, 0,0,2,2, -2,0,1,1) (0,0,0,0, 2,2,2,2, -2,0,1,1) THE SOLUTIONS : 48 12 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.89415083856842E-01 -2.87322206334911E-50 x2 : -9.21062371647419E-01 -7.21646471724893E-50 x3 : 5.75259014495853E-01 4.44748047759341E-48 x4 : -8.17971311380332E-01 3.93430965325571E-48 x5 : 8.08477989701551E-01 -8.55284707229503E-48 x6 : -5.88526414163492E-01 -7.52650542361962E-48 x7 : 6.27366977109340E-01 4.10536659470161E-48 x8 : -7.78723748214146E-01 3.76325271180981E-48 x9 : 9.84086361717633E-01 -2.40548823908298E-50 x10 : 1.77690834545149E-01 -3.42113882891801E-49 x11 : 9.40301932754719E-01 1.49674823765163E-49 x12 : -3.40341409848611E-01 3.10040706370695E-49 == err : 8.640E-16 = rco : 3.391E-02 = res : 8.882E-16 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.89415083856842E-01 -1.37091205084606E-30 x2 : 9.21062371647419E-01 -1.81857028142917E-31 x3 : -3.08457430339590E+00 -1.12748434939333E+00 x4 : -1.18298149617247E+00 2.93986783637120E+00 x5 : 5.51926701023123E+00 2.78748170612766E+00 x6 : 2.82446248609853E+00 -5.44700306623820E+00 x7 : 2.18528888972524E+00 -2.19251036407534E+00 x8 : 2.30971002700246E+00 2.07440262336281E+00 x9 : 4.22761702728453E-01 4.87287884168481E-02 x10 : 9.07833668459021E-01 -2.26921145125288E-02 x11 : 6.32896057637868E-01 5.02771683764591E-03 x12 : 7.74264004141422E-01 -4.10973795558809E-03 == err : 7.460E-15 = rco : 3.843E-03 = res : 3.553E-15 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.89415083856842E-01 1.72523275534842E-30 x2 : -9.21062371647419E-01 3.54433146416023E-31 x3 : -3.08457430339590E+00 -1.12748434939333E+00 x4 : 1.18298149617247E+00 -2.93986783637120E+00 x5 : 5.51926701023123E+00 2.78748170612766E+00 x6 : -2.82446248609853E+00 5.44700306623820E+00 x7 : 2.18528888972524E+00 -2.19251036407534E+00 x8 : -2.30971002700246E+00 -2.07440262336281E+00 x9 : 4.22761702728453E-01 4.87287884168481E-02 x10 : -9.07833668459021E-01 2.26921145125288E-02 x11 : -6.32896057637867E-01 -5.02771683764594E-03 x12 : -7.74264004141422E-01 4.10973795558812E-03 == err : 8.150E-15 = rco : 3.843E-03 = res : 5.024E-15 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.89415083856842E-01 3.74187059412907E-50 x2 : 9.21062371647419E-01 4.27642353614751E-50 x3 : 5.75259014495853E-01 1.79609788518196E-48 x4 : 8.17971311380332E-01 -1.71056941445901E-48 x5 : 8.08477989701551E-01 -3.59219577036391E-48 x6 : 5.88526414163492E-01 3.07902494602621E-48 x7 : 6.27366977109340E-01 1.53951247301310E-48 x8 : 7.78723748214146E-01 -1.53951247301310E-48 x9 : 9.84086361717633E-01 -8.68648530779963E-51 x10 : -1.77690834545149E-01 1.44329294344979E-49 x11 : -9.40301932754719E-01 0.00000000000000E+00 x12 : 3.40341409848611E-01 -7.48374118825815E-50 == err : 8.640E-16 = rco : 3.225E-02 = res : 8.882E-16 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.89415083856842E-01 3.07902494602621E-48 x2 : -9.21062371647419E-01 -1.36845553156720E-48 x3 : 5.75259014495853E-01 2.87375661629113E-47 x4 : -8.17971311380332E-01 1.83579958778635E-47 x5 : 8.08477989701551E-01 -5.75494802158566E-47 x6 : -5.88526414163493E-01 -4.37905770101505E-47 x7 : 6.27366977109341E-01 3.01060216944785E-47 x8 : -7.78723748214146E-01 8.89496095518683E-48 x9 : 9.84086361717633E-01 -6.84227765783602E-49 x10 : 1.77690834545150E-01 1.36845553156720E-48 x11 : -9.99733562617972E-01 4.06260235934014E-49 x12 : -2.30825426497600E-02 -1.36845553156720E-48 == err : 7.994E-16 = rco : 3.370E-02 = res : 5.412E-16 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.89415083856842E-01 3.87145567347627E-32 x2 : 9.21062371647419E-01 8.26799056619022E-31 x3 : -3.08457430339590E+00 -1.12748434939333E+00 x4 : -1.18298149617247E+00 2.93986783637120E+00 x5 : 5.51926701023123E+00 2.78748170612766E+00 x6 : 2.82446248609853E+00 -5.44700306623820E+00 x7 : 2.18528888972524E+00 -2.19251036407534E+00 x8 : 2.30971002700246E+00 2.07440262336281E+00 x9 : 4.22761702728453E-01 4.87287884168482E-02 x10 : 9.07833668459021E-01 -2.26921145125288E-02 x11 : -7.34696844899792E-01 -1.63682788488653E-02 x12 : -6.78824208644993E-01 1.77155185002992E-02 == err : 1.078E-14 = rco : 3.904E-03 = res : 1.005E-14 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.89415083856842E-01 -1.03822132541497E-31 x2 : -9.21062371647419E-01 -2.02427767924878E-32 x3 : -3.08457430339590E+00 -1.12748434939333E+00 x4 : 1.18298149617247E+00 -2.93986783637120E+00 x5 : 5.51926701023123E+00 2.78748170612766E+00 x6 : -2.82446248609853E+00 5.44700306623820E+00 x7 : 2.18528888972524E+00 -2.19251036407534E+00 x8 : -2.30971002700246E+00 -2.07440262336281E+00 x9 : 4.22761702728453E-01 4.87287884168481E-02 x10 : -9.07833668459021E-01 2.26921145125288E-02 x11 : 7.34696844899792E-01 1.63682788488653E-02 x12 : 6.78824208644992E-01 -1.77155185002992E-02 == err : 7.992E-15 = rco : 3.904E-03 = res : 1.589E-14 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.89415083856842E-01 -4.10536659470161E-48 x2 : 9.21062371647419E-01 4.10536659470161E-48 x3 : 5.75259014495853E-01 2.18952885050753E-47 x4 : 8.17971311380332E-01 -6.56858655152258E-47 x5 : 8.08477989701551E-01 -4.37905770101505E-47 x6 : 5.88526414163493E-01 0.00000000000000E+00 x7 : 6.27366977109341E-01 -2.18952885050753E-47 x8 : 7.78723748214146E-01 6.56858655152258E-47 x9 : 9.84086361717633E-01 -1.02634164867540E-47 x10 : -1.77690834545150E-01 -6.84227765783602E-47 x11 : 9.99733562617972E-01 -1.71056941445901E-49 x12 : 2.30825426497600E-02 -5.20013101995538E-47 == err : 6.930E-16 = rco : 3.199E-02 = res : 2.220E-16 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.89415083856842E-01 1.56574904758305E-30 x2 : 9.21062371647419E-01 -5.88271702973549E-31 x3 : -1.66814300276215E+00 2.60968969868373E+00 x4 : -2.74607605173298E+00 -1.58529317041035E+00 x5 : 3.42882833936714E+00 -5.05527774520946E+00 x6 : 5.12313078715411E+00 3.38341539896057E+00 x7 : 2.11687232955215E+00 2.28148639436773E+00 x8 : 2.40165709157283E+00 -2.01095128669009E+00 x9 : 5.09486080364478E-01 2.15618991998569E-02 x10 : -8.60843598054382E-01 1.27613047635804E-02 x11 : 8.57813431291869E-01 4.79408655973425E-03 x12 : -5.14045817407173E-01 8.00012703626073E-03 == err : 6.791E-15 = rco : 4.642E-03 = res : 7.105E-15 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.89415083856842E-01 -1.07004234414235E-31 x2 : -9.21062371647419E-01 -1.24459966309488E-31 x3 : -1.66814300276214E+00 2.60968969868372E+00 x4 : 2.74607605173297E+00 1.58529317041035E+00 x5 : 3.42882833936714E+00 -5.05527774520945E+00 x6 : -5.12313078715411E+00 -3.38341539896057E+00 x7 : 2.11687232955215E+00 2.28148639436773E+00 x8 : -2.40165709157283E+00 2.01095128669009E+00 x9 : 5.09486080364479E-01 2.15618991998569E-02 x10 : 8.60843598054382E-01 -1.27613047635804E-02 x11 : -8.57813431291869E-01 -4.79408655973423E-03 x12 : 5.14045817407173E-01 -8.00012703626069E-03 == err : 7.173E-15 = rco : 4.642E-03 = res : 7.105E-15 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.89415083856842E-01 4.30220786767705E-32 x2 : 9.21062371647419E-01 2.33215602623103E-31 x3 : -1.66814300276215E+00 2.60968969868373E+00 x4 : -2.74607605173297E+00 -1.58529317041035E+00 x5 : 3.42882833936714E+00 -5.05527774520946E+00 x6 : 5.12313078715411E+00 3.38341539896057E+00 x7 : 2.11687232955215E+00 2.28148639436773E+00 x8 : 2.40165709157283E+00 -2.01095128669009E+00 x9 : 5.09486080364479E-01 2.15618991998569E-02 x10 : -8.60843598054382E-01 1.27613047635804E-02 x11 : -7.77847414131604E-01 -1.58035359040089E-03 x12 : 6.28458211691578E-01 -1.95601542129298E-03 == err : 6.119E-15 = rco : 4.613E-03 = res : 3.553E-15 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.89415083856842E-01 -5.02603258121557E-33 x2 : -9.21062371647419E-01 1.44662346941344E-31 x3 : -1.66814300276214E+00 2.60968969868373E+00 x4 : 2.74607605173297E+00 1.58529317041035E+00 x5 : 3.42882833936714E+00 -5.05527774520946E+00 x6 : -5.12313078715411E+00 -3.38341539896057E+00 x7 : 2.11687232955215E+00 2.28148639436773E+00 x8 : -2.40165709157283E+00 2.01095128669009E+00 x9 : 5.09486080364479E-01 2.15618991998570E-02 x10 : 8.60843598054382E-01 -1.27613047635805E-02 x11 : 7.77847414131604E-01 1.58035359040086E-03 x12 : -6.28458211691578E-01 1.95601542129294E-03 == err : 7.868E-15 = rco : 4.613E-03 = res : 7.944E-15 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.89415083856842E-01 8.75811540203011E-46 x2 : -9.21062371647419E-01 7.77720647700274E-44 x3 : 6.26140621849592E-01 1.70935991872198E-40 x4 : -7.79710152344964E-01 1.24659511386336E-40 x5 : 6.07900231883578E-01 -3.02052686582143E-40 x6 : -7.94013418070433E-01 -2.66896910709162E-40 x7 : 8.75877670684069E-01 9.12077144459737E-41 x8 : -4.82533217506370E-01 1.59277188649016E-40 x9 : 9.37998305193623E-01 1.74433632839153E-41 x10 : -3.46639841123160E-01 4.52899663669781E-41 x11 : -8.62987387721747E-01 -2.04253264159985E-41 x12 : -5.05225463167876E-01 3.39898955506628E-41 == err : 6.388E-15 = rco : 8.154E-03 = res : 8.882E-16 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.89415083856842E-01 -6.37590801267792E-44 x2 : 9.21062371647419E-01 -1.60974161089313E-43 x3 : 6.26140621849592E-01 6.36750022189197E-41 x4 : 7.79710152344963E-01 -4.71733115030306E-41 x5 : 6.07900231883578E-01 -1.13718172976888E-40 x6 : 7.94013418070433E-01 1.01162538736537E-40 x7 : 8.75877670684069E-01 3.60526068901489E-41 x8 : 4.82533217506370E-01 -6.00876781502482E-41 x9 : 9.37998305193623E-01 6.23297556931679E-42 x10 : 3.46639841123161E-01 -1.58290674530131E-41 x11 : 8.62987387721747E-01 7.10738581105547E-42 x12 : 5.05225463167876E-01 -1.18157486511869E-41 == err : 3.535E-15 = rco : 8.043E-03 = res : 8.882E-16 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.89415083856842E-01 2.42599796636234E-44 x2 : -9.21062371647419E-01 -1.03345761743955E-44 x3 : 6.26140621849592E-01 1.31834159523679E-41 x4 : -7.79710152344964E-01 9.73061653627153E-42 x5 : 6.07900231883578E-01 -2.33176064463649E-41 x6 : -7.94013418070433E-01 -2.06271133948613E-41 x7 : 8.75877670684069E-01 7.21948968820146E-42 x8 : -4.82533217506370E-01 1.21072187317664E-41 x9 : 9.37998305193623E-01 1.23314264860584E-42 x10 : -3.46639841123160E-01 3.07164623380000E-42 x11 : 9.88193097648288E-01 5.63321982658577E-43 x12 : 1.53213582166468E-01 -3.31827476352117E-42 == err : 1.338E-15 = rco : 8.094E-03 = res : 8.882E-16 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.89415083856842E-01 1.36188694501568E-44 x2 : 9.21062371647419E-01 3.47697181460595E-44 x3 : 6.26140621849592E-01 6.45718332360876E-41 x4 : 7.79710152344963E-01 -4.64558466892963E-41 x5 : 6.07900231883577E-01 -1.14076905383755E-40 x6 : 7.94013418070434E-01 9.97276091090686E-41 x7 : 8.75877670684069E-01 3.39002124489460E-41 x8 : 4.82533217506370E-01 -6.02670443536817E-41 x9 : 9.37998305193624E-01 6.68139107790073E-42 x10 : 3.46639841123160E-01 -1.73536801821985E-41 x11 : -9.88193097648288E-01 -3.36311631437956E-42 x12 : -1.53213582166467E-01 1.83850358519416E-41 == err : 2.900E-15 = rco : 7.991E-03 = res : 8.882E-16 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.89415083856842E-01 7.84702303830901E-32 x2 : 9.21062371647419E-01 -1.67588887889235E-30 x3 : 8.12447299105426E-01 5.16786840383107E-01 x4 : 9.06404061572963E-01 -4.63217333728468E-01 x5 : 1.23611304332968E+00 -1.24952222803037E+00 x6 : 1.46469772617762E+00 1.05451841454651E+00 x7 : -9.39467983975633E-01 9.48683934911419E-01 x8 : -1.23891712639201E+00 -7.19384827907607E-01 x9 : 1.71925348920786E+00 -3.34751466405344E-01 x10 : 4.06076515006418E-01 1.41727631460229E+00 x11 : 2.26935708206733E-02 1.44499739394751E+00 x12 : -1.75722813380886E+00 1.86612939232641E-02 == err : 5.686E-15 = rco : 1.917E-02 = res : 9.778E-16 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.89415083856842E-01 -2.32069012450183E-31 x2 : -9.21062371647419E-01 -7.86303112189558E-31 x3 : -1.66814300276214E+00 -2.60968969868373E+00 x4 : 2.74607605173298E+00 -1.58529317041035E+00 x5 : 3.42882833936714E+00 5.05527774520946E+00 x6 : -5.12313078715411E+00 3.38341539896057E+00 x7 : 2.11687232955215E+00 -2.28148639436773E+00 x8 : -2.40165709157283E+00 -2.01095128669009E+00 x9 : 5.09486080364479E-01 -2.15618991998569E-02 x10 : 8.60843598054382E-01 1.27613047635804E-02 x11 : -8.57813431291869E-01 4.79408655973425E-03 x12 : 5.14045817407173E-01 8.00012703626073E-03 == err : 5.674E-15 = rco : 4.642E-03 = res : 7.324E-15 == solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.89415083856842E-01 -4.05357743317086E-31 x2 : 9.21062371647419E-01 -9.73898397361824E-31 x3 : 8.23145787536120E-01 5.60379372510051E-01 x4 : 9.37349006938816E-01 -4.92104772597142E-01 x5 : 1.04914305688734E+00 -9.62741326591088E-01 x6 : 1.22651709460876E+00 8.23513494276851E-01 x7 : -5.97623476383049E-01 2.44344535652022E-01 x8 : -8.55390699351840E-01 -1.70712670762276E-01 x9 : 1.52914291606202E+00 1.89564431625379E-01 x10 : 2.48202441735159E-01 -1.16788177316392E+00 x11 : 3.71549559703573E-01 -2.83174538077762E+00 x12 : -3.00061342433028E+00 -3.50639552862555E-01 == err : 5.706E-15 = rco : 5.611E-03 = res : 2.701E-15 == solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.89415083856842E-01 5.48584085661725E-31 x2 : 9.21062371647419E-01 -8.08816062679508E-31 x3 : 8.12447299105426E-01 5.16786840383107E-01 x4 : 9.06404061572963E-01 -4.63217333728468E-01 x5 : 1.23611304332968E+00 -1.24952222803037E+00 x6 : 1.46469772617762E+00 1.05451841454651E+00 x7 : -9.39467983975633E-01 9.48683934911419E-01 x8 : -1.23891712639201E+00 -7.19384827907607E-01 x9 : 1.71925348920786E+00 -3.34751466405344E-01 x10 : 4.06076515006418E-01 1.41727631460229E+00 x11 : -6.05809492048029E-02 -5.28028309584329E-01 x12 : 1.12957771194285E+00 -2.83189512889793E-02 == err : 5.285E-15 = rco : 3.780E-02 = res : 8.882E-16 == solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.89415083856842E-01 -1.02132701423084E-31 x2 : -9.21062371647419E-01 -3.70667094281775E-31 x3 : -1.66814300276215E+00 -2.60968969868373E+00 x4 : 2.74607605173297E+00 -1.58529317041035E+00 x5 : 3.42882833936714E+00 5.05527774520946E+00 x6 : -5.12313078715411E+00 3.38341539896057E+00 x7 : 2.11687232955215E+00 -2.28148639436773E+00 x8 : -2.40165709157283E+00 -2.01095128669009E+00 x9 : 5.09486080364479E-01 -2.15618991998569E-02 x10 : 8.60843598054382E-01 1.27613047635804E-02 x11 : 7.77847414131604E-01 -1.58035359040091E-03 x12 : -6.28458211691578E-01 -1.95601542129299E-03 == err : 6.032E-15 = rco : 4.613E-03 = res : 7.105E-15 == solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.89415083856842E-01 2.66886858450598E-31 x2 : 9.21062371647419E-01 6.46554607154143E-31 x3 : 8.23145787536120E-01 5.60379372510051E-01 x4 : 9.37349006938816E-01 -4.92104772597142E-01 x5 : 1.04914305688734E+00 -9.62741326591088E-01 x6 : 1.22651709460876E+00 8.23513494276851E-01 x7 : -5.97623476383049E-01 2.44344535652022E-01 x8 : -8.55390699351840E-01 -1.70712670762275E-01 x9 : 1.52914291606202E+00 1.89564431625379E-01 x10 : 2.48202441735159E-01 -1.16788177316392E+00 x11 : -1.45894122879726E-01 8.62915178631412E-01 x12 : 1.31623928166929E+00 9.56469350666771E-02 == err : 5.228E-15 = rco : 2.878E-02 = res : 9.114E-16 == solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.89415083856842E-01 1.21114722566236E-30 x2 : 9.21062371647419E-01 4.46639148878638E-31 x3 : -1.66814300276214E+00 -2.60968969868373E+00 x4 : -2.74607605173298E+00 1.58529317041035E+00 x5 : 3.42882833936714E+00 5.05527774520946E+00 x6 : 5.12313078715411E+00 -3.38341539896057E+00 x7 : 2.11687232955215E+00 -2.28148639436773E+00 x8 : 2.40165709157283E+00 2.01095128669009E+00 x9 : 5.09486080364479E-01 -2.15618991998570E-02 x10 : -8.60843598054382E-01 -1.27613047635804E-02 x11 : 8.57813431291869E-01 -4.79408655973426E-03 x12 : -5.14045817407173E-01 -8.00012703626075E-03 == err : 1.063E-14 = rco : 4.642E-03 = res : 3.972E-15 == solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.89415083856842E-01 3.00266311165013E-32 x2 : -9.21062371647419E-01 2.22990503606788E-30 x3 : 8.12447299105426E-01 5.16786840383107E-01 x4 : -9.06404061572963E-01 4.63217333728468E-01 x5 : 1.23611304332968E+00 -1.24952222803037E+00 x6 : -1.46469772617762E+00 -1.05451841454651E+00 x7 : -9.39467983975633E-01 9.48683934911419E-01 x8 : 1.23891712639201E+00 7.19384827907607E-01 x9 : 1.71925348920786E+00 -3.34751466405344E-01 x10 : -4.06076515006418E-01 -1.41727631460229E+00 x11 : -2.26935708206733E-02 -1.44499739394751E+00 x12 : 1.75722813380886E+00 -1.86612939232641E-02 == err : 6.627E-15 = rco : 1.844E-02 = res : 9.114E-16 == solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.89415083856842E-01 -1.30197206937695E-31 x2 : -9.21062371647419E-01 -3.18158119234600E-31 x3 : 8.23145787536120E-01 5.60379372510051E-01 x4 : -9.37349006938816E-01 4.92104772597142E-01 x5 : 1.04914305688734E+00 -9.62741326591088E-01 x6 : -1.22651709460876E+00 -8.23513494276851E-01 x7 : -5.97623476383049E-01 2.44344535652022E-01 x8 : 8.55390699351840E-01 1.70712670762275E-01 x9 : 1.52914291606202E+00 1.89564431625379E-01 x10 : -2.48202441735159E-01 1.16788177316392E+00 x11 : -3.71549559703573E-01 2.83174538077761E+00 x12 : 3.00061342433027E+00 3.50639552862555E-01 == err : 6.484E-15 = rco : 5.611E-03 = res : 1.601E-15 == solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.89415083856842E-01 2.00811454378731E-32 x2 : 9.21062371647419E-01 1.02379814251086E-31 x3 : -1.66814300276214E+00 -2.60968969868373E+00 x4 : -2.74607605173297E+00 1.58529317041035E+00 x5 : 3.42882833936714E+00 5.05527774520946E+00 x6 : 5.12313078715411E+00 -3.38341539896057E+00 x7 : 2.11687232955215E+00 -2.28148639436773E+00 x8 : 2.40165709157283E+00 2.01095128669009E+00 x9 : 5.09486080364479E-01 -2.15618991998569E-02 x10 : -8.60843598054382E-01 -1.27613047635804E-02 x11 : -7.77847414131604E-01 1.58035359040080E-03 x12 : 6.28458211691578E-01 1.95601542129286E-03 == err : 7.932E-15 = rco : 4.613E-03 = res : 7.324E-15 == solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.89415083856842E-01 -8.87892302478894E-31 x2 : -9.21062371647419E-01 -1.86923145177691E-31 x3 : 8.12447299105426E-01 5.16786840383107E-01 x4 : -9.06404061572963E-01 4.63217333728468E-01 x5 : 1.23611304332968E+00 -1.24952222803037E+00 x6 : -1.46469772617762E+00 -1.05451841454651E+00 x7 : -9.39467983975633E-01 9.48683934911419E-01 x8 : 1.23891712639201E+00 7.19384827907607E-01 x9 : 1.71925348920786E+00 -3.34751466405344E-01 x10 : -4.06076515006418E-01 -1.41727631460228E+00 x11 : 6.05809492048028E-02 5.28028309584330E-01 x12 : -1.12957771194285E+00 2.83189512889793E-02 == err : 5.330E-15 = rco : 3.798E-02 = res : 9.778E-16 == solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.89415083856842E-01 -3.42960581194187E-31 x2 : -9.21062371647419E-01 -8.16111660016590E-31 x3 : 8.23145787536120E-01 5.60379372510051E-01 x4 : -9.37349006938816E-01 4.92104772597142E-01 x5 : 1.04914305688734E+00 -9.62741326591088E-01 x6 : -1.22651709460876E+00 -8.23513494276851E-01 x7 : -5.97623476383049E-01 2.44344535652022E-01 x8 : 8.55390699351840E-01 1.70712670762275E-01 x9 : 1.52914291606202E+00 1.89564431625379E-01 x10 : -2.48202441735159E-01 1.16788177316392E+00 x11 : 1.45894122879726E-01 -8.62915178631412E-01 x12 : -1.31623928166929E+00 -9.56469350666771E-02 == err : 4.968E-15 = rco : 3.083E-02 = res : 9.114E-16 == solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.89415083856842E-01 9.56866682505458E-31 x2 : -9.21062371647419E-01 3.71242671323870E-31 x3 : 8.12447299105426E-01 -5.16786840383107E-01 x4 : -9.06404061572963E-01 -4.63217333728468E-01 x5 : 1.23611304332968E+00 1.24952222803037E+00 x6 : -1.46469772617762E+00 1.05451841454651E+00 x7 : -9.39467983975633E-01 -9.48683934911419E-01 x8 : 1.23891712639201E+00 -7.19384827907607E-01 x9 : 1.71925348920786E+00 3.34751466405344E-01 x10 : -4.06076515006418E-01 1.41727631460229E+00 x11 : -2.26935708206749E-02 1.44499739394750E+00 x12 : 1.75722813380886E+00 1.86612939232654E-02 == err : 5.319E-15 = rco : 1.844E-02 = res : 1.093E-15 == solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.89415083856842E-01 -6.83319124261855E-32 x2 : -9.21062371647419E-01 -1.71642311902469E-31 x3 : 8.23145787536120E-01 -5.60379372510051E-01 x4 : -9.37349006938816E-01 -4.92104772597142E-01 x5 : 1.04914305688734E+00 9.62741326591088E-01 x6 : -1.22651709460876E+00 8.23513494276851E-01 x7 : -5.97623476383049E-01 -2.44344535652022E-01 x8 : 8.55390699351840E-01 -1.70712670762276E-01 x9 : 1.52914291606202E+00 -1.89564431625379E-01 x10 : -2.48202441735159E-01 -1.16788177316392E+00 x11 : -3.71549559703573E-01 -2.83174538077761E+00 x12 : 3.00061342433028E+00 -3.50639552862555E-01 == err : 4.903E-15 = rco : 5.611E-03 = res : 1.776E-15 == solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.89415083856842E-01 6.62726235031100E-56 x2 : 9.21062371647419E-01 1.19800511717160E-55 x3 : 5.64604874232219E-01 3.78467659143914E-53 x4 : 8.25361336623675E-01 -2.70800135421939E-53 x5 : 7.17403428624497E-01 -6.59055751267851E-53 x6 : 6.96657965286995E-01 5.67701488715871E-53 x7 : 8.41478520054349E-01 1.94127807922956E-53 x8 : 5.40290570237111E-01 -3.39315832335923E-53 x9 : 9.32004841587325E-01 3.79283322202414E-54 x10 : 3.62445823893426E-01 -9.54325778444784E-54 x11 : -9.85432012846133E-01 -2.01876606978704E-54 x12 : -1.70069832886432E-01 1.00326556195477E-53 == err : 1.253E-15 = rco : 9.022E-03 = res : 8.882E-16 == solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.89415083856842E-01 1.16654194966947E-30 x2 : -9.21062371647419E-01 8.06183769302334E-31 x3 : 8.12447299105426E-01 -5.16786840383107E-01 x4 : -9.06404061572963E-01 -4.63217333728468E-01 x5 : 1.23611304332968E+00 1.24952222803037E+00 x6 : -1.46469772617762E+00 1.05451841454651E+00 x7 : -9.39467983975633E-01 -9.48683934911419E-01 x8 : 1.23891712639201E+00 -7.19384827907607E-01 x9 : 1.71925348920786E+00 3.34751466405344E-01 x10 : -4.06076515006418E-01 1.41727631460229E+00 x11 : 6.05809492048028E-02 -5.28028309584329E-01 x12 : -1.12957771194285E+00 -2.83189512889792E-02 == err : 5.344E-15 = rco : 3.798E-02 = res : 4.965E-16 == solution 33 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.89415083856842E-01 2.64172633303269E-31 x2 : -9.21062371647419E-01 6.21009803524653E-31 x3 : 8.23145787536120E-01 -5.60379372510051E-01 x4 : -9.37349006938816E-01 -4.92104772597142E-01 x5 : 1.04914305688734E+00 9.62741326591088E-01 x6 : -1.22651709460876E+00 8.23513494276851E-01 x7 : -5.97623476383049E-01 -2.44344535652022E-01 x8 : 8.55390699351840E-01 -1.70712670762275E-01 x9 : 1.52914291606202E+00 -1.89564431625379E-01 x10 : -2.48202441735159E-01 -1.16788177316392E+00 x11 : 1.45894122879726E-01 8.62915178631412E-01 x12 : -1.31623928166929E+00 9.56469350666772E-02 == err : 5.188E-15 = rco : 3.083E-02 = res : 9.114E-16 == solution 34 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.89415083856842E-01 -4.07831529249908E-55 x2 : 9.21062371647419E-01 -1.22349458774972E-54 x3 : 5.64604874232219E-01 3.00164005527932E-52 x4 : 8.25361336623676E-01 -2.28385656379948E-52 x5 : 7.17403428624497E-01 -5.32464844588680E-52 x6 : 6.96657965286995E-01 4.85482652419090E-52 x7 : 8.41478520054349E-01 1.68352855274362E-52 x8 : 5.40290570237111E-01 -2.81893153017536E-52 x9 : 9.32004841587325E-01 2.83850744357936E-53 x10 : 3.62445823893426E-01 -7.42253383234832E-53 x11 : 8.55915113396959E-01 3.42578484569923E-53 x12 : 5.17116349247122E-01 -5.70964140949871E-53 == err : 1.388E-15 = rco : 8.418E-03 = res : 8.882E-16 == solution 35 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.89415083856842E-01 -1.20818676970718E-30 x2 : 9.21062371647419E-01 -8.58408097143961E-31 x3 : 8.12447299105426E-01 -5.16786840383107E-01 x4 : 9.06404061572963E-01 4.63217333728468E-01 x5 : 1.23611304332968E+00 1.24952222803037E+00 x6 : 1.46469772617762E+00 -1.05451841454651E+00 x7 : -9.39467983975633E-01 -9.48683934911419E-01 x8 : -1.23891712639201E+00 7.19384827907607E-01 x9 : 1.71925348920786E+00 3.34751466405344E-01 x10 : 4.06076515006418E-01 -1.41727631460229E+00 x11 : 2.26935708206742E-02 -1.44499739394751E+00 x12 : -1.75722813380886E+00 -1.86612939232648E-02 == err : 5.239E-15 = rco : 1.917E-02 = res : 9.778E-16 == solution 36 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.89415083856842E-01 -3.77562782938391E-56 x2 : -9.21062371647419E-01 -1.56760244055433E-55 x3 : 5.64604874232219E-01 -9.05385994934795E-53 x4 : -8.25361336623676E-01 -6.77000338554847E-53 x5 : 7.17403428624498E-01 1.61175020359564E-52 x6 : -6.96657965286995E-01 1.44535493966167E-52 x7 : 8.41478520054349E-01 -5.13867726854884E-53 x8 : -5.40290570237111E-01 -8.48289580839808E-53 x9 : 9.32004841587325E-01 -8.70720314948553E-54 x10 : -3.62445823893426E-01 -2.25123004145949E-53 x11 : 9.85432012846133E-01 -3.98655319841785E-54 x12 : 1.70069832886432E-01 2.42659759903695E-53 == err : 3.538E-15 = rco : 9.182E-03 = res : 8.882E-16 == solution 37 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.89415083856842E-01 5.25160343062428E-32 x2 : 9.21062371647419E-01 1.29539369892075E-31 x3 : 8.23145787536120E-01 -5.60379372510051E-01 x4 : 9.37349006938816E-01 4.92104772597142E-01 x5 : 1.04914305688734E+00 9.62741326591088E-01 x6 : 1.22651709460876E+00 -8.23513494276851E-01 x7 : -5.97623476383049E-01 -2.44344535652022E-01 x8 : -8.55390699351840E-01 1.70712670762275E-01 x9 : 1.52914291606202E+00 -1.89564431625379E-01 x10 : 2.48202441735159E-01 1.16788177316392E+00 x11 : 3.71549559703572E-01 2.83174538077761E+00 x12 : -3.00061342433028E+00 3.50639552862554E-01 == err : 7.193E-15 = rco : 5.611E-03 = res : 9.930E-16 == solution 38 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.89415083856842E-01 -5.17046206738971E-31 x2 : 9.21062371647419E-01 1.21651594044325E-30 x3 : 8.12447299105426E-01 -5.16786840383107E-01 x4 : 9.06404061572963E-01 4.63217333728468E-01 x5 : 1.23611304332968E+00 1.24952222803037E+00 x6 : 1.46469772617762E+00 -1.05451841454651E+00 x7 : -9.39467983975633E-01 -9.48683934911419E-01 x8 : -1.23891712639201E+00 7.19384827907607E-01 x9 : 1.71925348920786E+00 3.34751466405344E-01 x10 : 4.06076515006418E-01 -1.41727631460229E+00 x11 : -6.05809492048029E-02 5.28028309584329E-01 x12 : 1.12957771194285E+00 2.83189512889793E-02 == err : 5.283E-15 = rco : 3.780E-02 = res : 9.114E-16 == solution 39 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.89415083856842E-01 6.19903924459860E-54 x2 : -9.21062371647419E-01 2.62643504836941E-53 x3 : 5.64604874232219E-01 2.02545450686674E-51 x4 : -8.25361336623675E-01 1.44078722653407E-51 x5 : 7.17403428624497E-01 -3.59152757918639E-51 x6 : -6.96657965286995E-01 -3.04862224744891E-51 x7 : 8.41478520054349E-01 1.02316774058217E-51 x8 : -5.40290570237111E-01 1.75400184099800E-51 x9 : 9.32004841587325E-01 2.27080595486349E-52 x10 : -3.62445823893426E-01 6.21208985353460E-52 x11 : -8.55915113396959E-01 -2.92333640166334E-52 x12 : -5.17116349247122E-01 4.90702895993489E-52 == err : 1.160E-15 = rco : 8.391E-03 = res : 8.882E-16 == solution 40 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.89415083856842E-01 -1.46083718121979E-31 x2 : 9.21062371647419E-01 -3.42783096084109E-31 x3 : 8.23145787536120E-01 -5.60379372510051E-01 x4 : 9.37349006938816E-01 4.92104772597142E-01 x5 : 1.04914305688734E+00 9.62741326591088E-01 x6 : 1.22651709460876E+00 -8.23513494276851E-01 x7 : -5.97623476383049E-01 -2.44344535652022E-01 x8 : -8.55390699351840E-01 1.70712670762276E-01 x9 : 1.52914291606202E+00 -1.89564431625379E-01 x10 : 2.48202441735159E-01 1.16788177316392E+00 x11 : -1.45894122879726E-01 -8.62915178631412E-01 x12 : 1.31623928166929E+00 -9.56469350666770E-02 == err : 4.903E-15 = rco : 2.878E-02 = res : 9.114E-16 == solution 41 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.89415083856842E-01 2.09906533045255E-30 x2 : 9.21062371647419E-01 1.19318895541342E-30 x3 : -3.08457430339590E+00 1.12748434939333E+00 x4 : -1.18298149617247E+00 -2.93986783637120E+00 x5 : 5.51926701023123E+00 -2.78748170612766E+00 x6 : 2.82446248609853E+00 5.44700306623820E+00 x7 : 2.18528888972524E+00 2.19251036407534E+00 x8 : 2.30971002700246E+00 -2.07440262336281E+00 x9 : 4.22761702728453E-01 -4.87287884168481E-02 x10 : 9.07833668459021E-01 2.26921145125288E-02 x11 : 6.32896057637867E-01 -5.02771683764590E-03 x12 : 7.74264004141422E-01 4.10973795558808E-03 == err : 8.150E-15 = rco : 3.843E-03 = res : 5.024E-15 == solution 42 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.89415083856842E-01 -3.22740331715972E-31 x2 : 9.21062371647419E-01 -1.33554077462447E-30 x3 : -3.08457430339590E+00 1.12748434939333E+00 x4 : -1.18298149617247E+00 -2.93986783637120E+00 x5 : 5.51926701023123E+00 -2.78748170612766E+00 x6 : 2.82446248609853E+00 5.44700306623820E+00 x7 : 2.18528888972524E+00 2.19251036407534E+00 x8 : 2.30971002700246E+00 -2.07440262336281E+00 x9 : 4.22761702728453E-01 -4.87287884168482E-02 x10 : 9.07833668459021E-01 2.26921145125288E-02 x11 : -7.34696844899792E-01 1.63682788488653E-02 x12 : -6.78824208644992E-01 -1.77155185002992E-02 == err : 1.079E-14 = rco : 3.904E-03 = res : 1.005E-14 == solution 43 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.89415083856842E-01 7.48374118825815E-50 x2 : 9.21062371647419E-01 9.62195295633190E-50 x3 : 7.30467265581230E-01 -1.47108969643474E-47 x4 : 6.82947709502185E-01 1.20595143719360E-47 x5 : 5.01061086394409E-01 2.90796800458031E-47 x6 : 8.65411917933452E-01 -2.53164273339933E-47 x7 : 7.76576030467492E-01 -1.35134983742261E-47 x8 : 6.30023546308670E-01 1.36845553156720E-47 x9 : 9.85556337261790E-01 -3.10040706370695E-49 x10 : -1.69347884790821E-01 -1.28292706084425E-48 x11 : 9.99515580871569E-01 -2.23175853292698E-49 x12 : 3.11223969991191E-02 -1.11187011939835E-48 == err : 2.320E-15 = rco : 2.869E-02 = res : 8.882E-16 == solution 44 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.89415083856842E-01 -4.52692997467398E-54 x2 : 9.21062371647419E-01 -6.72922023262348E-54 x3 : 7.30467265581230E-01 -2.40131204422346E-52 x4 : 6.82947709502185E-01 2.92333640166334E-52 x5 : 5.01061086394409E-01 4.90702895993489E-52 x6 : 8.65411917933451E-01 -5.42905331737477E-52 x7 : 7.76576030467492E-01 -2.50571691571143E-52 x8 : 6.30023546308670E-01 2.53181813358343E-52 x9 : 9.85556337261790E-01 2.61012178719941E-54 x10 : -1.69347884790821E-01 6.78631664671847E-53 x11 : -9.42471422417144E-01 -2.74062787655938E-53 x12 : 3.34286730109057E-01 -7.56935318287829E-53 == err : 1.617E-15 = rco : 2.814E-02 = res : 8.882E-16 == solution 45 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.89415083856842E-01 1.01142219253977E-53 x2 : -9.21062371647419E-01 1.99021786273955E-53 x3 : 7.30467265581230E-01 -3.54976563059120E-52 x4 : -6.82947709502185E-01 -3.54976563059120E-52 x5 : 5.01061086394409E-01 6.26429228927858E-52 x6 : -8.65411917933451E-01 6.26429228927858E-52 x7 : 7.76576030467492E-01 -1.87928768678358E-52 x8 : -6.30023546308671E-01 -2.08809742975953E-52 x9 : 9.85556337261790E-01 7.11156229129527E-54 x10 : 1.69347884790821E-01 -3.84992963611913E-53 x11 : 9.42471422417144E-01 5.83199086827368E-54 x12 : -3.34286730109057E-01 1.68026590050962E-53 == err : 8.670E-16 = rco : 2.351E-02 = res : 8.882E-16 == solution 46 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.89415083856842E-01 -3.20731765211063E-49 x2 : -9.21062371647419E-01 -2.56585412168851E-49 x3 : 7.30467265581230E-01 8.55284707229503E-48 x4 : -6.82947709502185E-01 7.18439154072782E-48 x5 : 5.01061086394409E-01 -1.50530108472392E-47 x6 : -8.65411917933451E-01 -1.30003275498884E-47 x7 : 7.76576030467492E-01 5.81593600916062E-48 x8 : -6.30023546308671E-01 7.18439154072782E-48 x9 : 9.85556337261790E-01 1.28292706084425E-49 x10 : 1.69347884790821E-01 -1.02634164867540E-48 x11 : -9.99515580871569E-01 -4.27642353614751E-50 x12 : -3.11223969991190E-02 -5.13170824337701E-49 == err : 8.670E-16 = rco : 2.320E-02 = res : 8.882E-16 == solution 47 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.89415083856842E-01 -1.24869330394630E-30 x2 : -9.21062371647419E-01 6.94844296724591E-31 x3 : -3.08457430339590E+00 1.12748434939333E+00 x4 : 1.18298149617247E+00 2.93986783637119E+00 x5 : 5.51926701023123E+00 -2.78748170612766E+00 x6 : -2.82446248609853E+00 -5.44700306623820E+00 x7 : 2.18528888972524E+00 2.19251036407534E+00 x8 : -2.30971002700246E+00 2.07440262336281E+00 x9 : 4.22761702728453E-01 -4.87287884168481E-02 x10 : -9.07833668459021E-01 -2.26921145125288E-02 x11 : 7.34696844899792E-01 -1.63682788488654E-02 x12 : 6.78824208644993E-01 1.77155185002993E-02 == err : 8.757E-15 = rco : 3.904E-03 = res : 5.024E-15 == solution 48 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.89415083856842E-01 9.57929243962447E-31 x2 : -9.21062371647419E-01 -1.90052524829610E-31 x3 : -3.08457430339590E+00 1.12748434939333E+00 x4 : 1.18298149617247E+00 2.93986783637119E+00 x5 : 5.51926701023123E+00 -2.78748170612766E+00 x6 : -2.82446248609853E+00 -5.44700306623820E+00 x7 : 2.18528888972524E+00 2.19251036407534E+00 x8 : -2.30971002700246E+00 2.07440262336281E+00 x9 : 4.22761702728453E-01 -4.87287884168481E-02 x10 : -9.07833668459021E-01 -2.26921145125288E-02 x11 : -6.32896057637868E-01 5.02771683764590E-03 x12 : -7.74264004141422E-01 -4.10973795558809E-03 == err : 7.918E-15 = rco : 3.843E-03 = res : 1.281E-14 == SHAR_EOF fi # end of overwriting check if test -f 'des18_3' then echo shar: will not over-write existing file "'des18_3'" else cat << "SHAR_EOF" > 'des18_3' 8 6*a33*a10*a20 + 10*a22*a10*a31 + 8*a32*a10*a21 - 162*a10**2*a21 + 16*a21*a30 + 14*a31*a20 + 48*a10*a30; 15*a33*a10*a21 - 162*a10**2*a22 - 312*a10*a20 + 24*a10*a30 + 27*a31*a21 + 24*a32*a20 + 18*a22*a10*a32 + 30*a22*a30 + 84*a31*a10; -240*a10 + 420*a33 - 64*a22 + 112*a32; 180*a33*a10 - 284*a22*a10 - 162*a10**2 + 60*a22*a32 + 50*a32*a10 + 70*a30 + 55*a33*a21 + 260*a31 - 112*a20; 66*a33*a10 + 336*a32 + 90*a31 + 78*a22*a33 - 1056*a10 - 90*a21; 136*a33 - 136; 4*a22*a10*a30 + 2*a32*a10*a20 + 6*a20*a30 - 162*a10**2*a20 + 3*a31*a21*a10; 28*a22*a10*a33 + 192*a30 + 128*a32*a10 + 36*a31*a20 + 36*a33*a20 - 300*a10*a21 + 40*a32*a21 - 648*a10**2 + 44*a22*a31; TITLE : a "dessin d'enfant", called des18_3 ROOT COUNTS : total degree : 324 2-homogeneous Bezout number : 108 with partition : {a33 }{a10 a20 a22 a31 a32 a21 a30 } mixed volume : 46 REFERENCES : Raphael Nauheim: "Systems of Algebraic Equations with Bad Reduction" Universitaet Heidelberg, Interdisziplinaeres Zentrum fuer wissenschaftliches Rechnen, Preprint 95-46, Dezember 1995. Birch, B: "Noncongruence Subgroups, Covers and Drawings", In "The Grothendieck Theory of Dessins d'Enfants", editor: Schneps, L., London Mathematical Society Lecture Series 200, Cambridge University Press, pages 25-46, 1994. There are six real and forty complex conjugated solutions. THE SOLUTIONS : 46 8 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 3.22092406769751E-31 a10 : -5.54426674204252E-01 -3.53198380037265E-01 a20 : -4.17822975619532E-01 -3.53594895643123E-01 a22 : 5.52498520158377E+00 6.50715246552986E-01 a31 : -1.61440960737313E+00 -2.43233070643676E+00 a32 : -1.78092275810410E+00 -3.85016387763862E-01 a21 : 2.62382601999093E+00 5.79410173333995E-01 a30 : 1.23028437311259E+00 2.66195765643575E+00 == err : 1.812E-14 = rco : 8.638E-04 = res : 2.079E-13 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 -3.09120151102865E-29 a10 : -1.74157771399634E+00 3.40355275593061E+00 a20 : 4.91348169799353E+01 3.96086942250424E+01 a22 : -1.66417016057400E+01 -1.57081029697567E+01 a31 : 6.84488775932716E+01 -6.34639241522368E-01 a32 : -1.69914960189864E+01 -1.68273150572399E+00 a21 : 9.74850591804066E+00 -5.79696064185844E+01 a30 : -1.09041583991505E+02 -2.57282006833764E+02 == err : 5.640E-13 = rco : 2.343E-06 = res : 3.597E-11 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 -4.50777566960056E-31 a10 : -2.63884000934243E-01 5.36119882957316E-02 a20 : -4.05589651447332E+00 -3.00221834077863E+00 a22 : 4.10204355848378E+00 -9.73991786392433E-01 a31 : -8.27725842520557E-01 -4.42434138731594E-02 a32 : -1.97144082572550E+00 -4.41683903019108E-01 a21 : -1.72994316426648E+00 -3.12705473793765E+00 a30 : 1.50931473222725E+00 -5.51212501552006E-01 == err : 7.457E-15 = rco : 1.272E-03 = res : 8.527E-14 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 7.94150952558633E-31 a10 : -3.74218849336509E-02 1.74522270949688E-01 a20 : 3.55361604057689E-01 -1.66112057309503E+00 a22 : 5.30429944044650E+00 -1.52312637107046E+00 a31 : 9.27223890018023E-01 1.43552628981904E+00 a32 : -7.99161501745538E-01 -4.96381631433789E-01 a21 : 2.95238786615847E+00 -3.65741963624141E+00 a30 : -6.94785461561970E-01 -3.08200024225707E-01 == err : 6.911E-15 = rco : 9.817E-04 = res : 2.842E-14 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 1.93065581370859E-29 a10 : 3.66697071175811E-01 -1.26968351968060E+00 a20 : 1.41090490214364E+02 2.19984715394215E+01 a22 : -2.55146395389989E+01 -2.14876391175427E+00 a31 : -1.98355442765332E+01 1.10713187298381E+01 a32 : -1.75440145840512E+01 -3.94861549174659E+00 a21 : -1.11479554107057E+02 8.43407755361708E+00 a30 : -3.46132825573911E+01 -1.67491797617033E+01 == err : 4.377E-13 = rco : 2.921E-06 = res : 3.094E-11 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 -1.02140693168661E-30 a10 : 1.11742669633946E-03 -1.84690464419679E+00 a20 : -1.88025938222224E+00 -1.08579763561905E+00 a22 : 4.10461992958911E+00 -7.52649644065811E+00 a31 : 5.47316919455685E+00 7.25530993529782E-01 a32 : -1.40210841159978E+00 -8.25850791794061E+00 a21 : 3.78367670323515E+00 -1.63132443958542E+01 a30 : -2.14790328348906E+01 5.01362779788523E-01 == err : 4.105E-14 = rco : 5.878E-05 = res : 2.874E-12 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 -1.84457951941295E-30 a10 : -1.07747633122764E+00 -2.05266250102671E+00 a20 : -5.74565759407296E-01 -5.45366422079856E-01 a22 : 3.03275895426104E+00 -1.49684623267144E+00 a31 : 3.87893930977835E-01 -4.86999205958773E+00 a32 : -4.32587273591006E+00 -5.25390320658377E+00 a21 : -1.28140021255613E+00 -3.20254325452192E+00 a30 : -9.01029523452842E+00 1.42556192187152E+01 == err : 9.146E-14 = rco : 1.180E-04 = res : 4.590E-13 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 -7.56393327989766E-31 a10 : -5.54426674204252E-01 3.53198380037266E-01 a20 : -4.17822975619532E-01 3.53594895643124E-01 a22 : 5.52498520158377E+00 -6.50715246552987E-01 a31 : -1.61440960737313E+00 2.43233070643676E+00 a32 : -1.78092275810410E+00 3.85016387763862E-01 a21 : 2.62382601999093E+00 -5.79410173333995E-01 a30 : 1.23028437311259E+00 -2.66195765643575E+00 == err : 1.995E-14 = rco : 8.638E-04 = res : 4.143E-13 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 5.94761105584188E-30 a10 : -8.41608786378188E+00 -5.98709263304501E+00 a20 : -1.52078998501707E+01 1.01772043510331E+01 a22 : 4.18459490973777E+00 -1.87533188950896E+01 a31 : -4.09877429653650E+01 2.01786262301772E+01 a32 : -1.93932769025396E+01 -2.35456664394333E+01 a21 : -1.71856946448060E+01 -1.81200525559564E+01 a30 : 7.77560113694935E+01 2.91123025982788E+02 == err : 7.474E-13 = rco : 6.125E-06 = res : 7.745E-11 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 -3.13431796291135E-32 a10 : -1.61591655372893E-02 3.79934253110678E-02 a20 : 7.73157603400808E-01 -3.97531297270607E-02 a22 : 5.82415463252854E+00 -1.09283247748605E-02 a31 : 9.59293405718147E-02 1.13653777604448E-01 a32 : -4.56538421849311E-01 7.51697257952250E-02 a21 : 3.61687073476930E+00 -3.31114726533374E-02 a30 : -2.72486634454952E-02 -2.80676116099737E-02 == err : 3.517E-15 = rco : 1.020E-04 = res : 5.689E-14 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 1.93719976393706E-55 a10 : 1.11518069895478E+02 3.26265223399926E-55 a20 : 1.90866270035488E+02 -4.43720703823900E-53 a22 : 4.51548424377688E+01 -3.42578484569923E-54 a31 : 2.84394247689901E+02 1.36868261216269E-52 a32 : 2.61020059740463E+02 -6.52530446799852E-55 a21 : 7.13045653167747E+01 -4.07831529249908E-54 a30 : 1.72231426440665E+04 1.83752573818838E-51 == err : 4.997E-11 = rco : 1.679E-09 = res : 4.470E-08 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 5.91028432977675E-32 a10 : 2.90964894603069E-01 -4.19102380684238E-01 a20 : -9.84531343849711E+00 -5.09872418732703E+00 a22 : 7.26664757504249E+00 -3.74410104261106E+00 a31 : -2.99791577750170E+00 2.61772984004309E+00 a32 : 1.02586624560228E+00 -3.03756284010111E+00 a21 : 3.92913226381656E+00 -7.35726614573737E+00 a30 : -2.39677577873105E+00 -5.21247190296407E+00 == err : 1.083E-14 = rco : 4.219E-04 = res : 4.778E-13 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 2.31024066709371E-31 a10 : -1.78899091686156E-01 -1.84622565376735E-01 a20 : -1.33334913544351E-01 -1.38797226480544E-01 a22 : 5.17933182447055E+00 -6.05097237155145E-02 a31 : -1.00238036533596E-02 -5.60236409002329E-01 a32 : -1.17373701105859E+00 -4.30196767930441E-01 a21 : 2.06466894481676E+00 -1.87897884018666E-01 a30 : -7.93805092581808E-03 4.37641882841095E-01 == err : 2.550E-15 = rco : 2.366E-04 = res : 1.157E-13 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 -7.52525580216640E-30 a10 : -5.57356465955718E+00 4.55750871639050E+00 a20 : -3.43014209413819E-01 -1.67390178823015E+00 a22 : -2.51488849973176E+00 3.25346216025777E+00 a31 : 1.15350837630467E-02 1.09027284234543E+01 a32 : -1.71304319846121E+01 1.16252113409841E+01 a21 : -4.81243643676069E+00 6.99058875505608E+00 a30 : 3.19307939020137E+00 -1.23152196675656E+02 == err : 6.497E-13 = rco : 1.388E-05 = res : 5.543E-12 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 9.62494721489119E-31 a10 : -1.64073255722099E+00 2.64286316731288E+00 a20 : 7.43568915776749E-01 -2.15763149273222E+00 a22 : -5.48697725277948E+00 2.20226322279694E+00 a31 : 2.56168390011989E+00 7.46340458802628E+00 a32 : -1.04012710527761E+01 6.92171434298299E+00 a21 : -2.29770501865556E+01 6.14160475447846E+00 a30 : -1.80518157990855E+01 -5.64245167866385E+01 == err : 1.480E-13 = rco : 1.612E-05 = res : 5.682E-12 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 1.54203888499115E-29 a10 : -3.63312191610396E+00 -1.29558498888172E-01 a20 : 2.95654921086464E+00 1.53471148917313E+00 a22 : -7.17676970868325E+00 -2.90513979191750E+00 a31 : -8.86955569466596E+00 -1.40245694108306E+00 a32 : -1.56362725108989E+01 -1.93770523585608E+00 a21 : -3.35004990724038E+01 -9.72920082017105E+00 a30 : 7.63467865550755E+01 7.08373623877234E+00 == err : 6.216E-13 = rco : 3.887E-05 = res : 1.878E-11 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 1.72058919755877E-31 a10 : 1.13579649773337E+00 -1.69153563677396E-01 a20 : -2.21892610494372E+01 -1.67242306102555E+01 a22 : 2.10445774895358E+01 9.91262922499520E+00 a31 : -3.53190240984121E+01 -4.39810366491285E+01 a32 : 1.07093224891634E+01 5.30188763497427E+00 a21 : 1.04073188769951E+01 -1.37356882831107E+01 a30 : 3.38235457345909E+01 -1.14629299201937E+01 == err : 6.900E-14 = rco : 4.336E-05 = res : 9.205E-12 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 7.43062589678967E-30 a10 : -8.41608786378189E+00 5.98709263304502E+00 a20 : -1.52078998501707E+01 -1.01772043510331E+01 a22 : 4.18459490973776E+00 1.87533188950896E+01 a31 : -4.09877429653650E+01 -2.01786262301772E+01 a32 : -1.93932769025396E+01 2.35456664394334E+01 a21 : -1.71856946448061E+01 1.81200525559564E+01 a30 : 7.77560113694937E+01 -2.91123025982788E+02 == err : 4.393E-13 = rco : 6.125E-06 = res : 1.163E-10 == solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 -1.05338616588948E-29 a10 : 3.66697071175811E-01 1.26968351968060E+00 a20 : 1.41090490214364E+02 -2.19984715394215E+01 a22 : -2.55146395389989E+01 2.14876391175427E+00 a31 : -1.98355442765332E+01 -1.10713187298381E+01 a32 : -1.75440145840512E+01 3.94861549174659E+00 a21 : -1.11479554107057E+02 -8.43407755361709E+00 a30 : -3.46132825573911E+01 1.67491797617033E+01 == err : 4.476E-13 = rco : 2.921E-06 = res : 3.820E-11 == solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 -2.91703841149741E-62 a10 : -6.96812563416184E-02 -1.62867977975272E-61 a20 : 1.46149368079807E+00 9.02337215289866E-60 a22 : 6.21012535918065E+00 4.20053531255627E-60 a31 : -2.87638109546105E-01 -3.36431763459368E-60 a32 : -3.50673915485953E-01 2.48920611114446E-60 a21 : 4.55178173702070E+00 1.13570028820966E-59 a30 : 1.14303650490072E-01 1.08902767362570E-60 == err : 3.398E-15 = rco : 7.703E-05 = res : 5.684E-14 == solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 3.94946717491797E-31 a10 : 1.13579649773337E+00 1.69153563677396E-01 a20 : -2.21892610494372E+01 1.67242306102555E+01 a22 : 2.10445774895358E+01 -9.91262922499520E+00 a31 : -3.53190240984121E+01 4.39810366491285E+01 a32 : 1.07093224891634E+01 -5.30188763497427E+00 a21 : 1.04073188769951E+01 1.37356882831107E+01 a30 : 3.38235457345908E+01 1.14629299201937E+01 == err : 6.245E-14 = rco : 4.336E-05 = res : 3.311E-12 == solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 7.60042448718532E-31 a10 : -3.74218849336510E-02 -1.74522270949689E-01 a20 : 3.55361604057689E-01 1.66112057309503E+00 a22 : 5.30429944044650E+00 1.52312637107046E+00 a31 : 9.27223890018022E-01 -1.43552628981904E+00 a32 : -7.99161501745538E-01 4.96381631433789E-01 a21 : 2.95238786615848E+00 3.65741963624142E+00 a30 : -6.94785461561970E-01 3.08200024225708E-01 == err : 6.465E-15 = rco : 9.817E-04 = res : 8.527E-14 == solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 6.07716335728627E-63 a10 : -1.43946955307287E+00 6.27163258471943E-61 a20 : -5.15200331458865E-01 2.11485284833562E-61 a22 : 3.20357759910987E+00 7.77876909732643E-61 a31 : -2.04515751033731E+00 1.45851920574871E-60 a32 : -5.00396184280766E+00 1.76237737361302E-60 a21 : -2.11601605378910E+00 1.84745766061503E-60 a30 : 6.81756372345637E+00 -6.22301527786114E-60 == err : 3.169E-14 = rco : 9.072E-04 = res : 3.979E-13 == solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 1.51929083932157E-63 a10 : 2.39059161735694E+01 -8.69034360091937E-61 a20 : 9.20967834736090E+01 -6.05771643454296E-60 a22 : 4.44669593854581E+01 -1.34730711631037E-60 a31 : -1.17569336988949E+01 -2.69826053063510E-61 a32 : 7.28866543064819E+01 -2.63262716637641E-60 a21 : 3.59261959367712E+01 -1.24946478625806E-60 a30 : 1.71413050540115E+03 -1.16992687223789E-58 == err : 2.029E-11 = rco : 9.983E-08 = res : 2.910E-09 == solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 3.99118544112854E-29 a10 : -5.13505136216113E+00 1.40762912240562E+01 a20 : -1.16758861628740E+02 -1.35074247707284E+02 a22 : 5.23996846257515E+01 1.05824592417430E+02 a31 : -4.68410100351749E+01 -6.81764137435109E+02 a32 : 1.51889954386556E+01 9.06346768615092E+01 a21 : 1.11763197928563E+02 -4.06519233854987E+02 a30 : 8.85736286156920E+02 -2.21618652632072E+03 == err : 3.916E-12 = rco : 2.949E-08 = res : 3.952E-09 == solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 2.25342923227654E-29 a10 : -1.74157771399634E+00 -3.40355275593060E+00 a20 : 4.91348169799353E+01 -3.96086942250424E+01 a22 : -1.66417016057400E+01 1.57081029697567E+01 a31 : 6.84488775932716E+01 6.34639241522329E-01 a32 : -1.69914960189864E+01 1.68273150572399E+00 a21 : 9.74850591804068E+00 5.79696064185844E+01 a30 : -1.09041583991505E+02 2.57282006833763E+02 == err : 4.621E-13 = rco : 2.343E-06 = res : 5.866E-11 == solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 -2.31082359616357E-30 a10 : -1.64073255722099E+00 -2.64286316731288E+00 a20 : 7.43568915776753E-01 2.15763149273222E+00 a22 : -5.48697725277949E+00 -2.20226322279694E+00 a31 : 2.56168390011988E+00 -7.46340458802628E+00 a32 : -1.04012710527761E+01 -6.92171434298298E+00 a21 : -2.29770501865556E+01 -6.14160475447845E+00 a30 : -1.80518157990854E+01 5.64245167866385E+01 == err : 1.039E-13 = rco : 1.612E-05 = res : 2.917E-12 == solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 -3.37100717296503E-30 a10 : -5.57356465955717E+00 -4.55750871639049E+00 a20 : -3.43014209413809E-01 1.67390178823013E+00 a22 : -2.51488849973175E+00 -3.25346216025775E+00 a31 : 1.15350837630596E-02 -1.09027284234543E+01 a32 : -1.71304319846121E+01 -1.16252113409840E+01 a21 : -4.81243643676069E+00 -6.99058875505606E+00 a30 : 3.19307939020158E+00 1.23152196675655E+02 == err : 3.181E-13 = rco : 1.388E-05 = res : 1.490E-11 == solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 1.69041439750991E-31 a10 : -6.67245758085761E-02 -2.34822140829434E-01 a20 : -3.90543112888623E+00 -1.27700478508603E+00 a22 : 2.76338858003241E+00 -3.84609078364775E-01 a31 : 8.48762422588007E-01 -8.38568729661347E-01 a32 : -2.31390204528557E+00 -7.22966917985802E-01 a21 : -4.66089810988903E+00 -1.28792954226737E+00 a30 : -1.06926302914714E+00 7.58242694786569E-01 == err : 6.926E-15 = rco : 9.580E-04 = res : 1.422E-13 == solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 3.28972407030479E-30 a10 : -1.07747633122763E+00 2.05266250102670E+00 a20 : -5.74565759407294E-01 5.45366422079856E-01 a22 : 3.03275895426105E+00 1.49684623267143E+00 a31 : 3.87893930977836E-01 4.86999205958770E+00 a32 : -4.32587273591004E+00 5.25390320658374E+00 a21 : -1.28140021255612E+00 3.20254325452191E+00 a30 : -9.01029523452835E+00 -1.42556192187151E+01 == err : 1.704E-13 = rco : 1.180E-04 = res : 7.390E-13 == solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 4.28073850696345E-31 a10 : -6.01573949972425E-02 1.72715984551965E-01 a20 : -6.99151674885414E-01 1.81019877076219E+00 a22 : 4.53222562187609E+00 1.15753842803441E+00 a31 : 8.62781580143381E-01 1.97937798273999E-01 a32 : -1.28906549106490E+00 1.03155621148816E+00 a21 : 6.39930630763385E-01 3.15240512872134E+00 a30 : -5.46254839168637E-01 -4.39640734216265E-01 == err : 5.213E-15 = rco : 1.142E-03 = res : 9.871E-14 == solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 -8.70348283971388E-29 a10 : -5.13505136216113E+00 -1.40762912240562E+01 a20 : -1.16758861628740E+02 1.35074247707284E+02 a22 : 5.23996846257515E+01 -1.05824592417430E+02 a31 : -4.68410100351747E+01 6.81764137435109E+02 a32 : 1.51889954386556E+01 -9.06346768615092E+01 a21 : 1.11763197928563E+02 4.06519233854987E+02 a30 : 8.85736286156921E+02 2.21618652632072E+03 == err : 5.097E-12 = rco : 2.949E-08 = res : 3.145E-09 == solution 33 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 -2.51664194801923E-31 a10 : 2.90964894603069E-01 4.19102380684238E-01 a20 : -9.84531343849711E+00 5.09872418732703E+00 a22 : 7.26664757504249E+00 3.74410104261106E+00 a31 : -2.99791577750170E+00 -2.61772984004309E+00 a32 : 1.02586624560228E+00 3.03756284010111E+00 a21 : 3.92913226381657E+00 7.35726614573737E+00 a30 : -2.39677577873106E+00 5.21247190296407E+00 == err : 6.076E-15 = rco : 4.219E-04 = res : 6.653E-13 == solution 34 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 -5.57582168896358E-58 a10 : 3.78205552886912E+00 -9.55855146679472E-58 a20 : 1.07299037764053E+02 -3.68800777427163E-56 a22 : 1.01363081259447E+01 -1.73248745335654E-57 a31 : -1.51879803754348E+01 1.27447352890596E-57 a32 : 1.01465807766879E+01 -2.07101948447219E-57 a21 : -1.01252225842081E+01 4.77927573339736E-58 a30 : 2.99392733328254E+02 -1.17251564659348E-55 == err : 4.550E-14 = rco : 6.116E-06 = res : 4.161E-11 == solution 35 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 8.63586338217863E-32 a10 : -1.61591655372893E-02 -3.79934253110678E-02 a20 : 7.73157603400807E-01 3.97531297270605E-02 a22 : 5.82415463252854E+00 1.09283247748603E-02 a31 : 9.59293405718148E-02 -1.13653777604447E-01 a32 : -4.56538421849311E-01 -7.51697257952251E-02 a21 : 3.61687073476930E+00 3.31114726533369E-02 a30 : -2.72486634454952E-02 2.80676116099737E-02 == err : 3.347E-15 = rco : 1.020E-04 = res : 5.702E-14 == solution 36 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 1.14616071604603E-28 a10 : 4.59970428869386E+00 -1.18879900199898E+01 a20 : 1.43691837368076E+01 -6.38540307264143E+01 a22 : 3.14935789575631E+01 -7.61210298749095E+00 a31 : 1.21637840303081E+02 2.59447637493818E+01 a32 : 2.41028400229515E+01 -2.98240374642586E+01 a21 : 1.88319464309689E+02 3.87724248468782E+01 a30 : -9.28113792501200E+02 -8.47551516425481E+02 == err : 2.438E-12 = rco : 4.150E-07 = res : 3.905E-10 == solution 37 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 -3.34516610159445E-30 a10 : -5.81886740236537E-01 -1.03148939531588E+00 a20 : 6.20483592664957E+00 -6.16790153067882E+00 a22 : 4.08648154459807E+00 1.98599217576612E+00 a31 : 7.14821620614031E+00 -1.12791885597748E+01 a32 : -2.66176784645083E+00 -1.07548174666767E+00 a21 : 7.15332106064413E+00 -2.22674384652886E+00 a30 : -1.65832042225268E+01 2.33055668615934E+01 == err : 4.603E-14 = rco : 1.906E-04 = res : 1.849E-12 == solution 38 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 -6.12731154525910E-30 a10 : -5.81886740236537E-01 1.03148939531588E+00 a20 : 6.20483592664957E+00 6.16790153067882E+00 a22 : 4.08648154459807E+00 -1.98599217576612E+00 a31 : 7.14821620614031E+00 1.12791885597748E+01 a32 : -2.66176784645083E+00 1.07548174666767E+00 a21 : 7.15332106064413E+00 2.22674384652887E+00 a30 : -1.65832042225268E+01 -2.33055668615934E+01 == err : 4.432E-14 = rco : 1.906E-04 = res : 1.025E-12 == solution 39 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 -4.10843000056870E-29 a10 : 4.59970428869387E+00 1.18879900199897E+01 a20 : 1.43691837368076E+01 6.38540307264143E+01 a22 : 3.14935789575631E+01 7.61210298749093E+00 a31 : 1.21637840303081E+02 -2.59447637493819E+01 a32 : 2.41028400229515E+01 2.98240374642586E+01 a21 : 1.88319464309689E+02 -3.87724248468783E+01 a30 : -9.28113792501200E+02 8.47551516425481E+02 == err : 2.395E-12 = rco : 4.150E-07 = res : 2.064E-09 == solution 40 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 -2.98079050533065E-31 a10 : 1.11742669633835E-03 1.84690464419679E+00 a20 : -1.88025938222225E+00 1.08579763561904E+00 a22 : 4.10461992958910E+00 7.52649644065811E+00 a31 : 5.47316919455685E+00 -7.25530993529774E-01 a32 : -1.40210841159979E+00 8.25850791794062E+00 a21 : 3.78367670323514E+00 1.63132443958542E+01 a30 : -2.14790328348906E+01 -5.01362779788552E-01 == err : 7.428E-15 = rco : 5.878E-05 = res : 2.379E-12 == solution 41 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 -3.38082657347544E-32 a10 : -1.78899091686156E-01 1.84622565376735E-01 a20 : -1.33334913544351E-01 1.38797226480544E-01 a22 : 5.17933182447055E+00 6.05097237155139E-02 a31 : -1.00238036533603E-02 5.60236409002329E-01 a32 : -1.17373701105859E+00 4.30196767930440E-01 a21 : 2.06466894481676E+00 1.87897884018665E-01 a30 : -7.93805092581755E-03 -4.37641882841095E-01 == err : 2.341E-15 = rco : 2.366E-04 = res : 1.798E-13 == solution 42 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 1.50259219921837E-32 a10 : -2.63884000934243E-01 -5.36119882957316E-02 a20 : -4.05589651447332E+00 3.00221834077863E+00 a22 : 4.10204355848378E+00 9.73991786392433E-01 a31 : -8.27725842520558E-01 4.42434138731594E-02 a32 : -1.97144082572550E+00 4.41683903019108E-01 a21 : -1.72994316426648E+00 3.12705473793765E+00 a30 : 1.50931473222725E+00 5.51212501552007E-01 == err : 6.154E-15 = rco : 1.272E-03 = res : 1.608E-13 == solution 43 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 3.98272977783113E-59 a10 : 3.66215698318787E-01 -4.72949161117447E-59 a20 : 3.02178218554036E+01 -8.92131470234173E-57 a22 : 1.33734293432174E+01 -2.86756544003841E-57 a31 : -2.20730390859508E+00 8.36373253344538E-58 a32 : 4.67670754966447E+00 -1.67274650668907E-57 a21 : 2.28143370261007E+01 -8.28407793788875E-57 a30 : 3.02814098281021E+00 -1.03550974223609E-57 == err : 3.000E-14 = rco : 8.879E-05 = res : 4.547E-13 == solution 44 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 6.46219597323654E-30 a10 : -3.63312191610397E+00 1.29558498888167E-01 a20 : 2.95654921086467E+00 -1.53471148917314E+00 a22 : -7.17676970868328E+00 2.90513979191751E+00 a31 : -8.86955569466602E+00 1.40245694108304E+00 a32 : -1.56362725108990E+01 1.93770523585608E+00 a21 : -3.35004990724040E+01 9.72920082017106E+00 a30 : 7.63467865550760E+01 -7.08373623877218E+00 == err : 2.216E-13 = rco : 3.887E-05 = res : 1.985E-11 == solution 45 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 -4.50783247852683E-32 a10 : -6.67245758085762E-02 2.34822140829434E-01 a20 : -3.90543112888623E+00 1.27700478508603E+00 a22 : 2.76338858003241E+00 3.84609078364775E-01 a31 : 8.48762422588007E-01 8.38568729661347E-01 a32 : -2.31390204528557E+00 7.22966917985802E-01 a21 : -4.66089810988903E+00 1.28792954226737E+00 a30 : -1.06926302914714E+00 -7.58242694786570E-01 == err : 6.627E-15 = rco : 9.580E-04 = res : 1.310E-13 == solution 46 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a33 : 1.00000000000000E+00 -2.75773772029008E-31 a10 : -6.01573949972424E-02 -1.72715984551965E-01 a20 : -6.99151674885412E-01 -1.81019877076219E+00 a22 : 4.53222562187609E+00 -1.15753842803441E+00 a31 : 8.62781580143381E-01 -1.97937798273998E-01 a32 : -1.28906549106489E+00 -1.03155621148816E+00 a21 : 6.39930630763387E-01 -3.15240512872134E+00 a30 : -5.46254839168637E-01 4.39640734216265E-01 == err : 4.931E-15 = rco : 1.142E-03 = res : 1.137E-13 == SHAR_EOF fi # end of overwriting check if test -f 'des22_24' then echo shar: will not over-write existing file "'des22_24'" else cat << "SHAR_EOF" > 'des22_24' 10 16*a20*a32 + 18*a21*a31 + 20*a22*a30; -80*a23 + 180*a34 + 855*a35; 7*a20*a31 + 8*a21*a30; 210*a35 - 210; 40*a20*a34 + 44*a21*a33 + 48*a22*a32 + 52*a23*a31 + 280*a30; 27*a20*a33 + 30*a21*a32 + 33*a22*a31 + 36*a23*a30; 55*a20*a35 + 60*a21*a34 + 65*a22*a33 + 70*a23*a32 + 80*a30 + 375*a31; 78*a21*a35 + 84*a22*a34 + 90*a23*a33 - 170*a20 + 102*a31 + 480*a32; 136*a23*a35 - 114*a22 + 152*a33 + 720*a34; 105*a22*a35 + 112*a23*a34 - 144*a21 + 126*a32 + 595*a33; TITLE : a "dessin d'enfant", called des22_24 ROOT COUNTS : total degree : 256 2-homogeneous Bezout number : 128 with partition : {a20 a32 a21 a31 a22 a30 a23 a34 a33 }{a35 } generalized Bezout number : 82 based on the set structure : {a20 a21 a22 }{a32 a31 a30 } {a23 a34 a35 } {a20 a21 }{a31 a30 } {a35 } {a20 a32 a21 a31 a30 }{a22 a23 a34 a33 } {a20 a32 a31 a30 }{a21 a22 a23 a33 } {a20 a32 a21 a31 a22 a30 }{a23 a34 a35 a33 } {a20 a32 a21 a31 a22 a23 }{a34 a35 a33 } {a22 a23 a34 a33 }{a35 } {a32 a21 a22 a23 a33 }{a34 a35 } mixed volume : 42 REFERENCES : Raphael Nauheim: "Systems of Algebraic Equations with Bad Reduction" Universitaet Heidelberg, Interdisziplinaeres Zentrum fuer wissenschaftliches Rechnen, Preprint 95-46, Dezember 1995. Birch, B: "Noncongruence Subgroups, Covers and Drawings", In "The Grothendieck Theory of Dessins d'Enfants", editor: Schneps, L., London Mathematical Society Lecture Series 200, Cambridge University Press, pages 25-46, 1994. There are 10 real and 32 conjugate complex solutions. Among the 10 real solutions, four of them are ill-conditioned. THE SOLUTIONS : 42 10 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : -5.21442301624664E-01 1.72453316373668E+00 a32 : -2.49589958104655E-01 9.59735966832008E-02 a21 : 6.12605878167648E-01 4.27408507742323E+00 a31 : 1.65974672649899E-01 -9.69300921262394E-02 a22 : 5.92317473211998E+00 3.42130127841126E+00 a30 : -6.98746944965228E-02 6.48809654978709E-03 a23 : 8.77149809226069E+00 8.88393395652697E-01 a34 : -8.51556403439692E-01 3.94841509178976E-01 a35 : 1.00000000000000E+00 0.00000000000000E+00 a33 : 6.27886772307902E-01 -9.92042281496473E-02 == err : 8.690E-15 = rco : 1.602E-04 = res : 1.608E-13 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : -1.86597500217766E+02 -6.53976955142540E+01 a32 : 1.82302765279853E+01 2.30100480815243E+01 a21 : -6.09817398619465E+01 -7.42761587895783E+01 a31 : -2.13515066060056E+01 -2.05073641559774E+02 a22 : 5.12778357184201E+00 -4.36655825195166E+01 a30 : 2.24639632342970E+02 2.95488095558237E+02 a23 : 1.31759915543100E+01 -1.04208387494438E+01 a34 : 1.10599624636001E+00 -4.63148388864171E+00 a35 : 1.00000000000000E+00 -1.48986021128242E-31 a33 : -1.31821369840486E+01 -1.48667064130590E+00 == err : 4.798E-13 = rco : 8.214E-06 = res : 1.277E-10 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : -1.63061630518511E+01 2.96813278451046E+01 a32 : 1.28263751656046E+00 1.43499849654010E+00 a21 : -1.95746459897342E+00 3.38436050253517E+01 a31 : -8.30043233701328E+00 -2.06901627455250E+00 a22 : 1.74147206562589E+01 2.67947427846543E+01 a30 : 5.77230428445937E+00 4.75319791898517E+00 a23 : 1.13262147431237E+01 8.47303479955049E+00 a34 : 2.83873219166110E-01 3.76579324424466E+00 a35 : 1.00000000000000E+00 -6.28310530989662E-33 a33 : 1.58239626282290E+00 -5.32304731016076E+00 == err : 5.983E-14 = rco : 8.948E-05 = res : 2.034E-12 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : -8.46158832269196E+04 -1.71289242284961E-54 a32 : -6.21252325160952E+03 -8.66641999656054E-56 a21 : 2.23065985462703E+03 2.16660499914014E-56 a31 : -2.02999525269441E+04 -3.67048376324917E-55 a22 : 5.63663795687017E+02 8.12476874677551E-57 a30 : -6.73785430731539E+05 -1.66395263933962E-53 a23 : -1.04041138177933E+02 -7.76632306677071E-58 a34 : -5.09905058568591E+01 -3.48488855560224E-58 a35 : 1.00000000000000E+00 6.80642296016062E-62 a33 : 7.57371261299062E+02 8.60269632011524E-57 == err : 9.368E-10 = rco : 1.032E-11 = res : 4.768E-07 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : -6.68772375765163E+00 4.00957319845439E+00 a32 : -2.28056277016263E+00 -2.69507811290578E+00 a21 : -8.50033975471788E+00 9.05748332362677E-01 a31 : 1.94749907971695E+00 2.13718449554830E+00 a22 : 3.94001793254939E-01 -3.76544896145528E+00 a30 : -2.12749773530846E+00 -8.94164789888950E-01 a23 : 7.39514460344525E+00 -1.61042256968354E+00 a34 : -1.46326906513544E+00 -7.15743364303795E-01 a35 : 1.00000000000000E+00 -3.75971120784920E-32 a33 : 6.10067534605443E-01 2.00718098795916E+00 == err : 6.865E-15 = rco : 7.041E-04 = res : 2.898E-13 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : -2.16580787516837E+00 6.07716335728627E-64 a32 : -4.50407537405366E-01 5.69734064745588E-65 a21 : -3.12784134068775E+00 1.51929083932157E-64 a31 : 1.64525238380772E-01 1.13946812949118E-64 a22 : 3.18261760274002E+00 -4.55787251796470E-64 a30 : -9.96817823764183E-02 7.35906500296384E-65 a23 : 8.12238892404369E+00 -2.27893625898235E-64 a34 : -1.14004936709169E+00 -9.49556774575980E-65 a35 : 1.00000000000000E+00 0.00000000000000E+00 a33 : 5.19796429923932E-01 2.65875896881274E-64 == err : 3.852E-15 = rco : 1.848E-04 = res : 1.137E-13 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : 7.79008417264091E-01 -9.96654790594949E-62 a32 : -4.71639144329436E-02 -4.25401435010039E-63 a21 : 4.33907947158647E+00 -2.33363072919793E-61 a31 : 1.20632369858885E-02 9.11574503592941E-64 a22 : 9.34873086416943E+00 -1.70160574004016E-61 a30 : -1.89503161013087E-03 3.03858167864314E-64 a23 : 9.78828230464056E+00 -4.61864415153757E-62 a34 : -3.99652309048638E-01 -2.12700717505020E-62 a35 : 1.00000000000000E+00 0.00000000000000E+00 a33 : 1.46701234205377E-01 1.35976530119280E-62 == err : 5.047E-15 = rco : 3.749E-05 = res : 2.274E-13 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : -3.02217389406608E+02 4.84972259453532E+02 a32 : -1.25420726152472E+02 1.15635505071413E+02 a21 : -4.16191871003110E+01 6.21829358739311E+01 a31 : 2.30657472818142E+02 2.74353689973003E+01 a22 : -1.94405282527366E+01 -4.01886737147898E+01 a30 : -1.54645615456441E+03 -1.33076421955964E+02 a23 : -3.61942750625190E+00 -6.17714293191584E+00 a34 : -6.35863444722306E+00 -2.74539685862926E+00 a35 : 1.00000000000000E+00 -5.52668517294696E-34 a33 : 1.87778863292032E+01 -1.16100764903448E+01 == err : 3.079E-12 = rco : 7.960E-07 = res : 2.400E-10 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : 2.63407894021685E+00 4.65396842480159E+00 a32 : -1.94995329660351E+00 -9.37153295496033E-01 a21 : 3.88742221150536E+00 6.54045636048682E+00 a31 : 2.21366141476578E+00 -2.57866993365055E-01 a22 : 6.07795729280648E+00 2.69812122001744E+00 a30 : -1.36445832828497E+00 1.29647708011385E-01 a23 : 8.38506326648962E+00 2.88372971105167E-01 a34 : -1.02330521489350E+00 1.28165764935630E-01 a35 : 1.00000000000000E+00 -3.21756861432357E-33 a33 : 1.90327817013601E+00 1.15847200169758E+00 == err : 6.562E-15 = rco : 1.273E-03 = res : 2.274E-13 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : 6.75457747607353E+01 -4.37555761724612E-62 a32 : -1.92708131964110E+01 2.12700717505020E-62 a21 : 6.73039941101110E+01 -5.59099028870337E-62 a31 : 5.06730159372344E+01 -3.64629801437176E-62 a22 : 4.55775394871917E+01 -3.64629801437176E-62 a30 : -4.44981705086610E+01 4.86173068582902E-62 a23 : 1.98893535462323E+01 -1.09388940431153E-62 a34 : 4.08971268721435E+00 -3.64629801437176E-63 a35 : 1.00000000000000E+00 0.00000000000000E+00 a33 : -2.98490602330314E+00 1.82314900718588E-63 == err : 1.604E-13 = rco : 1.503E-04 = res : 1.273E-11 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : 7.80121000142459E-01 -9.21593522974773E-01 a32 : -2.81022179058488E-01 -1.32965273061917E-01 a21 : 4.10928793671956E+00 -2.60260417738429E+00 a31 : 1.25389880322756E-01 1.76339805168452E-02 a22 : 8.92784846726175E+00 -2.36534708059111E+00 a30 : -2.71340752231498E-02 4.49162310220171E-03 a23 : 9.60155101137631E+00 -6.94928869867858E-01 a34 : -4.82643994943861E-01 -3.08857275496826E-01 a35 : 1.00000000000000E+00 0.00000000000000E+00 a33 : 3.91233316317373E-01 3.10776299160244E-01 == err : 7.909E-15 = rco : 1.045E-04 = res : 1.913E-13 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : -5.21442301624663E-01 -1.72453316373668E+00 a32 : -2.49589958104654E-01 -9.59735966832010E-02 a21 : 6.12605878167649E-01 -4.27408507742323E+00 a31 : 1.65974672649899E-01 9.69300921262396E-02 a22 : 5.92317473211998E+00 -3.42130127841126E+00 a30 : -6.98746944965227E-02 -6.48809654978718E-03 a23 : 8.77149809226070E+00 -8.88393395652697E-01 a34 : -8.51556403439692E-01 -3.94841509178976E-01 a35 : 1.00000000000000E+00 0.00000000000000E+00 a33 : 6.27886772307902E-01 9.92042281496476E-02 == err : 3.857E-15 = rco : 1.602E-04 = res : 1.711E-13 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : -1.20789348772292E+01 1.84589295037727E+01 a32 : 9.79971434453732E+00 -3.80840691065170E+00 a21 : -7.83062394848755E+00 1.88866927566190E+01 a31 : -1.02591347556095E+01 8.72975072115892E+00 a22 : 5.70235114381702E+00 8.17929361336767E+00 a30 : 1.10449908203911E+01 -6.30384576239286E+00 a23 : 1.05000218228669E+01 1.02958963057461E+00 a34 : -8.33236342813868E-02 4.57595391366493E-01 a35 : 1.00000000000000E+00 -3.05201472049099E-32 a33 : -4.72330211073788E+00 3.04570131830193E+00 == err : 3.513E-14 = rco : 7.169E-04 = res : 1.592E-12 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : -1.20789348772292E+01 -1.84589295037727E+01 a32 : 9.79971434453731E+00 3.80840691065170E+00 a21 : -7.83062394848755E+00 -1.88866927566190E+01 a31 : -1.02591347556095E+01 -8.72975072115892E+00 a22 : 5.70235114381702E+00 -8.17929361336767E+00 a30 : 1.10449908203911E+01 6.30384576239285E+00 a23 : 1.05000218228669E+01 -1.02958963057461E+00 a34 : -8.33236342813868E-02 -4.57595391366493E-01 a35 : 1.00000000000000E+00 7.15793215629991E-32 a33 : -4.72330211073788E+00 -3.04570131830193E+00 == err : 6.240E-14 = rco : 7.169E-04 = res : 2.265E-12 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : 1.07248400424143E+02 -7.74765179171210E+01 a32 : 3.47786321820574E+01 1.52127129236801E+01 a21 : 3.08817975844588E+01 -4.20039131704811E+01 a31 : -7.09423686497818E+01 -8.89798618673168E+01 a22 : 4.34797041322392E+00 -4.31456106259508E+00 a30 : 8.94584846456260E+01 2.36332229073738E+02 a23 : 7.81265986574173E+00 3.62976913157115E+00 a34 : -1.27770672633701E+00 1.61323072514273E+00 a35 : 1.00000000000000E+00 1.50690836739665E-31 a33 : 2.32299821269276E+00 -1.41252281916597E+01 == err : 4.040E-13 = rco : 1.352E-05 = res : 1.455E-11 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : -1.86597500217766E+02 6.53976955142541E+01 a32 : 1.82302765279853E+01 -2.30100480815243E+01 a21 : -6.09817398619465E+01 7.42761587895783E+01 a31 : -2.13515066060056E+01 2.05073641559774E+02 a22 : 5.12778357184201E+00 4.36655825195166E+01 a30 : 2.24639632342970E+02 -2.95488095558237E+02 a23 : 1.31759915543100E+01 1.04208387494438E+01 a34 : 1.10599624636001E+00 4.63148388864171E+00 a35 : 1.00000000000000E+00 8.56571607890014E-31 a33 : -1.31821369840486E+01 1.48667064130590E+00 == err : 7.438E-13 = rco : 8.214E-06 = res : 2.933E-11 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : 2.99465614628938E+00 -2.37934303528835E+00 a32 : 5.27446790794594E-01 -1.46246342620709E+00 a21 : 9.62896108633765E+00 -4.99813183389747E+00 a31 : -1.41774152212242E-01 9.17073475386279E-01 a22 : 1.44215430925602E+01 -4.24626213311965E+00 a30 : -1.12265030263065E-02 -2.86043784590367E-01 a23 : 1.13638336684732E+01 -1.52259535312830E+00 a34 : 3.00592741543645E-01 -6.76709045834798E-01 a35 : 1.00000000000000E+00 0.00000000000000E+00 a33 : -7.75343685999475E-01 1.38308945954516E+00 == err : 2.329E-14 = rco : 4.343E-04 = res : 4.019E-13 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : -3.02644947747119E+00 -5.29684811548649E+00 a32 : 6.43596936267657E-01 -2.41946693053619E+00 a21 : 1.31122776182327E-01 -1.12439905037670E+01 a31 : 2.16390216742216E-01 2.87774362314231E+00 a22 : 7.97451412174043E+00 -9.87059521605463E+00 a30 : -7.80083601770600E-01 -1.12613760153537E+00 a23 : 9.41371950010189E+00 -2.99090313528679E+00 a34 : -5.66124666621383E-01 -1.32929028234968E+00 a35 : 1.00000000000000E+00 9.00645773769166E-33 a33 : 2.39727090999660E-01 1.56976299381939E+00 == err : 1.266E-14 = rco : 5.737E-04 = res : 4.547E-13 == solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : 8.24398044230713E+00 -5.69786346993678E+00 a32 : 1.50145633779107E+00 5.75293620914512E+00 a21 : 1.56928004936062E+01 -7.36252073041826E+00 a31 : -2.50761502208893E+00 -6.65533308480757E+00 a22 : 1.71823339473881E+01 -3.96395339072417E+00 a30 : 1.80766505639643E+00 3.11066598716923E+00 a23 : 1.21310325820078E+01 -3.60642363969528E-01 a34 : 6.41570036447915E-01 -1.60285495097568E-01 a35 : 1.00000000000000E+00 -1.54308595480717E-32 a33 : -1.00634728548238E+00 -1.89103795113454E+00 == err : 3.769E-14 = rco : 7.887E-04 = res : 1.890E-12 == solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : 7.49828571428572E+03 5.22733283340336E-58 a32 : 4.50045918367347E+02 5.97409466674670E-59 a21 : 8.33142857142857E+02 8.46330077789115E-59 a31 : 7.85534693877551E+03 4.77927573339736E-58 a22 : 1.38857142857143E+02 5.52292605910176E-60 a30 : -6.18608571428572E+04 -6.85029521786955E-57 a23 : 2.57142857142857E+01 1.68702054798267E-60 a34 : 6.67857142857143E+00 6.90365757387721E-61 a35 : 1.00000000000000E+00 1.85353482397231E-62 a33 : 4.95000000000000E+01 -1.08902767362570E-60 == err : 4.474E-11 = rco : 2.644E-09 = res : 5.960E-08 == solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : 2.63407894021685E+00 -4.65396842480159E+00 a32 : -1.94995329660351E+00 9.37153295496032E-01 a21 : 3.88742221150536E+00 -6.54045636048682E+00 a31 : 2.21366141476578E+00 2.57866993365056E-01 a22 : 6.07795729280648E+00 -2.69812122001744E+00 a30 : -1.36445832828497E+00 -1.29647708011386E-01 a23 : 8.38506326648962E+00 -2.88372971105167E-01 a34 : -1.02330521489350E+00 -1.28165764935630E-01 a35 : 1.00000000000000E+00 -6.80239879431609E-32 a33 : 1.90327817013601E+00 -1.15847200169758E+00 == err : 7.619E-15 = rco : 1.273E-03 = res : 3.813E-13 == solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : 7.80121000142458E-01 9.21593522974774E-01 a32 : -2.81022179058489E-01 1.32965273061917E-01 a21 : 4.10928793671956E+00 2.60260417738429E+00 a31 : 1.25389880322756E-01 -1.76339805168449E-02 a22 : 8.92784846726174E+00 2.36534708059111E+00 a30 : -2.71340752231498E-02 -4.49162310220180E-03 a23 : 9.60155101137631E+00 6.94928869867858E-01 a34 : -4.82643994943862E-01 3.08857275496826E-01 a35 : 1.00000000000000E+00 0.00000000000000E+00 a33 : 3.91233316317374E-01 -3.10776299160244E-01 == err : 1.030E-14 = rco : 1.045E-04 = res : 1.146E-13 == solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : -3.05217728283331E+04 -1.60363500371269E+04 a32 : 3.02151015390978E+03 -9.64238921999533E+02 a21 : -3.46050009643349E+03 -5.30857365681648E+02 a31 : 1.90284307740835E+02 1.30922481114622E+04 a22 : -2.49939594990663E+02 8.32745627549361E+02 a30 : 3.51724713024513E+04 -1.07207161538227E+05 a23 : -9.89535191130913E+00 1.25373463141695E+02 a34 : -9.14793418280406E+00 5.57215391740867E+01 a35 : 1.00000000000000E+00 -2.14385791571834E-31 a33 : -1.35268640509070E+02 2.48438831236936E+02 == err : 3.104E-10 = rco : 1.942E-10 = res : 4.768E-07 == solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : 8.24398044230713E+00 5.69786346993678E+00 a32 : 1.50145633779107E+00 -5.75293620914513E+00 a21 : 1.56928004936062E+01 7.36252073041826E+00 a31 : -2.50761502208893E+00 6.65533308480757E+00 a22 : 1.71823339473881E+01 3.96395339072416E+00 a30 : 1.80766505639643E+00 -3.11066598716923E+00 a23 : 1.21310325820078E+01 3.60642363969527E-01 a34 : 6.41570036447915E-01 1.60285495097568E-01 a35 : 1.00000000000000E+00 -7.73625681831120E-33 a33 : -1.00634728548238E+00 1.89103795113454E+00 == err : 3.945E-14 = rco : 7.887E-04 = res : 1.729E-12 == solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : 2.65776274396502E+00 4.86173068582902E-63 a32 : -1.60177246298913E+00 -1.10604373102610E-61 a21 : 6.91718100964978E+00 7.77876909732643E-62 a31 : 1.18854045347435E+00 9.96654790594949E-62 a22 : 9.99414484462862E+00 1.33697593860298E-62 a30 : -3.99584919921292E-01 -2.58279442684667E-62 a23 : 9.63176834344344E+00 -1.29139721342333E-62 a34 : -4.69214069580693E-01 -5.54541156352372E-63 a35 : 1.00000000000000E+00 0.00000000000000E+00 a33 : 1.10030360314114E+00 5.10481722012047E-62 == err : 1.117E-14 = rco : 1.079E-03 = res : 3.695E-13 == solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : 2.99465614628938E+00 2.37934303528835E+00 a32 : 5.27446790794594E-01 1.46246342620709E+00 a21 : 9.62896108633765E+00 4.99813183389747E+00 a31 : -1.41774152212242E-01 -9.17073475386279E-01 a22 : 1.44215430925602E+01 4.24626213311965E+00 a30 : -1.12265030263064E-02 2.86043784590367E-01 a23 : 1.13638336684732E+01 1.52259535312830E+00 a34 : 3.00592741543646E-01 6.76709045834798E-01 a35 : 1.00000000000000E+00 0.00000000000000E+00 a33 : -7.75343685999476E-01 -1.38308945954516E+00 == err : 2.149E-14 = rco : 4.343E-04 = res : 2.831E-13 == solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : 1.43012000152534E+01 1.18694596821997E-66 a32 : -2.25510167551102E+00 2.78190461301557E-67 a21 : 8.15762946888016E+00 5.93472984109987E-67 a31 : 3.98122651555201E+00 5.93472984109987E-67 a22 : 5.61496961298918E-01 1.48368246027497E-67 a30 : -6.10707771257244E+00 3.70920615068742E-68 a23 : 6.07470140738288E+00 3.70920615068742E-68 a34 : -2.05013270782983E+00 0.00000000000000E+00 a35 : 1.00000000000000E+00 5.79563461044910E-70 a33 : 4.69701849882556E+00 2.96736492054994E-67 == err : 6.623E-15 = rco : 7.199E-04 = res : 4.547E-13 == solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : -3.05217728283331E+04 1.60363500371269E+04 a32 : 3.02151015390978E+03 9.64238921999530E+02 a21 : -3.46050009643349E+03 5.30857365681650E+02 a31 : 1.90284307740822E+02 -1.30922481114622E+04 a22 : -2.49939594990664E+02 -8.32745627549361E+02 a30 : 3.51724713024514E+04 1.07207161538227E+05 a23 : -9.89535191130918E+00 -1.25373463141695E+02 a34 : -9.14793418280408E+00 -5.57215391740866E+01 a35 : 1.00000000000000E+00 5.89196360757928E-31 a33 : -1.35268640509070E+02 -2.48438831236936E+02 == err : 3.069E-10 = rco : 1.942E-10 = res : 2.980E-07 == solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : -3.02644947747120E+00 5.29684811548649E+00 a32 : 6.43596936267659E-01 2.41946693053619E+00 a21 : 1.31122776182327E-01 1.12439905037670E+01 a31 : 2.16390216742216E-01 -2.87774362314232E+00 a22 : 7.97451412174043E+00 9.87059521605464E+00 a30 : -7.80083601770601E-01 1.12613760153537E+00 a23 : 9.41371950010189E+00 2.99090313528679E+00 a34 : -5.66124666621383E-01 1.32929028234968E+00 a35 : 1.00000000000000E+00 1.18612182852518E-31 a33 : 2.39727090999659E-01 -1.56976299381939E+00 == err : 1.016E-14 = rco : 5.737E-04 = res : 7.525E-13 == solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : -1.63061630518510E+01 -2.96813278451046E+01 a32 : 1.28263751656046E+00 -1.43499849654010E+00 a21 : -1.95746459897340E+00 -3.38436050253517E+01 a31 : -8.30043233701328E+00 2.06901627455250E+00 a22 : 1.74147206562589E+01 -2.67947427846543E+01 a30 : 5.77230428445937E+00 -4.75319791898516E+00 a23 : 1.13262147431237E+01 -8.47303479955048E+00 a34 : 2.83873219166110E-01 -3.76579324424466E+00 a35 : 1.00000000000000E+00 -4.16172504287871E-32 a33 : 1.58239626282290E+00 5.32304731016076E+00 == err : 7.181E-14 = rco : 8.948E-05 = res : 3.859E-12 == solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : -6.68772375765163E+00 -4.00957319845438E+00 a32 : -2.28056277016263E+00 2.69507811290578E+00 a21 : -8.50033975471788E+00 -9.05748332362675E-01 a31 : 1.94749907971695E+00 -2.13718449554830E+00 a22 : 3.94001793254940E-01 3.76544896145528E+00 a30 : -2.12749773530846E+00 8.94164789888951E-01 a23 : 7.39514460344526E+00 1.61042256968354E+00 a34 : -1.46326906513544E+00 7.15743364303794E-01 a35 : 1.00000000000000E+00 -1.50196547857632E-31 a33 : 6.10067534605442E-01 -2.00718098795916E+00 == err : 5.950E-15 = rco : 7.041E-04 = res : 5.713E-13 == solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : 1.55447206999807E+01 2.46889605035042E+01 a32 : -2.70888901615033E+00 1.06098693586985E+01 a21 : 1.81480276531994E+01 1.98810480631786E+01 a31 : 4.19895012527010E+00 -3.37068520952933E+01 a22 : 1.57205495781764E+01 9.03529941395446E+00 a30 : -9.57730755160849E+00 3.07562796437907E+01 a23 : 1.04181713515821E+01 2.69936387538633E+00 a34 : -1.19701621519051E-01 1.19971727794948E+00 a35 : 1.00000000000000E+00 -1.22451340830367E-32 a33 : 3.03589812888593E+00 -1.32161706569315E+00 == err : 7.316E-14 = rco : 1.078E-04 = res : 3.311E-12 == solution 33 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : -1.45905903849896E+03 8.08991986121948E-60 a32 : 2.59811202683644E+01 1.84745766061503E-61 a21 : -1.75960484496282E+02 -2.13916150176477E-61 a31 : 3.92374294037773E+02 -3.73380916671669E-60 a22 : -3.24794617900584E+01 3.64629801437176E-62 a30 : -2.84686135128959E+03 1.74244427780112E-59 a23 : 3.08628373574861E+01 -1.04527209745324E-61 a34 : 8.96681660332717E+00 -4.73907399384284E-62 a35 : 1.00000000000000E+00 -2.65875896881274E-64 a33 : -9.44481084150022E+01 3.30597686636373E-61 == err : 4.439E-12 = rco : 2.505E-07 = res : 4.657E-10 == solution 34 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : 1.07248400424143E+02 7.74765179171210E+01 a32 : 3.47786321820574E+01 -1.52127129236801E+01 a21 : 3.08817975844588E+01 4.20039131704811E+01 a31 : -7.09423686497818E+01 8.89798618673168E+01 a22 : 4.34797041322392E+00 4.31456106259507E+00 a30 : 8.94584846456260E+01 -2.36332229073738E+02 a23 : 7.81265986574173E+00 -3.62976913157115E+00 a34 : -1.27770672633701E+00 -1.61323072514273E+00 a35 : 1.00000000000000E+00 2.22146803375139E-31 a33 : 2.32299821269276E+00 1.41252281916597E+01 == err : 3.723E-13 = rco : 1.352E-05 = res : 2.058E-11 == solution 35 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : -3.02217389406608E+02 -4.84972259453532E+02 a32 : -1.25420726152472E+02 -1.15635505071413E+02 a21 : -4.16191871003110E+01 -6.21829358739311E+01 a31 : 2.30657472818142E+02 -2.74353689973003E+01 a22 : -1.94405282527366E+01 4.01886737147898E+01 a30 : -1.54645615456441E+03 1.33076421955964E+02 a23 : -3.61942750625190E+00 6.17714293191584E+00 a34 : -6.35863444722306E+00 2.74539685862926E+00 a35 : 1.00000000000000E+00 6.62670440239311E-33 a33 : 1.87778863292032E+01 1.16100764903448E+01 == err : 3.235E-12 = rco : 7.960E-07 = res : 3.293E-10 == solution 36 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : 1.55447206999807E+01 -2.46889605035042E+01 a32 : -2.70888901615034E+00 -1.06098693586986E+01 a21 : 1.81480276531994E+01 -1.98810480631786E+01 a31 : 4.19895012527013E+00 3.37068520952934E+01 a22 : 1.57205495781764E+01 -9.03529941395447E+00 a30 : -9.57730755160852E+00 -3.07562796437907E+01 a23 : 1.04181713515821E+01 -2.69936387538633E+00 a34 : -1.19701621519051E-01 -1.19971727794948E+00 a35 : 1.00000000000000E+00 1.53152356869825E-32 a33 : 3.03589812888593E+00 1.32161706569315E+00 == err : 7.441E-14 = rco : 1.078E-04 = res : 3.865E-12 == solution 37 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : -6.23846932348979E+00 -2.74530580201072E+01 a32 : -5.74025077921021E+00 2.14861423575046E+00 a21 : -1.23752335375474E+01 -6.40894881455591E+00 a31 : -7.69848444169724E-01 -7.43296043930539E+00 a22 : -8.86882226517601E+00 1.29009408382255E+01 a30 : -9.15987457874660E+00 9.51675238632348E+00 a23 : 4.07611771962605E+00 4.34557261046742E+00 a34 : -2.93839212461065E+00 1.93136560465218E+00 a35 : 1.00000000000000E+00 -2.48966490522606E-32 a33 : 3.62003014223986E+00 -3.36101220273312E+00 == err : 2.885E-14 = rco : 1.352E-04 = res : 1.833E-12 == solution 38 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : -6.23846932348979E+00 2.74530580201072E+01 a32 : -5.74025077921021E+00 -2.14861423575046E+00 a21 : -1.23752335375474E+01 6.40894881455591E+00 a31 : -7.69848444169724E-01 7.43296043930539E+00 a22 : -8.86882226517601E+00 -1.29009408382255E+01 a30 : -9.15987457874661E+00 -9.51675238632349E+00 a23 : 4.07611771962605E+00 -4.34557261046742E+00 a34 : -2.93839212461065E+00 -1.93136560465218E+00 a35 : 1.00000000000000E+00 5.81866007965449E-32 a33 : 3.62003014223986E+00 3.36101220273312E+00 == err : 2.711E-14 = rco : 1.352E-04 = res : 1.017E-12 == solution 39 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : 3.34213290424468E+02 -3.19594720531197E+01 a32 : -3.37160862124812E+00 -4.80598076805119E+01 a21 : 1.22918628796847E+02 -3.74429351459338E+01 a31 : -1.64784119820812E+02 -6.76624653546220E+01 a22 : 6.62689157724618E+01 -9.42423019576460E-01 a30 : 3.38414790566269E+02 2.26573586334027E+02 a23 : 2.20757715105472E+01 -9.92385384907263E+00 a34 : 5.06145400468763E+00 -4.41060171069895E+00 a35 : 1.00000000000000E+00 -9.57194231274121E-32 a33 : 5.97437229770483E+00 2.90647442825355E+01 == err : 4.229E-13 = rco : 2.779E-06 = res : 5.821E-11 == solution 40 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : -5.36964544034678E+01 -2.27893625898235E-64 a32 : -2.68418244464410E+01 -9.02078935847181E-65 a21 : -2.95381229812747E+01 -1.13946812949118E-64 a31 : 4.95381797279303E+01 1.13946812949118E-64 a22 : -2.07989253551981E+00 -2.31454463802895E-65 a30 : -7.87972050337509E+01 -3.79822709830392E-64 a23 : 6.59307288892734E+00 -4.45104738082491E-66 a34 : -1.81974538269896E+00 -1.78041895232996E-66 a35 : 1.00000000000000E+00 -3.24555538185149E-68 a33 : 1.16086193157812E+00 -5.93472984109988E-66 == err : 4.805E-14 = rco : 7.725E-05 = res : 1.819E-12 == solution 41 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : 2.64767721843557E+02 -1.56676867805037E-64 a32 : -4.01018871277897E+01 5.93472984109988E-66 a21 : 3.71259593441225E+01 -1.48368246027497E-65 a31 : 1.70224021642688E+01 -8.30862177753982E-66 a22 : -7.46110980379014E+01 1.95846084756296E-65 a30 : -1.06222435213525E+02 4.27300548559191E-65 a23 : -1.28911197333204E+01 2.96736492054994E-66 a34 : -1.04793865481424E+01 1.18694596821997E-66 a35 : 1.00000000000000E+00 5.65074374518787E-69 a33 : 5.21503567153522E+00 2.96736492054994E-67 == err : 3.649E-13 = rco : 6.518E-06 = res : 1.455E-11 == solution 42 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a20 : 3.34213290424468E+02 3.19594720531197E+01 a32 : -3.37160862124812E+00 4.80598076805119E+01 a21 : 1.22918628796847E+02 3.74429351459338E+01 a31 : -1.64784119820812E+02 6.76624653546220E+01 a22 : 6.62689157724618E+01 9.42423019576462E-01 a30 : 3.38414790566269E+02 -2.26573586334027E+02 a23 : 2.20757715105472E+01 9.92385384907263E+00 a34 : 5.06145400468763E+00 4.41060171069895E+00 a35 : 1.00000000000000E+00 -2.95900972889082E-32 a33 : 5.97437229770483E+00 -2.90647442825355E+01 == err : 3.914E-13 = rco : 2.779E-06 = res : 1.697E-10 == SHAR_EOF fi # end of overwriting check if test -f 'discret3s' then echo shar: will not over-write existing file "'discret3s'" else cat << "SHAR_EOF" > 'discret3s' 8 -1.37539569915948E-01*y**2-9.16930466106320E-02*y*z-6.87697849579740E-02*y*t -5.50158279663792E-02*y*u-4.58465233053160E-02*y*v-3.92970199759852E-02*y*s -3.43848924789870E-02*y*a+ 4.12618709747844E+00*y-4.40126623731034E+00; -1.78264047725719E-01*y*z-1.33698035794289E-01*z**2-1.06958428635431E-01*z*t -8.91320238628593E-02*z*u-7.63988775967365E-02*z*v-6.68490178971445E-02*z*s -5.94213492419062E-02*z*a+ 4.01094107382867E+00*z-4.27833714541725E+00; -1.96868164299851E-01*y*t-1.57494531439881E-01*z*t-1.31245442866567E-01*t**2 -1.12496093885629E-01*t*u-9.84340821499253E-02*t*v-8.74969619110448E-02*t*s -7.87472657199403E-02*t*a+ 3.93736328599701E+00*t-4.19985417173015E+00; -2.07217047148772E-01*y*u-1.72680872623977E-01*z*u-1.48012176534837E-01*t*u -1.29510654467983E-01*u**2-1.15120581749318E-01*u*v-1.03608523574386E-01*u*s -9.41895668858055E-02*u*a+ 3.88531963403948E+00*u-4.14434094297544E+00; -2.13678947124996E-01*y*v-1.83153383249996E-01*z*v-1.60259210343747E-01*t*v -1.42452631416664E-01*u*v-1.28207368274997E-01*v**2-1.16552152977270E-01*v*s -1.06839473562498E-01*v*a+ 3.84622104824992E+00*v-4.10263578479991E+00; -2.18035916725452E-01*y*s-1.90781427134770E-01*z*s-1.69583490786463E-01*t*s -1.52625141707816E-01*u*s-1.38750128825288E-01*v*s-1.27187618089847E-01*s**2 -1.17403955159859E-01*s*a+ 3.81562854269541E+00*s-4.07000377887510E+00; -2.21139931193274E-01*y*a-1.96568827727354E-01*z*a-1.76911944954619E-01*t*a -1.60829040867835E-01*u*a-1.47426620795516E-01*v*a-1.36086111503553E-01*s*a -1.26365674967585E-01*a**2+ 3.79097024902755E+00*a-4.04370159896272E+00; -2.23445119966269E-01*y*b-2.01100607969642E-01*z*b-1.82818734517856E-01*t*b -1.67583839974702E-01*u*b-1.54692775361263E-01*v*b-1.43643291406887E-01*s*b -1.34067071979761E-01*a*b+ 3.77063639943078E+00*b-4.02201215939284E+00; TITLE : system discret3, every equation divided by average coefficient ROOT COUNTS : total degree : 256 2-homogeneous Bezout number : 128 with partition : {y z t u v s a }{b } generalized Bezout number : 128 based on the set structure : {y }{y z t u v s a } {y z }{z t u v s a } {y z t }{t u v s a } {y z t u }{u v s a } {y z t u v }{v s a } {y z t u v s }{s a } {y z t u v s a }{a } {y z t u v s a }{b } mixed volume : 128 REFERENCES : Received from POSSO via e-mail, on the occasion of the state-of-the-art workshop in Toulouse, December 1994. THE SOLUTIONS : 128 8 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.23926894275400E+02 -5.14891985385498E-53 z : -5.86814918654176E+01 4.33994429649336E-53 t : -2.01366896399118E+02 2.11497050066247E-52 u : -2.64407088332770E+03 5.06850857946786E-51 v : 8.91988773917068E+03 -2.08917232073381E-50 s : -9.48148284917914E+03 2.67458516808088E-50 a : 3.35578748715909E+03 -1.11539081173880E-50 b : 6.22188386183895E+02 -1.44830375278918E-51 == err : 2.074E-06 = rco : 2.160E-08 = res : 4.366E-10 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.22546144508539E+02 8.30589216592958E-44 z : -6.50214326739188E+01 -8.62035469423665E-44 t : -6.55381538573630E+02 -1.30391780024296E-42 u : 9.92309223702615E+02 2.60816676672457E-42 v : -2.47059512583326E+02 -8.24907731339774E-43 s : -8.37529585368993E+01 -3.13248366136688E-43 a : -4.96399258418052E+01 -2.08995147318362E-43 b : -3.62778966086359E+01 -1.70139905182809E-43 == err : 8.603E-09 = rco : 4.707E-06 = res : 1.000E-11 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 7.01798811783258E+00 -2.32667887437072E-52 z : 1.94211645886813E+02 -1.40659463112176E-50 t : -3.05188949817879E+02 3.42030358994611E-50 u : 6.20372005959793E+01 -1.05475021420728E-50 v : 2.57004670640532E+01 -4.49984996113178E-51 s : 1.69464464188081E+01 -3.75988043446075E-51 a : 1.32752017342815E+01 -3.34813372253004E-51 b : 1.13437005493214E+01 -2.89005734887655E-51 == err : 4.167E-12 = rco : 6.809E-05 = res : 1.364E-12 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 5.84290735191921E+01 1.39347749466756E-54 z : -1.20994646883787E+01 -5.71442068523211E-55 t : -1.45878053503355E+01 -9.95363826075556E-55 u : -2.63878092032769E+01 -2.45081259608616E-54 v : -1.02681421338480E+02 -1.21151453657801E-53 s : 7.93484651411727E+01 1.08763570956835E-53 a : 3.39789619201238E+01 5.64974115364013E-54 b : 2.39421616586302E+01 4.52820444820288E-54 == err : 2.320E-12 = rco : 1.556E-04 = res : 3.411E-13 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.50088855555694E+02 -1.38724162211839E-47 z : -8.93917941299493E+02 1.00509233399120E-46 t : 4.48832198487168E+02 -7.49113514125693E-47 u : 2.10597782170758E+03 -4.97436258489389E-46 v : -2.96736314293266E+03 8.89360619757440E-46 s : 8.52509048326467E+02 -3.17336518790275E-46 a : 2.17873160127570E+02 -8.99856190916435E-47 b : 1.08772045194453E+02 -5.17125889679409E-47 == err : 1.608E-07 = rco : 3.009E-07 = res : 3.492E-10 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 3.36686800832416E+02 -8.39759828589927E-58 z : -1.86443957001690E+03 9.17025597581159E-57 t : 3.94130760260442E+03 -2.86836884103425E-56 u : -3.28612773010127E+03 3.14891573951961E-56 v : 6.18158029177168E+02 -7.36481460721617E-57 s : 1.76925452673051E+02 -2.45357296765718E-57 a : 9.34894148081253E+01 -1.48740031688787E-57 b : 6.28511599141539E+01 -1.11882354977922E-57 == err : 2.488E-07 = rco : 2.625E-07 = res : 5.821E-10 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 6.66549373654900E+02 4.90865175025124E-69 z : -7.63362078134741E+03 -1.10721151094563E-67 t : 3.71758521192845E+04 7.96346605293684E-67 u : -9.15218180876985E+04 -2.57405404389185E-66 v : 1.19771129510205E+05 4.14743885316505E-66 s : -7.95172699137497E+04 -3.25551706658832E-66 a : 2.10751778114246E+04 9.92088933368853E-67 b : 3.21582450115251E+03 1.79168869934459E-67 == err : 8.608E-04 = rco : 1.389E-10 = res : 2.719E-07 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.96098310098485E+02 -1.03572839833725E-44 z : -1.39721896244831E+03 9.94935594225936E-44 t : 2.25235813968631E+03 -2.43334657256686E-43 u : -7.19615899632487E+02 9.74395076697112E-44 v : -1.02318831540082E+03 2.08937159015212E-43 s : 4.65116564438021E+02 -1.20078551756193E-43 a : 1.40450163255954E+02 -3.44877307780860E-44 b : 7.66803633179261E+01 -2.23722807862972E-44 == err : 8.713E-09 = rco : 5.956E-07 = res : 6.548E-11 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 6.25978668982570E+01 -2.96270622584300E-46 z : -1.43324117218206E+01 1.39667992690578E-46 t : -2.13485344402951E+01 3.24666074864319E-46 u : -9.49365997861776E+01 1.88778440579696E-45 v : 4.60370744802113E+01 -1.12623890247981E-45 s : 2.10962981760113E+01 -6.89017360144087E-46 a : 1.48863063938339E+01 -5.80909373150278E-46 b : 1.21603084192180E+01 -5.29079119892170E-46 == err : 2.595E-12 = rco : 2.739E-04 = res : 2.274E-13 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.27671917898852E+02 7.33038183642991E-58 z : -6.22825681891563E+01 -6.98659357177087E-58 t : -2.20191460718397E+02 -3.63191329274052E-57 u : -2.97885785190675E+03 -6.61163419547814E-56 v : 1.03543645000370E+04 2.82397477377082E-55 s : -1.13411389336085E+04 -3.65770499584531E-55 a : 4.13643439669575E+03 1.53480345512468E-55 b : 7.90398072329491E+02 3.18653271221325E-56 == err : 8.873E-06 = rco : 1.675E-08 = res : 5.239E-10 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.71983179362643E+02 -1.29815973159435E-48 z : -4.10970882439170E+02 6.29411032057555E-48 t : 1.28384973048117E+02 -2.96910749732367E-48 u : 3.14391709810119E+02 -1.00119260323138E-47 v : -1.15187579561087E+02 4.68704789570972E-48 s : -4.45652568734765E+01 2.18882724977113E-48 a : -2.80361433468340E+01 1.60959946324298E-48 b : -2.10676351901119E+01 1.39631075128020E-48 == err : 5.245E-10 = rco : 1.844E-05 = res : 5.457E-12 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 3.82669958895192E+00 -9.31061762955476E-49 z : 1.56363525389525E+01 -7.64327183189178E-48 t : 1.94001405731153E+02 -1.40600787574400E-46 u : -1.41375503432942E+02 1.37051356039398E-46 v : -3.07165316747276E+02 3.57236385621503E-46 s : 1.83557215358417E+02 -2.58103542524183E-46 a : 6.75191469627482E+01 -1.03859627487118E-46 b : 4.29446445900914E+01 -7.20617457311507E-47 == err : 2.494E-10 = rco : 1.956E-05 = res : 1.478E-12 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 3.26810707604515E+02 -2.45442505645496E-54 z : -1.75664074244621E+03 2.67549033104295E-53 t : 3.60435818886382E+03 -8.35360345593791E-53 u : -2.91680748005224E+03 9.14500372463118E-53 v : 5.32519441009713E+02 -2.11132570550628E-53 s : 1.47914218955573E+02 -7.23942036319420E-54 a : 7.58456660842799E+01 -4.35492272088626E-54 b : 4.94754037141040E+01 -3.27900880735559E-54 == err : 2.174E-07 = rco : 2.910E-07 = res : 2.328E-10 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 7.63538495363023E+01 5.49587243512708E-50 z : -2.37766931622454E+01 -3.08516395246970E-50 t : -1.17147735249340E+02 -2.42052254057724E-49 u : 3.65474689392886E+01 9.88505323248161E-50 v : 1.84270850018845E+01 5.91975621336826E-50 s : 1.37673215465012E+01 5.17848162580363E-50 a : 1.18287033876256E+01 5.03649100057998E-50 b : 1.08901887947235E+01 4.60425483261976E-50 == err : 4.134E-12 = rco : 3.345E-04 = res : 2.274E-13 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.51160030378640E+02 -3.89120162050704E-58 z : -9.73494105517888E+01 4.98483616378028E-58 t : -1.10497870939144E+03 8.22698967302674E-57 u : 1.01788035114534E+03 -9.72852243330198E-57 v : 3.57032964428341E+03 -4.40830088724211E-56 s : -6.18756068675340E+03 8.97036373088493E-56 a : 2.66651878088728E+03 -4.44044956757522E-56 b : 5.57202078244169E+02 -9.77342659334897E-57 == err : 7.671E-07 = rco : 6.427E-08 = res : 1.106E-09 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 3.69319572926860E+00 -8.72759472594803E-54 z : 4.54363431357431E+01 -1.65742733487163E-52 t : -1.08706385663265E+01 6.65581055735850E-53 u : -6.68675657427156E+00 6.19903924459860E-53 v : -5.55918596067607E+00 5.22024357439882E-53 s : -5.10581568504253E+00 5.15499052971884E-53 a : -4.90714207869564E+00 6.06853315523863E-53 b : -4.83037888431383E+00 6.72106360203848E-53 == err : 4.144E-14 = rco : 3.464E-03 = res : 3.553E-14 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 9.84328612260134E+00 3.70734153770513E-52 z : 3.88003730703575E+02 2.93663170951689E-50 t : -9.00391518694074E+02 -1.02025745478944E-49 u : 2.90593292308138E+02 4.59089427172153E-50 v : 2.24383901329503E+02 4.26053441976794E-50 s : 4.76240654863198E+02 9.32961931616557E-50 a : -4.74673346634527E+02 -1.12128221856299E-49 b : -1.42808651616331E+02 -3.62255540193172E-50 == err : 1.448E-09 = rco : 2.341E-06 = res : 1.864E-11 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 7.72141424758115E+01 3.30576733654806E-44 z : -2.14583372825515E+01 -1.86834378440163E-44 t : -3.59938061171970E+01 -4.78028886287056E-44 u : -9.73830507680167E+01 -1.74265114382718E-43 v : -6.65295296855178E+02 -1.50289533989943E-42 s : 1.55856733317557E+03 4.29673415314703E-42 a : -7.99650984627697E+02 -2.61397722891160E-42 b : -1.86773483473236E+02 -7.33494901831085E-43 == err : 3.003E-08 = rco : 1.113E-06 = res : 2.910E-11 == solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 5.96160599574411E+00 4.84660097993472E-57 z : 4.02879503803381E+01 6.70778038923743E-56 t : 9.92550915271024E+02 2.45631623079791E-54 u : -3.40711827573878E+03 -1.14493922561178E-53 v : 3.54775048379276E+03 1.52139082694216E-53 s : -9.33558996429288E+02 -5.00996539895378E-54 a : -2.29873683247854E+02 -1.33440241063482E-54 b : -1.12613835228093E+02 -7.79488670689609E-55 == err : 4.764E-08 = rco : 2.009E-07 = res : 9.913E-11 == solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.22990987406370E+01 1.91062433496488E-88 z : 2.17451339900796E+03 3.71698086368628E-86 t : -1.61045620596053E+04 -4.19797258897409E-85 u : 4.69116882351151E+04 1.65697618922208E-84 v : -6.67632210524265E+04 -2.99579380467969E-84 s : 4.63339078233826E+04 2.53603795647408E-84 a : -1.25586254341289E+04 -8.15341764754271E-85 b : -1.93347362243365E+03 -1.58970544469434E-85 == err : 8.795E-04 = rco : 4.258E-10 = res : 1.448E-07 == solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 3.40480307774152E+02 4.91707944055042E-73 z : -1.68264659693063E+03 -4.91753757073800E-72 t : 1.21097223909169E+03 5.21738261043318E-72 u : 8.75609530000442E+03 5.37546631293883E-71 v : -2.23181036561833E+04 -1.72941356632388E-70 s : 2.00293281806899E+04 1.88959515879853E-70 a : -6.32012577333548E+03 -7.06603549421339E-71 b : -1.07793618637356E+03 -1.31015656271715E-71 == err : 3.645E-05 = rco : 3.864E-09 = res : 1.700E-08 == solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 7.23006900993300E+00 -1.47670250232594E-48 z : 2.06129727756580E+02 -8.24040087768525E-47 t : -3.33719199756540E+02 1.97934263370588E-46 u : 6.98922253470429E+01 -5.60104572646921E-47 v : 2.98335589188694E+01 -2.78715903968414E-47 s : 2.02702467445580E+01 -2.28314243447851E-47 a : 1.63633719796903E+01 -2.10453493272659E-47 b : 1.44104885949067E+01 -2.05495514735438E-47 == err : 5.018E-11 = rco : 6.181E-05 = res : 1.194E-12 == solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 8.36162650961166E+00 -3.59946630700650E-87 z : 8.04888708369477E+01 -6.83785482850693E-86 t : 2.92829903849221E+03 -3.66613307546402E-84 u : -1.59595505286216E+04 2.62779738843014E-83 v : 3.09744648713691E+04 -6.28790901894056E-83 s : -2.62355195992384E+04 6.30445473187423E-83 a : 8.21945572279553E+03 -2.27346433006226E-83 b : 1.41772379855881E+03 -4.40360625506918E-84 == err : 3.532E-04 = rco : 2.193E-09 = res : 1.056E-08 == solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 7.95475240596689E+01 1.11146163533866E-47 z : -2.27751595540780E+01 -6.27482935093351E-48 t : -3.93586470987275E+01 -1.60541804813989E-47 u : -1.09713495521909E+02 -5.86048556782454E-47 v : -7.72286604352294E+02 -5.10433245083390E-46 s : 1.86425777030045E+03 1.45773990489901E-45 a : -9.85671387833934E+02 -8.87028799595679E-46 b : -2.37268001048399E+02 -2.42825935917399E-46 == err : 6.694E-08 = rco : 8.273E-07 = res : 8.004E-11 == solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 3.50769504949954E+02 -1.23896940169764E-57 z : -1.78590480722753E+03 1.24401196787474E-56 t : 1.32417879038619E+03 -1.36529196470737E-56 u : 9.86477588699069E+03 -1.33573371779544E-55 v : -2.59072563835113E+04 4.32547090090534E-55 s : 2.39577967437987E+04 -4.73512886083065E-55 a : -7.79035973690088E+03 1.77232277906765E-55 b : -1.36935843690762E+03 3.55989905888577E-56 == err : 5.637E-05 = rco : 3.060E-09 = res : 8.382E-09 == solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 7.41141485734210E+01 -3.52121742354370E-52 z : -2.24019638655316E+01 2.20147459489100E-52 t : -1.07132566303382E+02 1.60065718600004E-51 u : 3.24399838556145E+01 -6.51714783741353E-52 v : 1.58742271571657E+01 -4.18924546845505E-52 s : 1.15098340865210E+01 -3.67456207854167E-52 a : 9.59633649617716E+00 -3.72594885122716E-52 b : 8.57257821638204E+00 -3.84340433165113E-52 == err : 5.663E-12 = rco : 3.719E-04 = res : 2.274E-13 == solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.00901771355062E+02 3.48905801386075E-42 z : -4.21678408498415E+01 -2.99004249354158E-42 t : -2.89049159108085E+02 -3.07036754895130E-41 u : 1.34876828761150E+02 1.93394076873008E-41 v : 1.19393097866859E+02 2.16235241841503E-41 s : 2.70418559332754E+02 6.10104331890061E-41 a : -2.78373257357652E+02 -7.40337507918248E-41 b : -8.49546722633212E+01 -2.58593866983421E-41 == err : 1.085E-09 = rco : 9.768E-06 = res : 3.638E-12 == solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.60529716570799E+02 1.41183557191788E-43 z : -3.46942843717162E+02 -6.03094774228046E-43 t : 8.77275675297832E+01 2.30176957320667E-43 u : 8.73857761123705E+01 2.97879926289423E-43 v : 2.56915204190014E+02 1.04569708371389E-42 s : -1.67621101207910E+02 -8.07662454730964E-43 a : -6.39943194780510E+01 -3.63916116420730E-43 b : -4.14795998692019E+01 -2.73795108933840E-43 == err : 2.062E-10 = rco : 1.731E-05 = res : 1.819E-12 == solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 5.30992621799859E+01 -4.77733853363342E-52 z : -9.86528113391370E+00 1.78711776117310E-52 t : -1.02957493659447E+01 2.83279780216986E-52 u : -1.45378661960058E+01 5.43965693713527E-52 v : -2.58255397388784E+01 1.22398398558482E-51 s : -8.14747403475691E+01 4.99185791801887E-51 a : 1.02899914602320E+02 -7.36315356168953E-51 b : 3.61754308700780E+01 -2.75628860728258E-51 == err : 9.907E-12 = rco : 1.406E-04 = res : 1.137E-13 == solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.77180444661671E+02 -8.25862913300808E-46 z : -4.36190712083081E+02 4.01231161855504E-45 t : 1.40386899633068E+02 -2.02608394295597E-45 u : 3.54199351659681E+02 -5.81969926187243E-45 v : -1.33711789482409E+02 2.32098611000870E-45 s : -5.33060873514509E+01 1.51744612756658E-45 a : -3.45581070378721E+01 1.13432134296313E-45 b : -2.67633049132147E+01 1.00339863640397E-45 == err : 1.260E-10 = rco : 1.663E-05 = res : 3.638E-12 == solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 7.53248319534431E+00 1.31241660218535E-58 z : 1.97447029603386E+02 6.77738627363951E-57 t : -1.12121127958749E+02 -5.62254656715241E-57 u : -2.09812623849423E+02 -1.37630272120719E-56 v : -1.25033655150508E+03 -1.04637259881128E-55 s : 2.74483056680653E+03 2.69997497134416E-55 a : -1.36353977629440E+03 -1.54078046682984E-55 b : -3.13965890590772E+02 -3.95565820285323E-56 == err : 1.497E-07 = rco : 3.713E-07 = res : 1.096E-10 == solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.03950983939643E+02 -1.12365742938935E-51 z : -4.47555321147881E+01 9.91601580218226E-52 t : -3.16070598647005E+02 9.10932503732594E-51 u : 1.51954659776983E+02 -4.25515104358184E-51 v : 1.38593629871841E+02 -4.74520140912853E-51 s : 3.23457248008473E+02 -2.87831180083415E-50 a : -3.43130390835499E+02 2.96601189288405E-50 b : -1.07922307227833E+02 8.43395602488809E-51 == err : 1.188E-10 = rco : 7.585E-06 = res : 7.276E-12 == solution 33 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.03623342758494E+02 -9.95082830151903E-50 z : -6.42359083511151E+02 6.37527466767030E-49 t : 6.44269594983238E+02 -9.72891574717134E-49 u : -1.07428136392314E+02 2.17528854806092E-49 v : -3.97182884501891E+01 1.03402584721692E-49 s : -2.43141573154066E+01 7.80739628987088E-50 a : -1.80732720721011E+01 6.83297257366466E-50 b : -1.48519218650236E+01 6.51297164255401E-50 == err : 7.601E-10 = rco : 1.185E-05 = res : 3.638E-12 == solution 34 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 8.77984835806030E+01 1.62701699352364E-42 z : -2.86338607164962E+01 -1.04482400908475E-42 t : -6.29840607170024E+01 -3.37128325699195E-42 u : -4.44699935274221E+02 -3.20737950630066E-41 v : 4.01937379226676E+02 3.68099211289624E-41 s : 5.92862633833365E+02 5.94691800405568E-41 a : -5.32280639933597E+02 -6.26778031992445E-41 b : -1.53089130033316E+02 -1.93140091526349E-41 == err : 2.722E-09 = rco : 2.970E-06 = res : 5.457E-12 == solution 35 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.46726026498708E+02 -9.38131221291213E-55 z : -9.17208277380382E+01 1.19309780289886E-54 t : -1.01051210773115E+03 2.00037780640280E-53 u : 9.03483144573175E+02 -2.42612041822545E-53 v : 3.07570208776460E+03 -1.04727761347890E-52 s : -5.17295951014322E+03 2.14954617095573E-52 a : 2.16328118677692E+03 -1.06649607688533E-52 b : 4.38620348087506E+02 -2.42611892470178E-53 == err : 8.728E-07 = rco : 8.331E-08 = res : 3.783E-10 == solution 36 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 3.80480267868423E+00 -2.40416686492821E-53 z : 4.82246108259398E+01 -5.89234993460267E-52 t : -1.18868681363531E+01 2.11419864763152E-52 u : -7.53342015489320E+00 1.77162016306160E-52 v : -6.45320186136891E+00 1.94454073146356E-52 s : -6.10724757320934E+00 2.15987577890751E-52 a : -6.04867577879874E+00 2.38173613081946E-52 b : -6.13627973664784E+00 2.71452665868739E-52 == err : 1.904E-13 = rco : 3.054E-03 = res : 1.421E-14 == solution 37 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 9.10265117581788E+01 -1.69859269164673E-42 z : -3.11749579765462E+01 1.44127926113508E-42 t : -7.46341992345289E+01 5.69435147209194E-42 u : -6.35940349873703E+02 3.85672369843798E-41 v : 1.18596743516295E+03 -9.29257063632359E-41 s : -4.03560674610412E+02 2.34906668067091E-41 a : -1.15683765222626E+02 2.69049305150365E-41 b : -6.27835828994036E+01 1.82471831155136E-41 == err : 5.004E-09 = rco : 2.426E-06 = res : 7.276E-12 == solution 38 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.68740574535744E+01 1.32414279748918E-59 z : 1.22611812651339E+03 1.90642414877715E-57 t : -6.52696542887917E+03 -1.50015892634088E-56 u : 1.27116316888761E+04 3.83836408832692E-56 v : -1.03042183721849E+04 -3.82864919575559E-56 s : 2.35891516548535E+03 1.02807086888534E-56 a : 5.33644762807784E+02 2.75800740253684E-57 b : 2.47848849657360E+02 1.41285760325377E-57 == err : 5.573E-06 = rco : 1.808E-08 = res : 2.976E-09 == solution 39 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 4.27120712713687E+00 -7.33975881677490E-62 z : 1.77418354377698E+01 -6.18478857019277E-61 t : 9.53870124974889E+01 -5.04707526613149E-60 u : 1.52688822851876E+03 -1.10219185397003E-58 v : -5.77178151188364E+03 5.28791303633047E-58 s : 6.60839035513944E+03 -7.38306751928887E-58 a : -2.46489712677374E+03 3.26612795667323E-58 b : -4.75219226656131E+02 6.83781483234972E-59 == err : 3.791E-06 = rco : 4.757E-08 = res : 8.849E-10 == solution 40 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 7.31153153403187E+00 5.80934806176973E-50 z : 1.86030967038194E+02 2.53779009223254E-48 t : -1.02535692620363E+02 4.12516175833573E-48 u : -1.86232270691431E+02 1.38031592496824E-47 v : -1.07711699559021E+03 -1.91593129095894E-46 s : 2.29474878609926E+03 3.38457540768395E-46 a : -1.10620632576731E+03 -1.68410904382909E-46 b : -2.47148805558481E+02 6.37788478945750E-47 == err : 3.416E-08 = rco : 4.937E-07 = res : 8.822E-11 == solution 41 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.57982442120386E+01 -8.51554104645652E-56 z : 1.06106253705374E+03 -1.13295220466295E-53 t : -5.03722905670044E+03 7.96863279561275E-53 u : 7.88996914880612E+03 -1.65078234937380E-52 v : -3.00840728727473E+03 8.05547372921225E-53 s : -2.89719124769980E+03 8.37705476455222E-53 a : 1.99199766149354E+03 -6.78841305610527E-53 b : 4.75730727243951E+02 -1.63911944795271E-53 == err : 9.093E-07 = rco : 4.000E-08 = res : 7.403E-10 == solution 42 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.35491830191216E+02 5.89092319792666E-81 z : -2.50826256200789E+02 -1.26222536797151E-80 t : -5.65329627759617E+03 -4.38866419555668E-79 u : 2.45306845268761E+04 2.57687428653350E-78 v : -4.12371905117828E+04 -5.50050044262555E-78 s : 3.14694831819020E+04 5.11895019500421E-78 a : -9.07834648939370E+03 -1.75138529477900E-78 b : -1.46115154456596E+03 -3.13036153305176E-79 == err : 5.601E-04 = rco : 1.169E-09 = res : 1.839E-08 == solution 43 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.12637069560438E+01 9.33505625413884E-42 z : 5.31104951152717E+02 9.26415230346709E-40 t : -1.70737576045828E+03 -4.58516067914795E-39 u : 1.68438713213616E+03 6.25017230407098E-39 v : -3.44576739589716E+02 -1.77022671881840E-39 s : -1.03093039591163E+02 -5.54440552991686E-40 a : -5.57102506115738E+01 -3.34754788844091E-40 b : -3.77886558071415E+01 -2.69340775230944E-40 == err : 3.036E-09 = rco : 1.154E-06 = res : 7.958E-11 == solution 44 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 8.52230751432868E+01 -8.79288807090841E-46 z : -2.69782979787919E+01 5.62189329120792E-46 t : -5.75994409635172E+01 1.82619856134701E-45 u : -3.94721143178806E+02 1.69886056681703E-44 v : 3.46253640209559E+02 -1.83726273814091E-44 s : 4.95648374869043E+02 -3.42633895993797E-44 a : -4.31826208100336E+02 3.48241142534393E-44 b : -1.20509255243094E+02 1.08763135079547E-44 == err : 2.200E-09 = rco : 3.902E-06 = res : 3.638E-12 == solution 45 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.12140355129726E+02 -8.36729678975442E-59 z : -6.15301316976642E+02 4.92146084553153E-58 t : 2.16458129267666E+02 -2.62239588204171E-58 u : 3.22493368211460E+02 -5.34572737028459E-58 v : 1.66460957365099E+03 -3.48214653949543E-57 s : -3.29242376835466E+03 8.40054555819847E-57 a : 1.50602365906769E+03 -4.55589257814290E-57 b : 3.23583537191155E+02 -1.05601166053823E-57 == err : 2.543E-07 = rco : 2.176E-07 = res : 1.164E-10 == solution 46 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 8.87992339625097E+00 3.09161533747302E-51 z : 2.86853672393037E+02 2.00303029806247E-49 t : -2.32486405595104E+02 -2.44247040215536E-49 u : -1.37013897663814E+03 -1.86669123903855E-48 v : 2.22887256453158E+03 3.80671645981026E-48 s : -7.10720450007766E+02 -1.52934865877375E-48 a : -1.97260328093407E+02 -3.93935893385305E-49 b : -1.05539090389823E+02 -2.46259444113467E-49 == err : 2.405E-08 = rco : 6.905E-07 = res : 7.731E-11 == solution 47 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.50295071547935E+02 -6.73280121531065E-45 z : -3.00238653911902E+02 2.81573410175268E-44 t : 6.77043352513582E+01 -1.64543093115641E-44 u : 5.42393849438501E+01 -1.97276549430728E-44 v : 7.50086570832442E+01 2.12822204269332E-44 s : 2.05870223750453E+02 -5.34245039523837E-44 a : -2.38879018665044E+02 4.94833520214701E-44 b : -7.96175601254027E+01 1.48669008949461E-43 == err : 5.175E-11 = rco : 1.564E-05 = res : 2.274E-12 == solution 48 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.09776761584796E+02 -3.57469433281660E-52 z : -6.81778388754842E+02 2.31931751526776E-51 t : 7.04498422381778E+02 -3.61155210727256E-51 u : -1.21030469551623E+02 8.99992422960465E-52 v : -4.61056951132702E+01 3.61160308621372E-52 s : -2.90830275583470E+01 2.71705011627462E-52 a : -2.22776029891900E+01 2.35387613947758E-52 b : -1.88671632986435E+01 2.20287651577280E-52 == err : 5.465E-10 = rco : 1.114E-05 = res : 3.638E-12 == solution 49 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 8.61944703081879E+00 7.48824625846285E-48 z : 2.70268264609443E+02 4.78996854754463E-46 t : -2.12610727663125E+02 -5.58692016497637E-46 u : -1.21615224008489E+03 -4.52377721900771E-45 v : 1.92008824663821E+03 9.00320792594556E-45 s : -5.94180532274771E+02 -3.33769511466893E-45 a : -1.60032458245428E+02 -1.12916491164618E-45 b : -8.30786427739316E+01 -6.45535487457952E-46 == err : 3.451E-08 = rco : 8.442E-07 = res : 2.888E-11 == solution 50 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 9.55455127071454E+00 1.92380258303016E-46 z : 3.65569993055262E+02 1.51841259928575E-44 t : -8.23415440838556E+02 -5.17055527477938E-44 u : 2.57934187592485E+02 2.10310233084199E-44 v : 1.93298127133973E+02 2.08073663574793E-44 s : 3.98149407849416E+02 5.52325758234668E-44 a : -3.85090826062107E+02 -6.20981172253395E-44 b : -1.12416631028007E+02 -1.99193242459629E-44 == err : 1.737E-09 = rco : 2.901E-06 = res : 1.637E-11 == solution 51 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 5.47039013874908E+01 4.23329127361404E-53 z : -1.04706785480153E+01 -1.58315101760699E-53 t : -1.12582360577340E+01 -2.50459537900600E-53 u : -1.63786213829930E+01 -4.60339838640834E-53 v : -2.99787455021002E+01 -1.04710745134914E-52 s : -9.74548320895915E+01 -4.55710950783847E-52 a : 1.26837212192951E+02 6.58974184962001E-52 b : 4.59555179271331E+01 2.27162161792199E-52 == err : 8.954E-12 = rco : 1.024E-04 = res : 4.547E-13 == solution 52 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 9.37772978195483E+01 3.44268799439313E-47 z : -3.30880549034946E+01 -2.51664184146394E-47 t : -8.16112944668011E+01 -9.28110863667740E-47 u : -7.16461829895694E+02 -9.21088174391973E-46 v : 1.37669207662552E+03 2.13620184901177E-45 s : -4.82713263537786E+02 -7.19091308662045E-46 a : -1.42594931645889E+02 -4.37154723217969E-46 b : -7.97572275677990E+01 -2.93357309050299E-46 == err : 2.176E-10 = rco : 1.954E-06 = res : 1.819E-11 == solution 53 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.29729769953571E+01 -1.62577211207532E-93 z : 2.30795721523959E+03 -3.24101157890953E-91 t : -1.76100976692774E+04 3.65605804098811E-90 u : 5.28516252843235E+04 -1.44246892569346E-89 v : -7.75000692343079E+04 2.60743648461508E-89 s : 5.54217500917480E+04 -2.20704436144553E-89 a : -1.54801386783006E+04 7.09529531669928E-90 b : -2.45619842060225E+03 1.18952753907905E-90 == err : 1.316E-03 = rco : 3.466E-10 = res : 8.661E-08 == solution 54 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.78200130899860E+02 4.90559049750738E-54 z : -1.41430519485416E+02 -7.30442100237452E-54 t : -2.29120535672166E+03 -1.88904417992033E-52 u : 6.64706213153619E+03 7.26159809439381E-52 v : -6.36453426154581E+03 -8.82396722802007E-52 s : 1.60214841150057E+03 3.00881374815515E-52 a : 3.85759463883545E+02 4.84941558751474E-53 b : 1.87302515161374E+02 2.61102885390631E-53 == err : 5.110E-07 = rco : 6.183E-08 = res : 5.530E-10 == solution 55 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 3.71445033359689E+00 -8.79335756003958E-53 z : 1.47322843499015E+01 -7.07444962213353E-52 t : 1.77415879344326E+02 -1.27194497342461E-50 u : -1.25486639213255E+02 1.08355943343350E-50 v : -2.64611142368123E+02 3.61736778487966E-50 s : 1.53458542173880E+02 -2.52281321341759E-50 a : 5.47766253796724E+01 -9.85353601190117E-51 b : 3.38053207032514E+01 -6.91551767518484E-51 == err : 1.398E-10 = rco : 2.425E-05 = res : 8.527E-13 == solution 56 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 5.53274309409548E+00 -1.31758947817826E-50 z : 1.04895131765794E+02 -3.89555456495938E-49 t : -4.15563366832035E+01 2.27017952563456E-49 u : -5.04632129328345E+01 2.08976790770334E-49 v : -1.66241824631822E+02 2.01660097376456E-48 s : 1.16828314190857E+02 -1.54485800243329E-48 a : 4.70051851971567E+01 -6.69527559878095E-49 b : 3.16815671443960E+01 -1.10852916351074E-48 == err : 3.256E-12 = rco : 5.925E-05 = res : 8.242E-13 == solution 57 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 5.75019251132312E+00 2.81451909652533E-57 z : 3.70040453977816E+01 3.55389207157235E-56 t : 8.37617175496381E+02 1.20352182021543E-54 u : -2.38252735253699E+03 -4.52043812513611E-54 v : 1.20237157522312E+03 2.89694180595909E-54 s : 1.37147220087392E+03 3.64010175805960E-54 a : -1.05768783696035E+03 -3.29185311088910E-54 b : -2.74593345839861E+02 -9.48556172060068E-55 == err : 6.853E-08 = rco : 3.346E-07 = res : 1.232E-10 == solution 58 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 4.01809900908261E+01 -1.75066088511039E-49 z : -5.56262207766209E+00 4.66898585294230E-50 t : -4.17272869647429E+00 5.50422482484612E-50 u : -3.93931424779282E+00 6.83225479017318E-50 v : -3.98590391303910E+00 8.05170368915274E-50 s : -4.14797324200496E+00 1.00228676628457E-49 a : -4.37244791385384E+00 1.21777842103576E-49 b : -4.63726433633851E+00 1.45498628905644E-49 == err : 5.390E-14 = rco : 8.183E-03 = res : 4.796E-14 == solution 59 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.42608336180437E+02 2.39175142885706E-84 z : -2.66218650959665E+02 -5.17060735381399E-84 t : -6.18179097043312E+03 -1.77610524840133E-82 u : 2.76367254650601E+04 1.04371607114458E-81 v : -4.78688967939134E+04 -2.22825370427070E-81 s : 3.76417984025085E+04 2.07375922716956E-81 a : -1.11902257938182E+04 -7.09503633608227E-82 b : -1.85617836532905E+03 -1.27240591912079E-82 == err : 1.108E-03 = rco : 9.389E-10 = res : 3.609E-08 == solution 60 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.41220078240298E+02 5.98161355191193E-42 z : -8.21053932647436E+02 -4.00775082995944E-41 t : 3.78771056273472E+02 2.70649850740086E-41 u : 1.47266674144360E+03 1.40098361007611E-40 v : -1.00567193686955E+03 -1.16446741935102E-40 s : -1.25240340115946E+03 -1.75968448772782E-40 a : 1.00247139472645E+03 1.61041948902525E-40 b : 2.65225669861496E+02 4.69121663970306E-41 == err : 6.811E-08 = rco : 4.593E-07 = res : 7.276E-11 == solution 61 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.10394407480815E+02 2.55243809570230E-50 z : -1.59503909623029E+02 -7.26031476327388E-50 t : 2.50937909926329E+01 1.69018436330098E-50 u : 1.30454192024976E+01 1.17599037122269E-50 v : 9.97297567896168E+00 1.07784979202400E-50 s : 8.76246114354067E+00 1.12117781369151E-50 a : 8.23485512459527E+00 1.18825794362253E-50 b : 8.03402265417789E+00 1.29448990036155E-50 == err : 9.305E-12 = rco : 4.030E-04 = res : 9.095E-13 == solution 62 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.11029735154548E+02 2.04907506499218E-47 z : -5.17175632833985E+01 -1.86218199263899E-47 t : -4.09546961560053E+02 -2.23758515999498E-46 u : 2.44816121939959E+02 1.84431456055202E-46 v : 4.74702682348830E+02 4.10205236646110E-46 s : -2.63361350250376E+02 -2.89332125396900E-46 a : -9.19226643495382E+01 -9.59388892687594E-47 b : -5.62259646428724E+01 -7.71186165626452E-47 == err : 1.588E-10 = rco : 7.065E-06 = res : 5.457E-12 == solution 63 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 4.09972667890632E+00 -3.02427470515269E-52 z : 1.85220295435011E+01 -2.75400475071878E-51 t : 2.83911499525944E+02 -6.86931851955141E-50 u : -5.08632963271516E+02 1.71892180417804E-49 v : 1.37717148643984E+02 -6.95493051417155E-50 s : 4.88021758311234E+01 -2.05638445004506E-50 a : 2.95803830485425E+01 -1.50930292344806E-50 b : 2.18117365776446E+01 -1.19608830898413E-50 == err : 3.730E-11 = rco : 1.784E-05 = res : 3.809E-12 == solution 64 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.55438402592705E+00 1.89498282829205E-55 z : 6.77303767478976E+00 1.02977461135602E-54 t : 5.07484376964991E+01 1.17047648894724E-53 u : -1.87333212071793E+01 -6.02571084466739E-54 v : -1.02717178439284E+01 -4.04008108663190E-54 s : -8.02210761812763E+00 -3.77244164556165E-54 a : -7.04871272798079E+00 -3.92028057491474E-54 b : -6.54762131805032E+00 -4.20831159244749E-54 == err : 7.883E-13 = rco : 1.598E-03 = res : 3.020E-14 == solution 65 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.55820870022777E+02 -6.53637138437625E-49 z : -3.26883179055462E+02 2.77533205584198E-48 t : 8.02275812239595E+01 -9.75809690875223E-49 u : 7.75646918522350E+01 -1.48973223028764E-48 v : 2.21322597196033E+02 -4.88948894152491E-48 s : -1.40135541815146E+02 3.87918388111006E-48 a : -5.19170194242792E+01 1.63180637940848E-48 b : -3.26520614981965E+01 1.32293500759845E-48 == err : 1.734E-10 = rco : 2.037E-05 = res : 1.819E-12 == solution 66 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.57646444489829E+02 -1.40642044393211E-58 z : -9.48774525809219E+02 1.02035390453936E-57 t : 4.90790779389442E+02 -7.79176814974766E-58 u : 2.37263247922240E+03 -4.96990480130505E-57 v : -3.44456788901891E+03 8.91543808537524E-57 s : 1.01971637194429E+03 -3.16914041762940E-57 a : 2.68556339819964E+02 -9.13826852262235E-58 b : 1.38178747086852E+02 -4.97094794639533E-58 == err : 3.757E-07 = rco : 2.514E-07 = res : 1.746E-10 == solution 67 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 6.46996850102363E+02 3.81733816394148E-71 z : -7.19224599729867E+03 -8.55526310367971E-70 t : 3.39975415800846E+04 6.12350826960892E-69 u : -8.12356371994051E+04 -1.97192961888812E-68 v : 1.03177828648518E+05 3.16786664111582E-68 s : -6.64781635947909E+04 -2.48064676518015E-68 a : 1.70976796911107E+04 7.54460506545955E-69 b : 2.53142792842320E+03 1.56360122649598E-69 == err : 3.374E-03 = rco : 1.687E-10 = res : 3.409E-07 == solution 68 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.77220427784911E+02 7.95307353964210E-43 z : -1.20913040309830E+03 -7.06002630201899E-42 t : 1.73827241392251E+03 1.55187564766750E-41 u : -4.46657631466466E+02 -5.49990488870049E-42 v : -2.98728842133191E+02 -4.61699653811077E-42 s : -5.71250579339804E+02 -1.04125562444064E-41 a : 5.24274614325549E+02 1.14652105560427E-41 b : 1.47183276956847E+02 3.63224498995076E-42 == err : 2.082E-08 = rco : 8.367E-07 = res : 2.910E-11 == solution 69 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.34423712566272E+00 -5.34790375441192E-62 z : 1.58457059800311E+00 -1.19112401802811E-61 t : 1.80762745286413E+00 -2.07838986819190E-61 u : 2.01919425015621E+00 -2.91703841149741E-61 v : 2.22184248586284E+00 -4.42417492410441E-61 s : 2.41699067114304E+00 -5.83407682299482E-61 a : 2.60553741630796E+00 -7.09812680131037E-61 b : 2.78811060105958E+00 -8.21632485905104E-61 == err : 6.728E-15 = rco : 3.210E-02 = res : 1.110E-15 == solution 70 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 4.89592162409443E+02 1.25018622449115E-86 z : -4.05541135086205E+03 -2.04217960244283E-85 t : 1.37787601868359E+04 1.02670915421848E-84 u : -2.20123874106961E+04 -2.15883553719225E-84 v : 1.59244543295192E+04 1.93010596127263E-84 s : -3.38448736391287E+03 -4.91194626223775E-85 a : -7.26520553258792E+02 -1.16810112883681E-85 b : -3.24500078215573E+02 -5.84099756027825E-86 == err : 2.215E-05 = rco : 6.018E-09 = res : 8.848E-09 == solution 71 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.02051876463454E+01 2.45676084671197E-42 z : 4.22436922491405E+02 2.04558747225208E-40 t : -1.06693660643892E+03 -8.04244425033014E-40 u : 4.15561112904764E+02 5.17421050161153E-40 v : 6.62073282407636E+02 6.73172571873928E-40 s : -3.24176274634856E+02 -4.38634445302954E-40 a : -1.03163624375943E+02 -1.67808293699826E-40 b : -5.85674424927198E+01 -1.05278152326259E-40 == err : 9.113E-10 = rco : 2.200E-06 = res : 1.864E-11 == solution 72 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.63790877187423E+01 7.21580415993681E-64 z : 1.15522598930136E+03 1.03619715368497E-61 t : -5.96896347910762E+03 -8.07980233378638E-61 u : 1.12830008816199E+04 2.04353341941617E-60 v : -8.87668895413573E+03 -1.99497902069420E-60 s : 1.97211359213534E+03 4.86116095176427E-61 a : 4.32932882434186E+02 1.71854123348296E-61 b : 1.95102551477483E+02 8.23859938382715E-62 == err : 3.419E-07 = rco : 2.128E-08 = res : 1.251E-09 == solution 73 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 5.58152109894290E+00 2.65839755572674E-47 z : 3.48645323581093E+01 3.28714895780623E-46 t : 7.66007788703685E+02 1.14044331053159E-44 u : -2.11476064254879E+03 -4.21860735904468E-44 v : 1.03579700889665E+03 2.56553392447624E-44 s : 1.14658595323293E+03 3.59750708839581E-44 a : -8.58076161745934E+02 -3.15058661748010E-44 b : -2.16155383700357E+02 -1.23879436995121E-45 == err : 9.056E-08 = rco : 4.192E-07 = res : 5.730E-11 == solution 74 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.07156188815582E+02 -1.71234429727430E-49 z : -1.50281655880579E+02 4.86631106005458E-49 t : 2.29484780188052E+01 -1.13169660449392E-49 u : 1.15792748609188E+01 -7.76511231691825E-50 v : 8.59133614158699E+00 -7.25770464148668E-50 s : 7.32564236341337E+00 -7.48321916390071E-50 a : 6.68073568026053E+00 -8.13731568377288E-50 b : 6.32425102019763E+00 -8.81646937280217E-50 == err : 1.223E-11 = rco : 4.242E-04 = res : 9.095E-13 == solution 75 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.34144327010636E+02 3.89961588439165E-43 z : -7.73581944244803E+02 -2.60446098914508E-42 t : 3.46389242536741E+02 1.74045511481290E-42 u : 1.30715714849079E+03 9.12739586413458E-42 v : -8.66347811194194E+02 -7.57269353472108E-42 s : -1.04704137922015E+03 -1.14090108242723E-41 a : 8.13280416615968E+02 1.04373198157056E-41 b : 2.08781302074507E+02 3.18411412011738E-42 == err : 1.894E-08 = rco : 5.715E-07 = res : 4.366E-11 == solution 76 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.93725916005580E+00 -2.57946383959230E-45 z : 8.15665223414959E+00 -1.44769765969202E-44 t : 2.72847159550125E+01 -7.36718298835691E-44 u : 2.27942097488021E+02 -8.39125984312757E-43 v : -2.24049943316670E+02 1.05522153421360E-42 s : -3.45456291904364E+02 1.94414835223115E-42 a : 3.17185510383515E+02 -2.12707254004680E-42 b : 9.20433676709663E+01 -6.69763190814937E-43 == err : 1.089E-09 = rco : 8.879E-06 = res : 3.325E-12 == solution 77 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.18951476798465E+02 3.55768075600367E-44 z : -6.12620003728543E+01 -3.69441084572491E-44 t : -5.99351801336088E+02 -5.57176933094074E-43 u : 8.80785896708629E+02 1.11168264099053E-42 v : -2.12832296834383E+02 -3.47125167048400E-43 s : -7.00196224807665E+01 -1.34736763182575E-43 a : -4.02716524842478E+01 -9.09964769132099E-44 b : -2.85573659165843E+01 -7.44953835281604E-44 == err : 6.100E-09 = rco : 5.410E-06 = res : 7.276E-12 == solution 78 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 4.44932311592542E+02 1.34729757112715E-76 z : -3.30657385195703E+03 -2.03454072478180E-75 t : 9.72474341300915E+03 9.12347177170971E-75 u : -1.21273103083193E+04 -1.54414728027232E-74 v : 4.00518063939788E+03 6.55535690459816E-75 s : 3.47518052088274E+03 6.74159003647557E-75 a : -2.20015272494031E+03 -5.09912943355505E-75 b : -4.90303706283248E+02 -1.28984640152916E-75 == err : 8.391E-06 = rco : 1.573E-08 = res : 3.027E-09 == solution 79 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.38485945274319E+00 -5.17848162580363E-51 z : 1.68181009168444E+00 -1.12757261207015E-50 t : 1.97661149717632E+00 -1.77070662043608E-50 u : 2.27486053841126E+00 -2.83981250447296E-50 v : 2.57915424431966E+00 -4.00914706513829E-50 s : 2.89104842817817E+00 -5.07825294917517E-50 a : 3.21165574748696E+00 -7.28328383500123E-50 b : 3.54188087406070E+00 -8.08511324802889E-50 == err : 1.140E-14 = rco : 2.677E-02 = res : 1.221E-15 == solution 80 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.83009465414928E+00 2.72020443825866E-56 z : 2.98268139317770E+00 1.12631598117064E-55 t : 4.87707158770480E+00 2.77038683345933E-55 u : 8.39527289312601E+00 7.94634245272867E-55 v : 1.67109021899673E+01 2.90834859296340E-54 s : 5.67861474208188E+01 -4.79202046868642E-54 a : -7.55821701389404E+01 4.07831529249908E-55 b : -2.76303133521314E+01 -1.05424450311101E-53 == err : 7.394E-12 = rco : 3.170E-04 = res : 3.553E-14 == solution 81 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 3.13727772703281E+00 6.72391842274323E-52 z : 9.42547564863731E+00 3.64373001493038E-51 t : 3.53540397740095E+01 3.17912833680888E-50 u : 3.67240467727741E+02 1.13582059691770E-49 v : -7.67402579497521E+02 -7.57979367002709E-50 s : 2.81273138993714E+02 -6.48396013888929E-49 a : 8.49721796248780E+01 5.92017383285421E-49 b : 4.79532662774678E+01 2.16869799054825E-49 == err : 2.809E-11 = rco : 6.056E-06 = res : 1.637E-11 == solution 82 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.22266706465443E+00 6.91577868736356E-50 z : 4.59919724354461E+00 2.89994971045003E-49 t : 1.10581282814401E+01 1.20808964896167E-48 u : 6.17652921149885E+01 7.65479812970405E-48 v : -3.45797824495290E+01 -6.31574300994786E-48 s : -1.75875792793542E+01 -2.74760212197478E-48 a : -1.34779229757406E+01 -2.27719553299855E-48 b : -1.17988760891411E+01 -2.45894353328482E-48 == err : 2.616E-13 = rco : 6.969E-04 = res : 4.441E-14 == solution 83 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 5.05699148514868E+00 1.70450040452015E-61 z : 2.77309893690773E+01 1.88904765386847E-60 t : 4.78677142765621E+02 5.01791758233837E-59 u : -5.21740085448093E+02 -7.16720705666077E-59 v : -1.99019099964927E+03 -3.67518884897230E-58 s : 3.60544188353961E+03 8.03308015233879E-58 a : -1.58897592206113E+03 -4.18602912362243E-58 b : -3.35012392820012E+02 -9.53138122906971E-59 == err : 1.131E-07 = rco : 1.854E-07 = res : 1.946E-10 == solution 84 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.95471862851093E+00 5.39224273826668E-58 z : 3.44665802010204E+00 1.97518504919313E-57 t : 6.31944210764576E+00 5.47874265062895E-57 u : 1.35257329742724E+01 1.56969337368769E-56 v : 5.72371912157815E+01 8.86256943811872E-56 s : -4.62357129195857E+01 -8.97109882456462E-56 a : -2.02480300267230E+01 -4.09822894138823E-56 b : -1.43949945249934E+01 -3.45800512960188E-56 == err : 4.132E-12 = rco : 5.128E-04 = res : 1.279E-13 == solution 85 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 4.15301413270963E+02 1.23874569450099E-69 z : -2.79141946649078E+03 -1.62540640245522E-68 t : 6.64507729285448E+03 5.60905843808448E-68 u : -3.37080898557929E+03 -3.22578554770239E-68 v : -8.93318334717809E+03 -1.36535763229886E-67 s : 1.30710244601656E+04 2.26481446018754E-67 a : -5.02199136696350E+03 -9.89667066505174E-68 b : -9.65348048426359E+02 -1.54203866236535E-68 == err : 8.270E-06 = rco : 1.031E-08 = res : 4.249E-09 == solution 86 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.15746917882406E+00 1.94935953579000E-58 z : 4.33327922253111E+00 6.79553268342437E-58 t : 1.01127491605640E+01 2.23032867558543E-57 u : 5.48236345006706E+01 1.68668606091148E-56 v : -2.97891566460266E+01 -1.12113843245946E-56 s : -1.47036675802074E+01 -7.39792056232133E-57 a : -1.09343078363590E+01 -5.99400831563585E-57 b : -9.28788196849687E+00 -5.13274300117987E-57 == err : 1.155E-13 = rco : 8.637E-04 = res : 4.263E-14 == solution 87 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 8.31377984372962E+00 1.92669780729260E-41 z : 2.48238469244749E+02 1.14054624738172E-39 t : -1.79422933752187E+02 -1.20024296326042E-39 u : -8.50430111625881E+02 -7.47205972341136E-39 v : 6.50738979274337E+02 6.42332795271067E-39 s : 8.72898321920568E+02 1.24715339117154E-38 a : -7.36336504907379E+02 -1.15430559700292E-38 b : -2.02575841828572E+02 -2.99926636552069E-39 == err : 9.781E-09 = rco : 1.183E-06 = res : 2.387E-11 == solution 88 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.20894596444256E+01 1.18262686175298E-58 z : 5.39952670621447E+02 1.04532782504123E-56 t : -6.27260265002840E+02 -1.68590544927824E-56 u : -5.69667380049651E+03 -2.20748456990809E-55 v : 1.67637774371761E+04 7.90866015052895E-55 s : -1.66980694982123E+04 -9.28549411304817E-55 a : 5.72218399687439E+03 3.65387609122638E-55 b : 1.04589765862999E+03 5.87645944642160E-56 == err : 8.712E-06 = rco : 6.975E-09 = res : 3.944E-09 == solution 89 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 3.47763386477272E+00 -4.32235148381399E-52 z : 1.27490775566018E+01 -3.22280709359155E-51 t : 1.36921887979295E+02 -5.28118991812993E-50 u : -7.78881693608083E+01 4.03994650222725E-50 v : -7.72555540295594E+01 5.22004781526478E-50 s : -1.88475938804647E+02 1.51640245470924E-49 a : 2.04471062794279E+02 -1.96035806949399E-49 b : 6.48872496874279E+01 -7.13359335050535E-50 == err : 2.802E-10 = rco : 2.478E-05 = res : 1.137E-12 == solution 90 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.01378947097026E+00 2.80503658252647E-55 z : 3.65816723350739E+00 9.94089352546650E-55 t : 6.91020813272437E+00 2.80447900035757E-54 u : 1.52383339017017E+01 8.23947136437704E-54 v : 6.64419487864291E+01 4.44026577470837E-53 s : -5.53041791835922E+01 -4.32913168298777E-53 a : -2.49582683417451E+01 -2.30781666614292E-53 b : -1.82867049000703E+01 -1.79904683340366E-53 == err : 3.652E-12 = rco : 3.892E-04 = res : 1.492E-13 == solution 91 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.53348315685815E+01 -3.57238166120286E-54 z : 9.99713652119908E+02 -4.44573007996356E-52 t : -4.60658739672725E+03 3.12046432027334E-51 u : 7.00323393967160E+03 -6.51548082603772E-51 v : -2.59162756253716E+03 3.44127734591661E-51 s : -2.42212626870181E+03 2.83019787617089E-51 a : 1.61605880469760E+03 -2.44108836306061E-51 b : 3.74487444018575E+02 -6.99941180693537E-52 == err : 1.944E-07 = rco : 4.787E-08 = res : 6.403E-10 == solution 92 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 4.03119304291630E+02 -2.41271990642535E-60 z : -2.63002419361437E+03 3.18040664763163E-59 t : 6.07697781088413E+03 -1.10840993155267E-58 u : -2.99197161983152E+03 6.90379763350145E-59 v : -7.69559499460513E+03 2.54769111704846E-58 s : 1.09277119831904E+04 -4.31673219523842E-58 a : -4.07421829036676E+03 1.89708054809759E-58 b : -7.59906181629401E+02 4.10351980906542E-59 == err : 4.106E-06 = rco : 1.281E-08 = res : 1.572E-09 == solution 93 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 3.58272661785619E+00 8.16338462801100E-44 z : 1.35314433585275E+01 6.05333567477690E-43 t : 1.49721878569703E+02 9.96261901327131E-42 u : -8.77502116877270E+01 -7.78272408970601E-42 v : -8.96796201093411E+01 -9.59950754870314E-42 s : -2.25442767795527E+02 -2.83776952010419E-41 a : 2.52036551046607E+02 3.66583181513533E-41 b : 8.24296240455436E+01 1.30205150058901E-41 == err : 2.900E-10 = rco : 1.857E-05 = res : 1.279E-12 == solution 94 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 5.92749285460354E+00 7.17370048188745E-48 z : 1.24253448792922E+02 3.06683713894819E-46 t : -6.08156514009672E+01 -2.30109004950677E-46 u : -1.81553755114930E+02 -9.22488703100061E-46 v : 7.45342941546140E+01 4.83663501938284E-46 s : 3.10610286812028E+01 2.43419373206937E-46 a : 2.05931420325389E+01 1.92059526537805E-46 b : 1.60911797844333E+01 1.71971026976752E-46 == err : 7.450E-11 = rco : 8.088E-05 = res : 1.734E-12 == solution 95 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.17348372080197E+01 -2.20328240649865E-62 z : 5.08733479651493E+02 -1.93418971275403E-60 t : -5.73634638934915E+02 3.33362221036985E-60 u : -5.05643756789616E+03 3.94753291295171E-59 v : 1.44413503756162E+04 -1.43208988343598E-58 s : -1.39600133097470E+04 1.68768402703998E-58 a : 4.64226682368009E+03 -6.65346099584692E-59 b : 8.23313400610328E+02 -1.26633634782365E-59 == err : 2.223E-05 = rco : 8.899E-09 = res : 6.017E-09 == solution 96 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 4.58377989313309E+02 1.21448727047132E-68 z : -3.50948651888868E+03 -1.83629703998360E-67 t : 1.06338498998121E+04 8.25364318456399E-67 u : -1.36628451914699E+04 -1.40456713089159E-66 v : 4.64928460856855E+03 6.14962114985762E-67 s : 4.15678664219923E+03 5.86665067842199E-67 a : -2.71196742913778E+03 -4.52737665183310E-67 b : -6.22858062959651E+02 -1.16316623360998E-67 == err : 1.883E-05 = rco : 1.343E-08 = res : 4.831E-09 == solution 97 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 4.75230869981785E+02 -1.11731780748302E-60 z : -3.82093415203171E+03 1.82141171888267E-59 t : 1.26007894697009E+04 -9.13266168660497E-59 u : -1.95384665235038E+04 1.91265866793533E-58 v : 1.37183069458463E+04 -1.69631418061086E-58 s : -2.82951832410852E+03 4.16546313635082E-59 a : -5.89408285986455E+02 1.10954631213896E-59 b : -2.55441149110112E+02 5.64121909726589E-60 == err : 3.809E-05 = rco : 6.986E-09 = res : 5.355E-09 == solution 98 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.72972954687728E+02 6.92524384803364E-59 z : -1.33253239007553E+02 -1.08372712901542E-58 t : -2.09532611191309E+03 -2.59393025896483E-57 u : 5.90001423138555E+03 9.89429225678036E-57 v : -5.48280217996907E+03 -1.16840885760288E-56 s : 1.33943717122344E+03 3.49142256971491E-57 a : 3.12957173551335E+02 9.57852007602998E-58 b : 1.47441469545880E+02 5.21860146894978E-58 == err : 3.467E-06 = rco : 7.395E-08 = res : 1.717E-09 == solution 99 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 5.37045016308088E+00 -2.42606852735069E-47 z : 9.88302677521032E+01 -9.32174802409435E-46 t : -3.80036112994803E+01 5.63290508181350E-46 u : -4.47917697271577E+01 8.47073974040100E-46 v : -1.43210957508940E+02 3.53711543521833E-45 s : 9.76714685131444E+01 -2.90454686575139E-45 a : 3.81341521072156E+01 -1.40215374903205E-45 b : 2.49392106492171E+01 -9.55866188799692E-46 == err : 1.942E-11 = rco : 7.379E-05 = res : 2.487E-13 == solution 100 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.74164823681661E+00 -1.09341969050900E-47 z : 6.88587012434290E+00 -5.49850343788857E-47 t : 1.86440959926077E+01 -2.20150617736463E-46 u : 6.33569412826875E+01 -9.79548220513464E-46 v : 4.99722601666058E+02 -9.50560216297217E-45 s : -1.29934770115465E+03 2.92774218701146E-44 a : 7.23996543852744E+02 -1.87814107072295E-44 b : 1.81222146069811E+02 -5.19708406818587E-45 == err : 9.890E-09 = rco : 1.720E-06 = res : 5.150E-11 == solution 101 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 4.22361883663344E+00 -4.07356069465152E-47 z : 1.96586609917776E+01 -3.70159202994798E-46 t : 3.10452650642348E+02 -8.80053752350869E-45 u : -5.73035039355470E+02 2.13745911753139E-44 v : 1.59864513650875E+02 -7.41677239568208E-45 s : 5.83740166640827E+01 -3.18612797348902E-45 a : 3.64615785691107E+01 -2.22015873408518E-45 b : 2.77085753249566E+01 -1.87600285895487E-45 == err : 9.187E-10 = rco : 1.517E-05 = res : 5.230E-12 == solution 102 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.45886439651395E+02 1.20075797999404E-52 z : -2.82879348698395E+02 -4.72941832894656E-52 t : 6.19161708064814E+01 1.57546594222768E-52 u : 4.81435465427939E+01 1.65435585366696E-52 v : 6.46170819289812E+01 2.79339108065609E-52 s : 1.72112789745163E+02 9.37033721604588E-52 a : -1.93796679976329E+02 -1.24155132870726E-51 b : -6.26736390364238E+01 -4.50363259856558E-52 == err : 4.697E-10 = rco : 1.975E-05 = res : 1.819E-12 == solution 103 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 8.11635298292773E+00 5.41273598346190E-62 z : 7.58351281130360E+01 1.01662484122773E-60 t : 2.67795307741292E+03 5.47053266168748E-59 u : -1.41658905627593E+04 -3.90513579643988E-58 v : 2.66833063109162E+04 9.31584855344019E-58 s : -2.19335602096932E+04 -9.31702771304286E-58 a : 6.66823990138345E+03 3.35276997970238E-58 b : 1.11600843851480E+03 6.11351339952111E-59 == err : 2.660E-05 = rco : 2.755E-09 = res : 9.466E-09 == solution 104 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 6.14176343298476E+00 1.58040478204690E-50 z : 4.27602794863670E+01 2.20377965869432E-49 t : 1.08533843765568E+03 8.77049207752065E-48 u : -3.83852070712725E+03 -4.40680851585656E-47 v : 4.11829182948962E+03 6.86929555047968E-47 s : -1.11666309458614E+03 -3.81218727507623E-47 a : -2.83348508383902E+02 4.34834805211558E-48 b : -1.43059171249994E+02 1.06915808647262E-48 == err : 4.800E-08 = rco : 1.661E-07 = res : 2.037E-10 == solution 105 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.38937238105667E+01 -2.88136771454379E-53 z : 7.95164791422452E+02 -3.34231136986783E-51 t : -2.87864969334261E+03 1.83925290471476E-50 u : 1.72779263391493E+03 -1.46761231350865E-50 v : 4.97957975968467E+03 -5.56534500676656E-50 s : -7.61638096527341E+03 1.03182223150650E-49 a : 2.99259974979571E+03 -4.80116328688808E-50 b : 5.80406240095393E+02 -1.07102237360597E-50 == err : 4.013E-06 = rco : 3.208E-08 = res : 5.039E-10 == solution 106 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 5.20981181601110E+00 1.60307182879779E-57 z : 2.94327421157571E+01 1.76608881881858E-56 t : 5.23425743723742E+02 4.86702024881520E-55 u : -5.87801758898117E+02 -7.77104633536660E-55 v : -2.31024908247134E+03 -3.20866882106687E-54 s : 4.31259715489339E+03 7.30733835193678E-54 a : -1.95861461118003E+03 -3.84866611509711E-54 b : -4.25583542667732E+02 -4.56227296764306E-55 == err : 1.708E-07 = rco : 1.412E-07 = res : 4.511E-10 == solution 107 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 3.05046286770343E+02 -4.55510002449125E-39 z : -1.48296134913167E+03 4.35434328025945E-38 t : 2.46291733894272E+03 -1.06494288816702E-37 u : -8.10732208385578E+02 4.48018772962722E-38 v : -1.18773518124834E+03 8.54076392086438E-38 s : 5.56342450705713E+02 -4.72770972724924E-38 a : 1.73122662350595E+02 -1.64423148973587E-38 b : 9.74110253590027E+01 -1.01735389548753E-38 == err : 6.690E-08 = rco : 5.264E-07 = res : 1.019E-10 == solution 108 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.63157652523343E+00 -6.32138870337357E-53 z : 7.18867504368390E+00 -3.26917753846726E-52 t : 5.54925990174013E+01 -3.92562316794791E-51 u : -2.11052964142991E+01 2.01240389793074E-51 v : -1.19235926228736E+01 1.36770381649249E-51 s : -9.59552798319032E+00 1.21892687462212E-51 a : -8.68843356595548E+00 1.31680644164210E-51 b : -8.31778147831741E+00 1.29853558913171E-51 == err : 7.955E-13 = rco : 1.360E-03 = res : 4.619E-14 == solution 109 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.66838900368628E+02 -3.95106167957631E-58 z : -1.22391654562408E+02 6.24474113686344E-58 t : -1.76825300639004E+03 1.28064598218469E-56 u : 4.12575794336072E+03 -4.45694687831144E-56 v : -1.85818183234433E+03 4.19260096807700E-56 s : -1.96773942978099E+03 1.65291064549089E-57 a : 1.43996907932772E+03 -1.21790437533793E-56 b : 3.59515741174999E+02 3.06269586284485E-58 == err : 3.678E-08 = rco : 1.315E-07 = res : 3.492E-10 == solution 110 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.16040918303142E+01 -7.30258536601207E-59 z : 5.63696983501783E+02 -6.92630837714248E-57 t : -1.86698788557458E+03 3.38405820587042E-56 u : 1.89766081940852E+03 -4.50100777117097E-56 v : -3.99990802768474E+02 1.14252858895791E-56 s : -1.23313247862869E+02 4.38152782252831E-57 a : -6.86699585271534E+01 2.78455138857788E-57 b : -4.80048807930396E+01 2.19982617726254E-57 == err : 2.401E-08 = rco : 1.021E-06 = res : 9.368E-11 == solution 111 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.43135867745509E+01 8.44780190518197E-66 z : 8.43961241742528E+02 9.76859429662345E-64 t : -3.14775705764998E+03 -5.42171881141367E-63 u : 1.94656223618721E+03 4.59012522457185E-63 v : 5.78038466817157E+03 1.55693313837836E-62 s : -9.11022389020874E+03 -2.94713073734717E-62 a : 3.68875921496303E+03 1.37882320239504E-62 b : 7.37320016024166E+02 3.06513872533687E-63 == err : 1.342E-06 = rco : 2.526E-08 = res : 5.966E-10 == solution 112 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.61944985506765E+02 -7.03674457767555E-50 z : -1.15315170502815E+02 1.01445136122328E-49 t : -1.61708190394092E+03 2.18199264587135E-48 u : 3.66207360604093E+03 -6.70696894438760E-48 v : -1.60075240267446E+03 3.77364621676644E-48 s : -1.64508066119086E+03 4.58345411956712E-48 a : 1.16821154677711E+03 -3.89197152027600E-48 b : 2.83004903082658E+02 -1.09953076864937E-48 == err : 2.248E-07 = rco : 1.616E-07 = res : 2.328E-10 == solution 113 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 5.67151631791654E+01 1.08758003371304E-45 z : -1.13998935382546E+01 -4.20286905132578E-46 t : -1.33406678378323E+01 -7.90625183362952E-46 u : -2.34221446623660E+01 -1.83988846219211E-45 v : -8.84561072454645E+01 -9.20149499425788E-45 s : 6.63373529637126E+01 8.72253555820936E-45 a : 2.75662971410267E+01 3.63188098077936E-45 b : 1.88468774377317E+01 2.90523109351718E-45 == err : 2.731E-12 = rco : 1.980E-04 = res : 1.137E-13 == solution 114 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 3.02602199815810E+00 -1.02280023543453E-46 z : 8.65719713548015E+00 -5.73126282314490E-46 t : 2.98353973158882E+01 -2.93546540791774E-45 u : 2.56803664430158E+02 -3.30849783297589E-44 v : -2.60081156042941E+02 4.24340099360138E-44 s : -4.13212546368498E+02 7.49530463749989E-44 a : 3.90971421532084E+02 -8.29564585513697E-44 b : 1.16927443064316E+02 -2.79838892789007E-44 == err : 1.396E-09 = rco : 6.621E-06 = res : 5.230E-12 == solution 115 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 6.10661940074222E+00 8.13856854223074E-48 z : 1.31878443516562E+02 3.47181444782136E-46 t : -6.65009350113203E+01 -2.53035980633848E-46 u : -2.04541724046754E+02 -1.06414523273495E-45 v : 8.65207332832341E+01 5.48002294039623E-46 s : 3.71532001421649E+01 2.83366514563975E-46 a : 2.53836627153935E+01 2.24736747883392E-46 b : 2.04414566259184E+01 2.02499345495425E-46 == err : 3.325E-11 = rco : 6.945E-05 = res : 7.390E-13 == solution 116 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 3.23208504916699E+00 1.70194130233247E-43 z : 1.00038837565490E+01 1.02794547855840E-42 t : 3.86590729130852E+01 5.76446018588519E-42 u : 4.13739712387400E+02 8.46633002929607E-41 v : -8.90814552839361E+02 -2.24265207529008E-40 s : 3.36440796538494E+02 1.01622514957452E-40 a : 1.04739002196674E+02 3.46131230426712E-41 b : 6.09175104766743E+01 2.27632177414165E-41 == err : 2.374E-09 = rco : 4.806E-06 = res : 1.000E-11 == solution 117 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.05135844780989E+01 7.53993339352313E-45 z : 4.48360382466344E+02 5.97226836908686E-43 t : -1.16667798986602E+03 -2.25033206668612E-42 u : 4.68178619781335E+02 1.03900807307559E-42 v : 7.68546432673322E+02 2.54248090120934E-42 s : -3.87758761544611E+02 -1.29268688569539E-42 a : -1.27162267988915E+02 -6.88207234469400E-43 b : -7.44012466179817E+01 -4.54507872610479E-43 == err : 4.307E-10 = rco : 1.883E-06 = res : 2.547E-11 == solution 118 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 5.18000054411718E+00 1.91091985712752E-46 z : 9.07745288124972E+01 6.40642457103187E-45 t : -3.20713799532080E+01 -3.40095410982739E-45 u : -3.13219582584022E+01 -4.11973537778307E-45 v : -4.85357651605584E+01 -7.21176065135917E-45 s : -1.43487132643598E+02 -3.06315086186003E-44 a : 1.75461706659175E+02 4.10974565240263E-44 b : 6.08108343607702E+01 1.14484989770912E-44 == err : 2.684E-11 = rco : 4.542E-05 = res : 1.847E-13 == solution 119 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.85597922154549E+02 2.79548917061867E-42 z : -1.28333046018944E+03 -2.48036834677814E-41 t : 1.90077288037404E+03 5.45805751854516E-41 u : -5.03212516869924E+02 -1.96869953923189E-41 v : -3.46769749245426E+02 -1.56422459038436E-41 s : -6.83293117661659E+02 -3.68253135167815E-41 a : 6.46235041443681E+02 4.02461458116604E-41 b : 1.86974517471741E+02 1.36820592527825E-41 == err : 1.190E-08 = rco : 7.106E-07 = res : 7.276E-11 == solution 120 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 3.90023540071028E+01 -5.26467092507053E-58 z : -5.24100041713844E+00 1.45307406738058E-58 t : -3.81599467365001E+00 1.64754329481374E-58 u : -3.49658387597505E+00 1.92913473613695E-58 v : -3.43370338476672E+00 2.46742555767194E-58 s : -3.46781206857641E+00 2.97771281045656E-58 a : -3.54725958699524E+00 3.57823378477016E-58 b : -3.65037851802021E+00 4.24409641950130E-58 == err : 3.954E-14 = rco : 9.309E-03 = res : 3.286E-14 == solution 121 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.66122698450715E+00 5.38117134689378E-52 z : 6.48774043774308E+00 2.63477520314257E-51 t : 1.70501789537012E+01 1.05602264857854E-50 u : 5.62364019151769E+01 4.70194679713628E-50 v : 4.30491859843206E+02 4.55603283260125E-49 s : -1.08628801974455E+03 -1.40307879707440E-48 a : 5.87360611609965E+02 8.99835570954316E-49 b : 1.42655104594468E+02 2.58985419152181E-49 == err : 1.103E-08 = rco : 2.339E-06 = res : 3.070E-11 == solution 122 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 6.44895502739622E+01 9.37294733783308E-51 z : -1.52119411418323E+01 -4.43981716002620E-51 t : -2.33442784660104E+01 -1.00091645234629E-50 u : -1.06957279859147E+02 -5.85606924176060E-50 v : 5.34406542303469E+01 3.51113582814065E-50 s : 2.52340318934914E+01 2.10167006305297E-50 a : 1.83492630691641E+01 1.75648145669584E-50 b : 1.54478677410077E+01 1.64659532945475E-50 == err : 9.963E-12 = rco : 2.314E-04 = res : 2.274E-13 == solution 123 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.07772880310321E+02 2.56295607084166E-51 z : -4.87273388263666E+01 -2.31976612994994E-51 t : -3.74534060946326E+02 -2.80602774058990E-50 u : 2.17301807041017E+02 2.36093672282772E-50 v : 4.08938158745916E+02 4.93515302219196E-50 s : -2.20176846741273E+02 -3.35263618261296E-50 a : -7.45745995832640E+01 -1.31785864698757E-50 b : -4.42601582743438E+01 -9.00777498654271E-51 == err : 7.334E-10 = rco : 8.496E-06 = res : 3.638E-12 == solution 124 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.18551154804066E+02 3.65898075044025E-57 z : -6.53060182906341E+02 -2.15486549959633E-56 t : 2.36693477097036E+02 1.15426887853295E-56 u : 3.63326825801204E+02 2.32035540893047E-56 v : 1.93230837780224E+03 1.53257493501291E-55 s : -3.93818506660215E+03 -3.69222211689933E-55 a : 1.85636541400811E+03 2.00251050374744E-55 b : 4.11064877482003E+02 5.03992016497415E-56 == err : 6.867E-07 = rco : 1.666E-07 = res : 5.821E-11 == solution 125 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 5.02805467266645E+00 -4.13337254894782E-53 z : 8.55260948396698E+01 -1.43246746333738E-51 t : -2.93295404470635E+01 7.44292540881082E-52 u : -2.78017561740430E+01 9.81242659375278E-52 v : -4.18117006203991E+01 1.77047823477970E-51 s : -1.19958924813330E+02 7.07604016509760E-51 a : 1.42347772542486E+02 -9.72270365731780E-51 b : 4.78692926070709E+01 -3.89984821529932E-51 == err : 4.173E-11 = rco : 6.100E-05 = res : 3.411E-13 == solution 126 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 8.06991026981110E+00 -7.83167042249183E-48 z : 2.33885729168859E+02 -4.58343733648403E-46 t : -1.64083746925416E+02 4.87712072282896E-46 u : -7.54852247953687E+02 3.05263406727876E-45 v : 5.60586678441298E+02 -2.87074441046286E-45 s : 7.29765395716290E+02 -4.57399312238092E-45 a : -5.97371718715617E+02 4.43405785321933E-45 b : -1.59464384023387E+02 1.32448587932148E-45 == err : 1.075E-08 = rco : 1.491E-06 = res : 1.637E-11 == solution 127 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.88539940820652E+00 -2.59446105647621E-51 z : 3.16571800186658E+00 -8.93183675579638E-51 t : 5.33299920707588E+00 -2.18623800895823E-50 u : 9.45826535128976E+00 -5.19101021038219E-50 v : 1.93983122493731E+01 -1.31717185869231E-49 s : 6.79239287943688E+01 -5.22525500823024E-49 a : -9.31646230121856E+01 8.37911736613903E-49 b : -3.51002138757029E+01 4.39669794810166E-49 == err : 1.290E-12 = rco : 2.238E-04 = res : 7.105E-14 == solution 128 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 4.40028136798963E+00 3.96335928149420E-55 z : 1.88305892202992E+01 3.32512578446293E-54 t : 1.04304162116009E+02 2.70723498988792E-53 u : 1.72021974047286E+03 6.02072267475714E-52 v : -6.69998663122968E+03 -2.88079798007066E-51 s : 7.90453063659210E+03 4.01889487592413E-51 a : -3.03829877862983E+03 -1.77715866657254E-51 b : -6.03695535041397E+02 -3.94562597024315E-52 == err : 3.858E-06 = rco : 3.660E-08 = res : 2.910E-10 == SHAR_EOF fi # end of overwriting check if test -f 'eco5' then echo shar: will not over-write existing file "'eco5'" else cat << "SHAR_EOF" > 'eco5' 5 (x1 + x1*x2 + x2*x3 + x3*x4)*x5 - 1; (x2 + x1*x3 + x2*x4)*x5 - 2; (x3 + x1*x4)*x5 - 3; x4*x5 - 4; x1 + x2 + x3 + x4 + 1; TITLE : 5-dimensional economics problem ROOT COUNTS : total degree : 54 3-homogeneous Bezout number : 20 with partition : {x1 x2 x3 }{x4 }{x5 } generalized Bezout number : 16 based on the set structure : {x1 x3 }{x2 x4 }{x5 } {x1 x2 }{x3 x4 }{x5 } {x1 x3 }{x4 }{x5 } {x4 }{x5 } {x1 x2 x3 x4 } mixed volume : 8 REFERENCE : Alexander Morgan: `Solving polynomial systems using continuation for engineering and scientific problems', Prentice-Hall, Englewood Cliffs, New Jersey, 1987. (p 148). NOTE: Transform the system u = 1/x5 and the total degree equals 8. See the reduced economics problem, in file redeco5. THE SOLUTIONS : 8 5 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.97399802625560E-01 2.18519562237977E+00 x2 : -2.46488856119036E+00 1.64476478851049E+00 x3 : -1.04157021643729E+00 -3.46184909267653E+00 x4 : 1.60905897500210E+00 -3.68111318213733E-01 u5 : 4.02264743750524E-01 -9.20278295534333E-02 == err : 6.004E-15 = rco : 3.043E-02 = res : 1.110E-15 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.47399802625560E-01 -2.18519562237977E+00 x2 : -1.67791479309413E+00 6.38326735148376E-01 x3 : 2.34742504765713E-01 1.41176117876408E+00 x4 : 5.90572090953981E-01 1.35107708467322E-01 u5 : 1.47643022738495E-01 3.37769271168304E-02 == err : 4.822E-15 = rco : 1.027E-01 = res : 9.930E-16 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.00000000000000E+00 1.04404871487976E-53 x2 : 1.00000000000000E+00 2.78412990634604E-53 x3 : 1.00000000000000E+00 4.17619485951906E-53 x4 : -4.00000000000000E+00 4.17619485951906E-53 u5 : -1.00000000000000E+00 0.00000000000000E+00 == err : 3.762E-37 = rco : 8.800E-02 = res : 1.218E-52 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 7.94799605251120E-01 -7.46761833343337E-60 x2 : -1.14417041381173E+00 7.15646756954031E-60 x3 : 3.05149904685739E-02 -3.49707676362942E-60 x4 : -6.81144181907962E-01 4.35611069450280E-60 u5 : -1.70286045476991E-01 1.08902767362570E-60 == err : 2.077E-15 = rco : 6.837E-02 = res : 5.551E-17 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.47399802625560E-01 2.18519562237977E+00 x2 : -1.67791479309413E+00 -6.38326735148376E-01 x3 : 2.34742504765713E-01 -1.41176117876408E+00 x4 : 5.90572090953981E-01 -1.35107708467322E-01 u5 : 1.47643022738495E-01 -3.37769271168304E-02 == err : 5.070E-15 = rco : 1.027E-01 = res : 9.486E-16 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.47996052511202E-02 4.34324265389982E-51 x2 : 1.67977712238073E+00 -7.35010295275354E-51 x3 : -1.16685956712542E+00 1.67047794380762E-51 x4 : -1.46811795000419E+00 -6.68191177523049E-52 u5 : -3.67029487501048E-01 -3.34095588761525E-52 == err : 4.160E-15 = rco : 7.638E-02 = res : 1.665E-16 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.97399802625560E-01 -2.18519562237977E+00 x2 : -2.46488856119037E+00 -1.64476478851049E+00 x3 : -1.04157021643729E+00 3.46184909267653E+00 x4 : 1.60905897500210E+00 3.68111318213733E-01 u5 : 4.02264743750524E-01 9.20278295534332E-02 == err : 6.125E-15 = rco : 3.043E-02 = res : 1.986E-15 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.50000000000000E-01 0.00000000000000E+00 x2 : -2.50000000000000E-01 0.00000000000000E+00 x3 : -2.50000000000000E-01 0.00000000000000E+00 x4 : -2.50000000000000E-01 0.00000000000000E+00 u5 : -6.25000000000000E-02 0.00000000000000E+00 == err : 0.000E+00 = rco : 9.055E-02 = res : 0.000E+00 == SHAR_EOF fi # end of overwriting check if test -f 'eco6' then echo shar: will not over-write existing file "'eco6'" else cat << "SHAR_EOF" > 'eco6' 6 (x1 + x1*x2 + x2*x3 + x3*x4 + x4*x5)*x6 - 1; (x2 + x1*x3 + x2*x4 + x3*x5)*x6 - 2; (x3 + x1*x4 + x2*x5)*x6 - 3; (x4 + x1*x5)*x6 - 4; x5*x6 - 5; x1 + x2 + x3 + x4 + x5 + 1; TITLE : 6-dimensional economics problem ROOT COUNTS : total degree : 162 3-homogeneous Bezout number : 48 with partition : {x1 x2 x3 x4 }{x5 }{x6 } generalized Bezout number : 36 based on the set structure : {x1 x3 x5 }{x2 x4 }{x6 } {x1 x2 x5 }{x3 x4 }{x6 } {x1 x2 x3 }{x4 x5 }{x6 } {x1 x4 }{x5 }{x6 } {x5 }{x6 } {x1 x2 x3 x4 x5 } mixed volume : 16 REFERENCE : Alexander Morgan: `Solving polynomial systems using continuation for engineering and scientific problems', Prentice-Hall, Englewood Cliffs, New Jersey, 1987, (p 148). NOTE : Transform u = 1/x6 and the total degree equals the number of solutions. See the reduced economics problem, in the file redeco6. THE SOLUTIONS : 16 6 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.00000000000000E+00 0.00000000000000E+00 x2 : 1.00000000000000E+00 5.93472984109987E-67 x3 : 1.00000000000000E+00 2.96736492054994E-67 x4 : 1.00000000000000E+00 0.00000000000000E+00 x5 : -5.00000000000000E+00 0.00000000000000E+00 x6 : -1.00000000000000E+00 0.00000000000000E+00 == err : 5.346E-51 = rco : 6.489E-02 = res : 2.671E-66 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.00000000000000E-01 -3.31042891395086E+00 x2 : -5.25946979716094E+00 -5.27706843576464E-01 x3 : 5.56851925799105E-01 5.25646392480149E+00 x4 : 3.30816086148002E+00 -4.18343529761888E-01 x5 : -5.54299011818361E-03 -9.99984637512272E-01 x6 : -2.77149505909180E-02 4.99992318756136E+00 == err : 5.621E-15 = rco : 6.151E-03 = res : 4.394E-14 == solution 3 : t : 1.00000000000000E+00 2.16840434497101E-19 m : 3 the solution for t : x1 : 5.49983204654658E-01 1.21618144467362E+00 x2 : -1.18910100147303E+00 -6.28630424774533E-01 x3 : 4.07202455367483E-01 -2.59518299581422E-01 x4 : -5.83588286261556E-01 1.13892369777438E-01 x5 : -1.84496372287553E-01 -4.41925090095103E-01 x6 : -4.02239098644747E+00 9.63485339599522E+00 == err : 4.533E-15 = rco : 7.742E-03 = res : 2.844E-15 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.00000000000000E-01 -8.78066024603626E-01 x2 : -1.65499971781608E-01 -2.14978127415289E+00 x3 : -1.62144990845010E+00 1.42121425610120E+00 x4 : -3.27974968334248E-01 9.07431740523421E-01 x5 : 7.14924848565961E-01 6.99201302131896E-01 x6 : 3.57462424282980E+00 -3.49600651065948E+00 == err : 4.906E-15 = rco : 1.880E-02 = res : 9.197E-15 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.00000000000000E-01 3.31042891395086E+00 x2 : -5.25946979716094E+00 5.27706843576465E-01 x3 : 5.56851925799103E-01 -5.25646392480149E+00 x4 : 3.30816086148002E+00 4.18343529761887E-01 x5 : -5.54299011818325E-03 9.99984637512272E-01 x6 : -2.77149505909162E-02 -4.99992318756136E+00 == err : 4.327E-15 = rco : 6.151E-03 = res : 3.035E-14 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.14998320465466E+00 -2.09424746927724E+00 x2 : -1.77249865678311E+00 -2.90939448721313E+00 x3 : -3.76795822665312E+00 9.94499923819595E-01 x4 : 1.18599548149207E+00 4.94385765452914E+00 x5 : 2.20447819728949E+00 -9.34715621858359E-01 x6 : 1.92248186143776E+00 8.15147017935889E-01 == err : 5.357E-15 = rco : 1.513E-02 = res : 3.972E-15 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.00000000000000E-01 1.89911354915196E-65 x2 : -2.00000000000000E-01 -1.45056101563798E-66 x3 : -2.00000000000000E-01 0.00000000000000E+00 x4 : -2.00000000000000E-01 0.00000000000000E+00 x5 : -2.00000000000000E-01 -2.96736492054994E-67 x6 : -2.50000000000000E+01 1.51929083932157E-64 == err : 4.626E-16 = rco : 3.803E-03 = res : 8.882E-16 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.49983204654658E-01 -2.09424746927724E+00 x2 : -1.61089899852697E+00 2.31906369483777E-01 x3 : -2.07202455367483E-01 1.40762102476128E+00 x4 : 7.83588286261555E-01 6.17749478619368E-01 x5 : 3.84496372287553E-01 -1.63029403587178E-01 x6 : 1.10223909864475E+01 4.67357810929179E+00 == err : 3.086E-14 = rco : 3.238E-03 = res : 7.324E-15 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.49983204654658E-01 -1.21618144467362E+00 x2 : -1.18910100147303E+00 6.28630424774533E-01 x3 : 4.07202455367483E-01 2.59518299581422E-01 x4 : -5.83588286261556E-01 -1.13892369777438E-01 x5 : -1.84496372287553E-01 4.41925090095103E-01 x6 : -4.02239098644747E+00 -9.63485339599522E+00 == err : 4.533E-15 = rco : 7.742E-03 = res : 2.844E-15 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.14998320465466E+00 2.09424746927724E+00 x2 : -1.77249865678311E+00 2.90939448721313E+00 x3 : -3.76795822665312E+00 -9.94499923819595E-01 x4 : 1.18599548149208E+00 -4.94385765452914E+00 x5 : 2.20447819728949E+00 9.34715621858360E-01 x6 : 1.92248186143776E+00 -8.15147017935890E-01 == err : 6.108E-15 = rco : 1.513E-02 = res : 7.536E-15 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.49983204654658E-01 2.09424746927724E+00 x2 : -1.61089899852697E+00 -2.31906369483777E-01 x3 : -2.07202455367483E-01 -1.40762102476128E+00 x4 : 7.83588286261555E-01 -6.17749478619368E-01 x5 : 3.84496372287553E-01 1.63029403587178E-01 x6 : 1.10223909864475E+01 -4.67357810929179E+00 == err : 3.086E-14 = rco : 3.238E-03 = res : 7.324E-15 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.99966409309316E-01 -1.63205070630247E-66 x2 : 1.38656942719869E+00 1.18694596821997E-66 x3 : 1.19152225800455E-01 1.55786658328872E-66 x4 : -1.13367501000843E+00 -2.37389193643995E-66 x5 : -8.72080233681396E-01 9.64393599178730E-67 x6 : -5.73341741607079E+00 -4.74778387287990E-66 == err : 3.013E-15 = rco : 2.984E-02 = res : 1.776E-15 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.50016795345342E-01 -1.21618144467362E+00 x2 : 1.72498656783105E-01 9.93444005801895E-01 x3 : 2.16795822665312E+00 -1.78564329356081E+00 x4 : -2.78599548149208E+00 8.14100532334901E-02 x5 : -8.04478197289493E-01 1.92697067919904E+00 x6 : -9.22481861437762E-01 -2.20962545047551E+00 == err : 5.006E-15 = rco : 3.564E-02 = res : 5.925E-15 == solution 14 : t : 1.00000000000000E+00 2.16840434497101E-19 m : 14 the solution for t : x1 : 2.50016795345342E-01 1.21618144467362E+00 x2 : 1.72498656783105E-01 -9.93444005801894E-01 x3 : 2.16795822665312E+00 1.78564329356081E+00 x4 : -2.78599548149208E+00 -8.14100532334898E-02 x5 : -8.04478197289493E-01 -1.92697067919904E+00 x6 : -9.22481861437763E-01 2.20962545047551E+00 == err : 4.743E-15 = rco : 3.564E-02 = res : 7.161E-15 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.29996640930932E+00 3.26410141260493E-66 x2 : -1.36629889313586E-01 1.39466151265847E-65 x3 : -1.58995626049845E+00 -1.30564056504197E-65 x4 : 5.73303223716882E-01 1.78041895232996E-66 x5 : -1.14668348321416E+00 -2.96736492054994E-67 x6 : -4.36040116840698E+00 4.74778387287990E-66 == err : 3.875E-15 = rco : 3.823E-02 = res : 8.882E-16 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.00000000000000E-01 8.78066024603626E-01 x2 : -1.65499971781608E-01 2.14978127415289E+00 x3 : -1.62144990845010E+00 -1.42121425610120E+00 x4 : -3.27974968334248E-01 -9.07431740523421E-01 x5 : 7.14924848565961E-01 -6.99201302131896E-01 x6 : 3.57462424282980E+00 3.49600651065948E+00 == err : 4.906E-15 = rco : 1.880E-02 = res : 9.197E-15 == SHAR_EOF fi # end of overwriting check if test -f 'eco7' then echo shar: will not over-write existing file "'eco7'" else cat << "SHAR_EOF" > 'eco7' 7 (x1 + x1*x2 + x2*x3 + x3*x4 + x4*x5 + x5*x6)*x7 - 1; (x2 + x1*x3 + x2*x4 + x3*x5 + x4*x6)*x7 - 2; (x3 + x1*x4 + x2*x5 + x3*x6)*x7 - 3; (x4 + x1*x5 + x2*x6)*x7 - 4; (x5 + x1*x6)*x7 - 5; x6*x7 - 6; x1 + x2 + x3 + x4 + x5 + x6 + 1; TITLE : 7-dimensional economics problem ROOT COUNTS : total degree : 486 3-homogeneous Bezout number : 112 with partition : {x1 x2 x3 x4 x5 }{x6 }{x7 } generalized Bezout number : 80 based on the set structure : {x1 x3 x5 }{x2 x4 x6 }{x7 } {x1 x2 x5 x6 }{x3 x4 }{x7 } {x1 x2 x3 }{x4 x5 x6 }{x7 } {x1 x2 x4 }{x5 x6 }{x7 } {x1 x5 }{x6 }{x7 } {x6 }{x7 } {x1 x2 x3 x4 x5 x6 } mixed volume : 32 REFERENCE : Alexander Morgan: `Solving polynomial systems using continuation for engineering and scientific problems', Prentice-Hall, Englewood Cliffs, New Jersey, 1987, (p 148). NOTE : Transform u = 1/x7 and the total degree equals the number of solutions. See the reduced economics problem, in the file redeco7. THE SOLUTIONS : 32 7 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.93369639826478E-03 1.28636083334685E-01 x2 : 5.95495251474475E-01 2.08845973813888E+00 x3 : -6.99468204461881E-01 -4.29895386284063E-01 x4 : -1.32701859744045E+00 -6.35115643463731E-01 x5 : 1.49441734602828E-01 -5.41035850350458E-01 x6 : 2.75616119426760E-01 -6.11048941375316E-01 x7 : 3.68023794115138E+00 8.15919439917735E+00 == err : 4.597E-15 = rco : 1.056E-02 = res : 7.332E-15 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.93369639826586E-03 -3.71479583210633E+00 x2 : -6.29608516467496E+00 2.89485362873523E-01 x3 : 6.85454641806504E-01 6.41622249799803E+00 x4 : 4.94031447364828E+00 -2.36147158475214E-01 x5 : 2.97245117069881E-01 -2.53379026615599E+00 x6 : -6.32862764247967E-01 -2.20974604134012E-01 x7 : -8.45046930263530E+00 2.95062249572451E+00 == err : 1.027E-14 = rco : 1.203E-03 = res : 1.484E-13 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.63424603497105E-01 -1.79307987438582E+00 x2 : -1.42230137654078E+00 7.27270787149925E-01 x3 : 6.48059125615115E-01 7.41546225335957E-01 x4 : -1.21625875444223E-01 -4.44285120925777E-01 x5 : -5.08590494417704E-01 4.40081292362660E-01 x6 : 1.41034017290485E-01 3.28466690463057E-01 x7 : 6.62230193448536E+00 -1.54232690910824E+01 == err : 4.346E-14 = rco : 2.736E-03 = res : 8.981E-15 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.51557210700575E-01 1.79307987438582E+00 x2 : -5.18994747263476E-01 -1.65067431386248E+00 x3 : 2.54014532482806E+00 1.49593314929199E+00 x4 : -1.73247661935806E+00 1.65911587822018E+00 x5 : -1.53306651761352E+00 -2.14239297415820E+00 x6 : 4.95949770107570E-01 -1.15506161387731E+00 x7 : 1.88319443182410E+00 4.38593932445156E+00 == err : 4.379E-15 = rco : 1.345E-02 = res : 8.894E-15 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.27399636935069E-01 -3.71479583210633E+00 x2 : -6.84186578113854E+00 -2.76209288924990E+00 x3 : -4.12071064151692E+00 8.69959556204953E+00 x4 : 8.72511873116428E+00 3.50394294906873E+00 x5 : 1.81846960499532E+00 -5.23487937380794E+00 x6 : -1.40841155043922E+00 -4.91770415954087E-01 x7 : -3.79717658548780E+00 1.32584762480407E+00 == err : 8.966E-15 = rco : 2.797E-03 = res : 7.105E-14 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.93369639826475E-03 -1.28636083334685E-01 x2 : 5.95495251474475E-01 -2.08845973813888E+00 x3 : -6.99468204461880E-01 4.29895386284063E-01 x4 : -1.32701859744045E+00 6.35115643463731E-01 x5 : 1.49441734602828E-01 5.41035850350458E-01 x6 : 2.75616119426760E-01 6.11048941375316E-01 x7 : 3.68023794115138E+00 -8.15919439917735E+00 == err : 4.866E-15 = rco : 1.056E-02 = res : 3.878E-15 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.97308366771297E-01 1.92171595772051E+00 x2 : -2.38300160166170E+00 1.65159813713614E+00 x3 : -1.17635241772214E+00 -2.17748014148655E+00 x4 : 5.01732358554671E-01 -1.22966143182879E+00 x5 : 1.19054568318791E+00 -6.79107470333444E-01 x6 : 4.69767610869959E-01 5.12934948792143E-01 x7 : 5.82616709754244E+00 -6.36153845578694E+00 == err : 4.678E-15 = rco : 5.913E-03 = res : 1.465E-14 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.63424603497105E-01 1.79307987438582E+00 x2 : -1.42230137654078E+00 -7.27270787149925E-01 x3 : 6.48059125615115E-01 -7.41546225335957E-01 x4 : -1.21625875444223E-01 4.44285120925777E-01 x5 : -5.08590494417704E-01 -4.40081292362661E-01 x6 : 1.41034017290485E-01 -3.28466690463057E-01 x7 : 6.62230193448536E+00 1.54232690910824E+01 == err : 4.305E-14 = rco : 2.736E-03 = res : 8.882E-15 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.08489054403391E+00 -1.79307987438582E+00 x2 : -1.75656198282473E+00 -7.45683258320039E-01 x3 : -2.96247415748369E-01 2.32634270785216E+00 x4 : 1.04373156113984E+00 -8.97470024637929E-01 x5 : -1.38967844523800E+00 3.78900562083038E-01 x6 : 3.13865738637349E-01 7.30989887408594E-01 x7 : 2.97569862064542E+00 -6.93036968326386E+00 == err : 4.644E-15 = rco : 8.877E-03 = res : 1.421E-14 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.93515873660876E-01 -4.74778387287990E-66 x2 : 7.22177850183674E-01 -1.42433516186397E-65 x3 : -1.65871370380082E+00 -7.59645419660784E-65 x4 : 1.16901800599298E-01 -4.74778387287990E-66 x5 : -1.07196055981947E-01 0.00000000000000E+00 x6 : -7.66685764661078E-01 4.50070940743944E-65 x7 : -7.82589201020625E+00 -4.59406805440176E-64 == err : 2.368E-15 = rco : 2.397E-02 = res : 1.776E-15 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.27399636935069E-01 1.28636083334685E-01 x2 : 4.97146350108961E-02 2.19412989932238E+00 x3 : 1.55565100551911E-01 1.21486906126276E+00 x4 : -2.47476413001305E+00 -2.09079838123884E+00 x5 : -1.71288232676718E-01 -8.69709294847598E-02 x6 : 6.13372990191896E-01 -1.35986573319623E+00 x7 : 1.65369671656056E+00 3.66629364825190E+00 == err : 5.475E-15 = rco : 2.262E-02 = res : 1.093E-14 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.97308366771298E-01 -1.92171595772051E+00 x2 : -2.38300160166170E+00 -1.65159813713614E+00 x3 : -1.17635241772214E+00 2.17748014148655E+00 x4 : 5.01732358554671E-01 1.22966143182879E+00 x5 : 1.19054568318791E+00 6.79107470333445E-01 x6 : 4.69767610869959E-01 -5.12934948792143E-01 x7 : 5.82616709754244E+00 6.36153845578694E+00 == err : 4.728E-15 = rco : 5.913E-03 = res : 1.375E-14 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.66666666666667E-01 -2.49628917422963E-52 x2 : -1.66666666666667E-01 -8.35238971903811E-53 x3 : -1.66666666666667E-01 5.01143383142287E-52 x4 : -1.66666666666667E-01 4.17619485951906E-52 x5 : -1.66666666666667E-01 5.84667280332668E-52 x6 : -1.66666666666667E-01 5.01143383142287E-52 x7 : -3.60000000000000E+01 6.41463530422127E-50 == err : 6.281E-15 = rco : 2.220E-03 = res : 1.776E-15 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.27399636935068E-01 3.71479583210633E+00 x2 : -6.84186578113855E+00 2.76209288924990E+00 x3 : -4.12071064151691E+00 -8.69959556204954E+00 x4 : 8.72511873116429E+00 -3.50394294906871E+00 x5 : 1.81846960499532E+00 5.23487937380794E+00 x6 : -1.40841155043922E+00 4.91770415954085E-01 x7 : -3.79717658548780E+00 -1.32584762480407E+00 == err : 2.537E-14 = rco : 2.797E-03 = res : 3.553E-14 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.24157573765506E-01 -1.92171595772051E+00 x2 : -1.48391565543637E+00 -7.29739304826774E-02 x3 : -5.60052371456211E-01 1.17922334308334E+00 x4 : 5.48670634671490E-01 9.30133142907219E-01 x5 : 7.08367213492227E-01 1.15818184498564E-01 x6 : 2.11087752494370E-01 -2.30484782285939E-01 x7 : 1.29659090383023E+01 1.41573572436994E+01 == err : 3.463E-14 = rco : 1.367E-03 = res : 1.489E-14 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.36024966562036E-01 1.92171595772051E+00 x2 : -8.16560321165552E-01 1.72600044478268E+00 x3 : -3.45095823467105E+00 8.67158668830608E-01 x4 : -5.62843410349120E-01 -4.13034050901962E+00 x5 : 2.42330915003328E+00 -1.44479097161200E+00 x6 : 9.71027849590408E-01 1.06025640929782E+00 x7 : 2.81860566521976E+00 -3.07760969275286E+00 == err : 6.365E-15 = rco : 9.009E-03 = res : 2.512E-14 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.51498181419768E+00 1.18504685467082E-62 x2 : 7.41222573661469E-01 1.21543267145725E-63 x3 : -1.07823548534975E+00 1.27620430503012E-62 x4 : -1.63478816493804E+00 -7.29259602874353E-63 x5 : 1.16304871296224E+00 1.09388940431153E-62 x6 : -1.70622945053361E+00 -1.52792069897868E-62 x7 : -3.51652586826676E+00 3.14903289293149E-62 == err : 5.155E-15 = rco : 3.603E-02 = res : 3.553E-15 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -6.81648480864347E-01 -3.03858167864314E-64 x2 : 9.58129145190158E-01 7.21663148677745E-64 x3 : 6.31940496052593E-01 7.59645419660784E-65 x4 : -4.34421392403970E-01 -4.55787251796470E-64 x5 : -8.87912123263308E-01 -1.80415787169436E-64 x6 : -5.86087644711127E-01 1.89911354915196E-64 x7 : -1.02373767032016E+01 8.07127252475485E-64 == err : 2.856E-14 = rco : 1.259E-02 = res : 3.553E-15 == solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.25749090709884E+00 -1.92171595772051E+00 x2 : -1.00903560786738E+00 -3.30462465143614E+00 x3 : -3.99271237385452E+00 -1.22680685072913E+00 x4 : -3.03453290093010E+00 3.65908289972281E+00 x5 : 3.61780513583611E+00 5.15362410077954E+00 x6 : 2.16098483971706E+00 -2.35955954061657E+00 x7 : 1.26652651496622E+00 1.38290869371563E+00 == err : 9.623E-15 = rco : 1.153E-02 = res : 1.066E-14 == solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.39817459672457E-01 -3.20475411419393E-65 x2 : -1.52476811214796E-01 -4.46083501852424E-65 x3 : 2.16348572029908E+00 1.85163571042316E-64 x4 : -9.41947644616723E-01 -6.64689742203186E-65 x5 : -9.04563389105643E-01 -6.88428661567585E-65 x6 : -1.30431533503437E+00 5.45995145381188E-65 x7 : -4.60011458796647E+00 9.49556774575980E-65 == err : 4.665E-15 = rco : 6.219E-02 = res : 2.887E-15 == solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.69908729836229E-01 -1.79307987438582E+00 x2 : -1.27629537390668E+00 1.77720268392520E-01 x3 : 2.62145169634245E+00 8.47407879790140E-01 x4 : 2.99663982501565E-01 -4.45879059994048E+00 x5 : -4.31844602385446E+00 2.65619747762992E+00 x6 : 1.10371698908089E+00 2.57054484851373E+00 x7 : 8.46204103742907E-01 -1.97080014277834E+00 == err : 4.554E-15 = rco : 2.347E-02 = res : 6.169E-15 == solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.00000000000000E+00 -6.68191177523049E-52 x2 : 1.00000000000000E+00 -1.78184314006146E-51 x3 : 1.00000000000000E+00 5.34552942018439E-51 x4 : 1.00000000000000E+00 5.34552942018439E-51 x5 : 1.00000000000000E+00 5.34552942018439E-51 x6 : -6.00000000000000E+00 -1.06910588403688E-50 x7 : -1.00000000000000E+00 6.68191177523049E-52 == err : 4.815E-35 = rco : 4.762E-02 = res : 2.717E-50 == solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.25749090709884E+00 1.92171595772051E+00 x2 : -1.00903560786738E+00 3.30462465143614E+00 x3 : -3.99271237385452E+00 1.22680685072913E+00 x4 : -3.03453290093010E+00 -3.65908289972281E+00 x5 : 3.61780513583611E+00 -5.15362410077954E+00 x6 : 2.16098483971706E+00 2.35955954061657E+00 x7 : 1.26652651496622E+00 -1.38290869371563E+00 == err : 8.689E-15 = rco : 1.153E-02 = res : 1.422E-14 == solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.08489054403391E+00 1.79307987438582E+00 x2 : -1.75656198282473E+00 7.45683258320039E-01 x3 : -2.96247415748368E-01 -2.32634270785216E+00 x4 : 1.04373156113984E+00 8.97470024637929E-01 x5 : -1.38967844523800E+00 -3.78900562083039E-01 x6 : 3.13865738637349E-01 -7.30989887408594E-01 x7 : 2.97569862064542E+00 6.93036968326386E+00 == err : 4.402E-15 = rco : 8.877E-03 = res : 1.589E-14 == solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.78534059463196E-01 -1.03311777073867E-62 x2 : 1.40399529688145E+00 1.94469227433161E-62 x3 : -4.24145311642535E-01 1.21543267145725E-62 x4 : 2.30307117019040E+00 -9.72346137165803E-63 x5 : -1.76538489062995E+00 5.34790375441192E-62 x6 : -2.69607032426256E+00 -6.32024989157772E-62 x7 : -2.22546123741826E+00 -3.88938454866321E-62 == err : 4.397E-15 = rco : 7.427E-02 = res : 1.221E-15 == solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.93369639826430E-03 3.71479583210633E+00 x2 : -6.29608516467496E+00 -2.89485362873527E-01 x3 : 6.85454641806506E-01 -6.41622249799802E+00 x4 : 4.94031447364827E+00 2.36147158475214E-01 x5 : 2.97245117069882E-01 2.53379026615599E+00 x6 : -6.32862764247966E-01 2.20974604134012E-01 x7 : -8.45046930263531E+00 -2.95062249572452E+00 == err : 9.137E-15 = rco : 1.203E-03 = res : 8.527E-14 == solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.51557210700575E-01 -1.79307987438582E+00 x2 : -5.18994747263476E-01 1.65067431386248E+00 x3 : 2.54014532482806E+00 -1.49593314929199E+00 x4 : -1.73247661935806E+00 -1.65911587822018E+00 x5 : -1.53306651761352E+00 2.14239297415820E+00 x6 : 4.95949770107570E-01 1.15506161387731E+00 x7 : 1.88319443182410E+00 -4.38593932445156E+00 == err : 4.379E-15 = rco : 1.345E-02 = res : 8.894E-15 == solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.36024966562036E-01 -1.92171595772051E+00 x2 : -8.16560321165553E-01 -1.72600044478268E+00 x3 : -3.45095823467105E+00 -8.67158668830608E-01 x4 : -5.62843410349120E-01 4.13034050901962E+00 x5 : 2.42330915003328E+00 1.44479097161200E+00 x6 : 9.71027849590408E-01 -1.06025640929782E+00 x7 : 2.81860566521976E+00 3.07760969275286E+00 == err : 5.695E-15 = rco : 9.009E-03 = res : 1.962E-14 == solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.27399636935069E-01 -1.28636083334685E-01 x2 : 4.97146350108961E-02 -2.19412989932238E+00 x3 : 1.55565100551911E-01 -1.21486906126276E+00 x4 : -2.47476413001305E+00 2.09079838123884E+00 x5 : -1.71288232676718E-01 8.69709294847598E-02 x6 : 6.13372990191896E-01 1.35986573319623E+00 x7 : 1.65369671656056E+00 -3.66629364825190E+00 == err : 5.425E-15 = rco : 2.262E-02 = res : 1.084E-14 == solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.69908729836229E-01 1.79307987438582E+00 x2 : -1.27629537390668E+00 -1.77720268392520E-01 x3 : 2.62145169634245E+00 -8.47407879790140E-01 x4 : 2.99663982501565E-01 4.45879059994048E+00 x5 : -4.31844602385446E+00 -2.65619747762992E+00 x6 : 1.10371698908089E+00 -2.57054484851373E+00 x7 : 8.46204103742907E-01 1.97080014277834E+00 == err : 4.554E-15 = rco : 2.347E-02 = res : 6.169E-15 == solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.24157573765507E-01 1.92171595772051E+00 x2 : -1.48391565543637E+00 7.29739304826770E-02 x3 : -5.60052371456211E-01 -1.17922334308334E+00 x4 : 5.48670634671490E-01 -9.30133142907219E-01 x5 : 7.08367213492227E-01 -1.15818184498564E-01 x6 : 2.11087752494370E-01 2.30484782285939E-01 x7 : 1.29659090383023E+01 -1.41573572436994E+01 == err : 4.016E-14 = rco : 1.367E-03 = res : 1.676E-14 == solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.54799273870137E-01 -1.51929083932157E-63 x2 : -8.54232602712374E-01 6.07716335728627E-64 x3 : 1.57319825015525E-01 0.00000000000000E+00 x4 : -5.20756185121201E-01 7.59645419660784E-64 x5 : -6.62201048157115E-02 3.03858167864314E-64 x6 : -3.70910206236376E-01 1.13946812949118E-64 x7 : -1.61764219455754E+01 -1.52687825261831E-62 == err : 2.186E-14 = rco : 6.932E-03 = res : 1.776E-15 == SHAR_EOF fi # end of overwriting check if test -f 'eco8' then echo shar: will not over-write existing file "'eco8'" else cat << "SHAR_EOF" > 'eco8' 8 (x1 + x1*x2 + x2*x3 + x3*x4 + x4*x5 + x5*x6 + x6*x7)*x8 - 1; (x2 + x1*x3 + x2*x4 + x3*x5 + x4*x6 + x5*x7)*x8 - 2; (x3 + x1*x4 + x2*x5 + x3*x6 + x4*x7)*x8 - 3; (x4 + x1*x5 + x2*x6 + x3*x7)*x8 - 4; (x5 + x1*x6 + x2*x7)*x8 - 5; (x6 + x1*x7)*x8 - 6; x7*x8 - 7; x1 + x2 + x3 + x4 + x5 + x6 + x7 + 1; TITLE : 8-dimensional economics problem ROOT COUNTS : total degree : 1458 3-homogeneous Bezout number : 256 with partition : {x1 x2 x3 x4 x5 x6 }{x7 }{x8 } generalized Bezout number : 176 based on the set structure : {x1 x3 x5 x7 }{x2 x4 x6 }{x8 } {x1 x2 x5 x6 }{x3 x4 x7 }{x8 } {x1 x2 x3 x7 }{x4 x5 x6 }{x8 } {x1 x2 x3 x4 }{x5 x6 x7 }{x8 } {x1 x2 x5 }{x6 x7 }{x8 } {x1 x6 }{x7 }{x8 } {x7 }{x8 } {x1 x2 x3 x4 x5 x6 x7 } mixed volume : 64 REFERENCE : Alexander Morgan: `Solving polynomial systems using continuation for engineering and scientific problems', Prentice-Hall, Englewood Cliffs, New Jersey, 1987, (p 148). NOTE : Transform u = 1/x8 and the total degree equals the number of solutions. See the reduced economics problem, in the file redeco8. THE SOLUTIONS : 64 8 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.78209839580825E-02 -1.74673471603347E+00 x2 : -2.25061288175077E-01 -9.65541438387309E-01 x3 : -2.59969119095552E+00 -1.46033094051729E+00 x4 : -1.84772040826661E+00 2.29707362139904E+00 x5 : 1.45480800105432E+00 2.83093730324484E+00 x6 : 1.86925177577862E+00 -9.05476876953008E-02 x7 : 3.96234094522347E-01 -8.64856142010510E-01 x8 : 3.06486994737651E+00 6.68966056958662E+00 == err : 6.921E-15 = rco : 5.396E-03 = res : 3.198E-14 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.31206034840825E-01 -8.65785019824411E-01 x2 : -7.80875281985146E-01 -2.20760439208593E+00 x3 : -1.22835309328094E+00 9.21433110771690E-01 x4 : -8.06469247698946E-01 8.07711688026660E-01 x5 : 6.64340626635413E-01 1.15785993336426E+00 x6 : 4.31688773993016E-01 3.31850703822340E-01 x7 : 4.88462187495779E-01 -1.45466024074603E-01 x8 : 1.31632748419528E+01 3.92007673076368E+00 == err : 4.285E-14 = rco : 3.735E-03 = res : 7.550E-15 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.31206034840825E-01 -2.62768441224252E+00 x2 : -3.85844611688014E+00 -6.98250845583434E-01 x3 : -4.40272194011276E-01 2.88988515225427E+00 x4 : 8.61326214993982E-01 9.51587434171054E-01 x5 : 1.32403203819477E+00 7.89090697380827E-01 x6 : 1.09096648052896E+00 -8.39705419198962E-01 x7 : -2.08812457667120E-01 -4.64922606781227E-01 x8 : -5.62716181735090E+00 1.25289207843777E+01 == err : 4.290E-15 = rco : 1.405E-03 = res : 2.930E-14 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.04963841100940E-01 -1.74673471603347E+00 x2 : -2.06845890440780E+00 -2.62980376922778E+00 x3 : -3.00423794013733E+00 7.60055778523489E-01 x4 : 2.57343272529547E-01 3.12382515229320E+00 x5 : 8.24194415747985E-01 6.37834651815017E-01 x6 : 1.64835675125572E+00 8.10488698284776E-01 x7 : 4.37838563910929E-01 -9.55665795655231E-01 x8 : 2.77363866165643E+00 6.05399299407358E+00 == err : 5.108E-15 = rco : 5.857E-03 = res : 4.977E-14 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.45186377688686E-01 -2.78729129753649E-01 x2 : 6.84268653947781E-01 1.79772241022417E+00 x3 : 1.50893398799752E-01 1.70641722701536E-01 x4 : -1.21425244899783E+00 -4.90968316930757E-01 x5 : -6.64940564102784E-01 -2.11960393271642E-01 x6 : 2.15174448159515E-01 -5.07550037830726E-01 x7 : 7.40428898822547E-02 -4.79156255138937E-01 x8 : 2.20484735727226E+00 1.42683032029623E+01 == err : 6.734E-15 = rco : 4.602E-03 = res : 7.444E-15 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.45186377688686E-01 2.78729129753649E-01 x2 : 6.84268653947781E-01 -1.79772241022417E+00 x3 : 1.50893398799752E-01 -1.70641722701536E-01 x4 : -1.21425244899783E+00 4.90968316930757E-01 x5 : -6.64940564102784E-01 2.11960393271641E-01 x6 : 2.15174448159515E-01 5.07550037830726E-01 x7 : 7.40428898822546E-02 4.79156255138937E-01 x8 : 2.20484735727226E+00 -1.42683032029623E+01 == err : 5.351E-15 = rco : 4.602E-03 = res : 6.217E-15 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 7.28266057133575E-01 2.90641354199617E+00 x2 : -4.02480045349249E+00 4.77974857901422E-01 x3 : 1.18159160926567E+00 -4.31989607068968E+00 x4 : 2.35266437155773E+00 2.26130810108664E+00 x5 : -2.31317226244749E+00 1.20777100078736E-01 x6 : 5.18093612620539E-01 -1.60012182512894E+00 x7 : 5.57357065362468E-01 1.53544294755645E-01 x8 : 1.16733509971869E+01 -3.21584951135863E+00 == err : 3.191E-14 = rco : 2.489E-03 = res : 7.105E-14 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.28571428571429E-01 -6.02220566455407E-01 x2 : 8.39713171180437E-02 -1.02911869361847E+00 x3 : -3.70029864242782E-01 -2.29937976125475E+00 x4 : -1.54493207432736E+00 1.74277200821394E+00 x5 : -4.80758765975095E-01 9.13787435124618E-01 x6 : 3.89841694187333E-02 7.38121476848058E-01 x7 : 8.44193789437036E-01 5.36038101142015E-01 x8 : 5.90935652605925E+00 -3.75226670799410E+00 == err : 7.927E-15 = rco : 1.109E-02 = res : 3.662E-15 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.28571428571428E-01 -1.15967882596271E+00 x2 : -4.07121367244140E-01 2.19073427282266E+00 x3 : 3.00074302117930E+00 8.43795237846107E-01 x4 : -2.57574776919183E+00 -1.75555475906375E+00 x5 : -1.41599518322812E+00 1.72047147691013E+00 x6 : 6.12565476144802E-01 -1.07391432908286E+00 x7 : -6.43015606231446E-01 -7.65853073469583E-01 x8 : -4.50110924362012E+00 5.36097151428708E+00 == err : 4.431E-15 = rco : 8.358E-03 = res : 2.197E-14 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.42551771419289E-01 -1.74673471603347E+00 x2 : -1.34084054571022E+00 -2.76051468441591E-01 x3 : -7.68678942106033E-01 9.02740445142473E-01 x4 : 2.20595282770167E-01 1.02073155184390E+00 x5 : 7.02375877262567E-01 4.36162532263085E-01 x6 : 5.26176045404461E-01 -1.12197055754395E-01 x7 : 1.02924053798346E-01 -2.24651289020004E-01 x8 : 1.17990491397357E+01 2.57536649658722E+01 == err : 4.505E-14 = rco : 8.560E-04 = res : 1.005E-14 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.47515612520230E-01 -1.13195988485334E-71 x2 : 1.59955565082714E+00 1.81113581576534E-71 x3 : -7.14195108063652E-01 -4.52783953941336E-71 x4 : 1.32209704041973E+00 8.60289512488538E-71 x5 : 7.67848816841054E-01 2.71670372364801E-71 x6 : -1.98227932283785E+00 -4.11977234100445E-71 x7 : -1.64551146466620E+00 1.35835186182401E-71 x8 : -4.25399649307213E+00 1.35835186182401E-70 == err : 4.725E-15 = rco : 2.914E-02 = res : 3.997E-15 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.26242193739885E-01 8.80949696209057E-01 x2 : 6.84766851039934E-01 -6.70954697940247E-01 x3 : 1.13659996275851E+00 1.57144488632821E+00 x4 : -7.84742698629243E-01 -1.09325148997073E+00 x5 : 3.30907349288984E+00 1.25190184527914E+00 x6 : -3.43647190317998E+00 6.13586232733104E-01 x7 : -2.23546789861895E+00 -2.55367647263853E+00 x8 : -1.35852465730005E+00 1.55190439414930E+00 == err : 4.245E-15 = rco : 3.791E-02 = res : 8.538E-15 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.42857142857143E-01 2.82989971213335E-73 x2 : -1.42857142857143E-01 2.82989971213335E-73 x3 : -1.42857142857143E-01 0.00000000000000E+00 x4 : -1.42857142857143E-01 2.24834569700406E-73 x5 : -1.42857142857143E-01 4.24484956820002E-73 x6 : -1.42857142857143E-01 2.82989971213335E-73 x7 : -1.42857142857143E-01 0.00000000000000E+00 x8 : -4.90000000000000E+01 1.08668148945921E-70 == err : 2.040E-15 = rco : 1.407E-03 = res : 1.332E-15 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.02634606269397E-01 2.02546384578712E+00 x2 : -1.83542167444223E+00 9.45397563054455E-01 x3 : 6.75509155081997E-01 -2.15925850374478E+00 x4 : 3.83025063947650E+00 2.45922649501808E+00 x5 : -3.63602971348939E+00 4.83285613744496E+00 x6 : -3.81540389155297E+00 -6.13981213018347E+00 x7 : 2.97846087865670E+00 -1.96387340737636E+00 x8 : 1.63805628071163E+00 1.08006628273266E+00 == err : 6.418E-15 = rco : 1.241E-02 = res : 1.531E-14 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.59938925712429E+00 -3.86900351268231E-74 x2 : 1.29935154253298E+00 -5.30606196025003E-74 x3 : -1.63719724641073E-01 2.98465985264064E-74 x4 : -1.72340091727033E+00 -1.32651549006251E-74 x5 : -1.40859034083628E+00 2.65303098012501E-74 x6 : 1.73652942442072E+00 -3.53737464016668E-74 x7 : -2.33955924133030E+00 3.53737464016668E-74 x8 : -2.99201656292307E+00 -3.53737464016668E-74 == err : 4.008E-15 = rco : 2.988E-02 = res : 3.553E-15 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 7.28266057133575E-01 -2.90641354199617E+00 x2 : -4.02480045349249E+00 -4.77974857901420E-01 x3 : 1.18159160926567E+00 4.31989607068968E+00 x4 : 2.35266437155772E+00 -2.26130810108664E+00 x5 : -2.31317226244749E+00 -1.20777100078734E-01 x6 : 5.18093612620540E-01 1.60012182512894E+00 x7 : 5.57357065362469E-01 -1.53544294755646E-01 x8 : 1.16733509971869E+01 3.21584951135863E+00 == err : 2.205E-14 = rco : 2.489E-03 = res : 4.494E-14 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.51873644604064E-01 -3.09520281014585E-74 x2 : 1.09122081140823E+00 7.07474928033337E-74 x3 : -1.11424211179408E+00 1.76868732008334E-74 x4 : -6.37151941736669E-01 -6.19040562029170E-74 x5 : 2.91145276196003E-01 6.48940927413164E-74 x6 : -3.32878313838290E-01 2.54248802261980E-74 x7 : -5.49967364839252E-01 -3.09520281014585E-74 x8 : -1.27280279658885E+01 -1.41494985606667E-73 == err : 1.220E-14 = rco : 9.507E-03 = res : 3.553E-15 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.45186377688685E-01 -3.77219856182059E+00 x2 : -6.39162737706626E+00 5.56129503395270E-01 x3 : 1.27333920068981E-02 6.84707775070628E+00 x4 : 5.80177107600900E+00 1.00206172064427E+00 x5 : 1.65565900260799E+00 -3.62174951858025E+00 x6 : -1.42211604046533E+00 -1.26814754910442E+00 x7 : -4.11233675403618E-01 2.56826654759426E-01 x8 : -1.22457062910011E+01 -7.64777782071831E+00 == err : 3.487E-14 = rco : 5.158E-04 = res : 1.271E-13 == solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -5.44881006250832E-01 2.02546384578712E+00 x2 : -9.69913074191903E-01 -1.78394659173895E+00 x3 : 2.39780453489541E+00 5.10525969081904E-01 x4 : -4.74509572712672E-01 2.52319895744740E+00 x5 : -2.15522917066727E+00 -7.48198344852689E-01 x6 : 4.65723570859314E-02 -2.06539009186894E+00 x7 : 7.00155931841337E-01 -4.61653743855839E-01 x8 : 6.96828567360206E+00 4.59459817903020E+00 == err : 6.674E-15 = rco : 4.446E-03 = res : 1.123E-14 == solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.28876800009282E-01 2.90641354199617E+00 x2 : -3.80201010831929E+00 -1.26409819593165E+00 x3 : 4.96221479138290E+00 -2.69017551530026E+00 x4 : -1.41431539654813E-02 7.74678341483025E+00 x5 : -6.49225902486156E+00 -2.64610297939910E+00 x6 : 2.54969912472745E+00 -4.51222733924665E+00 x7 : 1.66762157102670E+00 4.59407073051234E-01 x8 : 3.90149945753728E+00 -1.07481006328952E+00 == err : 7.826E-15 = rco : 4.981E-03 = res : 3.102E-14 == solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.28571428571429E-01 -4.65314825802964E+00 x2 : -1.05605882331532E+01 -1.40461093479243E+00 x3 : -1.72418225308741E+00 1.52950278479316E+01 x4 : 1.53737752985508E+01 7.46802772179348E-01 x5 : 3.04264868472084E-01 -1.06492430997778E+01 x6 : -4.66174043546157E+00 -3.21929018534654E-01 x7 : -1.60100673892119E-01 9.87100691023611E-01 x8 : -1.12070471724483E+00 -6.90970483716527E+00 == err : 8.183E-14 = rco : 7.215E-04 = res : 2.913E-13 == solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.25936822302032E-01 8.65785019824411E-01 x2 : 6.00856924973186E-01 2.54935639473334E+00 x3 : -1.96886687892048E+00 1.06724423008164E+00 x4 : -2.82589112375875E+00 1.04483412963302E+00 x5 : -2.32128192272876E-01 -4.58862776826684E+00 x6 : 9.19624613112195E-01 -1.49860296754324E+00 x7 : 1.88046783456469E+00 5.60010961537670E-01 x8 : 3.41923531247045E+00 -1.01826216852222E+00 == err : 3.807E-15 = rco : 1.002E-02 = res : 7.944E-15 == solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.78209839580827E-02 1.74673471603347E+00 x2 : -2.25061288175077E-01 9.65541438387308E-01 x3 : -2.59969119095552E+00 1.46033094051729E+00 x4 : -1.84772040826661E+00 -2.29707362139904E+00 x5 : 1.45480800105432E+00 -2.83093730324484E+00 x6 : 1.86925177577862E+00 9.05476876953006E-02 x7 : 3.96234094522347E-01 8.64856142010510E-01 x8 : 3.06486994737651E+00 -6.68966056958662E+00 == err : 7.780E-15 = rco : 5.396E-03 = res : 3.517E-14 == solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.28571428571428E-01 2.89124886561153E+00 x2 : -3.91435387900099E+00 2.56622651399662E+00 x3 : -5.45630497792309E+00 -4.28359545348285E+00 x4 : 3.98380022342191E+00 -5.67888983878634E+00 x5 : 4.48936566690324E+00 1.32411507053572E+00 x6 : 4.26163040031263E-01 2.89160483738685E+00 x7 : -9.57241502003758E-01 2.89290004738477E-01 x8 : -6.70069051402631E+00 -2.02503003316934E+00 == err : 1.110E-14 = rco : 1.779E-03 = res : 5.684E-14 == solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.40202386339369E+00 2.02546384578712E+00 x2 : -1.65436882863949E+00 2.15943883291291E+00 x3 : -2.12851479896278E+00 -2.20031290401576E+00 x4 : 2.05184647153120E+00 -2.08206273515086E+00 x5 : 2.05412340337162E-01 2.41248718888364E+00 x6 : -1.87186842960293E+00 -1.65864305998415E+00 x7 : 9.95469381943151E-01 -6.56371168432885E-01 x8 : 4.90109152288936E+00 3.23157620699087E+00 == err : 6.684E-15 = rco : 5.778E-03 = res : 3.553E-14 == solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.00000000000000E+00 4.95232449623336E-73 x2 : 1.00000000000000E+00 1.13195988485334E-72 x3 : 1.00000000000000E+00 1.91018230569001E-72 x4 : 1.00000000000000E+00 1.58474383879468E-72 x5 : 1.00000000000000E+00 8.48969913640004E-73 x6 : 1.00000000000000E+00 1.98092979849334E-72 x7 : -7.00000000000000E+00 6.79175930912004E-72 x8 : -1.00000000000000E+00 -5.65979942426670E-73 == err : 1.020E-56 = rco : 3.878E-02 = res : 1.474E-71 == solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.02634606269397E-01 -2.02546384578712E+00 x2 : -1.83542167444223E+00 -9.45397563054455E-01 x3 : 6.75509155081998E-01 2.15925850374478E+00 x4 : 3.83025063947650E+00 -2.45922649501808E+00 x5 : -3.63602971348939E+00 -4.83285613744496E+00 x6 : -3.81540389155297E+00 6.13981213018347E+00 x7 : 2.97846087865670E+00 1.96387340737636E+00 x8 : 1.63805628071163E+00 -1.08006628273266E+00 == err : 6.403E-15 = rco : 1.241E-02 = res : 1.776E-14 == solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.29969462856215E+00 1.74673471603347E+00 x2 : -4.20773748026272E-01 3.31929373917350E+00 x3 : -3.38353768926908E+00 2.53211410631423E+00 x4 : -4.61693651227582E+00 -1.30640300980813E+00 x5 : -1.24447235082903E+00 -5.39838614687383E+00 x6 : 5.68044722330437E+00 -4.57244839996384E+00 x7 : 1.68557844853368E+00 3.67909499512461E+00 x8 : 7.20468376588420E-01 -1.57255902314003E+00 == err : 5.834E-15 = rco : 7.502E-03 = res : 2.844E-14 == solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.25936822302032E-01 2.62768441224253E+00 x2 : -2.47671390992181E+00 1.73547878282747E+00 x3 : -2.39559793877656E+00 7.76678777389885E-01 x4 : -4.81852275273735E+00 -3.11114097537515E+00 x5 : 4.35149002787906E+00 -6.34471360742584E+00 x6 : 4.51728801087618E+00 2.52616678400144E+00 x7 : -8.03880259621560E-01 1.78984582633967E+00 x8 : -1.46168720366984E+00 -3.25445824746859E+00 == err : 1.520E-14 = rco : 4.822E-03 = res : 3.202E-14 == solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.25631450864178E-01 8.80949696209057E-01 x2 : 5.80275202596967E-01 -1.42922913965630E-01 x3 : -1.39143724803457E-02 9.04963714845271E-01 x4 : -2.34592954474775E+00 -1.23892478112758E+00 x5 : 1.30179835264017E+00 -2.67220218142479E-01 x6 : -7.00716863028764E-01 7.16651272314106E-01 x7 : -7.47144225844456E-01 -8.53496770132749E-01 x8 : -4.06472827578114E+00 4.64332365136781E+00 == err : 4.887E-15 = rco : 1.699E-02 = res : 4.190E-15 == solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 7.28266057133575E-01 1.14451414957806E+00 x2 : -4.56136934235313E-01 1.11155865313099E+00 x3 : -1.30034690799614E+00 -1.53824981660552E+00 x4 : 8.57247746941892E-01 -8.17101815054367E-02 x5 : -2.62049660027996E-01 1.00268202683989E-01 x6 : -6.45434621422677E-01 -1.63609090637662E-01 x7 : 7.84543196066627E-02 -5.72771916644424E-01 x8 : 1.64315636587197E+00 1.19962014296412E+01 == err : 2.544E-14 = rco : 6.407E-03 = res : 7.324E-15 == solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.25936822302032E-01 -2.62768441224252E+00 x2 : -2.47671390992181E+00 -1.73547878282746E+00 x3 : -2.39559793877655E+00 -7.76678777389886E-01 x4 : -4.81852275273735E+00 3.11114097537514E+00 x5 : 4.35149002787906E+00 6.34471360742585E+00 x6 : 4.51728801087618E+00 -2.52616678400144E+00 x7 : -8.03880259621558E-01 -1.78984582633967E+00 x8 : -1.46168720366984E+00 3.25445824746859E+00 == err : 6.722E-15 = rco : 4.822E-03 = res : 3.408E-14 == solution 33 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.28571428571429E-01 -2.89124886561153E+00 x2 : -3.91435387900099E+00 -2.56622651399662E+00 x3 : -5.45630497792309E+00 4.28359545348285E+00 x4 : 3.98380022342191E+00 5.67888983878634E+00 x5 : 4.48936566690324E+00 -1.32411507053572E+00 x6 : 4.26163040031264E-01 -2.89160483738685E+00 x7 : -9.57241502003759E-01 -2.89290004738477E-01 x8 : -6.70069051402631E+00 2.02503003316934E+00 == err : 8.043E-15 = rco : 1.779E-03 = res : 1.241E-13 == solution 34 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.31206034840825E-01 2.62768441224252E+00 x2 : -3.85844611688014E+00 6.98250845583435E-01 x3 : -4.40272194011275E-01 -2.88988515225427E+00 x4 : 8.61326214993982E-01 -9.51587434171054E-01 x5 : 1.32403203819477E+00 -7.89090697380827E-01 x6 : 1.09096648052896E+00 8.39705419198962E-01 x7 : -2.08812457667120E-01 4.64922606781227E-01 x8 : -5.62716181735090E+00 -1.25289207843777E+01 == err : 1.637E-14 = rco : 1.405E-03 = res : 2.842E-14 == solution 35 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.28876800009282E-01 1.14451414957806E+00 x2 : -2.33346589062116E-01 4.25549167247156E-01 x3 : 3.41257698386961E-01 -1.44992200607483E+00 x4 : 2.33092590705609E+00 2.58954405931279E+00 x5 : -2.01199797300258E+00 5.20777980807650E-01 x6 : -1.79045246708362E+00 -1.51672028949352E+00 x7 : 2.34736623695995E-01 -1.71374306137731E+00 x8 : 5.49180237246639E-01 4.00940341651097E+00 == err : 6.130E-15 = rco : 1.864E-02 = res : 6.405E-15 == solution 36 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.04963841100940E-01 1.74673471603347E+00 x2 : -2.06845890440779E+00 2.62980376922778E+00 x3 : -3.00423794013733E+00 -7.60055778523487E-01 x4 : 2.57343272529545E-01 -3.12382515229319E+00 x5 : 8.24194415747984E-01 -6.37834651815019E-01 x6 : 1.64835675125572E+00 -8.10488698284777E-01 x7 : 4.37838563910930E-01 9.55665795655231E-01 x8 : 2.77363866165643E+00 -6.05399299407357E+00 == err : 5.986E-15 = rco : 5.857E-03 = res : 3.449E-14 == solution 37 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.28571428571428E-01 4.65314825802964E+00 x2 : -1.05605882331532E+01 1.40461093479243E+00 x3 : -1.72418225308742E+00 -1.52950278479316E+01 x4 : 1.53737752985507E+01 -7.46802772179369E-01 x5 : 3.04264868472107E-01 1.06492430997778E+01 x6 : -4.66174043546156E+00 3.21929018534666E-01 x7 : -1.60100673892122E-01 -9.87100691023610E-01 x8 : -1.12070471724485E+00 6.90970483716527E+00 == err : 5.301E-14 = rco : 7.215E-04 = res : 1.907E-13 == solution 38 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.28571428571429E-01 6.02220566455408E-01 x2 : 8.39713171180437E-02 1.02911869361847E+00 x3 : -3.70029864242782E-01 2.29937976125475E+00 x4 : -1.54493207432736E+00 -1.74277200821394E+00 x5 : -4.80758765975095E-01 -9.13787435124618E-01 x6 : 3.89841694187331E-02 -7.38121476848058E-01 x7 : 8.44193789437036E-01 -5.36038101142015E-01 x8 : 5.90935652605925E+00 3.75226670799411E+00 == err : 6.327E-15 = rco : 1.109E-02 = res : 1.081E-14 == solution 39 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.30900663402972E-01 -8.80949696209057E-01 x2 : -9.19755701091595E-01 4.90660881263941E-01 x3 : 3.94673442417123E-01 3.81947804965646E-02 x4 : -5.68975899878565E-01 -5.29931641528690E-02 x5 : 1.58549846241613E-02 2.82028740882827E-01 x6 : -2.58622538431232E-01 -9.86421700170221E-02 x7 : -1.94074951042864E-01 2.21700627735615E-01 x8 : -1.56482752903326E+01 -1.78757353084697E+01 == err : 4.749E-14 = rco : 2.230E-03 = res : 3.972E-15 == solution 40 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.25936822302032E-01 -8.65785019824411E-01 x2 : 6.00856924973186E-01 -2.54935639473334E+00 x3 : -1.96886687892048E+00 -1.06724423008164E+00 x4 : -2.82589112375875E+00 -1.04483412963302E+00 x5 : -2.32128192272875E-01 4.58862776826684E+00 x6 : 9.19624613112195E-01 1.49860296754324E+00 x7 : 1.88046783456469E+00 -5.60010961537670E-01 x8 : 3.41923531247045E+00 1.01826216852222E+00 == err : 3.867E-15 = rco : 1.002E-02 = res : 9.607E-15 == solution 41 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.28876800009282E-01 -2.90641354199617E+00 x2 : -3.80201010831929E+00 1.26409819593165E+00 x3 : 4.96221479138290E+00 2.69017551530026E+00 x4 : -1.41431539654798E-02 -7.74678341483024E+00 x5 : -6.49225902486155E+00 2.64610297939909E+00 x6 : 2.54969912472744E+00 4.51222733924664E+00 x7 : 1.66762157102670E+00 -4.59407073051233E-01 x8 : 3.90149945753728E+00 1.07481006328952E+00 == err : 1.637E-14 = rco : 4.981E-03 = res : 4.394E-14 == solution 42 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.05269212538794E-01 -5.14755758946803E-85 x2 : -5.29386459651293E-01 -9.00822578156905E-85 x3 : 1.15852681899207E+00 9.00822578156905E-85 x4 : 2.02601496566939E+00 4.81756572951960E-85 x5 : -1.98415557208050E+00 -1.26276022116638E-84 x6 : -4.57979256055826E-01 -3.86066819210102E-85 x7 : -1.81828970941264E+00 1.60861174670876E-84 x8 : -3.84977155387477E+00 -1.80164515631381E-84 == err : 4.191E-15 = rco : 5.193E-02 = res : 1.776E-15 == solution 43 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -6.84885937213211E-02 -8.80949696209057E-01 x2 : -5.78666659188168E-01 1.01869266523856E+00 x3 : 2.18404212742885E+00 -8.36716792879222E-01 x4 : -5.92211611072873E-01 -5.34720076445635E-01 x5 : -2.42146239570215E-01 4.67906911739125E-01 x6 : -1.12185355590753E+00 1.02455038360827E-01 x7 : -5.80675467968734E-01 6.63331950195402E-01 x8 : -5.23000958091119E+00 -5.97447739092924E+00 == err : 5.007E-15 = rco : 1.331E-02 = res : 6.040E-15 == solution 44 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -6.84885937213211E-02 8.80949696209056E-01 x2 : -5.78666659188168E-01 -1.01869266523856E+00 x3 : 2.18404212742885E+00 8.36716792879222E-01 x4 : -5.92211611072873E-01 5.34720076445635E-01 x5 : -2.42146239570215E-01 -4.67906911739125E-01 x6 : -1.12185355590753E+00 -1.02455038360827E-01 x7 : -5.80675467968734E-01 -6.63331950195402E-01 x8 : -5.23000958091119E+00 5.97447739092924E+00 == err : 5.105E-15 = rco : 1.331E-02 = res : 5.687E-15 == solution 45 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.45082508734604E-02 2.02546384578712E+00 x2 : -1.59654661034104E+00 -5.69905321880497E-01 x3 : 5.16862642546052E-01 -1.16646799656723E+00 x4 : 4.91237759965541E-01 4.01056041665406E-01 x5 : -5.75373719029586E-01 6.19660927472800E-02 x6 : -1.24696364116086E-01 -5.97817478504557E-01 x7 : 2.34008040101661E-01 -1.54295183247523E-01 x8 : 2.08492261505969E+01 1.37471138516345E+01 == err : 4.026E-14 = rco : 1.131E-03 = res : 1.589E-14 == solution 46 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.10232923483154E+00 -3.77219856182058E+00 x2 : -6.85329278634063E+00 -4.52696695218433E+00 x3 : -9.05474845175678E+00 8.09165852463592E+00 x4 : 7.45842856856864E+00 1.19920978913958E+01 x5 : 1.17890209232269E+01 -6.01022107632634E+00 x6 : -3.69235087552955E+00 -6.86690951437450E+00 x7 : -1.74938661300016E+00 1.09253968867405E+00 x8 : -2.87863572782532E+00 -1.79778658331597E+00 == err : 5.392E-14 = rco : 1.241E-03 = res : 1.990E-13 == solution 47 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.28876800009282E-01 -1.14451414957806E+00 x2 : -2.33346589062116E-01 -4.25549167247156E-01 x3 : 3.41257698386961E-01 1.44992200607483E+00 x4 : 2.33092590705609E+00 -2.58954405931280E+00 x5 : -2.01199797300258E+00 -5.20777980807649E-01 x6 : -1.79045246708362E+00 1.51672028949352E+00 x7 : 2.34736623695995E-01 1.71374306137731E+00 x8 : 5.49180237246639E-01 -4.00940341651097E+00 == err : 6.266E-15 = rco : 1.864E-02 = res : 4.684E-15 == solution 48 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.42551771419289E-01 1.74673471603347E+00 x2 : -1.34084054571022E+00 2.76051468441591E-01 x3 : -7.68678942106032E-01 -9.02740445142472E-01 x4 : 2.20595282770167E-01 -1.02073155184390E+00 x5 : 7.02375877262567E-01 -4.36162532263085E-01 x6 : 5.26176045404461E-01 1.12197055754395E-01 x7 : 1.02924053798346E-01 2.24651289020004E-01 x8 : 1.17990491397357E+01 -2.57536649658722E+01 == err : 5.099E-14 = rco : 8.560E-04 = res : 2.132E-14 == solution 49 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.45082508734605E-02 -2.02546384578712E+00 x2 : -1.59654661034104E+00 5.69905321880497E-01 x3 : 5.16862642546052E-01 1.16646799656723E+00 x4 : 4.91237759965541E-01 -4.01056041665406E-01 x5 : -5.75373719029586E-01 -6.19660927472800E-02 x6 : -1.24696364116086E-01 5.97817478504557E-01 x7 : 2.34008040101661E-01 1.54295183247523E-01 x8 : 2.08492261505969E+01 -1.37471138516345E+01 == err : 3.630E-14 = rco : 1.131E-03 = res : 1.465E-14 == solution 50 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.10232923483154E+00 2.78729129753649E-01 x2 : 2.22603244673394E-01 -1.42213055621695E+00 x3 : 6.18291929397411E-01 -2.62969032904711E+00 x4 : -3.00295846715410E-01 3.61318816677034E-01 x5 : -3.44882007007395E+00 1.96100801887167E+00 x6 : 4.90913313990975E-01 -5.87564109032905E-01 x7 : 3.14978193896038E-01 2.03832902899461E+00 x8 : 5.18300229175783E-01 -3.35409378597256E+00 == err : 4.567E-15 = rco : 1.854E-02 = res : 1.137E-14 == solution 51 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.28571428571428E-01 1.15967882596271E+00 x2 : -4.07121367244140E-01 -2.19073427282266E+00 x3 : 3.00074302117930E+00 -8.43795237846107E-01 x4 : -2.57574776919183E+00 1.75555475906375E+00 x5 : -1.41599518322812E+00 -1.72047147691013E+00 x6 : 6.12565476144802E-01 1.07391432908286E+00 x7 : -6.43015606231446E-01 7.65853073469583E-01 x8 : -4.50110924362012E+00 -5.36097151428708E+00 == err : 4.431E-15 = rco : 8.358E-03 = res : 2.197E-14 == solution 52 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.45186377688687E-01 3.77219856182058E+00 x2 : -6.39162737706625E+00 -5.56129503395277E-01 x3 : 1.27333920069084E-02 -6.84707775070628E+00 x4 : 5.80177107600899E+00 -1.00206172064426E+00 x5 : 1.65565900260799E+00 3.62174951858024E+00 x6 : -1.42211604046533E+00 1.26814754910442E+00 x7 : -4.11233675403618E-01 -2.56826654759426E-01 x8 : -1.22457062910011E+01 7.64777782071832E+00 == err : 1.077E-14 = rco : 5.158E-04 = res : 1.172E-13 == solution 53 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.40202386339369E+00 -2.02546384578712E+00 x2 : -1.65436882863949E+00 -2.15943883291291E+00 x3 : -2.12851479896278E+00 2.20031290401576E+00 x4 : 2.05184647153120E+00 2.08206273515086E+00 x5 : 2.05412340337162E-01 -2.41248718888364E+00 x6 : -1.87186842960293E+00 1.65864305998415E+00 x7 : 9.95469381943151E-01 6.56371168432885E-01 x8 : 4.90109152288936E+00 -3.23157620699087E+00 == err : 7.401E-15 = rco : 5.778E-03 = res : 4.550E-14 == solution 54 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 7.28266057133575E-01 -1.14451414957806E+00 x2 : -4.56136934235313E-01 -1.11155865313099E+00 x3 : -1.30034690799614E+00 1.53824981660552E+00 x4 : 8.57247746941892E-01 8.17101815054367E-02 x5 : -2.62049660027996E-01 -1.00268202683989E-01 x6 : -6.45434621422677E-01 1.63609090637662E-01 x7 : 7.84543196066627E-02 5.72771916644424E-01 x8 : 1.64315636587197E+00 -1.19962014296412E+01 == err : 2.544E-14 = rco : 6.407E-03 = res : 7.324E-15 == solution 55 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.29969462856215E+00 -1.74673471603347E+00 x2 : -4.20773748026273E-01 -3.31929373917350E+00 x3 : -3.38353768926908E+00 -2.53211410631423E+00 x4 : -4.61693651227582E+00 1.30640300980813E+00 x5 : -1.24447235082902E+00 5.39838614687383E+00 x6 : 5.68044722330437E+00 4.57244839996384E+00 x7 : 1.68557844853368E+00 -3.67909499512460E+00 x8 : 7.20468376588420E-01 1.57255902314003E+00 == err : 7.598E-15 = rco : 7.502E-03 = res : 2.623E-14 == solution 56 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.26242193739885E-01 -8.80949696209057E-01 x2 : 6.84766851039934E-01 6.70954697940248E-01 x3 : 1.13659996275851E+00 -1.57144488632821E+00 x4 : -7.84742698629243E-01 1.09325148997073E+00 x5 : 3.30907349288984E+00 -1.25190184527914E+00 x6 : -3.43647190317998E+00 -6.13586232733104E-01 x7 : -2.23546789861895E+00 2.55367647263853E+00 x8 : -1.35852465730005E+00 -1.55190439414930E+00 == err : 4.252E-15 = rco : 3.791E-02 = res : 5.366E-15 == solution 57 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.10232923483155E+00 3.77219856182059E+00 x2 : -6.85329278634064E+00 4.52696695218433E+00 x3 : -9.05474845175679E+00 -8.09165852463592E+00 x4 : 7.45842856856864E+00 -1.19920978913958E+01 x5 : 1.17890209232269E+01 6.01022107632634E+00 x6 : -3.69235087552956E+00 6.86690951437450E+00 x7 : -1.74938661300016E+00 -1.09253968867405E+00 x8 : -2.87863572782532E+00 1.79778658331598E+00 == err : 4.882E-14 = rco : 1.241E-03 = res : 2.099E-13 == solution 58 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.30900663402972E-01 8.80949696209057E-01 x2 : -9.19755701091595E-01 -4.90660881263941E-01 x3 : 3.94673442417123E-01 -3.81947804965646E-02 x4 : -5.68975899878565E-01 5.29931641528690E-02 x5 : 1.58549846241612E-02 -2.82028740882827E-01 x6 : -2.58622538431232E-01 9.86421700170220E-02 x7 : -1.94074951042864E-01 -2.21700627735615E-01 x8 : -1.56482752903326E+01 1.78757353084697E+01 == err : 4.793E-14 = rco : 2.230E-03 = res : 5.467E-15 == solution 59 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.20465846966309E+00 -3.53737464016669E-73 x2 : -4.66632310578776E-01 9.90464899246672E-73 x3 : -8.03456596206655E-01 -2.47616224811668E-73 x4 : 4.34026212153150E-01 -1.37957610966501E-72 x5 : -9.72072018441767E-01 1.06121239205001E-72 x6 : 2.11190028135553E-01 -4.95232449623336E-73 x7 : -6.07713784724591E-01 -1.23808112405834E-73 x8 : -1.15185802526634E+01 1.65359972306943E-72 == err : 9.523E-15 = rco : 1.151E-02 = res : 3.553E-15 == solution 60 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.10232923483154E+00 -2.78729129753649E-01 x2 : 2.22603244673394E-01 1.42213055621695E+00 x3 : 6.18291929397411E-01 2.62969032904711E+00 x4 : -3.00295846715410E-01 -3.61318816677034E-01 x5 : -3.44882007007395E+00 -1.96100801887167E+00 x6 : 4.90913313990975E-01 5.87564109032905E-01 x7 : 3.14978193896038E-01 -2.03832902899461E+00 x8 : 5.18300229175783E-01 3.35409378597256E+00 == err : 4.436E-15 = rco : 1.854E-02 = res : 9.058E-15 == solution 61 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -7.42246399981436E-01 3.28268366607468E-71 x2 : 6.02075090022228E-01 -2.03752779273601E-71 x3 : 7.36634869861379E-01 -9.05567907882671E-72 x4 : 6.99788754004708E-02 1.13195988485334E-71 x5 : -5.55383048045472E-01 1.35835186182401E-71 x6 : -6.83628449696730E-01 1.47154785030934E-71 x7 : -4.27430937560439E-01 -1.13195988485334E-71 x8 : -1.63769146893121E+01 -1.44890865261227E-70 == err : 1.555E-14 = rco : 6.738E-03 = res : 3.553E-15 == solution 62 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.25631450864178E-01 -8.80949696209057E-01 x2 : 5.80275202596967E-01 1.42922913965630E-01 x3 : -1.39143724803458E-02 -9.04963714845271E-01 x4 : -2.34592954474775E+00 1.23892478112758E+00 x5 : 1.30179835264017E+00 2.67220218142479E-01 x6 : -7.00716863028764E-01 -7.16651272314106E-01 x7 : -7.47144225844456E-01 8.53496770132749E-01 x8 : -4.06472827578114E+00 -4.64332365136781E+00 == err : 4.766E-15 = rco : 1.699E-02 = res : 7.119E-15 == solution 63 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -5.44881006250832E-01 -2.02546384578712E+00 x2 : -9.69913074191903E-01 1.78394659173895E+00 x3 : 2.39780453489541E+00 -5.10525969081903E-01 x4 : -4.74509572712671E-01 -2.52319895744740E+00 x5 : -2.15522917066727E+00 7.48198344852689E-01 x6 : 4.65723570859317E-02 2.06539009186894E+00 x7 : 7.00155931841337E-01 4.61653743855839E-01 x8 : 6.96828567360206E+00 -4.59459817903020E+00 == err : 5.891E-15 = rco : 4.446E-03 = res : 2.275E-14 == solution 64 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.31206034840825E-01 8.65785019824411E-01 x2 : -7.80875281985147E-01 2.20760439208593E+00 x3 : -1.22835309328094E+00 -9.21433110771690E-01 x4 : -8.06469247698946E-01 -8.07711688026660E-01 x5 : 6.64340626635413E-01 -1.15785993336426E+00 x6 : 4.31688773993016E-01 -3.31850703822340E-01 x7 : 4.88462187495779E-01 1.45466024074603E-01 x8 : 1.31632748419528E+01 -3.92007673076369E+00 == err : 4.142E-14 = rco : 3.735E-03 = res : 1.845E-14 == SHAR_EOF fi # end of overwriting check if test -f 'extcyc5' then echo shar: will not over-write existing file "'extcyc5'" else cat << "SHAR_EOF" > 'extcyc5' 5 a + b + c + d + e - 1; a*b + b*c + c*d + d*e + e*a - 0.30901699437495 - 0.95105651629515*i; a*b*c + b*c*d + c*d*e + d*e*a + e*a*b + 0.80901699437495 + 0.58778525229247*i; a*b*c*d + b*c*d*e + c*d*e*a + d*e*a*b + e*a*b*c - 0.30901699437495 - 0.95105651629515*i; a*b*c*d*e - 1; TITLE : extended cyclic 5-roots problem, to exploit the symmetry ROOT COUNTS : total degree : 120 5-homogeneous Bezout number : 120 with partition : {a }{b }{c }{d }{e } generalized Bezout number : 106 based on the set structure : {a b c d e } {a c e }{b d e } {a d }{b d e }{c e } {a e }{b e }{c e }{d e } {a }{b }{c }{d }{e } mixed volume : 70 = 14*5 = 7*10 REFERENCES : Jan Verschelde and Karin Gatermann: `Symmetric Newton Polytopes for Solving Sparse Polynomial Systems', Adv. Appl. Math., 16(1): 95-127, 1995. G\"oran Bj\"ork and Ralf Fr\"oberg: `A faster way to count the solutions of inhomogeneous systems of algebraic equations, with applications to cyclic n-roots', J. Symbolic Computation (1991) 12, pp 329--336. NOTE : EXPLOITATION OF SYMMETRY AND CHOICE OF CONSTANTS : By extending the equations of the original system with a random complex constant, we add a fixed point to the symmetry. The two generating elements of the symmetry group are b c d e a e d c b a which are respectively the cyclic permutation and the reading backwards operation. The fifth root of unity w : w = 0.30901699437495 + 0.95105651629515i w^2 = -0.80901699437495 + 0.58778525229247i w^3 = -0.80901699437495 - 0.58778525229247i w^4 = 0.30901699437495 - 0.95105651629515i w^5 = 1.0 Note however that : 1 + w + w^2 + w^3 + w^4 = -1.110223024625157e-16 + 3.330669073875470e-16i. When (w,w^2,w^3,w^4,1) is the vector of the right hand sides, then (w,w,w,w,w) is a solution of all subsystems of a certain type. Therefore, (1,w,w^3,w,1) seems to be a better choice. THE GENERATING SOLUTIONS : 7 5 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 10 the solution for t : a : 3.51566035447901E-02 -8.27261453800970E-01 b : 1.01623041236047E+00 -1.24241632490855E+00 c : -9.20411830092637E-02 2.16579860363359E+00 d : -2.10069650118794E-01 4.96678926154659E-01 e : 2.50723817222800E-01 -5.92799751078729E-01 == err : 3.507E-15 = rco : 7.423E-02 = res : 4.003E-16 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 10 the solution for t : a : 1.16341787215603E+00 3.24099681249188E-01 b : 1.54792244147177E+00 -1.33407662151979E-01 c : -1.84748735988833E+00 1.59225658169080E-01 d : -4.44386084044522E-01 -1.23795062494183E-01 e : 5.80533130305057E-01 -2.26122614772107E-01 == err : 4.843E-15 = rco : 7.975E-02 = res : 4.475E-16 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 10 the solution for t : a : 4.10014793736554E-01 7.50751897540148E-01 b : 1.60100166102993E-01 7.35198384573590E-01 c : -4.08340693440269E-01 -2.85192410929864E+00 d : -6.11528218468393E-02 -2.80820794433095E-01 e : 8.99378555447562E-01 1.64679462161799E+00 == err : 5.729E-15 = rco : 3.872E-02 = res : 8.006E-16 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 10 the solution for t : a : -8.09016994374948E-01 5.87785252292474E-01 b : -5.37688913226986E-01 8.43143304897086E-01 c : 3.11581670732691E+00 -1.47039386691358E+00 d : 1.98921146442162E-01 -2.11361625033512E-01 e : -9.68031946167142E-01 2.50826934757527E-01 == err : 5.436E-15 = rco : 4.732E-02 = res : 9.930E-16 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 10 the solution for t : a : -8.02615012782033E-01 -8.49949264705670E-01 b : -3.65901573839422E-01 -3.87480633537469E-01 c : 3.00459112225004E+00 1.75469990030919E+00 d : 3.11577150774741E-01 1.52965719796006E-01 e : -1.14765168640332E+00 -6.70235721862056E-01 == err : 3.466E-15 = rco : 4.368E-02 = res : 8.473E-16 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 10 the solution for t : a : 8.91931221365206E-01 -4.52171091904345E-01 b : -4.86191902445739E-01 -5.68082696200543E-01 c : 6.97615506804102E-01 1.14101698421537E+00 d : 7.05662168651377E-01 -7.08548448402957E-01 e : -8.09016994374947E-01 5.87785252292474E-01 == err : 2.209E-15 = rco : 1.096E-01 = res : 7.109E-16 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 10 the solution for t : a : -8.09016994374947E-01 5.87785252292475E-01 b : -3.64715822016015E-01 -9.31118880257073E-01 c : 2.05677941924575E-02 -6.95027127677804E-01 d : 1.38032173080495E+00 4.03763838735321E-01 e : 7.72843291393555E-01 6.34596916907081E-01 == err : 9.805E-16 = rco : 2.227E-01 = res : 5.579E-16 == SHAR_EOF fi # end of overwriting check if test -f 'extcyc6' then echo shar: will not over-write existing file "'extcyc6'" else cat << "SHAR_EOF" > 'extcyc6' 6 z0 + z1 + z2 + z3 + z4 + z5 - 1; z0*z1 + z1*z2 + z2*z3 + z3*z4 + z4*z5 + z5*z0 - 1; z0*z1*z2 + z1*z2*z3 + z2*z3*z4 + z3*z4*z5 + z4*z5*z0 + z5*z0*z1 - 1; z0*z1*z2*z3 + z1*z2*z3*z4 + z2*z3*z4*z5 + z3*z4*z5*z0 + z4*z5*z0*z1 + z5*z0*z1*z2 - 1; z0*z1*z2*z3*z4 + z1*z2*z3*z4*z5 + z2*z3*z4*z5*z0 + z3*z4*z5*z0*z1 + z4*z5*z0*z1*z2 + z5*z0*z1*z2*z3 - 1 ; z0*z1*z2*z3*z4*z5 - 1; TITLE : extended cyclic 6-roots problem, to exploit the symmetry ROOT COUNTS : total degree : 6! = 720 mixed volume : 156 REFERENCES : This is the Arnborg's system or Davenport's problem, extended with the constant term to exploit symmetry. For the original problem : G\"oran Bj\"ork and Ralf Fr\"oberg: `A faster way to count the solutions of inhomogeneous systems of algebraic equations, with applications to cyclic n-roots', J. Symbolic Computation (1991) 12, pp 329--336. THE SOLUTIONS : 13 6 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : z0 : -1.09145911498337E-01 -2.82051661977533E-01 z1 : -1.19329529302722E+00 -3.08367868303911E+00 z2 : 6.84847142039119E-01 1.11902672009036E+00 z3 : 6.68044546894126E-01 8.74453630967107E-01 z4 : 5.51668586068374E-01 7.22120404126932E-01 z5 : 3.97880929523935E-01 6.50129589832241E-01 == err : 3.150E-15 = rco : 2.299E-02 = res : 1.404E-15 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : z0 : -3.53129181444054E-01 -4.55887812930893E-01 z1 : -1.06193432801704E+00 -1.37095132239199E+00 z2 : -2.50000000000000E-01 -9.68245836551854E-01 z3 : 1.34883344892200E-01 1.74133649482747E-01 z4 : 2.78018016456890E+00 3.58919715894384E+00 z5 : -2.50000000000000E-01 -9.68245836551854E-01 == err : 5.300E-15 = rco : 2.085E-02 = res : 1.256E-15 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : z0 : 3.21007829191040E-01 -2.54057382351715E+00 z1 : 3.21007829191040E-01 2.54057382351715E+00 z2 : 1.30039852922610E-01 9.91508767813914E-01 z3 : 4.89523178863507E-02 3.87426617400472E-01 z4 : 4.89523178863507E-02 -3.87426617400472E-01 z5 : 1.30039852922610E-01 -9.91508767813914E-01 == err : 4.347E-16 = rco : 6.306E-02 = res : 9.155E-16 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : z0 : 2.66839454551322E-01 -9.63740995026544E-01 z1 : 7.89153930342621E-01 6.14195469068922E-01 z2 : -4.44985611119495E-01 8.95537718857564E-01 z3 : 7.44236290740844E-01 -6.67916419579807E-01 z4 : -4.96471667324206E-01 -8.68052926695327E-01 z5 : 1.41227602808914E-01 9.89977153375192E-01 == err : 8.917E-16 = rco : 1.092E-01 = res : 7.109E-16 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : z0 : 7.44236290740845E-01 6.67916419579807E-01 z1 : -4.96471667324207E-01 8.68052926695327E-01 z2 : 1.41227602808914E-01 -9.89977153375192E-01 z3 : 2.66839454551322E-01 9.63740995026544E-01 z4 : 7.89153930342621E-01 -6.14195469068922E-01 z5 : -4.44985611119495E-01 -8.95537718857564E-01 == err : 6.069E-16 = rco : 1.043E-01 = res : 8.951E-16 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : z0 : -1.30493744993987E+00 1.10325388562335E+00 z1 : 2.47735189059043E+00 -1.20477380171330E+00 z2 : 8.86709471424394E-01 -4.62327063112546E-01 z3 : 3.26450487727244E-01 -1.58757823894198E-01 z4 : -4.46891660260174E-01 3.77822676985343E-01 z5 : -9.38682739542032E-01 3.44782126111355E-01 == err : 6.011E-15 = rco : 6.878E-02 = res : 7.216E-16 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : z0 : -3.81966011250105E-01 6.04048609987806E-92 z1 : 6.85410196624969E+00 8.43750439348047E-91 z2 : 1.45898033750315E-01 -4.45845402610047E-92 z3 : -2.61803398874990E+00 -5.44602556306467E-91 z4 : -3.81966011250105E-01 6.61577049034264E-92 z5 : -2.61803398874990E+00 -3.83522926976385E-91 == err : 4.788E-15 = rco : 1.766E-03 = res : 8.882E-16 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : z0 : 5.00000000000000E-01 -8.66025403784439E-01 z1 : -9.57427107756338E-01 -2.88675134594813E-01 z2 : -9.57427107756338E-01 2.88675134594813E-01 z3 : 5.00000000000000E-01 8.66025403784439E-01 z4 : 9.57427107756338E-01 2.88675134594813E-01 z5 : 9.57427107756338E-01 -2.88675134594813E-01 == err : 4.711E-16 = rco : 1.213E-01 = res : 7.109E-16 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : z0 : 3.26450487727244E-01 1.58757823894198E-01 z1 : 8.86709471424394E-01 4.62327063112546E-01 z2 : 2.47735189059043E+00 1.20477380171330E+00 z3 : -1.30493744993987E+00 -1.10325388562335E+00 z4 : -9.38682739542032E-01 -3.44782126111355E-01 z5 : -4.46891660260174E-01 -3.77822676985343E-01 == err : 5.690E-15 = rco : 5.844E-02 = res : 6.713E-16 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : z0 : 1.00000000000000E+00 3.41829996175611E-86 z1 : 1.00000000000000E+00 -3.01614702507892E-86 z2 : 1.00000000000000E+00 3.61937643009471E-86 z3 : 1.00000000000000E+00 -2.61399408840173E-86 z4 : -3.81966011250105E-01 -3.21722349341752E-86 z5 : -2.61803398874990E+00 4.12206760094120E-86 == err : 4.720E-15 = rco : 3.715E-02 = res : 2.220E-16 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : z0 : 5.51668586068374E-01 -7.22120404126932E-01 z1 : 3.97880929523935E-01 -6.50129589832240E-01 z2 : -1.09145911498336E-01 2.82051661977533E-01 z3 : -1.19329529302722E+00 3.08367868303911E+00 z4 : 6.84847142039118E-01 -1.11902672009036E+00 z5 : 6.68044546894127E-01 -8.74453630967107E-01 == err : 3.182E-15 = rco : 2.489E-02 = res : 1.201E-15 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : z0 : -6.04864265798915E-01 -7.96328587933109E-01 z1 : 1.15709953428924E-01 9.93283044593774E-01 z2 : 9.89154312369991E-01 -1.46880040576826E-01 z3 : -6.04864265798915E-01 7.96328587933109E-01 z4 : 1.15709953428924E-01 -9.93283044593774E-01 z5 : 9.89154312369991E-01 1.46880040576826E-01 == err : 6.660E-16 = rco : 1.458E-01 = res : 8.006E-16 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : z0 : 1.34883344892200E-01 -1.74133649482747E-01 z1 : -2.50000000000000E-01 9.68245836551854E-01 z2 : -1.06193432801704E+00 1.37095132239199E+00 z3 : -3.53129181444054E-01 4.55887812930893E-01 z4 : -2.50000000000000E-01 9.68245836551854E-01 z5 : 2.78018016456890E+00 -3.58919715894384E+00 == err : 5.011E-15 = rco : 1.055E-02 = res : 9.155E-16 == SHAR_EOF fi # end of overwriting check if test -f 'extcyc7' then echo shar: will not over-write existing file "'extcyc7'" else cat << "SHAR_EOF" > 'extcyc7' 7 z0 + z1 + z2 + z3 + z4 + z5 + z6 - 1; z0*z1 + z1*z2 + z2*z3 + z3*z4 + z4*z5 + z5*z6 + z6*z0 - 0.62348980185873 - 0.78183148246803*i; z0*z1*z2 + z1*z2*z3 + z2*z3*z4 + z3*z4*z5 + z4*z5*z6 + z5*z6*z0 + z6*z0*z1 + 0.22252093395631 - 0.97492791218182*i; z0*z1*z2*z3 + z1*z2*z3*z4 + z2*z3*z4*z5 + z3*z4*z5*z6 + z4*z5*z6*z0 + z5*z6*z0*z1 + z6*z0*z1*z2 + 0.90096886790242 - 0.43388373911756*i; z0*z1*z2*z3*z4 + z1*z2*z3*z4*z5 + z2*z3*z4*z5*z6 + z3*z4*z5*z6*z0 + z4*z5*z6*z0*z1 + z5*z6*z0*z1*z2 + z6*z0*z1*z2*z3 + 0.90096886790242 + 0.43388373911756*i; z0*z1*z2*z3*z4*z5 + z1*z2*z3*z4*z5*z6 + z2*z3*z4*z5*z6*z0 + z3*z4*z5*z6*z0*z1 + z4*z5*z6*z0*z1*z2 + z5*z6*z0*z1*z2*z3 + z6*z0*z1*z2*z3*z4 + 0.22252093395631 + 0.97492791218182*i; z0*z1*z2*z3*z4*z5*z6 - 1; TITLE : extended cyclic 7-roots problem, to exploit the symmetry ROOT COUNTS : total degree : 7! = 5040 mixed volume : 924 = 132*7 = 66*14 REFERENCES : This is the modified Arnborg's system or Davenport's problem. Modified to exploit all the symmetry of it. For the original problem: Goeran Bjoerk and Ralf Froeberg: `A faster way to count the solutions of inhomogeneous systems of algebraic equations, with applications to cyclic n-roots', J. Symbolic Computation 12, pp 329--336, 1991. Backelin, J. and Froeberg, R.: "How we proved that there are exactly 924 cyclic 7-roots" , Proceedings of ISSAC-91, pp 103-111, ACM, New York, 1991. SYMMETRY GROUP GENERATORS : z1 z2 z3 z4 z5 z6 z0 z6 z5 z4 z3 z2 z1 z0 CHOICE OF CONSTANTS : The seventh root of unity w : w = 0.62348980185873 + 0.78183148246803*i w^2 = -0.22252093395631 + 0.97492791218182*i w^3 = -0.90096886790242 + 0.43388373911756*i w^4 = -0.90096886790242 - 0.43388373911756*i w^5 = -0.22252093395631 - 0.97492791218182*i w^6 = 0.62348980185873 - 0.78183148246803*i w^7 = 1.0 Note however that : 1 + w + w^2 + w^3 + w^4 + w^5 + w^6 = 0 When (w,w^2,w^3,w^4,1) is the vector of the right hand sides, then (w,w,w,w,w) is a solution of all subsystems of a certain type. Therefore, (1,w,w^3,w^5,w^3,w,1) seems to be a better choice. THE GENERATING SOLUTIONS : 66 7 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 4.67863048025800E-01 -4.36446266485858E-01 z1 : -5.34794460209315E-01 5.30787178057164E-03 z2 : -8.01876299168934E-02 8.90354574461262E-01 z3 : -1.25431127166961E+00 1.29480657724513E+00 z4 : 8.23246503393685E-01 -8.52855597667153E-01 z5 : 4.34623556399096E-02 6.90506938096954E-01 z6 : 1.53472145473642E+00 -1.59167409743090E+00 == err : 4.788E-15 = rco : 7.355E-02 = res : 1.351E-15 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 3.46892002616732E-02 -1.33019733117621E+00 z1 : -3.82845405600500E-01 3.19065670655243E-01 z2 : 5.98849385307387E-01 6.39891306885450E-01 z3 : 4.74826244622835E-01 1.49755297426934E+00 z4 : 2.28152473467675E-01 -1.00386193728648E+00 z5 : 7.74176425899374E-01 6.43619137902656E-01 z6 : -7.27848323958444E-01 -7.66069821250006E-01 == err : 3.495E-15 = rco : 4.768E-02 = res : 6.804E-16 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -1.26401749127306E+00 -4.71182602611984E-01 z1 : 5.07185664997880E-02 3.83572479940344E-01 z2 : 8.50601364596769E-01 -9.25804764466126E-02 z3 : 2.09770941907816E+00 1.55644659263867E+00 z4 : -4.67104244312624E-01 -2.25386687811526E-01 z5 : 1.02122580031828E+00 -2.52695954938842E-01 z6 : -1.28913341490732E+00 -8.98173350770052E-01 == err : 4.923E-15 = rco : 4.827E-02 = res : 9.155E-16 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -5.55242681068925E-01 4.78605308984734E-01 z1 : 6.23489801858739E-01 7.81831482468026E-01 z2 : 1.09826106499869E+00 -8.09185516785669E-01 z3 : 9.30880848229321E-01 -4.82369528438923E-01 z4 : -9.41197210797834E-01 2.27684170346159E-01 z5 : 4.60078160543901E-01 -9.24540986650787E-01 z6 : -6.16269983763892E-01 7.27975070076461E-01 == err : 2.067E-15 = rco : 1.958E-02 = res : 6.684E-16 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -3.81830703565615E-01 1.10460420454320E+00 z1 : 2.42263888049884E+00 9.00465291919754E-01 z2 : -9.78697068017798E-02 -7.34810566647013E-01 z3 : -2.38515672808567E-01 -5.90085930849034E-01 z4 : -4.27920759161000E-01 8.48778073406815E-01 z5 : -4.30488950533236E-01 -1.87945505563447E+00 z6 : 1.53986912371355E-01 3.50503983260745E-01 == err : 5.087E-15 = rco : 3.172E-02 = res : 8.882E-16 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 6.38723091113944E-01 9.45504115998003E-01 z1 : 1.59540826432331E+00 -1.21690869876273E+00 z2 : -7.36781172250304E-01 -1.48070199591316E-01 z3 : -5.23811269011459E-01 -7.88147596248678E-01 z4 : 4.49106320460620E-01 8.85940809400818E-01 z5 : -9.71380604472070E-01 -8.94591511173872E-04 z6 : 5.48735369835961E-01 3.22576160715073E-01 == err : 5.068E-15 = rco : 3.968E-02 = res : 1.295E-15 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 1.10850578699723E+00 1.50089061123433E-01 z1 : 4.34137424726305E-01 -1.81868668949105E+00 z2 : -1.29369155645173E+00 8.76968301120378E-01 z3 : -3.87268155700624E-01 2.33608006773371E-01 z4 : 1.38612641984087E+00 4.09503855466848E-01 z5 : -7.22129478913178E-01 4.36146090350962E-01 z6 : 4.74319559501131E-01 -2.87628625343947E-01 == err : 4.698E-15 = rco : 4.172E-02 = res : 1.734E-15 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 1.05350039860519E+00 -6.55202117516695E-01 z1 : 2.84160313695804E-01 7.08934794853607E-01 z2 : 1.61811322289881E+00 -4.02820294168558E-01 z3 : -4.06439479135850E-01 4.38961134414078E-01 z4 : -1.35118636521717E-01 1.09967198990319E+00 z5 : -1.37215414570243E+00 -5.44002397357613E-01 z6 : -4.20616738398063E-02 -6.45543110128014E-01 == err : 4.905E-15 = rco : 7.836E-02 = res : 1.256E-15 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -5.74860679147443E-01 -2.31718942149937E-01 z1 : 4.90817463785468E-01 8.40991270723348E-01 z2 : -1.00462635877409E+00 -1.14766868410966E+00 z3 : -8.90684747276168E-01 1.48040272783550E-01 z4 : 7.05585015794184E-01 -2.05679470773444E-02 z5 : 2.67086813831974E-01 7.90679529552565E-01 z6 : 2.00668249178607E+00 -3.79755499722519E-01 == err : 4.502E-15 = rco : 1.906E-02 = res : 6.661E-16 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -8.01501557819646E-01 -4.15113043434405E-02 z1 : 1.27210975988947E+00 6.11008632726523E-02 z2 : -6.62537789821261E-01 1.88150016367237E-02 z3 : 5.27453423750090E-01 7.95981927041361E-01 z4 : 9.14615819819112E-01 -2.47630020766892E-01 z5 : 3.83528743357508E-01 9.20874790223254E-01 z6 : -6.33668399175276E-01 -1.50763125706366E+00 == err : 2.788E-15 = rco : 7.965E-02 = res : 7.216E-16 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -2.13258815235692E-01 7.14569350072586E-01 z1 : 5.17508027577857E-01 -7.92601696428050E-01 z2 : -1.00627138749158E+00 2.13549571018691E-01 z3 : 5.71122238950643E-01 -5.76220889216237E-01 z4 : 1.54909958454730E+00 -1.06524427570406E+00 z5 : 2.77004043521328E-01 1.05041073799170E+00 z6 : -6.95203691869856E-01 4.55537202265374E-01 == err : 3.620E-15 = rco : 2.410E-02 = res : 7.022E-16 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -9.66961690810054E-01 8.16887864004266E-01 z1 : -8.06613722593504E-01 -1.24708026664746E+00 z2 : -2.93947075652946E-01 5.65513071470415E-01 z3 : 1.68256462961309E+00 2.72230729173175E-01 z4 : -5.21314631821642E-01 -3.04101726359510E-01 z5 : 1.34675240452565E+00 -2.87811599721737E-01 z6 : 5.59520086739407E-01 1.84361928080848E-01 == err : 2.727E-15 = rco : 2.113E-02 = res : 7.777E-16 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 6.23489801858734E-01 7.81831482468028E-01 z1 : -7.87508457310214E-01 4.50783971674645E-02 z2 : 6.23489801858737E-01 7.81831482468028E-01 z3 : 3.52273754522118E-01 -1.21782562086950E+00 z4 : -7.87508457310214E-01 4.50783971674668E-02 z5 : 3.52273754522109E-01 -1.21782562086952E+00 z6 : 6.23489801858731E-01 7.81831482468032E-01 == err : 4.807E-15 = rco : 3.980E-02 = res : 8.006E-16 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 1.24294792885181E+00 4.21654661065155E-01 z1 : -5.39143813058367E-01 6.49525816982366E-01 z2 : 8.90747234175513E-01 -1.58799502123764E-01 z3 : -1.94203241663141E-01 -1.61977784446423E+00 z4 : -7.13701839266941E-01 7.31712360291996E-01 z5 : -6.31775087966256E-01 -3.76949486060659E-02 z6 : 9.45128818927384E-01 1.33794568545407E-02 == err : 2.196E-15 = rco : 6.397E-02 = res : 8.968E-16 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 5.78317965428931E-01 3.50767072200667E-01 z1 : 2.94179227359358E+00 -1.42548378160504E+00 z2 : -4.70847259813300E-01 -2.87085694245581E-01 z3 : -1.06836844497333E+00 4.52467393784862E-01 z4 : -8.98962153244924E-01 -4.85454556067693E-01 z5 : 4.83666638302028E-01 2.00243767643539E-01 z6 : -5.65599019292986E-01 1.19454579828925E+00 == err : 3.020E-15 = rco : 6.021E-02 = res : 9.930E-16 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 7.35070990383596E-02 1.09273805064784E+00 z1 : 5.79576422622113E-01 -4.33111371432045E-02 z2 : 6.12432236314391E-01 -1.50870352708843E+00 z3 : -6.98399329230505E-01 5.74895665813042E-02 z4 : 6.92638311248353E-01 -1.23665789407859E+00 z5 : 3.70184227248846E-01 1.36637185163905E+00 z6 : -6.29938967241558E-01 2.72073089442036E-01 == err : 5.507E-15 = rco : 3.944E-02 = res : 7.022E-16 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -6.16269983763888E-01 7.27975070076458E-01 z1 : 6.23489801858748E-01 7.81831482468027E-01 z2 : 9.30880848229317E-01 -4.82369528438918E-01 z3 : -5.50506181511654E-01 -4.31041295074381E-01 z4 : 1.38495990530489E+00 -5.58769175473648E-03 z5 : -1.63507003826049E-01 7.03279771287152E-01 z6 : -6.09047386291363E-01 -1.29408780856360E+00 == err : 2.698E-15 = rco : 1.335E-02 = res : 5.237E-16 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -6.06185900122194E-01 9.85792435739806E-02 z1 : -5.06811384137132E-01 1.64426518681742E+00 z2 : 8.74532451148284E-01 2.62464803239072E-01 z3 : 8.61057561480876E-01 -1.17576044626285E+00 z4 : 6.23620298791294E-01 3.31809625481679E-01 z5 : -6.76819838040741E-01 1.99141910517700E-01 z6 : 4.30606810879613E-01 -1.36050032336700E+00 == err : 3.810E-15 = rco : 3.691E-02 = res : 9.930E-16 == solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -5.75816023304665E-01 -1.71949470343037E+00 z1 : -1.91308852691457E-01 2.38704905066217E-01 z2 : 4.66207184356929E-01 1.40303056724897E+00 z3 : 7.38735229667846E-01 -1.63498953108958E-01 z4 : 3.19661978084269E-01 1.88335833233347E+00 z5 : -2.61779593773422E-01 -9.43138498810604E-01 z6 : 5.04300077660500E-01 -6.98961649298726E-01 == err : 2.323E-15 = rco : 9.231E-02 = res : 1.798E-15 == solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 4.77745512393795E-01 -7.11800427292068E-01 z1 : -4.44005255369307E-01 4.79007002021830E-02 z2 : -8.29179970557220E-01 1.15916042605638E+00 z3 : 6.72401280403119E-01 4.69426152212664E-01 z4 : -7.94420881971855E-01 8.44085973212209E-01 z5 : 1.06579873581600E+00 -1.95853425558663E+00 z6 : 8.51660579285468E-01 1.49761431195266E-01 == err : 3.260E-15 = rco : 7.148E-02 = res : 6.280E-16 == solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 6.47209889768618E-01 -2.71000058598525E-01 z1 : 7.29561455012859E-01 -2.11705018415682E+00 z2 : -1.08893972482604E+00 4.18256468290236E-01 z3 : -5.81818282168547E-02 1.15496869289218E+00 z4 : -4.31754982203219E-01 1.21337157918106E-01 z5 : 7.44052482897529E-01 -4.36649710381845E-01 z6 : 4.58052707567111E-01 1.13013763403666E+00 == err : 3.857E-15 = rco : 5.009E-02 = res : 8.882E-16 == solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 4.22028897675802E-01 -7.07268439077348E-01 z1 : 5.84020481793840E-01 -1.17309534030753E+00 z2 : 8.11601168407088E-01 -6.64869852025852E-01 z3 : -1.09086342644784E-01 1.46339185038839E-01 z4 : -2.23803198842245E+00 3.85599585643257E+00 z5 : 8.39761488146389E-01 -9.52078907054601E-01 z6 : 6.89706295044111E-01 -5.05022503006081E-01 == err : 4.538E-15 = rco : 1.258E-02 = res : 1.110E-15 == solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -7.84532737705770E-01 -2.16163710683431E-01 z1 : -7.83635786195115E-01 -7.50745456324567E-01 z2 : -1.07364355527362E+00 -1.10236053932901E-01 z3 : 1.55025192368076E-01 1.12421563072172E-01 z4 : 5.31474350094088E+00 1.94656925306319E+00 z5 : -5.89237414794941E-01 -3.85342667533282E-01 z6 : -1.23871919933950E+00 -5.96502927661182E-01 == err : 4.337E-15 = rco : 1.014E-02 = res : 6.661E-16 == solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -1.31927070735419E-01 9.13131844138841E-01 z1 : -2.15952333564669E-01 8.26014758586175E-01 z2 : -3.51647989085233E-01 8.21720016952399E-01 z3 : 4.78250051263873E-02 -2.46345536954982E-01 z4 : 1.84957035111052E+00 -4.47089321963393E+00 z5 : -1.00839120875165E-01 1.12785280339627E+00 z6 : -9.70288419764263E-02 1.02851933351523E+00 == err : 4.550E-15 = rco : 1.056E-02 = res : 9.155E-16 == solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 1.08033197181971E+00 8.76060801140527E-02 z1 : 9.59763137005627E-01 1.25808260461912E-01 z2 : 8.75055434379027E-01 1.19059076532097E-01 z3 : -2.03776512133031E-01 3.45295791140129E-02 z4 : -3.98281473249811E+00 -1.30072577539723E-01 z5 : 1.10074944356221E+00 -2.00257254252280E-01 z6 : 1.17069125786457E+00 -3.66731644300718E-02 == err : 2.893E-15 = rco : 2.259E-02 = res : 1.986E-15 == solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -5.46180527005271E-02 -1.22763706974964E+00 z1 : -1.61834602640436E-01 -7.09113977064605E-01 z2 : -4.93380559004291E-01 -1.33190342595466E+00 z3 : 2.23227388597881E-02 1.75262485368918E-01 z4 : 2.04809557534881E+00 4.80359220914124E+00 z5 : 1.12833887242863E-01 -9.19640666412560E-01 z6 : -4.73418987106209E-01 -7.90559555328691E-01 == err : 2.745E-15 = rco : 1.121E-02 = res : 9.486E-16 == solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -1.15495095543561E+00 3.74542012621634E-01 z1 : -8.83806021480559E-01 7.66392864383034E-01 z2 : -6.91881189720677E-01 3.76538373960064E-01 z3 : 2.14178283847358E-01 -6.66019690065468E-02 z4 : 5.01108254485358E+00 -2.21485266210044E+00 z5 : -7.52940857557690E-01 5.84425274502945E-01 z6 : -7.41681804506395E-01 1.79556105639304E-01 == err : 5.907E-15 = rco : 1.397E-02 = res : 1.337E-15 == solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 6.23489801858733E-01 7.81831482468030E-01 z1 : 6.23489801858733E-01 7.81831482468029E-01 z2 : 6.23489801858735E-01 7.81831482468029E-01 z3 : -1.80910775475469E-01 -1.52492040374220E-01 z4 : -1.93653823381820E+00 -3.75666537196593E+00 z5 : 6.23489801858734E-01 7.81831482468030E-01 z6 : 6.23489801858734E-01 7.81831482468031E-01 == err : 1.775E-15 = rco : 2.335E-02 = res : 1.490E-15 == solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 7.42360581030826E-01 2.15572102408905E+00 z1 : 3.10893044360025E-01 1.16495387628399E+00 z2 : 1.72058244640168E-01 7.70284957753373E-01 z3 : 6.24079355536530E-02 4.07233556158862E-01 z4 : -1.27377838913827E-01 -3.48259448613686E-01 z5 : -2.61382241235116E-01 -8.86139354558679E-01 z6 : 1.01040274564271E-01 -3.26379461111291E+00 == err : 3.328E-15 = rco : 1.962E-02 = res : 2.533E-15 == solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 2.25727591331644E+00 8.92345088427880E-01 z1 : 1.14406261094357E+00 5.44430128529116E-01 z2 : 7.33654125912246E-01 3.86804068248463E-01 z3 : 3.72526984387254E-01 2.31509679109147E-01 z4 : -3.00532585020673E-01 -5.88747338438658E-02 z5 : -9.43994027450510E-01 -5.29560284338798E-01 z6 : -2.26299302208833E+00 -1.46665394613194E+00 == err : 4.165E-15 = rco : 2.236E-02 = res : 1.024E-15 == solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 2.32115086375199E+00 -1.28671008474272E+00 z1 : 1.25372717889568E+00 -5.27913819122359E-01 z2 : 7.95361098625522E-01 -2.87419952718011E-01 z3 : 4.03789650992859E-01 -1.33460060815518E-01 z4 : -2.25646305586467E-01 1.26305298456633E-01 z5 : -8.08914726731873E-01 4.62468966848685E-01 z6 : -2.73946775994770E+00 1.64672965209329E+00 == err : 4.882E-15 = rco : 2.625E-02 = res : 1.914E-15 == solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 9.69868799737995E-01 -2.18006125476477E+00 z1 : 3.02222494926693E-01 -1.04962255787411E+00 z2 : 7.65319692895014E-02 -8.45600338140982E-01 z3 : 1.42550578965942E-01 -5.28159684689508E-01 z4 : -6.33566349180896E-02 2.42107763016608E-01 z5 : -1.82351490887766E-01 9.46825190639554E-01 z6 : -2.45465717114276E-01 3.41451088181321E+00 == err : 3.735E-15 = rco : 2.276E-02 = res : 1.590E-15 == solution 33 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -7.94802663291713E-01 -1.67541598633899E+00 z1 : -8.68209591527186E-01 -9.39241083189283E-01 z2 : -4.41634749716923E-01 -6.45151144320355E-01 z3 : -4.23571951938178E-01 -3.33754156586703E-01 z4 : 1.32438663257292E-01 2.28249944002999E-01 z5 : 6.23489801858734E-01 7.81831482468030E-01 z6 : 2.77229049135797E+00 2.58348094396430E+00 == err : 4.329E-15 = rco : 2.526E-02 = res : 9.155E-16 == solution 34 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -1.82655141623458E+00 7.16734522462485E-02 z1 : -1.16719760367488E+00 -1.57512948835744E-01 z2 : -9.14094851384861E-01 5.11984924730513E-02 z3 : -4.11222579590838E-01 8.08743402742766E-02 z4 : 2.88717756497342E-01 4.44135713907982E-02 z5 : 1.03649803945942E+00 3.53961549502134E-02 z6 : 3.99385065492840E+00 -1.26043062498843E-01 == err : 3.990E-15 = rco : 3.036E-02 = res : 8.882E-16 == solution 35 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -1.21623588655017E+00 2.01245622516262E+00 z1 : -6.39250771714909E-01 9.94761356782284E-01 z2 : -4.28882900306355E-01 5.97031567094317E-01 z3 : -2.51435846661879E-01 2.80637886484987E-01 z4 : 2.16811318950750E-01 -2.25554136241400E-01 z5 : 7.26629129749011E-01 -7.89804497497309E-01 z6 : 2.59236495653356E+00 -2.86952840178550E+00 == err : 4.841E-15 = rco : 2.493E-02 = res : 1.337E-15 == solution 36 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -1.37931008073561E+00 -8.49145629200446E+00 z1 : -3.54604800900208E-02 -1.06326053384280E-01 z2 : 1.95499291231091E+00 7.31860941685797E+00 z3 : 1.50877287394944E-01 4.25980036079339E-01 z4 : -8.36762721137356E-02 -1.20765178383852E+00 z5 : 3.63406194188864E-01 1.93727391899176E+00 z6 : 2.91704390446400E-02 1.23570757298188E-01 == err : 5.751E-15 = rco : 2.566E-03 = res : 3.202E-15 == solution 37 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 1.14823522299322E+01 -1.14689114851150E+00 z1 : 9.16608259234471E-02 1.57451597339053E-02 z2 : -7.71297657908521E+00 1.72779359541418E+00 z3 : -4.69944391226512E-01 -1.36087247381999E-01 z4 : 7.50827010523433E-01 -1.71450882537869E-01 z5 : -3.03944938634341E+00 -2.89363395041718E-01 z6 : -1.02469709723921E-01 2.53918325001679E-04 == err : 3.637E-14 = rco : 1.858E-03 = res : 5.335E-15 == solution 38 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -5.83385003983611E-01 1.07364666676451E+01 z1 : -2.75849070548782E-02 8.21513752198878E-02 z2 : 2.19514048943661E+00 -9.50886392096554E+00 z3 : 4.22906407360795E-02 -3.24784245462074E-01 z4 : -5.63490730196338E-01 1.16979932378224E+00 z5 : -1.17404387285190E-01 -2.04056201156660E+00 z6 : 5.44338983473294E-02 -1.14207188653016E-01 == err : 5.858E-15 = rco : 1.957E-03 = res : 2.809E-15 == solution 39 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -7.62333945441633E+00 -4.63525349819841E+00 z1 : -1.07714097912325E-01 -4.37018177192465E-02 z2 : 7.07053197655670E+00 3.46984566062804E+00 z3 : 4.65326396790895E-01 2.02151809834683E-01 z4 : -7.90729014616703E-01 -2.39047541696182E-01 z5 : 1.86916542890302E+00 1.18441124191003E+00 z6 : 1.16758764694744E-01 6.15941452410842E-02 == err : 3.404E-15 = rco : 1.874E-03 = res : 1.309E-15 == solution 40 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 6.34419646691814E+00 -6.35048404735868E+00 z1 : 7.04461408670266E-02 -9.78615016323432E-02 z2 : -4.73288853218600E+00 4.99097184892771E+00 z3 : -2.56681129923913E-01 2.96359118623530E-01 z4 : 7.54221834478220E-01 -8.26226417069500E-01 z5 : -1.10469617701046E+00 1.86741911643772E+00 z6 : -7.45986031430107E-02 1.19821882071560E-01 == err : 2.799E-15 = rco : 2.416E-03 = res : 3.361E-15 == solution 41 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 5.53416321863105E+00 7.08215467979429E+00 z1 : 7.02259322960728E-02 8.62961532324321E-02 z2 : -3.91187913824552E+00 -5.83757274951762E+00 z3 : -4.23571951938178E-01 -3.33754156586703E-01 z4 : 6.23489801858734E-01 7.81831482468030E-01 z5 : -7.94802663291712E-01 -1.67541598633899E+00 z6 : -9.76251993104462E-02 -1.03539423051448E-01 == err : 4.573E-15 = rco : 1.900E-03 = res : 1.776E-15 == solution 42 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -7.64011169724659E+00 3.22594120917718E+00 z1 : -9.43561527605506E-02 5.92227354977115E-02 z2 : 6.69691167034164E+00 -2.31225980791917E+00 z3 : 4.38952676862833E-01 -1.40508580935541E-01 z4 : -7.77739371454065E-01 4.40638394036102E-01 z5 : 2.25123189760680E+00 -1.19897715613580E+00 z6 : 1.25110976649938E-01 -7.40567937204814E-02 == err : 5.780E-15 = rco : 2.645E-03 = res : 4.096E-15 == solution 43 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -4.13891092159968E+00 6.01839524713840E+00 z1 : 2.29583722814674E-01 -1.97664346511378E-01 z2 : 1.57526973996041E-01 -3.49869943594115E-01 z3 : 1.49581722428840E+00 -1.54842721889950E+00 z4 : 2.59217552601449E+00 -3.23328602785338E+00 z5 : -7.22883698419373E-02 9.88040507817362E-02 z6 : 7.36095844328017E-01 -7.87951761061763E-01 == err : 5.984E-15 = rco : 5.202E-03 = res : 5.355E-15 == solution 44 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 8.44215252236127E+00 3.37889053892540E+00 z1 : -2.74862636533005E-01 -1.92844369851578E-01 z2 : -2.48697131025830E-01 -1.21953368580537E-01 z3 : -2.71513041815408E+00 -5.99134443926035E-01 z4 : -3.46954950612640E+00 -2.27740917189017E+00 z5 : 9.73877349311911E-02 6.64278200403241E-02 z6 : -8.31300565453142E-01 -2.53977004717410E-01 == err : 5.211E-15 = rco : 2.789E-03 = res : 2.809E-15 == solution 45 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 2.70952068832967E+00 -6.93433378277982E+00 z1 : -1.22362261023688E-02 3.42379325735827E-01 z2 : -9.65196369784528E-02 3.10513299690975E-01 z3 : -2.21758806791608E-01 2.74004886689960E+00 z4 : -1.22273226368323E+00 2.75791642453123E+00 z5 : 2.59207680088901E-02 -1.50559569284040E-01 z6 : -1.82194522782900E-01 9.34035435206237E-01 == err : 5.457E-15 = rco : 3.187E-03 = res : 3.511E-15 == solution 46 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -6.53608319432967E+00 -3.52688560692628E-01 z1 : 3.25326401643580E-01 -6.35502047858643E-02 z2 : 3.60021170151626E-01 5.20731840104803E-02 z3 : 3.06622314032348E+00 -2.36478793390547E-01 z4 : 2.86707366687298E+00 5.47459376857740E-01 z5 : -1.32849851768639E-01 1.98199988863595E-02 z6 : 1.05028866710665E+00 3.33649991144594E-02 == err : 3.435E-15 = rco : 4.518E-03 = res : 1.790E-15 == solution 47 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 3.10077318555285E+00 7.89576130474084E+00 z1 : -8.40821860391077E-02 -2.25804061628294E-01 z2 : 2.59484357613763E-03 -3.59644813308365E-01 z3 : -8.28376349709442E-01 -3.51393127165406E+00 z4 : -1.12514144109802E+00 -2.75756184812832E+00 z5 : 1.71202458145361E-02 1.08631119035800E-01 z6 : -8.28882980969493E-02 -1.14745042905760E+00 == err : 4.597E-15 = rco : 4.046E-03 = res : 1.650E-15 == solution 48 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 7.50024259822409E+00 -3.23528614828260E+00 z1 : -2.17138696385429E-01 1.05261544333782E-01 z2 : -3.97501055691805E-01 2.40287684999973E-01 z3 : -2.55496200157187E+00 5.14346836934741E-01 z4 : -2.65630848475303E+00 1.95950490694689E+00 z5 : 1.27240562050349E-01 -5.05311475062986E-02 z6 : -8.01572921872302E-01 4.66416322573514E-01 == err : 4.844E-15 = rco : 2.817E-03 = res : 2.324E-15 == solution 49 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -3.91187913824552E+00 -5.83757274951761E+00 z1 : 1.32438663257292E-01 2.28249944002999E-01 z2 : 3.11270984741351E-01 2.84373388189967E-01 z3 : 1.17001439634061E+00 2.06317641394376E+00 z4 : 2.77229049135798E+00 2.58348094396430E+00 z5 : -9.76251993104462E-02 -1.03539423051448E-01 z6 : 6.23489801858734E-01 7.81831482468029E-01 == err : 4.893E-15 = rco : 3.592E-03 = res : 2.802E-15 == solution 50 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 8.50851665207130E-02 1.40352782692055E+00 z1 : 2.01605701018787E-02 -1.03624007145795E+00 z2 : 5.18519413161343E-01 1.27548367346265E+00 z3 : 6.63150277855744E-01 2.97728188699021E-03 z4 : -8.73847591736364E-01 -6.06792200559673E-01 z5 : 8.99320215391229E-01 -1.34421835495523E+00 z6 : -3.12388051294543E-01 3.05261844702665E-01 == err : 5.318E-15 = rco : 3.338E-02 = res : 7.109E-16 == solution 51 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 2.11462201566830E+00 1.43460241823758E-01 z1 : -4.20597795950823E-01 3.47561820764584E-01 z2 : 2.08558642560309E+00 -8.03330651593098E-01 z3 : -3.25035393833958E-01 -4.08374163306048E-01 z4 : -1.42476914354590E+00 8.37945336835597E-01 z5 : -1.33026010404358E+00 -2.56266193505825E-01 z6 : 3.00453996102872E-01 1.39003608981032E-01 == err : 5.292E-15 = rco : 4.398E-02 = res : 8.083E-16 == solution 52 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -5.50506181511648E-01 -4.31041295074380E-01 z1 : 6.23489801858736E-01 7.81831482468031E-01 z2 : -6.09047386291353E-01 -1.29408780856359E+00 z3 : -5.55242681068930E-01 4.78605308984744E-01 z4 : 9.50172694473942E-01 2.59534900476816E-01 z5 : 4.28726875405535E-02 1.01434292849407E+00 z6 : 1.09826106499870E+00 -8.09185516785684E-01 == err : 5.290E-15 = rco : 1.040E-02 = res : 8.951E-16 == solution 53 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -2.49704384148864E-01 3.71278177232070E-01 z1 : 1.45259331076867E+00 -1.11760437355114E+00 z2 : -7.36128730803234E-02 4.66035265618767E-01 z3 : 6.26501579711058E-01 2.95500124173979E+00 z4 : 2.51569518349973E-02 -7.37731504903220E-01 z5 : 4.15054048070996E-01 -4.40166261956803E-01 z6 : -1.19598863315653E+00 -1.49681254417947E+00 == err : 5.176E-15 = rco : 3.368E-02 = res : 1.132E-15 == solution 54 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 5.95089267228571E-01 4.16380297629766E-01 z1 : -9.44652374189596E-01 -1.96360099506940E-01 z2 : 6.82507133082846E-01 1.99919204766950E-01 z3 : 1.92440676881714E+00 -1.24038019498083E+00 z4 : -5.77525581491433E-01 2.20841722098335E-01 z5 : -3.50880923713048E-01 -8.72024036632548E-01 z6 : -3.28944289734478E-01 1.47162310662526E+00 == err : 4.947E-15 = rco : 2.067E-02 = res : 6.280E-16 == solution 55 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 1.61119332259871E-01 -5.99233513720669E-01 z1 : -4.93987623493215E-01 1.11477988398373E+00 z2 : -3.17170150296700E-01 -6.31710402463307E-01 z3 : -1.05500650918378E+00 -1.80600891163652E+00 z4 : 1.88787721197165E-01 4.28198738876400E-01 z5 : -2.65160006826006E-01 5.97496330065728E-01 z6 : 2.78141723634267E+00 8.96477874894644E-01 == err : 3.994E-15 = rco : 3.779E-02 = res : 6.680E-16 == solution 56 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -1.09134337625268E+00 -9.00194890586300E-01 z1 : 8.04941115397386E-01 -1.57080350306513E-01 z2 : -1.61038206705506E+00 6.16500054235794E-02 z3 : 2.98687474319621E-02 3.40887813798477E-01 z4 : 1.50129170694199E+00 -2.93828725751230E-01 z5 : 1.71443980351605E+00 1.27554349885528E+00 z6 : -3.48815929979647E-01 -3.26977351433297E-01 == err : 2.908E-15 = rco : 3.916E-02 = res : 9.930E-16 == solution 57 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -3.96254245219613E-02 8.22757319505159E-01 z1 : 5.32408763436041E-01 -6.96061964928411E-01 z2 : -1.03791985506087E+00 4.74205902999320E-01 z3 : 1.19520534101604E+00 2.12894386686205E-01 z4 : -6.15540778016679E-01 -7.56707814351714E-03 z5 : 6.23489801858733E-01 7.81831482468029E-01 z6 : 3.41982151288695E-01 -1.58806004858678E+00 == err : 6.102E-15 = rco : 4.846E-02 = res : 9.486E-16 == solution 58 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -4.69810740137208E-01 -4.82307947659017E-01 z1 : 1.51828852432890E+00 -3.95703563819911E-01 z2 : -3.75199707002580E-02 5.85500243988043E-01 z3 : -4.95471311686349E-01 -1.58110703330191E+00 z4 : -3.05959628719871E-01 6.58524298163079E-01 z5 : 1.59153814769026E-01 1.68999474807055E+00 z6 : 6.31319312145765E-01 -4.74900745440836E-01 == err : 5.151E-15 = rco : 1.841E-02 = res : 9.421E-16 == solution 59 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 3.52273754522113E-01 -1.21782562086951E+00 z1 : 6.23489801858731E-01 7.81831482468028E-01 z2 : -7.87508457310216E-01 4.50783971674661E-02 z3 : 3.52273754522114E-01 -1.21782562086951E+00 z4 : -7.87508457310212E-01 4.50783971674653E-02 z5 : 6.23489801858737E-01 7.81831482468030E-01 z6 : 6.23489801858733E-01 7.81831482468031E-01 == err : 2.245E-15 = rco : 4.327E-02 = res : 1.110E-15 == solution 60 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 1.05705036015054E+00 -5.34822818011864E-01 z1 : -4.31232971060346E-01 1.01762688257698E+00 z2 : -5.77122993940732E-01 -2.06571593358607E-01 z3 : 8.34803501332767E-01 -5.10145626380297E-01 z4 : 2.59219969949732E-01 -1.55862302009499E+00 z5 : -2.20792987649285E-01 1.03465472944064E+00 z6 : 7.80751212173217E-02 7.57881445828149E-01 == err : 4.514E-15 = rco : 5.818E-02 = res : 9.155E-16 == solution 61 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 1.07644496874022E+00 7.45349047311069E-01 z1 : -2.70731895098249E-01 5.35111881111971E-01 z2 : 1.44852145827454E+00 -8.34277443607197E-01 z3 : 8.97870256525968E-01 9.20291960241974E-02 z4 : -1.03284246966771E-01 -6.69561096397303E-01 z5 : -1.48149501945311E+00 -4.41233265123636E-01 z6 : -5.67325522022599E-01 5.72581680680898E-01 == err : 4.251E-15 = rco : 7.118E-02 = res : 4.996E-16 == solution 62 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 7.49538719077001E-01 7.02037759030335E-01 z1 : -3.84859479089472E-01 -5.30781156189028E-01 z2 : 4.20154304543547E-01 -1.02474883185914E+00 z3 : -3.55346590730028E-01 1.37137147282026E+00 z4 : 1.02141198568599E+00 6.26456849215854E-01 z5 : -1.95820014306654E-01 4.48782599379519E-01 z6 : -2.55078925180383E-01 -1.59311869239780E+00 == err : 5.471E-15 = rco : 1.896E-02 = res : 8.006E-16 == solution 63 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -1.37794444679667E-01 7.73005052481766E-01 z1 : 3.77345552247393E-01 -1.46078936155443E+00 z2 : 7.22372950964257E-01 7.58232064904036E-01 z3 : -4.95568514578313E-01 9.31768565728423E-01 z4 : 8.16440101059308E-01 5.81674279314788E-01 z5 : -4.96853036911004E-01 -3.56427342537111E-01 z6 : 2.14057391898025E-01 -1.22746325833747E+00 == err : 3.687E-15 = rco : 9.219E-02 = res : 8.951E-16 == solution 64 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : -9.90908671787996E-01 3.66239764056363E-01 z1 : 4.08351726939132E-01 -8.82192008144182E-01 z2 : -1.04656463000504E+00 6.51131202912576E-01 z3 : -3.91359773193377E-01 3.60231297983222E-01 z4 : 8.15558407212566E-01 4.26912915360504E-01 z5 : 8.66812340311791E-01 -8.34377968026784E-01 z6 : 1.33811060052293E+00 -8.79452041416986E-02 == err : 4.015E-15 = rco : 3.765E-02 = res : 8.882E-16 == solution 65 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 7.07952956937574E-01 -1.40940479922186E-01 z1 : 3.41982151288698E-01 -1.58806004858678E+00 z2 : -5.67221826264204E-01 4.86587738536703E-01 z3 : 6.23489801858734E-01 7.81831482468029E-01 z4 : 1.07537663548917E+00 -7.96271945349232E-01 z5 : -6.15540778016679E-01 -7.56707814351634E-03 z6 : -5.66038941293288E-01 1.26442033099699E+00 == err : 4.750E-15 = rco : 4.252E-02 = res : 5.049E-16 == solution 66 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 14 the solution for t : z0 : 6.23489801858735E-01 7.81831482468030E-01 z1 : 1.19520534101604E+00 2.12894386686208E-01 z2 : 1.07537663548916E+00 -7.96271945349236E-01 z3 : -3.81950554427645E-01 -7.62479263920682E-01 z4 : -9.05273973150130E-01 -7.45319717926181E-01 z5 : -5.67221826264204E-01 4.86587738536703E-01 z6 : -3.96254245219610E-02 8.22757319505158E-01 == err : 3.928E-15 = rco : 1.430E-01 = res : 9.550E-16 == SHAR_EOF fi # end of overwriting check if test -f 'extcyc8' then echo shar: will not over-write existing file "'extcyc8'" else cat << "SHAR_EOF" > 'extcyc8' 8 z0 + z1 + z2 + z3 + z4 + z5 + z6 + z7 + 0.92387953251129 + 0.38268343236509*i; z0*z1 + z1*z2 + z2*z3 + z3*z4 + z4*z5 + z5*z6 + z6*z7 + z7*z0 + 0.70710678118655 + 0.70710678118655*i; z0*z1*z2 + z1*z2*z3 + z2*z3*z4 + z3*z4*z5 + z4*z5*z6 + z5*z6*z7 + z6*z7*z0 + z7*z0*z1 + 0.38268343236509 + 0.92387953251129*i; z0*z1*z2*z3 + z1*z2*z3*z4 + z2*z3*z4*z5 + z3*z4*z5*z6 + z4*z5*z6*z7 + z5*z6*z7*z0 + z6*z7*z0*z1 + z7*z0*z1*z2 + i; z0*z1*z2*z3*z4 + z1*z2*z3*z4*z5 + z2*z3*z4*z5*z6 + z3*z4*z5*z6*z7 + z4*z5*z6*z7*z0 + z5*z6*z7*z0*z1 + z6*z7*z0*z1*z2 + z7*z0*z1*z2*z3 - 0.38268343236509 + 0.92387953251129*i; z0*z1*z2*z3*z4*z5 + z1*z2*z3*z4*z5*z6 + z2*z3*z4*z5*z6*z7 + z3*z4*z5*z6*z7*z0 + z4*z5*z6*z7*z0*z1 + z5*z6*z7*z0*z1*z2 + z6*z7*z0*z1*z2*z3 + z7*z0*z1*z2*z3*z4 - 0.70710678118655 + 0.70710678118655*i; z0*z1*z2*z3*z4*z5*z6 + z1*z2*z3*z4*z5*z6*z7 + z2*z3*z4*z5*z6*z7*z0 + z3*z4*z5*z6*z7*z0*z1 + z4*z5*z6*z7*z0*z1*z2 + z5*z6*z7*z0*z1*z2*z3 + z6*z7*z0*z1*z2*z3*z4 + z7*z0*z1*z2*z3*z4*z5 - 0.92387953251129 + 0.38268343236509*i; z0*z1*z2*z3*z4*z5*z6*z7 - 1; TITLE : extended cyclic 8-roots problem, to exploit the symmetry ROOT COUNTS : total degree : 8! = 40320 bound based on set structure analysis : 20352 with set structure : {z0 z1 z2 z3 z4 z5 z6 z7 } {z0 z2 z4 z6 }{z1 z3 z5 z7 } {z0 z4 }{z1 z5 }{z2 z6 }{z3 z7 } {z0 z4 }{z1 z5 }{z2 z6 }{z3 z7 } {z0 }{z1 }{z2 }{z3 }{z4 }{z5 }{z6 }{z7 } {z0 }{z1 }{z2 }{z3 }{z4 }{z5 }{z6 }{z7 } {z0 }{z1 }{z2 }{z3 }{z4 }{z5 }{z6 }{z7 } {z0 }{z1 }{z2 }{z3 }{z4 }{z5 }{z6 }{z7 } mixed volume : 2560 = 320*8 = 160*16 REFERENCES : For the original problem, see G\"oran Bj\"ork and Ralf Fr\"oberg: `A faster way to count the solutions of inhomogeneous systems of algebraic equations, with applications to cyclic n-roots', J. Symbolic Computation (1991) 12, pp 329--336. G. Bj\"{o}rk and R. Fr\"{o}berg, R.: "Methods to ``divide out'' certain solutions from systems of algebraic equations, applied to find all cyclic 8-roots " , In: Analysis, Algebra and Computers in Math. research, M. Gyllenberg and L.E.Persson eds., Lect. Notes in Applied Math. vol. 564, pp 57-70, Dekker, 1994. NOTE : By extending the equations of the original system with a random complex constant, we add a fixed point to the symmetry. Hereby we can get rid of the infinite components of solutions. The eight root of unity w : w = 0.92387953251129 + 0.38268343236509i w^2 = 0.70710678118655 + 0.70710678118655i w^3 = 0.38268343236509 + 0.92387953251129i w^4 = 0.00000000000000 + 1.00000000000000i w^5 = -0.38268343236509 + 0.92387953251129i w^6 = -0.70710678118655 + 0.70710678118655i w^7 = -0.92387953251129 + 0.38268343236509i w^8 = -1.00000000000000 - 0.00000000000000i THE GENERATING SOLUTIONS : 148 8 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.21355527954639E+00 -5.62196383695722E-01 z1 : 4.73822807672393E-01 1.08707909224005E+00 z2 : 4.09859492996098E-01 3.11904910831826E-01 z3 : -7.37341500600453E-01 -6.65266355954497E-01 z4 : -1.11619443615397E+00 8.92095147896665E-01 z5 : -3.28479188924004E-01 7.29073452080593E-01 z6 : 1.43138897062028E-01 -5.49645698033676E-01 z7 : -9.82240884109775E-01 -1.62572759773033E+00 == err : 4.461E-15 = rco : 2.717E-02 = res : 1.051E-15 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -2.09625390940591E+00 1.36204973767748E-01 z1 : -6.05039523708604E-01 1.13943183536665E+00 z2 : -5.53246121005592E-01 -2.29162046650822E-01 z3 : 3.77872427387363E-01 -1.23352752758783E+00 z4 : -1.38596389384722E+00 -1.57858681501224E+00 z5 : 1.55402578789536E-02 2.58619774889896E-01 z6 : 3.12935081188853E+00 1.29621954770748E+00 z7 : 1.93860418301179E-01 -1.71883174845988E-01 == err : 6.188E-15 = rco : 6.727E-03 = res : 1.910E-15 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -4.82001866585589E-01 5.72222240362301E-01 z1 : -1.94839746200016E+00 4.85380577606446E-01 z2 : 8.48619627588172E-01 2.43991559718298E-01 z3 : 5.26774090828860E-01 4.67547300225154E-01 z4 : -5.40041717127891E-01 -8.62058330790367E-01 z5 : -9.80990157390067E-01 -2.15023998482152E-01 z6 : 9.25288444953325E-01 -2.64141904508015E-01 z7 : 7.26869507222063E-01 -8.10600876496756E-01 == err : 6.578E-15 = rco : 5.205E-02 = res : 8.882E-16 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.59415134404816E-01 9.08602828096533E-01 z1 : -1.80317528831756E+00 1.89720818301966E-01 z2 : -6.12018199175842E-01 -9.91035311460074E-02 z3 : 8.03249296109555E-01 9.63260840480799E-02 z4 : -1.26121657768899E+00 -1.73094120664668E+00 z5 : 2.99414808184192E-01 -4.08312940349293E-01 z6 : 2.42918892887237E-01 6.58388517878981E-01 z7 : 1.56636266989493E+00 2.63599745132781E-03 == err : 5.395E-15 = rco : 4.858E-02 = res : 9.809E-16 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.83417332151497E+00 -1.32651143649686E+00 z1 : -1.24015319796886E-01 -6.25840697546107E-01 z2 : -2.59138560276486E-01 1.02839217486418E+00 z3 : -7.00718315776539E-01 7.31558835180285E-01 z4 : 8.64734057090393E-01 -5.34125891459485E-01 z5 : 2.82337564745444E-01 -9.59873195627015E-01 z6 : 2.97501638180116E-01 7.80199967625674E-01 z7 : 5.49592724837643E-01 5.23516811094244E-01 == err : 6.935E-15 = rco : 6.708E-02 = res : 6.753E-16 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -3.35019323389873E-01 -7.66526698230056E-02 z1 : -8.99966371421005E-01 -1.63021631062179E+00 z2 : 3.09423431694109E-01 -1.67400953174268E+00 z3 : 7.04483914289033E-01 6.20529625018267E-02 z4 : 1.15600837411968E+00 1.36046947512253E+00 z5 : 2.95863561040174E-01 9.05042085666434E-02 z6 : -1.46801594205263E+00 3.99934533598319E-02 z7 : -6.86657176790782E-01 1.44517498027156E+00 == err : 4.558E-15 = rco : 1.058E-02 = res : 2.220E-15 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 9.05200128718934E-01 3.74946169977254E-01 z1 : 3.78424759522914E-01 -9.42694769875002E-01 z2 : 1.97485884617231E+00 9.98193174639399E-02 z3 : -9.67435226619622E-02 1.88220857445683E-01 z4 : -5.21832383556062E+00 -2.16150050554400E+00 z5 : 6.46842437504406E-02 -2.01500245570737E-01 z6 : 1.46701899828685E+00 1.32585316574252E+00 z7 : -3.98999150740164E-01 9.34172577995247E-01 == err : 8.371E-15 = rco : 1.495E-03 = res : 1.377E-15 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.31510593964512E+00 2.54946331861761E+00 z1 : 3.79526715985146E-01 -9.36901657380798E-01 z2 : -1.06710028576805E-01 3.24186843558678E-01 z3 : 3.61384905193896E+00 -1.24877090205454E+01 z4 : -4.29234763991527E-02 8.80035944355492E-02 z5 : -4.36734192698435E-01 1.02296565719034E+00 z6 : -3.05139532991410E+00 9.12239191563622E+00 z7 : 3.56136667982302E-02 -6.50840838772979E-02 == err : 1.041E-14 = rco : 8.516E-04 = res : 9.486E-15 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 7.05605658666700E-01 -2.55473159794266E-03 z1 : 1.88610943331281E+00 4.65305197379142E-03 z2 : -1.06254192249152E+00 -1.03648181878059E+00 z3 : 4.94740113627585E-01 -4.53782272028117E-01 z4 : -2.23810020593693E+00 2.87527459446231E-01 z5 : -7.14546886216816E-01 -1.29291107153570E-01 z6 : -4.83020998876768E-01 5.09520714173006E-01 z7 : 4.87875275403646E-01 4.37725271602105E-01 == err : 3.888E-15 = rco : 1.223E-02 = res : 1.110E-15 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 4.44508839804885E-01 8.86584022661094E-01 z1 : 6.22490277543582E-01 5.63574459467975E-01 z2 : -1.96378794064522E+00 -9.48435333489196E-01 z3 : 1.13863845527470E+00 -8.41021006102860E-02 z4 : 3.78471523538576E-02 -3.68770294019718E-01 z5 : -6.81403290764305E-01 7.65837795779483E-01 z6 : -3.38465278306243E-01 -1.84754996370141E+00 z7 : -1.83707747772547E-01 6.50177981546968E-01 == err : 4.143E-15 = rco : 1.325E-02 = res : 1.093E-15 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -7.44252804265128E-01 5.26976437447728E-01 z1 : -3.56956170742695E+00 -3.92143840815272E+00 z2 : 1.12249969013464E+00 -1.12110134390029E-01 z3 : 2.81985210131412E-01 -7.62654538157268E-02 z4 : -4.27073798008059E-01 6.95535015113467E-01 z5 : 1.96580524884398E+00 2.48906361088837E+00 z6 : 7.59703547231408E-01 7.02639672807208E-02 z7 : -3.12984919152593E-01 -5.47084667368950E-02 == err : 4.596E-15 = rco : 4.572E-03 = res : 2.701E-15 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 8.34407337483146E-01 1.97316680423825E+00 z1 : -2.62469378785635E+00 -4.20545683807688E+00 z2 : -3.93429543999337E-01 -1.02285001027093E+00 z3 : -5.24941528677955E-02 -2.27097920437805E-01 z4 : 1.61018545808413E-01 3.95599453605331E-01 z5 : 2.70997112206844E-01 6.56749644815579E-01 z6 : 3.72451727099868E-01 8.74675932260112E-01 z7 : 5.07863229613924E-01 1.17252950150125E+00 == err : 3.962E-15 = rco : 1.017E-02 = res : 2.589E-15 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -8.89497214506059E-01 -1.34294603391245E+00 z1 : 2.39013576484653E+00 -1.76182117016406E+00 z2 : 2.30800746566763E-01 1.15926719464805E+00 z3 : 1.55293585470615E-01 2.62226041662300E-01 z4 : -7.91165310865463E-01 -6.57783633202932E-01 z5 : -1.90039843232610E+00 1.45396434534983E+00 z6 : -1.60001016276500E-01 7.92945924491888E-01 z7 : 4.09523445789190E-02 -2.88536101237717E-01 == err : 5.367E-15 = rco : 4.393E-03 = res : 3.204E-15 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -6.50808127403157E-01 -3.59091396084486E-01 z1 : -1.95835737308899E+00 -2.60953315478470E+00 z2 : 2.68568791220615E-01 3.89967484875965E-01 z3 : -1.35889128973602E+00 -4.08168340185687E-01 z4 : 1.75796080897597E+00 2.07401996859626E+00 z5 : 5.68297597882556E-01 4.54085095600558E-01 z6 : 5.50976076535945E-01 4.86021995739107E-01 z7 : -1.01626016898212E-01 -4.09985086122104E-01 == err : 4.474E-15 = rco : 1.191E-02 = res : 1.907E-15 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.44273860089635E+00 -5.12077476835482E+00 z1 : -1.93843732929395E-01 -4.15742827550779E-01 z2 : 3.29037176468037E-01 2.01944319382102E+00 z3 : -2.33102002603208E-01 -3.66280981959400E-01 z4 : -9.83848431173564E-02 9.19327505457801E-01 z5 : 3.42841235854187E-01 2.89330453270796E-01 z6 : -9.50303610847514E-02 1.98331993970697E+00 z7 : 4.67341595797549E-01 3.08694053243318E-01 == err : 6.460E-15 = rco : 7.225E-03 = res : 1.420E-15 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 9.71742766999438E-01 3.67811951281236E-02 z1 : 9.85442439225874E-01 5.29166719639663E-02 z2 : -6.50028076168375E+00 -4.10226470375960E-01 z3 : -1.92938311454955E-01 1.43470241843881E-02 z4 : 9.56835670663782E-01 -5.57117779239724E-02 z5 : 9.47562442609228E-01 -3.14075202550324E-02 z6 : 9.49235490844779E-01 -6.20428347607816E-03 z7 : 9.58520730284312E-01 1.68217283894751E-02 == err : 2.329E-15 = rco : 7.419E-03 = res : 1.780E-15 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.33522236588766E+00 -1.46961559137093E+00 z1 : 5.48740069879301E-01 1.12180753158679E-01 z2 : -4.64110481180607E+00 2.60076431545926E+00 z3 : -4.31042790635714E-01 1.56906354545936E-01 z4 : 1.66062639531489E+00 -1.19529755782884E+00 z5 : -4.23827772912052E-01 9.41717594142673E-02 z6 : 5.80494123506266E-01 -7.19631302974780E-01 z7 : 4.47012888254430E-01 3.78378372313152E-02 == err : 4.634E-15 = rco : 5.521E-03 = res : 2.264E-15 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -3.73834901959281E-01 2.13827546263811E-01 z1 : -1.18731028754556E+00 -1.10548062191241E+00 z2 : 1.43249320657703E+00 1.33448134513876E+00 z3 : 3.88859189523324E-01 2.88144008536745E-01 z4 : -9.45456889754248E-01 1.36072678118363E+00 z5 : 5.86156753871120E-01 -3.74292679939915E-01 z6 : 3.66841687272808E-01 -5.66596023517114E-01 z7 : -1.19162829049648E+00 -1.53349378811860E+00 == err : 6.504E-15 = rco : 5.354E-03 = res : 6.894E-16 == solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.37379621131294E+00 -2.08981390521880E+00 z1 : 1.59333548876969E-01 1.71102396512928E+00 z2 : -1.74317991228803E-01 1.06849375991117E+00 z3 : 5.45306587156653E-02 3.32197434173392E-01 z4 : 2.93486958715821E-01 -9.09191461731550E-01 z5 : -1.16239234078152E-01 1.29479740097665E+00 z6 : 5.25255628762122E-02 -3.50311677281271E-01 z7 : 1.80597174923943E-01 -1.43987894832396E+00 == err : 6.719E-15 = rco : 2.045E-02 = res : 8.006E-16 == solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.98525471429520E+00 -8.05224541082913E-01 z1 : -4.82964582412293E+00 1.11776827226007E+00 z2 : -1.00146087688036E+00 4.45067479918239E-01 z3 : -1.97701451000396E-01 1.23463508069473E-01 z4 : 3.93588361915948E-01 -1.65873750640097E-01 z5 : 6.56016023114384E-01 -2.72768231667521E-01 z6 : 8.81852424938749E-01 -3.55126141144832E-01 z7 : 1.18821709522812E+00 -4.69990028077508E-01 == err : 3.981E-15 = rco : 1.018E-02 = res : 2.011E-15 == solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.30645022098603E-01 -1.39442640405618E+00 z1 : -2.42052141811398E-01 6.01407655358022E-01 z2 : -1.65185058193620E+00 2.88264643194041E-01 z3 : 3.56003650724020E-01 9.86724326578086E-01 z4 : 9.23714905605907E-01 -1.43935472572618E-01 z5 : 7.16679057798377E-01 7.60471460528328E-02 z6 : -1.20862533820354E+00 -2.97996273895389E-02 z7 : 5.16058932129444E-02 -7.66965699529731E-01 == err : 3.750E-15 = rco : 4.144E-02 = res : 1.201E-15 == solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.95654646888884E+00 6.93048518597209E-02 z1 : -1.62124799992061E+00 -5.78623114714320E-02 z2 : -1.13142286251995E-01 -4.15540102187238E-01 z3 : -1.92695230134991E+00 2.41735411622311E-01 z4 : -1.41247645729765E-01 6.60040135114801E-01 z5 : 1.49810523366564E-01 6.79140307634565E-01 z6 : 2.93640156252321E-01 -1.63071811238186E+00 z7 : 4.78713552233255E-01 7.12163874440404E-02 == err : 5.634E-15 = rco : 5.240E-03 = res : 9.710E-16 == solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.82698543148161E-01 1.18757509765510E+00 z1 : -1.56861731153558E+00 -2.81137180687095E+00 z2 : 4.73960835271327E-01 -7.81787688983536E-01 z3 : -2.38900998378805E-01 -2.93998467706814E-01 z4 : -1.66408415795848E-01 7.40391216860095E-01 z5 : -8.62648898148806E-01 1.90422056345815E+00 z6 : 9.41409029454844E-01 -6.06249839274289E-01 z7 : 3.14627683473413E-01 2.78537492497160E-01 == err : 5.434E-15 = rco : 9.601E-03 = res : 8.882E-16 == solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.69490233724398E+00 1.76806335979562E-02 z1 : 3.18313415224568E+00 3.06565840090345E-01 z2 : 6.71130834191590E-01 4.65867442031941E-01 z3 : 9.85046204444561E-02 -1.93107915132497E-01 z4 : -9.54112889137682E-01 -6.84617717220502E-03 z5 : -2.73701747786525E+00 -2.12305215452114E+00 z6 : 6.11111621366862E-01 8.72317009485812E-01 z7 : -1.01728056512968E-01 2.77891889254699E-01 == err : 3.629E-15 = rco : 4.616E-03 = res : 3.281E-15 == solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -2.48178987329223E+00 -1.00347567372666E+00 z1 : 4.84877369820394E-01 1.19389540424969E+00 z2 : -3.21798049925881E-01 5.73492034265935E-01 z3 : 6.61914280936159E-01 5.83267027384403E-01 z4 : 3.47673495343868E-01 -3.69500280454857E-01 z5 : 9.46139864146084E-01 -1.27727419366738E+00 z6 : -4.80182268671816E-01 6.66694864619409E-01 z7 : -8.07143508678720E-02 -7.49782615035625E-01 == err : 5.533E-15 = rco : 3.713E-02 = res : 1.093E-15 == solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.09167294987763E+00 -8.73931742056041E-01 z1 : -9.46739607333188E-01 4.61828583035908E-01 z2 : -5.59228267197804E-01 -4.91682725670844E-01 z3 : -3.16312491494418E-01 7.95320223248978E-01 z4 : 6.59914182093612E-01 4.06782042589584E-01 z5 : 5.40572865386157E-01 9.33105549764611E-01 z6 : -1.85647651626411E+00 -1.29307930778261E+00 z7 : 4.62717352420837E-01 -3.21026055494680E-01 == err : 7.052E-15 = rco : 1.192E-02 = res : 7.948E-16 == solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -6.70747647472565E-01 7.54117810533197E-01 z1 : 7.93618881960574E-01 -2.87538149735171E-01 z2 : 7.01908192253481E-01 4.04588420871958E-01 z3 : -1.56996046213914E+00 -1.22168610139219E+00 z4 : 7.07516717111292E-01 4.89060266134245E-01 z5 : -6.47210374142266E-01 -3.85302471066844E-01 z6 : -1.01349604333686E+00 4.92841642883653E-01 z7 : 7.74491203254194E-01 -6.28764850593934E-01 == err : 3.116E-15 = rco : 5.741E-02 = res : 1.110E-15 == solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.67003131157210E+00 -5.32518257516816E-01 z1 : 5.85931699426344E-01 2.53288129119937E-01 z2 : 5.34559748860723E-01 9.49638323677272E-01 z3 : -5.36467736183927E-01 1.00953159104027E+00 z4 : 3.29040168268946E-01 -5.85651505839024E-01 z5 : 1.00042697310113E+00 -3.97318100952051E-01 z6 : -5.58177196097143E-01 -1.36504345922577E+00 z7 : -6.09161878315256E-01 2.85389847331089E-01 == err : 4.593E-15 = rco : 3.344E-02 = res : 7.109E-16 == solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 4.51055370223728E-01 5.88461445690594E-01 z1 : -1.02936732726334E+00 -1.82056092058215E+00 z2 : 3.84950441404361E-01 -7.25884726684891E-01 z3 : -6.56093656764242E-01 9.04761672168341E-01 z4 : 5.07806277421849E-01 -5.03887270346086E-01 z5 : -3.33649127379986E-01 9.11632524220908E-01 z6 : 3.81051653123793E-01 9.84597083837608E-01 z7 : -6.29633163277455E-01 -7.21803240669413E-01 == err : 1.104E-15 = rco : 5.605E-02 = res : 1.352E-15 == solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.97399221574913E+00 -2.46267162197576E-01 z1 : 7.82411258500945E-01 2.10236826524709E-01 z2 : 3.57853117584436E-01 7.64493468639581E-01 z3 : 5.89516076488014E-02 -1.00753202763435E+00 z4 : 1.03044092163652E-01 9.92251871417087E-01 z5 : -3.68158257215078E-01 -1.06514159268338E+00 z6 : -7.30096834509578E-01 -1.85196854310980E-01 z7 : 8.46107699064660E-01 1.54472037879817E-01 == err : 2.917E-15 = rco : 7.775E-02 = res : 5.551E-16 == solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -3.10459789320367E+00 -2.67893625639486E-01 z1 : 5.21439308791835E-01 -1.42544672671590E+00 z2 : 6.63583487625710E-01 -1.07846199706055E-02 z3 : 1.34953177362407E+00 -6.42514824278705E-01 z4 : 1.91894210721004E-01 -3.92489824475135E-01 z5 : -3.03913438852002E-01 2.92181372297960E-01 z6 : 1.78741425550686E-01 1.25015031658556E+00 z7 : -4.20558406768920E-01 8.14114499831232E-01 == err : 4.845E-15 = rco : 3.029E-02 = res : 1.066E-15 == solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -6.41156674118870E+00 3.47818254925419E+00 z1 : -4.62635849959142E-01 5.79921303929672E-01 z2 : -7.32984369217769E-01 7.22867713115294E-01 z3 : 1.17694483946261E-01 -1.39578374660232E-01 z4 : 4.67756654337458E-01 -4.77293347780159E-01 z5 : 5.36834904384880E+00 -3.87470450718915E+00 z6 : -9.74648569674412E-02 1.62142142656903E-01 z7 : 8.26972102689244E-01 -8.34220911691602E-01 == err : 1.398E-14 = rco : 5.838E-04 = res : 1.770E-15 == solution 33 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -5.76126588672520E+00 2.04126637804614E+00 z1 : 3.05416309806155E-01 -3.13603777572867E-01 z2 : -1.68128389387634E-01 4.52080606677225E-01 z3 : 4.39286478296418E+00 -2.38573955077541E+00 z4 : 2.55977639967535E-01 -3.71281456356948E-01 z5 : 7.76076672164029E-01 -6.44648264965527E-01 z6 : -5.36801561108157E-01 3.34449871202627E-01 z7 : -1.88019100192197E-01 5.04792761379668E-01 == err : 9.232E-15 = rco : 1.287E-02 = res : 1.601E-15 == solution 34 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -2.52715534844934E-01 -1.04678201955142E-01 z1 : 3.91029405452166E+00 1.61969683024976E+00 z2 : 7.45425684406573E-02 3.08765428222448E-02 z3 : -4.48256153122560E+00 -1.85673778040556E+00 z4 : -1.74892804936671E-01 -7.24429717662412E-02 z5 : -4.77475924745269E+00 -1.97777003736126E+00 z6 : -3.73783756046757E-01 -1.54826301149322E-01 z7 : 5.14999671903304E+00 2.13319848720044E+00 == err : 1.960E-14 = rco : 1.149E-04 = res : 3.233E-15 == solution 35 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -3.49434812045930E-01 -3.30912768340917E+00 z1 : -2.03539353260678E-02 -9.06930676307337E-01 z2 : 2.63348246599132E-01 -3.28905817717552E-01 z3 : 1.03951796907956E-02 5.49324777188450E-01 z4 : 1.88951926768102E-01 8.09949261344618E-01 z5 : -5.28196103721197E-01 2.74810767886698E+00 z6 : -4.35316581560627E-01 -6.93853319958612E-01 z7 : -5.32734529154979E-02 7.48752347627536E-01 == err : 2.915E-15 = rco : 4.825E-02 = res : 9.550E-16 == solution 36 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.05472081329410E+00 -7.27879308866425E-01 z1 : 3.30730001184704E+00 3.76707355384221E+00 z2 : 1.17452027018205E-01 1.05084160423814E-01 z3 : -6.61910922192477E-01 -9.71864751072403E-01 z4 : -7.84028601534485E-01 -4.30852908770736E-01 z5 : -4.49672686166281E-01 -9.00845567758252E-01 z6 : -9.83867415050234E-01 -4.78536806755770E-01 z7 : -4.14431133138960E-01 -7.44861803407526E-01 == err : 2.664E-15 = rco : 5.771E-03 = res : 1.897E-15 == solution 37 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -3.22998636797728E+00 4.60450810981491E-01 z1 : -7.14106801375176E-01 -2.06274878901006E-01 z2 : -3.61763680275994E-01 2.18042788888586E-01 z3 : 7.33268368983067E-01 4.59294709971837E-02 z4 : 7.22933735529677E-01 8.07604348598844E-02 z5 : 2.70961959319782E+00 -2.23487575023626E-01 z6 : -1.24949984707863E+00 -6.72262644656717E-01 z7 : 4.65655466485229E-01 -8.58418395108869E-02 == err : 4.390E-15 = rco : 1.228E-02 = res : 8.671E-16 == solution 38 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 5.07507844882749E-01 -6.24869855009607E-01 z1 : -8.86565548258257E-01 -1.75585995618244E+00 z2 : -5.44363987938461E-01 -1.93801008700961E-01 z3 : -1.81369188019906E+00 5.23488999947570E-01 z4 : 1.95631048309101E-02 9.06097017444371E-01 z5 : 1.76359259610146E-01 8.74520504183302E-01 z6 : 7.13659826742294E-01 2.14502781741988E-01 z7 : 9.03651847818384E-01 -3.26761915789312E-01 == err : 4.996E-15 = rco : 1.770E-02 = res : 1.110E-15 == solution 39 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 5.60542074367460E-01 4.52995169039777E-01 z1 : 5.51387324927640E-01 7.54942822346417E-01 z2 : 9.49452058039215E-01 -4.45986866930972E-01 z3 : -9.64200864015206E-01 -1.37186863197286E+00 z4 : 2.54102720485592E-01 -5.96416142236726E-01 z5 : -8.93628385119513E-01 1.07838834722789E+00 z6 : -5.05835770034894E-01 5.78817524115018E-01 z7 : -8.75698691161585E-01 -8.33555653953635E-01 == err : 1.040E-15 = rco : 2.985E-02 = res : 1.373E-15 == solution 40 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -3.79727076954149E-01 9.11381002434966E-01 z1 : -2.32412466829940E+00 3.83938418307219E+00 z2 : 4.31491681528710E-01 -1.92977534445482E+00 z3 : 3.54033083465799E-01 -1.36088295788449E+00 z4 : 4.38950383090448E-01 -1.02069910810966E+00 z5 : 3.84722970972274E-01 -6.77540615553017E-01 z6 : 2.24730065539109E-01 -3.59155192824521E-01 z7 : -5.39559718540843E-02 2.14604600954258E-01 == err : 4.327E-15 = rco : 1.210E-02 = res : 3.580E-15 == solution 41 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -9.16573857296183E-01 -9.90690852283734E-01 z1 : -3.02698945646828E+00 -2.49101596267645E+00 z2 : 2.16944432684905E+00 2.27424976056241E+00 z3 : 9.09337471658531E-01 9.14054136006794E-01 z4 : 4.97372425317597E-01 4.92243356933396E-01 z5 : 1.96088628914981E-01 1.83931767032905E-01 z6 : -2.10914626043655E-01 -2.59631724969391E-01 z7 : -5.41644445443336E-01 -5.05823912971025E-01 == err : 5.047E-15 = rco : 2.032E-02 = res : 2.125E-15 == solution 42 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -2.07421585394232E+00 -6.99310878750703E+00 z1 : -5.12568200109321E-03 1.17464084532842E+00 z2 : 4.57337472997583E-02 -1.83569869877867E-01 z3 : 1.05616618055428E+00 6.53582584480935E+00 z4 : -6.74346060343154E-03 6.68251265057728E-01 z5 : -1.54742475225944E-02 1.81919382935899E-01 z6 : -7.15355613299246E-03 -1.02944287982227E+00 z7 : 8.29333398371045E-02 -7.37199233289327E-01 == err : 1.087E-14 = rco : 5.427E-04 = res : 2.701E-15 == solution 43 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 3.75936095951934E-01 -9.12951278180782E-01 z1 : 1.07145027815328E+00 -4.35825890470816E+00 z2 : -1.05944653819607E+00 1.66966792626514E+00 z3 : -7.11950373838283E-01 1.21262876200438E+00 z4 : -4.11358468407710E-01 1.03212805338309E+00 z5 : -2.07053342134116E-01 7.51133785439576E-01 z6 : -9.50529190653799E-02 4.12869225623782E-01 z7 : 1.13595735025056E-01 -1.89901002192123E-01 == err : 4.005E-15 = rco : 1.244E-02 = res : 4.311E-15 == solution 44 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 8.94027084928530E-01 1.94002275529280E-01 z1 : -1.21683265073455E+00 -1.85525019145563E+00 z2 : 3.31220634546322E-01 -5.30414326623530E-01 z3 : -1.11315620820335E+00 4.30133129890258E-01 z4 : -7.92624059486096E-01 -3.24593898676652E-01 z5 : -3.50879329801593E-02 7.99921904451938E-01 z6 : 1.03884700880188E-01 1.04597545252443E+00 z7 : 9.04688898537830E-01 -1.42457778005182E-01 == err : 4.541E-15 = rco : 2.793E-02 = res : 7.022E-16 == solution 45 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 8.78988644607094E-01 3.64089017768203E-01 z1 : 1.17292133077994E+00 4.85839922805751E-01 z2 : 1.94484250421436E+00 8.05580141925243E-01 z3 : -4.84199605594433E+00 -2.00562043532918E+00 z4 : -8.87352428144676E-01 -3.67553410342222E-01 z5 : -2.39817170881151E-01 -9.93355246689190E-02 z6 : 3.90314805152787E-01 1.61673685889297E-01 z7 : 6.58218837704682E-01 2.72643169586734E-01 == err : 4.186E-15 = rco : 1.099E-02 = res : 2.095E-15 == solution 46 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -8.71062947522010E-01 3.58061796258807E-01 z1 : -1.26919141434430E+00 6.14604732204594E-01 z2 : -2.35390611985177E+00 4.68271578871717E-01 z3 : 3.65249399244674E+00 -1.93166156585247E+00 z4 : 8.85279400924431E-01 -3.69824791169071E-01 z5 : 1.94753208789741E-01 -6.00911369824437E-02 z6 : -4.04926692298996E-01 2.60387023515763E-01 z7 : -7.57318960655127E-01 2.77568930788010E-01 == err : 5.813E-15 = rco : 1.032E-02 = res : 2.695E-15 == solution 47 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -9.89328134358382E-01 -4.09793130888514E-01 z1 : -1.15073166931973E+00 -4.76648664084462E-01 z2 : -2.43975164383053E+00 -1.01057821969666E+00 z3 : 3.73999243622831E+00 1.54915559025856E+00 z4 : 8.79640351047434E-01 3.64358963414478E-01 z5 : 1.80815645376861E-01 7.48962926043399E-02 z6 : -4.93367138413767E-01 -2.04359359960187E-01 z7 : -6.51149379241486E-01 -2.69714904012646E-01 == err : 6.076E-15 = rco : 1.198E-02 = res : 3.722E-15 == solution 48 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -3.62746592814717E-01 -8.69122441251594E-01 z1 : -4.62862681815390E-01 -1.33204502959781E+00 z2 : -1.33334497076658E+00 -1.99558098848082E+00 z3 : 1.21681227813052E+00 3.94859426247392E+00 z4 : 3.64481449951880E-01 8.87492685324979E-01 z5 : 9.52204641435697E-02 1.80202165042561E-01 z6 : -1.02204979947082E-01 -4.70447840069035E-01 z7 : -3.39234499393487E-01 -7.31776245807290E-01 == err : 6.427E-15 = rco : 9.488E-03 = res : 5.455E-15 == solution 49 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -2.22707228090902E+00 -3.98381986618843E-01 z1 : 1.04204800064135E+00 -2.77562522961362E-01 z2 : 7.54268133939577E-01 1.78991452379556E-01 z3 : 3.38709615364436E-01 -7.86043030783867E-01 z4 : -7.43106289480908E-01 -4.77619104526304E-02 z5 : -3.42883873552721E-01 -9.96008119173653E-01 z6 : 1.53966284594388E-01 1.38989240679839E+00 z7 : 1.00190876891604E-01 5.54190278447318E-01 == err : 2.851E-15 = rco : 1.092E-02 = res : 1.247E-15 == solution 50 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -9.64258958670954E-01 -1.50021138172976E+00 z1 : 1.97697330906070E+00 1.21266292435897E+00 z2 : 2.82067815205021E-01 2.88977213569493E-01 z3 : -8.45846359508960E-01 1.94216339415718E+00 z4 : 5.18932451878760E-01 -2.05163426376583E-01 z5 : 1.98786497104525E-01 -5.48517287429449E-01 z6 : -1.75729291137946E+00 -1.69624505448530E+00 z7 : -3.33241376200922E-01 1.23650185570356E-01 == err : 7.439E-15 = rco : 3.658E-03 = res : 1.151E-15 == solution 51 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -4.59963510595498E+00 -1.70115375164371E+00 z1 : -4.16071980644042E-01 1.15434317325983E-01 z2 : -1.08985577167895E+00 -6.58382807725458E-01 z3 : 7.39936291361958E-01 1.92149295088271E-02 z4 : 3.92145597798803E-01 -1.96132002474631E-01 z5 : 3.97159333359477E+00 1.72944331154349E+00 z6 : -4.26835832221353E-01 3.01383493036263E-01 z7 : 5.04843935232506E-01 7.50907806414814E-03 == err : 5.023E-15 = rco : 1.313E-02 = res : 3.553E-15 == solution 52 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -9.55636527131078E-01 1.88246078489733E+00 z1 : 1.46055056175317E+00 -1.11051042834780E+00 z2 : -3.02415559276748E-01 -1.00467950994672E+00 z3 : 9.19131016580207E-01 -1.00569081067615E+00 z4 : 3.07477520230909E-01 -4.54196685798270E-02 z5 : -1.86777208714475E-01 5.75555916781789E-01 z6 : -1.61050232100546E+00 1.13591295421028E-01 z7 : -5.55707014947812E-01 2.12008988085259E-01 == err : 5.348E-15 = rco : 2.439E-02 = res : 1.005E-15 == solution 53 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -2.46445490253290E+00 -1.04532599523718E+00 z1 : 1.18707161261631E+00 -5.01351460128510E-01 z2 : 1.77974523110712E-01 -6.33065689661108E-01 z3 : 8.80476146920207E-01 5.56120063081446E-02 z4 : -1.54338677634813E-02 5.07118440156439E-01 z5 : -2.34147329888172E-01 1.57219115766540E+00 z6 : 1.31884321371249E-01 -8.10964598138012E-01 z7 : -5.87250036345216E-01 4.73102706669731E-01 == err : 5.790E-15 = rco : 3.367E-02 = res : 1.159E-15 == solution 54 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 7.65099612333949E-01 1.79572770964564E+00 z1 : -2.75927533202062E+00 -6.30568965294109E-01 z2 : -1.43593857606575E-01 -4.95485972229605E-01 z3 : -3.09122154875707E-01 -1.63508149103757E+00 z4 : -5.80449560602840E-01 -3.22791157723339E-01 z5 : 9.53696902016056E-02 3.21980694634104E-01 z6 : 1.36907346117050E+00 5.57445737684451E-01 z7 : 6.39018608888397E-01 2.60900119553333E-02 == err : 3.942E-15 = rco : 1.889E-02 = res : 9.305E-16 == solution 55 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -6.39229775457051E-01 1.37665631790492E+00 z1 : -2.38471162246811E+00 -2.00585282381545E+00 z2 : 2.78286182181645E-01 -8.73045584804272E-01 z3 : 1.01037904044600E+00 -7.57600492274315E-01 z4 : -8.29582381769566E-03 -4.21502683194252E-01 z5 : -1.41842518761824E-01 4.13221914104348E-01 z6 : 4.99936479295930E-01 1.40858965781664E+00 z7 : 4.61598506069824E-01 4.76850261897294E-01 == err : 4.115E-15 = rco : 3.874E-02 = res : 9.930E-16 == solution 56 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.06971465985333E-01 -1.96783682652685E-01 z1 : -9.86851671512322E-01 -2.16558184140777E+00 z2 : 2.40760914960845E-02 -8.24882903246365E-01 z3 : -5.68120528689831E-01 1.61471513162460E+00 z4 : 3.65441862043192E-01 1.81392141996917E+00 z5 : -5.02542338700806E-02 2.03648104140641E-01 z6 : -3.18204090580042E-01 -2.24824290441509E+00 z7 : 5.03061572616375E-01 1.42052324362242E+00 == err : 4.741E-15 = rco : 6.077E-03 = res : 2.187E-15 == solution 57 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 2.73203269920902E-01 1.45210990714112E-01 z1 : 1.77941855190491E+00 -1.44575831007984E-01 z2 : 5.42023423608374E-01 4.54267282452861E-01 z3 : -9.64908084857251E-01 1.40249889847509E+00 z4 : -1.78910933211323E+00 5.16364683969943E-01 z5 : -2.91096058025409E-01 -1.82692812769608E-01 z6 : 5.36353082491979E-01 -1.50743297461033E+00 z7 : -1.00976438544156E+00 -1.06632366958917E+00 == err : 6.507E-15 = rco : 1.138E-02 = res : 9.437E-16 == solution 58 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -4.39611453873452E-02 -4.76774836769599E-02 z1 : -1.13142912150395E+01 -1.04535626157507E+01 z2 : -1.73929768201260E-01 -2.52299648067681E-01 z3 : 2.32839310254583E-01 1.91911363993158E-01 z4 : 1.11840740015557E+01 9.47922775810238E+00 z5 : 4.05535560048313E-02 4.62568796383112E-02 z6 : 2.09001617414353E+00 2.65250994502962E+00 z7 : -2.93918044584186E+00 -1.99904963163320E+00 == err : 1.935E-14 = rco : 3.241E-04 = res : 5.512E-15 == solution 59 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 3.24393661031008E-01 -8.02763554958684E-01 z1 : 8.54708920383475E-01 1.05330862512238E-01 z2 : 9.67226502819434E-01 -1.19847285953022E-01 z3 : -2.07953855065838E+00 -2.34813682392526E-01 z4 : 2.09428663359168E-01 7.22133452036849E-01 z5 : -1.02426188829999E-01 9.70287023540573E-01 z6 : -2.88308765141562E-01 -1.06751506729192E+00 z7 : -8.09363775474432E-01 4.45048201414057E-02 == err : 2.680E-15 = rco : 1.871E-02 = res : 7.448E-16 == solution 60 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -5.80759438648342E-02 1.44210770539701E-01 z1 : 1.00864037439927E+00 1.06763255308397E+00 z2 : 4.16323436926935E-01 5.81216186039670E-01 z3 : -5.87399551128821E+00 4.29636148559186E+00 z4 : -8.60659877248176E-01 -9.28431078399152E-01 z5 : 8.80325259695083E-02 -1.33876998763851E-01 z6 : 4.67203992715252E+00 -4.88348569627571E+00 z7 : -3.16184464558305E-01 -5.26310654181583E-01 == err : 1.629E-14 = rco : 3.147E-04 = res : 5.329E-15 == solution 61 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -4.42663847503362E-01 -1.13382734064945E-01 z1 : -2.42107126099653E+00 4.82828755855268E-01 z2 : -2.13468948378478E-01 2.60067139363028E-01 z3 : -1.38965240051318E+00 -2.30014099497129E+00 z4 : 1.49345872070810E+00 -1.34410158758837E+00 z5 : 2.88766847938176E-01 1.38298637984357E-03 z6 : 1.33207009905546E+00 2.93296068370068E+00 z7 : 4.28681257178529E-01 -3.02297681039309E-01 == err : 4.357E-15 = rco : 1.254E-02 = res : 1.617E-15 == solution 62 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -3.09712000714855E+00 8.78760131001712E-01 z1 : 9.68929783493161E-01 -7.10555025947226E-01 z2 : 4.19431118292504E-01 2.55196187736264E-02 z3 : 2.36993336153663E-01 1.09436008104187E+00 z4 : 7.36502387632003E-01 -1.95647215896025E+00 z5 : 4.05867130916978E-01 -6.41204169428487E-01 z6 : -3.76816826159832E-01 3.89597941880528E-02 z7 : -2.17666455691222E-01 8.87948296965613E-01 == err : 5.053E-15 = rco : 1.316E-02 = res : 1.201E-15 == solution 63 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 2.26789995952611E-01 9.39394921341115E-02 z1 : -1.02046898756371E+01 -4.22692094630028E+00 z2 : -1.79289993207098E-01 -7.42643467841606E-02 z3 : 4.15286968756350E+00 1.72017494735691E+00 z4 : -2.75236033947140E-01 -1.14006498114688E-01 z5 : 1.44482192166483E+00 5.98464835167525E-01 z6 : 2.09260000999017E-01 8.66783304760009E-02 z7 : 3.70159476410012E+00 1.53325075369950E+00 == err : 2.679E-14 = rco : 1.968E-04 = res : 2.512E-15 == solution 64 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -5.64119829872983E-01 -1.96317223794665E-01 z1 : -1.19944647456414E+00 1.22287803047380E+00 z2 : -7.11099760280246E-01 3.77961522917118E-01 z3 : 3.70518034839710E-01 -7.16242260669196E-01 z4 : 4.81248046527553E-01 1.86353725263353E+00 z5 : 2.48462220040860E-01 1.26746343598055E-01 z6 : -4.24952964579719E-01 -1.53854348104240E+00 z7 : 8.75511195377678E-01 -1.52270361648133E+00 == err : 5.470E-15 = rco : 1.941E-02 = res : 9.992E-16 == solution 65 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 9.61354164688570E-01 5.13859660123773E-01 z1 : -3.67533095430714E+00 -1.51525592070366E+00 z2 : 6.49844488283325E-01 -1.76625500093592E-01 z3 : 5.33901157250077E-01 -2.39002235947222E-02 z4 : 6.72105826559932E-01 -4.52825891061795E-01 z5 : -2.32602038455899E-01 2.51957567084017E+00 z6 : 3.79884841292592E-01 -1.32530695824216E+00 z7 : -2.13037017822752E-01 7.77957303668926E-02 == err : 7.289E-15 = rco : 2.305E-03 = res : 3.553E-15 == solution 66 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 4.56727793791933E-01 2.51137304606661E-01 z1 : -3.01412927918419E-01 1.50870348845583E+00 z2 : 1.06125717620963E+00 7.37282147238022E-01 z3 : -3.09581529655270E-01 -1.66726481851763E+00 z4 : 2.94397056372555E-01 3.39177508756240E-01 z5 : -1.05271626082282E+00 -2.64989375364733E+00 z6 : -1.63875631431999E-01 -2.23417746548750E-01 z7 : -9.08675209056899E-01 1.32159243729187E+00 == err : 7.785E-15 = rco : 7.196E-03 = res : 1.391E-15 == solution 67 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.26283110289852E-01 -1.46572866471109E-01 z1 : -4.88646652522810E+00 -4.30631868717797E+00 z2 : 7.34230768829172E-01 6.59395293662083E-01 z3 : 7.13134132609523E-01 6.61117667619040E-01 z4 : 6.89671266507395E-01 6.65881750076443E-01 z5 : 6.66823761600945E-01 6.75597943437622E-01 z6 : 6.47819358214087E-01 6.92236299319262E-01 z7 : 6.37190815245539E-01 7.15979167169539E-01 == err : 1.175E-15 = rco : 7.254E-03 = res : 3.140E-15 == solution 68 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -6.12070173833545E-02 1.36105456662885E+00 z1 : -9.24255787103417E-01 4.96575601701595E-01 z2 : 2.47515752018382E-01 1.81801466094459E+00 z3 : 6.55363717634706E-01 -2.00683785500260E+00 z4 : -2.43031205474947E-01 -5.42857191770117E-01 z5 : -1.05847593702366E+00 -1.21911828757561E+00 z6 : 2.74908060855343E-01 -5.39050922561544E-01 z7 : 1.85302883965658E-01 2.49535995269741E-01 == err : 3.233E-15 = rco : 2.130E-02 = res : 1.897E-15 == solution 69 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 2.97563018610828E-02 -1.75605053948895E-01 z1 : -9.63966368452230E-01 -6.09591805741639E+00 z2 : -1.79748166080543E-02 8.56595536849292E-01 z3 : -1.99051611818669E-01 9.36793385807666E-01 z4 : -1.13492770143552E-01 1.15056028398704E+00 z5 : 1.19339652479968E-01 1.08670915585288E+00 z6 : 1.79334420509904E-01 9.69633808721364E-01 z7 : 4.21756596602607E-02 8.88547507781958E-01 == err : 3.633E-15 = rco : 7.625E-03 = res : 2.665E-15 == solution 70 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -3.84468396929374E-01 3.44885106588708E-02 z1 : 1.06028808808349E+01 -7.74545855999063E+00 z2 : -9.14358294111515E-02 2.31769927866588E-02 z3 : -1.00168713924072E+00 3.90470831999162E-01 z4 : -8.10248107324784E+00 5.05652023513158E+00 z5 : 7.03666615502161E-02 -1.27990584155560E-02 z6 : -2.76357755187390E+00 2.18218721544003E+00 z7 : 7.46522915806619E-01 -3.11269599975212E-01 == err : 3.413E-14 = rco : 8.004E-04 = res : 3.794E-15 == solution 71 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 8.05434074232826E-02 3.06772906467149E-01 z1 : -4.86190376193963E+00 -1.23237232793409E+01 z2 : 4.84528537754163E-02 8.53948352154032E-02 z3 : 3.90145761241141E-01 9.31749852109905E-01 z4 : 2.61502498273678E+00 9.45676032236561E+00 z5 : -3.00303527215348E-02 -7.03278641433425E-02 z6 : 1.31117552267197E+00 2.32827522693573E+00 z7 : -4.77287945698705E-01 -1.09758543197464E+00 == err : 4.693E-15 = rco : 8.992E-04 = res : 7.267E-15 == solution 72 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -8.40621767656116E-01 4.37487341973216E-01 z1 : 3.18717195894469E+00 -4.54917494861340E+00 z2 : 1.33405758516655E-01 -9.56931675835120E-02 z3 : -4.67907082805783E-01 8.43283662341747E-01 z4 : -9.12661483393111E-01 8.39442832206300E-01 z5 : -7.49750935135182E-01 4.39997215593228E-01 z6 : -4.68574989196285E-01 7.78387940337777E-01 z7 : -8.04940991786163E-01 9.23585691379554E-01 == err : 4.628E-15 = rco : 7.475E-03 = res : 2.674E-15 == solution 73 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 2.73873992016102E-01 -1.59968412878353E-01 z1 : -1.21520734198324E+01 5.27630318074457E+00 z2 : 9.46446085315565E-02 -2.61219255866823E-02 z3 : 9.34721352221275E-01 -3.82971925371678E-01 z4 : 8.53604125026601E+00 -4.83783745373519E+00 z5 : -7.09639756929449E-02 2.84946435913025E-02 z6 : 2.57348030484206E+00 -7.19198098027741E-01 z7 : -1.11360364486299E+00 4.38616558898686E-01 == err : 3.272E-14 = rco : 8.684E-04 = res : 3.511E-15 == solution 74 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -2.47473150860770E-01 -2.96247270380594E-01 z1 : 2.02050269978276E+00 1.29742352421203E+01 z2 : -4.82662862530835E-02 -8.10435037869997E-02 z3 : -4.32195195622306E-01 -9.84404341946627E-01 z4 : -2.15381956386067E+00 -9.30481905879774E+00 z5 : 4.07064425531741E-02 5.88070445500589E-02 z6 : -4.11105049408716E-01 -3.49718380512119E+00 z7 : 3.07770571158318E-01 7.47972260997711E-01 == err : 9.001E-15 = rco : 7.040E-04 = res : 6.169E-15 == solution 75 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 3.45123678094140E-01 1.42954908162679E-01 z1 : -1.36232723538903E+01 -5.64294417288378E+00 z2 : 8.84224859407119E-02 3.66257928953872E-02 z3 : 8.94729108488715E-01 3.70608931386014E-01 z4 : 9.14850507924518E+00 3.78943487926250E+00 z5 : -7.59991889783913E-02 -3.14798948042055E-02 z6 : 2.98595011816058E+00 1.23682103551166E+00 z7 : -6.87338459571964E-01 -2.84704911895339E-01 == err : 4.528E-14 = rco : 1.262E-03 = res : 4.529E-15 == solution 76 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 5.36800976223779E-01 5.09626962312352E-01 z1 : -1.23619135462879E+00 -3.05097458710173E-01 z2 : -2.12582930412278E-01 -3.75831707537962E-01 z3 : -4.45533052803267E+00 -2.04953582077627E+00 z4 : 3.62288290063426E-01 3.51668850024189E-01 z5 : -8.87081997534917E-02 -5.14928823080752E-01 z6 : 4.03124167157026E+00 1.58543948503003E+00 z7 : 1.38602542458478E-01 4.15975080373494E-01 == err : 7.174E-15 = rco : 1.253E-02 = res : 1.884E-15 == solution 77 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.57831919200099E+00 8.93547425503267E-03 z1 : -2.75259104187818E+00 -1.05826567376526E+00 z2 : -1.09153868584946E+00 2.57179417472539E-01 z3 : -3.44045069856322E-01 -8.06113403637360E-02 z4 : 1.31665267415316E+00 1.08671538799500E-02 z5 : -1.07775290163592E+00 5.44210083934884E-01 z6 : 2.87076132346782E-01 5.56666161001969E-02 z7 : 1.16000016820766E+00 -1.20665163878696E-01 == err : 4.724E-15 = rco : 3.676E-02 = res : 1.666E-15 == solution 78 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 2.03674481586435E+00 4.89990761539039E-02 z1 : 2.19968029639999E-01 -2.08693409872287E-01 z2 : -1.53977500340511E+00 -4.05896212898246E+00 z3 : 5.96983876402390E-01 -3.77647050123736E-02 z4 : -4.10301608554277E-02 3.26951283649990E-01 z5 : -2.23734771411288E+00 1.54548811147364E+00 z6 : -3.20000538794549E-01 -7.87557114421220E-02 z7 : 3.60577162749935E-01 2.08005405166662E+00 == err : 4.036E-15 = rco : 1.218E-02 = res : 9.305E-16 == solution 79 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.26507834689775E+00 4.79214759030124E-02 z1 : -1.11555571780053E+00 -7.19152839958196E+00 z2 : 7.05367031901958E-01 -1.16596781066107E-01 z3 : 1.46814666661745E+00 -4.17137695849220E-02 z4 : 6.09065200381259E-02 -1.43038307499393E-01 z5 : -5.95734011577540E-01 1.48581653587510E-01 z6 : -1.49514737200207E-01 6.75677696612793E+00 z7 : -3.24169375928017E-02 1.56913729748842E-01 == err : 1.223E-14 = rco : 3.296E-04 = res : 2.701E-15 == solution 80 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -6.21789157644080E-02 -5.05945709813304E-01 z1 : 3.59099905344362E+00 -2.22218644663711E-01 z2 : 2.66500475839208E-01 -1.09058903582740E-01 z3 : 6.51137306185190E-01 -2.97092022212363E+00 z4 : -1.47136125250936E+00 -9.50584896050913E-03 z5 : 1.01047696803945E-01 2.44610900399228E-01 z6 : -3.67196619933288E+00 3.15094178959736E+00 z7 : -3.28057697176599E-01 3.94132067822166E-02 == err : 7.452E-15 = rco : 5.970E-03 = res : 1.790E-15 == solution 81 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -2.44463944504499E-01 7.68455574478644E-01 z1 : -2.35564306712002E-01 -7.70082618476579E-01 z2 : 1.65686120774727E-02 -1.71284208374668E+00 z3 : -5.37710197313913E-01 -2.60075716896063E-01 z4 : -4.57634149694932E-01 1.69579395620752E+00 z5 : -1.38840165153509E+00 7.87427405655795E-01 z6 : 2.65312519708342E-01 8.60661216107711E-02 z7 : 1.65801358546333E+00 -9.77426071198502E-01 == err : 3.475E-15 = rco : 2.549E-02 = res : 8.006E-16 == solution 82 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.34632834693739E-01 9.11320078463958E-01 z1 : 2.06831975451363E-01 -1.29359777670188E+00 z2 : 5.20131684428569E-02 -1.27819927976671E+00 z3 : 8.46583269924207E-01 -3.70579132578474E-01 z4 : 5.44257179305598E-02 7.29635958059225E-01 z5 : 6.15822438480213E-01 2.30690826594153E-01 z6 : -2.31369639406158E+00 9.49513306166580E-01 z7 : -5.20492543372652E-01 -2.61467412601945E-01 == err : 5.231E-15 = rco : 2.276E-02 = res : 1.047E-15 == solution 83 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.55743773620228E+00 -8.04343194210713E-01 z1 : 5.93418031671287E-01 2.35214524281765E-01 z2 : 1.04948652171562E+00 -2.93504874978030E-01 z3 : 3.34506659703170E-01 -1.09318660799007E+00 z4 : -1.81451616925153E-01 6.46784685456622E-01 z5 : 4.26462373290381E-01 9.88355020233094E-01 z6 : -1.35992236709687E+00 5.70540606168900E-01 z7 : -2.28941398667445E-01 -6.32543591326658E-01 == err : 3.041E-15 = rco : 3.889E-02 = res : 8.671E-16 == solution 84 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 5.88094529075278E-01 -1.11720576530754E+00 z1 : 1.71285217711670E+00 -1.85664406749088E+00 z2 : 5.00092447124692E-01 -1.21694201490920E+00 z3 : 2.78899615155695E-01 1.94670768129304E-01 z4 : -2.39505603665208E-01 -5.32718084018949E-01 z5 : -4.24474781002271E+00 4.22681960129767E+00 z6 : 6.92566011501153E-01 -2.50738284075865E-01 z7 : -2.12130898796887E-01 1.70074414010379E-01 == err : 5.901E-15 = rco : 3.143E-03 = res : 2.220E-15 == solution 85 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.73487486613765E+00 -3.46931812364258E+00 z1 : -4.18677837161904E-01 -2.18395708108980E-01 z2 : -1.92537876332201E+00 2.07751198104641E-01 z3 : 9.01173674368886E-02 -4.02592352415922E-01 z4 : 5.12397027640545E-01 1.37183532526591E-02 z5 : 1.09235133577828E+00 2.78622507113034E+00 z6 : 1.64253011525777E-02 2.96717658628209E-01 z7 : 1.44376090210199E+00 4.03210470686544E-01 == err : 6.234E-15 = rco : 8.285E-03 = res : 1.495E-15 == solution 86 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 2.95230959624163E-01 -7.56126649020739E-02 z1 : -1.02456162394385E+00 -9.43150887612135E-02 z2 : -3.15676570253739E-01 -2.37189266665440E+00 z3 : 4.47559636716598E-01 -6.73835243928302E-01 z4 : -1.75068153245076E-01 2.32983514359559E-01 z5 : -1.57857575957085E+00 3.20636735123297E-01 z6 : 4.44285510618453E-01 2.93587690394050E+00 z7 : 9.82926467543016E-01 -6.56524921542465E-01 == err : 5.171E-15 = rco : 5.127E-03 = res : 2.589E-15 == solution 87 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.64033423074078E+00 2.56118144011495E+00 z1 : 1.11328003383220E-01 2.65560583927470E-01 z2 : 2.38208747137666E+00 2.69635209247225E+00 z3 : -4.01724775305068E-01 3.13790509337388E-01 z4 : -2.04102476510003E-01 -2.59841168078029E-01 z5 : -3.68419893287704E-01 -4.82452450638445E+00 z6 : 2.44417538057793E-01 -1.01514514791089E-01 z7 : -1.04713116948542E+00 -1.03368786896359E+00 == err : 6.231E-15 = rco : 6.448E-03 = res : 1.776E-15 == solution 88 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 6.91382412406150E-01 -1.52114598880380E+00 z1 : 4.19778894087961E-01 4.68681929439859E-01 z2 : -1.19431851161252E+00 -1.07866158782582E+00 z3 : -5.61873329382011E-01 -4.45612555037397E-01 z4 : -1.18796218516733E+00 5.46820971558533E-01 z5 : 8.75935570053684E-01 9.95393099993460E-01 z6 : -4.24769873679064E-01 8.51416650396505E-01 z7 : 4.57947490781841E-01 -1.99575952086432E-01 == err : 3.601E-15 = rco : 5.614E-02 = res : 8.909E-16 == solution 89 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 7.81648632987202E-01 -5.03903681582411E-01 z1 : 4.35664040320382E-01 1.29141458877776E+00 z2 : -1.71742861126672E+00 6.78395029929278E-02 z3 : 4.72488633215890E-01 4.00270363222275E-01 z4 : -8.21018217168526E-01 -5.52267602004641E-01 z5 : -6.02891986601711E-01 -8.03029236649941E-01 z6 : 4.35003256126698E-01 -9.75380444286963E-01 z7 : 9.26547198754932E-02 6.92373077165906E-01 == err : 2.934E-15 = rco : 7.116E-02 = res : 8.882E-16 == solution 90 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -5.52929187485972E-01 -1.83158426465700E-01 z1 : -9.64623112230555E-01 -2.30743770746505E+00 z2 : 5.98575270098450E-01 2.72329174413939E-01 z3 : 5.54415327960866E-01 -4.77445739521576E-01 z4 : 3.36585753390020E-01 8.60663788614956E-01 z5 : -8.67044514313861E-01 9.40602242547746E-01 z6 : -7.68459467625870E-01 1.06096405244161E+00 z7 : 7.39600397695631E-01 -5.49200816931011E-01 == err : 4.340E-15 = rco : 2.302E-02 = res : 8.951E-16 == solution 91 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -7.78847869807102E-01 -1.26696567235653E+00 z1 : -4.55142695389875E-01 3.19198609815575E-01 z2 : 3.70369465152837E-01 1.86171001654385E-01 z3 : 1.29442434139866E+00 -7.49124019461305E-01 z4 : 4.87462846568121E-01 -3.13051862453085E-01 z5 : 1.68704381580259E+00 6.80413602779592E-01 z6 : -2.92421786604481E+00 8.30636040702651E-01 z7 : -6.04971570191716E-01 -6.99611330463717E-02 == err : 3.974E-15 = rco : 2.094E-02 = res : 1.776E-15 == solution 92 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.45465834714865E-01 2.53321473841605E-01 z1 : 1.89830747100828E-01 -7.93804304378012E-01 z2 : 3.15006798001352E+00 -3.69999536114150E-01 z3 : 5.86875657676070E-01 4.87507402201535E-01 z4 : -2.59998486559899E-01 -1.82629030923945E-01 z5 : -1.53637592368160E-01 -8.98894817257793E-01 z6 : -5.29693697959560E+00 2.48814401224741E-01 z7 : 7.14453306507078E-01 8.73000979040928E-01 == err : 4.330E-15 = rco : 4.428E-03 = res : 1.845E-15 == solution 93 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -2.89485366276425E+00 -1.19908764820238E+00 z1 : 5.61312477769083E-01 -5.42210203938344E-01 z2 : -6.96587166387973E-01 1.08190038770680E-01 z3 : 1.14970515281861E+00 -2.29862962502182E-01 z4 : 7.08669267266081E-01 2.93540421738615E-01 z5 : 6.50426650394233E-01 9.75501969452077E-01 z6 : -4.16059598968874E-01 -5.69063419112041E-01 z7 : 1.35073473617980E-02 7.80308371428486E-01 == err : 3.326E-15 = rco : 2.421E-02 = res : 8.006E-16 == solution 94 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -2.12030921359677E-01 -4.10819988053029E-01 z1 : -3.51759953798962E-01 -7.43057139665808E-01 z2 : -2.22279830565628E+00 2.74006424253704E+00 z3 : 4.99420520694582E-01 -1.22363861151673E+00 z4 : 7.09934446734233E-02 1.36581753709008E-01 z5 : -1.78475419983350E+00 -8.81950656377034E-01 z6 : 3.23966901537649E+00 5.36741041172251E-01 z7 : -1.62619132607360E-01 -5.36604074170789E-01 == err : 6.820E-15 = rco : 1.885E-03 = res : 2.367E-15 == solution 95 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.08037118833812E-01 1.70371990715269E+00 z1 : -1.47282766332659E+00 3.79980120554825E-01 z2 : 4.22976909085237E-01 -8.98089207028320E-01 z3 : -8.70519149150098E-01 -3.41815479706314E-01 z4 : 2.65473552918957E-01 -7.06693057705454E-01 z5 : 4.93375668387505E-01 4.86690153020371E-01 z6 : 1.84048923914713E-01 -1.50411645886211E+00 z7 : 1.61629344492799E-01 4.97640590209214E-01 == err : 4.568E-15 = rco : 3.598E-02 = res : 8.882E-16 == solution 96 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 7.62050113560905E-01 -3.41319262018373E-01 z1 : 7.58803029813387E-01 1.84384554335927E-02 z2 : -2.23494162558313E+00 -3.58971161446251E-01 z3 : -5.30228274776768E-01 3.54844127577975E-01 z4 : 5.43944447327218E-01 -9.10421713804063E-01 z5 : 2.18075404057036E-02 -1.01277288598012E+00 z6 : 2.33775275833261E-01 9.89143355549884E-01 z7 : -4.79090039091864E-01 8.78375652322263E-01 == err : 2.197E-15 = rco : 4.739E-02 = res : 6.661E-16 == solution 97 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -9.63081549991094E-01 5.47042335994591E+00 z1 : 2.66668287849400E-02 1.61997404207984E-01 z2 : 2.65431324888491E-01 -9.27151867322860E-01 z3 : -5.17734047635271E-02 -1.23892484290656E+00 z4 : -2.19028955585871E-01 -8.41278985284213E-01 z5 : 2.19070838651565E-01 -8.81735943361779E-01 z6 : 8.38944716343284E-02 -1.22225293912837E+00 z7 : -2.85059086130123E-01 -9.03759618515201E-01 == err : 3.502E-15 = rco : 8.048E-03 = res : 2.667E-15 == solution 98 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -5.06889190471072E-01 1.21412671163516E+00 z1 : 3.34864829389935E-01 5.95587889038853E-02 z2 : -5.46044606154350E-01 2.07332533186658E-01 z3 : -1.26771579640052E-02 -5.99030276382360E+00 z4 : 3.12419382178662E-01 6.67016864124909E-01 z5 : -2.97384255854085E-02 -2.70259968491543E-01 z6 : -3.74138143141831E-01 1.20582940211751E+00 z7 : -1.01676220763220E-01 2.52401499998193E+00 == err : 5.644E-15 = rco : 3.995E-03 = res : 3.553E-15 == solution 99 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -4.99209215192500E+00 3.62883783998832E+00 z1 : -1.03130641628888E-01 1.45212407286899E-01 z2 : 6.58120663105815E-01 -5.98475273212243E-01 z3 : 8.12443226257329E-01 -5.58826056571903E-01 z4 : 8.52805290814109E-01 -6.84033535748048E-01 z5 : 7.33317471587007E-01 -8.93820486355310E-01 z6 : 5.21662211152213E-01 -8.03163700198400E-01 z7 : 5.92994398126126E-01 -6.18414627554405E-01 == err : 9.983E-16 = rco : 8.999E-03 = res : 1.691E-15 == solution 100 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -3.35955127700678E-01 9.34134809099671E-01 z1 : -7.72759908296971E-01 -1.31013294821777E+00 z2 : 1.12831812024294E+00 -1.28110567893743E+00 z3 : 4.66174241460205E-01 -2.37595830401016E-01 z4 : -9.33428705585511E-01 1.19371318992587E+00 z5 : 6.93011188326673E-01 4.72737325182756E-03 z6 : -3.11989303826303E-01 6.87425602815664E-01 z7 : -8.57250037131645E-01 -3.73849949901910E-01 == err : 2.691E-15 = rco : 3.598E-02 = res : 7.065E-16 == solution 101 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -2.01520358994664E+00 5.59458355067083E-01 z1 : -2.41076945060852E-01 7.85479080136409E-01 z2 : 1.75834839956439E-01 -1.10369138753939E+00 z3 : 2.77115647879007E-03 7.15375368109384E-01 z4 : 4.08695979319452E-01 -8.80547100334176E-01 z5 : 9.65659482624250E-01 -4.26771066811894E-01 z6 : -9.55609845573193E-01 6.51740867463428E-02 z7 : 7.35049389690464E-01 -9.71607677388514E-02 == err : 2.626E-15 = rco : 8.652E-02 = res : 6.280E-16 == solution 102 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 7.75213209530083E-01 -1.97142060283157E+00 z1 : 2.21868205658884E-01 5.12013105743581E-01 z2 : -2.47297013428485E-01 5.28423573650344E-01 z3 : -2.44202011474817E+00 -4.31673535867656E-02 z4 : -1.48203352171835E-01 -3.23071121595383E-01 z5 : -1.74264368973046E+00 3.78975592738244E-01 z6 : 2.25541341016937E+00 5.40449055953896E-01 z7 : 4.03789812209325E-01 -4.88568243743668E-03 == err : 5.669E-15 = rco : 3.244E-03 = res : 9.695E-16 == solution 103 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.37475958203289E+00 9.37594838177665E-01 z1 : -6.38687636972249E-01 -1.82192003905790E-01 z2 : 2.95111287248145E-01 -1.60238177925714E-01 z3 : 1.36225478959641E+00 5.73907467075985E-01 z4 : 4.70302816024234E-01 4.33405967274526E-01 z5 : 1.81077836481956E+00 -7.28764116490487E-01 z6 : -2.39698188979779E+00 -1.50522270706729E+00 z7 : -4.51897681396708E-01 2.48825300496019E-01 == err : 5.276E-15 = rco : 2.143E-02 = res : 2.289E-15 == solution 104 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.47484364986453E+00 1.40554849182393E+00 z1 : 1.72578688208950E+00 -1.21585376824654E+00 z2 : -2.81963248582870E-01 -1.70585853347080E-01 z3 : -4.89218616655243E-01 -2.67486886438764E+00 z4 : 2.02176764812506E-01 -2.60202174760602E-01 z5 : 3.95427668259403E-01 4.48835026266921E-01 z6 : -3.95890499239217E+00 1.78133429957359E+00 z7 : 7.97236009304905E-03 3.03109410712324E-01 == err : 5.059E-15 = rco : 1.682E-02 = res : 1.734E-15 == solution 105 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 6.54526902665359E-02 -7.88557064693132E-01 z1 : 5.60792038711958E-02 -2.83276503956715E-01 z2 : 2.06507039565632E-02 2.83467346642952E-01 z3 : 9.17438138270542E-03 7.11528840546961E-01 z4 : -1.22361920070471E-02 1.30581845592382E+00 z5 : -2.29769189720312E-01 3.21953240816866E+00 z6 : -7.59677667426517E-01 -3.32988222099970E+00 z7 : -7.35534628344141E-02 -1.50131469399793E+00 == err : 2.838E-15 = rco : 1.906E-02 = res : 3.662E-15 == solution 106 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -7.40671979313136E-01 -2.53289414168843E-02 z1 : -3.32726515663910E-01 3.44481910101236E-02 z2 : 2.68714998963947E-01 8.59619947476377E-03 z3 : 6.99764030398906E-01 3.62679903563826E-03 z4 : 1.28933257053879E+00 -3.33518534523758E-03 z5 : 3.14216622272722E+00 -7.41086328839126E-02 z6 : -3.90181905050135E+00 -3.78990491996448E-01 z7 : -1.34863980966175E+00 5.24086297568671E-02 == err : 4.419E-15 = rco : 1.787E-02 = res : 1.831E-15 == solution 107 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 5.09614135449461E-01 -4.96639600871655E-01 z1 : 2.15043935860151E-01 -1.85839430252227E-01 z2 : -1.60652751557746E-01 2.39960722239477E-01 z3 : -5.11312006662702E-01 6.03876088931443E-01 z4 : -1.11359995317091E+00 1.00957964847098E+00 z5 : -2.89175552917468E+00 1.81740906886814E+00 z6 : 2.11408184590694E+00 -2.43902455022488E+00 z7 : 9.14700790838197E-01 -9.32005379526364E-01 == err : 3.602E-15 = rco : 1.493E-02 = res : 3.580E-15 == solution 108 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -9.58712226008051E-01 5.50982060193815E-01 z1 : -5.40836953967241E-01 -6.03776274202195E-01 z2 : -3.38258595911749E-01 7.97020510889661E-01 z3 : 6.78850640694418E-01 5.29890306393158E-01 z4 : 5.99187590482787E-01 7.68677247691155E-01 z5 : -1.63649415804453E+00 -1.30441746377425E+00 z6 : 6.58713888893011E-01 -3.62537032820803E-01 z7 : 6.13670281350060E-01 -7.58522786735637E-01 == err : 6.649E-15 = rco : 1.576E-02 = res : 8.882E-16 == solution 109 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -3.66355453303667E+00 -1.51749397407722E+00 z1 : -1.82957269066981E-01 2.85434569138666E-01 z2 : 1.29501991972493E+00 -1.75439074364954E-01 z3 : 3.90528210166933E-01 -1.09830663757526E+00 z4 : 8.73433463659492E-01 3.61787986478269E-01 z5 : -5.00474925597981E-01 1.05276521690535E+00 z6 : 7.91663207840609E-01 1.03977152617771E+00 z7 : 7.24623937983773E-02 -3.31203045047645E-01 == err : 8.176E-15 = rco : 5.139E-03 = res : 1.078E-15 == solution 110 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.08465845860763E-01 -1.79536064966500E-01 z1 : -1.81475207371690E+00 1.36474353321601E+00 z2 : 1.36017986774993E+00 -6.48743369047111E-01 z3 : -6.35068274388797E-02 2.14787325422270E-01 z4 : -2.22910711422553E+00 8.33488096322240E-01 z5 : -5.66255927009003E-01 6.00304662131701E-01 z6 : 7.40054140888416E-01 -1.54349789762415E+00 z7 : 1.54104255537991E+00 -1.02422971781955E+00 == err : 4.968E-15 = rco : 5.624E-03 = res : 2.676E-15 == solution 111 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 4.29284285432448E+00 -8.60816751405093E+00 z1 : 4.14528243887147E-01 -1.03216366235334E+00 z2 : 3.18764571602260E-02 -9.25794196281092E-02 z3 : -6.27476655910145E+00 1.13855209007227E+01 z4 : 1.53779330624535E-01 -3.04690100279072E-01 z5 : -3.94123600724320E-01 9.30855429753434E-01 z6 : 8.72822473079098E-01 -2.73266312888265E+00 z7 : -2.08387317610046E-02 7.12040623528982E-02 == err : 2.394E-14 = rco : 8.843E-04 = res : 4.170E-15 == solution 112 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -2.63043687859759E+00 -5.51722347484665E+00 z1 : 2.23992803926950E-01 -4.89891965403942E-01 z2 : -1.43084252116758E-01 -6.16067795905448E-01 z3 : 9.29339179706073E-02 1.00460423724514E+00 z4 : -8.15321104656426E-02 4.43539160571988E-01 z5 : 1.41925186237130E+00 4.79319709136778E+00 z6 : 2.00784538378426E-01 -4.38553986870362E-01 z7 : -5.78941397858759E-03 4.37713301476396E-01 == err : 7.378E-15 = rco : 1.264E-02 = res : 1.110E-15 == solution 113 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.29330111811855E+01 5.35702863356990E+00 z1 : -2.41560681095558E-01 -1.00057710245862E-01 z2 : 1.29121070486023E+00 5.34836985834433E-01 z3 : -2.30169431336599E+00 -9.53393001033223E-01 z4 : 6.51428565126930E-02 2.69830546592820E-02 z5 : -1.18983504688057E+01 -4.92845813404758E+00 z6 : -6.59863947921364E-01 -2.73324596550083E-01 z7 : -1.11774863881111E-01 -4.62986645519627E-02 == err : 4.087E-14 = rco : 1.698E-03 = res : 2.512E-15 == solution 114 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 2.67032515952669E+00 1.91125869961864E+00 z1 : -4.94425471075832E-01 2.64447288241156E-01 z2 : -4.40422101713932E-01 1.40565097084614E-01 z3 : -7.74152590947885E-01 2.76688893585660E-01 z4 : 3.65762251645192E-01 -3.50927376192425E+00 z5 : -5.12099523078314E-01 1.21838679677202E+00 z6 : 1.46777830382360E-01 -4.63779380856206E-02 z7 : -1.88564508724957E+00 -6.38378507657313E-01 == err : 5.634E-15 = rco : 2.375E-03 = res : 4.705E-15 == solution 115 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 3.01684828988285E-01 -9.02400145232723E-01 z1 : 1.82696267077127E-01 4.64939285241281E-01 z2 : -5.86731451652378E-01 1.56449383606338E+00 z3 : 6.28236673135106E-01 -3.45796679179333E-02 z4 : -1.60723964181493E+00 -8.17817951007512E-02 z5 : -7.12400100822690E-01 -8.22087819250752E-02 z6 : -4.53355299840952E-01 -1.22667693400906E+00 z7 : 1.32322919241914E+00 -8.44692294842100E-02 == err : 3.766E-15 = rco : 5.458E-02 = res : 8.006E-16 == solution 116 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 9.41224789438705E-01 -3.12594359591909E-01 z1 : 8.38674418467111E-01 4.16597744804145E-02 z2 : -2.05925282546974E+00 -7.17962713815470E-01 z3 : 7.45669807390954E-01 8.64608138698085E-01 z4 : -2.33997997523487E-01 2.87521953679512E-01 z5 : 5.97042110623627E-02 -1.02335398630690E+00 z6 : -1.54574620140077E+00 1.06708401442769E+00 z7 : 3.29844265523567E-01 -5.89646253936518E-01 == err : 6.476E-15 = rco : 1.206E-02 = res : 1.047E-15 == solution 117 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.71382418115088E+00 7.66230060515080E-01 z1 : 1.78361068653707E+00 -2.04633680231220E-01 z2 : -9.09710386560915E-01 4.19107318654815E-01 z3 : -1.72446979788551E+00 -3.75626404763524E-01 z4 : -1.97957621606567E-01 6.69755175054064E-02 z5 : 1.34829705448260E+00 2.07259421949364E-01 z6 : -3.10679273113603E+00 -1.21198758408032E+00 z7 : 1.69319082507180E-01 -5.00080819146889E-02 == err : 6.468E-15 = rco : 8.780E-03 = res : 1.144E-15 == solution 118 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -9.54960615466253E-01 3.19027404061158E-01 z1 : -1.03407594207486E+00 -3.57322699866138E-01 z2 : -8.19743896813686E-01 2.33649767658919E-01 z3 : -1.26048863452368E+00 -2.31111844154022E-01 z4 : 5.00233752094572E+00 -3.25108989354939E-01 z5 : 1.57356847199652E-01 8.74540233770451E-03 z6 : -1.15525385750321E+00 2.19170454255730E-01 z7 : -8.59050954274976E-01 -2.49732927303503E-01 == err : 4.174E-15 = rco : 6.392E-03 = res : 2.539E-15 == solution 119 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.48499226603725E+00 -9.53776310035227E-01 z1 : -3.46908756187328E-01 -9.39616010318789E-01 z2 : 1.11650534849650E+00 1.40590107439781E+00 z3 : 1.75366317199246E+00 6.70050228514081E-01 z4 : 8.43656175891024E-02 1.55087725261120E-01 z5 : -3.05383884734446E+00 -1.33982956851027E+00 z6 : 1.09994453300369E+00 8.06835447553296E-01 z7 : -9.26183340240128E-02 -1.87336019227115E-01 == err : 3.867E-15 = rco : 1.355E-02 = res : 1.296E-15 == solution 120 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -7.98443694476000E-01 1.82813080907068E-01 z1 : 1.56971452842009E+00 -2.31669662189524E+00 z2 : 7.06329803849803E-01 -4.39111426377826E-01 z3 : 3.95781777074757E-01 -3.81080772972728E-01 z4 : -4.63562030959540E-02 4.18786865063621E-01 z5 : -6.55689236975914E-01 6.26904425590124E-01 z6 : -2.58699434993108E+00 2.09281889957043E+00 z7 : 4.91777842623007E-01 -5.67117882250548E-01 == err : 4.615E-15 = rco : 3.819E-02 = res : 1.047E-15 == solution 121 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -9.91434451784984E-01 2.27700131175466E-01 z1 : 7.03091398293134E-01 4.18796652637962E-02 z2 : 7.72592779744690E-01 4.27536606886508E-01 z3 : -1.03450915994521E+00 -1.72094095570874E+00 z4 : 6.37954380986985E-02 -7.45449014913184E-01 z5 : -5.92070190121698E-02 1.08715573420106E+00 z6 : 4.67501202106905E-01 8.41054265853198E-01 z7 : -8.45709720012350E-01 -5.41619865123199E-01 == err : 5.643E-15 = rco : 7.454E-02 = res : 7.109E-16 == solution 122 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.96395338578656E-01 9.09022759202235E-01 z1 : 1.22122901027766E+00 -6.05107015818317E-01 z2 : -1.16643564463187E+00 -1.26237518982912E+00 z3 : 6.17133804722992E-01 5.10660284380466E-02 z4 : -9.71059715244669E-01 -1.90035382430440E-01 z5 : -9.94136430775329E-01 1.41518406677132E-01 z6 : -3.82104374146642E-01 9.97291878637476E-01 z7 : 5.55098478707909E-01 -4.24064917242108E-01 == err : 5.585E-15 = rco : 5.421E-02 = res : 1.053E-15 == solution 123 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.94165101724220E+00 -3.93232478284221E+00 z1 : -7.62023714200038E-01 4.49911854940073E-01 z2 : -4.25473959342788E-01 -1.76237084396362E-01 z3 : -2.20696412171462E-01 -8.56967859300150E-01 z4 : -1.40761891878593E+00 4.15352812076536E+00 z5 : -4.36496406966550E-01 7.15136575842052E-01 z6 : 1.89750508790445E-01 7.85972342081974E-02 z7 : 1.97028352922833E-01 -8.14327491582053E-01 == err : 7.001E-15 = rco : 4.314E-03 = res : 1.831E-15 == solution 124 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 3.01583218845623E+00 -1.13200058834033E+00 z1 : 8.93666837186489E-02 5.16880164118375E-01 z2 : -3.93184308482549E-01 -2.32836908228961E-01 z3 : -1.37054441896939E+00 -2.05336739380364E+00 z4 : 3.29498968362007E-02 -3.34840578778567E-01 z5 : -2.60907793112441E+00 6.43812659334334E-01 z6 : 1.05611441647547E-01 2.00645813602222E+00 z7 : 2.05166915406425E-01 2.03211077311472E-01 == err : 6.125E-15 = rco : 1.191E-02 = res : 1.296E-15 == solution 125 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.58462126385818E-01 -1.42007518346851E+00 z1 : -9.91793526715533E-01 -5.09648235341567E-02 z2 : 5.10364504365791E-01 6.92643492966517E-02 z3 : 1.10372431819506E+00 -4.33637677423060E-01 z4 : 4.60580292242190E-01 1.25564604278179E+00 z5 : -1.84411219862993E+00 4.55013818804543E-01 z6 : -2.87443715565504E-01 4.89872685093750E-01 z7 : 2.83262919982452E-01 -7.47802643916093E-01 == err : 4.505E-15 = rco : 2.263E-02 = res : 1.558E-15 == solution 126 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 6.54540549534819E-01 -6.26874141360820E-01 z1 : -9.12311205732240E-01 -1.65263644921122E+00 z2 : -5.21961474758281E-01 -2.47885459851795E-01 z3 : -1.86847699297030E+00 6.14683970690736E-01 z4 : -8.29874732143850E-02 8.00711950458310E-01 z5 : 4.07922782936002E-01 8.70033915912264E-01 z6 : 6.56310074503031E-01 3.52957331396754E-01 z7 : 7.43084207190065E-01 -4.93674550399317E-01 == err : 2.408E-15 = rco : 1.692E-02 = res : 7.114E-16 == solution 127 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.32254248139703E+00 -1.09721081563419E+00 z1 : -2.44914220078593E+00 5.06300966810388E-01 z2 : -8.90446681395772E-01 1.14584965549948E+00 z3 : -2.10566580839010E-01 2.84848944229830E-01 z4 : 8.33366471836714E-01 -9.97753573149899E-01 z5 : -4.35368829289516E-01 8.50422066685062E-01 z6 : 2.73458056957193E-01 -1.96340059836361E-01 z7 : 6.32277749607993E-01 -8.78800616969400E-01 == err : 4.899E-15 = rco : 2.329E-02 = res : 1.351E-15 == solution 128 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.12235853797962E+00 1.10972186910192E+00 z1 : -2.69468262576177E+00 -1.19806895732904E+00 z2 : -5.89981096615164E-01 -9.53687716768041E-01 z3 : -3.00277427340939E-01 -1.86275776517470E-01 z4 : 9.38698272561809E-01 9.23329796160388E-01 z5 : -3.77271744449777E-01 -1.14690102593069E+00 z6 : 2.42355721629374E-01 1.63631238169059E-01 z7 : 7.34920829485558E-01 9.05567140748781E-01 == err : 6.849E-15 = rco : 1.554E-02 = res : 1.522E-15 == solution 129 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 2.74256767867524E+00 -1.19774960474123E+00 z1 : 3.72019753516128E-01 3.52619072292793E-01 z2 : -2.20953180829838E-01 3.48398384064446E-01 z3 : -1.21454609891814E+00 -1.50835066087698E+00 z4 : -4.50479023975597E-01 -1.41620851603803E-01 z5 : -3.67992015367710E+00 1.22643658896502E+00 z6 : 1.30600598235619E+00 7.35780266220446E-01 z7 : 2.21425510341820E-01 -1.98196626685783E-01 == err : 6.007E-15 = rco : 9.775E-03 = res : 9.155E-16 == solution 130 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.45464103889595E+01 1.00593233591601E+01 z1 : -3.67489806907187E-02 5.60195958363171E-02 z2 : -1.99050719037205E+00 1.85171476192928E+00 z3 : 3.17818799435844E+00 -2.66378529538454E+00 z4 : 3.79507865839689E-02 -4.63280411549839E-02 z5 : 1.23901642498455E+01 -9.52175250350539E+00 z6 : 2.08221322280427E-01 -2.78464226503254E-01 z7 : -1.64737325557339E-01 1.60588917257349E-01 == err : 3.393E-14 = rco : 6.146E-04 = res : 3.580E-15 == solution 131 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 8.13073911888607E-01 -6.66158758980773E-01 z1 : 5.38978794160056E-01 7.40444515880521E-01 z2 : 7.69352938909779E-01 4.94992289725029E-01 z3 : -2.17229061007952E+00 4.51429372272311E-01 z4 : -1.40851210437379E-01 6.09267923950610E-01 z5 : -4.82970250382099E-01 -1.09127035629889E+00 z6 : -7.89992394280268E-01 -3.30947300508189E-01 z7 : 5.40819287709533E-01 -5.90441118405712E-01 == err : 1.907E-15 = rco : 3.178E-02 = res : 1.180E-15 == solution 132 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 6.37320582086481E-01 -2.93781389208694E-01 z1 : 1.10944959735319E+00 1.10572173400714E+00 z2 : 5.29755698590922E-01 -7.55202743713744E-01 z3 : -1.14088459688377E+00 -1.40919035119093E+00 z4 : -5.02838997759691E-01 -3.62685439933943E-01 z5 : 6.36095851497930E-01 4.99870197026845E-01 z6 : -2.11577505968386E+00 3.32145470426318E-01 z7 : -7.70026077124917E-02 5.00439090221916E-01 == err : 5.139E-15 = rco : 5.016E-02 = res : 1.351E-15 == solution 133 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.84730432132314E-01 7.65178503722470E-02 z1 : 1.23499794222562E+00 -1.56237350930406E+00 z2 : -4.90112543089039E-01 -1.19925521366045E-01 z3 : 8.67400849668283E-01 -1.40541743258841E+00 z4 : -1.67760950364075E+00 -6.94888608773994E-01 z5 : -3.80435174173639E-01 1.60712521978847E+00 z6 : -4.31362052158107E-01 -2.61761753367581E-01 z7 : -2.31489483475965E-01 1.97804032287429E+00 == err : 5.440E-15 = rco : 9.873E-03 = res : 2.809E-15 == solution 134 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 4.58312724091846E+00 1.89839346127000E+00 z1 : -7.48719802455761E-02 -3.10129896594482E-02 z2 : -1.07932020744797E+01 -4.47069068068290E+00 z3 : 7.86588913260874E-02 3.25815795884970E-02 z4 : 3.60479672740078E+00 1.49315569408754E+00 z5 : -6.34014180117897E-01 -2.62617272141693E-01 z6 : 1.88978171226305E+00 7.82773215144001E-01 z7 : 4.21844130423518E-01 1.74733560028907E-01 == err : 5.870E-15 = rco : 6.267E-05 = res : 2.220E-15 == solution 135 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.44259222908173E-01 -1.11247943661012E-01 z1 : 1.15906014767244E+00 -1.09331812669331E+00 z2 : 1.48714852408826E+00 -3.41619003319897E+00 z3 : -5.50928868898361E-01 4.62856151283105E-01 z4 : -1.55657082348193E+00 1.01935179502235E+00 z5 : -1.35238116482724E-01 1.53239675149832E-01 z6 : 7.18834074615182E-01 -5.18361407593443E-01 z7 : -2.19044369293233E+00 3.12098645732636E+00 == err : 1.529E-14 = rco : 8.847E-04 = res : 2.220E-15 == solution 136 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 4.97132078049808E-01 5.00745014123841E-01 z1 : 6.54498423457743E-01 3.54614077645994E-02 z2 : 1.87381283854824E-02 -7.01832975908009E-01 z3 : -5.96683567335049E-01 -4.13838330104237E-01 z4 : -1.37926321624124E+00 -1.78588844894478E+00 z5 : 2.89615675377481E-02 6.70706611004390E-01 z6 : -1.48423392132507E+00 -1.84272760524178E-02 z7 : 1.33697097495928E+00 1.33039056575153E+00 == err : 5.833E-15 = rco : 1.319E-02 = res : 8.006E-16 == solution 137 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 6.17710428447432E-01 -2.81410839015429E-01 z1 : -2.73018441501637E-01 2.07622372157706E-01 z2 : 1.21216622859806E+00 3.85944270571397E-01 z3 : 1.75186250267264E+00 7.25645208019878E-01 z4 : 1.13003477104814E+00 5.84227149285877E-01 z5 : -4.62420040960389E-02 -3.39864378653542E-01 z6 : 2.37799720197621E-01 6.35774745332033E-01 z7 : -5.55419273787750E+00 -2.30062196006301E+00 == err : 4.760E-15 = rco : 4.509E-03 = res : 1.986E-15 == solution 138 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 8.03163390159242E-02 3.32681169005510E-02 z1 : -1.05656339581059E+01 -4.37642888051722E+00 z2 : -1.88128154251601E-01 -7.79252329552305E-02 z3 : 1.77856813634986E+00 7.36707043680755E-01 z4 : -6.70135765939833E-01 -2.77579322883560E-01 z5 : -1.18815514116615E+00 -4.92149973674339E-01 z6 : -2.33320254888449E-01 -9.66444139511428E-02 z7 : 1.00626092664749E+01 4.16806923103510E+00 == err : 4.123E-14 = rco : 7.349E-05 = res : 3.206E-15 == solution 139 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 6.57993098887098E-01 -3.75574827704659E+00 z1 : 2.33424994113108E-02 1.80670850122832E-01 z2 : 4.64866288432540E-02 1.59267195160127E+00 z3 : -1.36403833228252E+00 3.46718394431126E+00 z4 : -6.22768158632753E-02 -7.16854262435655E-01 z5 : -3.79871218006223E-01 -1.82145235135618E+00 z6 : 1.27290242054396E-02 -2.03984602685100E-01 z7 : 1.41755582293625E-01 8.74829315123079E-01 == err : 8.176E-15 = rco : 1.139E-03 = res : 3.126E-15 == solution 140 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -3.17284966654533E+00 -1.73988811893661E+01 z1 : -2.93336764005380E-03 -2.30040392392207E-01 z2 : -4.96692339061973E-02 3.44138651850437E-01 z3 : 2.02827339707222E+00 1.54940649250895E+01 z4 : -5.92361351489074E-03 5.95941306046664E-02 z5 : 3.63737636705108E-01 4.13089892868794E+00 z6 : -9.81410673292307E-02 -2.71686119729609E+00 z7 : 1.36263826470888E-02 -6.55972895432902E-02 == err : 4.085E-14 = rco : 5.903E-04 = res : 3.495E-15 == solution 141 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.46111607959582E+01 1.20550833962627E+00 z1 : 3.00344082074136E-01 2.89404283414920E-02 z2 : -3.01389710584952E-01 5.54158734943215E-02 z3 : -1.53921970556293E+01 -6.08627029318288E-01 z4 : -6.47982960300088E-02 2.62784800576978E-03 z5 : -3.49185597484198E+00 -6.64772873929372E-01 z6 : 3.35347237882165E+00 -3.97743159768747E-01 z7 : 6.13842477210244E-02 -4.03285881653521E-03 == err : 4.399E-14 = rco : 3.628E-04 = res : 5.334E-15 == solution 142 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -5.71787248495821E+00 4.56206976293581E-01 z1 : 4.15423832147403E-01 -1.80997605320363E-01 z2 : 8.72361530015788E-01 7.21336565859593E-02 z3 : 4.99819702569424E-01 -8.52098320622619E-01 z4 : -8.67612640711161E-01 -8.97935516389547E-02 z5 : 3.20927767084178E-01 -5.05254786253504E-01 z6 : 3.68883683326871E+00 5.33153697945693E-01 z7 : -1.35764071927420E-01 1.83966500645117E-01 == err : 4.782E-15 = rco : 2.869E-03 = res : 1.807E-15 == solution 143 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 1.04313369922495E+00 3.16426398721483E-01 z1 : -9.56300314564369E-02 -2.05649808436017E-01 z2 : -6.68514389978781E-01 1.20575268467472E+00 z3 : 1.61713456385375E+00 -1.94608352127371E+00 z4 : 1.55054329368882E-01 7.95446845902153E-01 z5 : 3.60625118599171E-01 3.94425138950577E-01 z6 : 3.34616355535196E-01 5.84402533228486E-01 z7 : -3.67029917765802E+00 -1.52740370413278E+00 == err : 6.003E-15 = rco : 2.553E-03 = res : 1.554E-15 == solution 144 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.84293804744216E+00 -6.44696454970942E-01 z1 : 1.80733153941699E-02 2.14815303819693E-01 z2 : -3.41548162251150E-01 -7.56536829893597E-01 z3 : 5.00931887592047E+00 2.07492781665781E+00 z4 : -7.76463344264727E-01 2.93441301005545E-01 z5 : 1.64677121907294E-01 -1.39117594159813E-01 z6 : -1.75902322576993E+00 -8.47284755536164E-01 z7 : -1.39597606600526E+00 -5.78232219287619E-01 == err : 5.302E-15 = rco : 4.293E-03 = res : 2.417E-15 == solution 145 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 6.67858951244150E-01 5.65846555796723E-01 z1 : 1.65764374677376E-01 4.21733642878486E-01 z2 : -3.72055936151213E+00 -4.36573345463573E+00 z3 : 3.40842642159449E-02 -2.26083656018699E-01 z4 : 2.98539813472710E+00 2.23140494426294E+00 z5 : -1.30338885210533E-01 5.84199285963091E-01 z6 : -6.76988410960760E-01 -5.50001152419301E-01 z7 : -2.49098599692439E-01 9.55950401807405E-01 == err : 6.992E-15 = rco : 2.976E-03 = res : 2.220E-15 == solution 146 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -4.77249491304219E-01 -3.78309508111052E-01 z1 : -1.48038590566835E+00 -2.65508265982593E+00 z2 : 1.67404519484986E+00 7.11795049775824E-01 z3 : 1.23327189581161E-01 5.66049379188471E-01 z4 : 3.85585555425111E-01 1.44500690364673E+00 z5 : 3.93533538084113E-01 1.30247982623898E-01 z6 : -9.61269847717917E-02 -5.47541987863616E-01 z7 : -1.44660862870718E+00 3.45151408200577E-01 == err : 4.570E-15 = rco : 1.893E-02 = res : 1.554E-15 == solution 147 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : -1.39784145815692E+00 9.60027060258230E-01 z1 : 4.48004871389889E-01 -3.16645615451046E-02 z2 : -2.61814064932106E+00 1.12937503593473E+00 z3 : -2.73857773878833E-01 4.21026333652447E-02 z4 : 2.91976572153700E-01 -1.57703737659417E+00 z5 : 5.00536211242929E-01 1.45374429050366E-01 z6 : 8.53683342218508E-01 -1.27994559275532E+00 z7 : 1.27175935184050E+00 2.29084939920934E-01 == err : 7.354E-15 = rco : 8.341E-03 = res : 9.305E-16 == solution 148 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : z0 : 2.46759052888745E+00 2.03404096007138E+00 z1 : 8.03979191315074E-01 1.45143136525441E-01 z2 : -6.68946311965028E-02 2.06201201385467E-01 z3 : -6.79500672230414E-01 -6.69818715623073E-01 z4 : -3.43658819409923E+00 -4.34139043550008E-01 z5 : 1.04894244428220E+00 -1.84700101221373E-01 z6 : 1.24566640731491E-01 -2.68431837925986E-01 z7 : -1.18597484020136E+00 -1.21097903202694E+00 == err : 4.442E-15 = rco : 5.618E-03 = res : 1.738E-15 == SHAR_EOF fi # end of overwriting check if test -f 'fbrfive12' then echo shar: will not over-write existing file "'fbrfive12'" else cat << "SHAR_EOF" > 'fbrfive12' 12 a1*ba1 - 1; a2*ba2 - 1; a3*ba3 - 1; a4*ba4 - 1; ( -0.341202796998 - 0.40458818397*i)*a1*x + ( -0.341202796998 + 0.40458818397*i)*ba1*bx + (0.804578095092 - 0.455949484254*i)*bx + (0.804578095092 + 0.455949484254*i)*x - 0.575124896007; ( -0.717258427816 - 0.0375980833196*i)*a2*x + ( -0.717258427816 + 0.0375980833196*i)*ba2*bx + (0.804578095092 - 0.455949484254*i)*bx + (0.804578095092 + 0.455949484254*i)*x - 0.339362575152; ( -0.719882934354 + 0.0724833258428*i)*a3*x + ( -0.719882934354 - 0.0724833258428*i)*ba3*bx + (0.804578095092 - 0.455949484254*i)*bx + (0.804578095092 + 0.455949484254*i)*x - 0.331750571595; ( -0.858127587882 - 0.449623745342*i)*a4*x + ( -0.858127587882 + 0.449623745342*i)*ba4*bx + (0.804578095092 - 0.455949484254*i)*bx + (0.804578095092 + 0.455949484254*i)*x + 0.0833086261661; (0.289666784308 - 0.429646129429*i)*a1*y + (0.289666784308 + 0.429646129429*i)*ba1*by + (0.173708513787 - 0.481007429713*i)*by + (0.173708513787 + 0.481007429713*i)*y + 0.00695984726352; ( -0.0863888465101 - 0.0626560287783*i)*a2*y + ( -0.0863888465101 + 0.0626560287783*i)*ba2*by + (0.173708513787 - 0.481007429713*i)*by + (0.173708513787 + 0.481007429713*i)*y - 0.250153984457; ( -0.0890133530484 + 0.0474253803841*i)*a3*y + ( -0.0890133530484 - 0.0474253803841*i)*ba3*by + (0.173708513787 - 0.481007429713*i)*by + (0.173708513787 + 0.481007429713*i)*y - 0.251370251475; ( -0.227258006576 - 0.474681690801*i)*a4*y + ( -0.227258006576 + 0.474681690801*i)*ba4*by + (0.173708513787 - 0.481007429713*i)*by + (0.173708513787 + 0.481007429713*i)*y + 0.0154261139338; TITLE : Four-bar linkage whose coupler curve passes through five points. ROOT COUNTS : total degree : 4096 m-homogeneous Bezout bound : 96 with partition : {a1 ba1 }{a2 ba2 }{a3 ba3 }{a4 ba4 }{x bx }{y by } mixed volume : 36 REFERENCES : Wampler, C.W.: "Isotropic coordinates, circularity and Bezout numbers: planar kinematics from a new perspective" , Publication R&D-8188, General Motors Corporation, Research and Development Center. Proceedings of the 1996 ASME Design Engineering Technical Conference, Irvine, California August 18-22, 1996. CD-ROM edited by McCarthy, J.M., American society of mechanical engineers. The formulation above is derived from randomly chosen complex numbers, for the isotropic coordinates. THE SOLUTIONS : 36 12 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 9.82751450867973E-01 1.84931300262811E-01 ba1 : 9.82751450867973E-01 -1.84931300262811E-01 a2 : 8.56641099115972E-01 5.15912809789968E-01 ba2 : 8.56641099115972E-01 -5.15912809789967E-01 a3 : -1.42123614469112E-01 9.89848916860667E-01 ba3 : -1.42123614469112E-01 -9.89848916860667E-01 a4 : 3.54575269227796E-01 9.35027474704373E-01 ba4 : 3.54575269227796E-01 -9.35027474704372E-01 x : 5.37811114799385E-01 -1.06123913869852E+00 bx : 5.37811114799386E-01 1.06123913869852E+00 y : -8.05270444664818E-02 -3.54549318016547E-01 by : -8.05270444664817E-02 3.54549318016547E-01 == err : 3.279E-15 = rco : 8.129E-04 = res : 4.475E-16 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : -5.07550439495926E-01 8.61622046704640E-01 ba1 : -5.07550439495926E-01 -8.61622046704640E-01 a2 : -8.85505019008293E-01 4.64629811044366E-01 ba2 : -8.85505019008293E-01 -4.64629811044366E-01 a3 : -9.43643343811330E-01 3.30964106332655E-01 ba3 : -9.43643343811329E-01 -3.30964106332655E-01 a4 : 9.95875188136111E-01 9.07337294222246E-02 ba4 : 9.95875188136111E-01 -9.07337294222246E-02 x : 5.32080766199881E-02 -5.90752167855135E-01 bx : 5.32080766199883E-02 5.90752167855135E-01 y : 1.77071366419852E+00 7.44464235315417E-01 by : 1.77071366419853E+00 -7.44464235315412E-01 == err : 1.089E-14 = rco : 1.443E-03 = res : 3.240E-16 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : -9.67293863406549E-01 -2.53658395910783E-01 ba1 : -9.67293863406550E-01 2.53658395910783E-01 a2 : 9.89628248684314E-01 1.43652112431447E-01 ba2 : 9.89628248684314E-01 -1.43652112431447E-01 a3 : 9.53420189156891E-01 3.01645392651767E-01 ba3 : 9.53420189156891E-01 -3.01645392651767E-01 a4 : 9.95814057759126E-01 9.14022011184858E-02 ba4 : 9.95814057759126E-01 -9.14022011184859E-02 x : -2.91350510980996E-01 -6.29899792895949E-01 bx : -2.91350510980996E-01 6.29899792895949E-01 y : 6.22620282691800E-01 -1.58754316407521E-01 by : 6.22620282691800E-01 1.58754316407521E-01 == err : 3.889E-15 = rco : 3.482E-03 = res : 1.388E-16 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 5.86346104015055E-01 -8.10060643597976E-01 ba1 : 5.86346104015055E-01 8.10060643597976E-01 a2 : 9.82911735093320E-01 1.84077486444809E-01 ba2 : 9.82911735093320E-01 -1.84077486444809E-01 a3 : 9.40928682377231E-01 3.38604806049541E-01 ba3 : 9.40928682377231E-01 -3.38604806049541E-01 a4 : 9.95957056909425E-01 8.98306227982205E-02 ba4 : 9.95957056909425E-01 -8.98306227982205E-02 x : -5.58958929251740E-02 -6.12044754158336E-01 bx : -5.58958929251736E-02 6.12044754158337E-01 y : 5.65894334350677E-01 -1.69263337603636E-01 by : 5.65894334350677E-01 1.69263337603636E-01 == err : 5.419E-15 = rco : 6.020E-03 = res : 1.119E-16 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 5.84499955846301E-01 -8.00927118534482E-01 ba1 : 5.94533029140056E-01 8.14675212786392E-01 a2 : -1.40783242757353E+00 1.49432988491258E+00 ba2 : -3.34004215545718E-01 -3.54525489824806E-01 a3 : -1.60878814237233E+00 1.27494322006191E+00 ba3 : -3.81801259879948E-01 -3.02572423847699E-01 a4 : 9.76747030573745E-01 9.66910134711030E-02 ba4 : 1.01387101918699E+00 -1.00366024472668E-01 x : 6.54269901888955E-02 -3.28326558155533E-01 bx : 2.45198947827538E-01 6.65270362443288E-01 y : -1.42177193362904E-01 7.31524928309792E-02 by : 2.19375120418369E-01 6.11788889151295E-01 == err : 4.324E-15 = rco : 2.292E-04 = res : 2.392E-16 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 8.34080812629885E-01 5.51642273581958E-01 ba1 : 8.34080812629884E-01 -5.51642273581958E-01 a2 : -3.06451062150426E-01 9.51886414708644E-01 ba2 : -3.06451062150426E-01 -9.51886414708643E-01 a3 : -4.52818665918518E-01 8.91602633349506E-01 ba3 : -4.52818665918518E-01 -8.91602633349506E-01 a4 : -4.36392745983793E-02 9.99047353088195E-01 ba4 : -4.36392745983792E-02 -9.99047353088194E-01 x : 5.81836051092208E-01 -2.07715961140398E+00 bx : 5.81836051092209E-01 2.07715961140398E+00 y : -1.84578855714090E-01 -4.13983005870054E-01 by : -1.84578855714090E-01 4.13983005870054E-01 == err : 5.993E-15 = rco : 4.046E-04 = res : 6.753E-16 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 1.44222648505760E+00 -2.91513961255178E+00 ba1 : 1.36341352181227E-01 2.75583676135648E-01 a2 : -8.25239094542344E-01 -1.56073796119156E+00 ba2 : -2.64760860171261E-01 5.00730428114510E-01 a3 : -6.07527661657120E-01 -1.68406401837341E+00 ba3 : -1.89546662747530E-01 5.25422519305847E-01 a4 : 9.26522608459346E-01 8.49850912970489E-02 ba4 : 1.07029957959140E+00 -9.81730037198110E-02 x : -2.11555520771607E-01 3.12707267343362E-02 bx : 2.51352068848403E-01 5.18006222545348E-01 y : 4.70269690315070E-02 -9.15586136292947E-02 by : 1.24368653492911E-01 2.98722380936683E-01 == err : 8.694E-15 = rco : 4.354E-04 = res : 2.220E-16 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 6.40827593951034E-01 -7.64196705001035E-01 ba1 : 6.44270181373063E-01 7.68302043144126E-01 a2 : 2.81618984876343E-01 9.63836260026193E-01 ba2 : 2.79303672287205E-01 -9.55912141459800E-01 a3 : 1.37680644006214E-01 9.94616772326237E-01 ba3 : 1.36558341525959E-01 -9.86509163021082E-01 a4 : 8.71262894216621E-01 2.36387515995789E-01 ba4 : 1.06906296801043E+00 -2.90053830053548E-01 x : 4.10643845365671E-01 -3.80097858407307E-01 bx : 4.10128329376764E-01 3.83183749403624E-01 y : 5.24290013147708E-02 -2.98380116584258E-01 by : 5.33809413311162E-02 3.00741174460712E-01 == err : 1.170E-14 = rco : 1.971E-03 = res : 1.466E-16 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 3.51654030835783E-01 -5.19060323233939E-01 ba1 : 8.94602356966670E-01 1.32048134773069E+00 a2 : 7.59250191928317E-01 9.87565025818627E-02 ba2 : 1.29517647056510E+00 -1.68465019593181E-01 a3 : -4.09622237754899E-01 7.61826082759131E-01 ba3 : -5.47499350722526E-01 -1.01825352051244E+00 a4 : 1.08040765703930E+00 1.01767052269985E-01 ba4 : 9.17436729992898E-01 -8.64162994840706E-02 x : 4.22897870061056E-01 -3.59147292204479E-01 bx : 4.46198074353932E-02 3.66755463384729E-01 y : 1.30151402987817E-01 -3.38695015587987E-01 by : 8.46054145459795E-02 2.21230007239064E-01 == err : 3.484E-15 = rco : 3.099E-03 = res : 7.850E-17 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 5.80683262506650E-01 -8.14129565023058E-01 ba1 : 5.80683262506650E-01 8.14129565023058E-01 a2 : 8.01898112740884E-01 -5.97460807737719E-01 ba2 : 8.01898112740884E-01 5.97460807737720E-01 a3 : 8.58981949795661E-01 5.12005869033983E-01 ba3 : 8.58981949795662E-01 -5.12005869033983E-01 a4 : 4.02174241556444E-01 -9.15563148793407E-01 ba4 : 4.02174241556445E-01 9.15563148793408E-01 x : 1.20647775640219E+00 9.36345200908908E-02 bx : 1.20647775640219E+00 -9.36345200908919E-02 y : 3.24771126859958E-01 -2.14184209895579E-01 by : 3.24771126859958E-01 2.14184209895579E-01 == err : 2.313E-15 = rco : 1.358E-03 = res : 4.965E-16 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 6.66376275153194E-01 -9.61790884862650E-01 ba1 : 4.86726126176197E-01 7.02499127048236E-01 a2 : 4.69201657843603E-01 9.05341076014495E-01 ba2 : 4.51245403102795E-01 -8.70693851912716E-01 a3 : 3.32524607404665E-01 9.65246693333123E-01 ba3 : 3.19037674622522E-01 -9.26097057542930E-01 a4 : 8.29736844351810E-01 6.67297512702328E-02 ba4 : 1.19745645343277E+00 -9.63027878518834E-02 x : 4.04563106130559E-01 -3.26901586306574E-01 bx : 5.08652823646773E-01 3.02042217209941E-01 y : 1.05593527992970E-01 -2.73116576225062E-01 by : 1.09651154224356E-01 2.84400945451860E-01 == err : 4.461E-15 = rco : 2.736E-03 = res : 2.220E-16 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : -1.03374011232280E+00 5.99954631650025E-01 ba1 : -7.23621750351877E-01 -4.19970373124827E-01 a2 : 1.47153153070572E-02 3.54664026003581E-02 ba2 : 9.98050274574271E+00 -2.40547022709552E+01 a3 : -2.39301486718584E-02 2.70555987252102E-02 ba3 : -1.83420934705552E+01 -2.07377032012856E+01 a4 : 1.18530543076811E+00 2.34052030115563E-02 ba4 : 8.43335579260776E-01 -1.66526195924673E-02 x : 3.34803931332392E-01 -1.60553319642082E-01 bx : -9.27794256879190E-04 5.90051132256030E-05 y : 4.12749367459120E-02 -5.72686811002600E-02 by : 2.76331602387450E-02 -8.68452347615003E-02 == err : 4.151E-14 = rco : 8.108E-06 = res : 2.220E-16 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 5.66819376085109E-01 -8.23842093422330E-01 ba1 : 5.66819376085109E-01 8.23842093422330E-01 a2 : 8.28940727752140E-01 -5.59336454983717E-01 ba2 : 8.28940727752140E-01 5.59336454983717E-01 a3 : 8.52362852776627E-01 5.22950826757632E-01 ba3 : 8.52362852776627E-01 -5.22950826757632E-01 a4 : 9.99425779881994E-01 3.38837794123805E-02 ba4 : 9.99425779881995E-01 -3.38837794123805E-02 x : 1.13337718332122E+00 5.38858402503799E-02 bx : 1.13337718332122E+00 -5.38858402503801E-02 y : 1.99684727516523E-01 -2.33955256169607E-01 by : 1.99684727516523E-01 2.33955256169607E-01 == err : 2.227E-15 = rco : 2.375E-03 = res : 3.377E-16 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 6.93446263798674E-01 -6.97473349701262E-01 ba1 : 7.16861250260055E-01 7.21024315209342E-01 a2 : 9.78227635330345E-01 1.37177545794991E-01 ba2 : 1.00254230837772E+00 -1.40587209410066E-01 a3 : 2.56050208654149E-01 9.52302418080639E-01 ba3 : 2.63306513605864E-01 -9.79290081118174E-01 a4 : 8.33724448328555E-01 2.03671500320789E-01 ba4 : 1.13188805785866E+00 -2.76510229970380E-01 x : 4.67889489415477E-01 -3.90288499566611E-01 bx : 4.50483816488714E-01 3.86539580556934E-01 y : 6.25290402759880E-02 -2.92856253985318E-01 by : 6.13303870074971E-02 2.92357825419265E-01 == err : 4.882E-15 = rco : 3.397E-03 = res : 2.283E-16 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 2.15854908155414E+00 -3.15858788593838E+00 ba1 : 1.47482056237170E-01 2.15809332391278E-01 a2 : 7.96681990696653E-01 -1.24912779152957E+00 ba2 : 3.62949361429232E-01 5.69072904337549E-01 a3 : 1.45164435205178E+00 1.22385173273606E-01 ba3 : 6.84012121337893E-01 -5.76676662385404E-02 a4 : 9.43510943026503E-01 9.79661673978685E-02 ba4 : 1.04856654223587E+00 -1.08874249062735E-01 x : -2.51207564775745E-01 2.25329652771993E-01 bx : 1.11256875363069E-01 7.35865844307878E-01 y : 4.15766144278786E-02 -9.41891746898892E-02 by : 1.16247295066729E-01 3.66309789144059E-01 == err : 1.900E-14 = rco : 5.399E-04 = res : 2.124E-16 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : -7.23621750351877E-01 4.19970373124827E-01 ba1 : -1.03374011232280E+00 -5.99954631650025E-01 a2 : 9.98050274574272E+00 2.40547022709552E+01 ba2 : 1.47153153070572E-02 -3.54664026003581E-02 a3 : -1.83420934705552E+01 2.07377032012856E+01 ba3 : -2.39301486718584E-02 -2.70555987252102E-02 a4 : 8.43335579260776E-01 1.66526195924673E-02 ba4 : 1.18530543076811E+00 -2.34052030115563E-02 x : -9.27794256879190E-04 -5.90051132256032E-05 bx : 3.34803931332392E-01 1.60553319642082E-01 y : 2.76331602387449E-02 8.68452347615003E-02 by : 4.12749367459119E-02 5.72686811002600E-02 == err : 3.931E-14 = rco : 7.378E-06 = res : 1.110E-16 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 8.97947737243556E-01 4.40102103129691E-01 ba1 : 8.97947737243556E-01 -4.40102103129691E-01 a2 : 9.69827121065192E-01 2.43793673515949E-01 ba2 : 9.69827121065192E-01 -2.43793673515949E-01 a3 : 1.91951532914574E-01 9.81404406456251E-01 ba3 : 1.91951532914574E-01 -9.81404406456251E-01 a4 : 9.91795243137984E-01 1.27836597611435E-01 ba4 : 9.91795243137984E-01 -1.27836597611435E-01 x : 4.65117817920137E-01 -4.69040702576342E-01 bx : 4.65117817920137E-01 4.69040702576342E-01 y : -1.29838210760656E-01 -3.47552123056515E-01 by : -1.29838210760656E-01 3.47552123056515E-01 == err : 1.043E-15 = rco : 8.840E-03 = res : 2.276E-16 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 5.83927477969023E-01 -8.11805826828519E-01 ba1 : 5.83927477969023E-01 8.11805826828519E-01 a2 : 9.44549861043735E-01 3.28368025243416E-01 ba2 : 9.44549861043735E-01 -3.28368025243417E-01 a3 : 8.81111493039487E-01 4.72908592471871E-01 ba3 : 8.81111493039487E-01 -4.72908592471871E-01 a4 : 1.22640697477968E-01 -9.92451136994722E-01 ba4 : 1.22640697477968E-01 9.92451136994723E-01 x : 1.72266423393785E+00 3.81388671167225E-01 bx : 1.72266423393785E+00 -3.81388671167227E-01 y : 4.18469706943876E-01 -1.98044030061399E-01 by : 4.18469706943876E-01 1.98044030061399E-01 == err : 1.261E-14 = rco : 8.501E-04 = res : 4.003E-16 == solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 5.54789618999254E-02 -9.98459856372056E-01 ba1 : 5.54789618999254E-02 9.98459856372056E-01 a2 : 6.87662603208105E-01 7.26030401669967E-01 ba2 : 6.87662603208105E-01 -7.26030401669967E-01 a3 : 5.74509846287377E-01 8.18497670441923E-01 ba3 : 5.74509846287377E-01 -8.18497670441923E-01 a4 : 9.07745540086883E-01 -4.19521196666358E-01 ba4 : 9.07745540086883E-01 4.19521196666358E-01 x : 5.30483425771761E-01 -1.09904193402917E-01 bx : 5.30483425771761E-01 1.09904193402917E-01 y : 1.91379614513801E-01 -2.51854814844587E-01 by : 1.91379614513801E-01 2.51854814844587E-01 == err : 6.423E-15 = rco : 2.832E-03 = res : 2.220E-16 == solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 6.44270181373062E-01 -7.68302043144126E-01 ba1 : 6.40827593951034E-01 7.64196705001036E-01 a2 : 2.79303672287204E-01 9.55912141459801E-01 ba2 : 2.81618984876343E-01 -9.63836260026192E-01 a3 : 1.36558341525959E-01 9.86509163021082E-01 ba3 : 1.37680644006213E-01 -9.94616772326236E-01 a4 : 1.06906296801043E+00 2.90053830053549E-01 ba4 : 8.71262894216622E-01 -2.36387515995789E-01 x : 4.10128329376764E-01 -3.83183749403624E-01 bx : 4.10643845365671E-01 3.80097858407307E-01 y : 5.33809413311161E-02 -3.00741174460712E-01 by : 5.24290013147707E-02 2.98380116584258E-01 == err : 3.105E-15 = rco : 2.022E-03 = res : 2.220E-16 == solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 1.36341352181226E-01 -2.75583676135647E-01 ba1 : 1.44222648505761E+00 2.91513961255180E+00 a2 : -2.64760860171261E-01 -5.00730428114509E-01 ba2 : -8.25239094542346E-01 1.56073796119156E+00 a3 : -1.89546662747530E-01 -5.25422519305846E-01 ba3 : -6.07527661657122E-01 1.68406401837341E+00 a4 : 1.07029957959140E+00 9.81730037198110E-02 ba4 : 9.26522608459345E-01 -8.49850912970489E-02 x : 2.51352068848403E-01 -5.18006222545347E-01 bx : -2.11555520771606E-01 -3.12707267343361E-02 y : 1.24368653492911E-01 -2.98722380936684E-01 by : 4.70269690315069E-02 9.15586136292945E-02 == err : 5.104E-15 = rco : 4.251E-04 = res : 2.256E-16 == solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 7.16861250260055E-01 -7.21024315209345E-01 ba1 : 6.93446263798671E-01 6.97473349701262E-01 a2 : 1.00254230837772E+00 1.40587209410064E-01 ba2 : 9.78227635330344E-01 -1.37177545794989E-01 a3 : 2.63306513605867E-01 9.79290081118174E-01 ba3 : 2.56050208654151E-01 -9.52302418080637E-01 a4 : 1.13188805785866E+00 2.76510229970380E-01 ba4 : 8.33724448328552E-01 -2.03671500320788E-01 x : 4.50483816488714E-01 -3.86539580556933E-01 bx : 4.67889489415478E-01 3.90288499566610E-01 y : 6.13303870074974E-02 -2.92357825419264E-01 by : 6.25290402759885E-02 2.92856253985318E-01 == err : 3.727E-15 = rco : 3.470E-03 = res : 3.331E-16 == solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 5.75266162136235E-01 -7.93293088189948E-01 ba1 : 5.99082644084859E-01 8.26136060292955E-01 a2 : 5.07220827978323E-01 2.77636644124687E+00 ba2 : 6.36773427002746E-02 -3.48549640687023E-01 a3 : 1.02866664895249E+00 3.11601658427194E-01 ba3 : 8.90427226978993E-01 -2.69726447258617E-01 a4 : 9.52930593537918E-01 8.83856268887854E-02 ba4 : 1.04044362265375E+00 -9.65025810424161E-02 x : 2.02358499973133E-01 -1.61002177570343E-01 bx : 4.52037570872707E-01 6.40342628302700E-01 y : 1.05769256510741E-01 -7.97380822576972E-02 by : 1.58281903535200E-01 3.83166969118785E-01 == err : 1.603E-14 = rco : 9.635E-04 = res : 2.220E-16 == solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 8.94602356966674E-01 -1.32048134773069E+00 ba1 : 3.51654030835783E-01 5.19060323233937E-01 a2 : 1.29517647056510E+00 1.68465019593182E-01 ba2 : 7.59250191928315E-01 -9.87565025818632E-02 a3 : -5.47499350722526E-01 1.01825352051244E+00 ba3 : -4.09622237754898E-01 -7.61826082759130E-01 a4 : 9.17436729992898E-01 8.64162994840705E-02 ba4 : 1.08040765703930E+00 -1.01767052269985E-01 x : 4.46198074353921E-02 -3.66755463384728E-01 bx : 4.22897870061057E-01 3.59147292204478E-01 y : 8.46054145459793E-02 -2.21230007239063E-01 by : 1.30151402987817E-01 3.38695015587987E-01 == err : 3.112E-15 = rco : 2.892E-03 = res : 2.220E-16 == solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 3.53867390786647E-01 -7.40617183364719E-01 ba1 : 5.25231575806248E-01 1.09926921896674E+00 a2 : 7.86814362032851E-01 -8.44667099630645E-02 ba2 : 1.25646751219873E+00 1.34885281779430E-01 a3 : 3.80040282278466E-01 6.73802935616961E-01 ba3 : 6.35050530512848E-01 -1.12593041232175E+00 a4 : 1.12000873533440E+00 2.68022458481894E-02 ba4 : 8.92339169025823E-01 -2.13540243336212E-02 x : 5.83182362533934E-01 -3.26733608827010E-01 bx : 3.76623766576485E-01 1.58903308225129E-01 y : 1.47323765602171E-01 -2.85540999394609E-01 by : 1.21094670003757E-01 2.49156335577983E-01 == err : 1.244E-14 = rco : 7.240E-04 = res : 3.335E-16 == solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 4.55906528910997E-01 -9.69616844879830E-01 ba1 : 3.97128497483808E-01 8.44608393000860E-01 a2 : 1.09132676402838E+00 -1.93150057117165E-01 ba2 : 8.88484760010127E-01 1.57249769546773E-01 a3 : 6.17507155452057E-01 9.35125659327144E-01 ba3 : 4.91733880096159E-01 -7.44660146491399E-01 a4 : 8.75277045012626E-01 -2.30152915942946E-02 ba4 : 1.14170600441136E+00 3.00210050705778E-02 x : 4.87403733451099E-01 -1.68688908265233E-01 bx : 5.81051048838036E-01 2.71102828055631E-01 y : 1.34373581079592E-01 -2.59259706293345E-01 by : 1.44652289151356E-01 2.67024928665058E-01 == err : 6.143E-15 = rco : 1.040E-03 = res : 2.238E-16 == solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 5.98182626802471E-01 -8.22838930188607E-01 ba1 : 5.78017693438396E-01 7.95100758845663E-01 a2 : 9.31410134673744E-01 1.34093599949173E-01 ba2 : 1.05183951960977E+00 -1.51431622335405E-01 a3 : -7.18468764008540E-02 3.34649968873512E-01 ba3 : -6.13276116272330E-01 -2.85653104912107E+00 a4 : 1.03322889662301E+00 9.83386202283617E-02 ba4 : 9.59151303925725E-01 -9.12882093469986E-02 x : 4.07453650829184E-01 -6.59241121554751E-01 bx : 1.61242793297522E-01 1.90369017290981E-01 y : 1.72945324245753E-01 -4.23116907694665E-01 by : 9.81794420788301E-02 1.23330096786668E-01 == err : 3.966E-14 = rco : 7.382E-04 = res : 2.251E-16 == solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 5.94533029140056E-01 -8.14675212786392E-01 ba1 : 5.84499955846301E-01 8.00927118534481E-01 a2 : -3.34004215545716E-01 3.54525489824815E-01 ba2 : -1.40783242757349E+00 -1.49432988491259E+00 a3 : -3.81801259879947E-01 3.02572423847709E-01 ba3 : -1.60878814237229E+00 -1.27494322006192E+00 a4 : 1.01387101918699E+00 1.00366024472669E-01 ba4 : 9.76747030573745E-01 -9.66910134711034E-02 x : 2.45198947827540E-01 -6.65270362443283E-01 bx : 6.54269901889003E-02 3.28326558155534E-01 y : 2.19375120418362E-01 -6.11788889151299E-01 by : -1.42177193362911E-01 -7.31524928309745E-02 == err : 3.358E-14 = rco : 2.079E-04 = res : 1.552E-16 == solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 3.97128497483808E-01 -8.44608393000859E-01 ba1 : 4.55906528910998E-01 9.69616844879831E-01 a2 : 8.88484760010126E-01 -1.57249769546771E-01 ba2 : 1.09132676402838E+00 1.93150057117164E-01 a3 : 4.91733880096157E-01 7.44660146491399E-01 ba3 : 6.17507155452057E-01 -9.35125659327147E-01 a4 : 1.14170600441136E+00 -3.00210050705763E-02 ba4 : 8.75277045012627E-01 2.30152915942934E-02 x : 5.81051048838036E-01 -2.71102828055632E-01 bx : 4.87403733451097E-01 1.68688908265233E-01 y : 1.44652289151356E-01 -2.67024928665058E-01 by : 1.34373581079592E-01 2.59259706293345E-01 == err : 1.122E-14 = rco : 9.496E-04 = res : 2.220E-16 == solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 5.99082644084859E-01 -8.26136060292955E-01 ba1 : 5.75266162136235E-01 7.93293088189948E-01 a2 : 6.36773427002765E-02 3.48549640687024E-01 ba2 : 5.07220827978336E-01 -2.77636644124687E+00 a3 : 8.90427226978993E-01 2.69726447258616E-01 ba3 : 1.02866664895249E+00 -3.11601658427194E-01 a4 : 1.04044362265375E+00 9.65025810424160E-02 ba4 : 9.52930593537919E-01 -8.83856268887854E-02 x : 4.52037570872708E-01 -6.40342628302699E-01 bx : 2.02358499973134E-01 1.61002177570343E-01 y : 1.58281903535200E-01 -3.83166969118785E-01 by : 1.05769256510742E-01 7.97380822576970E-02 == err : 1.784E-14 = rco : 8.997E-04 = res : 2.431E-16 == solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 4.86726126176197E-01 -7.02499127048237E-01 ba1 : 6.66376275153194E-01 9.61790884862650E-01 a2 : 4.51245403102796E-01 8.70693851912715E-01 ba2 : 4.69201657843605E-01 -9.05341076014495E-01 a3 : 3.19037674622522E-01 9.26097057542930E-01 ba3 : 3.32524607404665E-01 -9.65246693333123E-01 a4 : 1.19745645343277E+00 9.63027878518824E-02 ba4 : 8.29736844351810E-01 -6.67297512702322E-02 x : 5.08652823646773E-01 -3.02042217209941E-01 bx : 4.04563106130559E-01 3.26901586306573E-01 y : 1.09651154224357E-01 -2.84400945451860E-01 by : 1.05593527992970E-01 2.73116576225061E-01 == err : 5.248E-15 = rco : 2.287E-03 = res : 2.220E-16 == solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 1.47482056237170E-01 -2.15809332391278E-01 ba1 : 2.15854908155415E+00 3.15858788593838E+00 a2 : 3.62949361429232E-01 -5.69072904337548E-01 ba2 : 7.96681990696654E-01 1.24912779152957E+00 a3 : 6.84012121337892E-01 5.76676662385404E-02 ba3 : 1.45164435205179E+00 -1.22385173273606E-01 a4 : 1.04856654223587E+00 1.08874249062735E-01 ba4 : 9.43510943026503E-01 -9.79661673978686E-02 x : 1.11256875363070E-01 -7.35865844307877E-01 bx : -2.51207564775744E-01 -2.25329652771992E-01 y : 1.16247295066729E-01 -3.66309789144059E-01 by : 4.15766144278784E-02 9.41891746898892E-02 == err : 2.702E-14 = rco : 5.750E-04 = res : 2.220E-16 == solution 33 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 9.08392883687729E-01 -1.50968152011738E+00 ba1 : 2.92622563594198E-01 4.86316972050825E-01 a2 : -4.26270063901832E-01 1.14487574962940E+00 ba2 : -2.85618292656344E-01 -7.67113350441862E-01 a3 : 1.32999647456897E+00 3.71215621281882E-01 ba3 : 6.97541454958633E-01 -1.94690955595393E-01 a4 : 9.05880957805788E-01 7.77628427599359E-02 ba4 : 1.09582280770468E+00 -9.40678749829285E-02 x : 2.43134626981264E-02 -3.19180931795601E-01 bx : 4.33564833438156E-01 3.27856655530016E-01 y : 7.32532369546443E-02 -1.75269267534994E-01 by : 1.22819657747432E-01 2.94837409939743E-01 == err : 1.959E-15 = rco : 3.614E-03 = res : 1.391E-16 == solution 34 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 5.25231575806241E-01 -1.09926921896675E+00 ba1 : 3.53867390786640E-01 7.40617183364719E-01 a2 : 1.25646751219874E+00 -1.34885281779439E-01 ba2 : 7.86814362032844E-01 8.44667099630685E-02 a3 : 6.35050530512860E-01 1.12593041232175E+00 ba3 : 3.80040282278467E-01 -6.73802935616954E-01 a4 : 8.92339169025826E-01 2.13540243336211E-02 ba4 : 1.12000873533440E+00 -2.68022458481891E-02 x : 3.76623766576482E-01 -1.58903308225123E-01 bx : 5.83182362533936E-01 3.26733608827011E-01 y : 1.21094670003757E-01 -2.49156335577982E-01 by : 1.47323765602172E-01 2.85540999394609E-01 == err : 6.440E-15 = rco : 7.671E-04 = res : 2.818E-16 == solution 35 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 2.92622563594199E-01 -4.86316972050825E-01 ba1 : 9.08392883687731E-01 1.50968152011738E+00 a2 : -2.85618292656345E-01 7.67113350441862E-01 ba2 : -4.26270063901834E-01 -1.14487574962940E+00 a3 : 6.97541454958633E-01 1.94690955595394E-01 ba3 : 1.32999647456897E+00 -3.71215621281883E-01 a4 : 1.09582280770468E+00 9.40678749829288E-02 ba4 : 9.05880957805788E-01 -7.77628427599361E-02 x : 4.33564833438156E-01 -3.27856655530017E-01 bx : 2.43134626981261E-02 3.19180931795602E-01 y : 1.22819657747431E-01 -2.94837409939743E-01 by : 7.32532369546441E-02 1.75269267534994E-01 == err : 8.169E-15 = rco : 4.898E-03 = res : 2.285E-16 == solution 36 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a1 : 5.78017693438396E-01 -7.95100758845663E-01 ba1 : 5.98182626802471E-01 8.22838930188607E-01 a2 : 1.05183951960977E+00 1.51431622335405E-01 ba2 : 9.31410134673745E-01 -1.34093599949173E-01 a3 : -6.13276116272363E-01 2.85653104912106E+00 ba3 : -7.18468764008578E-02 -3.34649968873511E-01 a4 : 9.59151303925725E-01 9.12882093469989E-02 ba4 : 1.03322889662301E+00 -9.83386202283620E-02 x : 1.61242793297520E-01 -1.90369017290982E-01 bx : 4.07453650829182E-01 6.59241121554752E-01 y : 9.81794420788288E-02 -1.23330096786669E-01 by : 1.72945324245751E-01 4.23116907694665E-01 == err : 1.731E-14 = rco : 9.344E-04 = res : 1.241E-16 == SHAR_EOF fi # end of overwriting check if test -f 'fbrfive4' then echo shar: will not over-write existing file "'fbrfive4'" else cat << "SHAR_EOF" > 'fbrfive4' 4 0.141050018728*i*bx**2*by*y - 0.00097847866344*bx**2*by*y + 0.0782395368483*i*bx**2*y**2 + 0.00123918464673*i*bx**2*y + 0.00969424108804*bx**2*y**2 + 0.00125705255662*bx**2*y + 0.0328315845569*i*bx*by**2*x - 0.0725922104353*bx*by**2*x + 0.000160324879058*i*bx*by*x - 0.14642522425*i*bx*by*y - 0.2391158765*bx*by*x*y - 0.00109445130977*bx*by*x + 0.168022431284*bx*by*y - 0.0328315845569*i*bx*x*y**2 - 0.000160324879058*i*bx*x*y - 0.0471003874787*i*bx*y**2 - 0.00105590259776*i*bx*y - 0.0725922104353*bx*x*y**2 - 0.00109445130977*bx*x*y - 0.0000135684269291*bx*x + 0.0654830371929*bx*y**2 - 0.000300187113597*bx*y - 0.0782395368483*i*by**2*x**2 + 0.0471003874787*i*by**2*x + 0.00969424108804*by**2*x**2 + 0.0654830371929*by**2*x - 0.141050018728*i*by*x**2*y - 0.00123918464673*i*by*x**2 + 0.14642522425*i*by*x*y + 0.00105590259776*i*by*x - 0.00097847866344*by*x**2*y + 0.00125705255662*by*x**2 + 0.168022431284*by*x*y - 0.000300187113597*by*x - 0.0888122554974*by*y; - 0.0249469889303*i*bx**2*by*y + 0.00931583747381*bx**2*by*y + 0.0294053156051*i*bx**2*y**2 - 0.00105533016484*i*bx**2*y + 0.00786359271692*bx**2*y**2 - 0.0177007048352*bx**2*y + 0.0595383104696*i*bx*by**2*x + 0.079236107727*bx*by**2*x - 0.108418415833*i*bx*by*x + 0.00451693895279*i*bx*by*y - 0.205718481117*bx*by*x*y + 0.0366433756262*bx*by*x - 0.00437803776486*bx*by*y - 0.0595383104696*i*bx*x*y**2 + 0.108418415833*i*bx*x*y - 0.0129569311769*i*bx*y**2 + 0.00353939806669*i*bx*y + 0.079236107727*bx*x*y**2 + 0.0366433756262*bx*x*y - 0.0322818097234*bx*x + 0.00301410665727*bx*y**2 + 0.00546021583064*bx*y - 0.0294053156051*i*by**2*x**2 + 0.0129569311769*i*by**2*x + 0.00786359271692*by**2*x**2 + 0.00301410665727*by**2*x + 0.0249469889303*i*by*x**2*y + 0.00105533016484*i*by*x**2 - 0.00451693895279*i*by*x*y - 0.00353939806669*i*by*x + 0.00931583747381*by*x**2*y - 0.0177007048352*by*x**2 - 0.00437803776486*by*x*y + 0.00546021583064*by*x - 0.0013116146819*by*y; - 0.0218107478514*i*bx**2*by*y - 0.0227503225264*bx**2*by*y + 0.0145785542176*i*bx**2*y**2 + 0.0133382023419*i*bx**2*y + 0.0289746279868*bx**2*y**2 - 0.0104815931774*bx**2*y + 0.0537999863131*i*bx*by**2*x + 0.112859448991*bx*by**2*x - 0.124451937985*i*bx*by*x + 0.00929216513796*i*bx*by*y - 0.249135161545*bx*by*x*y + 0.0288876047041*bx*by*x + 0.00595806356335*bx*by*y - 0.0537999863131*i*bx*x*y**2 + 0.124451937985*i*bx*x*y - 0.00917830603125*i*bx*y**2 - 0.00230902546847*i*bx*y + 0.112859448991*bx*x*y**2 + 0.0288876047041*bx*x*y - 0.0330774656043*bx*x - 0.00830926429131*bx*y**2 + 0.00563037140451*bx*y - 0.0145785542176*i*by**2*x**2 + 0.00917830603125*i*by**2*x + 0.0289746279868*by**2*x**2 - 0.00830926429131*by**2*x + 0.0218107478514*i*by*x**2*y - 0.0133382023419*i*by*x**2 - 0.00929216513796*i*by*x*y + 0.00230902546847*i*by*x - 0.0227503225264*by*x**2*y - 0.0104815931774*by*x**2 + 0.00595806356335*by*x*y + 0.00563037140451*by*x - 0.0011195743111*by*y; - 0.0114868064801*i*bx**2*by*y - 0.0119413549909*bx**2*by*y - 0.0139828726508*i*bx**2*y**2 + 0.000914652140862*i*bx**2*y - 0.0209721546687*bx**2*y**2 + 0.00721574419444*bx**2*y - 0.00930458610211*i*bx*by**2*x + 0.0140687638574*bx*by**2*x + 0.00726787677736*i*bx*by*x + 0.00908990049543*i*bx*by*y + 0.0363929678175*bx*by*x*y - 0.00210685119583*bx*by*x - 0.0189904701902*bx*by*y + 0.00930458610211*i*bx*x*y**2 - 0.00726787677736*i*bx*x*y + 0.0207832691669*i*bx*y**2 + 0.000392165732469*i*bx*y + 0.0140687638574*bx*x*y**2 - 0.00210685119583*bx*x*y - 0.000223340726321*bx*x - 0.00631749512119*bx*y**2 + 0.000524903641698*bx*y + 0.0139828726508*i*by**2*x**2 - 0.0207832691669*i*by**2*x - 0.0209721546687*by**2*x**2 - 0.00631749512119*by**2*x + 0.0114868064801*i*by*x**2*y - 0.000914652140862*i*by*x**2 - 0.00908990049543*i*by*x*y - 0.000392165732469*i*by*x - 0.0119413549909*by*x**2*y + 0.00721574419444*by*x**2 - 0.0189904701902*by*x*y + 0.000524903641698*by*x - 0.00192225485187*by*y; TITLE : Four-bar linkage through five points, 4-dimensional version. ROOT COUNTS : total degree : 256 m-homogeneous Bezout bound : 96 with partition : {bx x }{by y } mixed volume : 36 REFERENCES : Wampler, C.W.: "Isotropic coordinates, circularity and Bezout numbers: planar kinematics from a new perspective" , Publication R&D-8188, General Motors Corporation, Research and Development Center. Proceedings of the 1996 ASME Design Engineering Technical Conference, Irvine, California August 18-22, 1996. CD-ROM edited by McCarthy, J.M., American society of mechanical engineers. NOTE : the system should be scaled before solving. THE SOLUTIONS : 36 4 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 4.10643844279429E-01 3.80097858680397E-01 by : 5.24290008999790E-02 2.98380116830551E-01 y : 5.33809408978755E-02 -3.00741174670343E-01 x : 4.10128328342876E-01 -3.83183749554144E-01 == err : 2.730E-13 = rco : 6.848E-04 = res : 1.371E-18 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 5.32080766527715E-02 5.90752167831680E-01 by : 1.77071366545533E+00 -7.44464236041437E-01 y : 1.77071366545533E+00 7.44464236041427E-01 x : 5.32080766527717E-02 -5.90752167831680E-01 == err : 7.017E-13 = rco : 2.743E-03 = res : 1.536E-16 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 2.51352068853834E-01 5.18006222569402E-01 by : 1.24368653495560E-01 2.98722380938766E-01 y : 4.70269690304145E-02 -9.15586136242007E-02 x : -2.11555520756750E-01 3.12707267556329E-02 == err : 1.815E-14 = rco : 1.613E-02 = res : 1.319E-18 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 4.52037570892197E-01 6.40342628287667E-01 by : 1.58281903528209E-01 3.83166969106441E-01 y : 1.05769256504725E-01 -7.97380822738326E-02 x : 2.02358500001056E-01 -1.61002177558598E-01 == err : 8.563E-15 = rco : 6.807E-02 = res : 2.158E-18 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 4.65117817970906E-01 4.69040702572671E-01 by : -1.29838210703014E-01 3.47552123025764E-01 y : -1.29838210703012E-01 -3.47552123025768E-01 x : 4.65117817970906E-01 -4.69040702572676E-01 == err : 1.562E-14 = rco : 3.349E-02 = res : 1.564E-18 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : -2.91350510977198E-01 6.29899792895238E-01 by : 6.22620282693208E-01 1.58754316408417E-01 y : 6.22620282693209E-01 -1.58754316408420E-01 x : -2.91350510977198E-01 -6.29899792895239E-01 == err : 2.173E-14 = rco : 1.471E-02 = res : 9.921E-18 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 4.04563104934930E-01 3.26901584321475E-01 by : 1.05593528207785E-01 2.73116575725835E-01 y : 1.09651154869771E-01 -2.84400945697550E-01 x : 5.08652824588756E-01 -3.02042217618094E-01 == err : 2.732E-13 = rco : 3.205E-03 = res : 2.638E-18 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 4.07453650855699E-01 6.59241121559313E-01 by : 1.72945324245810E-01 4.23116907682134E-01 y : 9.81794420987430E-02 -1.23330096820087E-01 x : 1.61242793312879E-01 -1.90369017262101E-01 == err : 1.405E-14 = rco : 6.171E-02 = res : 2.882E-18 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 1.61242793312878E-01 1.90369017262103E-01 by : 9.81794420987426E-02 1.23330096820085E-01 y : 1.72945324245810E-01 -4.23116907682136E-01 x : 4.07453650855697E-01 -6.59241121559313E-01 == err : 1.326E-14 = rco : 5.351E-02 = res : 1.666E-18 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 1.20647775356082E+00 -9.36345185074867E-02 by : 3.24771126236157E-01 2.14184210010077E-01 y : 3.24771126236148E-01 -2.14184210010030E-01 x : 1.20647775356070E+00 9.36345185077011E-02 == err : 2.089E-13 = rco : 1.015E-03 = res : 1.399E-17 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 1.13337718253528E+00 -5.38858398089683E-02 by : 1.99684727474357E-01 2.33955256182626E-01 y : 1.99684727474357E-01 -2.33955256182626E-01 x : 1.13337718253528E+00 5.38858398089658E-02 == err : 2.462E-13 = rco : 5.978E-03 = res : 1.490E-17 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 1.72266423705274E+00 -3.81388672899821E-01 by : 4.18469707410531E-01 1.98044029985402E-01 y : 4.18469707410533E-01 -1.98044029985418E-01 x : 1.72266423705279E+00 3.81388672899719E-01 == err : 2.174E-13 = rco : 7.201E-04 = res : 6.597E-17 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 4.87403732141600E-01 1.68688910021504E-01 by : 1.34373580768024E-01 2.59259706384777E-01 y : 1.44652288859644E-01 -2.67024928868181E-01 x : 5.81051048294509E-01 -2.71102828840313E-01 == err : 5.562E-13 = rco : 3.499E-03 = res : 2.267E-18 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 5.08652824588712E-01 3.02042217618121E-01 by : 1.09651154869742E-01 2.84400945697570E-01 y : 1.05593528207758E-01 -2.73116575725840E-01 x : 4.04563104934882E-01 -3.26901584321581E-01 == err : 3.311E-13 = rco : 2.684E-03 = res : 2.782E-18 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 3.34803931333403E-01 1.60553319642052E-01 by : 4.12749367461024E-02 5.72686811005432E-02 y : 2.76331602391193E-02 8.68452347612911E-02 x : -9.27794256887926E-04 -5.90051132524531E-05 == err : 8.711E-16 = rco : 1.374E-02 = res : 7.063E-20 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 5.83182363049177E-01 3.26733607777418E-01 by : 1.47323765616800E-01 2.85540999011355E-01 y : 1.21094670303097E-01 -2.49156335673215E-01 x : 3.76623768704033E-01 -1.58903307729672E-01 == err : 4.764E-13 = rco : 2.056E-03 = res : 2.274E-18 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : -2.51207564750122E-01 -2.25329652796196E-01 by : 4.15766144217165E-02 9.41891746850768E-02 y : 1.16247295058443E-01 -3.66309789144711E-01 x : 1.11256875354288E-01 -7.35865844321103E-01 == err : 3.856E-14 = rco : 1.531E-02 = res : 1.403E-18 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 6.54269902031446E-02 3.28326558145372E-01 by : -1.42177193321312E-01 -7.31524928134020E-02 y : 2.19375120413220E-01 -6.11788889109238E-01 x : 2.45198947851124E-01 -6.65270362439401E-01 == err : 2.442E-14 = rco : 2.094E-02 = res : 3.387E-18 == solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 5.37811114617499E-01 1.06123913485911E+00 by : -8.05270439018544E-02 3.54549317702269E-01 y : -8.05270439018706E-02 -3.54549317702240E-01 x : 5.37811114617305E-01 -1.06123913485912E+00 == err : 4.157E-13 = rco : 9.883E-04 = res : 8.416E-18 == solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : -5.58958929302595E-02 6.12044754158337E-01 by : 5.65894334352614E-01 1.69263337604556E-01 y : 5.65894334352614E-01 -1.69263337604557E-01 x : -5.58958929302592E-02 -6.12044754158337E-01 == err : 2.210E-14 = rco : 2.081E-02 = res : 1.164E-17 == solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 5.81836051396954E-01 2.07715961874054E+00 by : -1.84578856236882E-01 4.13983006171997E-01 y : -1.84578856236869E-01 -4.13983006172020E-01 x : 5.81836051397287E-01 -2.07715961874052E+00 == err : 7.079E-13 = rco : 2.843E-04 = res : 1.300E-16 == solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 8.80525457171034E-134 -4.40262728585517E-134 by : 5.50328410731896E-134 -2.20131364292758E-134 y : 1.64073107336195E-01 -6.71013948070856E-01 x : 1.12544599120311E+00 3.19900099153871E-02 == err : 1.000E+00 = rco : 7.636E-135 = res : 0.000E+00 == solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : -2.11555520756749E-01 -3.12707267556321E-02 by : 4.70269690304146E-02 9.15586136242007E-02 y : 1.24368653495560E-01 -2.98722380938766E-01 x : 2.51352068853835E-01 -5.18006222569401E-01 == err : 1.903E-14 = rco : 1.462E-02 = res : 8.619E-19 == solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 4.67889490684491E-01 3.90288499946566E-01 by : 6.25290402357431E-02 2.92856254019974E-01 y : 6.13303869027975E-02 -2.92357825283943E-01 x : 4.50483816913761E-01 -3.86539581083285E-01 == err : 2.953E-13 = rco : 7.149E-03 = res : 2.743E-18 == solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 3.76623768704082E-01 1.58903307729661E-01 by : 1.21094670303104E-01 2.49156335673218E-01 y : 1.47323765616801E-01 -2.85540999011346E-01 x : 5.83182363049188E-01 -3.26733607777395E-01 == err : 4.512E-13 = rco : 2.529E-03 = res : 2.579E-18 == solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 4.33564833462993E-01 3.27856655510231E-01 by : 1.22819657745345E-01 2.94837409933799E-01 y : 7.32532369536364E-02 -1.75269267542269E-01 x : 2.43134627508992E-02 -3.19180931825397E-01 == err : 1.599E-14 = rco : 2.959E-02 = res : 1.222E-18 == solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 4.46198075780247E-02 3.66755463488267E-01 by : 8.46054145410421E-02 2.21230007269951E-01 y : 1.30151402978545E-01 -3.38695015590422E-01 x : 4.22897870112585E-01 -3.59147292155791E-01 == err : 1.607E-14 = rco : 1.294E-02 = res : 3.080E-18 == solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 2.02358500001057E-01 1.61002177558596E-01 by : 1.05769256504725E-01 7.97380822738339E-02 y : 1.58281903528209E-01 -3.83166969106440E-01 x : 4.52037570892199E-01 -6.40342628287667E-01 == err : 8.436E-15 = rco : 6.948E-02 = res : 9.139E-19 == solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 4.50483816913784E-01 3.86539581083297E-01 by : 6.13303869027928E-02 2.92357825283939E-01 y : 6.25290402357416E-02 -2.92856254019975E-01 x : 4.67889490684533E-01 -3.90288499946593E-01 == err : 2.046E-13 = rco : 7.565E-03 = res : 3.926E-18 == solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 1.11256875354288E-01 7.35865844321100E-01 by : 1.16247295058443E-01 3.66309789144710E-01 y : 4.15766144217166E-02 -9.41891746850768E-02 x : -2.51207564750123E-01 2.25329652796194E-01 == err : 3.862E-14 = rco : 1.441E-02 = res : 3.469E-18 == solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 5.81051048294493E-01 2.71102828840326E-01 by : 1.44652288859636E-01 2.67024928868184E-01 y : 1.34373580768017E-01 -2.59259706384782E-01 x : 4.87403732141584E-01 -1.68688910021554E-01 == err : 3.876E-13 = rco : 2.500E-03 = res : 3.185E-18 == solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 4.10128328342863E-01 3.83183749554116E-01 by : 5.33809408978672E-02 3.00741174670326E-01 y : 5.24290008999879E-02 -2.98380116830571E-01 x : 4.10643844279420E-01 -3.80097858680438E-01 == err : 2.724E-13 = rco : 6.839E-04 = res : 2.800E-18 == solution 33 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 4.22897870112592E-01 3.59147292155787E-01 by : 1.30151402978544E-01 3.38695015590421E-01 y : 8.46054145410420E-02 -2.21230007269954E-01 x : 4.46198075780421E-02 -3.66755463488274E-01 == err : 2.408E-14 = rco : 1.349E-02 = res : 1.260E-18 == solution 34 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 2.43134627508985E-02 3.19180931825398E-01 by : 7.32532369536361E-02 1.75269267542269E-01 y : 1.22819657745345E-01 -2.94837409933799E-01 x : 4.33564833462992E-01 -3.27856655510230E-01 == err : 1.328E-14 = rco : 3.325E-02 = res : 1.411E-18 == solution 35 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : -9.27794256887926E-04 5.90051132524505E-05 by : 2.76331602391193E-02 -8.68452347612911E-02 y : 4.12749367461024E-02 -5.72686811005432E-02 x : 3.34803931333403E-01 -1.60553319642052E-01 == err : 8.093E-16 = rco : 1.125E-02 = res : 9.133E-20 == solution 36 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : bx : 2.45198947851124E-01 6.65270362439399E-01 by : 2.19375120413216E-01 6.11788889109240E-01 y : -1.42177193321315E-01 7.31524928134001E-02 x : 6.54269902031460E-02 -3.28326558145374E-01 == err : 2.431E-14 = rco : 1.909E-02 = res : 3.496E-18 == SHAR_EOF fi # end of overwriting check if test -f 'fourbar' then echo shar: will not over-write existing file "'fourbar'" else cat << "SHAR_EOF" > 'fourbar' 4 0.01692601*X1**2*Y1**2 - 0.888509280014*X1**2*Y2**2 + 0.0411717692438*X2**2*Y1**2 - 0.00437457395884*X2**2*Y2**2 + 0.331480641249*X1*X2*Y1**2 - 1.38036964668*X1*X2*Y2**2 - 0.270492270191*X1**2*Y1*Y2 + 1.44135801774*X2**2*Y1*Y2 + 0.859888946812*X1*X2*Y1*Y2 + 0.0791489659197*X1**2*Y1 - 0.00336032777032*X1**2*Y2 - 0.0620826738427*X1*Y1**2 + 0.501879647495*X1*Y2**2 + 0.647156236961*X2**2*Y1 + 0.0926311741907*X2**2*Y2 - 0.255000006226*X2*Y1**2 - 0.0896892386081*X2*Y2**2 - 0.568007271041*X1*X2*Y2 + 0.095991501961*X1*X2*Y1 + 0.165310767618*X1*Y1*Y2 - 0.563962321337*X2*Y1*Y2 - 0.0784871167595*X1*Y1 - 0.0784871167595*X2*Y2 + 0.011807283256*X1*Y2 - 0.011807283256*X2*Y1 + 0.0422876985355*X1**2 + 0.0422876985355*X2**2 + 0.0372427422943*Y1**2 + 0.0372427422943*Y2**2; 0.518178672335*X1**2*Y1**2 - 0.0414464807343*X1**2*Y2**2 + 2.63600135179*X2**2*Y1**2 - 0.799490472298*X2**2*Y2**2 + 0.29442805494*X1**2*Y1*Y2 + 1.46551534655*X2**2*Y1*Y2 - 0.631878110759*X1*X2*Y1**2 - 1.80296540237*X1*X2*Y2**2 - 2.87586667102*X1*X2*Y1*Y2 - 0.987856648177*X1**2*Y1 - 0.530579106676*X1**2*Y2 - 0.0397576281649*X1*Y1**2 + 0.317719102869*X1*Y2**2 - 1.93710490787*X2**2*Y1 + 0.00127693327315*X2**2*Y2 - 0.581380074072*X2*Y1**2 - 0.0672137066743*X2*Y2**2 + 0.531856039949*X1*X2*Y1 + 0.949248259696*X1*X2*Y2 + 0.514166367398*X1*Y1*Y2 - 0.357476731033*X2*Y1*Y2 + 0.140965913657*X1*Y1 + 0.140965913657*X2*Y2 - 0.153347218606*X1*Y2 + 0.153347218606*X2*Y1 + 0.283274882058*X1**2 + 0.283274882058*X2**2 + 0.0382903330079*Y1**2 + 0.0382903330079*Y2**2; 0.0233560008057*X1**2*Y1**2 - 0.00428427501149*X1**2*Y1*Y2 - 0.792756311827*X1**2*Y2**2 + 0.0492185850289*X2**2*Y2**2 + 0.0759264856293*X1*X2*Y1**2 + 1.14839711492*X1*X2*Y1*Y2 - 0.283066217262*X2**2*Y1**2 + 0.460041521291*X2**2*Y1*Y2 - 0.388399310674*X1*X2*Y2**2 - 0.0561169736293*X1*Y1**2 + 0.485064247792*X1*Y2**2 + 0.0689567235492*X1**2*Y1 - 0.115620658768*X1**2*Y2 - 0.13286905328*X2*Y1**2 - 0.084375901147*X2*Y2**2 + 0.639964831612*X2**2*Y1 + 0.101386684276*X2**2*Y2 + 0.217007343044*X1*X2*Y1 - 0.571008108063*X1*X2*Y2 + 0.0484931521334*X1*Y1*Y2 - 0.541181221422*X2*Y1*Y2 - 0.00363197918253*X1*Y2 + 0.00363197918253*X2*Y1 - 0.0781302968652*X1*Y1 - 0.0781302968652*X2*Y2 + 0.0471311092612*X1**2 + 0.0471311092612*X2**2 + 0.0324495575052*Y1**2 + 0.0324495575052*Y2**2; 0.393707415641*X1**2*Y1**2 + 0.59841456862*X1**2*Y2**2 + 0.0735854940135*X2**2*Y1**2 + 0.0548997238169*X2**2*Y2**2 + 0.0116156836985*X1**2*Y1*Y2 + 0.0699694273575*X2**2*Y1*Y2 - 0.305757340849*X1*X2*Y1**2 - 0.364111084508*X1*X2*Y2**2 - 0.223392923175*X1*X2*Y1*Y2 + 0.0996725944534*X1**2*Y1 + 0.0113936468426*X1**2*Y2 - 0.381205205249*X1*Y1**2 - 0.473402150235*X1*Y2**2 - 0.0213613191759*X2**2*Y1 - 0.0372595571271*X2**2*Y2 + 0.148904552394*X2*Y1**2 + 0.142408744984*X2*Y2**2 - 0.0486532039697*X1*X2*Y1 + 0.121033913629*X1*X2*Y2 - 0.00649580741066*X1*Y1*Y2 + 0.092196944986*X2*Y1*Y2 - 0.0483106652705*X1*Y1 - 0.0483106652705*X2*Y2 - 0.00316794272326*X1*Y2 + 0.00316794272326*X2*Y1 + 0.00634952598374*X1**2 + 0.00634952598374*X2**2 + 0.0922886309144*Y1**2 + 0.0922886309144*Y2**2; TITLE : a four-bar design problem, so-called 5-point problem ROOT COUNTS : total degree : 256 2-homogeneous Bezout number : 96 mixed volume : 80 REFERENCES : See Morgan, A.P. and Wampler, C.W. : `Solving a planar four-bar design problem using continuation' in Transaction of the ASME, J. of Mechanical Design, Vol. 112 pages 544-550, 1990. For the coefficients, see Table 2, a = (1,0). This is the start system, with five random precision points, that has been used to solve twenty other test systems. NOTE : At infinity, these degenerate hyperplanes are solutions of the following subsystem: 4.22876985355001E-02*X1**2+ 4.22876985355001E-02*X2**2; 2.83274882058000E-01*X1**2+ 2.83274882058000E-01*X2**2; 4.71311092612001E-02*X1**2+ 4.71311092612001E-02*X2**2; 6.34952598374001E-03*X1**2+ 6.34952598374001E-03*X2**2; There are only 36 isolated solutions, instead of 80. This problem formulation uses cartesian coordinates. By isotropic coordinates an exact root count can be obtained. THE SOLUTIONS : 36 4 =========================================================== solution 1 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : -1.30421792262534E-01 1.02275543863157E-01 Y1 : -1.34148589217653E-02 -1.76800861304744E-02 Y2 : 4.36492627551176E-02 4.26029119177140E-02 X2 : 9.30856705465082E-02 1.25957483651556E-01 == err : 3.752E-16 = rco : 2.296E-03 = res : 5.029E-19 == solution 2 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 4.35483057347642E-01 -6.27936033387944E-02 Y1 : 5.86610856430167E-01 -4.36257944077704E-01 Y2 : 3.82362459573002E-01 5.82597214547501E-02 X2 : 9.99310913333355E-02 2.04782353966550E-02 == err : 2.113E-15 = rco : 6.881E-03 = res : 2.861E-17 == solution 3 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 4.39539045851621E-01 3.37193815221795E-02 Y1 : 6.15232599153994E-01 3.18342113882502E-01 Y2 : 2.79007186501877E-01 1.34507104556481E-03 X2 : 1.02534167195379E-01 -2.14641761614356E-02 == err : 7.798E-15 = rco : 4.612E-03 = res : 1.388E-17 == solution 4 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 4.39539045851622E-01 -3.37193815221796E-02 Y1 : 6.15232599153994E-01 -3.18342113882501E-01 Y2 : 2.79007186501877E-01 -1.34507104556479E-03 X2 : 1.02534167195379E-01 2.14641761614357E-02 == err : 8.064E-15 = rco : 4.612E-03 = res : 2.194E-17 == solution 5 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 4.51313691193482E-01 -5.69342282581537E-02 Y1 : 6.78147355883156E-01 -6.22841534688354E-01 Y2 : -5.52109971919701E-02 -8.89188627716446E-02 X2 : 2.52994247634305E-02 -6.13397285290952E-02 == err : 1.148E-14 = rco : 2.017E-03 = res : 1.963E-17 == solution 6 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 4.41844233506457E-01 -5.78394356258555E-02 Y1 : 6.96049254825832E-01 -6.34075857297423E-01 Y2 : -2.33074644032421E-02 -9.96186647379359E-02 X2 : 3.92960662734257E-02 -5.50421790185633E-02 == err : 1.967E-14 = rco : 1.936E-03 = res : 6.960E-17 == solution 7 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 4.41844233506460E-01 5.78394356258546E-02 Y1 : 6.96049254825823E-01 6.34075857297422E-01 Y2 : -2.33074644032563E-02 9.96186647379346E-02 X2 : 3.92960662734207E-02 5.50421790185669E-02 == err : 1.660E-14 = rco : 1.936E-03 = res : 5.407E-17 == solution 8 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 5.06745321082687E-01 -1.42225069483242E-58 Y1 : 1.45199156236219E+00 -7.08995909375817E-58 Y2 : 3.68385041446078E-01 -2.18836221630536E-58 X2 : 1.62577441583587E-01 -5.27595014026165E-59 == err : 1.060E-13 = rco : 7.136E-04 = res : 1.154E-16 == solution 9 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 1.22911407793185E+00 1.15283128920095E-01 Y1 : -1.21422799853711E+00 1.94848207421399E-01 Y2 : -1.44891275906777E+00 1.11210486881801E-01 X2 : 1.58507231069686E+00 2.84084469186712E-01 == err : 7.960E-14 = rco : 1.415E-04 = res : 7.119E-15 == solution 10 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 3.03338911364224E-01 -2.20674062719568E-02 Y1 : 5.65627562106786E-01 -2.10648389346555E-01 Y2 : -4.69017514766759E-01 9.28430217877084E-02 X2 : -3.39694179390978E-01 7.35635701762810E-03 == err : 5.769E-15 = rco : 5.440E-03 = res : 2.914E-17 == solution 11 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : -1.80354055564375E-02 4.78949724993217E-02 Y1 : -6.80200292883192E-02 -2.44886147515548E-02 Y2 : 4.86848419548440E-02 -4.45456425119699E-02 X2 : 5.37892839680892E-02 5.17413048886791E-02 == err : 2.735E-16 = rco : 2.804E-03 = res : 4.371E-19 == solution 12 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 2.70729674523651E-01 -3.15111400261581E-03 Y1 : 6.01337967835043E-01 7.11392226104298E-02 Y2 : -4.35593856982499E-01 -1.70263031934523E-02 X2 : -3.72213042594878E-01 -2.10650410540472E-02 == err : 7.527E-15 = rco : 1.273E-02 = res : 2.057E-17 == solution 13 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 4.44692000330549E-01 2.05821216827045E-02 Y1 : 5.86421949943073E-01 3.03949700563222E-01 Y2 : 2.77119162915063E-01 4.50702056131172E-03 X2 : 1.01795437677947E-01 -2.03686721683275E-02 == err : 2.471E-14 = rco : 4.940E-03 = res : 2.861E-17 == solution 14 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 4.95965546075631E-01 -1.37777558251846E-57 Y1 : 1.39825982513980E+00 -6.86647505759198E-57 Y2 : 3.51809670602083E-01 -2.12267051127844E-57 X2 : 1.58592899664286E-01 -5.13359866578058E-58 == err : 8.496E-14 = rco : 8.392E-04 = res : 2.776E-17 == solution 15 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 5.95786845372265E-01 -9.81543760123305E-02 Y1 : 5.71041556037921E-01 5.50010099235699E-01 Y2 : 2.34674265978231E-01 -6.94090738405223E-01 X2 : 3.64967892481617E-02 5.42044962116081E-02 == err : 9.698E-16 = rco : 1.710E-02 = res : 7.356E-17 == solution 16 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 3.03338911364225E-01 2.20674062719567E-02 Y1 : 5.65627562106786E-01 2.10648389346554E-01 Y2 : -4.69017514766758E-01 -9.28430217877086E-02 X2 : -3.39694179390978E-01 -7.35635701762806E-03 == err : 6.894E-15 = rco : 5.440E-03 = res : 4.719E-17 == solution 17 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 5.95786845372265E-01 9.81543760123303E-02 Y1 : 5.71041556037922E-01 -5.50010099235699E-01 Y2 : 2.34674265978230E-01 6.94090738405223E-01 X2 : 3.64967892481618E-02 -5.42044962116080E-02 == err : 1.215E-15 = rco : 1.710E-02 = res : 7.755E-17 == solution 18 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 4.48474961174366E-01 -2.89660537402298E-02 Y1 : 4.56711896735588E-01 -5.40604010232105E-01 Y2 : 4.36650698148677E-01 1.29516750799000E-01 X2 : 9.37245901214154E-02 9.98383032374788E-03 == err : 2.705E-15 = rco : 4.647E-03 = res : 2.270E-17 == solution 19 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : -1.30421792262534E-01 -1.02275543863157E-01 Y1 : -1.34148589217653E-02 1.76800861304745E-02 Y2 : 4.36492627551178E-02 -4.26029119177140E-02 X2 : 9.30856705465084E-02 -1.25957483651556E-01 == err : 4.578E-16 = rco : 2.296E-03 = res : 1.939E-18 == solution 20 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 5.36525679531097E-01 6.58078823945381E-02 Y1 : 2.55591001292441E-01 -1.17965161275222E+00 Y2 : 4.00040482703310E-01 8.03172094292528E-01 X2 : 6.12863867735729E-02 -3.02901259600771E-02 == err : 2.195E-15 = rco : 6.183E-03 = res : 7.929E-17 == solution 21 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 2.70729674523652E-01 3.15111400261610E-03 Y1 : 6.01337967835043E-01 -7.11392226104275E-02 Y2 : -4.35593856982499E-01 1.70263031934518E-02 X2 : -3.72213042594879E-01 2.10650410540463E-02 == err : 6.010E-15 = rco : 1.273E-02 = res : 5.605E-17 == solution 22 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 1.22911407793185E+00 -1.15283128920080E-01 Y1 : -1.21422799853713E+00 -1.94848207421377E-01 Y2 : -1.44891275906777E+00 -1.11210486881788E-01 X2 : 1.58507231069686E+00 -2.84084469186674E-01 == err : 2.040E-13 = rco : 1.415E-04 = res : 2.232E-15 == solution 23 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 2.90599709703607E-01 1.70123717543869E-02 Y1 : 5.55565294508816E-01 2.11510701900325E-01 Y2 : -4.68186951883872E-01 -9.77440998333686E-02 X2 : -3.35488612100868E-01 -6.01260393173532E-03 == err : 4.574E-15 = rco : 5.194E-03 = res : 2.412E-17 == solution 24 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 4.44692000330550E-01 -2.05821216827044E-02 Y1 : 5.86421949943074E-01 -3.03949700563217E-01 Y2 : 2.77119162915063E-01 -4.50702056131171E-03 X2 : 1.01795437677947E-01 2.03686721683275E-02 == err : 4.691E-15 = rco : 4.940E-03 = res : 3.103E-17 == solution 25 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 5.02136933783012E-01 -3.88468477571993E-02 Y1 : 1.89744852767543E+00 9.52624110251982E-02 Y2 : -3.58421896794606E-01 1.07330408787373E-01 X2 : 1.59778295802974E-01 -5.65382606893851E-02 == err : 3.785E-15 = rco : 3.015E-02 = res : 2.231E-16 == solution 26 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 2.98081022796265E-01 -5.59177793201383E-03 Y1 : 6.08989767717123E-01 -9.03498053632811E-02 Y2 : -4.38183255792341E-01 2.12961599038053E-02 X2 : -3.73213180683383E-01 2.43142377285910E-02 == err : 1.220E-14 = rco : 1.136E-02 = res : 4.995E-17 == solution 27 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 4.51313691193481E-01 5.69342282581517E-02 Y1 : 6.78147355883155E-01 6.22841534688358E-01 Y2 : -5.52109971919685E-02 8.89188627716519E-02 X2 : 2.52994247634334E-02 6.13397285290973E-02 == err : 1.760E-14 = rco : 2.017E-03 = res : 2.809E-17 == solution 28 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 2.98081022796264E-01 5.59177793201374E-03 Y1 : 6.08989767717121E-01 9.03498053632746E-02 Y2 : -4.38183255792340E-01 -2.12961599038041E-02 X2 : -3.73213180683385E-01 -2.43142377285892E-02 == err : 4.733E-15 = rco : 1.136E-02 = res : 1.703E-17 == solution 29 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 5.13486066538937E-01 -5.05101069868295E-03 Y1 : 1.85992750826152E+00 -4.33106907379951E-02 Y2 : -3.44556622517745E-01 -5.27625248166793E-02 X2 : 1.64005238422230E-01 6.00581327972965E-02 == err : 4.761E-15 = rco : 5.764E-02 = res : 2.227E-16 == solution 30 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 5.13486066538937E-01 5.05101069868323E-03 Y1 : 1.85992750826152E+00 4.33106907379940E-02 Y2 : -3.44556622517745E-01 5.27625248166790E-02 X2 : 1.64005238422230E-01 -6.00581327972965E-02 == err : 3.706E-15 = rco : 5.764E-02 = res : 1.111E-16 == solution 31 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 5.02136933783012E-01 3.88468477571977E-02 Y1 : 1.89744852767542E+00 -9.52624110251948E-02 Y2 : -3.58421896794605E-01 -1.07330408787371E-01 X2 : 1.59778295802974E-01 5.65382606893851E-02 == err : 5.554E-15 = rco : 3.015E-02 = res : 1.122E-16 == solution 32 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 5.36525679531096E-01 -6.58078823945380E-02 Y1 : 2.55591001292440E-01 1.17965161275222E+00 Y2 : 4.00040482703312E-01 -8.03172094292525E-01 X2 : 6.12863867735729E-02 3.02901259600771E-02 == err : 3.832E-15 = rco : 6.183E-03 = res : 1.074E-16 == solution 33 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 4.35483057347643E-01 6.27936033387947E-02 Y1 : 5.86610856430169E-01 4.36257944077703E-01 Y2 : 3.82362459573001E-01 -5.82597214547501E-02 X2 : 9.99310913333354E-02 -2.04782353966552E-02 == err : 3.517E-15 = rco : 6.881E-03 = res : 1.289E-17 == solution 34 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 4.48474961174366E-01 2.89660537402296E-02 Y1 : 4.56711896735587E-01 5.40604010232105E-01 Y2 : 4.36650698148676E-01 -1.29516750799000E-01 X2 : 9.37245901214154E-02 -9.98383032374780E-03 == err : 4.057E-15 = rco : 4.647E-03 = res : 3.133E-17 == solution 35 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : 2.90599709703608E-01 -1.70123717543856E-02 Y1 : 5.55565294508815E-01 -2.11510701900326E-01 Y2 : -4.68186951883870E-01 9.77440998333699E-02 X2 : -3.35488612100867E-01 6.01260393173520E-03 == err : 5.620E-15 = rco : 5.194E-03 = res : 2.453E-17 == solution 36 : t : 0.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : X1 : -1.80354055564375E-02 -4.78949724993217E-02 Y1 : -6.80200292883192E-02 2.44886147515548E-02 Y2 : 4.86848419548440E-02 4.45456425119699E-02 X2 : 5.37892839680892E-02 -5.17413048886791E-02 == err : 2.735E-16 = rco : 2.804E-03 = res : 4.371E-19 == SHAR_EOF fi # end of overwriting check if test -f 'gaukwa2' then echo shar: will not over-write existing file "'gaukwa2'" else cat << "SHAR_EOF" > 'gaukwa2' 4 w1 + w2 + (-9.98250904334731E-01 + 5.91196413630250E-02*i); w1*x1 + w2*x2 + (-8.92749639148806E-01 + 4.50553084330444E-01*i); w1*x1**2 + w2*x2**2 + ( 1.60088552022675E-01 + 9.87102657027770E-01*i); w1*x1**3 + w2*x2**3 + (-7.25369971319578E-01 + 6.88359211972815E-01*i); TITLE : Gaussian quadrature formula with 2 knots and 2 weights ROOT COUNTS : total degree : 24 2-homogeneous Bezout number : 11 with partition : {{w1 w2 }{x1 x2 }} mixed volume : 5 NOTE : By a particular symmetric choice of the subdivision, only one solution path needs to be traced. Moments are taken as random complex coefficients. THE GENERATING SOLUTIONS : 1 4 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : w1 : 1.03639570141331E+00 6.19038489119190E-03 w2 : -3.81447970785750E-02 -6.53100262542169E-02 x1 : 7.26646740724671E-01 -5.51989879497413E-01 x2 : -2.24458038436995E+00 7.75072227352324E-01 == err : 4.047E-15 = rco : 8.280E-03 = res : 2.238E-16 == SHAR_EOF fi # end of overwriting check if test -f 'gaukwa3' then echo shar: will not over-write existing file "'gaukwa3'" else cat << "SHAR_EOF" > 'gaukwa3' 6 w1 + w2 + w3 + (-1.85584131425170E-01 + 9.82628378464191E-01*i); w1*x1 + w2*x2 + w3*x3 + (-9.91336064106736E-01 + 1.31349944809144E-01*i); w1*x1**2 + w2*x2**2 + w3*x3**2 + ( 3.99008911367837E-01 - 9.16947047898107E-01*i); w1*x1**3 + w2*x2**3 + w3*x3**3 + (-7.85981252767830E-01 + 6.18250329799760E-01*i); w1*x1**4 + w2*x2**4 + w3*x3**4 + ( 3.99008911367837E-01 - 9.16947047898107E-01*i); w1*x1**5 + w2*x2**5 + w3*x3**5 + ( 1.49480150971521E-01 + 9.88764726547995E-01*i); TITLE : Gaussian quadrature formula with 3 knots and 3 weights ROOT COUNTS : total degree : 720 2-homogeneous Bezout number : 225 with partition : {w1 w2 w3 }{x1 x2 x3 } generalized Bezout number : 225 based on the set structure : {w1 w2 w3 } {w1 w2 w3 }{x1 x2 x3 } {w1 w2 w3 }{x1 x2 x3 }{x1 x2 x3 } {w1 w2 w3 }{x1 x2 x3 }{x1 x2 x3 }{x1 x2 x3 } {w1 w2 w3 }{x1 x2 x3 }{x1 x2 x3 }{x1 x2 x3 }{x1 x2 x3 } {w1 w2 w3 }{x1 x2 x3 }{x1 x2 x3 }{x1 x2 x3 }{x1 x2 x3 }{x1 x2 x3 } mixed volume : 49 NOTE : The moments are chosen at random. By means of a particular symmetric subdivision, only one solution path needs to be traced. THE GENERATING SOLUTIONS : 1 6 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 6 the solution for t : w1 : 8.82956381242511E-01 -4.97446186089554E-01 w2 : 1.74696857880646E-02 -4.37569014860605E-01 w3 : -7.14841935605406E-01 -4.76131775140323E-02 x1 : 4.67557036438764E-01 3.14543130902305E-01 x2 : -8.99531291584821E-02 -7.48528771335924E-01 x3 : -1.02732562627853E+00 3.52094231469549E-01 == err : 2.264E-15 = rco : 2.130E-02 = res : 2.945E-16 == SHAR_EOF fi # end of overwriting check if test -f 'gaukwa4' then echo shar: will not over-write existing file "'gaukwa4'" else cat << "SHAR_EOF" > 'gaukwa4' 8 w1 + w2 + w3 + w4 + ( 4.88303340950105E-01 - 8.72673963870222E-01*i); w1*x1 + w2*x2 + w3*x3 + w4*x4 + ( 5.18782365203204E-01 - 8.54906344317417E-01*i); w1*x1**2 + w2*x2**2 + w3*x3**2 + w4*x4**2 + ( -9.00683429228647E-01 - 4.34475960569656E-01*i); w1*x1**3 + w2*x2**3 + w3*x3**3 + w4*x4**3 + ( -9.48682692199895E-01 - 3.16229583562890E-01*i); w1*x1**4 + w2*x2**4 + w3*x3**4 + w4*x4**4 + ( 4.63259783551860E-01 + 8.86222530148881E-01*i); w1*x1**5 + w2*x2**5 + w3*x3**5 + w4*x4**5 + (-7.89936368499146E-01 + 6.13188823872697E-01*i); w1*x1**6 + w2*x2**6 + w3*x3**6 + w4*x4**6 + ( 9.79201808025014E-01 + 2.02888686625312E-01*i); w1*x1**7 + w2*x2**7 + w3*x3**7 + w4*x4**7 + (-2.74557888517134E-01 - 9.61570572476619E-01*i); TITLE : Gaussian quadrature formula with 4 knots and 4 weights ROOT COUNTS : total degree : 8! = 40320 2-homogeneous Bezout bound : 6769. with partition : {w1 w2 w3 w4 }{x1 x2 x3 x4 } mixed volume : 729 NOTE : The moments are randomly complex chosen coefficients. By a particular symmetric choice of the subdivision, only one solution path needs to be traced. THE GENERATING SOLUTIONS : 1 8 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 24 the solution for t : w1 : -8.96692094492292E-01 6.38170292403620E-01 w2 : 2.80402306915529E-01 1.15138545346693E-01 w3 : -8.51835305232690E-03 1.45273304678796E-02 w4 : 1.36504799678985E-01 1.04837795652029E-01 x1 : 5.59984862188214E-01 -6.79436139074726E-01 x2 : -9.59291346545661E-01 7.19343084013266E-01 x3 : -2.93171086615633E-01 1.81847906572470E+00 x4 : -9.91696113366362E-01 -5.80505222592590E-01 == err : 1.837E-15 = rco : 4.215E-04 = res : 6.713E-16 == SHAR_EOF fi # end of overwriting check if test -f 'geneig' then echo shar: will not over-write existing file "'geneig'" else cat << "SHAR_EOF" > 'geneig' 6 -10*x1*x6^2+ 2*x2*x6^2-x3*x6^2+x4*x6^2+ 3*x5*x6^2+x1*x6+ 2*x2*x6+x3*x6+ 2*x4* x6+x5*x6+ 10*x1+ 2*x2-x3+ 2*x4-2*x5; 2*x1*x6^2-11*x2*x6^2+ 2*x3*x6^2-2*x4*x6^2+x5*x6^2+ 2*x1*x6+x2*x6+ 2*x3*x6+x4* x6+ 3*x5*x6+ 2*x1+ 9*x2+ 3*x3-x4-2*x5; -x1*x6^2+ 2*x2*x6^2-12*x3*x6^2-x4*x6^2+x5*x6^2+x1*x6+ 2*x2*x6-2*x4*x6-2*x5*x6- x1+ 3*x2+ 10*x3+ 2*x4-x5; x1*x6^2-2*x2*x6^2-x3*x6^2-10*x4*x6^2+ 2*x5*x6^2+ 2*x1*x6+x2*x6-2*x3*x6+ 2*x4* x6+ 3*x5*x6+ 2*x1-x2+ 2*x3+ 12*x4+x5; 3*x1*x6^2+x2*x6^2+x3*x6^2+ 2*x4*x6^2-11*x5*x6^2+x1*x6+ 3*x2*x6-2*x3*x6+ 3*x4* x6+ 3*x5*x6-2*x1-2*x2-x3+x4+ 10*x5; x1+x2+x3+x4+x5-1; TITLE : generalized eigenvalue problem ROOT COUNTS : total degree : 243 2-homogeneous Bezout bound : 10 REFERENCES : M. Chu, T.-Y. Li and T. Sauer; "Homotopy method for general lambda-matrix problems", SIAM J. Matrix Anal. Appl., vol. 9, No. 4, pp 528-536, 1988. THE SOLUTIONS : 10 6 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.03104921027674E-01 3.11150763893057E-61 x6 : -5.26884338028681E-01 -2.65611437989453E-61 x2 : 1.02852436023601E+00 -3.11150763893057E-61 x3 : -7.65802783270593E-01 3.11150763893057E-61 x4 : 5.84438864730263E-01 -2.43755812565216E-61 x5 : 5.55944479331990E-01 -6.22301527786114E-61 == err : 3.909E-15 = rco : 7.658E-03 = res : 2.442E-15 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.99075932021782E-01 5.01143383142287E-52 x6 : 2.02323961940148E+00 6.68191177523049E-52 x2 : 1.29632560155695E-01 1.00228676628457E-51 x3 : -2.50229425780516E-02 0.00000000000000E+00 x4 : 2.82858256715490E-01 -1.00228676628457E-51 x5 : 3.13456193685084E-01 2.08809742975953E-53 == err : 3.645E-16 = rco : 1.423E-02 = res : 3.553E-15 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.61434411929062E-01 5.22024357439882E-54 x6 : -7.93299819295134E-01 1.04404871487976E-53 x2 : 8.62739540151744E-02 3.91518268079912E-54 x3 : 2.30573068453758E-01 0.00000000000000E+00 x4 : -1.78344810664138E-01 -2.61012178719941E-53 x5 : 5.00063376266144E-01 3.39315832335923E-53 == err : 5.305E-16 = rco : 6.558E-02 = res : 6.661E-16 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.74914846627566E-01 3.18618382226491E-56 x6 : -9.89067571030006E-01 4.46065735117087E-57 x2 : 2.69467709194748E-01 -8.92131470234173E-57 x3 : 2.01358039843421E-01 -2.16660499914014E-56 x4 : 3.43365652466371E-01 -2.54894705781192E-57 x5 : -1.89106248132106E-01 1.27447352890596E-57 == err : 3.742E-16 = rco : 3.143E-02 = res : 1.443E-15 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.09012520270965E+00 4.17619485951906E-53 x6 : 8.91088225418399E-01 6.78631664671847E-53 x2 : -4.68830940953671E-01 9.18762869094192E-52 x3 : 1.77918152799782E+00 -1.41990625223648E-51 x4 : 1.92190665861778E+00 -2.83981250447296E-51 x5 : -1.14213204295227E+00 3.34095588761524E-51 == err : 5.578E-15 = rco : 1.751E-03 = res : 7.994E-15 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.54640578834680E+00 2.50571691571143E-52 x6 : 4.94356140660691E-01 2.08809742975953E-52 x2 : -2.08005601877580E+00 -1.67047794380762E-52 x3 : 1.78182343900084E+00 -1.25285845785572E-52 x4 : -1.01638636925152E+00 -5.95107767481466E-52 x5 : 7.68213160679684E-01 5.01143383142287E-52 == err : 4.010E-15 = rco : 1.636E-03 = res : 3.553E-15 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.49229454860982E-01 2.50571691571143E-52 x6 : 1.45857046356428E+00 -4.17619485951906E-51 x2 : 6.72438547403408E-01 4.00914706513829E-51 x3 : 4.93329668745933E-01 4.67733824266134E-51 x4 : -3.93783458451863E-01 -7.01600736399201E-51 x5 : -2.12142125584604E-02 -6.68191177523049E-52 == err : 8.420E-16 = rco : 1.887E-02 = res : 2.609E-15 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.74700924324691E+00 6.57424425150851E-53 x6 : -1.06999188030235E+00 1.03997039958726E-54 x2 : 1.75605089702930E+00 -4.36991483591276E-53 x3 : 3.04134725910012E+00 -6.37032848688356E-53 x4 : -8.33686740566606E-01 3.33606190926425E-53 x5 : -2.16702172315900E-01 7.06568124425465E-54 == err : 5.602E-15 = rco : 1.049E-03 = res : 1.243E-14 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.27092363584264E-01 -6.01646293746430E-65 x6 : -1.20380998147538E+00 4.55787251796470E-64 x2 : -1.15167375381329E+00 -4.30958759171515E-63 x3 : 4.93213679643402E-01 -1.13946812949118E-64 x4 : 1.44398220254774E+00 1.40534402637245E-63 x5 : 6.41570235206413E-01 2.94362600118554E-63 == err : 4.029E-15 = rco : 4.001E-03 = res : 7.327E-15 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.43647743849955E+00 -8.81188686806509E-63 x6 : 9.51877558035348E-01 8.96597771651903E-64 x2 : 3.53621608158665E-01 1.35216884699620E-62 x3 : 6.93350523095517E-01 -1.64083410646729E-62 x4 : -3.06921446296540E-01 -3.76784128151749E-62 x5 : 1.69642675354191E+00 4.86173068582902E-62 == err : 1.796E-15 = rco : 2.877E-03 = res : 3.109E-15 == SHAR_EOF fi # end of overwriting check if test -f 'heart' then echo shar: will not over-write existing file "'heart'" else cat << "SHAR_EOF" > 'heart' 8 a + b - 0.63254; c + d + 1.34534; t*a + u*b - v*c - w*d + 0.8365348; v*a + w*b + t*c + u*d - 1.7345334; a*t**2 - a*v**2 - 2*c*t*v + b*u**2 - b*w**2 - 2*d*u*w - 1.352352; c*t**2 - c*v**2 + 2*a*t*v + d*u**2 - d*w**2 + 2*b*u*w + 0.843453; a*t**3 - 3*a*t*v**2 + c*v**3 - 3*c*v*t**2 + b*u**3 - 3*b*u*w**2 + d*w**3 - 3*d*w*u**2 + 0.9563453; c*t**3 - 3*c*t*v**2 - a*v**3 + 3*a*v*t**2 + d*u**3 - 3*d*u*w**2 - b*w**3 + 3*b*w*u**2 - 1.2342523; TITLE : heart-dipole problem ROOT COUNTS : total degree : 576 2-homogeneous Bezout number : 193 with partition : {a b c d }{t u v w } generalized Bezout number : 193 based on the set structure : {a b } {c d } {a b c d }{t u v w } {a b c d }{t u v w } {a b c d }{t u v w }{t u v w } {a b c d }{t u v w }{t u v w } {a b c d }{t u v w }{t u v w }{t u v w } {a b c d }{t u v w }{t u v w }{t u v w } mixed volume : 121 REFERENCES : Nelsen, C.V. and Hodgkin, B.C.: `Determination of magnitudes, directions, and locations of two independent dipoles in a circular conducting region from boundary potential measurements' IEEE Trans. Biomed. Engrg. Vol. BME-28, No. 12, pages 817-823, 1981. Morgan, A.P. and Sommese, A.J.: `Coefficient-Parameter Polynomial Continuation' Appl. Math. Comput. Vol. 29, No. 2, pages 123-160, 1989. Errata: Appl. Math. Comput. 51:207 (1992) Morgan, A.P. and Sommese, A. and Watson, L.T.: `Mathematical reduction of a heart dipole model' J. Comput. Appl. Math. Vol. 27, pages 407-410, 1989. SYMMETRY GROUP (FOR THE POLYTOPES ONLY!) 1 (a b)(c d) (a b)(t u)(v w) (c d)(t u)(v w) (a c)(b d)(t v)(u w) (a d)(b c) (a d)(t w)(u v) (b c)(t w)(u v) a b c d t u v w 1 2 3 4 5 6 7 8 2 1 4 3 5 6 7 8 2 1 3 4 6 5 8 7 1 2 4 3 6 5 8 7 3 4 1 2 7 8 5 6 4 3 2 1 5 6 7 8 4 2 3 1 8 7 6 5 1 3 2 4 8 7 6 5 NOTE : The deficiency of this system is due to the solutions of the homogeneous part. The Groebner bases for the homogeneous part contains the polynomials { a + b, c+d , b*t - b*u - d*v + d*w, b*v - b*w + d*t - d*u, d*t**2 - 2*d*t*u + d*u**2 + d*v**2 - 2*d*v*w + d*w**2 } which leads to four solution components at infinity : 1) a=0, b=0, c=0, d=0, with t,u,v and w arbitrary complex numbers 2) a= - d*i, b=d*i, c= - d, t= - i*v + i*w + u 3) a=d*i, b= - d*i, c= - d, t=i*v - i*w + u 4) a= - b, c= - d, t=u, v=w The consecutive contributions of the constant monomials to the mixed volume are as follows : i 1 2 3 4 5 6 7 8 vi 0 0 65 65 104 104 121 121 vi = mixed volume of the system with only the first i contant terms THE SOLUTIONS : 4 8 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a : 3.16270000000000E-01 -9.40179958538160E-01 b : 3.16270000000000E-01 9.40179958538160E-01 c : -6.72670000000000E-01 -3.26802748753925E-01 d : -6.72670000000000E-01 3.26802748753925E-01 t : 1.05055232394915E-01 8.20732577685255E-02 u : 1.05055232394915E-01 -8.20732577685255E-02 v : -2.70836601845149E-01 1.06019057303938E+00 w : -2.70836601845149E-01 -1.06019057303938E+00 == err : 2.975E-15 = rco : 4.003E-02 = res : 2.483E-16 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a : -1.05327487539249E-02 -2.40131204422346E-52 b : 6.43072748753925E-01 2.08809742975953E-52 c : 2.67509958538160E-01 1.04462108712268E-52 d : -1.61284995853816E+00 -1.04404871487976E-52 t : 1.16524580543429E+00 -7.51715074713430E-52 u : -9.55135340644462E-01 1.07014993275176E-52 v : -3.52909859613675E-01 -3.75857537356715E-52 w : -1.88763344076624E-01 8.35238971903811E-53 == err : 2.694E-15 = rco : 4.064E-02 = res : 2.828E-16 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a : 6.43072748753925E-01 -3.18618382226490E-57 b : -1.05327487539250E-02 3.18618382226490E-57 c : -1.61284995853816E+00 -8.92131470234173E-57 d : 2.67509958538160E-01 8.92131470234173E-57 t : -9.55135340644462E-01 1.27447352890596E-57 u : 1.16524580543429E+00 -6.24492029163921E-56 v : -1.88763344076624E-01 -3.66411139560464E-57 w : -3.52909859613675E-01 3.82342058671789E-57 == err : 2.465E-15 = rco : 3.546E-02 = res : 3.886E-16 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : a : 3.16270000000000E-01 9.40179958538160E-01 b : 3.16270000000000E-01 -9.40179958538160E-01 c : -6.72670000000000E-01 3.26802748753925E-01 d : -6.72670000000000E-01 -3.26802748753925E-01 t : 1.05055232394915E-01 -8.20732577685255E-02 u : 1.05055232394915E-01 8.20732577685254E-02 v : -2.70836601845149E-01 -1.06019057303938E+00 w : -2.70836601845149E-01 1.06019057303938E+00 == err : 3.067E-15 = rco : 4.003E-02 = res : 4.518E-16 == SHAR_EOF fi # end of overwriting check if test -f 'i1' then echo shar: will not over-write existing file "'i1'" else cat << "SHAR_EOF" > 'i1' 10 x1 - 0.25428722 - 0.18324757*x4*x3*x9; x2 - 0.37842197 - 0.16275449*x1*x10*x6; x3 - 0.27162577 - 0.16955071*x1*x2*x10; x4 - 0.19807914 - 0.15585316*x7*x1*x6; x5 - 0.44166728 - 0.19950920*x7*x6*x3; x6 - 0.14654113 - 0.18922793*x8*x5*x10; x7 - 0.42937161 - 0.21180484*x2*x5*x8; x8 - 0.07056438 - 0.17081208*x1*x7*x6; x9 - 0.34504906 - 0.19612740*x10*x6*x8; x10 - 0.42651102 - 0.21466544*x4*x8*x1; TITLE : Benchmark i1 from the Interval Arithmetic Benchmarks ROOT COUNTS : total degree : 3^10 = 59049 a m-homogeneous Bezout number : 452. with partition : {{x1 }{x4 }{x3 }{x9 }{x2 }{x10 }{x6 }{x7 x5 }{x8 }} a generalized Bezout bound : 437 based on the set structure : {x1 x4 }{x3 }{x9 } {x1 x2 }{x10 }{x6 } {x1 x3 }{x2 }{x10 } {x1 x4 }{x6 }{x7 } {x3 x5 }{x6 }{x7 } {x10 x6 }{x5 }{x8 } {x2 x7 }{x5 }{x8 } {x1 x8 }{x6 }{x7 } {x9 x10 }{x6 }{x8 } {x1 x10 }{x4 }{x8 } mixed volume : 66 NOTE : 50 regular solutions have been found. Others are poorly conditioned, but they are contained in the list of solutions as well (with m : 0). REFERENCES : P. Van Hentenryck, D. McAllester and D. Kapur: `Solving Polynomial Systems Using a Branch and Prune Approach', SIAM J. Numerical Analysis, Vol. 34, No. 2, pp 797-827, 1997. H. Hong and V. Stahl: `Safe Starting Regions by Fixed Points and Tightening', Computing 53(3-4): 322-335, 1995. R.E. Moore and S.T. Jones: `Safe Starting Regions for Iterative Methods', SIAM J. Numer. Anal. 14(6): 1051-1065, 1977. THE SOLUTIONS : 66 10 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.37617046933576E+03 1.75162308040602E-46 x4 : 1.91244429349070E-01 0.00000000000000E+00 x3 : 1.11648326693822E+05 0.00000000000000E+00 x9 : 3.51651716682435E-01 -2.56585412168851E-49 x2 : 1.19925115889775E+02 4.37905770101505E-47 x10 : 3.98996575405470E+00 2.05268329735081E-48 x6 : 1.33771374417927E-01 0.00000000000000E+00 x7 : -2.38214996065047E-04 4.17619485951906E-52 x5 : -2.68151413493657E-01 2.56585412168851E-49 x8 : 6.30736679574373E-02 1.26956323729379E-50 =========================================================== solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.56812736464068E-01 -1.93726275856217E+00 x4 : -1.77788327701848E+00 1.51277683961881E+00 x3 : -1.14989646273745E+00 5.99160252238375E-01 x9 : 2.89001192716579E+00 -2.16698964608753E+00 x2 : 7.17049225573036E-01 2.00040415491531E+00 x10 : -2.18440899918315E+00 -1.68720277618886E-01 x6 : 2.89297817034891E+00 -3.28242997238889E-01 x7 : -1.11509797661193E+00 -2.57527025030782E+00 x5 : 2.22250532623057E+00 1.13854481500069E+00 x8 : -2.09505260494117E+00 1.65797445846536E+00 =========================================================== solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -7.82474396133328E+02 -1.15825988436407E+03 x4 : 1.94940163228776E-01 1.97945067099259E-03 x3 : -6.32362190331829E+04 -9.54983197423893E+04 x9 : 3.41583331758185E-01 -6.68059824975876E-03 x2 : -5.80036277718902E+01 1.16138889570239E+02 x10 : -1.63250111313739E+00 -3.34576632572017E+00 x6 : 1.53232639197046E-01 -8.73110095977562E-03 x7 : 9.80223399665792E-06 -1.10553948367336E-04 x5 : 1.10501390730252E-01 2.04577411668028E-01 x8 : 6.71241215454105E-02 2.16944004452421E-03 =========================================================== solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.60458289052402E+00 9.35615457018928E-01 x4 : -5.31062762008222E-01 2.05859040461133E+00 x3 : -7.46610238300010E-01 1.48425640207180E+00 x9 : 1.21032758596782E+00 -2.97858557227334E+00 x2 : 2.08956452371963E+00 -1.06690312276987E+00 x10 : 2.43491912004785E+00 7.41944181128890E-02 x6 : -2.73326740030802E+00 1.64443885086894E-01 x7 : -2.20589297129679E+00 1.65064663332762E+00 x5 : 1.02742449837788E+00 2.43110252529563E+00 x8 : -7.28561187278717E-01 2.25617567766802E+00 =========================================================== solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 7.16147215237156E-01 1.87213445250351E+00 x4 : -1.69617758350217E+00 1.17436763026505E+00 x3 : -1.27577164378989E+00 1.25618685942181E+00 x9 : -2.59016146123122E+00 1.18609968964843E+00 x2 : 7.71458403842014E-01 2.17454028024751E+00 x10 : 2.54096570526882E+00 6.19453099899217E-02 x6 : 2.63002350366832E+00 4.30283770403583E-01 x7 : 9.22437196884481E-01 2.51312690213041E+00 x5 : -1.65656311465749E+00 -1.44634653519861E+00 x8 : -2.00550472886754E+00 1.28708444288357E+00 =========================================================== solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.56686437031456E-03 3.37335454203883E-03 x4 : 2.46710410203047E+00 1.32945358849390E+01 x3 : 2.71618524318188E-01 2.92272951414109E-06 x9 : -6.14131480033352E-02 3.58430923722305E-01 x2 : 3.78486237718667E-01 3.01609709256174E-04 x10 : -8.99764535507967E-03 7.94272858396181E-03 x6 : 2.69838562021507E+00 -1.53271287722930E+01 x7 : -4.25417168118701E+02 3.45645574271772E+02 x5 : 2.25317414639490E+02 4.03889323971051E+02 x8 : 2.55737230443570E+00 1.45705568442826E+01 =========================================================== solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.19013978229384E-01 -2.07408355934927E+00 x4 : -2.10419327262111E+00 -1.37649974156351E-02 x3 : 1.72781969596659E+00 -5.26837472001430E-01 x9 : 7.66189280345110E-02 3.12979630605483E+00 x2 : -1.85429888423066E+00 2.69072340950398E-01 x10 : -8.51832313976336E-03 -2.30361572834308E+00 x6 : 2.82491491986147E+00 2.35302576152679E-01 x7 : 3.00244547907139E-01 -2.44443110047997E+00 x5 : 2.13933481668232E-01 -2.50562307690715E+00 x8 : -2.45268211385633E+00 -1.50861736762942E-02 =========================================================== solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.33548507652011E+00 1.52065453789319E+00 x4 : -8.57728181956240E-01 -2.17584653290190E+00 x3 : 2.42248162099511E-01 -1.60976163260137E+00 x9 : -1.02156060557188E+00 -2.47155708997821E+00 x2 : 1.67455767712232E+00 1.26334631586070E+00 x10 : -2.23326516485888E+00 -1.25361885439059E-01 x6 : -2.43473700726987E+00 3.27296447064418E-01 x7 : 2.87167656036731E+00 1.22264295411735E+00 x5 : -5.69774086693307E-01 2.27556730920279E+00 x8 : -1.08658023447285E+00 -2.38468614974352E+00 =========================================================== solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.33548507652011E+00 -1.52065453789319E+00 x4 : -8.57728181956240E-01 2.17584653290190E+00 x3 : 2.42248162099511E-01 1.60976163260137E+00 x9 : -1.02156060557188E+00 2.47155708997821E+00 x2 : 1.67455767712232E+00 -1.26334631586071E+00 x10 : -2.23326516485888E+00 1.25361885439060E-01 x6 : -2.43473700726987E+00 -3.27296447064419E-01 x7 : 2.87167656036731E+00 -1.22264295411735E+00 x5 : -5.69774086693307E-01 -2.27556730920279E+00 x8 : -1.08658023447285E+00 2.38468614974352E+00 =========================================================== solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.36636978719637E-01 -1.95477658444682E+00 x4 : 2.36042692299965E+00 5.52551753267651E-02 x3 : -1.56687503638995E+00 6.05159660932053E-01 x9 : -1.54570511924010E-02 2.85285641651115E+00 x2 : 2.32245795134219E+00 -2.32183437308955E-01 x10 : 3.45417445658449E-03 -2.44187943504267E+00 x6 : -2.44737259530947E+00 -2.44262379877867E-01 x7 : 4.09396987543542E-01 -2.78737132551298E+00 x5 : 1.56171422732507E-01 -2.30442722730867E+00 x8 : 2.44045615824536E+00 6.05586144568993E-02 =========================================================== solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 0 the solution for t : x1 : 2.80265773009967E+03 -7.89877743303727E+04 x4 : 1.93839779023381E-01 -5.07610362098454E-04 x3 : 2.45529480858715E+05 -6.44402741058867E+06 x9 : 3.45046817662646E-01 -2.29139166185874E-07 x2 : 5.27297396549408E-02 2.21888860185756E+00 x10 : 5.71787650755894E+00 -2.16735731346977E+02 x6 : 6.73842910736010E-08 -8.01283660829115E-07 x7 : 4.31048638937167E-01 -8.41395571578932E-05 x5 : -9.71506084093734E-04 -5.41754331988794E-02 x8 : 6.59181215199852E-02 -5.56331240121087E-04 =========================================================== solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.16997787389578E-02 0.00000000000000E+00 x4 : 1.27591320920242E+01 0.00000000000000E+00 x3 : 2.71638477371460E-01 6.15804989205242E-48 x9 : -4.18802980559574E-01 1.64214663788064E-47 x2 : 3.78957929766611E-01 1.71056941445901E-48 x10 : -1.69039214036614E-02 3.42113882891801E-49 x6 : 1.66507613940278E+01 -2.62743462060903E-46 x7 : -4.13712543033121E+02 0.00000000000000E+00 x5 : -3.72883269430527E+02 0.00000000000000E+00 x8 : 1.38372379702268E+01 1.97057596545677E-46 =========================================================== solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.04464582910555E-05 -6.26429228927858E-53 x4 : -2.60675495124622E-01 8.55284707229499E-50 x3 : 2.71625483834030E-01 -1.02567345749788E-49 x9 : 1.95989782349935E+01 -1.57372386130228E-47 x2 : 3.78808138073229E-01 2.72622000429404E-49 x10 : 4.26510767339007E-01 7.14964559949663E-50 x6 : -5.32530286821123E+02 -5.25486924121806E-46 x7 : -5.29116696118552E+02 -5.25486924121806E-46 x5 : 1.52700964461621E+04 3.92363570010949E-44 x8 : -4.32221918559989E-01 5.98699295060652E-49 =========================================================== solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 0 the solution for t : x1 : 2.80265773009967E+03 7.89877743303727E+04 x4 : 1.93839779023381E-01 5.07610362098454E-04 x3 : 2.45529480858715E+05 6.44402741058867E+06 x9 : 3.45046817662646E-01 2.29139166185874E-07 x2 : 5.27297396549408E-02 -2.21888860185756E+00 x10 : 5.71787650755894E+00 2.16735731346977E+02 x6 : 6.73842910736010E-08 8.01283660829115E-07 x7 : 4.31048638937167E-01 8.41395571578932E-05 x5 : -9.71506084093734E-04 5.41754331988794E-02 x8 : 6.59181215199852E-02 5.56331240121087E-04 =========================================================== solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.70091090901151E+00 1.54559975501964E+00 x4 : 8.57257156826304E-01 2.13379157430343E+00 x3 : 2.22904409748265E-01 1.80005786387868E+00 x9 : -6.77496014008220E-01 -2.68563060001009E+00 x2 : -1.31807288356778E+00 -1.43104131777171E+00 x10 : -2.37386198356308E+00 -8.02512988984431E-02 x6 : 2.49187445182135E+00 -1.76378725444304E-01 x7 : 2.05392406911819E+00 1.41799218973323E+00 x5 : -4.58463279627732E-01 2.06890782748762E+00 x8 : 7.93010868376469E-01 2.33859472014070E+00 =========================================================== solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.75339589276361E+00 7.04371663094363E-01 x4 : -1.84583428556200E+00 1.14215573600919E+00 x3 : 1.13101123201944E+00 -1.18961676572353E+00 x9 : 1.68509622288520E+00 2.78923341138743E+00 x2 : 9.62994568376326E-01 1.84691130532679E+00 x10 : 1.81395913152854E-01 2.19169552554126E+00 x6 : -2.82859210515283E+00 -4.50751416380508E-01 x7 : -2.66326617837401E+00 7.82066209487114E-01 x5 : 1.98096755796850E+00 -2.09989603269850E+00 x8 : -2.16952560957847E+00 1.25178082338312E+00 =========================================================== solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 7.16147215237156E-01 -1.87213445250351E+00 x4 : -1.69617758350217E+00 -1.17436763026505E+00 x3 : -1.27577164378989E+00 -1.25618685942181E+00 x9 : -2.59016146123122E+00 -1.18609968964843E+00 x2 : 7.71458403842013E-01 -2.17454028024751E+00 x10 : 2.54096570526882E+00 -6.19453099899218E-02 x6 : 2.63002350366832E+00 -4.30283770403583E-01 x7 : 9.22437196884481E-01 -2.51312690213041E+00 x5 : -1.65656311465749E+00 1.44634653519861E+00 x8 : -2.00550472886754E+00 -1.28708444288357E+00 =========================================================== solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.34886567955770E+00 1.29781506744778E+00 x4 : -5.36412649741950E-01 2.13479716587064E+00 x3 : 4.03737225194021E-01 -1.33218734465026E+00 x9 : 2.86086617151049E+00 9.78979461136982E-01 x2 : 1.64379408947683E+00 -1.15016742673513E+00 x10 : -1.19233616221082E-01 -2.09915283427393E+00 x6 : 2.64922214591183E+00 3.29344968416738E-01 x7 : 1.53593291107726E+00 2.45844878784122E+00 x5 : 2.56969538346523E+00 -3.00920132901110E-01 x8 : -7.34424561826686E-01 2.33969682924921E+00 =========================================================== solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.31279784979417E+00 -1.73493436444969E+00 x4 : 6.95270822126053E-01 2.09237672377232E+00 x3 : -4.83340297662584E-01 -1.50135806238412E+00 x9 : 2.94884544578495E+00 -1.21456954915189E+00 x2 : -1.56589679093874E+00 -9.96271287800973E-01 x10 : 2.68321520735272E-01 2.43988395801741E+00 x6 : -2.50831337482879E+00 1.62548065500424E-01 x7 : 1.72818870709405E+00 -1.83860899703290E+00 x5 : 2.29639989205640E+00 7.37105996414173E-01 x8 : 6.15476946306964E-01 2.29320483672666E+00 =========================================================== solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.40813717218843E+00 -2.29588740394978E-40 x4 : -2.22379834722282E+00 -2.29588740394978E-41 x3 : -2.10535311245437E+00 -5.51012976947947E-40 x9 : -3.10326390035492E+00 -3.67341984631965E-40 x2 : -2.28861636845691E+00 0.00000000000000E+00 x10 : -2.54373279619909E+00 -3.30033814317781E-41 x6 : -2.67512185379168E+00 0.00000000000000E+00 x7 : -2.41219141329236E+00 0.00000000000000E+00 x5 : -2.26879401676413E+00 -4.59177480789956E-41 x8 : -2.58376698612504E+00 0.00000000000000E+00 =========================================================== solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -5.52087700096175E-01 2.12815534323673E+00 x4 : 1.84408292423731E+00 1.40308980881936E+00 x3 : 1.61268722330865E+00 8.40513129207968E-01 x9 : 2.04883241520454E+00 2.11852108085372E+00 x2 : -5.30315999591708E-01 1.83284400984092E+00 x10 : -2.22452417135764E+00 -5.42532862223195E-02 x6 : -2.52679072997078E+00 -4.65227469302849E-01 x7 : -6.55276256750126E-01 2.36773818124868E+00 x5 : 2.28094387700748E+00 -1.36448070922987E+00 x8 : 1.87455301952098E+00 1.53775957235155E+00 =========================================================== solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.18155212074085E+00 -1.58412979112574E+00 x4 : -7.04682610175271E-01 2.09877482207339E+00 x3 : 4.97380199075699E-01 -1.82448125944379E+00 x9 : -2.70398849584648E+00 -6.74285475316625E-01 x2 : 1.81404876696741E+00 -1.48781659190743E+00 x10 : 2.79763808332017E-01 2.32174793793956E+00 x6 : 2.74624045632746E+00 -1.16724976726475E-01 x7 : -1.24916522011819E+00 -2.39210144404335E+00 x5 : -2.26460671633381E+00 7.12929246907002E-01 x8 : -9.18845217417713E-01 2.30021702999147E+00 =========================================================== solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.94024012547492E+00 7.17588332664968E-01 x4 : 4.95113561278551E-01 -2.00344734669521E+00 x3 : 1.44453314814701E+00 -1.31849920330411E+00 x9 : 5.63504751603520E-01 -3.07039852972517E+00 x2 : -1.74195872954793E+00 1.05501583379211E+00 x10 : 2.46675139916657E+00 1.35900431075658E-01 x6 : 2.80980268045500E+00 -4.60617210474085E-01 x7 : -1.35951113127478E+00 1.73760450093087E+00 x5 : 1.02046569473938E+00 2.38185900514855E+00 x8 : 3.96108419852548E-01 -2.19573994174702E+00 =========================================================== solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -7.82474396133328E+02 1.15825988436407E+03 x4 : 1.94940163228776E-01 -1.97945067099259E-03 x3 : -6.32362190331829E+04 9.54983197423893E+04 x9 : 3.41583331758185E-01 6.68059824975876E-03 x2 : -5.80036277718902E+01 -1.16138889570239E+02 x10 : -1.63250111313739E+00 3.34576632572017E+00 x6 : 1.53232639197046E-01 8.73110095977561E-03 x7 : 9.80223399665795E-06 1.10553948367336E-04 x5 : 1.10501390730252E-01 -2.04577411668028E-01 x8 : 6.71241215454105E-02 -2.16944004452421E-03 =========================================================== solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.18155212074085E+00 1.58412979112574E+00 x4 : -7.04682610175271E-01 -2.09877482207339E+00 x3 : 4.97380199075699E-01 1.82448125944379E+00 x9 : -2.70398849584648E+00 6.74285475316625E-01 x2 : 1.81404876696741E+00 1.48781659190743E+00 x10 : 2.79763808332017E-01 -2.32174793793956E+00 x6 : 2.74624045632746E+00 1.16724976726475E-01 x7 : -1.24916522011819E+00 2.39210144404334E+00 x5 : -2.26460671633381E+00 -7.12929246907002E-01 x8 : -9.18845217417713E-01 -2.30021702999147E+00 =========================================================== solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.06873169854717E+00 2.18025591983157E+00 x4 : 7.75857476212130E-01 2.05081759674725E+00 x3 : -9.77052186520967E-01 -2.13965098972575E+00 x9 : -2.62401010544817E+00 6.29196203358522E-01 x2 : -1.83458335171471E+00 -1.35799965844777E+00 x10 : -1.32946935112736E-01 -2.63302794026330E+00 x6 : -2.46595135581673E+00 -3.60280272420755E-01 x7 : -1.44736432588330E+00 1.73470654571440E+00 x5 : -1.97936061061132E+00 -1.05817391258197E+00 x8 : 7.03798376585846E-01 2.24765682903702E+00 =========================================================== solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 0 the solution for t : x1 : 1.26088392009240E-03 -4.66726145839585E-61 x4 : -4.26513158732033E+02 -3.26265223399926E-55 x3 : 3.05263618989687E-10 -3.32344871101593E-65 x9 : 1.06052282347077E+07 1.06910588403688E-50 x2 : -2.33527017385371E+01 -3.18618382226490E-57 x10 : 5.44075435605759E+01 1.20023334007346E-56 x6 : -2.12545101383477E+03 -1.30506089359971E-54 x7 : 1.02162676458251E+03 4.89397835099889E-55 x5 : 4.41535034367560E-01 -4.97841222228891E-60 x8 : -4.67596784169729E+02 -2.03915764624954E-55 =========================================================== solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.84307100193044E+00 1.46936793852786E-39 x4 : 2.08503346871915E+00 3.30607786168768E-39 x3 : 1.61912972960572E+00 2.93873587705572E-39 x9 : 2.56821806158063E+00 0.00000000000000E+00 x2 : 1.96833568555201E+00 0.00000000000000E+00 x10 : 2.19073176217005E+00 0.00000000000000E+00 x6 : 2.41940908022738E+00 9.18354961579912E-40 x7 : 2.71515360518090E+00 1.46936793852786E-39 x5 : 2.56368147461255E+00 -1.46936793852786E-39 x8 : 2.13863020396867E+00 -3.67341984631965E-40 =========================================================== solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.06858900020479E+00 3.02994154887424E-01 x4 : -1.51722076123585E+00 -1.48547262952589E+00 x3 : 1.80927197223037E+00 6.15319824626651E-01 x9 : -1.46462836028526E+00 1.99355271399728E+00 x2 : 6.64890165355558E-01 -1.89761800485310E+00 x10 : 2.36143985042743E-01 2.31163663040596E+00 x6 : -2.41355938375844E+00 -2.57269351726690E-01 x7 : 2.56820295194236E+00 1.27909073928056E+00 x5 : -1.21690589982059E+00 -2.07340318875425E+00 x8 : -1.80937147727675E+00 -1.62804956686401E+00 =========================================================== solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.06802753752306E+00 2.93873587705572E-39 x4 : 2.39687666870207E+00 -2.93873587705572E-39 x3 : 2.10123858247560E+00 2.93873587705572E-39 x9 : -2.51629643949839E+00 0.00000000000000E+00 x2 : 2.35811947551599E+00 -3.67341984631965E-39 x10 : -2.21277602655987E+00 1.83670992315982E-39 x6 : 2.65810469334713E+00 -1.46936793852786E-39 x7 : -2.56649976135959E+00 0.00000000000000E+00 x5 : -2.41823770194466E+00 -4.40810381558358E-39 x8 : 2.48040438180978E+00 1.46936793852786E-39 =========================================================== solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.31279784979417E+00 1.73493436444969E+00 x4 : 6.95270822126053E-01 -2.09237672377232E+00 x3 : -4.83340297662585E-01 1.50135806238412E+00 x9 : 2.94884544578495E+00 1.21456954915189E+00 x2 : -1.56589679093874E+00 9.96271287800974E-01 x10 : 2.68321520735272E-01 -2.43988395801741E+00 x6 : -2.50831337482879E+00 -1.62548065500423E-01 x7 : 1.72818870709405E+00 1.83860899703290E+00 x5 : 2.29639989205640E+00 -7.37105996414173E-01 x8 : 6.15476946306964E-01 -2.29320483672666E+00 =========================================================== solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 0 the solution for t : x1 : -1.02680086136189E-03 -7.46071420929211E-04 x4 : -4.26411449354601E+02 -9.39054652964020E-02 x3 : 9.44952989330727E-11 -2.98587535438658E-10 x9 : 3.12102066661706E+06 9.95527116027830E+06 x2 : -7.11241429675966E+00 2.22803934017555E+01 x10 : -4.34979231804784E+01 -3.19449696225444E+01 x6 : 1.69955278188375E+03 1.24786629640342E+03 x7 : 3.11371762384610E+02 -9.74293225990181E+02 x5 : 4.41624682541391E-01 -1.27842397319776E-04 x8 : -4.67485312638997E+02 -1.02918592415086E-01 =========================================================== solution 33 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 0 the solution for t : x1 : -5.67371169962853E+04 1.08583802171816E-99 x4 : 1.98079192064705E-01 2.18007543808417E-105 x3 : 3.76092305750620E+11 -1.53409170790554E-92 x9 : -4.15621190253752E-06 5.32244980001019E-110 x2 : 2.30230514439098E+05 -3.20036469559037E-99 x10 : -1.69810557511956E+02 8.92958899439278E-103 x6 : 1.46824063575592E-01 1.30804526285050E-105 x7 : -4.01017469365588E-11 4.06070693970504E-115 x5 : -1.24781062819140E-04 -1.70318393600326E-108 x8 : 7.05644370619196E-02 1.66326556250318E-111 =========================================================== solution 34 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.75339589276361E+00 -7.04371663094363E-01 x4 : -1.84583428556200E+00 -1.14215573600919E+00 x3 : 1.13101123201944E+00 1.18961676572353E+00 x9 : 1.68509622288520E+00 -2.78923341138743E+00 x2 : 9.62994568376326E-01 -1.84691130532679E+00 x10 : 1.81395913152854E-01 -2.19169552554126E+00 x6 : -2.82859210515283E+00 4.50751416380507E-01 x7 : -2.66326617837401E+00 -7.82066209487114E-01 x5 : 1.98096755796850E+00 2.09989603269850E+00 x8 : -2.16952560957847E+00 -1.25178082338312E+00 =========================================================== solution 35 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.99375993820746E-03 -4.46612732955824E-03 x4 : -1.58195544279100E+01 7.16874971579763E+00 x3 : 2.71627008373633E-01 -2.50097426176100E-07 x9 : 2.69995508494568E-01 1.28022653616628E-01 x2 : 3.78384431078600E-01 -8.51082340276965E-06 x10 : -1.66262932247915E-03 2.83527054014586E-03 x6 : -1.09551382334577E+01 -4.92125822007003E+00 x7 : 1.77075786769163E+02 1.55478659257963E+03 x5 : 3.09965197175430E+02 -9.70273714687252E+02 x8 : -1.74844553989543E+01 7.85681246344188E+00 =========================================================== solution 36 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.06389457877984E+00 2.00589301697078E+00 x4 : 1.76671448605261E+00 -1.12935674848488E+00 x3 : 1.73938765481832E+00 -1.63747356784632E+00 x9 : -1.90360273805416E+00 1.38914864809201E+00 x2 : -5.88090986364273E-01 -2.07453588565640E+00 x10 : 2.64136665455390E+00 -2.01410360041704E-01 x6 : -2.31881739368230E+00 -2.97901991228499E-01 x7 : 6.09902746216392E-01 2.25532599254719E+00 x5 : -1.58380819781429E+00 -1.63534681759089E+00 x8 : 1.78975869226653E+00 -1.23775337805624E+00 =========================================================== solution 37 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 0 the solution for t : x1 : 1.27583160578785E+05 -2.24307341087449E-55 x4 : 1.29438004803117E-01 0.00000000000000E+00 x3 : 1.55886715451104E+07 -3.65417050207917E-53 x9 : 3.45051047546212E-01 1.55575381946529E-61 x2 : -4.47296806520788E+01 -4.97841222228891E-60 x10 : -1.61109196640787E+01 9.95682444457783E-60 x6 : 1.34836630936864E-04 3.79822709830392E-64 x7 : -2.56016287696288E-02 2.43086534291451E-62 x5 : -1.02944568020964E+01 4.97841222228891E-60 x8 : -4.66499023888958E-03 -2.43086534291451E-63 =========================================================== solution 38 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.70091090901151E+00 -1.54559975501964E+00 x4 : 8.57257156826304E-01 -2.13379157430343E+00 x3 : 2.22904409748266E-01 -1.80005786387868E+00 x9 : -6.77496014008220E-01 2.68563060001009E+00 x2 : -1.31807288356778E+00 1.43104131777171E+00 x10 : -2.37386198356308E+00 8.02512988984431E-02 x6 : 2.49187445182135E+00 1.76378725444303E-01 x7 : 2.05392406911819E+00 -1.41799218973323E+00 x5 : -4.58463279627732E-01 -2.06890782748762E+00 x8 : 7.93010868376469E-01 -2.33859472014070E+00 =========================================================== solution 39 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 0 the solution for t : x1 : -4.31655472097488E+03 -9.36335270938440E-97 x4 : 2.01575585734627E-01 -4.28620271730853E-101 x3 : -3.37987482618267E+05 -1.19850914680120E-94 x9 : 3.45769007305967E-01 2.27555448693654E-101 x2 : -3.42857352450869E+01 7.31511930420656E-99 x10 : -1.34694739507824E+01 2.51457226082100E-99 x6 : -3.66319283981549E-03 6.13909243364503E-103 x7 : 1.41877702665037E-03 4.46479449719639E-103 x5 : 7.92126486151775E-01 1.71448108692341E-100 x8 : 7.43964175957645E-02 -8.92958899439278E-103 =========================================================== solution 40 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 0 the solution for t : x1 : 4.93535172262593E+04 4.68348802888915E-87 x4 : 1.33915323053084E-01 -4.31463292848433E-93 x3 : 5.82854021992067E+06 7.72133638420204E-85 x9 : 3.45054404659280E-01 -9.36335270938440E-97 x2 : 9.04654612247590E+02 6.28363963558109E-89 x10 : 7.69944204721738E-01 -2.50502024720734E-92 x6 : 1.46214604699057E-01 4.49440930050451E-95 x7 : -5.70513224652032E-05 4.68167635469220E-96 x5 : -9.25849936272194E+00 -9.81818693059546E-91 x8 : 2.42064857708319E-04 -4.49440930050451E-95 =========================================================== solution 41 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.06389457877984E+00 -2.00589301697078E+00 x4 : 1.76671448605261E+00 1.12935674848488E+00 x3 : 1.73938765481832E+00 1.63747356784632E+00 x9 : -1.90360273805416E+00 -1.38914864809201E+00 x2 : -5.88090986364273E-01 2.07453588565640E+00 x10 : 2.64136665455390E+00 2.01410360041704E-01 x6 : -2.31881739368230E+00 2.97901991228499E-01 x7 : 6.09902746216392E-01 -2.25532599254719E+00 x5 : -1.58380819781429E+00 1.63534681759089E+00 x8 : 1.78975869226653E+00 1.23775337805624E+00 =========================================================== solution 42 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.60458289052402E+00 -9.35615457018928E-01 x4 : -5.31062762008223E-01 -2.05859040461133E+00 x3 : -7.46610238300010E-01 -1.48425640207180E+00 x9 : 1.21032758596782E+00 2.97858557227334E+00 x2 : 2.08956452371963E+00 1.06690312276987E+00 x10 : 2.43491912004784E+00 -7.41944181128889E-02 x6 : -2.73326740030802E+00 -1.64443885086893E-01 x7 : -2.20589297129679E+00 -1.65064663332762E+00 x5 : 1.02742449837788E+00 -2.43110252529563E+00 x8 : -7.28561187278717E-01 -2.25617567766802E+00 =========================================================== solution 43 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.16978277863683E+00 5.16656509027848E-01 x4 : 1.73429493926553E+00 1.45355545408771E+00 x3 : -1.69152065815907E+00 -6.83368696197939E-01 x9 : -1.79289767516672E+00 1.91398118112973E+00 x2 : -3.62889132278646E-01 2.11523055672443E+00 x10 : 1.75782632747290E-01 2.55514481788056E+00 x6 : 2.37515002842203E+00 4.12636207474827E-01 x7 : 2.36895100039251E+00 8.70060632690475E-01 x5 : -9.20989600738090E-01 -1.74545921917459E+00 x8 : 1.75422748956677E+00 1.59306895354618E+00 =========================================================== solution 44 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.06873169854717E+00 -2.18025591983157E+00 x4 : 7.75857476212130E-01 -2.05081759674725E+00 x3 : -9.77052186520967E-01 2.13965098972575E+00 x9 : -2.62401010544817E+00 -6.29196203358522E-01 x2 : -1.83458335171471E+00 1.35799965844777E+00 x10 : -1.32946935112736E-01 2.63302794026330E+00 x6 : -2.46595135581673E+00 3.60280272420755E-01 x7 : -1.44736432588330E+00 -1.73470654571440E+00 x5 : -1.97936061061132E+00 1.05817391258197E+00 x8 : 7.03798376585846E-01 -2.24765682903702E+00 =========================================================== solution 45 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 0 the solution for t : x1 : -1.97063846657017E+06 -4.31554466984198E+03 x4 : 1.33688935149782E-01 1.10642609245829E-03 x3 : -2.33115199373017E+08 1.41876038400215E+06 x9 : 3.45049067539324E-01 7.58510036189108E-11 x2 : 3.04609190813901E-01 1.01675150412806E+01 x10 : 1.48651670555707E+00 -6.85739824190540E+01 x6 : 4.62129859264225E-07 -7.67416143860735E-09 x7 : 4.53664438665742E-01 -1.25521349809220E-03 x5 : -9.30735628791992E+00 2.48238291838225E-01 x8 : -6.05195076563345E-06 1.21262181799248E-03 =========================================================== solution 46 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 0 the solution for t : x1 : -1.02680086136189E-03 7.46071420929212E-04 x4 : -4.26411449354601E+02 9.39054652962867E-02 x3 : 9.44952989330730E-11 2.98587535438658E-10 x9 : 3.12102066661706E+06 -9.95527116027829E+06 x2 : -7.11241429675966E+00 -2.22803934017555E+01 x10 : -4.34979231804784E+01 3.19449696225444E+01 x6 : 1.69955278188375E+03 -1.24786629640342E+03 x7 : 3.11371762384610E+02 9.74293225990181E+02 x5 : 4.41624682541391E-01 1.27842397319776E-04 x8 : -4.67485312638997E+02 1.02918592415016E-01 =========================================================== solution 47 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.56812736464068E-01 1.93726275856217E+00 x4 : -1.77788327701848E+00 -1.51277683961881E+00 x3 : -1.14989646273745E+00 -5.99160252238375E-01 x9 : 2.89001192716579E+00 2.16698964608753E+00 x2 : 7.17049225573036E-01 -2.00040415491531E+00 x10 : -2.18440899918315E+00 1.68720277618886E-01 x6 : 2.89297817034891E+00 3.28242997238888E-01 x7 : -1.11509797661193E+00 2.57527025030783E+00 x5 : 2.22250532623057E+00 -1.13854481500069E+00 x8 : -2.09505260494117E+00 -1.65797445846536E+00 =========================================================== solution 48 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.86384896052278E+00 1.05471601760735E+00 x4 : 2.01327374582176E+00 -1.00970407293690E+00 x3 : -9.16267931643612E-01 1.51449609614846E+00 x9 : 1.66862047558878E+00 2.77597174366117E+00 x2 : -6.73635284159036E-01 -2.08708613839041E+00 x10 : 1.89569327090102E-01 2.40962100848246E+00 x6 : 2.75209136503243E+00 3.50171041010831E-01 x7 : -2.22724292302835E+00 2.66829142702839E-01 x5 : 1.59302960437637E+00 -1.87198797847436E+00 x8 : 2.05998292130641E+00 -1.10661633606161E+00 =========================================================== solution 49 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 0 the solution for t : x1 : 2.52287460673466E+05 0.00000000000000E+00 x4 : 1.33597700373983E-01 -1.30804526285050E-105 x3 : 2.98659178146185E+07 -2.34083817734610E-97 x9 : 3.45050098062942E-01 5.45018859521044E-106 x2 : -2.04903667381417E+03 -2.14310135865427E-101 x10 : -3.40746067141550E-01 1.58055469261103E-105 x6 : 1.46477336691205E-01 4.25795984000815E-109 x7 : -1.11957453674463E-05 3.99183735000764E-109 x5 : -9.32985530478561E+00 -9.76673796261710E-104 x8 : -1.06043518614529E-04 2.02253092400387E-108 =========================================================== solution 50 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 0 the solution for t : x1 : -1.97063846657017E+06 4.31554466984198E+03 x4 : 1.33688935149782E-01 -1.10642609245829E-03 x3 : -2.33115199373017E+08 -1.41876038400215E+06 x9 : 3.45049067539324E-01 -7.58510036189108E-11 x2 : 3.04609190813901E-01 -1.01675150412806E+01 x10 : 1.48651670555707E+00 6.85739824190540E+01 x6 : 4.62129859264225E-07 7.67416143860736E-09 x7 : 4.53664438665742E-01 1.25521349809220E-03 x5 : -9.30735628791992E+00 -2.48238291838224E-01 x8 : -6.05195076563344E-06 -1.21262181799248E-03 =========================================================== solution 51 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.16978277863683E+00 -5.16656509027848E-01 x4 : 1.73429493926553E+00 -1.45355545408771E+00 x3 : -1.69152065815907E+00 6.83368696197939E-01 x9 : -1.79289767516672E+00 -1.91398118112973E+00 x2 : -3.62889132278646E-01 -2.11523055672443E+00 x10 : 1.75782632747290E-01 -2.55514481788056E+00 x6 : 2.37515002842203E+00 -4.12636207474827E-01 x7 : 2.36895100039251E+00 -8.70060632690475E-01 x5 : -9.20989600738090E-01 1.74545921917459E+00 x8 : 1.75422748956677E+00 -1.59306895354618E+00 =========================================================== solution 52 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 0 the solution for t : x1 : 8.27694177064702E+04 6.84227765783602E-48 x4 : 1.39282034891955E-01 0.00000000000000E+00 x3 : 9.39830659987918E+06 1.40129846432482E-45 x9 : 3.45052858341261E-01 -3.26265223399926E-55 x2 : 4.29806229669743E+01 -6.68191177523049E-52 x10 : 1.55814323251411E+01 -3.34095588761524E-52 x6 : 2.02965293385166E-04 2.03915764624954E-56 x7 : -2.24568403227169E-02 -8.15663058499816E-55 x5 : -8.10472784968610E+00 -2.92333640166334E-52 x8 : 6.12387830286544E-03 4.89397835099889E-55 =========================================================== solution 53 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.57833393700477E-01 0.00000000000000E+00 x4 : 2.00668964223849E-01 4.59177480789956E-41 x3 : 2.78745017346439E-01 0.00000000000000E+00 x9 : 3.45966826875534E-01 0.00000000000000E+00 x2 : 3.81097154602805E-01 5.73971850987445E-42 x10 : 4.27326275993267E-01 0.00000000000000E+00 x6 : 1.49183919969283E-01 0.00000000000000E+00 x7 : 4.32009698734544E-01 0.00000000000000E+00 x5 : 4.45251424838973E-01 2.29588740394978E-41 x8 : 7.34027777746099E-02 -2.29588740394978E-41 =========================================================== solution 54 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.36636978719637E-01 1.95477658444682E+00 x4 : 2.36042692299965E+00 -5.52551753267651E-02 x3 : -1.56687503638995E+00 -6.05159660932054E-01 x9 : -1.54570511924010E-02 -2.85285641651115E+00 x2 : 2.32245795134219E+00 2.32183437308955E-01 x10 : 3.45417445658444E-03 2.44187943504267E+00 x6 : -2.44737259530947E+00 2.44262379877867E-01 x7 : 4.09396987543542E-01 2.78737132551298E+00 x5 : 1.56171422732507E-01 2.30442722730867E+00 x8 : 2.44045615824536E+00 -6.05586144568993E-02 =========================================================== solution 55 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -5.52087700096175E-01 -2.12815534323673E+00 x4 : 1.84408292423731E+00 -1.40308980881936E+00 x3 : 1.61268722330865E+00 -8.40513129207968E-01 x9 : 2.04883241520454E+00 -2.11852108085372E+00 x2 : -5.30315999591708E-01 -1.83284400984092E+00 x10 : -2.22452417135764E+00 5.42532862223197E-02 x6 : -2.52679072997078E+00 4.65227469302849E-01 x7 : -6.55276256750126E-01 -2.36773818124868E+00 x5 : 2.28094387700748E+00 1.36448070922987E+00 x8 : 1.87455301952098E+00 -1.53775957235155E+00 =========================================================== solution 56 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 0 the solution for t : x1 : 3.81178660067684E-04 -1.19904923648431E-03 x4 : -4.26350965032567E+02 2.36600775687233E-02 x3 : -2.52622192393179E-10 1.82519679010680E-10 x9 : -8.42320704541632E+06 -6.14723776239825E+06 x2 : 1.91653952383089E+01 -1.37698542392903E+01 x10 : 1.67274534760878E+01 -5.12965433429525E+01 x6 : -6.53724735021251E+02 2.00430537231866E+03 x7 : -8.37874908361703E+02 6.02139515771703E+02 x5 : 4.41775987164732E-01 8.04778024177420E-05 x8 : -4.67419022979846E+02 2.59309921111680E-02 =========================================================== solution 57 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.19013978229384E-01 2.07408355934927E+00 x4 : -2.10419327262111E+00 1.37649974156352E-02 x3 : 1.72781969596659E+00 5.26837472001430E-01 x9 : 7.66189280345111E-02 -3.12979630605483E+00 x2 : -1.85429888423066E+00 -2.69072340950398E-01 x10 : -8.51832313976334E-03 2.30361572834308E+00 x6 : 2.82491491986147E+00 -2.35302576152679E-01 x7 : 3.00244547907139E-01 2.44443110047997E+00 x5 : 2.13933481668232E-01 2.50562307690715E+00 x8 : -2.45268211385633E+00 1.50861736762941E-02 =========================================================== solution 58 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.94024012547492E+00 -7.17588332664968E-01 x4 : 4.95113561278551E-01 2.00344734669521E+00 x3 : 1.44453314814701E+00 1.31849920330411E+00 x9 : 5.63504751603521E-01 3.07039852972517E+00 x2 : -1.74195872954793E+00 -1.05501583379211E+00 x10 : 2.46675139916657E+00 -1.35900431075658E-01 x6 : 2.80980268045500E+00 4.60617210474085E-01 x7 : -1.35951113127478E+00 -1.73760450093087E+00 x5 : 1.02046569473938E+00 -2.38185900514854E+00 x8 : 3.96108419852548E-01 2.19573994174702E+00 =========================================================== solution 59 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.86384896052278E+00 -1.05471601760735E+00 x4 : 2.01327374582176E+00 1.00970407293690E+00 x3 : -9.16267931643612E-01 -1.51449609614846E+00 x9 : 1.66862047558878E+00 -2.77597174366117E+00 x2 : -6.73635284159036E-01 2.08708613839041E+00 x10 : 1.89569327090102E-01 -2.40962100848246E+00 x6 : 2.75209136503243E+00 -3.50171041010831E-01 x7 : -2.22724292302835E+00 -2.66829142702839E-01 x5 : 1.59302960437637E+00 1.87198797847436E+00 x8 : 2.05998292130641E+00 1.10661633606161E+00 =========================================================== solution 60 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 0 the solution for t : x1 : 5.92729661655327E+03 7.79111516745220E-107 x4 : 1.84984838608074E-01 -5.82142946876115E-111 x3 : 5.06125432939949E+05 1.74406035046734E-104 x9 : 3.45466156543424E-01 0.00000000000000E+00 x2 : 3.68747407045014E+01 -8.51591968001631E-109 x10 : 1.36575462339029E+01 2.12897992000408E-109 x6 : 2.77004447441025E-03 -2.07908195312898E-112 x7 : -5.11709309042836E-03 8.31632781251592E-112 x5 : -9.89634291555724E-01 2.66122490000510E-110 x8 : 5.62132763271464E-02 4.15816390625796E-112 =========================================================== solution 61 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.34886567955770E+00 -1.29781506744778E+00 x4 : -5.36412649741950E-01 -2.13479716587064E+00 x3 : 4.03737225194022E-01 1.33218734465026E+00 x9 : 2.86086617151050E+00 -9.78979461136982E-01 x2 : 1.64379408947683E+00 1.15016742673513E+00 x10 : -1.19233616221082E-01 2.09915283427393E+00 x6 : 2.64922214591183E+00 -3.29344968416738E-01 x7 : 1.53593291107726E+00 -2.45844878784122E+00 x5 : 2.56969538346523E+00 3.00920132901109E-01 x8 : -7.34424561826686E-01 -2.33969682924921E+00 =========================================================== solution 62 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.99375993820746E-03 4.46612732955824E-03 x4 : -1.58195544279100E+01 -7.16874971579763E+00 x3 : 2.71627008373633E-01 2.50097426176100E-07 x9 : 2.69995508494568E-01 -1.28022653616628E-01 x2 : 3.78384431078600E-01 8.51082340276963E-06 x10 : -1.66262932247915E-03 -2.83527054014586E-03 x6 : -1.09551382334577E+01 4.92125822007003E+00 x7 : 1.77075786769163E+02 -1.55478659257963E+03 x5 : 3.09965197175430E+02 9.70273714687252E+02 x8 : -1.74844553989543E+01 -7.85681246344188E+00 =========================================================== solution 63 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 0 the solution for t : x1 : 3.81178660067683E-04 1.19904923648430E-03 x4 : -4.26350965032567E+02 -2.36600775685643E-02 x3 : -2.52622192393178E-10 -1.82519679010680E-10 x9 : -8.42320704541632E+06 6.14723776239826E+06 x2 : 1.91653952383089E+01 1.37698542392903E+01 x10 : 1.67274534760878E+01 5.12965433429525E+01 x6 : -6.53724735021252E+02 -2.00430537231866E+03 x7 : -8.37874908361704E+02 -6.02139515771703E+02 x5 : 4.41775987164732E-01 -8.04778024177420E-05 x8 : -4.67419022979846E+02 -2.59309921111246E-02 =========================================================== solution 64 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.06217871784749E+00 -2.64486228935015E-38 x4 : -2.03432180656062E+00 -1.46936793852786E-38 x3 : -1.40170959467270E+00 3.52648305246686E-38 x9 : 3.45984336337318E+00 4.70197740328915E-38 x2 : -1.86486521296336E+00 2.35098870164457E-38 x10 : 2.56631302775363E+00 -2.93873587705572E-39 x6 : -2.60444965826179E+00 -2.13058351086540E-38 x7 : 2.66694658751147E+00 1.76324152623343E-38 x5 : 2.38412358606111E+00 1.46936793852786E-38 x8 : -2.37610432454207E+00 -1.02855755696950E-38 =========================================================== solution 65 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.56686437031456E-03 -3.37335454203884E-03 x4 : 2.46710410203047E+00 -1.32945358849390E+01 x3 : 2.71618524318188E-01 -2.92272951414108E-06 x9 : -6.14131480033352E-02 -3.58430923722305E-01 x2 : 3.78486237718667E-01 -3.01609709256174E-04 x10 : -8.99764535507968E-03 -7.94272858396181E-03 x6 : 2.69838562021506E+00 1.53271287722930E+01 x7 : -4.25417168118701E+02 -3.45645574271772E+02 x5 : 2.25317414639490E+02 -4.03889323971050E+02 x8 : 2.55737230443570E+00 -1.45705568442826E+01 =========================================================== solution 66 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.06858900020479E+00 -3.02994154887424E-01 x4 : -1.51722076123585E+00 1.48547262952589E+00 x3 : 1.80927197223037E+00 -6.15319824626651E-01 x9 : -1.46462836028526E+00 -1.99355271399728E+00 x2 : 6.64890165355558E-01 1.89761800485310E+00 x10 : 2.36143985042743E-01 -2.31163663040596E+00 x6 : -2.41355938375844E+00 2.57269351726690E-01 x7 : 2.56820295194236E+00 -1.27909073928056E+00 x5 : -1.21690589982059E+00 2.07340318875425E+00 x8 : -1.80937147727675E+00 1.62804956686401E+00 =========================================================== SHAR_EOF fi # end of overwriting check if test -f 'ipp' then echo shar: will not over-write existing file "'ipp'" else cat << "SHAR_EOF" > 'ipp' 8 x1^2+x2^2-1; x3^2+x4^2-1; x5^2+x6^2-1; x7^2+x8^2-1; -2.49150680000000E-01*x1*x3+ 1.60913540000000E+00*x1*x4+ 2.79423430000000E-01 *x2*x3+ 1.43480160000000E+00*x2*x4+ 4.00263840000000E-01*x5*x8 -8.00527680000000E-01*x6*x7+ 7.40523880000000E-02*x1-8.30500310000000E-02*x2 -3.86159610000000E-01*x3-7.55266030000000E-01*x4+ 5.04201680000000E-01*x5 -1.09162870000000E+00*x6+ 4.00263840000000E-01*x8+ 4.92072900000000E-02; 1.25016350000000E-01*x1*x3-6.86607360000000E-01*x1*x4-1.19228120000000E-01* x2*x3-7.19940470000000E-01*x2*x4-4.32419270000000E-01*x5*x7 -8.64838550000000E-01*x6*x8-3.71572700000000E-02*x1+ 3.54368960000000E-02*x2+ 8.53834820000000E-02*x3-3.92519670000000E-02*x5-4.32419270000000E-01*x7+ 1.38730100000000E-02; -6.35550070000000E-01*x1*x3-1.15719920000000E-01*x1*x4-6.66404480000000E-01* x2*x3+ 1.10362110000000E-01*x2*x4+ 2.90702030000000E-01*x5*x7+ 1.25877670000000E+00*x5*x8-6.29388360000000E-01*x6*x7+ 5.81404060000000E-01* x6*x8+ 1.95946620000000E-01*x1-1.22803420000000E+00*x2-7.90342210000000E-02* x4+ 2.63878770000000E-02*x5-5.71314300000000E-02*x6-1.16280810000000E+00*x7+ 1.25877670000000E+00*x8+ 2.16257500000000E+00; 1.48947730000000E+00*x1*x3+ 2.30623410000000E-01*x1*x4+ 1.32810730000000E+00 *x2*x3-2.58645030000000E-01*x2*x4+ 1.16517200000000E+00*x5*x7 -2.69084940000000E-01*x5*x8+ 5.38169870000000E-01*x6*x7+ 5.82585980000000E-01 *x6*x8-2.08169850000000E-01*x1+ 2.68683200000000E+00*x2-6.99103170000000E-01* x3+ 3.57444130000000E-01*x4+ 1.24991170000000E+00*x5+ 1.46773600000000E+00*x6 + 1.16517200000000E+00*x7+ 1.10763397000000E+00*x8-6.96868090000000E-01; TITLE : six-revolute-joint problem of mechanics ROOT COUNTS : total degree : 256 2-homogeneous Bezout number : 96 with partition {{x1 x2 x5 x6 }{x3 x4 x7 x8 }} mixed volume : 64 REFERENCES : A. Morgan and A. Sommese `Computing all solutions to polynomial systems using homotopy continuation', Appl. Math. Comput., Vol. 24, pp 115-138, 1987. NOTE : 16 paths are diverging to infinity, to the face with outer normal (-1,-1,0,0,-1,-1,0,0), with m equal to one. 16 paths go to a connected component of solutions. THE SOLUTIONS : 48 8 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.43282903101556E-01 -2.94408275220384E-02 x2 : 9.70430144862905E-01 -7.38069610387625E-03 x3 : 7.90232572740576E-01 5.55363935838713E-01 x4 : -9.47817122513395E-01 4.63028849554210E-01 x5 : 1.56949278966486E-01 4.97221443925937E-02 x6 : -9.88889018969251E-01 7.89153743381568E-03 x7 : -5.51311311947918E-01 -2.82217379891944E-01 x8 : -8.97634017801878E-01 1.73333040946620E-01 =========================================================== solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.84327994287113E-01 4.31054543006158E-01 x2 : 1.03145382563470E+00 1.60614390896231E-01 x3 : -9.72122475332896E-01 -2.01002618206423E-02 x4 : 2.48157047715486E-01 -7.87401222564700E-02 x5 : -9.84686981419462E-01 -3.88015783991157E-02 x6 : -2.39480691408936E-01 1.59542754296183E-01 x7 : 9.86853015599417E-01 6.99514490496133E-02 x8 : -2.93699297875874E-01 2.35042436054222E-01 =========================================================== solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.66817832485825E-01 -1.33399920187989E-01 x2 : 8.97048405769974E-01 -6.94204027289775E-02 x3 : 3.83650620376420E+01 6.92650280149314E+00 x4 : -6.92878255226287E+00 3.83524389283076E+01 x5 : -5.95847532076633E-01 1.61113853595054E-01 x6 : -8.27278197096506E-01 -1.16042333020375E-01 x7 : -1.88471120523686E+01 5.97021327377926E+00 x8 : 5.97786350302912E+00 1.88229922764946E+01 =========================================================== solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.90263062473586E-01 -4.97841222228891E-60 x2 : 4.55446681396573E-01 5.97409466674669E-59 x3 : 9.93548991629860E-01 2.48920611114446E-59 x4 : 1.13403709072009E-01 -1.59309191113245E-58 x5 : 6.83993578531617E-01 -2.98704733337335E-59 x6 : -7.29488029050177E-01 -1.39395542224090E-58 x7 : -6.50842505342338E-01 -1.99136488891557E-59 x8 : -7.59212772047276E-01 3.48488855560224E-59 =========================================================== solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.86016465856974E-01 4.85327483624948E-02 x2 : 9.23990159608465E-01 2.02755838970782E-02 x3 : -6.99740548138723E+00 -5.04122002325415E+00 x4 : 5.07529546028656E+00 -6.95042503429070E+00 x5 : 1.39792459187183E+00 -1.30902560048315E+00 x6 : -1.49952319884309E+00 -1.22033395663168E+00 x7 : -1.41378934084059E+00 3.16175488331360E-01 x8 : -4.29478567559684E-01 -1.04080987737723E+00 =========================================================== solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 7.15050057946986E-01 3.00332201781925E-01 x2 : -8.06144491669442E-01 2.66394623428836E-01 x3 : -1.17226618267558E+00 -6.59709829424760E-01 x4 : -8.96917740743071E-01 8.62236845457664E-01 x5 : 1.02449413291942E+00 3.55204487517655E-01 x6 : 6.35771111257133E-01 -5.72383530810205E-01 x7 : 4.62569434611436E-01 -2.61492873578260E-01 x8 : -9.33382055666306E-01 -1.29591746436209E-01 =========================================================== solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.90105616649796E-01 1.46361409006637E-01 x2 : 9.34330579693792E-01 6.11094284562315E-02 x3 : -1.30371082816316E+02 3.28400132191049E+01 x4 : -3.28409216869278E+01 -1.30367476403107E+02 x5 : 5.59934977756603E-01 -1.20878004119045E+00 x6 : -1.53072978693239E+00 -4.42167018146945E-01 x7 : -2.09981752087295E+01 1.41121967219347E+01 x8 : -1.41232281008305E+01 -2.09817739423055E+01 =========================================================== solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -8.82166557774748E-01 -1.31605549040402E-01 x2 : 5.34974824092091E-01 -2.17015846265398E-01 x3 : -1.03298947141407E+00 2.17304268648964E-03 x4 : 8.66325938297360E-03 2.59109200919094E-01 x5 : -9.85197578737370E-01 4.02014899559440E-02 x6 : -2.40899696241229E-01 -1.64410379856063E-01 x7 : 9.00200916458528E-01 1.06990841728326E-01 x8 : -4.89666172515785E-01 1.96691662978625E-01 =========================================================== solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.40166387519314E+00 5.31947746054420E-01 x2 : 6.92082887967386E-01 1.07734485579425E+00 x3 : -8.54318493313873E-01 -4.09489806471163E-02 x4 : -5.25592029342307E-01 6.65601255273212E-02 x5 : -1.42157932791586E+00 6.44037061912437E-02 x6 : -9.04351577842544E-02 -1.01238256896787E+00 x7 : 6.10735356723624E-01 2.82106815072075E-01 x8 : -8.63920889136284E-01 1.99430999416464E-01 =========================================================== solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -5.63632634326487E-01 9.78795670199778E-55 x2 : 8.26025576796617E-01 6.52530446799853E-55 x3 : 3.59042018100760E-01 -1.30506089359971E-53 x4 : 9.33321396539334E-01 2.83148729054928E-54 x5 : -8.61896851786451E-01 5.70964140949871E-55 x6 : -5.07083638939973E-01 -1.30506089359971E-54 x7 : 9.11509527433635E-01 1.30506089359971E-54 x8 : 4.11278958126612E-01 -4.24144790419904E-54 =========================================================== solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.09576522500370E-01 1.16992153011164E-01 x2 : -4.84377697448907E-01 2.19690783155742E-01 x3 : -6.61481721485935E+01 1.10794820776781E+03 x4 : 1.10794865744947E+03 6.61481453011222E+01 x5 : 5.20582150102636E-01 1.22096765067128E+00 x6 : -1.54559878026962E+00 4.11241243786011E-01 x7 : -6.49848936527419E+01 1.22371196637917E+02 x8 : 1.22374383756971E+02 6.49832011858512E+01 =========================================================== solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.96008925977361E-01 1.37916828056391E-01 x2 : -5.21799502443328E-01 2.36824121913441E-01 x3 : -1.67832601564421E+00 1.18639876273119E+00 x4 : -1.34053414464405E+00 -1.48535113139439E+00 x5 : 1.14364458089410E+00 1.18700198265749E+00 x6 : 1.41965380581300E+00 -9.56224946827357E-01 x7 : 5.13306435425386E-01 1.27260715836580E-02 x8 : -8.58333487897066E-01 7.61053195953034E-03 =========================================================== solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.96008925977361E-01 -1.37916828056391E-01 x2 : -5.21799502443328E-01 -2.36824121913441E-01 x3 : -1.67832601564421E+00 -1.18639876273119E+00 x4 : -1.34053414464405E+00 1.48535113139439E+00 x5 : 1.14364458089410E+00 -1.18700198265749E+00 x6 : 1.41965380581300E+00 9.56224946827357E-01 x7 : 5.13306435425386E-01 -1.27260715836580E-02 x8 : -8.58333487897066E-01 -7.61053195953036E-03 =========================================================== solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -7.57258675828233E-01 -7.83036536159823E-54 x2 : 6.53115072466462E-01 0.00000000000000E+00 x3 : 8.20385005974871E-01 -6.58670547374113E-54 x4 : -5.71811544104883E-01 -9.45002678791439E-54 x5 : -9.99961712987511E-01 6.11747293874861E-56 x6 : 8.75057478582336E-03 5.87277402119867E-54 x7 : 8.08712248609425E-01 -1.63132611699963E-54 x8 : 5.88204470357959E-01 -2.61012178719941E-54 =========================================================== solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.43145576511620E-01 -7.35010295275354E-51 x2 : 8.39638542895608E-01 5.01143383142287E-51 x3 : -9.71425748338696E-01 -6.68191177523049E-52 x4 : -2.37343665313834E-01 -5.01143383142287E-51 x5 : 9.49659281415783E-01 1.33638235504610E-51 x6 : -3.13284613763360E-01 -1.43661103167455E-50 x7 : -1.21505234654354E-01 -4.00914706513829E-51 x8 : -9.92590790785201E-01 9.18762869094192E-52 =========================================================== solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.07066968427853E+00 -3.61244124239409E-01 x2 : -6.15577815756741E-01 -6.28309082209880E-01 x3 : 1.02796820299170E+01 -3.35427155106707E+00 x4 : 3.36869611335233E+00 1.02356650249027E+01 x5 : -4.03631455063429E+00 5.78187994696215E+00 x6 : 5.84010931079321E+00 3.99607009355348E+00 x7 : -9.94775947662603E-01 -8.68774383760576E-01 x8 : -1.15227213970921E+00 7.50027559573315E-01 =========================================================== solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.96079358423636E-01 -1.53161162156039E-01 x2 : 9.33169647331417E-01 -6.50085169568719E-02 x3 : -2.00100983242770E+02 -1.92485522008551E+02 x4 : -1.92486770442193E+02 2.00099685424751E+02 x5 : -1.24626670683004E+00 8.76024823670223E-01 x6 : 1.09732513526266E+00 9.94928975025735E-01 x7 : 1.09291658994622E+02 -4.00404470120988E+01 x8 : -4.00419248168421E+01 -1.09287625428983E+02 =========================================================== solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.09193320626674E-01 -1.17454041564867E-01 x2 : -4.85357432758308E-01 -2.20020180724341E-01 x3 : 1.66318576386636E+02 3.90626516319047E+02 x4 : -3.90627599881491E+02 1.66318115035305E+02 x5 : -1.26396725627328E+00 -8.68183646370364E-01 x6 : 1.08544632925558E+00 -1.01097186647328E+00 x7 : 6.67272200286646E+01 -9.78199207779192E+01 x8 : 9.78234090664332E+01 6.67248406002903E+01 =========================================================== solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.40166387519314E+00 -5.31947746054421E-01 x2 : 6.92082887967386E-01 -1.07734485579425E+00 x3 : -8.54318493313873E-01 4.09489806471164E-02 x4 : -5.25592029342307E-01 -6.65601255273212E-02 x5 : -1.42157932791586E+00 -6.44037061912440E-02 x6 : -9.04351577842547E-02 1.01238256896787E+00 x7 : 6.10735356723624E-01 -2.82106815072075E-01 x8 : -8.63920889136284E-01 -1.99430999416464E-01 =========================================================== solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.09576522500370E-01 -1.16992153011164E-01 x2 : -4.84377697448907E-01 -2.19690783155742E-01 x3 : -6.61481721485310E+01 -1.10794820776781E+03 x4 : 1.10794865744947E+03 -6.61481453010597E+01 x5 : 5.20582150102635E-01 -1.22096765067128E+00 x6 : -1.54559878026962E+00 -4.11241243786011E-01 x7 : -6.49848936527349E+01 -1.22371196637921E+02 x8 : 1.22374383756975E+02 -6.49832011858442E+01 =========================================================== solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.76983041600966E-01 1.77899219103737E-47 x2 : 2.13316985784361E-01 -5.47382212626882E-48 x3 : -2.04225913971919E-01 1.12213353588511E-46 x4 : 9.78923784603446E-01 8.21073318940322E-48 x5 : 3.24786582362551E-01 -4.37905770101505E-47 x6 : 9.45787331231104E-01 0.00000000000000E+00 x7 : -1.01367861518584E-01 -2.05268329735081E-47 x8 : -9.94849011986819E-01 8.55284707229503E-49 =========================================================== solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.07066968427853E+00 3.61244124239409E-01 x2 : -6.15577815756741E-01 6.28309082209880E-01 x3 : 1.02796820299170E+01 3.35427155106705E+00 x4 : 3.36869611335231E+00 -1.02356650249027E+01 x5 : -4.03631455063429E+00 -5.78187994696215E+00 x6 : 5.84010931079320E+00 -3.99607009355348E+00 x7 : -9.94775947662602E-01 8.68774383760577E-01 x8 : -1.15227213970921E+00 -7.50027559573315E-01 =========================================================== solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.26220209305980E-01 2.50026422675428E-01 x2 : -5.96229190745588E-01 3.88406889727873E-01 x3 : 4.78984559706409E+02 1.37593767507872E+02 x4 : 1.37594044515258E+02 -4.78983595404058E+02 x5 : -6.04729831218954E-01 -1.46091842056092E-01 x6 : -8.16909044402171E-01 1.08146795037261E-01 x7 : -1.00906189439625E+02 -1.35554125721117E+02 x8 : 1.35556499127394E+02 -1.00904422712210E+02 =========================================================== solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.09193320626674E-01 1.17454041564867E-01 x2 : -4.85357432758308E-01 2.20020180724341E-01 x3 : 1.66318576386643E+02 -3.90626516319053E+02 x4 : -3.90627599881497E+02 -1.66318115035312E+02 x5 : -1.26396725627328E+00 8.68183646370364E-01 x6 : 1.08544632925558E+00 1.01097186647328E+00 x7 : 6.67272200286647E+01 9.78199207779218E+01 x8 : 9.78234090664358E+01 -6.67248406002905E+01 =========================================================== solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -5.25281880049239E-01 7.13904006067185E-01 x2 : 1.15705581279301E+00 3.24099178566365E-01 x3 : 1.02092822039954E+00 -1.13432493925635E+00 x4 : -1.39169919382432E+00 -8.32122592819422E-01 x5 : -2.15800979682463E+00 1.20366853482486E-01 x6 : -1.35757405386090E-01 -1.91336044092350E+00 x7 : 2.16124159830937E-01 4.75889312518269E-01 x8 : -1.09025702738662E+00 9.43366337083563E-02 =========================================================== solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -8.82166557774748E-01 1.31605549040402E-01 x2 : 5.34974824092091E-01 2.17015846265398E-01 x3 : -1.03298947141407E+00 -2.17304268648963E-03 x4 : 8.66325938297358E-03 -2.59109200919094E-01 x5 : -9.85197578737370E-01 -4.02014899559440E-02 x6 : -2.40899696241229E-01 1.64410379856063E-01 x7 : 9.00200916458528E-01 -1.06990841728326E-01 x8 : -4.89666172515785E-01 -1.96691662978625E-01 =========================================================== solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.72612377580488E-01 -1.37346305479271E-01 x2 : 8.94853851681128E-01 -7.25387322885265E-02 x3 : -6.58727136860909E+02 3.90245919912403E+02 x4 : -3.90246252765849E+02 -6.58726575011574E+02 x5 : -5.02518709053243E+00 -1.23982073056003E+00 x6 : -1.26357503894456E+00 4.93071716183063E+00 x7 : 1.15638139366297E+02 2.51067899112687E+01 x8 : 2.51076864654524E+01 -1.15634010118555E+02 =========================================================== solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -5.25281880049241E-01 -7.13904006067185E-01 x2 : 1.15705581279301E+00 -3.24099178566367E-01 x3 : 1.02092822039953E+00 1.13432493925635E+00 x4 : -1.39169919382432E+00 8.32122592819420E-01 x5 : -2.15800979682463E+00 -1.20366853482486E-01 x6 : -1.35757405386090E-01 1.91336044092351E+00 x7 : 2.16124159830938E-01 -4.75889312518269E-01 x8 : -1.09025702738662E+00 -9.43366337083568E-02 =========================================================== solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.25682167123519E-01 2.49529540057049E-01 x2 : -5.96214237207959E-01 3.87419539800048E-01 x3 : -1.15437644894842E+03 1.08842317438727E+03 x4 : 1.08842339058020E+03 1.15437621965528E+03 x5 : -5.05491782410239E+00 1.27538290539845E+00 x6 : -1.29945723034985E+00 -4.96126815910549E+00 x7 : 3.41229425821929E+01 -1.55752402883570E+02 x8 : 1.55755466054932E+02 3.41222715019210E+01 =========================================================== solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.74353212827081E-01 0.00000000000000E+00 x2 : 8.80334612224594E-01 0.00000000000000E+00 x3 : 8.11098221212725E-01 -5.44513836812850E-61 x4 : 5.84909972171404E-01 1.01123998265244E-60 x5 : 7.82615623451913E-01 7.95156024411198E-61 x6 : -6.22505249720011E-01 8.16770755219275E-61 x7 : -7.42855401009290E-01 -6.22301527786114E-61 x8 : -6.69451905062139E-01 1.55575381946529E-61 =========================================================== solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.66817832485824E-01 1.33399920187989E-01 x2 : 8.97048405769974E-01 6.94204027289775E-02 x3 : 3.83650620376420E+01 -6.92650280149401E+00 x4 : -6.92878255226374E+00 -3.83524389283076E+01 x5 : -5.95847532076632E-01 -1.61113853595053E-01 x6 : -8.27278197096507E-01 1.16042333020375E-01 x7 : -1.88471120523688E+01 -5.97021327377886E+00 x8 : 5.97786350302872E+00 -1.88229922764948E+01 =========================================================== solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.25682167123519E-01 -2.49529540057050E-01 x2 : -5.96214237207960E-01 -3.87419539800048E-01 x3 : -1.15437644894864E+03 -1.08842317438714E+03 x4 : 1.08842339058007E+03 -1.15437621965549E+03 x5 : -5.05491782410239E+00 -1.27538290539844E+00 x6 : -1.29945723034984E+00 4.96126815910549E+00 x7 : 3.41229425822181E+01 1.55752402883571E+02 x8 : 1.55755466054933E+02 -3.41222715019462E+01 =========================================================== solution 33 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.19954113378731E-01 6.70220632249386E-02 x2 : 9.10541607713144E-01 -3.09114826824141E-02 x3 : 6.54370966719902E-01 3.30531386311831E-02 x4 : -7.57434203182222E-01 2.85556345202577E-02 x5 : -3.96287306897842E-01 9.03426928103009E-03 x6 : -9.18179281070557E-01 -3.89920173214429E-03 x7 : 6.32861720396729E-01 2.35245516682733E-02 x8 : -7.74860378638821E-01 1.92135107830629E-02 =========================================================== solution 34 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.43282903101556E-01 2.94408275220383E-02 x2 : 9.70430144862905E-01 7.38069610387620E-03 x3 : 7.90232572740575E-01 -5.55363935838711E-01 x4 : -9.47817122513394E-01 -4.63028849554208E-01 x5 : 1.56949278966487E-01 -4.97221443925935E-02 x6 : -9.88889018969251E-01 -7.89153743381568E-03 x7 : -5.51311311947918E-01 2.82217379891943E-01 x8 : -8.97634017801878E-01 -1.73333040946619E-01 =========================================================== solution 35 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.84327994287113E-01 -4.31054543006158E-01 x2 : 1.03145382563470E+00 -1.60614390896231E-01 x3 : -9.72122475332895E-01 2.01002618206423E-02 x4 : 2.48157047715486E-01 7.87401222564700E-02 x5 : -9.84686981419462E-01 3.88015783991156E-02 x6 : -2.39480691408936E-01 -1.59542754296182E-01 x7 : 9.86853015599417E-01 -6.99514490496134E-02 x8 : -2.93699297875874E-01 -2.35042436054222E-01 =========================================================== solution 36 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -9.77088236233244E-01 6.80642296016062E-62 x2 : -2.12834627386166E-01 -3.76545091443606E-61 x3 : -9.93624356664283E-01 -1.94469227433161E-62 x4 : -1.12741464614795E-01 2.33363072919793E-61 x5 : -9.99980108950997E-01 2.43086534291451E-62 x6 : -6.30727376551486E-03 -2.33363072919793E-61 x7 : 9.98599050014647E-01 1.55575381946529E-61 x8 : -5.29144338516758E-02 5.83407682299482E-61 =========================================================== solution 37 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 6 the solution for t : x1 : -4.72612377580488E-01 1.37346305479270E-01 x2 : 8.94853851681128E-01 7.25387322885264E-02 x3 : -6.58727136860879E+02 -3.90245919912362E+02 x4 : -3.90246252765807E+02 6.58726575011545E+02 x5 : -5.02518709053243E+00 1.23982073056003E+00 x6 : -1.26357503894456E+00 -4.93071716183063E+00 x7 : 1.15638139366289E+02 -2.51067899112704E+01 x8 : 2.51076864654542E+01 1.15634010118547E+02 =========================================================== solution 38 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.19954113378731E-01 -6.70220632249383E-02 x2 : 9.10541607713144E-01 3.09114826824139E-02 x3 : 6.54370966719901E-01 -3.30531386311829E-02 x4 : -7.57434203182223E-01 -2.85556345202576E-02 x5 : -3.96287306897842E-01 -9.03426928103006E-03 x6 : -9.18179281070558E-01 3.89920173214428E-03 x7 : 6.32861720396729E-01 -2.35245516682732E-02 x8 : -7.74860378638821E-01 -1.92135107830628E-02 =========================================================== solution 39 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.86016465856975E-01 -4.85327483624949E-02 x2 : 9.23990159608465E-01 -2.02755838970783E-02 x3 : -6.99740548138724E+00 5.04122002325416E+00 x4 : 5.07529546028657E+00 6.95042503429071E+00 x5 : 1.39792459187183E+00 1.30902560048316E+00 x6 : -1.49952319884309E+00 1.22033395663168E+00 x7 : -1.41378934084059E+00 -3.16175488331359E-01 x8 : -4.29478567559682E-01 1.04080987737724E+00 =========================================================== solution 40 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.26220209305980E-01 -2.50026422675428E-01 x2 : -5.96229190745587E-01 -3.88406889727873E-01 x3 : 4.78984559706422E+02 -1.37593767507824E+02 x4 : 1.37594044515210E+02 4.78983595404071E+02 x5 : -6.04729831218954E-01 1.46091842056092E-01 x6 : -8.16909044402172E-01 -1.08146795037261E-01 x7 : -1.00906189439639E+02 1.35554125721107E+02 x8 : 1.35556499127384E+02 1.00904422712223E+02 =========================================================== solution 41 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.24501788760113E-01 3.34235937055928E-02 x2 : -3.90727290815449E-01 7.90837315282560E-02 x3 : -6.30392644369540E-01 3.18759399502622E+00 x4 : 3.33560644638927E+00 6.02419931726725E-01 x5 : 8.40374485937929E-01 1.13182948811102E+00 x6 : 1.42203963004664E+00 -6.68870686964955E-01 x7 : -6.49893609343960E-01 -8.16604481043994E-01 x8 : -1.20002592987361E+00 4.42245471852454E-01 =========================================================== solution 42 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.20689959454847E-01 8.55664600705907E-61 x2 : 3.90294758559517E-01 -2.64478149309098E-60 x3 : -6.86808395445136E-01 -9.33452291679171E-61 x4 : 7.26838515728272E-01 -3.73380916671668E-60 x5 : 3.93179190255471E-01 7.46761833343337E-60 x6 : 9.19461866718817E-01 -4.35611069450280E-60 x7 : 6.29073546304065E-03 -4.66726145839585E-61 x8 : -9.99980213127907E-01 1.94469227433161E-61 =========================================================== solution 43 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.24501788760113E-01 -3.34235937055927E-02 x2 : -3.90727290815449E-01 -7.90837315282559E-02 x3 : -6.30392644369541E-01 -3.18759399502622E+00 x4 : 3.33560644638927E+00 -6.02419931726726E-01 x5 : 8.40374485937928E-01 -1.13182948811102E+00 x6 : 1.42203963004664E+00 6.68870686964955E-01 x7 : -6.49893609343959E-01 8.16604481043993E-01 x8 : -1.20002592987360E+00 -4.42245471852453E-01 =========================================================== solution 44 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.96079358423636E-01 1.53161162156039E-01 x2 : 9.33169647331417E-01 6.50085169568718E-02 x3 : -2.00100983242774E+02 1.92485522008554E+02 x4 : -1.92486770442196E+02 -2.00099685424755E+02 x5 : -1.24626670683004E+00 -8.76024823670224E-01 x6 : 1.09732513526266E+00 -9.94928975025735E-01 x7 : 1.09291658994624E+02 4.00404470120998E+01 x8 : -4.00419248168431E+01 1.09287625428985E+02 =========================================================== solution 45 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 7.15050057946985E-01 -3.00332201781925E-01 x2 : -8.06144491669442E-01 -2.66394623428836E-01 x3 : -1.17226618267558E+00 6.59709829424759E-01 x4 : -8.96917740743071E-01 -8.62236845457663E-01 x5 : 1.02449413291942E+00 -3.55204487517655E-01 x6 : 6.35771111257133E-01 5.72383530810205E-01 x7 : 4.62569434611436E-01 2.61492873578260E-01 x8 : -9.33382055666306E-01 1.29591746436209E-01 =========================================================== solution 46 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.55291215580299E-01 -4.55787251796470E-64 x2 : 2.95666524035297E-01 -3.03858167864314E-64 x3 : 9.44024503950973E-01 8.35609961626862E-64 x4 : 3.29875333937109E-01 -1.06350358752510E-63 x5 : -9.61151337738177E-01 4.55787251796470E-64 x6 : -2.76021930223149E-01 -9.11574503592940E-64 x7 : 8.77066222903331E-01 9.87539045559019E-64 x8 : 4.80369483462558E-01 -6.07716335728627E-64 =========================================================== solution 47 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.90105616649796E-01 -1.46361409006637E-01 x2 : 9.34330579693792E-01 -6.11094284562316E-02 x3 : -1.30371082816317E+02 -3.28400132191062E+01 x4 : -3.28409216869291E+01 1.30367476403108E+02 x5 : 5.59934977756602E-01 1.20878004119045E+00 x6 : -1.53072978693239E+00 4.42167018146945E-01 x7 : -2.09981752087296E+01 -1.41121967219349E+01 x8 : -1.41232281008308E+01 2.09817739423055E+01 =========================================================== solution 48 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -8.56041319597044E-01 1.05791259723639E-59 x2 : -5.16907399001553E-01 4.97841222228891E-60 x3 : -9.87457641650654E-01 -1.55575381946529E-60 x4 : 1.57884153561177E-01 -4.97841222228891E-60 x5 : 8.90278965703525E-01 -2.48920611114446E-60 x6 : -4.55415593964305E-01 1.61798397224390E-59 x7 : -3.27462171811483E-01 6.22301527786114E-60 x8 : -9.44864289743510E-01 -2.17805534725140E-60 =========================================================== SHAR_EOF fi # end of overwriting check if test -f 'ipp2' then echo shar: will not over-write existing file "'ipp2'" else cat << "SHAR_EOF" > 'ipp2' 11 z21**2 + z22**2 - 1.25830472585 + 1.05384271933*i; z31**2 + z32**2 + z33**2 - 1; z41**2 + z42**2 + z43**2 - 1; z51**2 + z52**2 + z53**2 - 1; z21*z31 + z22*z32 + (0.642935654806 + 0.819555356316*i)*z33 - 0.266880023988 - 0.452565255666*i; z31*z41 + z32*z42 + z33*z43 - 0.26425551745 - 0.342483846503*i; z41*z51 + z42*z52 + z43*z53 - 0.126010863922 - 0.864590917688*i; (0.352598136811 + 0.116888144319*i)*z51 + (0.539042485525 + 0.687058436892*i)*z52 + (0.391154215376 + 0.128900893182*i)*z53 - 0.179560356712 - 0.8709166566*i; (0.984138451804 + 0.414967172346*i)*z21 + (0.958341609741 + 0.847442419999*i)*z22*z33 + (-0.496254299764 - 0.546020011741*i)*z22 + (0.353268870498 + 0.389909226888*i)*z31 + (0.964759562277 + 0.71397074519*i)*z32*z43 + (0.0783739840935 - 1.33026494666*i)*z32 + (-0.964759562277 - 0.71397074519*i)*z33*z42 + (0.204379350351 + 0.00374294529684*i)*z41 + (0.706319991205 + 0.120097702053*i)*z42*z53 + (-0.706319991205 - 0.120097702053*i)*z43*z52 + (0.907681632783 + 0.405209293447*i)*z51 + (0.148939301127 + 0.182393186752*i)*z52 + (-0.0486385369088 - 0.496934768083*i)*z53 -0.437312713588 - 0.914780691357*i; (-0.958341609741 - 0.847442419999*i)*z21*z33 + (0.496254299764 + 0.546020011741*i)*z21 + (0.984138451804 + 0.414967172346*i)*z22 + (-0.964759562277 - 0.71397074519*i)*z31*z43 + (-0.0783739840935 + 1.33026494666*i)*z31 + (0.353268870498 + 0.389909226888*i)*z32 + ( 0.964759562277 + 0.71397074519*i)*z33*z41 + (-0.706319991205 - 0.120097702053*i)*z41*z53 + (0.204379350351 + 0.00374294529684*i)*z42 + (0.706319991205 + 0.120097702053*i)*z43*z51 + (-0.148939301127 - 0.182393186752*i)*z51 + (0.907681632783 + 0.405209293447*i)*z52 + (0.134045297503 + 0.164748774862*i)*z53 - 0.719086796333 - 0.691791591267*i; (0.958341609741 + 0.847442419999*i)*z21*z32 + (-0.958341609741 - 0.847442419999*i)*z22*z31 + (0.964759562277 + 0.71397074519*i)*z31*z42 + (-0.964759562277 - 0.71397074519*i)*z32*z41 + (0.353268870498 + 0.389909226888*i)*z33 + (0.706319991205 + 0.120097702053*i)*z41*z52 + (-0.706319991205 - 0.120097702053*i)*z42*z51 + (0.204379350351 + 0.00374294529684*i)*z43 + (0.0486385369088 + 0.496934768083*i)*z51 + (-0.134045297503 - 0.164748774862*i)*z52 + (0.907681632783 + 0.405209293447*i)*z53 - 0.64863071126 + 0.983034576618*i; TITLE : 6R inverse position problem ROOT COUNTS : total degree : 1024 2-homogeneous Bezout number : 320 with partition of the set of unknowns { z21 z23 z41 z42 z43 } { z31 z32 z33 z51 z52 z53 } } mixed volume : 288 REFERENCES : This system occurs as Example 3.3 in a paper by Charles Wampler: `Bezout Number Calculations for Multi-Homogeneous Polynomial Systems', Appl. Math. Comput. vol. 51 No. 2--3, pp. 143--157. For the original formulation of the problem, see Charles Wampler and Alexander Morgan: `Solving the 6R inverse position problem using a generic-case solution methodology', Mech. Mach. Theory, Vol. 26, No. 1, pp. 91-106, 1991. THE SOLUTIONS : 16 11 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z21 : 6.81970587371378E-01 -3.01278759670484E-01 z22 : -9.94245757505745E-01 3.23318560369258E-01 z31 : 1.54317164315374E+00 1.22732850162926E+00 z32 : 2.81049048704997E+00 -2.10543814021222E+00 z33 : -1.63885386351178E+00 -2.45496893479488E+00 z41 : 7.45430227704065E-02 -7.84645108001499E-01 z42 : -2.18970540639891E+00 1.72598710872434E+00 z43 : 1.93298656378182E+00 1.98547325336408E+00 z51 : -4.85810385366990E-01 -1.91577771101302E-02 z52 : 8.02040331104181E-01 8.95211069183146E-01 z53 : 1.14998861063535E+00 -6.32443158732329E-01 =========================================================== solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z21 : -2.29988814831986E+00 7.17373476683257E-01 z22 : -5.72716802703412E-01 -1.96075510964076E+00 z31 : -1.05919002787836E+01 -1.01539769854502E+01 z32 : 1.29304069556761E+01 -6.98352911298370E+00 z33 : -1.51983745802156E+00 1.13499230817198E+01 z41 : -2.26115998547828E+00 -2.30619259640485E+00 z42 : 2.29826614384850E+00 -9.38021915922095E-01 z43 : -1.36124344574155E+00 2.24709725201204E+00 z51 : 1.20186321306191E+00 9.51481508604946E+00 z52 : -4.68613276096745E+00 6.92544765419444E-02 z53 : 8.36052479275234E+00 -1.32898003834334E+00 =========================================================== solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z21 : 2.31900494002716E+00 1.03059923298664E+00 z22 : 1.32834940110141E+00 -2.19587261433677E+00 z31 : -1.98899942836999E-01 -2.22362461956776E+00 z32 : -3.14587274622510E+00 6.60631118423487E-01 z33 : -7.98906814668026E-01 -2.04777652536797E+00 z41 : 1.15974652589259E+00 4.88001269453221E-01 z42 : 6.44033633724012E-01 -7.06892226861346E-01 z43 : -3.16643933663386E-01 3.49589540788267E-01 z51 : -1.98911687777511E-01 3.46032894830508E-01 z52 : 5.08266037265028E-01 6.81175484596863E-01 z53 : 1.15893315773104E+00 -2.39348037676245E-01 =========================================================== solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z21 : 2.18365896571556E+00 1.80966630183061E+00 z22 : -2.08867754878658E+00 2.14423495250026E+00 z31 : 4.81843255481218E-01 -1.28960352454974E+00 z32 : 1.28096766972151E+00 5.54012907963960E-01 z33 : 1.05072189121983E+00 -8.40240066366523E-02 z41 : 1.38377970541543E+00 7.02652983565586E-01 z42 : -8.22435276063626E-02 5.55077060371756E-01 z43 : -9.32045843741309E-01 9.94227321855330E-01 z51 : 4.60315939424511E-02 7.58090249167758E-01 z52 : 1.00431532852023E+00 -1.23005221023206E-02 z53 : -7.51653759569038E-01 2.99905366510561E-02 =========================================================== solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z21 : 7.71134077461239E-01 -1.60310626298905E+00 z22 : -1.83911572131467E+00 -3.85668232453787E-01 z31 : 7.15436855460271E-01 3.75135727257400E+00 z32 : 4.11440390040185E+00 -5.16225922774964E-01 z33 : 3.74022679580931E-01 -1.49696082941238E+00 z41 : 2.67123550670565E+00 3.63968154763343E+00 z42 : 3.90818573176344E+00 -1.95517606829489E+00 z43 : 9.14782577308518E-01 -2.27513665167066E+00 z51 : -1.54208851652428E-01 7.72887375790832E-01 z52 : 1.07832146306922E+00 2.63866014741125E-02 z53 : -6.56210053238007E-01 -1.38267976119325E-01 =========================================================== solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z21 : -5.00298739274631E-01 7.28569554344603E-01 z22 : 1.24730734266016E+00 -1.30215645011854E-01 z31 : -2.59557520130261E-01 1.26107248022139E+00 z32 : 1.79339883932277E-01 -1.23797672992466E-01 z33 : 1.59810240637033E+00 2.18711081707326E-01 z41 : 1.03460193309950E+00 -3.36396532820201E+00 z42 : 2.20421439712519E+00 7.30737156380066E-01 z43 : -2.71919877539606E+00 -6.87578888217881E-01 z51 : 7.88171187095119E+00 1.92366451357321E+00 z52 : -1.25110941844950E+00 4.52025258099505E+00 z53 : 1.48883599407384E+00 -6.38514845983260E+00 =========================================================== solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z21 : 4.37283248113123E-01 -8.89867543350970E-01 z22 : 1.36715441909459E+00 -1.00791240545673E-01 z31 : 1.35777808007717E+00 2.32721202802259E+00 z32 : -2.93583857521152E+00 1.00097708094547E+00 z33 : 1.26394993889499E-01 -1.74951827911779E+00 z41 : 1.17951403187495E+00 -3.82268107746705E-01 z42 : 5.72539886469541E-01 7.60633915352336E-01 z43 : 1.35911834386697E-01 1.13289188938522E-01 z51 : -1.74445648385240E-01 -7.79965796046422E-02 z52 : 1.02675480227886E+00 1.59890617318345E-01 z53 : -3.91452903018916E-01 4.54140515246899E-01 =========================================================== solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z21 : -4.99555731911250E-01 -1.99352718827046E-01 z22 : 1.15808378738411E+00 -5.40987759134689E-01 z31 : 9.96145049016820E-01 8.92770129503533E-01 z32 : -6.72881997109053E-01 3.30844893859260E-01 z33 : 9.67579199603118E-01 -6.89048474559156E-01 z41 : -1.78127264665466E+00 -2.00700893282373E+00 z42 : -1.19361875314657E+00 -1.06585102756570E+00 z43 : -2.38607487445747E+00 2.03147434310734E+00 z51 : 5.31641031985409E-01 2.54846676122444E+00 z52 : -8.15719600381305E-01 5.03833222419370E-01 z53 : 2.63231201750030E+00 -3.58575601141483E-01 =========================================================== solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z21 : -6.93496077720817E-01 4.47800546954007E-01 z22 : 1.01174599269264E+00 -2.13861422050516E-01 z31 : 1.31796815852552E+00 2.72604838998726E-01 z32 : 1.97007290719133E-01 2.97020663628960E-01 z33 : 4.60004324669482E-01 -9.08251752175657E-01 z41 : -1.52744073954701E+00 2.59712919706687E+00 z42 : -1.58175051283236E-01 -1.70226809471439E+00 z43 : 3.11368212509459E+00 1.18756650477780E+00 z51 : 9.07659227166610E-01 -1.11422882832944E+00 z52 : 1.18754351241644E+00 8.44385418578340E-01 z53 : -8.48816999698801E-01 -1.01266249374823E-02 =========================================================== solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z21 : 2.66481908093091E-01 1.03468542077653E+00 z22 : 1.58559629965657E+00 -5.06211010358362E-01 z31 : 1.03192784739305E+00 6.05614083801033E-02 z32 : -1.40465652827588E-01 -6.99278370349753E-01 z33 : 6.80993270985605E-01 -2.36007613337429E-01 z41 : -2.48048950753664E-01 1.04682265786768E+00 z42 : 1.02980866774719E+00 -9.38275267389665E-02 z43 : 1.04794911629913E+00 3.39985650712270E-01 z51 : 1.86703262040419E-01 1.56751052502684E+00 z52 : -2.43231108514791E-01 4.74207995184804E-01 z53 : 1.89649275172717E+00 -9.34974266621054E-02 =========================================================== solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z21 : -4.24372482841892E-01 -2.55077953700953E-01 z22 : -1.19422050504439E+00 5.31869467583539E-01 z31 : 1.33000807168359E+00 -5.59719764088956E-01 z32 : -2.33375825256275E+00 7.84567854695449E-02 z33 : 3.77457574160048E-01 2.45731186277628E+00 z41 : -3.99132109966974E+00 -6.86226521093363E+00 z42 : 1.44849134680965E+00 5.53289293503752E+00 z43 : 8.77276128081271E+00 -4.03565654346351E+00 z51 : 1.10215004388434E+01 -2.32718338903976E+00 z52 : -6.41460503032980E+00 -6.29127892527439E-01 z53 : 1.71539803044640E+00 1.25996680745978E+01 =========================================================== solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z21 : 4.87850965635014E-01 -2.72293659516384E-01 z22 : -1.10525165799615E+00 3.56554665249834E-01 z31 : 1.59044041129975E+00 -4.14887275164169E-01 z32 : -4.83754873147209E-01 -3.00893289429040E+00 z33 : -2.74703433501972E+00 2.89669645510664E-01 z41 : 1.70497604559462E-01 -6.56512986106398E-01 z42 : -2.13168565776507E+00 2.95248167617524E-01 z43 : 4.12772990716655E-01 1.79592704115149E+00 z51 : -3.21819085095715E-02 4.19891179071096E-01 z52 : 3.87031339759075E-01 7.05910326233974E-01 z53 : 1.25173190410585E+00 -2.07469761656965E-01 =========================================================== solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z21 : -5.90559815647211E-01 2.58616898000339E-01 z22 : 1.05039659740691E+00 -3.56239360430552E-01 z31 : 2.63598470254880E+00 -3.79914501992130E-01 z32 : -1.15083230253870E-01 1.25266368008375E+00 z33 : -5.37814968339840E-01 -2.13011809951994E+00 z41 : -1.59207930157738E+00 2.94522710245143E+00 z42 : 3.18521188165958E-02 -1.92266503551917E+00 z43 : 3.55287284964421E+00 1.33702394215690E+00 z51 : 6.77906630938475E-01 -9.95240102410020E-01 z52 : 1.17712104814013E+00 6.89051523949577E-01 z53 : -8.05485196406118E-01 1.69360266213584E-01 =========================================================== solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z21 : 5.34143439798264E-01 -1.18595377304174E+00 z22 : -1.54409952017977E+00 -6.90033684466385E-02 z31 : 3.11720695681086E+00 1.28562073306320E+00 z32 : -2.94569379794773E-01 -2.25133343506636E+00 z33 : -1.93498179331454E+00 2.41383138732426E+00 z41 : -3.90567228413289E+00 3.45602251629957E+00 z42 : 4.96824948247023E+00 5.01301882348671E-01 z43 : -1.98695303582802E+00 -5.53988863311166E+00 z51 : -5.63213111173968E-01 4.10498656415486E+00 z52 : 2.16558434026454E+00 -1.67652165508189E+00 z53 : -4.20178006161903E+00 -1.41431279346757E+00 =========================================================== solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z21 : 4.72424479766080E-01 1.28627012257572E-01 z22 : -1.14648332074158E+00 5.12600487405710E-01 z31 : 7.64576575645645E-01 -2.87849426335379E-01 z32 : 2.63751846620218E-01 3.28380623272373E-01 z33 : 7.53602895326760E-01 1.77111757046538E-01 z41 : 3.23057782056952E+00 -1.99811513263696E+00 z42 : -5.24662170782476E+00 -1.45230873501893E-01 z43 : 9.77709738993738E-01 5.82288868548987E+00 z51 : -2.56590509833729E-02 -6.08883205401490E-01 z52 : 5.02536399363437E-01 1.25439650177534E+00 z53 : 1.68466338351569E+00 -3.83461332933145E-01 =========================================================== solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z21 : -4.86620350997175E-01 1.37939023721610E+00 z22 : -1.71211214327275E+00 -8.42923766987067E-02 z31 : -4.15641453124895E+00 -3.69261536234890E+00 z32 : 8.35006798523235E-01 -3.50958503030795E+00 z33 : -4.20643098093262E+00 2.95203055663223E+00 z41 : -3.35027746089680E+00 2.08467473024577E+00 z42 : -2.13241748444097E+00 -1.21058722743327E+00 z43 : 1.34211528021645E+00 3.28046439581095E+00 z51 : 3.97615337952964E-01 3.89751937495167E+00 z52 : -1.52655837892728E+00 2.59972513983676E-01 z53 : 3.72365650104253E+00 -3.09601668041693E-01 =========================================================== SHAR_EOF fi # end of overwriting check if test -f 'katsura5' then echo shar: will not over-write existing file "'katsura5'" else cat << "SHAR_EOF" > 'katsura5' 6 2*x**2+2*y**2+2*z**2+2*t**2+2*u**2+v**2-v; x*y+y*z+2*z*t+2*t*u+2*u*v-u; 2*x*z+2*y*t+2*z*u+u**2+2*t*v-t; 2*x*t+2*y*u+2*t*u+2*z*v-z; t**2+2*x*v+2*y*v+2*z*v-y; 2*x+2*y+2*z+2*t+2*u+v-1; TITLE : a problem of magnetism in physics ROOT COUNTS : total degree: 32 mixed volume : 32 REFERENCES : From the PoSSo test suite. Shigotoshi Katsura: "Users posing problems to PoSSO", in the PoSSo Newsletter, no. 2, July 1994, edited by L. Gonzalez-Vega and T. Recio. Available at http://janet.dm.unipi.it/ S. Katsura, W. Fukuda, S. Inawashiro, N.M. Fujiki and R. Gebauer, Cell Biophysics, Vol 11, pages 309--319, 1987. W. Boege, R. Gebauer, and H. Kredel: "Some examples for solving systems of algebraic equations by calculating Groebner bases", J. Symbolic Computation, 2:83-98, 1986. S. Katsura, in "New Trends in Magnetism", edited by M.D. Coutinho-Filho and S.M. Resende, World Scientific, 1990. NOTE (excerpt from the PoSSo Newsletter) : The general formulation of the equations is \sum_{i=-N}^N u(l)*u(m-l) = u(m) \sum_{i=-N}^N u(l) = 1 with m in {-N+1,-N,..,N-1}, u(l) = u(-l), and u(l) = 0, for |l| > N, The number of solutions for a given N is 2^N. Among them, physically meaningful solutions are restricted to those for which u(l) is real and 0 <= u(l) <= 1, since u(l) is a probability. THE SOLUTIONS : 32 6 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -7.34679413715196E-02 -1.05421979432305E-81 y : 8.96500882133478E-02 7.90664845742289E-82 z : 3.22926736021011E-02 1.44955221719420E-81 t : -1.54099162732096E-01 -1.18599726861343E-81 u : 2.65738935518866E-01 -1.84488464006534E-81 v : 6.79770813538602E-01 3.68976928013068E-81 == err : 4.235E-16 = rco : 6.845E-02 = res : 5.551E-17 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.23989867532776E-01 6.69182486630844E-83 y : 1.15327526760843E-02 -5.45641104483611E-83 z : 8.58389785887035E-02 -6.17706910736164E-84 t : 1.62143145160524E-01 -4.94165528588931E-83 u : 2.25869805737949E-01 2.05902303578721E-83 v : 2.77210370739033E-01 5.76526450020419E-83 == err : 4.821E-16 = rco : 7.475E-02 = res : 8.327E-17 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -2.07358972809625E-01 1.44890865261227E-70 y : 9.35088892161247E-02 -1.01876389636801E-70 z : 2.19257911144064E-01 -7.24454326306137E-71 t : 2.25457387686581E-02 -9.05567907882671E-71 u : 1.51473206244495E-01 1.06121262558422E-70 v : 4.41146454872566E-01 9.05567907882671E-71 == err : 2.406E-16 = rco : 1.067E-01 = res : 5.551E-17 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.57025351946495E+00 5.76457486699560E+00 y : 4.61777915035574E+00 -1.32891381878462E+00 z : -2.85008572379927E+00 -2.96262478568672E+00 t : 3.67679932837071E+00 1.95277814810887E+00 u : -6.44863384847331E-01 -3.92345674167498E+00 v : -5.45875170122980E+00 9.95284662083709E-01 == err : 5.652E-15 = rco : 1.365E-03 = res : 2.010E-14 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.21538696343695E-01 -1.45427136994283E-01 y : 5.41432115293970E-03 1.92234187205295E-01 z : -1.29474720447878E-01 7.44121358558796E-02 t : 4.21087159135082E-01 -4.00121205095676E-02 u : 9.38435315354770E-02 3.49228636012240E-02 v : 4.61336809936150E-01 -2.32259858317095E-01 == err : 4.096E-16 = rco : 3.034E-02 = res : 7.850E-17 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.27009396586336E-02 1.51426720098643E-01 y : 4.31073671633152E-01 9.79652306994441E-03 z : 4.97255031475553E-03 -2.20062605132790E-01 t : -1.04214329254954E-01 -1.50525567764471E-02 u : -6.21735758680806E-02 3.61797763381580E-02 v : 4.86085245667523E-01 7.54242848049839E-02 == err : 5.026E-16 = rco : 3.855E-02 = res : 6.592E-17 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -5.83959866995207E-01 8.77442593123539E-01 y : 1.18070251828669E+00 1.16300260901468E-01 z : -3.02272354151035E-01 -7.53820937749179E-01 t : -5.40199676757081E-01 -2.65819846833774E-01 u : 3.27158857148399E-01 5.12015123631312E-01 v : 8.37141044936462E-01 -9.72234386146732E-01 == err : 3.718E-15 = rco : 1.048E-02 = res : 6.661E-16 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 5.94183853341865E-02 1.95697375121334E-01 y : 3.99365516038540E-01 -4.47735495014597E-02 z : 3.56463693311711E-02 -1.98749596752736E-01 t : -2.07078028915640E-01 -4.06794736634173E-02 u : 3.02537558042511E-02 1.02020125595299E-01 v : 3.64788004814983E-01 -2.70297615980414E-02 == err : 4.100E-16 = rco : 2.704E-02 = res : 2.695E-16 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.32387153995653E-02 0.00000000000000E+00 y : -8.73756842370348E-02 -5.52714787526044E-76 z : -6.41927643960892E-02 1.24360827193360E-75 t : 3.27425164118805E-01 -5.52714787526044E-76 u : 4.22144271367303E-02 -8.29072181289067E-76 v : 5.90335145554309E-01 1.65814436257813E-75 == err : 4.302E-16 = rco : 3.254E-02 = res : 3.816E-17 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.81646358312146E-01 -3.05135743680520E-01 y : -2.45661127185011E-01 1.26402934892260E+00 z : 1.28100343359660E+00 1.95756286562680E-02 t : 2.69789837319146E-01 -6.92748789616714E-01 u : -8.81520435955827E-01 -4.69599332750762E-01 v : 5.16069301074466E-01 3.67757776938245E-01 == err : 5.229E-15 = rco : 2.422E-02 = res : 5.620E-16 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.21538696343695E-01 1.45427136994283E-01 y : 5.41432115293969E-03 -1.92234187205295E-01 z : -1.29474720447878E-01 -7.44121358558796E-02 t : 4.21087159135082E-01 4.00121205095676E-02 u : 9.38435315354771E-02 -3.49228636012240E-02 v : 4.61336809936150E-01 2.32259858317095E-01 == err : 4.336E-16 = rco : 3.034E-02 = res : 6.206E-17 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.27009396586336E-02 -1.51426720098643E-01 y : 4.31073671633152E-01 -9.79652306994440E-03 z : 4.97255031475552E-03 2.20062605132790E-01 t : -1.04214329254954E-01 1.50525567764471E-02 u : -6.21735758680806E-02 -3.61797763381580E-02 v : 4.86085245667523E-01 -7.54242848049839E-02 == err : 5.075E-16 = rco : 3.855E-02 = res : 8.100E-17 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 4.22327061275954E-01 -3.86856051726076E-01 y : -5.39101147413182E-01 -3.67652911266504E-02 z : -7.13331690209261E-02 1.11472099190827E-01 t : 1.25961423554398E-01 2.27162877399557E-01 u : 3.28700380323012E-01 3.47451620579309E-01 v : 4.66890902561487E-01 -5.24930508633935E-01 == err : 5.281E-16 = rco : 3.983E-02 = res : 1.943E-16 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.57025351946497E+00 -5.76457486699559E+00 y : 4.61777915035575E+00 1.32891381878461E+00 z : -2.85008572379926E+00 2.96262478568673E+00 t : 3.67679932837070E+00 -1.95277814810888E+00 u : -6.44863384847322E-01 3.92345674167498E+00 v : -5.45875170122980E+00 -9.95284662083694E-01 == err : 1.842E-14 = rco : 1.365E-03 = res : 1.446E-14 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.81646358312146E-01 3.05135743680519E-01 y : -2.45661127185011E-01 -1.26402934892261E+00 z : 1.28100343359660E+00 -1.95756286562676E-02 t : 2.69789837319146E-01 6.92748789616714E-01 u : -8.81520435955827E-01 4.69599332750762E-01 v : 5.16069301074466E-01 -3.67757776938245E-01 == err : 5.120E-15 = rco : 2.422E-02 = res : 1.054E-15 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -4.53090455165408E-01 -2.65159314313777E-02 y : 4.72369413963952E-01 -1.72189347661563E-01 z : 7.61392026176293E-02 -2.59841065181448E-02 t : 3.90830532173818E-02 -3.10677427065331E-02 u : 1.66041794189728E-02 -1.21033708197555E-01 v : 6.97789211894943E-01 7.53581673030348E-01 == err : 5.479E-16 = rco : 2.561E-02 = res : 9.021E-17 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -4.53090455165408E-01 2.65159314313777E-02 y : 4.72369413963952E-01 1.72189347661563E-01 z : 7.61392026176293E-02 2.59841065181447E-02 t : 3.90830532173818E-02 3.10677427065331E-02 u : 1.66041794189728E-02 1.21033708197555E-01 v : 6.97789211894943E-01 -7.53581673030348E-01 == err : 6.846E-16 = rco : 2.561E-02 = res : 1.804E-16 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 2.19202174282559E-01 -8.29072181289067E-76 y : 1.86196233915891E-01 3.21265470249513E-75 z : -2.33164321950951E-02 -1.10542957505209E-75 t : -6.22139522220197E-02 -3.05720366850343E-75 u : 6.08345024330872E-02 5.52714787526044E-76 v : 2.38594947571154E-01 2.59085056652833E-75 == err : 4.761E-16 = rco : 3.716E-02 = res : 5.551E-17 == solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.77720242269329E-01 -2.69880267346701E-79 y : 2.52054104063177E-01 -2.15904213877361E-78 z : -1.26609638729233E-01 4.93380435074275E-79 t : 6.57264116780968E-02 1.07952106938681E-78 u : -7.31811773405752E-02 -2.69880267346701E-79 v : 4.08580116118410E-01 1.61928160408021E-78 == err : 5.089E-16 = rco : 4.527E-02 = res : 5.551E-17 == solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 9.16958134062345E-02 -3.86900351268231E-74 y : -8.43879405799624E-02 1.10542957505209E-75 z : -1.02027573161162E-01 1.76868732008334E-74 t : 5.52705192655442E-02 1.98977323509376E-74 u : 3.08655664592089E-01 8.29072181289067E-75 v : 4.61587032954515E-01 -1.54760140507292E-74 == err : 5.099E-16 = rco : 6.751E-02 = res : 2.776E-17 == solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -3.71434890128193E+00 -2.26721676217087E+00 y : -1.30211184710235E+00 4.55637566992507E+00 z : 4.36802284527241E+00 -3.22491009143098E+00 t : -2.53969151312992E+00 -2.00811793381777E+00 u : 2.20426421471743E+00 2.90935925832586E+00 v : 2.96773040304869E+00 6.90197183373700E-02 == err : 9.879E-15 = rco : 2.934E-03 = res : 1.465E-14 == solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.40862400739638E-01 -1.38178696881511E-76 y : 1.92885306946496E-01 -2.76357393763022E-76 z : -5.91323323306972E-02 5.52714787526044E-76 t : 1.80509696917380E-01 -4.14536090644533E-76 u : -1.01057866510769E-01 5.52714787526044E-76 v : 2.91865588475904E-01 -5.52714787526044E-76 == err : 2.834E-16 = rco : 5.475E-02 = res : 2.220E-16 == solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 5.94183853341865E-02 -1.95697375121334E-01 y : 3.99365516038540E-01 4.47735495014597E-02 z : 3.56463693311711E-02 1.98749596752736E-01 t : -2.07078028915640E-01 4.06794736634173E-02 u : 3.02537558042511E-02 -1.02020125595299E-01 v : 3.64788004814983E-01 2.70297615980414E-02 == err : 4.389E-16 = rco : 2.704E-02 = res : 8.777E-17 == solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -3.17327431527865E-01 1.79678795707145E-02 y : 2.51074725113845E-01 1.35840540037664E+00 z : 1.60334509980202E+00 -4.17460309000618E-01 t : -4.52423320845073E-01 -1.14940404120786E+00 u : -7.68030460085420E-01 2.53099446870810E-01 v : 3.66722775084977E-01 -1.25216753219381E-01 == err : 4.568E-15 = rco : 2.054E-02 = res : 1.153E-15 == solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 2.10588109558726E-01 5.52714787526044E-76 y : 9.63978681241064E-02 -9.39615138794276E-75 z : 4.03916112981482E-02 8.84343660041671E-75 t : 4.17053473397812E-02 7.73800702536462E-75 u : 4.27934029063517E-02 -3.59264611891929E-75 v : 1.36247321545774E-01 -6.63257745031253E-75 == err : 5.003E-16 = rco : 4.736E-02 = res : 5.551E-17 == solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 4.22327061275954E-01 3.86856051726075E-01 y : -5.39101147413182E-01 3.67652911266506E-02 z : -7.13331690209261E-02 -1.11472099190827E-01 t : 1.25961423554398E-01 -2.27162877399557E-01 u : 3.28700380323012E-01 -3.47451620579309E-01 v : 4.66890902561488E-01 5.24930508633935E-01 == err : 5.897E-16 = rco : 3.983E-02 = res : 3.664E-16 == solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 0.00000000000000E+00 0.00000000000000E+00 y : 0.00000000000000E+00 0.00000000000000E+00 z : 1.36566297568363E-158 0.00000000000000E+00 t : 2.42427351708672E-191 0.00000000000000E+00 u : 0.00000000000000E+00 0.00000000000000E+00 v : 1.00000000000000E+00 0.00000000000000E+00 == err : 1.215E-63 = rco : 6.598E-02 = res : 2.731E-158 == solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.39125672609318E-01 -5.43582081447824E-82 y : -1.45563258086646E-01 2.71791040723912E-82 z : -1.14364175483778E-01 2.80027132867061E-82 t : 1.90920510948048E-01 6.09470818593015E-82 u : 5.32023462057030E-02 -2.96499317153359E-82 v : 7.53357807614709E-01 -5.92998634306717E-82 == err : 4.485E-16 = rco : 4.737E-02 = res : 5.551E-17 == solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -5.83959866995208E-01 -8.77442593123539E-01 y : 1.18070251828669E+00 -1.16300260901468E-01 z : -3.02272354151035E-01 7.53820937749179E-01 t : -5.40199676757081E-01 2.65819846833775E-01 u : 3.27158857148399E-01 -5.12015123631312E-01 v : 8.37141044936462E-01 9.72234386146732E-01 == err : 4.110E-15 = rco : 1.048E-02 = res : 4.441E-16 == solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -3.71434890128193E+00 2.26721676217088E+00 y : -1.30211184710235E+00 -4.55637566992507E+00 z : 4.36802284527241E+00 3.22491009143098E+00 t : -2.53969151312992E+00 2.00811793381777E+00 u : 2.20426421471743E+00 -2.90935925832586E+00 v : 2.96773040304869E+00 -6.90197183373696E-02 == err : 6.334E-15 = rco : 2.934E-03 = res : 9.441E-15 == solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -3.17327431527865E-01 -1.79678795707145E-02 y : 2.51074725113845E-01 -1.35840540037664E+00 z : 1.60334509980202E+00 4.17460309000618E-01 t : -4.52423320845073E-01 1.14940404120786E+00 u : -7.68030460085420E-01 -2.53099446870810E-01 v : 3.66722775084977E-01 1.25216753219381E-01 == err : 4.622E-15 = rco : 2.054E-02 = res : 1.096E-15 == solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -2.07926968038444E-01 1.34940133673351E-78 y : 1.09542324450522E-01 -1.55181153724353E-78 z : 1.63551292586952E-01 1.34940133673351E-79 t : 1.21988131355882E-01 1.24819623647849E-78 u : -5.03053401613212E-02 -7.42170735203429E-79 v : 7.26301119612819E-01 -1.21446120306016E-78 == err : 5.627E-16 = rco : 4.755E-02 = res : 5.551E-17 == SHAR_EOF fi # end of overwriting check if test -f 'kin1' then echo shar: will not over-write existing file "'kin1'" else cat << "SHAR_EOF" > 'kin1' 12 s1**2 + c1**2 - 1; s2**2 + c2**2 - 1; s3**2 + c3**2 - 1; s4**2 + c4**2 - 1; s5**2 + c5**2 - 1; s6**2 + c6**2 - 1; s2*c5*s6 - s3*c5*s6 - s4*c5*s6 + c2*c6 + c3*c6 + c4*c6 - 0.4077; c1*c2*s5 + c1*c3*s5 + c1*c4*s5 + s1*c5 - 1.9115; s2*s5 + s3*s5 + s4*s5 - 1.9791; c1*c2 + c1*c3 + c1*c4 + c1*c2 + c1*c3 + c1*c2 - 4.0616; s1*c2 + s1*c3 + s1*c4 + s1*c2 + s1*c3 + s1*c2 - 1.7172; s2 + s3 + s4 + s2 + s3 + s2 - 3.9701; TITLE : kinematics problem ROOT COUNTS : total degree : 4608 4-homogeneous Bezout number = 320. with partition : {s1 c1 }{s2 c2 s3 c3 s4 c4 }{s5 c5 }{s6 c6 } mixed volume : 192 REFERENCES : P. Van Hentenryck, D. McAllester and D. Kapur: `Solving Polynomial Systems Using a Branch and Prune Approach' SIAM J. Numerical Analysis, Vol. 34, No. 2, pp 797-827, 1997. H. Hong and V. Stahl: `Safe Starting Regions by Fixed Points and Tightening' Computing 53(3-4): 322-335, 1995. THE SOLUTIONS : 48 12 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : 3.89415083856842E-01 7.43554779769399E-31 c1 : 9.21062371647420E-01 -4.69637677015175E-31 s2 : 8.12447299105426E-01 5.16786840383107E-01 c2 : 9.06404061572963E-01 -4.63217333728468E-01 s3 : 1.23611304332968E+00 -1.24952222803037E+00 c3 : 1.46469772617762E+00 1.05451841454651E+00 s4 : -9.39467983975633E-01 9.48683934911419E-01 c4 : -1.23891712639201E+00 -7.19384827907607E-01 s5 : 1.71925348920786E+00 -3.34751466405344E-01 c5 : 4.06076515006418E-01 1.41727631460228E+00 s6 : 4.23667748161563E-01 2.26075213480995E-01 c6 : 9.39157471197499E-01 -1.01985853861664E-01 == err : 5.571E-15 = rco : 4.123E-02 = res : 1.110E-15 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : -3.89415083856842E-01 -1.18072606435204E-30 c1 : -9.21062371647420E-01 -3.50923201498787E-31 s2 : -3.08457430339590E+00 -1.12748434939333E+00 c2 : 1.18298149617247E+00 -2.93986783637119E+00 s3 : 5.51926701023123E+00 2.78748170612766E+00 c3 : -2.82446248609854E+00 5.44700306623819E+00 s4 : 2.18528888972524E+00 -2.19251036407534E+00 c4 : -2.30971002700246E+00 -2.07440262336281E+00 s5 : 4.22761702728453E-01 4.87287884168480E-02 c5 : -9.07833668459021E-01 2.26921145125287E-02 s6 : -3.30199010468440E-01 7.54084055570752E-02 c6 : -9.47283466803091E-01 -2.62854591772632E-02 == err : 9.493E-15 = rco : 3.996E-03 = res : 7.944E-15 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : 3.89415083856842E-01 8.27588134152995E-31 c1 : 9.21062371647420E-01 -1.44611330308050E-31 s2 : 8.12447299105426E-01 5.16786840383107E-01 c2 : 9.06404061572963E-01 -4.63217333728468E-01 s3 : 1.23611304332968E+00 -1.24952222803037E+00 c3 : 1.46469772617762E+00 1.05451841454651E+00 s4 : -9.39467983975633E-01 9.48683934911419E-01 c4 : -1.23891712639201E+00 -7.19384827907607E-01 s5 : 1.71925348920786E+00 -3.34751466405344E-01 c5 : 4.06076515006418E-01 1.41727631460228E+00 s6 : -8.61466466923939E-01 -3.64813495876627E-01 c6 : -7.52059005889243E-01 4.17885552753148E-01 == err : 5.571E-15 = rco : 3.290E-02 = res : 1.110E-15 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : -3.89415083856842E-01 4.02930062304817E-31 c1 : -9.21062371647420E-01 6.56787281431271E-31 s2 : -3.08457430339590E+00 -1.12748434939333E+00 c2 : 1.18298149617247E+00 -2.93986783637119E+00 s3 : 5.51926701023123E+00 2.78748170612766E+00 c3 : -2.82446248609853E+00 5.44700306623819E+00 s4 : 2.18528888972524E+00 -2.19251036407534E+00 c4 : -2.30971002700246E+00 -2.07440262336281E+00 s5 : 4.22761702728453E-01 4.87287884168480E-02 c5 : -9.07833668459021E-01 2.26921145125287E-02 s6 : 4.01843190733972E-01 -8.02819201166972E-02 c6 : 9.19889752968952E-01 3.50702275287029E-02 == err : 7.525E-15 = rco : 3.881E-03 = res : 3.553E-15 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : -3.89415083856842E-01 1.52372162131122E-31 c1 : -9.21062371647420E-01 2.08273397831169E-31 s2 : -1.66814300276214E+00 -2.60968969868373E+00 c2 : 2.74607605173298E+00 -1.58529317041035E+00 s3 : 3.42882833936714E+00 5.05527774520946E+00 c3 : -5.12313078715411E+00 3.38341539896057E+00 s4 : 2.11687232955215E+00 -2.28148639436773E+00 c4 : -2.40165709157283E+00 -2.01095128669009E+00 s5 : 5.09486080364478E-01 -2.15618991998570E-02 c5 : 8.60843598054382E-01 1.27613047635805E-02 s6 : -5.50180407961115E-01 2.65168683281356E-01 c6 : 8.91295858167372E-01 1.63683711765720E-01 == err : 5.368E-15 = rco : 4.424E-03 = res : 1.421E-14 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : -3.89415083856842E-01 3.59925302899856E-31 c1 : -9.21062371647420E-01 6.01691585860594E-31 s2 : -1.66814300276214E+00 -2.60968969868373E+00 c2 : 2.74607605173298E+00 -1.58529317041035E+00 s3 : 3.42882833936714E+00 5.05527774520946E+00 c3 : -5.12313078715411E+00 3.38341539896057E+00 s4 : 2.11687232955215E+00 -2.28148639436773E+00 c4 : -2.40165709157283E+00 -2.01095128669009E+00 s5 : 5.09486080364478E-01 -2.15618991998571E-02 c5 : 8.60843598054382E-01 1.27613047635805E-02 s6 : 4.66761459278284E-01 -2.34817061898099E-01 c6 : -9.22704020497345E-01 -1.18785170585817E-01 == err : 8.764E-15 = rco : 4.478E-03 = res : 1.005E-14 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : 3.89415083856842E-01 1.08281829476888E-30 c1 : 9.21062371647420E-01 3.43478743748823E-31 s2 : -3.08457430339590E+00 -1.12748434939333E+00 c2 : -1.18298149617247E+00 2.93986783637119E+00 s3 : 5.51926701023123E+00 2.78748170612766E+00 c3 : 2.82446248609853E+00 -5.44700306623819E+00 s4 : 2.18528888972524E+00 -2.19251036407534E+00 c4 : 2.30971002700246E+00 2.07440262336281E+00 s5 : 4.22761702728453E-01 4.87287884168481E-02 c5 : 9.07833668459021E-01 -2.26921145125288E-02 s6 : -4.01843190733972E-01 8.02819201166972E-02 c6 : -9.19889752968952E-01 -3.50702275287029E-02 == err : 8.527E-15 = rco : 3.881E-03 = res : 5.024E-15 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : -3.89415083856842E-01 -7.80184136256078E-31 c1 : -9.21062371647420E-01 1.04184090966962E-32 s2 : 8.12447299105426E-01 5.16786840383107E-01 c2 : -9.06404061572963E-01 4.63217333728468E-01 s3 : 1.23611304332968E+00 -1.24952222803037E+00 c3 : -1.46469772617762E+00 -1.05451841454651E+00 s4 : -9.39467983975633E-01 9.48683934911419E-01 c4 : 1.23891712639201E+00 7.19384827907607E-01 s5 : 1.71925348920786E+00 -3.34751466405344E-01 c5 : -4.06076515006418E-01 -1.41727631460228E+00 s6 : 8.61466466923939E-01 3.64813495876627E-01 c6 : 7.52059005889243E-01 -4.17885552753148E-01 == err : 5.571E-15 = rco : 3.977E-02 = res : 1.110E-15 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : 3.89415083856842E-01 2.33893526194247E-31 c1 : 9.21062371647420E-01 2.88527590435391E-31 s2 : -3.08457430339590E+00 -1.12748434939333E+00 c2 : -1.18298149617247E+00 2.93986783637119E+00 s3 : 5.51926701023123E+00 2.78748170612766E+00 c3 : 2.82446248609854E+00 -5.44700306623819E+00 s4 : 2.18528888972524E+00 -2.19251036407534E+00 c4 : 2.30971002700246E+00 2.07440262336281E+00 s5 : 4.22761702728453E-01 4.87287884168481E-02 c5 : 9.07833668459021E-01 -2.26921145125288E-02 s6 : 3.30199010468440E-01 -7.54084055570751E-02 c6 : 9.47283466803091E-01 2.62854591772632E-02 == err : 6.034E-15 = rco : 3.996E-03 = res : 3.553E-15 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : -3.89415083856842E-01 -6.44778291352428E-31 c1 : -9.21062371647420E-01 5.53495702086169E-31 s2 : 8.12447299105426E-01 5.16786840383107E-01 c2 : -9.06404061572963E-01 4.63217333728468E-01 s3 : 1.23611304332968E+00 -1.24952222803037E+00 c3 : -1.46469772617762E+00 -1.05451841454651E+00 s4 : -9.39467983975633E-01 9.48683934911419E-01 c4 : 1.23891712639201E+00 7.19384827907607E-01 s5 : 1.71925348920786E+00 -3.34751466405344E-01 c5 : -4.06076515006418E-01 -1.41727631460228E+00 s6 : -4.23667748161564E-01 -2.26075213480995E-01 c6 : -9.39157471197499E-01 1.01985853861664E-01 == err : 5.571E-15 = rco : 4.176E-02 = res : 1.110E-15 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : 3.89415083856842E-01 -7.97834684292006E-32 c1 : 9.21062371647420E-01 -2.69033276898011E-31 s2 : -1.66814300276214E+00 -2.60968969868373E+00 c2 : -2.74607605173297E+00 1.58529317041035E+00 s3 : 3.42882833936714E+00 5.05527774520946E+00 c3 : 5.12313078715411E+00 -3.38341539896057E+00 s4 : 2.11687232955215E+00 -2.28148639436773E+00 c4 : 2.40165709157283E+00 2.01095128669009E+00 s5 : 5.09486080364479E-01 -2.15618991998570E-02 c5 : -8.60843598054382E-01 -1.27613047635804E-02 s6 : -4.66761459278284E-01 2.34817061898099E-01 c6 : 9.22704020497345E-01 1.18785170585816E-01 == err : 5.986E-15 = rco : 4.478E-03 = res : 1.281E-14 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : 3.89415083856842E-01 -2.02259011496046E-31 c1 : 9.21062371647420E-01 -1.81471703246161E-31 s2 : -1.66814300276214E+00 -2.60968969868373E+00 c2 : -2.74607605173298E+00 1.58529317041035E+00 s3 : 3.42882833936714E+00 5.05527774520946E+00 c3 : 5.12313078715411E+00 -3.38341539896057E+00 s4 : 2.11687232955215E+00 -2.28148639436773E+00 c4 : 2.40165709157283E+00 2.01095128669009E+00 s5 : 5.09486080364478E-01 -2.15618991998570E-02 c5 : -8.60843598054382E-01 -1.27613047635805E-02 s6 : 5.50180407961115E-01 -2.65168683281356E-01 c6 : -8.91295858167372E-01 -1.63683711765720E-01 == err : 5.368E-15 = rco : 4.424E-03 = res : 1.421E-14 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : -3.89415083856842E-01 5.37680945305336E-72 c1 : -9.21062371647420E-01 3.11288968334668E-71 s2 : 7.30467265581231E-01 -9.23679266040325E-70 c2 : -6.82947709502184E-01 -7.60677042621444E-70 s3 : 5.01061086394408E-01 1.77491309945004E-69 c3 : -8.65411917933452E-01 1.55757680155819E-69 s4 : 7.76576030467492E-01 -7.24454326306137E-70 c4 : -6.30023546308670E-01 -9.68957661434458E-70 s5 : 9.85556337261790E-01 -3.73546762001602E-71 c5 : 1.69347884790821E-01 2.26391976970668E-70 s6 : -9.89421385196769E-01 -2.74500272076935E-71 c6 : -1.45070060713112E-01 1.90169260655361E-70 == err : 1.136E-15 = rco : 2.341E-02 = res : 5.967E-16 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : -3.89415083856842E-01 -1.71451025968357E-30 c1 : -9.21062371647419E-01 2.82321487431262E-31 s2 : -3.08457430339590E+00 1.12748434939333E+00 c2 : 1.18298149617247E+00 2.93986783637119E+00 s3 : 5.51926701023123E+00 -2.78748170612766E+00 c3 : -2.82446248609854E+00 -5.44700306623819E+00 s4 : 2.18528888972524E+00 2.19251036407534E+00 c4 : -2.30971002700246E+00 2.07440262336281E+00 s5 : 4.22761702728453E-01 -4.87287884168480E-02 c5 : -9.07833668459021E-01 -2.26921145125288E-02 s6 : -3.30199010468440E-01 -7.54084055570750E-02 c6 : -9.47283466803091E-01 2.62854591772632E-02 == err : 8.816E-15 = rco : 3.996E-03 = res : 1.123E-14 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : -3.89415083856842E-01 5.52714787526045E-75 c1 : -9.21062371647420E-01 3.75846055517710E-74 s2 : 7.30467265581230E-01 1.41494985606667E-73 c2 : -6.82947709502185E-01 1.59181858807501E-73 s3 : 5.01061086394409E-01 -3.00676844414168E-73 c3 : -8.65411917933451E-01 -2.82989971213335E-73 s4 : 7.76576030467492E-01 1.59181858807501E-73 c4 : -6.30023546308670E-01 -8.84343660041671E-75 s5 : 9.85556337261790E-01 6.63257745031253E-75 c5 : 1.69347884790822E-01 2.12242478410001E-73 s6 : 9.73527905464624E-01 -5.52714787526045E-75 c6 : -2.28568189566401E-01 -9.94886617546880E-75 == err : 8.407E-16 = rco : 2.388E-02 = res : 2.220E-16 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : -3.89415083856842E-01 -2.38933027226999E-30 c1 : -9.21062371647420E-01 -1.60384880690501E-30 s2 : -3.08457430339590E+00 1.12748434939333E+00 c2 : 1.18298149617247E+00 2.93986783637119E+00 s3 : 5.51926701023123E+00 -2.78748170612766E+00 c3 : -2.82446248609854E+00 -5.44700306623819E+00 s4 : 2.18528888972524E+00 2.19251036407534E+00 c4 : -2.30971002700246E+00 2.07440262336281E+00 s5 : 4.22761702728453E-01 -4.87287884168480E-02 c5 : -9.07833668459021E-01 -2.26921145125288E-02 s6 : 4.01843190733972E-01 8.02819201166972E-02 c6 : 9.19889752968952E-01 -3.50702275287030E-02 == err : 9.843E-15 = rco : 3.881E-03 = res : 7.105E-15 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : 3.89415083856842E-01 1.92031089696496E-30 c1 : 9.21062371647420E-01 -8.61507960085025E-31 s2 : -3.08457430339590E+00 1.12748434939333E+00 c2 : -1.18298149617247E+00 -2.93986783637119E+00 s3 : 5.51926701023123E+00 -2.78748170612767E+00 c3 : 2.82446248609854E+00 5.44700306623819E+00 s4 : 2.18528888972524E+00 2.19251036407534E+00 c4 : 2.30971002700246E+00 -2.07440262336281E+00 s5 : 4.22761702728452E-01 -4.87287884168479E-02 c5 : 9.07833668459021E-01 2.26921145125287E-02 s6 : -4.01843190733972E-01 -8.02819201166973E-02 c6 : -9.19889752968952E-01 3.50702275287030E-02 == err : 9.407E-15 = rco : 3.881E-03 = res : 3.553E-15 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : 3.89415083856842E-01 -2.76357393763022E-76 c1 : 9.21062371647420E-01 9.67250878170578E-76 s2 : 7.30467265581231E-01 -2.60881379712293E-73 c2 : 6.82947709502184E-01 2.07820760109793E-73 s3 : 5.01061086394408E-01 5.04075886223753E-73 c3 : 8.65411917933452E-01 -4.51015266621252E-73 s4 : 7.76576030467492E-01 -2.16664196710209E-73 c4 : 6.30023546308670E-01 2.96255126113960E-73 s5 : 9.85556337261790E-01 -1.07779383567579E-74 c5 : -1.69347884790821E-01 -6.74312040781774E-74 s6 : -9.73527905464624E-01 9.05070464573898E-75 c6 : 2.28568189566400E-01 4.75334717272398E-74 == err : 1.136E-15 = rco : 2.709E-02 = res : 5.967E-16 == solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : 3.89415083856842E-01 -7.28386846774837E-31 c1 : 9.21062371647420E-01 2.24693952239863E-32 s2 : -3.08457430339590E+00 1.12748434939333E+00 c2 : -1.18298149617247E+00 -2.93986783637119E+00 s3 : 5.51926701023123E+00 -2.78748170612766E+00 c3 : 2.82446248609853E+00 5.44700306623819E+00 s4 : 2.18528888972524E+00 2.19251036407534E+00 c4 : 2.30971002700246E+00 -2.07440262336281E+00 s5 : 4.22761702728453E-01 -4.87287884168481E-02 c5 : 9.07833668459021E-01 2.26921145125288E-02 s6 : 3.30199010468440E-01 7.54084055570751E-02 c6 : 9.47283466803091E-01 -2.62854591772632E-02 == err : 8.527E-15 = rco : 3.996E-03 = res : 5.024E-15 == solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : 3.89415083856842E-01 -1.69793982728001E-72 c1 : 9.21062371647420E-01 -9.62165902125338E-72 s2 : 7.30467265581231E-01 3.98449879468375E-70 c2 : 6.82947709502184E-01 -3.16948767758935E-70 s3 : 5.01061086394408E-01 -7.78788400779097E-70 c3 : 8.65411917933452E-01 7.24454326306137E-70 s4 : 7.76576030467492E-01 3.44115804995415E-70 c4 : 6.30023546308670E-01 -4.89006670256642E-70 s5 : 9.85556337261790E-01 2.40541475531335E-71 c5 : -1.69347884790821E-01 1.43758905376374E-70 s6 : 9.89421385196769E-01 -1.50692159671101E-71 c6 : 1.45070060713112E-01 1.04140309406507E-70 == err : 1.136E-15 = rco : 2.650E-02 = res : 5.967E-16 == solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : 3.89415083856842E-01 4.05694422731437E-69 c1 : 9.21062371647420E-01 3.47738076626946E-68 s2 : 5.75259014495853E-01 1.11276184520623E-67 c2 : 8.17971311380332E-01 -2.96736492054994E-67 s3 : 8.08477989701551E-01 -7.41841230137484E-68 c3 : 5.88526414163493E-01 3.70920615068742E-67 s4 : 6.27366977109340E-01 -7.41841230137484E-68 c4 : 7.78723748214146E-01 0.00000000000000E+00 s5 : 9.84086361717633E-01 -3.47738076626946E-69 c5 : -1.77690834545150E-01 -1.71550784469293E-67 s6 : 9.93123154097381E-01 3.92654244857926E-68 c6 : 1.17074338758196E-01 -2.59644430548120E-67 == err : 9.821E-16 = rco : 3.414E-02 = res : 8.882E-16 == solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : -3.89415083856842E-01 1.97051576755269E-68 c1 : -9.21062371647420E-01 1.41123702764436E-67 s2 : 5.75259014495853E-01 2.22552369041245E-67 c2 : -8.17971311380332E-01 8.90209476164981E-67 s3 : 8.08477989701551E-01 -2.96736492054994E-67 c3 : -5.88526414163493E-01 -1.33531421424747E-66 s4 : 6.27366977109340E-01 7.41841230137484E-68 c4 : -7.78723748214146E-01 1.48368246027497E-67 s5 : 9.84086361717633E-01 4.04942596482930E-68 c5 : 1.77690834545150E-01 5.37834891849676E-67 s6 : -9.93123154097381E-01 -1.08957930676443E-67 c6 : -1.17074338758196E-01 7.04749168630610E-67 == err : 9.821E-16 = rco : 3.614E-02 = res : 8.882E-16 == solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : 3.89415083856842E-01 -1.21543267145725E-63 c1 : 9.21062371647420E-01 1.84279896821850E-63 s2 : 5.75259014495853E-01 -9.72346137165803E-63 c2 : 8.17971311380332E-01 -4.86173068582902E-62 s3 : 8.08477989701551E-01 3.88938454866321E-62 c3 : 5.88526414163493E-01 3.88938454866321E-62 s4 : 6.27366977109340E-01 -5.83407682299482E-62 c4 : 7.78723748214146E-01 4.86173068582902E-62 s5 : 9.84086361717633E-01 1.45851920574871E-62 c5 : -1.77690834545150E-01 -1.50713651260700E-61 s6 : -9.67138464698502E-01 2.73472351077882E-62 c6 : 2.54250250935226E-01 9.23728830307513E-62 == err : 9.821E-16 = rco : 3.531E-02 = res : 8.882E-16 == solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : -3.89415083856842E-01 -4.86173068582902E-62 c1 : -9.21062371647419E-01 -1.36128459203212E-61 s2 : 5.75259014495852E-01 -5.13398760423544E-60 c2 : -8.17971311380332E-01 -4.51168607644933E-60 s3 : 8.08477989701552E-01 9.64567368068477E-60 c3 : -5.88526414163492E-01 9.49009829873824E-60 s4 : 6.27366977109340E-01 -4.04495993060974E-60 c4 : -7.78723748214147E-01 -5.13398760423544E-60 s5 : 9.84086361717633E-01 -7.04950949445208E-62 c5 : 1.77690834545150E-01 5.83407682299482E-61 s6 : 9.67138464698502E-01 -3.11150763893057E-61 c6 : -2.54250250935226E-01 -1.23001786351474E-60 == err : 1.426E-15 = rco : 3.779E-02 = res : 8.882E-16 == solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : -3.89415083856842E-01 -1.30699200206328E-31 c1 : -9.21062371647420E-01 -1.00601754242529E-31 s2 : -1.66814300276214E+00 2.60968969868373E+00 c2 : 2.74607605173297E+00 1.58529317041035E+00 s3 : 3.42882833936714E+00 -5.05527774520946E+00 c3 : -5.12313078715411E+00 -3.38341539896057E+00 s4 : 2.11687232955215E+00 2.28148639436773E+00 c4 : -2.40165709157283E+00 2.01095128669009E+00 s5 : 5.09486080364479E-01 2.15618991998570E-02 c5 : 8.60843598054382E-01 -1.27613047635805E-02 s6 : 4.66761459278284E-01 2.34817061898099E-01 c6 : -9.22704020497345E-01 1.18785170585816E-01 == err : 4.680E-15 = rco : 4.478E-03 = res : 7.944E-15 == solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : 3.89415083856842E-01 9.86169495326495E-32 c1 : 9.21062371647420E-01 7.90333934964611E-33 s2 : -1.66814300276214E+00 2.60968969868373E+00 c2 : -2.74607605173298E+00 -1.58529317041035E+00 s3 : 3.42882833936714E+00 -5.05527774520946E+00 c3 : 5.12313078715411E+00 3.38341539896057E+00 s4 : 2.11687232955215E+00 2.28148639436773E+00 c4 : 2.40165709157283E+00 -2.01095128669009E+00 s5 : 5.09486080364478E-01 2.15618991998570E-02 c5 : -8.60843598054382E-01 1.27613047635805E-02 s6 : -4.66761459278283E-01 -2.34817061898099E-01 c6 : 9.22704020497345E-01 -1.18785170585816E-01 == err : 5.368E-15 = rco : 4.478E-03 = res : 1.421E-14 == solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : 3.89415083856842E-01 8.22325724561267E-32 c1 : 9.21062371647419E-01 1.79150539365652E-31 s2 : 8.23145787536120E-01 5.60379372510051E-01 c2 : 9.37349006938816E-01 -4.92104772597142E-01 s3 : 1.04914305688734E+00 -9.62741326591088E-01 c3 : 1.22651709460876E+00 8.23513494276851E-01 s4 : -5.97623476383050E-01 2.44344535652022E-01 c4 : -8.55390699351840E-01 -1.70712670762276E-01 s5 : 1.52914291606202E+00 1.89564431625379E-01 c5 : 2.48202441735159E-01 -1.16788177316392E+00 s6 : -4.72806388998190E-01 -8.65404650283140E-02 c6 : 8.86607684872822E-01 -4.61499324564624E-02 == err : 4.792E-15 = rco : 5.481E-02 = res : 9.155E-16 == solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : -3.89415083856842E-01 -8.58598285181072E-32 c1 : -9.21062371647419E-01 -1.50519098652568E-31 s2 : 8.23145787536120E-01 5.60379372510051E-01 c2 : -9.37349006938816E-01 4.92104772597142E-01 s3 : 1.04914305688734E+00 -9.62741326591088E-01 c3 : -1.22651709460876E+00 -8.23513494276851E-01 s4 : -5.97623476383050E-01 2.44344535652022E-01 c4 : 8.55390699351840E-01 1.70712670762276E-01 s5 : 1.52914291606202E+00 1.89564431625379E-01 c5 : -2.48202441735159E-01 1.16788177316392E+00 s6 : 4.72806388998190E-01 8.65404650283140E-02 c6 : -8.86607684872822E-01 4.61499324564624E-02 == err : 4.792E-15 = rco : 4.912E-02 = res : 9.155E-16 == solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : -3.89415083856842E-01 -1.38606669272869E-31 c1 : -9.21062371647420E-01 -1.28287338039757E-31 s2 : -1.66814300276214E+00 2.60968969868373E+00 c2 : 2.74607605173298E+00 1.58529317041035E+00 s3 : 3.42882833936714E+00 -5.05527774520946E+00 c3 : -5.12313078715411E+00 -3.38341539896057E+00 s4 : 2.11687232955215E+00 2.28148639436773E+00 c4 : -2.40165709157283E+00 2.01095128669009E+00 s5 : 5.09486080364478E-01 2.15618991998570E-02 c5 : 8.60843598054382E-01 -1.27613047635805E-02 s6 : -5.50180407961115E-01 -2.65168683281356E-01 c6 : 8.91295858167372E-01 -1.63683711765720E-01 == err : 5.368E-15 = rco : 4.424E-03 = res : 1.421E-14 == solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : 3.89415083856842E-01 4.77672556170894E-32 c1 : 9.21062371647420E-01 -3.01584649379662E-32 s2 : -1.66814300276214E+00 2.60968969868373E+00 c2 : -2.74607605173298E+00 -1.58529317041035E+00 s3 : 3.42882833936714E+00 -5.05527774520946E+00 c3 : 5.12313078715411E+00 3.38341539896057E+00 s4 : 2.11687232955215E+00 2.28148639436773E+00 c4 : 2.40165709157283E+00 -2.01095128669009E+00 s5 : 5.09486080364478E-01 2.15618991998570E-02 c5 : -8.60843598054382E-01 1.27613047635805E-02 s6 : 5.50180407961115E-01 2.65168683281356E-01 c6 : -8.91295858167372E-01 1.63683711765720E-01 == err : 6.871E-15 = rco : 4.424E-03 = res : 7.944E-15 == solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : 3.89415083856842E-01 -3.51710436505454E-32 c1 : 9.21062371647419E-01 -2.77075473689231E-31 s2 : 8.23145787536120E-01 5.60379372510051E-01 c2 : 9.37349006938816E-01 -4.92104772597142E-01 s3 : 1.04914305688734E+00 -9.62741326591088E-01 c3 : 1.22651709460876E+00 8.23513494276851E-01 s4 : -5.97623476383050E-01 2.44344535652022E-01 c4 : -8.55390699351840E-01 -1.70712670762276E-01 s5 : 1.52914291606202E+00 1.89564431625379E-01 c5 : 2.48202441735158E-01 -1.16788177316392E+00 s6 : 7.81285014306436E-01 6.00957349607138E-02 c6 : -6.31453818401378E-01 7.43552351419824E-02 == err : 4.847E-15 = rco : 5.552E-02 = res : 9.114E-16 == solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : -3.89415083856842E-01 2.75710572042304E-32 c1 : -9.21062371647419E-01 2.65051806747724E-31 s2 : 8.23145787536120E-01 5.60379372510051E-01 c2 : -9.37349006938816E-01 4.92104772597142E-01 s3 : 1.04914305688734E+00 -9.62741326591088E-01 c3 : -1.22651709460876E+00 -8.23513494276851E-01 s4 : -5.97623476383050E-01 2.44344535652022E-01 c4 : 8.55390699351840E-01 1.70712670762276E-01 s5 : 1.52914291606202E+00 1.89564431625379E-01 c5 : -2.48202441735158E-01 1.16788177316392E+00 s6 : -7.81285014306436E-01 -6.00957349607139E-02 c6 : 6.31453818401378E-01 -7.43552351419825E-02 == err : 4.847E-15 = rco : 4.917E-02 = res : 9.114E-16 == solution 33 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : 3.89415083856842E-01 2.65920486866181E-32 c1 : 9.21062371647419E-01 3.38674211387560E-31 s2 : 8.23145787536120E-01 -5.60379372510051E-01 c2 : 9.37349006938816E-01 4.92104772597142E-01 s3 : 1.04914305688734E+00 9.62741326591088E-01 c3 : 1.22651709460876E+00 -8.23513494276851E-01 s4 : -5.97623476383050E-01 -2.44344535652022E-01 c4 : -8.55390699351840E-01 1.70712670762276E-01 s5 : 1.52914291606202E+00 -1.89564431625379E-01 c5 : 2.48202441735158E-01 1.16788177316392E+00 s6 : 7.81285014306436E-01 -6.00957349607138E-02 c6 : -6.31453818401378E-01 -7.43552351419824E-02 == err : 4.847E-15 = rco : 5.552E-02 = res : 9.114E-16 == solution 34 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : 3.89415083856842E-01 6.68974142370073E-60 c1 : 9.21062371647420E-01 2.10804642537546E-59 s2 : 6.26140621849592E-01 3.19614064670948E-57 c2 : 7.79710152344964E-01 -2.33985374447579E-57 s3 : 6.07900231883579E-01 -5.65547628452021E-57 c3 : 7.94013418070433E-01 5.03815316895638E-57 s4 : 8.75877670684069E-01 1.73248745335654E-57 c4 : 4.82533217506370E-01 -3.11648605115286E-57 s5 : 9.37998305193623E-01 3.07416954726340E-58 c5 : 3.46639841123162E-01 -6.96977711120448E-58 s6 : 9.42387849717845E-01 5.50114550562925E-58 c6 : 3.34522257412232E-01 -1.40391224668547E-57 == err : 2.441E-15 = rco : 7.794E-03 = res : 2.220E-16 == solution 35 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : -3.89415083856842E-01 2.78334081763711E-61 c1 : -9.21062371647419E-01 -1.94469227433161E-61 s2 : 5.64604874232218E-01 -4.48057100006002E-59 c2 : -8.25361336623676E-01 -3.48488855560224E-59 s3 : 7.17403428624498E-01 8.08991986121949E-59 c3 : -6.96657965286994E-01 7.09423741676170E-59 s4 : 8.41478520054349E-01 -2.67589656948029E-59 c4 : -5.40290570237111E-01 -3.98272977783113E-59 s5 : 9.32004841587325E-01 -3.18929532990384E-60 c5 : -3.62445823893427E-01 -1.08902767362570E-59 s6 : 9.99735569944520E-01 1.86690458335834E-60 c6 : -2.29954384108199E-02 1.68021412502251E-59 == err : 8.866E-16 = rco : 8.519E-03 = res : 8.882E-16 == solution 36 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : -3.89415083856842E-01 6.59826499123333E-31 c1 : -9.21062371647420E-01 -5.46918320578315E-31 s2 : 8.12447299105426E-01 -5.16786840383107E-01 c2 : -9.06404061572963E-01 -4.63217333728468E-01 s3 : 1.23611304332968E+00 1.24952222803037E+00 c3 : -1.46469772617762E+00 1.05451841454651E+00 s4 : -9.39467983975633E-01 -9.48683934911419E-01 c4 : 1.23891712639201E+00 -7.19384827907607E-01 s5 : 1.71925348920786E+00 3.34751466405344E-01 c5 : -4.06076515006418E-01 1.41727631460228E+00 s6 : 8.61466466923939E-01 -3.64813495876627E-01 c6 : 7.52059005889243E-01 4.17885552753148E-01 == err : 5.571E-15 = rco : 3.977E-02 = res : 1.110E-15 == solution 37 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : 3.89415083856842E-01 -8.29044990954045E-32 c1 : 9.21062371647419E-01 -1.73616168931533E-31 s2 : 8.23145787536120E-01 -5.60379372510051E-01 c2 : 9.37349006938816E-01 4.92104772597142E-01 s3 : 1.04914305688734E+00 9.62741326591088E-01 c3 : 1.22651709460876E+00 -8.23513494276851E-01 s4 : -5.97623476383050E-01 -2.44344535652022E-01 c4 : -8.55390699351840E-01 1.70712670762276E-01 s5 : 1.52914291606202E+00 -1.89564431625379E-01 c5 : 2.48202441735159E-01 1.16788177316392E+00 s6 : -4.72806388998190E-01 8.65404650283140E-02 c6 : 8.86607684872822E-01 4.61499324564624E-02 == err : 4.792E-15 = rco : 5.481E-02 = res : 9.155E-16 == solution 38 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : 3.89415083856842E-01 2.66422841583430E-60 c1 : 9.21062371647419E-01 7.08840333993871E-60 s2 : 6.26140621849592E-01 4.77927573339736E-58 c2 : 7.79710152344964E-01 -3.68402504449380E-58 s3 : 6.07900231883578E-01 -8.76200551122849E-58 c3 : 7.94013418070433E-01 7.56718657787915E-58 s4 : 8.75877670684069E-01 2.78791084448179E-58 c4 : 4.82533217506370E-01 -4.48057100006002E-58 s5 : 9.37998305193623E-01 4.23165038894558E-59 c5 : 3.46639841123161E-01 -4.97841222228891E-59 s6 : -9.98546109059359E-01 -5.91186451396809E-60 c6 : 5.39042492055606E-02 2.88747908892757E-58 == err : 1.294E-15 = rco : 7.789E-03 = res : 8.882E-16 == solution 39 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : -3.89415083856842E-01 -5.41247361508309E-63 c1 : -9.21062371647419E-01 5.54541156352372E-62 s2 : 5.64604874232218E-01 -6.06743989591461E-60 c2 : -8.25361336623676E-01 -4.90062453131565E-60 s3 : 7.17403428624498E-01 1.12014275001501E-59 c3 : -6.96657965286994E-01 9.95682444457783E-60 s4 : 8.41478520054349E-01 -3.65602147574342E-60 c4 : -5.40290570237111E-01 -5.44513836812850E-60 s5 : 9.32004841587325E-01 -5.83407682299482E-61 c5 : -3.62445823893427E-01 -1.82801073787171E-60 s6 : -9.32692979738753E-01 6.02854605042798E-61 c6 : -3.60671326204408E-01 -2.33363072919793E-60 == err : 8.866E-16 = rco : 8.396E-03 = res : 8.882E-16 == solution 40 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : -3.89415083856842E-01 7.81187069306404E-31 c1 : -9.21062371647420E-01 -6.58925198626858E-31 s2 : 8.12447299105426E-01 -5.16786840383107E-01 c2 : -9.06404061572963E-01 -4.63217333728468E-01 s3 : 1.23611304332968E+00 1.24952222803037E+00 c3 : -1.46469772617762E+00 1.05451841454651E+00 s4 : -9.39467983975633E-01 -9.48683934911419E-01 c4 : 1.23891712639201E+00 -7.19384827907607E-01 s5 : 1.71925348920786E+00 3.34751466405344E-01 c5 : -4.06076515006418E-01 1.41727631460228E+00 s6 : -4.23667748161564E-01 2.26075213480995E-01 c6 : -9.39157471197499E-01 -1.01985853861664E-01 == err : 5.571E-15 = rco : 4.176E-02 = res : 1.110E-15 == solution 41 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : 3.89415083856842E-01 -7.74043219236920E-31 c1 : 9.21062371647420E-01 6.46767250013048E-31 s2 : 8.12447299105426E-01 -5.16786840383107E-01 c2 : 9.06404061572963E-01 4.63217333728468E-01 s3 : 1.23611304332968E+00 1.24952222803037E+00 c3 : 1.46469772617762E+00 -1.05451841454651E+00 s4 : -9.39467983975633E-01 -9.48683934911419E-01 c4 : -1.23891712639201E+00 7.19384827907607E-01 s5 : 1.71925348920786E+00 3.34751466405344E-01 c5 : 4.06076515006418E-01 -1.41727631460228E+00 s6 : 4.23667748161564E-01 -2.26075213480995E-01 c6 : 9.39157471197499E-01 1.01985853861664E-01 == err : 5.571E-15 = rco : 4.123E-02 = res : 1.110E-15 == solution 42 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : 3.89415083856842E-01 -3.88938454866321E-62 c1 : 9.21062371647419E-01 6.80642296016062E-62 s2 : 5.64604874232218E-01 -1.94469227433161E-59 c2 : 8.25361336623676E-01 1.50908120488133E-59 s3 : 7.17403428624498E-01 3.48488855560224E-59 c3 : 6.96657965286994E-01 -3.11150763893057E-59 s4 : 8.41478520054349E-01 -1.09291705817436E-59 c4 : 5.40290570237111E-01 1.71132920141181E-59 s5 : 9.32004841587325E-01 -1.94469227433161E-60 c5 : 3.62445823893427E-01 5.83407682299482E-60 s6 : 9.32692979738753E-01 -2.72256918406425E-60 c6 : 3.60671326204408E-01 8.24549524316601E-60 == err : 1.037E-15 = rco : 8.356E-03 = res : 8.882E-16 == solution 43 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : -3.89415083856842E-01 5.34547288906900E-60 c1 : -9.21062371647419E-01 1.19793044098827E-59 s2 : 6.26140621849592E-01 -7.76632306677071E-58 c2 : -7.79710152344964E-01 -5.97409466674670E-58 s3 : 6.07900231883578E-01 1.43378272001921E-57 c3 : -7.94013418070433E-01 1.27447352890596E-57 s4 : 8.75877670684069E-01 -4.97841222228891E-58 c4 : -4.82533217506370E-01 -8.16459604455382E-58 s5 : 9.37998305193623E-01 -7.34315802787615E-59 c5 : -3.46639841123161E-01 -1.04546656668067E-58 s6 : 9.98546109059359E-01 -5.91186451396809E-60 c6 : -5.39042492055606E-02 4.87884397784314E-58 == err : 1.294E-15 = rco : 7.703E-03 = res : 8.882E-16 == solution 44 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : -3.89415083856842E-01 1.14177279211430E-32 c1 : -9.21062371647419E-01 -1.60213698622844E-31 s2 : 8.23145787536120E-01 -5.60379372510051E-01 c2 : -9.37349006938816E-01 -4.92104772597142E-01 s3 : 1.04914305688734E+00 9.62741326591088E-01 c3 : -1.22651709460876E+00 8.23513494276851E-01 s4 : -5.97623476383050E-01 -2.44344535652022E-01 c4 : 8.55390699351840E-01 -1.70712670762276E-01 s5 : 1.52914291606202E+00 -1.89564431625379E-01 c5 : -2.48202441735158E-01 -1.16788177316392E+00 s6 : 4.72806388998190E-01 -8.65404650283140E-02 c6 : -8.86607684872822E-01 -4.61499324564624E-02 == err : 4.847E-15 = rco : 4.912E-02 = res : 9.114E-16 == solution 45 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : 3.89415083856842E-01 -6.66476887123257E-31 c1 : 9.21062371647420E-01 4.32071674722514E-31 s2 : 8.12447299105426E-01 -5.16786840383107E-01 c2 : 9.06404061572963E-01 4.63217333728468E-01 s3 : 1.23611304332968E+00 1.24952222803037E+00 c3 : 1.46469772617762E+00 -1.05451841454651E+00 s4 : -9.39467983975633E-01 -9.48683934911419E-01 c4 : -1.23891712639201E+00 7.19384827907607E-01 s5 : 1.71925348920786E+00 3.34751466405344E-01 c5 : 4.06076515006418E-01 -1.41727631460228E+00 s6 : -8.61466466923939E-01 3.64813495876627E-01 c6 : -7.52059005889243E-01 -4.17885552753148E-01 == err : 5.571E-15 = rco : 3.290E-02 = res : 1.110E-15 == solution 46 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : 3.89415083856842E-01 -2.19507140465180E-60 c1 : 9.21062371647420E-01 -2.00303304256156E-60 s2 : 5.64604874232218E-01 -2.48920611114446E-57 c2 : 8.25361336623676E-01 1.80218522446859E-57 s3 : 7.17403428624498E-01 4.42083005339256E-57 c3 : 6.96657965286995E-01 -3.86324788449620E-57 s4 : 8.41478520054349E-01 -1.34914971224030E-57 c4 : 5.40290570237110E-01 2.35976739336495E-57 s5 : 9.32004841587325E-01 -2.48920611114446E-58 c5 : 3.62445823893427E-01 6.17323115563825E-58 s6 : -9.99735569944520E-01 -2.86258702781613E-59 c6 : 2.29954384108199E-02 -1.32425765112885E-57 == err : 2.523E-15 = rco : 8.471E-03 = res : 2.220E-16 == solution 47 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : -3.89415083856842E-01 -5.78545951613653E-61 c1 : -9.21062371647420E-01 -5.76115086270739E-61 s2 : 6.26140621849592E-01 8.11481192233093E-58 c2 : -7.79710152344964E-01 5.82474230007803E-58 s3 : 6.07900231883579E-01 -1.43876113224150E-57 c3 : -7.94013418070433E-01 -1.25953829223910E-57 s4 : 8.75877670684069E-01 4.40589481672569E-58 c4 : -4.82533217506370E-01 7.86589131121648E-58 s5 : 9.37998305193623E-01 8.21438016677671E-59 c5 : -3.46639841123162E-01 1.81712046113545E-58 s6 : -9.42387849717845E-01 -1.44996255974165E-58 c6 : -3.34522257412232E-01 3.62179489171519E-58 == err : 1.598E-15 = rco : 7.735E-03 = res : 4.441E-16 == solution 48 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : s1 : -3.89415083856842E-01 -3.03926886110161E-32 c1 : -9.21062371647419E-01 -2.94747654855477E-31 s2 : 8.23145787536120E-01 -5.60379372510051E-01 c2 : -9.37349006938816E-01 -4.92104772597142E-01 s3 : 1.04914305688734E+00 9.62741326591088E-01 c3 : -1.22651709460876E+00 8.23513494276851E-01 s4 : -5.97623476383050E-01 -2.44344535652022E-01 c4 : 8.55390699351840E-01 -1.70712670762276E-01 s5 : 1.52914291606202E+00 -1.89564431625379E-01 c5 : -2.48202441735158E-01 -1.16788177316392E+00 s6 : -7.81285014306436E-01 6.00957349607139E-02 c6 : 6.31453818401378E-01 7.43552351419825E-02 == err : 4.847E-15 = rco : 4.917E-02 = res : 9.114E-16 == SHAR_EOF fi # end of overwriting check if test -f 'kinema' then echo shar: will not over-write existing file "'kinema'" else cat << "SHAR_EOF" > 'kinema' 9 z1**2 + z2**2 + z3**2 - 12*z1 - 68; z4**2 + z5**2 + z6**2 - 12*z5 - 68; z7**2 + z8**2 + z9**2 - 24*z8 - 12*z9 + 100; z1*z4 + z2*z5 + z3*z6 - 6*z1 - 6*z5 - 52; z1*z7 + z2*z8 + z3*z9 - 6*z1 - 12*z8 - 6*z9 + 64; z4*z7 + z5*z8 + z6*z9 - 6*z5 - 12*z8 - 6*z9 + 32; 2*z2 + 2*z3 - z4 - z5 - 2*z6 - z7 - z9 + 18; z1 + z2 + 2*z3 + 2*z4 + 2*z6 - 2*z7 + z8 - z9 - 38; z1 + z3 - 2*z4 + z5 - z6 + 2*z7 - 2*z8 + 8; TITLE : robot kinematics problem ROOT COUNTS : total degree : 64 mixed volume : 64 REFERENCES : Bellido, A.M.:" Construction de fonctions d'iteration pour le calcul simultane des solutions d'equations et de systemes d'equations algebriques", These 1992, Universite Paul Sabatier, Toulouse. Anne-Mercedes Bellido: "Construction of iteration functions for the simultaneous computation of the solutions of equations and algebraic systems" Numerical Algorithms Vo. 6, Nos 3-4, pages 317--351, 1992. THE SOLUTIONS : 40 9 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : -3.68469508248855E+00 -1.03023078230454E+01 z2 : 1.67108491564690E+01 -1.03023078230454E+01 z3 : 7.02615407398042E+00 1.03023078230454E+01 z4 : -1.83667011110269E-01 -8.29282378138198E+00 z5 : 1.85469966608636E+01 -8.29282378138196E+00 z6 : 1.23633296497533E+01 8.29282378138197E+00 z7 : 6.47926249974247E+00 -4.89281831998272E+00 z8 : 1.54254925121538E+01 -4.89281831998271E+00 z9 : 1.59047550118963E+01 4.89281831998272E+00 == err : 4.246E-14 = rco : 4.038E-03 = res : 7.246E-14 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 9.35421211541972E+01 -7.82046855687843E+01 z2 : -1.02747683363043E+02 -7.82046855687731E+01 z3 : -1.52055622088319E+01 7.82046855687808E+01 z4 : -7.06696973949775E+01 4.97255418893418E+01 z5 : 4.52450503365046E+01 4.97255418893251E+01 z6 : -3.14246470584928E+01 -4.97255418893309E+01 z7 : -9.19351251778106E+01 6.48290261982557E+01 z8 : 6.02377003873483E+01 6.48290261982402E+01 z9 : -3.76974247904809E+01 -6.48290261982453E+01 == err : 1.956E-11 = rco : 4.764E-05 = res : 4.067E-12 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 1.61040212584557E+01 -4.44940404124784E+00 z2 : -2.78764310386565E+00 -4.44940404124784E+00 z3 : 7.31637815459007E+00 4.44940404124784E+00 z4 : 1.20915883240045E+01 -7.32387045771528E+00 z5 : -4.82111997017385E+00 -7.32387045771527E+00 z6 : 1.27046835383069E+00 7.32387045771528E+00 z7 : 7.55774927314689E+00 1.37789246452863E+00 z8 : 8.13056649366298E+00 1.37789246452863E+00 z9 : 9.68831576680987E+00 -1.37789246452863E+00 == err : 4.438E-14 = rco : 8.943E-03 = res : 4.019E-14 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 5.53641329934702E+00 8.48969913640004E-73 z2 : -4.87294036018169E+00 -5.92510252227920E-73 z3 : 8.94648196874559E+00 1.23808112405834E-73 z4 : 5.12028097886163E+00 -3.18363717615002E-73 z5 : 3.23278699546905E-01 -3.89111210418335E-73 z6 : 6.74963391410896E+00 -1.41494985606667E-73 z7 : 2.06007289760102E-01 -1.37957610966501E-72 z8 : 3.11399633766375E+00 -5.30606196025003E-73 z9 : 6.99824842074125E+00 1.69793982728001E-72 == err : 6.171E-15 = rco : 1.793E-02 = res : 7.105E-15 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 1.20000000000000E+01 4.74778387287990E-66 z2 : 8.00000000000000E+00 -3.85757439671492E-66 z3 : 2.00000000000000E+00 4.15431088876991E-66 z4 : 8.00000000000000E+00 8.30862177753982E-66 z5 : 1.20000000000000E+01 -2.96736492054994E-66 z6 : 2.00000000000000E+00 -4.74778387287990E-66 z7 : 8.00000000000000E+00 4.45104738082491E-66 z8 : 1.60000000000000E+01 1.14985390671310E-66 z9 : 6.00000000000000E+00 -1.78041895232996E-66 == err : 1.147E-14 = rco : 6.127E-03 = res : 1.066E-14 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 1.42827180423885E+01 5.95261233868538E-02 z2 : 5.64673356266950E+00 -2.53906618978382E-02 z3 : -1.88404205582819E+00 1.85592350431432E-01 z4 : 1.00754688667224E+01 3.01161074959752E-03 z5 : 6.77123758722923E+00 -1.30390229276235E+00 z6 : 1.95910954648918E+00 4.97815484414425E-01 z7 : 4.77029659723320E+00 1.44976631718986E-02 z8 : 7.30022974416097E+00 -7.66813599256941E-01 z9 : -9.83913048059689E-03 6.11165427079187E-01 == err : 2.119E-14 = rco : 1.882E-02 = res : 1.456E-14 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 2.72650780838839E+00 3.53737464016668E-74 z2 : 2.58247618222550E+00 2.12242478410001E-73 z3 : 9.30672153014668E+00 7.07474928033337E-74 z4 : 7.40451399057121E+00 3.36050590815835E-73 z5 : 4.63684415828654E+00 -4.24484956820002E-73 z6 : 6.87858842457067E+00 -1.41494985606667E-73 z7 : 8.64577820574236E+00 1.34862408156355E-73 z8 : 1.01370067512966E+01 -5.30606196025003E-74 z9 : 7.33408222100292E+00 8.48969913640004E-73 == err : 1.185E-14 = rco : 2.493E-02 = res : 2.842E-14 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 2.44878816897203E+00 5.49462032769357E+00 z2 : 1.11472626376005E+01 5.49462032769357E+00 z3 : 7.59605080657258E+00 -5.49462032769357E+00 z4 : 7.76663986507604E+00 3.17261924577888E+00 z5 : 6.79190714458760E+00 3.17261924577888E+00 z6 : 8.55854700966364E+00 -3.17261924577888E+00 z7 : 9.81284205639903E+00 5.27747740458293E+00 z8 : 1.01853017465573E+01 5.27747740458293E+00 z9 : 1.39981438029563E+01 -5.27747740458292E+00 == err : 4.817E-14 = rco : 1.820E-02 = res : 6.551E-14 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 4.56300127145797E+00 5.26142187986853E-01 z2 : 7.23814180470698E+00 2.75144173790136E-01 z3 : 7.06593516262580E+00 -1.74848319865335E-01 z4 : 4.11719423003259E-01 -7.41014799845812E-01 z5 : 1.14127916231639E+01 -1.44975490673937E+00 z6 : 8.83372743870138E+00 9.22862003298056E-01 z7 : 2.55529290854252E+00 9.11037107334139E-01 z8 : 1.32475737948124E+01 6.41390386221998E-01 z9 : 1.45608951025532E+01 -3.65399699495471E-01 == err : 2.950E-14 = rco : 1.394E-02 = res : 1.785E-14 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 4.56300127145797E+00 -5.26142187986857E-01 z2 : 7.23814180470698E+00 -2.75144173790140E-01 z3 : 7.06593516262580E+00 1.74848319865338E-01 z4 : 4.11719423003255E-01 7.41014799845810E-01 z5 : 1.14127916231639E+01 1.44975490673937E+00 z6 : 8.83372743870138E+00 -9.22862003298057E-01 z7 : 2.55529290854251E+00 -9.11037107334140E-01 z8 : 1.32475737948124E+01 -6.41390386221997E-01 z9 : 1.45608951025532E+01 3.65399699495470E-01 == err : 2.945E-14 = rco : 1.394E-02 = res : 1.819E-14 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : -9.74738381556055E+01 2.80519127586352E+01 z2 : -4.22119935001375E+00 -1.18442293229972E+02 z3 : 7.27101841606437E+01 3.30444844457730E+01 z4 : 2.80662771511584E+01 7.96108728678589E+01 z5 : -8.86752602899019E+01 -3.40630181603043E+01 z6 : 6.70042291244596E+01 -8.14770351674493E+01 z7 : 5.86780359117837E+01 3.14330688865303E+01 z8 : -5.56098129440363E+01 6.07740312444804E+00 z9 : 2.29004585993005E+01 -8.48224708275845E+01 == err : 1.219E-11 = rco : 9.306E-05 = res : 3.750E-12 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : -9.74738381556090E+01 -2.80519127586386E+01 z2 : -4.22119935001655E+00 1.18442293229977E+02 z3 : 7.27101841606473E+01 -3.30444844457729E+01 z4 : 2.80662771511630E+01 -7.96108728678624E+01 z5 : -8.86752602899076E+01 3.40630181603015E+01 z6 : 6.70042291244596E+01 8.14770351674553E+01 z7 : 5.86780359117880E+01 -3.14330688865311E+01 z8 : -5.56098129440394E+01 -6.07740312445136E+00 z9 : 2.29004585992988E+01 8.48224708275891E+01 == err : 6.120E-12 = rco : 9.306E-05 = res : 2.728E-12 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 4.05869794098042E+00 -6.52820282520986E-66 z2 : 7.23545859015342E+00 -6.82493931726486E-66 z3 : 6.91950036533140E+00 5.71217747205863E-66 z4 : 3.46251850511909E+00 -2.96736492054994E-66 z5 : 1.28568252839609E+01 -1.75074530312446E-65 z6 : 6.70782473138215E+00 8.79081857712919E-66 z7 : 7.09141318451992E+00 -1.78041895232996E-66 z8 : 1.61924941088461E+01 -1.21661961742547E-65 z9 : 9.48351147460542E+00 2.67062842849494E-66 == err : 2.867E-14 = rco : 2.173E-02 = res : 3.730E-14 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 2.44878816897203E+00 -5.49462032769357E+00 z2 : 1.11472626376005E+01 -5.49462032769357E+00 z3 : 7.59605080657258E+00 5.49462032769357E+00 z4 : 7.76663986507603E+00 -3.17261924577888E+00 z5 : 6.79190714458760E+00 -3.17261924577888E+00 z6 : 8.55854700966364E+00 3.17261924577888E+00 z7 : 9.81284205639902E+00 -5.27747740458293E+00 z8 : 1.01853017465573E+01 -5.27747740458293E+00 z9 : 1.39981438029563E+01 5.27747740458292E+00 == err : 5.323E-14 = rco : 1.820E-02 = res : 4.936E-14 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 4.00000000000000E+00 2.26391976970668E-72 z2 : 1.39142060664159E-15 6.79175930912004E-72 z3 : 1.00000000000000E+01 3.39587965456002E-72 z4 : -6.87259849385174E-16 -5.51830443866003E-72 z5 : 4.00000000000000E+00 2.26391976970668E-72 z6 : 1.00000000000000E+01 1.13195988485334E-72 z7 : -1.08512558786259E-16 2.26391976970668E-72 z8 : 8.00000000000000E+00 4.52783953941336E-72 z9 : 1.40000000000000E+01 3.39587965456002E-72 == err : 2.469E-15 = rco : 6.814E-03 = res : 1.776E-14 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 5.40619599576520E+00 1.24614266441373E-01 z2 : 8.08133652901422E+00 3.75612280638087E-01 z3 : 6.22274043831857E+00 -4.75908134562888E-01 z4 : 2.41786368469274E+00 -1.33473967340968E+00 z5 : 1.34189358848534E+01 -6.25999566516127E-01 z6 : 6.82758317701188E+00 1.15289246995744E+00 z7 : 5.72731184134135E+00 3.67514354700267E-01 z8 : 1.64195927276112E+01 6.37161075812410E-01 z9 : 1.13888761697543E+01 -9.13151762538933E-01 == err : 4.745E-14 = rco : 8.597E-03 = res : 3.310E-14 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 5.14226049711212E+00 -4.10683305004111E-64 z2 : 8.31902114628513E+00 -4.89021738906630E-64 z3 : 5.83593780919970E+00 6.59941958330306E-64 z4 : 1.05483913332051E+00 -5.12760658271029E-64 z5 : 1.04491459121623E+01 1.39584845862669E-63 z6 : 9.11550410318073E+00 -3.79822709830392E-64 z7 : 1.89114930534616E+00 -1.85163571042316E-64 z8 : 1.09922302296724E+01 1.36024007958009E-63 z9 : 1.46837753537792E+01 4.17804980813431E-64 == err : 4.483E-14 = rco : 1.842E-02 = res : 3.153E-14 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : -3.88615154061168E+00 2.73491334327099E+00 z2 : 6.82310611376751E+00 -9.54048138361581E-01 z3 : 4.60388797528157E+00 7.28674103883895E+00 z4 : 8.58474610527329E+00 6.25484719099953E+00 z5 : 1.26823271616374E+01 -2.41643607011908E+00 z6 : 7.47354470972616E+00 -5.02423684271657E+00 z7 : -4.62879573014538E+00 2.31775103199829E+00 z8 : -6.25028239212810E+00 2.37763141835248E+00 z9 : 9.26862122188053E+00 1.65576973335091E+01 == err : 1.714E-14 = rco : 6.148E-03 = res : 9.244E-14 == solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : -1.85820813930416E+00 -1.53020119979985E-01 z2 : 6.32107948031340E+00 -1.53020119979984E-01 z3 : -1.53712865899076E+00 1.53020119979990E-01 z4 : -2.01282313175911E+01 2.25829925113547E+01 z5 : 3.87164456531032E+01 2.25829925113547E+01 z6 : 1.25882143355121E+01 -2.25829925113547E+01 z7 : -1.52304733137101E+01 9.46560962193051E+00 z8 : 2.02642052635291E+01 9.46560962193048E+00 z9 : -9.66268050180990E-01 -9.46560962193049E+00 == err : 5.506E-14 = rco : 3.441E-03 = res : 2.344E-13 == solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 1.00394769148579E+00 -1.64143627837773E-01 z2 : 5.73962625368213E+00 -6.75692367623593E-01 z3 : 6.83955975305397E+00 4.47126951478520E-01 z4 : 5.80260963589912E+00 2.79761381330475E-01 z5 : 8.57900270685898E+00 -1.32615246317194E+00 z6 : 8.09720043081136E+00 2.21904437283076E-01 z7 : 8.69613409933658E+00 -5.61108225590697E-02 z8 : 1.10561793237312E+01 -9.68408992296680E-01 z9 : 3.88622470975481E+00 2.01562197544236E-01 == err : 4.072E-14 = rco : 5.079E-03 = res : 2.843E-14 == solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 2.27963096219088E+01 -1.10341822703378E+02 z2 : 1.16048948427497E+02 3.61523832852386E+01 z3 : -4.75599636168687E+01 4.92454254989663E+01 z4 : 1.17141751993297E+02 5.07238704881854E+00 z5 : 4.00214552224955E-01 1.18746278076977E+02 z6 : -2.20712457176754E+01 -3.20622474922286E+00 z7 : 7.58995263328192E+01 5.01222263391852E+01 z8 : -3.83883225230080E+01 7.54778921012607E+01 z9 : 5.67896817826597E+00 3.26717560187468E+00 == err : 8.847E-12 = rco : 1.033E-04 = res : 3.750E-12 == solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 2.27963096219051E+01 1.10341822703373E+02 z2 : 1.16048948427492E+02 -3.61523832852338E+01 z3 : -4.75599636168649E+01 -4.92454254989650E+01 z4 : 1.17141751993290E+02 -5.07238704881292E+00 z5 : 4.00214552231019E-01 -1.18746278076970E+02 z6 : -2.20712457176743E+01 3.20622474922002E+00 z7 : 7.58995263328156E+01 -5.01222263391789E+01 z8 : -3.83883225230016E+01 -7.54778921012570E+01 z9 : 5.67896817826573E+00 -3.26717560187626E+00 == err : 5.320E-12 = rco : 1.033E-04 = res : 3.666E-12 == solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 9.35421211541959E+01 7.82046855687887E+01 z2 : -1.02747683363048E+02 7.82046855687708E+01 z3 : -1.52055622088295E+01 -7.82046855687831E+01 z4 : -7.06696973949763E+01 -4.97255418893492E+01 z5 : 4.52450503365109E+01 -4.97255418893227E+01 z6 : -3.14246470584973E+01 4.97255418893320E+01 z7 : -9.19351251778096E+01 -6.48290261982627E+01 z8 : 6.02377003873541E+01 -6.48290261982381E+01 z9 : -3.76974247904851E+01 6.48290261982461E+01 == err : 1.250E-11 = rco : 4.764E-05 = res : 5.476E-12 == solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 5.06793823007650E+00 -6.93831670122138E-01 z2 : 9.80361679227283E+00 -1.82282930336328E-01 z3 : 2.77556921446327E+00 4.10848346481397E-01 z4 : 5.61300169460129E+00 -1.12529172741348E+00 z5 : 8.38939476556115E+00 4.80622117088904E-01 z6 : 8.28680837210918E+00 6.23625908799939E-01 z7 : 2.11874162379462E+00 -7.61277185707573E-01 z8 : 4.47878684818920E+00 1.51020984030020E-01 z9 : 1.04636171852968E+01 6.15825810722410E-01 == err : 4.057E-14 = rco : 4.639E-03 = res : 1.424E-14 == solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 3.74038893513104E+00 1.60497382681799E-01 z2 : -4.89559554458797E+00 7.55805973971067E-02 z3 : 8.65828705142928E+00 8.46210911364882E-02 z4 : 4.15040426174744E+00 1.20214905503439E+00 z5 : 8.46172982254250E-01 -1.04764848477564E-01 z6 : 7.88417415146416E+00 -7.01321959870362E-01 z7 : 7.16719615983358E-01 9.23485238614725E-01 z8 : 3.24665276291112E+00 1.42173976185880E-01 z9 : 4.04373785076925E+00 -2.97822148363636E-01 == err : 3.352E-15 = rco : 1.608E-02 = res : 1.066E-14 == solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 1.42827180423885E+01 -5.95261233868534E-02 z2 : 5.64673356266950E+00 2.53906618978376E-02 z3 : -1.88404205582819E+00 -1.85592350431432E-01 z4 : 1.00754688667224E+01 -3.01161074959748E-03 z5 : 6.77123758722923E+00 1.30390229276235E+00 z6 : 1.95910954648918E+00 -4.97815484414426E-01 z7 : 4.77029659723320E+00 -1.44976631718978E-02 z8 : 7.30022974416097E+00 7.66813599256944E-01 z9 : -9.83913048059608E-03 -6.11165427079189E-01 == err : 2.129E-14 = rco : 1.882E-02 = res : 1.422E-14 == solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 1.89849119294416E+01 8.26845033136603E+00 z2 : -1.17929232046803E+01 8.26845033136606E+00 z3 : 1.19198872476124E+00 -8.26845033136604E+00 z4 : 7.07665887419976E+00 -3.11998546261923E-01 z5 : -1.35758185386441E+00 -3.11998546261923E-01 z6 : -2.80922979664661E-01 3.11998546261934E-01 z7 : -2.94418734554868E+00 -6.60105188896252E+00 z8 : 3.52927467025313E+00 -6.60105188896253E+00 z9 : -5.41491267529555E+00 6.60105188896253E+00 == err : 5.834E-14 = rco : 2.141E-03 = res : 5.859E-14 == solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : -3.68469508248855E+00 1.03023078230454E+01 z2 : 1.67108491564690E+01 1.03023078230454E+01 z3 : 7.02615407398044E+00 -1.03023078230454E+01 z4 : -1.83667011110283E-01 8.29282378138198E+00 z5 : 1.85469966608636E+01 8.29282378138196E+00 z6 : 1.23633296497533E+01 -8.29282378138197E+00 z7 : 6.47926249974246E+00 4.89281831998273E+00 z8 : 1.54254925121538E+01 4.89281831998271E+00 z9 : 1.59047550118963E+01 -4.89281831998273E+00 == err : 5.993E-14 = rco : 4.038E-03 = res : 8.556E-14 == solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 1.89849119294416E+01 -8.26845033136605E+00 z2 : -1.17929232046804E+01 -8.26845033136606E+00 z3 : 1.19198872476125E+00 8.26845033136605E+00 z4 : 7.07665887419975E+00 3.11998546261924E-01 z5 : -1.35758185386441E+00 3.11998546261925E-01 z6 : -2.80922979664663E-01 -3.11998546261929E-01 z7 : -2.94418734554869E+00 6.60105188896253E+00 z8 : 3.52927467025313E+00 6.60105188896253E+00 z9 : -5.41491267529555E+00 -6.60105188896253E+00 == err : 6.450E-14 = rco : 2.141E-03 = res : 5.550E-14 == solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 50 the solution for t : z1 : -1.85820813930416E+00 1.53020119979985E-01 z2 : 6.32107948031340E+00 1.53020119979983E-01 z3 : -1.53712865899076E+00 -1.53020119979990E-01 z4 : -2.01282313175911E+01 -2.25829925113547E+01 z5 : 3.87164456531032E+01 -2.25829925113547E+01 z6 : 1.25882143355121E+01 2.25829925113547E+01 z7 : -1.52304733137101E+01 -9.46560962193051E+00 z8 : 2.02642052635291E+01 -9.46560962193048E+00 z9 : -9.66268050180990E-01 9.46560962193050E+00 == err : 6.154E-14 = rco : 3.441E-03 = res : 1.511E-13 == solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 1.61040212584557E+01 4.44940404124784E+00 z2 : -2.78764310386565E+00 4.44940404124784E+00 z3 : 7.31637815459007E+00 -4.44940404124784E+00 z4 : 1.20915883240045E+01 7.32387045771528E+00 z5 : -4.82111997017385E+00 7.32387045771527E+00 z6 : 1.27046835383069E+00 -7.32387045771528E+00 z7 : 7.55774927314689E+00 -1.37789246452863E+00 z8 : 8.13056649366298E+00 -1.37789246452863E+00 z9 : 9.68831576680987E+00 1.37789246452863E+00 == err : 4.442E-14 = rco : 8.943E-03 = res : 6.355E-14 == solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 1.50584193190672E+01 3.91736605659084E-74 z2 : 4.64906565953849E+00 -5.49951213588414E-74 z3 : -5.75524050974581E-01 4.42171830020836E-74 z4 : 9.99099713599525E+00 3.59264611891929E-75 z5 : 5.19399485668053E+00 -2.04504471384636E-74 z6 : 1.87891775697534E+00 -3.23338150702736E-74 z7 : 6.65817048530504E+00 7.73800702536462E-74 z8 : 9.56615953320869E+00 1.23808112405834E-73 z9 : 5.46085225196318E-01 -1.54760140507292E-74 == err : 8.886E-15 = rco : 1.511E-02 = res : 2.132E-14 == solution 33 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 5.06793823007650E+00 6.93831670122143E-01 z2 : 9.80361679227283E+00 1.82282930336329E-01 z3 : 2.77556921446327E+00 -4.10848346481400E-01 z4 : 5.61300169460129E+00 1.12529172741349E+00 z5 : 8.38939476556115E+00 -4.80622117088908E-01 z6 : 8.28680837210918E+00 -6.23625908799944E-01 z7 : 2.11874162379463E+00 7.61277185707578E-01 z8 : 4.47878684818921E+00 -1.51020984030021E-01 z9 : 1.04636171852968E+01 -6.15825810722414E-01 == err : 3.509E-14 = rco : 4.639E-03 = res : 2.493E-14 == solution 34 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 9.39166616807691E+00 -3.75846055517710E-74 z2 : 9.24763454191403E+00 4.42171830020836E-75 z3 : 2.64156317045815E+00 5.96931970528128E-74 z4 : 7.96266750771316E+00 -3.31628872515627E-74 z5 : 5.19499767542849E+00 -2.21085915010418E-74 z6 : 6.32043490742872E+00 3.53737464016668E-74 z7 : 5.01330971505166E+00 6.63257745031253E-75 z8 : 6.50453826060591E+00 3.09520281014585E-74 z9 : 1.09665507116936E+01 1.06121239205001E-73 == err : 1.683E-14 = rco : 2.406E-02 = res : 2.487E-14 == solution 35 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : -3.88615154061169E+00 -2.73491334327099E+00 z2 : 6.82310611376751E+00 9.54048138361583E-01 z3 : 4.60388797528157E+00 -7.28674103883895E+00 z4 : 8.58474610527328E+00 -6.25484719099953E+00 z5 : 1.26823271616374E+01 2.41643607011908E+00 z6 : 7.47354470972617E+00 5.02423684271657E+00 z7 : -4.62879573014538E+00 -2.31775103199829E+00 z8 : -6.25028239212811E+00 -2.37763141835247E+00 z9 : 9.26862122188052E+00 -1.65576973335091E+01 == err : 2.244E-14 = rco : 6.148E-03 = res : 4.780E-14 == solution 36 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 5.40619599576520E+00 -1.24614266441372E-01 z2 : 8.08133652901422E+00 -3.75612280638086E-01 z3 : 6.22274043831857E+00 4.75908134562887E-01 z4 : 2.41786368469274E+00 1.33473967340968E+00 z5 : 1.34189358848534E+01 6.25999566516127E-01 z6 : 6.82758317701188E+00 -1.15289246995744E+00 z7 : 5.72731184134135E+00 -3.67514354700267E-01 z8 : 1.64195927276112E+01 -6.37161075812410E-01 z9 : 1.13888761697543E+01 9.13151762538933E-01 == err : 4.777E-14 = rco : 8.597E-03 = res : 3.243E-14 == solution 37 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 1.22513739413881E+00 6.40549723255735E+00 z2 : 1.19343950485180E+01 2.71653575092478E+00 z3 : -5.07400959468927E-01 3.61615714955258E+00 z4 : 3.38906040048360E+00 3.46415215268184E-01 z5 : 7.48664145684772E+00 -8.32486804585042E+00 z6 : 1.26692304145158E+01 8.84195133014779E-01 z7 : 1.28030038326239E+01 1.02259609541039E+01 z8 : 1.11815171706412E+01 1.02858413404580E+01 z9 : -8.16317834088881E+00 8.64948741140354E+00 == err : 6.251E-14 = rco : 6.935E-03 = res : 5.684E-14 == solution 38 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 3.74038893513104E+00 -1.60497382681799E-01 z2 : -4.89559554458797E+00 -7.55805973971068E-02 z3 : 8.65828705142928E+00 -8.46210911364883E-02 z4 : 4.15040426174744E+00 -1.20214905503439E+00 z5 : 8.46172982254251E-01 1.04764848477564E-01 z6 : 7.88417415146416E+00 7.01321959870362E-01 z7 : 7.16719615983358E-01 -9.23485238614726E-01 z8 : 3.24665276291112E+00 -1.42173976185880E-01 z9 : 4.04373785076925E+00 2.97822148363636E-01 == err : 4.208E-15 = rco : 1.608E-02 = res : 2.487E-14 == solution 39 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 1.22513739413881E+00 -6.40549723255735E+00 z2 : 1.19343950485180E+01 -2.71653575092478E+00 z3 : -5.07400959468928E-01 -3.61615714955258E+00 z4 : 3.38906040048360E+00 -3.46415215268184E-01 z5 : 7.48664145684773E+00 8.32486804585042E+00 z6 : 1.26692304145158E+01 -8.84195133014780E-01 z7 : 1.28030038326239E+01 -1.02259609541039E+01 z8 : 1.11815171706412E+01 -1.02858413404580E+01 z9 : -8.16317834088882E+00 -8.64948741140353E+00 == err : 6.672E-14 = rco : 6.935E-03 = res : 6.395E-14 == solution 40 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : 1.00394769148579E+00 1.64143627837772E-01 z2 : 5.73962625368212E+00 6.75692367623589E-01 z3 : 6.83955975305398E+00 -4.47126951478517E-01 z4 : 5.80260963589912E+00 -2.79761381330474E-01 z5 : 8.57900270685898E+00 1.32615246317193E+00 z6 : 8.09720043081136E+00 -2.21904437283074E-01 z7 : 8.69613409933658E+00 5.61108225590697E-02 z8 : 1.10561793237312E+01 9.68408992296674E-01 z9 : 3.88622470975481E+00 -2.01562197544235E-01 == err : 4.106E-14 = rco : 5.079E-03 = res : 2.845E-14 == SHAR_EOF fi # end of overwriting check if test -f 'ku10' then echo shar: will not over-write existing file "'ku10'" else cat << "SHAR_EOF" > 'ku10' 10 5*x1*x2+ 5*x1+ 3*x2+ 55; 7*x2*x3+ 9*x2+ 9*x3+ 19; 3*x3*x4+ 6*x3+ 5*x4-4; 6*x4*x5+ 6*x4+ 7*x5+ 118; x5*x6+ 3*x5+ 9*x6+ 27; 6*x6*x7+ 7*x6+x7+ 72; 9*x7*x8+ 7*x7+x8+ 35; 4*x8*x9+ 4*x8+ 6*x9+ 16; 8*x9*x10+ 4*x9+ 3*x10-51; 3*x1*x10-6*x1+x10+ 5; TITLE : 10-dimensional system of Ku ROOT COUNTS : total degree : 1024 10-homogeneous Bezout number : 2 with partition : {x1 }{x2 }{x3 }{x4 }{x5 }{x6 }{x7 }{x8 }{x9 }{x10 } generalized Bezout number : 2 based on the set structure : {x1 }{x2 } {x2 }{x3 } {x3 }{x4 } {x4 }{x5 } {x5 }{x6 } {x6 }{x7 } {x7 }{x8 } {x8 }{x9 } {x9 }{x10 } {x1 }{x10 } mixed volume : 2 REFERENCES : M.C. Steenkamp : `Die numeriese oplos van stelsels polinoomvergelykings'. Technical report, Nasionale Navorsingsinstituut vir Wiskundige Wetenskappe, Pretoria, 1982. NOTE : This system was known as an easy system for elimination, but difficult for homotopy continuation. With multi-homogenization, this is also an easy system for homotopy continuation methods. THE SOLUTIONS : 2 10 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.00000000000000E+00 -2.67276471009220E-51 x2 : -5.00000000000000E+00 -5.34552942018439E-51 x3 : -1.00000000000000E+00 -4.17619485951906E-52 x4 : 5.00000000000000E+00 4.00914706513829E-51 x5 : -4.00000000000000E+00 2.00457353256915E-51 x6 : -3.00000000000000E+00 4.17619485951906E-53 x7 : 3.00000000000000E+00 8.35238971903811E-53 x8 : -2.00000000000000E+00 2.08809742975953E-53 x9 : 4.00000000000000E+00 3.34095588761525E-52 x10 : 1.00000000000000E+00 -1.67047794380762E-52 == err : 3.762E-35 = rco : 6.097E-03 = res : 1.604E-50 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 7.73143904674611E+00 -6.81046792009123E-57 x2 : -2.24828375286041E+00 -9.75768795568627E-58 x3 : -1.83222958057395E-01 -1.11516433779272E-57 x4 : 1.14583333333333E+00 2.34981056892037E-57 x5 : -9.00000000000000E+00 7.16891360009604E-57 x6 : -3.32551987064446E+00 -1.54330778890956E-58 x7 : 2.57062493671946E+00 -1.24460305557223E-58 x8 : -2.19569105036795E+00 -1.19481893334934E-58 x9 : 2.59354917484962E+00 -1.99136488891557E-59 x10 : 1.71067585997878E+00 -9.95682444457783E-59 == err : 4.749E-15 = rco : 3.440E-03 = res : 1.421E-14 == SHAR_EOF fi # end of overwriting check if test -f 'lorentz' then echo shar: will not over-write existing file "'lorentz'" else cat << "SHAR_EOF" > 'lorentz' 4 x1*x2-x1*x3-x4+ 1; x2*x3-x2*x4-x1+ 1; -x1*x3+x3*x4-x2+ 1; x1*x4-x2*x4-x3+ 1; TITLE : equilibrium points of a 4-dimensional Lorentz attractor ROOT COUNTS : total degree : 16 2-homogeneous Bezout number : 14 with partition : {x1 x2 }{x3 x4 } generalized Bezout number : 12 based on the set structure : {x1 x4 }{x2 x3 } {x1 x2 }{x3 x4 } {x1 x2 x4 }{x3 } {x1 x2 x3 }{x4 } mixed volume : 12 REFERENCES : Tien-Yien Li : "Solving polynomial systems", The Mathematical Intelligencer 9(3):33-39, 1987. THE SOLUTIONS : 11 4 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.09016994374947E-01 9.51056516295154E-01 x2 : -8.09016994374948E-01 5.87785252292473E-01 x3 : 3.09016994374947E-01 -9.51056516295154E-01 x4 : -8.09016994374948E-01 -5.87785252292473E-01 == err : 1.021E-15 = rco : 3.839E-02 = res : 2.483E-16 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.00000000000000E+00 0.00000000000000E+00 x2 : 1.00000000000000E+00 -3.82342058671789E-57 x3 : 1.00000000000000E+00 -1.91171029335894E-57 x4 : 1.00000000000000E+00 -1.27447352890596E-57 == err : 1.291E-41 = rco : 3.375E-01 = res : 5.735E-57 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.00000000000000E+00 1.00000000000000E+00 x2 : -5.12631296267255E-17 -1.00000000000000E+00 x3 : -1.00000000000000E+00 -1.00000000000000E+00 x4 : -4.55035905491173E-17 1.00000000000000E+00 == err : 0.000E+00 = rco : 4.454E-02 = res : 0.000E+00 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.81709374138875E-17 -1.00000000000000E+00 x2 : -1.00000000000000E+00 -1.00000000000000E+00 x3 : 2.38907385022240E-17 1.00000000000000E+00 x4 : -1.00000000000000E+00 1.00000000000000E+00 == err : 3.349E-17 = rco : 3.811E-02 = res : 4.206E-17 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.09016994374947E-01 -9.51056516295154E-01 x2 : -8.09016994374948E-01 -5.87785252292473E-01 x3 : 3.09016994374947E-01 9.51056516295154E-01 x4 : -8.09016994374948E-01 5.87785252292473E-01 == err : 6.687E-16 = rco : 3.839E-02 = res : 2.483E-16 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.71463975042395E-17 1.00000000000000E+00 x2 : -1.00000000000000E+00 1.00000000000000E+00 x3 : -3.44326771178718E-17 -1.00000000000000E+00 x4 : -1.00000000000000E+00 -1.00000000000000E+00 == err : 2.177E-16 = rco : 3.811E-02 = res : 4.578E-16 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 0.00000000000000E+00 0.00000000000000E+00 x2 : 1.00000000000000E+00 0.00000000000000E+00 x3 : -6.48149604096329E-18 0.00000000000000E+00 x4 : 1.00000000000000E+00 0.00000000000000E+00 == err : 1.148E-41 = rco : 3.333E-01 = res : 0.000E+00 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -8.09016994374948E-01 -5.87785252292473E-01 x2 : 3.09016994374948E-01 9.51056516295154E-01 x3 : -8.09016994374947E-01 5.87785252292473E-01 x4 : 3.09016994374947E-01 -9.51056516295153E-01 == err : 9.148E-16 = rco : 3.574E-02 = res : 2.220E-16 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -8.09016994374948E-01 5.87785252292473E-01 x2 : 3.09016994374947E-01 -9.51056516295154E-01 x3 : -8.09016994374947E-01 -5.87785252292473E-01 x4 : 3.09016994374947E-01 9.51056516295153E-01 == err : 6.454E-16 = rco : 3.574E-02 = res : 2.483E-16 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.00000000000000E+00 6.96997109758186E-61 x2 : 5.84394251940559E-17 6.42673050142134E-61 x3 : 1.00000000000000E+00 -1.24460305557223E-60 x4 : -9.69173609317895E-18 6.22301527786114E-61 == err : 9.692E-18 = rco : 2.000E-01 = res : 1.110E-16 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.00000000000000E+00 -1.00000000000000E+00 x2 : -2.25656724857668E-17 1.00000000000000E+00 x3 : -1.00000000000000E+00 1.00000000000000E+00 x4 : -5.35036568346616E-17 -1.00000000000000E+00 == err : 0.000E+00 = rco : 4.454E-02 = res : 0.000E+00 == SHAR_EOF fi # end of overwriting check if test -f 'lumped' then echo shar: will not over-write existing file "'lumped'" else cat << "SHAR_EOF" > 'lumped' 4 ( 7.67718790000000E-01 + 3.28202780000000E-01*i)*x1*x3 +( 7.67718790000000E-01 + 3.28202780000000E-01*i)*x1*x4 +(-1.76771879000000E+00 - 3.28202780000000E-01*i)*x1 +( 5.48909490000000E-01 + 1.09394900000000E-01*i)*x3 +( 4.79608000000000E-02 + 8.88686780000000E-01*i); ( 3.30100210000000E-01 + 8.90584170000000E-01*i)*x2*x3 +( 3.30100210000000E-01 + 8.90584170000000E-01*i)*x2*x4 +(-1.33010021000000E+00 - 8.90584170000000E-01*i)*x2 +( 1.11290920000000E-01 + 6.71774920000000E-01*i)*x4 +( 8.29151510000000E-01 + 6.69877470000000E-01*i); (-7.67718790000000E-01 - 3.28202780000000E-01*i)*x1*x3 +(-7.67718790000000E-01 - 3.28202780000000E-01*i)*x1*x4 +(-8.92481630000000E-01 - 4.52965620000000E-01*i)*x3*x4 +( 7.67718790000000E-01 + 3.28202780000000E-01*i)*x1 +(-5.48909490000000E-01 - 1.09394900000000E-01*i)*x3; (-3.30100210000000E-01 - 8.90584170000000E-01*i)*x2*x3 +(-3.30100210000000E-01 - 8.90584170000000E-01*i)*x2*x4 +(-8.92481630000000E-01 - 4.52965620000000E-01*i)*x3*x4 +( 3.30100210000000E-01 + 8.90584170000000E-01*i)*x2 +(-1.11290920000000E-01 - 6.71774920000000E-01*i)*x4; TITLE : lumped-parameter chemically reacting system ROOT COUNTS : total degree : 16 4-homogeneous Bezout number : 8 with partition : {x1 }{x3 }{x4 }{x2 } generalized Bezout number : 11 based on the set structure : {x1 }{x3 x4 } {x3 x4 }{x2 } {x1 x4 }{x3 x4 } {x3 x2 }{x4 x2 } mixed volume : 7 REFERENCES : T.Y. Li and X. Wang: `Solving deficient polynomial systems with homotopies which keep the subschemes at infinity invariant' Math. Comp., 56(194):693--710, 1991. THE SOLUTIONS : 4 4 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -7.31946270990745E-01 3.45282894413807E-01 x3 : 2.96125742484022E+00 7.79531334186353E+00 x4 : 5.47960966576759E-02 -9.98459435938367E-02 x2 : 4.92444390092549E-02 1.26473584413808E-01 == err : 7.155E-14 = rco : 8.372E-04 = res : 9.155E-16 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.90824374327220E-01 -8.04191545444130E-01 x3 : 1.65730911752914E+00 -1.60704603265004E+00 x4 : -5.65236181483837E-01 5.91969194503908E-01 x2 : 1.67201508432722E+00 -1.02300085544413E+00 == err : 3.505E-15 = rco : 1.976E-02 = res : 1.256E-15 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.21409313579331E+00 1.07437202505838E+00 x3 : 6.87353439387281E-01 -1.02860646625644E+00 x4 : 1.66607991847987E+00 7.64394178351801E-01 x2 : -1.43290242579331E+00 8.55562715058377E-01 == err : 5.643E-15 = rco : 5.514E-02 = res : 1.780E-15 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.33734859250612E-02 7.50365995187170E-01 x3 : 1.02702785627962E-01 2.78773736114270E-01 x4 : 4.60230559530168E-01 -6.94768664549850E-02 x2 : 8.24564195925061E-01 5.31556685187170E-01 == err : 4.856E-16 = rco : 6.703E-02 = res : 1.495E-16 == SHAR_EOF fi # end of overwriting check if test -f 'mickey' then echo shar: will not over-write existing file "'mickey'" else cat << "SHAR_EOF" > 'mickey' 2 x**2 + 4*y**2 - 4; 2*y**2 - x; TITLE : Mickey-mouse example to illustrate homotopy continuation. ROOT COUNTS : total degree : 4 1-homogeneous Bezout number : 4 with partition : {x y } generalized Bezout number : 4 based on the set structure : {x y }{x y } {x y }{y } mixed volume : 4 REFERENCES : The equations represent the intersection of a circle with a parabola. Jan Verschelde and Ronald Cools: "Polynomial Homotopy Continuation, A Portable Ada Software Package". The Ada-Belgium Newsletter, 4:59--83, 1996. Proceedings of the 1996 Ada-Belgium Seminar, 22 November 1996, Eurocontrol, Brussels, Belgium. THE SOLUTIONS : 4 2 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -3.23606797749979E+00 0.00000000000000E+00 y : 0.00000000000000E+00 -1.27201964951407E+00 == err : 1.174E-15 = rco : 1.079E-01 = res : 0.000E+00 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -3.23606797749979E+00 0.00000000000000E+00 y : 0.00000000000000E+00 1.27201964951407E+00 == err : 1.174E-15 = rco : 1.079E-01 = res : 0.000E+00 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.23606797749979E+00 0.00000000000000E+00 y : -7.86151377757423E-01 -9.95682444457783E-60 == err : 3.476E-16 = rco : 1.998E-01 = res : 4.441E-16 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.23606797749979E+00 0.00000000000000E+00 y : 7.86151377757423E-01 9.95682444457783E-60 == err : 3.476E-16 = rco : 1.998E-01 = res : 4.441E-16 == SHAR_EOF fi # end of overwriting check if test -f 'noon3' then echo shar: will not over-write existing file "'noon3'" else cat << "SHAR_EOF" > 'noon3' 3 x1*x2^2 + x1*x3^2 - 1.1*x1 + 1; x2*x1^2 + x2*x3^2 - 1.1*x2 + 1; x3*x1^2 + x3*x2^2 - 1.1*x3 + 1; TITLE : A neural network modeled by an adaptive Lotka-Volterra system, n=3 ROOT COUNTS : total degree : 27 generalized Bezout bound : 21 set structure: {x1} {x2 x3} {x2 x3} {x2} {x1 x3} {x1 x3} {x3} {x1 x2} {x1 x2} mixed volume : 21 REFERENCES : Karin Gatermann: "Symbolic solution of polynomial equation systems with symmetry", Proceedings of ISSAC-90, pp 112-119, ACM New York, 1990. V. W. Noonburg: "A neural network modeled by an adaptive Lotka-Volterra system", SIAM J. Appl. Math., Vol. 49, No. 6, 1779-1792, 1989. Jan Verschelde and Ann Haegemans: `The GBQ-Algorithm for constructing start systems of homotopies for polynomial systems, SIAM J. Numer. Anal., Vol. 30, No. 2, pp 583-594, 1993. NOTE : The coefficients have been chosen so that full permutation symmetry was obtained. The parameter c = 1.1. The orbits of solutions : 3 4 1 3*(a,a,a) 4*(a,a,b) and 1*(a,b,c) THE GENERATING SOLUTIONS : 8 3 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.09959548065397E-01 4.79766841277292E-01 x2 : 5.09959548065397E-01 4.79766841277292E-01 x3 : 5.09959548065397E-01 4.79766841277292E-01 == err : 5.911E-16 = rco : 2.745E-01 = res : 2.493E-16 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.35560902253960E+00 -1.28703758201580E-17 x2 : -6.77804511269800E-01 -5.27500584353303E-01 x3 : -6.77804511269800E-01 5.27500584353303E-01 == err : 7.955E-16 = rco : 2.529E-01 = res : 4.003E-16 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.44383120980212E-01 -3.01427302521399E-61 x2 : -1.29427788609688E+00 1.65298843318187E-61 x3 : -1.29427788609688E+00 1.65298843318187E-61 == err : 2.849E-15 = rco : 2.583E-01 = res : 3.886E-16 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.98653694263692E-01 3.48820047576431E-01 x2 : -1.65123467890611E-01 7.61734168646636E-01 x3 : 8.98653694263692E-01 3.48820047576431E-01 == err : 3.699E-16 = rco : 2.949E-01 = res : 1.665E-16 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.09959548065397E-01 -4.79766841277292E-01 x2 : 5.09959548065397E-01 -4.79766841277292E-01 x3 : 5.09959548065397E-01 -4.79766841277292E-01 == err : 5.242E-16 = rco : 2.745E-01 = res : 5.662E-17 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -5.03029502430507E-01 -2.11770212163837E-55 x2 : -5.03029502430507E-01 1.95759134039956E-54 x3 : 1.68372096585234E+00 -1.95759134039956E-54 == err : 1.716E-15 = rco : 3.764E-01 = res : 3.331E-16 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.65123467890611E-01 -7.61734168646636E-01 x2 : 8.98653694263692E-01 -3.48820047576431E-01 x3 : 8.98653694263692E-01 -3.48820047576431E-01 == err : 3.702E-16 = rco : 2.761E-01 = res : 2.791E-16 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.01991909613079E+00 -9.49556774575980E-66 x2 : -1.01991909613079E+00 -7.59645419660784E-65 x3 : -1.01991909613079E+00 -4.74778387287990E-65 == err : 3.234E-15 = rco : 2.070E-01 = res : 6.661E-16 == SHAR_EOF fi # end of overwriting check if test -f 'noon4' then echo shar: will not over-write existing file "'noon4'" else cat << "SHAR_EOF" > 'noon4' 4 x1*x2^2 + x1*x3^2 + x1*x4^2 - 1.1*x1 + 1; x2*x1^2 + x2*x3^2 + x2*x4^2 - 1.1*x2 + 1; x3*x1^2 + x3*x2^2 + x3*x4^2 - 1.1*x3 + 1; x4*x1^2 + x4*x2^2 + x4*x3^2 - 1.1*x4 + 1; TITLE : A neural network modeled by an adaptive Lotka-Volterra system, n=4 ROOT COUNTS : total degree : 81 generalized Bezout bound : 73 with symmetric supporting set structure: {x1 }{x2 x3 x4}{x2 x3 x4} {x2 }{x1 x3 x4}{x1 x3 x4} {x3 }{x1 x2 x4}{x1 x2 x4} {x4 }{x1 x2 x3}{x1 x2 x3} mixed volume : 73 REFERENCES : Karin Gatermann: "Symbolic solution of polynomial equation systems with symmetry", Proceedings of ISSAC-90, pp 112-119, ACM New York, 1990. V. W. Noonburg: "A neural network modeled by an adaptive Lotka-Volterra system", SIAM J. Appl. Math (1988). SYMMETRY : The coefficients have been chosen so that full permutation symmetry was obtained. The parameter c = 1.1. ------------------------------------------------ | orbit information of list of solutions | ------------------------------------------------ | TYPE | NB <> | NB GEN | NB SOLS | ------------------------------------------------ | 1 2 2 2 | 2 | 4 | 16 | | 1 1 2 3 | 3 | 3 | 36 | | 1 1 2 2 | 2 | 3 | 18 | | 1 1 1 1 | 1 | 3 | 3 | ------------------------------------------------ | Total number of generating solutions : 13 | | Total number of solutions generated : 73 | ------------------------------------------------ THE GENERATING SOLUTIONS : 13 4 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.33372590962199E-01 -4.43586227384486E-01 x2 : 4.33372590962199E-01 -4.43586227384486E-01 x3 : 4.33372590962199E-01 -4.43586227384486E-01 x4 : 4.33372590962199E-01 -4.43586227384486E-01 == err : 4.169E-16 = rco : 2.776E-01 = res : 3.608E-16 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.01991909613079E+00 6.06272901205497E-17 x2 : 1.01991909613079E+00 6.06272901205497E-17 x3 : -5.09959548065397E-01 -8.48770395714556E-01 x4 : -5.09959548065397E-01 8.48770395714556E-01 == err : 3.103E-15 = rco : 3.389E-01 = res : 2.269E-16 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.14773924418920E-01 -6.26558193923668E-01 x2 : -2.14773924418920E-01 -6.26558193923668E-01 x3 : 1.06192282524925E+00 -3.99591785628118E-01 x4 : 1.06192282524925E+00 -3.99591785628118E-01 == err : 3.638E-15 = rco : 2.138E-01 = res : 2.831E-16 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.90152757143433E-01 2.95549546086774E-64 x2 : -1.20414504451724E+00 -1.37685732313517E-64 x3 : -4.90152757143432E-01 4.36796116304951E-64 x4 : -1.20414504451724E+00 -4.55787251796470E-64 == err : 4.082E-15 = rco : 1.132E-01 = res : 3.331E-16 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -6.72576917532508E-01 -3.25008188747211E-48 x2 : -9.28586522969462E-01 1.36845553156720E-48 x3 : -9.28586522969462E-01 5.98699295060652E-49 x4 : -9.28586522969462E-01 9.62195295633190E-49 == err : 2.778E-16 = rco : 6.393E-02 = res : 2.220E-16 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.35061583139308E+00 1.50901402336195E-01 x2 : -5.09959548065397E-01 4.79766841277292E-01 x3 : -5.09959548065397E-01 4.79766841277292E-01 x4 : -8.40656283327683E-01 -6.30668243613487E-01 == err : 9.546E-16 = rco : 1.640E-01 = res : 2.220E-16 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.35061583139308E+00 -1.50901402336195E-01 x2 : -8.40656283327683E-01 6.30668243613487E-01 x3 : -5.09959548065397E-01 -4.79766841277292E-01 x4 : -5.09959548065397E-01 -4.79766841277292E-01 == err : 1.027E-15 = rco : 2.148E-01 = res : 4.965E-16 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -9.17395351588499E-02 -1.00626933473987E+00 x2 : 6.75139752372438E-01 -2.43302218087769E-01 x3 : 6.75139752372438E-01 -2.43302218087769E-01 x4 : 6.75139752372438E-01 -2.43302218087769E-01 == err : 1.124E-15 = rco : 2.482E-01 = res : 3.377E-16 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -8.66745181924397E-01 -3.26265223399926E-53 x2 : -8.66745181924398E-01 -3.91518268079912E-54 x3 : -8.66745181924397E-01 -3.91518268079912E-53 x4 : -8.66745181924398E-01 7.96087145095820E-53 == err : 5.989E-16 = rco : 6.026E-02 = res : 3.331E-16 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.75139752372438E-01 2.43302218087769E-01 x2 : 6.75139752372438E-01 2.43302218087769E-01 x3 : 6.75139752372438E-01 2.43302218087769E-01 x4 : -9.17395351588496E-02 1.00626933473987E+00 == err : 1.026E-15 = rco : 1.762E-01 = res : 5.495E-16 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.06192282524925E+00 3.99591785628118E-01 x2 : 1.06192282524925E+00 3.99591785628118E-01 x3 : -2.14773924418920E-01 6.26558193923668E-01 x4 : -2.14773924418919E-01 6.26558193923668E-01 == err : 3.602E-15 = rco : 2.457E-01 = res : 3.331E-16 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.76514689694112E+00 -8.92131470234173E-57 x2 : -4.21692981775415E-01 5.22534146851444E-56 x3 : -4.21692981775415E-01 -2.35777602847603E-56 x4 : -4.21692981775415E-01 -1.68867742580040E-56 == err : 3.707E-15 = rco : 4.190E-01 = res : 2.220E-16 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.33372590962199E-01 4.43586227384486E-01 x2 : 4.33372590962199E-01 4.43586227384486E-01 x3 : 4.33372590962199E-01 4.43586227384486E-01 x4 : 4.33372590962199E-01 4.43586227384486E-01 == err : 4.169E-16 = rco : 2.776E-01 = res : 3.608E-16 == SHAR_EOF fi # end of overwriting check if test -f 'noon5' then echo shar: will not over-write existing file "'noon5'" else cat << "SHAR_EOF" > 'noon5' 5 x1*x2^2 + x1*x3^2 + x1*x4^2 + x1*x5^2 - 1.1*x1 + 1; x2*x1^2 + x2*x3^2 + x2*x4^2 + x2*x5^2 - 1.1*x2 + 1; x3*x1^2 + x3*x2^2 + x3*x4^2 + x3*x5^2 - 1.1*x3 + 1; x4*x1^2 + x4*x2^2 + x4*x3^2 + x4*x5^2 - 1.1*x4 + 1; x5*x1^2 + x5*x2^2 + x5*x3^2 + x5*x4^2 - 1.1*x5 + 1; TITLE : A neural network modeled by an adaptive Lotka-Volterra system, n=5 ROOT COUNTS : total degree : 243 generalized Bezout bound : 233 with symmetric supporting set structure : {x1 }{x2 x3 x4 x5}{x2 x3 x4 x5} {x2 }{x1 x3 x4 x5}{x1 x3 x4 x5} {x3 }{x1 x2 x4 x5}{x1 x2 x4 x5} {x4 }{x1 x2 x3 x5}{x1 x2 x3 x5} {x5 }{x1 x2 x3 x4}{x1 x2 x3 x4} mixed volume : 233 REFERENCES : V. W. Noonburg: "A neural network modeled by an adaptive Lotka-Volterra system", SIAM J. Appl. Math (1988). SYMMETRY : The coefficients have been chosen so that full permutation symmetry was obtained. The parameter c = 1.1. ------------------------------------------------ | orbit information of list of solutions | ------------------------------------------------ | TYPE | NB <> | NB GEN | NB SOLS | ------------------------------------------------ | 1 2 2 2 2 | 2 | 4 | 20 | | 1 1 2 2 3 | 3 | 3 | 90 | | 1 1 1 2 3 | 3 | 3 | 60 | | 1 1 1 2 2 | 2 | 6 | 60 | | 1 1 1 1 1 | 1 | 3 | 3 | ------------------------------------------------ | Total number of generating solutions : 19 | | Total number of generated solutions : 233 | ------------------------------------------------ THE GENERATING SOLUTIONS : 19 5 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -7.73451118106700E-01 -1.41476362957624E-60 x2 : -7.73451118106701E-01 8.07047293847617E-61 x3 : -7.73451118106701E-01 -7.92462101790130E-61 x4 : -7.73451118106701E-01 1.95502345203899E-60 x5 : -7.73451118106703E-01 -4.47279223096270E-61 == err : 2.934E-15 = rco : 1.588E-02 = res : 4.996E-16 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.33372590962199E-01 -4.43586227384486E-01 x2 : -4.33372590962199E-01 -4.43586227384486E-01 x3 : -4.33372590962199E-01 -4.43586227384486E-01 x4 : -9.38352927500085E-01 6.79487362807545E-01 x5 : 1.37172551846228E+00 -2.35901135423059E-01 == err : 3.197E-15 = rco : 2.574E-01 = res : 5.796E-16 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.19537481589068E-01 -5.53617661717944E-01 x2 : -2.19537481589068E-01 -5.53617661717944E-01 x3 : -2.19537481589068E-01 -5.53617661717944E-01 x4 : 1.14746568550757E+00 -4.45985472207374E-01 x5 : 1.14746568550757E+00 -4.45985472207374E-01 == err : 5.944E-16 = rco : 2.034E-01 = res : 2.789E-16 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -6.46857457740524E-01 -7.70636640956298E-02 x2 : -6.46857457740524E-01 -7.70636640956299E-02 x3 : -9.53749557893902E-01 9.98677038789894E-02 x4 : -6.46857457740524E-01 -7.70636640956298E-02 x5 : -9.53749557893902E-01 9.98677038789892E-02 == err : 7.504E-16 = rco : 1.595E-02 = res : 2.797E-16 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -9.53749557893902E-01 -9.98677038789892E-02 x2 : -9.53749557893902E-01 -9.98677038789891E-02 x3 : -6.46857457740523E-01 7.70636640956296E-02 x4 : -6.46857457740524E-01 7.70636640956298E-02 x5 : -6.46857457740524E-01 7.70636640956298E-02 == err : 1.948E-15 = rco : 1.537E-02 = res : 2.317E-16 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -6.51984348487134E-01 -5.84641757363990E-01 x2 : -6.51984348487134E-01 -5.84641757363990E-01 x3 : -6.51984348487134E-01 5.84641757363990E-01 x4 : -6.51984348487134E-01 5.84641757363990E-01 x5 : 1.30396869697427E+00 1.41230388317418E-17 == err : 2.338E-15 = rco : 2.030E-01 = res : 3.608E-16 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.37859037787807E-01 7.28681768047407E-01 x2 : -4.37859037787807E-01 7.28681768047407E-01 x3 : -6.51984348487134E-01 -8.51616563963253E-01 x4 : 1.08984338627494E+00 1.22934795915846E-01 x5 : 1.08984338627494E+00 1.22934795915846E-01 == err : 9.285E-16 = rco : 2.656E-01 = res : 2.483E-16 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.93716127613667E-01 -8.24599937545298E-01 x2 : -1.93716127613667E-01 -8.24599937545298E-01 x3 : 8.66394939329591E-01 -2.82542286504236E-01 x4 : 8.66394939329591E-01 -2.82542286504236E-01 x5 : 8.66394939329591E-01 -2.82542286504236E-01 == err : 8.110E-16 = rco : 2.710E-01 = res : 3.140E-16 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.84962665540328E-02 1.15839619891421E+00 x2 : 5.65907615444606E-01 1.90347351502924E-01 x3 : 5.65907615444606E-01 1.90347351502924E-01 x4 : 5.65907615444606E-01 1.90347351502924E-01 x5 : 5.65907615444606E-01 1.90347351502924E-01 == err : 2.069E-15 = rco : 2.499E-01 = res : 5.579E-16 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -9.38352927500085E-01 -6.79487362807545E-01 x2 : -4.33372590962199E-01 4.43586227384486E-01 x3 : -4.33372590962199E-01 4.43586227384486E-01 x4 : -4.33372590962199E-01 4.43586227384486E-01 x5 : 1.37172551846228E+00 2.35901135423059E-01 == err : 3.174E-15 = rco : 1.676E-01 = res : 6.845E-16 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -6.51984348487134E-01 8.51616563963253E-01 x2 : -4.37859037787807E-01 -7.28681768047407E-01 x3 : -4.37859037787807E-01 -7.28681768047407E-01 x4 : 1.08984338627494E+00 -1.22934795915846E-01 x5 : 1.08984338627494E+00 -1.22934795915846E-01 == err : 9.384E-16 = rco : 2.440E-01 = res : 4.827E-16 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.33372590962199E-01 9.82817291550256E-01 x2 : -4.33372590962199E-01 -9.82817291550256E-01 x3 : 8.66745181924397E-01 -2.56088381459571E-17 x4 : 8.66745181924397E-01 -2.01882508032343E-17 x5 : 8.66745181924397E-01 -2.79407198488834E-17 == err : 4.410E-16 = rco : 2.711E-01 = res : 4.578E-16 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.84962665540328E-02 -1.15839619891421E+00 x2 : 5.65907615444606E-01 -1.90347351502924E-01 x3 : 5.65907615444606E-01 -1.90347351502924E-01 x4 : 5.65907615444606E-01 -1.90347351502924E-01 x5 : 5.65907615444606E-01 -1.90347351502924E-01 == err : 2.069E-15 = rco : 2.499E-01 = res : 5.579E-16 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.86725559053351E-01 4.16737296237545E-01 x2 : 3.86725559053351E-01 4.16737296237545E-01 x3 : 3.86725559053351E-01 4.16737296237546E-01 x4 : 3.86725559053351E-01 4.16737296237546E-01 x5 : 3.86725559053351E-01 4.16737296237545E-01 == err : 6.656E-16 = rco : 2.491E-01 = res : 1.241E-16 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.72527361916890E-01 -1.23442380694877E-64 x2 : -3.72527361916890E-01 -1.30594905149215E-65 x3 : -3.72527361916890E-01 1.61424651677917E-64 x4 : -3.72527361916890E-01 1.09199029076238E-64 x5 : 1.83522115087550E+00 -3.56083790465992E-65 == err : 1.546E-15 = rco : 2.298E-01 = res : 1.110E-16 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.19537481589068E-01 5.53617661717944E-01 x2 : -2.19537481589068E-01 5.53617661717944E-01 x3 : -2.19537481589068E-01 5.53617661717944E-01 x4 : 1.14746568550757E+00 4.45985472207374E-01 x5 : 1.14746568550757E+00 4.45985472207374E-01 == err : 5.944E-16 = rco : 2.034E-01 = res : 2.789E-16 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.93716127613667E-01 8.24599937545298E-01 x2 : -1.93716127613667E-01 8.24599937545298E-01 x3 : 8.66394939329591E-01 2.82542286504236E-01 x4 : 8.66394939329591E-01 2.82542286504236E-01 x5 : 8.66394939329591E-01 2.82542286504236E-01 == err : 6.073E-16 = rco : 2.710E-01 = res : 4.003E-16 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -8.29137708676524E-01 6.11747293874862E-56 x2 : -7.59287868972322E-01 -1.21074985246066E-56 x3 : -7.59287868972323E-01 -1.35094194064032E-55 x4 : -7.59287868972323E-01 8.53897264366995E-56 x5 : -7.59287868972322E-01 -3.82342058671789E-57 == err : 6.973E-16 = rco : 1.310E-02 = res : 2.220E-16 == solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.86725559053351E-01 -4.16737296237545E-01 x2 : 3.86725559053351E-01 -4.16737296237546E-01 x3 : 3.86725559053351E-01 -4.16737296237546E-01 x4 : 3.86725559053351E-01 -4.16737296237545E-01 x5 : 3.86725559053351E-01 -4.16737296237545E-01 == err : 6.692E-16 = rco : 2.491E-01 = res : 2.172E-16 == SHAR_EOF fi # end of overwriting check if test -f 'proddeco' then echo shar: will not over-write existing file "'proddeco'" else cat << "SHAR_EOF" > 'proddeco' 4 64.632945216*z1**2*z4**2 + 55.661869232*z1**2*z4 - 129.265890432*z1*z2*z3*z4 - 55.661869232*z1*z2*z3 + 12.201006656*z1*z2*z4 + 48.21149907*z1*z3*z4 + 50.7965557025*z1*z3 + 71.3989540236*z1*z4**2 + 62.3536335897*z1*z4 + 64.632945216*z2**2*z3**2 - 12.201006656*z2**2*z3 - 48.21149907*z2*z3**2 - 71.3989540236*z2*z3*z4 + 9.14136787*z2*z3 + 17.5403018476*z2*z4; 81.3704061375*z1**2*z4**2 + 55.3637563425*z1**2*z4 - 162.740812275*z1*z2*z3*z4 - 55.3637563425*z1*z2*z3 + 25.032598875*z1*z2*z4 + 21.781944477*z1*z3*z4 + 24.7967262078*z1*z3 + 55.073652285*z1*z4**2 + 41.688210899*z1*z4 + 81.3704061375*z2**2*z3**2 - 25.032598875*z2**2*z3 - 21.781944477*z2*z3**2 - 55.073652285*z2*z3*z4 + 9.56199577*z2*z3 + 20.93013785*z2*z4; 35.2817031945*z1**2*z4**2 + 42.2584220358*z1**2*z4 - 70.563406389*z1*z2*z3*z4 - 42.2584220358*z1*z2*z3 + 23.8847040258*z1*z2*z4 + 8.0797827915*z1*z3*z4 + 13.5030253426*z1*z3 + 23.1780987025*z1*z4**2 + 37.033791391*z1*z4 + 35.2817031945*z2**2*z3**2 - 23.8847040258*z2**2*z3 - 8.0797827915*z2*z3**2 - 23.1780987025*z2*z3*z4 + 10.3467518726*z2*z3 + 16.946539941*z2*z4; 6.8993630265*z1**2*z4**2 + 43.1035038882*z1**2*z4 - 13.798726053*z1*z2*z3*z4 - 43.1035038882*z1*z2*z3 + 56.0575143198*z1*z2*z4 + 2.379925759*z1*z3*z4 + 16.2879242092*z1*z3 + 6.40051015*z1*z4**2 + 42.97692982*z1*z4 + 6.8993630265*z2**2*z3**2 - 56.0575143198*z2**2*z3 - 2.379925759*z2*z3**2 - 6.40051015*z2*z3*z4 + 22.5597322388*z2*z3 + 55.41365098*z2*z4; TITLE : system with a product-decomposition structure ROOT COUNTS : total degree : 256 m-homogeneous Bezout number : 96 mixed volume : 26 REFERENCES : Alexander P. Morgan, Andrew J. Sommese, Charles W. Wampler: `A product-decomposition theorem for bounding Bezout numbers' SIAM J. Numer. Anal. 32(4): 1308-1325, 1995. THE SOLUTIONS : 6 4 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : -1.01091142205921E-01 -6.84531680564726E-59 z4 : -4.74122152571664E-02 -9.95682444457783E-59 z2 : 6.27771477054241E-02 4.26276546533488E-59 z3 : -1.44165272179869E+00 -2.19050137780712E-58 == err : 1.825E-15 = rco : 1.385E-03 = res : 8.882E-16 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : -3.03289953393234E-01 6.22301527786114E-61 z4 : -7.42879674456421E-01 3.36042825004502E-59 z2 : -2.19563588664023E-01 -6.22301527786114E-61 z3 : 8.42940459412650E-01 -5.60071375007503E-59 == err : 4.416E-16 = rco : 2.648E-02 = res : 4.108E-15 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : -1.14783020054975E+00 1.20477575779392E-57 z4 : -2.97812331674776E-01 5.80604040383833E-58 z2 : 8.17778764925687E-01 1.49352366668667E-57 z3 : -1.16651145338396E-01 -1.07035862779212E-58 == err : 3.302E-15 = rco : 1.348E-01 = res : 7.105E-15 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : -8.04608647260215E-01 -3.67048376324917E-55 z4 : -6.18580514127412E-01 -3.67048376324917E-55 z2 : -3.15552092702469E-01 -8.15663058499816E-56 z3 : 1.70911502744779E-01 3.05873646937431E-56 == err : 6.942E-16 = rco : 2.912E-02 = res : 3.775E-15 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : -2.93357641309663E-01 2.04192688804819E-61 z4 : -8.25956886486124E+00 8.55664600705907E-61 z2 : -1.62789599222105E-01 -1.36128459203212E-61 z3 : 7.43907364531493E+00 -2.72256918406425E-61 == err : 5.848E-15 = rco : 6.511E-04 = res : 2.274E-13 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : z1 : -8.99679355223739E-02 -9.45898322234894E-58 z4 : 2.51255419352984E-02 4.18186626672269E-58 z2 : 6.94221243640974E-01 5.41651249785034E-57 z3 : 7.82620441959484E-02 1.07533704001441E-57 == err : 9.797E-16 = rco : 6.577E-03 = res : 2.359E-16 == SHAR_EOF fi # end of overwriting check if test -f 'puma' then echo shar: will not over-write existing file "'puma'" else cat << "SHAR_EOF" > 'puma' 8 x1^2 + x2^2 - 1; x3^2 + x4^2 - 1; x5^2 + x6^2 - 1; x7^2 + x8^2 - 1; 0.004731*x1*x3 - 0.3578*x2*x3 - 0.1238*x1 - 0.001637*x2 - 0.9338*x4 + x7 - 0.3571; 0.2238*x1*x3 + 0.7623*x2*x3 + 0.2638*x1 - 0.07745*x2 -0.6734*x4 -0.6022; x6*x8 + 0.3578*x1 + 0.004731*x2; -0.7623*x1 + 0.2238*x2 + 0.3461; TITLE : hand position and orientation of PUMA robot ROOT COUNTS : total degree : 128 3-homogeneous Bezout number : 16 with partition {{x1 x2 }{x3 x4 x7 x8 }{x5 x6 }} mixed volume : 16 REFERENCES : A. Morgan and V. Shapiro. `Box-Bisection for solving second-degree systems and the problem of clustering', ACM Transactions on Mathematical Software, Vol. 13, No. 2, pp. 152-167, 1987. NOTE : The system can be easily reduced to a lower dimensional one, by eliminating x1 or x2 by the last equation. It is not a hard problem to solve, but a very good test example for algorithms that verify whether the mixed volume is zero or not. Every fine mixed subdivision will have only one mixed cell. More precisely, there are 6336 different configurations, which all yield a mixed cell with mixed volume 16. THE SOLUTIONS : 16 8 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.64431665854327E-01 8.56002160304148E-55 x2 : -9.86388476850967E-01 2.61012178719941E-54 x3 : 2.39616017204621E-01 5.94496235550677E-54 x4 : -9.70867737799024E-01 1.46725258920162E-54 x5 : 9.97635398227387E-01 2.66040587238087E-52 x6 : 6.87285399501796E-02 -3.86173644000454E-51 x7 : -6.15508407155080E-01 0.00000000000000E+00 x8 : -7.88130319630844E-01 -4.42836640644059E-50 == err : 5.847E-16 = rco : 1.742E-01 = res : 1.631E-16 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.64431665854327E-01 8.56002160304148E-55 x2 : -9.86388476850967E-01 2.61012178719941E-54 x3 : 2.39616017204621E-01 5.94496235550677E-54 x4 : -9.70867737799024E-01 1.46725258920162E-54 x5 : -9.97635398227387E-01 -8.57311908487996E-50 x6 : -6.87285399501796E-02 2.56585412168851E-49 x7 : -6.15508407155080E-01 0.00000000000000E+00 x8 : 7.88130319630844E-01 -2.10522022959584E-49 == err : 5.847E-16 = rco : 2.040E-01 = res : 1.631E-16 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.64431665854327E-01 8.56002160304148E-55 x2 : -9.86388476850967E-01 2.61012178719941E-54 x3 : 2.39616017204621E-01 5.94496235550677E-54 x4 : -9.70867737799024E-01 1.46725258920162E-54 x5 : -9.97635398227387E-01 -2.66040587238087E-52 x6 : 6.87285399501796E-02 -3.86173644000454E-51 x7 : -6.15508407155080E-01 0.00000000000000E+00 x8 : -7.88130319630844E-01 -4.42836640644059E-50 == err : 5.847E-16 = rco : 2.040E-01 = res : 1.631E-16 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.64431665854327E-01 8.56002160304148E-55 x2 : -9.86388476850967E-01 2.61012178719941E-54 x3 : 2.39616017204621E-01 5.94496235550677E-54 x4 : -9.70867737799024E-01 1.46725258920162E-54 x5 : 9.97635398227387E-01 8.57311908487996E-50 x6 : -6.87285399501796E-02 2.56585412168851E-49 x7 : -6.15508407155080E-01 0.00000000000000E+00 x8 : 7.88130319630844E-01 -2.10522022959584E-49 == err : 5.847E-16 = rco : 1.742E-01 = res : 1.631E-16 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.64431665854327E-01 0.00000000000000E+00 x2 : -9.86388476850967E-01 2.51345585423244E-88 x3 : -9.54728434485888E-01 4.11804607157442E-83 x4 : 2.97478766274377E-01 0.00000000000000E+00 x5 : 9.11154796098708E-01 7.46761833343337E-60 x6 : -4.12064239586890E-01 3.48488855560224E-59 x7 : 9.91322415106624E-01 3.89318277576152E-64 x8 : 1.31452916693283E-01 3.69491532123005E-61 == err : 5.116E-15 = rco : 9.651E-03 = res : 1.110E-16 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.64431665854327E-01 0.00000000000000E+00 x2 : -9.86388476850967E-01 2.51345585423244E-88 x3 : -9.54728434485888E-01 4.11804607157442E-83 x4 : 2.97478766274377E-01 0.00000000000000E+00 x5 : -9.11154796098708E-01 -7.46761833343337E-60 x6 : 4.12064239586890E-01 -3.48488855560224E-59 x7 : 9.91322415106624E-01 3.89318277576152E-64 x8 : -1.31452916693283E-01 -3.69491532123005E-61 == err : 5.116E-15 = rco : 9.729E-03 = res : 1.110E-16 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.64431665854327E-01 0.00000000000000E+00 x2 : -9.86388476850967E-01 2.51345585423244E-88 x3 : -9.54728434485888E-01 4.11804607157442E-83 x4 : 2.97478766274377E-01 0.00000000000000E+00 x5 : -9.11154796098708E-01 -7.46761833343337E-60 x6 : -4.12064239586890E-01 3.48488855560224E-59 x7 : 9.91322415106624E-01 3.89318277576152E-64 x8 : 1.31452916693283E-01 3.69491532123005E-61 == err : 5.116E-15 = rco : 9.729E-03 = res : 1.110E-16 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.64431665854327E-01 0.00000000000000E+00 x2 : -9.86388476850967E-01 2.51345585423244E-88 x3 : -9.54728434485888E-01 4.11804607157442E-83 x4 : 2.97478766274377E-01 0.00000000000000E+00 x5 : 9.11154796098708E-01 7.46761833343337E-60 x6 : 4.12064239586890E-01 -3.48488855560224E-59 x7 : 9.91322415106624E-01 3.89318277576152E-64 x8 : -1.31452916693283E-01 -3.69491532123005E-61 == err : 5.116E-15 = rco : 9.651E-03 = res : 1.110E-16 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.71554261818887E-01 2.08809742975953E-53 x2 : 7.40955378840649E-01 2.50571691571143E-52 x3 : -2.39611659195710E-01 2.77934733962389E-52 x4 : -9.70868813371549E-01 0.00000000000000E+00 x5 : -9.57917101877785E-01 -1.04404871487976E-53 x6 : -2.87044989383310E-01 4.17619485951906E-53 x7 : -5.27909026365623E-01 8.35238971903811E-53 x8 : 8.49300924220444E-01 8.35238971903811E-53 == err : 5.564E-16 = rco : 1.733E-01 = res : 1.110E-16 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.71554261818887E-01 2.08809742975953E-53 x2 : 7.40955378840649E-01 2.50571691571143E-52 x3 : -2.39611659195710E-01 2.50571691571143E-52 x4 : -9.70868813371549E-01 -8.35238971903811E-53 x5 : 9.57917101877785E-01 6.26429228927858E-53 x6 : 2.87044989383310E-01 -2.08809742975953E-52 x7 : -5.27909026365623E-01 0.00000000000000E+00 x8 : -8.49300924220444E-01 -8.35238971903811E-53 == err : 5.564E-16 = rco : 1.667E-01 = res : 1.110E-16 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.71554261818887E-01 2.08809742975953E-53 x2 : 7.40955378840649E-01 2.50571691571143E-52 x3 : -2.39611659195710E-01 2.77934733962389E-52 x4 : -9.70868813371549E-01 0.00000000000000E+00 x5 : 9.57917101877785E-01 1.04404871487976E-53 x6 : -2.87044989383310E-01 4.17619485951906E-53 x7 : -5.27909026365623E-01 8.35238971903811E-53 x8 : 8.49300924220444E-01 8.35238971903811E-53 == err : 5.564E-16 = rco : 1.667E-01 = res : 1.110E-16 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.71554261818887E-01 2.08809742975953E-53 x2 : 7.40955378840649E-01 2.50571691571143E-52 x3 : -2.39611659195710E-01 2.50571691571143E-52 x4 : -9.70868813371549E-01 -8.35238971903811E-53 x5 : -9.57917101877785E-01 -6.26429228927858E-53 x6 : 2.87044989383310E-01 -2.08809742975953E-52 x7 : -5.27909026365623E-01 0.00000000000000E+00 x8 : -8.49300924220444E-01 -8.35238971903811E-53 == err : 5.564E-16 = rco : 1.733E-01 = res : 1.110E-16 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.71554261818887E-01 2.10843958864610E-81 x2 : 7.40955378840649E-01 -6.32531876593832E-81 x3 : 9.54729769791417E-01 -1.76673203694632E-80 x4 : 2.97474480710579E-01 3.37350334183377E-80 x5 : -1.28778236227690E-01 2.59425224673324E-49 x6 : 9.91673416944351E-01 -5.54759771060745E-71 x7 : 9.69311807770115E-01 2.26391976970668E-72 x8 : -2.45834536461890E-01 -1.37524217994990E-71 == err : 5.075E-14 = rco : 3.169E-03 = res : 1.110E-16 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.71554261818887E-01 2.10843958864610E-81 x2 : 7.40955378840649E-01 -6.32531876593832E-81 x3 : 9.54729769791417E-01 -1.76673203694632E-80 x4 : 2.97474480710579E-01 3.37350334183377E-80 x5 : 1.28778236227690E-01 -2.59425224673324E-49 x6 : -9.91673416944351E-01 5.54759771060745E-71 x7 : 9.69311807770115E-01 2.26391976970668E-72 x8 : 2.45834536461890E-01 1.37524217994990E-71 == err : 5.075E-14 = rco : 3.187E-03 = res : 1.110E-16 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.71554261818887E-01 2.10843958864610E-81 x2 : 7.40955378840649E-01 -6.32531876593832E-81 x3 : 9.54729769791417E-01 -1.76673203694632E-80 x4 : 2.97474480710579E-01 3.37350334183377E-80 x5 : 1.28778236227690E-01 -2.59425224673324E-49 x6 : 9.91673416944351E-01 -5.54759771060745E-71 x7 : 9.69311807770115E-01 2.26391976970668E-72 x8 : -2.45834536461890E-01 -1.37524217994990E-71 == err : 5.075E-14 = rco : 3.187E-03 = res : 1.110E-16 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.71554261818887E-01 2.10843958864610E-81 x2 : 7.40955378840649E-01 -6.32531876593832E-81 x3 : 9.54729769791417E-01 -1.76673203694632E-80 x4 : 2.97474480710579E-01 3.37350334183377E-80 x5 : -1.28778236227690E-01 2.59425224673324E-49 x6 : -9.91673416944351E-01 5.54759771060745E-71 x7 : 9.69311807770115E-01 2.26391976970668E-72 x8 : 2.45834536461890E-01 1.37524217994990E-71 == err : 5.075E-14 = rco : 3.169E-03 = res : 1.110E-16 == SHAR_EOF fi # end of overwriting check if test -f 'quadfor2' then echo shar: will not over-write existing file "'quadfor2'" else cat << "SHAR_EOF" > 'quadfor2' 4 w1 + w2 - 1; w1*x1 + w2*x2; w1*x1**2 + w2*x2**2 - 2/3; w1*x1**3 + w2*x2**3; TITLE : Gaussian quadrature formula with 2 knots and 2 weights over [-1,+1]. ROOT COUNTS : total degree : 24 2-homogeneous Bezout number : 11 with partition : {{w1 w2 }{x1 x2 }} mixed volume : 4 REFERENCE : Jan Verschelde and Karin Gatermann: `Symmetric Newton Polytopes for Solving Sparse Polynomial Systems', Adv. Appl. Math., 16(1): 95-127, 1995. THE GENERATING SOLUTIONS : 1 4 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : w1 : 5.00000000000000E-01 0.00000000000000E+00 w2 : 5.00000000000000E-01 0.00000000000000E+00 x1 : 8.16496580927726E-01 0.00000000000000E+00 x2 : -8.16496580927726E-01 0.00000000000000E+00 == err : 0.000E+00 = rco : 1.249E-01 = res : 0.000E+00 == SHAR_EOF fi # end of overwriting check if test -f 'quadgrid' then echo shar: will not over-write existing file "'quadgrid'" else cat << "SHAR_EOF" > 'quadgrid' 5 w0 + w1 + w2 + w3 - 1; w0*b + w1*b + w2*b + w3*b + 1/2*w1 + w2 + 3/2*w3 - 0.63397459621556; w0*b**2 + w1*b**2 + w2*b**2 + w3*b**2 + w1*b + 2*w2*b + 3*w3*b + 1/4*w1 + w2 + 9/2*w3 - 0.40192378864668; w0*b**3 + w1*b**3 + w2*b**3 + w3*b**3 + 3/2*w1*b**2 + 3*w2*b**2 + 9/2 *w3*b**2 + 3/4*w1*b + 3*w2*b + 27/4*w3*b + 1/8*w1 + w2 + 27/8*w3 - 0.13109155679036; w0*b**4 + w1*b**4 + w2*b**4 + w3*b**4 + 2 * w1*b**3 + 4*w2*b**3 + 6 * w3*b**3 + 3/2* w1*b**2 + 6*w2*b**2 + 27/2* w3*b**2 + 1/2* w1*b + 4*w2*b + 27/2* w3*b + 1/16*w1 + w2 + 81/16*w3 + 0.30219332850656; TITLE : interpolating quadrature formula for function defined on a grid ROOT COUNTS : total degree : 120 2-homogeneous Bezout number : 10 with partition : {w0 w1 w2 w3 }{b } mixed volume : 10 REFERENCES : Wim Sweldens: `The construction and application of wavelets in numerical analysis', PhD thesis, K.U.Leuven, 1994. NOTES : The general formulation of this problem is the following: 3 --- i \ / j \ p = / w * | b + --- | - M = 0, voor i=0,..,4 i --- j \ 2 / i j=0 with M the moments of the quadrature formula i Note that this system is ill-conditioned. There are 4 complex and one real solution. THE SOLUTIONS : 5 5 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : w0 : 5.94320041132405E-01 6.47823742644204E-01 w1 : 6.34228524314905E-01 -7.69412003529916E-01 w2 : -2.31596317854069E-01 1.14738693809794E-01 w3 : 3.04775240675963E-03 6.84956707591845E-03 b : 5.43885023302037E-01 2.59692957341287E-01 == err : 4.823E-15 = rco : 2.192E-03 = res : 2.001E-16 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : w0 : -1.22978831272261E-01 -3.86449758136510E-01 w1 : -8.01703471950447E-01 1.30788622257006E+00 w2 : 1.67456028270032E+00 -7.66032187835804E-01 w3 : 2.50122020522384E-01 -1.55404276597748E-01 b : -1.01491698129312E+00 3.45195491447395E-01 == err : 7.626E-15 = rco : 3.397E-02 = res : 1.413E-15 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : w0 : 6.99788728057480E+00 -1.21348797918292E-59 w1 : -1.53314387602986E+01 2.30251565280862E-59 w2 : 1.05990704810461E+01 -1.33794828474015E-59 w3 : -1.26551900132224E+00 2.33363072919793E-60 b : -4.01098002697833E-01 -1.65298843318187E-61 == err : 7.602E-14 = rco : 1.345E-03 = res : 1.221E-15 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : w0 : 5.94320041132405E-01 -6.47823742644204E-01 w1 : 6.34228524314905E-01 7.69412003529917E-01 w2 : -2.31596317854069E-01 -1.14738693809794E-01 w3 : 3.04775240675961E-03 -6.84956707591844E-03 b : 5.43885023302037E-01 -2.59692957341287E-01 == err : 3.581E-15 = rco : 2.192E-03 = res : 4.175E-16 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : w0 : -1.22978831272260E-01 3.86449758136511E-01 w1 : -8.01703471950450E-01 -1.30788622257006E+00 w2 : 1.67456028270033E+00 7.66032187835804E-01 w3 : 2.50122020522384E-01 1.55404276597748E-01 b : -1.01491698129312E+00 -3.45195491447395E-01 == err : 7.020E-15 = rco : 3.397E-02 = res : 2.201E-15 == SHAR_EOF fi # end of overwriting check if test -f 'rabmo' then echo shar: will not over-write existing file "'rabmo'" else cat << "SHAR_EOF" > 'rabmo' 9 x1 + x3 + x5 + 2*x7 - 1; x1*x2 + x3*x4 + 2*x5*x6 + 2*x7*x8 + 2*x7*x9 - 2/3; x1*x2^2 + x3*x4^2 + 2*x5*x6^2 + 2*x7*x8^2 + 2*x7*x9^2 - 2/5; x1*x2^3 + x3*x4^3 + 2*x5*x6^3 + 2*x7*x8^3 + 2*x7*x9^3 - 2/7; x1*x2^4 + x3*x4^4 + 2*x5*x6^4 + 2*x7*x8^4 + 2*x7*x9^4 - 2/9; x5*x6^2 + 2*x7*x8*x9 - 1/9; x5*x6^4 + 2*x7*x8^2*x9^2 - 1/25; x5*x6^3 + x7*x8*x9^2 + x7*x8^2*x9 - 1/15; x5*x6^4 + x7*x8*x9^3 + x7*x8^3*x9 - 1/21; TITLE : optimal multi-dimensional quadrature formulas ROOT COUNTS : total degree : 36,000 4-homogeneous Bezout number : 22,740 with partition : {{x1 x3 }{x5 x7 }{x2 x4 }{x6 x8 x9 }} Set structure analysis : the generalized Bezout number : 7,090 The set structure : {x1 x3 x5 x7 } {x1 x3 x5 x7 }{x2 x4 x6 x8 x9 } {x1 x3 x5 x7 }{x2 x4 x6 x8 x9 }{x2 x4 x6 x8 x9 } {x1 x3 x5 x7 }{x2 x4 x6 x8 x9 }{x2 x4 x6 x8 x9 }{x2 x4 x6 x8 x9 } {x1 x3 x5 x7 }{x2 x4 x6 x8 x9 }{x2 x4 x6 x8 x9 }{x2 x4 x6 x8 x9 }{x2 x4 x6 x8 x9 } {x5 x7 }{x6 x8 }{x6 x9 } {x5 x7 }{x6 x8 }{x6 x8 }{x6 x9 }{x6 x9 } {x5 x7 }{x6 x8 }{x6 x8 x9 }{x6 x9 } {x5 x7 }{x6 x8 }{x6 x8 x9 }{x6 x8 x9 }{x6 x9 } mixed volume : 136 REFERENCES : The system has been given by Rabinowitz (1977), and appears in the derivation of optimal multi-dimensional quadrature formulas. Ramon E. Moore: `Methods and applications of interval analysis', chapter 6, page 64, SIAM Philadelphia, 1979. Sandie T. Jones: `Locating safe starting regions for iterative methods: a heuristic algorithm', in Interval Mathematics 1980, pages 377-386, Academic Press 1980, Editor Karl L.E. Nickel, Proceedings of an International Symposium on Interval Mathematics, May 27-31, 1980. THE SOLUTIONS : 16 9 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.90052939160734E-01 -1.36498786345297E-65 x3 : 1.84758425074899E-02 -7.41841230137484E-66 x5 : 8.30951780264823E-02 2.96736492054994E-66 x7 : 2.54188020152647E-01 9.19883125370481E-66 x2 : 2.04098888634611E-01 -8.60535826959482E-66 x4 : 1.25714721355817E+00 1.37685732313517E-64 x6 : 7.95395389473177E-01 -6.52820282520986E-66 x8 : 1.69433845109034E-01 -5.34125685698989E-66 x9 : 6.79629376104577E-01 1.78041895232996E-66 == err : 7.687E-16 = rco : 3.747E-04 = res : 5.551E-17 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.72881639647540E-01 5.53793027399353E-03 x3 : 1.03967523027174E-01 5.53811822782991E-02 x5 : 4.17809813948082E-01 -5.13485523015876E-02 x7 : 1.02670511688602E-01 -4.78528012535252E-03 x2 : 7.24743971081928E-01 -3.83952929482356E-03 x4 : -1.87149444062415E-02 8.79806031776077E-02 x6 : 2.26077500792937E-01 2.71122017311246E-02 x8 : 4.84886923426993E-01 3.68985361557209E-03 x9 : 8.97538072447382E-01 9.53733463716465E-03 == err : 1.460E-15 = rco : 1.207E-04 = res : 1.121E-16 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.84758425074895E-02 1.12667136827130E-66 x3 : 3.90052939160733E-01 1.40949833726122E-66 x5 : 8.30951780264824E-02 -1.27967612198716E-66 x7 : 2.54188020152648E-01 -6.12019014863425E-67 x2 : 1.25714721355818E+00 -5.22998067246926E-66 x4 : 2.04098888634610E-01 6.12019014863425E-67 x6 : 7.95395389473177E-01 1.84533005996699E-66 x8 : 6.79629376104577E-01 3.57011092003664E-67 x9 : 1.69433845109033E-01 2.35534590568651E-66 == err : 5.274E-15 = rco : 3.736E-04 = res : 4.510E-17 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 7.16134247098115E-02 2.29228940112483E-65 x3 : 4.54090352551545E-01 2.03264497057671E-65 x5 : 4.27846154667776E-02 -1.75074530312446E-65 x7 : 2.15755803635933E-01 -1.28709453428854E-65 x2 : 9.69318641299284E-01 -7.89319068866283E-65 x4 : 2.39009856217790E-01 5.76781556431894E-66 x6 : 8.82786687592638E-01 6.52820282520986E-65 x8 : 2.57431190464460E-01 4.64021689450996E-65 x9 : 7.00084168001749E-01 1.40949833726122E-65 == err : 2.381E-15 = rco : 3.996E-04 = res : 9.714E-17 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.90052939160734E-01 -1.43705844756772E-74 x3 : 1.84758425074899E-02 1.83501309458647E-73 x5 : 8.30951780264823E-02 -1.24913541980886E-73 x7 : 2.54188020152647E-01 -2.21085915010418E-74 x2 : 2.04098888634611E-01 -6.41149153530212E-74 x4 : 1.25714721355817E+00 3.89111210418335E-72 x6 : 7.95395389473177E-01 2.52037943111876E-73 x8 : 6.79629376104577E-01 -7.18529223783858E-74 x9 : 1.69433845109034E-01 1.74657872858230E-73 == err : 6.353E-16 = rco : 3.747E-04 = res : 8.327E-17 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 7.16134247098114E-02 -2.36561929061147E-73 x3 : 4.54090352551546E-01 -1.12532730740303E-72 x5 : 4.27846154667778E-02 -1.28229830706042E-73 x7 : 2.15755803635932E-01 7.45059533585108E-73 x2 : 9.69318641299285E-01 2.17548540370251E-72 x4 : 2.39009856217790E-01 -5.92510252227920E-73 x6 : 8.82786687592637E-01 6.36727435230003E-73 x8 : 7.00084168001750E-01 -3.00124129626642E-73 x9 : 2.57431190464460E-01 -5.04075886223753E-73 == err : 6.408E-15 = rco : 4.043E-04 = res : 2.776E-17 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.84758425074899E-02 5.98220767982867E-64 x3 : 3.90052939160734E-01 1.03501688428782E-63 x5 : 8.30951780264823E-02 -1.08249472301662E-63 x7 : 2.54188020152647E-01 -2.56380329135515E-64 x2 : 1.25714721355817E+00 -1.14250671116982E-61 x4 : 2.04098888634611E-01 7.54304162803794E-64 x6 : 7.95395389473177E-01 1.80415787169436E-63 x8 : 1.69433845109034E-01 1.42433516186397E-63 x9 : 6.79629376104577E-01 -1.51929083932157E-64 == err : 4.344E-16 = rco : 3.736E-04 = res : 3.123E-17 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.03967523027174E-01 5.53811822782987E-02 x3 : 2.72881639647540E-01 5.53793027399352E-03 x5 : 4.17809813948082E-01 -5.13485523015872E-02 x7 : 1.02670511688602E-01 -4.78528012535250E-03 x2 : -1.87149444062420E-02 8.79806031776072E-02 x4 : 7.24743971081928E-01 -3.83952929482357E-03 x6 : 2.26077500792937E-01 2.71122017311245E-02 x8 : 8.97538072447382E-01 9.53733463716463E-03 x9 : 4.84886923426993E-01 3.68985361557208E-03 == err : 2.413E-15 = rco : 1.187E-04 = res : 7.076E-17 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.03967523027174E-01 5.53811822783006E-02 x3 : 2.72881639647540E-01 5.53793027399373E-03 x5 : 4.17809813948083E-01 -5.13485523015890E-02 x7 : 1.02670511688602E-01 -4.78528012535264E-03 x2 : -1.87149444062410E-02 8.79806031776100E-02 x4 : 7.24743971081928E-01 -3.83952929482369E-03 x6 : 2.26077500792936E-01 2.71122017311253E-02 x8 : 4.84886923426993E-01 3.68985361557219E-03 x9 : 8.97538072447382E-01 9.53733463716489E-03 == err : 3.466E-15 = rco : 1.157E-04 = res : 6.612E-17 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.03967523027174E-01 -5.53811822783013E-02 x3 : 2.72881639647541E-01 -5.53793027399384E-03 x5 : 4.17809813948082E-01 5.13485523015897E-02 x7 : 1.02670511688602E-01 4.78528012535270E-03 x2 : -1.87149444062408E-02 -8.79806031776110E-02 x4 : 7.24743971081928E-01 3.83952929482377E-03 x6 : 2.26077500792937E-01 -2.71122017311257E-02 x8 : 4.84886923426993E-01 -3.68985361557224E-03 x9 : 8.97538072447383E-01 -9.53733463716503E-03 == err : 2.403E-15 = rco : 1.157E-04 = res : 8.327E-17 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.72881639647540E-01 -5.53793027399364E-03 x3 : 1.03967523027175E-01 -5.53811822782998E-02 x5 : 4.17809813948082E-01 5.13485523015882E-02 x7 : 1.02670511688602E-01 4.78528012535260E-03 x2 : 7.24743971081928E-01 3.83952929482363E-03 x4 : -1.87149444062414E-02 -8.79806031776085E-02 x6 : 2.26077500792937E-01 -2.71122017311251E-02 x8 : 4.84886923426993E-01 -3.68985361557216E-03 x9 : 8.97538072447383E-01 -9.53733463716483E-03 == err : 1.870E-15 = rco : 1.207E-04 = res : 8.331E-17 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.54090352551546E-01 4.00165506168856E-73 x3 : 7.16134247098124E-02 1.49232992632032E-73 x5 : 4.27846154667769E-02 -1.64709006682761E-73 x7 : 2.15755803635932E-01 -1.93450175634116E-73 x2 : 2.39009856217790E-01 2.35456499486095E-73 x4 : 9.69318641299282E-01 -8.26861322138963E-73 x6 : 8.82786687592640E-01 6.19040562029170E-74 x8 : 7.00084168001750E-01 1.05015809629948E-73 x9 : 2.57431190464462E-01 3.71424337217502E-73 == err : 2.142E-15 = rco : 4.043E-04 = res : 4.684E-17 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.03967523027175E-01 -5.53811822782980E-02 x3 : 2.72881639647540E-01 -5.53793027399343E-03 x5 : 4.17809813948082E-01 5.13485523015865E-02 x7 : 1.02670511688602E-01 4.78528012535245E-03 x2 : -1.87149444062422E-02 -8.79806031776059E-02 x4 : 7.24743971081928E-01 3.83952929482351E-03 x6 : 2.26077500792937E-01 -2.71122017311242E-02 x8 : 8.97538072447383E-01 -9.53733463716455E-03 x9 : 4.84886923426993E-01 -3.68985361557204E-03 == err : 3.581E-15 = rco : 1.187E-04 = res : 4.221E-17 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.54090352551546E-01 4.84957635911444E-60 x3 : 7.16134247098117E-02 1.03068690539575E-60 x5 : 4.27846154667777E-02 2.62533457034767E-61 x7 : 2.15755803635932E-01 -3.06987906993316E-60 x2 : 2.39009856217790E-01 2.59434103722551E-60 x4 : 9.69318641299284E-01 -9.10115984387192E-60 x6 : 8.82786687592637E-01 -7.95379140201627E-60 x8 : 2.57431190464460E-01 3.44210532556694E-60 x9 : 7.00084168001750E-01 1.66392732722498E-60 == err : 6.002E-15 = rco : 3.996E-04 = res : 5.551E-17 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.72881639647540E-01 -5.53793027399407E-03 x3 : 1.03967523027173E-01 -5.53811822783031E-02 x5 : 4.17809813948083E-01 5.13485523015915E-02 x7 : 1.02670511688602E-01 4.78528012535287E-03 x2 : 7.24743971081928E-01 3.83952929482394E-03 x4 : -1.87149444062401E-02 -8.79806031776138E-02 x6 : 2.26077500792936E-01 -2.71122017311266E-02 x8 : 8.97538072447382E-01 -9.53733463716537E-03 x9 : 4.84886923426993E-01 -3.68985361557238E-03 == err : 4.592E-15 = rco : 1.229E-04 = res : 5.565E-17 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.72881639647541E-01 5.53793027399405E-03 x3 : 1.03967523027173E-01 5.53811822783033E-02 x5 : 4.17809813948083E-01 -5.13485523015916E-02 x7 : 1.02670511688602E-01 -4.78528012535285E-03 x2 : 7.24743971081928E-01 -3.83952929482392E-03 x4 : -1.87149444062397E-02 8.79806031776140E-02 x6 : 2.26077500792936E-01 2.71122017311266E-02 x8 : 8.97538072447382E-01 9.53733463716533E-03 x9 : 4.84886923426993E-01 3.68985361557236E-03 == err : 8.864E-15 = rco : 1.229E-04 = res : 5.606E-17 == SHAR_EOF fi # end of overwriting check if test -f 'rbpl' then echo shar: will not over-write existing file "'rbpl'" else cat << "SHAR_EOF" > 'rbpl' 6 u**2 + v**2 + w**2 - 1.0; - 12.0*b - 4.0*a + 4.0*c + 4.0*a*b + 4.0*a*c + 4.0*b*c + a**2 + 5.0*b**2 + 13.0*c**2 + 8.0*w + 2.0*u + 9.0 + 8.0*a*c*u+ 8.0*a*c*w + 8.0*b*a*v + 8.0*b*c*v + 2.0*u*a**2 - 6.0*u*b**2 - 6.0*u*c**2 + 2.0*v*a**2 + 2.0*v*b**2 + 2.0*v*c**2 + 8.0*w*c**2 + 8.0*b*u + 8.0*c*v - 8.0*a*v - 8.0*b*w + 2.0*v; 8.860 - 6.0*b + 2.0*a + 4.0*a*b*u + 6.0*c - 6.0*a*b - 6.0*a*c + 6.0*b*c + 2.860*a**2 + 4.860*b**2 + 6.860*c**2 + 4.0*w - 3.0*u + 4.0*b*c*w + 4.0*a*w - 4.0*c*u + 4.0*a*c*u + 4.0*b*c*v - 3.0*u*a**2 - 3.0*u*b**2 - 3.0*u*c**2 - 1.0*v*a**2 + 3.0*v*b**2 - 1.0*v*c**2 + 4.0*w*c**2 + 4.0*b*u - 4.0*a*v + 3.0*v; - 2.0*b + 2.0*a + 2.0*c + 2.0*a*b - 10.0*a*c - 2.0*b*c + 3.5*a**2 - 2.5*b**2 + 1.5*c**2 + 4.0*w - 5.0*u + 7.5 + 4.0*a*c*u - 4.0*a*c*w - 4.0*b*a*v + 4.0*b*c*v - 5.0*u*a**2 - 1.0*u*b**2 - 1.0*u*c**2 - 1.0*v*a**2 - 1.0*v*b**2 - 1.0*v*c**2 + 4.0*w*c**2 + 4.0*b*u - 4.0*c*v - 4.0*a*v + 4.0*b*w - 1.0*v; - 4.0*a - 4.0*a*b*u - 1.333333333*c + 1.333333333*a*b - 4.0*b*c - 1.638888889*a**2 + 0.361111111*b**2 - 1.638888889*c**2 + 2.0*w - 0.6666666667*u - 4.0*b*c*w - 4.0*a*w + 0.361111111 + 2.0*w*b**2 + 2.0*w*a**2 + 4.0*c*u- 0.6666666667*u*a**2 - 0.6666666667*u*b**2 - 0.6666666667*u*c**2 + v*a**2 - 3.0*v*b**2 + v*c**2 + 2.0*w*c**2 - 3.0*v; - 8.0*b + 4.0*a*b*u + 8.0*c - 8.0*a*b - 8.0*a*c + 8.0*b**2 + 8.0*c**2 + 2.0*w - 2.0*u + 4.0*b*c*w + 4.0*a*w - 2.0*w*b**2 - 2.0*w*a**2 - 4.0*c*u + 4.0*a*c*u + 4.0*a*c*w + 4.0*b*a*v + 4.0*b*c*v - 2.0*u*a**2 - 6.0*u*b**2 - 6.0*u*c**2 - 2.0*v*a**2 + 2.0*v*b**2 - 2.0*v*c**2 + 2.0*w*c**2 + 4.0*b*u + 4.0*c*v - 4.0*a*v - 4.0*b*w + 2.0*v; TITLE : parallel robot, the so-called left-hand problem ROOT COUNTS : total degree : 486 2-homogeneous Bezout number : 160 with partition : {u v w }{b a c } generalized Bezout number : 160 based on the set structure : {u v w }{u v w } {u v w }{b a c }{b a c } {u v w }{b a c }{b a c } {u v w }{b a c }{b a c } {u v w }{b a c }{b a c } {u v w }{b a c }{b a c } mixed volume : 160 REFERENCES : B. Mourrain: "The 40 generic positions of a parallel robot". In: M. Bronstein, editor, ISSAC'93, ACM Press, pages 173-182, Kiev (Ukraine), 1993. Also available in the FRISCO test suite, see http://www.inria.fr/safir/POL/index.html. PROBLEM DESCRIPTION : Given the length of the length of arms (between the ground and the platform) of the parallel robot, we want to find all the possible positions of the upper platform. Several formulation of the problem are possible, according to the representation of the displacement. Using quaternions (see \cite{MB93issac}), we obtain the following system for the matrix $X$ of base points and the matrix $Y$ of points of the platform given {\small $$ X :=\left [\begin {array}{cccccc} 0&1/2&3/2&3/2&1/3&2 \\\noalign{\medskip}0&-1/2&-1/2&1/2&1/2&0 \\\noalign{\medskip}0&-1&-1&-1&-1&0\end {array}\right ],\ Y := \left [\begin {array}{cccccc} 0&1&0&1&0&-1 \\\noalign{\medskip}0&0&-1&1&1&0\\\noalign{\medskip}0&1 &0&1&1&1\end {array}\right ] $$} and the length $$ lg := [ 1.0,1, 0.8,2,2,2] $$ \begin{Equations} {u}^{2}+{v}^{2}+{w}^{2}- 1.0 \& - 12.0b- 4.0a+ 4.0c+ 4.0ab+ 4.0ac+ 4.0bc+{a}^{2}+ 5.0{b }^{2}+ 13.0{c}^{2}+ 8.0w+ 2.0u+ 9.0+ 8.0acu+ 8.0acw+ 8.0bav+ 8.0bcv+ 2.0u{a}^{2}- 6.0u{b}^{2}- 6.0u{c}^{2}+ 2.0v{a}^{2}+ 2.0v{b}^{2}+ 2.0v{c}^{2}+ 8.0w{c}^{2}+ 8.0bu+ 8.0cv- 8.0av- 8.0bw+ 2.0v \& 8.860- 6.0b+ 2.0a+ 4.0abu+ 6.0c- 6.0ab- 6.0ac+ 6.0bc+ 2.860{a}^{2}+ 4.860{b}^{2}+ 6.860{c}^{2}+ 4.0w- 3.0u+ 4.0bcw+ 4.0aw- 4.0cu+ 4.0acu+ 4.0bcv- 3.0u{a}^{2}- 3.0u{b}^{2}- 3.0u{c}^{2}- 1.0v{a}^{2}+ 3.0v{b}^{2}- 1.0v{c}^{2}+ 4.0w{c}^{2}+ 4.0bu- 4.0av+ 3.0v \& - 2.0b+ 2.0a+ 2.0c+ 2.0ab- 10.0ac- 2.0bc+ 3.5{a }^{2}- 2.5{b}^{2}+ 1.5{c}^{2}+ 4.0w- 5.0u+ 7.5+ 4.0acu- 4.0acw- 4.0bav+ 4.0bcv- 5.0u {a}^{2}- 1.0u{b}^{2}- 1.0u{c}^{2}- 1.0v{a}^{2}- 1.0v{b} ^{2}- 1.0v{c}^{2}+ 4.0w{c}^{2}+ 4.0bu- 4.0cv- 4.0av+ 4.0bw- 1.0v \& - 4.0a- 4.0abu- 1.333333333c+ 1.333333333ab- 4.0bc- 1.638888889{a}^{2}+ 0.361111111{b}^{2}- 1.638888889{c} ^{2}+ 2.0w- 0.6666666667u- 4.0bcw- 4.0aw+ 0.361111111+ 2.0w{b}^{2}+ 2.0w{a}^{2}+ 4.0cu- 0.6666666667u{a}^{2}- 0.6666666667u{b}^{2}- 0.6666666667u{c}^{2}+v{a}^{2}- 3.0v{b}^{2}+v{c}^{2}+ 2.0w{c}^{2}- 3.0v \& - 8.0b+ 4.0abu+ 8.0c- 8.0ab- 8.0ac+ 8.0{b}^{2}+ 8.0{c}^ {2}+ 2.0w- 2.0u+ 4.0bcw+ 4.0aw- 2.0w{b}^{2}- 2.0w{a}^{2 }- 4.0cu+ 4.0acu+ 4.0acw+ 4.0bav+ 4.0bcv- 2.0u{a}^{2}- 6.0u{b}^{2}- 6.0u{c}^{2}- 2.0v{a}^{2}+ 2.0v{b}^{2}- 2.0v{c}^{2}+ 2.0w{c}^{2}+ 4.0bu+ 4.0cv- 4.0av- 4.0bw+ 2.0v \end{Equations} Added to the list by B. Mourrain (April 1996). \begin{Characteristics} % What is known about this system. \item Dimension $0$. \item Degree bounded by $40$. It depends on the geometry of the upper and lower platform. \end{Characteristics} %problem %Find the roots of the systems. NOTE : A mult-homogeneous start system is approriate. It takes about 9m48s on idefix to trace all 160 paths. The path directions to infinity are (-1,-1,-1,0,0,0) with m=1 and (-2,-2,-2,0,0,0) with m=2. THE SOLUTIONS : 40 6 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : 1.67830540988268E+00 1.78588018271916E+00 v : 2.90929982547187E-01 -4.36893377085222E+00 w : -4.52998982844723E+00 3.81060137379532E-01 b : -9.61202778351524E-01 -1.54796228969244E+00 a : 2.72692577954433E+00 1.37721853152080E+00 c : -1.55195110085470E+00 2.50574584504199E+00 =========================================================== solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : -2.66901388002964E+00 1.52172280379038E+00 v : -1.76545337329832E+00 -2.15122715628933E+00 w : 1.72810166380565E-01 1.52541977473529E+00 b : 5.01586502945566E-01 1.00065917688882E+00 a : -9.97062477577645E-01 -4.53024128950244E-01 c : -1.62536065240751E+00 1.23382674462822E+00 =========================================================== solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : 7.13114881819550E-01 8.84690575230354E-02 v : -6.48181112560232E-01 6.04356049623105E-02 w : -2.98694290933054E-01 8.00664243122927E-02 b : -4.75568819163413E+00 7.46646880960425E-01 a : -2.44865666311767E+00 3.24159608963511E-01 c : 2.06450825933695E-01 2.48468854393127E-01 =========================================================== solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : 1.27446691144164E+00 -2.68411604281588E-02 v : 8.94854564010792E-03 -7.78247673313380E-01 w : -1.82103863107714E-01 -2.26092708587871E-01 b : -1.40066880461282E+00 -8.85666908643008E-01 a : -1.77218355694340E-01 1.51645397837783E+00 c : 2.78994239732248E+00 5.82195969543700E-01 =========================================================== solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : -9.40131191267893E+00 -9.43577945927657E+00 v : -3.07566087881006E+00 -7.57530656983855E+00 w : -1.18112302877027E+01 9.48315943127198E+00 b : -1.27022189309648E-01 9.77728383616571E-01 a : -2.13316938067606E-01 4.36343294396376E-01 c : 5.56981768875839E-01 4.64851988107945E-01 =========================================================== solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : -2.66901388002964E+00 -1.52172280379038E+00 v : -1.76545337329832E+00 2.15122715628933E+00 w : 1.72810166380564E-01 -1.52541977473529E+00 b : 5.01586502945565E-01 -1.00065917688882E+00 a : -9.97062477577643E-01 4.53024128950244E-01 c : -1.62536065240751E+00 -1.23382674462822E+00 =========================================================== solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : -1.68430599421000E+00 -5.91162509707962E-01 v : -1.02136879457992E+00 1.59251012521063E+00 w : -7.95982347689153E-01 -7.92532133558964E-01 b : -3.05059177266336E-01 8.82458342963159E-01 a : -2.49519496357464E+00 1.19867108845481E+00 c : -2.24750470979433E+00 6.26331959724670E-01 =========================================================== solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : 1.93226092557007E+00 -3.24887294348268E-01 v : 2.52581189059373E-01 1.59904811705070E+00 w : 4.07871828406164E-01 5.48891915851034E-01 b : -7.14713432021397E-01 -3.14401510171426E-01 a : 6.13544860297154E-01 -1.90350772206065E+00 c : 2.24214398089609E+00 2.04702950667375E+00 =========================================================== solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : 9.43646174421106E-01 -2.51083322418195E-01 v : -4.65247215624364E-01 -2.33115598490197E-01 w : -3.65807620073296E-01 -3.51215848152526E-01 b : 1.27199854824884E+00 1.85705217376491E-01 a : 1.70077015242226E-01 3.32761916466092E-01 c : -4.58616003820444E-01 6.08839310588357E-01 =========================================================== solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : -1.01204443449627E+00 -4.96290861092026E-02 v : 6.56116328038082E-01 -5.22936247975928E-01 w : -4.65641223666886E-01 -6.28982477383803E-01 b : 1.25632201664186E-01 -3.28115188291999E-01 a : -1.27538605287322E-01 1.43292806597813E+00 c : -3.43566992761562E-01 6.79212882999765E-01 =========================================================== solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : 1.51987721593376E+00 -6.13543376113679E-01 v : -7.97487999239977E-01 -1.25071829236840E+00 w : 2.49669498483209E-01 -2.60032685794114E-01 b : -2.53308850339866E-02 -2.14855027201371E-02 a : -1.81540173225660E+00 7.55999307364567E-01 c : 3.52648767281108E-01 -1.19654364408195E+00 =========================================================== solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : 7.13114881819550E-01 -8.84690575230368E-02 v : -6.48181112560232E-01 -6.04356049623114E-02 w : -2.98694290933054E-01 -8.00664243122941E-02 b : -4.75568819163413E+00 -7.46646880960435E-01 a : -2.44865666311767E+00 -3.24159608963515E-01 c : 2.06450825933696E-01 -2.48468854393132E-01 =========================================================== solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : 5.89705725101541E-01 2.90001980173401E-01 v : -1.19082798119433E+00 1.76827338344892E-01 w : 4.89548128177854E-02 8.07992351832800E-01 b : 2.83032947383011E-02 1.55114471071632E-01 a : -1.17249404355289E+00 -1.34362499588689E+00 c : -4.57519447280586E-03 1.54671012463530E-01 =========================================================== solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : -5.55382829794239E-01 -4.70197740328915E-37 v : -1.29902855853259E-02 -3.29138418230240E-37 w : -8.31493334218714E-01 -1.17549435082229E-37 b : 5.96052602616116E-01 -5.17217514361806E-37 a : -1.40946041358819E-02 -3.29138418230240E-37 c : -8.54617266873215E-01 -3.76158192263132E-37 =========================================================== solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : -2.74268952822191E-01 1.46936793852786E-39 v : -3.44946745301386E-01 -1.83670992315982E-39 w : -8.97657108490653E-01 -1.37753244236987E-39 b : 1.08739948518543E+00 1.46936793852786E-39 a : 4.02213286018676E-01 1.46936793852786E-39 c : -5.85370323592816E-02 2.93873587705572E-39 =========================================================== solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : -2.19695095140812E-01 -3.01931388625790E-01 v : -5.24317415821520E-01 -2.52603481196644E-01 w : -9.36406827254043E-01 2.12276591598106E-01 b : 9.94132017299192E-01 7.70434015823507E-01 a : 3.33915665645130E-01 5.42494853228183E-01 c : 1.38714665405798E-01 5.50106733094178E-01 =========================================================== solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : 7.63857299844273E-01 -8.91014168859147E+00 v : -1.00616426215060E+01 -6.63799480857455E-01 w : 2.77562209078986E-02 4.58144583768800E+00 b : -5.26936654788141E-02 5.72894310954582E-01 a : -7.45178566211849E-01 -1.01449931495220E+00 c : 7.42111905430210E-01 -8.43600919001218E-01 =========================================================== solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : 1.27823336679066E+00 -3.62196295718933E-01 v : 1.06543293971761E-01 1.37138625319231E+00 w : -1.19855924027337E+00 -2.64366892470786E-01 b : -3.71829766104279E-01 -6.44680546051179E-01 a : 9.90296452129201E-01 1.14040771208258E+00 c : -6.34654126679054E-01 7.92954343294349E-01 =========================================================== solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : 5.89705725101541E-01 -2.90001980173402E-01 v : -1.19082798119433E+00 -1.76827338344893E-01 w : 4.89548128177859E-02 -8.07992351832800E-01 b : 2.83032947383008E-02 -1.55114471071632E-01 a : -1.17249404355289E+00 1.34362499588689E+00 c : -4.57519447280589E-03 -1.54671012463530E-01 =========================================================== solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : -9.31243087838555E-01 -1.48297014732051E+00 v : -1.21827432050118E+00 1.34603172805940E+00 w : -1.63845991686697E+00 -1.57971633634090E-01 b : -3.44908186218446E-01 8.40108707961715E-02 a : 4.99368784063559E-02 -5.10490301443037E-01 c : -8.66137676069745E-01 -5.18270718255192E-01 =========================================================== solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : 6.72710252357910E-01 -1.18738873511645E+00 v : -1.37130629305279E+00 5.22010522768434E-01 w : -1.30358292920794E+00 -1.16187843260539E+00 b : 1.33452091031905E-01 -2.44729817060838E-01 a : 1.81360059075152E-01 1.15583079105601E-01 c : 6.15145855765670E-01 -9.03693200269731E-01 =========================================================== solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : -1.68430599421000E+00 5.91162509707962E-01 v : -1.02136879457992E+00 -1.59251012521063E+00 w : -7.95982347689153E-01 7.92532133558964E-01 b : -3.05059177266336E-01 -8.82458342963160E-01 a : -2.49519496357465E+00 -1.19867108845481E+00 c : -2.24750470979434E+00 -6.26331959724671E-01 =========================================================== solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : -1.01204443449627E+00 4.96290861092031E-02 v : 6.56116328038082E-01 5.22936247975929E-01 w : -4.65641223666886E-01 6.28982477383803E-01 b : 1.25632201664186E-01 3.28115188291999E-01 a : -1.27538605287322E-01 -1.43292806597813E+00 c : -3.43566992761562E-01 -6.79212882999765E-01 =========================================================== solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : 1.93226092557007E+00 3.24887294348267E-01 v : 2.52581189059373E-01 -1.59904811705069E+00 w : 4.07871828406162E-01 -5.48891915851033E-01 b : -7.14713432021400E-01 3.14401510171428E-01 a : 6.13544860297154E-01 1.90350772206065E+00 c : 2.24214398089609E+00 -2.04702950667376E+00 =========================================================== solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : 9.43646174421106E-01 2.51083322418195E-01 v : -4.65247215624364E-01 2.33115598490197E-01 w : -3.65807620073295E-01 3.51215848152526E-01 b : 1.27199854824884E+00 -1.85705217376488E-01 a : 1.70077015242226E-01 -3.32761916466091E-01 c : -4.58616003820445E-01 -6.08839310588357E-01 =========================================================== solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : -9.40131191267895E+00 9.43577945927668E+00 v : -3.07566087881007E+00 7.57530656983866E+00 w : -1.18112302877029E+01 -9.48315943127199E+00 b : -1.27022189309652E-01 -9.77728383616573E-01 a : -2.13316938067608E-01 -4.36343294396374E-01 c : 5.56981768875841E-01 -4.64851988107948E-01 =========================================================== solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : 2.26854788653352E+00 4.71421351581676E-02 v : -8.06981386200876E-01 -2.35132108199532E+00 w : 1.55060840287238E+00 -1.29266456541745E+00 b : 1.07728517433545E-01 2.68583390463192E+00 a : 1.43408725852707E-01 1.36295753614620E+00 c : -1.67248285845161E+00 -3.45735608456975E-01 =========================================================== solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : 1.27823336679066E+00 3.62196295718932E-01 v : 1.06543293971760E-01 -1.37138625319232E+00 w : -1.19855924027337E+00 2.64366892470786E-01 b : -3.71829766104279E-01 6.44680546051179E-01 a : 9.90296452129201E-01 -1.14040771208258E+00 c : -6.34654126679054E-01 -7.92954343294348E-01 =========================================================== solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : 2.71998701995170E-01 2.04630056591144E-34 v : 9.58363651873230E-01 -1.38426214752833E-34 w : 8.69242019298910E-02 6.50001356230692E-34 b : 1.91410922327508E+00 2.11852293882596E-33 a : 6.88608640671698E-01 2.02222644160660E-33 c : -2.06477465557281E+00 6.49249039846166E-34 =========================================================== solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : 3.55768395958752E-01 -2.18952885050753E-47 v : 9.00177312485486E-01 -1.64214663788064E-47 w : 2.51216350031888E-01 -3.83167548838817E-47 b : 2.58887086970417E+00 -3.28429327576129E-47 a : 1.29357984044774E+00 -5.47382212626882E-47 c : -1.97288916677775E+00 0.00000000000000E+00 =========================================================== solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : -2.19695095140812E-01 3.01931388625790E-01 v : -5.24317415821520E-01 2.52603481196644E-01 w : -9.36406827254043E-01 -2.12276591598107E-01 b : 9.94132017299192E-01 -7.70434015823508E-01 a : 3.33915665645130E-01 -5.42494853228183E-01 c : 1.38714665405798E-01 -5.50106733094178E-01 =========================================================== solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : 6.72710252357909E-01 1.18738873511645E+00 v : -1.37130629305279E+00 -5.22010522768434E-01 w : -1.30358292920794E+00 1.16187843260539E+00 b : 1.33452091031906E-01 2.44729817060838E-01 a : 1.81360059075152E-01 -1.15583079105601E-01 c : 6.15145855765670E-01 9.03693200269731E-01 =========================================================== solution 33 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : 2.26854788653352E+00 -4.71421351581688E-02 v : -8.06981386200876E-01 2.35132108199533E+00 w : 1.55060840287238E+00 1.29266456541745E+00 b : 1.07728517433543E-01 -2.68583390463192E+00 a : 1.43408725852706E-01 -1.36295753614620E+00 c : -1.67248285845161E+00 3.45735608456976E-01 =========================================================== solution 34 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : 1.51987721593376E+00 6.13543376113679E-01 v : -7.97487999239977E-01 1.25071829236840E+00 w : 2.49669498483210E-01 2.60032685794114E-01 b : -2.53308850339874E-02 2.14855027201373E-02 a : -1.81540173225660E+00 -7.55999307364568E-01 c : 3.52648767281108E-01 1.19654364408195E+00 =========================================================== solution 35 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : 7.63857299844424E-01 8.91014168859145E+00 v : -1.00616426215060E+01 6.63799480857642E-01 w : 2.77562209077787E-02 -4.58144583768801E+00 b : -5.26936654788125E-02 -5.72894310954579E-01 a : -7.45178566211849E-01 1.01449931495220E+00 c : 7.42111905430205E-01 8.43600919001220E-01 =========================================================== solution 36 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : 1.27446691144164E+00 2.68411604281600E-02 v : 8.94854564010672E-03 7.78247673313379E-01 w : -1.82103863107716E-01 2.26092708587871E-01 b : -1.40066880461282E+00 8.85666908643005E-01 a : -1.77218355694335E-01 -1.51645397837783E+00 c : 2.78994239732247E+00 -5.82195969543695E-01 =========================================================== solution 37 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : -9.31243087838555E-01 1.48297014732051E+00 v : -1.21827432050118E+00 -1.34603172805940E+00 w : -1.63845991686697E+00 1.57971633634089E-01 b : -3.44908186218445E-01 -8.40108707961711E-02 a : 4.99368784063559E-02 5.10490301443038E-01 c : -8.66137676069745E-01 5.18270718255192E-01 =========================================================== solution 38 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : 9.07270006685084E-01 3.41778589922979E-01 v : -4.89788950329534E-01 1.66359598069708E-01 w : -5.22429027916172E-01 4.37579763820313E-01 b : 1.07823410788788E+00 -2.42863998458268E-01 a : 1.47911705365308E-01 -3.78076453120830E-01 c : -3.75761229258120E-01 -6.49954252770413E-01 =========================================================== solution 39 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : 1.67830540988267E+00 -1.78588018271916E+00 v : 2.90929982547190E-01 4.36893377085222E+00 w : -4.52998982844723E+00 -3.81060137379527E-01 b : -9.61202778351525E-01 1.54796228969244E+00 a : 2.72692577954433E+00 -1.37721853152080E+00 c : -1.55195110085469E+00 -2.50574584504199E+00 =========================================================== solution 40 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : u : 9.07270006685084E-01 -3.41778589922979E-01 v : -4.89788950329534E-01 -1.66359598069708E-01 w : -5.22429027916172E-01 -4.37579763820313E-01 b : 1.07823410788788E+00 2.42863998458268E-01 a : 1.47911705365308E-01 3.78076453120830E-01 c : -3.75761229258121E-01 6.49954252770413E-01 =========================================================== SHAR_EOF fi # end of overwriting check if test -f 'rbpl24' then echo shar: will not over-write existing file "'rbpl24'" else cat << "SHAR_EOF" > 'rbpl24' 9 62500*x1^2 + 62500*y1^2 + 62500*z1^2 -74529; 625*x2^2 + 625*y2^2 + 625*z2^2 -1250*x2 -2624; 12500*x3^2 + 12500*y3^2 + 12500*z3^2 + 2500*x3 -44975*y3 -10982; 400000*x1*x2 + 400000*y1*y2 + 400000*z1*z2 -400000*x2 + 178837; 1000000*x1*x3 + 1000000*y1*y3 + 1000000*z1*z3 + 100000*x3 -1799000*y3 -805427; 2000000*x2*x3 + 2000000*y2*y3 + 2000000*z2*z3 -2000000*x2 + 200000*x3 -3598000*y3 -1403; 113800000000000*x3*y2*z1 -113800000000000*x2*y3*z1 -113800000000000*x3*y1*z2 + 113800000000000*x1*y3*z2 + 113800000000000*x2*y1*z3 -113800000000000*x1*y2*z3 -206888400000000*x2*y1 + 206888400000000*x3*y1 + 206888400000000*x1*y2 -206888400000000*x3*y2 -206888400000000*x1*y3 + 206888400000000*x2*y3 -2014260000000*x2*z1 + 2014260000000*x3*z1 -61907200000000*y2*z1 + 61907200000000*y3*z1 + 2014260000000*x1*z2 -2014260000000*x3*z2 + 61907200000000*y1*z2 -61907200000000*y3*z2 -2014260000000*x1*z3 + 2014260000000*x2*z3 -61907200000000*y1*z3 + 61907200000000*y2*z3 -362960716800000*x1 + 38025201600000*x2 + 292548849600000*x3 + 11809567440000*y1 + 1475978220000*y2 -825269402280000*y3 -1212982689600000*z1 -151600474800000*z2 + 825859951200000*z3 -19295432410527; -777600000000*x3*y2*z1 + 777600000000*x2*y3*z1 + 777600000000*x3*y1*z2 -777600000000*x1*y3*z2 -777600000000*x2*y1*z3 + 777600000000*x1*y2*z3 -1409011200000*x2*y1 + 1409011200000*x3*y1 + 1409011200000*x1*y2 -1409011200000*x3*y2 -1409011200000*x1*y3 + 1409011200000*x2*y3 -1065312000000*x2*z1 + 1065312000000*x3*z1 -805593600000*y2*z1 + 805593600000*y3*z1 + 1065312000000*x1*z2 -1065312000000*x3*z2 + 805593600000*y1*z2 -805593600000*y3*z2 -1065312000000*x1*z3 + 1065312000000*x2*z3 -805593600000*y1*z3 + 805593600000*y2*z3 + 235685027200*x1 + 398417510400*x2 + 158626915200*x3 -311668424000*y1 -268090368000*y2 + 72704002800*y3 + 412221302400*z1 + 354583756800*z2 + 307085438400*z3 + 282499646407; 3200*x2 + 1271; TITLE : parallel robot with 24 real solutions ROOT COUNTS : total degree : 576 3-homogeneous Bezout number : 80 with partition : {x1 y1 z1 }{x2 y2 z2 }{x3 y3 z3 } generalized Bezout number : 80 based on the set structure : {x1 y1 z1 }{x1 y1 z1 } {x2 y2 z2 }{x2 y2 z2 } {x3 y3 z3 }{x3 y3 z3 } {x1 y1 z1 }{x2 y2 z2 } {x1 y1 z1 }{x3 y3 z3 } {x2 y2 z2 }{x3 y3 z3 } {x1 y1 z1 }{x2 y2 z2 }{x3 y3 z3 } {x1 y1 z1 }{x2 y2 z2 }{x3 y3 z3 } {x2 } mixed volume : 80 REFERENCES : From the FRISCO test suite, see http://www.inria.fr/safir/POL/index.html. ORIGIN OF THE PROBLEM This system was generated by Fabrice Rouillier, as a deformation of a system found in Innocenti (?). Added to the list by Jean-Charles Faug\`ere (October 1996). NOTE : this system needs scaling, see the files rbpl24s and rbpl24es. THE SOLUTIONS : 40 9 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.60927915037453E-01 8.51188283602750E-01 y1 : 2.96903318580811E-01 -2.23600559834163E-01 z1 : 1.35057031555164E+00 -1.15292801937443E-01 x2 : -3.97187500000000E-01 -8.80566557837057E-32 y2 : 1.58367243700197E+00 2.31508118725500E-01 z2 : -9.67226981458723E-01 3.79055830323113E-01 x3 : 5.01336328968350E-01 1.89993451405436E+00 y3 : -9.25382696154252E-01 2.75038127785784E-01 z3 : 6.37698531378697E-01 -6.16577442932776E-01 =========================================================== solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.76222522188102E+00 2.25601382968529E+00 y1 : -5.30726405899260E-01 3.40974976009772E-01 z1 : -2.43443218060270E+00 -1.70740796487254E+00 x2 : -3.97187500000000E-01 7.82610947147733E-32 y2 : 1.80879716576422E+00 1.10392481395847E-02 z2 : 1.04757018233379E-01 -1.90610243435568E-01 x3 : -3.13207074319612E-01 1.62600891961031E+00 y3 : 4.49105154709594E-01 1.67128564166409E+00 z3 : -2.91412061063636E+00 -8.93146449655552E-01 =========================================================== solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -8.68845002714886E-01 -1.97993282137966E-46 y1 : -3.77102100144573E-01 2.96749857570171E-46 z1 : 5.43476188368840E-01 -1.58606456004747E-46 x2 : -3.97187500000000E-01 -4.90899642893848E-47 y2 : 1.12013020914507E+00 2.39144497698835E-46 z2 : -1.41123187478329E+00 -3.60896816291846E-46 x3 : -1.24213654470921E+00 -2.55851221860625E-46 y3 : 1.82329219297354E-01 3.11488972414872E-47 z3 : 4.54819414781284E-01 -1.56000144275981E-46 =========================================================== solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.80796179012321E-01 2.75870639778900E-44 y1 : 4.03173199840368E-01 7.59679635379635E-44 z1 : -2.60680314111560E-01 2.77057489265704E-43 x2 : -3.97187500000000E-01 -1.49669846677857E-45 y2 : 3.68572446290782E-02 -1.18615670858622E-42 z2 : 1.80136299322543E+00 -1.33170925211691E-43 x3 : 1.28892076284168E+00 -4.22154516070031E-44 y3 : 3.57139933658504E-01 4.95890444084475E-44 z3 : 3.41905928051848E-01 3.19488295477207E-43 =========================================================== solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -7.53351901004135E-01 -4.36525664759936E-35 y1 : 5.82986827304929E-01 -1.21080438668871E-35 z1 : -5.33901931484037E-01 6.09081472377513E-35 x2 : -3.97187500000000E-01 4.47714270126398E-38 y2 : -1.79224079004278E+00 3.51787845347434E-35 z2 : 1.84770236646933E-01 1.76704562645256E-34 x3 : -6.19359113296997E-01 -3.62627968075898E-35 y3 : 1.10131615707616E-01 -3.26431727699111E-35 z3 : -1.00147425926630E+00 8.57619862830868E-35 =========================================================== solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.41111035814943E+00 -1.05571993852573E+01 y1 : -1.11444903155913E+01 -3.60166955233149E+00 z1 : -1.20781906139012E+00 3.41690191995156E+00 x2 : -3.97187500000000E-01 7.60011165303484E-30 y2 : 6.03162719189098E-02 9.90019647861061E-01 z2 : 2.05514286444033E+00 -2.90560307600381E-02 x3 : 5.00047689378091E+00 5.61215031457144E+00 y3 : 5.84169934021285E+00 -2.66885185496370E+00 z3 : 4.24607581166635E+00 -4.20041425584203E+00 =========================================================== solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.24832555668770E-01 -3.10875852060892E-42 y1 : -5.61397427180790E-01 -1.62064988880990E-42 z1 : -1.48262175655007E-01 5.88508322026460E-42 x2 : -3.97187500000000E-01 -3.44951033686745E-42 y2 : 1.20364727903326E+00 -9.79535862574426E-42 z2 : -1.34070888619401E+00 -1.18258668762512E-41 x3 : 9.93173184314215E-01 -5.23983302370560E-42 y3 : 8.76873571479193E-02 -3.31723296062942E-42 z3 : 3.66391527050073E-02 1.02236254552706E-42 =========================================================== solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.51664652259260E-01 1.18435203899897E-01 y1 : 9.43285027311184E-01 -7.62481850160367E-02 z1 : -4.44938486415369E-01 -2.81874394549227E-01 x2 : -3.97187500000000E-01 3.58839527633856E-32 y2 : -2.70543524413652E-01 6.36857625120939E-01 z2 : 1.89392111946294E+00 9.09740668073788E-02 x3 : -8.62910696426389E-01 -6.74601131887605E-01 y3 : -1.71699847062901E-01 2.13799541238411E-01 z3 : -4.50529715455257E-01 2.07146594145172E-01 =========================================================== solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -5.13765913689658E-01 9.29248470834188E-44 y1 : -4.02040338567713E-01 -1.13951945306946E-43 z1 : 8.75712368357895E-01 4.77685326320178E-44 x2 : -3.97187500000000E-01 8.65728792445681E-45 y2 : 1.75913297406388E+00 1.72184038343161E-44 z2 : -3.89510294350373E-01 1.27035679334730E-43 x3 : -1.90107783864834E-01 2.12868216588040E-43 y3 : 1.27320250792110E-01 -1.59482353876415E-44 z3 : 1.14992539035157E+00 7.98720738693017E-44 =========================================================== solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.47847985949589E-01 7.24475898715818E-41 y1 : 5.18234841145665E-01 1.94477986657187E-41 z1 : 1.59627206183739E-01 -1.95659909660745E-41 x2 : -3.97187500000000E-01 4.11137396205979E-41 y2 : -1.29010194920263E+00 -1.25380590409526E-40 z2 : 1.25773767157836E+00 -7.09552012575073E-41 x3 : 1.07676727911179E+00 -2.51511985137869E-41 y3 : 3.52370234126145E-01 -5.81791626941160E-41 z3 : 8.04637863451363E-01 -6.54312029137321E-41 =========================================================== solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -6.31242531037861E-01 -4.89815810847513E-34 y1 : 2.11799613513023E-01 1.22354969602228E-34 z1 : -8.65527463876592E-01 3.38521070963502E-34 x2 : -3.97187500000000E-01 2.89453109420001E-36 y2 : -1.57196053617992E+00 1.19145664409642E-34 z2 : 8.80458495635476E-01 2.97607684455168E-34 x3 : -1.13806647386946E+00 -3.34057279682040E-34 y3 : 1.06388212448939E-01 7.70592930961836E-35 z3 : -4.27135028382625E-01 4.28809931415435E-34 =========================================================== solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.45762200930782E-01 -3.46018339685167E-41 y1 : -1.67451146323380E-01 -2.02581236101237E-42 z1 : -8.64531834835485E-01 6.03794252468706E-42 x2 : -3.97187500000000E-01 2.68096658305760E-43 y2 : 1.76992806959149E+00 -1.46930379386164E-42 z2 : 3.37078208010970E-01 7.39116679765701E-42 x3 : 7.16698057815403E-02 -1.67674656758579E-41 y3 : 1.03033687641844E-01 5.10343532404525E-43 z3 : -1.10416880282373E+00 1.38018943646154E-41 =========================================================== solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.90068765115185E+00 7.99938295244261E+00 y1 : -5.89159624289682E+00 5.36046990884114E+00 z1 : -7.22070463327437E+00 -1.16027637932974E+00 x2 : -3.97187500000000E-01 6.82289781171077E-32 y2 : 1.31524734188190E+00 4.24787304085616E-01 z2 : -1.36538336113613E+00 4.09189381141201E-01 x3 : -7.48368182081418E-01 -4.07901426555947E+00 y3 : 6.08132720673979E+00 4.50593810884582E-01 z3 : -2.41027247199097E+00 1.89783240390497E+00 =========================================================== solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.76222522188102E+00 -2.25601382968529E+00 y1 : -5.30726405899260E-01 -3.40974976009772E-01 z1 : -2.43443218060270E+00 1.70740796487254E+00 x2 : -3.97187500000000E-01 -1.52100241508788E-31 y2 : 1.80879716576422E+00 -1.10392481395847E-02 z2 : 1.04757018233379E-01 1.90610243435567E-01 x3 : -3.13207074319611E-01 -1.62600891961030E+00 y3 : 4.49105154709598E-01 -1.67128564166409E+00 z3 : -2.91412061063636E+00 8.93146449655552E-01 =========================================================== solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.60927915037453E-01 -8.51188283602750E-01 y1 : 2.96903318580811E-01 2.23600559834163E-01 z1 : 1.35057031555164E+00 1.15292801937443E-01 x2 : -3.97187500000000E-01 5.35455469992301E-32 y2 : 1.58367243700197E+00 -2.31508118725501E-01 z2 : -9.67226981458723E-01 -3.79055830323114E-01 x3 : 5.01336328968349E-01 -1.89993451405436E+00 y3 : -9.25382696154252E-01 -2.75038127785783E-01 z3 : 6.37698531378698E-01 6.16577442932776E-01 =========================================================== solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -8.59361304931823E-01 7.08645559675221E-36 y1 : -1.14536036212683E-01 1.27453093335654E-35 z1 : 6.63960574126625E-01 -4.40782644483727E-37 x2 : -3.97187500000000E-01 -2.26917011589995E-39 y2 : 6.80577142510713E-01 -2.67050627125059E-35 z2 : -1.66825712734449E+00 -6.58767009861700E-36 x3 : -2.36579109387859E-01 -5.49436315266512E-36 y3 : -1.86544310915698E-01 8.02700969751911E-37 z3 : 4.04871505874547E-01 1.20602793210591E-36 =========================================================== solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.06924880449655E-01 -1.13537267709195E-41 y1 : 1.12822207973228E-01 3.84904348592350E-42 z1 : -1.06626321480155E+00 3.97434191498388E-42 x2 : -3.97187500000000E-01 -7.98704627869241E-44 y2 : -1.66317221622769E+00 8.57093879752627E-43 z2 : 6.92910722252173E-01 1.29345418958998E-42 x3 : -7.92572473873798E-01 -8.64572448911427E-42 y3 : 3.59141187994599E-02 1.84999530496641E-42 z3 : -7.32688572275859E-01 5.36740336401709E-42 =========================================================== solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.49613996223585E-01 -2.19640547651717E-43 y1 : -8.08220016454984E-01 -4.30485126715128E-43 z1 : -5.80595951933320E-01 1.91074130528072E-44 x2 : -3.97187500000000E-01 9.49508998166231E-45 y2 : -2.85694288028108E-02 -1.83662974232705E-43 z2 : 1.80151349636400E+00 9.23895849707127E-44 x3 : -4.86395530854822E-01 1.30995825592640E-43 y3 : -1.44236229493533E-01 -4.78447061629241E-44 z3 : -4.46645777008107E-01 6.38976590954415E-44 =========================================================== solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.70249860420889E-01 -7.95842181275884E-40 y1 : -2.67972394831736E-01 1.47479139881701E-40 z1 : -9.48430210601854E-01 2.73923873525043E-40 x2 : -3.97187500000000E-01 1.06975034941637E-40 y2 : 1.69609054813755E+00 1.56725738011908E-41 z2 : 6.07901260372304E-01 1.89213870020019E-40 x3 : -8.95358221355674E-01 -6.03628764330885E-40 y3 : 2.51314507461867E-01 -3.26619860738897E-41 z3 : -1.04739482331590E+00 3.31245464750769E-40 =========================================================== solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.12970217447204E+00 -2.85539557121356E-01 y1 : -4.81112547431015E-01 4.77265621986960E-01 z1 : -7.41109017768564E-01 -7.45090296479987E-01 x2 : -3.97187500000000E-01 5.02638552979145E-31 y2 : -2.51735932126628E+00 -4.63096963472948E-01 z2 : 6.42763329149331E-01 -1.81370250103035E+00 x3 : 3.69517980821657E-01 -4.12224408148848E-01 y3 : -4.03690539639678E-01 1.17105598424810E-01 z3 : -4.57678328543319E-01 -9.86487970679366E-01 =========================================================== solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.02465879869054E+00 1.05596417140249E-43 y1 : 3.56291264945708E-02 -1.07621281678782E-43 z1 : 3.75857568250670E-01 -1.91074130528072E-44 x2 : -3.97187500000000E-01 2.22017545159457E-44 y2 : 1.26462869909052E+00 -3.06104957054509E-44 z2 : -1.28334770942265E+00 -0.00000000000000E+00 x3 : 3.79655252330549E-01 -1.63744781990800E-44 y3 : -1.53848099986028E-01 -5.98058827036554E-45 z3 : 2.85089700432471E-01 0.00000000000000E+00 =========================================================== solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.20201863228470E-01 3.60925253897334E-48 y1 : 6.50130738926866E-01 -5.60269913381182E-48 z1 : 3.11549235047937E-01 -4.66489576484549E-48 x2 : -3.97187500000000E-01 1.09088809531966E-48 y2 : 6.53035213444466E-02 1.12098983296329E-47 z2 : -1.80055617517026E+00 -5.63901275456011E-48 x3 : 9.81087705339315E-01 9.99418835393063E-48 y3 : 7.97362227120991E-02 3.65026139548677E-48 z3 : -1.85050660608453E-02 -0.00000000000000E+00 =========================================================== solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.24033336703691E-01 -6.75817069697591E-42 y1 : -6.84488003521169E-01 -1.62064988880990E-42 z1 : -7.37655680110672E-01 -4.89149774151862E-42 x2 : -3.97187500000000E-01 -3.48525655797488E-42 y2 : -7.68706520759768E-01 1.95907172514886E-42 z2 : 1.62952673337541E+00 2.95646671906281E-42 x3 : 6.42714680699141E-02 -7.27026832039152E-42 y3 : -1.64821139715059E-01 5.10343532404525E-43 z3 : -4.91306845043299E-01 -3.06708763658120E-42 =========================================================== solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.49674132550947E+00 1.30129037752096E+00 y1 : -2.03108584682287E+00 2.95027772577835E-02 z1 : 1.16619457280153E+00 -3.85043222714373E+00 x2 : -3.97187500000000E-01 3.18755509853904E-31 y2 : -1.89241784269248E+00 1.73249266404645E-01 z2 : -4.57277000068823E-01 -7.16983366598777E-01 x3 : 3.69016259239375E+00 1.63894913563023E+00 y3 : -1.20089422667598E+00 7.37413413625633E-02 z3 : 1.39320947414899E+00 -4.29990435152624E+00 =========================================================== solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.05989335239952E+00 -8.65045849212916E-42 y1 : -2.44995777916945E-01 -1.94477986657187E-41 z1 : -9.52215854844104E-02 5.38064751567049E-41 x2 : -3.97187500000000E-01 -9.50402653693917E-42 y2 : 1.79373551975195E+00 -5.48540083041679E-41 z2 : -1.69646618073993E-01 -1.89213870020019E-40 x3 : 1.09864715987124E+00 -4.61105306086093E-41 y3 : 2.10483876737831E-01 -2.85792378146534E-41 z3 : 4.05983389153723E-01 -2.45367010926496E-41 =========================================================== solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.12970217447204E+00 2.85539557121357E-01 y1 : -4.81112547431014E-01 -4.77265621986961E-01 z1 : -7.41109017768565E-01 7.45090296479987E-01 x2 : -3.97187500000000E-01 9.01342329179742E-32 y2 : -2.51735932126628E+00 4.63096963472947E-01 z2 : 6.42763329149330E-01 1.81370250103035E+00 x3 : 3.69517980821657E-01 4.12224408148848E-01 y3 : -4.03690539639678E-01 -1.17105598424810E-01 z3 : -4.57678328543319E-01 9.86487970679366E-01 =========================================================== solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.51664652259260E-01 -1.18435203899896E-01 y1 : 9.43285027311184E-01 7.62481850160367E-02 z1 : -4.44938486415369E-01 2.81874394549227E-01 x2 : -3.97187500000000E-01 -7.06605585241396E-32 y2 : -2.70543524413651E-01 -6.36857625120939E-01 z2 : 1.89392111946294E+00 -9.09740668073787E-02 x3 : -8.62910696426389E-01 6.74601131887605E-01 y3 : -1.71699847062901E-01 -2.13799541238411E-01 z3 : -4.50529715455257E-01 -2.07146594145172E-01 =========================================================== solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -7.96340607593661E-01 1.14186052096105E-38 y1 : 6.45101520466892E-01 9.43866495242882E-39 z1 : -3.77027406150615E-01 -1.06830310674767E-38 x2 : -3.97187500000000E-01 1.12189514945684E-40 y2 : -8.80272341950868E-01 7.89897719580019E-38 z2 : 1.57206478678205E+00 5.37367390856856E-38 x3 : -8.67859631690733E-01 -2.08587273007673E-38 y3 : -2.45793504776309E-02 2.67828285805895E-39 z3 : -4.58160385161520E-01 2.05453977149119E-38 =========================================================== solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.49674132550946E+00 -1.30129037752096E+00 y1 : -2.03108584682287E+00 -2.95027772577844E-02 z1 : 1.16619457280153E+00 3.85043222714372E+00 x2 : -3.97187500000000E-01 -2.15547444640150E-30 y2 : -1.89241784269249E+00 -1.73249266404647E-01 z2 : -4.57277000068827E-01 7.16983366598781E-01 x3 : 3.69016259239373E+00 -1.63894913563023E+00 y3 : -1.20089422667598E+00 -7.37413413625644E-02 z3 : 1.39320947414899E+00 4.29990435152623E+00 =========================================================== solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -8.53729869852464E-01 -4.75775217067104E-40 y1 : 5.56043842813968E-01 -9.07563937733543E-41 z1 : -3.92968897230255E-01 6.94592679295645E-40 x2 : -3.97187500000000E-01 -7.88204175418935E-42 y2 : -1.69349464221869E+00 8.03219407311029E-40 z2 : 6.15095916601908E-01 2.51890964464152E-39 x3 : -7.06354608096206E-01 -4.61105306086093E-40 y3 : 3.29255260953962E-02 -4.12357574182857E-40 z3 : -7.98921799591847E-01 1.12050934989766E-39 =========================================================== solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.64657630748941E-02 1.82086718997155E+00 y1 : -2.60013311576901E-01 -2.44191989277683E-01 z1 : 2.12212319368553E+00 -1.04110750727843E-01 x2 : -3.97187500000000E-01 1.96056646172370E-31 y2 : 1.87677828745565E+00 5.47072413549543E-02 z2 : -1.85203921491711E-01 5.54380068816036E-01 x3 : 7.94652470812097E-01 2.72061893048497E+00 y3 : -1.26866634186489E+00 6.13793896384178E-01 z3 : 1.36239312623849E+00 -4.04504075147711E-01 =========================================================== solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.90068765115185E+00 -7.99938295244261E+00 y1 : -5.89159624289682E+00 -5.36046990884114E+00 z1 : -7.22070463327437E+00 1.16027637932974E+00 x2 : -3.97187500000000E-01 9.52901543714065E-32 y2 : 1.31524734188190E+00 -4.24787304085616E-01 z2 : -1.36538336113613E+00 -4.09189381141201E-01 x3 : -7.48368182081418E-01 4.07901426555947E+00 y3 : 6.08132720673979E+00 -4.50593810884582E-01 z3 : -2.41027247199097E+00 -1.89783240390497E+00 =========================================================== solution 33 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.55699779552188E-01 9.89966410689834E-46 y1 : -6.90618194317837E-01 -0.00000000000000E+00 z1 : 7.12634703472443E-01 2.23914996712583E-46 x2 : -3.97187500000000E-01 8.72710476255727E-48 y2 : -3.40997139038411E-01 -1.13593636406947E-45 z2 : -1.76917722148217E+00 1.97365446409604E-46 x3 : -6.63399245758240E-01 7.67553665581873E-46 y3 : -9.85596027349678E-02 -4.67233458622309E-46 z3 : 4.54763503315025E-01 5.52283654438976E-46 =========================================================== solution 34 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.93052559517862E-01 -8.00222848640946E-46 y1 : 4.34015781147816E-01 -1.83613974371544E-45 z1 : -1.33943703658158E-01 -9.81494068923492E-45 x2 : -3.97187500000000E-01 8.18166071489744E-47 y2 : -5.02507786785961E-01 3.87414086272112E-44 z2 : 1.73024651829248E+00 7.27432645338253E-45 x3 : 1.26337434367337E+00 2.93029602537247E-45 y3 : 3.73997952644466E-01 -7.28105473019764E-46 z3 : 4.85325214722802E-01 -1.09200100993186E-44 =========================================================== solution 35 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -8.35155706358641E-01 -8.24972008908190E-47 y1 : 5.91094683545441E-01 -1.05098907889436E-46 z1 : 3.81557362949416E-01 1.67936247534437E-46 x2 : -3.97187500000000E-01 3.05448666689505E-47 y2 : -1.76908191866830E+00 3.58716746548252E-46 z2 : -3.41491222265833E-01 -5.75179300965130E-46 x3 : -8.17068047668791E-01 6.39628054651563E-47 y3 : 9.80941487574727E-02 -1.58664695323825E-46 z3 : 8.47168047214600E-01 -1.40400129848382E-46 =========================================================== solution 36 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -8.17377439151422E-01 -8.07855938029755E-36 y1 : 3.30749510989353E-01 -5.43799864898791E-35 z1 : 6.44176127271546E-01 1.28227678395266E-36 x2 : -3.97187500000000E-01 1.96466807616954E-37 y2 : -2.54264100258083E-02 8.21694237307873E-35 z2 : -1.80156059779208E+00 2.40256203596620E-35 x3 : -3.92866299098061E-01 1.86808347190614E-35 y3 : -1.60367744054177E-01 -2.54188640421439E-36 z3 : 4.47290033884782E-01 -3.88609000345238E-36 =========================================================== solution 37 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.64657630748941E-02 -1.82086718997155E+00 y1 : -2.60013311576900E-01 2.44191989277683E-01 z1 : 2.12212319368553E+00 1.04110750727844E-01 x2 : -3.97187500000000E-01 1.52752161623388E-32 y2 : 1.87677828745565E+00 -5.47072413549544E-02 z2 : -1.85203921491711E-01 -5.54380068816036E-01 x3 : 7.94652470812097E-01 -2.72061893048497E+00 y3 : -1.26866634186489E+00 -6.13793896384178E-01 z3 : 1.36239312623849E+00 4.04504075147712E-01 =========================================================== solution 38 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -8.42970867656280E-01 -3.78457559030651E-42 y1 : 6.08348452846329E-01 -2.65887872382873E-42 z1 : -3.34329592172590E-01 3.97434191498388E-42 x2 : -3.97187500000000E-01 1.09472802141519E-43 y2 : -1.19919019185755E+00 -2.10600210453502E-41 z2 : 1.34469698207306E+00 -1.13639189513977E-41 x3 : -7.84565608446585E-01 6.28779962844672E-42 y3 : -3.40734253075663E-02 -1.36357412564334E-42 z3 : -5.44217553156221E-01 -4.60063145487179E-42 =========================================================== solution 39 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.41111035814941E+00 1.05571993852573E+01 y1 : -1.11444903155913E+01 3.60166955233147E+00 z1 : -1.20781906139012E+00 -3.41690191995156E+00 x2 : -3.97187500000000E-01 4.87377656061346E-33 y2 : 6.03162719189093E-02 -9.90019647861061E-01 z2 : 2.05514286444033E+00 2.90560307600379E-02 x3 : 5.00047689378091E+00 -5.61215031457144E+00 y3 : 5.84169934021285E+00 2.66885185496369E+00 z3 : 4.24607581166635E+00 4.20041425584203E+00 =========================================================== solution 40 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 7.39531070933881E-01 3.37908534848795E-43 y1 : -7.29179210834609E-01 2.57183209894148E-43 z1 : 3.37424767333409E-01 -7.64296522112285E-44 x2 : -3.97187500000000E-01 1.73145758489137E-44 y2 : -7.79438832082112E-02 9.18314871163523E-44 z2 : -1.80005328835403E+00 5.77434906066955E-45 x3 : 3.92434393156963E-01 2.61991651185280E-43 y3 : -1.47049721511945E-01 1.79417648110966E-44 z3 : 3.08803901917405E-01 -3.19488295477208E-44 =========================================================== SHAR_EOF fi # end of overwriting check if test -f 'rbpl24es' then echo shar: will not over-write existing file "'rbpl24es'" else cat << "SHAR_EOF" > 'rbpl24es' 9 9.54092867583359E-01*x1**2+ 9.54092867583359E-01*y1**2+ 9.54092867583359E-01*z1**2-1.13772139724992E+00; 5.43572795268742E-01*x2**2+ 5.43572795268742E-01*y2**2+ 5.43572795268742E-01*z2**2-1.08714559053748E+00*x2-2.28213602365629E+00; 7.81600091707744E-01*x3**2+ 7.81600091707744E-01*y3**2+ 7.81600091707744E-01*z3**2+ 1.56320018341549E-01*x3-2.81219712996446E+00*y3 -6.86682576570756E-01; 1.12433011006630E+00*x1*x2+ 1.12433011006630E+00*y1*y2+ 1.12433011006630E+00*z1*z2-1.12433011006630E+00*x2+ 5.02679559734816E-01; 1.05181466955401E+00*x1*x3+ 1.05181466955401E+00*y1*y3+ 1.05181466955401E+00*z1*z3+ 1.05181466955401E-01*x3-1.89221459052767E+00*y3 -8.47159933854882E-01; 1.18650070685780E+00*x2*x3+ 1.18650070685780E+00*y2*y3+ 1.18650070685780E+00*z2*z3-1.18650070685780E+00*x2+ 1.18650070685780E-01*x3 -2.13451477163718E+00*y3-8.32330245860744E-04; -6.39591378383803E-01*x1*y2*z3+ 6.39591378383803E-01*x1*z2*y3+ 6.39591378383803E-01*y1*x2*z3-6.39591378383803E-01*y1*z2*x3-6.39591378383803E-01*z1*x2*y3+ 6.39591378383803E-01*z1*y2*x3+ 1.16277712590175E+00*x1*y2+ 1.13207673973933E-02*x1*z2 -1.16277712590175E+00*x1*y3-1.13207673973933E-02*x1*z3-1.16277712590175E+00*y1*x2+ 3.47937709840789E-01*y1*z2+ 1.16277712590175E+00*y1*x3-3.47937709840789E-01*y1*z3 -1.13207673973933E-02*z1*x2-3.47937709840789E-01*z1*y2+ 1.13207673973933E-02*z1*x3+ 3.47937709840789E-01*z1*y3+ 1.16277712590175E+00*x2*y3+ 1.13207673973933E-02*x2*z3 -1.16277712590175E+00*y2*x3+ 3.47937709840789E-01*y2*z3-1.13207673973933E-02*z2*x3 -3.47937709840789E-01*z2*y3-2.03995206640848E+00*x1+ 6.63734403960113E-02*y1 -6.81733981016658E+00*z1+ 2.13713454346801E-01*x2+ 8.29545645161926E-03*y2-8.52041798251063E-01 *z2+ 1.64421548295483E+00*x3-4.63827060230442E+00*y3+ 4.64158967082591E+00* z3-1.08446328751850E-01; 9.73909033873207E-01*x1*y2*z3-9.73909033873207E-01*x1*z2*y3 -9.73909033873207E-01*y1*x2*z3+ 9.73909033873207E-01*y1*z2*x3+ 9.73909033873207E-01*z1*x2*y3 -9.73909033873207E-01*z1*y2*x3+ 1.76472316937825E+00*x1*y2+ 1.33425537640629E+00*x1*z2 -1.76472316937825E+00*x1*y3-1.33425537640629E+00*x1*z3-1.76472316937825E+00*y1*x2+ 1.00896975909264E+00*y1*z2+ 1.76472316937825E+00*y1*x3-1.00896975909264E+00*y1*z3 -1.33425537640629E+00*z1*x2-1.00896975909264E+00*z1*y2+ 1.33425537640629E+00*z1*x3+ 1.00896975909264E+00*z1*y3+ 1.76472316937825E+00*x2*y3+ 1.33425537640629E+00*x2*z3 -1.76472316937825E+00*y2*x3+ 1.00896975909264E+00*y2*z3-1.33425537640629E+00*z2*x3 -1.00896975909264E+00*z2*y3+ 2.95184898583761E-01*x1-3.90350686351112E-01*y1+ 5.16288645013296E-01*z1+ 4.99000016244640E-01*x2-3.35771130773653E-01*y2+ 4.44100210921065E-01 *z2+ 1.98673078354834E-01*x3+ 9.10584942459657E-02*y3+ 3.84610702968974E-01 *z3+ 3.53818104040334E-01; 1.43144710355625E+00*x2+ 5.68552896443749E-01; TITLE : parallel robot with 24 real solutions, after equation scaling ROOT COUNTS : total degree : 576 3-homogeneous Bezout number : 80 with partition : {x1 y1 z1 }{x2 y2 z2 }{x3 y3 z3 } generalized Bezout number : 80 based on the set structure : {x1 y1 z1 }{x1 y1 z1 } {x2 y2 z2 }{x2 y2 z2 } {x3 y3 z3 }{x3 y3 z3 } {x1 y1 z1 }{x2 y2 z2 } {x1 y1 z1 }{x3 y3 z3 } {x2 y2 z2 }{x3 y3 z3 } {x1 y1 z1 }{x2 y2 z2 }{x3 y3 z3 } {x1 y1 z1 }{x2 y2 z2 }{x3 y3 z3 } {x2 } mixed volume : 80 REFERENCES : From the FRISCO test suite, see http://www.inria.fr/safir/POL/index.html. ORIGIN OF THE PROBLEM This system was generated by Fabrice Rouillier, as a deformation of a system found in Innocenti (?). Added to the list by Jean-Charles Faug\`ere (October 1996). THE SOLUTIONS : 40 9 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.60927915037453E-01 8.51188283602750E-01 y1 : 2.96903318580811E-01 -2.23600559834163E-01 z1 : 1.35057031555164E+00 -1.15292801937443E-01 x2 : -3.97187500000000E-01 -8.80566557837057E-32 y2 : 1.58367243700197E+00 2.31508118725500E-01 z2 : -9.67226981458723E-01 3.79055830323113E-01 x3 : 5.01336328968350E-01 1.89993451405436E+00 y3 : -9.25382696154252E-01 2.75038127785784E-01 z3 : 6.37698531378697E-01 -6.16577442932776E-01 =========================================================== solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.76222522188102E+00 2.25601382968529E+00 y1 : -5.30726405899260E-01 3.40974976009772E-01 z1 : -2.43443218060270E+00 -1.70740796487254E+00 x2 : -3.97187500000000E-01 7.82610947147733E-32 y2 : 1.80879716576422E+00 1.10392481395847E-02 z2 : 1.04757018233379E-01 -1.90610243435568E-01 x3 : -3.13207074319612E-01 1.62600891961031E+00 y3 : 4.49105154709594E-01 1.67128564166409E+00 z3 : -2.91412061063636E+00 -8.93146449655552E-01 =========================================================== solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -8.68845002714886E-01 -1.97993282137966E-46 y1 : -3.77102100144573E-01 2.96749857570171E-46 z1 : 5.43476188368840E-01 -1.58606456004747E-46 x2 : -3.97187500000000E-01 -4.90899642893848E-47 y2 : 1.12013020914507E+00 2.39144497698835E-46 z2 : -1.41123187478329E+00 -3.60896816291846E-46 x3 : -1.24213654470921E+00 -2.55851221860625E-46 y3 : 1.82329219297354E-01 3.11488972414872E-47 z3 : 4.54819414781284E-01 -1.56000144275981E-46 =========================================================== solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.80796179012321E-01 2.75870639778900E-44 y1 : 4.03173199840368E-01 7.59679635379635E-44 z1 : -2.60680314111560E-01 2.77057489265704E-43 x2 : -3.97187500000000E-01 -1.49669846677857E-45 y2 : 3.68572446290782E-02 -1.18615670858622E-42 z2 : 1.80136299322543E+00 -1.33170925211691E-43 x3 : 1.28892076284168E+00 -4.22154516070031E-44 y3 : 3.57139933658504E-01 4.95890444084475E-44 z3 : 3.41905928051848E-01 3.19488295477207E-43 =========================================================== solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -7.53351901004135E-01 -4.36525664759936E-35 y1 : 5.82986827304929E-01 -1.21080438668871E-35 z1 : -5.33901931484037E-01 6.09081472377513E-35 x2 : -3.97187500000000E-01 4.47714270126398E-38 y2 : -1.79224079004278E+00 3.51787845347434E-35 z2 : 1.84770236646933E-01 1.76704562645256E-34 x3 : -6.19359113296997E-01 -3.62627968075898E-35 y3 : 1.10131615707616E-01 -3.26431727699111E-35 z3 : -1.00147425926630E+00 8.57619862830868E-35 =========================================================== solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.41111035814943E+00 -1.05571993852573E+01 y1 : -1.11444903155913E+01 -3.60166955233149E+00 z1 : -1.20781906139012E+00 3.41690191995156E+00 x2 : -3.97187500000000E-01 7.60011165303484E-30 y2 : 6.03162719189098E-02 9.90019647861061E-01 z2 : 2.05514286444033E+00 -2.90560307600381E-02 x3 : 5.00047689378091E+00 5.61215031457144E+00 y3 : 5.84169934021285E+00 -2.66885185496370E+00 z3 : 4.24607581166635E+00 -4.20041425584203E+00 =========================================================== solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.24832555668770E-01 -3.10875852060892E-42 y1 : -5.61397427180790E-01 -1.62064988880990E-42 z1 : -1.48262175655007E-01 5.88508322026460E-42 x2 : -3.97187500000000E-01 -3.44951033686745E-42 y2 : 1.20364727903326E+00 -9.79535862574426E-42 z2 : -1.34070888619401E+00 -1.18258668762512E-41 x3 : 9.93173184314215E-01 -5.23983302370560E-42 y3 : 8.76873571479193E-02 -3.31723296062942E-42 z3 : 3.66391527050073E-02 1.02236254552706E-42 =========================================================== solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.51664652259260E-01 1.18435203899897E-01 y1 : 9.43285027311184E-01 -7.62481850160367E-02 z1 : -4.44938486415369E-01 -2.81874394549227E-01 x2 : -3.97187500000000E-01 3.58839527633856E-32 y2 : -2.70543524413652E-01 6.36857625120939E-01 z2 : 1.89392111946294E+00 9.09740668073788E-02 x3 : -8.62910696426389E-01 -6.74601131887605E-01 y3 : -1.71699847062901E-01 2.13799541238411E-01 z3 : -4.50529715455257E-01 2.07146594145172E-01 =========================================================== solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -5.13765913689658E-01 9.29248470834188E-44 y1 : -4.02040338567713E-01 -1.13951945306946E-43 z1 : 8.75712368357895E-01 4.77685326320178E-44 x2 : -3.97187500000000E-01 8.65728792445681E-45 y2 : 1.75913297406388E+00 1.72184038343161E-44 z2 : -3.89510294350373E-01 1.27035679334730E-43 x3 : -1.90107783864834E-01 2.12868216588040E-43 y3 : 1.27320250792110E-01 -1.59482353876415E-44 z3 : 1.14992539035157E+00 7.98720738693017E-44 =========================================================== solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.47847985949589E-01 7.24475898715818E-41 y1 : 5.18234841145665E-01 1.94477986657187E-41 z1 : 1.59627206183739E-01 -1.95659909660745E-41 x2 : -3.97187500000000E-01 4.11137396205979E-41 y2 : -1.29010194920263E+00 -1.25380590409526E-40 z2 : 1.25773767157836E+00 -7.09552012575073E-41 x3 : 1.07676727911179E+00 -2.51511985137869E-41 y3 : 3.52370234126145E-01 -5.81791626941160E-41 z3 : 8.04637863451363E-01 -6.54312029137321E-41 =========================================================== solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -6.31242531037861E-01 -4.89815810847513E-34 y1 : 2.11799613513023E-01 1.22354969602228E-34 z1 : -8.65527463876592E-01 3.38521070963502E-34 x2 : -3.97187500000000E-01 2.89453109420001E-36 y2 : -1.57196053617992E+00 1.19145664409642E-34 z2 : 8.80458495635476E-01 2.97607684455168E-34 x3 : -1.13806647386946E+00 -3.34057279682040E-34 y3 : 1.06388212448939E-01 7.70592930961836E-35 z3 : -4.27135028382625E-01 4.28809931415435E-34 =========================================================== solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.45762200930782E-01 -3.46018339685167E-41 y1 : -1.67451146323380E-01 -2.02581236101237E-42 z1 : -8.64531834835485E-01 6.03794252468706E-42 x2 : -3.97187500000000E-01 2.68096658305760E-43 y2 : 1.76992806959149E+00 -1.46930379386164E-42 z2 : 3.37078208010970E-01 7.39116679765701E-42 x3 : 7.16698057815403E-02 -1.67674656758579E-41 y3 : 1.03033687641844E-01 5.10343532404525E-43 z3 : -1.10416880282373E+00 1.38018943646154E-41 =========================================================== solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.90068765115185E+00 7.99938295244261E+00 y1 : -5.89159624289682E+00 5.36046990884114E+00 z1 : -7.22070463327437E+00 -1.16027637932974E+00 x2 : -3.97187500000000E-01 6.82289781171077E-32 y2 : 1.31524734188190E+00 4.24787304085616E-01 z2 : -1.36538336113613E+00 4.09189381141201E-01 x3 : -7.48368182081418E-01 -4.07901426555947E+00 y3 : 6.08132720673979E+00 4.50593810884582E-01 z3 : -2.41027247199097E+00 1.89783240390497E+00 =========================================================== solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.76222522188102E+00 -2.25601382968529E+00 y1 : -5.30726405899260E-01 -3.40974976009772E-01 z1 : -2.43443218060270E+00 1.70740796487254E+00 x2 : -3.97187500000000E-01 -1.52100241508788E-31 y2 : 1.80879716576422E+00 -1.10392481395847E-02 z2 : 1.04757018233379E-01 1.90610243435567E-01 x3 : -3.13207074319611E-01 -1.62600891961030E+00 y3 : 4.49105154709598E-01 -1.67128564166409E+00 z3 : -2.91412061063636E+00 8.93146449655552E-01 =========================================================== solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.60927915037453E-01 -8.51188283602750E-01 y1 : 2.96903318580811E-01 2.23600559834163E-01 z1 : 1.35057031555164E+00 1.15292801937443E-01 x2 : -3.97187500000000E-01 5.35455469992301E-32 y2 : 1.58367243700197E+00 -2.31508118725501E-01 z2 : -9.67226981458723E-01 -3.79055830323114E-01 x3 : 5.01336328968349E-01 -1.89993451405436E+00 y3 : -9.25382696154252E-01 -2.75038127785783E-01 z3 : 6.37698531378698E-01 6.16577442932776E-01 =========================================================== solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -8.59361304931823E-01 7.08645559675221E-36 y1 : -1.14536036212683E-01 1.27453093335654E-35 z1 : 6.63960574126625E-01 -4.40782644483727E-37 x2 : -3.97187500000000E-01 -2.26917011589995E-39 y2 : 6.80577142510713E-01 -2.67050627125059E-35 z2 : -1.66825712734449E+00 -6.58767009861700E-36 x3 : -2.36579109387859E-01 -5.49436315266512E-36 y3 : -1.86544310915698E-01 8.02700969751911E-37 z3 : 4.04871505874547E-01 1.20602793210591E-36 =========================================================== solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.06924880449655E-01 -1.13537267709195E-41 y1 : 1.12822207973228E-01 3.84904348592350E-42 z1 : -1.06626321480155E+00 3.97434191498388E-42 x2 : -3.97187500000000E-01 -7.98704627869241E-44 y2 : -1.66317221622769E+00 8.57093879752627E-43 z2 : 6.92910722252173E-01 1.29345418958998E-42 x3 : -7.92572473873798E-01 -8.64572448911427E-42 y3 : 3.59141187994599E-02 1.84999530496641E-42 z3 : -7.32688572275859E-01 5.36740336401709E-42 =========================================================== solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.49613996223585E-01 -2.19640547651717E-43 y1 : -8.08220016454984E-01 -4.30485126715128E-43 z1 : -5.80595951933320E-01 1.91074130528072E-44 x2 : -3.97187500000000E-01 9.49508998166231E-45 y2 : -2.85694288028108E-02 -1.83662974232705E-43 z2 : 1.80151349636400E+00 9.23895849707127E-44 x3 : -4.86395530854822E-01 1.30995825592640E-43 y3 : -1.44236229493533E-01 -4.78447061629241E-44 z3 : -4.46645777008107E-01 6.38976590954415E-44 =========================================================== solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.70249860420889E-01 -7.95842181275884E-40 y1 : -2.67972394831736E-01 1.47479139881701E-40 z1 : -9.48430210601854E-01 2.73923873525043E-40 x2 : -3.97187500000000E-01 1.06975034941637E-40 y2 : 1.69609054813755E+00 1.56725738011908E-41 z2 : 6.07901260372304E-01 1.89213870020019E-40 x3 : -8.95358221355674E-01 -6.03628764330885E-40 y3 : 2.51314507461867E-01 -3.26619860738897E-41 z3 : -1.04739482331590E+00 3.31245464750769E-40 =========================================================== solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.12970217447204E+00 -2.85539557121356E-01 y1 : -4.81112547431015E-01 4.77265621986960E-01 z1 : -7.41109017768564E-01 -7.45090296479987E-01 x2 : -3.97187500000000E-01 5.02638552979145E-31 y2 : -2.51735932126628E+00 -4.63096963472948E-01 z2 : 6.42763329149331E-01 -1.81370250103035E+00 x3 : 3.69517980821657E-01 -4.12224408148848E-01 y3 : -4.03690539639678E-01 1.17105598424810E-01 z3 : -4.57678328543319E-01 -9.86487970679366E-01 =========================================================== solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.02465879869054E+00 1.05596417140249E-43 y1 : 3.56291264945708E-02 -1.07621281678782E-43 z1 : 3.75857568250670E-01 -1.91074130528072E-44 x2 : -3.97187500000000E-01 2.22017545159457E-44 y2 : 1.26462869909052E+00 -3.06104957054509E-44 z2 : -1.28334770942265E+00 -0.00000000000000E+00 x3 : 3.79655252330549E-01 -1.63744781990800E-44 y3 : -1.53848099986028E-01 -5.98058827036554E-45 z3 : 2.85089700432471E-01 0.00000000000000E+00 =========================================================== solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.20201863228470E-01 3.60925253897334E-48 y1 : 6.50130738926866E-01 -5.60269913381182E-48 z1 : 3.11549235047937E-01 -4.66489576484549E-48 x2 : -3.97187500000000E-01 1.09088809531966E-48 y2 : 6.53035213444466E-02 1.12098983296329E-47 z2 : -1.80055617517026E+00 -5.63901275456011E-48 x3 : 9.81087705339315E-01 9.99418835393063E-48 y3 : 7.97362227120991E-02 3.65026139548677E-48 z3 : -1.85050660608453E-02 -0.00000000000000E+00 =========================================================== solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.24033336703691E-01 -6.75817069697591E-42 y1 : -6.84488003521169E-01 -1.62064988880990E-42 z1 : -7.37655680110672E-01 -4.89149774151862E-42 x2 : -3.97187500000000E-01 -3.48525655797488E-42 y2 : -7.68706520759768E-01 1.95907172514886E-42 z2 : 1.62952673337541E+00 2.95646671906281E-42 x3 : 6.42714680699141E-02 -7.27026832039152E-42 y3 : -1.64821139715059E-01 5.10343532404525E-43 z3 : -4.91306845043299E-01 -3.06708763658120E-42 =========================================================== solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.49674132550947E+00 1.30129037752096E+00 y1 : -2.03108584682287E+00 2.95027772577835E-02 z1 : 1.16619457280153E+00 -3.85043222714373E+00 x2 : -3.97187500000000E-01 3.18755509853904E-31 y2 : -1.89241784269248E+00 1.73249266404645E-01 z2 : -4.57277000068823E-01 -7.16983366598777E-01 x3 : 3.69016259239375E+00 1.63894913563023E+00 y3 : -1.20089422667598E+00 7.37413413625633E-02 z3 : 1.39320947414899E+00 -4.29990435152624E+00 =========================================================== solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.05989335239952E+00 -8.65045849212916E-42 y1 : -2.44995777916945E-01 -1.94477986657187E-41 z1 : -9.52215854844104E-02 5.38064751567049E-41 x2 : -3.97187500000000E-01 -9.50402653693917E-42 y2 : 1.79373551975195E+00 -5.48540083041679E-41 z2 : -1.69646618073993E-01 -1.89213870020019E-40 x3 : 1.09864715987124E+00 -4.61105306086093E-41 y3 : 2.10483876737831E-01 -2.85792378146534E-41 z3 : 4.05983389153723E-01 -2.45367010926496E-41 =========================================================== solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.12970217447204E+00 2.85539557121357E-01 y1 : -4.81112547431014E-01 -4.77265621986961E-01 z1 : -7.41109017768565E-01 7.45090296479987E-01 x2 : -3.97187500000000E-01 9.01342329179742E-32 y2 : -2.51735932126628E+00 4.63096963472947E-01 z2 : 6.42763329149330E-01 1.81370250103035E+00 x3 : 3.69517980821657E-01 4.12224408148848E-01 y3 : -4.03690539639678E-01 -1.17105598424810E-01 z3 : -4.57678328543319E-01 9.86487970679366E-01 =========================================================== solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.51664652259260E-01 -1.18435203899896E-01 y1 : 9.43285027311184E-01 7.62481850160367E-02 z1 : -4.44938486415369E-01 2.81874394549227E-01 x2 : -3.97187500000000E-01 -7.06605585241396E-32 y2 : -2.70543524413651E-01 -6.36857625120939E-01 z2 : 1.89392111946294E+00 -9.09740668073787E-02 x3 : -8.62910696426389E-01 6.74601131887605E-01 y3 : -1.71699847062901E-01 -2.13799541238411E-01 z3 : -4.50529715455257E-01 -2.07146594145172E-01 =========================================================== solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -7.96340607593661E-01 1.14186052096105E-38 y1 : 6.45101520466892E-01 9.43866495242882E-39 z1 : -3.77027406150615E-01 -1.06830310674767E-38 x2 : -3.97187500000000E-01 1.12189514945684E-40 y2 : -8.80272341950868E-01 7.89897719580019E-38 z2 : 1.57206478678205E+00 5.37367390856856E-38 x3 : -8.67859631690733E-01 -2.08587273007673E-38 y3 : -2.45793504776309E-02 2.67828285805895E-39 z3 : -4.58160385161520E-01 2.05453977149119E-38 =========================================================== solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.49674132550946E+00 -1.30129037752096E+00 y1 : -2.03108584682287E+00 -2.95027772577844E-02 z1 : 1.16619457280153E+00 3.85043222714372E+00 x2 : -3.97187500000000E-01 -2.15547444640150E-30 y2 : -1.89241784269249E+00 -1.73249266404647E-01 z2 : -4.57277000068827E-01 7.16983366598781E-01 x3 : 3.69016259239373E+00 -1.63894913563023E+00 y3 : -1.20089422667598E+00 -7.37413413625644E-02 z3 : 1.39320947414899E+00 4.29990435152623E+00 =========================================================== solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -8.53729869852464E-01 -4.75775217067104E-40 y1 : 5.56043842813968E-01 -9.07563937733543E-41 z1 : -3.92968897230255E-01 6.94592679295645E-40 x2 : -3.97187500000000E-01 -7.88204175418935E-42 y2 : -1.69349464221869E+00 8.03219407311029E-40 z2 : 6.15095916601908E-01 2.51890964464152E-39 x3 : -7.06354608096206E-01 -4.61105306086093E-40 y3 : 3.29255260953962E-02 -4.12357574182857E-40 z3 : -7.98921799591847E-01 1.12050934989766E-39 =========================================================== solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.64657630748941E-02 1.82086718997155E+00 y1 : -2.60013311576901E-01 -2.44191989277683E-01 z1 : 2.12212319368553E+00 -1.04110750727843E-01 x2 : -3.97187500000000E-01 1.96056646172370E-31 y2 : 1.87677828745565E+00 5.47072413549543E-02 z2 : -1.85203921491711E-01 5.54380068816036E-01 x3 : 7.94652470812097E-01 2.72061893048497E+00 y3 : -1.26866634186489E+00 6.13793896384178E-01 z3 : 1.36239312623849E+00 -4.04504075147711E-01 =========================================================== solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.90068765115185E+00 -7.99938295244261E+00 y1 : -5.89159624289682E+00 -5.36046990884114E+00 z1 : -7.22070463327437E+00 1.16027637932974E+00 x2 : -3.97187500000000E-01 9.52901543714065E-32 y2 : 1.31524734188190E+00 -4.24787304085616E-01 z2 : -1.36538336113613E+00 -4.09189381141201E-01 x3 : -7.48368182081418E-01 4.07901426555947E+00 y3 : 6.08132720673979E+00 -4.50593810884582E-01 z3 : -2.41027247199097E+00 -1.89783240390497E+00 =========================================================== solution 33 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.55699779552188E-01 9.89966410689834E-46 y1 : -6.90618194317837E-01 -0.00000000000000E+00 z1 : 7.12634703472443E-01 2.23914996712583E-46 x2 : -3.97187500000000E-01 8.72710476255727E-48 y2 : -3.40997139038411E-01 -1.13593636406947E-45 z2 : -1.76917722148217E+00 1.97365446409604E-46 x3 : -6.63399245758240E-01 7.67553665581873E-46 y3 : -9.85596027349678E-02 -4.67233458622309E-46 z3 : 4.54763503315025E-01 5.52283654438976E-46 =========================================================== solution 34 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.93052559517862E-01 -8.00222848640946E-46 y1 : 4.34015781147816E-01 -1.83613974371544E-45 z1 : -1.33943703658158E-01 -9.81494068923492E-45 x2 : -3.97187500000000E-01 8.18166071489744E-47 y2 : -5.02507786785961E-01 3.87414086272112E-44 z2 : 1.73024651829248E+00 7.27432645338253E-45 x3 : 1.26337434367337E+00 2.93029602537247E-45 y3 : 3.73997952644466E-01 -7.28105473019764E-46 z3 : 4.85325214722802E-01 -1.09200100993186E-44 =========================================================== solution 35 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -8.35155706358641E-01 -8.24972008908190E-47 y1 : 5.91094683545441E-01 -1.05098907889436E-46 z1 : 3.81557362949416E-01 1.67936247534437E-46 x2 : -3.97187500000000E-01 3.05448666689505E-47 y2 : -1.76908191866830E+00 3.58716746548252E-46 z2 : -3.41491222265833E-01 -5.75179300965130E-46 x3 : -8.17068047668791E-01 6.39628054651563E-47 y3 : 9.80941487574727E-02 -1.58664695323825E-46 z3 : 8.47168047214600E-01 -1.40400129848382E-46 =========================================================== solution 36 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -8.17377439151422E-01 -8.07855938029755E-36 y1 : 3.30749510989353E-01 -5.43799864898791E-35 z1 : 6.44176127271546E-01 1.28227678395266E-36 x2 : -3.97187500000000E-01 1.96466807616954E-37 y2 : -2.54264100258083E-02 8.21694237307873E-35 z2 : -1.80156059779208E+00 2.40256203596620E-35 x3 : -3.92866299098061E-01 1.86808347190614E-35 y3 : -1.60367744054177E-01 -2.54188640421439E-36 z3 : 4.47290033884782E-01 -3.88609000345238E-36 =========================================================== solution 37 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.64657630748941E-02 -1.82086718997155E+00 y1 : -2.60013311576900E-01 2.44191989277683E-01 z1 : 2.12212319368553E+00 1.04110750727844E-01 x2 : -3.97187500000000E-01 1.52752161623388E-32 y2 : 1.87677828745565E+00 -5.47072413549544E-02 z2 : -1.85203921491711E-01 -5.54380068816036E-01 x3 : 7.94652470812097E-01 -2.72061893048497E+00 y3 : -1.26866634186489E+00 -6.13793896384178E-01 z3 : 1.36239312623849E+00 4.04504075147712E-01 =========================================================== solution 38 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -8.42970867656280E-01 -3.78457559030651E-42 y1 : 6.08348452846329E-01 -2.65887872382873E-42 z1 : -3.34329592172590E-01 3.97434191498388E-42 x2 : -3.97187500000000E-01 1.09472802141519E-43 y2 : -1.19919019185755E+00 -2.10600210453502E-41 z2 : 1.34469698207306E+00 -1.13639189513977E-41 x3 : -7.84565608446585E-01 6.28779962844672E-42 y3 : -3.40734253075663E-02 -1.36357412564334E-42 z3 : -5.44217553156221E-01 -4.60063145487179E-42 =========================================================== solution 39 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.41111035814941E+00 1.05571993852573E+01 y1 : -1.11444903155913E+01 3.60166955233147E+00 z1 : -1.20781906139012E+00 -3.41690191995156E+00 x2 : -3.97187500000000E-01 4.87377656061346E-33 y2 : 6.03162719189093E-02 -9.90019647861061E-01 z2 : 2.05514286444033E+00 2.90560307600379E-02 x3 : 5.00047689378091E+00 -5.61215031457144E+00 y3 : 5.84169934021285E+00 2.66885185496369E+00 z3 : 4.24607581166635E+00 4.20041425584203E+00 =========================================================== solution 40 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 7.39531070933881E-01 3.37908534848795E-43 y1 : -7.29179210834609E-01 2.57183209894148E-43 z1 : 3.37424767333409E-01 -7.64296522112285E-44 x2 : -3.97187500000000E-01 1.73145758489137E-44 y2 : -7.79438832082112E-02 9.18314871163523E-44 z2 : -1.80005328835403E+00 5.77434906066955E-45 x3 : 3.92434393156963E-01 2.61991651185280E-43 y3 : -1.47049721511945E-01 1.79417648110966E-44 z3 : 3.08803901917405E-01 -3.19488295477208E-44 =========================================================== SHAR_EOF fi # end of overwriting check if test -f 'rbpl24s' then echo shar: will not over-write existing file "'rbpl24s'" else cat << "SHAR_EOF" > 'rbpl24s' 9 9.02353177111246E-01*x1**2+ 5.06753420513951E-01*y1**2+ 1.15409618294195E+00*z1**2-1.89489327629418E+00; 5.47653292007868E-01*x2**2+ 4.01593017487710E-01*y2**2+ 9.14600572619008E-01*z2**2-1.37399826809834E+00*x2-3.61818267724270E+00; 1.26480638249588E+00*x3**2+ 2.99953816740793E-01*y3**2+ 1.20375754734237E+00*z3**2+ 3.46367554661357E-01*x3-3.03447482544876E+00*y3 -2.08334787313530E+00; 1.01542688946772E+00*x1*x2+ 6.51626823874782E-01*y1*y2+ 1.48403542964494E+00*z1*z2-1.34750418563480E+00*x2+ 7.55749719256342E-01; 1.49129677811074E+00*x1*x3+ 5.44238574067073E-01*y1*y3+ 1.64533483741959E+00*z1*z3+ 1.97899885395127E-01*x3-1.73377157331563E+00*y3 -2.18250318558661E+00; 3.63356727880623E+00*x2*x3+ 1.51526503944521E+00*y2*y3+ 4.58092916621510E+00*z2*z3-4.97526669091479E+00*x2+ 4.55809836346864E-01*x3 -3.99328243934042E+00*y3-4.37818922423922E-03; -1.50354584074328E+00*x1*y2*z3+ 1.13265335620253E+00*x1*z2*y3+ 1.31578980431683E+00*y1*x2*z3-1.74297802916645E+00*y1*z2*x3-9.91212703684361E-01*z1*x2*y3+ 1.74297802916645E+00*z1*y2*x3+ 3.83650902835643E+00*x1*y2+ 5.63687325659283E-02*x1*z2 -1.99884215008463E+00*x1*y3-3.89852390643551E-02*x1*z3-3.35742305082321E+00*y1*x2+ 1.29829675554826E+00*y1*z2+ 3.07590838122797E+00*y1*x3-8.97916399527476E-01*y1*z3 -4.93296589852189E-02*z1*x2-1.29829675554826E+00*z1*y2+ 4.51934442633164E-02*z1*x3+ 6.76419697992925E-01*z1*y3+ 2.11450869353619E+00*x2*y3+ 4.12411890141876E-02*x2*z3 -3.71821525452185E+00*y2*x3+ 1.08541804248264E+00*y2*z3-5.46306758971674E-02*z2*x3 -8.17668710448484E-01*z2*y3-9.85984231145044E+00*x1+ 2.40411038512531E-01*y1 -3.72647039170064E+01*z1+ 1.09272995041099E+00*x2+ 3.63213093186832E-02*y2-5.62995295895362E+00 *z2+ 7.70206259423188E+00*x3-1.05808258067104E+01*y3+ 2.12115567191798E+01* z3-6.95578779258571E-01; 8.46362685065152E-01*x1*y2*z3-6.37583178261945E-01*x1*z2*y3 -7.40672722829929E-01*y1*x2*z3+ 9.81141728306483E-01*y1*z2*x3+ 5.57964661021749E-01*z1*x2*y3 -9.81141728306483E-01*z1*y2*x3+ 2.15248618665415E+00*x1*y2+ 2.45598327418739E+00*x1*z2 -1.12145705524443E+00*x1*y3-1.69858520360145E+00*x1*z3-1.88369340101545E+00*y1*x2+ 1.39179304392241E+00*y1*z2+ 1.72574865667482E+00*y1*x3-9.62579466940477E-01*y1*z3 -2.14929113844038E+00*z1*x2-1.39179304392241E+00*z1*y2+ 1.96907643938610E+00*z1*x3+ 7.25131774700529E-01*z1*y3+ 1.18635215524219E+00*x2*y3+ 1.79687684671605E+00*x2*z3 -2.08611707028712E+00*y2*x3+ 1.16358396092368E+00*y2*z3-2.38025621924476E+00*z2*x3 -8.76552774681028E-01*z2*y3+ 5.27434073456527E-01*x1-5.22683827930675E-01*y1+ 1.04327631315449E+00*z1+ 9.43203889658043E-01*x2-5.43486300980384E-01*y2+ 1.08479802518778E+00 *z2+ 3.44041927386078E-01*x3+ 7.67905870025835E-02*y3+ 6.49757354494466E-01 *z3+ 8.38949001135772E-01; 1.41669698735990E+00*x2+ 7.05867245375851E-01; TITLE : parallel robot with 24 real solutions, after variable scaling ROOT COUNTS : total degree : 576 3-homogeneous Bezout number : 80 with partition : {x1 y1 z1 }{x2 y2 z2 }{x3 y3 z3 } generalized Bezout number : 80 based on the set structure : {x1 y1 z1 }{x1 y1 z1 } {x2 y2 z2 }{x2 y2 z2 } {x3 y3 z3 }{x3 y3 z3 } {x1 y1 z1 }{x2 y2 z2 } {x1 y1 z1 }{x3 y3 z3 } {x2 y2 z2 }{x3 y3 z3 } {x1 y1 z1 }{x2 y2 z2 }{x3 y3 z3 } {x1 y1 z1 }{x2 y2 z2 }{x3 y3 z3 } {x2 } mixed volume : 80 REFERENCES : From the FRISCO test suite, see http://www.inria.fr/safir/POL/index.html. ORIGIN OF THE PROBLEM This system was generated by Fabrice Rouillier, as a deformation of a system found in Innocenti (?). Added to the list by Jean-Charles Faug\`ere (October 1996). SCALING COEFFICIENTS : 2 -4.08203384682719E-01 -0.00000000000000E+00 -8.24407528116980E-01 0.00000000000000E+00 -2.30703709576502E-01 0.00000000000000E+00 -3.27045438823416E-01 0.00000000000000E+00 -5.50809767029575E-01 0.00000000000000E+00 4.28940515108969E-02 0.00000000000000E+00 -4.53387241620977E-01 0.00000000000000E+00 -1.49143937101211E+00 0.00000000000000E+00 -4.89073096348346E-01 0.00000000000000E+00 -1.52633976862650E+01 0.00000000000000E+00 -9.50228675506166E+00 0.00000000000000E+00 -1.23639494382057E+01 0.00000000000000E+00 -1.78523052813108E+01 0.00000000000000E+00 -1.84934105507899E+01 0.00000000000000E+00 -1.82897492694981E+01 0.00000000000000E+00 -4.46570387839262E+01 0.00000000000000E+00 -3.82928030870631E+01 0.00000000000000E+00 -1.08142795329781E+01 0.00000000000000E+00 THE SOLUTIONS : 40 9 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.46259746820609E-01 1.12955426610699E+00 y1 : 5.25758674056631E-01 -3.95953586570412E-01 z1 : 1.58476888852698E+00 -1.35285400158476E-01 x2 : -4.98248568094492E-01 -1.10461942169431E-31 y2 : 2.31993394717274E+00 3.39138025723382E-01 z2 : -9.38892796075255E-01 3.67951675483613E-01 x3 : 6.86455416144435E-01 2.60148778800089E+00 y3 : -2.60189257460010E+00 7.73322934815778E-01 z3 : 8.95037205805278E-01 -8.65392853409902E-01 =========================================================== solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.33852962448203E+00 2.99380301022409E+00 y1 : -9.39814390712137E-01 6.03801103100825E-01 z1 : -2.85658016959469E+00 -2.00348474388612E+00 x2 : -4.98248568094492E-01 9.81739817570874E-32 y2 : 2.64972089578713E+00 1.61714796014058E-02 z2 : 1.01688240343863E-01 -1.85026460024826E-01 x3 : -4.28859191161915E-01 2.22641481390854E+00 y3 : 1.26274607479665E+00 4.69914308874943E+00 z3 : -4.09009310886217E+00 -1.25356930169859E+00 =========================================================== solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.15298530102931E+00 -2.62743462060903E-46 y1 : -6.67775291646051E-01 5.25486924121806E-46 z1 : 6.37718854816069E-01 -1.86109952293140E-46 x2 : -4.98248568094492E-01 -6.15804989205242E-47 y2 : 1.64088736833027E+00 3.50324616081204E-46 z2 : -1.36989090071445E+00 -3.50324616081204E-46 x3 : -1.70079706862896E+00 -3.50324616081204E-46 y3 : 5.12653893134112E-01 8.75811540203011E-47 z3 : 6.38358531690091E-01 -2.18952885050753E-46 =========================================================== solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.30154811752771E+00 3.66089223804859E-44 y1 : 7.13942194975993E-01 1.34524652575182E-43 z1 : -3.05884149013526E-01 3.25101243723358E-43 x2 : -4.98248568094492E-01 -1.87752098931020E-45 y2 : 5.39924614563095E-02 -1.73761009576277E-42 z2 : 1.74859342209954E+00 -1.29269783333964E-43 x3 : 1.76485641974999E+00 -5.78035616533987E-44 y3 : 1.00416805429906E+00 1.39429197200319E-43 z3 : 4.79879616203879E-01 4.48415508583941E-43 =========================================================== solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -9.99722235434541E-01 -5.79283616085223E-35 y1 : 1.03235754582142E+00 -2.14410169589985E-35 z1 : -6.26484353163629E-01 7.14700565299951E-35 x2 : -4.98248568094492E-01 5.61631456191215E-38 y2 : -2.62546733350943E+00 5.15336723400491E-35 z2 : 1.79357531833213E-01 1.71528135671988E-34 x3 : -8.48058266066690E-01 -4.96528813787334E-35 y3 : 3.09656355504828E-01 -9.17825989122042E-35 z3 : -1.40561202291262E+00 1.20370621524202E-34 =========================================================== solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.52665330507256E+00 -1.40097435943149E+01 y1 : -1.97347489390471E+01 -6.37786407129209E+00 z1 : -1.41726354371939E+00 4.00941720363193E+00 x2 : -4.98248568094492E-01 9.53389708508669E-30 y2 : 8.83577711666688E-02 1.45028740525969E+00 z2 : 1.99493900327142E+00 -2.82048562396364E-02 x3 : 6.84690944720607E+00 7.68444406887870E+00 y3 : 1.64250684603384E+01 -7.50399359421374E+00 z3 : 5.95954929031248E+00 -5.89546134071447E+00 =========================================================== solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.22728258696031E+00 -4.12542267897226E-42 y1 : -9.94126870471606E-01 -2.86985925493723E-42 z1 : -1.73971899587774E-01 6.90559883219270E-42 x2 : -4.98248568094492E-01 -4.32720965783504E-42 y2 : 1.76323216708727E+00 -1.43492962746861E-41 z2 : -1.30143382991984E+00 -1.14794370197489E-41 x3 : 1.35990366575838E+00 -7.17464813734306E-42 y3 : 2.46549978076797E-01 -9.32704257854598E-42 z3 : 5.14246203284547E-02 1.43492962746861E-42 =========================================================== solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -5.99373540070105E-01 1.57167329954479E-01 y1 : 1.67037636220161E+00 -1.35020870918103E-01 z1 : -5.22094009071534E-01 -3.30753434908377E-01 x2 : -4.98248568094492E-01 4.50143271928932E-32 y2 : -3.96321292086873E-01 9.32937638815544E-01 z2 : 1.83844012779375E+00 8.83090500911156E-02 x3 : -1.18154158592456E+00 -9.23698471392142E-01 y3 : -4.82767355591948E-01 6.01138794914751E-01 z3 : -6.32337754928677E-01 2.90739118396484E-01 =========================================================== solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -6.81783914050381E-01 1.23314264860584E-43 y1 : -7.11936115544317E-01 -2.01786978862774E-43 z1 : 1.02756716972935E+00 5.60519385729927E-44 x2 : -4.98248568094492E-01 1.08600630985173E-44 y2 : 2.57696743895320E+00 2.52233723578467E-44 z2 : -3.78099883867150E-01 1.23314264860584E-43 x3 : -2.60305328667832E-01 2.91470080579562E-43 y3 : 3.57985530212458E-01 -4.48415508583942E-44 z3 : 1.61396954457405E+00 1.12103877145985E-43 =========================================================== solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.25782480418862E+00 9.61402850403971E-41 y1 : 9.17694232025007E-01 3.44383110592467E-41 z1 : 1.87307707869431E-01 -2.29588740394978E-41 x2 : -4.98248568094492E-01 5.15747899794749E-41 y2 : -1.88988027911556E+00 -1.83670992315982E-40 z2 : 1.22089319449757E+00 -6.88766221184934E-41 x3 : 1.47436498805986E+00 -3.44383110592467E-41 y3 : 9.90757120803229E-01 -1.63581977531422E-40 z3 : 1.12934370952935E+00 -9.18354961579912E-41 =========================================================== solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -8.37679168778077E-01 -6.50001356230692E-34 y1 : 3.75056380301136E-01 2.16667118743564E-34 z1 : -1.01561612981034E+00 3.97223051029867E-34 x2 : -4.98248568094492E-01 3.63102054568721E-36 y2 : -2.30277709347740E+00 1.74537401210093E-34 z2 : 8.54666127643258E-01 2.88889491658085E-34 x3 : -1.55829898967767E+00 -4.57408361791969E-34 y3 : 2.99131052640444E-01 2.16667118743564E-34 z3 : -5.99502309466843E-01 6.01853107621011E-34 =========================================================== solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.56947238353232E-01 -4.59177480789956E-41 y1 : -2.96523774409348E-01 -3.58732406867153E-42 z1 : -1.01444785155730E+00 7.08496503562628E-42 x2 : -4.98248568094492E-01 3.36311631437956E-43 y2 : 2.59278125751336E+00 -2.15239444120292E-42 z2 : 3.27203755976861E-01 7.17464813734306E-42 x3 : 9.81339741606159E-02 -2.29588740394978E-41 y3 : 2.89699156817054E-01 1.43492962746861E-42 z3 : -1.54974821390929E+00 1.93715499708263E-41 =========================================================== solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.84930593397544E+00 1.06154388097429E+01 y1 : -1.04328838207289E+01 9.49236123416957E+00 z1 : -8.47282657133029E+00 -1.36147661982595E+00 x2 : -4.98248568094492E-01 8.55892762219337E-32 y2 : 1.92671595846985E+00 6.22274192598696E-01 z2 : -1.32538548471669E+00 3.97202486643370E-01 x3 : -1.02470410017381E+00 -5.58519555302461E+00 y3 : 1.70988285913359E+01 1.26693171978864E+00 z3 : -3.38292066299126E+00 2.66368907609901E+00 =========================================================== solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.33852962448203E+00 -2.99380301022409E+00 y1 : -9.39814390712137E-01 -6.03801103100825E-01 z1 : -2.85658016959469E+00 2.00348474388612E+00 x2 : -4.98248568094492E-01 -1.90800887587298E-31 y2 : 2.64972089578713E+00 -1.61714796014059E-02 z2 : 1.01688240343863E-01 1.85026460024825E-01 x3 : -4.28859191161913E-01 -2.22641481390853E+00 y3 : 1.26274607479666E+00 -4.69914308874942E+00 z3 : -4.09009310886217E+00 1.25356930169859E+00 =========================================================== solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.46259746820609E-01 -1.12955426610699E+00 y1 : 5.25758674056631E-01 3.95953586570412E-01 z1 : 1.58476888852698E+00 1.35285400158476E-01 x2 : -4.98248568094492E-01 6.71697677298573E-32 y2 : 2.31993394717274E+00 -3.39138025723383E-01 z2 : -9.38892796075255E-01 -3.67951675483614E-01 x3 : 6.86455416144434E-01 -2.60148778800089E+00 y3 : -2.60189257460010E+00 -7.73322934815777E-01 z3 : 8.95037205805279E-01 8.65392853409902E-01 =========================================================== solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.14040012863480E+00 9.40395480657830E-36 y1 : -2.02821291519153E-01 2.25694915357879E-35 z1 : 7.79096096640188E-01 -5.17217514361807E-37 x2 : -4.98248568094492E-01 -2.84654164849086E-39 y2 : 9.96982696478198E-01 -3.91204519953657E-35 z2 : -1.61938679223227E+00 -6.39468926847324E-36 x3 : -3.23936251179146E-01 -7.52316384526264E-36 y3 : -5.24505439125416E-01 2.25694915357879E-36 z3 : 5.68254501926920E-01 1.69271186518409E-36 =========================================================== solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.74595980675728E-01 -1.50667610884204E-41 y1 : 1.99786431326132E-01 6.81591573047591E-42 z1 : -1.25116089872601E+00 4.66352128927299E-42 x2 : -4.98248568094492E-01 -1.00192840199224E-43 y2 : -2.43639378590532E+00 1.25556342403504E-42 z2 : 6.72612424918825E-01 1.25556342403504E-42 x3 : -1.08523088382053E+00 -1.18381694266161E-41 y3 : 1.00979496824354E-01 5.20161989957372E-42 z3 : -1.02835979728140E+00 7.53338054421022E-42 =========================================================== solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -5.96652253466382E-01 -2.91470080579562E-43 y1 : -1.43120220490814E+00 -7.62306364592701E-43 z1 : -6.81275451439798E-01 2.24207754291971E-44 x2 : -4.98248568094492E-01 1.19110369467609E-44 y2 : -4.18515762365907E-02 -2.69049305150365E-43 z2 : 1.74873951636210E+00 8.96831017167883E-44 x3 : -6.65997709024632E-01 1.79366203433577E-43 y3 : -4.05548078721566E-01 -1.34524652575182E-43 z3 : -6.26886480942298E-01 8.96831017167883E-44 =========================================================== solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -6.24036709864453E-01 -1.05610820581690E-39 y1 : -4.74527572355735E-01 2.61157192199288E-40 z1 : -1.11289480702602E+00 3.21424236552969E-40 x2 : -4.98248568094492E-01 1.34193946137602E-40 y2 : 2.48461610378979E+00 2.29588740394978E-41 z2 : 5.90093251149633E-01 1.83670992315982E-40 x3 : -1.22597040135476E+00 -8.26519465421921E-40 y3 : 7.06619384144305E-01 -9.18354961579912E-41 z3 : -1.47006350164991E+00 4.64917199299831E-40 =========================================================== solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.49915116923857E+00 -3.78920188519952E-01 y1 : -8.51957789553944E-01 8.45145624468257E-01 z1 : -8.69622633373734E-01 -8.74294294349669E-01 x2 : -4.98248568094492E-01 6.30530767687669E-31 y2 : -3.68769905327973E+00 -6.78394307617901E-01 z2 : 6.23934061898798E-01 -1.76057145332410E+00 x3 : 5.05962972641058E-01 -5.64438803433643E-01 y3 : -1.13505409371703E+00 3.29265057853237E-01 z3 : -6.42371139622051E-01 -1.38457812491502E+00 =========================================================== solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.35975522650065E+00 1.40129846432482E-43 y1 : 6.30923305038201E-02 -1.90576591148175E-43 z1 : 4.41033964557245E-01 -2.24207754291971E-44 x2 : -4.98248568094492E-01 2.78508069784557E-44 y2 : 1.85256431888342E+00 -4.48415508583942E-44 z2 : -1.24575300558654E+00 0.00000000000000E+00 x3 : 5.19843444751518E-01 -2.24207754291971E-44 y3 : -4.32573713160566E-01 -1.68155815718978E-44 z3 : 4.00135606910176E-01 0.00000000000000E+00 =========================================================== solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.08843428830724E+00 4.78959436048521E-48 y1 : 1.15125649957534E+00 -9.92130260386223E-48 z1 : 3.65574105444992E-01 -5.47382212626882E-48 x2 : -4.98248568094492E-01 1.36845553156720E-48 y2 : 9.56636312517403E-02 1.64214663788065E-47 z2 : -1.74781023917116E+00 -5.47382212626882E-48 x3 : 1.34335560805809E+00 1.36845553156720E-47 y3 : 2.24193824526289E-01 1.02634164867540E-47 z3 : -2.59726529156851E-02 0.00000000000000E+00 =========================================================== solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.62705894420853E-01 -8.96831017167883E-42 y1 : -1.21209660726985E+00 -2.86985925493723E-42 z1 : -8.65570462214048E-01 -5.73971850987445E-42 x2 : -4.98248568094492E-01 -4.37205120869343E-42 y2 : -1.12608410126760E+00 2.86985925493723E-42 z2 : 1.58179097596184E+00 2.86985925493723E-42 x3 : 8.80037906906443E-02 -9.95482429056350E-42 y3 : -4.63426538386724E-01 1.43492962746861E-42 z3 : -6.89570203070489E-01 -4.30478888240584E-42 =========================================================== solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.64028835663013E+00 1.72685424093404E+00 y1 : -3.59666239779711E+00 5.22437442807448E-02 z1 : 1.36842107046459E+00 -4.51812477343445E+00 x2 : -4.98248568094492E-01 3.99860207979700E-31 y2 : -2.77221746929490E+00 2.53794184367945E-01 z2 : -4.43881415020104E-01 -6.95979879293827E-01 x3 : 5.05275989716316E+00 2.24413322141200E+00 y3 : -3.37654657284355E+00 2.07338055195623E-01 z3 : 1.95542917771476E+00 -6.03509995185253E+00 =========================================================== solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.40651261405292E+00 -1.14794370197489E-41 y1 : -4.33840402871841E-01 -3.44383110592467E-41 z1 : -1.11733690911361E-01 6.31369036086190E-41 x2 : -4.98248568094492E-01 -1.19222473344755E-41 y2 : 2.62765697456975E+00 -8.03560591382423E-41 z2 : -1.64676948267080E-01 -1.83670992315982E-40 x3 : 1.50432404305758E+00 -6.31369036086190E-41 y3 : 5.91816162365236E-01 -8.03560591382423E-41 z3 : 5.69815077738853E-01 -3.44383110592467E-41 =========================================================== solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.49915116923857E+00 3.78920188519953E-01 y1 : -8.51957789553943E-01 -8.45145624468259E-01 z1 : -8.69622633373735E-01 8.74294294349669E-01 x2 : -4.98248568094492E-01 1.13068141589743E-31 y2 : -3.68769905327973E+00 6.78394307617900E-01 z2 : 6.23934061898797E-01 1.76057145332410E+00 x3 : 5.05962972641058E-01 5.64438803433643E-01 y3 : -1.13505409371703E+00 -3.29265057853238E-01 z3 : -6.42371139622052E-01 1.38457812491502E+00 =========================================================== solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -5.99373540070105E-01 -1.57167329954478E-01 y1 : 1.67037636220161E+00 1.35020870918103E-01 z1 : -5.22094009071534E-01 3.30753434908377E-01 x2 : -4.98248568094492E-01 -8.86395521143278E-32 y2 : -3.96321292086872E-01 -9.32937638815545E-01 z2 : 1.83844012779375E+00 -8.83090500911155E-02 x3 : -1.18154158592456E+00 9.23698471392142E-01 y3 : -4.82767355591948E-01 -6.01138794914751E-01 z3 : -6.32337754928677E-01 -2.90739118396484E-01 =========================================================== solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.05676963359314E+00 1.51528568660686E-38 y1 : 1.14235072094782E+00 1.67140603007544E-38 z1 : -4.42406660733893E-01 -1.25355452255658E-38 x2 : -4.98248568094492E-01 1.40735207369070E-40 y2 : -1.28951773178239E+00 1.15712725159069E-37 z2 : 1.52601233378252E+00 5.21625618177390E-38 x3 : -1.18831792192907E+00 -2.85608393051353E-38 y3 : -6.91096016405097E-02 7.53051068495528E-39 z3 : -6.43047726735498E-01 2.88363457936092E-38 =========================================================== solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.64028835663012E+00 -1.72685424093404E+00 y1 : -3.59666239779711E+00 -5.22437442807463E-02 z1 : 1.36842107046459E+00 4.51812477343444E+00 x2 : -4.98248568094492E-01 -2.70391705802376E-30 y2 : -2.77221746929491E+00 -2.53794184367948E-01 z2 : -4.43881415020108E-01 6.95979879293831E-01 x3 : 5.05275989716314E+00 -2.24413322141200E+00 y3 : -3.37654657284356E+00 -2.07338055195626E-01 z3 : 1.95542917771476E+00 6.03509995185251E+00 =========================================================== solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.13292703291587E+00 -6.31369036086190E-40 y1 : 9.84646702208063E-01 -1.60712118276485E-40 z1 : -4.61112520627923E-01 8.15040028402172E-40 x2 : -4.98248568094492E-01 -9.88756196427591E-42 y2 : -2.48081334122089E+00 1.17664229452426E-39 z2 : 5.97077145347896E-01 2.44512008520652E-39 x3 : -9.67176959714866E-01 -6.31369036086190E-40 y3 : 9.25764899413388E-02 -1.15942313899464E-39 z3 : -1.12132096904418E+00 1.57268287170560E-39 =========================================================== solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.14742852357005E-01 2.41634940478869E+00 y1 : -4.60433566674792E-01 -4.32417047783660E-01 z1 : 2.49011456586080E+00 -1.22164301121399E-01 x2 : -4.98248568094492E-01 2.45941635174298E-31 y2 : 2.74930696440458E+00 8.01410591042401E-02 z2 : -1.79778512207349E-01 5.38139922558904E-01 x3 : 1.08807892231556E+00 3.72521098548674E+00 y3 : -3.56710099320152E+00 1.72580035046457E+00 z3 : 1.91217711334618E+00 -5.67738797162219E-01 =========================================================== solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.84930593397544E+00 -1.06154388097429E+01 y1 : -1.04328838207289E+01 -9.49236123416957E+00 z1 : -8.47282657133029E+00 1.36147661982595E+00 x2 : -4.98248568094492E-01 1.19535944532636E-31 y2 : 1.92671595846985E+00 -6.22274192598696E-01 z2 : -1.32538548471669E+00 -3.97202486643370E-01 x3 : -1.02470410017381E+00 5.58519555302461E+00 y3 : 1.70988285913359E+01 -1.26693171978864E+00 z3 : -3.38292066299126E+00 -2.66368907609901E+00 =========================================================== solution 33 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -6.04728283945009E-01 1.31371731030452E-45 y1 : -1.22295199615663E+00 0.00000000000000E+00 z1 : 8.36210668888049E-01 2.62743462060903E-46 x2 : -4.98248568094492E-01 1.09476442525376E-47 y2 : -4.99529334640436E-01 -1.66404192638572E-45 z2 : -1.71735050827977E+00 1.91583774419409E-46 x3 : -9.08360274337164E-01 1.05097384824361E-45 y3 : -2.77119401062263E-01 -1.31371731030452E-45 z3 : 6.38280057552123E-01 7.75153767113571E-46 =========================================================== solution 34 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.31781272919326E+00 -1.06192149249615E-45 y1 : 7.68558474545379E-01 -3.25145034300368E-45 z1 : -1.57170501918536E-01 -1.15169217536696E-44 x2 : -4.98248568094492E-01 1.02634164867540E-46 y2 : -7.36127526150751E-01 5.67525878051551E-44 z2 : 1.67956025069636E+00 7.06123054288677E-45 x3 : 1.72987695229894E+00 4.01231161855504E-45 y3 : 1.05156763784901E+00 -2.04720947522454E-45 z3 : 6.81174728681293E-01 -1.53267019535527E-44 =========================================================== solution 35 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.10827851975141E+00 -1.09476442525376E-46 y1 : 1.04671499984662E+00 -1.86109952293140E-46 z1 : 4.47722144510226E-01 1.97057596545677E-46 x2 : -4.98248568094492E-01 3.83167548838817E-47 y2 : -2.59154172451066E+00 5.25486924121806E-46 z2 : -3.31487494305396E-01 -5.58329856879419E-46 x3 : -1.11877147988653E+00 8.75811540203011E-47 y3 : 2.75810687107598E-01 -4.46116503290909E-46 z3 : 1.18903664430142E+00 -1.97057596545677E-46 =========================================================== solution 36 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.08468618659228E+00 -1.07205084794993E-35 y1 : 5.85693771204214E-01 -9.62964972193618E-35 z1 : 7.55880884894742E-01 1.50463276905253E-36 x2 : -4.98248568094492E-01 2.46456158799668E-37 y2 : -3.72473438290526E-02 1.20370621524202E-34 z2 : -1.74878523798935E+00 2.33218079203142E-35 x3 : -5.37932687606027E-01 2.55787570738930E-35 y3 : -4.50904954451816E-01 -7.14700565299951E-36 z3 : 6.27790723066666E-01 -5.45429378781541E-36 =========================================================== solution 37 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.14742852357005E-01 -2.41634940478869E+00 y1 : -4.60433566674791E-01 4.32417047783660E-01 z1 : 2.49011456586080E+00 1.22164301121400E-01 x2 : -4.98248568094492E-01 1.91618683372945E-32 y2 : 2.74930696440458E+00 -8.01410591042403E-02 z2 : -1.79778512207349E-01 -5.38139922558904E-01 x3 : 1.08807892231556E+00 -3.72521098548674E+00 y3 : -3.56710099320152E+00 -1.72580035046457E+00 z3 : 1.91217711334618E+00 5.67738797162221E-01 =========================================================== solution 38 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.11864949049210E+00 -5.02225369614014E-42 y1 : 1.07726810687646E+00 -4.70836284013139E-42 z1 : -3.92304739774044E-01 4.66352128927299E-42 x2 : -4.98248568094492E-01 1.37327249503832E-43 y2 : -1.75670294576419E+00 -3.08509869905752E-41 z2 : 1.30530509753611E+00 -1.10310215111650E-41 x3 : -1.07426747298980E+00 8.60957776481168E-42 y3 : -9.58040307727667E-02 -3.83395259839270E-42 z3 : -7.63832648436614E-01 -6.45718332360876E-42 =========================================================== solution 39 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.52665330507253E+00 1.40097435943149E+01 y1 : -1.97347489390471E+01 6.37786407129206E+00 z1 : -1.41726354371939E+00 -4.00941720363193E+00 x2 : -4.98248568094492E-01 6.11386862008032E-33 y2 : 8.83577711666680E-02 -1.45028740525969E+00 z2 : 1.99493900327142E+00 2.82048562396362E-02 x3 : 6.84690944720607E+00 -7.68444406887871E+00 y3 : 1.64250684603384E+01 7.50399359421373E+00 z3 : 5.95954929031249E+00 5.89546134071447E+00 =========================================================== solution 40 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.81381548811226E-01 4.48415508583941E-43 y1 : -1.29123614000198E+00 4.55422000905566E-43 z1 : 3.95936640492523E-01 -8.96831017167883E-44 x2 : -4.98248568094492E-01 2.17201261970347E-44 y2 : -1.14180594676203E-01 1.34524652575182E-43 z2 : -1.74732208404517E+00 5.60519385729927E-45 x3 : 5.37341299838174E-01 3.58732406867153E-43 y3 : -4.13458756133003E-01 5.04467447156934E-44 z3 : 4.33419504536677E-01 -4.48415508583942E-44 =========================================================== SHAR_EOF fi # end of overwriting check if test -f 'redcyc5' then echo shar: will not over-write existing file "'redcyc5'" else cat << "SHAR_EOF" > 'redcyc5' 4 1 + y1 + y2 + y3 + y4; y1 + y1*y2 + y2*y3 + y3*y4 + y4; y1*y2 + y1*y2*y3 + y2*y3*y4 + y3*y4 + y4*y1; y1*y2*y3 + y1*y2*y3*y4 + y2*y3*y4 + y3*y4*y1 + y4*y1*y2; z0**5*y1*y2*y3*y4 - 1; TITLE : reduced cyclic 5-roots problem ROOT COUNTS : total degree : 4! = 24 multi-homogeneous Bezout bound : 24 generalized Bezout bound : 20 based on { y1 y2 y3 y4 } { y1 y3 }{ y2 y4 } { y1 }{ y2 }{ y3 }{ y4 } { y1 }{ y2 }{ y3 }{ y4 } mixed volume : 14 REFERENCES : See Ioannis Z. Emiris: `Sparse Elimination and Application in Kinematics' PhD Thesis, Computer Science, University of California at Berkeley, 1994, page 25. yi = zi/z0 This reduced the dimension of the problem by 1 and the mixed volume drops with 5. For the original problem, see G\"oran Bj\"ork and Ralf Fr\"oberg: `A faster way to count the solutions of inhomogeneous systems of algebraic equations, with applications to cyclic n-roots', in J. Symbolic Computation (1991) 12, pp 329--336. THE SYMMETRY GROUP : y1 y2 y3 y4 y4 y3 y2 y1 THE GENERATING SOLUTIONS : 7 4 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.00000000000000E+00 6.36727435230003E-73 y2 : -3.81966011250105E-01 2.47616224811668E-73 y3 : -2.61803398874990E+00 -5.65979942426670E-73 y4 : 1.00000000000000E+00 -1.06121239205001E-73 == err : 4.785E-15 = rco : 7.860E-02 = res : 2.145E-72 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 3.09016994374947E-01 -9.51056516295154E-01 y2 : -8.09016994374947E-01 -5.87785252292473E-01 y3 : -8.09016994374948E-01 5.87785252292473E-01 y4 : 3.09016994374947E-01 9.51056516295154E-01 == err : 7.337E-16 = rco : 1.617E-01 = res : 2.483E-16 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.00000000000000E+00 3.70920615068742E-68 y2 : 1.00000000000000E+00 4.82196799589365E-67 y3 : -2.61803398874989E+00 1.48368246027497E-67 y4 : -3.81966011250105E-01 -1.03857772219248E-66 == err : 4.655E-15 = rco : 4.742E-02 = res : 4.441E-16 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -3.81966011250105E-01 2.84867032372794E-65 y2 : -3.81966011250105E-01 5.19288861096239E-66 y3 : -3.81966011250105E-01 0.00000000000000E+00 y4 : 1.45898033750316E-01 -3.32344871101593E-65 == err : 4.869E-16 = rco : 3.777E-02 = res : 5.551E-17 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.00000000000000E+00 7.07474928033337E-73 y2 : 1.00000000000000E+00 -4.52783953941336E-72 y3 : -3.81966011250105E-01 -3.53737464016669E-73 y4 : -2.61803398874989E+00 3.96185959698669E-72 == err : 4.655E-15 = rco : 4.136E-02 = res : 4.441E-16 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 6.85410196624969E+00 -2.65993991496909E-75 y2 : -2.61803398874989E+00 3.45446742203778E-76 y3 : -2.61803398874990E+00 7.94527507068689E-76 y4 : -2.61803398874990E+00 1.41633164303549E-75 == err : 5.029E-15 = rco : 1.653E-02 = res : 1.066E-14 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -8.09016994374947E-01 5.87785252292473E-01 y2 : 3.09016994374947E-01 -9.51056516295154E-01 y3 : 3.09016994374947E-01 9.51056516295154E-01 y4 : -8.09016994374947E-01 -5.87785252292473E-01 == err : 7.252E-16 = rco : 1.925E-01 = res : 5.551E-16 == SHAR_EOF fi # end of overwriting check if test -f 'redcyc6' then echo shar: will not over-write existing file "'redcyc6'" else cat << "SHAR_EOF" > 'redcyc6' 5 1 + y1 + y2 + y3 + y4 + y5; y1 + y1*y2 + y2*y3 + y3*y4 + y4*y5 + y5; y1*y2 + y1*y2*y3 + y2*y3*y4 + y3*y4*y5 + y4*y5 + y5*y1; y1*y2*y3 + y1*y2*y3*y4 + y2*y3*y4*y5 + y3*y4*y5 + y4*y5*y1 + y5*y1*y2; y1*y2*y3*y4 + y1*y2*y3*y4*y5 + y2*y3*y4*y5 + y3*y4*y5*y1 + y4*y5*y1*y2 + y5*y1*y2*y3; z0**6*y1*y2*y3*y4*y5 - 1; TITLE : reduced cyclic 6-roots problem ROOT COUNTS : total degree : 5! = 120 3-homogeneous Bezout number = 96. with partition : {y1 y4 }{y2 y5 }{y3 } generalized Bezout bound : 84 based on { y1 y2 y3 y4 y5 } { y1 y3 y5 }{ y2 y4 } { y1 y4 }{ y2 y5 }{ y3 } { y1 }{ y2 }{ y3 }{ y4 }{ y5 } { y1 }{ y2 }{ y3 }{ y4 }{ y5 } mixed volume : 26 REFERENCES : See Ioannis Z. Emiris: `Sparse Elimination and Application in Kinematics' PhD Thesis, Computer Science, University of California at Berkeley, 1994, page 25. yi = zi/z0 This reduces the dimension of the problem by 1 and the mixed volume drops with 6. THE SYMMETRY GROUP : y1 y2 y3 y4 y5 y5 y4 y3 y2 y1 THE GENERATING SOLUTIONS : 13 5 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 4.35420544682339E-01 0.00000000000000E+00 y2 : -4.35420544682339E-01 -6.63257745031253E-75 y3 : -1.00000000000000E+00 -8.29072181289067E-75 y4 : -2.29663026288654E+00 -4.55989699708987E-75 y5 : 2.29663026288654E+00 2.10031619259897E-74 == err : 1.757E-15 = rco : 7.119E-02 = res : 1.665E-16 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.00000000000000E+00 -4.86389013022919E-74 y2 : -2.67949192431123E-01 -8.84343660041671E-74 y3 : -3.73205080756888E+00 8.40126477039588E-74 y4 : 1.00000000000000E+00 4.42171830020836E-74 y5 : 1.00000000000000E+00 -5.08497604523961E-74 == err : 2.459E-15 = rco : 1.787E-02 = res : 1.110E-16 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -3.66025403784439E-01 -9.30604859102100E-01 y2 : -7.32050807568877E-01 6.81250038633213E-01 y3 : 7.32050807568877E-01 -6.81250038633213E-01 y4 : 3.66025403784439E-01 9.30604859102100E-01 y5 : -1.00000000000000E+00 4.70224363277577E-17 == err : 5.957E-16 = rco : 1.413E-01 = res : 6.280E-16 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -3.73205080756888E+00 -7.82410672410628E-69 y2 : -3.73205080756888E+00 -4.92628941888173E-69 y3 : -3.73205080756888E+00 -3.62227163153069E-69 y4 : -3.73205080756888E+00 -2.39069927681025E-69 y5 : 1.39282032302755E+01 1.97051576755269E-68 == err : 8.118E-15 = rco : 2.117E-03 = res : 4.547E-13 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -2.67949192431123E-01 4.38555434438390E-79 y2 : -2.67949192431123E-01 1.48434147040686E-78 y3 : -2.67949192431123E-01 -1.34940133673351E-78 y4 : -2.67949192431123E-01 -2.19277717219195E-79 y5 : 7.17967697244908E-02 -3.20482817474208E-79 == err : 3.168E-16 = rco : 6.091E-03 = res : 1.110E-16 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.00000000000000E+00 1.35835186182401E-71 y2 : -3.73205080756888E+00 -5.09381948184003E-72 y3 : -2.67949192431123E-01 -6.22577936669337E-72 y4 : 1.00000000000000E+00 -6.79175930912004E-72 y5 : 1.00000000000000E+00 4.52783953941336E-72 == err : 2.749E-15 = rco : 1.733E-02 = res : 3.331E-16 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -2.67949192431123E-01 -7.73800702536462E-75 y2 : -3.73205080756888E+00 -3.53737464016668E-74 y3 : 1.00000000000000E+00 1.87923027758855E-74 y4 : 1.00000000000000E+00 1.21597253255730E-74 y5 : 1.00000000000000E+00 1.27124401130990E-74 == err : 2.613E-15 = rco : 1.997E-02 = res : 1.110E-16 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -1.00000000000000E+00 4.63650768835928E-69 y2 : -4.35420544682339E-01 2.02847211365718E-69 y3 : -1.89591050731465E-01 -2.89781730522455E-70 y4 : 1.89591050731465E-01 -2.31825384417964E-69 y5 : 4.35420544682339E-01 -3.76716249679191E-69 == err : 2.074E-16 = rco : 2.307E-02 = res : 2.220E-16 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -1.00000000000000E+00 -3.99971315179912E-17 y2 : 3.66025403784439E-01 -9.30604859102100E-01 y3 : 7.32050807568877E-01 6.81250038633213E-01 y4 : -7.32050807568877E-01 -6.81250038633213E-01 y5 : -3.66025403784439E-01 9.30604859102100E-01 == err : 5.225E-16 = rco : 1.207E-01 = res : 3.140E-16 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.00000000000000E+00 -5.48194293047987E-80 y2 : 1.00000000000000E+00 1.68675167091688E-80 y3 : 1.00000000000000E+00 1.68675167091688E-80 y4 : -2.67949192431123E-01 0.00000000000000E+00 y5 : -3.73205080756888E+00 -4.21687917729221E-80 == err : 2.358E-15 = rco : 1.905E-02 = res : 6.661E-16 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 5.00000000000000E-01 8.66025403784439E-01 y2 : -5.00000000000000E-01 8.66025403784439E-01 y3 : -1.00000000000000E+00 -1.29604050740420E-16 y4 : -5.00000000000000E-01 -8.66025403784439E-01 y5 : 5.00000000000000E-01 -8.66025403784439E-01 == err : 5.178E-16 = rco : 1.754E-01 = res : 4.710E-16 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 2.29663026288654E+00 1.62277769092575E-68 y2 : 5.27451056440629E+00 3.94103153510539E-68 y3 : -5.27451056440629E+00 -3.59329345847844E-68 y4 : -2.29663026288654E+00 -1.44890865261227E-68 y5 : -1.00000000000000E+00 -1.73869038313473E-69 == err : 1.791E-15 = rco : 3.857E-03 = res : 1.421E-14 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -3.66025403784439E-01 -9.30604859102100E-01 y2 : 3.66025403784439E-01 9.30604859102100E-01 y3 : -1.00000000000000E+00 -5.41719466407389E-17 y4 : 3.66025403784439E-01 -9.30604859102100E-01 y5 : -3.66025403784439E-01 9.30604859102100E-01 == err : 7.381E-16 = rco : 1.626E-01 = res : 4.578E-16 == SHAR_EOF fi # end of overwriting check if test -f 'redcyc7' then echo shar: will not over-write existing file "'redcyc7'" else cat << "SHAR_EOF" > 'redcyc7' 6 1 + y1 + y2 + y3 + y4 + y5 + y6; y1 + y1*y2 + y2*y3 + y3*y4 + y4*y5 + y5*y6 + y6; y1*y2 + y1*y2*y3 + y2*y3*y4 + y3*y4*y5 + y4*y5*y6 + y5*y6 + y6*y1; y1*y2*y3 + y1*y2*y3*y4 + y2*y3*y4*y5 + y3*y4*y5*y6 + y4*y5*y6 + y5*y6*y1 + y6*y1*y2; y1*y2*y3*y4 + y1*y2*y3*y4*y5 + y2*y3*y4*y5*y6 + y3*y4*y5*y6 + y4*y5*y6*y1 + y5*y6*y1*y2 + y6*y1*y2*y3; y1*y2*y3*y4*y5 + y1*y2*y3*y4*y5*y6 + y2*y3*y4*y5*y6 + y3*y4*y5*y6*y1 + y4*y5*y6*y1*y2 + y5*y6*y1*y2*y3 + y6*y1*y2*y3*y4; z0**7*y1*y2*y3*y4*y5*y6 - 1; TITLE : reduced cyclic 7-roots problem ROOT COUNTS : total degree : 6! = 720 generalized Bezout number : 504 based on { y1 y2 y3 y4 y5 y6 } { y1 y3 y5 }{ y2 y4 y6 } { y1 y4 }{ y2 y5 }{ y3 y6 } { y1 }{ y2 }{ y3 }{ y4 }{ y5 }{ y6 } { y1 }{ y2 }{ y3 }{ y4 }{ y5 }{ y6 } { y1 }{ y2 }{ y3 }{ y4 }{ y5 }{ y6 } mixed volume : 132 REFERENCES : Ioannis Z. Emiris: `Sparse Elimination and Application in Kinematics' PhD Thesis, Computer Science, University of California at Berkeley, 1994, page 25. yi = zi/z0 This reduces the dimension of the problem by 1 and the mixed volume drops with 7. THE SYMMETRY GROUP : y1 y2 y3 y4 y5 y6 y6 y5 y4 y3 y2 y1 THE GENERATING SOLUTIONS : 66 6 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -7.24950255955781E+01 1.72585317139373E-92 y2 : -8.18237007073836E-01 -7.49068216750752E-95 y3 : 5.93181127710669E+01 -1.34233024441735E-92 y4 : 3.43668012576714E+00 -5.76782526898079E-94 y5 : -7.70182528827205E+00 1.28839733281129E-93 y6 : 1.72602949940899E+01 -3.35582561104337E-93 == err : 3.171E-14 = rco : 1.776E-07 = res : 3.311E-10 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -8.09905111428176E-01 -5.86560917963781E-01 y2 : -8.78150166608380E-01 4.78385080124447E-01 y3 : 8.17281792388163E-01 -5.76238207541631E-01 y4 : -7.45559757800135E-01 6.66438780045852E-01 y5 : 2.80434187110110E-01 9.59873255539445E-01 y6 : 3.35899056338419E-01 -9.41897990204332E-01 == err : 1.832E-15 = rco : 2.703E-02 = res : 5.722E-16 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -1.29839351396707E-01 3.97954647018752E-74 y2 : 1.68582571711176E-02 8.84343660041671E-75 y3 : -4.46216318487560E-01 -4.06798083619169E-73 y4 : -3.55616391515110E-01 4.77545576422502E-73 y5 : -4.74057371182826E-02 -7.51692111035421E-74 y6 : -3.77804586534582E-02 -3.53737464016668E-74 == err : 3.666E-16 = rco : 1.509E-04 = res : 8.327E-17 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -7.50000000000000E-01 6.61437827766148E-01 y2 : 1.00000000000000E+00 -2.99058358315246E-16 y3 : -7.50000000000001E-01 -6.61437827766148E-01 y4 : -7.50000000000000E-01 6.61437827766148E-01 y5 : -7.50000000000000E-01 -6.61437827766147E-01 y6 : 1.00000000000000E+00 -7.69397955004172E-16 == err : 1.132E-15 = rco : 4.646E-02 = res : 1.196E-15 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 5.45338715592088E-01 -2.63554948580763E-82 y2 : -3.55616391515110E-01 2.63554948580763E-81 y3 : -1.22213978511701E+00 2.89910443438839E-81 y4 : -4.20010351042094E+00 1.00150880460690E-80 y5 : 2.73889531709513E+00 -7.11598361168060E-81 y6 : 1.49362565436584E+00 -7.05009487453541E-81 == err : 4.485E-15 = rco : 1.417E-02 = res : 1.776E-15 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -7.70182528827206E+00 2.63554948580763E-82 y2 : 2.90978491859721E-01 -1.23541382147233E-83 y3 : 3.65110704946766E-01 1.72957935006126E-82 y4 : 2.73889531709513E+00 -9.22442320032671E-82 y5 : 3.43668012576715E+00 4.61221160016335E-82 y6 : -1.29839351396707E-01 -3.91214376799570E-83 == err : 4.673E-15 = rco : 3.954E-03 = res : 3.109E-15 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -9.00968867902419E-01 4.33883739117558E-01 y2 : 6.23489801858733E-01 -7.81831482468030E-01 y3 : -2.22520933956314E-01 9.74927912181824E-01 y4 : -2.22520933956314E-01 -9.74927912181824E-01 y5 : 6.23489801858733E-01 7.81831482468030E-01 y6 : -9.00968867902419E-01 -4.33883739117558E-01 == err : 8.607E-16 = rco : 8.694E-02 = res : 6.661E-16 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 2.12925716127124E-01 9.77068390345195E-01 y2 : -9.09325278823503E-01 4.16085973438854E-01 y3 : -3.23921889150932E-01 -9.46083828066462E-01 y4 : -8.78150166608381E-01 4.78385080124447E-01 y5 : 9.97573466842276E-01 6.96216794704273E-02 y6 : -9.91018483865845E-02 -9.95077295312461E-01 == err : 1.201E-15 = rco : 4.276E-02 = res : 6.408E-16 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 8.55417302803806E-01 5.17939415437617E-01 y2 : 2.12925716127123E-01 -9.77068390345195E-01 y3 : -9.93359903237232E-01 1.15048262222934E-01 y4 : -9.09325278823503E-01 -4.16085973438854E-01 y5 : 8.17281792388164E-01 5.76238207541630E-01 y6 : -9.82939629258358E-01 1.83928478581868E-01 == err : 9.952E-16 = rco : 2.435E-02 = res : 9.226E-16 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.00000000000000E+00 1.47154785030934E-71 y2 : -2.08712152522080E-01 1.69793982728001E-72 y3 : -4.79128784747792E+00 -1.81233024129781E-71 y4 : 1.00000000000000E+00 1.13195988485334E-72 y5 : 1.00000000000000E+00 4.52783953941336E-72 y6 : 1.00000000000000E+00 5.09381948184003E-72 == err : 1.603E-16 = rco : 1.088E-02 = res : 8.882E-16 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -8.09905111428176E-01 5.86560917963783E-01 y2 : 2.80434187110109E-01 9.59873255539446E-01 y3 : -7.90149219457783E-01 -6.12914521764868E-01 y4 : 2.12925716127124E-01 -9.77068390345196E-01 y5 : -3.23921889150932E-01 9.46083828066463E-01 y6 : 4.30616316799658E-01 -9.02535089459628E-01 == err : 7.042E-16 = rco : 1.450E-02 = res : 6.727E-16 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -9.91018483865844E-02 9.95077295312461E-01 y2 : -9.93359903237232E-01 1.15048262222934E-01 y3 : -3.23921889150932E-01 -9.46083828066463E-01 y4 : 9.73527794718966E-01 -2.28568661258770E-01 y5 : -3.89003826976192E-01 -9.21236138347751E-01 y6 : -1.68140326968026E-01 9.85763070137589E-01 == err : 7.174E-16 = rco : 3.506E-02 = res : 2.483E-16 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -2.24106550694846E+00 1.10542957505209E-75 y2 : -1.29839351396707E-01 -6.15327009550479E-77 y3 : 9.41270710281754E+00 -4.14536090644533E-75 y4 : 1.06239362287250E-01 -1.20906359771322E-76 y5 : -7.70182528827206E+00 3.31628872515627E-75 y6 : -4.46216318487560E-01 8.63616855509445E-78 == err : 5.980E-15 = rco : 1.778E-03 = res : 8.882E-16 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 4.35607626104000E-02 -6.58887371451908E-83 y2 : -2.08712152522080E-01 -1.33397312537137E-82 y3 : -2.08712152522080E-01 6.58887371451908E-83 y4 : -2.08712152522080E-01 1.64721842862977E-82 y5 : -2.08712152522080E-01 -1.11858525611451E-82 y6 : -2.08712152522080E-01 6.58887371451908E-83 == err : 2.491E-17 = rco : 6.097E-04 = res : 1.596E-16 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.25476870339538E+00 2.15133956739870E-66 y2 : -4.74057371182826E-02 -7.18658691695688E-68 y3 : 3.65110704946766E-01 1.02003169143904E-67 y4 : -2.81201886037784E+00 -2.81899667452244E-66 y5 : 1.06239362287250E-01 2.96736492054994E-67 y6 : 1.33305826866725E-01 4.05191874250745E-67 == err : 3.236E-15 = rco : 3.355E-03 = res : 2.220E-16 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -2.64687099003354E+01 4.98932682851293E-83 y2 : -2.10944932151332E+01 -7.24776108597098E-82 y3 : -2.81201886037784E+00 1.02951151789361E-82 y4 : -2.24106550694846E+00 9.78035941998925E-83 y5 : 5.93181127710669E+01 1.77899590292015E-81 y6 : -7.70182528827206E+00 -6.58887371451908E-83 == err : 3.032E-14 = rco : 1.146E-06 = res : 1.892E-10 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -4.46216318487560E-01 5.06025501275065E-80 y2 : 1.99109002884591E-01 4.21687917729221E-81 y3 : 3.43668012576714E+00 -2.02410200510026E-79 y4 : -4.74057371182826E-02 2.10843958864611E-80 y5 : -4.20010351042094E+00 6.74700668366754E-80 y6 : 5.79364373750512E-02 -2.21386156807841E-80 == err : 5.866E-15 = rco : 5.188E-04 = res : 5.551E-16 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.25000000000000E-01 9.92156741649222E-01 y2 : -7.50000000000000E-01 -6.61437827766147E-01 y3 : -7.50000000000000E-01 -6.61437827766148E-01 y4 : 1.00000000000000E+00 -2.50055086786988E-16 y5 : -7.50000000000000E-01 -6.61437827766148E-01 y6 : 1.25000000000001E-01 9.92156741649221E-01 == err : 8.460E-16 = rco : 5.276E-02 = res : 6.280E-16 == solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.00000000000000E+00 1.81113581576534E-71 y2 : 1.00000000000000E+00 1.24515587333867E-71 y3 : 1.00000000000000E+00 -4.52783953941336E-72 y4 : 1.00000000000000E+00 5.43340744729603E-71 y5 : -2.08712152522080E-01 9.05567907882671E-72 y6 : -4.79128784747792E+00 -7.24454326306137E-71 == err : 9.691E-17 = rco : 9.068E-03 = res : 2.220E-16 == solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 2.29564392373896E+01 -9.22442320032671E-82 y2 : -4.79128784747792E+00 -3.04735409296507E-82 y3 : -4.79128784747792E+00 4.87988459481569E-82 y4 : -4.79128784747792E+00 -4.11804607157442E-83 y5 : -4.79128784747792E+00 -1.81194027149275E-82 y6 : -4.79128784747792E+00 1.15305290004084E-82 == err : 2.773E-15 = rco : 1.628E-04 = res : 9.095E-13 == solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -3.23921889150932E-01 9.46083828066462E-01 y2 : 2.12925716127123E-01 9.77068390345196E-01 y3 : -3.89003826976192E-01 -9.21236138347751E-01 y4 : -3.89003826976192E-01 9.21236138347751E-01 y5 : 2.12925716127124E-01 -9.77068390345195E-01 y6 : -3.23921889150931E-01 -9.46083828066463E-01 == err : 7.838E-16 = rco : 1.818E-02 = res : 3.331E-16 == solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -8.42713333399786E-01 5.38362552291875E-01 y2 : -3.89003826976192E-01 -9.21236138347751E-01 y3 : -8.78150166608381E-01 4.78385080124447E-01 y4 : 2.80434187110109E-01 9.59873255539445E-01 y5 : 9.97573466842276E-01 -6.96216794704271E-02 y6 : -1.68140326968026E-01 -9.85763070137589E-01 == err : 4.945E-16 = rco : 3.837E-02 = res : 7.357E-16 == solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -7.50000000000000E-01 -6.61437827766148E-01 y2 : 1.25000000000000E-01 9.92156741649222E-01 y3 : -7.50000000000000E-01 -6.61437827766148E-01 y4 : -7.50000000000001E-01 -6.61437827766148E-01 y5 : 1.00000000000000E+00 -2.68094822200953E-16 y6 : 1.25000000000000E-01 9.92156741649222E-01 == err : 8.008E-16 = rco : 3.593E-02 = res : 8.006E-16 == solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -7.50000000000000E-01 6.61437827766148E-01 y2 : -7.50000000000000E-01 -6.61437827766148E-01 y3 : -7.50000000000000E-01 6.61437827766148E-01 y4 : 1.00000000000000E+00 8.52372025906106E-17 y5 : 1.00000000000000E+00 -5.31597386831047E-17 y6 : -7.50000000000000E-01 -6.61437827766148E-01 == err : 4.059E-16 = rco : 3.843E-02 = res : 6.661E-16 == solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 7.50154755800563E+00 -1.32651549006251E-73 y2 : 9.41270710281753E+00 -6.19040562029170E-74 y3 : -3.55616391515110E-01 1.79632305945964E-75 y4 : 2.73889531709513E+00 -1.21597253255730E-74 y5 : -2.10944932151332E+01 2.65303098012501E-73 y6 : 7.96959628729993E-01 -8.84343660041671E-75 == err : 1.954E-14 = rco : 4.409E-05 = res : 4.263E-13 == solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -7.50000000000000E-01 6.61437827766148E-01 y2 : 1.25000000000000E-01 -9.92156741649222E-01 y3 : -7.50000000000000E-01 6.61437827766148E-01 y4 : -7.50000000000000E-01 6.61437827766148E-01 y5 : 1.00000000000000E+00 -2.96670668116775E-16 y6 : 1.25000000000000E-01 -9.92156741649221E-01 == err : 1.204E-15 = rco : 3.593E-02 = res : 7.109E-16 == solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.83372273306192E+00 4.08510170300183E-81 y2 : 2.73889531709513E+00 3.88743549156626E-81 y3 : 5.02237460643417E+00 2.63554948580763E-81 y4 : -7.70182528827206E+00 -2.63554948580763E-82 y5 : -2.24106550694846E+00 7.90664845742289E-82 y6 : -6.52101861370705E-01 -2.67672994652338E-82 == err : 4.851E-15 = rco : 8.487E-04 = res : 5.684E-14 == solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 3.43668012576714E+00 2.80675478040570E-77 y2 : 1.18107702868429E+01 5.18170113305667E-77 y3 : -7.70182528827206E+00 -8.63616855509445E-78 y4 : -4.20010351042095E+00 -2.37494635265097E-77 y5 : -2.81201886037784E+00 -1.51132949714153E-77 y6 : -1.53350275353918E+00 6.20724614897413E-78 == err : 2.410E-14 = rco : 3.030E-04 = res : 6.821E-13 == solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -7.50000000000000E-01 6.61437827766148E-01 y2 : -7.50000000000000E-01 6.61437827766148E-01 y3 : 1.25000000000001E-01 -9.92156741649221E-01 y4 : 1.00000000000000E+00 2.28301836609090E-16 y5 : 1.25000000000000E-01 -9.92156741649222E-01 y6 : -7.50000000000000E-01 6.61437827766147E-01 == err : 7.067E-16 = rco : 4.407E-02 = res : 6.280E-16 == solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -9.93359903237232E-01 -1.15048262222933E-01 y2 : -3.23921889150931E-01 -9.46083828066462E-01 y3 : 8.17281792388164E-01 5.76238207541630E-01 y4 : 8.17281792388164E-01 -5.76238207541630E-01 y5 : -3.23921889150932E-01 9.46083828066462E-01 y6 : -9.93359903237232E-01 1.15048262222934E-01 == err : 5.017E-16 = rco : 2.296E-02 = res : 4.003E-16 == solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 4.30616316799658E-01 -9.02535089459626E-01 y2 : -8.78150166608381E-01 4.78385080124447E-01 y3 : -7.45559757800135E-01 -6.66438780045852E-01 y4 : 2.12925716127123E-01 9.77068390345195E-01 y5 : 9.73527794718966E-01 2.28568661258770E-01 y6 : -9.93359903237232E-01 -1.15048262222934E-01 == err : 8.864E-16 = rco : 2.401E-02 = res : 4.441E-16 == solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 8.55417302803806E-01 -5.17939415437618E-01 y2 : -7.45559757800135E-01 6.66438780045852E-01 y3 : 9.97573466842276E-01 6.96216794704271E-02 y4 : -9.93359903237232E-01 1.15048262222933E-01 y5 : -7.90149219457783E-01 6.12914521764868E-01 y6 : -3.23921889150932E-01 -9.46083828066463E-01 == err : 1.217E-15 = rco : 4.787E-02 = res : 4.302E-16 == solution 33 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.00000000000000E+00 0.00000000000000E+00 y2 : 1.00000000000000E+00 0.00000000000000E+00 y3 : -4.79128784747792E+00 -3.16265938296916E-81 y4 : -2.08712152522080E-01 1.05421979432305E-81 y5 : 1.00000000000000E+00 2.63329036414247E-81 y6 : 1.00000000000000E+00 2.40752670980074E-81 == err : 3.841E-16 = rco : 1.216E-02 = res : 4.441E-16 == solution 34 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -8.42713333399786E-01 -5.38362552291875E-01 y2 : -3.89003826976192E-01 9.21236138347751E-01 y3 : -8.78150166608381E-01 -4.78385080124447E-01 y4 : 2.80434187110108E-01 -9.59873255539445E-01 y5 : 9.97573466842276E-01 6.96216794704271E-02 y6 : -1.68140326968026E-01 9.85763070137589E-01 == err : 7.803E-16 = rco : 3.837E-02 = res : 6.480E-16 == solution 35 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -2.08712152522080E-01 1.10542957505209E-75 y2 : -4.79128784747792E+00 4.42171830020836E-74 y3 : 1.00000000000000E+00 -1.32651549006251E-74 y4 : 1.00000000000000E+00 -6.63257745031253E-75 y5 : 1.00000000000000E+00 -1.10542957505209E-74 y6 : 1.00000000000000E+00 -8.84343660041671E-75 == err : 2.871E-16 = rco : 1.022E-02 = res : 4.441E-16 == solution 36 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 6.23489801858734E-01 7.81831482468030E-01 y2 : -2.22520933956314E-01 9.74927912181824E-01 y3 : -9.00968867902419E-01 4.33883739117558E-01 y4 : -9.00968867902419E-01 -4.33883739117558E-01 y5 : -2.22520933956315E-01 -9.74927912181824E-01 y6 : 6.23489801858734E-01 -7.81831482468030E-01 == err : 6.967E-16 = rco : 1.094E-01 = res : 7.850E-16 == solution 37 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 4.30616316799658E-01 9.02535089459627E-01 y2 : -8.78150166608381E-01 -4.78385080124447E-01 y3 : -7.45559757800135E-01 6.66438780045852E-01 y4 : 2.12925716127124E-01 -9.77068390345195E-01 y5 : 9.73527794718966E-01 -2.28568661258770E-01 y6 : -9.93359903237232E-01 1.15048262222934E-01 == err : 7.816E-16 = rco : 2.401E-02 = res : 8.196E-16 == solution 38 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -7.50000000000000E-01 -6.61437827766148E-01 y2 : -7.50000000000001E-01 -6.61437827766148E-01 y3 : 1.25000000000000E-01 9.92156741649222E-01 y4 : -7.50000000000000E-01 -6.61437827766148E-01 y5 : 1.00000000000000E+00 -3.72188726845367E-16 y6 : 1.25000000000000E-01 9.92156741649222E-01 == err : 8.844E-16 = rco : 3.546E-02 = res : 1.223E-15 == solution 39 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -9.91018483865846E-02 9.95077295312461E-01 y2 : 9.97573466842276E-01 -6.96216794704274E-02 y3 : -8.78150166608381E-01 -4.78385080124447E-01 y4 : -3.23921889150932E-01 9.46083828066462E-01 y5 : -9.09325278823503E-01 -4.16085973438853E-01 y6 : 2.12925716127124E-01 -9.77068390345196E-01 == err : 6.711E-16 = rco : 3.422E-02 = res : 6.753E-16 == solution 40 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -9.82939629258358E-01 -1.83928478581868E-01 y2 : -7.45559757800135E-01 -6.66438780045852E-01 y3 : -3.89003826976192E-01 9.21236138347751E-01 y4 : 9.97573466842276E-01 6.96216794704270E-02 y5 : 8.17281792388164E-01 5.76238207541630E-01 y6 : -6.97352045195754E-01 -7.16728766732088E-01 == err : 8.022E-16 = rco : 3.842E-02 = res : 5.901E-16 == solution 41 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.00000000000000E+00 1.10910203972226E-16 y2 : -7.50000000000000E-01 6.61437827766148E-01 y3 : -7.50000000000000E-01 -6.61437827766148E-01 y4 : -7.50000000000000E-01 6.61437827766148E-01 y5 : 1.00000000000000E+00 -1.84847045638262E-16 y6 : -7.50000000000000E-01 -6.61437827766148E-01 == err : 4.975E-16 = rco : 3.452E-02 = res : 6.329E-16 == solution 42 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -9.82939629258359E-01 1.83928478581869E-01 y2 : -7.45559757800135E-01 6.66438780045852E-01 y3 : -3.89003826976192E-01 -9.21236138347751E-01 y4 : 9.97573466842276E-01 -6.96216794704272E-02 y5 : 8.17281792388164E-01 -5.76238207541630E-01 y6 : -6.97352045195754E-01 7.16728766732088E-01 == err : 1.205E-15 = rco : 3.842E-02 = res : 6.661E-16 == solution 43 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 4.30616316799658E-01 9.02535089459627E-01 y2 : -3.23921889150932E-01 -9.46083828066463E-01 y3 : 2.12925716127123E-01 9.77068390345196E-01 y4 : -7.90149219457783E-01 6.12914521764867E-01 y5 : 2.80434187110109E-01 -9.59873255539445E-01 y6 : -8.09905111428175E-01 -5.86560917963783E-01 == err : 8.901E-16 = rco : 1.570E-02 = res : 4.965E-16 == solution 44 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -1.37940498921763E-02 5.39760534693403E-79 y2 : -1.22213978511701E+00 6.90893484407556E-77 y3 : 1.68582571711176E-02 -1.48434147040686E-78 y4 : 2.90978491859721E-01 -5.82941377468875E-77 y5 : -1.29839351396707E-01 2.15904213877361E-78 y6 : 5.79364373750512E-02 -1.32410006166975E-77 == err : 3.476E-15 = rco : 3.015E-05 = res : 1.908E-17 == solution 45 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -2.24106550694846E+00 2.88263225010210E-83 y2 : 5.02237460643417E+00 -1.40013566433530E-82 y3 : 2.90978491859721E-01 -1.31262718531435E-83 y4 : -2.10944932151332E+01 1.82841245577904E-81 y5 : -2.38089370302157E-01 -2.26492533936593E-83 y6 : 1.72602949940899E+01 -2.10843958864610E-81 == err : 1.345E-14 = rco : 1.150E-04 = res : 3.126E-13 == solution 46 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.25000000000000E-01 -9.92156741649222E-01 y2 : 1.00000000000000E+00 4.78787153068146E-16 y3 : -7.50000000000000E-01 6.61437827766148E-01 y4 : 1.25000000000000E-01 -9.92156741649221E-01 y5 : -7.50000000000000E-01 6.61437827766148E-01 y6 : -7.50000000000000E-01 6.61437827766147E-01 == err : 5.450E-16 = rco : 4.370E-02 = res : 4.441E-16 == solution 47 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.00000000000000E+00 -4.42171830020836E-74 y2 : -4.79128784747792E+00 2.12242478410001E-73 y3 : -2.08712152522080E-01 0.00000000000000E+00 y4 : 1.00000000000000E+00 0.00000000000000E+00 y5 : 1.00000000000000E+00 -1.76868732008334E-73 y6 : 1.00000000000000E+00 -1.76868732008334E-74 == err : 2.639E-16 = rco : 1.069E-02 = res : 4.441E-16 == solution 48 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 8.55417302803806E-01 -5.17939415437618E-01 y2 : 2.12925716127124E-01 9.77068390345195E-01 y3 : -9.93359903237232E-01 -1.15048262222933E-01 y4 : -9.09325278823503E-01 4.16085973438854E-01 y5 : 8.17281792388163E-01 -5.76238207541630E-01 y6 : -9.82939629258358E-01 -1.83928478581868E-01 == err : 6.237E-16 = rco : 2.435E-02 = res : 2.776E-16 == solution 49 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 7.96959628729993E-01 1.48249658576679E-82 y2 : 1.06239362287250E-01 1.02951151789361E-82 y3 : 8.46684827249577E-02 3.25583017533853E-83 y4 : -2.24106550694846E+00 -2.14138395721870E-82 y5 : 2.90978491859721E-01 -7.41248292883396E-83 y6 : -3.77804586534582E-02 2.05902303578721E-84 == err : 3.545E-15 = rco : 2.364E-03 = res : 1.110E-16 == solution 50 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.12868020992015E-02 -2.57326176703940E-67 y2 : -8.18237007073836E-01 -2.67062842849494E-66 y3 : -4.74057371182826E-02 4.35831722705772E-67 y4 : 1.06239362287250E-01 -5.56380922603113E-67 y5 : -2.38089370302157E-01 3.04154904356369E-66 y6 : -1.37940498921763E-02 -1.73869038313473E-69 == err : 4.305E-16 = rco : 1.876E-05 = res : 6.418E-17 == solution 51 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.25000000000000E-01 -9.92156741649221E-01 y2 : -7.50000000000000E-01 6.61437827766148E-01 y3 : -7.50000000000000E-01 6.61437827766148E-01 y4 : 1.00000000000000E+00 6.65131445978868E-17 y5 : -7.50000000000000E-01 6.61437827766148E-01 y6 : 1.25000000000000E-01 -9.92156741649222E-01 == err : 5.927E-16 = rco : 5.276E-02 = res : 6.497E-16 == solution 52 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -2.22520933956315E-01 9.74927912181824E-01 y2 : -9.00968867902419E-01 -4.33883739117558E-01 y3 : 6.23489801858734E-01 -7.81831482468030E-01 y4 : 6.23489801858734E-01 7.81831482468030E-01 y5 : -9.00968867902419E-01 4.33883739117558E-01 y6 : -2.22520933956314E-01 -9.74927912181824E-01 == err : 5.829E-16 = rco : 7.167E-02 = res : 4.441E-16 == solution 53 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -1.53350275353918E+00 -1.13195988485334E-72 y2 : -4.46216318487560E-01 -4.95232449623336E-73 y3 : -1.29839351396707E-01 1.41494985606667E-72 y4 : 1.99109002884591E-01 -3.80267773817919E-73 y5 : 3.65110704946766E-01 -3.53737464016669E-73 y6 : 5.45338715592088E-01 8.48969913640004E-73 == err : 1.967E-15 = rco : 9.462E-03 = res : 2.220E-16 == solution 54 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.00000000000000E+00 5.65952697791819E-17 y2 : -7.50000000000000E-01 6.61437827766148E-01 y3 : 1.00000000000000E+00 -6.50306153512137E-17 y4 : -7.50000000000000E-01 -6.61437827766148E-01 y5 : -7.50000000000000E-01 6.61437827766148E-01 y6 : -7.50000000000000E-01 -6.61437827766148E-01 == err : 6.180E-16 = rco : 2.144E-02 = res : 6.280E-16 == solution 55 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -7.50000000000000E-01 -6.61437827766148E-01 y2 : 1.25000000000000E-01 9.92156741649222E-01 y3 : 1.00000000000000E+00 3.22472976548807E-17 y4 : 1.25000000000000E-01 9.92156741649221E-01 y5 : -7.50000000000000E-01 -6.61437827766148E-01 y6 : -7.50000000000000E-01 -6.61437827766148E-01 == err : 8.485E-16 = rco : 4.900E-02 = res : 4.003E-16 == solution 56 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -1.68140326968026E-01 -9.85763070137589E-01 y2 : -3.89003826976192E-01 9.21236138347751E-01 y3 : 9.73527794718966E-01 2.28568661258770E-01 y4 : -3.23921889150932E-01 9.46083828066462E-01 y5 : -9.93359903237232E-01 -1.15048262222933E-01 y6 : -9.91018483865842E-02 -9.95077295312461E-01 == err : 7.793E-16 = rco : 3.261E-02 = res : 3.511E-16 == solution 57 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 8.85990550034317E+01 -3.96386642665468E-79 y2 : -1.22213978511701E+00 -3.36032559440473E-81 y3 : -2.10944932151332E+01 3.32079235211762E-80 y4 : 9.41270710281754E+00 -5.53465392019602E-81 y5 : -4.20010351042094E+00 -3.29443685725954E-82 y6 : -7.24950255955781E+01 7.37953856026137E-80 == err : 1.289E-14 = rco : 1.191E-07 = res : 9.022E-10 == solution 58 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -6.52101861370705E-01 1.58132969148458E-80 y2 : -3.55616391515110E-01 1.31777474290382E-81 y3 : -2.38089370302157E-01 9.35620067461709E-81 y4 : -1.29839351396707E-01 -1.79217365034919E-80 y5 : 8.46684827249577E-02 -4.21687917729221E-81 y6 : 2.90978491859721E-01 -4.74398907445374E-81 == err : 4.600E-16 = rco : 2.344E-03 = res : 1.110E-16 == solution 59 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 2.12925716127123E-01 -9.77068390345196E-01 y2 : -9.93359903237232E-01 -1.15048262222933E-01 y3 : 2.80434187110108E-01 -9.59873255539445E-01 y4 : 2.80434187110109E-01 9.59873255539445E-01 y5 : -9.93359903237232E-01 1.15048262222934E-01 y6 : 2.12925716127124E-01 9.77068390345196E-01 == err : 1.114E-15 = rco : 1.399E-02 = res : 7.022E-16 == solution 60 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 2.90978491859721E-01 -1.69793982728001E-72 y2 : -4.46216318487560E-01 3.11288968334668E-72 y3 : -8.18237007073836E-01 6.93325429472670E-72 y4 : -1.22213978511701E+00 -6.79175930912004E-72 y5 : -2.24106550694846E+00 -5.65979942426670E-73 y6 : 3.43668012576715E+00 -7.92371919397337E-72 == err : 4.669E-15 = rco : 2.954E-02 = res : 1.332E-15 == solution 61 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 6.69511799745148E-01 7.93130781703919E-81 y2 : 3.65110704946766E-01 -8.43375835458442E-81 y3 : -2.38089370302157E-01 -2.53012750637533E-80 y4 : -8.18237007073836E-01 -8.43375835458442E-81 y5 : -2.81201886037784E+00 2.95181542410455E-80 y6 : 1.83372273306192E+00 1.68675167091688E-80 == err : 8.796E-16 = rco : 7.507E-02 = res : 6.661E-16 == solution 62 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 8.55417302803806E-01 5.17939415437618E-01 y2 : -7.45559757800135E-01 -6.66438780045852E-01 y3 : 9.97573466842276E-01 -6.96216794704269E-02 y4 : -9.93359903237232E-01 -1.15048262222934E-01 y5 : -7.90149219457783E-01 -6.12914521764868E-01 y6 : -3.23921889150932E-01 9.46083828066462E-01 == err : 8.270E-16 = rco : 4.787E-02 = res : 5.341E-16 == solution 63 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -2.64687099003354E+01 6.01353688828336E-73 y2 : 3.43668012576714E+00 -1.95108319996694E-73 y3 : -4.46216318487560E-01 1.35415122943881E-74 y4 : 1.18107702868429E+01 -3.97954647018752E-73 y5 : 9.41270710281753E+00 -4.24484956820002E-73 y6 : 1.25476870339538E+00 3.92427499143492E-74 == err : 2.471E-14 = rco : 1.409E-05 = res : 1.023E-12 == solution 64 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -7.50000000000000E-01 -6.61437827766148E-01 y2 : -7.50000000000000E-01 6.61437827766148E-01 y3 : -7.50000000000000E-01 -6.61437827766148E-01 y4 : 1.00000000000000E+00 2.99480296410678E-16 y5 : 1.00000000000000E+00 -1.69797198414960E-16 y6 : -7.50000000000000E-01 6.61437827766148E-01 == err : 7.679E-16 = rco : 3.843E-02 = res : 5.661E-16 == solution 65 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.00000000000000E+00 3.36681559313763E-16 y2 : -7.50000000000000E-01 -6.61437827766148E-01 y3 : 1.00000000000000E+00 3.69824496452142E-16 y4 : -7.50000000000000E-01 6.61437827766148E-01 y5 : -7.50000000000000E-01 -6.61437827766148E-01 y6 : -7.50000000000001E-01 6.61437827766148E-01 == err : 1.043E-15 = rco : 2.144E-02 = res : 8.882E-16 == solution 66 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -8.09905111428176E-01 5.86560917963781E-01 y2 : -8.78150166608380E-01 -4.78385080124447E-01 y3 : 8.17281792388163E-01 5.76238207541631E-01 y4 : -7.45559757800135E-01 -6.66438780045852E-01 y5 : 2.80434187110110E-01 -9.59873255539445E-01 y6 : 3.35899056338419E-01 9.41897990204332E-01 == err : 1.832E-15 = rco : 2.703E-02 = res : 5.722E-16 == SHAR_EOF fi # end of overwriting check if test -f 'redcyc8' then echo shar: will not over-write existing file "'redcyc8'" else cat << "SHAR_EOF" > 'redcyc8' 7 1 + y1 + y2 + y3 + y4 + y5 + y6 + y7; y1 + y1*y2 + y2*y3 + y3*y4 + y4*y5 + y5*y6 + y6*y7 + y7; y1*y2 + y1*y2*y3 + y2*y3*y4 + y3*y4*y5 + y4*y5*y6 + y5*y6*y7 + y6*y7 + y7*y1; y1*y2*y3 + y1*y2*y3*y4 + y2*y3*y4*y5 + y3*y4*y5*y6 + y4*y5*y6*y7 + y5*y6*y7 + y6*y7*y1 + y7*y1*y2; y1*y2*y3*y4 + y1*y2*y3*y4*y5 + y2*y3*y4*y5*y6 + y3*y4*y5*y6*y7 + y4*y5*y6*y7 + y5*y6*y7*y1 + y6*y7*y1*y2 + y7*y1*y2*y3; y1*y2*y3*y4*y5 + y1*y2*y3*y4*y5*y6 + y2*y3*y4*y5*y6*y7 + y3*y4*y5*y6*y7 + y4*y5*y6*y7*y1 + y5*y6*y7*y1*y2 + y6*y7*y1*y2*y3 + y7*y1*y2*y3*y4; y1*y2*y3*y4*y5*y6 + y1*y2*y3*y4*y5*y6*y7 + y2*y3*y4*y5*y6*y7 + y3*y4*y5*y6*y7*y1 + y4*y5*y6*y7*y1*y2 + y5*y6*y7*y1*y2*y3 + y6*y7*y1*y2*y3*y4 + y7*y1*y2*y3*y4*y5; z0**8*y1*y2*y3*y4*y5*y6*y7 - 1; TITLE : reduced cyclic 8-roots problem ROOT COUNTS : total degree : 5040 4-homogeneous Bezout number : 3960 with partition : {y1 y5 }{y2 y6 }{y3 y7 }{y4 } generalized Bezout number : 3107 based on the set structure : {y1 y2 y3 y4 y5 y6 y7 } {y1 y3 y5 y7 }{y2 y4 y6 } {y1 y4 y7 }{y2 y5 y7 }{y3 y6 } {y1 y5 }{y2 y6 }{y3 y7 }{y4 } {y1 y6 }{y2 y7 }{y3 y6 }{y4 y7 }{y5 } {y1 y7 }{y2 }{y3 y7 }{y4 }{y5 y7 }{y6 } {y1 }{y2 }{y3 }{y4 }{y5 }{y6 }{y7 } mixed volume : 320 REFERENCES : See Ioannis Z. Emiris: `Sparse Elimination and Application in Kinematics' PhD Thesis, Computer Science, University of California at Berkeley, 1994, page 25. yi = zi/z0, from cyclic8 This reduced the dimension of the problem by 1 and the mixed volume drops with 8. NOTE : The list below also contains solutions that are highly singular and probably not isolated. THE GENERATING SOLUTIONS : 204 7 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 2.50899312738871E+00 4.74778387287990E-66 y2 : 4.61158178930871E+00 -5.17497687451873E-65 y3 : 1.15704270157665E+01 -2.65875896881274E-64 y4 : -1.15704270157665E+01 2.08902490406716E-64 y5 : -4.61158178930871E+00 5.63799334904488E-65 y6 : -2.50899312738871E+00 -1.06825137139798E-65 y7 : -1.00000000000000E+00 1.95855787389580E-66 == err : 1.323E-14 = rco : 5.342E-05 = res : 1.819E-12 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.91017975298851E+00 -4.19736819025084E+00 y2 : 4.14213558481301E-01 -9.10179728070606E-01 y3 : 4.61158176550065E+00 -1.26287905908541E-08 y4 : -1.91017975639728E+00 4.19736823872219E+00 y5 : -1.00000000987288E+00 3.68092814564045E-09 y6 : -4.61158174530944E+00 -3.15685605891093E-08 y7 : -4.14213565390873E-01 9.10179720115683E-01 == err : 6.473E-08 = rco : 1.332E-11 = res : 5.729E-14 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.00000000000000E+00 3.85757439671492E-66 y2 : 1.00000000000000E+00 -2.37389193643995E-66 y3 : 1.00000000000000E+00 -5.34125685698989E-66 y4 : -1.71572875253810E-01 -4.15431088876991E-66 y5 : -5.82842712474619E+00 4.74778387287990E-66 y6 : 1.00000000000000E+00 3.41246965863243E-66 y7 : 1.00000000000000E+00 5.19288861096239E-66 == err : 6.031E-16 = rco : 5.587E-03 = res : 6.661E-16 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -9.67750870201405E-01 -2.51909216235577E-01 y2 : 9.67750870201406E-01 2.51909216235576E-01 y3 : -1.00000000000000E+00 4.14299893828779E-17 y4 : -6.30138195617764E-01 7.76483003306311E-01 y5 : 4.14213562373095E-01 -9.10179721124455E-01 y6 : -4.14213562373095E-01 9.10179721124455E-01 y7 : 6.30138195617764E-01 -7.76483003306311E-01 == err : 8.127E-16 = rco : 1.555E-01 = res : 4.965E-16 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -2.72549034068190E-08 -1.00000005416032E+00 y2 : -1.00771483199697E-08 -9.99999975518965E-01 y3 : -1.00000011953387E+00 1.29363069252754E-07 y4 : -9.99999910145410E-01 -9.20310175146692E-08 y5 : 1.39440217699368E-07 1.00000009505284E+00 y6 : -1.02108165904822E-07 9.99999934626446E-01 y7 : 1.00000002967928E+00 -3.73320518064006E-08 == err : 1.762E-07 = rco : 8.386E-09 = res : 7.413E-14 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 7.79956840999184E-01 -6.25833305424514E-01 y2 : 2.16665347642853E-01 -9.76245935781963E-01 y3 : -6.18338726465555E-01 7.85911712187161E-01 y4 : -4.62477795870619E-01 -8.86630863621752E-01 y5 : -7.79956840999184E-01 6.25833305424515E-01 y6 : 7.65366864730179E-01 6.43594252905583E-01 y7 : -9.01215690036859E-01 4.33370834310971E-01 == err : 1.327E-15 = rco : 4.184E-02 = res : 1.241E-15 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 3.29160649751270E+00 6.26749253029188E+00 y2 : -2.34877572772795E+00 -1.97925612725240E-01 y3 : -5.63861630468390E-03 -3.72283022817863E-01 y4 : -3.29160649751270E+00 -6.26749253029188E+00 y5 : -1.00000000000000E+00 9.67496385439706E-17 y6 : 5.63861630468391E-03 3.72283022817863E-01 y7 : 2.34877572772795E+00 1.97925612725240E-01 == err : 1.000E+00 = rco : 8.686E-18 = res : 1.095E-12 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 5.60639252724697E-01 5.24583843208706E-01 y2 : -6.31034166133436E-01 6.61029163307457E-01 y3 : -1.00000000000000E+00 -3.44123336889881E-17 y4 : -2.63539337929010E-01 -2.64119418744333E-02 y5 : 6.31034166133436E-01 -6.61029163307457E-01 y6 : -5.60639252724697E-01 -5.24583843208706E-01 y7 : 2.63539337929010E-01 2.64119418744333E-02 == err : 1.806E-05 = rco : 2.194E-12 = res : 4.436E-10 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -6.67934714167624E-05 -2.41127552029390E-04 y2 : 2.57804263141212E-28 3.91550741995857E-28 y3 : 2.12077915161738E-04 1.45848155401073E-04 y4 : -1.00029063638253E+00 1.90533956546161E-04 y5 : -6.67717663653855E-05 -2.41087450794290E-04 y6 : -2.58016065594134E-28 -3.91054173309302E-28 y7 : 2.12123705146790E-04 1.45832890876446E-04 == err : 1.000E+00 = rco : 2.133E-32 = res : 3.419E-15 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 2.26148530629986E-07 -3.49186149421560E-07 y2 : -5.82843214292152E+00 8.70757786415048E-06 y3 : -9.36739196447621E-08 1.44637464879044E-07 y4 : 5.82843148205062E+00 -7.52200977043463E-06 y5 : 2.26148488970490E-07 -3.49186285218933E-07 y6 : -1.00000024372297E+00 2.11176544880146E-07 y7 : 5.45970765202342E-07 -8.43009668834546E-07 == err : 1.000E+00 = rco : 3.786E-21 = res : 2.293E-12 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -1.00000000000000E+00 -3.00314336556441E-16 y2 : -1.00000000000000E+00 1.38146793902147E-16 y3 : -3.33333333333333E-01 -9.42809041582063E-01 y4 : 1.00000000000000E+00 -9.67274543432205E-17 y5 : 3.33333333333333E-01 -9.42809041582063E-01 y6 : 3.33333333333333E-01 9.42809041582064E-01 y7 : -3.33333333333333E-01 9.42809041582063E-01 == err : 9.566E-16 = rco : 3.771E-02 = res : 5.555E-16 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -1.71572875253810E-01 0.00000000000000E+00 y2 : -1.71572875253810E-01 -1.85460307534371E-68 y3 : -1.71572875253810E-01 -1.39095230650778E-68 y4 : -1.71572875253810E-01 -5.10015845719520E-68 y5 : -1.71572875253810E-01 5.56380922603113E-68 y6 : -1.71572875253810E-01 1.85460307534371E-68 y7 : 2.94372515228594E-02 -2.89781730522455E-69 == err : 7.299E-17 = rco : 4.710E-05 = res : 2.220E-16 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -9.56949927991666E-07 -2.36230877127430E-06 y2 : -9.99999998109160E-01 4.69365995932666E-07 y3 : -3.96380530944325E-07 -9.78501400939994E-07 y4 : -9.99999301351995E-01 1.89380927508897E-06 y5 : 1.64187412111596E-07 4.05306779771059E-07 y6 : 1.00000088498623E+00 1.55082848933568E-06 y7 : -3.96382026010228E-07 -9.78500367914075E-07 == err : 1.000E+00 = rco : 8.220E-19 = res : 3.366E-13 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -1.94170403372279E-01 9.80967815197954E-01 y2 : 9.74127244371464E-01 -2.26000247285836E-01 y3 : -7.79956840999184E-01 6.25833305424514E-01 y4 : -1.00000000000000E+00 5.72869138906710E-16 y5 : -7.79956840999184E-01 -6.25833305424514E-01 y6 : 9.74127244371464E-01 2.26000247285836E-01 y7 : -1.94170403372280E-01 -9.80967815197954E-01 == err : 7.696E-16 = rco : 2.289E-02 = res : 6.684E-16 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 5.80687722693672E+00 -6.40779157161152E+00 y2 : -1.20101883245858E-01 -2.90138374421360E-01 y3 : 2.09722293568758E+00 -2.41537060708037E-01 y4 : -5.80687722693672E+00 6.40779157161152E+00 y5 : -1.00000000000000E+00 3.70388389209907E-17 y6 : -2.09722293568758E+00 2.41537060708036E-01 y7 : 1.20101883245858E-01 2.90138374421360E-01 == err : 1.814E-05 = rco : 4.631E-16 = res : 2.840E-10 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -3.70184263605616E-01 -1.95400952007214E-02 y2 : 1.98612663021918E-02 1.33524751472957E-01 y3 : -1.00000000000000E+00 8.90385910196856E-18 y4 : -1.73225746914878E-01 -9.46357620032475E-02 y5 : -1.98612663021918E-02 -1.33524751472957E-01 y6 : 3.70184263605616E-01 1.95400952007214E-02 y7 : 1.73225746914878E-01 9.46357620032475E-02 == err : 6.216E-07 = rco : 8.627E-16 = res : 3.370E-13 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 7.77777777777777E-01 6.28539361054709E-01 y2 : 3.33333333333333E-01 -9.42809041582063E-01 y3 : -3.33333333333333E-01 9.42809041582063E-01 y4 : -3.33333333333333E-01 9.42809041582063E-01 y5 : -1.00000000000000E+00 -1.34028134491052E-16 y6 : 3.33333333333333E-01 -9.42809041582063E-01 y7 : -7.77777777777777E-01 -6.28539361054709E-01 == err : 1.033E-15 = rco : 1.340E-02 = res : 4.965E-16 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 2.29779272833771E-06 1.44164884617846E-06 y2 : 1.00000368506020E+00 3.16608855561766E-06 y3 : 5.54734054568024E-06 3.48042568697003E-06 y4 : -1.00000454940334E+00 -3.75361353853069E-06 y5 : 2.29778780252531E-06 1.44163849170631E-06 y6 : -1.00000832682050E+00 -5.17904602604932E-06 y7 : -9.51757429283282E-07 -5.97142015892442E-07 == err : 1.000E+00 = rco : 1.411E-17 = res : 2.327E-12 == solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 4.61158178285652E+00 -1.31641611847463E-08 y2 : 4.14213563966185E-01 -9.10179726615968E-01 y3 : -9.99999992942727E-01 2.02992631697295E-09 y4 : -1.91017970177046E+00 4.19736816743003E+00 y5 : -4.14213563392193E-01 9.10179733936913E-01 y6 : -4.61158181248879E+00 2.95577405587404E-08 y7 : 1.91017972377147E+00 -4.19736819317448E+00 == err : 6.901E-08 = rco : 4.101E-12 = res : 1.025E-13 == solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 6.18338726465555E-01 -7.85911712187161E-01 y2 : -6.50891015304205E-01 7.59171183723580E-01 y3 : 3.25522888386496E-02 9.99470033813603E-01 y4 : -1.00000000000000E+00 -2.54622477156827E-16 y5 : 3.25522888386499E-02 -9.99470033813603E-01 y6 : -6.50891015304204E-01 -7.59171183723580E-01 y7 : 6.18338726465554E-01 7.85911712187162E-01 == err : 5.979E-16 = rco : 2.068E-02 = res : 5.979E-16 == solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.91017967858767E+00 -4.19736823909163E+00 y2 : 4.14213570686650E-01 -9.10179715114643E-01 y3 : 4.61158180626536E+00 1.08028338247820E-08 y4 : -1.91017970007012E+00 4.19736820041799E+00 y5 : -9.99999994296610E-01 -7.71363054975176E-09 y6 : -4.61158179971020E+00 3.29484706813007E-08 y7 : -4.14213561462747E-01 9.10179717750618E-01 == err : 6.558E-08 = rco : 2.016E-11 = res : 1.357E-13 == solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -4.88863522982728E-01 -1.14845358636774E-52 y2 : -2.93985090992536E-01 -9.91846279135776E-53 y3 : -2.20975009844629E-01 1.14845358636774E-52 y4 : -1.66096705145750E-01 -5.22024357439882E-53 y5 : -9.98846358548192E-02 8.35238971903811E-53 y6 : 4.88299549758338E-02 2.87113396591935E-53 y7 : 2.20975009844629E-01 2.08809742975953E-53 == err : 2.275E-16 = rco : 1.650E-04 = res : 1.665E-16 == solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.00000000000000E+00 1.21543267145725E-63 y2 : 1.00000000000000E+00 3.19051076257529E-63 y3 : 1.00000000000000E+00 1.51929083932157E-63 y4 : 1.00000000000000E+00 2.73472351077882E-63 y5 : -5.82842712474619E+00 -1.33697593860298E-62 y6 : -1.71572875253810E-01 -4.55787251796470E-64 y7 : 1.00000000000000E+00 2.43086534291451E-63 == err : 4.020E-16 = rco : 6.937E-03 = res : 4.441E-16 == solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 3.25922216389033E-06 2.02547823845100E-06 y2 : -4.14212125645104E-01 6.86798820651824E-07 y3 : 3.25923219360152E-06 2.02549378293938E-06 y4 : -1.71572913123473E-01 -5.60821662462049E-08 y5 : -3.25922241074906E-06 -2.02549172645584E-06 y6 : -4.14214961231190E-01 -6.30689996076339E-07 y7 : -3.25923217951961E-06 -2.02550695326382E-06 == err : 1.000E+00 = rco : 8.701E-18 = res : 2.569E-12 == solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -1.00000000000000E+00 -2.28385656379948E-54 y2 : -3.98566257150641E-01 -5.48023617429564E-55 y3 : -2.16845335437475E-01 4.69006258637394E-55 y4 : -8.64272337258898E-02 5.70964140949871E-55 y5 : 8.64272337258898E-02 -6.27040976221733E-55 y6 : 2.16845335437475E-01 1.46819350529967E-54 y7 : 3.98566257150641E-01 8.56446211424806E-55 == err : 3.735E-16 = rco : 6.338E-04 = res : 5.551E-17 == solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -2.04556067897774E+00 -1.16295709512669E-56 y2 : -4.52017791174892E-01 1.91171029335894E-57 y3 : -9.98846358548192E-02 3.02687463115166E-57 y4 : 2.04320083538628E-01 -8.92131470234173E-57 y5 : 3.39760888953906E-01 8.92131470234173E-57 y6 : 4.52017791174892E-01 5.41651249785034E-57 y7 : 6.01364342340025E-01 8.77544372342212E-58 == err : 1.202E-15 = rco : 3.707E-03 = res : 2.220E-16 == solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 4.61158188698572E+00 1.40075475258853E-08 y2 : 4.14213563521453E-01 9.10179733992579E-01 y3 : -1.00000000899283E+00 1.24746822372984E-09 y4 : -1.91017973438191E+00 -4.19736830315371E+00 y5 : -4.14213565507009E-01 -9.10179725133416E-01 y6 : -4.61158185359332E+00 1.12491585122176E-08 y7 : 1.91017971196790E+00 4.19736826779037E+00 == err : 8.124E-08 = rco : 6.616E-12 = res : 7.246E-14 == solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -3.33333333333333E-01 9.42809041582064E-01 y2 : -1.00000000000000E+00 5.29204653474803E-18 y3 : -1.00000000000000E+00 6.94330563891244E-17 y4 : 1.00000000000000E+00 -3.18363643818151E-17 y5 : -3.33333333333333E-01 -9.42809041582063E-01 y6 : 3.33333333333333E-01 -9.42809041582064E-01 y7 : 3.33333333333333E-01 9.42809041582063E-01 == err : 9.514E-16 = rco : 2.391E-02 = res : 5.892E-16 == solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -1.94170403372279E-01 -9.80967815197954E-01 y2 : -9.24595708908493E-01 3.80949832744420E-01 y3 : 3.25522888386495E-02 -9.99470033813603E-01 y4 : -4.62477795870619E-01 8.86630863621752E-01 y5 : 1.94170403372280E-01 9.80967815197954E-01 y6 : 7.65366864730180E-01 6.43594252905583E-01 y7 : -4.10845648789718E-01 -9.11704915458152E-01 == err : 7.686E-16 = rco : 5.278E-02 = res : 7.065E-16 == solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -9.99112646314427E-01 -4.21179293719812E-02 y2 : -7.65366864730180E-01 6.43594252905583E-01 y3 : -6.18338726465555E-01 -7.85911712187162E-01 y4 : 8.05623546378239E-01 -5.92427802791994E-01 y5 : 1.94170403372279E-01 -9.80967815197954E-01 y6 : -2.35314438705912E-01 9.71919294456346E-01 y7 : 6.18338726465555E-01 7.85911712187162E-01 == err : 9.494E-16 = rco : 2.371E-02 = res : 4.743E-16 == solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -9.99999934596035E-01 1.16052451233827E-10 y2 : -9.99999899467230E-01 -4.21016313558335E-08 y3 : -5.82842693414507E+00 3.38201450333116E-10 y4 : 9.99999866765247E-01 4.20436051381478E-08 y5 : -9.99999932169212E-01 -4.21596575893816E-08 y6 : 5.82842693414507E+00 -3.38201450332329E-10 y7 : 9.99999899467230E-01 4.21016313558327E-08 == err : 1.841E-07 = rco : 1.466E-09 = res : 3.283E-13 == solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 4.52539859915887E+00 -1.85460307534371E-67 y2 : -2.21230230208591E+00 -6.02745999486706E-68 y3 : -1.33039971895121E+00 1.25765271046745E-67 y4 : -1.00000000000000E+00 5.56380922603113E-68 y5 : -7.51653796791481E-01 2.78190461301557E-68 y6 : -4.52017791174892E-01 3.24555538185149E-68 y7 : 2.20975009844629E-01 1.73869038313473E-68 == err : 4.843E-15 = rco : 2.630E-02 = res : 8.882E-16 == solution 33 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.91017972630681E+00 4.19736829277089E+00 y2 : -4.61158183632473E+00 3.54296765960305E-08 y3 : -4.14213562699447E-01 -9.10179717921538E-01 y4 : -1.91017977652386E+00 -4.19736833565897E+00 y5 : -1.00000001297525E+00 6.05902944118127E-09 y6 : 4.14213563823217E-01 9.10179732197608E-01 y7 : 4.61158189839325E+00 -1.28766946534163E-08 == err : 1.512E-07 = rco : 9.264E-12 = res : 3.045E-13 == solution 34 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -3.33333333333333E-01 -9.42809041582063E-01 y2 : 7.77777777777778E-01 -6.28539361054709E-01 y3 : -1.00000000000000E+00 2.96637517194314E-17 y4 : -7.77777777777778E-01 6.28539361054709E-01 y5 : -3.33333333333333E-01 -9.42809041582063E-01 y6 : 3.33333333333333E-01 9.42809041582063E-01 y7 : 3.33333333333333E-01 9.42809041582063E-01 == err : 7.624E-16 = rco : 3.495E-02 = res : 6.753E-16 == solution 35 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.91017968944173E+00 -4.19736821195806E+00 y2 : -4.61158179089809E+00 3.99452987718204E-08 y3 : -4.14213561786472E-01 9.10179722464594E-01 y4 : -1.91017965644793E+00 4.19736822377040E+00 y5 : -9.99999999367867E-01 7.57291571685579E-09 y6 : 4.14213554916222E-01 -9.10179719216780E-01 y7 : 4.61158176414240E+00 -6.25783641943778E-08 == err : 1.216E-07 = rco : 4.747E-12 = res : 8.294E-14 == solution 36 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 9.98846358548192E-02 4.98424576498622E-68 y2 : -1.33193629587330E+01 -1.48368246027497E-67 y3 : 3.39760888953906E-01 1.29822215274060E-67 y4 : -1.00000000000000E+00 -4.96106322654443E-67 y5 : 2.94324636093022E+00 -2.00297132137121E-66 y6 : -7.50786657814093E-02 -6.49111076370299E-68 y7 : 1.00115497387755E+01 2.81899667452244E-66 == err : 2.108E-14 = rco : 1.084E-03 = res : 1.776E-15 == solution 37 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 8.98203146732482E-02 1.97368210521650E-01 y2 : 4.14213377076823E-01 9.10179875827474E-01 y3 : 2.16845377095277E-01 2.25412962993555E-08 y4 : -8.98202777540202E-02 -1.97368196815281E-01 y5 : -9.99999871946962E-01 -1.28781966646152E-07 y6 : -2.16845376983508E-01 1.68399359602150E-08 y7 : -4.14213542160858E-01 -9.10179800133109E-01 == err : 2.420E-07 = rco : 6.700E-10 = res : 3.083E-14 == solution 38 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 9.99999998374169E-01 6.57917283684706E-08 y2 : -1.43269607480231E-08 -9.99999962444573E-01 y3 : 8.01186892161087E-08 -1.00000003592960E+00 y4 : -9.99999979736883E-01 -2.13566688343806E-08 y5 : -1.00000001863729E+00 -4.44350597318774E-08 y6 : -3.56836296499744E-08 1.00000001729231E+00 y7 : -3.01080988539354E-08 9.99999981081859E-01 == err : 8.747E-08 = rco : 7.075E-09 = res : 9.838E-15 == solution 39 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 3.33333333333333E-01 9.42809041582064E-01 y2 : 7.77777777777778E-01 -6.28539361054709E-01 y3 : -3.33333333333333E-01 -9.42809041582064E-01 y4 : -3.33333333333333E-01 -9.42809041582063E-01 y5 : 3.33333333333333E-01 9.42809041582064E-01 y6 : -1.00000000000000E+00 -4.56423761151633E-16 y7 : -7.77777777777778E-01 6.28539361054709E-01 == err : 7.989E-16 = rco : 3.552E-02 = res : 4.718E-16 == solution 40 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.00000000000000E+00 1.17728002370596E-16 y2 : 3.33333333333333E-01 9.42809041582063E-01 y3 : -1.00000000000000E+00 -8.15685974900992E-17 y4 : -3.33333333333333E-01 9.42809041582063E-01 y5 : -3.33333333333333E-01 -9.42809041582064E-01 y6 : 3.33333333333333E-01 -9.42809041582063E-01 y7 : -1.00000000000000E+00 -3.26561459480689E-17 == err : 6.633E-16 = rco : 3.192E-02 = res : 4.965E-16 == solution 41 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -6.91337596075653E+00 -1.23936757668093E-01 y2 : -1.83707900832155E+00 -4.20111961238753E-03 y3 : -1.67496132778829E-01 1.48575648634290E-03 y4 : 6.91337596075653E+00 1.23936757668093E-01 y5 : -1.00000000000000E+00 1.12046163401032E-18 y6 : 1.67496132778829E-01 -1.48575648634290E-03 y7 : 1.83707900832155E+00 4.20111961238752E-03 == err : 2.148E-08 = rco : 1.962E-19 = res : 7.847E-15 == solution 42 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -4.14213574411641E-01 -9.10179703307604E-01 y2 : -4.61158171828771E+00 7.37162168892544E-08 y3 : -1.00000000417057E+00 2.35220439205236E-09 y4 : -1.91017973555062E+00 -4.19736821813232E+00 y5 : 4.61158173955769E+00 -6.77867528515425E-08 y6 : 4.14213575151829E-01 9.10179708038207E-01 y7 : 1.91017971771102E+00 4.19736820512005E+00 == err : 1.142E-07 = rco : 2.085E-12 = res : 3.561E-13 == solution 43 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.71572853555846E-01 -5.38831037400747E-08 y2 : -9.99999867904102E-01 -4.48436509060973E-08 y3 : -1.00000000563090E+00 -2.69210092508647E-07 y4 : 9.99999741439101E-01 3.58897394346122E-07 y5 : 9.99999867904102E-01 4.48436509060997E-08 y6 : 1.71572853555846E-01 5.38831037400729E-08 y7 : -9.99999735808204E-01 -8.96873018374756E-08 == err : 4.425E-07 = rco : 4.886E-09 = res : 1.069E-13 == solution 44 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 7.77777777777778E-01 6.28539361054709E-01 y2 : -1.00000000000000E+00 -2.12005151672205E-16 y3 : -3.33333333333333E-01 9.42809041582063E-01 y4 : -7.77777777777778E-01 -6.28539361054709E-01 y5 : 3.33333333333333E-01 -9.42809041582063E-01 y6 : 3.33333333333334E-01 -9.42809041582063E-01 y7 : -3.33333333333334E-01 9.42809041582063E-01 == err : 1.002E-15 = rco : 3.265E-02 = res : 5.661E-16 == solution 45 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 6.28933080196196E-01 -4.84938704656767E-01 y2 : -3.95940522481370E-01 -1.04623756442265E+00 y3 : -9.00754016436103E-02 -5.81840939034301E-01 y4 : -6.28933080196196E-01 4.84938704656767E-01 y5 : -1.00000000000000E+00 2.48257340617166E-16 y6 : 9.00754016436103E-02 5.81840939034301E-01 y7 : 3.95940522481370E-01 1.04623756442265E+00 == err : 2.155E-07 = rco : 1.408E-15 = res : 1.635E-13 == solution 46 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.87413424882236E-02 1.82708525103959E-53 y2 : 4.61158178930871E+00 9.43820038251307E-51 y3 : 8.64272337258898E-02 -2.06199621188753E-52 y4 : -8.64272337258898E-02 -2.08809742975953E-52 y5 : -4.61158178930871E+00 -7.38222803404414E-51 y6 : -1.87413424882236E-02 -3.91518268079912E-54 y7 : -1.00000000000000E+00 -1.75400184099800E-51 == err : 5.175E-15 = rco : 3.728E-05 = res : 2.671E-16 == solution 47 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.14720008362580E-06 -1.53358246947681E-06 y2 : 1.00000145071133E+00 2.63582307169833E-06 y3 : 4.75187287313925E-07 6.35230903380347E-07 y4 : -9.99997320845922E-01 2.71316264227832E-06 y5 : -1.14719818926954E-06 -1.53358803057766E-06 y6 : -9.99999541070752E-01 7.85354940243670E-07 y7 : -2.76958367493578E-06 -3.70240105754620E-06 == err : 1.000E+00 = rco : 6.103E-18 = res : 1.752E-12 == solution 48 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -7.77777777777778E-01 6.28539361054709E-01 y2 : 3.33333333333333E-01 9.42809041582063E-01 y3 : -1.00000000000000E+00 -4.26221326410856E-16 y4 : -3.33333333333333E-01 -9.42809041582063E-01 y5 : -3.33333333333333E-01 -9.42809041582064E-01 y6 : 3.33333333333333E-01 9.42809041582063E-01 y7 : 7.77777777777778E-01 -6.28539361054708E-01 == err : 1.082E-15 = rco : 1.594E-02 = res : 6.661E-16 == solution 49 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 7.37580856333855E-01 -6.75258824725613E-01 y2 : 6.50891015304205E-01 7.59171183723580E-01 y3 : -7.79956840999184E-01 6.25833305424514E-01 y4 : -1.52681772392524E-01 9.88275405127072E-01 y5 : 1.94170403372280E-01 -9.80967815197954E-01 y6 : -6.50891015304205E-01 -7.59171183723580E-01 y7 : -9.99112646314427E-01 4.21179293719809E-02 == err : 1.289E-15 = rco : 3.431E-02 = res : 8.006E-16 == solution 50 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 5.54350852949027E-01 7.40740974762091E-02 y2 : -2.16360717826898E+00 1.25838950668298E+00 y3 : -1.00000000000000E+00 1.42084232890500E-18 y4 : -1.17401304376443E-01 -4.09060948514602E-02 y5 : 2.16360717826898E+00 -1.25838950668298E+00 y6 : -5.54350852949027E-01 -7.40740974762092E-02 y7 : 1.17401304376443E-01 4.09060948514602E-02 == err : 1.000E+00 = rco : 6.365E-17 = res : 2.347E-13 == solution 51 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.66288542501341E+00 2.22552369041245E-67 y2 : -3.40153303905261E+00 -3.18991728959118E-66 y3 : -7.51653796791481E-01 2.50371415171401E-67 y4 : -1.66096705145750E-01 5.19288861096239E-67 y5 : 3.39760888953906E-01 1.18694596821997E-66 y6 : 5.64983430231049E-01 1.11276184520623E-66 y7 : 7.51653796791481E-01 -1.66914276780934E-67 == err : 4.451E-15 = rco : 3.466E-02 = res : 7.355E-16 == solution 52 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 3.66342615429079E-02 1.40857793625842E-01 y2 : 9.58206166202270E-01 2.78056456098027E+00 y3 : 4.20359335234366E-01 -5.71134798294129E-03 y4 : -3.66342615429079E-02 -1.40857793625842E-01 y5 : -1.00000000000000E+00 6.77385273659897E-17 y6 : -4.20359335234366E-01 5.71134798294127E-03 y7 : -9.58206166202270E-01 -2.78056456098027E+00 == err : 2.828E-04 = rco : 4.871E-12 = res : 8.365E-09 == solution 53 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -2.55087942273649E-02 -1.18694596821997E-64 y2 : 3.40153303905261E+00 9.19170957789549E-63 y3 : 3.39760888953906E-01 3.22849303355833E-64 y4 : 3.39368926708706E-02 1.06825137139798E-65 y5 : -4.52539859915887E+00 -9.95135499755627E-63 y6 : 1.15437461662749E-01 5.69734064745588E-64 y7 : -3.39760888953906E-01 -7.59645419660784E-65 == err : 5.291E-15 = rco : 3.454E-04 = res : 2.220E-16 == solution 54 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.00000000000000E+00 -1.15912692208982E-69 y2 : 1.00000000000000E+00 -2.02847211365718E-69 y3 : 1.00000000000000E+00 -5.79563461044910E-70 y4 : 1.00000000000000E+00 -4.63650768835928E-69 y5 : 1.00000000000000E+00 -3.66629305627531E-69 y6 : -1.71572875253810E-01 -1.37646321998166E-69 y7 : -5.82842712474619E+00 1.04321422988084E-68 == err : 6.031E-16 = rco : 4.967E-03 = res : 1.332E-15 == solution 55 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 2.16845414546002E-01 -1.69709050864880E-07 y2 : 4.14214036531227E-01 9.10179511064636E-01 y3 : -1.00000035960490E+00 2.64048425863656E-07 y4 : -8.98204563964754E-02 -1.97368247919399E-01 y5 : -4.14213607163688E-01 -9.10179632228869E-01 y6 : -2.16845399894060E-01 7.40825357801646E-08 y7 : 8.98203719818934E-02 1.97368200661721E-01 == err : 5.185E-07 = rco : 9.490E-10 = res : 7.725E-14 == solution 56 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.71572878748977E-01 4.49489420978295E-09 y2 : -9.99999978942820E-01 -1.77945455975709E-07 y3 : 1.00000002105718E+00 -1.77945451258282E-07 y4 : -1.71572878748977E-01 -4.49489420978291E-09 y5 : -1.00000000000000E+00 -2.73991744828593E-23 y6 : -1.00000004142850E+00 1.51747285969112E-07 y7 : 9.99999999314146E-01 2.04143621264880E-07 == err : 2.024E-07 = rco : 1.297E-10 = res : 6.479E-14 == solution 57 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 7.37580856333855E-01 -6.75258824725613E-01 y2 : -7.65366864730180E-01 6.43594252905583E-01 y3 : 3.25522888386498E-02 9.99470033813603E-01 y4 : 8.05623546378239E-01 5.92427802791994E-01 y5 : -7.79956840999184E-01 -6.25833305424514E-01 y6 : -9.97880696982730E-01 6.50700744525509E-02 y7 : -3.25522888386497E-02 -9.99470033813603E-01 == err : 8.165E-16 = rco : 3.058E-02 = res : 6.206E-16 == solution 58 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.66288542501341E+00 -3.62227163153069E-69 y2 : 2.21230230208591E+00 -2.75292643996332E-69 y3 : 2.94324636093021E+00 -1.95602668102657E-69 y4 : 4.89428147581460E+00 -2.02847211365718E-69 y5 : -1.00115497387755E+01 8.77031372385721E-69 y6 : -2.21230230208591E+00 1.23157235472043E-69 y7 : -4.88863522982728E-01 2.62614693285975E-70 == err : 9.981E-15 = rco : 2.268E-04 = res : 1.137E-13 == solution 59 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.00000012244995E+00 -6.48755846496627E-09 y2 : 1.71572875300494E-01 -1.64495103774840E-09 y3 : -1.00000012217785E+00 -3.09991877755129E-09 y4 : 1.00000012272204E+00 -1.60750356959566E-08 y5 : -1.71572875300494E-01 1.64495103774845E-09 y6 : -1.00000012244995E+00 6.48755846496603E-09 y7 : -1.00000000054419E+00 1.91749544735081E-08 == err : 1.239E-07 = rco : 2.323E-09 = res : 1.534E-14 == solution 60 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.00000000000000E+00 1.82314900718588E-63 y2 : 1.00000000000000E+00 3.03858167864314E-64 y3 : 1.00000000000000E+00 6.07716335728627E-64 y4 : -5.82842712474619E+00 -4.25401435010039E-63 y5 : -1.71572875253810E-01 2.65875896881274E-64 y6 : 1.00000000000000E+00 5.50742929254068E-64 y7 : 1.00000000000000E+00 1.06350358752510E-63 == err : 9.936E-16 = rco : 5.254E-03 = res : 1.110E-15 == solution 61 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 8.98202684961970E-02 -1.97368233055059E-01 y2 : 4.14213899611619E-01 -9.10179492874239E-01 y3 : 2.16845313104957E-01 7.76908412208705E-08 y4 : -8.98202801626017E-02 1.97368236067270E-01 y5 : -1.00000003492829E+00 -4.32143326116602E-08 y6 : -2.16845314375480E-01 -6.57090140270490E-08 y7 : -4.14213851746404E-01 9.10179521094533E-01 == err : 4.059E-07 = rco : 3.580E-11 = res : 5.929E-14 == solution 62 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -9.99112646314427E-01 4.21179293719811E-02 y2 : -7.65366864730179E-01 -6.43594252905583E-01 y3 : -6.18338726465555E-01 7.85911712187162E-01 y4 : 8.05623546378239E-01 5.92427802791995E-01 y5 : 1.94170403372279E-01 9.80967815197954E-01 y6 : -2.35314438705912E-01 -9.71919294456347E-01 y7 : 6.18338726465555E-01 -7.85911712187161E-01 == err : 1.319E-15 = rco : 2.371E-02 = res : 1.266E-15 == solution 63 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -3.33333333333333E-01 -9.42809041582063E-01 y2 : 3.33333333333334E-01 9.42809041582063E-01 y3 : 3.33333333333333E-01 9.42809041582063E-01 y4 : -7.77777777777778E-01 6.28539361054709E-01 y5 : -3.33333333333333E-01 -9.42809041582063E-01 y6 : -1.00000000000000E+00 1.74903815608164E-16 y7 : 7.77777777777778E-01 -6.28539361054710E-01 == err : 1.628E-15 = rco : 2.886E-02 = res : 7.448E-16 == solution 64 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.00000020455743E+00 -4.87216415335350E-08 y2 : -9.99999977020983E-01 -1.46618786396814E-07 y3 : -1.71572892802063E-01 -4.17965604593935E-09 y4 : 1.00000007929970E+00 1.70979607216355E-07 y5 : -9.99999874742267E-01 -1.22257965682821E-07 y6 : 1.71572892802063E-01 4.17965604594013E-09 y7 : 9.99999977020983E-01 1.46618786396813E-07 == err : 2.100E-07 = rco : 2.647E-09 = res : 4.454E-14 == solution 65 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -1.94170403372279E-01 9.80967815197954E-01 y2 : -9.24595708908493E-01 -3.80949832744420E-01 y3 : 3.25522888386496E-02 9.99470033813603E-01 y4 : -4.62477795870619E-01 -8.86630863621752E-01 y5 : 1.94170403372279E-01 -9.80967815197953E-01 y6 : 7.65366864730180E-01 -6.43594252905583E-01 y7 : -4.10845648789718E-01 9.11704915458152E-01 == err : 9.241E-16 = rco : 5.278E-02 = res : 4.578E-16 == solution 66 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.83802089330883E+00 1.63205070630247E-66 y2 : 4.61158178930871E+00 -3.70920615068742E-67 y3 : -4.61158178930871E+00 1.78041895232996E-66 y4 : -1.83802089330883E+00 -1.48368246027497E-67 y5 : -1.00000000000000E+00 2.96736492054994E-67 y6 : -3.98566257150641E-01 -5.00742830342802E-67 y7 : 3.98566257150641E-01 3.43101568938587E-67 == err : 5.359E-15 = rco : 4.379E-03 = res : 1.421E-14 == solution 67 : t : 9.99989835691263E-01 0.00000000000000E+00 m : 1 the solution for t : y1 : 2.10511970903634E+00 5.07740973170838E+00 y2 : 8.09809637085480E-01 1.79114916659238E+00 y3 : 1.05365204362352E+01 -9.57663076527160E-01 y4 : -2.10511970903634E+00 -5.07740973170838E+00 y5 : -1.00000000000000E+00 -7.94502825135026E-17 y6 : -1.05365204362352E+01 9.57663076527161E-01 y7 : -8.09809637085480E-01 -1.79114916659238E+00 == err : 1.000E+00 = rco : 5.675E-20 = res : 5.476E-12 == solution 68 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.71572873780510E-01 -8.17652423882193E-09 y2 : -9.99999870098064E-01 -1.33046004207821E-07 y3 : -1.00000012131492E+00 8.53897285653864E-08 y4 : 9.99999861511044E-01 1.80702279808591E-07 y5 : 9.99999870098064E-01 1.33046004207819E-07 y6 : 1.71572873780510E-01 8.17652423882386E-09 y7 : -9.99999740196128E-01 -2.66092008373977E-07 == err : 3.718E-07 = rco : 1.682E-09 = res : 4.930E-14 == solution 69 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 2.36465388315882E-07 5.58450984374490E-07 y2 : -4.14215355430054E-01 -9.16202701119823E-07 y3 : -1.37824176952752E-06 -3.25488593464508E-06 y4 : -1.71572781884301E-01 6.47676191284847E-08 y5 : 1.37823494394328E-06 3.25490129975328E-06 y6 : -4.14211862673221E-01 8.51421781193733E-07 y7 : -2.36470986580995E-07 -5.58453048685084E-07 == err : 1.000E+00 = rco : 5.524E-19 = res : 1.228E-12 == solution 70 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 4.61158170908519E+00 1.59135001117849E-07 y2 : 4.14213588886776E-01 -9.10179710153632E-01 y3 : -9.99999981606997E-01 -5.83120426316656E-09 y4 : -1.91017976539614E+00 4.19736806859185E+00 y5 : -4.14213576975482E-01 9.10179725333439E-01 y6 : -4.61158175004772E+00 -8.01427519981651E-08 y7 : 1.91017977605436E+00 -4.19736815693270E+00 == err : 1.819E-07 = rco : 1.087E-11 = res : 5.166E-13 == solution 71 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 8.98202677810758E-02 -1.97368228049693E-01 y2 : -2.16845333802996E-01 4.76981118022518E-09 y3 : -4.14213579040892E-01 9.10179755920023E-01 y4 : -8.98202591483328E-02 1.97368220992486E-01 y5 : -9.99999953888216E-01 2.27542687109098E-08 y6 : 4.14213527877838E-01 -9.10179761057660E-01 y7 : 2.16845330221522E-01 -1.53292363849533E-08 == err : 5.340E-08 = rco : 7.445E-11 = res : 1.586E-15 == solution 72 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.91017975206238E+00 4.19736830961889E+00 y2 : 4.14213290033412E-01 9.10179618744817E-01 y3 : 4.61158090594783E+00 8.89576337506035E-07 y4 : -1.91017967172001E+00 -4.19736827302938E+00 y5 : -9.99999985562019E-01 -1.25705506479820E-08 y6 : -4.61158099401943E+00 -8.95665804615109E-07 y7 : -4.14213296742161E-01 -9.10179636674310E-01 == err : 1.364E-06 = rco : 2.842E-12 = res : 1.730E-11 == solution 73 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.88920264180614E-06 -2.56339705080667E-06 y2 : 6.09324955935076E-12 2.11321086363642E-12 y3 : 1.95848072029415E-06 7.05970824608652E-07 y4 : -1.00000769532537E+00 3.71485595008540E-06 y5 : 1.88917100146334E-06 -2.56338522954373E-06 y6 : -6.09333149870861E-12 -2.11329525323538E-12 y7 : 1.95847100714777E-06 7.05955505740743E-07 == err : 1.000E+00 = rco : 7.666E-34 = res : 1.644E-12 == solution 74 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 9.53747077284241E-01 -1.82732094070347E+00 y2 : -4.27872392204506E-01 -8.97391097879740E-01 y3 : -1.00000000000000E+00 -5.83857302848431E-17 y4 : -2.14955252948971E+00 1.48930189191567E+00 y5 : 4.27872392204506E-01 8.97391097879740E-01 y6 : -9.53747077284240E-01 1.82732094070347E+00 y7 : 2.14955252948971E+00 -1.48930189191567E+00 == err : 7.586E-06 = rco : 1.154E-13 = res : 4.243E-10 == solution 75 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 7.79956840999184E-01 6.25833305424515E-01 y2 : 2.16665347642854E-01 9.76245935781963E-01 y3 : -6.18338726465555E-01 -7.85911712187162E-01 y4 : -4.62477795870619E-01 8.86630863621752E-01 y5 : -7.79956840999184E-01 -6.25833305424514E-01 y6 : 7.65366864730180E-01 -6.43594252905583E-01 y7 : -9.01215690036860E-01 -4.33370834310972E-01 == err : 9.118E-16 = rco : 4.184E-02 = res : 4.918E-16 == solution 76 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 5.82842708769498E+00 -3.95254336692208E-09 y2 : 5.82842709765874E+00 -1.17521780597851E-08 y3 : -5.82842715183364E+00 -1.17521783212769E-08 y4 : -5.82842708769498E+00 3.95254336692208E-09 y5 : -1.00000000000000E+00 -2.67354456828802E-25 y6 : 5.82842711478243E+00 7.79963489511620E-09 y7 : -5.82842706060753E+00 1.57047214859458E-08 == err : 1.103E-07 = rco : 2.042E-13 = res : 3.639E-12 == solution 77 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -4.14213683895498E-01 9.10179614312491E-01 y2 : -4.61158158686606E+00 -7.77796310439455E-07 y3 : -9.99999997016889E-01 1.38113167547357E-08 y4 : -1.91017971227720E+00 4.19736827601647E+00 y5 : 4.61158153210143E+00 7.42486822337902E-07 y6 : 4.14213672007553E-01 -9.10179606675202E-01 y7 : 1.91017977594666E+00 -4.19736826215559E+00 == err : 6.430E-07 = rco : 2.753E-12 = res : 3.416E-12 == solution 78 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 8.34501705501722E-08 -2.27953809636019E-05 y2 : -1.03924641170389E-09 -7.51680357667564E-12 y3 : -1.66929644771192E-07 4.55907724961473E-05 y4 : -8.34794724654598E-08 2.27953913662495E-05 y5 : -9.99999999970699E-01 -1.04021411084203E-11 y6 : 1.66929645027749E-07 -4.55907724959209E-05 y7 : 1.03924672032398E-09 7.51607071243516E-12 == err : 1.000E+00 = rco : 8.726E-30 = res : 7.847E-16 == solution 79 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -3.25522888386499E-02 9.99470033813603E-01 y2 : -9.97880696982730E-01 -6.50700744525509E-02 y3 : -7.79956840999184E-01 6.25833305424514E-01 y4 : 8.05623546378239E-01 -5.92427802791994E-01 y5 : 3.25522888386495E-02 -9.99470033813603E-01 y6 : -7.65366864730179E-01 -6.43594252905583E-01 y7 : 7.37580856333855E-01 6.75258824725614E-01 == err : 1.292E-15 = rco : 4.856E-02 = res : 6.684E-16 == solution 80 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 7.79956840999184E-01 6.25833305424514E-01 y2 : -9.74127244371464E-01 -2.26000247285836E-01 y3 : 1.94170403372280E-01 9.80967815197954E-01 y4 : -1.00000000000000E+00 1.64267475887956E-16 y5 : 1.94170403372279E-01 -9.80967815197954E-01 y6 : -9.74127244371463E-01 2.26000247285836E-01 y7 : 7.79956840999184E-01 -6.25833305424514E-01 == err : 1.331E-15 = rco : 3.822E-02 = res : 6.661E-16 == solution 81 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -3.52434406666847E-01 1.51502772053843E+00 y2 : -2.73534214777534E-01 8.10058022383118E-01 y3 : -1.00000000000000E+00 -1.67533267090670E-17 y4 : -9.08121841246168E-01 -6.42184343500655E-01 y5 : 2.73534214777534E-01 -8.10058022383118E-01 y6 : 3.52434406666846E-01 -1.51502772053843E+00 y7 : 9.08121841246168E-01 6.42184343500655E-01 == err : 7.063E-07 = rco : 5.603E-15 = res : 8.607E-13 == solution 82 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.00000001256347E+00 -9.21074169301741E-09 y2 : -6.64068746798157E-08 9.99999989647862E-01 y3 : 7.56176161025694E-08 1.00000002291560E+00 y4 : -1.00000001871279E+00 7.96635188591747E-08 y5 : -9.99999993850675E-01 -7.04527771579212E-08 y6 : -1.46070393206262E-07 -1.00000002906493E+00 y7 : 1.36859651961760E-07 -9.99999983498537E-01 == err : 1.480E-07 = rco : 8.422E-09 = res : 5.344E-14 == solution 83 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 9.98846358548192E-02 1.95759134039956E-54 y2 : 9.97694047984983E-03 -1.75367557577460E-54 y3 : -1.33039971895121E+00 5.62807510364873E-53 y4 : 3.39368926708706E-02 1.37031393827969E-53 y5 : -9.98846358548192E-02 1.63132611699963E-54 y6 : 2.93985090992536E-01 -6.85156969139845E-53 y7 : -7.49920519204175E-03 -2.03915764624954E-54 == err : 4.756E-15 = rco : 1.921E-06 = res : 1.388E-16 == solution 84 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.64298152382376E-01 -6.24766752305337E-02 y2 : -5.59684162205698E-01 2.00100240615047E-01 y3 : 1.18301822176133E+00 1.02283930250453E+00 y4 : -1.64298152382376E-01 6.24766752305337E-02 y5 : -1.00000000000000E+00 -1.35689998020704E-17 y6 : -1.18301822176133E+00 -1.02283930250453E+00 y7 : 5.59684162205698E-01 -2.00100240615047E-01 == err : 1.688E-07 = rco : 1.638E-17 = res : 1.456E-14 == solution 85 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -5.82842712474619E+00 1.09638858609597E-79 y2 : -5.82842712474619E+00 6.32531876593832E-80 y3 : -5.82842712474619E+00 2.53012750637533E-80 y4 : -5.82842712474619E+00 5.48194293047987E-80 y5 : -5.82842712474619E+00 8.85544627231364E-80 y6 : -5.82842712474619E+00 5.06025501275065E-80 y7 : 3.39705627484772E+01 -4.04820401020052E-79 == err : 5.035E-14 = rco : 1.053E-05 = res : 3.783E-10 == solution 86 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -3.25522888386498E-02 9.99470033813603E-01 y2 : 6.50891015304205E-01 7.59171183723580E-01 y3 : -6.18338726465555E-01 -7.85911712187161E-01 y4 : -1.00000000000000E+00 -1.59928489738031E-16 y5 : -6.18338726465555E-01 7.85911712187162E-01 y6 : 6.50891015304204E-01 -7.59171183723580E-01 y7 : -3.25522888386497E-02 -9.99470033813603E-01 == err : 6.843E-16 = rco : 4.712E-02 = res : 4.965E-16 == solution 87 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 4.52539859915887E+00 2.78190461301557E-68 y2 : 2.04792324812690E+01 -7.41841230137484E-68 y3 : -1.00115497387755E+01 -1.85460307534371E-68 y4 : -6.02058902446318E+00 -3.76716249679191E-69 y5 : -4.52539859915887E+00 -5.79563461044910E-68 y6 : -3.40153303905261E+00 -1.56482134482126E-68 y7 : -2.04556067897774E+00 2.72394826691108E-68 == err : 2.088E-14 = rco : 1.478E-05 = res : 2.183E-11 == solution 88 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 5.82842718754893E+00 1.18487091797202E-07 y2 : -9.99999970712265E-01 3.58020502296565E-08 y3 : 1.00000002928773E+00 3.58020504183837E-08 y4 : -5.82842718754893E+00 -1.18487091797202E-07 y5 : -1.00000000000000E+00 -2.24689474408075E-23 y6 : -1.00000004006298E+00 -5.61312209828642E-08 y7 : 9.99999981487512E-01 -1.54728796651760E-08 == err : 1.640E-07 = rco : 1.845E-10 = res : 1.382E-13 == solution 89 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -2.16077014195874E-07 -9.99999972654374E-01 y2 : -2.71247913007963E-08 -9.99999797537440E-01 y3 : -9.99999988480419E-01 5.34362175552188E-08 y4 : -9.99999781711393E-01 1.89765588507604E-07 y5 : 8.05610088219822E-08 9.99999786017859E-01 y6 : 1.62640796819057E-07 9.99999984173954E-01 y7 : 9.99999770191812E-01 -2.43201805977209E-07 == err : 3.349E-07 = rco : 2.359E-09 = res : 1.345E-13 == solution 90 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -4.22615357192436E-08 1.00000005020037E+00 y2 : 1.83523726656482E-08 1.00000004816891E+00 y3 : -1.00000002834469E+00 -1.03508818298277E-09 y4 : -1.00000007002459E+00 -2.28740748508384E-08 y5 : -1.73172842701817E-08 -1.00000007651360E+00 y6 : 4.12264475084717E-08 -1.00000002185568E+00 y7 : 1.00000009836927E+00 2.39091632329559E-08 == err : 1.068E-07 = rco : 6.354E-10 = res : 7.544E-15 == solution 91 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.00000000000000E+00 7.12167580931985E-66 y2 : 1.00000000000000E+00 0.00000000000000E+00 y3 : 1.00000000000000E+00 0.00000000000000E+00 y4 : 1.00000000000000E+00 3.13379640399910E-67 y5 : 1.00000000000000E+00 9.49556774575980E-66 y6 : -5.82842712474619E+00 0.00000000000000E+00 y7 : -1.71572875253810E-01 -7.71514879342984E-66 == err : 4.691E-16 = rco : 5.847E-03 = res : 1.776E-15 == solution 92 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 6.30138195617764E-01 7.76483003306311E-01 y2 : -4.14213562373095E-01 -9.10179721124455E-01 y3 : 4.14213562373095E-01 9.10179721124455E-01 y4 : -6.30138195617764E-01 -7.76483003306311E-01 y5 : -1.00000000000000E+00 -1.35521571693584E-17 y6 : 9.67750870201406E-01 -2.51909216235577E-01 y7 : -9.67750870201406E-01 2.51909216235577E-01 == err : 7.793E-16 = rco : 9.714E-02 = res : 7.948E-16 == solution 93 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -9.99112646314427E-01 -4.21179293719811E-02 y2 : -6.50891015304205E-01 7.59171183723580E-01 y3 : 1.94170403372280E-01 9.80967815197954E-01 y4 : -1.52681772392523E-01 -9.88275405127072E-01 y5 : -7.79956840999185E-01 -6.25833305424514E-01 y6 : 6.50891015304205E-01 -7.59171183723580E-01 y7 : 7.37580856333855E-01 6.75258824725614E-01 == err : 6.606E-16 = rco : 3.246E-02 = res : 1.590E-15 == solution 94 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 8.25615246470455E-01 -5.64233519737644E-01 y2 : -8.25615246470455E-01 5.64233519737644E-01 y3 : -1.00000000000000E+00 -2.12582206656860E-17 y4 : 8.55534940033946E-01 5.17745078567737E-01 y5 : 4.14213562373095E-01 9.10179721124455E-01 y6 : -4.14213562373095E-01 -9.10179721124455E-01 y7 : -8.55534940033946E-01 -5.17745078567737E-01 == err : 3.937E-16 = rco : 1.594E-01 = res : 5.979E-16 == solution 95 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 4.61158184952898E+00 -4.27760584346545E-08 y2 : 4.14213572846565E-01 9.10179730225161E-01 y3 : -1.00000000043695E+00 3.51268485630629E-09 y4 : -1.91017975116666E+00 -4.19736822962789E+00 y5 : -4.14213569710219E-01 -9.10179728584059E-01 y6 : -4.61158183664969E+00 3.27464599852740E-08 y7 : 1.91017973558797E+00 4.19736823450370E+00 == err : 3.902E-08 = rco : 1.512E-12 = res : 1.463E-13 == solution 96 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 8.98203333886347E-02 -1.97368205146713E-01 y2 : -2.16845337156257E-01 -6.87932347029018E-08 y3 : -4.14213605595102E-01 9.10179490221719E-01 y4 : -8.98203873422940E-02 1.97368228286203E-01 y5 : -1.00000020018615E+00 -1.82262788967117E-07 y6 : 4.14213856986672E-01 -9.10179389740390E-01 y7 : 2.16845339904496E-01 1.27435204123878E-07 == err : 4.428E-07 = rco : 5.106E-10 = res : 5.127E-14 == solution 97 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 8.98202857712649E-02 1.97368193976290E-01 y2 : 4.14213139600140E-01 9.10179667169366E-01 y3 : 2.16845281713754E-01 4.53113514685943E-08 y4 : -8.98202575894889E-02 -1.97368212406046E-01 y5 : -1.00000002352421E+00 -1.53493437433580E-07 y6 : -2.16845254571140E-01 -2.53828057431966E-08 y7 : -4.14213171400315E-01 -9.10179515174718E-01 == err : 4.423E-07 = rco : 2.003E-10 = res : 5.281E-14 == solution 98 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 3.33333333333333E-01 -9.42809041582063E-01 y2 : 3.33333333333333E-01 9.42809041582063E-01 y3 : -3.33333333333333E-01 9.42809041582063E-01 y4 : 1.00000000000000E+00 1.56789644507421E-16 y5 : -1.00000000000000E+00 -6.75404302505795E-17 y6 : -1.00000000000000E+00 -6.80181856317992E-17 y7 : -3.33333333333333E-01 -9.42809041582063E-01 == err : 9.654E-16 = rco : 3.151E-02 = res : 4.965E-16 == solution 99 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -5.82842733030478E+00 -2.29198655054541E-07 y2 : -9.99999999676969E-01 3.51752021030469E-09 y3 : -1.00000003559131E+00 -4.28417924639293E-08 y4 : 1.00000003494525E+00 3.58067520426526E-08 y5 : 9.99999999676969E-01 -3.51752021030469E-09 y6 : 5.82842733030478E+00 2.29198655054541E-07 y7 : -9.99999999353938E-01 7.03504042127674E-09 == err : 3.137E-07 = rco : 7.923E-10 = res : 1.045E-13 == solution 100 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -4.14213566068356E-01 9.10179682703541E-01 y2 : -4.61158159392794E+00 -1.45862831230249E-07 y3 : -1.00000000892810E+00 1.23518587215750E-08 y4 : -1.91017975411656E+00 4.19736826942323E+00 y5 : 4.61158158276347E+00 7.64714240089480E-08 y6 : 4.14213551369902E-01 -9.10179686732785E-01 y7 : 1.91017978890758E+00 -4.19736820835443E+00 == err : 2.372E-07 = rco : 1.007E-11 = res : 6.968E-13 == solution 101 : t : 9.99969135362444E-01 0.00000000000000E+00 m : 1 the solution for t : y1 : 5.30557224307361E+00 -4.39790586791648E+00 y2 : -2.81110086949509E+00 -1.53386610734350E+01 y3 : -2.94780878441632E+00 1.51011959914147E+00 y4 : -5.30557224307361E+00 4.39790586791648E+00 y5 : -9.99999999999999E-01 7.63159892572317E-16 y6 : 2.94780878441633E+00 -1.51011959914147E+00 y7 : 2.81110086949509E+00 1.53386610734350E+01 == err : 1.000E+00 = rco : 4.361E-20 = res : 2.742E-10 == solution 102 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.56424818902291E-02 -9.97883910156942E-01 y2 : -5.85732683787454E-01 -5.94613972923550E-01 y3 : -2.16874882733997E+00 -2.19651240203037E+00 y4 : -1.56424818902290E-02 9.97883910156942E-01 y5 : -1.00000000000000E+00 -9.05706760265600E-18 y6 : 2.16874882733997E+00 2.19651240203037E+00 y7 : 5.85732683787454E-01 5.94613972923550E-01 == err : 1.000E+00 = rco : 9.719E-17 = res : 3.228E-14 == solution 103 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 3.33333333333334E-01 -9.42809041582064E-01 y2 : 7.77777777777778E-01 6.28539361054709E-01 y3 : -3.33333333333334E-01 9.42809041582063E-01 y4 : -3.33333333333333E-01 9.42809041582063E-01 y5 : 3.33333333333334E-01 -9.42809041582063E-01 y6 : -1.00000000000000E+00 -4.39750396743113E-16 y7 : -7.77777777777778E-01 -6.28539361054709E-01 == err : 8.415E-16 = rco : 3.577E-02 = res : 5.389E-16 == solution 104 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 8.25615246470455E-01 5.64233519737644E-01 y2 : -4.14213562373095E-01 -9.10179721124455E-01 y3 : 1.71572875253810E-01 -9.85171431009416E-01 y4 : -1.71572875253810E-01 9.85171431009416E-01 y5 : 4.14213562373095E-01 9.10179721124455E-01 y6 : -8.25615246470455E-01 -5.64233519737644E-01 y7 : -1.00000000000000E+00 -2.79454989332552E-16 == err : 4.694E-16 = rco : 7.389E-02 = res : 1.332E-15 == solution 105 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -2.18692641697949E-06 3.33779860566171E-06 y2 : -2.41421481416274E+00 3.25591125119760E-06 y3 : 2.18692363595506E-06 -3.33781327761510E-06 y4 : 1.00000114686552E+00 -2.81536696348489E-06 y5 : 2.18692836997993E-06 -3.33780743176494E-06 y6 : 4.14213667293508E-01 -4.40527416942203E-07 y7 : -2.18692187726052E-06 3.33780523294781E-06 == err : 1.000E+00 = rco : 3.877E-17 = res : 4.517E-12 == solution 106 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 2.65933024330713E-01 3.74731537602481E-02 y2 : 2.96406234979125E-01 -2.10900905968942E-01 y3 : -1.60726130758351E-01 -2.37162813379691E-01 y4 : -2.65933024330713E-01 -3.74731537602482E-02 y5 : -1.00000000000000E+00 1.89007322725769E-17 y6 : 1.60726130758351E-01 2.37162813379691E-01 y7 : -2.96406234979125E-01 2.10900905968942E-01 == err : 1.228E-07 = rco : 1.195E-16 = res : 2.294E-14 == solution 107 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -9.01215690036860E-01 4.33370834310972E-01 y2 : -9.74127244371464E-01 -2.26000247285836E-01 y3 : -6.18338726465555E-01 -7.85911712187162E-01 y4 : 8.97847776453482E-01 4.40305996231641E-01 y5 : 3.25522888386499E-02 -9.99470033813604E-01 y6 : 9.74127244371464E-01 2.26000247285836E-01 y7 : -4.10845648789718E-01 9.11704915458152E-01 == err : 8.698E-16 = rco : 3.046E-02 = res : 1.295E-15 == solution 108 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 9.99999988485046E-01 5.59671841891430E-08 y2 : -9.99999868557457E-01 2.98386030695040E-07 y3 : -1.00000000000000E+00 -2.18894743880982E-22 y4 : -1.71572862989996E-01 2.07962492447324E-08 y5 : 9.99999940036205E-01 -1.77176607476000E-07 y6 : -1.00000005996379E+00 -1.77176607408183E-07 y7 : 1.71572862989996E-01 -2.07962492447322E-08 == err : 3.260E-07 = rco : 2.640E-09 = res : 5.215E-14 == solution 109 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.00000032446301E+00 -3.60874803020842E-07 y2 : 1.71572912552444E-01 6.79003301739577E-08 y3 : 1.00000016223150E+00 1.80437401260191E-07 y4 : 1.00000037962387E+00 5.76189528133228E-07 y5 : -1.00000005516087E+00 -2.15314725112387E-07 y6 : -1.00000016223150E+00 -1.80437401260188E-07 y7 : -1.71572912552444E-01 -6.79003301739593E-08 == err : 6.890E-07 = rco : 2.994E-09 = res : 9.803E-14 == solution 110 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -5.82842727550835E+00 -4.45644520420477E-08 y2 : -1.00000001997632E+00 -1.62942427872902E-08 y3 : -1.00000000589038E+00 8.64819188417012E-09 y4 : 1.00000004584302E+00 2.39402938013550E-08 y5 : 1.00000001997632E+00 1.62942427872902E-08 y6 : 5.82842727550835E+00 4.45644520420478E-08 y7 : -1.00000003995264E+00 -3.25884856855251E-08 == err : 7.620E-08 = rco : 3.662E-11 = res : 3.703E-14 == solution 111 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 2.16845354264421E-01 -1.95485727747765E-08 y2 : 4.14213861067532E-01 -9.10179869892884E-01 y3 : -9.99999827692708E-01 3.00393561014969E-07 y4 : -8.98201462754690E-02 1.97368267807267E-01 y5 : -4.14214127779485E-01 9.10179649006422E-01 y6 : -2.16845334624594E-01 -5.29319759352433E-08 y7 : 8.98202210403026E-02 -1.97368274833819E-01 == err : 5.700E-07 = rco : 4.866E-10 = res : 1.072E-13 == solution 112 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 4.56959965632050E-02 1.44049402911003E-01 y2 : -4.10837735979996E-01 -1.35310188970654E-03 y3 : -7.75960945206904E-01 -2.59435704566533E+00 y4 : -4.56959965632049E-02 -1.44049402911003E-01 y5 : -1.00000000000000E+00 -6.96984763346925E-17 y6 : 7.75960945206904E-01 2.59435704566533E+00 y7 : 4.10837735979995E-01 1.35310188970662E-03 == err : 1.000E+00 = rco : 4.018E-18 = res : 3.832E-15 == solution 113 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 5.33579705204343E+01 1.75422173775356E-78 y2 : 2.16845335437475E-01 1.15964177375536E-80 y3 : 1.15704270157665E+01 1.68675167091688E-79 y4 : -1.15704270157665E+01 -2.36145233928364E-79 y5 : -2.16845335437475E-01 -6.85242866309984E-81 y6 : -5.33579705204343E+01 2.69880267346701E-79 y7 : -1.00000000000000E+00 -4.21687917729221E-80 == err : 1.611E-14 = rco : 1.530E-06 = res : 2.314E-11 == solution 114 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 8.25615246470455E-01 5.64233519737644E-01 y2 : -8.25615246470455E-01 -5.64233519737644E-01 y3 : -1.00000000000000E+00 -1.29471993628112E-17 y4 : 8.55534940033946E-01 -5.17745078567737E-01 y5 : 4.14213562373095E-01 -9.10179721124455E-01 y6 : -4.14213562373095E-01 9.10179721124455E-01 y7 : -8.55534940033946E-01 5.17745078567737E-01 == err : 3.736E-16 = rco : 1.594E-01 = res : 4.441E-16 == solution 115 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.87413424882236E-02 1.13592500178918E-50 y2 : -1.87413424882236E-02 -1.55354448774109E-50 y3 : -1.00000000000000E+00 1.60365882605532E-49 y4 : -4.06397269840746E-03 -2.50571691571143E-52 y5 : -2.16845335437475E-01 -1.47002059055071E-49 y6 : 2.16845335437475E-01 -1.33638235504610E-50 y7 : 4.06397269840746E-03 3.09038419604410E-51 == err : 1.530E-16 = rco : 5.050E-08 = res : 1.076E-16 == solution 116 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -9.99999938579316E-01 5.76853220785370E-08 y2 : 5.82842694811886E+00 -2.73589897438996E-07 y3 : 9.99999969289661E-01 -2.88426583218355E-08 y4 : 9.99999938985211E-01 -7.57832559797771E-08 y5 : -1.00000000040589E+00 1.80979339012400E-08 y6 : -9.99999969289661E-01 2.88426583218358E-08 y7 : -5.82842694811886E+00 2.73589897438995E-07 == err : 9.784E-07 = rco : 9.404E-11 = res : 6.567E-13 == solution 117 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -3.33333333333333E-01 9.42809041582064E-01 y2 : 7.77777777777778E-01 6.28539361054709E-01 y3 : -1.00000000000000E+00 -7.25878464897611E-16 y4 : -7.77777777777778E-01 -6.28539361054708E-01 y5 : -3.33333333333333E-01 9.42809041582064E-01 y6 : 3.33333333333334E-01 -9.42809041582063E-01 y7 : 3.33333333333333E-01 -9.42809041582064E-01 == err : 5.979E-16 = rco : 6.698E-02 = res : 8.006E-16 == solution 118 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -4.10845648789718E-01 -9.11704915458152E-01 y2 : 9.74127244371464E-01 -2.26000247285836E-01 y3 : 3.25522888386496E-02 9.99470033813603E-01 y4 : 8.97847776453482E-01 -4.40305996231641E-01 y5 : -6.18338726465555E-01 7.85911712187162E-01 y6 : -9.74127244371464E-01 2.26000247285836E-01 y7 : -9.01215690036860E-01 -4.33370834310972E-01 == err : 6.292E-16 = rco : 3.245E-02 = res : 9.155E-16 == solution 119 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.29561750777999E+00 -9.28766195440485E-01 y2 : 3.60692110686171E-01 -1.12145689315755E-01 y3 : -1.00000000000000E+00 1.08964326271579E-18 y4 : 1.76568879329474E-01 -1.80400826779622E+00 y5 : -3.60692110686171E-01 1.12145689315755E-01 y6 : -1.29561750777999E+00 9.28766195440485E-01 y7 : -1.76568879329474E-01 1.80400826779622E+00 == err : 1.000E+00 = rco : 4.395E-17 = res : 1.536E-14 == solution 120 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 9.40355701519096E-06 -3.80408467398529E-06 y2 : 1.18859818314969E-12 1.38139440208878E-13 y3 : -7.93455511905565E-06 6.70344722332397E-06 y4 : -1.00000293794529E+00 -5.79869087642616E-06 y5 : 9.40353393051425E-06 -3.80410986257745E-06 y6 : -1.18865682260885E-12 -1.38117574892203E-13 y7 : -7.93459053626682E-06 6.70343818964306E-06 == err : 1.000E+00 = rco : 2.055E-32 = res : 8.965E-13 == solution 121 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.81192212001411E-01 1.40457522382472E+00 y2 : -6.46357407733229E+00 2.51489587485411E+00 y3 : -1.00000000000000E+00 2.31987754119034E-16 y4 : -1.48609754219571E+00 4.32674795218037E+00 y5 : 6.46357407733229E+00 -2.51489587485411E+00 y6 : 1.81192212001411E-01 -1.40457522382472E+00 y7 : 1.48609754219571E+00 -4.32674795218037E+00 == err : 1.000E+00 = rco : 2.421E-18 = res : 1.686E-11 == solution 122 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.00000000476359E+00 -1.16997501010004E-07 y2 : -1.00000001225644E+00 1.74284802164276E-07 y3 : -1.00000000000000E+00 1.52828447628602E-21 y4 : -5.82842717434617E+00 8.48858838393152E-07 y5 : 1.00000000374643E+00 -2.86436505772917E-08 y6 : -9.99999996253574E-01 -2.86436505769799E-08 y7 : 5.82842717434617E+00 -8.48858838393154E-07 == err : 8.533E-07 = rco : 1.436E-09 = res : 7.384E-13 == solution 123 : t : 9.99973143159830E-01 0.00000000000000E+00 m : 1 the solution for t : y1 : -5.66036098171651E+00 -3.61039195934214E+00 y2 : 4.11028438167495E+00 -7.92303170315370E-01 y3 : -1.00000000000000E+00 -1.07925893830145E-16 y4 : -5.43625895933877E+00 -6.97350023774189E-01 y5 : -4.11028438167494E+00 7.92303170315370E-01 y6 : 5.66036098171651E+00 3.61039195934214E+00 y7 : 5.43625895933877E+00 6.97350023774189E-01 == err : 1.000E+00 = rco : 7.912E-20 = res : 1.431E-11 == solution 124 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 5.82842718017465E+00 8.17540029119107E-09 y2 : 5.82842702414443E+00 2.72303972596162E-07 y3 : -5.82842722534792E+00 2.72303998084297E-07 y4 : -5.82842718017465E+00 -8.17540029119111E-09 y5 : -1.00000000000000E+00 6.97393739975778E-24 y6 : 5.82842728077639E+00 -2.64128592019000E-07 y7 : -5.82842707957290E+00 -2.80479378661459E-07 == err : 1.935E-07 = rco : 1.683E-13 = res : 1.396E-11 == solution 125 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.10443509311226E-06 1.19415014182210E-06 y2 : -9.99999682661736E-01 -2.56637056429106E-07 y3 : -4.57472053299372E-07 4.94632846511595E-07 y4 : 5.82842655866546E+00 1.80790828227859E-06 y5 : 1.89491071566420E-07 -2.04883786508841E-07 y6 : -5.82842504611561E+00 -3.52980360972724E-06 y7 : -4.57472047102860E-07 4.94633182052903E-07 == err : 1.000E+00 = rco : 9.667E-20 = res : 7.339E-13 == solution 126 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 7.51653796791481E-01 -1.54304100652424E-60 y2 : 4.52017791174892E-01 2.48920611114446E-60 y3 : -2.20975009844629E-01 3.64057122683986E-60 y4 : -1.00000000000000E+00 -3.11150763893057E-60 y5 : -4.52539859915887E+00 -3.73380916671669E-59 y6 : 2.21230230208591E+00 -2.48920611114446E-60 y7 : 1.33039971895121E+00 3.73380916671669E-59 == err : 4.791E-15 = rco : 2.778E-02 = res : 1.998E-15 == solution 127 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 5.44063456318924E-01 -7.41841230137484E-68 y2 : 2.16845335437475E-01 4.63650768835928E-68 y3 : -2.16845335437475E-01 1.85460307534371E-68 y4 : -5.44063456318924E-01 -1.29822215274060E-67 y5 : -1.00000000000000E+00 -1.66914276780934E-67 y6 : -2.50899312738871E+00 -2.31825384417964E-67 y7 : 2.50899312738871E+00 5.19288861096239E-67 == err : 1.445E-15 = rco : 4.278E-02 = res : 8.882E-16 == solution 128 : t : 9.99965679442898E-01 0.00000000000000E+00 m : 1 the solution for t : y1 : 8.34362995344630E+00 1.55853851270899E+01 y2 : -8.21366276684083E-01 2.33349189059193E+00 y3 : -1.00000000000000E+00 1.98164014171164E-16 y4 : 8.87176369682328E-01 -5.35179987563752E+00 y5 : 8.21366276684083E-01 -2.33349189059193E+00 y6 : -8.34362995344630E+00 -1.55853851270899E+01 y7 : -8.87176369682328E-01 5.35179987563752E+00 == err : 1.000E+00 = rco : 3.606E-20 = res : 3.015E-11 == solution 129 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.91017972595199E+00 4.19736823493513E+00 y2 : -4.61158189091446E+00 -2.63734088750272E-08 y3 : -4.14213564327272E-01 -9.10179743060700E-01 y4 : -1.91017973502208E+00 -4.19736823717805E+00 y5 : -1.00000000125736E+00 1.58868771302351E-09 y6 : 4.14213565374101E-01 9.10179744795357E-01 y7 : 4.61158190019509E+00 2.52929875518923E-08 == err : 1.194E-07 = rco : 3.193E-13 = res : 1.758E-13 == solution 130 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -4.10401946548373E-01 -7.14115607346358E-01 y2 : 1.66377010537013E-01 1.21025922862868E-01 y3 : 8.42841873047830E-01 5.23097692720227E-01 y4 : 4.10401946548373E-01 7.14115607346358E-01 y5 : -1.00000000000000E+00 2.70343304810362E-16 y6 : -8.42841873047830E-01 -5.23097692720227E-01 y7 : -1.66377010537013E-01 -1.21025922862868E-01 == err : 1.000E+00 = rco : 2.128E-17 = res : 1.093E-15 == solution 131 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.98669932534135E-03 6.34365386452503E-04 y2 : 4.14672529513657E-29 -1.22277867220982E-28 y3 : 1.74639564129903E-03 1.91442729647419E-04 y4 : -9.99519004307109E-01 -1.65471536699935E-03 y5 : -1.98626632648998E-03 6.36312486053456E-04 y6 : -3.99217873876970E-29 1.20426550416940E-28 y7 : 1.74557431764129E-03 1.92594764845974E-04 == err : 1.000E+00 = rco : 1.571E-28 = res : 5.555E-17 == solution 132 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 8.98202635162139E-02 1.97368229803297E-01 y2 : -2.16845397965510E-01 -4.97609765622481E-08 y3 : -4.14213532383838E-01 -9.10180119363844E-01 y4 : -8.98202506277731E-02 -1.97368220970363E-01 y5 : -9.99999938305686E-01 -3.72250413079949E-08 y6 : 4.14213461553025E-01 9.10180132588369E-01 y7 : 2.16845394213567E-01 6.49285589827696E-08 == err : 4.291E-07 = rco : 3.925E-11 = res : 7.287E-14 == solution 133 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -2.45387796407361E-01 -6.41607572565663E-01 y2 : 1.73933086054252E-01 -6.21930933118815E-01 y3 : -1.00000000000000E+00 -2.88071951931333E-17 y4 : -5.38234053607716E-01 3.01526559043029E-02 y5 : -1.73933086054252E-01 6.21930933118815E-01 y6 : 2.45387796407361E-01 6.41607572565663E-01 y7 : 5.38234053607716E-01 -3.01526559043028E-02 == err : 1.000E+00 = rco : 1.028E-17 = res : 8.006E-16 == solution 134 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.61970693995293E-07 4.57732515114174E-07 y2 : 2.41421350413561E+00 -4.40607470972605E-08 y3 : -2.77897630609150E-08 -7.85344973270401E-08 y4 : -5.82842711940945E+00 7.73495306099686E-09 y5 : 2.77897881855145E-08 7.85344720834454E-08 y6 : 2.41421361527380E+00 3.63258305566721E-08 y7 : -1.61970672801067E-07 -4.57732526390988E-07 == err : 1.000E+00 = rco : 4.542E-21 = res : 5.985E-14 == solution 135 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.33347464750160E+02 3.57591354234379E-78 y2 : -1.33193629587330E+01 -1.93976442155442E-79 y3 : -1.33039971895121E+00 -3.53163631098223E-80 y4 : 1.77405429626469E+02 -2.63133260663034E-78 y5 : -4.52539859915887E+00 -7.85393746770674E-80 y6 : 1.33193629587330E+01 3.05723740353685E-80 y7 : -3.92021665581997E+01 -1.18072616964182E-79 == err : 4.231E-13 = rco : 6.908E-10 = res : 1.239E-07 == solution 136 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 6.01364342340025E-01 1.40949833726122E-66 y2 : -2.93985090992536E-01 1.85460307534371E-66 y3 : -1.33039971895121E+00 -8.23443765452608E-66 y4 : -6.02058902446318E+00 -1.98813449676846E-65 y5 : 2.94324636093022E+00 9.19883125370481E-66 y6 : 1.76996341218547E+00 4.89615211890740E-66 y7 : 1.33039971895122E+00 9.42138362274605E-66 == err : 5.051E-15 = rco : 4.405E-03 = res : 1.421E-14 == solution 137 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -4.14213557615329E-01 -9.10179729058776E-01 y2 : -4.61158182530189E+00 5.58631671336152E-08 y3 : -9.99999997445974E-01 -1.97305931241045E-08 y4 : -1.91017971450894E+00 -4.19736829684448E+00 y5 : 4.61158175263441E+00 1.47572091882956E-10 y6 : 4.14213540033575E-01 9.10179719747424E-01 y7 : 1.91017980220415E+00 4.19736826987568E+00 == err : 9.090E-08 = rco : 2.595E-11 = res : 4.662E-13 == solution 138 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -2.74366064306949E-01 -3.95842282354369E-02 y2 : 4.73823049461093E+00 -1.26765343145865E-01 y3 : 6.12723860461826E-01 2.19771279830213E-02 y4 : 2.74366064306949E-01 3.95842282354369E-02 y5 : -1.00000000000000E+00 1.85261725285074E-18 y6 : -6.12723860461826E-01 -2.19771279830212E-02 y7 : -4.73823049461093E+00 1.26765343145865E-01 == err : 1.000E+00 = rco : 1.266E-17 = res : 1.722E-13 == solution 139 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.71572982429335E-01 -1.29759146944424E-07 y2 : 1.71572640774266E-01 3.93161897249839E-08 y3 : -1.71573109733354E-01 3.93161898998349E-08 y4 : -1.71572982429335E-01 1.29759146944941E-07 y5 : -1.00000000000000E+00 -5.17457681078159E-19 y6 : 1.71573216908879E-01 -1.69075336734399E-07 y7 : -1.71572747949791E-01 9.04429571095798E-08 == err : 3.812E-07 = rco : 4.284E-10 = res : 1.126E-13 == solution 140 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.00000000000000E+00 0.00000000000000E+00 y2 : 1.00000000000000E+00 -1.18694596821997E-66 y3 : 1.00000000000000E+00 -6.38956698594637E-67 y4 : 1.00000000000000E+00 -2.96736492054994E-66 y5 : -1.71572875253810E-01 -8.90209476164981E-67 y6 : -5.82842712474619E+00 5.60566245772779E-66 y7 : 1.00000000000000E+00 5.93472984109987E-67 == err : 5.361E-16 = rco : 7.337E-03 = res : 6.661E-16 == solution 141 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 7.06951944979000E-01 4.80565671924677E-03 y2 : 4.62869544715241E+00 5.80265825321164E-03 y3 : -1.00000000000000E+00 6.50360237340414E-18 y4 : 4.42899942064433E-01 8.65516555315270E-03 y5 : -4.62869544715241E+00 -5.80265825321165E-03 y6 : -7.06951944979000E-01 -4.80565671924677E-03 y7 : -4.42899942064433E-01 -8.65516555315270E-03 == err : 2.556E-06 = rco : 1.492E-14 = res : 2.082E-12 == solution 142 : t : 9.99979081769393E-01 0.00000000000000E+00 m : 1 the solution for t : y1 : -2.08131796506955E+00 -1.46617736600328E+00 y2 : -6.72595575956704E+00 9.68861078802150E+00 y3 : -1.00000000000000E+00 1.15085611368902E-15 y4 : -3.92442684780883E+00 -4.54281142155803E+00 y5 : 6.72595575956704E+00 -9.68861078802150E+00 y6 : 2.08131796506955E+00 1.46617736600329E+00 y7 : 3.92442684780883E+00 4.54281142155803E+00 == err : 1.000E+00 = rco : 1.772E-18 = res : 8.614E-10 == solution 143 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.00000012363986E+00 8.19823715060264E-08 y2 : -3.27991596728609E-08 -1.00000014205682E+00 y3 : 1.14781531173892E-07 -9.99999981583038E-01 y4 : -1.00000024992957E+00 2.55697616573327E-08 y5 : -9.99999873710292E-01 -1.07552133163277E-07 y6 : -7.22939805157640E-09 1.00000010787275E+00 y7 : -7.47529734709241E-08 1.00000001576712E+00 == err : 2.516E-07 = rco : 1.755E-08 = res : 9.588E-14 == solution 144 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -7.17999986067856E+00 -6.39194176573182E-01 y2 : -1.20854855992929E+00 -8.76119998592999E-02 y3 : -1.00000000000000E+00 -2.61285124856743E-16 y4 : 1.42667190907114E+00 1.83729871481847E-01 y5 : 1.20854855992929E+00 8.76119998592998E-02 y6 : 7.17999986067856E+00 6.39194176573182E-01 y7 : -1.42667190907114E+00 -1.83729871481847E-01 == err : 9.214E-06 = rco : 3.537E-15 = res : 1.007E-10 == solution 145 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.91820581119105E-06 -1.35561087571845E-06 y2 : 2.41421456085857E+00 -7.05447322581547E-07 y3 : 1.91820619013923E-06 -1.35561226890349E-06 y4 : -5.82842735039576E+00 -8.75097325111772E-08 y5 : -1.91820547458291E-06 1.35561092931296E-06 y6 : 2.41421278953647E+00 7.92956993091194E-07 y7 : -1.91820580327271E-06 1.35561227731050E-06 == err : 1.000E+00 = rco : 2.070E-17 = res : 2.762E-12 == solution 146 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.09387391667109E-01 -5.94863734905985E-02 y2 : 2.72641922147382E-02 -6.37751654301072E-01 y3 : -1.00000000000000E+00 1.08728664940629E-16 y4 : -5.69226939024288E-02 2.09909826996594E-01 y5 : -2.72641922147382E-02 6.37751654301072E-01 y6 : -1.09387391667109E-01 5.94863734905985E-02 y7 : 5.69226939024289E-02 -2.09909826996594E-01 == err : 1.175E-07 = rco : 2.310E-17 = res : 1.037E-14 == solution 147 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -4.14213896537452E-01 -9.10180058705478E-01 y2 : -2.16845416840249E-01 -7.17284083749911E-08 y3 : -1.00000007027926E+00 4.95100405001448E-07 y4 : -8.98203309819832E-02 -1.97368291533362E-01 y5 : 2.16845351701230E-01 -1.49628429403840E-08 y6 : 4.14214135985324E-01 9.10179619697161E-01 y7 : 8.98202269523912E-02 1.97368322132526E-01 == err : 5.824E-07 = rco : 1.571E-09 = res : 9.368E-14 == solution 148 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -5.82842701905745E+00 1.76825764078196E-07 y2 : 5.82842728105696E+00 1.92144771102325E-07 y3 : -1.00000000000000E+00 -9.23792640661963E-24 y4 : -5.82842715005721E+00 -7.65949809722434E-09 y5 : -5.82842725574593E+00 -1.84485277490902E-07 y6 : 5.82842699374643E+00 -1.84485257689620E-07 y7 : 5.82842715005721E+00 7.65949809722433E-09 == err : 1.680E-07 = rco : 6.108E-14 = res : 9.346E-12 == solution 149 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 8.25615246470455E-01 -5.64233519737644E-01 y2 : -4.14213562373095E-01 9.10179721124455E-01 y3 : 1.71572875253810E-01 9.85171431009416E-01 y4 : -1.71572875253810E-01 -9.85171431009416E-01 y5 : 4.14213562373095E-01 -9.10179721124455E-01 y6 : -8.25615246470455E-01 5.64233519737644E-01 y7 : -1.00000000000000E+00 2.09012467567097E-16 == err : 3.933E-16 = rco : 7.389E-02 = res : 6.661E-16 == solution 150 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.91017969550838E+00 -4.19736821044104E+00 y2 : -4.61158180496094E+00 3.11893845626463E-08 y3 : -4.14213564080134E-01 9.10179725616521E-01 y4 : -1.91017966573165E+00 4.19736821689091E+00 y5 : -9.99999998598445E-01 6.45630963952902E-09 y6 : 4.14213558525407E-01 -9.10179722039748E-01 y7 : 4.61158177933738E+00 -4.76723377090772E-08 == err : 1.146E-07 = rco : 4.187E-12 = res : 1.035E-13 == solution 151 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.58283441121823E-05 2.65392349329630E-05 y2 : 1.49260702812119E-09 7.64415606065804E-10 y3 : 3.00995505001705E-05 -2.09526885544133E-06 y4 : -1.00002853743436E+00 -4.88853688840017E-05 y5 : -1.58304416951337E-05 2.65372592408316E-05 y6 : -1.49270766020720E-09 -7.64414281477726E-10 y7 : 3.00966697716062E-05 -2.09585643567616E-06 == err : 1.000E+00 = rco : 2.082E-27 = res : 8.283E-12 == solution 152 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -2.44812804499131E-06 -5.20711198408800E-06 y2 : 9.43477791812661E-12 4.82324166747325E-12 y3 : 3.06305272621307E-07 6.25078513486122E-07 y4 : -9.99995716350166E-01 9.16412420091530E-06 y5 : -2.44811389814616E-06 -5.20715909976635E-06 y6 : -9.43503767334353E-12 -4.82292859332323E-12 y7 : 3.06286837065558E-07 6.25068369139857E-07 == err : 1.000E+00 = rco : 5.107E-34 = res : 2.296E-12 == solution 153 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -2.94324636093022E+00 2.37389193643995E-66 y2 : 8.66269914112896E+00 -4.45104738082491E-66 y3 : -2.20975009844629E-01 1.29822215274060E-67 y4 : 2.94664573359228E+01 -3.56083790465992E-65 y5 : 2.94324636093022E+00 -1.83605704459027E-66 y6 : 2.93985090992536E-01 -1.57641261404215E-67 y7 : -3.92021665581997E+01 4.15431088876991E-65 == err : 2.367E-14 = rco : 3.253E-06 = res : 1.819E-12 == solution 154 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -2.32007811153141E-01 -1.03343918379223E-02 y2 : -1.41041417460041E+00 -2.68418248616109E-01 y3 : -1.00000000000000E+00 -2.60238361959006E-16 y4 : 1.88105349279147E+00 1.09209122761314E+00 y5 : 1.41041417460041E+00 2.68418248616109E-01 y6 : 2.32007811153141E-01 1.03343918379224E-02 y7 : -1.88105349279147E+00 -1.09209122761314E+00 == err : 1.000E+00 = rco : 7.623E-18 = res : 1.258E-14 == solution 155 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.84855290026939E-06 -7.81699477026627E-07 y2 : 7.12866715702106E-11 1.32459295524315E-11 y3 : 3.50594454919968E-07 -3.10471246909520E-06 y4 : -9.99997004462079E-01 7.77222217818853E-06 y5 : -1.84835046882227E-06 -7.81410169017770E-07 y6 : -7.12922116246112E-11 -1.32422018363115E-11 y7 : 3.50770998873696E-07 -3.10440006677665E-06 == err : 1.000E+00 = rco : 1.684E-32 = res : 2.534E-13 == solution 156 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.00000005487072E+00 2.15447326885861E-07 y2 : 1.71572880990050E-01 -1.26888729200992E-09 y3 : -1.00000002143747E+00 -2.22842943987711E-07 y4 : 1.00000008830398E+00 2.08051709806072E-07 y5 : -1.71572880990050E-01 1.26888729200942E-09 y6 : -1.00000005487072E+00 -2.15447326885861E-07 y7 : -1.00000006686651E+00 1.47912341816398E-08 == err : 2.258E-07 = rco : 4.437E-09 = res : 5.237E-14 == solution 157 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.71572509824153E-01 5.39694538502994E-08 y2 : 1.71572740777681E-01 4.42226161484084E-08 y3 : -1.00000000000000E+00 2.74501965772474E-19 y4 : -1.71572625300917E-01 4.87341884770316E-09 y5 : -1.71572990730574E-01 -4.90960350110466E-08 y6 : 1.71572759777046E-01 -4.90960349876611E-08 y7 : 1.71572625300917E-01 -4.87341884797768E-09 == err : 3.694E-07 = rco : 7.138E-10 = res : 4.535E-14 == solution 158 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.71573223404886E-01 -2.46522375384066E-07 y2 : 1.71573174400106E-01 1.33302964223822E-07 y3 : -1.00000000000000E+00 -5.64881543230993E-19 y4 : -1.71573198902496E-01 -1.89912669804394E-07 y5 : -1.71572850751420E-01 5.66097055833580E-08 y6 : 1.71572899756200E-01 5.66097055768855E-08 y7 : 1.71573198902496E-01 1.89912669804960E-07 == err : 4.266E-07 = rco : 1.365E-09 = res : 1.387E-13 == solution 159 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -1.33347464750160E+02 6.04531798856611E-77 y2 : 3.40153303905261E+00 1.99418779424397E-78 y3 : -1.00115497387755E+01 -6.57833151657585E-78 y4 : 2.94664573359228E+01 2.26699424571229E-77 y5 : -7.51653796791481E-01 -1.64458287914396E-79 y6 : 1.00231128171976E+02 -8.20436012733972E-77 y7 : 1.00115497387755E+01 5.12772507958733E-78 == err : 3.463E-13 = rco : 2.349E-09 = res : 3.004E-08 == solution 160 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 9.99999928163799E-01 -1.55511389782044E-07 y2 : -9.99999944060828E-01 6.50312232363008E-08 y3 : -1.00000000000000E+00 -6.32893080173778E-22 y4 : -5.82842675238147E+00 6.42708273981873E-07 y5 : 1.00000000794851E+00 4.52400832709616E-08 y6 : -9.99999992051485E-01 4.52400832747810E-08 y7 : 5.82842675238147E+00 -6.42708273981872E-07 == err : 7.397E-07 = rco : 1.544E-09 = res : 7.863E-13 == solution 161 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -4.14213904331542E-01 9.10179615386639E-01 y2 : -2.16845373055940E-01 -1.02331368486829E-08 y3 : -9.99999871922785E-01 -3.07850733827909E-07 y4 : -8.98203307291876E-02 1.97368246262163E-01 y5 : 2.16845306213884E-01 3.77983150730837E-08 y6 : 4.14213892352405E-01 -9.10179282171472E-01 y7 : 8.98202814731653E-02 -1.97368299191775E-01 == err : 5.490E-07 = rco : 1.109E-09 = res : 5.040E-14 == solution 162 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -1.00000000000000E+00 1.17781827844563E-16 y2 : -1.00000000000000E+00 7.01850043502626E-17 y3 : -3.33333333333333E-01 9.42809041582063E-01 y4 : 1.00000000000000E+00 -1.91034390660978E-16 y5 : 3.33333333333333E-01 9.42809041582063E-01 y6 : 3.33333333333333E-01 -9.42809041582063E-01 y7 : -3.33333333333334E-01 -9.42809041582063E-01 == err : 8.033E-16 = rco : 3.841E-02 = res : 4.003E-16 == solution 163 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -9.99999941454978E-01 -7.17339505686707E-08 y2 : 1.71572892866818E-01 3.59438766064949E-08 y3 : 9.99999970727489E-01 3.58669752443923E-08 y4 : 1.00000007338362E+00 2.45363240739184E-07 y5 : -1.00000013192865E+00 -1.73629290170514E-07 y6 : -9.99999970727489E-01 -3.58669752443932E-08 y7 : -1.71572892866818E-01 -3.59438766064939E-08 == err : 2.570E-07 = rco : 5.250E-09 = res : 5.152E-14 == solution 164 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -9.82969298923178E-07 9.14090821848838E-08 y2 : -1.00000815222181E+00 5.02772852778725E-07 y3 : 2.37308569539649E-06 -2.20686366434551E-07 y4 : 1.71572887181910E-01 7.08295943955473E-07 y5 : 5.72916217770026E-06 -5.32779838678307E-07 y6 : -1.71574227347647E-01 -3.28319046698213E-07 y7 : 2.37310897183822E-06 -2.20692627108010E-07 == err : 1.000E+00 = rco : 2.086E-18 = res : 2.639E-12 == solution 165 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -4.01164339812590E-08 1.00000009298403E+00 y2 : 2.25487816599710E-08 9.99999935832943E-01 y3 : -1.00000007762697E+00 -2.75111961948228E-08 y4 : -9.99999951190009E-01 9.94354363964158E-09 y5 : 4.96241423041860E-09 -1.00000001345991E+00 y6 : 1.26052379736877E-08 -1.00000001535707E+00 y7 : 1.00000002881698E+00 1.75676522063672E-08 == err : 1.007E-07 = rco : 6.296E-09 = res : 1.795E-14 == solution 166 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 3.91523707491862E+00 1.38649908389418E-01 y2 : 3.74689470613091E-01 -7.49841653548888E-01 y3 : -1.00000000000000E+00 5.29681818559876E-16 y4 : -1.88431224644546E+00 4.25395379786104E+00 y5 : -3.74689470613091E-01 7.49841653548888E-01 y6 : -3.91523707491862E+00 -1.38649908389419E-01 y7 : 1.88431224644546E+00 -4.25395379786104E+00 == err : 1.000E+00 = rco : 6.177E-18 = res : 4.595E-12 == solution 167 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 8.98202779736856E-02 1.97368156819556E-01 y2 : -2.16845388051687E-01 1.11753417570838E-07 y3 : -4.14213906246674E-01 -9.10179960077541E-01 y4 : -8.98203269155185E-02 -1.97368106602301E-01 y5 : -9.99999882707386E-01 3.01350876359227E-07 y6 : 4.14213902087674E-01 9.10179636731580E-01 y7 : 2.16845323859905E-01 -1.39975587567543E-07 == err : 4.190E-07 = rco : 9.569E-10 = res : 1.058E-13 == solution 168 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.71572816377427E-01 -2.05290862826617E-08 y2 : -1.00000007055139E+00 -3.24099654761011E-08 y3 : 9.99999929448609E-01 -3.24099654676917E-08 y4 : -1.71572816377427E-01 2.05290862826579E-08 y5 : -1.00000000000000E+00 3.72888903326418E-21 y6 : -9.99999586291902E-01 1.52062248800324E-07 y7 : 9.99999727394684E-01 -8.72423178565310E-08 == err : 4.407E-07 = rco : 7.575E-09 = res : 1.206E-13 == solution 169 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.00000002157188E+00 2.70286913942451E-08 y2 : -9.99999992502357E-01 -1.75365778737750E-10 y3 : -5.82842718761126E+00 7.87673793564181E-08 y4 : 1.00000000328830E+00 -1.33389799328204E-08 y5 : -9.99999981716417E-01 -1.36897114614247E-08 y6 : 5.82842718761126E+00 -7.87673793564182E-08 y7 : 9.99999992502358E-01 1.75365778737770E-10 == err : 1.028E-07 = rco : 2.756E-10 = res : 5.411E-14 == solution 170 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 5.82842712572233E+00 5.99036419565328E-08 y2 : -9.99999948148394E-01 -1.63210437497011E-08 y3 : 1.00000005185161E+00 -1.63210440630730E-08 y4 : -5.82842712572233E+00 -5.99036419565329E-08 y5 : -1.00000000000000E+00 -2.08467519797527E-25 y6 : -1.00000005201909E+00 6.04320321786939E-09 y7 : 9.99999948315873E-01 2.65988845949048E-08 == err : 8.377E-08 = rco : 4.255E-11 = res : 7.420E-14 == solution 171 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.00000002654470E+00 -2.22171462480297E-08 y2 : 5.82842724582233E+00 6.17335593123722E-08 y3 : -1.00000000577132E+00 3.28089505320242E-08 y4 : 1.00000004731808E+00 -1.16253419694694E-08 y5 : -5.82842724582233E+00 -6.17335593123722E-08 y6 : -1.00000002654470E+00 2.22171462480298E-08 y7 : -1.00000004154676E+00 -2.11836085625548E-08 == err : 1.359E-07 = rco : 5.300E-10 = res : 1.017E-13 == solution 172 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -2.94324636093022E+00 -1.85460307534371E-67 y2 : 7.50786657814093E-02 2.98724873623047E-68 y3 : -1.00115497387755E+01 -3.70920615068742E-67 y4 : -1.00000000000000E+00 -2.59644430548120E-67 y5 : -9.98846358548192E-02 -1.36197413345554E-68 y6 : 1.33193629587330E+01 8.90209476164981E-67 y7 : -3.39760888953907E-01 -2.04006338287808E-67 == err : 2.360E-14 = rco : 9.477E-04 = res : 8.882E-15 == solution 173 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -9.67750870201405E-01 -2.51909216235577E-01 y2 : -4.14213562373095E-01 -9.10179721124455E-01 y3 : 1.71572875253810E-01 9.85171431009416E-01 y4 : -1.71572875253810E-01 -9.85171431009416E-01 y5 : 4.14213562373095E-01 9.10179721124455E-01 y6 : 9.67750870201405E-01 2.51909216235577E-01 y7 : -1.00000000000000E+00 -7.26508968989688E-17 == err : 8.467E-16 = rco : 9.669E-02 = res : 8.083E-16 == solution 174 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -5.58981691215893E-06 -1.59812290439815E-06 y2 : 4.14214507060391E-01 1.83958250438315E-07 y3 : 5.58979949628154E-06 1.59811586505796E-06 y4 : 1.00000587608099E+00 -4.83493922672641E-07 y5 : -9.59059515100886E-07 -2.74195708203606E-07 y6 : -2.41422038312396E+00 2.99546315778228E-07 y7 : 9.59059516305876E-07 2.74192103999897E-07 == err : 1.000E+00 = rco : 3.416E-18 = res : 3.291E-12 == solution 175 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 3.33333333333333E-01 -9.42809041582063E-01 y2 : -1.00000000000000E+00 -2.65507626833608E-17 y3 : -3.33333333333333E-01 -9.42809041582063E-01 y4 : -3.33333333333333E-01 9.42809041582064E-01 y5 : 3.33333333333333E-01 9.42809041582063E-01 y6 : -1.00000000000000E+00 -1.00526048965850E-16 y7 : 1.00000000000000E+00 5.45511502282085E-17 == err : 7.568E-16 = rco : 2.678E-02 = res : 3.862E-16 == solution 176 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.91017969894185E+00 4.19736824366103E+00 y2 : 4.14213568905942E-01 9.10179715901584E-01 y3 : 4.61158180330791E+00 -2.24892749615507E-08 y4 : -1.91017970280067E+00 -4.19736821614891E+00 y5 : -9.99999994916582E-01 3.23275426089742E-09 y6 : -4.61158180934270E+00 -4.62876928735592E-09 y7 : -4.14213564095748E-01 -9.10179719528411E-01 == err : 5.188E-08 = rco : 7.295E-12 = res : 1.257E-13 == solution 177 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.00459411213011E-06 2.20916930552836E-06 y2 : -1.71572563338851E-01 -2.03726529493007E-08 y3 : 2.42531657291915E-06 5.33334346970223E-06 y4 : 1.71571467237328E-01 -2.59951812325034E-08 y5 : 1.00459973778389E-06 2.20914993022699E-06 y6 : -1.00000292228882E+00 -8.79023958211405E-06 y7 : -4.16120081475683E-07 -9.15055289161728E-07 == err : 1.000E+00 = rco : 2.408E-18 = res : 2.069E-12 == solution 178 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -1.00000000000000E+00 8.50476162155127E-17 y2 : 9.67750870201406E-01 -2.51909216235577E-01 y3 : 4.14213562373095E-01 -9.10179721124455E-01 y4 : -1.71572875253810E-01 9.85171431009416E-01 y5 : 1.71572875253810E-01 -9.85171431009416E-01 y6 : -4.14213562373095E-01 9.10179721124455E-01 y7 : -9.67750870201406E-01 2.51909216235577E-01 == err : 8.759E-16 = rco : 8.551E-02 = res : 4.163E-16 == solution 179 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.00000028836112E+00 9.67736304944948E-08 y2 : -1.00000002327759E+00 -8.63237991774555E-08 y3 : -1.71572899991283E-01 8.30186507245548E-09 y4 : 1.00000016745815E+00 3.79369841090989E-08 y5 : -9.99999879097029E-01 -1.34710614603594E-07 y6 : 1.71572899991283E-01 -8.30186507245709E-09 y7 : 1.00000002327759E+00 8.63237991774571E-08 == err : 3.036E-07 = rco : 2.024E-09 = res : 4.000E-14 == solution 180 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 2.45228461426028E-06 1.23125469401083E-06 y2 : 4.14213200309270E-01 -3.18957542800219E-07 y3 : -2.45228684234206E-06 -1.23125341418066E-06 y4 : 9.99997903999839E-01 -5.85625248631750E-07 y5 : -2.45228410418756E-06 -1.23125087891160E-06 y6 : -2.41421110431002E+00 9.04575263509536E-07 y7 : 2.45228724743145E-06 1.23125712700386E-06 == err : 1.000E+00 = rco : 9.657E-18 = res : 1.694E-12 == solution 181 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -5.82842710572874E+00 -1.19989543617897E-07 y2 : 5.82842713731935E+00 -1.11066221805966E-09 y3 : -1.00000000000000E+00 3.69984255681505E-24 y4 : -5.82842712152404E+00 -5.94394419969853E-08 y5 : -5.82842714054150E+00 6.05501052895701E-08 y6 : 5.82842710895088E+00 6.05501005463866E-08 y7 : 5.82842712152404E+00 5.94394419969853E-08 == err : 9.537E-08 = rco : 3.604E-13 = res : 2.872E-12 == solution 182 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 8.77777742879653E-02 -1.97050008806594E-01 y2 : 3.21234329638807E-01 -8.05964454574994E-01 y3 : 1.86161372578005E-01 -9.27750044678819E-03 y4 : -8.77777742879654E-02 1.97050008806594E-01 y5 : -1.00000000000000E+00 -2.86378545612603E-16 y6 : -1.86161372578005E-01 9.27750044678818E-03 y7 : -3.21234329638807E-01 8.05964454574995E-01 == err : 1.000E+00 = rco : 9.910E-20 = res : 8.163E-16 == solution 183 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -2.55087942273649E-02 -7.54488329112329E-55 y2 : 7.50786657814093E-02 -1.50082002763966E-53 y3 : -2.20975009844629E-01 -4.95923139567888E-53 y4 : 5.63680605551656E-03 -2.03915764624954E-54 y5 : -7.51653796791481E-01 6.78631664671847E-53 y6 : -7.50786657814093E-02 -1.95759134039956E-54 y7 : -7.49920519204174E-03 1.30506089359970E-54 == err : 1.399E-16 = rco : 4.868E-07 = res : 2.429E-17 == solution 184 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.71572606620674E-01 -9.34908439701726E-08 y2 : 1.71573021787661E-01 -9.62758528597049E-08 y3 : -1.71572728719958E-01 -9.62758528399269E-08 y4 : -1.71572606620674E-01 9.34908439702756E-08 y5 : -1.00000000000000E+00 -1.03495079478766E-19 y6 : 1.71572460086822E-01 2.78500888292756E-09 y7 : -1.71572753154525E-01 1.89766696816705E-07 == err : 4.152E-07 = rco : 7.324E-10 = res : 1.136E-13 == solution 185 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 2.65266805276803E-07 -6.37246635357399E-07 y2 : -2.41421561251141E+00 8.70687727175353E-06 y3 : -2.65269183156533E-07 6.37245915286378E-07 y4 : 1.00000159496523E+00 -6.85483093677816E-06 y5 : 1.54609875799272E-06 -3.71413952713584E-06 y6 : 4.14214017539158E-01 -1.85205338835447E-06 y7 : -1.54608935851020E-06 3.71414730058596E-06 == err : 1.000E+00 = rco : 1.454E-18 = res : 2.921E-12 == solution 186 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.00000000388948E+00 5.22874799211469E-08 y2 : 5.82842729524476E+00 2.67234666268361E-08 y3 : -9.99999974636551E-01 -4.77024578586090E-08 y4 : 1.00000003314241E+00 5.68725019602314E-08 y5 : -5.82842729524476E+00 -2.67234666268359E-08 y6 : -1.00000000388948E+00 -5.22874799211469E-08 y7 : -1.00000005850586E+00 -9.17004410162256E-09 == err : 1.676E-07 = rco : 6.057E-10 = res : 2.158E-13 == solution 187 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.00000021826356E+00 3.10246646269800E-08 y2 : 3.62897290882730E-08 1.00000017576862E+00 y3 : -6.73143935832211E-08 1.00000004249494E+00 y4 : -1.00000008214325E+00 -8.89608273206654E-08 y5 : -1.00000013612031E+00 5.79361627639883E-08 y6 : 1.25250556380072E-07 -9.99999906374625E-01 y7 : -9.42258919549929E-08 -1.00000031188893E+00 == err : 3.270E-07 = rco : 1.144E-08 = res : 1.285E-13 == solution 188 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -4.14213327933195E-01 9.10179645886567E-01 y2 : -2.16845294556668E-01 -7.53668769454228E-08 y3 : -1.00000002293700E+00 5.29778406756960E-07 y4 : -8.98202120049708E-02 1.97368169719530E-01 y5 : 2.16845379306073E-01 -2.34853894887562E-09 y6 : 4.14213163619572E-01 -9.10180150061437E-01 y7 : 8.98203145061881E-02 -1.97368117607651E-01 == err : 5.858E-07 = rco : 2.239E-09 = res : 9.739E-14 == solution 189 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 3.24351829423635E-01 1.77981587555675E-01 y2 : -4.50544764534876E-01 8.87824256458187E-01 y3 : 2.67739561694533E-01 4.59881500933651E-01 y4 : -3.24351829423635E-01 -1.77981587555675E-01 y5 : -1.00000000000000E+00 2.73196096944695E-18 y6 : -2.67739561694533E-01 -4.59881500933651E-01 y7 : 4.50544764534876E-01 -8.87824256458187E-01 == err : 2.116E-06 = rco : 1.039E-13 = res : 8.640E-12 == solution 190 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.86093140739950E+00 8.19337302653682E-02 y2 : -3.65505164870130E-01 -2.60322629050160E-01 y3 : -1.00000000000000E+00 1.81308346113130E-16 y4 : -6.09033626259711E-02 3.52003567094899E-01 y5 : 3.65505164870130E-01 2.60322629050160E-01 y6 : 1.86093140739950E+00 -8.19337302653684E-02 y7 : 6.09033626259711E-02 -3.52003567094899E-01 == err : 1.000E+00 = rco : 2.327E-17 = res : 3.390E-15 == solution 191 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : 1.00000000000000E+00 -1.05852715456264E-16 y2 : -1.00000000000000E+00 1.92802343828455E-16 y3 : 3.33333333333333E-01 -9.42809041582063E-01 y4 : -3.33333333333334E-01 -9.42809041582063E-01 y5 : -3.33333333333333E-01 9.42809041582063E-01 y6 : -1.00000000000000E+00 -1.42366844837928E-16 y7 : 3.33333333333334E-01 9.42809041582063E-01 == err : 1.030E-15 = rco : 2.731E-02 = res : 4.965E-16 == solution 192 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -9.99999957544164E-01 2.82747863041294E-09 y2 : 5.82842664911730E+00 3.19361656034430E-07 y3 : 9.99999978772082E-01 -1.41373931588425E-09 y4 : 9.99999897167065E-01 5.33800582538427E-08 y5 : -9.99999939622901E-01 -5.62075368842556E-08 y6 : -9.99999978772082E-01 1.41373931588379E-09 y7 : -5.82842664911730E+00 -3.19361656034429E-07 == err : 5.706E-07 = rco : 1.112E-09 = res : 2.328E-13 == solution 193 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 9.57209933730845E-02 4.96403260149788E-03 y2 : 1.69238985518965E-01 4.94185431929356E-01 y3 : -1.00000000000000E+00 5.38267038547587E-17 y4 : -6.33788310719455E-02 -1.74547345950854E-01 y5 : -1.69238985518965E-01 -4.94185431929356E-01 y6 : -9.57209933730845E-02 -4.96403260149787E-03 y7 : 6.33788310719455E-02 1.74547345950853E-01 == err : 2.218E-07 = rco : 3.490E-17 = res : 3.113E-14 == solution 194 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 2.57618345236366E+00 -6.65455514513801E-01 y2 : 1.24314443678908E+00 1.23765031716883E+00 y3 : -6.14500798599553E-01 2.34852085477671E+00 y4 : -2.57618345236366E+00 6.65455514513801E-01 y5 : -1.00000000000000E+00 2.60211222552105E-17 y6 : 6.14500798599552E-01 -2.34852085477671E+00 y7 : -1.24314443678908E+00 -1.23765031716883E+00 == err : 1.000E+00 = rco : 1.174E-17 = res : 3.749E-13 == solution 195 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.00000011011386E+00 1.71172526276879E-07 y2 : -1.00000029057463E+00 -2.32222209059930E-07 y3 : -1.00000000000000E+00 -3.13665018193904E-21 y4 : -1.71572909627448E-01 -3.46057972995506E-08 y5 : 1.00000009023038E+00 3.05248413992914E-08 y6 : -9.99999909769617E-01 3.05248413837600E-08 y7 : 1.71572909627448E-01 3.46057972995536E-08 == err : 3.720E-07 = rco : 1.089E-08 = res : 7.141E-14 == solution 196 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 8.98202891441818E-02 -1.97368223098548E-01 y2 : 4.14213202200497E-01 -9.10179445409275E-01 y3 : 2.16845256940040E-01 -3.91272214367515E-08 y4 : -8.98202791699390E-02 1.97368218550746E-01 y5 : -9.99999961858604E-01 3.31784504388804E-08 y6 : -2.16845257701022E-01 2.81915490993162E-08 y7 : -4.14213249555154E-01 9.10179427714299E-01 == err : 4.520E-07 = rco : 2.916E-11 = res : 7.056E-14 == solution 197 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -1.08352308930853E-06 -1.86601300566640E-07 y2 : -1.00000911501569E+00 -1.75195001155476E-06 y3 : 2.61584603115475E-06 4.50492031476005E-07 y4 : -1.00000520150926E+00 -6.66879444578144E-07 y5 : 6.31522636063552E-06 1.08759001137020E-06 y6 : 1.00000385311836E+00 6.16853222617596E-07 y7 : 2.61585729240943E-06 4.50495491235742E-07 == err : 1.000E+00 = rco : 1.503E-17 = res : 3.028E-12 == solution 198 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : y1 : -1.00000000000000E+00 -1.49637433247348E-16 y2 : 3.33333333333333E-01 9.42809041582064E-01 y3 : -3.33333333333333E-01 9.42809041582063E-01 y4 : -3.33333333333333E-01 -9.42809041582063E-01 y5 : -1.00000000000000E+00 -8.43689455804391E-17 y6 : 3.33333333333333E-01 -9.42809041582063E-01 y7 : 1.00000000000000E+00 1.90814267537386E-16 == err : 8.267E-16 = rco : 3.139E-02 = res : 8.134E-16 == solution 199 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 1.84414166117045E-01 8.25980190172158E-01 y2 : -1.32777407424581E-01 1.57473376962104E-01 y3 : -1.00000000000000E+00 -1.84249835347718E-16 y4 : -9.92756925481865E-02 2.61989395791699E-01 y5 : 1.32777407424581E-01 -1.57473376962104E-01 y6 : -1.84414166117045E-01 -8.25980190172158E-01 y7 : 9.92756925481865E-02 -2.61989395791699E-01 == err : 3.773E-06 = rco : 9.585E-14 = res : 1.947E-11 == solution 200 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 9.77925685894593E-01 1.22597699280654E+00 y2 : 1.83604231927681E-01 -2.26667943172938E+00 y3 : 4.16086252423884E-01 -8.49519910279744E-01 y4 : -9.77925685894593E-01 -1.22597699280654E+00 y5 : -1.00000000000000E+00 -2.80197606359292E-17 y6 : -4.16086252423884E-01 8.49519910279744E-01 y7 : -1.83604231927681E-01 2.26667943172938E+00 == err : 1.000E+00 = rco : 8.984E-17 = res : 6.324E-14 == solution 201 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 2.16845340084327E-01 1.54129328872633E-08 y2 : 4.14213636428551E-01 -9.10179726315772E-01 y3 : -9.99999986029534E-01 -5.82454095182815E-09 y4 : -8.98202763762135E-02 1.97368221409901E-01 y5 : -4.14213647469045E-01 9.10179736669839E-01 y6 : -2.16845343119551E-01 -1.66619704838444E-08 y7 : 8.98202764814654E-02 -1.97368224690389E-01 == err : 8.083E-08 = rco : 1.270E-11 = res : 2.858E-15 == solution 202 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : -4.14213713262154E-01 -9.10179360387824E-01 y2 : -2.16845274612008E-01 1.11246620533245E-07 y3 : -1.00000001466674E+00 -2.26264722536399E-07 y4 : -8.98202497639837E-02 -1.97368203089912E-01 y5 : 2.16845311554706E-01 -7.88017085000096E-08 y6 : 4.14213647646104E-01 9.10179577425544E-01 y7 : 8.98202931040798E-02 1.97368179872003E-01 == err : 3.905E-07 = rco : 5.293E-10 = res : 4.775E-14 == solution 203 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 3.86969994167541E-01 1.21885578552738E-01 y2 : 7.21197321009453E-02 4.32851408011192E-01 y3 : -4.46548657289622E-01 4.55504930701867E-01 y4 : -3.86969994167541E-01 -1.21885578552738E-01 y5 : -1.00000000000000E+00 -2.38435291106356E-17 y6 : 4.46548657289622E-01 -4.55504930701867E-01 y7 : -7.21197321009453E-02 -4.32851408011192E-01 == err : 2.591E-06 = rco : 9.434E-14 = res : 1.190E-11 == solution 204 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y1 : 2.16845280599165E-01 1.51522344774410E-07 y2 : 4.14213037267877E-01 9.10179990155521E-01 y3 : -9.99999719747732E-01 -1.09381248628845E-07 y4 : -8.98201668849608E-02 -1.97368182347161E-01 y5 : -4.14213338080732E-01 -9.10179986006112E-01 y6 : -2.16845306799298E-01 -9.17787438515838E-08 y7 : 8.98202136456808E-02 1.97368227835400E-01 == err : 5.901E-07 = rco : 5.501E-10 = res : 7.639E-14 == SHAR_EOF fi # end of overwriting check if test -f 'redeco5' then echo shar: will not over-write existing file "'redeco5'" else cat << "SHAR_EOF" > 'redeco5' 5 x1 + x1*x2 + x2*x3 + x3*x4 - u5; x2 + x1*x3 + x2*x4 - 2*u5; x3 + x1*x4 - 3*u5; x4 - 4*u5; x1 + x2 + x3 + x4 + 1; TITLE : reduced 5-dimensional economics problem ROOT COUNTS : total degree : 8 2-homogeneous Bezout number : 12 with partition : {x1 x2 x3 }{x4 u5 } generalized Bezout number : 8 based on the set structure : {x1 x3 u5 }{x2 x4 } {x1 x2 u5 }{x3 x4 } {x1 x3 u5 }{x4 } {x4 u5 } {x1 x2 x3 x4 } mixed volume : 8 REFERENCE : This is the reduced economics problem (u5 = 1/x5). Alexander Morgan: `Solving polynomial systems using continuation for engineering and scientific problems', Prentice-Hall, Englewood Cliffs, New Jersey, 1987. (p 148). THE SOLUTIONS : 8 5 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.97399802625560E-01 2.18519562237977E+00 x2 : -2.46488856119036E+00 1.64476478851049E+00 x3 : -1.04157021643729E+00 -3.46184909267653E+00 x4 : 1.60905897500210E+00 -3.68111318213733E-01 u5 : 4.02264743750524E-01 -9.20278295534333E-02 == err : 6.004E-15 = rco : 3.043E-02 = res : 1.110E-15 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.47399802625560E-01 -2.18519562237977E+00 x2 : -1.67791479309413E+00 6.38326735148376E-01 x3 : 2.34742504765713E-01 1.41176117876408E+00 x4 : 5.90572090953981E-01 1.35107708467322E-01 u5 : 1.47643022738495E-01 3.37769271168304E-02 == err : 4.822E-15 = rco : 1.027E-01 = res : 9.930E-16 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.00000000000000E+00 1.04404871487976E-53 x2 : 1.00000000000000E+00 2.78412990634604E-53 x3 : 1.00000000000000E+00 4.17619485951906E-53 x4 : -4.00000000000000E+00 4.17619485951906E-53 u5 : -1.00000000000000E+00 0.00000000000000E+00 == err : 3.762E-37 = rco : 8.800E-02 = res : 1.218E-52 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 7.94799605251120E-01 -7.46761833343337E-60 x2 : -1.14417041381173E+00 7.15646756954031E-60 x3 : 3.05149904685739E-02 -3.49707676362942E-60 x4 : -6.81144181907962E-01 4.35611069450280E-60 u5 : -1.70286045476991E-01 1.08902767362570E-60 == err : 2.077E-15 = rco : 6.837E-02 = res : 5.551E-17 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.47399802625560E-01 2.18519562237977E+00 x2 : -1.67791479309413E+00 -6.38326735148376E-01 x3 : 2.34742504765713E-01 -1.41176117876408E+00 x4 : 5.90572090953981E-01 -1.35107708467322E-01 u5 : 1.47643022738495E-01 -3.37769271168304E-02 == err : 5.070E-15 = rco : 1.027E-01 = res : 9.486E-16 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.47996052511202E-02 4.34324265389982E-51 x2 : 1.67977712238073E+00 -7.35010295275354E-51 x3 : -1.16685956712542E+00 1.67047794380762E-51 x4 : -1.46811795000419E+00 -6.68191177523049E-52 u5 : -3.67029487501048E-01 -3.34095588761525E-52 == err : 4.160E-15 = rco : 7.638E-02 = res : 1.665E-16 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.97399802625560E-01 -2.18519562237977E+00 x2 : -2.46488856119037E+00 -1.64476478851049E+00 x3 : -1.04157021643729E+00 3.46184909267653E+00 x4 : 1.60905897500210E+00 3.68111318213733E-01 u5 : 4.02264743750524E-01 9.20278295534332E-02 == err : 6.125E-15 = rco : 3.043E-02 = res : 1.986E-15 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.50000000000000E-01 0.00000000000000E+00 x2 : -2.50000000000000E-01 0.00000000000000E+00 x3 : -2.50000000000000E-01 0.00000000000000E+00 x4 : -2.50000000000000E-01 0.00000000000000E+00 u5 : -6.25000000000000E-02 0.00000000000000E+00 == err : 0.000E+00 = rco : 9.055E-02 = res : 0.000E+00 == SHAR_EOF fi # end of overwriting check if test -f 'redeco6' then echo shar: will not over-write existing file "'redeco6'" else cat << "SHAR_EOF" > 'redeco6' 6 x1 + x1*x2 + x2*x3 + x3*x4 + x4*x5 - u6; x2 + x1*x3 + x2*x4 + x3*x5 - 2*u6; x3 + x1*x4 + x2*x5 - 3*u6; x4 + x1*x5 - 4*u6; x5 - 5*u6; x1 + x2 + x3 + x4 + x5 + 1; TITLE : reduced 6-dimensional economics problem. ROOT COUNTS : total degree : 16 2-homogeneous Bezout number : 28 with partition : {x1 x2 x3 x4 }{x5 u6 } generalized Bezout number : 16 based on the set structure : {x1 x3 x5 u6 }{x2 x4 } {x1 x2 x5 u6 }{x3 x4 } {x1 x2 x3 u6 }{x4 x5 } {x1 x4 u6 }{x5 } {x5 u6 } {x1 x2 x3 x4 x5 } mixed volume : 16 REFERENCE : This is the reduced economics problem (u6 = 1/x6). Alexander Morgan: `Solving polynomial systems using continuation for engineering and scientific problems', Prentice-Hall, Englewood Cliffs, New Jersey, 1987, (p 148). THE SOLUTIONS : 16 6 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.00000000000000E+00 0.00000000000000E+00 x2 : 1.00000000000000E+00 -3.26265223399926E-55 x3 : 1.00000000000000E+00 -6.52530446799852E-55 x4 : 1.00000000000000E+00 0.00000000000000E+00 x5 : -5.00000000000000E+00 -1.95759134039956E-55 u6 : -1.00000000000000E+00 -2.03915764624954E-56 == err : 3.306E-39 = rco : 6.489E-02 = res : 2.133E-54 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.49983204654658E-01 -2.09424746927724E+00 x2 : -1.61089899852697E+00 2.31906369483777E-01 x3 : -2.07202455367483E-01 1.40762102476128E+00 x4 : 7.83588286261556E-01 6.17749478619368E-01 x5 : 3.84496372287553E-01 -1.63029403587178E-01 u6 : 7.68992744575105E-02 -3.26058807174356E-02 == err : 4.364E-15 = rco : 3.507E-02 = res : 4.578E-16 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.99966409309316E-01 -3.34095588761525E-52 x2 : 1.38656942719869E+00 -5.84667280332668E-52 x3 : 1.19152225800455E-01 1.08581066347495E-51 x4 : -1.13367501000843E+00 -5.01143383142287E-52 x5 : -8.72080233681396E-01 1.67047794380762E-52 u6 : -1.74416046736279E-01 0.00000000000000E+00 == err : 3.078E-15 = rco : 5.229E-02 = res : 2.220E-16 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.00000000000000E-01 -8.78066024603626E-01 x2 : -1.65499971781608E-01 -2.14978127415289E+00 x3 : -1.62144990845010E+00 1.42121425610120E+00 x4 : -3.27974968334248E-01 9.07431740523421E-01 x5 : 7.14924848565961E-01 6.99201302131896E-01 u6 : 1.42984969713192E-01 1.39840260426379E-01 == err : 4.807E-15 = rco : 4.100E-02 = res : 4.003E-16 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.00000000000000E-01 3.31042891395086E+00 x2 : -5.25946979716094E+00 5.27706843576465E-01 x3 : 5.56851925799103E-01 -5.25646392480149E+00 x4 : 3.30816086148002E+00 4.18343529761887E-01 x5 : -5.54299011818328E-03 9.99984637512272E-01 u6 : -1.10859802363666E-03 1.99996927502454E-01 == err : 3.898E-15 = rco : 1.760E-02 = res : 5.403E-15 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.14998320465466E+00 -2.09424746927724E+00 x2 : -1.77249865678310E+00 -2.90939448721313E+00 x3 : -3.76795822665312E+00 9.94499923819594E-01 x4 : 1.18599548149207E+00 4.94385765452914E+00 x5 : 2.20447819728949E+00 -9.34715621858359E-01 u6 : 4.40895639457899E-01 -1.86943124371672E-01 == err : 6.999E-15 = rco : 2.110E-02 = res : 3.580E-15 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.49983204654658E-01 2.09424746927724E+00 x2 : -1.61089899852697E+00 -2.31906369483777E-01 x3 : -2.07202455367483E-01 -1.40762102476128E+00 x4 : 7.83588286261556E-01 -6.17749478619368E-01 x5 : 3.84496372287553E-01 1.63029403587178E-01 u6 : 7.68992744575105E-02 3.26058807174356E-02 == err : 4.364E-15 = rco : 3.507E-02 = res : 4.578E-16 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.49983204654658E-01 -1.21618144467362E+00 x2 : -1.18910100147303E+00 6.28630424774533E-01 x3 : 4.07202455367483E-01 2.59518299581422E-01 x4 : -5.83588286261556E-01 -1.13892369777438E-01 x5 : -1.84496372287553E-01 4.41925090095103E-01 u6 : -3.68992744575105E-02 8.83850180190205E-02 == err : 2.989E-15 = rco : 3.486E-02 = res : 1.570E-16 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.00000000000000E-01 -3.31042891395086E+00 x2 : -5.25946979716095E+00 -5.27706843576464E-01 x3 : 5.56851925799105E-01 5.25646392480149E+00 x4 : 3.30816086148002E+00 -4.18343529761888E-01 x5 : -5.54299011818387E-03 -9.99984637512272E-01 u6 : -1.10859802363677E-03 -1.99996927502454E-01 == err : 5.822E-15 = rco : 1.760E-02 = res : 5.329E-15 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.14998320465466E+00 2.09424746927724E+00 x2 : -1.77249865678310E+00 2.90939448721313E+00 x3 : -3.76795822665312E+00 -9.94499923819594E-01 x4 : 1.18599548149207E+00 -4.94385765452914E+00 x5 : 2.20447819728949E+00 9.34715621858359E-01 u6 : 4.40895639457899E-01 1.86943124371672E-01 == err : 7.205E-15 = rco : 2.110E-02 = res : 1.897E-15 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.29996640930932E+00 -1.45851920574871E-62 x2 : -1.36629889313586E-01 -3.28166821293459E-62 x3 : -1.58995626049845E+00 -4.86173068582902E-63 x4 : 5.73303223716882E-01 2.30932207576878E-62 x5 : -1.14668348321416E+00 2.63131441422336E-62 u6 : -2.29336696642832E-01 4.86173068582902E-63 == err : 3.968E-15 = rco : 3.472E-02 = res : 2.220E-16 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.50016795345342E-01 -1.21618144467362E+00 x2 : 1.72498656783105E-01 9.93444005801895E-01 x3 : 2.16795822665312E+00 -1.78564329356081E+00 x4 : -2.78599548149208E+00 8.14100532334898E-02 x5 : -8.04478197289493E-01 1.92697067919904E+00 u6 : -1.60895639457899E-01 3.85394135839809E-01 == err : 5.225E-15 = rco : 5.667E-02 = res : 2.318E-15 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.49983204654658E-01 1.21618144467362E+00 x2 : -1.18910100147303E+00 -6.28630424774533E-01 x3 : 4.07202455367483E-01 -2.59518299581422E-01 x4 : -5.83588286261556E-01 1.13892369777438E-01 x5 : -1.84496372287553E-01 -4.41925090095103E-01 u6 : -3.68992744575105E-02 -8.83850180190205E-02 == err : 2.989E-15 = rco : 3.486E-02 = res : 1.570E-16 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.00000000000000E-01 8.78066024603626E-01 x2 : -1.65499971781608E-01 2.14978127415289E+00 x3 : -1.62144990845010E+00 -1.42121425610120E+00 x4 : -3.27974968334248E-01 -9.07431740523421E-01 x5 : 7.14924848565961E-01 -6.99201302131896E-01 u6 : 1.42984969713192E-01 -1.39840260426379E-01 == err : 4.807E-15 = rco : 4.100E-02 = res : 4.003E-16 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.50016795345342E-01 1.21618144467362E+00 x2 : 1.72498656783105E-01 -9.93444005801895E-01 x3 : 2.16795822665312E+00 1.78564329356081E+00 x4 : -2.78599548149208E+00 -8.14100532334896E-02 x5 : -8.04478197289493E-01 -1.92697067919904E+00 u6 : -1.60895639457899E-01 -3.85394135839809E-01 == err : 5.141E-15 = rco : 5.667E-02 = res : 1.790E-15 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.00000000000000E-01 1.08209849026649E-50 x2 : -2.00000000000000E-01 -1.29926062296149E-52 x3 : -2.00000000000000E-01 0.00000000000000E+00 x4 : -2.00000000000000E-01 -3.64659148177856E-51 x5 : -2.00000000000000E-01 -3.47211934098088E-51 u6 : -4.00000000000000E-02 -6.94423868196176E-52 == err : 1.850E-17 = rco : 5.947E-02 = res : 2.776E-17 == SHAR_EOF fi # end of overwriting check if test -f 'redeco7' then echo shar: will not over-write existing file "'redeco7'" else cat << "SHAR_EOF" > 'redeco7' 7 x1 + x1*x2 + x2*x3 + x3*x4 + x4*x5 + x5*x6 - u7; x2 + x1*x3 + x2*x4 + x3*x5 + x4*x6 - 2*u7; x3 + x1*x4 + x2*x5 + x3*x6 - 3*u7; x4 + x1*x5 + x2*x6 - 4*u7; x5 + x1*x6 - 5*u7; x6 - 6*u7; x1 + x2 + x3 + x4 + x5 + x6 + 1; TITLE : reduced 7-dimensional economics problem ROOT COUNTS : total degree : 32 2-homogeneous Bezout number : 64 with partition : {x1 x2 x3 x4 x5 }{x6 u7 } generalized Bezout number : 32 based on the set structure : {x1 x3 x5 u7 }{x2 x4 x6 } {x1 x2 x5 x6 u7 }{x3 x4 } {x1 x2 x3 u7 }{x4 x5 x6 } {x1 x2 x4 u7 }{x5 x6 } {x1 x5 u7 }{x6 } {x6 u7 } {x1 x2 x3 x4 x5 x6 } mixed volume : 32 REFERENCE : This is the reduced economics problem (u7 = 1/x7). Alexander Morgan: `Solving polynomial systems using continuation for engineering and scientific problems', Prentice-Hall, Englewood Cliffs, New Jersey, 1987, (p 148). THE SOLUTIONS : 32 7 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -6.81648480864347E-01 -3.40321148008031E-62 x2 : 9.58129145190158E-01 5.83407682299482E-62 x3 : 6.31940496052593E-01 -3.88938454866321E-62 x4 : -4.34421392403970E-01 4.86173068582902E-62 x5 : -8.87912123263308E-01 -3.88938454866321E-62 x6 : -5.86087644711127E-01 -9.72346137165803E-63 u7 : -9.76812741185211E-02 -3.03858167864314E-63 == err : 6.304E-16 = rco : 2.962E-02 = res : 2.220E-16 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.93369639826469E-03 -1.28636083334685E-01 x2 : 5.95495251474475E-01 -2.08845973813888E+00 x3 : -6.99468204461880E-01 4.29895386284063E-01 x4 : -1.32701859744045E+00 6.35115643463731E-01 x5 : 1.49441734602828E-01 5.41035850350458E-01 x6 : 2.75616119426760E-01 6.11048941375316E-01 u7 : 4.59360199044601E-02 1.01841490229219E-01 == err : 2.366E-15 = rco : 2.512E-02 = res : 2.118E-16 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.93515873660876E-01 1.60919707978251E-54 x2 : 7.22177850183674E-01 -7.83036536159823E-54 x3 : -1.65871370380082E+00 2.61012178719941E-54 x4 : 1.16901800599298E-01 0.00000000000000E+00 x5 : -1.07196055981947E-01 -3.26265223399926E-55 x6 : -7.66685764661078E-01 2.61012178719941E-54 u7 : -1.27780960776846E-01 6.52530446799852E-55 == err : 2.177E-15 = rco : 2.812E-02 = res : 2.220E-16 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.66666666666667E-01 3.98272977783113E-59 x2 : -1.66666666666667E-01 0.00000000000000E+00 x3 : -1.66666666666667E-01 -9.95682444457783E-60 x4 : -1.66666666666667E-01 9.95682444457783E-60 x5 : -1.66666666666667E-01 -4.48057100006002E-59 x6 : -1.66666666666667E-01 0.00000000000000E+00 u7 : -2.77777777777778E-02 -3.38667498114907E-61 == err : 3.132E-16 = rco : 3.765E-02 = res : 2.220E-16 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.93369639826462E-03 3.71479583210633E+00 x2 : -6.29608516467496E+00 -2.89485362873526E-01 x3 : 6.85454641806507E-01 -6.41622249799802E+00 x4 : 4.94031447364827E+00 2.36147158475215E-01 x5 : 2.97245117069881E-01 2.53379026615599E+00 x6 : -6.32862764247967E-01 2.20974604134012E-01 u7 : -1.05477127374661E-01 3.68291006890019E-02 == err : 5.334E-15 = rco : 1.183E-02 = res : 1.067E-14 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.51557210700575E-01 -1.79307987438582E+00 x2 : -5.18994747263476E-01 1.65067431386248E+00 x3 : 2.54014532482806E+00 -1.49593314929199E+00 x4 : -1.73247661935806E+00 -1.65911587822018E+00 x5 : -1.53306651761352E+00 2.14239297415820E+00 x6 : 4.95949770107570E-01 1.15506161387731E+00 u7 : 8.26582950179284E-02 1.92510268979552E-01 == err : 3.738E-15 = rco : 2.485E-02 = res : 9.930E-16 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.97308366771297E-01 -1.92171595772051E+00 x2 : -2.38300160166170E+00 -1.65159813713614E+00 x3 : -1.17635241772214E+00 2.17748014148655E+00 x4 : 5.01732358554671E-01 1.22966143182879E+00 x5 : 1.19054568318791E+00 6.79107470333445E-01 x6 : 4.69767610869959E-01 -5.12934948792143E-01 u7 : 7.82946018116599E-02 -8.54891581320238E-02 == err : 4.453E-15 = rco : 1.532E-02 = res : 8.882E-16 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.93369639826422E-03 -3.71479583210633E+00 x2 : -6.29608516467496E+00 2.89485362873526E-01 x3 : 6.85454641806506E-01 6.41622249799802E+00 x4 : 4.94031447364827E+00 -2.36147158475213E-01 x5 : 2.97245117069882E-01 -2.53379026615599E+00 x6 : -6.32862764247966E-01 -2.20974604134012E-01 u7 : -1.05477127374661E-01 -3.68291006890020E-02 == err : 4.397E-15 = rco : 1.183E-02 = res : 3.878E-15 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.69908729836229E-01 -1.79307987438582E+00 x2 : -1.27629537390668E+00 1.77720268392520E-01 x3 : 2.62145169634245E+00 8.47407879790141E-01 x4 : 2.99663982501566E-01 -4.45879059994048E+00 x5 : -4.31844602385446E+00 2.65619747762992E+00 x6 : 1.10371698908089E+00 2.57054484851373E+00 u7 : 1.83952831513482E-01 4.28424141418954E-01 == err : 4.440E-15 = rco : 2.857E-02 = res : 1.831E-15 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.36024966562036E-01 -1.92171595772051E+00 x2 : -8.16560321165552E-01 -1.72600044478268E+00 x3 : -3.45095823467105E+00 -8.67158668830608E-01 x4 : -5.62843410349119E-01 4.13034050901962E+00 x5 : 2.42330915003328E+00 1.44479097161200E+00 x6 : 9.71027849590407E-01 -1.06025640929782E+00 u7 : 1.61837974931735E-01 -1.76709401549637E-01 == err : 5.610E-15 = rco : 1.976E-02 = res : 2.402E-15 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.24157573765507E-01 -1.92171595772051E+00 x2 : -1.48391565543637E+00 -7.29739304826770E-02 x3 : -5.60052371456210E-01 1.17922334308334E+00 x4 : 5.48670634671490E-01 9.30133142907219E-01 x5 : 7.08367213492226E-01 1.15818184498564E-01 x6 : 2.11087752494370E-01 -2.30484782285939E-01 u7 : 3.51812920823950E-02 -3.84141303809898E-02 == err : 2.990E-15 = rco : 1.721E-02 = res : 8.006E-16 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.25749090709884E+00 1.92171595772051E+00 x2 : -1.00903560786738E+00 3.30462465143614E+00 x3 : -3.99271237385452E+00 1.22680685072913E+00 x4 : -3.03453290093010E+00 -3.65908289972281E+00 x5 : 3.61780513583610E+00 -5.15362410077954E+00 x6 : 2.16098483971706E+00 2.35955954061657E+00 u7 : 3.60164139952843E-01 3.93259923436095E-01 == err : 7.855E-15 = rco : 1.195E-02 = res : 5.403E-15 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.27399636935069E-01 1.28636083334685E-01 x2 : 4.97146350108965E-02 2.19412989932238E+00 x3 : 1.55565100551911E-01 1.21486906126276E+00 x4 : -2.47476413001306E+00 -2.09079838123884E+00 x5 : -1.71288232676718E-01 -8.69709294847598E-02 x6 : 6.13372990191896E-01 -1.35986573319623E+00 u7 : 1.02228831698649E-01 -2.26644288866038E-01 == err : 5.124E-15 = rco : 2.241E-02 = res : 1.057E-15 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.97308366771297E-01 1.92171595772051E+00 x2 : -2.38300160166170E+00 1.65159813713614E+00 x3 : -1.17635241772214E+00 -2.17748014148655E+00 x4 : 5.01732358554671E-01 -1.22966143182879E+00 x5 : 1.19054568318791E+00 -6.79107470333445E-01 x6 : 4.69767610869959E-01 5.12934948792143E-01 u7 : 7.82946018116599E-02 8.54891581320238E-02 == err : 4.453E-15 = rco : 1.532E-02 = res : 8.882E-16 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.25749090709884E+00 -1.92171595772051E+00 x2 : -1.00903560786738E+00 -3.30462465143614E+00 x3 : -3.99271237385452E+00 -1.22680685072913E+00 x4 : -3.03453290093010E+00 3.65908289972281E+00 x5 : 3.61780513583610E+00 5.15362410077954E+00 x6 : 2.16098483971706E+00 -2.35955954061657E+00 u7 : 3.60164139952843E-01 -3.93259923436095E-01 == err : 1.282E-14 = rco : 1.195E-02 = res : 7.324E-15 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.00000000000000E+00 0.00000000000000E+00 x2 : 1.00000000000000E+00 0.00000000000000E+00 x3 : 1.00000000000000E+00 5.93472984109987E-67 x4 : 1.00000000000000E+00 -9.08755506918418E-67 x5 : 1.00000000000000E+00 -5.93472984109987E-67 x6 : -6.00000000000000E+00 -4.74778387287990E-66 u7 : -1.00000000000000E+00 -1.18694596821997E-66 == err : 2.940E-50 = rco : 4.762E-02 = res : 5.657E-66 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.24157573765507E-01 1.92171595772051E+00 x2 : -1.48391565543637E+00 7.29739304826769E-02 x3 : -5.60052371456210E-01 -1.17922334308334E+00 x4 : 5.48670634671490E-01 -9.30133142907219E-01 x5 : 7.08367213492226E-01 -1.15818184498564E-01 x6 : 2.11087752494370E-01 2.30484782285939E-01 u7 : 3.51812920823950E-02 3.84141303809898E-02 == err : 2.809E-15 = rco : 1.721E-02 = res : 4.475E-16 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.63424603497105E-01 -1.79307987438582E+00 x2 : -1.42230137654078E+00 7.27270787149925E-01 x3 : 6.48059125615115E-01 7.41546225335957E-01 x4 : -1.21625875444223E-01 -4.44285120925777E-01 x5 : -5.08590494417704E-01 4.40081292362660E-01 x6 : 1.41034017290485E-01 3.28466690463057E-01 u7 : 2.35056695484141E-02 5.47444484105095E-02 == err : 2.618E-15 = rco : 2.056E-02 = res : 3.554E-16 == solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.63424603497105E-01 1.79307987438582E+00 x2 : -1.42230137654078E+00 -7.27270787149925E-01 x3 : 6.48059125615115E-01 -7.41546225335957E-01 x4 : -1.21625875444223E-01 4.44285120925777E-01 x5 : -5.08590494417704E-01 -4.40081292362661E-01 x6 : 1.41034017290485E-01 -3.28466690463057E-01 u7 : 2.35056695484141E-02 -5.47444484105095E-02 == err : 2.558E-15 = rco : 2.056E-02 = res : 2.483E-16 == solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.27399636935069E-01 3.71479583210633E+00 x2 : -6.84186578113854E+00 2.76209288924990E+00 x3 : -4.12071064151692E+00 -8.69959556204953E+00 x4 : 8.72511873116428E+00 -3.50394294906873E+00 x5 : 1.81846960499532E+00 5.23487937380794E+00 x6 : -1.40841155043922E+00 4.91770415954087E-01 u7 : -2.34735258406536E-01 8.19617359923479E-02 == err : 1.048E-14 = rco : 3.851E-03 = res : 1.421E-14 == solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.54799273870137E-01 2.91703841149741E-62 x2 : -8.54232602712374E-01 -2.91703841149741E-62 x3 : 1.57319825015525E-01 1.97800470374835E-62 x4 : -5.20756185121201E-01 -1.59209508504746E-62 x5 : -6.62201048157115E-02 1.21543267145725E-63 x6 : -3.70910206236376E-01 -1.09388940431153E-62 u7 : -6.18183677060627E-02 -1.79360058965448E-63 == err : 4.779E-16 = rco : 2.506E-02 = res : 1.110E-16 == solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.27399636935069E-01 -1.28636083334685E-01 x2 : 4.97146350108963E-02 -2.19412989932238E+00 x3 : 1.55565100551911E-01 -1.21486906126276E+00 x4 : -2.47476413001305E+00 2.09079838123884E+00 x5 : -1.71288232676718E-01 8.69709294847598E-02 x6 : 6.13372990191896E-01 1.35986573319623E+00 u7 : 1.02228831698649E-01 2.26644288866038E-01 == err : 4.845E-15 = rco : 2.241E-02 = res : 1.116E-15 == solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.51557210700575E-01 1.79307987438582E+00 x2 : -5.18994747263476E-01 -1.65067431386248E+00 x3 : 2.54014532482806E+00 1.49593314929199E+00 x4 : -1.73247661935806E+00 1.65911587822018E+00 x5 : -1.53306651761352E+00 -2.14239297415820E+00 x6 : 4.95949770107570E-01 -1.15506161387731E+00 u7 : 8.26582950179284E-02 -1.92510268979552E-01 == err : 3.232E-15 = rco : 2.485E-02 = res : 1.351E-15 == solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.36024966562036E-01 1.92171595772051E+00 x2 : -8.16560321165552E-01 1.72600044478268E+00 x3 : -3.45095823467105E+00 8.67158668830609E-01 x4 : -5.62843410349120E-01 -4.13034050901962E+00 x5 : 2.42330915003328E+00 -1.44479097161200E+00 x6 : 9.71027849590408E-01 1.06025640929782E+00 u7 : 1.61837974931735E-01 1.76709401549637E-01 == err : 6.794E-15 = rco : 1.976E-02 = res : 3.202E-15 == solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.93369639826470E-03 1.28636083334685E-01 x2 : 5.95495251474475E-01 2.08845973813888E+00 x3 : -6.99468204461880E-01 -4.29895386284063E-01 x4 : -1.32701859744045E+00 -6.35115643463731E-01 x5 : 1.49441734602828E-01 -5.41035850350458E-01 x6 : 2.75616119426760E-01 -6.11048941375316E-01 u7 : 4.59360199044601E-02 -1.01841490229219E-01 == err : 2.370E-15 = rco : 2.512E-02 = res : 2.178E-16 == solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.27399636935069E-01 -3.71479583210633E+00 x2 : -6.84186578113854E+00 -2.76209288924990E+00 x3 : -4.12071064151691E+00 8.69959556204954E+00 x4 : 8.72511873116428E+00 3.50394294906872E+00 x5 : 1.81846960499532E+00 -5.23487937380794E+00 x6 : -1.40841155043922E+00 -4.91770415954087E-01 u7 : -2.34735258406536E-01 -8.19617359923478E-02 == err : 1.532E-14 = rco : 3.851E-03 = res : 2.383E-14 == solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.08489054403391E+00 1.79307987438582E+00 x2 : -1.75656198282473E+00 7.45683258320038E-01 x3 : -2.96247415748368E-01 -2.32634270785216E+00 x4 : 1.04373156113984E+00 8.97470024637929E-01 x5 : -1.38967844523799E+00 -3.78900562083039E-01 x6 : 3.13865738637350E-01 -7.30989887408594E-01 u7 : 5.23109564395583E-02 -1.21831647901432E-01 == err : 4.986E-15 = rco : 1.450E-02 = res : 1.299E-15 == solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.08489054403391E+00 -1.79307987438582E+00 x2 : -1.75656198282473E+00 -7.45683258320039E-01 x3 : -2.96247415748368E-01 2.32634270785216E+00 x4 : 1.04373156113984E+00 -8.97470024637929E-01 x5 : -1.38967844523800E+00 3.78900562083039E-01 x6 : 3.13865738637350E-01 7.30989887408594E-01 u7 : 5.23109564395583E-02 1.21831647901432E-01 == err : 4.894E-15 = rco : 1.450E-02 = res : 1.986E-15 == solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.39817459672457E-01 -2.62619866977784E-63 x2 : -1.52476811214796E-01 -4.70980160189686E-63 x3 : 2.16348572029908E+00 -3.03858167864314E-63 x4 : -9.41947644616723E-01 5.01365976976117E-63 x5 : -9.04563389105642E-01 9.11574503592941E-64 x6 : -1.30431533503437E+00 4.86173068582902E-63 u7 : -2.17385889172396E-01 8.35609961626862E-64 == err : 4.735E-15 = rco : 4.114E-02 = res : 1.943E-16 == solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.51498181419768E+00 2.22552369041245E-67 x2 : 7.41222573661469E-01 5.93472984109987E-67 x3 : -1.07823548534975E+00 7.78933291644359E-67 x4 : -1.63478816493804E+00 0.00000000000000E+00 x5 : 1.16304871296224E+00 -3.70920615068742E-67 x6 : -1.70622945053360E+00 -1.11276184520623E-66 u7 : -2.84371575088934E-01 -1.85460307534371E-67 == err : 5.014E-15 = rco : 2.480E-02 = res : 4.441E-16 == solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.78534059463196E-01 9.11574503592941E-64 x2 : 1.40399529688145E+00 -4.55787251796470E-63 x3 : -4.24145311642535E-01 -1.01602574879630E-63 x4 : 2.30307117019040E+00 -7.29259602874353E-63 x5 : -1.76538489062995E+00 4.25401435010039E-63 x6 : -2.69607032426256E+00 5.92523427335412E-63 u7 : -4.49345054043761E-01 1.06350358752510E-63 == err : 2.862E-15 = rco : 3.735E-02 = res : 7.772E-16 == solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.69908729836229E-01 1.79307987438582E+00 x2 : -1.27629537390668E+00 -1.77720268392520E-01 x3 : 2.62145169634245E+00 -8.47407879790140E-01 x4 : 2.99663982501565E-01 4.45879059994048E+00 x5 : -4.31844602385446E+00 -2.65619747762992E+00 x6 : 1.10371698908089E+00 -2.57054484851373E+00 u7 : 1.83952831513482E-01 -4.28424141418954E-01 == err : 5.346E-15 = rco : 2.857E-02 = res : 2.220E-15 == SHAR_EOF fi # end of overwriting check if test -f 'redeco8' then echo shar: will not over-write existing file "'redeco8'" else cat << "SHAR_EOF" > 'redeco8' 8 x1 + x1*x2 + x2*x3 + x3*x4 + x4*x5 + x5*x6 + x6*x7 - 1*u8; x2 + x1*x3 + x2*x4 + x3*x5 + x4*x6 + x5*x7 - 2*u8; x3 + x1*x4 + x2*x5 + x3*x6 + x4*x7 - 3*u8; x4 + x1*x5 + x2*x6 + x3*x7 - 4*u8; x5 + x1*x6 + x2*x7 - 5*u8; x6 + x1*x7 - 6*u8; x7 - 7*u8; x1 + x2 + x3 + x4 + x5 + x6 + x7 + 1; TITLE : reduced 8-dimensional economics problem ROOT COUNTS : total degree : 64 2-homogeneous Bezout number : 144 with partition : {x1 x2 x3 x4 x5 x6 }{x7 u8 } generalized Bezout number : 64 based on the set structure : {x1 x3 x5 x7 u8 }{x2 x4 x6 } {x1 x2 x5 x6 u8 }{x3 x4 x7 } {x1 x2 x3 x7 u8 }{x4 x5 x6 } {x1 x2 x3 x4 u8 }{x5 x6 x7 } {x1 x2 x5 u8 }{x6 x7 } {x1 x6 u8 }{x7 } {x7 u8 } {x1 x2 x3 x4 x5 x6 x7 } mixed volume : 64 REFERENCE : This is the reduced economics problem (u8 = 1/x8). Alexander Morgan: `Solving polynomial systems using continuation for engineering and scientific problems', Prentice-Hall, Englewood Cliffs, New Jersey, 1987, (p 148). THE SOLUTIONS : 64 8 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.10232923483154E+00 2.78729129753649E-01 x2 : 2.22603244673394E-01 -1.42213055621695E+00 x3 : 6.18291929397411E-01 -2.62969032904711E+00 x4 : -3.00295846715410E-01 3.61318816677034E-01 x5 : -3.44882007007395E+00 1.96100801887167E+00 x6 : 4.90913313990975E-01 -5.87564109032905E-01 x7 : 3.14978193896038E-01 2.03832902899461E+00 u8 : 4.49968848422911E-02 2.91189861284945E-01 == err : 4.433E-15 = rco : 1.581E-02 = res : 1.404E-15 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.59938925712429E+00 -9.49556774575980E-66 x2 : 1.29935154253298E+00 8.54601097118382E-65 x3 : -1.63719724641073E-01 -7.59645419660784E-65 x4 : -1.72340091727033E+00 9.06436552777519E-65 x5 : -1.40859034083628E+00 -1.70920219423676E-64 x6 : 1.73652942442072E+00 1.75668003296556E-64 x7 : -2.33955924133030E+00 -5.22256226016789E-65 u8 : -3.34222748761472E-01 -8.30862177753982E-66 == err : 4.024E-15 = rco : 2.462E-02 = res : 8.882E-16 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.42551771419289E-01 1.74673471603347E+00 x2 : -1.34084054571022E+00 2.76051468441591E-01 x3 : -7.68678942106032E-01 -9.02740445142473E-01 x4 : 2.20595282770167E-01 -1.02073155184390E+00 x5 : 7.02375877262567E-01 -4.36162532263085E-01 x6 : 5.26176045404461E-01 1.12197055754395E-01 x7 : 1.02924053798346E-01 2.24651289020004E-01 u8 : 1.47034362569065E-02 3.20930412885720E-02 == err : 2.370E-15 = rco : 1.139E-02 = res : 3.886E-16 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.02634606269397E-01 -2.02546384578712E+00 x2 : -1.83542167444223E+00 -9.45397563054456E-01 x3 : 6.75509155081996E-01 2.15925850374478E+00 x4 : 3.83025063947650E+00 -2.45922649501807E+00 x5 : -3.63602971348938E+00 -4.83285613744496E+00 x6 : -3.81540389155297E+00 6.13981213018346E+00 x7 : 2.97846087865670E+00 1.96387340737636E+00 u8 : 4.25494411236671E-01 2.80553343910909E-01 == err : 9.967E-15 = rco : 1.225E-02 = res : 6.866E-15 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.05269212538794E-01 -5.62420859578400E-58 x2 : -5.29386459651293E-01 -1.75240110224570E-57 x3 : 1.15852681899207E+00 2.70825624892517E-57 x4 : 2.02601496566939E+00 2.23032867558543E-57 x5 : -1.98415557208050E+00 -3.18618382226491E-58 x6 : -4.57979256055826E-01 -1.75240110224570E-57 x7 : -1.81828970941264E+00 2.38963786669868E-58 u8 : -2.59755672773234E-01 3.98272977783113E-59 == err : 4.352E-15 = rco : 2.181E-02 = res : 1.665E-15 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -5.44881006250833E-01 2.02546384578712E+00 x2 : -9.69913074191903E-01 -1.78394659173895E+00 x3 : 2.39780453489541E+00 5.10525969081904E-01 x4 : -4.74509572712672E-01 2.52319895744740E+00 x5 : -2.15522917066727E+00 -7.48198344852690E-01 x6 : 4.65723570859319E-02 -2.06539009186894E+00 x7 : 7.00155931841337E-01 -4.61653743855839E-01 u8 : 1.00022275977334E-01 -6.59505348365484E-02 == err : 3.259E-15 = rco : 1.310E-02 = res : 1.256E-15 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.29969462856215E+00 -1.74673471603347E+00 x2 : -4.20773748026272E-01 -3.31929373917350E+00 x3 : -3.38353768926908E+00 -2.53211410631423E+00 x4 : -4.61693651227582E+00 1.30640300980813E+00 x5 : -1.24447235082902E+00 5.39838614687383E+00 x6 : 5.68044722330437E+00 4.57244839996384E+00 x7 : 1.68557844853368E+00 -3.67909499512461E+00 u8 : 2.40796921219097E-01 -5.25584999303515E-01 == err : 8.113E-15 = rco : 8.102E-03 = res : 1.648E-14 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.25936822302032E-01 2.62768441224252E+00 x2 : -2.47671390992181E+00 1.73547878282746E+00 x3 : -2.39559793877656E+00 7.76678777389887E-01 x4 : -4.81852275273735E+00 -3.11114097537514E+00 x5 : 4.35149002787906E+00 -6.34471360742584E+00 x6 : 4.51728801087618E+00 2.52616678400144E+00 x7 : -8.03880259621558E-01 1.78984582633967E+00 u8 : -1.14840037088794E-01 2.55692260905667E-01 == err : 9.115E-15 = rco : 7.030E-03 = res : 7.589E-15 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.31206034840825E-01 -8.65785019824411E-01 x2 : -7.80875281985147E-01 -2.20760439208593E+00 x3 : -1.22835309328094E+00 9.21433110771691E-01 x4 : -8.06469247698946E-01 8.07711688026660E-01 x5 : 6.64340626635413E-01 1.15785993336426E+00 x6 : 4.31688773993016E-01 3.31850703822340E-01 x7 : 4.88462187495779E-01 -1.45466024074603E-01 u8 : 6.97803124993970E-02 -2.07808605820862E-02 == err : 4.851E-15 = rco : 1.240E-02 = res : 7.109E-16 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 7.28266057133575E-01 -1.14451414957806E+00 x2 : -4.56136934235313E-01 -1.11155865313099E+00 x3 : -1.30034690799614E+00 1.53824981660552E+00 x4 : 8.57247746941892E-01 8.17101815054366E-02 x5 : -2.62049660027996E-01 -1.00268202683989E-01 x6 : -6.45434621422677E-01 1.63609090637662E-01 x7 : 7.84543196066627E-02 5.72771916644424E-01 u8 : 1.12077599438090E-02 8.18245595206320E-02 == err : 4.304E-15 = rco : 1.681E-02 = res : 4.965E-16 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.26242193739885E-01 8.80949696209057E-01 x2 : 6.84766851039934E-01 -6.70954697940247E-01 x3 : 1.13659996275851E+00 1.57144488632821E+00 x4 : -7.84742698629243E-01 -1.09325148997073E+00 x5 : 3.30907349288984E+00 1.25190184527914E+00 x6 : -3.43647190317998E+00 6.13586232733105E-01 x7 : -2.23546789861895E+00 -2.55367647263853E+00 u8 : -3.19352556945564E-01 -3.64810924662647E-01 == err : 3.664E-15 = rco : 3.115E-02 = res : 1.332E-15 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.25631450864178E-01 8.80949696209057E-01 x2 : 5.80275202596967E-01 -1.42922913965630E-01 x3 : -1.39143724803459E-02 9.04963714845271E-01 x4 : -2.34592954474775E+00 -1.23892478112758E+00 x5 : 1.30179835264017E+00 -2.67220218142479E-01 x6 : -7.00716863028764E-01 7.16651272314106E-01 x7 : -7.47144225844456E-01 -8.53496770132749E-01 u8 : -1.06734889406351E-01 -1.21928110018964E-01 == err : 4.787E-15 = rco : 1.768E-02 = res : 8.083E-16 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.28876800009282E-01 -1.14451414957806E+00 x2 : -2.33346589062116E-01 -4.25549167247156E-01 x3 : 3.41257698386961E-01 1.44992200607483E+00 x4 : 2.33092590705609E+00 -2.58954405931279E+00 x5 : -2.01199797300258E+00 -5.20777980807649E-01 x6 : -1.79045246708362E+00 1.51672028949352E+00 x7 : 2.34736623695995E-01 1.71374306137731E+00 u8 : 3.35338033851422E-02 2.44820437339616E-01 == err : 6.468E-15 = rco : 2.466E-02 = res : 2.558E-15 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.28571428571429E-01 2.89124886561153E+00 x2 : -3.91435387900100E+00 2.56622651399662E+00 x3 : -5.45630497792309E+00 -4.28359545348285E+00 x4 : 3.98380022342191E+00 -5.67888983878634E+00 x5 : 4.48936566690324E+00 1.32411507053572E+00 x6 : 4.26163040031264E-01 2.89160483738685E+00 x7 : -9.57241502003759E-01 2.89290004738477E-01 u8 : -1.36748786000537E-01 4.13271435340681E-02 == err : 6.086E-15 = rco : 6.062E-03 = res : 9.566E-15 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.28876800009282E-01 1.14451414957806E+00 x2 : -2.33346589062116E-01 4.25549167247156E-01 x3 : 3.41257698386961E-01 -1.44992200607483E+00 x4 : 2.33092590705609E+00 2.58954405931280E+00 x5 : -2.01199797300258E+00 5.20777980807650E-01 x6 : -1.79045246708362E+00 -1.51672028949352E+00 x7 : 2.34736623695995E-01 -1.71374306137731E+00 u8 : 3.35338033851422E-02 -2.44820437339616E-01 == err : 6.499E-15 = rco : 2.466E-02 = res : 1.601E-15 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.28571428571428E-01 4.65314825802964E+00 x2 : -1.05605882331532E+01 1.40461093479243E+00 x3 : -1.72418225308742E+00 -1.52950278479316E+01 x4 : 1.53737752985507E+01 -7.46802772179367E-01 x5 : 3.04264868472102E-01 1.06492430997778E+01 x6 : -4.66174043546156E+00 3.21929018534662E-01 x7 : -1.60100673892121E-01 -9.87100691023610E-01 u8 : -2.28715248417316E-02 -1.41014384431944E-01 == err : 4.217E-14 = rco : 1.685E-03 = res : 3.623E-14 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.28571428571429E-01 -6.02220566455408E-01 x2 : 8.39713171180437E-02 -1.02911869361847E+00 x3 : -3.70029864242782E-01 -2.29937976125475E+00 x4 : -1.54493207432736E+00 1.74277200821394E+00 x5 : -4.80758765975095E-01 9.13787435124618E-01 x6 : 3.89841694187333E-02 7.38121476848058E-01 x7 : 8.44193789437036E-01 5.36038101142015E-01 u8 : 1.20599112776719E-01 7.65768715917164E-02 == err : 4.254E-15 = rco : 1.976E-02 = res : 4.996E-16 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.25631450864178E-01 -8.80949696209057E-01 x2 : 5.80275202596967E-01 1.42922913965630E-01 x3 : -1.39143724803459E-02 -9.04963714845271E-01 x4 : -2.34592954474775E+00 1.23892478112758E+00 x5 : 1.30179835264017E+00 2.67220218142479E-01 x6 : -7.00716863028764E-01 -7.16651272314106E-01 x7 : -7.47144225844456E-01 8.53496770132749E-01 u8 : -1.06734889406351E-01 1.21928110018964E-01 == err : 4.835E-15 = rco : 1.768E-02 = res : 1.790E-15 == solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.26242193739885E-01 -8.80949696209057E-01 x2 : 6.84766851039935E-01 6.70954697940247E-01 x3 : 1.13659996275851E+00 -1.57144488632821E+00 x4 : -7.84742698629243E-01 1.09325148997073E+00 x5 : 3.30907349288984E+00 -1.25190184527914E+00 x6 : -3.43647190317998E+00 -6.13586232733104E-01 x7 : -2.23546789861895E+00 2.55367647263853E+00 u8 : -3.19352556945564E-01 3.64810924662647E-01 == err : 3.549E-15 = rco : 3.115E-02 = res : 1.144E-15 == solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.29969462856215E+00 1.74673471603347E+00 x2 : -4.20773748026274E-01 3.31929373917350E+00 x3 : -3.38353768926908E+00 2.53211410631423E+00 x4 : -4.61693651227582E+00 -1.30640300980813E+00 x5 : -1.24447235082902E+00 -5.39838614687383E+00 x6 : 5.68044722330437E+00 -4.57244839996384E+00 x7 : 1.68557844853368E+00 3.67909499512460E+00 u8 : 2.40796921219097E-01 5.25584999303515E-01 == err : 6.897E-15 = rco : 8.102E-03 = res : 6.169E-15 == solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -6.84885937213211E-02 -8.80949696209056E-01 x2 : -5.78666659188168E-01 1.01869266523856E+00 x3 : 2.18404212742885E+00 -8.36716792879222E-01 x4 : -5.92211611072873E-01 -5.34720076445635E-01 x5 : -2.42146239570215E-01 4.67906911739125E-01 x6 : -1.12185355590753E+00 1.02455038360827E-01 x7 : -5.80675467968734E-01 6.63331950195402E-01 u8 : -8.29536382812477E-02 9.47617071707717E-02 == err : 5.026E-15 = rco : 2.188E-02 = res : 4.965E-16 == solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.31206034840825E-01 -2.62768441224252E+00 x2 : -3.85844611688014E+00 -6.98250845583435E-01 x3 : -4.40272194011276E-01 2.88988515225427E+00 x4 : 8.61326214993982E-01 9.51587434171055E-01 x5 : 1.32403203819477E+00 7.89090697380827E-01 x6 : 1.09096648052896E+00 -8.39705419198962E-01 x7 : -2.08812457667120E-01 -4.64922606781227E-01 u8 : -2.98303510953029E-02 -6.64175152544610E-02 == err : 4.229E-15 = rco : 7.496E-03 = res : 9.930E-16 == solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.78209839580828E-02 -1.74673471603347E+00 x2 : -2.25061288175076E-01 -9.65541438387309E-01 x3 : -2.59969119095552E+00 -1.46033094051729E+00 x4 : -1.84772040826661E+00 2.29707362139904E+00 x5 : 1.45480800105432E+00 2.83093730324484E+00 x6 : 1.86925177577862E+00 -9.05476876953007E-02 x7 : 3.96234094522347E-01 -8.64856142010510E-01 u8 : 5.66048706460496E-02 -1.23550877430073E-01 == err : 7.552E-15 = rco : 1.297E-02 = res : 1.986E-15 == solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.31206034840825E-01 2.62768441224252E+00 x2 : -3.85844611688014E+00 6.98250845583434E-01 x3 : -4.40272194011275E-01 -2.88988515225427E+00 x4 : 8.61326214993982E-01 -9.51587434171054E-01 x5 : 1.32403203819477E+00 -7.89090697380827E-01 x6 : 1.09096648052896E+00 8.39705419198962E-01 x7 : -2.08812457667120E-01 4.64922606781227E-01 u8 : -2.98303510953029E-02 6.64175152544610E-02 == err : 4.120E-15 = rco : 7.496E-03 = res : 1.422E-15 == solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.45082508734604E-02 -2.02546384578712E+00 x2 : -1.59654661034104E+00 5.69905321880497E-01 x3 : 5.16862642546052E-01 1.16646799656723E+00 x4 : 4.91237759965541E-01 -4.01056041665407E-01 x5 : -5.75373719029586E-01 -6.19660927472803E-02 x6 : -1.24696364116086E-01 5.97817478504557E-01 x7 : 2.34008040101661E-01 1.54295183247523E-01 u8 : 3.34297200145231E-02 2.20421690353605E-02 == err : 3.726E-15 = rco : 1.100E-02 = res : 1.351E-15 == solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.40202386339369E+00 2.02546384578712E+00 x2 : -1.65436882863949E+00 2.15943883291291E+00 x3 : -2.12851479896278E+00 -2.20031290401576E+00 x4 : 2.05184647153120E+00 -2.08206273515086E+00 x5 : 2.05412340337164E-01 2.41248718888364E+00 x6 : -1.87186842960293E+00 -1.65864305998415E+00 x7 : 9.95469381943151E-01 -6.56371168432886E-01 u8 : 1.42209911706164E-01 -9.37673097761265E-02 == err : 5.628E-15 = rco : 8.538E-03 = res : 2.512E-15 == solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.20465846966309E+00 5.34125685698989E-66 x2 : -4.66632310578776E-01 3.56083790465993E-66 x3 : -8.03456596206656E-01 -1.36498786345297E-65 x4 : 4.34026212153150E-01 5.34125685698989E-66 x5 : -9.72072018441767E-01 -1.78041895232996E-66 x6 : 2.11190028135553E-01 5.04452036493489E-66 x7 : -6.07713784724591E-01 -6.08309808712737E-66 u8 : -8.68162549606558E-02 -8.53117414658107E-67 == err : 3.422E-15 = rco : 1.354E-02 = res : 1.110E-16 == solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 7.28266057133575E-01 -2.90641354199617E+00 x2 : -4.02480045349249E+00 -4.77974857901421E-01 x3 : 1.18159160926567E+00 4.31989607068968E+00 x4 : 2.35266437155773E+00 -2.26130810108664E+00 x5 : -2.31317226244749E+00 -1.20777100078736E-01 x6 : 5.18093612620539E-01 1.60012182512894E+00 x7 : 5.57357065362469E-01 -1.53544294755645E-01 u8 : 7.96224379089241E-02 -2.19348992508065E-02 == err : 5.657E-15 = rco : 7.312E-03 = res : 1.986E-15 == solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.45186377688687E-01 3.77219856182058E+00 x2 : -6.39162737706625E+00 -5.56129503395274E-01 x3 : 1.27333920069005E-02 -6.84707775070627E+00 x4 : 5.80177107600898E+00 -1.00206172064427E+00 x5 : 1.65565900260799E+00 3.62174951858024E+00 x6 : -1.42211604046533E+00 1.26814754910442E+00 x7 : -4.11233675403619E-01 -2.56826654759425E-01 u8 : -5.87476679148026E-02 -3.66895221084893E-02 == err : 5.730E-15 = rco : 7.937E-03 = res : 4.190E-15 == solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.30900663402972E-01 -8.80949696209057E-01 x2 : -9.19755701091595E-01 4.90660881263941E-01 x3 : 3.94673442417123E-01 3.81947804965646E-02 x4 : -5.68975899878565E-01 -5.29931641528690E-02 x5 : 1.58549846241612E-02 2.82028740882827E-01 x6 : -2.58622538431232E-01 -9.86421700170221E-02 x7 : -1.94074951042864E-01 2.21700627735615E-01 u8 : -2.77249930061235E-02 3.16715182479450E-02 == err : 6.031E-16 = rco : 1.322E-02 = res : 1.570E-16 == solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.42551771419289E-01 -1.74673471603347E+00 x2 : -1.34084054571022E+00 -2.76051468441591E-01 x3 : -7.68678942106033E-01 9.02740445142472E-01 x4 : 2.20595282770167E-01 1.02073155184390E+00 x5 : 7.02375877262567E-01 4.36162532263086E-01 x6 : 5.26176045404461E-01 -1.12197055754395E-01 x7 : 1.02924053798346E-01 -2.24651289020004E-01 u8 : 1.47034362569065E-02 -3.20930412885720E-02 == err : 2.550E-15 = rco : 1.139E-02 = res : 7.448E-16 == solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.10232923483154E+00 3.77219856182058E+00 x2 : -6.85329278634063E+00 4.52696695218432E+00 x3 : -9.05474845175677E+00 -8.09165852463591E+00 x4 : 7.45842856856864E+00 -1.19920978913958E+01 x5 : 1.17890209232269E+01 6.01022107632633E+00 x6 : -3.69235087552954E+00 6.86690951437449E+00 x7 : -1.74938661300016E+00 -1.09253968867404E+00 u8 : -2.49912373285737E-01 -1.56077098382006E-01 == err : 3.985E-14 = rco : 1.746E-03 = res : 3.370E-14 == solution 33 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.30900663402972E-01 8.80949696209057E-01 x2 : -9.19755701091595E-01 -4.90660881263941E-01 x3 : 3.94673442417123E-01 -3.81947804965646E-02 x4 : -5.68975899878565E-01 5.29931641528690E-02 x5 : 1.58549846241612E-02 -2.82028740882827E-01 x6 : -2.58622538431232E-01 9.86421700170221E-02 x7 : -1.94074951042864E-01 -2.21700627735615E-01 u8 : -2.77249930061235E-02 -3.16715182479450E-02 == err : 6.031E-16 = rco : 1.322E-02 = res : 1.570E-16 == solution 34 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -7.42246399981436E-01 -7.59645419660784E-65 x2 : 6.02075090022228E-01 -2.30743190993074E-64 x3 : 7.36634869861379E-01 0.00000000000000E+00 x4 : 6.99788754004707E-02 -7.59645419660784E-65 x5 : -5.55383048045472E-01 -5.73712372484625E-66 x6 : -6.83628449696730E-01 2.37389193643995E-65 x7 : -4.27430937560439E-01 8.22262865703340E-65 u8 : -6.10615625086341E-02 1.30564056504197E-65 == err : 4.129E-16 = rco : 1.874E-02 = res : 1.110E-16 == solution 35 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.28571428571429E-01 -4.65314825802964E+00 x2 : -1.05605882331532E+01 -1.40461093479243E+00 x3 : -1.72418225308742E+00 1.52950278479316E+01 x4 : 1.53737752985507E+01 7.46802772179362E-01 x5 : 3.04264868472096E-01 -1.06492430997778E+01 x6 : -4.66174043546156E+00 -3.21929018534659E-01 x7 : -1.60100673892121E-01 9.87100691023611E-01 u8 : -2.28715248417315E-02 1.41014384431944E-01 == err : 4.252E-14 = rco : 1.685E-03 = res : 2.848E-14 == solution 36 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.28571428571429E-01 -1.15967882596271E+00 x2 : -4.07121367244140E-01 2.19073427282266E+00 x3 : 3.00074302117930E+00 8.43795237846108E-01 x4 : -2.57574776919183E+00 -1.75555475906375E+00 x5 : -1.41599518322812E+00 1.72047147691013E+00 x6 : 6.12565476144802E-01 -1.07391432908286E+00 x7 : -6.43015606231446E-01 -7.65853073469583E-01 u8 : -9.18593723187780E-02 -1.09407581924226E-01 == err : 4.551E-15 = rco : 1.926E-02 = res : 2.716E-15 == solution 37 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -5.44881006250832E-01 -2.02546384578712E+00 x2 : -9.69913074191904E-01 1.78394659173895E+00 x3 : 2.39780453489541E+00 -5.10525969081903E-01 x4 : -4.74509572712672E-01 -2.52319895744740E+00 x5 : -2.15522917066727E+00 7.48198344852689E-01 x6 : 4.65723570859318E-02 2.06539009186894E+00 x7 : 7.00155931841337E-01 4.61653743855839E-01 u8 : 1.00022275977334E-01 6.59505348365485E-02 == err : 3.284E-15 = rco : 1.310E-02 = res : 2.220E-15 == solution 38 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.04963841100940E-01 -1.74673471603347E+00 x2 : -2.06845890440780E+00 -2.62980376922778E+00 x3 : -3.00423794013733E+00 7.60055778523488E-01 x4 : 2.57343272529546E-01 3.12382515229319E+00 x5 : 8.24194415747985E-01 6.37834651815019E-01 x6 : 1.64835675125572E+00 8.10488698284777E-01 x7 : 4.37838563910930E-01 -9.55665795655232E-01 u8 : 6.25483662729900E-02 -1.36523685093605E-01 == err : 4.829E-15 = rco : 9.352E-03 = res : 1.986E-15 == solution 39 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.40202386339369E+00 -2.02546384578712E+00 x2 : -1.65436882863949E+00 -2.15943883291291E+00 x3 : -2.12851479896278E+00 2.20031290401576E+00 x4 : 2.05184647153120E+00 2.08206273515086E+00 x5 : 2.05412340337164E-01 -2.41248718888364E+00 x6 : -1.87186842960293E+00 1.65864305998415E+00 x7 : 9.95469381943151E-01 6.56371168432886E-01 u8 : 1.42209911706164E-01 9.37673097761265E-02 == err : 5.353E-15 = rco : 8.538E-03 = res : 1.422E-15 == solution 40 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.00000000000000E+00 0.00000000000000E+00 x2 : 1.00000000000000E+00 6.22301527786114E-61 x3 : 1.00000000000000E+00 6.22301527786114E-61 x4 : 1.00000000000000E+00 0.00000000000000E+00 x5 : 1.00000000000000E+00 3.11150763893057E-61 x6 : 1.00000000000000E+00 1.24460305557223E-60 x7 : -7.00000000000000E+00 7.46761833343337E-60 u8 : -1.00000000000000E+00 1.24460305557223E-60 == err : 1.682E-44 = rco : 3.878E-02 = res : 1.027E-59 == solution 41 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.45082508734604E-02 2.02546384578712E+00 x2 : -1.59654661034104E+00 -5.69905321880497E-01 x3 : 5.16862642546052E-01 -1.16646799656723E+00 x4 : 4.91237759965541E-01 4.01056041665407E-01 x5 : -5.75373719029586E-01 6.19660927472802E-02 x6 : -1.24696364116086E-01 -5.97817478504557E-01 x7 : 2.34008040101661E-01 -1.54295183247523E-01 u8 : 3.34297200145230E-02 -2.20421690353604E-02 == err : 3.708E-15 = rco : 1.100E-02 = res : 4.965E-16 == solution 42 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.28571428571429E-01 -2.89124886561153E+00 x2 : -3.91435387900099E+00 -2.56622651399662E+00 x3 : -5.45630497792309E+00 4.28359545348285E+00 x4 : 3.98380022342191E+00 5.67888983878634E+00 x5 : 4.48936566690324E+00 -1.32411507053572E+00 x6 : 4.26163040031265E-01 -2.89160483738685E+00 x7 : -9.57241502003759E-01 -2.89290004738477E-01 u8 : -1.36748786000537E-01 -4.13271435340682E-02 == err : 5.207E-15 = rco : 6.062E-03 = res : 7.589E-15 == solution 43 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.45186377688686E-01 2.78729129753649E-01 x2 : 6.84268653947781E-01 -1.79772241022417E+00 x3 : 1.50893398799752E-01 -1.70641722701536E-01 x4 : -1.21425244899783E+00 4.90968316930756E-01 x5 : -6.64940564102784E-01 2.11960393271641E-01 x6 : 2.15174448159515E-01 5.07550037830726E-01 x7 : 7.40428898822547E-02 4.79156255138937E-01 u8 : 1.05775556974650E-02 6.84508935912767E-02 == err : 3.429E-15 = rco : 1.750E-02 = res : 3.414E-16 == solution 44 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.28876800009282E-01 -2.90641354199617E+00 x2 : -3.80201010831929E+00 1.26409819593165E+00 x3 : 4.96221479138290E+00 2.69017551530026E+00 x4 : -1.41431539654746E-02 -7.74678341483025E+00 x5 : -6.49225902486156E+00 2.64610297939909E+00 x6 : 2.54969912472744E+00 4.51222733924665E+00 x7 : 1.66762157102670E+00 -4.59407073051232E-01 u8 : 2.38231653003815E-01 -6.56295818644618E-02 == err : 1.053E-14 = rco : 7.991E-03 = res : 1.353E-14 == solution 45 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.28571428571429E-01 6.02220566455408E-01 x2 : 8.39713171180438E-02 1.02911869361847E+00 x3 : -3.70029864242782E-01 2.29937976125475E+00 x4 : -1.54493207432736E+00 -1.74277200821394E+00 x5 : -4.80758765975095E-01 -9.13787435124618E-01 x6 : 3.89841694187332E-02 -7.38121476848058E-01 x7 : 8.44193789437036E-01 -5.36038101142015E-01 u8 : 1.20599112776719E-01 -7.65768715917164E-02 == err : 4.267E-15 = rco : 1.976E-02 = res : 1.404E-15 == solution 46 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.28571428571429E-01 1.15967882596271E+00 x2 : -4.07121367244140E-01 -2.19073427282266E+00 x3 : 3.00074302117930E+00 -8.43795237846108E-01 x4 : -2.57574776919183E+00 1.75555475906375E+00 x5 : -1.41599518322812E+00 -1.72047147691013E+00 x6 : 6.12565476144802E-01 1.07391432908286E+00 x7 : -6.43015606231446E-01 7.65853073469583E-01 u8 : -9.18593723187780E-02 1.09407581924226E-01 == err : 4.624E-15 = rco : 1.926E-02 = res : 2.036E-15 == solution 47 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.78209839580827E-02 1.74673471603347E+00 x2 : -2.25061288175076E-01 9.65541438387309E-01 x3 : -2.59969119095552E+00 1.46033094051729E+00 x4 : -1.84772040826661E+00 -2.29707362139904E+00 x5 : 1.45480800105433E+00 -2.83093730324484E+00 x6 : 1.86925177577862E+00 9.05476876953012E-02 x7 : 3.96234094522347E-01 8.64856142010510E-01 u8 : 5.66048706460496E-02 1.23550877430073E-01 == err : 6.110E-15 = rco : 1.297E-02 = res : 1.570E-15 == solution 48 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 7.28266057133575E-01 2.90641354199617E+00 x2 : -4.02480045349249E+00 4.77974857901420E-01 x3 : 1.18159160926567E+00 -4.31989607068968E+00 x4 : 2.35266437155772E+00 2.26130810108664E+00 x5 : -2.31317226244749E+00 1.20777100078736E-01 x6 : 5.18093612620539E-01 -1.60012182512894E+00 x7 : 5.57357065362469E-01 1.53544294755645E-01 u8 : 7.96224379089241E-02 2.19348992508065E-02 == err : 4.840E-15 = rco : 7.312E-03 = res : 4.832E-15 == solution 49 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.31206034840825E-01 8.65785019824411E-01 x2 : -7.80875281985147E-01 2.20760439208593E+00 x3 : -1.22835309328094E+00 -9.21433110771691E-01 x4 : -8.06469247698946E-01 -8.07711688026660E-01 x5 : 6.64340626635413E-01 -1.15785993336426E+00 x6 : 4.31688773993016E-01 -3.31850703822340E-01 x7 : 4.88462187495779E-01 1.45466024074603E-01 u8 : 6.97803124993970E-02 2.07808605820862E-02 == err : 5.056E-15 = rco : 1.240E-02 = res : 8.083E-16 == solution 50 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.47515612520229E-01 -8.50802870020078E-63 x2 : 1.59955565082714E+00 -5.34790375441192E-62 x3 : -7.14195108063651E-01 4.37555761724612E-62 x4 : 1.32209704041973E+00 -5.83407682299482E-62 x5 : 7.67848816841054E-01 -4.86173068582902E-62 x6 : -1.98227932283785E+00 6.32024989157772E-62 x7 : -1.64551146466620E+00 5.96029807057353E-62 u8 : -2.35073066380886E-01 8.51471152939075E-63 == err : 3.010E-15 = rco : 2.503E-02 = res : 6.661E-16 == solution 51 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.25936822302032E-01 8.65785019824411E-01 x2 : 6.00856924973186E-01 2.54935639473334E+00 x3 : -1.96886687892048E+00 1.06724423008164E+00 x4 : -2.82589112375875E+00 1.04483412963302E+00 x5 : -2.32128192272875E-01 -4.58862776826684E+00 x6 : 9.19624613112194E-01 -1.49860296754324E+00 x7 : 1.88046783456469E+00 5.60010961537670E-01 u8 : 2.68638262080670E-01 8.00015659339528E-02 == err : 3.866E-15 = rco : 1.425E-02 = res : 1.422E-15 == solution 52 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.10232923483154E+00 -2.78729129753649E-01 x2 : 2.22603244673394E-01 1.42213055621695E+00 x3 : 6.18291929397411E-01 2.62969032904711E+00 x4 : -3.00295846715410E-01 -3.61318816677034E-01 x5 : -3.44882007007395E+00 -1.96100801887167E+00 x6 : 4.90913313990975E-01 5.87564109032905E-01 x7 : 3.14978193896038E-01 -2.03832902899461E+00 u8 : 4.49968848422911E-02 -2.91189861284945E-01 == err : 4.469E-15 = rco : 1.581E-02 = res : 1.831E-15 == solution 53 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 7.28266057133575E-01 1.14451414957806E+00 x2 : -4.56136934235313E-01 1.11155865313099E+00 x3 : -1.30034690799614E+00 -1.53824981660552E+00 x4 : 8.57247746941892E-01 -8.17101815054366E-02 x5 : -2.62049660027996E-01 1.00268202683989E-01 x6 : -6.45434621422677E-01 -1.63609090637662E-01 x7 : 7.84543196066627E-02 -5.72771916644424E-01 u8 : 1.12077599438090E-02 -8.18245595206320E-02 == err : 4.300E-15 = rco : 1.681E-02 = res : 4.578E-16 == solution 54 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.04963841100940E-01 1.74673471603347E+00 x2 : -2.06845890440780E+00 2.62980376922778E+00 x3 : -3.00423794013733E+00 -7.60055778523489E-01 x4 : 2.57343272529547E-01 -3.12382515229319E+00 x5 : 8.24194415747984E-01 -6.37834651815019E-01 x6 : 1.64835675125572E+00 -8.10488698284777E-01 x7 : 4.37838563910930E-01 9.55665795655231E-01 u8 : 6.25483662729900E-02 1.36523685093604E-01 == err : 4.319E-15 = rco : 9.352E-03 = res : 1.422E-15 == solution 55 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.51873644604064E-01 0.00000000000000E+00 x2 : 1.09122081140823E+00 1.02389830887948E-57 x3 : -1.11424211179409E+00 -1.14702617601537E-56 x4 : -6.37151941736669E-01 -4.26735858928732E-57 x5 : 2.91145276196003E-01 -3.18618382226490E-57 x6 : -3.32878313838290E-01 7.64684117343577E-57 x7 : -5.49967364839252E-01 9.55855146679471E-57 u8 : -7.85667664056075E-02 1.47361001779752E-57 == err : 5.036E-15 = rco : 1.868E-02 = res : 4.441E-16 == solution 56 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.25936822302032E-01 -8.65785019824411E-01 x2 : 6.00856924973186E-01 -2.54935639473334E+00 x3 : -1.96886687892048E+00 -1.06724423008164E+00 x4 : -2.82589112375875E+00 -1.04483412963302E+00 x5 : -2.32128192272875E-01 4.58862776826684E+00 x6 : 9.19624613112194E-01 1.49860296754324E+00 x7 : 1.88046783456469E+00 -5.60010961537670E-01 u8 : 2.68638262080670E-01 -8.00015659339528E-02 == err : 3.866E-15 = rco : 1.425E-02 = res : 1.422E-15 == solution 57 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.42857142857143E-01 6.37236764452981E-58 x2 : -1.42857142857143E-01 4.46065735117087E-57 x3 : -1.42857142857143E-01 -7.64684117343577E-57 x4 : -1.42857142857143E-01 -1.59309191113245E-58 x5 : -1.42857142857143E-01 -6.07399628701094E-58 x6 : -1.42857142857143E-01 6.37236764452981E-58 x7 : -1.42857142857143E-01 1.11516433779272E-57 u8 : -2.04081632653061E-02 1.59309191113245E-58 == err : 1.683E-16 = rco : 3.636E-02 = res : 5.551E-17 == solution 58 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.10232923483154E+00 -3.77219856182058E+00 x2 : -6.85329278634064E+00 -4.52696695218432E+00 x3 : -9.05474845175676E+00 8.09165852463593E+00 x4 : 7.45842856856866E+00 1.19920978913958E+01 x5 : 1.17890209232269E+01 -6.01022107632635E+00 x6 : -3.69235087552956E+00 -6.86690951437448E+00 x7 : -1.74938661300015E+00 1.09253968867404E+00 u8 : -2.49912373285736E-01 1.56077098382006E-01 == err : 4.490E-14 = rco : 1.746E-03 = res : 3.843E-14 == solution 59 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.45186377688685E-01 -3.77219856182058E+00 x2 : -6.39162737706625E+00 5.56129503395272E-01 x3 : 1.27333920069007E-02 6.84707775070628E+00 x4 : 5.80177107600899E+00 1.00206172064427E+00 x5 : 1.65565900260799E+00 -3.62174951858024E+00 x6 : -1.42211604046533E+00 -1.26814754910442E+00 x7 : -4.11233675403618E-01 2.56826654759426E-01 u8 : -5.87476679148026E-02 3.66895221084894E-02 == err : 1.124E-14 = rco : 7.937E-03 = res : 7.192E-15 == solution 60 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.02634606269397E-01 2.02546384578712E+00 x2 : -1.83542167444223E+00 9.45397563054456E-01 x3 : 6.75509155081997E-01 -2.15925850374478E+00 x4 : 3.83025063947650E+00 2.45922649501808E+00 x5 : -3.63602971348939E+00 4.83285613744497E+00 x6 : -3.81540389155297E+00 -6.13981213018347E+00 x7 : 2.97846087865670E+00 -1.96387340737636E+00 u8 : 4.25494411236672E-01 -2.80553343910909E-01 == err : 1.273E-14 = rco : 1.225E-02 = res : 4.023E-15 == solution 61 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.45186377688686E-01 -2.78729129753649E-01 x2 : 6.84268653947781E-01 1.79772241022417E+00 x3 : 1.50893398799752E-01 1.70641722701536E-01 x4 : -1.21425244899783E+00 -4.90968316930756E-01 x5 : -6.64940564102784E-01 -2.11960393271642E-01 x6 : 2.15174448159515E-01 -5.07550037830726E-01 x7 : 7.40428898822547E-02 -4.79156255138937E-01 u8 : 1.05775556974650E-02 -6.84508935912767E-02 == err : 3.473E-15 = rco : 1.750E-02 = res : 3.511E-16 == solution 62 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.25936822302032E-01 -2.62768441224252E+00 x2 : -2.47671390992181E+00 -1.73547878282746E+00 x3 : -2.39559793877655E+00 -7.76678777389886E-01 x4 : -4.81852275273735E+00 3.11114097537514E+00 x5 : 4.35149002787906E+00 6.34471360742584E+00 x6 : 4.51728801087618E+00 -2.52616678400144E+00 x7 : -8.03880259621558E-01 -1.78984582633967E+00 u8 : -1.14840037088794E-01 -2.55692260905667E-01 == err : 8.496E-15 = rco : 7.030E-03 = res : 1.070E-14 == solution 63 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.28876800009282E-01 2.90641354199617E+00 x2 : -3.80201010831929E+00 -1.26409819593165E+00 x3 : 4.96221479138290E+00 -2.69017551530026E+00 x4 : -1.41431539654805E-02 7.74678341483025E+00 x5 : -6.49225902486156E+00 -2.64610297939909E+00 x6 : 2.54969912472744E+00 -4.51222733924664E+00 x7 : 1.66762157102670E+00 4.59407073051233E-01 u8 : 2.38231653003815E-01 6.56295818644619E-02 == err : 7.782E-15 = rco : 7.991E-03 = res : 1.638E-14 == solution 64 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -6.84885937213211E-02 8.80949696209057E-01 x2 : -5.78666659188168E-01 -1.01869266523856E+00 x3 : 2.18404212742885E+00 8.36716792879222E-01 x4 : -5.92211611072873E-01 5.34720076445635E-01 x5 : -2.42146239570215E-01 -4.67906911739125E-01 x6 : -1.12185355590754E+00 -1.02455038360827E-01 x7 : -5.80675467968734E-01 -6.63331950195402E-01 u8 : -8.29536382812477E-02 -9.47617071707717E-02 == err : 4.976E-15 = rco : 2.188E-02 = res : 2.776E-16 == SHAR_EOF fi # end of overwriting check if test -f 'rediff3' then echo shar: will not over-write existing file "'rediff3'" else cat << "SHAR_EOF" > 'rediff3' 3 - 2*x1 + x2 + 0.835634534*x1*(1-x1); x1 - 2*x2 + x3 + 0.835634534*x2*(1-x2); x2 - 2*x3 + 0.835634534*x3*(1-x3); TITLE : 3-dimensional reaction-diffusion problem ROOT COUNTS : total degree : 8 mixed volume : 7 REFERENCES : Communicated to me by Arieh Iserles, at the conference held in Park City, Utah, July 1995. The general formulation is as follows: alpha > 0, x_0 = x_{n+1} = 0 f_k = x_{k-1} - 2*x_k + x_{k+1} + alpha*x_k*(1-x_k) = 0, k = 1,2,..,n. It stems from a reaction diffusion problem. For general dimension n, there are 2^n solutions, with the number of real solutions increasing when the parameter alpha increases. Though, there is only one real solution with all its components positive. This parameter alpha is here the only real random constant in the system. Note that the mixed volume does not count the trivial zero solution. THE SOLUTIONS : 7 3 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.90452246822526E-03 9.20668856728156E-01 x2 : -6.96695396506914E-01 1.08723496633471E+00 x3 : -1.40329531548205E+00 -9.20668856728156E-01 == err : 2.381E-15 = rco : 2.697E-01 = res : 3.140E-16 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.51954966926035E+00 1.43763339100755E+00 x2 : -1.56688585394284E+00 -1.97704910020807E+00 x3 : -1.51954966926035E+00 1.43763339100755E+00 == err : 6.957E-15 = rco : 2.882E-01 = res : 6.280E-16 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.40329531548205E+00 -9.20668856728156E-01 x2 : -6.96695396506914E-01 1.08723496633471E+00 x3 : 9.90452246822522E-03 9.20668856728156E-01 == err : 2.410E-15 = rco : 3.290E-01 = res : 4.965E-16 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.40329531548205E+00 9.20668856728156E-01 x2 : -6.96695396506914E-01 -1.08723496633471E+00 x3 : 9.90452246822524E-03 -9.20668856728156E-01 == err : 2.366E-15 = rco : 3.290E-01 = res : 3.140E-16 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.52317752493039E-01 9.48037483736659E-62 x2 : 3.46990121858033E-01 1.31266728517383E-61 x3 : 2.52317752493039E-01 9.48037483736659E-62 == err : 1.413E-15 = rco : 6.653E-02 = res : 1.110E-16 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.51954966926035E+00 -1.43763339100755E+00 x2 : -1.56688585394284E+00 1.97704910020807E+00 x3 : -1.51954966926035E+00 -1.43763339100755E+00 == err : 6.957E-15 = rco : 2.882E-01 = res : 6.280E-16 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 9.90452246822521E-03 -9.20668856728156E-01 x2 : -6.96695396506914E-01 -1.08723496633471E+00 x3 : -1.40329531548205E+00 9.20668856728156E-01 == err : 2.390E-15 = rco : 2.697E-01 = res : 3.514E-16 == SHAR_EOF fi # end of overwriting check if test -f 'reimer5' then echo shar: will not over-write existing file "'reimer5'" else cat << "SHAR_EOF" > 'reimer5' 5 -1 + 2*x**2 - 2*y**2 + 2*z**2 - 2*t**2 + 2*u**2; -1 + 2*x**3 - 2*y**3 + 2*z**3 - 2*t**3 + 2*u**3; -1 + 2*x**4 - 2*y**4 + 2*z**4 - 2*t**4 + 2*u**4; -1 + 2*x**5 - 2*y**5 + 2*z**5 - 2*t**5 + 2*u**5; -1 + 2*x**6 - 2*y**6 + 2*z**6 - 2*t**6 + 2*u**6; TITLE : The 5-dimensional system of Reimer. ROOT COUNTS : total degree : 720 mixed volume : 720 REFERENCES : See the PoSSo test suite. For general dimension n, the system looks like -1/2 + \sum_{i=1}^{n}(-1)^(i+1)x_{i}^k = 0, k=2..n+1 GENERATORS OF SYMMETRY GROUP : z y x t u u y z t x x t z y u NOTE : The system has 12 roots with all components positive, but any fine mixed subdivision has only one mixed cell. THE GENERATING SOLUTIONS : 12 5 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : x : -1.25705460701026E-01 4.80449609667978E-01 y : -3.96732207927890E-01 -2.01295133009924E-01 z : 3.39026130046387E-01 4.97108436261838E-01 t : -9.17817062157943E-02 -4.55073462282180E-01 u : 8.75016837867993E-01 1.54169279604962E-02 == err : 5.257E-16 = rco : 2.886E-02 = res : 4.381E-16 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : x : 1.65179856275237E-01 4.01306224781909E-53 y : 3.71809860927029E-01 6.21535250576860E-53 z : 6.00580975840425E-01 6.78631664671847E-53 t : 8.06590703105641E-01 4.86135182865890E-53 u : 9.49130782115133E-01 1.47635013588467E-53 == err : 4.081E-15 = rco : 1.931E-04 = res : 3.400E-16 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : x : 3.28353058900760E-01 3.83293571654000E-01 y : -3.65037597430609E-01 -1.77941422105434E-01 z : 8.83954216708990E-01 7.47522218167706E-19 t : -3.65037597430609E-01 1.77941422105434E-01 u : 3.28353058900760E-01 -3.83293571654000E-01 == err : 4.158E-16 = rco : 1.470E-02 = res : 3.643E-16 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : x : -8.20501169693851E-01 4.81804127164467E-02 y : 1.92649800357694E-02 -8.15105711153907E-01 z : 2.83453963159985E-02 8.39642248705884E-01 t : 6.63305484227383E-01 -6.19401872141988E-01 u : -6.12614994436549E-01 6.70606441286687E-01 == err : 3.890E-16 = rco : 1.109E-01 = res : 7.022E-16 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : x : -2.89250316112716E-01 1.93720295400755E-02 y : 1.25951647109466E-01 -3.11152873990998E-01 z : 9.17357766838520E-01 -3.21236642103152E-03 t : 6.77654385257208E-01 -1.36742906837876E-02 u : -1.51240072064018E-01 2.63861320151929E-01 == err : 4.402E-16 = rco : 6.008E-03 = res : 3.334E-16 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : x : 2.92426652768470E-02 1.98441472348304E-01 y : -1.15079341958084E-01 -9.12609179052688E-02 z : 4.88543274566396E-01 1.87476161310206E-02 t : 7.55781391744456E-01 8.67380109394292E-03 u : 9.36082697242564E-01 2.23886684350489E-03 == err : 5.112E-16 = rco : 1.351E-03 = res : 2.624E-16 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : x : -8.23715781042161E-01 -2.47741481660290E-19 y : 5.91859519233860E-01 -5.00136991500666E-01 z : -5.37294659901288E-01 5.27047166093312E-01 t : 5.91859519233860E-01 5.00136991500666E-01 u : -5.37294659901288E-01 -5.27047166093312E-01 == err : 4.104E-16 = rco : 1.415E-01 = res : 7.706E-16 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : x : 8.75016837867993E-01 -1.54169279604962E-02 y : -9.17817062157942E-02 4.55073462282180E-01 z : 3.39026130046387E-01 -4.97108436261838E-01 t : -3.96732207927890E-01 2.01295133009924E-01 u : -1.25705460701026E-01 -4.80449609667978E-01 == err : 5.296E-16 = rco : 2.849E-02 = res : 6.661E-16 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : x : -1.51240072064018E-01 -2.63861320151929E-01 y : 1.25951647109466E-01 3.11152873990998E-01 z : 9.17357766838520E-01 3.21236642103152E-03 t : 6.77654385257208E-01 1.36742906837876E-02 u : -2.89250316112716E-01 -1.93720295400755E-02 == err : 4.648E-16 = rco : 4.638E-03 = res : 3.268E-16 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : x : -6.12614994436549E-01 -6.70606441286687E-01 y : 6.63305484227383E-01 6.19401872141988E-01 z : 2.83453963159985E-02 -8.39642248705884E-01 t : 1.92649800357694E-02 8.15105711153907E-01 u : -8.20501169693851E-01 -4.81804127164468E-02 == err : 4.093E-16 = rco : 9.277E-02 = res : 1.423E-15 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : x : 2.92426652768470E-02 -1.98441472348305E-01 y : 7.55781391744457E-01 -8.67380109394305E-03 z : 9.36082697242564E-01 -2.23886684350493E-03 t : -1.15079341958084E-01 9.12609179052692E-02 u : 4.88543274566397E-01 -1.87476161310209E-02 == err : 1.018E-15 = rco : 1.359E-03 = res : 3.501E-16 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 12 the solution for t : x : -8.90691982819378E-02 8.72390401374093E-48 y : 3.04390884130488E-01 -2.35203294488113E-48 z : 5.59254489061997E-01 2.56585412168851E-49 t : 7.86835443685312E-01 4.49024471295489E-49 u : 9.43962351030283E-01 1.71056941445901E-49 == err : 2.854E-15 = rco : 5.084E-04 = res : 4.003E-16 == SHAR_EOF fi # end of overwriting check if test -f 'rose' then echo shar: will not over-write existing file "'rose'" else cat << "SHAR_EOF" > 'rose' 3 y**4-20/7*x**2; x**2*z**4+7/10*x*z**4+7/48*z**4-50/27*x**2-35/27*x-49/216; 3/5*x**6*y**2*z+x**5*y**3+3/7*x**5*y**2*z+7/5*x**4*y**3-7/20*x**4*y*z**2- 3/20*x**4*z**3+609/1000*x**3*y**3+63/200*x**3*y**2*z-77/125*x**3*y*z**2- 21/50*x**3*z**3+49/1250*x**2*y**3+147/2000*x**2*y**2*z- 23863/60000*x**2*y*z**2-91/400*x**2*z**3-27391/800000*x*y**3+ 4137/800000*x*y**2*z-1078/9375*x*y*z**2-5887/200000*x*z**3-1029/160000*y**3- 24353/1920000*y*z**2-343/128000*z**3; TITLE : the system Rose, a general economic equilibrium model ROOT COUNTS : total degree : 216 2-homogeneous Bezout number : 144 with partition : {y z }{x } generalized Bezout number : 136 based on the set structure : {y x }{y x }{y }{y } {x }{x }{z }{z }{z }{z } {y z }{y z }{x }{x }{x }{x }{x }{y x }{z } mixed volume : 136 REFERENCES : From the POSSO test suite. This has been presented as a general economic equilibrium model in Shoven :"Applied general equilibrium modelling", IMF Staff Papers, pages 394-419, 1983 and discussed in Rose, M., Gebauer, R., Kredel, H. and Kungl, H.: "Exemplifying the workability of the Buchberger algorithm for computation of general equilibrium by a model published in Shoven (83)". Department of Economics and Applied Mathematics, University of Heidelberg. THE SOLUTIONS : 136 3 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -7.06729292166197E-01 -7.66821788345747E-05 x : -2.95488240005381E-01 -6.41226636040884E-05 z : 3.52833334770102E-04 6.76297443540688E-01 == err : 7.443E-16 = rco : 2.958E-03 = res : 1.995E-18 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -4.86133341810989E-01 -1.51771416337703E-01 x : -1.26184694693208E-01 -8.72990290267602E-02 z : -5.64813987388284E-02 -1.08560597168044E+00 == err : 5.173E-15 = rco : 1.236E-02 = res : 1.963E-17 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 7.06729292166197E-01 7.66821788345747E-05 x : -2.95488240005381E-01 -6.41226636040884E-05 z : -3.52833334770102E-04 -6.76297443540688E-01 == err : 7.443E-16 = rco : 2.958E-03 = res : 1.995E-18 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 4.86133341810989E-01 1.51771416337703E-01 x : -1.26184694693208E-01 -8.72990290267602E-02 z : 5.64813987388284E-02 1.08560597168044E+00 == err : 5.173E-15 = rco : 1.236E-02 = res : 1.963E-17 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.51771416337703E-01 -4.86133341810989E-01 x : -1.26184694693208E-01 -8.72990290267602E-02 z : 1.08560597168044E+00 -5.64813987388284E-02 == err : 5.173E-15 = rco : 1.236E-02 = res : 1.963E-17 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -7.66821788345747E-05 7.06729292166197E-01 x : -2.95488240005381E-01 -6.41226636040884E-05 z : 6.76297443540688E-01 -3.52833334770102E-04 == err : 7.443E-16 = rco : 2.958E-03 = res : 1.995E-18 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.51771416337703E-01 4.86133341810989E-01 x : -1.26184694693208E-01 -8.72990290267602E-02 z : -1.08560597168044E+00 5.64813987388284E-02 == err : 5.173E-15 = rco : 1.236E-02 = res : 1.963E-17 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 7.66821788345747E-05 -7.06729292166197E-01 x : -2.95488240005381E-01 -6.41226636040884E-05 z : -6.76297443540688E-01 3.52833334770102E-04 == err : 7.443E-16 = rco : 2.958E-03 = res : 1.995E-18 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.22808567145380E+00 5.77330518942196E-63 x : -8.92259849602607E-01 -3.11454622060921E-63 z : -1.14448659740606E+00 -1.89911354915196E-63 == err : 3.354E-15 = rco : 1.662E-01 = res : 4.441E-16 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 4.86133341810989E-01 -1.51771416337703E-01 x : -1.26184694693208E-01 8.72990290267602E-02 z : 5.64813987388284E-02 -1.08560597168044E+00 == err : 5.173E-15 = rco : 1.236E-02 = res : 1.963E-17 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.22808567145380E+00 -5.77330518942196E-63 x : -8.92259849602607E-01 -3.11454622060921E-63 z : 1.14448659740606E+00 1.89911354915196E-63 == err : 3.354E-15 = rco : 1.662E-01 = res : 4.441E-16 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -4.86133341810989E-01 1.51771416337703E-01 x : -1.26184694693208E-01 8.72990290267602E-02 z : -5.64813987388284E-02 1.08560597168044E+00 == err : 5.173E-15 = rco : 1.236E-02 = res : 1.963E-17 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.51771416337703E-01 4.86133341810989E-01 x : -1.26184694693208E-01 8.72990290267602E-02 z : 1.08560597168044E+00 5.64813987388284E-02 == err : 5.173E-15 = rco : 1.236E-02 = res : 1.963E-17 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 5.77330518942196E-63 -1.22808567145380E+00 x : -8.92259849602607E-01 -3.11454622060921E-63 z : -1.89911354915196E-63 1.14448659740606E+00 == err : 3.354E-15 = rco : 1.662E-01 = res : 4.441E-16 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.51771416337703E-01 -4.86133341810989E-01 x : -1.26184694693208E-01 8.72990290267602E-02 z : -1.08560597168044E+00 -5.64813987388284E-02 == err : 5.173E-15 = rco : 1.236E-02 = res : 1.963E-17 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -5.77330518942196E-63 1.22808567145380E+00 x : -8.92259849602607E-01 -3.11454622060921E-63 z : 1.89911354915196E-63 -1.14448659740606E+00 == err : 3.354E-15 = rco : 1.662E-01 = res : 4.441E-16 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 9.42202296070487E-01 -4.46355840927017E-01 x : -4.07328973461773E-01 4.97610342529722E-01 z : 1.19445970997145E+00 -6.94263691281937E-03 == err : 3.950E-15 = rco : 2.301E-02 = res : 7.448E-16 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.72439510262998E-62 -2.58944594610507E-01 x : 3.96686774650024E-02 7.90031236447215E-63 z : 3.46398311365318E-62 1.12559270593244E+00 == err : 1.841E-15 = rco : 1.505E-02 = res : 1.258E-16 == solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -9.42202296070487E-01 4.46355840927017E-01 x : -4.07328973461773E-01 4.97610342529722E-01 z : -1.19445970997145E+00 6.94263691281937E-03 == err : 3.950E-15 = rco : 2.301E-02 = res : 7.448E-16 == solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.72439510262998E-62 2.58944594610507E-01 x : 3.96686774650024E-02 7.90031236447215E-63 z : -3.46398311365318E-62 -1.12559270593244E+00 == err : 1.841E-15 = rco : 1.505E-02 = res : 1.258E-16 == solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.58944594610507E-01 1.72439510262998E-62 x : 3.96686774650024E-02 7.90031236447215E-63 z : -1.12559270593244E+00 3.46398311365318E-62 == err : 1.841E-15 = rco : 1.505E-02 = res : 1.258E-16 == solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -4.46355840927017E-01 -9.42202296070487E-01 x : -4.07328973461773E-01 4.97610342529722E-01 z : -6.94263691281937E-03 -1.19445970997145E+00 == err : 3.950E-15 = rco : 2.301E-02 = res : 7.448E-16 == solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -2.58944594610507E-01 -1.72439510262998E-62 x : 3.96686774650024E-02 7.90031236447215E-63 z : 1.12559270593244E+00 -3.46398311365318E-62 == err : 1.841E-15 = rco : 1.505E-02 = res : 1.258E-16 == solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 4.46355840927017E-01 9.42202296070487E-01 x : -4.07328973461773E-01 4.97610342529722E-01 z : 6.94263691281937E-03 1.19445970997145E+00 == err : 3.950E-15 = rco : 2.301E-02 = res : 7.448E-16 == solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -8.45923636933352E-01 -3.04804618725120E-01 x : -3.68383014368426E-01 -3.05082096177652E-01 z : 1.25238045518965E+00 1.24811970223739E-02 == err : 9.758E-16 = rco : 2.321E-02 = res : 1.670E-16 == solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -9.80011313968479E-01 -6.31432852626338E-01 x : -3.32314914696150E-01 -7.32187451134562E-01 z : -6.47433994054858E-04 -1.17957107436855E+00 == err : 3.839E-15 = rco : 1.835E-01 = res : 4.965E-16 == solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.04999918410803E+00 -8.12856254142465E-01 x : -2.61350513386999E-01 -1.00987293014440E+00 z : -1.17315498632898E+00 1.18666524166848E-03 == err : 5.126E-15 = rco : 7.718E-02 = res : 1.490E-15 == solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.33118482458753E-69 -2.75063189951260E+00 x : 4.47609167455865E+00 5.46963016361133E-69 z : -8.47575082054775E-71 1.16625318897471E+00 == err : 3.993E-15 = rco : 3.825E-04 = res : 2.046E-12 == solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -4.46355840927017E-01 9.42202296070488E-01 x : -4.07328973461773E-01 -4.97610342529722E-01 z : -6.94263691281937E-03 1.19445970997145E+00 == err : 3.912E-15 = rco : 2.301E-02 = res : 2.668E-16 == solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.08894557607015E-01 7.93261087457945E-01 x : -3.65261799691737E-01 1.02208342089387E-01 z : 8.74104275763197E-01 -6.68536229940334E-01 == err : 9.267E-16 = rco : 3.572E-03 = res : 9.714E-17 == solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.08894557607015E-01 7.93261087457945E-01 x : -3.65261799691737E-01 -1.02208342089387E-01 z : -8.74104275763198E-01 -6.68536229940335E-01 == err : 1.650E-15 = rco : 3.572E-03 = res : 2.082E-16 == solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.07654909613252E-01 7.93734763976699E-01 x : -3.65865339091242E-01 1.01105145947890E-01 z : -8.68581832844960E-01 6.58476169954703E-01 == err : 1.962E-15 = rco : 3.665E-03 = res : 1.110E-16 == solution 33 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 5.07689440857743E-01 -4.35123654578093E-01 x : -4.04754358167603E-02 2.61381497709776E-01 z : -3.93467323095711E-02 1.15634560043139E+00 == err : 4.526E-15 = rco : 1.903E-02 = res : 7.473E-17 == solution 34 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 7.69160584602382E-01 1.43457878560659E-07 x : -3.50000015734356E-01 -1.30558584592064E-07 z : 4.76965181423346E-09 3.95770241979668E-08 == err : 1.444E-07 = rco : 1.127E-07 = res : 3.200E-14 == solution 35 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 8.45923636933352E-01 -3.04804618725120E-01 x : -3.68383014368426E-01 3.05082096177652E-01 z : -1.25238045518965E+00 1.24811970223738E-02 == err : 9.412E-16 = rco : 2.321E-02 = res : 2.238E-16 == solution 36 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 7.06729292166197E-01 -7.66821788345749E-05 x : -2.95488240005381E-01 6.41226636040886E-05 z : -3.52833334770102E-04 6.76297443540688E-01 == err : 5.077E-16 = rco : 2.958E-03 = res : 1.994E-18 == solution 37 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -4.67733824266134E-51 -2.25550867423398E-01 x : -3.00969873314954E-02 3.00686029885372E-51 z : -7.18305515837278E-51 1.10815809514278E+00 == err : 6.743E-16 = rco : 1.386E-02 = res : 1.128E-17 == solution 38 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.02054611323534E+00 -3.70891710560524E-58 x : 6.16168210366712E-01 7.01956123342737E-58 z : 1.15936720848735E+00 9.95682444457783E-60 == err : 2.943E-15 = rco : 1.094E-01 = res : 7.008E-16 == solution 39 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -9.01273514442533E-01 5.08039258050036E-01 x : 3.27863261064445E-01 -5.41773676244008E-01 z : -8.73614516573314E-03 -1.16439785943386E+00 == err : 3.511E-15 = rco : 1.841E-01 = res : 4.003E-16 == solution 40 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.09499022320081E+00 -7.88580496010564E-57 x : 7.09340089218694E-01 2.46929246225530E-57 z : -1.16055892612283E+00 -3.66411139560464E-57 == err : 4.892E-15 = rco : 3.336E-01 = res : 7.563E-16 == solution 41 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.04999918410803E+00 8.12856254142465E-01 x : -2.61350513386999E-01 -1.00987293014440E+00 z : 1.17315498632898E+00 -1.18666524166848E-03 == err : 5.126E-15 = rco : 7.718E-02 = res : 1.490E-15 == solution 42 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.33118482458753E-69 2.75063189951260E+00 x : 4.47609167455865E+00 5.46963016361133E-69 z : 8.47575082054775E-71 -1.16625318897471E+00 == err : 3.993E-15 = rco : 3.825E-04 = res : 2.046E-12 == solution 43 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 8.45923636933352E-01 3.04804618725120E-01 x : -3.68383014368426E-01 -3.05082096177652E-01 z : -1.25238045518965E+00 -1.24811970223739E-02 == err : 9.758E-16 = rco : 2.321E-02 = res : 1.670E-16 == solution 44 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 9.80011313968479E-01 6.31432852626338E-01 x : -3.32314914696150E-01 -7.32187451134562E-01 z : 6.47433994054858E-04 1.17957107436855E+00 == err : 3.839E-15 = rco : 1.835E-01 = res : 4.965E-16 == solution 45 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.08894557607015E-01 -7.93261087457945E-01 x : -3.65261799691737E-01 -1.02208342089387E-01 z : 8.74104275763198E-01 6.68536229940335E-01 == err : 1.650E-15 = rco : 3.572E-03 = res : 2.082E-16 == solution 46 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.07654909613252E-01 -7.93734763976699E-01 x : -3.65865339091242E-01 1.01105145947890E-01 z : 8.68581832844960E-01 -6.58476169954703E-01 == err : 1.962E-15 = rco : 3.665E-03 = res : 1.110E-16 == solution 47 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 4.46355840927017E-01 -9.42202296070488E-01 x : -4.07328973461773E-01 -4.97610342529722E-01 z : 6.94263691281937E-03 -1.19445970997145E+00 == err : 3.912E-15 = rco : 2.301E-02 = res : 2.668E-16 == solution 48 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.08894557607015E-01 -7.93261087457945E-01 x : -3.65261799691737E-01 1.02208342089387E-01 z : -8.74104275763197E-01 6.68536229940334E-01 == err : 9.267E-16 = rco : 3.572E-03 = res : 9.714E-17 == solution 49 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -8.45923636933352E-01 3.04804618725120E-01 x : -3.68383014368426E-01 3.05082096177652E-01 z : 1.25238045518965E+00 -1.24811970223738E-02 == err : 9.412E-16 = rco : 2.321E-02 = res : 2.238E-16 == solution 50 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -7.06729292166197E-01 7.66821788345749E-05 x : -2.95488240005381E-01 6.41226636040886E-05 z : 3.52833334770102E-04 -6.76297443540688E-01 == err : 5.077E-16 = rco : 2.958E-03 = res : 1.994E-18 == solution 51 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -5.07689440857743E-01 4.35123654578093E-01 x : -4.04754358167603E-02 2.61381497709776E-01 z : 3.93467323095711E-02 -1.15634560043139E+00 == err : 4.526E-15 = rco : 1.903E-02 = res : 7.473E-17 == solution 52 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -7.69160584602382E-01 -1.43457878560659E-07 x : -3.50000015734356E-01 -1.30558584592064E-07 z : -4.76965181423346E-09 -3.95770241979668E-08 == err : 1.444E-07 = rco : 1.127E-07 = res : 3.200E-14 == solution 53 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 9.01273514442533E-01 -5.08039258050036E-01 x : 3.27863261064445E-01 -5.41773676244008E-01 z : 8.73614516573314E-03 1.16439785943386E+00 == err : 3.511E-15 = rco : 1.841E-01 = res : 4.003E-16 == solution 54 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.09499022320081E+00 7.88580496010564E-57 x : 7.09340089218694E-01 2.46929246225530E-57 z : 1.16055892612283E+00 3.66411139560464E-57 == err : 4.892E-15 = rco : 3.336E-01 = res : 7.563E-16 == solution 55 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 4.67733824266134E-51 2.25550867423398E-01 x : -3.00969873314954E-02 3.00686029885372E-51 z : 7.18305515837278E-51 -1.10815809514278E+00 == err : 6.743E-16 = rco : 1.386E-02 = res : 1.128E-17 == solution 56 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.02054611323534E+00 3.70891710560524E-58 x : 6.16168210366712E-01 7.01956123342737E-58 z : -1.15936720848735E+00 -9.95682444457783E-60 == err : 2.943E-15 = rco : 1.094E-01 = res : 7.008E-16 == solution 57 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.43457878560659E-07 7.69160584602382E-01 x : -3.50000015734356E-01 -1.30558584592064E-07 z : -3.95770241979668E-08 4.76965181423346E-09 == err : 1.444E-07 = rco : 1.127E-07 = res : 3.200E-14 == solution 58 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 3.04804618725120E-01 8.45923636933352E-01 x : -3.68383014368426E-01 3.05082096177652E-01 z : -1.24811970223738E-02 -1.25238045518965E+00 == err : 9.412E-16 = rco : 2.321E-02 = res : 2.238E-16 == solution 59 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 7.66821788345749E-05 7.06729292166197E-01 x : -2.95488240005381E-01 6.41226636040886E-05 z : -6.76297443540688E-01 -3.52833334770102E-04 == err : 5.077E-16 = rco : 2.958E-03 = res : 1.994E-18 == solution 60 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 4.35123654578093E-01 5.07689440857743E-01 x : -4.04754358167603E-02 2.61381497709776E-01 z : -1.15634560043139E+00 -3.93467323095711E-02 == err : 4.526E-15 = rco : 1.903E-02 = res : 7.473E-17 == solution 61 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 3.70891710560524E-58 -1.02054611323534E+00 x : 6.16168210366712E-01 7.01956123342737E-58 z : -9.95682444457783E-60 1.15936720848735E+00 == err : 2.943E-15 = rco : 1.094E-01 = res : 7.008E-16 == solution 62 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -5.08039258050036E-01 -9.01273514442533E-01 x : 3.27863261064445E-01 -5.41773676244008E-01 z : 1.16439785943386E+00 -8.73614516573314E-03 == err : 3.511E-15 = rco : 1.841E-01 = res : 4.003E-16 == solution 63 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 7.88580496010564E-57 -1.09499022320081E+00 x : 7.09340089218694E-01 2.46929246225530E-57 z : 3.66411139560464E-57 -1.16055892612283E+00 == err : 4.892E-15 = rco : 3.336E-01 = res : 7.563E-16 == solution 64 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.25550867423398E-01 -4.67733824266134E-51 x : -3.00969873314954E-02 3.00686029885372E-51 z : -1.10815809514278E+00 -7.18305515837278E-51 == err : 6.743E-16 = rco : 1.386E-02 = res : 1.128E-17 == solution 65 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -2.75063189951260E+00 -1.33118482458753E-69 x : 4.47609167455865E+00 5.46963016361133E-69 z : 1.16625318897471E+00 8.47575082054775E-71 == err : 3.993E-15 = rco : 3.825E-04 = res : 2.046E-12 == solution 66 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -3.04804618725120E-01 8.45923636933352E-01 x : -3.68383014368426E-01 -3.05082096177652E-01 z : 1.24811970223739E-02 -1.25238045518965E+00 == err : 9.758E-16 = rco : 2.321E-02 = res : 1.670E-16 == solution 67 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -6.31432852626338E-01 9.80011313968479E-01 x : -3.32314914696150E-01 -7.32187451134562E-01 z : -1.17957107436855E+00 6.47433994054858E-04 == err : 3.839E-15 = rco : 1.835E-01 = res : 4.965E-16 == solution 68 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -8.12856254142465E-01 1.04999918410803E+00 x : -2.61350513386999E-01 -1.00987293014440E+00 z : 1.18666524166848E-03 1.17315498632898E+00 == err : 5.126E-15 = rco : 7.718E-02 = res : 1.490E-15 == solution 69 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 7.93734763976699E-01 -1.07654909613252E-01 x : -3.65865339091242E-01 1.01105145947890E-01 z : 6.58476169954703E-01 8.68581832844960E-01 == err : 1.962E-15 = rco : 3.665E-03 = res : 1.110E-16 == solution 70 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 9.42202296070488E-01 4.46355840927017E-01 x : -4.07328973461773E-01 -4.97610342529722E-01 z : 1.19445970997145E+00 6.94263691281937E-03 == err : 3.912E-15 = rco : 2.301E-02 = res : 2.668E-16 == solution 71 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 7.93261087457945E-01 -1.08894557607015E-01 x : -3.65261799691737E-01 1.02208342089387E-01 z : -6.68536229940334E-01 -8.74104275763197E-01 == err : 9.267E-16 = rco : 3.572E-03 = res : 9.714E-17 == solution 72 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 7.93261087457945E-01 1.08894557607015E-01 x : -3.65261799691737E-01 -1.02208342089387E-01 z : -6.68536229940335E-01 8.74104275763198E-01 == err : 1.650E-15 = rco : 3.572E-03 = res : 2.082E-16 == solution 73 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -7.66821788345749E-05 -7.06729292166197E-01 x : -2.95488240005381E-01 6.41226636040886E-05 z : 6.76297443540688E-01 3.52833334770102E-04 == err : 5.077E-16 = rco : 2.958E-03 = res : 1.994E-18 == solution 74 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -4.35123654578093E-01 -5.07689440857743E-01 x : -4.04754358167603E-02 2.61381497709776E-01 z : 1.15634560043139E+00 3.93467323095711E-02 == err : 4.526E-15 = rco : 1.903E-02 = res : 7.473E-17 == solution 75 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.43457878560659E-07 -7.69160584602382E-01 x : -3.50000015734356E-01 -1.30558584592064E-07 z : 3.95770241979668E-08 -4.76965181423346E-09 == err : 1.444E-07 = rco : 1.127E-07 = res : 3.200E-14 == solution 76 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -3.04804618725120E-01 -8.45923636933352E-01 x : -3.68383014368426E-01 3.05082096177652E-01 z : 1.24811970223738E-02 1.25238045518965E+00 == err : 9.412E-16 = rco : 2.321E-02 = res : 2.238E-16 == solution 77 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -7.88580496010564E-57 1.09499022320081E+00 x : 7.09340089218694E-01 2.46929246225530E-57 z : -3.66411139560464E-57 1.16055892612283E+00 == err : 4.892E-15 = rco : 3.336E-01 = res : 7.563E-16 == solution 78 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -2.25550867423398E-01 4.67733824266134E-51 x : -3.00969873314954E-02 3.00686029885372E-51 z : 1.10815809514278E+00 7.18305515837278E-51 == err : 6.743E-16 = rco : 1.386E-02 = res : 1.128E-17 == solution 79 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -3.70891710560524E-58 1.02054611323534E+00 x : 6.16168210366712E-01 7.01956123342737E-58 z : 9.95682444457783E-60 -1.15936720848735E+00 == err : 2.943E-15 = rco : 1.094E-01 = res : 7.008E-16 == solution 80 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 5.08039258050036E-01 9.01273514442533E-01 x : 3.27863261064445E-01 -5.41773676244008E-01 z : -1.16439785943386E+00 8.73614516573314E-03 == err : 3.511E-15 = rco : 1.841E-01 = res : 4.003E-16 == solution 81 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 6.31432852626338E-01 -9.80011313968479E-01 x : -3.32314914696150E-01 -7.32187451134562E-01 z : 1.17957107436855E+00 -6.47433994054858E-04 == err : 3.839E-15 = rco : 1.835E-01 = res : 4.965E-16 == solution 82 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 8.12856254142465E-01 -1.04999918410803E+00 x : -2.61350513386999E-01 -1.00987293014440E+00 z : -1.18666524166848E-03 -1.17315498632898E+00 == err : 5.126E-15 = rco : 7.718E-02 = res : 1.490E-15 == solution 83 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.75063189951260E+00 1.33118482458753E-69 x : 4.47609167455865E+00 5.46963016361133E-69 z : -1.16625318897471E+00 -8.47575082054775E-71 == err : 3.993E-15 = rco : 3.825E-04 = res : 2.046E-12 == solution 84 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 3.04804618725120E-01 -8.45923636933352E-01 x : -3.68383014368426E-01 -3.05082096177652E-01 z : -1.24811970223739E-02 1.25238045518965E+00 == err : 9.758E-16 = rco : 2.321E-02 = res : 1.670E-16 == solution 85 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -7.93261087457945E-01 1.08894557607015E-01 x : -3.65261799691737E-01 1.02208342089387E-01 z : 6.68536229940334E-01 8.74104275763197E-01 == err : 9.267E-16 = rco : 3.572E-03 = res : 9.714E-17 == solution 86 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -7.93261087457945E-01 -1.08894557607015E-01 x : -3.65261799691737E-01 -1.02208342089387E-01 z : 6.68536229940335E-01 -8.74104275763198E-01 == err : 1.650E-15 = rco : 3.572E-03 = res : 2.082E-16 == solution 87 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -7.93734763976699E-01 1.07654909613252E-01 x : -3.65865339091242E-01 1.01105145947890E-01 z : -6.58476169954703E-01 -8.68581832844960E-01 == err : 1.962E-15 = rco : 3.665E-03 = res : 1.110E-16 == solution 88 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -9.42202296070488E-01 -4.46355840927017E-01 x : -4.07328973461773E-01 -4.97610342529722E-01 z : -1.19445970997145E+00 -6.94263691281937E-03 == err : 3.912E-15 = rco : 2.301E-02 = res : 2.668E-16 == solution 89 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 7.93734763976699E-01 1.07654909613251E-01 x : -3.65865339091242E-01 -1.01105145947890E-01 z : 6.58476169954704E-01 -8.68581832844960E-01 == err : 1.511E-15 = rco : 3.665E-03 = res : 1.119E-16 == solution 90 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.33142568982927E+00 -8.75200663045793E-02 x : -1.04420855462554E+00 1.37875972346502E-01 z : 4.92408919981615E-03 1.15426656020049E+00 == err : 4.415E-15 = rco : 2.334E-01 = res : 1.332E-15 == solution 91 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.04999918410803E+00 -8.12856254142465E-01 x : -2.61350513386999E-01 1.00987293014440E+00 z : 1.17315498632898E+00 1.18666524166848E-03 == err : 5.129E-15 = rco : 7.718E-02 = res : 8.006E-16 == solution 92 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 5.43969277239265E-01 -2.93283330306704E-01 x : -1.24171097506832E-01 1.88766867492739E-01 z : 1.14191367994043E+00 7.08277961612591E-02 == err : 2.639E-15 = rco : 8.527E-03 = res : 5.816E-17 == solution 93 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -5.43969277239265E-01 -2.93283330306704E-01 x : -1.24171097506832E-01 -1.88766867492739E-01 z : -1.14191367994043E+00 7.08277961612591E-02 == err : 2.639E-15 = rco : 8.527E-03 = res : 4.389E-17 == solution 94 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -5.07689440857743E-01 -4.35123654578093E-01 x : -4.04754358167603E-02 -2.61381497709776E-01 z : 3.93467323095711E-02 1.15634560043139E+00 == err : 4.527E-15 = rco : 1.903E-02 = res : 6.397E-17 == solution 95 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -7.93734763976699E-01 -1.07654909613251E-01 x : -3.65865339091242E-01 -1.01105145947890E-01 z : -6.58476169954704E-01 8.68581832844960E-01 == err : 1.511E-15 = rco : 3.665E-03 = res : 1.119E-16 == solution 96 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.33142568982927E+00 8.75200663045793E-02 x : -1.04420855462554E+00 1.37875972346502E-01 z : -4.92408919981615E-03 -1.15426656020049E+00 == err : 4.415E-15 = rco : 2.334E-01 = res : 1.332E-15 == solution 97 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.04999918410803E+00 8.12856254142465E-01 x : -2.61350513386999E-01 1.00987293014440E+00 z : -1.17315498632898E+00 -1.18666524166848E-03 == err : 5.129E-15 = rco : 7.718E-02 = res : 8.006E-16 == solution 98 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -5.43969277239265E-01 2.93283330306704E-01 x : -1.24171097506832E-01 1.88766867492739E-01 z : -1.14191367994043E+00 -7.08277961612591E-02 == err : 2.639E-15 = rco : 8.527E-03 = res : 5.816E-17 == solution 99 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 5.43969277239265E-01 2.93283330306704E-01 x : -1.24171097506832E-01 -1.88766867492739E-01 z : 1.14191367994043E+00 -7.08277961612591E-02 == err : 2.639E-15 = rco : 8.527E-03 = res : 4.389E-17 == solution 100 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 5.07689440857743E-01 4.35123654578093E-01 x : -4.04754358167603E-02 -2.61381497709776E-01 z : -3.93467323095711E-02 -1.15634560043139E+00 == err : 4.527E-15 = rco : 1.903E-02 = res : 6.397E-17 == solution 101 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.93283330306704E-01 5.43969277239265E-01 x : -1.24171097506832E-01 1.88766867492739E-01 z : -7.08277961612591E-02 1.14191367994043E+00 == err : 2.639E-15 = rco : 8.527E-03 = res : 5.816E-17 == solution 102 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.93283330306704E-01 -5.43969277239265E-01 x : -1.24171097506832E-01 -1.88766867492739E-01 z : -7.08277961612591E-02 -1.14191367994043E+00 == err : 2.639E-15 = rco : 8.527E-03 = res : 4.389E-17 == solution 103 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 4.35123654578093E-01 -5.07689440857743E-01 x : -4.04754358167603E-02 -2.61381497709776E-01 z : -1.15634560043139E+00 3.93467323095711E-02 == err : 4.527E-15 = rco : 1.903E-02 = res : 6.397E-17 == solution 104 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.07654909613251E-01 -7.93734763976699E-01 x : -3.65865339091242E-01 -1.01105145947890E-01 z : -8.68581832844960E-01 -6.58476169954704E-01 == err : 1.511E-15 = rco : 3.665E-03 = res : 1.119E-16 == solution 105 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -8.75200663045793E-02 -1.33142568982927E+00 x : -1.04420855462554E+00 1.37875972346502E-01 z : 1.15426656020049E+00 -4.92408919981615E-03 == err : 4.415E-15 = rco : 2.334E-01 = res : 1.332E-15 == solution 106 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -8.12856254142465E-01 -1.04999918410803E+00 x : -2.61350513386999E-01 1.00987293014440E+00 z : 1.18666524166848E-03 -1.17315498632898E+00 == err : 5.129E-15 = rco : 7.718E-02 = res : 8.006E-16 == solution 107 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -2.93283330306704E-01 -5.43969277239265E-01 x : -1.24171097506832E-01 1.88766867492739E-01 z : 7.08277961612591E-02 -1.14191367994043E+00 == err : 2.639E-15 = rco : 8.527E-03 = res : 5.816E-17 == solution 108 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -2.93283330306704E-01 5.43969277239265E-01 x : -1.24171097506832E-01 -1.88766867492739E-01 z : 7.08277961612591E-02 1.14191367994043E+00 == err : 2.639E-15 = rco : 8.527E-03 = res : 4.389E-17 == solution 109 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -4.35123654578093E-01 5.07689440857743E-01 x : -4.04754358167603E-02 -2.61381497709776E-01 z : 1.15634560043139E+00 -3.93467323095711E-02 == err : 4.527E-15 = rco : 1.903E-02 = res : 6.397E-17 == solution 110 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.07654909613251E-01 7.93734763976699E-01 x : -3.65865339091242E-01 -1.01105145947890E-01 z : 8.68581832844960E-01 6.58476169954704E-01 == err : 1.511E-15 = rco : 3.665E-03 = res : 1.119E-16 == solution 111 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 8.75200663045793E-02 1.33142568982927E+00 x : -1.04420855462554E+00 1.37875972346502E-01 z : -1.15426656020049E+00 4.92408919981615E-03 == err : 4.415E-15 = rco : 2.334E-01 = res : 1.332E-15 == solution 112 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 8.12856254142465E-01 1.04999918410803E+00 x : -2.61350513386999E-01 1.00987293014440E+00 z : -1.18666524166848E-03 1.17315498632898E+00 == err : 5.129E-15 = rco : 7.718E-02 = res : 8.006E-16 == solution 113 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 7.69160426657503E-01 -2.37624885793056E-07 x : -3.49999871991398E-01 2.16258382350675E-07 z : -3.88040325679865E-08 -6.55557293154217E-08 == err : 2.761E-07 = rco : 2.653E-07 = res : 1.170E-13 == solution 114 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 9.80011313968479E-01 -6.31432852626338E-01 x : -3.32314914696150E-01 7.32187451134562E-01 z : 6.47433994054856E-04 -1.17957107436855E+00 == err : 3.837E-15 = rco : 1.835E-01 = res : 4.445E-16 == solution 115 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.33142568982927E+00 8.75200663045793E-02 x : -1.04420855462554E+00 -1.37875972346502E-01 z : 4.92408919981615E-03 -1.15426656020049E+00 == err : 4.415E-15 = rco : 2.334E-01 = res : 1.332E-15 == solution 116 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 5.08039258050036E-01 -9.01273514442533E-01 x : 3.27863261064445E-01 5.41773676244008E-01 z : -1.16439785943386E+00 -8.73614516573314E-03 == err : 3.511E-15 = rco : 1.841E-01 = res : 4.965E-16 == solution 117 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -4.47822784092609E-01 -4.94461471367056E-50 x : -1.18644167517606E-01 -1.55354448774109E-50 z : 1.06565912819805E+00 -1.87093529706454E-50 == err : 4.622E-16 = rco : 6.758E-03 = res : 4.857E-17 == solution 118 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.95064244294109E+00 1.95988518272482E-62 x : -2.25107187174101E+00 -6.62410805944204E-62 z : 1.16466985750817E+00 -1.27240607793181E-62 == err : 6.261E-15 = rco : 2.257E-02 = res : 1.064E-13 == solution 119 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -7.69160426657503E-01 2.37624885793056E-07 x : -3.49999871991398E-01 2.16258382350675E-07 z : 3.88040325679865E-08 6.55557293154217E-08 == err : 2.761E-07 = rco : 2.653E-07 = res : 1.170E-13 == solution 120 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -9.80011313968479E-01 6.31432852626338E-01 x : -3.32314914696150E-01 7.32187451134562E-01 z : -6.47433994054856E-04 1.17957107436855E+00 == err : 3.837E-15 = rco : 1.835E-01 = res : 4.445E-16 == solution 121 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.33142568982927E+00 -8.75200663045793E-02 x : -1.04420855462554E+00 -1.37875972346502E-01 z : -4.92408919981615E-03 1.15426656020049E+00 == err : 4.415E-15 = rco : 2.334E-01 = res : 1.332E-15 == solution 122 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -5.08039258050036E-01 9.01273514442533E-01 x : 3.27863261064445E-01 5.41773676244008E-01 z : 1.16439785943386E+00 8.73614516573314E-03 == err : 3.511E-15 = rco : 1.841E-01 = res : 4.965E-16 == solution 123 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 4.47822784092609E-01 4.94461471367056E-50 x : -1.18644167517606E-01 -1.55354448774109E-50 z : -1.06565912819805E+00 1.87093529706454E-50 == err : 4.622E-16 = rco : 6.758E-03 = res : 4.857E-17 == solution 124 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.95064244294109E+00 -1.95988518272482E-62 x : -2.25107187174101E+00 -6.62410805944204E-62 z : -1.16466985750817E+00 1.27240607793181E-62 == err : 6.261E-15 = rco : 2.257E-02 = res : 1.064E-13 == solution 125 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 9.01273514442533E-01 5.08039258050036E-01 x : 3.27863261064445E-01 5.41773676244008E-01 z : 8.73614516573314E-03 -1.16439785943386E+00 == err : 3.511E-15 = rco : 1.841E-01 = res : 4.965E-16 == solution 126 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 4.94461471367056E-50 -4.47822784092609E-01 x : -1.18644167517606E-01 -1.55354448774109E-50 z : 1.87093529706454E-50 1.06565912819805E+00 == err : 4.622E-16 = rco : 6.758E-03 = res : 4.857E-17 == solution 127 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -1.95988518272482E-62 1.95064244294109E+00 x : -2.25107187174101E+00 -6.62410805944204E-62 z : 1.27240607793181E-62 1.16466985750817E+00 == err : 6.261E-15 = rco : 2.257E-02 = res : 1.064E-13 == solution 128 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -2.37624885793056E-07 -7.69160426657503E-01 x : -3.49999871991398E-01 2.16258382350675E-07 z : -6.55557293154217E-08 3.88040325679865E-08 == err : 2.761E-07 = rco : 2.653E-07 = res : 1.170E-13 == solution 129 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -6.31432852626338E-01 -9.80011313968479E-01 x : -3.32314914696150E-01 7.32187451134562E-01 z : -1.17957107436855E+00 -6.47433994054856E-04 == err : 3.837E-15 = rco : 1.835E-01 = res : 4.445E-16 == solution 130 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 8.75200663045793E-02 -1.33142568982927E+00 x : -1.04420855462554E+00 -1.37875972346502E-01 z : -1.15426656020049E+00 -4.92408919981615E-03 == err : 4.415E-15 = rco : 2.334E-01 = res : 1.332E-15 == solution 131 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -9.01273514442533E-01 -5.08039258050036E-01 x : 3.27863261064445E-01 5.41773676244008E-01 z : -8.73614516573314E-03 1.16439785943386E+00 == err : 3.511E-15 = rco : 1.841E-01 = res : 4.965E-16 == solution 132 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -4.94461471367056E-50 4.47822784092609E-01 x : -1.18644167517606E-01 -1.55354448774109E-50 z : -1.87093529706454E-50 -1.06565912819805E+00 == err : 4.622E-16 = rco : 6.758E-03 = res : 4.857E-17 == solution 133 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.95988518272482E-62 -1.95064244294109E+00 x : -2.25107187174101E+00 -6.62410805944204E-62 z : -1.27240607793181E-62 -1.16466985750817E+00 == err : 6.261E-15 = rco : 2.257E-02 = res : 1.064E-13 == solution 134 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.37624885793056E-07 7.69160426657503E-01 x : -3.49999871991398E-01 2.16258382350675E-07 z : 6.55557293154217E-08 -3.88040325679865E-08 == err : 2.761E-07 = rco : 2.653E-07 = res : 1.170E-13 == solution 135 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 6.31432852626338E-01 9.80011313968479E-01 x : -3.32314914696150E-01 7.32187451134562E-01 z : 1.17957107436855E+00 6.47433994054856E-04 == err : 3.837E-15 = rco : 1.835E-01 = res : 4.445E-16 == solution 136 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -8.75200663045793E-02 1.33142568982927E+00 x : -1.04420855462554E+00 -1.37875972346502E-01 z : 1.15426656020049E+00 4.92408919981615E-03 == err : 4.415E-15 = rco : 2.334E-01 = res : 1.332E-15 == SHAR_EOF fi # end of overwriting check if test -f 's9_1' then echo shar: will not over-write existing file "'s9_1'" else cat << "SHAR_EOF" > 's9_1' 8 -e*g - 2*d*h; 9*e + 4*b; -4*c*h - 2*e*f - 3*d*g; -7*c + 9*a - 8*f; -4*d*f - 5*c*g - 6*h - 3*e; -5*d - 6*c*f - 7*g + 9*b; 9*d + 6*a - 5*b; 9*c - 7*a + 8; TITLE : small system from constructive Galois theory, called s9_1 ROOT COUNTS : total degree : 16 2-homogeneous Bezout number : 10 with partition : {e d b c a }{g h f } mixed volume : 10 REFERENCES : Raphael Nauheim: "Systems of Algebraic Equations with Bad Reduction", Universitaet Heidelberg, Interdisziplinaeres Zentrum fuer wissenschaftliches Rechnen, Preprint 95-46, Dezember 1995. There are four real and six complex conjugated solutions. THE SOLUTIONS : 10 8 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : e : 1.51053285357998E+00 1.80139017713210E+00 g : 2.33683608531618E+00 1.53846965064388E-01 d : -3.21601607265565E+00 5.81267061547841E-01 h : 3.68839339468626E-01 7.57261884400351E-01 b : -3.39869892055495E+00 -4.05312789854722E+00 c : 6.60269451071902E-01 -3.30517224679012E+00 f : 1.66301111489823E+00 -1.88866985530864E+00 a : 1.99177500852102E+00 -4.24950717444445E+00 == err : 6.233E-15 = rco : 1.184E-02 = res : 1.899E-14 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : e : -6.87611772125171E-01 -1.06910588403688E-50 g : 2.02970578781795E+00 1.87093529706454E-50 d : 6.61372486000091E-01 1.33638235504610E-50 h : 1.05511615859238E+00 5.34552942018439E-51 b : 1.54712648728164E+00 1.87093529706454E-50 c : -6.57722954873121E-01 -2.67276471009220E-51 f : 9.09872597215360E-01 -2.33866912133067E-51 a : 2.97213343734559E-01 -4.00914706513829E-51 == err : 4.818E-15 = rco : 2.538E-02 = res : 1.776E-15 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : e : 1.51053285357998E+00 -1.80139017713210E+00 g : 2.33683608531618E+00 -1.53846965064389E-01 d : -3.21601607265565E+00 -5.81267061547840E-01 h : 3.68839339468626E-01 -7.57261884400351E-01 b : -3.39869892055495E+00 4.05312789854722E+00 c : 6.60269451071902E-01 3.30517224679012E+00 f : 1.66301111489823E+00 1.88866985530864E+00 a : 1.99177500852102E+00 4.24950717444445E+00 == err : 5.760E-15 = rco : 1.184E-02 = res : 1.432E-14 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : e : 1.16422080143523E-01 -1.92195753383132E-01 g : 2.63662396247879E-01 5.56482066322579E-02 d : 1.57730288928362E-01 6.27553637263924E-01 h : 2.53243613191786E-02 3.93434985858779E-02 b : -2.61949680322927E-01 4.32440445112047E-01 c : -1.24268975951462E+00 -4.51860436457511E-01 f : 5.75605851705934E-01 -2.58205963690006E-01 a : -4.54886833661648E-01 -5.80963418302514E-01 == err : 4.814E-15 = rco : 3.274E-03 = res : 9.037E-16 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : e : -1.91397791595386E-01 -3.73380916671669E-60 g : 2.37577797622942E-02 -1.28349690105886E-60 d : 1.14629961437537E+00 1.24460305557223E-59 h : 1.98341974588837E-03 -4.66726145839586E-61 b : 4.30645031089619E-01 8.71222138900560E-60 c : -1.94711665958355E+00 -8.71222138900560E-60 f : 1.73076194523685E-01 -3.42265840282363E-60 a : -1.36057856232171E+00 -1.12014275001501E-59 == err : 1.950E-15 = rco : 2.785E-03 = res : 3.553E-15 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : e : -4.15425076903867E-01 -7.96941863871104E-01 g : 1.49599564821986E+00 1.08183777510683E+00 d : -4.34678314642327E-01 3.77392003632451E-01 h : 1.09268365680768E+00 -9.39664948170555E-01 b : 9.34706423033702E-01 1.79311919370998E+00 c : 2.24064048678632E-01 7.21916213907501E-01 f : 1.41375088495922E+00 4.12523550804286E-01 a : 1.43093949115824E+00 9.28177989309645E-01 == err : 4.605E-15 = rco : 2.242E-02 = res : 1.986E-15 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : e : -4.15425076903867E-01 7.96941863871104E-01 g : 1.49599564821986E+00 -1.08183777510683E+00 d : -4.34678314642327E-01 -3.77392003632451E-01 h : 1.09268365680768E+00 9.39664948170555E-01 b : 9.34706423033702E-01 -1.79311919370998E+00 c : 2.24064048678632E-01 -7.21916213907501E-01 f : 1.41375088495922E+00 -4.12523550804286E-01 a : 1.43093949115824E+00 -9.28177989309644E-01 == err : 5.569E-15 = rco : 2.242E-02 = res : 2.512E-15 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : e : 2.19606992938435E-01 -5.09789411562385E-56 g : 1.05762750111393E-01 5.60768352718623E-56 d : -1.80601046493377E-01 2.44698917549945E-55 h : 6.43026160917456E-02 2.80384176359312E-56 b : -4.94115734111479E-01 1.22349458774972E-55 c : -9.98447866015167E-01 -2.14111552856202E-55 f : 7.15172647991333E-01 -1.12153670543725E-55 a : -1.40861542019500E-01 -2.85482070474935E-55 == err : 5.974E-16 = rco : 2.837E-03 = res : 8.882E-16 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : e : -2.66666666666667E+00 2.45980994751297E-60 g : 1.71423733988431E-17 -2.60728974609933E-58 d : 1.71423733988431E-17 -2.94321567845557E-60 h : 1.33333333333333E+00 6.56554882968095E-58 b : 6.00000000000000E+00 -5.53457238190418E-60 c : 3.00000000000000E+00 -7.96545955566226E-59 f : 3.00000000000000E+00 7.96545955566226E-59 a : 5.00000000000000E+00 -1.97320133903454E-61 == err : 3.536E-15 = rco : 1.716E-02 = res : 2.057E-16 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : e : 1.16422080143523E-01 1.92195753383132E-01 g : 2.63662396247879E-01 -5.56482066322579E-02 d : 1.57730288928362E-01 -6.27553637263924E-01 h : 2.53243613191786E-02 -3.93434985858779E-02 b : -2.61949680322927E-01 -4.32440445112047E-01 c : -1.24268975951462E+00 4.51860436457511E-01 f : 5.75605851705934E-01 2.58205963690006E-01 a : -4.54886833661648E-01 5.80963418302514E-01 == err : 4.767E-15 = rco : 3.274E-03 = res : 1.831E-15 == SHAR_EOF fi # end of overwriting check if test -f 'sendra' then echo shar: will not over-write existing file "'sendra'" else cat << "SHAR_EOF" > 'sendra' 2 -270*x**4*y**3 - 314*x*y**4 - 689*x*y**3 + 1428; 36*x**7 + 417*x**6*y - 422*x**5*y**2 - 270*x**4*y**3 + 1428*x**3*y**4 - 1475*x**2*y**5 + 510*x*y**6 - 200*x**6 - 174*x**5*y - 966*x**4*y**2 + 529*x**3*y**3 + 269*x**2*y**4 + 49*x*y**5 - 267*y**6 + 529*x**4*y + 1303*x**2*y**3 - 314*x*y**4 + 262*y**5 + 36*x**4 - 788*x**2*y**2 - 689*x*y**3 + 177*y**4; TITLE : the system sendra of the PoSSo test suite ROOT COUNTS : total degree : 49 1-homogeneous Bezout number : 49 with partition : {x y } generalized Bezout number : 46 based on the set structure : {x }{x y }{x }{x }{y }{y }{y } {x }{x y }{x y }{x y }{x y }{x y }{x y } mixed volume : 46 REFERENCES : See the PoSSo test suite. THE SOLUTIONS : 46 2 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 5.00256943517446E-01 1.64883944206886E+00 y : 1.21327895854065E+00 2.87654469209477E+00 == err : 3.601E-15 = rco : 2.113E-01 = res : 6.390E-10 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.13454109131018E+00 8.46486298862573E-01 y : -1.12000443752762E+00 -4.10152267830658E-01 == err : 3.576E-15 = rco : 9.935E-02 = res : 2.344E-12 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 3.05462631140359E+00 2.25008959973218E+00 y : 1.99918990299544E-01 -2.18877338106381E-01 == err : 5.019E-15 = rco : 9.764E-04 = res : 5.610E-11 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 8.80799397446810E-02 1.46629762922461E+00 y : -3.45488305816064E-01 1.08482122947928E+00 == err : 3.690E-15 = rco : 1.820E-01 = res : 4.617E-12 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 8.36234971456537E-01 1.60473100152749E+00 y : 2.84786498764032E+00 5.56229841356002E-01 == err : 4.495E-15 = rco : 2.113E-01 = res : 3.425E-10 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 5.38593631773821E-01 1.58274820140551E+00 y : -8.18274273436525E-01 6.12881380901085E-01 == err : 3.909E-15 = rco : 1.192E-01 = res : 3.582E-12 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 8.36234971456537E-01 -1.60473100152749E+00 y : 2.84786498764032E+00 -5.56229841356002E-01 == err : 4.495E-15 = rco : 2.113E-01 = res : 3.425E-10 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 3.05462631140359E+00 -2.25008959973218E+00 y : 1.99918990299544E-01 2.18877338106381E-01 == err : 5.019E-15 = rco : 9.764E-04 = res : 5.610E-11 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 4.56253327336965E-01 2.99627286700301E-94 y : -2.75343151310694E+00 2.39701829360241E-94 == err : 3.413E-16 = rco : 1.001E-02 = res : 2.910E-11 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -7.51672368346469E-01 -7.20346274884387E-01 y : -1.40695386330471E+00 1.90591935488604E-01 == err : 5.495E-16 = rco : 1.654E-01 = res : 1.875E-12 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.13454109131018E+00 -8.46486298862573E-01 y : -1.12000443752762E+00 4.10152267830658E-01 == err : 3.576E-15 = rco : 9.935E-02 = res : 2.344E-12 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 8.80799397446810E-02 -1.46629762922461E+00 y : -3.45488305816064E-01 -1.08482122947928E+00 == err : 3.690E-15 = rco : 1.820E-01 = res : 4.617E-12 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 5.00256943517446E-01 -1.64883944206886E+00 y : 1.21327895854065E+00 -2.87654469209477E+00 == err : 3.601E-15 = rco : 2.113E-01 = res : 6.390E-10 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 8.26164354430881E-01 -1.37108304270387E+00 y : 6.10856021873192E-01 -1.08561674720917E+00 == err : 3.674E-15 = rco : 2.995E-01 = res : 4.547E-12 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 2.80043582269256E-01 1.61079629330082E-90 y : 1.61833529321431E+00 -3.28295625491786E-90 == err : 2.597E-15 = rco : 1.911E-01 = res : 3.411E-13 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 5.38593631773821E-01 -1.58274820140551E+00 y : -8.18274273436525E-01 -6.12881380901085E-01 == err : 3.909E-15 = rco : 1.192E-01 = res : 3.582E-12 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -8.48165107974402E-01 -2.24030915414134E+00 y : 4.46102447359539E-01 2.47287644148072E-01 == err : 4.383E-15 = rco : 1.984E-02 = res : 4.023E-12 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -9.68236894272083E-01 -3.96367806857604E-01 y : 6.42313169885967E-01 -9.23194680778619E-01 == err : 5.563E-16 = rco : 2.405E-01 = res : 1.137E-12 == solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -6.33132195886447E-02 -5.67925804740317E-01 y : 2.66976366758431E-01 -1.39070349071201E+00 == err : 2.954E-15 = rco : 2.462E-01 = res : 1.833E-12 == solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 8.26164354430881E-01 1.37108304270387E+00 y : 6.10856021873192E-01 1.08561674720917E+00 == err : 3.674E-15 = rco : 2.995E-01 = res : 4.547E-12 == solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -9.68236894272083E-01 3.96367806857604E-01 y : 6.42313169885967E-01 9.23194680778619E-01 == err : 5.563E-16 = rco : 2.405E-01 = res : 1.137E-12 == solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.01254521520691E+00 -8.19870499227230E-02 y : -1.45493055265200E+00 1.01034133848404E+00 == err : 3.490E-15 = rco : 8.253E-02 = res : 1.467E-11 == solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -7.51672368346469E-01 7.20346274884387E-01 y : -1.40695386330471E+00 -1.90591935488604E-01 == err : 5.495E-16 = rco : 1.654E-01 = res : 1.875E-12 == solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.89978757148561E+00 3.45170634278746E-92 y : 9.55236081598879E-01 1.67791280552168E-93 == err : 4.137E-15 = rco : 1.262E-01 = res : 1.876E-12 == solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -8.40431029278377E-01 1.14784417624630E+00 y : -9.23146742199925E-01 -2.48883428983917E-01 == err : 1.011E-15 = rco : 2.518E-01 = res : 2.334E-12 == solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.02753696406242E+00 7.14311451493517E-92 y : 1.02177486045526E+00 -3.78728890389180E-92 == err : 2.435E-15 = rco : 7.988E-02 = res : 5.969E-13 == solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 5.81559822561863E-01 2.08084369485503E-01 y : 1.26497468734055E+00 -1.48550681438031E-01 == err : 1.309E-15 = rco : 1.143E-01 = res : 4.583E-13 == solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.19279497489775E+00 1.20926259078661E+00 y : 4.63962555330766E-01 -5.99192326200071E-01 == err : 5.162E-15 = rco : 1.814E-01 = res : 2.967E-12 == solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -8.48165107974402E-01 2.24030915414134E+00 y : 4.46102447359539E-01 -2.47287644148072E-01 == err : 4.383E-15 = rco : 1.984E-02 = res : 4.023E-12 == solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.19279497489775E+00 -1.20926259078661E+00 y : 4.63962555330766E-01 5.99192326200071E-01 == err : 5.162E-15 = rco : 1.814E-01 = res : 2.967E-12 == solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 5.81559822561863E-01 -2.08084369485503E-01 y : 1.26497468734055E+00 1.48550681438031E-01 == err : 1.309E-15 = rco : 1.143E-01 = res : 4.583E-13 == solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.88528164922380E+00 3.37500175739219E-90 y : 6.54332695427371E-01 -1.20426199070585E-90 == err : 4.141E-15 = rco : 5.074E-01 = res : 9.592E-13 == solution 33 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.99238556575678E-01 -1.56398860569596E+00 y : -4.50302565574240E-01 7.80629193065677E-01 == err : 1.339E-15 = rco : 1.074E-01 = res : 3.354E-12 == solution 34 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.58356999883061E+00 -2.90573248640199E-01 y : -3.74948227743026E-01 1.20298458924881E+00 == err : 4.580E-15 = rco : 9.451E-02 = res : 3.865E-12 == solution 35 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 4.43108440444656E-01 -9.62506249347813E-02 y : -5.69165342083820E-01 1.54272841971098E+00 == err : 2.739E-15 = rco : 8.401E-02 = res : 2.034E-12 == solution 36 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -2.56801356362087E+00 -3.35582561104337E-93 y : 5.30867479356297E-01 3.59552744040361E-93 == err : 1.480E-15 = rco : 2.269E-02 = res : 4.320E-12 == solution 37 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -6.33132195886447E-02 5.67925804740317E-01 y : 2.66976366758431E-01 1.39070349071201E+00 == err : 2.954E-15 = rco : 2.462E-01 = res : 1.833E-12 == solution 38 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 6.59691610790567E+00 -1.17161010420904E+00 y : -9.44606746555161E-02 1.00085945288797E-01 == err : 4.846E-15 = rco : 8.417E-05 = res : 1.744E-09 == solution 39 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.46584948259295E+00 8.89026370110391E-01 y : 4.67566315567595E-02 7.84212255731813E-01 == err : 1.141E-15 = rco : 2.489E-01 = res : 2.734E-12 == solution 40 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.46584948259295E+00 -8.89026370110391E-01 y : 4.67566315567595E-02 -7.84212255731813E-01 == err : 1.141E-15 = rco : 2.489E-01 = res : 2.734E-12 == solution 41 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 6.59691610790567E+00 1.17161010420904E+00 y : -9.44606746555161E-02 -1.00085945288797E-01 == err : 4.846E-15 = rco : 8.417E-05 = res : 1.744E-09 == solution 42 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.99238556575678E-01 1.56398860569596E+00 y : -4.50302565574240E-01 -7.80629193065677E-01 == err : 1.339E-15 = rco : 1.074E-01 = res : 3.354E-12 == solution 43 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 4.43108440444656E-01 9.62506249347813E-02 y : -5.69165342083820E-01 -1.54272841971098E+00 == err : 2.739E-15 = rco : 8.401E-02 = res : 2.034E-12 == solution 44 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.58356999883061E+00 2.90573248640199E-01 y : -3.74948227743026E-01 -1.20298458924881E+00 == err : 4.580E-15 = rco : 9.451E-02 = res : 3.865E-12 == solution 45 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -8.40431029278377E-01 -1.14784417624630E+00 y : -9.23146742199925E-01 2.48883428983917E-01 == err : 1.011E-15 = rco : 2.518E-01 = res : 2.334E-12 == solution 46 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.01254521520691E+00 8.19870499227230E-02 y : -1.45493055265200E+00 -1.01034133848404E+00 == err : 3.490E-15 = rco : 8.253E-02 = res : 1.467E-11 == SHAR_EOF fi # end of overwriting check if test -f 'solotarev' then echo shar: will not over-write existing file "'solotarev'" else cat << "SHAR_EOF" > 'solotarev' 4 3*x**2-2*x-a; x**3-x**2-x*a+a-2*b-2; 3*y**2-2*y-a; y**3-y**2-y*a-a+2; TITLE : the system of Solotarev from the PoSSo test suite ROOT COUNTS : total degree : 36 4-homogeneous Bezout number : 10 with partition {{x }{a }{b }{y }} generalized Bezout number : 8 with the set structure : {x a }{x } {x b }{x a }{x } {a y }{y } {a y }{y }{y } mixed volume : 6 REFERENCES : See the PoSSo test suite. THE SOLUTIONS : 6 4 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -1.00000016764979E+00 8.30237643136911E-08 a : 5.00000134119829E+00 -6.64190114509508E-07 b : 3.00000134119829E+00 -6.64190114509508E-07 y : -1.00000016764979E+00 8.30237643136911E-08 == err : 1.497E-06 = rco : 1.393E-08 = res : 1.402E-13 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.66666683444954E+00 -8.29578757360181E-08 a : 5.00000134226302E+00 -6.63663005888127E-07 b : -1.74074118816175E+00 2.21221001962709E-07 y : -1.00000016778288E+00 8.29578757360185E-08 == err : 1.496E-06 = rco : 1.980E-08 = res : 1.400E-13 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -3.33333333333333E-01 0.00000000000000E+00 a : 1.00000000000000E+00 0.00000000000000E+00 b : -4.07407407407407E-01 0.00000000000000E+00 y : 1.00000000000000E+00 0.00000000000000E+00 == err : 4.163E-16 = rco : 2.522E-01 = res : 5.551E-17 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : -9.99999867089384E-01 -1.49761124852549E-07 a : 4.99999893671507E+00 1.19808899882038E-06 b : 2.99999893671507E+00 1.19808899882038E-06 y : -9.99999867089384E-01 -1.49761124852549E-07 == err : 1.602E-06 = rco : 1.570E-08 = res : 1.604E-13 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.00000000000000E+00 0.00000000000000E+00 a : 1.00000000000000E+00 0.00000000000000E+00 b : -1.00000000000000E+00 0.00000000000000E+00 y : 1.00000000000000E+00 0.00000000000000E+00 == err : 0.000E+00 = rco : 4.667E-01 = res : 0.000E+00 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x : 1.66666653366608E+00 1.49659837765391E-07 a : 4.99999893599533E+00 1.19727870212311E-06 b : -1.74074038607252E+00 -3.99092900707705E-07 y : -9.99999866999416E-01 -1.49659837765391E-07 == err : 1.602E-06 = rco : 2.232E-08 = res : 1.604E-13 == SHAR_EOF fi # end of overwriting check if test -f 'sparse5' then echo shar: will not over-write existing file "'sparse5'" else cat << "SHAR_EOF" > 'sparse5' 5 x1**2*x2**2*x3**2*x4**2*x5**2 + 3*x1**2 + x2**2 + x3**2 + x4**2 + x5**2 + x1*x2*x3*x4*x5 + 5; x1**2*x2**2*x3**2*x4**2*x5**2 + x1**2 + 3*x2**2 + x3**2 + x4**2 + x5**2 + x1*x2*x3*x4*x5 + 5; x1**2*x2**2*x3**2*x4**2*x5**2 + x1**2 + x2**2 + 3*x3**2 + x4**2 + x5**2 + x1*x2*x3*x4*x5 + 5; x1**2*x2**2*x3**2*x4**2*x5**2 + x1**2 + x2**2 + x3**2 + 3*x4**2 + x5**2 + x1*x2*x3*x4*x5 + 5; x1**2*x2**2*x3**2*x4**2*x5**2 + x1**2 + x2**2 + x3**2 + x4**2 + 3*x5**2 + x1*x2*x3*x4*x5 + 5; TITLE : a 5-dimensional sparse symmetric polynomial system ROOT COUNTS : Total degree : 10000 5-homogeneous Bezout number : 3840 mixed volume : 160 REFERENCES : Jan Verschelde and Karin Gatermann: `Symmetric Newton Polytopes for Solving Sparse Polynomial Systems', Adv. Appl. Math., 16(1): 95-127, 1995. SYMMETRY GROUP : invariant under all permutations + sign symmetry, generated by -x1 -x2 x3 x4 x5 -x1 x2 -x3 x4 x5 -x1 x2 x3 -x4 x5 -x1 x2 x3 x4 -x5 THE GENERATING SOLUTIONS : 10 5 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : x1 : 5.23681844701480E-01 -1.16679253451397E+00 x2 : 5.23681844701480E-01 -1.16679253451397E+00 x3 : -5.23681844701480E-01 1.16679253451397E+00 x4 : 5.23681844701480E-01 -1.16679253451397E+00 x5 : 5.23681844701480E-01 -1.16679253451397E+00 == err : 3.555E-15 = rco : 6.219E-02 = res : 3.722E-15 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : x1 : 5.62945437488535E-01 -1.06731054777957E+00 x2 : 5.62945437488535E-01 -1.06731054777957E+00 x3 : -5.62945437488535E-01 1.06731054777957E+00 x4 : 5.62945437488535E-01 -1.06731054777957E+00 x5 : -5.62945437488535E-01 1.06731054777957E+00 == err : 2.585E-15 = rco : 7.123E-02 = res : 3.286E-15 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : x1 : -2.86768329351213E-02 8.27714843748319E-01 x2 : -2.86768329351213E-02 8.27714843748319E-01 x3 : 2.86768329351213E-02 -8.27714843748319E-01 x4 : 2.86768329351213E-02 -8.27714843748319E-01 x5 : -2.86768329351213E-02 8.27714843748319E-01 == err : 3.373E-16 = rco : 2.222E-01 = res : 4.450E-16 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : x1 : 2.86768329351213E-02 8.27714843748319E-01 x2 : 2.86768329351213E-02 8.27714843748319E-01 x3 : -2.86768329351213E-02 -8.27714843748319E-01 x4 : -2.86768329351213E-02 -8.27714843748319E-01 x5 : -2.86768329351213E-02 -8.27714843748319E-01 == err : 3.406E-16 = rco : 2.222E-01 = res : 4.441E-16 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : x1 : 5.23681844701480E-01 1.16679253451397E+00 x2 : -5.23681844701480E-01 -1.16679253451397E+00 x3 : 5.23681844701480E-01 1.16679253451397E+00 x4 : 5.23681844701480E-01 1.16679253451397E+00 x5 : 5.23681844701480E-01 1.16679253451397E+00 == err : 3.555E-15 = rco : 6.219E-02 = res : 3.722E-15 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : x1 : 1.23947841569073E+00 4.36197964162307E-01 x2 : -1.23947841569073E+00 -4.36197964162307E-01 x3 : 1.23947841569073E+00 4.36197964162307E-01 x4 : 1.23947841569073E+00 4.36197964162307E-01 x5 : 1.23947841569073E+00 4.36197964162307E-01 == err : 3.568E-15 = rco : 5.702E-02 = res : 1.601E-14 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : x1 : 1.22889165583880E+00 5.12364025922987E-01 x2 : -1.22889165583880E+00 -5.12364025922987E-01 x3 : -1.22889165583880E+00 -5.12364025922987E-01 x4 : -1.22889165583880E+00 -5.12364025922987E-01 x5 : -1.22889165583880E+00 -5.12364025922987E-01 == err : 5.297E-16 = rco : 4.594E-02 = res : 3.972E-15 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : x1 : 1.22889165583880E+00 -5.12364025922987E-01 x2 : -1.22889165583880E+00 5.12364025922987E-01 x3 : -1.22889165583880E+00 5.12364025922987E-01 x4 : -1.22889165583880E+00 5.12364025922987E-01 x5 : -1.22889165583880E+00 5.12364025922987E-01 == err : 5.297E-16 = rco : 4.594E-02 = res : 3.972E-15 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : x1 : -1.23947841569073E+00 4.36197964162307E-01 x2 : -1.23947841569073E+00 4.36197964162307E-01 x3 : -1.23947841569073E+00 4.36197964162307E-01 x4 : -1.23947841569073E+00 4.36197964162307E-01 x5 : -1.23947841569073E+00 4.36197964162307E-01 == err : 3.568E-15 = rco : 5.702E-02 = res : 1.601E-14 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 16 the solution for t : x1 : -5.62945437488535E-01 -1.06731054777957E+00 x2 : -5.62945437488535E-01 -1.06731054777957E+00 x3 : -5.62945437488535E-01 -1.06731054777957E+00 x4 : -5.62945437488535E-01 -1.06731054777957E+00 x5 : 5.62945437488535E-01 1.06731054777957E+00 == err : 2.585E-15 = rco : 7.123E-02 = res : 3.286E-15 == SHAR_EOF fi # end of overwriting check if test -f 'speer' then echo shar: will not over-write existing file "'speer'" else cat << "SHAR_EOF" > 'speer' 4 ( 6.57958984375000E-01-1.87652587890625E-01*i) * ( ( 9.37683105468750E-01 -2.88299560546875E-01*i) + 2*(x1+x2+x3+x4) - 8*x1 ) * ( x1*x2*x3*x4 - x1*x2 - x2*x3 - x3*x4 - x4*x1 ) - x2*x3*x4 + x2 + x4; ( 6.57958984375000E-01-1.87652587890625E-01*i) * ( ( 9.37683105468750E-01 -2.88299560546875E-01*i) + 2*(x1+x2+x3+x4) - 8*x3 ) * ( x1*x2*x3*x4 - x1*x2 - x2*x3 - x3*x4 - x4*x1) - x2*x1*x4 + x2 + x4; ( 6.57958984375000E-01-1.87652587890625E-01*i) * ( ( 9.37683105468750E-01 -2.88299560546875E-01*i) + 2*(x1+x2+x3+x4) - 8*x2 ) * ( x1*x2*x3*x4 - x1*x2 - x2*x3 - x3*x4 - x4*x1) - x1*x3*x4 + x1 + x3; ( 6.57958984375000E-01-1.87652587890625E-01*i) * ( ( 9.37683105468750E-01 -2.88299560546875E-01*i) + 2*(x1+x2+x3+x4) - 8*x4 ) * ( x1*x2*x3*x4 - x1*x2 - x2*x3 - x3*x4 - x4*x1) - x1*x3*x2 + x1 + x3; TITLE : the system of E.R. Speer ROOT COUNTS : total degree : 625 4-homogeneous Bezout number : 384 generalized Bezout bound based : 246 based on the set structure : {x1 }{x1 x2 }{x2 x3 }{x3 x4 }{x4 } {x1 }{x1 x2 }{x2 x3 }{x3 x4 }{x4 } {x1 }{x1 x2 }{x2 x3 }{x3 x4 }{x4 } {x1 }{x1 x2 }{x2 x3 }{x3 x4 }{x4 } but for the exploitation of the symmetry, it is better to use {x1}{x1 x2}{x2 x3}{x3 x4}{x4} {x2}{x2 x1}{x1 x4}{x4 x3}{x3} {x3}{x3 x4}{x4 x1}{x1 x2}{x2} {x4}{x4 x3}{x3 x2}{x2 x1}{x1} which yields 271 as bound. mixed volume : 96 GENERATORS OF SYMMETRY GROUP : x3 x4 x1 x2 x4 x3 x2 x1 REFERENCES : Karin Gatermann: `Symbolic solution of polynomial equation systems with symmetry', Proceedings of ISSAC-90, pp 112-119, ACM New York, 1990. NOTE : Choice of the parameters : 4*beta = ( 6.57958984375000E-01-1.87652587890625E-01*i)i n = ( 9.37683105468750E-01 -2.88299560546875E-01*i) The system has 43 regular solutions. Seven paths converged to highly singular solutions with zero components. THE SOLUTIONS : 50 4 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -2.22365256896053E-10 7.47398178725219E-11 x2 : -1.33112429012521E-02 -9.98039204301256E-03 x3 : 2.22365256896070E-10 -7.47398178725209E-11 x4 : 1.33112429012521E-02 9.98039204301256E-03 == err : 1.000E+00 = rco : 5.896E-20 = res : 0.000E+00 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.88409928346027E-02 2.41524955507384E-01 x2 : 1.75579783532585E-01 -3.13599845644102E-01 x3 : 5.88409928346027E-02 2.41524955507384E-01 x4 : 1.75579783532585E-01 -3.13599845644102E-01 == err : 4.806E-16 = rco : 3.017E-01 = res : 1.144E-16 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.75826273809235E-01 5.45586749459116E-01 x2 : 8.86966368821630E-01 -5.87125931506904E-01 x3 : -8.22575559231062E-01 5.12414777868540E-01 x4 : -7.83936565821678E-01 -5.18925522578564E-01 == err : 1.098E-15 = rco : 5.012E-02 = res : 1.790E-15 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 3.06479530995021E-01 -1.19866862894240E+00 x2 : 1.25336618459551E+00 1.23041494784966E+00 x3 : 1.76883866889522E+00 9.07275081877902E-01 x4 : 1.25336618459551E+00 1.23041494784966E+00 == err : 4.323E-15 = rco : 1.749E-02 = res : 1.432E-14 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.26943936240198E-01 3.08169578416341E-01 x2 : 6.26943936240198E-01 3.08169578416341E-01 x3 : 6.26943936240198E-01 3.08169578416341E-01 x4 : 6.26943936240198E-01 3.08169578416341E-01 == err : 6.861E-16 = rco : 9.468E-02 = res : 9.930E-16 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.51546756430090E-02 -4.26689081908710E-01 x2 : -7.01366366524981E-02 4.26762893600951E-01 x3 : -7.01366366524981E-02 4.26762893600951E-01 x4 : 4.51546756430090E-02 -4.26689081908710E-01 == err : 2.779E-16 = rco : 1.359E-01 = res : 6.939E-17 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.51546756430090E-02 -4.26689081908710E-01 x2 : 4.51546756430089E-02 -4.26689081908710E-01 x3 : -7.01366366524981E-02 4.26762893600951E-01 x4 : -7.01366366524980E-02 4.26762893600951E-01 == err : 4.499E-16 = rco : 1.466E-01 = res : 1.862E-16 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.09398116111961E+00 -1.09107979603420E+00 x2 : 1.06158569315323E+00 9.93192081607197E-01 x3 : 1.06158569315323E+00 9.93192081607196E-01 x4 : 1.09398116111960E+00 -1.09107979603420E+00 == err : 5.661E-15 = rco : 3.437E-02 = res : 8.882E-15 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.26855036536523E+00 -1.34971597178349E+00 x2 : 2.48797736688104E-01 1.11641559795454E+00 x3 : 1.26855036536524E+00 -1.34971597178349E+00 x4 : 1.73914836518560E+00 -1.01522585156644E+00 == err : 9.492E-15 = rco : 1.563E-02 = res : 2.775E-14 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.17775904946614E-11 -5.09506647057000E-11 x2 : 5.43920253549077E-02 4.06428640951655E-02 x3 : 3.17775904946459E-11 5.09506647057087E-11 x4 : -5.43920253549077E-02 -4.06428640951655E-02 == err : 1.000E+00 = rco : 4.091E-21 = res : 0.000E+00 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -8.22575559231061E-01 5.12414777868539E-01 x2 : 8.86966368821631E-01 -5.87125931506904E-01 x3 : 8.75826273809233E-01 5.45586749459116E-01 x4 : -7.83936565821679E-01 -5.18925522578564E-01 == err : 2.665E-15 = rco : 5.046E-02 = res : 4.783E-15 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.76103601993558E+00 9.14850601763719E-02 x2 : -1.76103601993558E+00 9.14850601763720E-02 x3 : -1.76103601993558E+00 9.14850601763719E-02 x4 : -1.76103601993558E+00 9.14850601763722E-02 == err : 4.678E-15 = rco : 3.265E-01 = res : 2.132E-14 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.51488682232112E-21 3.83129111314145E-20 x2 : -1.87848947990355E+02 -1.06129425619113E+03 x3 : -1.51488685736304E-21 -3.83129111257929E-20 x4 : 1.87848947990355E+02 1.06129425619113E+03 == err : 1.000E+00 = rco : 0.000E+00 = res : 0.000E+00 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -7.83936565821678E-01 -5.18925522578565E-01 x2 : 8.75826273809233E-01 5.45586749459117E-01 x3 : 8.86966368821631E-01 -5.87125931506903E-01 x4 : -8.22575559231062E-01 5.12414777868540E-01 == err : 1.760E-15 = rco : 5.138E-02 = res : 3.249E-15 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.25778351322786E-01 -2.05525781272223E+00 x2 : 1.08642425044402E-01 1.98318292258550E+00 x3 : 1.25778351322786E-01 -2.05525781272223E+00 x4 : 1.08642425044402E-01 1.98318292258550E+00 == err : 1.737E-14 = rco : 9.262E-03 = res : 2.842E-14 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.09398116111961E+00 -1.09107979603420E+00 x2 : 1.09398116111961E+00 -1.09107979603420E+00 x3 : 1.06158569315323E+00 9.93192081607195E-01 x4 : 1.06158569315323E+00 9.93192081607194E-01 == err : 1.962E-15 = rco : 4.462E-02 = res : 4.172E-15 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.86966368821630E-01 -5.87125931506904E-01 x2 : 8.75826273809235E-01 5.45586749459117E-01 x3 : -7.83936565821678E-01 -5.18925522578564E-01 x4 : -8.22575559231062E-01 5.12414777868540E-01 == err : 1.230E-15 = rco : 4.689E-02 = res : 2.701E-15 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.75579783532585E-01 -3.13599845644102E-01 x2 : 5.88409928346027E-02 2.41524955507384E-01 x3 : 1.75579783532585E-01 -3.13599845644102E-01 x4 : 5.88409928346027E-02 2.41524955507384E-01 == err : 4.714E-16 = rco : 2.950E-01 = res : 1.528E-16 == solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.75826273809235E-01 5.45586749459117E-01 x2 : -7.83936565821678E-01 -5.18925522578565E-01 x3 : -8.22575559231062E-01 5.12414777868540E-01 x4 : 8.86966368821631E-01 -5.87125931506905E-01 == err : 1.333E-15 = rco : 5.198E-02 = res : 2.589E-15 == solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.38347949520814E+00 4.11983223287053E-01 x2 : 2.38347949520814E+00 4.11983223287053E-01 x3 : 2.38347949520814E+00 4.11983223287053E-01 x4 : 2.38347949520813E+00 4.11983223287053E-01 == err : 6.024E-15 = rco : 7.448E-02 = res : 5.905E-14 == solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.56361653383626E+00 -7.75585851027062E-01 x2 : -9.95572021851750E-01 -1.19749191311902E+00 x3 : -3.85367778330764E-02 1.24595583981227E+00 x4 : -9.95572021851751E-01 -1.19749191311902E+00 == err : 5.237E-15 = rco : 2.147E-02 = res : 1.176E-14 == solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -8.47440442167999E-01 1.00747237204140E+00 x2 : -8.14302898360972E-01 -1.05380824958008E+00 x3 : -8.14302898360973E-01 -1.05380824958008E+00 x4 : -8.47440442167999E-01 1.00747237204140E+00 == err : 4.054E-15 = rco : 3.312E-02 = res : 6.061E-15 == solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -7.83936565821677E-01 -5.18925522578565E-01 x2 : -8.22575559231062E-01 5.12414777868539E-01 x3 : 8.86966368821631E-01 -5.87125931506903E-01 x4 : 8.75826273809234E-01 5.45586749459116E-01 == err : 8.584E-16 = rco : 5.181E-02 = res : 3.202E-15 == solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -8.47440442167999E-01 1.00747237204141E+00 x2 : -8.47440442168000E-01 1.00747237204141E+00 x3 : -8.14302898360975E-01 -1.05380824958007E+00 x4 : -8.14302898360974E-01 -1.05380824958007E+00 == err : 7.304E-15 = rco : 4.137E-02 = res : 9.155E-15 == solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.06158569315323E+00 9.93192081607199E-01 x2 : 1.06158569315323E+00 9.93192081607196E-01 x3 : 1.09398116111960E+00 -1.09107979603420E+00 x4 : 1.09398116111961E+00 -1.09107979603420E+00 == err : 5.660E-15 = rco : 4.458E-02 = res : 8.882E-15 == solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -7.01366366524980E-02 4.26762893600951E-01 x2 : -7.01366366524981E-02 4.26762893600951E-01 x3 : 4.51546756430089E-02 -4.26689081908710E-01 x4 : 4.51546756430090E-02 -4.26689081908710E-01 == err : 4.356E-16 = rco : 1.156E-01 = res : 2.250E-16 == solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.73914836518560E+00 -1.01522585156644E+00 x2 : 1.26855036536523E+00 -1.34971597178350E+00 x3 : 2.48797736688102E-01 1.11641559795454E+00 x4 : 1.26855036536523E+00 -1.34971597178350E+00 == err : 9.478E-15 = rco : 1.571E-02 = res : 1.638E-14 == solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.48797736688102E-01 1.11641559795454E+00 x2 : 1.26855036536523E+00 -1.34971597178350E+00 x3 : 1.73914836518560E+00 -1.01522585156644E+00 x4 : 1.26855036536523E+00 -1.34971597178350E+00 == err : 2.498E-15 = rco : 1.472E-02 = res : 1.005E-14 == solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.13034422644777E-02 -1.20729648340945E-02 x2 : -8.03488949077827E-12 2.71484765568664E-11 x3 : -6.13034422644777E-02 1.20729648340945E-02 x4 : 8.03488949077517E-12 -2.71484765568654E-11 == err : 1.000E+00 = rco : 1.667E-21 = res : 0.000E+00 == solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -8.14302898360974E-01 -1.05380824958008E+00 x2 : -8.14302898360974E-01 -1.05380824958008E+00 x3 : -8.47440442168000E-01 1.00747237204140E+00 x4 : -8.47440442168000E-01 1.00747237204140E+00 == err : 4.327E-15 = rco : 4.077E-02 = res : 4.870E-15 == solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -8.14302898360975E-01 -1.05380824958008E+00 x2 : -8.47440442168001E-01 1.00747237204140E+00 x3 : -8.47440442168001E-01 1.00747237204140E+00 x4 : -8.14302898360974E-01 -1.05380824958008E+00 == err : 4.741E-15 = rco : 3.151E-02 = res : 4.731E-15 == solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -5.62018357263108E-02 -1.30301652248078E+00 x2 : -1.05750297537461E+00 1.17264315677942E+00 x3 : -1.62350656647767E+00 7.82600700582907E-01 x4 : -1.05750297537461E+00 1.17264315677942E+00 == err : 5.215E-15 = rco : 1.969E-02 = res : 7.324E-15 == solution 33 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -8.22575559231062E-01 5.12414777868540E-01 x2 : -7.83936565821679E-01 -5.18925522578565E-01 x3 : 8.75826273809234E-01 5.45586749459117E-01 x4 : 8.86966368821631E-01 -5.87125931506904E-01 == err : 5.870E-16 = rco : 5.105E-02 = res : 3.397E-15 == solution 34 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -7.01366366524981E-02 4.26762893600951E-01 x2 : 4.51546756430089E-02 -4.26689081908710E-01 x3 : 4.51546756430090E-02 -4.26689081908710E-01 x4 : -7.01366366524980E-02 4.26762893600951E-01 == err : 3.129E-16 = rco : 1.357E-01 = res : 2.326E-16 == solution 35 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.37415624992767E-20 6.57192930499547E-22 x2 : 2.46692660367597E+03 4.48192347186842E+01 x3 : 3.37415625380012E-20 -6.57192774083644E-22 x4 : -2.46692660367597E+03 -4.48192347186842E+01 == err : 1.000E+00 = rco : 1.312E-31 = res : 0.000E+00 == solution 36 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.76883866889522E+00 9.07275081877905E-01 x2 : 1.25336618459551E+00 1.23041494784966E+00 x3 : 3.06479530995022E-01 -1.19866862894240E+00 x4 : 1.25336618459551E+00 1.23041494784966E+00 == err : 1.198E-14 = rco : 1.846E-02 = res : 2.543E-14 == solution 37 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -9.95572021851752E-01 -1.19749191311901E+00 x2 : -3.85367778330770E-02 1.24595583981227E+00 x3 : -9.95572021851752E-01 -1.19749191311901E+00 x4 : -1.56361653383626E+00 -7.75585851027062E-01 == err : 6.085E-15 = rco : 1.810E-02 = res : 1.834E-14 == solution 38 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 8.86966368821631E-01 -5.87125931506904E-01 x2 : -8.22575559231062E-01 5.12414777868540E-01 x3 : -7.83936565821678E-01 -5.18925522578565E-01 x4 : 8.75826273809235E-01 5.45586749459117E-01 == err : 5.601E-16 = rco : 7.863E-02 = res : 2.931E-15 == solution 39 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.62350656647767E+00 7.82600700582908E-01 x2 : -1.05750297537461E+00 1.17264315677942E+00 x3 : -5.62018357263107E-02 -1.30301652248078E+00 x4 : -1.05750297537461E+00 1.17264315677942E+00 == err : 7.491E-15 = rco : 2.189E-02 = res : 2.132E-14 == solution 40 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.43379482441545E-03 -2.06769035331036E-03 x2 : -4.29089399313291E-10 -8.73211991328274E-11 x3 : -1.43379482441545E-03 2.06769035331036E-03 x4 : 4.29089399313290E-10 8.73211991328262E-11 == err : 1.000E+00 = rco : 3.772E-19 = res : 0.000E+00 == solution 41 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -9.95572021851747E-01 -1.19749191311902E+00 x2 : -1.56361653383626E+00 -7.75585851027063E-01 x3 : -9.95572021851748E-01 -1.19749191311902E+00 x4 : -3.85367778330741E-02 1.24595583981227E+00 == err : 1.934E-15 = rco : 2.025E-02 = res : 1.354E-14 == solution 42 : t : 9.99999838890803E-01 0.00000000000000E+00 m : 1 the solution for t : x1 : -4.10495837961502E-19 -3.53082269351682E-17 x2 : 6.61800495474017E+01 -5.57662781784020E+01 x3 : 4.09142700423076E-19 3.53089242168906E-17 x4 : -6.61800495459465E+01 5.57662781777617E+01 == err : 1.000E+00 = rco : 1.956E-25 = res : 0.000E+00 == solution 43 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.25336618459551E+00 1.23041494784966E+00 x2 : 3.06479530995021E-01 -1.19866862894240E+00 x3 : 1.25336618459551E+00 1.23041494784966E+00 x4 : 1.76883866889522E+00 9.07275081877904E-01 == err : 7.276E-15 = rco : 1.795E-02 = res : 1.293E-14 == solution 44 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.85367778330728E-02 1.24595583981227E+00 x2 : -9.95572021851747E-01 -1.19749191311902E+00 x3 : -1.56361653383626E+00 -7.75585851027062E-01 x4 : -9.95572021851747E-01 -1.19749191311902E+00 == err : 3.090E-15 = rco : 1.821E-02 = res : 1.432E-14 == solution 45 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.26855036536524E+00 -1.34971597178350E+00 x2 : 1.73914836518560E+00 -1.01522585156644E+00 x3 : 1.26855036536524E+00 -1.34971597178350E+00 x4 : 2.48797736688105E-01 1.11641559795454E+00 == err : 8.594E-15 = rco : 1.752E-02 = res : 2.139E-14 == solution 46 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.25336618459551E+00 1.23041494784966E+00 x2 : 1.76883866889522E+00 9.07275081877902E-01 x3 : 1.25336618459551E+00 1.23041494784966E+00 x4 : 3.06479530995022E-01 -1.19866862894241E+00 == err : 7.625E-15 = rco : 2.135E-02 = res : 1.855E-14 == solution 47 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.05750297537462E+00 1.17264315677942E+00 x2 : -5.62018357263122E-02 -1.30301652248078E+00 x3 : -1.05750297537461E+00 1.17264315677942E+00 x4 : -1.62350656647767E+00 7.82600700582909E-01 == err : 6.416E-15 = rco : 1.993E-02 = res : 1.470E-14 == solution 48 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.05750297537462E+00 1.17264315677942E+00 x2 : -1.62350656647767E+00 7.82600700582906E-01 x3 : -1.05750297537461E+00 1.17264315677942E+00 x4 : -5.62018357263111E-02 -1.30301652248078E+00 == err : 5.446E-15 = rco : 2.138E-02 = res : 8.882E-15 == solution 49 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.08642425044401E-01 1.98318292258551E+00 x2 : 1.25778351322782E-01 -2.05525781272222E+00 x3 : 1.08642425044399E-01 1.98318292258550E+00 x4 : 1.25778351322784E-01 -2.05525781272222E+00 == err : 4.717E-15 = rco : 9.430E-03 = res : 2.842E-14 == solution 50 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.06158569315323E+00 9.93192081607198E-01 x2 : 1.09398116111961E+00 -1.09107979603420E+00 x3 : 1.09398116111961E+00 -1.09107979603420E+00 x4 : 1.06158569315323E+00 9.93192081607195E-01 == err : 5.459E-15 = rco : 3.305E-02 = res : 1.785E-14 == SHAR_EOF fi # end of overwriting check if test -f 'trinks' then echo shar: will not over-write existing file "'trinks'" else cat << "SHAR_EOF" > 'trinks' 6 45*y + 35*u - 165*v - 36; 35*y + 25*z + 40*t - 27*u; 25*y*u - 165*v**2 + 15*x - 18*z + 30*t; 15*y*z + 20*t*u - 9*x; -11*v**3 + x*y + 2*z*t; -11*u*v + 3*v**2 + 99*x; TITLE : system of Trinks from the PoSSo test suite ROOT COUNTS : total degree : 24 Bezout bound : 18 with set structure : {y u v } {y u z t } {y v z t x }{u v } {y u x }{z t } {y v z }{v t x }{v } {u v x }{v } mixed volume : 10 REFERENCES : see the PoSSo test suite. THE SOLUTIONS : 10 6 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -8.48565024801726E-01 -1.27713006996600E+00 u : 2.90791497560052E-01 -1.20716250315356E+00 v : -3.87925598190763E-01 -6.04372974296028E-01 z : 4.78484665321442E-01 -1.40654658428524E+00 t : 6.39725741728645E-01 1.18174573676988E+00 x : -8.70894865902957E-02 1.82955491621577E-02 == err : 3.969E-15 = rco : 1.353E-03 = res : 3.197E-14 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.96666666666667E-01 -6.85435790006783E-01 u : -7.80000000000000E-01 -9.94987437106620E-01 v : -3.30000000000000E-01 -3.97994974842648E-01 z : -9.22000000000000E-01 -9.81720937945198E-01 t : -1.22333333333333E-01 5.41715382424715E-01 x : -1.39000000000000E-02 6.30158710167526E-02 == err : 7.734E-16 = rco : 9.423E-04 = res : 6.405E-15 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -8.48565024801726E-01 1.27713006996600E+00 u : 2.90791497560052E-01 1.20716250315356E+00 v : -3.87925598190763E-01 6.04372974296028E-01 z : 4.78484665321442E-01 1.40654658428524E+00 t : 6.39725741728644E-01 -1.18174573676988E+00 x : -8.70894865902957E-02 -1.82955491621577E-02 == err : 3.451E-15 = rco : 1.353E-03 = res : 1.589E-14 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -2.94139058814790E-01 -4.81178473189385E-01 u : -5.27107740348486E-01 4.94314246398167E-01 v : -4.10212294296137E-01 -2.63759555732513E-02 z : -5.57139585398522E-01 5.83715843485288E-01 t : 2.49786192601790E-01 3.89870878181169E-01 x : 2.03956529409314E-02 -2.16413875357711E-02 == err : 6.168E-16 = rco : 9.228E-04 = res : 7.944E-15 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 1.96666666666667E-01 6.85435790006783E-01 u : -7.80000000000000E-01 9.94987437106620E-01 v : -3.30000000000000E-01 3.97994974842648E-01 z : -9.22000000000000E-01 9.81720937945198E-01 t : -1.22333333333333E-01 -5.41715382424715E-01 x : -1.39000000000000E-02 -6.30158710167526E-02 == err : 7.734E-16 = rco : 9.423E-04 = res : 6.405E-15 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.61445164854194E-01 -4.24736468635227E-01 u : 3.23321350174264E-01 -6.49660994944693E-01 v : -7.82952746997701E-02 -2.53644096434239E-01 z : 1.14631468249263E-01 -4.43787851136216E-01 t : -8.21672755355810E-02 2.10490645428291E-01 x : -1.93581189588659E-02 -4.66393563150483E-03 == err : 4.571E-16 = rco : 2.991E-04 = res : 5.024E-15 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -2.94139058814790E-01 4.81178473189385E-01 u : -5.27107740348486E-01 -4.94314246398167E-01 v : -4.10212294296137E-01 2.63759555732513E-02 z : -5.57139585398522E-01 -5.83715843485288E-01 t : 2.49786192601790E-01 -3.89870878181169E-01 x : 2.03956529409315E-02 2.16413875357711E-02 == err : 3.989E-16 = rco : 9.228E-04 = res : 7.324E-15 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.61445164854194E-01 4.24736468635227E-01 u : 3.23321350174264E-01 6.49660994944693E-01 v : -7.82952746997701E-02 2.53644096434239E-01 z : 1.14631468249263E-01 4.43787851136216E-01 t : -8.21672755355810E-02 -2.10490645428291E-01 x : -1.93581189588659E-02 4.66393563150483E-03 == err : 4.571E-16 = rco : 2.991E-04 = res : 5.024E-15 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : -3.31192652383078E+00 4.69962113784073E-57 u : -3.46692707885109E+00 5.57582168896358E-57 v : -1.85684328080105E+00 2.48920611114446E-57 z : -6.96457243121332E+00 1.38598996268523E-56 t : 4.91061769963577E+00 -9.00096929789836E-57 x : 6.10801432898409E-01 -1.91171029335894E-57 == err : 6.824E-15 = rco : 1.197E-03 = res : 5.684E-14 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : y : 2.76457235716270E-01 -5.34125685698989E-66 u : 3.55899880880022E-01 -2.37389193643995E-66 v : -6.72904761331338E-02 -2.37389193643995E-66 z : 4.40994174899312E-02 -6.49185933500251E-67 t : -2.92297975889288E-02 4.74778387287990E-66 x : -2.79817597349734E-03 -7.41841230137484E-68 == err : 3.240E-16 = rco : 2.168E-04 = res : 4.441E-16 == SHAR_EOF fi # end of overwriting check if test -f 'virasoro' then echo shar: will not over-write existing file "'virasoro'" else cat << "SHAR_EOF" > 'virasoro' 8 8*x1^2+ 8*x1*x2+ 8*x1*x3+ 2*x1*x4+ 2*x1*x5+ 2*x1*x6+ 2*x1*x7-8*x2*x3-2*x4*x7 -2*x5*x6-x1; 8*x1*x2-8*x1*x3+ 8*x2^2+ 8*x2*x3+ 2*x2*x4+ 2*x2*x5+ 2*x2*x6+ 2*x2*x7-2*x4*x6 -2*x5*x7-x2; -8*x1*x2+ 8*x1*x3+ 8*x2*x3+ 8*x3^2+ 2*x3*x4+ 2*x3*x5+ 2*x3*x6+ 2*x3*x7-2*x4* x5-2*x6*x7-x3; 2*x1*x4-2*x1*x7+ 2*x2*x4-2*x2*x6+ 2*x3*x4-2*x3*x5+ 8*x4^2+ 8*x4*x5+ 2*x4*x6+ 2*x4*x7+ 6*x4*x8-6*x5*x8-x4; 2*x1*x5-2*x1*x6+ 2*x2*x5-2*x2*x7-2*x3*x4+ 2*x3*x5+ 8*x4*x5-6*x4*x8+ 8*x5^2+ 2*x5*x6+ 2*x5*x7+ 6*x5*x8-x5; -2*x1*x5+ 2*x1*x6-2*x2*x4+ 2*x2*x6+ 2*x3*x6-2*x3*x7+ 2*x4*x6+ 2*x5*x6+ 8*x6^2 + 8*x6*x7+ 6*x6*x8-6*x7*x8-x6; -2*x1*x4+ 2*x1*x7-2*x2*x5+ 2*x2*x7-2*x3*x6+ 2*x3*x7+ 2*x4*x7+ 2*x5*x7+ 8*x6* x7-6*x6*x8+ 8*x7^2+ 6*x7*x8-x7; -6*x4*x5+ 6*x4*x8+ 6*x5*x8-6*x6*x7+ 6*x6*x8+ 6*x7*x8+ 8*x8^2-x8; TITLE : the construction of Virasoro algebras ROOT COUNTS : total degree : 256 generalized Bezout number : 256 based on the set structure : {x1 x3 x6 x7 }{x1 x2 x3 x4 x5 x6 x7 } {x1 x2 x6 x7 }{x2 x3 x4 x5 x6 x7 } {x1 x3 x5 x7 }{x2 x3 x4 x5 x6 x7 } {x1 x2 x3 x4 x8 }{x4 x5 x6 x7 x8 } {x1 x2 x3 x5 x8 }{x4 x5 x6 x7 x8 } {x1 x2 x3 x6 x8 }{x4 x5 x6 x7 x8 } {x1 x2 x3 x7 x8 }{x4 x5 x6 x7 x8 } {x4 x6 x8 }{x5 x7 x8 } mixed volume : 200 REFERENCES : Schrans, S. and Troost, W.: `Generalized Virasoro Constructions for SU(3)', Nuclear Phys. B, Vol. 345, No. 2--3, 1990, pp. 584--606. SYMMETRY : x1 x2 x3 x4 x5 x6 x7 x8 x2 x1 x3 x4 x5 x7 x6 x8 x1 x2 x3 x5 x4 x7 x6 x8 x2 x1 x3 x5 x4 x6 x7 x8 x1 x2 x3 x6 x7 x4 x5 x8 x2 x1 x3 x6 x7 x5 x4 x8 x1 x2 x3 x7 x6 x5 x4 x8 x2 x1 x3 x7 x6 x4 x5 x8 SYMMETRIC SET STRUCTURE : { x1 x2 x4 x5 x6 x7 } { x1 x3 x4 x5 x6 x7 } { x2 x1 x4 x5 x6 x7 } { x2 x3 x4 x5 x6 x7 } { x3 x1 x2 x4 x5 x6 x7 } { x3 x1 x2 x4 x5 x6 x7 } { x4 x1 x2 x3 x8 } { x4 x5 x6 x7 } { x5 x1 x2 x3 x8 } { x5 x4 x7 x6 } { x6 x1 x2 x3 x8 } { x6 x7 x4 x5 } { x7 x1 x2 x3 x8 } { x7 x6 x5 x4 } { x8 x4 x5 x6 x7 } { x8 x4 x5 x6 x7 } ------------------------------------------------ | orbit information of list of solutions | ------------------------------------------------ | TYPE | NB <> | NB GEN | NB SOLS | ------------------------------------------------ | 1 2 3 4 5 6 6 7 | 7 | 4 | 32 | | 1 2 3 4 4 4 5 6 | 6 | 4 | 32 | | 1 2 3 4 4 4 4 5 | 5 | 8 | 16 | | 1 1 2 3 4 5 5 6 | 6 | 20 | 80 | | 1 1 2 3 3 4 4 5 | 5 | 16 | 48 | | 1 1 2 3 3 3 4 5 | 5 | 8 | 32 | | 1 1 2 3 3 3 3 4 | 4 | 16 | 16 | ------------------------------------------------ | Total number of generating solutions : 76 | | Total number of solutions generated : 256 | ------------------------------------------------ THE GENERATING SOLUTIONS : 76 8 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.25000000000000E-02 0.00000000000000E+00 x2 : -1.25000000000000E-02 0.00000000000000E+00 x3 : 1.12500000000000E-01 0.00000000000000E+00 x4 : 5.00000000000000E-02 -2.20561949492296E-55 x5 : 5.00000000000000E-02 -5.65137976246300E-55 x6 : 5.00000000000000E-02 0.00000000000000E+00 x7 : 5.00000000000000E-02 0.00000000000000E+00 x8 : 5.00000000000000E-02 1.56607307231965E-53 == err : 7.589E-18 = rco : 2.635E-01 = res : 7.980E-18 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.00000000000000E-02 -1.42433516186397E-65 x2 : 5.00000000000000E-02 4.74778387287990E-66 x3 : 5.00000000000000E-02 -4.74778387287990E-66 x4 : 5.00000000000000E-02 -1.66172435550796E-65 x5 : 5.00000000000000E-02 7.59645419660784E-65 x6 : 5.00000000000000E-02 -1.51929083932157E-64 x7 : 5.00000000000000E-02 1.13946812949118E-64 x8 : -7.50000000000000E-02 0.00000000000000E+00 == err : 2.689E-17 = rco : 3.082E-01 = res : 1.388E-17 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : 5.00000000000000E-02 -1.11516433779272E-57 x2 : 5.00000000000000E-02 6.37236764452981E-58 x3 : -5.09615384615385E-02 3.18618382226490E-57 x4 : 5.00000000000000E-02 1.99136488891557E-58 x5 : 5.00000000000000E-02 3.61287334976893E-58 x6 : -4.40261467514519E-02 -5.62330058276822E-57 x7 : 1.90261467514519E-02 5.25720330673709E-57 x8 : 8.36538461538462E-02 -1.43378272001921E-57 == err : 4.549E-17 = rco : 7.693E-02 = res : 6.939E-18 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : -2.16840434497099E-19 1.63132611699963E-55 x2 : -2.16840434497098E-19 -1.63132611699963E-55 x3 : -7.21153846153846E-03 -7.56230941304486E-55 x4 : 6.25000000000000E-02 -2.07451226879080E-55 x5 : 6.25000000000000E-02 2.85482070474935E-55 x6 : -3.15261467514519E-02 5.87277402119867E-54 x7 : 3.15261467514519E-02 -6.03590663289864E-54 x8 : 6.49038461538462E-02 2.12072395209952E-54 == err : 4.949E-17 = rco : 8.817E-02 = res : 6.939E-18 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : x1 : 9.41662253455395E-35 -6.68191177523049E-52 x2 : 8.68173107743309E-34 1.33638235504610E-51 x3 : 1.03211738679125E-01 -2.00457353256915E-50 x4 : -6.06555085024300E-35 0.00000000000000E+00 x5 : -3.56409887169318E-35 6.68191177523049E-52 x6 : 6.25000000000000E-02 3.34095588761525E-52 x7 : 6.25000000000000E-02 1.50499458581891E-52 x8 : 7.19617386791248E-02 2.54543299191604E-52 == err : 1.713E-16 = rco : 1.967E-01 = res : 3.469E-18 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : x1 : 6.50395100180695E-33 -4.77927573339736E-58 x2 : 5.40595342749339E-32 5.57582168896358E-58 x3 : 1.03211738679125E-01 -6.96977711120448E-58 x4 : 6.25000000000000E-02 1.67274650668907E-57 x5 : 6.25000000000000E-02 -1.35412812446258E-57 x6 : -4.84003360681272E-33 -3.98272977783113E-59 x7 : -5.38632829755259E-33 -1.99136488891557E-59 x8 : -4.07117386791248E-02 -1.35128540351057E-58 == err : 1.685E-16 = rco : 4.551E-02 = res : 6.939E-18 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : -2.50000000000000E-02 1.46166820083167E-52 x2 : 2.17186805708301E-18 -2.29690717273548E-52 x3 : 1.00000000000000E-01 7.30834100415835E-53 x4 : 1.00000000000000E-01 -1.50343014942686E-51 x5 : -2.22072606808498E-17 1.67047794380762E-51 x6 : 1.00000000000000E-01 1.33638235504610E-51 x7 : 1.74613567881738E-17 -1.50343014942686E-51 x8 : -2.50000000000000E-02 -1.67047794380762E-52 == err : 2.710E-17 = rco : 2.463E-02 = res : 1.128E-17 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : -1.25000000000000E-02 -8.53150932668468E-51 x2 : 1.25000000000000E-02 1.00228676628457E-50 x3 : 1.12500000000000E-01 -2.30525956245452E-50 x4 : 5.00000000000000E-02 0.00000000000000E+00 x5 : -5.00000000000000E-02 6.41463530422127E-50 x6 : 5.00000000000000E-02 6.41463530422127E-50 x7 : -5.00000000000000E-02 -4.27642353614751E-50 x8 : 5.00000000000000E-02 1.10251544291303E-50 == err : 1.297E-17 = rco : 3.266E-02 = res : 1.388E-17 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : -1.25000000000000E-02 3.49436893043961E-63 x2 : -1.25000000000000E-02 -1.06350358752510E-63 x3 : 1.02003143396115E-01 -1.62629691818402E-63 x4 : 1.19337524528154E-01 -6.68487969301490E-63 x5 : -1.93375245281536E-02 -9.03978049396333E-63 x6 : 5.00000000000000E-02 -2.37009370934165E-62 x7 : 5.00000000000000E-02 3.09935331221600E-62 x8 : -2.98343811320384E-02 8.28013507430255E-63 == err : 3.746E-16 = rco : 3.893E-02 = res : 2.667E-17 == solution 10 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : -5.69879941673280E-52 -1.80411617931223E-50 x2 : 3.34095588761525E-52 1.80411617931223E-50 x3 : 1.14503143396115E-01 -6.68191177523049E-51 x4 : 6.93375245281537E-02 1.00228676628457E-51 x5 : -6.93375245281537E-02 -3.34095588761525E-52 x6 : -7.22742722875516E-51 7.55056030601045E-50 x7 : 7.22742722875516E-51 -7.48374118825815E-50 x8 : 4.51656188679616E-02 2.67276471009220E-51 == err : 2.057E-16 = rco : 3.826E-02 = res : 2.082E-17 == solution 11 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.00000000000000E-02 0.00000000000000E+00 x2 : 5.00000000000000E-02 0.00000000000000E+00 x3 : -7.50000000000000E-02 1.95759134039956E-54 x4 : 5.00000000000000E-02 -1.75367557577461E-54 x5 : 5.00000000000000E-02 -5.22024357439882E-54 x6 : 5.00000000000000E-02 -5.22024357439882E-54 x7 : 5.00000000000000E-02 2.61012178719941E-54 x8 : -7.50000000000000E-02 -2.61012178719941E-54 == err : 2.689E-17 = rco : 2.727E-01 = res : 2.082E-17 == solution 12 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 0.00000000000000E+00 8.79709548981352E-88 x2 : -6.28363963558107E-89 -8.79709548981352E-88 x3 : 1.25000000000000E-01 0.00000000000000E+00 x4 : 0.00000000000000E+00 0.00000000000000E+00 x5 : 0.00000000000000E+00 0.00000000000000E+00 x6 : 0.00000000000000E+00 0.00000000000000E+00 x7 : 0.00000000000000E+00 0.00000000000000E+00 x8 : 0.00000000000000E+00 0.00000000000000E+00 == err : 3.924E-44 = rco : 2.927E-01 = res : 8.820E-88 == solution 13 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -6.07230601530078E-79 0.00000000000000E+00 x2 : 3.37350334183377E-79 1.02608195375848E-116 x3 : 1.25000000000000E-01 8.15663058499816E-56 x4 : 2.49639247295699E-78 0.00000000000000E+00 x5 : 2.42892240612031E-78 0.00000000000000E+00 x6 : 1.95663193826359E-78 8.25326788892688E-117 x7 : -4.04820401020052E-79 0.00000000000000E+00 x8 : 1.25000000000000E-01 8.15663058499816E-56 == err : 4.592E-40 = rco : 3.889E-01 = res : 8.157E-56 == solution 14 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.00000000000000E-02 5.22024357439882E-54 x2 : 5.00000000000000E-02 6.52530446799853E-55 x3 : -7.50000000000000E-02 -3.26265223399926E-55 x4 : 5.00000000000000E-02 0.00000000000000E+00 x5 : 5.00000000000000E-02 -1.04404871487976E-53 x6 : 5.00000000000000E-02 0.00000000000000E+00 x7 : 5.00000000000000E-02 0.00000000000000E+00 x8 : 5.00000000000000E-02 3.91518268079911E-54 == err : 1.041E-17 = rco : 2.697E-01 = res : 9.714E-18 == solution 15 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : 6.25000000000000E-02 3.98272977783113E-59 x2 : 6.25000000000000E-02 -9.95682444457783E-59 x3 : 5.20031433961152E-02 3.98272977783113E-59 x4 : 4.31676718270679E-19 7.56718657787915E-58 x5 : -4.84036244000490E-18 -7.16891360009604E-58 x6 : -6.93375245281536E-02 3.40032587733493E-59 x7 : 6.93375245281536E-02 -1.99136488891557E-59 x8 : 4.51656188679616E-02 1.65106184451162E-59 == err : 6.124E-17 = rco : 4.188E-02 = res : 3.469E-18 == solution 16 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : 5.00000000000000E-02 -2.13821176807376E-50 x2 : 5.00000000000000E-02 -3.20731765211064E-50 x3 : -4.37500000000000E-02 2.94004118110142E-50 x4 : -1.25000000000000E-02 4.00914706513829E-51 x5 : -1.25000000000000E-02 0.00000000000000E+00 x6 : -1.25000000000000E-02 8.01829413027659E-51 x7 : 1.12500000000000E-01 4.00914706513829E-51 x8 : 1.87500000000000E-02 -1.40377513982835E-50 == err : 1.691E-17 = rco : 1.953E-01 = res : 5.638E-18 == solution 17 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : x1 : 1.80555932286300E-35 -2.67276471009220E-51 x2 : 1.80555932286300E-35 0.00000000000000E+00 x3 : -9.46173867912483E-03 2.67276471009220E-51 x4 : 6.25000000000000E-02 -2.67276471009220E-51 x5 : 6.25000000000000E-02 -2.67276471009220E-51 x6 : -2.69630192214213E-33 -4.16951294774383E-49 x7 : 2.58796836277035E-33 4.27642353614751E-49 x8 : 7.19617386791248E-02 7.90586005512443E-51 == err : 4.234E-17 = rco : 5.475E-02 = res : 3.469E-18 == solution 18 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : x1 : 3.36917177326146E-67 -2.24611451550764E-68 x2 : 5.93472984109987E-67 1.48368246027497E-67 x3 : -9.46173867912483E-03 0.00000000000000E+00 x4 : 6.25000000000000E-02 9.50932750040110E-67 x5 : 6.25000000000000E-02 -5.93472984109987E-67 x6 : -2.37389193643995E-66 5.93472984109987E-67 x7 : 0.00000000000000E+00 -3.12614893756093E-67 x8 : -4.07117386791248E-02 -7.78934199156135E-67 == err : 3.318E-17 = rco : 2.431E-01 = res : 3.469E-18 == solution 19 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : 3.75000000000000E-02 3.18618382226491E-58 x2 : -6.25000000000000E-02 -3.18618382226491E-58 x3 : 3.75000000000000E-02 1.59309191113245E-58 x4 : 1.00000000000000E-01 -1.11516433779272E-57 x5 : -4.98322386799634E-18 0.00000000000000E+00 x6 : 1.00000000000000E-01 6.37236764452981E-58 x7 : -3.92782743314660E-18 -1.59309191113245E-58 x8 : -2.50000000000000E-02 1.59309191113245E-58 == err : 2.194E-17 = rco : 8.968E-02 = res : 6.939E-18 == solution 20 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : 1.25000000000000E-02 2.65875896881274E-64 x2 : -1.25000000000000E-02 -3.79822709830392E-64 x3 : 1.25000000000000E-02 5.31751793762549E-64 x4 : -5.00000000000000E-02 -2.43086534291451E-63 x5 : 5.00000000000000E-02 3.34243984650745E-63 x6 : -5.00000000000000E-02 1.82314900718588E-63 x7 : 5.00000000000000E-02 -2.43086534291451E-63 x8 : 7.50000000000000E-02 -6.07716335728627E-64 == err : 7.459E-18 = rco : 3.955E-02 = res : 8.240E-18 == solution 21 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : 5.00000000000000E-02 1.83830061809396E-53 x2 : 5.00000000000000E-02 1.69657916167962E-53 x3 : 5.72115384615385E-02 -1.09625115062375E-52 x4 : 8.15261467514519E-02 1.41990625223648E-51 x5 : 1.84738532485481E-02 -1.50343014942686E-51 x6 : -1.25000000000000E-02 4.40458051589900E-54 x7 : -1.25000000000000E-02 9.78795670199779E-54 x8 : -1.49038461538462E-02 4.59381434547096E-52 == err : 4.958E-17 = rco : 8.817E-02 = res : 1.214E-17 == solution 22 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : -2.65875896881274E-64 1.89911354915196E-65 x2 : 2.65875896881274E-64 -1.89911354915196E-65 x3 : 1.04968566038848E-02 -1.36002805471735E-65 x4 : -6.93375245281536E-02 -2.08205196015392E-65 x5 : 6.93375245281536E-02 2.37389193643995E-65 x6 : 1.36736175538941E-63 -3.47679709332055E-65 x7 : -1.36736175538941E-63 5.69734064745588E-65 x8 : 7.98343811320384E-02 -5.69734064745588E-65 == err : 5.782E-17 = rco : 6.676E-02 = res : 3.036E-18 == solution 23 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 4.09091122108145E-92 -1.63636448843258E-91 x2 : 4.14536090644533E-75 2.21085915010418E-75 x3 : 4.09091122108145E-92 -1.63636448843258E-91 x4 : -1.09090965895505E-91 8.70040595733137E-55 x5 : 0.00000000000000E+00 -2.61012178719941E-54 x6 : -1.09090965895505E-91 8.70040595733137E-55 x7 : 0.00000000000000E+00 -2.61012178719941E-54 x8 : 1.25000000000000E-01 1.30506089359970E-54 == err : 4.847E-38 = rco : 3.199E-01 = res : 1.740E-54 == solution 24 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 0.00000000000000E+00 0.00000000000000E+00 x2 : 0.00000000000000E+00 0.00000000000000E+00 x3 : 0.00000000000000E+00 0.00000000000000E+00 x4 : 0.00000000000000E+00 0.00000000000000E+00 x5 : 0.00000000000000E+00 0.00000000000000E+00 x6 : 0.00000000000000E+00 0.00000000000000E+00 x7 : 0.00000000000000E+00 0.00000000000000E+00 x8 : 0.00000000000000E+00 0.00000000000000E+00 == err : 0.000E+00 = rco : 1.000E+00 = res : 0.000E+00 == solution 25 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : x1 : 5.00000000000000E-02 1.89179664446979E-58 x2 : -7.50000000000000E-02 3.98272977783113E-58 x3 : 5.00000000000000E-02 1.09525068890356E-58 x4 : 5.00000000000000E-02 -3.18618382226490E-57 x5 : 5.00000000000000E-02 -2.54894705781192E-57 x6 : 5.00000000000000E-02 6.37236764452981E-58 x7 : 5.00000000000000E-02 3.18618382226490E-57 x8 : -7.50000000000000E-02 2.62860165336855E-57 == err : 2.689E-17 = rco : 2.576E-01 = res : 1.388E-17 == solution 26 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : x1 : -6.25000000000000E-02 -1.63132611699963E-55 x2 : 6.25000000000000E-02 -4.07831529249908E-56 x3 : 6.25000000000000E-02 0.00000000000000E+00 x4 : -3.72874541028487E-55 -5.47889895680550E-93 x5 : 2.61012178719941E-54 0.00000000000000E+00 x6 : 0.00000000000000E+00 8.34829626992462E-77 x7 : 2.61012178719941E-54 -8.34829626992462E-77 x8 : 1.25000000000000E-01 1.63132611699963E-55 == err : 1.185E-38 = rco : 2.176E-01 = res : 3.639E-54 == solution 27 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 8 the solution for t : x1 : 5.00000000000000E-02 9.36979021910309E-02 x2 : 5.00000000000000E-02 -9.36979021910309E-02 x3 : 1.09375000000000E-01 -1.19660096012905E-17 x4 : 4.99999999999999E-02 -1.96253980851345E-01 x5 : 5.00000000000000E-02 1.96253980851345E-01 x6 : 1.90408538509349E-01 -3.84086840852990E-17 x7 : -2.15408538509349E-01 3.58516680124820E-17 x8 : 2.83766198545515E-17 1.71926826689891E-17 == err : 2.852E-16 = rco : 8.929E-03 = res : 1.528E-16 == solution 28 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 8 the solution for t : x1 : 2.46385698621358E-17 9.36979021910309E-02 x2 : 1.40125758504151E-18 -9.36979021910309E-02 x3 : -5.93750000000000E-02 1.50184827928554E-17 x4 : -3.65430975184500E-17 -1.96253980851345E-01 x5 : 3.45489973730669E-17 1.96253980851345E-01 x6 : -1.40408538509349E-01 2.69178866777704E-17 x7 : 2.65408538509349E-01 -3.34280621371992E-17 x8 : 5.00000000000000E-02 -2.54215991345194E-18 == err : 2.472E-16 = rco : 8.929E-03 = res : 6.283E-17 == solution 29 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : -6.33673867912483E-03 -3.91518268079912E-54 x2 : 1.06336738679125E-01 -3.09951962229930E-54 x3 : 3.12500000000000E-03 4.40214791914558E-54 x4 : 5.00000000000000E-02 -1.63132611699963E-55 x5 : 5.00000000000000E-02 3.26265223399926E-55 x6 : -1.25000000000000E-02 1.63132611699963E-55 x7 : -1.25000000000000E-02 6.03320212957789E-55 x8 : -2.19617386791248E-02 -2.44698917549945E-55 == err : 1.884E-16 = rco : 1.357E-01 = res : 7.264E-18 == solution 30 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : -5.63367386791248E-02 -8.35238971903811E-53 x2 : 5.63367386791248E-02 1.67047794380762E-52 x3 : 4.68750000000000E-02 -1.67047794380762E-52 x4 : 9.78101081696150E-19 -1.25285845785572E-52 x5 : -4.51647637815127E-19 1.01987178685095E-52 x6 : 6.25000000000000E-02 -8.35238971903811E-53 x7 : 6.25000000000000E-02 1.04404871487976E-53 x8 : 7.19617386791248E-02 0.00000000000000E+00 == err : 4.210E-17 = rco : 1.332E-01 = res : 3.697E-18 == solution 31 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : 1.00000000000000E-01 -1.67047794380762E-52 x2 : -1.25039789028809E-18 0.00000000000000E+00 x3 : -2.50000000000000E-02 -1.67047794380762E-52 x4 : 1.00000000000000E-01 2.36429632079167E-52 x5 : 5.47191045700141E-18 0.00000000000000E+00 x6 : 1.00000000000000E-01 -3.34095588761525E-52 x7 : -5.75000555115954E-18 7.51715074713430E-52 x8 : -2.50000000000000E-02 -3.34095588761525E-52 == err : 1.489E-17 = rco : 1.277E-01 = res : 5.204E-18 == solution 32 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : -5.00000000000000E-02 -2.85482070474935E-54 x2 : 5.00000000000000E-02 3.58891745739919E-54 x3 : 7.50000000000000E-02 -3.91518268079912E-54 x4 : 5.00000000000000E-02 -1.82708525103959E-53 x5 : -5.00000000000000E-02 1.82708525103959E-53 x6 : 5.00000000000000E-02 2.99424810881167E-54 x7 : -5.00000000000000E-02 0.00000000000000E+00 x8 : 7.50000000000000E-02 9.01307679642296E-54 == err : 1.353E-17 = rco : 1.277E-01 = res : 1.388E-17 == solution 33 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : 1.00000000000000E-01 5.72517405563225E-59 x2 : -8.55968860983371E-36 -1.99136488891557E-59 x3 : -8.55968860983372E-36 -5.47625344451780E-59 x4 : 1.00000000000000E-01 9.95682444457783E-60 x5 : -2.31111593452025E-34 0.00000000000000E+00 x6 : 2.56790659281526E-34 3.98272977783113E-59 x7 : 1.00000000000000E-01 0.00000000000000E+00 x8 : 7.70371974885035E-35 0.00000000000000E+00 == err : 6.939E-18 = rco : 1.200E-01 = res : 6.939E-18 == solution 34 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : -5.00000000000000E-02 -5.09391138584602E-57 x2 : 5.00000000000000E-02 1.91171029335894E-57 x3 : 5.00000000000000E-02 6.37236764452981E-57 x4 : 5.00000000000000E-02 -2.29405235203073E-56 x5 : -5.00000000000000E-02 5.09789411562385E-57 x6 : -5.00000000000000E-02 -3.11250332137503E-56 x7 : 5.00000000000000E-02 2.03915764624954E-56 x8 : 5.00000000000000E-02 -5.09789411562385E-57 == err : 1.457E-17 = rco : 1.012E-01 = res : 1.041E-17 == solution 35 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 8 the solution for t : x1 : -5.00000000000000E-02 0.00000000000000E+00 x2 : 5.00000000000000E-02 0.00000000000000E+00 x3 : 4.37500000000000E-02 -5.34552942018439E-51 x4 : 1.12500000000000E-01 6.41463530422127E-50 x5 : 1.25000000000000E-02 0.00000000000000E+00 x6 : -1.25000000000000E-02 2.67276471009220E-51 x7 : 1.25000000000000E-02 7.35010295275354E-51 x8 : -1.87500000000000E-02 -3.20731765211064E-50 == err : 1.084E-17 = rco : 1.378E-01 = res : 1.908E-17 == solution 36 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 8 the solution for t : x1 : -5.00000000000000E-02 0.00000000000000E+00 x2 : 5.00000000000000E-02 9.28603632813875E-63 x3 : 5.00000000000000E-02 0.00000000000000E+00 x4 : 5.00000000000000E-02 0.00000000000000E+00 x5 : -5.00000000000000E-02 -2.43086534291451E-63 x6 : 7.50000000000000E-02 2.43086534291451E-63 x7 : 5.00000000000000E-02 -6.07716335728627E-63 x8 : 5.00000000000000E-02 4.86173068582902E-63 == err : 1.045E-17 = rco : 1.618E-01 = res : 1.214E-17 == solution 37 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : x1 : 1.12500000000000E-01 -5.13772141340216E-56 x2 : -1.25000000000000E-02 -1.27447352890596E-56 x3 : -1.25000000000000E-02 -6.11747293874862E-56 x4 : 5.00000000000000E-02 6.52530446799852E-55 x5 : 5.00000000000000E-02 8.15663058499816E-56 x6 : 5.00000000000000E-02 1.52936823468715E-55 x7 : 5.00000000000000E-02 -1.83524188162459E-55 x8 : -7.50000000000000E-02 -4.89397835099889E-55 == err : 2.689E-17 = rco : 2.176E-01 = res : 1.388E-17 == solution 38 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : x1 : -6.25000000000000E-02 -4.97841222228891E-60 x2 : 6.25000000000000E-02 4.97841222228891E-60 x3 : 6.25000000000000E-02 1.42240349208255E-60 x4 : 1.42240349208255E-60 -1.42240349208255E-60 x5 : -4.97841222228891E-60 -9.95682444457783E-60 x6 : -4.97841222228891E-60 0.00000000000000E+00 x7 : 0.00000000000000E+00 0.00000000000000E+00 x8 : 7.23875286018941E-86 -2.41291762006314E-86 == err : 1.268E-43 = rco : 3.274E-01 = res : 9.575E-60 == solution 39 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : x1 : -1.25000000000000E-02 0.00000000000000E+00 x2 : 1.12500000000000E-01 3.82342058671789E-57 x3 : -1.25000000000000E-02 -6.37236764452981E-57 x4 : 5.00000000000000E-02 -2.91308235178506E-57 x5 : 5.00000000000000E-02 5.09789411562385E-57 x6 : 5.00000000000000E-02 -4.16328019442614E-57 x7 : 5.00000000000000E-02 5.09789411562385E-57 x8 : 5.00000000000000E-02 9.55855146679472E-58 == err : 7.806E-18 = rco : 3.274E-01 = res : 7.980E-18 == solution 40 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : x1 : -7.50000000000000E-02 0.00000000000000E+00 x2 : 5.00000000000000E-02 -2.61012178719941E-54 x3 : 5.00000000000000E-02 1.95759134039956E-54 x4 : 5.00000000000000E-02 -1.04404871487976E-53 x5 : 5.00000000000000E-02 0.00000000000000E+00 x6 : 5.00000000000000E-02 2.08809742975953E-53 x7 : 5.00000000000000E-02 3.91518268079912E-54 x8 : 5.00000000000000E-02 6.26429228927858E-53 == err : 8.674E-18 = rco : 2.667E-01 = res : 7.980E-18 == solution 41 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 8 the solution for t : x1 : 6.05688839631642E-18 -4.89397835099889E-55 x2 : 1.00000000000000E-01 9.78795670199779E-55 x3 : 6.25000000000000E-03 -3.26265223399926E-55 x4 : 3.75000000000000E-02 -6.11747293874862E-55 x5 : 6.25000000000000E-02 1.63132611699963E-55 x6 : -6.25000000000000E-02 0.00000000000000E+00 x7 : 3.75000000000000E-02 6.52530446799852E-55 x8 : 6.87500000000000E-02 -1.14192828189974E-54 == err : 2.440E-17 = rco : 1.210E-01 = res : 1.236E-17 == solution 42 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 8 the solution for t : x1 : -7.03085406470469E-18 -9.36979021910310E-02 x2 : 5.52653552517866E-17 9.36979021910310E-02 x3 : 1.53125000000000E-01 -4.02221130501150E-17 x4 : 6.25000000000001E-02 1.96253980851345E-01 x5 : 6.25000000000000E-02 -1.96253980851345E-01 x6 : 2.02908538509349E-01 -7.36608760480691E-17 x7 : -2.02908538509349E-01 6.81975294348483E-17 x8 : -1.87500000000000E-02 3.07570128866565E-17 == err : 2.418E-16 = rco : 9.096E-03 = res : 1.320E-16 == solution 43 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : -6.33673867912484E-03 7.08282648174432E-50 x2 : 1.06336738679125E-01 1.01565058983503E-49 x3 : 3.12500000000000E-03 -5.61280589119361E-50 x4 : 5.00000000000000E-02 -3.31502799051724E-50 x5 : 5.00000000000000E-02 -1.93775441481684E-50 x6 : -1.25000000000000E-02 -2.95337957211306E-50 x7 : -1.25000000000000E-02 0.00000000000000E+00 x8 : 9.07117386791248E-02 3.34095588761524E-50 == err : 1.927E-16 = rco : 1.512E-01 = res : 6.939E-18 == solution 44 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : 5.63367386791248E-02 1.91171029335894E-57 x2 : -5.63367386791248E-02 -2.54894705781192E-57 x3 : 4.68750000000000E-02 1.27447352890596E-57 x4 : 6.25000000000000E-02 -7.96545955566226E-58 x5 : 6.25000000000000E-02 7.96545955566226E-58 x6 : -4.08689689809300E-21 -3.18618382226491E-58 x7 : 2.61695190033332E-18 -1.99136488891557E-58 x8 : -4.07117386791248E-02 -1.59309191113245E-58 == err : 3.655E-17 = rco : 1.346E-01 = res : 6.939E-18 == solution 45 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : 5.00000000000000E-02 -6.26429228927858E-53 x2 : 7.50000000000000E-02 1.25285845785572E-52 x3 : 5.00000000000000E-02 -1.67047794380762E-52 x4 : 5.00000000000000E-02 -9.18762869094192E-52 x5 : -5.00000000000000E-02 1.02316774058217E-51 x6 : 5.00000000000000E-02 7.93477023308621E-52 x7 : -5.00000000000000E-02 -1.02316774058217E-51 x8 : 5.00000000000000E-02 2.08809742975953E-52 == err : 8.465E-17 = rco : 2.181E-02 = res : 1.388E-17 == solution 46 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : 1.25000000000000E-02 1.04404871487976E-53 x2 : 1.12500000000000E-01 0.00000000000000E+00 x3 : 1.25000000000000E-02 -2.08809742975953E-53 x4 : 5.00000000000000E-02 -2.08809742975953E-53 x5 : -5.00000000000000E-02 6.26429228927858E-53 x6 : 5.00000000000000E-02 8.35238971903811E-53 x7 : -5.00000000000000E-02 -6.26429228927858E-53 x8 : 7.50000000000000E-02 -4.17619485951906E-53 == err : 1.344E-17 = rco : 9.085E-02 = res : 1.388E-17 == solution 47 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : 3.75000000000000E-02 -3.11150763893057E-59 x2 : -6.25000000000000E-02 1.99136488891557E-59 x3 : 6.25000000000000E-02 -5.75628913202156E-60 x4 : 1.00000000000000E-01 3.48488855560224E-59 x5 : 4.10615870326590E-18 -1.59309191113245E-58 x6 : -3.65604400531437E-18 1.59309191113245E-58 x7 : 1.00000000000000E-01 -7.96545955566226E-59 x8 : 1.35034409385458E-18 5.97409466674670E-59 == err : 7.373E-18 = rco : 9.325E-02 = res : 6.939E-18 == solution 48 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : 5.00000000000000E-02 0.00000000000000E+00 x2 : 7.50000000000000E-02 4.07831529249908E-56 x3 : -5.00000000000000E-02 -8.15663058499816E-56 x4 : 5.00000000000000E-02 8.15663058499816E-55 x5 : -5.00000000000000E-02 -6.52530446799852E-55 x6 : -5.00000000000000E-02 7.34096752649834E-55 x7 : 5.00000000000000E-02 -8.15663058499816E-55 x8 : 7.50000000000000E-02 4.07831529249908E-56 == err : 1.804E-17 = rco : 2.628E-02 = res : 2.082E-17 == solution 49 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 8 the solution for t : x1 : 1.00000000000000E-01 -2.54894705781192E-56 x2 : -2.03915764624954E-56 -1.52936823468715E-56 x3 : 7.13705176187339E-56 1.78426294046835E-56 x4 : 1.00000000000000E-01 2.03915764624954E-56 x5 : -1.01957882312477E-56 -7.64684117343577E-57 x6 : 1.01957882312477E-56 0.00000000000000E+00 x7 : -2.50000000000000E-02 -3.84964015386621E-57 x8 : -1.52936823468715E-56 -5.09789411562385E-57 == err : 5.204E-18 = rco : 1.619E-01 = res : 3.469E-18 == solution 50 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 8 the solution for t : x1 : 5.00000000000000E-02 -9.36979021910308E-02 x2 : 5.00000000000000E-02 9.36979021910308E-02 x3 : -1.03125000000000E-01 -3.12839761632453E-17 x4 : 2.52908538509349E-01 4.17224368666313E-17 x5 : -1.52908538509349E-01 -4.68625397252667E-17 x6 : -1.24999999999999E-02 -1.96253980851345E-01 x7 : -1.25000000000000E-02 1.96253980851345E-01 x8 : 6.87500000000000E-02 1.77229729028103E-17 == err : 4.137E-16 = rco : 9.156E-03 = res : 1.314E-16 == solution 51 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : x1 : 0.00000000000000E+00 0.00000000000000E+00 x2 : 1.25000000000000E-01 0.00000000000000E+00 x3 : 0.00000000000000E+00 0.00000000000000E+00 x4 : 1.47390610006945E-74 7.36953050034727E-75 x5 : 0.00000000000000E+00 2.94781220013891E-75 x6 : 0.00000000000000E+00 0.00000000000000E+00 x7 : 0.00000000000000E+00 0.00000000000000E+00 x8 : 1.25000000000000E-01 0.00000000000000E+00 == err : 6.650E-38 = rco : 2.333E-01 = res : 1.349E-74 == solution 52 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : x1 : 0.00000000000000E+00 -1.55575381946529E-61 x2 : 1.25000000000000E-01 -3.11150763893057E-61 x3 : 6.87273085141685E-90 -1.96363738611911E-90 x4 : 0.00000000000000E+00 -1.03090962771252E-89 x5 : -1.20272789899793E-89 -1.03716921297686E-61 x6 : 0.00000000000000E+00 3.48545636036138E-89 x7 : 7.14273099200816E-89 3.11150763893057E-61 x8 : 1.63344351410361E-132 -2.35636486334291E-89 == err : 2.803E-45 = rco : 2.667E-01 = res : 4.149E-61 == solution 53 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.25000000000000E-02 1.89911354915196E-65 x2 : -1.25000000000000E-02 0.00000000000000E+00 x3 : -1.25000000000000E-02 1.89911354915196E-65 x4 : 5.00000000000000E-02 -2.27893625898235E-64 x5 : 5.00000000000000E-02 -1.51929083932157E-64 x6 : 5.00000000000000E-02 7.59645419660784E-65 x7 : 5.00000000000000E-02 6.66831856066510E-65 x8 : 5.00000000000000E-02 7.59645419660784E-65 == err : 6.939E-18 = rco : 4.483E-01 = res : 7.980E-18 == solution 54 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 5.00000000000000E-02 5.87277402119867E-54 x2 : 5.00000000000000E-02 1.04404871487976E-53 x3 : 5.00000000000000E-02 -3.91518268079911E-54 x4 : 5.00000000000000E-02 4.40458051589900E-54 x5 : 5.00000000000000E-02 -1.04404871487976E-53 x6 : 5.00000000000000E-02 -2.44698917549945E-54 x7 : 5.00000000000000E-02 -1.79445872869959E-54 x8 : 5.00000000000000E-02 -6.26429228927858E-53 == err : 6.939E-18 = rco : 1.000E+00 = res : 9.714E-18 == solution 55 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : 5.00000000000000E-02 -1.87093529706454E-50 x2 : 5.00000000000000E-02 1.62036360549339E-50 x3 : -6.45031433961153E-02 5.72138695754111E-51 x4 : 5.00000000000000E-02 -6.78214045185895E-50 x5 : 5.00000000000000E-02 7.21646471724893E-50 x6 : 1.19337524528154E-01 -3.34095588761525E-52 x7 : -1.93375245281536E-02 -4.00914706513829E-51 x8 : 4.83438113203841E-03 -5.34552942018439E-51 == err : 3.562E-16 = rco : 3.868E-02 = res : 2.168E-17 == solution 56 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : 5.00000000000000E-02 -7.93477023308621E-52 x2 : 5.00000000000000E-02 -3.63328952778158E-51 x3 : 3.95031433961152E-02 7.09953126118240E-52 x4 : 5.00000000000000E-02 -1.67047794380762E-51 x5 : 5.00000000000000E-02 6.34781618646896E-51 x6 : 1.19337524528154E-01 -8.04266690157216E-52 x7 : -1.93375245281536E-02 1.15262978122726E-50 x8 : -2.98343811320384E-02 -1.20274411954149E-50 == err : 3.567E-16 = rco : 4.316E-02 = res : 1.214E-17 == solution 57 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : x1 : 5.00000000000000E-02 7.64684117343577E-57 x2 : 5.00000000000000E-02 1.52936823468715E-56 x3 : 5.94617386791248E-02 0.00000000000000E+00 x4 : 5.00000000000000E-02 2.03915764624954E-55 x5 : 5.00000000000000E-02 -2.19209446971825E-55 x6 : -1.25000000000000E-02 2.54894705781192E-57 x7 : -1.25000000000000E-02 -6.37236764452981E-57 x8 : -2.19617386791248E-02 5.09789411562385E-57 == err : 3.524E-17 = rco : 5.475E-02 = res : 3.469E-18 == solution 58 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : x1 : 5.00000000000000E-02 -1.22349458774972E-55 x2 : 5.00000000000000E-02 2.03915764624954E-56 x3 : -5.32117386791248E-02 -2.03915764624954E-56 x4 : -1.25000000000000E-02 2.28385656379948E-54 x5 : -1.25000000000000E-02 -2.32463971672447E-54 x6 : 5.00000000000000E-02 3.05873646937431E-56 x7 : 5.00000000000000E-02 3.05873646937431E-56 x8 : 9.07117386791248E-02 -1.01957882312477E-56 == err : 6.062E-17 = rco : 4.551E-02 = res : 1.388E-17 == solution 59 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : 2.54894705781192E-57 0.00000000000000E+00 x2 : -2.50000000000000E-02 0.00000000000000E+00 x3 : 0.00000000000000E+00 -3.82342058671789E-57 x4 : 1.00000000000000E-01 -3.78447834000131E-56 x5 : 1.01957882312477E-56 1.01957882312477E-56 x6 : 1.00000000000000E-01 4.07831529249908E-56 x7 : -1.52936823468715E-56 -2.03915764624954E-56 x8 : -1.72053926402305E-57 6.88215705609219E-57 == err : 1.041E-17 = rco : 2.181E-02 = res : 3.469E-18 == solution 60 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : 3.75000000000000E-02 -8.09137754031817E-53 x2 : 6.25000000000000E-02 7.30834100415835E-53 x3 : 3.75000000000000E-02 -5.22024357439882E-53 x4 : 1.00000000000000E-01 -5.42905331737477E-52 x5 : -9.06337504611844E-18 6.68191177523049E-52 x6 : 1.00000000000000E-01 6.68191177523049E-52 x7 : 1.64269789090424E-18 -7.51715074713430E-52 x8 : -2.50000000000000E-02 -2.08809742975953E-53 == err : 1.440E-17 = rco : 3.605E-02 = res : 1.041E-17 == solution 61 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : -1.25000000000000E-02 8.21438016677671E-59 x2 : -1.25000000000000E-02 -8.83668169456282E-59 x3 : -2.00314339611523E-03 4.82283684034239E-60 x4 : 1.19337524528154E-01 3.11150763893057E-60 x5 : -1.93375245281536E-02 -4.66726145839586E-60 x6 : 5.00000000000000E-02 3.28575206671068E-58 x7 : 5.00000000000000E-02 -3.33553618893357E-58 x8 : 4.83438113203841E-03 -5.28956298618197E-60 == err : 3.480E-16 = rco : 4.088E-02 = res : 5.204E-18 == solution 62 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : 8.03579522620406E-33 9.14613085271584E-62 x2 : 1.12989946402170E-31 -1.06958075088238E-61 x3 : 1.00961538461538E-01 3.26222129019127E-60 x4 : 9.40261467514520E-02 -2.27140057641932E-59 x5 : 3.09738532485481E-02 2.33363072919793E-59 x6 : 1.47846298308834E-34 -8.50802870020078E-63 x7 : 6.42361299510939E-36 -1.20023976306404E-62 x8 : -3.36538461538462E-02 -1.04235505904174E-59 == err : 4.533E-16 = rco : 7.848E-02 = res : 1.561E-17 == solution 63 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.25000000000000E-02 1.95759134039956E-54 x2 : -1.25000000000000E-02 7.64684117343576E-55 x3 : -1.25000000000000E-02 1.30506089359970E-54 x4 : 5.00000000000000E-02 2.61012178719941E-54 x5 : 5.00000000000000E-02 5.22024357439882E-54 x6 : 5.00000000000000E-02 -2.87419270238873E-54 x7 : 5.00000000000000E-02 -1.04404871487976E-53 x8 : -7.50000000000000E-02 -1.04404871487976E-53 == err : 2.689E-17 = rco : 2.399E-01 = res : 1.388E-17 == solution 64 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.25000000000000E-02 0.00000000000000E+00 x2 : 6.25000000000000E-02 0.00000000000000E+00 x3 : 6.25000000000000E-02 0.00000000000000E+00 x4 : 3.98272977783113E-60 0.00000000000000E+00 x5 : 9.95682444457783E-60 0.00000000000000E+00 x6 : 6.40081571437146E-60 0.00000000000000E+00 x7 : -2.98704733337335E-59 0.00000000000000E+00 x8 : -1.78591779887855E-102 0.00000000000000E+00 == err : 8.968E-44 = rco : 4.483E-01 = res : 1.613E-59 == solution 65 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.25000000000000E-02 2.98704733337335E-59 x2 : -1.25000000000000E-02 6.47193588897559E-59 x3 : 1.12500000000000E-01 -1.99136488891557E-59 x4 : 5.00000000000000E-02 -1.59309191113245E-58 x5 : 5.00000000000000E-02 -1.11516433779272E-57 x6 : 5.00000000000000E-02 0.00000000000000E+00 x7 : 5.00000000000000E-02 9.55855146679472E-58 x8 : -7.50000000000000E-02 2.38963786669868E-58 == err : 2.689E-17 = rco : 2.121E-01 = res : 1.388E-17 == solution 66 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.25000000000000E-02 6.07716335728627E-63 x2 : 6.25000000000000E-02 6.68487969301490E-63 x3 : -6.25000000000000E-02 -7.29259602874353E-63 x4 : 0.00000000000000E+00 -9.72346137165803E-63 x5 : 7.77876909732643E-62 -1.45851920574871E-62 x6 : 0.00000000000000E+00 4.86173068582902E-63 x7 : 1.94469227433161E-62 -1.94469227433161E-62 x8 : 1.25000000000000E-01 -7.29259602874353E-63 == err : 8.769E-46 = rco : 2.613E-01 = res : 8.153E-62 == solution 67 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : -7.70371977754894E-34 1.27447352890596E-57 x2 : -3.85185988877447E-34 -1.27447352890596E-57 x3 : 9.37500000000000E-02 -1.27447352890596E-57 x4 : 6.25000000000000E-02 -6.37236764452981E-58 x5 : 6.25000000000000E-02 0.00000000000000E+00 x6 : 6.25000000000000E-02 2.54894705781192E-57 x7 : -6.25000000000000E-02 1.27447352890596E-57 x8 : 3.12500000000000E-02 -6.37236764452981E-58 == err : 3.253E-18 = rco : 1.953E-01 = res : 8.667E-34 == solution 68 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : 5.00000000000000E-02 1.06910588403688E-50 x2 : 5.00000000000000E-02 8.01829413027659E-51 x3 : 5.00000000000000E-02 -1.60365882605532E-50 x4 : 5.00000000000000E-02 -3.07745787862178E-51 x5 : 5.00000000000000E-02 2.67276471009220E-51 x6 : -7.50000000000000E-02 -6.68191177523049E-52 x7 : 5.00000000000000E-02 -4.00914706513829E-51 x8 : 5.00000000000000E-02 4.00914706513829E-51 == err : 1.140E-17 = rco : 2.410E-01 = res : 6.939E-18 == solution 69 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : x1 : 5.00000000000000E-02 5.34552942018439E-50 x2 : 5.00000000000000E-02 6.41463530422127E-50 x3 : 5.94617386791248E-02 -6.41463530422127E-50 x4 : 5.00000000000000E-02 -2.00457353256915E-50 x5 : 5.00000000000000E-02 -2.13821176807376E-50 x6 : -1.25000000000000E-02 0.00000000000000E+00 x7 : -1.25000000000000E-02 -1.87093529706454E-50 x8 : 9.07117386791248E-02 3.74187059412907E-50 == err : 6.061E-17 = rco : 2.431E-01 = res : 1.214E-17 == solution 70 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 2 the solution for t : x1 : 5.00000000000000E-02 1.89911354915196E-64 x2 : 5.00000000000000E-02 -3.03858167864314E-64 x3 : -5.32117386791248E-02 0.00000000000000E+00 x4 : -1.25000000000000E-02 0.00000000000000E+00 x5 : -1.25000000000000E-02 1.89911354915196E-65 x6 : 5.00000000000000E-02 -1.89911354915196E-65 x7 : 5.00000000000000E-02 -3.79822709830392E-65 x8 : -2.19617386791248E-02 1.41743028561297E-64 == err : 4.210E-17 = rco : 1.727E-01 = res : 1.388E-17 == solution 71 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : 6.25000000000000E-02 6.78631664671847E-53 x2 : 3.75000000000000E-02 -7.56935318287829E-53 x3 : -6.25000000000000E-02 3.91518268079912E-54 x4 : 1.00000000000000E-01 1.67047794380762E-52 x5 : 2.85788547043062E-17 -1.46166820083167E-52 x6 : 1.00000000000000E-01 -4.17619485951906E-53 x7 : -2.74404104157819E-17 4.17619485951906E-53 x8 : 3.41533286557293E-18 -2.08809742975953E-53 == err : 2.602E-17 = rco : 3.266E-02 = res : 1.388E-17 == solution 72 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : 1.12500000000000E-01 -7.13705176187339E-56 x2 : 1.25000000000000E-02 2.03915764624954E-56 x3 : -1.25000000000000E-02 5.09789411562385E-56 x4 : 5.00000000000000E-02 4.07831529249908E-56 x5 : -5.00000000000000E-02 -5.09789411562385E-57 x6 : 5.00000000000000E-02 -4.07831529249908E-56 x7 : -5.00000000000000E-02 2.03915764624954E-56 x8 : 5.00000000000000E-02 1.01957882312477E-56 == err : 1.683E-17 = rco : 9.144E-02 = res : 1.388E-17 == solution 73 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : 0.00000000000000E+00 -2.54894705781192E-57 x2 : -2.03915764624954E-56 0.00000000000000E+00 x3 : -6.79719215416513E-57 -1.27447352890596E-57 x4 : 1.25000000000000E-01 7.64684117343577E-57 x5 : 2.03915764624954E-56 2.54894705781192E-57 x6 : 1.01957882312477E-56 -5.09789411562385E-57 x7 : 5.09789411562385E-57 5.09789411562385E-57 x8 : -1.52936823468715E-56 -2.54894705781192E-57 == err : 1.616E-40 = rco : 2.446E-01 = res : 1.336E-56 == solution 74 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 4 the solution for t : x1 : 6.25000000000000E-02 6.26429228927858E-53 x2 : 6.25000000000000E-02 1.00228676628457E-51 x3 : -5.20031433961152E-02 -4.17619485951906E-52 x4 : 6.93375245281536E-02 -2.92333640166334E-51 x5 : -6.93375245281536E-02 -1.67047794380762E-51 x6 : 1.50259986170648E-18 1.25285845785572E-52 x7 : 1.70878377792039E-18 1.33638235504610E-51 x8 : 7.98343811320384E-02 2.33866912133067E-51 == err : 6.665E-17 = rco : 3.893E-02 = res : 1.388E-17 == solution 75 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.25000000000000E-02 1.21543267145725E-63 x2 : 6.25000000000000E-02 0.00000000000000E+00 x3 : 6.25000000000000E-02 1.21543267145725E-63 x4 : 0.00000000000000E+00 0.00000000000000E+00 x5 : 9.72346137165803E-63 3.54501195841699E-64 x6 : 4.86173068582902E-63 -1.21543267145725E-63 x7 : 2.71777592913021E-108 -7.59645419660784E-64 x8 : 1.25000000000000E-01 -1.51929083932157E-64 == err : 6.569E-47 = rco : 2.031E-01 = res : 1.102E-62 == solution 76 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 6.25000000000000E-02 -3.11150763893057E-61 x2 : 6.25000000000000E-02 -6.22301527786114E-61 x3 : -6.25000000000000E-02 6.22301527786114E-61 x4 : -2.90755820785393E-104 -4.59317794318322E-61 x5 : -3.87568966770518E-104 -7.26018449083800E-61 x6 : 0.00000000000000E+00 1.24460305557223E-60 x7 : -1.94469227433161E-61 1.24460305557223E-60 x8 : -7.54036756269726E-88 -3.77018378134864E-88 == err : 1.253E-44 = rco : 2.635E-01 = res : 8.035E-61 == SHAR_EOF fi # end of overwriting check if test -f 'wood' then echo shar: will not over-write existing file "'wood'" else cat << "SHAR_EOF" > 'wood' 4 200*x1^3-200*x1*x2+x1-1; -100*x1^2+ 1.10100000000000E+02*x2+ 9.90000000000000E+00*x4-20; 180*x3^3-180*x3*x4+x3-1; -90*x3^2+ 9.90000000000000E+00*x2+ 1.00100000000000E+02*x4-20; TITLE : system derived from optimizing the Wood function ROOT COUNTS : total degree : 36 3-homogeneous Bezout bound : 25 with partition : {x1 }{x2 x4 }{x3 } mixed volume : 9 REFERENCES : J.J. More, B.S. Garbow, K.E. Hillstrom: `Testing unconstrained optimization software.' Trans. Math. Software, Vol 7(1): 17-41, 1981. ( 10(x2-x1^2) ) ( 1-x1 ) G(x)= ( 3sqrt(10)(x4-x3^2) ) ( 1-x3 ) ( sqrt(10)(x2+x4-2) ) ((x2-x4)/sqrt(10) ) H(x):=DG^T(x).G(x) THE SOLUTIONS : 9 4 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.57355835612328E+00 2.84257851022096E-01 x2 : 2.39720627801032E+00 8.95148500287229E-01 x4 : -4.44855937693470E-01 -9.18847124013184E-01 x3 : -5.36397657592245E-01 8.60831364613137E-01 == err : 1.088E-13 = rco : 1.745E-04 = res : 9.484E-14 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -3.12510233943360E-02 2.14850736960187E-66 x2 : 1.65971386855783E-01 0.00000000000000E+00 x4 : 1.84263934696728E-01 -4.15431088876991E-66 x3 : -3.12581710232641E-02 4.74778387287990E-65 == err : 4.342E-16 = rco : 3.022E-01 = res : 2.442E-15 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -9.67974024937616E-01 1.03469743815115E-42 x2 : 9.47139140817886E-01 -2.00167411741164E-42 x4 : 9.51247665792282E-01 2.00247055853101E-42 x3 : -9.69516310331569E-01 -1.03464885797978E-42 == err : 1.716E-13 = rco : 1.054E-04 = res : 1.821E-14 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.57355835612330E+00 -2.84257851022089E-01 x2 : 2.39720627801038E+00 -8.95148500287217E-01 x4 : -4.44855937693522E-01 9.18847124013173E-01 x3 : -5.36397657592227E-01 -8.60831364613156E-01 == err : 5.759E-14 = rco : 1.745E-04 = res : 2.045E-13 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -5.36404369479206E-01 -8.60529486984931E-01 x2 : -4.45172990299157E-01 9.18999078613650E-01 x4 : 2.39751628227483E+00 -8.95297290755507E-01 x3 : 1.57359281312329E+00 -2.84279273572161E-01 == err : 9.315E-14 = rco : 2.029E-04 = res : 1.271E-13 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 1.00000000000000E+00 -5.10349482937392E-57 x2 : 1.00000000000000E+00 -1.00501696737457E-56 x4 : 1.00000000000000E+00 1.00862631623573E-56 x3 : 1.00000000000000E+00 5.03441935978966E-57 == err : 2.934E-14 = rco : 5.987E-04 = res : 5.684E-14 == solution 7 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.03754146247809E+00 3.63159940802936E-01 x2 : 9.53900262105836E-01 -7.52084316235798E-01 x4 : 9.53161163420767E-01 7.52099393811562E-01 x3 : -1.03680791485365E+00 -3.63506283821887E-01 == err : 1.181E-13 = rco : 8.755E-05 = res : 6.355E-14 == solution 8 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -5.36404369479216E-01 8.60529486984926E-01 x2 : -4.45172990299139E-01 -9.18999078613661E-01 x4 : 2.39751628227481E+00 8.95297290755519E-01 x3 : 1.57359281312328E+00 2.84279273572166E-01 == err : 1.002E-13 = rco : 2.029E-04 = res : 1.608E-13 == solution 9 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -1.03754146247810E+00 -3.63159940802918E-01 x2 : 9.53900262105873E-01 7.52084316235769E-01 x4 : 9.53161163420728E-01 -7.52099393811532E-01 x3 : -1.03680791485363E+00 3.63506283821881E-01 == err : 1.549E-13 = rco : 8.755E-05 = res : 4.711E-14 == SHAR_EOF fi # end of overwriting check if test -f 'wright' then echo shar: will not over-write existing file "'wright'" else cat << "SHAR_EOF" > 'wright' 5 x1^2-x1+x2+x3+x4+x5-10; x2^2+x1-x2+x3+x4+x5-10; x3^2+x1+x2-x3+x4+x5-10; x4^2+x1+x2+x3-x4+x5-10; x5^2+x1+x2+x3+x4-x5-10; TITLE : system of A.H. Wright ROOT COUNTS : total degree : 32 mixed volume : 32 REFERENCES : M. Kojima and S. Mizuno: `Computation of all solutions to a system of polynomial equations' Math. Programming, vol 25, pp 131-157, 1983. A.H. Wright: `Finding all solutions to a system of polynomial equations' Math. Comp., vol 44, pp 125-133, 1985. W. Zulehner: `A simple homotopy method for determining all isolated solutions to polynomial systems' Math. Comp., vol 50, no 161, pp 167-177, 1988. THE GENERATING SOLUTIONS : 6 5 =========================================================== solution 1 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 10 the solution for t : x1 : 3.00000000000000E+00 0.00000000000000E+00 x2 : 3.00000000000000E+00 7.59645419660784E-65 x3 : -1.00000000000000E+00 -7.59645419660784E-65 x4 : 3.00000000000000E+00 -6.07716335728627E-64 x5 : -1.00000000000000E+00 0.00000000000000E+00 == err : 2.737E-48 = rco : 3.111E-01 = res : 3.039E-63 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 5 the solution for t : x1 : 2.37228132326901E+00 -1.10542957505209E-74 x2 : 2.37228132326901E+00 -6.63257745031253E-75 x3 : -3.72281323269014E-01 -7.25438158627933E-76 x4 : 2.37228132326901E+00 -3.59264611891929E-75 x5 : 2.37228132326901E+00 2.10031619259897E-74 == err : 4.524E-15 = rco : 3.334E-01 = res : 5.664E-74 == solution 3 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 10 the solution for t : x1 : 4.00000000000000E+00 4.34083096949019E-65 x2 : 4.00000000000000E+00 0.00000000000000E+00 x3 : -2.00000000000000E+00 -7.59645419660784E-65 x4 : -2.00000000000000E+00 -5.90835326402832E-65 x5 : -2.00000000000000E+00 -6.07716335728627E-64 == err : 2.737E-48 = rco : 2.727E-01 = res : 2.947E-63 == solution 4 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 5 the solution for t : x1 : 5.37228132326901E+00 9.33452291679171E-61 x2 : -3.37228132326902E+00 -1.08902767362570E-60 x3 : -3.37228132326901E+00 -1.08902767362570E-60 x4 : -3.37228132326901E+00 -9.33452291679171E-61 x5 : -3.37228132326901E+00 -1.01123998265244E-60 == err : 4.771E-15 = rco : 3.456E-01 = res : 1.776E-15 == solution 5 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : 2.00000000000000E+00 5.93472984109987E-67 x2 : 2.00000000000000E+00 -5.93472984109987E-67 x3 : 2.00000000000000E+00 0.00000000000000E+00 x4 : 2.00000000000000E+00 -5.29886592955346E-68 x5 : 2.00000000000000E+00 -5.29886592955346E-68 == err : 2.673E-51 = rco : 2.881E-01 = res : 1.293E-66 == solution 6 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : x1 : -5.00000000000000E+00 4.06888611498885E-27 x2 : -5.00000000000000E+00 4.06888611498885E-27 x3 : -5.00000000000000E+00 2.13018155431769E-26 x4 : -5.00000000000000E+00 1.93870456067116E-26 x5 : -5.00000000000000E+00 0.00000000000000E+00 == err : 1.371E-09 = rco : 4.667E-01 = res : 2.068E-25 == SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'GNAT' then mkdir 'GNAT' fi cd 'GNAT' if test ! -d 'Continuation' then mkdir 'Continuation' fi cd 'Continuation' if test -f 'bablpoco.adb' then echo shar: will not over-write existing file "'bablpoco.adb'" else cat << "SHAR_EOF" > 'bablpoco.adb' with text_io; use text_io; with Communications_with_User; use Communications_with_User; with Black_Box_Polynomial_Continuations; use Black_Box_Polynomial_Continuations; procedure bablpoco ( infilename,outfilename : in string ) is infile,outfile : file_type; poco : duration; begin if infilename /= "" then Open_Input_File(infile,infilename); else new_line; put_line("Reading the name of the input file."); Read_Name_and_Open_File(infile); end if; Create_Output_File(outfile,outfilename); Black_Box_Polynomial_Continuation(infile,outfile,poco); Close(infile); Close(outfile); end bablpoco; SHAR_EOF fi # end of overwriting check if test -f 'bablpoco.ads' then echo shar: will not over-write existing file "'bablpoco.ads'" else cat << "SHAR_EOF" > 'bablpoco.ads' procedure bablpoco ( infilename,outfilename : in string ); -- DESCRIPTION : -- This is the polynomial continuation routine, to run in batch -- processing mode or as a black box routine. -- The arguments are the respective names of the input and output files. SHAR_EOF fi # end of overwriting check if test -f 'black_box_polynomial_continuations.adb' then echo shar: will not over-write existing file "'black_box_polynomial_continuations.adb'" else cat << "SHAR_EOF" > 'black_box_polynomial_continuations.adb' with integer_io; use integer_io; with File_Operations; use File_Operations; with Communications_with_User; use Communications_with_User; with Timing_Package; use Timing_Package; with Floating_Point_Numbers; use Floating_Point_Numbers; with Float_Vectors_of_Vectors; with Complex_Numbers,Complex_Norms; use Complex_Numbers,Complex_Norms; with Complex_Vectors; with Complex_Numbers_io; use Complex_Numbers_io; with Random_Number_Generators; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Solutions_io; use Solutions_io; with Scaling; use Scaling; with Projective_Transformations; use Projective_Transformations; with Continuation_Parameters; with Continuation_Parameters_io; with Homotopy,Process_io; use Process_io; with Increment_and_Fix_Continuation; use Increment_and_Fix_Continuation; with Root_Refiners; use Root_Refiners; with Scanners_for_Continuation; use Scanners_for_Continuation; package body Black_Box_Polynomial_Continuations is procedure Scan_Input ( infile,outfile : in file_type; p,q : in out Link_to_Poly_Sys; sols : in out Solution_List; arti : out boolean ) is -- DESCRIPTION : -- Scans the input file for target system and, if the homotopy is -- artificial (in that case arti = true, otherwise arti = false), -- for a start system. In both cases, start solutions are required. found,artificial : boolean; begin get(infile,p); put(outfile,p.all); artificial := (Number_of_Unknowns(p(p'first)) = p'last); if artificial then Scan_and_Skip(infile,"START SYSTEM",found); if found then get(infile,q); new_line(outfile); put_line(outfile,"THE START SYSTEM : "); new_line(outfile); put_line(outfile,q.all); end if; end if; Scan_and_Skip(infile,"SOLUTIONS",found); if found then get(infile,sols); new_line(outfile); put_line(outfile,"THE START SOLUTIONS : "); new_line(outfile); put(outfile,Length_Of(sols),Head_Of(sols).n,sols); new_line(outfile); end if; arti := artificial; end Scan_Input; procedure Set_Homotopy_Parameters ( file : in file_type; k : in out natural; a,t : in out double_complex; prt : in out boolean ) is -- DESCRIPTION : -- Sets the default values for the homotopy parameters. begin k := 2; a := Random_Number_Generators.Random1; t := CMPLX(1.0); prt := false; new_line(file); put_line(file,"HOMOTOPY PARAMETERS :"); put(file," k : "); put(file,k,2); new_line(file); put(file," a : "); put(file,a); new_line(file); put(file," t : "); put(file,t); new_line(file); if prt then put_line(file," projective transformation"); else put_line(file," no projective transformation"); end if; end Set_Homotopy_Parameters; procedure Tune_Continuation_Parameters ( infile,outfile : in file_type ) is -- DESCRIPTION : -- Scans the input file for continuation parameters and the -- output parameter. begin Continuation_Parameters.Tune(2); new_line(outfile); put_line(outfile,"****************** CURRENT CONTINUATION PARAMETERS " & "*****************"); Continuation_Parameters_io.put(outfile); put_line(outfile,"***************************************************" & "*****************"); Process_io.Set_Output_Code(nil); end Tune_Continuation_Parameters; procedure Black_Box_Refine ( outfile : in file_type; p : in Poly_Sys; artificial : in boolean; target : in double_complex; k : in natural; sols,refsols : in out Solution_List ) is -- DESCRIPTION : -- Refines the roots in sols w.r.t. the system p. epsxa,epsfa : constant double_float := 10.0**(-8); tolsing : constant double_float := 10.0**(-8); len,nb : natural := 0; begin if Length_Of(sols) > 0 then if artificial then if not Is_Null(sols) and then Head_Of(sols).n > p'last then Affine_Transformation(sols); end if; Reporting_Root_Refiner (outfile,p,sols,refsols,epsxa,epsfa,tolsing,nb,5,false); else declare pt : Poly_Sys(p'range); begin pt := Eval(p,target,k); Reporting_Root_Refiner (outfile,pt,sols,refsols,epsxa,epsfa,tolsing,nb,5,false); Clear(pt); end; end if; end if; end Black_Box_Refine; procedure Black_Box_Polynomial_Continuation ( infile,outfile : in file_type; pocotime : out duration ) is p,q,sp : Link_to_Poly_Sys; sols,refsols : Solution_List; timer : timing_widget; k : natural := 0; a,target : double_complex; proj,artificial : boolean; rcond : double_float; scalecoeff : Complex_Vectors.Link_to_Vector; procedure Cont is new Reporting_Continue(Norm1,Homotopy.Eval,Homotopy.Diff,Homotopy.Diff); begin Scan_Input(infile,outfile,p,q,sols,artificial); scalecoeff := new Complex_Vectors.Vector(1..2*p'length); sp := new Poly_Sys(p'range); Copy(p.all,sp.all); Scale(sp.all,2,false,rcond,scalecoeff.all); Set_Homotopy_Parameters(outfile,k,a,target,proj); if artificial then Homotopy.Create(sp.all,q.all,k,a); else Homotopy.Create(sp.all,k); target := a; end if; Tune_Continuation_Parameters(infile,outfile); new_line(outfile); put_line(outfile,"THE SCALED SOLUTIONS :"); new_line(outfile); tstart(timer); Cont(outfile,sols,proj,target); tstop(timer); new_line(outfile); print_times(outfile,timer,"continuation"); pocotime := Elapsed_User_Time(timer); Scale(2,scalecoeff.all,sols); Clear(sp); Black_Box_Refine(outfile,p.all,artificial,target,k,sols,refsols); end Black_Box_Polynomial_Continuation; procedure Black_Box_Polynomial_Continuation ( infile,outfile : in file_type; p,q : in Poly_Sys; sols : in out Solution_List; pocotime : out duration ) is refsols : Solution_List; timer : timing_widget; k : natural := 0; a,target : double_complex := CMPLX(0.0); proj : boolean; rcond : double_float; scalecoeff : Complex_Vectors.Vector(1..2*p'length); sp : Poly_Sys(p'range); procedure Cont is new Reporting_Continue(Norm1,Homotopy.Eval,Homotopy.Diff,Homotopy.Diff); begin Set_Homotopy_Parameters(outfile,k,a,target,proj); Copy(p,sp); Scale(sp,2,false,rcond,scalecoeff); Homotopy.Create(sp,q,k,a); Tune_Continuation_Parameters(infile,outfile); new_line(outfile); put_line(outfile,"THE SCALED SOLUTIONS :"); new_line(outfile); tstart(timer); Cont(outfile,sols,proj,target); tstop(timer); new_line(outfile); print_times(outfile,timer,"continuation"); pocotime := Elapsed_User_Time(timer); Scale(2,scalecoeff,sols); Clear(sp); Black_Box_Refine(outfile,p,true,target,k,sols,refsols); sols := refsols; end Black_Box_Polynomial_Continuation; end Black_Box_Polynomial_Continuations; SHAR_EOF fi # end of overwriting check if test -f 'black_box_polynomial_continuations.ads' then echo shar: will not over-write existing file "'black_box_polynomial_continuations.ads'" else cat << "SHAR_EOF" > 'black_box_polynomial_continuations.ads' with text_io; use text_io; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Solutions; use Solutions; package Black_Box_Polynomial_Continuations is -- DESCRIPTION : -- This package provides two procedure for performing polynomial -- continuation in batch processing mode. They mainly differ by the fact -- that the homotopy might be already provided in the input parameter. procedure Black_Box_Polynomial_Continuation ( infile,outfile : in file_type; pocotime : out duration ); procedure Black_Box_Polynomial_Continuation ( infile,outfile : in file_type; p,q : in Poly_Sys; sols : in out Solution_List; pocotime : out duration ); -- DESCRIPTION : -- Performs polynomial continuation with default settings. -- REQUIRED : -- Both files must be opened respectively for input and output. -- ON ENTRY : -- infile the input file; -- outfile file to write the results on; -- p target polynomial system; -- q a start system for solving p; -- sols the solutions of q. -- ON RETURN : -- sols the solutions of p; -- pocotime elapsed user cpu time for polyhedral continuation. end Black_Box_Polynomial_Continuations; SHAR_EOF fi # end of overwriting check if test -f 'continuation_data.adb' then echo shar: will not over-write existing file "'continuation_data.adb'" else cat << "SHAR_EOF" > 'continuation_data.adb' package body Continuation_Data is -- AUXILIARY : procedure Append ( first,last : in out Solution_List; ls : in Link_to_Solution ) is begin if Is_Null(first) then Construct(ls,first); last := first; else declare tmp : Solution_List; begin Construct(ls,tmp); Swap_Tail(last,tmp); last := Tail_Of(last); end; end if; end Append; -- CREATORS : function Shallow_Create ( s : Link_to_Solution ) return Solu_Info is res : Solu_Info; begin res.sol := s; Init_Info(res); return res; end Shallow_Create; function Deep_Create ( s : Solution ) return Solu_Info is res : Solu_Info; begin res.sol := new Solution'(s); Init_Info(res); return res; end Deep_Create; function Shallow_Create ( s : Solution_Array ) return Solu_Info_Array is res : Solu_Info_Array(s'range); begin for k in res'range loop res(k) := Shallow_Create(s(k)); end loop; return res; end Shallow_Create; function Deep_Create ( s : Solution_Array ) return Solu_Info_Array is res : Solu_Info_Array(s'range); begin for k in res'range loop res(k) := Deep_Create(s(k).all); end loop; return res; end Deep_Create; function Shallow_Create ( s : Solution_List ) return Solu_Info_Array is res : Solu_Info_Array(1..Length_Of(s)); tmp : Solution_List := s; begin for k in res'range loop res(k) := Shallow_Create(Head_Of(tmp)); tmp := Tail_Of(tmp); end loop; return res; end Shallow_Create; function Deep_Create ( s : Solution_List ) return Solu_Info_Array is res : Solu_Info_Array(1..Length_Of(s)); tmp : Solution_List := s; begin for k in res'range loop res(k) := Deep_Create(Head_Of(tmp).all); tmp := Tail_Of(tmp); end loop; return res; end Deep_Create; function Shallow_Create ( s : Solu_Info ) return Link_to_Solution is begin s.sol.err := s.cora; s.sol.rco := s.rcond; s.sol.res := s.resa; return s.sol; end Shallow_Create; function Deep_Create ( s : Solu_Info ) return Solution is begin s.sol.err := s.cora; s.sol.rco := s.rcond; s.sol.res := s.resa; return s.sol.all; end Deep_Create; function Shallow_Create ( s : Solu_Info_Array ) return Solution_Array is res : Solution_Array(s'range); begin for k in s'range loop res(k) := Shallow_Create(s(k)); end loop; return res; end Shallow_Create; function Deep_Create ( s : Solu_Info_Array ) return Solution_Array is res : Solution_Array(s'range); begin for k in s'range loop res(k) := new Solution'(Deep_Create(s(k))); end loop; return res; end Deep_Create; function Shallow_Create ( s : Solu_Info_Array ) return Solution_List is res,res_last : Solution_List; begin for k in s'range loop Append(res,res_last,Shallow_Create(s(k))); end loop; return res; end Shallow_Create; function Deep_Create ( s : Solu_Info_Array ) return Solution_List is res,res_last : Solution_List; begin for k in s'range loop Append(res,res_last,Deep_Create(s(k))); end loop; return res; end Deep_Create; -- OPERATIONS ON Solu_Info : procedure Copy_Info ( s1 : in Solu_Info; s2 : in out Solu_Info ) is begin s2.corr := s1.corr; s2.cora := s1.cora; s2.resr := s1.resr; s2.resa := s1.resa; s2.rcond := s1.rcond; s2.length_path := s1.length_path; s2.nstep := s1.nstep; s2.nfail := s1.nfail; s2.niter := s1.niter; s2.nsyst := s1.nsyst; end Copy_Info; procedure Copy_Solu ( s1 : in Solu_Info; s2 : in out Solu_Info ) is begin Clear(s2.sol); s2.sol := new Solution'(s1.sol.all); end Copy_Solu; procedure Copy ( s1 : in Solu_Info; s2 : in out Solu_Info ) is begin Copy_Info(s1,s2); Copy_Solu(s1,s2); end Copy; procedure Init_Info ( s : in out Solu_Info ) is begin s.corr := 0.0; s.cora := 0.0; s.resr := 0.0; s.resa := 0.0; s.rcond := 0.0; s.length_path := 0.0; s.nstep := 0; s.nfail := 0; s.niter := 0; s.nsyst := 0; end Init_Info; procedure Add_Info ( s1 : in out Solu_Info; s2 : in Solu_Info ) is begin s1.nstep := s1.nstep + s2.nstep; s1.nfail := s1.nfail + s2.nfail; s1.niter := s1.niter + s2.niter; s1.nsyst := s1.nsyst + s2.niter; s1.length_path := s1.length_path + s2.length_path; end Add_Info; procedure Update_Info ( s1 : in out Solu_Info; s2 : in Solu_Info ) is begin s1.corr := s2.corr; s1.cora := s2.cora; s1.resr := s2.resr; s1.resa := s2.resa; s1.rcond := s2.rcond; Add_Info(s1,s2); end Update_Info; -- OPERATIONS ON Solu_Info_Array : procedure Copy ( s : in Solu_Info_Array; sa : in out Solution_Array ) is begin Clear(sa); for k in s'range loop sa(k) := new Solution'(s(k).sol.all); end loop; end Copy; procedure Copy ( sa : in Solution_Array; s : in out Solu_Info_Array ) is begin for k in sa'range loop Clear(s(k).sol); s(k).sol := new Solution'(sa(k).all); end loop; end Copy; -- DESTRUCTORS : procedure Clear ( s : in out Solu_Info ) is begin Clear(s.sol); end Clear; procedure Clear ( s : in out Solu_Info_Array ) is begin for k in s'range loop Clear(s); end loop; end Clear; end Continuation_Data; SHAR_EOF fi # end of overwriting check if test -f 'continuation_data.ads' then echo shar: will not over-write existing file "'continuation_data.ads'" else cat << "SHAR_EOF" > 'continuation_data.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; with Solutions; use Solutions; package Continuation_Data is -- DESCRIPTION : -- In order to keep the parameters and variables manageble, -- they have been grouped into records. -- DATA STRUCTURES FOR PARAMETERS : type Pred_Pars is record -- contains the parameters for the predictor minstep,maxstep : double_float; -- minimum and maximum step size expfac,redfac : double_float; -- expansion and reduction factor -- for step length control success_steps : natural; -- number of successful steps before expansion predictor_type : natural; -- type of predictor used dist_target : double_float; -- distance to target power : positive; -- power of t in (polyhedral) homotopy end record; type Corr_Pars is record -- contains the parameters for the corrector epsrx,epsax,epsrf,epsaf : double_float; -- desired precisions for x and its residual f(x) -- once relative (r) and once absolute (a) maxit,maxtot : natural; -- maximum number of corrector iterations -- for one step and for the whole path end record; -- DATASTRUCTURES FOR VARIABLES : type Solu_Info is record -- contains information about the solution sol : Link_to_Solution; -- the solution: vector, t and multiplicity corr,cora,resr,resa,rcond : double_float; -- last correction (cor) and residual (res), -- once relative (r) and once absolute (a) -- and estimate for inverse condition of jacobian length_path : double_float; -- length of the path nstep,nfail,niter,nsyst : natural; -- various counters : -- number of steps, failures, corrector -- iterations and number of linear systems solved end record; type Solu_Info_Array is array ( integer range <> ) of Solu_Info; -- CREATERS : function Shallow_Create ( s : Link_to_Solution ) return Solu_Info; function Deep_Create ( s : Solution ) return Solu_Info; function Shallow_Create ( s : Solution_Array ) return Solu_Info_Array; function Deep_Create ( s : Solution_Array ) return Solu_Info_Array; function Shallow_Create ( s : Solution_List ) return Solu_Info_Array; function Deep_Create ( s : Solution_List ) return Solu_Info_Array; function Shallow_Create ( s : Solu_Info ) return Link_to_Solution; function Deep_Create ( s : Solu_Info ) return Solution; function Shallow_Create ( s : Solu_Info_Array ) return Solution_Array; function Deep_Create ( s : Solu_Info_Array ) return Solution_Array; function Shallow_Create ( s : Solu_Info_Array ) return Solution_List; function Deep_Create ( s : Solu_Info_Array ) return Solution_List; -- DESCRIPTION : -- A shallow create copies the pointer to the solution, while -- a deep create allocates memory for a copy of the solution. -- OPERATIONS ON Solu_Info : procedure Copy_Info ( s1 : in Solu_Info; s2 : in out Solu_Info ); procedure Copy_Solu ( s1 : in Solu_Info; s2 : in out Solu_Info ); procedure Copy ( s1 : in Solu_Info; s2 : in out Solu_Info ); -- DESCRIPTION : -- Copies the information, the solution or everything from s1 to s2. procedure Init_Info ( s : in out Solu_Info ); -- DESCRIPTION : -- Initializes the information of the solution. procedure Add_Info ( s1 : in out Solu_Info; s2 : in Solu_Info ); -- DESCRIPTION : -- Adds the information in the counters of s2 to s1. procedure Update_Info ( s1 : in out Solu_Info; s2 : in Solu_Info ); -- DESCRIPTION : -- Adds the information in the counters of s2 to s1 and copies the -- other information from s2 to s1. -- OPERATIONS ON Solu_Info_Array : procedure Copy ( s : in Solu_Info_Array; sa : in out Solution_Array ); procedure Copy ( sa : in Solution_Array; s : in out Solu_Info_Array ); -- DESCRIPTION : Copies s into sa or vice versa. -- DESTRUCTORS : procedure Clear ( s : in out Solu_Info ); procedure Clear ( s : in out Solu_Info_Array ); -- DESCRIPTION : -- This is clear is only needed after a deep create. end Continuation_Data; SHAR_EOF fi # end of overwriting check if test -f 'continuation_parameters.adb' then echo shar: will not over-write existing file "'continuation_parameters.adb'" else cat << "SHAR_EOF" > 'continuation_parameters.adb' package body Continuation_Parameters is procedure Tune ( estimate_for_condition : in natural ) is begin condition := estimate_for_condition; block_size := 1; max_steps := 500*(condition + 1); max_reruns := condition + 1; predictor_path_type := 0; min_path_step_size := 10.0**(-6 - condition/4); max_path_step_size := 0.1/(double_float(condition+1)); success_path_steps := 1 + condition; if condition >= 4 then relative_path_residual := 10.0**( -9 - condition mod 4); absolute_path_residual := 10.0**( -9 - condition mod 4); relative_path_correction := 10.0**( -9 - condition mod 4); absolute_path_correction := 10.0**( -9 - condition mod 4); relative_endg_residual := 10.0**(-11 - condition mod 4); absolute_endg_residual := 10.0**(-11 - condition mod 4); relative_endg_correction := 10.0**(-11 - condition mod 4); absolute_endg_correction := 10.0**(-11 - condition mod 4); end if; Tune_Endgm_Pred(endext_order); end Tune; procedure Tune_Endgm_Pred ( extrapolation_order : in natural ) is begin if extrapolation_order = 0 then min_endg_step_size := 10.0**(-8 - condition/4); max_endg_step_size := 0.1/(double_float(condition+2)); success_endg_steps := 3 + condition; else if predictor_path_type <= 2 then predictor_endg_type := 2; else predictor_endg_type := 5; end if; min_endg_step_size := min_path_step_size; max_endg_step_size := 0.5; reduction_endg_factor := 0.5; expansion_endg_factor := 1.7; success_endg_steps := 3 + condition; end if; end Tune_Endgm_Pred; function Create_for_Path return Pred_Pars is res : Pred_Pars; begin res.maxstep := max_path_step_size; res.minstep := min_path_step_size; res.expfac := expansion_path_factor; res.redfac := reduction_path_factor; res.success_steps := success_path_steps; res.predictor_type := predictor_path_type; res.dist_target := start_end_game; res.power := power_of_t; return res; end Create_for_Path; function Create_End_Game return Pred_Pars is res : Pred_Pars; begin res.maxstep := max_endg_step_size; res.minstep := min_endg_step_size; res.expfac := expansion_endg_factor; res.redfac := reduction_endg_factor; res.success_steps := success_endg_steps; res.predictor_type := predictor_endg_type; res.dist_target := 0.0; res.power := power_of_t; return res; end Create_End_Game; function Create_for_Path return Corr_Pars is res : Corr_Pars; begin res.epsrx := relative_path_correction; res.epsax := absolute_path_correction; res.epsrf := relative_path_residual; res.epsaf := absolute_path_residual; res.maxit := max_path_iter; res.maxtot := max_steps*res.maxit; return res; end Create_for_Path; function Create_End_Game return Corr_Pars is res : Corr_Pars; begin res.epsrx := relative_endg_correction; res.epsax := absolute_endg_correction; res.epsrf := relative_endg_residual; res.epsaf := absolute_endg_residual; res.maxit := max_endg_iter; res.maxtot := max_steps*res.maxit; return res; end Create_End_Game; end Continuation_Parameters; SHAR_EOF fi # end of overwriting check if test -f 'continuation_parameters.ads' then echo shar: will not over-write existing file "'continuation_parameters.ads'" else cat << "SHAR_EOF" > 'continuation_parameters.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; with Continuation_Data; use Continuation_Data; package Continuation_Parameters is -- DESCRIPTION : -- This package contains all important parameters and the default values. -- GLOBAL MONITOR : condition : natural := 0; -- 1 -- low = smooth paths, high = difficult path block_size : natural := 1; -- 2 -- number of paths tracked simultaneously: -- sequential, parallel or a combination of both. max_steps : natural := 500*(condition+1); -- 3 -- maximum number of steps along a path start_end_game : double_float := 0.1; -- 4 -- distance from target to start the end game endext_order : natural := 0; -- 5 -- order of extrapolator in polyhedral end game max_reruns : natural := condition + 1; -- 6 -- maximum number of re-runs allowed -- STEP CONTROL (PREDICTOR) : predictor_path_type : natural := 0; -- 7 predictor_endg_type : natural := 0; -- 8 -- predictor types: -- 0 : secant for x, real for t; -- 1 : secant for x, complex for t; -- 2 : secant for x, geometric for t; -- 3 : tangens for x, real for t; -- 4 : tangens for x, complex for t; -- 5 : tangens for x, geometric for t; -- 6 : Hermite for x, real for t; min_path_step_size : double_float := 10.0**(-6 - condition/4); -- 9 min_endg_step_size : double_float := 10.0**(-8 - condition/4); -- 10 -- minimum step size along a path and at end of path max_path_step_size : double_float := 0.1/(double_float(condition+1)); -- 11 max_endg_step_size : double_float := 0.1/(double_float(condition+2)); -- 12 -- maximum step size along a path and at end of path reduction_path_factor : double_float := 0.70; -- 13 reduction_endg_factor : double_float := 0.50; -- 14 -- reduction factor for step size along a path and at end expansion_path_factor : double_float := 1.25; -- 15 expansion_endg_factor : double_float := 1.10; -- 16 -- expansion factor for step size success_path_steps : natural := 1 + 2*condition; -- 17 success_endg_steps : natural := 1 + 4*condition; -- 18 -- threshold on number of successful steps -- before expanding step size power_of_t : positive := 1; -- power of t in the (polyhedral) homotopy -- PATH CLOSENESS (CORRECTOR) : max_path_iter : natural := 4; -- 19 max_endg_iter : natural := 4; -- 20 -- maximum number of iterations for one corrector step -- along the path and at the end of the path relative_path_residual : double_float := 10.0**(-9 - condition); -- 21 relative_endg_residual : double_float := 10.0**(-11 - condition); -- 22 absolute_path_residual : double_float := 10.0**(-9 - condition); -- 23 absolute_endg_residual : double_float := 10.0**(-11 - condition); -- 24 -- desired precision for residuals along the path and at end -- |F(x)| < *_residual, once relative and once absolute relative_path_correction : double_float := 10.0**(-9 - condition); -- 25 relative_endg_correction : double_float := 10.0**(-11 - condition); -- 26 absolute_path_correction : double_float := 10.0**(-9 - condition); -- 27 absolute_endg_correction : double_float := 10.0**(-11 - condition); -- 28 -- desired precision for corrections along the path and at end -- |delta(x)| < *_correction, once relative and once absolute -- SOLUTIONS (TOLERANCES) : tol_path_inverse_condition : double_float := 10.0**(-4); -- 29 tol_endg_inverse_condition : double_float := 10.0**(-12); -- 30 -- tolerance for inverse condition of jacobian to -- decide whether solution is singular or not tol_path_distance : double_float := 10.0**(-4); -- 31 tol_endg_distance : double_float := 10.0**(-12); -- 32 -- tolerance for two solutions x1, x2 to be clustered, -- when |x1(k) - x2(k)| < tol_*_distance, for all k tol_path_at_infinity : double_float := 10.0**4; -- 33 tol_endg_at_infinity : double_float := 10.0**12; -- 34 -- tolerance for a solution x to lie a infinity, -- when |x(k)| > tol_at_infinity, for a certain k -- TUNING OF THE PARAMETERS : procedure Tune ( estimate_for_condition : in natural ); -- DESCRIPTION : -- Given an estimate for the condition of the homotopy, parameters -- will be set, according to the formulas in the defaults. procedure Tune_Endgm_Pred ( extrapolation_order : in natural ); -- DESCRIPTION : -- Determines the settings for the predictor in the end game, -- depending on the extrapolation order. -- CREATING PARAMETER SETS : function Create_for_Path return Pred_Pars; function Create_End_Game return Pred_Pars; function Create_for_Path return Corr_Pars; function Create_End_Game return Corr_Pars; -- DESCRIPTION : -- Given the values for the parameters, sets of predictor and -- corrector parameters will be created. end Continuation_Parameters; SHAR_EOF fi # end of overwriting check if test -f 'continuation_parameters_io.adb' then echo shar: will not over-write existing file "'continuation_parameters_io.adb'" else cat << "SHAR_EOF" > 'continuation_parameters_io.adb' with Communications_with_User; use Communications_with_User; with integer_io,Numbers_io; use integer_io,Numbers_io; with Floating_Point_Numbers; use Floating_Point_Numbers; with Strings_to_Natural_Numbers; with Continuation_Parameters; use Continuation_Parameters; package body Continuation_Parameters_io is use Floating_Point_Numbers.double_float_io; -- AUXILIARIES : function Predictor_Banner ( pred_type : natural ) return string is -- DESCRIPTION : -- Returns banner for the corresponding predictor type. ss : constant string := "( x:Sec,t:Rea )"; sc : constant string := "( x:Sec,t:Com )"; sg : constant string := "( x:Sec,t:Geo )"; ts : constant string := "( x:Tan,t:Rea )"; tc : constant string := "( x:Tan,t:Com )"; tg : constant string := "( x:Tan,t:Geo )"; hs : constant string := "( x:Her,t:Rea )"; uu : constant string := " no predictor "; begin case pred_type is when 0 => return ss; when 1 => return sc; when 2 => return sg; when 3 => return ts; when 4 => return tc; when 5 => return tg; when 6 => return hs; when others => return uu; end case; end Predictor_Banner; procedure Read_Positive_Float ( f : in out double_float ) is begin loop Read_Double_Float(f); exit when f > 0.0; put("Zero or negative value not allowed, try again : "); end loop; end Read_Positive_Float; -- INFORMATION BALLOONS : procedure Condition_Info is i : array(1..4) of string(1..65); begin i(1):=" This global parameter can be used to tune the parameters"; i(2):="according to the general expectancy of how difficult the solution"; i(3):="paths will be. Low values of this parameter lead to a loose path"; i(4):="tracking, whereas higher values tighten up the path-following. "; for j in i'range loop put_line(i(j)); end loop; end Condition_Info; procedure Number_of_Paths_Info is i : array(1..9) of string(1..65); begin i(1):=" In simultaneous path-following, the same discretization for the"; i(2):="values of the continuation parameter is used for a number of"; i(3):="paths. Clustering of solution paths is checked during"; i(4):="continuation for the number of paths that are followed"; i(5):="simultaneously. "; i(6):=" In sequential path-following, i.e., when this parameter equals"; i(7):="one, the step sizes are adjusted according to the difficulty of"; i(8):="the current path being followed. In this case, a difficult path"; i(9):="does not slow down the continuation for the other ones. "; for j in i'range loop put_line(i(j)); end loop; end Number_of_Paths_Info; procedure Max_Steps_Info is i : array(1..3) of string(1..65); begin i(1):=" This parameter bounds the amount of work along a solution path."; i(2):="Continuation for the path being followed stops when the number of"; i(3):="steps exceeds this threshold value. "; for j in i'range loop put_line(i(j)); end loop; end Max_Steps_Info; procedure Distance_Info is i : array(1..6) of string(1..65); begin i(1):=" Tracking solution paths is organized in two stages. As t<1, no"; i(2):="singularities are likely to occur and paths can be tracked more"; i(3):="loosely. When t gets close to 1, paths may converge to singular"; i(4):="solutions or diverge to infinity, so they have to be tracked more"; i(5):="carefully. This distance marks the switch towards the second"; i(6):="stage, that is the so-called end game. "; for j in i'range loop put_line(i(j)); end loop; end Distance_Info; procedure Extrapolation_Order_Info is i : array(1..5) of string(1..65); begin i(1):=" The direction of a diverging solution path provides a normal to"; i(2):="a face of the system that certificates the deficiency. In this"; i(3):="polyhedral end game, extrapolation is used to determine winding"; i(4):="numbers. When the order of the extrapolator equals zero, then"; i(5):="the polyhedral end game is turned off. "; for j in i'range loop put_line(i(j)); end loop; end Extrapolation_Order_Info; procedure Re_Run_Info is i : array(1..4) of string(1..65); begin i(1):=" Solution paths may be clustered at the end of the continuation."; i(2):="If the number of re-runs is higher than one, then clustered"; i(3):="solution paths are re-computed by following the paths more"; i(4):="closely. Setting this value to zero turns off this facility. "; for j in i'range loop put_line(i(j)); end loop; end Re_Run_Info; procedure Predictor_Info is i : array(1..11) of string(1..65); begin i( 1):=" We distinguish between predictors for the solution vector x and"; i( 2):="the continuation parameter t. The secant predictor for x is"; i( 3):="based on linear extrapolation, whereas the tangent predictor uses"; i( 4):="the Jacobian matrix to extrapolate. "; i( 5):=" For t, three different predictors are provided. The real"; i( 6):="predictor simply augments t with the step size. The complex"; i( 7):="predictor takes values in the complex plane to circumvent values"; i( 8):="of t for which the corresponding system is badly conditioned."; i( 9):="The geometric predictor generates values for t so that the"; i(10):="distances to the target value behave like a geometric series."; i(11):="The latter predictor is useful in a polyhedral end game. "; for j in i'range loop put_line(i(j)); end loop; end Predictor_Info; procedure Min_Step_Size_Info is i : array(1..4) of string(1..65); begin i(1):=" This is a lower bound on the step size for the continuation"; i(2):="parameter. Continuation for the path being followed stops when a"; i(3):="required reduction of the step size yields a step length that is"; i(4):="lower than the minimum step size. "; for j in i'range loop put_line(i(j)); end loop; end Min_Step_Size_Info; procedure Max_Step_Size_Info is i : array(1..4) of string(1..65); begin i(1):=" This is an upper bound on the step size for the continuation"; i(2):="parameter. An expansion of the step size that yields a step"; i(3):="length that is larger than this threshold sets the step size to"; i(4):="this threshold. "; for j in i'range loop put_line(i(j)); end loop; end Max_Step_Size_Info; procedure Reduction_Factor_Info is i : array(1..3) of string(1..65); begin i(1):=" When the corrector does not manage to reach the required"; i(2):="accuracy within the allowed number of iterations, the step size"; i(3):="will be reduced by multiplication with the reduction factor. "; for j in i'range loop put_line(i(j)); end loop; end Reduction_Factor_Info; procedure Expansion_Factor_Info is i : array(1..4) of string(1..65); begin i(1):=" When the corrector has reached the required accuracy within the"; i(2):="allowed number of iterations, for a number of consecutive times"; i(3):="higher than the expansion threshold, the step size will be"; i(4):="enlarged by multiplication by the expansion factor. "; for j in i'range loop put_line(i(j)); end loop; end Expansion_Factor_Info; procedure Expansion_Threshold_Info is i : array(1..7) of string(1..65); begin i(1):=" Before enlarging the step size along a path, the number of"; i(2):="consecutive successful steps must pass the expansion threshold."; i(3):="A step is successful when the corrector manages to reach the"; i(4):="required accuracy within the allowed number of iterations. "; i(5):=" At the end of the path, this threshold bounds the number of"; i(6):="consecutive equal guesses of the winding number $m$ before the"; i(7):="polyhedral end game can modify it. "; for j in i'range loop put_line(i(j)); end loop; end Expansion_Threshold_Info; procedure Number_of_Iterations_Info is i : array(1..7) of string(1..65); begin i(1):=" The corrector stops when the desired accuracy is reached or"; i(2):="when it has exhausted its maximum number of iterations. "; i(3):=" A low maximum enforces quadratic convergence and keeps the path"; i(4):="tracker close to the solution paths. "; i(5):=" A higher maximum may be needed at the end of the solution path,"; i(6):="when quadratic convergence can no longer be obtained due to"; i(7):="singularities. "; for j in i'range loop put_line(i(j)); end loop; end Number_of_Iterations_Info; procedure Relative_Residual_Info is i : array(1..5) of string(1..65); begin i(1):=" The residual is the norm of the vector obtained after"; i(2):="evaluating the current approximation vector in the polynomial"; i(3):="system. The corrector stops when the residual divided by the"; i(4):="norm of the approximation vector is lower than or equal to the"; i(5):="required precision. "; for j in i'range loop put_line(i(j)); end loop; end Relative_Residual_Info; procedure Absolute_Residual_Info is i : array(1..4) of string(1..65); begin i(1):=" The residual is the norm of the vector obtained after"; i(2):="evaluating the current approximation vector in the polynomial"; i(3):="system. The corrector stops when the residual is lower than or"; i(4):="equal to the required precision. "; for j in i'range loop put_line(i(j)); end loop; end Absolute_Residual_Info; procedure Relative_Correction_Info is i : array(1..4) of string(1..65); begin i(1):=" The correction is the norm of the last vector used to update"; i(2):="the current approximation vector. The corrector stops when the"; i(3):="correction divided by the norm of the approximation vector is"; i(4):="lower than or equal to the required precision. "; for j in i'range loop put_line(i(j)); end loop; end Relative_Correction_Info; procedure Absolute_Correction_Info is i : array(1..3) of string(1..65); begin i(1):=" The correction is the norm of the last vector used to update"; i(2):="the current approximation vector. The corrector stops when the"; i(3):="correction is lower than or equal to the required precision. "; for j in i'range loop put_line(i(j)); end loop; end Absolute_Correction_Info; procedure Singular_Info is i : array(1..2) of string(1..65); begin i(1):=" A condition is considered as singular when the condition number"; i(2):="of the Jacobian matrix passes the given threshold value. "; for j in i'range loop put_line(i(j)); end loop; end Singular_Info; procedure Clustered_Info is i : array(1..3) of string(1..65); begin i(1):=" Two solutions are considered as clustered when the distance"; i(2):="between all corresponding components is smaller than the given"; i(3):="threshold value. "; for j in i'range loop put_line(i(j)); end loop; end Clustered_Info; procedure Infinity_Info is i : array(1..6) of string(1..65); begin i(1):=" A solution is considered to diverge to infinity when its norm"; i(2):="passes the given threshold value, in case of affine coordinates,"; i(3):="or, in case of projective coordinates, when the added coordinate"; i(4):="becomes smaller than the inverse of the threshold value."; i(5):="Continuation for the path being followed stops when it diverges"; i(6):="to infinity. "; for j in i'range loop put_line(i(j)); end loop; end Infinity_Info; procedure Exit_Info is i : constant string :="By typing 0, the current continuation parameters are used."; begin put_line(i); end Exit_Info; procedure Menu_Predictor ( pred_type : out natural ) is -- DESCRIPTION : -- Shows the menu with available predictors and lets the user choose. ans : character; m : array(0..7) of string(1..65); begin m(0):="MENU with Predictors for Solution x & Continuation Parameter t : "; m(1):=" 0. Secant : linear extrapolation & Real increment for t; "; m(2):=" 1. Secant : based on 2 previous & Complex increment for t; "; m(3):=" 2. Secant : solution values & Geometric series for t; "; m(4):=" 3. Tangent : linear extrapolation & Real increment for t; "; m(5):=" 4. Tangent : based on Jacobi & Complex increment for t; "; m(6):=" 5. Tangent : matrix at solution & Geometric series for t; "; m(7):=" 6. Hermite : cubic extrapolation & Real increment for t; "; for i in m'range loop put_line(m(i)); end loop; put("Select predictor by typing number between 0 and 6 : "); Ask_Alternative(ans,"0123456"); pred_type := Strings_to_Natural_Numbers.Convert(ans); end Menu_Predictor; -- TARGET ROUTINES : procedure put is begin Continuation_Parameters_io.put(Standard_Output); end put; procedure put ( file : in file_type ) is banner_path : constant string := Predictor_Banner(predictor_path_type); banner_endg : constant string := Predictor_Banner(predictor_endg_type); begin put_line(file,"GLOBAL MONITOR : "); put(file," 1. the condition of the homotopy : "); put(file,condition,1); new_line(file); put(file," 2. number of paths tracked simultaneously : "); put(file,block_size,1); new_line(file); put(file," 3. maximum number of steps along a path : "); put(file,max_steps,1); new_line(file); put(file," 4. distance from target to start end game : "); put(file,start_end_game,1,3,3); new_line(file); put(file," 5. order of extrapolator in end game : "); put(file,endext_order,1); new_line(file); put(file," 6. maximum number of re-runs : "); put(file,max_reruns,1); new_line(file); put_line(file,"STEP CONTROL (PREDICTOR) : " & " along path : end game"); put(file," 7: 8. type " & banner_path & ":" & banner_endg & " : "); put(file,predictor_path_type,1); put(file," : "); put(file,predictor_endg_type,1); new_line(file); put(file," 9:10. minimum step size : "); put(file,min_path_step_size,1,3,3); put(file," : "); put(file,min_endg_step_size,1,3,3); new_line(file); put(file," 11:12. maximum step size : "); put(file,max_path_step_size,1,3,3); put(file," : "); put(file,max_endg_step_size,1,3,3); new_line(file); put(file," 13:14. reduction factor for step size : "); put(file,reduction_path_factor,1,3,3); put(file," : "); put(file,reduction_endg_factor,1,3,3); new_line(file); put(file," 15:16. expansion factor for step size : "); put(file,expansion_path_factor,1,3,3); put(file," : "); put(file,expansion_endg_factor,1,3,3); new_line(file); put(file," 17:18. expansion threshold : "); put(file,success_path_steps,1); put(file," : "); put(file,success_endg_steps,1); new_line(file); put_line(file,"PATH CLOSENESS (CORRECTOR) : " & " along path : end game"); put(file," 19:20. maximum number of iterations : "); put(file,max_path_iter,1); put(file," : "); put(file,max_endg_iter,1); new_line(file); put(file," 21:22. relative precision for residuals : "); put(file,relative_path_residual,1,3,3); put(file," : "); put(file,relative_endg_residual,1,3,3); new_line(file); put(file," 23:24. absolute precision for residuals : "); put(file,absolute_path_residual,1,3,3); put(file," : "); put(file,absolute_endg_residual,1,3,3); new_line(file); put(file," 25:26. relative precision for corrections : "); put(file,relative_path_correction,1,3,3); put(file," : "); put(file,relative_endg_correction,1,3,3); new_line(file); put(file," 27:28. absolute precision for corrections : "); put(file,absolute_path_correction,1,3,3); put(file," : "); put(file,absolute_endg_correction,1,3,3); new_line(file); put_line(file,"SOLUTIONS (TOLERANCES): " & " along path : end game"); put(file," 29:30. inverse condition of Jacobian : "); put(file,tol_path_inverse_condition,1,3,3); put(file," : "); put(file,tol_endg_inverse_condition,1,3,3); new_line(file); put(file," 31:32. clustering of solutions : "); put(file,tol_path_distance,1,3,3); put(file," : "); put(file,tol_endg_distance,1,3,3); new_line(file); put(file," 33:34. solution at infinity : "); put(file,tol_path_at_infinity,1,3,3); put(file," : "); put(file,tol_endg_at_infinity,1,3,3); new_line(file); end put; procedure get_parameter ( k : in natural ) is begin case k is -- GLOBAL MONITOR : when 1 => put(" condition parameter : "); Read_Natural(condition); Continuation_Parameters.Tune(condition); when 2 => put(" number of paths tracked simultaneously : "); Read_Positive(block_size); when 3 => put(" maximum number of steps along a path : "); Read_Positive(max_steps); when 4 => put(" distance from target to start end game : "); Read_Positive_Float(start_end_game); when 5 => put(" order of extrapolator in end game : "); Read_Natural(endext_order); Continuation_Parameters.Tune_Endgm_Pred(endext_order); when 6 => put(" maximum number of re-runs : "); Read_Natural(max_reruns); -- STEP CONTROL (PREDICTOR) : when 7 => Menu_Predictor(predictor_path_type); when 8 => Menu_Predictor(predictor_endg_type); when 9 => put(" minimum step size along the path : "); Read_Positive_Float(min_path_step_size); when 10 => put(" minimum step size at end of path : "); Read_Positive_Float(min_endg_step_size); when 11 => put(" maximum step size along the path : "); Read_Positive_Float(max_path_step_size); when 12 => put(" maximum step size at end of path : "); Read_Positive_Float(max_endg_step_size); when 13 => put(" reduction factor for step size along the path : "); Read_Positive_Float(reduction_path_factor); when 14 => put(" reduction factor for step size at end of path : "); Read_Positive_Float(reduction_endg_factor); when 15 => put(" expansion factor for step size along the path : "); Read_Positive_Float(expansion_path_factor); when 16 => put(" expansion factor for step size at end of path : "); Read_Positive_Float(expansion_endg_factor); when 17 => put(" expansion threshold along the path : "); Read_Positive(success_path_steps); when 18 => put(" expansion threshold at end of path : "); Read_Positive(success_endg_steps); -- PATH CLOSENESS (CORRECTOR) : when 19 => put(" maximum number of iterations along the path : "); Read_Positive(max_path_iter); when 20 => put(" maximum number of iterations at end of path : "); Read_Positive(max_endg_iter); when 21 => put(" relative precision for residual along the path : "); Read_Positive_Float(relative_path_residual); when 22 => put(" relative precision for residual at end of path : "); Read_Positive_Float(relative_endg_residual); when 23 => put(" absolute precision for residual along the path : "); Read_Positive_Float(absolute_path_residual); when 24 => put(" absolute precision for residual at end of path : "); Read_Positive_Float(absolute_endg_residual); when 25 => put(" relative precision for correction along the path : "); Read_Positive_Float(relative_path_correction); when 26 => put(" relative precision for correction at end of path : "); Read_Positive_Float(relative_endg_correction); when 27 => put(" absolute precision for correction along the path : "); Read_Positive_Float(absolute_path_correction); when 28 => put(" absolute precision for correction at end of path : "); Read_Positive_Float(absolute_endg_correction); -- SOLUTIONS (TOLERANCES) : when 29 => put(" inverse condition of Jacobian along the path : "); Read_Positive_Float(tol_path_inverse_condition); when 30 => put(" inverse condition of Jacobian at end of path : "); Read_Positive_Float(tol_endg_inverse_condition); when 31 => put(" clustering of solutions along the path : "); Read_Positive_Float(tol_path_distance); when 32 => put(" clustering of solutions at end of path : "); Read_Positive_Float(tol_endg_distance); when 33 => put(" solution at infinity along the path : "); Read_Positive_Float(tol_path_at_infinity); when 34 => put(" solution at infinity at end of path : "); Read_Positive_Float(tol_endg_at_infinity); when others => null; end case; end get_parameter; procedure get_parameter_with_info ( k : in natural ) is ans : character; begin new_line; case k is when 1 => Condition_Info; -- GLOBAL MONITOR when 2 => Number_of_Paths_Info; when 3 => Max_Steps_Info; when 4 => Distance_Info; when 5 => Extrapolation_Order_Info; when 6 => Re_Run_Info; when 7 | 8 => Predictor_Info; -- STEP CONTROL (PREDICTOR) when 9 | 10 => Min_Step_Size_Info; when 11 | 12 => Max_Step_Size_Info; when 13 | 14 => Reduction_Factor_Info; when 15 | 16 => Expansion_Factor_Info; when 17 | 18 => Expansion_Threshold_Info; when 19 | 20 => Number_of_Iterations_Info; -- PATH CLOSENESS (CORRECTOR) when 21 | 22 => Relative_Residual_Info; when 23 | 24 => Absolute_Residual_Info; when 25 | 26 => Relative_correction_Info; when 27 | 28 => Absolute_Correction_Info; when 29 | 30 => Singular_Info; -- SOLUTIONS (TOLERANCES) when 31 | 32 => Clustered_Info; when 33 | 34 => Infinity_Info; when others => Exit_Info; end case; new_line; if k /= 0 then put("Do you want to change the value of this parameter ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then new_line; get_parameter(k); end if; end if; end get_parameter_with_info; procedure get ( k : out natural ) is tmp : string(1..10); cnt : natural; ans : character; nb : integer := -1; valid,info : boolean; begin loop put("Type a number to change (0 to exit), preceded by i for info : "); get_line(tmp,cnt); valid := true; info := false; for i in 1..cnt loop if tmp(i) = 'i' then info := true; elsif tmp(i) /= ' ' and then Strings_to_Natural_Numbers.Convert(tmp(i)) = 10 then valid := false; end if; exit when not valid; end loop; if not valid then put_line("Invalid answer. Please try again."); else nb := Strings_to_Natural_Numbers.Convert(tmp(1..cnt)); if nb < 0 then put_line("No natural number. Please try again."); put("The current string is :"); put_line(tmp(1..cnt)); end if; end if; exit when (nb >= 0); end loop; if info then get_parameter_with_info(nb); if nb = 0 then put("Do you want to leave this menu ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'n' then nb := 1; end if; end if; else get_parameter(nb); end if; k := nb; end get; end Continuation_Parameters_io; SHAR_EOF fi # end of overwriting check if test -f 'continuation_parameters_io.ads' then echo shar: will not over-write existing file "'continuation_parameters_io.ads'" else cat << "SHAR_EOF" > 'continuation_parameters_io.ads' with text_io; use text_io; package Continuation_Parameters_io is -- DESCRIPTION : -- This package provides the primitives for a user interface to determine -- the numerical parameters in the polynomial continuation. procedure put; procedure put ( file : in file_type ); -- DESCRIPTION : -- Produces an overview of all values of the continuation parameters. procedure get ( k : out natural ); -- DESCRIPTION : -- Prompts for a number k of a continuation parameter to change. -- If k < 34, then the corresponding parameter will be changed. end Continuation_Parameters_io; SHAR_EOF fi # end of overwriting check if test -f 'correctors.adb' then echo shar: will not over-write existing file "'correctors.adb'" else cat << "SHAR_EOF" > 'correctors.adb' with Process_io; use Process_io; with Integer_Vectors; with Complex_Linear_System_Solvers; use Complex_Linear_System_Solvers; with Floating_Equalities; use Floating_Equalities; package body Correctors is -- AUXILIARIES FOR IMPLEMENTING MULTIPLE CORRECTORS : procedure Equals ( s : in Solu_Info_Array; x : in Vector; i : in natural; d : in double_float; j : in out natural ) is eq : boolean; begin while j < i loop eq := true; for k in x'range loop eq := Is_Equal(s(j).sol.v(k),x(k),d); exit when not eq; end loop; exit when eq; j := j + 1; end loop; end Equals; generic with procedure Corrector ( s : in out Solu_Info; c : in Corr_Pars ); procedure Multiple_Silent_Corrector ( s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ); -- DESCRIPTION : -- Allows to build any multiple silent corrector, -- depending on the corrector supplied as generic parameter. generic with procedure Corrector ( file : in file_type; s : in out Solu_Info; c : in Corr_Pars ); procedure Multiple_Reporting_Corrector ( file : in file_type; s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ); -- DESCRIPTION : -- Allows to build any multiple reporting corrector, -- depending on the corrector supplied as generic parameter. procedure Multiple_Silent_Corrector ( s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ) is i,j : natural; ffail : boolean := false; begin i := pivot; loop Corrector(s(i),c); ffail := (((s(i).resa > c.epsaf) and then (s(i).cora > c.epsax)) or else ((s(i).resr > c.epsrf) and then (s(i).corr > c.epsrx))); if not ffail then j := 1; Equals(s,s(i).sol.v,i,dist_sols,j); if j /= i then ffail := true; end if; end if; exit when ffail; i := i + 1; if i > s'last then i := s'first; end if; exit when (i = pivot); end loop; if ffail then pivot := i; end if; fail := ffail; end Multiple_Silent_Corrector; procedure Multiple_Reporting_Corrector ( file : in file_type; s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ) is i,j : natural; ffail : boolean := false; begin i := pivot; loop Write_path(file,i); Corrector(file,s(i),c); sWrite(file,s(i).sol.all); ffail := (((s(i).resa > c.epsaf) and then (s(i).cora > c.epsax)) or else ((s(i).resr > c.epsrf) and then (s(i).corr > c.epsrx))); if not ffail then j := 1; Equals(s,s(i).sol.v,i,dist_sols,j); if j /= i then ffail := true; end if; end if; exit when ffail; i := i + 1; if i > s'last then i := s'first; end if; exit when (i = pivot); end loop; if ffail then pivot := i; end if; fail := ffail; end Multiple_Reporting_Corrector; -- TARGET PROCEDURES : procedure Affine_Single_Loose_Normal_Silent_Corrector ( s : in out Solu_Info; c : in Corr_Pars ) is info : integer; y : vector(s.sol.v'range) := H(s.sol.v,s.sol.t); j : Matrix(y'range,y'range); ipvt : Integer_Vectors.Vector(y'range); nit : natural := 0; normv : double_float; begin s.resa := Norm(y); s.cora := 1.0; -- INITIALIZATION normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then s.corr := s.cora / normv; s.resr := s.resa / normv; end if; while nit < c.maxit loop -- STOP WHEN MAXIMUM #ITERATIONS REACHED j := dH(s.sol.v,s.sol.t); lufac(j,y'last,ipvt,info); exit when info /= 0; -- STOP WHEN SINGULAR JACOBIAN Min_Vector(y); lusolve(j,y'last,ipvt,y); s.cora := Norm(y); Plus_Vector(s.sol.v,y); s.length_path := s.length_path + s.cora; y := H(s.sol.v,s.sol.t); s.resa := Norm(y); normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then s.corr := s.cora / normv; s.resr := s.resa / normv; end if; nit := nit + 1; exit when (((s.cora <= c.epsax) or else (s.resa <= c.epsaf)) and then ((s.corr <= c.epsrx) or else (s.resr <= c.epsrf))); end loop; -- STOP WHEN DESIRED PRECISION REACHED s.niter := s.niter + nit; s.nsyst := s.nsyst + nit; exception when numeric_error => return; end Affine_Single_Loose_Normal_Silent_Corrector; procedure Affine_Single_Loose_Normal_Reporting_Corrector ( file : in file_type; s : in out Solu_Info; c : in Corr_Pars ) is info : integer; y : vector(s.sol.v'range) := H(s.sol.v,s.sol.t); j : Matrix(y'range,y'range); ipvt : Integer_Vectors.Vector(y'range); nit : natural := 0; normv : double_float; begin s.resa := Norm(y); s.cora := 1.0; -- INITIALIZATION normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then s.corr := s.cora / normv; s.resr := s.resa / normv; end if; while nit < c.maxit loop -- STOP WHEN MAXIMUM #ITERATIONS REACHED j := dH(s.sol.v,s.sol.t); lufac(j,y'last,ipvt,info); exit when info /= 0; -- STOP WHEN SINGULAR JACOBIAN Min_Vector(y); lusolve(j,y'last,ipvt,y); s.cora := Norm(y); Plus_Vector(s.sol.v,y); s.length_path := s.length_path + s.cora; y := H(s.sol.v,s.sol.t); s.resa := Norm(y); normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then s.corr := s.cora / normv; s.resr := s.resa / normv; end if; cWrite(file,s.cora,s.corr,s.resa,s.resr); -- WRITE STATISTICS nit := nit + 1; exit when (((s.cora <= c.epsax) or else (s.resa <= c.epsaf)) and then ((s.corr <= c.epsrx) or else (s.resr <= c.epsrf))); end loop; -- STOP WHEN DESIRED PRECISION REACHED s.niter := s.niter + nit; s.nsyst := s.nsyst + nit; exception when numeric_error => return; end Affine_Single_Loose_Normal_Reporting_Corrector; procedure Affine_Single_Loose_Conditioned_Silent_Corrector ( s : in out Solu_Info; c : in Corr_Pars ) is y : vector(s.sol.v'range) := H(s.sol.v,s.sol.t); j : Matrix(y'range,y'range); ipvt : Integer_Vectors.Vector(y'range); nit : natural := 0; normv : double_float; begin s.resa := Norm(y); s.cora := 1.0; -- INITIALIZATION normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then s.corr := s.cora / normv; s.resr := s.resa / normv; end if; while nit < c.maxit loop -- STOP WHEN MAXIMUM #ITERATIONS REACHED j := dH(s.sol.v,s.sol.t); lufco(j,y'last,ipvt,s.rcond); exit when s.rcond + 1.0 = s.rcond; -- STOP WHEN SINGULAR JACOBIAN Min_Vector(y); lusolve(j,y'last,ipvt,y); s.cora := Norm(y); Plus_Vector(s.sol.v,y); s.length_path := s.length_path + s.cora; y := H(s.sol.v,s.sol.t); s.resa := Norm(y); normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then s.corr := s.cora / normv; s.resr := s.resa / normv; end if; nit := nit + 1; exit when (((s.cora <= c.epsax) or else (s.resa <= c.epsaf)) and then ((s.corr <= c.epsrx) or else (s.resr <= c.epsrf))); end loop; -- STOP WHEN DESIRED PRECISION REACHED s.niter := s.niter + nit; s.nsyst := s.nsyst + nit; exception when numeric_error => return; end Affine_Single_Loose_Conditioned_Silent_Corrector; procedure Affine_Single_Loose_Conditioned_Reporting_Corrector ( file : in file_type; s : in out Solu_Info; c : in Corr_Pars ) is y : vector(s.sol.v'range) := H(s.sol.v,s.sol.t); j : Matrix(y'range,y'range); ipvt : Integer_Vectors.Vector(y'range); nit : natural := 0; normv : double_float; begin s.resa := Norm(y); s.cora := 1.0; -- INITIALIZATION normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then s.corr := s.cora / normv; s.resr := s.resa / normv; end if; while nit < c.maxit loop -- STOP WHEN MAXIMUM #ITERATIONS REACHED j := dH(s.sol.v,s.sol.t); lufco(j,y'last,ipvt,s.rcond); exit when s.rcond + 1.0 = s.rcond; -- STOP WHEN SINGULAR JACOBIAN Min_Vector(y); lusolve(j,y'last,ipvt,y); s.cora := Norm(y); Plus_Vector(s.sol.v,y); s.length_path := s.length_path + s.cora; y := H(s.sol.v,s.sol.t); s.resa := Norm(y); normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then s.corr := s.cora / normv; s.resr := s.resa / normv; end if; cWrite(file,s.cora,s.corr,s.resa,s.resr); -- WRITE STATISTICS cWrite(file,s.rcond,s.sol.m); nit := nit + 1; exit when (((s.cora <= c.epsax) or else (s.resa <= c.epsaf)) and then ((s.corr <= c.epsrx) or else (s.resr <= c.epsrf))); end loop; -- STOP WHEN DESIRED PRECISION REACHED s.niter := s.niter + nit; s.nsyst := s.nsyst + nit; exception when numeric_error => return; end Affine_Single_Loose_Conditioned_Reporting_Corrector; procedure Affine_Single_Severe_Normal_Silent_Corrector ( s : in out Solu_Info; c : in Corr_Pars ) is info : integer; y : vector(s.sol.v'range) := H(s.sol.v,s.sol.t); j : Matrix(y'range,y'range); ipvt : Integer_Vectors.Vector(y'range); nit : natural := 0; normv,ncora,nresa,ncorr,nresr : double_float; stop : boolean; begin s.resa := Norm(y); s.cora := 1.0; -- INITIALIZATION normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then s.corr := s.cora / normv; s.resr := s.resa / normv; end if; while nit < c.maxit loop -- STOP WHEN MAXIMUM #ITERATIONS REACHED j := dH(s.sol.v,s.sol.t); lufac(j,y'last,ipvt,info); exit when info /= 0; -- STOP WHEN SINGULAR JACOBIAN Min_Vector(y); lusolve(j,y'last,ipvt,y); ncora := Norm(y); Plus_Vector(s.sol.v,y); s.length_path := s.length_path + s.cora; y := H(s.sol.v,s.sol.t); nresa := Norm(y); normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then ncorr := ncora / normv; nresr := nresa / normv; end if; nit := nit + 1; stop := (((ncora > s.cora) and then (nresa > s.resa)) or else ((ncorr > s.corr) and then (ncorr > s.corr))); -- STOP WHEN DIVERGENCE s.cora := ncora; s.resa := nresa; s.corr := ncorr; s.resr := nresr; exit when stop; exit when (((s.cora <= c.epsax) or else (s.resa <= c.epsaf)) and then ((s.corr <= c.epsrx) or else (s.resr <= c.epsrf))); end loop; -- STOP WHEN DESIRED PRECISION REACHED s.niter := s.niter + nit; s.nsyst := s.nsyst + nit; exception when numeric_error => return; end Affine_Single_Severe_Normal_Silent_Corrector; procedure Affine_Single_Severe_Normal_Reporting_Corrector ( file : in file_type; s : in out Solu_Info; c : in Corr_Pars ) is info : integer; y : vector(s.sol.v'range) := H(s.sol.v,s.sol.t); j : Matrix(y'range,y'range); ipvt : Integer_Vectors.Vector(y'range); nit : natural := 0; normv,ncora,nresa,ncorr,nresr : double_float; stop : boolean; begin s.resa := Norm(y); s.cora := 1.0; -- INITIALIZATION normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then s.corr := s.cora / normv; s.resr := s.resa / normv; end if; while nit < c.maxit loop -- STOP WHEN MAXIMUM #ITERATIONS REACHED j := dH(s.sol.v,s.sol.t); lufac(j,y'last,ipvt,info); exit when info /= 0; -- STOP WHEN SINGULAR JACOBIAN Min_Vector(y); lusolve(j,y'last,ipvt,y); ncora := Norm(y); Plus_Vector(s.sol.v,y); s.length_path := s.length_path + s.cora; y := H(s.sol.v,s.sol.t); nresa := Norm(y); normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then ncorr := ncora / normv; nresr := nresa / normv; end if; cWrite(file,ncora,ncorr,nresa,nresr); -- WRITE STATISTICS nit := nit + 1; stop := (((ncora > s.cora) and then (nresa > s.resa)) or else ((ncorr > s.corr) and then (ncorr > s.corr))); -- STOP WHEN DIVERGENCE s.cora := ncora; s.resa := nresa; s.corr := ncorr; s.resr := nresr; exit when stop; exit when (((s.cora <= c.epsax) or else (s.resa <= c.epsaf)) and then ((s.corr <= c.epsrx) or else (s.resr <= c.epsrf))); end loop; -- STOP WHEN DESIRED PRECISION REACHED s.niter := s.niter + nit; s.nsyst := s.nsyst + nit; exception when numeric_error => return; end Affine_Single_Severe_Normal_Reporting_Corrector; procedure Affine_Single_Severe_Conditioned_Silent_Corrector ( s : in out Solu_Info; c : in Corr_Pars ) is y : vector(s.sol.v'range) := H(s.sol.v,s.sol.t); j : Matrix(y'range,y'range); ipvt : Integer_Vectors.Vector(y'range); nit : natural := 0; normv,ncora,nresa,ncorr,nresr : double_float; stop : boolean; begin s.resa := Norm(y); s.cora := 1.0; -- INITIALIZATION normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then s.corr := s.cora / normv; s.resr := s.resa / normv; end if; while nit < c.maxit loop -- STOP WHEN MAXIMUM #ITERATIONS REACHED j := dH(s.sol.v,s.sol.t); lufco(j,y'last,ipvt,s.rcond); exit when s.rcond + 1.0 = s.rcond; -- STOP WHEN SINGULAR JACOBIAN Min_Vector(y); lusolve(j,y'last,ipvt,y); ncora := Norm(y); Plus_Vector(s.sol.v,y); s.length_path := s.length_path + s.cora; y := H(s.sol.v,s.sol.t); nresa := Norm(y); normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then ncorr := ncora / normv; nresr := nresa / normv; end if; nit := nit + 1; stop := (((ncora > s.cora) and then (nresa > s.resa)) or else ((ncorr > s.corr) and then (ncorr > s.corr))); -- STOP WHEN DIVERGENCE s.cora := ncora; s.resa := nresa; s.corr := ncorr; s.resr := nresr; exit when stop; exit when (((s.cora <= c.epsax) or else (s.resa <= c.epsaf)) and then ((s.corr <= c.epsrx) or else (s.resr <= c.epsrf))); end loop; -- STOP WHEN DESIRED PRECISION REACHED s.niter := s.niter + nit; s.nsyst := s.nsyst + nit; exception when numeric_error => return; end Affine_Single_Severe_Conditioned_Silent_Corrector; procedure Affine_Single_Severe_Conditioned_Reporting_Corrector ( file : in file_type; s : in out Solu_Info; c : in Corr_Pars ) is y : vector(s.sol.v'range) := H(s.sol.v,s.sol.t); j : Matrix(y'range,y'range); ipvt : Integer_Vectors.Vector(y'range); nit : natural := 0; normv,ncora,nresa,ncorr,nresr : double_float; stop : boolean; begin s.resa := Norm(y); s.cora := 1.0; -- INITIALIZATION normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then s.corr := s.cora / normv; s.resr := s.resa / normv; end if; while nit < c.maxit loop -- STOP WHEN MAXIMUM #ITERATIONS REACHED j := dH(s.sol.v,s.sol.t); lufco(j,y'last,ipvt,s.rcond); exit when s.rcond + 1.0 = s.rcond; -- STOP WHEN SINGULAR JACOBIAN Min_Vector(y); lusolve(j,y'last,ipvt,y); ncora := Norm(y); Plus_Vector(s.sol.v,y); s.length_path := s.length_path + s.cora; y := H(s.sol.v,s.sol.t); nresa := Norm(y); normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then ncorr := ncora / normv; nresr := nresa / normv; end if; cWrite(file,ncora,ncorr,nresa,nresr); -- WRITE STATISTICS cWrite(file,s.rcond,s.sol.m); nit := nit + 1; stop := (((ncora > s.cora) and then (nresa > s.resa)) or else ((ncorr > s.corr) and then (ncorr > s.corr))); -- STOP WHEN DIVERGENCE s.cora := ncora; s.resa := nresa; s.corr := ncorr; s.resr := nresr; exit when stop; exit when (((s.cora <= c.epsax) or else (s.resa <= c.epsaf)) and then ((s.corr <= c.epsrx) or else (s.resr <= c.epsrf))); end loop; -- STOP WHEN DESIRED PRECISION REACHED s.niter := s.niter + nit; s.nsyst := s.nsyst + nit; exception when numeric_error => return; end Affine_Single_Severe_Conditioned_Reporting_Corrector; procedure Affine_Multiple_Loose_Normal_Silent_Corrector ( s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ) is procedure Single_Corrector is new Affine_Single_Loose_Normal_Silent_Corrector(Norm,H,dH); procedure Corrector is new Multiple_Silent_Corrector(Single_Corrector); begin Corrector(s,pivot,dist_sols,c,fail); end Affine_Multiple_Loose_Normal_Silent_Corrector; procedure Affine_Multiple_Loose_Normal_Reporting_Corrector ( file : in file_type; s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ) is procedure Single_Corrector is new Affine_Single_Loose_Normal_Reporting_Corrector(Norm,H,dH); procedure Corrector is new Multiple_Reporting_Corrector(Single_Corrector); begin Corrector(file,s,pivot,dist_sols,c,fail); end Affine_Multiple_Loose_Normal_Reporting_Corrector; procedure Affine_Multiple_Loose_Conditioned_Silent_Corrector ( s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ) is procedure Single_Corrector is new Affine_Single_Loose_Conditioned_Silent_Corrector(Norm,H,dH); procedure Corrector is new Multiple_Silent_Corrector(Single_Corrector); begin Corrector(s,pivot,dist_sols,c,fail); end Affine_Multiple_Loose_Conditioned_Silent_Corrector; procedure Affine_Multiple_Loose_Conditioned_Reporting_Corrector ( file : in file_type; s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ) is procedure Single_Corrector is new Affine_Single_Loose_Conditioned_Reporting_Corrector(Norm,H,dH); procedure Corrector is new Multiple_Reporting_Corrector(Single_Corrector); begin Corrector(file,s,pivot,dist_sols,c,fail); end Affine_Multiple_Loose_Conditioned_Reporting_Corrector; procedure Affine_Multiple_Severe_Normal_Silent_Corrector ( s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ) is procedure Single_Corrector is new Affine_Single_Severe_Normal_Silent_Corrector(Norm,H,dH); procedure Corrector is new Multiple_Silent_Corrector(Single_Corrector); begin Corrector(s,pivot,dist_sols,c,fail); end Affine_Multiple_Severe_Normal_Silent_Corrector; procedure Affine_Multiple_Severe_Normal_Reporting_Corrector ( file : in file_type; s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ) is procedure Single_Corrector is new Affine_Single_Severe_Normal_Reporting_Corrector(Norm,H,dH); procedure Corrector is new Multiple_Reporting_Corrector(Single_Corrector); begin Corrector(file,s,pivot,dist_sols,c,fail); end Affine_Multiple_Severe_Normal_Reporting_Corrector; procedure Affine_Multiple_Severe_Conditioned_Silent_Corrector ( s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ) is procedure Single_Corrector is new Affine_Single_Severe_Conditioned_Silent_Corrector(Norm,H,dH); procedure Corrector is new Multiple_Silent_Corrector(Single_Corrector); begin Corrector(s,pivot,dist_sols,c,fail); end Affine_Multiple_Severe_Conditioned_Silent_Corrector; procedure Affine_Multiple_Severe_Conditioned_Reporting_Corrector ( file : in file_type; s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ) is procedure Single_Corrector is new Affine_Single_Severe_Conditioned_Reporting_Corrector(Norm,H,dH); procedure Corrector is new Multiple_Reporting_Corrector(Single_Corrector); begin Corrector(file,s,pivot,dist_sols,c,fail); end Affine_Multiple_Severe_Conditioned_Reporting_Corrector; procedure Projective_Single_Loose_Normal_Silent_Corrector ( s : in out Solu_Info; c : in Corr_Pars ) is info : integer; y : vector(s.sol.v'range) := H(s.sol.v,s.sol.t); j : Matrix(y'range,y'range); ipvt : Integer_Vectors.Vector(y'range); nit : natural := 0; normv : double_float; begin s.resa := Norm(y); s.cora := 1.0; -- INITIALIZATION normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then s.corr := s.cora / normv; s.resr := s.resa / normv; end if; while nit < c.maxit loop -- STOP WHEN MAXIMUM #ITERATIONS REACHED j := dH(s.sol.v,s.sol.t); for jj in y'range loop j(j'last(1),jj) := s.sol.v(jj); -- CORRECT PERPENDICULAR end loop; lufac(j,y'last,ipvt,info); exit when info /= 0; -- STOP WHEN SINGULAR JACOBIAN Min_Vector(y); y(y'last) := CMPLX(0.0); -- IGNORE SCALING EQUATION lusolve(j,y'last,ipvt,y); s.cora := Norm(y); Plus_Vector(s.sol.v,y); s.length_path := s.length_path + s.cora; y := H(s.sol.v,s.sol.t); y(y'last) := CMPLX(0.0); s.resa := Norm(y); normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then s.corr := s.cora / normv; s.resr := s.resa / normv; for jj in s.sol.v'range loop -- SCALE THE SOLUTION s.sol.v(jj) := s.sol.v(jj)/CMPLX(normv); end loop; end if; nit := nit + 1; exit when (((s.cora <= c.epsax) or else (s.resa <= c.epsaf)) and then ((s.corr <= c.epsrx) or else (s.resr <= c.epsrf))); end loop; -- STOP WHEN DESIRED PRECISION REACHED s.niter := s.niter + nit; s.nsyst := s.nsyst + nit; exception when numeric_error => return; end Projective_Single_Loose_Normal_Silent_Corrector; procedure Projective_Single_Loose_Normal_Reporting_Corrector ( file : in file_type; s : in out Solu_Info; c : in Corr_Pars ) is info : integer; y : vector(s.sol.v'range) := H(s.sol.v,s.sol.t); j : Matrix(y'range,y'range); ipvt : Integer_Vectors.Vector(y'range); nit : natural := 0; normv : double_float; begin s.resa := Norm(y); s.cora := 1.0; -- INITIALIZATION normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then s.corr := s.cora / normv; s.resr := s.resa / normv; end if; while nit < c.maxit loop -- STOP WHEN MAXIMUM #ITERATIONS REACHED j := dH(s.sol.v,s.sol.t); for jj in y'range loop j(j'last(1),jj) := s.sol.v(jj); -- CORRECT PERPENDICULAR end loop; lufac(j,y'last,ipvt,info); exit when info /= 0; -- STOP WHEN SINGULAR JACOBIAN Min_Vector(y); y(y'last) := CMPLX(0.0); -- IGNORE SCALING EQUATION lusolve(j,y'last,ipvt,y); s.cora := Norm(y); Plus_Vector(s.sol.v,y); s.length_path := s.length_path + s.cora; y := H(s.sol.v,s.sol.t); y(y'last) := CMPLX(0.0); s.resa := Norm(y); normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then s.corr := s.cora / normv; s.resr := s.resa / normv; for jj in s.sol.v'range loop -- SCALE THE SOLUTION s.sol.v(jj) := s.sol.v(jj)/CMPLX(normv); end loop; end if; cWrite(file,s.cora,s.corr,s.resa,s.resr); -- WRITE STATISTICS nit := nit + 1; exit when (((s.cora <= c.epsax) or else (s.resa <= c.epsaf)) and then ((s.corr <= c.epsrx) or else (s.resr <= c.epsrf))); end loop; -- STOP WHEN DESIRED PRECISION REACHED s.niter := s.niter + nit; s.nsyst := s.nsyst + nit; exception when numeric_error => return; end Projective_Single_Loose_Normal_Reporting_Corrector; procedure Projective_Single_Loose_Conditioned_Silent_Corrector ( s : in out Solu_Info; c : in Corr_Pars ) is y : vector(s.sol.v'range) := H(s.sol.v,s.sol.t); j : Matrix(y'range,y'range); ipvt : Integer_Vectors.Vector(y'range); nit : natural := 0; normv : double_float; begin s.resa := Norm(y); s.cora := 1.0; -- INITIALIZATION normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then s.corr := s.cora / normv; s.resr := s.resa / normv; end if; while nit < c.maxit loop -- STOP WHEN MAXIMUM #ITERATIONS REACHED j := dH(s.sol.v,s.sol.t); for jj in y'range loop j(j'last(1),jj) := s.sol.v(jj); -- CORRECT PERPENDICULAR end loop; lufco(j,y'last,ipvt,s.rcond); exit when s.rcond + 1.0 = s.rcond; -- STOP WHEN SINGULAR JACOBIAN Min_Vector(y); y(y'last) := CMPLX(0.0); -- IGNORE SCALING EQUATION lusolve(j,y'last,ipvt,y); s.cora := Norm(y); Plus_Vector(s.sol.v,y); s.length_path := s.length_path + s.cora; y := H(s.sol.v,s.sol.t); y(y'last) := CMPLX(0.0); s.resa := Norm(y); normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then s.corr := s.cora / normv; s.resr := s.resa / normv; for jj in s.sol.v'range loop -- SCALE THE SOLUTION s.sol.v(jj) := s.sol.v(jj)/CMPLX(normv); end loop; end if; nit := nit + 1; exit when (((s.cora <= c.epsax) or else (s.resa <= c.epsaf)) and then ((s.corr <= c.epsrx) or else (s.resr <= c.epsrf))); end loop; -- STOP WHEN DESIRED PRECISION REACHED s.niter := s.niter + nit; s.nsyst := s.nsyst + nit; exception when numeric_error => return; end Projective_Single_Loose_Conditioned_Silent_Corrector; procedure Projective_Single_Loose_Conditioned_Reporting_Corrector ( file : in file_type; s : in out Solu_Info; c : in Corr_Pars ) is y : vector(s.sol.v'range) := H(s.sol.v,s.sol.t); j : Matrix(y'range,y'range); ipvt : Integer_Vectors.Vector(y'range); nit : natural := 0; normv : double_float; begin s.resa := Norm(y); s.cora := 1.0; -- INITIALIZATION normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then s.corr := s.cora / normv; s.resr := s.resa / normv; end if; while nit < c.maxit loop -- STOP WHEN MAXIMUM #ITERATIONS REACHED j := dH(s.sol.v,s.sol.t); for jj in y'range loop j(j'last(1),jj) := s.sol.v(jj); -- CORRECT PERPENDICULAR end loop; lufco(j,y'last,ipvt,s.rcond); exit when s.rcond + 1.0 = s.rcond; -- STOP WHEN SINGULAR JACOBIAN Min_Vector(y); y(y'last) := CMPLX(0.0); -- IGNORE SCALING EQUATION lusolve(j,y'last,ipvt,y); s.cora := Norm(y); Plus_Vector(s.sol.v,y); s.length_path := s.length_path + s.cora; y := H(s.sol.v,s.sol.t); y(y'last) := CMPLX(0.0); s.resa := Norm(y); normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then s.corr := s.cora / normv; s.resr := s.resa / normv; for jj in s.sol.v'range loop -- SCALE THE SOLUTION s.sol.v(jj) := s.sol.v(jj)/CMPLX(normv); end loop; end if; cWrite(file,s.cora,s.corr,s.resa,s.resr); -- WRITE STATISTICS cWrite(file,s.rcond,s.sol.m); nit := nit + 1; exit when (((s.cora <= c.epsax) or else (s.resa <= c.epsaf)) and then ((s.corr <= c.epsrx) or else (s.resr <= c.epsrf))); end loop; -- STOP WHEN DESIRED PRECISION REACHED s.niter := s.niter + nit; s.nsyst := s.nsyst + nit; exception when numeric_error => return; end Projective_Single_Loose_Conditioned_Reporting_Corrector; procedure Projective_Single_Severe_Normal_Silent_Corrector ( s : in out Solu_Info; c : in Corr_Pars ) is info : integer; y : vector(s.sol.v'range) := H(s.sol.v,s.sol.t); j : Matrix(y'range,y'range); ipvt : Integer_Vectors.Vector(y'range); nit : natural := 0; normv,ncora,nresa,ncorr,nresr : double_float; stop : boolean; begin s.resa := Norm(y); s.cora := 1.0; -- INITIALIZATION normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then s.corr := s.cora / normv; s.resr := s.resa / normv; end if; while nit < c.maxit loop -- STOP WHEN MAXIMUM #ITERATIONS REACHED j := dH(s.sol.v,s.sol.t); for jj in y'range loop j(j'last(1),jj) := s.sol.v(jj); -- CORRECT PERPENDICULAR end loop; lufac(j,y'last,ipvt,info); exit when info /= 0; -- STOP WHEN SINGULAR JACOBIAN Min_Vector(y); y(y'last) := CMPLX(0.0); -- IGNORE SCALING EQUATION lusolve(j,y'last,ipvt,y); ncora := Norm(y); Plus_Vector(s.sol.v,y); s.length_path := s.length_path + s.cora; y := H(s.sol.v,s.sol.t); y(y'last) := CMPLX(0.0); nresa := Norm(y); normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then ncorr := ncora / normv; nresr := nresa / normv; for jj in s.sol.v'range loop -- SCALE THE SOLUTION s.sol.v(jj) := s.sol.v(jj)/CMPLX(normv); end loop; end if; nit := nit + 1; stop := (((ncora > s.cora) and then (nresa > s.resa)) or else ((ncorr > s.corr) and then (ncorr > s.corr))); -- STOP WHEN DIVERGENCE s.cora := ncora; s.resa := nresa; s.corr := ncorr; s.resr := nresr; exit when stop; exit when (((s.cora <= c.epsax) or else (s.resa <= c.epsaf)) and then ((s.corr <= c.epsrx) or else (s.resr <= c.epsrf))); end loop; -- STOP WHEN DESIRED PRECISION REACHED s.niter := s.niter + nit; s.nsyst := s.nsyst + nit; exception when numeric_error => return; end Projective_Single_Severe_Normal_Silent_Corrector; procedure Projective_Single_Severe_Normal_Reporting_Corrector ( file : in file_type; s : in out Solu_Info; c : in Corr_Pars ) is info : integer; y : vector(s.sol.v'range) := H(s.sol.v,s.sol.t); j : Matrix(y'range,y'range); ipvt : Integer_Vectors.Vector(y'range); nit : natural := 0; normv,ncora,nresa,ncorr,nresr : double_float; stop : boolean; begin s.resa := Norm(y); s.cora := 1.0; -- INITIALIZATION normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then s.corr := s.cora / normv; s.resr := s.resa / normv; end if; while nit < c.maxit loop -- STOP WHEN MAXIMUM #ITERATIONS REACHED j := dH(s.sol.v,s.sol.t); for jj in y'range loop j(j'last(1),jj) := s.sol.v(jj); -- CORRECT PERPENDICULAR end loop; lufac(j,y'last,ipvt,info); exit when info /= 0; -- STOP WHEN SINGULAR JACOBIAN Min_Vector(y); y(y'last) := CMPLX(0.0); -- IGNORE SCALING EQUATION lusolve(j,y'last,ipvt,y); ncora := Norm(y); Plus_Vector(s.sol.v,y); s.length_path := s.length_path + s.cora; y := H(s.sol.v,s.sol.t); y(y'last) := CMPLX(0.0); nresa := Norm(y); normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then ncorr := ncora / normv; nresr := nresa / normv; for jj in s.sol.v'range loop -- SCALE THE SOLUTION s.sol.v(jj) := s.sol.v(jj)/CMPLX(normv); end loop; end if; cWrite(file,ncora,ncorr,nresa,nresr); -- WRITE STATISTICS nit := nit + 1; stop := (((ncora > s.cora) and then (nresa > s.resa)) or else ((ncorr > s.corr) and then (ncorr > s.corr))); -- STOP WHEN DIVERGENCE s.cora := ncora; s.resa := nresa; s.corr := ncorr; s.resr := nresr; exit when stop; exit when (((s.cora <= c.epsax) or else (s.resa <= c.epsaf)) and then ((s.corr <= c.epsrx) or else (s.resr <= c.epsrf))); end loop; -- STOP WHEN DESIRED PRECISION REACHED s.niter := s.niter + nit; s.nsyst := s.nsyst + nit; exception when numeric_error => return; end Projective_Single_Severe_Normal_Reporting_Corrector; procedure Projective_Single_Severe_Conditioned_Silent_Corrector ( s : in out Solu_Info; c : in Corr_Pars ) is y : vector(s.sol.v'range) := H(s.sol.v,s.sol.t); j : Matrix(y'range,y'range); ipvt : Integer_Vectors.Vector(y'range); nit : natural := 0; normv,ncora,nresa,ncorr,nresr : double_float; stop : boolean; begin s.resa := Norm(y); s.cora := 1.0; -- INITIALIZATION normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then s.corr := s.cora / normv; s.resr := s.resa / normv; end if; while nit < c.maxit loop -- STOP WHEN MAXIMUM #ITERATIONS REACHED j := dH(s.sol.v,s.sol.t); for jj in y'range loop j(j'last(1),jj) := s.sol.v(jj); -- CORRECT PERPENDICULAR end loop; lufco(j,y'last,ipvt,s.rcond); exit when s.rcond + 1.0 = s.rcond; -- STOP WHEN SINGULAR JACOBIAN Min_Vector(y); y(y'last) := CMPLX(0.0); -- IGNORE SCALING EQUATION lusolve(j,y'last,ipvt,y); ncora := Norm(y); Plus_Vector(s.sol.v,y); s.length_path := s.length_path + s.cora; y := H(s.sol.v,s.sol.t); y(y'last) := CMPLX(0.0); nresa := Norm(y); normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then ncorr := ncora / normv; nresr := nresa / normv; for jj in s.sol.v'range loop -- SCALE THE SOLUTION s.sol.v(jj) := s.sol.v(jj)/CMPLX(normv); end loop; end if; nit := nit + 1; stop := (((ncora > s.cora) and then (nresa > s.resa)) or else ((ncorr > s.corr) and then (ncorr > s.corr))); -- STOP WHEN DIVERGENCE s.cora := ncora; s.resa := nresa; s.corr := ncorr; s.resr := nresr; exit when stop; exit when (((s.cora <= c.epsax) or else (s.resa <= c.epsaf)) and then ((s.corr <= c.epsrx) or else (s.resr <= c.epsrf))); end loop; -- STOP WHEN DESIRED PRECISION REACHED s.niter := s.niter + nit; s.nsyst := s.nsyst + nit; exception when numeric_error => return; end Projective_Single_Severe_Conditioned_Silent_Corrector; procedure Projective_Single_Severe_Conditioned_Reporting_Corrector ( file : in file_type; s : in out Solu_Info; c : in Corr_Pars ) is y : vector(s.sol.v'range) := H(s.sol.v,s.sol.t); j : Matrix(y'range,y'range); ipvt : Integer_Vectors.Vector(y'range); nit : natural := 0; normv,ncora,nresa,ncorr,nresr : double_float; stop : boolean; begin s.resa := Norm(y); s.cora := 1.0; -- INITIALIZATION normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then s.corr := s.cora / normv; s.resr := s.resa / normv; end if; while nit < c.maxit loop -- STOP WHEN MAXIMUM #ITERATIONS REACHED j := dH(s.sol.v,s.sol.t); for jj in y'range loop j(j'last(1),jj) := s.sol.v(jj); -- CORRECT PERPENDICULAR end loop; lufco(j,y'last,ipvt,s.rcond); exit when s.rcond + 1.0 = s.rcond; -- STOP WHEN SINGULAR JACOBIAN Min_Vector(y); y(y'last) := CMPLX(0.0); -- IGNORE SCALING EQUATION lusolve(j,y'last,ipvt,y); ncora := Norm(y); Plus_Vector(s.sol.v,y); s.length_path := s.length_path + s.cora; y := H(s.sol.v,s.sol.t); y(y'last) := CMPLX(0.0); nresa := Norm(y); normv := Norm(s.sol.v); if normv + 1.0 /= 1.0 then ncorr := ncora / normv; nresr := nresa / normv; for jj in s.sol.v'range loop -- SCALE THE SOLUTION s.sol.v(jj) := s.sol.v(jj)/CMPLX(normv); end loop; end if; cWrite(file,ncora,ncorr,nresa,nresr); -- WRITE STATISTICS cWrite(file,s.rcond,s.sol.m); nit := nit + 1; stop := (((ncora > s.cora) and then (nresa > s.resa)) or else ((ncorr > s.corr) and then (ncorr > s.corr))); -- STOP WHEN DIVERGENCE s.cora := ncora; s.resa := nresa; s.corr := ncorr; s.resr := nresr; exit when stop; exit when (((s.cora <= c.epsax) or else (s.resa <= c.epsaf)) and then ((s.corr <= c.epsrx) or else (s.resr <= c.epsrf))); end loop; -- STOP WHEN DESIRED PRECISION REACHED s.niter := s.niter + nit; s.nsyst := s.nsyst + nit; exception when numeric_error => return; end Projective_Single_Severe_Conditioned_Reporting_Corrector; procedure Projective_Multiple_Loose_Normal_Silent_Corrector ( s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ) is procedure Single_Corrector is new Projective_Single_Loose_Normal_Silent_Corrector(Norm,H,dH); procedure Corrector is new Multiple_Silent_Corrector(Single_Corrector); begin Corrector(s,pivot,dist_sols,c,fail); end Projective_Multiple_Loose_Normal_Silent_Corrector; procedure Projective_Multiple_Loose_Normal_Reporting_Corrector ( file : in file_type; s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ) is procedure Single_Corrector is new Projective_Single_Loose_Normal_Reporting_Corrector(Norm,H,dH); procedure Corrector is new Multiple_Reporting_Corrector(Single_Corrector); begin Corrector(file,s,pivot,dist_sols,c,fail); end Projective_Multiple_Loose_Normal_Reporting_Corrector; procedure Projective_Multiple_Loose_Conditioned_Silent_Corrector ( s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ) is procedure Single_Corrector is new Projective_Single_Loose_Conditioned_Silent_Corrector(Norm,H,dH); procedure Corrector is new Multiple_Silent_Corrector(Single_Corrector); begin Corrector(s,pivot,dist_sols,c,fail); end Projective_Multiple_Loose_Conditioned_Silent_Corrector; procedure Projective_Multiple_Loose_Conditioned_Reporting_Corrector ( file : in file_type; s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ) is procedure Single_Corrector is new Projective_Single_Loose_Normal_Reporting_Corrector(Norm,H,dH); procedure Corrector is new Multiple_Reporting_Corrector(Single_Corrector); begin Corrector(file,s,pivot,dist_sols,c,fail); end Projective_Multiple_Loose_Conditioned_Reporting_Corrector; procedure Projective_Multiple_Severe_Normal_Silent_Corrector ( s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ) is procedure Single_Corrector is new Projective_Single_Severe_Normal_Silent_Corrector(Norm,H,dH); procedure Corrector is new Multiple_Silent_Corrector(Single_Corrector); begin Corrector(s,pivot,dist_sols,c,fail); end Projective_Multiple_Severe_Normal_Silent_Corrector; procedure Projective_Multiple_Severe_Normal_Reporting_Corrector ( file : in file_type; s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ) is procedure Single_Corrector is new Projective_Single_Loose_Normal_Reporting_Corrector(Norm,H,dH); procedure Corrector is new Multiple_Reporting_Corrector(Single_Corrector); begin Corrector(file,s,pivot,dist_sols,c,fail); end Projective_Multiple_Severe_Normal_Reporting_Corrector; procedure Projective_Multiple_Severe_Conditioned_Silent_Corrector ( s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ) is procedure Single_Corrector is new Projective_Single_Severe_Conditioned_Silent_Corrector(Norm,H,dH); procedure Corrector is new Multiple_Silent_Corrector(Single_Corrector); begin Corrector(s,pivot,dist_sols,c,fail); end Projective_Multiple_Severe_Conditioned_Silent_Corrector; procedure Projective_Multiple_Severe_Conditioned_Reporting_Corrector ( file : in file_type; s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ) is procedure Single_Corrector is new Projective_Single_Severe_Conditioned_Reporting_Corrector(Norm,H,dH); procedure Corrector is new Multiple_Reporting_Corrector(Single_Corrector); begin Corrector(file,s,pivot,dist_sols,c,fail); end Projective_Multiple_Severe_Conditioned_Reporting_Corrector; end Correctors; SHAR_EOF fi # end of overwriting check if test -f 'correctors.ads' then echo shar: will not over-write existing file "'correctors.ads'" else cat << "SHAR_EOF" > 'correctors.ads' with text_io; use text_io; with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Numbers,Complex_Vectors; use Complex_Numbers,Complex_Vectors; with Complex_Matrices,Solutions; use Complex_Matrices,Solutions; with Continuation_Data; use Continuation_Data; package Correctors is -- DESCRIPTION : -- This package contains implementations for the corrector -- in an increment-and-fix continuation. -- -- The following options can be made : -- (Affine,Projective) -- An affine corrector works in affine space, while a projective -- corrector is a projective-perpendicular corrector: it works in -- projective space and corrects in a perpendicular way. -- (Single,Multiple) -- A single corrector only deals with one path at a time. -- A multiple corrector corrects more than one path when it is called. -- (Loose,Severe) -- A loose corrector will stop when either one of the following -- conditions is satisfied: -- 1. One of the desired accuracies has been met. -- 2. The maximum number of iterations is reached. -- 3. The Jacobian matrix is singular. -- In addition to these stopping criteria, a severe corrector checks -- the convergence during the iterations and stops when it notices -- divergence is noticed. A loose correctors allows divergence. -- (Normal,Conditioned) -- A normal corrector does not compute an estimate for the inverse of -- the condition number of the Jacobian matrix. This additional work -- is done by a conditioned corrector. -- (Silent,Reporting) -- A silent corrector does not produce any output on file. -- A reporting corrector allows to put intermediate results on file. -- -- Based on these options, the following 32 different correctors -- are provided : -- -- Affine_Single_Loose_Normal_Silent_Corrector -- Affine_Single_Loose_Normal_Reporting_Corrector -- Affine_Single_Loose_Conditioned_Silent_Corrector -- Affine_Single_Loose_Conditioned_Reporting_Corrector -- Affine_Single_Severe_Normal_Silent_Corrector -- Affine_Single_Severe_Normal_Reporting_Corrector -- Affine_Single_Severe_Conditioned_Silent_Corrector -- Affine_Single_Severe_Conditioned_Reporting_Corrector -- Affine_Multiple_Loose_Normal_Silent_Corrector -- Affine_Multiple_Loose_Normal_Reporting_Corrector -- Affine_Multiple_Loose_Conditioned_Silent_Corrector -- Affine_Multiple_Loose_Conditioned_Reporting_Corrector -- Affine_Multiple_Severe_Normal_Silent_Corrector -- Affine_Multiple_Severe_Normal_Reporting_Corrector -- Affine_Multiple_Severe_Conditioned_Silent_Corrector -- Affine_Multiple_Severe_Conditioned_Reporting_Corrector -- Projective_Single_Loose_Normal_Silent_Corrector -- Projective_Single_Loose_Normal_Reporting_Corrector -- Projective_Single_Loose_Conditioned_Silent_Corrector -- Projective_Single_Loose_Conditioned_Reporting_Corrector -- Projective_Single_Severe_Normal_Silent_Corrector -- Projective_Single_Severe_Normal_Reporting_Corrector -- Projective_Single_Severe_Conditioned_Silent_Corrector -- Projective_Single_Severe_Conditioned_Reporting_Corrector -- Projective_Multiple_Loose_Normal_Silent_Corrector -- Projective_Multiple_Loose_Normal_Reporting_Corrector -- Projective_Multiple_Loose_Conditioned_Silent_Corrector -- Projective_Multiple_Loose_Conditioned_Reporting_Corrector -- Projective_Multiple_Severe_Normal_Silent_Corrector -- Projective_Multiple_Severe_Normal_Reporting_Corrector -- Projective_Multiple_Severe_Conditioned_Silent_Corrector -- Projective_Multiple_Severe_Conditioned_Reporting_Corrector -- -- All these procedures have the following generic parameters: -- a norm function, polynomial vector and Jacobian matrix function. -- Note that the projective correctors require a homogeneous polynomial -- vector function. generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Affine_Single_Loose_Normal_Silent_Corrector ( s : in out Solu_Info; c : in Corr_Pars ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Affine_Single_Loose_Normal_Reporting_Corrector ( file : in file_type; s : in out Solu_Info; c : in Corr_Pars ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Affine_Single_Loose_Conditioned_Silent_Corrector ( s : in out Solu_Info; c : in Corr_Pars ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Affine_Single_Loose_Conditioned_Reporting_Corrector ( file : in file_type; s : in out Solu_Info; c : in Corr_Pars ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Affine_Single_Severe_Normal_Silent_Corrector ( s : in out Solu_Info; c : in Corr_Pars ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Affine_Single_Severe_Normal_Reporting_Corrector ( file : in file_type; s : in out Solu_Info; c : in Corr_Pars ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Affine_Single_Severe_Conditioned_Silent_Corrector ( s : in out Solu_Info; c : in Corr_Pars ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Affine_Single_Severe_Conditioned_Reporting_Corrector ( file : in file_type; s : in out Solu_Info; c : in Corr_Pars ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Affine_Multiple_Loose_Normal_Silent_Corrector ( s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Affine_Multiple_Loose_Normal_Reporting_Corrector ( file : in file_type; s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Affine_Multiple_Loose_Conditioned_Silent_Corrector ( s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Affine_Multiple_Loose_Conditioned_Reporting_Corrector ( file : in file_type; s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Affine_Multiple_Severe_Normal_Silent_Corrector ( s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Affine_Multiple_Severe_Normal_Reporting_Corrector ( file : in file_type; s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Affine_Multiple_Severe_Conditioned_Silent_Corrector ( s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Affine_Multiple_Severe_Conditioned_Reporting_Corrector ( file : in file_type; s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Projective_Single_Loose_Normal_Silent_Corrector ( s : in out Solu_Info; c : in Corr_Pars ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Projective_Single_Loose_Normal_Reporting_Corrector ( file : in file_type; s : in out Solu_Info; c : in Corr_Pars ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Projective_Single_Loose_Conditioned_Silent_Corrector ( s : in out Solu_Info; c : in Corr_Pars ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Projective_Single_Loose_Conditioned_Reporting_Corrector ( file : in file_type; s : in out Solu_Info; c : in Corr_Pars ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Projective_Single_Severe_Normal_Silent_Corrector ( s : in out Solu_Info; c : in Corr_Pars ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Projective_Single_Severe_Normal_Reporting_Corrector ( file : in file_type; s : in out Solu_Info; c : in Corr_Pars ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Projective_Single_Severe_Conditioned_Silent_Corrector ( s : in out Solu_Info; c : in Corr_Pars ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Projective_Single_Severe_Conditioned_Reporting_Corrector ( file : in file_type; s : in out Solu_Info; c : in Corr_Pars ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Projective_Multiple_Loose_Normal_Silent_Corrector ( s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Projective_Multiple_Loose_Normal_Reporting_Corrector ( file : in file_type; s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Projective_Multiple_Loose_Conditioned_Silent_Corrector ( s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Projective_Multiple_Loose_Conditioned_Reporting_Corrector ( file : in file_type; s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Projective_Multiple_Severe_Normal_Silent_Corrector ( s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Projective_Multiple_Severe_Normal_Reporting_Corrector ( file : in file_type; s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Projective_Multiple_Severe_Conditioned_Silent_Corrector ( s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Projective_Multiple_Severe_Conditioned_Reporting_Corrector ( file : in file_type; s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ); -- DESCRIPTION : -- The predicted solutions of the system H(x,t)=0 are corrected. -- With a multiple corrector, the correction starts at s(pivot). -- ON ENTRY : -- file to write intermediate results on; -- s are the predicted values for the solutions; -- pivot is the index in the array where the correction -- process must start; -- dist_sols two solutions x1 and x2 are different -- if for some k in 1..n : | x1(k) - x2(k) | > dist_sols; -- c the corrector parameters. -- ON RETURN : -- s the computed solutions; -- pivot if fail then pivot is the index in the array where -- a difficulty occured; otherwise it is the same pivot as -- on entry; -- fail is false if all solutions are computed with the desired -- precision eps, within the maximum number of allowed -- iterations, and if all solutions are different. end Correctors; SHAR_EOF fi # end of overwriting check if test -f 'directions_of_solution_paths.adb' then echo shar: will not over-write existing file "'directions_of_solution_paths.adb'" else cat << "SHAR_EOF" > 'directions_of_solution_paths.adb' with Floating_Point_Numbers; use Floating_Point_Numbers; with Mathematical_Functions; use Mathematical_Functions; with Float_Matrices; use Float_Matrices; with Integer_Vectors; with vLpRs_Algorithm; use vLpRs_Algorithm; with integer_io; use integer_io; with Integer_Vectors_io; use Integer_Vectors_io; with Float_Vectors_io; use Float_Vectors_io; with Float_Matrices_io; use Float_Matrices_io; package body Directions_of_Solution_Paths is use Floating_Point_Numbers.double_float_io; -- AUXILIARY : function Norm1 ( x : Float_Vectors.Vector ) return double_float is res : double_float := 0.0; begin for i in x'range loop res := res + abs(x(i)); end loop; return res; end Norm1; procedure Shift_Up ( v : in out Float_Vectors.Vector; x : in double_float ) is -- DESCRIPTION : -- Puts x at v(v'first) after a shift-up: v(i+1) := v(i). begin for i in reverse v'first..(v'last-1) loop v(i+1) := v(i); end loop; v(v'first) := x; end Shift_Up; -- FIRST ORDER EXTRAPOLATION : procedure Affine_Update_Direction ( t,prev_t,target : in double_complex; x,prevx : in Complex_Vectors.Vector; prevdls,prevstep : in out double_float; prevdiff,v : in out Float_Vectors.Vector ) is newdls : double_float; newstep : double_float := modulus(t-prev_t); newdiff : Float_Vectors.Vector(prevdiff'range); ratio,factor : double_float; begin for i in v'range loop newdiff(i) := LOG10(modulus(x(i))) - LOG10(modulus(prevx(i))); end loop; newdls := LOG10(modulus(target-prev_t)) - LOG10(modulus(target-t)); if prevdls /= 0.0 then ratio := prevstep/newstep; factor := prevdls - ratio*newdls; for i in v'range loop v(i) := (prevdiff(i) - ratio*newdiff(i))/factor; end loop; end if; prevdiff := newdiff; prevstep := newstep; prevdls := newdls; end Affine_Update_Direction; procedure Projective_Update_Direction ( t,prev_t,target : in double_complex; x,prevx : in Complex_Vectors.Vector; prevdls,prevstep : in out double_float; prevdiff,v : in out Float_Vectors.Vector ) is newdls : double_float; newstep : double_float := modulus(t-prev_t); newdiff : Float_Vectors.Vector(prevdiff'range); ratio,factor : double_float; begin for i in v'range loop newdiff(i) := ( LOG10(modulus(x(i))) - LOG10(modulus(x(x'last))) ) - ( LOG10(modulus(prevx(i))) - LOG10(modulus(prevx(prevx'last))) ); end loop; newdls := LOG10(modulus(target-prev_t)) - LOG10(modulus(target-t)); if prevdls /= 0.0 then ratio := prevstep/newstep; factor := prevdls - ratio*newdls; for i in v'range loop v(i) := (prevdiff(i) - ratio*newdiff(i))/factor; end loop; end if; prevdiff := newdiff; prevstep := newstep; prevdls := newdls; end Projective_Update_Direction; -- DATA MANAGEMENT FOR HIGHER-ORDER EXTRAPOLATION : procedure Extrapolation_Window ( r,m : in natural; t,target : in double_complex; x : in Complex_Vectors.Vector; dt,s,logs : in out Float_Vectors.Vector; logx : in out Float_Vectors_of_Vectors.Vector ) is -- DESCRIPTION : -- The data (dt,s,logs and logx) are stored as in a window: when -- full at the incoming of a new element, all elements are shifted -- and the oldest element drops off. use Float_Vectors; begin if (r = s'last) and (logx(r) /= null) then for i in s'first+1..s'last loop -- shift the data s(i-1) := s(i); dt(i-1) := dt(i); logs(i-1) := logs(i); logx(i-1).all := logx(i).all; end loop; end if; dt(r) := (modulus(target-t)); s(r) := (dt(r))**(1.0/double_float(m)); logs(r) := LOG10(s(r)); end Extrapolation_Window; procedure Refresh_Window ( r,m : in natural; dt : in Float_Vectors.Vector; s,logs : in out Float_Vectors.Vector ) is -- DESCRIPTION : -- Recomputes s and logs, after m has been changed. begin for i in s'first..r loop s(i) := (dt(i))**(1.0/double_float(m)); logs(i) := LOG10(s(i)); end loop; end Refresh_Window; procedure Write_Update_Information ( file : in file_type; r,m : in natural; s,logs : in double_float; logx : in Float_Vectors.Vector ) is -- DESCRIPTION : -- Writes r, s, log(s) and log|x(s)| on file. -- The current version only writes a banner with r and m. use Floating_Point_Numbers.double_float_io; begin put(file,"extrapolation with r = "); put(file,r,1); put(file," and m = "); put(file,m,1); --put_line(file," : "); -- put(file,"m : "); put(file,s); -- put(file," log(s) : "); put(file,logs); -- put(file," log|x(s)| : "); -- put(file,logx); -- for i in logx'range loop -- put(file,logx(i)); -- end loop; new_line(file); end Write_Update_Information; procedure Affine_Update_Extrapolation_Data ( r,m : in natural; t,target : in double_complex; x : in Complex_Vectors.Vector; dt,s,logs : in out Float_Vectors.Vector; logx,wvl0,wvl1,wvltmp : in out Float_Vectors_of_Vectors.Vector ) is -- DESCRIPTION : -- Updates the data needed to extrapolate in the affine case. use Float_Vectors; begin Extrapolation_Window(r,m,t,target,x,dt,s,logs,logx); if logx(r) = null then logx(r) := new Float_Vectors.Vector(x'range); end if; if r > 0 then if wvl0(r) = null then wvl0(r) := new Float_Vectors.Vector'(x'range => 0.0); wvl1(r) := new Float_Vectors.Vector'(x'range => 0.0); wvltmp(r) := new Float_Vectors.Vector'(x'range => 0.0); end if; end if; for i in x'range loop logx(r)(i) := LOG10(modulus(x(i))); end loop; end Affine_Update_Extrapolation_Data; procedure Projective_Update_Extrapolation_Data ( r,m : in natural; t,target : in double_complex; x : in Complex_Vectors.Vector; dt,s,logs : in out Float_Vectors.Vector; logx : in out Float_Vectors_of_Vectors.Vector ) is -- DESCRIPTION : -- Updates the data needed to extrapolate in the projective case, -- under the assumption that the homogenization variable appears lastly. use Float_Vectors; begin Extrapolation_Window(r,m,t,target,x,dt,s,logs,logx); if logx(r) = null then logx(r) := new Float_Vectors.Vector(x'first..x'last-1); end if; for i in x'first..x'last-1 loop logx(r)(i) := LOG10(modulus(x(i))) - LOG10(modulus(x(x'last))); end loop; end Projective_Update_Extrapolation_Data; procedure Update_Errors ( r : in natural; errorv : in out Float_Vectors.Vector; error : out double_float; wvl0,wvl1,wvltmp : in out Float_Vectors_of_Vectors.Vector ) is -- DESCRIPTION : -- Updates the error computation after the extrapolation. -- REQUIRED : r >= 1. begin if r = 1 then for i in errorv'range loop errorv(i) := abs(wvltmp(r)(i) - wvl1(r)(i)); end loop; else for i in errorv'range loop errorv(i) := abs(wvltmp(r-1)(i) - wvl1(r-1)(i)); end loop; end if; error := Norm1(errorv); for i in 1..r loop wvl0(i).all := wvl1(i).all; wvl1(i).all := wvltmp(i).all; end loop; end Update_Errors; -- ESTIMATING THE CYCLE NUMBER : procedure Frequency_of_Estimate ( newest,max : in natural; m,estm,cnt : in out natural; eps : in double_float; newm : out boolean ) is -- DESCRIPTION : -- This procedure manages the frequencies of the estimated values for m. -- Only after the same estimate has been found a certain number of -- times, the new estimate will be accepted. -- The current version does not take the accuracy eps into account. -- ON ENTRY : -- newest newly computed estimate for m; -- max threshold on cnt before estm is returned; -- m current value of m; -- estm previous estimate; -- cnt number of consecutive guesses that yielded estm; -- eps accuracy of the current estimate. -- ON RETURN : -- m new value of m; -- estm new estimate; -- cnt updated number of consecutive guesses that yielded estm; -- newm true if m has changed. begin if cnt = 0 -- initial estimate then estm := newest; cnt := 1; elsif newest = estm -- update frequency for current estimate then cnt := cnt + 1; else cnt := 1; -- new estimate found estm := newest; end if; if estm /= m -- look for modification of current cycle number then if (cnt >= max) --and (eps <= 0.1) then m := estm; newm := true; else newm := false; end if; else newm := false; end if; end Frequency_of_Estimate; procedure Extrapolate_on_Errors ( file : in file_type; r : in integer; h : in double_float; err : in Float_Vectors.Vector; estm : out double_float ) is -- DESCRIPTION : -- Performs an rth-order extrapolation on the errors. -- ON ENTRY : -- file to write intermediate results on; -- r order of the extrapolation method; -- h ratio in geometric sequence; -- err vector of range 0..r+1 with differences of estimates for -- the outer normal, the most recent error is err(0). -- ON RETURN : -- extm estimated value for m. em,hm,exterr : Float_Vectors.Vector(1..r+1); dlog : constant double_float := log10(h); f : double_float; begin for j in exterr'range loop exterr(j) := log10(err(j-1)) - log10(err(j)); end loop; em(1) := dlog/exterr(1); -- 0th order estimate -- if (m(1) < 0.0001) or (m(1) > 1000.0) -- avoid divergence -- then m(r+1) := m(1); -- else hm(1) := h**(1.0/em(1)); for k in 1..r loop f := hm(k) - 1.0; for j in 1..r-k+1 loop exterr(j) := exterr(j+1) + (exterr(j+1) - exterr(j))/f; end loop; em(k+1) := dlog/exterr(1); -- exit when ((m(k+1) < 0.0001) or (m(k+1) > 1000.0)); hm(k+1) := h**(double_float(k+1)/em(k+1)); end loop; -- end if; estm := em(r+1); put(file,"em(0.."); put(file,r,1); put(file,") : "); put(file,em,3,3,3); new_line(file); exception when others => null; end Extrapolate_on_Errors; procedure Estimate0 ( r,max : in natural; m,estm,cnt : in out natural; dt : in Float_Vectors.Vector; err,newerr : in double_float; rat,eps : out double_float; newm : out boolean ) is -- DESCRIPTION : -- Returns an 0th-order estimate of the cycle number m. -- ON ENTRY : -- r extrapolation order; -- max threshold on cnt before estm is returned; -- m current value of m; -- estm previous estimate; -- cnt number of consecutive guesses that yielded estm; -- dt consecutive distances to the target; -- err previous error; -- newerr current error. -- ON RETURN : -- m new value of m; -- estm new estimate; -- cnt updated number of consecutive guesses that yielded estm; -- rat ratio used to estimate m; -- eps accuracy of the rounding value for m; -- newm true if m has changed. dferr : constant double_float := log10(newerr) - log10(err); h : constant double_float := dt(r)/dt(r-1); dfsr1 : constant double_float := log10(h); ratio : constant double_float := abs(dfsr1/dferr); res : natural := integer(ratio); accuracy : constant double_float := abs(double_float(res) - ratio); begin if res = 0 then res := 1; end if; Frequency_of_Estimate(res,max,m,estm,cnt,accuracy,newm); rat := ratio; eps := accuracy; end Estimate0; procedure Estimate ( file : in file_type; r : in integer; max : in natural; m,estm,cnt : in out natural; h : in double_float; diferr : in Float_Vectors.Vector; rat,eps : out double_float; newm : out boolean ) is -- DESCRIPTION : -- Estimates m by extrapolation on consecutvie differences of errors, -- stored in the parameter diferr. For the specfication of the other -- parameters, see the procedure Estimate0. res : integer; fltestm,accuracy : double_float; begin -- if r < dt'last -- then Extrapolate_on_Errors(file,r-1,h,diferr(0..r),fltestm); -- else Extrapolate_on_Errors(file,r,h,diferr(0..r+1),fltestm); -- end if; res := integer(fltestm); if res <= 0 then res := 1; end if; accuracy := abs(double_float(res) - fltestm); Frequency_of_Estimate(res,max,m,estm,cnt,accuracy,newm); rat := fltestm; eps := accuracy; end Estimate; -- APPLYING THE vLpRs-Algorithm : function vLpRs_Extrapolate ( r : natural; s,logs : Float_Vectors.Vector; logx : Float_Vectors_of_Vectors.Vector ) return Float_Vectors.Vector is -- DESCRIPTION : -- Higher-order extrapolation is based on vLpRs-Algorithm. -- REQUIRED : r >= 1. res : Float_Vectors.Vector(logx(r).all'range); logx1 : Float_Vectors.Vector(0..r); rt1,rt2 : Float_Matrices.Matrix(1..r-1,1..r-1); srp,dsp : Float_Vectors.Vector(1..r-1) := (0..r-1 => 0.0); p : Float_Vectors.Vector(0..r-1) := (0..r-1 => 0.0); l,v : Float_Vectors.Vector(0..r) := (0..r => 1.0); begin rt1(1,1) := 0.0; rt2(1,1) := 0.0; for i in res'range loop for j in logx1'range loop logx1(j) := logx(j)(i); end loop; vLpRs_full(r,s(0..r),logs(0..r),logx1(0..r),srp,dsp,p,l,v,rt1,rt2); res(i) := v(r)/l(r); end loop; return res; end vLpRs_Extrapolate; function vLpRs_Extrapolate ( file : file_type; r : natural; s,logs : Float_Vectors.Vector; logx : Float_Vectors_of_Vectors.Vector ) return Float_Vectors.Vector is -- DESCRIPTION : -- Higher-order extrapolation based on vLpRs-Algorithm. -- REQUIRED : r >= 1. res : Float_Vectors.Vector(logx(r).all'range); logx1 : Float_Vectors.Vector(0..r); rt1,rt2 : Float_Matrices.Matrix(1..r-1,1..r-1); srp,dsp : Float_Vectors.Vector(1..r-1) := (0..r-1 => 0.0); p : Float_Vectors.Vector(0..r-1) := (0..r-1 => 0.0); l,v : Float_Vectors.Vector(0..r) := (0..r => 0.0); begin for i in rt1'range(1) loop for j in rt1'range(2) loop rt1(i,j) := 0.0; rt2(i,j) := 0.0; end loop; end loop; for i in res'range loop for j in logx1'range loop logx1(j) := logx(j)(i); end loop; vLpRs_pipe(file,r,s(0..r),logs(0..r),logx1(0..r),srp,dsp,p,l,v,rt1,rt2); res(i) := v(r)/l(r); end loop; return res; end vLpRs_Extrapolate; procedure vLpRs_Extrapolate ( file : in file_type; r : in natural; s,logs : in Float_Vectors.Vector; logx,wvl0 : in Float_Vectors_of_Vectors.Vector; wvl1 : in out Float_Vectors_of_Vectors.Vector; w,wv,wl : out Float_Vectors.Vector ) is -- DESCRIPTION : -- Higher-order extrapolation based on vLpRs-Algorithm, -- writes an error table on file. -- REQUIRED : r >= 1. n : constant natural := logx(r)'length; logx1 : Float_Vectors.Vector(0..r); rt1,rt2 : Float_Matrices.Matrix(1..r-1,1..r-1); srp,dsp : Float_Vectors.Vector(1..r-1) := (1..r-1 => 0.0); p : Float_Vectors.Vector(0..r-1) := (0..r-1 => 0.0); l,v : Float_Vectors.Vector(0..r) := (0..r => 0.0); error : Float_Vectors.Vector(1..r) := (1..r => 0.0); begin for i in rt1'range(1) loop for j in rt1'range(2) loop rt1(i,j) := 0.0; rt2(i,j) := 0.0; end loop; end loop; for i in logx(r)'range loop for j in logx1'range loop logx1(j) := logx(j)(i); end loop; vLpRs_pipe(file,r,s(0..r),logs(0..r),logx1(0..r),srp,dsp,p,l,v,rt1,rt2); w(i) := v(r)/l(r); put(file,s(r),2,3,3); for j in 1..r loop wvl1(j)(i) := v(j)/l(j); error(j) := abs(wvl1(j)(i)-wvl0(j)(i)); put(file,error(j),2,3,3); end loop; new_line(file); end loop; wv := v; wl := l; end vLpRs_Extrapolate; -- HIGHER-ORDER EXTRAPOLATION (target routines) : procedure Affine_Update_Direction ( r,m,estm,cntm : in out natural; thresm : in natural; er : in out integer; t,target : in double_complex; x : in Complex_Vectors.Vector; dt,s,logs : in out Float_Vectors.Vector; logx,wvl0,wvl1,wvltmp : in out Float_Vectors_of_Vectors.Vector; v,diferr : in out Float_Vectors.Vector; error : in out double_float ) is use Float_Vectors; res : Float_Vectors.Vector(v'range); eps,newerr : double_float; newm : boolean := false; begin Affine_Update_Extrapolation_Data (r,m,t,target,x,dt,s,logs,logx,wvl0,wvl1,wvltmp); if r >= 1 then res := vLpRs_Extrapolate(r,s,logs,logx); newerr := Norm1(res-v); end if; if r < s'last then r := r+1; end if; if r >= 3 and (newerr < error) then --Estimate(r,r,thresm,m,estm,cntm,dt,s,logs,error,newerr,eps,newm); if newm then res := vLpRs_Extrapolate(r,s,logs,logx); newerr := Norm1(res-v); end if; end if; if r >= 1 then v := res; error := newerr; end if; end Affine_Update_Direction; procedure Affine_Update_Direction ( file : in file_type; r,m,estm,cntm : in out natural; thresm : in natural; er : in out integer; t,target : in double_complex; x : in Complex_Vectors.Vector; dt,s,logs : in out Float_Vectors.Vector; logx,wvl0,wvl1,wvltmp : in out Float_Vectors_of_Vectors.Vector; v,diferr : in out Float_Vectors.Vector; error : in out double_float ) is use Float_Vectors; res,errorv,newerrv : Float_Vectors.Vector(v'range); wv,wl : Float_Vectors.Vector(0..r); ind : natural := 1; -- errors based on first-order extrapolation rat,eps,newerr : double_float; mv,cntmv,estmv : Integer_Vectors.Vector(v'range); newm : boolean := false; begin Affine_Update_Extrapolation_Data (r,m,t,target,x,dt,s,logs,logx,wvl0,wvl1,wvltmp); Write_Update_Information(file,r,m,s(r),logs(r),logx(r).all); if r >= 1 then vLpRs_Extrapolate(file,r,s,logs,logx,wvl1,wvltmp,res,wv,wl); if r = 1 then diferr(0) := 1.0; end if; for i in errorv'range loop errorv(i) := abs(wvltmp(ind)(i) - wvl1(ind)(i)); end loop; Shift_Up(diferr,Norm1(errorv)); if er < diferr'last-1 then er := er+1; end if; end if; if er >= 1 and (diferr(0) < diferr(1)) then-- Estimate0(r,thresm,m,estm,cntm,diferr(1),diferr(0),rat,eps,newm); Estimate(file,er,thresm,m,estm,cntm,dt(r)/dt(r-1), diferr,rat,eps,newm); put(file,"Ratio for m : "); put(file,rat,3,3,3); put(file," and accuracy : "); put(file,eps,3,3,3); new_line(file); if newm then Refresh_Window(r,m,dt,s,logs); put_line(file,"Extrapolation after adjusting the m-value :"); vLpRs_Extrapolate(file,r,s,logs,logx,wvl1,wvltmp,res,wv,wl); for i in errorv'range loop errorv(i) := abs(wvltmp(ind)(i) - wvl1(ind)(i)); end loop; Shift_Up(diferr,Norm1(errorv)); er := -2; put(file,"old direction : "); put(file,v); new_line(file); put(file,"new direction : "); put(file,res); new_line(file); end if; end if; if r >= 1 then v := res; Update_Errors(r,errorv,error,wvl0,wvl1,wvltmp); end if; if r < s'last then r := r+1; end if; end Affine_Update_Direction; procedure Projective_Update_Direction ( r,m,estm,cntm : in out natural; thresm : in natural; er : in out integer; t,target : in double_complex; x : in Complex_Vectors.Vector; dt,s,logs : in out Float_Vectors.Vector; logx : in out Float_Vectors_of_Vectors.Vector; prevv,v : in out Float_Vectors.Vector; error : in out double_float ) is use Float_Vectors; res : Float_Vectors.Vector(v'range); eps,newerr : double_float; newm : boolean := false; begin Projective_Update_Extrapolation_Data(r,m,t,target,x,dt,s,logs,logx); if r >= 1 then res := vLpRs_Extrapolate(r,s,logs,logx); error := Norm1(res-prevv); newerr := Norm1(res-v); prevv := v; v := res; end if; -- if r >= 2 and (newerr < error) -- then Estimate(r,r,thresm,m,estm,cntm,dt,s,logs,error,newerr,eps,newm); -- end if; if r < s'last then r := r+1; end if; error := newerr; end Projective_Update_Direction; procedure Projective_Update_Direction ( file : in file_type; r,m,estm,cntm : in out natural; thresm : in natural; er : in out integer; t,target : in double_complex; x : in Complex_Vectors.Vector; dt,s,logs : in out Float_Vectors.Vector; logx : in out Float_Vectors_of_Vectors.Vector; prevv,v : in out Float_Vectors.Vector; error : in out double_float ) is use Float_Vectors; res : Float_Vectors.Vector(v'range); eps,newerr : double_float; newm : boolean := false; begin Projective_Update_Extrapolation_Data(r,m,t,target,x,dt,s,logs,logx); Write_Update_Information(file,r,m,s(r),logs(r),logx(r).all); if r >= 1 then res := vLpRs_Extrapolate(file,r,s,logs,logx); error := Norm1(res-prevv); newerr := Norm1(res-v); prevv := v; v := res; end if; if r < s'last then r := r+1; end if; -- if r >= 2 and (newerr < error) -- then Estimate(r,r,thresm,m,estm,cntm,dt,s,logs,error,newerr,eps,newm); -- end if; error := newerr; end Projective_Update_Direction; end Directions_of_Solution_Paths; SHAR_EOF fi # end of overwriting check if test -f 'directions_of_solution_paths.ads' then echo shar: will not over-write existing file "'directions_of_solution_paths.ads'" else cat << "SHAR_EOF" > 'directions_of_solution_paths.ads' with text_io; use text_io; with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Numbers; use Complex_Numbers; with Float_Vectors,Complex_Vectors; with Float_Vectors_of_Vectors; package Directions_of_Solution_Paths is -- DESCRIPTION : -- This package provides some routines to estimate numerically the direction -- of a solution path diverging to a solution of a face system. procedure Affine_Update_Direction ( t,prev_t,target : in double_complex; x,prevx : in Complex_Vectors.Vector; prevdls,prevstep : in out double_float; prevdiff,v : in out Float_Vectors.Vector ); -- DESCRIPTION : -- Computes an approximation of the direction of the path. -- When prevdls /= 0.0, a second-order extrapolation will be applied. -- ON ENTRY : -- t current value of continuation parameter; -- prev_t previous value of continuation parameter; -- target target value of continuation parameter; -- x current solution vector; -- prevx solution vector for previous value of continuation parameter; -- prevdls previous difference of the logs of distances to target; -- prevstep previous step size; -- prevdiff previous difference of the logs of the solution vectors; -- v current approximate direction of the path. procedure Projective_Update_Direction ( t,prev_t,target : in double_complex; x,prevx : in Complex_Vectors.Vector; prevdls,prevstep : in out double_float; prevdiff,v : in out Float_Vectors.Vector ); -- DESCRIPTION : -- Does the same as the other procedure, under the assumption that the -- solution vector lies in projective space. -- REQUIRED : -- The homogenization variable is the last element of the solution vector. procedure Affine_Update_Direction ( r,m,estm,cntm : in out natural; thresm : in natural; er : in out integer; t,target : in double_complex; x : in Complex_Vectors.Vector; dt,s,logs : in out Float_Vectors.Vector; logx,wvl0,wvl1,wvltmp : in out Float_Vectors_of_Vectors.Vector; v,diferr : in out Float_Vectors.Vector; error : in out double_float ); procedure Affine_Update_Direction ( file : in file_type; r,m,estm,cntm : in out natural; thresm : in natural; er : in out integer; t,target : in double_complex; x : in Complex_Vectors.Vector; dt,s,logs : in out Float_Vectors.Vector; logx,wvl0,wvl1,wvltmp : in out Float_Vectors_of_Vectors.Vector; v,diferr : in out Float_Vectors.Vector; error : in out double_float ); -- DESCRIPTION : -- Higher-order extrapolation method that produces direction with error of -- order (t-target)^r, when the solution path converges to regular solution -- in affine space. -- REQUIRED : s'range = logs'range = logx'range = 0..max, -- wvl'range = 1..max, logx(i)'range = wvl'range(i) = 1..n, -- diferr'range = 0..max, max >= 1, equals maximal order of extrapolator. -- ON ENTRY : -- file to write intermediate data, if not submitted, no output; -- r last meaningful entry in logx and logs; -- m current value for multiplicity; -- estm current estimate for multiplicity; -- cntm number of consecutive times estm has been guessed; -- thresm threshold for changing the m to estm; -- er order of extrapolator on the errors; -- t current value of continuation parameter; -- target target value of continuation parameter; -- x current solution for t; -- dt consecutive distances of t-values to target value; -- s consecutive s-values, with proper value for m; -- logs logarithms of previous values (target - t); -- logx logarithms of previous solution vectors; -- wvl0 previous consecutive estimates for direction; -- wvl1 current consecutive estimates for direction; -- wvltmp work space for updating wvl0 and wvl1. -- ON RETURN : -- r if r < logs'last, then r will be raised by one, -- otherwise r remains unchanged; -- s updated distance vector; -- logs updated vector of logarithms of distances to target; -- logx updated vector of solution vectors; -- wvl0 updated previous consecutive estimates, equals wvl1; -- wvl1 updated current consecutive estimates for direction; -- v estimated direction of path; -- diferr norms of consecutive differences of estimates for v; -- error norm of errorv; procedure Projective_Update_Direction ( r,m,estm,cntm : in out natural; thresm : in natural; er : in out integer; t,target : in double_complex; x : in Complex_Vectors.Vector; dt,s,logs : in out Float_Vectors.Vector; logx : in out Float_Vectors_of_Vectors.Vector; prevv,v : in out Float_Vectors.Vector; error : in out double_float ); procedure Projective_Update_Direction ( file : in file_type; r,m,estm,cntm : in out natural; thresm : in natural; er : in out integer; t,target : in double_complex; x : in Complex_Vectors.Vector; dt,s,logs : in out Float_Vectors.Vector; logx : in out Float_Vectors_of_Vectors.Vector; prevv,v : in out Float_Vectors.Vector; error : in out double_float ); -- DESCRIPTION : -- Higher-order extrapolation method that produces direction with error of -- order (t-target)^r, when the solution path converges to regular solution -- in affine space. -- REQUIRED : -- x(x'last) contains value of variable introduced to homogenize the system. end Directions_of_Solution_Paths; SHAR_EOF fi # end of overwriting check if test -f 'dispatch_predictors.adb' then echo shar: will not over-write existing file "'dispatch_predictors.adb'" else cat << "SHAR_EOF" > 'dispatch_predictors.adb' with Predictors; use Predictors; package body Dispatch_Predictors is procedure Single_Predictor ( s : in out Solu_Info; p : in Pred_Pars; prev_x,prev_v : in Vector; v : in out Vector; prev_t,target : in double_complex; step,tol : in double_float; trial : in out natural ) is procedure TR_Predictor is new Tangent_Single_Real_Predictor(Norm,dH,dH); procedure TC_Predictor is new Tangent_Single_Complex_Predictor(Norm,dH,dH); procedure TG_Predictor is new Tangent_Geometric_Predictor(Norm,dH,dH); procedure HR_Predictor is new Hermite_Single_Real_Predictor(Norm,dH,dH); begin case p.predictor_type is when 0 => Secant_Single_Real_Predictor (s.sol.v,prev_x,s.sol.t,prev_t,target,step,tol,p.power); when 1 => Secant_Single_Complex_Predictor (s.sol.v,prev_x,s.sol.t,prev_t,target,step,tol, p.dist_target,trial); when 2 => Secant_Geometric_Predictor (s.sol.v,prev_x,s.sol.t,prev_t,target,step,tol); when 3 => TR_Predictor(s.sol.v,s.sol.t,target,step,tol,p.power); s.nsyst := s.nsyst + 1; when 4 => TC_Predictor (s.sol.v,s.sol.t,target,step,tol,p.dist_target,trial); s.nsyst := s.nsyst + 1; when 5 => TG_Predictor(s.sol.v,s.sol.t,target,step,tol); s.nsyst := s.nsyst + 1; when 6 => HR_Predictor (s.sol.v,prev_x,s.sol.t,prev_t,target,v,prev_v,step,tol); s.nsyst := s.nsyst + 1; when others => null; end case; end Single_Predictor; procedure Multiple_Predictor ( s : in out Solu_Info_Array; p : in Pred_Pars; sa : in out Solution_Array; prev_sa : in Solution_Array; t : in out double_complex; prev_t,target : in double_complex; step,tol,dist : in double_float; trial : in natural ) is cnt : natural := 0; procedure TR_Predictor is new Tangent_Multiple_Real_Predictor(Norm,dH,dH); procedure TC_Predictor is new Tangent_Multiple_Complex_Predictor(Norm,dH,dH); begin case p.predictor_type is when 0 => Secant_Multiple_Real_Predictor (sa,prev_sa,t,prev_t,target,step,tol,dist,p.power); when 1 => Secant_Multiple_Complex_Predictor (sa,prev_sa,t,prev_t,target,step,tol,dist, p.dist_target,trial); when 3 => TR_Predictor(sa,t,target,step,tol,dist,cnt,p.power); for k in s'range loop s(k).nsyst := s(k).nsyst + 1; end loop; when 4 => TC_Predictor (sa,t,target,step,tol,dist,p.dist_target,trial,cnt); for k in s'range loop s(k).nsyst := s(k).nsyst + 1; end loop; when others => null; end case; end Multiple_Predictor; end Dispatch_Predictors; SHAR_EOF fi # end of overwriting check if test -f 'dispatch_predictors.ads' then echo shar: will not over-write existing file "'dispatch_predictors.ads'" else cat << "SHAR_EOF" > 'dispatch_predictors.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Numbers,Complex_Vectors; use Complex_Numbers,Complex_Vectors; with Complex_Matrices; use Complex_Matrices; with Solutions,Continuation_Data; use Solutions,Continuation_Data; package Dispatch_Predictors is -- DESCRIPTION : -- This package provides generic predictors. generic with function Norm ( x : Vector ) return double_float; with function dH ( x : Vector; t : double_complex ) return Vector; -- returns the derivatives of H(x,t) w.r.t. t in (x,t) with function dH ( x : Vector; t : double_complex ) return Matrix; -- returns the Jacobian matrix of H(x,t) at (x,t) procedure Single_Predictor ( s : in out Solu_Info; p : in Pred_Pars; prev_x,prev_v : in Vector; v : in out Vector; prev_t,target : in double_complex; step,tol : in double_float; trial : in out natural ); -- DESCRIPTION : -- Generic predictor for one solution. -- ON ENTRY : -- s information about the current solution; -- p parameters for the predictor; -- prev_x previous solution component (only for secant); -- prev_t previous value for t (only useful for secant); -- target target value for continuation parameter; -- step current step size; -- tol tolerance for floating equalities; -- trial number of consecutive trials (for complex predictor). -- ON RETURN : -- s predicted value for solution. generic with function Norm ( x : Vector ) return double_float; with function dH ( x : Vector; t : double_complex ) return Vector; -- returns the derivatives of H(x,t) w.r.t. t in (x,t) with function dH ( x : Vector; t : double_complex ) return Matrix; -- returns the Jacobian matrix of H(x,t) at (x,t) procedure Multiple_Predictor ( s : in out Solu_Info_Array; p : in Pred_Pars; sa : in out Solution_Array; prev_sa : in Solution_Array; t : in out double_complex; prev_t,target : in double_complex; step,tol,dist : in double_float; trial : in natural ); -- DESCRIPTION : -- Generic predictor for an array of solutions. -- ON ENTRY : -- s array with information of current solutions; -- sa the current solutions; -- p parameters for the predictor; -- prev_sa previous solution component (only for secant); -- t current value for continuation parameter; -- prev_t previous value for t (only useful for secant); -- target target value for continuation parameter; -- step current step size; -- tol tolerance for floating equalities; -- dist tolerance for distance between solutions; -- trial number of consecutive trials (for complex predictor). -- ON RETURN : -- sa predicted values for solutions; -- t predicted continuation parameter. end Dispatch_Predictors; SHAR_EOF fi # end of overwriting check if test -f 'driver_for_winding_numbers.adb' then echo shar: will not over-write existing file "'driver_for_winding_numbers.adb'" else cat << "SHAR_EOF" > 'driver_for_winding_numbers.adb' with integer_io,Numbers_io; use integer_io,Numbers_io; with Communications_with_User; use Communications_with_User; with File_Operations; use File_Operations; with Timing_Package; use Timing_Package; with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Vectors,Complex_Norms; use Complex_Vectors,Complex_Norms; with Homotopy; with Solutions_io; use Solutions_io; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Continuation_Parameters; use Continuation_Parameters; with Continuation_Data; use Continuation_Data; with Path_Trackers; use Path_Trackers; with Driver_for_Homotopy_Construction; with Drivers_for_Polynomial_Continuation; use Drivers_for_Polynomial_Continuation; procedure Driver_for_Winding_Numbers ( file : in file_type; p : in Poly_Sys; sols : in out Solution_List ) is use Floating_Point_Numbers.double_float_io; infile : file_type; timer : timing_widget; pp,q : Poly_Sys(p'range); found,proj : boolean := false; target : double_complex; ans : character; oc,max_wc : natural; procedure Write_Statistics_and_Condition ( file : in file_type; i,nstep,nfail,niter,nsyst : in natural; rcond : in double_float ) is -- DESCRIPTION : -- Writes the computing statistics of the ith path on file, followed -- by the estimate for the inverse of the condition number. begin put(file,"========================================"); put_line(file,"==================================="); put(file,"== "); put(file,i,1); put(file," = "); put(file," #step : "); put(file,nstep,3); put(file," #fail : "); put(file,nfail,2); put(file," #iter : "); put(file,niter,3); if nsyst /= niter then put(file," #syst : "); put(file,nsyst,3); end if; put(file," = "); put(file," rco : "); put(file,rcond,2,3,3); put_line(file," =="); end Write_Statistics_and_Condition; procedure Winding_Numbers ( file : in file_type; sols : in out Solution_List; proj : in boolean; target : in double_complex; mwc : in natural ) is -- DESCRIPTION : -- Computes the winding number for the given list of solutions. -- REQUIRED : -- The homotopy is already defined and stored in the package homotopy. sa : Solu_Info_Array(1..Length_Of(sols)) := Deep_Create(sols); pen : Pred_Pars := Continuation_Parameters.Create_End_Game; cen : Corr_Pars := Continuation_Parameters.Create_End_Game; tol : constant double_float := 10.0**(-10); epslop : constant double_float := 10.0**(-6); wc : natural; sum,allsum : Complex_Vectors.Vector(sa(sa'first).sol.v'range); procedure CCont2 is new Circular_Single_Conditioned_Reporting_Continue (Norm1,Homotopy.Eval,Homotopy.Diff,Homotopy.Diff); begin for i in sa'range loop if modulus(CMPLX(1.0) - sa(i).sol.t) > epslop then CCont2(file,sa(i),target,tol,epslop,wc,mwc,sum,allsum,false,pen,cen); sa(i).sol.m := wc; sa(i).sol.v := allsum; sa(i).sol.t := target; Write_Statistics_and_Condition (file,i,sa(i).nstep,sa(i).nfail,sa(i).niter,sa(i).nsyst,sa(i).rcond); put(file,sa(i).sol.all); end if; end loop; Clear(sols); sols := Shallow_Create(sa); end Winding_Numbers; begin -- READING MAXIMUM WINDING NUMBER : new_line; put("Give the maximum winding number : "); Read_Natural(max_wc); -- READING THE START SYSTEM : new_line; put_line("Reading the name of the file for start system."); Read_Name_and_Open_File(infile); get(infile,q); new_line; put_line(file,"THE START SYSTEM :"); new_line(file); put(file,q); new_line(file); -- CONSTRUCTING THE HOMOTOPY AND TUNING OF PARAMETERS : Copy(p,pp); Driver_for_Homotopy_Construction(file,pp,q,sols,target); proj := (Number_of_Unknowns(q(q'first)) > q'last); Driver_for_Continuation_Parameters(file); new_line; put("Do you want intermediate output during continuation ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then Driver_for_Process_io(file,oc); end if; -- COMPUTATION OF WINDING NUMBERS : new_line; put_line("No more input desired. Computing winding numbers ..."); put_line("The program can now run in the background."); new_line; tstart(timer); Winding_Numbers(file,sols,proj,target,max_wc); tstop(timer); new_line(file); print_times(file,timer,"computation of winding numbers"); new_line(file); end Driver_for_Winding_Numbers; SHAR_EOF fi # end of overwriting check if test -f 'driver_for_winding_numbers.ads' then echo shar: will not over-write existing file "'driver_for_winding_numbers.ads'" else cat << "SHAR_EOF" > 'driver_for_winding_numbers.ads' with text_io; use text_io; with Complex_Numbers,Solutions; use Complex_Numbers,Solutions; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; procedure Driver_for_Winding_Numbers ( file : in file_type; p : in Poly_Sys; sols : in out Solution_List ); -- DESCRIPTION : -- Interactive driver for the computation of winding numbers. -- The user will be asked to define a homotopy. -- ON ENTRY : -- file file to write intermediate results on; -- p a polynomial system; -- sols solution list, with t < target value for continuation. -- ON RETURN : -- sols refined solution list with appropriate winding number. SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_path_directions.adb' then echo shar: will not over-write existing file "'drivers_for_path_directions.adb'" else cat << "SHAR_EOF" > 'drivers_for_path_directions.adb' with integer_io,Numbers_io; use integer_io,Numbers_io; with Communications_with_User; use Communications_with_User; with Timing_Package; use Timing_Package; with Floating_Point_Numbers; use Floating_Point_Numbers; with Float_Vectors,Complex_Vectors; with Complex_Norms,Complex_Matrices; use Complex_Norms,Complex_Matrices; with Substitutors; use Substitutors; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Homotopy; with Projective_Transformations; use Projective_Transformations; --with Toric_Compactification_Data; with Continuation_Data; use Continuation_Data; with Continuation_Parameters; use Continuation_Parameters; with Increment_and_Fix_Continuation; use Increment_and_Fix_Continuation; package body Drivers_for_Path_Directions is -- AUXILIARIES TO INSTANTIATE : function Scale ( v : Float_Vectors.Vector ) return Float_Vectors.Vector is -- DESCRIPTION : -- Divides the vector by its largest component. res : Float_Vectors.Vector(v'range); tol : constant double_float := 10.0**(-12); ind : integer := v'first; max : double_float := abs(v(ind)); begin for i in v'range loop if abs(v(i)) > max then max := abs(v(i)); ind := i; end if; end loop; if max > tol then for i in v'range loop res(i) := v(i)/max; end loop; end if; return res; end Scale; function Toric_Evaluator ( x : Complex_Vectors.Vector; t : double_complex ) return Complex_Vectors.Vector is begin -- if not Toric_Compactification_Data.Numeric_Empty -- then return Toric_Compactification_Data.Eval(x,t); -- else return Homotopy.Eval(x,t); -- end if; end Toric_Evaluator; function Toric_Differentiator ( x : Complex_Vectors.Vector; t : double_complex ) return Complex_Vectors.Vector is begin --if not Toric_Compactification_Data.Numeric_Empty -- then return Toric_Compactification_Data.Eval(x,t); -- else return Homotopy.Eval(x,t); --end if; end Toric_Differentiator; function Toric_Differentiator ( x : Complex_Vectors.Vector; t : double_complex ) return Complex_Matrices.Matrix is begin --if not Toric_Compactification_Data.Numeric_Empty -- then return Toric_Compactification_Data.Diff(x,t); -- else return Homotopy.Diff(x,t); --end if; end Toric_Differentiator; -- TARGET ROUTINES : procedure Init_Path_Directions ( n,nv : in natural; v : in out Float_Vectors_of_Vectors.Link_to_Vector; errv : in out Float_Vectors.Link_to_Vector ) is begin v := new Float_Vectors_of_Vectors.Vector(1..nv); for i in v'range loop v(i) := new Float_Vectors.Vector'(1..n => 0.0); end loop; errv := new Float_Vectors.Vector'(1..nv => 1.0); end Init_Path_Directions; procedure Toric_Continue ( file : in file_type; sols : in out Solution_List; proj,report : in boolean; v : in out Float_Vectors_of_Vectors.Vector; errv : in out Float_Vectors.Vector; target : in double_complex ) is -- DESCRIPTION : -- Performs the continuation with online toric compactifications. timer : timing_widget; h : constant Poly_Sys := Homotopy.Eval(target); --Homotopy.Homotopy_System; n : constant natural := h'length; hh : Poly_Sys(h'range); procedure Sil_Cont is new Silent_Toric_Continue(Norm1,Toric_Evaluator, Toric_Differentiator,Toric_Differentiator); procedure Rep_Cont is new Reporting_Toric_Continue(Norm1,Toric_Evaluator, Toric_Differentiator,Toric_Differentiator); begin -- if proj -- then Copy(h,hh); Toric_Compactification_Data.Initialize(hh,n); -- else Toric_Compactification_Data.Symbolic_Initialize(h,n+1); -- end if; tstart(timer); if report then Rep_Cont(file,sols,proj,v,errv,target); else Sil_Cont(sols,proj,v,errv,target); end if; tstop(timer); new_line(file); print_times(file,timer,"toric continuation"); new_line(file); end Toric_Continue; procedure Write_Directions ( file : in file_type; v : in Float_Vectors_of_Vectors.Vector; errv : in Float_Vectors.Vector ) is use Floating_Point_Numbers.double_float_io; use Float_Vectors; procedure Write ( file : in file_type; v : in Vector ) is begin for i in v'range loop put(file,v(i)); new_line(file); end loop; end Write; procedure Write_Direction ( file : in file_type; v : in Vector; error : in double_float; i : natural ) is -- sv : Vector(v'range) := Scale(v); begin put(file,"Computed direction of path "); put(file,i,1); put_line(file," :"); Write(file,v); put(file,"with error : "); put(file,error); new_line(file); -- put(file,"Scaled direction of path "); -- put(file,i,1); put_line(file," :"); Write(file,sv); -- if not Toric_Compactification_Data.Symbolic_Empty -- then put_line(file,"Corresponding compactification :"); -- Toric_Compactification_Data.Numeric_Update(-sv); -- declare -- p : constant Poly_Sys -- := Toric_Compactification_Data.Polynomial_System; -- begin -- put(file,p); -- put_line(file,"The face system equals : "); -- put(file,Substitute(p'last+1,CMPLX(0.0),p)); -- end; -- Toric_Compactification_Data.Numeric_Clear; -- end if; end Write_Direction; begin for i in v'range loop Write_Direction(file,v(i).all,errv(i),i); end loop; end Write_Directions; end Drivers_for_Path_Directions; SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_path_directions.ads' then echo shar: will not over-write existing file "'drivers_for_path_directions.ads'" else cat << "SHAR_EOF" > 'drivers_for_path_directions.ads' with text_io; use text_io; with Complex_Numbers; use Complex_Numbers; with Float_Vectors; with Float_Vectors_of_Vectors; with Solutions; use Solutions; package Drivers_for_Path_Directions is -- DESCRIPTION : -- This package provides driver routines for the computation of the -- direction of the solution paths. procedure Init_Path_Directions ( n,nv : in natural; v : in out Float_Vectors_of_Vectors.Link_to_Vector; errv : in out Float_Vectors.Link_to_Vector ); -- DESCRIPTION : -- Initializes the data for path directions. -- ON ENTRY : -- n dimension of the solution vectors; -- nv number of solution paths. -- ON RETURN : -- v nv zero vectors of range 1..n; -- errv nv entries equal to 1.0. procedure Toric_Continue ( file : in file_type; sols : in out Solution_List; proj,report : in boolean; v : in out Float_Vectors_of_Vectors.Vector; errv : in out Float_Vectors.Vector; target : in double_complex ); -- DESCRIPTION : -- Performs the continuation with computation of path directions. procedure Write_Directions ( file : in file_type; v : in Float_Vectors_of_Vectors.Vector; errv : in Float_Vectors.Vector ); -- DESCRIPTION : -- Writes the directions of the paths with their errors to the file. end Drivers_for_Path_Directions; SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_polynomial_continuation.adb' then echo shar: will not over-write existing file "'drivers_for_polynomial_continuation.adb'" else cat << "SHAR_EOF" > 'drivers_for_polynomial_continuation.adb' with integer_io,Numbers_io; use integer_io,Numbers_io; with Communications_with_User; use Communications_with_User; with Timing_Package; use Timing_Package; with File_Operations; use File_Operations; with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Norms,Complex_Numbers_io; use Complex_Norms,Complex_Numbers_io; with Complex_Multivariate_Polynomials; with Symbol_Table,Symbol_Table_io; use Symbol_Table; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Solutions_io; use Solutions_io; with Continuation_Parameters; with Continuation_Parameters_io; with Homotopy; with Projective_Transformations; use Projective_Transformations; with Increment_and_Fix_Continuation; use Increment_and_Fix_Continuation; with Process_io; use Process_io; with Driver_for_Homotopy_Construction; with Drivers_for_Path_Directions; use Drivers_for_Path_Directions; package body Drivers_for_Polynomial_Continuation is -- AUXILIARIES : procedure Continue ( file : in file_type; sols : in out Solution_List; proj,report : in boolean; target : in double_complex ) is -- DECRIPTION : -- Performs a normal continuation, without toric compactifications. timer : timing_widget; procedure Sil_Cont is new Silent_Continue(Norm1,Homotopy.Eval,Homotopy.Diff,Homotopy.Diff); procedure Rep_Cont is new Reporting_Continue(Norm1,Homotopy.Eval,Homotopy.Diff,Homotopy.Diff); begin tstart(timer); if report then Rep_Cont(file,sols,proj,target); else Sil_Cont(sols,proj,target); end if; tstop(timer); new_line(file); print_times(file,timer,"continuation"); end Continue; procedure Ask_Symbol is -- DESCRIPTION : -- This procedure asks for the symbol to display the additional unknown. sb : Symbol; begin put("Give symbol to display additional unknown : "); sb := (sb'range => ' '); Symbol_Table.Enlarge(1); Symbol_Table_io.Get(sb); Symbol_Table.Add(sb); end Ask_Symbol; -- TARGET ROUTINES : procedure Driver_for_Process_io ( file : in file_type; oc : out natural ) is ans : character; m : array(0..8) of string(1..65); begin put_line("MENU for Output Information during Continuation : "); m(0):=" 0 : no intermediate output information during continuation "; m(1):=" 1 : only the final solutions at the end of the paths "; m(2):=" 2 : intermediate solutions at each step along the paths "; m(3):=" 3 : information of the predictor: t and step length "; m(4):=" 4 : information of the corrector: corrections and residuals "; m(5):=" 5 : intermediate solutions and information of the predictor "; m(6):=" 6 : intermediate solutions and information of the corrector "; m(7):=" 7 : information of predictor and corrector "; m(8):=" 8 : intermediate solutions, info of predictor and corrector "; for i in m'range loop put_line(m(i)); end loop; put("Type a number beween 0 and 8 to select output information : "); Ask_Alternative(ans,"012345678"); new_line(file); put_line(file,"OUTPUT INFORMATION DURING CONTINUATION :"); case ans is when '0' => Set_output_code(nil); oc := 0; put_line(file,m(0)); when '1' => Set_output_code(nil); oc := 1; put_line(file,m(1)); when '2' => Set_output_code(s); oc := 2; put_line(file,m(2)); when '3' => Set_output_code(p); oc := 3; put_line(file,m(3)); when '4' => Set_output_code(c); oc := 4; put_line(file,m(4)); when '5' => Set_output_code(sp); oc := 5; put_line(file,m(5)); when '6' => Set_output_code(sc); oc := 6; put_line(file,m(6)); when '7' => Set_output_code(pc); oc := 7; put_line(file,m(7)); when '8' => Set_output_code(spc); oc := 8; put_line(file,m(8)); when others => null; end case; end Driver_for_Process_io; procedure Driver_for_Continuation_Parameters ( file : in file_type ) is nb : natural := 0; procedure Begin_Banner ( file : in file_type ) is begin put_line(file,"****************** CURRENT CONTINUATION PARAMETERS " & "*****************"); end Begin_Banner; procedure End_Banner ( file : in file_type ) is begin put_line(file,"***************************************************" & "*****************"); end End_Banner; begin loop Begin_Banner(Standard_Output); Continuation_Parameters_io.put; End_Banner(Standard_Output); Continuation_Parameters_io.get(nb); exit when (nb = 0); end loop; new_line(file); Begin_Banner(file); Continuation_Parameters_io.put(file); End_Banner(file); end Driver_for_Continuation_Parameters; procedure Check_Continuation_Parameter ( sols : in out Solution_List ) is ans : character; tre,tim : double_float; begin if not Is_Null(sols) then if Head_Of(sols).t = CMPLX(1.0) then put_line("The first solution has continuation parameter t = 1.0."); put("Do you want to change t ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then put("Give real part of t : "); Read_Double_Float(tre); put("Give imaginary part of t : "); Read_Double_Float(tim); Set_Continuation_Parameter(sols,CMPLX(tre,tim)); end if; end if; end if; end Check_Continuation_Parameter; procedure Driver_for_Polynomial_Continuation ( file : in file_type; p : in Poly_Sys; sols : out Solution_List; target : out double_complex ) is infile : file_type; pp,q : Poly_Sys(p'range); t : double_complex; qsols : Solution_List; found,proj : boolean; use Complex_Multivariate_Polynomials; procedure Read_Start_System is begin put_line("Reading the name of the file for start system."); Read_Name_and_Open_File(infile); get(infile,q); exception when others => put("The system on the file is not correct."); put_line(" Try again..."); Close(infile); Read_Start_System; end Read_Start_System; begin new_line; Read_Start_System; put_line(file,"THE START SYSTEM : "); put(file,q); new_line(file); Scan_and_Skip(infile,"SOLUTIONS",found); if found then get(infile,qsols); else new_line; Read(qsols); end if; Close(infile); Check_Continuation_Parameter(qsols); put_line(file,"THE START SOLUTIONS : "); put(file,Length_Of(qsols),Head_Of(qsols).n,qsols); new_line(file); Copy(p,pp); Driver_for_Homotopy_Construction(file,pp,q,qsols,t); proj := (Number_of_Unknowns(q(q'first)) > q'last); if proj then Ask_Symbol; end if; new_line; Driver_for_Polynomial_Continuation(file,qsols,proj,t); -- Homotopy.Clear; --> clearing here creates difficulties for root refiner sols := qsols; target := t; end Driver_for_Polynomial_Continuation; procedure Driver_for_Polynomial_Continuation ( file : in file_type; p : in Poly_Sys; k : in natural; target : in double_complex; sols : out Solution_list ) is qsols : Solution_List; begin new_line; Read(qsols); put_line(file,"THE START SOLUTIONS :"); put(file,Length_Of(qsols),Head_Of(qsols).n,qsols); new_line(file); Homotopy.Create(p,k); put_line(file,"HOMOTOPY PARAMETERS :"); put(file," k : "); put(file,k,2); new_line(file); put(file," a : "); put(file,target); new_line(file); Driver_for_Polynomial_Continuation(file,qsols,false,target); -- Homotopy.Clear; --> clearing here creates difficulties for root refiner sols := qsols; end Driver_for_Polynomial_Continuation; procedure Driver_for_Polynomial_Continuation ( file : in file_type; sols : in out Solution_List; proj : in boolean; target : double_complex := CMPLX(1.0) ) is oc : natural; timer : timing_widget; report : boolean; n : constant natural := Head_Of(sols).n; nv : constant natural := Length_Of(sols); v : Float_Vectors_of_Vectors.Link_to_Vector; errv : Float_Vectors.Link_to_Vector; begin new_line; Driver_for_Continuation_Parameters(file); if Continuation_Parameters.endext_order > 0 then Init_Path_Directions(n,nv,v,errv); end if; new_line; Driver_for_Process_io(file,oc); report := (oc /= 0); new_line; put_line("No more input expected. See output file for results."); new_line; if Continuation_Parameters.endext_order > 0 then Toric_Continue(file,sols,proj,report,v.all,errv.all,target); Write_Directions(file,v.all,errv.all); else Continue(file,sols,proj,report,target); end if; end Driver_for_Polynomial_Continuation; end Drivers_for_Polynomial_Continuation; SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_polynomial_continuation.ads' then echo shar: will not over-write existing file "'drivers_for_polynomial_continuation.ads'" else cat << "SHAR_EOF" > 'drivers_for_polynomial_continuation.ads' with text_io; use text_io; with Float_Vectors; with Float_Vectors_of_Vectors; with Complex_Numbers,Solutions; use Complex_Numbers,Solutions; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; package Drivers_for_Polynomial_Continuation is -- DESCRIPTION : -- This package contains three drivers for two types of homotopies: -- artificial and natural parameter. procedure Driver_for_Process_io ( file : in file_type; oc : out natural ); -- DESCRIPTION : -- Choice of kind of output information during continuation. -- ON ENTRY : -- file must be opened for output. -- ON RETURN : -- oc number between 0 and 8 indicating the output code: -- 0 : no intermediate output information during continuation; -- 1 : only the final solutions at the end of the paths; -- 2 : intermediate solutions at each step along the paths; -- 3 : information of the predictor: t and step length; -- 4 : information of the corrector: corrections and residuals; -- 5 : intermediate solutions and information of the predictor; -- 6 : intermediate solutions and information of the corrector; -- 7 : information of predictor and corrector; -- 8 : intermediate solutions, info of predictor and corrector. procedure Driver_for_Continuation_Parameters ( file : in file_type ); -- DESCRIPTION : -- This procedure allows the user to determine all relevant parameters -- for the continuation. procedure Check_Continuation_Parameter ( sols : in out Solution_List ); -- DESCRIPTION ; -- Reads the value of the continuation parameter for the first -- solution. If different from zero, the user is given the -- opportunity to change it. procedure Driver_for_Polynomial_Continuation ( file : in file_type; p : in Poly_Sys; sols : out Solution_list; target : out double_complex ); -- DESCRIPTION : -- This is a driver for the polynomial continuation routine -- with an artificial parameter homotopy. -- It reads the start system and start solutions and enables the -- user to determine all relevant parameters. -- ON ENTRY : -- file to write diagnostics and results on; -- p a polynomial system. -- ON RETURN : -- sols the computed solutions. procedure Driver_for_Polynomial_Continuation ( file : in file_type; p : in Poly_Sys; k : in natural; target : in double_complex; sols : out Solution_list ); -- DESCRIPTION : -- This is a driver for the polynomial continuation routine -- with a natural parameter homotopy. -- The start solutions will be read from file. -- A gentle interface makes it possible for the user to determine -- all relevant parameters. -- ON ENTRY : -- file to write diagnostics and results on; -- p a polynomial system, with n equations and n+1 unknowns; -- k index of t = xk; -- target target value for the continuation parameter. -- ON RETURN : -- sols the computed solutions. procedure Driver_for_Polynomial_Continuation ( file : in file_type; sols : in out Solution_List; proj : in boolean; target : double_complex := CMPLX(1.0) ); -- DESCRIPTION : -- Given a homotopy, contained in the package Homotopy, -- the continuation procedure will be be carried out. -- The user may tune all continuation paramters. -- ON ENTRY : -- file to write intermediate results and diagnostics on; -- sols start solutions for the continuation; -- proj true when a projective-perpendicular corrector will be used; -- target target value for the continuation parameter. -- ON RETURN : -- sols the computed solutions. end Drivers_for_Polynomial_Continuation; SHAR_EOF fi # end of overwriting check if test -f 'increment_and_fix_continuation.adb' then echo shar: will not over-write existing file "'increment_and_fix_continuation.adb'" else cat << "SHAR_EOF" > 'increment_and_fix_continuation.adb' with integer_io; use integer_io; with Complex_Numbers_io,Solutions_io; use Complex_Numbers_io,Solutions_io; with Path_Trackers; use Path_Trackers; with Continuation_Parameters; use Continuation_Parameters; with Continuation_Data; use Continuation_Data; package body Increment_and_Fix_Continuation is -- AUXILIAIRIES : function At_Infinity ( s : Solution; proj : boolean ) return boolean is -- DESCRIPTION : -- Decides whether a given solution lies at infinity. begin if proj then if modulus(s.v(s.v'last)) < 1.0/tol_endg_at_infinity then return true; else return false; end if; else for i in 1..s.n loop if modulus(s.v(i)) > tol_endg_at_infinity then return true; end if; end loop; return false; end if; end At_Infinity; function Equals ( s : in Solu_Info_Array; x : in Vector; i : in natural; d : in double_float; proj : in boolean ) return natural is -- DESCRIPTION : -- Returns the index j in the solution array s(s'first..i) of the -- solution which equals x. eq : boolean := false; j : natural := s'first; begin while j < i loop if not At_Infinity(s(j).sol.all,proj) then eq := true; if proj then for k in x'range loop if modulus(s(j).sol.v(k)/s(j).sol.v(x'last) - x(k)/x(x'last)) > d then eq := false; exit; end if; end loop; else for k in x'range loop if modulus(s(j).sol.v(k) - x(k)) > d then eq := false; exit; end if; end loop; end if; end if; exit when eq; j := j + 1; end loop; return j; end Equals; procedure Add_Clustered ( i,n : in natural; sols : in Solution_List; clusols : in out Solution_List ) is -- DESCRIPTION : -- Adds the ith start solution to the list clusols. -- The multiplicity of the solution equals i. s : Solution(n) := Get(sols,i); tol : constant double_float := 10.0**(-12); begin if not Is_In(clusols,s,tol) then s.m := i; Add(clusols,s); end if; end Add_Clustered; procedure Write_Bar ( file : in file_type ) is begin put(file,"========================================"); put_line(file,"==================================="); end Write_Bar; procedure Write_Statistics ( file : in file_type; i,nstep,nfail,niter,nsyst : in natural ) is -- DESCRIPTION : -- Writes the computing statistics of the ith path on file. begin put(file,"== "); put(file,i,1); put(file," = "); put(file," #step : "); put(file,nstep,3); put(file," #fail : "); put(file,nfail,2); put(file," #iter : "); put(file,niter,3); if nsyst /= niter then put(file," #syst : "); put(file,nsyst,3); end if; put(file," = "); end Write_Statistics; procedure Write_Diagnostics ( file : in file_type; s : in out Solu_Info_Array; c : in Corr_Pars; tol : in double_float; i : in natural; proj : in boolean; ninfi,nregu,nsing,nclus,nfail : in out natural; sols : in Solution_List; clusols : in out Solution_List ) is -- DESCRIPTION : -- Writes the diagnostics for the ith solution. -- If it is a clustered solution, then the corresponding start solution -- will be added from the list sols to the list clusols. j : natural; begin if At_Infinity(s(i).sol.all,proj) then ninfi := ninfi + 1; put_line(file,"at infinity =="); elsif ((s(i).cora <= c.epsax) or else (s(i).resa <= c.epsaf) or else (s(i).corr <= c.epsrx) or else (s(i).resr <= c.epsrf)) then j := Equals(s,s(i).sol.v,i,tol,proj); if j = i then if s(i).rcond > tol_endg_inverse_condition then nregu := nregu + 1; put_line(file,"regular solution =="); else nsing := nsing + 1; put_line(file,"singular solution =="); end if; elsif s(i).rcond < tol_endg_inverse_condition then nsing := nsing + 1; s(j).sol.m := s(j).sol.m + 1; s(i).sol.m := s(i).sol.m + 1; put(file,"multiple, see "); put(file,j,1); put_line(file," =="); else nclus := nclus + 1; put(file,"clustered with "); put(file,j,1); put_line(file," =="); Add_Clustered(i,s(i).sol.n,sols,clusols); Add_Clustered(j,s(j).sol.n,sols,clusols); end if; elsif s(i).rcond < tol_endg_inverse_condition then nfail := nfail + 1; put_line(file,"failure =="); else nfail := nfail + 1; put_line(file,"failure =="); end if; end Write_Diagnostics; procedure Write_Solution ( file : in file_type; s : in Solu_Info ) is -- DESCRIPTION : -- Writes the solution and the length of the path on file. use Floating_Point_Numbers.double_float_io; begin put(file,"t : "); put(file,s.sol.t); new_line(file); put(file,"m : "); put(file,s.sol.m,1); put(file," Length of path : "); put(file,s.length_path); new_line(file); put_line(file,"the solution for t : "); put_vector(file,s.sol.all); put(file,"=="); put(file," err : "); put(file,s.cora,2,3,3); put(file," ="); put(file," rco : "); put(file,s.rcond,2,3,3); put(file," ="); put(file," res : "); put(file,s.resa,2,3,3); put_line(file," =="); end Write_Solution; procedure Diagnostics ( s : in out Solu_Info_Array; c : in Corr_Pars; tol : in double_float;i : in natural; proj : in boolean; ninfi,nregu,nsing,nclus,nfail : in out natural; sols : in Solution_List; clusols : in out Solution_List ) is -- DESCRIPTION : -- Analyzes the ith solution. If it is a clustered solution, then the -- corresponding start solution from the list sols will be added to the -- list clusols. j : natural; begin if At_Infinity(s(i).sol.all,proj) then ninfi := ninfi + 1; elsif ((s(i).cora <= c.epsax) or else (s(i).resa <= c.epsaf) or else (s(i).corr <= c.epsrx) or else (s(i).resr <= c.epsrf)) then j := Equals(s,s(i).sol.v,i,tol,proj); if j = i then if s(i).rcond > tol_endg_inverse_condition then nregu := nregu + 1; else nsing := nsing + 1; end if; elsif s(i).rcond < tol_endg_inverse_condition then nsing := nsing + 1; s(j).sol.m := s(j).sol.m + 1; s(i).sol.m := s(i).sol.m + 1; else nclus := nclus + 1; Add_Clustered(i,s(i).sol.n,sols,clusols); Add_Clustered(j,s(j).sol.n,sols,clusols); end if; elsif s(i).rcond < tol_endg_inverse_condition then nfail := nfail + 1; else nfail := nfail + 1; end if; end Diagnostics; procedure Write_Summary_Diagnostics ( file : in file_type; ninfi,nregu,nsing,nfail,nclus : in natural ) is -- DESCRIPTION : -- Writes a summary after the continuation. begin put(file,"== "); put(file,"#regu : "); put(file,nregu,1); put(file," = " ); put(file,"#sing : "); put(file,nsing,1); put(file," = " ); put(file,"#clus : "); put(file,nclus,1); put(file," = " ); put(file,"#infi : "); put(file,ninfi,1); put(file," = " ); put(file,"#fail : "); put(file,nfail,1); put_line(file," == " ); end Write_Summary_Diagnostics; procedure Merge_Clustered ( s : in out Solu_Info_Array; clusols : in Solution_List ) is -- DESCRIPTION : -- The new solutions, which were clustered before, are merged with -- the solution array, by using there multiplicity. tmp : Solution_List := clusols; ls : Link_to_Solution; begin while not Is_Null(tmp) loop ls := Head_Of(tmp); s(ls.m).sol := new Solution'(ls.all); tmp := Tail_Of(tmp); end loop; end Merge_Clustered; -- TARGET ROUTINES : procedure Silent_Continue ( sols : in out Solution_List; proj : in boolean; target : in double_complex := CMPLX(1.0) ) is sia : Solu_Info_Array(1..Length_Of(sols)) := Deep_Create(sols); ppa,pen : Pred_Pars; cpa,cen : Corr_Pars; tol : constant double_float := 10.0**(-10); dumv : Float_Vectors.Link_to_Vector; err : double_float; procedure LCont1 is new Linear_Single_Normal_Silent_Continue(Norm,H,dH,dH); procedure LCont2 is new Linear_Single_Conditioned_Silent_Continue(Norm,H,dH,dH); procedure LContN1 is new Linear_Multiple_Normal_Silent_Continue(Norm,H,dH,dH); procedure Rerun_Clustered ( s : in out Solu_Info_Array; clusols : in out Solution_List ) is oldmax : natural := max_reruns; oldblk : natural := block_size; begin condition := condition + 1; Continuation_Parameters.Tune(condition); max_reruns := oldmax - 1; block_size := Length_Of(clusols); Silent_Continue(clusols,proj,target); block_size := oldblk; Merge_Clustered(s,clusols); Deep_Clear(clusols); end Rerun_Clustered; procedure Sequential_Continue ( s : in out Solu_Info_Array; target : in double_complex; tol : in double_float; p1,p2 : in Pred_Pars; c_path,c_end : in Corr_Pars ) is ninfi,nregu,nsing,nfail,nclus : natural := 0; clusols : Solution_List; begin for i in s'range loop LCont1(s(i),target,tol,proj,p1,c_path); LCont2(s(i),target,tol,proj,0,dumv,err,p2,c_end); Diagnostics(s,c_end,tol,i,proj, ninfi,nregu,nsing,nclus,nfail,sols,clusols); end loop; if (nclus > 0) and then (max_reruns > 0) then Rerun_Clustered(s,clusols); end if; end Sequential_Continue; procedure Continue_End_Game ( s : in out Solu_Info_Array; target : in double_complex; tol : in double_float; p : in Pred_Pars; c : in Corr_Pars ) is -- DESCRIPTION : -- End game for the simultaneous path following. ninfi,nregu,nsing,nfail,nclus : natural := 0; clusols : Solution_List; begin for i in s'range loop LCont2(s(i),target,tol,proj,0,dumv,err,p,c); end loop; for i in s'range loop Diagnostics(s,c,tol,i,proj,ninfi,nregu,nsing,nclus,nfail,sols,clusols); end loop; if (nclus > 0) and then (max_reruns > 0) then Rerun_Clustered(s,clusols); end if; end Continue_end_Game; procedure Parallel_Continue ( s : in out Solu_Info_Array; target : in double_complex; tol : in double_float; p_path,p_end : in Pred_Pars; c_path,c_end : in Corr_Pars ) is -- DESCRIPTION : -- This procedure implements the simultaneous continuation of -- different solution paths. ninfi,nregu,nsing,nfail,nclus : natural := 0; nb,index : natural; blck : natural := block_size; begin nb := 1; index := 0; while index < s'last loop if blck > s'last - index then blck := s'last - index; end if; declare sbk : Solu_Info_Array(1..blck) := s(index+1..index+blck); begin LContN1(sbk,target,tol,tol_path_distance,proj,p_path,c_path); Continue_end_Game(sbk,target,tol,p_end,c_end); s(index+1..index+blck) := sbk; end; nb := nb + 1; index := index + blck; end loop; end Parallel_Continue; begin ppa := Continuation_Parameters.Create_for_Path; pen := Continuation_Parameters.Create_End_Game; cpa := Continuation_Parameters.Create_for_Path; cen := Continuation_Parameters.Create_End_Game; if block_size = 1 then Sequential_Continue(sia,target,tol,ppa,pen,cpa,cen); else Parallel_Continue(sia,target,tol,ppa,pen,cpa,cen); end if; Deep_Clear(sols); sols := Shallow_Create(sia); end Silent_Continue; procedure Reporting_Continue ( file : in file_type; sols : in out Solution_List; proj : in boolean; target : in double_complex := CMPLX(1.0) ) is sia : Solu_Info_Array(1..Length_Of(sols)) := Deep_Create(sols); ppa,pen : Pred_Pars; cpa,cen : Corr_Pars; tol : constant double_float := 10.0**(-10); dumv : Float_Vectors.Link_to_Vector; err : double_float; procedure LCont1 is new Linear_Single_Normal_Reporting_Continue(Norm,H,dH,dH); procedure LCont2 is new Linear_Single_Conditioned_Reporting_Continue(Norm,H,dH,dH); procedure LContN1 is new Linear_Multiple_Normal_Reporting_Continue(Norm,H,dH,dH); procedure CCont2 is new Circular_Single_Conditioned_Reporting_Continue(Norm,H,dH,dH); procedure Rerun_Clustered ( file : in file_type; s : in out Solu_Info_Array; clusols : in out Solution_List ) is oldmax : natural := max_reruns; oldblk : natural := block_size; begin condition := condition + 1; Continuation_Parameters.Tune(condition); max_reruns := oldmax - 1; block_size := Length_Of(clusols); Reporting_Continue(file,clusols,proj,target); block_size := oldblk; Merge_Clustered(s,clusols); Deep_Clear(clusols); end Rerun_Clustered; procedure Sequential_Continue ( file : in file_type; s : in out Solu_Info_Array; target : in double_complex; tol : in double_float; p1,p2 : in Pred_Pars; c_path,c_end : in Corr_Pars ) is ninfi,nregu,nsing,nfail,nclus : natural := 0; clusols : Solution_List; begin Write_Bar(file); for i in s'range loop LCont1(file,s(i),target,tol,proj,p1,c_path); LCont2(file,s(i),target,tol,proj,0,dumv,err,p2,c_end); Write_Statistics(file,i,s(i).nstep,s(i).nfail,s(i).niter,s(i).nsyst); Write_Diagnostics(file,s,c_end,tol,i,proj, ninfi,nregu,nsing,nclus,nfail,sols,clusols); Write_Solution(file,s(i)); end loop; Write_Summary_Diagnostics(file,ninfi,nregu,nsing,nfail,nclus); if (nclus > 0) and then (max_reruns > 0) then Rerun_Clustered(file,s,clusols); end if; end Sequential_Continue; procedure Continue_End_Game ( file : in file_type; s : in out Solu_Info_Array; target : in double_complex; tol : in double_float; p : in Pred_Pars; c : in Corr_Pars ) is ninfi,nregu,nsing,nfail,nclus : natural := 0; clusols : Solution_List; begin for i in s'range loop LCont2(file,s(i),target,tol,proj,0,dumv,err,p,c); end loop; Write_Bar(file); for i in s'range loop Write_Statistics(file,i,s(i).nstep,s(i).nfail,s(i).niter,s(i).nsyst); Write_Diagnostics(file,s,c,tol,i,proj, ninfi,nregu,nsing,nclus,nfail,sols,clusols); Write_Solution(file,s(i)); end loop; put_line(file,"The computed solutions :"); declare solus : Solution_List := Deep_Create(s); begin put(file,solus); Deep_Clear(solus); end; Write_Summary_Diagnostics(file,ninfi,nregu,nsing,nfail,nclus); if (nclus > 0) and then (max_reruns > 0) then Rerun_Clustered(file,s,clusols); end if; end Continue_end_Game; procedure Parallel_Continue ( file : in file_type; s : in out Solu_Info_Array; target : in double_complex; tol : in double_float; p_path,p_end : in Pred_Pars; c_path,c_end : in Corr_Pars ) is -- DESCRIPTION : -- This procedure implements the simultaneous continuation of -- different solution paths. ninfi,nregu,nsing,nfail,nclus : natural := 0; nb,index : natural; blck : natural := block_size; begin nb := 1; index := 0; while index < s'last loop if blck > s'last - index then blck := s'last - index; end if; declare sbk : Solu_Info_Array(1..blck) := s(index+1..index+blck); begin LContN1(file,sbk,target,tol,tol_path_distance,proj,p_path,c_path); Continue_end_Game(file,sbk,target,tol,p_end,c_end); s(index+1..index+blck) := sbk; end; nb := nb + 1; index := index + blck; end loop; end Parallel_Continue; begin ppa := Continuation_Parameters.Create_for_Path; pen := Continuation_Parameters.Create_End_Game; cpa := Continuation_Parameters.Create_for_Path; cen := Continuation_Parameters.Create_End_Game; if block_size = 1 then Sequential_Continue(file,sia,target,tol,ppa,pen,cpa,cen); else Parallel_Continue(file,sia,target,tol,ppa,pen,cpa,cen); end if; Deep_Clear(sols); sols := Shallow_Create(sia); end Reporting_Continue; -- CONTINUATION WITH ESTIMATION OF PATH DIRECTIONS : procedure Silent_Toric_Continue ( sols : in out Solution_List; proj : in boolean; v : in out Float_Vectors_of_Vectors.Vector; errv : in out Float_Vectors.Vector; target : in double_complex := CMPLX(1.0) ) is rtoric : natural := Continuation_Parameters.endext_order; sia : Solu_Info_Array(1..Length_Of(sols)) := Deep_Create(sols); ppa,pen : Pred_Pars; cpa,cen : Corr_Pars; tol : constant double_float := 10.0**(-10); procedure LCont1 is new Linear_Single_Normal_Silent_Continue(Norm,H,dH,dH); procedure LCont2 is new Linear_Single_Conditioned_Silent_Continue(Norm,H,dH,dH); procedure LContN1 is new Linear_Multiple_Normal_Silent_Continue(Norm,H,dH,dH); procedure Rerun_Clustered ( s : in out Solu_Info_Array; clusols : in out Solution_List ) is oldmax : natural := max_reruns; oldblk : natural := block_size; begin condition := condition + 1; Continuation_Parameters.Tune(condition); max_reruns := oldmax - 1; block_size := Length_Of(clusols); Silent_Toric_Continue(clusols,proj,v,errv,target); block_size := oldblk; Merge_Clustered(s,clusols); Deep_Clear(clusols); end Rerun_Clustered; procedure Sequential_Continue ( s : in out Solu_Info_Array; target : in double_complex; tol : in double_float; p1,p2 : in Pred_Pars; c_path,c_end : in Corr_Pars ) is ninfi,nregu,nsing,nfail,nclus : natural := 0; clusols : Solution_List; begin for i in s'range loop LCont1(s(i),target,tol,proj,p1,c_path); LCont2(s(i),target,tol,proj,rtoric,v(i),errv(i),p2,c_end); Diagnostics(s,c_end,tol,i,proj, ninfi,nregu,nsing,nclus,nfail,sols,clusols); end loop; if (nclus > 0) and then (max_reruns > 0) then Rerun_Clustered(s,clusols); end if; end Sequential_Continue; procedure Continue_End_Game ( s : in out Solu_Info_Array; target : in double_complex; tol : in double_float; p : in Pred_Pars; c : in Corr_Pars ) is ninfi,nregu,nsing,nfail,nclus : natural := 0; clusols : Solution_List; begin for i in s'range loop LCont2(s(i),target,tol,proj,rtoric,v(i),errv(i),p,c); end loop; for i in s'range loop Diagnostics(s,c,tol,i,proj,ninfi,nregu,nsing,nclus,nfail,sols,clusols); end loop; if (nclus > 0) and then (max_reruns > 0) then Rerun_Clustered(s,clusols); end if; end Continue_end_Game; procedure Parallel_Continue ( s : in out Solu_Info_Array; target : in double_complex; tol : in double_float; p_path,p_end : in Pred_Pars; c_path,c_end : in Corr_Pars ) is -- DESCRIPTION : -- This procedure implements the simultaneous continuation of -- different solution paths. ninfi,nregu,nsing,nfail,nclus : natural := 0; nb,index : natural; blck : natural := block_size; begin nb := 1; index := 0; while index < s'last loop if blck > s'last - index then blck := s'last - index; end if; declare sbk : Solu_Info_Array(1..blck) := s(index+1..index+blck); begin LContN1(sbk,target,tol,tol_path_distance,proj,p_path,c_path); Continue_end_Game(sbk,target,tol,p_end,c_end); s(index+1..index+blck) := sbk; end; nb := nb + 1; index := index + blck; end loop; end Parallel_Continue; begin ppa := Continuation_Parameters.Create_for_Path; pen := Continuation_Parameters.Create_End_Game; cpa := Continuation_Parameters.Create_for_Path; cen := Continuation_Parameters.Create_End_Game; if block_size = 1 then Sequential_Continue(sia,target,tol,ppa,pen,cpa,cen); else Parallel_Continue(sia,target,tol,ppa,pen,cpa,cen); end if; Deep_Clear(sols); sols := Shallow_Create(sia); end Silent_Toric_Continue; procedure Reporting_Toric_Continue ( file : in file_type; sols : in out Solution_List; proj : in boolean; v : in out Float_Vectors_of_Vectors.Vector; errv : in out Float_Vectors.Vector; target : in double_complex := CMPLX(1.0) ) is rtoric : natural := Continuation_Parameters.endext_order; sia : Solu_Info_Array(1..Length_Of(sols)) := Deep_Create(sols); ppa,pen : Pred_Pars; cpa,cen : Corr_Pars; tol : constant double_float := 10.0**(-10); procedure LCont1 is new Linear_Single_Normal_Reporting_Continue(Norm,H,dH,dH); procedure LCont2 is new Linear_Single_Conditioned_Reporting_Continue(Norm,H,dH,dH); procedure LContN1 is new Linear_Multiple_Normal_Reporting_Continue(Norm,H,dH,dH); procedure CCont2 is new Circular_Single_Conditioned_Reporting_Continue(Norm,H,dH,dH); procedure Rerun_Clustered ( file : in file_type; s : in out Solu_Info_Array; clusols : in out Solution_List ) is oldmax : natural := max_reruns; oldblk : natural := block_size; begin condition := condition + 1; Continuation_Parameters.Tune(condition); max_reruns := oldmax - 1; block_size := Length_Of(clusols); Reporting_Toric_Continue(file,clusols,proj,v,errv,target); block_size := oldblk; Merge_Clustered(s,clusols); Deep_Clear(clusols); end Rerun_Clustered; procedure Sequential_Continue ( file : in file_type; s : in out Solu_Info_Array; target : in double_complex; tol : in double_float; p1,p2 : in Pred_Pars; c_path,c_end : in Corr_Pars ) is ninfi,nregu,nsing,nfail,nclus : natural := 0; clusols : Solution_List; begin Write_Bar(file); for i in s'range loop LCont1(file,s(i),target,tol,proj,p1,c_path); LCont2(file,s(i),target,tol,proj,rtoric,v(i),errv(i),p2,c_end); Write_Statistics(file,i,s(i).nstep,s(i).nfail,s(i).niter,s(i).nsyst); Write_Diagnostics(file,s,c_end,tol,i,proj, ninfi,nregu,nsing,nclus,nfail,sols,clusols); Write_Solution(file,s(i)); end loop; Write_Summary_Diagnostics(file,ninfi,nregu,nsing,nfail,nclus); if (nclus > 0) and then (max_reruns > 0) then Rerun_Clustered(file,s,clusols); end if; end Sequential_Continue; procedure Continue_End_Game ( file : in file_type; s : in out Solu_Info_Array; target : in double_complex; tol : in double_float; p : in Pred_Pars; c : in Corr_Pars ) is ninfi,nregu,nsing,nfail,nclus : natural := 0; clusols : Solution_List; begin for i in s'range loop LCont2(file,s(i),target,tol,proj,rtoric,v(i),errv(i),p,c); end loop; Write_Bar(file); for i in s'range loop Write_Statistics(file,i,s(i).nstep,s(i).nfail,s(i).niter,s(i).nsyst); Write_Diagnostics(file,s,c,tol,i,proj, ninfi,nregu,nsing,nclus,nfail,sols,clusols); Write_Solution(file,s(i)); end loop; put_line(file,"The computed solutions :"); declare solus : Solution_List := Deep_Create(s); begin put(file,solus); Deep_Clear(solus); end; Write_Summary_Diagnostics(file,ninfi,nregu,nsing,nfail,nclus); if (nclus > 0) and then (max_reruns > 0) then Rerun_Clustered(file,s,clusols); end if; end Continue_end_Game; procedure Parallel_Continue ( file : in file_type; s : in out Solu_Info_Array; target : in double_complex; tol : in double_float; p_path,p_end : in Pred_Pars; c_path,c_end : in Corr_Pars ) is -- DESCRIPTION : -- This procedure implements the simultaneous continuation of -- different solution paths. ninfi,nregu,nsing,nfail,nclus : natural := 0; nb,index : natural; blck : natural := block_size; begin nb := 1; index := 0; while index < s'last loop if blck > s'last - index then blck := s'last - index; end if; declare sbk : Solu_Info_Array(1..blck) := s(index+1..index+blck); begin LContN1(file,sbk,target,tol,tol_path_distance,proj,p_path,c_path); Continue_end_Game(file,sbk,target,tol,p_end,c_end); s(index+1..index+blck) := sbk; end; nb := nb + 1; index := index + blck; end loop; end Parallel_Continue; begin ppa := Continuation_Parameters.Create_for_Path; pen := Continuation_Parameters.Create_End_Game; cpa := Continuation_Parameters.Create_for_Path; cen := Continuation_Parameters.Create_End_Game; if block_size = 1 then Sequential_Continue(file,sia,target,tol,ppa,pen,cpa,cen); else Parallel_Continue(file,sia,target,tol,ppa,pen,cpa,cen); end if; Deep_Clear(sols); sols := Shallow_Create(sia); end Reporting_Toric_Continue; end Increment_and_Fix_Continuation; SHAR_EOF fi # end of overwriting check if test -f 'increment_and_fix_continuation.ads' then echo shar: will not over-write existing file "'increment_and_fix_continuation.ads'" else cat << "SHAR_EOF" > 'increment_and_fix_continuation.ads' with text_io; use text_io; with Floating_Point_Numbers; use Floating_Point_Numbers; with Float_Vectors; with Float_Vectors_of_Vectors; with Complex_Numbers,Complex_Vectors; use Complex_Numbers,Complex_Vectors; with Complex_Matrices,Solutions; use Complex_Matrices,Solutions; package Increment_and_Fix_Continuation is -- DESCRIPTION : -- This package provides a general implementation of an increment-and-fix -- continuation method. The generic parameters are a norm, an evaluator and -- a differentiator of the homotopy. -- There are two basic versions: a silent and a reporting one. -- The silent continuation simply performs its calculations without output -- of intermediate results. The reporting continuation routine allows to -- put various kinds of intermediate results on a file. -- It is assumed that the continuation parameters are already determined -- before calling these routines (see Continuation_Parameters). -- For both the silent and the reporting version, the facility is added -- to estimate the directions of the solution paths, useful in a polyhedral -- end game. generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Silent_Continue ( sols : in out Solution_List; proj : in boolean; target : in double_complex := CMPLX(1.0) ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Reporting_Continue ( file : in file_type; sols : in out Solution_List; proj : in boolean; target : in double_complex := CMPLX(1.0) ); -- DESCRIPTION : -- This routine implements the continuation strategy. -- ON ENTRY : -- file to write intermediate results on (if Reporting_); -- sols the start solutions; -- proj for projective-perpendicular path following; -- target value for the continuation parameter at the end. -- ON RETURN : -- sols the computed solutions. -- WITH THE ESTIMATION OF THE PATH DIRECTIONS : generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Silent_Toric_Continue ( sols : in out Solution_List; proj : in boolean; v : in out Float_Vectors_of_Vectors.Vector; errv : in out Float_Vectors.Vector; target : in double_complex := CMPLX(1.0) ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Reporting_Toric_Continue ( file : in file_type; sols : in out Solution_List; proj : in boolean; v : in out Float_Vectors_of_Vectors.Vector; errv : in out Float_Vectors.Vector; target : in double_complex := CMPLX(1.0) ); -- DESCRIPTION : -- This routine implements the continuation strategy with the estimation -- of the directions of the solution paths at the end. -- ON ENTRY : -- file to write intermediate results on (if Reporting_); -- sols the start solutions; -- proj for projective-perpendicular path following; -- v v must be initialized with zero vectors -- and v'range is 1..Length_Of(sols); -- errv errors on the computed directions; -- target value for the continuation parameter at the end. -- ON RETURN : -- sols the computed solutions; -- v directions of the solution paths; -- errv errors on the computed directions. end Increment_and_Fix_Continuation; SHAR_EOF fi # end of overwriting check if test -f 'mainpoco.adb' then echo shar: will not over-write existing file "'mainpoco.adb'" else cat << "SHAR_EOF" > 'mainpoco.adb' with Communications_with_User; use Communications_with_User; with text_io,integer_io,Numbers_io; use text_io,integer_io,Numbers_io; with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Numbers; use Complex_Numbers; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Homotopy; with Solutions,Solutions_io; use Solutions,Solutions_io; with Projective_Transformations; use Projective_Transformations; with Root_Refiners; use Root_Refiners; with Drivers_for_Polynomial_Continuation; use Drivers_for_Polynomial_Continuation; --with Bye_Bye_Message; procedure mainpoco ( infilename,outfilename : in string ) is solsft,outft : file_type; lp : Link_to_Poly_Sys; sols,refsols : Solution_List; artificial,solsfile : boolean; k,len : natural; ans : character; tarre,tarim : double_float; target : double_complex; procedure Read_System ( filename : in string ) is file : file_type; begin if filename /= "" then Open(file,in_file,filename); get(file,lp); Close(file); end if; exception when others => new_line; put("Could not open file with name "); put_line(filename); lp := null; return; end Read_System; begin Read_System(infilename); if lp = null then new_line; get(lp); end if; Create_Output_File(outft,outfilename); put(outft,lp.all); new_line(outft); new_line; put("Do you want the solutions on separate file ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then put_line("Reading the name of the file to write the solutions on."); Read_Name_and_Create_File(solsft); solsfile := true; else solsfile := false; end if; artificial := (Number_of_Unknowns(lp(lp'first)) = lp'last); if artificial then Driver_for_Polynomial_Continuation(outft,lp.all,sols,target); else new_line; put("Give the index of the parameter : "); Read_Natural(k); new_line; put_line("Reading the target value of the continuation parameter."); put("Give the real part of the target : "); Read_Double_Float(tarre); put("Give the imaginary part of the target : "); Read_Double_Float(tarim); target := CMPLX(tarre,tarim); Driver_for_Polynomial_Continuation(outft,lp.all,k,target,sols); end if; if Length_Of(sols) > 0 then declare epsxa,epsfa,tolsing : constant double_float := 10.0**(-8); nb : natural := 0; begin if artificial then if not Is_Null(sols) and then Head_Of(sols).n > lp'last then Affine_Transformation(sols); end if; if target = CMPLX(1.0) then if solsfile then Reporting_Root_Refiner (outft,lp.all,sols,refsols,epsxa,epsfa,tolsing, nb,5,false); else Reporting_Root_Refiner (outft,lp.all,sols,epsxa,epsfa,tolsing,nb,5,false); end if; else declare pt : Poly_Sys(lp'range); begin pt := Homotopy.Eval(target); if solsfile then Reporting_Root_Refiner (outft,pt,sols,refsols,epsxa,epsfa,tolsing, nb,5,false); else Reporting_Root_Refiner (outft,pt,sols,epsxa,epsfa,tolsing,nb,5,false); end if; Clear(pt); end; end if; else declare pt : Poly_Sys(lp'range); begin pt := Eval(lp.all,target,k); if solsfile then Reporting_Root_Refiner (outft,pt,sols,refsols,epsxa,epsfa,tolsing,nb,5,false); else Reporting_Root_Refiner (outft,pt,sols,epsxa,epsfa,tolsing,nb,5,false); end if; Clear(pt); end; end if; end; end if; -- put(outft,Bye_Bye_Message); Close(outft); if solsfile then len := Length_Of(refsols); if len > 0 then put(solsft,len,Head_Of(refsols).n,refsols); end if; Close(solsft); end if; end mainpoco; SHAR_EOF fi # end of overwriting check if test -f 'mainpoco.ads' then echo shar: will not over-write existing file "'mainpoco.ads'" else cat << "SHAR_EOF" > 'mainpoco.ads' procedure mainpoco ( infilename,outfilename : in string ); -- DESCRIPTION : -- This is the polynomial continuation routine. -- The arguments are the respective names of the input and output files. SHAR_EOF fi # end of overwriting check if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' # Establishing the links : linkrc = ../../Ada/Continuation links: @-ln -s $(linkrc)/process_io.a process_io.ads @-ln -s $(linkrc)/process_ioB.a process_io.adb @-ln -s $(linkrc)/cont_data.a continuation_data.ads @-ln -s $(linkrc)/cont_dataB.a continuation_data.adb @-ln -s $(linkrc)/conpar.a continuation_parameters.ads @-ln -s $(linkrc)/conparB.a continuation_parameters.adb @-ln -s $(linkrc)/conpar_io.a continuation_parameters_io.ads @-ln -s $(linkrc)/conparB_io.a continuation_parameters_io.adb @-ln -s $(linkrc)/predictors.a predictors.ads @-ln -s $(linkrc)/predictorsB.a predictors.adb @-ln -s $(linkrc)/dispred.a dispatch_predictors.ads @-ln -s $(linkrc)/dispredB.a dispatch_predictors.adb @-ln -s $(linkrc)/correctors.a correctors.ads @-ln -s $(linkrc)/correctorsB.a correctors.adb @-ln -s $(linkrc)/dirpaths.a directions_of_solution_paths.ads @-ln -s $(linkrc)/dirpathsB.a directions_of_solution_paths.adb @-ln -s $(linkrc)/drivpadi.a drivers_for_path_directions.ads @-ln -s $(linkrc)/drivpadiB.a drivers_for_path_directions.adb @-ln -s $(linkrc)/vlprsalg.a vlprs_algorithm.ads @-ln -s $(linkrc)/vlprsalgB.a vlprs_algorithm.adb @-ln -s $(linkrc)/vlprstab.a vlprs_tables.ads @-ln -s $(linkrc)/vlprstabB.a vlprs_tables.adb @-ln -s $(linkrc)/pathtrac.a path_trackers.ads @-ln -s $(linkrc)/pathtracB.a path_trackers.adb @-ln -s $(linkrc)/continue.a increment_and_fix_continuation.ads @-ln -s $(linkrc)/continueB.a increment_and_fix_continuation.adb @-ln -s $(linkrc)/rootrefi.a root_refiners.ads @-ln -s $(linkrc)/rootrefiB.a root_refiners.adb @-ln -s $(linkrc)/drivwind.a driver_for_winding_numbers.ads @-ln -s $(linkrc)/drivwindB.a driver_for_winding_numbers.adb @-ln -s $(linkrc)/drivpoco.a drivers_for_polynomial_continuation.ads @-ln -s $(linkrc)/drivpocoB.a drivers_for_polynomial_continuation.adb @-ln -s $(linkrc)/scanpoco.a scanners_for_continuation.ads @-ln -s $(linkrc)/scanpocoB.a scanners_for_continuation.adb @-ln -s $(linkrc)/bablpoco.a bablpoco.ads @-ln -s $(linkrc)/bablpocoB.a bablpoco.adb @-ln -s $(linkrc)/blackpoco.a black_box_polynomial_continuations.ads @-ln -s $(linkrc)/blackpocoB.a black_box_polynomial_continuations.adb @-ln -s $(linkrc)/mainpoco.a mainpoco.ads @-ln -s $(linkrc)/mainpocoB.a mainpoco.adb @-ln -s $(linkrc)/valipoco.a valipoco.ads @-ln -s $(linkrc)/valipocoB.a valipoco.adb @-ln -s $(linkrc)/poco.a poco.ads SHAR_EOF fi # end of overwriting check if test -f 'path_trackers.adb' then echo shar: will not over-write existing file "'path_trackers.adb'" else cat << "SHAR_EOF" > 'path_trackers.adb' with integer_io; use integer_io; with Float_Vectors_io; use Float_Vectors_io; with Complex_Numbers_io,Process_io; use Complex_Numbers_io,Process_io; with Mathematical_Functions; use Mathematical_Functions; with Floating_Equalities; use Floating_Equalities; with Predictors,Correctors; use Predictors,Correctors; with Dispatch_Predictors; use Dispatch_Predictors; with Continuation_Parameters; use Continuation_Parameters; with Directions_of_Solution_Paths; use Directions_of_Solution_Paths; with Float_Vectors_of_Vectors; package body Path_Trackers is use Floating_Point_Numbers.double_float_io; -- AUXILIAIRIES : function At_End ( t,target : double_complex; distance,tol : double_float ) return boolean is -- DESCRIPTION : -- Decides whether at end of continuation stage. begin if distance < tol then return Is_Equal(t,target,tol); else if modulus(t-target) <= distance then return true; else return false; end if; end if; end At_End; function Stop ( p : Pred_Pars; t,target : double_complex; step : double_float ) return boolean is -- DESCRIPTION : -- Returns true if either the step size is smaller than p.minstep, or -- or alternatively, in case of geometric predictor, if the distance to -- the target has become smaller than p.minstep. begin if step <= p.minstep then return true; else if (p.predictor_type = 2) or (p.predictor_type = 5) then return (modulus(t-target) <= p.minstep); else return false; end if; end if; end Stop; function Is_Multiple ( a,b,tol : double_float ) return integer is -- DESCRIPTION : -- Returns a/b if a is a multiple of b, returns 0 in the other case. fq : double_float; iq : integer; begin if abs(b) < tol then return 0; else fq := a/b; iq := integer(fq); if abs(fq - double_float(iq)) <= tol then return iq; else return 0; end if; end if; end Is_Multiple; procedure Linear_Step_Control ( success : in boolean; p : in Pred_Pars; step : in out double_float; nsuccess : in out natural; trial : in natural ) is -- DESCRIPTION : -- Control of step size for linear path following. -- With geometric prediction, the ratio (=step) will be enlarged -- when not success. In order not to break the sequence, the ratio -- is not reduced when success. begin if (p.predictor_type = 2) or (p.predictor_type = 5) then if success then nsuccess := nsuccess + 1; else nsuccess := 0; if p.expfac < 1.0 then step := step + p.expfac*(1.0 - step); else step := step + (1.0 - step)/p.expfac; end if; if step >= 1.0 then step := p.minstep/2.0; -- that ends the game end if; end if; else if success then nsuccess := nsuccess + 1; if nsuccess > p.success_steps then step := step*p.expfac; if step > p.maxstep then step := p.maxstep; end if; end if; else nsuccess := 0; if trial mod 3 = 0 then step := step*p.redfac; end if; end if; end if; end Linear_Step_Control; procedure Circular_Step_Control ( success : in boolean; p : in Pred_Pars; twopi : in double_float; step : in out double_float; nsuccess : in out natural ) is -- DESCRIPTION : -- Control of step size for circular path following, note that the -- step size should be some multiple of pi. maxstep : constant double_float := p.maxstep*twopi; begin if success then nsuccess := nsuccess + 1; if nsuccess > p.success_steps then step := step*2.0; -- expansion factor = 2 if step > maxstep then step := maxstep; end if; end if; else nsuccess := 0; step := step*0.5; -- reduction factor = 1/2 end if; end Circular_Step_Control; procedure Set_Corrector_Parameters ( c : in out Corr_Pars; eps : double_float ) is -- DESCRIPTION : -- All eps* parameters in c are set to eps. begin c.epsrx := eps; c.epsax := eps; c.epsrf := eps; c.epsaf := eps; end Set_Corrector_Parameters; function End_Game_Corrector_Parameters ( current : Corr_Pars; distance,tol : double_float ) return Corr_Pars is -- DESCRIPTION : -- Returns corrector parameters for the end game of the first or the -- second continuation stage, depending on the distance from the target. res : Corr_Pars := current; begin if distance < tol -- correct further to detect clustering then res := current; Set_Corrector_Parameters(res,tol); else res := Create_End_Game; -- or to move to end game more smoothly end if; return res; end End_Game_Corrector_Parameters; -- MANAGEMENT OF DATA DURING PATH FOLLOWING : procedure Linear_Single_Initialize ( s : in Solu_Info; p : in Pred_Pars; old_t,prev_t : out double_complex; old_solution,prev_solution : out Vector ) is -- DESCRIPTION : -- Initialization for linear path following of one path. -- ON ENTRY : -- s solution at beginning of path; -- p predictor parameters. -- ON RETURN : -- old_t back up value for continuation parameter; -- prev_t previous value of continuation parameter; -- old_solution back up value for solution vector; -- prev_solution previous value of solution vector; begin old_t := s.sol.t; old_solution := s.sol.v; if p.predictor_type <= 2 -- for all secant predictors then prev_t := s.sol.t; prev_solution := s.sol.v; end if; end Linear_Single_Initialize; procedure Linear_Single_Management ( s : in out Solu_Info; p : in Pred_Pars; c : in Corr_Pars; old_t,prev_t : in out double_complex; old_solution,prev_solution,old_v,prev_v,vv : in out Vector; step : in out double_float; nsuccess,trial : in out natural; success : in out boolean ) is -- DESCRIPTION : -- Management of data after correction during linear path following. -- PARAMETERS : -- s current solution; -- p predictor parameters; -- c corrector parameters; -- old_t back up value for continuation parameter; -- prev_t previous value of continuation parameter; -- old_solution back up value for solution vector; -- prev_solution previous value of solution vector; -- old_v back up value for tangent direction; -- prev_v previous value for tangent direction; -- vv current tangent direction; -- step current step size; -- nsuccess number of consecutive successes; -- trial number of trials after failure; -- success successful correction step. begin success := (((s.resa <= c.epsaf) or else (s.cora <= c.epsax)) or else ((s.resr <= c.epsrf) or else (s.corr <= c.epsrx))); if ((p.predictor_type <= 2) and then success) -- secant predictors then prev_t := old_t; prev_solution := old_solution; end if; if ((p.predictor_type = 6) and then success) -- Hermite predictor then prev_t := old_t; prev_solution := old_solution; prev_v := old_v; end if; if ((p.predictor_type = 1) or (p.predictor_type = 3)) -- complex predictors then if success then trial := 0; else trial := trial + 1; end if; end if; s.nstep := s.nstep + 1; if not success then s.nfail := s.nfail + 1; end if; Linear_Step_Control(success,p,step,nsuccess,trial); if step < p.minstep then return; end if; if not success then s.sol.t := old_t; s.sol.v := old_solution; else old_t := s.sol.t; old_solution := s.sol.v; if p.predictor_type = 6 then old_v := vv; end if; end if; end Linear_Single_Management; procedure Linear_Multiple_Initialize ( s : in Solu_Info_Array; p : in Pred_Pars; t,old_t,prev_t : out double_complex; sa,old_sa,prev_sa : in out Solution_Array ) is -- DECRIPTION : -- Initialization for linear path following for more than one path. begin t := s(s'first).sol.t; old_t := s(s'first).sol.t; Copy(s,sa); Copy(sa,old_sa); case p.predictor_type is when 0 | 1 | 2 => prev_t := s(s'first).sol.t; Copy(sa,prev_sa); when others => null; end case; end Linear_Multiple_Initialize; procedure Linear_Multiple_Management ( s : in out Solu_Info_array; sa,old_sa,prev_sa : in out Solution_Array; t,old_t,prev_t : in out double_complex; p : in Pred_Pars; step : in out double_float; pivot : in natural; nsuccess,trial : in out natural; success : in boolean ) is -- DESCRIPTION : -- Management of data after correction during linear path following. -- PARAMETERS : -- s current solutions with information statistics; -- sa current solutions; -- old_sa back up value for solutions; -- prev_sa previous solutions; -- t current value of continuation parameter; -- old_t back up value for continuation parameter; -- prev_t previous value of continuation parameter; -- p predictor parameters; -- step current step size; -- pivot solution where correction is started; -- nsuccess number of consecutive successes; -- trial number of trials after failure; -- success successful correction step. begin if ((p.predictor_type <= 2) and then success) -- for secant predictors then prev_t := old_t; Copy(old_sa,prev_sa); end if; if ((p.predictor_type = 1) or (p.predictor_type = 3)) -- complex predictors then if success then trial := 0; else trial := trial + 1; end if; end if; for k in s'range loop s(k).nstep := s(k).nstep + 1; end loop; if not success then s(pivot).nfail := s(pivot).nfail + 1; end if; Linear_Step_Control(success,p,step,nsuccess,trial); if step < p.minstep then return; end if; if success then Copy(sa,old_sa); old_t := t; else Copy(old_sa,sa); t := old_t; end if; end Linear_Multiple_Management; procedure Circular_Management ( s : in out Solu_Info; p : in Pred_Pars; c : in Corr_Pars; old_t,prev_t : in out double_complex; start_solution : in Vector; old_solution,prev_solution,w_sum,w_all_sum : in out Vector; twopi,epslop,tol : in double_float; theta,old_theta,step : in out double_float; nsuccess,n_sum,n_all_sum,w_c : in out natural; max_wc : in natural; stop,success : in out boolean ) is -- DESCRIPTION : -- Management of circular path following. -- PARAMETERS : -- s current solution; -- p predictor parameters; -- c corrector parameters; -- old_t back up value for continuation parameter; -- prev_t previous value of continuation parameter; -- start_solution solution vector at start of continuation; -- old_solution back up value for solution vector; -- prev_solution previous value of solution vector; -- w_sum sum of cycle; -- w_all_sum sum of all cycles; -- twopi two times PI; -- epslop tolerance to decide whether two vectors are equal; -- theta current value of theta; -- old_theta back up value for theta; -- step current step size; -- nsuccess number of consecutive successes; -- n_sum number of cycles; -- n_all_sum total number of cycles; -- w_c winding number; -- max_wc upper bound on winding number; -- stop true when winding number has been computed; -- success successful correction step. tmp : integer; begin success := (((s.resa <= c.epsaf) or else (s.cora <= c.epsax)) or else ((s.resr <= c.epsrf) or else (s.corr <= c.epsrx))); if p.predictor_type = 0 and then success then prev_t := old_t; prev_solution := old_solution; end if; s.nstep := s.nstep + 1; if not success then s.nfail := s.nfail + 1; end if; if success then old_theta := theta; old_t := s.sol.t; old_solution := s.sol.v; w_all_sum := w_all_sum + s.sol.v; n_all_sum := n_all_sum + 1; tmp := Is_Multiple(theta,twopi*p.maxstep,tol); if tmp /= 0 then w_sum := w_sum + s.sol.v; n_sum := n_sum + 1; end if; w_c := Is_Multiple(theta,twopi,tol); if w_c /= 0 then if Is_Equal(s.sol.v,start_solution,epslop) then w_sum := w_sum - s.sol.v * CMPLX(0.5); w_all_sum := w_all_sum - s.sol.v * CMPLX(0.5); stop := true; else stop := (w_c >= max_wc); end if; end if; else theta := old_theta; s.sol.t := old_t; s.sol.v := old_solution; end if; if not stop then Circular_Step_Control(success,p,twopi,step,nsuccess); end if; end Circular_Management; -- UPDATE OF PATH DIRECTION : procedure Update_Direction ( proj : in boolean; freqcnt,defer,r,m,estm,cntm : in out natural; thresm : in natural; er : in out integer; t,target : in double_complex; x : in Vector; dt,s,logs : in out Float_Vectors.Vector; logx,wvl0,wvl1,wvl2 : in out Float_Vectors_of_Vectors.Vector; v,errv : in out Float_Vectors.Vector; err : in out double_float ) is -- DESCRIPTION : -- Computes an approximation of the direction of the path. -- ON ENTRY : -- file to write intermediate data on, may be omitted; -- proj whether solution vector lies in projective space; -- freqcnt counts the frequency of calls; -- defer only if freqcnt = defer, calculations are done; -- r current order in extrapolation formula; -- m current value for multiplicity; -- estm current estimated for multiplicity; -- cntm number of consecutive times estm has been guessed; -- thresm threshold for augmenting m to estm; -- er order of extrapolator on the errors; -- t current value of continuation parameter; -- target target value of continuation parameter; -- x current solution vector; -- dt vector with distances to target; -- s s-values w.r.t. the current value m; -- logs logarithms of the s-values; -- logx logarithms of the solution vectors; -- wvl0 consecutive estimates for previous direction; -- wvl1 consecutive estimates for current direction; -- wvl2 used as work space for wvl0 and wvl1; -- v current approximate direction of the path; -- errv vector of errors used to estimate m; -- err norm of errv. -- ON RETURN : -- All in-out variables are updated, provided freqcnt = defer. begin if freqcnt >= defer then freqcnt := 0; if proj then Projective_Update_Direction (r,m,estm,cntm,thresm,er,t,target,x,dt,s,logs,logx,v,errv,err); else Affine_Update_Direction (r,m,estm,cntm,thresm,er,t,target,x, dt,s,logs,logx,wvl0,wvl1,wvl2,v,errv,err); end if; -- defer := defer + 1; -- that is asking for troubles ! else freqcnt := freqcnt + 1; end if; end Update_Direction; procedure Update_Direction ( file : in file_type; proj : in boolean; freqcnt,defer,r,m,estm,cntm : in out natural; thresm : in natural; er : in out integer; t,target : in double_complex; x : in Vector; dt,s,logs : in out Float_Vectors.Vector; logx,wvl0,wvl1,wvl2 : in out Float_Vectors_of_Vectors.Vector; v,errv : in out Float_Vectors.Vector; err : in out double_float ) is -- DESCRIPTION : -- Computes an approximation of the direction of the path and produces -- intermediate output to the file. begin if freqcnt >= defer then freqcnt := 0; if proj then Projective_Update_Direction (file,r,m,estm,cntm,thresm,er,t,target,x, dt,s,logs,logx,v,errv,err); else Affine_Update_Direction (file,r,m,estm,cntm,thresm,er,t,target,x, dt,s,logs,logx,wvl0,wvl1,wvl2,v,errv,err); end if; -- defer := defer + 1; -- asking for troubles ! put(file,"direction : "); put(file,v); new_line(file); put(file,"difference to old direction : "); put(file,err); new_line(file); put(file,"++ current m : "); put(file,m,1); put(file," ++ "); put(file,cntm,1); put(file," times estimated m : "); put(file,estm,1); put(file," ++ threshold : "); put(file,thresm,1); put_line(file," ++"); new_line(file); else freqcnt := freqcnt + 1; end if; end Update_Direction; -- LINEAR PATH FOLLOWING FOR ONE PATH : procedure Linear_Single_Normal_Silent_Continue ( s : in out Solu_Info; target : in double_complex; tol : in double_float; proj : in boolean; p : in Pred_Pars; c : in Corr_Pars ) is old_t,prev_t : double_complex; old_solution,prev_solution,old_v,prev_v,vv : Vector(s.sol.v'range); step : double_float := p.maxstep; nsuccess,trial : natural := 0; success : boolean := true; procedure Predictor is new Single_Predictor(Norm,dH,dH); procedure Corrector ( s : in out Solu_Info; c : in Corr_Pars ) is procedure Affine_Corrector is new Affine_Single_Severe_Normal_Silent_Corrector(Norm,H,dH); procedure Projective_Corrector is new Projective_Single_Severe_Normal_Silent_Corrector(Norm,H,dH); begin if proj then Projective_Corrector(s,c); else Affine_Corrector(s,c); end if; end Corrector; begin Linear_Single_Initialize(s,p,old_t,prev_t,old_solution,prev_solution); while not (At_End(s.sol.t,target,p.dist_target,tol) and success) and (s.niter <= c.maxtot) loop Predictor(s,p,prev_solution,prev_v,vv,prev_t,target,step,tol,trial); Corrector(s,c); Linear_Single_Management(s,p,c,old_t,prev_t,old_solution,prev_solution, old_v,prev_v,vv,step,nsuccess,trial,success); if Stop(p,s.sol.t,target,step) then return; end if; end loop; declare cp : Corr_Pars := End_Game_Corrector_Parameters(c,p.dist_target,tol); begin Corrector(s,cp); end; end Linear_Single_Normal_Silent_Continue; procedure Linear_Single_Normal_Reporting_Continue ( file : in file_type; s : in out Solu_Info; target : in double_complex; tol : in double_float; proj : in boolean; p : in Pred_Pars; c : in Corr_Pars ) is old_t,prev_t : double_complex; old_solution,prev_solution,old_v,prev_v,vv : Vector(s.sol.v'range); step : double_float := p.maxstep; nsuccess,trial : natural := 0; success : boolean := true; procedure Predictor is new Single_Predictor(Norm,dH,dH); procedure Corrector ( s : in out Solu_Info; c : in Corr_Pars ) is procedure Affine_Corrector is new Affine_Single_Severe_Normal_Reporting_Corrector(Norm,H,dH); procedure Projective_Corrector is new Projective_Single_Severe_Normal_Reporting_Corrector(Norm,H,dH); begin if proj then Projective_Corrector(file,s,c); else Affine_Corrector(file,s,c); end if; end Corrector; begin Linear_Single_Initialize(s,p,old_t,prev_t,old_solution,prev_solution); sWrite(file,s.sol.all); while not (At_End(s.sol.t,target,p.dist_target,tol) and success) and (s.niter <= c.maxtot) loop Predictor(s,p,prev_solution,prev_v,vv,prev_t,target,step,tol,trial); if p.predictor_type = 6 then put_line(file,"previous and current direction : "); for i in prev_v'range loop put(file,prev_v(i),3,3,3); put(file," "); put(file,vv(i),3,3,3); new_line(file); end loop; end if; pWrite(file,step,s.sol.t,s.sol.all); Corrector(s,c); sWrite(file,s.sol.all); Linear_Single_Management(s,p,c,old_t,prev_t,old_solution,prev_solution, old_v,prev_v,vv,step,nsuccess,trial,success); if Stop(p,s.sol.t,target,step) then return; end if; end loop; declare cp : Corr_Pars := End_Game_Corrector_Parameters(c,p.dist_target,tol); begin Corrector(s,cp); sWrite(file,s.sol.all); end; end Linear_Single_Normal_Reporting_Continue; procedure Linear_Single_Conditioned_Silent_Continue ( s : in out Solu_Info; target : in double_complex; tol : in double_float; proj : in boolean; rtoric : in natural; v : in out Float_Vectors.Link_to_Vector; errorv : in out double_float; p : in Pred_Pars; c : in Corr_Pars ) is old_t,prev_t : double_complex; old_solution,prev_solution,old_v,prev_v,vv : Vector(s.sol.v'range); step : double_float := p.maxstep; nsuccess,trial : natural := 0; success : boolean := true; dls,stp : double_float := 0.0; tolsing : constant double_float := Continuation_Parameters.tol_endg_inverse_condition; diff : Float_Vectors.Vector(s.sol.v'range) := (s.sol.v'range => 0.0); r : natural := 0; er : integer := 0; dt,ds,logs : Float_Vectors.Vector(0..rtoric) := (0..rtoric => 0.0); logx : Float_Vectors_of_Vectors.Vector(0..rtoric); wvl0,wvl1,wvl2 : Float_Vectors_of_Vectors.Vector(1..rtoric); errv : Float_Vectors.Vector(0..rtoric) := (0..rtoric => 0.0); m : natural := 1; thresm : natural := p.success_steps; estm : natural := m; fcnt,cntm : natural := 0; defer : natural := thresm; procedure Predictor is new Single_Predictor(Norm,dH,dH); procedure Corrector ( s : in out Solu_Info; c : in Corr_Pars ) is procedure Affine_Corrector is new Affine_Single_Severe_Conditioned_Silent_Corrector(Norm,H,dH); procedure Projective_Corrector is new Projective_Single_Severe_Conditioned_Silent_Corrector(Norm,H,dH); begin if proj then Projective_Corrector(s,c); else Affine_Corrector(s,c); end if; end Corrector; begin Linear_Single_Initialize(s,p,old_t,prev_t,old_solution,prev_solution); if rtoric > 0 then s.sol.m := m; end if; while not (At_End(s.sol.t,target,p.dist_target,tol) and success) and (s.niter <= c.maxtot) loop if (rtoric > 0) then if success and then s.rcond > tolsing and then (errorv < 100.0) -- avoid divergence then Update_Direction (proj,fcnt,defer,r,s.sol.m,estm,cntm,thresm,er,s.sol.t,target, s.sol.v,dt,ds,logs,logx,wvl0,wvl1,wvl2,v.all,errv,errorv); else er := -2; end if; end if; Predictor(s,p,prev_solution,prev_v,vv,prev_t,target,step,tol,trial); Corrector(s,c); Linear_Single_Management(s,p,c,old_t,prev_t,old_solution,prev_solution, old_v,prev_v,vv,step,nsuccess,trial,success); if Stop(p,s.sol.t,target,step) then return; end if; end loop; declare cp : Corr_Pars := End_Game_Corrector_Parameters(c,p.dist_target,tol); begin Corrector(s,cp); end; end Linear_Single_Conditioned_Silent_Continue; procedure Linear_Single_Conditioned_Reporting_Continue ( file : in file_type; s : in out Solu_Info; target : in double_complex; tol : in double_float; proj : in boolean; rtoric : in natural; v : in out Float_Vectors.Link_to_Vector; errorv : in out double_float; p : in Pred_Pars; c : in Corr_Pars ) is old_t,prev_t : double_complex; step : double_float := p.maxstep; nsuccess,trial : natural := 0; old_solution,prev_solution,old_v,prev_v,vv : Vector(s.sol.v'range); success : boolean := true; dls,stp : double_float := 0.0; tolsing : constant double_float := Continuation_Parameters.tol_endg_inverse_condition; diff : Float_Vectors.Vector(s.sol.v'range) := (s.sol.v'range => 0.0); r : natural := 0; er : integer := 0; dt,ds,logs : Float_Vectors.Vector(0..rtoric) := (0..rtoric => 0.0); logx : Float_Vectors_of_Vectors.Vector(0..rtoric); wvl0,wvl1,wvl2 : Float_Vectors_of_Vectors.Vector(1..rtoric); errv : Float_Vectors.Vector(0..rtoric) := (0..rtoric => 0.0); m : natural := 1; thresm : natural := p.success_steps; estm : natural := m; fcnt,cntm : natural := 0; defer : natural := thresm; procedure Predictor is new Single_Predictor(Norm,dH,dH); procedure Corrector ( s : in out Solu_Info; c : in Corr_Pars ) is procedure Affine_Corrector is new Affine_Single_Severe_Conditioned_Reporting_Corrector(Norm,H,dH); procedure Projective_Corrector is new Projective_Single_Severe_Conditioned_Reporting_Corrector(Norm,H,dH); begin if proj then Projective_Corrector(file,s,c); else Affine_Corrector(file,s,c); end if; end Corrector; begin Linear_Single_Initialize(s,p,old_t,prev_t,old_solution,prev_solution); sWrite(file,s.sol.all); -- writing the start solution if rtoric > 0 then s.sol.m := m; end if; while not (At_End(s.sol.t,target,p.dist_target,tol) and success) and (s.niter <= c.maxtot) loop if (rtoric > 0) then if success and then s.rcond > tolsing and then (errorv < 100.0) -- avoid divergence then Update_Direction(file, proj,fcnt,defer,r,s.sol.m,estm,cntm,thresm,er,s.sol.t,target, s.sol.v,dt,ds,logs,logx,wvl0,wvl1,wvl2,v.all,errv,errorv); else er := -2; end if; end if; Predictor(s,p,prev_solution,prev_v,vv,prev_t,target,step,tol,trial); pWrite(file,step,s.sol.t,s.sol.all); Corrector(s,c); sWrite(file,s.sol.all); Linear_Single_Management(s,p,c,old_t,prev_t,old_solution,prev_solution, old_v,prev_v,vv,step,nsuccess,trial,success); if Stop(p,s.sol.t,target,step) then return; end if; end loop; declare cp : Corr_Pars := End_Game_Corrector_Parameters(c,p.dist_target,tol); begin Corrector(s,cp); sWrite(file,s.sol.all); end; end Linear_Single_Conditioned_Reporting_Continue; -- LINEAR PATH FOLLOWING FOR A NUMBER OF PATHS : procedure Linear_Multiple_Normal_Silent_Continue ( s : in out Solu_Info_Array; target : in double_complex; tol,dist_sols : in double_float; proj : in boolean; p : in Pred_Pars; c : in Corr_Pars ) is t,old_t,prev_t : double_complex; sa,old_sa,prev_sa : Solution_Array(s'range); step : double_float := p.maxstep; cnt,nsuccess,trial : natural := 0; pivot : natural := s'first; success,fail : boolean := true; procedure Predictor is new Multiple_Predictor(Norm,dH,dH); procedure Affine_Corrector is new Affine_Multiple_Loose_Normal_Silent_Corrector(Norm,H,dH); procedure Projective_Corrector is new Projective_Multiple_Loose_Normal_Silent_Corrector(Norm,H,dH); procedure Correct ( s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ) is begin Copy(sa,s); if proj then Projective_Corrector(s,pivot,dist_sols,c,fail); else Affine_Corrector(s,pivot,dist_sols,c,fail); end if; end Correct; begin Linear_Multiple_Initialize(s,p,t,old_t,prev_t,sa,old_sa,prev_sa); while not (At_End(t,target,p.dist_target,tol) and success) and (s(s'first).niter <= c.maxtot) loop Predictor(s,p,sa,prev_sa,t,prev_t,target,step,tol,dist_sols,trial); Correct(s,pivot,dist_sols,c,fail); Copy(s,sa); success := not fail; Linear_Multiple_Management(s,sa,old_sa,prev_sa,t,old_t,prev_t,p,step, pivot,nsuccess,trial,success); if step < p.minstep then return; end if; end loop; declare cp : Corr_Pars := End_Game_Corrector_Parameters(c,p.dist_target,tol); begin Correct(s,pivot,dist_sols,cp,fail); end; end Linear_Multiple_Normal_Silent_Continue; procedure Linear_Multiple_Normal_Reporting_Continue ( file : in file_type; s : in out Solu_Info_Array; target : in double_complex; tol,dist_sols : in double_float; proj : in boolean; p : in Pred_Pars; c : in Corr_Pars ) is t,old_t,prev_t : double_complex; sa,old_sa,prev_sa : Solution_Array(s'range); step : double_float := p.maxstep; pivot : natural := s'first; cnt,nsuccess,trial : natural := 0; success,fail : boolean := true; procedure Predictor is new Multiple_Predictor(Norm,dH,dH); procedure Affine_Corrector is new Affine_Multiple_Loose_Normal_Reporting_Corrector(Norm,H,dH); procedure Projective_Corrector is new Projective_Multiple_Loose_Normal_Reporting_Corrector(Norm,H,dH); procedure Correct ( file : in file_type; s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ) is begin Copy(sa,s); if proj then Projective_Corrector(file,s,pivot,dist_sols,c,fail); else Affine_Corrector(file,s,pivot,dist_sols,c,fail); end if; end Correct; begin Linear_Multiple_Initialize(s,p,t,old_t,prev_t,sa,old_sa,prev_sa); for k in s'range loop -- write the start solutions sWrite(file,sa(k).all); end loop; while not (At_End(t,target,p.dist_target,tol) and success) and (s(s'first).niter <= c.maxtot) loop Predictor(s,p,sa,prev_sa,t,prev_t,target,step,tol,dist_sols,trial); pWrite(file,step,t); Correct(file,s,pivot,dist_sols,c,fail); Copy(s,sa); success := not fail; Linear_Multiple_Management(s,sa,old_sa,prev_sa,t,old_t,prev_t,p,step, pivot,nsuccess,trial,success); if step < p.minstep then return; end if; end loop; declare cp : Corr_Pars := End_Game_Corrector_Parameters(c,p.dist_target,tol); begin Correct(file,s,pivot,dist_sols,cp,fail); end; end Linear_Multiple_Normal_Reporting_Continue; procedure Linear_Multiple_Conditioned_Silent_Continue ( s : in out Solu_Info_Array; target : in double_complex; tol,dist_sols : in double_float; proj : in boolean; p : in Pred_Pars; c : in Corr_Pars ) is t,old_t,prev_t : double_complex; sa,old_sa,prev_sa : Solution_Array(s'range); step : double_float := p.maxstep; pivot : natural := s'first; cnt,nsuccess,trial : natural := 0; success,fail : boolean := true; procedure Predictor is new Multiple_Predictor(Norm,dH,dH); procedure Affine_Corrector is new Affine_Multiple_Loose_Conditioned_Silent_Corrector(Norm,H,dH); procedure Projective_Corrector is new Projective_Multiple_Loose_Conditioned_Silent_Corrector(Norm,H,dH); procedure Correct ( s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ) is begin Copy(sa,s); if proj then Projective_Corrector(s,pivot,dist_sols,c,fail); else Affine_Corrector(s,pivot,dist_sols,c,fail); end if; end Correct; begin Linear_Multiple_Initialize(s,p,t,old_t,prev_t,sa,old_sa,prev_sa); while not (At_End(t,target,p.dist_target,tol) and success) and (s(s'first).niter <= c.maxtot) loop Predictor(s,p,sa,prev_sa,t,prev_t,target,step,tol,dist_sols,trial); Correct(s,pivot,dist_sols,c,fail); Copy(s,sa); success := not fail; Linear_Multiple_Management(s,sa,old_sa,prev_sa,t,old_t,prev_t,p,step, pivot,nsuccess,trial,success); if step < p.minstep then return; end if; end loop; declare cp : Corr_Pars := End_Game_Corrector_Parameters(c,p.dist_target,tol); begin Correct(s,pivot,dist_sols,cp,fail); end; end Linear_Multiple_Conditioned_Silent_Continue; procedure Linear_Multiple_Conditioned_Reporting_Continue ( file : in file_type; s : in out Solu_Info_Array; target : in double_complex; tol,dist_sols : in double_float; proj : in boolean; p : in Pred_Pars; c : in Corr_Pars ) is t,old_t,prev_t : double_complex; sa,old_sa,prev_sa : Solution_Array(s'range); step : double_float := p.maxstep; pivot : natural := s'first; cnt,nsuccess,trial : natural := 0; success,fail : boolean := true; procedure Predictor is new Multiple_Predictor(Norm,dH,dH); procedure Affine_Corrector is new Affine_Multiple_Loose_Conditioned_Reporting_Corrector(Norm,H,dH); procedure Projective_Corrector is new Projective_Multiple_Loose_Conditioned_Reporting_Corrector(Norm,H,dH); procedure Correct ( file : in file_type; s : in out Solu_Info_Array; pivot : in out natural; dist_sols : in double_float; c : in Corr_Pars; fail : out boolean ) is begin Copy(sa,s); if proj then Projective_Corrector(file,s,pivot,dist_sols,c,fail); else Affine_Corrector(file,s,pivot,dist_sols,c,fail); end if; end Correct; begin Linear_Multiple_Initialize(s,p,t,old_t,prev_t,sa,old_sa,prev_sa); for k in s'range loop -- write start solutions sWrite(file,sa(k).all); end loop; while not (At_End(t,target,p.dist_target,tol) and success) and (s(s'first).niter <= c.maxtot) loop Predictor(s,p,sa,prev_sa,t,prev_t,target,step,tol,dist_sols,trial); pWrite(file,step,t); Correct(file,s,pivot,dist_sols,c,fail); Copy(s,sa); success := not fail; Linear_Multiple_Management(s,sa,old_sa,prev_sa,t,old_t,prev_t,p,step, pivot,nsuccess,trial,success); if step < p.minstep then return; end if; end loop; declare cp : Corr_Pars := End_Game_Corrector_Parameters(c,p.dist_target,tol); begin Correct(file,s,pivot,dist_sols,cp,fail); end; end Linear_Multiple_Conditioned_Reporting_Continue; -- CIRCULAR PATH FOLLOWING FOR ONE PATH : procedure Circular_Single_Normal_Reporting_Continue ( file : in file_type; s : in out Solu_Info; target : in double_complex; tol,epslop : in double_float; wc : out natural; max_wc : in natural; sum,all_sum : out Vector; proj : in boolean; p : in Pred_Pars; c : in Corr_Pars ) is old_t,prev_t : double_complex; t0_min_target : double_complex := s.sol.t - target; theta,old_theta : double_float := 0.0; twopi : constant double_float := 2.0*PI; step : double_float := twopi*p.maxstep; old_solution,prev_solution,start_solution : Vector(s.sol.v'range); w_c,nsuccess : natural := 0; success : boolean := true; stop : boolean := false; w_sum,w_all_sum : Vector(s.sol.v'range) := CMPLX(0.5)*s.sol.v; n_sum,n_all_sum : natural := 0; procedure T_C_Predictor is new Tangent_Circular_Predictor(Norm,dH,dH); procedure Affine_Corrector is new Affine_Single_Severe_Normal_Reporting_Corrector(Norm,H,dH); procedure Projective_Corrector is new Projective_Single_Severe_Normal_Reporting_Corrector(Norm,H,dH); begin old_t := s.sol.t; old_solution := s.sol.v; -- INITIALIZATION start_solution := s.sol.v; if p.predictor_type = 0 then prev_t := s.sol.t; prev_solution := s.sol.v; end if; sWrite(file,s.sol.all); -- write the start solution while (s.niter <= c.maxtot) loop case p.predictor_type is when 0 => Secant_Circular_Predictor(s.sol.v,prev_solution,s.sol.t,theta, prev_t,t0_min_target,target,step,tol); when 2 => T_C_Predictor(s.sol.v,s.sol.t,theta, t0_min_target,target, step,tol); s.nsyst := s.nsyst + 1; when others => null; -- these choices make no sense !!! end case; pWrite(file,step,s.sol.t,s.sol.all); if proj then Projective_Corrector(file,s,c); else Affine_Corrector(file,s,c); end if; sWrite(file,s.sol.all); Circular_Management (s,p,c,old_t,prev_t,start_solution,old_solution,prev_solution, w_sum,w_all_sum,twopi,epslop,tol,theta,old_theta, step,nsuccess,n_sum,n_all_sum,w_c,max_wc,stop,success); exit when stop; if step < p.minstep then return; end if; end loop; wc := w_c; if n_all_sum /= 0 then all_sum := w_all_sum*CMPLX(1.0/double_float(n_all_sum)); end if; if n_sum /= 0 then sum := w_sum*CMPLX(1.0/double_float(n_sum)); elsif n_all_sum /= 0 then all_sum := w_all_sum*CMPLX(1.0/double_float(n_all_sum)); end if; end Circular_Single_Normal_Reporting_Continue; procedure Circular_Single_Conditioned_Reporting_Continue ( file : in file_type; s : in out Solu_Info; target : in double_complex; tol,epslop : in double_float; wc : out natural; max_wc : in natural; sum,all_sum : out Vector; proj : in boolean; p : in Pred_Pars; c : in Corr_Pars ) is old_t,prev_t : double_complex; theta,old_theta : double_float := 0.0; twopi : constant double_float := 2.0*PI; step : double_float := twopi*p.maxstep; t0_min_target : double_complex := s.sol.t - target; old_solution,prev_solution,start_solution : Vector(s.sol.v'range); w_c,nsuccess : natural := 0; success : boolean := true; stop : boolean := false; w_sum,w_all_sum : Vector(s.sol.v'range) := CMPLX(0.5)*s.sol.v; n_sum,n_all_sum : natural := 0; procedure T_C_Predictor is new Tangent_Circular_Predictor(Norm,dH,dH); procedure Affine_Corrector is new Affine_Single_Severe_Conditioned_Reporting_Corrector(Norm,H,dH); procedure Projective_Corrector is new Projective_Single_Severe_Conditioned_Reporting_Corrector(Norm,H,dH); begin old_t := s.sol.t; old_solution := s.sol.v; -- INITIALIZATION start_solution := s.sol.v; if p.predictor_type = 0 then prev_t := s.sol.t; prev_solution := old_solution; end if; sWrite(file,s.sol.all); -- writing the start solution while s.niter <= c.maxtot loop case p.predictor_type is when 0 => Secant_Circular_Predictor(s.sol.v,prev_solution,s.sol.t,theta, prev_t,t0_min_target,target,step,tol); when 2 => T_C_Predictor(s.sol.v,s.sol.t,theta,t0_min_target, target,step,tol); s.nsyst := s.nsyst + 1; when others => null; -- these choices make no sense !!! end case; pWrite(file,step,s.sol.t,s.sol.all); if proj then Projective_Corrector(file,s,c); else Affine_Corrector(file,s,c); end if; sWrite(file,s.sol.all); Circular_Management (s,p,c,old_t,prev_t,start_solution,old_solution,prev_solution, w_sum,w_all_sum,twopi,epslop,tol,theta,old_theta, step,nsuccess,n_sum,n_all_sum,w_c,max_wc,stop,success); exit when stop; if step < p.minstep then return; end if; end loop; wc := w_c; if n_all_sum /= 0 then all_sum := w_all_sum*CMPLX(1.0/double_float(n_all_sum)); end if; if n_sum /= 0 then sum := w_sum*CMPLX(1.0/double_float(n_sum)); elsif n_all_sum /= 0 then sum := w_all_sum*CMPLX(1.0/double_float(n_all_sum)); end if; end Circular_Single_Conditioned_Reporting_Continue; end Path_Trackers; SHAR_EOF fi # end of overwriting check if test -f 'path_trackers.ads' then echo shar: will not over-write existing file "'path_trackers.ads'" else cat << "SHAR_EOF" > 'path_trackers.ads' with text_io; use text_io; with Floating_Point_Numbers; use Floating_Point_Numbers; with Float_Vectors; with Complex_Numbers,Complex_Vectors; use Complex_Numbers,Complex_Vectors; with Complex_Matrices,Solutions; use Complex_Matrices,Solutions; with Continuation_Data; use Continuation_Data; package Path_Trackers is -- DESCRIPTION : -- This package offers some routines for tracking solution paths, -- by using an increment-and-fix predictor-corrector method. -- The following options can be made : -- (Linear,Circular) -- A linear path tracker takes t from a starting to a target value. -- For computing winding numbers, a circular path tracker is needed. -- (Single,Multiple) -- A single path tracker only deals with one path at a time. -- A multiple path tracker follows more than one path when it is called. -- (Normal,Conditioned) -- A normal path tracker does not compute an estimate for the inverse of -- the condition number of the Jacobian matrix. This additional work -- is done by a conditioned path tracker. -- (Silent,Reporting) -- A silent path tracker does not produce any output on file. -- A reporting path tracker allows to put intermediate results on file. -- By combining these options, the following path trackers are provided: -- Linear_Single_Normal_Silent_Continue -- Linear_Single_Normal_Reporting_Continue -- Linear_Single_Conditioned_Silent_Continue -- Linear_Single_Conditioned_Reporting_Continue -- Linear_Multiple_Normal_Silent_Continue -- Linear_Multiple_Normal_Reporting_Continue -- Linear_Multiple_Conditioned_Silent_Continue -- Linear_Multiple_Conditioned_Reporting_Continue -- Circular_Single_Normal_Reporting_Continue -- Circular_Single_Conditioned_Reporting_Continue -- LINEAR PATH FOLLOWING FOR ONE PATH : generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Linear_Single_Normal_Silent_Continue ( s : in out Solu_Info; target : in double_complex; tol : in double_float; proj : in boolean; p : in Pred_Pars; c : in Corr_Pars ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Linear_Single_Normal_Reporting_Continue ( file : in file_type; s : in out Solu_Info; target : in double_complex; tol : in double_float; proj : in boolean; p : in Pred_Pars; c : in Corr_Pars ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Linear_Single_Conditioned_Silent_Continue ( s : in out Solu_Info; target : in double_complex; tol : in double_float; proj : in boolean; rtoric : in natural; v : in out Float_Vectors.Link_to_Vector; errorv : in out double_float; p : in Pred_Pars; c : in Corr_Pars ); generic with function Norm ( x : Vector) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Linear_Single_Conditioned_Reporting_Continue ( file : in file_type; s : in out Solu_Info; target : in double_complex; tol : in double_float; proj : in boolean; rtoric : in natural; v : in out Float_Vectors.Link_to_Vector; errorv : in out double_float; p : in Pred_Pars; c : in Corr_Pars ); -- DESCRIPTION : -- This routine follows a path of solutions of the system -- H(x,t) = 0, with t : t ---> target. -- An increment and fix path following technique is applied. -- ON ENTRY : -- file to write intermediate results on; -- s start solution and initial value of t; -- target target value of the continuation parameter; -- tol tolerance to decide when two double_floats are the same; -- proj when perpendicular-projective corrector has to be used; -- rtoric order of extrapolation for computation of path directions; -- v direction of toric compactificiation, null when (rtoric = 0); -- errorv error on the current direction; -- p parameters for the predictor; -- c parameters for the corrector. -- ON RETURN : -- s the computed solution of H(x,t) = 0; -- v direction of the compactification, when rtoric > 0; -- errorv difference with previously computed direction. -- LINEAR PATH FOLLOWING FOR A NUMBER OF PATHS : generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Linear_Multiple_Normal_Silent_Continue ( s : in out Solu_Info_Array; target : in double_complex; tol,dist_sols : in double_float; proj : in boolean; p : in Pred_Pars; c : in Corr_Pars ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Linear_Multiple_Normal_Reporting_Continue ( file : in file_type; s : in out Solu_Info_Array; target : in double_complex; tol,dist_sols : in double_float; proj : in boolean; p : in Pred_Pars; c : in Corr_Pars ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Linear_Multiple_Conditioned_Silent_Continue ( s : in out Solu_Info_Array; target : in double_complex; tol,dist_sols : in double_float; proj : in boolean; p : in Pred_Pars; c : in Corr_Pars ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Linear_Multiple_Conditioned_Reporting_Continue ( file : in file_type; s : in out Solu_Info_Array; target : in double_complex; tol,dist_sols : in double_float; proj : in boolean; p : in Pred_Pars; c : in Corr_Pars ); -- DESCRIPTION : -- This routine follows simultaneously a number of paths in order -- to avoid clustering of solutions. -- ON ENTRY : -- file to write intermediate results on; -- s array of start solutions, all for the same t; -- target target value of the continuation parameters; -- tol tolerance to decide when two double_floats are the same; -- dist_sols distance to be kept between the solutions; -- proj indicates whether perpendicular-projective corrector has -- to be used or not; -- p parameters for the predictor; -- c parameters for the corrector. -- ON RETURN : -- s the computed solutions of H(x,t) = 0. -- CIRCULAR PATH FOLLOWING FOR ONE PATH : generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Circular_Single_Normal_Reporting_Continue ( file : in file_type; s : in out Solu_Info; target : in double_complex; tol,epslop : in double_float; wc : out natural; max_wc : in natural; sum,all_sum : out Vector; proj : in boolean; p : in Pred_Pars; c : in Corr_Pars ); generic with function Norm ( x : Vector ) return double_float; with function H ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Vector; with function dH ( x : Vector; t : double_complex ) return Matrix; procedure Circular_Single_Conditioned_Reporting_Continue ( file : in file_type; s : in out Solu_Info; target : in double_complex; tol,epslop : in double_float; wc : out natural; max_wc : in natural; sum,all_sum : out Vector; proj : in boolean; p : in Pred_Pars; c : in Corr_Pars ); -- DESCRIPTION : -- This routine follows a path of solutions of the system -- H(x,t) = 0, with t circuling around the target. -- An increment and fix path following technique is applied. -- ON ENTRY : -- file to write intermediate results on; -- s array of start solutions, all for the same t; -- target target value of the continuation parameters; -- tol tolerance to decide when two floats are the same; -- epslop tolerance to decide when w(0) = w(2*PI*wc); -- max_wc maximum bound for winding number; -- proj indicates whether perpendicular-projective corrector has -- to be used or not; -- p parameters for the predictor; -- c parameters for the corrector. -- ON RETURN : -- s the computed solution of H(x,t) = 0; -- wc estimated cycle number; -- sum is the trapezium sum over the equidistant points; -- all_sum is the trapezium sum over all the points. end Path_Trackers; SHAR_EOF fi # end of overwriting check if test -f 'predictors.adb' then echo shar: will not over-write existing file "'predictors.adb'" else cat << "SHAR_EOF" > 'predictors.adb' with Mathematical_Functions; use Mathematical_Functions; with Integer_Vectors; with Complex_Linear_System_Solvers; use Complex_Linear_System_Solvers; package body Predictors is -- PREDICTORS for t : procedure Real_Predictor ( t : in out double_complex; target : in double_complex; h,tol : in double_float; pow : in positive := 1; hh : out double_float ) is nt : double_complex; begin if pow = 1 then nt := t + CMPLX(h); else nt := CMPLX((h+REAL_PART(t)**pow)**(1.0/double_float(pow))); end if; if REAL_PART(nt) >= REAL_PART(target) or else abs( REAL_PART(nt) - REAL_PART(target) ) <= tol then hh := REAL_PART(target) - REAL_PART(t); t := target; else hh := h; t := nt; end if; end Real_Predictor; procedure Complex_Predictor ( t : in out double_complex; target : in double_complex; h,tol : in double_float; hh : out double_float; distance : in double_float; trial : in natural ) is nt,target_direction,step : double_complex; dre,dim,d,x,y,alfa : double_float; tr3 : natural range 0..2; begin target_direction := target - t; d := modulus(target_direction); if d < tol then nt := target - CMPLX(distance); hh := modulus(nt - t); else tr3 := trial mod 3; case tr3 is when 0 => target_direction := target_direction / CMPLX(d); if (d - h) > distance then step := CMPLX(h) * target_direction; else step := (d - distance) * target_direction; end if; nt := t + step; when 1 => dre := REAL_PART(target_direction); dim := IMAG_PART(target_direction); alfa := ARCTAN(dim/dre); x := h * COS(alfa + PI/4.0); y := h * SIN(alfa + PI/4.0); step := CMPLX(x,y); nt := t + step; if (modulus(nt) > modulus(target)) or else (modulus(nt - target) < distance) then step := CMPLX(0.0,y) * CMPLX(h); nt := t + step; end if; when 2 => dre := REAL_PART(target_direction); dim := IMAG_PART(target_direction); alfa := ARCTAN(dim/dre); x := h * COS(alfa - PI/4.0); y := h * SIN(alfa - PI/4.0); step := CMPLX(x,y); nt := t + step; if (modulus(nt) > modulus(target)) or else (modulus(nt - target) < distance) then step := CMPLX(0.0,-y) * CMPLX(h); nt := t + step; end if; end case; hh := modulus(step); end if; t := nt; end Complex_Predictor; procedure Circular_Predictor ( t : in out double_complex; theta : in out double_float; t0_min_target,target : in double_complex; h : in double_float ) is e_i_theta : double_complex; begin theta := theta + h; e_i_theta := CMPLX(COS(theta),SIN(theta)); t := target + t0_min_target * e_i_theta; end Circular_Predictor; procedure Geometric_Predictor ( t : in out double_complex; target : in double_complex; h,tol : in double_float ) is nt : double_complex; begin nt := target - CMPLX(h)*(target - t); if abs( REAL_PART(nt) - REAL_PART(target) ) <= tol then t := target; else t := nt; end if; end Geometric_Predictor; -- PREDICTORS FOR x : procedure Secant_Predictor ( x : in out Solution_Array; prev_x : in Solution_Array; fac : in double_complex; dist_x : in double_float ) is j : natural; xx : Solution_Array(x'range); begin Copy(x,xx); for i in x'range loop x(i).v := x(i).v + fac * ( x(i).v - prev_x(i).v ); j := xx'first; Equals(xx,x(i).v,i,dist_x,j); if j /= i then Copy(xx,x); exit; end if; end loop; Clear(xx); end Secant_Predictor; -- PREDICTORS FOR t AND x : procedure Secant_Single_Real_Predictor ( x : in out Vector; prev_x : in Vector; t : in out double_complex; prev_t,target : in double_complex; h,tol : in double_float; pow : in positive := 1 ) is hh,tmp : double_float; factor : double_complex; begin tmp := modulus(t - prev_t); Real_Predictor(t,target,h,tol,pow,hh); if tmp > tol then factor := CMPLX(hh/tmp); x := x + factor * ( x - prev_x ); end if; end Secant_Single_Real_Predictor; procedure Secant_Multiple_Real_Predictor ( x : in out Solution_Array; prev_x : in Solution_Array; t : in out double_complex; prev_t,target : in double_complex; h,tol,dist_x : in double_float; pow : in positive := 1 ) is hh,tmp : double_float; factor : double_complex; begin tmp := modulus(t - prev_t); Real_Predictor(t,target,h,tol,pow,hh); if tmp > tol then factor := CMPLX(hh/tmp); Secant_Predictor(x,prev_x,factor,dist_x); end if; for k in x'range loop x(k).t := t; end loop; end Secant_Multiple_Real_Predictor; procedure Secant_Single_Complex_Predictor ( x : in out Vector; prev_x : in Vector; t : in out double_complex; prev_t,target : in double_complex; h,tol,dist_t : in double_float; trial : in natural ) is hh,tmp : double_float; factor : double_complex; begin tmp := modulus(t - prev_t); Complex_Predictor(t,target,h,tol,hh,dist_t,trial); if tmp > tol then factor := CMPLX(hh/tmp); x := x + factor * ( x - prev_x ); end if; end Secant_Single_Complex_Predictor; procedure Secant_Multiple_Complex_Predictor ( x : in out Solution_Array; prev_x : in Solution_Array; t : in out double_complex; prev_t,target : in double_complex; h,tol,dist_x,dist_t : in double_float; trial : in natural ) is hh,tmp : double_float; factor : double_complex; begin tmp := modulus(t - prev_t); Complex_Predictor(t,target,h,tol,hh,dist_t,trial); if tmp > tol then factor := CMPLX(hh/tmp); Secant_Predictor(x,prev_x,factor,dist_x); end if; for k in x'range loop x(k).t := t; end loop; end Secant_Multiple_Complex_Predictor; procedure Secant_Circular_Predictor ( x : in out Vector; prev_x : in Vector; t : in out double_complex; theta : in out double_float; prev_t,t0_min_target,target : in double_complex; h,tol : in double_float ) is nt,factor : double_complex; tmp : double_float := modulus(t-prev_t); begin if tmp <= tol then Circular_Predictor(t,theta,t0_min_target,target,h); else factor := CMPLX(h/tmp); Circular_Predictor(t,theta,t0_min_target,target,h); x := x + factor * ( x - prev_x ); end if; end Secant_Circular_Predictor; procedure Secant_Geometric_Predictor ( x : in out Vector; prev_x : in Vector; t : in out double_complex; prev_t,target : in double_complex; h,tol : in double_float ) is dist_prev,dist : double_float; factor,tmp : double_complex; begin dist_prev := modulus(t - prev_t); -- old stepsize tmp := t; Geometric_Predictor(t,target,h,tol); dist := modulus(t - tmp); -- new stepsize if dist_prev > tol then factor := CMPLX(dist/dist_prev); x := x + factor * ( x - prev_x ); end if; end Secant_Geometric_Predictor; procedure Tangent_Single_Real_Predictor ( x : in out Vector; t : in out double_complex; target : in double_complex; h,tol : in double_float; pow : in positive := 1 ) is n : natural := x'last; info : integer; norm_tan,hh : double_float; rhs : Vector(x'range); j : Matrix(1..n,1..n); ipvt : Integer_Vectors.Vector(1..n); prev_t : double_complex := t; begin Real_Predictor(t,target,h,tol,pow,hh); j := dH(x,prev_t); lufac(j,n,ipvt,info); if info = 0 then rhs := dH(x,prev_t); Min_Vector(rhs); lusolve(j,n,ipvt,rhs); norm_tan := Norm(rhs); if norm_tan > tol then hh := hh / norm_tan; Mult_Coeff(rhs,CMPLX(hh)); Plus_Vector(x,rhs); end if; end if; end Tangent_Single_Real_Predictor; procedure Tangent_Multiple_Real_Predictor ( x : in out Solution_Array; t : in out double_complex; target : in double_complex; h,tol,dist_x : in double_float; nsys : in out natural; pow : in positive := 1 ) is n : natural := x(x'first).n; norm_tan,hh : double_float; rhs : Vector(1..n); info : integer; j : Matrix(1..n,1..n); ipvt : Integer_Vectors.Vector(1..n); xx : Solution_Array(x'range); jj : natural; prev_t : double_complex := t; begin Real_Predictor(t,target,h,tol,pow,hh); Copy(x,xx); for i in x'range loop j := dH(x(i).v,prev_t); lufac(j,n,ipvt,info); if info = 0 then rhs := dH(x(i).v,prev_t); Min_Vector(rhs); lusolve(j,n,ipvt,rhs); nsys := nsys + 1; norm_tan := Norm(rhs); if norm_tan > tol then hh := hh / norm_tan; Mult_Coeff(rhs,CMPLX(hh)); Plus_Vector(x(i).v,rhs); end if; jj := xx'first; Equals(xx,x(i).v,i,dist_x,jj); if jj /= i then Copy(xx,x); exit; end if; else Copy(xx,x); exit; end if; end loop; Clear(xx); for k in x'range loop x(k).t := t; end loop; end Tangent_Multiple_Real_Predictor; procedure Tangent_Single_Complex_Predictor ( x : in out Vector; t : in out double_complex; target : in double_complex; h,tol,dist_t : in double_float; trial : in natural) is n : natural := x'last; info : integer; norm_tan,hh : double_float; rhs : Vector(x'range); j : Matrix(1..n,1..n); ipvt : Integer_Vectors.Vector(1..n); prev_t : double_complex := t; begin Complex_Predictor(t,target,h,tol,hh,dist_t,trial); j := dH(x,prev_t); lufac(j,n,ipvt,info); if info = 0 then rhs := dH(x,prev_t); Min_Vector(rhs); lusolve(j,n,ipvt,rhs); norm_tan := Norm(rhs); if norm_tan > tol then hh := hh / norm_tan; Mult_Coeff(rhs,CMPLX(hh)); Plus_Vector(x,rhs); end if; end if; end Tangent_Single_Complex_Predictor; procedure Tangent_Multiple_Complex_Predictor ( x : in out Solution_Array; t : in out double_complex; target : in double_complex; h,tol,dist_x,dist_t : in double_float; trial : in natural; nsys : in out natural) is n : natural := x(x'first).n; norm_tan,hh : double_float; rhs : Vector(1..n); info : integer; j : Matrix(1..n,1..n); ipvt : Integer_Vectors.Vector(1..n); xx : Solution_Array(x'range); jj : natural; prev_t : double_complex := t; begin Complex_Predictor(t,target,h,tol,hh,dist_t,trial); Copy(x,xx); for i in x'range loop j := dH(x(i).v,prev_t); lufac(j,n,ipvt,info); if info = 0 then rhs := dH(x(i).v,prev_t); Min_Vector(rhs); lusolve(j,n,ipvt,rhs); nsys := nsys + 1; norm_tan := Norm(rhs); if norm_tan > tol then hh := hh / norm_tan; Mult_Coeff(rhs,CMPLX(hh)); Plus_Vector(x(i).v,rhs); end if; jj := xx'first; Equals(xx,x(i).v,i,dist_x,jj); if jj /= i then Copy(xx,x); exit; end if; else Copy(xx,x); exit; end if; end loop; Clear(xx); for k in x'range loop x(k).t := t; end loop; end Tangent_Multiple_Complex_Predictor; procedure Tangent_Circular_Predictor ( x : in out Vector; t : in out double_complex; theta : in out double_float; t0_min_target,target : in double_complex; h,tol : in double_float ) is n : natural := x'last; info : integer; norm_tan : double_float; rhs : Vector(x'range); j : Matrix(1..n,1..n); ipvt : Integer_Vectors.Vector(1..n); begin lufac(j,n,ipvt,info); if info = 0 then rhs := dH(x,t); Min_Vector(rhs); lusolve(j,n,ipvt,rhs); end if; Circular_Predictor(t,theta,t0_min_target,target,h); if info = 0 then norm_tan := Norm(rhs); if norm_tan > tol then Mult_Coeff(rhs,CMPLX(h/norm_tan)); Plus_Vector(x,rhs); end if; end if; end Tangent_Circular_Predictor; procedure Tangent_Geometric_Predictor ( x : in out Vector; t : in out double_complex; target : in double_complex; h,tol : in double_float ) is n : natural := x'last; info : integer; norm_tan,step : double_float; rhs : Vector(x'range); j : Matrix(1..n,1..n); ipvt : Integer_Vectors.Vector(1..n); prev_t : double_complex := t; begin Geometric_Predictor(t,target,h,tol); j := dH(x,prev_t); lufac(j,n,ipvt,info); if info = 0 then rhs := dH(x,prev_t); Min_Vector(rhs); lusolve(j,n,ipvt,rhs); norm_tan := Norm(rhs); if norm_tan > tol then step := modulus(t-prev_t) / norm_tan; Mult_Coeff(rhs,CMPLX(step)); Plus_Vector(x,rhs); end if; end if; end Tangent_Geometric_Predictor; function Hermite ( t0,t1,t,x0,x1,v0,v1 : double_complex ) return double_complex is -- DESCRIPTION : -- Returns the value of the third degree interpolating polynomial x(t), -- such that x(t0) = x0, x(t1) = x1, x'(t0) = v0 and x'(t1) = v1. -- REQUIRED : t0 /= t1. -- IMPLEMENTATION : -- x(t) = a3*t^3 + a2*t^2 + a1*t + a0, -- The four interpolation conditions lead to a linear system in -- the coefficients of x(t). This system is first solved explicitly -- and then the polynomial x(t) is evaluated. a0,a1,a2,a3,t10,v10 : double_complex; begin t10 := t1 - t0; v10 := (x1 - x0)/t10; a3 := (v1 + v0 - CMPLX(2.0)*v10)/(t10**2); a2 := (v10 - v0 - (t1**2 + t1*t0 - CMPLX(2.0)*t0**2)*a3)/t10; a1 := v0 - (CMPLX(3.0)*a3*t0 + CMPLX(2.0)*a2)*t0; a0 := x0 - ((a3*t0 + a2)*t0 + a1)*t0; return (((a3*t + a2)*t + a1)*t + a0); end Hermite; function Hermite ( t0,t1,t : double_complex; x0,x1,v0,v1 : Vector ) return Vector is -- DESCRIPTION : -- Returns the value of the third degree interpolating polynomial x(t), -- such that x(t0) = x0, x(t1) = x1, x'(t0) = v0 and x'(t1) = v1, -- for every component. -- REQUIRED : t0 /= t1. res : Vector(x0'range); begin for i in res'range loop res(i) := Hermite(t0,t1,t,x0(i),x1(i),v0(i),v1(i)); end loop; return res; end Hermite; procedure Hermite_Single_Real_Predictor ( x : in out Vector; prev_x : in Vector; t : in out double_complex; prev_t,target : in double_complex; v : in out Vector; prev_v : in Vector; h,tol : in double_float; pow : in positive := 1 ) is n : natural := x'last; info : integer; hh : double_float; j : Matrix(1..n,1..n); ipvt : Integer_Vectors.Vector(1..n); t1 : double_complex := t; begin Real_Predictor(t,target,h,tol,pow,hh); j := dH(x,t1); lufac(j,n,ipvt,info); if info = 0 then v := dH(x,t1); Min_Vector(v); lusolve(j,n,ipvt,v); if abs(prev_t - t1) > tol then x := Hermite(prev_t,t1,t,prev_x,x,prev_v,v); end if; end if; end Hermite_Single_Real_Predictor; end Predictors; SHAR_EOF fi # end of overwriting check if test -f 'predictors.ads' then echo shar: will not over-write existing file "'predictors.ads'" else cat << "SHAR_EOF" > 'predictors.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Numbers,Complex_Vectors; use Complex_Numbers,Complex_Vectors; with Complex_Matrices,Solutions; use Complex_Matrices,Solutions; with Continuation_Data; use Continuation_Data; package Predictors is -- DESCRIPTION : -- This package contains several implementations for the predictor -- in an increment-and-fix continuation. -- The predictor provides a prediction both for the continuation parameter t -- and for the solution(s) x. -- For the continuation paramter t the following options can be made : -- Real : linear prediction, simply adds the step size; -- Complex : can make predictions in complex space; -- Circular : to perform a circular sample, for winding numbers; -- Geometric : distances to target form geometric series. -- For the solution vector x the following options are provided : -- Secant : linear extrapolation using differences; -- Tangent : linear extrapolation using the first derivatives; -- Hermite : third-order extrapolation using first derivatives. -- Furthermore, these predictors for x can be applied -- for one solution (Single) or for an array of solutions (Multiple). -- By combining these options, the following 13 predictors are provided : -- Secant_Single_Real_Predictor -- Secant_Single_Complex_Predictor -- Secant_Multiple_Real_Predictor -- Secant_Multiple_Complex_Predictor -- Tangent_Single_Real_Predictor -- Tangent_Single_Complex_Predictor -- Tangent_Multiple_Real_Predictor -- Tangent_Multiple_Complex_Predictor -- Secant_Circular_Predictor -- Secant_Geometric_Predictor -- Tangent_Circular_Predictor -- Tangent_Geometric_Predictor -- Hermite_Single_Real_Predictor -- The order in which these predictors are listed depends on their mutual -- resemblances of the specified parameters. procedure Secant_Single_Real_Predictor ( x : in out Vector; prev_x : in Vector; t : in out double_complex; prev_t,target : in double_complex; h,tol : in double_float; pow : in positive := 1 ); procedure Secant_Multiple_Real_Predictor ( x : in out Solution_Array; prev_x : in Solution_Array; t : in out double_complex; prev_t,target : in double_complex; h,tol,dist_x : in double_float; pow : in positive := 1 ); -- DESCRIPTION : -- Secant predictor for x and a linear predictor for t. -- ON ENTRY : -- x the current approximation(s) for t; -- prev_x the approximation(s) for a previous t; -- t the current value of the continuation parameter; -- prev_t is the previous value for t; -- target is the target value for t; -- h is the step size; -- tol tolerance to decide when t = target; -- dist_x for all i /= j : |x(i)(k) - x(j)(k)| > d, for k in 1..n; -- pow power of t in the homotopy towards 1. -- ON RETURN : -- x the predicted approximation(s); -- t the predicted value of the continuation parameter. procedure Secant_Single_Complex_Predictor ( x : in out Vector; prev_x : in Vector; t : in out double_complex; prev_t,target : in double_complex; h,tol,dist_t : in double_float; trial : in natural ); procedure Secant_Multiple_Complex_Predictor ( x : in out Solution_Array; prev_x : in Solution_Array; t : in out double_complex; prev_t,target : in double_complex; h,tol,dist_x,dist_t : in double_float; trial : in natural); -- DESCRIPTION : -- Secant predictor for x and complex predictor for t. -- ON ENTRY : -- x the current approximation(s) for t; -- prev_x the approximation(s) for a previous t; -- t the current value of the continuation parameter; -- prev_t is the previous value for t; -- target is the target value for t; -- h is the step size; -- tol tolerance to decide when two numbers are equal; -- dist_x for all i /= j : |x(i)(k) - x(j)(k)| > d, for k in 1..n; -- dist_t t must keep a distance to the target; -- trial indicates the number of trials for starting out of -- the previous value for t. -- ON RETURN : -- x the predicted approximation(s); -- t the predicted value of the continuation parameter. procedure Secant_Circular_Predictor ( x : in out Vector; prev_x : in Vector; t : in out double_complex; theta : in out double_float; prev_t,t0_min_target,target : in double_complex; h,tol : in double_float ); -- DESCRIPTION : -- Secant predictor for x and circular predictor for t, around target. -- NOTE : This is the link between t and theta : -- t = target + t0_min_target * ( cos(theta) + i sin(theta) ) -- ON ENTRY : -- x,prev_x,t,prev_t,target as before; -- theta the angle for t. -- t0_min_target is t0-target, where t0 is the start point; -- h is step size for theta !! -- ON RETURN : -- x the predicted approximation; -- t the predicted value of the continuation parameter; -- theta the predicted angle. procedure Secant_Geometric_Predictor ( x : in out Vector; prev_x : in Vector; t : in out double_complex; prev_t,target : in double_complex; h,tol : in double_float ); -- DESCRIPTION : -- Secant predictor for x and a geometric predictor for t. -- ON ENTRY : -- x the current approximation(s) for t; -- prev_x the approximation(s) for a previous t; -- t the current value of the continuation parameter; -- prev_t is the previous value for t; -- target is the target value for t; -- h ratio between two consecutive distance to target, 0 dist_x, for k in 1..n; -- nsys must be initally equal to zero, used for counting; -- pow power of t in the homotopy. -- ON RETURN : -- x predicted approximation for the solution; -- t new value of the continuation parameter; -- nsys the number of linear systems solved. generic with function Norm ( x : Vector ) return double_float; with function dH ( x : Vector; t : double_complex ) return Vector; -- returns the derivatives of H(x,t) w.r.t. t in (x,t) with function dH ( x : Vector; t : double_complex ) return Matrix; -- returns the Jacobian matrix of H(x,t) at (x,t) procedure Tangent_Single_Complex_Predictor ( x : in out Vector; t : in out double_complex; target : in double_Complex; h,tol,dist_t : in double_float; trial : in natural ); generic with function Norm ( x : Vector) return double_float; with function dH ( x : Vector; t : double_complex ) return Vector; -- returns the derivatives of H(x,t) w.r.t. t in (x,t) with function dH ( x : Vector; t : double_complex ) return Matrix; -- returns the Jacobian matrix of H(x,t) at (x,t) procedure Tangent_Multiple_Complex_Predictor ( x : in out Solution_Array; t : in out double_complex; target : in double_complex; h,tol,dist_x,dist_t : in double_float; trial : in natural; nsys : in out natural ); -- DESCRIPTION : -- Tangent predictor for x and a complex predictor for t. -- ON ENTRY : -- x current approximation for the solution; -- t current value of the continuation parameter; -- target target value for the continuation parameter; -- h steplength; -- tol tolerance to decide when two numbers are equal; -- dist_x for all i /= j : |x(i)(k) - x(j)(k)| > d, for k in 1..n; -- dist_t t must keep distance to the target; -- trial indicates the number of trials for starting out of -- the previous value for t; -- nsys must be initially equal to zero. -- ON RETURN : -- x predicted approximation for the solution; -- t new value of the continuation parameter; -- nsys the number of linear systems solved. generic with function Norm ( x : Vector) return double_float; with function dH ( x : Vector; t : double_complex ) return Vector; -- returns the derivatives of H(x,t) w.r.t. t in (x,t) with function dH ( x : Vector; t : double_complex ) return Matrix; -- returns the Jacobian matrix of H(x,t) at (x,t) procedure Tangent_Circular_Predictor ( x : in out Vector; t : in out double_complex; theta : in out double_float; t0_min_target,target : in double_complex; h,tol : in double_float ); -- DESCRIPTION : -- This is a tangent predictor for x and a circular predictor for t -- For information on the parameters, see Secant_Circular_Predictor. generic with function Norm ( x : Vector) return double_float; with function dH ( x : Vector; t : double_complex ) return Vector; -- returns the derivatives of H(x,t) w.r.t. t in (x,t) with function dH ( x : Vector; t : double_complex ) return Matrix; -- returns the Jacobian matrix of H(x,t) at (x,t) procedure Tangent_Geometric_Predictor ( x : in out Vector; t : in out double_complex; target : in double_complex; h,tol : in double_float ); -- DESCRIPTION : -- Tangent predictor for x and a geometric predictor for t. -- For information on the parameters, see Secant_Geometric_Predictor. generic with function Norm ( x : Vector) return double_float; with function dH ( x : Vector; t : double_complex ) return Vector; -- returns the derivatives of H(x,t) w.r.t. t in (x,t) with function dH ( x : Vector; t : double_complex ) return Matrix; -- returns the Jacobian matrix of H(x,t) at (x,t) procedure Hermite_Single_Real_Predictor ( x : in out Vector; prev_x : in Vector; t : in out double_complex; prev_t,target : in double_complex; v : in out Vector; prev_v : in Vector; h,tol : in double_float; pow : in positive := 1 ); -- DESCRIPTION : -- Third-order extrapolation based on previous values of the solution -- paths along with corresponding first derivatives. -- ON ENTRY : -- x current approximation for the solution; -- prev_x previous approximation of the solution at prev_t; -- t current value of the continuation parameter; -- prev_t previous value of the continuation parameter; -- target target value for the continuation parameter; -- v will be used at work space; -- prev_v direction of the path at prev_t; -- h steplength; -- tol tolerance to decide when t = target; -- dist_x for all i /= j : |x(i)(k) - x(j)(k)| > dist_x, for k in 1..n; -- pow power of t in the homotopy. -- ON RETURN : -- x predicted approximation for the solution; -- t new value of the continuation parameter; -- v direction of the path computed for value of t on entry. end Predictors; SHAR_EOF fi # end of overwriting check if test -f 'process_io.adb' then echo shar: will not over-write existing file "'process_io.adb'" else cat << "SHAR_EOF" > 'process_io.adb' with integer_io; use integer_io; with Complex_Numbers_io; use Complex_Numbers_io; with Solutions_io; use Solutions_io; package body Process_io is use Floating_Point_Numbers.double_float_io; out_code : output_code; procedure Write_path ( ft : in file_type; n : in positive ) is begin if out_code /= nil then put(ft,"***** path"); put(ft,n); put(ft," *****"); new_line(ft); end if; end Write_path; procedure Write_path ( n : in positive ) is begin Write_path(Standard_Output,n); end Write_path; procedure Write_block ( ft : in file_type; n : in positive ) is begin --if out_code /= nil -- then put(ft,"##### block"); put(ft,n); put_line(ft," #####"); --end if; end Write_block; procedure Write_block ( n : in positive ) is begin Write_Block(Standard_Output,n); end Write_block; procedure Set_Output_Code ( u : in output_code ) is begin out_code := u; end Set_output_code; procedure sWrite ( ft : in file_type; sol : in Solution ) is begin if (out_code = s) or (out_code = sp) or (out_code = sc) or (out_code = spc) then put(ft,sol); new_line(ft); end if; end sWrite; procedure sWrite ( sol : in Solution ) is begin sWrite(Standard_Output,sol); end sWrite; procedure pWrite ( ft : in file_type; step : in double_float; t : in double_complex ) is begin if (out_code = p) or (out_code = sp) or (out_code = pc) or (out_code = spc) then put(ft,"step :"); put(ft,step); put(ft," "); put(ft,"t :"); put(ft,t); new_line(ft); end if; end pWrite; procedure pWrite ( ft : in file_type; step : in double_float; t : in double_complex; sol : in Solution ) is begin if (out_code = p) or (out_code = sp) or (out_code = pc) or (out_code = spc) then put(ft,"step :"); put(ft,step); put(ft," "); put(ft,"t :"); put(ft,t); new_line(ft); if (out_code = sp) or (out_code = spc) then put_line(ft,"the predicted solution for t :"); put_vector(ft,sol); end if; end if; end pWrite; procedure pWrite ( step : in double_float; t : in double_complex ) is begin pWrite(Standard_Output,step,t); end pWrite; procedure pWrite ( step : in double_float; t : in double_complex; sol : in Solution ) is begin pWrite(Standard_Output,step,t,sol); end pWrite; procedure cWrite ( ft : in file_type; normax,normrx,normaf,normrf : in double_float ) is begin if (out_code = c) or (out_code = pc) or (out_code = sc) or (out_code = spc) then put(ft,"correction (a&r):"); put(ft,normax,3,3,3); put(ft,normrx,3,3,3); put(ft," "); put(ft,"residual (a&r):"); put(ft,normaf,3,3,3); put(ft,normaf,3,3,3); new_line(ft); end if; end cWrite; procedure cWrite ( normax,normrx,normaf,normrf : in double_float ) is begin cWrite(Standard_Output,normax,normrx,normaf,normrf); end cWrite; procedure cWrite ( ft : in file_type; rcond : in double_float; m : in natural ) is begin if (out_code = c) or (out_code = sc) or (out_code = pc) or (out_code = spc) then put(ft,"rcond :"); put(ft,rcond); put(ft," "); put(ft,"multiplicity : "); put(ft,m,1); new_line(ft); end if; end cWrite; procedure cWrite ( rcond : in double_float; m : in natural ) is begin cWrite(Standard_Output,rcond,m); end cWrite; procedure Write_convergence_factor ( factor : in double_float ) is begin if (out_code = c) or (out_code = sc) or (out_code = pc) or (out_code = spc) then put("convergence ratio :"); put(factor); new_line; end if; end Write_convergence_factor; procedure Write_convergence_factor ( ft : in file_type; factor : in double_float ) is begin if (out_code = c) or (out_code = sc) or (out_code = pc) or (out_code = spc) then put(ft,"convergence ratio :"); put(ft,factor); new_line(ft); end if; end Write_convergence_factor; procedure Write_Statistics ( nstep,nfail,niter,nsyst : in natural ) is begin Write_Statistics(Standard_Output,nstep,nfail,niter,nsyst); end Write_Statistics; procedure Write_Statistics ( ft : in file_type; nstep,nfail,niter,nsyst : in natural ) is begin --if out_code /= nil -- then put_line(ft,"######################################################"); put(ft,"number of steps :"); put(ft,nstep); new_line(ft); put(ft,"number of failures :"); put(ft,nfail); new_line(ft); put(ft,"number of iterations :"); put(ft,niter); new_line(ft); put(ft,"number of systems :"); put(ft,nsyst); new_line(ft); --end if; end Write_Statistics; procedure Write_Total_Statistics ( tnstep,tnfail,tniter,tnsyst : in natural ) is begin Write_Total_Statistics(Standard_Output,tnstep,tnfail,tniter,tnsyst); end Write_Total_Statistics; procedure Write_Total_Statistics ( ft : in file_type; tnstep,tnfail,tniter,tnsyst : in natural ) is begin put(ft,"total number of steps :"); put(ft,tnstep); new_line(ft); put(ft,"total number of failures :"); put(ft,tnfail); new_line(ft); put(ft,"total number of iterations :"); put(ft,tniter); new_line(ft); put(ft,"total number of systems :"); put(ft,tnsyst); new_line(ft); end Write_Total_Statistics; procedure sWrite_Solutions ( sols : in Solution_List ) is begin sWrite_Solutions(Standard_Output,sols); end sWrite_Solutions; procedure sWrite_Solutions ( ft : in file_type; sols : in Solution_List ) is begin if out_code /= nil then put(ft,sols); end if; end sWrite_Solutions; end Process_io; SHAR_EOF fi # end of overwriting check if test -f 'process_io.ads' then echo shar: will not over-write existing file "'process_io.ads'" else cat << "SHAR_EOF" > 'process_io.ads' with text_io,Solutions; use text_io,Solutions; with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Numbers,Complex_Vectors; use Complex_Numbers,Complex_Vectors; package Process_io is -- DESCRIPTION : -- This package determines the output operations during the continuation. -- The purpose is to concentrate all trivial output operations which could -- possibly overload the coding of the continuation process. -- Moreover, an uniform output format is achieved by this package. type output_code is ( nil,s,p,c,sp,sc,pc,spc ); -- Explanation of the output_code : -- nil : nothing will be written during the continuation process -- s : all intermediate solutions are written -- p : predictor information is written -- c : corrector information is written -- sp, sc, pc and spc are combinations of s, p and c procedure Set_Output_Code ( u : in output_code ); -- DESCRIPTION : -- Sets the status code for output during continuation. procedure Write_path ( n : in positive ); procedure Write_path ( ft : in file_type; n : in positive ); -- DESCRIPTION : -- The number of the paths is written on file or on standard output. procedure Write_block ( n : in positive ); procedure Write_block ( ft : in file_type; n : in positive ); -- DESCRIPTION : -- The block number is written on the output device procedure sWrite ( sol : in Solution); procedure sWrite ( ft : in file_type; sol : in Solution ); -- DESCRIPTION : -- The solution is written on file or on standard output. procedure pWrite ( step : in double_float; t : in double_complex ); procedure pWrite ( ft : in file_type; step : in double_float; t : in double_complex ); procedure pWrite ( step : in double_float; t : in double_complex; sol : in Solution ); procedure pWrite ( ft : in file_type; step : in double_float; t : in double_complex; sol : in Solution ); -- DESCRIPTION : -- The predictor information is written on file or on standard output. procedure cWrite ( normax,normrx,normaf,normrf : in double_float ); procedure cWrite ( ft : in file_type; normax,normrx,normaf,normrf : in double_float ); -- DESCRIPTION : -- The norm of the correction on x and residual is written. -- ON ENTRY : -- ft file type, must be created or opened for output, -- if not specified, then standard output will be taken; -- normax absolute norm of the correction dx on the solution x: ||dx||; -- normrx relative norm of the correction dx: ||dx||/||x||; -- normaf absolute norm of the residual: ||f(x)||; -- normrf relative norm of the residual: ||f(x)||/||x||. procedure cWrite ( rcond : in double_float; m : in natural ); procedure cWrite ( ft : in file_type; rcond : in double_float; m : in natural ); -- DESCRIPTION : -- The estimate for the inverse condition number of the Jacobi matrix -- is written, jointly with the (estimated) multiplicity of the solution. procedure Write_Statistics ( nstep,nfail,niter,nsyst : in natural ); procedure Write_Statistics ( ft : in file_type; nstep,nfail,niter,nsyst : in natural ); -- DESCRIPTION : -- This procedure writes statistical information after the -- computation of parts of the results. -- ON ENTRY : -- nstep the number of predictor steps; -- nfail the number of failures; -- niter the number of corrector iterations; -- nsyst the number of linear systems solved. procedure Write_Total_Statistics ( tnstep,tnfail,tniter,tnsyst : in natural ); procedure Write_Total_Statistics ( ft : in file_type; tnstep,tnfail,tniter,tnsyst : in natural ); -- DESCRIPTION -- This procedure writes statistical information after the -- solution of the problem. -- ON ENTRY : -- tnstep the total number of predictor steps; -- tnfail the total number of failures; -- tniter the total number of corrector iterations; -- tnsyst the total number of linear systems solved. procedure Write_convergence_factor ( factor : in double_float ); procedure Write_convergence_factor ( ft : in file_type; factor : in double_float ); -- DESCRIPTION : -- writes the convergence factor of the correction process procedure sWrite_Solutions ( sols : in Solution_List ); procedure sWrite_Solutions ( ft : in file_type; sols : in Solution_List ); -- DESCRIPTION : -- Writes down the computed solutions on standard output or on file. end Process_io; SHAR_EOF fi # end of overwriting check if test -f 'root_refiners.adb' then echo shar: will not over-write existing file "'root_refiners.adb'" else cat << "SHAR_EOF" > 'root_refiners.adb' with integer_io,Complex_Numbers_io; use integer_io,Complex_Numbers_io; with Complex_Numbers,Complex_Norms; use Complex_Numbers,Complex_Norms; with Complex_Matrices,Integer_Vectors; use Complex_Matrices; with Complex_Linear_System_Solvers; use Complex_Linear_System_Solvers; with Floating_Equalities; use Floating_Equalities; with Solutions_io; use Solutions_io; package body Root_Refiners is use Floating_Point_Numbers.double_float_io; -- AUXILIARIES : function Is_Real ( sol : Solution; tol : double_float ) return boolean is begin for i in sol.v'range loop if ABS(IMAG_PART(sol.v(i))) > tol then return false; end if; end loop; return true; end Is_Real; function Is_Equal ( s1,s2 : Solution; tol : double_float ) return boolean is begin for i in s1.v'range loop if not Is_Equal(s1.v(i),s2.v(i),tol) then return false; end if; end loop; return true; end Is_Equal; function Complex_Conjugate ( s : Solution ) return Solution is res : Solution(s.n) := s; begin for i in res.v'range loop res.v(i) := CMPLX(REAL_PART(s.v(i)),-IMAG_PART(s.v(i))); end loop; return res; end Complex_Conjugate; function Is_Clustered ( sol : Solution; nb : natural; sols : Solution_List; tol : double_float ) return natural is tmp : Solution_List := sols; cnt : natural := 0; begin while not Is_Null(tmp) loop cnt := cnt + 1; if cnt /= nb then if Is_Equal(sol,Head_Of(tmp).all,tol) then return cnt; end if; end if; tmp := Tail_Of(tmp); end loop; return nb; end Is_Clustered; function Is_Clustered ( sol : Solution; nb : natural; sols : Solution_Array; tol : double_float ) return natural is begin for i in sols'range loop if i /= nb then if Is_Equal(sol,sols(i).all,tol) then return i; end if; end if; end loop; return nb; end Is_Clustered; function Multiplicity ( sol : Solution; sols : Solution_List; tol : double_float ) return natural is tmp : Solution_List := sols; cnt : natural := 0; begin while not Is_Null(tmp) loop if Is_Equal(sol,Head_Of(tmp).all,tol) then cnt := cnt + 1; end if; tmp := Tail_Of(tmp); end loop; return cnt; end Multiplicity; function Multiplicity ( sol : Solution; sols : Solution_Array; tol : double_float ) return natural is cnt : natural := 0; begin for i in sols'range loop if Is_Equal(sol,sols(i).all,tol) then cnt := cnt + 1; end if; end loop; return cnt; end Multiplicity; procedure Write_Bar ( file : in file_type ) is begin for i in 1..75 loop put(file,'='); end loop; new_line(file); end Write_Bar; procedure Write_Info ( file : in file_type; zero : in Solution; i,n,numb : in natural; fail : in boolean ) is -- DESCRIPTION : -- The information concerning the zero is written begin -- Write_Bar(file); put(file,"solution : "); put(file,i,1); put(file," : "); put(file," start residual : "); put(file,zero.res,2,3,3); new_line(file); put(file,zero); end Write_Info; procedure Root_Accounting ( file : in file_type; ls : in out Link_to_Solution; nb : in natural; sa : in out Solution_Array; fail : in boolean; tolsing,tolclus : in double_float; nbfail,nbreal,nbcomp,nbreg,nbsing,nbclus : in out natural ) is -- DESCRIPTION : -- This procedure does root accounting of the solution sol, w.r.t. the -- solution list sols. Information will be provided concerning the type -- of solution. begin if fail then put_line(file," no solution =="); nbfail := nbfail + 1; ls.m := 0; else if Is_Real(ls.all,10.0**(-13)) then put(file," real "); nbreal := nbreal + 1; else put(file," complex "); nbcomp := nbcomp + 1; end if; if sa(nb).rco < tolsing then declare m : natural := Multiplicity(ls.all,sa,tolclus); begin if m = 1 then m := 0; end if; ls.m := m; end; put_line(file,"singular =="); nbsing := nbsing + 1; else declare nb2 : natural := Is_Clustered(ls.all,nb,sa,tolclus); begin if nb2 = nb then put_line(file,"regular =="); nbreg := nbreg + 1; else put(file,"clustered : "); put(file,nb2,1); put_line(file," =="); nbclus := nbclus + 1; end if; ls.m := 1; end; end if; end if; end Root_Accounting; procedure Root_Accounting ( ls : in out Link_to_Solution; nb : in natural; sa : in out Solution_Array; fail : in boolean; tolsing,tolclus : in double_float ) is -- DESCRIPTION : -- This procedure does root accounting of the solution sol, w.r.t. the -- solution list sols. Information will be provided concerning the type -- of solution. begin if fail then ls.m := 0; elsif sa(nb).rco < tolsing then declare m : natural := Multiplicity(ls.all,sa,tolclus); begin if m = 1 then ls.m := 0; else ls.m := m; end if; end; else ls.m := 1; end if; end Root_Accounting; procedure Write_Global_Info ( file : in file_type; tot,nbfail,nbreal,nbcomp,nbreg,nbsing,nbclus : in natural ) is begin Write_Bar(file); put(file,"A list of "); put(file,tot,1); put_line(file," solutions has been refined :"); put(file,"Number of regular solutions : "); put(file,nbreg,1); put_line(file,"."); put(file,"Number of singular solutions : "); put(file,nbsing,1); put_line(file,"."); put(file,"Number of real solutions : "); put(file,nbreal,1); put_line(file,"."); put(file,"Number of complex solutions : "); put(file,nbcomp,1); put_line(file,"."); put(file,"Number of clustered solutions : "); put(file,nbclus,1); put_line(file,"."); put(file,"Number of failures : "); put(file,nbfail,1); put_line(file,"."); Write_Bar(file); end Write_Global_Info; -- TARGET ROUTINES : procedure Silent_Newton ( p_eval : in Eval_Poly_Sys; j_eval : in Eval_Jacobi; zero : in out Solution; epsxa,epsfa : in double_float; numit : in out natural; max : in natural; fail : out boolean ) is n : natural := p_eval'length; jacobian : matrix(1..n,1..n); ipvt : Integer_Vectors.Vector(1..n); y,deltax : vector(1..n); begin y := eval(p_eval,zero.v); -- y = f(zero) for i in 1..max loop jacobian := eval(j_eval,zero.v); -- solve jacobian*deltax = -f(zero) -- Scale(jacobian,y); lufco(jacobian,n,ipvt,zero.rco); if 1.0 + zero.rco = 1.0 then fail := (norm1(y) > epsfa); return; -- singular Jacobi matrix end if; deltax := -y; lusolve(jacobian,n,ipvt,deltax); Plus_Vector(zero.v,deltax); -- make the updates y := eval(p_eval,zero.v); zero.err := norm1(deltax); zero.res := norm1(y); numit := numit + 1; if ( zero.err < epsxa ) or else ( zero.res < epsfa ) -- stopping criteria then fail := false; exit; elsif numit >= max then fail := true; exit; end if; end loop; jacobian := eval(j_eval,zero.v); -- compute condition number lufco(jacobian,n,ipvt,zero.rco); exception when numeric_error | constraint_error => fail := true; return; end Silent_Newton; procedure Reporting_Newton ( file : in file_type; p_eval : in Eval_Poly_Sys; j_eval : in Eval_Jacobi; zero : in out Solution; epsxa,epsfa : in double_float; numit : in out natural; max : in natural; fail : out boolean ) is n : natural := p_eval'length; jacobian : matrix(1..n,1..n); ipvt : Integer_Vectors.Vector(1..n); y,deltax : vector(1..n); begin y := Eval(p_eval,zero.v); -- y = f(zero) for i in 1..max loop jacobian := eval(j_eval,zero.v); -- solve jacobian*deltax = -f(zero) -- Scale(jacobian,y); lufco(jacobian,n,ipvt,zero.rco); if 1.0 + zero.rco = 1.0 -- singular jacobian matrix then fail := (norm1(y) > epsfa); -- accuracy not reached yet return; end if; deltax := -y; lusolve(jacobian,n,ipvt,deltax); Plus_Vector(zero.v,deltax); -- make the updates y := eval(p_eval,zero.v); zero.err := norm1(deltax); zero.res := norm1(y); numit := numit + 1; put(file,"Step "); put(file,numit,4); new_line(file); -- output put(file," |errxa| : "); put(file,zero.err); new_line(file); put(file," |errfa| : "); put(file,zero.res); new_line(file); if ( zero.err < epsxa ) or else ( zero.res < epsfa ) -- stopping criteria then fail := false; exit; elsif numit >= max then fail := true; exit; end if; end loop; jacobian := eval(j_eval,zero.v); -- compute condition number lufco(jacobian,n,ipvt,zero.rco); exception when numeric_error | constraint_error => fail := true; return; end Reporting_Newton; procedure Silent_Root_Refiner ( p : in Poly_Sys; sols : in out Solution_List; epsxa,epsfa,tolsing : in double_float; numit : in out natural; max : in natural ) is n : natural := p'length; p_eval : Eval_Poly_Sys(1..n) := Create(p); jac : Jacobi(1..n,1..n) := Create(p); jac_eval : Eval_Jacobi(1..n,1..n) := Create(jac); numb : natural; fail : boolean; sa : Solution_Array(1..Length_Of(sols)) := Create(sols); begin for i in sa'range loop numb := 0; sa(i).res := Norm1(Eval(p_eval,sa(i).v)); if sa(i).res < 1.0 then Silent_Newton(p_eval,jac_eval,sa(i).all,epsxa,epsfa,numb,max,fail); else fail := true; end if; Root_Accounting(sa(i),i,sa(sa'first..i),fail,tolsing,epsxa); numit := numit + numb; end loop; clear(p_eval); clear(jac); clear(jac_eval); Deep_Clear(sols); sols := Create(sa); Clear(sa); end Silent_Root_Refiner; procedure Silent_Root_Refiner ( p : in Poly_Sys; sols,refsols : in out Solution_List; epsxa,epsfa,tolsing : in double_float; numit : in out natural; max : in natural ) is n : natural := p'length; p_eval : Eval_Poly_Sys(1..n) := Create(p); jac : Jacobi(1..n,1..n) := Create(p); jac_eval : Eval_Jacobi(1..n,1..n) := Create(jac); numb : natural; fail : boolean; sa : Solution_Array(1..Length_Of(sols)) := Create(sols); refsols_last : Solution_List; begin for i in sa'range loop numb := 0; sa(i).res := Norm1(Eval(p_eval,sa(i).v)); if sa(i).res < 1.0 then Silent_Newton(p_eval,jac_eval,sa(i).all,epsxa,epsfa,numb,max,fail); if not fail then Append(refsols,refsols_last,sa(i).all); end if; else fail := true; end if; Root_Accounting(sa(i),i,sa(sa'first..i),fail,tolsing,epsxa); numit := numit + numb; end loop; clear(p_eval); clear(jac); clear(jac_eval); Deep_Clear(sols); sols := Create(sa); Clear(sa); end Silent_Root_Refiner; procedure Reporting_Root_Refiner ( file : in file_type; p : in Poly_Sys; sols : in out Solution_List; epsxa,epsfa,tolsing : in double_float; numit : in out natural; max : in natural; wout : in boolean ) is n : natural := p'length; p_eval : Eval_Poly_Sys(1..n) := Create(p); jac : Jacobi(1..n,1..n) := Create(p); jac_eval : Eval_Jacobi(1..n,1..n) := Create(jac); numb : natural; nbfail,nbreg,nbsing,nbclus,nbreal,nbcomp : natural := 0; nbtot : constant natural := Length_Of(sols); fail : boolean; sa : Solution_Array(1..nbtot) := Create(sols); begin new_line(file); put_line(file,"THE SOLUTIONS :"); new_line(file); put(file,nbtot,1); put(file," "); put(file,n,1); new_line(file); Write_Bar(file); for i in sa'range loop numb := 0; sa(i).res := Norm1(Eval(p_eval,sa(i).v)); if sa(i).res < 1.0 then if wout then Reporting_Newton (file,p_eval,jac_eval,sa(i).all,epsxa,epsfa,numb,max,fail); else Silent_Newton (p_eval,jac_eval,sa(i).all,epsxa,epsfa,numb,max,fail); end if; else fail := true; end if; Write_Info(file,sa(i).all,i,n,numb,fail); Root_Accounting(file,sa(i),i,sa(sa'first..i),fail,tolsing,epsxa, nbfail,nbreal,nbcomp,nbreg,nbsing,nbclus); numit := numit + numb; end loop; Write_Global_Info(file,nbtot,nbfail,nbreal,nbcomp,nbreg,nbsing,nbclus); clear(p_eval); clear(jac); clear(jac_eval); Deep_Clear(sols); sols := Create(sa); Clear(sa); end Reporting_Root_Refiner; procedure Reporting_Root_Refiner ( file : in file_type; p : in Poly_Sys; sols,refsols : in out Solution_List; epsxa,epsfa,tolsing : in double_float; numit : in out natural; max : in natural; wout : in boolean ) is n : natural := p'length; p_eval : Eval_Poly_Sys(1..n) := Create(p); jac : Jacobi(1..n,1..n) := Create(p); jac_eval : Eval_Jacobi(1..n,1..n) := Create(jac); numb : natural; nbfail,nbreg,nbsing,nbclus,nbreal,nbcomp : natural := 0; nbtot : constant natural := Length_Of(sols); fail : boolean; sa : Solution_Array(1..nbtot) := Create(sols); refsols_last : Solution_List; begin new_line(file); put_line(file,"THE SOLUTIONS :"); new_line(file); put(file,nbtot,1); put(file," "); put(file,n,1); new_line(file); Write_Bar(file); for i in sa'range loop numb := 0; sa(i).res := Norm1(Eval(p_eval,sa(i).v)); if sa(i).res < 1.0 then if wout then Reporting_Newton (file,p_eval,jac_eval,sa(i).all,epsxa,epsfa,numb,max,fail); else Silent_Newton (p_eval,jac_eval,sa(i).all,epsxa,epsfa,numb,max,fail); end if; if not fail then Append(refsols,refsols_last,sa(i).all); end if; else fail := true; end if; Write_Info(file,sa(i).all,i,n,numb,fail); Root_Accounting(file,sa(i),i,sa(sa'first..i),fail,tolsing,epsxa, nbfail,nbreal,nbcomp,nbreg,nbsing,nbclus); numit := numit + numb; end loop; Write_Global_Info(file,nbtot,nbfail,nbreal,nbcomp,nbreg,nbsing,nbclus); clear(p_eval); clear(jac); clear(jac_eval); Deep_Clear(sols); sols := Create(sa); Clear(sa); end Reporting_Root_Refiner; end Root_Refiners; SHAR_EOF fi # end of overwriting check if test -f 'root_refiners.ads' then echo shar: will not over-write existing file "'root_refiners.ads'" else cat << "SHAR_EOF" > 'root_refiners.ads' with text_io; use text_io; with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Vectors,Solutions; use Complex_Vectors,Solutions; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Jacobi_Matrices; use Jacobi_Matrices; package Root_Refiners is -- DESCRIPTION: -- The aim of this package is to provide some routines to -- perform root refining, to validate the approximate solutions. -- It can be used as a postprocessor to check the computed roots, -- or, as preprocessor, to find some suitable starting values for -- the continuation procedure. -- The basic root refiner is Newton's method. There are two versions -- provided : a silent and a reporting version. The reporting version puts -- intermediate results on file during the iterations, while the silent -- version simply returns the refined solutions. -- NEWTON'S METHOD : procedure Silent_Newton ( p_eval : in Eval_Poly_Sys; j_eval : in Eval_Jacobi; zero : in out Solution; epsxa,epsfa : in double_float; numit : in out natural; max : in natural; fail : out boolean ); procedure Reporting_Newton ( file : in file_type; p_eval : in Eval_Poly_Sys; j_eval : in Eval_Jacobi; zero : in out Solution; epsxa,epsfa : in double_float; numit : in out natural; max : in natural; fail : out boolean ); -- DESCRIPTION : -- Newton's method is applied to refine the approximation of a root. -- The stopping criteria are: -- * numit > max (maximum number of iterations is exceeded); -- * zero.err < epsxa (accuracy for x is reached); -- * zero.res < epsfa (tolerance for residual is reached). -- When one of these conditions is fulfilled, the procedure stops. -- ON ENTRY : -- file to write intermediate results on; -- p_eval evaluable form of the polynomial system; -- j_eval evaluable form of the Jacobian matrix; -- zero starting value; -- epsxa maximum absolute error on the zero; -- epsfa maximum absolute value of the residue; -- numit number of iterations, to be initialized with zero; -- max maximum number of iterations. -- ON RETURN : -- zero refined root; -- numit number of iterations performed; -- fail is true when the desired precision is not reached. -- APPLICATION of Newton's Method on a list of solutions. -- The silent versions simply perform the calculations. -- The reporting root refiners allow the output of intermediate results and -- produce a summary of the calculations. -- With each version, an additional output parameter can be supplied to -- contain only those solutions that satisfy the accuracy requirements. procedure Silent_Root_Refiner ( p : in Poly_Sys; sols : in out Solution_List; epsxa,epsfa,tolsing : in double_float; numit : in out natural; max : in natural ); procedure Silent_Root_Refiner ( p : in Poly_Sys; sols,refsols : in out Solution_List; epsxa,epsfa,tolsing : in double_float; numit : in out natural; max : in natural ); procedure Reporting_Root_Refiner ( file : in file_type; p : in Poly_Sys; sols : in out Solution_List; epsxa,epsfa,tolsing : in double_float; numit : in out natural; max : in natural; wout : in boolean ); procedure Reporting_Root_Refiner ( file : in file_type; p : in Poly_Sys; sols,refsols : in out Solution_List; epsxa,epsfa,tolsing : in double_float; numit : in out natural; max : in natural; wout : in boolean ); -- DESCRIPTION : -- The list of solutions sols is refined w.r.t. the system p. -- The multiplicity of each solution in sols is determined as follows: -- m = 0 : if the solution is singular and probably non isolated -- or if the solution lies at infinity ( in fact no solution ); -- m = 1 : if the solution is regular; -- m > 1 : a multiple solution with multiplicity m. -- ON ENTRY : -- file file for writing diagnostics on; -- p a polynomial system; -- sols the start solutions; -- epsxa maximum absolute error on the zero; -- epsfa maximum absolute value for the residue; -- tolsing tolerance on inverse condition number for singular solution; -- numit the number of iterations, to be initialized with zero; -- max maximum number of iterations per zero; -- wout has to be true when intermediate output is wanted. -- ON RETURN : -- sols a list of computed solutions; -- refsols only those solutions which satisfy the given accuracy; -- numit the number of iterations. end Root_Refiners; SHAR_EOF fi # end of overwriting check if test -f 'scanners_for_continuation.adb' then echo shar: will not over-write existing file "'scanners_for_continuation.adb'" else cat << "SHAR_EOF" > 'scanners_for_continuation.adb' with integer_io; use integer_io; with File_Operations; use File_Operations; with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Numbers_io; use Complex_Numbers_io; with Continuation_Parameters; use Continuation_Parameters; with Process_io; use Process_io; package body Scanners_for_Continuation is use Floating_Point_Numbers.double_float_io; -- AUXILIAIRIES : procedure Scan_Natural ( file : in file_type; n : in out natural ) is -- DESCRIPTION : -- Scans the current line of the file for a natural number, -- which should occur after a `:'. found : boolean; begin Scan(file,":",found); get(file,n); skip_line(file); exception when others => put_line("INCORRECTLY SPECIFIED NATURAL NUMBER"); raise; end Scan_Natural; procedure Scan_Float ( file : in file_type; f : in out double_float ) is -- DESCRIPTION : -- Scans the current line of the file for a floating point number, -- which should occur after a `:'. found : boolean; begin Scan(file,":",found); get(file,f); skip_line(file); exception when others => put_line("INCORRECTLY SPECIFIED FLOATING POINT NUMBER"); raise; end Scan_Float; procedure Scan_Complex ( file : in file_type; c : in out double_complex ) is -- DESCRIPTION : -- Scans the current line of the file for a complex number, -- which should occur after a `:'. found : boolean; begin Scan(file,":",found); get(file,c); skip_line(file); exception when others => put_line("INCORRECTLY SPECIFIED COMPLEX NUMBER"); raise; end Scan_Complex; -- TARGET PROCEDURES : procedure Scan_Homotopy_Parameters ( file : in file_type; k : out natural; a : out double_complex ) is found : boolean; kk : natural := 0; aa : double_complex := CMPLX(0.0); begin Scan_and_Skip(file,"HOMOTOPY PARAMETERS",found); if found then Scan_Natural(file,kk); Scan_Complex(file,aa); end if; k := kk; a := aa; exception when others => put_line("INCORRECTLY SPECIFIED HOMOTOPY PARAMETERS"); raise; end Scan_Homotopy_Parameters; procedure Scan_Continuation_Parameters ( file : in file_type ) is found : boolean; begin Scan_and_Skip(file,"CONTINUATION PARAMETERS",found); if found then null; -- Scan_and_Skip(file,"CONDITION",found); -- Scan_Natural(file,condition); -- Scan_and_Skip(file,"MONITOR",found); -- Scan_Natural(file,block_size); -- Scan_Natural(file,predictor_type); -- Scan_Natural(file,max_steps); -- Scan_Float(file,start_end_game); -- Scan_Natural(file,max_reruns); -- Scan_and_Skip(file,"STEP CONTROL",found); -- Scan_Float(file,min_step_size); -- Scan_Float(file,max_step_size); -- Scan_Float(file,reduction_factor); -- Scan_Float(file,expansion_factor); -- Scan_Natural(file,success_steps); -- Scan_and_Skip(file,"PATH CLOSENESS",found); -- Scan_Natural(file,max_iter_path); -- Scan_Natural(file,max_iter_end); -- Scan_Float(file,relative_path_residual); -- Scan_Float(file,absolute_path_residual); -- Scan_Float(file,relative_path_correction); -- Scan_Float(file,absolute_path_correction); -- Scan_Float(file,relative_end_residual); -- Scan_Float(file,absolute_end_residual); -- Scan_Float(file,relative_end_correction); -- Scan_Float(file,absolute_end_correction); -- Scan_and_Skip(file,"SOLUTIONS",found); -- Scan_Float(file,tol_inverse_condition); -- Scan_Float(file,tol_distance); -- Scan_Float(file,tol_at_infinity); end if; exception when others => put_line("INCORRECTLY SPECIFIED CONTINUATION PARAMETERS"); raise; end Scan_Continuation_Parameters; procedure Scan_Output_Parameter ( file : in file_type; op : out natural ) is found : boolean; oc : natural := 0; begin Scan(file,"OUTPUT PARAMETER",found); if found then Scan_Natural(file,oc); case oc is when 1 => Set_output_code(s); when 2 => Set_output_code(p); when 3 => Set_output_code(c); when 4 => Set_output_code(sp); when 5 => Set_output_code(sc); when 6 => Set_output_code(pc); when 7 => Set_output_code(spc); when others => Set_output_code(nil); end case; else Set_output_code(nil); end if; op := oc; exception when others => put_line("INCORRECTLY SPECIFIED OUTPUT PARAMETER"); raise; end Scan_Output_Parameter; end Scanners_for_Continuation; SHAR_EOF fi # end of overwriting check if test -f 'scanners_for_continuation.ads' then echo shar: will not over-write existing file "'scanners_for_continuation.ads'" else cat << "SHAR_EOF" > 'scanners_for_continuation.ads' with text_io; use text_io; with Complex_Numbers; use Complex_Numbers; package Scanners_for_Continuation is -- DESCRIPTION : -- This package provides scanning procedures for reading the -- input data for polynomial continuation from file. procedure Scan_Homotopy_Parameters ( file : in file_type; k : out natural; a : out double_complex ); -- DESCRIPTION : -- Scans the file for the homotopy parameters k and a. -- If they are not found, then both output parameters are zero. procedure Scan_Continuation_Parameters ( file : in file_type ); -- DESCRIPTION : -- Scans the file for the continuation parameters. -- If no continuation parameters are given, then nothing happens. procedure Scan_Output_Parameter ( file : in file_type; op : out natural ); -- DESCRIPTION : -- Scans the file for the output parameter (op) of the continuation. -- If no output code is given, then nothing happens. end Scanners_for_Continuation; SHAR_EOF fi # end of overwriting check if test -f 'valipoco.adb' then echo shar: will not over-write existing file "'valipoco.adb'" else cat << "SHAR_EOF" > 'valipoco.adb' with integer_io; use integer_io; with File_Operations; use File_Operations; with Timing_Package; use Timing_Package; with Floating_Point_Numbers; use Floating_Point_Numbers; with Float_Vectors_of_Vectors; with Float_Vectors,Float_Vectors_io; use Float_Vectors,Float_Vectors_io; with Integer_Vectors,Integer_Vectors_io; use Integer_Vectors_io; with Integer_Vectors_of_Vectors; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; procedure valipoco ( pocofile,resultfile : in file_type ) is use Floating_Point_Numbers.double_float_io; timer : timing_widget; -- SCANNING THE INFORMATION FROM FILE : procedure Scan_System ( file : in file_type; p : out Link_to_Poly_Sys ) is -- DESCRIPTION : -- Scans the file for the target system. found : boolean := false; lp : Link_to_Poly_Sys; begin Scan_and_Skip(file,"TARGET SYSTEM",found); if found then get(file,lp); p := lp; end if; end Scan_System; procedure Scan_Dimensions ( file : in file_type; n,npaths : out natural ) is -- DESCRIPTION : -- Scans the input file for the dimension and the number of paths. found : boolean := false; tmp : integer := 0; begin Scan_and_Skip(file,"START SOLUTIONS",found); if not found then n := 0; npaths := 0; else get(file,tmp); npaths := tmp; get(file,tmp); n := tmp; end if; end Scan_Dimensions; procedure Scan_Data ( infile,outfile : in file_type; n,npaths : in natural; nv : out Float_Vectors_of_Vectors.Vector; em : out Integer_Vectors.Vector; ev,rv : out Float_Vectors.Vector ) is -- DESCRIPTION : -- Scans for the computed directions nv, the errors ev, -- the residuals rv and the estimated multiplicities em. -- REQUIRED : nv'range = em'range = ev'range = rv'range = 1..npaths. -- ON ENTRY : -- infile file with input data from poco; -- outfile file to write results to; -- n dimension of the vectors along the paths; -- npaths number of paths. -- ON RETURN : -- nv the computed path directions; -- em estimated multiplicities; -- rv residuals. v : Float_Vectors_of_Vectors.Vector(1..npaths); m : Integer_Vectors.Vector(1..npaths); e,r : Float_Vectors.Vector(1..npaths); found : boolean := false; begin for i in v'range loop -- scan for normals Scan_and_Skip(infile,"Computed direction",found); exit when not found; v(i) := new Float_Vectors.Vector(1..n); get(infile,v(i).all); Scan(infile,"error :",found); exit when not found; get(infile,e(i)); end loop; for i in m'range loop -- scan for normals and residuals Scan(infile,"m :",found); exit when not found; get(infile,m(i)); Scan(infile,"res :",found); exit when not found; get(infile,r(i)); end loop; put_line(outfile, "COMPUTED DIRECTIONS, ESTIMATED MULTIPLICITY AND RESIDUALS : "); for i in v'range loop put(outfile,i,1); put(outfile," :"); put(outfile,v(i),3,3,3); put(outfile," err : "); put(outfile,e(i),3,3,3); put(outfile," m : "); put(outfile,m(i),1); put(outfile," res : "); put(outfile,r(i),2,3,3); new_line(outfile); end loop; nv := v; em := m; ev := e; rv := r; end Scan_Data; -- PROCESSING THE DATA : function Lattice_Error ( x : Float_Vectors.Vector ) return double_float is -- DESCRIPTION : -- Returns the sum of the differences of the components in x with -- the closest corresponding integer. res : double_float := 0.0; begin for i in x'range loop res := res + abs(x(i) - double_float(integer(x(i)))); end loop; return res; end Lattice_Error; function Lattice_Errors ( v : Float_Vectors_of_Vectors.Vector ) return Float_Vectors.Vector is res : Float_Vectors.Vector(v'range); begin for i in v'range loop res(i) := Lattice_Error(v(i).all); end loop; return res; end Lattice_Errors; function Maximum ( v : Float_Vectors.Vector ) return double_float is -- DESCRIPTION : -- Returns the largest component in absolute value. max : double_float := abs(v(v'first)); begin for i in v'first+1..v'last loop if abs(v(i)) > max then max := abs(v(i)); end if; end loop; return max; end Maximum; procedure Scale ( v : in out Float_Vectors_of_Vectors.Vector; e : in out Float_Vectors.Vector ) is -- DESCRIPTION : -- Divides every vector by its largest element in absolute value, -- with as well the corresponding errors. use Float_Vectors; tol : double_float := 10.0**(-8); max : double_float; begin for i in v'range loop max := Maximum(v(i).all); if max > tol then v(i).all := (1.0/max)*v(i).all; e(i) := e(i)/max; end if; end loop; end Scale; -- COMPUTE FREQUENCY TABLE : function Equal ( v1,v2 : Float_Vectors.Vector; tol : double_float ) return boolean is -- DESCRIPTION : -- Returns true if abs(v1(i)-v2(i)) <= tol, for i in v1'range=v2'range. begin for i in v1'range loop if abs(v1(i)-v2(i)) > tol then return false; end if; end loop; return true; end Equal; procedure Update_Frequency ( vpath : in out Integer_Vectors_of_Vectors.Vector; i,pathno : in natural ) is -- DESCRIPTION : -- A path, with pathno, has as path direction i. freq : Integer_Vectors.Vector(vpath(i)'first..vpath(i)'last+1); begin freq(vpath(i)'range) := vpath(i).all; freq(freq'last) := pathno; Integer_Vectors.Clear(vpath(i)); vpath(i) := new Integer_Vectors.Vector'(freq); end Update_Frequency; procedure Update_Frequency_Table ( freqv : in out Float_Vectors_of_Vectors.Vector; vpath : in out Integer_Vectors_of_Vectors.Vector; cnt : in out natural; tol : in double_float; v : in Float_Vectors.Vector; pathno : in natural ) is -- DESCRIPTION : -- Scans the current frequency table for the vector v. done : boolean := false; begin for i in 1..cnt loop if Equal(v,freqv(i).all,tol) then Update_Frequency(vpath,i,pathno); done := true; end if; exit when done; end loop; if not done then cnt := cnt + 1; freqv(cnt) := new Float_Vectors.Vector'(v); vpath(cnt) := new Integer_Vectors.Vector'(1..1 => pathno); end if; end Update_Frequency_Table; procedure Frequency_Table ( v : in Float_Vectors_of_Vectors.Vector; e,r : in Float_Vectors.Vector; tol : in double_float; freqv : out Float_Vectors_of_Vectors.Link_to_Vector; vpath : out Integer_Vectors_of_Vectors.Link_to_Vector ) is -- DESCRIPTION : -- Computes the frequency table of path directions. -- Only those directions for which the error is smaller than tol -- and the corresponding residual is higher than tol are considered. -- ON ENTRY : -- v scaled computed path directions; -- e errors on the computed path directions; -- r residuals of the solutions at the end of the paths; -- tol tolerance for precision. -- ON RETURN : -- freqv different path directions; -- vpath for each direction, vector of paths with same direction. cnt : natural := 0; freqdirs : Float_Vectors_of_Vectors.Vector(v'range); freqpath : Integer_Vectors_of_Vectors.Vector(v'range); begin for i in v'range loop if r(i) > tol and then e(i) < tol then Update_Frequency_Table(freqdirs,freqpath,cnt,tol,v(i).all,i); end if; end loop; freqv := new Float_Vectors_of_Vectors.Vector'(freqdirs(1..cnt)); vpath := new Integer_Vectors_of_Vectors.Vector'(freqpath(1..cnt)); end Frequency_Table; function Average_Error ( pathdir : Integer_Vectors.Vector; e : Float_Vectors.Vector ) return double_float is -- DESCRIPTION : -- Returns the average error over all paths in pathdir. cnt : constant natural := pathdir'length; res : double_float := 0.0; begin for i in pathdir'range loop res := res + e(pathdir(i)); end loop; res := res/double_float(cnt); return res; end Average_Error; procedure Write_Frequency_Table ( file : in file_type; freqv : in Float_Vectors_of_Vectors.Vector; vpath : in Integer_Vectors_of_Vectors.Vector; m : in Integer_Vectors.Vector; e : in Float_Vectors.Vector ) is -- DESCRIPTION : -- Writes the frequency table on file, together with estimated m and error. begin put_line(file,"FREQUENCY TABLE OF PATH DIRECTIONS :"); for i in freqv'range loop put(file,"v("); put(file,i,1); put(file,") : "); put(file,freqv(i),3,3,3); put(file," m : "); put(file,m(vpath(i)(1)),1); put(file," err : "); put(file,e(vpath(i)(1)),3,3,3); put(file," avgerr : "); put(file,Average_Error(vpath(i).all,e),3,3,3); put(file," laterr : "); put(file,Lattice_Error(freqv(i).all),3,3,3); new_line(file); put(file," with "); put(file,vpath(i)'last,1); put(file," paths : "); put(file,vpath(i)); new_line(file); end loop; end Write_Frequency_Table; -- COMPUTING FACES OF POLYNOMIAL SYSTEMS : function Product ( d : Degrees; v : Float_Vectors.Vector ) return double_float is -- DESCRIPTION : Returns . res : double_float := 0.0; begin for i in d'range loop res := res + double_float(d(i))*v(i); end loop; return res; end Product; function Minimal_Support ( p : Poly; v : Float_Vectors.Vector ) return double_float is min : double_float := 0.0; first : boolean := true; procedure Scan_Term ( t : in Term; cont : out boolean ) is ip : double_float := Product(t.dg,v); begin if first then min := ip; first := false; elsif ip < min then min := ip; end if; cont := true; end Scan_Term; procedure Scan_Terms is new Visiting_Iterator(Scan_Term); begin Scan_Terms(p); return min; end Minimal_Support; function Face ( p : Poly; tol,ip : double_float; v : Float_Vectors.Vector ) return Poly is -- DESCRIPTION : -- Returns those terms t for which abs( - ip) <= tol. res : Poly := Null_Poly; procedure Visit_Term ( t : in Term; cont : out boolean ) is begin if abs(Product(t.dg,v) - ip) <= tol then Plus_Term(res,t); end if; cont := true; end Visit_Term; procedure Visit_Terms is new Visiting_Iterator(Visit_Term); begin Visit_Terms(p); return res; end Face; function Face ( p : Poly; tol : double_float; v : Float_Vectors.Vector ) return Poly is -- DESCRIPTION : -- Returns the face of the polynomial with outer normal v. ip : double_float := Minimal_Support(p,v); begin return Face(p,tol,ip,v); end Face; function Face ( p : Poly_Sys; tol : double_float; v : Float_Vectors.Vector ) return Poly_Sys is -- DESCRIPTION : -- Returns the face of the system with outer normal v. res : Poly_Sys(p'range); begin for i in p'range loop res(i) := Face(p(i),tol,v); end loop; return res; end Face; procedure Face_Systems ( file : in file_type; p : in Poly_Sys; tol : in double_float; v : in Float_Vectors_of_Vectors.Vector ) is -- DESCRIPTION : -- Computes the faces and the number of paths that diverged to it. begin put_line(file,"FACE SYSTEMS :"); for i in v'range loop put(file,"path direction "); put(file,i,1); put_line(file," :"); put(file,Face(p,tol,v(i).all)); end loop; end Face_Systems; -- MAIN PROCEDURE : procedure Main ( infile,outfile : in file_type ) is tol : constant double_float := 10.0**(-2); lp : Link_to_Poly_Sys; n,npaths : natural; begin Scan_System(infile,lp); put_line(outfile,"TARGET SYSTEM : "); put(outfile,lp.all); Scan_Dimensions(infile,n,npaths); put(outfile," n : "); put(outfile,n,1); put(outfile," and #paths : "); put(outfile,npaths,1); new_line(outfile); declare v : Float_Vectors_of_Vectors.Vector(1..npaths); m : Integer_Vectors.Vector(1..npaths); e,r,le : Float_Vectors.Vector(1..npaths); freqv : Float_Vectors_of_Vectors.Link_to_Vector; vpath : Integer_Vectors_of_Vectors.Link_to_Vector; begin Scan_Data(infile,outfile,n,npaths,v,m,e,r); le := Lattice_Errors(v); -- Scale(v,e); -- avoid because, then fractions may arise Frequency_Table(v,e,r,tol,freqv,vpath); Write_Frequency_Table(outfile,freqv.all,vpath.all,m,e); Face_Systems(outfile,lp.all,tol,freqv.all); end; end Main; begin tstart(timer); Main(pocofile,resultfile); tstop(timer); new_line(resultfile); print_times(resultfile,timer,"Validation stage of polyhedral end game"); new_line(resultfile); end valipoco; SHAR_EOF fi # end of overwriting check if test -f 'valipoco.ads' then echo shar: will not over-write existing file "'valipoco.ads'" else cat << "SHAR_EOF" > 'valipoco.ads' with text_io; use text_io; procedure valipoco ( pocofile,resultfile : in file_type ); -- DESCRIPTION : -- This is an intermediate stage in the polyhedral end game. -- Scans the output file of poco for the computed directions, -- residuals and estimated multiplicities of the solutions. -- Computes the frequency table of path directions. SHAR_EOF fi # end of overwriting check if test -f 'vlprs_algorithm.adb' then echo shar: will not over-write existing file "'vlprs_algorithm.adb'" else cat << "SHAR_EOF" > 'vlprs_algorithm.adb' with vLpRs_Tables; use vLpRs_Tables; with Float_Matrices_io; use Float_Matrices_io; package body vLpRs_Algorithm is use Floating_Point_Numbers.double_float_io; -- OUTPUT ROUTINES OF ERROR : procedure Write_Init ( file : in file_type; s,l,v : in Vector ) is -- DESCRIPTION : -- Writes the beginning of the error table. tmp,err : double_float; w : integer; begin tmp := v(1)/l(1); w := integer(tmp); err := abs(tmp - double_float(w)); put(file,s(0),2,3,3); new_line(file); put(file,s(1),2,3,3); put(file,err,2,3,3); new_line(file); end Write_Init; procedure Write ( file : in file_type; k : in natural; s : in double_float; l,v : in Vector ) is -- DESCRIPTION : -- Writes an additional row of k columns of the error table. -- Note that when m is wrong, the outcome is no longer integer. tmp,err : double_float; w : integer; begin put(file,s,2,3,3); -- w := v(k)/l(k); -- w := integer(v(k)/l(k)); for i in 1..k loop tmp := v(i)/l(i); -- err := abs(tmp-w); -- err := abs(tmp - double_float(w)); put(file,err,2,3,3); end loop; new_line(file); end Write; -- TARGET ROUTINES : procedure vLpRs_full ( r : in natural; s,logs,logx : in Vector; srp,dsp,p,l,v : in out Vector; rt1,rt2 : in out Matrix ) is begin vL_full(s(0..r),logs(0..r),logx(0..r),srp,dsp,p,l,v,rt1,rt2); rt1 := rt2; for k in r+1..s'last loop vlprs_pipe(s(k),logs(k),logx(k),srp,dsp,p,l,v,rt1,rt2); end loop; end vLpRs_full; procedure vLpRs_pipe ( file : in file_type; r : in natural; s,logs,logx : in Vector; srp,dsp,p,l,v : in out Vector; rt1,rt2 : in out Matrix ) is begin p(0) := 1.0; -- initialization v(0..1) := logx(0..1); l(0..1) := logs(0..1); L_pipe(l(0..1),p(0..0),logs(1)); v_pipe(v(0..1),p(0..0),logx(1)); -- Write_Init(file,s,l,v); -- write the error table for k in 2..r loop p_full(s(0..k),srp(1..k-1),dsp(1..k-1),p(0..k-1),rt1,rt2); L_pipe(l(0..k),p(0..k-1),logs(k)); -- extrapolate v_pipe(v(0..k),p(0..k-1),logx(k)); -- Write(file,k,s(k),l,v); -- write the error table -- put_line(file,"rt2 :"); put(file,rt2,3,3,3); end loop; rt1 := rt2; for k in r+1..s'last loop vlprs_pipe(file,s(k),logs(k),logx(k),srp,dsp,p,l,v,rt1,rt2); -- put_line(file,"rt2 : "); put(file,rt2,3,3,3); end loop; end vLpRs_pipe; procedure vLpRs_pipe ( s,logs,logx : in double_float; srp,dsp,p,l,v : in out Vector; rt1,rt2 : in out Matrix ) is begin s_pipe(srp,s,dsp); RR_pipe(rt1,dsp,p,rt2); p_pipe(rt1,rt2,p); rt1 := rt2; L_pipe(l,p,logs); v_pipe(v,p,logx); end vLpRs_pipe; procedure vLpRs_pipe ( file : in file_type; s,logs,logx : in double_float; srp,dsp,p,l,v : in out Vector; rt1,rt2 : in out Matrix ) is begin vLpRs_pipe(s,logs,logx,srp,dsp,p,l,v,rt1,rt2); -- Write(file,l'last,s,l,v); end vLpRs_pipe; end vLpRs_Algorithm; SHAR_EOF fi # end of overwriting check if test -f 'vlprs_algorithm.ads' then echo shar: will not over-write existing file "'vlprs_algorithm.ads'" else cat << "SHAR_EOF" > 'vlprs_algorithm.ads' with text_io; use text_io; with Floating_Point_Numbers; use Floating_Point_Numbers; with Float_Vectors,Float_Matrices; use Float_Vectors,Float_Matrices; package vLpRs_Algorithm is -- DESCRIPTION : -- This package provides several routines for an extrapolation method on -- the power series x(s) = a s^w ( 1 + O(s) ). -- Because the aim is to estimate the leading power w, the algorithm -- takes the logs as input. So it considers the sequence -- log(|x(s_k)|) = log(|a|) + w log(s_k) + log(1 + O(s_k)), -- for a sequence s_0 > s_1 > .. > s_m > 0, with m >= the order r. -- USAGE : -- The first two routines are interesting to fill up the pipe, until -- sufficient data points are available to match the order. -- From then on, the fully incremental version can be used. -- START UP FROM SCRATCH : procedure vLpRs_full ( r : in natural; s,logs,logx : in Vector; srp,dsp,p,l,v : in out Vector; rt1,rt2 : in out Matrix ); -- DESCRIPTION : -- Calls the full version of the vLpRs-Algorithm. -- REQUIRED : -- s'range = logs'range = logx'range, s'last >= r, -- srp'range = dsp'range = 1..r-1 = rt1'range(*) = rt2'range(*), -- p'range = 0..r-1, l'range = v'range = 0..r. -- ON ENTRY : -- r order of the extrapolation method; -- s strictly decreasing sequence of positive numbers; -- logs logarithms of the s-values; -- logx logarithms of |x(s_k)|. -- ON RETURN : -- srp last row of powers of consecutive s-values; -- dsp last row of differences of consecutive s-powers; -- p last row of p-factors; -- l last row in the L-table, with error O(s^r). -- v last row in the v-table, with error O(s^r). -- rt1,rt2 last consecutive R-tables. procedure vLpRs_pipe ( file : in file_type; r : in natural; s,logs,logx : in Vector; srp,dsp,p,l,v : in out Vector; rt1,rt2 : in out Matrix ); -- DESCRIPTION : -- Constructs the extrapolation table in an incremental way. -- REQUIRED : -- s'range = logs'range = logx'range, s'last >= r, -- srp'range = dsp'range = 1..r-1 = rt1'range(*) = rt2'range(*), -- p'range = 0..r-1, l'range = v'range = 0..r. -- ON ENTRY : -- file to write error table on; -- r order of the extrapolation method; -- s strictly decreasing sequence of positive numbers; -- logs logarithms of the s-values; -- logx logarithms of |x(s_k)|. -- ON RETURN : -- srp last row of powers of consecutive s-values; -- dsp last row of differences of consecutive s-powers; -- p last row of p-factors; -- l last row in the L-table, with error O(s^r). -- v last row in the v-table, with error O(s^r). -- rt1,rt2 last consecutive R-tables. -- INCREMENTAL UPDATE : procedure vLpRs_pipe ( s,logs,logx : in double_float; srp,dsp,p,l,v : in out Vector; rt1,rt2 : in out Matrix ); procedure vLpRs_pipe ( file : in file_type; s,logs,logx : in double_float; srp,dsp,p,l,v : in out Vector; rt1,rt2 : in out Matrix ); -- DESCRIPTION : -- One additional row of every table is computed. -- REQUIRED : -- srp'range = dsp'range = 1..r-1 = rt1'range(*) = rt2'range(*), -- p'range = 0..r-1, l'range = v'range = 0..r. -- ON ENTRY : -- file to write table with errors on; -- s new s-value, must be smaller than latest one and nonzero; -- logs logarithm of s; -- logx logarithm of the absolute value of |x(s)|; -- srp last row of powers of consecutive s-values; -- dsp last row of differences of consecutive s-powers; -- p last row of p-factors; -- l last row of extrapolated logarithms of s-values; -- v last row of extrapolated logarithms of data points; -- rt1,rt2 last consecutive R-tables. -- ON RETURN : -- srp updated row of powers of consecutive s-values; -- dsp updated row of differences of consecutive s-powers; -- p updated row of p-factors; -- l updated row of extrapolated logarithms of s-values; -- v updated row of extrapolated logarithms of data points; -- rt1,rt2 updated consecutive R-tables. end vLpRs_Algorithm; SHAR_EOF fi # end of overwriting check if test -f 'vlprs_tables.adb' then echo shar: will not over-write existing file "'vlprs_tables.adb'" else cat << "SHAR_EOF" > 'vlprs_tables.adb' package body vLpRs_Tables is -- I. The v-table : procedure v_pipe ( v : in out Vector; p : in Vector; vr : in double_float ) is tmp0,tmp1 : double_float; begin tmp0 := v(0); v(0) := vr; for i in 1..v'last loop tmp1 := v(i); v(i) := tmp0 - p(i-1)*v(i-1); tmp0 := tmp1; end loop; end v_pipe; procedure v_pipe ( v,p : in Vector; vr : in double_float; vrp : in out Vector ) is begin vrp(0) := vr; for i in 1..v'last loop vrp(i) := v(i-1) - p(i-1)*vrp(i-1); end loop; end v_pipe; -- II. The L-table : procedure L_pipe ( l : in out Vector; p : in Vector; lr : in double_float ) is tmp0,tmp1 : double_float; begin tmp0 := l(0); l(0) := lr; for i in 1..l'last loop tmp1 := l(i); l(i) := tmp0 - p(i-1)*l(i-1); tmp0 := tmp1; end loop; end L_pipe; procedure L_pipe ( l,p : in Vector; lr : in double_float; lrp : in out Vector ) is begin lrp(0) := lr; for i in 1..l'last loop lrp(i) := l(i-1) - p(i-1)*lrp(i-1); end loop; end L_pipe; -- The combined full version for v- and L-table : procedure vL_full ( s,l,v : in Vector; srp,dsp,p,lrp,vrp : out Vector; rt1,rt2 : in out Matrix ) is srm1,tmpsrp,tmpdsp : Vector(1..s'last-1); tmpp : Vector(0..s'last-1); prev_lrp,new_lrp,prev_vrp,new_vrp : Vector(s'range); k_last : integer; begin srm1(srm1'first) := s(0); for i in srm1'first+1..srm1'last loop srm1(i) := s(0)*srm1(i-1); end loop; s_pipe(srm1,s(1),tmpsrp,tmpdsp); srm1 := tmpsrp; for j in rt1'range(2) loop rt1(1,j) := tmpdsp(j); end loop; tmpp(0) := 1.0; prev_lrp(0) := l(0); new_lrp(0) := l(1); prev_vrp(0) := v(0); new_vrp(0) := v(1); new_vrp(1) := prev_vrp(0) - new_vrp(0); new_lrp(1) := prev_lrp(0) - new_lrp(0); prev_lrp(0..1) := new_lrp(0..1); prev_vrp(0..1) := new_vrp(0..1); for i in 2..s'last loop s_pipe(srm1,s(i),tmpsrp,tmpdsp); srm1 := tmpsrp; for j in rt2'range(2) loop rt2(1,j) := tmpdsp(j); end loop; if i < s'last then k_last := i; -- compute one additional row else k_last := i-1; end if; for k in 1..k_last loop tmpp(k) := rt1(k,k)/rt2(k,k); for j in k+1..rt2'last(2) loop rt2(k+1,j) := rt1(k,j) - tmpp(k)*rt2(k,j); end loop; end loop; rt1 := rt2; new_vrp(0) := v(i); new_lrp(0) := l(i); for k in 1..i loop new_vrp(k) := prev_vrp(k-1) - tmpp(k-1)*new_vrp(k-1); new_lrp(k) := prev_lrp(k-1) - tmpp(k-1)*new_lrp(k-1); end loop; prev_vrp(0..i) := new_vrp(0..i); prev_lrp(0..i) := new_lrp(0..i); end loop; srp := tmpsrp; dsp := tmpdsp; p := tmpp; lrp := new_lrp; vrp := new_vrp; end vL_full; -- III. The p-table : procedure p_full ( s : in Vector; srp,dsp,p : out Vector; rt1,rt2 : in out Matrix ) is begin RR_full(s,srp,dsp,p,rt1,rt2); end p_full; procedure p_pipe ( rt1,rt2 : in Matrix; p : out Vector ) is begin p(0) := 1.0; for i in p'first+1..p'last loop p(i) := rt1(i,i)/rt2(i,i); end loop; end p_pipe; -- IV. The R-table : procedure R_full ( s : in Vector; srp,dsp,p : out Vector; rt1,rt2 : in out Matrix ) is srm1,tmpsrp,tmpdsp : Vector(1..s'last-1); tmpp : Vector(0..s'last-1); begin srm1(srm1'first) := s(0); for i in srm1'first+1..srm1'last loop srm1(i) := s(0)*srm1(i-1); end loop; s_pipe(srm1,s(1),tmpsrp,tmpdsp); srm1 := tmpsrp; for j in tmpdsp'range loop rt1(1,j) := tmpdsp(j); end loop; tmpp(0) := 1.0; for i in 2..s'last loop s_pipe(srm1,s(i),tmpsrp,tmpdsp); srm1 := tmpsrp; for j in tmpdsp'range loop rt2(1,j) := tmpdsp(j); end loop; for k in 1..i-1 loop tmpp(k) := rt1(k,k)/rt2(k,k); for j in k+1..rt2'last(2) loop rt2(k+1,j) := rt1(k,j) - tmpp(k)*rt2(k,j); end loop; end loop; rt1 := rt2; end loop; srp := tmpsrp; dsp := tmpdsp; p := tmpp; end R_full; procedure RR_full ( s : in Vector; srp,dsp,p : out Vector; rt1,rt2 : in out Matrix ) is srm1,tmpsrp,tmpdsp : Vector(1..s'last-1); tmpp : Vector(0..s'last-1); k_last,j_first : integer; begin srm1(srm1'first) := s(0); for i in srm1'first+1..srm1'last loop srm1(i) := s(0)*srm1(i-1); end loop; s_pipe(srm1,s(1),tmpsrp,tmpdsp); srm1 := tmpsrp; for j in tmpdsp'range loop rt1(1,j) := tmpdsp(j); end loop; tmpp(0) := 1.0; for i in 2..s'last loop s_pipe(srm1,s(i),tmpsrp,tmpdsp); srm1 := tmpsrp; for j in tmpdsp'range loop rt2(1,j) := tmpdsp(j); end loop; if i < s'last then k_last := i; -- compute one additional row else k_last := i-1; end if; for k in 1..k_last loop tmpp(k) := rt1(k,k)/rt2(k,k); if k < rt2'last(2) then j_first := k; else j_first := k+1; end if; for j in j_first..rt2'last(2) loop -- start earlier with columns rt2(k+1,j) := rt1(k,j) - tmpp(k)*rt2(k,j); end loop; end loop; rt1 := rt2; end loop; srp := tmpsrp; dsp := tmpdsp; p := tmpp; end RR_full; procedure R_pipe ( rt1 : in Matrix; s,p : in Vector; rt2 : in out Matrix ) is begin rt2(1,1) := s(1); for j in 2..s'last loop rt2(1,j) := s(j); for i in 2..j loop rt2(i,j) := rt1(i-1,j) - p(i-1)*rt2(i-1,j); end loop; end loop; end R_pipe; procedure RR_pipe ( rt1 : in Matrix; s,p : in Vector; rt2 : in out Matrix ) is i_last : integer; begin rt2(1,1) := s(1); for j in 2..s'last loop rt2(1,j) := s(j); if j < rt2'last(1) then i_last := j+1; -- compute one additional row else i_last := j; end if; for i in 2..i_last loop rt2(i,j) := rt1(i-1,j) - p(i-1)*rt2(i-1,j); end loop; end loop; end RR_pipe; -- V. The s-table : procedure s_full ( s : in Vector; srp,dsp : out Vector ) is srm1,tmpsrp : Vector(1..s'last-1); begin srm1(srm1'first) := s(0); for i in srm1'first+1..srm1'last loop srm1(i) := s(0)*srm1(i-1); end loop; for i in 1..s'last loop s_pipe(srm1,s(i),tmpsrp,dsp); srm1 := tmpsrp; end loop; srp := tmpsrp; end s_full; procedure s_pipe ( srp : in out Vector; sr : in double_float; dsp : out Vector ) is tmp : double_float := srp(1); srpow : double_float := sr; begin srp(1) := srpow; dsp(1) := srpow - tmp; for i in 2..srp'last loop srpow := srpow*sr; tmp := srp(i); srp(i) := srpow; dsp(i) := srpow - tmp; end loop; end s_pipe; procedure s_pipe ( sr1 : in Vector; sr : in double_float; srp,dsp : out Vector ) is srpow : double_float := sr; begin srp(1) := srpow; dsp(1) := srpow - sr1(1); for i in sr1'first+1..sr1'last loop srpow := srpow*sr; srp(i) := srpow; dsp(i) := srpow - sr1(i); end loop; end s_pipe; end vLpRs_Tables; SHAR_EOF fi # end of overwriting check if test -f 'vlprs_tables.ads' then echo shar: will not over-write existing file "'vlprs_tables.ads'" else cat << "SHAR_EOF" > 'vlprs_tables.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; with Float_Vectors,Float_Matrices; use Float_Vectors,Float_Matrices; package vLpRs_Tables is -- DESCRIPTION : -- This package implements the tables for an r-order extrapolation method. -- For all tables, there is a full and a pipe-lining version. -- For efficiency reasons the full v- and L-table are combined. -- I. The v-table : extrapolated values of log(|x_i(s_k)|). procedure v_pipe ( v : in out Vector; p : in Vector; vr : in double_float ); procedure v_pipe ( v,p : in Vector; vr : in double_float; vrp : in out Vector ); -- DESCRIPTION : computes one additional row of the v-table. -- REQUIRED : v'range = vrp'range = 0..r, p'range = 0..r-1. -- ON ENTRY : -- v previous row of the v-table; -- p current vector of p-factors; -- vr equals log(|x_i(s_r)|). -- ON RETURN : -- v or vrp last row in the v-table: vrp(r) should have error O(s^r). -- II. The L-table : linear combinations of the logarithms log(s_k). procedure L_pipe ( l : in out Vector; p : in Vector; lr : in double_float ); procedure L_pipe ( l,p : in Vector; lr : in double_float; lrp : in out Vector ); -- DESCRIPTION : computes one additional row of the L-table. -- REQUIRED : l'range = lrp'range = 0..r, p'range = 0..r-1. -- ON ENTRY : -- l previous row of the v-table; -- p current vector of p'factors; -- lr equals log(s_r). -- ON RETURN : -- l or lrp last row in the L-table, vrp(r)/lpr(r) = w_i + O(s^r). -- The full computation of both v- and L-table : procedure vL_full ( s,l,v : in Vector; srp,dsp,p,lrp,vrp : out Vector; rt1,rt2 : in out Matrix ); -- DESCRIPTION : computes the last row of v- and L-table from s-values. -- REQUIRED : -- s'range = l'range = v'range = 0..r = lrp'range = vrp'range, -- srp'range = dsp'range = 1..r-1, p'range = 0..r-1, -- rt1'range(*) = 1..r-1 = rt2'range(*). -- ON ENTRY : -- s consecutive s-values: s(0) > s(1) > .. > s(r) > 0; -- l logs of the s-values: l(k) = log(s(k)); -- v points at the s-values: v(k) = log(|x_i(s(k))|). -- ON RETURN : -- srp consecutive powers of s(r): srp(l) = s(r)**l; -- dsp differences of powers: dsp(l) = srp(l) - s(r-1)**l. -- p last row used in the p-table; -- vrp last row in the v-table; -- lrp last row in the L-table, vrp(r)/lpr(r) = w_i + O(s^r); -- rt1 previous instance of the r-table; -- rt2 last instance of the r-table. -- III. The p-table : extrapolation factors needed for v-table and L-table. procedure p_full ( s : in Vector; srp,dsp,p : out Vector; rt1,rt2 : in out Matrix ); -- DESCRIPTION : computes the last row of p-table from s-values. -- REQUIRED : -- s'range = 0..r, srp'range = dsp'range = 1..r-1, p'range = 0..r-1, -- rt1'range(*) = 1..r-1 = rt2'range(*). -- NOTE : p_full = R_full followed by p_pipe. procedure p_pipe ( rt1,rt2 : in Matrix; p : out Vector ); -- DESCRIPTION : update of one row of the p-table. -- REQUIRED : rt1'range(*) = rt2'range(*) = 1..r-1, p'range = 0..r-1. -- ON ENTRY : -- rt1 previous instance of the R-table; -- rt2 last instance of the R-table. -- ON RETURN : -- p p-factors, with p(0) = 1, p(i) = rt1(i,i)/rt2(i,i). -- IV. The R-table : propagated error factors. procedure R_full ( s : in Vector; srp,dsp,p : out Vector; rt1,rt2 : in out Matrix ); procedure RR_full ( s : in Vector; srp,dsp,p : out Vector; rt1,rt2 : in out Matrix ); -- DESCRIPTION : computation of the r-table from a sequence of s-values. -- The RR_full computes the subdiagonal as well. -- REQUIRED : -- s'range = 0..r, srp'range = dsp'range = 1..r-1, p'range = 0..r-1, -- rt1'range(*) = 1..r-1 = rt2'range(*). -- ON ENTRY : -- s sequence of consecutive s-values. -- ON RETURN : -- srp,dsp see the output of s_full; -- p last row used in the p-table; -- rt1 previous instance of the r-table; -- rt2 last instance of the r-table. procedure R_pipe ( rt1 : in Matrix; s,p : in Vector; rt2 : in out Matrix ); procedure RR_pipe ( rt1 : in Matrix; s,p : in Vector; rt2 : in out Matrix ); -- DESCRIPTION : update of the r-table. RR_pipe updates also subdiagonal. -- REQUIRED : -- rt1'range(*) = rt2'range(*) = s'range = 1..r-1, p'range = 0..r-1. -- ON ENTRY : -- rt1 last instance of the R-table; -- s current row of differences of powers of s-values; -- p last row of the current p-table. -- ON RETURN : -- rt2 new instance of the R-table. -- V. The s-table : consecutive s-values with differences of their powers. procedure s_full ( s : in Vector; srp,dsp : out Vector ); -- DESCRIPTION : computes the s-table in full. -- REQUIRED : s'range = 0..r, srp'range = dsp'range = 1..r-1. -- ON ENTRY : -- s the s-values, with s(0) > s(1) > .. > s(r) > 0. -- ON RETURN : -- srp consecutive powers of s(r): srp(l) = s(r)**l; -- dsp differences of powers: dsp(l) = srp(l) - s(r-1)**l. procedure s_pipe ( srp : in out Vector; sr : in double_float; dsp : out Vector ); procedure s_pipe ( sr1 : in Vector; sr : in double_float; srp,dsp : out Vector ); -- DESCRIPTION : computes an additional row of the s-table. -- REQUIRED : sr1'range = srp'range = dsp'range = 1..r-1. -- ON ENTRY : -- sr1 or srp consecutive powers of s(r-1): srp(l) = s(r-1)**l. -- sr new last value for s(r). -- ON RETURN : same as s_full. end vLpRs_Tables; SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'Homotopy' then mkdir 'Homotopy' fi cd 'Homotopy' if test -f 'driver_for_homotopy_construction.adb' then echo shar: will not over-write existing file "'driver_for_homotopy_construction.adb'" else cat << "SHAR_EOF" > 'driver_for_homotopy_construction.adb' with integer_io; use integer_io; with Communications_with_User; use Communications_with_User; with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Numbers_io,Numbers_io; use Complex_Numbers_io,Numbers_io; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; with Homotopy; with Random_Number_Generators; with Projective_Transformations; use Projective_Transformations; with Homogenization; use Homogenization; procedure Driver_for_Homotopy_Construction ( file : in file_type; p,q : in out Poly_Sys; qsols : in out Solution_List; target : out double_complex ) is procedure Info_on_Power is i : array(1..6) of string(1..65); begin i(1):=" The homotopy parameter k determines the power of the"; i(2):="continuation parameter t. Taking k>1 has as effect that at the"; i(3):="beginning and at the end of the continuation, changes in t do not"; i(4):="change the homotopy as much as with a homotopy that is linear in"; i(5):="t so that paths are better to follow. The default value k=2 is"; i(6):="recommended. "; for j in i'range loop put_line(i(j)); end loop; end Info_on_Power; procedure Info_on_Constant is i : array(1..3) of string(1..65); begin i(1):=" The homotopy parameter a ensures the regularity of the solution"; i(2):="paths, i.e.: by choosing a random complex number for a, all paths"; i(3):="are regular and do not diverge for t<1. "; for j in i'range loop put_line(i(j)); end loop; end Info_on_Constant; procedure Info_on_Target is i : array(1..7) of string(1..65); begin i(1):=" The target value for the continuation parameter t is by default"; i(2):="1. To create stepping stones in the continuation stage, it is"; i(3):="possible to let the continuation stop at t<1, for instance at t ="; i(4):="0.9 or even at a complex value for t. The solutions at t<1 will"; i(5):="serve at start solutions to take up the continuation in a later"; i(6):="stage. In this stage, the same homotopy parameters k and a must"; i(7):="be used. "; for j in i'range loop put_line(i(j)); end loop; end Info_on_Target; procedure Info_on_Exit is i : constant string :="By typing 0, the current settings are used in the homotopy."; begin put_line(i); end Info_on_Exit; procedure Info_on_Projective_Transformation is i : array(1..5) of string(1..65); begin i(1):=" A projective transformation of the homotopy and start solutions"; i(2):="makes the equations in the polynomials homogeneous and adds an a"; i(3):="random hyperplane. The vectors of the start solutions are"; i(4):="extended with an additional unknown. For solutions at infinity,"; i(5):="this additional unknown equals zero. "; for j in i'range loop put_line(i(j)); end loop; end Info_on_Projective_Transformation; procedure Read_Complex ( x : in out double_complex ) is -- DESCRIPTION : -- User friendly reading of a complex number. re,im : double_float; begin put(" Give a real number for real part : "); Read_Double_Float(re); put(" Give a real number for imaginary part : "); Read_Double_Float(im); x := CMPLX(re,im); end Read_Complex; procedure Driver is ans : character; choice : string(1..2) := " "; k : positive := 2; a : double_complex := Random_Number_Generators.Random1; t : double_complex := CMPLX(1.0); prt : boolean := false; begin new_line; put_line ("Homotopy is H(x,t) = a*(1-t)^k * Q(x) + t^k * P(x) = 0, t in [0,1],"); put_line (" with Q(x) = 0 a start system, and P(x) = 0 the target system."); loop new_line; put_line("MENU with settings for homotopy :"); put(" relaxation constant k : "); put(k,2); new_line; put(" regularity constant a : "); put(a); new_line; put(" target value for t : "); put(t); new_line; put(" projective transformation : "); if prt then put("yes"); else put("no"); end if; new_line; put("Type k, a, t, or p to change, preceded by i for info." & " Type 0 to exit : "); Ask_Alternative(choice,"katp0",'i'); exit when choice(1) = '0'; case choice(1) is when 'k' => put("Give a value (1,2, or 3) for the relaxation constant k : "); Read_Positive(k); when 'a' => put_line("Reading a complex value for the regularity constant a."); loop Read_Complex(a); exit when modulus(a) /= 0.0; put_line("The value 0 for a is not allowed! Try again."); end loop; when 't' => put_line("Reading the (complex) target value for t."); Read_Complex(t); when 'p' => put("Do you want a projective transformation? "); Ask_Yes_or_No(ans); prt := (ans ='y'); when 'i' => new_line; case choice(2) is when 'k' => Info_on_Power; when 'a' => Info_on_Constant; when 't' => Info_on_Target; when 'p' => Info_on_Projective_Transformation; when '0' => Info_on_Exit; when others => null; end case; when others => null; end case; end loop; new_line(file); put_line(file,"HOMOTOPY PARAMETERS :"); put(file," k : "); put(file,k,2); new_line(file); put(file," a : "); put(file,a); new_line(file); put(file," t : "); put(file,t); new_line(file); if prt then put_line(file," projective transformation"); else put_line(file," no projective transformation"); end if; target := t; if prt then Projective_Transformation(p); Projective_Transformation(q); Projective_Transformation(qsols); declare pp,sysp : Poly_Sys(p'first..p'last+1); begin pp := Add_Random_Hyperplanes(p,1,true); sysp := Add_Standard_Hyperplanes(q,1); Homotopy.Create(pp,sysp,k,a); Clear(pp); Clear(sysp); end; else Homotopy.Create(p,q,k,a); end if; end Driver; begin Driver; end Driver_for_Homotopy_Construction; SHAR_EOF fi # end of overwriting check if test -f 'driver_for_homotopy_construction.ads' then echo shar: will not over-write existing file "'driver_for_homotopy_construction.ads'" else cat << "SHAR_EOF" > 'driver_for_homotopy_construction.ads' with text_io; use text_io; with Complex_Numbers,Solutions; use Complex_Numbers,Solutions; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; procedure Driver_for_Homotopy_Construction ( file : in file_type; p,q : in out Poly_Sys; qsols : in out Solution_List; target : out double_complex ); -- DESCRIPTION : -- This is an interactive driver for the construction of an artificial -- parameter homotopy. The user ask to homogenize the polynomial system -- and can determine the homotopy parameters and the target value for the -- continuation parameter. This target value is returned as output. -- Note that the starting value for the continuation parameter is stored -- with the solutions. SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_reduction.adb' then echo shar: will not over-write existing file "'drivers_for_reduction.adb'" else cat << "SHAR_EOF" > 'drivers_for_reduction.adb' with integer_io,Numbers_io; use integer_io,Numbers_io; with Communications_with_User; use Communications_with_User; with Timing_Package; use Timing_Package; with Natural_Vectors; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Reduction_of_Polynomial_Systems; use Reduction_of_Polynomial_Systems; with Reduction_of_Overconstrained_Systems; use Reduction_of_Overconstrained_Systems; package body Drivers_for_Reduction is procedure Display_Info is i : array(1..12)of string(1..65); begin i( 1):="The goal of reduction is to rewrite the system into an equivalent"; i( 2):="one (i.e.: the same finite solutions) that has a lower total"; i( 3):="degree, so that fewer solution paths need to be followed."; i( 4):="Sometimes reduction can already detect whether a system has no"; i( 5):="solutions or an infinite number of solutions. "; i( 6):=" We distinguish between linear and nonlinear reduction. The"; i( 7):="first type performs row-reduction on the coefficient matrix of"; i( 8):="the system. By nonlinear reduction, highest-degree monomials are"; i( 9):="eliminated by replacing a polynomial in the system by a"; i(10):="Subtraction-polynomial. This second type is more powerful, but"; i(11):="also more expensive. Bounds have to be set to limit the"; i(12):="combinatorial enumeration. "; for k in i'range loop put_line(i(k)); end loop; end Display_Info; procedure Display_Menu ( exit_opt : in boolean; ans : in out character ) is m : array(0..3) of string(1..65); begin m(0):=" 0 : No Reduction : leave the menu "; m(1):=" 1 : Linear Reduction : triangulate coefficient matrix "; m(2):=" 2 : Sparse Linear Reduction : diagonalize coefficient matrix "; m(3):=" 3 : Nonlinear Reduction : S-polynomial combinations "; loop new_line; put_line("MENU for Reducing Polynomial Systems :"); if exit_opt then for i in m'range loop put_line(m(i)); end loop; put("Type 0, 1, 2, or 3 to select reduction, or i for info : "); Ask_Alternative(ans,"0123i"); else for i in 1..m'last loop put_line(m(i)); end loop; put("Type 1 , 2, or 3 to select reduction, or i for info : "); Ask_Alternative(ans,"123i"); end if; if ans = 'i' then new_line; Display_Info; end if; exit when ans /= 'i'; end loop; end Display_Menu; procedure Rationalize ( p : in out Poly_Sys ) is -- DESCRIPTION : -- Shortens the exponent vectors when an unknown disappears. n : natural := p'length; to_rationalize : boolean; procedure rationalize (p : in out Poly; k : in natural) is procedure rat_term (t : in out Term; cont : out boolean) is tmp : Degrees := new Natural_Vectors.Vector'(1..n-1 => 0); begin for i in t.dg'range loop if i < k then tmp(i) := t.dg(i); elsif i > k then tmp(i-1) := t.dg(i); end if; end loop; Natural_Vectors.Clear(Natural_Vectors.Link_to_Vector(t.dg)); t.dg := tmp; cont := true; end rat_term; procedure rat_terms is new Changing_Iterator(rat_term); begin rat_terms(p); end rationalize; begin for i in reverse 1..n loop to_rationalize := true; -- suppose the i-th unknown may disappear for j in 1..n loop if Degree(p(j),i) > 0 then to_rationalize := false; end if; exit when not to_rationalize; end loop; if to_rationalize then for j in 1..n loop rationalize(p(j),i); end loop; end if; end loop; end Rationalize; procedure Write_Diagnostics ( file : in file_type; p : in Poly_Sys; diagonal,inconsistent,infinite : in boolean; d : out natural ) is -- DESCRIPTION : -- Writes diagnostics after reduction. b : natural; begin if not diagonal then if inconsistent then put_line(" Inconsistent system: no solutions."); put_line(file," Inconsistent system: no solutions."); elsif infinite then put(" Probably an infinite number"); put_line(" of solutions."); put(file," Probably an infinite number"); put_line(file," of solutions."); else put(" The total degree is "); put(file," The total degree is "); b := Total_Degree(p); put(b,1); put(file,b,1); put_line("."); put_line(file,"."); d := b; end if; else put_line(" No initial terms could be eliminated."); put_line(file," No initial terms could be eliminated."); end if; end Write_Diagnostics; procedure Write_Results ( file : in file_type; p : in Poly_Sys; timer : in timing_widget; banner : in string ) is begin new_line(file); put_line(file,"THE REDUCED SYSTEM :"); put(file,p); new_line(file); print_times(file,timer,banner); end Write_Results; procedure Driver_for_Linear_Reduction ( file : in file_type; p : in out Poly_Sys; d : out natural ) is timer : timing_widget; diagonal,inconsistent,infinite : boolean := false; begin new_line(file); put_line(file,"LINEAR REDUCTION : "); tstart(timer); Reduce(p,diagonal,inconsistent,infinite); tstop(timer); Write_Diagnostics(file,p,diagonal,inconsistent,infinite,d); Write_Results(file,p,timer,"Linear Reduction"); end Driver_for_Linear_Reduction; procedure Driver_for_Sparse_Linear_Reduction ( file : in file_type; p : in out Poly_Sys; d : out natural ) is timer : timing_widget; diagonal,inconsistent,infinite : boolean := false; begin new_line(file); put_line(file,"SPARSE LINEAR REDUCTION : "); tstart(timer); Sparse_Reduce(p,inconsistent,infinite); tstop(timer); Write_Diagnostics(file,p,diagonal,inconsistent,infinite,d); Write_Results(file,p,timer,"Sparse Reduction"); end Driver_for_Sparse_Linear_Reduction; procedure Driver_for_Nonlinear_Reduction ( file : in file_type; p : in out Poly_Sys; d : out natural ) is res : Poly_Sys(p'range); sparse : boolean; cnt_eq,cnt_sp,cnt_rp,max_eq,max_sp,max_rp : natural; timer : timing_widget; b : natural; begin Rationalize(p); Clear(res); Copy(p,res); new_line(file); put_line(file,"NONLINEAR REDUCTION :"); put(" Give the limit on #equal degree replacements : "); Read_Natural(max_eq); cnt_eq := 0; put(" Give the limit on #computed S-polynomials : "); Read_Natural(max_sp); cnt_sp := 0; put(" Give the limit on #computed R-polynomials : "); Read_Natural(max_rp); cnt_rp := 0; put(file," The limit on #equal degree replacements : "); put(file,max_eq,1); new_line(file); put(file," The limit on #computed S-polynomials : "); put(file,max_sp,1); new_line(file); put(file," The limit on #computed R-polynomials : "); put(file,max_rp,1); new_line(file); sparse := false; tstart(timer); if sparse then Sparse_Reduce(p,res,cnt_eq,max_eq); else Reduce(p,res,cnt_eq,max_eq,cnt_sp,max_sp,cnt_rp,max_rp); end if; tstop(timer); Clear(p); Copy(res,p); Clear(res); b := Total_Degree(p); put("The total degree is "); put(b,1); put(file,"The total degree is "); put(file,b,1); put_line("."); put_line(file,"."); d := b; new_line(file); put_line(file,"Amount of arithmetic work"); put(file," #equal replacements : "); put(file,cnt_eq,4); new_line(file); put(file," #computed S-polynomials : "); put(file,cnt_sp,4); new_line(file); put(file," #computed R-polynomials : "); put(file,cnt_rp,4); new_line(file); new_line(file); put_line(file,"The reduced system :"); put(file,p); new_line(file); print_times(file,timer,"Nonlinear Reduction"); new_line(file); end Driver_for_Nonlinear_Reduction; procedure Driver_for_Overconstrained_Reduction ( file : in file_type; p : in out Poly_Sys ) is ans : character; n : constant natural := p'length; m : constant natural := Number_of_Unknowns(p(p'first)); res : Poly_Sys(1..m); begin new_line; put_line("MENU for Overconstrained Reduction :"); put_line(" 0. No reduction : leave the menu."); put_line(" 1. Add a random combination of the remainder to the first."); put_line(" 2. Reduce the first equations with the remainder."); put("Type 0, 1, or 2 to select reduction : "); Ask_Alternative(ans,"012"); case ans is when '1' => res := Random_Square(p); when '2' => res := Reduced_Square(p); when others => null; end case; if ans /= '0' then for i in 1..m loop Copy(res(i),p(i)); Clear(res(i)); end loop; for i in m+1..n loop Clear(p(i)); end loop; end if; end Driver_for_Overconstrained_Reduction; procedure Driver_for_Reduction ( file : in file_type; p : in out Poly_Sys; d : out natural; exit_option : in boolean ) is n : constant natural := p'length; ans : character := '0'; begin Display_Menu(exit_option,ans); case ans is when '1' => Driver_for_Linear_Reduction(file,p,d); when '2' => Driver_for_Sparse_Linear_Reduction(file,p,d); when '3' => Driver_for_Sparse_Linear_Reduction(file,p,d); Driver_for_Nonlinear_Reduction(file,p,d); when others => null; end case; if Number_of_Unknowns(p(p'first)) < n then Driver_for_Overconstrained_Reduction(file,p); end if; end Driver_for_Reduction; end Drivers_for_Reduction; SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_reduction.ads' then echo shar: will not over-write existing file "'drivers_for_reduction.ads'" else cat << "SHAR_EOF" > 'drivers_for_reduction.ads' with text_io; use text_io; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; package Drivers_for_Reduction is -- DESCRIPTION: -- This package collects driver routines for reducing a polynomial -- system w.r.t. its total degree. procedure Display_Info; -- DESCRIPTION : -- Displays information about reduction on screen. procedure Driver_for_Linear_Reduction ( file : in file_type; p : in out Poly_Sys; d : out natural ); -- DESCRIPTION : -- The coefficient matrix of the system is triangulated. procedure Driver_for_Sparse_Linear_Reduction ( file : in file_type; p : in out Poly_Sys; d : out natural ); -- DESCRIPTION : -- The coefficient matrix of the system is diagonalized. procedure Driver_for_Nonlinear_Reduction ( file : in file_type; p : in out Poly_Sys; d : out natural ); -- DESCRIPTION : -- Combinations of S-polynomials are used to lower the total degree. procedure Driver_for_Overconstrained_Reduction ( file : in file_type; p : in out Poly_Sys ); -- DESCRIPTION : -- Random combinations are added. procedure Driver_for_Reduction ( file : in file_type; p : in out Poly_Sys; d : out natural; exit_option : in boolean ); -- DESCRIPTION : -- This is an interactive driver for the reduction procedures. -- ON ENTRY : -- file a file to write intermediate results and diagnostics on; -- p a polynomial system; -- exit_option if true, then the leave-option will be shown. -- ON RETURN : -- p the system in a reduced form; -- d total degree of the new system. end Drivers_for_Reduction; SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_scaling.adb' then echo shar: will not over-write existing file "'drivers_for_scaling.adb'" else cat << "SHAR_EOF" > 'drivers_for_scaling.adb' with integer_io; use integer_io; with Complex_Numbers_io; use Complex_Numbers_io; with Floating_Point_Numbers; use Floating_Point_Numbers; with Timing_Package,Scaling; use Timing_Package,Scaling; with Communications_with_User; use Communications_with_User; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; package body Drivers_for_Scaling is procedure Display_Info is i : array(1..12) of string(1..65); begin i( 1):="By scaling the coefficients are transformed so that they do not"; i( 2):="have extreme values. The purpose is to avoid numerical problems."; i( 3):=" Equation scaling means that every polynomial is divided by its"; i( 4):="average coefficient. "; i( 5):=" Variable scaling uses transformations like z = (2^c)*x. The"; i( 6):="transformation is such that real solutions remain real. The"; i( 7):="inverse of the condition number of the linear system that is"; i( 8):="solved to set up this transformation gives an indication on the"; i( 9):="condition of the original polynomial system. "; i(10):=" Solution scaling transforms the solutions of a scaled system"; i(11):="back into the original coordinate system. Note that in the"; i(12):="original coordinates, the solutions can be ill-conditioned. "; for k in i'range loop put_line(i(k)); end loop; end Display_Info; procedure Equation_Scaling ( file : in file_type; p : in out Poly_Sys ) is timer : timing_widget; begin put_line(file,"EQUATION SCALING :"); tstart(timer); Scale(p); tstop(timer); new_line(file); print_times(file,timer,"Equation Scaling"); new_line(file); end Equation_Scaling; procedure Variable_Scaling ( file : in file_type; p : in out Poly_Sys; basis : out natural; scvc : out Link_to_Vector ) is use Floating_Point_Numbers.double_float_io; timer : timing_widget; rcond : double_float; bas : natural := 2; scalecoeff : Vector(1..2*p'length); begin put_line(file,"EQUATION AND VARIABLE SCALING :"); -- put(" Reducing the variability of coefficients ? (y/n) "); -- Ask_Yes_or_No(yn); -- if yn = 'y' -- then put_line(file," Reduce the variability of coefficients."); -- scale(p,bas,true,rcond,scalecoeff); -- else put_line(file," No reduce of variability of coefficients."); -- scale(p,bas,false,rcond,scalecoeff); -- end if; tstart(timer); scale(p,bas,false,rcond,scalecoeff); tstop(timer); put(" The inverse condition is "); put(rcond,3,3,3); new_line; put(file," The inverse condition is "); put(file,rcond); new_line(file); basis := bas; scvc := new Vector'(scalecoeff); new_line(file); print_times(file,timer,"Variable Scaling"); new_line(file); end Variable_Scaling; procedure Write_Results ( file : in file_type; p : in Poly_Sys; basis : in natural; scvc : in Link_to_Vector ) is begin new_line(file); put_line(file,"THE SCALED SYSTEM :"); new_line(file); put(file,p); new_line(file); if basis /= 0 then new_line(file); put_line(file,"SCALING COEFFICIENTS :"); new_line(file); put(file,basis,1); new_line(file); for i in scvc'range loop put(file,scvc(i)); new_line(file); end loop; end if; end Write_Results; procedure Driver_for_Scaling ( file : in file_type; p : in out Poly_Sys; basis : out natural; scvc : out Link_to_Vector ) is use Floating_Point_Numbers.double_float_io; ans : character; res_scvc : Link_to_Vector; bas : natural := 0; begin loop new_line; put_line("MENU for Scaling Polynomial Systems :"); put_line(" 0 : No Scaling : leave the menu "); put_line(" 1 : Equation Scaling : divide by average coefficient "); put_line(" 2 : Variable Scaling : change of variables, as z = (2^c)*x"); put("Type 0, 1, or 2 to select scaling, or i for info : "); Ask_Alternative(ans,"012i"); if ans = 'i' then new_line; Display_Info; end if; exit when ans /= 'i'; end loop; case ans is when '1' => Equation_Scaling(file,p); when '2' => Variable_Scaling(file,p,bas,res_scvc); when others => null; end case; case ans is when '1' | '2' => Write_Results(file,p,bas,res_scvc); when others => null; end case; basis := bas; scvc := res_scvc; end Driver_for_Scaling; end Drivers_for_Scaling; SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_scaling.ads' then echo shar: will not over-write existing file "'drivers_for_scaling.ads'" else cat << "SHAR_EOF" > 'drivers_for_scaling.ads' with text_io,Complex_Vectors; use text_io,Complex_Vectors; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; package Drivers_for_Scaling is -- DESCRIPTION : -- This package provides driver routines to perform scaling. procedure Display_Info; -- DESCRIPTION : -- Display information about the scaling procedures on screen. procedure Equation_Scaling ( file : in file_type; p : in out Poly_Sys ); -- DESCRIPTION : -- Performs equation scaling on the the system p. -- Writes timing information on file. procedure Variable_Scaling ( file : in file_type; p : in out Poly_Sys; basis : out natural; scvc : out Link_to_Vector ); -- DESCRIPTION : -- Performs variable scaling on the system p. -- Writes timing information on file. procedure Write_Results ( file : in file_type; p : in Poly_Sys; basis : in natural; scvc : in Link_to_Vector ); -- DESCRIPTION : -- Writes the results of the scaling procedure on file. -- These results are the scaled system p, and in case basis /= 0, -- the scaling coefficients in the vectors scvc. procedure Driver_for_Scaling ( file : in file_type; p : in out Poly_Sys; basis : out natural; scvc : out Link_to_Vector ); -- DESCRIPTION : -- This is an interactive driver for phc running in full mode. -- ON ENTRY : -- file file to write intermediate results and diagnostics on; -- p a polynomial system. -- ON RETURN : -- p the scaled polynomial system; -- basis number basis used for scaling, used as flag: -- if basis /= 0, then variable scaling has been applied; -- scvc scaling coefficients, only /= null when basis /= 0. end Drivers_for_Scaling; SHAR_EOF fi # end of overwriting check if test -f 'floating_equalities.adb' then echo shar: will not over-write existing file "'floating_equalities.adb'" else cat << "SHAR_EOF" > 'floating_equalities.adb' package body Floating_Equalities is function Is_Equal ( x,y,tol : double_float ) return boolean is begin if abs(x-y) <= tol then return true; else return false; end if; end Is_Equal; function Is_Equal ( x,y : double_complex; tol : double_float ) return boolean is begin if Is_Equal(REAL_PART(x),REAL_PART(y),tol) and Is_Equal(IMAG_PART(x),IMAG_PART(y),tol) then return true; else return false; end if; end Is_Equal; function Is_Equal ( x,y : Float_Vectors.Vector; tol : double_float ) return boolean is begin for i in x'range loop if not Is_Equal(x(i),y(i),tol) then return false; end if; end loop; return true; end Is_Equal; function Is_Equal ( x,y : Complex_Vectors.Vector; tol : double_float ) return boolean is begin for i in x'range loop if not Is_Equal(x(i),y(i),tol) then return false; end if; end loop; return true; end Is_Equal; end Floating_Equalities; SHAR_EOF fi # end of overwriting check if test -f 'floating_equalities.ads' then echo shar: will not over-write existing file "'floating_equalities.ads'" else cat << "SHAR_EOF" > 'floating_equalities.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Numbers; use Complex_Numbers; with Float_Vectors,Complex_Vectors; package Floating_Equalities is -- DESCRIPTION : -- This package collects functions to test equality of floating-point -- (complex) numbers and vectors upon a given tolerance. function Is_Equal ( x,y,tol : double_float ) return boolean; -- DESCRIPTION : -- Returns true if abs(x-y) <= tol, otherwise false is returned. function Is_Equal ( x,y : double_complex; tol : double_float ) return boolean; -- DESCRIPTION : -- Returns true if abs(REAL_PART(x)-REAL_PART(y)) <= tol and -- abs(IMAG_PART(x)-IMAG_PART(y)) <= tol, otherwise false is returned. function Is_Equal ( x,y : Float_Vectors.Vector; tol : double_float ) return boolean; -- DESCRIPTION : -- Returns true if Is_Equal(x(i),y(i),tol), for i in x'range=y'range, -- otherwise false is returned. -- REQUIRED : x'range = y'range. function Is_Equal ( x,y : Complex_Vectors.Vector; tol : double_float ) return boolean; -- DESCRIPTION : -- Returns true if Is_Equal(x(i),y(i),tol), for i in x'range=y'range, -- otherwise false is returned. -- REQUIRED : x'range = y'range. end Floating_Equalities; SHAR_EOF fi # end of overwriting check if test -f 'homogenization.adb' then echo shar: will not over-write existing file "'homogenization.adb'" else cat << "SHAR_EOF" > 'homogenization.adb' with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Numbers,Natural_Vectors; use Complex_Numbers,Natural_Vectors; with Random_Number_Generators; use Random_Number_Generators; package body Homogenization is function Homogeneous_Part ( p : Poly ) return Poly is res : Poly := Null_Poly; d : integer := Degree(p); procedure Homogeneous_Term ( t : in Term; continue : out boolean ) is begin if Sum(t.dg) = d then Plus_Term(res,t); continue := true; else continue := false; end if; end Homogeneous_Term; procedure Homogeneous_Terms is new Visiting_Iterator(Homogeneous_Term); begin Homogeneous_Terms(p); return res; end Homogeneous_Part; function Homogeneous_Part ( p : Poly_Sys ) return Poly_Sys is res : Poly_Sys(p'range); begin for i in p'range loop res(i) := Homogeneous_Part(p(i)); end loop; return res; end Homogeneous_Part; function Real_Random_Hyperplane ( n : natural ) return Poly is res : Poly; t : Term; begin t.dg := new Natural_Vectors.Vector'(1..n => 0); t.cf := CMPLX(Random); res := Create(t); Natural_Vectors.Clear(Natural_Vectors.Link_to_Vector(t.dg)); for i in 1..n loop t.dg := new Natural_Vectors.Vector'(1..n => 0); t.dg(i) := 1; t.cf := CMPLX(Random); Plus_Term(res,t); Natural_Vectors.Clear(Natural_Vectors.Link_to_Vector(t.dg)); end loop; return res; end Real_Random_Hyperplane; function Complex_Random_Hyperplane ( n : natural ) return Poly is res : Poly; t : Term; begin t.dg := new Natural_Vectors.Vector'(1..n => 0); t.cf := Random; res := Create(t); Natural_Vectors.Clear(Natural_Vectors.Link_to_Vector(t.dg)); for i in 1..n loop t.dg := new Natural_Vectors.Vector'(1..n => 0); t.dg(i) := 1; t.cf := Random; Plus_Term(res,t); Natural_Vectors.Clear(Natural_Vectors.Link_to_Vector(t.dg)); end loop; return res; end Complex_Random_Hyperplane; function Standard_Hyperplane ( n,i : natural ) return Poly is -- DESCRIPTION : Returns x_i - 1. res : Poly; t : Term; begin t.dg := new Natural_Vectors.Vector'(1..n => 0); t.cf := CMPLX(-1.0); res := Create(t); Natural_Vectors.Clear(Natural_Vectors.Link_to_Vector(t.dg)); t.dg := new Natural_Vectors.Vector'(1..n => 0); t.dg(i) := 1; t.cf := CMPLX(1.0); Plus_Term(res,t); Natural_Vectors.Clear(Natural_Vectors.Link_to_Vector(t.dg)); return res; end Standard_Hyperplane; procedure Construct_Real_Random_Hyperplanes ( s : in out Poly_Sys; m : natural ) is -- DESCRIPTION : -- the polynomial system s will be filled with polynomials in m unknowns, -- with real coefficients. begin for i in s'range loop Clear(s(i)); s(i) := Real_Random_Hyperplane(m); end loop; end Construct_Real_Random_Hyperplanes; procedure Construct_Complex_Random_Hyperplanes ( s : in out Poly_Sys; m : natural ) is -- DESCRIPTION : -- The polynomial system s will be filled with polynomials in m unknowns, -- with complex coefficients. begin for i in s'range loop Clear(s(i)); s(i) := Complex_Random_Hyperplane(m); end loop; end Construct_Complex_Random_Hyperplanes; procedure Construct_Standard_Hyperplanes ( s : in out Poly_Sys ) is -- DESCRIPTION : -- for i in s'range : s(i) := x_i - 1. n : natural := s'length; begin for i in s'range loop Clear(s(i)); s(i) := Standard_Hyperplane(n,i); end loop; end Construct_Standard_Hyperplanes; procedure Enlarge_Before ( p : in out Poly; m : in natural ) is -- DESCRIPTION : -- To each term t of p, m additional zero entries will be inserted to t.dg procedure Enlarge_Term ( t : in out Term; continue : out boolean ) is d : Degrees := new Natural_Vectors.Vector(1..(t.dg'last+m)); begin for i in 1..m loop d(i) := 0; end loop; for i in t.dg'range loop d(i+m) := t.dg(i); end loop; Natural_Vectors.Clear(Natural_Vectors.Link_to_Vector(t.dg)); t.dg := d; continue := true; end Enlarge_Term; procedure Enlarge_Terms is new Changing_Iterator(Enlarge_Term); begin Enlarge_Terms(p); end Enlarge_Before; procedure Enlarge_After ( p : in out Poly; m : in natural ) is -- DESCRIPTION : -- To each term t of p, m additional zero entries will be added to t.dg procedure Enlarge_Term ( t : in out Term; continue : out boolean ) is d : Degrees := new Natural_Vectors.Vector(1..(t.dg'last+m)); begin for i in t.dg'range loop d(i) := t.dg(i); end loop; for i in (t.dg'last+1)..m loop d(i) := 0; end loop; Natural_Vectors.Clear(Natural_Vectors.Link_to_Vector(t.dg)); t.dg := d; continue := true; end Enlarge_Term; procedure Enlarge_Terms is new Changing_Iterator(Enlarge_Term); begin Enlarge_Terms(p); end Enlarge_After; function Add_Equations ( s1 : Poly_Sys; s2 : Poly_Sys ) return Poly_Sys is n1 : natural := s1'last - s1'first + 1; n2 : natural := s2'last - s2'first + 1; res : Poly_Sys(1..(n1+n2)); m : natural; begin for i in 1..n1 loop Copy(s1(i),res(i)); m := Number_Of_Unknowns(res(i)); if m < (n1+n2) then m := n1 + n2 - m; Enlarge_After(res(i),m); end if; end loop; for i in 1..n2 loop Copy(s2(i),res(n1+i)); m := Number_Of_Unknowns(res(n1+i)); if m < (n1+n2) then m := n1 + n2 - m; Enlarge_Before(res(n1+i),m); end if; end loop; return res; end Add_Equations; function Add_Equation ( s : Poly_Sys; p : Poly ) return Poly_Sys is n : natural := s'last - s'first + 1; m : natural; res : Poly_Sys(1..(n+1)); begin for i in 1..n loop Copy(s(i),res(i)); m := Number_Of_Unknowns(res(i)); if m < n+1 then m := n + 1 - m; Enlarge_After(res(i),m); end if; end loop; m := Number_Of_Unknowns(p); if m < (n+1) then m := n + 1 - m; Enlarge_Before(res(n+1),m); end if; return res; end Add_Equation; function Add_Random_Hyperplanes ( s : Poly_Sys; m : natural; re : boolean ) return Poly_Sys is s2 : Poly_Sys(1..m); n : natural := s'last - s'first + 1; res : Poly_Sys(1..(m+n)); begin if re then Construct_Real_Random_Hyperplanes(s2,m+n); else Construct_Complex_Random_Hyperplanes(s2,m+n); end if; res := Add_Equations(s,s2); Clear(s2); return res; end Add_Random_Hyperplanes; function Add_Standard_Hyperplanes ( s : Poly_Sys; m : natural ) return Poly_Sys is n : natural := s'length; res : Poly_Sys(1..(n+m)); s2 : Poly_Sys(1..m); begin Construct_Standard_Hyperplanes(s2); res := Add_Equations(s,s2); Clear(s2); return res; end Add_Standard_Hyperplanes; end Homogenization; SHAR_EOF fi # end of overwriting check if test -f 'homogenization.ads' then echo shar: will not over-write existing file "'homogenization.ads'" else cat << "SHAR_EOF" > 'homogenization.ads' with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; package Homogenization is -- DESCRIPTION : -- This package provides routines for constructing additional -- equations to a system for projective transformations. -- There is also a routine that isolates the homogeneous part -- of a given polynomial system. function Homogeneous_Part ( p : Poly ) return Poly; function Homogeneous_Part ( p : Poly_Sys ) return Poly_Sys; -- DESCRIPTION : -- These functions isolate all terms having a degree equal to -- the degree of the polynomial. function Add_Equations ( s1 : Poly_Sys; s2 : Poly_Sys ) return Poly_Sys; -- DESCRIPTION : -- The resulting polynomial system is the concatenation of s1 and s2. function Add_Equation ( s : Poly_Sys; p : Poly ) return Poly_Sys; -- DESCRIPTION : -- the resulting polynomial system is the concatenation -- of the system s and the polynomial p function Add_Random_Hyperplanes ( s : Poly_Sys; m : natural; re : boolean ) return Poly_Sys; -- DESCRIPTION : -- To the polynomial system s, m hyperplanes are added with -- randomly choosen coefficients; -- if re = true -- then the coefficients will be floating point numbers; -- else the coefficients will be complex numbers. function Add_Standard_Hyperplanes ( s : Poly_Sys; m : natural ) return Poly_Sys; -- DESCRIPTION : -- If n = Number_Of_Unknowns(s(i)), for i in s'range, -- then m hyperplanes of the form -- x_(j+n) - 1 = 0 will be added, for j in 1..m, -- to the system s. end Homogenization; SHAR_EOF fi # end of overwriting check if test -f 'homotopy.adb' then echo shar: will not over-write existing file "'homotopy.adb'" else cat << "SHAR_EOF" > 'homotopy.adb' with unchecked_deallocation; with Floating_Point_Numbers; use Floating_Point_Numbers; with Natural_Vectors,Jacobi_Matrices; use Jacobi_Matrices; with Complex_Vectors,Complex_Matrices; use Complex_Vectors,Complex_Matrices; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; package body Homotopy is -- There is an amount of internal data in order to -- perform the numeric routines as fast as possible. type homtype is (nat,art); -- natural or artificial parameter homotopy type homdata ( ht : homtype; n,n1 : natural ) is record p : Poly_Sys(1..n); pe : Eval_Poly_Sys(1..n); dh : Jacobi(1..n,1..n1); dhe : Eval_Jacobi(1..n,1..n1); case ht is when nat => i : integer; when art => q,h : Poly_Sys(1..n); qe,he : Eval_Poly_Sys(1..n); dpe,dqe : Eval_Jacobi(1..n,1..n); k : positive; a : double_complex; end case; end record; type homtp is access homdata; hom : homtp; -- CONSTRUCTORS : function Create ( p,q : in Poly_Sys; k : in positive; a : in double_complex ) return Poly_Sys is h : Poly_Sys(p'range); tempp,tempq,q_fac,p_fac : Poly; n : natural := p'length; function Compute_q_fac ( n,k : in natural; a : in double_complex ) return Poly is -- DESCRIPTION : returns a*(1-t)^k, where t = x_n+1. res,temp : Poly; t : Term; begin t.cf := a; t.dg := new Natural_Vectors.Vector'(1..n+1 => 0); res := Create(t); t.cf := CMPLX(1.0); temp := Create(t); t.dg(n+1) := 1; Min_Term(temp,t); Natural_Vectors.Clear(Natural_Vectors.Link_to_Vector(t.dg)); for i in 1..k loop Mult_Poly(res,temp); end loop; Clear(temp); return res; end Compute_q_fac; function Compute_p_fac ( n,k : in natural; a : in double_complex ) return Poly is -- DESCRIPTION : returns t^k, where t = x_n+1. res : Poly; t : Term; begin t.cf := CMPLX(1.0); t.dg := new Natural_Vectors.Vector'(1..n+1 => 0); t.dg(n+1) := k; res := Create(t); Natural_Vectors.Clear(Natural_Vectors.Link_to_Vector(t.dg)); return res; end Compute_p_fac; function Plus_Unknown ( p : in Poly ) return Poly is -- DESCRIPTION : -- The returning polynomial has an additional unknown. res : Poly; procedure Plus_Unknown_In_Term (t : in out Term; c : out boolean) is temp : Natural_Vectors.Vector(1..(n+1)); begin temp(1..n) := t.dg.all; temp(n+1) := 0; Natural_Vectors.Clear(Natural_Vectors.Link_to_Vector(t.dg)); t.dg := new Natural_Vectors.Vector'(temp); c := true; end Plus_Unknown_In_Term; procedure Plus_Unknown_In_Terms is new Changing_Iterator (process => Plus_Unknown_In_Term); begin Copy(p,res); Plus_Unknown_In_Terms(res); return res; end Plus_Unknown; begin q_fac := Compute_q_fac(n,k,a); p_fac := Compute_p_fac(n,k,a); for i in h'range loop tempq := Plus_Unknown(q(i)); tempp := Plus_Unknown(p(i)); Mult_Poly(tempq,q_fac); Mult_Poly(tempp,p_fac); h(i) := tempq + tempp; Clear(tempq); Clear(tempp); end loop; Clear(q_fac); Clear(p_fac); return h; end Create; procedure Create ( p,q : in Poly_Sys; k : in positive; a : in double_complex ) is n : constant natural := p'last-p'first+1; dp, dq : Jacobi(1..n,1..n); ho : homdata(art,n,n+1); begin Copy(p,ho.p); Copy(q,ho.q); ho.h := Create(p,q,k,a); ho.pe := Create(ho.p); ho.qe := Create(ho.q); ho.he := Create(ho.h); dp := Create(ho.p); dq := Create(ho.q); ho.dh := Create(ho.h); ho.dpe := Create(dp); ho.dqe := Create(dq); ho.dhe := Create(ho.dh); Clear(dp); Clear(dq); ho.k := k; ho.a := a; hom := new homdata'(ho); end Create; procedure Create ( p : in Poly_Sys; k : in integer ) is n : constant natural := p'last-p'first+1; ho : homdata(nat,n,n+1); begin Copy(p,ho.p); ho.pe := Create(ho.p); ho.dh := Create(ho.p); ho.dhe := Create(ho.dh); ho.i := k; hom := new homdata'(ho); end Create; -- SELECTOR : function Homotopy_System return Poly_Sys is ho : homdata renames hom.all; begin case ho.ht is when nat => return ho.p; when art => return ho.h; end case; end Homotopy_System; -- SYMBOLIC ROUTINES : function Eval ( t : double_complex ) return Poly_Sys is ho : homdata renames hom.all; begin case ho.ht is when nat => -- t = x(ho.i) return Eval(ho.p,t,ho.i); when art => -- compute : a * ((1 - t)^k) * q + (t^k) * p declare p_factor,q_factor : double_complex; res,tmp : Poly_Sys(1..ho.n); begin if modulus(t) = 0.0 then return ho.a * ho.q; elsif abs(REAL_PART(t) - 1.0 ) + 1.0 = 1.0 and then abs(IMAG_PART(t)) + 1.0 = 1.0 then copy(ho.p,res); return res; else q_factor := ho.a; p_factor := CMPLX(1.0); for i in 1..ho.k loop q_factor := (CMPLX(1.0)-t) * q_factor; p_factor := t * p_factor; end loop; res := p_factor * ho.p; tmp := q_factor * ho.q; Plus_Vector(res,tmp); Clear(tmp); return res; end if; end; end case; end Eval; function Diff ( t : double_complex ) return Poly_Sys is ho : homdata renames hom.all; begin case ho.ht is when nat => -- t = x(ho.i) return Diff(ho.p,ho.i); when art => -- compute - a * k * (1 - t)^(k-1) * q + k * t^(k-1) *p declare q_factor,p_factor : double_complex; tmp : Poly_Sys(1..ho.n); res : Poly_Sys(1..ho.n); begin q_factor := (-ho.a) * CMPLX(double_float(ho.k)); p_factor := CMPLX(double_float(ho.k)); if modulus(t) = 0.0 then if ho.k = 1 then res := p_factor * ho.p; tmp := q_factor * ho.q; Plus_Vector(res,tmp); Clear(tmp); return res; else return q_factor * ho.q; end if; elsif abs( REAL_PART(t) - 1.0 ) + 1.0 = 1.0 and then abs(IMAG_PART(t)) + 1.0 = 1.0 then return CMPLX(double_float(ho.k)) * ho.p; else for i in 1..(ho.k-1) loop q_factor := (CMPLX(1.0)-t) * q_factor; p_factor := t * p_factor; end loop; res := p_factor * ho.p; tmp := q_factor * ho.q; Plus_Vector(res,tmp); Clear(tmp); return res; end if; end; end case; end Diff; -- NUMERIC ROUTINES : function Eval ( x : Vector; t : double_complex ) return Vector is ho : homdata renames hom.all; begin case ho.ht is when nat => declare y : Vector(x'first..x'last+1); begin y(1..ho.i-1) := x(1..ho.i-1); y(ho.i) := t; y(ho.i+1..y'last) := x(ho.i..x'last); return Eval(ho.pe,y); end; when art => if modulus(t) + 1.0 = 1.0 then return ho.a * Eval(ho.qe,x); elsif abs( REAL_PART(t) - 1.0 ) + 1.0 = 1.0 and then abs(IMAG_PART(t)) + 1.0 = 1.0 then return Eval(ho.pe,x); else declare y : Vector(x'first..x'last+1); begin y(x'range) := x; y(y'last) := t; return Eval(ho.he,y); end; end if; end case; end Eval; function Diff ( x : Vector; t : double_complex ) return Vector is n : natural := x'length; begin case hom.ht is when nat => return Diff(x,t,hom.i); when art => return Diff(x,t,n+1); end case; end Diff; function Diff ( x : Vector; t : double_complex ) return matrix is ho : homdata renames hom.all; n : natural renames ho.n; begin case ho.ht is when nat => declare m : matrix(1..n,1..n); y : Vector(1..n+1); begin y(1..ho.i-1) := x(1..ho.i-1); y(ho.i) := t; y(ho.i+1..n+1) := x(ho.i..n); for i in 1..n loop for j in 1..n loop m(i,j) := Eval(ho.dhe(i,j),y); end loop; end loop; return m; end; when art => if modulus(t) + 1.0 = 1.0 then declare m : Matrix(1..n,1..n) := Eval(ho.dqe,x); begin for i in 1..n loop for j in 1..n loop m(i,j) := m(i,j) * ho.a; end loop; end loop; return m; end; elsif abs( REAL_PART(t) - 1.0 ) + 1.0 = 1.0 and then abs(IMAG_PART(t)) + 1.0 = 1.0 then return Eval(ho.dpe,x); else declare m : matrix(1..n,1..n); y : Vector(1..n+1); begin y(1..n) := x; y(n+1) := t; for i in 1..n loop for j in 1..n loop m(i,j) := Eval(ho.dhe(i,j),y); end loop; end loop; return m; end; end if; end case; end Diff; function Diff ( x : Vector; t : double_complex; k : natural ) return Vector is ho : homdata renames hom.all; n : natural renames ho.n; y : Vector(1..n+1); res : Vector(1..n); begin case ho.ht is when nat => y(1..ho.k-1) := x(1..ho.i-1); y(ho.i) := t; y(ho.i+1..n+1) := x(ho.i..n); when art => y(1..n) := x; y(n+1) := t; end case; for i in 1..n loop res(i) := Eval(ho.dhe(i,k),y); end loop; return res; end Diff; function Diff ( x : Vector; t : double_complex; k : natural ) return matrix is ho : homdata renames hom.all; n : natural renames ho.n; y : Vector(1..n+1); res : matrix(1..n,1..n); begin case ho.ht is when nat => y(1..ho.i-1) := x(1..ho.i-1); y(ho.i) := t; y(ho.i+1..n+1) := x(ho.i..n); when art => y(1..n) := x; y(n+1) := t; end case; for j in 1..(k-1) loop for i in 1..n loop res(i,j) := Eval(ho.dhe(i,j),y); end loop; end loop; for j in (k+1)..(n+1) loop for i in 1..n loop res(i,j-1) := Eval(ho.dhe(i,j),y); end loop; end loop; return res; end Diff; -- DESTRUCTOR : procedure free is new unchecked_deallocation (homdata,homtp); procedure Clear is begin if hom /= null then declare ho : homdata renames hom.all; begin Clear(ho.p); Clear(ho.pe); Clear(ho.dh); Clear(ho.dhe); case ho.ht is when nat => null; when art => Clear(ho.q); Clear(ho.qe); Clear(ho.h); Clear(ho.he); Clear(ho.dpe); Clear(ho.dqe); end case; end; free(hom); end if; end Clear; end Homotopy; SHAR_EOF fi # end of overwriting check if test -f 'homotopy.ads' then echo shar: will not over-write existing file "'homotopy.ads'" else cat << "SHAR_EOF" > 'homotopy.ads' with Complex_Numbers,Complex_Vectors; use Complex_Numbers,Complex_Vectors; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Matrices; use Complex_Matrices; package Homotopy is -- DESCRIPTION : -- This package exports operations on a polynomial homotopy. -- CONSTRUCTORS : procedure Create ( p,q : in Poly_Sys; k : in positive; a : in double_complex ); -- DESCRIPTION : -- the following artificial homotopy is build : -- H(x,t) = a * ((1 - t)^k) * q + (t^k) * p. procedure Create ( p : in Poly_Sys; k : in integer ); -- DESCRIPTION : -- Given a polynomial system p with dimension n*(n+1) and -- k an index, then t = x_k as continuation parameter. -- SELECTOR : function Homotopy_System return Poly_Sys; -- DESCRIPTION : -- Returns the homotopy system in the unknowns (x,t). -- SYMBOLIC ROUTINES : function Eval ( t : double_complex ) return Poly_Sys; -- DESCRIPTION : -- The homotopy is evaluated in t and a polynomial system is returned function Diff ( t : double_complex ) return Poly_Sys; -- DESCRIPTION : -- The homotopy is symbolically differentiated w.r.t. t. -- NUMERIC ROUTINES : function Eval ( x : Vector; t : double_complex ) return Vector; -- DESCRIPTION : -- The homotopy is evaluated in x and t and a vector is returned. function Diff ( x : Vector; t : double_complex ) return Vector; -- DESCRIPTION : -- The homotopy is differentiated wr.t. t and is evaluated in (x,t). function Diff ( x : Vector; t : double_complex ) return matrix; -- DESCRIPTION : -- The homotopy is differentiated to x and the Jacobi matrix -- of H(x,t) is returned. function Diff ( x : Vector; t : double_complex; k : natural ) return Vector; -- DESCRIPTION : -- The returning vector contains all derivatives from the homotopy -- to the unknown x_k; note that t = x_n+1. function Diff ( x : Vector; t : double_complex; k : natural ) return matrix; -- DESCRIPTION : -- The Jacobi matrix of the homotopy is returned where the kth -- column has been deleted; note that Diff(x,t,n+1) = Diff(x,t). -- DESTRUCTOR : procedure Clear; -- DESCRIPTION : -- The homotopy is cleared. -- pragma inline (Eval,Diff); end Homotopy; SHAR_EOF fi # end of overwriting check if test -f 'mainred.adb' then echo shar: will not over-write existing file "'mainred.adb'" else cat << "SHAR_EOF" > 'mainred.adb' with text_io,integer_io; use text_io,integer_io; with Communications_with_User; use Communications_with_User; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Drivers_for_Reduction; use Drivers_for_Reduction; procedure mainred ( infilename,outfilename : in string ) is lp : Link_to_Poly_Sys; outfile : file_type; d : natural; ans : character; procedure Read_System ( filename : in string ) is file : file_type; begin if filename /= "" then Open(file,in_file,filename); get(file,lp); Close(file); end if; exception when others => new_line; put("Could not open file with name "); put_line(filename); lp := null; return; end Read_System; begin Read_System(infilename); if lp = null then new_line; get(lp); end if; Create_Output_File(outfile,outfilename); put(outfile,lp.all); new_line(outfile); Driver_for_Reduction(outfile,lp.all,d,false); Close(outfile); new_line; put("Do you want the reduced system on separate file ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then declare redfile : file_type; begin put_line("Reading the name of the output file."); Read_Name_and_Create_File(redfile); put(redfile,lp.all); Close(redfile); end; end if; end mainred; SHAR_EOF fi # end of overwriting check if test -f 'mainred.ads' then echo shar: will not over-write existing file "'mainred.ads'" else cat << "SHAR_EOF" > 'mainred.ads' procedure mainred ( infilename,outfilename : in string ); -- DESCRIPTION : -- This is the routine for reducing a polynomial system, -- as called by the central dispatcher. -- The arguments are the respective names of the input and output files. SHAR_EOF fi # end of overwriting check if test -f 'mainscal.adb' then echo shar: will not over-write existing file "'mainscal.adb'" else cat << "SHAR_EOF" > 'mainscal.adb' with text_io,integer_io; use text_io,integer_io; with Communications_with_User; use Communications_with_User; with File_Operations; use File_Operations; with Complex_Vectors; use Complex_Vectors; with Complex_Vectors_io; use Complex_Vectors_io; with Complex_Numbers_io; use Complex_Numbers_io; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Solutions,Solutions_io; use Solutions,Solutions_io; with Scaling; with Drivers_for_Scaling; use Drivers_for_Scaling; procedure mainscal ( infilename,outfilename : in string ) is lp : Link_to_Poly_Sys; infile : file_type; outfile : file_type; n,basis : natural; scalvec : Link_to_Vector; ans : character; sysonfile : boolean; procedure Read_System ( file : in out file_type; filename : in string ) is begin if filename /= "" then Open(file,in_file,filename); new_line; get(file,lp); n := lp'length; sysonfile := true; else sysonfile := false; end if; exception when others => new_line; put("Could not open file with name "); put_line(filename); sysonfile := false; lp := null; return; end Read_System; procedure Separate_File ( p : in Poly_Sys ) is scafile : file_type; begin new_line; put("Do you want the scaled system on separate file ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then put_line("Reading the name of the output file."); Read_Name_and_Create_File(scafile); put(scafile,lp.all); if basis /= 0 then new_line(scafile); put_line(scafile,"SCALING COEFFICIENTS :"); new_line(scafile); put(scafile,basis,1); new_line(scafile); for i in scalvec'range loop put(scafile,scalvec(i)); new_line(scafile); end loop; end if; Close(scafile); end if; end Separate_File; procedure Rescale is sols : Solution_List; found : boolean; m : natural; begin if sysonfile -- scan for scaling coefficients then Scan_and_Skip(infile,"SCALING COEFFICIENTS",found); if found then get(infile,basis); scalvec := new vector(1..2*n); get(infile,scalvec.all); end if; else found := false; end if; if not found then put("Give the basis : "); get(basis); put("Give "); put(2*n,1); put_line(" complex scaling numbers : "); scalvec := new vector(1..2*n); for i in scalvec'range loop get(scalvec(i)); end loop; end if; if sysonfile -- scan for the solutions then Reset(infile); Scan_and_Skip(infile,"SOLUTIONS",found); if found then get(infile,sols); end if; Close(infile); else found := false; end if; if not found then put_line("Reading the name of the file for the solutions."); Read_Name_and_Open_File(infile); get(infile,sols); Close(infile); end if; put_line(outfile,"THE SCALING COEFFICIENTS : "); new_line(outfile); put(outfile,basis,1); new_line(outfile); for i in scalvec'range loop put(outfile,scalvec(i)); new_line(outfile); end loop; new_line(outfile); Scaling.Scale(basis,scalvec.all,sols); m := Length_Of(sols); if m > 0 then put_line(outfile,"THE DE-SCALED SOLUTIONS : "); new_line(outfile); put(outfile,m,Head_Of(sols).n,sols); end if; Close(outfile); end Rescale; procedure Display_and_Dispatch_Menu ( file : in file_type; p : in out Poly_Sys ) is -- DESCRIPTION : -- Displays the menu and returns a choice, corresponding to one of the -- three available scaling procedures. begin loop new_line; put_line("MENU for Scaling Polynomial Systems :"); put_line(" 1 : Equation Scaling : divide by average coefficient "); put_line(" 2 : Variable Scaling : change of variables, as z = (2^c)*x"); put_line(" 3 : Solution Scaling : back to original coordinates "); put("Type 1, 2, or 3 to select scaling, or i for info : "); Ask_Alternative(ans,"123i"); if ans = 'i' then new_line; Drivers_for_Scaling.Display_Info; new_line; end if; exit when ans /= 'i'; end loop; case ans is when '1' => Equation_Scaling(file,p); basis := 0; when '2' => Variable_Scaling(file,p,basis,scalvec); when '3' => Rescale; when others => null; end case; case ans is when '1' | '2' => Write_Results(file,p,basis,scalvec); when others => null; end case; if ans /= '3' then Separate_File(p); end if; end Display_and_Dispatch_Menu; begin Read_System(infile,infilename); if lp = null then loop new_line; put("Is the system on a file ? (y/n/i=info) "); Ask_Alternative(ans,"yni"); if ans = 'i' then new_line; Complex_Polynomial_Systems_io.Display_Format; new_line; end if; exit when ans /= 'i'; end loop; new_line; if ans = 'y' then put_line("Reading the name of the input file."); Read_Name_and_Open_File(infile); get(infile,lp); sysonfile := true; n := lp'length; else put("Give the dimension : "); get(n); lp := new Poly_Sys(1..n); put("Give "); put(n,1); put(" "); put(n,1); put_line("-variate polynomials :"); get(n,lp.all); skip_line; -- skip end_of_line symbol sysonfile := false; end if; end if; Create_Output_File(outfile,outfilename); put(outfile,lp.all); new_line(outfile); Display_and_Dispatch_Menu(outfile,lp.all); end mainscal; SHAR_EOF fi # end of overwriting check if test -f 'mainscal.ads' then echo shar: will not over-write existing file "'mainscal.ads'" else cat << "SHAR_EOF" > 'mainscal.ads' procedure mainscal ( infilename,outfilename : in string ); -- DESCRIPTION : -- This is the routine for scaling a polynomial system or a solution list, -- as called by the central dispatcher. -- The arguments are the respective names of the input and output files. SHAR_EOF fi # end of overwriting check if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' # Establishing the links : linkrc = ../../Ada/Homotopy links: @-ln -s $(linkrc)/drivhoco.a driver_for_homotopy_construction.ads @-ln -s $(linkrc)/drivhocoB.a driver_for_homotopy_construction.adb @-ln -s $(linkrc)/drivreds.a drivers_for_reduction.ads @-ln -s $(linkrc)/drivredsB.a drivers_for_reduction.adb @-ln -s $(linkrc)/drivscal.a driver_for_scaling.ads @-ln -s $(linkrc)/drivscalB.a driver_for_scaling.adb @-ln -s $(linkrc)/drivscals.a drivers_for_scaling.ads @-ln -s $(linkrc)/drivscalsB.a drivers_for_scaling.adb @-ln -s $(linkrc)/equals.a floating_equalities.ads @-ln -s $(linkrc)/equalsB.a floating_equalities.adb @-ln -s $(linkrc)/homzers.a homogenization.ads @-ln -s $(linkrc)/homzersB.a homogenization.adb @-ln -s $(linkrc)/homotopy.a homotopy.ads @-ln -s $(linkrc)/homotopyB.a homotopy.adb @-ln -s $(linkrc)/mainred.a mainred.ads @-ln -s $(linkrc)/mainredB.a mainred.adb @-ln -s $(linkrc)/mainscal.a mainscal.ads @-ln -s $(linkrc)/mainscalB.a mainscal.adb @-ln -s $(linkrc)/projtrans.a projective_transformations.ads @-ln -s $(linkrc)/projtransB.a projective_transformations.adb @-ln -s $(linkrc)/reduover.a reduction_of_overconstrained_systems.ads @-ln -s $(linkrc)/reduoverB.a reduction_of_overconstrained_systems.adb @-ln -s $(linkrc)/redufull.a reduction_of_polynomial_systems.ads @-ln -s $(linkrc)/redufullB.a reduction_of_polynomial_systems.adb @-ln -s $(linkrc)/redupoly.a reduction_of_polynomials.ads @-ln -s $(linkrc)/redupolyB.a reduction_of_polynomials.adb @-ln -s $(linkrc)/scaling.a scaling.ads @-ln -s $(linkrc)/scalingB.a scaling.adb @-ln -s $(linkrc)/solutions.a solutions.ads @-ln -s $(linkrc)/solutionsB.a solutions.adb @-ln -s $(linkrc)/solutions_io.a solutions_io.ads @-ln -s $(linkrc)/solutions_ioB.a solutions_io.adb SHAR_EOF fi # end of overwriting check if test -f 'projective_transformations.adb' then echo shar: will not over-write existing file "'projective_transformations.adb'" else cat << "SHAR_EOF" > 'projective_transformations.adb' with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Numbers; use Complex_Numbers; with Natural_Vectors; package body Projective_Transformations is function Projective_Transformation ( p : Poly ) return Poly is deg : integer := Degree(p); res : Poly := Null_Poly; procedure Homogeneous_Term ( t : in Term; continue : out boolean ) is ht : Term; sum : natural := 0; begin ht.cf := t.cf; ht.dg := new Natural_Vectors.Vector(t.dg'first..t.dg'last+1); for i in t.dg'range loop sum := sum + t.dg(i); ht.dg(i) := t.dg(i); end loop; ht.dg(ht.dg'last) := deg-sum; Plus_Term(res,ht); Natural_Vectors.Clear(Natural_Vectors.Link_to_Vector(ht.dg)); continue := true; end Homogeneous_Term; procedure Homogeneous_Terms is new Visiting_Iterator(Homogeneous_Term); begin Homogeneous_Terms(p); return res; end Projective_Transformation; procedure Projective_Transformation ( p : in out Poly ) is res : Poly := Projective_Transformation(p); begin Copy(res,p); Clear(res); end Projective_Transformation; function Projective_Transformation ( p : Poly_Sys ) return Poly_Sys is res : Poly_Sys(p'range); begin for k in p'range loop res(k) := Projective_Transformation(p(k)); end loop; return res; end Projective_Transformation; procedure Projective_Transformation ( p : in out Poly_Sys ) is begin for k in p'range loop Projective_Transformation(p(k)); end loop; end Projective_Transformation; function Projective_Transformation ( s : Solution ) return Solution is n : natural := s.n; r : Solution(n+1); begin r.v(1..n) := s.v(1..n); r.v(n+1) := CMPLX(1.0); r.t := s.t; r.m := s.m; return r; end Projective_Transformation; procedure Projective_Transformation ( sols : in out Solution_List ) is begin if Is_Null(sols) then null; else declare temp : Solution_List := sols; n : natural := Head_Of(sols).n; l : Link_To_Solution; s : Solution(n); s2 : Solution(n+1); begin while not Is_Null(temp) loop l := Head_Of(temp); s := l.all; s2 := Projective_Transformation(s); Clear(l); l := new Solution'(s2); Set_Head(temp,l); temp := Tail_Of(temp); end loop; end; end if; end Projective_Transformation; function Affine_Transformation ( s : Solution ) return Solution is n : natural := s.n; r : Solution(n-1); begin for i in 1..(n-1) loop if modulus(s.v(n)) + CMPLX(1.0) = CMPLX(1.0) then r.v(i) := CMPLX(10.0**10); else r.v(i) := s.v(i) / s.v(n); end if; end loop; r.t := s.t; r.m := s.m; return r; exception when numeric_error => r.v(1..(n-1)) := (1..(n-1) => CMPLX(10.0**10)); return r; end Affine_Transformation; procedure Affine_Transformation ( sols : in out Solution_List ) is begin if Is_Null(sols) then null; else declare n : natural := Head_Of(sols).n; s1 : Solution(n); s2 : Solution(n-1); temp : Solution_List := sols; l : Link_To_Solution; begin while not Is_Null(temp) loop l := Head_Of(temp); s1 := l.all; s2 := Affine_Transformation(s1); Clear(l); l := new Solution'(s2); Set_Head(temp,l); temp := Tail_Of(temp); end loop; end; end if; end Affine_Transformation; end Projective_Transformations; SHAR_EOF fi # end of overwriting check if test -f 'projective_transformations.ads' then echo shar: will not over-write existing file "'projective_transformations.ads'" else cat << "SHAR_EOF" > 'projective_transformations.ads' with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; with Solutions; use Solutions; package Projective_Transformations is -- DESCRIPTION : -- This package provides routines for performing a projective -- transformation on polynomials and polynomial systems, on -- solutions and on lists of solutions. function Projective_Transformation ( p : Poly ) return Poly; function Projective_Transformation ( p : Poly_Sys ) return Poly_Sys; procedure Projective_Transformation ( p : in out Poly ); procedure Projective_Transformation ( p : in out Poly_Sys ); -- DESCRIPTION : -- An additional unknown is added so that each term has the same degree. function Projective_Transformation ( s : Solution) return Solution; procedure Projective_Transformation ( sols : in out Solution_List ); -- DESCRIPTION : -- An additional component, equal to 1, is added to the solution vector. function Affine_Transformation ( s : Solution ) return Solution; procedure Affine_Transformation ( sols : in out Solution_List ); -- DESCRIPTION : -- All components of the solution vector will be divided by the last -- component, which is afterwards cut off. end Projective_Transformations; SHAR_EOF fi # end of overwriting check if test -f 'reduction_of_overconstrained_systems.adb' then echo shar: will not over-write existing file "'reduction_of_overconstrained_systems.adb'" else cat << "SHAR_EOF" > 'reduction_of_overconstrained_systems.adb' with Complex_Numbers; use Complex_Numbers; with Random_Number_Generators; use Random_Number_Generators; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; with Reduction_of_Polynomials; use Reduction_of_Polynomials; package body Reduction_of_Overconstrained_Systems is function Random_Square ( p : in Poly_Sys ) return Poly_Sys is m : constant natural := Number_of_Unknowns(p(p'first)); res : Poly_Sys(1..m); begin for i in res'range loop Copy(p(i),res(i)); for j in m+1..p'last loop declare a : double_complex := Random1; tmp : Poly := a*p(j); begin Plus_Poly(res(i),tmp); Clear(tmp); end; end loop; end loop; return res; end Random_Square; function Reduced_Square ( p : in Poly_Sys ) return Poly_Sys is m : constant natural := Number_of_Unknowns(p(p'first)); res : Poly_Sys(1..m); begin for i in res'range loop Copy(p(i),res(i)); for j in m+1..p'last loop declare tmp : Poly := Rpoly(res(i),p(j)); begin Copy(tmp,res(i)); Clear(tmp); end; end loop; end loop; return res; end Reduced_Square; end Reduction_of_Overconstrained_Systems; SHAR_EOF fi # end of overwriting check if test -f 'reduction_of_overconstrained_systems.ads' then echo shar: will not over-write existing file "'reduction_of_overconstrained_systems.ads'" else cat << "SHAR_EOF" > 'reduction_of_overconstrained_systems.ads' with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; package Reduction_of_Overconstrained_Systems is -- DESCRIPTION : -- This package provides two different approaches for reducing -- a overconstrained system to a square system. function Random_Square ( p : in Poly_Sys ) return Poly_Sys; -- DESCRIPTION : -- The system q (q'range = 1..N) on return will be square, like -- q(i) = p(i) + l(i,N+1)*p(N+1) + .. + l(i,n)*p(n), for i=1,2,..,N. -- This type of reduction is recommended when the solution of any -- subsystem of p (p'range = 1,..,n) has a connected solution component. function Reduced_Square ( p : in Poly_Sys ) return Poly_Sys; -- DESCRIPTION : -- The system q (q'range = 1,..,N) on return will be square, like -- q(i) = Rpoly(..(Rpoly(p(i),p(N+1)), p(n)), for i=1,2,..,N, -- i.e.: the additional polynomial will be used for reducing the system. -- This type of reduction is recommended when the solution set of the -- first N equation of p consists of isolated points that do not all -- satisfy the remaining equations. end Reduction_of_Overconstrained_Systems; SHAR_EOF fi # end of overwriting check if test -f 'reduction_of_polynomial_systems.adb' then echo shar: will not over-write existing file "'reduction_of_polynomial_systems.adb'" else cat << "SHAR_EOF" > 'reduction_of_polynomial_systems.adb' with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Numbers; use Complex_Numbers; with Natural_Vectors,Complex_Matrices; use Complex_Matrices; with Complex_Linear_System_Solvers; use Complex_Linear_System_Solvers; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; with Reduction_of_Polynomials; use Reduction_of_Polynomials; package body Reduction_of_Polynomial_Systems is -- AUXALIARY DATA FOR LINEAR REDUCTION : mach_eps : constant double_float := 10.0**(-13); type Degrees_Array is array(positive range <>) of Degrees; type Terms_Array is array(positive range <>) of Term; type Boolean_Array is array(positive range <>) of boolean; -- AUXILIARY PROCEDURES FOR LINEAR REDUCTION : procedure Pop_First_Term ( p : in out Poly; t : in out Term ) is -- DESCRIPTION : -- The term on return is the leading term of p. -- This term is removed from p. procedure First_Term ( tt : in Term; continue : out boolean ) is begin Copy(tt,t); continue := false; end First_Term; procedure Get_First_Term is new Visiting_Iterator(First_Term); begin t.cf := CMPLX(0.0); Get_First_Term(p); if t.cf /= CMPLX(0.0) then Min_Term(p,t); end if; end Pop_First_Term; procedure Leading_Terms ( p : in out Poly_Sys; ta : in out Terms_Array ) is -- DESCRIPTION : -- Puts the leading terms of the polynomials in p in the array ta. -- The leading terms are removed afterwards. begin for i in p'range loop Clear(ta(i)); Pop_First_Term(p(i),ta(i)); end loop; end Leading_Terms; procedure Find_Max ( ta : in Terms_Array; index : in out Boolean_Array; stop : in out boolean ) is res : Degrees := new Natural_Vectors.Vector'(ta(1).dg'range => 0); begin stop := true; for i in ta'range loop if ta(i).cf /= CMPLX(0.0) then if ta(i).dg > res then res.all := Natural_Vectors.Vector(ta(i).dg.all); index(1..(i-1)) := (1..(i-1) => false); index(i) := true; stop := false; elsif Equal(ta(i).dg,res) then index(i) := true; stop := false; end if; end if; end loop; Natural_Vectors.Clear(Natural_Vectors.Link_to_Vector(res)); end Find_Max; procedure Update ( p : in out Poly_Sys; n : in natural; ta : in out Terms_Array; da : in out Degrees_Array; nda,cnt : in out natural; mat : in out Matrix; stop : in out boolean ) is index : natural; is_max : Boolean_Array(1..n) := (1..n => false); begin Find_Max(ta,is_max,stop); if not stop then -- Get the next Degrees for in the Degrees_Array for i in is_max'range loop if is_max(i) then index := i; exit; end if; end loop; nda := nda + 1; Natural_Vectors.Copy(Natural_Vectors.Link_to_Vector(ta(index).dg), Natural_Vectors.Link_to_Vector(da(nda))); -- Fill in the matrix and update the window : for i in is_max'range loop if is_max(i) then mat(i,nda) := ta(i).cf; Pop_First_Term(p(i),ta(i)); cnt := cnt+1; else mat(i,nda) := CMPLX(0.0); end if; end loop; end if; end Update; procedure Coefficient_Matrix ( p : in Poly_Sys; mat : in out Matrix; da : in out Degrees_Array; nda : in out natural; diagonal : in out boolean ) is -- DESCRIPTION : -- Constructs the coefficient matrix of the polynomial system. -- Stops when the system is diagonal. -- REQUIRED : -- mat'range(1) = p'range, mat'range(2) = 1..Sum_Number_of_Terms(p), -- da'range = mat'range(2). -- ON ENTRY : -- p a polynomial system. -- ON RETURN : -- mat coefficient matrix, up to column nda filled up; -- da da(1..nda) collects the different terms in the system; -- nda number of different terms; -- diagonal true if the leading terms are all different. work : Poly_Sys(p'range); stop : boolean := false; Window : Terms_Array(p'range); cnt : natural := 0; begin Copy(p,work); Leading_Terms(work,Window); diagonal := false; while not stop and not diagonal loop Update(work,p'last,Window,da,nda,cnt,mat,stop); if (cnt = p'last) and then (cnt = nda) then diagonal := true; end if; exit when diagonal; end loop; Clear(work); end Coefficient_Matrix; procedure Coefficient_Matrix ( p : in Poly_Sys; mat : in out Matrix; da : in out Degrees_Array; nda : in out natural ) is -- DESCRIPTION : -- Constructs the coefficient matrix of the polynomial system. -- REQUIRED : -- mat'range(1) = p'range, mat'range(2) = 1..Sum_Number_of_Terms(p), -- da'range = mat'range(2). -- ON ENTRY : -- p a polynomial system. -- ON RETURN : -- mat coefficient matrix, up to column nda filled up; -- da da(1..nda) collects the different terms in the system; -- nda number of different terms. work : Poly_Sys(p'range); stop : boolean := false; Window : Terms_Array(p'range); cnt : natural := 0; begin Copy(p,work); Leading_Terms(work,Window); while not stop loop Update(work,p'last,Window,da,nda,cnt,mat,stop); end loop; Clear(work); end Coefficient_Matrix; procedure Make_Polynomial_System ( p : in out Poly_Sys; mat : in Matrix; da : in Degrees_Array; nda : in natural; inconsistent,infinite : out boolean ) is t : Term; n : natural := p'length; begin inconsistent := false; infinite := false; Clear(p); for i in p'range loop p(i) := Null_Poly; for j in 1..nda loop if modulus(mat(i,j)) > mach_eps then t.dg := new Natural_Vectors.Vector'(da(j).all); t.cf := mat(i,j); Plus_Term(p(i),t); Clear(t); end if; end loop; if p(i) = Null_Poly then infinite := true; elsif Degree(p(i)) = 0 then inconsistent := true; end if; end loop; end Make_Polynomial_System; function Sum_Number_of_Terms ( p : Poly_Sys ) return natural is -- DESCRIPTION : -- Returns the sum of the number of terms of every polynomial in p. sum : natural := 0; begin for i in p'range loop sum := sum + Number_of_Terms(p(i)); end loop; return sum; end Sum_Number_of_Terms; -- TARGET ROUTINES FOR LINEAR REDUCTION : procedure Reduce ( p : in out Poly_Sys; diagonal,inconsistent,infinite : in out boolean ) is n : natural := p'length; cp : Poly_Sys(p'range); max_terms : constant natural := Sum_Number_of_Terms(p); columns : Degrees_Array(1..max_terms); numb_columns : natural := 0; mat : Matrix(p'range,1..max_terms); begin Coefficient_Matrix(p,mat,columns,numb_columns,diagonal); if diagonal then inconsistent := false; infinite := false; else declare coeffmat : Matrix(p'range,1..numb_columns); begin for i in coeffmat'range(1) loop for j in coeffmat'range(2) loop coeffmat(i,j) := mat(i,j); end loop; end loop; Triangulate(coeffmat,n,numb_Columns); Make_Polynomial_System(p,coeffmat,columns,numb_columns, inconsistent,infinite); for i in 1..numb_Columns loop Natural_Vectors.Clear(Natural_Vectors.Link_to_Vector(Columns(i))); end loop; end; end if; end Reduce; procedure Sparse_Reduce ( p : in out Poly_Sys; inconsistent,infinite : in out boolean ) is n : natural := p'length; max_terms : constant natural := Sum_Number_of_Terms(p); columns : Degrees_Array(1..max_terms); numb_columns : natural := 0; mat : Matrix(1..n,1..max_terms); begin Coefficient_Matrix(p,mat,columns,numb_columns); declare coeffmat : Matrix(p'range,1..numb_columns); begin for i in coeffmat'range(1) loop for j in coeffmat'range(2) loop coeffmat(i,j) := mat(i,j); end loop; end loop; Diagonalize(coeffmat,n,numb_Columns); Make_Polynomial_System(p,coeffmat,columns,numb_columns, inconsistent,infinite); for i in 1..numb_Columns loop Natural_Vectors.Clear(Natural_Vectors.Link_to_Vector(columns(i))); end loop; end; end Sparse_Reduce; -- NONLINEAR REDUCTION : function Total_Degree ( p : Poly_Sys ) return natural is d : natural := 1; tmp : integer; begin for i in p'range loop tmp := Degree(p(i)); if tmp >= 0 then d := d * tmp; end if; end loop; return d; end Total_Degree; function LEQ ( d1,d2 : Degrees ) return boolean is -- DESCRIPTION : -- Returns true if all degrees of d1 are lower than -- or equal to the degrees of d2 begin for i in d1'range loop if d1(i) > d2(i) then return false; end if; end loop; return true; end LEQ; function Leading_Term ( p : Poly ) return Term is -- DESCRIPTION : -- Returns the leading term of the polynomial p. tf : Term; procedure First_Term (t : in Term; continue : out boolean) is begin Copy(t,tf); continue := false; end First_Term; procedure Get_First_Term is new Visiting_Iterator (First_Term); begin Get_First_Term(p); return tf; end Leading_Term; function Can_Be_Eliminated ( p : Poly_Sys; j : natural ) return boolean is -- DESCRIPTION : -- returns true if the degree of the j-th unknown in each equation -- is zero. begin for i in p'range loop if Degree(p(i),j) > 0 then return false; end if; end loop; return true; end Can_Be_Eliminated; procedure Shift_Null_Polynomial ( p : in out Poly_Sys ) is -- DESCRIPTION : -- The null polynomial in the system p will be shifted down -- towards the end. begin for i in p'range loop if p(i) = Null_Poly then for j in i..(p'last-1) loop Copy(p(j+1),p(j)); Clear(p(j+1)); end loop; end if; end loop; end Shift_Null_Polynomial; procedure Eliminate ( p : in out Poly; j : in natural ) is -- DESCRIPTION : -- The j-th unknown will be eliminated out of the polynomial p n : natural := Number_Of_Unknowns(p); procedure Eliminate_Term (t : in out Term; continue : out boolean) is d : Degrees := new Natural_Vectors.Vector(1..(n-1)); begin for i in 1..(j-1) loop d(i) := t.dg(i); end loop; for i in j..(n-1) loop d(i) := t.dg(i+1); end loop; Clear(t); t.dg := d; continue := true; end Eliminate_Term; procedure Eliminate_Terms is new Changing_Iterator(Eliminate_Term); begin Eliminate_Terms(p); end Eliminate; procedure Eliminate ( p : in out Poly_Sys; j : in natural ) is -- DESCRIPTION : -- The j-th unknown will be eliminated out of each equation. begin for i in p'range loop Eliminate(p(i),j); end loop; end Eliminate; procedure Replace ( p : in out Poly_Sys; pp : in Poly; i : in natural ) is -- DESCRIPTION : -- This procedure replaces the i-th polynomial in the system p -- by the polynomial pp. If pp is a null polynomial then the procedure -- tries to eliminate an unknown, in order to have as much equations -- as there are unknowns. tmp : natural; begin if (pp = Null_Poly) or else (Number_Of_Unknowns(pp) = 0) then -- try to eliminate an unknown tmp := Number_Of_Unknowns(p(1)); Clear(p(i)); p(i) := Null_Poly; for j in reverse 1..Number_Of_Unknowns(p(1)) loop if Can_Be_Eliminated(p,j) then Eliminate(p,j); end if; end loop; Shift_Null_Polynomial(p); else Clear(p(i)); Copy(pp,p(i)); end if; end Replace; function red ( p,b1,b2 : Poly ) return Poly is Rpb1 : Poly := Rpoly(p,b1); begin if Number_Of_Unknowns(Rpb1) = 0 then return Null_Poly; else declare Rpb2 : Poly := Rpoly(Rpb1,b2); begin Clear(Rpb1); return Rpb2; end; end if; end red; function Reduce ( p,b1,b2 : Poly ) return Poly is -- DESCRIPTION : -- returns p mod < b1,b2 > temp : Poly := red(p,b1,b2); begin if Number_Of_Unknowns(temp) = 0 then return Null_Poly; else Clear(temp); return red(p,b2,b1); end if; end Reduce; function Simple_Criterium ( p1,p2 : Poly ) return boolean is -- DESCRIPTION : -- returns true if lcm(in(p1),in(p2)) = in(p1), if in(p2) | in(p1). lt1,lt2 : Term; res : boolean; begin lt1 := Leading_Term(p1); lt2 := Leading_Term(p2); res := LEQ(lt2.dg,lt1.dg); Clear(lt1); Clear(lt2); return res; end Simple_Criterium; procedure Rpoly_Criterium ( p,b1,b2 : in Poly; cnt : in out natural; res : out boolean ) is -- DESCRIPTION : -- Applies the R-polynomial criterium and counts the number of -- R-polynomials computed. Rpb1 : Poly := Rpoly(p,b1); Rpb2 : Poly; begin cnt := cnt + 1; if Number_Of_Unknowns(Rpb1) = 0 then res := true; else Rpb2 := Rpoly(Rpb1,b2); cnt := cnt + 1; Clear(Rpb1); if Number_of_Unknowns(Rpb2) = 0 then res := true; else Clear(Rpb2); Rpb2 := Rpoly(p,b2); cnt := cnt + 1; if Number_of_Unknowns(Rpb2) = 0 then res := true; else Rpb1 := Rpoly(Rpb2,b1); cnt := cnt + 1; Clear(Rpb2); if Number_of_Unknowns(Rpb1) = 0 then res := true; else res := false; Clear(Rpb1); end if; end if; end if; end if; end Rpoly_Criterium; function Criterium ( p,q,s : Poly ) return boolean is -- DESCRIPTION : -- returns true if p may be replaced by s. begin if Simple_Criterium(p,q) then return true; else declare temp : Poly := Reduce(p,q,s); res : boolean := (Number_Of_Unknowns(temp) = 0); begin Clear(temp); return res; end; end if; end Criterium; procedure Criterium ( p,q,s : in Poly; cnt : in out natural; res : out boolean ) is -- DESCRIPTION : -- returns true if p may be replaced by s. begin if Simple_Criterium(p,q) then res := true; else Rpoly_Criterium(p,q,s,cnt,res); end if; end Criterium; procedure Reduce ( p : in Poly_Sys; res : in out Poly_Sys; cnt_eq : in out natural; max_eq : in natural; cnt_sp : in out natural; max_sp : in natural; cnt_rp : in out natural; max_rp : in natural ) is S : Poly; n : natural := p'last - p'first + 1; dS,dpi,dpj : integer; ok : boolean; procedure try ( i,dpi : in natural ) is -- DESCRIPTION : try to replace p_i by S p_red : Poly_Sys(1..n); begin if cnt_eq > max_eq then return; end if; if cnt_sp > max_sp then return; end if; Clear(p_red); Copy(p,p_red); Replace(p_red,S,i); if dS = 0 then return; elsif Total_Degree(p_red) < Total_Degree(res) then Copy(p_red,res); Reduce(p_red,res,cnt_eq,max_eq,cnt_sp,max_sp,cnt_rp,max_rp); elsif cnt_eq <= max_eq then cnt_eq := cnt_eq + 1; Reduce(p_red,res, cnt_eq,max_eq,cnt_sp,max_sp,cnt_rp,max_rp); end if; Clear(p_red); end try; begin if cnt_eq > max_eq then return; end if; if cnt_sp > max_sp then return; end if; if cnt_rp > max_rp then return; end if; for i in 1..n loop for j in (i+1)..n loop if (p(i) /= Null_Poly) and (p(j) /= Null_Poly) then Clear(S); S := Spoly(p(i),p(j)); cnt_sp := cnt_sp + 1; dS := Degree(S); dpi := Degree(p(i)); dpj := Degree(p(j)); if dS <= dpi and then dpi > dpj and then Criterium(p(i),p(j),S) then try(i,dpi); elsif dS <= dpj and then dpi < dpj and then Criterium(p(j),p(i),S) then try(j,dpj); else -- dpi = dpj if dS <= dpi then Criterium(p(i),p(j),S,cnt_rp,ok); if ok then try(i,dpi); end if; end if; if dS <= dpj then Criterium(p(j),p(i),S,cnt_rp,ok); if ok then try(j,dpj); end if; end if; end if; Clear(S); end if; exit when (dS = 0); end loop; end loop; end Reduce; procedure Sparse_Reduce ( p : in Poly_Sys; res : in out Poly_Sys; cnt_eq : in out natural; max_eq : in natural ) is S : Poly; n : natural := p'last - p'first + 1; dS,dpi,dpj : integer; procedure try ( i,dpi : in natural ) is -- DESCRIPTION : try to replace p_i by S p_red : Poly_Sys(1..n); inconsistent,infinite : boolean := false; begin if cnt_eq > max_eq then return; end if; Clear(p_red); Copy(p,p_red); Replace(p_red,S,i); if dS /= 0 then Sparse_Reduce(p_red,inconsistent,infinite); end if; if dS = 0 or inconsistent then cnt_eq := max_eq + 1; return; elsif Total_Degree(p_red) < Total_Degree(res) then Copy(p_red,res); Sparse_Reduce(p_red,res,cnt_eq,max_eq); else cnt_eq := cnt_eq + 1; Sparse_Reduce(p_red,res,cnt_eq,max_eq); end if; Clear(p_red); end try; begin if cnt_eq > max_eq then return; end if; for i in 1..n loop for j in (i+1)..n loop if (p(i) /= Null_Poly) and (p(j) /= Null_Poly) then Clear(S); S := Spoly(p(i),p(j)); dS := Degree(S); dpi := Degree(p(i)); dpj := Degree(p(j)); if dS <= dpi and then dpi > dpj and then Criterium(p(i),p(j),S) then try(i,dpi); elsif dS <= dpj and then dpi < dpj and then Criterium(p(j),p(i),S) then try(j,dpj); else -- dpi = dpj if dS <= dpi and then Criterium(p(i),p(j),S) then try(i,dpi); end if; if dS <= dpj and then Criterium(p(j),p(i),S) then try(j,dpj); end if; end if; Clear(S); end if; end loop; end loop; end Sparse_Reduce; end Reduction_of_Polynomial_Systems; SHAR_EOF fi # end of overwriting check if test -f 'reduction_of_polynomial_systems.ads' then echo shar: will not over-write existing file "'reduction_of_polynomial_systems.ads'" else cat << "SHAR_EOF" > 'reduction_of_polynomial_systems.ads' with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Vectors; use Complex_Vectors; package Reduction_of_Polynomial_Systems is -- DESCRIPTION : -- This package offers some routines for lowering the Bezout -- number of a given - probably deficient - polynomial system. function Total_Degree ( p : Poly_Sys ) return natural; -- DESCRIPTION : -- Returns the total degree of the polynomial system, -- i.e. the product of the degrees of the polynomials. procedure Reduce ( p : in out Poly_Sys; diagonal,inconsistent,infinite : in out boolean ); -- DESCRIPTION : -- This procedure tries to lower the total degree of p by means -- of linear reduction. -- ON ENTRY : -- p a polynomial system. -- ON RETURN : -- p a polynomial system with a possible lower total degree; -- diagonal true if all leading terms in p are different; -- inconsistent is true if the reduced system has equations `4=0'; -- infinite is true if some equations of the original system -- disappeared during the reduction process. procedure Sparse_Reduce ( p : in out Poly_Sys; inconsistent,infinite : in out boolean ); -- DESCRIPTION : -- This procedure makes the coefficient matrix of p as sparse as -- possible. procedure Reduce ( p : in Poly_Sys; res : in out Poly_Sys; cnt_eq : in out natural; max_eq : in natural; cnt_sp : in out natural; max_sp : in natural; cnt_rp : in out natural; max_rp : in natural ); -- DESCRIPTION : -- This procedure tries to lower the total degree of the system p -- by means of nonlinear reduction. -- REQUIRED : the counters must equal 0, on entry. -- ON ENTRY : -- p a polynomial system; -- cnt_eq counts the number of equal degree substitutions; -- max_eq limit on the number of equal degree substitutions; -- cnt_sp counts the number of S-polynomial computations; -- max_sp limit on the number of S-polynomial computations. -- cnt_rp counts the number of R-polynomial computations; -- max_rp limit on the number of R-polynomial computations. -- ON RETURN : -- res the reduced system; -- cnt_eq the number of equal degree substitutions; -- cnt_sp the number of computed S-polynomials; -- cnt_rp the number of computed R-polynomials. procedure Sparse_Reduce ( p : in Poly_Sys; res : in out Poly_Sys; cnt_eq : in out natural; max_eq : in natural ); -- DESCRIPTION : -- the polynomial system is reduced by computing S-polynomials. -- After each replacement, the coefficient matrix is made as sparse -- as possible. end Reduction_of_Polynomial_Systems; SHAR_EOF fi # end of overwriting check if test -f 'reduction_of_polynomials.adb' then echo shar: will not over-write existing file "'reduction_of_polynomials.adb'" else cat << "SHAR_EOF" > 'reduction_of_polynomials.adb' with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Numbers; use Complex_Numbers; with Natural_Vectors; use Natural_Vectors; package body Reduction_of_Polynomials is -- AUXILIARIES : function Leading_Term ( p : Poly ) return Term is -- DESCRIPTION : -- Returns the leading term of the polynomial p. res : Term; procedure First_Term ( t : in Term; continue : out boolean ) is begin Natural_Vectors.Copy(Link_to_Vector(t.dg),Link_to_Vector(res.dg)); res.cf := t.cf; continue := false; end First_Term; procedure Get_First_Term is new Visiting_Iterator(First_Term); begin Get_First_Term(p); return res; end Leading_Term; function LEQ ( d1,d2 : Degrees ) return boolean is -- DESCRIPTION : -- Returns true if all degrees of d1 are lower than -- or equal to the degrees of d2. begin for i in d1'range loop if d1(i) > d2(i) then return false; end if; end loop; return true; end LEQ; function Search (p : Poly; pt : Term) return Term is -- DESCRIPTION : -- Returns the first term of p for which the following holds : -- LEQ(result,pt). result : Term; procedure Search_Term (t : in Term; continue : out boolean) is begin if LEQ(t.dg,pt.dg) then result.cf := t.cf; result.dg := new Natural_Vectors.Vector(t.dg'range); for i in t.dg'range loop result.dg(i) := t.dg(i); end loop; continue := false; else continue := true; end if; end Search_Term; procedure Search_Terms is new Visiting_Iterator(Search_Term); begin result.cf := CMPLX(0.0); Search_Terms(p); return result; end Search; procedure Purify ( p : in out Poly; tol : in double_float ) is -- DESCRIPTION : -- All terms of which the coefficient are in modulus smaller -- than tol are deleted. procedure Purify_Term ( t : in out Term; continue : out boolean ) is begin if modulus(t.cf) < tol then t.cf := CMPLX(0.0); end if; continue := true; end Purify_Term; procedure Purify_Terms is new Changing_Iterator(Purify_Term); begin Purify_Terms(p); if Number_Of_Unknowns(p) = 0 then Clear(p); p := Null_Poly; end if; end Purify; -- TARGET ROUTINES : function Spoly ( p,q : poly ) return Poly is S,pp,qq : Poly; tfp,tfq,facq,facp : Term; tol : constant double_float := 10.0**(-13); begin if (p = Null_Poly) or else (Number_Of_Unknowns(p) = 0) or else (q = Null_Poly) or else (Number_Of_Unknowns(q) = 0) then return Null_Poly; end if; tfp := Leading_Term(p); tfq := Leading_Term(q); facp.dg := new Natural_Vectors.Vector'(tfp.dg'range => 0); facq.dg := new Natural_Vectors.Vector'(tfq.dg'range => 0); for i in tfp.dg'range loop if tfp.dg(i) > tfq.dg(i) then facq.dg(i) := tfp.dg(i) - tfq.dg(i); elsif tfp.dg(i) < tfq.dg(i) then facp.dg(i) := tfq.dg(i) - tfp.dg(i); end if; end loop; if modulus(tfp.cf) > modulus(tfq.cf) then facp.cf := CMPLX(1.0); facq.cf := - tfp.cf / tfq.cf; else facp.cf := tfq.cf / tfp.cf; facq.cf := CMPLX(-1.0); end if; pp := facp * p; qq := facq * q; S := pp + qq; Clear(pp); Clear(qq); Natural_Vectors.Clear(Link_to_Vector(facp.dg)); Natural_Vectors.Clear(Link_to_Vector(tfp.dg)); Natural_Vectors.Clear(Link_to_Vector(facq.dg)); Natural_Vectors.Clear(Link_to_Vector(tfq.dg)); Purify(S,tol); return S; end Spoly; function Rpoly ( p,q : Poly ) return Poly is tol : constant double_float := 10.0**(-13); begin if (p = Null_Poly) or else (Number_Of_Unknowns(p) = 0) then return Null_Poly; elsif (q = Null_Poly) or else (Number_Of_Unknowns(q) = 0) then null; else declare ltp,tq : Term; begin ltp := Leading_Term(p); tq := Search(q,ltp); if tq.cf /= CMPLX(0.0) then declare R,qq : Poly; fac : Term; begin fac.dg := new Natural_Vectors.Vector'(ltp.dg'range => 0); for i in ltp.dg'range loop if ltp.dg(i) > tq.dg(i) then fac.dg(i) := ltp.dg(i) - tq.dg(i); end if; end loop; fac.cf := -ltp.cf / tq.cf; qq := fac * q; R := p + qq; Clear(qq); Natural_Vectors.Clear(Link_to_Vector(fac.dg)); Purify(R,tol); return R; end; end if; Natural_Vectors.Clear(Link_to_Vector(ltp.dg)); Natural_Vectors.Clear(Link_to_Vector(tq.dg)); end; end if; declare temp : Poly; begin Copy(p,temp); return temp; end; end Rpoly; end Reduction_of_Polynomials; SHAR_EOF fi # end of overwriting check if test -f 'reduction_of_polynomials.ads' then echo shar: will not over-write existing file "'reduction_of_polynomials.ads'" else cat << "SHAR_EOF" > 'reduction_of_polynomials.ads' with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; package Reduction_of_Polynomials is -- DESCRIPTION : -- This package implements S-polynomials and R-polynomials. function Spoly ( p,q : poly ) return Poly; -- DESCRIPTION : -- Returns the S-polynomial of p and q : -- lcm(in(p),in(q)) lcm(in(p),in(q)) -- S = c_q * ---------------- p - c_p * ---------------- q -- in(p) in(q) -- where lcm stands for the least common multiple, -- in(p) is the leading term of the polynomial p -- and the coefficients c_q and c_p are chosen such that -- their moduli are smaller than or equal to 1. function Rpoly ( p,q : Poly ) return Poly; -- DESCRIPTION : -- Returns the R-polynomial of the polynomials p and q : -- c_p lcm(in(p),term(q)) -- R = p - --- * ------------------ * q -- c_q term(q) -- such that the leading term of p vanishes. end Reduction_of_Polynomials; SHAR_EOF fi # end of overwriting check if test -f 'scaling.adb' then echo shar: will not over-write existing file "'scaling.adb'" else cat << "SHAR_EOF" > 'scaling.adb' with Mathematical_Functions; use Mathematical_Functions; with Complex_Numbers; use Complex_Numbers; with Natural_Vectors,Integer_Vectors; with Complex_Matrices; use Complex_Matrices; with Complex_Linear_System_Solvers; use Complex_Linear_System_Solvers; package body Scaling is function log ( b : in natural; x : in double_float ) return double_float is begin return ( LOG10(x)/LOG10(double_float(b)) ); end log; procedure Scale ( p : in out Poly ) is sum : double_float := 0.0; number : natural := 0; factor : double_complex; procedure Add_To_Sum ( t : in Term; continue : out boolean ) is begin sum := sum + modulus(t.cf); number := number + 1; continue := true; end Add_To_Sum; procedure Compute_Sum is new Visiting_Iterator(Add_To_Sum); begin Compute_Sum(p); factor := CMPLX(double_float(number)/sum); Mult_Coeff(p,factor); end Scale; procedure Scale ( s : in out Poly_Sys ) is begin for i in s'range loop scale(s(i)); end loop; end Scale; procedure Scale ( s : in out Poly_Sys; bas : in natural := 2; diff : in boolean; cond : out double_float; sccff : out vector ) is r1,r2,target : Poly; n : natural := s'last - s'first + 1; nm : natural := 2 * n; mat : matrix(1..nm,1..nm); right,scaleringscoeff : vector(1..nm); function center_coefficients ( s : in Poly_Sys; bas : in natural ) return Poly is r1,r1i : Poly; n : natural := s'last - s'first + 1; procedure Scan ( p : in Poly; i : in natural ) is init : Poly; t_init : Term; procedure Scan_Term ( t : in Term; continue : out boolean ) is tt : Term; temp : Poly; begin Copy(init,temp); continue := true; for k in t.dg'range loop if t.dg(k) /= 0 then tt.cf := CMPLX(double_float(t.dg(k))); tt.dg := new Natural_Vectors.Vector'(1..2*n => 0); tt.dg(k) := 1; Plus_Term(temp,tt); Clear(tt); end if; end loop; tt.cf := CMPLX(log(bas,modulus(t.cf))); tt.dg := new Natural_Vectors.Vector'(1..2*n => 0); Plus_Term(temp,tt); Clear(tt); Mult_Poly(temp,temp); Plus_Poly(r1i,temp); Clear(temp); end Scan_Term; procedure Scan_Terms is new Visiting_Iterator(Scan_Term); begin t_init.cf := CMPLX(1.0); t_init.dg := new Natural_Vectors.Vector'(1..2*n => 0); t_init.dg(n+i) := 1; init := Create(t_init); Clear(t_init); Scan_Terms(p); end Scan; begin r1 := Null_Poly; for i in s'range loop Scan(s(i),i); Plus_Poly(r1,r1i); Clear(r1i); end loop; return r1; end center_coefficients; function reduce_diff ( s : in Poly_Sys; bas : in natural ) return Poly is r2,r2i : Poly; procedure Scan2 (p : in Poly; t : in Term; nr : in natural) is count : natural := 0; procedure Scan2_Term (t2 : in Term; continue : out boolean) is tt : Term; temp : Poly := Null_Poly; begin continue := true; count := count + 1; if count > nr then for i in t2.dg'range loop if t.dg(i) /= t2.dg(i) then tt.dg := new Natural_Vectors.Vector'(1..2*n => 0); tt.dg(i) := 1; tt.cf := CMPLX(double_float(t.dg(i)-t2.dg(i))); Plus_Term(temp,tt); Clear(tt); end if; end loop; end if; tt.dg := new Natural_Vectors.Vector'(1..2*n => 0); tt.cf := CMPLX(log(bas,(modulus(t.cf)/modulus(t2.cf)))); Plus_Term(temp,tt); Clear(tt); Mult_Poly(temp,temp); Plus_Poly(r2i,temp); Clear(temp); end Scan2_Term; procedure Scan2_Terms is new Visiting_Iterator(Scan2_Term); begin Scan2_Terms(p); end Scan2; procedure Scan ( p : in Poly ) is nr : natural := 0; procedure Scan_Term ( t : in Term; continue : out boolean ) is begin nr := nr + 1; continue := true; Scan2(p,t,nr); end Scan_Term; procedure Scan_Terms is new Visiting_Iterator(Scan_Term); begin Scan_Terms(p); end Scan; begin r2 := Null_Poly; for i in s'range loop Scan(s(i)); Plus_Poly(r1,r2i); Clear(r2i); end loop; return r2; end reduce_diff; procedure Make_Linear_System ( r : in Poly; mat : out matrix; right : out vector ) is drj : Poly; procedure Init_Linear_System (m : out matrix; r : out vector) is begin for i in m'range(1) loop r(i) := CMPLX(0.0); for j in m'range(2) loop m(i,j) := CMPLX(0.0); end loop; end loop; end Init_Linear_System; procedure Scan (p : in Poly; j : in natural) is procedure Scan_Term (t : in Term; continue : out boolean) is begin continue := true; for i in t.dg'range loop if t.dg(i) = 1 then mat(j,i) := t.cf; return; end if; end loop; right(j) := -t.cf; end Scan_Term; procedure Scan_Terms is new Visiting_Iterator (Scan_Term); begin Scan_Terms(p); end Scan; begin Init_Linear_System(mat,right); for j in 1..Number_Of_Unknowns(r) loop drj := Complex_Multivariate_Polynomials.Diff(r,j); Scan(drj,j); end loop; end Make_Linear_System; procedure Scale ( s : in out Poly_Sys; bas : in natural; mat : in out matrix; right : in out vector; cond : out double_float ) is n : natural := s'last - s'first + 1; ipvt : Integer_Vectors.Vector(1..2*n); procedure Scale ( p : in out Poly; ip : in natural; scalingcoeff : in vector; bas : in natural ) is procedure Scale_Term ( t : in out Term; continue : out boolean ) is exp : double_float := 0.0; begin exp := REAL_PART(scalingcoeff(n+ip)); for k in t.dg'range loop exp := exp + double_float(t.dg(k))*REAL_PART(scalingcoeff(k)); end loop; t.cf := t.cf * CMPLX(double_float(bas) ** exp); continue := true; end Scale_Term; procedure Scale_Terms is new Changing_Iterator (Scale_Term); begin Scale_Terms(p); end scale; begin lufco(mat,2*n,ipvt,cond); lusolve(mat,2*n,ipvt,right); for i in s'range loop scale(s(i),i,right,bas); end loop; end scale; begin r1 := center_coefficients(s,bas); if diff then r2 := reduce_diff(s,bas); target := r1 + r2; clear(r1); clear(r2); else copy(r1,target); clear(r1); end if; Make_Linear_System(target,mat,right); clear(target); scale(s,bas,mat,right,cond); sccff := right; end Scale; procedure Scale ( basis : in natural; sccff : in Vector; s : in out Solution ) is begin for i in s.v'range loop s.v(i) := CMPLX(double_float(basis)**REAL_PART(sccff(i))) * s.v(i); end loop; end Scale; procedure Scale ( basis : in natural; sccff : in Vector; sols : in out Solution_List ) is begin if Is_Null(sols) then null; else declare temp : Solution_List := sols; n : natural := Head_Of(sols).n; s : Solution(n); l : Link_To_Solution; begin while not Is_Null(temp) loop l := Head_Of(temp); s := l.all; Scale(basis,sccff,s); Clear(l); l := new Solution'(s); Set_Head(temp,l); temp := Tail_Of(temp); end loop; end; end if; end Scale; end Scaling; SHAR_EOF fi # end of overwriting check if test -f 'scaling.ads' then echo shar: will not over-write existing file "'scaling.ads'" else cat << "SHAR_EOF" > 'scaling.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Vectors,Solutions; use Complex_Vectors,Solutions; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; package Scaling is -- DESCRIPTION : -- In this package some routines for scaling polynomials systems are -- provided. procedure Scale ( p : in out Poly ); procedure Scale ( s : in out Poly_Sys ); -- DESCRIPTION : -- In each polynomial the coefficients are divided by the average -- coefficient of that polynomial. procedure Scale ( s : in out Poly_Sys; bas : in natural := 2; diff : in boolean; cond : out double_float; sccff : out vector ); -- DESCRIPTION : -- Equation and variable scaling of a polynomial system. -- ON ENTRY : -- s a polynomial system; -- bas must be 2 or 10; -- diff true to reduce the difference between the coefficients, -- false, otherwise. -- ON RETURN : -- s is the scaled polynomial system by centering the coefficients -- close to units and eventually by reducing the difference -- between the coefficients -- cond is an estimate for condition number of the linear system -- that had to be solved for scaling the polynomial system; -- it is an indication how good or bad the polynomial system -- was scaled. -- sccff is a vector containing the the exponents (w.r.t. basis 10) of -- the factors to scale the solutions back to the original -- coordinates procedure Scale ( basis : in natural; sccff : in Vector; s : in out Solution ); procedure Scale ( basis : in natural; sccff : in Vector; sols : in out Solution_List ); -- DESCRIPTION : -- The solution(s) is (are) scaled backwards to the original coordinates, -- the vector sccff has been constructed by the procedure above. end Scaling; SHAR_EOF fi # end of overwriting check if test -f 'solutions.adb' then echo shar: will not over-write existing file "'solutions.adb'" else cat << "SHAR_EOF" > 'solutions.adb' with unchecked_deallocation; with Floating_Equalities; use Floating_Equalities; package body Solutions is use List_of_Solutions; -- CREATORS : function Create ( sl : Solution_List ) return Solution_Array is sa : Solution_Array(1..Length_Of(sl)); begin if not Is_Null(sl) then declare i : positive := 1; temp : Solution_List := sl; begin while not Is_Null(temp) loop sa(i) := new Solution'(Head_Of(temp).all); i := i + 1; temp := Tail_Of(temp); end loop; end; end if; return sa; end Create; function Create ( sa : Solution_Array ) return Solution_List is sl : Solution_List; begin if sa'first <= sa'last then declare n : natural := sa(sa'first).n; sol : Solution(n) := sa(sa'first).all; l : Link_to_Solution := new Solution'(sol); last,tmp : Solution_List; begin Construct(l,sl); last := sl; for i in (sa'first+1)..sa'last loop sol := sa(i).all; l := new Solution'(sol); Construct(l,tmp); Swap_Tail(last,tmp); last := Tail_Of(last); end loop; end; end if; return sl; end Create; -- SELECTORS : function Equal ( s1,s2 : Solution; tol : double_float ) return boolean is begin if (s1.t /= s2.t) or else (s1.n /= s2.n) then return false; else return Is_Equal(s1.v,s2.v,tol); end if; end Equal; function Equal ( s1,s2 : Solution_List; tol : double_float ) return boolean is begin if Is_Null(s1) and Is_Null(s2) then return true; elsif Is_Null(s1) or Is_Null(s2) then return false; else declare temp1 : Solution_List := s1; temp2 : Solution_List := s2; begin While not Is_Null(temp1) and not Is_Null(s2) loop if not Equal(Head_Of(temp1).all,Head_Of(temp2).all,tol) then return false; else temp1 := Tail_Of(temp1); temp2 := Tail_Of(temp2); end if; end loop; if Is_Null(temp1) and Is_Null(temp2) then return true; else return false; end if; end; end if; end Equal; function Equal ( s1,s2 : Solution_Array; tol : double_float ) return boolean is begin if s1'first /= s2'first then return false; elsif s1'last /= s2'last then return false; else for i in s1'range loop if not Equal(s1(i).all,s2(i).all,tol) then return false; end if; end loop; end if; return true; end Equal; procedure Equals ( sols : in out Solution_List; flag : in natural; tol : in double_float; same : out boolean ) is begin same := false; if not Is_Null(sols) then declare n : natural := Head_Of(sols).n; i : natural := 1; s1,s2 : Solution(n); temp : Solution_List := sols; begin while not Is_Null(temp) loop s1 := Head_Of(temp).all; for j in (i+1)..Length_Of(sols) loop s2 := Get(sols,j); if Equal(s1,s2,tol) then same := true; Change_Multiplicity(sols,i,flag); Change_Multiplicity(sols,j,flag); end if; end loop; temp := Tail_Of(temp); i := i + 1; end loop; end; end if; end Equals; procedure Equals ( sa : in Solution_Array; x : in Vector; i : in natural; tol : in double_float; j : in out natural ) is eq : boolean; begin while j < i loop eq := true; for k in x'range loop if modulus(sa(j).v(k) - x(k)) > tol then eq := false; end if; exit when not eq; end loop; exit when eq; j := j + 1; end loop; end Equals; function Number ( sols : Solution_List; flag : natural ) return natural is res : natural := 0; begin if Is_Null(sols) then return res; else declare temp : Solution_List := sols; ls : Link_to_Solution; begin while not Is_Null(temp) loop if Head_Of(temp).m = flag then res := res + 1; end if; temp := Tail_Of(temp); end loop; end; return res; end if; end Number; function Is_In ( sols : Solution_List; s : Solution; tol : double_float ) return boolean is tmp : Solution_List := sols; begin while not Is_Null(tmp) loop if Equal(Head_Of(tmp).all,s,tol) then return true; else tmp := Tail_Of(tmp); end if; end loop; return false; end Is_In; function Is_In ( sa : Solution_Array; s : Solution; tol : double_float ) return boolean is begin for i in sa'range loop if Equal(sa(i).all,s,tol) then return true; end if; end loop; return false; end Is_In; function Get ( sols : Solution_List; pos : positive ) return Solution is begin if pos <= Length_Of(sols) then declare temp : Solution_List := sols; count : natural := 1; begin while not Is_Null(temp) loop if count = pos then return Head_Of(temp).all; else temp := Tail_Of(temp); count := count + 1; end if; end loop; end; end if; declare s : Solution(0); begin return s; end; end Get; -- CONSTRUCTORS : procedure Copy ( s1 : in Solution_List; s2 : in out Solution_List ) is begin Clear(s2); if not Is_Null(s1) then declare temp : Solution_List := s1; last : Solution_List; n : natural := Head_Of(s1).n; sol : Solution(n) := Head_Of(temp).all; begin declare l : Link_to_Solution := new Solution'(sol); begin Construct(l,s2); end; last := s2; temp := Tail_Of(temp); while not Is_Null(temp) loop sol := Head_Of(temp).all; declare l : Link_to_Solution := new Solution'(sol); tmp : Solution_List; begin Construct(l,tmp); Swap_Tail(last,tmp); end; last := Tail_Of(last); temp := Tail_Of(temp); end loop; end; end if; end Copy; procedure Copy ( s1 : in Solution_Array; s2 : in out Solution_Array ) is begin Clear(s2); for i in s1'range loop s2(i) := new Solution'(s1(i).all); end loop; end Copy; procedure Append ( first,last : in out Solution_List; s : in Solution ) is ls : Link_to_Solution := new Solution'(s); begin if Is_Null(first) then Construct(ls,first); last := first; else declare tmp : Solution_List; begin Construct(ls,tmp); Swap_Tail(last,tmp); last := Tail_Of(last); end; end if; end Append; procedure Add ( sols : in out Solution_List; s : in Solution ) is last,temp,tmp : Solution_List; ls : Link_to_Solution := new Solution'(s); begin if Is_Null(sols) then Construct(ls,sols); else temp := sols; while not Is_Null(temp) loop last := temp; temp := Tail_Of(temp); end loop; Construct(ls,tmp); Swap_Tail(last,tmp); end if; end Add; procedure Add ( sols : in out Solution_List; s : in Solution; tol : in double_float; other : out natural ) is last,temp,tmp : Solution_List; ls : Link_to_Solution := new Solution'(s); s2 : Solution(s.n); count : natural := 1; begin other := 0; if Is_Null(sols) then Construct(ls,sols); else temp := sols; while not Is_Null(temp) loop s2 := Head_Of(temp).all; if Equal(s,s2,tol) then other := count; Clear(ls); return; else last := temp; temp := Tail_Of(temp); count := count + 1; end if; end loop; Construct(ls,tmp); Swap_Tail(last,tmp); end if; end Add; procedure Change ( sols : in out Solution_List; pos : in positive; s : in Solution; tol : in double_float; other : out natural ) is begin if pos <= Length_Of(sols) then declare temp : Solution_List := sols; ls : Link_to_Solution; begin other := 0; for i in 1..Length_Of(temp) loop ls := Head_Of(temp); if i = pos then ls.v := s.v; ls.m := s.m; ls.t := s.t; Set_Head(temp,ls); return; elsif Equal(s,ls.all,tol) then other := i; return; end if; temp := Tail_Of(temp); end loop; end; end if; end Change; procedure Set_Continuation_Parameter ( sols : in out Solution_List; t : in double_complex ) is tmp : Solution_List := sols; begin while not Is_Null(tmp) loop declare ls : Link_to_Solution := Head_Of(tmp); begin ls.t := t; Set_Head(tmp,ls); end; tmp := Tail_Of(tmp); end loop; end Set_Continuation_Parameter; procedure Change_Multiplicity ( sols : in out Solution_List; pos : in positive; m : in natural ) is begin if pos <= Length_Of(sols) then declare temp : Solution_List := sols; ls : Link_to_Solution; begin for i in 1..(pos-1) loop temp := Tail_Of(temp); end loop; ls := Head_Of(temp); ls.m := m; Set_Head(temp,ls); end; end if; end Change_Multiplicity; procedure Remove ( sols : in out Solution_List; pos : in positive ) is first,second,temp : Solution_List; ls : Link_to_Solution; begin if pos <= Length_Of(sols) then if pos = 1 then if Is_Null(Tail_Of(sols)) then Clear(sols); else ls := Head_Of(sols); Clear(ls); sols := Tail_Of(sols); end if; else second := sols; for i in 1..(pos-1) loop first := second; second := Tail_Of(first); end loop; ls := Head_Of(second); Clear(ls); temp := Tail_Of(second); Swap_Tail(first,temp); end if; end if; end Remove; procedure Delete ( sols : in out Solution_List ) is continue : boolean; begin continue := true; -- looking for the first element in sols that can stay : while not Is_Null(sols) and continue loop declare ls : Link_to_Solution := Head_Of(sols); begin if To_Be_Removed(ls.m) then Clear(ls); sols := Tail_Of(sols); else continue := false; end if; end; end loop; if not Is_Null(sols) then -- first element of sols can stay in the list declare first,second : Solution_List; begin first := sols; second := Tail_Of(first); while not Is_Null(second) loop declare ls : Link_to_Solution := Head_Of(second); temp : Solution_List; begin if To_Be_Removed(ls.m) then Clear(ls); temp := Tail_Of(second); Swap_Tail(first,temp); end if; end; first := second; second := Tail_Of(first); end loop; end; end if; end Delete; procedure Remove_All ( sols : in out Solution_List; flag : in natural ) is continue : boolean; begin continue := true; -- looking for the first element in sols that can stay : while not Is_Null(sols) and continue loop declare ls : Link_to_Solution := Head_Of(sols); begin if ls.m = flag then Clear(ls); sols := Tail_Of(sols); else continue := false; end if; end; end loop; if not Is_Null(sols) then -- first element of s can stay in the list declare first,second : Solution_List; begin first := sols; second := Tail_Of(first); while not Is_Null(second) loop declare ls : Link_to_Solution := Head_Of(second); temp : Solution_List; begin if ls.m = flag then Clear(ls); temp := Tail_Of(second); Swap_Tail(first,temp); end if; end; first := second; second := Tail_Of(first); end loop; end; end if; end Remove_All; -- DESTRUCTORS : procedure Clear ( ls : in out Link_to_Solution ) is procedure free is new unchecked_deallocation(Solution,Link_to_Solution); begin free(ls); end Clear; procedure Shallow_Clear ( sl : in out Solution_List ) is begin List_of_Solutions.Clear(List_of_Solutions.List(sl)); end Shallow_Clear; procedure Deep_Clear ( sl : in out Solution_List ) is temp : Solution_List := sl; ls : Link_to_Solution; begin while not Is_Null(temp) loop ls := Head_Of(temp); Clear(ls); temp := Tail_Of(temp); end loop; Shallow_Clear(sl); end Deep_Clear; procedure Clear ( sa : in out Solution_Array ) is begin for i in sa'range loop Clear(sa(i)); end loop; end Clear; end Solutions; SHAR_EOF fi # end of overwriting check if test -f 'solutions.ads' then echo shar: will not over-write existing file "'solutions.ads'" else cat << "SHAR_EOF" > 'solutions.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; with Lists; with Complex_Numbers,Complex_Vectors; use Complex_Numbers,Complex_Vectors; package Solutions is -- DESCRIPTION : -- This package provides an abstraction of a list and an array -- of solutions. -- DATA STRUCTURES : type Solution ( n : natural ) is record t : double_complex; -- continuation parameter t m : natural; -- multiplicity of the solution v : Vector(1..n); -- the solution err : double_float; -- error = |correction| from Newton rco : double_float; -- inverse of condition number res : double_float; -- norm of residual vector end record; type Link_to_Solution is access Solution; package List_of_Solutions is new Lists (Item => Link_to_Solution); type Solution_List is new List_of_Solutions.List; type Solution_Array is array ( positive range <> ) of Link_to_Solution; -- CREATORS : function Create ( sl : Solution_List ) return Solution_Array; function Create ( sa : Solution_Array ) return Solution_List; -- DESCRIPTION : -- Allows the transition from a list to an array and vice versa. -- SELECTORS : function Equal ( s1,s2 : Solution; tol : double_float ) return boolean; -- DESCRIPTION : -- Returns true if for each component -- |s1.v(i)-s2.v(i)|/|s1.v(i)| < tol, for i in s1.v'range. function Equal ( s1,s2 : Solution_List; tol : double_float ) return boolean; function Equal ( s1,s2 : Solution_Array; tol : double_float ) return boolean; -- DESCRIPTION : -- Returns true if both lists of arrays are equal to each other, upon -- the given tolerance for the relative error. procedure Equals ( sols : in out Solution_List; flag : in natural; tol : in double_float; same : out boolean ); -- DESCRIPTION : -- The solutions that are equal to each other are marked with a flag. procedure Equals ( sa : in Solution_Array; x : in Vector; i : in natural; tol : in double_float; j : in out natural ); -- DESCRIPTION : -- Compares the first i-1 vectors in sa with x. -- ON ENTRY : -- sa a solution array, containing at least i-1 elements; -- x a vector; -- i an index, normally the entry of x in sa; -- tol tolerance for relative error on two vectors; -- j must be equal to sa'first. -- ON RETURN : -- j the entry for which sa(j) equals x. function Number ( sols : Solution_List; flag : natural ) return natural; -- DESCRIPTION : -- Returns the number of solutions in the list with a multiplicity -- equal to flag. function Is_In ( sols : Solution_List; s : Solution; tol : double_float ) return boolean; function Is_In ( sa : Solution_Array; s : Solution; tol : double_float ) return boolean; -- DESCRIPTION : -- Returns true if the solution s belongs to the list or to the array. function Get ( sols : Solution_List; pos : positive ) return Solution; -- DESCRIPTION : -- Returns the solution at the given position. -- REQUIRED : pos <= Length_Of(sols). -- CONSTRUCTORS : procedure Copy ( s1 : in Solution_List; s2 : in out Solution_List ); procedure Copy ( s1 : in Solution_Array; s2 : in out Solution_Array ); -- DESCRIPTION : -- Makes a deep copy of the list or the array of solutions. procedure Append ( first,last : in out Solution_List; s : in Solution ); -- DESCRIPTION : -- The solution sol is appended to the list first; -- last is a pointer to the last element of the list first. procedure Add ( sols : in out Solution_List; s : in Solution ); -- DESCRIPTION : -- The solution sol is appended to the list sols. procedure Add ( sols : in out Solution_List; s : in Solution; tol : in double_float; other : out natural ); -- DESCRIPTION : -- Append the solution to the list, if it does not already belong to it. procedure Change ( sols : in out Solution_List; pos : in positive; s : in Solution; tol : in double_float; other : out natural ); -- DESCRIPTION : -- Changes the solution at the given position into s, if the solution -- does not already occur. -- REQUIRED : pos <= Length_Of(sols). procedure Set_Continuation_Parameter ( sols : in out Solution_List; t : in double_complex ); -- DESCRIPTION : -- All solutions in the list will be given the continuation parameter t. procedure Change_Multiplicity ( sols : in out Solution_List; pos : in positive; m : in natural ); -- DESCRIPTION : -- Changes the multiplicity of the solution with the given position -- into m. -- REQUIRED : pos <= Length_Of(sols). procedure Remove ( sols : in out Solution_List; pos : in positive ); -- DESCRIPTION : -- Removes the solution with given position from the list. -- REQUIRED : pos <= Length_Of(sols). generic with function To_Be_Removed ( flag : in natural ) return boolean; procedure Delete ( sols : in out Solution_List ); -- DESCRIPTION : -- Removes all solutions in s for which To_Be_Removed(s.m) holds. procedure Remove_All ( sols : in out Solution_List; flag : in natural ); -- DESCRIPTION : -- All solutions with a multiplicity equal to flag are removed. -- DESTRUCTORS : procedure Clear ( sa : in out Solution_Array ); procedure Clear ( ls : in out Link_to_Solution ); procedure Shallow_Clear ( sl : in out Solution_List ); procedure Deep_Clear ( sl : in out Solution_List ); -- DESCRIPTION : -- Deallocation of the occupied memory space. -- A shallow clear only deallocates the pointers, -- so that the data may still be accessible by sharing, -- whereas a deep clear also makes the data inaccessible. end Solutions; SHAR_EOF fi # end of overwriting check if test -f 'solutions_io.adb' then echo shar: will not over-write existing file "'solutions_io.adb'" else cat << "SHAR_EOF" > 'solutions_io.adb' with integer_io; use integer_io; with Floating_Point_Numbers; with Communications_with_User; use Communications_with_User; with Complex_Numbers; use Complex_Numbers; with Complex_Numbers_io; use Complex_Numbers_io; with Complex_Vectors_io; use Complex_Vectors_io; with Symbol_Table; use Symbol_Table; package body Solutions_io is use Floating_Point_Numbers.double_float_io; -- INPUT OF SYMBOL : procedure skip_symbol ( file : in file_type ) is -- DESCRIPTION : -- Skips all symbols until a `:' is encountered. c : character; begin loop get(file,c); exit when (c = ':'); end loop; end skip_symbol; function get_symbol ( file : in file_type ) return natural is -- DESCRIPTION : -- Reads a symbol from standard input and returns its number. sb : Symbol := (1..3 => ' '); c : character; begin loop -- skip the spaces get(file,c); exit when c /= ' '; end loop; sb(1) := c; for i in 2..3 loop get(file,c); exit when c = ' '; sb(i) := c; end loop; return Symbol_Table.get(sb); end get_symbol; -- OUTPUT OF A SYMBOL : procedure put_symbol ( file : in file_type; i : in natural ) is -- DESCRIPTION : -- Given the number of the symbol, -- the corresponding symbol will be written. sb : Symbol := Get(i); begin for k in sb'range loop exit when sb(k) = ' '; put(file,sb(k)); end loop; end put_symbol; -- INPUT OF A SOLUTION VECTOR : procedure get_vector ( s : in out Solution ) is begin get_vector(Standard_Input,s); end get_vector; procedure get_vector ( file : in file_type; s : in out Solution ) is ind : natural; begin if Symbol_Table.Number < s.n then for i in s.v'range loop skip_symbol(file); get(file,s.v(i)); end loop; else for i in s.v'range loop ind := get_symbol(file); skip_symbol(file); get(file,s.v(ind)); end loop; end if; end get_vector; -- INPUT OF A SOLUTION : procedure get ( s : in out Solution ) is begin get(Standard_Input,s); end get; procedure get ( file : in file_type; s : in out Solution ) is c : character; begin get(file,c); get(file,c); get(file,c); get(file,c); get(file,s.t); get(file,c); get(file,c); get(file,c); get(file,c); get(file,s.m); if not End_of_Line(file) then get(file,c); Skip_line(file); -- skip information on this line end if; get(file,c); skip_line(file); get_vector(file,s); end get; -- OUTPUT OF A SOLUTION VECTOR : procedure put_vector ( s : in Solution ) is begin put_vector(Standard_Output,s); end put_vector; procedure put_vector ( file : in file_type; s : in Solution ) is begin if Symbol_Table.Number < s.n then for i in s.v'range loop put(file," x"); put(file,i,1); put(file," : "); put(file,s.v(i)); new_line(file); end loop; else for i in s.v'range loop put(file,' '); put_symbol(file,i); put(file," : "); put(file,s.v(i)); new_line(file); end loop; end if; end put_vector; -- OUTPUT OF A SOLUTION : procedure put ( s : in Solution ) is begin put(Standard_Output,s); end put; procedure put ( file : in file_type; s : in Solution ) is begin put(file,"t : "); put(file,s.t); new_line(file); put(file,"m : "); put(file,s.m,1); new_line(file); put_line(file,"the solution for t :"); put_vector(file,s); put(file,"=="); put(file," err : "); put(file,s.err,2,3,3); put(file," ="); put(file," rco : "); put(file,s.rco,2,3,3); put(file," ="); put(file," res : "); put(file,s.res,2,3,3); put(file," ="); end put; -- INPUT OF A LIST OF SOLUTIONS : procedure get ( len,n : in natural; sols,sols_last : in out Solution_List ) is begin get(Standard_Input,sols,sols_last); end get; procedure get ( len,n : in natural; sols : in out Solution_List ) is begin get(Standard_Input,len,n,sols); end get; procedure get ( sols,sols_last : in out Solution_List ) is begin get(Standard_Input,sols,sols_last); end get; procedure get ( sols : in out Solution_List ) is begin get(Standard_Input,sols); end get; procedure get ( file : in file_type; len,n : in natural; sols,sols_last : in out Solution_List ) is s : Solution(n); c : character; begin for i in 1..len loop get(file,c); skip_line(file); -- skip opening bar get(file,c); skip_line(file); -- skip line with solution number get(file,s); Append(sols,sols_last,s); end loop; get(file,c); skip_line(file); -- skip closing bar end get; procedure get ( file : in file_type; len,n : in natural; sols : in out Solution_List ) is sols_last : Solution_List; begin get(file,len,n,sols,sols_last); end get; procedure get ( file : in file_type; sols,sols_last : in out Solution_List ) is len,n : natural; begin get(file,len); get(file,n); get(file,len,n,sols,sols_last); end get; procedure get ( file : in file_type; sols : in out Solution_List ) is len,n : natural; begin get(file,len); get(file,n); get(file,len,n,sols); end get; -- OUTPUT OF A LIST OF SOLUTIONS : procedure put_bar ( file : in file_type ) is begin put_line(file, "==========================================================="); end put_bar; procedure put ( sols : in Solution_List ) is begin put(Standard_Output,sols); end put; procedure put ( len,n : in natural; sols : in Solution_List ) is begin put(Standard_Output,len,n,sols); end put; procedure put ( file : in file_type; sols : in Solution_List ) is begin if not Is_Null(sols) then declare count : natural := 1; temp : Solution_List := sols; begin put_bar(file); while not Is_Null(temp) loop put(file,"solution "); put(file,count,1); put(file," :"); new_line(file); put(file,Head_Of(temp).all); put_line(file,"="); -- instead of : put_bar(file); temp := Tail_Of(temp); count := count + 1; end loop; end; end if; end put; procedure put ( file : in file_type; len,n : in natural; sols : in Solution_List ) is begin put(file,len,1); put(file," "); put(file,n,1); new_line(file); put(file,sols); end put; procedure Display_Format is s : array(1..24) of string(1..65); begin s( 1):=" A solution list of a complex polynomial system is denoted by"; s( 2):="the number of solutions and the dimension, followed by a list of"; s( 3):="solutions. The solutions are separated by a banner line,"; s( 4):="followed by their position in the list. "; s( 5):=" A solution consists of the current value of the continuation"; s( 6):="parameter t, its multiplicity (or winding number) m, and the"; s( 7):="solution vector. "; s( 8):=" A solution vector contains as many lines as the dimension. The"; s( 9):="i-th line starts with the symbol that represents the i-th"; s(10):="unknown, followed by the colon `:' and two floating-point numbers"; s(11):="representing respectively the real and imaginary part of the"; s(12):="solution component. "; s(13):=" As example we list the solution list of the regular solution"; s(14):="(1,i) of a 2-dimensional system in the unknowns x and y at t=1. "; s(15):=" "; s(16):="1 2 "; s(17):="================================================================="; s(18):="solution 1 : "; s(19):="t : 1.00000000000000E+00 0.00000000000000E+00 "; s(20):="m : 1 "; s(21):="the solution for t : "; s(22):=" x : 1.00000000000000E+00 0.00000000000000E+00 "; s(23):=" y : 0.00000000000000E+00 1.00000000000000E+00 "; s(24):="================================================================="; for i in s'range loop put_line(s(i)); end loop; end Display_Format; procedure Read ( sols : in out Solution_List ) is file : file_type; begin put_line("Reading the name of the file for the solutions."); Read_Name_and_Open_File(file); get(file,sols); Close(file); exception when others => Close(file); Clear(sols); put_line("INCORRECT FORMAT OF SOLUTION LIST"); Display_Format; new_line; Read(sols); end Read; end Solutions_io; SHAR_EOF fi # end of overwriting check if test -f 'solutions_io.ads' then echo shar: will not over-write existing file "'solutions_io.ads'" else cat << "SHAR_EOF" > 'solutions_io.ads' with text_io; use text_io; with Solutions; use Solutions; package Solutions_io is -- DESCRIPTION : -- This routines provides routines for input and output of solutions. -- FOR SOLUTION VECTORS ONLY : procedure get_vector ( s : in out Solution ); procedure get_vector ( file : in file_type; s : in out Solution ); -- DESCRIPTION : -- The input must contain the solution vector. procedure put_vector ( s : in Solution ); procedure put_vector ( file : in file_type; s : in Solution ); -- DESCRIPTION : -- On the output the solution vector will be written. -- FOR SOLUTIONS : procedure get ( s : in out Solution ); procedure get ( file : in file_type; s : in out Solution ); -- DESCRIPTION : -- The input must contain the following : s.t, s.m and s.v(i), -- a vector of s.n complex numbers procedure put ( s : in Solution ); procedure put ( file : in file_type; s : in Solution ); -- DESCRIPTION : -- On the output the following will be written : -- s.t, s.m and s.v, a vector of s.n complex numbers -- FOR LISTS OF SOLUTIONS : procedure get ( sols : in out Solution_List ); procedure get ( sols,sols_last : in out Solution_List ); procedure get ( len,n : in natural; sols : in out Solution_List ); procedure get ( len,n : in natural; sols,sols_last : in out Solution_List ); procedure get ( file : in file_type; sols : in out Solution_List ); procedure get ( file : in file_type; sols,sols_last : in out Solution_List ); procedure get ( file : in file_type; len,n : in natural; sols : in out Solution_List ); procedure get ( file : in file_type; len,n : in natural; sols,sols_last : in out Solution_List ); -- DESCRIPTION : -- A solution list will be read. If the length len and dimension n -- of the list is not supplied, then they will be read first. -- If the parameter sols_last is supplied, then this parameter contains -- the pointer to the last element of the list on return. -- The solutions should be in the appropriate format. procedure put ( sols : in Solution_List ); procedure put ( len,n : in natural; sols : in Solution_List ); procedure put ( file : in file_type; sols : in Solution_List ); procedure put ( file : in file_type; len,n : in natural; sols : in Solution_List ); -- DESCRIPTION : -- The solutions are written on standard output or on file. -- First the length of the list and the dimension of the solutions -- will be put on file if they are supplied as parameter. -- USER-FRIENDLY ROUTINES : procedure Display_Format; -- DESCRIPTION : -- Displays on screen the formatting rules as on-line help facility. procedure Read ( sols : in out Solution_List ); -- DESCRIPTION : -- Reads the solution list from file, displays the formatting information -- in case of exception and let the user try again. end Solutions_io; SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'Main' then mkdir 'Main' fi cd 'Main' if test -f 'bablphc.adb' then echo shar: will not over-write existing file "'bablphc.adb'" else cat << "SHAR_EOF" > 'bablphc.adb' with text_io; use text_io; with Communications_with_User; use Communications_with_User; with Timing_Package; use Timing_Package; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Solutions; use Solutions; with Scaling; use Scaling; with Black_Box_Root_Counting; with Black_Box_Polynomial_Continuations; use Black_Box_Polynomial_Continuations; procedure bablphc ( infilename,outfilename : in string ) is procedure Read_System ( file : in out file_type; filename : in string; p : in out Link_to_Poly_Sys ) is begin if filename /= "" then Open_Input_File(file,filename); get(file,p); end if; exception when others => put_line("Something is wrong with argument file..."); p := null; return; end Read_System; procedure Timing_Summary ( file : in file_type; roco,hoco,poco,total : in duration ) is b0 : constant string := " ---------------------------------------------------------------------"; b1 : constant string := " | TIMING INFORMATION SUMMARY |"; b2 : constant string := " | root counts | start system | continuation | total time |"; begin put_line(file,b0); put_line(file,b1); put_line(file,b0); put_line(file,b2); put_line(file,b0); put(file," | "); print_hms(file,roco); put(file," | "); print_hms(file,hoco); put(file," | "); print_hms(file,poco); put(file," | "); print_hms(file,total); put_line(file," |"); put_line(file,b0); end Timing_Summary; procedure Main is timer : timing_widget; infile,outfile : file_type; p,q : Link_to_Poly_Sys; rc : natural; sols : Solution_List; roco,hoco,poco,total : duration; begin Read_System(infile,infilename,p); if p = null then new_line; get(p); end if; Create_Output_File(outfile,outfilename); put(outfile,p.all); q := new Poly_Sys(p'range); tstart(timer); Black_Box_Root_Counting(outfile,p.all,rc,q.all,sols,roco,hoco); if rc /= 0 then Scale(p.all); Black_Box_Polynomial_Continuation(infile,outfile,p.all,q.all,sols,poco); end if; tstop(timer); total := Elapsed_User_Time(timer); Close(infile); new_line(outfile); print_times(outfile,timer,"Solving the polynomial system"); new_line(outfile); Timing_Summary(outfile,roco,hoco,poco,total); Close(outfile); end Main; begin Main; end bablphc; SHAR_EOF fi # end of overwriting check if test -f 'bablphc.ads' then echo shar: will not over-write existing file "'bablphc.ads'" else cat << "SHAR_EOF" > 'bablphc.ads' procedure bablphc ( infilename,outfilename : in string ); -- DESCRIPTION : -- This is the main interactive driver for the homotopy continuation -- package for the solution of polynomial systems, in its batch or black -- box version. The arguments are the respective names of input and -- output files. SHAR_EOF fi # end of overwriting check if test -f 'bablroco.adb' then echo shar: will not over-write existing file "'bablroco.adb'" else cat << "SHAR_EOF" > 'bablroco.adb' with text_io; use text_io; with Communications_with_User; use Communications_with_User; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Solutions; use Solutions; with Black_Box_Root_Counting; procedure bablroco ( infilename,outfilename : in string ) is lp,lq : Link_to_Poly_Sys; infile,outfile : file_type; rc : natural; roco,poco : duration; qsols : Solution_List; procedure Read_System ( file : in out file_type; filename : in string ) is begin if filename /= "" then Open_Input_File(file,filename); get(file,lp); end if; exception when others => put_line("Something is wrong with argument file..."); lp := null; return; end Read_System; begin Read_System(infile,infilename); if lp = null then new_line; get(lp); end if; Create_Output_File(outfile,outfilename); put(outfile,lp.all); lq := new Poly_Sys(lp'range); Black_Box_Root_Counting(outfile,lp.all,rc,lq.all,qsols,roco,poco); end bablroco; SHAR_EOF fi # end of overwriting check if test -f 'bablroco.ads' then echo shar: will not over-write existing file "'bablroco.ads'" else cat << "SHAR_EOF" > 'bablroco.ads' procedure bablroco ( infilename,outfilename : in string ); -- DESCRIPTION : -- This is the routine for counting the roots of a polynomial system, -- as called by the central dispatcher, in its batch or black box version. -- The arguments are the names of the input and output file respectively. SHAR_EOF fi # end of overwriting check if test -f 'bablvali.adb' then echo shar: will not over-write existing file "'bablvali.adb'" else cat << "SHAR_EOF" > 'bablvali.adb' with text_io,integer_io; use text_io,integer_io; with Floating_Point_Numbers; use Floating_Point_Numbers; with Timing_Package; use Timing_Package; with Communications_with_User; use Communications_with_User; with File_Operations,Numbers_io; use File_Operations,Numbers_io; with Complex_Vectors; use Complex_Vectors; with Complex_Vectors_io; use Complex_Vectors_io; with Complex_Numbers_io; use Complex_Numbers_io; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Solutions,Solutions_io; use Solutions,Solutions_io; with Root_Refiners; use Root_Refiners; procedure bablvali ( infilename,outfilename : in string ) is use Floating_Point_Numbers.double_float_io; timer : timing_widget; lp : Link_to_Poly_Sys; infile,outfile : file_type; ans : character; n : natural; sysonfile,found : boolean; sols : Solution_List; procedure Read_System ( file : in out file_type; filename : in string ) is begin if filename /= "" then Open(file,in_file,filename); get(file,lp); sysonfile := true; else sysonfile := false; end if; exception when others => put_line("Something is wrong with argument file..."); sysonfile := false; lp := null; return; end Read_System; procedure Refine_Roots is epsxa,epsfa : constant double_float := 10.0**(-8); tolsing : constant double_float := 10.0**(-8); maxit : constant natural := 3; numb : natural := 0; refsols : Solution_List; begin new_line(outfile); put_line(outfile,"ROOT REFINING PARAMETERS"); put(outfile," tolerance for error on the root : "); put(outfile,epsxa,2,3,3); new_line(outfile); put(outfile," tolerance for residual : "); put(outfile,epsfa,2,3,3); new_line(outfile); put(outfile," tolerance for singular roots : "); put(outfile,tolsing,2,3,3); new_line(outfile); put(outfile," maximum number of iterations : "); put(outfile,maxit,2); new_line(outfile); tstart(timer); Reporting_Root_Refiner (outfile,lp.all,sols,refsols,epsxa,epsfa,tolsing,numb,maxit,false); tstop(timer); new_line(outfile); put_line(outfile,"THE SOLUTIONS :"); put(outfile,Length_Of(refsols),Head_Of(refsols).n,refsols); new_line(outfile); print_times(outfile,timer,"Root refining"); end Refine_Roots; begin Read_System(infile,infilename); if lp = null then new_line; put("Is the system on file ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then put_line("Reading the name of the input file."); Read_Name_and_Open_File(infile); get(infile,lp); sysonfile := true; else put("Give the dimension : "); get(n); lp := new Poly_Sys(1..n); put("Give "); put(n,1); put(" "); put(n,1); put_line("-variate polynomials :"); get(n,lp.all); skip_line; sysonfile := false; end if; end if; Create_Output_File(outfile,outfilename); put(outfile,lp.all); if sysonfile then Scan_and_Skip(infile,"SOLUTIONS",found); if found then get(infile,sols); end if; Close(infile); else found := false; end if; if not found then new_line; Read(sols); end if; Refine_Roots; end bablvali; SHAR_EOF fi # end of overwriting check if test -f 'bablvali.ads' then echo shar: will not over-write existing file "'bablvali.ads'" else cat << "SHAR_EOF" > 'bablvali.ads' procedure bablvali ( infilename,outfilename : in string ); -- DESCRIPTION : -- This is the routine for validating the solutions of a polynomial system, -- as called by the central dispatcher, in its batch or black box version. -- The arguments are the names of the input and output file respectively. SHAR_EOF fi # end of overwriting check if test -f 'black_box_root_counting.adb' then echo shar: will not over-write existing file "'black_box_root_counting.adb'" else cat << "SHAR_EOF" > 'black_box_root_counting.adb' with integer_io; use integer_io; with Timing_Package; use Timing_Package; with Communications_with_User; use Communications_with_User; with Integer_Vectors; use Integer_Vectors; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Solutions_io; use Solutions_io; with Total_Degree_Start_Systems; use Total_Degree_Start_Systems; with Partitions_of_Sets_Of_Unknowns; use Partitions_of_Sets_of_Unknowns; with Partitions_of_Sets_Of_Unknowns_io; use Partitions_of_Sets_of_Unknowns_io; with m_Homogeneous_Bezout_Numbers; use m_Homogeneous_Bezout_Numbers; with m_Homogeneous_Start_Systems; use m_Homogeneous_Start_Systems; with Set_Structure,Set_Structure_io; with Degree_Sets_Tables; use Degree_Sets_Tables; with Random_Product_System; with Construct_Random_Product_Start_System; use Construct_Random_Product_Start_System; with Integer_Mixed_Subdivisions; use Integer_Mixed_Subdivisions; with Black_Box_Mixed_Volume_Computations; use Black_Box_Mixed_Volume_Computations; procedure Black_Box_Root_Counting ( file : in out file_type; p : in Poly_Sys; rc : out natural; q : out Poly_Sys; qsols : out Solution_List; rocotime,hocotime : out duration ) is function Set_Structure_Bound ( p : Poly_Sys ) return natural is begin Construct_Random_Product_Start_System.Build_Set_Structure(p); return Permanent(Degree_Sets_Tables.Create); end Set_Structure_Bound; procedure Count_Roots ( file : in file_type; p : in Poly_Sys; tode,mhbz,setb,mivo : out natural; zz : out Partition; nz : out natural; lifsup : out Link_to_Array_of_Lists; mix : out Link_to_Vector; mixsub : out Mixed_Subdivision ) is -- DESCRIPTION : -- Computes four different root counts for the system p. -- ON ENTRY : -- file output file; -- p a polynomial system. -- ON RETURN : -- tode total degree; -- mhbz m-homogeneous Bezout number; -- setb bound based on set structure; -- mivo mixed volume; -- zz partition used to compute mhbz; -- nz number of sets in partition zz; -- lifsup lifted supports of the system; -- mix type of mixture; -- mixsub mixed subdivision used to compute mivo. timer : timing_widget; n : constant natural := p'length; d,bz,m,bs,mv : natural; z : Partition(1..n); begin tstart(timer); d := Total_Degree(p); PB(p,bz,m,z); bs := Set_Structure_Bound(p); Black_Box_Mixed_Volume_Computation(p,mix,lifsup,mixsub,mv); tstop(timer); new_line(file); put_line(file,"ROOT COUNTS :"); new_line(file); put(file,"total degree : "); put(file,d,1); new_line(file); put(file,m,1); put(file,"-homogeneous Bezout number : "); put(file,bz,1); new_line(file); put(file," with partition : "); put(file,z(1..m)); new_line(file); put(file,"generalized Bezout number : "); put(file,bs,1); new_line(file); put_line(file," based on the set structure :"); Set_Structure_io.put(file); put(file,"mixed volume : "); put(file,mv,1); new_line(file); new_line(file); print_times(file,timer,"Root Counting"); tode := d; mhbz := bz; setb := bs; mivo := mv; zz := z; nz := m; rocotime := Elapsed_User_Time(timer); end Count_Roots; function Is_Minimum ( a,b,c,x : natural ) return boolean is -- DESCRIPTION : -- Returns true if x <= a, x <= b, and x <= c. begin return (x <= a) and (x <= b) and (x <= c); end Is_Minimum; procedure Construct_Start_System ( file : in file_type; p : in Poly_Sys; d,bz,bs,mv : in natural; z : in Partition; mix : in Vector; lifted : in Array_of_Lists; mixsub : in Mixed_Subdivision; roco : out natural; qq : in out Poly_Sys; qqsols : in out Solution_List ) is -- DESCRIPTION : -- Constructs a start system for the minimal root count and least -- amount of work. -- ON ENTRY : -- file output file; -- p polynomial system; -- d total degree; -- bz m-homogeneous Bezout number; -- bs Bezout number based on set structure; -- mv mixed volume; -- z partition that corresponds with bz; -- mix type of mixture of the supports; -- mixsub mixed subdivision used to computed mv. -- ON RETURN : -- roco minimum(d,bz,bs,mv); -- qq start system; -- qqsols solutions of qq. timer : timing_widget; n : constant natural := p'length; nl : natural; begin new_line(file); tstart(timer); if Is_Minimum(bz,bs,mv,d) then put_line(file,"START SYSTEM BASED ON TOTAL DEGREE :"); roco := d; Start_System(p,qq,qqsols); elsif Is_Minimum(d,bs,mv,bz) then put(file,z'length,1); put_line(file,"-HOMOGENEOUS START SYSTEM :"); roco := bz; m_Homogeneous_Start_System(p,z,qq,qqsols); elsif Is_Minimum(d,bz,mv,bs) then put_line(file,"LINEAR-PRODUCT START SYSTEM : "); roco := bs; Random_Product_System.Init(n); Build_Random_Product_System(n); qq := Random_Product_System.Polynomial_System; Random_Product_System.Solve(qqsols,nl); Set_Structure.Clear; Random_Product_System.Clear; else put_line(file,"RANDOM COEFFICIENT START SYSTEM :"); Black_Box_Polyhedral_Continuation (p,mix,lifted,mixsub,qq,qqsols); end if; tstop(timer); new_line(file); put_line(file,qq); new_line(file); put_line(file,"START SOLUTIONS : "); new_line(file); put(file,Length_Of(qqsols),Head_Of(qqsols).n,qqsols); new_line(file); print_times(file,timer,"Construction of Start System"); hocotime := Elapsed_User_Time(timer); end Construct_Start_System; procedure Main is d,bz,bs,mv : natural; z : partition(p'range); nz : natural; mix : Integer_Vectors.Link_to_Vector; mixsub : Mixed_Subdivision; lifsup : Link_to_Array_of_Lists; qq : Poly_Sys(p'range); qqsols : Solution_List; begin Count_Roots(file,p,d,bz,bs,mv,z,nz,lifsup,mix,mixsub); Construct_Start_System (file,p,d,bz,bs,mv,z(1..nz),mix.all,lifsup.all,mixsub,rc,qq,qqsols); q := qq; qsols := qqsols; Clear(z); Clear(mix); Deep_Clear(lifsup); Deep_Clear(mixsub); end Main; begin Main; end Black_Box_Root_Counting; SHAR_EOF fi # end of overwriting check if test -f 'black_box_root_counting.ads' then echo shar: will not over-write existing file "'black_box_root_counting.ads'" else cat << "SHAR_EOF" > 'black_box_root_counting.ads' with text_io; use text_io; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Solutions; use Solutions; procedure Black_Box_Root_Counting ( file : in out file_type; p : in Poly_Sys; rc : out natural; q : out Poly_Sys; qsols : out Solution_List; rocotime,hocotime : out duration ); -- DESCRIPTION : -- Calculates four different root counts: total degree, m-homogeneous -- Bezout number, generalized Bezout number based on set structure, -- and mixed volume. Heuristics are used for the Bezout numbers. -- Returns the start system with lowest root count and least amount -- of work, which means that linear-product start systems are prefered, -- when Bezout numbers equal the mixed volume. -- ON ENTRY : -- file must be opened for output; -- p a polynomial system. -- ON RETURN : -- rc root count, Bezout number or mixed volume; -- q start system; -- qsols solutions of q, Length_Of(qsols) = rc; -- rocotime elapsed user cpu time for computation of the root counts; -- hocotime elapsed user cpu time for construction of start system. SHAR_EOF fi # end of overwriting check if test -f 'dispatch.adb' then echo shar: will not over-write existing file "'dispatch.adb'" else cat << "SHAR_EOF" > 'dispatch.adb' with text_io; use text_io; with Unix_Command_Line; with mainscal,mainred; with mainroco,bablroco; with bablpoco,mainpoco; with mainsmvc,babldmvc; with mainphc,bablphc; with mainvali,bablvali; procedure Dispatch is -- BANNERS WITH INFORMATION TO START DIALOGUE WITH USER : welcome : constant string := "Welcome to PHC (Polynomial Homotopy Continuation) Version 1.0."; author : constant string := "Author is Jan Verschelde (E-mail: na.jverschelde@na-net.ornl.gov)."; scalban : constant string := "Equation/variable Scaling on polynomial system and solution list."; reduban : constant string := "Linear and nonlinear Reduction w.r.t the total degree of the system."; rocoban : constant string := "Root counting and Construction of product and polyhedral start systems."; mvcban : constant string := "Mixed-Volume Computation by four different lifting strategies."; pocoban : constant string := "Polynomial Continuation defined by a homotopy in one parameter."; valiban : constant string := "Validation, refinement and purification of computed solution lists."; -- AVAILABLE OPTIONS : options : constant string := "sdpmrvb"; -- s : scal => scaling of a polynomial system -- d : redu => reduction w.r.t. the total degree -- p : poco => polynomial continuation -- r : roco => root counting methods -- m : mvc => mixed-volume computation -- v : vali => validation of solutions -- b : batch or black box processing option1,option2 : character; posi : natural := 0; argc : natural := Unix_Command_Line.Number_of_Arguments; -- UTILITIES FOR PROCESSING THE ARGUMENTS AND OPTIONS : function Read_Argument ( k : in natural ) return string is -- DESCRIPTION : -- Reads the kth argument from the command line. -- An argument is a string not proceeded by a `-' character. -- The empty string is returned when there is no argument. null_string : constant string := ""; cnt : natural := 0; begin if argc >= 1 then for i in 1..argc loop declare s : constant string := Unix_Command_Line.Argument(i); begin if s(1) /= '-' then cnt := cnt + 1; if k = cnt then return s; end if; end if; end; end loop; end if; return null_string; end Read_Argument; function Position ( c : character; s : string ) return natural is -- DESCRIPTION : -- If the the string contains the character c, then its position -- in the string will be returned. Otherwise s'first-1 will be returned. begin for i in s'range loop if s(i) = c then return i; end if; end loop; return s'first-1; end Position; procedure Read_Next_Option ( pos : in out natural; legal : in string; option : out character ) is -- DESCRIPTION : -- Reads the next option from the command line arguments. -- ON ENTRY : -- pos position in the command line of the last option -- that has been read; -- legal string which contains all legal options. -- ON RETURN : -- pos the position in the command line of the last option read; -- option is blank when no legal option could be read, otherwise it -- contains the next legal option. res : character := ' '; start : natural := pos+1; begin if argc >= 1 then for i in start..argc loop declare s : constant string := Unix_Command_Line.Argument(i); begin if s(1) = '-' then pos := Position(s(2),legal); if pos >= legal'first then res := legal(pos); else put("The option `"); put(s); put_line("' is not recognised. Will ignore it..."); end if; end if; end; pos := i; exit when (res /= ' '); end loop; end if; option := res; end Read_Next_Option; -- DISPATCHING ACCORDING TO OPTIONS : procedure Dispatcher ( infile,outfile : in string ) is begin case option1 is when 'b' => Read_Next_Option(posi,options,option2); case option2 is when 's' => mainscal(infile,outfile); when 'd' => mainred(infile,outfile); when 'r' => bablroco(infile,outfile); when 'm' => babldmvc(infile,outfile); when 'p' => bablpoco(infile,outfile); when 'v' => bablvali(infile,outfile); when others => bablphc(infile,outfile); end case; when 's' => put_line(welcome); put_line(scalban); mainscal(infile,outfile); when 'd' => put_line(welcome); put_line(reduban); mainred(infile,outfile); when 'r' => Read_Next_Option(posi,options,option2); case option2 is when 'b' => bablroco(infile,outfile); when others => put_line(welcome); put_line(rocoban); mainroco(infile,outfile); end case; when 'm' => Read_Next_Option(posi,options,option2); case option2 is when 'b' => babldmvc(infile,outfile); when others => put_line(welcome); put_line(mvcban); mainsmvc(infile,outfile); end case; when 'p' => Read_Next_Option(posi,options,option2); case option2 is when 'b' => bablpoco(infile,outfile); when others => put_line(welcome); put_line(pocoban); mainpoco(infile,outfile); end case; when 'v' => Read_Next_Option(posi,options,option2); case option2 is when 'b' => bablvali(infile,outfile); when others => put_line(welcome); put_line(valiban); mainvali(infile,outfile); end case; when others => put_line(welcome); mainphc(infile,outfile); end case; end Dispatcher; begin Read_Next_Option(posi,options,option1); declare nullstring : constant string := ""; argument : constant string := Read_Argument(1); outfile : constant string := Read_Argument(2); begin if (argument /= "") and then (argument = outfile) then new_line; put_line("Input and output file have the same name."); put_line("Will ignore output file name..."); Dispatcher(argument,nullstring); else Dispatcher(argument,outfile); end if; end; end Dispatch; SHAR_EOF fi # end of overwriting check if test -f 'dispatch.ads' then echo shar: will not over-write existing file "'dispatch.ads'" else cat << "SHAR_EOF" > 'dispatch.ads' procedure Dispatch; -- DESCRIPTION : -- This procedure scans the arguments of the command line and calls the -- appropriate drivers. -- The arguments may be -- * the names of the input and output file, given in this order; -- * two different options, preceeded by a hyphen (-). -- The first type of option is one of the following: -- s : scal => scaling of the polynomial system -- d : redu => reduce w.r.t. total degree d -- p : poco => polynomial continuation -- r : roco => root counting methods -- m : mvc => mixed volume computation -- v : vali => validation of the solutions -- The second option is the `-b', to switch to batch processing or -- black box computation. This option makes sense in combination with -- the `-p', `-m' and `-v'. -- Calling `phc -b' is equivalent to `phc -b -m' followed by `phc -b -p'. SHAR_EOF fi # end of overwriting check if test -f 'driver_for_own_start_system.adb' then echo shar: will not over-write existing file "'driver_for_own_start_system.adb'" else cat << "SHAR_EOF" > 'driver_for_own_start_system.adb' with integer_io,Solutions_io; use integer_io,Solutions_io; with Communications_with_User; use Communications_with_User; with File_Operations; use File_Operations; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Drivers_for_Polynomial_Continuation; use Drivers_for_Polynomial_Continuation; procedure Driver_for_Own_Start_System ( file : in file_type; p : in Poly_Sys; q : out Poly_Sys; qsols : in out Solution_List ) is qfile : file_type; qq : Poly_Sys(p'range); found : boolean; begin new_line; put_line("Reading the name of the file that contains the start system."); Read_Name_and_Open_File(qfile); get(qfile,qq); Scan_and_Skip(qfile,"SOLUTIONS",found); if found then get(qfile,qsols); else declare sfile : file_type; begin put_line("Reading the name of the file for the solutions."); Read_Name_and_Open_File(sfile); get(sfile,qsols); Close(sfile); end; end if; Close(qfile); Check_Continuation_Parameter(qsols); q := qq; new_line(file); put_line(file,"Start system delivered by user : "); put(file,qq); new_line(file); put_line(file,"with start solutions : "); new_line(file); put(file,qsols); new_line(file); end Driver_for_Own_Start_System; SHAR_EOF fi # end of overwriting check if test -f 'driver_for_own_start_system.ads' then echo shar: will not over-write existing file "'driver_for_own_start_system.ads'" else cat << "SHAR_EOF" > 'driver_for_own_start_system.ads' with text_io,Solutions; use text_io,Solutions; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; procedure Driver_for_Own_Start_System ( file : in file_type; p : in Poly_Sys; q : out Poly_Sys; qsols : in out Solution_List ); -- DESCRIPTION : -- This procedure implements an interactive driver for reading -- a start system delivered by user. -- ON ENTRY : -- file to write diagnostics on; -- p a polynomial system. -- ON RETURN : -- q a start system based on the chosen root count; -- qsols the solutions of q. SHAR_EOF fi # end of overwriting check if test -f 'driver_for_root_counts.adb' then echo shar: will not over-write existing file "'driver_for_root_counts.adb'" else cat << "SHAR_EOF" > 'driver_for_root_counts.adb' with integer_io; use integer_io; with Communications_with_User; use Communications_with_User; with Timing_Package; use Timing_Package; with m_Homogeneous_Bezout_Numbers; use m_Homogeneous_Bezout_Numbers; with Total_Degree_Start_Systems; use Total_Degree_Start_Systems; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; with Solutions,Solutions_io; use Solutions,Solutions_io; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Driver_for_Own_Start_System; with Drivers_for_m_Homogenization; use Drivers_for_m_Homogenization; with Drivers_for_Multi_Homogenization; use Drivers_for_Multi_Homogenization; with Drivers_for_Set_Structures; use Drivers_for_Set_Structures; with Drivers_for_Symmetric_Set_Structures; use Drivers_for_Symmetric_Set_Structures; with Drivers_for_Implicit_Lifting; use Drivers_for_Implicit_Lifting; with Drivers_for_Static_Lifting; use Drivers_for_Static_Lifting; with Drivers_for_Dynamic_Lifting; use Drivers_for_Dynamic_Lifting; with Drivers_for_Symmetric_Lifting; use Drivers_for_Symmetric_Lifting; procedure Driver_for_Root_Counts ( file : in file_type; p,q : in out Poly_Sys; own : in boolean; qsols : in out Solution_List; roco : out natural ) is timer : timing_widget; rc : natural := Total_Degree(p); lpos : List; choice : string(1..2) := " "; method,ans : character := 'y'; noqsols : natural := 0; procedure High_Total_Degree is begin for i in p'range loop put(Degree(p(i)),1); put(file,Degree(p(i)),1); exit when i = p'last; put("*"); put(file,"*"); end loop; new_line; put_line(" this is higher than my largest integer. Be careful..."); end High_Total_Degree; procedure Display_Menu ( rc : in natural ) is m : array(0..9) of string(1..66); begin new_line; put_line("MENU with ROOT COUNTS and Methods to Construct START SYSTEMS :"); put(" 0. exit - current start system is "); if Is_Null(qsols) then put("based on total degree : "); put(rc,1); new_line; else case method is when '1' => put("based on m-homogenization : "); when '2' => put("based on multi-homogenization : "); when '3' => put("based on set structure : "); when '4' => put("based on symmetric set structure : "); when '5' => put("based on Bezout and BKK Bound : "); when '6' => put("based on static mixed-volume computation : "); when '7' => put("based on dynamic mixed-volume computation : "); when '8' => put("based on symmetric mixed-volume computation : "); when '9' => put("your start system : "); when others => put("based on total degree"); end case; put(rc,1); new_line; end if; m(0):="PRODUCT HOMOTOPIES based on DEGREES ------------------------------"; m(1):=" 1. m-homogeneous Bezout number (one partition)"; m(2):=" 2. multi-homogeneous Bezout number (many partitions)"; m(3):=" 3. generalized Bezout number (set structure)"; m(4):=" 4. symmetric generalized Bezout number (symmetric set structure)"; m(5):="POLYHEDRAL HOMOTOPIES based on NEWTON POLYTOPES ------------------"; m(6):=" 5. combination between Bezout and BKK Bound (implicit lifting)"; m(7):=" 6. mixed-volume computation (static lifting)"; m(8):=" 7. incremental mixed-volume computation (dynamic lifting)"; m(9):=" 8. symmetric mixed-volume computation (symmetric lifting)"; for i in m'range loop put_line(m(i)); end loop; if own then put_line ("START SYSTEM DEFINED BY USER -------------------------------------"); put_line(" 9. you can give your own start system"); else put_line ("------------------------------------------------------------------"); end if; end Display_Menu; procedure Display_Info ( method : character ) is -- DESCRIPTION : -- Displays the information that corresponds with the current method. begin new_line; case method is when '0' => Total_Degree_Info; when '1' => m_Homogenization_Info; when '2' => Multi_Homogenization_Info; when '3' => Set_Structure_Info; when '4' => Symmetric_Set_Structure_Info; when '5' => Implicit_Lifting_Info; when '6' => Static_Lifting_Info; when '7' => Dynamic_Lifting_Info; when '8' => Symmetric_Lifting_Info; when others => put_line("No information available."); end case; new_line; end Display_Info; procedure Apply_Method ( method : character ) is -- DESCRIPTION : -- Applies the root count that corresponds with the current method. begin case method is when '0' => Start_System(p,q,qsols); when '1' => Driver_for_m_Homogenization(file,p,rc,q,qsols); when '2' => Driver_for_Multi_Homogenization(file,p,rc,q,qsols); when '3' => Driver_for_Set_Structure(file,p,rc,lpos,q,qsols); when '4' => Driver_for_Symmetric_Random_Product_Systems (file,p,q,qsols,rc,lpos); when '5' => Driver_for_Mixture_Bezout_BKK(file,p,false,q,qsols,rc); when '6' => Driver_for_Mixed_Volume_Computation(file,p,false,q,qsols,rc); when '7' => Driver_for_Dynamic_Mixed_Volume_Computation (file,p,false,q,qsols,rc); when '8' => Driver_for_Symmetric_Mixed_Volume_Computation (file,p,false,q,qsols,rc); when '9' => Driver_for_Own_Start_System(file,p,q,qsols); when others => null; end case; end Apply_Method; begin new_line(file); put_line(file,"ROOT COUNTS :"); new_line(file); put(file,"total degree : "); if rc > 0 then put(file,rc,1); -- put(rc,1); else High_Total_Degree; end if; new_line(file); loop Display_Menu(rc); if own then put("Type a number between 0 and 9," & " eventually preceded by i for info : "); Ask_Alternative(choice,"0123456789",'i'); else put("Type a number between 0 and 8," & " eventually preceded by i for info : "); Ask_Alternative(choice,"012345678",'i'); end if; if choice(1) = 'i' then method := choice(2); Display_Info(method); put("Do you want to apply this root count ? (y/n) "); Ask_Yes_or_No(ans); else method := choice(1); end if; if ans = 'y' then Apply_Method(method); noqsols := Length_Of(qsols); if method /= '0' then new_line; put("The current root count equals "); put(rc,1); put_line("."); if noqsols /= 0 then put("The number of start solutions equals "); put(noqsols,1); put_line("."); end if; put("Do you want to perform more root counting ? (y/n) "); Ask_Yes_or_No(ans); else ans := 'n'; end if; else ans := 'y'; end if; exit when ans /= 'y'; end loop; roco := rc; Clear(lpos); end Driver_for_Root_Counts; SHAR_EOF fi # end of overwriting check if test -f 'driver_for_root_counts.ads' then echo shar: will not over-write existing file "'driver_for_root_counts.ads'" else cat << "SHAR_EOF" > 'driver_for_root_counts.ads' with text_io,Solutions; use text_io,Solutions; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; procedure Driver_for_Root_Counts ( file : in file_type; p,q : in out Poly_Sys; own : in boolean; qsols : in out Solution_List; roco : out natural ); -- DESCRIPTION : -- This procedure implements an interactive driver for several -- root counting methods. -- ON ENTRY : -- file to write diagnostics on; -- p a polynomial system; -- own if true, then the user has the possibility to give -- an own start system. -- ON RETURN : -- p has eventually been made homogeneous; -- q a start system based on the chosen root count; -- qsols the solutions of q; -- roco the root count. SHAR_EOF fi # end of overwriting check if test -f 'driver_for_root_refining.adb' then echo shar: will not over-write existing file "'driver_for_root_refining.adb'" else cat << "SHAR_EOF" > 'driver_for_root_refining.adb' with integer_io; use integer_io; with Timing_Package; use Timing_Package; with Floating_Point_Numbers; use Floating_Point_Numbers; with Root_Refiners,Scaling; use Root_Refiners,Scaling; with Projective_Transformations; use Projective_Transformations; procedure Driver_for_Root_Refining ( file : in file_type; scalp,p : in Poly_Sys; basis : in natural; scalvec : in Link_to_Vector; sols : in out Solution_List ) is numb : natural; epsxa,epsfa : constant double_float := 10.0**(-8); tolsing : constant double_float := 10.0**(-8); timer : timing_widget; len : constant natural := Length_Of(sols); begin if (len /= 0) and then Head_Of(sols).n > p'last then Affine_Transformation(sols); end if; if scalvec /= null then put_line(file,"ROOT REFINING ON THE SCALED SYSTEM :"); tstart(timer); numb := 0; Reporting_Root_Refiner (file,scalp,sols,epsxa,epsfa,tolsing,numb,5,false); tstop(timer); new_line(file); print_times(file,timer,"Root Refining on the Scaled System"); Scale(basis,scalvec.all,sols); end if; tstart(timer); numb := 0; Reporting_Root_Refiner(file,p,sols,epsxa,epsfa,tolsing,numb,5,false); tstop(timer); new_line(file); print_times(file,timer,"Root Refining"); end Driver_for_Root_Refining; SHAR_EOF fi # end of overwriting check if test -f 'driver_for_root_refining.ads' then echo shar: will not over-write existing file "'driver_for_root_refining.ads'" else cat << "SHAR_EOF" > 'driver_for_root_refining.ads' with text_io,Complex_Vectors; use text_io,Complex_Vectors; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Solutions; use Solutions; procedure Driver_for_Root_Refining ( file : in file_type; scalp,p : in Poly_Sys; basis : in natural; scalvec : in Link_to_Vector; sols : in out Solution_List); -- DESCRIPTION : -- This is the driver for root refining after the continuation. -- ON ENTRY : -- file to write diagnostics on; -- scalp the scaled system; -- p the original polynomial system; -- basis used for scaling; -- scalvec vector of coefficients used for scaling; -- sols a list of solutions of scalp. -- ON RETURN : -- sols the corrected solutions. SHAR_EOF fi # end of overwriting check if test -f 'mainphc.adb' then echo shar: will not over-write existing file "'mainphc.adb'" else cat << "SHAR_EOF" > 'mainphc.adb' with text_io,integer_io; use text_io,integer_io; with Communications_with_User; use Communications_with_User; with Timing_Package; use Timing_Package; with Float_Vectors_of_Vectors; with Complex_Numbers,Complex_Vectors; use Complex_Numbers,Complex_Vectors; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Complex_Multivariate_Polynomials; with Homotopy,Solutions; use Solutions; with Drivers_for_Scaling; use Drivers_for_Scaling; with Drivers_for_Reduction; use Drivers_for_Reduction; with Driver_for_Root_Counts; with Driver_for_Homotopy_Construction; with Driver_for_Root_Refining; with Drivers_for_Polynomial_Continuation; use Drivers_for_Polynomial_Continuation; with Bye_Bye_Message; procedure mainphc ( infilename,outfilename : in string ) is outpt : file_type; lp : Link_to_Poly_Sys := null; timer : timing_widget; procedure Display_Options is -- DESCRIPTION : -- Displays an overview of all options on screen. o : array(1..7) of string(1..65); begin put_line("Running in full mode. Note also the following options:"); o(1) := " phc -s : Equation and variable Scaling on system and solutions "; o(2) := " phc -d : Linear and nonlinear Reduction w.r.t. the total degree"; o(3) := " phc -r : Root counting and Construction of start systems "; o(4) := " phc -m : Mixed-Volume Computation by four lifting strategies "; o(5) := " phc -p : Polynomial Continuation by a homotopy in one parameter"; o(6) := " phc -v : Validation, refinement and purification of solutions "; o(7) := " phc -b : Batch or black-box processing "; for i in o'range loop put_line(o(i)); end loop; end Display_Options; procedure Read_System ( filename : in string ) is file : file_type; n : natural; begin if filename /= "" then Open_Input_File(file,filename); get(file,n); lp := new Poly_Sys(1..n); get(file,n,lp.all); Close(file); end if; exception when others => new_line; put("Could not open file with name "); put_line(filename); lp := null; return; end Read_System; begin new_line; Display_Options; -- READ THE INPUT SYSTEM AND OUTPUT FILE Read_System(infilename); if lp = null then new_line; get(lp); end if; Create_Output_File(outpt,outfilename); put(outpt,lp.all); tstart(timer); declare p,q,scalp,projp : Poly_Sys(lp'range); target : double_complex; basis,roco : natural; scalvec : Link_to_Vector; sols : Solution_List; proj : boolean; use Complex_Multivariate_Polynomials; begin p := lp.all; Copy(p,scalp); -- PREPROCESSING : SCALING AND REDUCTION Driver_for_Scaling(outpt,scalp,basis,scalvec); Driver_for_Reduction(outpt,scalp,roco,true); -- APPLY ROOT COUNTING METHODS TO CONSTRUCT A START SYSTEM Copy(scalp,projp); Driver_for_Root_Counts(outpt,projp,q,true,sols,roco); if Length_Of(sols) > 0 then -- CONSTRUCTION OF THE HOMOTOPY Driver_for_Homotopy_Construction(outpt,projp,q,sols,target); -- CONTINUATION proj := (Number_of_Unknowns(p(p'first)) > p'last); if Head_Of(sols).t /= CMPLX(0.0) then Set_Continuation_Parameter(sols,CMPLX(0.0)); end if; Driver_for_Polynomial_Continuation(outpt,sols,proj,target); -- ROOT REFINING Driver_for_Root_Refining(outpt,scalp,p,basis,scalvec,sols); end if; end; tstop(timer); new_line(outpt); print_times(outpt,timer,"solving the polynomial system"); new_line(outpt); put(outpt,Bye_Bye_Message); Close(outpt); end mainphc; SHAR_EOF fi # end of overwriting check if test -f 'mainphc.ads' then echo shar: will not over-write existing file "'mainphc.ads'" else cat << "SHAR_EOF" > 'mainphc.ads' procedure mainphc ( infilename,outfilename : in string ); -- DESCRIPTION : -- This is the main interactive driver for the homotopy continuation -- package for the solution of polynomial system. -- The arguments are the respective names of the input and output files. SHAR_EOF fi # end of overwriting check if test -f 'mainroco.adb' then echo shar: will not over-write existing file "'mainroco.adb'" else cat << "SHAR_EOF" > 'mainroco.adb' with text_io,integer_io,Numbers_io; use text_io,integer_io,Numbers_io; with Communications_with_User; use Communications_with_User; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Solutions,Solutions_io; use Solutions,Solutions_io; with Driver_for_Root_Counts; with Bye_Bye_Message; procedure mainroco ( infilename,outfilename : in string ) is n : natural; inft,outft : file_type; lp : Link_to_Poly_Sys; procedure Read_System ( filename : in string ) is file : file_type; begin if filename /= "" then Open(file,in_file,filename); get(file,n); lp := new Poly_Sys(1..n); get(file,n,lp.all); Close(file); end if; exception when others => new_line; put("Could not open file with name "); put_line(filename); lp := null; return; end Read_System; begin Read_System(infilename); if lp = null then new_line; get(lp); new_line; end if; Create_Output_File(outft,outfilename); put(outft,lp.all); declare q : Poly_Sys(lp'range); qsols : Solution_List; rc : natural; begin Driver_for_Root_Counts(outft,lp.all,q,false,qsols,rc); end; new_line(outft); put(outft,Bye_Bye_Message); Close(outft); end mainroco; SHAR_EOF fi # end of overwriting check if test -f 'mainroco.ads' then echo shar: will not over-write existing file "'mainroco.ads'" else cat << "SHAR_EOF" > 'mainroco.ads' procedure mainroco ( infilename,outfilename : in string ); -- DESCRIPTION : -- This procedure calls the driver to apply various root counting -- methods to the system. The arguments are the respective names -- of the input and output files. SHAR_EOF fi # end of overwriting check if test -f 'mainvali.adb' then echo shar: will not over-write existing file "'mainvali.adb'" else cat << "SHAR_EOF" > 'mainvali.adb' with text_io,integer_io; use text_io,integer_io; with Floating_Point_Numbers; use Floating_Point_Numbers; with Timing_Package; use Timing_Package; with Communications_with_User; use Communications_with_User; with File_Operations,Numbers_io; use File_Operations,Numbers_io; with Complex_Numbers,Complex_Vectors; use Complex_Numbers,Complex_Vectors; with Complex_Vectors_io; use Complex_Vectors_io; with Complex_Numbers_io; use Complex_Numbers_io; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Solutions,Solutions_io; use Solutions,Solutions_io; with Symmetry_Group; use Symmetry_Group; with Symbolic_Symmetry_Group_io; use Symbolic_Symmetry_Group_io; with Drivers_for_Symmetry_Group_io; use Drivers_for_Symmetry_Group_io; with Drivers_for_Orbits_of_Solutions; use Drivers_for_Orbits_of_Solutions; with Root_Refiners; use Root_Refiners; with Driver_for_Winding_Numbers; with valipoco; with Bye_Bye_Message; procedure mainvali ( infilename,outfilename : in string ) is use Floating_Point_Numbers.double_float_io; procedure Display_Validation_Info is -- DESCRIPTION : -- Displays information about available validation methods on screen. i : array(1..9) of string(1..65); begin i(1):="Basic validation consists in the application of Newton's method"; i(2):="on the list of solutions. There are facilities to extract the"; i(3):="generating solutions when the symmetry group is submitted. "; i(4):=" Winding numbers can be computed by homotopy continuation"; i(5):="methods. The user must provide a start system with solutions at"; i(6):="t < 1. "; i(7):=" Polyhedral validation is based on the output file of poco,"; i(8):="where the polyhedral end game was turned on. This validation"; i(9):="puts up a frequency table of computed path directions. "; for k in i'range loop put_line(i(k)); end loop; end Display_Validation_Info; -- READING THE INPUT : procedure Scan_System ( file : in out file_type; filename : in string; lp : in out Link_to_Poly_Sys; sysonfile : out boolean ) is -- DESCRIPTION : -- Checks whether the given file name corresponds to a file with -- a polynomial system in a correct format. -- If this is the case, then sysonfile is true on return and lp -- contains the system. begin if filename /= "" then Open(file,in_file,filename); get(file,lp); sysonfile := true; else sysonfile := false; end if; exception when others => new_line; put("Could not open file with name "); put_line(filename); lp := null; sysonfile := false; return; end Scan_System; procedure Read_System ( file : in out file_type; filename : in string; lp : in out Link_to_Poly_Sys; sysonfile : out boolean ) is -- DESCRIPTION : -- Searches first the system on file, using the given filename. -- If necessary other files will be openend. ans : character; n : natural; begin Scan_System(file,filename,lp,sysonfile); if lp = null then loop new_line; put("Is the system on a file ? (y/n/i=info) "); Ask_Alternative(ans,"yni"); if ans = 'i' then new_line; Complex_Polynomial_Systems_io.Display_Format; new_line; end if; exit when ans /= 'i'; end loop; new_line; if ans = 'y' then put_line("Reading the name of the input file."); Read_Name_and_Open_File(file); get(file,lp); sysonfile := true; n := lp'length; else put("Give the dimension : "); get(n); lp := new Poly_Sys(1..n); put("Give "); put(n,1); put(" "); put(n,1); put_line("-variate polynomials :"); get(n,lp.all); skip_line; -- skip end_of_line symbol sysonfile := false; end if; end if; end Read_System; procedure Scan_Solutions ( file : in out file_type; sysonfile : in boolean; sols : in out Solution_List; found : out boolean ) is fnd : boolean := false; begin if sysonfile then Scan_and_Skip(file,"SOLUTIONS",fnd); if fnd then get(file,sols); end if; Close(file); else fnd := false; end if; found := fnd; exception when others => put_line("Something is wrong with the solutions, will ignore..."); Close(file); found := false; end Scan_Solutions; procedure Read_Solutions ( file : in out file_type; sysonfile : in boolean; sols : in out Solution_List ) is found : boolean; begin Scan_Solutions(file,sysonfile,sols,found); if not found then new_line; put_line("Reading the name of the file for the solutions."); Read_Name_and_Open_File(file); get(file,sols); Close(file); end if; end Read_Solutions; -- ROOT REFINING AUXILIARIES : procedure Default_Root_Refining_Parameters ( epsxa,epsfa,tolsing : out double_float; maxit : out natural; wout : out boolean ) is -- DESCRIPTION : -- Defines the default values for the root refining parameters. begin epsxa := 10.0**(-8); -- precision for correction on x epsfa := 10.0**(-8); -- precision for residual tolsing := 10.0**(-8); -- tolerance on inverse condition numbers maxit := 3; -- maximal number of Newton iterations wout := false; -- if intermediate output is wanted end Default_Root_Refining_Parameters; procedure Put_Root_Refining_Parameters ( file : in file_type; epsxa,epsfa,tolsing : in double_float; maxit : in natural; wout : in boolean ) is -- DESCRIPTION : -- Writes the parameters for the root refiner on file. begin put(file," 1. output during the iterations : "); if wout then put(file," yes"); new_line(file); else put(file," no"); new_line(file); end if; put(file," 2. tolerance for error on the root : "); put(file,epsxa,2,3,3); new_line(file); put(file," 3. tolerance for the residual : "); put(file,epsfa,2,3,3); new_line(file); put(file," 4. tolerance for singular roots : "); put(file,tolsing,2,3,3); new_line(file); put(file," 5. maximum number of iterations : "); put(file,maxit,2); new_line(file); end Put_Root_Refining_Parameters; procedure Menu_Root_Refining_Parameters ( file : in file_type; epsxa,epsfa,tolsing : in out double_float; maxit : in out natural; wout : in out boolean ) is -- DESCRIPTION : -- The user can set the parameters of the root refiner by following -- the menu's. ans : character; begin new_line; loop put_line("MENU with current Settings for the Root Refiner :"); Put_Root_Refining_Parameters(standard_output, epsxa,epsfa,tolsing,maxit,wout); put("Type 1,2,3,4, or 5 to change, type 0 to exit : "); Ask_Alternative(ans,"012345"); exit when ans = '0'; case ans is when '1' => put("Do you want output during the iterations ? (y/n) "); Ask_Yes_or_No(ans); wout := (ans = 'y'); when '2' => put("Give new tolerance for error on the root : "); Read_Double_Float(epsxa); when '3' => put("Give new tolerance for residual : "); Read_Double_Float(epsfa); when '4' => put("Give new tolerance for singular roots : "); Read_Double_Float(tolsing); when '5' => put("Give new maximum number of iterations : "); Read_Natural(maxit); when others => null; end case; end loop; new_line(file); put_line(file,"ROOT REFINING PARAMETERS : "); Put_Root_Refining_Parameters(file,epsxa,epsfa,tolsing,maxit,wout); end Menu_Root_Refining_Parameters; procedure Refine_Roots ( file : in file_type; p : in Poly_Sys; solsfile,invar,allperms,signsym : in boolean; v : in List_of_Permutations; epsxa,epsfa,tolsing : in double_float; maxit : in natural; wout : in boolean; sols,refsols : in out Solution_List ) is -- DESCRIPTION : -- Refines the roots and computes generating solutions when required. -- ON ENTRY : -- file for writing results on; -- p the polynomial system under consideration; -- solsfile whether refined solution have to go to separate file; -- invar whether generating solutions have to be computed; -- allperms whether invariant under all permutations; -- signsym whether there is sign-symmetry; -- v group representation, only needed when invar; -- sols solutions that need to be refined. -- ON RETURN : -- sols solutions after applying some Newton iteration; -- refsols refined solutions, with the exception of failures and -- the non-generating solutions. numit : natural := 0; begin if solsfile or invar then Reporting_Root_Refiner (file,p,sols,refsols,epsxa,epsfa,tolsing,numit,maxit,wout); if invar then Driver_for_Orbits_of_Solutions (file,refsols,v,allperms,signsym,epsxa); end if; else Reporting_Root_Refiner (file,p,sols,epsxa,epsfa,tolsing,numit,maxit,wout); end if; end Refine_Roots; procedure Refine_Roots ( file : in file_type; p : in Poly_Sys; solsfile : in boolean; epsxa,epsfa,tolsing : in double_float; maxit : in natural; wout : in boolean; sols,refsols : in out Solution_List ) is -- DESCRIPTION : -- Root refinement without computing of generating solutions. numit : natural := 0; begin if solsfile then Reporting_Root_Refiner (file,p,sols,refsols,epsxa,epsfa,tolsing,numit,maxit,wout); else Reporting_Root_Refiner (file,p,sols,epsxa,epsfa,tolsing,numit,maxit,wout); end if; end Refine_Roots; procedure End_of_Input_Message is begin new_line; put_line("No more input expected. See output file for results."); new_line; end End_of_Input_Message; -- VALIDATION PROCEDURES : procedure Winding_Validation is -- DESCRIPTION : -- Validation by computing winding numbers by homotopy continuation. lp : Link_to_Poly_Sys; timer : timing_widget; infile,solsft,outfile : file_type; ans : character; sysonfile,solsfile,wout : boolean; sols,refsols: Solution_List; epsxa,epsfa,tolsing : double_float; maxit : natural; begin Read_System(infile,infilename,lp,sysonfile); Create_Output_File(outfile,outfilename); put(outfile,lp.all); Read_Solutions(infile,sysonfile,sols); new_line; put("Do you want the refined solutions on separate file ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then solsfile := true; put_line("Reading the name of the file to write the solutions on."); Read_Name_and_Create_File(solsft); else solsfile := false; end if; Default_Root_Refining_Parameters(epsxa,epsfa,tolsing,maxit,wout); Menu_Root_Refining_Parameters(outfile,epsxa,epsfa,tolsing,maxit,wout); Driver_for_Winding_Numbers(outfile,lp.all,sols); tstart(timer); Refine_Roots(outfile,lp.all,solsfile, epsxa,epsfa,tolsing,maxit,wout,sols,refsols); tstop(timer); if solsfile then put(solsft,Length_Of(refsols),Head_Of(refsols).n,refsols); Close(solsft); end if; new_line(outfile); print_times(outfile,timer,"Root Refinement"); Close(outfile); end Winding_Validation; procedure Weeding_Validation is -- DESCRIPTION : -- Validation by refining the roots and weeding out the solution set. lp : Link_to_Poly_Sys; timer : timing_widget; infile,solsft,outfile : file_type; n,maxit : natural; ans : character; sysonfile,solsfile,wout : boolean; invar,allperms,signsym,allsigns : boolean; g,v : List_of_Permutations; sols,refsols: Solution_List; epsxa,epsfa,tolsing : double_float; begin Read_System(infile,infilename,lp,sysonfile); Create_Output_File(outfile,outfilename); put(outfile,lp.all); Read_Solutions(infile,sysonfile,sols); new_line; put("Is the system invariant under group actions ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then invar := true; n := lp'length; Read_Symmetry_Group(n,g,v,allperms,signsym,allsigns); new_line(outfile); put_line(outfile,"THE SYMMETRY GROUP : "); new_line(outfile); Symbolic_Symmetry_Group_io.put(outfile,v); new_line(outfile); else invar := false; end if; new_line; put("Do you want the refined solutions on separate file ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then solsfile := true; put_line("Reading the name of the file to write the solutions on."); Read_Name_and_Create_File(solsft); else solsfile := false; end if; Default_Root_Refining_Parameters(epsxa,epsfa,tolsing,maxit,wout); Menu_Root_Refining_Parameters(outfile,epsxa,epsfa,tolsing,maxit,wout); End_of_Input_Message; tstart(timer); Refine_Roots(outfile,lp.all,solsfile,invar,allperms,signsym,v, epsxa,epsfa,tolsing,maxit,wout,sols,refsols); tstop(timer); if solsfile then put(solsft,Length_Of(refsols),Head_Of(refsols).n,refsols); Close(solsft); end if; new_line(outfile); print_times(outfile,timer,"Root Refinement"); Close(outfile); end Weeding_Validation; procedure Polyhedral_End_Game_Validation is -- DESCRIPTION : -- Validation of the polyhedral end game. pocofile,resultfile : file_type; begin new_line; put_line("Reading name of the output file of poco."); Read_Name_and_Open_File(pocofile); new_line; put_line("Reading name of output file."); Read_Name_and_Create_File(resultfile); End_of_Input_Message; valipoco(pocofile,resultfile); Close(pocofile); new_line(resultfile); put(resultfile,Bye_Bye_Message); Close(resultfile); end Polyhedral_End_Game_Validation; procedure Display_and_Dispatch_Menu is ans : character; timer : timing_widget; begin loop new_line; put_line("MENU with Validation Methods : "); put_line (" 1. Basic Validation : refining and weeding out the solution set"); put_line (" 2. Winding-Number Computation by homotopy continuation"); put_line (" 3. Polyhedral Validation : frequency table of path directions"); put("Type 1, 2, or 3 to select validation method, or i for info : "); Ask_Alternative(ans,"123i"); case ans is when 'i' => new_line; Display_Validation_Info; when '1' => Weeding_Validation; when '2' => Winding_Validation; when '3' => Polyhedral_End_Game_Validation; when others => null; end case; exit when ans /= 'i'; end loop; end Display_and_Dispatch_Menu; begin Display_and_Dispatch_Menu; end mainvali; SHAR_EOF fi # end of overwriting check if test -f 'mainvali.ads' then echo shar: will not over-write existing file "'mainvali.ads'" else cat << "SHAR_EOF" > 'mainvali.ads' procedure mainvali ( infilename,outfilename : in string ); -- DESCRIPTION : -- This is the routine for validating the solutions of a polynomial system, -- as called by the central dispatcher. -- The arguments are the names of the input and output file respectively. -- FUNCTIONALITY : -- There are three types of functionality offered: -- 1. Weeding out the solution sets: -- check residuals to separate solutions from path failures; -- compute local condition numbers, which solution are regular/singular; -- see whether solutions are clustered, eventually multiple solutions; -- compute generators of the solution set in case of symmetry. -- 2. Computation of winding numbers: -- this requires a homotopy with solution paths at t < 1. -- 3. Validation of polyhedral end game: -- computation of frequency table of the path directions; -- this requires an output file of poco where the path directions -- have been computed. SHAR_EOF fi # end of overwriting check if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' # Establishing the links : linkrc = ../../Ada/Main links: @-ln -s $(linkrc)/bablphc.a bablphc.ads @-ln -s $(linkrc)/bablphcB.a bablphc.adb @-ln -s $(linkrc)/bablvali.a bablvali.ads @-ln -s $(linkrc)/bablvaliB.a bablvali.adb @-ln -s $(linkrc)/mainroco.a mainroco.ads @-ln -s $(linkrc)/mainrocoB.a mainroco.adb @-ln -s $(linkrc)/bablroco.a bablroco.ads @-ln -s $(linkrc)/bablrocoB.a bablroco.adb @-ln -s $(linkrc)/drivroco.a driver_for_root_counts.ads @-ln -s $(linkrc)/drivrocoB.a driver_for_root_counts.adb @-ln -s $(linkrc)/blackroco.a black_box_root_counting.ads @-ln -s $(linkrc)/blackrocoB.a black_box_root_counting.adb @-ln -s $(linkrc)/dispatch.a dispatch.ads @-ln -s $(linkrc)/dispatchB.a dispatch.adb @-ln -s $(linkrc)/mainphc.a mainphc.ads @-ln -s $(linkrc)/mainphcB.a mainphc.adb @-ln -s $(linkrc)/drivowst.a driver_for_own_start_system.ads @-ln -s $(linkrc)/drivowstB.a driver_for_own_start_system.adb @-ln -s $(linkrc)/mainvali.a mainvali.ads @-ln -s $(linkrc)/mainvaliB.a mainvali.adb @-ln -s $(linkrc)/drivprep.a driver_for_preprocessing.ads @-ln -s $(linkrc)/drivprepB.a driver_for_preprocessing.adb @-ln -s $(linkrc)/drivrore.a driver_for_root_refining.ads @-ln -s $(linkrc)/drivroreB.a driver_for_root_refining.adb @-ln -s $(linkrc)/phcpack.a phcpack.ads @-ln -s $(linkrc)/phcpackB.a phcpack.adb @-ln -s $(linkrc)/use_phc.a use_phc.ads SHAR_EOF fi # end of overwriting check if test -f 'makelog' then echo shar: will not over-write existing file "'makelog'" else cat << "SHAR_EOF" > 'makelog' gnatmake -c -I../System -I../Math_Lib/Numbers -I../Math_Lib/Matrices -I../Math_Lib/Polynomials -I../Math_Lib/LP -I../Homotopy -I../Continuation -I../Root_Counts/Bezout -I../Root_Counts/BKK -I../Root_Counts/MVC -I../Root_Counts/DMVC -I../Symmetry/SRPS -I../Symmetry/SMVC -gnatv -O3 -gnatp dispatch.adb GNAT 3.09 (970121) Copyright 1991-1996 Free Software Foundation, Inc. Compiling: ../Continuation/batch_polynomial_continuations.adb (source file time stamp: 1997-06-04 07:29:08) 207 lines: No errors raised CONSTRAINT_ERROR *** Error code 1 SHAR_EOF fi # end of overwriting check if test -f 'phcpack.adb' then echo shar: will not over-write existing file "'phcpack.adb'" else cat << "SHAR_EOF" > 'phcpack.adb' with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Vectors,Complex_Norms; use Complex_Vectors,Complex_Norms; with Complex_Matrices; use Complex_Matrices; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Polynomial_Randomizers; use Polynomial_Randomizers; with Scaling; use Scaling; with Reduction_of_Polynomial_Systems; use Reduction_of_Polynomial_Systems; with Homotopy; with Start_Systems; use Start_Systems; with BKK_Bound_Computations; use BKK_Bound_Computations; with Continuation_Parameters; with Increment_and_Fix_Continuation; use Increment_and_Fix_Continuation; with Root_Refiners; use Root_Refiners; package body PHCPACK is -- 1. PRE-PROCESSING : SCALING AND REDUCTION procedure Equation_Scaling ( file : in file_type; p : in Poly_Sys; s : out Poly_Sys ) is res : Poly_Sys(p'range); begin Copy(p,res); Scale(res); put(file,res); s := res; end Equation_Scaling; procedure Linear_Reduction ( file : in file_type; p : in Poly_Sys; r : out Poly_Sys ) is res : Poly_Sys(p'range); success,inconsistent,infinite : boolean := false; begin Copy(p,res); reduce(res,success,inconsistent,infinite); if success then if inconsistent then put_line(file,"system is inconsistent"); end if; if infinite then put_line(file,"system has infinite number of solutions"); end if; end if; put(file,res); r := res; end Linear_Reduction; -- 2. ROOT COUNTING AND CONSTRUCTION OF START SYSTEM procedure Total_Degree ( file : in file_type; p : in Poly_Sys; d : out natural ) is begin d := Total_Degree(p); end Total_Degree; procedure Total_Degree ( file : in file_type; p : in Poly_Sys; d : out natural; q : out Poly_Sys; qsols : out Solution_List ) is qq : Poly_Sys(p'range); qqsols : Solution_List; begin d := Total_Degree(p); Start_System(p,qq,qqsols); q := qq; qsols := qqsols; end Total_Degree; procedure Implicit_Lifting ( file : in file_type; p : in Poly_Sys; mv : out natural ) is begin mv := BKK_by_Implicit_Lifting(p); end Implicit_Lifting; procedure Implicit_Lifting ( file : in file_type; p : in Poly_Sys; mv : out natural; q : out Poly_Sys; qsols : out Solution_List ) is qq : Poly_Sys(p'range) := Complex_Randomize1(p); qqsols : Solution_List := Solve_by_Implicit_Lifting(file,qq); begin mv := Length_Of(qqsols); Set_Continuation_Parameter(qqsols,CMPLX(0.0)); q := qq; qsols := qqsols; end Implicit_Lifting; procedure Static_Lifting ( file : in file_type; p : in Poly_Sys; mv : out natural ) is begin mv := BKK_by_Static_Lifting(file,p); end Static_Lifting; procedure Static_Lifting ( file : in file_type; p : in Poly_Sys; mv : out natural; q : out Poly_Sys; qsols : out Solution_List ) is qq : Poly_Sys(p'range) := Complex_Randomize1(p); qqsols : Solution_List := Solve_by_Static_Lifting(file,qq); begin mv := Length_Of(qqsols); Set_Continuation_Parameter(qqsols,CMPLX(0.0)); q := qq; qsols := qqsols; end Static_Lifting; -- 3. POLYNOMIAL CONTINUATION procedure Artificial_Parameter_Continuation ( file : in file_type; p,q : in Poly_Sys; sols : in out Solution_List; k : in natural := 2; a : in double_complex := CMPLX(1.0); target : in double_complex := CMPLX(1.0) ) is procedure Cont is new Reporting_Continue(Norm1,Homotopy.Eval,Homotopy.Eval,Homotopy.Diff); begin Homotopy.Create(p,q,k,a); Continuation_Parameters.Tune(0); Cont(file,sols,false,target); Homotopy.Clear; end Artificial_Parameter_Continuation; procedure Natural_Parameter_Continuation ( file : in file_type; h : in Poly_Sys; k : in natural; t0,t1 : in double_complex; sols : in out Solution_List ) is begin null; end Natural_Parameter_Continuation; -- 4. POST-PROCESSING : VALIDATION procedure Refine_Roots ( file : in file_type; p : in Poly_Sys; sols : in out Solution_List ) is epsxa,epsfa : constant double_float := 10.0**(-8); -- defaults tolsing : constant double_float := 10.0**(-8); maxit : constant natural := 3; numit : natural := 0; begin Reporting_Root_Refiner(file,p,sols,epsxa,epsfa,tolsing,numit,maxit,false); end Refine_Roots; end PHCPACK; SHAR_EOF fi # end of overwriting check if test -f 'phcpack.ads' then echo shar: will not over-write existing file "'phcpack.ads'" else cat << "SHAR_EOF" > 'phcpack.ads' with text_io; use text_io; with Complex_Numbers; use Complex_Numbers; with Solutions; use Solutions; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; package PHCPACK is -- DESCRIPTION : -- PHC is a numerical general-purpose solver for polynomial systems -- by homotopy continuation. This package collects all major features -- of the package as organized according to the four stages of the solver. -- 1. PRE-PROCESSING : SCALING AND REDUCTION procedure Equation_Scaling ( file : in file_type; p : in Poly_Sys; s : out Poly_Sys ); -- DESCRIPTION : equation scaling by dividing average coefficient. -- ON ENTRY : -- file to write results on, must be opened for output; -- p a polynomial system. -- ON RETURN : -- s a scaled polynomial system. procedure Linear_Reduction ( file : in file_type; p : in Poly_Sys; r : out Poly_Sys ); -- DESCRIPTION : linear reduction of the coefficient matrix of p. -- ON ENTRY : -- file to write results on, must be opened for output; -- p a polynomial system. -- ON RETURN : -- r a polynomial system with reduced coefficient matrix. -- 2. ROOT COUNTING AND CONSTRUCTION OF START SYSTEM procedure Total_Degree ( file : in file_type; p : in Poly_Sys; d : out natural ); -- DESCRIPTION : computation of the total degree. -- ON ENTRY : -- file to write results on, must be opened for output; -- p a polynomial system. -- ON RETURN : -- d total degree of the system p. procedure Total_Degree ( file : in file_type; p : in Poly_Sys; d : out natural; q : out Poly_Sys; qsols : out Solution_List ); -- DESCRIPTION : construction of start system based on total degree. -- ON ENTRY : -- file to write results on, must be opened for output; -- p a polynomial system. -- ON RETURN : -- d total degree of the system p. -- q start system with same total degree as p; -- qsols solutions of q. procedure Implicit_Lifting ( file : in file_type; p : in Poly_Sys; mv : out natural ); -- DESCRIPTION : computation of mixed volume by implicit lifting. procedure Implicit_Lifting ( file : in file_type; p : in Poly_Sys; mv : out natural; q : out Poly_Sys; qsols : out Solution_List ); -- DESCRIPTION : construction of start system by implicit polyhedral homotopy. procedure Static_Lifting ( file : in file_type; p : in Poly_Sys; mv : out natural ); -- DESCRIPTION : computation of mixed volume by static lifting. procedure Static_Lifting ( file : in file_type; p : in Poly_Sys; mv : out natural; q : out Poly_Sys; qsols : out Solution_List ); -- DESCRIPTION : construction of start system by static polyhedral homotopy. -- 3. POLYNOMIAL CONTINUATION procedure Artificial_Parameter_Continuation ( file : in file_type; p,q : in Poly_Sys; sols : in out Solution_List; k : in natural := 2; a : in double_complex := CMPLX(1.0); target : in double_complex := CMPLX(1.0) ); -- DESCRIPTION : continuation with the artificial-parameter homotopy -- h(x,t) = a*(1-t)^k*q(x) + t^k*p(x) = 0, for t going to the target. -- ON ENTRY : -- file to write results on, must be opened for output; -- p target system; -- q start system; -- sols start solutions; -- k smoothing parameter to simulate small steps; -- a random complex number to ensure regularity; -- target target value for continuation parameter. -- ON RETURN : -- sols solutions for t = target. procedure Natural_Parameter_Continuation ( file : in file_type; h : in Poly_Sys; k : in natural; t0,t1 : in double_complex; sols : in out Solution_List ); -- DESCRIPTION : continuation with a natural-parameter homotopy. -- 4. POST-PROCESSING : VALIDATION procedure Refine_Roots ( file : in file_type; p : in Poly_Sys; sols : in out Solution_List ); -- DESCRIPTION : refines the roots and puts a report on file. -- ON ENTRY : -- file to write results on, must be opened for output; -- p a polynomial system system; -- sols approximate solutions. -- ON RETURN : -- sols refined solutions. end PHCPACK; SHAR_EOF fi # end of overwriting check if test -f 'use_phc.adb' then echo shar: will not over-write existing file "'use_phc.adb'" else cat << "SHAR_EOF" > 'use_phc.adb' with text_io,Solutions; use text_io,Solutions; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with PHCPACK; procedure use_phc is infile,outfile : file_type; -- input and output file p,q : Link_to_Poly_Sys; -- target and start system mixed_volume : natural; -- root count is mixed volume sols : Solution_List; -- list of solutions begin Open(infile,in_file,"test.in"); get(infile,p); Create(outfile,out_file,"test.out"); put(outfile,p.all); q := new Poly_Sys(p'range); PHCPACK.Static_Lifting(outfile,p.all,mixed_volume,q.all,sols); PHCPACK.Artificial_Parameter_Continuation(outfile,p.all,q.all,sols); PHCPACK.Refine_Roots(outfile,p.all,sols); end use_phc; SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'Math_Lib' then mkdir 'Math_Lib' fi cd 'Math_Lib' if test ! -d 'Matrices' then mkdir 'Matrices' fi cd 'Matrices' if test -f 'complex_linear_system_solvers.adb' then echo shar: will not over-write existing file "'complex_linear_system_solvers.adb'" else cat << "SHAR_EOF" > 'complex_linear_system_solvers.adb' package body Complex_Linear_System_Solvers is use Complex_Vectors; -- AUXLILIARIES : function cabs ( c : double_complex ) return double_float is begin return (ABS(REAL_PART(c)) + ABS(IMAG_PART(c))); end cabs; function dconjg ( x : double_complex ) return double_complex is begin return CMPLX(REAL_PART(x),-IMAG_PART(x)); end dconjg; function csign ( x,y : double_complex ) return double_complex is begin return (CMPLX(cabs(x)) * y / CMPLX(cabs(y))); end csign; -- TARGET ROUTINES : procedure Scale ( a : in out Matrix; b : in out Complex_Vectors.Vector ) is fac : double_complex; function Maximum ( a : in Matrix; i : in integer ) return double_complex is res : integer := a'first(2); max : double_float := cabs(a(i,res)); tmp : double_float; begin for j in a'first(2)+1..a'last(2) loop tmp := cabs(a(i,j)); if tmp > max then max := tmp; res := j; end if; end loop; return a(i,res); end Maximum; procedure Divide ( a : in out Matrix; b : in out Vector; i : in integer; fac : in double_complex ) is begin for j in a'range(2) loop a(i,j) := a(i,j)/fac; end loop; b(i) := b(i)/fac; end Divide; begin for i in a'range(1) loop fac := Maximum(a,i); Divide(a,b,i,fac); end loop; end Scale; -- TARGET ROUTINES : procedure lufac ( a : in out Matrix; n : in integer; ipvt : out Integer_Vectors.Vector; info : out integer ) is kp1,l,nm1 : integer; smax : double_float; temp : double_complex; begin info := 0; nm1 := n - 1; if nm1 >= 1 then for k in 1..nm1 loop kp1 := k + 1; -- find the pivot index l l := k; smax := cabs(a(k,k)); --modulus(a(k,k)); for i in kp1..n loop if cabs(a(i,k)) > smax --modulus(a(i,k)) > smax then l := i; smax := cabs(a(i,k)); --modulus(a(i,k)); end if; end loop; ipvt(k) := l; if smax = 0.0 then -- this column is already triangularized info := k; else -- interchange if necessary if l /= k then temp := a(l,k); a(l,k) := a(k,k); a(k,k) := temp; end if; -- compute multipliers temp := -CMPLX(1.0)/a(k,k); for i in kp1..n loop a(i,k) := temp * a(i,k); end loop; -- row elimination with column indexing for j in kp1..n loop temp := a(l,j); if l /= k then a(l,j) := a(k,j); a(k,j) := temp; end if; for i in kp1..n loop a(i,j) := a(i,j) + temp * a(i,k); end loop; end loop; end if; end loop; end if; ipvt(n) := n; if modulus(a(n,n)) = 0.0 then info := n; end if; end lufac; procedure lufco ( a : in out Matrix; n : in integer; ipvt : out Integer_Vectors.Vector; rcond : out double_float ) is -- NOTE : -- rcond = 1/(norm(a)*(estimate of norm(inverse(a)))) -- estimate = norm(z)/norm(y) where a*z = y and ctrans(a)*y = e. -- ctrans(a) is the conjugate transpose of a. -- The components of e are chosen to cause maximum local -- growth in teh elements of w where ctrans(u)*w = e. -- The vectors are frequently rescaled to avoid overflow. z : Complex_Vectors.Vector(1..n); info,kb,kp1,l : integer; s,sm,sum,anorm,ynorm : double_float; ek,t,wk,wkm : double_complex; ipvtt : Integer_Vectors.Vector(1..n); begin anorm := 0.0; -- compute 1-norm of a for j in 1..n loop sum := 0.0; for i in 1..n loop sum := sum + cabs(a(i,j)); end loop; if sum > anorm then anorm := sum; end if; end loop; lufac(a,n,ipvtt,info); -- factor for i in 1..n loop ipvt(i) := ipvtt(i); end loop; ek := CMPLX(1.0); -- solve ctrans(u)*w = e for j in 1..n loop z(j) := CMPLX(0.0); end loop; for k in 1..n loop if cabs(z(k)) /= 0.0 then ek := csign(ek,-z(k)); end if; if cabs(ek-z(k)) > cabs(a(k,k)) then s := cabs(a(k,k))/cabs(ek-z(k)); z := CMPLX(s) * z; ek := CMPLX(s) * ek; end if; wk := ek - z(k); wkm := -ek - z(k); s := cabs(wk); sm := cabs(wkm); if cabs(a(k,k)) = 0.0 then wk := CMPLX(1.0); wkm := CMPLX(1.0); else wk := wk / dconjg(a(k,k)); wkm := wkm / dconjg(a(k,k)); end if; kp1 := k + 1; if kp1 <= n then for j in kp1..n loop sm := sm + cabs(z(j)+wkm*dconjg(a(k,j))); z(j) := z(j) + wk*dconjg(a(k,j)); s := s + cabs(z(j)); end loop; if s < sm then t := wkm - wk; wk := wkm; for j in kp1..n loop z(j) := z(j) + t*dconjg(a(k,j)); end loop; end if; end if; z(k) := wk; end loop; sum := 0.0; for i in 1..n loop sum := sum + cabs(z(i)); end loop; s := 1.0 / sum; z := CMPLX(s) * z; for k in 1..n loop -- solve ctrans(l)*y = w kb := n+1-k; if kb < n then t := CMPLX(0.0); for i in (kb+1)..n loop t := t + dconjg(a(i,kb))*z(i); end loop; z(kb) := z(kb) + t; end if; if cabs(z(kb)) > 1.0 then s := 1.0 / cabs(z(kb)); z := CMPLX(s) * z; end if; l := ipvtt(kb); t := z(l); z(l) := z(kb); z(kb) := t; end loop; sum := 0.0; for i in 1..n loop sum := sum + cabs(z(i)); end loop; s := 1.0 / sum; z := CMPLX(s) * z; ynorm := 1.0; for k in 1..n loop -- solve l*v = y l := ipvtt(k); t := z(l); z(l) := z(k); z(k) := t; if k < n then for i in (k+1)..n loop z(i) := z(i) + t * a(i,k); end loop; end if; if cabs(z(k)) > 1.0 then s := 1.0 / cabs(z(k)); z := CMPLX(s) * z; ynorm := s * ynorm; end if; end loop; sum := 0.0; for i in 1..n loop sum := sum + cabs(z(i)); end loop; s := 1.0 / sum; z := CMPLX(s) * z; ynorm := s * ynorm; for k in 1..n loop -- solve u*z = v kb := n+1-k; if cabs(z(kb)) > cabs(a(kb,kb)) then s := cabs(a(kb,kb)) / cabs(z(kb)); z := CMPLX(s) * z; ynorm := s * ynorm; end if; if cabs(a(kb,kb)) = 0.0 then z(kb) := CMPLX(1.0); else z(kb) := z(kb) / a(kb,kb); end if; t := -z(kb); for i in 1..(kb-1) loop z(i) := z(i) + t * a(i,kb); end loop; end loop; sum := 0.0; -- make znorm = 1.0 for i in 1..n loop sum := sum + cabs(z(i)); end loop; s := 1.0 / sum; z := CMPLX(s) * z; ynorm := s * ynorm; if anorm = 0.0 then rcond := 0.0; else rcond := ynorm/anorm; end if; end lufco; procedure lusolve ( a : in Matrix; n : in integer; ipvt : in Integer_Vectors.Vector; b : in out Complex_Vectors.Vector ) is l,nm1,kb : integer; temp : double_complex; begin nm1 := n-1; if nm1 >= 1 -- solve l*y = b then for k in 1..nm1 loop l := ipvt(k); temp := b(l); if l /= k then b(l) := b(k); b(k) := temp; end if; for i in (k+1)..n loop b(i) := b(i) + temp * a(i,k); end loop; end loop; end if; for k in 1..n loop -- solve u*x = y kb := n+1-k; b(kb) := b(kb) / a(kb,kb); temp := -b(kb); for j in 1..(kb-1) loop b(j) := b(j) + temp * a(j,kb); end loop; end loop; end lusolve; procedure Triangulate ( a : in out Matrix; n,m : in integer ) is max,cbs : double_float; temp : double_complex; pivot,k,kcolumn : integer; tol : constant double_float := 10.0**(-10); begin k := 1; kcolumn := 1; while (k <= n) and (kcolumn <= m) loop max := 0.0; -- find pivot pivot := 0; for l in k..n loop cbs := cabs(a(l,kcolumn)); if (cbs > tol) and then (cbs > max) then max := cbs; pivot := l; end if; end loop; if pivot = 0 then kcolumn := kcolumn + 1; else if pivot /= k -- interchange if necessary then for i in 1..m loop temp := a(pivot,i); a(pivot,i) := a(k,i); a(k,i) := temp; end loop; end if; for j in (kcolumn+1)..m loop -- triangulate a a(k,j) := a(k,j) / a(k,kcolumn); end loop; a(k,kcolumn) := CMPLX(1.0); for i in (k+1)..n loop for j in (kcolumn+1)..m loop a(i,j) := a(i,j) - a(i,kcolumn) * a(k,j); end loop; a(i,kcolumn) := CMPLX(0.0); end loop; k := k + 1; kcolumn := kcolumn + 1; end if; end loop; end Triangulate; procedure Diagonalize ( a : in out Matrix; n,m : in integer ) is max : double_float; temp : double_complex; pivot,k,kcolumn : integer; begin k := 1; kcolumn := 1; while (k <= n) and (kcolumn <= m) loop max := 0.0; -- find pivot for l in k..n loop if cabs(a(l,kcolumn)) > max then max := cabs(a(l,kcolumn)); pivot := l; end if; end loop; if max = 0.0 then kcolumn := kcolumn + 1; else if pivot /= k -- interchange if necessary then for i in 1..m loop temp := a(pivot,i); a(pivot,i) := a(k,i); a(k,i) := temp; end loop; end if; for j in (kcolumn+1)..m loop -- diagonalize a a(k,j) := a(k,j) / a(k,kcolumn); end loop; a(k,kcolumn) := CMPLX(1.0); for i in 1..(k-1) loop for j in (kcolumn+1)..m loop a(i,j) := a(i,j) - a(i,kcolumn) * a(k,j); end loop; end loop; for i in (k+1)..n loop for j in (kcolumn+1)..m loop a(i,j) := a(i,j) - a(i,kcolumn) * a(k,j); end loop; end loop; for j in 1..(k-1) loop a(j,kcolumn) := CMPLX(0.0); end loop; for j in (k+1)..n loop a(j,kcolumn) := CMPLX(0.0); end loop; k := k + 1; kcolumn := kcolumn + 1; end if; end loop; end Diagonalize; end Complex_Linear_System_Solvers; SHAR_EOF fi # end of overwriting check if test -f 'complex_linear_system_solvers.ads' then echo shar: will not over-write existing file "'complex_linear_system_solvers.ads'" else cat << "SHAR_EOF" > 'complex_linear_system_solvers.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; with Integer_Vectors,Complex_Vectors; with Complex_Numbers,Complex_Matrices; use Complex_Numbers,Complex_Matrices; package Complex_Linear_System_Solvers is -- DESCRIPTION : -- This package offers a few routines to solve linear systems of equations. -- The code for lufac, lufco and lusolve is a literal translation from the -- f77-linpack code. procedure Scale ( a : in out Matrix; b : in out Complex_Vectors.Vector ); -- DESCRIPTION : -- Divides the ith equation in the system a*x = b by the largest -- element on the ith row of a, for i in a'range(1). -- REQUIRED : a'range(1) = b'range(1). procedure lufac ( a : in out Matrix; n : in integer; ipvt : out Integer_Vectors.Vector; info : out integer ); -- DESCRIPTION : -- lufac factors a complex matrix by gaussian elimination -- lufac is usually called by lufco, but it can be called -- directly with a saving of time if rcond is not needed. -- (time for lufco) = (1 + 9/n)*(time for lufac). -- ON ENTRY : -- a complex matrix(1..n,1..n) to be factored -- n the dimension of the matrix a -- ON RETURN : -- a an upper triangular matrix and the multipliers -- which were used to obtain it. -- The factorization can be written a = l*u where -- l is a product of permutation and unit lower -- triangular matrices and u is upper triangular. -- ipvt an integer vector of pivot indices -- info = 0 normal value -- = k if u(k,k) = 0.0. -- This is not an error for this routine, -- but it does indicate that lusolve will -- divide by zero if called. Use rcond in -- lufco for a reliable indication of singularity. procedure lufco ( a : in out Matrix; n : in integer; ipvt : out Integer_Vectors.Vector; rcond : out double_float ); -- DESCRIPTION : -- lufco factors a complex matrix by gaussian elimination -- and estimates the condition of the matrix. -- If rcond is not needed, lufac is slightly faster. -- To solve a*x = b, follow lufco by lusolve. -- ON ENTRY : -- a complex matrix(1..n,1..n) to be factored -- n the dimension of the matrix a -- ON RETURN : -- a an upper triangular matrix and the multipliers -- which are used to obtain it. -- The factorization can be written a = l*u, where -- l is a product of permutation and unit lower triangular -- matrices and u is upper triangular. -- ipvt an integer vector of pivot indices -- rcond an estimate of the reciprocal condition of a. -- For the system a*x = b, relative perturbations -- in a and b of size epsilon may cause relative -- perturbations in x of size epsilon/rcond. -- If rcond is so small that the logical expression -- 1.0 + rcond = 1.0 -- is true, than a may be singular to working precision. -- In particular, rcond is zero if exact singularity is -- detected or the estimate underflows. procedure lusolve ( a : in Matrix; n : in integer; ipvt : in Integer_Vectors.Vector; b : in out Complex_Vectors.Vector ); -- DESCRIPTION : -- lusolve solves the complex system a*x = b using the factors -- computed by lufac or lufco -- ON ENTRY : -- a a complex matrix(1..n,1..n), the output from -- lufac or lufco -- n the dimension of the matrix a -- ipvt the pivot vector from lufac or lufco -- b the right hand side vector -- ON RETURN : -- b the solution vector x procedure Triangulate ( a : in out Matrix; n,m : in integer ); -- DESCRIPTION : -- triangulate makes the n*m complex matrix a triangular using -- Gaussian elimination. -- ON ENTRY : -- a a complex matrix(1..n,1..m) -- n the number of rows of a -- m the number of columns of a -- ON RETURN : -- a the triangulated matrix procedure Diagonalize ( a : in out Matrix; n,m : in integer ); -- DESCRIPTION : -- diagonalize makes the n*m complex matrix a diagonal using -- Gauss-Jordan. -- ON ENTRY : -- a a complex matrix(1..n,1..m) -- n the number of rows of a -- m the number of columns of a -- ON RETURN : -- a the diagonalized matrix end Complex_Linear_System_Solvers; SHAR_EOF fi # end of overwriting check if test -f 'complex_matrices.adb' then echo shar: will not over-write existing file "'complex_matrices.adb'" else cat << "SHAR_EOF" > 'complex_matrices.adb' package body Complex_Matrices is -- MATRIX-MATRIX OPERATIONS : function "+" ( a,b : Matrix ) return Matrix is r : Matrix(a'range(1),a'range(2)); begin for i in r'range(1) loop for j in r'range(2) loop r(i,j) := a(i,j) + b(i,j); end loop; end loop; return r; end "+"; function "-" ( a,b : Matrix ) return Matrix is r : Matrix(a'range(1),a'range(2)); begin for i in r'range(1) loop for j in r'range(2) loop r(i,j) := a(i,j) - b(i,j); end loop; end loop; return r; end "-"; function "-" ( a : Matrix ) return Matrix is r : Matrix(a'range(1),a'range(2)); begin for i in r'range(1) loop for j in r'range(2) loop r(i,j) := -a(i,j); end loop; end loop; return r; end "-"; function "*" ( a,b : Matrix ) return Matrix is r : Matrix(a'range(1),b'range(2)); begin for i in r'range(1) loop for j in r'range(2) loop r(i,j) := CMPLX(0.0); for k in a'range(2) loop r(i,j) := r(i,j) + a(i,k)*b(k,j); end loop; end loop; end loop; return r; end "*"; procedure Mult1 ( a : in out Matrix; b : in Matrix ) is temp : Vector(a'range(2)); begin for i in a'range(1) loop for j in b'range(2) loop temp(j) := CMPLX(0.0); for k in a'range(2) loop temp(j) := temp(j) + a(i,k)*b(k,j); end loop; end loop; for j in a'range(2) loop a(i,j) := temp(j); end loop; end loop; end Mult1; procedure Mult2 ( a : in Matrix; b : in out Matrix ) is temp : Vector(a'range(1)); begin for i in b'range(2) loop for j in a'range(1) loop temp(j) := CMPLX(0.0); for k in a'range(1) loop temp(j) := temp(j) + a(j,k)*b(k,i); end loop; end loop; for j in b'range(1) loop b(j,i) := temp(j); end loop; end loop; end Mult2; -- MATRIX-VECTOR OPERATIONS : function "*" ( a : Matrix; v : Vector ) return Vector is r : Vector(a'range(1)); begin for i in r'range loop r(i) := CMPLX(0.0); for j in a'range(2) loop r(i) := r(i) + a(i,j)*v(j); end loop; end loop; return r; end "*"; procedure Mult ( a : in Matrix; v : in out Vector ) is iv : Vector(v'range); begin for i in iv'range loop iv(i) := CMPLX(0.0); for j in a'range(2) loop iv(i) := iv(i) + a(i,j)*v(j); end loop; end loop; for i in v'range loop v(i) := iv(i); end loop; end Mult; end Complex_Matrices; SHAR_EOF fi # end of overwriting check if test -f 'complex_matrices.ads' then echo shar: will not over-write existing file "'complex_matrices.ads'" else cat << "SHAR_EOF" > 'complex_matrices.ads' with Complex_Numbers,Complex_Vectors; use Complex_Numbers,Complex_Vectors; package Complex_Matrices is -- DESCRIPTION : -- This package offers a data abstraction and operations for -- working with matrices of floating point numbers. type Matrix is array ( integer range <>, integer range <> ) of double_complex; -- MATRIX-MATRIX OPERATIONS : function "+" ( a,b : Matrix ) return Matrix; -- return a+b function "-" ( a,b : Matrix ) return Matrix; -- return a-b function "-" ( a : Matrix ) return Matrix; -- return -a function "*" ( a,b : Matrix ) return Matrix; -- return a*b procedure Mult1 ( a : in out Matrix; b : in Matrix ); -- a := a*b procedure Mult2 ( a : in Matrix; b : in out Matrix ); -- b := a*b -- MATRIX-VECTOR OPERATIONS : function "*" ( a : Matrix; v : Vector ) return Vector; -- return a*v procedure Mult ( a : in Matrix; v : in out Vector ); -- v := a*v end Complex_Matrices; SHAR_EOF fi # end of overwriting check if test -f 'complex_matrices_io.adb' then echo shar: will not over-write existing file "'complex_matrices_io.adb'" else cat << "SHAR_EOF" > 'complex_matrices_io.adb' with Complex_Numbers_io; use Complex_Numbers_io; package body Complex_Matrices_io is procedure get ( m : out Matrix ) is begin get(Standard_Input,m); end get; procedure get ( file : in file_type; m : out Matrix ) is begin for i in m'range(1) loop for j in m'range(2) loop get(file, m(i,j)); end loop; end loop; end get; procedure put ( m : in Matrix ) is begin put(Standard_Output,m); end put; procedure put ( file : in file_type; m : in Matrix ) is begin for i in m'range(1) loop for j in m'range(2) loop put(file,' '); put(file,m(i,j)); end loop; new_line(file); end loop; end put; procedure put ( m : in Matrix; fore,aft,exp : in natural ) is begin put(Standard_Output,m,fore,aft,exp); end put; procedure put ( file : in file_type; m : in Matrix; fore,aft,exp : in natural ) is begin for i in m'range(1) loop for j in m'range(2) loop put(file,' '); put(file,m(i,j),fore,aft,exp); end loop; new_line(file); end loop; end put; end Complex_Matrices_io; SHAR_EOF fi # end of overwriting check if test -f 'complex_matrices_io.ads' then echo shar: will not over-write existing file "'complex_matrices_io.ads'" else cat << "SHAR_EOF" > 'complex_matrices_io.ads' with text_io,Complex_Matrices; use text_io,Complex_Matrices; package Complex_Matrices_io is -- DESCRIPTION : -- This package contains routines for input and output -- of matrices with complex entries. procedure get ( m : out Matrix ); procedure get ( file : in file_type; m : out Matrix ); -- DESCRIPTION : -- reads a matrix from standard input or on file. procedure put ( m : in Matrix ); procedure put ( file : in file_type; m : in Matrix ); procedure put ( m : in Matrix; fore,aft,exp : in natural ); procedure put ( file : in file_type; m : in Matrix; fore,aft,exp : in natural ); -- DESCRIPTION : -- writes a matrix on standard output or on file. end Complex_Matrices_io; SHAR_EOF fi # end of overwriting check if test -f 'complex_norms.adb' then echo shar: will not over-write existing file "'complex_norms.adb'" else cat << "SHAR_EOF" > 'complex_norms.adb' with Mathematical_Functions; use Mathematical_Functions; with Complex_Numbers; use Complex_Numbers; package body Complex_Norms is function Norm1 ( x : Vector ) return double_float is max,temp : double_float; begin max := modulus(x(x'first)); for i in (x'first+1)..x'last loop temp := modulus(x(i)); if temp > max then max := temp; end if; end loop; return max; end Norm1; function Norm2 ( x : Vector ) return double_float is sum : double_float := 0.0; begin for i in x'range loop sum := sum + modulus(x(i))**2; end loop; return SQRT(sum); end Norm2; end Complex_Norms; SHAR_EOF fi # end of overwriting check if test -f 'complex_norms.ads' then echo shar: will not over-write existing file "'complex_norms.ads'" else cat << "SHAR_EOF" > 'complex_norms.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Vectors; use Complex_Vectors; package Complex_Norms is -- DESCRIPTION : -- This package offers some vector norms on complex vectors function Norm1 ( x : Vector ) return double_float; -- DESCRIPTION : -- returns the max |x(i)|, for i in x'range function Norm2 ( x : Vector ) return double_float; -- DESCRIPTION : -- returns sqrt(|sum {x(i)*x(i), for i in x'range}|) -- pragma inline(Norm1,Norm2); end Complex_Norms; SHAR_EOF fi # end of overwriting check if test -f 'complex_vectors.ads' then echo shar: will not over-write existing file "'complex_vectors.ads'" else cat << "SHAR_EOF" > 'complex_vectors.ads' with Vectors,Complex_Numbers; use Complex_Numbers; with Complex_Instantiation_Parameters; use Complex_Instantiation_Parameters; package Complex_Vectors is new Vectors (double_complex,CMPLX(0.0),clear,copy,equal,"+","-","-","*", Plus_Cmplx,Min_Cmplx,Min_Cmplx,Mult_Cmplx); SHAR_EOF fi # end of overwriting check if test -f 'complex_vectors_io.adb' then echo shar: will not over-write existing file "'complex_vectors_io.adb'" else cat << "SHAR_EOF" > 'complex_vectors_io.adb' with Complex_Numbers_io; use Complex_Numbers_io; package body Complex_Vectors_io is procedure get ( v : in out Vector ) is begin get(Standard_Input,v); end get; procedure get ( file : in file_type; v : in out Vector ) is begin for i in v'range loop get(file,v(i)); end loop; end get; procedure get ( n : in natural; v : out Link_to_Vector ) is begin get(Standard_Input,n,v); end get; procedure get ( file : in file_type; n : in natural; v : out Link_to_Vector ) is vv : Vector(1..n); begin for i in vv'range loop get(file,vv(i)); end loop; v := new Vector'(vv); end get; procedure put ( v : in Vector ) is begin put(Standard_Output,v); end put; procedure put ( file : in file_type; v : in Vector ) is begin for i in v'range loop put(file,' '); put(file,v(i)); end loop; end put; procedure put ( v : in Link_to_Vector ) is begin put(Standard_Output,v); end put; procedure put ( file : in file_type; v : in Link_to_Vector ) is begin if v /= null then put(file,v.all); end if; end put; procedure put ( v : in Vector; fore,aft,exp : in natural ) is begin put(Standard_Output,v,fore,aft,exp); end put; procedure put ( file : in file_type; v : in Vector; fore,aft,exp : in natural ) is begin for i in v'range loop put(file,' '); put(file,v(i),fore,aft,exp); end loop; end put; procedure put ( v : in Link_to_Vector; fore,aft,exp : in natural ) is begin put(Standard_Output,v,fore,aft,exp); end put; procedure put ( file : in file_type; v : in Link_to_Vector; fore,aft,exp : in natural ) is begin if v /= null then put(file,v.all,fore,aft,exp); end if; end put; end Complex_Vectors_io; SHAR_EOF fi # end of overwriting check if test -f 'complex_vectors_io.ads' then echo shar: will not over-write existing file "'complex_vectors_io.ads'" else cat << "SHAR_EOF" > 'complex_vectors_io.ads' with text_io,Complex_Vectors; use text_io,Complex_Vectors; package Complex_Vectors_io is -- DESCRIPTION : -- This package contains routines for input and output -- of vectors with complex entries. procedure get ( v : in out Vector ); procedure get ( file : in file_type; v : in out Vector ); -- DESCRIPTION : -- complex number will be read from standard input or from file, -- until all entries of v are filled. procedure get ( n : in natural; v : out Link_to_Vector ); procedure get ( file : in file_type; n : in natural; v : out Link_to_Vector ); -- DESCRIPTION : -- n complex numbers are read from standard input or from file. procedure put ( v : in Vector ); procedure put ( file : in file_type; v : in Vector ); procedure put ( v : in Link_to_Vector ); procedure put ( file : in file_type; v : in Link_to_Vector ); procedure put ( v : in Vector; fore,aft,exp : in natural ); procedure put ( file : in file_type; v : in Vector; fore,aft,exp : in natural ); procedure put ( v : in Link_to_Vector; fore,aft,exp : in natural ); procedure put ( file : in file_type; v : in Link_to_Vector; fore,aft,exp : in natural ); -- DESCRIPTION : -- the vector v is written on standard output or on file. end Complex_Vectors_io; SHAR_EOF fi # end of overwriting check if test -f 'complex_vectors_of_vectors.ads' then echo shar: will not over-write existing file "'complex_vectors_of_vectors.ads'" else cat << "SHAR_EOF" > 'complex_vectors_of_vectors.ads' with Vectors,Complex_Vectors; use Complex_Vectors; package Complex_Vectors_of_Vectors is new Vectors (Link_to_Vector,null,clear,copy,equal,"+","-","-","*", Plus_Vector,Min_Vector,Min_Vector,Mult_Vector); SHAR_EOF fi # end of overwriting check if test -f 'complex_vectors_of_vectors_io.adb' then echo shar: will not over-write existing file "'complex_vectors_of_vectors_io.adb'" else cat << "SHAR_EOF" > 'complex_vectors_of_vectors_io.adb' with Complex_Vectors_io; use Complex_Vectors_io; package body Complex_Vectors_of_Vectors_io is procedure get ( m : in natural; v : in out Vector ) is begin get(Standard_Input,m,v); end get; procedure get ( file : in file_type; m : in natural; v : in out Vector ) is begin for i in v'range loop get(file,m,v(i)); end loop; end get; procedure get ( n,m : in natural; v : out Link_to_Vector ) is begin get(Standard_Input,n,m,v); end get; procedure get ( file : in file_type; n,m : in natural; v : out Link_to_Vector ) is vv : Vector(1..n); begin for i in vv'range loop get(file,m,vv(i)); end loop; v := new Vector'(vv); end get; procedure put ( v : in Vector ) is begin put(Standard_Output,v); end put; procedure put ( file : in file_type; v : in Vector ) is begin for i in v'range loop put(file,v(i)); new_line(file); end loop; end put; procedure put ( v : in Link_to_Vector ) is begin put(Standard_Output,v); end put; procedure put ( file : in file_type; v : in Link_to_Vector ) is begin if v /= null then put(file,v.all); end if; end put; procedure put ( v : in Vector; fore,aft,exp : in natural ) is begin put(Standard_Output,v,fore,aft,exp); end put; procedure put ( file : in file_type; v : in Vector; fore,aft,exp : in natural ) is begin for i in v'range loop put(file,v(i),fore,aft,exp); new_line(file); end loop; end put; procedure put ( v : in Link_to_Vector; fore,aft,exp : in natural ) is begin put(Standard_Output,v,fore,aft,exp); end put; procedure put ( file : in file_type; v : in Link_to_Vector; fore,aft,exp : in natural ) is begin if v /= null then put(file,v.all,fore,aft,exp); end if; end put; end Complex_Vectors_of_Vectors_io; SHAR_EOF fi # end of overwriting check if test -f 'complex_vectors_of_vectors_io.ads' then echo shar: will not over-write existing file "'complex_vectors_of_vectors_io.ads'" else cat << "SHAR_EOF" > 'complex_vectors_of_vectors_io.ads' with text_io; use text_io; with Complex_Vectors_of_Vectors; use Complex_Vectors_of_Vectors; package Complex_Vectors_of_Vectors_io is -- DESCRIPTION : -- This package contains routines for input and output -- of vectors of vectors with complex entries. procedure get ( m : in natural; v : in out Vector ); procedure get ( file : in file_type; m : in natural; v : in out Vector ); -- DESCRIPTION : -- Complex numbers will be read from standard input or from file, -- until all entries of v are filled. -- The entries of v will be vectors of dimension m. procedure get ( n,m : in natural; v : out Link_to_Vector ); procedure get ( file : in file_type; n,m : in natural; v : out Link_to_Vector ); -- DESCRIPTION : -- n complex vectors of dimension m are read from standard input -- or from file. procedure put ( v : in Vector ); procedure put ( file : in file_type; v : in Vector ); procedure put ( v : in Link_to_Vector ); procedure put ( file : in file_type; v : in Link_to_Vector ); procedure put ( v : in Vector; fore,aft,exp : in natural ); procedure put ( file : in file_type; v : in Vector; fore,aft,exp : in natural ); procedure put ( v : in Link_to_Vector; fore,aft,exp : in natural ); procedure put ( file : in file_type; v : in Link_to_Vector; fore,aft,exp : in natural ); -- DESCRIPTION : -- The vector v is written on standard output or on file. -- For each new element of v, a new line begins. end Complex_Vectors_of_Vectors_io; SHAR_EOF fi # end of overwriting check if test -f 'float_linear_system_solvers.adb' then echo shar: will not over-write existing file "'float_linear_system_solvers.adb'" else cat << "SHAR_EOF" > 'float_linear_system_solvers.adb' package body Float_Linear_System_Solvers is use Float_Vectors; -- AUXILIARY : function csign (x,y : double_float) return double_float is begin return abs(x) * y / abs(y); end csign; -- STATIC TRIANGULATORS : procedure lufac ( a : in out matrix; n : in integer; ipvt : out Integer_Vectors.Vector; info : out integer ) is kp1,l,nm1 : integer; smax : double_float; temp : double_float; begin info := 0; nm1 := n - 1; if nm1 >= 1 then for k in 1..nm1 loop kp1 := k + 1; l := k; smax := abs(a(k,k)); -- find the pivot index l for i in kp1..n loop if abs(a(i,k)) > smax then l := i; smax := abs(a(i,k)); end if; end loop; ipvt(k) := l; if smax = 0.0 then info := k; -- this column is already triangulated else if l /= k -- interchange if necessary then temp := a(l,k); a(l,k) := a(k,k); a(k,k) := temp; end if; temp := -1.0/a(k,k); -- compute multipliers for i in kp1..n loop a(i,k) := temp*a(i,k); end loop; for j in kp1..n loop -- row elimination temp := a(l,j); if l /= k then a(l,j) := a(k,j); a(k,j) := temp; end if; for i in kp1..n loop a(i,j) := a(i,j) + temp*a(i,k); end loop; end loop; end if; end loop; end if; ipvt(n) := n; if a(n,n) = 0.0 then info := n; end if; end lufac; procedure lufco ( a : in out Matrix; n : in integer; ipvt : out Integer_Vectors.Vector; rcond : out double_float ) is -- NOTE : -- rcond = 1/(norm(a)*(estimate of norm(inverse(a)))) -- estimate = norm(z)/norm(y) where a*z = y and ctrans(a)*y = e. -- ctrans(a) is the conjugate transpose of a. -- The components of e are chosen to cause maximum local -- growth in teh elements of w where ctrans(u)*w = e. -- The vectors are frequently rescaled to avoid overflow. z : Float_Vectors.Vector(1..n); info,kb,kp1,l : integer; s,sm,sum,anorm,ynorm : double_float; ek,t,wk,wkm : double_float; ipvtt : Integer_Vectors.Vector(1..n); begin anorm := 0.0; -- compute 1-norm of a for j in 1..n loop sum := 0.0; for i in 1..n loop sum := sum + abs(a(i,j)); end loop; if sum > anorm then anorm := sum; end if; end loop; lufac(a,n,ipvtt,info); -- factor for i in 1..n loop ipvt(i) := ipvtt(i); end loop; ek := 1.0; -- solve ctrans(u)*w = e for j in 1..n loop z(j) := 0.0; end loop; for k in 1..n loop if abs(z(k)) /= 0.0 then ek := csign(ek,-z(k)); end if; if abs(ek-z(k)) > abs(a(k,k)) then s := abs(a(k,k))/abs(ek-z(k)); z := s*z; ek := s * ek; end if; wk := ek - z(k); wkm := -ek - z(k); s := abs(wk); sm := abs(wkm); if abs(a(k,k)) = 0.0 then wk := 1.0; wkm := 1.0; else wk := wk / a(k,k); wkm := wkm / a(k,k); end if; kp1 := k + 1; if kp1 <= n then for j in kp1..n loop sm := sm + abs(z(j)+wkm*a(k,j)); z(j) := z(j) + wk*a(k,j); s := s + abs(z(j)); end loop; if s < sm then t := wkm - wk; wk := wkm; for j in kp1..n loop z(j) := z(j) + t*a(k,j); end loop; end if; end if; z(k) := wk; end loop; sum := 0.0; for i in 1..n loop sum := sum + abs(z(i)); end loop; s := 1.0 / sum; z := s*z; for k in 1..n loop -- solve ctrans(l)*y = w kb := n+1-k; if kb < n then t := 0.0; for i in (kb+1)..n loop t := t + a(i,kb)*z(i); end loop; z(kb) := z(kb) + t; end if; if abs(z(kb)) > 1.0 then s := 1.0 / abs(z(kb)); z := s*z; end if; l := ipvtt(kb); t := z(l); z(l) := z(kb); z(kb) := t; end loop; sum := 0.0; for i in 1..n loop sum := sum + abs(z(i)); end loop; s := 1.0 / sum; z := s*z; ynorm := 1.0; for k in 1..n loop -- solve l*v = y l := ipvtt(k); t := z(l); z(l) := z(k); z(k) := t; if k < n then for i in (k+1)..n loop z(i) := z(i) + t * a(i,k); end loop; end if; if abs(z(k)) > 1.0 then s := 1.0 / abs(z(k)); z := s*z; ynorm := s * ynorm; end if; end loop; sum := 0.0; for i in 1..n loop sum := sum + abs(z(i)); end loop; s := 1.0 / sum; z := s*z; ynorm := s * ynorm; for k in 1..n loop -- solve u*z = v kb := n+1-k; if abs(z(kb)) > abs(a(kb,kb)) then s := abs(a(kb,kb)) / abs(z(kb)); z := s*z; ynorm := s * ynorm; end if; if abs(a(kb,kb)) = 0.0 then z(kb) := 1.0; else z(kb) := z(kb) / a(kb,kb); end if; t := -z(kb); for i in 1..(kb-1) loop z(i) := z(i) + t * a(i,kb); end loop; end loop; sum := 0.0; -- make znorm = 1.0 for i in 1..n loop sum := sum + abs(z(i)); end loop; s := 1.0 / sum; z := s*z; ynorm := s * ynorm; if anorm = 0.0 then rcond := 0.0; else rcond := ynorm/anorm; end if; end lufco; procedure lusolve ( a : in matrix; n : in integer; ipvt : in Integer_Vectors.Vector; b : in out Float_Vectors.vector ) is l,nm1,kb : integer; temp : double_float; begin nm1 := n-1; if nm1 >= 1 -- solve l*y = b then for k in 1..nm1 loop l := ipvt(k); temp := b(l); if l /= k then b(l) := b(k); b(k) := temp; end if; for i in (k+1)..n loop b(i) := b(i) + temp * a(i,k); end loop; end loop; end if; for k in 1..n loop -- solve u*x = y kb := n+1-k; b(kb) := b(kb) / a(kb,kb); temp := -b(kb); for j in 1..(kb-1) loop b(j) := b(j) + temp * a(j,kb); end loop; end loop; end lusolve; procedure Triangulate ( a : in out Matrix; n,m : in integer ) is max : double_float; temp : double_float; pivot,k,kcolumn : integer; begin k := 1; kcolumn := 1; while (k <= n) and (kcolumn <= m) loop max := 0.0; -- find pivot for l in k..n loop if abs(a(l,kcolumn)) > max then max := abs(a(l,kcolumn)); pivot := l; end if; end loop; if max = 0.0 then kcolumn := kcolumn + 1; else if pivot /= k -- interchange if necessary then for i in 1..m loop temp := a(pivot,i); a(pivot,i) := a(k,i); a(k,i) := temp; end loop; end if; for j in (kcolumn+1)..m loop -- triangulate a a(k,j) := a(k,j) / a(k,kcolumn); end loop; a(k,kcolumn) := 1.0; for i in (k+1)..n loop for j in (kcolumn+1)..m loop a(i,j) := a(i,j) - a(i,kcolumn) * a(k,j); end loop; end loop; for j in (k+1)..n loop a(j,kcolumn) := 0.0; end loop; k := k + 1; kcolumn := kcolumn + 1; end if; end loop; end Triangulate; procedure Diagonalize ( a : in out Matrix; n,m : in integer ) is max,temp : double_float; pivot,k,kcolumn : integer; begin k := 1; kcolumn := 1; while (k <= n) and (kcolumn <= m) loop max := 0.0; -- find pivot for l in k..n loop if abs(a(l,kcolumn)) > max then max := abs(a(l,kcolumn)); pivot := l; end if; end loop; if max = 0.0 then kcolumn := kcolumn + 1; else if pivot /= k -- interchange if necessary then for i in 1..m loop temp := a(pivot,i); a(pivot,i) := a(k,i); a(k,i) := temp; end loop; end if; for j in (kcolumn+1)..m loop -- diagonalize a a(k,j) := a(k,j) / a(k,kcolumn); end loop; a(k,kcolumn) := 1.0; for i in 1..(k-1) loop for j in (kcolumn+1)..m loop a(i,j) := a(i,j) - a(i,kcolumn) * a(k,j); end loop; end loop; for i in (k+1)..n loop for j in (kcolumn+1)..m loop a(i,j) := a(i,j) - a(i,kcolumn) * a(k,j); end loop; end loop; for j in 1..(k-1) loop a(j,kcolumn) := 0.0; end loop; for j in (k+1)..n loop a(j,kcolumn) := 0.0; end loop; k := k + 1; kcolumn := kcolumn + 1; end if; end loop; end Diagonalize; -- DYNAMIC TRIANGULATORS : procedure Upper_Triangulate ( row : in natural; mat : in out Matrix; tol : in double_float; ipvt : in out Integer_Vectors.Vector; pivot : out integer ) is factor,tmp,max : double_float; piv,tpi : integer := 0; begin for j in mat'first(1)..row-1 loop if abs(mat(row,j)) > tol -- make mat(row,j) zero then factor := mat(row,j)/mat(j,j); for k in j..mat'last(2) loop mat(row,k) := mat(row,k) - factor*mat(j,k); end loop; end if; end loop; for j in row..ipvt'last loop -- search pivot tmp := abs(mat(row,j)); if tmp > tol then if piv = 0 then max := tmp; piv := j; elsif tmp > max then max := tmp; piv := j; end if; end if; end loop; pivot := piv; if piv /= 0 -- zero row then if piv /= row -- interchange columns then for k in mat'first(1)..row loop tmp := mat(k,row); mat(k,row) := mat(k,piv); mat(k,piv) := tmp; end loop; tpi := ipvt(row); ipvt(row) := ipvt(piv); ipvt(piv) := tpi; end if; end if; end Upper_Triangulate; procedure Upper_Triangulate ( roweli : in natural; elim : in Matrix; tol : in double_float; rowmat : in natural; mat : in out Matrix ) is factor : double_float; begin if abs(mat(rowmat,roweli)) > tol then factor := mat(rowmat,roweli)/elim(roweli,roweli); for i in roweli..mat'last(2) loop mat(rowmat,i) := mat(rowmat,i) - factor*elim(roweli,i); end loop; end if; end Upper_Triangulate; procedure Upper_Triangulate ( roweli : in natural; elim : in Matrix; tol : in double_float; firstrow,lastrow : in natural; mat : in out Matrix ) is begin for i in firstrow..lastrow loop Upper_Triangulate(roweli,elim,tol,i,mat); end loop; end Upper_Triangulate; procedure Switch ( ipvt : in Integer_Vectors.Vector; row : in integer; mat : in out Matrix ) is tmp : Float_Vectors.Vector(mat'range(2)); begin for k in tmp'range loop tmp(k) := mat(row,k); end loop; for k in ipvt'range loop mat(row,k) := tmp(ipvt(k)); end loop; for k in ipvt'last+1..mat'last(2) loop mat(row,k) := tmp(k); end loop; end Switch; procedure Switch ( k,pivot,first,last : in integer; mat : in out Matrix ) is tmp : double_float; begin if k /= pivot then for i in first..last loop tmp := mat(i,k); mat(i,k) := mat(i,pivot); mat(i,pivot) := tmp; end loop; end if; end Switch; function Solve ( mat : Matrix; tol : double_float; ipvt : Integer_Vectors.Vector ) return Float_Vectors.Vector is res,x : Float_Vectors.Vector(mat'range(2)) := (mat'range(2) => 0.0); index : integer; begin for i in mat'range(1) loop index := i; exit when i > mat'last(2); exit when abs(mat(i,i)) < tol; end loop; if (abs(mat(index,index)) > tol) and then (index < mat'last(2)) then index := index + 1; end if; x(index) := 1.0; for i in reverse mat'first(1)..(index-1) loop x(i) := -mat(i,index); for j in i+1..index-1 loop x(i) := x(i) - mat(i,j)*x(j); end loop; x(i) := x(i)/mat(i,i); end loop; for k in ipvt'range loop res(ipvt(k)) := x(k); end loop; for k in ipvt'last+1..res'last loop res(k) := x(k); end loop; return res; end Solve; end Float_Linear_System_Solvers; SHAR_EOF fi # end of overwriting check if test -f 'float_linear_system_solvers.ads' then echo shar: will not over-write existing file "'float_linear_system_solvers.ads'" else cat << "SHAR_EOF" > 'float_linear_system_solvers.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; with Integer_Vectors,Float_Vectors; with Float_Matrices; use Float_Matrices; package Float_Linear_System_Solvers is -- DESCRIPTION : -- This package offers a few routines to solve linear systems of equations. -- The code for lufac, lufco and lusolve is a literal translation from the -- f77-linpack code. We distinguish between static triangulators, which -- take the matrix as a whole at one, and dynamic triangulators, which -- allow to triangulate row after row. -- STATIC TRIANGULATORS : procedure lufac ( a : in out Matrix; n : in integer; ipvt : out Integer_Vectors.Vector; info : out integer ); -- DESCRIPTION : -- lufac factors a float matrix by gaussian elimination -- lufac is usually called by lufco, but it can be called -- directly with a saving of time if rcond is not needed. -- (time for lufco) = (1 + 9/n)*(time for lufac). -- ON ENTRY : -- a a floating point matrix(1..n,1..n) to be factored -- n the dimension of the matrix a -- ON RETURN : -- a an upper triangular matrix and the multipliers -- which were used to obtain it. -- The factorization can be written a = l*u where -- l is a product of permutation and unit lower -- triangular matrices and u is upper triangular. -- ipvt an integer vector of pivot indices -- info = 0 normal value -- = k if u(k,k) = 0.0. -- This is not an error for this routine, -- but it does indicate that lusolve will -- divide by zero if called. Use rcond in -- lufco for a reliable indication of singularity. procedure lufco ( a : in out Matrix; n : in integer; ipvt : out Integer_Vectors.Vector; rcond : out double_float ); -- DESCRIPTION : -- lufco factors a floating point matrix by gaussian elimination -- and estimates the condition of the matrix. -- If rcond is not needed, lufac is slightly faster. -- To solve a*x = b, follow lufco by lusolve. -- ON ENTRY : -- a a floating point matrix(1..n,1..n) to be factored -- n the dimension of the matrix a -- ON RETURN : -- a an upper triangular matrix and the multipliers -- which are used to obtain it. -- The factorization can be written a = l*u, where -- l is a product of permutation and unit lower triangular -- matrices and u is upper triangular. -- ipvt an integer vector of pivot indices -- rcond an estimate of the reciprocal condition of a. -- For the system a*x = b, relative perturbations -- in a and b of size epsilon may cause relative -- perturbations in x of size epsilon/rcond. -- If rcond is so small that the logical expression -- 1.0 + rcond = 1.0 -- is true, than a may be singular to working precision. -- In particular, rcond is zero if exact singularity is -- detected or the estimate underflows. procedure lusolve ( a : in Matrix; n : in integer; ipvt : in Integer_Vectors.Vector; b : in out Float_Vectors.Vector ); -- DESCRIPTION : -- lusolve solves the system a*x = b using the factors -- computed by lufac or lufco -- ON ENTRY : -- a a floating-point matrix(1..n,1..n), the output from -- lufac or lufco; -- n the dimension of the matrix a; -- ipvt the pivot vector from lufac or lufco; -- b the right hand side vector. -- ON RETURN : -- b the solution vector x. procedure Triangulate ( a : in out Matrix; n,m : in integer ); -- DESCRIPTION : -- triangulate makes the n*m matrix a triangular using -- Gaussian elimination. -- ON ENTRY : -- a a floating-point matrix(1..n,1..m); -- n the number of rows of a; -- m the number of columns of a. -- ON RETURN : -- a the triangulated matrix. procedure Diagonalize ( a : in out Matrix; n,m : in integer ); -- DESCRIPTION : -- Diagonalize makes the n*m floating-point matrix a diagonal. -- ON ENTRY : -- a a floating-point matrix(1..n,1..m); -- n the number of rows of a; -- m the number of columns of a. -- ON RETURN : -- a the diagonalized matrix. -- DYNAMIC TRIANGULATORS : procedure Upper_Triangulate ( row : in natural; mat : in out Matrix; tol : in double_float; ipvt : in out Integer_Vectors.Vector; pivot : out integer ); -- DESCRIPTION : -- Makes the matrix upper triangular by updating the current row of -- the matrix. If pivot = 0 on return, then the matrix is singular. -- REQUIRED : -- The matrix is upper triangular up to current row, which means that -- abs(max(i,i)) > tol, for i in mat'first(1)..row-1. -- The matrix might have more columns than rows, but ipvt'range should -- match the range of the first columns in the matrix. procedure Upper_Triangulate ( roweli : in natural; elim : in Matrix; tol : in double_float; rowmat : in natural; mat : in out Matrix ); procedure Upper_Triangulate ( roweli : in natural; elim : in Matrix; tol : in double_float; firstrow,lastrow : in natural; mat : in out Matrix ); -- DESCRIPTION : -- Using the matrix elim, the unknown roweli is eliminated in mat. -- ON ENTRY : -- roweli current unknown to be eliminated; -- elim elim(1..roweli,m'range(2)) is upper triangular; -- firstrow indicates start in range of mat to be updated; -- lastrow indicates end in range of mat to be updated; -- roweli indicates the current unknown to be updated; -- mat the unknows before roweli are already eliminated. -- ON RETURN : -- mat the updated matrix after elimination of roweli. procedure Switch ( ipvt : in Integer_Vectors.Vector; row : in integer; mat : in out Matrix ); -- DESCRIPTION : -- Applies the pivoting information ipvt to the row of the matrix. procedure Switch ( k,pivot,first,last : in integer; mat : in out Matrix ); -- DESCRIPTION : -- Swaps the column k with the pivot column for row first..last in mat. function Solve ( mat : Matrix; tol : double_float; ipvt : Integer_Vectors.Vector ) return Float_Vectors.Vector; -- DESCRIPTION : -- Returns a solution to the homogenous linear system with inequalities -- in the rows of the matrix. -- REQUIRED : the matrix is upper triangular. end Float_Linear_System_Solvers; SHAR_EOF fi # end of overwriting check if test -f 'float_matrices.adb' then echo shar: will not over-write existing file "'float_matrices.adb'" else cat << "SHAR_EOF" > 'float_matrices.adb' package body Float_Matrices is -- MATRIX-MATRIX OPERATIONS : function "+" ( a,b : Matrix ) return Matrix is r : Matrix(a'range(1),a'range(2)); begin for i in r'range(1) loop for j in r'range(2) loop r(i,j) := a(i,j) + b(i,j); end loop; end loop; return r; end "+"; function "-" ( a,b : Matrix ) return Matrix is r : Matrix(a'range(1),a'range(2)); begin for i in r'range(1) loop for j in r'range(2) loop r(i,j) := a(i,j) - b(i,j); end loop; end loop; return r; end "-"; function "-" ( a : Matrix ) return Matrix is r : Matrix(a'range(1),a'range(2)); begin for i in r'range(1) loop for j in r'range(2) loop r(i,j) := -a(i,j); end loop; end loop; return r; end "-"; function "*" ( a,b : Matrix ) return Matrix is r : Matrix(a'range(1),b'range(2)); begin for i in r'range(1) loop for j in r'range(2) loop r(i,j) := 0.0; for k in a'range(2) loop r(i,j) := r(i,j) + a(i,k)*b(k,j); end loop; end loop; end loop; return r; end "*"; procedure Mult1 ( a : in out Matrix; b : in Matrix ) is temp : Vector(a'range(2)); begin for i in a'range(1) loop for j in b'range(2) loop temp(j) := 0.0; for k in a'range(2) loop temp(j) := temp(j) + a(i,k)*b(k,j); end loop; end loop; for j in a'range(2) loop a(i,j) := temp(j); end loop; end loop; end Mult1; procedure Mult2 ( a : in Matrix; b : in out Matrix ) is temp : Vector(a'range(1)); begin for i in b'range(2) loop for j in a'range(1) loop temp(j) := 0.0; for k in a'range(1) loop temp(j) := temp(j) + a(j,k)*b(k,i); end loop; end loop; for j in b'range(1) loop b(j,i) := temp(j); end loop; end loop; end Mult2; -- MATRIX-VECTOR OPERATIONS : function "*" ( a : Matrix; v : Vector ) return Vector is r : Vector(a'range(1)); begin for i in r'range loop r(i) := 0.0; for j in a'range(2) loop r(i) := r(i) + a(i,j)*v(j); end loop; end loop; return r; end "*"; procedure Mult ( a : in Matrix; v : in out Vector ) is iv : Vector(v'range); begin for i in iv'range loop iv(i) := 0.0; for j in a'range(2) loop iv(i) := iv(i) + a(i,j)*v(j); end loop; end loop; for i in v'range loop v(i) := iv(i); end loop; end Mult; end Float_Matrices; SHAR_EOF fi # end of overwriting check if test -f 'float_matrices.ads' then echo shar: will not over-write existing file "'float_matrices.ads'" else cat << "SHAR_EOF" > 'float_matrices.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; with Float_Vectors; use Float_Vectors; package Float_Matrices is -- DESCRIPTION : -- This package offers a data abstraction and operations for -- working with matrices of floating point numbers. type Matrix is array ( integer range <>, integer range <> ) of double_float; -- MATRIX-MATRIX OPERATIONS : function "+" ( a,b : Matrix ) return Matrix; -- return a+b function "-" ( a,b : Matrix ) return Matrix; -- return a-b function "-" ( a : Matrix ) return Matrix; -- return -a function "*" ( a,b : Matrix ) return Matrix; -- return a*b procedure Mult1 ( a : in out Matrix; b : in Matrix ); -- a := a*b procedure Mult2 ( a : in Matrix; b : in out Matrix ); -- b := a*b -- MATRIX-VECTOR OPERATIONS : function "*" ( a : Matrix; v : Vector ) return Vector; -- return a*v procedure Mult ( a : in Matrix; v : in out Vector ); -- v := a*v end Float_Matrices; SHAR_EOF fi # end of overwriting check if test -f 'float_matrices_io.adb' then echo shar: will not over-write existing file "'float_matrices_io.adb'" else cat << "SHAR_EOF" > 'float_matrices_io.adb' with Floating_Point_Numbers; package body Float_Matrices_io is use Floating_Point_Numbers.double_float_io; procedure get ( m : out Matrix ) is begin get(Standard_Input,m); end get; procedure get ( file : in file_type; m : out Matrix ) is begin for i in m'range(1) loop for j in m'range(2) loop get(file,m(i,j)); end loop; end loop; end get; procedure put ( m : in Matrix ) is begin put(Standard_Output,m); end put; procedure put ( file : in file_type; m : in Matrix ) is begin for i in m'range(1) loop for j in m'range(2) loop put(file,' '); put(file,m(i,j)); end loop; new_line(file); end loop; end put; procedure put ( m : in Matrix; fore,aft,exp : in natural ) is begin put(Standard_Output,m,fore,aft,exp); end put; procedure put ( file : in file_type; m : in Matrix; fore,aft,exp : in natural ) is begin for i in m'range(1) loop for j in m'range(2) loop put(file,' '); put(file,m(i,j),fore,aft,exp); end loop; new_line(file); end loop; end put; end Float_Matrices_io; SHAR_EOF fi # end of overwriting check if test -f 'float_matrices_io.ads' then echo shar: will not over-write existing file "'float_matrices_io.ads'" else cat << "SHAR_EOF" > 'float_matrices_io.ads' with text_io,Float_Matrices; use text_io,Float_Matrices; package Float_Matrices_io is -- DESCRIPTION : -- This package contains routines for input and output -- of matrices with floating point entries. procedure get ( m : out Matrix ); procedure get ( file : in file_type; m : out Matrix ); -- DESCRIPTION : -- reads a matrix from standard input or on file. procedure put ( m : in Matrix ); procedure put ( file : in file_type; m : in Matrix ); procedure put ( m : in Matrix; fore,aft,exp : in natural ); procedure put ( file : in file_type; m : in Matrix; fore,aft,exp : in natural ); -- DESCRIPTION : -- writes a matrix on standard output or on file. end Float_Matrices_io; SHAR_EOF fi # end of overwriting check if test -f 'float_vectors.ads' then echo shar: will not over-write existing file "'float_vectors.ads'" else cat << "SHAR_EOF" > 'float_vectors.ads' with Vectors; with Floating_Point_Numbers; use Floating_Point_Numbers; with Float_Instantiation_Parameters; use Float_Instantiation_Parameters; package Float_Vectors is new Vectors (double_float,0.0,clear,copy,equal,"+","-","-","*", Plus_Float,Min_Float,Min_Float,Mult_Float); SHAR_EOF fi # end of overwriting check if test -f 'float_vectors_io.adb' then echo shar: will not over-write existing file "'float_vectors_io.adb'" else cat << "SHAR_EOF" > 'float_vectors_io.adb' with Floating_Point_Numbers; package body Float_Vectors_io is use Floating_Point_Numbers.double_float_io; procedure get ( v : in out Vector ) is begin get(Standard_Input,v); end get; procedure get ( file : in file_type; v : in out Vector ) is begin for i in v'range loop get(file,v(i)); end loop; end get; procedure get ( n : in natural; v : out Link_to_Vector ) is begin get(Standard_Input,n,v); end get; procedure get ( file : in file_type; n : in natural; v : out Link_to_Vector ) is vv : Vector(1..n); begin for i in vv'range loop get(file,vv(i)); end loop; v := new Vector'(vv); end get; procedure put ( v : in Vector ) is begin put(Standard_Output,v); end put; procedure put ( file : in file_type; v : in Vector ) is begin for i in v'range loop put(file,' '); put(file,v(i)); end loop; end put; procedure put ( v : in Link_to_Vector ) is begin put(Standard_Output,v); end put; procedure put ( file : in file_type; v : in Link_to_Vector ) is begin if v /= null then put(file,v.all); end if; end put; procedure put ( v : in Vector; fore,aft,exp : in natural ) is begin put(Standard_Output,v,fore,aft,exp); end put; procedure put ( file : in file_type; v : in Vector; fore,aft,exp : in natural ) is begin for i in v'range loop put(file,' '); put(file,v(i),fore,aft,exp); end loop; end put; procedure put ( v : in Link_to_Vector; fore,aft,exp : in natural ) is begin put(Standard_Output,v,fore,aft,exp); end put; procedure put ( file : in file_type; v : in Link_to_Vector; fore,aft,exp : in natural ) is begin if v /= null then put(file,v.all,fore,aft,exp); end if; end put; end Float_Vectors_io; SHAR_EOF fi # end of overwriting check if test -f 'float_vectors_io.ads' then echo shar: will not over-write existing file "'float_vectors_io.ads'" else cat << "SHAR_EOF" > 'float_vectors_io.ads' with text_io,Float_Vectors; use text_io,Float_Vectors; package Float_Vectors_io is -- DESCRIPTION : -- This package contains routines for input and output -- of vectors with float entries. procedure get ( v : in out Vector ); procedure get ( file : in file_type; v : in out Vector ); -- DESCRIPTION : -- float number will be read from standard input or from file, -- until all entries of v are filled. procedure get ( n : in natural; v : out Link_to_Vector ); procedure get ( file : in file_type; n : in natural; v : out Link_to_Vector ); -- DESCRIPTION : -- n float numbers are read from standard input or from file. procedure put ( v : in Vector ); procedure put ( file : in file_type; v : in Vector ); procedure put ( v : in Link_to_Vector ); procedure put ( file : in file_type; v : in Link_to_Vector ); procedure put ( v : in Vector; fore,aft,exp : in natural ); procedure put ( file : in file_type; v : in Vector; fore,aft,exp : in natural ); procedure put ( v : in Link_to_Vector; fore,aft,exp : in natural ); procedure put ( file : in file_type; v : in Link_to_Vector; fore,aft,exp : in natural ); -- DESCRIPTION : -- the vector v is written on standard output or on file. end Float_Vectors_io; SHAR_EOF fi # end of overwriting check if test -f 'float_vectors_of_vectors.ads' then echo shar: will not over-write existing file "'float_vectors_of_vectors.ads'" else cat << "SHAR_EOF" > 'float_vectors_of_vectors.ads' with Vectors,Float_Vectors; use Float_Vectors; package Float_Vectors_of_Vectors is new Vectors (Link_to_Vector,null,clear,copy,equal,"+","-","-","*", Plus_Vector,Min_Vector,Min_Vector,Mult_Vector); SHAR_EOF fi # end of overwriting check if test -f 'float_vectors_of_vectors_io.adb' then echo shar: will not over-write existing file "'float_vectors_of_vectors_io.adb'" else cat << "SHAR_EOF" > 'float_vectors_of_vectors_io.adb' with Float_Vectors_io; use Float_Vectors_io; package body Float_Vectors_of_Vectors_io is procedure get ( m : in natural; v : in out Vector ) is begin get(Standard_Input,m,v); end get; procedure get ( file : in file_type; m : in natural; v : in out Vector ) is begin for i in v'range loop get(file,m,v(i)); end loop; end get; procedure get ( n,m : in natural; v : out Link_to_Vector ) is begin get(Standard_Input,n,m,v); end get; procedure get ( file : in file_type; n,m : in natural; v : out Link_to_Vector ) is vv : Vector(1..n); begin for i in vv'range loop get(file,m,vv(i)); end loop; v := new Vector'(vv); end get; procedure put ( v : in Vector ) is begin put(Standard_Output,v); end put; procedure put ( file : in file_type; v : in Vector ) is begin for i in v'range loop put(file,v(i)); new_line(file); end loop; end put; procedure put ( v : in Link_to_Vector ) is begin put(Standard_Output,v); end put; procedure put ( file : in file_type; v : in Link_to_Vector ) is begin if v /= null then put(file,v.all); end if; end put; procedure put ( v : in Vector; fore,aft,exp : in natural ) is begin put(Standard_Output,v,fore,aft,exp); end put; procedure put ( file : in file_type; v : in Vector; fore,aft,exp : in natural ) is begin for i in v'range loop put(file,v(i),fore,aft,exp); new_line(file); end loop; end put; procedure put ( v : in Link_to_Vector; fore,aft,exp : in natural ) is begin put(Standard_Output,v,fore,aft,exp); end put; procedure put ( file : in file_type; v : in Link_to_Vector; fore,aft,exp : in natural ) is begin if v /= null then put(file,v.all,fore,aft,exp); end if; end put; end Float_Vectors_of_Vectors_io; SHAR_EOF fi # end of overwriting check if test -f 'float_vectors_of_vectors_io.ads' then echo shar: will not over-write existing file "'float_vectors_of_vectors_io.ads'" else cat << "SHAR_EOF" > 'float_vectors_of_vectors_io.ads' with text_io; use text_io; with Float_Vectors_of_Vectors; use Float_Vectors_of_Vectors; package Float_Vectors_of_Vectors_io is -- DESCRIPTION : -- This package contains routines for input and output -- of vectors of vectors with float entries. procedure get ( m : in natural; v : in out Vector ); procedure get ( file : in file_type; m : in natural; v : in out Vector ); -- DESCRIPTION : -- Float numbers will be read from standard input or from file, -- until all entries of v are filled. -- The entries of v will be vectors of dimension m. procedure get ( n,m : in natural; v : out Link_to_Vector ); procedure get ( file : in file_type; n,m : in natural; v : out Link_to_Vector ); -- DESCRIPTION : -- n float vectors of dimension m are read from standard input -- or from file. procedure put ( v : in Vector ); procedure put ( file : in file_type; v : in Vector ); procedure put ( v : in Link_to_Vector ); procedure put ( file : in file_type; v : in Link_to_Vector ); procedure put ( v : in Vector; fore,aft,exp : in natural ); procedure put ( file : in file_type; v : in Vector; fore,aft,exp : in natural ); procedure put ( v : in Link_to_Vector; fore,aft,exp : in natural ); procedure put ( file : in file_type; v : in Link_to_Vector; fore,aft,exp : in natural ); -- DESCRIPTION : -- The vector v is written on standard output or on file. -- For each new element of v, a new line begins. end Float_Vectors_of_Vectors_io; SHAR_EOF fi # end of overwriting check if test -f 'greatest_common_divisor.adb' then echo shar: will not over-write existing file "'greatest_common_divisor.adb'" else cat << "SHAR_EOF" > 'greatest_common_divisor.adb' package body Greatest_Common_Divisor is function pos_gcd ( a,b : integer ) return integer is r : integer; begin if b = 0 then return a; else r := a mod b; if r = 0 then return b; else return pos_gcd(b,r); end if; end if; end pos_gcd; function gcd ( a,b : integer ) return integer is begin if a < 0 then if b < 0 then return pos_gcd(-a,-b); else return pos_gcd(-a,b); end if; elsif b < 0 then return pos_gcd(a,-b); else return pos_gcd(a,b); end if; end gcd; function lcm ( a,b : integer ) return integer is g : integer := gcd(a,b); begin if g = 0 then return 0; else return (a/g)*b; end if; end lcm; procedure gcd ( a,b : in integer; k,l,d : out integer ) is kk,ll : integer; procedure pos_gcd ( a,b : in integer; k,l,d : out integer ) is r,aa,bb,k1,l1,k0,l0,h,tmp : integer; -- REQUIRED : -- a >= b and a > 0 and b > 0 begin if a mod b = 0 then k := 0; l := 1; d := b; else k0 := 0; l0 := 1; r := a mod b; aa := b; bb := r; k1 := 1; l1 := - a / b; loop r := aa mod bb; exit when r = 0; h := aa / bb; tmp := k1; k1 := k0 - h*k1; k0 := tmp; tmp := l1; l1 := l0 - h*l1; l0 := tmp; aa := bb; bb := r; end loop; k := k1; l := l1; d := bb; end if; end pos_gcd; begin if a = 0 then if b < 0 then d := -b; k := 0; l := -1; else d := b; k := 0; l := 1; end if; return; elsif b = 0 then if a < 0 then d := -a; k := -1; l := 0; else d := a; k := 1; l := 0; end if; return; end if; if a < b then if b < 0 then pos_gcd(-b,-a,ll,kk,d); k := -kk; l := -ll; elsif a < 0 then pos_gcd(b,-a,l,kk,d); k := -kk; else pos_gcd(b,a,l,k,d); end if; else -- a >= b if a < 0 then pos_gcd(-a,-b,kk,ll,d); k := -kk; l := -ll; elsif b < 0 then pos_gcd(a,-b,k,ll,d); l := -ll; else pos_gcd(a,b,k,l,d); end if; end if; end gcd; end Greatest_Common_Divisor; SHAR_EOF fi # end of overwriting check if test -f 'greatest_common_divisor.ads' then echo shar: will not over-write existing file "'greatest_common_divisor.ads'" else cat << "SHAR_EOF" > 'greatest_common_divisor.ads' package Greatest_Common_Divisor is -- DESCRIPTION : -- This package contains two routines for the computation -- of the greatest common divisor of two integer numbers; -- in addition, a routine for the computation of the least -- common multiple is supplied. function gcd ( a,b : integer ) return integer; -- DESCRIPTION : -- returns the greatest common divisor of a and b. function lcm ( a,b : integer ) return integer; -- DESCRIPTION : -- returns the least common multiple of a and b. procedure gcd ( a,b : in integer; k,l,d : out integer ); -- DESCRIPTION : -- Computes the greatest common divisor d of a and b; -- After gcd(a,b,k,l,d), there holds: k*a + l*b = d. end Greatest_Common_Divisor; SHAR_EOF fi # end of overwriting check if test -f 'integer_linear_inequality_solvers.adb' then echo shar: will not over-write existing file "'integer_linear_inequality_solvers.adb'" else cat << "SHAR_EOF" > 'integer_linear_inequality_solvers.adb' with Greatest_Common_Divisor; use Greatest_Common_Divisor; with Integer_Linear_System_Solvers; use Integer_Linear_System_Solvers; --with text_io,integer_io; use text_io,integer_io; --with Integer_Vectors_io; use Integer_Vectors_io; --with Integer_Matrices_io; use Integer_Matrices_io; package body Integer_Linear_Inequality_Solvers is procedure Triangulate ( l : in natural; m : in matrix; index : in natural; ineq : in out matrix ) is a,b,lcmab,faca,facb : integer; begin if ineq(index,l) /= 0 then a := m(l,l); b := ineq(index,l); lcmab := lcm(a,b); if lcmab < 0 then lcmab := -lcmab; end if; faca := lcmab/a; facb := lcmab/b; if facb < 0 then facb := -facb; faca := -faca; end if; for j in l..ineq'last(2) loop ineq(index,j) := facb*ineq(index,j) - faca*m(l,j); end loop; end if; end Triangulate; procedure Triangulate ( l : in natural; m : in matrix; first,last : in natural; ineq : in out matrix ) is begin for i in first..last loop if ineq(i,l) /= 0 then Triangulate(l,m,i,ineq); end if; end loop; end Triangulate; procedure Triangulate ( index,start : in natural; ineq : in out matrix ) is column : natural := start; -- current column counter firstineq : natural := ineq'first(1); found : boolean; ind2 : natural; a,b,lcmab,faca,facb : integer; begin --put_line("INEQUALTITY"); --put(" BEFORE UPDATE : "); --for l in ineq'range(2) loop -- put(ineq(index,l),1); put(' '); --end loop; --new_line; loop -- SEARCH FOR FIRST NONZERO ENTRY IN CURRENT INEQUALITY : while column < ineq'last(2) and then ineq(index,column) = 0 loop column := column + 1; end loop; exit when ((ineq(index,column) = 0) or else (column = ineq'last(2))); -- nothing to eliminate -- SEARCH FOR INEQUALITY, -- WITH SAME FIRST NONZERO COLUMN, BUT WITH OPPOSITE SIGN : found := false; for k in firstineq..(index-1) loop if ineq(index,column)*ineq(k,column) < 0 -- check for sign then found := true; for l in start..column-1 loop -- check if same zero pattern -- if ineq(index,l) = 0 -- then found := (ineq(k,l) = 0); -- end if; exit when not found; end loop; if found then ind2 := k; end if; end if; exit when found; end loop; exit when not found; -- no possibility for elimination -- if found -- then -- ELIMINATE BY MAKING A POSITIVE LINEAR COMBINATION : a := ineq(index,column); b := ineq(ind2,column); if a < 0 then lcmab := lcm(-a,b); faca := lcmab/(-a); facb := lcmab/b; else lcmab := lcm(a,-b); facb := lcmab/(-b); faca := lcmab/a; end if; if ineq(index,ineq'last(2)) >= 0 or else -- PRESERVE SIGN OF ineq(index,ineq'last(2)) !!!! (faca*ineq(index,ineq'last(2)) + facb*ineq(ind2,ineq'last(2)) < 0) then for l in start..ineq'last(2) loop ineq(index,l) := faca*ineq(index,l) + facb*ineq(ind2,l); end loop; -- PROCEED : column := column + 1; firstineq := ineq'first(1); else -- TRY TO ELIMINATE WITH OTHER INEQUALITIES : firstineq := ind2 + 1; end if; if (firstineq >= index) -- impossible to eliminate with sign preservation then firstineq := ineq'first(2); column := column + 1; end if; -- else -- column := column + 1; -- firstineq := ineq'first(2); -- end if; exit when (column >= ineq'last(2)-1); end loop; --put(" AFTER UPDATE : "); --for l in ineq'range(2) loop -- put(ineq(index,l),1); put(' '); --end loop; --new_line; end Triangulate; end Integer_Linear_Inequality_Solvers; SHAR_EOF fi # end of overwriting check if test -f 'integer_linear_inequality_solvers.ads' then echo shar: will not over-write existing file "'integer_linear_inequality_solvers.ads'" else cat << "SHAR_EOF" > 'integer_linear_inequality_solvers.ads' with Integer_Vectors,Integer_Matrices; use Integer_Vectors,Integer_Matrices; package Integer_Linear_Inequality_Solvers is -- DESCRIPTION : -- This package provides for incrementally solving systems of -- linear systems w.r.t. linear inequalities. procedure Triangulate ( l : in natural; m : in matrix; first,last : in natural; ineq : in out matrix ); procedure Triangulate ( l : in natural; m : in matrix; index : in natural; ineq : in out matrix ); -- DESCRIPTION : -- Updates a matrix of inequalities, after elimination of the lth unknown. -- ON ENTRY : -- l current unknown to be eliminated; -- m m(1..l,m'range(2)) is upper triangular; -- first indicates start in range of ineq to be updated; -- last indicates end in range of ineq to be updated; -- index indicates the inequality to be updated; -- ineq in ineq(first..last) or in ineq(index), -- the first l-1 unknowns are already eliminated. -- ON RETURN : -- ineq the updated inequalities. procedure Triangulate ( index,start : in natural; ineq : in out matrix ); -- DESCRIPTION : -- Updates the inequality ineq(index), i.e. tries to eliminate as -- many unknowns in ineq(index) as possible, by making positive -- combinations with inequalities in ineq(ineq'first..index-1). -- ON ENTRY : -- index current row in ineq that has to be updated; -- start indicates in which column the first nonzero elements -- have to be found; -- ineq matrix of inequalities of type <.,.> >= 0. -- ON RETURN : -- ineq the updated matrix of inequalities. end Integer_Linear_Inequality_Solvers; SHAR_EOF fi # end of overwriting check if test -f 'integer_linear_system_solvers.adb' then echo shar: will not over-write existing file "'integer_linear_system_solvers.adb'" else cat << "SHAR_EOF" > 'integer_linear_system_solvers.adb' with Greatest_Common_Divisor; use Greatest_Common_Divisor; package body Integer_Linear_System_Solvers is -- SCALERS : function Divisors ( a : Matrix ) return Vector is -- DESCRIPTION : -- Returns a vector containing the gcd of the elements of each row. v : Vector(a'range(1)); begin for i in a'range(1) loop v(i) := a(i,a'first(2)); if v(i) /= 1 then for j in (a'first(2)+1)..a'last(2) loop v(i) := gcd(v(i),a(i,j)); exit when (v(i) = 1); end loop; end if; end loop; return v; end Divisors; function Scale ( a : Matrix ) return Matrix is v : Vector(a'range(1)) := Divisors(a); b : Matrix(a'range(1),a'range(2)); begin for i in b'range(1) loop if (v(i) = 1) or (v(i) = 0) then for j in b'range(2) loop b(i,j) := a(i,j); end loop; else for j in b'range(2) loop b(i,j) := a(i,j) / v(i); end loop; end if; end loop; return b; end Scale; procedure Scale ( a : in out Matrix; v : out Vector ) is dv : Vector(a'range(1)) := Divisors(a); begin for i in a'range(1) loop if (dv(i) = 1) or (dv(i) = 0) then null; else for j in a'range(2) loop a(i,j) := a(i,j) / dv(i); end loop; end if; end loop; v := dv; end Scale; procedure Scale ( a : in out Matrix ) is v : Vector(a'range(1)) := Divisors(a); begin for i in a'range(1) loop if (v(i) = 1) or (v(i) = 0) then null; else for j in a'range(2) loop a(i,j) := a(i,j) / v(i); end loop; end if; end loop; end Scale; procedure Scale ( a : in out Matrix; row,col : in integer ) is g : integer := a(row,col); begin if g /= 1 then for l in (col+1)..a'last(2) loop g := gcd(g,a(row,l)); exit when g = 1; end loop; end if; if (g /= 0) and (g /= 1) then for l in row..a'last(2) loop a(row,l) := a(row,l)/g; end loop; end if; end Scale; -- STATIC TRIANGULATORS : procedure Upper_Triangulate ( l : out Matrix; a : in out Matrix ) is row,pivot,temp,aa,bb,ka,lb,d,a_rowk,a_ik : integer; ll : Matrix(a'range(1),a'range(1)); begin for i in ll'range(1) loop for j in ll'range(2) loop ll(i,j) := 0; end loop; ll(i,i) := 1; end loop; row := a'first(1); for j in a'first(2)..a'last(2) loop pivot := row-1; -- find pivot for i in row..a'last(1) loop if a(i,j) /= 0 then pivot := i; exit; end if; end loop; if pivot >= row then if pivot /= row -- interchange if necessary then for k in a'range(2) loop temp := a(row,k); a(row,k) := a(pivot,k); a(pivot,k) := temp; end loop; for k in ll'range(2) loop temp := ll(row,k); ll(row,k) := ll(pivot,k); ll(pivot,k) := temp; end loop; end if; for i in (row+1)..a'last(1) loop -- make zeroes if a(i,j) /= 0 then aa := a(row,j); bb := a(i,j); gcd(aa,bb,ka,lb,d); aa := aa/d; bb := bb/d; if (aa = bb) and then ka = 0 then ka := lb; lb:= 0; end if; if (aa = -bb) and then ka = 0 then ka := -lb; lb := 0; end if; for k in j..a'last(2) loop a_rowk := a(row,k); a_ik := a(i,k); a(row,k) := ka*a_rowk + lb*a_ik; a(i,k) := -bb*a_rowk + aa*a_ik; end loop; for k in ll'range(2) loop a_rowk := ll(row,k); a_ik := ll(i,k); ll(row,k) := ka*a_rowk + lb*a_ik; ll(i,k) := -bb*a_rowk + aa*a_ik; end loop; end if; end loop; row := row + 1; end if; exit when row > a'last(1); end loop; l := ll; end Upper_Triangulate; procedure Upper_Triangulate ( a : in out Matrix ) is row,pivot,temp,aa,bb,ka,lb,d,a_rowk,a_ik : integer; begin row := a'first(1); for j in a'first(2)..a'last(2) loop pivot := row-1; -- find pivot for i in row..a'last(1) loop if a(i,j) /= 0 then pivot := i; exit; end if; end loop; if pivot >= row then if pivot /= row -- interchange if necessary then for k in a'range(2) loop temp := a(row,k); a(row,k) := a(pivot,k); a(pivot,k) := temp; end loop; end if; for i in (row+1)..a'last(1) loop -- make zeroes if a(i,j) /= 0 then aa := a(row,j); bb := a(i,j); gcd(aa,bb,ka,lb,d); aa := aa/d; bb := bb/d; if (aa = bb) and then ka = 0 then ka := lb; lb:= 0; end if; if (aa = -bb) and then ka = 0 then ka := -lb; lb := 0; end if; for k in j..a'last(2) loop a_rowk := a(row,k); a_ik := a(i,k); a(row,k) := ka*a_rowk + lb*a_ik; a(i,k) := -bb*a_rowk + aa*a_ik; end loop; end if; end loop; row := row + 1; end if; exit when row > a'last(1); end loop; end Upper_Triangulate; procedure Upper_Triangulate ( a : in out Matrix; ipvt : in out Vector ) is row,pivot,temp,aa,bb,ka,lb,d,a_rowk,a_ik : integer; begin row := a'first(1); for j in a'first(2)..a'last(2) loop pivot := row-1; -- find pivot for i in row..a'last(1) loop if a(i,j) /= 0 then pivot := i; exit; end if; end loop; if pivot >= row then if pivot /= row -- interchange if necessary then for k in a'range(2) loop temp := a(row,k); a(row,k) := a(pivot,k); a(pivot,k) := temp; end loop; temp := ipvt(row); ipvt(row) := ipvt(pivot); ipvt(pivot) := temp; end if; for i in (row+1)..a'last(1) loop -- make zeroes if a(i,j) /= 0 then aa := a(row,j); bb := a(i,j); gcd(aa,bb,ka,lb,d); aa := aa/d; bb := bb/d; if (aa = bb) and then ka = 0 then ka := lb; lb:= 0; end if; if (aa = -bb) and then ka = 0 then ka := -lb; lb := 0; end if; for k in j..a'last(2) loop a_rowk := a(row,k); a_ik := a(i,k); a(row,k) := ka*a_rowk + lb*a_ik; a(i,k) := -bb*a_rowk + aa*a_ik; end loop; end if; end loop; row := row + 1; end if; exit when row > a'last(1); end loop; end Upper_Triangulate; procedure Lower_Triangulate ( a : in out Matrix; u : out Matrix ) is column,pivot,temp,aa,bb,ka,lb,d,a_kcolumn,a_kj : integer; uu : Matrix(a'range(2),a'range(2)); begin for i in uu'range(1) loop for j in uu'range(2) loop uu(i,j) := 0; end loop; uu(i,i) := 1; end loop; column := a'first(2); for i in a'first(1)..a'last(1) loop pivot := column-1; -- find pivot for j in column..a'last(2) loop if a(i,j) /= 0 then pivot := j; exit; end if; end loop; if pivot >= column then if pivot /= column -- interchange if necessary then for k in a'range(1) loop temp := a(k,column); a(k,column) := a(k,pivot); a(k,pivot) := temp; end loop; for k in uu'range(1) loop temp := uu(k,column); uu(k,column) := uu(k,pivot); uu(k,pivot) := temp; end loop; end if; for j in (column+1)..a'last(2) loop -- make zeroes if a(i,j) /= 0 then aa := a(i,column); bb := a(i,j); gcd(aa,bb,ka,lb,d); aa := aa/d; bb := bb/d; if (aa = bb) and then ka = 0 then ka := lb; lb:= 0; end if; if (aa = -bb) and then ka = 0 then ka := -lb; lb := 0; end if; for k in i..a'last(1) loop a_kcolumn := a(k,column); a_kj := a(k,j); a(k,column) := a_kcolumn*ka + a_kj*lb; a(k,j) := a_kcolumn*(-bb) + a_kj*aa; end loop; for k in uu'range(1) loop a_kcolumn := uu(k,column); a_kj := uu(k,j); uu(k,column) := a_kcolumn*ka + a_kj*lb; uu(k,j) := a_kcolumn*(-bb) + a_kj*aa; end loop; end if; end loop; column := column + 1; end if; exit when column > a'last(2); end loop; u := uu; end Lower_Triangulate; procedure Lower_Triangulate ( a : in out Matrix ) is column,pivot,temp,aa,bb,ka,lb,d,a_kcolumn,a_kj : integer; begin column := a'first(2); for i in a'first(1)..a'last(1) loop pivot := column-1; -- find pivot for j in column..a'last(2) loop if a(i,j) /= 0 then pivot := j; exit; end if; end loop; if pivot >= column then if pivot /= column -- interchange if necessary then for k in a'range(1) loop temp := a(k,column); a(k,column) := a(k,pivot); a(k,pivot) := temp; end loop; end if; for j in (column+1)..a'last(2) loop -- make zeroes if a(i,j) /= 0 then aa := a(i,column); bb := a(i,j); gcd(aa,bb,ka,lb,d); aa := aa/d; bb := bb/d; if (aa = bb) and then ka = 0 then ka := lb; lb:= 0; end if; if (aa = -bb) and then ka = 0 then ka := -lb; lb := 0; end if; for k in i..a'last(1) loop a_kcolumn := a(k,column); a_kj := a(k,j); a(k,column) := a_kcolumn*ka + a_kj*lb; a(k,j) := a_kcolumn*(-bb) + a_kj*aa; end loop; end if; end loop; column := column + 1; end if; exit when column > a'last(2); end loop; end Lower_Triangulate; procedure Lower_Triangulate ( a : in out Matrix; ipvt : in out Vector ) is column,pivot,temp,aa,bb,ka,lb,d,a_kcolumn,a_kj : integer; begin column := a'first(2); for i in a'first(1)..a'last(1) loop pivot := column-1; -- find pivot for j in column..a'last(2) loop if a(i,j) /= 0 then pivot := j; exit; end if; end loop; if pivot >= column then if pivot /= column -- interchange if necessary then for k in a'range(1) loop temp := a(k,column); a(k,column) := a(k,pivot); a(k,pivot) := temp; end loop; temp := ipvt(column); ipvt(column) := ipvt(pivot); ipvt(pivot) := temp; end if; for j in (column+1)..a'last(2) loop -- make zeroes if a(i,j) /= 0 then aa := a(i,column); bb := a(i,j); gcd(aa,bb,ka,lb,d); aa := aa/d; bb := bb/d; if (aa = bb) and then ka = 0 then ka := lb; lb:= 0; end if; if (aa = -bb) and then ka = 0 then ka := -lb; lb := 0; end if; for k in i..a'last(1) loop a_kcolumn := a(k,column); a_kj := a(k,j); a(k,column) := a_kcolumn*ka + a_kj*lb; a(k,j) := a_kcolumn*(-bb) + a_kj*aa; end loop; end if; end loop; column := column + 1; end if; exit when column > a'last(2); end loop; end Lower_Triangulate; -- SELECTORS : function Det ( a : Matrix ) return integer is -- NOTE : -- The triangulation is implemented independently to keep track -- of row interchanges. res : integer := 1; m : matrix(a'range(1),a'range(2)); row,pivot,temp,aa,bb,ka,lb,d,m_rowk,m_ik : integer; begin m := a; -- triangulate m row := m'first(1); for j in m'first(2)..m'last(2) loop pivot := row-1; -- find pivot for i in row..m'last(1) loop if m(i,j) /= 0 then pivot := i; exit; end if; end loop; if pivot >= row then if pivot /= row -- interchange if necessary then for k in m'range(2) loop temp := m(row,k); m(row,k) := m(pivot,k); m(pivot,k) := temp; end loop; res := -res; end if; for i in (row+1)..m'last(1) loop -- make zeroes if m(i,j) /= 0 then aa := m(row,j); bb := m(i,j); gcd(aa,bb,ka,lb,d); aa := aa/d; bb := bb/d; if (aa = bb) and then ka = 0 then ka := lb; lb:= 0; end if; if (aa = -bb) and then ka = 0 then ka := -lb; lb := 0; end if; for k in j..m'last(2) loop m_rowk := m(row,k); m_ik := m(i,k); m(row,k) := ka*m_rowk + lb*m_ik; m(i,k) := -bb*m_rowk + aa*m_ik; end loop; end if; end loop; row := row + 1; end if; exit when row > m'last(1); end loop; for k in m'range(1) loop res := res*m(k,k); end loop; return res; end Det; function Per ( i,n : natural; a : matrix; kk : vector ) return natural is begin if i = n+1 then return 1; else declare res : natural := 0; kkk : vector(kk'range) := kk; begin for j in kk'range loop if a(i,j) /= 0 and then kk(j) /= 0 then kkk(j) := kkk(j) - 1; res := res + a(i,j)*Per(i+1,n,a,kkk); kkk(j) := kkk(j) + 1; end if; end loop; return res; end; end if; end Per; function Per ( i,n : natural; a : matrix; kk : vector; max : natural ) return natural is begin if i = n+1 then return 1; else declare res : natural := 0; kkk : vector(kk'range) := kk; begin for j in kk'range loop if a(i,j) /= 0 and then kk(j) /= 0 then kkk(j) := kkk(j) - 1; res := res + a(i,j)*Per(i+1,n,a,kkk,max); kkk(j) := kkk(j) + 1; end if; exit when res >= max; end loop; return res; end; end if; end Per; function Per ( a : matrix; k : vector ) return natural is -- ALGORITHM : -- Row expansion without memory, as developed by C.W. Wampler, -- see `Bezout Number Calculations for Multi-Homogeneous Polynomial -- Systems', Appl. Math. Comput. 51:(2-3), 143-157, 1992. begin return Per(1,a'last(1),a,k); end Per; function Per ( a : matrix; k : vector; max : natural ) return natural is -- ALGORITHM : -- Row expansion without memory, as developed by C.W. Wampler, -- see `Bezout Number Calculations for Multi-Homogeneous Polynomial -- Systems', Appl. Math. Comput. 51:(2-3), 143-157, 1992. begin return Per(1,a'last(1),a,k,max); end Per; function Rank ( a : Matrix ) return natural is res : natural := 0; m : Matrix(a'range(1),a'range(2)); column : integer; begin m := a; Upper_Triangulate(m); -- compute the length of chain of nonzero elements in m : -- search first nonzero element in first row of m : column := m'first(2)-1; for k in m'range(2) loop if m(m'first(1),k) /= 0 then column := k; end if; exit when (column = k); end loop; if column < m'first(2) then return 0; -- all elements of m are zero else for k in m'range(1) loop exit when column > m'last(2); if m(k,column) /= 0 then res := res + 1; else -- search for next nonzero element on row k : for l in column+1..m'last(2) loop if m(k,l) /= 0 then column := l; res := res + 1; end if; exit when (column = l); end loop; end if; column := column + 1; end loop; end if; return res; end Rank; -- DYNAMIC TRIANGULATOR : procedure Triangulate ( l : in integer; m : in out matrix; ipvt : in out vector; piv : out integer ) is -- DESCRIPTION : -- Updates lth row of m such that m remains upper triangular. pivot,tmp,a,b,lcmab,faca,facb : integer; index : integer; -- first nonzero element in previous row tmpv : vector(m'range(2)); begin Switch(ipvt,l,m); -- pivoting for previous unknowns index := 1; -- update : make l-1 zeroes in row l for k in 1..(l-1) loop if m(l,index) /= 0 and then m(k,index) /= 0 -- make m(l,index) zero then a := m(k,index); b := m(l,index); lcmab := lcm(a,b); if lcmab < 0 then lcmab := -lcmab; end if; facb := lcmab/b; faca := lcmab/a; if facb > 0 then for i in index..m'last(2) loop m(l,i) := facb*m(l,i) - faca*m(k,i); end loop; else for i in index..m'last(2) loop m(l,i) := -facb*m(l,i) + faca*m(k,i); end loop; end if; end if; if m(k,index) /= 0 then index := index + 1; end if; end loop; pivot := 0; -- search pivot for k in l..m'last(2)-1 loop if m(l,k) /= 0 then pivot := k; end if; exit when pivot /= 0; end loop; if pivot > l then for k in 1..l loop -- interchange columns l and pivot tmp := m(k,l); m(k,l) := m(k,pivot); m(k,pivot) := tmp; end loop; tmp := ipvt(l); ipvt(l) := ipvt(pivot); ipvt(pivot) := tmp; end if; piv := pivot; end Triangulate; procedure Switch ( ipvt : in vector; index : in integer; m : in out matrix ) is tmpv : Vector(m'range(2)); begin for k in tmpv'range loop tmpv(k) := m(index,k); end loop; for k in tmpv'range loop m(index,k) := tmpv(ipvt(k)); end loop; end Switch; procedure Switch ( ipvt : in vector; first,last : in integer; m : in out matrix) is tmpv : vector(m'range(2)); begin for index in first..last loop for k in tmpv'range loop tmpv(k) := m(index,k); end loop; for k in tmpv'range loop m(index,k) := tmpv(ipvt(k)); end loop; end loop; end Switch; procedure Switch ( l,pivot,index : in integer; m : in out matrix ) is tmp : integer; begin if l /= pivot then tmp := m(index,l); m(index,l) := m(index,pivot); m(index,pivot) := tmp; end if; end Switch; procedure Switch ( l,pivot : in integer; first,last : in integer; m : in out matrix ) is tmp : integer; begin if l /= pivot then for index in first..last loop tmp := m(index,l); m(index,l) := m(index,pivot); m(index,pivot) := tmp; end loop; end if; end Switch; -- SOLVERS : function Check0 ( a : Matrix; x : Vector ) return boolean is -- DESCRIPTION : -- Returns true if x is a solution of the system a*x = 0. tmp : Vector(a'range(1)); begin tmp := a*x; for i in tmp'range loop if tmp(i) /= 0 then return false; end if; end loop; return true; end Check0; procedure Solve0 ( a : in Matrix; x : in out Vector ) is -- ALGORITHM : -- An intermediate, generating matrix tmp will be constructed, -- such that -- 1) the solution x to tmp*x = 0 is the same of a*x = 0; -- 2) tmp(i,i) and tmp(i,ind) are the only nonzero entries. -- Before this construction, it will be checked whether there -- exists a zero column and the index ind must be determined. -- After the definition of tmp, the back substitution process -- yields a solution. piv,ind : integer; tmp : Matrix(a'first(1)..(a'last(1)+1),a'range(2)); pivots,res : Vector(x'range); zero_column : boolean; begin -- initialization of tmp,ind and pivots : for i in tmp'range(1) loop for j in tmp'range(2) loop tmp(i,j) := 0; end loop; end loop; for i in pivots'range loop pivots(i) := i; end loop; ind := x'first(1)-1; for i in a'range(1) loop piv := pivots'first-1; for j in a'range(2) loop if a(i,j) /= 0 then piv := pivots(j); pivots(j) := pivots(i); pivots(i) := piv; exit; end if; end loop; zero_column := true; for j in a'first(1)..i loop tmp(j,i) := a(j,pivots(i)); if zero_column and then tmp(j,i) /= 0 then zero_column := false; end if; end loop; if piv < pivots'first or else zero_column or else tmp(i,i) = 0 then ind := i; exit; end if; end loop; if zero_column then x := (x'range => 0); x(ind) := 1; elsif (ind < x'first(1)) and (a'last(1) >= a'last(2)) then x := (x'range => 0); else if ind < x'first(1) then ind := a'last(1)+1; for j in tmp'range(2) loop tmp(ind,j) := 0; end loop; zero_column := true; for j in a'range(1) loop tmp(j,ind) := a(j,pivots(ind)); if zero_column and then tmp(j,ind) /= 0 then zero_column := false; end if; end loop; end if; if zero_column then x := (x'range => 0); x(ind) := 1; else -- construct generating matrix : for i in reverse (tmp'first(2)+1)..(ind-1) loop -- i = column for k in tmp'first(1)..(i-1) loop if tmp(k,i) /= 0 -- make tmp(k,i) zero then declare aa,bb,d : integer; begin aa := tmp(i,i); bb := tmp(k,i); d := gcd(aa,bb); aa := aa/d; bb := bb/d; for l in k..(i-1) loop tmp(k,l) := aa*tmp(k,l); -- tmp(i,l) = 0 end loop; tmp(k,i) := 0; --aa*tmp(k,i) - bb*tmp(i,i); tmp(k,ind) := aa*tmp(k,ind) - bb*tmp(i,ind); end; Scale(tmp,k,k); -- to avoid numeric_error end if; end loop; -- upper half of ith colum consists of zero entries end loop; -- generate x by back substitution : x(ind) := tmp(x'first,x'first); for i in (x'first+1)..(ind-1) loop if tmp(i,i) /= 0 then x(ind) := lcm(tmp(i,i),x(ind)); end if; end loop; for i in x'first..(ind-1) loop if tmp(i,i) = 0 then x(i) := 0; else x(i) := -(tmp(i,ind)*x(ind))/tmp(i,i); end if; end loop; end if; end if; res := (res'range => 0); -- take pivots into account for i in x'first..ind loop res(pivots(i)) := x(i); end loop; x := res; end Solve0; procedure Solve1 ( a : in Matrix; x : in out Vector; b : in Vector; fail : out boolean ) is begin fail := false; for i in reverse x'range loop x(i) := b(i); for j in (i+1)..x'last loop x(i) := x(i) - a(i,j)*x(j); end loop; if x(i) /= 0 and then a(i,i) /= 0 then if x(i) mod a(i,i) = 0 then x(i) := x(i)/a(i,i); else fail := true; return; end if; end if; end loop; end Solve1; procedure Solve1 ( a : in Matrix; b : in out Vector; fail : out boolean ) is begin fail := false; for i in reverse b'range loop for j in (i+1)..b'last loop b(i) := b(i) - a(i,j)*b(j); end loop; if b(i) /= 0 and then a(i,i) /= 0 then if b(i) mod a(i,i) = 0 then b(i) := b(i)/a(i,i); else fail := true; return; end if; end if; end loop; end Solve1; function Solve ( m : Matrix; ipvt : Vector ) return vector is x,res : vector(ipvt'range); a : matrix(m'first(1)..m'last(1)-1,m'range(2)); ind : integer := a'first(1); -- index for the current row number cnt0 : natural := 0; -- counts the number of zero rows begin for k in a'range(1) loop if m(k,k) /= 0 -- otherwise : skip zero row ! then for l in a'range(2) loop a(ind,l) := m(k,l); end loop; ind := ind + 1; else for l in a'range(2) loop a(a'last(1) - cnt0,l) := m(k,l); end loop; cnt0 := cnt0 + 1; end if; end loop; x := (x'range => 0); Solve0(a,x); for k in res'range loop res(ipvt(k)) := x(k); end loop; if res(res'last) < 0 then return -res; else return res; end if; end Solve; end Integer_Linear_System_Solvers; SHAR_EOF fi # end of overwriting check if test -f 'integer_linear_system_solvers.ads' then echo shar: will not over-write existing file "'integer_linear_system_solvers.ads'" else cat << "SHAR_EOF" > 'integer_linear_system_solvers.ads' with Integer_Vectors,Integer_Matrices; use Integer_Vectors,Integer_Matrices; package Integer_Linear_System_Solvers is -- DESCRIPTION : -- This package offers a data abstraction and operations for -- working with matrices of integer numbers. -- DISCLAIMER : -- One should be aware of the fact that by using the standard integer type -- of Ada, overflow can always occur... Scaling might sometimes help. -- SCALERS : function Scale ( a : Matrix ) return Matrix; procedure Scale ( a : in out Matrix; v : out Vector ); procedure Scale ( a : in out Matrix ); -- DESCRIPTION : -- Every row of the matrix will be divided by the greatest commom divisor -- of the elements on that row. The divisors are returned in the vector v -- if the appropiate call has been made. procedure Scale ( a : in out Matrix; row,col : in integer ); -- DESCRIPTION : -- Scales a(row,col..a'last(2)). -- STATIC TRIANGULATORS : procedure Upper_Triangulate ( l : out Matrix; a : in out Matrix ); procedure Upper_Triangulate ( a : in out Matrix ); -- DESCRIPTION : -- a := l*a, l makes a upper triangular, -- l*a becomes then the Hermite normal form of a. -- ON ENTRY : -- a an integer matrix. -- ON RETURN : -- l the transformation matrix; -- a the triangulated matrix. procedure Lower_Triangulate ( a : in out Matrix; u : out Matrix ); procedure Lower_Triangulate ( a : in out Matrix ); -- DESCRIPTION : -- a := a*u, u makes a lower triangular. -- ON ENTRY : -- a an integer matrix. -- ON RETURN : -- a the triangulated matrix; -- u the transformation matrix. -- DYNAMIC TRIANGULATOR : procedure Triangulate ( l : in integer; m : in out matrix; ipvt : in out vector; piv : out integer ); -- DESCRIPTION : -- Updates lth row of m such that m remains upper triangular. -- Note that the last column of m will never be involved in -- pivoting operations. In this way, one can regard the last -- column of m as the right hand side of the system a*x = b, -- with m = [a|-b]. -- REQUIRED : l in m'range(1) and m'range(2) = ipvt'range. -- ON ENTRY : -- l indicates which row in m that has to be updated; -- m first l-1 rows are upper triangular; -- ipvt contains the pivoting information; -- ON RETURN : -- m m(1..l,m'range(2)) is upper triangular; -- ipvt updated pivoting information; -- piv first entry on lth row of m that was nonzero, -- if piv /= l then two columns have been interchanged. -- if piv = 0, then m(l,i) = 0, for i < m'last(2). procedure Switch ( ipvt : in vector; first,last : in integer; m : in out matrix); procedure Switch ( ipvt : in vector; index : in integer; m : in out matrix ); procedure Switch ( l,pivot,index : in integer; m : in out matrix ); procedure Switch ( l,pivot : in integer; first,last : in integer; m : in out matrix ); -- DESCRIPTION : -- Performs column interchangements on m(first..last) or m(index), -- with the pivoting information generated by Triangulate, -- w.r.t. the lth unknown and pivot, or w.r.t. the pivoting vector ipvt. -- SELECTORS : function Det ( a : Matrix ) return integer; -- DESCRIPTION : -- First the matrix a will be triangulated and then -- the determinant of the matrix a will be returned. function Per ( a : matrix; k : vector ) return natural; function Per ( a : matrix; k : vector; max : natural ) return natural; -- DESCRIPTION : Returns the permanent of a matrix. -- ON ENTRY -- a (n*m)-matrix, with m <= n; -- k vector(1..m), k(i) indicates the multiplicity -- of the ith column; -- max the computation stops when the result >= max. function Rank ( a : Matrix ) return natural; -- DESCRIPTION : -- returns the rank of the matrix a. -- SOLVERS : procedure Solve0 ( a : in Matrix; x : in out Vector ); -- DESCRIPTION : -- computes a solution of a*x = 0; where a is upper triangular. -- If the number of linear independent rows in a is less than -- the number of colums in a, then x will have a nonzero component. -- REQUIRED : -- a'range(2) = x'range; -- Scale(a) should be applied before calling this procedure. procedure Solve1 ( a : in Matrix; x : in out Vector; b : in Vector; fail : out boolean ); -- DESCRIPTION : -- computes the solution of a*x = b, where a is upper triangular. -- If Det(a)*Det(a) /= 1, then an integer solutions cannot be -- guaranteed, so fail can become true. -- REQUIRED : -- The matrix a must be square and all ranges must match. procedure Solve1 ( a : in Matrix; b : in out Vector; fail : out boolean ); -- DESCRIPTION : -- computes the solution of a*x = b, where a is upper triangular, -- but after computation, the vector x is stored in b. -- If Det(a)*Det(a) /= 1, then an integer solution cannot be -- guaranteed, so fail can become true. -- REQUIRED : -- The matrix a must be square and all ranges must be the same. function Solve ( m : matrix; ipvt : vector ) return vector; -- DESCRIPTION : -- Solves the system defined by m*x = 0, with m an upper triangular -- matrix. The vector ipvt contains the pivoting information: -- ipvt(k) = position of kth column. -- REQUIRED : m'range(2) = m'range(1). -- ON RETURN : solution vector with nonnegative last component. end Integer_Linear_System_Solvers; SHAR_EOF fi # end of overwriting check if test -f 'integer_matrices.adb' then echo shar: will not over-write existing file "'integer_matrices.adb'" else cat << "SHAR_EOF" > 'integer_matrices.adb' package body Integer_Matrices is -- MATRIX-MATRIX OPERATIONS : function "+" ( a,b : Matrix ) return Matrix is r : Matrix(a'range(1),a'range(2)); begin for i in r'range(1) loop for j in r'range(2) loop r(i,j) := a(i,j) + b(i,j); end loop; end loop; return r; end "+"; function "-" ( a,b : Matrix ) return Matrix is r : Matrix(a'range(1),a'range(2)); begin for i in r'range(1) loop for j in r'range(2) loop r(i,j) := a(i,j) - b(i,j); end loop; end loop; return r; end "-"; function "-" ( a : Matrix ) return Matrix is r : Matrix(a'range(1),a'range(2)); begin for i in r'range(1) loop for j in r'range(2) loop r(i,j) := -a(i,j); end loop; end loop; return r; end "-"; function "*" ( a,b : Matrix ) return Matrix is r : Matrix(a'range(1),b'range(2)); begin for i in r'range(1) loop for j in r'range(2) loop r(i,j) := 0; for k in a'range(2) loop r(i,j) := r(i,j) + a(i,k)*b(k,j); end loop; end loop; end loop; return r; end "*"; procedure Mult1 ( a : in out Matrix; b : in Matrix ) is temp : Vector(a'range(2)); begin for i in a'range(1) loop for j in b'range(2) loop temp(j) := 0; for k in a'range(2) loop temp(j) := temp(j) + a(i,k)*b(k,j); end loop; end loop; for j in a'range(2) loop a(i,j) := temp(j); end loop; end loop; end Mult1; procedure Mult2 ( a : in Matrix; b : in out Matrix ) is temp : Vector(a'range(1)); begin for i in b'range(2) loop for j in a'range(1) loop temp(j) := 0; for k in a'range(1) loop temp(j) := temp(j) + a(j,k)*b(k,i); end loop; end loop; for j in b'range(1) loop b(j,i) := temp(j); end loop; end loop; end Mult2; -- MATRIX-VECTOR OPERATIONS : function "*" ( a : Matrix; v : Vector ) return Vector is r : Vector(a'range(1)); begin for i in r'range loop r(i) := 0; for j in a'range(2) loop r(i) := r(i) + a(i,j)*v(j); end loop; end loop; return r; end "*"; function "*" ( v : Vector; a : Matrix ) return Vector is r : Vector(a'range(2)); begin for j in r'range loop r(j) := 0; for i in a'range(1) loop r(j) := r(j) + v(i)*a(i,j); end loop; end loop; return r; end "*"; procedure Mult ( a : in Matrix; v : in out Vector ) is iv : Vector(v'range); begin for i in iv'range loop iv(i) := 0; for j in a'range(2) loop iv(i) := iv(i) + a(i,j)*v(j); end loop; end loop; for i in v'range loop v(i) := iv(i); end loop; end Mult; procedure Mult ( v : in out Vector; a : in Matrix ) is iv : Vector(v'range); begin for j in iv'range loop iv(j) := 0; for i in a'range(1) loop iv(j) := iv(j) + v(j)*a(i,j); end loop; end loop; for i in v'range loop v(i) := iv(i); end loop; end Mult; end Integer_Matrices; SHAR_EOF fi # end of overwriting check if test -f 'integer_matrices.ads' then echo shar: will not over-write existing file "'integer_matrices.ads'" else cat << "SHAR_EOF" > 'integer_matrices.ads' with Integer_Vectors; use Integer_Vectors; package Integer_Matrices is -- DESCRIPTION : -- This package offers a data abstraction and operations for -- working with matrices of integer numbers. type Matrix is array ( integer range <>, integer range <> ) of integer; -- MATRIX-MATRIX OPERATIONS : function "+" ( a,b : Matrix ) return Matrix; -- return a+b function "-" ( a,b : Matrix ) return Matrix; -- return a-b function "-" ( a : Matrix ) return Matrix; -- return -a function "*" ( a,b : Matrix ) return Matrix; -- return a*b procedure Mult1 ( a : in out Matrix; b : in Matrix ); -- a := a*b procedure Mult2 ( a : in Matrix; b : in out Matrix ); -- b := a*b -- MATRIX-VECTOR OPERATIONS : function "*" ( a : Matrix; v : Vector ) return Vector; -- return a*v function "*" ( v : Vector; a : Matrix ) return Vector; -- return v*a procedure Mult ( a : in Matrix; v : in out Vector ); -- v := a*v procedure Mult ( v : in out Vector; a : in Matrix ); -- v := v*v end Integer_Matrices; SHAR_EOF fi # end of overwriting check if test -f 'integer_matrices_io.adb' then echo shar: will not over-write existing file "'integer_matrices_io.adb'" else cat << "SHAR_EOF" > 'integer_matrices_io.adb' with integer_io; use integer_io; package body Integer_Matrices_io is procedure get ( m : out Matrix ) is begin get(Standard_Input,m); end get; procedure get ( m : out Matrix; rw1,rw2 : in integer ) is begin get(Standard_Input,m,rw1,rw2); end get; procedure get ( file : in file_type; m : out Matrix ) is begin for i in m'range(1) loop for j in m'range(2) loop get(file,m(i,j)); end loop; end loop; end get; procedure get ( file : in file_type; m : out Matrix; rw1,rw2 : in integer ) is begin for i in rw1..rw2 loop for j in m'range(2) loop get(file,m(i,j)); end loop; end loop; end get; procedure put ( m : in Matrix ) is begin put(Standard_Output,m); end put; procedure put ( m : in Matrix; width : in natural ) is begin put(Standard_Output,m,width); end put; procedure put ( m : in Matrix; rw1,rw2 : in integer ) is begin put(Standard_Output,m,rw1,rw2); end put; procedure put ( file : in file_type; m : in Matrix ) is begin for i in m'range(1) loop for j in m'range(2) loop put(file,' '); put(file,m(i,j),1); end loop; new_line(file); end loop; end put; procedure put ( file : in file_type; m : in Matrix; width : in natural ) is begin for i in m'range(1) loop for j in m'range(2) loop put(file,' '); put(file,m(i,j),width); end loop; new_line(file); end loop; end put; procedure put ( file : in file_type; m : in Matrix; rw1,rw2 : in integer ) is begin for i in rw1..rw2 loop for j in m'range(2) loop put(file,' '); put(file,m(i,j),1); end loop; new_line(file); end loop; end put; end Integer_Matrices_io; SHAR_EOF fi # end of overwriting check if test -f 'integer_matrices_io.ads' then echo shar: will not over-write existing file "'integer_matrices_io.ads'" else cat << "SHAR_EOF" > 'integer_matrices_io.ads' with text_io,Integer_Matrices; use text_io,Integer_Matrices; package Integer_Matrices_io is -- DESCRIPTION : -- This package contains routines for input and output -- of integer matrices. procedure get ( m : out Matrix ); procedure get ( file : in file_type; m : out Matrix ); procedure get ( m : out Matrix; rw1,rw2 : in integer ); procedure get ( file : in file_type; m : out Matrix; rw1,rw2 : in integer ); -- DESCRIPTION : -- Reads an integer matrix m or m(rw1..rw2,m'range(2)) -- from standard input or on file. procedure put ( m : in Matrix ); procedure put ( file : in file_type; m : in Matrix ); procedure put ( m : in Matrix; width : in natural ); procedure put ( file : in file_type; m : in Matrix; width : in natural ); -- DESCRIPTION : -- Writes an integer matrix m on file or on standard output. -- The width of the columns can be given as parameter. -- By default, only one additional spacing is used to separate -- the columns. procedure put ( m : in Matrix; rw1,rw2 : in integer ); procedure put ( file : in file_type; m : in Matrix; rw1,rw2 : in integer ); -- DESCRIPTION : -- Writes an integer matrix m or m(rw1..rw2,m'range(2)) -- on standard output or on file. end Integer_Matrices_io; SHAR_EOF fi # end of overwriting check if test -f 'integer_vectors.ads' then echo shar: will not over-write existing file "'integer_vectors.ads'" else cat << "SHAR_EOF" > 'integer_vectors.ads' with Vectors; with Integer_Instantiation_Parameters; use Integer_Instantiation_Parameters; package Integer_Vectors is new Vectors (integer,0,clear,copy,equal,"+","-","-","*", Plus_Int,Min_Int,Min_Int,Mult_Int); SHAR_EOF fi # end of overwriting check if test -f 'integer_vectors_io.adb' then echo shar: will not over-write existing file "'integer_vectors_io.adb'" else cat << "SHAR_EOF" > 'integer_vectors_io.adb' with integer_io; use integer_io; package body Integer_Vectors_io is procedure get ( v : in out Vector ) is begin get(Standard_Input,v); end get; procedure get ( file : in file_type; v : in out Vector ) is begin for i in v'range loop get(file,v(i)); end loop; end get; procedure get ( n : in natural; v : out Link_to_Vector ) is begin get(Standard_Input,n,v); end get; procedure get ( file : in file_type; n : in natural; v : out Link_to_Vector ) is vv : Vector(1..n); begin for i in vv'range loop get(file,vv(i)); end loop; v := new Vector'(vv); end get; procedure put ( v : in Vector ) is begin put(Standard_Output,v); end put; procedure put ( file : in file_type; v : in Vector ) is begin for i in v'range loop put(file,' '); put(file,v(i),1); end loop; end put; procedure put ( v : in Link_to_Vector ) is begin put(Standard_Output,v); end put; procedure put ( file : in file_type; v : in Link_to_Vector ) is begin if v /= null then put(file,v.all); end if; end put; end Integer_Vectors_io; SHAR_EOF fi # end of overwriting check if test -f 'integer_vectors_io.ads' then echo shar: will not over-write existing file "'integer_vectors_io.ads'" else cat << "SHAR_EOF" > 'integer_vectors_io.ads' with text_io,Integer_Vectors; use text_io,Integer_Vectors; package Integer_Vectors_io is -- DESCRIPTION : -- This package contains routines for input and output -- of vectors with integer entries. procedure get ( v : in out Vector ); procedure get ( file : in file_type; v : in out Vector ); -- DESCRIPTION : -- integer number will be read from standard input or from file, -- until all entries of v are filled. procedure get ( n : in natural; v : out Link_to_Vector ); procedure get ( file : in file_type; n : in natural; v : out Link_to_Vector ); -- DESCRIPTION : -- n integer numbers are read from standard input or from file. procedure put ( v : in Vector ); procedure put ( file : in file_type; v : in Vector ); procedure put ( v : in Link_to_Vector ); procedure put ( file : in file_type; v : in Link_to_Vector ); -- DESCRIPTION : -- the vector v is written on standard output or on file. end Integer_Vectors_io; SHAR_EOF fi # end of overwriting check if test -f 'integer_vectors_of_vectors.ads' then echo shar: will not over-write existing file "'integer_vectors_of_vectors.ads'" else cat << "SHAR_EOF" > 'integer_vectors_of_vectors.ads' with Vectors,Integer_Vectors; use Integer_Vectors; package Integer_Vectors_of_Vectors is new Vectors (Link_to_Vector,null,clear,copy,equal,"+","-","-","*", Plus_Vector,Min_Vector,Min_Vector,Mult_Vector); SHAR_EOF fi # end of overwriting check if test -f 'integer_vectors_of_vectors_io.adb' then echo shar: will not over-write existing file "'integer_vectors_of_vectors_io.adb'" else cat << "SHAR_EOF" > 'integer_vectors_of_vectors_io.adb' with Integer_Vectors_io; use Integer_Vectors_io; package body Integer_Vectors_of_Vectors_io is procedure get ( m : in natural; v : in out Vector ) is begin get(Standard_Input,m,v); end get; procedure get ( file : in file_type; m : in natural; v : in out Vector ) is begin for i in v'range loop get(file,m,v(i)); end loop; end get; procedure get ( n,m : in natural; v : out Link_to_Vector ) is begin get(Standard_Input,n,m,v); end get; procedure get ( file : in file_type; n,m : in natural; v : out Link_to_Vector ) is vv : Vector(1..n); begin for i in vv'range loop get(file,m,vv(i)); end loop; v := new Vector'(vv); end get; procedure put ( v : in Vector ) is begin put(Standard_Output,v); end put; procedure put ( file : in file_type; v : in Vector ) is begin for i in v'range loop put(file,v(i)); new_line(file); end loop; end put; procedure put ( v : in Link_to_Vector ) is begin put(Standard_Output,v); end put; procedure put ( file : in file_type; v : in Link_to_Vector ) is begin if v /= null then put(file,v.all); end if; end put; end Integer_Vectors_of_Vectors_io; SHAR_EOF fi # end of overwriting check if test -f 'integer_vectors_of_vectors_io.ads' then echo shar: will not over-write existing file "'integer_vectors_of_vectors_io.ads'" else cat << "SHAR_EOF" > 'integer_vectors_of_vectors_io.ads' with text_io; use text_io; with Integer_Vectors_of_Vectors; use Integer_Vectors_of_Vectors; package Integer_Vectors_of_Vectors_io is -- DESCRIPTION : -- This package contains routines for input and output -- of vectors of vectors with integer entries. procedure get ( m : in natural; v : in out Vector ); procedure get ( file : in file_type; m : in natural; v : in out Vector ); -- DESCRIPTION : -- Integer numbers will be read from standard input or from file, -- until all entries of v are filled. -- The entries of v will be vectors of dimension m. procedure get ( n,m : in natural; v : out Link_to_Vector ); procedure get ( file : in file_type; n,m : in natural; v : out Link_to_Vector ); -- DESCRIPTION : -- n integer vectors of dimension m are read from standard input -- or from file. procedure put ( v : in Vector ); procedure put ( file : in file_type; v : in Vector ); procedure put ( v : in Link_to_Vector ); procedure put ( file : in file_type; v : in Link_to_Vector ); -- DESCRIPTION : -- The vector v is written on standard output or on file. -- For each new element of v, a new line begins. end Integer_Vectors_of_Vectors_io; SHAR_EOF fi # end of overwriting check if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' # Establishing the links : linkrc = ../../../Ada/Math_Lib/Matrices links: @-ln -s $(linkrc)/vectors.a vectors.ads @-ln -s $(linkrc)/vectorsB.a vectors.adb @-ln -s $(linkrc)/nat_vec.a natural_vectors.ads @-ln -s $(linkrc)/nat_vec_io.a natural_vectors_io.ads @-ln -s $(linkrc)/nat_vec_ioB.a natural_vectors_io.adb @-ln -s $(linkrc)/int_vec.a integer_vectors.ads @-ln -s $(linkrc)/int_vec_io.a integer_vectors_io.ads @-ln -s $(linkrc)/int_vec_ioB.a integer_vectors_io.adb @-ln -s $(linkrc)/flt_vec.a float_vectors.ads @-ln -s $(linkrc)/flt_vec_io.a float_vectors_io.ads @-ln -s $(linkrc)/flt_vec_ioB.a float_vectors_io.adb @-ln -s $(linkrc)/cmp_vec.a complex_vectors.ads @-ln -s $(linkrc)/cmp_vec_io.a complex_vectors_io.ads @-ln -s $(linkrc)/cmp_vec_ioB.a complex_vectors_io.adb @-ln -s $(linkrc)/nat_vvc.a natural_vectors_of_vectors.ads @-ln -s $(linkrc)/nat_vvc_io.a natural_vectors_of_vectors_io.ads @-ln -s $(linkrc)/nat_vvc_ioB.a natural_vectors_of_vectors_io.adb @-ln -s $(linkrc)/int_vvc.a integer_vectors_of_vectors.ads @-ln -s $(linkrc)/int_vvc_io.a integer_vectors_of_vectors_io.ads @-ln -s $(linkrc)/int_vvc_ioB.a integer_vectors_of_vectors_io.adb @-ln -s $(linkrc)/flt_vvc.a float_vectors_of_vectors.ads @-ln -s $(linkrc)/flt_vvc_io.a float_vectors_of_vectors_io.ads @-ln -s $(linkrc)/flt_vvc_ioB.a float_vectors_of_vectors_io.adb @-ln -s $(linkrc)/cmp_vvc.a complex_vectors_of_vectors.ads @-ln -s $(linkrc)/cmp_vvc_io.a complex_vectors_of_vectors_io.ads @-ln -s $(linkrc)/cmp_vvc_ioB.a complex_vectors_of_vectors_io.adb @-ln -s $(linkrc)/cmp_norms.a complex_norms.ads @-ln -s $(linkrc)/cmp_normsB.a complex_norms.adb @-ln -s $(linkrc)/int_mat.a integer_matrices.ads @-ln -s $(linkrc)/int_matB.a integer_matrices.adb @-ln -s $(linkrc)/int_mat_io.a integer_matrices_io.ads @-ln -s $(linkrc)/int_mat_ioB.a integer_matrices_io.adb @-ln -s $(linkrc)/flt_mat.a float_matrices.ads @-ln -s $(linkrc)/flt_matB.a float_matrices.adb @-ln -s $(linkrc)/flt_mat_io.a float_matrices_io.ads @-ln -s $(linkrc)/flt_mat_ioB.a float_matrices_io.adb @-ln -s $(linkrc)/cmp_mat.a complex_matrices.ads @-ln -s $(linkrc)/cmp_matB.a complex_matrices.adb @-ln -s $(linkrc)/cmp_mat_io.a complex_matrices_io.ads @-ln -s $(linkrc)/cmp_mat_ioB.a complex_matrices_io.adb @-ln -s $(linkrc)/gcd.a greatest_common_divisor.ads @-ln -s $(linkrc)/gcdB.a greatest_common_divisor.adb @-ln -s $(linkrc)/int_lss.a integer_linear_system_solvers.ads @-ln -s $(linkrc)/int_lssB.a integer_linear_system_solvers.adb @-ln -s $(linkrc)/int_lis.a integer_linear_inequality_solvers.ads @-ln -s $(linkrc)/int_lisB.a integer_linear_inequality_solvers.adb @-ln -s $(linkrc)/flt_lss.a float_linear_system_solvers.ads @-ln -s $(linkrc)/flt_lssB.a float_linear_system_solvers.adb @-ln -s $(linkrc)/cmp_lss.a complex_linear_system_solvers.ads @-ln -s $(linkrc)/cmp_lssB.a complex_linear_system_solvers.adb SHAR_EOF fi # end of overwriting check if test -f 'natural_vectors.ads' then echo shar: will not over-write existing file "'natural_vectors.ads'" else cat << "SHAR_EOF" > 'natural_vectors.ads' with Vectors; with Natural_Instantiation_Parameters; use Natural_Instantiation_Parameters; package Natural_Vectors is new Vectors (natural,0,clear,copy,equal,"+","-","-","*", Plus_Nat,Min_Nat,Min_Nat,Mult_Nat); SHAR_EOF fi # end of overwriting check if test -f 'natural_vectors_io.adb' then echo shar: will not over-write existing file "'natural_vectors_io.adb'" else cat << "SHAR_EOF" > 'natural_vectors_io.adb' with integer_io; use integer_io; package body Natural_Vectors_io is procedure get ( v : in out Vector ) is begin get(Standard_Input,v); end get; procedure get ( file : in file_type; v : in out Vector ) is begin for i in v'range loop get(file,v(i)); end loop; end get; procedure get ( n : in natural; v : out Link_to_Vector ) is begin get(Standard_Input,n,v); end get; procedure get ( file : in file_type; n : in natural; v : out Link_to_Vector ) is vv : Vector(1..n); begin for i in vv'range loop get(file,vv(i)); end loop; v := new Vector'(vv); end get; procedure put ( v : in Vector ) is begin put(Standard_Output,v); end put; procedure put ( file : in file_type; v : in Vector ) is begin for i in v'range loop put(file,' '); put(file,v(i),1); end loop; end put; procedure put ( v : in Link_to_Vector ) is begin put(Standard_Output,v); end put; procedure put ( file : in file_type; v : in Link_to_Vector ) is begin if v /= null then put(file,v.all); end if; end put; end Natural_Vectors_io; SHAR_EOF fi # end of overwriting check if test -f 'natural_vectors_io.ads' then echo shar: will not over-write existing file "'natural_vectors_io.ads'" else cat << "SHAR_EOF" > 'natural_vectors_io.ads' with text_io,Natural_Vectors; use text_io,Natural_Vectors; package Natural_Vectors_io is -- DESCRIPTION : -- This package contains routines for input and output -- of vectors with natural entries. procedure get ( v : in out Vector ); procedure get ( file : in file_type; v : in out Vector ); -- DESCRIPTION : -- natural number will be read from standard input or from file, -- until all entries of v are filled. procedure get ( n : in natural; v : out Link_to_Vector ); procedure get ( file : in file_type; n : in natural; v : out Link_to_Vector ); -- DESCRIPTION : -- n natural numbers are read from standard input or from file. procedure put ( v : in Vector ); procedure put ( file : in file_type; v : in Vector ); procedure put ( v : in Link_to_Vector ); procedure put ( file : in file_type; v : in Link_to_Vector ); -- DESCRIPTION : -- the vector v is written on standard output or on file. end Natural_Vectors_io; SHAR_EOF fi # end of overwriting check if test -f 'natural_vectors_of_vectors.ads' then echo shar: will not over-write existing file "'natural_vectors_of_vectors.ads'" else cat << "SHAR_EOF" > 'natural_vectors_of_vectors.ads' with Vectors,Natural_Vectors; use Natural_Vectors; package Natural_Vectors_of_Vectors is new Vectors (Link_to_Vector,null,clear,copy,equal,"+","-","-","*", Plus_Vector,Min_Vector,Min_Vector,Mult_Vector); SHAR_EOF fi # end of overwriting check if test -f 'natural_vectors_of_vectors_io.adb' then echo shar: will not over-write existing file "'natural_vectors_of_vectors_io.adb'" else cat << "SHAR_EOF" > 'natural_vectors_of_vectors_io.adb' with Natural_Vectors_io; use Natural_Vectors_io; package body Natural_Vectors_of_Vectors_io is procedure get ( m : in natural; v : in out Vector ) is begin get(Standard_Input,m,v); end get; procedure get ( file : in file_type; m : in natural; v : in out Vector ) is begin for i in v'range loop get(file,m,v(i)); end loop; end get; procedure get ( n,m : in natural; v : out Link_to_Vector ) is begin get(Standard_Input,n,m,v); end get; procedure get ( file : in file_type; n,m : in natural; v : out Link_to_Vector ) is vv : Vector(1..n); begin for i in vv'range loop get(file,m,vv(i)); end loop; v := new Vector'(vv); end get; procedure put ( v : in Vector ) is begin put(Standard_Output,v); end put; procedure put ( file : in file_type; v : in Vector ) is begin for i in v'range loop put(file,v(i)); new_line(file); end loop; end put; procedure put ( v : in Link_to_Vector ) is begin put(Standard_Output,v); end put; procedure put ( file : in file_type; v : in Link_to_Vector ) is begin if v /= null then put(file,v.all); end if; end put; end Natural_Vectors_of_Vectors_io; SHAR_EOF fi # end of overwriting check if test -f 'natural_vectors_of_vectors_io.ads' then echo shar: will not over-write existing file "'natural_vectors_of_vectors_io.ads'" else cat << "SHAR_EOF" > 'natural_vectors_of_vectors_io.ads' with text_io; use text_io; with Natural_Vectors_of_Vectors; use Natural_Vectors_of_Vectors; package Natural_Vectors_of_Vectors_io is -- DESCRIPTION : -- This package contains routines for input and output -- of vectors of vectors with natural entries. procedure get ( m : in natural; v : in out Vector ); procedure get ( file : in file_type; m : in natural; v : in out Vector ); -- DESCRIPTION : -- Natural number will be read from standard input or from file, -- until all entries of v are filled. -- The entries of v will be vectors of dimension m. procedure get ( n,m : in natural; v : out Link_to_Vector ); procedure get ( file : in file_type; n,m : in natural; v : out Link_to_Vector ); -- DESCRIPTION : -- n natural vectors of dimension m are read from standard input -- or from file. procedure put ( v : in Vector ); procedure put ( file : in file_type; v : in Vector ); procedure put ( v : in Link_to_Vector ); procedure put ( file : in file_type; v : in Link_to_Vector ); -- DESCRIPTION : -- The vector v is written on standard output or on file. -- For each new element of v, a new line begins. end Natural_Vectors_of_Vectors_io; SHAR_EOF fi # end of overwriting check if test -f 'vectors.adb' then echo shar: will not over-write existing file "'vectors.adb'" else cat << "SHAR_EOF" > 'vectors.adb' with unchecked_deallocation; package body Vectors is procedure Clear ( v : in out Vector ) is begin for i in v'range loop clear(v(i)); end loop; end Clear; function Equal ( v1,v2 : Vector ) return boolean is begin if v1'first /= v2'first or else v1'last /= v2'last then return false; else for i in v1'range loop if not equal(v1(i),v2(i)) then return false; end if; end loop; return true; end if; end Equal; procedure Copy ( v1: in Vector; v2 : in out Vector ) is begin if v1'first /= v2'first or else v1'last /= v2'last then raise Range_Error; else Clear(v2); for i in v1'range loop copy(v1(i),v2(i)); end loop; end if; end Copy; function "+" ( v1,v2 : Vector ) return Vector is begin if v1'first /= v2'first or else v1'last /= v2'last then raise Range_Error; else declare res : Vector(v1'range); begin for i in v1'range loop res(i) := v1(i) + v2(i); end loop; return res; end; end if; end "+"; function "-" ( v : Vector ) return Vector is res : Vector(v'range); begin for i in v'range loop res(i) := -v(i); end loop; return res; end "-"; function "-" ( v1,v2 : Vector ) return Vector is begin if v1'first /= v2'first or else v1'last /= v2'last then raise Range_Error; else declare res : Vector(v1'range); begin for i in v1'range loop res(i) := v1(i) - v2(i); end loop; return res; end; end if; end "-"; function "*" ( v : Vector; a : coefftp ) return Vector is res : Vector(v'range); begin for i in v'range loop res(i) := v(i) * a; end loop; return res; end "*"; function "*" ( a : coefftp; v : Vector ) return Vector is begin return v*a; end "*"; function "*" ( v1,v2 : Vector ) return coefftp is begin if v1'first /= v2'first or else v1'last /= v2'last then raise Range_Error; else declare temp,sum : coefftp := zero; begin for i in v1'range loop temp := v1(i)*v2(i); Plus_Coeff(sum,temp); clear(temp); end loop; return sum; end; end if; end "*"; function "*" ( v1,v2 : Vector ) return Vector is begin if v1'first /= v2'first or else v1'last /= v2'last then raise Range_Error; else declare res : Vector(v1'range); begin for i in v1'range loop res(i) := v1(i)*v2(i); end loop; return res; end; end if; end "*"; function Sum ( v : Vector ) return coefftp is res : coefftp := zero; begin for i in v'range loop Plus_Coeff(res,v(i)); end loop; return res; end Sum; procedure Plus_Vector ( v1 : in out Vector; v2 : in Vector ) is begin if v1'first /= v2'first or else v1'last /= v2'last then raise Range_Error; else for i in v1'range loop Plus_Coeff(v1(i),v2(i)); end loop; end if; end Plus_Vector; procedure Min_Vector ( v : in out Vector ) is begin for i in v'range loop Min_Coeff(v(i)); end loop; end Min_Vector; procedure Min_Vector ( v1 : in out Vector; v2 : in Vector ) is begin if v1'first /= v2'first or else v1'last /= v2'last then raise Range_Error; else for i in v1'range loop Min_Coeff(v1(i),v2(i)); end loop; end if; end Min_Vector; procedure Mult_Coeff ( v : in out Vector; a : in coefftp ) is begin for i in v'range loop Mult_Coeff(v(i),a); end loop; end Mult_Coeff; procedure Mult_Vector ( v1 : in out Vector; v2 : in Vector ) is begin if v1'first /= v2'first or else v1'last /= v2'last then raise Range_Error; else for i in v1'range loop Mult_Coeff(v1(i),v2(i)); end loop; end if; end Mult_Vector; procedure Clear ( v : in out Link_to_Vector ) is procedure free is new unchecked_deallocation(Vector,Link_to_Vector); begin if v /= null then Clear(v.all); free(v); end if; end Clear; function Equal ( v1,v2 : Link_to_Vector ) return boolean is begin if (v1 = null) and (v2 = null) then return true; elsif (v1 = null) or (v2 = null) then return false; else return Equal(v1.all,v2.all); end if; end Equal; procedure Copy ( v1: in Link_to_Vector; v2 : in out Link_to_Vector ) is begin Clear(v2); if v1 /= null then v2 := new Vector(v1'range); for i in v1'range loop v2(i) := v1(i); end loop; end if; end Copy; function "+" ( v1,v2 : Link_to_Vector ) return Link_to_Vector is begin if v1 = null then return v2; elsif v2 = null then return v1; else return new Vector'(v1.all + v2.all); end if; end "+"; function "-" ( v : Link_to_Vector ) return Link_to_Vector is begin if v = null then return v; else return new Vector'(-v.all); end if; end "-"; function "-" ( v1,v2 : Link_to_Vector ) return Link_to_Vector is begin if v2 = null then return v1; elsif v1 = null then return -v2; else return new Vector'(v1.all - v2.all); end if; end "-"; function "*" ( v : Link_to_Vector; a : coefftp ) return Link_to_Vector is begin if v = null then return null; else return new Vector'(v.all*a); end if; end "*"; function "*" ( a : coefftp; v : Link_to_Vector ) return Link_to_Vector is begin return v*a; end "*"; function "*" ( v1,v2 : Link_to_Vector ) return coefftp is begin if (v1 = null) or (v2 = null) then return zero; else return v1.all*v2.all; end if; end "*"; function "*" ( v1,v2 : Link_to_Vector ) return Link_to_Vector is begin if (v1 = null) or (v2 = null) then return null; else return new Vector'(v1.all*v2.all); end if; end "*"; function Sum ( v : Link_to_Vector ) return coefftp is begin if v = null then return zero; else return Sum(v.all); end if; end Sum; procedure Plus_Vector ( v1 : in out Link_to_Vector; v2 : in Link_to_Vector ) is begin if v2 = null then null; elsif v1 = null then Copy(v2,v1); else Plus_Vector(v1.all,v2.all); end if; end Plus_Vector; procedure Min_Vector ( v : in out Link_to_Vector ) is begin if v = null then null; else Min_Vector(v.all); end if; end Min_Vector; procedure Min_Vector ( v1 : in out Link_to_Vector; v2 : in Link_to_Vector ) is begin if v2 = null then null; elsif v1 = null then v1 := new Vector'(v2.all); Min_Vector(v1.all); else Min_Vector(v1.all,v2.all); end if; end Min_Vector; procedure Mult_Coeff ( v : in out Link_to_Vector; a : in coefftp ) is begin if v /= null then Mult_Coeff(v.all,a); end if; end Mult_Coeff; procedure Mult_Vector ( v1 : in out Link_to_Vector; v2 : in Link_to_Vector ) is begin if v2 = null then null; elsif v1 = null then Clear(v1); else Mult_Vector(v1.all,v2.all); end if; end Mult_Vector; end Vectors; SHAR_EOF fi # end of overwriting check if test -f 'vectors.ads' then echo shar: will not over-write existing file "'vectors.ads'" else cat << "SHAR_EOF" > 'vectors.ads' generic type coefftp is private; -- type of the items in the vectors zero : coefftp; -- the neutral element for "+" with procedure clear ( a : in out coefftp ); with procedure copy ( a : in coefftp; b : in out coefftp ); with function equal ( a,b : coefftp ) return boolean; with function "+" ( a,b : coefftp ) return coefftp; -- return a+b; with function "-" ( a,b : coefftp ) return coefftp; -- return a-b; with function "-" ( a : coefftp ) return coefftp; -- return -a; with function "*" ( a,b : coefftp ) return coefftp; -- return a*b; with procedure Plus_Coeff ( a : in out coefftp; b : in coefftp ); -- a := a+b; with procedure Min_Coeff ( a : in out coefftp; b : in coefftp ); -- a := a-b; with procedure Min_Coeff ( a : in out coefftp ); -- a := -a; with procedure Mult_Coeff ( a : in out coefftp; b : in coefftp ); -- a := a*b; package Vectors is -- DESCRIPTION : -- This package provides a data abstraction for vectors with coefficients -- over any ring. -- The same functionality is provided for pointers to vectors. type Vector is array ( integer range <> ) of coefftp; type Link_to_Vector is access Vector; Range_Error : exception; -- occurs when two vectors have incompatible ranges procedure Clear ( v : in out Vector ); procedure Clear ( v : in out Link_to_Vector ); function Equal ( v1,v2 : Vector ) return boolean; function Equal ( v1,v2 : Link_to_Vector ) return boolean; procedure Copy ( v1: in Vector; v2 : in out Vector ); procedure Copy ( v1: in Link_to_Vector; v2 : in out Link_to_Vector ); function "+" ( v1,v2 : Vector ) return Vector; -- return v1+v2; function "+" ( v1,v2 : Link_to_Vector ) return Link_to_Vector; function "-" ( v : Vector ) return Vector; -- return -v; function "-" ( v : Link_to_Vector ) return Link_to_Vector; function "-" ( v1,v2 : Vector ) return Vector; -- return v1-v2; function "-" ( v1,v2 : Link_to_Vector ) return Link_to_Vector; function "*" ( v : Vector; a : coefftp ) return Vector; -- return v*a; function "*" ( v : Link_to_Vector; a : coefftp ) return Link_to_Vector; function "*" ( a : coefftp; v : Vector ) return Vector; -- return a*v; function "*" ( a : coefftp; v : Link_to_Vector ) return Link_to_Vector; function "*" ( v1,v2 : Vector ) return coefftp; function "*" ( v1,v2 : Link_to_Vector ) return coefftp; -- returns the inner product of the vectors v1 and v2 function "*" ( v1,v2 : Vector ) return Vector; function "*" ( v1,v2 : Link_to_Vector ) return Link_to_Vector; -- returns the vector v, with v(k) = v1(k)*v2(k); function Sum ( v : Vector ) return coefftp; function Sum ( v : Link_to_Vector ) return coefftp; -- returns the sum of all components of v; procedure Plus_Vector ( v1 : in out Vector; v2 : in Vector ); -- v1 := v1+v2; procedure Plus_Vector ( v1 : in out Link_to_Vector; v2 : in Link_to_Vector ); procedure Min_Vector ( v : in out Vector); -- v := -v; procedure Min_Vector ( v : in out Link_to_Vector ); procedure Min_Vector ( v1 : in out Vector; v2 : in Vector ); -- v1 := v1-v2; procedure Min_Vector ( v1 : in out Link_to_Vector; v2 : in Link_to_Vector ); procedure Mult_Coeff ( v : in out Vector; a : in coefftp ); -- v := v*a; procedure Mult_Coeff ( v : in out Link_to_Vector; a : in coefftp ); procedure Mult_Vector ( v1 : in out Vector; v2 : in Vector ); -- v1 := v1*v2; procedure Mult_Vector ( v1 : in out Link_to_Vector; v2 : in Link_to_Vector ); end Vectors; SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'Numbers' then mkdir 'Numbers' fi cd 'Numbers' if test -f 'complex_instantiation_parameters.adb' then echo shar: will not over-write existing file "'complex_instantiation_parameters.adb'" else cat << "SHAR_EOF" > 'complex_instantiation_parameters.adb' with Floating_Point_Numbers; use Floating_Point_Numbers; package body Complex_Instantiation_Parameters is procedure clear ( a : in out double_complex ) is begin null; end clear; procedure copy ( a : in double_complex; b : in out double_complex ) is begin b := a; end copy; function equal ( a,b : double_complex ) return boolean is begin return a=b; end equal; function convert ( n : integer ) return double_complex is begin return CMPLX(double_float(n)); end convert; procedure Plus_Cmplx ( a : in out double_complex; b : in double_complex ) is begin a := a + b; end Plus_Cmplx; procedure Min_Cmplx ( a : in out double_complex; b : in double_complex ) is begin a := a - b; end Min_Cmplx; procedure Min_Cmplx ( a : in out double_complex ) is begin a := -a; end Min_Cmplx; procedure Mult_Cmplx ( a : in out double_complex; b : in double_complex ) is begin a := a*b; end Mult_Cmplx; procedure Div_Cmplx ( a : in out double_complex; b : in double_complex ) is begin a := a/b; end Div_Cmplx; end Complex_Instantiation_Parameters; SHAR_EOF fi # end of overwriting check if test -f 'complex_instantiation_parameters.ads' then echo shar: will not over-write existing file "'complex_instantiation_parameters.ads'" else cat << "SHAR_EOF" > 'complex_instantiation_parameters.ads' with Complex_Numbers; use Complex_Numbers; package Complex_Instantiation_Parameters is -- DESCRIPTION : -- This package contains the routines necessary for -- instantiating the packages Vectors and Polynomials. procedure clear ( a : in out double_complex ); procedure copy ( a : in double_complex; b : in out double_complex ); function equal ( a,b : double_complex ) return boolean; function convert ( n : integer ) return double_complex; procedure Plus_Cmplx ( a : in out double_complex; b : in double_complex ); -- a := a+b; procedure Min_Cmplx ( a : in out double_complex; b : in double_complex ); -- a := a-b; procedure Min_Cmplx ( a : in out double_complex ); -- a := -a; procedure Mult_Cmplx ( a : in out double_complex; b : in double_complex ); -- a := a*b; procedure Div_Cmplx ( a : in out double_complex; b : in double_complex ); -- a := a/b; end Complex_Instantiation_Parameters; SHAR_EOF fi # end of overwriting check if test -f 'complex_numbers.adb' then echo shar: will not over-write existing file "'complex_numbers.adb'" else cat << "SHAR_EOF" > 'complex_numbers.adb' with Floating_Point_Numbers; use Floating_Point_Numbers; with Mathematical_Functions; use Mathematical_Functions; package body Complex_Numbers is TWO : constant double_float := double_float(2); -- real => complex : function CMPLX ( X : double_float ) return double_complex is begin return ( X, ZERO ); end CMPLX; -- real * real => complex : function CMPLX ( X,Y : double_float ) return double_complex is begin return ( X, Y ); end CMPLX; -- real * argument => complex : function CMPLX_POLAR ( R : double_float; A : double_float ) return double_complex is begin return ( R*SIN(A), R*COS(A) ); end CMPLX_POLAR; -- complex => real : function RADIUS ( X, Y : double_float) return double_float is begin return Sqrt(x**2+y**2); end RADIUS; function "ABS" ( X : double_complex ) return double_float is begin return RADIUS(X.RE,X.IM); end "ABS"; function REAL_PART ( X : double_complex ) return double_float is begin return X.RE; end REAL_PART; function IMAG_PART ( X : double_complex ) return double_float is begin return X.IM; end IMAG_PART; -- complex => argument : function ANGLE ( X, Y : double_float ) return double_float is begin return Mathematical_Functions.ANGLE(x,y); end ANGLE; function ARGUMENT ( X : double_complex ) return double_float is begin return ANGLE(X.IM,X.RE); end ARGUMENT; -- complex * real => complex : function "+" ( X : double_complex; Y : double_float ) return double_complex is begin return (X.RE + Y, X.IM); end "+"; function "-" ( X : double_complex; Y : double_float ) return double_complex is begin return (X.RE - Y, X.IM); end "-"; function "*" ( X : double_complex; Y : double_float ) return double_complex is begin return ( X.RE*Y, X.IM*Y ); end "*"; function "/" ( X : double_complex; Y : double_float ) return double_complex is begin return ( X.RE/Y, X.IM/Y ); end "/"; -- real * complex => complex : function "+" ( X : double_float; Y : double_complex ) return double_complex is begin return ( X + Y.RE, +Y.IM ); end "+"; function "-" ( X : double_float; Y : double_complex ) return double_complex is begin return ( X - Y.RE, -Y.IM ); end "-"; function "*" ( X : double_float; Y : double_complex ) return double_complex is begin return ( X*Y.RE, X*Y.IM ); end "*"; function "/" ( X : double_float; Y : double_complex ) return double_complex is R: double_float renames X; U: double_float renames Y.RE; T: double_float renames Y.IM; begin if U = ZERO then return ( R / T , ZERO ) ; elsif T = ZERO then return ( ZERO , -R / U ) ; elsif abs(T) < abs(U) then return ( ( R*(T/U) ) / ( T*(T/U) + U ) , ( - R ) / ( T*(T/U) + U ) ) ; elsif abs(T) > abs(U) then return ( ( R ) / ( T + U*(U/T) ) , ( - R*(U/T) ) / ( T + U*(U/T) ) ) ; elsif T = U then return ( ( R ) / ( TWO*T ) , ( - R ) / ( TWO*T ) ) ; else -- T = -U then return ( ( - R ) / ( TWO*T ) , ( - R ) / ( TWO*T ) ) ; end if; end "/"; -- complex => complex : function "+" ( X : double_complex ) return double_complex is begin return X; -- null function end "+"; function "-" ( X : double_complex ) return double_complex is begin return ( -X.RE, -X.IM ); end "-"; -- complex * complex => complex : function "+" ( X,Y : double_complex ) return double_complex is begin return ( X.RE + Y.RE, X.IM + Y.IM ); end "+"; function "-" ( X,Y : double_complex ) return double_complex is begin return ( X.RE - Y.RE, X.IM -Y.IM ); end "-"; function "*" ( X,Y : double_complex ) return double_complex is R: double_float renames X.RE; S: double_float renames X.IM; T: double_float renames Y.RE; U: double_float renames Y.IM; begin if U = ZERO then return ( R * T , S * T ) ; elsif T = ZERO then return ( -S * U , R * U ) ; elsif abs(T) < abs(U) then return ( ( R*(T/U) - S ) * U , ( S*(T/U) + R ) * U ) ; elsif abs(T) > abs(U) then return ( ( R - S*(U/T) ) * T , ( S + R*(U/T) ) * T ) ; elsif T = U then return ( ( R - S ) * T , ( S + R ) * T ) ; else -- T = -U then return ( ( R + S ) * T , ( S - R ) * T ) ; end if; end "*"; function "/" ( X,Y : double_complex ) return double_complex is R: double_float renames X.RE; S: double_float renames X.IM; T: double_float renames Y.RE; U: double_float renames Y.IM; begin if U = ZERO then return ( R / T , S / T ) ; elsif T = ZERO then return ( S / U , -R / U ) ; elsif abs(T) < abs(U) then return ( ( R*(T/U) + S ) / ( T*(T/U) + U ) , ( S*(T/U) - R ) / ( T*(T/U) + U ) ) ; elsif abs(T) > abs(U) then return ( ( R + S*(U/T) ) / ( T + U*(U/T) ) , ( S - R*(U/T) ) / ( T + U*(U/T) ) ) ; elsif T = U then return ( ( R + S ) / ( TWO*T ) , ( S - R ) / ( TWO*T ) ) ; else -- T = -U then return ( ( R - S ) / ( TWO*T ) , ( S + R ) / ( TWO*T ) ) ; end if; end "/"; function "**" ( c : double_complex; m : integer ) return double_complex is r : double_complex; begin if m = 0 then return CMPLX(1.0); elsif m > 0 then r := c; for j in 2..m loop r := c*r; end loop; else r := CMPLX(1.0); for j in 1..(-m) loop r := r/c; end loop; end if; return r; end "**"; function de_Moivre (n,j : natural; c : double_complex) return double_complex is arg,radius_c,angle_c : double_float; tmp : double_complex; begin arg := (2.0 * PI * double_float(j)) / double_float(n); radius_c := RADIUS(c)**(1.0/double_float(n)); angle_c := ANGLE(c)/double_float(n); tmp := CMPLX(radius_c)*CMPLX(COS(angle_c),SIN(angle_c)); return CMPLX(COS(arg),SIN(arg))*tmp; end de_Moivre; end Complex_Numbers; SHAR_EOF fi # end of overwriting check if test -f 'complex_numbers.ads' then echo shar: will not over-write existing file "'complex_numbers.ads'" else cat << "SHAR_EOF" > 'complex_numbers.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; package Complex_Numbers is type double_complex is private; I: constant double_complex; -- real => double_complex function CMPLX ( X : double_float ) return double_complex; -- along real axis -- real * real => double_complex : function CMPLX ( X,Y : double_float ) return double_complex; -- Cartesian -- real * argument => double_complex : function CMPLX_POLAR ( R : double_float; A : double_float ) return double_complex; -- Polar -- double_complex => real : function "ABS" ( X : double_complex ) return double_float; function MODULUS ( X : double_complex ) return double_float renames "ABS"; function RADIUS ( X : double_complex ) return double_float renames "ABS"; function REAL_PART ( X : double_complex ) return double_float; function IMAG_PART ( X : double_complex ) return double_float; -- double_complex => argument : function ARGUMENT ( X : double_complex ) return double_float; function ANGLE ( X : double_complex ) return double_float renames ARGUMENT; -- double_complex * real => double_complex : function "+" ( X : double_complex; Y : double_float ) return double_complex; function "-" ( X : double_complex; Y : double_float ) return double_complex; function "*" ( X : double_complex; Y : double_float ) return double_complex; function "/" ( X : double_complex; Y : double_float ) return double_complex; -- inline only for double_complex "/" real => double_complex -- other "/" overloadings not inline pragma inline ("/"); -- real * double_complex => double_complex : function "+" ( X : double_float; Y : double_complex ) return double_complex; function "-" ( X : double_float; Y : double_complex ) return double_complex; function "*" ( X : double_float; Y : double_complex ) return double_complex; function "/" ( X : double_float; Y : double_complex ) return double_complex; -- double_complex => double_complex : function "+" ( X : double_complex ) return double_complex; function "-" ( X : double_complex ) return double_complex; -- double_complex * double_complex => double_complex : function "+" ( X,Y : double_complex ) return double_complex; function "-" ( X,Y : double_complex ) return double_complex; function "*" ( X,Y : double_complex ) return double_complex; function "/" ( X,Y : double_complex ) return double_complex; -- inline for all overloadings of named functions : pragma inline(CMPLX, "ABS", MODULUS, ARGUMENT, "+", "-", "*"); -- exponentiation and De Moivre's rule : function "**" ( c : double_complex; m : integer ) return double_complex; function de_Moivre (n,j : natural; c : double_complex) return double_complex; -- DESCRIPTION : -- returns the j-th solution of the equation x^n-c=0 private ZERO: constant double_float := double_float(0); ONE: constant double_float := double_float(1); type double_complex is record RE : double_float := ZERO; IM : double_float := ZERO; end record; I: constant double_complex := ( ZERO, ONE ); end Complex_Numbers; SHAR_EOF fi # end of overwriting check if test -f 'complex_numbers_io.adb' then echo shar: will not over-write existing file "'complex_numbers_io.adb'" else cat << "SHAR_EOF" > 'complex_numbers_io.adb' with Floating_Point_Numbers; use Floating_Point_Numbers; package body Complex_Numbers_io is use Floating_Point_Numbers.double_float_io; procedure get ( c : out double_complex ) is x,y : double_float; begin get(x); get(y); c := CMPLX(x,y); end get; procedure get ( f : in file_type; c : out double_complex ) is x,y : double_float; begin get(f,x); get(f,y); c := CMPLX(x,y); end get; procedure put ( c : in double_complex ) is begin put(REAL_PART(c)); put(" "); put(IMAG_PART(c)); end put; procedure put ( f : in file_type; c : in double_complex ) is begin put(f,REAL_PART(c)); put(f," "); put(f,IMAG_PART(c)); end put; procedure put ( c : in double_complex; fore,aft,exp : in natural ) is begin put(REAL_PART(c),fore,aft,exp); put(" "); put(IMAG_PART(c),fore,aft,exp); end put; procedure put ( f : in file_type; c : in double_complex; fore,aft,exp : in natural ) is begin put(f,REAL_PART(c),fore,aft,exp); put(f," "); put(f,IMAG_PART(c),fore,aft,exp); end put; end Complex_Numbers_io; SHAR_EOF fi # end of overwriting check if test -f 'complex_numbers_io.ads' then echo shar: will not over-write existing file "'complex_numbers_io.ads'" else cat << "SHAR_EOF" > 'complex_numbers_io.ads' with text_io,Complex_Numbers; use text_io,Complex_Numbers; package Complex_Numbers_io is -- DESCRIPTION : -- This package provides io-routines for complex numbers. procedure get ( c : out double_complex ); procedure get ( f : in file_type; c : out double_complex ); procedure put ( c : in double_complex ); procedure put ( f : in file_type; c : in double_complex ); procedure put ( c : in double_complex; fore,aft,exp : in natural ); procedure put ( f : in file_type; c : in double_complex; fore,aft,exp : in natural ); end Complex_Numbers_io; SHAR_EOF fi # end of overwriting check if test -f 'float_instantiation_parameters.adb' then echo shar: will not over-write existing file "'float_instantiation_parameters.adb'" else cat << "SHAR_EOF" > 'float_instantiation_parameters.adb' package body Float_Instantiation_Parameters is procedure clear ( a : in out single_float ) is begin null; end clear; procedure clear ( a : in out double_float ) is begin null; end clear; procedure copy ( a : in single_float; b : in out single_float ) is begin b := a; end copy; procedure copy ( a : in double_float; b : in out double_float ) is begin b := a; end copy; function equal ( a,b : single_float ) return boolean is begin return a=b; end equal; function equal ( a,b : double_float ) return boolean is begin return a=b; end equal; function convert ( n : integer ) return single_float is begin return single_float(n); end convert; function convert ( n : integer ) return double_float is begin return double_float(n); end convert; procedure Plus_Float ( a : in out single_float; b : in single_float ) is begin a := a + b; end Plus_Float; procedure Plus_Float ( a : in out double_float; b : in double_float ) is begin a := a + b; end Plus_Float; procedure Min_Float ( a : in out single_float; b : in single_float ) is begin a := a - b; end Min_Float; procedure Min_Float ( a : in out double_float; b : in double_float ) is begin a := a - b; end Min_Float; procedure Min_Float ( a : in out single_float ) is begin a := -a; end Min_Float; procedure Min_Float ( a : in out double_float ) is begin a := -a; end Min_Float; procedure Mult_Float ( a : in out single_float; b : in single_float ) is begin a := a*b; end Mult_Float; procedure Mult_Float ( a : in out double_float; b : in double_float ) is begin a := a*b; end Mult_Float; procedure Div_Float ( a : in out single_float; b : in single_float ) is begin a := a/b; end Div_Float; procedure Div_Float ( a : in out double_float; b : in double_float ) is begin a := a/b; end Div_Float; end Float_Instantiation_Parameters; SHAR_EOF fi # end of overwriting check if test -f 'float_instantiation_parameters.ads' then echo shar: will not over-write existing file "'float_instantiation_parameters.ads'" else cat << "SHAR_EOF" > 'float_instantiation_parameters.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; package Float_Instantiation_Parameters is -- DESCRIPTION : -- This package contains the routines necessary for -- instantiating the packages Vectors and Polynomials. procedure clear ( a : in out single_float ); procedure clear ( a : in out double_float ); procedure copy ( a : in single_float; b : in out single_float ); procedure copy ( a : in double_float; b : in out double_float ); function equal ( a,b : single_float ) return boolean; function equal ( a,b : double_float ) return boolean; function convert ( n : integer ) return single_float; function convert ( n : integer ) return double_float; procedure Plus_Float ( a : in out single_float; b : in single_float ); procedure Plus_Float ( a : in out double_float; b : in double_float ); -- a := a+b; procedure Min_Float ( a : in out single_float; b : in single_float ); procedure Min_Float ( a : in out double_float; b : in double_float ); -- a := a-b; procedure Min_Float ( a : in out single_float ); procedure Min_Float ( a : in out double_float ); -- a := -a; procedure Mult_Float ( a : in out single_float; b : in single_float ); procedure Mult_Float ( a : in out double_float; b : in double_float ); -- a := a*b; procedure Div_Float ( a : in out single_float; b : in single_float ); procedure Div_Float ( a : in out double_float; b : in double_float ); -- a := a/b; end Float_Instantiation_Parameters; SHAR_EOF fi # end of overwriting check if test -f 'floating_point_numbers.ads' then echo shar: will not over-write existing file "'floating_point_numbers.ads'" else cat << "SHAR_EOF" > 'floating_point_numbers.ads' with text_io; package Floating_Point_Numbers is -- DESCRIPTION : -- This package sets floating-point types to be independent -- of the compiler predefined floating-point declarations. type single_float is digits 7; -- single precision package single_float_io is new text_io.float_io(single_float); type double_float is digits 15; -- double precision package double_float_io is new text_io.float_io(double_float); end Floating_Point_Numbers; SHAR_EOF fi # end of overwriting check if test -f 'integer_instantiation_parameters.adb' then echo shar: will not over-write existing file "'integer_instantiation_parameters.adb'" else cat << "SHAR_EOF" > 'integer_instantiation_parameters.adb' package body Integer_Instantiation_Parameters is procedure clear ( a : in out integer ) is begin null; end clear; procedure copy ( a : in integer; b : in out integer ) is begin b := a; end copy; function equal ( a,b : integer ) return boolean is begin return a = b; end equal; function convert ( n : natural ) return integer is begin return integer(n); end convert; procedure Plus_Int ( a : in out integer; b : in integer ) is begin a := a+b; end Plus_Int; procedure Min_Int ( a : in out integer; b : in integer ) is begin a := a-b; end Min_Int; procedure Min_Int ( a : in out integer ) is begin a := -a; end Min_Int; procedure Mult_Int ( a : in out integer; b : in integer ) is begin a := a*b; end Mult_Int; end Integer_Instantiation_Parameters; SHAR_EOF fi # end of overwriting check if test -f 'integer_instantiation_parameters.ads' then echo shar: will not over-write existing file "'integer_instantiation_parameters.ads'" else cat << "SHAR_EOF" > 'integer_instantiation_parameters.ads' package Integer_Instantiation_Parameters is -- DESCRIPTION : -- This package contains the routines necessary for -- instantiating the packages Vectors and Polynomials. procedure clear ( a : in out integer ); procedure copy ( a : in integer; b : in out integer ); function equal ( a,b : integer ) return boolean; function convert ( n : natural ) return integer; procedure Plus_Int ( a : in out integer; b : in integer ); -- a := a+b; procedure Min_Int ( a : in out integer; b : in integer ); -- a := a-b; procedure Min_Int ( a : in out integer ); -- a := -a; procedure Mult_Int ( a : in out integer; b : in integer ); -- a := a*b; end Integer_Instantiation_Parameters; SHAR_EOF fi # end of overwriting check if test -f 'integer_io.ads' then echo shar: will not over-write existing file "'integer_io.ads'" else cat << "SHAR_EOF" > 'integer_io.ads' with Text_IO; use Text_IO; package Integer_IO is new Text_IO.Integer_IO(Integer); SHAR_EOF fi # end of overwriting check if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' # Establishing the links : linkrc = ../../../Ada/Math_Lib/Numbers links: @-ln -s $(linkrc)/float.a floating_point_numbers.ads @-ln -s $(linkrc)/complex.a complex_numbers.ads @-ln -s $(linkrc)/complexB.a complex_numbers.adb @-ln -s $(linkrc)/complex_io.a complex_numbers_io.ads @-ln -s $(linkrc)/complex_ioB.a complex_numbers_io.adb @-ln -s $(linkrc)/numbers_io.a numbers_io.ads @-ln -s $(linkrc)/numbers_ioB.a numbers_io.adb @-ln -s $(linkrc)/random.a random_number_generators.ads @-ln -s $(linkrc)/randomB.a random_number_generators.adb @-ln -s $(linkrc)/mathfun.a mathematical_functions.ads @-ln -s $(linkrc)/nat_inst.a natural_instantiation_parameters.ads @-ln -s $(linkrc)/nat_instB.a natural_instantiation_parameters.adb @-ln -s $(linkrc)/int_inst.a integer_instantiation_parameters.ads @-ln -s $(linkrc)/int_instB.a integer_instantiation_parameters.adb @-ln -s $(linkrc)/flt_inst.a float_instantiation_parameters.ads @-ln -s $(linkrc)/flt_instB.a float_instantiation_parameters.adb @-ln -s $(linkrc)/cmp_inst.a complex_instantiation_parameters.ads @-ln -s $(linkrc)/cmp_instB.a complex_instantiation_parameters.adb @-ln -s $(linkrc)/strnum.a strings_to_natural_numbers.ads @-ln -s $(linkrc)/strnumB.a strings_to_natural_numbers.adb # NOTE : only the body of mathematical_functions is different SHAR_EOF fi # end of overwriting check if test -f 'mathematical_functions.adb' then echo shar: will not over-write existing file "'mathematical_functions.adb'" else cat << "SHAR_EOF" > 'mathematical_functions.adb' with Ada.Numerics.Generic_Elementary_Functions; with Ada.Numerics; use Ada.Numerics; package body Mathematical_Functions is package Double_Elementary_Functions is new Ada.Numerics.Generic_Elementary_Functions (double_float); function "**" ( x,y : double_float ) return double_float is begin return Double_Elementary_Functions."**"(x,y); end "**"; function LOG10 ( x : double_float ) return double_float is begin return Double_Elementary_Functions.LOG(x,10.0); end LOG10; function SQRT ( x : double_float ) return double_float is begin return Double_Elementary_Functions.SQRT(x); end SQRT; function SIN ( x : double_float ) return double_float is begin return Double_Elementary_Functions.SIN(x); end SIN; function COS ( x : double_float ) return double_float is begin return Double_Elementary_Functions.COS(x); end COS; function TAN ( x : double_float ) return double_float is begin return Double_Elementary_Functions.TAN(x); end TAN; function ARCSIN ( x : double_float ) return double_float is begin return Double_Elementary_Functions.ARCSIN(x); end ARCSIN; function ARCCOS ( x : double_float ) return double_float is begin return Double_Elementary_Functions.ARCCOS(x); end ARCCOS; function ARCTAN ( x : double_float ) return double_float is begin return Double_Elementary_Functions.ARCTAN(x); end ARCTAN; function Radius ( x,y : double_float ) return double_float is begin return Sqrt(x**2+y**2); end Radius; function Angle ( x,y : double_float ) return double_float is begin return Double_Elementary_Functions.ARCTAN(x,y); end Angle; end Mathematical_Functions; SHAR_EOF fi # end of overwriting check if test -f 'mathematical_functions.ads' then echo shar: will not over-write existing file "'mathematical_functions.ads'" else cat << "SHAR_EOF" > 'mathematical_functions.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; package Mathematical_Functions is -- DESCRIPTION : -- This package provides some special mathematical functions to ensure -- a more portable version of the software. -- CONSTANT : PI : constant := 3.14159_26535_89793_23846_26433_83279_50288; -- EXPONENTIAL AND LOGARITHMIC FUNCTIONS : function "**" ( x,y : double_float ) return double_float; -- DESCRIPTION : -- Returns x**y. function LOG10 ( x : double_float ) return double_float; -- DESCRIPTION : -- Returns the usual logarithm. function SQRT ( x : double_float ) return double_float; -- DSECRIPTION : -- Returns the square root of x. -- TRIGONIOMETRIC FUNCTIONS : function SIN ( x : double_float ) return double_float; function COS ( x : double_float ) return double_float; function TAN ( x : double_float ) return double_float; -- DESCRIPTION : -- Returns sine, cosine and tangens of x. function ARCSIN ( x : double_float ) return double_float; function ARCCOS ( x : double_float ) return double_float; function ARCTAN ( x : double_float ) return double_float; -- DESCRIPTION : -- Returns arcsin, arccos and argtan of x. function Radius ( x,y : double_float ) return double_float; function Angle ( x,y : double_float ) return double_float; end Mathematical_Functions; SHAR_EOF fi # end of overwriting check if test -f 'natural_instantiation_parameters.adb' then echo shar: will not over-write existing file "'natural_instantiation_parameters.adb'" else cat << "SHAR_EOF" > 'natural_instantiation_parameters.adb' package body Natural_Instantiation_Parameters is procedure clear ( a : in out natural ) is begin null; end clear; procedure copy ( a : in natural; b : in out natural ) is begin b := a; end copy; function equal ( a,b : natural ) return boolean is begin return a = b; end equal; procedure Plus_Nat ( a : in out natural; b : in natural ) is begin a := a+b; end Plus_Nat; procedure Min_Nat ( a : in out natural; b : in natural ) is begin a := a-b; end Min_Nat; procedure Min_Nat ( a : in out natural ) is begin a := -a; end Min_Nat; procedure Mult_Nat ( a : in out natural; b : in natural ) is begin a := a*b; end Mult_Nat; end Natural_Instantiation_Parameters; SHAR_EOF fi # end of overwriting check if test -f 'natural_instantiation_parameters.ads' then echo shar: will not over-write existing file "'natural_instantiation_parameters.ads'" else cat << "SHAR_EOF" > 'natural_instantiation_parameters.ads' package Natural_Instantiation_Parameters is -- DESCRIPTION : -- This package contains the routines necessary for -- instantiating the package Vectors. procedure clear ( a : in out natural ); procedure copy ( a : in natural; b : in out natural ); function equal ( a,b : natural ) return boolean; procedure Plus_Nat ( a : in out natural; b : in natural ); -- a := a+b; procedure Min_Nat ( a : in out natural; b : in natural ); -- a := a-b; procedure Min_Nat ( a : in out natural ); -- a := -a; procedure Mult_Nat ( a : in out natural; b : in natural ); -- a := a*b; end Natural_Instantiation_Parameters; SHAR_EOF fi # end of overwriting check if test -f 'numbers_io.adb' then echo shar: will not over-write existing file "'numbers_io.adb'" else cat << "SHAR_EOF" > 'numbers_io.adb' with text_io,integer_io; use text_io,integer_io; package body Numbers_io is use Floating_Point_Numbers.single_float_io; use Floating_Point_Numbers.double_float_io; procedure Read_Positive ( p : out positive ) is begin get(p); skip_line; exception when DATA_ERROR | CONSTRAINT_ERROR => skip_line; -- skip the rubbish put("This is not a positive number, try again : "); Read_Positive(p); end Read_Positive; procedure Read_Natural ( n : out natural ) is begin get(n); skip_line; exception when DATA_ERROR | CONSTRAINT_ERROR => skip_line; -- skip the rubbish put("This is not a natural number, try again : "); Read_Natural(n); end Read_Natural; procedure Read_Integer ( i : out integer ) is begin get(i); skip_line; exception when DATA_ERROR | CONSTRAINT_ERROR => skip_line; -- skip the rubbish put("This is not an integer number, try again : "); Read_Integer(i); end Read_Integer; procedure Read_Single_Float ( f : out single_float ) is begin get(f); skip_line; exception when DATA_ERROR | CONSTRAINT_ERROR => skip_line; -- skip the rubbish put("This is not a floating point number, try again : "); Read_Single_Float(f); end Read_Single_Float; procedure Read_Double_Float ( f : out double_float ) is begin get(f); skip_line; exception when DATA_ERROR | CONSTRAINT_ERROR => skip_line; -- skip the rubbish put("This is not a floating point number, try again : "); Read_Double_Float(f); end Read_Double_Float; end Numbers_io; SHAR_EOF fi # end of overwriting check if test -f 'numbers_io.ads' then echo shar: will not over-write existing file "'numbers_io.ads'" else cat << "SHAR_EOF" > 'numbers_io.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; package Numbers_io is -- DESCRIPTION : -- This package provides user friendly input routines. procedure Read_Positive ( p : out positive ); procedure Read_Natural ( n : out natural ); procedure Read_Integer ( i : out integer ); procedure Read_Single_Float ( f : out single_float ); procedure Read_Double_Float ( f : out double_float ); -- DESCRIPTION : -- Reads a number from standard input. -- As long as the value obtained is not of the right type, -- the user will be asked to try again. end Numbers_io; SHAR_EOF fi # end of overwriting check if test -f 'random_number_generators.adb' then echo shar: will not over-write existing file "'random_number_generators.adb'" else cat << "SHAR_EOF" > 'random_number_generators.adb' with Mathematical_Functions; use Mathematical_Functions; with Machines; use Machines; package body Random_Number_Generators is a : constant integer := 13849; m : constant integer := 65536; c : constant integer := 56963; seed : integer := Process_Id; function Random ( lower, upper : integer ) return integer is f : double_float; begin f := Random; -- f in [-1,1] f := 0.5*(double_float(upper-lower)*f + double_float(lower+upper)); -- f in [lower,upper] return integer(f); -- rounding the result to integer number end Random; function Random return double_float is x : double_float; begin seed := (a*seed + c) mod m; x := double_float(seed)/double_float(m); x := 2.0 * x - 1.0; return x; end Random; function Random return double_complex is begin return CMPLX(Random,Random); end Random; function Random ( modulus : double_float ) return double_complex is arg : double_float; begin arg := PI*Random; -- in [-pi,+pi] return CMPLX(modulus*COS(arg),modulus*SIN(arg)); end Random; function Random1 return double_complex is arg : double_float; begin arg := PI*Random; -- in [-pi,+pi] return CMPLX(COS(arg),SIN(arg)); end Random1; end Random_Number_Generators; SHAR_EOF fi # end of overwriting check if test -f 'random_number_generators.ads' then echo shar: will not over-write existing file "'random_number_generators.ads'" else cat << "SHAR_EOF" > 'random_number_generators.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Numbers; use Complex_Numbers; package Random_Number_Generators is function Random ( lower, upper : integer ) return integer; -- DESCRIPTION : -- Returns an integer between the lower and upper bound, -- bounds also included, randomly generated. function Random return double_float; -- DESCRIPTION : -- Returns a randomly chosen floating point number -- between -1.0 and 1.0. function Random return double_complex; -- DESCRIPTION : -- Using plainly the floating point random number generator -- for generating real and imaginary part, -- a randomly chosen complex number is constructed. function Random ( modulus : double_float ) return double_complex; -- DESCRIPTION : -- Generates a random complex number with a given modulus, -- so only the argument angle will be chosen at random. function Random1 return double_complex; -- DESCRIPTION : -- Generates a random complex number with modulus one. end Random_Number_Generators; SHAR_EOF fi # end of overwriting check if test -f 'strings_to_natural_numbers.adb' then echo shar: will not over-write existing file "'strings_to_natural_numbers.adb'" else cat << "SHAR_EOF" > 'strings_to_natural_numbers.adb' package body Strings_to_Natural_Numbers is function Convert ( c : character ) return natural is begin case c is when '0' => return 0; when '1' => return 1; when '2' => return 2; when '3' => return 3; when '4' => return 4; when '5' => return 5; when '6' => return 6; when '7' => return 7; when '8' => return 8; when '9' => return 9; when others => return 10; end case; end convert; function Convert ( s : string ) return integer is res : integer := -1; num : natural; begin for i in s'range loop num := convert(s(i)); if num < 10 then if res < 0 then res := num; else res := 10*res + num; end if; end if; exit when (res > 0) and (num = 10); end loop; return res; end Convert; end Strings_to_Natural_Numbers; SHAR_EOF fi # end of overwriting check if test -f 'strings_to_natural_numbers.ads' then echo shar: will not over-write existing file "'strings_to_natural_numbers.ads'" else cat << "SHAR_EOF" > 'strings_to_natural_numbers.ads' package Strings_to_Natural_Numbers is -- DESCRIPTION : -- Natural numbers are extracted from strings, when possible. function Convert ( c : character ) return natural; -- DESCRIPTION : -- This function converts a character into a numerical value. -- If the character does not represent a decimal number, -- then 10 is returned. function Convert ( s : string ) return integer; -- DESCRIPTION : -- This function scans the string, skips character that are -- no digits and converts the natural number in the string. -- If the string contains no natural number, then -1 is returned. end Strings_to_Natural_Numbers; SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'Polynomials' then mkdir 'Polynomials' fi cd 'Polynomials' if test -f 'complex_laurent_polynomial_systems.adb' then echo shar: will not over-write existing file "'complex_laurent_polynomial_systems.adb'" else cat << "SHAR_EOF" > 'complex_laurent_polynomial_systems.adb' package body Complex_Laurent_Polynomial_Systems is -- CREATORS : function Create ( p : Laur_Sys ) return Eval_Laur_Sys is res : Eval_Laur_Sys(p'range); begin for k in p'range loop res(k) := Create(p(k)); end loop; return res; end Create; function Create ( p : Laur_Sys ) return Eval_Coeff_Laur_Sys is res : Eval_Coeff_Laur_Sys(p'range); begin for k in p'range loop res(k) := Create(p(k)); end loop; return res; end Create; -- ADDITIONAL ARITHMETIC OPERATIONS : function "*" ( a : double_complex; p : Laur_Sys ) return Laur_Sys is res : Laur_Sys(p'range); begin for k in p'range loop res(k) := a*p(k); end loop; return res; end "*"; function "*" ( p : Laur_Sys; a : double_complex ) return Laur_Sys is begin return a*p; end "*"; procedure Mult_Cmplx ( p : in out Laur_Sys; a : in double_complex ) is begin for k in p'range loop Mult_Coeff(p(k),a); end loop; end Mult_Cmplx; function Eval ( p : Laur_Sys; x : double_complex; i : natural ) return Laur_Sys is res : Laur_Sys(p'range); begin for j in p'range loop res(j) := Eval(p(j),x,i); end loop; return res; end Eval; function Eval ( p : Laur_Sys; x : Vector ) return Vector is res : Vector(p'range); begin for i in p'range loop res(i) := Eval(p(i),x); end loop; return res; end Eval; function Eval ( p : Eval_Laur_Sys; x : Vector ) return Vector is res : Vector(p'range); begin for i in p'range loop res(i) := Eval(p(i),x); end loop; return res; end Eval; function Eval ( p : Eval_Coeff_Laur_Sys; c : Complex_Vectors_of_Vectors.Vector; x : Vector ) return Vector is res : Vector(p'range); begin for i in p'range loop res(i) := Eval(p(i),c(i).all,x); end loop; return res; end Eval; function Diff ( p : Laur_Sys; i : natural ) return Laur_Sys is res : Laur_Sys(p'range); begin for j in p'range loop res(j) := Diff(p(j),i); end loop; return res; end Diff; procedure Diff ( p : in out Laur_Sys; i : in natural ) is begin for j in p'range loop Diff(p(j),i); end loop; end Diff; -- DESTRUCTORS : procedure Clear ( p : in out Eval_Laur_Sys ) is begin for k in p'range loop Clear(p(k)); end loop; end Clear; procedure Clear ( p : in out Eval_Coeff_Laur_Sys ) is begin for k in p'range loop Clear(p(k)); end loop; end Clear; end Complex_Laurent_Polynomial_Systems; SHAR_EOF fi # end of overwriting check if test -f 'complex_laurent_polynomial_systems.ads' then echo shar: will not over-write existing file "'complex_laurent_polynomial_systems.ads'" else cat << "SHAR_EOF" > 'complex_laurent_polynomial_systems.ads' with Vectors; with Complex_Numbers,Complex_Vectors; use Complex_Numbers,Complex_Vectors; with Complex_Vectors_of_Vectors; with Complex_Multivariate_Laurent_Polynomials; use Complex_Multivariate_Laurent_Polynomials; package Complex_Laurent_Polynomial_Systems is -- DESCRIPTION : -- This package provides polynomial systems as vectors of polynomials, -- added with data structures for evaluation and corresponding functions. -- DATA STRUCTURES : package Vectors_of_Complex_Multivariate_Laurent_Polynomials is new Vectors (Poly,Null_Poly,Clear,Copy,Equal,"+","-","-","*", Plus_Poly,Min_Poly,Min_Poly,Mult_Poly); type Laur_Sys is new Vectors_of_Complex_Multivariate_Laurent_Polynomials.Vector; type Link_to_Laur_Sys is access Laur_Sys; type Eval_Laur_Sys is array ( integer range <> ) of Eval_Poly; type Eval_Coeff_Laur_Sys is array ( integer range <> ) of Eval_Coeff_Poly; -- CREATORS : function Create ( p : Laur_Sys ) return Eval_Laur_Sys; function Create ( p : Laur_Sys ) return Eval_Coeff_Laur_Sys; -- ADDITIONAL ARITHMETIC OPERATIONS : function "*" ( a : double_complex; p : Laur_Sys ) return Laur_Sys; -- return a*p; function "*" ( p : Laur_Sys; a : double_complex ) return Laur_Sys; -- return p*a; procedure Mult_Cmplx ( p : in out Laur_Sys; a : in double_complex ); -- p := a*p; function Eval ( p : Laur_Sys; x : double_complex; i : natural ) return Laur_Sys; function Eval ( p : Laur_Sys; x : Vector ) return Vector; function Eval ( p : Eval_Laur_Sys; x : Vector ) return Vector; function Eval ( p : Eval_Coeff_Laur_Sys; c : Complex_Vectors_of_Vectors.Vector; x : Vector ) return Vector; function Diff ( p : Laur_Sys; i : natural ) return Laur_Sys; procedure Diff ( p : in out Laur_Sys; i : in natural ); -- DESTRUCTORS : procedure Clear ( p : in out Eval_Laur_Sys ); procedure Clear ( p : in out Eval_Coeff_Laur_Sys ); end Complex_Laurent_Polynomial_Systems; SHAR_EOF fi # end of overwriting check if test -f 'complex_multivariate_laurent_polynomials.ads' then echo shar: will not over-write existing file "'complex_multivariate_laurent_polynomials.ads'" else cat << "SHAR_EOF" > 'complex_multivariate_laurent_polynomials.ads' with Multivariate_Laurent_Polynomials; with Complex_Instantiation_Parameters; use Complex_Instantiation_Parameters; with Complex_Numbers,Complex_Vectors; use Complex_Numbers,Complex_Vectors; with Integer_Graded_Lexicographical_Ordening; use Integer_Graded_Lexicographical_Ordening; package Complex_Multivariate_Laurent_Polynomials is new Multivariate_Laurent_Polynomials (double_complex,Vector,CMPLX(0.0),clear,copy,equal,"+","-","-","*","/", convert,Plus_Cmplx,Min_Cmplx,Min_Cmplx,Mult_Cmplx,Div_Cmplx,"<",">"); SHAR_EOF fi # end of overwriting check if test -f 'complex_multivariate_polynomials.ads' then echo shar: will not over-write existing file "'complex_multivariate_polynomials.ads'" else cat << "SHAR_EOF" > 'complex_multivariate_polynomials.ads' with Multivariate_Polynomials; with Complex_Instantiation_Parameters; use Complex_Instantiation_Parameters; with Complex_Numbers,Complex_Vectors; use Complex_Numbers,Complex_Vectors; with Natural_Graded_Lexicographical_Ordening; use Natural_Graded_Lexicographical_Ordening; package Complex_Multivariate_Polynomials is new Multivariate_Polynomials (double_complex,Vector,CMPLX(0.0),clear,copy,equal,"+","-","-","*", convert,Plus_Cmplx,Min_Cmplx,Min_Cmplx,Mult_Cmplx,"<",">"); SHAR_EOF fi # end of overwriting check if test -f 'complex_multivariate_polynomials_io.adb' then echo shar: will not over-write existing file "'complex_multivariate_polynomials_io.adb'" else cat << "SHAR_EOF" > 'complex_multivariate_polynomials_io.adb' with integer_io; use integer_io; with Strings_to_Natural_Numbers; use Strings_to_Natural_Numbers; with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Numbers,Natural_Vectors; use Complex_Numbers; with Symbol_Table,Symbol_Table_io; use Symbol_Table; package body Complex_Multivariate_Polynomials_io is use Floating_Point_Numbers.double_float_io; -- INTERNAL VARIABLES : right : constant natural := 75; -- these variables are needed column : natural := 0; -- for the output of long polynomials procedure init_line is begin column := 0; end init_line; procedure line ( file : in file_type; n : natural ) is -- DESCRIPTION : -- this routine decides when a new line on the output has to be taken; -- n is the number of characters that will be written on the output. -- This routine must be invoked before the actual output operation. begin if n >= right - column then new_line(file); column := 0; else column := column + n; end if; end line; -- AUXILIARIES FOR THE INPUT ROUTINES : procedure Build_Number ( file : in file_type; char : in out character; i1,i2 : out integer; ni1,ni2 : out natural; sign : out character ) is -- DESCRIPTION : -- characters are read from the input and a number is build up; -- the result is the number : i1*10^ni2 + i2. -- ON ENTRY : -- file file type of a file that must be opened for input; -- char first character to be analized. -- ON RETURN : -- char first character that is not a digit; -- i1, i2 digits read; -- ni1, ni2 number of digits in i1 and i2; -- sign sign of the number. res1,res2 : integer := 0; min : boolean := false; k1,k2,temp : natural := 0; begin sign := '+'; while (char = ' ') loop get(file,char); end loop; if (char = '+') or (char = '-') then min := (char = '-'); sign := char; get(file,char); end if; while (char = ' ') loop get(file,char); end loop; loop temp := convert(char); if temp < 10 then if k1 < 9 then res1 := res1*10 + temp; k1 := k1 + 1; elsif k2 < 9 then res2 := res2*10 + temp; k2 := k2 + 1; else null; -- skip the rest of the numbers end if; get(file,char); else exit; end if; end loop; if min then i1 := -res1; i2 := -res2; else i1 := res1; i2 := res2; end if; ni1 := k1; ni2 := k2; end Build_Number; procedure Build_Number ( file : in file_type; char : in out character; f : out double_float ) is -- DESCRIPTION : -- a floating point number is read f_int1,f_int2,f_quot1,f_quot2,expo,expo2 : integer := 0; f_int,f_quot : double_float := 0.0; k1,k2,nq1,nq2,np1,np2,temp : natural := 0; sign : character; min : boolean; begin Build_Number(file,char,f_int1,f_int2,np1,np2,sign); f_int := double_float(f_int1) * 10.0**np2 + double_float(f_int2); min := (sign = '-'); case char is when '.' => get(file,char); -- skip the point temp := convert(char); if temp < 10 then Build_Number(file,char,f_quot1,f_quot2,nq1,nq2,sign); f_quot := double_float(f_quot1) * 10.0**nq2 + double_float(f_quot2); end if; if char = 'E' then get(file,char); -- skip the 'E' Build_Number(file,char,expo,expo2,k1,k2,sign); end if; when 'E' => if char = 'E' then get(file,char); -- skip the 'E' Build_Number(file,char,expo,expo2,k1,k2,sign); end if; when others => null; end case; if min then if (f_int = 0.0) and (f_quot = 0.0) and (nq1 = 0) and (np1 = 0) then f := -1.0; -- "-x" = -1*x else f := ( f_int - f_quot*10.0**(-nq1-nq2) )*10.0**expo ; end if; else f := ( f_int + f_quot*10.0**(-nq1-nq2) )*10.0**expo ; end if; end Build_Number; procedure Build_Number ( file : in file_type; char : in out character; c : out double_complex ) is -- DESCRIPTION : -- a floating point number is read and converted into a complex number; -- the number may be the quotient of two floating point numbers f1,f2 : double_float; begin Build_Number(file,char,f1); if char = '/' then get(file,char); -- skip the '/' Build_Number(file,char,f2); c := CMPLX(f1/f2); else c := CMPLX(f1); end if; exception when numeric_error => raise INFINITE_NUMBER; end Build_Number; procedure Read_Term ( file : in file_type; char : in out character; n : in natural; termp : in out Poly ); -- DESCRIPTION : -- Reads a term from file, char is the first character of the term. procedure Read_Factor ( file : in file_type; char : in out character; n : in natural; d : in out Degrees; pb : in out Poly ); -- DESCRIPTION : -- Reads a factor from file, char is the first character of the factor. procedure Read_Factor ( file : in file_type; char : in out character; n : in natural; d : in out Degrees; pb : in out Poly ) is sb : symbol; i : positive := 1; k,ne,ne2 : natural := 0; expo,expo2 : integer := 1; sign : character; begin sb := (sb'range => ' '); while (char = ' ') loop get(file,char); end loop; if char = '(' then get(file,n,pb); get(file,char); -- get a new symbol, skip '(' return; end if; -- read the symbol : loop case char is when '+' | '-' | '*' | '^' => exit; when delimiter | ' ' | ')' => exit; when '(' => raise ILLEGAL_SYMBOL; when others => sb(i) := char; i := i+1; get(file,char); end case; end loop; -- check for legality of the symbol : if convert(sb(1)) < 10 then raise ILLEGAL_SYMBOL; else for j in 2..3 loop case sb(j) is when '*' | '+' | '-' | '^' | '/' | ';' | '(' | ')' => raise ILLEGAL_SYMBOL; when others => null; end case; end loop; end if; -- search for the number of the symbol : k := Symbol_Table.get(sb); if k = 0 then declare begin Symbol_Table.add(sb,k); exception when OVERFLOW_IN_THE_SYMBOL_TABLE => raise OVERFLOW_OF_UNKNOWNS; end; end if; if k > n then raise OVERFLOW_OF_UNKNOWNS; end if; -- read further : while (char = ' ') loop get(file,char); end loop; if char = '^' then get(file,char); -- skip the '^' Build_Number(file,char,expo,expo2,ne,ne2,sign); d(k) := d(k) + natural(expo); while char = ' ' loop get(file,char); end loop; if char /= '*' -- the case x^2*... then return; -- end of factor else get(file,char); -- skip the '*' end if; elsif char = '*' then get(file,char); if char = '*' then get(file,char); -- the case " x ** expo " Build_Number(file,char,expo,expo2,ne,ne2,sign); d(k) := d(k) + natural(expo); while (char = ' ') loop get(file,char); end loop; if char /= '*' then return; -- end of factor else get(file,char); -- skip the '*' end if; else d(k) := d(k) + 1; -- the case " x * ? " end if; else -- the case " x ?", with ? /= '*' or ' ' or '^' : d(k) := d(k) + 1; return; end if; while (char = ' ') loop get(file,char); end loop; if (char = '-') or (char = '+') then return; end if; if convert(char) < 10 then -- the case " x * c " or " x ** c * c " : Read_Term(file,char,n,pb); else -- the case " x * y " : Read_Factor(file,char,n,d,pb); end if; exception when ILLEGAL_CHARACTER => raise ILLEGAL_CHARACTER; when ILLEGAL_SYMBOL => raise ILLEGAL_SYMBOL; when ILLEGAL_OPERATION => raise ILLEGAL_OPERATION; when INFINITE_NUMBER => raise INFINITE_NUMBER; when OVERFLOW_OF_UNKNOWNS => raise OVERFLOW_OF_UNKNOWNS; when BAD_BRACKET => raise BAD_BRACKET; -- when others => raise; end Read_Factor; procedure Read_Term ( file : in file_type; char : in out character; n : in natural; termp : in out Poly ) is c,c2 : double_complex; d : Degrees := new Natural_Vectors.Vector'(1..n => 0); pb,res,temp : Poly; tmp : Term; procedure Collect_Factor_Polynomial is begin if pb /= Null_Poly then if res = Null_Poly then Copy(pb,res); Clear(pb); else Mult_Poly(res,pb); Clear(pb); end if; end if; end Collect_Factor_Polynomial; begin Build_Number(file,char,c); -- look for 'i' : while (char = ' ') loop get(file,char); end loop; if ( c = CMPLX(0.0) ) and then (char = 'i') then -- the case "+ i" : c := CMPLX(0.0,1.0); get(file,char); -- skip 'i' elsif ( c = CMPLX(-1.0) ) and then (char = 'i') then -- the case "- i" : c := CMPLX(0.0,-1.0); get(file,char); -- skip 'i' elsif char = '*' then -- the case ".. c *.." : while (char = ' ') loop get(file,char); end loop; get(file,char); -- skip '*' while (char = ' ') loop get(file,char); end loop; if char = 'i' then -- the case ".. c * i.." : c := CMPLX(0.0,REAL_PART(c)); get(file,char); -- skip 'i' else -- the case ".. c * x.." : Read_Factor(file,char,n,d,pb); if pb /= Null_Poly then Clear(res); Copy(pb,res); Clear(pb); end if; end if; else -- the case ".. c ?" : -- will be treated in the loop null; end if; loop case char is when ' ' => get(file,char); when '*' => get(file,char); Read_Factor(file,char,n,d,pb); Collect_Factor_Polynomial; when '+' | '-' => if c = CMPLX(0.0) then raise ILLEGAL_CHARACTER; else exit; end if; when delimiter => exit; when '(' => if c = CMPLX(0.0) or else c = CMPLX(-1.0) then -- the case "+ (" or "- (" : c := CMPLX(0.0); exit; else -- the case "c (" : raise BAD_BRACKET; end if; when ')' => exit; when others => if c = CMPLX(0.0) then c := CMPLX(1.0); Read_Factor(file,char,n,d,pb); elsif c = CMPLX(-1.0) then Read_Factor(file,char,n,d,pb); else raise ILLEGAL_CHARACTER; end if; Collect_Factor_Polynomial; end case; end loop; tmp.cf := c; tmp.dg := d; termp := create(tmp); if Number_Of_Unknowns(res) > 0 then Mult_Poly(termp,res); Clear(res); end if; exception when ILLEGAL_CHARACTER => raise ILLEGAL_CHARACTER; when ILLEGAL_SYMBOL => raise ILLEGAL_SYMBOL; when ILLEGAL_OPERATION => raise ILLEGAL_OPERATION; when INFINITE_NUMBER => raise INFINITE_NUMBER; when OVERFLOW_OF_UNKNOWNS => raise OVERFLOW_OF_UNKNOWNS; when BAD_BRACKET => raise BAD_BRACKET; -- when others => raise; end Read_Term; ---------------------------------- -- THE INPUT OPERATIONS : -- ---------------------------------- procedure get ( n : in natural; p : out Poly ) is begin get(Standard_Input,n,p); exception when ILLEGAL_CHARACTER => raise ILLEGAL_CHARACTER; when ILLEGAL_SYMBOL => raise ILLEGAL_SYMBOL; when ILLEGAL_OPERATION => raise ILLEGAL_OPERATION; when INFINITE_NUMBER => raise INFINITE_NUMBER; when OVERFLOW_OF_UNKNOWNS => raise OVERFLOW_OF_UNKNOWNS; when BAD_BRACKET => raise BAD_BRACKET; -- when others => raise; end get; procedure get ( file : in file_type; n : in natural; p : out Poly ) is char,oper : character; term,res,acc : Poly; begin if Symbol_Table.Empty then Symbol_Table.Init(n); end if; oper := '+'; get(file,char); while (char = ' ') loop get(file,char); end loop; if char = '-' then oper := '-'; end if; -- the first term can have no sign Read_Term(file,char,n,res); -- therefore read it first loop case char is when ' ' => get(file,char); -- skip blanks when '+' | '-' => oper := char; Read_Term(file,char,n,term); Plus_Poly(res,term); Clear(term); when delimiter => exit; when '(' => get(file,n,term); case oper is when '+' => Plus_Poly(acc,res); Clear(res); Copy(term,res); when '-' => Plus_Poly(acc,res);Clear(res); Copy(term,res); Min_Poly(res); when '*' => Mult_Poly(res,term); when others => raise ILLEGAL_OPERATION; end case; Clear(term); get(file,char); -- get new character when ')' => exit; when '*' => if res = Null_Poly then raise ILLEGAL_CHARACTER; else -- the case " ) * " : oper := char; get(file,char); -- skip '*' Read_Term(file,char,n,term); if char /= '(' then case oper is when '+' => Plus_Poly(res,term); when '-' => Min_Poly(res,term); when '*' => Mult_Poly(res,term); when others => raise ILLEGAL_OPERATION; end case; end if; Clear(term); end if; when others => raise ILLEGAL_CHARACTER; end case; end loop; p := acc + res; Clear(acc); Clear(res); exception when ILLEGAL_CHARACTER => raise ILLEGAL_CHARACTER; when ILLEGAL_SYMBOL => raise ILLEGAL_SYMBOL; when ILLEGAL_OPERATION => raise ILLEGAL_OPERATION; when INFINITE_NUMBER => raise INFINITE_NUMBER; when OVERFLOW_OF_UNKNOWNS => raise OVERFLOW_OF_UNKNOWNS; when BAD_BRACKET => raise BAD_BRACKET; -- when others => raise; end get; procedure get ( p : out Poly ) is begin get(Standard_Input,p); exception when ILLEGAL_CHARACTER => raise ILLEGAL_CHARACTER; when ILLEGAL_SYMBOL => raise ILLEGAL_SYMBOL; when ILLEGAL_OPERATION => raise ILLEGAL_OPERATION; when INFINITE_NUMBER => raise INFINITE_NUMBER; when OVERFLOW_OF_UNKNOWNS => raise OVERFLOW_OF_UNKNOWNS; when BAD_BRACKET => raise BAD_BRACKET; -- when others => raise; end get; procedure get ( file : in file_type; p : out Poly ) is n : natural; begin get(file,n); get(file,n,p); exception when ILLEGAL_CHARACTER => raise ILLEGAL_CHARACTER; when ILLEGAL_SYMBOL => raise ILLEGAL_SYMBOL; when ILLEGAL_OPERATION => raise ILLEGAL_OPERATION; when INFINITE_NUMBER => raise INFINITE_NUMBER; when OVERFLOW_OF_UNKNOWNS => raise OVERFLOW_OF_UNKNOWNS; when BAD_BRACKET => raise BAD_BRACKET; -- when others => raise; end get; -- AUXILIARIES FOR OUTPUT ROUTINES : function Is_Imag ( c : double_complex ) return boolean is begin return ( REAL_PART(c) = 0.0 ); end is_imag; function Is_Real ( c : double_complex ) return boolean is begin return ( IMAG_PART(c) = 0.0 ); end is_real; function Is_Integer ( f : double_float ) return boolean is begin return ( (f - double_float(integer(f))) = 0.0 ); exception when numeric_error => return false; end is_integer; procedure Write_Number ( file : in file_type; i : in integer ) is -- DESCRIPTION : -- writes the integer number with only one blank before it begin for j in 1..8 loop if i < integer(10.0**j) then line(file,j+1); put(file,i,j+1); return; end if; end loop; line(file,11); put(file,i); end Write_Number; procedure Write_Number ( file : in file_type; f : in double_float ) is begin if is_integer(f) then Write_Number(file,integer(f)); else line(file,21); put(file,f); end if; end Write_Number; procedure Write_Number ( file : in file_type; c : in double_complex ) is begin if Is_Real(c) then Write_Number(file,REAL_PART(c)); elsif Is_Imag(c) then Write_Number(file,IMAG_PART(c)); line(file,2); put(file,"*i"); else line(file,1); put(file,"("); Write_Number(file,REAL_PART(c)); if IMAG_PART(c) > 0.0 then line(file,2); put(file," +"); else line(file,2); put(file," -"); end if; if IMAG_PART(c) = 1.0 then line(file,1); put(file,"i"); elsif IMAG_PART(c) = -1.0 then line(file,3); put(file," -i"); else Write_Number(file,abs(IMAG_PART(c))); line(file,2); put(file,"*i"); end if; line(file,1); put(file,")"); end if; end Write_Number; function Length_Factor ( d,i : natural; standard : boolean; pow : power ) return natural is -- DESCRIPTION : -- this procedure computes the number of characters needed -- for the output of one factor l : natural := 0; sb : symbol; begin if standard then if i < 10 then l := l + 2; else l := l + 3; end if; else sb := Symbol_Table.get(i); if sb(3) /= ' ' then l := l + 3; elsif sb(2) /= ' ' then l := l + 2; else l := l + 1; end if; end if; if d > 1 then if pow = '^' then l := l + 1; else l := l + 2; end if; if d < 10 then l := l + 1; else l := l + 2; end if; end if; return l; end Length_Factor; procedure Write_Factor ( file : in file_type; d,i : in natural; standard : in boolean; pow : in power ) is -- DESCRIPTION : -- Writes the factor corresponding with the ith unknown on file. sb : Symbol; begin if standard then put(file,'x'); if i<10 then put(file,i,1); else put(file,i,2); end if; else sb := Symbol_Table.get(i); Symbol_Table_io.put(file,sb); end if; if d > 1 then if pow = '^' then put(file,'^'); else put(file,"**"); end if; if d < 10 then put(file,d,1); else put(file,d,2); end if; end if; end Write_Factor; -- THE OUTPUT OPERATIONS : procedure put ( n : out natural; p : in Poly; pow : in power := '*' ) is begin put(Standard_Output,n,p,pow); end put; procedure put ( file : in file_type; n : out natural; p : in Poly; pow : in power := '*' ) is nn : constant natural := Number_of_Unknowns(p); standard : constant boolean := ( Symbol_Table.number < nn ); first_time : boolean := true; procedure Write_Term ( t : in Term; continue : out boolean ) is -- DESCRIPTION : -- Writes a term is written on file. passed : boolean; begin if first_time then first_time := false; else if (is_real(t.cf) and then REAL_PART(t.cf) > 0.0) or else (is_imag(t.cf) and then IMAG_PART(t.cf) > 0.0) or else (not is_real(t.cf) and then not is_imag(t.cf)) then line(file,1); put(file,'+'); end if; end if; if Sum(t.dg) = 0 then Write_Number(file,t.cf); else if ( t.cf - CMPLX(-1.0) ) + CMPLX(1.0) = CMPLX(1.0) then line(file,1); put(file,'-'); elsif ( t.cf - CMPLX(0.0,1.0) ) + CMPLX(1.0) = CMPLX(1.0) then line(file,2); put(file,"i*"); elsif ( t.cf - CMPLX(0.0,-1.0) ) + CMPLX(1.0) = CMPLX(1.0) then line(file,3); put(file,"-i*"); elsif (t.cf /= CMPLX(1.0)) then Write_Number(file,t.cf); line(file,1); put(file,'*'); end if; passed := false; for i in t.dg'range loop if t.dg(i) > 0 then if passed then line(file,1); put(file,'*'); else passed := true; end if; Line(file,Length_Factor(t.dg(i),i,standard,pow)); Write_Factor(file,t.dg(i),i,standard,pow); end if; end loop; end if; continue := true; end Write_Term; procedure Write_Terms is new Visiting_Iterator (process => Write_Term); begin init_line; n := nn; Write_Terms(p); line(file,1); put(file,delimiter); end put; procedure put ( p : in Poly; pow : in power ) is begin put(Standard_Output,p,pow); end put; procedure put ( file : in file_type; p : in Poly; pow : in power ) is n : natural := Number_of_Unknowns(p); begin init_line; put(file,n,1); put_line(file," "); put(file,n,p,pow); end put; procedure put ( p : in Poly ) is begin put(Standard_Output,p,'*'); end put; procedure put ( file : in file_type; p : in Poly ) is begin put(file,p,'*'); end put; procedure put_line ( file : in file_type; p : in Poly; pow : in power ) is n : constant natural := Number_of_Unknowns(p); standard : constant boolean := ( Symbol_Table.Number < n ); procedure Write_Term ( t : in Term; continue : out boolean ) is begin new_line(file); put(file,"+"); Init_Line; Write_Number(file,t.cf); if Sum(t.dg) /= 0 then for i in t.dg'range loop if t.dg(i) > 0 then put(file,'*'); Write_Factor(file,t.dg(i),i,standard,pow); end if; end loop; end if; continue := true; end Write_Term; procedure Write_Terms is new Visiting_Iterator (process => Write_Term); begin Write_Terms(p); put_line(file,";"); end put_line; procedure put_line ( p : in Poly; pow : in power ) is begin put_line(Standard_Output,p,pow); end put_line; procedure put_line ( p : in Poly ) is begin put_line(Standard_Output,p,'*'); end put_line; procedure put_line ( file : in file_type; p : in Poly ) is begin put_line(file,p,'*'); end put_line; procedure Display_Format is s : array(1..24) of string(1..65); begin s( 1):=" A complex multivariate polynomial is denoted as a sequence of"; s( 2):="terms, separated by `+' and terminated by the semicolon `;'. The"; s( 3):="brackets '(' and ')' must be used to isolate a sequence of terms"; s( 4):="as a factor in a complex multivariate polynomial. "; s( 5):=" A term can be either a coefficient or a coefficient, followed"; s( 6):="by '*' and a monomial. If in the latter case the coefficient"; s( 7):="equals one, then it may be omitted. "; s( 8):=" A coefficient may be denoted as an integer, a rational, a"; s( 9):="floating-point or a complex number. "; s(10):=" A monomial is a sequence of powers of unknowns, separated by"; s(11):="'*'. The power operator is represented by '**' or '^'. It must"; s(12):="be followed by a positive natural number. If the power equals"; s(13):="one, then it may be omitted. "; s(14):=" An unknown can be denoted by at most 3 characters. The first"; s(15):="character must be a letter and the other two characters must be"; s(16):="different from '+', '-', '*', '^', '/', ';', '(' and ')'. The"; s(17):="letter i means sqrt(-1), whence it does not represent an unknown."; s(18):="The number of unknowns may not exceed the declared dimension."; s(19):=" Some examples of valid notations of complex multivariate"; s(20):="polynomials: "; s(21):=" x**2*y + 1/2*z*y**2 - 2*z + y**3 + x - 1E9/-8.E-6* y + 3; "; s(22):=" x^2*y + z*y^2 - 2*z + y^3 + x - y + 3; "; s(23):=" (1.01 + 2.8*i)*x1**2*x2 + x3**2*x1 - 3*x1 + 2*x2*x3 - 3; "; s(24):=" (x1^2*x2 + x3^2*x1 - 3*x1 + 2*x2*x3 - 3)*x2**2*(x2-1+i); "; for i in s'range loop put_line(s(i)); end loop; end Display_Format; end Complex_Multivariate_Polynomials_io; SHAR_EOF fi # end of overwriting check if test -f 'complex_multivariate_polynomials_io.ads' then echo shar: will not over-write existing file "'complex_multivariate_polynomials_io.ads'" else cat << "SHAR_EOF" > 'complex_multivariate_polynomials_io.ads' with text_io; use text_io; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; package Complex_Multivariate_Polynomials_io is -- DESCRIPTION : -- This package contains routines for the input and output -- of complex multivariate polynomials in symbolic form. -- EXAMPLES : i denotes sqrt(-1) -- ex1 : x**2*y + 1/2*z*y**2 - 2*z + y**3 + x - 1E9/-8.E-6* y + 3; -- ex2 : x^2*y + z*y^2 - 2*z + y^3 + x - y + 3; -- ex3 : (1.01 + 2.8*i)*x1**2*x2 + x3**2*x1 - 3*x1 + 2*x2*x3 - 3; -- ex4 : (x1^2*x2 + x3^2*x1 - 3*x1 + 2*x2*x3 - 3)*x2**2*(x2-1+i); -- DATASTRUCTURE AND CONSTANT NEEDED : type Power is ('*','^'); delimiter : constant character := ';'; -- EXCEPTIONS : ILLEGAL_CHARACTER : exception; -- occurs when a character is found unexpected to be ILLEGAL_SYMBOL : exception; -- occurs when an illegal symbol is read ILLEGAL_OPERATION : exception; -- occurs when one tries to perform illegal operations with -- polynomials INFINITE_NUMBER : exception; -- occurs when a rational coefficient has a denominator = 0 OVERFLOW_OF_UNKNOWNS : exception; -- occurs when the number of unknowns turns to be bigger -- than first was mentioned BAD_BRACKET : exception; -- occurs when a bracket, like '(' or ')' is misplaced -- THE INPUT OPERATIONS : procedure get ( n : in natural; p : out Poly ); procedure get ( file : in file_type; n : in natural; p : out Poly ); procedure get ( p : out Poly ); procedure get ( file : in file_type; p : out Poly ); -- DESCRIPTION : -- A polynomial will be read from file or standard input. -- No ordening on the monomials is assumed. -- REQUIRED : -- * all unknows must begin with a letter and may have -- no symbols like '+', '-', '*', '^', '/', ';' or brackets in them, -- i = sqrt(-1) is reserved for complex numbers representation; -- * each symbol is limited to 3 characters; -- * the input is terminated by the delimiter; -- * no blanks may occur in the numbers; -- * if specified, then the file must already be opened for input. -- NOTE : -- The end_of_line symbol is not read. -- ON ENTRY : -- file file where the input is, -- if not specified, then standard input is assumed; -- n the number of unknowns, -- if not specified, then n will first be read. -- ON RETURN : -- p a polynomial in n unknowns. -- THE OUTPUT OPERATIONS : procedure put ( n : out natural; p : in Poly; pow : in Power := '*' ); procedure put ( file : in file_type; n : out natural; p : in Poly; pow : in Power := '*' ); procedure put ( p : in Poly; pow : in Power ); procedure put ( file : in file_type; p : in Poly; pow : in Power ); procedure put ( p : in Poly ); procedure put ( file : in file_type; p : in Poly ); -- DESCRIPTION : -- A polynomial in n unknowns is written on file or on standard output. -- REQUIRED : -- If specified, then the file is must already been opened for output. -- ON ENTRY : -- file file where the output must come, -- if not specified, then standard output is assumed; -- p a polynomial in n unknows; -- pow kind of power symbol used, the default is '*'. -- ON RETURN : -- n the number of unknows of p, -- if not specified, n will first be written. procedure put_line ( p : in Poly ); procedure put_line ( file : in file_type; p : in Poly ); procedure put_line ( p : in Poly; pow : in Power ); procedure put_line ( file : in file_type; p : in Poly; pow : in Power ); -- DESCRIPTION : -- Every term of the polynomial p will be written on a separate line. procedure Display_Format; -- DESCRIPTION : -- Displays on screen the formatting rules as on-line help facility. end Complex_Multivariate_Polynomials_io; SHAR_EOF fi # end of overwriting check if test -f 'complex_polynomial_systems.adb' then echo shar: will not over-write existing file "'complex_polynomial_systems.adb'" else cat << "SHAR_EOF" > 'complex_polynomial_systems.adb' with unchecked_deallocation; package body Complex_Polynomial_Systems is -- CREATORS : function Create ( p : Poly_Sys ) return Eval_Poly_Sys is res : Eval_Poly_Sys(p'range); begin for k in p'range loop res(k) := Create(p(k)); end loop; return res; end Create; function Create ( p : Poly_Sys ) return Eval_Coeff_Poly_Sys is res : Eval_Coeff_Poly_Sys(p'range); begin for k in p'range loop res(k) := Create(p(k)); end loop; return res; end Create; -- ADDITIONAL ARITHMETIC OPERATIONS : function "*" ( a : double_complex; p : Poly_Sys ) return Poly_Sys is res : Poly_Sys(p'range); begin for k in p'range loop res(k) := a*p(k); end loop; return res; end "*"; function "*" ( p : Poly_Sys; a : double_complex ) return Poly_Sys is begin return a*p; end "*"; procedure Mult_Cmplx ( p : in out Poly_Sys; a : in double_complex ) is begin for k in p'range loop Mult_Coeff(p(k),a); end loop; end Mult_Cmplx; function Eval ( p : Poly_Sys; x : double_complex; i : natural ) return Poly_Sys is res : Poly_Sys(p'range); begin for j in p'range loop res(j) := Eval(p(j),x,i); end loop; return res; end Eval; function Eval ( p : Poly_Sys; x : Vector ) return Vector is res : Vector(p'range); begin for i in p'range loop res(i) := Eval(p(i),x); end loop; return res; end Eval; function Eval ( p : Eval_Poly_Sys; x : Vector ) return Vector is res : Vector(p'range); begin for i in p'range loop res(i) := Eval(p(i),x); end loop; return res; end Eval; function Eval ( p : Eval_Coeff_Poly_Sys; c : Complex_Vectors_of_Vectors.Vector; x : Vector ) return Vector is res : Vector(p'range); begin for i in p'range loop res(i) := Eval(p(i),c(i).all,x); end loop; return res; end Eval; function Diff ( p : Poly_Sys; i : natural ) return Poly_Sys is res : Poly_Sys(p'range); begin for j in p'range loop res(j) := Diff(p(j),i); end loop; return res; end Diff; procedure Diff ( p : in out Poly_Sys; i : in natural ) is begin for j in p'range loop Diff(p(j),i); end loop; end Diff; -- DESTRUCTORS : procedure Clear ( p : in out Eval_Poly_Sys ) is begin for k in p'range loop Clear(p(k)); end loop; end Clear; procedure Clear ( p : in out Eval_Coeff_Poly_Sys ) is begin for k in p'range loop Clear(p(k)); end loop; end Clear; procedure Clear ( p : in out Link_to_Poly_Sys ) is procedure free is new unchecked_deallocation(Poly_Sys,Link_to_Poly_Sys); begin if p /= null then Clear(p.all); end if; free(p); end Clear; end Complex_Polynomial_Systems; SHAR_EOF fi # end of overwriting check if test -f 'complex_polynomial_systems.ads' then echo shar: will not over-write existing file "'complex_polynomial_systems.ads'" else cat << "SHAR_EOF" > 'complex_polynomial_systems.ads' with Vectors; with Complex_Numbers,Complex_Vectors; use Complex_Numbers,Complex_Vectors; with Complex_Vectors_of_Vectors; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; package Complex_Polynomial_Systems is -- DESCRIPTION : -- This package provides polynomial systems as vectors of polynomials, -- added with data structures for evaluation and corresponding functions. -- DATA STRUCTURES : package Vectors_of_Complex_Multivariate_Polynomials is new Vectors (Poly,Null_Poly,Clear,Copy,Equal,"+","-","-","*", Plus_Poly,Min_Poly,Min_Poly,Mult_Poly); type Poly_Sys is new Vectors_of_Complex_Multivariate_Polynomials.Vector; type Link_to_Poly_Sys is access Poly_Sys; type Eval_Poly_Sys is array ( integer range <> ) of Eval_Poly; type Eval_Coeff_Poly_Sys is array ( integer range <> ) of Eval_Coeff_Poly; -- CREATORS : function Create ( p : Poly_Sys ) return Eval_Poly_Sys; function Create ( p : Poly_Sys ) return Eval_Coeff_Poly_Sys; -- ADDITIONAL ARITHMETICAL OPERATIONS : function "*" ( a : double_complex; p : Poly_Sys ) return Poly_Sys; -- return a*p; function "*" ( p : Poly_Sys; a : double_complex ) return Poly_Sys; -- return p*a; procedure Mult_Cmplx ( p : in out Poly_Sys; a : in double_complex ); -- p := a*p; function Eval ( p : Poly_Sys; x : double_complex; i : natural ) return Poly_Sys; function Eval ( p : Poly_Sys; x : Vector ) return Vector; function Eval ( p : Eval_Poly_Sys; x : Vector ) return Vector; function Eval ( p : Eval_Coeff_Poly_Sys; c : Complex_Vectors_of_Vectors.Vector; x : Vector ) return Vector; function Diff ( p : Poly_Sys; i : natural ) return Poly_Sys; procedure Diff ( p : in out Poly_Sys; i : in natural ); -- DESTRUCTORS : procedure Clear ( p : in out Eval_Poly_Sys ); procedure Clear ( p : in out Eval_Coeff_Poly_Sys ); procedure Clear ( p : in out Link_to_Poly_Sys ); end Complex_Polynomial_Systems; SHAR_EOF fi # end of overwriting check if test -f 'complex_polynomial_systems_io.adb' then echo shar: will not over-write existing file "'complex_polynomial_systems_io.adb'" else cat << "SHAR_EOF" > 'complex_polynomial_systems_io.adb' with integer_io,Numbers_io; use integer_io,Numbers_io; with Communications_with_User; use Communications_with_User; with Symbol_Table,Symbol_Table_io; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; package body Complex_Polynomial_Systems_io is -- SCANNING THE LINE FOR A NATURAL NUMBER : function Scan_Line ( file : in file_type ) return natural is m : natural := 0; ch : character; begin while not END_OF_LINE(file) loop get(file,ch); case ch is when '0' => m := 10*m; when '1' => m := 10*m + 1; when '2' => m := 10*m + 2; when '3' => m := 10*m + 3; when '4' => m := 10*m + 4; when '5' => m := 10*m + 5; when '6' => m := 10*m + 6; when '7' => m := 10*m + 7; when '8' => m := 10*m + 8; when '9' => m := 10*m + 9; when others => null; end case; end loop; return m; end Scan_Line; -- EXCEPTION HANDLERS : procedure Write_Symbol_Table is -- DESCRIPTION : -- Writes the current list of symbols on one line on standard output. begin put("Current symbols : "); for i in 1..Symbol_Table.Number loop Symbol_Table_io.put(Symbol_Table.Get(i)); put(" "); end loop; new_line; end Write_Symbol_Table; procedure Handler ( k : in natural ) is begin put(" raised while reading polynomial "); put(k,1); put_line("."); end Handler; -- THE INPUT OPERATIONS : procedure get ( n : in natural; s : out Poly_Sys ) is begin get(Standard_Input,n,s); end get; procedure get ( n,m : in natural; s : out Poly_Sys ) is begin get(Standard_Input,n,m,s); end get; procedure get ( file : in file_type; n : in natural; s : out Poly_Sys ) is i : natural := 1; begin while i <= n loop get(file,n,s(i)); i := i + 1; end loop; exception when ILLEGAL_CHARACTER => put("ILLEGAL_CHARACTER"); Handler(i); raise; when ILLEGAL_SYMBOL => put("ILLEGAL_SYMBOL"); Handler(i); raise; when ILLEGAL_OPERATION => put("ILLEGAL_OPERATION"); Handler(i); raise; when INFINITE_NUMBER => put("INFINITE_NUMBER"); Handler(i); raise; when OVERFLOW_OF_UNKNOWNS => put("OVERFLOW_OF_UNKNOWNS"); Handler(i); Write_Symbol_Table; raise; when BAD_BRACKET => put("BAD_BRACKET"); Handler(i); raise; --when others => put("Exception"); Handler(i); raise; end get; procedure get ( file : in file_type; n,m : in natural; s : out Poly_Sys ) is i : natural := 1; begin while i <= n loop get(file,m,s(i)); i := i + 1; end loop; exception when ILLEGAL_CHARACTER => put("ILLEGAL_CHARACTER"); Handler(i); raise; when ILLEGAL_SYMBOL => put("ILLEGAL_SYMBOL"); Handler(i); raise; when ILLEGAL_OPERATION => put("ILLEGAL_OPERATION"); Handler(i); raise; when INFINITE_NUMBER => put("INFINITE_NUMBER"); Handler(i); raise; when OVERFLOW_OF_UNKNOWNS => put("OVERFLOW_OF_UNKNOWNS"); Handler(i); Write_Symbol_Table; raise; when BAD_BRACKET => put("BAD_BRACKET"); Handler(i); raise; --when others => put("Exception"); Handler(i); raise; end get; procedure get ( s : out Poly_Sys ) is begin get(Standard_Input,s); end get; procedure get ( file : in file_type; s : out Poly_Sys ) is n,m : natural; begin get(file,n); m := Scan_Line(file); if m /= 0 then get(file,n,m,s); else get(file,n,s); end if; end get; -- MORE USER FRIENDLY INPUT OPERATIONS : procedure get ( lp : in out Link_to_Poly_Sys ) is inpt : file_type; n,m : natural; onfile : character; begin -------------------------------------------- -- GETTING THE DIMENSION OF THE PROBLEM -- -------------------------------------------- loop put("Is the system on a file ? (y/n/i=info) "); Ask_Alternative(onfile,"yni"); if onfile = 'i' then new_line; Display_Format; new_line; end if; exit when onfile /= 'i'; end loop; new_line; if onfile = 'y' then declare procedure Read is begin put_line("Reading the name of the input file."); Read_Name_and_Open_File(inpt); get(inpt,n); end Read; begin Read; exception when others => put_line("The data on the file is not correct."); put_line("A natural number is expected first."); put_line("Supply another file name."); Close(inpt); Read; end; else put("Give the number of polynomials : "); Read_Natural(n); end if; --------------------------------------- -- GETTING THE POLYNOMIAL SYSTEM : -- --------------------------------------- lp := new Poly_Sys(1..n); declare procedure Read is begin if onfile = 'y' then m := Scan_Line(inpt); if m /= 0 then get(inpt,n,m,lp.all); else get(inpt,n,lp.all); end if; Close(inpt); else put("Give the number of unknowns : "); Read_Natural(m); put("Give "); put(n,2); if n = 1 then put_line(" polynomial : "); else put_line(" polynomials : "); end if; if m = n then get(n,lp.all); else get(n,m,lp.all); end if; skip_line; -- skip end_of_line symbol end if; exception when others => if onfile = 'y' then Close(inpt); end if; put_line("Polynomial system read : "); put(lp.all,'*'); raise; end Read; begin Read; exception when others => if onfile = 'y' then put_line("The polynomials on the file are incorrect." & " Try again..."); else put_line("The polynomials are incorrect. Try again..."); end if; Clear(lp); Symbol_Table.Clear; get(lp); end; end get; procedure get ( file : in file_type; lp : in out Link_to_Poly_Sys ) is n,m : natural; begin get(file,n); lp := new Poly_Sys(1..n); m := Scan_Line(file); if m /= 0 then get(file,n,m,lp.all); else get(file,n,lp.all); end if; skip_line(file); -- skip end_of_line symbol end get; -- THE OUTPUT OPERATIONS : procedure put ( n : out natural; s : in Poly_Sys; pow : in power := '*' ) is begin put(Standard_Output,n,s,pow); end put; procedure put ( n,m : out natural; s : in Poly_Sys; pow : in power := '*' ) is begin put(Standard_Output,n,m,s,pow); end put; procedure put ( file : in file_type; n : out natural; s : in Poly_Sys; pow : in power := '*' ) is nn : natural := s'length; begin n := nn; for i in s'range loop put(file,nn,s(i),pow); new_line(file); end loop; end put; procedure put ( file : in file_type; n,m : out natural; s : in Poly_Sys; pow : in power := '*' ) is nn : natural := s'length; mm : natural := Number_of_Unknowns(s(s'first)); begin n := nn; m := mm; for i in s'range loop put(file,mm,s(i),pow); new_line(file); end loop; end put; procedure put ( s : in Poly_Sys; pow : in power ) is begin put(Standard_Output,s,pow); end put; procedure put ( file : in file_type; s : in Poly_Sys; pow : in power ) is n : natural := s'length; m : natural := Number_of_Unknowns(s(s'first)); begin put(file,n,2); if m /= n then put(file,' '); put(file,m,2); end if; new_line(file); put(file,n,s,pow); end put; procedure put ( s : in Poly_Sys ) is begin put(Standard_Output,s,'*'); end put; procedure put ( file : in file_type; s : in Poly_Sys ) is begin put(file,s,'*'); end put; procedure put_line ( s : in Poly_Sys ) is begin put_line(Standard_Output,s); end put_line; procedure put_line ( file : in file_type; s : in Poly_Sys ) is begin put_line(file,s,'*'); end put_line; procedure put_line ( s : in Poly_Sys; pow : in Power ) is begin put_line(Standard_Output,s,pow); end put_line; procedure put_line ( file : in file_type; s : in Poly_Sys; pow : in Power ) is begin put(file,s'length,2); new_line(file); for i in s'range loop put_line(file,s(i),pow); end loop; end put_line; procedure Display_Format is s : array(1..3) of string(1..65); begin s(1):=" A complex polynomial system is denoted by the dimension"; s(2):="followed by as many complex multivariate polynomials as the"; s(3):="dimension. The dimension is a positive natural number. "; for i in s'range loop put_line(s(i)); end loop; Complex_Multivariate_Polynomials_io.Display_Format; end Display_Format; end Complex_Polynomial_Systems_io; SHAR_EOF fi # end of overwriting check if test -f 'complex_polynomial_systems_io.ads' then echo shar: will not over-write existing file "'complex_polynomial_systems_io.ads'" else cat << "SHAR_EOF" > 'complex_polynomial_systems_io.ads' with text_io; use text_io; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Multivariate_Polynomials_io; use Complex_Multivariate_Polynomials_io; package Complex_Polynomial_Systems_io is -- DESCRIPTION : -- This package contains routines for the input and output -- of human-readable polynomial systems. -- Note that for every write-procedure, there is a read- -- procedure that can read the written system. -- See also the package for the input and output -- of polynomials in n unknowns. -- THE INPUT OPERATIONS : procedure get ( n : in natural; s : out Poly_Sys ); procedure get ( n,m : in natural; s : out Poly_Sys ); procedure get ( file : in file_type; n : in natural; s : out Poly_Sys ); procedure get ( file : in file_type; n,m : in natural; s : out Poly_Sys ); procedure get ( s : out Poly_Sys ); procedure get ( file : in file_type; s : out Poly_Sys ); -- DESCRIPTION : -- A polynomial system is read; n polynomials are read. -- REQUIRED : -- * all unknows must begin with a letter and may have -- no symbols like '+', '-', '*', '^', '/', ';' or brackets in them; -- i = sqrt(-1) is reserved for complex numbers representation -- * each symbol is limited to 3 characters -- * the input is terminated by the delimiter -- * no blanks may occur in the numbers -- * if a file is specified, then it must be opened for input -- * n and m should both be on the first line ! -- * if n stands alone, it should be followed immediately by an -- end-of-line symbol. -- NOTE : -- The end_of_line symbol is not read. -- ON ENTRY : -- file file_type where the input is, -- if not specified, then standard input is assumed; -- n the number of equations, -- if not specified, then n will first be read; -- m the number of unknowns; -- if not specified, then m will first be read. -- ON RETURN : -- s a polynomial system. -- MORE USER FRIENDLY INPUT OPERATIONS : procedure get ( lp : in out Link_to_Poly_Sys ); procedure get ( file : in file_type; lp : in out Link_to_Poly_Sys ); -- DESCRIPTION : -- The first routine asks for a file name, while the second one -- assumes everything is on file and nothing has to be read from -- standard input. -- NOTE : -- The end_of_line symbol is read at the end of the polynomial system. -- THE OUTPUT OPERATIONS : procedure put ( n : out natural; s : in Poly_Sys; pow : in power := '*' ); procedure put ( n,m : out natural; s : in Poly_Sys; pow : in power := '*' ); procedure put ( file : in file_type; n : out natural; s : in Poly_Sys; pow : in power := '*' ); procedure put ( file : in file_type; n,m : out natural; s : in Poly_Sys; pow : in power := '*' ); procedure put ( s : in Poly_Sys; pow : in power ); procedure put ( file : in file_type; s : in Poly_Sys; pow : in power ); procedure put ( s : in Poly_Sys ); procedure put ( file : in file_type; s : in Poly_Sys ); -- DESCRIPTION : -- A polynomial system is written on standard output or on file. -- ON ENTRY : -- file file where the output must come; -- if not specified, then standard output is assumed -- s a polynomial system; -- pow kind of power symbol used. -- ON RETURN : -- n the number of equations of p, -- if not specified, n will first be written; -- m the number of unknowns. -- if not specified, m will first be written. procedure put_line ( s : in Poly_Sys ); procedure put_line ( file : in file_type; s : in Poly_Sys ); procedure put_line ( s : in Poly_Sys; pow : in Power ); procedure put_line ( file : in file_type; s : in Poly_Sys; pow : in Power ); -- DESCRIPTION : -- Writes the polynomials, every term on a separate line. procedure Display_Format; -- DESCRIPTION : -- Displays on screen the formatting rules as on-line help facility. end Complex_Polynomial_Systems_io; SHAR_EOF fi # end of overwriting check if test -f 'exponent_vectors.adb' then echo shar: will not over-write existing file "'exponent_vectors.adb'" else cat << "SHAR_EOF" > 'exponent_vectors.adb' package body Exponent_Vectors is -- CREATORS : function Create ( p : Complex_Multivariate_Laurent_Polynomials.Poly ) return Integer_Vectors_of_Vectors.Vector is use Complex_Multivariate_Laurent_Polynomials; res : Integer_Vectors_of_Vectors.Vector(1..Number_of_Terms(p)); ind : natural := 0; procedure Add_Exponent ( t : in Term; continue : out boolean ) is begin ind := ind + 1; res(ind) := new Integer_Vectors.Vector(t.dg'range); for i in t.dg'range loop res(ind)(i) := t.dg(i); end loop; continue := true; end Add_Exponent; procedure Add_Exponents is new Visiting_Iterator(Add_Exponent); begin Add_Exponents(p); return res; end Create; function Create ( p : Complex_Multivariate_Polynomials.Poly ) return Integer_Vectors_of_Vectors.Vector is use Complex_Multivariate_Polynomials; res : Integer_Vectors_of_Vectors.Vector(1..Number_of_Terms(p)); ind : natural := 0; procedure Add_Exponent ( t : in Term; continue : out boolean ) is begin ind := ind + 1; res(ind) := new Integer_Vectors.Vector(t.dg'range); for i in t.dg'range loop res(ind)(i) := t.dg(i); end loop; continue := true; end Add_Exponent; procedure Add_Exponents is new Visiting_Iterator(Add_Exponent); begin Add_Exponents(p); return res; end Create; function Create ( p : Poly_Sys ) return Exponent_Vectors_Array is res : Exponent_Vectors_Array(p'range); begin for i in p'range loop declare cpi : constant Integer_Vectors_of_Vectors.Vector := Create(p(i)); begin res(i) := new Integer_Vectors_of_Vectors.Vector(cpi'range); for j in cpi'range loop res(i)(j) := cpi(j); end loop; end; -- a detour for GNAT 3.07 -- res(i) := new Integer_Vectors_of_Vectors.Vector'(Create(p(i))); end loop; return res; end Create; function Create ( p : Laur_Sys ) return Exponent_Vectors_Array is res : Exponent_Vectors_Array(p'range); begin for i in p'range loop declare cpi : constant Integer_Vectors_of_Vectors.Vector := Create(p(i)); begin res(i) := new Integer_Vectors_of_Vectors.Vector(cpi'range); for j in cpi'range loop res(i)(j) := cpi(j); end loop; end; -- a detour for GNAT 3.07 -- res(i) := new Integer_Vectors_of_Vectors.Vector'(Create(p(i))); end loop; return res; end Create; -- SELECTOR : function Position ( ev : Integer_Vectors_of_Vectors.Vector; v : Integer_Vectors.Vector ) return integer is begin for i in ev'range loop if Integer_Vectors.Equal(ev(i).all,v) then return i; end if; end loop; return ev'last+1; end Position; -- DESTRUCTORS : procedure Clear ( v : in out Exponent_Vectors_Array ) is begin for i in v'range loop Integer_Vectors_of_Vectors.Clear(v(i)); end loop; end Clear; end Exponent_Vectors; SHAR_EOF fi # end of overwriting check if test -f 'exponent_vectors.ads' then echo shar: will not over-write existing file "'exponent_vectors.ads'" else cat << "SHAR_EOF" > 'exponent_vectors.ads' with Integer_Vectors; with Integer_Vectors_of_Vectors; with Complex_Multivariate_Polynomials; with Complex_Multivariate_Laurent_Polynomials; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Laurent_Polynomial_Systems; use Complex_Laurent_Polynomial_Systems; package Exponent_Vectors is -- DESCRIPTION : -- This package facilitates the management of exponent vectors. -- DATA STRUCTURE : array of exponent vectors type Exponent_Vectors_Array is array ( integer range <> ) of Integer_Vectors_of_Vectors.Link_to_Vector; -- CREATORS : function Create ( p : Complex_Multivariate_Laurent_Polynomials.Poly ) return Integer_Vectors_of_Vectors.Vector; function Create ( p : Complex_Multivariate_Polynomials.Poly ) return Integer_Vectors_of_Vectors.Vector; -- DESCRIPTION : -- The range of the vector on return is 1..Number_of_Terms(p). -- This vector contains copies of all exponents of p, as ordered in p. function Create ( p : Poly_Sys ) return Exponent_Vectors_Array; function Create ( p : Laur_Sys ) return Exponent_Vectors_Array; -- SELECTOR : function Position ( ev : Integer_Vectors_of_Vectors.Vector; v : Integer_Vectors.Vector ) return integer; -- DESCRIPTION : -- Returns the position of v in the vector ev. -- If v does not occur in ev, then ev'last+1 will be returned. -- DESTRUCTORS : procedure Clear ( v : in out Exponent_Vectors_Array ); -- DESCRIPTION : -- Clears the allocated memory. end Exponent_Vectors; SHAR_EOF fi # end of overwriting check if test -f 'integer_graded_lexicographical_ordening.adb' then echo shar: will not over-write existing file "'integer_graded_lexicographical_ordening.adb'" else cat << "SHAR_EOF" > 'integer_graded_lexicographical_ordening.adb' package body Integer_Graded_Lexicographical_Ordening is function "<" ( v1,v2 : Vector ) return boolean is s1,s2 : integer; begin s1 := Sum(v1); s2 := Sum(v2); if s1 < s2 then return true; elsif s1 > s2 then return false; else if v1'first /= v2'first or else v1'last /= v2'last then raise Range_Error; else for i in v1'range loop if v1(i) < v2(i) then return true; elsif v1(i) > v2(i) then return false; end if; end loop; return false; -- v1 = v2 end if; end if; end "<"; function "<" ( v1,v2 : Link_to_Vector ) return boolean is begin if v2 = null then return false; elsif v1 = null then if Sum(v2) > 0 then return true; else return false; end if; else return v1.all < v2.all; end if; end "<"; function ">" ( v1,v2 : Vector ) return boolean is s1,s2 : integer; begin s1 := Sum(v1); s2 := Sum(v2); if s1 < s2 then return false; elsif s1 > s2 then return true; else if v1'first /= v2'first or else v1'last /= v2'last then raise Range_Error; else for i in v1'range loop if v1(i) < v2(i) then return false; elsif v1(i) > v2(i) then return true; end if; end loop; return false; -- v1 = v2 end if; end if; end ">"; function ">" ( v1,v2 : Link_to_Vector ) return boolean is begin if v1 = null then return false; elsif v2 = null then if Sum(v1) > 0 then return true; else return false; end if; else return v1.all > v2.all; end if; end ">"; end Integer_Graded_Lexicographical_Ordening; SHAR_EOF fi # end of overwriting check if test -f 'integer_graded_lexicographical_ordening.ads' then echo shar: will not over-write existing file "'integer_graded_lexicographical_ordening.ads'" else cat << "SHAR_EOF" > 'integer_graded_lexicographical_ordening.ads' with Integer_Vectors; use Integer_Vectors; package Integer_Graded_Lexicographical_Ordening is -- DESCRIPTION : -- This package provides a graded lexicographical ordening. function "<" ( v1,v2 : Vector ) return boolean; -- return v1 < v2 function "<" ( v1,v2 : Link_to_Vector ) return boolean; function ">" ( v1,v2 : Vector ) return boolean; -- return v1 > v2 function ">" ( v1,v2 : Link_to_Vector ) return boolean; end Integer_Graded_Lexicographical_Ordening; SHAR_EOF fi # end of overwriting check if test -f 'jacobi_matrices.adb' then echo shar: will not over-write existing file "'jacobi_matrices.adb'" else cat << "SHAR_EOF" > 'jacobi_matrices.adb' with Complex_Numbers; use Complex_Numbers; package body Jacobi_Matrices is -- CREATORS : function Create ( p : Poly_Sys ) return Jacobi is res : Jacobi(p'range,1..Number_of_Unknowns(p(p'first))); begin for i in res'range(1) loop for j in res'range(2) loop res(i,j) := Diff(p(i),j); end loop; end loop; return res; end Create; function Create ( j : Jacobi ) return Eval_Jacobi is res : Eval_Jacobi(j'range(1),j'range(2)); begin for k in j'range(1) loop for l in j'range(2) loop res(k,l) := Create(j(k,l)); end loop; end loop; return res; end Create; procedure Create ( p : Poly_Sys; j : out Eval_Coeff_Jacobi; m : out Mult_Factors ) is nb : constant natural := Number_of_Unknowns(p(p'first)); nbk : natural; begin for k in p'range loop nbk := Number_of_Terms(p(k)); for l in 1..nb loop declare mkl : Vector(1..nbk); begin Diff(p(k),l,j(k,l),mkl); m(k,l) := new Complex_Vectors.Vector'(mkl); end; end loop; end loop; end Create; -- OPERATIONS : function Equal ( j1,j2 : Jacobi ) return boolean is begin for k in j1'range loop for l in j2'range loop if not Equal(j1(k,l),j2(k,l)) then return false; end if; end loop; end loop; return true; exception when CONSTRAINT_ERROR => return false; end Equal; procedure Copy ( j1 : in Jacobi; j2 : in out Jacobi ) is begin Clear(j2); for k in j1'range(1) loop for l in j2'range(2) loop Copy(j1(k,l),j2(k,l)); end loop; end loop; end Copy; function "+" ( j1,j2 : Jacobi ) return Jacobi is res : Jacobi(j1'range(1),j1'range(2)); begin Copy(j1,res); Plus_Jacobi(res,j2); return res; end "+"; function "-" ( j : Jacobi ) return Jacobi is res : Jacobi(j'range(1),j'range(2)); begin Copy(j,res); Min_Jacobi(res); return res; end "-"; function "-" ( j1,j2 : Jacobi ) return Jacobi is res : Jacobi(j1'range(1),j1'range(2)); begin Copy(j1,res); Min_Jacobi(res,j2); return res; end "-"; procedure Plus_Jacobi ( j1 : in out Jacobi; j2 : in Jacobi ) is begin for k in j1'range(1) loop for l in j1'range(1) loop Plus_Poly(j1(k,l),j2(k,l)); end loop; end loop; end Plus_Jacobi; procedure Min_Jacobi ( j : in out Jacobi ) is begin for k in j'range(1) loop for l in j'range(1) loop Min_Poly(j(k,l)); end loop; end loop; end Min_Jacobi; procedure Min_Jacobi ( j1 : in out Jacobi; j2 : in Jacobi ) is begin for k in j1'range(1) loop for l in j1'range(1) loop Min_Poly(j1(k,l),j2(k,l)); end loop; end loop; end Min_Jacobi; function Eval ( j : Jacobi; x : Vector ) return matrix is m : matrix(j'range(1),j'range(2)); begin for k in j'range(1) loop for l in j'range(2) loop m(k,l) := Eval(Poly(j(k,l)),x); end loop; end loop; return m; end Eval; function Eval ( j : Eval_Jacobi; x : Vector ) return matrix is m : matrix(j'range(1),j'range(2)); begin for k in j'range(1) loop for l in j'range(2) loop m(k,l) := Eval(Eval_Poly(j(k,l)),x); end loop; end loop; return m; end Eval; function Eval ( j : Eval_Coeff_Jacobi; m : Mult_Factors; c : Complex_Vectors_of_Vectors.Vector; x : Vector ) return Matrix is res : matrix(j'range(1),j'range(2)); begin for k in j'range(1) loop declare cm : Vector(c(k)'range); begin for l in j'range(2) loop for i in cm'range loop cm(i) := m(k,l)(i)*c(k)(i); end loop; res(k,l) := Eval(Eval_Coeff_Poly(j(k,l)),cm,x); end loop; end; end loop; return res; end Eval; -- DESTRUCTORS : procedure Clear ( j : in out Jacobi ) is begin for k in j'range(1) loop for l in j'range(2) loop Clear(j(k,l)); end loop; end loop; end Clear; procedure Clear ( j : in out Eval_Jacobi ) is begin for k in j'range(1) loop for l in j'range(2) loop Clear(j(k,l)); end loop; end loop; end Clear; procedure Clear ( j : in out Eval_Coeff_Jacobi ) is begin for k in j'range(1) loop for l in j'range(2) loop Clear(j(k,l)); end loop; end loop; end Clear; procedure Clear ( m : in out Mult_Factors ) is begin for k in m'range(1) loop for l in m'range(2) loop Clear(m(k,l)); end loop; end loop; end Clear; end Jacobi_Matrices; SHAR_EOF fi # end of overwriting check if test -f 'jacobi_matrices.ads' then echo shar: will not over-write existing file "'jacobi_matrices.ads'" else cat << "SHAR_EOF" > 'jacobi_matrices.ads' with Complex_Vectors,Complex_Matrices; use Complex_Vectors,Complex_Matrices; with Complex_Vectors_of_Vectors; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; package Jacobi_Matrices is -- DESCRIPTION: -- This package contains routines for how to deal with -- Jacobi Matrices of Complex Polynomial Systems. -- DATA STRUCTURES : type Jacobi is array ( integer range <>, integer range <> ) of Poly; type Eval_Jacobi is array ( integer range <>, integer range <> ) of Eval_Poly; type Eval_Coeff_Jacobi is array ( integer range <>, integer range <> ) of Eval_Coeff_Poly; type Mult_Factors is array ( integer range <>, integer range <> ) of Link_to_Vector; -- USAGE : -- p : Poly_Sys; -- j : Jacobi := Create(p); -- => j(i,j) = Diff(p(i),j) -- CREATORS : function Create ( p : Poly_Sys ) return Jacobi; -- REQUIRED : -- The number of the unknowns of each polynomial must be the same function Create ( j : Jacobi ) return Eval_Jacobi; procedure Create ( p : Poly_Sys; j : out Eval_Coeff_Jacobi; m : out Mult_Factors ); -- OPERATIONS : function Equal ( j1,j2 : Jacobi ) return boolean; procedure Copy ( j1 : in Jacobi; j2 : in out Jacobi ); function "+" ( j1,j2 : Jacobi ) return Jacobi; -- return j1+j2; function "-" ( j : Jacobi ) return Jacobi; -- return -j; function "-" ( j1,j2 : Jacobi ) return Jacobi; -- return j1-j2; procedure Plus_Jacobi ( j1 : in out Jacobi; j2 : in Jacobi ); -- j1 := j1+j2; procedure Min_Jacobi ( j : in out Jacobi ); -- j := -j; procedure Min_Jacobi ( j1 : in out Jacobi; j2 : in Jacobi ); -- j1 := j1-j2; function Eval ( j : Jacobi; x : Vector ) return matrix; -- return j(x); function Eval ( j : Eval_Jacobi; x : Vector ) return matrix; -- return j(x); function Eval ( j : Eval_Coeff_Jacobi; m : Mult_Factors; c : Complex_Vectors_of_Vectors.Vector; x : Vector ) return Matrix; -- returns j(c,x) with c the coefficients of the original polynomials -- DESTRUCTORS : procedure Clear ( j : in out Jacobi ); procedure Clear ( j : in out Eval_Jacobi ); procedure Clear ( j : in out Eval_Coeff_Jacobi ); procedure Clear ( m : in out Mult_Factors ); end Jacobi_Matrices; SHAR_EOF fi # end of overwriting check if test -f 'laurent_jacobi_matrices.adb' then echo shar: will not over-write existing file "'laurent_jacobi_matrices.adb'" else cat << "SHAR_EOF" > 'laurent_jacobi_matrices.adb' package body Laurent_Jacobi_Matrices is -- CREATORS : function Create ( p : Laur_Sys ) return Jacobi is res : Jacobi(p'range,1..Number_of_Unknowns(p(p'first))); begin for i in res'range(1) loop for j in res'range(2) loop res(i,j) := Diff(p(i),j); end loop; end loop; return res; end Create; function Create ( j : Jacobi ) return Eval_Jacobi is res : Eval_Jacobi(j'range(1),j'range(2)); begin for k in j'range(1) loop for l in j'range(2) loop res(k,l) := Create(j(k,l)); end loop; end loop; return res; end Create; procedure Create ( p : Laur_Sys; j : out Eval_Coeff_Jacobi; m : out Mult_Factors ) is nb : constant natural := Number_of_Unknowns(p(p'first)); nbk : natural; begin for k in p'range loop nbk := Number_of_Terms(p(k)); for l in 1..nb loop declare mkl : Vector(1..nbk); begin Diff(p(k),l,j(k,l),mkl); m(k,l) := new Complex_Vectors.Vector'(mkl); end; end loop; end loop; end Create; -- OPERATIONS : function Equal ( j1,j2 : Jacobi ) return boolean is begin for k in j1'range(1) loop for l in j1'range(2) loop if not Equal(j1(k,l),j2(k,l)) then return false; end if; end loop; end loop; return true; exception when constraint_error => return false; end Equal; procedure Copy ( j1 : in Jacobi; j2 : in out Jacobi ) is begin Clear(j2); for k in j1'range(1) loop for l in j2'range(2) loop Copy(j1(k,l),j2(k,l)); end loop; end loop; end Copy; function "+" ( j1,j2 : Jacobi ) return Jacobi is res : Jacobi(j1'range(1),j1'range(2)); begin Copy(j1,res); Plus_Jacobi(res,j2); return res; end "+"; function "-" ( j : Jacobi ) return Jacobi is res : Jacobi(j'range(1),j'range(2)); begin Copy(j,res); Min_Jacobi(res); return res; end "-"; function "-" ( j1,j2 : Jacobi ) return Jacobi is res : Jacobi(j1'range(1),j1'range(2)); begin Copy(j1,res); Min_Jacobi(res,j2); return res; end "-"; procedure Plus_Jacobi ( j1 : in out Jacobi; j2 : in Jacobi ) is begin for k in j1'range(1) loop for l in j1'range(1) loop Plus_Poly(j1(k,l),j2(k,l)); end loop; end loop; end Plus_Jacobi; procedure Min_Jacobi ( j : in out Jacobi ) is begin for k in j'range(1) loop for l in j'range(1) loop Min_Poly(j(k,l)); end loop; end loop; end Min_Jacobi; procedure Min_Jacobi ( j1 : in out Jacobi; j2 : in Jacobi ) is begin for k in j1'range(1) loop for l in j1'range(1) loop Min_Poly(j1(k,l),j2(k,l)); end loop; end loop; end Min_Jacobi; function Eval ( j : Jacobi; x : Vector ) return matrix is m : matrix(j'range(1),j'range(2)); begin for k in j'range(1) loop for l in j'range(2) loop m(k,l) := Eval(Poly(j(k,l)),x); end loop; end loop; return m; end Eval; function Eval ( j : Eval_Jacobi; x : Vector ) return matrix is m : matrix(j'range(1),j'range(2)); begin for k in j'range(1) loop for l in j'range(2) loop m(k,l) := Eval(Eval_Poly(j(k,l)),x); end loop; end loop; return m; end Eval; function Eval ( j : Eval_Coeff_Poly; m,c,x : Vector ) return double_complex is cm : Vector(c'range); begin for i in cm'range loop cm(i) := m(i)*c(i); end loop; return Eval(j,cm,x); end Eval; function Eval ( j : Eval_Coeff_Jacobi; m : Mult_Factors; c : Complex_Vectors_of_Vectors.Vector; x : Vector ) return Matrix is res : matrix(j'range(1),j'range(2)); begin for k in j'range(1) loop for l in j'range(2) loop res(k,l) := Eval(Eval_Coeff_Poly(j(k,l)),m(k,l).all,c(k).all,x); end loop; end loop; return res; end Eval; -- DESTRUCTORS : procedure Clear ( j : in out Jacobi ) is begin for k in j'range(1) loop for l in j'range(2) loop Clear(j(k,l)); end loop; end loop; end Clear; procedure Clear ( j : in out Eval_Jacobi ) is begin for k in j'range(1) loop for l in j'range(2) loop Clear(j(k,l)); end loop; end loop; end Clear; procedure Clear ( j : in out Eval_Coeff_Jacobi ) is begin for k in j'range(1) loop for l in j'range(2) loop Clear(j(k,l)); end loop; end loop; end Clear; procedure Clear ( m : in out Mult_Factors ) is begin for k in m'range(1) loop for l in m'range(2) loop Clear(m(k,l)); end loop; end loop; end Clear; end Laurent_Jacobi_Matrices; SHAR_EOF fi # end of overwriting check if test -f 'laurent_jacobi_matrices.ads' then echo shar: will not over-write existing file "'laurent_jacobi_matrices.ads'" else cat << "SHAR_EOF" > 'laurent_jacobi_matrices.ads' with Complex_Numbers; use Complex_Numbers; with Complex_Vectors,Complex_Matrices; use Complex_Vectors,Complex_Matrices; with Complex_Vectors_of_Vectors; with Complex_Multivariate_Laurent_Polynomials; use Complex_Multivariate_Laurent_Polynomials; with Complex_Laurent_Polynomial_Systems; use Complex_Laurent_Polynomial_Systems; package Laurent_Jacobi_Matrices is -- DESCRIPTION: -- This package contains routines for how to deal with -- Jacobi Matrices of Complex Laurent Polynomial Systems. type Jacobi is array ( integer range <>, integer range <> ) of Poly; type Eval_Jacobi is array ( integer range <>, integer range <> ) of Eval_Poly; type Eval_Coeff_Jacobi is array ( integer range <>, integer range <> ) of Eval_Coeff_Poly; type Mult_Factors is array ( integer range <>, integer range <> ) of Link_to_Vector; -- USAGE : -- p : Laur_Sys; -- j : Jacobi := Create(p); -- => j(i,j) = Diff(p(i),j) -- CREATORS : function Create ( p : Laur_Sys ) return Jacobi; -- REQUIRED : -- the number of the unknowns of each polynomial must be the same function Create ( j : Jacobi ) return Eval_Jacobi; procedure Create ( p : Laur_Sys; j : out Eval_Coeff_Jacobi; m : out Mult_Factors ); -- OPERATIONS : function Equal (j1,j2 : Jacobi) return boolean; procedure Copy (j1 : in Jacobi; j2 : in out Jacobi); function "+" ( j1,j2 : Jacobi ) return Jacobi; -- return j1+j2; function "-" ( j : Jacobi) return Jacobi; -- return -j; function "-" ( j1,j2 : Jacobi ) return Jacobi; -- return j1-j2; procedure Plus_Jacobi ( j1 : in out Jacobi; j2 : in Jacobi ); -- j1 := j1+j2; procedure Min_Jacobi ( j : in out Jacobi); -- j := -j; procedure Min_Jacobi ( j1 : in out Jacobi; j2 : in Jacobi ); -- j1 := j1-j2; function Eval ( j : Jacobi; x : Vector ) return matrix; function Eval ( j : Eval_Jacobi; x : Vector ) return matrix; function Eval ( j : Eval_Coeff_Poly; m,c,x : Vector ) return double_complex; function Eval ( j : Eval_Coeff_Jacobi; m : Mult_Factors; c : Complex_Vectors_of_Vectors.Vector; x : Vector ) return Matrix; -- returns j(c,x) with c the coefficients of the original polynomials -- DESTRUCTORS : procedure Clear ( j : in out Jacobi ); procedure Clear ( j : in out Eval_Jacobi ); procedure Clear ( j : in out Eval_Coeff_Jacobi ); procedure Clear ( m : in out Mult_Factors ); end Laurent_Jacobi_Matrices; SHAR_EOF fi # end of overwriting check if test -f 'laurent_polynomial_randomizers.adb' then echo shar: will not over-write existing file "'laurent_polynomial_randomizers.adb'" else cat << "SHAR_EOF" > 'laurent_polynomial_randomizers.adb' with Random_Number_Generators; with Complex_Numbers,Integer_Vectors; use Complex_Numbers; package body Laurent_Polynomial_Randomizers is function Real_Randomize ( p : Poly ) return Poly is res : Poly := Null_Poly; procedure Randomize_Term ( t : in Term; cont : out boolean ) is rt : Term; begin rt.cf := CMPLX(Random_Number_Generators.Random); rt.dg := new Integer_Vectors.Vector'(t.dg.all); Plus_Term(res,rt); Clear(rt); cont := true; end Randomize_Term; procedure Randomize_Terms is new Visiting_Iterator (Randomize_Term); begin Randomize_Terms(p); return res; end Real_Randomize; function Complex_Randomize ( p : Poly ) return Poly is res : Poly := Null_Poly; procedure Randomize_Term ( t : in Term; cont : out boolean ) is rt : Term; begin rt.cf := Random_Number_Generators.Random; rt.dg := new Integer_Vectors.Vector'(t.dg.all); Plus_Term(res,rt); Clear(rt); cont := true; end Randomize_Term; procedure Randomize_Terms is new Visiting_Iterator (Randomize_Term); begin Randomize_Terms(p); return res; end Complex_Randomize; function Complex_Randomize1 ( p : Poly ) return Poly is res : Poly := Null_Poly; procedure Randomize_Term ( t : in Term; cont : out boolean ) is rt : Term; begin rt.cf := Random_Number_Generators.Random1; rt.dg := new Integer_Vectors.Vector'(t.dg.all); Plus_Term(res,rt); Clear(rt); cont := true; end Randomize_Term; procedure Randomize_Terms is new Visiting_Iterator (Randomize_Term); begin Randomize_Terms(p); return res; end Complex_Randomize1; function Complex_Perturb ( p : Poly ) return Poly is res : Poly := Null_Poly; procedure Perturb_Term ( t : in Term; cont : out boolean ) is rt : Term; begin rt.cf := t.cf + Random_Number_Generators.Random1; rt.dg := new Integer_Vectors.Vector'(t.dg.all); Plus_Term(res,rt); Clear(rt); cont := true; end Perturb_Term; procedure Perturb_Terms is new Visiting_Iterator (Perturb_Term); begin Perturb_Terms(p); return res; end Complex_Perturb; function Real_Randomize ( p : Laur_Sys ) return Laur_Sys is res : Laur_Sys(p'range); begin for i in res'range loop res(i) := Real_Randomize(p(i)); end loop; return res; end Real_Randomize; function Complex_Randomize ( p : Laur_Sys ) return Laur_Sys is res : Laur_Sys(p'range); begin for i in res'range loop res(i) := Complex_Randomize(p(i)); end loop; return res; end Complex_Randomize; function Complex_Randomize1 ( p : Laur_Sys ) return Laur_Sys is res : Laur_Sys(p'range); begin for i in res'range loop res(i) := Complex_Randomize1(p(i)); end loop; return res; end Complex_Randomize1; function Complex_Perturb ( p : Laur_Sys ) return Laur_Sys is res : Laur_Sys(p'range); begin for i in res'range loop res(i) := Complex_Perturb(p(i)); end loop; return res; end Complex_Perturb; end Laurent_Polynomial_Randomizers; SHAR_EOF fi # end of overwriting check if test -f 'laurent_polynomial_randomizers.ads' then echo shar: will not over-write existing file "'laurent_polynomial_randomizers.ads'" else cat << "SHAR_EOF" > 'laurent_polynomial_randomizers.ads' with Complex_Multivariate_Laurent_Polynomials; use Complex_Multivariate_Laurent_Polynomials; with Complex_Laurent_Polynomial_Systems; use Complex_Laurent_Polynomial_Systems; package Laurent_Polynomial_Randomizers is -- DESCRIPTION : -- This package offers routines for `randomizing' polynomials: -- the monomial structure remains the same, -- but random (real or complex) coefficients will be generated. function Real_Randomize ( p : Poly ) return Poly; function Real_Randomize ( p : Laur_Sys ) return Laur_Sys; -- DESCRIPTION : -- The random real coefficients lie in [-1.0,1.0]. function Complex_Randomize ( p : Poly ) return Poly; function Complex_Randomize ( p : Laur_Sys ) return Laur_Sys; -- DESCRIPTION : -- The real and imaginary parts of the complex random coefficients -- lie in [-1.0,1.0]. function Complex_Randomize1 ( p : Poly ) return Poly; function Complex_Randomize1 ( p : Laur_Sys ) return Laur_Sys; -- DESCRIPTION : -- The generated random complex coefficients have modulus 1. function Complex_Perturb ( p : Poly ) return Poly; function Complex_Perturb ( p : Laur_Sys ) return Laur_Sys; -- DESCRIPTION : -- The coefficients of the polynomial system will be -- perturbed by adding random complex coefficients with -- modulus one. end Laurent_Polynomial_Randomizers; SHAR_EOF fi # end of overwriting check if test -f 'laurent_to_polynomial_converters.adb' then echo shar: will not over-write existing file "'laurent_to_polynomial_converters.adb'" else cat << "SHAR_EOF" > 'laurent_to_polynomial_converters.adb' with Natural_Vectors; with Complex_Numbers; use Complex_Numbers; package body Laurent_to_Polynomial_Converters is function Laurent_Polynomial_to_Polynomial ( p : Complex_Multivariate_Laurent_Polynomials.Poly ) return Complex_Multivariate_Polynomials.Poly is res : Complex_Multivariate_Polynomials.Poly; tt : Complex_Multivariate_Laurent_Polynomials.Term; begin Laurent_Polynomial_to_Polynomial(p,tt,res); Complex_Multivariate_Laurent_Polynomials.Clear(tt); return res; end Laurent_Polynomial_to_Polynomial; procedure Laurent_Polynomial_to_Polynomial ( l : in Complex_Multivariate_Laurent_Polynomials.Poly; t : out Complex_Multivariate_Laurent_Polynomials.Term; p : out Complex_Multivariate_Polynomials.Poly ) is min : Complex_Multivariate_Laurent_Polynomials.Degrees := Complex_Multivariate_Laurent_Polynomials.Minimal_Degrees(l); tt : Complex_Multivariate_Laurent_Polynomials.Term; begin for i in min'range loop min(i) := -min(i); end loop; tt.cf := CMPLX(1.0); tt.dg := min; p := Laurent_Polynomial_to_Polynomial(l,tt); t := tt; end Laurent_Polynomial_to_Polynomial; function Laurent_Polynomial_to_Polynomial ( l : Complex_Multivariate_Laurent_Polynomials.Poly; t : Complex_Multivariate_Laurent_Polynomials.Term ) return Complex_Multivariate_Polynomials.Poly is res : Complex_Multivariate_Polynomials.Poly; use Complex_Multivariate_Laurent_Polynomials; procedure Laurent_Term_to_Term ( tt : in Term; cont : out boolean ) is rt : Complex_Multivariate_Polynomials.Term; begin rt.cf := tt.cf; rt.dg := new Natural_Vectors.Vector(tt.dg'range); for i in tt.dg'range loop rt.dg(i) := tt.dg(i) + t.dg(i); end loop; Complex_Multivariate_Polynomials.Plus_Term(res,rt); Complex_Multivariate_Polynomials.Clear(rt); cont := true; end Laurent_Term_to_Term; procedure LP2P is new Visiting_Iterator(Laurent_Term_to_Term); begin LP2P(l); return res; end Laurent_Polynomial_to_Polynomial; function Laurent_to_Polynomial_System ( p : Laur_Sys ) return Poly_Sys is res : Poly_Sys(p'range); begin for i in p'range loop res(i) := Laurent_Polynomial_to_Polynomial(p(i)); end loop; return res; end Laurent_to_Polynomial_System; end Laurent_to_Polynomial_Converters; SHAR_EOF fi # end of overwriting check if test -f 'laurent_to_polynomial_converters.ads' then echo shar: will not over-write existing file "'laurent_to_polynomial_converters.ads'" else cat << "SHAR_EOF" > 'laurent_to_polynomial_converters.ads' with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Laurent_Polynomial_Systems; use Complex_Laurent_Polynomial_Systems; with Complex_Multivariate_Polynomials; with Complex_Multivariate_Laurent_Polynomials; package Laurent_to_Polynomial_Converters is -- DESCRIPTION : -- This package contains routines for converting Laurent polynomials to -- polynomials with natural exponent vectors by shifting when necessary. function Laurent_Polynomial_to_Polynomial ( p : Complex_Multivariate_Laurent_Polynomials.Poly ) return Complex_Multivariate_Polynomials.Poly; procedure Laurent_Polynomial_to_Polynomial ( l : in Complex_Multivariate_Laurent_Polynomials.Poly; t : out Complex_Multivariate_Laurent_Polynomials.Term; p : out Complex_Multivariate_Polynomials.Poly ); function Laurent_Polynomial_to_Polynomial ( l : Complex_Multivariate_Laurent_Polynomials.Poly; t : Complex_Multivariate_Laurent_Polynomials.Term ) return Complex_Multivariate_Polynomials.Poly; -- DESCRIPTION : -- Transforms a Laurent polynomial into an ordinary polynomial -- by multiplying by an appropriate monomial t. function Laurent_to_Polynomial_System ( p : Laur_Sys ) return Poly_Sys; -- DESCRIPTION : -- Transforms a Laurent polynomial system into a polynomial system. end Laurent_to_Polynomial_Converters; SHAR_EOF fi # end of overwriting check if test -f 'lists.adb' then echo shar: will not over-write existing file "'lists.adb'" else cat << "SHAR_EOF" > 'lists.adb' package body Lists is -- INTERNAL DATA : type Node is record The_Item : Item; Next : List; end record; Free_List : List := null; -- AUXILIARIES : procedure Set_Next ( The_Node : in out Node; To_Next : in List ) is begin The_Node.Next := To_Next; end Set_Next; function Next_Of ( The_Node : in Node ) return List is begin return The_Node.Next; end Next_Of; procedure Free ( l : in out List ) is tmp : List; begin while l /= null loop tmp := l; l := Next_Of(l.all); Set_Next(tmp.all,Free_List); Free_List := tmp; end loop; end Free; function New_Item return List is tmp : List; begin if Free_List = null then return new Node; else tmp := Free_List; Free_List := Next_Of(tmp.all); Set_Next(tmp.all,null); return tmp; end if; end New_Item; -- CONSTRUCTORS : procedure Construct ( i : in Item; l : in out List ) is tmp : List; begin tmp := New_Item; tmp.The_Item := i; tmp.Next := l; l := tmp; exception when Storage_Error => raise Overflow; end Construct; procedure Append ( first,last : in out List; i : in Item ) is begin if Is_Null(first) then Construct(i,first); last := first; else declare tmp : List; begin Construct(i,tmp); Swap_Tail(last,tmp); last := Tail_Of(last); end; end if; end Append; procedure Concat ( first,last : in out List; l : in List ) is tmp : List := l; begin while not Is_Null(tmp) loop Append(first,last,Head_Of(tmp)); tmp := Tail_Of(tmp); end loop; end Concat; procedure Set_Head ( l : in out List; i : in Item ) is begin l.The_Item := i; exception when Constraint_Error => raise List_Is_Null; end Set_Head; procedure Swap_Tail ( l1,l2 : in out List ) is tmp : List; begin tmp := l1.Next; l1.Next := l2; l2 := tmp; exception when Constraint_Error => raise List_Is_Null; end Swap_Tail; procedure Copy ( l1 : in List; l2 : in out List ) is From_Index : List := l1; To_Index : List; begin Free(l2); if l1 /= null then l2 := New_Item; l2.The_Item := From_Index.The_Item; To_Index := l2; From_Index := From_Index.Next; while From_Index /= null loop To_Index.Next := New_Item; To_Index := To_Index.Next; To_Index.The_Item := From_Index.The_Item; From_Index := From_Index.Next; end loop; end if; exception when Storage_Error => raise Overflow; end Copy; -- SELECTORS : function Is_Equal ( l1,l2 : List ) return boolean is left_index : List := l1; right_index : List := l2; begin while left_index /= null loop if left_index.The_Item /= right_index.The_Item then return False; end if; left_index := left_index.Next; right_index := right_index.Next; end loop; return (right_index = null); exception when Constraint_Error => return false; end Is_Equal; function Length_Of ( l : List ) return natural is cnt : natural := 0; tmp : List := l; begin while not Is_Null(tmp) loop cnt := cnt + 1; tmp := Tail_Of(tmp); end loop; return cnt; end Length_Of; function Is_Null ( l : list ) return boolean is begin return (l = null); end Is_Null; function Head_Of ( l : List ) return Item is begin return l.The_Item; exception when Constraint_Error => raise List_Is_Null; end Head_Of; function Tail_Of ( l : List ) return List is begin return l.Next; exception when Constraint_Error => raise List_Is_Null; end Tail_Of; -- DESTRUCTOR : procedure Clear ( l : in out List ) is begin Free(l); end Clear; end Lists; SHAR_EOF fi # end of overwriting check if test -f 'lists.ads' then echo shar: will not over-write existing file "'lists.ads'" else cat << "SHAR_EOF" > 'lists.ads' generic type Item is private; package Lists is -- DESCRIPTION : -- This generic package allows to implement lists of items. type List is private; Null_List : constant List; Overflow : exception; List_Is_Null : exception; -- CONSTRUCTORS : procedure Construct ( i : in Item; l : in out List ); -- DESCRIPTION : -- Adds the item i to the front of the list l. procedure Set_Head ( l : in out List; i : in Item); -- DESCRIPTION : -- Sets the first element in the list to item i. -- REQUIRED : not Is_Null(l). procedure Swap_Tail ( l1,l2 : in out List ); -- DESCRIPTION : -- Swaps the tail of list l1 with the list l2. procedure Append ( first,last : in out List; i : in Item ); -- DESCRIPTION : -- Appends the item i to the list, where first points to the first -- element and last to its last element. procedure Concat ( first,last : in out List; l : in List ); -- DESCRIPTION : -- Concatenates the list l to the list first, where last points to -- the last element of the list. procedure Copy ( l1 : in List; l2 : in out List ); -- DESCRIPTION : -- Makes a copy from the list l1 to the list l2. -- SELECTORS : function Is_Equal ( l1,l2 : List ) return boolean; -- DESCRIPTION : -- Returns true if both lists are equal. function Length_Of ( l : List ) return natural; -- DESCRIPTION : -- Returns the length of the list, i.e.: the number of elements. function Is_Null ( l : List ) return boolean; -- DESCRIPTION : -- Returns true if the list is empty, false otherwise. function Head_Of ( l : List) return Item; -- DESCRIPTION : -- Returns the first element in the list. -- REQUIRED : not Is_Null(l). function Tail_Of ( l : List ) return List; -- DESCRIPTION : -- Returns the tail of the list l. -- REQUIRED : not Is_Null(l). -- DESTRUCTOR : procedure Clear ( l : in out List ); -- DESCRIPTION : -- Deallocates the memory occupied by the elements in the list. private type Node; type List is access Node; Null_List : constant List := null; end Lists; SHAR_EOF fi # end of overwriting check if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' # Establishing the links : linkrc = ../../../Ada/Math_Lib/Polynomials links: @-ln -s $(linkrc)/nat_grad_lex.a natural_graded_lexicographical_ordening.ads @-ln -s $(linkrc)/nat_grad_lexB.a natural_graded_lexicographical_ordening.adb @-ln -s $(linkrc)/int_grad_lex.a integer_graded_lexicographical_ordening.ads @-ln -s $(linkrc)/int_grad_lexB.a integer_graded_lexicographical_ordening.adb @-ln -s $(linkrc)/lists.a lists.ads @-ln -s $(linkrc)/listsB.a lists.adb @-ln -s $(linkrc)/mul_poly.a multivariate_polynomials.ads @-ln -s $(linkrc)/mul_polyB.a multivariate_polynomials.adb @-ln -s $(linkrc)/mul_laur.a multivariate_laurent_polynomials.ads @-ln -s $(linkrc)/mul_laurB.a multivariate_laurent_polynomials.adb @-ln -s $(linkrc)/cmp_mpoly.a complex_multivariate_polynomials.ads @-ln -s $(linkrc)/symtab.a symbol_table.ads @-ln -s $(linkrc)/symtabB.a symbol_table.adb @-ln -s $(linkrc)/symtab_io.a symbol_table_io.ads @-ln -s $(linkrc)/symtab_ioB.a symbol_table_io.adb @-ln -s $(linkrc)/cmp_mpoly_io.a complex_multivariate_polynomials_io.ads @-ln -s $(linkrc)/cmp_mpoly_ioB.a complex_multivariate_polynomials_io.adb @-ln -s $(linkrc)/cmp_mlaur.a complex_multivariate_laurent_polynomials.ads @-ln -s $(linkrc)/cmp_polsys.a complex_polynomial_systems.ads @-ln -s $(linkrc)/cmp_polsysB.a complex_polynomial_systems.adb @-ln -s $(linkrc)/cmp_laursys.a complex_laurent_polynomial_systems.ads @-ln -s $(linkrc)/cmp_laursysB.a complex_laurent_polynomial_systems.adb @-ln -s $(linkrc)/pollaco.a polynomial_to_laurent_converters.ads @-ln -s $(linkrc)/pollacoB.a polynomial_to_laurent_converters.adb @-ln -s $(linkrc)/lapolco.a laurent_to_polynomial_converters.ads @-ln -s $(linkrc)/lapolcoB.a laurent_to_polynomial_converters.adb @-ln -s $(linkrc)/cmp_polsys_io.a complex_polynomial_systems_io.ads @-ln -s $(linkrc)/cmp_polsys_ioB.a complex_polynomial_systems_io.adb @-ln -s $(linkrc)/expvec.a exponent_vectors.ads @-ln -s $(linkrc)/expvecB.a exponent_vectors.adb @-ln -s $(linkrc)/jacobi.a jacobi_matrices.ads @-ln -s $(linkrc)/jacobiB.a jacobi_matrices.adb @-ln -s $(linkrc)/laurjaco.a laurent_jacobi_matrices.ads @-ln -s $(linkrc)/laurjacoB.a laurent_jacobi_matrices.adb @-ln -s $(linkrc)/polrand.a polynomial_randomizers.ads @-ln -s $(linkrc)/polrandB.a polynomial_randomizers.adb @-ln -s $(linkrc)/laurrand.a laurent_polynomial_randomizers.ads @-ln -s $(linkrc)/laurrandB.a laurent_polynomial_randomizers.adb @-ln -s $(linkrc)/substits.a substitutors.ads @-ln -s $(linkrc)/substitsB.a substitutors.adb SHAR_EOF fi # end of overwriting check if test -f 'multivariate_laurent_polynomials.adb' then echo shar: will not over-write existing file "'multivariate_laurent_polynomials.adb'" else cat << "SHAR_EOF" > 'multivariate_laurent_polynomials.adb' with unchecked_deallocation; with Lists; package body Multivariate_Laurent_Polynomials is -- REPRESENTATION INVARIANT : -- 1. Only terms with a coefficient different from zero are stored. -- 2. The terms in any polynomial are ordered from high to low degree -- according to the instantiating order on the degrees. -- NOTE : Evaluation is not guaranteed to work for negative exponents... -- DATA STRUCTURES : MAX_INT : constant natural := 100000; package Term_List is new Lists(Term); type Poly_Rep is new Term_List.List; type kind is (polynomial,number); type Poly_Rec ( k : kind := number ) is record case k is when number => c : coefftp; when polynomial => p : Eval_Poly; end case; end record; type Coeff_Poly_Rec ( k : kind := number ) is record case k is when number => c : integer; when polynomial => p : Eval_Coeff_Poly; end case; end record; Null_Poly_Rec : constant Poly_Rec(number) := (number,zero); type Eval_Poly_Rep is array(integer range <>) of Poly_Rec; type Eval_Coeff_Poly_Rep is array(integer range <>) of Coeff_Poly_Rec; procedure free is new unchecked_deallocation(Poly_Rep,Poly); procedure free is new unchecked_deallocation(Eval_Poly_Rep,Eval_Poly); procedure free is new unchecked_deallocation(Eval_Coeff_Poly_Rep,Eval_Coeff_Poly); -- AUXILIARY OPERATIONS : function Convert ( c : coefftp; n : natural ) return natural is -- DESCRIPTION : -- Returns the corresponding value for c, when it lies in 1..n, -- otherwise 0 is returned. begin for i in 1..n loop if c = Convert(i) then return i; end if; end loop; return 0; end Convert; procedure Shuffle ( p : in out Poly ) is -- DESCRIPTION : -- Changes the position of the terms in p back to the normal order. -- Needed to guarantee the second representation invariant. res : Poly := Null_Poly; procedure Shuffle_Term ( t : in Term; cont : out boolean ) is begin Plus_Term(res,t); cont := true; end Shuffle_Term; procedure Shuffle_Terms is new Visiting_Iterator(Shuffle_Term); begin Shuffle_Terms(p); Clear(p); Copy(res,p); Clear(res); end Shuffle; procedure Append_Copy ( first,last : in out Poly_Rep; t : in Term ) is -- DESCRIPTION : -- Appends a copy of the term to the list. tt : Term; begin Copy(t,tt); Append(first,last,tt); end Append_Copy; -- CONSTRUCTORS : function Create ( t : Term ) return Poly is p : Poly; begin if equal(t.cf,zero) then p := Null_Poly; else declare tt : Term; begin Copy(t,tt); p := new Poly_Rep; Construct(tt,p.all); end; end if; return p; end Create; function Create ( p : Poly; n : natural; d : integer ) return Eval_Poly is -- DESCRIPTION : -- An evaluable polynomial is returned for p, with d = Maximal_Degree(p,x1) -- and n = Number_of_Unknowns(p) >= 1. res : Eval_Poly; evpr : Eval_Poly_Rep(0..d); terms : array(0..d) of Poly := (0..d => Null_Poly); procedure Add_Term1 ( t : in Term; cont : out boolean ) is pr : Poly_Rec(number); begin copy(t.cf,pr.c); evpr(t.dg(t.dg'first)) := pr; cont := true; end Add_Term1; procedure Add_Terms1 is new Visiting_Iterator(Add_Term1); procedure Add_Term ( t : in Term; cont : out boolean ) is nt : Term; begin nt.cf := t.cf; nt.dg := new Integer_Vectors.Vector(t.dg'first..t.dg'last-1); for i in nt.dg'range loop nt.dg(i) := t.dg(i+1); end loop; Plus_Term(terms(t.dg(t.dg'first)),nt); cont := true; end Add_Term; procedure Add_Terms is new Visiting_Iterator(Add_Term); begin if n = 1 then Add_Terms1(p); else Add_Terms(p); for i in terms'range loop declare pr : Poly_Rec(polynomial); begin pr.p := Create(terms(i)); evpr(i) := pr; Clear(terms(i)); end; end loop; end if; res := new Eval_Poly_Rep'(evpr); return res; end Create; function Create ( p : Poly; n,nb : natural; d : integer ) return Eval_Coeff_Poly is -- DESCRIPTION : -- An evaluable polynomial is returned for p, with d = Maximal_Degree(p,x1), -- n = Number_of_Unknowns(p) >= 1 and nb = Number_of_Terms(p). -- The coefficients of p are converted natural numbers. res : Eval_Coeff_Poly; evpr : Eval_Coeff_Poly_Rep(0..d); terms : array(0..d) of Poly := (0..d => Null_Poly); procedure Add_Term1 ( t : in Term; cont : out boolean ) is pr : Coeff_Poly_Rec(number); begin pr.c := Convert(t.cf,nb); evpr(t.dg(t.dg'first)) := pr; cont := true; end Add_Term1; procedure Add_Terms1 is new Visiting_Iterator(Add_Term1); procedure Add_Term ( t : in Term; cont : out boolean ) is nt : Term; begin nt.cf := t.cf; nt.dg := new Integer_Vectors.Vector(t.dg'first..t.dg'last-1); for i in nt.dg'range loop nt.dg(i) := t.dg(i+1); end loop; Plus_Term(terms(t.dg(t.dg'first)),nt); cont := true; end Add_Term; procedure Add_Terms is new Visiting_Iterator(Add_Term); begin if n = 1 then for i in evpr'range loop -- initialization declare nullpr : Coeff_Poly_Rec(polynomial); begin nullpr.p := null; evpr(i) := nullpr; end; end loop; Add_Terms1(p); else Add_Terms(p); for i in terms'range loop declare pr : Coeff_Poly_Rec(polynomial); ind,mdi : integer; begin if terms(i) = Null_Poly then pr.p := null; else ind := Head_Of(terms(i).all).dg'first; mdi := Maximal_Degree(terms(i),ind); pr.p := Create(terms(i),n-1,nb,mdi); end if; evpr(i) := pr; Clear(terms(i)); end; end loop; end if; res := new Eval_Coeff_Poly_Rep'(evpr); return res; end Create; function Create ( p : Poly ) return Eval_Poly is n : constant natural := Number_of_Unknowns(p); ind : integer; begin if (p = Null_Poly) or else (n = 0) then return null; else ind := Head_Of(p.all).dg'first; return Create(p,n,Maximal_Degree(p,ind)); end if; end Create; function Create ( p : Poly ) return Eval_Coeff_Poly is res : Eval_Coeff_Poly; lp : Poly := Null_Poly; n : constant natural := Number_of_Unknowns(p); nb : constant natural := Number_of_Terms(p); cnt : natural := 0; ind : integer; procedure Label_Term ( t : in Term; cont : out boolean ) is lt : Term; begin cnt := cnt + 1; lt.cf := Convert(cnt); lt.dg := new Integer_Vectors.Vector'(t.dg.all); Plus_Term(lp,lt); cont := true; end Label_Term; procedure Label_Terms is new Visiting_Iterator(Label_Term); begin if (p = Null_Poly) or else (nb = 0) then return null; else Label_Terms(p); ind := Head_Of(p.all).dg'first; res := Create(lp,n,nb,Maximal_Degree(p,ind)); Clear(lp); end if; return res; end Create; procedure Copy ( t1 : in Term; t2 : in out Term ) is begin Clear(t2); Integer_Vectors.Copy(Link_to_Vector(t1.dg),Link_to_Vector(t2.dg)); copy(t1.cf,t2.cf); end Copy; procedure Copy ( p: in Poly_Rep; q : in out Poly_Rep ) is lp,lq : Poly_Rep; t : Term; begin Clear(q); if not Is_Null(p) then lp := p; while not Is_Null(lp) loop t := Head_Of(lp); Append_Copy(q,lq,t); lp := Tail_Of(lp); end loop; end if; end Copy; procedure Copy ( p : in Poly; q : in out Poly ) is l : Poly_Rep; begin Clear(q); if p /= Null_Poly then Copy(p.all,l); q := new Poly_Rep'(l); else q := Null_Poly; end if; end Copy; -- SELECTORS : function Equal ( t1,t2 : Term ) return boolean is begin if not Equal(t1.dg,t2.dg) then return false; else return equal(t1.cf,t2.cf); end if; end Equal; function Equal ( p,q : Poly_Rep ) return boolean is lp, lq : Poly_Rep; begin lp := p; lq := q; while not Is_Null(lp) and not Is_Null(lq) loop if not Equal(Head_Of(lp),Head_Of(lq)) then return false; else lp := Tail_Of(lp); lq := Tail_Of(lq); end if; end loop; if Is_Null(lp) and Is_Null(lq) then return true; else return false; end if; end Equal; function Equal ( p,q : Poly ) return boolean is begin if (p = Null_Poly) and (q = Null_Poly) then return true; elsif (p = Null_Poly) or (q = Null_Poly) then return false; else return Equal(p.all,q.all); end if; end Equal; function Number_Of_Unknowns ( p : Poly ) return natural is temp : Term; begin if (p = Null_Poly) or else Is_Null(p.all) then return 0; else temp := Head_Of(p.all); if temp.dg = null then return 0; else return temp.dg'length; end if; end if; end Number_Of_Unknowns; function Number_Of_Terms ( p : Poly ) return natural is begin if (p = Null_Poly) or else Is_Null(p.all) then return 0; else return Length_Of(p.all); end if; end Number_Of_Terms; function Degree ( p : Poly ) return integer is temp : Term; begin if (p = Null_Poly) or else Is_Null(p.all) then return -1; else temp := Head_Of(p.all); if temp.dg = null then return 0; else return integer(Sum(temp.dg)); end if; end if; end Degree; function Maximal_Degree ( p : Poly; i : natural ) return integer is res : integer := -MAX_INT; procedure Degree_Term (t : in Term; continue : out boolean) is index,temp : integer; begin if t.dg /= null then index := t.dg'first + i - 1; temp := t.dg(index); if temp > res then res := temp; end if; continue := true; end if; end Degree_Term; procedure Degree_Terms is new Visiting_Iterator(Degree_Term); begin if p = Null_Poly or else Is_Null(p.all) then return -MAX_INT; else Degree_Terms(p); return res; end if; end Maximal_Degree; function Maximal_Degrees ( p : Poly ) return Degrees is res : Degrees; n : natural := Number_of_Unknowns(p); procedure Degree_Term ( t : in Term; cont : out boolean ) is index,temp : integer; begin for i in t.dg'range loop index := t.dg'first + i - 1; temp := t.dg(index); if temp > res(i) then res(i) := temp; end if; end loop; cont := true; end Degree_Term; procedure Degree_Terms is new Visiting_Iterator(Degree_Term); begin res := new Integer_Vectors.Vector'(1..n => -MAX_INT); Degree_Terms(p); return res; end Maximal_Degrees; function Minimal_Degree ( p : Poly; i : natural ) return integer is res : integer := MAX_INT; procedure Degree_Term ( t : in Term; continue : out boolean ) is index,temp : integer; begin if t.dg /= null then index := t.dg'first + i - 1; temp := t.dg(index); if temp < res then res := temp; end if; continue := true; end if; end Degree_Term; procedure Degree_Terms is new Visiting_Iterator(Degree_Term); begin Degree_Terms(p); return res; end Minimal_Degree; function Minimal_Degrees ( p : Poly ) return Degrees is res : Degrees; n : natural := Number_of_Unknowns(p); procedure Degree_Term ( t : in Term; cont : out boolean ) is index,temp : integer; begin for i in t.dg'range loop index := t.dg'first + i - 1; temp := t.dg(index); if temp < res(i) then res(i) := temp; end if; end loop; cont := true; end Degree_Term; procedure Degree_Terms is new Visiting_Iterator(Degree_Term); begin res := new Integer_Vectors.Vector'(1..n => MAX_INT); Degree_Terms(p); return res; end Minimal_Degrees; function "<" ( d1,d2 : Degrees ) return boolean is begin return Link_to_Vector(d1) < Link_to_Vector(d2); end "<"; function ">" ( d1,d2 : Degrees ) return boolean is begin return Link_to_Vector(d1) > Link_to_Vector(d2); end ">"; function Coeff ( p : Poly; d : degrees ) return coefftp is l : Poly_Rep; t : term; res : coefftp; begin if p = Null_Poly then return zero; else l := p.all; while not Is_Null(l) loop t := Head_Of(l); if t.dg < d then return zero; elsif Equal(t.dg,d) then copy(t.cf,res); return res; else l := Tail_Of(l); end if; end loop; return zero; end if; end Coeff; function Coeff ( p : Poly ) return Vector_of_coefftp is res : Vector_of_coefftp(1..Number_of_Terms(p)); cnt : natural := 0; procedure Visit_Term ( t : in Term; cont : out boolean ) is begin cnt := cnt + 1; copy(t.cf,res(cnt)); cont := true; end Visit_Term; procedure Visit_Terms is new Visiting_Iterator(Visit_Term); begin Visit_Terms(p); return res; end Coeff; -- ARITHMETICAL OPERATIONS : function "+" ( p : Poly; t : Term ) return Poly is temp : Poly; begin Copy(p,temp); Plus_Term(temp,t); return temp; end "+"; function "+" ( t : Term; p : Poly ) return Poly is begin return p+t; end "+"; function "+" ( p,q : Poly ) return Poly is temp : Poly; begin Copy(p,temp); Plus_Poly(temp,q); return temp; end "+"; function "-" ( p : Poly; t : Term ) return Poly is temp : Poly; begin Copy(p,temp); Min_Term(temp,t); return temp; end "-"; function "-" ( t : Term; p : Poly ) return Poly is temp : Poly; begin temp := Create(t); Min_Poly(temp,p); return temp; end "-"; function "-" ( p : Poly ) return Poly is temp : Poly; begin Copy(p,temp); Min_Poly(temp); return temp; end "-"; function "-" ( p,q : Poly ) return Poly is temp : Poly; begin Copy(p,temp); Min_Poly(temp,q); return temp; end "-"; function "*" ( p : Poly; a : coefftp ) return Poly is temp : Poly; begin Copy(p,temp); Mult_Coeff(temp,a); return temp; end "*"; function "*" ( a : coefftp; p : Poly ) return Poly is begin return p*a; end "*"; function "*" ( p : Poly; t : Term ) return Poly is temp : Poly; begin Copy(p,temp); Mult_Term(temp,t); return temp; end "*"; function "*" ( t : Term; p : Poly ) return Poly is begin return p*t; end "*"; function "*" ( p,q : Poly ) return Poly is temp : Poly; begin Copy(p,temp); Mult_Poly(temp,q); return temp; end "*"; procedure Plus_Term ( p : in out Poly; t : in Term ) is l1,l2,temp : Poly_Rep; tt,tp : Term; begin if t.cf /= zero then Copy(t,tt); if p = Null_Poly then p := new Poly_Rep; Construct(tt,p.all); else tp := Head_Of(p.all); if tt.dg > tp.dg then Construct(tt,p.all); elsif Equal(tt.dg,tp.dg) then Plus_Coeff(tp.cf,tt.cf); if tp.cf /= zero then Set_Head(p.all,tp); else Clear(tp); if Is_Null(Tail_Of(p.all)) then Term_List.Clear(Term_List.List(p.all)); free(p); else Swap_Tail(p.all,l1); Term_List.Clear(Term_List.List(p.all)); p.all := l1; end if; end if; Clear(tt); else l1 := p.all; l2 := Tail_Of(l1); while not Is_Null(l2) loop tp := Head_Of(l2); if tt.dg > tp.dg then Construct(tt,temp); Swap_Tail(l1,temp); l1 := Tail_Of(l1); Swap_Tail(l1,temp); return; elsif Equal(tt.dg,tp.dg) then Plus_Coeff(tp.cf,tt.cf); if tp.cf /= zero then Set_Head(l2,tp); else Clear(tp); temp := Tail_Of(l2); Swap_Tail(l1,temp); end if; Clear(tt); return; else l1 := l2; l2 := Tail_Of(l1); end if; end loop; Construct(tt,temp); Swap_Tail(l1,temp); end if; end if; end if; end Plus_Term; procedure Plus_Poly ( p : in out Poly; q : in Poly ) is procedure Plus_Term ( t : in Term; continue : out boolean ) is begin Plus_Term(p,t); continue := true; end Plus_Term; procedure Plus_Terms is new Visiting_Iterator(Plus_Term); begin Plus_Terms(q); end Plus_Poly; procedure Min_Term ( p : in out Poly; t : in Term ) is temp : Term; begin Integer_Vectors.Copy(Link_to_Vector(t.dg),Link_to_Vector(temp.dg)); temp.cf := -t.cf; Plus_Term(p,temp); Integer_Vectors.Clear(Link_to_Vector(temp.dg)); clear(temp.cf); end Min_Term; procedure Min_Poly ( p : in out Poly; q : in Poly ) is temp : Poly := -q; begin Plus_Poly(p,temp); Clear(temp); end Min_Poly; procedure Min_Poly ( p : in out Poly ) is procedure Min_Term ( t : in out Term; continue : out boolean ) is begin Min_Coeff(t.cf); continue := true; end Min_Term; procedure Min_Poly1 is new Changing_Iterator (process => Min_Term); begin Min_Poly1(p); end Min_Poly; procedure Mult_Coeff ( p : in out Poly; a : in coefftp ) is procedure Mult_Term ( t : in out Term; continue : out boolean ) is begin Mult_Coeff(t.cf,a); continue := true; end Mult_Term; procedure Mult_Coeff1 is new Changing_Iterator (process => Mult_Term); begin Mult_Coeff1(p); end Mult_Coeff; procedure Mult_Term ( p : in out Poly; t : in Term ) is procedure Mult_Term ( tp : in out Term; continue : out boolean ) is begin Integer_Vectors.Plus_Vector(Link_to_Vector(tp.dg),Link_to_Vector(t.dg)); Mult_Coeff(tp.cf,t.cf); continue := true; end Mult_Term; procedure Mult_Terms is new Changing_Iterator (process => Mult_Term); begin Mult_Terms(p); end Mult_Term; procedure Mult_Poly ( p : in out Poly; q : in Poly ) is res : Poly; l : Poly_Rep; t : Term; begin if (q = Null_Poly) or else Is_Null(q.all) then Clear(p); else l := q.all; res := Null_Poly; while not Is_Null(l) loop t := Head_Of(l); declare temp : Poly; begin temp := p * t; Plus_Poly(res,temp); Clear(temp); end; l := Tail_Of(l); end loop; Copy(res,p); Clear(res); end if; end Mult_Poly; function Eval ( p : Poly; x : coefftp; i : integer ) return Poly is res : Poly := Null_Poly; procedure Eval_Term ( t : in Term; cont : out boolean ) is nt : Term; begin copy(t.cf,nt.cf); nt.dg := new Integer_Vectors.Vector(t.dg'first..t.dg'last-1); for j in t.dg'range loop if j < i then nt.dg(j) := t.dg(j); elsif j > i then nt.dg(j-1) := t.dg(j); else for k in 1..t.dg(i) loop mult_coeff(nt.cf,x); end loop; end if; end loop; Plus_Term(res,nt); cont := true; end Eval_Term; procedure Eval_Terms is new Visiting_Iterator(Eval_Term); begin Eval_Terms(p); return res; end Eval; function Eval ( d : Degrees; c : coefftp; x : Vector_of_coefftp ) return coefftp is res : coefftp; begin copy(c,res); for i in d'range loop for j in 1..(-d(i)) loop div_coeff(res,x(i)); end loop; for j in 1..d(i) loop mult_coeff(res,x(i)); end loop; end loop; return res; end Eval; function Eval ( t : Term; x : Vector_of_coefftp ) return coefftp is begin return Eval(t.dg,t.cf,x); end Eval; function Eval ( t : Term; c : coefftp; x : Vector_of_coefftp ) return coefftp is begin return Eval(t.dg,c,x); end Eval; function Eval ( p : Poly; x : Vector_of_coefftp ) return coefftp is res : coefftp := zero; procedure Eval_Term ( t : in Term; cont : out boolean ) is begin plus_coeff(res,Eval(t,x)); cont := true; end Eval_Term; procedure Eval_Terms is new Visiting_Iterator(Eval_Term); begin Eval_Terms(p); return res; end Eval; function Eval ( p : Poly; c,x : Vector_of_coefftp ) return coefftp is res : coefftp := zero; cnt : natural := 0; procedure Eval_Term ( t : in Term; cont : out boolean ) is begin cnt := cnt + 1; plus_coeff(res,Eval(t,c(cnt),x)); cont := true; end Eval_Term; procedure Eval_Terms is new Visiting_Iterator(Eval_Term); begin Eval_Terms(p); return res; end Eval; function Eval ( vp : Eval_Poly_Rep; x : Vector_of_coefftp; i : integer ) return coefftp; function Eval ( vprec : Poly_Rec; x : Vector_of_coefftp; i : integer ) return coefftp is res : coefftp; begin if vprec.k = number then copy(vprec.c,res); return res; else return Eval(vprec.p.all,x,i); end if; end Eval; function Eval ( vp : Eval_Poly_Rep; x : Vector_of_coefftp; i : integer ) return coefftp is deg : natural := vp'length-1; res : coefftp; begin if deg = 0 then return Eval(vp(0),x,i+1); else res := Eval(vp(deg),x,i+1); for j in reverse 0..(deg-1) loop Mult_Coeff(res,x(i)); if (vp(j).k = number) or (vp(j).p /= null) then declare temp : coefftp := Eval(vp(j),x,i+1); begin Plus_Coeff(res,temp); clear(temp); end; end if; end loop; return res; end if; end Eval; function Eval ( p : Eval_Poly; x : Vector_of_coefftp ) return coefftp is begin if p = null then return zero; else return Eval(p.all,x,x'first); end if; end Eval; function Eval ( vp : Eval_Coeff_Poly_Rep; c,x : Vector_of_coefftp; i : integer ) return coefftp; function Eval ( vprec : Coeff_Poly_Rec; c,x : Vector_of_coefftp; i : integer ) return coefftp is res : coefftp; begin if vprec.k = number then copy(c(vprec.c),res); return res; else return Eval(vprec.p.all,c,x,i); end if; end Eval; function Eval ( vp : Eval_Coeff_Poly_Rep; c,x : Vector_of_coefftp; i : integer ) return coefftp is deg : natural := vp'length-1; res : coefftp; begin if deg = 0 then return Eval(vp(0),c,x,i+1); else res := Eval(vp(deg),c,x,i+1); for j in reverse 0..(deg-1) loop Mult_Coeff(res,x(i)); if (vp(j).k = number) or (vp(j).p /= null) then declare temp : coefftp := Eval(vp(j),c,x,i+1); begin Plus_Coeff(res,temp); clear(temp); end; end if; end loop; return res; end if; end Eval; function Eval ( p : Eval_Coeff_Poly; c,x : Vector_of_coefftp ) return coefftp is begin if p = null then return zero; else return Eval(p.all,c,x,x'first); end if; end Eval; procedure Diff ( p : in out Poly; i : in integer ) is procedure Diff_Term ( t : in out Term; continue : out boolean ) is temp : coefftp; index : integer := t.dg'first + i - 1; begin if t.dg(index) = 0 then Clear(t); t.cf := zero; else temp := convert(t.dg(index)); Mult_Coeff(t.cf,temp); t.dg(index) := t.dg(index) - 1; end if; continue := true; end Diff_Term; procedure Diff_Terms is new Changing_Iterator( process => Diff_Term ); begin Diff_Terms(p); end Diff; function Diff ( p : Poly; i : integer ) return Poly is temp : Poly; begin Copy(p,temp); Diff(temp,i); return temp; end Diff; procedure Diff ( p : in Poly; i : in integer; cp : out Eval_Coeff_Poly; m : out Vector_of_coefftp ) is nb : constant natural := Number_of_Terms(p); n : constant natural := Number_of_Unknowns(p); ind,cnt : integer; dp : Poly := Null_Poly; procedure Diff_Term ( t : in Term; cont : out boolean ) is dt : Term; begin cnt := cnt + 1; if t.dg(i) > 0 then dt.cf := convert(cnt); dt.dg := new Integer_Vectors.Vector'(t.dg.all); m(cnt) := convert(t.dg(i)); dt.dg(i) := dt.dg(i) - 1; Plus_Term(dp,dt); Clear(dt); else m(cnt) := convert(0); end if; cont := true; end Diff_Term; procedure Diff_Terms is new Visiting_Iterator(Diff_Term); begin cnt := 0; Diff_Terms(p); if dp /= null then ind := Head_Of(dp.all).dg'first; cp := Create(dp,n,nb,Maximal_Degree(dp,ind)); end if; end Diff; -- ITERATORS : procedure Visiting_Iterator ( p : in Poly ) is l : Poly_Rep; temp : Term; continue : boolean; begin if p /= Null_Poly then l := p.all; while not Is_Null(l) loop temp := Head_Of(l); process(temp,continue); exit when not continue; l := Tail_Of(l); end loop; end if; end Visiting_Iterator; procedure Changing_Iterator ( p : in out Poly ) is q,lq,lp : Poly_Rep; t : Term; continue : boolean := true; procedure copy_append is temp : Term; begin Copy(t,temp); if continue then process(temp,continue); end if; if temp.cf /= zero then Append(q,lq,temp); else Clear(temp); end if; Clear(t); end copy_append; begin if p = Null_Poly then return; else lp := p.all; while not Is_Null(lp) loop t := Head_Of(lp); copy_append; lp := Tail_Of(lp); end loop; Term_List.Clear(Term_List.List(p.all)); free(p); if Is_Null(q) then p := Null_Poly; else p := new Poly_Rep'(q); end if; Shuffle(p); -- ensure the second representation invariant end if; end Changing_Iterator; -- DESTRUCTORS : procedure Clear ( t : in out Term ) is begin Integer_Vectors.Clear(Link_to_Vector(t.dg)); clear(t.cf); end Clear; procedure Clear ( p : in out Poly_Rep ) is l : Poly_Rep := p; t : Term; begin if Is_Null(p) then return; else while not Is_Null(l) loop t := Head_Of(l); Clear(t); l := Tail_Of(l); end loop; Term_List.Clear(Term_List.List(p)); end if; end Clear; procedure Clear ( p : in out Poly ) is begin if p /= Null_Poly then Clear(p.all); free(p); p := Null_Poly; end if; end Clear; procedure Clear ( p : in out Eval_Poly ) is begin if p /= null then declare vp : Eval_Poly_Rep renames p.all; begin for i in vp'range loop if vp(i).k = number then clear(vp(i).c); else Clear(vp(i).p); end if; end loop; end; free(p); end if; end Clear; procedure Clear ( p : in out Eval_Coeff_Poly ) is begin if p /= null then declare vp : Eval_Coeff_Poly_Rep renames p.all; begin for i in vp'range loop if vp(i).k /= number then Clear(vp(i).p); end if; end loop; end; free(p); end if; end Clear; end Multivariate_Laurent_Polynomials; SHAR_EOF fi # end of overwriting check if test -f 'multivariate_laurent_polynomials.ads' then echo shar: will not over-write existing file "'multivariate_laurent_polynomials.ads'" else cat << "SHAR_EOF" > 'multivariate_laurent_polynomials.ads' with Vectors,Integer_Vectors; use Integer_Vectors; generic type coefftp is private; -- type of the coefficients of the polynomials type Vector_of_coefftp is array ( integer range <> ) of coefftp; zero : coefftp; -- the neutral element for "+" with procedure clear ( a : in out coefftp ); with procedure copy ( a : in coefftp; b : in out coefftp ); with function equal ( a,b : coefftp ) return boolean; with function "+" ( a,b : coefftp ) return coefftp; -- return a+b; with function "-" ( a : coefftp ) return coefftp; -- return -a; with function "-" ( a,b : coefftp ) return coefftp; -- return a-b; with function "*" ( a,b : coefftp ) return coefftp; -- return a*b; with function "/" ( a,b : coefftp ) return coefftp; -- return a/b; with function convert ( n : natural ) return coefftp; -- return coefftp(n); with procedure Plus_Coeff ( a : in out coefftp; b : in coefftp ); -- a := a+b; with procedure Min_Coeff ( a : in out coefftp); -- a := -a; with procedure Min_Coeff ( a : in out coefftp; b : in coefftp ); -- a := a-b; with procedure Mult_Coeff ( a : in out coefftp; b : in coefftp ); -- a := a*b; with procedure Div_Coeff ( a : in out coefftp; b : in coefftp ); -- a := a/b; with function "<" ( v1,v2 : Link_to_Vector ) return boolean; -- return v1 < v2 with function ">" ( v1,v2 : Link_to_Vector ) return boolean; -- return v1 > v2 package Multivariate_Laurent_Polynomials is -- DESCRIPTION : -- This package provides an abstraction for multivariate Laurent polynomials, -- with coefficients over any ring, to be specified by instantiation. -- Also the term ordening is determined by the generic parameters. -- Two special data structures are provided for efficient evaluation. -- Garbage collection is provided. Therefore operations like clear, -- equal and copy must be supplied when instantiating this package. -- DATA STRUCTURES : type Degrees is new Integer_Vectors.Link_to_Vector; type Term is record cf : coefftp; -- coefficient of the term dg : Degrees; -- the degrees of the term end record; type Poly is private; type Eval_Poly is private; type Eval_Coeff_Poly is private; Null_Poly : constant Poly; -- CONSTRUCTORS : function Create ( t : Term ) return Poly; function Create ( p : Poly ) return Eval_Poly; function Create ( p : Poly ) return Eval_Coeff_Poly; procedure Copy ( t1 : in Term; t2 : in out Term ); -- makes a deep copy procedure Copy ( p: in Poly; q : in out Poly ); -- SELECTORS : function Equal ( t1,t2 : Term ) return boolean; function Equal ( p,q : Poly ) return boolean; function Number_of_Unknowns ( p : Poly ) return natural; function Number_of_Terms ( p : Poly ) return natural; function Degree ( p : Poly ) return integer; -- return deg(p); function Maximal_Degree ( p : Poly; i : natural ) return integer; -- returns maximal degree of xi in p; function Maximal_Degrees ( p : Poly ) return Degrees; -- Maximal_Degrees(p)(i) = Maximal_Degree(p,i) function Minimal_Degree ( p : Poly; i : natural ) return integer; -- returns minimal degree of xi in p; function Minimal_Degrees ( p : Poly ) return Degrees; -- Minimal_Degrees(p)(i) = Minimal_Degree(p,i) function "<" ( d1,d2 : Degrees ) return boolean; -- return d1 < d2 function ">" ( d1,d2 : Degrees ) return boolean; -- return d1 > d2 function Coeff ( p : Poly; d : Degrees ) return coefftp; -- Ex.: Coeff(c1*x^2+c2*x*y^3,(1 2))=c2; Coeff(c1*x^2+c2,(1 0))=zero; function Coeff ( p : Poly ) return Vector_of_coefftp; -- returns the vector of coefficients, starting with highest degree -- ARITHMETICAL OPERATIONS : function "+" ( p : Poly; t : Term ) return Poly; -- return p+t; function "+" ( t : Term; p : Poly ) return Poly; -- return t+p; function "+" ( p,q : Poly ) return Poly; -- return p+q; function "-" ( p : Poly; t : Term ) return Poly; -- return p-t; function "-" ( t : Term; p : Poly ) return Poly; -- return t-p; function "-" ( p : Poly ) return Poly; -- return -p; function "-" ( p,q : Poly ) return Poly; -- return p-q; function "*" ( p : Poly; a : coefftp ) return Poly; -- return a*p; function "*" ( a : coefftp; p : Poly ) return Poly; -- return p*a; function "*" ( p : Poly; t : Term ) return Poly; -- return p*t; function "*" ( t : Term; p : Poly ) return Poly; -- return t*p; function "*" ( p,q : Poly ) return Poly; -- return p*q; procedure Plus_Term ( p : in out Poly; t : in Term ); -- p := p + t; procedure Plus_Poly ( p : in out Poly; q : in Poly ); -- p := p + q; procedure Min_Term ( p : in out Poly; t : in Term ); -- p := p - t; procedure Min_Poly ( p : in out Poly ); -- p := -p; procedure Min_Poly ( p : in out Poly; q : in Poly ); -- p := p - q; procedure Mult_Coeff( p : in out Poly; a : in coefftp ); -- p := p * a; procedure Mult_Term ( p : in out Poly; t : in Term ); -- p := p * t; procedure Mult_Poly ( p : in out Poly; q : in Poly ); -- p := p * q; function Eval ( p : Poly; x : coefftp; i : integer ) return Poly; -- return p(x1,..,xi=x,..,xn); -- Number_of_Unknowns(Eval(p,x,i)) = Number_of_Unknowns(p)-1 function Eval ( d : Degrees; c : coefftp; x : Vector_of_coefftp ) return coefftp; -- return c*x**d function Eval ( t : Term; c : coefftp; x : Vector_of_coefftp ) return coefftp; -- return c*x**d, with d = t.dg function Eval ( t : Term; x : Vector_of_coefftp ) return coefftp; function Eval ( p : Poly; x : Vector_of_coefftp ) return coefftp; -- return p(x); function Eval ( p : Poly; c,x : Vector_of_coefftp ) return coefftp; -- return p(c,x), with c = vector of coefficients for p function Eval ( p : Eval_Poly; x : Vector_of_coefftp ) return coefftp; -- return p(x); function Eval ( p : Eval_Coeff_Poly; c,x : Vector_of_coefftp ) return coefftp; -- return p(c,x), with c = vector of coefficients for p function Diff ( p : Poly; i : integer ) return Poly; procedure Diff ( p : in out Poly; i : in integer ); -- symbolic differentiation w.r.t. the i-th unknown of p procedure Diff ( p : in Poly; i : in integer; cp : out Eval_Coeff_Poly; m : out Vector_of_coefftp ); -- evaluable coefficient polynomial of the partial derivative, -- with m the multiplication factors of the coefficients of p -- ITERATORS : run through all terms of p and apply the generic procedure. generic with procedure process ( t : in out Term; continue : out boolean ); procedure Changing_Iterator ( p : in out Poly ); -- t can be changed generic with procedure process ( t : in Term; continue : out boolean ); procedure Visiting_Iterator ( p : in Poly ); -- t can only be read -- DESTRUCTORS : deallocate memory. procedure Clear ( t : in out Term ); procedure Clear ( p : in out Poly ); procedure Clear ( p : in out Eval_Poly ); procedure Clear ( p : in out Eval_Coeff_Poly ); private type Poly_Rep; type Eval_Poly_Rep; type Eval_Coeff_Poly_Rep; type Poly is access Poly_Rep; type Eval_Poly is access Eval_Poly_Rep; type Eval_Coeff_Poly is access Eval_Coeff_Poly_Rep; Null_Poly : constant Poly := null; end Multivariate_Laurent_Polynomials; SHAR_EOF fi # end of overwriting check if test -f 'multivariate_polynomials.adb' then echo shar: will not over-write existing file "'multivariate_polynomials.adb'" else cat << "SHAR_EOF" > 'multivariate_polynomials.adb' with unchecked_deallocation; with Lists; package body Multivariate_Polynomials is -- REPRESENTATION INVARIANT : -- 1. Only terms with a coefficient different from zero are stored. -- 2. The terms in any polynomial are ordered from high to low degree -- according to the instantiating order on the degrees. -- DATA STRUCTURES : package Term_List is new Lists(Term); type Poly_Rep is new Term_List.List; type kind is (polynomial,number); type Poly_Rec ( k : kind := number ) is record case k is when number => c : coefftp; when polynomial => p : Eval_Poly; end case; end record; type Coeff_Poly_Rec ( k : kind := number ) is record case k is when number => c : integer; when polynomial => p : Eval_Coeff_Poly; end case; end record; Null_Poly_Rec : constant Poly_Rec(number) := (number,zero); type Eval_Poly_Rep is array(integer range <>) of Poly_Rec; type Eval_Coeff_Poly_Rep is array(integer range <>) of Coeff_Poly_Rec; procedure free is new unchecked_deallocation(Poly_Rep,Poly); procedure free is new unchecked_deallocation(Eval_Poly_Rep,Eval_Poly); procedure free is new unchecked_deallocation(Eval_Coeff_Poly_Rep,Eval_Coeff_Poly); -- AUXILIARY OPERATIONS : function Convert ( c : coefftp; n : natural ) return natural is -- DESCRIPTION : -- Returns the corresponding value for c, when it lies in 1..n, -- otherwise 0 is returned. begin for i in 1..n loop if c = Convert(i) then return i; end if; end loop; return 0; end Convert; procedure Shuffle ( p : in out Poly ) is -- DESCRIPTION : -- Changes the position of the terms in p back to the normal order. -- Needed to guarantee the second representation invariant. res : Poly := Null_Poly; procedure Shuffle_Term ( t : in Term; cont : out boolean ) is begin Plus_Term(res,t); cont := true; end Shuffle_Term; procedure Shuffle_Terms is new Visiting_Iterator(Shuffle_Term); begin Shuffle_Terms(p); Clear(p); Copy(res,p); Clear(res); end Shuffle; procedure Append_Copy ( first,last : in out Poly_Rep; t : in Term ) is -- DESCRIPTION : -- Appends a copy of the term to the list. tt : Term; begin Copy(t,tt); Append(first,last,tt); end Append_Copy; -- CONSTRUCTORS : function Create ( t : Term ) return Poly is p : Poly; begin if equal(t.cf,zero) then p := Null_Poly; else declare tt : Term; begin Copy(t,tt); p := new Poly_Rep; Construct(tt,p.all); end; end if; return p; end Create; function Create ( p : Poly; n : natural; d : integer ) return Eval_Poly is -- DESCRIPTION : -- An evaluable polynomial is returned for p, with d = Degree(p,x1) -- and n = Number_of_Unknowns(p) >= 1. res : Eval_Poly; evpr : Eval_Poly_Rep(0..d); terms : array(0..d) of Poly := (0..d => Null_Poly); procedure Add_Term1 ( t : in Term; cont : out boolean ) is pr : Poly_Rec(number); begin copy(t.cf,pr.c); evpr(t.dg(t.dg'first)) := pr; cont := true; end Add_Term1; procedure Add_Terms1 is new Visiting_Iterator(Add_Term1); procedure Add_Term ( t : in Term; cont : out boolean ) is nt : Term; begin nt.cf := t.cf; nt.dg := new Natural_Vectors.Vector(t.dg'first..t.dg'last-1); for i in nt.dg'range loop nt.dg(i) := t.dg(i+1); end loop; Plus_Term(terms(t.dg(t.dg'first)),nt); cont := true; end Add_Term; procedure Add_Terms is new Visiting_Iterator(Add_Term); begin if n = 1 then Add_Terms1(p); else Add_Terms(p); for i in terms'range loop declare pr : Poly_Rec(polynomial); begin pr.p := Create(terms(i)); evpr(i) := pr; Clear(terms(i)); end; end loop; end if; res := new Eval_Poly_Rep'(evpr); return res; end Create; function Create ( p : Poly; n,nb : natural; d : integer ) return Eval_Coeff_Poly is -- DESCRIPTION : -- An evaluable polynomial is returned for p, with d = Degree(p,x1), -- n = Number_of_Unknowns(p) >= 1 and nb = Number_of_Terms(p). -- The coefficients of p are converted natural numbers. res : Eval_Coeff_Poly; evpr : Eval_Coeff_Poly_Rep(0..d); terms : array(0..d) of Poly := (0..d => Null_Poly); procedure Add_Term1 ( t : in Term; cont : out boolean ) is pr : Coeff_Poly_Rec(number); begin pr.c := Convert(t.cf,nb); evpr(t.dg(t.dg'first)) := pr; cont := true; end Add_Term1; procedure Add_Terms1 is new Visiting_Iterator(Add_Term1); procedure Add_Term ( t : in Term; cont : out boolean ) is nt : Term; begin nt.cf := t.cf; nt.dg := new Natural_Vectors.Vector(t.dg'first..t.dg'last-1); for i in nt.dg'range loop nt.dg(i) := t.dg(i+1); end loop; Plus_Term(terms(t.dg(t.dg'first)),nt); cont := true; end Add_Term; procedure Add_Terms is new Visiting_Iterator(Add_Term); begin if n = 1 then for i in evpr'range loop -- initialization declare nullpr : Coeff_Poly_Rec(polynomial); begin nullpr.p := null; evpr(i) := nullpr; end; end loop; Add_Terms1(p); else Add_Terms(p); for i in terms'range loop declare pr : Coeff_Poly_Rec(polynomial); ind : integer; begin if terms(i) = Null_Poly then pr.p := null; else ind := Head_Of(terms(i).all).dg'first; pr.p := Create(terms(i),n-1,nb,Degree(terms(i),ind)); end if; evpr(i) := pr; Clear(terms(i)); end; end loop; end if; res := new Eval_Coeff_Poly_Rep'(evpr); return res; end Create; function Create ( p : Poly ) return Eval_Poly is n : constant natural := Number_of_Unknowns(p); ind : integer; begin if (p = Null_Poly) or else (n = 0) then return null; else ind := Head_Of(p.all).dg'first; return Create(p,n,Degree(p,ind)); end if; end Create; function Create ( p : Poly ) return Eval_Coeff_Poly is res : Eval_Coeff_Poly; lp : Poly := Null_Poly; n : constant natural := Number_of_Unknowns(p); nb : constant natural := Number_of_Terms(p); cnt : natural := 0; ind : integer; procedure Label_Term ( t : in Term; cont : out boolean ) is lt : Term; begin cnt := cnt + 1; lt.cf := Convert(cnt); lt.dg := new Natural_Vectors.Vector'(t.dg.all); Plus_Term(lp,lt); cont := true; end Label_Term; procedure Label_Terms is new Visiting_Iterator(Label_Term); begin if (p = Null_Poly) or else (nb = 0) then return null; else Label_Terms(p); ind := Head_Of(p.all).dg'first; res := Create(lp,n,nb,Degree(p,ind)); Clear(lp); end if; return res; end Create; procedure Copy ( t1 : in Term; t2 : in out Term ) is begin Clear(t2); Natural_Vectors.Copy(Link_to_Vector(t1.dg),Link_to_Vector(t2.dg)); copy(t1.cf,t2.cf); end Copy; procedure Copy ( p: in Poly_Rep; q : in out Poly_Rep ) is lp,lq : Poly_Rep; t : Term; begin Clear(q); if not Is_Null(p) then lp := p; while not Is_Null(lp) loop t := Head_Of(lp); Append_Copy(q,lq,t); lp := Tail_Of(lp); end loop; end if; end Copy; procedure Copy ( p : in Poly; q : in out Poly ) is l : Poly_Rep; begin Clear(q); if p /= Null_Poly then Copy(p.all,l); q := new Poly_Rep'(l); else q := Null_Poly; end if; end Copy; -- SELECTORS : function Equal ( t1,t2 : Term ) return boolean is begin if not Equal(t1.dg,t2.dg) then return false; else return equal(t1.cf,t2.cf); end if; end Equal; function Equal ( p,q : Poly_Rep ) return boolean is lp, lq : Poly_Rep; begin lp := p; lq := q; while not Is_Null(lp) and not Is_Null(lq) loop if not Equal(Head_Of(lp),Head_Of(lq)) then return false; else lp := Tail_Of(lp); lq := Tail_Of(lq); end if; end loop; if Is_Null(lp) and Is_Null(lq) then return true; else return false; end if; end Equal; function Equal ( p,q : Poly ) return boolean is begin if (p = Null_Poly) and (q = Null_Poly) then return true; elsif (p = Null_Poly) or (q = Null_Poly) then return false; else return Equal(p.all,q.all); end if; end Equal; function Number_Of_Unknowns ( p : Poly ) return natural is temp : Term; begin if (p = Null_Poly) or else Is_Null(p.all) then return 0; else temp := Head_Of(p.all); if temp.dg = null then return 0; else return temp.dg'length; end if; end if; end Number_Of_Unknowns; function Number_Of_Terms ( p : Poly ) return natural is begin if (p = Null_Poly) or else Is_Null(p.all) then return 0; else return Length_Of(p.all); end if; end Number_Of_Terms; function Degree ( p : Poly ) return integer is temp : Term; begin if (p = Null_Poly) or else Is_Null(p.all) then return -1; else temp := Head_Of(p.all); if temp.dg = null then return 0; else return integer(Sum(temp.dg)); end if; end if; end Degree; function Degree ( p : Poly; i : integer ) return integer is res : integer := 0; procedure Degree_Term (t : in Term; continue : out boolean) is index,temp : integer; begin if t.dg /= null then index := t.dg'first + i - 1; temp := t.dg(index); if (temp > 0) and then (temp > res) then res := temp; end if; continue := true; end if; end Degree_Term; procedure Degree_Terms is new Visiting_Iterator(process => Degree_Term); begin if p = Null_Poly or else Is_Null(p.all) then return -1; else Degree_Terms(p); return res; end if; end Degree; function "<" ( d1,d2 : Degrees ) return boolean is begin return Link_to_Vector(d1) < Link_to_Vector(d2); end "<"; function ">" ( d1,d2 : Degrees ) return boolean is begin return Link_to_Vector(d1) > Link_to_Vector(d2); end ">"; function Coeff ( p : Poly; d : degrees ) return coefftp is l : Poly_Rep; t : term; res : coefftp; begin if p = Null_Poly then return zero; else l := p.all; while not Is_Null(l) loop t := Head_Of(l); if t.dg < d then return zero; elsif Equal(t.dg,d) then copy(t.cf,res); return res; else l := Tail_Of(l); end if; end loop; return zero; end if; end Coeff; function Coeff ( p : Poly ) return Vector_of_coefftp is res : Vector_of_coefftp(1..Number_of_Terms(p)); cnt : natural := 0; procedure Visit_Term ( t : in Term; cont : out boolean ) is begin cnt := cnt + 1; copy(t.cf,res(cnt)); cont := true; end Visit_Term; procedure Visit_Terms is new Visiting_Iterator(Visit_Term); begin Visit_Terms(p); return res; end Coeff; -- ARITHMETICAL OPERATIONS : function "+" ( p : Poly; t : Term ) return Poly is temp : Poly; begin Copy(p,temp); Plus_Term(temp,t); return temp; end "+"; function "+" ( t : Term; p : Poly ) return Poly is begin return p+t; end "+"; function "+" ( p,q : Poly ) return Poly is temp : Poly; begin Copy(p,temp); Plus_Poly(temp,q); return temp; end "+"; function "-" ( p : Poly; t : Term ) return Poly is temp : Poly; begin Copy(p,temp); Min_Term(temp,t); return temp; end "-"; function "-" ( t : Term; p : Poly ) return Poly is temp : Poly; begin temp := Create(t); Min_Poly(temp,p); return temp; end "-"; function "-" ( p : Poly ) return Poly is temp : Poly; begin Copy(p,temp); Min_Poly(temp); return temp; end "-"; function "-" ( p,q : Poly ) return Poly is temp : Poly; begin Copy(p,temp); Min_Poly(temp,q); return temp; end "-"; function "*" ( p : Poly; a : coefftp ) return Poly is temp : Poly; begin Copy(p,temp); Mult_Coeff(temp,a); return temp; end "*"; function "*" ( a : coefftp; p : Poly ) return Poly is begin return p*a; end "*"; function "*" ( p : Poly; t : Term ) return Poly is temp : Poly; begin Copy(p,temp); Mult_Term(temp,t); return temp; end "*"; function "*" ( t : Term; p : Poly ) return Poly is begin return p*t; end "*"; function "*" ( p,q : Poly ) return Poly is temp : Poly; begin Copy(p,temp); Mult_Poly(temp,q); return temp; end "*"; procedure Plus_Term ( p : in out Poly; t : in Term ) is l1,l2,temp : Poly_Rep; tt,tp : Term; begin if t.cf /= zero then Copy(t,tt); if p = Null_Poly then p := new Poly_Rep; Construct(tt,p.all); else tp := Head_Of(p.all); if tt.dg > tp.dg then Construct(tt,p.all); elsif Equal(tt.dg,tp.dg) then Plus_Coeff(tp.cf,tt.cf); if tp.cf /= zero then Set_Head(p.all,tp); else Clear(tp); if Is_Null(Tail_Of(p.all)) then Term_List.Clear(Term_List.List(p.all)); free(p); else Swap_Tail(p.all,l1); Term_List.Clear(Term_List.List(p.all)); p.all := l1; end if; end if; Clear(tt); else l1 := p.all; l2 := Tail_Of(l1); while not Is_Null(l2) loop tp := Head_Of(l2); if tt.dg > tp.dg then Construct(tt,temp); Swap_Tail(l1,temp); l1 := Tail_Of(l1); Swap_Tail(l1,temp); return; elsif Equal(tt.dg,tp.dg) then Plus_Coeff(tp.cf,tt.cf); if tp.cf /= zero then Set_Head(l2,tp); else Clear(tp); temp := Tail_Of(l2); Swap_Tail(l1,temp); end if; Clear(tt); return; else l1 := l2; l2 := Tail_Of(l1); end if; end loop; Construct(tt,temp); Swap_Tail(l1,temp); end if; end if; end if; end Plus_Term; procedure Plus_Poly ( p : in out Poly; q : in Poly ) is procedure Plus_Term ( t : in Term; continue : out boolean ) is begin Plus_Term(p,t); continue := true; end Plus_Term; procedure Plus_Terms is new Visiting_Iterator(Plus_Term); begin Plus_Terms(q); end Plus_Poly; procedure Min_Term ( p : in out Poly; t : in Term ) is temp : Term; begin Natural_Vectors.Copy(Link_to_Vector(t.dg),Link_to_Vector(temp.dg)); temp.cf := -t.cf; Plus_Term(p,temp); Natural_Vectors.Clear(Link_to_Vector(temp.dg)); clear(temp.cf); end Min_Term; procedure Min_Poly ( p : in out Poly; q : in Poly ) is temp : Poly := -q; begin Plus_Poly(p,temp); Clear(temp); end Min_Poly; procedure Min_Poly ( p : in out Poly ) is procedure Min_Term ( t : in out Term; continue : out boolean ) is begin Min_Coeff(t.cf); continue := true; end Min_Term; procedure Min_Poly1 is new Changing_Iterator (process => Min_Term); begin Min_Poly1(p); end Min_Poly; procedure Mult_Coeff ( p : in out Poly; a : in coefftp ) is procedure Mult_Term ( t : in out Term; continue : out boolean ) is begin Mult_Coeff(t.cf,a); continue := true; end Mult_Term; procedure Mult_Coeff1 is new Changing_Iterator (process => Mult_Term); begin Mult_Coeff1(p); end Mult_Coeff; procedure Mult_Term ( p : in out Poly; t : in Term ) is procedure Mult_Term ( tp : in out Term; continue : out boolean ) is begin Natural_Vectors.Plus_Vector(Link_to_Vector(tp.dg),Link_to_Vector(t.dg)); Mult_Coeff(tp.cf,t.cf); continue := true; end Mult_Term; procedure Mult_Terms is new Changing_Iterator (process => Mult_Term); begin Mult_Terms(p); end Mult_Term; procedure Mult_Poly ( p : in out Poly; q : in Poly ) is res : Poly; l : Poly_Rep; t : Term; begin if (q = Null_Poly) or else Is_Null(q.all) then Clear(p); else l := q.all; res := Null_Poly; while not Is_Null(l) loop t := Head_Of(l); declare temp : Poly; begin temp := p * t; Plus_Poly(res,temp); Clear(temp); end; l := Tail_Of(l); end loop; Copy(res,p); Clear(res); end if; end Mult_Poly; function Eval ( p : Poly; x : coefftp; i : integer ) return Poly is res : Poly := Null_Poly; procedure Eval_Term ( t : in Term; cont : out boolean ) is nt : Term; begin copy(t.cf,nt.cf); nt.dg := new Natural_Vectors.Vector(t.dg'first..t.dg'last-1); for j in t.dg'range loop if j < i then nt.dg(j) := t.dg(j); elsif j > i then nt.dg(j-1) := t.dg(j); else for k in 1..t.dg(i) loop mult_coeff(nt.cf,x); end loop; end if; end loop; Plus_Term(res,nt); cont := true; end Eval_Term; procedure Eval_Terms is new Visiting_Iterator(Eval_Term); begin Eval_Terms(p); return res; end Eval; function Eval ( d : Degrees; c : coefftp; x : Vector_of_coefftp ) return coefftp is res : coefftp; begin copy(c,res); for i in d'range loop for j in 1..d(i) loop mult_coeff(res,x(i)); end loop; end loop; return res; end Eval; function Eval ( t : Term; x : Vector_of_coefftp ) return coefftp is begin return Eval(t.dg,t.cf,x); end Eval; function Eval ( t : Term; c : coefftp; x : Vector_of_coefftp ) return coefftp is begin return Eval(t.dg,c,x); end Eval; function Eval ( p : Poly; x : Vector_of_coefftp ) return coefftp is res : coefftp := zero; procedure Eval_Term ( t : in Term; cont : out boolean ) is begin plus_coeff(res,Eval(t,x)); cont := true; end Eval_Term; procedure Eval_Terms is new Visiting_Iterator(Eval_Term); begin Eval_Terms(p); return res; end Eval; function Eval ( p : Poly; c,x : Vector_of_coefftp ) return coefftp is res : coefftp := zero; cnt : natural := 0; procedure Eval_Term ( t : in Term; cont : out boolean ) is begin cnt := cnt + 1; plus_coeff(res,Eval(t,c(cnt),x)); cont := true; end Eval_Term; procedure Eval_Terms is new Visiting_Iterator(Eval_Term); begin Eval_Terms(p); return res; end Eval; function Eval ( vp : Eval_Poly_Rep; x : Vector_of_coefftp; i : integer ) return coefftp; function Eval ( vprec : Poly_Rec; x : Vector_of_coefftp; i : integer ) return coefftp is res : coefftp; begin if vprec.k = number then copy(vprec.c,res); return res; else return Eval(vprec.p.all,x,i); end if; end Eval; function Eval ( vp : Eval_Poly_Rep; x : Vector_of_coefftp; i : integer ) return coefftp is deg : natural := vp'length-1; res : coefftp; begin if deg = 0 then return Eval(vp(0),x,i+1); else res := Eval(vp(deg),x,i+1); for j in reverse 0..(deg-1) loop Mult_Coeff(res,x(i)); if (vp(j).k = number) or (vp(j).p /= null) then declare temp : coefftp := Eval(vp(j),x,i+1); begin Plus_Coeff(res,temp); clear(temp); end; end if; end loop; return res; end if; end Eval; function Eval ( p : Eval_Poly; x : Vector_of_coefftp ) return coefftp is begin if p = null then return zero; else return Eval(p.all,x,x'first); end if; end Eval; function Eval ( vp : Eval_Coeff_Poly_Rep; c,x : Vector_of_coefftp; i : integer ) return coefftp; function Eval ( vprec : Coeff_Poly_Rec; c,x : Vector_of_coefftp; i : integer ) return coefftp is res : coefftp; begin if vprec.k = number then copy(c(vprec.c),res); return res; else return Eval(vprec.p.all,c,x,i); end if; end Eval; function Eval ( vp : Eval_Coeff_Poly_Rep; c,x : Vector_of_coefftp; i : integer ) return coefftp is deg : natural := vp'length-1; res : coefftp; begin if deg = 0 then return Eval(vp(0),c,x,i+1); else res := Eval(vp(deg),c,x,i+1); for j in reverse 0..(deg-1) loop Mult_Coeff(res,x(i)); if (vp(j).k = number) or (vp(j).p /= null) then declare temp : coefftp := Eval(vp(j),c,x,i+1); begin Plus_Coeff(res,temp); clear(temp); end; end if; end loop; return res; end if; end Eval; function Eval ( p : Eval_Coeff_Poly; c,x : Vector_of_coefftp ) return coefftp is begin if p = null then return zero; else return Eval(p.all,c,x,x'first); end if; end Eval; procedure Diff ( p : in out Poly; i : in integer ) is procedure Diff_Term ( t : in out Term; continue : out boolean ) is temp : coefftp; index : integer := t.dg'first + i - 1; begin if t.dg(index) = 0 then Clear(t); t.cf := zero; else temp := convert(t.dg(index)); Mult_Coeff(t.cf,temp); t.dg(index) := t.dg(index) - 1; end if; continue := true; end Diff_Term; procedure Diff_Terms is new Changing_Iterator( process => Diff_Term ); begin Diff_Terms(p); end Diff; function Diff ( p : Poly; i : integer ) return Poly is temp : Poly; begin Copy(p,temp); Diff(temp,i); return temp; end Diff; procedure Diff ( p : in Poly; i : in integer; cp : out Eval_Coeff_Poly; m : out Vector_of_coefftp ) is nb : constant natural := Number_of_Terms(p); n : constant natural := Number_of_Unknowns(p); ind,cnt : integer; dp : Poly := Null_Poly; procedure Diff_Term ( t : in Term; cont : out boolean ) is dt : Term; begin cnt := cnt + 1; if t.dg(i) > 0 then dt.cf := convert(cnt); dt.dg := new Natural_Vectors.Vector'(t.dg.all); m(cnt) := convert(t.dg(i)); dt.dg(i) := dt.dg(i) - 1; Plus_Term(dp,dt); Clear(dt); else m(cnt) := convert(0); end if; cont := true; end Diff_Term; procedure Diff_Terms is new Visiting_Iterator(Diff_Term); begin cnt := 0; Diff_Terms(p); if dp /= null then ind := Head_Of(dp.all).dg'first; cp := Create(dp,n,nb,Degree(dp,ind)); end if; end Diff; -- ITERATORS : procedure Visiting_Iterator ( p : in Poly ) is l : Poly_Rep; temp : Term; continue : boolean; begin if p /= Null_Poly then l := p.all; while not Is_Null(l) loop temp := Head_Of(l); process(temp,continue); exit when not continue; l := Tail_Of(l); end loop; end if; end Visiting_Iterator; procedure Changing_Iterator ( p : in out Poly ) is q,lq,lp : Poly_Rep; t : Term; continue : boolean := true; procedure copy_append is temp : Term; begin Copy(t,temp); if continue then process(temp,continue); end if; if temp.cf /= zero then Append(q,lq,temp); else Clear(temp); end if; Clear(t); end copy_append; begin if p = Null_Poly then return; else lp := p.all; while not Is_Null(lp) loop t := Head_Of(lp); copy_append; lp := Tail_Of(lp); end loop; Term_List.Clear(Term_List.List(p.all)); free(p); if Is_Null(q) then p := Null_Poly; else p := new Poly_Rep'(q); end if; Shuffle(p); -- ensure the second representation invariant end if; end Changing_Iterator; -- DESTRUCTORS : procedure Clear ( t : in out Term ) is begin Natural_Vectors.Clear(Link_to_Vector(t.dg)); clear(t.cf); end Clear; procedure Clear ( p : in out Poly_Rep ) is l : Poly_Rep := p; t : Term; begin if Is_Null(p) then return; else while not Is_Null(l) loop t := Head_Of(l); Clear(t); l := Tail_Of(l); end loop; Term_List.Clear(Term_List.List(p)); end if; end Clear; procedure Clear ( p : in out Poly ) is begin if p /= Null_Poly then Clear(p.all); free(p); p := Null_Poly; end if; end Clear; procedure Clear ( p : in out Eval_Poly ) is begin if p /= null then declare vp : Eval_Poly_Rep renames p.all; begin for i in vp'range loop if vp(i).k = number then clear(vp(i).c); else Clear(vp(i).p); end if; end loop; end; free(p); end if; end Clear; procedure Clear ( p : in out Eval_Coeff_Poly ) is begin if p /= null then declare vp : Eval_Coeff_Poly_Rep renames p.all; begin for i in vp'range loop if vp(i).k /= number then Clear(vp(i).p); end if; end loop; end; free(p); end if; end Clear; end Multivariate_Polynomials; SHAR_EOF fi # end of overwriting check if test -f 'multivariate_polynomials.ads' then echo shar: will not over-write existing file "'multivariate_polynomials.ads'" else cat << "SHAR_EOF" > 'multivariate_polynomials.ads' with Vectors,Natural_Vectors; use Natural_Vectors; generic type coefftp is private; -- type of the coefficients of the polynomials type Vector_of_coefftp is array ( integer range <> ) of coefftp; zero : coefftp; -- the neutral element for "+" with procedure clear ( a : in out coefftp ); with procedure copy ( a : in coefftp; b : in out coefftp ); with function equal ( a,b : coefftp ) return boolean; with function "+" ( a,b : coefftp ) return coefftp; -- return a+b; with function "-" ( a : coefftp ) return coefftp; -- return -a; with function "-" ( a,b : coefftp ) return coefftp; -- return a-b; with function "*" ( a,b : coefftp ) return coefftp; -- return a*b; with function convert ( n : natural ) return coefftp; -- return coefftp(n); with procedure Plus_Coeff ( a : in out coefftp; b : in coefftp ); -- a := a+b; with procedure Min_Coeff ( a : in out coefftp); -- a := -a; with procedure Min_Coeff ( a : in out coefftp; b : in coefftp ); -- a := a-b; with procedure Mult_Coeff ( a : in out coefftp; b : in coefftp ); -- a := a*b; with function "<" ( v1,v2 : Link_to_Vector ) return boolean; -- return v1 < v2 with function ">" ( v1,v2 : Link_to_Vector ) return boolean; -- return v1 > v2 package Multivariate_Polynomials is -- DESCRIPTION : -- This package provides a data abstraction for multivariate polynomials, -- with coefficients over any ring, to be specified by instantiation. -- Also the term ordening is determined by the generic parameters. -- Two special data structures are provided for efficient evaluation. -- Garbage collection is provided. Therefore operations like clear, -- equal and copy must be supplied when instantiating this package. -- DATA STRUCTURES : type Degrees is new Natural_Vectors.Link_to_Vector; type Term is record cf : coefftp; -- coefficient of the term dg : Degrees; -- the degrees of the term end record; type Poly is private; type Eval_Poly is private; type Eval_Coeff_Poly is private; Null_Poly : constant Poly; -- CONSTRUCTORS : function Create ( t : Term ) return Poly; function Create ( p : Poly ) return Eval_Poly; function Create ( p : Poly ) return Eval_Coeff_Poly; procedure Copy ( t1 : in Term; t2 : in out Term ); -- makes a deep copy procedure Copy ( p: in Poly; q : in out Poly ); -- SELECTORS : function Equal ( t1,t2 : Term ) return boolean; function Equal ( p,q : Poly ) return boolean; function Number_of_Unknowns ( p : Poly ) return natural; function Number_of_Terms ( p : Poly ) return natural; function Degree ( p : Poly ) return integer; -- return deg(p); function Degree ( p : Poly; i : integer ) return integer; -- return deg(p,xi); function "<" ( d1,d2 : Degrees ) return boolean; -- return d1 < d2 function ">" ( d1,d2 : Degrees ) return boolean; -- return d1 > d2 function Coeff ( p : Poly; d : Degrees ) return coefftp; -- Ex.: Coeff(c1*x^2+c2*x*y^3,(1 2))=c2; Coeff(c1*x^2+c2,(1 0))=zero; function Coeff ( p : Poly ) return Vector_of_coefftp; -- returns the vector of coefficients, starting with highest degree -- ARITHMETICAL OPERATIONS : function "+" ( p : Poly; t : Term ) return Poly; -- return p+t; function "+" ( t : Term; p : Poly ) return Poly; -- return t+p; function "+" ( p,q : Poly ) return Poly; -- return p+q; function "-" ( p : Poly; t : Term ) return Poly; -- return p-t; function "-" ( t : Term; p : Poly ) return Poly; -- return t-p; function "-" ( p : Poly ) return Poly; -- return -p; function "-" ( p,q : Poly ) return Poly; -- return p-q; function "*" ( p : Poly; a : coefftp ) return Poly; -- return a*p; function "*" ( a : coefftp; p : Poly ) return Poly; -- return p*a; function "*" ( p : Poly; t : Term ) return Poly; -- return p*t; function "*" ( t : Term; p : Poly ) return Poly; -- return t*p; function "*" ( p,q : Poly ) return Poly; -- return p*q; procedure Plus_Term ( p : in out Poly; t : in Term ); -- p := p + t; procedure Plus_Poly ( p : in out Poly; q : in Poly ); -- p := p + q; procedure Min_Term ( p : in out Poly; t : in Term ); -- p := p - t; procedure Min_Poly ( p : in out Poly ); -- p := -p; procedure Min_Poly ( p : in out Poly; q : in Poly ); -- p := p - q; procedure Mult_Coeff( p : in out Poly; a : in coefftp ); -- p := p * a; procedure Mult_Term ( p : in out Poly; t : in Term ); -- p := p * t; procedure Mult_Poly ( p : in out Poly; q : in Poly ); -- p := p * q; function Eval ( p : Poly; x : coefftp; i : integer ) return Poly; -- return p(x1,..,xi=x,..,xn); -- Number_of_Unknowns(Eval(p,x,i)) = Number_of_Unknowns(p)-1 function Eval ( d : Degrees; c : coefftp; x : Vector_of_coefftp ) return coefftp; -- return c*x**d function Eval ( t : Term; c : coefftp; x : Vector_of_coefftp ) return coefftp; -- return c*x**d, with d = t.dg function Eval ( t : Term; x : Vector_of_coefftp ) return coefftp; function Eval ( p : Poly; x : Vector_of_coefftp ) return coefftp; -- return p(x); function Eval ( p : Poly; c,x : Vector_of_coefftp ) return coefftp; -- return p(c,x), with c = vector of coefficients for p function Eval ( p : Eval_Poly; x : Vector_of_coefftp ) return coefftp; -- return p(x); function Eval ( p : Eval_Coeff_Poly; c,x : Vector_of_coefftp ) return coefftp; -- return p(c,x), with c = vector of coefficients for p function Diff ( p : Poly; i : integer ) return Poly; procedure Diff ( p : in out Poly; i : in integer ); -- symbolic differentiation w.r.t. the i-th unknown of p procedure Diff ( p : in Poly; i : in integer; cp : out Eval_Coeff_Poly; m : out Vector_of_coefftp ); -- evaluable coefficient polynomial of the partial derivative, -- with m the multiplication factors of the coefficients of p -- ITERATORS : run through all terms of p and apply the generic procedure. generic with procedure process ( t : in out Term; continue : out boolean ); procedure Changing_Iterator ( p : in out Poly ); -- t can be changed generic with procedure process ( t : in Term; continue : out boolean ); procedure Visiting_Iterator ( p : in Poly ); -- t can only be read -- DESTRUCTORS : deallocate memory. procedure Clear ( t : in out Term ); procedure Clear ( p : in out Poly ); procedure Clear ( p : in out Eval_Poly ); procedure Clear ( p : in out Eval_Coeff_Poly ); private type Poly_Rep; type Eval_Poly_Rep; type Eval_Coeff_Poly_Rep; type Poly is access Poly_Rep; type Eval_Poly is access Eval_Poly_Rep; type Eval_Coeff_Poly is access Eval_Coeff_Poly_Rep; Null_Poly : constant Poly := null; end Multivariate_Polynomials; SHAR_EOF fi # end of overwriting check if test -f 'natural_graded_lexicographical_ordening.adb' then echo shar: will not over-write existing file "'natural_graded_lexicographical_ordening.adb'" else cat << "SHAR_EOF" > 'natural_graded_lexicographical_ordening.adb' package body Natural_Graded_Lexicographical_Ordening is function "<" ( v1,v2 : Vector ) return boolean is s1,s2 : natural; begin s1 := Sum(v1); s2 := Sum(v2); if s1 < s2 then return true; elsif s1 > s2 then return false; else if v1'first /= v2'first or else v1'last /= v2'last then raise Range_Error; else for i in v1'range loop if v1(i) < v2(i) then return true; elsif v1(i) > v2(i) then return false; end if; end loop; return false; -- v1 = v2 end if; end if; end "<"; function "<" ( v1,v2 : Link_to_Vector ) return boolean is begin if v2 = null then return false; elsif v1 = null then if Sum(v2) > 0 then return true; else return false; end if; else return v1.all < v2.all; end if; end "<"; function ">" ( v1,v2 : Vector ) return boolean is s1,s2 : natural; begin s1 := Sum(v1); s2 := Sum(v2); if s1 < s2 then return false; elsif s1 > s2 then return true; else if v1'first /= v2'first or else v1'last /= v2'last then raise Range_Error; else for i in v1'range loop if v1(i) < v2(i) then return false; elsif v1(i) > v2(i) then return true; end if; end loop; return false; -- v1 = v2 end if; end if; end ">"; function ">" ( v1,v2 : Link_to_Vector ) return boolean is begin if v1 = null then return false; elsif v2 = null then if Sum(v1) > 0 then return true; else return false; end if; else return v1.all > v2.all; end if; end ">"; end Natural_Graded_Lexicographical_Ordening; SHAR_EOF fi # end of overwriting check if test -f 'natural_graded_lexicographical_ordening.ads' then echo shar: will not over-write existing file "'natural_graded_lexicographical_ordening.ads'" else cat << "SHAR_EOF" > 'natural_graded_lexicographical_ordening.ads' with Natural_Vectors; use Natural_Vectors; package Natural_Graded_Lexicographical_Ordening is -- DESCRIPTION : -- This package provides a graded lexicographical ordening. function "<" ( v1,v2 : Vector ) return boolean; -- return v1 < v2 function "<" ( v1,v2 : Link_to_Vector ) return boolean; function ">" ( v1,v2 : Vector ) return boolean; -- return v1 > v2 function ">" ( v1,v2 : Link_to_Vector ) return boolean; end Natural_Graded_Lexicographical_Ordening; SHAR_EOF fi # end of overwriting check if test -f 'polynomial_randomizers.adb' then echo shar: will not over-write existing file "'polynomial_randomizers.adb'" else cat << "SHAR_EOF" > 'polynomial_randomizers.adb' with Random_Number_Generators; with Complex_Numbers,Natural_Vectors; use Complex_Numbers; with Float_Matrices,Complex_Matrices; package body Polynomial_Randomizers is function Real_Randomize ( p : Poly ) return Poly is res : Poly := Null_Poly; procedure Randomize_Term ( t : in Term; cont : out boolean ) is rt : Term; begin rt.cf := CMPLX(Random_Number_Generators.Random); rt.dg := new Natural_Vectors.Vector'(t.dg.all); Plus_Term(res,rt); Clear(rt); cont := true; end Randomize_Term; procedure Randomize_Terms is new Visiting_Iterator (Randomize_Term); begin Randomize_Terms(p); return res; end Real_Randomize; function Complex_Randomize ( p : Poly ) return Poly is res : Poly := Null_Poly; procedure Randomize_Term ( t : in Term; cont : out boolean ) is rt : Term; begin rt.cf := Random_Number_Generators.Random; rt.dg := new Natural_Vectors.Vector'(t.dg.all); Plus_Term(res,rt); Clear(rt); cont := true; end Randomize_Term; procedure Randomize_Terms is new Visiting_Iterator (Randomize_Term); begin Randomize_Terms(p); return res; end Complex_Randomize; function Complex_Randomize1 ( p : Poly ) return Poly is res : Poly := Null_Poly; procedure Randomize_Term ( t : in Term; cont : out boolean ) is rt : Term; begin rt.cf := Random_Number_Generators.Random1; rt.dg := new Natural_Vectors.Vector'(t.dg.all); Plus_Term(res,rt); Clear(rt); cont := true; end Randomize_Term; procedure Randomize_Terms is new Visiting_Iterator (Randomize_Term); begin Randomize_Terms(p); return res; end Complex_Randomize1; function Complex_Perturb ( p : Poly ) return Poly is res : Poly := Null_Poly; procedure Perturb_Term ( t : in Term; cont : out boolean ) is rt : Term; begin rt.cf := t.cf + Random_Number_Generators.Random1; rt.dg := new Natural_Vectors.Vector'(t.dg.all); Plus_Term(res,rt); Clear(rt); cont := true; end Perturb_Term; procedure Perturb_Terms is new Visiting_Iterator (Perturb_Term); begin Perturb_Terms(p); return res; end Complex_Perturb; function Real_Randomize ( p : Poly_Sys ) return Poly_Sys is res : Poly_Sys(p'range); begin for i in res'range loop res(i) := Real_Randomize(p(i)); end loop; return res; end Real_Randomize; function Complex_Randomize ( p : Poly_Sys ) return Poly_Sys is res : Poly_Sys(p'range); begin for i in res'range loop res(i) := Complex_Randomize(p(i)); end loop; return res; end Complex_Randomize; function Complex_Randomize1 ( p : Poly_Sys ) return Poly_Sys is res : Poly_Sys(p'range); begin for i in res'range loop res(i) := Complex_Randomize1(p(i)); end loop; return res; end Complex_Randomize1; function Complex_Perturb ( p : Poly_Sys ) return Poly_Sys is res : Poly_Sys(p'range); begin for i in res'range loop res(i) := Complex_Perturb(p(i)); end loop; return res; end Complex_Perturb; function Real_Random_Matrix ( n : natural ) return Float_Matrices.matrix is -- DESCRIPTION : -- Generates a dense n*n matrix with randomly generated floating -- point numbers. res : Float_Matrices.matrix(1..n,1..n); begin for i in res'range(1) loop for j in res'range(2) loop res(i,j) := Random_Number_Generators.Random; end loop; end loop; return res; end Real_Random_Matrix; function Complex_Random_Matrix ( n : natural ) return Complex_Matrices.matrix is -- DESCRIPTION : -- Generates a dense n*n matrix with randomly generated complex numbers. res : Complex_Matrices.matrix(1..n,1..n); begin for i in res'range(1) loop for j in res'range(2) loop res(i,j) := Random_Number_Generators.Random; end loop; end loop; return res; end Complex_Random_Matrix; function Complex_Random_Matrix1 ( n : natural ) return Complex_Matrices.matrix is -- DESCRIPTION : -- Generates a dense n*n matrix with randomly generated complex -- number with modulus 1. res : Complex_Matrices.matrix(1..n,1..n); begin for i in res'range(1) loop for j in res'range(2) loop res(i,j) := Random_Number_Generators.Random1; end loop; end loop; return res; end Complex_Random_Matrix1; function Multiply ( m : Float_Matrices.matrix; p : Poly_Sys ) return Poly_Sys is res : Poly_Sys(p'range); begin for i in res'range loop res(i) := Null_Poly; for j in p'range loop Plus_Poly(res(i),CMPLX(m(i,j))*p(j)); end loop; end loop; return res; end Multiply; function Multiply ( m : Complex_Matrices.matrix; p : Poly_Sys ) return Poly_Sys is res : Poly_Sys(p'range); begin for i in res'range loop res(i) := Null_Poly; for j in p'range loop Plus_Poly(res(i),m(i,j)*p(j)); end loop; end loop; return res; end Multiply; function Randomize_with_Real_Matrix ( p : Poly_Sys ) return Poly_Sys is n : constant natural := p'length; mat : Float_Matrices.matrix(1..n,1..n) := Real_Random_Matrix(n); res : Poly_Sys(p'range) := Multiply(mat,p); begin return res; end Randomize_with_Real_Matrix; function Randomize_with_Complex_Matrix ( p : Poly_Sys ) return Poly_Sys is n : constant natural := p'length; mat : Complex_Matrices.matrix(1..n,1..n) := Complex_Random_Matrix(n); res : Poly_Sys(p'range) := Multiply(mat,p); begin return res; end Randomize_with_Complex_Matrix; function Randomize_with_Complex_Matrix1 ( p : Poly_Sys ) return Poly_Sys is n : constant natural := p'length; mat : Complex_Matrices.matrix(1..n,1..n) := Complex_Random_Matrix1(n); res : Poly_Sys(p'range) := Multiply(mat,p); begin return res; end Randomize_with_Complex_Matrix1; end Polynomial_Randomizers; SHAR_EOF fi # end of overwriting check if test -f 'polynomial_randomizers.ads' then echo shar: will not over-write existing file "'polynomial_randomizers.ads'" else cat << "SHAR_EOF" > 'polynomial_randomizers.ads' with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; package Polynomial_Randomizers is -- DESCRIPTION : -- This package offers routines for randomizing and perturbing -- the coefficients of polynomials. -- Except for the last three functions, the monomial structure -- remains the same, only random (real or complex) coefficients -- will replace the existing ones. function Real_Randomize ( p : Poly ) return Poly; function Real_Randomize ( p : Poly_Sys ) return Poly_Sys; -- DESCRIPTION : -- Generates random real coefficients in [-1.0,1.0]. function Complex_Randomize ( p : Poly ) return Poly; function Complex_Randomize ( p : Poly_Sys ) return Poly_Sys; -- DESCRIPTION : -- The real and imaginary part of the randomly generated -- coefficients are in [-1.0,1.0] function Complex_Randomize1 ( p : Poly ) return Poly; function Complex_Randomize1 ( p : Poly_Sys ) return Poly_Sys; -- DESCRIPTION : -- Generates random complex coefficients with modulus one. function Complex_Perturb ( p : Poly ) return Poly; function Complex_Perturb ( p : Poly_Sys ) return Poly_Sys; -- DESCRIPTION : -- The coefficients of the polynomial system will be -- perturbed by adding random complex coefficients with modulus one. function Randomize_with_Real_Matrix ( p : Poly_Sys ) return Poly_Sys; function Randomize_with_Complex_Matrix ( p : Poly_Sys ) return Poly_Sys; function Randomize_with_Complex_Matrix1 ( p : Poly_Sys ) return Poly_Sys; -- DESCRIPTION : -- First a dense matrix with randomly generated (real, complex or -- complex with modulus 1) coefficients will be constructed. -- This matrix will then be used for multiplication with p. -- Note that the solution set of the resulting polynomial system -- remains unchanged. end Polynomial_Randomizers; SHAR_EOF fi # end of overwriting check if test -f 'polynomial_to_laurent_converters.adb' then echo shar: will not over-write existing file "'polynomial_to_laurent_converters.adb'" else cat << "SHAR_EOF" > 'polynomial_to_laurent_converters.adb' with Integer_Vectors; with Complex_Numbers; use Complex_Numbers; package body Polynomial_to_Laurent_Converters is function Polynomial_to_Laurent_Polynomial ( p : Complex_Multivariate_Polynomials.Poly ) return Complex_Multivariate_Laurent_Polynomials.Poly is res : Complex_Multivariate_Laurent_Polynomials.Poly := Complex_Multivariate_Laurent_Polynomials.Null_Poly; use Complex_Multivariate_Polynomials; procedure Term_to_Laurent_Term ( t : in Term; cont : out boolean ) is rt : Complex_Multivariate_Laurent_Polynomials.Term; begin rt.cf := t.cf; rt.dg := new Integer_Vectors.Vector(t.dg'range); for i in t.dg'range loop rt.dg(i) := t.dg(i); end loop; Complex_Multivariate_Laurent_Polynomials.Plus_Term(res,rt); Complex_Multivariate_Laurent_Polynomials.Clear(rt); cont := true; end Term_to_Laurent_Term; procedure P2LP is new Visiting_Iterator(Term_to_Laurent_Term); begin P2LP(p); return res; end Polynomial_to_Laurent_Polynomial; function Polynomial_to_Laurent_System ( p : Poly_Sys ) return Laur_Sys is res : Laur_Sys(p'range); begin for i in p'range loop res(i) := Polynomial_to_Laurent_Polynomial(p(i)); end loop; return res; end Polynomial_to_Laurent_System; end Polynomial_to_Laurent_Converters; SHAR_EOF fi # end of overwriting check if test -f 'polynomial_to_laurent_converters.ads' then echo shar: will not over-write existing file "'polynomial_to_laurent_converters.ads'" else cat << "SHAR_EOF" > 'polynomial_to_laurent_converters.ads' with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Laurent_Polynomial_Systems; use Complex_Laurent_Polynomial_Systems; with Complex_Multivariate_Polynomials; with Complex_Multivariate_Laurent_Polynomials; package Polynomial_to_Laurent_Converters is -- DESCRIPTION : -- This package contains routines for converting ordinary polynomials -- into Laurent polynomials. function Polynomial_to_Laurent_Polynomial ( p : Complex_Multivariate_Polynomials.Poly ) return Complex_Multivariate_Laurent_Polynomials.Poly; -- DESCRIPTION : -- Transforms a polynomial into a Laurent polynomial. function Polynomial_to_Laurent_System ( p : Poly_Sys ) return Laur_Sys; -- DESCRIPTION : -- Transforms a polynomial system into a Laurent polynomial system. end Polynomial_to_Laurent_Converters; SHAR_EOF fi # end of overwriting check if test -f 'substitutors.adb' then echo shar: will not over-write existing file "'substitutors.adb'" else cat << "SHAR_EOF" > 'substitutors.adb' with Floating_Point_Numbers; use Floating_Point_Numbers; with Natural_Vectors; package body Substitutors is function Substitute ( k : integer; c : double_complex; t : Term ) return Term is res : Term; begin res.cf := t.cf; for l in 1..t.dg(k) loop res.cf := res.cf*c; end loop; res.dg := new Natural_Vectors.Vector(t.dg'first..t.dg'last-1); for l in t.dg'range loop if l < k then res.dg(l) := t.dg(l); elsif l > k then res.dg(l-1) := t.dg(l); end if; end loop; return res; end Substitute; function Substitute ( k : integer; c : double_complex; p : Poly ) return Poly is res : Poly; procedure Substitute_Term ( t : in Term; cont : out boolean ) is st : Term := Substitute(k,c,t); begin Plus_Term(res,st); Clear(st); cont := true; end Substitute_Term; procedure Substitute_Terms is new Visiting_Iterator (Substitute_Term); begin Substitute_Terms(p); return res; end Substitute; function Substitute ( k : integer; c : double_complex; p : Poly_Sys ) return Poly_Sys is res : Poly_Sys(p'range); begin for l in res'range loop res(l) := Substitute(k,c,p(l)); end loop; return res; end Substitute; procedure Substitute ( k : in integer; c : in double_complex; t : in out Term ) is tmp : Natural_Vectors.Vector(t.dg'first..t.dg'last-1); begin for l in 1..t.dg(k) loop t.cf := t.cf*c; end loop; for l in t.dg'range loop if l < k then tmp(l) := t.dg(l); elsif l > k then tmp(l-1) := t.dg(l); end if; end loop; Clear(t); t.dg := new Natural_Vectors.Vector'(tmp); end Substitute; -- procedure Shuffle ( p : in out Poly ) is -- -- -- DESCRIPTION : -- -- Changes the position of the terms in p back to the normal order. -- -- res : Poly := Null_Poly; -- -- procedure Shuffle_Term ( t : in Term; cont : out boolean ) is -- begin -- Plus_Term(res,t); -- cont := true; -- end Shuffle_Term; -- procedure Shuffle_Terms is new Visiting_Iterator(Shuffle_Term); -- -- begin -- Shuffle_Terms(p); -- Clear(p); Copy(res,p); Clear(res); -- end Shuffle; procedure Substitute ( k : in integer; c : in double_complex; p : in out Poly ) is -- NOTE : -- An obvious thing to do would be to visit and change all terms, -- and leaving the term order unchanged. -- However, the terms in the resulting polynomial must be ordered -- according to the term order with which the package has been -- instantiated. Therefore the procedure Shuffle is called. procedure Substitute_Term ( t : in out Term; cont : out boolean ) is begin Substitute(k,c,t); cont := true; end Substitute_Term; procedure Substitute_Terms is new Changing_Iterator ( Substitute_Term ); begin Substitute_Terms(p); -- Shuffle(p); end Substitute; procedure Substitute ( k : in integer; c : in double_complex; p : in out Poly_Sys ) is begin for l in p'range loop Substitute(k,c,p(l)); end loop; end Substitute; procedure Purify ( p : in out Poly; tol : in double_float ) is -- DESCRIPTION : -- All terms of which the coefficient are in modulus smaller -- than tol are deleted. procedure Purify_Term (t : in out Term; continue : out boolean) is begin if modulus(t.cf) < tol then t.cf := CMPLX(0.0); end if; continue := true; end Purify_Term; procedure Purify_Terms is new Changing_Iterator(Purify_Term); begin Purify_Terms(p); if Number_Of_Unknowns(p) = 0 then Clear(p); p := Null_Poly; end if; end Purify; function Substitute_Factor ( k : integer; h : Vector ) return Poly is -- DESCRIPTION : -- returns the polynomial which will replace the kth unknown. res : Poly; rt : Term; begin rt.dg := new Natural_Vectors.Vector'((h'first+1)..(h'last-1) => 0); rt.cf := -h(0)/h(k); res := Create(rt); for i in rt.dg'range loop rt.dg(i) := 1; if i < k then rt.cf := -h(i)/h(k); else rt.cf := -h(i+1)/h(k); end if; if modulus(rt.cf) > 10.0**(-10) then Plus_Term(res,rt); end if; rt.dg(i) := 0; end loop; Clear(rt); return res; end Substitute_Factor; function Substitute ( k : integer; h : Vector; p : Poly ) return Poly is res,sub : Poly; begin sub := Substitute_Factor(k,h); res := Substitute(k,sub,p); Clear(sub); return res; end Substitute; function Substitute ( k : integer; s,p : Poly ) return Poly is res : Poly := Null_Poly; procedure Substitute_Term ( t : in Term; continue : out boolean ) is rt : Term; fac : Poly; begin rt.cf := t.cf; rt.dg := new Natural_Vectors.Vector(t.dg'first..(t.dg'last-1)); for i in rt.dg'range loop if i < k then rt.dg(i) := t.dg(i); else rt.dg(i) := t.dg(i+1); end if; end loop; if t.dg(k) = 0 then Plus_Term(res,rt); else fac := Create(rt); for i in 1..t.dg(k) loop Mult_Poly(fac,s); end loop; Purify(fac,10.0**(-10)); Plus_Poly(res,fac); Clear(fac); end if; Clear(rt); continue := true; end Substitute_Term; procedure Substitute_Terms is new Visiting_Iterator (Substitute_Term); begin Substitute_Terms(p); return res; end Substitute; procedure Substitute ( k : in integer; h : in Vector; p : in out Poly ) is res : Poly; begin res := Substitute(k,h,p); Clear(p); Copy(res,p); Clear(res); end Substitute; procedure Substitute ( k : in integer; s : in Poly; p : in out Poly ) is res : Poly; begin res := Substitute(k,s,p); Clear(p); Copy(res,p); Clear(res); end Substitute; function Substitute ( k : integer; h : Vector; p : Poly_Sys ) return Poly_Sys is res : Poly_Sys(p'range); s : Poly := Substitute_Factor(k,h); begin res := Substitute(k,s,p); Clear(s); return res; end Substitute; procedure Substitute ( k : in integer; h : in Vector; p : in out Poly_Sys ) is s : Poly := Substitute_Factor(k,h); begin Substitute(k,s,p); Clear(s); end Substitute; function Substitute ( k : integer; s : Poly; p : Poly_Sys ) return Poly_Sys is res : Poly_Sys(p'range); begin for i in p'range loop res(i) := Substitute(k,s,p(i)); end loop; return res; end Substitute; procedure Substitute ( k : in integer; s : in Poly; p : in out Poly_Sys ) is begin for i in p'range loop Substitute(k,s,p(i)); end loop; end Substitute; end Substitutors; SHAR_EOF fi # end of overwriting check if test -f 'substitutors.ads' then echo shar: will not over-write existing file "'substitutors.ads'" else cat << "SHAR_EOF" > 'substitutors.ads' with Complex_Numbers,Complex_Vectors; use Complex_Numbers,Complex_Vectors; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; package Substitutors is -- DESCRIPTION : -- This package contains routines for substituting -- equations into polynomials and polynomial systems. function Substitute ( k : integer; c : double_complex; t : Term ) return Term; procedure Substitute ( k : in integer; c : in double_complex; t : in out Term ); function Substitute ( k : integer; c : double_complex; p : Poly ) return Poly; procedure Substitute ( k : in integer; c : in double_complex; p : in out Poly ); function Substitute ( k : integer; c : double_complex; p : Poly_Sys ) return Poly_Sys; procedure Substitute ( k : in integer; c : in double_complex; p : in out Poly_Sys ); -- DESCRIPTION : -- These routines substitute the kth unknown of the term t or -- polynomial (system) p by a complex constant c. -- ON ENTRY : -- k an unknown in the polynomial p; -- c a complex constant; -- t a term; -- p a polynomial (system). -- ON RETURN : -- t a term where the kth unknonw has been replaced by the -- complex constant c; -- p a polynomial (system) where the kth unknown has been -- replaced by the complex constant c. function Substitute ( k : integer; h : Vector; p : Poly ) return Poly; procedure Substitute ( k : in integer; h : in Vector; p : in out Poly ); -- DESCRIPTION : -- These routines substitute the kth unknown of the polynomial p -- by a linear equation defined by h. -- ON ENTRY : -- k an unknown in the polynomial p; -- h a vector h(0..n), n = Number_of_Unknowns(p), -- defines h(0) + h(1)*x1 + ... + h(n)*xn; -- p a polynomial. -- REQUIRED : h(k) /= 0. -- ON RETURN : -- p a polynomial where the kth unknown has been replaced -- by a linear equation defined by h. function Substitute ( k : integer; s,p : Poly ) return Poly; procedure Substitute ( k : in integer; s : in Poly; p : in out Poly ); -- DESCRIPTION : -- These routines substitute the kth unknown of the polynomial p -- by a polynomial s. -- ON ENTRY : -- k an unknown in the polynomial p; -- s a polynomial so that xk = s; -- p a polynomial. -- ON RETURN : -- p a polynomial where the kth unknown has been replaced -- by the polynomial s. function Substitute ( k : integer; h : Vector; p : Poly_Sys ) return Poly_Sys; procedure Substitute ( k : in integer; h : in Vector; p : in out Poly_Sys ); -- DESCRIPTION : -- These routines substitute the kth unknown of the polynomials in the -- system p by a linear equation defined by h. -- ON ENTRY : -- k an unknown in the polynomials in the system p; -- h a vector h(0..n), n = Number_of_Unknowns(p(i)), -- defines h(0) + h(1)*x1 + ... + h(n)*xn; -- p a polynomial system. -- REQUIRED : h(k) /= 0 -- ON RETURN : -- p a polynomial system where the kth unknown has been replaced -- by a linear equation defined by h. function Substitute ( k : integer; s : Poly; p : Poly_Sys ) return Poly_Sys; procedure Substitute ( k : in integer; s : in Poly; p : in out Poly_Sys ); -- DESCRIPTION : -- These routines substitute the kth unknown of the polynomials in p -- by a polynomial s. -- ON ENTRY : -- k an unknown in the polynomial p; -- s a polynomial so that xk = s; -- p a polynomial. -- ON RETURN : -- p a polynomial system where the kth unknown has been replaced -- by the polynomial s. end Substitutors; SHAR_EOF fi # end of overwriting check if test -f 'symbol_table.adb' then echo shar: will not over-write existing file "'symbol_table.adb'" else cat << "SHAR_EOF" > 'symbol_table.adb' with unchecked_deallocation; package body Symbol_Table is -- INTERNAL DATA : type Symbol_Array is array(positive range <>) of Symbol; type Symbol_Table ( max : natural ) is record number : natural; -- number of symbols that are not blank syms : Symbol_Array(1..max); end record; type Link_to_Symbol_Table is access Symbol_Table; st : Link_to_Symbol_Table; -- CREATORS : procedure Init ( max : in natural ) is begin st := new Symbol_Table(max); st.all.number := 0; end Init; procedure Enlarge ( max : in natural ) is begin if Empty then Init(max); else declare oldst : Symbol_Array(1..st.number); maxst : constant natural := max + st.max; begin for i in oldst'range loop oldst(i) := st.syms(i); end loop; Clear; Init(maxst); for i in oldst'range loop Add(oldst(i)); end loop; end; end if; end Enlarge; -- CONSTRUCTOR : procedure Add ( sb : in Symbol; pos : out natural ) is tab : symbol_table renames st.all; begin tab.number := tab.number + 1; for i in sb'range loop tab.syms(tab.number)(i) := sb(i); end loop; pos := tab.number; exception when others => raise OVERFLOW_IN_THE_SYMBOL_TABLE; end Add; procedure Add ( sb : in Symbol ) is pos : natural; begin Add(sb,pos); end Add; -- SELECTORS : function "<" ( s1,s2 : Symbol ) return boolean is begin for i in s1'range loop if s1(i) < s2(i) then return true; elsif s1(i) > s2(i) then return false; end if; end loop; return false; end "<"; function ">" ( s1,s2 : Symbol ) return boolean is begin for i in s1'range loop if s1(i) > s2(i) then return true; elsif s1(i) < s2(i) then return false; end if; end loop; return false; end ">"; function Number return natural is begin if st = null then return 0; else return st.all.number; end if; end Number; function Empty return boolean is begin return (st = null); end Empty; function Get ( sb : symbol ) return natural is tab : symbol_table renames st.all; begin for i in 1..tab.number loop if tab.syms(i) = sb then return i; end if; end loop; return 0; end Get; function Get ( i : natural ) return symbol is tab : symbol_table renames st.all; begin if i > tab.number then raise INDEX_OUT_OF_RANGE; else return tab.syms(i); end if; end Get; -- DESTRUCTOR : procedure Clear is procedure free is new unchecked_deallocation (symbol_table,link_to_symbol_table); begin free(st); end Clear; end Symbol_Table; SHAR_EOF fi # end of overwriting check if test -f 'symbol_table.ads' then echo shar: will not over-write existing file "'symbol_table.ads'" else cat << "SHAR_EOF" > 'symbol_table.ads' package Symbol_Table is -- DESCRIPTION : -- This package supplies a data-abstraction to work with a symbol table. -- AUXILIARY DATA STRUCTURES : subtype symbol is string(1..3); -- EXCEPTIONS : OVERFLOW_IN_THE_SYMBOL_TABLE : exception; -- occurs when a new symbol is added to a full symbol table INDEX_OUT_OF_RANGE : exception; -- occurs when a symbol is asked that is not in the range of the table -- CREATORS : procedure Init ( max : in natural ); -- DESCRIPTION : -- A new symbol table is created with place for max symbols. procedure Enlarge ( max : in natural ); -- DESCRIPTION : -- Enlarges the symbol table so that it can contain as many symbols -- as the previous maximum plus the new max. -- CONSTRUCTOR : procedure Add ( sb : in symbol ); procedure Add ( sb : in symbol; pos : out natural ); -- DESCRIPTION : -- A new symbol is added to the symbol table; -- pos is the entry of the added symbol in the table. -- SELECTORS : function "<" ( s1,s2 : Symbol ) return boolean; function ">" ( s1,s2 : Symbol ) return boolean; -- DESCRIPTION : -- Defines an order relation on the symbols. function Number return natural; -- DESCRIPTION : -- Returns the number of current symbols in the table. function Empty return boolean; -- DESCRIPTION : -- Returns true if the symbol table has not been initialized yet, -- or if a Clear has been done. function Get ( sb : symbol ) return natural; -- DESCRIPTION : -- The entry of the symbol in the table is returned. -- If the symbol does not occur in the table, then 0 is returned. function Get ( i : natural ) return symbol; -- DESCRIPTION : -- The symbol corresponding with the ith unknown is returned. -- DESTRUCTOR : procedure Clear; -- DESCRIPTION : -- The allocated memory space is freed. end Symbol_Table; SHAR_EOF fi # end of overwriting check if test -f 'symbol_table_io.adb' then echo shar: will not over-write existing file "'symbol_table_io.adb'" else cat << "SHAR_EOF" > 'symbol_table_io.adb' package body Symbol_Table_io is procedure get ( sb : in out symbol ) is begin Symbol_Table_io.get(Standard_Input,sb); end get; procedure get ( sb : in out symbol; delimiter : in character ) is begin Symbol_Table_io.get(Standard_Input,sb,delimiter); end get; procedure get ( ch : in out character; sb : in out symbol ) is begin Symbol_Table_io.get(Standard_Input,ch,sb); end get; procedure get ( ch : in out character; sb : in out symbol; delimiter : in character ) is begin Symbol_Table_io.get(Standard_Input,ch,sb,delimiter); end get; procedure get ( file : in file_type; sb : in out symbol ) is ch : character; begin text_io.get(file,ch); Symbol_Table_io.get(file,ch,sb); end get; procedure get ( file : in file_type; sb : in out symbol; delimiter : in character ) is ch : character; begin text_io.get(file,ch); Symbol_Table_io.get(file,ch,sb,delimiter); end get; procedure get ( file : in file_type; ch : in out character; sb : in out symbol ) is cnt : natural; begin if ch = ' ' then while ch = ' ' loop text_io.get(file,ch); end loop; if ch /= ' ' then sb(sb'first) := ch; cnt := 2; end if; else sb(sb'first) := ch; cnt := 2; end if; if not End_of_Line(file) then for i in sb'first+1..sb'last loop text_io.get(file,ch); cnt := i; exit when ch = ' '; sb(i) := ch; cnt := i+1; exit when End_of_Line(file); end loop; end if; sb(cnt..sb'last) := (cnt..sb'last => ' '); end get; procedure get ( file : in file_type; ch : in out character; sb : in out symbol; delimiter : in character ) is cnt : natural; begin if ch = ' ' then while ch = ' ' loop text_io.get(file,ch); end loop; if ch /= ' ' then sb(sb'first) := ch; cnt := 2; end if; else sb(sb'first) := ch; cnt := 2; end if; if not End_of_Line(file) then for i in sb'first+1..sb'last loop text_io.get(file,ch); cnt := i; exit when ch = ' ' or else ch = delimiter; sb(i) := ch; cnt := i+1; exit when End_of_Line(file); end loop; end if; sb(cnt..sb'last) := (cnt..sb'last => ' '); end get; procedure put ( sb : in symbol ) is begin for i in sb'range loop exit when sb(i) = ' '; text_io.put(sb(i)); end loop; end put; procedure put ( file : in file_type; sb : in symbol ) is begin for i in sb'range loop exit when sb(i) = ' '; text_io.put(file,sb(i)); end loop; end put; end Symbol_Table_io; SHAR_EOF fi # end of overwriting check if test -f 'symbol_table_io.ads' then echo shar: will not over-write existing file "'symbol_table_io.ads'" else cat << "SHAR_EOF" > 'symbol_table_io.ads' with text_io; use text_io; with Symbol_Table; use Symbol_Table; package Symbol_Table_io is -- DESCRIPTION : -- This package provides i/o operations for symbols. procedure get ( sb : in out symbol ); procedure get ( sb : in out symbol; delimiter : in character ); procedure get ( ch : in out character; sb : in out symbol ); procedure get ( ch : in out character; sb : in out symbol; delimiter : in character ); procedure get ( file : in file_type; sb : in out symbol ); procedure get ( file : in file_type; sb : in out symbol; delimiter : in character ); procedure get ( file : in file_type; ch : in out character; sb : in out symbol ); procedure get ( file : in file_type; ch : in out character; sb : in out symbol; delimiter : in character ); -- DESCRIPTION : -- Reads a symbol from standard input or from file. -- Skips blanks before and after the symbol. -- When a character is given as parameter, it can already -- contain the first character of the symbol. -- Reading stops when either the length of the symbol is reached, -- or when a blank or a delimiter is encountered. procedure put ( sb : in symbol ); procedure put ( file : in file_type; sb : in symbol ); -- DESCRIPTION : -- Writes a symbol on standard output or on file. -- Blanks after the symbol are not written. end Symbol_Table_io; SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'Supports' then mkdir 'Supports' fi cd 'Supports' if test -f 'arrays_of_float_vector_lists.adb' then echo shar: will not over-write existing file "'arrays_of_float_vector_lists.adb'" else cat << "SHAR_EOF" > 'arrays_of_float_vector_lists.adb' with unchecked_deallocation; package body Arrays_of_Float_Vector_Lists is -- CONSTRUCTOR : procedure Copy ( l1 : in Array_of_Lists; l2 : in out Array_of_Lists ) is begin for k in l1'range loop Copy(l1(k),l2(k)); end loop; end Copy; -- SELECTORS : function Is_Equal ( l1,l2 : Array_of_Lists ) return boolean is begin if l1'first /= l2'first or else l1'last /= l2'last then return false; else for k in l1'range loop if not Is_Equal(l1(k),l2(k)) then return false; end if; end loop; return true; end if; end Is_Equal; function Is_Equal ( l1,l2 : Link_to_Array_of_Lists ) return boolean is begin if l1 = null and then l2 /= null then return false; elsif l2 = null then return true; else return Is_Equal(l1.all,l2.all); end if; end Is_Equal; function Length_Of ( l : Array_of_Lists ) return natural is res : natural := 0; begin for i in l'range loop res := res + Length_Of(l(i)); end loop; return res; end Length_Of; -- DESTRUCTORS : procedure free is new unchecked_deallocation (Array_of_Lists,Link_to_Array_of_Lists); procedure Deep_Clear ( l : in out Array_of_Lists ) is begin for k in l'range loop Deep_Clear(l(k)); end loop; end Deep_Clear; procedure Shallow_Clear ( l : in out Array_of_Lists ) is begin for k in l'range loop Shallow_Clear(l(k)); end loop; end Shallow_Clear; procedure Deep_Clear ( l : in out Link_to_Array_of_Lists ) is begin if l /= null then Deep_Clear(l.all); free(l); end if; end Deep_Clear; procedure Shallow_Clear ( l : in out Link_to_Array_of_Lists ) is begin if l /= null then Shallow_Clear(l.all); free(l); end if; end Shallow_Clear; end Arrays_of_Float_Vector_Lists; SHAR_EOF fi # end of overwriting check if test -f 'arrays_of_float_vector_lists.ads' then echo shar: will not over-write existing file "'arrays_of_float_vector_lists.ads'" else cat << "SHAR_EOF" > 'arrays_of_float_vector_lists.ads' with Lists_of_Float_Vectors; use Lists_of_Float_Vectors; package Arrays_of_Float_Vector_Lists is -- DESCRIPTION : -- This package offers an abstraction for working with -- arrays of lists of floating-point vectors. -- DATA STRUCTURES : type Array_of_Lists is array ( integer range <> ) of List; type Link_to_Array_of_Lists is access Array_of_Lists; -- CONSTRUCTOR : procedure Copy ( l1 : in Array_of_Lists; l2 : in out Array_of_Lists ); -- DESCRIPTION : -- After Copy(l1,l2), Equal(l1,l2) holds. -- Of course, this is a deep copy, in constrast to l2 := l1. -- SELECTORS : function Is_Equal ( l1,l2 : Array_of_Lists ) return boolean; function Is_Equal ( l1,l2 : Link_to_Array_of_Lists ) return boolean; -- DESCRIPTION : -- Returns true if both arrays have the same lists. function Length_Of ( l : Array_of_Lists ) return natural; -- DESCRIPTION : -- Returns the sum of all lengths of the lists in l. -- DESTRUCTORS : procedure Deep_Clear ( l : in out Array_of_Lists ); procedure Shallow_Clear ( l : in out Array_of_Lists ); procedure Deep_Clear ( l : in out Link_to_Array_of_Lists ); procedure Shallow_Clear ( l : in out Link_to_Array_of_Lists ); -- DESCRIPTION : -- Frees allocated memory space. -- With a deep clear, also the content of the lists are cleared, -- while with a shallow clear, only the lists structures will be -- destroyed, the points in the lists will remain. end Arrays_of_Float_Vector_Lists; SHAR_EOF fi # end of overwriting check if test -f 'arrays_of_float_vector_lists_io.adb' then echo shar: will not over-write existing file "'arrays_of_float_vector_lists_io.adb'" else cat << "SHAR_EOF" > 'arrays_of_float_vector_lists_io.adb' with integer_io,Integer_Vectors_io; use integer_io,Integer_Vectors_io; with Lists_of_Float_Vectors_io; use Lists_of_Float_Vectors_io; package body Arrays_of_Float_Vector_Lists_io is procedure get ( al : in out Link_to_Array_of_Lists ) is begin get(Standard_Input,al); end get; procedure get ( n : in natural; m : in Vector; al : out Array_of_Lists ) is begin get(Standard_Input,n,m,al); end get; procedure get ( file : in file_type; al : in out Link_to_Array_of_Lists ) is n : natural; begin get(file,n); al := new Array_of_Lists(1..n); declare m : Vector(1..n) := (1..n => 0); begin get(file,m); get(file,n,m,al.all); end; end get; procedure get ( file : in file_type; n : in natural; m : in Vector; al : out Array_of_Lists ) is begin for i in al'range loop get(file,n,m(i),al(i)); end loop; end get; procedure put ( al : in Array_of_Lists ) is begin put(Standard_Output,al); end put; procedure put ( file : in file_type; al : in Array_of_Lists ) is begin for i in al'range loop put(file,al(i)); new_line(file); end loop; end put; procedure put ( al : in Array_of_Lists; fore,aft,exp : in natural ) is begin put(Standard_Output,al,fore,aft,exp); end put; procedure put ( file : in file_type; al : in Array_of_Lists; fore,aft,exp : in natural ) is begin for i in al'range loop put(file,al(i),fore,aft,exp); new_line(file); end loop; end put; end Arrays_of_Float_Vector_Lists_io; SHAR_EOF fi # end of overwriting check if test -f 'arrays_of_float_vector_lists_io.ads' then echo shar: will not over-write existing file "'arrays_of_float_vector_lists_io.ads'" else cat << "SHAR_EOF" > 'arrays_of_float_vector_lists_io.ads' with text_io,Integer_Vectors; use text_io,Integer_Vectors; with Arrays_of_Float_Vector_Lists; use Arrays_of_Float_Vector_Lists; package Arrays_of_Float_Vector_Lists_io is -- DESCRIPTION : -- This package offers routines for Input/Output of -- arrays of lists of floating-point vectors. procedure get ( al : in out Link_to_Array_of_Lists ); procedure get ( n : in natural; m : in Vector; al : out Array_of_Lists ); procedure get ( file : in file_type; al : in out Link_to_Array_of_Lists ); procedure get ( file : in file_type; n : in natural; m : in Vector; al : out Array_of_Lists ); -- DESCRIPTION : -- Reads a number of lists from standard input or from file; -- the ith list must contain m(i) integer vectors of length n. -- If n and m are not provided, then they are first read. procedure put ( al : in Array_of_Lists ); procedure put ( file : in file_type; al : in Array_of_Lists ); procedure put ( al : in Array_of_Lists; fore,aft,exp : in natural ); procedure put ( file : in file_type; al : in Array_of_Lists; fore,aft,exp : in natural ); -- DESCRIPTION : -- Writes the lists in al on standard output or on file. -- The fore,aft and exp determine the output format of the floats. end Arrays_of_Float_Vector_Lists_io; SHAR_EOF fi # end of overwriting check if test -f 'arrays_of_integer_vector_lists.adb' then echo shar: will not over-write existing file "'arrays_of_integer_vector_lists.adb'" else cat << "SHAR_EOF" > 'arrays_of_integer_vector_lists.adb' with unchecked_deallocation; package body Arrays_of_Integer_Vector_Lists is -- CONSTRUCTOR : procedure Copy ( l1 : in Array_of_Lists; l2 : in out Array_of_Lists ) is begin for k in l1'range loop Copy(l1(k),l2(k)); end loop; end Copy; -- SELECTORS : function Is_Equal ( l1,l2 : Array_of_Lists ) return boolean is begin if l1'first /= l2'first or else l1'last /= l2'last then return false; else for k in l1'range loop if not Is_Equal(l1(k),l2(k)) then return false; end if; end loop; return true; end if; end Is_Equal; function Is_Equal ( l1,l2 : Link_to_Array_of_Lists ) return boolean is begin if l1 = null and then l2 /= null then return false; elsif l2 = null then return true; else return Is_Equal(l1.all,l2.all); end if; end Is_Equal; function Length_Of ( l : Array_of_Lists ) return natural is res : natural := 0; begin for i in l'range loop res := res + Length_Of(l(i)); end loop; return res; end Length_Of; -- DESTRUCTORS : procedure free is new unchecked_deallocation (Array_of_Lists,Link_to_Array_of_Lists); procedure Deep_Clear ( l : in out Array_of_Lists ) is begin for k in l'range loop Deep_Clear(l(k)); end loop; end Deep_Clear; procedure Shallow_Clear ( l : in out Array_of_Lists ) is begin for k in l'range loop Shallow_Clear(l(k)); end loop; end Shallow_Clear; procedure Deep_Clear ( l : in out Link_to_Array_of_Lists ) is begin if l /= null then Deep_Clear(l.all); free(l); end if; end Deep_Clear; procedure Shallow_Clear ( l : in out Link_to_Array_of_Lists ) is begin if l /= null then Shallow_Clear(l.all); free(l); end if; end Shallow_Clear; end Arrays_of_Integer_Vector_Lists; SHAR_EOF fi # end of overwriting check if test -f 'arrays_of_integer_vector_lists.ads' then echo shar: will not over-write existing file "'arrays_of_integer_vector_lists.ads'" else cat << "SHAR_EOF" > 'arrays_of_integer_vector_lists.ads' with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; package Arrays_of_Integer_Vector_Lists is -- DESCRIPTION : -- This package offers an abstraction for working with -- arrays of lists of integer vectors. -- DATA STRUCTURES : type Array_of_Lists is array ( integer range <> ) of List; type Link_to_Array_of_Lists is access Array_of_Lists; -- CONSTRUCTOR : procedure Copy ( l1 : in Array_of_Lists; l2 : in out Array_of_Lists ); -- DESCRIPTION : -- After Copy(l1,l2), Equal(l1,l2) holds. -- Of course, this is a deep copy, in constrast to l2 := l1. -- SELECTORS : function Is_Equal ( l1,l2 : Array_of_Lists ) return boolean; function Is_Equal ( l1,l2 : Link_to_Array_of_Lists ) return boolean; -- DESCRIPTION : -- Returns true if both arrays have the same lists. function Length_Of ( l : Array_of_Lists ) return natural; -- DESCRIPTION : -- Returns the sum of all lengths of the lists in l. -- DESTRUCTORS : procedure Deep_Clear ( l : in out Array_of_Lists ); procedure Shallow_Clear ( l : in out Array_of_Lists ); procedure Deep_Clear ( l : in out Link_to_Array_of_Lists ); procedure Shallow_Clear ( l : in out Link_to_Array_of_Lists ); -- DESCRIPTION : -- Frees allocated memory space. -- With a deep clear, also the content of the lists are cleared, -- while with a shallow clear, only the lists structures will be -- destroyed, the points in the lists will remain. end Arrays_of_Integer_Vector_Lists; SHAR_EOF fi # end of overwriting check if test -f 'arrays_of_integer_vector_lists_io.adb' then echo shar: will not over-write existing file "'arrays_of_integer_vector_lists_io.adb'" else cat << "SHAR_EOF" > 'arrays_of_integer_vector_lists_io.adb' with integer_io,Integer_Vectors_io; use integer_io,Integer_Vectors_io; with Lists_of_Integer_Vectors_io; use Lists_of_Integer_Vectors_io; package body Arrays_of_Integer_Vector_Lists_io is procedure get ( al : in out Link_to_Array_of_Lists ) is begin get(Standard_Input,al); end get; procedure get ( n : in natural; m : in Vector; al : out Array_of_Lists ) is begin get(Standard_Input,n,m,al); end get; procedure get ( file : in file_type; al : in out Link_to_Array_of_Lists ) is n : natural; begin get(file,n); al := new Array_of_Lists(1..n); declare m : Vector(1..n) := (1..n => 0); begin get(file,m); get(file,n,m,al.all); end; end get; procedure get ( file : in file_type; n : in natural; m : in Vector; al : out Array_of_Lists ) is begin for i in al'range loop get(file,n,m(i),al(i)); end loop; end get; procedure put ( al : in Array_of_Lists ) is begin put(Standard_Output,al); end put; procedure put ( file : in file_type; al : in Array_of_Lists ) is begin for i in al'range loop put(file,al(i)); new_line(file); end loop; end put; end Arrays_of_Integer_Vector_Lists_io; SHAR_EOF fi # end of overwriting check if test -f 'arrays_of_integer_vector_lists_io.ads' then echo shar: will not over-write existing file "'arrays_of_integer_vector_lists_io.ads'" else cat << "SHAR_EOF" > 'arrays_of_integer_vector_lists_io.ads' with text_io,Integer_Vectors; use text_io,Integer_Vectors; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; package Arrays_of_Integer_Vector_Lists_io is -- DESCRIPTION : -- This package offers routines for Input/Output of -- arrays of lists of integer vectors. procedure get ( al : in out Link_to_Array_of_Lists ); procedure get ( n : in natural; m : in Vector; al : out Array_of_Lists ); procedure get ( file : in file_type; al : in out Link_to_Array_of_Lists ); procedure get ( file : in file_type; n : in natural; m : in Vector; al : out Array_of_Lists ); -- DESCRIPTION : -- Reads a number of lists from standard input or from file; -- the ith list must contain m(i) integer vectors of length n. -- If n and m are not provided, then they are first read. procedure put ( al : in Array_of_Lists ); procedure put ( file : in file_type; al : in Array_of_Lists ); -- DESCRIPTION : -- Writes the lists in al on standard output or on file. end Arrays_of_Integer_Vector_Lists_io; SHAR_EOF fi # end of overwriting check if test -f 'dictionaries.adb' then echo shar: will not over-write existing file "'dictionaries.adb'" else cat << "SHAR_EOF" > 'dictionaries.adb' package body Dictionaries is -- INITIALIZERS : procedure Init_Basis ( in_bas,out_bas : in out Integer_Vectors.Vector ) is n : constant natural := out_bas'last; begin for i in in_bas'range loop in_bas(i) := n+i; -- slack variable for ith constraint end loop; for i in out_bas'range loop out_bas(i) := i; end loop; end Init_Basis; function Init_Primal_Dictionary ( c : Float_Vectors.Vector; a : Matrix ) return Matrix is dic : Matrix(0..a'last(1),a'range(2)); begin for i in c'range loop dic(0,i) := -c(i); end loop; for i in a'range(1) loop for j in a'range(2) loop dic(i,j) := a(i,j); end loop; end loop; return dic; end Init_Primal_Dictionary; function Init_Dual_Dictionary ( c : Float_Vectors.Vector; a : Matrix ) return Matrix is dic : Matrix(0..a'last(1),a'range(2)); begin for i in c'range loop dic(0,i) := -c(i); end loop; for i in a'range(1) loop for j in a'range(2) loop dic(i,j) := -a(i,j); end loop; end loop; return dic; end Init_Dual_Dictionary; procedure Primal_Init ( c : in Float_Vectors.Vector; a : in Matrix; dic : out Matrix; in_bas,out_bas : in out Integer_Vectors.Vector ) is begin dic := Init_Primal_Dictionary(c,a); Init_Basis(in_bas,out_bas); end Primal_Init; procedure Dual_Init ( c : in Float_Vectors.Vector; a : in Matrix; dic : out Matrix; in_bas,out_bas : in out Integer_Vectors.Vector ) is begin dic := Init_Dual_Dictionary(c,a); Init_Basis(in_bas,out_bas); end Dual_Init; -- MODIFIERS : procedure Primal_Update ( dic : in out Matrix; in_bas,out_bas : in out Integer_Vectors.Vector; eps : in double_float; unbounded : out boolean ) is column_index : natural := 0; min : double_float := 0.0; row_index : natural := 0; temp : double_float; tmp : integer; begin for i in (dic'first(2)+1)..dic'last(2) loop -- which unknown enters? if dic(0,i) < min then min := dic(0,i); column_index := i; end if; end loop; if column_index /= 0 -- otherwise optimality is reached then for i in (dic'first(1)+1)..dic'last(1) loop -- which unknown leaves? temp := dic(i,column_index); if abs(temp) > eps then temp := dic(i,0)/temp; if temp > 0.0 then if row_index = 0 then row_index := i; min := temp; elsif temp < min then row_index := i; min := temp; end if; end if; end if; end loop; if row_index = 0 -- solution is unbounded then unbounded := true; else unbounded := false; temp := dic(row_index,column_index); -- pivot for j in dic'range(2) loop -- divide pivot row dic(row_index,j) := dic(row_index,j) / temp; end loop; for i in dic'range(1) loop -- update other rows, except pivot column if i /= row_index then for j in dic'range(2) loop if j /= column_index then dic(i,j) := dic(i,j)-dic(row_index,j)*dic(i,column_index); end if; end loop; end if; end loop; for i in dic'range(1) loop -- update pivot column if i = row_index then dic(i,column_index) := 1.0 / temp; else dic(i,column_index) := - dic(i,column_index) / temp; end if; end loop; tmp := in_bas(row_index); -- update basis information in_bas(row_index) := out_bas(column_index); out_bas(column_index) := tmp; end if; end if; end Primal_Update; procedure Dual_Update ( dic : in out Matrix; in_bas,out_bas : in out Integer_Vectors.Vector; eps : in double_float; feasible : out boolean ) is column_index : natural := 0; min : double_float := 0.0; row_index : natural := 0; temp : double_float; tmp : integer; begin for i in (dic'first(1)+1)..dic'last(1) loop -- which unknown leaves? if dic(i,0) < min then min := dic(i,0); row_index := i; end if; end loop; if row_index /= 0 -- otherwise optimality is reached then for i in (dic'first(2)+1)..dic'last(2) loop -- which unknown enters? temp := dic(row_index,i); if abs(temp) > eps and then (temp < 0.0) then temp := dic(0,i)/temp; if column_index = 0 then column_index := i; min := temp; elsif temp < min then column_index := i; min := temp; end if; end if; end loop; if column_index = 0 -- problem is infeasible then feasible := false; else feasible := true; temp := dic(row_index,column_index); -- pivot for j in dic'range(2) loop -- divide pivot row dic(row_index,j) := dic(row_index,j) / temp; end loop; for i in dic'range(1) loop -- update other rows, except pivot column if i /= row_index then for j in dic'range(2) loop if j /= column_index then dic(i,j) := dic(i,j)-dic(row_index,j)*dic(i,column_index); end if; end loop; end if; end loop; for i in dic'range(1) loop -- update the pivot column if i = row_index then dic(i,column_index) := 1.0 / temp; else dic(i,column_index) := - dic(i,column_index) / temp; end if; end loop; tmp := in_bas(row_index); -- update the basis information in_bas(row_index) := out_bas(column_index); out_bas(column_index) := tmp; end if; end if; end Dual_Update; -- SELECTORS : function Primal_Optimal ( dic : Matrix; eps : double_float ) return boolean is begin for i in (dic'first(2)+1)..dic'last(2) loop if abs(dic(0,i)) > eps then if dic(0,i) < 0.0 then return false; end if; end if; end loop; return true; end Primal_Optimal; function Dual_Optimal ( dic : Matrix; eps : double_float ) return boolean is begin for i in (dic'first(1)+1)..dic'last(1) loop if abs(dic(i,0)) > eps then if dic(i,0) < 0.0 then return false; end if; end if; end loop; return true; end Dual_Optimal; function Optimum ( dic : Matrix ) return double_float is begin return dic(dic'first(1),dic'first(2)); end Optimum; function Primal_Solution ( dic : Matrix; in_bas,out_bas : Integer_Vectors.Vector) return Float_Vectors.Vector is res : Float_Vectors.Vector((dic'first(2)+1)..dic'last(2)); n : constant natural := dic'last(2); begin for i in in_bas'range loop if in_bas(i) <= n then res(in_bas(i)) := dic(i,0); end if; end loop; for i in out_bas'range loop if out_bas(i) <= n then res(out_bas(i)) := 0.0; end if; end loop; return res; end Primal_Solution; function Dual_Solution ( dic : Matrix; in_bas,out_bas : Integer_Vectors.Vector) return Float_Vectors.Vector is res : Float_Vectors.Vector((dic'first(1)+1)..dic'last(1)); n : constant natural := dic'last(2); begin for i in in_bas'range loop if in_bas(i) > n then res(in_bas(i)-n) := dic(i,0); end if; end loop; for i in out_bas'range loop if out_bas(i) > n then res(out_bas(i)-n) := dic(0,i); end if; end loop; return res; end Dual_Solution; end Dictionaries; SHAR_EOF fi # end of overwriting check if test -f 'dictionaries.ads' then echo shar: will not over-write existing file "'dictionaries.ads'" else cat << "SHAR_EOF" > 'dictionaries.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; with Float_Vectors,Float_Matrices; use Float_Vectors,Float_Matrices; with Integer_Vectors; package Dictionaries is -- DESCRIPTION : -- This package manages dictionaries, used to solve -- the linear programming problem, in standard primal form -- -- max -- <= 0, m linear inequalities -- -- where x = (1,x1,x2,..,xn); -- -- and for the dual formulation of the problem -- -- min -- >= 0, m linear inequalities -- -- where x = (1,x1,x2,..,xn). -- A dictionary is the linear system that corresponds to a feasible solution. -- The right-hand side vector yields the primal solution, whereas the -- vector of the objective function determines the dual solution. -- A dictionary is reprented by a matrix of dimension (0..m,0..n) and -- by two vectors which indicate the unknowns that are in/out the basis, -- of respective dimensions (1..m) and (1..n). -- USAGE : be consequent when using primal and dual models. -- IMPORTANT ASSUMPTIONS : -- The initializers do not check on the validity on the input tableau. -- In particular: -- * primal : all right-hand sides to be positive; -- * dual : all coefficients of the objective function must be positive. -- Otherwise, the claims on unboundedness and infeasibility may be false. -- INITIALIZERS : procedure Init_Basis ( in_bas,out_bas : in out Integer_Vectors.Vector ); -- DESCRIPTION : Initializes the basis. -- ON ENTRY : -- in_bas unknowns in the basis, vector with range 1..m, -- out_bas unknowns out the basis, vector with range 1..n. function Init_Primal_Dictionary ( c : Float_Vectors.Vector; a : Matrix ) return Matrix; function Init_Dual_Dictionary ( c : Float_Vectors.Vector; a : Matrix ) return Matrix; -- DESCRIPTION : Initializes the matrix for the dictionary. -- MATRIX DIMENSIONS : c(0..m), a(1..m,0..n). -- ON ENTRY : -- c coefficients of the target function; -- a coefficients of the constraints, stored row-wise, -- with right-hand side at column zero. -- ON RETURN : -- Matrix of dimension (0..m,0..n), with first row contains -c, the -- rest is filled with a, or with -a in the dual case. procedure Primal_Init ( c : in Float_Vectors.Vector; a : in Matrix; dic : out Matrix; in_bas,out_bas : in out Integer_Vectors.Vector ); procedure Dual_Init ( c : in Float_Vectors.Vector; a : in Matrix; dic : out Matrix; in_bas,out_bas : in out Integer_Vectors.Vector ); -- DESCRIPTION : -- This procedure initializes the dictionary by consecutive application -- of the producedure Init_Basis and Init_Primal/Dual_Dictionary. -- ON ENTRY : -- c the coefficients of the target function: c(0..n); -- a the coefficients of the constraints: a(1..m,0..n). -- ON RETURN : -- dic dictionary a matrix of ranges 0..m,0..n; -- in_bas unknowns in the basis, vector with range 1..m; -- out_bas unknowns out the basis, vector with range 1..n. -- MODIFIERS : procedure Primal_Update ( dic : in out Matrix; in_bas,out_bas : in out Integer_Vectors.Vector; eps : in double_float; unbounded : out boolean ); procedure Dual_Update ( dic : in out Matrix; in_bas,out_bas : in out Integer_Vectors.Vector; eps : in double_float; feasible: out boolean ); -- DESCRIPTION : -- This procedure performs one step of the simplex algorithm. -- ON ENTRY : -- dic current matrix for the dictionary; -- in_bas unknowns in the basis; -- out_bas unknowns not in the basis; -- eps used to determine wether a number is zero. -- ON RETURN : -- dic modified matrix for the dictionary; -- in_bas updated list of basis unknowns; -- out_bas updated list of non-basis unknowns; -- unbounded true when the solution is unbounded, false otherwise; -- feasible false when infeasibility is detected, true otherwise. -- SELECTORS : function Primal_Optimal ( dic : Matrix; eps : double_float ) return boolean; function Dual_Optimal ( dic : Matrix; eps : double_float ) return boolean; -- DESCRIPTION : -- Returns true if the dictionary offers an optimal solution. -- The parameter eps is used determine whether a number equals zero or not. function Optimum ( dic : Matrix ) return double_float; -- DESCRIPTION : -- Returns the current value of the objective function. function Primal_Solution ( dic : Matrix; in_bas,out_bas : Integer_Vectors.Vector ) return Float_Vectors.Vector; function Dual_Solution ( dic : Matrix; in_bas,out_bas : Integer_Vectors.Vector ) return Float_Vectors.Vector; -- DESCRIPTION : -- Returns the current values of the n unknowns in the primal or the -- dual formulation of the linear program. If the program is dual, -- then the signs of the dual solution should be reversed. end Dictionaries; SHAR_EOF fi # end of overwriting check if test -f 'face_enumerators.adb' then echo shar: will not over-write existing file "'face_enumerators.adb'" else cat << "SHAR_EOF" > 'face_enumerators.adb' --with text_io,integer_io; use text_io,integer_io; --with Integer_Vectors_io; use Integer_Vectors_io; --with Integer_Vectors_of_Vectors_io; use Integer_Vectors_of_Vectors_io; --with Integer_Matrices_io; use Integer_Matrices_io; with Greatest_Common_Divisor; use Greatest_Common_Divisor; with Integer_Vectors; use Integer_Vectors; with Integer_Matrices; use Integer_Matrices; with Integer_Linear_System_Solvers; use Integer_Linear_System_Solvers; with Face_Enumerators_Utilities; use Face_Enumerators_Utilities; with Integer_Farkas_Lemma; use Integer_Farkas_Lemma; package body Face_Enumerators is -- ELIMINATE TO MAKE UPPER TRIANGULAR : procedure Eliminate ( pivot : in integer; elim : in Integer_Vectors.Vector; target : in out Integer_Vectors.Vector ) is -- DESCRIPTION : -- Makes target(pivot) = 0 by means of making a linear -- combination of the vectors target and elim. -- REQUIRED ON ENTRY : -- target(pivot) /= 0 and elim(pivot) /= 0 a,b,lcmab,faca,facb : integer; begin a := elim(pivot); b := target(pivot); lcmab := lcm(a,b); if lcmab < 0 then lcmab := -lcmab; end if; faca := lcmab/a; facb := lcmab/b; if facb < 0 then facb := -facb; faca := -faca; end if; for j in target'range loop target(j) := facb*target(j) - faca*elim(j); end loop; Scale(target); end Eliminate; procedure Eliminate ( l : in natural; pivots : in Integer_Vectors.Vector; elim : in Integer_Vectors_of_Vectors.Vector; target : in out Integer_Vectors.Vector ) is -- DESCRIPTION : -- Makes target(pivots(i)) = 0 by means of making a linear -- combination of the vectors target and elim(i), for i in 1..l. -- REQUIRED ON ENTRY : -- elim(i)(pivots(i)) /= 0 begin for i in 1..l loop if target(pivots(i)) /= 0 then Eliminate(pivots(i),elim(i).all,target); end if; end loop; end Eliminate; function Pivot_after_Elimination ( l,k : in natural; point,face,pivots : in Integer_Vectors.Vector; elim : in Integer_Vectors_of_Vectors.Vector ) return natural is -- DESCRIPTION : -- Returns the first nonzero element of the given point after elimination -- w.r.t. the entries in the face with lower index. work : Integer_Vectors.Vector(point'range) := point - elim(1-k).all; pivot : integer; begin for i in (face'first+1)..face'last loop if (face(i) < l) and then (work(pivots(i)) /= 0) then Eliminate(pivots(i),elim(i).all,work); end if; exit when (face(i) > l); end loop; pivot := 0; for i in work'range loop if work(pivots(i)) /= 0 then pivot := i; end if; exit when (pivot /= 0); end loop; return pivot; end Pivot_after_Elimination; procedure Update_Pivots ( point : in Integer_Vectors.Vector; l : in natural; pivots : in out Integer_Vectors.Vector; pivot : out natural ) is -- DESCRIPTION : -- Searches in the point(l..point'last) for the first nonzero entry -- and updates the pivoting information. temp,piv : integer; begin piv := 0; for i in l..point'last loop if point(pivots(i)) /= 0 then piv := i; end if; exit when (piv /= 0); end loop; if piv /= 0 and then (piv /= l) then temp := pivots(l); pivots(l) := pivots(piv); pivots(piv) := temp; end if; pivot := piv; end Update_Pivots; procedure Update_Eliminator ( elim : in out Integer_Vectors_of_Vectors.Vector; l : in natural; pivots : in out Integer_Vectors.Vector; point : in Integer_Vectors.Vector; pivot : out natural ) is -- DESCRIPTION : -- Updates the vector of eliminators, by adding the lth elimination -- equation. This procedure ensures the invariant condition on the -- eliminator, which has to be upper triangular. If this cannot be -- achieved, degeneracy is indicated by pivot = 0. -- ON ENTRY : -- elim vector of elimination equations: elim(i)(pivots(i)) /= 0 -- and for j in 1..(i-1) : elim(i)(pivots(j)) = 0, -- for i in 1..(l-1), elim(0) contains the basis point; -- l index of current elimination equation to be made; -- pivots contains the pivoting information; -- point new point to make the equation `point - elim(0) = 0'. -- ON RETURN : -- elim if not degen, then elim(l)(pivots(l)) /= 0 and -- for i in 1..(l-1): elim(l)(pivots(i)) = 0; -- pivots updated pivot information; -- pivot the pivot that has been used for elim(l)(pivots(l)) /= 0; -- piv = 0 when the new elimination equation elim(l) -- became entirely zero after ensuring the invariant condition. begin elim(l) := new Integer_Vectors.Vector'(point - elim(0).all); Eliminate(l-1,pivots,elim,elim(l).all); Update_Pivots(elim(l).all,l,pivots,pivot); end Update_Eliminator; procedure Update_Eliminator_for_Sum ( elim : in out Integer_Vectors_of_Vectors.Vector; l : in natural; pivots : in out Integer_Vectors.Vector; point : in Integer_Vectors.Vector; index : in natural; pivot : out natural ) is -- DESCRIPTION : -- Updates the vector of eliminators, by adding the lth elimination -- equation. This procedure ensures the invariant condition on the -- eliminator, which has to be upper triangular. If this cannot be -- achieved, degeneracy is indicated by pivot = 0. -- ON ENTRY : -- elim vector of elimination equations: elim(i)(pivots(i)) /= 0 -- and for j in 1..(i-1) : elim(i)(pivots(j)) = 0, -- for i in 1..(l-1), elim(1-index) contains the basis point; -- l index of current elimination equation to be made; -- pivots contains the pivoting information; -- point new point to make the equation `point - elim(1-index) = 0'; -- index indicates the current polytope. -- ON RETURN : -- elim if not degen, then elim(l)(pivots(l)) /= 0 and -- for i in 1..(l-1): elim(l)(pivots(i)) = 0; -- pivots updated pivot information; -- piv the pivot that has been used for elim(l)(pivots(l)) /= 0; -- piv = 0 when the new elimination equation elim(l) -- became entirely zero after ensuring the invariant condition. begin elim(l) := new Integer_Vectors.Vector'(point - elim(1-index).all); Eliminate(l-1,pivots,elim,elim(l).all); Update_Pivots(elim(l).all,l,pivots,pivot); end Update_Eliminator_for_Sum; -- CREATE TABLEAU OF INEQUALITIES : procedure Create_Tableau_for_Vertices ( i,n : in integer; pts : in Integer_Vectors_of_Vectors.Vector; tab : out matrix ) is column : integer := tab'first(2); begin for j in pts'range loop if j /= i then for k in pts(j)'range loop tab(k,column) := pts(j)(k); end loop; tab(tab'last(1),column) := 1; column := column + 1; end if; end loop; for k in pts(i)'range loop tab(k,tab'last(2)) := pts(i)(k); end loop; tab(tab'last(1),tab'last(2)) := 1; end Create_Tableau_for_Vertices; procedure Create_Tableau_for_Edges ( i,j,n,pivot : in integer; elim : in Integer_Vectors.Vector; pts : in Integer_Vectors_of_Vectors.Vector; tab : out matrix; lastcol : out integer; degenerate : out boolean ) is column : integer := 1; ineq : Integer_Vectors.Vector(1..n); begin degenerate := false; for k in pts'range loop if (k/=i) and then (k/=j) then ineq := pts(k).all - pts(i).all; -- compute inequality -- put("Inequality before eliminate : "); put(ineq); new_line; if ineq(pivot) /= 0 -- make ineq(pivot) = 0 then Eliminate(pivot,elim,ineq); end if; -- put("Inequality after eliminate : "); put(ineq); new_line; if Is_Zero(ineq) -- check if degenerate then if not In_Edge(pts(k).all,pts(i).all,pts(j).all) then degenerate := true; return; end if; else for l in 1..n loop -- fill in the column if l < pivot then tab(l,column) := ineq(l); elsif l > pivot then tab(l-1,column) := ineq(l); end if; end loop; tab(tab'last(1),column) := 1; column := column + 1; end if; end if; end loop; for k in tab'first(1)..(tab'last(1)-1) loop -- right hand side tab(k,tab'last(2)) := 0; end loop; tab(tab'last(1),tab'last(2)) := 1; lastcol := column-1; end Create_Tableau_for_Edges; procedure Create_Tableau_for_Faces ( k,n : in natural; face,pivots : in Integer_Vectors.Vector; pts,elim : in Integer_Vectors_of_Vectors.Vector; tab : out matrix; lastcol : out integer; degenerate : out boolean ) is column : integer := 1; ineq : Integer_Vectors.Vector(1..n); begin degenerate := false; for l in pts'range loop if not Is_In(l,face) then ineq := pts(l).all - elim(0).all; -- new inequality -- put("Inequality before : "); put(ineq); new_line; Eliminate(k,pivots,elim,ineq); -- ineq(pivots(i)) = 0, i=1,2,..k -- put("and after elimination : "); put(ineq); new_line; if Is_Zero(ineq) then if --not In_Face(k,face,pts(l).all,pts) --and then l < face(face'last) -- lexicographic enumeration and then (Pivot_after_Elimination (l,1,pts(l).all,face,pivots,elim) /= 0) then -- put("Degenerate for l = "); put(l,1); new_line; degenerate := true; return; end if; else for ll in (k+1)..n loop -- fill in the column tab(ll-k,column) := ineq(pivots(ll)); end loop; tab(tab'last(1),column) := 1; column := column + 1; end if; end if; end loop; for l in tab'first(1)..(tab'last(1)-1) loop -- right hand side tab(l,tab'last(2)) := 0; end loop; tab(tab'last(1),tab'last(2)) := 1; lastcol := column-1; end Create_Tableau_for_Faces; procedure Create_Tableau_for_Faces_of_Sum ( k,n,i,r : in natural; ind,pivots : in Integer_Vectors.Vector; pts,elim,face : in Integer_Vectors_of_Vectors.Vector; tab : out matrix; lastcol : out integer; degenerate : out boolean ) is -- DESCRIPTION : -- Creates the table of inequalities for determining whether the given -- candidate face spans a face of the sum polytope. -- ON ENTRY : -- k dimension of the face on the sum; -- n dimension of the points; -- i current polytope; -- r number of polytopes; -- ind indicate the beginning vector in pts of each polytope; -- etc... column : integer := 1; ineq : Integer_Vectors.Vector(1..n); last : integer; begin degenerate := false; for l1 in face'first..i loop if l1 = r then last := pts'last; else last := ind(l1+1)-1; end if; for l2 in ind(l1)..last loop if not Is_In(l2,face(l1).all) then ineq := pts(l2).all - elim(1-l1).all; -- new inequality Eliminate(k,pivots,elim,ineq); -- ineq(pivots(i)) = 0, i=1,2,..k if Is_Zero(ineq) then if --not In_Face(face(l1)'length-1,face(l1).all,pts(l2).all,pts) --and then face(l1)(face(l1)'first) <= l2 and then l2 < face(l1)(face(l1)'last) -- lexicographic enumeration and then (Pivot_after_Elimination (l2,l1,pts(l2).all,face(l1).all,pivots,elim) /= 0) then degenerate := true; return; end if; else for ll in (k+1)..n loop -- fill in the column tab(ll-k,column) := ineq(pivots(ll)); end loop; tab(tab'last(1),column) := 1; column := column + 1; end if; end if; end loop; end loop; for l in tab'first(1)..(tab'last(1)-1) loop -- right hand side tab(l,tab'last(2)) := 0; end loop; tab(tab'last(1),tab'last(2)) := 1; lastcol := column-1; end Create_Tableau_for_Faces_of_Sum; procedure Create_Tableau_for_Lower_Edges ( i,j,n,pivot : in integer; elim : in Integer_Vectors.Vector; pts : in Integer_Vectors_of_Vectors.Vector; tab : out matrix; lastcol : out integer; degenerate : out boolean ) is column : integer := 1; ineq : Integer_Vectors.Vector(1..n); begin -- put("The elimination vector : "); put(elim); new_line; degenerate := false; for k in pts'range loop if (k/=i) and then (k/=j) then ineq := pts(k).all - pts(i).all; -- compute inequality -- put("Inequality before eliminate : "); put(ineq); new_line; if ineq(pivot) /= 0 -- make ineq(pivot) = 0 then Eliminate(pivot,elim,ineq); end if; -- put("Inequality after eliminate : "); put(ineq); new_line; if Is_Zero(ineq) -- check if degenerate then if not In_Edge(pts(k).all,pts(i).all,pts(j).all) then degenerate := true; return; end if; else for l in 1..n loop -- fill in the column if l < pivot then tab(l,column) := ineq(l); elsif l > pivot then tab(l-1,column) := ineq(l); end if; end loop; column := column + 1; end if; end if; end loop; for k in tab'first(1)..(tab'last(1)-1) loop -- right hand side tab(k,tab'last(2)) := 0; end loop; tab(tab'last(1),tab'last(2)) := -1; lastcol := column-1; end Create_Tableau_for_Lower_Edges; procedure Create_Tableau_for_Lower_Faces ( k,n : in natural; face,pivots : in Integer_Vectors.Vector; pts,elim : in Integer_Vectors_of_Vectors.Vector; tab : out matrix; lastcol : out integer; degenerate : out boolean ) is column : integer := 1; ineq : Integer_Vectors.Vector(1..n); begin degenerate := false; for l in pts'range loop if not Is_In(l,face) then ineq := pts(l).all - elim(0).all; -- new inequality -- put("Inequality before : "); put(ineq); new_line; Eliminate(k,pivots,elim,ineq); -- ineq(pivots(i)) = 0, i=1,2,..k -- put("and after elimination : "); put(ineq); new_line; if Is_Zero(ineq) then if --not In_Face(k,face,pts(l).all,pts) --and then l < face(face'last) -- lexicographic enumeration and then (Pivot_after_Elimination (l,1,pts(l).all,face,pivots,elim) /= 0) then --put_line("Degenerate choice"); degenerate := true; return; end if; else for ll in (k+1)..n loop -- fill in the column tab(ll-k,column) := ineq(pivots(ll)); end loop; column := column + 1; end if; end if; end loop; for l in tab'first(1)..(tab'last(1)-1) loop -- right hand side tab(l,tab'last(2)) := 0; end loop; tab(tab'last(1),tab'last(2)) := -1; lastcol := column-1; end Create_Tableau_for_Lower_Faces; -- DETERMINE WHETHER THE CANDIDATE IS VERTEX, SPANS AN EDGE OR A K-FACE : function Is_Vertex ( i,m,n : integer; pts : Integer_Vectors_of_Vectors.Vector ) return boolean is tableau : matrix(1..n+1,1..m); feasible : boolean; begin Create_Tableau_for_Vertices(i,n,pts,tableau); -- put_line("The tableau :"); put(tableau); Integer_Complementary_Slackness(tableau,feasible); return not feasible; end Is_Vertex; function Is_Edge ( i,j,m,n : integer; pts : Integer_Vectors_of_Vectors.Vector ) return boolean is elim : Integer_Vectors.Vector(1..n) := pts(i).all - pts(j).all; pivot : integer; begin pivot := elim'first - 1; for k in elim'range loop if elim(k) /= 0 then pivot := k; end if; exit when pivot >= elim'first; end loop; if pivot < elim'first then return false; else Scale(elim); declare tab : matrix(1..n,1..m-1); deg,feasible : boolean; lst : integer; begin -- put("The elimination vector : "); put(elim); new_line; Create_Tableau_for_Edges(i,j,n,pivot,elim,pts,tab,lst,deg); -- put_line("The tableau :"); put(tab); if deg then return false; elsif lst = 0 then return true; else Integer_Complementary_Slackness(tab,lst,feasible); return not feasible; end if; end; end if; end Is_Edge; function Is_Face ( k,n,m : natural; elim,pts : Integer_Vectors_of_Vectors.Vector; pivots,face : Integer_Vectors.Vector ) return boolean is -- DESCRIPTION : -- Applies Complementary Slackness to determine whether the given -- candidate face is a face of the polytope. -- ON ENTRY : -- k dimension of the candidate face; -- n dimension of the vector space; -- m number of points which span the polytope; -- elim elimination equations in upper triangular form; -- pts the points which span the polytope; -- pivots pivoting information for the elimination equations; -- face entries of the points which span the candidate face. nn : constant natural := n-k+1; tab : matrix(1..nn,1..(m-k)); deg,feasible : boolean; lst : integer; begin -- put("The face being tested : "); put(face); new_line; -- put("The pivots : "); put(pivots); new_line; -- put_line("The elimination equations : "); -- for i in 1..elim'last loop -- put(elim(i)); put(" = 0 "); -- end loop; -- new_line; if m - k <= 1 then return true; else Create_Tableau_for_Faces(k,n,face,pivots,pts,elim,tab,lst,deg); -- put_line("The tableau of inequalities : "); put(tab); if deg then -- put_line("Tableau is degenerate: no solution :"); return false; elsif lst = 0 then return true; else Integer_Complementary_Slackness(tab,lst,feasible); -- if feasible -- then put_line(" is feasible"); -- else put_line(" is not feasible"); -- end if; return not feasible; end if; end if; end Is_Face; function Is_Face_of_Sum ( k,n,m,i,r : natural; elim,pts,face : Integer_Vectors_of_Vectors.Vector; ind,pivots : Integer_Vectors.Vector ) return boolean is -- DESCRIPTION : -- Applies Complementary Slackness to determine whether the given -- candidate face is a face of the polytope. -- ON ENTRY : -- k dimension of the candidate face; -- n dimension of the vector space; -- m number of total points which span the polytope; -- i current polytope; -- r number of different polytopes; -- elim elimination equations in upper triangular form; -- pts the points which span the polytope; -- face entries of the points which span the candidate face; -- ind indicates the starting vector in pts of each polytope; -- pivots pivoting information for the elimination equations. nn : constant natural := n-k+1; tab : matrix(1..nn,1..(m-k)); deg,feasible : boolean; lst : integer; begin if m - k <= 1 then return true; else Create_Tableau_for_Faces_of_Sum (k,n,i,r,ind,pivots,pts,elim,face,tab,lst,deg); -- put_line("The tableau of inequalities : "); put(tab); if deg then --put_line("Tableau is degenerate: no solution :"); return false; elsif lst = 0 then return true; else Integer_Complementary_Slackness(tab,lst,feasible); --if feasible -- then put_line(" is feasible"); -- else put_line(" is not feasible"); --end if; return not feasible; end if; end if; end Is_Face_of_Sum; function Is_Lower_Edge ( i,j,m,n : integer; pts : Integer_Vectors_of_Vectors.Vector ) return boolean is elim : Integer_Vectors.Vector(1..n) := pts(i).all - pts(j).all; pivot : integer; begin pivot := elim'first - 1; for k in elim'range loop if elim(k) /= 0 then pivot := k; end if; exit when pivot >= elim'first; end loop; if pivot < elim'first or else (pivot = elim'last) then return false; else Scale(elim); declare tab : matrix(1..n-1,1..m-1); deg,feasible : boolean; lst : integer; begin Create_Tableau_for_Lower_Edges(i,j,n,pivot,elim,pts,tab,lst,deg); -- put_line("The tableau :"); put(tab); if deg then return false; elsif lst = 0 then return true; else Integer_Complementary_Slackness(tab,lst,feasible); return not feasible; end if; end; end if; end Is_Lower_Edge; function Is_Lower_Face ( k,n,m : in natural; elim,pts : Integer_Vectors_of_Vectors.Vector; pivots,face : Integer_Vectors.Vector ) return boolean is -- DESCRIPTION : -- Applies Complementary Slackness to determine whether the given -- candidate face is a face of the lower hull of the polytope. -- ON ENTRY : -- k dimension of the candidate face; -- n dimension of the vector space; -- m number of points which span the polytope; -- elim elimination equations in upper triangular form; -- pts the points which span the polytope; -- pivots pivoting information for the elimination equations; -- face entries of the points which span the candidate face. nn : constant natural := n-k; tab : matrix(1..nn,1..(m-k)); deg,feasible : boolean; lst : integer; begin -- put("The pivots : "); put(pivots); new_line; -- put_line("The elimination equations : "); -- for i in 1..elim'last loop -- put(elim(i)); put(" = 0 "); -- end loop; -- new_line; if m - k <= 1 then return true; else Create_Tableau_for_Lower_Faces(k,n,face,pivots,pts,elim,tab,lst,deg); -- put_line("The tableau of inequalities : "); put(tab); if deg then --put_line("Degenerate tableau"); return false; elsif lst = 0 then --put_line("lst = 0"); return true; else Integer_Complementary_Slackness(tab,lst,feasible); --if feasible -- then put_line(" is feasible"); -- else put_line(" is not feasible"); --end if; return not feasible; end if; end if; end Is_Lower_Face; -- TARGET ROUTINES : procedure Enumerate_Vertices ( pts : in Integer_Vectors_of_Vectors.Vector ) is continue : boolean := true; n : constant natural := pts(pts'first).all'length; m : constant natural := pts'length; begin for i in pts'range loop if Is_Vertex(i,m,n,pts) then Process(i,continue); end if; exit when not continue; end loop; end Enumerate_Vertices; procedure Enumerate_Edges ( pts : in Integer_Vectors_of_Vectors.Vector ) is continue : boolean := true; n : constant natural := pts(pts'first).all'length; m : constant natural := pts'length; procedure Candidate_Edges ( i,n : in integer ) is begin for j in (i+1)..pts'last loop -- enumerate all candidates -- put("Verifying "); put(pts(i).all); put(" and"); -- put(pts(j).all); put(" :"); new_line; if Is_Edge(i,j,m,n,pts) then Process(i,j,continue); end if; exit when not continue; end loop; end Candidate_Edges; begin for i in pts'first..(pts'last-1) loop Candidate_Edges(i,n); end loop; end Enumerate_Edges; procedure Enumerate_Lower_Edges ( pts : in Integer_Vectors_of_Vectors.Vector ) is continue : boolean := true; n : constant natural := pts(pts'first).all'length; m : constant natural := pts'length; procedure Candidate_Lower_Edges ( i,n : in integer ) is begin for j in (i+1)..pts'last loop -- enumerate all candidates -- put("Verifying "); put(pts(i).all); put(" and"); -- put(pts(j).all); put(" :"); new_line; if Is_Lower_Edge(i,j,m,n,pts) then Process(i,j,continue); end if; exit when not continue; end loop; end Candidate_Lower_Edges; begin for i in pts'first..(pts'last-1) loop Candidate_Lower_Edges(i,n); end loop; end Enumerate_Lower_Edges; procedure Enumerate_Faces ( k : in natural; pts : in Integer_Vectors_of_Vectors.Vector ) is m : constant natural := pts'length; n : constant natural := pts(pts'first).all'length; candidate : Integer_Vectors.Vector(0..k); elim : Integer_Vectors_of_Vectors.Vector(0..k); continue : boolean := true; procedure Candidate_Faces ( ipvt : in Integer_Vectors.Vector; i,l : in integer ) is -- DESCRIPTION : -- Enumerates all candidate k-faces in lexicographic order. piv : natural; pivots : Integer_Vectors.Vector(1..n); begin if l > k then if (k = m) or else Is_Face(k,n,m,elim,pts,ipvt,candidate) then Process(candidate,continue); end if; else for j in (i+1)..pts'last loop candidate(l) := j; pivots := ipvt; Update_Eliminator(elim,l,pivots,pts(j).all,piv); if piv /= 0 then Candidate_Faces(pivots,j,l+1); end if; Clear(elim(l)); exit when not continue; end loop; end if; end Candidate_Faces; begin if k <= m then declare ipvt : Integer_Vectors.Vector(1..n); begin for i in ipvt'range loop ipvt(i) := i; end loop; for i in pts'first..(pts'last-k) loop candidate(0) := i; elim(0) := pts(i); -- basis point Candidate_Faces(ipvt,i,1); end loop; end; end if; end Enumerate_Faces; procedure Enumerate_Lower_Faces ( k : in natural; pts : in Integer_Vectors_of_Vectors.Vector ) is m : constant natural := pts'length; n : constant natural := pts(pts'first).all'length; candidate : Integer_Vectors.Vector(0..k); elim : Integer_Vectors_of_Vectors.Vector(0..k); continue : boolean := true; procedure Candidate_Lower_Faces ( ipvt : in Integer_Vectors.Vector; i,l : in integer ) is -- DESCRIPTION : -- Enumerates all candidate k-faces in lexicographic order. piv : natural; pivots : Integer_Vectors.Vector(1..n); begin if l > k then --put_line("Testing the following candidate face :"); --for ii in candidate'first..candidate'last-1 loop -- put(pts(candidate(ii))); put(" & "); --end loop; --put(pts(candidate(candidate'last))); new_line; if (k = m) or else Is_Lower_Face(k,n,m,elim,pts,ipvt,candidate) then Process(candidate,continue); end if; else for j in (i+1)..pts'last loop candidate(l) := j; pivots := ipvt; -- put("Picking "); put(pts(j)); -- put(" Pivots : "); put(pivots); new_line; Update_Eliminator(elim,l,pivots,pts(j).all,piv); -- put(" update of eliminator piv = "); put(piv,1); -- put(" Pivots : "); put(pivots); new_line; if (piv /= 0) and (piv /= n) then Candidate_Lower_Faces(pivots,j,l+1); end if; Clear(elim(l)); exit when not continue; end loop; end if; end Candidate_Lower_Faces; begin if k <= m then declare ipvt : Integer_Vectors.Vector(1..n); begin for i in ipvt'range loop ipvt(i) := i; end loop; for i in pts'first..(pts'last-k) loop candidate(0) := i; elim(0) := pts(i); -- basis point Candidate_Lower_Faces(ipvt,i,1); end loop; end; end if; end Enumerate_Lower_Faces; procedure Enumerate_Faces_of_Sum ( ind,typ : in vector; k : in natural; pts : in Integer_Vectors_of_Vectors.Vector ) is m : constant natural := pts'length; -- number of points n : constant natural := pts(pts'first)'length; -- dimension of vectors r : constant natural := ind'length; -- number of polytopes candidates : Integer_Vectors_of_Vectors.Vector(1..r); elim : Integer_Vectors_of_Vectors.Vector(1-r..k); pivots : Integer_Vectors.Vector(1..n); continue : boolean := true; lasti,sum : natural; procedure Candidate_Faces_of_Sum ( ipvt : in Integer_Vectors.Vector; i : in integer ) is -- DESCRIPTION : -- Enumerates all faces of the given type on the sum, -- i indicates the current polytope. procedure Candidate_Faces ( ipvt : in Integer_Vectors.Vector; start,l : in integer ) is -- DESCRIPTION : -- Enumerates all candidate k-faces, with k = typ(i). -- The parameter l indicates the current element of pts to be chosen. -- The previously chosen point is given by start. piv,last : natural; begin if i = r then last := m; else last := ind(i+1)-1; end if; if l > typ(i) then if (typ(i) = last-ind(i)+1) or else Is_Face_of_Sum (sum,n,last-i+1,i,r,elim,pts(pts'first..last), candidates,ind,ipvt) then if i = r then Process(candidates,continue); else Candidate_Faces_of_Sum(ipvt,i+1); end if; end if; else for j in (start+1)..(last-typ(i)+l) loop candidates(i)(l) := j; if l = 0 then Candidate_Faces(ipvt,j,l+1); else pivots := ipvt; Update_Eliminator_for_Sum (elim,sum-typ(i)+l,pivots,pts(j).all,i,piv); if piv /= 0 then Candidate_Faces(pivots,j,l+1); end if; Clear(elim(sum-typ(i)+l)); end if; exit when not continue; end loop; end if; end Candidate_Faces; begin candidates(i) := new Integer_Vectors.Vector(0..typ(i)); if i = r then lasti := pts'last; else lasti := ind(i+1)-1; end if; sum := sum + typ(i); for j in ind(i)..(lasti-typ(i)) loop candidates(i)(0) := j; elim(1-i) := pts(j); Candidate_Faces(ipvt,j,1); end loop; sum := sum - typ(i); -- for j in (sum+1)..(sum+typ(i)) loop -- Clear(elim(j)); -- end loop; Clear(candidates(i)); end Candidate_Faces_of_Sum; begin declare ipvt : Integer_Vectors.Vector(1..n); begin for i in ipvt'range loop ipvt(i) := i; end loop; sum := 0; Candidate_Faces_of_Sum(ipvt,1); end; end Enumerate_Faces_of_Sum; end Face_Enumerators; SHAR_EOF fi # end of overwriting check if test -f 'face_enumerators.ads' then echo shar: will not over-write existing file "'face_enumerators.ads'" else cat << "SHAR_EOF" > 'face_enumerators.ads' with Integer_Vectors; use Integer_Vectors; with Integer_Vectors_of_Vectors; package Face_Enumerators is -- DESCRIPTION : -- This package contains procedures which allow the efficient -- enumeration of all vertices, edges and k-faces of a polytope. -- The polytope is spanned by a given vector of points in a general -- dimensional vector space. -- In addition, a procedure has been added for enumerating all -- facets of a certain type of the sum of a tuple of polytopes. generic with procedure Process ( i : in integer; cont : out boolean ); procedure Enumerate_Vertices ( pts : in Integer_Vectors_of_Vectors.Vector ); -- DESCRIPTION : -- The vector pts contains the points which span the polytope. -- The candidate vertices are enumerated in order of occurrence in pts. -- Each time a vertex has been found, the procedure Process is invoked, -- which returns then the entry of the vertex in pts. -- When cont is set to false, the enumeration stops. generic with procedure Process ( i,j : in integer; cont : out boolean ); procedure Enumerate_Edges ( pts : in Integer_Vectors_of_Vectors.Vector ); -- DESCRIPTION : -- The vector pts contains the points which span the polytope. -- The candidate edges are enumerated in lexicographic order. -- Each time an edge has been found, the procedure Process is -- invoked, which returns the entries of the edge in pts. -- When cont is set to be false, the enumeration stops. generic with procedure Process ( i,j : in integer; cont : out boolean ); procedure Enumerate_Lower_Edges ( pts : in Integer_Vectors_of_Vectors.Vector ); -- DESCRIPTION : -- Enumerates only the edges on the lower hull of the polytope. generic with procedure Process ( face : in Vector; cont : out boolean ); -- REQUIRED : -- The range of face must be 0..k. procedure Enumerate_Faces ( k : in natural; pts : in Integer_Vectors_of_Vectors.Vector ); -- DESCRIPTION : -- The vector pts contains the points which span the polytope. -- A k-face is a face spanned by k affine linearly independent points. -- The candidate k-faces are enumerated in lexicographic order. -- Each time an edge has been found, the procedure Process is -- invoked, which returns the entries of the k-face in pts. -- When cont is set to be false, the enumeration stops. generic with procedure Process ( face : in Vector; cont : out boolean ); -- REQUIRED : -- The range of face must be 0..k. procedure Enumerate_Lower_Faces ( k : in natural; pts : in Integer_Vectors_of_Vectors.Vector ); -- DESCRIPTION : -- Enumerates only the k-faces on the lower hull of the polytope. generic with procedure Process ( faces : in Integer_Vectors_of_Vectors.Vector; cont : out boolean ); -- DESCRIPTION : -- The parameter faces has the following meaning: -- faces(i) contains the entries of points in pts which span -- the k-face of the ith polytope, with k = typ(i). -- When cont is set to false, the enumeration stops. procedure Enumerate_Faces_of_Sum ( ind,typ : in vector; k : in natural; pts : in Integer_Vectors_of_Vectors.Vector ); -- DESCRIPTION : -- Enumerates the points which span faces of a certain type -- of the polytope in lexicographic order. -- ON ENTRY : -- ind ind(i) indicates where the points of the ith polytope -- in the vector pts begin; -- typ typ(i) contains the dimension k of the k-face of the ith -- polytope which spans the facet of the sum; -- k sum of the entries in typ, must be less than -- or equal to the dimension of the space; -- pts contains all points of the polytopes. -- ON RETURN : -- Each time a face of the sum has been found, Process is invoked. end Face_Enumerators; SHAR_EOF fi # end of overwriting check if test -f 'face_enumerators_utilities.adb' then echo shar: will not over-write existing file "'face_enumerators_utilities.adb'" else cat << "SHAR_EOF" > 'face_enumerators_utilities.adb' with Greatest_Common_Divisor; use Greatest_Common_Divisor; with Integer_Vectors,Integer_Matrices; use Integer_Vectors,Integer_Matrices; with Integer_Linear_System_Solvers; use Integer_Linear_System_Solvers; package body Face_Enumerators_Utilities is function Is_Zero ( v : Integer_Vectors.Vector ) return boolean is begin for i in v'range loop if v(i) /= 0 then return false; end if; end loop; return true; end Is_Zero; function gcd ( v : Integer_Vectors.Vector ) return integer is g : integer := v(v'first); begin if g < 0 then g := -g; end if; if g /= 1 then for i in v'first+1..v'last loop if v(i) /= 0 then if v(i) < 0 then g := gcd(g,-v(i)); else g := gcd(g,v(i)); end if; end if; exit when (g = 1); end loop; end if; return g; end gcd; procedure Scale ( v : in out Integer_Vectors.Vector ) is g : integer := gcd(v); begin if (g /= 0) and then (g /= 1) then for i in v'range loop v(i) := v(i)/g; end loop; end if; end Scale; function Is_In ( x : integer; v : Integer_Vectors.Vector ) return boolean is begin for k in v'range loop if v(k) = x then return true; end if; end loop; return false; end Is_In; function In_Edge ( x,a,b : Integer_Vectors.Vector ) return boolean is ba,xa,piv : integer; begin for i in b'range loop -- look for first i: b(i) - a(i) /= 0 ba := b(i) - a(i); if ba /= 0 then piv := i; exit; end if; end loop; if ba = 0 then return Equal(x,a); -- in this case b = a, so test x = a else if ba < 0 then ba := -ba; xa := x(piv) - b(piv); else xa := x(piv) - a(piv); end if; if xa*ba >= 0 and then xa <= ba then return true; else return false; end if; end if; end In_Edge; function Last_Rows_Zero ( mat : matrix; frst : integer ) return boolean is -- DESCRIPTION : -- Returns true when the last rows of mat, starting at the index frst, -- are completely zero. function Zero_Row ( mat : matrix; i : integer ) return boolean is begin for j in mat'range(2) loop if mat(i,j) /= 0 then return false; end if; end loop; return true; end Zero_Row; begin for i in frst..mat'last(1) loop if not Zero_Row(mat,i) then return false; end if; end loop; return true; end Last_Rows_Zero; function In_Face ( k : in natural; face,x : Integer_Vectors.Vector; pts : Integer_Vectors_of_Vectors.Vector ) return boolean is mat : Integer_Matrices.Matrix(x'range,1..k+1); sol : Integer_Vectors.Vector(1..k+1) := (1..k+1 => 0); sum : integer := 0; begin if k = 0 then return (pts(face(face'first)).all = x); elsif k = 1 then return In_Edge(x,pts(face(face'first)).all, pts(face(face'first+1)).all); end if; -- put_line("Calling In_Face for "); -- put("x : "); put(x); new_line; -- for i in face'range loop -- put("pts("); put(face(i),1); put(") : "); put(pts(face(i))); new_line; -- end loop; -- compute the decomposition of x w.r.t. the face : for j in 1..k loop for i in mat'range(1) loop mat(i,j) := pts(face(j))(i) - pts(face(0))(i); end loop; end loop; for i in mat'range(1) loop mat(i,k+1) := x(i) - pts(face(0))(i); end loop; -- put_line("The matrix which defines the decomposition :"); Upper_Triangulate(mat); -- put(mat); if not Last_Rows_Zero(mat,k+2) then return false; else declare matk1 : matrix(1..k+1,1..k+1); begin for i in matk1'range(1) loop for j in matk1'range(2) loop matk1(i,j) := mat(i,j); end loop; end loop; Scale(matk1); Solve0(matk1,sol); -- put("The computed solution : "); put(sol); new_line; for i in 1..k loop if sol(i)*sol(k+1) > 0 then --put_line("x lies not in the face"); return false; else sum := sum + sol(i); end if; end loop; -- put("The sum : "); put(sum,1); new_line; if sum = 0 then --put_line("x lies not in the face"); return false; end if; if sol(k+1) < 0 then sol(k+1) := -sol(k+1); else sum := -sum; end if; if sum > sol(k+1) then --put_line("x lies not in the face"); return false; else --put_line("x lies in the face"); return true; end if; end; end if; end In_Face; end Face_Enumerators_Utilities; SHAR_EOF fi # end of overwriting check if test -f 'face_enumerators_utilities.ads' then echo shar: will not over-write existing file "'face_enumerators_utilities.ads'" else cat << "SHAR_EOF" > 'face_enumerators_utilities.ads' with Integer_Vectors; with Integer_Vectors_of_Vectors; package Face_Enumerators_Utilities is -- DESCRIPTION : -- This package contains utilities for the face enumerators. function Is_Zero ( v : Integer_Vectors.Vector ) return boolean; -- DESCRIPTION : -- Returns true if the given vector equals the zero vector. function gcd ( v : Integer_Vectors.Vector ) return integer; -- DESCRIPTION : -- Returns the greatest common divisor gcd(v(v'first),..,v(v'last)). procedure Scale ( v : in out Integer_Vectors.Vector ); -- DESCRIPTION : -- Divides each element in v by gcd(v), when gcd(v) /= 0 of course. function Is_In ( x : integer; v : Integer_Vectors.Vector ) return boolean; -- DESCRIPTION : -- Returns true if there exists an entry in v, say v(k), -- such that v(k) = x. function In_Edge ( x,a,b : Integer_Vectors.Vector ) return boolean; -- DESCRIPTION : -- Returns true if the vector x lies between a and b. function In_Face ( k : in natural; face,x : Integer_Vectors.Vector; pts : Integer_Vectors_of_Vectors.Vector ) return boolean; -- DESCRIPTION : -- Returns true if x lies in the given k-face, which contains entries -- to its elements in pts. end Face_Enumerators_Utilities; SHAR_EOF fi # end of overwriting check if test -f 'farkas_lemma.adb' then echo shar: will not over-write existing file "'farkas_lemma.adb'" else cat << "SHAR_EOF" > 'farkas_lemma.adb' --with text_io,integer_io; use text_io,integer_io; --with Integer_Vectors_io; use Integer_Vectors_io; --with Float_Vectors_io; use Float_Vectors_io; --with Float_Matrices_io; use Float_Matrices_io; with Mathematical_Functions; use Mathematical_Functions; with Givens_Rotations; use Givens_Rotations; package body Farkas_Lemma is -- use Floating_Point_Numbers.double_float_io; -- USAGE OF LP : procedure Is_In_Cone ( tab : in out matrix; lastcol : in integer; rhs : in out vector; tol : in double_float; solution : out vector; columns : out Integer_Vectors.Vector; feasible : out boolean ) is -- ALGORITHM: -- The following linear program will be solved: -- -- min u_1 + .. + u_n -- -- l_1*p_1i + l_2*p_2i + .. + l_m*p_mi + u_i*q_i = q_i i=1,2,..,n -- -- to determine whether q belongs to the cone spanned by the -- vectors p_1,p_2,..,p_m. -- If all u_i are zero and all constraints are satisfied, -- then q belongs to the cone spanned by the vectors. -- CONSTANTS : n : constant natural := rhs'last; m : constant natural := 2*n; -- number of constraints nb : constant natural := lastcol+n; -- number of unknowns -- VARIABLES : mat : matrix(0..m,0..nb); sol : Float_Vectors.vector(1..nb) := (1..nb => 0.0); bas : Integer_Vectors.Vector(1..m) := (1..m => 0); slk : Integer_Vectors.Vector(1..nb) := (1..nb => 0); cnt : natural; s : double_float; begin -- INITIALIZATION OF THE TARGET : for i in 0..(nb-n) loop mat(0,i) := 0.0; -- sum of the lambda's end loop; for i in (nb-n+1)..nb loop mat(0,i) := -1.0; -- sum of the mu's end loop; -- INITIALIZATION OF THE CONSTRAINTS : for i in 1..n loop for j in (nb-n+1)..nb loop if i /= j-nb+n then mat(i,j) := 0.0; mat(i+n,j) := 0.0; end if; end loop; end loop; for j in tab'first(2)..lastcol loop for i in tab'range(1) loop mat(i,j) := -tab(i,j); mat(i+n,j) := tab(i,j); end loop; end loop; for i in rhs'range loop mat(i,0) := -rhs(i); mat(i+n,0) := rhs(i); mat(i,i+nb-n) := -rhs(i); mat(i+n,i+nb-n) := rhs(i); end loop; -- SOLVE THE LINEAR PROGRAM : -- New_Tableau.Init_Basis(nb,bas,slk); -- Dual_Simplex(mat,sol,bas,slk,tol,false); -- RETURN AND CHECK THE SOLUTION : cnt := 0; for i in tab'first(2)..lastcol loop if abs(sol(i)) > tol then cnt := cnt + 1; solution(cnt) := sol(i); columns(cnt) := i; end if; end loop; s := 0.0; for i in (nb-n+1)..nb loop s := s + sol(i); end loop; if abs(s) > tol then feasible := false; return; end if; feasible := true; end Is_In_Cone; -- AUXILIARIES : function Index_of_Maximum ( v : vector; lst : integer ) return integer is -- DESCRIPTION : -- Returns the index in the vector v(v'first..lst) for which the maximum -- is obtained. res : integer := v'first; max : double_float := v(res); begin for i in v'first+1..lst loop if v(i) > max then max := v(i); res := i; end if; end loop; return res; end Index_of_Maximum; function Norm ( v : vector ) return double_float is -- DESCRIPTION : -- Returns the 2-norm of the vector. res : double_float := 0.0; begin for j in v'range loop res := res + v(j)*v(j); end loop; if res + 1.0 = 1.0 then return 0.0; else return SQRT(res); end if; end Norm; function Norm ( v : vector; frst : integer ) return double_float is -- DESCRIPTION : -- Returns the 2-norm of the vector v(frst..v'last). res : double_float := 0.0; begin for j in frst..v'last loop res := res + v(j)*v(j); end loop; if res + 1.0 = 1.0 then return 0.0; else return SQRT(res); end if; end Norm; procedure Scale ( v : in out vector ) is -- DESCRIPTION : -- Returns the normed vector, i.e. v/Norm(v). nrm : double_float := Norm(v); begin if nrm + 1.0 /= 1.0 then for i in v'range loop v(i) := v(i)/nrm; end loop; end if; end Scale; function Norm ( mat : matrix; i : integer ) return double_float is -- DESCRIPTION : -- Returns the 2-norm of the ith column in the matrix. res : double_float := 0.0; begin for j in mat'range(1) loop res := res + mat(j,i)*mat(j,i); end loop; if res + 1.0 = 1.0 then return 0.0; else return SQRT(res); end if; end Norm; procedure Scale ( mat : in out matrix; lastcolumn : in integer ) is -- DESCRIPTION : -- Scales the columns in the matrix, by dividing by their norm. nrm : double_float; begin for i in mat'first(2)..lastcolumn loop nrm := Norm(mat,i); if nrm + 1.0 /= 1.0 then for j in mat'range(1) loop mat(j,i) := mat(j,i)/nrm; end loop; end if; end loop; end Scale; function Inner_Product ( mat : matrix; i : integer; v : vector ) return double_float is -- DESCRIPTION : -- Computes the inner product of the given vector v and the vector -- in the ith column of the matrix. res : double_float := 0.0; begin for k in mat'range(1) loop res := res + mat(k,i)*v(k); end loop; return res; end Inner_Product; function Maximal_Product ( mat : matrix; i : integer; v : vector; frst : integer ) return integer is -- DESCRIPTION : -- Returns the index in v(frst..v'last) for which mat(index,i)*v(index) -- becomes maximal. res : integer := frst; max : double_float := mat(res,i)*v(res); tmp : double_float; begin for j in frst+1..v'last loop tmp := mat(j,i)*v(j); if tmp > max then max := tmp; res := j; end if; end loop; return res; end Maximal_Product; function Inner_Product ( mat : matrix; i,j : integer ) return double_float is -- DESCRIPTION : -- Computes the inner product of the vectors in the columns i and j -- of the matrix. res : double_float := 0.0; begin for k in mat'range(1) loop res := res + mat(k,i)*mat(k,j); end loop; return res; end Inner_Product; function Inner_Products ( mat : matrix; lastcol : integer; v : vector ) return vector is -- DESCRIPTION : -- Returns a vector with all inner products of the given vector -- and the column vectors of the matrix. res : vector(mat'first(2)..lastcol); begin for i in res'range loop res(i) := Inner_Product(mat,i,v); end loop; return res; end Inner_Products; function Positive ( v : vector; lst : integer; tol : double_float ) return boolean is -- DESCRIPTION : -- Returns true if all elements in v(v'first..lst) are >= 0. begin for i in v'first..lst loop if abs(v(i)) > tol and then (v(i) < 0.0) then return false; end if; end loop; return true; end Positive; function Positive ( mat : matrix; rhs : vector; ind,col : integer; solind : double_float; tol : double_float ) return boolean is -- DESCRIPTION : -- The given matrix is upper triangular up to the column indicated -- by ind. This function returns true when by replacing column ind -- by column col, a positive solution would be obtained. -- The number solind is sol(ind) in the solution vector. sol : vector(1..ind) := (1..ind => 0.0); begin sol(ind) := solind; for i in reverse mat'first(1)..(ind-1) loop for j in i+1..(ind-1) loop sol(i) := sol(i) + mat(i,j)*sol(j); end loop; sol(i) := sol(i) + mat(i,col)*sol(ind); sol(i) := (rhs(i) - sol(i))/mat(i,i); if (abs(sol(i)) > tol) and then (sol(i) < 0.0) then --put_line("The solution before returning false : "); --put(sol,3,3,3); new_line; return false; end if; end loop; --put_line("The solution before returning true : "); --put(sol,3,3,3); new_line; return true; end Positive; function Positive_Diagonal ( mat : matrix; rhs : vector; ind,col : integer; solind : double_float; tol : double_float ) return boolean is -- DESCRIPTION : -- The given matrix is diagonal up to the column indicated -- by ind. This function returns true when by replacing column ind -- by column col, a positive solution would be obtained. -- The number solind is sol(ind) in the solution vector. sol : vector(1..ind) := (1..ind => 0.0); begin sol(ind) := solind; for i in reverse mat'first(1)..(ind-1) loop sol(i) := (rhs(i) - mat(i,col)*sol(ind))/mat(i,i); if (abs(sol(i)) > tol) and then (sol(i) < 0.0) then --put_line("The solution before returning false : "); --put(sol,3,3,3); new_line; return false; end if; end loop; --put_line("The solution before returning true : "); --put(sol,3,3,3); new_line; return true; end Positive_Diagonal; -- PIVOTING PROCEDURES : procedure Interchange ( v : in out vector; i,j : in integer ) is -- DESCRIPTION : -- The entries v(i) and v(j) are interchanged. temp : double_float; begin temp := v(i); v(i) := v(j); v(j) := temp; end Interchange; procedure Interchange_Columns ( mat : in out matrix; i,j : in integer ) is -- DESCRIPTION : -- The columns i and j of the given matrix are interchanged. temp : double_float; begin for k in mat'range(1) loop temp := mat(k,i); mat(k,i) := mat(k,j); mat(k,j) := temp; end loop; end Interchange_Columns; procedure Interchange_Rows ( mat : in out matrix; lastcol : in integer; v : in out vector; i,j : in integer ) is -- DESCRIPTION : -- The rows i and j of the given matrix and vector are interchanged. temp : double_float; begin for k in mat'first(2)..lastcol loop temp := mat(i,k); mat(i,k) := mat(j,k); mat(j,k) := temp; end loop; temp := v(i); v(i) := v(j); v(j) := temp; end Interchange_Rows; procedure Rotate ( mat : in out matrix; lastcol,i : in integer; v : in out vector; tol : in double_float ) is -- DESCRIPTION : -- Performs Givens rotations on the matrix and vector such that -- mat(j,i) = 0, for all j > i. -- NOTE : -- A diagonalization procedure constructs an orthonormal basis -- and does not preserve the angles between the vectors. cosi,sine : double_float; begin for j in i+1..mat'last(1) loop if abs(mat(j,i)) > tol then Givens_Factors(mat,i,j,cosi,sine); Givens_Rotation(mat,lastcol,i,j,cosi,sine); Givens_Rotation(v,i,j,cosi,sine); end if; end loop; end Rotate; procedure Upper_Triangulate ( mat : in out matrix; lastcol,i : in integer; v : in out vector; tol : in double_float ) is -- DESCRIPTION : -- Makes the upper diagonal elements of the ith colume zero: -- mat(j,i) = 0, for all j /= i. fac : double_float; begin for j in mat'first(1)..(i-1) loop if (abs(mat(j,i)) > tol) then fac := mat(j,i)/mat(i,i); for k in i..lastcol loop mat(j,k) := mat(j,k) - fac*mat(i,k); end loop; end if; end loop; end Upper_Triangulate; -- INITIALIZE : COMPUTE CLOSEST VECTOR TO RHS procedure Initialize ( tableau : in out matrix; lastcol : in integer; rhs,sol : in out vector; tol : in double_float; columns : in out Integer_Vectors.Vector; cosines : out vector; feasible : out boolean ) is -- DESCRIPTION : -- Scales the tableau and right hand side by dividing by its norm. -- Then computes the vector of cosines. -- If no vector with positive cosine with the right hand side vector -- can be found, then the problem is not feasible, otherwise, -- the vector with largest positive cosine will be the first column. -- At last, this first column will be transformed to the unit vector, -- by means of Givens rotations. -- Then the first solution component equals the first component of -- the transformed right hand side vector. ips : vector(tableau'first(2)..lastcol); index : integer; begin Scale(tableau,lastcol); Scale(rhs); -- put_line("The tableau after scaling : "); put(tableau,3,3,3); -- put_line(" with scaled right hand side : "); put(rhs,3,3,3); new_line; ips := Inner_Products(tableau,lastcol,rhs); index := Index_of_Maximum(ips,lastcol); if (abs(ips(index)) < tol) or else (ips(index) < 0.0) then if index <= rhs'last then feasible := (abs(rhs(index)) < tol); else feasible := false; end if; else feasible := true; columns(columns'first) := index; columns(index) := columns'first; Interchange_Columns(tableau,tableau'first(2),index); Interchange(ips,tableau'first(2),index); index := Maximal_Product(tableau,tableau'first(2),rhs,rhs'first); if index /= tableau'first(2) then Interchange_Rows(tableau,lastcol,rhs,tableau'first(2),index); end if; Rotate(tableau,lastcol,tableau'first(2),rhs,tol); -- Upper_Triangulate(tableau,lastcol,tableau'first(2),rhs,tol); sol(sol'first) := rhs(rhs'first); end if; cosines := ips; -- put_line("At the end of Initialize : "); -- put(" cosines : "); put(ips,3,3,3); new_line; -- put_line("The tableau : "); put(tableau,3,3,3); -- put_line(" with right hand side : "); put(rhs,3,3,3); new_line; -- put(" and last column "); put(lastcol,1); new_line; end Initialize; procedure Initialize ( tableau : in out matrix; lastcol : in integer; rhs,sol : in out vector; tol : in double_float; columns : in out Integer_Vectors.Vector; feasible : out boolean ) is -- DESCRIPTION : -- Scales the tableau and right hand side by dividing by its norm. -- Then computes the vector of cosines. -- If no vector with positive cosine with the right hand side vector -- can be found, then the problem is not feasible, otherwise, -- the vector with largest positive cosine will be the first column. -- At last, this first column will be transformed to the unit vector, -- by means of Givens rotations. -- Then the first solution component equals the first component of -- the transformed right hand side vector. ips : vector(tableau'first(2)..lastcol); index : integer; begin Scale(tableau,lastcol); Scale(rhs); -- put_line("The tableau after scaling : "); put(tableau,3,3,3); -- put_line(" with scaled right hand side : "); put(rhs,3,3,3); new_line; ips := Inner_Products(tableau,lastcol,rhs); index := Index_of_Maximum(ips,lastcol); if (abs(ips(index)) < tol) or else (ips(index) < 0.0) then if index <= rhs'last then feasible := (abs(rhs(index)) < tol); else feasible := false; end if; else feasible := true; columns(columns'first) := index; columns(index) := columns'first; Interchange_Columns(tableau,tableau'first(2),index); index := Maximal_Product(tableau,tableau'first(2),rhs,rhs'first); if index /= tableau'first(2) then Interchange_Rows(tableau,lastcol,rhs,tableau'first(2),index); end if; Rotate(tableau,lastcol,tableau'first(2),rhs,tol); -- Upper_Triangulate(tableau,lastcol,tableau'first(2),rhs,tol); sol(sol'first) := rhs(rhs'first); end if; -- put_line("At the end of Initialize : "); -- put_line("The tableau : "); put(tableau,3,3,3); -- put_line(" with right hand side : "); put(rhs,3,3,3); new_line; -- put(" and last column "); put(lastcol,1); new_line; end Initialize; -- PERFORM THE NEXT STEPS : procedure Select_Column ( mat : in matrix; lastcol : in integer; rhs,cosines : in vector; index : in integer; tol : in double_float; row,col : out integer ) is -- DESCRIPTION : -- Selects a column col with in matrix for which -- 1) the cosine is maximal and -- 2) row = Maximal_Product(mat,col,rhs,index), with mat(row,col) > 0.0 -- If the resulting column is smaller than index, then no such column -- has been found. cl : integer := index; maxcos,prod : double_float; rw : integer := Maximal_Product(mat,cl,rhs,index); mp : integer; begin -- put_line("The tableau when Select_Column :"); put(mat,3,3,3); -- put_line(" with right hand side : "); put(rhs,3,3,3); new_line; -- put_line("and vector of cosines : "); put(cosines,3,3,3); new_line; -- put("The index : "); put(index,1); new_line; prod := mat(rw,cl)*rhs(rw); if prod > tol and then Positive(mat,rhs,index,cl,rhs(rw)/mat(rw,cl),tol) -- Positive_Diagonal(mat,rhs,index,cl,rhs(rw)/mat(rw,cl),tol) then maxcos := cosines(cl); else maxcos := -2.0; end if; for i in index+1..lastcol loop mp := Maximal_Product(mat,i,rhs,index); -- put("mp : "); put(mp,1); put(" when testing "); put(i,1); -- put_line("th column"); prod := mat(mp,i)*rhs(mp); if prod > tol and then cosines(i) > maxcos then if Positive(mat,rhs,index,i,rhs(mp)/mat(mp,i),tol) -- Positive_Diagonal(mat,rhs,index,i,rhs(mp)/mat(mp,i),tol) then cl := i; rw := mp; maxcos := cosines(i); end if; end if; end loop; -- put("maximal cosine : "); put(maxcos,3,3,3); new_line; if maxcos >= -1.0 then col := cl; row := rw; -- put("column : "); put(cl,1); -- put(" and row : "); put(rw,1); new_line; else col := index-1; row := index-1; -- put("column : "); put(index-1,1); -- put(" and row : "); put(index-1,1); new_line; end if; end Select_Column; procedure Select_Column ( mat : in matrix; lastcol : in integer; rhs : in vector; index,column : in integer; tol : in double_float; row,col : out integer ) is -- DESCRIPTION : -- Selects first column col with in matrix for which -- row = Maximal_Product(mat,col,rhs,index), with mat(row,col) > 0.0. -- If the resulting column is smaller than index, then no such column -- has been found. cl : integer := index-1; prod : double_float; rw,mp : integer; begin -- put_line("The tableau when Select_Column :"); put(mat,3,3,3); -- put_line(" with right hand side : "); put(rhs,3,3,3); new_line; -- put("The index : "); put(index,1); new_line; for i in column..lastcol loop mp := Maximal_Product(mat,i,rhs,index); -- put("mp : "); put(mp,1); put(" when testing "); put(i,1); -- put_line("th column"); prod := mat(mp,i)*rhs(mp); if prod > tol and then Positive(mat,rhs,index,i,rhs(mp)/mat(mp,i),tol) -- Positive_Diagonal(mat,rhs,index,i,rhs(mp)/mat(mp,i),tol) then cl := i; rw := mp; end if; exit when (cl >= index); end loop; if cl >= index then col := cl; row := rw; -- put("column : "); put(cl,1); -- put(" and row : "); put(rw,1); new_line; else col := index-1; row := index-1; -- put("column : "); put(index-1,1); -- put(" and row : "); put(index-1,1); new_line; end if; end Select_Column; procedure Next ( tableau : in out matrix; lastcol : in integer; rhs,sol,cosines : in out vector; pivots : in out Integer_Vectors.Vector; tol : in double_float; index : in integer; feasi : in out boolean ) is -- DESCRIPTION : -- Selects one new column out of the tableau. -- ON ENTRY : -- tableau upper triangular up to the row and column index-1; -- lastcol index of the last column of interest in the tableau; -- rhs right hand side vector; -- sol solution vector for the components 1..index; -- cosines vector of cosines; -- pivots vector of column interchangements; -- tol tolerance to decide whether a number equals zero; -- index indicator of the current step; -- feasi must be true on entry. -- ON RETURN : -- tableau upper triangular up to the row and column index, -- under the condition that feasi remains true; -- rhs transformed right hand side vector; -- sol new solution, with additional meaningful component -- sol(index); -- cosines eventually permuted vector of cosines: -- cosines(index) is the cosine of the (new) column, -- indicated by index, and the right hand side vector; -- pivots updated vector of column interchangements; -- feasi if true, then a new column which yields a positive -- contribution of the right hand side vector has been -- found, if this was not the case, then feasi is false; col,row,tmp : integer; begin Select_Column(tableau,lastcol,rhs,cosines,index,tol,row,col); if col < index then feasi := false; else feasi := true; if col /= index then tmp := pivots(col); pivots(col) := pivots(index); pivots(index) := tmp; Interchange_Columns(tableau,col,index); Interchange(cosines,col,index); end if; if row /= index then Interchange_Rows(tableau,lastcol,rhs,row,index); end if; Rotate(tableau,lastcol,index,rhs,tol); -- Upper_Triangulate(tableau,lastcol,index,rhs,tol); -- Solve(tableau,rhs,tol,index,sol); -- only needed at end -- feasi := Positive(sol,index,tol); -- double check... end if; end Next; procedure Next ( tableau : in out matrix; lastcol : in integer; rhs,sol : in out vector; pivots : in out Integer_Vectors.Vector; tol : in double_float; index : in integer; rank : out integer; feasi : in out boolean ) is -- DESCRIPTION : -- Lexicographic enumeration of the candidates, stops when a feasible -- solution is encountered. -- ON ENTRY : -- tableau upper triangular up to the row and column index-1; -- lastcol index of the last column of interest in the tableau; -- rhs right hand side vector; -- sol solution vector for the components 1..index; -- pivots vector of column interchangements; -- tol tolerance to decide whether a number equals zero; -- index indicator of the current step; -- feasi must be true on entry. -- ON RETURN : -- tableau upper triangular up to the row and column index, -- under the condition that feasi remains true; -- rhs transformed right hand side vector; -- sol new solution, with additional meaningful component -- sol(index); -- pivots updated vector of column interchangements; -- rank rank of the current tableau; -- feasi if true, then a new column which yields a positive -- contribution of the right hand side vector has been -- found, if this was not the case, then feasi is false; column,col,row,tmp : integer; stop : boolean := false; begin column := index; loop Select_Column(tableau,lastcol,rhs,index,column,tol,row,col); if col < column then feasi := false; stop := true; else feasi := true; if col /= index then tmp := pivots(col); pivots(col) := pivots(index); pivots(index) := tmp; Interchange_Columns(tableau,col,index); end if; if row /= index then Interchange_Rows(tableau,lastcol,rhs,row,index); end if; Rotate(tableau,lastcol,index,rhs,tol); -- Upper_Triangulate(tableau,lastcol,index,rhs,tol); if (index = lastcol) or else (index = tableau'last(1)) or else (Norm(rhs,index+1) < tol) then stop := true; rank := index; else Next(tableau,lastcol,rhs,sol,pivots,tol,index+1,rank,feasi); if feasi then stop := true; else column := col+1; end if; end if; end if; exit when stop; end loop; end Next; procedure Complementary_Slackness ( tableau : in out matrix; rhs : in out vector; tol : in double_float; solution : out vector; columns : out Integer_Vectors.Vector; feasible : out boolean ) is begin Complementary_Slackness (tableau,tableau'last(2),rhs,tol,solution,columns,feasible); end Complementary_Slackness; procedure Complementary_Slackness1 ( tableau : in out matrix; lastcol : in integer; rhs : in out vector; tol : in double_float; solution : out vector; columns : out Integer_Vectors.Vector; feasible : out boolean ) is -- NOTE : -- This version is a straigth forward search and finds not always -- the feasible solution. feasi : boolean; pivots : Integer_Vectors.Vector(tableau'first(2)..lastcol); cosis : vector(tableau'first(2)..lastcol); sol : Vector(rhs'range) := (rhs'range => 0.0); rank : integer; begin for i in pivots'range loop -- initialize vector of pivots pivots(i) := i; end loop; Initialize(tableau,lastcol,rhs,sol,tol,pivots,cosis,feasi); if feasi then if Norm(rhs,rhs'first+1) > tol -- check whether residual > 0 then if tableau'first(1)+1 > lastcol then feasi := false; else rank := 1; for i in tableau'first(1)+1..tableau'last(1) loop Next(tableau,lastcol,rhs,sol,cosis,pivots,tol,i,feasi); exit when not feasi; exit when (i = lastcol); rank := rank + 1; exit when (Norm(rhs,i+1) < tol); end loop; if feasi then Solve(tableau,rhs,tol,rank,sol); end if; end if; end if; if feasi and then (tableau'last(1) > lastcol) then feasi := (Norm(rhs,lastcol+1) < tol); end if; if feasi and then (Norm(sol) < tol) then feasi := (Norm(rhs) < tol); end if; solution := sol; if tableau'last(1) <= lastcol then for i in tableau'range(1) loop columns(i) := pivots(i); end loop; else for i in tableau'first(2)..lastcol loop columns(i) := pivots(i); end loop; end if; end if; feasible := feasi; end Complementary_Slackness1; procedure Complementary_Slackness ( tableau : in out matrix; lastcol : in integer; rhs : in out vector; tol : in double_float; solution : out vector; columns : out Integer_Vectors.Vector; feasible : out boolean ) is -- NOTE : -- This version enumerates in a lexicographic order all candidates -- for entering the basis and stops when a feasible solution has been -- found. feasi : boolean; pivots : Integer_Vectors.Vector(tableau'first(2)..lastcol); sol : Vector(rhs'range) := (rhs'range => 0.0); ind,rank : integer; begin for i in pivots'range loop -- initialize vector of pivots pivots(i) := i; end loop; Initialize(tableau,lastcol,rhs,sol,tol,pivots,feasi); if feasi then if Norm(rhs,rhs'first+1) > tol -- check whether residual > 0 then if tableau'first(1)+1 > lastcol then feasi := false; else ind := tableau'first(1)+1; Next(tableau,lastcol,rhs,sol,pivots,tol,ind,rank,feasi); if feasi then Solve(tableau,rhs,tol,rank,sol); end if; end if; end if; if feasi and then (tableau'last(1) > lastcol) then feasi := (Norm(rhs,lastcol+1) < tol); end if; if feasi and then (Norm(sol) < tol) then feasi := (Norm(rhs) < tol); end if; solution := sol; if tableau'last(1) <= lastcol then for i in tableau'range(1) loop columns(i) := pivots(i); end loop; else for i in tableau'first(2)..lastcol loop columns(i) := pivots(i); end loop; end if; end if; feasible := feasi; end Complementary_Slackness; procedure Complementary_Slackness2 ( tableau : in out matrix; lastcol : in integer; rhs : in out vector; tol : in double_float; solution : out vector; columns : out Integer_Vectors.Vector; feasible : out boolean ) is -- NOTE : -- This version explicitly uses linear programming. begin Is_In_Cone(tableau,lastcol,rhs,tol,solution,columns,feasible); end Complementary_Slackness2; end Farkas_Lemma; SHAR_EOF fi # end of overwriting check if test -f 'farkas_lemma.ads' then echo shar: will not over-write existing file "'farkas_lemma.ads'" else cat << "SHAR_EOF" > 'farkas_lemma.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; with Integer_Vectors; with Float_Vectors,Float_Matrices; use Float_Vectors,Float_Matrices; package Farkas_Lemma is -- DESCRIPTION : -- This procedure contains some routines for verifying the Farkas lemma. procedure Complementary_Slackness ( tableau : in out matrix; lastcol : in integer; rhs : in out vector; tol : in double_float; solution : out vector; columns : out Integer_Vectors.Vector; feasible : out boolean ); procedure Complementary_Slackness ( tableau : in out matrix; rhs : in out vector; tol : in double_float; solution : out vector; columns : out Integer_Vectors.Vector; feasible : out boolean ); -- DESCRIPTION : -- Solves the complementary slackness problem: determines -- whether there exists a positive combination of the columns -- such that the right hand side is satisfied. -- REQUIRED : -- rhs'range = solution'range = columns'range = tableau'range(1) -- ON ENTRY : -- tableau inequalities as columns; -- lastcol indicates the last significant column in the tableau, -- if not given, then lastcol = tableau'last(2); -- tol tolerance to decide whether a number equals zero. -- rhs right hand side vector; -- ON RETURN : -- tableau modified tableau of inequalities; -- rhs modified right hand side; -- solution the computed solution; -- columns indicates which columns has been used; -- feasible if true then the solution is feasible. end Farkas_Lemma; SHAR_EOF fi # end of overwriting check if test -f 'float_face_enumerators.adb' then echo shar: will not over-write existing file "'float_face_enumerators.adb'" else cat << "SHAR_EOF" > 'float_face_enumerators.adb' with Float_Vectors,Float_Matrices; use Float_Vectors,Float_Matrices; with Givens_Rotations,Farkas_Lemma; use Givens_Rotations,Farkas_Lemma; package body Float_Face_Enumerators is -- AUXILIARIES : function Is_In ( x : integer; v : Integer_Vectors.Vector ) return boolean is -- DESCRIPTION : -- Returns true if there exists an entry k in v, with v(k) = x. begin for k in v'range loop if v(k) = x then return true; end if; end loop; return false; end Is_In; function Is_Zero ( v : Float_Vectors.Vector; tol : double_float ) return boolean is -- DESCRIPTION : -- Returns true if abs(v(i)) < tol, for all i in v'range. begin for i in v'range loop if abs(v(i)) > tol then return false; end if; end loop; return true; end Is_Zero; function In_Edge ( x,a,b : Float_Vectors.Vector; tol : double_float ) return boolean is -- DESCRIPTION : -- Returns true if the vector x lies between a and b. ba,xa : double_float; piv : integer; begin for i in b'range loop -- look for first i: b(i) - a(i) /= 0 ba := b(i) - a(i); if abs(ba) > tol then piv := i; exit; end if; end loop; if abs(ba) < tol then return Equal(x,a); -- in this case b = a, so test x = a else if ba < 0.0 then ba := -ba; xa := x(piv) - b(piv); else xa := x(piv) - a(piv); end if; if xa*ba >= 0.0 and then xa <= ba then return true; else return false; end if; end if; end In_Edge; function Convex_Decomposition ( k : natural; face : Integer_Vectors.Vector; x : Float_Vectors.Vector; pts : Float_Vectors_of_Vectors.Vector; tol : double_float ) return boolean is -- DESCRIPTION : -- Decomposes the vector x in terms of the k+1 points of pts(face(*)). -- Returns true if x can be written as a convex combination. mat : Float_Matrices.Matrix(x'range,1..k); rhs : Float_Vectors.Vector(x'range) := x; sol : Float_Vectors.Vector(1..k) := (1..k => 0.0); ipvt : Integer_Vectors.Vector(1..k); sum : double_float := 0.0; begin for j in 1..k loop for i in mat'range(1) loop mat(i,j) := pts(face(j))(i) - pts(face(0))(i); end loop; ipvt(j) := j; end loop; Upper_Triangulate(mat,rhs,tol,ipvt); for j in k+1..rhs'last loop if abs(rhs(j)) > tol then return false; end if; end loop; Solve(mat,rhs,tol,sol); for j in sol'range loop if sol(j) < -tol then return false; else sum := sum + sol(j); end if; end loop; return (abs(sum-1.0) < tol); end Convex_Decomposition; function In_Face ( k : in natural; face : Integer_Vectors.Vector; x : Float_Vectors.Vector; pts : Float_Vectors_of_Vectors.Vector; tol : double_float ) return boolean is -- DESCRIPTION : -- Returns true if x lies in the given k-face, which contains entries -- to its elements in pts. This means that we have to verify whether -- the vector x can be written as a convex combination of the points -- in the face. begin if k = 0 then return Equal(pts(face(face'first)).all,x); elsif k = 1 then return In_Edge(x,pts(face(face'first)).all, pts(face(face'first+1)).all,tol); else return Convex_Decomposition(k,face,x,pts,tol); end if; end In_Face; -- ELIMINATE TO MAKE UPPER TRIANGULAR : procedure Eliminate ( pivot : in integer; elim : in Float_Vectors.Vector; target : in out Float_Vectors.Vector ) is -- DESCRIPTION : -- Makes target(pivot) = 0.0 by means of making a linear -- combination of the vectors target and elim. -- Note that target is viewed as an inequality, so that we make sure -- to multiply it only with a positive number. -- REQUIRED : abs(target(pivot)) > tol and abs(elim(pivot)) > tol. a,b,tarfac,elifac : double_float; begin a := elim(pivot); b := target(pivot); if a > 0.0 then tarfac := a; elifac := b; else tarfac := -a; elifac := -b; end if; for j in target'range loop target(j) := tarfac*target(j) - elifac*elim(j); end loop; end Eliminate; procedure Eliminate ( l : in natural; pivots : in Integer_Vectors.Vector; elim : in Float_Vectors_of_Vectors.Vector; tol : in double_float; target : in out Float_Vectors.Vector ) is -- DESCRIPTION : -- Makes target(pivots(i)) = 0 by means of making a linear -- combination of the vectors target and elim(i), for i in 1..l. -- REQUIRED : elim(i)(pivots(i))) > tol. begin for i in 1..l loop if abs(target(pivots(i))) > tol then Eliminate(pivots(i),elim(i).all,target); end if; end loop; end Eliminate; function Pivot_after_Elimination ( l,k : in natural; point : Float_Vectors.Vector; face,pivots : Integer_Vectors.Vector; elim : Float_Vectors_of_Vectors.Vector; tol : double_float ) return natural is -- DESCRIPTION : -- Returns the first nonzero element of the given point after elimination -- w.r.t. the entries in the face with lower index. work : Float_Vectors.Vector(point'range) := point - elim(1-k).all; pivot : integer; begin for i in (face'first+1)..face'last loop if (face(i) < l) and then (abs(work(pivots(i))) > tol) then Eliminate(pivots(i),elim(i).all,work); end if; exit when (face(i) > l); end loop; pivot := 0; for i in work'range loop if abs(work(pivots(i))) > tol then pivot := i; end if; exit when (pivot /= 0); end loop; return pivot; end Pivot_after_Elimination; procedure Update_Pivots ( point : in Float_Vectors.Vector; l : in natural; pivots : in out Integer_Vectors.Vector; tol : in double_float; pivot : out natural ) is -- DESCRIPTION : -- Searches in the point(l..point'last) for the first nonzero entry -- and updates the pivoting information. temp,piv : integer; begin piv := 0; for i in l..point'last loop if abs(point(pivots(i))) > tol then piv := i; end if; exit when (piv /= 0); end loop; if piv /= 0 and then (piv /= l) then temp := pivots(l); pivots(l) := pivots(piv); pivots(piv) := temp; end if; pivot := piv; end Update_Pivots; procedure Update_Eliminator ( elim : in out Float_Vectors_of_Vectors.Vector; l : in natural; pivots : in out Integer_Vectors.Vector; point : in Float_Vectors.Vector; tol : in double_float; pivot : out natural ) is -- DESCRIPTION : -- Updates the vector of eliminators, by adding the lth elimination -- equation. This procedure ensures the invariant condition on the -- eliminator, which has to be upper triangular. If this cannot be -- achieved, degeneracy is indicated by pivot = 0. -- ON ENTRY : -- elim vector of elimination equations: elim(i)(pivots(i)) /= 0 -- and for j in 1..(i-1) : elim(i)(pivots(j)) = 0, -- for i in 1..(l-1), elim(0) contains the basis point; -- l index of current elimination equation to be made; -- pivots contains the pivoting information; -- tol tolerance on the precision; -- point new point to make the equation `point - elim(0) = 0'. -- ON RETURN : -- elim if not degen, then elim(l)(pivots(l)) /= 0 and -- for i in 1..(l-1): elim(l)(pivots(i)) = 0; -- pivots updated pivot information; -- pivot the pivot that has been used for elim(l)(pivots(l)) /= 0; -- piv = 0 when the new elimination equation elim(l) -- became entirely zero after ensuring the invariant condition. begin elim(l) := new Float_Vectors.Vector'(point - elim(0).all); Eliminate(l-1,pivots,elim,tol,elim(l).all); Update_Pivots(elim(l).all,l,pivots,tol,pivot); end Update_Eliminator; procedure Update_Eliminator_for_Sum ( elim : in out Float_Vectors_of_Vectors.Vector; l : in natural; pivots : in out Integer_Vectors.Vector; point : in Float_Vectors.Vector; index : in natural; tol : in double_float; pivot : out natural ) is -- DESCRIPTION : -- Updates the vector of eliminators, by adding the lth elimination -- equation. This procedure ensures the invariant condition on the -- eliminator, which has to be upper triangular. If this cannot be -- achieved, degeneracy is indicated by pivot = 0. -- ON ENTRY : -- elim vector of elimination equations: elim(i)(pivots(i)) /= 0 -- and for j in 1..(i-1) : elim(i)(pivots(j)) = 0, -- for i in 1..(l-1), elim(1-index) contains the basis point; -- l index of current elimination equation to be made; -- pivots contains the pivoting information; -- point new point to make the equation `point - elim(1-index) = 0'; -- index indicates the current polytope; -- tol tolerance for precision. -- ON RETURN : -- elim if not degen, then elim(l)(pivots(l)) /= 0 and -- for i in 1..(l-1): elim(l)(pivots(i)) = 0; -- pivots updated pivot information; -- piv the pivot that has been used for elim(l)(pivots(l)) /= 0; -- piv = 0 when the new elimination equation elim(l) -- became entirely zero after ensuring the invariant condition. begin elim(l) := new Float_Vectors.Vector'(point - elim(1-index).all); Eliminate(l-1,pivots,elim,tol,elim(l).all); Update_Pivots(elim(l).all,l,pivots,tol,pivot); end Update_Eliminator_for_Sum; -- CREATE TABLEAU OF INEQUALITIES : procedure Create_Tableau_for_Vertices ( i,n : in integer; pts : in Float_Vectors_of_Vectors.Vector; tab : out Matrix; rhs : out Float_Vectors.Vector ) is -- DESCRIPTION : -- Creates a system of linear inequalities that is feasible when -- the ith point is spanned by the other points in pts. column : integer := tab'first(2); begin for j in pts'range loop if j /= i then for k in pts(j)'range loop tab(k,column) := pts(j)(k); end loop; tab(tab'last(1),column) := 1.0; column := column + 1; end if; end loop; for k in pts(i)'range loop rhs(k) := pts(i)(k); end loop; rhs(n+1) := 1.0; end Create_Tableau_for_Vertices; procedure Create_Tableau_for_Edges ( i,j,n,pivot : in integer; elim : in Float_Vectors.Vector; pts : in Float_Vectors_of_Vectors.Vector; tol : in double_float; tab : out matrix; rhs : out Float_Vectors.Vector; lastcol : out integer; degenerate : out boolean ) is -- DESCRIPTION : -- Creates a system of linear inequalities that express the fact -- that the points i and j span an edge of the convex hull. -- Degenerate means that there exists a point on the edge spanned -- by the points i and j that contains the tested edge. column : integer := 1; ineq : Float_Vectors.Vector(1..n); begin degenerate := false; for k in pts'range loop if (k/=i) and then (k/=j) then ineq := pts(k).all - pts(i).all; -- compute inequality if abs(ineq(pivot)) > tol -- make ineq(pivot) = 0 then Eliminate(pivot,elim,ineq); end if; if Is_Zero(ineq,tol) -- check if degenerate then if not In_Edge(pts(k).all,pts(i).all,pts(j).all,tol) then degenerate := true; return; end if; else for l in 1..n loop -- fill in the column if l < pivot then tab(l,column) := ineq(l); elsif l > pivot then tab(l-1,column) := ineq(l); end if; end loop; tab(tab'last(1),column) := 1.0; column := column + 1; end if; end if; end loop; for k in tab'first(1)..(tab'last(1)-1) loop -- right hand side rhs(k) := 0.0; end loop; rhs(tab'last(1)) := 1.0; lastcol := column-1; end Create_Tableau_for_Edges; procedure Create_Tableau_for_Faces ( k,n : in natural; face,pivots : in Integer_Vectors.Vector; pts,elim : in Float_Vectors_of_Vectors.Vector; tol : in double_float; tab : out Matrix; rhs : out Float_Vectors.Vector; lastcol : out integer; degenerate : out boolean ) is -- DESCRIPTION : -- Creates a system of linear inequalities that express the fact -- that the points pts(face(*)) span a face of the convex hull. -- Degenerate means that there exists a point on the face spanned -- by the points in the face that contains the tested face. column : integer := 1; ineq : Float_Vectors.Vector(1..n); begin degenerate := false; for l in pts'range loop if not Is_In(l,face) then ineq := pts(l).all - elim(0).all; -- new inequality Eliminate(k,pivots,elim,tol,ineq); -- ineq(pivots(i)) = 0, i=1,2,..k if Is_Zero(ineq,tol) then if not In_Face(k,face,pts(l).all,pts,tol) and then l < face(face'last) -- lexicographic enumeration and then (Pivot_after_Elimination (l,1,pts(l).all,face,pivots,elim,tol) /= 0) then degenerate := true; return; end if; else for ll in (k+1)..n loop -- fill in the column tab(ll-k,column) := ineq(pivots(ll)); end loop; tab(tab'last(1),column) := 1.0; column := column + 1; end if; end if; end loop; for l in tab'first(1)..(tab'last(1)-1) loop -- right hand side rhs(l) := 0.0; end loop; rhs(tab'last(1)) := 1.0; lastcol := column-1; end Create_Tableau_for_Faces; procedure Create_Tableau_for_Faces_of_Sum ( k,n,i,r : in natural; ind,pivots : in Integer_Vectors.Vector; pts,elim : Float_Vectors_of_Vectors.Vector; tol : double_float; face : in Integer_Vectors_of_Vectors.Vector; tab : out Matrix; rhs : out Float_Vectors.Vector; lastcol : out integer; degenerate : out boolean ) is -- DESCRIPTION : -- Creates the table of inequalities for determining whether the given -- candidate face spans a face of the sum polytope. -- ON ENTRY : -- k dimension of the face on the sum; -- n dimension of the points; -- i current polytope; -- r number of polytopes; -- ind indicate the beginning vector in pts of each polytope; -- etc... column : integer := 1; ineq : Float_Vectors.Vector(1..n); last : integer; begin degenerate := false; for l1 in face'first..i loop if l1 = r then last := pts'last; else last := ind(l1+1)-1; end if; for l2 in ind(l1)..last loop if not Is_In(l2,face(l1).all) then ineq := pts(l2).all - elim(1-l1).all; -- new inequality Eliminate(k,pivots,elim,tol,ineq); -- ineq(pivots(i)) = 0, i=1,2,..k if Is_Zero(ineq,tol) then if not In_Face(face(l1)'length-1,face(l1).all,pts(l2).all,pts,tol) and then face(l1)(face(l1)'first) <= l2 and then l2 < face(l1)(face(l1)'last) -- lexicographic enumeration and then (Pivot_after_Elimination (l2,l1,pts(l2).all,face(l1).all,pivots,elim,tol) /= 0) then degenerate := true; return; end if; else for ll in (k+1)..n loop -- fill in the column tab(ll-k,column) := ineq(pivots(ll)); end loop; tab(tab'last(1),column) := 1.0; column := column + 1; end if; end if; end loop; end loop; for l in tab'first(1)..(tab'last(1)-1) loop -- right hand side rhs(l) := 0.0; end loop; rhs(tab'last(1)) := 1.0; lastcol := column-1; end Create_Tableau_for_Faces_of_Sum; procedure Create_Tableau_for_Lower_Edges ( i,j,n,pivot : in integer; elim : in Float_Vectors.Vector; pts : in Float_Vectors_of_Vectors.Vector; tol : in double_float; tab : out Matrix; rhs : out Float_Vectors.Vector; lastcol : out integer; degenerate : out boolean ) is -- DESCRIPTION : -- Creates a system of linear inequalities that express the fact -- that the points i and j spann an edge of the lower hull. -- Degenerate means that there exists a point on the edge spanned -- by the points i and j that contains the tested edge. column : integer := 1; ineq : Float_Vectors.Vector(1..n); begin degenerate := false; for k in pts'range loop if (k/=i) and then (k/=j) then ineq := pts(k).all - pts(i).all; -- compute inequality if abs(ineq(pivot)) > tol -- make ineq(pivot) = 0 then Eliminate(pivot,elim,ineq); end if; if Is_Zero(ineq,tol) -- check if degenerate then if not In_Edge(pts(k).all,pts(i).all,pts(j).all,tol) then degenerate := true; return; end if; else for l in 1..n loop -- fill in the column if l < pivot then tab(l,column) := ineq(l); elsif l > pivot then tab(l-1,column) := ineq(l); end if; end loop; column := column + 1; end if; end if; end loop; for k in tab'first(1)..(tab'last(1)-1) loop -- right hand side rhs(k) := 0.0; end loop; rhs(tab'last(1)) := -1.0; lastcol := column-1; end Create_Tableau_for_Lower_Edges; procedure Create_Tableau_for_Lower_Faces ( k,n : in natural; face,pivots : in Integer_Vectors.Vector; pts,elim : in Float_Vectors_of_Vectors.Vector; tol : in double_float; tab : out Matrix; rhs : out Float_Vectors.Vector; lastcol : out integer; degenerate : out boolean ) is column : integer := 1; ineq : Float_Vectors.Vector(1..n); begin degenerate := false; for l in pts'range loop if not Is_In(l,face) then ineq := pts(l).all - elim(0).all; -- new inequality Eliminate(k,pivots,elim,tol,ineq); -- ineq(pivots(i)) = 0, i=1,2,..k if Is_Zero(ineq,tol) then if not In_Face(k,face,pts(l).all,pts,tol) and then l < face(face'last) -- lexicographic enumeration and then (Pivot_after_Elimination (l,1,pts(l).all,face,pivots,elim,tol) /= 0) then degenerate := true; return; end if; else for ll in (k+1)..n loop -- fill in the column tab(ll-k,column) := ineq(pivots(ll)); end loop; column := column + 1; end if; end if; end loop; for l in tab'first(1)..(tab'last(1)-1) loop -- right hand side rhs(l) := 0.0; end loop; rhs(tab'last(1)) := -1.0; lastcol := column-1; end Create_Tableau_for_Lower_Faces; -- DETERMINE WHETHER THE CANDIDATE IS VERTEX, SPANS AN EDGE OR A K-FACE : function Is_Vertex ( i,m,n : integer; pts : Float_Vectors_of_Vectors.Vector; tol : double_float ) return boolean is -- DESCRIPTION : -- This function determines whether the ith point is a vertex of -- the m n-dimensional points in pts, by deciding on the feasibility -- of a linear-inequality system. tableau : Matrix(1..n+1,1..m); rhs : Float_Vectors.Vector(tableau'range(1)); sol : Float_Vectors.Vector(tableau'range(1)); col : Integer_Vectors.Vector(tableau'range(1)); feasible : boolean; begin Create_Tableau_for_Vertices(i,n,pts,tableau,rhs); Complementary_Slackness(tableau,rhs,tol,sol,col,feasible); return not feasible; end Is_Vertex; function Is_Edge ( i,j,m,n : integer; pts : Float_Vectors_of_Vectors.Vector; tol : double_float ) return boolean is -- DESCRIPTION : -- This function determines whether the ith and jth point span an -- edge of the convex hull of m n-dimensional points in pts, -- by deciding on the feasibility of a linear-inequality system. elim : Float_Vectors.Vector(1..n) := pts(i).all - pts(j).all; pivot : integer; begin pivot := elim'first - 1; for k in elim'range loop if abs(elim(k)) > tol then pivot := k; end if; exit when pivot >= elim'first; end loop; if pivot < elim'first then return false; else declare tab : Matrix(1..n,1..m-1); rhs : Float_Vectors.Vector(tab'range(1)); sol : Float_Vectors.Vector(tab'range(1)); col : Integer_Vectors.Vector(tab'range(1)); deg,feasible : boolean; lst : integer; begin Create_Tableau_for_Edges(i,j,n,pivot,elim,pts,tol,tab,rhs,lst,deg); if deg then return false; elsif lst = 0 then return true; else Complementary_Slackness(tab,lst,rhs,tol,sol,col,feasible); return not feasible; end if; end; end if; end Is_Edge; function Is_Face ( k,n,m : natural; elim,pts : Float_Vectors_of_Vectors.Vector; pivots,face : Integer_Vectors.Vector; tol : double_float ) return boolean is -- DESCRIPTION : -- Applies Complementary Slackness to determine whether the given -- candidate face is a face of the polytope. -- ON ENTRY : -- k dimension of the candidate face; -- n dimension of the vector space; -- m number of points which span the polytope; -- elim elimination equations in upper triangular form; -- pts the points which span the polytope; -- pivots pivoting information for the elimination equations; -- face entries of the points which span the candidate face; -- tol tolerance on the precision. nn : constant natural := n-k+1; tab : Matrix(1..nn,1..(m-k)); rhs : Float_Vectors.Vector(tab'range(1)); sol : Float_Vectors.Vector(tab'range(1)); col : Integer_Vectors.Vector(tab'range(1)); deg,feasible : boolean; lst : integer; begin -- put("The face being tested : "); put(face); new_line; -- put("The pivots : "); put(pivots); new_line; -- put_line("The elimination equations : "); -- for i in 1..elim'last loop -- put(elim(i)); put(" = 0 "); -- end loop; -- new_line; if m - k <= 1 then return true; else Create_Tableau_for_Faces(k,n,face,pivots,pts,elim,tol,tab,rhs,lst,deg); if deg then return false; elsif lst = 0 then return true; else Complementary_Slackness(tab,lst,rhs,tol,sol,col,feasible); return not feasible; end if; end if; end Is_Face; function Is_Face_of_Sum ( k,n,m,i,r : natural; elim,pts : Float_Vectors_of_Vectors.Vector; tol : double_float; face : Integer_Vectors_of_Vectors.Vector; ind,pivots : Integer_Vectors.Vector ) return boolean is -- DESCRIPTION : -- Applies Complementary Slackness to determine whether the given -- candidate face is a face of the polytope. -- ON ENTRY : -- k dimension of the candidate face; -- n dimension of the vector space; -- m number of total points which span the polytope; -- i current polytope; -- r number of different polytopes; -- elim elimination equations in upper triangular form; -- pts the points which span the polytope; -- tol tolerance on precision; -- face entries of the points which span the candidate face; -- ind indicates the starting vector in pts of each polytope; -- pivots pivoting information for the elimination equations. nn : constant natural := n-k+1; tab : Matrix(1..nn,1..(m-k)); rhs : Float_Vectors.Vector(tab'range(1)); sol : Float_Vectors.Vector(tab'range(1)); col : Integer_Vectors.Vector(tab'range(1)); deg,feasible : boolean; lst : integer; begin if m - k <= 1 then return true; else Create_Tableau_for_Faces_of_Sum (k,n,i,r,ind,pivots,pts,elim,tol,face,tab,rhs,lst,deg); if deg then return false; elsif lst = 0 then return true; else Complementary_Slackness(tab,lst,rhs,tol,sol,col,feasible); return not feasible; end if; end if; end Is_Face_of_Sum; function Is_Lower_Edge ( i,j,m,n : integer; pts : Float_Vectors_of_Vectors.Vector; tol : double_float ) return boolean is -- DESCRIPTION : -- This function determines whether the ith and jth point span an -- edge of the lower convex hull of m n-dimensional points in pts, -- by deciding on the feasibility of a linear-inequality system. elim : Float_Vectors.Vector(1..n) := pts(i).all - pts(j).all; pivot : integer; begin pivot := elim'first - 1; for k in elim'range loop if abs(elim(k)) > tol then pivot := k; end if; exit when pivot >= elim'first; end loop; if pivot < elim'first or else (pivot = elim'last) then return false; else declare tab : Matrix(1..n-1,1..m-1); rhs : Float_Vectors.Vector(tab'range(1)); sol : Float_Vectors.Vector(tab'range(1)); col : Integer_Vectors.Vector(tab'range(1)); deg,feasible : boolean; lst : integer; begin Create_Tableau_for_Lower_Edges (i,j,n,pivot,elim,pts,tol,tab,rhs,lst,deg); if deg then return false; elsif lst = 0 then return true; else Complementary_Slackness(tab,lst,rhs,tol,sol,col,feasible); return not feasible; end if; end; end if; end Is_Lower_Edge; function Is_Lower_Face ( k,n,m : in natural; elim,pts : Float_Vectors_of_Vectors.Vector; pivots,face : Integer_Vectors.Vector; tol : double_float ) return boolean is -- DESCRIPTION : -- Applies Complementary Slackness to determine whether the given -- candidate face is a face of the lower hull of the polytope. -- ON ENTRY : -- k dimension of the candidate face; -- n dimension of the vector space; -- m number of points which span the polytope; -- elim elimination equations in upper triangular form; -- pts the points which span the polytope; -- pivots pivoting information for the elimination equations; -- face entries of the points which span the candidate face. nn : constant natural := n-k; tab : Matrix(1..nn,1..(m-k)); rhs : Float_Vectors.Vector(tab'range(1)); sol : Float_Vectors.Vector(tab'range(1)); col : Integer_Vectors.Vector(tab'range(1)); deg,feasible : boolean; lst : integer; begin -- put("The pivots : "); put(pivots); new_line; -- put_line("The elimination equations : "); -- for i in 1..elim'last loop -- put(elim(i)); put(" = 0 "); -- end loop; -- new_line; if m - k <= 1 then return true; else Create_Tableau_for_Lower_Faces (k,n,face,pivots,pts,elim,tol,tab,rhs,lst,deg); if deg then return false; elsif lst = 0 then return true; else Complementary_Slackness(tab,lst,rhs,tol,sol,col,feasible); return not feasible; end if; end if; end Is_Lower_Face; -- TARGET ROUTINES : procedure Enumerate_Vertices ( pts : in Float_Vectors_of_Vectors.Vector; tol : in double_float ) is continue : boolean := true; n : constant natural := pts(pts'first).all'length; m : constant natural := pts'length - 1; begin for i in pts'range loop if Is_Vertex(i,m,n,pts,tol) then Process(i,continue); end if; exit when not continue; end loop; end Enumerate_Vertices; procedure Enumerate_Edges ( pts : in Float_Vectors_of_Vectors.Vector; tol : in double_float ) is continue : boolean := true; n : constant natural := pts(pts'first).all'length; m : constant natural := pts'length; procedure Candidate_Edges ( i,n : in integer ) is begin for j in (i+1)..pts'last loop -- enumerate all candidates -- put("Verifying "); put(pts(i).all); put(" and"); -- put(pts(j).all); put(" :"); new_line; if Is_Edge(i,j,m,n,pts,tol) then Process(i,j,continue); end if; exit when not continue; end loop; end Candidate_Edges; begin for i in pts'first..(pts'last-1) loop Candidate_Edges(i,n); end loop; end Enumerate_Edges; procedure Enumerate_Lower_Edges ( pts : in Float_Vectors_of_Vectors.Vector; tol : in double_float ) is continue : boolean := true; n : constant natural := pts(pts'first).all'length; m : constant natural := pts'length; procedure Candidate_Lower_Edges ( i,n : in integer ) is begin for j in (i+1)..pts'last loop -- enumerate all candidates -- put("Verifying "); put(pts(i).all); put(" and"); -- put(pts(j).all); put(" :"); new_line; if Is_Lower_Edge(i,j,m,n,pts,tol) then Process(i,j,continue); end if; exit when not continue; end loop; end Candidate_Lower_Edges; begin for i in pts'first..(pts'last-1) loop Candidate_Lower_Edges(i,n); end loop; end Enumerate_Lower_Edges; procedure Enumerate_Faces ( k : in natural; pts : in Float_Vectors_of_Vectors.Vector; tol : in double_float ) is m : constant natural := pts'length; n : constant natural := pts(pts'first).all'length; candidate : Integer_Vectors.Vector(0..k); elim : Float_Vectors_of_Vectors.Vector(0..k); continue : boolean := true; procedure Candidate_Faces ( ipvt : in Integer_Vectors.Vector; i,l : in integer ) is -- DESCRIPTION : -- Enumerates all candidate k-faces in lexicographic order. piv : natural; pivots : Integer_Vectors.Vector(1..n); begin if l > k then if (k = m) or else Is_Face(k,n,m,elim,pts,ipvt,candidate,tol) then Process(candidate,continue); end if; else for j in (i+1)..pts'last loop candidate(l) := j; pivots := ipvt; Update_Eliminator(elim,l,pivots,pts(j).all,tol,piv); if piv /= 0 then Candidate_Faces(pivots,j,l+1); end if; Clear(elim(l)); exit when not continue; end loop; end if; end Candidate_Faces; begin if k <= m then declare ipvt : Integer_Vectors.Vector(1..n); begin for i in ipvt'range loop ipvt(i) := i; end loop; for i in pts'first..(pts'last-k) loop candidate(0) := i; elim(0) := pts(i); -- basis point Candidate_Faces(ipvt,i,1); end loop; end; end if; end Enumerate_Faces; procedure Enumerate_Lower_Faces ( k : in natural; pts : in Float_Vectors_of_Vectors.Vector; tol : in double_float ) is m : constant natural := pts'length; n : constant natural := pts(pts'first).all'length; candidate : Integer_Vectors.Vector(0..k); elim : Float_Vectors_of_Vectors.Vector(0..k); continue : boolean := true; procedure Candidate_Lower_Faces ( ipvt : in Integer_Vectors.Vector; i,l : in integer ) is -- DESCRIPTION : -- Enumerates all candidate k-faces in lexicographic order. piv : natural; pivots : Integer_Vectors.Vector(1..n); begin if l > k then --put_line("Testing the following candidate face :"); --for ii in candidate'first..candidate'last-1 loop -- put(pts(candidate(ii))); put(" & "); --end loop; --put(pts(candidate(candidate'last))); new_line; if (k = m) or else Is_Lower_Face(k,n,m,elim,pts,ipvt,candidate,tol) then Process(candidate,continue); end if; else for j in (i+1)..pts'last loop candidate(l) := j; pivots := ipvt; -- put("Picking "); put(pts(j)); -- put(" Pivots : "); put(pivots); new_line; Update_Eliminator(elim,l,pivots,pts(j).all,tol,piv); -- put(" update of eliminator piv = "); put(piv,1); -- put(" Pivots : "); put(pivots); new_line; if (piv /= 0) and (piv /= n) then Candidate_Lower_Faces(pivots,j,l+1); end if; Clear(elim(l)); exit when not continue; end loop; end if; end Candidate_Lower_Faces; begin if k <= m then declare ipvt : Integer_Vectors.Vector(1..n); begin for i in ipvt'range loop ipvt(i) := i; end loop; for i in pts'first..(pts'last-k) loop candidate(0) := i; elim(0) := pts(i); -- basis point Candidate_Lower_Faces(ipvt,i,1); end loop; end; end if; end Enumerate_Lower_Faces; procedure Enumerate_Faces_of_Sum ( ind,typ : in Integer_Vectors.Vector; k : in natural; pts : in Float_Vectors_of_Vectors.Vector; tol : in double_float ) is m : constant natural := pts'length; -- number of points n : constant natural := pts(pts'first)'length; -- dimension of vectors r : constant natural := ind'length; -- number of polytopes candidates : Integer_Vectors_of_Vectors.Vector(1..r); elim : Float_Vectors_of_Vectors.Vector(1-r..k); pivots : Integer_Vectors.Vector(1..n); continue : boolean := true; lasti,sum : natural; procedure Candidate_Faces_of_Sum ( ipvt : in Integer_Vectors.Vector; i : in integer ) is -- DESCRIPTION : -- Enumerates all faces of the given type on the sum, -- i indicates the current polytope. procedure Candidate_Faces ( ipvt : in Integer_Vectors.Vector; start,l : in integer ) is -- DESCRIPTION : -- Enumerates all candidate k-faces, with k = typ(i). -- The parameter l indicates the current element of pts to be chosen. -- The previously chosen point is given by start. piv,last : natural; begin if i = r then last := m; else last := ind(i+1)-1; end if; if l > typ(i) then if (typ(i) = last-ind(i)+1) or else Is_Face_of_Sum (sum,n,last-i+1,i,r,elim,pts(pts'first..last),tol, candidates,ind,ipvt) then if i = r then Process(candidates,continue); else Candidate_Faces_of_Sum(ipvt,i+1); end if; end if; else for j in (start+1)..(last-typ(i)+l) loop candidates(i)(l) := j; if l = 0 then Candidate_Faces(ipvt,j,l+1); else pivots := ipvt; Update_Eliminator_for_Sum (elim,sum-typ(i)+l,pivots,pts(j).all,i,tol,piv); if piv /= 0 then Candidate_Faces(pivots,j,l+1); end if; Clear(elim(sum-typ(i)+l)); end if; exit when not continue; end loop; end if; end Candidate_Faces; begin candidates(i) := new Integer_Vectors.Vector(0..typ(i)); if i = r then lasti := pts'last; else lasti := ind(i+1)-1; end if; sum := sum + typ(i); for j in ind(i)..(lasti-typ(i)) loop candidates(i)(0) := j; elim(1-i) := pts(j); Candidate_Faces(ipvt,j,1); end loop; sum := sum - typ(i); -- for j in (sum+1)..(sum+typ(i)) loop -- Clear(elim(j)); -- end loop; Clear(candidates(i)); end Candidate_Faces_of_Sum; begin declare ipvt : Integer_Vectors.Vector(1..n); begin for i in ipvt'range loop ipvt(i) := i; end loop; sum := 0; Candidate_Faces_of_Sum(ipvt,1); end; end Enumerate_Faces_of_Sum; end Float_Face_Enumerators; SHAR_EOF fi # end of overwriting check if test -f 'float_face_enumerators.ads' then echo shar: will not over-write existing file "'float_face_enumerators.ads'" else cat << "SHAR_EOF" > 'float_face_enumerators.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; with Integer_Vectors; use Integer_Vectors; with Integer_Vectors_of_Vectors; with Float_Vectors_of_Vectors; package Float_Face_Enumerators is -- DESCRIPTION : -- This package contains procedures which allow the efficient -- enumeration of all vertices, edges and k-faces of a polytope. -- The polytope is spanned by a given vector of points in a general -- dimensional vector space. -- In addition, a procedure has been added for enumerating all -- facets of a certain type of the sum of a tuple of polytopes. generic with procedure Process ( i : in integer; cont : out boolean ); procedure Enumerate_Vertices ( pts : in Float_Vectors_of_Vectors.Vector; tol : in double_float ); -- DESCRIPTION : -- The vector pts contains the points which span the polytope. -- The candidate vertices are enumerated in order of occurrence in pts. -- Each time a vertex has been found, the procedure Process is invoked, -- which returns then the entry of the vertex in pts. -- When cont is set to false, the enumeration stops. generic with procedure Process ( i,j : in integer; cont : out boolean ); procedure Enumerate_Edges ( pts : in Float_Vectors_of_Vectors.Vector; tol : in double_float ); -- DESCRIPTION : -- The vector pts contains the points which span the polytope. -- The candidate edges are enumerated in lexicographic order. -- Each time an edge has been found, the procedure Process is -- invoked, which returns the entries of the edge in pts. -- When cont is set to be false, the enumeration stops. generic with procedure Process ( i,j : in integer; cont : out boolean ); procedure Enumerate_Lower_Edges ( pts : in Float_Vectors_of_Vectors.Vector; tol : in double_float ); -- DESCRIPTION : -- Enumerates only the edges on the lower hull of the polytope. generic with procedure Process ( face : in Vector; cont : out boolean ); -- REQUIRED : -- The range of face must be 0..k. procedure Enumerate_Faces ( k : in natural; pts : in Float_Vectors_of_Vectors.Vector; tol : in double_float ); -- DESCRIPTION : -- The vector pts contains the points which span the polytope. -- A k-face is a face spanned by k affine linearly independent points. -- The candidate k-faces are enumerated in lexicographic order. -- Each time an edge has been found, the procedure Process is -- invoked, which returns the entries of the k-face in pts. -- When cont is set to be false, the enumeration stops. generic with procedure Process ( face : in Vector; cont : out boolean ); -- REQUIRED : -- The range of face must be 0..k. procedure Enumerate_Lower_Faces ( k : in natural; pts : in Float_Vectors_of_Vectors.Vector; tol : in double_float ); -- DESCRIPTION : -- Enumerates only the k-faces on the lower hull of the polytope. generic with procedure Process ( faces : in Integer_Vectors_of_Vectors.Vector; cont : out boolean ); -- DESCRIPTION : -- The parameter faces has the following meaning: -- faces(i) contains the entries of points in pts which span -- the k-face of the ith polytope, with k = typ(i). -- When cont is set to false, the enumeration stops. procedure Enumerate_Faces_of_Sum ( ind,typ : in Integer_Vectors.Vector; k : in natural; pts : in Float_Vectors_of_Vectors.Vector; tol : in double_float ); -- DESCRIPTION : -- Enumerates the points which span faces of a certain type -- of the polytope in lexicographic order. -- ON ENTRY : -- ind ind(i) indicates where the points of the ith polytope -- in the vector pts begin; -- typ typ(i) contains the dimension k of the k-face of the ith -- polytope which spans the facet of the sum; -- k sum of the entries in typ, must be less than -- or equal to the dimension of the space; -- pts contains all points of the polytopes; -- tol tolerance on the precision. -- ON RETURN : -- Each time a face of the sum has been found, Process is invoked. end Float_Face_Enumerators; SHAR_EOF fi # end of overwriting check if test -f 'float_faces_of_polytope.adb' then echo shar: will not over-write existing file "'float_faces_of_polytope.adb'" else cat << "SHAR_EOF" > 'float_faces_of_polytope.adb' with Integer_Vectors; with Float_Face_Enumerators; use Float_Face_Enumerators; package body Float_Faces_of_Polytope is -- AUXILIAIRIES : function Create_Edge ( pts : Float_Vectors_of_Vectors.Vector; i,j : integer ) return Face is -- DESCRIPTION : -- Creates the edge spanned by pts(i) and pts(j). res : Face(0..1) := new Float_Vectors_of_Vectors.Vector(0..1); begin res(0) := new Vector'(pts(i).all); res(1) := new Vector'(pts(j).all); return res; end Create_Edge; function Create_Face ( pts : Float_Vectors_of_Vectors.Vector; f : Integer_Vectors.Vector ) return Face is -- DESCRIPTION : -- Returns vector of points pts(f(i)) that span the face. res : Face(f'range) := new Float_Vectors_of_Vectors.Vector(f'range); begin for i in f'range loop res(i) := new Vector'(pts(f(i)).all); end loop; return res; end Create_Face; procedure Move_to_Front ( pts : in out Float_Vectors_of_Vectors.Vector; x : in Float_Vectors.Vector ) is -- DESCRIPTION : -- The vector x is move to the front of the vector pts. begin if pts(pts'first).all /= x then for i in pts'first+1..pts'last loop if pts(i).all = x then pts(i).all := pts(pts'first).all; pts(pts'first).all := x; return; end if; end loop; end if; end Move_to_Front; -- CONSTRUCTORS : function Create ( k,n : positive; p : List; tol : double_float ) return Faces is res : Faces; begin if k > n then return res; else declare m : constant natural := Length_Of(p); pts : Float_Vectors_of_Vectors.Vector(1..m) := Shallow_Create(p); res_last : Faces := res; begin if k = 1 then declare procedure Append_Edge ( i,j : in natural; cont : out boolean ) is f : Face := Create_Edge(pts,i,j); begin Append(res,res_last,f); cont := true; end Append_Edge; procedure Enum_Edges is new Enumerate_Edges(Append_Edge); begin Enum_Edges(pts,tol); end; else declare procedure Append_Face ( fa : in Integer_Vectors.Vector; cont : out boolean ) is f : Face := Create_Face(pts,fa); begin Append(res,res_last,f); cont := true; end Append_Face; procedure Enum_Faces is new Enumerate_Faces(Append_Face); begin Enum_Faces(k,pts,tol); end; end if; return res; end; end if; end Create; function Create ( k,n : positive; p : List; x : Vector; tol : double_float ) return Faces is res : Faces; begin if k > n then return res; else declare m : constant natural := Length_Of(p); pts : Float_Vectors_of_Vectors.Vector(1..m) := Shallow_Create(p); res_last : Faces := res; begin Move_to_Front(pts,x); if k = 1 then declare procedure Append_Edge ( i,j : in natural; cont : out boolean ) is f : Face; begin if i = pts'first then f := Create_Edge(pts,i,j); Append(res,res_last,f); cont := true; else cont := false; end if; end Append_Edge; procedure Enum_Edges is new Enumerate_Edges(Append_Edge); begin Enum_Edges(pts,tol); end; else declare procedure Append_Face ( fa : in Integer_Vectors.Vector; cont : out boolean ) is f : Face; begin if fa(fa'first) = pts'first then f := Create_Face(pts,fa); Append(res,res_last,f); cont := true; else cont := false; end if; end Append_Face; procedure Enum_Faces is new Enumerate_Faces(Append_Face); begin Enum_Faces(k,pts,tol); end; end if; return res; end; end if; end Create; function Create_Lower ( k,n : positive; p : List; tol : double_float ) return Faces is res : Faces; begin if k > n then return res; else declare m : constant natural := Length_Of(p); pts : Float_Vectors_of_Vectors.Vector(1..m) := Shallow_Create(p); res_last : Faces := res; begin if k = 1 then declare procedure Append_Edge ( i,j : in natural; cont : out boolean ) is f : Face := Create_Edge(pts,i,j); begin Append(res,res_last,f); cont := true; end Append_Edge; procedure Enum_Edges is new Enumerate_Lower_Edges(Append_Edge); begin Enum_Edges(pts,tol); end; else declare procedure Append_Face ( fa : in Integer_Vectors.Vector; cont : out boolean ) is f : Face := Create_Face(pts,fa); begin Append(res,res_last,f); cont := true; end Append_Face; procedure Enum_Faces is new Enumerate_Lower_Faces(Append_Face); begin Enum_Faces(k,pts,tol); end; end if; return res; end; end if; end Create_Lower; function Create_Lower ( k,n : positive; p : List; x : Vector; tol : double_float ) return Faces is res : Faces; begin if k > n then return res; else declare m : constant natural := Length_Of(p); pts : Float_Vectors_of_Vectors.Vector(1..m) := Shallow_Create(p); res_last : Faces := res; begin Move_to_Front(pts,x); if k = 1 then declare procedure Append_Edge ( i,j : in natural; cont : out boolean ) is f : Face := Create_Edge(pts,i,j); begin if i = pts'first then f := Create_Edge(pts,i,j); Append(res,res_last,f); cont := true; else cont := false; end if; end Append_Edge; procedure Enum_Edges is new Enumerate_Lower_Edges(Append_Edge); begin Enum_Edges(pts,tol); end; else declare procedure Append_Face ( fa : in Integer_Vectors.Vector; cont : out boolean ) is f : Face; begin if fa(fa'first) = pts'first then f := Create_Face(pts,fa); Append(res,res_last,f); cont := true; else cont := false; end if; end Append_Face; procedure Enum_Faces is new Enumerate_Lower_Faces(Append_Face); begin Enum_Faces(k,pts,tol); end; end if; return res; end; end if; end Create_Lower; procedure Construct ( first : in out Faces; fs : in Faces ) is tmp : Faces := fs; begin while not Is_Null(tmp) loop Construct(Head_Of(tmp),first); tmp := Tail_Of(tmp); end loop; end Construct; -- SELECTORS : function Is_Equal ( f1,f2 : Face ) return boolean is found : boolean; begin for i in f1'range loop found := false; for j in f2'range loop found := Equal(f1(i).all,f2(j).all); exit when found; end loop; if not found then return false; end if; end loop; return true; end Is_Equal; function Is_In ( f : Face; x : Float_Vectors.Vector ) return boolean is begin for i in f'range loop if f(i).all = x then return true; end if; end loop; return false; end Is_In; function Is_In ( fs : Faces; f : Face ) return boolean is tmp : Faces := fs; begin while not Is_Null(tmp) loop if Is_Equal(f,Head_Of(tmp)) then return true; else tmp := Tail_Of(tmp); end if; end loop; return false; end Is_In; -- DESTRUCTORS : procedure Deep_Clear ( f : in out Face ) is begin if f /= null then for i in f'range loop Clear(f(i)); end loop; end if; end Deep_Clear; procedure Shallow_Clear ( f : in out Face ) is begin if f /= null then Float_Vectors_of_Vectors.Clear(f.all); end if; end Shallow_Clear; procedure Deep_Clear ( fa : in out Face_Array ) is begin for i in fa'range loop Deep_Clear(fa(i)); end loop; end Deep_Clear; procedure Shallow_Clear ( fa : in out Face_Array ) is begin for i in fa'range loop Shallow_Clear(fa(i)); end loop; end Shallow_Clear; procedure Deep_Clear ( fs : in out Faces ) is tmp : Faces := fs; begin while not Is_Null(tmp) loop declare f : Face := Head_Of(tmp); begin Deep_Clear(f); end; tmp := Tail_Of(tmp); end loop; Lists_of_Faces.Clear(Lists_of_Faces.List(fs)); end Deep_Clear; procedure Shallow_Clear ( fs : in out Faces ) is tmp : Faces := fs; begin Lists_of_Faces.Clear(Lists_of_Faces.List(fs)); end Shallow_Clear; procedure Deep_Clear ( afs : in out Array_of_Faces ) is begin for i in afs'range loop Deep_Clear(afs(i)); end loop; end Deep_Clear; procedure Shallow_Clear ( afs : in out Array_of_Faces ) is begin for i in afs'range loop Shallow_Clear(afs(i)); end loop; end Shallow_Clear; end Float_Faces_of_Polytope; SHAR_EOF fi # end of overwriting check if test -f 'float_faces_of_polytope.ads' then echo shar: will not over-write existing file "'float_faces_of_polytope.ads'" else cat << "SHAR_EOF" > 'float_faces_of_polytope.ads' with Lists; with Floating_Point_Numbers; use Floating_Point_Numbers; with Lists_of_Float_Vectors; use Lists_of_Float_Vectors; with Float_Vectors_of_Vectors; with Float_Vectors; use Float_Vectors; package Float_Faces_of_Polytope is -- DESCRIPTION : -- This package offers an abstraction for manipulating the k-faces -- of an n-dimensional polytope. -- DATA STRUCTURES : type Face is new Float_Vectors_of_Vectors.Link_to_Vector; -- points that span the face, range 0..k, with k = dimension of face type Face_Array is array ( integer range <> ) of Face; package Lists_of_Faces is new Lists(Face); type Faces is new Lists_of_Faces.List; type Array_of_Faces is array ( integer range <> ) of Faces; -- CONSTRUCTORS : function Create ( k,n : positive; p : List; tol : double_float ) return Faces; function Create ( k,n : positive; p : List; x : Vector; tol : double_float ) return Faces; -- DESCRIPTION : -- The input for this routine is a list of points, defining a polytope -- in n-dimensional space. On return, a list of lists of points will be -- given, defining k-faces of the polytope, each spanned by k+1 points. -- When x is provided, then only those k-faces will be returned that -- contain the vector x. In the latter case, x must belong to p. function Create_Lower ( k,n : positive; p : List; tol : double_float ) return Faces; function Create_Lower ( k,n : positive; p : List; x : Vector; tol : double_float ) return Faces; -- DESCRIPTION : -- Only the k-faces of the lower hull will be generated. -- When x is added as parameter, only the k-faces that contain x -- will be returned. In the latter case, x must belong to p. procedure Construct ( first : in out Faces; fs : in Faces ); -- DESCRIPTION : -- All the faces in fs will be constructed to the front of first. -- SELECTORS : function Is_Equal ( f1,f2 : Face ) return boolean; -- DESCRIPTION : -- Returns true if both faces are spanned by the same vertices. -- Note that the order of the vertices in the vector do not matter. function Is_In ( f : Face; x : Vector ) return boolean; -- DESCRIPTION : -- Returns true if the face contains the vector x. function Is_In ( fs : Faces; f : Face ) return boolean; -- DESCRIPTION : -- Returns true if the face already belongs to the list of faces. -- DESTRUCTORS : procedure Deep_Clear ( f : in out Face ); procedure Deep_Clear ( fa : in out Face_Array ); procedure Deep_Clear ( fs : in out Faces ); procedure Deep_Clear ( afs : in out Array_of_Faces ); procedure Shallow_Clear ( f : in out Face ); procedure Shallow_Clear ( fa : in out Face_Array ); procedure Shallow_Clear ( fs : in out Faces ); procedure Shallow_Clear ( afs : in out Array_of_Faces ); -- DESCRIPTION : -- All allocated memory space will be freed. A deep clear destroys the -- whole structure, while a shallow clear only destroys the structures -- especially set up for the faces. end Float_Faces_of_Polytope; SHAR_EOF fi # end of overwriting check if test -f 'float_linear_inequality_solvers.adb' then echo shar: will not over-write existing file "'float_linear_inequality_solvers.adb'" else cat << "SHAR_EOF" > 'float_linear_inequality_solvers.adb' with text_io,integer_io; use text_io,integer_io; with Integer_Vectors_io; use Integer_Vectors_io; with Float_Vectors_io; use Float_Vectors_io; with Float_Matrices_io; use Float_Matrices_io; package body Float_Linear_Inequality_Solvers is -- use Floating_Point_Numbers.double_float_io; -- AUXILIARIES : function Is_In ( v : Integer_Vectors.Vector; i : integer ) return boolean is -- DESCRIPTION : -- Returns true if the number i appears in one of the elements of v. begin for j in v'range loop if v(j) = i then return true; end if; end loop; return false; end Is_In; function Is_All_In ( v : Integer_Vectors.Vector; i : integer ) return boolean is -- DESCRIPTION : -- Returns true if v(k) = i, for k in v'range, false otherwise. begin for k in v'range loop if v(k) /= i then return false; end if; end loop; return true; end Is_All_In; procedure Copy ( m1 : in Matrix; m2 : out Matrix ) is -- REQUIRED : ranges must be equal. -- DESCRIPTION : -- Copies the first matrix m1 onto the second matrix m2. -- The statement `m2 := m1' does not produce the same result when -- compiled with the VADS compiler on IBM RS/6000. begin for i in m1'range(1) loop for j in m1'range(2) loop m2(i,j) := m1(i,j); end loop; end loop; end Copy; function Inner_Product ( m : Matrix; i,j : integer ) return double_float is -- DESCRIPTION : -- Returns the inner product of the normals to the ith and jth hyperplane. res : double_float := 0.0; begin for k in m'first(1)..m'last(1)-1 loop res := res + m(k,i)*m(k,j); end loop; return res; end Inner_Product; -- AUXILIARIES FOR RECURSION ON THE DIMENSION : function Pivot ( m : Matrix; i : integer ) return integer is -- DESCRIPTION : -- Returns the index of the coefficient with largest absolute value -- of the ith inequality. res : integer := m'first(1); max : double_float := abs(m(res,i)); tmpabs : double_float; begin for j in m'first(1)+1..m'last(1)-1 loop tmpabs := abs(m(j,i)); if tmpabs > max then max := tmpabs; res := j; end if; end loop; return res; end Pivot; procedure Eliminate ( m1 : in Matrix; i,j,piv : in integer; tol : in double_float; m2 : out Matrix ) is -- DESCRIPTION : -- Performs the elimination on the jth column of the original matrix m1 -- of inequalities to the reduced matrix m2. -- REQUIRED : m(piv,i) /= 0 and dimensions of m2 must match. fac : double_float; begin if abs(m1(piv,j)) < tol then for k in m1'range(1) loop if k < piv then m2(k,j) := m1(k,j); elsif k > piv then m2(k-1,j) := m1(k,j); end if; end loop; else fac := m1(piv,j)/m1(piv,i); for k in m1'range(1) loop if k < piv then m2(k,j) := m1(k,j) - fac*m1(k,i); elsif k > piv then m2(k-1,j) := m1(k,j) - fac*m1(k,i); end if; end loop; end if; end Eliminate; function Eliminate ( m : Matrix; mlast2,i,piv : integer; tol : in double_float ) return Matrix is -- DESCRIPTION : -- Eliminates one unknown from the system of inequalities. -- REQUIRED : m(piv,i) /= 0 and m'last(1) > 2. res : Matrix(m'first(1)..m'last(1)-1,m'first(2)..mlast2); begin for j in res'range(2) loop Eliminate(m,i,j,piv,tol,res); end loop; return res; end Eliminate; function Eliminate ( m : Matrix; mlast2,i : integer; tol : double_float ) return Matrix is -- DESCRIPTION : -- Computes the pivot for the ith inequality and eliminates one unknown. -- The matrix has as columns m'first(2)..mlast2. -- REQUIRED : Inner_Product(m,i,i) > 0 and m'last(1) > 2. piv : constant integer := Pivot(m,i); begin return Eliminate(m,mlast2,i,piv,tol); end Eliminate; function Back_Substitute ( m : Matrix; i,piv : integer; x : Vector ) return Vector is -- DESCRIPTION : -- Returns the back substitution of the vector x which lies on the ith -- hyperplane of original inequality system before elimination. -- REQUIRED : abs(m(piv,i)) > tolerance. res : Vector(x'first..x'last+1); begin res(res'first..piv-1) := x(x'first..piv-1); res(piv+1..res'last) := x(piv..x'last); res(piv) := m(m'last(1),i); for k in m'first(1)..m'last(1)-1 loop if k < piv then res(piv) := res(piv) - m(k,i)*x(k); elsif k > piv then res(piv) := res(piv) - m(k,i)*x(k-1); end if; end loop; res(piv) := res(piv)/m(piv,i); return res; end Back_Substitute; -- SELECTORS : function Evaluate ( m : Matrix; i : integer; x : Vector ) return double_float is -- DESCRIPTION : -- Evaluates the vector x in the ith inequality. res : double_float := 0.0; begin for j in x'range loop res := res + m(j,i)*x(j); end loop; return res; end Evaluate; function Satisfies ( m : Matrix; i : integer; x : Vector; tol : double_float ) return boolean is begin return (Evaluate(m,i,x) >= m(m'last(1),i) - tol); end Satisfies; function Satisfies ( m : Matrix; x : Vector; tol : double_float ) return boolean is begin for i in m'range(2) loop if not Satisfies(m,i,x,tol) then return false; end if; end loop; return true; end Satisfies; function Satisfies ( m : Matrix; fst,lst : integer; x : Vector; tol : double_float ) return boolean is begin for i in fst..lst loop if not Satisfies(m,i,x,tol) then return false; end if; end loop; return true; end Satisfies; function First_Violated ( m : Matrix; x : Vector; tol : double_float ) return integer is begin for i in m'range(2) loop if not Satisfies(m,i,x,tol) then return i; end if; end loop; return (m'last(2)+1); end First_Violated; function First_Violated ( m : Matrix; fst,lst : integer; x : Vector; tol : double_float ) return integer is begin for i in fst..lst loop if not Satisfies(m,i,x,tol) then return i; end if; end loop; return (lst+1); end First_Violated; -- INCONSISTENCY CHECKS : function Inconsistent ( m : Matrix; i : integer; tol : double_float ) return boolean is begin for j in m'first(1)..m'last(1)-1 loop if abs(m(j,i)) > tol then return false; end if; end loop; return (m(m'last(1),i) > tol); end Inconsistent; function Inconsistent ( m : Matrix; cols : Integer_Vectors.Vector; x : Vector; tol : double_float ) return boolean is -- ALGORITHM : checks whether the inequality 0 >= c, with c > tol, -- can be derived from the combination of the inequalities. sum : double_float; begin for i in x'range loop -- x should be a positive combination if x(i) < 0.0 then return false; end if; end loop; for i in m'first(1)..m'last(1)-1 loop -- check zero left hand side sum := 0.0; for j in x'range loop sum := sum + x(j)*m(i,cols(j)); end loop; if abs(sum) > tol then return false; end if; end loop; sum := 0.0; -- right hand side must be positive for j in x'range loop sum := sum + x(j)*m(m'last(1),cols(j)); end loop; return (sum > tol); end Inconsistent; function Inconsistent ( m : Matrix; i : integer; cols : Integer_Vectors.Vector; x : Vector; tol : double_float ) return boolean is allcols : Integer_Vectors.Vector(cols'first..cols'last+1); allcoef : Vector(x'first..x'last+1); begin allcols(cols'range) := cols; allcoef(x'range) := x; allcols(allcols'last) := i; if Is_In(cols,i) then allcoef(allcoef'last) := 0.0; else allcoef(allcoef'last) := 1.0; end if; return Inconsistent(m,allcols,allcoef,tol); end Inconsistent; function Inconsistent2D ( m : Matrix; cols : Integer_Vectors.Vector; tol : double_float ) return Vector is -- REQUIRED : the normals in the corresponding inequality are opposite. -- DESCRIPTION : -- Returns the coefficients in the inconsistency proof. res : Vector(cols'range) := (cols'range => 1.0); f1,f2 : double_float; begin for i in m'first(1)..m'last(1)-1 loop f1 := abs(m(i,cols(1))); if f1 > tol then f2 := abs(m(i,cols(2))); if f1 > f2 then res(2) := 1.0; res(1) := f2/f1; else res(1) := 1.0; res(2) := f1/f2; end if; end if; exit when (f1 > tol); end loop; return res; end Inconsistent2D; function Inconsistent2D ( m : Matrix; i : integer; cols : Integer_Vectors.Vector; tol : double_float ) return Vector is -- REQUIRED : the inequalities of the columns define a nonsingular system. -- DESCRIPTION : -- Returns the coefficients in the inconsistency proof. res : Vector(cols'range) := (cols'range => 1.0); detm12 : constant double_float := m(1,cols(1))*m(2,cols(2)) - m(2,cols(1))*m(1,cols(2)); begin if abs(detm12) > tol then res(1) := (m(2,i)*m(1,cols(2)) - m(1,i)*m(2,cols(2)))/detm12; res(2) := (m(1,i)*m(2,cols(1)) - m(2,i)*m(1,cols(1)))/detm12; end if; return res; end Inconsistent2D; function InconsistentnD ( m : Matrix; i,piv : integer; x : Vector; cols : Integer_Vectors.Vector; k : integer; tol : double_float ) return Vector is -- DESCRIPTION : -- Computes the coefficients of the inconsistency proof, based on the -- inconsistency proof of the eliminated problem. res : Vector(x'first..x'last+1); fac : double_float; procedure Compute_Factor is begin for j in x'range loop fac := fac + x(j)*m(piv,cols(j)); end loop; fac := -fac/m(piv,i); if abs(fac) > tol then for j in x'range loop res(j) := x(j)/fac; end loop; else res(x'range) := x; end if; end Compute_Factor; begin if Is_In(cols,k) then res := (res'range => 0.0); if Is_All_In(cols,k) then res(res'first) := -m(piv,i)/m(piv,k); else fac := 0.0; Compute_Factor; end if; else fac := m(piv,k); Compute_Factor; if abs(fac) > tol then res(res'last) := 1.0/fac; else res(res'last) := 1.0; end if; end if; return res; end InconsistentnD; -- CONSTRUCTORS : procedure Scale ( m : in out Matrix; i : in integer; tol : in double_float ) is ip : double_float := abs(m(Pivot(m,i),i)); --Inner_Product(m,i,i); begin if ip > tol then --ip := SQRT(ip); for j in m'range(1) loop m(j,i) := m(j,i)/ip; end loop; end if; end Scale; procedure Scale ( m : in out Matrix; tol : in double_float ) is begin for i in m'range(2) loop Scale(m,i,tol); end loop; end Scale; procedure Center ( m : in out Matrix; x : in Vector ) is begin for i in m'range(2) loop m(m'last(1),i) := m(m'last(1),i) - Evaluate(m,i,x); end loop; -- put_line("The centered inequality system : "); put(m,3,3,3); end Center; function Center ( m : Matrix; x : Vector ) return Matrix is mx : Matrix(m'range(1),m'range(2)); -- := m; problems on RS/6000 ?? begin Copy(m,mx); Center(mx,x); return mx; end Center; procedure Intersect2D ( m : in Matrix; i,j : in integer; tol : in double_float; x : out Vector; sing : out boolean ) is detmij : constant double_float := m(1,i)*m(2,j) - m(2,i)*m(1,j); begin if abs(detmij) <= tol then sing := true; else sing := false; x(1) := (m(3,i)*m(2,j) - m(2,i)*m(3,j))/detmij; x(2) := (m(1,i)*m(3,j) - m(3,i)*m(1,j))/detmij; end if; -- put(" i : "); put(i,1); put(" j : "); put(j,1); -- put(" detmij : "); put(detmij,3,3,3); new_line; end Intersect2D; -- SOLVE BY INTERSECTION : procedure Solve_Intersect2D ( m : in Matrix; i : in integer; tol : in double_float; x : in out Vector; fail : out boolean; cols : out Integer_Vectors.Vector ) is -- DESCRIPTION : -- Enumerates all intersection points of the ith hyperplane with all the -- other previous ones. The enumeration stops when either the current -- intersection point satisfies the system of inequalities or when the -- inequalities for the inconsistency proof are detected. -- REQUIRED : m'last(1) = 3 and the inequalities are centered. firstviol,j : integer; ffail,sing : boolean := true; columns : Integer_Vectors.Vector(x'range) := (x'range => 0); begin j := m'first(2); loop Intersect2D(m,j,i,tol,x,sing); if not sing then firstviol := First_Violated(m,m'first(2),i-1,x,tol); if firstviol < j then columns(1) := firstviol; columns(2) := j; sing := true; x := Inconsistent2D(m,i,columns,tol); end if; else if Inner_Product(m,i,j) < -tol then sing := false; x := (x'range => 0.0); for k in m'first(1)..m'last(1)-1 loop if abs(m(k,i)) > tol then x(k) := m(3,i)/m(k,i); if m(k,i) > 0.0 then sing := ((x(k) - m(3,j)/m(k,j)) > tol); else sing := ((m(3,j)/m(k,j) - x(k)) > tol); end if; end if; exit when (abs(m(k,i)) > tol); end loop; if sing then columns(1) := j; columns(2) := i; x := Inconsistent2D(m,columns,tol); end if; else sing := false; end if; if sing then firstviol := j; else firstviol := j+1; end if; end if; ffail := (firstviol < i); exit when not ffail or sing; j := firstviol; end loop; fail := ffail; cols := columns; end Solve_Intersect2D; procedure Solve_IntersectnD ( m : in Matrix; i : in integer; tol : in double_float; x : in out Vector; fail : out boolean; cols : out Integer_Vectors.Vector ) is -- DESCRIPTION : -- Eliminates one unknown by intersecting with the ith hyperplane. -- REQUIRED : m'last(1) > 3 and the inequalities are centered. m2 : Matrix(m'first(1)..m'last(1)-1,m'first(2)..i-1); piv : constant integer := Pivot(m,i); x2 : Vector(x'first..x'last-1); cols2 : Integer_Vectors.Vector(x2'range); k2 : integer; begin if abs(m(piv,i)) > tol then m2 := Eliminate(m,i-1,i,piv,tol); x2 := (x2'range => 0.0); Solve(m2,tol,x2,k2,cols2); if k2 >= i then fail := false; x := Back_Substitute(m,i,piv,x2); else fail := true; cols(cols2'range) := cols2; cols(cols2'last+1) := k2; x := InconsistentnD(m,i,piv,x2,cols2,k2,tol); end if; end if; end Solve_IntersectnD; procedure Solve_Intersect ( m : in Matrix; i : in integer; tol : in double_float; x : in out Vector; fail : out boolean; cols : out Integer_Vectors.Vector ) is -- DESCRIPTION : -- Intersects the inequalities with the ith hyperplane. -- REQUIRED : the inequalities are centered, -- the ith inequality is first one that is violated. begin if m'last(1) = 3 then Solve_Intersect2D(m,i,tol,x,fail,cols); elsif m'last(1) > 3 then Solve_IntersectnD(m,i,tol,x,fail,cols); end if; end Solve_Intersect; procedure Solve ( m : in Matrix; i : in integer; tol : in double_float; x : in out Vector; fail : out boolean; cols : out Integer_Vectors.Vector ) is inx,xx : Vector(x'range) := (x'range => 0.0); wrk : Matrix(m'range(1),m'range(2)); sing : boolean := true; fac : double_float; begin if abs(Inner_Product(m,i,i)) < tol then if m(m'last(1),i) > tol then fail := true; cols := (x'range => i); else fail := false; end if; else if i = m'first(2) then x := (x'range => 0.0); for j in x'range loop if abs(m(j,i)) > tol then sing := false; x(j) := m(m'last(1),i)/m(j,i); end if; exit when not sing; end loop; fail := sing; else Copy(m,wrk); if x /= inx then Center(wrk,x); end if; fac := wrk(wrk'last(1),i)/Inner_Product(wrk,i,i); for j in inx'range loop inx(j) := fac*wrk(j,i); end loop; if First_Violated(wrk,inx,tol) > i then xx := x + inx; if Satisfies(m,xx,tol) then sing := false; end if; end if; if not sing then fail := false; x := xx; else Solve_Intersect(wrk,i,tol,inx,sing,cols); fail := sing; if not sing then Plus_Vector(x,inx); else x := inx; end if; end if; end if; end if; end Solve; procedure Solve ( m : in Matrix; tol : in double_float; x : in out Vector; k : out integer; cols : out Integer_Vectors.Vector ) is indviol : integer := First_Violated(m,x,tol); fail : boolean := false; begin while indviol <= m'last(2) loop Solve(m,indviol,tol,x,fail,cols); exit when fail; indviol := First_Violated(m,indviol+1,m'last(2),x,tol); end loop; if fail then k := indviol; else k := m'last(2) + 1; end if; end Solve; procedure Iterated_Solve ( m : in Matrix; tol : in double_float; x : in out Vector; k : out integer; cols : out Integer_Vectors.Vector ) is indviol : integer := First_Violated(m,x,tol); fail : boolean := false; continue : boolean := true; begin while indviol <= m'last(2) loop Report(x,indviol-1,continue); exit when not continue; Solve(m,indviol,tol,x,fail,cols); exit when fail; indviol := First_Violated(m,indviol+1,m'last(2),x,tol); end loop; if fail then k := indviol; else k := m'last(2) + 1; end if; end Iterated_Solve; end Float_Linear_Inequality_Solvers; SHAR_EOF fi # end of overwriting check if test -f 'float_linear_inequality_solvers.ads' then echo shar: will not over-write existing file "'float_linear_inequality_solvers.ads'" else cat << "SHAR_EOF" > 'float_linear_inequality_solvers.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; with Integer_Vectors; with Float_Vectors,Float_Matrices; use Float_Vectors,Float_Matrices; package Float_Linear_Inequality_Solvers is -- DESCRIPTION : -- This package provides an incremental solving procedure for systems of -- linear inequalities with floating point entries. -- FORMAT OF INEQUALITIES : -- A system of linear inequalities is represented by a matrix of -- dimensions (1..n+1,1..m). Each column contains one inequality, -- for j in m'range(2), the jth inequality is given by -- m(1,j)*x(1) + m(2,j)*x(2) + .. + m(m'last(1)-1,j)*x(x'last) -- >= m(m'last(1),j), -- where x is any vector of range m'first(1)..m'last(1)-1. -- OPERATIONS : -- We distinguish three types : -- selectors : extracting feasibility information; -- modifiers : modifying the inequalities; -- solvers : solving means either to compute a solution -- or to provide an inconsistency proof. -- SELECTORS : function Evaluate ( m : Matrix; i : integer; x : Vector ) return double_float; -- REQUIRED : x'first = m'first(1) and x'last = m'last(1)-1. -- DESCRIPTION : -- Returns the evaluation of the vector x at the ith inequality, i.e.: -- m(1,j)*x(1) + m(2,i)*x(2) + .. + m(m'last(1)-1,i)*x(x'last). function Satisfies ( m : Matrix; i : integer; x : Vector; tol : double_float ) return boolean; function Satisfies ( m : Matrix; x : Vector; tol : double_float ) return boolean; function Satisfies ( m : Matrix; fst,lst : integer; x : Vector; tol : double_float ) return boolean; -- REQUIRED : x'first = m'first(1) and x'last = m'last(1)-1. -- DESCRIPTION : -- Returns true if the given vector x is a feasible solution to the -- system of linear inequalities, defined in the columns of the matrix m. -- When the index i is provided, then only for the ith inequality the -- feasibility of the solution is checked. -- If fst and lst are provided then only the columns between fst and lst -- will be investigated. function First_Violated ( m : Matrix; x : Vector; tol : double_float ) return integer; function First_Violated ( m : Matrix; fst,lst : integer; x : Vector; tol : double_float ) return integer; -- DESCRIPTION : -- Returns the index of the first column that contains an inequality -- not satisfied by x. If Satisfies(m,x), then m'last(2)+1 is returned. -- If fst and lst are provided then only the columns between fst and lst -- will be investigated, if Satisfies(m,fst,lst,x), then lst+1 is returned. -- INCONSISTENCY CHECKS : function Inconsistent ( m : Matrix; i : integer; tol : double_float ) return boolean; -- DESCRIPTION : -- Returns true if the ith inequality represents an inconsistent -- inequality like 0 >= c > 0, otherwise false is returned. function Inconsistent ( m : Matrix; cols : Integer_Vectors.Vector; x : Vector; tol : double_float ) return boolean; -- DESCRIPTION : -- Checks the inconsistency proof of the system of inequalities. -- The sum of x(i)*m(*,cols(i)), for i in x'range=cols'range, yields -- an inconsistent inequality, i.e.: the jth component of the sum -- is in absolute value smaller than tol and the last component is -- a positive number larger than tol. function Inconsistent ( m : Matrix; i : integer; cols : Integer_Vectors.Vector; x : Vector; tol : double_float ) return boolean; -- DESCRIPTION : -- The inconsistency is here due to the addition of the ith inequality -- to the linear inequality system defined by m. -- The corresponding coefficient in the positive combination of the -- inequalities equals 1.0 and is not contained in the vector x. -- Note that this is the format of the proof as delivered by the solvers. -- CONSTRUCTORS : procedure Scale ( m : in out Matrix; i : in integer; tol : in double_float ); procedure Scale ( m : in out Matrix; tol : in double_float ); -- DESCRIPTION : -- Scales the ith inequality or the whole system, by dividing to -- the square root of the inner product of the normal vector. procedure Center ( m : in out Matrix; x : in Vector ); function Center ( m : Matrix; x : Vector ) return Matrix; -- DESCRIPTION : -- Centers the inequalities in the system, so that the origin lies at x. procedure Intersect2D ( m : in Matrix; i,j : in integer; tol : in double_float; x : out Vector; sing : out boolean ); -- REQUIRED : x'length = 2 = m'last(1)-1. -- DESCRIPTION : -- Computes the intersection of the ith with the jth hyperplane. -- If sing, then both hyperplanes are (close to being) parallel, -- otherwise, the solution is equal to the vector x. -- SOLVERS FOR THE INEQUALITY SYSTEMS : procedure Solve ( m : in Matrix; i : in integer; tol : in double_float; x : in out Vector; fail : out boolean; cols : out Integer_Vectors.Vector ); -- REQUIRED : i = First_Violated(m,x) <= m'last(2), x'range = cols'range. -- DESCRIPTION : -- Solves the inequality system, starting at the ith inequality. -- ON ENTRY : -- m a matrix representation of an inequality system; -- i first inequality that is not satisfied; -- tol tolerance on the rounding errors; -- x start solution. -- ON RETURN : -- x solution to the first i inequalities in m, -- when not fail, then Satisfies(m(*,1..i),x); -- when fail, then x contains the coefficients for the -- inconsistency proof; -- fail if false, then x satisfies the first i inequalities, -- otherwise, the system is inconsistent; -- cols if fail, then cols indicates the columns of m to construct -- the inconsistency proof, otherwise cols has no meaning. procedure Solve ( m : in Matrix; tol : in double_float; x : in out Vector; k : out integer; cols : out Integer_Vectors.Vector ); -- DESCRIPTION : -- Solves the inequality system by succesively applying the Solve above. -- When the parameter k > m'last(2), then the vector x is a solution, -- otherwise, k is the first inequality that makes the system inconsistent. generic with procedure Report ( x : in Vector; i : in integer; cont : out boolean ); -- DESCRIPTION : -- x = current solution of the first i inequalities; -- when cont is set to false, the computations will be stopped, -- otherwise, the solver will continue. procedure Iterated_Solve ( m : in Matrix; tol : in double_float; x : in out Vector; k : out integer; cols : out Integer_Vectors.Vector ); -- DESCRIPTION : -- Solves the inequality system by a succesive application of the -- incremental solver. After each new value of the solution, the procedure -- Report is called. This enables to trace the flow of the computations -- and to stop then, whenever necessary. end Float_Linear_Inequality_Solvers; SHAR_EOF fi # end of overwriting check if test -f 'float_support_functions.adb' then echo shar: will not over-write existing file "'float_support_functions.adb'" else cat << "SHAR_EOF" > 'float_support_functions.adb' package body Float_Support_Functions is function Maximal_Support ( l : List; v : Vector ) return double_float is sp,max : double_float; tmp : List; begin if not Is_Null(l) then max := Head_Of(l).all*v; tmp := Tail_Of(l); while not Is_Null(tmp) loop sp := Head_Of(tmp).all*v; if sp > max then max := sp; end if; tmp := Tail_Of(tmp); end loop; return max; else return 0.0; end if; end Maximal_Support; function Minimal_Support ( l : List; v : Vector ) return double_float is sp,min : double_float; tmp : List; begin if not Is_Null(l) then min := Head_Of(l).all*v; tmp := Tail_Of(l); while not Is_Null(tmp) loop sp := Head_Of(tmp).all*v; if sp < min then min := sp; end if; tmp := Tail_Of(tmp); end loop; return min; else return 0.0; end if; end Minimal_Support; function Face ( l : List; v : Vector; m,tol : double_float ) return List is res,tmp,res_last : List; d : Vector(v'range); begin tmp := l; while not Is_Null(tmp) loop d := Head_Of(tmp).all; if abs(d*v - m) < tol then Append(res,res_last,d); end if; tmp := Tail_Of(tmp); end loop; return res; end Face; end Float_Support_Functions; SHAR_EOF fi # end of overwriting check if test -f 'float_support_functions.ads' then echo shar: will not over-write existing file "'float_support_functions.ads'" else cat << "SHAR_EOF" > 'float_support_functions.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; with Float_Vectors; use Float_Vectors; with Lists_of_Float_Vectors; use Lists_of_Float_Vectors; package Float_Support_Functions is -- DESCRIPTION : -- This package provides support functions for polytopes spanned by -- lists of floating-point vectors. function Minimal_Support ( l : List; v : Vector ) return double_float; function Maximal_Support ( l : List; v : Vector ) return double_float; -- DESCRIPTION : -- Returns respectively min or max , for all d in l. function Face ( l : List; v : Vector; m,tol : double_float ) return List; -- DESCRIPTION : -- Returns a list of vectors d for which abs( - m) < tol, -- with tol the tolerance on precision. end Float_Support_Functions; SHAR_EOF fi # end of overwriting check if test -f 'float_to_integer_rounding.adb' then echo shar: will not over-write existing file "'float_to_integer_rounding.adb'" else cat << "SHAR_EOF" > 'float_to_integer_rounding.adb' with Greatest_Common_Divisor; use Greatest_Common_Divisor; with Float_Linear_Inequality_Solvers; use Float_Linear_Inequality_Solvers; --with text_io,integer_io; use text_io,integer_io; --with Integer_Vectors_io; use Integer_Vectors_io; --with Float_Vectors_io; use Float_Vectors_io; package body Float_to_Integer_Rounding is -- BASIC CONVERSION OPERATIONS : function Round ( v : Float_Vectors.Vector ) return Integer_Vectors.Vector is res : Integer_Vectors.Vector(v'range); begin for i in v'range loop res(i) := integer(v(i)); end loop; return res; end Round; function Convert_to_Float ( v : Integer_Vectors.Vector ) return Float_Vectors.Vector is res : Float_Vectors.Vector(v'range); begin for i in v'range loop res(i) := double_float(v(i)); end loop; return res; end Convert_to_Float; function Convert_to_Float ( m : Integer_Matrices.matrix ) return Float_Matrices.matrix is -- DESCRIPTION : -- Converts an integer matrix to a floating point matrix. res : Float_Matrices.matrix(m'range(1),m'range(2)); begin for i in m'range(1) loop for j in m'range(2) loop res(i,j) := double_float(m(i,j)); end loop; end loop; return res; end Convert_to_Float; -- AUXILIARIES FOR CONTINUED FRACTIONS : function Truncate ( x : double_float ) return integer is -- DESCRIPTION : -- Truncates x to the nearest lower integer number. res : integer := integer(x); begin if double_float(res) <= x then return res; else return res-1; end if; end Truncate; function lcm ( v : Integer_Vectors.Vector ) return integer is -- DESCRIPTION : -- Returns the least common multiple of all entries in the vector. -- REQUIRED : for all i in v'range: v(i) /= 0. res : integer := v(v'first); begin for i in v'first+1..v'last loop res := lcm(res,v(i)); end loop; return res; end lcm; procedure Swap ( i1,i2 : in out integer ) is -- DESCRIPTION : Swaps the integers i1 and i2. tmp : integer := i1; begin i1 := i2; i2 := tmp; end Swap; procedure Positive_Fractions ( x,tol : in double_float; a,b : out integer ) is -- DESCRIPTION : -- By continued fractions, a and b are computed such that -- abs(x - a/b) < tol. -- REQUIRED : x > 0. xx : double_float := x; al : integer := Truncate(xx); begin if abs(xx - double_float(al)) < tol then a := al; b := 1; else xx := 1.0/(xx - double_float(al)); declare g1,g2,h1,h2 : integer; begin g1 := 1; g2 := 0; h1 := 0; h2 := 1; g2 := al*g1 + g2; h2 := al*h1 + h2; Swap(g1,g2); Swap(h1,h2); loop al := Truncate(xx); g2 := al*g1 + g2; h2 := al*h1 + h2; Swap(g1,g2); Swap(h1,h2); exit when (abs(xx - double_float(al)) < tol); exit when (abs(x - double_float(g1)/double_float(h1)) < tol); xx := 1.0/(xx - double_float(al)); end loop; a := g1; b := h1; end; end if; end Positive_Fractions; -- CONVERSIONS BY CONTINUED FRACTIONS : procedure Fractions ( x,tol : in double_float; a,b : out integer ) is begin if x >= 0.0 then Positive_Fractions(x,tol,a,b); else declare aa : integer; begin Positive_Fractions(-x,tol,aa,b); a := -aa; end; end if; end Fractions; function Scale_to_Integer ( v : Float_Vectors.Vector; tol : in double_float ) return Integer_Vectors.Vector is res,den : Integer_Vectors.Vector(v'range); comden : integer; begin -- put("The floating point solution : "); put(v,3,3,3); new_line; for i in v'range loop Fractions(v(i),tol,res(i),den(i)); end loop; -- put("The nominators : "); put(res); new_line; -- put("The denominators : "); put(den); new_line; comden := lcm(den); -- put("The common denominator : "); put(comden,1); new_line; if comden /= 1 then for i in res'range loop res(i) := res(i)*(comden/den(i)); end loop; end if; return res; exception when numeric_error => return (res'range => 0); end Scale_to_Integer; function Scale_to_Integer ( ine : Float_Matrices.Matrix; v : Float_Vectors.Vector; tol : in double_float ) return Integer_Vectors.Vector is res : Integer_Vectors.Vector(v'range); fltres : Float_Vectors.Vector(res'range); inctol : double_float := 0.1; begin res := Round(v); fltres := Convert_to_Float(res); while not Satisfies(ine,fltres,tol) loop res := Scale_to_Integer(v,inctol); exit when (inctol <= tol); fltres := Convert_to_Float(res); inctol := inctol*0.1; end loop; return res; end Scale_to_Integer; end Float_to_Integer_Rounding; SHAR_EOF fi # end of overwriting check if test -f 'float_to_integer_rounding.ads' then echo shar: will not over-write existing file "'float_to_integer_rounding.ads'" else cat << "SHAR_EOF" > 'float_to_integer_rounding.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; with Integer_Vectors,Float_Vectors; with Integer_Matrices,Float_Matrices; package Float_to_Integer_Rounding is -- DESCRIPTION : -- This package provides operations to round the floating point solutions -- of linear inequality systems to vectors with integer entries. -- BASIC CONVERSION OPERATIONS : function Round ( v : Float_Vectors.Vector ) return Integer_Vectors.Vector; -- DESCRIPTION : -- Returns the integer vector with rounded entries. function Convert_to_Float ( v : Integer_Vectors.Vector ) return Float_Vectors.Vector; -- DESCRIPTION : -- Converts the given integer vector to a floating point vector. function Convert_to_Float ( m : Integer_Matrices.matrix ) return Float_Matrices.matrix; -- DESCRIPTION : -- Converts an integer matrix to a floating point matrix. -- CONVERSIONS BY CONTINUED FRACTIONS : procedure Fractions ( x,tol : in double_float; a,b : out integer ); -- DESCRIPTION : -- On return, we have that abs(x - a/b) < tol. function Scale_to_Integer ( v : Float_Vectors.Vector; tol : in double_float ) return Integer_Vectors.Vector; -- DESCRIPTION : -- Scales the given rational vector to a vector of integer numbers by -- multiplication by the common denominator. function Scale_to_Integer ( ine : Float_Matrices.Matrix; v : Float_Vectors.Vector; tol : in double_float ) return Integer_Vectors.Vector; -- DESCRIPTION : -- Returns the first integer vector that satisfies the inequality system, -- derived by continued fractions. end Float_to_Integer_Rounding; SHAR_EOF fi # end of overwriting check if test -f 'givens_rotations.adb' then echo shar: will not over-write existing file "'givens_rotations.adb'" else cat << "SHAR_EOF" > 'givens_rotations.adb' with Mathematical_Functions; use Mathematical_Functions; package body Givens_Rotations is procedure Givens_Factors ( v: in Vector; i,j : in integer; cosi,sine : out double_float ) is norm : double_float; begin norm := SQRT(v(i)*v(i) + v(j)*v(j)); cosi := v(i)/norm; sine := v(j)/norm; end Givens_Factors; procedure Givens_Factors ( mat : in Matrix; i,j : in integer; cosi,sine : out double_float ) is norm : double_float; begin norm := SQRT(mat(i,i)*mat(i,i) + mat(j,i)*mat(j,i)); cosi := mat(i,i)/norm; sine := mat(j,i)/norm; end Givens_Factors; procedure Givens_Rotation ( v : in out Vector; i,j : in integer; cosi,sine : in double_float ) is temp : double_float; begin temp := v(i); v(i) := cosi*v(i) + sine*v(j); v(j) := -sine*temp + cosi*v(j); end Givens_Rotation; procedure Givens_Rotation ( mat : in out Matrix; i,j : in integer; cosi,sine : in double_float ) is temp : double_float; begin -- for k in mat'range(2) loop -- certain angle preservation for k in i..mat'last(2) loop -- only angle preservation if upper triangular temp := mat(i,k); mat(i,k) := cosi*mat(i,k) + sine*mat(j,k); mat(j,k) := -sine*temp + cosi*mat(j,k); end loop; end Givens_Rotation; procedure Givens_Rotation ( mat : in out Matrix; lastcol,i,j : in integer; cosi,sine : in double_float ) is temp : double_float; begin -- for k in mat'first(2)..lastcol loop -- certain angle preservation for k in i..lastcol loop -- only angle preservation if upper triangular temp := mat(i,k); mat(i,k) := cosi*mat(i,k) + sine*mat(j,k); mat(j,k) := -sine*temp + cosi*mat(j,k); end loop; end Givens_Rotation; procedure Givens_Rotation ( v : in out Vector; i,j : in integer ) is cosi,sine : double_float; begin Givens_Factors(v,i,j,cosi,sine); Givens_Rotation(v,i,j,cosi,sine); end Givens_Rotation; procedure Givens_Rotation ( mat : in out Matrix; i,j : in integer ) is cosi,sine : double_float; begin Givens_Factors(mat,i,j,cosi,sine); Givens_Rotation(mat,i,j,cosi,sine); end Givens_Rotation; procedure Givens_Rotation ( mat : in out Matrix; lastcol,i,j : in integer ) is cosi,sine : double_float; begin Givens_Factors(mat,i,j,cosi,sine); Givens_Rotation(mat,lastcol,i,j,cosi,sine); end Givens_Rotation; procedure Upper_Triangulate ( row : in integer; mat : in out Matrix; tol : in double_float; ipvt : in out Integer_Vectors.Vector; pivot : out integer ) is piv,tpi : integer := 0; tmp : double_float; begin for j in row..mat'last(2) loop -- search pivot if abs(mat(row,j)) > tol then piv := j; end if; exit when (piv /= 0); end loop; if piv /= 0 -- zero row then if piv /= row -- interchange columns then for k in mat'range(1) loop tmp := mat(k,row); mat(k,row) := mat(k,piv); mat(k,piv) := tmp; end loop; tpi := ipvt(row); ipvt(row) := ipvt(piv); ipvt(piv) := tpi; end if; for k in row+1..mat'last(1) loop -- perform Givens rotations if abs(mat(k,row)) > tol then Givens_Rotation(mat,row,k); end if; end loop; end if; pivot := piv; end Upper_Triangulate; procedure Upper_Triangulate ( mat : in out Matrix; tol : in double_float ) is pivot : integer; temp : double_float; begin for i in mat'range(1) loop -- mat(mat'first(1)..i-1,mat'first(2)..i-1) pivot := 0; -- is already upper triangular for j in i..mat'last(2) loop -- search pivot if abs(mat(i,j)) > tol then pivot := j; end if; exit when (pivot /= 0); end loop; exit when (pivot = 0); -- zero row if pivot /= i -- interchange columns then for k in mat'range(1) loop temp := mat(k,i); mat(k,i) := mat(k,pivot); mat(k,pivot) := temp; end loop; end if; for k in i+1..mat'last(1) loop -- perform Givens rotations if abs(mat(k,i)) > tol then Givens_Rotation(mat,i,k); end if; end loop; -- mat(mat'first(1)..i,mat'first(2)..i) exit when i > mat'last(2); -- is upper triangular end loop; end Upper_Triangulate; procedure Upper_Triangulate ( mat : in out Matrix; tol : in double_float; ipvt : out Integer_Vectors.Vector ) is pivot,tpi : integer; pivots : Integer_Vectors.Vector(mat'range(2)); temp : double_float; begin for i in pivots'range loop -- initialize vector of pivots pivots(i) := i; end loop; for i in mat'range(1) loop -- mat(mat'first(1)..i-1,mat'first(2)..i-1) pivot := 0; -- is already upper triangular for j in i..mat'last(2) loop -- search pivot if abs(mat(i,j)) > tol then pivot := j; end if; exit when (pivot /= 0); end loop; exit when (pivot = 0); -- zero row if pivot /= i -- interchange columns then for k in mat'range(1) loop temp := mat(k,i); mat(k,i) := mat(k,pivot); mat(k,pivot) := temp; end loop; tpi := pivots(i); pivots(i) := pivots(pivot); pivots(pivot) := tpi; end if; for k in i+1..mat'last(1) loop -- perform Givens rotations if abs(mat(k,i)) > tol then Givens_Rotation(mat,i,k); end if; end loop; -- mat(mat'first(1)..i,mat'first(2)..i) exit when i > mat'last(2); -- is upper triangular end loop; ipvt := pivots; end Upper_Triangulate; procedure Upper_Triangulate ( mat : in out Matrix; rhs : in out Vector; tol : in double_float ) is pivot : integer; temp,cosi,sine : double_float; begin for i in mat'range(1) loop -- mat(mat'first(1)..i-1,mat'first(2)..i-1) pivot := 0; -- is already upper triangular for j in i..mat'last(2) loop -- search pivot if abs(mat(i,j)) > tol then pivot := j; end if; exit when (pivot /= 0); end loop; exit when (pivot = 0); -- zero row if pivot /= i -- interchange columns then for k in mat'range(1) loop temp := mat(k,i); mat(k,i) := mat(k,pivot); mat(k,pivot) := temp; end loop; end if; for k in i+1..mat'last(1) loop -- perform Givens rotations if abs(mat(k,i)) > tol then Givens_Factors(mat,i,k,cosi,sine); Givens_Rotation(mat,i,k,cosi,sine); Givens_Rotation(rhs,i,k,cosi,sine); end if; end loop; -- mat(mat'first(1)..i,mat'first(2)..i) exit when i > mat'last(2); -- is upper triangular end loop; end Upper_Triangulate; procedure Upper_Triangulate ( mat : in out Matrix; rhs : in out Vector; tol : in double_float; ipvt : out Integer_Vectors.Vector ) is pivot,tpi : integer; pivots : Integer_Vectors.Vector(mat'range(2)); temp,cosi,sine : double_float; begin for i in pivots'range loop -- initialize vector of pivots pivots(i) := i; end loop; for i in mat'range(1) loop -- mat(mat'first(1)..i-1,mat'first(2)..i-1) pivot := 0; -- is already upper triangular for j in i..mat'last(2) loop -- search pivot if abs(mat(i,j)) > tol then pivot := j; end if; exit when (pivot /= 0); end loop; exit when (pivot = 0); -- zero row if pivot /= i -- interchange columns then for k in mat'range(1) loop temp := mat(k,i); mat(k,i) := mat(k,pivot); mat(k,pivot) := temp; end loop; tpi := pivots(i); pivots(i) := pivots(pivot); pivots(pivot) := tpi; end if; for k in i+1..mat'last(1) loop -- perform Givens rotations if abs(mat(k,i)) > tol then Givens_Factors(mat,i,k,cosi,sine); Givens_Rotation(mat,i,k,cosi,sine); Givens_Rotation(rhs,i,k,cosi,sine); end if; end loop; -- mat(mat'first(1)..i,mat'first(2)..i) exit when i > mat'last(2); -- is upper triangular end loop; ipvt := pivots; end Upper_Triangulate; procedure Solve ( mat : in Matrix; rhs : in Vector; tol : in double_float; x : out Vector ) is rank : natural := 0; sol : vector(mat'range(1)) := (mat'range(1) => 0.0); begin for i in mat'range(1) loop -- determine the rank of the matrix if abs(mat(i,i)) > tol then rank := rank + 1; end if; exit when ((i >= mat'last(2)) or (abs(mat(i,i)) < tol)); end loop; for i in reverse mat'first(1)..rank loop -- back substitution for j in i+1..rank loop sol(i) := sol(i) + mat(i,j)*sol(j); end loop; sol(i) := rhs(i) - sol(i); if abs(mat(i,i)) > tol then sol(i) := sol(i)/mat(i,i); elsif abs(sol(i)) < tol then sol(i) := 1.0; else return; end if; end loop; -- invariant : sol(i..rank) computed x := sol; end Solve; procedure Solve ( mat : in Matrix; rhs : in Vector; tol : in double_float; rank : in natural; x : out Vector ) is sol : vector(mat'range(1)) := (mat'range(1) => 0.0); begin for i in reverse mat'first(1)..rank loop -- back substitution for j in i+1..rank loop sol(i) := sol(i) + mat(i,j)*sol(j); end loop; sol(i) := rhs(i) - sol(i); if abs(mat(i,i)) > tol then sol(i) := sol(i)/mat(i,i); elsif abs(sol(i)) < tol then sol(i) := 1.0; else return; end if; end loop; -- invariant : sol(i..rank) computed x := sol; end Solve; end Givens_Rotations; SHAR_EOF fi # end of overwriting check if test -f 'givens_rotations.ads' then echo shar: will not over-write existing file "'givens_rotations.ads'" else cat << "SHAR_EOF" > 'givens_rotations.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; with Float_Vectors,Float_Matrices; use Float_Vectors,Float_Matrices; with Integer_Vectors; package Givens_Rotations is -- DESCRIPTION : -- This package contains operations to construct and perform -- Given rotations on vectors and matrices. -- The procedures in this package are listed in order like -- they have to be applied to write a right hand side vector -- as a linear combination of the column vectors of a matrix. procedure Givens_Factors ( v : in Vector; i,j : in integer; cosi,sine : out double_float ); -- DESCRIPTION : -- Computes the cosine and sine of the angle to be used in the -- Givens rotation on the vector. -- REQUIRED : v(i) /= 0 and v(j) /= 0, with il. procedure Givens_Rotation ( v : in out Vector; i,j : in integer ); -- DESCRIPTION : -- Performs one Givens rotation on the vector v. -- REQUIRED : v(i) /= 0 and v(j) /= 0, with il. procedure Upper_Triangulate ( row : in integer; mat : in out Matrix; tol : in double_float; ipvt : in out Integer_Vectors.Vector; pivot : out integer ); -- DESCRIPTION : -- Makes the matrix upper triangular by updating the current row of -- the matrix. If pivot = 0 on return, then the matrix is singular. -- REQUIRED : -- The matrix is upper triangular up to current row, which means that -- abs(max(i,i)) > tol, for i in mat'first(1)..row-1. procedure Upper_Triangulate ( mat : in out Matrix; tol : in double_float ); procedure Upper_Triangulate ( mat : in out Matrix; tol : in double_float; ipvt : out Integer_Vectors.Vector ); -- DESCRIPTION : -- Makes the matrix upper triangular by means of Givens rotations. -- The parameter tol is used to determine whether an element is zero. -- Column interchangements are performed when necessary. -- The pivoting information will be returned in the vector ipvt. -- Stops when a zero row is encountered. -- REQUIRED : mat'first(1) = mat'first(2). procedure Upper_Triangulate ( mat : in out Matrix; rhs : in out Vector; tol : in double_float ); procedure Upper_Triangulate ( mat : in out Matrix; rhs : in out Vector; tol : in double_float; ipvt : out Integer_Vectors.Vector ); -- DESCRIPTION : -- Makes the matrix upper triangular and -- performs all Givens rotations as well on the right hand side vector. -- The parameter tol is used to determine whether an element is zero. -- Column interchangements are performed when necessary. -- The pivoting information will be returned in the vector ipvt. -- Stops when a zero row is encountered. -- REQUIRED : mat'first(1) = mat(first(2). procedure Solve ( mat : in Matrix; rhs : in Vector; tol : in double_float; x : out Vector ); -- DESCRIPTION : -- Solves the system defined by mat*x = rhs. -- In case rank(mat) < mat'length(1), then only -- x(mat'first(1)..mat'first(1)+rank(mat)-1) will be meaningful. -- REQUIRED : -- mat is upper triangular and mat(i,i) /= 0, for i in 1..Rank(mat). -- NOTE : -- Eventually, when column interchangements where applied during -- the triangulation of the matrix, then x is not the decomposition -- of the right hand side vector in terms of the first column of -- the matrix. procedure Solve ( mat : in Matrix; rhs : in Vector; tol : in double_float; rank : in natural; x : out Vector ); -- DESCRIPTION : -- Solves the system defined by mat*x = rhs. -- Here only the first rows in columns up to the given rank are -- considered. So only x(mat'first(1)..mat'first(1)+rank-1) will -- be meaningful. -- REQUIRED : -- The matrix is upper triangular up to its rank -- and mat(i,i) /= 0, for i in 1..rank. end Givens_Rotations; SHAR_EOF fi # end of overwriting check if test -f 'integer_faces_of_polytope.adb' then echo shar: will not over-write existing file "'integer_faces_of_polytope.adb'" else cat << "SHAR_EOF" > 'integer_faces_of_polytope.adb' with Face_Enumerators; use Face_Enumerators; package body Integer_Faces_of_Polytope is -- AUXILIAIRIES : function Create_Edge ( pts : Integer_Vectors_of_Vectors.Vector; i,j : integer ) return Face is -- DESCRIPTION : -- Creates the edge spanned by pts(i) and pts(j). res : Face(0..1) := new Integer_Vectors_of_Vectors.Vector(0..1); begin res(0) := new Vector'(pts(i).all); res(1) := new Vector'(pts(j).all); return res; end Create_Edge; function Create_Face ( pts : Integer_Vectors_of_Vectors.Vector; f : Vector ) return Face is -- DESCRIPTION : -- Returns vector of points pts(f(i)) that span the face. res : Face(f'range) := new Integer_Vectors_of_Vectors.Vector(f'range); begin for i in f'range loop res(i) := new Vector'(pts(f(i)).all); end loop; return res; end Create_Face; procedure Move_to_Front ( pts : in out Integer_Vectors_of_Vectors.Vector; x : in Vector ) is -- DESCRIPTION : -- The vector x is move to the front of the vector pts. begin if pts(pts'first).all /= x then for i in pts'first+1..pts'last loop if pts(i).all = x then pts(i).all := pts(pts'first).all; pts(pts'first).all := x; return; end if; end loop; end if; end Move_to_Front; -- CONSTRUCTORS : function Create ( k,n : positive; p : List ) return Faces is res : Faces; begin if k > n then return res; else declare m : constant natural := Length_Of(p); pts : Integer_Vectors_of_Vectors.Vector(1..m) := Shallow_Create(p); res_last : Faces := res; begin if k = 1 then declare procedure Append_Edge ( i,j : in natural; cont : out boolean ) is f : Face := Create_Edge(pts,i,j); begin Append(res,res_last,f); cont := true; end Append_Edge; procedure Enum_Edges is new Enumerate_Edges(Append_Edge); begin Enum_Edges(pts); end; else declare procedure Append_Face ( fa : in Vector; cont : out boolean ) is f : Face := Create_Face(pts,fa); begin Append(res,res_last,f); cont := true; end Append_Face; procedure Enum_Faces is new Enumerate_Faces(Append_Face); begin Enum_Faces(k,pts); end; end if; return res; end; end if; end Create; function Create ( k,n : positive; p : List; x : Vector ) return Faces is res : Faces; begin if k > n then return res; else declare m : constant natural := Length_Of(p); pts : Integer_Vectors_of_Vectors.Vector(1..m) := Shallow_Create(p); res_last : Faces := res; begin Move_to_Front(pts,x); if k = 1 then declare procedure Append_Edge ( i,j : in natural; cont : out boolean ) is f : Face; begin if i = pts'first then f := Create_Edge(pts,i,j); Append(res,res_last,f); cont := true; else cont := false; end if; end Append_Edge; procedure Enum_Edges is new Enumerate_Edges(Append_Edge); begin Enum_Edges(pts); end; else declare procedure Append_Face ( fa : in Vector; cont : out boolean ) is f : Face; begin if fa(fa'first) = pts'first then f := Create_Face(pts,fa); Append(res,res_last,f); cont := true; else cont := false; end if; end Append_Face; procedure Enum_Faces is new Enumerate_Faces(Append_Face); begin Enum_Faces(k,pts); end; end if; return res; end; end if; end Create; function Create_Lower ( k,n : positive; p : List ) return Faces is res : Faces; begin if k > n then return res; else declare m : constant natural := Length_Of(p); pts : Integer_Vectors_of_Vectors.Vector(1..m) := Shallow_Create(p); res_last : Faces := res; begin if k = 1 then declare procedure Append_Edge ( i,j : in natural; cont : out boolean ) is f : Face := Create_Edge(pts,i,j); begin Append(res,res_last,f); cont := true; end Append_Edge; procedure Enum_Edges is new Enumerate_Lower_Edges(Append_Edge); begin Enum_Edges(pts); end; else declare procedure Append_Face ( fa : in Vector; cont : out boolean ) is f : Face := Create_Face(pts,fa); begin Append(res,res_last,f); cont := true; end Append_Face; procedure Enum_Faces is new Enumerate_Lower_Faces(Append_Face); begin Enum_Faces(k,pts); end; end if; return res; end; end if; end Create_Lower; function Create_Lower ( k,n : positive; p : List; x : Vector ) return Faces is res : Faces; begin if k > n then return res; else declare m : constant natural := Length_Of(p); pts : Integer_Vectors_of_Vectors.Vector(1..m) := Shallow_Create(p); res_last : Faces := res; begin Move_to_Front(pts,x); if k = 1 then declare procedure Append_Edge ( i,j : in natural; cont : out boolean ) is f : Face := Create_Edge(pts,i,j); begin if i = pts'first then f := Create_Edge(pts,i,j); Append(res,res_last,f); cont := true; else cont := false; end if; end Append_Edge; procedure Enum_Edges is new Enumerate_Lower_Edges(Append_Edge); begin Enum_Edges(pts); end; else declare procedure Append_Face ( fa : in Vector; cont : out boolean ) is f : Face; begin if fa(fa'first) = pts'first then f := Create_Face(pts,fa); Append(res,res_last,f); cont := true; else cont := false; end if; end Append_Face; procedure Enum_Faces is new Enumerate_Lower_Faces(Append_Face); begin Enum_Faces(k,pts); end; end if; return res; end; end if; end Create_Lower; procedure Construct ( first : in out Faces; fs : in Faces ) is tmp : Faces := fs; begin while not Is_Null(tmp) loop Construct(Head_Of(tmp),first); tmp := Tail_Of(tmp); end loop; end Construct; procedure Copy ( f1 : in Face; f2 : in out Face ) is begin Deep_Clear(f2); f2 := new Integer_Vectors_of_Vectors.Vector(f2'range); for i in f2'range loop f2(i) := new Integer_Vectors.Vector'(f1(i).all); end loop; end Copy; procedure Deep_Copy ( f1 : in Faces; f2 : in out Faces ) is tmp,last : Faces; begin Deep_Clear(f2); tmp := f1; while not Is_Null(tmp) loop declare face1 : Face := Head_Of(tmp); face2 : Face := new Integer_Vectors_of_Vectors.Vector(face1'range); begin for i in face2'range loop face2(i) := new Integer_Vectors.Vector'(face1(i).all); end loop; Append(f2,last,face2); end; tmp := Tail_Of(tmp); end loop; end Deep_Copy; -- SELECTORS : function Is_Equal ( f1,f2 : Face ) return boolean is found : boolean; begin for i in f1'range loop found := false; for j in f2'range loop found := Equal(f1(i).all,f2(j).all); exit when found; end loop; if not found then return false; end if; end loop; return true; end Is_Equal; function Is_In ( f : Face; x : Vector ) return boolean is begin for i in f'range loop if f(i).all = x then return true; end if; end loop; return false; end Is_In; function Is_In ( fs : Faces; f : Face ) return boolean is tmp : Faces := fs; begin while not Is_Null(tmp) loop if Is_Equal(f,Head_Of(tmp)) then return true; else tmp := Tail_Of(tmp); end if; end loop; return false; end Is_In; function Extract_Faces ( fs : Faces; x : Vector ) return Faces is res,res_last,tmp : Faces; begin tmp := fs; while not Is_Null(tmp) loop declare f : Face := Head_Of(tmp); begin if Is_In(f,x) then Append(res,res_last,f); end if; end; tmp := Tail_Of(tmp); end loop; return res; end Extract_Faces; -- DESTRUCTORS : procedure Deep_Clear ( f : in out Face ) is begin if f /= null then for i in f'range loop Clear(f(i)); end loop; end if; Shallow_Clear(f); end Deep_Clear; procedure Shallow_Clear ( f : in out Face ) is begin if f /= null then Integer_Vectors_of_Vectors.Clear(f.all); end if; end Shallow_Clear; procedure Deep_Clear ( fa : in out Face_Array ) is begin for i in fa'range loop Deep_Clear(fa(i)); end loop; end Deep_Clear; procedure Shallow_Clear ( fa : in out Face_Array ) is begin for i in fa'range loop Shallow_Clear(fa(i)); end loop; end Shallow_Clear; procedure Deep_Clear ( fs : in out Faces ) is tmp : Faces := fs; begin while not Is_Null(tmp) loop declare f : Face := Head_Of(tmp); begin Deep_Clear(f); end; tmp := Tail_Of(tmp); end loop; Lists_of_Faces.Clear(Lists_of_Faces.List(fs)); end Deep_Clear; procedure Shallow_Clear ( fs : in out Faces ) is tmp : Faces := fs; begin Lists_of_Faces.Clear(Lists_of_Faces.List(fs)); end Shallow_Clear; procedure Deep_Clear ( afs : in out Array_of_Faces ) is begin for i in afs'range loop Deep_Clear(afs(i)); end loop; end Deep_Clear; procedure Shallow_Clear ( afs : in out Array_of_Faces ) is begin for i in afs'range loop Shallow_Clear(afs(i)); end loop; end Shallow_Clear; end Integer_Faces_of_Polytope; SHAR_EOF fi # end of overwriting check if test -f 'integer_faces_of_polytope.ads' then echo shar: will not over-write existing file "'integer_faces_of_polytope.ads'" else cat << "SHAR_EOF" > 'integer_faces_of_polytope.ads' with Lists; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Integer_Vectors_of_Vectors; with Integer_Vectors; use Integer_Vectors; package Integer_Faces_of_Polytope is -- DESCRIPTION : -- This package offers an abstraction for manipulating the k-faces -- of an n-dimensional polytope. -- DATA STRUCTURES : type Face is new Integer_Vectors_of_Vectors.Link_to_Vector; -- points that span the face, range 0..k, with k = dimension of face type Face_Array is array ( integer range <> ) of Face; package Lists_of_Faces is new Lists(Face); type Faces is new Lists_of_Faces.List; type Array_of_Faces is array ( integer range <> ) of Faces; -- CONSTRUCTORS : function Create ( k,n : positive; p : List ) return Faces; function Create ( k,n : positive; p : List; x : Vector ) return Faces; -- DESCRIPTION : -- The input for this routine is a list of points, defining a polytope -- in n-dimensional space. On return, a list of lists of points will be -- given, defining k-faces of the polytope, each spanned by k+1 points. -- When x is provided, then only those k-faces will be returned that -- contain the vector x. In the latter case, x must belong to p. function Create_Lower ( k,n : positive; p : List ) return Faces; function Create_Lower ( k,n : positive; p : List; x : Vector ) return Faces; -- DESCRIPTION : -- Only the k-faces of the lower hull will be generated. -- When x is added as parameter, only the k-faces that contain x -- will be returned. In the latter case, x must belong to p. procedure Construct ( first : in out Faces; fs : in Faces ); -- DESCRIPTION : -- All the faces in fs will be constructed to the front of first. procedure Copy ( f1 : in Face; f2 : in out Face ); -- DESCRIPTION : -- Copies the face f1 to the face f2, after clearing f2. procedure Deep_Copy ( f1 : in Faces; f2 : in out Faces ); -- DESCRIPTION : -- Makes a deep copy from the list f1 to the list f2. -- SELECTORS : function Is_Equal ( f1,f2 : Face ) return boolean; -- DESCRIPTION : -- Returns true if both faces are spanned by the same vertices. -- Note that the order of the vertices in the vector do not matter. function Is_In ( f : Face; x : Vector ) return boolean; -- DESCRIPTION : -- Returns true if the face contains the vector x. function Is_In ( fs : Faces; f : Face ) return boolean; -- DESCRIPTION : -- Returns true if the face already belongs to the list of faces. function Extract_Faces ( fs : Faces; x : Vector ) return Faces; -- DESCRIPTION : -- Returns a list of faces that contain x. -- The list on return shares the faces with the original list fs. -- DESTRUCTORS : procedure Deep_Clear ( f : in out Face ); procedure Deep_Clear ( fa : in out Face_Array ); procedure Deep_Clear ( fs : in out Faces ); procedure Deep_Clear ( afs : in out Array_of_Faces ); procedure Shallow_Clear ( f : in out Face ); procedure Shallow_Clear ( fa : in out Face_Array ); procedure Shallow_Clear ( fs : in out Faces ); procedure Shallow_Clear ( afs : in out Array_of_Faces ); -- DESCRIPTION : -- All allocated memory space will be freed. A deep clear destroys the -- whole structure, while a shallow clear only destroys the structures -- especially set up for the faces. end Integer_Faces_of_Polytope; SHAR_EOF fi # end of overwriting check if test -f 'integer_faces_of_polytope_io.adb' then echo shar: will not over-write existing file "'integer_faces_of_polytope_io.adb'" else cat << "SHAR_EOF" > 'integer_faces_of_polytope_io.adb' with integer_io; use integer_io; with Integer_Vectors_of_Vectors; use Integer_Vectors_of_Vectors; with Integer_Vectors_of_Vectors_io; use Integer_Vectors_of_Vectors_io; package body Integer_Faces_of_Polytope_io is -- DESCRIPTION : -- This package contains routines for output of faces of -- convex polytopes. procedure put ( f : in Face ) is begin put(Standard_Output,f); end put; procedure put ( file : in file_type; f : in Face ) is begin put(file," spanned by "); put(file,f.all'length,1); put_line(file," points :"); put(file,f.all); end put; procedure put ( f : in Faces ) is begin put(Standard_Output,f); end put; procedure put ( file : in file_type; f : in Faces ) is cnt : natural := 0; tmp : Faces := f; begin while not Is_Null(tmp) loop cnt := cnt + 1; put(file,"Face "); put(file,cnt,1); put(file,Head_Of(tmp)); tmp := Tail_Of(tmp); end loop; end put; procedure put ( f : in Array_of_Faces ) is begin put(Standard_Output,f); end put; procedure put ( file : in file_type; f : in Array_of_Faces ) is begin for i in f'range loop if not Is_Null(f(i)) then put(file,"faces at component "); put(file,i,1); put_line(file," :"); put(file,f(i)); end if; end loop; end put; end Integer_Faces_of_Polytope_io; SHAR_EOF fi # end of overwriting check if test -f 'integer_faces_of_polytope_io.ads' then echo shar: will not over-write existing file "'integer_faces_of_polytope_io.ads'" else cat << "SHAR_EOF" > 'integer_faces_of_polytope_io.ads' with text_io; use text_io; with Integer_Faces_of_Polytope; use Integer_Faces_of_Polytope; package Integer_Faces_of_Polytope_io is -- DESCRIPTION : -- This package contains routines for output of faces of -- convex polytopes. procedure put ( f : in Face ); procedure put ( file : in file_type; f : in Face ); procedure put ( f : in Faces ); procedure put ( file : in file_type; f : in Faces ); procedure put ( f : in Array_of_Faces ); procedure put ( file : in file_type; f : in Array_of_Faces ); end Integer_Faces_of_Polytope_io; SHAR_EOF fi # end of overwriting check if test -f 'integer_farkas_lemma.adb' then echo shar: will not over-write existing file "'integer_farkas_lemma.adb'" else cat << "SHAR_EOF" > 'integer_farkas_lemma.adb' --with text_io; use text_io; --with Float_Vectors_io; use Float_Vectors_io; --with Float_Matrices_io; use Float_Matrices_io; with Floating_Point_Numbers; use Floating_Point_Numbers; with Float_Vectors,Float_Matrices; with Farkas_Lemma; use Farkas_Lemma; package body Integer_Farkas_Lemma is procedure Integer_Complementary_Slackness ( tableau : in out matrix; feasible : out boolean ) is begin Integer_Complementary_Slackness(tableau,tableau'last(2)-1,feasible); end Integer_Complementary_Slackness; procedure Integer_Complementary_Slackness ( tableau : in out matrix; lastcol : in integer; feasible : out boolean ) is tab : Float_Matrices.Matrix (tableau'range(1),tableau'first(2)..lastcol); rhs,sol : Float_Vectors.Vector(tab'range(1)); -- tol : constant single_float := 10.0**(-5); -- single precision tol : constant double_float := 10.0**(-12); -- double precision columns : vector(sol'range); begin for i in tab'range(1) loop for j in tab'range(2) loop tab(i,j) := double_float(tableau(i,j)); end loop; end loop; for i in rhs'range loop rhs(i) := double_float(tableau(i,tableau'last(2))); end loop; -- put_line("The tableau : "); put(tab,3,3,3); -- put_line(" with right hand side : "); put(rhs,3,3,3); new_line; Complementary_Slackness(tab,lastcol,rhs,tol,sol,columns,feasible); -- put_line("The solution : "); put(sol,3,3,3); new_line; end Integer_Complementary_Slackness; end Integer_Farkas_Lemma; SHAR_EOF fi # end of overwriting check if test -f 'integer_farkas_lemma.ads' then echo shar: will not over-write existing file "'integer_farkas_lemma.ads'" else cat << "SHAR_EOF" > 'integer_farkas_lemma.ads' with Integer_Vectors,Integer_Matrices; use Integer_Vectors,Integer_Matrices; package Integer_Farkas_Lemma is -- DESCRIPTION : -- This package provides some routines for implementing the Farkas lemma. procedure Integer_Complementary_Slackness ( tableau : in out matrix; feasible : out boolean ); procedure Integer_Complementary_Slackness ( tableau : in out matrix; lastcol : in integer; feasible : out boolean ); -- DESCRIPTION : -- Solves the complementary slackness problem: determines -- whether there exists a positive combination of the columns -- such that the right hand side is satisfied. -- ON ENTRY : -- tableau inequalities as columns, last column is right hand side; -- lastcol last column of interest in the tableau, -- when not provided, tableau'last(2)-1 is assumed. -- ON RETURN : -- tableau modified tableau of inequalities; -- feasible if true then the solution is feasible. end Integer_Farkas_Lemma; SHAR_EOF fi # end of overwriting check if test -f 'integer_support_functions.adb' then echo shar: will not over-write existing file "'integer_support_functions.adb'" else cat << "SHAR_EOF" > 'integer_support_functions.adb' with Integer_Graded_Lexicographical_Ordening; use Integer_Graded_Lexicographical_Ordening; package body Integer_Support_Functions is function Maximal_Support ( l : List; v : Vector ) return integer is sp,max : integer; tmp : List; begin if not Is_Null(l) then max := Head_Of(l).all*v; tmp := Tail_Of(l); while not Is_Null(tmp) loop sp := Head_Of(tmp).all*v; if sp > max then max := sp; end if; tmp := Tail_Of(tmp); end loop; return max; else return 0; end if; end Maximal_Support; function Minimal_Support ( l : List; v : Vector ) return integer is sp,min : integer; tmp : List; begin if not Is_Null(l) then min := Head_Of(l).all*v; tmp := Tail_Of(l); while not Is_Null(tmp) loop sp := Head_Of(tmp).all*v; if sp < min then min := sp; end if; tmp := Tail_Of(tmp); end loop; return min; else return 0; end if; end Minimal_Support; procedure Min_Max ( l : in List; k : in integer; min,max : in out integer ) is tmp : List; v : Link_to_Vector; begin if not Is_Null(l) then tmp := l; v := Head_Of(tmp); min := v(k); max := min; tmp := Tail_Of(tmp); while not Is_Null(tmp) loop v := Head_Of(tmp); if v(k) < min then min := v(k); elsif v(k) > max then max := v(k); end if; tmp := Tail_Of(tmp); end loop; end if; end Min_Max; function Graded_Max ( l : List ) return Link_to_Vector is res : Link_to_Vector := new Vector'(Head_Of(l).all); tmp : List := Tail_Of(l); ele : Link_to_Vector; begin while not Is_Null(tmp) loop ele := Head_Of(tmp); if ele > res then res.all := ele.all; end if; tmp := Tail_Of(tmp); end loop; return res; end Graded_Max; function Face ( l : List; v : Vector; m : integer ) return List is res,tmp,res_last : List; d : Vector(v'range); begin tmp := l; while not Is_Null(tmp) loop d := Head_Of(tmp).all; if d*v = m then Append(res,res_last,d); end if; tmp := Tail_Of(tmp); end loop; return res; end Face; function Inner_Face ( l : List; v : Vector ) return List is begin return Face(l,v,Minimal_Support(l,v)); end Inner_Face; function Outer_Face ( l : List; v : Vector ) return List is begin return Face(l,v,Maximal_Support(l,v)); end Outer_Face; end Integer_Support_Functions; SHAR_EOF fi # end of overwriting check if test -f 'integer_support_functions.ads' then echo shar: will not over-write existing file "'integer_support_functions.ads'" else cat << "SHAR_EOF" > 'integer_support_functions.ads' with Integer_Vectors; use Integer_Vectors; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; package Integer_Support_Functions is -- DESCRIPTION : -- This package provides support functions for polytopes spanned by -- lists of integer vectors. function Maximal_Support ( l : List; v : Vector ) return integer; function Minimal_Support ( l : List; v : Vector ) return integer; -- DESCRIPTION : -- Returns respectively max or min , for all d in l. procedure Min_Max ( l : in List; k : in integer; min,max : in out integer ); -- DESCRIPTION : -- Computes the minimum and maximum of the k-th entry of all -- points belonging to l. function Graded_Max ( l : List ) return Link_to_Vector; -- DESCRIPTION : -- Returns the maximal element in the list w.r.t. the graded -- lexicographical ordening. -- REQUIRED : List is not empty. function Face ( l : List; v : Vector; m : integer ) return List; -- DESCRIPTION : -- Returns a list of vectors d for which = m. -- For m = Maximal_Support(l,v), we get the face w.r.t. the outer normal v; -- for m = Minimal_Support(l,v), we get the face w.r.t. the inner normal v. function Inner_Face ( l : List; v : Vector ) return List; function Outer_Face ( l : List; v : Vector ) return List; -- DESCRIPTION : -- Returns the face of the list l, where v is inner or outer normal. end Integer_Support_Functions; SHAR_EOF fi # end of overwriting check if test -f 'linear_programming.adb' then echo shar: will not over-write existing file "'linear_programming.adb'" else cat << "SHAR_EOF" > 'linear_programming.adb' with Dictionaries; package body Linear_Programming is procedure Primal_Simplex ( dic : in out Matrix; eps : in double_float; in_bas,out_bas : in out Integer_Vectors.Vector; nit : in out natural; unbounded : out boolean ) is unbound : boolean; begin while not Dictionaries.Primal_Optimal(dic,eps) loop Dictionaries.Primal_Update(dic,in_bas,out_bas,eps,unbound); nit := nit + 1; exit when unbound; end loop; unbounded := unbound; end Primal_Simplex; procedure Generic_Primal_Simplex ( dic : in out Matrix; eps : in double_float; in_bas,out_bas : in out Integer_Vectors.Vector; nit : in out natural; unbounded : out boolean ) is unbound : boolean; begin while not Dictionaries.Primal_Optimal(dic,eps) loop Report(dic,in_bas,out_bas); Dictionaries.Primal_Update(dic,in_bas,out_bas,eps,unbound); nit := nit + 1; exit when unbound; end loop; Report(dic,in_bas,out_bas); unbounded := unbound; end Generic_Primal_Simplex; procedure Dual_Simplex ( dic : in out Matrix; eps : in double_float; in_bas,out_bas : in out Integer_Vectors.Vector; nit : in out natural; feasible : out boolean ) is feasi : boolean; begin while not Dictionaries.Dual_Optimal(dic,eps) loop Dictionaries.Dual_Update(dic,in_bas,out_bas,eps,feasi); nit := nit + 1; exit when not feasi; end loop; feasible := feasi; end Dual_Simplex; procedure Generic_Dual_Simplex ( dic : in out Matrix; eps : in double_float; in_bas,out_bas : in out Integer_Vectors.Vector; nit : in out natural; feasible : out boolean ) is feasi : boolean; begin while not Dictionaries.Dual_Optimal(dic,eps) loop Report(dic,in_bas,out_bas); Dictionaries.Dual_Update(dic,in_bas,out_bas,eps,feasi); nit := nit + 1; exit when not feasi; end loop; Report(dic,in_bas,out_bas); feasible := feasi; end Generic_Dual_Simplex; end Linear_Programming; SHAR_EOF fi # end of overwriting check if test -f 'linear_programming.ads' then echo shar: will not over-write existing file "'linear_programming.ads'" else cat << "SHAR_EOF" > 'linear_programming.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; with Float_Vectors,Float_Matrices; use Float_Vectors,Float_Matrices; with Integer_Vectors; package Linear_Programming is -- DESCRIPTION : -- This package contains some routines for solving the standard primal and -- dual linear-optimization problems, by means of the simplex algorithm. procedure Primal_Simplex ( dic : in out Matrix; eps : in double_float; in_bas,out_bas : in out Integer_Vectors.Vector; nit : in out natural; unbounded : out boolean ); generic with procedure Report ( dic : in Matrix; in_bas,out_bas : Integer_Vectors.Vector ); procedure Generic_Primal_Simplex ( dic : in out Matrix; eps : in double_float; in_bas,out_bas : in out Integer_Vectors.Vector; nit : in out natural; unbounded : out boolean ); -- DESCRIPTION : -- This is a very simple implementation of the simplex procedure -- for solving the following problem: -- -- max -- <= 0 -- -- where x = (1,x1,x2,..,xn). -- The generic procedure allows to report on intermediate dictionaries. -- REQUIRED : The primal dictionary is already initialized. -- ON ENTRY : -- dic the matrix for the initial dictionary; -- eps constant float to determine wether number is zero; -- in_bas initial unknowns in the basis; -- out_bas initial unknowns out the basis; -- nit counter for number of iterations. -- ON RETURN : -- dic the modified matrix for the dictionary; -- in_bas unknowns in the basis; -- out_bas unknowns out the basis; -- nit augmented with number of iterations made; -- unbounded true when it is detected that the solution is unbounded. procedure Dual_Simplex ( dic : in out Matrix; eps : in double_float; in_bas,out_bas : in out Integer_Vectors.Vector; nit : in out natural; feasible : out boolean ); generic with procedure Report ( dic : in Matrix; in_bas,out_bas : Integer_Vectors.Vector ); procedure Generic_Dual_Simplex ( dic : in out Matrix; eps : in double_float; in_bas,out_bas : in out Integer_Vectors.Vector; nit : in out natural; feasible : out boolean ); -- DESCRIPTION : -- This is a very simple implementation of the simplex procedure -- for solving the following problem: -- -- min -- >= 0 -- -- where x = (1,x1,x2,..,xn). -- The generic procedure allows to report on intermediate dictionaries. -- REQUIRED : The dual dictionary is already initialized. -- ON ENTRY : -- dic the matrix for the initial dictionary; -- eps constant float to determine wether number is zero; -- in_bas initial unknowns in the basis; -- out_bas initial unknowns out the basis; -- nit counter for number of iterations. -- ON RETURN : -- dic the modified matrix for the dictionary; -- in_bas unknowns in the basis; -- out_bas unknowns out the basis; -- nit augmented with number of iterations made; -- feasible is true when the problem is detected to be infeasible. end Linear_Programming; SHAR_EOF fi # end of overwriting check if test -f 'lists_of_float_vectors.adb' then echo shar: will not over-write existing file "'lists_of_float_vectors.adb'" else cat << "SHAR_EOF" > 'lists_of_float_vectors.adb' package body Lists_of_Float_Vectors is -- CONSTRUCTORS : function Deep_Create ( v : Float_Vectors_of_Vectors.Vector ) return List is res,res_last : List; begin for i in v'range loop Append(res,res_last,v(i).all); end loop; return res; end Deep_Create; function Shallow_Create ( v : Float_Vectors_of_Vectors.Vector ) return List is res,res_last : List; begin for i in v'range loop Append(res,res_last,v(i)); end loop; return res; end Shallow_Create; function Deep_Create ( l : List ) return Float_Vectors_of_Vectors.Vector is res : Float_Vectors_of_Vectors.Vector(1..Length_Of(l)); tmp : List := l; begin for i in res'range loop res(i) := new vector'(Head_Of(tmp).all); tmp := Tail_Of(tmp); end loop; return res; end Deep_Create; function Shallow_Create ( l : List ) return Float_Vectors_of_Vectors.Vector is res : Float_Vectors_of_Vectors.Vector(1..Length_Of(l)); tmp : List := l; begin for i in res'range loop res(i) := Head_Of(tmp); tmp := Tail_Of(tmp); end loop; return res; end Shallow_Create; procedure Copy ( l1 : in List; l2 : in out List ) is tmp,l2_last : List; lv : Link_to_Vector; begin Deep_Clear(l2); tmp := l1; while not Is_Null(tmp) loop lv := Head_Of(tmp); Append(l2,l2_last,lv.all); tmp := Tail_Of(tmp); end loop; end Copy; procedure Append ( first,last : in out List; v : in Vector ) is lv : Link_to_Vector := new Vector'(v); begin if Is_Null(first) then Construct(lv,first); last := first; else declare tmp : List; begin Construct(lv,tmp); Swap_Tail(last,tmp); last := Tail_Of(last); end; end if; end Append; procedure Append_Diff ( first,last : in out List; v : in Vector ) is begin if not Is_In(first,v) then Append(first,last,v); end if; end Append_Diff; procedure Append_Diff ( first,last : in out List; v : in Link_to_Vector ) is begin if v /= null and then not Is_In(first,v) then Append(first,last,v); end if; end Append_Diff; procedure Deep_Concat ( first,last : in out List; l : in List ) is tmp : List; lv : Link_to_Vector; begin if not Is_Null(l) then tmp := l; while not Is_Null(tmp) loop lv := Head_Of(tmp); Append(first,last,lv.all); tmp := Tail_Of(tmp); end loop; end if; end Deep_Concat; procedure Shallow_Concat ( first,last : in out List; l : in List ) is begin Concat(first,last,l); end Shallow_Concat; procedure Deep_Concat_Diff ( first,last : in out List; l : in List ) is tmp : List; lv : Link_to_Vector; begin if not Is_Null(l) then tmp := l; while not Is_Null(tmp) loop lv := Head_Of(tmp); Append_Diff(first,last,lv.all); tmp := Tail_Of(tmp); end loop; end if; end Deep_Concat_Diff; procedure Shallow_Concat_Diff ( first,last : in out List; l : in List ) is tmp : List; lv : Link_to_Vector; begin if not Is_Null(l) then tmp := l; while not Is_Null(tmp) loop lv := Head_Of(tmp); Append_Diff(first,last,lv); tmp := Tail_Of(tmp); end loop; end if; end Shallow_Concat_Diff; procedure Remove ( l : in out List; x : in Vector ) is lpt : Link_to_Vector; found : boolean; l1,l2 : List; begin if not Is_Null(l) then lpt := Head_Of(l); if lpt.all = x then Clear(lpt); l := Tail_Of(l); else found := false; l1 := l; l2 := Tail_Of(l1); while not Is_Null(l2) loop lpt := Head_Of(l2); found := (lpt.all = x); exit when found; l1 := l2; l2 := Tail_Of(l1); end loop; if found then Clear(lpt); l2 := Tail_Of(l2); Swap_Tail(l1,l2); end if; end if; end if; end Remove; procedure Remove ( l : in out List; x : in Link_to_Vector ) is begin if x /= null then Remove(l,x.all); end if; end Remove; procedure Swap_to_Front ( l : in out List; x : in Vector ) is first : Link_to_Vector; pt : Link_to_Vector; tmp : List; done : boolean := false; begin if not Is_Null(l) then first := Head_Of(l); if first.all /= x then tmp := Tail_Of(l); while not Is_Null(tmp) loop pt := Head_Of(tmp); if pt.all = x then Set_Head(tmp,first); Set_Head(l,pt); done := true; end if; exit when done; tmp := Tail_Of(tmp); end loop; end if; end if; end Swap_to_Front; procedure Swap_to_Front ( l : in out List; x : in Link_to_Vector ) is begin if x /= null then Swap_to_Front(l,x.all); end if; end Swap_to_Front; -- SELECTORS : function Is_In ( l : List; v : Vector ) return boolean is tmp : List; v2 : Link_to_Vector; begin tmp := l; while not Is_Null(tmp) loop v2 := Head_Of(tmp); if Equal(v2.all,v) then return true; else tmp := Tail_Of(tmp); end if; end loop; return false; end Is_In; function Is_In ( l : List; v : Link_to_Vector ) return boolean is begin if v = null then return false; else return Is_In(l,v.all); end if; end Is_In; function Is_Equal ( l1,l2 : List ) return boolean is function Check_All ( l1,l2 : List ) return boolean is -- DESCRIPTION : -- Returns true if all elements of l1 occur in l2. tmp : List; v : Link_to_Vector; begin tmp := l1; while not Is_Null(tmp) loop v := Head_Of(tmp); if not Is_In(l2,v) then return false; else tmp := Tail_Of(tmp); end if; end loop; return true; end Check_All; begin if not Check_All(l1,l2) then return false; elsif not Check_All(l2,l1) then return false; else return true; end if; end Is_Equal; -- DESTRUCTORS : procedure Deep_Clear ( l : in out List ) is tmp : List; v : Link_to_Vector; begin tmp := l; while not Is_Null(tmp) loop v := Head_Of(tmp); Clear(v); tmp := Tail_Of(tmp); end loop; Shallow_Clear(l); end Deep_Clear; procedure Shallow_Clear ( l : in out List ) is begin Lists_of_Link_to_Float_Vectors.Clear (Lists_of_Link_to_Float_Vectors.List(l)); end Shallow_Clear; end Lists_of_Float_Vectors; SHAR_EOF fi # end of overwriting check if test -f 'lists_of_float_vectors.ads' then echo shar: will not over-write existing file "'lists_of_float_vectors.ads'" else cat << "SHAR_EOF" > 'lists_of_float_vectors.ads' with Lists; with Float_Vectors; use Float_Vectors; with Float_Vectors_of_Vectors; package Lists_of_Float_Vectors is -- DESCRIPTION : -- This package offers an abstraction for working with -- lists of floating point vectors. -- DATA STRUCTURE : a list of pointers to float vectors package Lists_of_Link_to_Float_Vectors is new Lists(Link_to_Vector); type List is new Lists_of_Link_to_Float_Vectors.List; -- CONSTRUCTORS : function Deep_Create ( v : Float_Vectors_of_Vectors.Vector ) return List; function Shallow_Create ( v : Float_Vectors_of_Vectors.Vector ) return List; function Deep_Create ( l : List ) return Float_Vectors_of_Vectors.Vector; function Shallow_Create ( l : List ) return Float_Vectors_of_Vectors.Vector; -- DESCRIPTION : -- l := Create(v) equals v := Create(l). -- There is no sharing of pointers with a deep Create. -- With a shallow Create, both structure share the pointers. procedure Copy ( l1 : in List; l2 : in out List ); -- DESCRIPTION : -- After Copy(l1,l2), Equal(l1,l2) holds. -- Of course, this is a deep copy, a shallow copy is given by l2 := l1. procedure Append ( first,last : in out List; v : in Vector ); -- DESCRIPTION : -- The vector will be appended to the list first, -- last is a pointer to the last element of the list first. procedure Append_Diff ( first,last : in out List; v : in Vector ); procedure Append_Diff ( first,last : in out List; v : in Link_to_Vector ); -- DESCRIPTION : -- Only when v does not already belong to first, v will be added. procedure Deep_Concat ( first,last : in out List; l : in List ); procedure Shallow_Concat ( first,last : in out List; l : in List ); -- DESCRIPTION : -- The list l will be concatenated to the list first, -- last is a pointer to the last element of the list first. -- With a deep concatenation, no pointers are shared. procedure Deep_Concat_Diff ( first,last : in out List; l : in List ); procedure Shallow_Concat_Diff ( first,last : in out List; l : in List ); -- DESCRIPTION : -- Only those vectors of l will be concatenated that are not already -- in the list first. -- With a deep concatenation, no pointers are shared. procedure Remove ( l : in out List; x : in Vector ); procedure Remove ( l : in out List; x : in Link_to_Vector ); -- DESCRIPTION : -- Removes the point x from the list l. procedure Swap_to_Front ( l : in out List; x : in Vector ); procedure Swap_to_Front ( l : in out List; x : in Link_to_Vector ); -- DESCRIPTION : -- The point x belongs to the list l, -- Its content will be place in front of l and the first element -- of l will be swapped to the place of x. -- SELECTORS : function Is_In ( l : List; v : Vector ) return boolean; function Is_In ( l : List; v : Link_to_Vector ) return boolean; -- DESCRIPTION : -- Returns true if the vector belongs to l. function Is_Equal ( l1,l2 : List ) return boolean; -- DESCRIPTION : -- Returns true if both lists have the same vectors. -- DESTRUCTOR : procedure Deep_Clear ( l : in out List ); procedure Shallow_Clear ( l : in out List ); -- DESCRIPTION : -- Frees all allocated memory space. -- A deep clear deallocates also the points to the floating point vectors, -- while a shallow clear only removes the list structure. end Lists_of_Float_Vectors; SHAR_EOF fi # end of overwriting check if test -f 'lists_of_float_vectors_io.adb' then echo shar: will not over-write existing file "'lists_of_float_vectors_io.adb'" else cat << "SHAR_EOF" > 'lists_of_float_vectors_io.adb' with Float_Vectors; use Float_Vectors; with Float_Vectors_io; use Float_Vectors_io; package body Lists_of_Float_Vectors_io is procedure get ( n,m : in natural; l : out List ) is begin get(Standard_Input,n,m,l); end get; procedure get ( file : in file_type; n,m : in natural; l : out List ) is tmp,tmp_last : List; begin for i in 1..m loop declare v : Link_to_Vector; begin get(file,n,v); Append(tmp,tmp_last,v); end; end loop; l := tmp; end get; procedure put ( l : in List ) is begin put(Standard_Output,l); end put; procedure put ( file : in file_type; l : in List ) is tmp : List := l; begin while not Is_Null(tmp) loop put(file,Head_Of(tmp)); new_line(file); tmp := Tail_Of(tmp); end loop; end put; procedure put ( l : in List; fore,aft,exp : in natural ) is begin put(Standard_Output,l,fore,aft,exp); end put; procedure put ( file : in file_type; l : in List; fore,aft,exp : in natural ) is tmp : List; begin tmp := l; while not Is_Null(tmp) loop put(file,Head_Of(tmp),fore,aft,exp); new_line(file); tmp := Tail_Of(tmp); end loop; end put; end Lists_of_Float_Vectors_io; SHAR_EOF fi # end of overwriting check if test -f 'lists_of_float_vectors_io.ads' then echo shar: will not over-write existing file "'lists_of_float_vectors_io.ads'" else cat << "SHAR_EOF" > 'lists_of_float_vectors_io.ads' with text_io; use text_io; with Lists_of_Float_Vectors; use Lists_of_Float_Vectors; package Lists_of_Float_Vectors_io is -- DESCRIPTION : -- This package offers routines for Input/Output of -- lists of integer vectors. procedure get ( n,m : in natural; l : out List ); procedure get ( file : in file_type; n,m : in natural; l : out List ); -- DESCRIPTION : -- Reads m integer vectors of length n from standard output or from file. procedure put ( l : in List ); procedure put ( file : in file_type; l : in List ); procedure put ( l : in List; fore,aft,exp : in natural ); procedure put ( file : in file_type; l : in List; fore,aft,exp : in natural ); -- DESCRIPTION : -- Writes the vectors in l on standard output or on file. -- The fore, aft and exp determine the output format of the floats. end Lists_of_Float_Vectors_io; SHAR_EOF fi # end of overwriting check if test -f 'lists_of_integer_vectors.adb' then echo shar: will not over-write existing file "'lists_of_integer_vectors.adb'" else cat << "SHAR_EOF" > 'lists_of_integer_vectors.adb' package body Lists_of_Integer_Vectors is -- CONSTRUCTORS : function Deep_Create ( v : Integer_Vectors_of_Vectors.Vector ) return List is res,res_last : List; begin for i in v'range loop Append(res,res_last,v(i).all); end loop; return res; end Deep_Create; function Shallow_Create ( v : Integer_Vectors_of_Vectors.Vector ) return List is res,res_last : List; begin for i in v'range loop Append(res,res_last,v(i)); end loop; return res; end Shallow_Create; function Deep_Create ( l : List ) return Integer_Vectors_of_Vectors.Vector is res : Integer_Vectors_of_Vectors.Vector(1..Length_Of(l)); tmp : List := l; begin for i in res'range loop declare v : constant Integer_Vectors.Vector := Head_Of(tmp).all; begin res(i) := new vector'(v); end; tmp := Tail_Of(tmp); end loop; return res; end Deep_Create; function Shallow_Create ( l : List ) return Integer_Vectors_of_Vectors.Vector is res : Integer_Vectors_of_Vectors.Vector(1..Length_Of(l)); tmp : List := l; begin for i in res'range loop res(i) := Head_Of(tmp); tmp := Tail_Of(tmp); end loop; return res; end Shallow_Create; procedure Copy ( l1 : in List; l2 : in out List ) is tmp,l2_last : List; lv : Link_to_Vector; begin Deep_Clear(l2); tmp := l1; while not Is_Null(tmp) loop lv := Head_Of(tmp); Append(l2,l2_last,lv.all); tmp := Tail_Of(tmp); end loop; end Copy; procedure Append ( first,last : in out List; v : in Vector ) is lv : Link_to_Vector := new Vector'(v); begin if Is_Null(first) then Construct(lv,first); last := first; else declare tmp : List; begin Construct(lv,tmp); Swap_Tail(last,tmp); last := Tail_Of(last); end; end if; end Append; procedure Append_Diff ( first,last : in out List; v : in Vector ) is begin if not Is_In(first,v) then Append(first,last,v); end if; end Append_Diff; procedure Append_Diff ( first,last : in out List; v : in Link_to_Vector ) is begin if v /= null and then not Is_In(first,v) then Append(first,last,v); end if; end Append_Diff; procedure Deep_Concat ( first,last : in out List; l : in List ) is tmp : List; lv : Link_to_Vector; begin if not Is_Null(l) then tmp := l; while not Is_Null(tmp) loop lv := Head_Of(tmp); Append(first,last,lv.all); tmp := Tail_Of(tmp); end loop; end if; end Deep_Concat; procedure Shallow_Concat ( first,last : in out List; l : in List ) is begin Concat(first,last,l); end Shallow_Concat; procedure Deep_Concat_Diff ( first,last : in out List; l : in List ) is tmp : List; lv : Link_to_Vector; begin if not Is_Null(l) then tmp := l; while not Is_Null(tmp) loop lv := Head_Of(tmp); Append_Diff(first,last,lv.all); tmp := Tail_Of(tmp); end loop; end if; end Deep_Concat_Diff; procedure Shallow_Concat_Diff ( first,last : in out List; l : in List ) is tmp : List; lv : Link_to_Vector; begin if not Is_Null(l) then tmp := l; while not Is_Null(tmp) loop lv := Head_Of(tmp); Append_Diff(first,last,lv); tmp := Tail_Of(tmp); end loop; end if; end Shallow_Concat_Diff; procedure Remove ( l : in out List; x : in Vector ) is lpt : Link_to_Vector; found : boolean; l1,l2 : List; begin if not Is_Null(l) then lpt := Head_Of(l); if lpt.all = x then Clear(lpt); l := Tail_Of(l); else found := false; l1 := l; l2 := Tail_Of(l1); while not Is_Null(l2) loop lpt := Head_Of(l2); found := (lpt.all = x); exit when found; l1 := l2; l2 := Tail_Of(l1); end loop; if found then Clear(lpt); l2 := Tail_Of(l2); Swap_Tail(l1,l2); end if; end if; end if; end Remove; procedure Remove ( l : in out List; x : in Link_to_Vector ) is begin if x /= null then Remove(l,x.all); end if; end Remove; procedure Swap_to_Front ( l : in out List; x : in Vector ) is first : Link_to_Vector; pt : Link_to_Vector; tmp : List; done : boolean := false; begin if not Is_Null(l) then first := Head_Of(l); if first.all /= x then tmp := Tail_Of(l); while not Is_Null(tmp) loop pt := Head_Of(tmp); if pt.all = x then Set_Head(tmp,first); Set_Head(l,pt); done := true; end if; exit when done; tmp := Tail_Of(tmp); end loop; end if; end if; end Swap_to_Front; procedure Swap_to_Front ( l : in out List; x : in Link_to_Vector ) is begin if x /= null then Swap_to_Front(l,x.all); end if; end Swap_to_Front; -- SELECTORS : function Is_In ( l : List; v : Vector ) return boolean is tmp : List; v2 : Link_to_Vector; begin tmp := l; while not Is_Null(tmp) loop v2 := Head_Of(tmp); if Equal(v2.all,v) then return true; else tmp := Tail_Of(tmp); end if; end loop; return false; end Is_In; function Is_In ( l : List; v : Link_to_Vector ) return boolean is begin if v = null then return false; else return Is_In(l,v.all); end if; end Is_In; function Sub_List ( l1,l2 : List ) return boolean is tmp : List := l1; begin while not Is_Null(tmp) loop if not Is_In(l2,Head_Of(tmp)) then return false; else tmp := Tail_Of(tmp); end if; end loop; return true; end Sub_List; function Is_Equal ( l1,l2 : List ) return boolean is begin if not Sub_List(l1,l2) then return false; elsif not Sub_List(l2,l1) then return false; else return true; end if; end Is_Equal; -- DESTRUCTORS : procedure Deep_Clear ( l : in out List ) is tmp : List; v : Link_to_Vector; begin tmp := l; while not Is_Null(tmp) loop v := Head_Of(tmp); Clear(v); tmp := Tail_Of(tmp); end loop; Shallow_Clear(l); end Deep_Clear; procedure Shallow_Clear ( l : in out List ) is begin Lists_of_Link_to_Integer_Vectors.Clear (Lists_of_Link_to_Integer_Vectors.List(l)); end Shallow_Clear; end Lists_of_Integer_Vectors; SHAR_EOF fi # end of overwriting check if test -f 'lists_of_integer_vectors.ads' then echo shar: will not over-write existing file "'lists_of_integer_vectors.ads'" else cat << "SHAR_EOF" > 'lists_of_integer_vectors.ads' with Lists; with Integer_Vectors; use Integer_Vectors; with Integer_Vectors_of_Vectors; package Lists_of_Integer_Vectors is -- DESCRIPTION : -- This package offers an abstraction for working with -- lists of integer vectors. -- DATA STRUCTURE : a list of pointers to integer vectors package Lists_of_Link_to_Integer_Vectors is new Lists(Link_to_Vector); type List is new Lists_of_Link_to_Integer_Vectors.List; -- CONSTRUCTORS : function Deep_Create ( v : Integer_Vectors_of_Vectors.Vector ) return List; function Shallow_Create ( v : Integer_Vectors_of_Vectors.Vector ) return List; function Deep_Create ( l : List ) return Integer_Vectors_of_Vectors.Vector; function Shallow_Create ( l : List ) return Integer_Vectors_of_Vectors.Vector; -- DESCRIPTION : -- l := Create(v) equals v := Create(l). -- There is no sharing of pointers with a deep Create. -- With a shallow Create, both structure share the pointers. procedure Copy ( l1 : in List; l2 : in out List ); -- DESCRIPTION : -- After Copy(l1,l2), Equal(l1,l2) holds. -- Of course, this is a deep copy, a shallow copy is given by l2 := l1. procedure Append ( first,last : in out List; v : in Vector ); -- DESCRIPTION : -- The vector will be appended to the list first, -- last is a pointer to the last element of the list first. procedure Append_Diff ( first,last : in out List; v : in Vector ); procedure Append_Diff ( first,last : in out List; v : in Link_to_Vector ); -- DESCRIPTION : -- Only when v does not already belong to first, v will be added. procedure Deep_Concat ( first,last : in out List; l : in List ); procedure Shallow_Concat ( first,last : in out List; l : in List ); -- DESCRIPTION : -- The list l will be concatenated to the list first, -- last is a pointer to the last element of the list first. -- With a deep concatenation, no pointers are shared. procedure Deep_Concat_Diff ( first,last : in out List; l : in List ); procedure Shallow_Concat_Diff ( first,last : in out List; l : in List ); -- DESCRIPTION : -- Only those vectors of l will be concatenated that are not already -- in the list first. -- With a deep concatenation, no pointers are shared. procedure Remove ( l : in out List; x : in Vector ); procedure Remove ( l : in out List; x : in Link_to_Vector ); -- DESCRIPTION : -- Removes the point x from the list l. procedure Swap_to_Front ( l : in out List; x : in Vector ); procedure Swap_to_Front ( l : in out List; x : in Link_to_Vector ); -- DESCRIPTION : -- The point x belongs to the list l, -- Its content will be place in front of l and the first element -- of l will be swapped to the place of x. -- SELECTORS : function Is_In ( l : List; v : Vector ) return boolean; function Is_In ( l : List; v : Link_to_Vector ) return boolean; -- DESCRIPTION : -- Returns true if the vector belongs to l. function Sub_List ( l1,l2 : List ) return boolean; -- DESCRIPTION : -- Returns true if all elements in l1 occur in l2. function Is_Equal ( l1,l2 : List ) return boolean; -- DESCRIPTION : -- Returns true if both lists have the same vectors. -- DESTRUCTOR : procedure Deep_Clear ( l : in out List ); procedure Shallow_Clear ( l : in out List ); -- DESCRIPTION : -- Frees all allocated memory space. -- A deep clear deallocates also the points to the integer vectors, -- while a shallow clear only removes the list structure. end Lists_of_Integer_Vectors; SHAR_EOF fi # end of overwriting check if test -f 'lists_of_integer_vectors_io.adb' then echo shar: will not over-write existing file "'lists_of_integer_vectors_io.adb'" else cat << "SHAR_EOF" > 'lists_of_integer_vectors_io.adb' with Integer_Vectors; use Integer_Vectors; with Integer_Vectors_io; use Integer_Vectors_io; package body Lists_of_Integer_Vectors_io is procedure get ( n,m : in natural; l : out List ) is begin get(Standard_Input,n,m,l); end get; procedure get ( file : in file_type; n,m : in natural; l : out List ) is tmp,tmp_last : List; begin for i in 1..m loop declare v : Link_to_Vector; begin get(file,n,v); Append(tmp,tmp_last,v); end; end loop; l := tmp; end get; procedure put ( l : in List ) is begin put(Standard_Output,l); end put; procedure put ( file : in file_type; l : in List ) is tmp : List := l; begin while not Is_Null(tmp) loop put(file,Head_Of(tmp)); new_line(file); tmp := Tail_Of(tmp); end loop; end put; end Lists_of_Integer_Vectors_io; SHAR_EOF fi # end of overwriting check if test -f 'lists_of_integer_vectors_io.ads' then echo shar: will not over-write existing file "'lists_of_integer_vectors_io.ads'" else cat << "SHAR_EOF" > 'lists_of_integer_vectors_io.ads' with text_io; use text_io; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; package Lists_of_Integer_Vectors_io is -- DESCRIPTION : -- This package offers routines for Input/Output of -- lists of integer vectors. procedure get ( n,m : in natural; l : out List ); procedure get ( file : in file_type; n,m : in natural; l : out List ); -- DESCRIPTION : -- Reads m integer vectors of length n from standard output or from file. procedure put ( l : in List ); procedure put ( file : in file_type; l : in List ); -- DESCRIPTION : -- Writes the vectors in l on standard output or on file. end Lists_of_Integer_Vectors_io; SHAR_EOF fi # end of overwriting check if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' # Establishing the links : linkrc = ../../../Ada/Math_Lib/Supports links: @-ln -s $(linkrc)/dictios.a dictionaries.ads @-ln -s $(linkrc)/dictiosB.a dictionaries.adb @-ln -s $(linkrc)/facenum.a face_enumerators.ads @-ln -s $(linkrc)/facenumB.a face_enumerators.adb @-ln -s $(linkrc)/facenu_ut.a face_enumerators_utilities.ads @-ln -s $(linkrc)/facenu_utB.a face_enumerators_utilities.adb @-ln -s $(linkrc)/farkas.a farkas_lemma.ads @-ln -s $(linkrc)/farkasB.a farkas_lemma.adb @-ln -s $(linkrc)/fltfanum.a float_face_enumerators.ads @-ln -s $(linkrc)/fltfanumB.a float_face_enumerators.adb @-ln -s $(linkrc)/flt_lis.a float_linear_inequality_solvers.ads @-ln -s $(linkrc)/flt_lisB.a float_linear_inequality_solvers.adb @-ln -s $(linkrc)/fltintro.a float_to_integer_rounding.ads @-ln -s $(linkrc)/fltintroB.a float_to_integer_rounding.adb @-ln -s $(linkrc)/givens.a givens_rotations.ads @-ln -s $(linkrc)/givensB.a givens_rotations.adb @-ln -s $(linkrc)/int_farkas.a integer_farkas_lemma.ads @-ln -s $(linkrc)/int_farkasB.a integer_farkas_lemma.adb @-ln -s $(linkrc)/lp.a linear_programming.ads @-ln -s $(linkrc)/lpB.a linear_programming.adb @-ln -s $(linkrc)/lstivc.a lists_of_integer_vectors.ads @-ln -s $(linkrc)/lstivcB.a lists_of_integer_vectors.adb @-ln -s $(linkrc)/lstivc_io.a lists_of_integer_vectors_io.ads @-ln -s $(linkrc)/lstivc_ioB.a lists_of_integer_vectors_io.adb @-ln -s $(linkrc)/arrlivc.a arrays_of_integer_vector_lists.ads @-ln -s $(linkrc)/arrlivcB.a arrays_of_integer_vector_lists.adb @-ln -s $(linkrc)/arrlivc_io.a arrays_of_integer_vector_lists_io.ads @-ln -s $(linkrc)/arrlivc_ioB.a arrays_of_integer_vector_lists_io.adb @-ln -s $(linkrc)/intsupfu.a integer_support_functions.ads @-ln -s $(linkrc)/intsupfuB.a integer_support_functions.adb @-ln -s $(linkrc)/intfaces.a integer_faces_of_polytope.ads @-ln -s $(linkrc)/intfacesB.a integer_faces_of_polytope.adb @-ln -s $(linkrc)/intfaces_io.a integer_faces_of_polytope_io.ads @-ln -s $(linkrc)/intfaces_ioB.a integer_faces_of_polytope_io.adb @-ln -s $(linkrc)/lstfvc.a lists_of_float_vectors.ads @-ln -s $(linkrc)/lstfvcB.a lists_of_float_vectors.adb @-ln -s $(linkrc)/lstfvc_io.a lists_of_float_vectors_io.ads @-ln -s $(linkrc)/lstfvc_ioB.a lists_of_float_vectors_io.adb @-ln -s $(linkrc)/arrlfvc.a arrays_of_float_vector_lists.ads @-ln -s $(linkrc)/arrlfvcB.a arrays_of_float_vector_lists.adb @-ln -s $(linkrc)/arrlfvc_io.a arrays_of_float_vector_lists_io.ads @-ln -s $(linkrc)/arrlfvc_ioB.a arrays_of_float_vector_lists_io.adb @-ln -s $(linkrc)/fltsupfu.a float_support_functions.ads @-ln -s $(linkrc)/fltsupfuB.a float_support_functions.adb @-ln -s $(linkrc)/fltfaces.a float_faces_of_polytope.ads @-ln -s $(linkrc)/fltfacesB.a float_faces_of_polytope.adb SHAR_EOF fi # end of overwriting check cd .. cd .. if test ! -d 'Objects' then mkdir 'Objects' fi cd 'Objects' if test -f 'READ_ME' then echo shar: will not over-write existing file "'READ_ME'" else cat << "SHAR_EOF" > 'READ_ME' This contains links to the target routines and the makefile to install phc with the gnu-ada compiler. To install the packages, do : 0. Make sure you have version 3.09 of the gnu-ada compiler, the file PHC/READ_ME contains information to obtain it; 1. Type make phc If all goes well, you can find the executable as file phc in the directory PHC/bin. To clean the auxiliary files type make clean SHAR_EOF fi # end of overwriting check if test -f 'dispatch.adb' then echo shar: will not over-write existing file "'dispatch.adb'" else cat << "SHAR_EOF" > 'dispatch.adb' with text_io; use text_io; with Unix_Command_Line; with mainscal,mainred; with mainroco,bablroco; with bablpoco,mainpoco; with mainsmvc,babldmvc; with mainphc,bablphc; with mainvali,bablvali; procedure Dispatch is -- BANNERS WITH INFORMATION TO START DIALOGUE WITH USER : welcome : constant string := "Welcome to PHC (Polynomial Homotopy Continuation) Version 1.0."; author : constant string := "Author is Jan Verschelde (E-mail: na.jverschelde@na-net.ornl.gov)."; scalban : constant string := "Equation/variable Scaling on polynomial system and solution list."; reduban : constant string := "Linear and nonlinear Reduction w.r.t the total degree of the system."; rocoban : constant string := "Root counting and Construction of product and polyhedral start systems."; mvcban : constant string := "Mixed-Volume Computation by four different lifting strategies."; pocoban : constant string := "Polynomial Continuation defined by a homotopy in one parameter."; valiban : constant string := "Validation, refinement and purification of computed solution lists."; -- AVAILABLE OPTIONS : options : constant string := "sdpmrvb"; -- s : scal => scaling of a polynomial system -- d : redu => reduction w.r.t. the total degree -- p : poco => polynomial continuation -- r : roco => root counting methods -- m : mvc => mixed-volume computation -- v : vali => validation of solutions -- b : batch or black box processing option1,option2 : character; posi : natural := 0; argc : natural := Unix_Command_Line.Number_of_Arguments; -- UTILITIES FOR PROCESSING THE ARGUMENTS AND OPTIONS : function Read_Argument ( k : in natural ) return string is -- DESCRIPTION : -- Reads the kth argument from the command line. -- An argument is a string not proceeded by a `-' character. -- The empty string is returned when there is no argument. null_string : constant string := ""; cnt : natural := 0; begin if argc >= 1 then for i in 1..argc loop declare s : constant string := Unix_Command_Line.Argument(i); begin if s(1) /= '-' then cnt := cnt + 1; if k = cnt then return s; end if; end if; end; end loop; end if; return null_string; end Read_Argument; function Position ( c : character; s : string ) return natural is -- DESCRIPTION : -- If the the string contains the character c, then its position -- in the string will be returned. Otherwise s'first-1 will be returned. begin for i in s'range loop if s(i) = c then return i; end if; end loop; return s'first-1; end Position; procedure Read_Next_Option ( pos : in out natural; legal : in string; option : out character ) is -- DESCRIPTION : -- Reads the next option from the command line arguments. -- ON ENTRY : -- pos position in the command line of the last option -- that has been read; -- legal string which contains all legal options. -- ON RETURN : -- pos the position in the command line of the last option read; -- option is blank when no legal option could be read, otherwise it -- contains the next legal option. res : character := ' '; start : natural := pos+1; begin if argc >= 1 then for i in start..argc loop declare s : constant string := Unix_Command_Line.Argument(i); begin if s(1) = '-' then pos := Position(s(2),legal); if pos >= legal'first then res := legal(pos); else put("The option `"); put(s); put_line("' is not recognised. Will ignore it..."); end if; end if; end; pos := i; exit when (res /= ' '); end loop; end if; option := res; end Read_Next_Option; -- DISPATCHING ACCORDING TO OPTIONS : procedure Dispatcher ( infile,outfile : in string ) is begin case option1 is when 'b' => Read_Next_Option(posi,options,option2); case option2 is when 's' => mainscal(infile,outfile); when 'd' => mainred(infile,outfile); when 'r' => bablroco(infile,outfile); when 'm' => babldmvc(infile,outfile); when 'p' => bablpoco(infile,outfile); when 'v' => bablvali(infile,outfile); when others => bablphc(infile,outfile); end case; when 's' => put_line(welcome); put_line(scalban); mainscal(infile,outfile); when 'd' => put_line(welcome); put_line(reduban); mainred(infile,outfile); when 'r' => Read_Next_Option(posi,options,option2); case option2 is when 'b' => bablroco(infile,outfile); when others => put_line(welcome); put_line(rocoban); mainroco(infile,outfile); end case; when 'm' => Read_Next_Option(posi,options,option2); case option2 is when 'b' => babldmvc(infile,outfile); when others => put_line(welcome); put_line(mvcban); mainsmvc(infile,outfile); end case; when 'p' => Read_Next_Option(posi,options,option2); case option2 is when 'b' => bablpoco(infile,outfile); when others => put_line(welcome); put_line(pocoban); mainpoco(infile,outfile); end case; when 'v' => Read_Next_Option(posi,options,option2); case option2 is when 'b' => bablvali(infile,outfile); when others => put_line(welcome); put_line(valiban); mainvali(infile,outfile); end case; when others => put_line(welcome); mainphc(infile,outfile); end case; end Dispatcher; begin Read_Next_Option(posi,options,option1); declare nullstring : constant string := ""; argument : constant string := Read_Argument(1); outfile : constant string := Read_Argument(2); begin if (argument /= "") and then (argument = outfile) then new_line; put_line("Input and output file have the same name."); put_line("Will ignore output file name..."); Dispatcher(argument,nullstring); else Dispatcher(argument,outfile); end if; end; end Dispatch; SHAR_EOF fi # end of overwriting check if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' # compiler environment : CC=gcc BIND=gnatbl INCLULIBS = -I../System -I../Math_Lib/Numbers -I../Math_Lib/Matrices -I../Math_Lib/Polynomials -I../Math_Lib/Supports -I../Homotopy -I../Continuation -I../Root_Counts/Product -I../Root_Counts/Implift -I../Root_Counts/Stalift -I../Root_Counts/Dynlift -I../Root_Counts/Symmetry -I../Main GNATFLAGS = -gnatv -O3 -gnatp # GNATFLAGS = -O3 -gnatp # GNATFLAGS = -gnatv .SUFFIXES: .adb .ads .ali .ads.o: $(CC) -c $(GNATFLAGS) $< .adb.o: $(CC) -c $(GNATFLAGS) $< .c.o: $(CC) -c $(CFLAGS) $< # target routine : phc: gnatmake -c $(INCLULIBS) $(GNATFLAGS) dispatch.adb gnatbl -o ../../bin/phc dispatch.ali # example of using PHCPACK : use_phc: gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_phc.adb gnatbl -o /tmp/use_phc use_phc.ali # cleaning up the object files : clean: force /bin/rm -f *.o *.ali force: SHAR_EOF fi # end of overwriting check if test -f 'use_phc.adb' then echo shar: will not over-write existing file "'use_phc.adb'" else cat << "SHAR_EOF" > 'use_phc.adb' with text_io,Solutions; use text_io,Solutions; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with PHCPACK; procedure use_phc is infile,outfile : file_type; -- input and output file p,q : Link_to_Poly_Sys; -- target and start system mixed_volume : natural; -- root count is mixed volume sols : Solution_List; -- list of solutions begin Open(infile,in_file,"test.in"); get(infile,p); Create(outfile,out_file,"test.out"); put(outfile,p.all); q := new Poly_Sys(p'range); PHCPACK.Static_Lifting(outfile,p.all,mixed_volume,q.all,sols); PHCPACK.Artificial_Parameter_Continuation(outfile,p.all,q.all,sols); PHCPACK.Refine_Roots(outfile,p.all,sols); end use_phc; SHAR_EOF fi # end of overwriting check cd .. if test -f 'READ_ME' then echo shar: will not over-write existing file "'READ_ME'" else cat << "SHAR_EOF" > 'READ_ME' The GNAT directory with links to the sources mirrors the structure of the Ada directory of PHC, as organized in the following tree of directories: GNAT : links to the sources of PHC |-- System : 0. UNIX dependencies, e.g.: timing package |-- Math_Lib : 1. general mathematical library | |-- Numbers : 1.1. number representations | |-- Matrices : 1.2. matrices and linear-system solvers | |-- Polynomials : 1.3. multivariate polynomial systems | |-- Supports : 1.4. support sets and linear programming |-- Homotopy : 2. homotopy and solution lists |-- Continuation : 3. path-tracking routines |-- Root_Counts : 4. root counts and homotopy construction | |-- Product : 4.1. linear-product start systems | |-- Implift : 4.2. implicit lifting | |-- Stalift : 4.3. static lifting | |-- Dynlift : 4.4. dynamic lifting | |-- Symmetry : 4.5. exploitation of symmetry relations |-- Main : 5. main dispatcher |-- Objects : 6. to install, type: make phc SHAR_EOF fi # end of overwriting check if test ! -d 'Root_Counts' then mkdir 'Root_Counts' fi cd 'Root_Counts' if test ! -d 'Dynlift' then mkdir 'Dynlift' fi cd 'Dynlift' if test -f 'babldmvc.adb' then echo shar: will not over-write existing file "'babldmvc.adb'" else cat << "SHAR_EOF" > 'babldmvc.adb' with text_io,integer_io; use text_io,integer_io; with Communications_with_User; use Communications_with_User; with Timing_Package; use Timing_Package; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Solutions,Solutions_io; use Solutions,Solutions_io; with Integer_Vectors; use Integer_Vectors; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Integer_Mixed_Subdivisions; use Integer_Mixed_Subdivisions; with Black_Box_Mixed_Volume_Computations; use Black_Box_Mixed_Volume_Computations; procedure babldmvc ( infilename,outfilename : in string ) is infile,outfile : file_type; lp : Link_to_Poly_Sys; procedure Read_System ( file : in out file_type; filename : in string ) is begin if filename /= "" then Open_Input_File(file,filename); get(file,lp); end if; exception when others => put_line("Something is wrong with argument file..."); lp := null; return; end Read_System; procedure Main ( file : in file_type; p : in Poly_Sys ) is timer : Timing_Widget; q : Poly_Sys(p'range); qsols : Solution_List; mix : Link_to_Vector; lifsup : Link_to_Array_of_Lists; mixsub : Mixed_Subdivision; mv : natural; begin tstart(timer); Black_Box_Mixed_Volume_Computation(p,mix,lifsup,mixsub,mv); tstop(timer); new_line(outfile); put(outfile,"mixed volume : "); put(outfile,mv,1); new_line(outfile); new_line(outfile); print_times(outfile,timer,"Mixed-Volume Computation"); if mv > 0 then tstart(timer); Black_Box_Polyhedral_Continuation (p,mix.all,lifsup.all,mixsub,q,qsols); tstop(timer); new_line(outfile); put_line(outfile,"RANDOM COEFFICIENT START SYSTEM :"); new_line(outfile); put_line(outfile,q); new_line(outfile); put_line(outfile,"START SOLUTIONS :"); new_line(outfile); put(outfile,Length_Of(qsols),Head_Of(qsols).n,qsols); new_line(outfile); print_times(outfile,timer,"Polyhedral Continuation"); end if; end Main; begin Read_System(infile,infilename); if lp = null then new_line; get(lp); end if; Close(infile); Create_Output_File(outfile,outfilename); put(outfile,lp.all); Main(outfile,lp.all); Close(outfile); end babldmvc; SHAR_EOF fi # end of overwriting check if test -f 'babldmvc.ads' then echo shar: will not over-write existing file "'babldmvc.ads'" else cat << "SHAR_EOF" > 'babldmvc.ads' procedure babldmvc ( infilename,outfilename : in string ); -- DESCRIPTION : -- This is the mixed volume computation procedure, to run in batch -- processing mode or as a black box routine. -- The arguments are the respective names of the input and output files. SHAR_EOF fi # end of overwriting check if test -f 'black_box_mixed_volume_computations.adb' then echo shar: will not over-write existing file "'black_box_mixed_volume_computations.adb'" else cat << "SHAR_EOF" > 'black_box_mixed_volume_computations.adb' with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Power_Lists,Vertices; use Power_Lists,Vertices; with Integer_Lifting_Utilities; use Integer_Lifting_Utilities; with Cayley_Trick; use Cayley_Trick; with Triangulations; use Triangulations; with Dynamic_Triangulations; use Dynamic_Triangulations; with Triangulations_and_Subdivisions; use Triangulations_and_Subdivisions; with Flatten_Mixed_Subdivisions; use Flatten_Mixed_Subdivisions; with Mixed_Volume_Computation; use Mixed_Volume_Computation; with Complex_Numbers; use Complex_Numbers; with Complex_Vectors; with Complex_Vectors_of_Vectors; with Exponent_Vectors; use Exponent_Vectors; with Polynomial_to_Laurent_Converters; use Polynomial_to_Laurent_Converters; with Laurent_to_Polynomial_Converters; use Laurent_to_Polynomial_Converters; with Complex_Multivariate_Laurent_Polynomials; use Complex_Multivariate_Laurent_Polynomials; with Complex_Laurent_Polynomial_Systems; use Complex_Laurent_Polynomial_Systems; with Laurent_Jacobi_Matrices; use Laurent_Jacobi_Matrices; with Polynomial_Randomizers; use Polynomial_Randomizers; with Continuation_Parameters; with Integer_Polyhedral_Continuation; use Integer_Polyhedral_Continuation; package body Black_Box_Mixed_Volume_Computations is procedure Black_Box_Mixed_Volume_Computation ( p : in Poly_Sys; mix : out Link_to_Vector; lifsup : out Link_to_Array_of_Lists; mixsub : out Mixed_Subdivision; mv : out natural ) is n : constant natural := p'length; supports : Array_of_Lists(p'range) := Construct_Power_Lists(p); verpts : Array_of_Lists(p'range); tmix,perms : Integer_Vectors.Link_to_Vector; tmixsub : Mixed_Subdivision; procedure Collect_Flattening ( t : in Triangulation; l : List ) is -- DESCRIPTION : -- Updates the subdivision tmixsub with the flattened cells. -- The triangulation on entry contains the whole triangulation, -- not just the new cells. cells : Mixed_Subdivision; begin if Is_Null(tmixsub) then cells := Deep_Create(n,t); else cells := Non_Flat_Deep_Create(n,t); Construct(Head_Of(tmixsub),cells); end if; Flatten(cells); tmixsub := cells; end Collect_Flattening; procedure C_Dynamic_Lifting is new Dynamic_Triangulations.Dynamic_Lifting_with_Flat(Collect_Flattening); begin for i in supports'range loop verpts(i) := Vertex_Points(supports(i)); end loop; Compute_Mixture(verpts,tmix,perms); declare pts,lifted : Array_of_Lists(tmix'range); last : List; t : Triangulation; nt : natural; lastcells : Mixed_Subdivision; begin if tmix'length = 1 then C_Dynamic_Lifting(verpts(1),false,false,0,lifted(1),last,t); if Is_Null(tmixsub) then tmixsub := Deep_Create(n,t); else lastcells := Non_Flat_Deep_Create(n,t); Construct(Head_Of(tmixsub),lastcells); tmixsub := lastcells; end if; Clear(t); Mixed_Volume(n,tmix.all,tmixsub,mv); elsif tmix'length <= n/2 then pts := Typed_Lists(tmix.all,verpts); Dynamic_Cayley(n,tmix.all,pts,false,false,0,lifted,tmixsub,nt); Mixed_Volume(n,tmix.all,tmixsub,mv); else Mixed_Volume(n,tmix.all,verpts,lifted,tmixsub,mv); end if; lifsup := new Array_of_Lists'(lifted); end; mix := tmix; mixsub := tmixsub; end Black_Box_Mixed_Volume_Computation; procedure Black_Box_Polyhedral_Continuation ( p : in Poly_Sys; mix : in Vector; lifsup : in Array_of_Lists; mixsub : in Mixed_Subdivision; q : in out Poly_Sys; qsols : in out Solution_List ) is n : constant natural := p'length; lq,llq : Laur_Sys(p'range); h : Eval_Coeff_Laur_Sys(q'range); c : Complex_Vectors_of_Vectors.Vector(h'range); e : Exponent_Vectors_Array(h'range); j : Eval_Coeff_Jacobi(h'range,h'first..h'last+1); m : Mult_Factors(j'range(1),j'range(2)); begin q := Complex_Randomize1(p); lq := Polynomial_to_Laurent_System(q); llq := Perform_Lifting(n,mix,lifsup,lq); Clear(lq); Clear(q); lq := Eval(llq,CMPLX(1.0),n+1); q := Laurent_to_Polynomial_System(lq); Continuation_Parameters.Tune(0); -- Mixed_Solve(llq,mix,mixsub,qsols); too expensive !!!! h := Create(lq); for i in c'range loop declare coeff_lq : constant Complex_Vectors.Vector := Coeff(lq(i)); begin c(i) := new Complex_Vectors.Vector(coeff_lq'range); for k in coeff_lq'range loop c(i)(k) := coeff_lq(k); end loop; end; end loop; e := Create(lq); Create(lq,j,m); Mixed_Solve(llq,lifsup,h,c,e,j,m,mix,mixsub,qsols); Set_Continuation_Parameter(qsols,CMPLX(0.0)); Clear(lq); Clear(llq); Clear(h); Clear(j); Clear(m); Complex_Vectors_of_Vectors.Clear(c); end Black_Box_Polyhedral_Continuation; end Black_Box_Mixed_Volume_Computations; SHAR_EOF fi # end of overwriting check if test -f 'black_box_mixed_volume_computations.ads' then echo shar: will not over-write existing file "'black_box_mixed_volume_computations.ads'" else cat << "SHAR_EOF" > 'black_box_mixed_volume_computations.ads' with Integer_Vectors; use Integer_Vectors; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Solutions; use Solutions; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Integer_Mixed_Subdivisions; use Integer_Mixed_Subdivisions; package Black_Box_Mixed_Volume_Computations is procedure Black_Box_Mixed_Volume_Computation ( p : in Poly_Sys; mix : out Link_to_Vector; lifsup : out Link_to_Array_of_Lists; mixsub : out Mixed_Subdivision; mv : out natural ); -- DESCRIPTION : -- Selects the appropriate algorithm to compute the mixed volume. -- ON ENTRY : -- p polynomial system. -- ON RETURN : -- mix type of mixture; -- lifsup lifted supports of the system; -- mixsub regular mixed-cell configuration; -- mv mixed volume. procedure Black_Box_Polyhedral_Continuation ( p : in Poly_Sys; mix : in Vector; lifsup : in Array_of_Lists; mixsub : in Mixed_Subdivision; q : in out Poly_Sys; qsols : in out Solution_List ); -- DESCRIPTION : -- Creates a random coefficient start system, based on the -- regular mixed-cell configuration. -- ON ENTRY : -- p polynomial system; -- mix type of mixture; -- lifsup lifted supports of the system; -- mixsub regular mixed-cell configuration; -- mv mixed volume. -- ON RETURN : -- q random coefficient start system; -- qsols solutions of q. end Black_Box_Mixed_Volume_Computations; SHAR_EOF fi # end of overwriting check if test -f 'cayley_embedding.adb' then echo shar: will not over-write existing file "'cayley_embedding.adb'" else cat << "SHAR_EOF" > 'cayley_embedding.adb' with Integer_Vectors_of_Vectors; package body Cayley_Embedding is -- AUXILIARIES : function Is_Good_Point ( cnt,n : natural; pt : Link_to_Vector ) return boolean is -- DESCRIPTION : -- Returns true if the point pt is a point of the type indicated -- by the parameter cnt, i.e. whether it belongs to the polytope -- placed on the vertex with number cnt. goodpoint : boolean; begin if cnt = 0 then goodpoint := true; for l in pt'first..pt'last-n-1 loop if pt(l) /= 0 then goodpoint := false; end if; exit when not goodpoint; end loop; else goodpoint := (pt(cnt) = 1); end if; return goodpoint; end Is_Good_Point; procedure Project ( n : natural; v : in out Link_to_Vector ) is -- DESCRIPTION : -- After application, v points to a vector of length n+1. newv : Link_to_Vector; begin newv := new Vector(1..n+1); newv(1..n+1) := v(v'last-n..v'last); Clear(v); v := newv; end Project; -- TARGET ROUTINES : function Embedding_Before_Lifting ( supports : Array_of_Lists ) return List is tmp,res,res_last : List; r1 : constant natural := supports'length-1; pt : Link_to_Vector; cnt : natural := 0; begin for k in supports'range loop tmp := supports(k); while not Is_Null(tmp) loop pt := Head_Of(tmp); declare npt : Vector(pt'first..pt'last+r1); begin npt(npt'last-pt'length+1..npt'last) := pt.all; npt(npt'first..npt'first+r1-1) := (npt'first..npt'first+r1-1 => 0); if cnt > 0 then npt(cnt) := 1; end if; Append(res,res_last,npt); end; tmp := Tail_Of(tmp); end loop; cnt := cnt + 1; end loop; return res; end Embedding_Before_Lifting; function Extract ( vtp,n : natural; pts : Integer_Vectors_of_Vectors.Vector ) return List is res,res_last : List; begin for k in pts'range loop if Is_Good_Point(vtp,n,pts(k)) then Append(res,res_last,pts(k).all); end if; end loop; return res; end Extract; function Extract ( vtp,n : natural; pts : List ) return List is -- DESCRIPTION : -- Extracts the points out of the list that are of the type -- indicated by vtp. tmp,res,res_last : List; pt : Link_to_Vector; begin tmp := pts; while not Is_Null(tmp) loop pt := Head_Of(tmp); if Is_Good_Point(vtp,n,pt) then Append(res,res_last,pt.all); end if; tmp := Tail_Of(tmp); end loop; return res; end Extract; function Extract_Mixed_Cell ( n : natural; mix : Vector; s : Simplex ) return Mixed_Cell is res : Mixed_Cell; work : Array_of_Lists(mix'range); cnt : natural := 0; iscell : boolean; pts : constant Integer_Vectors_of_Vectors.Vector := Vertices(s); begin for k in mix'range loop work(k) := Extract(cnt,n,pts); iscell := (Length_Of(work(k)) = mix(k)+1); exit when not iscell; cnt := cnt + 1; end loop; if iscell then res.pts := new Array_of_Lists'(work); res.nor := new vector'(Normal(s)); else Deep_Clear(work); end if; return res; end Extract_Mixed_Cell; function Extract_Mixed_Cells ( n : natural; mix : Vector; t : Triangulation ) return Mixed_Subdivision is res,res_last : Mixed_Subdivision; s : Simplex; tmp : Triangulation; begin tmp := t; while not Is_Null(tmp) loop s := Head_Of(tmp); declare mic : Mixed_Cell := Extract_Mixed_Cell(n,mix,s); begin if mic.nor /= null then Append(res,res_last,mic); end if; end; tmp := Tail_Of(tmp); end loop; return res; end Extract_Mixed_Cells; function Extract_non_Flat_Mixed_Cells ( n : natural; mix : Vector; t : Triangulation ) return Mixed_Subdivision is res,res_last : Mixed_Subdivision; s : Simplex; tmp : Triangulation; begin tmp := t; while not Is_Null(tmp) loop s := Head_Of(tmp); exit when Is_Flat(s); declare mic : Mixed_Cell := Extract_Mixed_Cell(n,mix,s); begin if mic.nor /= null then Append(res,res_last,mic); end if; end; tmp := Tail_Of(tmp); end loop; return res; end Extract_non_Flat_Mixed_Cells; procedure Deflate ( n : natural; l : in out List ) is tmp : List := l; begin while not Is_Null(tmp) loop declare pt : Link_to_Vector := Head_Of(tmp); begin Project(n,pt); Set_Head(tmp,pt); end; tmp := Tail_Of(tmp); end loop; end Deflate; procedure Deflate ( n : natural; mic : in out Mixed_Cell ) is begin Project(n,mic.nor); for k in mic.pts'range loop Deflate(n,mic.pts(k)); end loop; end Deflate; procedure Deflate ( n : natural; mixsub : in out Mixed_Subdivision ) is tmp : Mixed_Subdivision := mixsub; begin while not Is_Null(tmp) loop declare mic : Mixed_Cell := Head_Of(tmp); begin Deflate(n,mic); Set_Head(tmp,mic); end; tmp := Tail_Of(tmp); end loop; end Deflate; end Cayley_Embedding; SHAR_EOF fi # end of overwriting check if test -f 'cayley_embedding.ads' then echo shar: will not over-write existing file "'cayley_embedding.ads'" else cat << "SHAR_EOF" > 'cayley_embedding.ads' with Integer_Vectors; use Integer_Vectors; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Simplices,Triangulations; use Simplices,Triangulations; with Integer_Mixed_Subdivisions; use Integer_Mixed_Subdivisions; package Cayley_Embedding is -- DESCRIPTION : -- This procedure provides utilities to implement the embedding -- of a tuple of supports to use the Cayley trick. -- The novelty with this implementation is that the additional -- coordinates to the points are added in front. -- UTILITIES TO APPLY BEFORE THE CONSTRUCTION OF THE TRIANGULATION : function Embedding_Before_Lifting ( supports : Array_of_Lists ) return List; -- DESCRIPTION : -- The supports will be embedded in higher dimensional space -- by adding (r-1) extra coordinates. -- The supports will be placed on the vertices of a simplex. -- This is done before the lifting is defined on the supports. -- UTILITIES TO APPLY AFTER THE CONSTRUCTION OF THE TRIANGULATION : function Extract ( vtp,n : natural; pts : List ) return List; -- DESCRIPTION : -- Extracts the points out of the list that are of the type -- indicated by vtp, i.e.: all points that belong to the list of -- points placed on the vertex with number vtp. function Extract_Mixed_Cell ( n : natural; mix : Vector; s : Simplex ) return Mixed_Cell; -- DESCRIPTION : -- If the simplex determines a mixed cell, then this mixed cell -- will be returned. Otherwise, the returned mixed cell will have -- an empty inner normal. function Extract_Mixed_Cells ( n : natural; mix : Vector; t : Triangulation ) return Mixed_Subdivision; -- DESCRIPTION : -- Given a triangulation of the large extended polytope, -- the mixed cells will be extracted. The parameter -- n equals the dimension before the embedding and lifting. function Extract_non_Flat_Mixed_Cells ( n : natural; mix : Vector; t : Triangulation ) return Mixed_Subdivision; -- DESCRIPTION : -- Does the same as the routine just above, but stops when -- a simplex with normal (0,..,0,1) is encountered. procedure Deflate ( n : natural; l : in out List ); -- DESCRIPTION : -- Removes the extra coordinates which have been introduced for -- the embedding. The parameter n equals the dimension before -- the embedding and the lifting. procedure Deflate ( n : natural; mic : in out Mixed_Cell ); -- DESCRIPTION : -- Removes the extra coordinates which have been introduced for -- the embedding. The parameter n equals the dimension before -- the embedding and the lifting. procedure Deflate ( n : natural; mixsub : in out Mixed_Subdivision ); -- DESCRIPTION : -- Removes the extra coordinates which have been introduced for -- the embedding. The parameter n equals the dimension before -- the embedding and the lifting. end Cayley_Embedding; SHAR_EOF fi # end of overwriting check if test -f 'cayley_trick.adb' then echo shar: will not over-write existing file "'cayley_trick.adb'" else cat << "SHAR_EOF" > 'cayley_trick.adb' with Integer_Vectors_of_Vectors; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Simplices; use Simplices; with Dynamic_Triangulations; use Dynamic_Triangulations; with Cayley_Embedding; use Cayley_Embedding; with Flatten_Mixed_Subdivisions; use Flatten_Mixed_Subdivisions; package body Cayley_Trick is -- UTILITIES : function Extract ( n : natural; mix : Vector; lifted : in List ) return Array_of_Lists is -- DESCRIPTION : -- Extracts from the list of lifted points to compute the Cayley -- triangulation, the tuple of lifted points. res : Array_of_Lists(mix'range); begin for k in res'range loop res(k) := Extract(k-1,n,lifted); Deflate(n,res(k)); end loop; return res; end Extract; procedure Extract ( n : in natural; mix : in Vector; t : in Triangulation; liftedt : in List; mixsub : out Mixed_Subdivision; lifted : out Array_of_Lists ) is -- DESCRIPTION : -- Extracts the useful information from the Cayley polytope. res : Mixed_Subdivision; begin lifted := Extract(n,mix,liftedt); res := Extract_Mixed_Cells(n,mix,t); Deflate(n,res); mixsub := res; end Extract; procedure Extract_and_Clear ( n : in natural; mix : in Vector; t : in out Triangulation; liftedt : in out List; lent : out natural; mixsub : out Mixed_Subdivision; lifted : out Array_of_Lists ) is -- DESCRIPTION : -- Extracts the useful information from the Cayley polytope. -- All intermediate data structures will be cleared. begin lent := Length_Of(t); Extract(n,mix,t,liftedt,mixsub,lifted); Clear(t); Clear(liftedt); end Extract_and_Clear; -- BASIC VERSION : procedure Dynamic_Cayley ( n : in natural; mix : in Vector; supports : in Array_of_Lists; order,inter : in boolean; maxli : in natural; lifted : out Array_of_Lists; mixsub : out Mixed_Subdivision; numtri : out natural ) is tmpsub,lastcells : Mixed_Subdivision; l,liftedl,liftedl_last : list; t : Triangulation; procedure Col_Flat ( nt : in Triangulation; l : List ) is -- DESCRIPTION : -- Updates the subdivision mixsub with the flattened cells. -- The triangulation on entry contains the whole triangulation, -- not just the new cells. cells : Mixed_Subdivision; begin if Is_Null(tmpsub) then cells := Extract_Mixed_Cells(n,mix,nt); Deflate(n,cells); else cells := Extract_non_Flat_Mixed_Cells(n,mix,nt); Deflate(n,cells); Construct(Head_Of(tmpsub),cells); end if; Flatten(cells); tmpsub := cells; end Col_Flat; procedure C_Dynamic_Lifting is new Dynamic_Lifting_with_Flat(Col_Flat); begin l := Embedding_before_Lifting(supports); C_Dynamic_Lifting(l,order,inter,maxli,liftedl,liftedl_last,t); if Is_Null(tmpsub) then Extract_and_Clear(n,mix,t,liftedl,numtri,mixsub,lifted); else lastcells := Extract_non_Flat_Mixed_Cells(n,mix,t); Deflate(n,lastcells); Construct(Head_Of(tmpsub),lastcells); mixsub := lastcells; lifted := Extract(n,mix,liftedl); end if; end Dynamic_Cayley; procedure Dynamic_Cayley ( n : in natural; mix : in Vector; supports : in Array_of_Lists; order,inter : in boolean; maxli : in natural; lifted : out Array_of_Lists; t : in out Triangulation ) is l,liftedl,liftedl_last : list; begin l := Embedding_before_Lifting(supports); Dynamic_Lifting(l,order,inter,maxli,liftedl,liftedl_last,t); lifted := Extract(n,mix,liftedl); Clear(liftedl); end Dynamic_Cayley; -- EXTENDED VERSIONS : procedure Dynamic_Cayley_with_Flat ( n : in natural; mix : in Vector; supports : in Array_of_Lists; order,inter : in boolean; maxli : in natural; lifted : out Array_of_Lists; mixsub : out Mixed_Subdivision; numtri : out natural ) is l,liftedl,liftedl_last : list; t : Triangulation; tmpsub,lastcells : Mixed_Subdivision; procedure Bef_Flat ( tt : in Triangulation; lft : in List ) is cells,cells1 : Mixed_Subdivision; lftpts : Array_of_Lists(mix'range); begin Extract(n,mix,tt,lft,cells,lftpts); Before_Flattening(cells,lftpts); if Is_Null(tmpsub) then cells := Extract_Mixed_Cells(n,mix,tt); Deflate(n,cells); else cells := Extract_non_Flat_Mixed_Cells(n,mix,tt); Deflate(n,cells); Construct(Head_Of(tmpsub),cells); end if; Flatten(cells); tmpsub := cells; end Bef_Flat; procedure C_Dynamic_Lifting is new Dynamic_Lifting_with_Flat (Bef_Flat); begin l := Embedding_before_Lifting(supports); C_Dynamic_Lifting(l,order,inter,maxli,liftedl,liftedl_last,t); if Is_Null(tmpsub) then Extract_and_Clear(n,mix,t,liftedl,numtri,mixsub,lifted); else lastcells := Extract_non_Flat_Mixed_Cells(n,mix,t); Deflate(n,lastcells); Construct(Head_Of(tmpsub),lastcells); mixsub := lastcells; lifted := Extract(n,mix,liftedl); end if; end Dynamic_Cayley_with_Flat; procedure Dynamic_Cayley_with_Flatt ( n : in natural; mix : in Vector; supports : in Array_of_Lists; order,inter : in boolean; maxli : in natural; lifted : out Array_of_Lists; t : in out Triangulation ) is l,liftedl,liftedl_last : list; procedure Bef_Flat ( tt : in Triangulation; lft : in List ) is cells : Mixed_Subdivision; lftpts : Array_of_Lists(supports'range); begin Extract(n,mix,tt,lft,cells,lftpts); Before_Flattening(cells,lftpts); end Bef_Flat; procedure C_Dynamic_Lifting is new Dynamic_Lifting_with_Flat (Bef_Flat); begin l := Embedding_before_Lifting(supports); C_Dynamic_Lifting(l,order,inter,maxli,liftedl,liftedl_last,t); lifted := Extract(n,mix,liftedl); Clear(liftedl); end Dynamic_Cayley_with_Flatt; procedure Dynamic_Cayley_with_New ( n : in natural; mix : in Vector; supports : in Array_of_Lists; order,inter : in boolean; maxli : in natural; lifted : out Array_of_Lists; mixsub : out Mixed_Subdivision; numtri : out natural ) is l,liftedl,liftedl_last : list; t : Triangulation; tmpsub,lastcells : Mixed_Subdivision; procedure Col_Flat ( nt : in Triangulation; l : List ) is -- DESCRIPTION : -- Updates the subdivision mixsub with the flattened cells. -- The triangulation on entry contains the whole triangulation, -- not just the new cells. cells : Mixed_Subdivision; begin if Is_Null(tmpsub) then cells := Extract_Mixed_Cells(n,mix,nt); Deflate(n,cells); else cells := Extract_non_Flat_Mixed_Cells(n,mix,nt); Deflate(n,cells); Construct(Head_Of(tmpsub),cells); end if; Flatten(cells); tmpsub := cells; end Col_Flat; procedure New_Cell ( tt : in Triangulation; pt : in vector ) is cells : Mixed_Subdivision := Extract_Mixed_Cells(n,mix,tt); index : natural := 1; begin Deflate(n,cells); for i in 1..mix'last-1 loop if pt(i+n) /= 0 then index := i+1; end if; exit when index > 1; end loop; Process_New_Cells(cells,index,pt); end New_Cell; procedure C_Dynamic_Lifting is new Dynamic_Lifting_with_Flat_and_New (Before_Flattening => Col_Flat, Process_New_Simplices => New_Cell); begin l := Embedding_before_Lifting(supports); C_Dynamic_Lifting(l,order,inter,maxli,liftedl,liftedl_last,t); if Is_Null(tmpsub) then Extract_and_Clear(n,mix,t,liftedl,numtri,mixsub,lifted); else lastcells := Extract_non_Flat_Mixed_Cells(n,mix,t); Deflate(n,lastcells); Construct(Head_Of(tmpsub),lastcells); mixsub := lastcells; lifted := Extract(n,mix,liftedl); end if; end Dynamic_Cayley_with_New; procedure Dynamic_Cayley_with_Newt ( n : in natural; mix : in Vector; supports : in Array_of_Lists; order,inter : in boolean; maxli : in natural; lifted : out Array_of_Lists; t : in out Triangulation ) is l,liftedl,liftedl_last : list; procedure New_Cell ( tt : in Triangulation; pt : in vector ) is cells : Mixed_Subdivision := Extract_Mixed_Cells(n,mix,tt); index : natural := 1; begin Deflate(n,cells); for i in 1..mix'last-1 loop if pt(i+n) /= 0 then index := i+1; end if; exit when index > 1; end loop; Process_New_Cells(cells,index,pt); end New_Cell; procedure C_Dynamic_Lifting is new Dynamic_Lifting_with_New(New_Cell); begin l := Embedding_before_Lifting(supports); C_Dynamic_Lifting(l,order,inter,maxli,liftedl,liftedl_last,t); lifted := Extract(n,mix,liftedl); Clear(liftedl); end Dynamic_Cayley_with_Newt; procedure Dynamic_Cayley_with_Flat_and_New ( n : in natural; mix : in Vector; supports : in Array_of_Lists; order,inter : in boolean; maxli : in natural; lifted : out Array_of_Lists; mixsub : out Mixed_Subdivision; numtri : out natural ) is l,liftedl,liftedl_last : list; t : Triangulation; tmpsub,lastcells : Mixed_Subdivision; procedure Bef_Flat ( tt : in Triangulation; lft : in List ) is cells,cells1 : Mixed_Subdivision; lftpts : Array_of_Lists(mix'range); begin Extract(n,mix,tt,lft,cells,lftpts); Before_Flattening(cells,lftpts); if Is_Null(tmpsub) then cells := Extract_Mixed_Cells(n,mix,tt); Deflate(n,cells); else cells := Extract_non_Flat_Mixed_Cells(n,mix,tt); Deflate(n,cells); Construct(Head_Of(tmpsub),cells); end if; Flatten(cells); tmpsub := cells; end Bef_Flat; procedure New_Cell ( tt : in Triangulation; pt : in vector ) is cells : Mixed_Subdivision := Extract_Mixed_Cells(n,mix,tt); index : natural := 1; begin Deflate(n,cells); for i in 1..mix'last-1 loop if pt(i+n) /= 0 then index := i+1; end if; exit when index > 1; end loop; Process_New_Cells(cells,index,pt); end New_Cell; procedure C_Dynamic_Lifting is new Dynamic_Lifting_with_Flat_and_New (Before_Flattening => Bef_Flat, Process_New_Simplices => New_Cell); begin l := Embedding_before_Lifting(supports); C_Dynamic_Lifting(l,order,inter,maxli,liftedl,liftedl_last,t); if Is_Null(tmpsub) then Extract_and_Clear(n,mix,t,liftedl,numtri,mixsub,lifted); else lastcells := Extract_non_Flat_Mixed_Cells(n,mix,t); Deflate(n,lastcells); Construct(Head_Of(tmpsub),lastcells); mixsub := lastcells; end if; end Dynamic_Cayley_with_Flat_and_New; procedure Dynamic_Cayley_with_Flat_and_Newt ( n : in natural; mix : in Vector; supports : in Array_of_Lists; order,inter : in boolean; maxli : in natural; lifted : out Array_of_Lists; t : in out Triangulation ) is l,liftedl,liftedl_last : list; procedure Bef_Flat ( tt : in Triangulation; lft : in List ) is cells : Mixed_Subdivision; lftpts : Array_of_Lists(supports'range); begin Extract(n,mix,tt,lft,cells,lftpts); Before_Flattening(cells,lftpts); end Bef_Flat; procedure New_Cell ( tt : in Triangulation; pt : in vector ) is cells : Mixed_Subdivision := Extract_Mixed_Cells(n,mix,tt); index : natural := 1; begin Deflate(n,cells); for i in 1..mix'last-1 loop if pt(i+n) /= 0 then index := i+1; end if; exit when index > 1; end loop; Process_New_Cells(cells,index,pt); end New_Cell; procedure C_Dynamic_Lifting is new Dynamic_Lifting_with_Flat_and_New (Before_Flattening => Bef_Flat, Process_New_Simplices => New_Cell); begin l := Embedding_before_Lifting(supports); C_Dynamic_Lifting(l,order,inter,maxli,liftedl,liftedl_last,t); lifted := Extract(n,mix,liftedl); Clear(liftedl); end Dynamic_Cayley_with_Flat_and_Newt; end Cayley_Trick; SHAR_EOF fi # end of overwriting check if test -f 'cayley_trick.ads' then echo shar: will not over-write existing file "'cayley_trick.ads'" else cat << "SHAR_EOF" > 'cayley_trick.ads' with Integer_Vectors; use Integer_Vectors; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Triangulations; use Triangulations; with Integer_Mixed_Subdivisions; use Integer_Mixed_Subdivisions; package Cayley_Trick is -- DESCRIPTION : -- This procedure provides some routines for constructing a mixed -- subdivision by applicaton of the dynamic lifting algorithm to -- the Cayley trick. -- OPTIONS : -- 1. choice of the order of the points -- 2. for vertices or not: allows to add interior points -- 3. with maximum value on the lifting function or not -- VERSIONS : -- 1. with or without output generics, before flattening or after new cell -- 2. with as result only the mixed subdivision or the whole triangulation -- BASIC VERSION : WITHOUT OUTPUT GENERICS : procedure Dynamic_Cayley ( n : in natural; mix : in Vector; supports : in Array_of_Lists; order,inter : in boolean; maxli : in natural; lifted : out Array_of_Lists; mixsub : out Mixed_Subdivision; numtri : out natural ); procedure Dynamic_Cayley ( n : in natural; mix : in Vector; supports : in Array_of_Lists; order,inter : in boolean; maxli : in natural; lifted : out Array_of_Lists; t : in out Triangulation ); -- DESCRIPTION : -- Application of the dynamic lifting algorithm to the Cayley trick. -- ON ENTRY : -- n length of the vectors in the supports; -- mix type of mixture; -- supports lists of integer vector of length n; -- order if true, then the points are already ordered and will -- be processed like they occur in the list, -- if false, then a random order will be chosen; -- inter if true, then the list may contain interior points, -- i.e. points x in conv(l\{x}), -- if false, no interior points occur in the list; -- maxli maximum value of the lifting function, -- if = 0, then no flattening will be applied, -- i.e. there is no maximum lifting value, -- if > 0, then no points will be given a lifting value -- greater than maxli. -- ON RETURN : -- lifted the lifted supports; -- mixsub the mixed subdivision; -- numtri number of simplices in the triangulation of the -- auxiliary polytope; -- t triangulation of the auxiliary polytope. -- EXTENDED VERSIONS : WITH OUTPUT GENERICS generic with procedure Before_Flattening ( mixsub : in out Mixed_Subdivision; lifted : in Array_of_Lists ); -- DESCRIPTION : -- Before flattening, the current mixed subdivision with -- the current lists of lifted points are given. procedure Dynamic_Cayley_with_Flat ( n : in natural; mix : in Vector; supports : in Array_of_Lists; order,inter : in boolean; maxli : in natural; lifted : out Array_of_Lists; mixsub : out Mixed_Subdivision; numtri : out natural ); generic with procedure Before_Flattening ( mixsub : in out Mixed_Subdivision; lifted : in Array_of_Lists ); procedure Dynamic_Cayley_with_Flatt ( n : in natural; mix : in Vector; supports : in Array_of_Lists; order,inter : in boolean; maxli : in natural; lifted : out Array_of_Lists; t : in out Triangulation ); -- DESCRIPTION : -- Application of the dynamic lifting algorithm to the Cayley trick. -- Before flattening, the generic procedure will be invoked. -- The parameters have the same meaning as in the basic version. generic with procedure Process_New_Cells ( mixsub : in out Mixed_Subdivision; i : in natural; point : in vector ); -- DESCRIPTION : -- After the addition of a new point to the ith component, -- this point together with the new mixed cells are returned. -- For the initial cell, i=0. procedure Dynamic_Cayley_with_New ( n : in natural; mix : in Vector; supports : in Array_of_Lists; order,inter : in boolean; maxli : in natural; lifted : out Array_of_Lists; mixsub : out Mixed_Subdivision; numtri : out natural ); generic with procedure Process_New_Cells ( mixsub : in out Mixed_Subdivision; i : in natural; point : in vector ); procedure Dynamic_Cayley_with_Newt ( n : in natural; mix : in Vector; supports : in Array_of_Lists; order,inter : in boolean; maxli : in natural; lifted : out Array_of_Lists; t : in out Triangulation ); -- DESCRIPTION : -- Application of the dynamic lifting algorithm to the Cayley trick. -- After each addition of a point, the generic procedure will -- be invoked. -- The parameters have the same meaning as in the basic version. generic with procedure Before_Flattening ( mixsub : in out Mixed_Subdivision; lifted : in Array_of_Lists ); -- DESCRIPTION : -- Before flattening, the current mixed subdivision with -- the current lists of lifted points are given. with procedure Process_New_Cells ( mixsub : in out Mixed_Subdivision; i : in natural; point : in vector ); -- DESCRIPTION : -- After the addition of a new point to the ith component, -- this point together with the new simplices are returned. -- For the initial cell, i=0. procedure Dynamic_Cayley_with_Flat_and_New ( n : in natural; mix : in Vector; supports : in Array_of_Lists; order,inter : in boolean; maxli : in natural; lifted : out Array_of_Lists; mixsub : out Mixed_Subdivision; numtri : out natural ); generic with procedure Before_Flattening ( mixsub : in out Mixed_Subdivision; lifted : in Array_of_Lists ); with procedure Process_New_Cells ( mixsub : in out Mixed_Subdivision; i : in natural; point : in vector ); procedure Dynamic_Cayley_with_Flat_and_Newt ( n : in natural; mix : in Vector; supports : in Array_of_Lists; order,inter : in boolean; maxli : in natural; lifted : out Array_of_Lists; t : in out Triangulation ); -- DESCRIPTION : -- Application of the dynamic lifting algorithm to the list l. -- Before flattening, the first generic procedure will be invoked. -- After each addition of a point, the second generic procedure -- will be invoked. -- The parameters have the same meaning as in the basic version. end Cayley_Trick; SHAR_EOF fi # end of overwriting check if test -f 'common_faces_of_polytope.adb' then echo shar: will not over-write existing file "'common_faces_of_polytope.adb'" else cat << "SHAR_EOF" > 'common_faces_of_polytope.adb' with Integer_Vectors; use Integer_Vectors; with Integer_Vectors_of_Vectors; package body Common_Faces_of_Polytope is function Have_Common_Point ( l : List; v : Integer_Vectors_of_Vectors.Vector ) return boolean is -- DESCRIPTION : -- Returns true if at least one point in v belongs to the list l. begin for i in v'range loop if Is_In(l,v(i).all) then return true; end if; end loop; return false; end Have_Common_Point; function Is_Neighbor1 ( l : List; fc : Face ) return boolean is begin return Have_Common_Point(l,fc.all); end Is_Neighbor1; function Is_Neighbor ( l : List; fc : Face ) return boolean is cntnotin : natural := 0; -- counts the points in the face fc that are not in the list l begin for i in fc'range loop if not Is_In(l,fc(i).all) then cntnotin := cntnotin + 1; if cntnotin > 1 then return false; end if; end if; end loop; return true; end Is_Neighbor; function Neighboring_Faces ( mic : Mixed_Cell; fs : Faces; i : natural ) return Faces is tmp : Faces := fs; res,res_last : Faces; begin while not Is_Null(tmp) loop declare fc : Face := Head_Of(tmp); begin if Is_Neighbor(mic.pts(i),fc) then Append(res,res_last,fc); end if; tmp := Tail_Of(tmp); end; end loop; return res; end Neighboring_Faces; function Neighboring_Faces ( mic : Mixed_Cell; afs : Array_of_Faces ) return Array_of_Faces is res : Array_of_Faces(afs'range); begin for i in res'range loop res(i) := Neighboring_Faces(mic,afs(i),i); end loop; return res; end Neighboring_Faces; end Common_Faces_of_Polytope; SHAR_EOF fi # end of overwriting check if test -f 'common_faces_of_polytope.ads' then echo shar: will not over-write existing file "'common_faces_of_polytope.ads'" else cat << "SHAR_EOF" > 'common_faces_of_polytope.ads' with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Integer_Faces_of_Polytope; use Integer_Faces_of_Polytope; with Integer_Mixed_Subdivisions; use Integer_Mixed_Subdivisions; package Common_Faces_of_Polytope is -- DESCRIPTION : -- This package provides functions to implement the neighborship -- relations of cells in a mixed subdivision, w.r.t. their faces. function Is_Neighbor ( l : List; fc : Face ) return boolean; -- DESCRIPTION : -- Defines the neighborship relation: returns true -- if #intersection(list,fc.points) >= Length_Of(fc.points)-1. function Neighboring_Faces ( mic : Mixed_Cell; fs : Faces; i : natural ) return Faces; -- DESCRIPTION : -- Returns the neighboring faces of fs to the ith component -- of the mixed cell mic. function Neighboring_Faces ( mic : Mixed_Cell; afs : Array_of_Faces ) return Array_of_Faces; -- DESCRIPTION : -- Returns the neighboring faces of afs to the mixed cell mic. end Common_Faces_of_Polytope; SHAR_EOF fi # end of overwriting check if test -f 'driver_for_minkowski_polynomials.adb' then echo shar: will not over-write existing file "'driver_for_minkowski_polynomials.adb'" else cat << "SHAR_EOF" > 'driver_for_minkowski_polynomials.adb' with Timing_Package; use Timing_Package; with integer_io,Integer_Vectors_io; use integer_io,Integer_Vectors_io; with Complex_Numbers; use Complex_Numbers; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; with Minkowski_Polynomials; use Minkowski_Polynomials; with Integer_Mixed_Subdivisions_io; use Integer_Mixed_Subdivisions_io; procedure Driver_for_Minkowski_Polynomials ( file : in file_type; n : in natural; mix : in Vector; t : in Triangulation; alltri : in boolean; mixsub : out Mixed_Subdivision ) is mp : Poly; timer : timing_widget; procedure Coefficient_Subdivision ( submix : in Vector; sub : in Mixed_Subdivision; vol : out natural ) is len : constant natural := Length_Of(sub); wrksub : Mixed_Subdivision := sub; volu : natural; begin put(file,"#Cells of type "); put(file,submix); put(file," is " ); put(file,len,1); new_line(file); if len = 0 then volu := 0; else put(file,n,submix,wrksub,volu); end if; put(file,"The volume equals : "); put(file,volu,1); new_line(file); new_line(file); vol := volu; end Coefficient_Subdivision; procedure Coefficient_Subdivisions is new Minkowski_Polynomial_Subdivisions(Coefficient_Subdivision); procedure Write_Minkowski_Polynomial ( file : in file_type; p : in Poly ) is first : boolean; cnt : natural := 0; procedure Minkowski_Term ( t : in Term; cont : out boolean ) is begin if first then first := false; else put(file," + "); cnt := cnt + 3; end if; put(file,integer(REAL_PART(t.cf)),1); cnt := cnt + 2; for i in t.dg'range loop if t.dg(i) /= 0 then put(file,"*l"); put(file,i,1); cnt := cnt + 3; if t.dg(i) /= 1 then put(file,"^"); put(file,t.dg(i),1); cnt := cnt + 2; end if; end if; end loop; if cnt > 60 then new_line(file); cnt := 0; end if; cont := true; end Minkowski_Term; procedure Minkowski_Terms is new Visiting_Iterator(Minkowski_Term); begin Minkowski_Terms(p); end Write_Minkowski_Polynomial; begin tstart(timer); mp := Minkowski_Polynomial(n,mix'last); if not alltri then Minkowski_Polynomial(mp,t,n,mix,mixsub); else Coefficient_Subdivisions(mp,t,n,mix,mixsub); end if; tstop(timer); put_line(file,"the Minkowski-polynomial : "); Write_Minkowski_Polynomial(file,mp); new_line(file); new_line(file); print_times(file,timer,"computing the Minkowski-polynomial"); Clear(mp); end Driver_for_Minkowski_Polynomials; SHAR_EOF fi # end of overwriting check if test -f 'driver_for_minkowski_polynomials.ads' then echo shar: will not over-write existing file "'driver_for_minkowski_polynomials.ads'" else cat << "SHAR_EOF" > 'driver_for_minkowski_polynomials.ads' with text_io; use text_io; with Integer_Vectors,Triangulations; use Integer_Vectors,Triangulations; with Integer_Mixed_Subdivisions; use Integer_Mixed_Subdivisions; procedure Driver_for_Minkowski_Polynomials ( file : in file_type; n : in natural; mix : in Vector; t : in Triangulation; alltri : in boolean; mixsub : out Mixed_Subdivision ); -- DESCRIPTION : -- Driver for the computation of the Minkowski-polynomial. -- ON ENTRY : -- file to write all results on; -- n dimension before lifting and embedding; -- mix type of mixture; -- t triangulation of the Cayley polytope; -- alltri true when all triangulations are wanted, false otherwise. -- ON OUTPUT : -- mixed mixed subdivision, corresponding the type of mixture. SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_dynamic_lifting.adb' then echo shar: will not over-write existing file "'drivers_for_dynamic_lifting.adb'" else cat << "SHAR_EOF" > 'drivers_for_dynamic_lifting.adb' with text_io,integer_io,Numbers_io; use text_io,integer_io,Numbers_io; with Communications_with_User; use Communications_with_User; with Timing_Package; use Timing_Package; with Integer_Vectors,Float_Vectors; use Integer_Vectors; with Integer_Vectors_io; use Integer_Vectors_io; with Integer_Vectors_of_Vectors; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Lists_of_Integer_Vectors_io; use Lists_of_Integer_Vectors_io; with Lists_of_Vectors_Utilities; use Lists_of_Vectors_Utilities; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Arrays_of_Integer_Vector_Lists_io; use Arrays_of_Integer_Vector_Lists_io; with Drivers_for_Vertex_Points; use Drivers_for_Vertex_Points; with Simplices,Triangulations; use Simplices,Triangulations; with Triangulations_io; use Triangulations_io; with Dynamic_Triangulations; use Dynamic_Triangulations; with Cayley_Trick; use Cayley_Trick; with Driver_for_Minkowski_Polynomials; with Integer_Lifting_Utilities; use Integer_Lifting_Utilities; with Integer_Mixed_Subdivisions; use Integer_Mixed_Subdivisions; with Integer_Mixed_Subdivisions_io; use Integer_Mixed_Subdivisions_io; with Mixed_Volume_Computation; use Mixed_Volume_Computation; with Flatten_Mixed_Subdivisions; use Flatten_Mixed_Subdivisions; with Triangulations_and_Subdivisions; use Triangulations_and_Subdivisions; with Dynamic_Mixed_Subdivisions; use Dynamic_Mixed_Subdivisions; with Dynamic_Polyhedral_Continuation; use Dynamic_Polyhedral_Continuation; with Driver_for_Polyhedral_Continuation; with Power_Lists; use Power_Lists; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Solutions_io; use Solutions_io; with Pruning_Statistics; package body Drivers_for_Dynamic_Lifting is procedure Dynamic_Lifting_Info is i : array(1..6) of string(1..65); begin i(1):=" Dynamic lifting can be used to compute mixed volumes"; i(2):="incrementally, i.e.: by adding the points repeatedly to the"; i(3):="already constructed subdivision. This method works efficiently"; i(4):="when all Newton polytopes are (almost) equal. The Cayley trick"; i(5):="is implemented by means of dynamic lifting. This trick computes"; i(6):="all cells in a mixed subdivision. "; for k in i'range loop put_line(i(k)); end loop; end Dynamic_Lifting_Info; procedure Driver_for_Dynamic_Mixed_Volume_Computation ( file : in file_type; p : in Poly_Sys; byebye : in boolean; q : out Poly_Sys; qsols : out Solution_List; mv : out natural ) is welcome : constant string := "Mixed-Volume Computation by Dynamic Lifting"; -- GLOBAL VARIABLES : supports : Array_of_Lists(p'range); n : natural := p'last; timer : timing_widget; r,max : natural; mix,perms : Link_to_Vector; ans : character; permp,qq : Poly_Sys(p'range); qqsols : Solution_List; subfile,solsft,qft : file_type; vol : natural := 0; mixsub : Mixed_Subdivision; -- GLOBAL SWITCHES : verpts : boolean; -- if the set of vertex points is computed order : boolean; -- process points in fixed instead of random order inter : boolean; -- if interior points are possible conmv : boolean; -- if checks on zero contributions have to be made caytrick : boolean; -- if the Cayley trick has to be applied reportnew : boolean; -- if the new cells have to be reported reportflat : boolean; -- if before flattening, reporting has to be done subonfile : boolean; -- put the subdivision on separate file tosolve : boolean; -- if the system needs to be solved contrep : boolean; -- if intermediate output during continuation ranstart : boolean; -- if random coefficient start system minkpoly : natural; -- 0 : no; 1 : only poly, > 1 : all subdivisions -- EXTRACT THE ADDITIONAL POINTS : function Is_In_Lifted ( pt : Link_to_Vector; lifted : List ) return boolean is -- DESCRIPTION : -- Returns true if the point is in the lifted list. tmp : List := lifted; lpt : Link_to_Vector; begin while not Is_Null(tmp) loop lpt := Head_Of(tmp); if pt(pt'range) = lpt(pt'range) then return true; else tmp := Tail_Of(tmp); end if; end loop; return false; end Is_In_Lifted; function Difference ( supp,liftsupp : in List ) return List is res,res_last : List; tmp : List := supp; pt : Link_to_Vector; begin tmp := supp; while not Is_Null(tmp) loop pt := Head_Of(tmp); if not Is_In_Lifted(pt,liftsupp) then Append(res,res_last,pt.all); end if; tmp := Tail_Of(tmp); end loop; return res; end Difference; function Difference ( supp,liftsupp : in Array_of_Lists ) return Array_of_Lists is -- DESCRIPTION : -- Returns a tuple of point lists, made of points in supp -- that do not belong to the corresponding lifted supports. res : Array_of_Lists(supp'range); begin for i in supp'range loop res(i) := Difference(supp(i),liftsupp(i)); end loop; return res; end Difference; -- DETERMINING THE ORDER OF PROCESSING THE POINTS : function Determine_Order ( l : List ) return List is -- DESCRIPTION : -- Interactive ordering of the points in the list. -- This function displays all points and asks the user for a position. len : constant natural := Length_Of(l); pos : vector(1..len); res : List; function Read_New_Positions ( l : List; length : natural ) return vector is -- DESCRIPTION : -- Lists all points in the lists and prompts for a new position. -- Returns the position vector. newpos : vector(1..length); tmp : List := l; cnt : natural := 0; begin put("There are "); put(length,1); put_line(" points to order."); put_line("Give for each separate point its new position :"); while not Is_Null(tmp) loop cnt := cnt + 1; loop put(Head_Of(tmp)); put(" : "); Read_Natural(newpos(cnt)); exit when (newpos(cnt) >= 1) and (newpos(cnt) <= length); put("New position out of range 1.."); put(length,1); put_line(". Please try again."); end loop; tmp := Tail_Of(tmp); end loop; return newpos; end Read_New_Positions; function Get ( l : List; pos : natural ) return Link_to_Vector is -- DESCRIPTION : -- Returns the point on the indicated position in the list l. tmp : List := l; res : Link_to_Vector; begin if not Is_Null(l) then for i in 1..(pos-1) loop tmp := Tail_Of(tmp); exit when Is_Null(tmp); end loop; if not Is_Null(tmp) then res := Head_Of(tmp); end if; end if; return res; end Get; function Sort ( l : in List; pos : in vector ) return List is -- DESCRIPTION : -- Sorts the given list according to the given position vector: -- pos(i) determines the new position of the ith point in the list. -- If the returning list is empty, then the position vector was -- not a permutation. empty,res,res_last : List; index : natural; begin for i in pos'range loop -- search index : pos(index) = i index := 0; for j in pos'range loop if pos(j) = i then index := j; end if; exit when (index /= 0); end loop; exit when (index = 0); Append(res,res_last,get(l,index)); -- append the vector end loop; if index = 0 then return empty; else return res; end if; end Sort; begin if Is_Null(l) then return l; else loop pos := Read_New_Positions(l,len); res := Sort(l,pos); exit when not Is_Null(res); put_line("The given position vector was not a permutation."); put_line("Please try again..."); end loop; return res; end if; end Determine_Order; procedure Determine_Processing_Order ( supports : in out Array_of_Lists; mix : in Link_to_Vector; fixed : out boolean ) is choice : character; cnt : natural; begin new_line; put_line("MENU for the Order of the points to add : "); put_line(" 1. fixed order, given by the monomial ordering"); put_line(" 2. random order, generated by the algorithm"); put_line(" 3. interactively defined by you"); put("Type 1,2, or 3 : "); Ask_Alternative(choice,"123"); case choice is when '1' => fixed := true; when '2' => fixed := false; when others => fixed := true; cnt := supports'first; for i in mix'range loop supports(cnt) := Determine_Order(supports(cnt)); cnt := cnt + mix(i); end loop; end case; end Determine_Processing_Order; -- INSTANTIATIONS OF THE GENERICS : procedure Report_New_Simplices ( t : in Triangulation; point : in Vector ) is -- DESCRIPTION : -- Writes the new simplices on file and computes their volume. v : natural; begin new_line(file); put(file,"The new simplices by adding "); put(file,point); put_line(file," : "); put(file,n,t,v); put(file," with volume addition : "); put(file,vol,1); put(file," + "); put(file,v,1); vol := vol + v; put(file," = "); put(file,vol,1); put_line(file,"."); end Report_New_Simplices; procedure R_Dynamic_Lifting is new Dynamic_Triangulations.Dynamic_Lifting_with_New(Report_New_Simplices); procedure Collect_Flattening ( t : in Triangulation; l : List ) is -- DESCRIPTION : -- Updates the subdivision mixsub with the flattened cells. -- The triangulation on entry contains the whole triangulation, -- not just the new cells. cells : Mixed_Subdivision; begin if Is_Null(mixsub) then cells := Deep_Create(n,t); else cells := Non_Flat_Deep_Create(n,t); Construct(Head_Of(mixsub),cells); end if; Flatten(cells); mixsub := cells; end Collect_Flattening; procedure Report_Flattening ( t : in Triangulation; l : in List ) is -- DESCRIPTION : -- Writes the list of lifted points and the triangulation on file -- and updates the mixed subdivision. begin new_line(file); put_line(file,"The list of lifted points before flattening : "); put(file,l); new_line(file); put_line(file,"The triangulation before flattening : "); put(file,n,t,vol); put(file," with volume "); put(file,vol,1); put_line(file,"."); Collect_Flattening(t,l); end Report_Flattening; procedure C_Dynamic_Lifting is new Dynamic_Triangulations.Dynamic_Lifting_with_Flat(Collect_Flattening); procedure F_Dynamic_Lifting is new Dynamic_Triangulations.Dynamic_Lifting_with_Flat(Report_Flattening); procedure FR_Dynamic_Lifting is new Dynamic_Triangulations.Dynamic_Lifting_with_Flat_and_New ( Before_Flattening => Report_Flattening, Process_New_Simplices => Report_New_Simplices); procedure Report_New_Cells ( mixsub : in out Mixed_Subdivision; i : in natural; point : in Vector ) is -- DESCRIPTION : -- Writes the new mixed cells on file and computes the mixed volume. v : natural; begin if not Is_Null(mixsub) then new_line(file); put(file,"The new mixed cells by adding "); put(file,point); new_line(file); put(file," to the "); put(file,i,1); put_line(file,"th component : "); put(file,n,mix.all,mixsub,v); put(file," with volume addition : "); put(file,vol,1); put(file," + "); put(file,v,1); vol := vol + v; put(file," = "); put(file,vol,1); new_line(file); end if; end Report_New_Cells; procedure R_Dynamic_Cayley is new Cayley_Trick.Dynamic_Cayley_with_New(Report_New_Cells); procedure Rt_Dynamic_Cayley is new Cayley_Trick.Dynamic_Cayley_with_Newt(Report_New_Cells); procedure R_Dynamic_Lifting is new Dynamic_Mixed_Subdivisions.Dynamic_Lifting_with_New(Report_New_Cells); procedure Report_Flattening ( mixsub : in out Mixed_Subdivision; lifted : in Array_of_Lists ) is -- DESCRIPTION : -- Writes the list of lifted points and the subdivision on file. begin new_line(file); put_line(file,"The list of lifted points before flattening : "); for i in lifted'range loop put(file," points of "); put(file,i,1); put_line(file,"th component : "); put(file,lifted(i)); end loop; new_line(file); put_line(file,"The mixed subdivision before flattening : "); put(file,n,mix.all,mixsub,vol); put(file," with volume "); put(file,vol,1); put_line(file,"."); end Report_Flattening; procedure F_Dynamic_Cayley is new Cayley_Trick.Dynamic_Cayley_with_Flat(Report_Flattening); procedure Ft_Dynamic_Cayley is new Cayley_Trick.Dynamic_Cayley_with_Flatt(Report_Flattening); procedure FR_Dynamic_Cayley is new Cayley_Trick.Dynamic_Cayley_with_Flat_and_New (Before_Flattening => Report_Flattening, Process_New_Cells => Report_New_Cells); procedure FRt_Dynamic_Cayley is new Cayley_Trick.Dynamic_Cayley_with_Flat_and_Newt (Before_Flattening => Report_Flattening, Process_New_Cells => Report_New_Cells); procedure Report_Flattening ( mixsub : in out Mixed_Subdivision; fs : in Face_Structures ) is -- DESCRIPTION : -- Writes the list of lifted points and the subdivision on file. begin new_line(file); put_line(file,"The lists of lifted points before flattening : "); for i in fs'range loop put(file," points of "); put(file,i,1); put_line(file,"th component : "); put(file,fs(i).l); end loop; new_line(file); put_line(file,"The mixed subdivision before flattening : "); put(file,n,mix.all,mixsub,vol); put(file," with volume "); put(file,vol,1); put_line(file,"."); end Report_Flattening; procedure F_Dynamic_Lifting is new Dynamic_Mixed_Subdivisions.Dynamic_Lifting_with_Flat (Report_Flattening); procedure FR_Dynamic_Lifting is new Dynamic_Mixed_Subdivisions.Dynamic_Lifting_with_Flat_and_New (Before_Flattening => Report_Flattening, Process_New_Cells => Report_New_Cells); -- MAIN CONSTRUCTORS : procedure Compute_Triangulation is -- DESCRIPTION : -- Application of the dynamic lifting algorithm -- to compute a triangulation of one polytope. t : Triangulation; support,lifted,lifted_last : List; arlifted : Array_of_Lists(mix'range); begin support := supports(supports'first); if verpts then Vertex_Points(file,support); end if; new_line(file); put_line(file,"CREATION OF THE TRIANGULATION :"); new_line(file); tstart(timer); if reportnew then if reportflat then FR_Dynamic_Lifting(support,order,inter,max,lifted,lifted_last,t); else R_Dynamic_Lifting(support,order,inter,max,lifted,lifted_last,t); end if; elsif reportflat then F_Dynamic_Lifting(support,order,inter,max,lifted,lifted_last,t); elsif subonfile then C_Dynamic_Lifting (support,order,inter,max,lifted,lifted_last,t); else Dynamic_Lifting(support,order,inter,max,lifted,lifted_last,t); end if; tstop(timer); new_line(file); print_times(file,timer,"computing the triangulation"); new_line(file); put_line(file,"THE LIFTED SUPPORTS :"); new_line(file); put(file,lifted); new_line(file); put_line(file,"THE TRIANGULATION :"); new_line(file); tstart(timer); put(file,n,t,vol); tstop(timer); new_line(file); put(file,"The volume : "); put(file,vol,1); new_line(file); new_line(file); print_times(file,timer,"computing the volume"); if subonfile then if Is_Null(mixsub) then put(subfile,n,1); new_line(subfile); put(subfile,1,1); new_line(subfile); -- type of mixture put(subfile,n,t); else declare lastcells : Mixed_Subdivision := Non_Flat_Deep_Create(n,t); begin Construct(Head_Of(mixsub),lastcells); mixsub := lastcells; put(subfile,n,mix.all,mixsub); end; end if; Close(subfile); end if; mv := vol; end Compute_Triangulation; procedure Compute_Cayley_Triangulation is -- DESCRIPTION : -- Application of the dynamic lifting algorithm to compute a mixed -- subdivision of a tuple of polytopes by means of the Cayley trick. supp,lifted : Array_of_Lists(1..r); t : Triangulation; numtri : natural; begin if verpts then Vertex_Points(file,mix,supports); end if; supp := Typed_Lists(mix.all,supports); new_line(file); put_line(file,"CREATION OF THE MIXED SUBDIVISION :"); new_line(file); tstart(timer); if reportnew then if reportflat then if minkpoly > 0 then FRt_Dynamic_Cayley(n,mix.all,supp,order,inter,max,lifted,t); else FR_Dynamic_Cayley(n,mix.all,supp,order,inter,max, lifted,mixsub,numtri); end if; else if minkpoly > 0 then Rt_Dynamic_Cayley(n,mix.all,supp,order,inter,max,lifted,t); else R_Dynamic_Cayley(n,mix.all,supp,order,inter,max,lifted, mixsub,numtri); end if; end if; elsif reportflat then if minkpoly > 0 then Ft_Dynamic_Cayley(n,mix.all,supp,order,inter,max,lifted,t); else F_Dynamic_Cayley(n,mix.all,supp,order,inter,max, lifted,mixsub,numtri); end if; else if minkpoly > 0 then Dynamic_Cayley(n,mix.all,supp,order,inter,max,lifted,t); else Dynamic_Cayley(n,mix.all,supp,order,inter,max, lifted,mixsub,numtri); end if; end if; tstop(timer); new_line(file); print_times(file,timer,"Computing the mixed subdivision"); new_line(file); put_line(file,"THE LIFTED SUPPORTS :"); new_line(file); put(file,lifted); if minkpoly > 0 then declare alltri : boolean := (minkpoly > 1); begin Driver_for_Minkowski_Polynomials(file,n,mix.all,t,alltri,mixsub); numtri := Length_Of(t); end; end if; new_line(file); put_line(file,"THE MIXED SUBDIVISION :"); new_line(file); tstart(timer); put(file,n,mix.all,mixsub,vol); tstop(timer); new_line(file); put(file,"The mixed volume equals : "); put(file,vol,1); new_line(file); put(file,"Number of cells in auxiliary triangulation : "); put(file,numtri,1); new_line(file); new_line(file); print_times(file,timer,"Computing the mixed volume"); if subonfile then put(subfile,n,mix.all,mixsub); Close(subfile); end if; mv := vol; end Compute_Cayley_Triangulation; procedure Report_Results ( file : in file_type; n : in natural; mix : in Link_to_Vector; mixsub : in out Mixed_Subdivision; fs : in Face_Structures ) is begin new_line(file); put_line(file,"THE LIFTED SUPPORTS :"); new_line(file); for i in fs'range loop put(file,fs(i).l); new_line(file); end loop; put_line(file,"THE MIXED SUBDIVISION :"); new_line(file); tstart(timer); if r = 1 then put(file,n,fs(fs'first).t,vol); else put(file,n,mix.all,mixsub,vol); end if; tstop(timer); new_line(file); put(file,"The mixed volume equals : "); put(file,vol,1); new_line(file); new_line(file); print_times(file,timer,"Computing the mixed volume"); if subonfile then put(subfile,n,mix.all,mixsub); Close(subfile); end if; mv := vol; end Report_Results; procedure Compute_Mixed_Subdivision is -- DESCRIPTION : -- Application of the dynamic lifting algorithm -- to compute a mixed subdivision of a tuple of polytopes. supp,lifted : Array_of_Lists(1..r); fs : Face_Structures(1..r); nbsucc,nbfail : Float_Vectors.Vector(1..r) := (1..r => 0.0); begin if verpts then Vertex_Points(file,mix,supports); end if; supp := Typed_Lists(mix.all,supports); new_line(file); put_line(file,"CREATION OF THE MIXED SUBDIVISION :"); new_line(file); tstart(timer); if reportnew then if reportflat then FR_Dynamic_Lifting (n,mix.all,supp,order,inter,conmv,max,mixsub,fs,nbsucc,nbfail); else R_Dynamic_Lifting (n,mix.all,supp,order,inter,conmv,max,mixsub,fs,nbsucc,nbfail); end if; elsif reportflat then F_Dynamic_Lifting (n,mix.all,supp,order,inter,conmv,max,mixsub,fs,nbsucc,nbfail); else Dynamic_Lifting (n,mix.all,supp,order,inter,conmv,max,mixsub,fs,nbsucc,nbfail); end if; tstop(timer); Pruning_Statistics(file,nbsucc,nbfail); new_line(file); print_times(file,timer,"Computing the mixed subdivision"); Report_Results(file,n,mix,mixsub,fs); end Compute_Mixed_Subdivision; procedure Solve_Coefficient_System is -- DESCRIPTION : -- Application of the dynamic lifting algorithm -- to compute a mixed subdivision of a tuple of polytopes and -- to solve a start system, with randomized coefficients. supp : Array_of_Lists(1..r); fs : Face_Structures(1..r); lifted : Array_of_Lists(1..r); numtri : natural := 0; lif,lif_last : List; nbsucc,nbfail : Float_Vectors.Vector(1..r) := (1..r => 0.0); begin if verpts then Vertex_Points(file,mix,supports); qq := Select_Terms(qq,supports); end if; supp := Typed_Lists(mix.all,supports); new_line(file); put_line(file,"SOLVING THE RANDOM COEFFICIENT SYSTEM :"); new_line(file); tstart(timer); if mix'last = mix'first then Dynamic_Unmixed_Solve (file,n,supp(supp'first),order,inter,max,fs(fs'first).l, fs(fs'first).last,fs(fs'first).t,qq,qqsols); else if caytrick then Dynamic_Cayley_Solve(file,n,mix.all,supp,order,inter,max,lifted, mixsub,numtri,qq,qqsols); for i in lifted'range loop fs(i).l := lifted(i); end loop; else Dynamic_Mixed_Solve (file,n,mix.all,supp,order,inter,conmv,max,mixsub,fs, nbsucc,nbfail,qq,qqsols); end if; end if; tstop(timer); if mix'last > mix'first and not caytrick then Pruning_Statistics(file,nbsucc,nbfail); end if; new_line(file); print_times(file,timer,"Computing the solution list"); Report_Results(file,n,mix,mixsub,fs); q := qq; qsols := qqsols; if not ranstart then put(solsft,qqsols); Close(solsft); end if; if ranstart then new_line(qft); put_line(qft,"THE SOLUTIONS :"); new_line(qft); put(qft,Length_Of(qqsols),n,qqsols); Close(qft); end if; end Solve_Coefficient_System; begin new_line; put_line(welcome); -- READING GENERAL INPUT INFORMATION : supports := Construct_Power_Lists(p); new_line; put("Do you want to enforce a type of mixture ? (y/n) "); Ask_Yes_or_No(ans); if ans /= 'y' then Compute_Mixture(supports,mix,perms); r := mix'last; else put("Give number of different supports : "); Read_Natural(r); put("Give vector of occurrences : "); get(r,mix); perms := new Vector(1..n); for i in perms'range loop perms(i) := i; end loop; end if; -- DETERMINE THE GLOBAL SWITCHES : put("Do you first want to extract the vertex points ? (y/n) "); Ask_Yes_or_No(ans); verpts := (ans = 'y'); inter := not verpts; put("Do you have a maximum lifting value ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then put(" Give the maximum lifting value : "); Read_Positive(max); else max := 0; end if; Determine_Processing_Order(supports,mix,order); if (r > 1) then new_line; put_line("MENU for Cayley trick : "); put_line(" 0. No Cayley trick, pruning for mixed cells."); put_line(" 1. Cayley trick : auxiliary triangulation."); put_line(" 2. Cayley trick with Minkowski-polynomial."); put_line(" 3. Cayley trick with all subdivisions."); put("Type 0,1,2, or 3 : "); Ask_Alternative(ans,"0123"); caytrick := not (ans = '0'); case ans is when '2' => minkpoly := 1; when '3' => minkpoly := 2; when others => minkpoly := 0; end case; if not caytrick then put("Do you want online checks on zero contributions ? (y/n) "); Ask_Yes_or_No(ans); conmv := (ans = 'y'); else conmv := false; end if; else caytrick := false; conmv := false; end if; put("Do you want to have the subdivision on separate file ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then subonfile := true; put_line("Reading the name of the file."); Read_Name_and_Create_File(subfile); else subonfile := false; end if; new_line; put("Are the cells to be written on file, during computation ? (y/n) "); Ask_Yes_or_No(ans); reportnew := (ans = 'y'); put("Are the cells to be written on file, before flattening ? (y/n) "); Ask_Yes_or_No(ans); reportflat := (ans = 'y'); permp := Permute(p,perms); Driver_for_Polyhedral_Continuation (file,permp,0,byebye,qq,qft,solsft,tosolve,ranstart,contrep); -- HANDLING THE UNMIXED AND THE MIXED CASE SEPARATELY : if not tosolve then if r = 1 then Compute_Triangulation; else if caytrick then Compute_Cayley_Triangulation; else Compute_Mixed_Subdivision; end if; end if; else Solve_Coefficient_System; end if; end Driver_for_Dynamic_Mixed_Volume_Computation; end Drivers_for_Dynamic_Lifting; SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_dynamic_lifting.ads' then echo shar: will not over-write existing file "'drivers_for_dynamic_lifting.ads'" else cat << "SHAR_EOF" > 'drivers_for_dynamic_lifting.ads' with text_io,Solutions; use text_io,Solutions; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; package Drivers_for_Dynamic_Lifting is procedure Dynamic_Lifting_Info; -- DESCRIPTION : -- Displays information on dynamic lifting on screen. procedure Driver_for_Dynamic_Mixed_Volume_Computation ( file : in file_type; p : in Poly_Sys; byebye : in boolean; q : out Poly_Sys; qsols : out Solution_List; mv : out natural ); -- DESCRIPTION : -- This procedure presents an interactive driver for the computation -- of the mixed volume. -- ON ENTRY : -- file output file, must be opened for output; -- p a polynomial system. -- ON RETURN : -- q a start system with randomly choosen coefficients, -- which can be used in a coefficient homotopy; -- qsols the solutions of q; -- mv mixed volume of p and the number of solutions of q. end Drivers_for_Dynamic_Lifting; SHAR_EOF fi # end of overwriting check if test -f 'dynamic_bkk_computations.adb' then echo shar: will not over-write existing file "'dynamic_bkk_computations.adb'" else cat << "SHAR_EOF" > 'dynamic_bkk_computations.adb' with Integer_Vectors,Float_Vectors; use Integer_Vectors; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Power_Lists,Vertices; use Power_Lists,Vertices; with Triangulations,Triangulations_io; use Triangulations,Triangulations_io; with Dynamic_Triangulations; use Dynamic_Triangulations; with Integer_Faces_of_Polytope; use Integer_Faces_of_Polytope; with Integer_Mixed_Subdivisions; use Integer_Mixed_Subdivisions; with Integer_Mixed_Subdivisions_io; use Integer_Mixed_Subdivisions_io; with Mixed_Volume_Computation; use Mixed_Volume_Computation; with Dynamic_Mixed_Subdivisions; use Dynamic_Mixed_Subdivisions; with Dynamic_Polyhedral_Continuation; use Dynamic_Polyhedral_Continuation; package body Dynamic_BKK_Bound_Computations is function BKK_by_Dynamic_Lifting ( p : Poly_Sys ) return natural is n : constant natural := p'length; supports : Array_of_Lists(p'range) := Construct_Power_Lists(p); mix,perms : Link_to_Vector; res : natural; begin Compute_Mixture(supports,mix,perms); if mix'first = mix'last then declare support : List := supports(supports'first); vert : List := Vertex_Points(support); lifted,lifted_last : List; t : Triangulation; begin Dynamic_Lifting(vert,false,false,0,lifted,lifted_last,t); res := Volume(t); Deep_Clear(vert); Deep_Clear(lifted); Clear(t); end; else declare verpts : Array_of_Lists(mix'range); cnt : natural := verpts'first; mixsub : Mixed_Subdivision; fs : Face_Structures(mix'range); nbsucc,nbfail : Float_Vectors.Vector(mix'range) := (mix'range => 0.0); begin for i in mix'range loop verpts(cnt) := Vertex_Points(supports(cnt)); cnt := cnt + mix(i); end loop; Dynamic_Lifting(n,mix.all,verpts,false,false,false,0,mixsub,fs, nbsucc,nbfail); res := Mixed_Volume(n,mix.all,mixsub); Deep_Clear(verpts); for i in fs'range loop Clear(fs(i).t); Deep_Clear(fs(i).l); Deep_Clear(fs(i).f); end loop; end; end if; return res; end BKK_by_Dynamic_Lifting; function BKK_by_Dynamic_Lifting ( file : file_type; p : Poly_Sys ) return natural is n : constant natural := p'length; supports : Array_of_Lists(p'range) := Construct_Power_Lists(p); mix,perms : Link_to_Vector; res : natural; begin Compute_Mixture(supports,mix,perms); if mix'first = mix'last then declare support : List := supports(supports'first); vert : List := Vertex_Points(support); lifted,lifted_last : List; t : Triangulation; begin Dynamic_Lifting(vert,false,false,0,lifted,lifted_last,t); put(file,n,t,res); Deep_Clear(vert); Deep_Clear(lifted); Clear(t); end; else declare verpts : Array_of_Lists(mix'range); cnt : natural := verpts'first; mixsub : Mixed_Subdivision; fs : Face_Structures(mix'range); nbsucc,nbfail : Float_Vectors.Vector(mix'range) := (mix'range => 0.0); begin for i in mix'range loop verpts(cnt) := Vertex_Points(supports(cnt)); cnt := cnt + mix(i); end loop; Dynamic_Lifting(n,mix.all,verpts,false,false,false,0,mixsub,fs, nbsucc,nbfail); put(file,n,mix.all,mixsub,res); Deep_Clear(verpts); for i in fs'range loop Clear(fs(i).t); Deep_Clear(fs(i).l); Deep_Clear(fs(i).f); end loop; end; end if; return res; end BKK_by_Dynamic_Lifting; function Solve_by_Dynamic_Lifting ( p : Poly_Sys ) return Solution_List is n : constant natural := p'length; supports : Array_of_Lists(p'range) := Construct_Power_Lists(p); mix,perms : Link_to_Vector; sols : Solution_List; file : file_type; begin Create(file,out_file,"/tmp/brol"); Compute_Mixture(supports,mix,perms); if mix'first = mix'last then declare support : List := supports(supports'first); vert : List := Vertex_Points(support); lifted,lifted_last : List; t : Triangulation; begin Dynamic_Unmixed_Solve(file,n,vert,false,false,0,lifted,lifted_last, t,p,sols); -- Deep_Clear(vert); Deep_Clear(lifted); Clear(t); end; else declare verpts : Array_of_Lists(mix'range); cnt : natural := verpts'first; mixsub : Mixed_Subdivision; fs : Face_Structures(mix'range); nbsucc,nbfail : Float_Vectors.Vector(mix'range) := (mix'range => 0.0); begin for i in mix'range loop verpts(cnt) := Vertex_Points(supports(cnt)); cnt := cnt + mix(i); end loop; Dynamic_Mixed_Solve(file,n,mix.all,supports,false,false,false,0, mixsub,fs,nbsucc,nbfail,p,sols); -- Deep_Clear(verpts); -- for i in fs'range loop -- Clear(fs(i).t); Deep_Clear(fs(i).l); Deep_Clear(fs(i).f); -- end loop; end; end if; Close(file); return sols; end Solve_by_Dynamic_Lifting; function Solve_by_Dynamic_Lifting ( file : file_type; p : Poly_Sys ) return Solution_List is n : constant natural := p'length; supports : Array_of_Lists(p'range) := Construct_Power_Lists(p); mix,perms : Link_to_Vector; sols : Solution_List; begin Compute_Mixture(supports,mix,perms); if mix'first = mix'last then declare support : List := supports(supports'first); vert : List := Vertex_Points(support); lifted,lifted_last : List; t : Triangulation; begin Dynamic_Unmixed_Solve(file,n,vert,false,false,0,lifted,lifted_last, t,p,sols); -- Deep_Clear(vert); Deep_Clear(lifted); Clear(t); end; else declare verpts : Array_of_Lists(mix'range); cnt : natural := verpts'first; mixsub : Mixed_Subdivision; fs : Face_Structures(mix'range); nbsucc,nbfail : Float_Vectors.Vector(mix'range) := (mix'range => 0.0); begin for i in mix'range loop verpts(cnt) := Vertex_Points(supports(cnt)); cnt := cnt + mix(i); end loop; Dynamic_Mixed_Solve(file,n,mix.all,supports,false,false,false,0, mixsub,fs,nbsucc,nbfail,p,sols); -- Deep_Clear(verpts); -- for i in fs'range loop -- Clear(fs(i).t); Deep_Clear(fs(i).l); Deep_Clear(fs(i).f); -- end loop; end; end if; return sols; end Solve_by_Dynamic_Lifting; end Dynamic_BKK_Bound_Computations; SHAR_EOF fi # end of overwriting check if test -f 'dynamic_bkk_computations.ads' then echo shar: will not over-write existing file "'dynamic_bkk_computations.ads'" else cat << "SHAR_EOF" > 'dynamic_bkk_computations.ads' with text_io,Solutions; use text_io,Solutions; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; package Dynamic_BKK_Bound_Computations is -- DESCRIPTION : -- This package exports some routines for computing the BKK bound -- and solving a random coefficient system by polyhedral continuation. -- These function are black box routines: the user does not have to -- worry about intermediate data structures. function BKK_by_Dynamic_Lifting ( p : Poly_Sys ) return natural; function BKK_by_Dynamic_Lifting ( file : file_type; p : Poly_Sys ) return natural; -- DESCRIPTION : -- If a file is specified, then the mixed subdivision will be -- written on that file. function Solve_by_Dynamic_Lifting ( p : Poly_Sys ) return Solution_List; function Solve_by_Dynamic_Lifting ( file : file_type; p : Poly_Sys ) return Solution_List; -- DESCRIPTION : -- If a file is specified, then intermediate results will be -- write on that file. end Dynamic_BKK_Bound_Computations; SHAR_EOF fi # end of overwriting check if test -f 'dynamic_lifting_functions.adb' then echo shar: will not over-write existing file "'dynamic_lifting_functions.adb'" else cat << "SHAR_EOF" > 'dynamic_lifting_functions.adb' with Integer_Vectors_of_Vectors; package body Dynamic_Lifting_Functions is function Lift_to_Place ( s : Simplex; x : Vector ) return integer is nor : constant Vector := Normal(s); ips : integer := nor*Vertex(s,1); ipx : integer := nor*x; begin if ips < ipx then return x(x'last); else ipx := ipx - x(x'last)*nor(nor'last); return ((ips - ipx)/nor(nor'last) + 1); end if; end Lift_to_Place; function Lift_to_Place ( t : Triangulation; x : Vector ) return integer is tmp : Triangulation := t; wrk : Vector(x'range) := x; begin while not Is_Null(tmp) loop wrk(wrk'last) := Lift_to_Place(Head_Of(tmp),wrk); tmp := Tail_Of(tmp); end loop; return wrk(wrk'last); end Lift_to_Place; function Lift_to_Pull ( s : Simplex; x : Vector ) return integer is nor : constant Vector := Normal(s); ips : integer := nor*Vertex(s,1); ipx : integer := nor*x; begin if ipx < ips then return x(x'last); else ipx := ipx - x(x'last)*nor(nor'last); return ((ips - ipx)/nor(nor'last) - 1); end if; end Lift_to_Pull; function Lift_to_Pull ( t : Triangulation; x : Vector ) return integer is tmp : Triangulation := t; wrk : Vector(x'range) := x; begin while not Is_Null(tmp) loop wrk(wrk'last) := Lift_to_Pull(Head_Of(tmp),wrk); tmp := Tail_Of(tmp); end loop; return wrk(wrk'last); end Lift_to_Pull; function Degenerate ( t : Triangulation; x : Vector ) return boolean is tmp : Triangulation := t; s : Simplex; begin while not Is_Null(tmp) loop s := Head_Of(tmp); declare nor : constant Vector := Normal(s); apt : constant Vector := Vertex(s,1); ipx : constant integer := x*nor; begin if apt*nor = ipx then return true; end if; end; tmp := Tail_Of(tmp); end loop; return false; end Degenerate; function Lift_to_Pull ( t1,t2 : Triangulation; x : Vector ) return integer is wrk : Vector(x'range) := x; begin wrk(wrk'last) := Lift_to_Pull(t1,x); while Degenerate(t2,wrk) loop -- pull the lifting further down wrk(wrk'last) := wrk(wrk'last) - 1; end loop; return wrk(wrk'last); end Lift_to_Pull; end Dynamic_Lifting_Functions; SHAR_EOF fi # end of overwriting check if test -f 'dynamic_lifting_functions.ads' then echo shar: will not over-write existing file "'dynamic_lifting_functions.ads'" else cat << "SHAR_EOF" > 'dynamic_lifting_functions.ads' with Integer_Vectors; use Integer_Vectors; with Simplices,Triangulations; use Simplices,Triangulations; package Dynamic_Lifting_Functions is -- DESCRIPTION : -- This package contains operations to control the lifting function -- in order to obtain triangulations either by placing or by pulling. function Lift_to_Place ( s : Simplex; x : Vector ) return integer; function Lift_to_Place ( t : Triangulation; x : Vector ) return integer; -- DESCRIPTION : -- Determines the next value of the lifting function for the given -- point x w.r.t. each simplex s, such that the product of the inner -- normal of s with x is higher than the product with any point in s. -- REQUIRED : -- x(x'last) provides a lower bound for the lifting function. -- To obtain an optimal lifting, x(x'last) can be set equal to 1. function Lift_to_Pull ( s : Simplex; x : Vector ) return integer; function Lift_to_Pull ( t : Triangulation; x : Vector ) return integer; -- DESCRIPTION : -- Determines the lifting value of x such that the product of the inner -- normal of each simplex s with x is strictly lower than the product -- with any point of s. -- The lifting value such that x can be pulled in s will be returned. -- REQUIRED : -- x(x'last) contains already a lower bound on the lifting for x. -- To obtain an optimal lifting, x(x'last) can be set equal to -1. function Degenerate ( t : Triangulation; x : Vector ) return boolean; -- DESCRIPTION : -- Returns true if there exists a cell in t, such that the lifted point -- x lies in the same hyperplane as the corresponding simplex on the -- lower hull. function Lift_to_Pull ( t1,t2 : Triangulation; x : Vector ) return integer; -- DESCRIPTION : -- Determines the lifting value of x such that for all cells in t1, -- the inner product of the inner normal with x is strictly lower -- than the inner product with any point of that cell. -- The triangulation t2 is used to be guarantee that the lifting does -- not induce a degeneracy in the lower hull. -- The lifting value such that x can be pulled in t will be returned. -- REQUIRED : -- x(x'last) contains already a lower bound on the lifting for x. -- To obtain an optimal lifting, x(x'last) can be set equal to -1. end Dynamic_Lifting_Functions; SHAR_EOF fi # end of overwriting check if test -f 'dynamic_mixed_subdivisions.adb' then echo shar: will not over-write existing file "'dynamic_mixed_subdivisions.adb'" else cat << "SHAR_EOF" > 'dynamic_mixed_subdivisions.adb' with Float_Vectors; with Integer_Vectors_of_Vectors; with Transforming_Integer_Vector_Lists; use Transforming_Integer_Vector_Lists; with Initial_Mixed_Cell; with Vertices,Simplices; use Vertices,Simplices; with Global_Dynamic_Triangulation; use Global_Dynamic_Triangulation; with Integer_Lifting_Utilities; use Integer_Lifting_Utilities; with Dynamic_Lifting_Functions; use Dynamic_Lifting_Functions; with Flatten_Mixed_Subdivisions; use Flatten_Mixed_Subdivisions; with Enumerate_Faces_of_Polytope; use Enumerate_Faces_of_Polytope; with Common_Faces_of_Polytope; use Common_Faces_of_Polytope; with Integer_Pruning_Methods; use Integer_Pruning_Methods; with Mixed_Volume_Computation; use Mixed_Volume_Computation; with Contributions_to_Mixed_Volume; use Contributions_to_Mixed_Volume; --with text_io,integer_io; use text_io,integer_io; --with Integer_Vectors_io; use Integer_Vectors_io; --with Lists_of_Integer_Vectors_io; use Lists_of_Integer_Vectors_io; --with Faces_of_Polytope_io; use Faces_of_Polytope_io; --with Mixed_Subdivisions_io; use Mixed_Subdivisions_io; --with Triangulations_io; use Triangulations_io; package body Dynamic_Mixed_Subdivisions is -- UTILITIES : function Is_Empty ( points : Array_of_Lists ) return boolean is begin for i in points'range loop if not Is_Null(points(i)) then return false; end if; end loop; return true; end Is_Empty; function First_Non_Empty ( points : Array_of_Lists ) return integer is -- DESCRIPTION : -- Returns the index of the first non empty set in the points. res : integer := points'first - 1; begin for i in points'range loop if not Is_Null(points(i)) then res := i; end if; exit when res >= points'first; end loop; return res; end First_Non_Empty; function Is_In ( fs : Face_Structure; point : vector ) return boolean is begin if Is_Null(fs.t) then return Is_In(fs.l,point); else return Is_In(fs.t,point); end if; end Is_In; -- procedure put ( n : in natural; fs : in Face_Structure ) is -- begin -- put_line("The list of lifted points : "); put(fs.l); -- put_line("The list of k-faces : "); put(fs.f); -- put_line("The triangulation : "); put(n,fs.t); -- end put; -- procedure put ( n : in natural; fs : in Face_Structures ) is -- begin -- for i in fs'range loop -- put("face structure for component "); put(i,1); -- put_line(" :"); -- put(n,fs(i)); -- end loop; -- end put; -- FLATTENING : procedure Flatten ( points : in out Integer_Vectors_of_Vectors.Vector ) is pt : Link_to_Vector; begin for i in points'range loop pt := points(i); if pt(pt'last) /= 0 then pt(pt'last) := 0; end if; end loop; end Flatten; procedure Flatten ( f : in out Face ) is begin Flatten(f.all); end Flatten; procedure Flatten ( fs : in out Faces ) is tmp : Faces := fs; f : Face; begin while not Is_Null(tmp) loop f := Head_Of(tmp); Flatten(f); Set_Head(tmp,f); tmp := Tail_Of(tmp); end loop; end Flatten; procedure Flatten ( fs : in out Face_Structure ) is begin Flatten(fs.l); Flatten(fs.t); Flatten(fs.f); end Flatten; procedure Flatten ( fs : in out Face_Structures ) is begin for i in fs'range loop Flatten(fs(i)); end loop; end Flatten; -- ZERO CONTRIBUTION : function Extract_Facet ( n : natural; s : Simplex ) return Face is ver : constant Integer_Vectors_of_Vectors.Vector := Simplices.Vertices(s); res : Face := new Integer_Vectors_of_Vectors.Vector(ver'range); begin for i in res'range loop res(i) := new Integer_Vectors.Vector'(ver(i)(1..n)); end loop; return res; end Extract_Facet; function Extract_Facets ( n : natural; t : Triangulation; x : Vector ) return Faces is -- DESCRIPTION : -- Returns the list of facets in t that all contain x. -- The facets are given in their original coordinates. -- REQUIRED : x is lifted, i.e., x'length = n+1. tmp : Triangulation := t; res,res_last : Faces; begin while not Is_Null(tmp) loop declare s : Simplex := Head_Of(tmp); begin if Is_Vertex(s,x) then Append(res,res_last,Extract_Facet(n,s)); end if; end; tmp := Tail_Of(tmp); end loop; return res; end Extract_Facets; function Zero_Contribution ( n : natural; fs : Face_Structures; x : Vector; i : natural ) return boolean is -- DESCRIPTION : -- Returns true if the point x does not contribute to the mixed volume -- when considered to the ith component of the already lifted points. -- REQUIRED : x'length = n+1, n = dimension before lifting. res : boolean := false; supp : Array_of_Lists(fs'range); begin for j in supp'range loop supp(j) := Reduce(fs(j).l,n+1); end loop; if Length_Of(fs(i).t) > 1 then declare facets : Faces := Extract_Facets(n,fs(i).t,x); begin res := Simple_Zero_Contribution(supp,facets,x(1..n),i); end; else res := Simple_Zero_Contribution(supp,x(1..n),i); end if; Deep_Clear(supp); return res; end Zero_Contribution; -- INITIALIZATION : procedure Initialize ( n : in natural; mix : in Vector; points : in Array_of_Lists; mixsub : in out Mixed_Subdivision; fs : in out Face_Structures; rest : in out Array_of_Lists; done : in out boolean ) is -- DESCRIPTION : -- Performs initialization of the dynamic lifting algorithm. -- ON ENTRY : -- n length of the vectors in points; -- mix type of mixture; -- mixsub mixed subdivision of the lifted points; -- fs face structures of the lifted points. -- ON RETURN : -- mixsub if empty on entry, then it contains the initial mixed -- cell, in case the problem is nondegenerate; -- rest rest of point list to be processed; -- done if true, then either the mixed volume equals zero, -- or there are no more points to process. null_points : Array_of_Lists(points'range); begin if Is_Null(mixsub) then -- compute an initial mixed cell declare mic : Mixed_Cell; begin Initial_Mixed_Cell(n,mix,points,mic,rest); if Mixed_Volume(n,mix,mic) > 0 -- check on degeneracy then -- initialize the mixed subdivision : Construct(mic,mixsub); -- initialize the face structures : for i in mic.pts'range loop declare tmp : List := mic.pts(i); fc : Face; begin while not Is_Null(tmp) loop Append(fs(i).l,fs(i).last,Head_Of(tmp).all); tmp := Tail_of(tmp); end loop; fc := new Integer_Vectors_of_Vectors.Vector' (Shallow_Create(mic.pts(i))); Construct(fc,fs(i).f); end; end loop; if mix'last = mix'first then declare v : constant Integer_Vectors_of_Vectors.Vector := Shallow_Create(fs(fs'first).l); s : Simplex := Create(v); begin fs(fs'first).t := Create(s); end; end if; done := Is_Empty(rest); else -- degenerate problem => mixed volume = 0 rest := null_points; done := true; end if; end; else rest := points; done := Is_Empty(rest); end if; end Initialize; function Initial_Triangulation ( n : in natural; l : in List; point : in Link_to_Vector ) return Triangulation is -- DESCRIPTION : -- Given a list of lifted points with Length_Of(l) >= n and another -- lifted point, a nonempty triangulation will be returned, when the -- volume of \conv(l U {point}) > 0. res : Triangulation; del,span : List; delpoint : Link_to_Vector := new vector(1..n); function Deflate ( lifted : in List ) return List is -- DESCRIPTION : -- Discards the lifting value of the points in the list l. res,res_last : List; tmp : List := lifted; pt : Link_to_Vector; begin while not Is_Null(tmp) loop pt := Head_Of(tmp); declare dpt : Link_to_Vector := new vector(1..n); begin dpt.all := pt(dpt'range); Append(res,res_last,dpt); end; tmp := Tail_Of(tmp); end loop; return res; end Deflate; function Lift ( pt,liftpt : Link_to_Vector; lifted : List ) return Link_to_Vector is -- DESCRIPTION : -- Compares the value of pt with that of liftpt and -- looks up the lifting value of the point pt in the list lifted. -- The lifted point will be returned. -- REQUIRED : -- Either the point pt should be equal to Deflate(liftpt) -- or it should belong to Deflate(lifted). tmp : List := lifted; res : Link_to_Vector; begin if pt.all = liftpt(pt'range) then return liftpt; else while not Is_Null(tmp) loop res := Head_Of(tmp); if pt.all = res(pt'range) then return res; else tmp := Tail_Of(tmp); end if; end loop; return res; end if; end Lift; begin del := Deflate(l); delpoint.all := point(delpoint'range); Construct(delpoint,del); span := Extremal_Points(n,del); if Length_Of(span) = n+1 then declare verpts : Integer_Vectors_of_Vectors.Vector(1..n+1); tmp : List := span; pt : Link_to_Vector; s : Simplex; begin for i in verpts'range loop verpts(i) := Lift(Head_Of(tmp),point,l); tmp := Tail_Of(tmp); end loop; s := Create(verpts); res := Create(s); tmp := l; while not Is_Null(tmp) loop pt := Head_Of(tmp); if not Is_In(span,pt) then Update(res,pt); end if; tmp := Tail_Of(tmp); end loop; end; end if; Clear(del); Clear(span); Clear(delpoint); return res; end Initial_Triangulation; -- CHOOSE NEXT POINT : procedure Next_Point ( n : in natural; points : in out Array_of_Lists; order : in boolean; index : in out integer; point : out Link_to_Vector ) is -- DESCRIPTION : -- Chooses a point out of the lists of points. -- ON ENTRY : -- n length of the elements in the point lists; -- points nonempty lists of points; -- order if true, then the first element out of the next first -- nonempty list will be chosen; -- index indicates component where not Is_Null(points(index)). -- ON RETURN : -- points lists of points with the point removed; -- index points to the next nonempty list, -- if index < points'first, then Is_Empty(points); -- point the next point to be processed. newindex : integer := points'first-1; pt : Link_to_Vector; begin if order then pt := Head_Of(points(index)); else pt := Max_Extreme(points(index),n,-3,3); Swap_to_Front(points(index),pt); end if; points(index) := Tail_Of(points(index)); for i in (index+1)..points'last loop if not Is_Null(points(i)) then newindex := i; end if; exit when newindex >= points'first; end loop; if newindex < points'first then for i in points'first..index loop if not Is_Null(points(i)) then newindex := i; end if; exit when newindex >= points'first; end loop; end if; index := newindex; point := pt; end Next_Point; -- UPDATE ROUTINES : procedure Merge ( mic : in out Mixed_Cell; mixsub : in out Mixed_Subdivision ) is tmp : Mixed_Subdivision := mixsub; done : boolean := false; begin while not Is_Null(tmp) loop declare mic1 : Mixed_Cell := Head_Of(tmp); last : List; begin if Equal(mic.nor,mic1.nor) then for k in mic1.pts'range loop last := mic1.pts(k); while not Is_Null(Tail_Of(last)) loop last := Tail_Of(last); end loop; Deep_Concat_Diff(mic.pts(k),mic1.pts(k),last); end loop; done := true; else tmp := Tail_Of(tmp); end if; end; exit when done; end loop; if done then Deep_Clear(mic); else Construct(mic,mixsub); end if; end Merge; procedure Merge ( cells : in Mixed_Subdivision; mixsub : in out Mixed_Subdivision ) is tmp : Mixed_Subdivision := cells; begin while not Is_Null(tmp) loop declare mic : Mixed_Cell := Head_Of(tmp); begin Merge(mic,mixsub); end; tmp := Tail_Of(tmp); end loop; end Merge; procedure Compute_New_Faces ( fs : in out Face_Structure; k,n : in natural; point : in out Link_to_Vector; newfs : out Faces ) is -- DESCRIPTION : -- Given a point, the new faces will be computed and returned. -- ON ENTRY : -- fs a face structure; -- k dimension of the faces to generate; -- n dimension without the lifting; -- point point that has to be in all the faces. -- ON RETURN : -- fs face structure with updated triangulation, -- the new faces are not added, also the list is not updated; -- point lifted conservatively w.r.t. fs.t; -- newfs k-faces, which all contain the given point. res,res_last : Faces; procedure Append ( fc : in Integer_Vectors_of_Vectors.Vector ) is f : Face; begin f := new Integer_Vectors_of_Vectors.Vector'(fc); Append(res,res_last,f); end Append; procedure EnumLis is new Enumerate_Lower_Faces_in_List(Append); procedure EnumTri is new Enumerate_Faces_in_Triangulation(Append); begin -- COMPUTE THE NEW FACES AND UPDATE fs : if Is_Null(fs.t) then if Length_Of(fs.l) >= n then fs.t := Initial_Triangulation(n,fs.l,point); if Is_Null(fs.t) then EnumLis(fs.l,point,k); else EnumTri(fs.t,point,k); end if; else EnumLis(fs.l,point,k); end if; else declare newt : Triangulation; begin point(point'last) := Lift_to_Place(fs.t,point.all); Update(fs.t,point,newt); Enumtri(newt,point,k); end; end if; Append(fs.l,fs.last,point); newfs := res; end Compute_New_Faces; procedure Swap ( index : in natural; points : in out Array_of_Lists ) is -- DESCRIPTION : -- Swaps the first component of points with the component index. tmp : List := points(index); begin points(index) := points(points'first); points(points'first) := tmp; end Swap; procedure Swap ( index : in natural; mixsub : in out Mixed_Subdivision ) is -- DESCRIPTION : -- Swaps the first component of each cell with the component index. tmp : Mixed_Subdivision := mixsub; begin while not Is_Null(tmp) loop declare mic : Mixed_Cell := Head_Of(tmp); begin Swap(index,mic.pts.all); -- Set_Head(tmp,mic); end; tmp := Tail_Of(tmp); end loop; end Swap; procedure Create_Cells ( index,n : in natural; mix : in Vector; afs : in Array_of_Faces; lif : in Array_of_Lists; nbsucc,nbfail : in out Float_Vectors.Vector; mixsub : out Mixed_Subdivision ) is -- DESCRIPTION : -- Creates a mixed subdivision by considering the faces -- of component index first. res : Mixed_Subdivision; wrkmix : Vector(mix'range) := mix; wrkafs : Array_of_Faces(afs'range) := afs; wrklif : Array_of_Lists(lif'range) := lif; begin wrkmix(wrkmix'first) := mix(index); wrkmix(index) := mix(mix'first); wrkafs(wrkafs'first) := afs(index); wrkafs(index) := afs(afs'first); wrklif(wrklif'first) := lif(index); wrklif(index) := lif(lif'first); Create_CS(n,wrkmix,wrkafs,wrklif,nbsucc,nbfail,res); Swap(index,res); mixsub := res; end Create_Cells; procedure Compute_New_Cells ( n : in natural; mix : in Vector; mic : in Mixed_Cell; afs : in Array_of_Faces; index : in integer; lifted : in Array_of_Lists; mixsub : out Mixed_Subdivision; nbsucc,nbfail : in out Float_Vectors.Vector ) is -- DESCRIPTION : -- Computes the new cells by considering a given mixed cell with -- a tuple of faces. -- ON ENTRY : -- n dimension before lifting; -- mix type of mixture; -- mic a given mixed cell; -- afs type of faces; -- index component where new faces are computed for; -- lifted tuple of lifted points; -- nbsucc number of succesful tests of face-face combinations; -- nbfail number of unsuccesful tests of face-face combinations. -- ON RETURN : -- mixsub the new mixed cells; -- nbsucc updated number of succesful tests; -- nbfail updated number of unsuccesful tests; res,res2 : Mixed_Subdivision; neiafs : Array_of_Faces(afs'range); begin neiafs(index) := Neighboring_Faces(mic,afs(index),index); if not Is_Null(neiafs(index)) then for i in neiafs'range loop if i /= index then neiafs(i) := Neighboring_Faces(mic,afs(i),i); end if; end loop; if index /= 1 then Create_Cells(index,n,mix,neiafs,lifted,nbsucc,nbfail,res); else Create_CS(n,mix,neiafs,lifted,nbsucc,nbfail,res); end if; for i in neiafs'range loop if i /= index then Shallow_Clear(neiafs(i)); end if; end loop; end if; Shallow_Clear(neiafs(index)); res2 := Create(lifted,res); -- test on normals Shallow_Clear(res); mixsub := res2; end Compute_New_Cells; procedure Compute_New_Cells ( n : in natural; mix : in Vector; mixsub : in Mixed_Subdivision; index : in integer; newfaces : in Faces; fs : in Face_Structures; newcells : out Mixed_Subdivision; nbsucc,nbfail : in out Float_Vectors.Vector ) is res : Mixed_Subdivision; afs : Array_of_Faces(fs'range); lifted : Array_of_Lists(fs'range); begin -- CREATE NEW CELLS ONLY WITH THE NEW FACES : for i in afs'range loop if i = index then afs(index) := newfaces; else afs(i) := fs(i).f; end if; lifted(i) := fs(i).l; end loop; if not Is_Null(fs(index).t) then -- ENUMERATE ALL CELLS IN mixsub : declare tmp : Mixed_Subdivision := mixsub; begin while not Is_Null(tmp) loop declare newcells2 : Mixed_Subdivision; begin Compute_New_Cells(n,mix,Head_Of(tmp),afs,index,lifted, newcells2,nbsucc,nbfail); Merge(newcells2,res); Shallow_Clear(newcells2); end; tmp := Tail_Of(tmp); end loop; end; else -- COMPUTE ALL NEW CELLS AT ONCE : declare res2 : Mixed_Subdivision; begin if index /= 1 then Create_Cells(index,n,mix,afs,lifted,nbsucc,nbfail,res2); else Create_CS(n,mix,afs,lifted,nbsucc,nbfail,res2); end if; res := Create(lifted,res2); Shallow_Clear(res2); end; end if; newcells := res; end Compute_New_Cells; -- BASIC VERSION : WITHOUT OUTPUT GENERICS : procedure Dynamic_Lifting ( n : in natural; mix : in Vector; points : in Array_of_Lists; order,inter,conmv : in boolean; maxli : in natural; mixsub : in out Mixed_Subdivision; fs : in out Face_Structures; nbsucc,nbfail : in out Float_Vectors.Vector ) is rest,inner : Array_of_Lists(points'range); index,newindex : integer; finished : boolean := false; pt : Link_to_Vector; nexli : natural := 1; begin Initialize(n,mix,points,mixsub,fs,rest,finished); if not finished then index := First_Non_Empty(rest); newindex := index; while not finished loop -- ITERATE UNTIL NO MORE POINTS : Next_Point(n,rest,order,newindex,pt); declare point : Link_to_Vector := new vector(pt'first..pt'last+1); newfa : Faces; newcells : Mixed_Subdivision; begin -- LIFT THE POINT CONSERVATIVELY : point(pt'range) := pt.all; point(point'last) := 1; if inter and then Is_In(fs(index),point.all) then Clear(point); Construct(pt,inner(index)); else nexli := Conservative_Lifting(mixsub,index,point.all); if (maxli > 0) and then nexli > maxli then Flatten(mixsub); Flatten(fs); nexli := 1; end if; point(point'last) := nexli; -- COMPUTE NEW FACES AND NEW CELLS : Compute_New_Faces(fs(index),mix(index),n,point,newfa); if not conmv or else not Zero_Contribution(n,fs,point.all,index) then Compute_New_Cells(n,mix,mixsub,index,newfa,fs, newcells,nbsucc,nbfail); -- UPDATE THE MIXED SUBDIVISION AND THE FACE STRUCTURES : Construct(newcells,mixsub); Shallow_Clear(newcells); end if; Construct(fs(index).f,newfa); Shallow_Clear(newfa); end if; end; index := newindex; finished := (index < rest'first); end loop; end if; if inter -- lift out the interior points then for i in inner'range loop Constant_Lifting(inner(i),nexli,fs(i).l,fs(i).last); Shallow_Clear(inner(i)); end loop; end if; exception when numeric_error -- probably due to a too high lifting => Flatten(mixsub); Flatten(fs); Dynamic_Lifting(n,mix,rest,order,inter,conmv,maxli,mixsub,fs, nbsucc,nbfail); end Dynamic_Lifting; -- EXTENDED VERSIONS : WITH OUTPUT GENERICS : procedure Dynamic_Lifting_with_Flat ( n : in natural; mix : in Vector; points : in Array_of_Lists; order,inter,conmv : in boolean; maxli : in natural; mixsub : in out Mixed_Subdivision; fs : in out Face_Structures; nbsucc,nbfail : in out Float_Vectors.Vector ) is rest,inner : Array_of_Lists(points'range); index,newindex : integer; finished : boolean := false; pt : Link_to_Vector; nexli : natural := 1; begin Initialize(n,mix,points,mixsub,fs,rest,finished); if not finished then index := First_Non_Empty(rest); newindex := index; while not finished loop -- ITERATE UNTIL NO MORE POINTS : Next_Point(n,rest,order,newindex,pt); declare point : Link_to_Vector := new vector(pt'first..pt'last+1); newfa : Faces; newcells : Mixed_Subdivision; begin -- LIFT THE POINT CONSERVATIVELY : point(pt'range) := pt.all; point(point'last) := 1; if inter and then Is_In(fs(index),point.all) then Clear(point); Construct(pt,inner(index)); else nexli := Conservative_Lifting(mixsub,index,point.all); if (maxli > 0) and then nexli > maxli then Before_Flattening(mixsub,fs); Flatten(mixsub); Flatten(fs); nexli := 1; end if; point(point'last) := nexli; -- COMPUTE NEW FACES AND NEW CELLS : Compute_New_Faces(fs(index),mix(index),n,point,newfa); if not conmv or else not Zero_Contribution(n,fs,point.all,index) then Compute_New_Cells(n,mix,mixsub,index,newfa,fs, newcells,nbsucc,nbfail); -- UPDATE THE MIXED SUBDIVISION AND THE FACE STRUCTURES : Construct(newcells,mixsub); Shallow_Clear(newcells); end if; Construct(fs(index).f,newfa); Shallow_Clear(newfa); end if; end; index := newindex; finished := (index < rest'first); end loop; end if; if inter -- lift out the interior points then for i in inner'range loop Constant_Lifting(inner(i),nexli,fs(i).l,fs(i).last); Shallow_Clear(inner(i)); end loop; end if; exception when numeric_error -- probably due to a too high lifting => Before_Flattening(mixsub,fs); Flatten(mixsub); Flatten(fs); Dynamic_Lifting_with_Flat(n,mix,rest,order,inter,conmv,maxli,mixsub, fs,nbsucc,nbfail); end Dynamic_Lifting_with_Flat; procedure Dynamic_Lifting_with_New ( n : in natural; mix : in Vector; points : in Array_of_Lists; order,inter,conmv : in boolean; maxli : in natural; mixsub : in out Mixed_Subdivision; fs : in out Face_Structures; nbsucc,nbfail : in out Float_Vectors.Vector ) is rest,inner : Array_of_Lists(points'range); index,newindex : integer; finished : boolean := false; pt : Link_to_Vector; nexli : natural := 1; begin Initialize(n,mix,points,mixsub,fs,rest,finished); Process_New_Cells(mixsub,0,Head_Of(fs(fs'last).last).all); if not finished then index := First_Non_Empty(rest); newindex := index; while not finished loop -- ITERATE UNTIL NO MORE POINTS : Next_Point(n,rest,order,newindex,pt); declare point : Link_to_Vector := new vector(pt'first..pt'last+1); newfa : Faces; newcells : Mixed_Subdivision; begin -- LIFT THE POINT CONSERVATIVELY : point(pt'range) := pt.all; point(point'last) := 1; if inter and then Is_In(fs(index),point.all) then Clear(point); Construct(pt,inner(index)); else nexli := Conservative_Lifting(mixsub,index,point.all); if (maxli > 0) and then nexli > maxli then Flatten(mixsub); Flatten(fs); nexli := 1; end if; point(point'last) := nexli; -- COMPUTE NEW FACES AND NEW CELLS : Compute_New_Faces(fs(index),mix(index),n,point,newfa); if not conmv or else not Zero_Contribution(n,fs,point.all,index) then Compute_New_Cells(n,mix,mixsub,index,newfa,fs,newcells, nbsucc,nbfail); Process_New_Cells(newcells,index,point.all); -- UPDATE THE MIXED SUBDIVISION AND THE FACE STRUCTURES : Construct(newcells,mixsub); Shallow_Clear(newcells); end if; Construct(fs(index).f,newfa); Shallow_Clear(newfa); end if; end; index := newindex; finished := (index < rest'first); end loop; end if; if inter -- lift out the interior points then for i in inner'range loop Constant_Lifting(inner(i),nexli,fs(i).l,fs(i).last); Shallow_Clear(inner(i)); end loop; end if; exception when numeric_error -- probably due to a too high lifting => Flatten(mixsub); Flatten(fs); Dynamic_Lifting_with_New(n,mix,rest,order,inter,conmv,maxli,mixsub,fs, nbsucc,nbfail); end Dynamic_Lifting_with_New; procedure Dynamic_Lifting_with_Flat_and_New ( n : in natural; mix : in Vector; points : in Array_of_Lists; order,inter,conmv : in boolean; maxli : in natural; mixsub : in out Mixed_Subdivision; fs : in out Face_Structures; nbsucc,nbfail : in out Float_Vectors.Vector ) is rest,inner : Array_of_Lists(points'range); index,newindex : integer; finished : boolean := false; pt : Link_to_Vector; nexli : natural := 1; begin Initialize(n,mix,points,mixsub,fs,rest,finished); Process_New_Cells(mixsub,0,Head_Of(fs(fs'last).last).all); if not finished then index := First_Non_Empty(rest); newindex := index; while not finished loop -- ITERATE UNTIL NO MORE POINTS Next_Point(n,rest,order,newindex,pt); declare point : Link_to_Vector := new vector(pt'first..pt'last+1); newfa : Faces; newcells : Mixed_Subdivision; begin -- LIFT THE POINT CONSERVATIVELY : point(pt'range) := pt.all; point(point'last) := 1; if inter and then Is_In(fs(index),point.all) then Clear(point); Construct(pt,inner(index)); else nexli := Conservative_Lifting(mixsub,index,point.all); if (maxli > 0) and then nexli > maxli then Before_Flattening(mixsub,fs); Flatten(mixsub); Flatten(fs); nexli := 1; end if; point(point'last) := nexli; -- COMPUTE NEW FACES AND NEW CELLS : Compute_New_Faces(fs(index),mix(index),n,point,newfa); if not conmv or else not Zero_Contribution(n,fs,point.all,index) then Compute_New_Cells(n,mix,mixsub,index,newfa,fs,newcells, nbsucc,nbfail); Process_New_Cells(newcells,index,point.all); -- UPDATE THE MIXED SUBDIVISION AND THE FACE STRUCTURES : Construct(newcells,mixsub); Shallow_Clear(newcells); end if; Construct(fs(index).f,newfa); Shallow_Clear(newfa); end if; end; index := newindex; finished := (index < rest'first); end loop; end if; if inter -- lift out the interior points then for i in inner'range loop Constant_Lifting(inner(i),nexli,fs(i).l,fs(i).last); Shallow_Clear(inner(i)); end loop; end if; exception when numeric_error -- probably due to a too high lifting => Before_Flattening(mixsub,fs); Flatten(mixsub); Flatten(fs); Dynamic_Lifting_with_Flat_and_New (n,mix,rest,order,inter,conmv,maxli,mixsub,fs,nbsucc,nbfail); end Dynamic_Lifting_with_Flat_and_New; end Dynamic_Mixed_Subdivisions; SHAR_EOF fi # end of overwriting check if test -f 'dynamic_mixed_subdivisions.ads' then echo shar: will not over-write existing file "'dynamic_mixed_subdivisions.ads'" else cat << "SHAR_EOF" > 'dynamic_mixed_subdivisions.ads' with Integer_Vectors,Float_Vectors; use Integer_Vectors; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Triangulations; use Triangulations; with Integer_Faces_of_Polytope; use Integer_Faces_of_Polytope; with Integer_Mixed_Subdivisions; use Integer_Mixed_Subdivisions; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; package Dynamic_Mixed_Subdivisions is -- DESCRIPTION : -- This package provides implementations of the dynamic lifting -- algorithm for the construction of a mixed subdivision. -- OPTIONS : -- 1. Choice of the order of the points; -- 2. For vertices or not, allows to add interior points; -- 3. With flattening or not, allows maximum lifting value. -- DATA STRUCTURES : type Face_Structure is record l,last : List; -- l contains the lifted points of the faces, -- last is a pointer to the last element of l t : Triangulation; -- triangulation of the points in l f : Faces; -- k-faces of conv(l) end record; type Face_Structures is array(integer range <>) of Face_Structure; -- BASIC VERSIONS : WITHOUT OUTPUT GENERICS : procedure Dynamic_Lifting ( n : in natural; mix : in Vector; points : in Array_of_Lists; order,inter,conmv : in boolean; maxli : in natural; mixsub : in out Mixed_Subdivision; fs : in out Face_Structures; nbsucc,nbfail : in out Float_Vectors.Vector ); -- DESCRIPTION : -- Application of the dynamic lifting algorithm to the points. -- ON ENTRY : -- n dimension before lifting; -- mix type of mixture; -- points tuple of lists of points of length n; -- order if true, then the points are already ordered and will -- be processed like they occur in the list, -- if false, then a random order will be chosen; -- inter if true, then the list may contain interior points, -- that are points x in conv(l\{x}), -- if false, no interior points occur in the list; -- conmv if true, then online checks on zero contributions will -- be made, otherwise this will not happen; -- maxli maximum value of the lifting function, -- if = 0, then no flattening will be applied, -- if > 0, then no points will be given a lifting value -- larger than maxli, eventually flattening will be applied; -- mixsub regular mixed subdivision of the lifted points; -- fs the face structures of the lower hulls of the lifted -- points, necessary to re-start the algorithm efficiently; -- nbsucc number of successful face-face combinations; -- nbfail number of unsuccessful face-face combinations. -- ON RETURN : -- mixsub regular mixed subdivision of the lifted points; -- fs face structures of the updated lower hulls; -- nbsucc updated number of successful face-face combinations; -- nbfail updated number of unsuccessful face-face combinations. -- EXTENDED VERSIONS : WITH OUTPUT GENERICS generic with procedure Before_Flattening ( mixsub : in out Mixed_Subdivision; fs : in Face_Structures ); -- DESCRIPTION : -- Before flattening, the current mixed subdivision and face -- structures are given as parameter to the procedure above. procedure Dynamic_Lifting_with_Flat ( n : in natural; mix : in Vector; points : in Array_of_Lists; order,inter,conmv : in boolean; maxli : in natural; mixsub : in out Mixed_Subdivision; fs : in out Face_Structures; nbsucc,nbfail : in out Float_Vectors.Vector ); -- DESCRIPTION : -- Application of the dynamic lifting algorithm to the points. -- Before flattening, the generic procedure will be invoked. -- The parameters have the same meaning as in the basic version. generic with procedure Process_New_Cells ( mixsub : in out Mixed_Subdivision; i : in natural; point : in vector ); -- DESCRIPTION : -- After the addition of a new point to the ith component, -- this lifted point together with the new mixed cells are returned. -- After the computation of the initial cell, i=0. procedure Dynamic_Lifting_with_New ( n : in natural; mix : in Vector; points : in Array_of_Lists; order,inter,conmv : in boolean; maxli : in natural; mixsub : in out Mixed_Subdivision; fs : in out Face_Structures; nbsucc,nbfail : in out Float_Vectors.Vector ); -- DESCRIPTION : -- Application of the dynamic lifting algorithm to the points. -- After each addition of a point, the generic procedure will -- be invoked. -- The parameters have the same meaning as in the basic version. generic with procedure Before_Flattening ( mixsub : in out Mixed_Subdivision; fs : in Face_Structures ); -- DESCRIPTION : -- Before flattening, the current mixed subdivision with -- the current lists of lifted points are given. with procedure Process_New_Cells ( mixsub : in out Mixed_Subdivision; i : in natural; point : in vector ); -- DESCRIPTION : -- After the addition of a new point to the ith component, -- this lifted point together with the new simplices are returned. -- After the computation of the initial cell, i=0. procedure Dynamic_Lifting_with_Flat_and_New ( n : in natural; mix : in Vector; points : in Array_of_Lists; order,inter,conmv : in boolean; maxli : in natural; mixsub : in out Mixed_Subdivision; fs : in out Face_Structures; nbsucc,nbfail : in out Float_Vectors.Vector ); -- DESCRIPTION : -- Application of the dynamic lifting algorithm to the list l. -- Before flattening, the first generic procedure will be invoked. -- After each addition of a point, the second generic procedure -- will be invoked. -- The parameters have the same meaning as in the basic version. end Dynamic_Mixed_Subdivisions; SHAR_EOF fi # end of overwriting check if test -f 'dynamic_polyhedral_continuation.adb' then echo shar: will not over-write existing file "'dynamic_polyhedral_continuation.adb'" else cat << "SHAR_EOF" > 'dynamic_polyhedral_continuation.adb' with Complex_Numbers; use Complex_Numbers; with Complex_Laurent_Polynomial_Systems; use Complex_Laurent_Polynomial_Systems; with Complex_Multivariate_Laurent_Polynomials; use Complex_Multivariate_Laurent_Polynomials; with Polynomial_to_Laurent_Converters; use Polynomial_to_Laurent_Converters; with Simplices; use Simplices; with Dynamic_Triangulations; use Dynamic_Triangulations; with Cayley_Trick; use Cayley_Trick; with Integer_Lifting_Utilities; use Integer_Lifting_Utilities; with Unfolding_Subdivisions; use Unfolding_Subdivisions; with Integer_Polyhedral_Continuation; use Integer_Polyhedral_Continuation; with Fewnomials; with Transforming_Laurent_Systems; with integer_io; use integer_io; with Integer_Mixed_Subdivisions_io; use Integer_Mixed_Subdivisions_io; package body Dynamic_Polyhedral_Continuation is -- CAUTION : PATCH FOR FEWNOMIALS => NO SHIFT !!! -- AUXILIAIRIES : procedure Flatten ( t : in out Term ) is -- DESCRIPTION : -- Flattens the Laurent term, i.e., the last exponent of t becomes zero. begin t.dg(t.dg'last) := 0; end Flatten; procedure Flatten ( p : in out Poly ) is -- DESCRIPTION : -- Flattens the Laurent polynomial, -- i.e., the last exponent of every monomial becomes zero. procedure Flatten_Term ( t : in out Term; cont : out boolean ) is begin Flatten(t); cont := true; end Flatten_Term; procedure Flatten_Terms is new Changing_Iterator(Flatten_Term); begin Flatten_Terms(p); end Flatten; procedure Flatten ( p : in out Laur_Sys ) is -- DESCRIPTION : -- Flattens the Laurent polynomial system, -- i.e., the last exponent of every monomial becomes zero. begin for i in p'range loop Flatten(p(i)); end loop; end Flatten; function Non_Flattened_Points ( l : List ) return List is -- DESCRIPTION : -- Returns the list of points with last coordinate /= 0. tmp,res,res_last : List; pt : Link_to_Vector; begin tmp := l; while not Is_Null(tmp) loop pt := Head_Of(tmp); if pt(pt'last) /= 0 then Append(res,res_last,pt); end if; tmp := Tail_Of(tmp); end loop; return res; end Non_Flattened_Points; function Non_Flattened_Points ( l : Array_of_Lists ) return Array_of_Lists is -- DESCRIPTION : -- Returns the points with last coordinate /= 0. res : Array_of_Lists(l'range); begin for i in l'range loop res(i) := Non_Flattened_Points(l(i)); end loop; return res; end Non_Flattened_Points; function Non_Flattened_Points ( fs : Face_Structures ) return Array_of_Lists is -- DESCRIPTION : -- Returns the points with last coordinate /= 0. res : Array_of_Lists(fs'range); begin for i in fs'range loop res(i) := Non_Flattened_Points(fs(i).l); end loop; return res; end Non_Flattened_Points; function Non_Flattened_Points ( mix : Vector; mixsub : Mixed_Subdivision ) return Array_of_Lists is -- DESCRIPTION : -- Returns the points with last coordinate /= 0. res,res_last : Array_of_Lists(mix'range); tmp : Mixed_Subdivision := mixsub; begin while not Is_Null(tmp) loop declare mic : Mixed_Cell := Head_Of(tmp); begin for i in mic.pts'range loop Deep_Concat_Diff(res(i),res_last(i),Non_Flattened_Points(mic.pts(i))); end loop; end; tmp := Tail_Of(tmp); end loop; return res; end Non_Flattened_Points; function Convert ( s : Simplex ) return Mixed_Cell is res : Mixed_Cell; begin res.nor := new vector'(Normal(s)); res.pts := new Array_of_Lists(1..1); res.pts(1) := Shallow_Create(Vertices(s)); return res; end Convert; function Convert ( normal : in vector; s : Simplex ) return Mixed_Cell is res : Mixed_Cell; begin res.nor := new vector'(normal); res.pts := new Array_of_Lists(1..1); res.pts(1) := Shallow_Create(Vertices(s)); return res; end Convert; function Non_Flattened_Cells ( flatnor : Link_to_Vector; mixsub : Mixed_Subdivision ) return Mixed_Subdivision is -- DESCRIPTION : -- Returns the cells which are not flattened. tmp,res,res_last : Mixed_Subdivision; mic : Mixed_Cell; begin tmp := mixsub; while not Is_Null(tmp) loop mic := Head_Of(tmp); if mic.nor.all /= flatnor.all then Append(res,res_last,mic); end if; tmp := Tail_Of(tmp); end loop; return res; end Non_Flattened_Cells; function Convert ( t : Triangulation ) return Mixed_Subdivision is res,res_last : Mixed_Subdivision; tmp : Triangulation := t; begin while not Is_Null(tmp) loop declare mic : Mixed_Cell := Convert(Head_Of(tmp)); begin Append(res,res_last,mic); end; tmp := Tail_Of(tmp); end loop; return res; end Convert; function Non_Flattened_Cells ( flatnor : Link_to_Vector; t : Triangulation ) return Mixed_Subdivision is tmp : Triangulation; res,res_last : Mixed_Subdivision; begin tmp := t; while not Is_Null(tmp) loop declare s : Simplex := Head_Of(tmp); nor : constant vector := Normal(s); begin if nor /= flatnor.all then declare mic : Mixed_Cell := Convert(nor,s); begin Append(res,res_last,mic); end; end if; end; tmp := Tail_Of(tmp); end loop; return res; end Non_Flattened_Cells; -- UTILITIES : function Pointer_to_Last ( l : Solution_List ) return Solution_List is -- DESCRIPTION : -- Returns a pointer to the last element of l. begin if Is_Null(l) then return l; elsif Is_Null(Tail_Of(l)) then return l; else return Pointer_to_Last(Tail_Of(l)); end if; end Pointer_to_Last; function Initialize_Polyhedral_Homotopy ( n : natural; mix : Vector; fs : Face_Structures; p : Laur_Sys ) return Laur_Sys is -- DESCRIPTION : -- Initializes the polyhedral homotopy w.r.t. to the already lifted -- points in the face structure. res : Laur_Sys(p'range); begin if not Is_Null(fs(fs'first).l) then declare lifted : Array_of_Lists(fs'range); begin for i in lifted'range loop lifted(i) := fs(i).l; end loop; res := Perform_Lifting(n,mix,lifted,p); end; end if; return res; end Initialize_Polyhedral_Homotopy; function Initialize_Polyhedral_Homotopy ( n : natural; l : List; p : Laur_Sys ) return Laur_Sys is -- DESCRIPTION : -- Initializes the polyhedral homotopy w.r.t. to the already lifted -- points in the list. res : Laur_Sys(p'range); begin if not Is_Null(l) then declare lifted : Array_of_Lists(p'range); mix : Vector(1..1) := (1..1 => n); begin for i in lifted'range loop lifted(i) := l; end loop; res := Perform_Lifting(n,mix,lifted,p); end; end if; return res; end Initialize_Polyhedral_Homotopy; function Select_Terms ( p : Poly; l : List ) return Poly is -- DESCRIPTION : -- Given a tuple of lifted points, selected terms of p, whose exponents -- occur in l, will be returned. res : Poly := Null_Poly; tmp : List := l; point : Link_to_Vector; begin while not Is_Null(tmp) loop point := Head_Of(tmp); declare d : degrees := new vector(point'first..point'last-1); t : Term; begin d.all := point(point'first..point'last-1); t.cf := Coeff(p,d); t.dg := d; Plus_Term(res,t); Integer_Vectors.Clear(Integer_Vectors.Link_to_Vector(d)); end; tmp := Tail_Of(tmp); end loop; return res; end Select_Terms; function Select_Terms ( p : Laur_Sys; mix : Vector; l : Array_of_Lists ) return Laur_Sys is -- DESCRIPTION : -- Given a tuple of lifted points, selected terms of p, whose exponents -- occur in l, will be returned. res : Laur_Sys(p'range); cnt : natural := p'first; begin for i in mix'range loop for j in 1..mix(i) loop res(cnt) := Select_Terms(p(cnt),l(i)); cnt := cnt + 1; end loop; end loop; return res; end Select_Terms; procedure Update_Polyhedral_Homotopy ( p : in Laur_Sys; point : in Vector; i : in integer; hom : in out Laur_Sys ) is -- DESCRIPTION : -- Given the lifted point of the ith support list, -- the ith polynomial of hom will be updated with a new term. d : degrees := new Integer_Vectors.Vector(point'first..point'last-1); t : Term; begin d.all := point(point'first..point'last-1); t.cf := Coeff(p(i),d); t.dg := new Integer_Vectors.Vector'(point); Plus_Term(hom(i),t); Integer_Vectors.Clear(Integer_Vectors.Link_to_Vector(d)); Clear(t); end Update_Polyhedral_homotopy; procedure Update_Polyhedral_Homotopy ( p : in Laur_Sys; l : in List; i : in integer; hom : in out Laur_Sys ) is -- DESCRIPTION : -- Given a list of lifted points of the ith support list, -- the ith polynomial of hom will be updated with new terms. tmp : List := l; begin while not Is_Null(tmp) loop Update_Polyhedral_Homotopy(p,Head_Of(tmp).all,i,hom); tmp := Tail_Of(tmp); end loop; end Update_Polyhedral_Homotopy; procedure Update_Polyhedral_Homotopy ( p : in Laur_Sys; lifted : in Array_of_Lists; mix : in Vector; hom : in out Laur_Sys ) is -- DESCRIPTION : -- Given a lists of lifted points, the polyhedral homotopy hom -- will be updated with new terms. cnt : natural := hom'first; begin for i in mix'range loop for j in 1..mix(i) loop Update_Polyhedral_Homotopy(p,lifted(i),cnt,hom); cnt := cnt + 1; end loop; end loop; end Update_Polyhedral_Homotopy; procedure Update_Polyhedral_Homotopy ( p : in Laur_Sys; lifted : in List; hom : in out Laur_Sys ) is -- DESCRIPTION : -- Given a list of lifted points, the unmixed polyhedral homotopy hom -- will be updated with new terms. begin for i in hom'range loop Update_Polyhedral_Homotopy(p,lifted,i,hom); end loop; end Update_Polyhedral_Homotopy; procedure Solve_by_Unfolding ( file : in file_type; p,hom : in Laur_Sys; n : in natural; mix : in Vector; nor : in Link_to_Vector; mixsub : in Mixed_Subdivision; sols : in out Solution_List ) is -- DESCRIPTION : -- All cells in the given mixed subdivision have the same normal. -- The solutions which correspond to these cells will be computed -- by means of the given polyhedral homotopy. -- ON ENTRY : -- file to write intermediate results on; -- p randomized system, without lifting; -- hom the polyhedral homotopy; -- n dimension before lifting; -- mix type of mixture; -- nor the same normal to all cells in the subdivision; -- mixsub the mixed subdivision all with the same normal nor. -- ON RETURN : -- sols the solutions of p, w.r.t. the cells in mixsub. work : Mixed_Subdivision; mv : natural; homsub : Laur_Sys(p'range); first : boolean := true; flatnor : Link_to_Vector; sols_last : Solution_List; procedure Process ( mic : in Mixed_Cell; newpts : in Array_of_Lists ) is subsys : Laur_Sys(p'range) := Select_Terms(p,mix,mic.pts.all); subsols : Solution_List; fail : boolean; begin Transforming_Laurent_Systems.Shift(subsys); -- patch for Fewnomials !! Fewnomials.Solve(subsys,subsols,fail); put(file,"Number of solutions of subsystem : "); put(file,Length_Of(subsols),1); new_line(file); if first then homsub := Perform_Lifting(n,mix,mic.pts.all,p); sols := subsols; first := false; else Update_Polyhedral_Homotopy(p,newpts,mix,homsub); Mixed_Continuation(file,homsub,mic.nor.all,subsols); Set_Continuation_Parameter(sols,CMPLX(0.0)); Mixed_Continuation(file,homsub,flatnor.all,sols); Flatten(homsub); sols_last := Pointer_to_Last(sols); Concat(sols,sols_last,subsols); Shallow_Clear(subsols); end if; Clear(subsys); end Process; procedure Solve_Subsystem is new Unfolding(Process); begin new_line(file); put_line(file,"**** SOLVING BY UNFOLDING ****"); new_line(file); flatnor := new vector(1..n+1); flatnor(1..n) := (1..n => 0); flatnor(n+1) := 1; Copy(mixsub,work); put(file,n,mix,work,mv); Solve_Subsystem(work); --Deep_Clear(work); Clear(flatnor); Clear(homsub); Set_Continuation_Parameter(sols,CMPLX(0.0)); Mixed_Continuation(file,hom,nor.all,sols); end Solve_by_Unfolding; procedure Solve_with_Unfolding ( file : in file_type; p,hom : in Laur_Sys; n : in natural; mix : in Vector; mixsub : in Mixed_Subdivision; sols : in out Solution_List ) is -- DESCRIPTION : -- Computes the new solutions corresponding to the cells in the -- mixed subdivision. sols_last : Solution_List; newnor : List := Different_Normals(mixsub); tmp : List := newnor; normal : Link_to_Vector; begin while not Is_Null(tmp) loop normal := Head_Of(tmp); declare newcells : Mixed_Subdivision := Extract(normal.all,mixsub); bigcell : Mixed_Subdivision; newsols : Solution_List; begin -- put_line(file,"THE LIST OF NEW CELLS"); put(file,n,mix,newcells); if Length_Of(newcells) = 1 then Mixed_Solve(file,hom,mix,newcells,newsols); -- else Solve_by_Unfolding(file,p,hom,n,mix,normal,newcells,newsols); else bigcell := Merge_Same_Normal(newcells); -- put_line(file,"THE BIG CELL"); put(file,n,mix,bigcell); Mixed_Solve(file,hom,mix,bigcell,newsols); -- Deep_Clear(bigcell); Shallow_Clear(bigcell); end if; sols_last := Pointer_to_Last(sols); Concat(sols,sols_last,newsols); Shallow_Clear(newsols); Shallow_Clear(newcells); end; tmp := Tail_Of(tmp); end loop; Deep_Clear(newnor); end Solve_with_Unfolding; -- DYNAMIC LIFTING FOR UNMIXED SYSTEMS : procedure Dynamic_Unmixed_Solve ( file : in file_type; n : in natural; l : in List; order,inter : in boolean; maxli : in natural; lifted,lifted_last : in out List; t : in out Triangulation; q : in Poly_Sys; qsols : in out Solution_List ) is p : Laur_Sys(q'range) := Polynomial_to_Laurent_System(q); qt : Laur_Sys(q'range); -- the polyhedral homotopy firstflat : boolean := true; -- first time flattening flatnor : Link_to_Vector; -- the flat normal qsols_last : Solution_List; mix : Vector(1..1) := (1..1 => n); procedure Solve_Before_Flattening ( t : in Triangulation; lifted : in List ) is -- DESCRIPTION : -- Computes the new solutions, right before the subdivision -- is flattened. newpts : List; newcells : Mixed_Subdivision; begin if firstflat then newpts := lifted; newcells := Convert(t); else newcells := Non_Flattened_Cells(flatnor,t); newpts := Non_Flattened_Points(lifted); end if; Update_Polyhedral_Homotopy(p,newpts,qt); if not firstflat then new_line(file); put_line(file,"*** EXTENDING THE SOLUTIONS ***"); new_line(file); Set_Continuation_Parameter(qsols,CMPLX(0.0)); Mixed_Continuation(file,qt,flatnor.all,qsols); end if; Solve_with_Unfolding(file,p,qt,n,mix,newcells,qsols); if not firstflat then Shallow_Clear(newpts); Shallow_Clear(newcells); else firstflat := false; end if; Flatten(qt); end Solve_Before_Flattening; procedure S_Dynamic_Lifting is new Dynamic_Triangulations.Dynamic_Lifting_with_Flat ( Before_Flattening => Solve_Before_Flattening ); begin qt := Initialize_Polyhedral_Homotopy(n,lifted,p); flatnor := new vector(1..n+1); flatnor(1..n) := (1..n => 0); flatnor(n+1) := 1; S_Dynamic_Lifting(l,order,inter,maxli,lifted,lifted_last,t); Solve_Before_Flattening(t,lifted); Clear(flatnor); Clear(mix); Clear(qt); Clear(p); end Dynamic_Unmixed_Solve; -- DYNAMIC LIFTING FOR THE CAYLEY TRICK : procedure Dynamic_Cayley_Solve ( file : in file_type; n : in natural; mix : in Vector; supports : in Array_of_Lists; order,inter : in boolean; maxli : in natural; lifted : in out Array_of_Lists; mixsub : in out Mixed_Subdivision; numtri : out natural; q : in Poly_Sys; qsols : in out Solution_List ) is p : Laur_Sys(q'range) := Polynomial_to_Laurent_System(q); qt : Laur_Sys(q'range); -- the polyhedral homotopy firstflat : boolean := true; -- first time flattening flatnor : Link_to_Vector; -- the flat normal qsols_last : Solution_List; procedure Solve_Before_Flattening ( mixsub : in out Mixed_Subdivision; lifted : in Array_of_Lists ) is -- DESCRIPTION : -- Computes the new solutions, right before the subdivision -- is flattened. newpts : Array_of_Lists(lifted'range); newcells : Mixed_Subdivision; begin if firstflat then newpts := lifted; newcells := mixsub; else newcells := Non_Flattened_Cells(flatnor,mixsub); newpts := Non_Flattened_Points(lifted); end if; Update_Polyhedral_Homotopy(p,newpts,mix,qt); if not Is_Null(qsols) then new_line(file); put_line(file,"*** EXTENDING THE SOLUTIONS ***"); new_line(file); Set_Continuation_Parameter(qsols,CMPLX(0.0)); Mixed_Continuation(file,qt,flatnor.all,qsols); end if; if not Is_Null(newcells) then Solve_with_Unfolding(file,p,qt,n,mix,newcells,qsols); if not firstflat then Shallow_Clear(newpts); Shallow_Clear(newcells); else firstflat := false; end if; end if; Flatten(qt); end Solve_Before_Flattening; procedure S_Dynamic_Lifting is new Cayley_Trick.Dynamic_Cayley_with_Flat ( Before_Flattening => Solve_Before_Flattening ); begin flatnor := new vector(1..n+1); flatnor(1..n) := (1..n => 0); flatnor(n+1) := 1; S_Dynamic_Lifting(n,mix,supports,order,inter,maxli,lifted,mixsub,numtri); Solve_Before_Flattening(mixsub,lifted); Clear(flatnor); end Dynamic_Cayley_Solve; -- DYNAMIC LIFTING FOR SEMI-MIXED SYSTEMS : procedure Dynamic_Mixed_Solve ( file : in file_type; n : in natural; mix : in Vector; supports : in Array_of_Lists; order,inter,conmv : in boolean; maxli : in natural; mixsub : in out Mixed_Subdivision; fs : in out Face_Structures; nbsucc,nbfail : in out Float_Vectors.Vector; q : in Poly_Sys; qsols : in out Solution_List ) is p : Laur_Sys(q'range) := Polynomial_to_Laurent_System(q); qt : Laur_Sys(q'range); -- the polyhedral homotopy firstflat : boolean := true; -- first time flattening flatnor : Link_to_Vector; -- the flat normal qsols_last : Solution_List; procedure Solve_Before_Flattening ( mixsub : in out Mixed_Subdivision; fs : in Face_Structures ) is -- DESCRIPTION : -- Computes the new solutions, right before the subdivision -- is flattened. newpts : Array_of_Lists(fs'range); newcells : Mixed_Subdivision; newsols : Solution_List; begin if firstflat then for i in fs'range loop newpts(i) := fs(i).l; end loop; newcells := mixsub; else newcells := Non_Flattened_Cells(flatnor,mixsub); newpts := Non_Flattened_Points(fs); end if; Update_Polyhedral_Homotopy(p,newpts,mix,qt); if not firstflat then new_line(file); put_line(file,"*** EXTENDING THE SOLUTIONS ***"); new_line(file); Set_Continuation_Parameter(qsols,CMPLX(0.0)); Mixed_Continuation(file,qt,flatnor.all,qsols); end if; Mixed_Solve(file,qt,mix,newcells,newsols); qsols_last := Pointer_to_Last(qsols); Concat(qsols,qsols_last,newsols); Shallow_Clear(newsols); if not firstflat then Shallow_Clear(newpts); Shallow_Clear(newcells); else firstflat := false; end if; Flatten(qt); end Solve_Before_Flattening; procedure S_Dynamic_Lifting is new Dynamic_Mixed_Subdivisions.Dynamic_Lifting_with_Flat ( Before_Flattening => Solve_Before_Flattening ); begin qt := Initialize_Polyhedral_Homotopy(n,mix,fs,p); flatnor := new vector(1..n+1); flatnor(1..n) := (1..n => 0); flatnor(n+1) := 1; S_Dynamic_Lifting(n,mix,supports,order,inter,conmv,maxli,mixsub,fs, nbsucc,nbfail); Solve_Before_Flattening(mixsub,fs); Clear(flatnor); Clear(qt); Clear(p); end Dynamic_Mixed_Solve; end Dynamic_Polyhedral_Continuation; SHAR_EOF fi # end of overwriting check if test -f 'dynamic_polyhedral_continuation.ads' then echo shar: will not over-write existing file "'dynamic_polyhedral_continuation.ads'" else cat << "SHAR_EOF" > 'dynamic_polyhedral_continuation.ads' with text_io; use text_io; with Integer_Vectors,Float_Vectors; use Integer_Vectors; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Solutions; use Solutions; with Triangulations; use Triangulations; with Integer_Mixed_Subdivisions; use Integer_Mixed_Subdivisions; with Dynamic_Mixed_Subdivisions; use Dynamic_Mixed_Subdivisions; package Dynamic_Polyhedral_Continuation is -- DESCRIPTION : -- This package contains the utilities for polyhedral continuation, -- to apply in combination with the dynamic lifting algorithm. procedure Dynamic_Unmixed_Solve ( file : in file_type; n : in natural; l : in List; order,inter : in boolean; maxli : in natural; lifted,lifted_last : in out List; t : in out Triangulation; q : in Poly_Sys; qsols : in out Solution_List ); -- DESCRIPTION : -- Application of the dynamic lifting algorithm to the unmixed -- polynomial system q. -- ON ENTRY : -- file a file to write intermediate results on; -- n dimension before lifting; -- l list of integer vectors of length n; -- order if true, then the points are already ordered and will -- be processed like they occur in the list, -- if false, then a random order will be chosen; -- inter if true, then the list may contain interior points, -- i.e. points x in conv(l\{x}), -- if false, no interior points occur in the list; -- maxli maximum value of the lifting function, -- if = 0, then no flattening will be applied, -- if > 0, then no points will be given a lifting value -- larger than maxli, eventually flattening will be applied; -- lifted points that already have been lifted; -- lifted_last is pointer to the last element of the list lifted; -- t contains a triangulation of the lifted points; -- q a polynomial system with randomly chosen coefficients, -- the lists of exponent vectors of q equals the list l. -- ON RETURN : -- lifted the lifted points; -- t a regular triangulation of the points in l; -- qsols the solutions of q. procedure Dynamic_Cayley_Solve ( file : in file_type; n : in natural; mix : in Vector; supports : in Array_of_Lists; order,inter : in boolean; maxli : in natural; lifted : in out Array_of_Lists; mixsub : in out Mixed_Subdivision; numtri : out natural; q : in Poly_Sys; qsols : in out Solution_List ); -- DESCRIPTION : -- Application of the dynamic lifting algorithm to the Cayley trick. -- ON ENTRY : -- file a file to write intermediate results on; -- n length of the vectors in the supports; -- mix type of mixture; -- supports lists of integer vector of length n; -- order if true, then the points are already ordered and will -- be processed like they occur in the list, -- if false, then a random order will be chosen; -- inter if true, then the list may contain interior points, -- i.e. points x in conv(l\{x}), -- if false, no interior points occur in the list; -- maxli maximum value of the lifting function, -- if = 0, then no flattening will be applied, -- i.e. there is no maximum lifting value, -- if > 0, then no points will be given a lifting value -- greater than maxli; -- q a polynomial system with randomly chosen coefficients, -- the lists of exponent vectors of q equals the given supports. -- ON RETURN : -- lifted the lifted supports; -- mixsub the mixed subdivision; -- numtri number of simplices in the triangulation of the -- auxiliary polytope, -- qsols the solutions of q. procedure Dynamic_Mixed_Solve ( file : in file_type; n : in natural; mix : in Vector; supports : in Array_of_Lists; order,inter,conmv : in boolean; maxli : in natural; mixsub : in out Mixed_Subdivision; fs : in out Face_Structures; nbsucc,nbfail : in out Float_Vectors.Vector; q : in Poly_Sys; qsols : in out Solution_List ); -- DESCRIPTION : -- Application of the dynamic lifting algorithm to a tuple of supports, -- by the lift-and-prune algorithm. -- ON ENTRY : -- file a file to write intermediate results on; -- n length of the vectors in the supports; -- mix type of mixture; -- supports lists of integer vector of length n; -- order if true, then the points are already ordered and will -- be processed like they occur in the list, -- if false, then a random order will be chosen; -- inter if true, then the list may contain interior points, -- i.e. points x in conv(l\{x}), -- if false, no interior points occur in the list; -- conmv if true, then online checks on zero contributions will -- be made, otherwise this will not happen; -- maxli maximum value of the lifting function, -- if = 0, then no flattening will be applied, -- if > 0, then no points will be given a lifting value -- larger than maxli, eventually flattening will be applied; -- mixsub regular mixed subdivision of the lifted points; -- fs the face structures of the lower hulls of the lifted -- points, necessary to re-start the algorithm efficiently; -- nbsucc number of successful face-face combinations; -- nbfail number of unsuccessful face-face combinations. -- q a polynomial system with randomly chosen coefficients, -- the lists of exponent vectors of q equals the given supports. -- ON RETURN : -- mixsub regular mixed subdivision of the lifted points; -- fs face structures of the updated lower hulls; -- nbsucc updated number of successful face-face combinations; -- nbfail updated number of unsuccessful face-face combinations; -- qsols the solutions of q. end Dynamic_Polyhedral_Continuation; SHAR_EOF fi # end of overwriting check if test -f 'dynamic_triangulations.adb' then echo shar: will not over-write existing file "'dynamic_triangulations.adb'" else cat << "SHAR_EOF" > 'dynamic_triangulations.adb' with Simplices; use Simplices; with Global_Dynamic_Triangulation; use Global_Dynamic_Triangulation; with Integer_Lifting_Utilities; use Integer_Lifting_Utilities; with Dynamic_Lifting_Functions; use Dynamic_Lifting_Functions; package body Dynamic_Triangulations is -- UTILITIES : procedure Initialize ( l : in List; order : in boolean; rest,lifted,lifted_last : in out List; t : in out Triangulation ) is -- DESCRIPTION : -- Performs initialization of the dynamic lifting algorithm. -- ON ENTRY : -- l the list of points to be processed; -- order if true, then the order of the points will be considered; -- lifted eventually points that already have been lifted; -- t triangulation of the lifted points. -- ON RETURN : -- rest rest of point list to be processed, -- if empty, then the problem is degenerate; -- lifted points in the initial simplex if t was empty, -- otherwise left unchanged; -- lifted_last pointer to the last element of lifted; -- t if empty on entry, then it contains an initial simplex, -- if the problem was not degenerate. null_list : List; s : Simplex; begin if Is_Null(t) then Initial_Simplex(l,order,s,rest); -- start from scratch if (s /= Null_Simplex) then Construct(s,t); lifted := Deep_Create(Vertices(s)); lifted_last := lifted; while not Is_Null(Tail_Of(lifted_last)) loop lifted_last := Tail_Of(lifted_last); end loop; else rest := null_list; -- degenerate problem end if; else rest := l; -- re-start end if; end Initialize; procedure Next_Point ( l : in out List; order : in boolean; point : out Link_to_Vector ) is -- DESCRIPTION : -- Selects the next point out of the list l. -- ON ENTRY : -- l a nonempty list of points; -- order if true, then the next point in the list will be choosen, -- otherwise, the point will be picked randomly. -- ON RETURN : -- l a list without the point; -- point the choosen point. pt : Link_to_Vector; begin if order then pt := Head_Of(l); else pt := Max_Extreme(l,Head_Of(l)'last,-5,5); Swap_to_Front(l,pt); end if; l := Tail_Of(l); point := pt; end Next_Point; -- BASIC VERSION : WITHOUT OUTPUT GENERICS : procedure Dynamic_Lifting ( l : in List; order,inter : in boolean; maxli : in natural; lifted,lifted_last : in out List; t : in out Triangulation ) is rest,inner : List; pt : Link_to_Vector; nexli : natural := 1; begin Initialize(l,order,rest,lifted,lifted_last,t); -- ITERATE FOR ALL POINTS IN rest : while not Is_Null(rest) loop Next_Point(rest,order,pt); declare point : Link_to_Vector := new Vector(1..pt'last+1); begin point(1..pt'last) := pt.all; point(point'last) := 1; -- try to obtain an optimal lifting value !! if inter and then Is_In(t,point.all) then Clear(point); Construct(pt,inner); else nexli := Lift_to_Place(t,point.all); if (maxli > 0) and then (nexli > maxli) then Flatten(t); nexli := 1; end if; point(point'last) := nexli; Update(t,point); Append(lifted,lifted_last,point); end if; end; end loop; if inter -- lift out the interior points then Constant_Lifting(inner,nexli,lifted,lifted_last); end if; exception when numeric_error -- probably due to a too high lifting => Flatten(t); Dynamic_Lifting(rest,order,inter,maxli,lifted,lifted_last,t); end Dynamic_Lifting; procedure Dynamic_Lifting_with_Flat ( l : in List; order,inter : in boolean; maxli : in natural; lifted,lifted_last : in out List; t : in out Triangulation ) is rest,inner : List; pt : Link_to_Vector; nexli : natural := 1; begin Initialize(l,order,rest,lifted,lifted_last,t); -- ITERATE FOR ALL POINTS IN rest : while not Is_Null(rest) loop Next_Point(rest,order,pt); declare point : Link_to_Vector := new Vector(1..pt'last+1); begin point(1..pt'last) := pt.all; point(point'last) := 1; -- try to obtain an optimal lifting value !! if inter and then Is_In(t,point.all) then Clear(point); Construct(pt,inner); else nexli := Lift_to_Place(t,point.all); if (maxli > 0) and then (nexli > maxli) then Before_Flattening(t,lifted); Flatten(t); nexli := 1; end if; point(point'last) := nexli; Update(t,point); Append(lifted,lifted_last,point); end if; end; end loop; if inter -- lift out the interior points then Constant_Lifting(inner,nexli,lifted,lifted_last); end if; exception when numeric_error -- probably due to a too high lifting => Before_Flattening(t,lifted); Flatten(t); Dynamic_Lifting_with_Flat (rest,order,inter,maxli,lifted,lifted_last,t); end Dynamic_Lifting_with_Flat; procedure Dynamic_Lifting_with_New ( l : in List; order,inter : in boolean; maxli : in natural; lifted,lifted_last : in out List; t : in out Triangulation ) is rest,inner : List; pt : Link_to_Vector; nexli : natural := 1; newt : Triangulation; begin Initialize(l,order,rest,lifted,lifted_last,t); -- ITERATE FOR ALL POINTS IN rest : while not Is_Null(rest) loop Next_Point(rest,order,pt); declare point : Link_to_Vector := new Vector(1..pt'last+1); begin point(1..pt'last) := pt.all; point(point'last) := 1; -- try to obtain an optimal lifting value !! if inter and then Is_In(t,point.all) then Clear(point); Construct(pt,inner); else nexli := Lift_to_Place(t,point.all); if (maxli > 0) and then (nexli > maxli) then Flatten(t); nexli := 1; end if; point(point'last) := nexli; Update(t,point,newt); Process_New_Simplices(newt,point.all); Append(lifted,lifted_last,point); end if; end; end loop; if inter -- lift out the interior points then Constant_Lifting(inner,nexli,lifted,lifted_last); end if; exception when numeric_error -- probably due to a too high lifting => Flatten(t); Dynamic_Lifting_with_New(rest,order,inter,maxli,lifted,lifted_last,t); end Dynamic_Lifting_with_New; procedure Dynamic_Lifting_with_Flat_and_New ( l : in List; order,inter : in boolean; maxli : in natural; lifted,lifted_last : in out List; t : in out Triangulation ) is rest,last,inner : List; pt : Link_to_Vector; nexli : natural := 1; newt : Triangulation; begin Initialize(l,order,rest,lifted,lifted_last,t); -- ITERATE FOR ALL POINTS IN rest : while not Is_Null(rest) loop Next_Point(rest,order,pt); declare point : Link_to_Vector := new Vector(1..pt'last+1); begin point(1..pt'last) := pt.all; point(point'last) := 1; -- try to obtain an optimal lifting value !! if inter and then Is_In(t,point.all) then Clear(point); Construct(pt,inner); else nexli := Lift_to_Place(t,point.all); if (maxli > 0) and then (nexli > maxli) then Before_Flattening(t,lifted); Flatten(t); nexli := 1; end if; point(point'last) := nexli; Update(t,point,newt); Process_New_Simplices(newt,point.all); Append(lifted,lifted_last,point); end if; end; end loop; if inter -- lift out the interior points then Constant_Lifting(inner,nexli,lifted,lifted_last); end if; exception when numeric_error -- probably due to a too high lifting => Before_Flattening(t,lifted); Flatten(t); Dynamic_Lifting_with_Flat_and_New (rest,order,inter,maxli,lifted,lifted_last,t); end Dynamic_Lifting_with_Flat_and_New; end Dynamic_Triangulations; SHAR_EOF fi # end of overwriting check if test -f 'dynamic_triangulations.ads' then echo shar: will not over-write existing file "'dynamic_triangulations.ads'" else cat << "SHAR_EOF" > 'dynamic_triangulations.ads' with Integer_Vectors; use Integer_Vectors; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Triangulations; use Triangulations; package Dynamic_Triangulations is -- DESCRIPTION : -- This package offers some implementations of the dynamic lifting -- algorithm applied to the unmixed case. -- OPTIONS : -- 1. choice of the order of the points -- 2. for vertices or not: allows to add interior points -- 3. with maximum value on the lifting function or not -- BASIC VERSION : WITHOUT OUTPUT GENERICS : procedure Dynamic_Lifting ( l : in List; order,inter : in boolean; maxli : in natural; lifted,lifted_last : in out List; t : in out Triangulation ); -- DESCRIPTION : -- Application of the dynamic lifting algorithm to the points in l. -- ON ENTRY : -- l list of integer vectors; -- order if true, then the points are already ordered and will -- be processed like they occur in the list, -- if false, then a random order will be chosen; -- inter if true, then the list may contain interior points, -- i.e. points x in conv(l\{x}), -- if false, no interior points occur in the list; -- maxli maximum value of the lifting function, -- if = 0, then no flattening will be applied, -- i.e. there is no maximum lifting value, -- if > 0, then no points will be given a lifting value -- greater than maxli; -- lifted points that already have been lifted; -- lifted_last is pointer to the last element of the list lifted; -- t contains a triangulation of the lifted points. -- ON RETURN : -- lifted the lifted points; -- t a regular triangulation of the points in l. -- EXTENDED VERSIONS : WITH OUTPUT GENERICS generic with procedure Before_Flattening ( t : in Triangulation; lifted : in List ); -- DESCRIPTION : -- Before flattening, the current triangulation with -- the current list of lifted points is given. procedure Dynamic_Lifting_with_Flat ( l : in List; order,inter : in boolean; maxli : in natural; lifted,lifted_last : in out List; t : in out Triangulation ); -- DESCRIPTION : -- Application of the dynamic lifting algorithm to the list l. -- Before flattening, the generic procedure will be invoked. -- The parameters have the same meaning as in the basic version. generic with procedure Process_New_Simplices ( t : in Triangulation; point : in vector ); -- DESCRIPTION : -- After the addition of a new point, this lifted point together -- with the new simplices are returned. procedure Dynamic_Lifting_with_New ( l : in List; order,inter : in boolean; maxli : in natural; lifted,lifted_last : in out List; t : in out Triangulation ); -- DESCRIPTION : -- Application of the dynamic lifting algorithm to the list l. -- After each addition of a point, the generic procedure will -- be invoked. -- The parameters have the same meaning as in the basic version. generic with procedure Before_Flattening ( t : in Triangulation; lifted : in List ); -- DESCRIPTION : -- Before flattening, the current triangulation with -- the current list of lifted points is given. with procedure Process_New_Simplices ( t : in Triangulation; point : in vector ); -- DESCRIPTION : -- After the addition of a new point, this lifted point together -- with the new simplices are returned. procedure Dynamic_Lifting_with_Flat_and_New ( l : in List; order,inter : in boolean; maxli : in natural; lifted,lifted_last : in out List; t : in out Triangulation ); -- DESCRIPTION : -- Application of the dynamic lifting algorithm to the list l. -- Before flattening, the first generic procedure will be invoked. -- After each addition of a point, the second generic procedure -- will be invoked. -- The parameters have the same meaning as in the basic version. end Dynamic_Triangulations; SHAR_EOF fi # end of overwriting check if test -f 'enumerate_faces_of_polytope.adb' then echo shar: will not over-write existing file "'enumerate_faces_of_polytope.adb'" else cat << "SHAR_EOF" > 'enumerate_faces_of_polytope.adb' with Face_Enumerators; use Face_Enumerators; package body Enumerate_Faces_of_Polytope is -- UTILITIES : function Is_In ( i : natural; v : vector ) return boolean is begin for j in v'range loop if v(j) = i then return true; end if; end loop; return false; end Is_In; -- TARGET ROUTINES : procedure Enumerate_Faces_in_List ( l : in List; point : in Link_to_Vector; k : in natural ) is verpts : constant Integer_Vectors_of_Vectors.Vector := Shallow_Create(l); face : Integer_Vectors_of_Vectors.Vector(0..k); procedure Enumerate_Vertices ( l,start : in natural ) is -- DESCRIPTION : -- Already l vectors have been choosen out of verpts and -- are in face(0..l). In indices(0..l) the position of the -- ith face in the vector of vertices is given by indices(i). -- The parameter start indices from which vertex on, the -- enumeration has to start. -- In this way, the faces are enumerated in lexicographic order. begin if l >= k then Process(face); elsif (verpts'last-start+1) >= k-l then for j in start..verpts'last loop face(l+1) := verpts(j); Enumerate_Vertices(l+1,j+1); end loop; end if; end Enumerate_Vertices; begin face(0) := point; Enumerate_Vertices(0,verpts'first); end Enumerate_Faces_in_List; procedure Enumerate_Lower_Faces_in_List ( l : in List; point : in Link_to_Vector; k : in natural ) is verpts : Integer_Vectors_of_Vectors.Vector(1..Length_Of(l)+1); face : Integer_Vectors_of_Vectors.Vector(0..k); begin verpts(1) := point; verpts(2..verpts'last) := Shallow_Create(l); face(0) := point; if k = 1 then declare procedure Low_Edge ( i,j : in integer; cont : out boolean ) is begin if i = 1 then face(1) := verpts(j); Process(face); cont := true; else cont := false; end if; end Low_Edge; procedure Enum_Low_Edges is new Enumerate_Lower_Edges(Low_Edge); begin Enum_Low_Edges(verpts); end; else declare procedure Low_Face ( f : in Vector; cont : out boolean ) is begin if f(f'first) = 1 then for i in 1..f'last loop face(i) := verpts(f(i)); end loop; Process(face); cont := true; else cont := false; end if; end Low_Face; procedure Enum_Low_Faces is new Enumerate_Lower_Faces(Low_Face); begin Enum_Low_Faces(k,verpts); end; end if; end Enumerate_Lower_Faces_in_List; procedure Enumerate_Faces_in_Simplex ( s : in Simplex; point : in Link_to_Vector; k : in natural ) is verpts : constant Integer_Vectors_of_Vectors.Vector := Vertices(s); face : Integer_Vectors_of_Vectors.Vector(0..k); indices : Vector(0..k); procedure Enumerate_Vertices ( l,start : in natural ) is -- DESCRIPTION : -- Already l vectors have been choosen out of verpts and -- are in face(0..l). In indices(0..l) the position of the -- ith face in the vector of vertices is given by indices(i). -- The parameter start indices from which vertex on, the -- enumeration has to start. -- In this way, the faces are enumerated in lexicographic order. begin if l >= k then Process(face); elsif (verpts'last-start+1) >= k-l then for j in start..verpts'last loop if not Is_In(j,indices(0..l)) then indices(l+1) := j; face(l+1) := verpts(j); Enumerate_Vertices(l+1,j+1); end if; end loop; end if; end Enumerate_Vertices; begin -- SEARCH FOR THE INDEX OF THE POINT : indices(0) := verpts'first - 1; for i in verpts'range loop if verpts(i).all = point.all then indices(0) := i; end if; exit when indices(0) >= verpts'first; end loop; -- ENUMERATE ALL OTHER k CHOICES OF POINTS : if indices(0) >= verpts'first then face(0) := point; Enumerate_Vertices(0,verpts'first); end if; end Enumerate_Faces_in_Simplex; procedure Enumerate_Lower_Faces_in_Simplex ( s : in Simplex; point : in Link_to_Vector; k : in natural ) is verpts : constant Integer_Vectors_of_Vectors.Vector := Vertices(s); face : Integer_Vectors_of_Vectors.Vector(0..k); indices : Vector(0..k); begin null; end Enumerate_Lower_Faces_in_Simplex; procedure Enumerate_Faces_in_Triangulation ( t : in Triangulation; point : in Link_to_Vector; k : in natural ) is verpts : constant Integer_Vectors_of_Vectors.Vector := Vertices(t,point.all); face : Integer_Vectors_of_Vectors.Vector(0..k); indices : Vector(0..k); procedure Enumerate_Vertices ( l,start : in natural ) is -- DESCRIPTION : -- Already l vectors have been choosen out of verpts and -- are in face(0..l). In indices(0..l) the position of the -- ith face in the vector of vertices is given by indices(i). -- The parameter start indices from which vertex on, the -- enumeration has to start. -- In this way, the faces are enumerated in lexicographic order. begin if l >= k then Process(face); elsif (verpts'last-start+1) >= k-l then for j in start..verpts'last loop if not Is_In(j,indices(0..l)) then indices(l+1) := j; face(l+1) := verpts(j); Enumerate_Vertices(l+1,j+1); end if; end loop; end if; end Enumerate_Vertices; begin -- SEARCH FOR THE INDEX OF THE POINT : indices(0) := verpts'first - 1; for i in verpts'range loop if verpts(i).all = point.all then indices(0) := i; end if; exit when indices(0) >= verpts'first; end loop; -- ENUMERATE ALL OTHER k CHOICES OF POINTS : if indices(0) >= verpts'first then face(0) := point; Enumerate_Vertices(0,verpts'first); end if; end Enumerate_Faces_in_Triangulation; procedure Enumerate_Lower_Faces_in_Triangulation ( t : in Triangulation; point : in Link_to_Vector; k : in natural ) is verpts : constant Integer_Vectors_of_Vectors.Vector := Vertices(t,point.all); face : Integer_Vectors_of_Vectors.Vector(0..k); indices : Vector(0..k); begin null; end Enumerate_Lower_Faces_in_Triangulation; end Enumerate_Faces_of_Polytope; SHAR_EOF fi # end of overwriting check if test -f 'enumerate_faces_of_polytope.ads' then echo shar: will not over-write existing file "'enumerate_faces_of_polytope.ads'" else cat << "SHAR_EOF" > 'enumerate_faces_of_polytope.ads' with Integer_Vectors; use Integer_Vectors; with Integer_Vectors_of_Vectors; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Simplices,Triangulations; use Simplices,Triangulations; package Enumerate_Faces_of_Polytope is -- DESCRIPTION : -- The routines in this package enable the enumeration of all k-faces -- of the lower hull of a polytope, based on a regular triangulation. generic with procedure Process ( face : in Integer_Vectors_of_Vectors.Vector ); procedure Enumerate_Faces_in_List ( l : in List; point : in Link_to_Vector; k : in natural ); generic with procedure Process ( face : in Integer_Vectors_of_Vectors.Vector ); procedure Enumerate_Lower_Faces_in_List ( l : in List; point : in Link_to_Vector; k : in natural ); -- DESCRIPTION : -- Enumerates all k-dimensional faces spanned by the list and -- the given point. The _Lower_ indicates that only the faces of the -- lower hull are enumerated. -- ON ENTRY : -- l a list of points; -- point vector not in the list l; -- k dimension of the faces. -- ON RETURN : -- face a (k+1)-dimensional vector: face(0..k), face(0) = point. generic with procedure Process ( face : in Integer_Vectors_of_Vectors.Vector ); procedure Enumerate_Faces_in_Simplex ( s : in Simplex; point : in Link_to_Vector; k : in natural ); generic with procedure Process ( face : in Integer_Vectors_of_Vectors.Vector ); procedure Enumerate_Lower_Faces_in_Simplex ( s : in Simplex; point : in Link_to_Vector; k : in natural ); -- DESCRIPTION : -- Enumerates all k-dimensional faces in the simplex s that contain -- the given point. The _Lower_ indicates that only the faces of the -- lower hull are enumerated. -- ON ENTRY : -- s a simplex; -- point vector in the simplex; -- k dimension of the faces. -- ON RETURN : -- face a (k+1)-dimensional vector: face(0..k), face(0) = point. generic with procedure Process ( face : in Integer_Vectors_of_Vectors.Vector ); procedure Enumerate_Faces_in_Triangulation ( t : in Triangulation; point : in Link_to_Vector; k : in natural ); generic with procedure Process ( face : in Integer_Vectors_of_Vectors.Vector ); procedure Enumerate_Lower_Faces_in_Triangulation ( t : in Triangulation; point : in Link_to_Vector; k : in natural ); -- DESCRIPTION : -- Enumerates all k-dimensional faces in the simplices of the triangulation -- that contain the given point. The _Lower_ indicates that only the faces -- of the lower hull are enumerated. -- ON ENTRY : -- t a regular triangulation; -- point vector in each simplex of t; -- k dimension of the faces. -- ON RETURN : -- face a (k+1)-dimensional vector: face(0..k), face(0) = point. end Enumerate_Faces_of_Polytope; SHAR_EOF fi # end of overwriting check if test -f 'flatten_mixed_subdivisions.adb' then echo shar: will not over-write existing file "'flatten_mixed_subdivisions.adb'" else cat << "SHAR_EOF" > 'flatten_mixed_subdivisions.adb' with Integer_Vectors; use Integer_Vectors; package body Flatten_Mixed_Subdivisions is procedure Flatten ( l : in out List ) is tmp : List := l; pt : Link_to_Vector; begin while not Is_Null(tmp) loop pt := Head_Of(tmp); if pt(pt'last) /= 0 then pt(pt'last) := 0; Set_Head(tmp,pt); end if; tmp := Tail_Of(tmp); end loop; end Flatten; procedure Flatten ( l : in out Array_of_Lists ) is begin for i in l'range loop Flatten(l(i)); end loop; end Flatten; procedure Flatten ( mic : in out Mixed_Cell ) is begin Flatten(mic.pts.all); mic.nor.all := (mic.nor'range => 0); mic.nor(mic.nor'last) := 1; end Flatten; procedure Old_Flatten ( mixsub : in out Mixed_Subdivision ) is tmp : Mixed_Subdivision := mixsub; mic : Mixed_Cell; begin while not Is_Null(tmp) loop mic := Head_Of(tmp); Flatten(mic); Set_Head(tmp,mic); tmp := Tail_Of(tmp); end loop; end Old_Flatten; -- NEW FLATTENING, USING THE RECURSIVE DATA STRUCTURE : function Collect_Supports ( n : natural; mixsub : Mixed_Subdivision ) return Array_of_Lists is -- DESCRIPTION : -- Returns the array of list of points that occur in the cells -- of the mixed subdivision. -- REQUIRED : not Is_Null(mixsub). tmp : Mixed_Subdivision := mixsub; mic : Mixed_Cell := Head_Of(mixsub); tmppts : List; pt : Link_to_Vector; res,res_last : Array_of_Lists(mic.pts'range); begin while not Is_Null(tmp) loop mic := Head_Of(tmp); for k in mic.pts'range loop tmppts := mic.pts(k); while not Is_Null(tmppts) loop pt := Head_Of(tmppts); if not Is_In(res(k),pt) then Append(res(k),res_last(k),pt.all); end if; tmppts := Tail_Of(tmppts); end loop; end loop; tmp := Tail_Of(tmp); end loop; return res; end Collect_Supports; procedure Flatten ( mixsub : in out Mixed_Subdivision ) is -- DESCRIPTION : -- Flattens the mixed subdivision, i.e., the modified mixed subdivision -- contains one flattened cells with all the points that occured in the -- subdivision. The original mixed subdivision is stored as the -- subdivision of that flattened cell. begin if not Is_Null(mixsub) then declare n : constant natural := Head_Of(mixsub).nor'length-1; mic : Mixed_Cell; res : Mixed_Subdivision; begin mic.nor := new Integer_Vectors.Vector(1..n+1); mic.pts := new Array_of_Lists'(Collect_Supports(n,mixsub)); Flatten(mic); mic.sub := new Mixed_Subdivision'(mixsub); Construct(mic,res); mixsub := res; end; end if; end Flatten; end Flatten_Mixed_Subdivisions; SHAR_EOF fi # end of overwriting check if test -f 'flatten_mixed_subdivisions.ads' then echo shar: will not over-write existing file "'flatten_mixed_subdivisions.ads'" else cat << "SHAR_EOF" > 'flatten_mixed_subdivisions.ads' with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Integer_Mixed_Subdivisions; use Integer_Mixed_Subdivisions; package Flatten_Mixed_Subdivisions is -- DESCRIPTION : -- This package contains the flattening routines. procedure Flatten ( l : in out List ); procedure Flatten ( l : in out Array_of_Lists ); procedure Flatten ( mic : in out Mixed_Cell ); procedure Flatten ( mixsub : in out Mixed_Subdivision ); end Flatten_Mixed_Subdivisions; SHAR_EOF fi # end of overwriting check if test -f 'frequency_graph.adb' then echo shar: will not over-write existing file "'frequency_graph.adb'" else cat << "SHAR_EOF" > 'frequency_graph.adb' package body Frequency_Graph is -- CREATORS : function Occurrences ( i : natural; l : List ) return natural is res : natural := 0; tmp : List := l; pt : Link_to_Vector; begin while not Is_Null(tmp) loop pt := Head_Of(tmp); if pt(i) /= 0 then res := res + 1; end if; tmp := Tail_Of(tmp); end loop; return res; end Occurrences; function Graph ( n : natural; supports : Array_of_Lists ) return matrix is res : matrix(1..n,supports'range); begin for i in 1..n loop for j in supports'range loop res(i,j) := Occurrences(i,supports(j)); end loop; end loop; return res; end Graph; -- MODIFIER : procedure Ignore ( m : in out matrix; point : in vector ) is begin for i in point'range loop if point(i) /= 0 then for j in m'range(2) loop m(i,j) := 1; end loop; end if; end loop; end Ignore; -- SELECTORS : function Occurrence ( i : natural; m : matrix ) return natural is res : natural := 0; begin for j in m'range(2) loop if m(i,j) /= 0 then res := res + 1; end if; end loop; return res; end Occurrence; function Occurrence ( i : natural; m : matrix; col : natural; perm : vector ) return natural is res : natural := 0; begin for j in col+1..m'last(2) loop if m(i,perm(j)) /= 0 then res := res + 1; end if; end loop; return res; end Occurrence; function Occurrence ( v : vector; m : matrix ) return natural is min : natural := 1000000; occ : natural; begin for i in v'range loop if v(i) /= 0 then occ := Occurrence(i,m); if occ < min then min := occ; end if; end if; end loop; return min; end Occurrence; function Occurrence ( v : vector; m : matrix; col : natural; perm : vector ) return natural is min : natural := 1000000; occ : natural; begin for i in v'range loop if v(i) /= 0 then occ := Occurrence(i,m,col,perm); if occ < min then min := occ; end if; end if; end loop; return min; end Occurrence; function Lowest_Occurrence ( vec : Integer_Vectors_of_Vectors.Vector; start : natural; m : matrix ) return natural is res : natural := start; min : natural := Occurrence(vec(start).all,m); occ : natural; begin for i in start+1..vec'last loop occ := Occurrence(vec(i).all,m); if occ < min then min := occ; res := i; end if; end loop; return res; end Lowest_Occurrence; function Lowest_Occurrence ( vec : Integer_Vectors_of_Vectors.Vector; start : natural; m : matrix; col : natural; perm : vector ) return natural is res : natural := start; min : natural := Occurrence(vec(start).all,m,col,perm); occ : natural; begin for i in start+1..vec'last loop occ := Occurrence(vec(i).all,m,col,perm); if occ < min then min := occ; res := i; end if; end loop; return res; end Lowest_Occurrence; -- CONSTRUCTORS : function Sort ( l : List; m : matrix ) return List is res : List; vec : Integer_Vectors_of_Vectors.Vector(1..Length_Of(l)) := Deep_Create(l); tmp : Link_to_Vector; low : natural; begin if Length_Of(l) <= 1 then Copy(l,res); else for i in vec'first..vec'last-1 loop low := Lowest_Occurrence(vec,i,m); if low /= i then tmp := vec(i); vec(i) := vec(low); vec(low) := tmp; end if; end loop; res := Deep_Create(vec); Integer_Vectors_of_Vectors.Clear(vec); end if; return res; end Sort; procedure Sort ( l : in out List; m : in matrix ) is res : List := Sort(l,m); begin Copy(res,l); Deep_Clear(res); end Sort; function Sort ( l : List; m : matrix; col : natural; perm : vector ) return List is res : List; vec : Integer_Vectors_of_Vectors.Vector(1..Length_Of(l)) := Deep_Create(l); tmp : Link_to_Vector; low : natural; begin if Length_Of(l) <= 1 then Copy(l,res); else for i in vec'first..vec'last-1 loop low := Lowest_Occurrence(vec,i,m,col,perm); if low /= i then tmp := vec(i); vec(i) := vec(low); vec(low) := tmp; end if; end loop; res := Deep_Create(vec); Integer_Vectors_of_Vectors.Clear(vec); end if; return res; end Sort; procedure Sort ( l : in out List; m : in matrix; col : in natural; perm : in vector ) is res : List := Sort(l,m,col,perm); begin Copy(res,l); Deep_Clear(res); end Sort; end Frequency_Graph; SHAR_EOF fi # end of overwriting check if test -f 'frequency_graph.ads' then echo shar: will not over-write existing file "'frequency_graph.ads'" else cat << "SHAR_EOF" > 'frequency_graph.ads' with Integer_Vectors; use Integer_Vectors; with Integer_Vectors_of_Vectors; with Integer_Matrices; use Integer_Matrices; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; package Frequency_Graph is -- DESCRIPTION : -- This package allows to compute the frequency of a vector w.r.t. -- a tuple of point sets. -- CREATORS : function Occurrences ( i : natural; l : List ) return natural; -- DESCRIPTION : -- Returns the number of times the ith component of vectors in l -- differs from zero. function Graph ( n : natural; supports : Array_of_Lists ) return matrix; -- DESCRIPTION : -- Computes the graph wich represents the occurencies of each variable -- in each support. In particular, if Graph(i,j) = 0, then the ith -- unknown does not occur in the jth support, else the number of -- occurrences in different vectors is given. -- MODIFIER : procedure Ignore ( m : in out matrix; point : in vector ); -- DESCRIPTION : -- For each component i of the point, for which point(i) /= 0, -- the element m(i,j) := 1, for all j in m'range(2). -- This is to ignore the occurrences of the ith unknown and to give -- priority to those unknowns that have not been chosen yet. -- SELECTORS : function Occurrence ( i : natural; m : matrix ) return natural; function Occurrence ( i : natural; m : matrix; col : natural; perm : vector ) return natural; -- DESCRIPTION : -- Returns the number of nonzero columns of ith row of m. -- The second function does not consider a number of columns -- equal to col and applies Occurrence to the columns -- perm(j) for j in col+1..m'last(2). function Occurrence ( v : vector; m : matrix ) return natural; function Occurrence ( v : vector; m : matrix; col : natural; perm : vector ) return natural; -- DESCRIPTION : -- Returns the minimal Occurrence(i,m), for all i, for which v(i) /= 0. -- The second function does not consider a number of columns -- equal to col and applies Occurrence to the columns -- perm(j) for j in col+1..m'last(2). function Lowest_Occurrence ( vec : Integer_Vectors_of_Vectors.Vector; start : natural; m : matrix ) return natural; function Lowest_Occurrence ( vec : Integer_Vectors_of_Vectors.Vector; start : natural; m : matrix; col : natural; perm : vector ) return natural; -- DESCRIPTION : -- Returns the index of the vector with lowest occurrence in -- vec(start..vec'last). -- The second function does not consider a number of columns -- equal to col and applies Lowest_Occurrence to the columns -- perm(j) for j in col+1..m'last(2). -- CONSTRUCTORS : function Sort ( l : List; m : matrix ) return List; procedure Sort ( l : in out List; m : in matrix ); -- DESCRIPTION : -- Sorts the points in the list l, so that on return, -- the points are ordered, from low to high occurrence. function Sort ( l : List; m : matrix; col : natural; perm : vector ) return List; procedure Sort ( l : in out List; m : in matrix; col : in natural; perm : in vector ); -- DESCRIPTION : -- Sorts the points in the list l, so that on return, -- the points are ordered, from low to high occurrence. -- Only the columns perm(j), for j in col+1..m'last(2) will be -- considered when computing the occurrences. end Frequency_Graph; SHAR_EOF fi # end of overwriting check if test -f 'global_dynamic_triangulation.adb' then echo shar: will not over-write existing file "'global_dynamic_triangulation.adb'" else cat << "SHAR_EOF" > 'global_dynamic_triangulation.adb' with Integer_Matrices; use Integer_Matrices; with Integer_Linear_System_Solvers; use Integer_Linear_System_Solvers; with Integer_Vectors_of_Vectors; with Random_Number_Generators; use Random_Number_Generators; with Vertices; package body Global_Dynamic_Triangulation is function Ordered_Initial_Simplex ( n : in natural; pts : in List ) return List is -- DESCRIPTION : -- The given list pts has at least n+1 points. -- The order of the points should be taken into account when -- constructing the initial cell. -- Returns the list of points which span the initial simplex. -- ALGORITHM : -- Determines the rank of the matrix, defined by the first n+1 points. -- If necessary, more extremal points will be sought. tmp,res,res_last : List; mat : matrix(1..n,1..n); sh,pt : Link_to_Vector; rnk : natural; begin sh := Head_Of(pts); tmp := Tail_Of(pts); for i in 1..n loop pt := Head_Of(tmp); for j in pt'range loop mat(i,j) := pt(j) - sh(j); end loop; tmp := Tail_Of(tmp); end loop; rnk := Rank(mat); if rnk = n then tmp := pts; for i in 1..n+1 loop pt := Head_Of(tmp); Append(res,res_last,pt.all); tmp := Tail_Of(tmp); end loop; end if; return res; end Ordered_Initial_Simplex; procedure Initial_Simplex ( pts : in List; order : in boolean; s : out Simplex; rest : in out List ) is n : natural; res,tmp,rest_last : List; pt : Link_to_Vector; begin if Is_Null(pts) then s := Null_Simplex; else n := Head_Of(pts)'last; if Length_Of(pts) < n+1 then s := Null_Simplex; else if order then res := Ordered_Initial_Simplex(n,pts); if Is_Null(res) then res := Vertices.Extremal_Points(n,pts); end if; else res := Vertices.Extremal_Points(n,pts); end if; if Length_Of(res) = n+1 then declare points : Integer_Vectors_of_Vectors.Vector(1..n+1); begin tmp := res; for k in points'range loop pt := Head_Of(tmp); points(k) := new vector(1..n+1); points(k)(1..n) := pt.all; points(k)(n+1) := 0; tmp := Tail_Of(tmp); end loop; s := Create(points); end; -- construct the list with the rest of the points : tmp := pts; while not Is_Null(tmp) loop pt := Head_Of(tmp); if not Is_In(res,pt.all) then Append(rest,rest_last,pt.all); end if; tmp := Tail_Of(tmp); end loop; else s := Null_Simplex; end if; Deep_Clear(res); end if; end if; end Initial_Simplex; -- COMPUTING AN EXTREMAL POINT : function Max_Extreme ( l : List; k : natural ) return Link_to_Vector is res : Link_to_Vector := Head_Of(l); mx : integer := res(k); tmp : List := Tail_Of(l); pt : Link_to_Vector; begin while not Is_Null(tmp) loop pt := Head_Of(tmp); if pt(k) > mx then mx := pt(k); res := pt; end if; tmp := Tail_Of(tmp); end loop; return res; end Max_Extreme; function Max_Extreme ( l : List; weights : vector ) return Link_to_Vector is res : Link_to_Vector := Head_Of(l); tmp : List := Tail_Of(l); mxs : integer := res.all*weights; sp : integer; pt : Link_to_Vector; begin while not Is_Null(tmp) loop pt := Head_Of(tmp); sp := pt.all*weights; if sp > mxs then mxs := sp; res := pt; end if; tmp := Tail_Of(tmp); end loop; return res; end Max_Extreme; function Max_Extreme ( l : List; n : natural; low,upp : integer ) return Link_to_Vector is w : Vector(1..n); begin for k in w'range loop w(k) := Random(low,upp); end loop; return Max_Extreme(l,w); end Max_Extreme; end Global_Dynamic_Triangulation; SHAR_EOF fi # end of overwriting check if test -f 'global_dynamic_triangulation.ads' then echo shar: will not over-write existing file "'global_dynamic_triangulation.ads'" else cat << "SHAR_EOF" > 'global_dynamic_triangulation.ads' with Integer_Vectors,Simplices; use Integer_Vectors,Simplices; with Triangulations; use Triangulations; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; package Global_Dynamic_Triangulation is -- DESCRIPTION : -- This package contains some global aspects of the dynamic lifting -- algorithm applied to the unmixed case. procedure Initial_Simplex ( pts : in List; order : in boolean; s : out Simplex; rest : in out List ); -- DESCRIPTION : -- Searches for an initial simplex of the triangulation of the -- list of points pts. -- ON ENTRY : -- pts a list of integer vectors; -- order if true, then the first n+1 points of the list will be -- considered first for the construction of the initial cell. -- ON RETURN : -- s an initial simplex, if Volume(s) = 0, then Volume(pts) = 0, -- the lifting values of the initial cell are all zero; -- rest the rest of the points: pts - s. function Max_Extreme ( l : List; k : natural ) return Link_to_Vector; -- DESCRIPTION : -- Returns the vector in the list l with the maximal kth component. function Max_Extreme ( l : List; weights : vector ) return Link_to_Vector; -- DESCRIPTION : -- Return the element in l for which the weighted sum is maximal. function Max_Extreme ( l : List; n : natural; low,upp : integer ) return Link_to_Vector; -- DESCRIPTION : -- Generates first a vector with n random weights, in between low and upp, -- and gives the maximal extreme w.r.t. this weighted sum. end Global_Dynamic_Triangulation; SHAR_EOF fi # end of overwriting check if test -f 'initial_mixed_cell.adb' then echo shar: will not over-write existing file "'initial_mixed_cell.adb'" else cat << "SHAR_EOF" > 'initial_mixed_cell.adb' with Integer_Vectors_of_Vectors; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Transforming_Integer_Vector_Lists; use Transforming_Integer_Vector_Lists; with Vertices; use Vertices; with Integer_Matrices; use Integer_Matrices; with Integer_Linear_System_Solvers; use Integer_Linear_System_Solvers; with Frequency_Graph; use Frequency_Graph; --with text_io,integer_io; use text_io,integer_io; --with Integer_Vectors_io; use Integer_Vectors_io; --with Integer_Matrices_io; use Integer_Matrices_io; --with Lists_of_Integer_Vectors_io; use Lists_of_Integer_Vectors_io; --with Arrays_of_Integer_Vector_Lists_io; use Arrays_of_Integer_Vector_Lists_io; procedure Initial_Mixed_Cell ( n : in natural; mix : in Vector; pts : in Array_of_Lists; mic : out Mixed_Cell; rest : in out Array_of_Lists ) is res : Mixed_Cell; acc,tmp,rest_last : List; pt : Link_to_Vector; expts : Array_of_Lists(pts'range); perm : Vector(pts'range); mind,minl,dims,lent,index : integer; nullvec : constant Vector := (1..n => 0); shiftvecs : Integer_Vectors_of_Vectors.vector(pts'range); grap : matrix(1..n,pts'range); fail : boolean := false; rowcnt,cnt : natural := 0; mat : matrix(1..n,1..n+1); ipvt : vector(1..n+1); -- AUXILIAIRIES procedure Add ( pt,shift : in Vector; l : in out List ) is newpt : Link_to_Vector := new Vector'(pt); begin Plus_Vector(newpt.all,shift); Construct(newpt,l); end Add; procedure Add ( pt : in Vector; l : in out List ) is newpt : Link_to_Vector := new Vector'(pt); begin Construct(newpt,l); end Add; procedure Fill ( l : in List; rowcnt : in out natural; m : in out matrix ) is -- DESCRIPTION : -- Fills the matrix with the elements in l. -- ON ENTRY : -- l list of point vectors; -- rowcnt m(m'first(1)..rowcnt) is already defined; -- m matrix with m'range(2) = range of points in l. -- rowcnt updated row counter; -- m matrix with the nonzero points of l tmp : List := l; pt : Link_to_Vector; begin while not Is_Null(tmp) loop pt := Head_Of(tmp); declare nullvec : constant vector(pt'range) := (pt'range => 0); begin if pt.all /= nullvec then rowcnt := rowcnt + 1; for k in pt'range loop m(rowcnt,k) := pt(k); end loop; end if; tmp := Tail_Of(tmp); end; end loop; end Fill; procedure Initialize ( l : in List; rowcnt : out natural; m : in out matrix; ipvt : in out vector ) is -- DESCRIPTION : -- Given a list of linearly independent points, eventually with -- 0 in l, a matrix will be constructed which contains these points -- in upper triangular form. cnt : natural := 0; piv : natural; begin Fill(l,cnt,m); for i in 1..cnt loop m(i,m'last(2)) := i; end loop; for k in 1..cnt loop Triangulate(k,m,ipvt,piv); end loop; rowcnt := cnt; end Initialize; procedure Linearly_Independent ( m : in out matrix; rowcnt : in natural; ipvt : in vector; l : in List; len : out natural; indep,indep_last : out List ) is -- DESCRIPTION : -- Computes the list of points which are linearly independent w.r.t. -- the matrix m. -- ON ENTRY : -- m m(1..rowcnt,m'range(2)) is upper triangular, -- can be used as work space; -- rowcnt counter for the number of rows in m: -- ipvt vector with the pivoting information; -- l list of points to consider. -- ON RETURN : -- len length of the list indep; -- indep the list of linearly independent points; -- indep_last pointer to the last element of indep. tmp,res,res_last : List; pt : Link_to_Vector; wipvt : Vector(ipvt'range) := ipvt; piv,cnt : natural; begin if rowcnt < m'last(2) then tmp := l; cnt := 0; while not Is_Null(tmp) loop pt := Head_Of(tmp); for i in pt'range loop m(rowcnt+1,i) := pt(i); end loop; m(rowcnt+1,m'last(2)) := rowcnt+1; Triangulate(rowcnt+1,m,wipvt,piv); if m(rowcnt+1,rowcnt+1) /= 0 then cnt := cnt + 1; Append(res,res_last,pt.all); end if; wipvt := ipvt; tmp := Tail_Of(tmp); end loop; end if; len := cnt; indep := res; indep_last := res_last; end Linearly_Independent; procedure Construct_Basis ( l : in List; rowcnt : in out natural; m : in out matrix; ipvt : in out vector ) is -- DESCRIPTION : -- Constructs a triangular basis for the vectors in l. -- REQUIRED : dimensions of the vectors must match. -- ON ENTRY : -- l list of vector; -- m triangular basis, stored in the rows of the matrix; -- rowcnt index to the last significant row in m, could be 0, -- when there is no initial basis to take into account; -- ipvt initial pivoting vector, must be equal to the identity -- permutation vector, when rowcnt = 0. -- ON RETURN : -- m triangular basis, stored in the rows of the matrix; -- rowcnt index to the last significant row in m; -- ipvt contains pivoting information. tmp : List := l; wipvt : vector(ipvt'range); pt : Link_to_Vector; piv : natural; begin while not Is_Null(tmp) loop pt := Head_Of(tmp); for i in pt'range loop m(rowcnt+1,i) := pt(i); end loop; wipvt := ipvt; m(rowcnt+1,m'last(2)) := rowcnt+1; Triangulate(rowcnt+1,m,wipvt,piv); if m(rowcnt+1,rowcnt+1) /= 0 then rowcnt := rowcnt + 1; ipvt := wipvt; end if; exit when (rowcnt >= m'last(2)); tmp := Tail_Of(tmp); end loop; end Construct_Basis; function Linearly_Independent ( l : List; x : vector ) return boolean is -- DESCRIPTION : -- Returns true if the given vector x is linearly independent w.r.t. -- the vectors in l. basis : matrix(1..Length_Of(l)+1,x'first..x'last+1); ipvt : vector(basis'range(2)); rowcnt : natural := 0; piv : natural; begin for i in ipvt'range loop ipvt(i) := i; for j in basis'range(1) loop basis(j,i) := 0; end loop; end loop; Construct_Basis(l,rowcnt,basis,ipvt); for i in x'range loop basis(rowcnt+1,i) := x(i); end loop; basis(rowcnt+1,basis'last(2)) := rowcnt+1; Triangulate(rowcnt+1,basis,ipvt,piv); return (basis(rowcnt+1,rowcnt+1) /= 0); end Linearly_Independent; procedure Linearly_Independent ( l,xl : in List; indep,indep_last : in out List ) is -- DESCRIPTION : -- Returns those points in xl that are linearly independent from the -- points in l. begin if not Is_Null(xl) then declare x : Link_to_Vector := Head_Of(xl); basis : matrix(1..Length_Of(l)+1,x'first..x'last+1); ipvt : vector(basis'range(2)); rowcnt,len : natural := 0; begin for i in ipvt'range loop ipvt(i) := i; for j in basis'range(1) loop basis(j,i) := 0; end loop; end loop; Construct_Basis(l,rowcnt,basis,ipvt); Linearly_Independent(basis,rowcnt,ipvt,xl,len,indep,indep_last); end; end if; end Linearly_Independent; function Construct_Rest ( l : Array_of_Lists; start : natural ) return List is -- DESCRIPTION : -- Collects all remaining points of l(i) into one single list, -- for i in start..l'last. tmp,res,res_last : List; pt : Link_to_Vector; begin for i in start..l'last loop tmp := l(i); while not Is_Null(tmp) loop pt := Head_Of(tmp); if not Is_In(res,pt) then Append(res,res_last,pt.all); end if; tmp := Tail_Of(tmp); end loop; end loop; return res; end Construct_Rest; procedure Sort_Co_Linearly_Independent ( l : in out List; al : in Array_of_Lists; start : in natural ) is -- DESCRIPTION : -- Sorts the points in l, by putting those points that are linearly -- independent w.r.t. the rest of the poins in al, in front of the list. rest : List := Construct_Rest(al,start); tmp,indep,indep_last : List; pt : Link_to_Vector; begin -- put_line("The set of points in al just after Construct_Rest :"); put(al); -- put_line("The rest of the points : "); put(rest); Linearly_Independent(rest,l,indep,indep_last); if Is_Null(indep) then null; -- nothing to put in front of l else tmp := l; -- append the other points of l to indep -- put_line("Linearly co-independent points : "); put(indep); -- put_line(" w.r.t. the rest : "); put(rest); while not Is_Null(tmp) loop pt := Head_Of(tmp); if not Is_In(indep,pt) then Append(indep,indep_last,pt.all); end if; tmp := Tail_Of(tmp); end loop; Copy(indep,l); Deep_Clear(indep); end if; Deep_Clear(rest); -- put_line("The list of points in al after Sort_Co : "); put(al); end Sort_Co_Linearly_Independent; procedure Incremental_Dimension ( m : in out matrix; rowcnt : in natural; ipvt : in vector; l : in List; dim : out natural ) is -- DESCRIPTION : -- Computes the number of points which are linearly independent w.r.t. -- the matrix m. -- ON ENTRY : -- m m(1..rowcnt,m'range(2)) is upper triangular, -- can be used as work space; -- rowcnt counter for the number of rows in m: -- ipvt vector with the pivoting information; -- l list of points to consider. -- ON RETURN : -- dim the number of linearly independent points. tmp : List; pt : Link_to_Vector; cnt,piv : natural; newipvt,wipvt : Vector(ipvt'range); begin wipvt := ipvt; newipvt := ipvt; tmp := l; cnt := 0; while not Is_Null(tmp) loop pt := Head_Of(tmp); cnt := cnt + 1; for i in pt'range loop m(rowcnt+cnt,i) := pt(i); end loop; m(rowcnt+cnt,m'last(2)) := rowcnt+cnt; Triangulate(rowcnt+cnt,m,newipvt,piv); if m(rowcnt+cnt,rowcnt+cnt) /= 0 then wipvt := newipvt; else newipvt := wipvt; cnt := cnt - 1; end if; tmp := Tail_Of(tmp); exit when ((rowcnt + cnt) >= m'last(1)); end loop; dim := cnt; end Incremental_Dimension; procedure Incremental_Dimension ( m : in out matrix; rowcnt : in natural; ipvt : in vector; l : in out List; dim,len : out natural ) is -- DESCRIPTION : -- Computes the increase in dimension by considering the points -- in the list l, w.r.t. the matrix m. -- ON ENTRY : -- m m(1..rowcnt,m'range(2)) is upper triangular, -- rowcnt counter for the number of rows in m: -- ipvt vector with the pivoting information; -- l list of points to consider. -- ON RETURN : -- l list of linearly independent points w.r.t. m; -- dim increase in dimension; -- len length of the list of linearly independent points -- w.r.t. the rows in the matrix m. -- ALGORITHM : -- works in two stages: -- 1. determination of all linearly independent points; -- 2. determination of the dimension. workm : matrix(m'range(1),m'range(2)); indep,indep_last : List; begin -- Initialize workm : -- put_line("The list to investigate : "); put(l); for i in 1..rowcnt loop for j in m'range(2) loop workm(i,j) := m(i,j); end loop; end loop; -- Determine linearly independent points : Linearly_Independent(workm,rowcnt,ipvt,l,len,indep,indep_last); -- Determine the incremental dimension : Incremental_Dimension(workm,rowcnt,ipvt,indep,dim); Copy(indep,l); Deep_Clear(indep); end Incremental_Dimension; procedure Next_Point ( acc,l : in List; pt : out Link_to_Vector; fail : out boolean; rowcnt : in out natural; m : in out matrix; ipvt : in out Vector ) is -- DESCRIPTION : -- A new point out of l, not in the list acc will be chosen. -- The point pt has to be linearly independent from the other, -- already chosen points. Therefore, the upper triangular matrix m -- will be used and properly updated. res : Link_to_Vector; tmp : List := l; newipvt : vector(ipvt'range) := ipvt; done : boolean := false; piv : natural; begin while not Is_Null(tmp) loop res := Head_Of(tmp); if not Is_In(acc,res) then --put("Checking point "); put(res); new_line; rowcnt := rowcnt + 1; for i in res'range loop m(rowcnt,i) := res(i); end loop; m(rowcnt,m'last(2)) := rowcnt; Triangulate(rowcnt,m,newipvt,piv); if m(rowcnt,rowcnt) = 0 then rowcnt := rowcnt - 1; newipvt := ipvt; else ipvt := newipvt; pt := res; done := true; end if; end if; exit when done; tmp := Tail_Of(tmp); end loop; fail := not done; end Next_Point; begin -- INITIALIZE : compute for each list the basis points res.nor := new Vector'(1..n+1 => 0); res.nor(n+1) := 1; res.pts := new Array_of_Lists(mix'range); for i in pts'range loop expts(i) := Max_Extremal_Points(n,pts(i)); perm(i) := i; -- put("Extremal points for component "); put(i,1); put_line(" :"); -- put(expts(i)); end loop; -- INITIALIZE : order the lists according to occurencies grap := Graph(n,expts); -- put_line("The graph matrix of the extremal points : "); put(grap); for i in expts'range loop Sort(expts(i),grap); -- put("Ordered extremal points for component "); put(i,1); put_line(" :"); -- put(expts(i)); end loop; -- INITIALIZE : choose one anchor point for each component, -- shift when necessary : for i in expts'range loop if Is_In(pts(i),nullvec) then Add(nullvec,res.pts(i)); shiftvecs(i) := null; else -- ADD LAST POINT = LEAST IMPORTANT tmp := expts(i); if not Is_Null(tmp) then while not Is_Null(Tail_Of(tmp)) loop tmp := Tail_Of(tmp); end loop; pt := Head_Of(tmp); Add(pt.all,res.pts(i)); shiftvecs(i) := new vector'(pt.all); -- put("The shift vector : "); put(shiftvecs(i)); new_line; Shift(expts(i),shiftvecs(i)); -- put_line("The shifted list of points : "); put(expts(i)); end if; end if; end loop; -- INITIALIZE : intermediate data structures mat and ipvt : for i in ipvt'range loop ipvt(i) := i; end loop; for i in mat'range(1) loop for j in mat'range(2) loop mat(i,j) := 0; end loop; end loop; rowcnt := 0; -- COMPUTE CELL : based on lists with extremal points for i in expts'range loop -- MAIN LOOP -- LOOK FOR SMALLEST SET : index := i; if i = 1 then mind := Length_Of(expts(i))-1; for j in i+1..expts'last loop dims := Length_Of(expts(j))-1; if dims < mind then index := j; mind := dims; end if; end loop; else --put("Calling Incremental_Dimension for i = "); put(i,1); new_line; Incremental_Dimension(mat,rowcnt,ipvt,expts(i),mind,minl); --put(" dimension : "); put(mind,1); --put(" length : " ); put(minl,1); new_line; for j in i+1..expts'last loop --put("Calling Incremental_Dimension for j = "); put(j,1); new_line; Incremental_Dimension(mat,rowcnt,ipvt,expts(j),dims,lent); --put(" dimension : "); put(dims,1); --put(" length : " ); put(lent,1); new_line; if (dims < mind) or else ((dims = mind) and then (lent < minl)) then index := j; mind := dims; minl := lent; end if; end loop; end if; -- put("The index : "); put(index,1); new_line; -- put(" with minimal dimension : "); put(mind,1); new_line; -- put("perm before permute : "); put(perm); new_line; if index /= i then tmp := expts(index); expts(index) := expts(i); expts(i) := tmp; mind := perm(i); perm(i) := perm(index); perm(index) := mind; end if; -- SORT ACCORDING TO OCCURRENCIES AND TO CO-LINEARLY : Sort(expts(i),grap,i-1,perm); -- put_line("After first ordering : "); put(expts(i)); Sort_Co_Linearly_Independent(expts(i),expts,i+1); -- put_line("The ordered list : "); put(expts(i)); -- put("perm after permute : "); put(perm); new_line; -- CHOOSE THE POINTS : if i = 1 then Add(nullvec,acc); tmp := expts(i); for j in 1..mix(perm(i)) loop pt := Head_Of(tmp); if pt.all = nullvec -- skip the null vector then tmp := Tail_Of(tmp); if not Is_Null(tmp) then pt := Head_Of(tmp); end if; end if; exit when Is_Null(tmp); Add(pt.all,acc); -- put_line("frequency graph before ignore :"); put(grap); Ignore(grap,pt.all); -- put_line("frequency graph after ignore :"); put(grap); if shiftvecs(perm(i)) /= null then Add(pt.all,shiftvecs(perm(i)).all,res.pts(perm(i))); else Add(pt.all,res.pts(perm(i))); end if; tmp := Tail_Of(tmp); exit when Is_Null(tmp); end loop; cnt := Length_Of(acc); Initialize(acc,rowcnt,mat,ipvt); -- put_line("The list acc : "); put(acc); -- put_line("The matrix mat : "); put(mat,1,rowcnt); -- put_line("The vector ipvt : "); put(ipvt); new_line; fail := (cnt <= mix(perm(i))); else for j in 1..mix(perm(i)) loop Next_Point(acc,expts(i),pt,fail,rowcnt,mat,ipvt); if not fail then if shiftvecs(perm(i)) /= null then Add(pt.all,shiftvecs(perm(i)).all,res.pts(perm(i))); else Add(pt.all,res.pts(perm(i))); end if; Add(pt.all,acc); cnt := cnt + 1; -- put_line("frequency graph before ignore :"); put(grap); Ignore(grap,pt.all); -- put_line("frequency graph after ignore :"); put(grap); end if; exit when fail; end loop; -- put_line("The list acc : "); put(acc); -- put_line("The matrix mat : "); put(mat,1,rowcnt); -- put_line("The vector ipvt : "); put(ipvt); new_line; fail := (Length_Of(res.pts(perm(i))) <= mix(perm(i))); end if; exit when fail; end loop; -- END OF MAIN LOOP Deep_Clear(acc); -- COMPUTE THE REST OF THE POINT LISTS : if not fail then for i in pts'range loop tmp := pts(i); rest_last := rest(i); while not Is_Null(tmp) loop pt := Head_Of(tmp); if not Is_In(res.pts(i),pt) then Append(rest(i),rest_last,pt); end if; tmp := Tail_Of(tmp); end loop; end loop; end if; -- GIVE THE POINTS IN THE INITIAL SIMPLEX LIFTING VALUE 0 : for i in res.pts'range loop tmp := res.pts(i); while not Is_Null(tmp) loop pt := Head_Of(tmp); declare lpt : Link_to_Vector; begin lpt := new Vector(1..n+1); lpt(pt'range) := pt.all; lpt(n+1) := 0; Set_Head(tmp,lpt); end; tmp := Tail_Of(tmp); end loop; end loop; mic := res; end Initial_Mixed_Cell; SHAR_EOF fi # end of overwriting check if test -f 'initial_mixed_cell.ads' then echo shar: will not over-write existing file "'initial_mixed_cell.ads'" else cat << "SHAR_EOF" > 'initial_mixed_cell.ads' with Integer_Vectors; use Integer_Vectors; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Integer_Mixed_Subdivisions; use Integer_Mixed_Subdivisions; procedure Initial_Mixed_Cell ( n : in natural; mix : in Vector; pts : in Array_of_Lists; mic : out Mixed_Cell; rest : in out Array_of_Lists ); -- DESCRIPTION : -- Computes an initial mixed cell for the supports in pts. -- The lifting for this initial cell equals zero. -- RECOMMENDED : -- The list pts consists solely out of vertex points. -- ON ENTRY : -- n the length of the points in pts; -- mix type of mixture; -- pts the supports, pts'range = mixture'range. -- ON RETURN : -- mic an initial mixed cell, with lifting zero, -- if Mixed_Volume(s) = 0, then Mixed_Volume(pts) = 0; -- rest the rest of the supports: pts - s. SHAR_EOF fi # end of overwriting check if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' # Establishing the links : linkrc = ../../../Ada/Root_Counts/Dynlift links: @-ln -s $(linkrc)/babldmvc.a babldmvc.ads @-ln -s $(linkrc)/babldmvcB.a babldmvc.adb @-ln -s $(linkrc)/blackmvc.a black_box_mixed_volume_computations.ads @-ln -s $(linkrc)/blackmvcB.a black_box_mixed_volume_computations.adb @-ln -s $(linkrc)/cayemb.a cayley_embedding.ads @-ln -s $(linkrc)/cayembB.a cayley_embedding.adb @-ln -s $(linkrc)/cayley.a cayley_trick.ads @-ln -s $(linkrc)/cayleyB.a cayley_trick.adb @-ln -s $(linkrc)/commfaces.a common_faces_of_polytope.ads @-ln -s $(linkrc)/commfacesB.a common_faces_of_polytope.adb @-ln -s $(linkrc)/drivdynl.a drivers_for_dynamic_lifting.ads @-ln -s $(linkrc)/drivdynlB.a drivers_for_dynamic_lifting.adb @-ln -s $(linkrc)/drivmink.a driver_for_minkowski_polynomials.ads @-ln -s $(linkrc)/drivminkB.a driver_for_minkowski_polynomials.adb @-ln -s $(linkrc)/dbkkcomp.a dynamic_bkk_bound_computations.ads @-ln -s $(linkrc)/dbkkcompB.a dynamic_bkk_bound_computations.adb @-ln -s $(linkrc)/dynlift.a dynamic_lifting_functions.ads @-ln -s $(linkrc)/dynliftB.a dynamic_lifting_functions.adb @-ln -s $(linkrc)/dymisudi.a dynamic_mixed_subdivisions.ads @-ln -s $(linkrc)/dymisudiB.a dynamic_mixed_subdivisions.adb @-ln -s $(linkrc)/dynpolco.a dynamic_polyhedral_continuation.ads @-ln -s $(linkrc)/dynpolcoB.a dynamic_polyhedral_continuation.adb @-ln -s $(linkrc)/dyntri.a dynamic_triangulations.ads @-ln -s $(linkrc)/dyntriB.a dynamic_triangulations.adb @-ln -s $(linkrc)/enumfaces.a enumerate_faces_of_polytope.ads @-ln -s $(linkrc)/enumfacesB.a enumerate_faces_of_polytope.adb @-ln -s $(linkrc)/flatmisu.a flatten_mixed_subdivisions.ads @-ln -s $(linkrc)/flatmisuB.a flatten_mixed_subdivisions.adb @-ln -s $(linkrc)/freqgraph.a frequency_graph.ads @-ln -s $(linkrc)/freqgraphB.a frequency_graph.adb @-ln -s $(linkrc)/glodyntri.a global_dynamic_triangulation.ads @-ln -s $(linkrc)/glodyntriB.a global_dynamic_triangulation.adb @-ln -s $(linkrc)/initmice.a initial_mixed_cell.ads @-ln -s $(linkrc)/initmiceB.a initial_mixed_cell.adb @-ln -s $(linkrc)/minkpoly.a minkowski_polynomials.ads @-ln -s $(linkrc)/minkpolyB.a minkowski_polynomials.adb @-ln -s $(linkrc)/simplex.a simplices.ads @-ln -s $(linkrc)/simplexB.a simplices.adb @-ln -s $(linkrc)/simplex_io.a simplices_io.ads @-ln -s $(linkrc)/simplex_ioB.a simplices_io.adb @-ln -s $(linkrc)/triangle.a triangulations.ads @-ln -s $(linkrc)/triangleB.a triangulations.adb @-ln -s $(linkrc)/triamisu.a triangulations_and_subdivisions.ads @-ln -s $(linkrc)/triamisuB.a triangulations_and_subdivisions.adb @-ln -s $(linkrc)/triangle_io.a triangulations_io.ads @-ln -s $(linkrc)/triangle_ioB.a triangulations_io.adb @-ln -s $(linkrc)/unfolding.a unfolding_subdivisions.ads @-ln -s $(linkrc)/unfoldingB.a unfolding_subdivisions.adb SHAR_EOF fi # end of overwriting check if test -f 'minkowski_polynomials.adb' then echo shar: will not over-write existing file "'minkowski_polynomials.adb'" else cat << "SHAR_EOF" > 'minkowski_polynomials.adb' with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Numbers; use Complex_Numbers; with Natural_Vectors; with Cayley_Embedding; use Cayley_Embedding; with Mixed_Volume_Computation; use Mixed_Volume_Computation; package body Minkowski_Polynomials is function Minkowski_Polynomial ( n,r : natural ) return Poly is res : Poly := Null_Poly; acc : Degrees := new Natural_Vectors.Vector'(1..r => 0); procedure Generate_Monomials ( k,sum : in natural; deg : in out Degrees ) is -- DESCRIPTION : -- Generates all exponent vectors whose sum equals n. t : Term; begin if k = r then t.cf := CMPLX(1.0); deg(r) := n-sum; t.dg := deg; Plus_Term(res,t); else for i in 0..(n-sum) loop deg(k) := i; Generate_Monomials(k+1,sum+i,deg); end loop; end if; end Generate_Monomials; begin Generate_Monomials(1,0,acc); Natural_Vectors.Clear(Natural_Vectors.Link_to_Vector(acc)); return res; end Minkowski_Polynomial; function Convert ( dg : Degrees ) return Integer_Vectors.Vector is -- DESCRIPTION : -- Converts the degrees vector to a vector with integer numbers. res : Integer_Vectors.Vector(dg'range); begin for i in res'range loop res(i) := dg(i); end loop; return res; end Convert; procedure Minkowski_Polynomial ( p : in out Poly; t : in Triangulation; n : in natural; mix : in Vector; mixsub : out Mixed_Subdivision ) is procedure Coefficient_Volume ( submix : in Vector; sub : in Mixed_Subdivision; vol : out natural ) is begin vol := Mixed_Volume(n,submix,sub); end Coefficient_Volume; procedure Coefficient_Volumes is new Minkowski_Polynomial_Subdivisions(Coefficient_Volume); begin Coefficient_Volumes(p,t,n,mix,mixsub); end Minkowski_Polynomial; procedure Minkowski_Polynomial_Subdivisions ( p : in out Poly; t : in Triangulation; n : in natural; mix : in Vector; mixsub : out Mixed_Subdivision ) is procedure Coefficient_Volume ( tt : in out Term; cont : out boolean ) is wrkmix : Vector(mix'range) := Convert(tt.dg); wrksub : Mixed_Subdivision := Extract_Mixed_Cells(n,wrkmix,t); vol : natural; begin Deflate(n,wrksub); Process(wrkmix,wrksub,vol); tt.cf := CMPLX(double_float(vol)); if wrkmix = mix then mixsub := wrksub; else Deep_Clear(wrksub); end if; cont := true; end Coefficient_Volume; procedure Coefficient_Volumes is new Changing_Iterator(Coefficient_Volume); begin Coefficient_Volumes(p); end Minkowski_Polynomial_Subdivisions; end Minkowski_Polynomials; SHAR_EOF fi # end of overwriting check if test -f 'minkowski_polynomials.ads' then echo shar: will not over-write existing file "'minkowski_polynomials.ads'" else cat << "SHAR_EOF" > 'minkowski_polynomials.ads' with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; with Integer_Vectors; use Integer_Vectors; with Triangulations; use Triangulations; with Integer_Mixed_Subdivisions; use Integer_Mixed_Subdivisions; package Minkowski_Polynomials is -- DESCRIPTION : -- This package allows the computation of the Minkowski-polynomial -- of a tuple of polytopes (P1,P2,..,Pr). This polynomial is the -- expansion of the volume of a positive linear combination of the -- polytopes in the tuple: vol_n(l1*P1 + l2*P2 + .. + lr*Pr), which -- is a homogeneous polynomial of degree n in the coefficients l1,l2,..,lr, -- according to Minkowski's theorem. function Minkowski_Polynomial ( n,r : natural ) return Poly; -- DESCRIPTION : -- Returns the structure of the Minkowski-polynomial, given the -- dimension and the number of different polytopes in the tuple. -- ON ENTRY : -- n dimension of the polytopes before lifting; -- r number of different polytopes in the tuple. -- ON RETURN : -- The structure of the Minkowski-polynomial, with all coefficients -- equal to one. procedure Minkowski_Polynomial ( p : in out Poly; t : in Triangulation; n : in natural; mix : in Vector; mixsub : out Mixed_Subdivision ); -- DESCRIPTION : -- Computes the coefficients of the Minkowski-polynomial, given its -- structure and based on the triangulation of the Cayley-polytope. -- On return, one also obtains the mixed subdivision, corresponding -- the given type of mixture. generic with procedure Process ( submix : in Vector; sub : in Mixed_Subdivision; vol : out natural ); procedure Minkowski_Polynomial_Subdivisions ( p : in out Poly; t : in Triangulation; n : in natural; mix : in Vector; mixsub : out Mixed_Subdivision ); -- DESCRIPTION : -- Computes the coefficients of the Minkowski-polynomial, given its -- structure and the triangulation of the Cayley polytope. -- The generic procedure returns the subdivision for a given type of -- mixture and asks to compute its volume. -- On return, one also obtains the mixed subdivision, corresponding -- the given type of mixture. end Minkowski_Polynomials; SHAR_EOF fi # end of overwriting check if test -f 'simplices.adb' then echo shar: will not over-write existing file "'simplices.adb'" else cat << "SHAR_EOF" > 'simplices.adb' with unchecked_deallocation; with Integer_Matrices,Transformations; use Integer_Matrices,Transformations; with Integer_Linear_System_Solvers; use Integer_Linear_System_Solvers; with Integer_Vectors_Utilities; use Integer_Vectors_Utilities; package body Simplices is -- DATA STRUCTURES : type Point is record pt : Link_to_Vector; -- the point si : Simplex; -- by pivoting a new simplex is obtained end record; type Points is array ( integer range <> ) of Point; type Simplex_Rep ( n : natural ) is record nor : vector(1..n); -- normal to the simplex tra : Transfo; -- transformation to triangulate the cell pts : points(1..n); -- vector of points end record; -- AUXILIAIRIES : function Diagonalize ( s : simplex ) return matrix is -- DESCRIPTION : -- Places the vertices of the simplex, shifted w.r.t. the first point, -- in a matrix. Returns the triangulated matrix. a : matrix(1..s.n-1,1..s.n-1); x,y : Vector(1..s.n-1); begin for k in 2..s.n loop x := s.pts(k).pt(x'range) - s.pts(1).pt(x'range); y := s.tra*x; for i in a'range(1) loop a(i,k-1) := y(i); end loop; end loop; return a; end Diagonalize; function Diagonalize ( s : simplex; pt : Vector ) return matrix is -- DESCRIPTION : -- Places the vertices of the simplex, shifted w.r.t. the first point, -- in a matrix. Returns the triangulated matrix. a : matrix(1..s.n-1,1..s.n); x,y : Vector(1..s.n-1); begin for k in 2..s.n loop x := s.pts(k).pt(x'range) - s.pts(1).pt(x'range); y := s.tra*x; for i in a'range(1) loop a(i,k-1) := y(i); end loop; end loop; x := pt(x'range) - s.pts(1).pt(x'range); y := s.tra*x; for i in a'range(1) loop a(i,s.n) := y(i); end loop; return a; end Diagonalize; function Create ( pts : Integer_Vectors_of_Vectors.Vector ) return Transfo is a,l : matrix(pts'first..pts'last-1,pts'first..pts'last-1); x : vector(pts(pts'first)'range); begin for k in pts'first+1..pts'last loop x := pts(k).all - pts(pts'first).all; for i in a'range(1) loop a(i,k-1) := x(i); end loop; end loop; Upper_Triangulate(l,a); return Create(l); end Create; function Create ( pts : Integer_Vectors_of_Vectors.Vector ) return Vector is a : matrix(pts'first..pts'last - 1,pts'range); res : Vector(pts'range); begin for k in a'range(1) loop for i in a'range(2) loop a(k,i) := pts(k+1)(i) - pts(pts'first)(i); end loop; end loop; Upper_Triangulate(a); Scale(a); res := (res'range => 0); Solve0(a,res); Normalize(res); if res(res'last) < 0 then return -res; else return res; end if; end Create; -- CREATORS : function Create ( x : Integer_Vectors_of_Vectors.Vector ) return Simplex is n : natural := x'last - x'first + 1; res : Simplex := new Simplex_Rep(n); cnt : natural := x'first; begin for k in res.pts'range loop res.pts(k).pt := x(cnt); cnt := cnt + 1; res.pts(k).si := Null_Simplex; end loop; res.tra := Create(x); res.nor := Create(x); return res; end Create; procedure Update ( s : in out Simplex; x : in Link_to_Vector; k : in natural ) is pts : Integer_Vectors_of_Vectors.Vector(1..s.n); nei : Simplex; begin if s.pts(k).si = Null_Simplex then for i in pts'range loop if i = k then pts(i) := x; else pts(i) := s.pts(i).pt; end if; end loop; nei := Create(pts); s.pts(k).si := nei; nei.pts(k).si := s; end if; end Update; procedure Update ( s : in out Simplex; x : in Link_to_Vector; pos : in Vector ) is begin for k in pos'first..pos'last-1 loop if pos(k)*pos(pos'last) > 0 then Update(s,x,k+1); end if; end loop; end Update; procedure Update_One ( s : in out Simplex; x : in Link_to_Vector; pos : in Vector ) is done : boolean := false; nei : Simplex; begin for k in pos'first..pos'last-1 loop if pos(k)*pos(pos'last) > 0 then nei := s.pts(k+1).si; if nei /= Null_Simplex then Update_One(nei,x,Position(nei,x.all)); else Update(s,x,k+1); end if; done := true; end if; exit when done; end loop; end Update_One; procedure Update_One ( s : in out Simplex; x : in Link_to_Vector; pos : in Vector; news : out Simplex ) is done : boolean := false; nei,newsnei : Simplex; begin -- LOOK FIRST FOR NULL SIMPLEX IN THE DIRECTION TO x : for k in pos'first..pos'last-1 loop if pos(k)*pos(pos'last) > 0 then nei := s.pts(k+1).si; if nei = Null_Simplex then Update(s,x,k+1); news := s.pts(k+1).si; done := true; end if; end if; exit when done; end loop; -- WALK FURTHER IN THE DIRECTION TO x : if not done then Update_One(nei,x,Position(nei,x.all),newsnei); if newsnei /= Null_Simplex then news := newsnei; s := nei; end if; end if; end Update_One; procedure Update_All ( s : in out Simplex; x : in Link_to_Vector; pos : in Vector; ancestor : in Simplex ) is nei : Simplex; continue : boolean := true; begin for k in pos'first..pos'last-1 loop if pos(k)*pos(pos'last) > 0 then nei := s.pts(k+1).si; if nei /= Null_Simplex then if not Is_Vertex(nei,x.all) and nei /= ancestor then Update_All(nei,x,Position(nei,x.all),s); end if; else Update(s,x,k+1); Process(s.pts(k+1).si,continue); end if; end if; exit when not continue; end loop; end Update_All; procedure Connect ( s1,s2 : in out Simplex ) is neighb : boolean; index1,index2 : natural; begin neighb := true; -- assume they are neighbors index1 := 0; -- SEARCH FOR INDEX OF POINT IN s1 THAT DOES NOT BELONG TO s2 : for k in s1.pts'range loop if not Is_Vertex(s2,s1.pts(k).pt.all) then if (index1 = 0) and (s1.pts(k).si = Null_Simplex) then index1 := k; -- kth point is not common else neighb := false; -- more than one point not common -- or there is already a neighbor end if; end if; exit when not neighb; end loop; -- either not neighb or index1 -> point in s1, not in s2 -- SEARCH FOR INDEX OF POINT IN s2 THAT DOES NOT BELONG TO s1 : if neighb then index2 := 0; for k in s2.pts'range loop if not Is_Vertex(s1,s2.pts(k).pt.all) then if (index2 = 0) and (s2.pts(k).si = Null_Simplex) then index2 := k; -- kth point is not common else neighb := false; -- more than one point not common -- or there is already a neighbor end if; end if; exit when not neighb; end loop; -- either no neighb or index2 -> point in s2, not in s1 -- CONNECT THE SIMPLICES WITH EACH OTHER : if neighb then s1.pts(index1).si := s2; s2.pts(index2).si := s1; end if; end if; end Connect; procedure Flatten ( s : in out Simplex ) is begin s.nor := (s.nor'range => 0); s.nor(s.n) := 1; for k in s.pts'range loop s.pts(k).pt(s.n) := 0; end loop; end Flatten; -- SELECTORS : function Dimension ( s : Simplex ) return natural is begin return s.n; end Dimension; function Normal ( s : Simplex ) return Vector is begin return s.nor; end Normal; function Is_Flat ( s : Simplex ) return boolean is begin for i in s.nor'first..(s.nor'last-1) loop if s.nor(i) /= 0 then return false; end if; end loop; return (s.nor(s.nor'last) = 1); end Is_Flat; function Vertices ( s : Simplex ) return Integer_Vectors_of_Vectors.Vector is res : Integer_Vectors_of_Vectors.Vector(s.pts'range); begin for k in res'range loop res(k) := s.pts(k).pt; end loop; return res; end Vertices; function Vertex ( s : Simplex; k : natural ) return Vector is begin return s.pts(k).pt.all; end Vertex; function Is_Vertex ( s : Simplex; x : Vector ) return boolean is begin for k in s.pts'range loop if s.pts(k).pt.all = x then return true; end if; end loop; return false; end Is_Vertex; function Equal ( s1,s2 : Simplex ) return boolean is found : boolean; begin if s1.nor /= s2.nor -- CHECK IF NORMALS ARE THE SAME then return false; else for k in s1.pts'range loop -- CHECK IF VERTICES ARE THE SAME -- CHECK WHETHER s1.pts(k).pt.all OCCURS IN s2.pts found := false; for l in s2.pts'range loop if s1.pts(k).pt.all = s2.pts(l).pt.all then found := true; end if; exit when found; end loop; if not found then return false; end if; end loop; return true; end if; end Equal; function Index ( s : Simplex; x : Vector ) return natural is begin for k in s.pts'range loop if s.pts(k).pt.all = x then return k; end if; end loop; return 0; end Index; function Neighbor ( s : Simplex; k : natural ) return Simplex is begin return s.pts(k).si; end Neighbor; function Neighbor ( s : Simplex; k : natural; pos : Vector ) return Simplex is begin if pos(k-1)*pos(pos'last) > 0 then return s.pts(k).si; else return Null_Simplex; end if; end Neighbor; function Position ( s : Simplex; x : Vector ) return Vector is m : matrix(x'first..x'last-1,x'range); pos : Vector(x'range); res : Vector(0..pos'last); begin -- nbpos := nbpos + 1; -- put("# position computations : "); put(nbpos,1); new_line; -- transform point and simplex m := Diagonalize(s,x); -- solve the system pos := (pos'range => 0); Solve0(m,pos); res(pos'first..pos'last) := pos; res(0) := 0; for k in pos'range loop res(0) := res(0) + pos(k); end loop; res(0) := -res(0); return res; end Position; function Is_In ( s : Simplex; x : Vector ) return boolean is pos : Vector(0..x'last) := Position(s,x); begin return Is_In(s,x,pos); end Is_In; function Is_In ( s : Simplex; x,pos : Vector ) return boolean is begin for k in pos'first..pos'last-1 loop if pos(k)*pos(pos'last) > 0 then return false; end if; end loop; return true; end Is_In; function Is_In_All ( s : Simplex; x : Vector ) return boolean is pos : Vector(0..x'last) := Position(s,x); begin return Is_In_All(s,x,pos); end Is_In_All; function Is_In_All ( s : Simplex; x : Vector ) return Simplex is pos : Vector(0..x'last) := Position(s,x); begin return Is_In_All(s,x,pos); end Is_In_All; function Is_In_All ( s : Simplex; x,pos : Vector ) return boolean is ins : boolean := true; -- assumes that x belongs to s begin for k in pos'first..pos'last-1 loop if pos(k)*pos(pos'last) > 0 then if s.pts(k+1).si /= Null_Simplex then return Is_In_All(s.pts(k+1).si,x); else ins := false; end if; end if; end loop; return ins; end Is_In_All; function Is_In_All ( s : Simplex; x,pos : Vector ) return Simplex is ins : boolean := true; -- assumes that x belongs to s begin for k in pos'first..pos'last-1 loop if pos(k)*pos(pos'last) > 0 then if s.pts(k+1).si /= Null_Simplex then return Is_In_All(s.pts(k+1).si,x); else ins := false; end if; end if; end loop; if ins then return s; else return Null_Simplex; end if; end Is_In_All; procedure Neighbors ( s : in out Simplex; x : in Vector ) is cont : boolean; procedure Neighbors ( s : in out Simplex; x : in Vector; cont : out boolean ) is pos : Vector(0..x'last) := Position(s,x); continue : boolean := true; begin for k in pos'first..pos'last-1 loop if pos(k)*pos(pos'last) > 0 then if s.pts(k+1).si /= Null_Simplex then Neighbors(s.pts(k+1).si,x,continue); else Process_Neighbor(s,k+1,continue); end if; end if; exit when not continue; end loop; cont := continue; end Neighbors; begin Neighbors(s,x,cont); end Neighbors; function Volume ( s : Simplex ) return natural is m : constant matrix := Diagonalize(s); vol : integer := 1; begin for k in m'range(1) loop vol := vol*m(k,k); end loop; if vol >= 0 then return vol; else return -vol; end if; end Volume; -- DESTRUCTORS : procedure Destroy_Neighbor ( s : in out Simplex; k : in natural ) is begin s.pts(k).si := Null_Simplex; end Destroy_Neighbor; procedure Destroy_Neighbors ( s : in out Simplex ) is begin for k in s.pts'range loop Destroy_Neighbor(s,k); end loop; end Destroy_Neighbors; procedure Clear_Neighbor ( s : in out Simplex; k : in natural ) is begin Clear(s.pts(k).si); end Clear_Neighbor; procedure Clear_Neighbors ( s : in out Simplex ) is begin for k in s.pts'range loop Clear_Neighbor(s,k); end loop; end Clear_Neighbors; procedure Clear ( s : in out Simplex ) is procedure free is new unchecked_deallocation(Simplex_Rep,Simplex); begin Clear(s.tra); free(s); end Clear; end Simplices; SHAR_EOF fi # end of overwriting check if test -f 'simplices.ads' then echo shar: will not over-write existing file "'simplices.ads'" else cat << "SHAR_EOF" > 'simplices.ads' with Integer_Vectors; use Integer_Vectors; with Integer_Vectors_of_Vectors; package Simplices is -- DESCRIPTION : -- This package contains an abstraction for dealing with -- lifted simplices on the lower hull of a polytope. -- DATA STRUCTURE : type Simplex is private; Null_Simplex : constant Simplex; -- empty simplex -- CREATORS : function Create ( x : Integer_Vectors_of_Vectors.Vector ) return Simplex; -- DESCRIPTION : -- Given the vertices, the simplex will be created. procedure Update ( s : in out Simplex; x : in Link_to_Vector; k : in natural ); -- DESCRIPTION : -- Creates a neighboring simplex by pivoting the kth point in the -- simplex by the given point x. procedure Update ( s : in out Simplex; x : in Link_to_Vector; pos : in Vector ); -- DESCRIPTION : -- Creates neighboring simplices by pivoting the points in the -- simplex by the given point x. -- ON ENTRY : -- s simplex, volume(s) > 0; -- x a certain point to be considered for update; -- pos the position vector of x. -- ON RETURN : -- s updated, so that the neighbors of s contain the new -- simplices. procedure Update_One ( s : in out Simplex; x : in Link_to_Vector; pos : in Vector ); procedure Update_One ( s : in out Simplex; x : in Link_to_Vector; pos : in Vector; news : out Simplex ); -- DESCRIPTION : -- Creates at most one new simplex that contains x. -- It will be assumed that there are no internal points, so no more -- than one new simplex will be constructed. When x already belongs -- to s or to one of its neighbor, then nothing will be done. -- The specifications of s,x and pos are the same as the other -- Update operation, except for the new parameter news wich returns -- the new simplex that contains x. generic with procedure Process ( news : in Simplex; cont : out boolean ); procedure Update_All ( s : in out Simplex; x : in Link_to_Vector; pos : in Vector; ancestor : in Simplex ); -- DESCRIPTION : -- Computes all new simplices that can be derived from the initial -- simplex s and the new point x. -- The ancestor simplex prevents the walk from turning back. procedure Connect ( s1,s2 : in out Simplex ); -- DESCRIPTION : -- Computes the intersection of the two simplices. -- If they are neighbors to each other, then the appropriate -- connections will be made. procedure Flatten ( s : in out Simplex ); -- DESCRIPTION : -- All lifting values will become zero and the inner normal changes -- into (0,0,..,0,1). -- SELECTORS : function Dimension ( s : Simplex ) return natural; -- DESCRIPTION : -- Returns the number of points in the simplex. function Normal ( s : Simplex ) return Vector; -- DESCRIPTION : -- Returns the normal to the given simplex. function Is_Flat ( s : Simplex ) return boolean; -- DESCRIPTION : -- Returns true if all components of the normal equal zero, -- except the last one, which must be equal to one. -- Returns false otherwise. function Vertices ( s : Simplex ) return Integer_Vectors_of_Vectors.Vector; -- DESCRIPTION : -- Returns the vertices that span the simplex. function Vertex ( s : Simplex; k : natural ) return Vector; -- DESCRIPTION : -- Returns the kth vector that spans the simplex. function Is_Vertex ( s : Simplex; x : Vector ) return boolean; -- DESCRIPTION : -- Returns true if x is one of the vertices that spans the simplex. function Equal ( s1,s2 : Simplex ) return boolean; -- DESCRIPTION : -- returns true if the representations of both simplices are the same. function Index ( s : Simplex; x : Vector ) return natural; -- DESCRIPTION : -- k := Index(s,x); -- if k = 0 then Is_Vertex(s,x) = false, -- else Neighbor(s,k) is the neighboring simplex of s by pivoting x. function Neighbor ( s : Simplex; k : natural ) return Simplex; function Neighbor ( s : Simplex; k : natural; pos : Vector ) return Simplex; -- DESCRIPTION : -- Returns the neighbor of the kth point of the given simplex. -- If the position vector is supplied, then it will only return -- a non-empty simplex if that is allowed by the position. function Position ( s : Simplex; x : Vector ) return Vector; -- DESCRIPTION : -- Computes the position of the given vector w.r.t. that simplex, -- i.e., if l = Position(pt,s), then sum of l(i)*s(i) + l(l'last)*pt = 0, -- where s(i) = ith point that spans the simplex, and the sum -- of all entries in l equals 1. function Is_In ( s : Simplex; x : Vector ) return boolean; function Is_In ( s : Simplex; x,pos : Vector ) return boolean; function Is_In_All ( s : Simplex; x : Vector ) return boolean; function Is_In_All ( s : Simplex; x : Vector ) return Simplex; function Is_In_All ( s : Simplex; x,pos : Vector ) return boolean; function Is_In_All ( s : Simplex; x,pos : Vector ) return Simplex; -- DESCRIPTION : -- Returns true if the point x is contained in the convex hull of s. -- The function runs more efficiently if the position vector is -- already available, otherwise it will be computed. -- With Is_In_All, also all neighbors of the given simplex are checked. -- Is_In_All(s,x) returns true if x is contained in s or in one of its -- neigbors, or in one of the neighbors of the neigbors... -- Either the simplex which contains x or the empty simplex is returned. generic with procedure Process_Neighbor ( nei : in out Simplex; k : in natural; continue : out boolean ); procedure Neighbors ( s : in out Simplex; x : in Vector ); -- DESCRIPTION : -- Computes all neighbors (and neighbors of ...) of the simplex s, -- that lie closest to x, i.e. with no other simplices in between. -- This procedure implements a walk from the simplex s to -- a given point x. -- As the parameters are of type 'in out', simplices are -- allowed to be updated. -- To the user defined procedure Process_Neighbor the following -- information is passed: -- ON ENTRY : -- nei a neighboring simplex close to x; -- k index for point in nei that can be replaced by s. -- ON RETURN : -- nei updated simplex; -- continue if true then more neighboring simplices may be delivered; -- if false then the iteration will stop. function Volume ( s : Simplex ) return natural; -- DESCRIPTION : -- Returns n! times the volume of the simplex. -- DESTRUCTORS : procedure Destroy_Neighbor ( s : in out Simplex; k : in natural ); procedure Destroy_Neighbors ( s : in out Simplex ); -- DESCRIPTION : -- Sets the kth neighbor of the simplex to the empty simplex. -- If k is not specified, then all neighbors will be set to empty. procedure Clear_Neighbor ( s : in out Simplex; k : in natural ); procedure Clear_Neighbors ( s : in out Simplex ); -- DESCRIPTION : -- Clears the kth neighbor of the simplex s. -- If k is not specified, then all neighbors will be cleared. procedure Clear ( s : in out Simplex ); -- DESCRIPTION : -- Makes the allocated memory space available. private type Simplex_Rep ( n : natural ); type Simplex is access Simplex_Rep; Null_Simplex : constant Simplex := null; end Simplices; SHAR_EOF fi # end of overwriting check if test -f 'simplices_io.adb' then echo shar: will not over-write existing file "'simplices_io.adb'" else cat << "SHAR_EOF" > 'simplices_io.adb' with integer_io; use integer_io; with Integer_Vectors_io; use Integer_Vectors_io; with Integer_Vectors_of_Vectors; use Integer_Vectors_of_Vectors; with Integer_Vectors_of_Vectors_io; use Integer_Vectors_of_Vectors_io; package body Simplices_io is procedure get ( s : in out Simplex ) is n : natural; begin get(n); declare v : Vector(1..n); begin get(n,v); s := Create(v); end; end get; procedure get ( n : in natural; s : in out Simplex ) is v : Vector(1..n); begin get(n,v); s := Create(v); end get; procedure get ( file : in file_type; s : in out Simplex ) is n : natural; begin get(file,n); declare v : Vector(1..n); begin get(file,n,v); s := Create(v); end; end get; procedure get ( file : in file_type; n : in natural; s : in out Simplex ) is v : Vector(1..n); begin get(file,n,v); s := Create(v); end get; procedure put ( s : in Simplex ) is begin put(Normal(s)); new_line; put(Normal(s)'last,1); new_line; put(Vertices(s)); end put; procedure put ( file : in file_type; s : in Simplex ) is begin put(file,Normal(s)); new_line(file); put(file,Normal(s)'last,1); new_line(file); put(file,Vertices(s)); end put; end Simplices_io; SHAR_EOF fi # end of overwriting check if test -f 'simplices_io.ads' then echo shar: will not over-write existing file "'simplices_io.ads'" else cat << "SHAR_EOF" > 'simplices_io.ads' with text_io; use text_io; with Simplices; use Simplices; package Simplices_io is -- DESCRIPTION : -- This package provides an interface to the simplices. procedure get ( s : in out Simplex ); procedure get ( n : in natural; s : in out Simplex ); procedure get ( file : in file_type; s : in out Simplex ); procedure get ( file : in file_type; n : in natural; s : in out Simplex ); -- DESCRIPTION : -- Reads the dimension n if not specified as parameter, -- and then n integer vectors of length n, from standard input -- or from file. procedure put ( s : in Simplex ); procedure put ( file : in file_type; s : in Simplex ); -- DESCRIPTION : -- Writes the n vectors that span the simplex on standard output -- or on file. end Simplices_io; SHAR_EOF fi # end of overwriting check if test -f 'triangulations.adb' then echo shar: will not over-write existing file "'triangulations.adb'" else cat << "SHAR_EOF" > 'triangulations.adb' with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Random_Number_Generators; use Random_Number_Generators; --with text_io,Simplices_io; use text_io,Simplices_io; --with Integer_Vectors_io; use Integer_Vectors_io; --with integer_io; use integer_io; package body Triangulations is -- AUXILIAIRY HASH TABLE FOR Update_One : type Matrix_of_Triangulations is array ( integer range <>, integer range <> ) of Triangulation; type Hash_Table ( n : natural ) is record weight1,weight2 : Link_to_Vector; data : Matrix_of_Triangulations(0..n,0..n); end record; procedure Init ( ht : in out Hash_Table; first,last : in integer ) is -- Initializes the hash table with Null_Triangulation. -- Determines the weights for the hash function. -- The numbers first and last determine the length of the weight function. begin ht.weight1 := new Vector(first..last); ht.weight2 := new Vector(first..last); for i in first..last loop ht.weight1(i) := Random(-last,last); ht.weight2(i) := Random(-last,last); end loop; ht.weight1(last) := 1; -- TO AVOID PROBLEMS WITH HIGH LIFTING ht.weight2(last) := 1; for i in ht.data'range(1) loop for j in ht.data'range(2) loop ht.data(i,j) := Null_Triangulation; end loop; end loop; end Init; procedure Hash_Function ( ht : in Hash_Table; s : in Simplex; i,j : out integer ) is -- DESCRIPTION : -- Computes the entries in the hash table for the simplex s. r1 : constant integer := ht.weight1.all*Vertex(s,1); r2 : constant integer := ht.weight2.all*Vertex(s,2); begin i := r1 mod (ht.n + 1); j := r2 mod (ht.n + 1); end Hash_Function; procedure Update ( ht : in out Hash_Table; s : in Simplex ) is -- DESCRIPTION : -- Updates the hash table with the given simplex s. i,j : integer; begin Hash_Function(ht,s,i,j); Construct(s,ht.data(i,j)); end Update; function Is_In ( ht : Hash_Table; s : Simplex ) return boolean is -- DESCRIPTION : -- Checks whether the simplex belongs to the hash table. i,j : integer; begin Hash_Function(ht,s,i,j); return Is_In(ht.data(i,j),s); end Is_In; -- procedure Write_Distribution ( ht : in Hash_Table ) is -- -- -- DESCRIPTION : -- -- Writes the lengths of the lists in ht. -- -- begin -- for i in ht.data'range(1) loop -- for j in ht.data'range(2) loop -- put(Length_Of(ht.data(i,j)),1); put(' '); -- end loop; -- new_line; -- end loop; -- end Write_Distribution; procedure Clear ( ht : in out Hash_Table ) is -- DESCRIPTION : -- Clears the allocated memory space for the hash table, -- only a shallow copy is performed. begin Clear(ht.weight1); Clear(ht.weight2); for i in ht.data'range(1) loop for j in ht.data'range(2) loop Lists_of_Simplices.Clear(Lists_of_Simplices.List(ht.data(i,j))); end loop; end loop; end Clear; -- CREATORS : function Create ( s : Simplex ) return Triangulation is res : Triangulation; begin Construct(s,res); return res; end Create; function Is_Inner ( n : natural; s : Simplex ) return boolean is begin for k in 1..n loop if Neighbor(s,k) = Null_Simplex then return false; end if; end loop; return true; end Is_Inner; procedure Update ( t : in out Triangulation; s : in out Simplex; x : in Link_to_Vector ) is pos : vector(0..x'last) := Position(s,x.all); begin for k in x'range loop if Neighbor(s,k) = Null_Simplex then if pos(k-1)*pos(pos'last) > 0 then Update(s,x,k); Construct(Neighbor(s,k),t); end if; end if; end loop; end Update; procedure Connect_and_Update ( s : in out Simplex; t : in out Triangulation ) is -- DESCRIPTION : -- Connects the simplex with each other simplex in the triangulation -- and adds it to the list t. tmp : Triangulation := t; begin while not Is_Null(tmp) loop declare s2 : Simplex := Head_Of(tmp); begin Connect(s,s2); --Set_Head(tmp,s2); end; tmp := Tail_Of(tmp); end loop; Construct(s,t); end Connect_and_Update; procedure Connect_and_Update ( t1 : in Triangulation; t2 : in out Triangulation ) is -- DESCRIPTION : -- Connects all simplices in t1 properly with each other -- and adds them to the list t2. tmp1 : Triangulation := t1; tmp2 : Triangulation; s1,s2 : Simplex; begin while not Is_Null(tmp1) loop s1 := Head_Of(tmp1); tmp2 := Tail_Of(tmp1); while not Is_Null(tmp2) loop s2 := Head_Of(tmp2); Connect(s1,s2); tmp2 := Tail_Of(tmp2); end loop; tmp1 := Tail_Of(tmp1); Construct(s1,t2); end loop; end Connect_and_Update; procedure Update ( t : in out Triangulation; x : in Link_to_Vector; newt : out Triangulation ) is tmp : Triangulation := t; s : Simplex; nwt : Triangulation; -- for the new simplices that will contain x begin while not Is_Null(tmp) loop s := Head_Of(tmp); if not Is_Inner(x'last,s) then Update(nwt,s,x); end if; tmp := Tail_Of(tmp); end loop; Connect_and_Update(nwt,t); newt := nwt; end Update; procedure Update ( t : in out Triangulation; x : in Link_to_Vector ) is nwt : Triangulation; -- for the new simplices that will contain x begin Update(t,x,nwt); -- SHALLOW CLEAR : Lists_of_Simplices.Clear(Lists_of_Simplices.List(nwt)); end Update; procedure Collect_Vertices ( s : in Simplex; l : in out List ) is -- DESCRIPTION : -- Collects the vertices in s and puts them in the list l. -- Auxiliary routine for Update_One. pts : constant Integer_Vectors_of_Vectors.Vector := Vertices(s); begin for k in pts'range loop if not Is_In(l,pts(k).all) then declare newpt : Link_to_Vector := new Vector'(pts(k).all); begin Construct(newpt,l); end; end if; end loop; end Collect_Vertices; function Has_Vertices_in_List ( s : Simplex; l : List ) return boolean is -- DESCRIPTION : -- Returns true if the simplex s has vertices in the list l. pts : constant Integer_Vectors_of_Vectors.Vector := Vertices(s); begin for k in pts'range loop if Is_In(l,pts(k).all) then return true; end if; end loop; return false; end Has_Vertices_in_List; procedure Update_One ( t : in out Triangulation; x : in Link_to_Vector ) is s : Simplex := Head_Of(t); news,nei : Simplex; nwt,leaves : Triangulation; root : Hash_Table(2*x'last-1); pos : Vector(0..x'last); border_vertices : List; procedure Process_Tree_of_Updates is -- DESCRIPTION : -- Constructs a tree of adjencencies which consists of -- connected simplices on the edge of the triangulation. tmp,newleaves : Triangulation; si,neisi : Simplex; begin -- INITIALIZATION : --Construct(s,root); Init(root,x'first,x'last); Update(root,s); for k in x'range loop declare nei : Simplex := Neighbor(s,k); begin if (nei /= Null_Simplex) and then not Is_Vertex(nei,x.all) then Construct(nei,leaves); end if; end; end loop; -- PERFORM THE UPDATES : loop -- INVARIANT CONDITION : -- the simplices considered have vertices on the border close to x newleaves := Null_Triangulation; tmp := leaves; while not Is_Null(tmp) loop si := Head_Of(tmp); -- UPDATE root TO PREVENT TURNING BACK : Update(root,si); -- COMPUTE NEW SIMPLICES AND LEAVES : if not Is_Inner(x'last,si) then pos := Position(si,x.all); for k in x'range loop -- LOOK IN THE DIRECTION TOWARDS x : if pos(k-1)*pos(pos'last) > 0 then neisi := Neighbor(si,k); if neisi = Null_Simplex then Update(si,x,k); -- NEW SIMPLEX neisi := Neighbor(si,k); Construct(neisi,nwt); Collect_Vertices(neisi,border_vertices); end if; end if; end loop; end if; for l in x'range loop -- GO FURTHER neisi := Neighbor(si,l); if (neisi /= Null_Simplex) and then not Is_Vertex(neisi,x.all) and then Has_Vertices_in_List(neisi,border_vertices) and then not Is_In(leaves,neisi) and then not Is_In(newleaves,neisi) and then not Is_In(root,neisi) then Construct(neisi,newleaves); end if; end loop; tmp := Tail_Of(tmp); end loop; exit when (newleaves = Null_Triangulation); Lists_of_Simplices.Clear(Lists_of_Simplices.List(leaves)); leaves := newleaves; end loop; -- SHALLOW CLEAR : -- Lists_of_Simplices.Clear(Lists_of_Simplices.List(root)); -- put_line("Distribution of root : "); Write_Distribution(root); Clear(root); Lists_of_Simplices.Clear(Lists_of_Simplices.List(leaves)); end Process_Tree_of_Updates; begin nei := s; -- USED TO SEE WHETHER s WILL CHANGE pos := Position(s,x.all); Update_One(s,x,pos,news); Construct(news,nwt); Collect_Vertices(news,border_vertices); if s /= nei then pos := Position(s,x.all); -- BECAUSE s IS CHANGED !!! end if; for k in x'range loop -- COMPUTE OTHER NEIGHBORS if pos(k-1)*pos(pos'last) > 0 then nei := Neighbor(s,k); if nei = Null_Simplex then Update(s,x,k); nei := Neighbor(s,k); Construct(nei,nwt); Collect_Vertices(nei,border_vertices); end if; end if; end loop; Process_Tree_of_Updates; Clear(border_vertices); Connect_and_Update(nwt,t); Lists_of_Simplices.Clear(Lists_of_Simplices.List(nwt)); end Update_One; procedure Connect ( t : in out Triangulation ) is tmp1 : Triangulation := t; tmp2 : Triangulation; s1,s2 : Simplex; begin while not Is_Null(tmp1) loop s1 := Head_Of(tmp1); tmp2 := Tail_Of(tmp1); while not Is_Null(tmp2) loop s2 := Head_Of(tmp2); Connect(s1,s2); --Set_Head(tmp2,s2); tmp2 := Tail_Of(tmp2); end loop; --Set_Head(tmp1,s1); tmp1 := Tail_Of(tmp1); end loop; end Connect; -- THE OPTIMAL DISCRETE CONSERVATIVE LIFTING FUNCTION : -- procedure Write_Neighbors ( s : in Simplex ) is -- begin -- put("The normal of simplex s : "); put(Normal(s)); new_line; -- put_line(" with vertices : "); put(s); -- for k in Normal(s)'range loop -- if Neighbor(s,k) /= Null_Simplex -- then put("normal of a not null neighbors of s :"); -- put(Normal(Neighbor(s,k))); new_line; -- end if; -- end loop; -- end Write_Neighbors; -- procedure Write ( t : in Triangulation ) is -- -- tmp : Triangulation := t; -- -- begin -- while not Is_Null(tmp) loop -- Write_Neighbors(Head_Of(tmp)); -- tmp := Tail_Of(tmp); -- end loop; -- end Write; procedure Flatten ( t : in out Triangulation ) is tmp : Triangulation := t; s : Simplex; -- IMPLEMENTATION REQUIREMENT : -- Cells that are already flattened are grouped at the end of the list. begin -- put_line("THE TRIANGULATION BEFORE LIFTING : "); Write(t); while not Is_Null(tmp) loop s := Head_Of(tmp); exit when Is_Flat(s); -- put_line("NEIGHBORS BEFORE FLATTENING : "); Write_Neighbors(s); Flatten(s); -- put_line("NEIGHBORS AFTER FLATTENING : "); Write_Neighbors(s); --Set_Head(tmp,s); tmp := Tail_Of(tmp); end loop; -- put_line("THE TRIANGULATION AFTER LIFTING : "); Write(t); end Flatten; -- SELECTORS : function Is_Vertex ( t : Triangulation; x : Vector ) return boolean is tmp : Triangulation := t; begin while not Is_Null(tmp) loop if Is_Vertex(Head_Of(tmp),x) then return true; end if; tmp := Tail_Of(tmp); end loop; return false; end Is_Vertex; function Vertices ( t : Triangulation ) return List is -- DESCRIPTION : -- Returns a list with all vertices in the simplices of t. res,res_last : List; tmp : Triangulation := t; begin res_last := res; while not Is_Null(tmp) loop declare s : Simplex := Head_Of(tmp); v : constant Integer_Vectors_of_Vectors.Vector := Vertices(s); begin for i in v'range loop if not Is_In(res,v(i)) then Append(res,res_last,v(i)); end if; end loop; end; tmp := Tail_Of(tmp); end loop; return res; end Vertices; function Vertices ( t : Triangulation; x : vector ) return List is res,res_last : List; tmp : Triangulation := t; begin res_last := res; while not Is_Null(tmp) loop declare s : Simplex := Head_Of(tmp); begin if Is_Vertex(s,x) then declare v : constant Integer_Vectors_of_Vectors.Vector := Vertices(s); begin for i in v'range loop if not Is_In(res,v(i)) then Append(res,res_last,v(i)); end if; end loop; end; end if; tmp := Tail_Of(tmp); end; end loop; return res; end Vertices; function Vertices ( t : Triangulation ) return Integer_Vectors_of_Vectors.Vector is vertri : List := Vertices(t); res : Integer_Vectors_of_Vectors.Vector(1..Length_Of(vertri)); tmp : List := vertri; begin for i in res'range loop res(i) := Head_Of(tmp); tmp := Tail_Of(tmp); end loop; Lists_of_Link_to_Integer_Vectors.Clear (Lists_of_Link_to_Integer_Vectors.List(vertri)); return res; end Vertices; function Vertices ( t : Triangulation; x : vector ) return Integer_Vectors_of_Vectors.Vector is vertri : List := Vertices(t,x); res : Integer_Vectors_of_Vectors.Vector(1..Length_Of(vertri)); tmp : List := vertri; begin for i in res'range loop res(i) := Head_Of(tmp); tmp := Tail_Of(tmp); end loop; Lists_of_Link_to_Integer_Vectors.Clear (Lists_of_Link_to_Integer_Vectors.List(vertri)); return res; end Vertices; function Is_In1 ( t : Triangulation; x : Vector ) return boolean is tmp : Triangulation := t; begin while not Is_Null(tmp) loop if Is_In(Head_Of(tmp),x) then return true; end if; tmp := Tail_Of(tmp); end loop; return false; end Is_In1; function Is_In ( t : Triangulation; x : Vector ) return boolean is begin return Is_In_All(Head_Of(t),x); end Is_In; function Is_In ( t : Triangulation; x : Vector ) return Simplex is begin return Is_In_All(Head_Of(t),x); end Is_In; function Is_In ( t : Triangulation; s : Simplex ) return boolean is tmp : Triangulation := t; begin -- put("Length of triangulation : "); put(Length_Of(t),1); new_line; while not Is_Null(tmp) loop if Equal(s,Head_Of(tmp)) then return true; else tmp := Tail_Of(tmp); end if; end loop; return false; end Is_In; function Volume ( t : Triangulation ) return natural is tmp : Triangulation := t; vol : natural := 0; begin while not Is_Null(tmp) loop vol := vol + Volume(Head_Of(tmp)); tmp := Tail_Of(tmp); end loop; return vol; end Volume; -- DESTRUCTOR : procedure Clear ( t : in out Triangulation ) is tmp : Triangulation := t; begin while not Is_Null(tmp) loop declare s : Simplex := Head_Of(tmp); begin Clear(s); end; tmp := Tail_Of(tmp); end loop; Lists_of_Simplices.Clear(Lists_of_Simplices.List(t)); end Clear; end Triangulations; SHAR_EOF fi # end of overwriting check if test -f 'triangulations.ads' then echo shar: will not over-write existing file "'triangulations.ads'" else cat << "SHAR_EOF" > 'triangulations.ads' with Lists; with Integer_Vectors; use Integer_Vectors; with Integer_Vectors_of_Vectors; with Simplices; use Simplices; package Triangulations is -- DESCRIPTION : -- This package exports a data structure for dealing with regular -- triangulations of Newton polytopes. -- DATA STRUCTURE : package Lists_of_Simplices is new Lists(Simplex); type Triangulation is new Lists_of_Simplices.List; Null_Triangulation : constant Triangulation := Triangulation(Lists_of_Simplices.Null_List); -- CREATORS : function Create ( s : Simplex ) return Triangulation; -- DESCRIPTION : -- Returns a trianguation with one simplex. procedure Update ( t : in out Triangulation; x : in Link_to_Vector ); procedure Update ( t : in out Triangulation; x : in Link_to_Vector; newt : out Triangulation ); -- DESCRIPTION : -- Computes new simplices which contain x, stores them in newt, -- and adds them to the triangulation. procedure Update_One ( t : in out Triangulation; x : in Link_to_Vector ); -- DESCRIPTION : -- Computes new simplices that contain x and adds them -- to the triangulation. -- Hereby it will be assumed that adding x causes no points of t to be -- interior. procedure Connect ( t : in out Triangulation ); -- DESCRIPTION ; -- Given a collection of simplices, the appropiate connections -- between the simplices will be computed and made. procedure Flatten ( t : in out Triangulation ); -- DESCRIPTION : -- All simplices in t will be flattened. -- REQUIRED : -- Cells that are already flattened are grouped at the end of the list. -- SELECTORS : function Is_Vertex ( t : Triangulation; x : Vector ) return boolean; -- DESCRIPTION : -- Returns true if the given vector x is a vertex of one of -- the simplices in t. function Vertices ( t : Triangulation ) return Integer_Vectors_of_Vectors.Vector; -- DESCRIPTION : -- Returns a vector with all vertices of the simplices in t. function Vertices ( t : Triangulation; x : Vector ) return Integer_Vectors_of_Vectors.Vector; -- DESCRIPTION : -- Returns a vector with all vertices of the simplices in t, -- which contain the given vector x. function Is_In ( t : Triangulation; x : Vector ) return boolean; -- DESCRIPTION : -- Returns true if the point x belongs to one of the simplices in t. function Is_In ( t : Triangulation; x : Vector ) return Simplex; -- DESCRIPTION : -- If the point belongs to one of the simplices in t, then this -- simplex is returned, otherwise, the Null_Simplex is returned. function Is_In ( t : Triangulation; s : Simplex ) return boolean; -- DESCRIPTION : -- Returns true if the simplex s is contained in t. function Volume ( t : Triangulation ) return natural; -- DESCRIPTION : -- Computes n! times the volume of the simplices in the triangulation. -- DESTRUCTOR : procedure Clear ( t : in out Triangulation ); -- DESCRIPTION : -- Frees the allocated memory space. end Triangulations; SHAR_EOF fi # end of overwriting check if test -f 'triangulations_and_subdivisions.adb' then echo shar: will not over-write existing file "'triangulations_and_subdivisions.adb'" else cat << "SHAR_EOF" > 'triangulations_and_subdivisions.adb' with Integer_Vectors_of_Vectors; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Transforming_Integer_Vector_Lists; use Transforming_Integer_Vector_Lists; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Dynamic_Triangulations; use Dynamic_Triangulations; with Unfolding_Subdivisions; use Unfolding_Subdivisions; package body Triangulations_and_Subdivisions is -- REFINEMENT ROUTINES : procedure Refine ( n : in natural; mic : in out Mixed_Cell ) is -- NOTE : -- Dynamic lifting will be applied with standard settings, -- under the assumption that there are only few points in the cell. support : List := Reduce(mic.pts(1),n+1); t : Triangulation; lifted,lifted_last : List; begin Dynamic_Lifting(support,false,true,0,lifted,lifted_last,t); mic.sub := new Mixed_Subdivision'(Deep_Create(n,t)); Deep_Clear(lifted); Clear(t); -- pity that Shallow_Clear(t) is not yet possible ... end Refine; procedure Refine ( n : in natural; mixsub : in out Mixed_Subdivision ) is -- NOTE : -- Refines the mixed subdivision, under the safe assumption that -- there is only one support set to deal with. res,res_last : Mixed_Subdivision; tmp : Mixed_Subdivision := mixsub; mic : Mixed_Cell; begin while not Is_Null(tmp) loop mic := Head_Of(tmp); if Length_Of(mic.pts(1)) > n+1 then Refine(n,mic); end if; Append(res,res_last,mic); tmp := Tail_Of(tmp); end loop; mixsub := res; end Refine; -- TARGET PROCEDURES : function Deep_Create ( n : natural; s : Simplex ) return Mixed_Cell is res : Mixed_Cell; ver : constant Integer_Vectors_of_Vectors.Vector := Vertices(s); begin res.nor := new Integer_Vectors.Vector'(Normal(s)); res.pts := new Array_of_Lists(1..1); res.pts(1) := Deep_Create(ver); return res; end Deep_Create; function Shallow_Create ( n : natural; s : Simplex ) return Mixed_Cell is res : Mixed_Cell; ver : constant Integer_Vectors_of_Vectors.Vector := Vertices(s); begin res.nor := new Integer_Vectors.Vector'(Normal(s)); res.pts := new Array_of_Lists(1..1); res.pts(1) := Shallow_Create(ver); return res; end Shallow_Create; function Deep_Create ( n : natural; t : Triangulation ) return Mixed_Subdivision is res,res_last : Mixed_Subdivision; tmp : Triangulation := t; begin while not Is_Null(tmp) loop Append(res,res_last,Deep_Create(n,Head_Of(tmp))); tmp := Tail_Of(tmp); end loop; return res; end Deep_Create; function Shallow_Create ( n : natural; t : Triangulation ) return Mixed_Subdivision is res,res_last : Mixed_Subdivision; tmp : Triangulation := t; begin while not Is_Null(tmp) loop Append(res,res_last,Shallow_Create(n,Head_Of(tmp))); tmp := Tail_Of(tmp); end loop; return res; end Shallow_Create; function Deep_Create ( n : natural; flatnor : Vector; t : Triangulation ) return Mixed_Subdivision is res,res_last : Mixed_Subdivision; tmp : Triangulation := t; s : Simplex; begin while not Is_Null(tmp) loop s := Head_Of(tmp); exit when (flatnor = Normal(s)); Append(res,res_last,Deep_Create(n,s)); tmp := Tail_Of(tmp); end loop; res := Merge(res); -- merge cells with same inner normal Refine(n,res); -- refine the non-fine cells return res; end Deep_Create; function Shallow_Create ( n : natural; flatnor : Vector; t : Triangulation ) return Mixed_Subdivision is res,res_last : Mixed_Subdivision; tmp : Triangulation := t; s : Simplex; begin while not Is_Null(tmp) loop s := Head_Of(tmp); exit when (flatnor = Normal(s)); Append(res,res_last,Shallow_Create(n,s)); tmp := Tail_Of(tmp); end loop; res := Merge(res); -- merge cells with same inner normal Refine(n,res); -- refine the non-fine cells return res; end Shallow_Create; function Non_Flat_Deep_Create ( n : natural; t : Triangulation ) return Mixed_Subdivision is flatnor : Vector(1..n+1) := (1..n+1 => 0); begin flatnor(n+1) := 1; return Deep_Create(n,flatnor,t); end Non_Flat_Deep_Create; function Non_Flat_Shallow_Create ( n : natural; t : Triangulation ) return Mixed_Subdivision is flatnor : Vector(1..n+1) := (1..n+1 => 0); begin flatnor(n+1) := 1; return Shallow_Create(n,flatnor,t); end Non_Flat_Shallow_Create; function Deep_Create ( n : natural; mixsub : Mixed_Subdivision ) return Triangulation is res : Triangulation; tmp : Mixed_Subdivision := mixsub; mic : Mixed_Cell; begin while not Is_Null(tmp) loop mic := Head_Of(tmp); declare v : Integer_Vectors_of_Vectors.Vector(0..n); tmppts : List := mic.pts(mic.pts'first); s : Simplex; begin for i in v'range loop v(i) := new Integer_Vectors.Vector'(Head_Of(tmppts).all); tmppts := Tail_Of(tmppts); exit when Is_Null(tmppts); end loop; s := Create(v); Construct(s,res); end; tmp := Tail_Of(tmp); end loop; Connect(res); return res; end Deep_Create; function Shallow_Create ( n : natural; mixsub : Mixed_Subdivision ) return Triangulation is res : Triangulation; tmp : Mixed_Subdivision := mixsub; mic : Mixed_Cell; begin while not Is_Null(tmp) loop mic := Head_Of(tmp); declare v : Integer_Vectors_of_Vectors.Vector(0..n); tmppts : List := mic.pts(mic.pts'first); s : Simplex; begin for i in v'range loop v(i) := Head_Of(tmppts); tmppts := Tail_Of(tmppts); exit when Is_Null(tmppts); end loop; s := Create(v); Construct(s,res); end; tmp := Tail_Of(tmp); end loop; Connect(res); return res; end Shallow_Create; end Triangulations_and_Subdivisions; SHAR_EOF fi # end of overwriting check if test -f 'triangulations_and_subdivisions.ads' then echo shar: will not over-write existing file "'triangulations_and_subdivisions.ads'" else cat << "SHAR_EOF" > 'triangulations_and_subdivisions.ads' with Integer_Vectors; use Integer_Vectors; with Simplices,Triangulations; use Simplices,Triangulations; with Integer_Mixed_Subdivisions; use Integer_Mixed_Subdivisions; package Triangulations_and_Subdivisions is -- DESCRIPTION : -- This package offers conversion operations from triangulations -- into mixed subdivisions and vice versa. function Deep_Create ( n : natural; s : Simplex ) return Mixed_Cell; function Shallow_Create ( n : natural; s : Simplex ) return Mixed_Cell; -- DESCRIPTION : -- Creates a mixed cell from the given simplex. A deep create makes -- a copy of the points in the simplex, whereas a shallow create only -- copies the points to the points in the simplex. function Deep_Create ( n : natural; t : Triangulation ) return Mixed_Subdivision; function Shallow_Create ( n : natural; t : Triangulation ) return Mixed_Subdivision; -- DESCRIPTION : -- Creates a mixed subdivision from a given triangulation. function Deep_Create ( n : natural; flatnor : Vector; t : Triangulation ) return Mixed_Subdivision; function Shallow_Create ( n : natural; flatnor : Vector; t : Triangulation ) return Mixed_Subdivision; -- DESCRIPTION : -- Stops the conversion as soon as the flattening normal is encountered. -- Cells with the same inner normal are merged. function Non_Flat_Deep_Create ( n : natural; t : Triangulation ) return Mixed_Subdivision; function Non_Flat_Shallow_Create ( n : natural; t : Triangulation ) return Mixed_Subdivision; -- DESCRIPTION : -- Converts only the cells in the triangulation that are not flat. function Deep_Create ( n : natural; mixsub : Mixed_Subdivision ) return Triangulation; function Shallow_Create ( n : natural; mixsub : Mixed_Subdivision ) return Triangulation; -- DESCRIPTION : -- Creates a triangulation from the mixed subdivision. -- REQUIRED : -- The subdivision must be a triangulation! end Triangulations_and_Subdivisions; SHAR_EOF fi # end of overwriting check if test -f 'triangulations_io.adb' then echo shar: will not over-write existing file "'triangulations_io.adb'" else cat << "SHAR_EOF" > 'triangulations_io.adb' with Integer_Vectors; use Integer_Vectors; with integer_io,Integer_Vectors_io; use integer_io,Integer_Vectors_io; with Integer_Vectors_of_Vectors_io; use Integer_Vectors_of_Vectors_io; with Simplices,Simplices_io; use Simplices,Simplices_io; package body Triangulations_io is -- DESCRIPTION : -- This package provides an interface to the Triangulations. procedure get ( t : in out Triangulation ) is begin get(Standard_Input,t); end get; procedure get ( n,m : in natural; t : in out Triangulation ) is begin get(Standard_Input,n,m,t); end get; procedure get ( file : in file_type; t : in out Triangulation ) is n,m : natural; begin get(file,n); get(file,m); get(file,n,m,t); end get; procedure get ( file : in file_type; n,m : in natural; t : in out Triangulation ) is begin for k in 1..m loop declare s : Simplex; begin get(file,n,s); Construct(s,t); end; end loop; Connect(t); end get; procedure put ( n : in natural; t : in Triangulation ) is begin put(Standard_Output,n,t); end put; procedure put ( n : in natural; t : in Triangulation; v : out natural ) is begin put(Standard_Output,n,t,v); end put; procedure put ( file : in file_type; n : in natural; t : in Triangulation ) is tmp : Triangulation := t; begin put(file,n,1); new_line(file); put(file,Length_Of(t),1); new_line(file); while not Is_Null(tmp) loop put(file,Head_Of(tmp)); -- write the cell put(file,0,1); new_line(file); -- write refinement of cell tmp := Tail_Of(tmp); end loop; end put; procedure put ( file : in file_type; n : in natural; t : in Triangulation; v : out natural ) is tmp : Triangulation := t; res,cnt : natural := 0; s : Simplex; vol : natural; begin put(file,"Dimension without lifting : "); put(file,n,1); new_line(file); put(file,"Number of simplices : "); put(file,Length_Of(t),1); new_line(file); put_line(file,"The simplices in the triangulation :"); while not Is_Null(tmp) loop cnt := cnt + 1; put(file,"Simplex "); put(file,cnt,1); put_line(file," :"); s := Head_Of(tmp); put(file," with normal : "); put(file,Normal(s)); new_line(file); put_line(file," spanned by the points :"); put(file,Vertices(s)); vol := Volume(s); put(file," ==> volume : "); put(file,vol,1); put_line(file,"."); res := res + vol; tmp := Tail_Of(tmp); end loop; v := res; end put; function Position ( t : Triangulation; s : Simplex ) return natural is -- DESCRIPTION : -- Returns the position number of the simplex in the triangulation. -- Counting starts from one. If the simplex s does not occur in t, -- then Length(t)+1 will be returned. res : natural := 1; tmp : Triangulation := t; s1 : Simplex; begin while not Is_Null(tmp) loop s1 := Head_Of(tmp); if Equal(s1,s) then return res; else tmp := Tail_Of(tmp); res := res + 1; end if; end loop; return res; end Position; function Connectivity ( t : Triangulation; s : Simplex ) return Vector is -- DESCRIPTION : -- Returns the connectivity vector of the given simplex w.r.t. the -- given triangulation. This connectivity vector, name it cv, is -- defined as follows: -- cv(i) = 0 if Neighbor(s,i) = Null_Simplex -- cv(i) = k if Neighbor(s,i) /= Null_Simplex -- and Position(t,Neighbor(s,i)) = k. res : Vector(1..Dimension(s)); nei : Simplex; begin for i in res'range loop nei := Neighbor(s,i); if nei = Null_Simplex then res(i) := 0; else res(i) := Position(t,nei); end if; end loop; return res; end Connectivity; procedure put ( n : natural; t : in Triangulation; convecs : in out List; v : out natural ) is begin put(Standard_Output,n,t,convecs,v); end put; procedure put ( file : in file_type; n : natural; t : in Triangulation; convecs : in out List; v : out natural ) is tmp : Triangulation := t; s : Simplex; res,cnt : natural := 0; last : List; vol : natural; begin put(file,"Dimension without lifting : "); put(file,n,1); new_line(file); put(file,"Number of simplices : "); put(file,Length_Of(t),1); new_line(file); put_line(file,"The simplices in the triangulation :"); while not Is_Null(tmp) loop cnt := cnt + 1; put(file,"Simplex "); put(file,cnt,1); put_line(file," :"); s := Head_Of(tmp); put(file," with normal : "); put(file,Normal(s)); new_line(file); put_line(file," spanned by the points :"); put(file,Vertices(s)); declare cv : constant Vector := Connectivity(t,s); lcv : Link_to_Vector := new Vector'(cv); begin put(file," connectivity vector : "); put(file,cv); new_line(file); Append(convecs,last,lcv); end; vol := Volume(s); put(file," ==> volume : "); put(file,vol,1); put_line(file,"."); res := res + vol; tmp := Tail_Of(tmp); end loop; v := res; end put; end Triangulations_io; SHAR_EOF fi # end of overwriting check if test -f 'triangulations_io.ads' then echo shar: will not over-write existing file "'triangulations_io.ads'" else cat << "SHAR_EOF" > 'triangulations_io.ads' with text_io,Triangulations; use text_io,Triangulations; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; package Triangulations_io is -- DESCRIPTION : -- This package provides an interface to the Triangulations. procedure get ( t : in out Triangulation ); procedure get ( n,m : in natural; t : in out Triangulation ); procedure get ( file : in file_type; t : in out Triangulation ); procedure get ( file : in file_type; n,m : in natural; t : in out Triangulation ); -- DESCRIPTION : -- Reads first the dimension n and the number of simplices m. -- if they are not specified as parameter. -- Either from standard input or from file, m times n integer vectors -- of length are read. procedure put ( n : in natural; t : in Triangulation ); procedure put ( n : in natural; t : in Triangulation; v : out natural ); procedure put ( file : in file_type; n : in natural; t : in Triangulation ); procedure put ( file : in file_type; n : in natural; t : in Triangulation; v : out natural ); -- DESCRIPTION : -- Writes the simplices in the triangulation on standard output -- or on file. When the parameter `v' is supplied, the volume -- will be computed and returned. Also, more text banners are provided. procedure put ( n : natural; t : in Triangulation; convecs : in out List; v : out natural ); procedure put ( file : in file_type; n : natural; t : in Triangulation; convecs : in out List; v : out natural ); -- DESCRIPTION : -- Also the connectivity vectors for each simplex will be written. -- A connectivity vector cv for a simplex s is defined as follows: -- cv(i) = 0 if Neighbor(s,i) = Null_Simplex -- cv(i) = k if Neighbor(s,i) /= Null_Simplex -- and Position(t,Neighbor(s,i)) = k. end Triangulations_io; SHAR_EOF fi # end of overwriting check if test -f 'unfolding_subdivisions.adb' then echo shar: will not over-write existing file "'unfolding_subdivisions.adb'" else cat << "SHAR_EOF" > 'unfolding_subdivisions.adb' with Integer_Support_Functions; use Integer_Support_Functions; with Flatten_Mixed_Subdivisions; use Flatten_Mixed_Subdivisions; package body Unfolding_Subdivisions is function Different_Normals ( mixsub : Mixed_Subdivision ) return List is tmp : Mixed_Subdivision := mixsub; res,res_last : List; begin while not Is_Null(tmp) loop Append_Diff(res,res_last,Head_Of(tmp).nor.all); tmp := Tail_Of(tmp); end loop; return res; end Different_Normals; function Extract ( normal : vector; mixsub : Mixed_Subdivision ) return Mixed_Subdivision is tmp : Mixed_Subdivision := mixsub; res,res_last : Mixed_Subdivision; begin while not Is_Null(tmp) loop declare mic : Mixed_Cell := Head_Of(tmp); begin if mic.nor.all = normal then Append(res,res_last,mic); end if; end; tmp := Tail_Of(tmp); end loop; return res; end Extract; function Merge_Same_Normal ( mixsub : Mixed_Subdivision ) return Mixed_Cell is -- DESCRIPTION : -- All cells with the same inner normal will be put in one cell, -- that will be contained in the mixed subdivision on return. -- REQUIRED : -- not Is_Null(mixsub) and all mixed cells have the same inner normal. tmp : Mixed_Subdivision; resmic,mic : Mixed_Cell; begin mic := Head_Of(mixsub); resmic.nor := new Integer_Vectors.Vector'(mic.nor.all); resmic.pts := new Array_of_Lists'(mic.pts.all); tmp := Tail_Of(mixsub); while not Is_Null(tmp) loop mic := Head_Of(tmp); declare last : List; begin for k in mic.pts'range loop last := resmic.pts(k); while not Is_Null(Tail_Of(last)) loop last := Tail_Of(last); end loop; Deep_Concat_Diff(resmic.pts(k),last,mic.pts(k)); end loop; end; tmp := Tail_Of(tmp); end loop; return resmic; end Merge_Same_Normal; function Merge_Same_Normal ( mixsub : Mixed_Subdivision ) return Mixed_Subdivision is -- REQUIRED : -- not Is_Null(mixsub) and all mixed cells have the same inner normal. resmic : Mixed_Cell := Merge_Same_Normal(mixsub); ressub : Mixed_Subdivision; begin Construct(resmic,ressub); return ressub; end Merge_Same_Normal; function Merge ( mixsub : Mixed_Subdivision ) return Mixed_Subdivision is -- NOTE : -- Cells with an unique normal are simply taken over in the result, -- cells with the same normal are merged, hereby the refinement of these -- cells is destroyed. Though, one could do better... begin if Is_Null(mixsub) then return mixsub; else declare tmp : Mixed_Subdivision := mixsub; res,res_last : Mixed_Subdivision; mic : Mixed_Cell; begin while not Is_Null(tmp) loop mic := Head_Of(tmp); if not Is_In(res,mic.nor.all) then if not Is_In(Tail_Of(tmp),mic.nor.all) then Append(res,res_last,mic); else declare tmpmic : Mixed_Subdivision := Extract(mic.nor.all,tmp); bigmic : Mixed_Cell := Merge_Same_Normal(tmpmic); begin Append(res,res_last,bigmic); end; end if; end if; tmp := Tail_Of(tmp); end loop; return res; end; end if; end Merge; function Relift ( l : List; point : Vector ) return List is tmp,res : List; pt : Link_to_Vector; begin Copy(l,res); tmp := res; while not Is_Null(tmp) loop pt := Head_Of(tmp); if pt.all = point then pt(pt'last) := 1; else pt(pt'last) := 0; end if; Set_Head(tmp,pt); tmp := Tail_Of(tmp); end loop; return res; end Relift; function Relift ( pts : Array_of_Lists; point : Vector ) return Array_of_Lists is res : Array_of_Lists(pts'range); begin for i in pts'range loop res(i) := Relift(pts(i),point); end loop; return res; end Relift; function Relift ( mic : Mixed_Cell; point : Vector ) return Mixed_Cell is res : Mixed_Cell; begin res.pts := new Array_of_Lists'(Relift(mic.pts.all,point)); res.nor := new Integer_Vectors.Vector'(point'range => 0); Compute_Inner_Normal(res); return res; end Relift; function Relift ( mixsub : Mixed_Subdivision; point : Vector ) return Mixed_Subdivision is tmp,res,res_last : Mixed_Subdivision; begin tmp := mixsub; while not Is_Null(tmp) loop Append(res,res_last,Relift(Head_Of(tmp),point)); tmp := Tail_Of(tmp); end loop; return res; end Relift; function Is_In_Point ( pt : Link_to_Vector; l : List ) return boolean is -- DESCRIPTION : -- Returns true if the first n coordinates of pt belong to l. tmp : List := l; lpt : Link_to_Vector; begin while not Is_Null(tmp) loop lpt := Head_Of(tmp); if lpt(lpt'first..lpt'last-1) = pt(pt'first..pt'last-1) then return true; else tmp := Tail_Of(tmp); end if; end loop; return false; end Is_In_Point; function Different_Points ( l1,l2 : List ) return natural is -- DESCRIPTION : -- Return the number of different points of the list l2 w.r.t. l1. res : natural := 0; tmp : List := l2; begin while not Is_Null(tmp) loop if not Is_In_Point(Head_Of(tmp),l1) then res := res + 1; end if; tmp := Tail_Of(tmp); end loop; return res; end Different_Points; function Different_Points ( l1,l2 : List ) return List is -- DESCRIPTION : -- Return the list of different points of the list l2 w.r.t. l1. res,res_last : List; tmp : List := l2; begin while not Is_Null(tmp) loop if not Is_In_Point(Head_Of(tmp),l1) then Append(res,res_last,Head_Of(tmp).all); end if; tmp := Tail_Of(tmp); end loop; return res; end Different_Points; function Different_Points ( pts : Array_of_Lists; mic : Mixed_Cell ) return natural is -- DESCRIPTION : -- Return the number of different points of the cell mic w.r.t. pts. res : natural := 0; begin for i in pts'range loop res := res + Different_Points(pts(i),mic.pts(i)); end loop; return res; end Different_Points; function Different_Points ( pts : Array_of_Lists; mic : Mixed_Cell ) return Array_of_Lists is -- DESCRIPTION : -- Return the different points of the cell mic w.r.t. pts. res : Array_of_Lists(pts'range); begin for i in pts'range loop res(i) := Different_Points(pts(i),mic.pts(i)); end loop; return res; end Different_Points; procedure Add ( l : in out List; pts : in List ) is -- DESCRIPTION : -- Adds the points in pts to l. tmp : List := pts; pt : Link_to_Vector; begin while not Is_Null(tmp) loop pt := Head_Of(tmp); declare npt : Link_to_Vector := new vector'(pt.all); begin Construct(npt,l); end; tmp := Tail_Of(tmp); end loop; end Add; procedure Add ( l : in out Array_of_Lists; pts : in Array_of_Lists ) is -- DESCRIPTION : -- Adds the points in pts to l. begin for i in l'range loop Add(l(i),pts(i)); end loop; end Add; procedure Put_Next_to_Front ( mixsub : in out Mixed_Subdivision; pts : in Array_of_Lists ) is -- DESCRIPTION : -- Selects the next mixed cell to be processed, and puts in front -- of the list of cells mixsub. mic1 : Mixed_Cell := Head_Of(mixsub); min1 : natural := Different_Points(pts,mic1); tmp : Mixed_Subdivision := Tail_Of(mixsub); min : natural; mic : Mixed_Cell; begin while not Is_Null(tmp) loop mic := Head_Of(tmp); min := Different_Points(pts,mic); if min < min1 then min1 := min; Set_Head(mixsub,mic); Set_Head(tmp,mic1); end if; tmp := Tail_Of(tmp); end loop; end Put_Next_to_Front; procedure Relift ( l : in out List; ref : in List ) is -- DESCRIPTION : -- Gives all points in l, which belong to ref, lifting value 1. tmp : List := l; pt : Link_to_Vector; begin while not Is_Null(tmp) loop pt := Head_Of(tmp); if Is_In(ref,pt) then pt(pt'last) := 1; else pt(pt'last) := 0; end if; Set_Head(tmp,pt); tmp := Tail_Of(tmp); end loop; end Relift; procedure Relift ( l : in out List ) is -- DESCRIPTION : -- Gives all points lifting value 1. tmp : List := l; pt : Link_to_Vector; begin while not Is_Null(tmp) loop pt := Head_Of(tmp); pt(pt'last) := 1; Set_Head(tmp,pt); tmp := Tail_Of(tmp); end loop; end Relift; procedure Relift ( l : in out Array_of_Lists; ref : in Array_of_Lists ) is -- DESCRIPTION : -- Gives all points in l, which belong to ref, lifting value 1. begin for i in l'range loop Relift(l(i),ref(i)); end loop; end Relift; procedure Relift ( l : in out Array_of_Lists ) is -- DESCRIPTION : -- Gives all points lifting value 1. begin for i in l'range loop Relift(l(i)); end loop; end Relift; procedure Relift ( mic : in out Mixed_Cell; pts : in out Array_of_Lists ) is -- DESCRIPTION : -- Gives the points in mic, which belong to pts lifting 1, -- and computes the new inner normal. begin Relift(mic.pts.all,pts); Relift(pts); end Relift; procedure Orientate_Inner_Normal ( mic : in out Mixed_Cell; pts : in Array_of_Lists ) is -- DESCRIPTION : -- Orientates the normal of mic w.r.t. the points in pts. done : boolean := false; begin for i in pts'range loop if Minimal_Support(mic.pts(i),mic.nor.all) > Minimal_Support(pts(i),mic.nor.all) then Min_Vector(mic.nor); done := true; end if; exit when done; end loop; end Orientate_Inner_Normal; procedure Unfolding ( mixsub : in out Mixed_Subdivision ) is tmp : Mixed_Subdivision; begin if not Is_Null(mixsub) then declare mic : Mixed_Cell := Head_Of(mixsub); pts : Array_of_Lists(mic.pts'range); begin Flatten(mic); Copy(mic.pts.all,pts); Process(mic,pts); tmp := Tail_Of(mixsub); while not Is_Null(tmp) loop Put_Next_to_Front(tmp,pts); mic := Head_Of(tmp); declare newpts : Array_of_Lists(pts'range); begin newpts := Different_Points(pts,mic); Relift(mic,newpts); Compute_Inner_Normal(mic); -- Orientate_Inner_Normal(mic,pts); Process(mic,newpts); Add(pts,newpts); Deep_Clear(newpts); end; tmp := Tail_Of(tmp); end loop; end; end if; end Unfolding; end Unfolding_Subdivisions; SHAR_EOF fi # end of overwriting check if test -f 'unfolding_subdivisions.ads' then echo shar: will not over-write existing file "'unfolding_subdivisions.ads'" else cat << "SHAR_EOF" > 'unfolding_subdivisions.ads' with Integer_Vectors; use Integer_Vectors; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Integer_Mixed_Subdivisions; use Integer_Mixed_Subdivisions; package Unfolding_Subdivisions is -- DESCRIPTION : -- This package contains routines to unfold subdivisions. function Different_Normals ( mixsub : Mixed_Subdivision ) return List; -- DESCRIPTION : -- Returns the list of all different normals of the cells in mixsub. function Extract ( normal : vector; mixsub : Mixed_Subdivision ) return Mixed_Subdivision; -- DESCRIPTION : -- Returns a list of cells with the given normal. function Merge_Same_Normal ( mixsub : Mixed_Subdivision ) return Mixed_Cell; function Merge_Same_Normal ( mixsub : Mixed_Subdivision ) return Mixed_Subdivision; -- DESCRIPTION : -- All cells with the same inner normal will be put in one cell, -- that will be contained in the mixed subdivision on return. -- The refinement of the cells will be discarded. -- REQUIRED : -- not Is_Null(mixsub) and all mixed cells have the same inner normal. function Merge ( mixsub : Mixed_Subdivision ) return Mixed_Subdivision; -- DESCRIPTION : -- All cells with the same inner normal will be put in one cell. -- For cells whose inner normal occurs more than once, the refinement -- will be discarded. function Relift ( mixsub : Mixed_Subdivision; point : Vector ) return Mixed_Subdivision; -- DESCRIPTION : -- Returns a new mixed subdivision, derived from the original one, -- where all points different from the given point will be given -- lifting value zero. The given point will receive lifting value 1. generic with procedure Process ( mic : in Mixed_Cell; newpts : in Array_of_Lists ); -- DESCRIPTION : -- Returns the new mixed cell, with the new re-lifted points. procedure Unfolding ( mixsub : in out Mixed_Subdivision ); -- DESCRIPTION : -- A collection of cells, all with the same normal, will be unfolded. end Unfolding_Subdivisions; SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'Implift' then mkdir 'Implift' fi cd 'Implift' if test -f 'arrays_of_lists_utilities.adb' then echo shar: will not over-write existing file "'arrays_of_lists_utilities.adb'" else cat << "SHAR_EOF" > 'arrays_of_lists_utilities.adb' with Integer_Support_Functions; use Integer_Support_Functions; with Transformations; use Transformations; with Transforming_Integer_Vector_Lists; use Transforming_Integer_Vector_Lists; with Lists_of_Vectors_Utilities; use Lists_of_Vectors_Utilities; package body Arrays_of_Lists_Utilities is function All_Equal ( al : Array_of_Lists ) return boolean is begin for i in (al'first+1)..al'last loop if not Is_Equal(al(al'first),al(i)) then return false; end if; end loop; return true; end All_Equal; function Interchange2 ( al : Array_of_Lists ) return Array_of_Lists is res : Array_of_Lists(al'range); index : integer; begin if Length_Of(al(al'first)) <= 2 then res := al; else index := al'first; for i in al'first+1..al'last loop if Length_Of(al(i)) <= 2 then index := i; else res(i) := al(i); end if; exit when index > al'first; end loop; if index = al'first then res(index) := al(index); else res(index) := al(al'first); res(res'first) := al(index); res(index+1..res'last) := al(index+1..al'last); end if; end if; return res; end Interchange2; function Index2 ( al : Array_of_Lists ) return integer is begin for i in al'range loop if Length_Of(al(i)) <= 2 then return i; end if; end loop; return al'first; end Index2; procedure Mixture ( al : in Array_of_Lists; perm,mix : out Link_to_Vector ) is wrkper,wrkmix : vector(al'range); -- intermediate results nbd : natural := 0; -- # different sets ind,min : integer; procedure Sort ( indal,indmix : in natural ) is -- DESCRIPTION : -- Puts all lists which are equal to al(perm(index)) together. -- ON ENTRY : -- indal the current entry in al; -- indmix the current entry in wrkmix. begin for j in indal+1..al'last loop if Is_Equal(al(wrkper(indal)),al(wrkper(j))) then if j /= indal + wrkmix(indmix) then declare pos : natural := indal + wrkmix(indmix); tmppos : natural; begin tmppos := wrkper(j); wrkper(j) := wrkper(pos); wrkper(pos) := tmppos; end; end if; wrkmix(indmix) := wrkmix(indmix) + 1; end if; end loop; end Sort; procedure Permute ( ind,nb : in natural ) is -- DESCRIPTION : -- Changes the permutation vector such that the entry given by -- the index stands in front. The number of different supports is -- given by the parameter nb. newper : vector(wrkper'range); cntnew : natural := newper'first + wrkmix(ind); cntwrk : natural := wrkper'first; begin for i in 1..nb loop if i /= ind then for j in 0..wrkmix(i)-1 loop newper(cntnew+j) := wrkper(cntwrk+j); end loop; cntnew := cntnew + wrkmix(i); else for j in 0..wrkmix(ind)-1 loop newper(newper'first+j) := wrkper(cntwrk+j); end loop; end if; cntwrk := cntwrk + wrkmix(i); end loop; wrkper := newper; end Permute; begin -- INITIALIZATIONS : for i in wrkper'range loop wrkper(i) := i; end loop; wrkmix := (wrkmix'range => 1); -- SORTING THE SETS : ind := al'first; while ind <= al'last loop nbd := nbd + 1; Sort(ind,nbd); ind := ind + wrkmix(nbd); end loop; -- MINIMAL OCCURENCE SHOULD APPEAR FIRST : ind := wrkmix'first; min := wrkmix(ind); for i in wrkmix'first+1..nbd loop if wrkmix(i) < min then min := wrkmix(i); ind := i; end if; end loop; -- put("The type of mixture : " ); put(wrkmix(wrkmix'first..nbd)); new_line; -- put("The permutation vector : "); put(wrkper); new_line; if ind /= wrkmix'first then Permute(ind,nbd); wrkmix(ind) := wrkmix(wrkmix'first); wrkmix(wrkmix'first) := min; end if; -- put("The type of mixture : " ); put(wrkmix(wrkmix'first..nbd)); new_line; -- put("The permutation vector : "); put(wrkper); new_line; -- RETURNING THE RESULTS : perm := new Integer_Vectors.Vector'(wrkper); mix := new Integer_Vectors.Vector'(wrkmix(wrkmix'first..nbd)); end Mixture; function Permute ( perm : Vector; al : in Array_of_Lists ) return Array_of_Lists is res : Array_of_Lists(al'range); begin for i in al'range loop res(i) := al(perm(i)); end loop; return res; end Permute; function Different_Points ( al : Array_of_Lists ) return List is tmp,res,res_last : List; begin for i in (al'first+1)..al'last loop tmp := al(i); while not Is_Null(tmp) loop declare lv : Link_to_Vector := Head_Of(tmp); begin if not Is_In(res,lv.all) then Append(res,res_last,lv.all); end if; end; tmp := Tail_Of(tmp); end loop; end loop; return res; end Different_Points; function Different_Points ( al : Array_of_Lists ) return Array_of_Lists is res : Array_of_Lists(al'range); begin res(res'first) := al(al'first); for i in (al'first+1)..al'last loop res(i) := Different_Points(al(i)); end loop; return res; end Different_Points; procedure Remove_Duplicates ( al : in out Array_of_Lists ) is begin for i in al'range loop Remove_Duplicates(al(i)); end loop; end Remove_Duplicates; procedure Shift ( al : in out Array_of_Lists; shiftvecs : in Integer_Vectors_of_Vectors.Vector ) is begin for k in al'range loop Shift(al(k),shiftvecs(k)); end loop; end Shift; function Shift ( al : Array_of_Lists; shiftvecs : Integer_Vectors_of_Vectors.Vector ) return Array_of_Lists is res : Array_of_Lists(al'range); begin for k in res'range loop res(k) := Shift(al(k),shiftvecs(k)); end loop; return res; end Shift; procedure Projection ( al : in Array_of_Lists; v : in Vector; ind : integer; res : in out Array_of_Lists; degenerate : out boolean ) is pv : integer; t : Transfo := Build_Transfo(v,ind); procedure Clean ( i : in integer ) is begin for j in res'first..i loop Deep_Clear(res(j)); end loop; Clear(t); end Clean; begin degenerate := false; for i in res'range loop declare pvl : List; l : List renames al(i+1); begin pv := Maximal_Support(l,v); pvl := Face(l,v,pv); if Length_Of(pvl) <= 1 then degenerate := true; Deep_Clear(pvl); Clean(i); return; else res(i) := Transform_and_Reduce(t,ind,pvl); Remove_Duplicates(res(i)); if Length_Of(res(i)) <= 1 then degenerate := true; Deep_Clear(pvl); Clean(i); return; end if; end if; Deep_Clear(pvl); end; end loop; Clear(t); end Projection; end Arrays_of_Lists_Utilities; SHAR_EOF fi # end of overwriting check if test -f 'arrays_of_lists_utilities.ads' then echo shar: will not over-write existing file "'arrays_of_lists_utilities.ads'" else cat << "SHAR_EOF" > 'arrays_of_lists_utilities.ads' with Integer_Vectors; use Integer_Vectors; with Integer_Vectors_of_Vectors; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; package Arrays_of_Lists_Utilities is -- DESCRIPTION : -- This package offers some utilities for working with -- arrays of lists of integer vectors. function All_Equal ( al : Array_of_Lists ) return boolean; -- DESCRIPTION : -- returns true if all lists in al are the same. function Interchange2 ( al : Array_of_Lists ) return Array_of_Lists; -- DESCRIPTION : -- Returns a permuted array such that if the original array contains -- a list of length less than or equal to 2, the permuted array has -- this list on its first position. function Index2 ( al : Array_of_Lists ) return integer; -- DESCRIPTION : -- Returns the index of the list in the array which has a length less -- than or equal to 2. If no such list can be found, then al'first -- will be returned. procedure Mixture ( al : in Array_of_Lists; perm,mix : out Link_to_Vector ); -- DESCRIPTION : -- Computes the mixture of the sets in al: mix(i) indicates how many -- times the ith list, given by al(perm(i)), occurs in the array. -- The list with minimal occurence stands in front. function Permute ( perm : Vector; al : in Array_of_Lists ) return Array_of_Lists; -- DESCRIPTION : -- The returned array is permuted according to the permutation vector. function Different_Points ( al : Array_of_Lists ) return List; -- DESCRIPTION : -- Returns a list of all different points from the lists -- of al, the first list will not be considered. function Different_Points ( al : Array_of_Lists ) return Array_of_Lists; -- DESCRIPTION : -- Returns lists of all different points from the lists -- of al, the first list will not be considered. procedure Remove_Duplicates ( al : in out Array_of_Lists ); -- DESCRIPTION : -- Except for the first list, all duplicates will be removed from -- the lists in al. procedure Shift ( al : in out Array_of_Lists; shiftvecs : in Integer_Vectors_of_Vectors.Vector ); function Shift ( al : Array_of_Lists; shiftvecs : Integer_Vectors_of_Vectors.Vector ) return Array_of_Lists; -- DESCRIPTION : -- All lists in al will be shifted along the degrees in shiftvecs. -- REQUIRED : -- The ranges of shiftvecs and al are the same. procedure Projection ( al : in Array_of_Lists; v : in Vector; ind : integer; res : in out Array_of_Lists; degenerate : out boolean ); -- DESCRIPTION : -- The first list in al will not be considered. -- after termination: -- 1. degenerate = false: -- res is an array of degrees lists where for all points x in -- the list res(i) the following holds: < x , v > = pv, where -- pv equals the support of the list res(i) in the direction v. -- The ind-entry of each point in the lists has been deleted. -- Duplicates have been removed from the lists. -- 2. degenerate = true: -- if there exists an entry i for which Length_Of(res(i)) = 1. -- REQUIRED : al'first = res'first and al'last = res'last + 1 end Arrays_of_Lists_Utilities; SHAR_EOF fi # end of overwriting check if test -f 'binomials.adb' then echo shar: will not over-write existing file "'binomials.adb'" else cat << "SHAR_EOF" > 'binomials.adb' with Complex_Numbers,Complex_Norms; use Complex_Numbers,Complex_Norms; with Integer_Vectors; with Transforming_Solutions; use Transforming_Solutions; --with text_io,integer_io; use text_io,integer_io; --with Transformations_io; use Transformations_io; --with Integer_Vectors_of_Vectors_io; use Integer_Vectors_of_Vectors_io; package body Binomials is -- AN INTERMEDIATE ROUTINE : -- procedure Factorize ( v : in out Vector; n : in natural; t : in out Transfo ) is -- DESCRIPTION : -- This routines factorizes the binomial system defined by the -- degrees in the Vector v; -- ON ENTRY : -- v defines the degrees of binomial system -- n the number of unknowns to be eliminated -- ON RETURN : -- v the factorized binomial system -- t the transformations used to factorize tt : Transfo; pivot : integer; tmp : Integer_Vectors.Link_to_Vector; begin t := Id(v'last); for i in 1..n loop -- SEARCH FOR PIVOT : pivot := 0; for j in i..v'last loop if v(j)(i) /= 0 then pivot := j; --put("Pivot : "); put(pivot,1); new_line; exit; end if; end loop; if pivot /= 0 then -- INTERCHANGE IF NECESSARY if pivot /= i then tmp := v(i); v(i) := v(pivot); v(pivot) := tmp; --put_line("The pivoted matrix :"); put(v); end if; tt := Rotate(v(i),i); Apply(tt,v(i)); for j in (i+1)..v'last loop Apply(tt,v(j)); v(j).all(i) := 0; end loop; --put("Step "); put(i,1); put_line(" :"); --put_line("The transformation :"); put(tt); --put_line("The transformed matrix :"); put(v); Mult1(t,tt); Clear(tt); end if; end loop; end Factorize; -- AUXILIARY ROUTINES : procedure Update ( sols1,sols2 : in out Solution_List ) is tmp : Solution_List := sols2; ls : Link_to_Solution; begin while not Is_Null(tmp) loop ls := Head_Of(tmp); declare nls : Link_to_Solution := new Solution'(ls.all); begin Construct(nls,sols1); end; tmp := Tail_Of(tmp); end loop; Clear(sols2); end Update; procedure Solve ( v : in Vector; cv : in Complex_Vectors.Vector; i,n : in natural; sols : in out Solution_List; acc : in out Complex_Vectors.Vector ) is t : Transfo; pivot,d : integer; a : double_complex; c : Complex_Vectors.Vector(cv'range) := cv; rv : Complex_Vectors.Vector(cv'range); tmp : Integer_Vectors.Link_to_Vector; nv : Vector(v'range); temp : array(v'range) of integer; newsols : Solution_List; begin for j in i..v'last loop nv(j) := new Integer_Vectors.Vector'(v(j).all); end loop; -- SEARCH FOR PIVOT : pivot := 0; for j in i..v'last loop if nv(j)(i) /= 0 then pivot := j; exit; end if; end loop; if pivot /= 0 then -- INTERCHANGE IF NECESSARY : if pivot /= i then tmp := nv(i); nv(i) := nv(pivot); nv(pivot) := tmp; a := c(i); c(i) := c(pivot); c(pivot) := a; end if; t := Rotate(nv(i),i); Apply(t,nv(i)); for j in (i+1)..nv'last loop Apply(t,nv(j)); temp(j) := nv(j)(i); nv(j)(i) := 0; end loop; -- COMPUTE THE SOLUTIONS : d := nv(i)(i); if d < 0 then d := -d; rv(i) := CMPLX(1.0)/c(i); else rv(i) := c(i); end if; for j in 1..d loop a := de_Moivre(d,j,rv(i)); acc(i) := a; for k in (i+1)..nv'last loop rv(k) := c(k)*a**(-temp(k)); end loop; if i < n then Solve(nv,rv,i+1,n,newsols,acc); else -- i = n declare ls : Link_to_Solution; s : Solution(n); begin s.t := CMPLX(0.0); s.m := 1; s.v := acc; ls := new Solution'(s); Construct(ls,newsols); end; end if; Transform(t,newsols); Update(sols,newsols); end loop; Clear(t); end if; for j in i..nv'last loop Integer_Vectors.Clear(nv(j)); end loop; end Solve; -- THE SOLVER : procedure Solve ( v : in Vector; cv : in Complex_Vectors.Vector; n : in natural; sols : in out Solution_List ) is wv : Vector(v'range); -- workspace acc : Complex_Vectors.Vector(cv'range); -- accumulator begin for i in v'range loop wv(i) := new Integer_Vectors.Vector'(v(i).all); end loop; Solve(wv,cv,v'first,v'last,sols,acc); Clear(wv); end Solve; -- COMPUTING THE RESIDUALS : procedure Residuals ( v : in Vector; cv : in Complex_Vectors.Vector; n : in natural; sols : in Solution_List; res : out Complex_Vectors.Vector ) is nb : natural; x : Complex_Vectors.Vector(cv'range); tmp : Solution_List; function Eval ( v : Vector; cv,x : Complex_Vectors.Vector ) return Complex_Vectors.Vector is -- DESCRIPTION : -- Computes the value of the vector x in the system defined by -- v and cv. y : Complex_Vectors.Vector(x'range); begin for i in x'range loop y(i) := CMPLX(1.0); for j in v(i)'range loop y(i) := y(i)*x(j)**v(i)(j); end loop; y(i) := y(i) - cv(i); end loop; return y; end Eval; begin tmp := sols; nb := 1; while not Is_Null(tmp) loop x := Head_Of(tmp).v; res(nb) := CMPLX(Norm2(Eval(v,cv,x))); tmp := Tail_Of(tmp); nb := nb + 1; end loop; end Residuals; end Binomials; SHAR_EOF fi # end of overwriting check if test -f 'binomials.ads' then echo shar: will not over-write existing file "'binomials.ads'" else cat << "SHAR_EOF" > 'binomials.ads' with Integer_Vectors_of_Vectors; use Integer_Vectors_of_Vectors; with Transformations; use Transformations; with Complex_Vectors; with Solutions; use Solutions; package Binomials is -- DESCRIPTION : -- This package contains a routine for the solution of a binomial system, -- where the i-th equation is defined as follows: -- -- X^u_i - c_i = 0, for i = 1,2,..,n, -- with -- [ u ]_i a vector of degrees and [ c ]_i a vector of complex numbers, -- -- using a multi_index notation: X^u_i = x1^u_i1 x2^u_i2 . . . xn^u_in. procedure Factorize ( v : in out Vector; n : in natural; t : in out Transfo ); -- DESCRIPTION : -- This routines factorizes the binomial system defined by the -- degrees in the vector v. -- ON ENTRY : -- v defines the degrees of binomial system; -- n the number of unknowns to be eliminated. -- ON RETURN : -- v the factorized binomial system; -- t the transformations used to factorize. procedure Solve ( v : in Vector; cv : in Complex_Vectors.Vector; n : in natural; sols : in out Solution_List ); -- DESCRIPTION : -- This routine solves the binomial system defined by the degrees -- in the vector v and by the constants in the vector cv. -- REQUIRED : -- The vector cv contains no zero components! -- ON ENTRY : -- v defines the degrees of binomial system; -- cv is the vector of constants; -- n the dimension of the system. -- ON RETURN : -- sols is the solution list of the binomial system. procedure Residuals ( v : in Vector; cv : in Complex_Vectors.Vector; n : in natural; sols : in Solution_List; res : out Complex_Vectors.Vector ); -- DESCRIPTION : -- This routine computes the residuals of the solutions of -- the binomial system defined by v and cv. -- REQUIRED : -- The dimension of res equals the number of solutions in sols. -- ON ENTRY : -- v defines the degrees of the binomial system; -- cv the vector of constants; -- n the dimension of the system; -- sols is the solution list of the binomial system. -- ON RETURN : -- res a vector of residuals. end Binomials; SHAR_EOF fi # end of overwriting check if test -f 'driver_for_polyhedral_continuation.adb' then echo shar: will not over-write existing file "'driver_for_polyhedral_continuation.adb'" else cat << "SHAR_EOF" > 'driver_for_polyhedral_continuation.adb' with Communications_with_User; use Communications_with_User; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Polynomial_Randomizers; use Polynomial_Randomizers; with Drivers_for_Polynomial_Continuation; use Drivers_for_Polynomial_Continuation; procedure Driver_for_Polyhedral_Continuation ( file : in file_type; p : in Poly_Sys; k : in natural; byebye : in boolean; q : out Poly_Sys; qfile,solsfile : in out file_type; tosolve,ranstart,contrep : out boolean ) is ans : character; oc : natural; qq : Poly_Sys(p'range); begin new_line; put_line("MENU for Polyhedral Continuation : "); put_line(" 0. No polyhedral continuation, leave the menu."); put_line(" 1. Solve given system by polyhedral continuation."); put_line(" 2. Create and solve random coefficient system."); put("Type 0,1, or 2 to choose : "); Ask_Alternative(ans,"012"); tosolve := (ans /= '0'); ranstart := (ans = '2'); if ans /= '0' then if ans = '2' then put_line("Reading a file name to write random coefficient system."); Read_Name_and_Create_File(qfile); qq := Complex_Randomize1(p); q := qq; if k = 0 then new_line(file); put_line(file,"RANDOM COEFFICIENT START SYSTEM :"); new_line(file); put_line(file,qq); put_line(qfile,qq); end if; else q := p; put_line("Reading a name of a file to write start solutions on."); Read_Name_and_Create_File(solsfile); end if; new_line; Driver_for_Continuation_Parameters(file); new_line; Driver_for_Process_io(file,oc); contrep := (oc /= 0); end if; if byebye then new_line; put_line("No more input expected. See output file for results."); new_line; end if; end Driver_for_Polyhedral_Continuation; SHAR_EOF fi # end of overwriting check if test -f 'driver_for_polyhedral_continuation.ads' then echo shar: will not over-write existing file "'driver_for_polyhedral_continuation.ads'" else cat << "SHAR_EOF" > 'driver_for_polyhedral_continuation.ads' with text_io; use text_io; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; procedure Driver_for_Polyhedral_Continuation ( file : in file_type; p : in Poly_Sys; k : in natural; byebye : in boolean; q : out Poly_Sys; qfile,solsfile : in out file_type; tosolve,ranstart,contrep : out boolean ); -- DESCRIPTION : -- Prepares the settings for polyhedral continuation. -- ON ENTRY : -- file output file, must be opened for output; -- p a polynomial system; -- k if k > 0, then q will not be written on file; -- byebye if true, then a bye-bye message will appear on screen, -- if false, then no bye-bye. -- ON RETURN : -- q system to solve, if tosolve=true; -- qfile output file for q, is opened for output; -- solsfile output file for solutions of q, is opened for output; -- tosolve true if polyhedral will be applied, false otherwise; -- ranstart true if q is random coefficient start system, false otherwise; -- contrep true if output information is wanted during continuation. SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_implicit_lifting.adb' then echo shar: will not over-write existing file "'drivers_for_implicit_lifting.adb'" else cat << "SHAR_EOF" > 'drivers_for_implicit_lifting.adb' with Communications_with_User; use Communications_with_User; with Timing_Package; use Timing_Package; with integer_io,Numbers_io; use integer_io,Numbers_io; with Solutions_io; use Solutions_io; with Complex_Vectors,Complex_Norms; use Complex_Vectors,Complex_Norms; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Drivers_for_Vertex_Points; use Drivers_for_Vertex_Points; with Natural_Vectors; with Set_Structure,Set_Structure_io; with Set_Structures_and_Volumes; use Set_Structures_and_Volumes; with Trees_of_Vectors; use Trees_of_Vectors; with Trees_of_Vectors_io; use Trees_of_Vectors_io; with Generic_Position; with Driver_for_Polyhedral_Continuation; package body Drivers_for_Implicit_Lifting is procedure Implicit_Lifting_Info is i : array(1..20) of string(1..65); begin i( 1):=" The mixed volume of the tuple of Newton polytopes gives an"; i( 2):="upper bound for the number of complex isolated solutions with"; i( 3):="nonzero coefficients. This BKK bound (called after Bernshtein,"; i( 4):="Koushnirenko and Khovanskii) is exact when the coefficients are"; i( 5):="sufficiently chosen at random or when the polytopes are in"; i( 6):="generic position w.r.t. each other. "; i( 7):=" By implicit lifting, the mixed volume is computed by lifting up"; i( 8):="the origin of the first polytope and by computing those facets of"; i( 9):="the lower hull of the Minkowski sum that are spanned by edge-edge"; i(10):="combinations. This procedure to compute the mixed volume uses"; i(11):="recursion on the dimension. "; i(12):=" A random coefficient start system has the same Newton polytopes"; i(13):="as the target system, but all coefficients are randomly chosen"; i(14):="complex numbers. To solve a random coefficient start system,"; i(15):="homotopy continuation is invoked in a recursive way, similar to"; i(16):="the computation of the mixed volume. "; i(17):=" By constructing a set structure for the first k equations and"; i(18):="computing the mixed volumes of the remaining n-k equations"; i(19):="obtained after elimination, a combined Bezout-BKK bound is"; i(20):="computed. "; for k in i'range loop put_line(i(k)); end loop; end Implicit_Lifting_Info; procedure Driver_for_Mixture_Bezout_BKK ( file : in file_type; p : in Poly_Sys; byebye : in boolean; q : out Poly_Sys; qsols : out Solution_List; b : out natural ) is welcome : constant string := "Mixed-Volume Computation by Implicit Lifting"; -- VARIABLES : n,bkk,k : natural; ans : character; timer : timing_widget; tdft,gft,solsft : file_type; td : Tree_of_Vectors; pp,qq : Poly_Sys(p'range); qqsols : Solution_List; -- SWITCHES TO BE SET : verpts : boolean; -- to extract the vertex points havetd : boolean; -- already a tree of directions available wanttd : boolean; -- put a tree of directions on separate file tosolve : boolean; -- a system has to be solved ranstart : boolean; -- for random coefficient start system contrep : boolean; -- reporting during continuation begin new_line; put_line(welcome); n := p'length; new_line; put("Do you first want to extract the vertex points ? (y/n) "); Ask_Yes_or_No(ans); verpts := (ans = 'y'); if verpts then put_line("Computing the vertex points..."); Copy(p,pp); Vertex_Points(file,pp); else pp := p; end if; new_line; put_line("MENU for Mixture between Bezout and BKK Bound :"); put_line(" k = 0 : for computation of the BKK bound;"); put(" k = "); put(n,1); put_line(" : for a generalized Bezout number;"); put(" 0 < k < "); put(n,1); put_line(" : gives a mixed Bezout BKK bound."); put("Give the number k between 0 and "); put(n,1); put(" : "); Read_Natural(k); if k > 0 then new_line; put_line("Do you have a good set structure"); put("for the first "); put(k,1); put(" polynomials ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then declare ns : Natural_Vectors.Vector(p'range); begin for i in 1..k loop put(" Give the number of sets for polynomial "); put(i,1); put(" : "); Read_Natural(ns(i)); end loop; ns(k+1..n) := (k+1..n => 0); Set_Structure.Init(ns); put_line("Give the set structure :"); Set_Structure_io.get; end; else Build_RPS(k,n,pp); end if; new_line(file); put_line(file, "******* MIXTURE BETWEEN BEZOUT AND BKK BOUND *******"); new_line(file); put(file,"Set structure for the first "); put(file,k,1); put_line(file," polynomials : "); Set_Structure_io.put(file); end if; new_line; put("Do you have a tree of useful directions ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then put_line("Reading the name of the file where the tree is."); declare tdf : file_type; begin Read_Name_and_Open_File(tdf); get(tdf,n-k,td); Close(tdf); havetd := true; exception when others => put_line("There is something wrong with your tree ..."); havetd := false; end; else havetd := false; end if; if not havetd then put("Do you want the useful directions on separate file ? (y/n) "); Ask_Yes_or_No(ans); wanttd := (ans = 'y'); if wanttd then put_line("Reading a name of a file to write tree on."); Read_Name_and_Create_File(tdft); end if; else wanttd := false; end if; Driver_for_Polyhedral_Continuation (file,pp,k,byebye,qq,gft,solsft,tosolve,ranstart,contrep); tstart(timer); if tosolve then new_line(file); put_line(file,"INTERMEDIATE RESULTS :"); new_line(file); if havetd then Mixed_Solve(file,k,n,pp,td,bkk,qq,qqsols); elsif wanttd then Bezout_BKK(k,n,pp,td,bkk); put(tdft,td); Close(tdft); Mixed_Solve(file,k,n,pp,td,bkk,qq,qqsols); else Bezout_BKK(k,n,pp,td,bkk); Mixed_Solve(file,k,n,pp,td,bkk,qq,qqsols); end if; if k > 0 then put(gft,qq); new_line(file); put_line(file,"THE START SYSTEM : "); new_line(file); put_line(file,qq); end if; if ranstart then new_line(gft); put_line(gft,"THE SOLUTIONS :"); new_line(gft); put(gft,Length_Of(qqsols),n,qqsols); Close(gft); else put(solsft,Length_Of(qqsols),n,qqsols); Close(solsft); end if; q := qq; qsols := qqsols; else if havetd then bkk := Bezout_BKK(k,n,pp,td); elsif wanttd then Bezout_BKK(k,n,pp,td,bkk); put(tdft,td); Close(tdft); else Bezout_Bkk(k,n,pp,td,bkk); end if; end if; tstop(timer); b := bkk; new_line(file); if k > 0 then put(file,"The mixed Bezout BKK bound equals "); else put(file,"The BKK bound equals "); end if; put(file,bkk,1); put_line(file,"."); new_line(file); if not Is_Null(td) then put_line(file,"The tree of useful directions : "); put(file,td); new_line(file); if k = 0 then if Generic_Position(pp,td) then put_line(file,"The polytopes may be in generic position."); else put_line(file,"The polytopes are not in generic position."); end if; new_line(file); end if; end if; print_times(file,timer,"mixed homotopy method"); new_line(file); if ans = 'y' then new_line(file); put_line(file,"RANDOM COEFFICIENT START SYSTEM :"); new_line(file); put(file,qq); new_line(file); put_line(file,"THE SOLUTIONS : "); put(file,Length_Of(qqsols),n,qqsols); end if; if verpts then Clear(pp); end if; end Driver_for_Mixture_Bezout_BKK; end Drivers_for_Implicit_Lifting; SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_implicit_lifting.ads' then echo shar: will not over-write existing file "'drivers_for_implicit_lifting.ads'" else cat << "SHAR_EOF" > 'drivers_for_implicit_lifting.ads' with text_io,Solutions; use text_io,Solutions; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; package Drivers_for_Implicit_Lifting is procedure Implicit_Lifting_Info; -- DESCRIPTION : -- Displays information on the BKK Bound on screen. procedure Driver_for_Mixture_Bezout_BKK ( file : in file_type; p : in Poly_Sys; byebye : in boolean; q : out Poly_Sys; qsols : out Solution_List; b : out natural ); -- DESCRIPTION : -- This driver allows to compute a mixture between a generalized Bezout -- number and the BKK bound. -- ON ENTRY : -- file to write diagnostics on; -- p a polynomial system; -- byebye if true, then a bye-bye message will appear on screen, -- if false, then no bye-bye. -- ON RETURN : -- q a start system; -- qsols the solutions of q; -- b Bezout-BKK bound for the number of finite solutions of p. end Drivers_for_Implicit_Lifting; SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_vertex_points.adb' then echo shar: will not over-write existing file "'drivers_for_vertex_points.adb'" else cat << "SHAR_EOF" > 'drivers_for_vertex_points.adb' with integer_io; use integer_io; with Timing_Package,Vertices; use Timing_Package,Vertices; with Lists_of_Integer_Vectors_io; use Lists_of_Integer_Vectors_io; with Power_Lists; use Power_Lists; package body Drivers_for_Vertex_Points is procedure Vertex_Points ( file : in file_type; l : in out List ) is timer : timing_widget; res : List; begin put_line(file,"**** THE SUPPORT ****"); new_line(file); put(file,l); new_line(file); tstart(timer); res := Vertex_Points(l); tstop(timer); new_line(file); put_line(file,"**** THE VERTEX POINTS ****"); new_line(file); put(file,res); new_line(file); put_line(file,"**** REDUCTION OF POINTS ****"); new_line(file); put(file,"The number of points in the support : "); put(file,Length_Of(l),1); new_line(file); put(file,"The number of remaining vertex points : "); put(file,Length_Of(res),1); new_line(file); new_line(file); print_times(file,timer,"computing the vertex points"); new_line(file); Clear(l); l := res; end Vertex_Points; procedure Vertex_Points ( file : in file_type; l : in out Array_of_Lists ) is timer : timing_widget; res : Array_of_Lists(l'range); begin tstart(timer); for i in res'range loop res(i) := Vertex_Points(l(i)); end loop; tstop(timer); new_line(file); put_line(file,"**** THE VERTEX POINTS ****"); new_line(file); for i in res'range loop put(file,res(i)); new_line(file); end loop; put_line(file,"**** REDUCTION OF POINTS ****"); new_line(file); for i in l'range loop put(file,"The #points versus #vertices for support "); put(file,i,1); put(file," : "); put(file,Length_Of(l(i)),1); put(file," -> "); put(file,Length_Of(res(i)),1); new_line(file); end loop; new_line(file); print_times(file,timer,"computing the vertex points"); new_line(file); for i in l'range loop Clear(l(i)); l(i) := res(i); end loop; end Vertex_Points; procedure Vertex_Points ( file : in file_type; mix : in Link_to_Vector; l : in out Array_of_Lists ) is timer : timing_widget; res : Array_of_Lists(l'range); cnt : natural; begin tstart(timer); cnt := 1; for i in mix'range loop res(cnt) := Vertex_Points(l(cnt)); cnt := cnt + mix(i); end loop; tstop(timer); new_line(file); put_line(file,"**** THE VERTEX POINTS ****"); new_line(file); cnt := 1; for i in mix'range loop put(file,res(cnt)); new_line(file); cnt := cnt + mix(i); end loop; put_line(file,"**** REDUCTION OF POINTS ****"); new_line(file); cnt := 1; for i in mix'range loop put(file,"The #points versus #vertices for support "); put(file,cnt,1); put(file," : "); put(file,Length_Of(l(cnt)),1); put(file," -> "); put(file,Length_Of(res(cnt)),1); new_line(file); cnt := cnt + mix(i); end loop; new_line(file); print_times(file,timer,"computing the vertex points"); new_line(file); cnt := 1; for i in mix'range loop for j in 0..(mix(i)-1) loop Clear(l(cnt+j)); l(cnt+j) := res(cnt); end loop; cnt := cnt + mix(i); end loop; end Vertex_Points; procedure Vertex_Points ( file : in file_type; p : in out Poly_Sys ) is l : Array_of_Lists(p'range) := Construct_Power_Lists(p); res : Poly_Sys(p'range); begin Vertex_Points(file,l); res := Select_Terms(p,l); Deep_Clear(l); Clear(p); p := res; end Vertex_Points; procedure Vertex_Points ( file : in file_type; mix : in Link_to_Vector; p : in out Poly_Sys ) is l : Array_of_Lists(p'range) := Construct_Power_Lists(p); res : Poly_Sys(p'range); begin Vertex_Points(file,mix,l); res := Select_Terms(p,l); Deep_Clear(l); Clear(p); p := res; end Vertex_Points; end Drivers_for_Vertex_Points; SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_vertex_points.ads' then echo shar: will not over-write existing file "'drivers_for_vertex_points.ads'" else cat << "SHAR_EOF" > 'drivers_for_vertex_points.ads' with text_io,Integer_Vectors; use text_io,Integer_Vectors; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; package Drivers_for_Vertex_Points is -- DESCRIPTION : -- This package provides two drivers for extracting the vertex -- point out of a tuple of point lists. procedure Vertex_Points ( file : in file_type; l : in out List ); procedure Vertex_Points ( file : in file_type; l : in out Array_of_Lists ); procedure Vertex_Points ( file : in file_type; mix : in Link_to_Vector; l : in out Array_of_Lists ); -- DESCRIPTION : -- Reduces the lists to the lists of vertex points. -- REQUIRED : -- If the type of mixture (mix) is provided, then the tuple of lists -- must be sorted according to this vector mix. -- ON ENTRY : -- file for writing diagnostics and statistics; -- mix number of different lists in the tuple l, -- if not provided, then it will be assumed that all lists -- are different from each other; -- l (tuple of) list(s). -- ON RETURN : -- l (tuple of) list(s) with nothing but vertex points. procedure Vertex_Points ( file : in file_type; p : in out Poly_Sys ); procedure Vertex_Points ( file : in file_type; mix : in Link_to_Vector; p : in out Poly_Sys ); -- DESCRIPTION : -- Reduces the supports of the polynomials to their vertex points. -- Merely a driver to the procedures listed above. end Drivers_for_Vertex_Points; SHAR_EOF fi # end of overwriting check if test -f 'durand_kerner.adb' then echo shar: will not over-write existing file "'durand_kerner.adb'" else cat << "SHAR_EOF" > 'durand_kerner.adb' with Complex_Numbers,Complex_Norms; use Complex_Numbers,Complex_Norms; procedure Durand_Kerner ( p : in Vector; z,res : in out Vector; maxsteps : in natural; eps : in double_float; nb : out natural ) is pp : Vector(p'range); function Horner ( p : Vector; x : double_complex ) return double_complex is -- DESCRIPTION : -- Returns (..((a[n]*x + a[n-1])*x + a[n-2])*x + .. + a[1])*x + a[0]. begin if p'first = p'last then return p(p'first); else declare res : double_complex := p(p'last); begin for i in reverse p'first..(p'last-1) loop res := res*x + p(i); end loop; return res; end; end if; end Horner; procedure DK ( p : in Vector; z,res : in out Vector ) is -- DESCRIPTION : -- Computes one step in the Durand-Kerner iteration. function Compute_q ( i : integer; a : Vector ) return double_complex is -- DESCRIPTION : -- Computes the quotient needed in the Durand-Kerner step. res : double_complex; begin res := CMPLX(1.0); for j in a'range loop if j /= i then res := res*(a(i)-a(j)); end if; end loop; return res; end Compute_q; begin for i in z'range loop z(i) := z(i) - Horner(p,z(i))/Compute_q(i,z); res(i) := Horner(p,z(i)); end loop; end DK; begin if p(p'last) /= CMPLX(1.0) then for i in p'range loop pp(i) := p(i) / p(p'last); end loop; else for i in p'range loop pp(i) := p(i); end loop; end if; for k in 1..maxsteps loop nb := k; DK(pp,z,res); Write(k,z,res); exit when (Norm2(res) <= eps); end loop; end Durand_Kerner; SHAR_EOF fi # end of overwriting check if test -f 'durand_kerner.ads' then echo shar: will not over-write existing file "'durand_kerner.ads'" else cat << "SHAR_EOF" > 'durand_kerner.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Vectors; use Complex_Vectors; generic with procedure Write ( step : in natural; z,res : in Vector ); -- DESCRIPTION : -- This routine allows to write intermediate results after each iteration, -- such as the step number, the approximations z and the residuals res. -- If no output is wanted, supply an empty body for Write. procedure Durand_Kerner ( p : in Vector; z,res : in out Vector; maxsteps : in natural; eps : in double_float; nb : out natural ); -- DESCRIPTION : -- This routine computes all roots of a given polynomial -- in one unknown, applying the method of Durand Kerner. -- ON ENTRY : -- p the polynomial defined by -- p[k] + p[k+1]*x + p[k+2]*x^2 + .. + p[k+n]*x^n, -- with k = p'first; -- z initial approximations for the roots; -- res the residuals of the roots; -- maxsteps is the maximum number of steps that are allowed; -- eps the required accuracy -- ON RETURN : -- z the computed roots; -- res the residuals of the roots; -- nb the number of steps. SHAR_EOF fi # end of overwriting check if test -f 'face_enumerator_of_sum.adb' then echo shar: will not over-write existing file "'face_enumerator_of_sum.adb'" else cat << "SHAR_EOF" > 'face_enumerator_of_sum.adb' --with text_io,integer_io; use text_io,integer_io; with Greatest_Common_Divisor; use Greatest_Common_Divisor; with Integer_Vectors; use Integer_Vectors; with Integer_Matrices; use Integer_Matrices; with Integer_Linear_System_Solvers; use Integer_Linear_System_Solvers; with Integer_Farkas_Lemma; use Integer_Farkas_Lemma; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Face_Enumerators; use Face_Enumerators; with Face_Enumerators_Utilities; use Face_Enumerators_Utilities; package body Face_Enumerator_of_Sum is -- IMPLEMENTATION : -- First all faces of the requested type are generated of the individual -- polytopes. These faces are stored and used in the generation of the -- face of the sum. -- GENERATE THE FACES : function Generate_Faces ( k : natural; pts : Integer_Vectors_of_Vectors.Vector ) return List is -- DESCRIPTION : -- Returns a list of k-faces generated by the points in pts. -- NOTE : -- An auxiliary vector wrkpts is needed, -- because Farkas_Lemma does not work entirely with relative entries. len : constant natural := pts'length; offset : constant natural := pts'first - 1; wrkpts : Integer_Vectors_of_Vectors.Vector(1..len); res : List; procedure Update ( face : in Vector ) is newface : Link_to_Vector := new Integer_Vectors.Vector'(face); begin for i in newface'range loop newface(i) := newface(i) + offset; end loop; Construct(newface,res); end Update; procedure Collect_Vertex ( i : in integer; cont : out boolean ) is face : Vector(0..0); begin face(0) := i; Update(face); cont := true; end Collect_Vertex; procedure Collect_Vertices is new Enumerate_Vertices(Collect_Vertex); procedure Collect_Edge ( i,j : in integer; cont : out boolean ) is face : Vector(0..1); begin face(0) := i; face(1) := j; Update(face); cont := true; end Collect_Edge; procedure Collect_Edges is new Enumerate_Edges(Collect_Edge); procedure Collect_Face ( face : in Vector; cont : out boolean ) is begin Update(face); cont := true; end Collect_Face; procedure Collect_Faces is new Enumerate_Faces(Collect_Face); begin wrkpts(1..len) := pts(pts'range); case k is when 0 => Collect_Vertices(wrkpts); when 1 => Collect_Edges(wrkpts); when others => Collect_Faces(k,wrkpts); end case; return res; end Generate_Faces; function Generate_Faces ( typ,ind : vector; pts : Integer_Vectors_of_Vectors.Vector ) return Array_of_Lists is -- DESCRIPTION : -- Returns an array of lists, which contains the typ(i)-faces of the -- polytope generated by pts(ind(i)..ind(i+1)-1). res : Array_of_Lists(typ'range); begin for i in res'range loop if i < ind'last then res(i) := Generate_Faces(typ(i),pts(ind(i)..ind(i+1)-1)); else res(i) := Generate_Faces(typ(i),pts(ind(i)..pts'last)); end if; end loop; return res; end Generate_Faces; -- ELIMINATORS : procedure Eliminate ( pivot : in integer; elim : in Integer_Vectors.Vector; target : in out Integer_Vectors.Vector ) is -- DESCRIPTION : -- Makes target(pivot) = 0 by means of making a linear -- combination of the vectors target and elim. -- REQUIRED ON ENTRY : -- target(pivot) /= 0 and elim(pivot) /= 0 a,b,lcmab,faca,facb : integer; begin a := elim(pivot); b := target(pivot); lcmab := lcm(a,b); if lcmab < 0 then lcmab := -lcmab; end if; faca := lcmab/a; facb := lcmab/b; if facb < 0 then facb := -facb; faca := -faca; end if; for j in target'range loop target(j) := facb*target(j) - faca*elim(j); end loop; Scale(target); end Eliminate; procedure Eliminate ( l : in natural; pivots : in Integer_Vectors.Vector; elim : in Integer_Vectors_of_Vectors.Vector; target : in out Integer_Vectors.Vector ) is -- DESCRIPTION : -- Makes target(pivots(i)) = 0 by means of making a linear -- combination of the vectors target and elim(i), for i in 1..l. -- REQUIRED ON ENTRY : -- elim(i)(pivots(i)) /= 0 begin for i in 1..l loop if target(pivots(i)) /= 0 then Eliminate(pivots(i),elim(i).all,target); end if; end loop; end Eliminate; function Pivot_after_Elimination ( l,k : in natural; point,face,pivots : in Integer_Vectors.Vector; elim : in Integer_Vectors_of_Vectors.Vector ) return natural is -- DESCRIPTION : -- Returns the first nonzero element of the given point after elimination -- w.r.t. the entries in the face with lower index. work : Integer_Vectors.Vector(point'range) := point - elim(1-k).all; pivot : integer; begin for i in (face'first+1)..face'last loop if (face(i) < l) and then (work(pivots(i)) /= 0) then Eliminate(pivots(i),elim(i).all,work); end if; exit when (face(i) > l); end loop; pivot := 0; for i in work'range loop if work(pivots(i)) /= 0 then pivot := i; end if; exit when (pivot /= 0); end loop; return pivot; end Pivot_after_Elimination; procedure Update_Pivots ( point : in Integer_Vectors.Vector; l : in natural; pivots : in out Integer_Vectors.Vector; pivot : out natural ) is -- DESCRIPTION : -- Searches in the point(l..point'last) for the first nonzero entry -- and updates the pivoting information. temp,piv : integer; begin piv := 0; for i in l..point'last loop if point(pivots(i)) /= 0 then piv := i; end if; exit when (piv /= 0); end loop; if piv /= 0 and then (piv /= l) then temp := pivots(l); pivots(l) := pivots(piv); pivots(piv) := temp; end if; pivot := piv; end Update_Pivots; procedure Update_Eliminator_for_Sum ( elim : in out Integer_Vectors_of_Vectors.Vector; l : in natural; pivots : in out Integer_Vectors.Vector; point : in Integer_Vectors.Vector; index : in natural; pivot : out natural ) is -- DESCRIPTION : -- Updates the vector of eliminators, by adding the lth elimination -- equation. This procedure ensures the invariant condition on the -- eliminator, which has to be upper triangular. If this cannot be -- achieved, degeneracy is indicated by pivot = 0. -- ON ENTRY : -- elim vector of elimination equations: elim(i)(pivots(i)) /= 0 -- and for j in 1..(i-1) : elim(i)(pivots(j)) = 0, -- for i in 1..(l-1), elim(1-index) contains the basis point; -- l index of current elimination equation to be made; -- pivots contains the pivoting information; -- point new point to make the equation `point - elim(1-index) = 0'; -- index indicates the current polytope. -- ON RETURN : -- elim if not degen, then elim(l)(pivots(l)) /= 0 and -- for i in 1..(l-1): elim(l)(pivots(i)) = 0; -- pivots updated pivot information; -- piv the pivot that has been used for elim(l)(pivots(l)) /= 0; -- piv = 0 when the new elimination equation elim(l) -- became entirely zero after ensuring the invariant condition. begin elim(l) := new Integer_Vectors.Vector'(point - elim(1-index).all); Eliminate(l-1,pivots,elim,elim(l).all); Update_Pivots(elim(l).all,l,pivots,pivot); end Update_Eliminator_for_Sum; procedure Create_Tableau_for_Faces_of_Sum ( k,n,i,r : in natural; ind,pivots : in Integer_Vectors.Vector; pts,elim,face : in Integer_Vectors_of_Vectors.Vector; tab : out matrix; lastcol : out integer; degenerate : out boolean ) is -- DESCRIPTION : -- Creates the table of inequalities for determining whether the given -- candidate face spans a face of the sum polytope. -- ON ENTRY : -- k dimension of the face on the sum; -- n dimension of the points; -- i current polytope; -- r number of polytopes; -- ind indicate the beginning vector in pts of each polytope; -- etc... column : integer := 1; ineq : Integer_Vectors.Vector(1..n); last : integer; begin degenerate := false; for l1 in face'first..i loop if l1 = r then last := pts'last; else last := ind(l1+1)-1; end if; for l2 in ind(l1)..last loop if not Is_In(l2,face(l1).all) then ineq := pts(l2).all - elim(1-l1).all; -- new inequality Eliminate(k,pivots,elim,ineq); -- ineq(pivots(i)) = 0, i=1,2,..k if Is_Zero(ineq) then if not In_Face(face(l1)'length-1,face(l1).all,pts(l2).all,pts) and then face(l1)(face(l1)'first) <= l2 and then l2 < face(l1)(face(l1)'last) -- lexicographic enumeration and then (Pivot_after_Elimination (l2,l1,pts(l2).all,face(l1).all,pivots,elim) /= 0) then degenerate := true; return; end if; else for ll in (k+1)..n loop -- fill in the column tab(ll-k,column) := ineq(pivots(ll)); end loop; tab(tab'last(1),column) := 1; column := column + 1; end if; end if; end loop; end loop; for l in tab'first(1)..(tab'last(1)-1) loop -- right hand side tab(l,tab'last(2)) := 0; end loop; tab(tab'last(1),tab'last(2)) := 1; lastcol := column-1; end Create_Tableau_for_Faces_of_Sum; function Is_Face_of_Sum ( k,n,m,i,r : natural; elim,pts,face : Integer_Vectors_of_Vectors.Vector; ind,pivots : Integer_Vectors.Vector ) return boolean is -- DESCRIPTION : -- Applies Complementary Slackness to determine whether the given -- candidate face is a face of the polytope. -- ON ENTRY : -- k dimension of the candidate face; -- n dimension of the vector space; -- m number of total points which span the polytope; -- i current polytope; -- r number of different polytopes; -- elim elimination equations in upper triangular form; -- pts the points which span the polytope; -- face entries of the points which span the candidate face; -- ind indicates the starting vector in pts of each polytope; -- pivots pivoting information for the elimination equations. nn : constant natural := n-k+1; tab : matrix(1..nn,1..(m-k)); deg,feasible : boolean; lst : integer; begin if m - k <= 1 then return true; else Create_Tableau_for_Faces_of_Sum (k,n,i,r,ind,pivots,pts,elim,face,tab,lst,deg); -- put_line("The tableau of inequalities : "); put(tab); if deg then --put_line("Tableau is degenerate: no solution :"); return false; elsif lst = 0 then return true; else Integer_Complementary_Slackness(tab,lst,feasible); --if feasible -- then put_line(" is feasible"); -- else put_line(" is not feasible"); --end if; return not feasible; end if; end if; end Is_Face_of_Sum; -- TARGET ROUTINE : procedure Enumerate_Faces_of_Sum ( ind,typ : in vector; k : in natural; pts : in Integer_Vectors_of_Vectors.Vector ) is m : constant natural := pts'length; -- number of points n : constant natural := pts(pts'first)'length; -- dimension of vectors r : constant natural := ind'length; -- number of polytopes faces : Array_of_Lists(typ'range); -- all typ(i)-faces candidates : Integer_Vectors_of_Vectors.Vector(1..r); -- current tuple elim : Integer_Vectors_of_Vectors.Vector(1-r..k); -- elimination vector continue : boolean := true; last,sum,piv : natural; procedure Candidate_Faces_of_Sum ( ipvt : in Integer_Vectors.Vector; i : in integer ) is -- DESCRIPTION : -- Enumerates all typ(i)-faces of the given type in the sum, -- i indicates the current polytope. tmp : List := faces(i); pivots : Integer_Vectors.Vector(1..n); begin if i = r -- initialization then last := m; else last := ind(i+1)-1; end if; sum := sum + typ(i); while not Is_Null(tmp) loop -- enumerate all typ(i)-faces candidates(i) := Head_Of(tmp); elim(1-i) := pts(candidates(i)(0)); -- update the eliminator pivots := ipvt; piv := 1; for j in candidates(i)'first+1..candidates(i)'last loop Update_Eliminator_for_Sum(elim,sum-typ(i)+j,pivots, pts(candidates(i)(j)).all,i,piv); exit when (piv = 0); end loop; if (piv /= 0) -- decide to proceed and then ((typ(i) = last-ind(i)+1) or else Is_Face_of_Sum(sum,n,last-i+1,i,r,elim,pts(pts'first..last), candidates,ind,pivots)) then if i = r then Process(candidates,continue); else Candidate_Faces_of_Sum(pivots,i+1); end if; end if; for j in candidates(i)'first+1..candidates(i)'last loop -- restore Clear(elim(sum-typ(i)+j)); end loop; tmp := Tail_Of(tmp); -- take next candidate end loop; sum := sum - typ(i); end Candidate_Faces_of_Sum; begin faces := Generate_Faces(typ,ind,pts); -- put("The cardinality of the faces : "); -- for i in faces'range loop -- put(Length_Of(faces(i)),1); put(" "); -- end loop; -- new_line; declare ipvt : Integer_Vectors.Vector(1..n); begin for i in ipvt'range loop ipvt(i) := i; end loop; sum := 0; Candidate_Faces_of_Sum(ipvt,1); end; Deep_Clear(faces); end Enumerate_Faces_of_Sum; end Face_Enumerator_of_Sum; SHAR_EOF fi # end of overwriting check if test -f 'face_enumerator_of_sum.ads' then echo shar: will not over-write existing file "'face_enumerator_of_sum.ads'" else cat << "SHAR_EOF" > 'face_enumerator_of_sum.ads' with Integer_Vectors; use Integer_Vectors; with Integer_Vectors_of_Vectors; package Face_Enumerator_of_Sum is -- DESCRIPTION : -- This package contains a procedure which allows the efficient -- enumeration of all facets of a certain type of the sum of -- a tuple of polytopes. generic with procedure Process ( faces : in Integer_Vectors_of_Vectors.Vector; cont : out boolean ); -- DESCRIPTION : -- The parameter faces has the following meaning: -- faces(i) contains the entries of points in pts which span -- the k-face of the ith polytope, with k = typ(i). -- When cont is set to false, the enumeration stops. procedure Enumerate_Faces_of_Sum ( ind,typ : in vector; k : in natural; pts : in Integer_Vectors_of_Vectors.Vector ); -- DESCRIPTION : -- Enumerates the points which span faces of a certain type -- of the polytope in lexicographic order. -- ON ENTRY : -- ind ind(i) indicates where the points of the ith polytope -- in the vector pts begin; -- typ typ(i) contains the dimension k of the k-face of the ith -- polytope which spans the facet of the sum; -- k sum of the entries in typ, must be less than -- or equal to the dimension of the space; -- pts contains all points of the polytopes. -- ON RETURN : -- Each time a face of the sum has been found, Process is invoked. end Face_Enumerator_of_Sum; SHAR_EOF fi # end of overwriting check if test -f 'fewnomials.adb' then echo shar: will not over-write existing file "'fewnomials.adb'" else cat << "SHAR_EOF" > 'fewnomials.adb' with Floating_Point_Numbers; use Floating_Point_Numbers; with Integer_Vectors; with Integer_Vectors_of_Vectors; with Complex_Numbers; use Complex_Numbers; with Complex_Vectors,Complex_Matrices; use Complex_Vectors,Complex_Matrices; with Complex_Linear_System_Solvers; use Complex_Linear_System_Solvers; with Complex_Multivariate_Laurent_Polynomials; with Binomials; use Binomials; package body Fewnomials is use Complex_Multivariate_Laurent_Polynomials; function Equal ( v : Integer_Vectors.Link_to_Vector; d : Degrees ) return boolean is begin return Integer_Vectors.Equal(v,Integer_Vectors.Link_to_Vector(d)); end Equal; function Is_Fewnomial_System ( p : Laur_Sys ) return boolean is da : Integer_Vectors_of_Vectors.Vector(p'range); nb : natural; n : natural := p'last - p'first + 1; cnst : Integer_Vectors.Link_to_Vector; res : boolean; procedure Scan_Term ( t : in Term; cont : out boolean ) is found : boolean; begin found := false; for i in da'range loop exit when i > nb; if Equal(da(i),t.dg) then found := true; exit; end if; end loop; if not found then if nb < n then nb := nb + 1; found := true; da(nb) := new Integer_Vectors.Vector(t.dg'range); for j in t.dg'range loop da(nb)(j) := t.dg(j); end loop; elsif nb < n + 1 then nb := nb + 1; cnst := new Integer_Vectors.Vector(t.dg'range); found := true; for j in t.dg'range loop cnst(j) := t.dg(j); end loop; elsif Equal(cnst,t.dg) then found := true; else res := false; end if; end if; cont := found; end Scan_Term; procedure Scan_Terms is new Visiting_Iterator (Scan_Term); begin res := true; nb := 0; for i in p'range loop Scan_Terms(p(i)); exit when not res; end loop; Integer_Vectors_of_Vectors.Clear(da); Integer_Vectors.Clear(cnst); return res; end Is_Fewnomial_System; procedure Scale ( cnst : in Integer_Vectors.Link_to_Vector; da : in out Integer_Vectors_of_Vectors.Vector ) is -- DESCRIPTION : -- if cnst is not equal to the zero degrees, -- then all entries in da will be shifted along cnst. zero : boolean; begin zero := true; for i in cnst'range loop if cnst(i) /= 0 then zero := false; exit; end if; end loop; if not zero then for i in da'range loop Integer_Vectors.Min_Vector(da(i),cnst); end loop; end if; end Scale; procedure Initialize ( p : in Laur_Sys; n : in natural; a : in out matrix; b : in out vector; da : in out Integer_Vectors_of_Vectors.Vector; fail : out boolean ) is -- DESCRIPTION : -- initializes the data needed for the solver; -- fail becomes true if the system p has too many different terms. cnst : Integer_Vectors.Link_to_Vector; da_numb,cnt : natural; fl : boolean; use Integer_Vectors; procedure Search_Term ( t : in Term; cont : out boolean ) is found : boolean; begin found := false; for i in da'range loop exit when i > da_numb; if Equal(da(i),t.dg) then found := true; a(cnt,i) := t.cf; exit; end if; end loop; if not found then if da_numb < n then da_numb := da_numb + 1; da(da_numb) := new Integer_Vectors.Vector(t.dg'range); for k in da(da_numb)'range loop da(da_numb)(k) := t.dg(k); end loop; found := true; a(cnt,da_numb) := t.cf; elsif da_numb < n+1 then da_numb := da_numb + 1; cnst := new Integer_Vectors.Vector(t.dg'range); for k in cnst'range loop cnst(k) := t.dg(k); end loop; found := true; b(cnt) := -t.cf; elsif Equal(cnst,t.dg) then found := true; b(cnt) := -t.cf; end if; end if; if not found then cont := false; fl := true; else cont := true; fl := false; end if; end Search_Term; procedure Search is new Visiting_Iterator(Search_Term); begin da_numb := 0; for i in p'range loop for j in a'range(2) loop a(i,j) := CMPLX(0.0); end loop; b(i) := CMPLX(0.0); cnt := i; Search(p(i)); exit when fl; end loop; if not fl and then (cnst /= null) then Scale(cnst,da); Integer_Vectors.Clear(cnst); fail := false; else fail := true; end if; end Initialize; procedure Solve ( p : in Laur_Sys; sols : in out Solution_List; fail : out boolean ) is n : natural := p'last - p'first + 1; da : Integer_Vectors_of_Vectors.Vector(p'range); a : matrix(1..n,1..n); b : vector(1..n); fl : boolean; begin Initialize(p,n,a,b,da,fl); if fl then fail := true; else fail := false; declare piv : Integer_Vectors.Vector(1..n); info : integer; begin lufac(a,n,piv,info); if info = 0 then lusolve(a,n,piv,b); fl := false; for i in b'range loop if modulus(b(i)) + 1.0 = 1.0 then fl := true; exit; end if; end loop; if not fl then Binomials.Solve(da,b,n,sols); end if; end if; end; end if; Integer_Vectors_of_Vectors.Clear(da); end Solve; end Fewnomials; SHAR_EOF fi # end of overwriting check if test -f 'fewnomials.ads' then echo shar: will not over-write existing file "'fewnomials.ads'" else cat << "SHAR_EOF" > 'fewnomials.ads' with Complex_Laurent_Polynomial_Systems; use Complex_Laurent_Polynomial_Systems; with Solutions; use Solutions; package Fewnomials is -- DESCRIPTION : -- This package contains a solver for Laurent polynomial systems, -- where there are at most n+1 different terms. function Is_Fewnomial_System ( p : Laur_Sys ) return boolean; -- DESCRIPTION : -- returns true if p has at most n+1 different terms. procedure Solve ( p : in Laur_Sys; sols : in out Solution_List; fail : out boolean ); -- DESCRIPTION : -- tries to solve the fewnomial system p. -- ON ENTRY : -- p a Laurent polynomial system. -- ON RETURN : -- sols solutions of p, all solutions have only nonzero components; -- fail true if p has more than n+1 different terms -- or if p has an infinite number of solutions. end Fewnomials; SHAR_EOF fi # end of overwriting check if test -f 'generic_position.adb' then echo shar: will not over-write existing file "'generic_position.adb'" else cat << "SHAR_EOF" > 'generic_position.adb' with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Power_Lists; use Power_Lists; with Integer_Support_Functions; use Integer_Support_Functions; function Generic_Position ( p : Poly_Sys; tv : Tree_of_Vectors ) return boolean is -- ALGORITHM : -- Because tv contains the useful directions for the mixed volume, -- only the cardinality of the faces of the first support list will be -- checked, for all top directions in tv. res : boolean := true; tmp : Tree_of_Vectors := tv; l : List := Construct_Power_List(p(p'first)); begin while not Is_Null(tmp) loop declare nd : Node := Head_Of(tmp); fc : List; begin exit when nd.d'length < Head_Of(l)'length; fc := Outer_Face(l,nd.d.all); res := (Length_Of(fc) <= 1); Deep_Clear(fc); end; exit when not res; tmp := Tail_Of(tmp); end loop; return res; end Generic_Position; SHAR_EOF fi # end of overwriting check if test -f 'generic_position.ads' then echo shar: will not over-write existing file "'generic_position.ads'" else cat << "SHAR_EOF" > 'generic_position.ads' with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Trees_of_Vectors; use Trees_of_Vectors; function Generic_Position ( p : Poly_Sys; tv : Tree_of_Vectors ) return boolean; -- DESCRIPTION : -- Returns true if the polytopes of p are in generic position w.r.t. tv. -- If false, then it is undecided, because tv contains not all candidates. -- REQUIRED : -- tv has been computed by recursive procedure for the mixed volume. -- ON ENTRY : -- p polynomial system; -- tv tree of vectors with useful directions. SHAR_EOF fi # end of overwriting check if test -f 'integer_vectors_utilities.adb' then echo shar: will not over-write existing file "'integer_vectors_utilities.adb'" else cat << "SHAR_EOF" > 'integer_vectors_utilities.adb' with Greatest_Common_Divisor; use Greatest_Common_Divisor; package body Integer_Vectors_Utilities is -- OPERATIONS ON DEGREES : function Pivot ( v : Vector ) return integer is begin for i in v'range loop if v(i) /= 0 then return i; end if; end loop; return (v'last + 1); end Pivot; function Pivot ( v : Link_to_Vector ) return integer is begin if v = null then return 0; else return Pivot(v.all); end if; end Pivot; function gcd ( v : Vector ) return integer is temp : Vector(v'range); res : integer; begin for i in v'range loop if v(i) < 0 then temp(i) := -v(i); else temp(i) := v(i); end if; end loop; res := temp(temp'first); for i in (temp'first+1)..temp'last loop res := gcd(res,temp(i)); exit when (res = 1); end loop; return res; end gcd; function gcd ( v : Link_to_Vector ) return integer is begin if v = null then return 1; else return gcd(v.all); end if; end gcd; procedure Normalize ( v : in out Vector ) is g : integer; begin g := gcd(v); if (g /= 0) and then (g /= 1) then for i in v'range loop v(i) := v(i) / g; end loop; end if; end Normalize; procedure Normalize ( v : in out Link_to_Vector ) is begin if v /= null then Normalize(v.all); end if; end Normalize; function Reduce ( v : Vector; i : integer ) return Vector is res : Vector(v'first..(v'last-1)); begin for j in res'range loop if j < i then res(j) := v(j); else res(j) := v(j+1); end if; end loop; return res; end Reduce; function Reduce ( v : Link_to_Vector; i : integer ) return Link_to_Vector is begin if v = null then return v; else declare res : Link_to_Vector := new Vector'(Reduce(v.all,i)); begin return res; end; end if; end Reduce; procedure Reduce ( v : in out Link_to_Vector; i : in integer ) is begin if v /= null then declare res : constant Vector := Reduce(v.all,i); begin Clear(v); v := new Vector'(res); end; end if; end Reduce; function Insert ( v : Vector; i,a : integer ) return Vector is res : Vector(v'first..(v'last+1)); begin for j in res'first..(i-1) loop res(j) := v(j); end loop; res(i) := a; for j in (i+1)..res'last loop res(j) := v(j-1); end loop; return res; end Insert; function Insert ( v : Link_to_Vector; i,a : integer ) return Link_to_Vector is res : Link_to_Vector; begin if v = null then res := new Vector'(i..i => a); else res := new Vector'(Insert(v.all,i,a)); end if; return res; end Insert; procedure Insert ( v : in out Link_to_Vector; i,a : in integer ) is begin if v /= null then declare res : constant Vector := Insert(v.all,i,a); begin Clear(v); v := new Vector'(res); end; end if; end Insert; function Insert_and_Transform ( v : Vector; i,a : integer; t : Transfo ) return Vector is res : Vector(v'first..v'last+1) := Insert(v,i,a); begin Apply(t,res); return res; end Insert_and_Transform; procedure Insert_and_Transform ( v : in out Link_to_Vector; i,a : in integer; t : in Transfo ) is res : Link_to_Vector; begin res := Insert_and_Transform(v,i,a,t); Clear(v); v := res; end Insert_and_Transform; function Insert_and_Transform ( v : Link_to_Vector; i,a : integer; t : Transfo ) return Link_to_Vector is res : Link_to_Vector; begin if v = null then res := Insert(v,i,a); Apply(t,res.all); else res := new Vector'(Insert_and_Transform(v.all,i,a,t)); end if; return res; end Insert_and_Transform; end Integer_Vectors_Utilities; SHAR_EOF fi # end of overwriting check if test -f 'integer_vectors_utilities.ads' then echo shar: will not over-write existing file "'integer_vectors_utilities.ads'" else cat << "SHAR_EOF" > 'integer_vectors_utilities.ads' with Integer_Vectors; use Integer_Vectors; with Transformations; use Transformations; package Integer_Vectors_Utilities is -- DESCRIPTION : -- This package offers utilities for working with -- integer vectors. function Pivot ( v : Vector ) return integer; function Pivot ( v : Link_to_Vector ) return integer; -- DESCRIPTION : -- Returns the first nonzero entry out of v. -- If all entries of v are zero, then v'last+1 is returned. function gcd ( v : Vector ) return integer; function gcd ( v : Link_to_Vector ) return integer; -- DESCRIPTION : -- Returns the gcd of all entries in v. procedure Normalize ( v : in out Vector ); procedure Normalize ( v : in out Link_to_Vector ); -- DESCRIPTION : -- All elements in d are divided by the gcd of the array. function Reduce ( v : Vector; i : integer ) return Vector; procedure Reduce ( v : in out Link_to_Vector; i : in integer ); function Reduce ( v : Link_to_Vector; i : integer ) return Link_to_Vector; -- DESCRIPTION : -- The i-th component will be deleted out of the vector. function Insert ( v : Vector; i,a : integer ) return Vector; procedure Insert ( v : in out Link_to_Vector; i,a : in integer ); function Insert ( v : Link_to_Vector; i,a : integer ) return Link_to_Vector; -- DESCRIPTION : -- The i-th component will be inserted, using the value a. function Insert_and_Transform ( v : Vector; i,a : integer; t : Transfo ) return Vector; procedure Insert_and_Transform ( v : in out Link_to_Vector; i,a : in integer; t : in Transfo ); function Insert_and_Transform ( v : Link_to_Vector; i,a : integer; t : Transfo ) return Link_to_Vector; -- DESCRIPTION : -- Inserts the i-th component in the vector v, -- using the value a, and transforms the vector, applying t. end Integer_Vectors_Utilities; SHAR_EOF fi # end of overwriting check if test -f 'lists_of_vectors_utilities.adb' then echo shar: will not over-write existing file "'lists_of_vectors_utilities.adb'" else cat << "SHAR_EOF" > 'lists_of_vectors_utilities.adb' with Integer_Vectors_Utilities; use Integer_Vectors_Utilities; with Integer_Matrices; use Integer_Matrices; with Integer_Linear_System_Solvers; use Integer_Linear_System_Solvers; package body Lists_of_Vectors_Utilities is procedure Compute_Normal ( v : in Integer_Vectors_of_Vectors.Vector; n : out Link_to_Vector; deg : out natural ) is d : Link_to_Vector renames v(v'last); im : matrix(d'range,d'range); res : Link_to_Vector; cnt : integer; begin res := new Vector(d'range); cnt := im'first(1); for i in v'first..(v'last-1) loop for j in im'range(2) loop im(cnt,j) := v(i)(j) - d(j); end loop; cnt := cnt + 1; end loop; for i in cnt..im'last(1) loop for j in im'range(2) loop im(i,j) := 0; end loop; end loop; Upper_Triangulate(im); cnt := 1; for k in im'first(1)..im'last(1)-1 loop cnt := cnt*im(k,k); end loop; if cnt < 0 then deg := -cnt; else deg := cnt; end if; Scale(im); Solve0(im,res.all); Normalize(res); n := res; end Compute_Normal; function Compute_Normal ( v : Integer_Vectors_of_Vectors.Vector ) return Link_to_Vector is deg : natural; res : Link_to_Vector; begin Compute_Normal(v,res,deg); return res; end Compute_Normal; function Pointer_to_Last ( l : List ) return List is res : List := l; begin if not Is_Null(res) then while not Is_Null(Tail_Of(res)) loop res := Tail_Of(res); end loop; end if; return res; end Pointer_to_Last; procedure Move_to_Front ( l : in out List; v : in Vector ) is tmp : List := l; found : boolean := false; first,lv : Link_to_Vector; begin while not Is_Null(tmp) loop lv := Head_Of(tmp); if Equal(lv.all,v) then found := true; else tmp := Tail_Of(tmp); end if; exit when found; end loop; if found then first := Head_Of(l); if first /= lv then lv.all := first.all; Set_Head(tmp,lv); first.all := v; Set_Head(l,first); end if; end if; end Move_to_Front; function Difference ( l1,l2 : List ) return List is res,res_last : List; tmp : List := l1; pt : Link_to_Vector; begin while not Is_Null(tmp) loop pt := Head_Of(tmp); if not Is_In(l2,pt.all) then Append(res,res_last,pt.all); end if; tmp := Tail_Of(tmp); end loop; return res; end Difference; function Different_Points ( l : List ) return List is tmp,res,res_last : List; begin tmp := l; while not Is_Null(tmp) loop Append_Diff(res,res_last,Head_Of(tmp).all); tmp := Tail_Of(tmp); end loop; return res; end Different_Points; procedure Remove_Duplicates ( l : in out List ) is res : List := Different_Points(l); begin Deep_Clear(l); l := res; end Remove_Duplicates; end Lists_of_Vectors_Utilities; SHAR_EOF fi # end of overwriting check if test -f 'lists_of_vectors_utilities.ads' then echo shar: will not over-write existing file "'lists_of_vectors_utilities.ads'" else cat << "SHAR_EOF" > 'lists_of_vectors_utilities.ads' with Integer_Vectors; use Integer_Vectors; with Integer_Vectors_of_Vectors; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; package Lists_of_Vectors_Utilities is -- DESCRIPTION : -- This package offers some utilities for working with -- lists of integer vectors. procedure Compute_Normal ( v : in Integer_Vectors_of_Vectors.Vector; n : out Link_to_Vector; deg : out natural ); function Compute_Normal ( v : Integer_Vectors_of_Vectors.Vector ) return Link_to_Vector; -- DESCRIPTION : -- Returns the normal vector to the space generated by the -- points in v. If deg = 0, then more than one solution is possible. function Pointer_to_Last ( l : List ) return List; -- DESCRIPTION : -- Returns a pointer to the last element of the list. procedure Move_to_Front ( l : in out List; v : in Vector ); -- DESCRIPTION : -- Searches the vector v in the list l. When found, then this -- vector v is swapped with the first element of the list. function Difference ( l1,l2 : List ) return List; -- DESCRIPTION : -- Returns the list of points in l1 that do not belong to l2. function Different_Points ( l : List ) return List; -- DESCRIPTION : -- Returns a lists of all different points out of l. procedure Remove_Duplicates ( l : in out List ); -- DESCRIPTION : -- Removes duplicate points out of the list l. end Lists_of_Vectors_Utilities; SHAR_EOF fi # end of overwriting check if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' # Establishing the links : linkrc = ../../../Ada/Root_Counts/Implift links: @-ln -s $(linkrc)/transfo.a transformations.ads @-ln -s $(linkrc)/transfoB.a transformations.adb @-ln -s $(linkrc)/transfo_io.a transformations_io.ads @-ln -s $(linkrc)/transfo_ioB.a transformations_io.adb @-ln -s $(linkrc)/tranlists.a transforming_integer_vector_lists.ads @-ln -s $(linkrc)/tranlistsB.a transforming_integer_vector_lists.adb @-ln -s $(linkrc)/tranlaur.a transforming_laurent_systems.ads @-ln -s $(linkrc)/tranlaurB.a transforming_laurent_systems.adb @-ln -s $(linkrc)/transols.a transforming_solutions.ads @-ln -s $(linkrc)/transolsB.a transforming_solutions.adb @-ln -s $(linkrc)/intvec_ut.a integer_vectors_utilities.ads @-ln -s $(linkrc)/intvec_utB.a integer_vectors_utilities.adb @-ln -s $(linkrc)/lstivc_ut.a lists_of_vectors_utilities.ads @-ln -s $(linkrc)/lstivc_utB.a lists_of_vectors_utilities.adb @-ln -s $(linkrc)/arrlivc_ut.a arrays_of_lists_utilities.ads @-ln -s $(linkrc)/arrlivc_utB.a arrays_of_lists_utilities.adb @-ln -s $(linkrc)/tv.a trees_of_vectors.ads @-ln -s $(linkrc)/tvB.a trees_of_vectors.adb @-ln -s $(linkrc)/tv_io.a trees_of_vectors_io.ads @-ln -s $(linkrc)/tv_ioB.a trees_of_vectors_io.adb @-ln -s $(linkrc)/facenusu.a face_enumerator_of_sum.ads @-ln -s $(linkrc)/facenusuB.a face_enumerator_of_sum.adb @-ln -s $(linkrc)/volumes.a volumes.ads @-ln -s $(linkrc)/volumesB.a volumes.adb @-ln -s $(linkrc)/powlis.a power_lists.ads @-ln -s $(linkrc)/powlisB.a power_lists.adb @-ln -s $(linkrc)/binom.a binomials.ads @-ln -s $(linkrc)/binomB.a binomials.adb @-ln -s $(linkrc)/fewnom.a fewnomials.ads @-ln -s $(linkrc)/fewnomB.a fewnomials.adb @-ln -s $(linkrc)/durker.a durand_kerner.ads @-ln -s $(linkrc)/durkerB.a durand_kerner.adb @-ln -s $(linkrc)/mihoco.a mixed_homotopy_continuation.ads @-ln -s $(linkrc)/mihocoB.a mixed_homotopy_continuation.adb @-ln -s $(linkrc)/setsvol.a set_structures_and_volumes.ads @-ln -s $(linkrc)/setsvolB.a set_structures_and_volumes.adb @-ln -s $(linkrc)/vertices.a vertices.ads @-ln -s $(linkrc)/verticesB.a vertices.adb @-ln -s $(linkrc)/genpos.a generic_position.ads @-ln -s $(linkrc)/genposB.a generic_position.adb @-ln -s $(linkrc)/drivpts.a drivers_for_vertex_points.ads @-ln -s $(linkrc)/drivptsB.a drivers_for_vertex_points.adb @-ln -s $(linkrc)/drivplc.a driver_for_polyhedral_continuation.ads @-ln -s $(linkrc)/drivplcB.a driver_for_polyhedral_continuation.adb @-ln -s $(linkrc)/drivimpl.a drivers_for_implicit_lifting.ads @-ln -s $(linkrc)/drivimplB.a drivers_for_implicit_lifting.adb SHAR_EOF fi # end of overwriting check if test -f 'mixed_homotopy_continuation.adb' then echo shar: will not over-write existing file "'mixed_homotopy_continuation.adb'" else cat << "SHAR_EOF" > 'mixed_homotopy_continuation.adb' with Integer_Vectors; with Integer_Vectors_io; use Integer_Vectors_io; with Integer_Vectors_Utilities; use Integer_Vectors_Utilities; with Integer_Vectors_of_Vectors; with Integer_Linear_System_Solvers; use Integer_Linear_System_Solvers; with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Numbers,Complex_Vectors; use Complex_Numbers; with Complex_Norms,Complex_Matrices; use Complex_Norms; with Random_Number_Generators; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Lists_of_Vectors_Utilities; use Lists_of_Vectors_Utilities; with Integer_Support_Functions; use Integer_Support_Functions; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Arrays_of_Lists_Utilities; use Arrays_of_Lists_Utilities; with Volumes; with Transformations; use Transformations; with Transforming_Solutions; use Transforming_Solutions; with Transforming_Laurent_Systems; use Transforming_Laurent_Systems; with Transforming_Integer_Vector_Lists; use Transforming_Integer_Vector_Lists; with Power_Lists; use Power_Lists; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Multivariate_Polynomials; with Complex_Multivariate_Laurent_Polynomials; with Polynomial_to_Laurent_Converters; use Polynomial_to_Laurent_Converters; with Laurent_to_Polynomial_Converters; use Laurent_to_Polynomial_Converters; with Durand_Kerner; with Jacobi_Matrices; use Jacobi_Matrices; with Increment_and_Fix_Continuation; use Increment_and_Fix_Continuation; with Root_Refiners; use Root_Refiners; package body Mixed_Homotopy_Continuation is -- INVARIANT CONDITION : -- The procedures and functions in this package `mirror' corresponding -- routines in the package Volumes. use Complex_Multivariate_Laurent_Polynomials; -- AUXILIARIES : type bar is array ( integer range <> ) of boolean; procedure Pick_Degrees ( ar : in bar; dl : in List; da : in out Integer_Vectors_of_Vectors.Vector ) is tmp : List; cnt : natural; begin tmp := Tail_Of(dl); cnt := da'first; for i in ar'range loop if ar(i) then da(cnt) := Head_Of(tmp); cnt := cnt + 1; end if; tmp := Tail_Of(tmp); end loop; end Pick_Degrees; function Interchange2 ( p : Laur_Sys; index : integer ) return Laur_Sys is -- DESCRIPTION : -- Returns a polynomial system where the first equation is interchanged -- with the equation given by the index. res : Laur_Sys(p'range); begin if index = p'first then res := p; else res(res'first) := p(index); res(index) := p(p'first); res(res'first+1..index-1) := p(p'first+1..index-1); res(index+1..res'last) := p(index+1..p'last); end if; return res; end Interchange2; procedure Interchange2 ( adl : in out Array_of_Lists; index : integer ) is -- DESCRIPTION : -- Interchanges the first list with the list given by the index. tmp : List; begin if index /= adl'first then tmp := adl(adl'first); adl(adl'first) := adl(index); adl(index) := tmp; end if; end Interchange2; function Permute ( perm : Integer_Vectors.Vector; p : Laur_Sys ) return laur_Sys is -- DESCRIPTION : -- Returns a permuted polynomial system. res : Laur_Sys(p'range); begin for i in p'range loop res(i) := p(perm(i)); end loop; return res; end Permute; function Initial_Degrees ( p : Poly ) return Degrees is -- DESCRIPTION : -- Returns the initial degrees of the polynomial p. init : Degrees; procedure Init_Term ( t : in Term; cont : out boolean ) is begin init := new Integer_Vectors.Vector'(t.dg.all); cont := false; end Init_Term; procedure Initial_Term is new Visiting_Iterator (Init_Term); begin Initial_Term(p); return init; end Initial_Degrees; procedure Binomial ( p : in Poly; d : out Integer_Vectors.Link_to_Vector; k : in out integer; c : in out double_complex ) is -- DESCRIPTION : -- p consists of two terms, this procedure gets the degrees d and -- the constant c of the binomial equation. first : boolean := true; dd : Degrees; procedure Scan_Term ( t : in Term; cont : out boolean ) is begin if first then dd := new Integer_Vectors.Vector'(t.dg.all); c := t.cf; first := false; else k := dd'first - 1; for i in dd'range loop dd(i) := dd(i) - t.dg(i); if k < dd'first and then dd(i) /= 0 then k := i; end if; end loop; c := -t.cf/c; end if; cont := true; end Scan_Term; procedure Scan_Terms is new Visiting_Iterator (Scan_Term); begin Scan_Terms(p); d := new Integer_Vectors.Vector'(dd.all); Integer_Vectors.Clear(Integer_Vectors.Link_to_Vector(dd)); end Binomial; procedure Normalize ( p : in Laur_Sys; dl : in out List; wp : in out Laur_Sys; shifted : out boolean ) is -- DESCRIPTION : -- Makes sure that the first element of dl contains all zeroes. -- REQUIRED : -- The list dl is not empty. -- ON ENTRY : -- p a Laurent polynomial system; -- dl the power list of p(p'first). -- ON RETURN : -- dl the first element of contains all zeroes, -- therefore dl has been shifted; -- wp a Laurent polynomial system where -- dl is the power list of wp(wp'first); -- shifted is true if dl has been shifted. use Integer_Vectors; first : Link_to_Vector := Head_Of(dl); nullvec : Vector(first'range) := (first'range => 0); shiftvec : Link_to_Vector; begin if not Is_In(dl,nullvec) then shiftvec := Graded_Max(dl); Shift(dl,shiftvec); Clear(shiftvec); Copy(p,wp); for i in p'range loop Shift(wp(i)); end loop; else wp := p; shifted := false; end if; Move_to_Front(dl,nullvec); end Normalize; function Evaluate ( p : Poly; x : double_complex; k : integer ) return Poly is -- DESCRIPTION : -- This function returns a polynomial where the kth unknown has -- been replaced by x. -- It is important to use this function as the term order in p -- must remain the same! res : Poly; procedure Evaluate_Term ( t : in out Term; cont : out boolean ) is fac : double_complex; pow : natural; begin if t.dg(k) < 0 then fac := CMPLX(1.0)/x; pow := -t.dg(k); else fac := x; pow := t.dg(k); end if; for i in 1..pow loop t.cf := t.cf * fac; end loop; declare tmp : constant Integer_Vectors.Vector := t.dg.all; begin Clear(t); t.dg := new Integer_Vectors.Vector'(Reduce(tmp,k)); end; cont := true; end Evaluate_Term; procedure Evaluate_Terms is new Changing_Iterator (Evaluate_Term); begin Copy(p,res); Evaluate_Terms(res); return res; end Evaluate; function Re_Arrange ( p : poly ) return Poly is -- DESCRIPTION : -- Returns a polynomial whose terms are sorted -- in graded lexicographical ordening. res : Poly := Null_Poly; procedure Re_Arrange_Term ( t : in Term; cont : out boolean ) is begin Plus_Term(res,t); cont := true; end Re_Arrange_Term; procedure Re_Arrange_Terms is new Visiting_Iterator (Re_Arrange_Term); begin Re_Arrange_Terms(p); return res; end Re_Arrange; function Substitute ( p : Poly; v : Complex_Vectors.Vector; k : integer ) return Poly is -- DESCRIPTION : -- Substitutes the values in v into the polynomial p, -- starting at the last unknowns of p. init : Degrees := Initial_Degrees(p); index : integer := init'last; res,tmp : Poly; begin if index = k then index := index - 1; res := Evaluate(p,v(v'last),index); else res := Evaluate(p,v(v'last),index); end if; for i in reverse v'first..(v'last-1) loop index := index - 1; if index = k then index := index - 1; end if; tmp := Evaluate(res,v(i),index); Clear(res); Copy(tmp,res); Clear(tmp); end loop; Integer_Vectors.Clear(Integer_Vectors.Link_to_Vector(init)); return res; end Substitute; procedure Refine_and_Concat ( p : in Laur_Sys; newsols,sols,sols_last : in out Solution_List ) is -- DESCRIPTION : -- This procedure refines the solutions of a given -- polynomial system and adds them to the solution list. -- This can be very useful for eliminating rounding errors -- after transformating the solutions. use Complex_Polynomial_Systems; pp : Poly_Sys(p'range) := Laurent_to_Polynomial_System(p); numb : natural := 0; begin Silent_Root_Refiner(pp,newsols,10.0**(-12),10.0**(-12),10.0**(-8),numb,5); Concat(sols,sols_last,newsols); Clear(pp); Shallow_Clear(newsols); end Refine_and_Concat; procedure Refine_and_Concat ( file : in file_type; p : in Laur_Sys; newsols,sols,sols_last : in out Solution_List ) is -- DESCRIPTION : -- This procedure refines the solutions of a given -- polynomial system and adds them to the solution list. -- This can be very useful for eliminating rounding errors -- after transformating the solutions. use Complex_Polynomial_Systems; pp : Poly_Sys(p'range) := Laurent_to_Polynomial_System(p); numb : natural := 0; begin Reporting_Root_Refiner (file,pp,newsols,10.0**(-12),10.0**(-12),10.0**(-8),numb,5,false); Concat(sols,sols_last,newsols); Clear(pp); Shallow_Clear(newsols); end Refine_and_Concat; procedure Write_Direction ( file : in file_type; v : in Integer_Vectors.Link_to_Vector ) is begin put(file,"++++ considering direction "); put(file,v); put_line(file," ++++"); end Write_Direction; -- INTERMEDIATE LAYER : procedure Mixed_Continue ( file : in file_type; p : in Laur_Sys; k : in integer; m : in Integer_Vectors.Vector; sols : in out Solution_List ) is -- DESCRIPTION : -- This continuation routine computes a part of the solution list -- of a Laurent polynomial system. -- ON ENTRY : -- file a file where the intermediate results are written; -- p the transformed Laurent polynomial system to be solved; -- k the index; -- m m(k) = p1(v), m(k/=l) = Maximal_Degree(p(l),k); -- sols the start solutions. -- ON RETURN : -- sols the computed solutions. h : Laur_Sys(p'range); hp : Poly_Sys(h'range); hpe : Eval_Poly_Sys(hp'range); -- he : Eval_Laur_Sys(h'range); j : Jacobi(p'range,p'first..p'last+1); je : Eval_Jacobi(j'range(1),j'range(2)); -- j : Jacobi(h'range,h'first..h'last+1); -- je : Eval_Jacobi(j'range(1),j'range(2)); function Construct_Homotopy ( p : Laur_Sys; k : integer; m : Integer_Vectors.Vector ) return Laur_Sys is res : Laur_Sys(p'range); ran : double_complex; re : boolean; zeroes : Degrees := new Integer_Vectors.Vector'(p'range => 0); function Construct_First_Polynomial ( pp : Poly; max : integer ) return Poly is r : Poly := Null_Poly; procedure Construct_Term ( t : in Term; cont : out boolean ) is rt : Term; begin rt.cf := t.cf; rt.dg := new Integer_Vectors.Vector(t.dg'first..t.dg'last+1); rt.dg(t.dg'range) := t.dg.all; rt.dg(k) := -t.dg(k) + max; if Equal(t.dg,zeroes) then rt.dg(rt.dg'last) := 0; re := ( IMAG_PART(rt.cf) + 1.0 = 1.0 ); else rt.dg(rt.dg'last) := rt.dg(k); end if; Plus_Term(r,rt); Clear(rt); cont := true; end Construct_Term; procedure Construct_Terms is new Visiting_Iterator(Construct_Term); begin Construct_Terms(pp); Integer_Vectors.Clear(Integer_Vectors.Link_to_Vector(zeroes)); return r; end Construct_First_Polynomial; function Construct_Polynomial ( pp : Poly; max : integer ) return Poly is r : Poly := Null_Poly; procedure Construct_Term ( t : in Term; cont : out boolean ) is rt : Term; begin rt.cf := t.cf; rt.dg := new Integer_Vectors.Vector(t.dg'first..t.dg'last+1); rt.dg(t.dg'range) := t.dg.all; rt.dg(k) := -t.dg(k) + max; rt.dg(rt.dg'last) := rt.dg(k); Plus_Term(r,rt); Clear(rt); cont := true; end Construct_Term; procedure Construct_Terms is new Visiting_Iterator(Construct_Term); begin Construct_Terms(pp); return r; end Construct_Polynomial; begin res(res'first) := Construct_First_Polynomial(p(p'first),m(m'first)); for i in p'first+1..p'last loop res(i) := Construct_Polynomial(p(i),m(i)); end loop; if re then for i in res'range loop ran := Random_Number_Generators.Random; Mult_Coeff(res(i),ran); end loop; end if; return res; end Construct_Homotopy; function To_Be_Removed ( flag : in natural ) return boolean is begin return ( flag /= 1 ); end To_Be_Removed; procedure Extract_Regular_Solutions is new Solutions.Delete(To_Be_Removed); begin h := Construct_Homotopy(p,k,m); -- CONSTRUCTION OF HOMOTOPY hp := Laurent_to_Polynomial_System(h); hpe := Create(hp); -- he := Create(h); j := Create(hp); je := Create(j); -- j := Create(h); -- je := Create(j); declare -- CONTINUATION use Complex_Vectors,Complex_Matrices; function Eval ( x : Vector; t : double_complex ) return Vector is xt : Vector(x'first..x'last+1); use Complex_Multivariate_Polynomials; --use Complex_Multivariate_Laurent_Polynomials; begin xt(x'range) := x; xt(xt'last) := t; return Eval(hpe,xt); --return Eval(he,xt); end Eval; function dHt ( x : Vector; t : double_complex ) return Vector is xt : Vector(x'first..x'last+1); res : Complex_Vectors.Vector(p'range); use Complex_Multivariate_Polynomials; --use Complex_Multivariate_Laurent_Polynomials; begin xt(x'range) := x; xt(xt'last) := t; for i in res'range loop res(i) := Eval(je(i,xt'last),xt); end loop; return res; end dHt; function dHx ( x : Vector; t : double_complex ) return Matrix is xt : Vector(x'first..x'last+1); m : Matrix(x'range,x'range); use Complex_Multivariate_Polynomials; --use Complex_Multivariate_Laurent_Polynomials; begin xt(x'range) := x; xt(xt'last) := t; for i in m'range(1) loop for j in m'range(1) loop m(i,j) := Eval(je(i,j),xt); end loop; end loop; return m; end dHx; procedure Invert ( k : in integer; sols : in out Solution_List ) is -- DESCRIPTION : -- For all solutions s in sols : s.v(k) := 1/s.v(k). tmp : Solution_List := sols; begin while not Is_Null(tmp) loop declare l : Link_to_Solution := Head_Of(tmp); begin l.v(k) := CMPLX(1.0)/l.v(k); l.t := CMPLX(0.0); end; tmp := Tail_Of(tmp); end loop; end Invert; procedure Cont is new Reporting_Continue(Norm2,Eval,dHt,dHx); begin Invert(k,sols); Cont(file,sols,false); Invert(k,sols); Extract_Regular_Solutions(sols); -- declare -- pp : Poly_Sys(p'range); -- numb : natural := 0; -- begin -- pp := Laurent_to_Polynomial_System(p); -- Reporting_Root_Refiner -- (file,pp,sols,10.0**(-12),10.0**(-12),10.0**(-8),numb,5,false); -- Clear(pp); Extract_Regular_Solutions(sols); -- end; end; -- CLEANING : Clear(h); Clear(hp); Clear(hpe); -- Clear(he); Clear(j); Clear(je); end Mixed_Continue; -- THE SOLVERS : function One_Unknown_Solve ( p : Poly ) return Complex_Vectors.Vector is -- DESCRIPTION : -- Returns the solution vector of p, a polynomial in one unknown. -- p will be solved by using the method of Durand-Kerner. p1 : Poly := Re_Arrange(p); init : Degrees := Initial_Degrees(p1); index : integer := init'first; min : integer := -Minimal_Degree(p1,index); pv : Complex_Vectors.Vector(0..Degree(p1)+min); z,res : Complex_Vectors.Vector(1..pv'last); maxsteps : constant natural := 10; eps : constant double_float := 10.0**(-10); nb : integer := pv'last + 1; procedure Store_Coeff ( t : in Term; cont : out boolean ) is begin nb := nb - 1; if t.dg(index) = (nb - min) then pv(nb) := t.cf; else for i in reverse nb..(t.dg(index)+min+1) loop pv(i) := CMPLX(0.0); end loop; nb := t.dg(index) + min; pv(nb) := t.cf; end if; cont := true; end Store_Coeff; procedure Polynomial_To_Vector is new Visiting_Iterator (Store_Coeff); procedure Write ( step : in natural; z,res : in Complex_Vectors.Vector ) is begin null; -- no output desired during the iterations end Write; procedure DuKe is new Durand_Kerner (Write); begin Integer_Vectors.Clear(Integer_Vectors.Link_to_Vector(init)); Polynomial_To_Vector(p1); Clear(p1); for i in z'range loop z(i) := Random_Number_Generators.Random; res(i) := z(i); end loop; DuKe(pv,z,res,maxsteps,eps,nb); return z; end One_Unknown_Solve; procedure One_Unknown_Solve ( p : in Poly; sols : in out Solution_List ) is -- DESCRIPTION : -- If p is a polynomial in one unknown, -- p can be solved efficiently by the application of Durand-Kerner. init : Degrees := Initial_Degrees(p); function Make_Solutions ( x : in Complex_Vectors.Vector ) return Solution_List is res,res_last : Solution_List; s : Solution(1); begin s.m := 1; s.t := CMPLX(0.0); for i in x'range loop s.v(init'first) := x(i); Append(res,res_last,s); end loop; return res; end Make_Solutions; begin sols := Make_Solutions(One_Unknown_Solve(p)); Integer_Vectors.Clear(Integer_Vectors.Link_to_Vector(init)); end One_Unknown_Solve; procedure Two_Terms_Solve ( file : in file_type; p : in Laur_Sys; tv : in Tree_of_Vectors; bkk : out natural; sols : in out Solution_List ) is -- DESCRIPTION : -- The first polynomial of p consists of two terms. -- A binomial system can be solved efficiently by -- transforming and using de Moivre's rule. d : Integer_Vectors.Link_to_Vector; c : double_complex := CMPLX(0.0); k : natural := 0; sols_last : Solution_List; begin -- put_line(file,"Applying Two_Terms_Solve on "); Write(file,p); Binomial(p(p'first),d,k,c); if k < d'first then bkk := 0; Integer_Vectors.Clear(d); return; elsif ( c + CMPLX(1.0) = CMPLX(1.0) ) then bkk := 0; Integer_Vectors.Clear(d); return; elsif d(k) < 0 then Integer_Vectors.Min_Vector(d); c := CMPLX(1.0)/c; end if; -- if p'first = p'last -- then -- declare -- sol : Solution(1); -- begin -- sol.m := 1; -- sol.t := CMPLX(0.0); -- for i in 1..d(k) loop -- sol.v(sol.v'first) := de_Moivre(d(k),i,c); -- Append(sols,sols_last,sol); -- end loop; -- bkk := d(k); -- end; -- else declare t : Transfo := Rotate(d,k); tmp_bkk : natural := 0; begin Apply(t,d); declare v : Complex_Vectors.Vector(1..d(k)); tmp : Poly; rtp : Laur_Sys(p'first..(p'last-1)); rtp_bkk : natural; rtp_sols : Solution_List; begin for i in v'range loop v(i) := de_Moivre(d(k),i,c); for j in rtp'range loop tmp := Transform(t,p(j+1)); rtp(j) := Evaluate(tmp,v(i),k); Clear(tmp); end loop; Solve(file,rtp,tv,rtp_bkk,rtp_sols); Clear(rtp); tmp_bkk := tmp_bkk + rtp_bkk; Insert(v(i),k,rtp_sols); Transform(t,rtp_sols); --Concat(sols,sols_last,rtp_sols); Refine_and_Concat(file,p,rtp_sols,sols,sols_last); end loop; end; Clear(t); bkk := tmp_bkk; end; -- end if; Integer_Vectors.Clear(d); -- put_line(file,"The solutions found : "); put(file,sols); end Two_Terms_Solve; function Project_on_First_and_Solve ( p : Poly; k : integer; sols : Solution_List ) return Solution_List is -- ON ENTRY : -- p a Laurent polynomial in n unknowns x1,..,xk,..,xn; -- sols contains values for x1,..,xn, except xk. -- ON RETURN : -- a solution list for p, obtained after substition of the values -- for x1,..,xn into the polynomial p. tmp,res,res_last : Solution_List; init : Degrees := Initial_Degrees(p); begin -- put_line(file,"Calling Project_on_First_and_Solve"); -- put_line(file," with polynomial : "); -- put(file,Laurent_Polynomial_to_Polynomial(p)); new_line(file); tmp := sols; while not Is_Null(tmp) loop declare p1 : Poly := Substitute(p,Head_Of(tmp).v,k); sols1 : Solution_List; begin -- put(file,"k : "); put(file,k,1); new_line(file); -- put(file,"v : "); put(file,Head_Of(tmp).v,3,3,3); new_line(file); -- put_line(file,"After substitution : "); Write(file,p1); if Number_of_Terms(p1) < 2 then null; elsif Number_of_Terms(p1) = 2 then declare d : Integer_Vectors.Link_to_Vector; l : natural := 0; c : double_complex := CMPLX(0.0); begin Binomial(p1,d,l,c); if l < init'first then null; elsif ( c + CMPLX(1.0) = CMPLX(1.0) ) then null; else if d(l) < 0 then d(l) := -d(l); c := CMPLX(1.0)/c; end if; declare v : Complex_Vectors.Vector(1..d(l)); begin for i in v'range loop v(i) := de_Moivre(d(l),i,c); end loop; sols1 := Insert(v,k,Head_Of(tmp).all); -- put_line(file,"Sols1 after Binomial :"); -- put(file,sols1); Concat(res,res_last,sols1); Shallow_Clear(sols1); end; end if; Integer_Vectors.Clear(d); end; else sols1 := Insert(One_Unknown_Solve(p1),k,Head_Of(tmp).all); Concat(res,res_last,sols1); -- put_line(file,"Sols1 :"); put(file,sols1); Shallow_Clear(sols1); end if; Clear(p1); end; tmp := Tail_Of(tmp); end loop; Integer_Vectors.Clear(Integer_Vectors.Link_to_Vector(init)); return res; end Project_on_First_and_Solve; procedure Project_and_Solve ( file : in file_type; p : in Laur_Sys; k : in integer; m : in out Integer_Vectors.Vector; nd : in node; bkk : out natural; sols : in out Solution_List ) is -- DESCRIPTION : -- Solves the projected start system of p along a direction v. -- ON ENTRY : -- file a file to write intermediate results on; -- p a Laurent polynomial system; -- k entry in the degrees of p; -- m m(m'first) equals Maximal_Support(p(p'first),v) > 0; -- nd a node in the tree of useful directions. -- ON RETURN : -- m m(m'first+1..m'last) contains the maximal degrees -- of the last n-1 equations of p in xk; -- bkk the BKK bound of the projected system; -- sols the solutions of the projected system. g_v : Laur_Sys(p'first..(p'last-1)); bkk_g_v : natural; sols_g_v : Solution_List; begin -- put_line(file,"Applying Project_and_Solve on"); Write(file,p); for i in g_v'range loop m(i+1) := Maximal_Degree(p(i+1),k); g_v(i) := Face(k,m(i+1),p(i+1)); Reduce(k,g_v(i)); end loop; if (nd.ltv = null) or else Is_Null(nd.ltv.all) then Solve(file,g_v,bkk_g_v,sols_g_v); else Solve(file,g_v,nd.ltv.all,bkk_g_v,sols_g_v); end if; -- put(file,"After Solve (without tv) bkk_g_v = "); put(file,bkk_g_v,1); -- new_line(file); declare p0 : Poly := Re_Arrange(p(p'first)); p1 : Poly := Face(k,m(m'first),p0); cnst : Term; begin cnst.dg := new Integer_Vectors.Vector'(p'range => 0); if Coeff(p1,cnst.dg) = CMPLX(0.0) then cnst.cf := Coeff(p0,cnst.dg); Plus_Term(p1,cnst); end if; Integer_Vectors.Clear(Integer_Vectors.Link_to_Vector(cnst.dg)); Clear(p0); sols := Project_on_First_and_Solve(p1,k,sols_g_v); -- sols := Project_on_First_and_Solve(file,p1,k,sols_g_v); Set_Continuation_Parameter(sols,CMPLX(0.0)); Clear(p1); end; bkk := m(m'first)*bkk_g_v; Clear(sols_g_v); Clear(g_v); -- put_line(file,"The solutions found : "); put(file,sols); end Project_and_Solve; procedure Unmixed_Solve ( file : in file_type; p : in Laur_Sys; dl : in List; tv : in Tree_of_Vectors; bkk : out natural; sols : in out Solution_List ) is -- DESCRIPTION : -- Solves a Laurent polynomial system where all polytopes are the same. -- ON ENTRY : -- file a file to write intermediate results on; -- p a Laurent polynomial system; -- dl the list of powers for p; -- tv the tree of degrees containing the useful directions. -- ON RETURN : -- bkk the bkk bound; -- sols the list of solutions. sols_last : Solution_List; tmp_bkk : natural := 0; tmp : Tree_of_Vectors := tv; begin tmp_bkk := 0; tmp := tv; while not Is_Null(tmp) loop declare nd : node := Head_Of(tmp); v : Integer_Vectors.Link_to_Vector := nd.d; i : integer := Pivot(v); pv : integer := Maximal_Support(dl,v.all); t : Transfo := Build_Transfo(v,i); tp : Laur_Sys(p'range) := Transform(t,p); bkk_tp : natural; sols_tp : Solution_List; max : Integer_Vectors.Vector(p'range); begin Write_Direction(file,v); max(max'first) := pv; -- if (nd.ltv = null) or else Is_Null(nd.ltv.all) -- then Projected_Solve(file,tp,i,max,bkk_tp,sols_tp); -- else Projected_Solve -- (file,tp,i,max,nd.ltv.all,bkk_tp,sols_tp); -- end if; Project_and_Solve(file,tp,i,max,nd,bkk_tp,sols_tp); Mixed_Continue(file,tp,i,max,sols_tp); tmp_bkk := tmp_bkk + bkk_tp; Transform(t,sols_tp); --Concat(sols,sols_last,sols_tp); Refine_and_Concat(file,p,sols_tp,sols,sols_last); Clear(t); Clear(tp); end; tmp := Tail_Of(tmp); end loop; bkk := tmp_bkk; end Unmixed_Solve; procedure Unmixed_Solve ( file : in file_type; p : in Laur_Sys; dl : in List; bkk : out natural; sols : in out Solution_List ) is tv : Tree_of_Vectors; begin Volumes.Volume(p'last,dl,tv,bkk); Unmixed_Solve(file,p,dl,tv,bkk,sols); Clear(tv); end Unmixed_Solve; procedure Mixed_Solve ( file : in file_type; p : in Laur_Sys; adl : in out Array_of_Lists; tv : in Tree_of_Vectors; bkk : out natural; sols : in out Solution_List ) is -- DESCRIPTION : -- Computes the solutions of the Laurent polynomial system p, -- where p has more than one equation. -- NOTE : -- This procedure mirrors the procedure Minkowski_Sum in the body -- of the package Volumes. tmp_bkk,len : natural; tmp : Tree_of_Vectors; index : integer := Index2(adl); wp : Laur_Sys(p'range); sols_last : Solution_List; shifted : boolean; perm,mix : Integer_Vectors.Link_to_Vector; begin Interchange2(adl,index); len := Length_Of(adl(adl'first)); -- put_line(file,"Applying Mixed_Solve on"); Write(file,p); if len = 2 then wp := Interchange2(p,index); Two_Terms_Solve(file,wp,tv,bkk,sols); else if len > 2 then -- INITIALIZATION : Mixture(adl,perm,mix); wp := Permute(perm.all,p); declare zeroes : Degrees := new Integer_Vectors.Vector'(p'range => 0); tmpwpi : Poly; begin if Coeff(wp(wp'first),zeroes) = CMPLX(0.0) then shifted := true; -- wp(wp'first) := Shift(p(p'first)); Copy(p(index),tmpwpi); wp(wp'first) := tmpwpi; Shift(wp(wp'first)); else shifted := false; end if; Integer_Vectors.Clear(Integer_Vectors.Link_to_Vector(zeroes)); end; -- MIXED HOMOTOPY CONTINUATION : tmp_bkk := 0; tmp := tv; while not Is_Null(tmp) loop declare nd : node := Head_Of(tmp); v : Integer_Vectors.Link_to_Vector := nd.d; k : integer := Pivot(v); pv : integer := Maximal_Support(wp(wp'first),v); t : Transfo := Build_Transfo(v,k); twp : Laur_Sys(wp'range) := Transform(t,wp); bkk_twp : natural; sols_twp : Solution_List; m : Integer_Vectors.Vector(wp'range); begin Write_Direction(file,v); m(m'first) := pv; -- if (nd.ltv = null) or else Is_Null(nd.ltv.all) -- then Projected_Solve(file,twp,k,m,bkk_twp,sols_twp); -- else Projected_Solve -- (file,twp,k,m,nd.ltv.all,bkk_twp,sols_twp); -- end if; Project_and_Solve(file,twp,k,m,nd,bkk_twp,sols_twp); Mixed_Continue(file,twp,k,m,sols_twp); tmp_bkk := tmp_bkk + bkk_twp; Transform(t,sols_twp); --Concat(sols,sols_last,sols_twp); Refine_and_Concat(file,wp,sols_twp,sols,sols_last); Clear(t); Clear(twp); end; tmp := Tail_Of(tmp); end loop; bkk := tmp_bkk; -- CLEANING UP : Integer_Vectors.Clear(perm); Integer_Vectors.Clear(mix); if shifted then Clear(wp(wp'first)); end if; else -- len < 2 bkk := 0; end if; end if; end Mixed_Solve; procedure Mixed_Solve ( file : in file_type; p : in Laur_Sys; adl : in out Array_of_Lists; bkk : out natural; sols : in out Solution_List ) is tv : Tree_of_Vectors; begin Volumes.Mixed_Volume(adl'last,adl,tv,bkk); Mixed_Solve(file,p,adl,tv,bkk,sols); Clear(tv); end Mixed_Solve; procedure Solve ( file : in file_type; p : in Laur_Sys; bkk : out natural; sols : in out Solution_List ) is al : Array_of_Lists(p'range) := Construct_Power_Lists(p); tv : Tree_of_Vectors; begin Volumes.Mixed_Volume(p'last,al,tv,bkk); Solve(file,p,tv,bkk,sols); Deep_Clear(al); Clear(tv); end Solve; procedure Solve ( file : in file_type; p : in Laur_Sys; tv : in Tree_of_Vectors; bkk : out natural; sols : in out Solution_List ) is -- NOTE : -- This procedure mirrors the procedure Volumes.Mixed_Volume, -- with a tree of useful directions on entry. begin if p'first = p'last then One_Unknown_Solve(p(p'first),sols); bkk := Length_Of(sols); else --if Is_Fewnomial_System(p) -- then -- declare -- fail : boolean; -- begin -- Fewnomials.Solve(p,sols,fail); -- if fail -- then bkk := 0; Clear(sols); -- else bkk := Length_Of(sols); -- end if; -- end; -- else declare adl : Array_of_Lists(p'range) := Construct_Power_Lists(p); begin if All_Equal(adl) then for i in (adl'first+1)..adl'last loop Deep_Clear(adl(i)); end loop; declare wp : Laur_Sys(p'range); shifted : boolean; begin Normalize(p,adl(adl'first),wp,shifted); if Is_Null(tv) then Unmixed_Solve(file,wp,adl(adl'first),bkk,sols); else Unmixed_Solve(file,wp,adl(adl'first),tv,bkk,sols); end if; if shifted then Clear(wp); end if; end; elsif Is_Null(tv) then Mixed_Solve(file,p,adl,bkk,sols); else Mixed_Solve(file,p,adl,tv,bkk,sols); end if; end; end if; end Solve; end Mixed_Homotopy_Continuation; SHAR_EOF fi # end of overwriting check if test -f 'mixed_homotopy_continuation.ads' then echo shar: will not over-write existing file "'mixed_homotopy_continuation.ads'" else cat << "SHAR_EOF" > 'mixed_homotopy_continuation.ads' with text_io,Solutions; use text_io,Solutions; with Complex_Laurent_Polynomial_Systems; use Complex_Laurent_Polynomial_Systems; with Trees_of_Vectors; use Trees_of_Vectors; package Mixed_Homotopy_Continuation is -- DESCRIPTION : -- This package provides solvers based on the principle -- of mixed continuation. procedure Solve ( file : in file_type; p : in Laur_Sys; bkk : out natural; sols : in out Solution_List ); -- ON ENTRY : -- file a file for writing intermediate results; -- p a Laurent polynomial system. -- ON RETURN : -- bkk the BKK bound of p; -- sols the computed solutions. procedure Solve ( file : in file_type; p : in Laur_Sys; tv : in Tree_of_Vectors; bkk : out natural; sols : in out Solution_List ); -- ON ENTRY : -- file a file for writing intermediate results; -- p a Laurent polynomial system; -- tv the tree of vectors containing the useful directions. -- ON RETURN : -- bkk the BKK bound of p; -- sols the computed solutions. end Mixed_Homotopy_Continuation; SHAR_EOF fi # end of overwriting check if test -f 'power_lists.adb' then echo shar: will not over-write existing file "'power_lists.adb'" else cat << "SHAR_EOF" > 'power_lists.adb' with Integer_Vectors; use Integer_Vectors; package body Power_Lists is function Construct_Power_List ( p : Complex_Multivariate_Polynomials.Poly ) return List is use Complex_Multivariate_Polynomials; res,res_last : List; procedure Fill_In_Term (t : in Term; cont : out boolean) is h : Link_to_Vector; begin h := new Integer_Vectors.Vector(t.dg'range); for j in h'range loop h(j) := t.dg(j); end loop; Append(res,res_last,h); cont := true; end Fill_In_Term; procedure Fill_In is new Visiting_Iterator(Fill_In_Term); begin Fill_In(p); return res; end Construct_Power_List; function Construct_Power_List ( p : Complex_Multivariate_Laurent_Polynomials.Poly ) return List is use Complex_Multivariate_Laurent_Polynomials; res,res_last : List; procedure Fill_In_Term (t : in Term; cont : out boolean) is h : Link_to_Vector; begin h := new Integer_Vectors.Vector(t.dg'range); for j in h'range loop h(j) := t.dg(j); end loop; Append(res,res_last,h); cont := true; end Fill_In_Term; procedure Fill_In is new Visiting_Iterator(Fill_In_Term); begin Fill_In(p); return res; end Construct_Power_List; function Select_Terms ( p : Complex_Multivariate_Polynomials.Poly; l : List ) return Complex_Multivariate_Polynomials.Poly is use Complex_Multivariate_Polynomials; res : Poly := Null_Poly; procedure Select_Term ( t : in Term; cont : out boolean ) is v : Integer_Vectors.Vector(t.dg'range); begin for i in v'range loop v(i) := t.dg(i); end loop; if Is_In(l,v) then Plus_Term(res,t); end if; cont := true; end Select_Term; procedure Select_Poly is new Visiting_Iterator ( Select_Term ); begin Select_Poly(p); return res; end Select_Terms; function Select_Terms ( p : Complex_Multivariate_Laurent_Polynomials.Poly; l : List ) return Complex_Multivariate_Laurent_Polynomials.Poly is use Complex_Multivariate_Laurent_Polynomials; res : Poly := Null_Poly; procedure Select_Term ( t : in Term; cont : out boolean ) is begin if Is_In(l,t.dg.all) then Plus_Term(res,t); end if; cont := true; end Select_Term; procedure Select_Poly is new Visiting_Iterator ( Select_Term ); begin Select_Poly(p); return res; end Select_Terms; function Construct_Power_Lists ( p : Poly_Sys ) return Array_of_Lists is res : Array_of_Lists(p'range); begin for i in p'range loop res(i) := Construct_Power_List(p(i)); end loop; return res; end Construct_Power_Lists; function Construct_Power_Lists ( p : Laur_Sys ) return Array_of_Lists is res : Array_of_Lists(p'range); begin for i in p'range loop res(i) := Construct_Power_List(p(i)); end loop; return res; end Construct_Power_Lists; function Select_Terms ( p : Poly_Sys; al : Array_of_Lists ) return Poly_Sys is res : Poly_Sys(p'range); begin for i in p'range loop res(i) := Select_Terms(p(i),al(i)); end loop; return res; end Select_Terms; function Select_Terms ( p : Laur_Sys; al : Array_of_Lists ) return Laur_Sys is res : Laur_Sys(p'range); begin for i in p'range loop res(i) := Select_Terms(p(i),al(i)); end loop; return res; end Select_Terms; end Power_Lists; SHAR_EOF fi # end of overwriting check if test -f 'power_lists.ads' then echo shar: will not over-write existing file "'power_lists.ads'" else cat << "SHAR_EOF" > 'power_lists.ads' with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Complex_Multivariate_Polynomials; with Complex_Multivariate_Laurent_Polynomials; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Laurent_Polynomial_Systems; use Complex_Laurent_Polynomial_Systems; package Power_Lists is -- DESCRIPTION : -- This package offers routines dealing with the supports of polynomials. function Construct_Power_List ( p : Complex_Multivariate_Polynomials.Poly ) return List; function Construct_Power_List ( p : Complex_Multivariate_Laurent_Polynomials.Poly ) return List; -- DESCRIPTION : Returns the support of p. function Select_Terms ( p : Complex_Multivariate_Polynomials.Poly; l : List ) return Complex_Multivariate_Polynomials.Poly; function Select_Terms ( p : Complex_Multivariate_Laurent_Polynomials.Poly; l : List ) return Complex_Multivariate_Laurent_Polynomials.Poly; -- DESCRIPTION : -- Returns those terms in p whose vector of powers occurs in the list l. function Construct_Power_Lists ( p : Poly_Sys ) return Array_of_Lists; function Construct_Power_Lists ( p : Laur_Sys ) return Array_of_Lists; -- DESCRIPTION : -- Returns the supports of the (Laurent) polynomial systems. function Select_Terms ( p : Poly_Sys; al : Array_of_Lists ) return Poly_Sys; function Select_Terms ( p : Laur_Sys; al : Array_of_Lists ) return Laur_Sys; -- DESCRIPTION : -- Returns those terms in each polynomial p(i) whose vector of powers -- occurs in the list al(i), for i in p'range = al'range. end Power_Lists; SHAR_EOF fi # end of overwriting check if test -f 'set_structures_and_volumes.adb' then echo shar: will not over-write existing file "'set_structures_and_volumes.adb'" else cat << "SHAR_EOF" > 'set_structures_and_volumes.adb' with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Numbers,Complex_Vectors; use Complex_Numbers,Complex_Vectors; with Complex_Matrices; use Complex_Matrices; with Complex_Linear_System_Solvers; use Complex_Linear_System_Solvers; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Natural_Vectors,Volumes; use Volumes; with Power_Lists,Substitutors; use Power_Lists,Substitutors; with Complex_Multivariate_Polynomials; with Complex_Laurent_Polynomial_Systems; use Complex_Laurent_Polynomial_Systems; with Polynomial_to_Laurent_Converters; use Polynomial_to_Laurent_Converters; with Polynomial_Randomizers; use Polynomial_Randomizers; with Mixed_Homotopy_Continuation; use Mixed_Homotopy_Continuation; with Set_Structure; with Random_Product_System; with Construct_Random_Product_Start_System; package body Set_Structures_and_Volumes is -- AUXILIARIES : procedure Build_RPS ( k,n : in natural; p : in Poly_Sys ) is -- DESCRIPTION : -- If the set structure is empty, then a set structure will -- be constructed for the first k polynomials of p; -- the data in Random_Product_System will be build. begin if Set_Structure.Empty then declare tmp : Poly_Sys(p'range); use Complex_Multivariate_Polynomials; t : Term; cnst : Poly; begin tmp(1..k) := p(1..k); t.dg := new Natural_Vectors.Vector'(1..n => 0); t.cf := CMPLX(1.0); cnst := Create(t); tmp(k+1..n) := (k+1..n => cnst); Construct_Random_Product_Start_System.Build_Set_Structure(tmp); Natural_Vectors.Clear(Natural_Vectors.Link_to_Vector(t.dg)); Clear(cnst); end; end if; Random_Product_System.Init(n); Construct_Random_Product_Start_System.Build_Random_Product_System(n); end Build_RPS; procedure Build_Elimination_Matrix ( k,n : in natural; ind : in Natural_Vectors.Vector; m : in out matrix; pivots : in out Natural_Vectors.Vector; degenerate : out boolean ) is -- DESCRIPTION : -- builds the elimination matrix m. -- ON ENTRY : -- k the number of unknowns to be eliminated; -- n the number of polynomials and unknowns; -- ind entries in Random_Product_System; -- ind(l) indicates lth hyperplane; -- ON RETURN : -- m contains all k hyperplanes to use for elimination; -- pivots if not degenerate, then m(i,pivots(i)) /= 0; -- degenerate is true if the first k hyperplanes were inconsistent. degen : boolean; begin -- BUILD MATRIX : for i in ind'range loop declare h : vector(0..n) := Random_Product_System.Get_Hyperplane(i,ind(i)); begin for j in 1..n loop m(i,j) := h(j); end loop; m(i,n+1) := h(0); end; end loop; diagonalize(m,k,n+1); -- CHECK IF DEGENERATE : degen := false; declare eps : constant double_float := 10.0**(-10); begin for i in pivots'range loop for j in 1..n loop if modulus(m(i,j)) > eps then pivots(i) := j; end if; exit when (pivots(i) /= 0); end loop; degen := (pivots(i) = 0); exit when degen; end loop; end; degenerate := degen; end Build_Elimination_Matrix; procedure Eliminate ( k,n : in natural; p : in Poly_Sys; m : in matrix; pivots : in Natural_Vectors.Vector; q : in out Poly_Sys ) is -- DESCRIPTION : -- eliminates k unknowns of the polynomial system p. -- ON ENTRY : -- k the number of unknowns to be eliminated; -- n the number of polynomials and unknowns; -- p a polynomial system with random coefficients; -- m the diagonalized matrix, to be used for elimination, -- for i in m'range(1) : m(i,pivots(i)) /= 0; -- pivots a vector indicating nonzero entries in m. -- ON RETURN : -- q the reduced system. begin Clear(q); Copy(p,q); for i in pivots'range loop declare h : vector(0..n-i+1); piv : natural := pivots(i)-i+1; begin h(0) := m(i,n+1); h(1..n-i+1) := (1..n-i+1 => CMPLX(0.0)); h(piv) := m(i,pivots(i)); for j in piv+1..n-i+1 loop h(j) := m(i,j+i-1); end loop; Substitute(piv,h,q); end; end loop; end Eliminate; procedure Update ( sols : in out Solution_List; k,n : in natural; m : in matrix; pivots : in Natural_Vectors.Vector ) is -- DESCRIPTION : -- Based on the elimination matrix m, solution components for x1..xk -- can be computed. -- ON ENTRY : -- sols a list of solutions, with values for x(n-k+1)..x(n); -- k the number of unknowns that have been eliminated; -- n total number of unknowns; -- m the elimination matrix; -- pivots for i in pivots'range : m(i,pivots(i)) /= 0. -- ON RETURN : -- sols the solution list with n-dimensional vectors. tmp,res,res_last : Solution_List; begin tmp := sols; while not Is_Null(tmp) loop declare sol : Solution(n-k) := Head_Of(tmp).all; soln : Solution(n); ind : natural; begin soln.t := CMPLX(0.0); soln.m := sol.m; soln.v := (1..n => CMPLX(0.0)); for i in 1..k loop soln.v(pivots(i)) := -m(i,n+1); end loop; ind := 0; for i in 1..n loop if soln.v(i) = CMPLX(0.0) then ind := ind + 1; soln.v(i) := sol.v(ind); end if; end loop; for i in 1..k loop ind := pivots(i); for j in ind+1..n loop soln.v(ind) := soln.v(ind) - m(i,j)*soln.v(j); end loop; soln.v(ind) := soln.v(ind) / m(i,ind); end loop; Append(res,res_last,soln); end; tmp := Tail_Of(tmp); end loop; Clear(sols); Copy(res,sols); end Update; procedure Build_Indices ( l,k,n : in natural; p : in Poly_Sys; acc : in out Natural_Vectors.Vector; bb : in out natural ) is -- DESCRIPTION : -- Builds the indices in the vector acc. -- ON ENTRY : -- l index in the array acc; -- k number of unknowns to eliminate; -- n number of polynomials and unknowns; -- p a polynomial system; -- acc(1..l-1) contains entries indicating hyperplanes -- in Random_Product_System. -- ON RETURN : -- acc(1..l) contains entries indicating hyperplanes -- in Random_Product_System; -- bb the mixed Bezout BKK bound. begin if l > k then declare degenerate : boolean; m : matrix(1..k,1..n+1); pivots : Natural_Vectors.Vector(1..k); begin pivots := (1..k => 0); Build_Elimination_Matrix(k,n,acc,m,pivots,degenerate); if not degenerate then declare q : Poly_Sys(p'range); begin Eliminate(k,n,p,m,pivots,q); bb := bb + Bezout_BKK(0,n-k,q); Clear(q); end; end if; end; else for j in 1..Random_Product_System.Number_of_Hyperplanes(l) loop acc(l) := j; Build_Indices(l+1,k,n,p,acc,bb); end loop; end if; end Build_Indices; procedure Build_Indices ( l,k,n : in natural; p : in Poly_Sys; tv : in Tree_of_Vectors; acc : in out Natural_Vectors.Vector; bb : in out natural ) is -- DESCRIPTION : -- Builds the indices in the vector acc. -- ON ENTRY : -- l index in the array acc; -- k number of unknowns to eliminate; -- n number of polynomials and unknowns; -- p a polynomial system; -- tv the tree of degrees used to compute the mixed volume; -- acc(1..l-1) contains entries indicating hyperplanes -- in Random_Product_System. -- ON RETURN : -- acc(1..l) contains entries indicating hyperplanes -- in Random_Product_System; -- bb the mixed Bezout BKK bound. begin if l > k then declare degenerate : boolean; m : matrix(1..k,1..n+1); pivots : Natural_Vectors.Vector(1..k); begin pivots := (1..k => 0); Build_Elimination_Matrix(k,n,acc,m,pivots,degenerate); if not degenerate then declare q : Poly_Sys(p'range); begin Eliminate(k,n,p,m,pivots,q); bb := bb + Bezout_BKK(0,n-k,q,tv); Clear(q); end; end if; end; else for j in 1..Random_Product_System.Number_of_Hyperplanes(l) loop acc(l) := j; Build_Indices(l+1,k,n,p,tv,acc,bb); end loop; end if; end Build_Indices; procedure Build_Indices2 ( l,k,n : in natural; p : in Poly_Sys; tv : in out Tree_of_Vectors; acc : in out Natural_Vectors.Vector; bb : in out natural ) is -- DESCRIPTION : -- Builds the indices in the vector acc. -- ON ENTRY : -- l index in the array acc; -- k number of unknowns to eliminate; -- n number of polynomials and unknowns; -- p a polynomial system; -- acc(1..l-1) contains entries indicating hyperplanes -- in Random_Product_System. -- ON RETURN : -- tv the tree of degrees used to compute the mixed volume; -- acc(1..l) contains entries indicating hyperplanes -- in Random_Product_System; -- bb the mixed Bezout BKK bound. begin if l > k then declare degenerate : boolean; m : matrix(1..k,1..n+1); pivots : Natural_Vectors.Vector(1..k); begin pivots := (1..k => 0); Build_Elimination_Matrix(k,n,acc,m,pivots,degenerate); if not degenerate then declare q : Poly_Sys(p'range); qtv,tmp : Tree_of_Vectors; mv : natural; begin Eliminate(k,n,p,m,pivots,q); Bezout_BKK(0,n-k,q,qtv,mv); bb := bb + mv; tmp := qtv; while not Is_Null(tmp) loop declare nd : node := Head_Of(tmp); begin if Is_In(tv,nd.d) then Clear(nd); else Construct(nd,tv); end if; end; tmp := Tail_Of(tmp); end loop; Clear(q); end; end if; end; else for j in 1..Random_Product_System.Number_of_Hyperplanes(l) loop acc(l) := j; Build_Indices2(l+1,k,n,p,tv,acc,bb); end loop; end if; end Build_Indices2; procedure Build_Indices ( file : in file_type; p : in Poly_Sys; l,k,n : in natural; acc : in out Natural_Vectors.Vector; bb : in out natural; sols,sols_last : in out Solution_List ) is -- DESCRIPTION : -- Builds the indices in the vector acc. -- ON ENTRY : -- file file to write intermediate results on; -- p a polynomial system; -- l index in the array acc; -- k number of unknowns to eliminate; -- n number of polynomials and unknowns; -- acc(1..l-1) contains entries indicating hyperplanes -- in Random_Product_System. -- ON RETURN : -- acc(1..l) contains entries indicating hyperplanes -- in Random_Product_System; -- bb the mixed Bezout BKK bound; -- sols the solutions of pi; -- sols_last points to the last element of the list sols. begin if l > k then declare degenerate : boolean; m : matrix(1..k,1..n+1); pivots : Natural_Vectors.Vector(1..k); begin pivots := (1..k => 0); Build_Elimination_Matrix(k,n,acc,m,pivots,degenerate); if not degenerate then declare q : Poly_Sys(p'range); begin Eliminate(k,n,p,m,pivots,q); declare las : Laur_Sys(q'range); qsols : Solution_List; bkk : natural; begin las := Polynomial_to_Laurent_System(q); Solve(file,las,bkk,qsols); bb := bb + bkk; Update(qsols,k,n,m,pivots); Concat(sols,sols_last,qsols); Clear(las); Shallow_Clear(qsols); end; Clear(q); end; end if; end; else for j in 1..Random_Product_System.Number_of_Hyperplanes(l) loop acc(l) := j; Build_Indices(file,p,l+1,k,n,acc,bb,sols,sols_last); end loop; end if; end Build_Indices; procedure Build_Indices ( file : in file_type; p : in Poly_Sys; l,k,n : in natural; acc : in out Natural_Vectors.Vector; tv : in Tree_of_Vectors; bb : in out natural; sols,sols_last : in out Solution_List ) is -- DESCRIPTION : -- Builds the indices in the vector acc. -- ON ENTRY : -- file file to write intermediate results on; -- p a polynomial system; -- l index in the array acc; -- k number of unknowns to eliminate; -- n number of polynomials and unknowns; -- acc(1..l-1) contains entries indicating hyperplanes -- in Random_Product_System; -- tv the tree containing useful directions; -- ON RETURN : -- acc(1..l) contains entries indicating hyperplanes -- in Random_Product_System; -- bb the mixed Bezout BKK bound; -- sols the solutions of pi; -- sols_last points to the last element of the list sols. begin if l > k then declare degenerate : boolean; m : matrix(1..k,1..n+1); pivots : Natural_Vectors.Vector(1..k); begin pivots := (1..k => 0); Build_Elimination_Matrix(k,n,acc,m,pivots,degenerate); if not degenerate then declare q : Poly_Sys(p'range); begin Eliminate(k,n,p,m,pivots,q); declare las : Laur_Sys(q'range); qsols : Solution_List; bkk : natural; begin las := Polynomial_to_Laurent_System(q); Solve(file,las,tv,bkk,qsols); bb := bb + bkk; Update(qsols,k,n,m,pivots); Concat(sols,sols_last,qsols); Clear(las); Shallow_Clear(qsols); end; Clear(q); end; end if; end; else for j in 1..Random_Product_System.Number_of_Hyperplanes(l) loop acc(l) := j; Build_Indices(file,p,l+1,k,n,acc,tv,bb,sols,sols_last); end loop; end if; end Build_Indices; -- TARGET ROUTINES : function Bezout_BKK ( k,n : natural; p : Poly_Sys ) return natural is res : natural; begin if k = 0 then declare adl : Array_of_Lists(p'range); begin adl := Construct_Power_Lists(p); res := Mixed_Volume(n,adl); Deep_Clear(adl); end; elsif k = n then if Set_Structure.Empty then Construct_Random_Product_Start_System. Build_Set_Structure(p); res := Set_Structure.B; Set_Structure.Clear; else res := Set_Structure.B; end if; else Build_RPS(k,n,p); declare acc : Natural_Vectors.Vector(1..k); q : Poly_Sys(1..n-k); begin acc := (1..k => 0); res := 0; for i in q'range loop q(i) := Complex_Randomize1(p(i+k)); end loop; Build_Indices(1,k,n,q,acc,res); Clear(q); end; Random_Product_System.Clear; end if; return res; end Bezout_BKK; function Bezout_BKK ( k,n : natural; p : Poly_Sys; tv : Tree_of_Vectors ) return natural is res : natural; begin if k = 0 then declare adl : Array_of_Lists(p'range); begin adl := Construct_Power_Lists(p); res := Mixed_Volume(n,adl,tv); Deep_Clear(adl); end; elsif k = n then if Set_Structure.Empty then Construct_Random_Product_Start_System. Build_Set_Structure(p); res := Set_Structure.B; Set_Structure.Clear; else res := Set_Structure.B; end if; else Build_RPS(k,n,p); declare acc : Natural_Vectors.Vector(1..k); q : Poly_Sys(1..n-k); begin acc := (1..k => 0); res := 0; for i in q'range loop q(i) := Complex_Randomize1(p(i+k)); end loop; Build_Indices(1,k,n,q,tv,acc,res); Clear(q); end; Random_Product_System.Clear; end if; return res; end Bezout_BKK; procedure Bezout_BKK ( k,n : in natural; p : in Poly_Sys; tv : in out Tree_of_Vectors; bb : out natural ) is res : natural; begin if k = 0 then declare adl : Array_of_Lists(p'range); begin adl := Construct_Power_Lists(p); Mixed_Volume(n,adl,tv,res); Deep_Clear(adl); end; elsif k = n then if Set_Structure.Empty then Construct_Random_Product_Start_System. Build_Set_Structure(p); res := Set_Structure.B; Set_Structure.Clear; else res := Set_Structure.B; end if; else Build_RPS(k,n,p); declare acc : Natural_Vectors.Vector(1..k); q : Poly_Sys(1..n-k); begin acc := (1..k => 0); res := 0; for i in q'range loop q(i) := Complex_Randomize1(p(i+k)); end loop; Build_Indices2(1,k,n,q,tv,acc,res); Clear(q); end; Random_Product_System.Clear; end if; bb := res; end Bezout_BKK; procedure Mixed_Solve ( file : in file_type; k,n : in natural; p : in Poly_Sys; bb : out natural; g : in out Poly_Sys; sols : in out Solution_List ) is begin if k = 0 then declare l : Laur_Sys(g'range); tmp : Solution_List; begin l := Polynomial_to_Laurent_System(g); Solve(file,l,bb,sols); tmp := sols; while not Is_Null(tmp) loop Head_Of(tmp).t := CMPLX(0.0); tmp := Tail_Of(tmp); end loop; Clear(l); end; elsif k = n then Construct_Random_Product_Start_System.Construct(p,g,sols); bb := Length_Of(sols); else Build_RPS(k,n,p); declare acc : Natural_Vectors.Vector(1..k); q : Poly_Sys(1..n-k); rq : Poly_Sys(p'range); sols_last : Solution_List; res : natural; begin acc := (1..k => 0); res := 0; for i in q'range loop q(i) := g(i+k); end loop; Build_Indices(file,q,1,k,n,acc,res,sols,sols_last); bb := res; rq := Random_Product_System.Polynomial_System; g(1..k) := rq(1..k); end; Random_Product_System.Clear; end if; end Mixed_Solve; procedure Mixed_Solve ( file : in file_type; k,n : in natural; p : in Poly_Sys; tv : in Tree_of_Vectors; bb : out natural; g : in out Poly_Sys; sols : in out Solution_List ) is begin if k = 0 then declare l : Laur_Sys(g'range); tmp : Solution_List; begin l := Polynomial_to_Laurent_System(g); Solve(file,l,tv,bb,sols); tmp := sols; while not Is_Null(tmp) loop Head_Of(tmp).t := CMPLX(0.0); tmp := Tail_Of(tmp); end loop; Clear(l); end; elsif k = n then Construct_Random_Product_Start_System.Construct(p,g,sols); bb := Length_Of(sols); else Build_RPS(k,n,p); declare acc : Natural_Vectors.Vector(1..k); q : Poly_Sys(1..n-k); rq : Poly_Sys(p'range); sols_last : Solution_List; res : natural; begin acc := (1..k => 0); res := 0; for i in q'range loop q(i) := g(i+k); end loop; Build_Indices(file,q,1,k,n,acc,tv,res,sols,sols_last); bb := res; rq := Random_Product_System.Polynomial_System; g(1..k) := rq(1..k); end; Random_Product_System.Clear; end if; end Mixed_Solve; end Set_Structures_and_Volumes; SHAR_EOF fi # end of overwriting check if test -f 'set_structures_and_volumes.ads' then echo shar: will not over-write existing file "'set_structures_and_volumes.ads'" else cat << "SHAR_EOF" > 'set_structures_and_volumes.ads' with text_io; use text_io; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Solutions; use Solutions; with Trees_of_Vectors; use Trees_of_Vectors; package Set_Structures_and_Volumes is -- DESCRIPTION : -- This package contains routines for implementing the -- hybrid approach of working with set structures and -- computing mixed volumes. procedure Build_RPS ( k,n : in natural; p : in Poly_Sys ); -- DESCRIPTION : -- If the set structure is empty, then a set structure will -- be constructed for the first k polynomials of p. -- This allows the construction of random product polynomials. -- ON ENTRY : -- k number of polynomials for which a random product structure -- needs to be constructed, 0 < k <= n; -- n total number of polynomials in the system; -- p polynomial system. -- ON RETURN : -- The result of this operation can be found in -- the data of the package Random_Product_System. function Bezout_BKK ( k,n : natural; p : Poly_Sys ) return natural; function Bezout_BKK ( k,n : natural; p : Poly_Sys; tv : Tree_of_Vectors ) return natural; procedure Bezout_BKK ( k,n : in natural; p : in Poly_Sys; tv : in out Tree_of_Vectors; bb : out natural ); -- DESCRIPTION : -- If the set structure is empty, then a set structure will be -- constructed for the first k equations. -- This set structure will be used to eliminate k unknowns, -- for the last equations of p, the BKK bound will be computed. -- ON ENTRY : -- k number of polynomials for which a random product -- structure needs to be constructed, 0 <= k <= n; -- ON RETURN : -- tv tree of useful directions used to compute mixed volume, -- once tv has been constructed, the mixed volume -- can be computed more efficiently; -- bb if k = 0, then the BKK bound is returned, -- if 0 < k < n, then for the first k polynomials a product -- structure has been used to eliminate k unknowns, -- if k = n, then the Bezout number based on the set structure -- will be returned; procedure Mixed_Solve ( file : in file_type; k,n : in natural; p : in Poly_Sys; bb : out natural; g : in out Poly_Sys; sols : in out Solution_List ); procedure Mixed_Solve ( file : in file_type; k,n : in natural; p : in Poly_Sys; tv : in Tree_of_Vectors; bb : out natural; g : in out Poly_Sys; sols : in out Solution_List ); -- DESCRIPTION : -- Constructs a random product coefficient start system for p. -- ON ENTRY : -- file needed to write intermediate results on; -- k a number between 0 and n; -- n the number of variables and equations; -- p a polynomial system; -- tv the tree of useful directions. -- ON RETURN : -- g a random product coefficient start system; -- if k = 0, then a random coefficient start system, -- if k = n, then a random product start system; -- bb the Bezout BKK bound for the system p; -- if k = 0, then bb = BKK bound, -- if k = n, then bb = Bezout number based on set structure; -- sols the solutions of g. end Set_Structures_and_Volumes; SHAR_EOF fi # end of overwriting check if test -f 'transformations.adb' then echo shar: will not over-write existing file "'transformations.adb'" else cat << "SHAR_EOF" > 'transformations.adb' with unchecked_deallocation; with Complex_Numbers; use Complex_Numbers; with Greatest_Common_Divisor; use Greatest_Common_Divisor; with Integer_Linear_System_Solvers; use Integer_Linear_System_Solvers; package body Transformations is type Transfo_tp is new matrix; procedure free is new unchecked_deallocation (Transfo_tp,Transfo); -- CONSTRUCTORS : function Id ( n : natural ) return Transfo is t : Transfo; begin t := new Transfo_tp(1..n,1..n); for i in 1..n loop for j in 1..n loop t(i,j) := 0; end loop; t(i,i) := 1; end loop; return t; end Id; function Create ( v : Vector; i : integer ) return Transfo is t : Transfo; j : integer; begin t := Id(v'last-v'first+1); if v(i) = 0 then return t; else j := 0; for k in v'range loop if (v(k) /= 0) and (k /= i) then j := k; end if; exit when j /= 0; end loop; if j = 0 then return t; else declare a,b,k,l,d : integer; begin a := v(i); b := v(j); gcd(a,b,k,l,d); a := a/d; b := b/d; t(i,i) := k; t(i,j) := l; t(j,i) := -b; t(j,j) := a; end; return t; end if; end if; end Create; function Create ( v : Integer_Vectors_of_Vectors.Vector ) return Transfo is t : Transfo; begin t := new Transfo_tp(v'range,v'range); for i in v'range loop for j in v(i)'range loop t(j,i) := v(i)(j); end loop; end loop; return t; end Create; function Create ( m : Matrix ) return Transfo is t : Transfo; begin t := new Transfo_tp(m'range(1),m'range(2)); t.all := transfo_tp(m); return t; end Create; function Rotate ( v : Vector; i : integer ) return Transfo is t : Transfo; j : integer; begin t := Id(v'last-v'first+1); if v(i) = 0 then return t; else declare w : Vector(v'range) := v; acc : Transfo := new Transfo_tp'(t.all); begin loop j := 0; for k in w'range loop if (w(k) /= 0) and (k /= i) then j := k; end if; exit when j /= 0; end loop; if j /= 0 then declare a,b,k,l,d : integer; begin a := w(i); b := w(j); gcd(a,b,k,l,d); a := a/d; b := b/d; t(i,i) := k; t(i,j) := l; t(j,i) := -b; t(j,j) := a; end; Apply(t,w); Mult2(t,acc); t(i,i) := 1; t(j,j) := 1; t(i,j) := 0; t(j,i) := 0; end if; exit when j = 0; end loop; Clear(t); return acc; end; end if; end Rotate; function Rotate ( v : Link_to_Vector; i : integer ) return Transfo is begin if v = null then return null; else return Rotate(v.all,i); end if; end Rotate; procedure Transpose ( t : in out Transfo ) is -- DESCRIPTION : -- Transposes the matrix of t. temp : integer; begin for i in t'range(1) loop for j in t'first(2)..(i-1) loop temp := t(i,j); t(i,j) := t(j,i); t(j,i) := temp; end loop; end loop; end Transpose; function Build_Transfo ( v : Vector; i : integer ) return Transfo is t : Transfo; ind : integer; zeroes : boolean; begin t := Id(v'last-v'first+1); if v(i) /= 0 then ind := i; else ind := v'last + 1; for k in v'range loop if v(k) /= 0 then ind := k; exit; end if; end loop; end if; if ind = v'last + 1 then return t; else declare w : Vector(v'range) := v; acc : Transfo := new Transfo_tp'(t.all); j1,j2 : integer; begin if v(i) = 0 then acc(i,i) := 0; acc(i,ind) := 1; acc(ind,i) := 1; acc(ind,ind) := 0; w(i) := w(ind); w(ind) := 0; end if; for k in v'first..i loop if w(k) /= 0 then j1 := k; exit; end if; end loop; if j1 /= i then zeroes := false; loop for k in (j1+1)..i loop if w(k) /= 0 then j2 := k; exit; end if; end loop; declare a,b,k,l,d : integer; begin a := w(j1); b := w(j2); gcd(a,b,k,l,d); a := a/d; b := b/d; t(j1,j1) := l; t(j1,j2) := -k; t(j2,j1) := a; t(j2,j2) := b; w(j2) := d; end; Mult2(t,acc); t(j1,j1) := 1; t(j2,j2) := 1; t(j1,j2) := 0; t(j2,j1) := 0; if j2 < i then j1 := j2; else exit; end if; end loop; else zeroes := true; end if; for k in reverse i..v'last loop if w(k) /= 0 then j2 := k; exit; end if; end loop; if j2 /= i then loop for k in reverse i..(j2-1) loop if w(k) /= 0 then j1 := k; exit; end if; end loop; declare a,b,k,l,d : integer; begin a := w(j1); b := w(j2); gcd(a,b,k,l,d); a := a/d; b := b/d; t(j1,j1) := a; t(j1,j2) := b; t(j2,j1) := -l; t(j2,j2) := k; w(j1) := d; end; Mult2(t,acc); t(j1,j1) := 1; t(j2,j2) := 1; t(j1,j2) := 0; t(j2,j1) := 0; if j1 > i then j2 := j1; else exit; end if; end loop; elsif zeroes then if w(i) < 0 then t(i,i) := -1; Mult2(t,acc); end if; end if; Clear(t); --otherwise segmentation fault... return acc; end; end if; end Build_Transfo; function Build_Transfo ( v : Link_to_Vector; i : integer ) return Transfo is begin if v = null then return null; else return Build_Transfo(v.all,i); end if; end Build_Transfo; -- SELECTOR : function Dimension ( t : Transfo ) return natural is begin return (t'last(1) - t'first(1) + 1); end Dimension; function Sign ( t : Transfo ) return integer is begin if t /= null then declare a : matrix(t'range(1),t'range(2)) := matrix(t.all); begin return Det(a); end; else return 0; end if; end Sign; -- OPERATIONS : function Transpose ( t : Transfo ) return Transfo is res : Transfo := new Transfo_tp(t'range(2),t'range(1)); begin for i in res'range(1) loop for j in res'range(2) loop res(i,j) := t(j,i); end loop; end loop; return res; end Transpose; function Invert ( t : Transfo ) return Transfo is n : constant natural := Dimension(t); triang : matrix(t'range(1),t'range(2)) := matrix(t.all); l : matrix(t'range(1),t'range(1)); res : Transfo := new Transfo_tp(t'range(1),t'range(2)); x,b : Vector(1..n) := (1..n => 0); fail : boolean; begin Upper_Triangulate(l,triang); for j in t'range(2) loop for i in l'range(1) loop -- image of jth basis vector b(i) := l(i,j); end loop; Solve1(triang,x,b,fail); for i in t'range(1) loop res(i,j) := x(i); end loop; end loop; return res; end Invert; function "*" ( t1,t2 : Transfo ) return Transfo is r : Transfo; begin r := new Transfo_tp(t1'range(1),t2'range(2)); r.all := t1.all*t2.all; return r; end "*"; procedure Mult1 ( t1 : in out Transfo; t2 : in Transfo ) is begin Mult1(t1.all,t2.all); end Mult1; procedure Mult2 ( t1 : in Transfo; t2 : in out Transfo ) is begin Mult2(t1.all,t2.all); end Mult2; function "*" ( t : Transfo; v : Vector ) return Vector is r : Vector(t'range(1)); begin r := t.all*v; return r; end "*"; function "*" ( t : Transfo; v : Link_to_Vector ) return Link_to_Vector is begin if v = null then return v; else declare res : Link_to_Vector := new Vector(t'range(1)); begin res.all := t.all*v.all; return res; end; end if; end "*"; procedure Apply ( t : in Transfo; v : in out Vector ) is begin v := t.all*v; end Apply; procedure Apply ( t : in Transfo; v : in out Link_to_Vector ) is begin if v /= null then Apply(t,v.all); end if; end Apply; function "*" ( t : Transfo; v : Complex_Vectors.Vector ) return Complex_Vectors.Vector is res : Complex_Vectors.Vector(v'range); begin for j in t'range(2) loop res(j) := CMPLX(1.0); for i in t'range(1) loop res(j) := res(j)*v(i)**t(i,j); end loop; end loop; return res; end "*"; procedure Apply ( t : in Transfo; v : in out Complex_Vectors.Vector ) is begin v := t*v; end Apply; -- DESTRUCTOR : procedure Clear ( t : in out Transfo ) is begin free(t); end Clear; end Transformations; SHAR_EOF fi # end of overwriting check if test -f 'transformations.ads' then echo shar: will not over-write existing file "'transformations.ads'" else cat << "SHAR_EOF" > 'transformations.ads' with Integer_Vectors; use integer_Vectors; with Integer_Vectors_of_Vectors; with Integer_Matrices; use Integer_Matrices; with Complex_Vectors; package Transformations is -- DESCRIPTION : -- This package offers a data abstraction and a routine to -- calculate term transformations. type Transfo is private; -- CONSTRUCTORS : function Id ( n : natural ) return Transfo; -- DESCRIPTION : -- Returns the identical transformation. function Create ( v : Vector; i : integer ) return Transfo; -- DESCRIPTION : -- returns a transformation T such that after w = Apply(T,v), -- there exists a j /= i: w(i) = 1 and w(j) = 0; -- if v(i) = 0, then the identity transformation will be returned; -- T is an isomorphism. function Create ( v : Integer_Vectors_of_Vectors.Vector ) return Transfo; -- DESCRIPTION : -- returns a transformation T, where v(i) is the image of -- the i-th basis vector, for i in da'range. function Create ( m : Matrix ) return Transfo; -- DESCRIPTION : -- Returns the transformation defined by the matrix m. -- Apply(Create(m),v) = m*v. function Rotate ( v : Vector; i : integer ) return Transfo; function Rotate ( v : Link_to_Vector; i : integer ) return Transfo; -- DESCRIPTION : -- Returns a transformation T which will reduce v into e_i; -- if v(i) /= 0; T is an isomorphism. function Build_Transfo ( v : Vector; i : integer ) return Transfo; function Build_Transfo ( v : Link_to_Vector; i : integer ) return Transfo; -- DESCRIPTION : -- Returns a transformation T so that for all vectors x -- < x , v > = pv, after application of T on all x, the -- following holds: x(i) = pv / d, where d is the gcd of -- the components of v; T is an isomorphism. -- SELECTORS : function Dimension ( t : Transfo ) return natural; -- DESCRIPTION : -- Returns the dimension of the transformation. function Sign ( t : Transfo ) return integer; -- DESCRIPTION : -- Returns the determinant of the matrix representation of t, -- which is either +1 or -1. -- OPERATIONS : function Transpose ( t : Transfo ) return Transfo; -- DESCRIPTION : -- Returns the transposed transformation. function Invert ( t : Transfo ) return Transfo; -- DESCRIPTION : -- Computes the inverse transformation of t; -- after t1 := Invert(t), t1*t = t*t1 = Id. -- REQUIRED : t is an isomorphism. function "*" ( t1,t2 : Transfo ) return Transfo; -- DESCRIPTION : -- Returns t1 after t2 procedure Mult1 ( t1 : in out Transfo; t2 : in Transfo ); -- DESCRIPTION : -- t1 := t1 * t2; but with an efficient memory management procedure Mult2 ( t1 : in Transfo; t2 : in out Transfo ); -- DESCRIPTION : -- t2 := t1 * t2; but with an efficient memory management function "*"( t : Transfo; v : Vector ) return Vector; -- return t*v; function "*"( t : Transfo; v : Link_to_Vector ) return Link_to_Vector; procedure Apply ( t : in Transfo; v : in out Vector ); -- v := t*v; procedure Apply ( t : in Transfo; v : in out Link_to_Vector ); function "*" ( t : Transfo; v : Complex_Vectors.Vector ) return Complex_Vectors.Vector; procedure Apply ( t : in Transfo; v : in out Complex_Vectors.Vector ); -- v := t*v; -- DESTRUCTOR : procedure Clear ( t : in out Transfo ); -- DESCRIPTION : -- Frees all allocated memory space private type Transfo_tp; type Transfo is access Transfo_tp; end Transformations; SHAR_EOF fi # end of overwriting check if test -f 'transformations_io.adb' then echo shar: will not over-write existing file "'transformations_io.adb'" else cat << "SHAR_EOF" > 'transformations_io.adb' with integer_io; use integer_io; with Integer_Vectors; with Integer_Vectors_of_Vectors; package body Transformations_io is procedure get ( n : in natural; t : out Transfo ) is begin get(Standard_Input,n,t); end get; procedure get ( file : in file_type; n : in natural; t : out Transfo ) is v : Integer_Vectors_of_Vectors.Vector(1..n); begin for i in v'range loop v(i) := new Integer_Vectors.Vector(1..n); for j in v(i)'range loop get(file,v(i)(j)); end loop; end loop; t := Create(v); Integer_Vectors_of_Vectors.Clear(v); end get; procedure put ( t : in Transfo ) is begin put(Standard_Output,t); end put; procedure put ( file : in file_type; t : in Transfo ) is n : natural := Dimension(t); v : Integer_Vectors_of_Vectors.Vector(1..n); begin for i in v'range loop v(i) := new Integer_Vectors.Vector'(1..n => 0); v(i)(i) := 1; Apply(t,v(i).all); end loop; for i in v'range loop for j in v(i)'range loop put(file,' '); put(file,v(j)(i),1); end loop; new_line(file); end loop; Integer_Vectors_of_Vectors.Clear(v); end put; end Transformations_io; SHAR_EOF fi # end of overwriting check if test -f 'transformations_io.ads' then echo shar: will not over-write existing file "'transformations_io.ads'" else cat << "SHAR_EOF" > 'transformations_io.ads' with text_io; use text_io; with Transformations; use Transformations; package Transformations_io is -- DESCRIPTION : -- This package contains routines for input and output -- of transformations. procedure get ( n : in natural; t : out Transfo ); procedure get ( file : in file_type; n : in natural; t : out Transfo ); -- DESCRIPTION : -- Reads n vectors from standard input or from file. -- These vectors are considered as the images of -- the basis vectors under the transformation t. procedure put ( t : in Transfo ); procedure put ( file : in file_type; t : in Transfo ); -- DESCRIPTION : -- Writes the images of the basis vectors under t. end Transformations_io; SHAR_EOF fi # end of overwriting check if test -f 'transforming_integer_vector_lists.adb' then echo shar: will not over-write existing file "'transforming_integer_vector_lists.adb'" else cat << "SHAR_EOF" > 'transforming_integer_vector_lists.adb' with Integer_Vectors_Utilities; use Integer_Vectors_Utilities; package body Transforming_Integer_Vector_Lists is procedure Shift ( l : in out List; v : in Vector ) is tmp : List := l; begin while not Is_Null(tmp) loop declare lv : Link_to_Vector := Head_Of(tmp); begin lv.all := lv.all - v; Set_Head(tmp,lv); end; tmp := Tail_Of(tmp); end loop; end Shift; procedure Shift ( l : in out List; v : in Link_to_Vector ) is begin if v /= null then Shift(l,v.all); end if; end Shift; function Shift ( l : List; v : Vector ) return List is tmp,res,res_last : List; v1 : Vector(v'range); begin tmp := l; while not Is_Null(tmp) loop v1 := Head_Of(tmp).all; declare v2 : Vector(v1'range) := v1 - v; begin Append(res,res_last,v2); end; tmp := Tail_Of(tmp); end loop; return res; end Shift; function Shift ( l : List; v : Link_to_Vector ) return List is begin if v = null then declare res : List; begin Copy(l,res); return res; end; else return Shift(l,v.all); end if; end Shift; function "*"( l : List; t : Transfo ) return List is begin return t*l; end "*"; function "*"( t : Transfo; l : List ) return List is tmp,res,res_last : List; d,td : Link_to_Vector; begin tmp := l; while not Is_Null(tmp) loop d := Head_Of(tmp); td := t*d; Append(res,res_last,td); tmp := Tail_Of(tmp); end loop; return res; end "*"; procedure Apply ( l : in out List; t : in Transfo ) is res : List := t*l; begin Copy(res,l); end Apply; function Reduce ( l : List; i : integer ) return List is tmp,res,res_last : List; begin tmp := l; while not Is_Null(tmp) loop declare d1 : Link_to_Vector := Head_Of(tmp); d2 : Link_to_Vector := Reduce(d1,i); begin -- Append_Diff(res,res_last,d2); -- be aware of duplicates ! Append(res,res_last,d2); -- be aware of duplicates ! end; tmp := Tail_Of(tmp); end loop; return res; end Reduce; procedure Reduce ( l : in out List; i : in integer ) is res : List := Reduce(l,i); begin Copy(res,l); end Reduce; function Insert ( l : List; i,a : integer ) return List is tmp,res,res_last : List; begin tmp := l; while not Is_Null(tmp) loop declare d1 : Link_to_Vector := Head_Of(tmp); d2 : Link_to_Vector := Insert(d1,i,a); begin Append(res,res_last,d2); end; tmp := Tail_Of(tmp); end loop; return res; end Insert; procedure Insert ( l : in out List; i,a : in integer ) is res : List := Insert(l,i,a); begin Deep_Clear(l); l := res; end Insert; function Transform_and_Reduce ( t : Transfo; i : integer; l : List ) return List is tmp,res,res_last : List; begin tmp := l; while not Is_Null(tmp) loop declare d : Link_to_Vector := Head_Of(tmp); td : Vector(d'range) := t*d.all; dr : Link_to_Vector := new Vector'(Reduce(td,i)); begin Append(res,res_last,dr); end; tmp := Tail_Of(tmp); end loop; return res; end Transform_and_Reduce; procedure Transform_and_Reduce ( t : in Transfo; i : in integer; l : in out List ) is res : List := Transform_and_Reduce(t,i,l); begin Deep_Clear(l); l := res; end Transform_and_Reduce; function Insert_and_Transform ( l : List; i,a : integer; t : Transfo ) return List is tmp,res,res_last : List; begin tmp := l; while not Is_Null(tmp) loop declare d : Link_to_Vector := Insert_and_Transform(Head_Of(tmp),i,a,t); begin Append(res,res_last,d); end; tmp := Tail_Of(tmp); end loop; return res; end Insert_and_Transform; procedure Insert_and_Transform ( l : in out List; i,a : in integer; t : in Transfo ) is res : List := Insert_and_Transform(l,i,a,t); begin Deep_Clear(l); l := res; end Insert_and_Transform; end Transforming_Integer_Vector_Lists; SHAR_EOF fi # end of overwriting check if test -f 'transforming_integer_vector_lists.ads' then echo shar: will not over-write existing file "'transforming_integer_vector_lists.ads'" else cat << "SHAR_EOF" > 'transforming_integer_vector_lists.ads' with Integer_Vectors; use Integer_Vectors; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Transformations; use Transformations; package Transforming_Integer_Vector_Lists is -- DESCRIPTION : -- This package provides unimodular transformations of -- lists of integer vectors. procedure Shift ( l : in out List; v : in Vector ); procedure Shift ( l : in out List; v : in Link_to_Vector ); function Shift ( l : List; v : Vector ) return List; function Shift ( l : List; v : Link_to_Vector ) return List; -- DESCRIPTION : -- The list will be shifted: Shift(l,v) = { y-v | Is_In(l,y) } function "*"( l : List; t : Transfo ) return List; function "*"( t : Transfo; l : List ) return List; -- DESCRIPTION : -- Returns the transformed list of points. procedure Apply ( l : in out List; t : in Transfo ); -- DESCRIPTION : -- Applies the transformation t to the list l. function Reduce ( l : List; i : integer ) return List; procedure Reduce ( l : in out List; i : in integer ); -- DESCRIPTION : -- Returns a list of vectors where the i-th component has been deleted. function Insert ( l : List; i,a : integer ) return List; procedure Insert ( l : in out List; i,a : in integer ); -- DESCRIPTION : -- Returns a list of vectors where the i-th component has been inserted, -- for all d in l: d(i) = a. function Transform_and_Reduce ( t : Transfo; i : integer; l : List ) return List; procedure Transform_and_Reduce ( t : in Transfo; i : in integer; l : in out List ); -- DESCRIPTION : -- Transforms the list l and deletes the i-th component -- of every element in the transformed list. function Insert_and_Transform ( l : List; i,a : integer; t : Transfo ) return List; procedure Insert_and_Transform ( l : in out List; i,a : in integer; t : in Transfo ); -- DESCRIPTION : -- Inserts the i-th component of every element in the list l, -- using the value a, and transforms the list, applying t. end Transforming_Integer_Vector_Lists; SHAR_EOF fi # end of overwriting check if test -f 'transforming_laurent_systems.adb' then echo shar: will not over-write existing file "'transforming_laurent_systems.adb'" else cat << "SHAR_EOF" > 'transforming_laurent_systems.adb' with Complex_Numbers; use Complex_Numbers; with Integer_Vectors_Utilities; use Integer_Vectors_Utilities; package body Transforming_Laurent_Systems is function Initial_Link_to_Vector ( p : Poly ) return Link_to_Vector is -- DESCRIPTION : -- Returns the initial degrees of the polynomial p. init : Link_to_Vector; procedure Init_Term ( t : in Term; cont : out boolean ) is begin init := new Integer_Vectors.Vector'(t.dg.all); cont := false; end Init_Term; procedure Initial_Term is new Visiting_Iterator (Init_Term); begin Initial_Term(p); return init; end Initial_Link_to_Vector; procedure Shift ( p : in out Poly ) is init : Link_to_Vector := Initial_Link_to_Vector(p); procedure Shift_Term ( t : in out Term; cont : out boolean ) is begin Min_Vector(Link_to_Vector(t.dg),init); cont := true; end Shift_Term; procedure Shift_Terms is new Changing_Iterator (Shift_Term); begin if p /= Null_Poly then Shift_Terms(p); end if; Clear(init); end Shift; function Shift ( p : Poly ) return Poly is res : Poly := Null_Poly; init : Link_to_Vector := Initial_Link_to_Vector(p); procedure Shift_Term ( t : in Term; cont : out boolean ) is rt : Term; begin rt.cf := t.cf; rt.dg := t.dg - Degrees(init); Plus_Term(res,rt); Clear(rt); cont := true; end Shift_Term; procedure Shift_Terms is new Visiting_Iterator (Shift_Term); begin if p /= Null_Poly then Shift_Terms(p); end if; Clear(init); return res; end Shift; procedure Shift ( l : in out Laur_Sys ) is begin for k in l'range loop Shift(l(k)); end loop; end Shift; function Shift ( l : Laur_Sys ) return Laur_Sys is res : Laur_Sys (l'range); begin for k in l'range loop res(k) := Shift(l(k)); end loop; return res; end Shift; procedure Transform ( t : in Transfo; p : in out Poly ) is procedure Transform_Term ( tt : in out Term; cont : out boolean ) is begin Apply(t,Link_to_Vector(tt.dg)); cont := true; end Transform_Term; procedure Transform_Terms is new Changing_Iterator (Transform_Term); begin Transform_Terms(p); end Transform; function Transform ( t : Transfo; p : Poly ) return Poly is res : Poly; begin Copy(p,res); Transform(t,res); return res; end Transform; function Transform2 ( t : Transfo; p : Poly ) return Poly is -- IMPORTANT : This function might change the term order ! res : Poly := Null_Poly; procedure Transform_Term ( tt : in Term; cont : out boolean ) is rt : Term; begin rt.cf := tt.cf; rt.dg := Degrees(t*Link_to_Vector(tt.dg)); Plus_Term(res,rt); Clear(rt); cont := true; end Transform_Term; procedure Transform_Terms is new Visiting_Iterator (Transform_Term); begin Transform_Terms(p); return res; end Transform2; procedure Transform ( t : in Transfo; l : in out Laur_Sys ) is begin for i in l'range loop Transform(t,l(i)); end loop; end Transform; function Transform ( t : Transfo; l : Laur_Sys ) return Laur_Sys is res : Laur_Sys(l'range); begin for i in l'range loop res(i) := Transform(t,l(i)); end loop; return res; end Transform; function Maximal_Support ( p : Poly; v : Vector ) return integer is res : integer; first : boolean := true; procedure Scan_Term ( t : in Term; cont : out boolean ) is sp : integer := t.dg.all*v; begin if first then res := sp; first := false; elsif sp > res then res := sp; end if; cont := true; end Scan_Term; procedure Scan_Terms is new Visiting_Iterator (Scan_Term); begin Scan_Terms(p); return res; end Maximal_Support; function Maximal_Support ( p : Poly; v : Link_to_Vector ) return integer is begin return Maximal_Support(p,v.all); end Maximal_Support; procedure Face ( i,m : in integer; p : in out Poly ) is procedure Face_Term ( t : in out Term; cont : out boolean ) is begin if t.dg(i) /= m then t.cf := CMPLX(0.0); end if; cont := true; end Face_Term; procedure Face_Terms is new Changing_Iterator(Face_Term); begin Face_Terms(p); end Face; function Face ( i,m : integer; p : Poly ) return Poly is res : Poly; begin Copy(p,res); Face(i,m,res); return res; end Face; function Face2 ( i,m : integer; p : Poly ) return Poly is -- IMPORTANT : This function might change the term order ! res : Poly := Null_Poly; procedure Face_Term ( t : in Term; cont : out boolean ) is begin if t.dg(i) = m then Plus_Term(res,t); end if; cont := true; end Face_Term; procedure Face_Terms is new Visiting_Iterator(Face_Term); begin Face_Terms(p); return res; end Face2; procedure Face ( i,m : in integer; l : in out Laur_Sys ) is begin for j in l'range loop Face(i,m,l(j)); end loop; end Face; function Face ( i,m : integer; l : Laur_Sys ) return Laur_Sys is res : Laur_Sys(l'range); begin for j in l'range loop res(j) := Face(i,m,l(j)); end loop; return res; end Face; procedure Face ( v : in Vector; m : in integer; p : in out Poly ) is procedure Face_Term ( t : in out Term; cont : out boolean ) is begin if t.dg.all*v /= m then t.cf := CMPLX(0.0); end if; cont := true; end Face_Term; procedure Face_Terms is new Changing_Iterator(Face_Term); begin Face_Terms(p); end Face; function Face ( v : Vector; m : integer; p : Poly ) return Poly is res : Poly; begin Copy(p,res); Face(v,m,res); return res; end Face; function Face2 ( v : Vector; m : integer; p : Poly ) return Poly is -- IMPORTANT : This procedure might change the term order ! res : Poly := Null_Poly; procedure Face_Term ( t : in Term; cont : out boolean ) is begin if t.dg.all*v = m then Plus_Term(res,t); end if; cont := true; end Face_Term; procedure Face_Terms is new Visiting_Iterator(Face_Term); begin Face_Terms(p); return res; end Face2; procedure Face ( v,m : in Vector; l : in out Laur_Sys ) is begin for i in l'range loop Face(v,m(i),l(i)); end loop; end Face; function Face ( v,m : Vector; l : Laur_Sys ) return Laur_Sys is res : Laur_Sys(l'range); begin for i in l'range loop res(i) := Face(v,m(i),l(i)); end loop; return res; end Face; procedure Reduce ( i : in integer; p : in out Poly ) is procedure Reduce_Term ( t : in out Term; cont : out boolean ) is begin Reduce(Link_to_Vector(t.dg),i); cont := true; end Reduce_Term; procedure Reduce_Terms is new Changing_Iterator (Reduce_Term); begin Reduce_Terms(p); end Reduce; function Reduce ( i : integer; p : Poly ) return Poly is res : Poly; begin Copy(p,res); Reduce(i,res); return res; end Reduce; function Reduce2 ( i : integer; p : Poly ) return Poly is -- IMPORTANT : This function might change the term order ! res : Poly := Null_Poly; procedure Reduce_Term ( t : in Term; cont : out boolean ) is rt : Term; begin rt.cf := t.cf; rt.dg := Degrees(Reduce(Link_to_Vector(t.dg),i)); Plus_Term(res,rt); Clear(rt); cont := true; end Reduce_Term; procedure Reduce_Terms is new Visiting_Iterator (Reduce_Term); begin Reduce_Terms(p); return res; end Reduce2; procedure Reduce ( i : in integer; l : in out Laur_Sys ) is begin for j in l'range loop Reduce(i,l(j)); end loop; end Reduce; function Reduce ( i : integer; l : Laur_Sys ) return Laur_Sys is res : Laur_Sys(l'range); begin for j in l'range loop res(j) := Reduce(i,l(j)); end loop; return res; end Reduce; procedure Insert ( i,d : in integer; p : in out Poly ) is procedure Insert_Term ( t : in out Term; cont : out boolean ) is begin Insert(Link_to_Vector(t.dg),i,d); cont := true; end Insert_Term; procedure Insert_Terms is new Changing_Iterator (Insert_Term); begin Insert_Terms(p); end Insert; function Insert ( i,d : integer; p : Poly ) return Poly is res : Poly; begin Copy(p,res); Insert(i,d,res); return res; end Insert; function Insert2 ( i,d : integer; p : Poly ) return Poly is -- IMPORTANT : This function might change the term order ! res : Poly := Null_Poly; procedure Insert_Term ( t : in Term; cont : out boolean ) is rt : Term; begin rt.cf := t.cf; rt.dg := Degrees(Insert(Link_to_Vector(t.dg),i,d)); Plus_Term(res,rt); Clear(rt); cont := true; end Insert_Term; procedure Insert_Terms is new Visiting_Iterator (Insert_Term); begin Insert_Terms(p); return res; end Insert2; procedure Insert ( i,d : in integer; l : in out Laur_Sys ) is begin for j in l'range loop Insert(i,d,l(j)); end loop; end Insert; function Insert ( i,d : integer; l : Laur_Sys ) return Laur_Sys is res : Laur_Sys(l'range); begin for j in l'range loop res(j) := Insert(i,d,l(j)); end loop; return res; end Insert; end Transforming_Laurent_Systems; SHAR_EOF fi # end of overwriting check if test -f 'transforming_laurent_systems.ads' then echo shar: will not over-write existing file "'transforming_laurent_systems.ads'" else cat << "SHAR_EOF" > 'transforming_laurent_systems.ads' with Integer_Vectors,Transformations; use Integer_Vectors,Transformations; with Complex_Laurent_Polynomial_Systems; use Complex_Laurent_Polynomial_Systems; with Complex_Multivariate_Laurent_Polynomials; use Complex_Multivariate_Laurent_Polynomials; package Transforming_Laurent_Systems is -- DESCRIPTION : -- This package offers some routines for transforming -- Laurent polynomials. procedure Shift ( p : in out Poly ); function Shift ( p : Poly ) return Poly; procedure Shift ( l : in out Laur_Sys ); function Shift ( l : Laur_Sys ) return Laur_Sys; -- DESCRIPTION : -- Shifts the support of the polynomial so that the constant term -- belongs to p. -- This Shift does not change the term order in p! procedure Transform ( t : in Transfo; p : in out Poly ); function Transform ( t : Transfo; p : Poly ) return Poly; procedure Transform ( t : in Transfo; l : in out Laur_Sys ); function Transform ( t : Transfo; l : Laur_Sys ) return Laur_Sys; -- DESCRIPTION : Application of the transformation t. function Maximal_Support ( p : Poly; v : Vector ) return integer; function Maximal_Support ( p : Poly; v : Link_to_Vector ) return integer; -- DESCRIPTION : -- Computes the value of the supporting function of the polynomial p, -- for the direction v. procedure Face ( i,m : in integer; p : in out Poly ); function Face ( i,m : integer; p : Poly ) return Poly; procedure Face ( i,m : in integer; l : in out Laur_Sys ); function Face ( i,m : integer; l : Laur_Sys ) return Laur_Sys; -- DESCRIPTION : -- returns only the terms t for which deg(t,xi) = m. procedure Face ( v : in Vector; m : in integer; p : in out Poly ); function Face ( v : Vector; m : integer; p : Poly ) return Poly; procedure Face ( v,m : in Vector; l : in out Laur_Sys ); function Face ( v,m : Vector; l : Laur_Sys ) return Laur_Sys; -- DESCRIPTION : -- Only the terms for which for the degrees d the following holds -- < d , v > = m, are left. procedure Reduce ( i : in integer; p : in out Poly ); function Reduce ( i : integer; p : Poly ) return Poly; procedure Reduce ( i : in integer; l : in out Laur_Sys ); function Reduce ( i : integer; l : Laur_Sys ) return Laur_Sys; -- DESCRIPTION : -- The i-th component out of every monomial will be removed, -- so that the polynomials will have an unknown less. procedure Insert ( i,d : in integer; p : in out Poly ); function Insert ( i,d : integer; p : Poly ) return Poly; procedure Insert ( i,d : in integer; l : in out Laur_Sys ); function Insert ( i,d : integer; l : Laur_Sys ) return Laur_Sys; -- DESCRIPTION : -- The i-th component of each monomial will be inserted, -- using the value d. end Transforming_Laurent_Systems; SHAR_EOF fi # end of overwriting check if test -f 'transforming_solutions.adb' then echo shar: will not over-write existing file "'transforming_solutions.adb'" else cat << "SHAR_EOF" > 'transforming_solutions.adb' package body Transforming_Solutions is procedure Transform ( t : in Transfo; s : in out Solution ) is begin Apply(t,s.v); end Transform; function Transform ( t : Transfo; s : Solution ) return Solution is res : Solution(s.n); begin res.m := s.m; res.t := s.t; res.v := t*s.v; return res; end Transform; procedure Transform ( t : in Transfo; l : in out Solution_List ) is tmp : Solution_List; begin if not Is_Null(l) then declare n : natural := Head_Of(l).n; s : Solution(n); begin tmp := l; while not Is_Null(tmp) loop Apply(t,Head_Of(tmp).v); tmp := Tail_Of(tmp); end loop; end; end if; end Transform; function Transform ( t : Transfo; l : Solution_List ) return Solution_List is res,res_last,tmp : Solution_List; begin tmp := l; while not Is_Null(tmp) loop Append(res,res_last,Transform(t,Head_Of(tmp).all)); tmp := Tail_Of(tmp); end loop; return res; end Transform; function Insert ( c : double_complex; i : integer; s : Solution ) return Solution is res : Solution(s.n+1); begin res.m := s.m; res.t := s.t; for j in res.v'first..(i-1) loop res.v(j) := s.v(j); end loop; res.v(i) := c; for j in (i+1)..res.v'last loop res.v(j) := s.v(j-1); end loop; return res; end Insert; procedure Insert ( c : in double_complex; i : in integer; l : in out Solution_List ) is begin if not Is_Null(l) then declare tmp : Solution_List; res,res_last : Solution_List; sol : Solution(Head_Of(l).n+1); begin tmp := l; while not Is_Null(tmp) loop declare ls : Link_to_Solution := Head_Of(tmp); begin sol.m := ls.m; sol.t := ls.t; for j in sol.v'first..(i-1) loop sol.v(j) := ls.v(j); end loop; sol.v(i) := c; for j in (i+1)..sol.v'last loop sol.v(j) := ls.v(j-1); end loop; Append(res,res_last,sol); end; tmp := Tail_Of(tmp); end loop; Clear(l); l := res; end; end if; end Insert; function Insert ( c : double_complex; i : integer; l : Solution_List ) return Solution_List is res : Solution_List; begin if not Is_Null(l) then declare tmp,res_last : Solution_List; begin tmp := l; while not Is_Null(tmp) loop Append(res,res_last,Insert(c,i,Head_Of(tmp).all)); tmp := Tail_Of(tmp); end loop; end; end if; return res; end Insert; function Insert ( cv : Vector; i : integer; s : Solution ) return Solution_List is res,res_last : Solution_List; begin for j in cv'range loop Append(res,res_last,Insert(cv(j),i,s)); end loop; return res; end Insert; end Transforming_Solutions; SHAR_EOF fi # end of overwriting check if test -f 'transforming_solutions.ads' then echo shar: will not over-write existing file "'transforming_solutions.ads'" else cat << "SHAR_EOF" > 'transforming_solutions.ads' with Transformations,Solutions; use Transformations,Solutions; with Complex_Numbers,Complex_Vectors; use Complex_Numbers,Complex_Vectors; package Transforming_Solutions is -- DESCRIPTION : -- This package offers some routines for transforming solutions. procedure Transform ( t : in Transfo; s : in out Solution ); function Transform ( t : Transfo; s : Solution ) return Solution; procedure Transform ( t : in Transfo; l : in out Solution_List ); function Transform ( t : Transfo; l : Solution_List ) return Solution_List; -- DESCRIPTION : -- The transformation t will be applied. function Insert ( c : double_complex; i : integer; s : Solution ) return Solution; procedure Insert ( c : in double_complex; i : in integer; l : in out Solution_List ); function Insert ( c : double_complex; i : integer; l : Solution_List ) return Solution_List; -- DESCRIPTION : -- To the ith component of the solution vector, c will be inserted. function Insert ( cv : vector; i : integer; s : Solution ) return Solution_List; -- DESCRIPTION : -- All components in the vector cv will be inserted as the -- the ith component in the solution vector. end Transforming_Solutions; SHAR_EOF fi # end of overwriting check if test -f 'trees_of_vectors.adb' then echo shar: will not over-write existing file "'trees_of_vectors.adb'" else cat << "SHAR_EOF" > 'trees_of_vectors.adb' with unchecked_deallocation; package body Trees_of_Vectors is -- SELECTORS : function Is_In ( tv : Tree_of_Vectors; v : Vector ) return boolean is tmp : Tree_of_Vectors; d2 : Link_to_Vector; begin tmp := tv; while not Is_Null(tmp) loop d2 := Head_Of(tmp).d; if Equal(d2.all,v) then return true; else tmp := Tail_Of(tmp); end if; end loop; return false; end Is_In; function Is_In ( tv : Tree_of_Vectors; v : Link_to_Vector ) return boolean is begin if v /= null then return Is_In(tv,v.all); else return false; end if; end Is_In; procedure Iterator ( tv : in Tree_of_Vectors ) is tmp : Tree_of_Vectors; cont : boolean; begin tmp := tv; while not Is_Null(tmp) loop Process(Head_Of(tmp),cont); exit when not cont; tmp := Tail_Of(tmp); end loop; end Iterator; -- DESTRUCTORS : procedure Clear ( nd : in out node ) is begin Clear(nd.d); Clear(nd.ltv); end Clear; procedure Clear ( tv : in out Tree_of_Vectors ) is tmp : Tree_of_Vectors; begin tmp := tv; while not Is_Null(tmp) loop declare nd : node := Head_Of(tmp); begin Clear(nd); end; tmp := Tail_Of(tmp); end loop; Link_to_Vector_Trees.Clear(Link_to_Vector_Trees.List(tv)); end Clear; procedure Clear ( ltv : in out Link_to_Tree_of_Vectors ) is procedure free is new unchecked_deallocation(Tree_of_Vectors, Link_to_Tree_of_Vectors); begin if not (ltv = null) then Clear(ltv.all); free(ltv); end if; end Clear; end Trees_of_Vectors; SHAR_EOF fi # end of overwriting check if test -f 'trees_of_vectors.ads' then echo shar: will not over-write existing file "'trees_of_vectors.ads'" else cat << "SHAR_EOF" > 'trees_of_vectors.ads' with Lists; with Integer_Vectors; use Integer_Vectors; package Trees_of_Vectors is -- DESCRIPTION : -- This package provides a data abstraction for working -- with trees of vectors. -- THE DATA STRUCTURES : type Tree_of_Vectors; type Link_to_Tree_of_Vectors is access Tree_of_Vectors; type node is record d : Link_to_Vector; ltv : Link_to_Tree_of_Vectors; end record; package Link_to_Vector_Trees is new Lists(node); type Tree_of_Vectors is new Link_to_Vector_Trees.List; -- SELECTORS : function Is_In ( tv : Tree_of_Vectors; v : Vector ) return boolean; function Is_In ( tv : Tree_of_Vectors; v : Link_to_Vector ) return boolean; -- DESCRIPTION : -- returns true if v belongs to the top level of the tree. generic with procedure Process ( nd : in node; continue : out boolean ); procedure Iterator ( tv : in Tree_of_Vectors ); -- DESCRIPTION : -- A walk through the tree will be made, left branch first. -- DESTRUCTORS : procedure Clear ( nd : in out node ); procedure Clear ( tv : in out Tree_of_Vectors ); procedure Clear ( ltv : in out Link_to_Tree_of_Vectors ); -- DESCRIPTION : -- All allocated memory space will be freed. end Trees_of_Vectors; SHAR_EOF fi # end of overwriting check if test -f 'trees_of_vectors_io.adb' then echo shar: will not over-write existing file "'trees_of_vectors_io.adb'" else cat << "SHAR_EOF" > 'trees_of_vectors_io.adb' with integer_io; use integer_io; with Integer_Vectors; use Integer_Vectors; with Integer_Vectors_io; use Integer_Vectors_io; package body Trees_of_Vectors_io is -- INTERNAL STATES : max : constant natural := 20; tokens : Vector(1..max); done : boolean; cnt : natural; -- READ OPERATIONS : procedure get ( n : in natural; tv : in out Tree_of_Vectors ) is begin if done then cnt := 0; while not END_OF_LINE loop cnt := cnt + 1; get(tokens(cnt)); end loop; if cnt = 0 then done := true; else done := false; end if; end if; if not done then if (cnt = 0) or (cnt > n) then null; elsif cnt = n then declare nd : node; begin nd.d := new Integer_Vectors.Vector'(tokens(1..cnt)); done := true; skip_line; nd.ltv := new Tree_of_Vectors; get(n-1,nd.ltv.all); if Is_Null(nd.ltv.all) then Clear(nd.ltv); nd.ltv := null; end if; Construct(nd,tv); get(n,tv); end; else get(n-1,tv); end if; end if; end get; procedure get ( file : in file_type; n : in natural; tv : in out Tree_of_Vectors ) is begin if done then cnt := 0; while not END_OF_LINE(file) loop cnt := cnt + 1; get(file,tokens(cnt)); end loop; if cnt = 0 then done := true; else done := false; end if; end if; if not done then if (cnt = 0) or (cnt > n) then null; elsif cnt = n then declare nd : node; begin nd.d := new Integer_Vectors.Vector'(tokens(1..cnt)); done := true; skip_line(file); nd.ltv := new Tree_of_Vectors; get(file,n-1,nd.ltv.all); if Is_Null(nd.ltv.all) then Clear(nd.ltv); nd.ltv := null; end if; Construct(nd,tv); get(file,n,tv); end; else get(file,n-1,tv); end if; end if; end get; -- WRITE OPERATIONS : procedure put ( tv : in Tree_of_Vectors ) is begin put(Standard_Output,tv); new_line; end put; procedure put2 ( file : in file_type; tv : in Tree_of_Vectors ); procedure put ( file : in file_type; nd : in node ) is begin put(file,nd.d); new_line(file); if not (nd.ltv = null) and then not Is_Null(nd.ltv.all) then put2(file,nd.ltv.all); end if; end put; procedure put2 ( file : in file_type; tv : in Tree_of_Vectors ) is tmp : Tree_of_Vectors := tv; procedure put_Node ( nd : in node; cont : out boolean ) is begin put(file,nd.d); new_line(file); if not (nd.ltv = null) and then not Is_Null(nd.ltv.all) then put2(file,nd.ltv.all); end if; cont := true; end put_Node; -- procedure put_Nodes is new Iterator ( Process => put_Node ); begin -- put_Nodes(tv); while not Is_Null(tmp) loop put(file,Head_Of(tmp)); tmp := Tail_Of(tmp); end loop; end put2; procedure put ( file : in file_type; tv : in Tree_of_Vectors ) is begin put2(file,tv); new_line(file); end put; -- PACKAGE INITIALIZATION : begin done := true; end Trees_of_Vectors_io; SHAR_EOF fi # end of overwriting check if test -f 'trees_of_vectors_io.ads' then echo shar: will not over-write existing file "'trees_of_vectors_io.ads'" else cat << "SHAR_EOF" > 'trees_of_vectors_io.ads' with text_io,Trees_of_Vectors; use text_io,Trees_of_Vectors; package Trees_of_Vectors_io is -- DESCRIPTION : -- This package provides i/o operations for Trees_of_Vectors. -- The formats for input are the same as those for output. procedure get ( n : in natural; tv : in out Tree_of_Vectors ); procedure get ( file : in file_type; n : in natural; tv : in out Tree_of_Vectors ); -- DESCRIPTION : -- Reads a tree of vectors from standard input or from file, -- n equals the maximum length of a vectors in the tree. procedure put ( tv : in Tree_of_Vectors ); procedure put ( file : in file_type; tv : in Tree_of_Vectors ); -- DESCRIPTION : -- Writes a tree of vectors on standard output or on file. -- The left branch in the tree comes first, -- for each vector a new line is taken, -- the entries in the vector are separated by spaces. -- The output of a whole tree is ended by a blank line. end Trees_of_Vectors_io; SHAR_EOF fi # end of overwriting check if test -f 'vertices.adb' then echo shar: will not over-write existing file "'vertices.adb'" else cat << "SHAR_EOF" > 'vertices.adb' with Floating_Point_Numbers; use Floating_Point_Numbers; with Float_Matrices; use Float_Matrices; with Dictionaries; with Linear_Programming; use Linear_Programming; with Integer_Vectors_Utilities; use Integer_Vectors_Utilities; with Integer_Vectors_of_Vectors; with Lists_of_Vectors_Utilities; use Lists_of_Vectors_Utilities; with Transformations; use Transformations; with Transforming_Integer_Vector_Lists; use Transforming_Integer_Vector_Lists; with Face_Enumerators; use Face_Enumerators; --with text_io,integer_io; use text_io,integer_io; --with Integer_Vectors_io; use Integer_Vectors_io; --with Float_Vectors_io; use Float_Vectors_io; --with Lists_of_Integer_Vectors_io; use Lists_of_Integer_Vectors_io; package body Vertices is function Is_In_Hull ( point : Vector; l : List ) return boolean is fpt : Float_Vectors.Vector(point'range); begin for i in point'range loop fpt(i) := double_float(point(i)); end loop; return Is_In_Hull(fpt,l); end Is_In_Hull; function Is_In_Hull ( point : Float_Vectors.Vector; l : List ) return boolean is -- ALGORITHM: -- The following linear program will be solved: -- -- min u_0 + u_1 + .. + u_n -- -- l_1*p_1i + l_2*p_2i + .. + l_m*p_mi + u_i*q_i = q_i i=1,2,..,n -- -- l_1 + l_2 + .. + l_m + u_0 = 1 -- -- to determine whether q belongs to the convex hull spanned by the -- vectors p_1,p_2,..,p_m. -- If all u_i are zero and all constraints are satisfied, -- then q belongs to the convex hull. -- CONSTANTS : n : constant natural := point'last; m : constant natural := 2*n+2; -- number of constraints nb : constant natural := Length_Of(l)+n+1; -- number of unknowns eps : constant double_float := 10.0**(-10); -- VARIABLES : dic : matrix(0..m,0..nb); sol : Float_Vectors.vector(1..nb); inbas : Integer_Vectors.Vector(1..m) := (1..m => 0); outbas : Integer_Vectors.Vector(1..nb) := (1..nb => 0); nit : natural := 0; feasi : boolean; tmp : List; pt : Link_to_Vector; s : double_float; begin -- INITIALIZATION OF target : for i in 0..(nb-n-1) loop dic(0,i) := 0.0; -- sum of the lambda's end loop; for i in (nb-n)..nb loop dic(0,i) := -1.0; -- sum of the mu's end loop; -- INITIALIZATION OF dic : for i in 0..(nb-n) loop dic(m-1,i) := 1.0; -- sum of the lambda's + mu_0 dic(m,i) := -1.0; end loop; for i in (nb-n+1)..nb loop dic(m-1,i) := 0.0; dic(m,i) := 0.0; end loop; for i in 1..n loop for j in (nb-n)..nb loop if i /= j-nb+n then dic(i,j) := 0.0; dic(i+n,j) := 0.0; end if; end loop; end loop; tmp := l; for j in 1..(nb-n-1) loop pt := Head_Of(tmp); for i in pt'range loop dic(i,j) := double_float(pt(i)); dic(i+n,j) := -double_float(pt(i)); end loop; tmp := Tail_Of(tmp); end loop; for i in point'range loop dic(i,0) := point(i); dic(i+n,0) := -point(i); dic(i,i+nb-n) := point(i); dic(i+n,i+nb-n) := -point(i); end loop; -- SOLVE THE LINEAR PROGRAM : Dictionaries.Init_Basis(inbas,outbas); Dual_Simplex(dic,eps,inbas,outbas,nit,feasi); if not feasi then return false; else sol := Dictionaries.Primal_Solution(dic,inbas,outbas); -- CHECK THE SOLUTION : s := 0.0; for i in 1..(nb-n-1) loop s := s + sol(i); end loop; if abs(s - 1.0) > eps then return false; end if; s := 0.0; for i in (nb-n)..nb loop s := s + sol(i); end loop; if abs(s) > eps then return false; end if; return true; end if; end Is_In_Hull; function Vertex_Points ( l : List ) return List is result,result_last : List; tmp,rest,origrest,rest_last : List; pt : Link_to_Vector; begin if Is_Null(l) or else Is_Null(Tail_Of(l)) then return l; else Copy(Tail_Of(l),rest); origrest := rest; rest_last := rest; while not Is_Null(Tail_Of(rest_last)) loop rest_last := Tail_Of(rest_last); end loop; tmp := l; for i in 1..Length_Of(l) loop pt := Head_Of(tmp); if not Is_In_Hull(pt.all,rest) then Append(result,result_last,pt.all); Append(rest,rest_last,pt.all); end if; rest := Tail_Of(rest); tmp := Tail_Of(tmp); end loop; Clear(origrest); return result; end if; end Vertex_Points; function Vertex_Points1 ( l : List ) return List is len : constant natural := Length_Of(l); pts : Integer_Vectors_of_Vectors.Vector(1..len) := Shallow_Create(l); result,result_last : List; procedure Collect_Vertex ( i : in integer; cont : out boolean ) is begin Append(result,result_last,pts(i).all); cont := true; end Collect_Vertex; procedure Enum_Vertices is new Enumerate_Vertices(Collect_Vertex); begin Enum_Vertices(pts); return result; end Vertex_Points1; procedure Add ( pt : Link_to_Vector; l : in out List ) is -- DESCRIPTION : -- Constructs the point to the list, but without sharing. newpt : Link_to_Vector := new Vector'(pt.all); begin Construct(newpt,l); end Add; function Extremal_Points ( l : List; v : Link_to_Vector ) return List is min,max,sp : integer; tmp,res : List; minpt,maxpt,pt : Link_to_Vector; begin if Length_Of(l) <= 1 then Copy(l,res); else pt := Head_Of(l); min := pt*v; max := min; minpt := pt; maxpt := pt; tmp := Tail_Of(l); while not Is_Null(tmp) loop pt := Head_Of(tmp); sp := pt*v; if sp > max then max := sp; maxpt := pt; elsif sp < min then min := sp; minpt := pt; end if; tmp := Tail_Of(tmp); end loop; Add(minpt,res); if min /= max then Add(maxpt,res); end if; end if; return res; end Extremal_Points; function Extremal_Points ( k,n : natural; exl,l : List ) return List is res,tmp,nres : List; iv : Integer_Vectors_of_Vectors.Vector(1..k); v : Link_to_Vector := new Vector(1..n); sp : integer; pt : Link_to_Vector; done : boolean; begin tmp := exl; for j in iv'range loop iv(j) := Head_Of(tmp); tmp := Tail_Of(tmp); end loop; v := Compute_Normal(iv); sp := Head_Of(exl)*v; nres := Extremal_Points(l,v); tmp := nres; res := exl; done := false; while not done and not Is_Null(tmp) loop pt := Head_Of(tmp); if pt*v /= sp then Add(pt,res); done := true; else tmp := Tail_Of(tmp); end if; end loop; Clear(v); return res; end Extremal_Points; function Max_Extremal_Points ( k,n : natural; exl,l : List ) return List is res,tmp,nres : List; iv : Integer_Vectors_of_Vectors.Vector(1..k); v : Link_to_Vector := new Vector(1..n); sp : integer; pt : Link_to_Vector; done : boolean; begin tmp := exl; for j in iv'range loop iv(j) := Head_Of(tmp); tmp := Tail_Of(tmp); end loop; v := Compute_Normal(iv); sp := Head_Of(exl)*v; nres := Extremal_Points(l,v); --put("The computed normal : "); put(v); new_line; --put("The inner product : "); put(sp,1); new_line; --put_line("The list of extremal points :"); put(nres); tmp := nres; Copy(exl,res); done := false; while not done and not Is_Null(tmp) loop pt := Head_Of(tmp); if pt*v /= sp then Add(pt,res); done := true; else tmp := Tail_Of(tmp); end if; end loop; Clear(nres); if not done then -- for all points x in l : = sp if n >= 2 then declare i : integer := Pivot(v); t,invt : Transfo; texl,tl,tres : List; begin if i <= v'last then t := Build_Transfo(v,i); invt := Invert(t); texl := Transform_and_Reduce(t,i,exl); tl := Transform_and_Reduce(t,i,l); tres := Max_Extremal_Points(k,n-1,texl,tl); --put("The normal : "); put(v); new_line; --put_line("The list of points : "); put(l); --put_line("The list of extremal points :"); put(exl); --put_line("The transformed list of points : "); put(tl); --put_line("The transformed list of extremal points : "); --put(texl); --put_line("The computed transformed extremal points : "); --put(tres); --put("k : "); put(k,1); new_line; Clear(t); Clear(texl); Clear(tl); if Length_Of(tres) = k+1 then res := Insert_and_Transform(tres,i,sp,invt); else Copy(exl,res); end if; --put_line("The computed extremal points : "); put(res); Clear(tres); --responsible for segmentation violation... Clear(invt); else Copy(exl,res); end if; end; else Copy(exl,res); end if; end if; Clear(v); --put_line("The new list of extremal points : "); put(res); return res; end Max_Extremal_Points; function Extremal_Points ( n : natural; l : List ) return List is res : List; nor : Link_to_Vector := new Vector'(1..n => 1); k : natural; begin res := Extremal_Points(l,nor); Clear(nor); if Length_Of(res) < 2 then return res; else k := 2; while k < n+1 loop res := Extremal_Points(k,n,res,l); exit when Length_Of(res) = k; k := k+1; end loop; return res; end if; end Extremal_Points; function Two_Extremal_Points ( n : natural; l : List ) return List is -- DESCRIPTION : -- Computes two extremal points of the list l. res,tmp : List; pt,minpt,maxpt : Link_to_Vector; min,max : integer; begin if Length_Of(l) <= 2 then Copy(l,res); else for i in 1..n loop pt := Head_Of(l); max := pt(i); min := max; maxpt := pt; minpt := pt; tmp := Tail_Of(l); while not Is_Null(tmp) loop pt := Head_Of(tmp); if pt(i) < min then min := pt(i); minpt := pt; elsif pt(i) > max then max := pt(i); maxpt := pt; end if; tmp := Tail_Of(tmp); end loop; if Is_Null(res) then Add(minpt,res); if min /= max then Add(maxpt,res); end if; else pt := Head_Of(res); if pt.all /= minpt.all then Add(minpt,res); elsif pt.all /= maxpt.all then Add(maxpt,res); end if; end if; exit when (Length_Of(res) = 2); end loop; end if; return res; end Two_Extremal_Points; function Max_Extremal_Points ( n : natural; l : List ) return List is res,wl,wres,newres : List; k : natural; nullvec,shiftvec : Link_to_Vector; -- shifted : boolean; begin if Length_Of(l) <= 2 then Copy(l,res); else res := Two_Extremal_Points(n,l); k := Length_Of(res); if k = 2 then --nullvec := new Vector'(1..n => 0); --if Is_In(nullvec,res) -- then Copy(l,wl); -- Copy(res,wres); -- shifted := false; -- else shiftvec := Head_Of(res); -- wl := Shift(shiftvec,l); -- wres := Shift(shiftvec,res); -- shifted := true; --end if; --Clear(nullvec); Copy(res,wres); while k < n+1 loop newres := Max_Extremal_Points(k,n,wres,l); Copy(newres,wres); exit when Length_Of(wres) = k; k := k+1; end loop; res := wres; -- Clear(res); -- if shifted -- then Min_Vector(shiftvec); -- res := Shift(shiftvec,wres); -- Clear(wres); -- else Copy(wres,res); -- end if; -- Clear(wl); end if; end if; return res; end Max_Extremal_Points; end Vertices; SHAR_EOF fi # end of overwriting check if test -f 'vertices.ads' then echo shar: will not over-write existing file "'vertices.ads'" else cat << "SHAR_EOF" > 'vertices.ads' with Integer_Vectors; use Integer_Vectors; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Float_Vectors; package Vertices is -- DESCRIPTION : -- This function offers some functions for computing the -- vertices that span the polytope, given its set of points. -- Based on the functions in this package it is possible to -- determine the dimension of conv(l), without the actual computation -- of the convex hull. function Is_In_Hull ( point : Vector; l : List ) return boolean; function Is_In_Hull ( point : Float_Vectors.Vector; l : List ) return boolean; -- DESCRIPTION : -- This function determines whether the point belongs to convex -- hull of the points in the given list. function Vertex_Points ( l : List ) return List; -- DESCRIPTION : -- The vertex points of conv(l) are returned. function Extremal_Points ( l : List; v : Link_to_Vector ) return List; -- DESCRIPTION : -- Returns the vertex points of the list l w.r.t. the direction v and -v. function Extremal_Points ( k,n : natural; exl,l : List ) return List; function Max_Extremal_Points ( k,n : natural; exl,l : List ) return List; -- DESCRIPTION : -- There are already k linearly independent vertex points found, -- given in exl. This routine tries to take one more linearly -- independent vertex point out of the list l. -- The first function stops when a degeneracy is discovered, -- while the second one still proceeds and returns one point -- more, when possible. function Extremal_Points ( n : natural; l : List ) return List; -- DESCRIPTION : -- Searches in the list l for linearly independent vertex points. -- If dim(conv(l)) = n then n+1 points will be returned, -- otherwise the number of points in the resulting list will be -- less but not necessarily equal to dim(conv(l))+1. -- The advantage of this routine lies in the fact that a degeneracy, -- i.e., dim(conv(l)) < n, is detected as soon as possible. function Max_Extremal_Points ( n : natural; l : list ) return List; -- DESCRIPTION : -- Does the same as the function above, except for the fact that -- the number of points in the resulting lists equals dim(conv(l))+1. -- The points in the resulting list can be regarded as a basis, -- i.e., origin and as many linearly independent points as dim(conv(l)), -- for the points in l. end Vertices; SHAR_EOF fi # end of overwriting check if test -f 'volumes.adb' then echo shar: will not over-write existing file "'volumes.adb'" else cat << "SHAR_EOF" > 'volumes.adb' --with text_io,Integer_Vectors_io; use text_io,Integer_Vectors_io; with Integer_Vectors; use Integer_Vectors; with Integer_Vectors_Utilities; use Integer_Vectors_Utilities; with Integer_Vectors_of_Vectors; with Integer_Matrices; use Integer_Matrices; with Integer_Linear_System_Solvers; use Integer_Linear_System_Solvers; with Transformations; use Transformations; with Transforming_Integer_Vector_Lists; use Transforming_Integer_Vector_Lists; with Integer_Support_Functions; use Integer_Support_Functions; with Lists_of_Vectors_Utilities; use Lists_of_Vectors_Utilities; with Arrays_of_Lists_Utilities; use Arrays_of_Lists_Utilities; with Face_Enumerators; with Face_Enumerator_of_Sum; package body Volumes is -- INVARIANT CONDITION : -- In order to get p(v) > 0, the zero vector must be in the first list, -- so shifting is necessary. -- The shift vector must be equal to the maximal element in the list, -- w.r.t. the graded lexicographic ordening. -- In this way, the shift vector is unique, which allows to `mirror' -- the same operations for the mixed homotopy continuation. -- AUXILIARIES : function Create_Facet ( n : natural; facet : Vector; pts : Integer_Vectors_of_Vectors.Vector ) return Integer_Vectors_of_Vectors.Vector is res : Integer_Vectors_of_Vectors.Vector(1..n); cnt : natural := 0; begin for i in facet'range loop cnt := cnt+1; res(cnt) := pts(facet(i)); end loop; return res; end Create_Facet; function Determinant ( vv : Integer_Vectors_of_Vectors.Vector ) return integer is a : matrix(vv'range,vv'range); begin for k in a'range(1) loop for l in a'range(2) loop a(k,l) := vv(k)(l); end loop; end loop; -- Upper_Triangulate(a); return Det(a); end Determinant; -- VOLUME COMPUTATIONS : function Vol ( n : natural; l : List ) return natural is -- DESCRIPTION : -- Computes the volume of the simplex spanned by the list -- and the origin. res : integer; vv : Integer_Vectors_of_Vectors.Vector(1..n); tmp : List; begin tmp := l; for i in vv'range loop vv(i) := Head_Of(tmp); tmp := Tail_Of(tmp); end loop; res := Determinant(vv); if res < 0 then return -res; else return res; end if; end Vol; function Volume ( n,i : natural; l : List; v : Vector; pv : integer ) return natural is -- DESCRIPTION : -- The points in l all belong to the same hyperplane: -- < x , v > - pv = 0; -- this procedure computes the volume of the polytope generated by -- the points in l and the origin. ll : natural := Length_Of(l); begin if ll < n then return 0; elsif ll = n then return Vol(n,l); else declare t : Transfo; tl,rl : List; vl : integer; begin if pv > 0 then t := Build_Transfo(v,i); tl := t*l; rl := Reduce(tl,i); Clear(t); Deep_Clear(tl); -- Remove_Duplicates(rl); if Length_Of(rl) >= n-1 then vl := pv*Volume(n-1,rl); else vl := 0; end if; Deep_Clear(rl); return vl; else return 0; end if; end; end if; end Volume; function Sum ( n,m : natural; l : List ) return natural is -- DESCRIPTION : -- Computes the volume of the polytope generated by the points in l; -- where n > 1 and n < m = Length_Of(l). res : natural; fix : Link_to_Vector; pts : Integer_Vectors_of_Vectors.Vector(1..m-1); nulvec : Vector(1..n) := (1..n => 0); vl,wl,vl_last : List; sh : boolean; procedure Compute_Facet ( facet : in vector; cont : out boolean ) is vv : constant Integer_Vectors_of_Vectors.Vector := Create_Facet(n,facet,pts); pl : List; v : Link_to_Vector; i,pv,sup : integer; begin v := Compute_Normal(vv); i := Pivot(v); if i <= v'last then pv := vv(vv'first)*v; if pv < 0 then for j in v'range loop v(j) := -v(j); end loop; pv := -pv; end if; if (pv > 0) and then not Is_In(vl,v) then sup := Maximal_Support(wl,v.all); if sup = pv then Append(vl,vl_last,v); pl := Face(wl,v.all,pv); res := res + Volume(n,i,pl,v.all,pv); Deep_Clear(pl); end if; end if; end if; cont := true; end Compute_Facet; procedure Compute_Facets is new Face_Enumerators.Enumerate_Faces(Compute_Facet); begin res := 0; if not Is_In(l,nulvec) then fix := Graded_Max(l); wl := Shift(l,fix); sh := true; else wl := l; sh := false; end if; Move_to_Front(wl,nulvec); pts := Shallow_Create(Tail_Of(wl)); Compute_Facets(n-1,pts); Deep_Clear(vl); if sh then Deep_Clear(wl); Clear(fix); end if; return res; end Sum; function Volume ( n : natural; l : List ) return natural is m : natural; begin if n = 1 then declare min,max : integer := 0; d : Link_to_Vector := Head_Of(l); begin Min_Max(l,d'first,min,max); return (max - min); end; else m := Length_Of(l); if m <= n then return 0; else return Sum(n,m,l); end if; end if; end Volume; function Volume ( n,i : natural; l : List; v : Vector; pv : integer; tv : Tree_of_Vectors ) return natural is -- DESCRIPTION : -- The points in l all belong to the same hyperplane: -- < x , v > - pv = 0; -- this procedure computes the volume of the polytope generated by -- the points in l and the origin. ll : natural := Length_Of(l); begin if ll < n then return 0; elsif ll = n then return Vol(n,l); else declare t : Transfo; tl,rl : List; vl : integer; begin if pv > 0 then t := Build_Transfo(v,i); tl := t*l; rl := Reduce(tl,i); Clear(t); Deep_Clear(tl); -- Remove_Duplicates(rl); if Length_Of(rl) >= n-1 then vl := pv*Volume(n-1,rl,tv); else vl := 0; end if; Deep_Clear(rl); return vl; else return 0; end if; end; end if; end Volume; function Sum ( n,m : natural; l : List; tv : Tree_of_Vectors ) return natural is -- DESCRIPTION : -- Computes the volume of the polytope generated by the points in l; -- where n > 1 and n < m = Length_Of(l). -- The tree of degrees tv is not empty. res : natural; fix : Link_to_Vector; nulvec : Vector(1..n) := (1..n => 0); wl : List; tmp : Tree_of_Vectors; sh : boolean; begin res := 0; if not Is_In(l,nulvec) then fix := Graded_Max(l); wl := Shift(l,fix); sh := true; else wl := l; sh := false; end if; Move_to_Front(wl,nulvec); tmp := tv; while not Is_Null(tmp) loop declare nd : node := Head_Of(tmp); v : Link_to_Vector := nd.d; pv,i : integer; pl : List; begin i := Pivot(v); pv := Maximal_Support(wl,v.all); pl := Face(wl,v.all,pv); if (nd.ltv = null) or else Is_Null(nd.ltv.all) then res := res + Volume(n,i,pl,v.all,pv); else res := res + Volume(n,i,pl,v.all,pv,nd.ltv.all); end if; Deep_Clear(pl); end; tmp := Tail_Of(tmp); end loop; if sh then Deep_Clear(wl); Clear(fix); end if; return res; end Sum; function Volume ( n : natural; l : List; tv : Tree_of_Vectors ) return natural is m : natural; begin if n = 1 then declare min,max : integer := 0; d : Link_to_Vector := Head_Of(l); begin Min_Max(l,d'first,min,max); return (max - min); end; else m := Length_Of(l); if m <= n then return 0; elsif not Is_Null(tv) then return Sum(n,m,l,tv); else return Sum(n,m,l); end if; end if; end Volume; procedure Volume ( n,i : in natural; l : in List; v : in Vector; pv : in integer; tv : in out Tree_of_Vectors; vlm : out natural ) is -- DESCRIPTION : -- The points in l all belong to the same hyperplane: -- < x , v > - pv = 0; -- this procedure computes the volume of the polytope generated by -- the points in l and the origin. ll : natural := Length_Of(l); vl : natural; begin if ll < n then vlm := 0; elsif ll = n then vl := Vol(n,l); if vl > 0 then declare nd : node; begin nd.d := new Integer_Vectors.Vector'(v); Construct(nd,tv); end; end if; vlm := vl; else declare t : Transfo; tl,rl : List; begin if pv > 0 then t := Build_Transfo(v,i); tl := t*l; rl := Reduce(tl,i); Clear(t); Deep_Clear(tl); -- Remove_Duplicates(rl); if Length_Of(rl) >= n-1 then declare tmp : Tree_of_Vectors; begin Volume(n-1,rl,tmp,vl); if vl = 0 then Clear(tmp); else declare nd : node; begin nd.d := new Integer_Vectors.Vector'(v); if not Is_Null(tmp) then nd.ltv := new Tree_of_Vectors'(tmp); end if; Construct(nd,tv); end; end if; end; vlm := pv*vl; else vlm := 0; end if; Deep_Clear(rl); else vlm := 0; end if; end; end if; end Volume; procedure Sum ( n,m : in natural; l : in List; tv : in out Tree_of_Vectors; vlm : out natural ) is -- DESCRIPTION : -- Computes the volume of the polytope generated by the points in l; -- where n > 1 and n < m = Length_Of(l). res : natural; pts : Integer_Vectors_of_Vectors.Vector(1..m-1); fix : Link_to_Vector; nulvec : Vector(1..n) := (1..n => 0); wl : List; sh : boolean; procedure Compute_Facet ( facet : in vector; cont : out boolean ) is vv : constant Integer_Vectors_of_Vectors.Vector := Create_Facet(n,facet,pts); pl : List; v : Link_to_Vector; i,pv,sup,pvol : integer; begin v := Compute_Normal(vv); i := Pivot(v); if i <= v'last then pv := vv(vv'first)*v; if pv < 0 then for j in v'range loop v(j) := -v(j); end loop; pv := -pv; end if; if (pv > 0) and then not Is_In(tv,v) then sup := Maximal_Support(wl,v.all); if sup = pv then pl := Face(wl,v.all,pv); Volume(n,i,pl,v.all,pv,tv,pvol); res := res + pvol; Deep_Clear(pl); end if; end if; end if; cont := true; end Compute_Facet; procedure Compute_Facets is new Face_Enumerators.Enumerate_Faces(Compute_Facet); begin res := 0; if not Is_In(l,nulvec) then fix := Graded_Max(l); wl := Shift(l,fix); sh := true; else wl := l; sh := false; end if; Move_to_Front(wl,nulvec); pts := Shallow_Create(Tail_Of(wl)); Compute_Facets(n-1,pts); if sh then Deep_Clear(wl); Clear(fix); end if; vlm := res; end Sum; procedure Volume ( n : in natural; l : in List; tv : in out Tree_of_Vectors; vlm : out natural ) is m : natural; begin if n = 1 then declare min,max : integer := 0; d : Link_to_Vector := Head_Of(l); begin Min_Max(l,d'first,min,max); vlm := max - min; end; else m := Length_Of(l); if m <= n then vlm := 0; else Sum(n,m,l,tv,vlm); end if; end if; end Volume; -- MIXED VOLUME COMPUTATIONS WITHOUT TREE OF USEFUL DIRECTIONS : function Two_Terms_Mixed_Vol ( n : natural; al : Array_of_Lists ) return natural is -- DESCRIPTION : -- returns the mixed volume of the polytopes generated by the -- points in al, where the first polytope is generated by only -- two points. first,second : Link_to_Vector; l : List renames al(al'first); res : natural; begin first := Head_Of(l); second := Head_Of(Tail_Of(l)); declare d : Vector(first'range); piv : integer := 0; begin for i in d'range loop d(i) := first(i) - second(i); if (piv = 0) and then (d(i) /= 0) then piv := i; end if; end loop; if piv = 0 then return 0; else if d(piv) < 0 then Min_Vector(d); end if; declare t : Transfo := Rotate(d,piv); tr_al : Array_of_Lists(al'first..(al'last-1)); degen : boolean := false; begin Apply(t,d); for i in tr_al'range loop tr_al(i) := Transform_and_Reduce(t,piv,al(i+1)); Remove_Duplicates(tr_al(i)); degen := (Length_Of(tr_al(i)) <= 1); exit when degen; end loop; Clear(t); if not degen then res := d(piv)*Mixed_Volume(n-1,tr_al); else res := 0; end if; Deep_Clear(tr_al); end; end if; end; return res; end Two_Terms_Mixed_Vol; function Facet_Normal ( n : natural; facet,pts : Integer_Vectors_of_Vectors.Vector ) return Vector is res,pt1,pt2 : Vector(1..n); im : matrix(1..n,1..n); cnt : natural := 0; begin for i in facet'range loop if facet(i)'length > 1 then pt1 := pts(facet(i)(facet(i)'first)).all; for j in facet(i)'first+1..facet(i)'last loop pt2 := pts(facet(i)(j)).all; cnt := cnt + 1; for k in pt1'range loop im(cnt,k) := pt2(k) - pt1(k); end loop; end loop; end if; end loop; for j in 1..n loop im(n,j) := 0; end loop; Upper_Triangulate(im); Scale(im); res := (1..n => 0); Solve0(im,res); Normalize(res); -- put("The facet normal : "); put(res); new_line; return res; end Facet_Normal; function Minkowski_Sum ( n : natural; al : Array_of_Lists ) return natural is -- DESCRIPTION : -- Computes the mixed volume of the polytope generated -- by the points in al, where n > 1. res,m,ptslen : natural; vl,vl_last,al1 : List; typ,ind : Vector(1..n); perm,mix : Link_to_Vector; wal : Array_of_Lists(al'range) := Interchange2(al); procedure Update ( v : in Vector; i : in integer; added : in out boolean ) is -- DESCRIPTION : -- This procedure computes the support of the first list -- in the direction v; if this support is not zero, -- the projection will be computed. -- The parameter added becomes true if v has been added to vl. pal : Array_of_Lists(al'first..(al'last-1)); pv : integer; degen : boolean; begin if not Is_In(vl,v) then pv := Maximal_Support(al1,v); if pv > 0 then Projection(wal,v,i,pal,degen); if not degen then declare mv : integer := Mixed_Volume(n-1,pal); begin if mv > 0 then res := res + pv*mv; Append(vl,vl_last,v); added := true; end if; end; Deep_Clear(pal); end if; end if; end if; end Update; procedure Enumerate_Facets ( lpts : in Array_of_Lists; len : in natural ) is pts : Integer_Vectors_of_Vectors.Vector(1..len); cnt : integer; procedure Compute_Facet ( facet : in Integer_Vectors_of_Vectors.Vector; cont : out boolean ) is v,w : Vector(1..n); i : integer; added : boolean; begin v := Facet_Normal(n,facet,pts); i := Pivot(v); if i <= v'last then added := false; Update(v,i,added); if not added then Min_Vector(v); w := v; else w := -v; added := false; end if; Update(w,i,added); end if; cont := true; end Compute_Facet; procedure Compute_Facets is new Face_Enumerator_of_Sum.Enumerate_Faces_of_Sum(Compute_Facet); -- new Face_Enumerators.Enumerate_Faces_of_Sum(Compute_Facet); begin pts(ind(1)..ind(2)-1) := Shallow_Create(Tail_Of(al1)); cnt := lpts'first + mix(mix'first); for i in mix'first+1..mix'last loop if i < mix'last then pts(ind(i)..ind(i+1)-1) := Shallow_Create(lpts(cnt)); cnt := cnt + mix(i); else pts(ind(i)..len) := Shallow_Create(lpts(cnt)); end if; end loop; Compute_Facets(ind(mix'range),typ(mix'range),n-1,pts); end Enumerate_Facets; begin m := Length_Of(wal(wal'first)); if m = 2 then return Two_Terms_Mixed_Vol(n,wal); elsif m > 2 then Mixture(al,perm,mix); -- put("Type of mixture : "); put(mix); new_line; -- put(" with permutation : "); put(perm); new_line; wal := Permute(perm.all,al); declare shiftvec : Link_to_Vector; nulvec : Vector(1..n) := (1..n => 0); shifted : boolean; cnt : integer; begin -- SHIFT OF THE FIRST LIST ( then all pv >= 0) : if not Is_In(wal(wal'first),nulvec) then shiftvec := Graded_Max(wal(wal'first)); al1 := Shift(wal(wal'first),shiftvec); shifted := true; else al1 := wal(wal'first); shifted := false; end if; -- ENUMERATE FACES OF SUM OF THE RIGHT TYPE : Move_to_Front(al1,nulvec); wal(wal'first) := al1; res := 0; typ(1) := mix(mix'first)-1; typ(2) := mix(mix'first+1); ind(1) := 1; ind(2) := ind(1) + Length_Of(al1) - 1; -- skip null vector cnt := wal'first + mix(mix'first); for i in mix'first+2..mix'last loop typ(i) := mix(i); ind(i) := ind(i-1) + Length_Of(wal(cnt)); cnt := cnt + mix(i-1); end loop; ptslen := ind(mix'last) + Length_Of(wal(cnt)) - 1; Enumerate_Facets(wal,ptslen); -- CLEANING UP : Deep_Clear(vl); Clear(perm); Clear(mix); if shifted then Clear(shiftvec); Deep_Clear(al1); end if; return res; end; else -- m < 2 return 0; end if; end Minkowski_Sum; function Mixed_Volume ( n : natural; al : Array_of_Lists ) return natural is begin if (n = 0) or Is_Null(al(al'first)) then return 0; elsif n = 1 then declare min,max : integer := 0; d : Link_to_Vector := Head_Of(al(al'first)); begin Min_Max(al(al'first),d'first,min,max); return (max - min); end; elsif All_Equal(al) then return Volume(n,al(al'first)); else return Minkowski_Sum(n,al); end if; end Mixed_Volume; -- MIXED VOLUME COMPUTATIONS WITH TREE OF USEFUL DIRECTIONS : function Two_Terms_Mixed_Volume ( n : natural; al : Array_of_Lists; tv : Tree_of_Vectors ) return natural is -- DESCRIPTION : -- returns the mixed volume of the polytopes generated by the -- points in al, where the first polytope is generated by only -- two points. first,second : Link_to_Vector; l : List renames al(al'first); res : natural; begin first := Head_Of(l); second := Head_Of(Tail_Of(l)); declare d : Vector(first'range); piv : integer := 0; begin for i in d'range loop d(i) := first(i) - second(i); if (piv = 0) and then (d(i) /= 0) then piv := i; end if; end loop; if piv = 0 then return 0; else if d(piv) < 0 then Min_Vector(d); end if; declare t : Transfo := Rotate(d,piv); tr_al : Array_of_Lists(al'first..(al'last-1)); degen : boolean := false; begin Apply(t,d); for i in tr_al'range loop tr_al(i) := Transform_and_Reduce(t,piv,al(i+1)); Remove_Duplicates(tr_al(i)); degen := (Length_Of(tr_al(i)) <= 1); exit when degen; end loop; Clear(t); if not degen then res := d(piv)*Mixed_Volume(n-1,tr_al,tv); else res := 0; end if; Deep_Clear(tr_al); end; end if; end; return res; end Two_Terms_Mixed_Volume; function Minkowski_Sum ( n : natural; al : Array_of_Lists; tv : Tree_of_Vectors ) return natural is -- DESCRIPTION : -- Computes the mixed volume of the polytope generated -- by the points in al, where n > 1. -- The tree of degrees is not empty. res,m : natural; al1 : List; wal : Array_of_Lists(al'range) := Interchange2(al); tmp : Tree_of_Vectors; perm,mix : Link_to_Vector; begin m := Length_Of(wal(wal'first)); if m = 2 then return Two_Terms_Mixed_Volume(n,wal,tv); elsif m > 2 then Mixture(al,perm,mix); wal := Permute(perm.all,al); declare shiftvec : Link_to_Vector; nulvec : Vector(1..n) := (1..n => 0); shifted : boolean; begin -- SHIFT OF THE FIRST LIST ( then all pv >= 0) : if not Is_In(wal(wal'first),nulvec) then shiftvec := Graded_Max(wal(wal'first)); al1 := Shift(wal(wal'first),shiftvec); shifted := true; else al1 := wal(wal'first); shifted := false; end if; Move_to_Front(al1,nulvec); wal(wal'first) := al1; -- COMPUTING THE MIXED VOLUME : tmp := tv; res := 0; while not Is_Null(tmp) loop declare nd : node := Head_Of(tmp); v : Link_to_Vector := nd.d; i : integer := Pivot(v); pv : integer := Maximal_Support(al1,v.all); pal : Array_of_Lists(al'first..(al'last-1)); degen : boolean; begin Projection(wal,v.all,i,pal,degen); if (nd.ltv = null) or else Is_Null(nd.ltv.all) then res := res + pv*Mixed_Volume(n-1,pal); else res := res + pv*Mixed_Volume(n-1,pal,nd.ltv.all); end if; Deep_Clear(pal); end; tmp := Tail_Of(tmp); end loop; -- CLEANING UP : Clear(perm); Clear(mix); if shifted then Clear(shiftvec); Deep_Clear(al1); end if; return res; end; else -- m < 2 return 0; end if; end Minkowski_Sum; function Mixed_Volume ( n : natural; al : Array_of_Lists; tv : Tree_of_Vectors ) return natural is begin if (n = 0) or Is_Null(al(al'first)) then return 0; elsif n = 1 then declare min,max : integer := 0; d : Link_to_Vector := Head_Of(al(al'first)); begin Min_Max(al(al'first),d'first,min,max); return (max - min); end; elsif All_Equal(al) then return Volume(n,al(al'first),tv); elsif not Is_Null(tv) then return Minkowski_Sum(n,al,tv); else return Minkowski_Sum(n,al); end if; end Mixed_Volume; -- MIXED VOLUME COMPUTATIONS WITH CREATION OF TREE OF USEFUL DIRECTIONS : procedure Two_Terms_Mixed_Vol ( n : in natural; al : in Array_of_Lists; tv : in out Tree_of_Vectors; mv : out natural ) is -- DESCRIPTION : -- returns the mixed volume of the polytopes generated by the -- points in al, where the first polytope is generated by only -- two points. first,second : Link_to_Vector; l : List renames al(al'first); begin first := Head_Of(l); second := Head_Of(Tail_Of(l)); declare d : Vector(first'range); piv : integer := 0; begin for i in d'range loop d(i) := first(i) - second(i); if (piv = 0) and then (d(i) /= 0) then piv := i; end if; end loop; if piv = 0 then mv := 0; else if d(piv) < 0 then Min_Vector(d); end if; declare t : Transfo := Rotate(d,piv); tr_al : Array_of_Lists(al'first..(al'last-1)); mvl : natural; degen : boolean := false; begin Apply(t,d); for i in tr_al'range loop tr_al(i) := Transform_and_Reduce(t,piv,al(i+1)); Remove_Duplicates(tr_al(i)); degen := (Length_Of(tr_al(i)) <= 1); exit when degen; end loop; Clear(t); if not degen then Mixed_Volume(n-1,tr_al,tv,mvl); mv := d(piv)*mvl; else mv := 0; end if; Deep_Clear(tr_al); end; end if; end; end Two_Terms_Mixed_Vol; procedure Minkowski_Sum ( n : in natural; al : in Array_of_Lists; tv : in out Tree_of_Vectors; mv : out natural ) is -- DESCRIPTION : -- Computes the mixed volume of the polytope generated -- by the points in al, where n > 1. res,m,ptslen : natural; al1 : List; typ,ind : Vector(1..n); perm,mix : Link_to_Vector; wal : Array_of_Lists(al'range) := Interchange2(al); procedure Update ( v : in Vector; i : in integer; added : in out boolean ) is -- DESCRIPTION : -- This procedure computes the support of the first list -- in the direction v; if this support is not zero, -- the projection will be computed. -- The parameter added becomes true if v has been added to vl. pal : Array_of_Lists(al'first..(al'last-1)); pv : integer; degen : boolean; begin if not Is_In(tv,v) then pv := Maximal_Support(al1,v); if pv > 0 then Projection(wal,v,i,pal,degen); if not degen then declare tmp : Tree_of_Vectors; mv : natural; begin Mixed_Volume(n-1,pal,tmp,mv); if mv = 0 then Clear(tmp); else res := res + pv*mv; declare nd : node; begin nd.d := new Integer_Vectors.Vector'(v); if not Is_Null(tmp) then nd.ltv := new Tree_of_Vectors'(tmp); end if; Construct(nd,tv); end; added := true; end if; end; Deep_Clear(pal); end if; end if; end if; end Update; procedure Enumerate_Facets ( lpts : in Array_of_Lists; len : in natural ) is pts : Integer_Vectors_of_Vectors.Vector(1..len); cnt : integer; procedure Compute_Facet ( facet : in Integer_Vectors_of_Vectors.Vector; cont : out boolean ) is v,w : Vector(1..n); i : integer; added : boolean; begin v := Facet_Normal(n,facet,pts); i := Pivot(v); if i <= v'last then added := false; Update(v,i,added); if not added then Min_Vector(v); w := v; else w := -v; added := false; end if; Update(w,i,added); end if; cont := true; end Compute_Facet; procedure Compute_Facets is new Face_Enumerator_of_Sum.Enumerate_Faces_of_Sum(Compute_Facet); -- new Face_Enumerators.Enumerate_Faces_of_Sum(Compute_Facet); begin pts(ind(1)..ind(2)-1) := Shallow_Create(Tail_Of(al1)); cnt := lpts'first + mix(mix'first); for i in mix'first+1..mix'last loop if i < mix'last then pts(ind(i)..ind(i+1)-1) := Shallow_Create(lpts(cnt)); cnt := cnt + mix(i); else pts(ind(i)..len) := Shallow_Create(lpts(cnt)); end if; end loop; Compute_Facets(ind(mix'range),typ(mix'range),n-1,pts); end Enumerate_Facets; begin m := Length_Of(wal(wal'first)); if m = 2 then Two_Terms_Mixed_Vol(n,wal,tv,mv); elsif m > 2 then Mixture(al,perm,mix); wal := Permute(perm.all,al); declare shiftvec : Link_to_Vector; nulvec : Vector(1..n) := (1..n => 0); shifted : boolean; cnt : integer; begin -- SHIFT OF THE FIRST LIST ( then all pv >= 0) : if not Is_In(wal(wal'first),nulvec) then shiftvec := Graded_Max(wal(wal'first)); al1 := Shift(wal(wal'first),shiftvec); shifted := true; else al1 := wal(wal'first); shifted := false; end if; -- ENUMERATE FACES OF SUM OF THE RIGHT TYPE : Move_to_Front(al1,nulvec); wal(wal'first) := al1; res := 0; typ(1) := mix(mix'first)-1; typ(2) := mix(mix'first+1); ind(1) := 1; ind(2) := ind(1) + Length_Of(al1) - 1; -- skip null vector cnt := wal'first + mix(mix'first); for i in mix'first+2..mix'last loop typ(i) := mix(i); ind(i) := ind(i-1) + Length_Of(wal(cnt)); cnt := cnt + mix(i-1); end loop; ptslen := ind(mix'last) + Length_Of(wal(cnt)) - 1; Enumerate_Facets(wal,ptslen); -- CLEANING UP : Clear(perm); Clear(mix); if shifted then Clear(shiftvec); Deep_Clear(al1); end if; mv := res; end; else -- m < 2 mv := 0; end if; end Minkowski_Sum; procedure Mixed_Volume ( n : in natural; al : in Array_of_Lists; tv : in out Tree_of_Vectors; mv : out natural ) is begin if (n = 0) or Is_Null(al(al'first)) then mv := 0; elsif n = 1 then declare min,max : integer := 0; d : Link_to_Vector := Head_Of(al(al'first)); begin Min_Max(al(al'first),d'first,min,max); mv := max - min; end; elsif All_Equal(al) then Volume(n,al(al'first),tv,mv); else Minkowski_Sum(n,al,tv,mv); end if; end Mixed_Volume; end Volumes; SHAR_EOF fi # end of overwriting check if test -f 'volumes.ads' then echo shar: will not over-write existing file "'volumes.ads'" else cat << "SHAR_EOF" > 'volumes.ads' with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Trees_of_Vectors; use Trees_of_Vectors; package Volumes is -- DESCRIPTION : -- This package contains a routine to compute the volume -- of a polytope and two routines for computing the mixed volume. function Volume ( n : natural; l : List ) return natural; function Volume ( n : natural; l : List; tv : Tree_of_Vectors ) return natural; procedure Volume ( n : in natural; l : in List; tv : in out Tree_of_Vectors; vlm : out natural ); -- DESCRIPTION : -- Computes n! times the volume of the polytope generated -- by the points in l; n equals the dimension of the space. -- The tree of degrees tv maintains the directions used to -- compute the volume. Once tv has been constructed, the volume -- can be computed more efficiently. -- REMARK : -- The tree of vectors contains directions normal to the polytope -- generated by a list wl where the first element of the list -- consists of all zeroes; so eventually l has been shifted. function Mixed_Volume ( n : natural; al : Array_of_Lists ) return natural; function Mixed_Volume ( n : natural; al : Array_of_Lists; tv : Tree_of_Vectors ) return natural; procedure Mixed_Volume ( n : in natural; al : in Array_of_Lists; tv : in out Tree_of_Vectors; mv : out natural ); -- DESCRIPTION : -- Computes the mixed volume of the polytopes generated -- by the points in al; n equals the dimension of the space. -- The tree of vectors tv maintains the directions used to -- compute the mixed volume. Once tv has been constructed, -- the mixed volume can be computed more efficiently. end Volumes; SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'Product' then mkdir 'Product' fi cd 'Product' if test -f 'construct_random_product_start_system.adb' then echo shar: will not over-write existing file "'construct_random_product_start_system.adb'" else cat << "SHAR_EOF" > 'construct_random_product_start_system.adb' with Random_Number_Generators; with Set_Structure,Random_Product_System; with Natural_Vectors; with Complex_Numbers,Complex_Vectors; use Complex_Numbers,Complex_Vectors; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; package body Construct_Random_Product_Start_System is type Boolean_Array is array(integer range <>) of boolean; function leq ( d1,d2 : Degrees ) return boolean is -- DESCRIPTION : -- returns true if for all k: d1(k) <= d2(k) begin for k in d1'range loop if d1(k) > d2(k) then return false; end if; end loop; return true; end leq; function Dominated ( d : Degrees; p : Poly ) return boolean is -- DESCRIPTION : -- Returns true if the term indicated by the degrees d -- is already in the set structure; -- the polynomial p contains all terms that are already -- belonging to the set structure. res : boolean := false; procedure Scan ( t : in Term; continue : out boolean ) is begin if leq(d,t.dg) then res := true; continue := false; else continue := true; end if; end Scan; procedure Scan_Terms is new Visiting_Iterator (Scan); begin Scan_Terms(p); return res; end Dominated; procedure Divide ( dg : in out Natural_Vectors.Vector; i,d : in natural; occupied : in out Boolean_Array ) is -- DESCRIPTION : -- Divides the monomial by every unknown that occurs already -- in one set of the ith component of the set structure. -- Every set that contains already one unknown of the monomial is -- marked by setting the corresponding entry in occupied on true. j : natural; begin for k in dg'range loop j := 1; while (dg(k) /= 0) and (j <= d) loop if not occupied(j) and Set_Structure.Is_In(i,j,k) then occupied(j) := true; dg(k) := dg(k)-1; end if; j := j+1; end loop; end loop; end Divide; procedure Augment ( ba : in Boolean_Array; index : in out integer ) is -- DESCRIPTION : -- Augments the index till ba(index) = false. begin while ba(index) loop index := index + 1; exit when index >= ba'last; end loop; end Augment; procedure Build_Set_Structure ( i,di : in natural; p : in Poly ) is -- DESCRIPTION : -- This procedure builds the set structure for the polynomial p -- ON ENTRY : -- i the number of the equation -- di the degree of the polynomial -- p the polynomial for the i-th equation temp : Poly := Null_Poly; procedure Process ( t : in Term; continue : out boolean ) is ind : natural := 1; -- number of the set processed : Boolean_Array(1..di) := (1..di => false); tdg : Natural_Vectors.Vector(t.dg'range) := t.dg.all; begin if not Dominated(t.dg,temp) then Divide(tdg,i,di,processed); Augment(processed,ind); for k in tdg'range loop for j in 1..tdg(k) loop if not Set_Structure.Is_In(i,ind,k) then Set_Structure.Add(i,ind,k); processed(ind) := true; end if; Augment(processed,ind); end loop; end loop; Plus_Term(temp,t); end if; continue := true; end Process; procedure Process_Terms is new Visiting_Iterator (Process); begin Process_Terms(p); Clear(temp); end Build_Set_Structure; procedure Build_Set_Structure ( p : in Poly_Sys ) is n : natural := p'length; ns : Natural_Vectors.Vector(1..n); begin for i in p'range loop ns(i) := Degree(p(i)); end loop; Set_Structure.Init(ns); for i in p'range loop Build_Set_Structure(i,Degree(p(i)),p(i)); end loop; end Build_Set_Structure; procedure Build_Random_Product_System ( n : in natural ) is -- DESCRIPTION : -- Based upon the set structure of p, a random product system -- will be constructed. h : Vector(0..n); first : boolean; begin for i in 1..n loop for j in 1..Set_Structure.Number_Of_Sets(i) loop h := (0..n => CMPLX(0.0)); first := true; for k in 1..n loop if Set_Structure.Is_In(i,j,k) then if first then h(k) := CMPLX(1.0); first := false; else h(k) := Random_Number_Generators.Random1; end if; end if; end loop; h(0) := Random_Number_Generators.Random1; Random_Product_System.Add_Hyperplane(i,h); end loop; end loop; end Build_Random_Product_System; procedure Construct ( p : in Poly_Sys; q : in out Poly_Sys; sols : in out Solution_List ) is nl : natural := 0; n : natural := p'length; begin Build_Set_Structure(p); Random_Product_System.Init(n); Build_Random_Product_System(n); q := Random_Product_System.Polynomial_System; Random_Product_System.Solve(sols,nl); Random_Product_System.Clear; end Construct; end Construct_Random_Product_Start_System; SHAR_EOF fi # end of overwriting check if test -f 'construct_random_product_start_system.ads' then echo shar: will not over-write existing file "'construct_random_product_start_system.ads'" else cat << "SHAR_EOF" > 'construct_random_product_start_system.ads' with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Solutions; use Solutions; package Construct_Random_Product_Start_System is -- DESCRIPTION : -- This package constructs a random product start -- product system for a given polynomial system. procedure Build_Set_Structure ( p : in Poly_Sys ); -- DESCRIPTION : -- This is a heuristic procedure for constructing a supporting -- set structure of the system p. procedure Build_Random_Product_System ( n : in natural ); -- DESCRIPTION : -- Based on the set structure, a random linear-product system -- will be constructed. The result is stored in the internal -- data manage by the package Random_Product_System. -- REQUIRED : -- The set structure may not be empty. procedure Construct ( p : in Poly_Sys; q : in out Poly_Sys; sols : in out Solution_List ); -- DESCRIPTION : -- Constructs a start system q, with more or less the same -- structure as p. A heuristic procedure will be used for -- constructing a supporting set structure. end Construct_Random_Product_Start_System; SHAR_EOF fi # end of overwriting check if test -f 'degree_sets_tables.adb' then echo shar: will not over-write existing file "'degree_sets_tables.adb'" else cat << "SHAR_EOF" > 'degree_sets_tables.adb' with Natural_Vectors,Set_Structure; use Natural_Vectors; package body Degree_Sets_Tables is -- AUXILIAIRIES : function Number_of_Sets return natural is res : natural := 0; begin for i in 1..Set_Structure.Dimension loop res := res + Set_Structure.Number_of_Sets(i); end loop; return res; end Number_of_Sets; function Create_Set ( n,i,j : natural ) return Set is -- DESCRIPTION : -- Returns the jth set for the ith equation in the set structure. res : Set := Create(n); begin for k in 1..n loop if Set_Structure.Is_In(i,j,k) then Add(res,k); end if; end loop; return res; end Create_Set; function Is_In ( ase : Array_of_Sets; s : Set ) return boolean is -- DESCRIPTION : -- Returns true if the given set s occurs in the array of sets. begin for i in ase'range loop if Is_Equal(ase(i),s) then return true; end if; end loop; return false; end Is_In; function Different_Sets return Array_of_Sets is -- DESCRIPTION : -- Returns the array of different sets of the set structure. n : constant natural := Set_Structure.Dimension; nbs : constant natural := Number_Of_Sets; res : Array_of_Sets(1..nbs); cnt : natural := 0; begin for i in 1..n loop for j in 1..Set_Structure.Number_of_Sets(i) loop declare s : Set := Create_Set(n,i,j); begin if not Is_In(res(1..cnt),s) then cnt := cnt + 1; res(cnt) := s; else Clear(s); end if; end; end loop; end loop; return res(1..cnt); end Different_Sets; function Index ( ase : Array_of_Sets; s : Set ) return natural is -- DESCRIPTION : -- Returns the index of the given set in the array of sets. -- If the set does not occur in ase, then ase'last+1 will be returned. begin for i in ase'range loop if Is_Equal(ase(i),s) then return i; end if; end loop; return ase'last+1; end Index; -- CONSTRUCTOR : function Create return Degree_Sets_Table is n : constant natural := Set_Structure.Dimension; ase : constant Array_of_Sets := Different_Sets; res : Degree_Sets_Table(n,ase'length); begin res.s := ase; for i in res.a'range(1) loop for j in res.a'range(2) loop res.a(i,j) := 0; end loop; end loop; for i in 1..n loop for j in 1..Set_Structure.Number_of_Sets(i) loop declare s : Set := Create_Set(n,i,j); k : natural := Index(res.s,s); begin res.a(i,k) := res.a(i,k) + 1; Clear(s); end; end loop; end loop; return res; end Create; -- PERMANENT COMPUTATIONS : function Union_Acceptable ( s : Array_of_Sets ) return boolean is -- DESCRIPTION : -- Returns true if the union of all sets in s contains at least -- as many elements as the length of s, returns false otherwise. res : boolean; uni : Set := Create(s(s'first)); begin for i in s'first+1..s'last loop Union(uni,s(i)); end loop; res := (Extent_Of(uni) >= s'length); Clear(uni); return res; end Union_Acceptable; function Partial_Acceptable ( s : Array_of_Sets; k : natural ) return boolean is -- DESCRIPTION : -- Checks whether any union of k sets out of s(s'first)..s(s'last-1), -- together with s(s'last) forms an acceptable tuple. res : boolean := true; accu : Set := Create(s(s'last)); function Partial_Acceptable ( s : Array_of_Sets; k,l,start : natural; uni : Set ) return boolean is -- DESCRIPTION : recursive enumeration of all candidates. -- ON ENTRY : -- l the number of sets still to choose; -- start choose out of s(start..s'last-1); -- uni partial union. res : boolean := true; begin if l = 0 then res := (Extent_Of(uni) >= k+1); else for ll in start..(s'last-l) loop declare newuni : Set := Create(uni); begin Union(newuni,s(ll)); res := Partial_Acceptable(s,k,l-1,ll+1,newuni); exit when not res; Clear(newuni); end; end loop; end if; -- if not res -- then put("Not acceptable with "); put(uni); put(" for k = "); -- put(k,1); new_line; -- end if; return res; end Partial_Acceptable; begin res := Partial_Acceptable(s,k,k,s'first,accu); Clear(accu); return res; end Partial_Acceptable; function Acceptable ( s : Array_of_Sets ) return boolean is -- DESCRIPTION : -- Returns true if the array of sets is an acceptable tuple. -- The first s'last-1 sets form already an acceptable tuple and -- are ordered according to the cardinality of their union with -- the last set, from low to high. extlast : constant natural := Extent_Of(s(s'last)); res : boolean; begin -- put_line("The array of sets "); put(s); new_line; if not Union_Acceptable(s) then res := false; else res := true; for k in extlast..s'last-2 loop res := Partial_Acceptable(s,k); exit when not res; end loop; end if; -- if res -- then put_line("is an acceptable tuple."); -- else put_line("is not an acceptable tuple."); -- end if; return res; end Acceptable; function Acceptable ( s : Array_of_Sets; v : Vector; i : natural ) return boolean is -- DESCRIPTION : -- Returns true if the choice of sets { s(v(j)) }, j=1,2,..,i, is -- acceptable. The first i-1 sets form already an acceptable tuple. begin if (i = v'first) or (Extent_Of(s(v(i))) = i) then return true; else declare sv,osv : Array_of_Sets(1..i); min,minind,extset : natural; u : Set; begin for j in 1..i loop -- create tuple of sets sv(j) := s(v(j)); end loop; for j in 1..(i-1) loop -- order tuple of sets u := Union(sv(j),sv(i)); min := Extent_Of(u); Clear(u); minind := j; for k in j+1..(i-1) loop u := Union(sv(k),sv(i)); extset := Extent_Of(u); Clear(u); if extset < min then min := extset; minind := k; end if; end loop; osv(j) := sv(minind); if j /= minind then sv(minind) := sv(j); end if; end loop; osv(i) := sv(i); return Acceptable(osv); end; end if; end Acceptable; function Permanent ( a : matrix; s : Array_of_Sets; v : Vector; i,n : natural ) return natural is -- ALGORITHM : Row expansion without memory. begin if i = n+1 then return 1; else declare res : natural := 0; vv : Vector(v'range) := v; begin for j in a'range(2) loop if a(i,j) /= 0 then vv(i) := j; if Acceptable(s,vv,i) then res := res + a(i,j)*Permanent(a,s,vv,i+1,n); end if; end if; end loop; return res; end; end if; end Permanent; function Permanent ( dst : Degree_Sets_Table ) return natural is v : Vector(1..dst.n) := (1..dst.n => 0); begin return Permanent(dst.a,dst.s,v,1,dst.n); end Permanent; -- DESTRUCTOR : procedure Clear ( ase : in out Array_of_Sets ) is begin for i in ase'range loop Clear(ase(i)); end loop; end Clear; procedure Clear ( dst : in out Degree_Sets_Table ) is begin Clear(dst.s); end Clear; end Degree_Sets_Tables; SHAR_EOF fi # end of overwriting check if test -f 'degree_sets_tables.ads' then echo shar: will not over-write existing file "'degree_sets_tables.ads'" else cat << "SHAR_EOF" > 'degree_sets_tables.ads' with Integer_Matrices; use Integer_Matrices; with Sets_of_Unknowns; use Sets_of_Unknowns; package Degree_Sets_Tables is -- DESCRIPTION : -- This package provides facilities for computing generalized permanents, -- based on a set structure. -- DATASTRUCTURES : type Array_of_Sets is array ( integer range <> ) of Set; type Degree_Sets_Table ( n,m : natural ) is record s : Array_of_Sets(1..m); a : Matrix(1..n,1..m); end record; -- CONSTRUCTOR : function Create return Degree_Sets_Table; -- DESCRIPTION : -- Selects the information from the package Set_Structure to create -- a degree set structure table. -- PERMANENT COMPUTATIONS : function Permanent ( dst : Degree_Sets_Table ) return natural; -- DESCRIPTION : -- Returns the generalized permanent, based on the set structure. -- DESTRUCTOR : procedure Clear ( ase : in out Array_of_Sets ); procedure Clear ( dst : in out Degree_Sets_Table ); -- DESCRIPTION : -- Deallocates the space occupied by the array of sets. end Degree_Sets_Tables; SHAR_EOF fi # end of overwriting check if test -f 'degree_sets_tables_io.adb' then echo shar: will not over-write existing file "'degree_sets_tables_io.adb'" else cat << "SHAR_EOF" > 'degree_sets_tables_io.adb' with Integer_Matrices_io; use Integer_Matrices_io; with Sets_of_Unknowns_io; use Sets_of_Unknowns_io; package body Degree_Sets_Tables_io is procedure put ( ase : in Array_of_Sets ) is begin put(Standard_Output,ase); end put; procedure put ( file : in file_type; ase : in Array_of_Sets ) is begin for i in ase'range loop put(file,ase(i)); end loop; end put; procedure put ( dst : in Degree_Sets_Table ) is begin put(Standard_Output,dst); end put; procedure put ( file : in file_type; dst : in Degree_Sets_Table ) is begin put(file,dst.s); new_line(file); put(file,dst.a); end put; end Degree_Sets_Tables_io; SHAR_EOF fi # end of overwriting check if test -f 'degree_sets_tables_io.ads' then echo shar: will not over-write existing file "'degree_sets_tables_io.ads'" else cat << "SHAR_EOF" > 'degree_sets_tables_io.ads' with text_io; use text_io; with Degree_Sets_Tables; use Degree_Sets_Tables; package Degree_Sets_Tables_io is -- DESCRIPTION : -- This package provides some output facilities for degree set tables. procedure put ( ase : in Array_of_Sets ); procedure put ( file : in file_type; ase : in Array_of_Sets ); -- DESCRIPTION : -- Writes the array of sets on file or on standard output, procedure put ( dst : in Degree_Sets_Table ); procedure put ( file : in file_type; dst : in Degree_Sets_Table ); -- DESCRIPTION : -- Writes the degree set table on file or on standard output, -- if the file is omitted. end Degree_Sets_Tables_io; SHAR_EOF fi # end of overwriting check if test -f 'degree_structure.adb' then echo shar: will not over-write existing file "'degree_structure.adb'" else cat << "SHAR_EOF" > 'degree_structure.adb' with unchecked_deallocation,generate; with text_io; use text_io; with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Numbers,Complex_Matrices; use Complex_Numbers,Complex_Matrices; with Complex_Numbers_io; use Complex_Numbers_io; with Complex_Linear_System_Solvers; use Complex_Linear_System_Solvers; with Degrees_in_Sets_of_Unknowns; use Degrees_in_Sets_of_Unknowns; with Random_Number_Generators; use Random_Number_Generators; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; with Integer_Vectors; package body Degree_Structure is -- DECLARATIONS : type zd(m : natural) is record z : Partition(1..m); d : Vector(1..m); end record; type Link_To_zd is access zd; procedure free is new unchecked_deallocation(zd,Link_To_zd); type dgst is array(positive range <>) of Link_To_zd; type Link_To_dgst is access dgst; procedure free is new unchecked_deallocation(dgst,Link_To_dgst); -- INTERNAL DATA : ds : Link_To_dgst; -- CREATORS : procedure Find_Partition ( p : in Poly; z : in out Partition; m : in out natural; dg : in out Natural_Vectors.Vector ) is -- DESCRIPTION : -- This routine finds an good partition for the polynomial p -- ON ENTRY : -- p a polynomial. -- ON RETURN : -- z a partition of the set of unknowns of p; -- m the number of sets in the partition z; -- dg the degrees of the polynomial p in the sets of z, -- dg(i) = Degree(p,z(i)). n : natural := Number_Of_Unknowns(p); di : integer; added : boolean; begin for i in 1..n loop di := Degree(p,i); if di > 0 then added := false; for j in 1..m loop if di = dg(j) then Add(z(j),i); if Degree(p,z(j)) = dg(j) then added := true; else Remove(z(j),i); end if; end if; exit when added; end loop; if not added then m := m + 1; Add(z(m),i); dg(m) := di; end if; end if; end loop; end Find_Partition; procedure Create ( p : in Poly_Sys ) is n : natural := p'length; z : Partition(1..n); d : Natural_Vectors.Vector(1..n) := (1..n => 0); m : natural; begin if ds /= null then Clear; end if; ds := new dgst(1..n); for i in p'range loop m := 0; Create(z,n); Find_Partition(p(i),z,m,d); ds(i) := new zd(m); for j in 1..m loop ds(i).z(j) := Create(z(j)); ds(i).d(j) := d(j); end loop; Clear(z); end loop; end Create; procedure Put ( p : in Poly_Sys; i,m : in natural; z : in Partition ) is n : natural := p'length; begin if ds = null then ds := new dgst(1..n); end if; ds(i) := new zd(m); for j in 1..m loop ds(i).z(j) := Create(z(j)); ds(i).d(j) := Degree(p(i),z(j)); end loop; end Put; -- SELECTORS : function Empty return boolean is begin return (ds = null); end Empty; function Get ( i : natural ) return natural is begin return ds(i).m; end Get; procedure Get ( i : in natural; z : in out Partition; d : out Natural_Vectors.Vector ) is begin for j in 1..ds(i).m loop z(j) := Create(ds(i).z(j)); d(j) := ds(i).d(j); end loop; end Get; -- COMPUTING THE GENERALIZED BEZOUT NUMBER : function Matrix_Criterion ( z : Partition ) return boolean is -- DESCRIPTION : -- This is the matrix criterion for testing if -- a product is admissible or not. n : natural := z'last - z'first +1; mat : matrix(1..n,1..n); ipvt : Integer_Vectors.Vector(1..n); eps : constant double_float := 10.0**(-10); r : double_complex; rcond : double_float; begin for i in 1..n loop r := CMPLX(double_float(i+1)); for j in 1..n loop if Is_In(z(i),j) then mat(i,j) := r; r := r*r; else mat(i,j) := CMPLX(0.0); end if; end loop; end loop; lufco(mat,n,ipvt,rcond); return (abs(rcond) > eps); exception when others => return false; end Matrix_Criterion; function Admissible ( z : Partition; n : natural ) return boolean is temp : Partition(1..n); admis : boolean := true; begin temp(1) := Create(z(1)); for i in 2..(n-1) loop temp(i) := Create(z(i)); admis := Admissible(temp,i,z(i+1)); exit when not admis; end loop; Clear(temp); return admis; end Admissible; function Admissible ( z : Partition; n : natural; s : Set ) return boolean is begin for k in 1..n loop if not Admissible(z,k,n,s) then return false; end if; end loop; return true; end Admissible; function Admissible ( z : Partition; k,n : natural; s : Set ) return boolean is type arr is array (integer range <>) of boolean; admis : boolean := true; procedure check (a : in arr; continue : out boolean) is u : Set := Create(s); begin for i in a'range loop if a(i) then Union(u,z(i)); end if; end loop; admis := ( Extent_Of(u) >= k+1 ); continue := admis; Clear(u); end check; procedure gen is new generate(arr,check); begin gen(k,1,n); return admis; end Admissible; procedure Compute ( i,n,sum : in natural; res : in out natural; z : in out Partition ) is begin if i > n then res := res + sum; else -- Pick out a set and check if it is allowed : for j in 1..ds(i).m loop if ds(i).d(j) /= 0 and then Admissible(z,i-1,ds(i).z(j)) then z(i) := Create(ds(i).z(j)); Compute(i+1,n,sum*ds(i).d(j),res,z); Clear(z(i)); end if; end loop; end if; end Compute; function Generalized_Bezout_Number return natural is res : natural := 0; n : natural := ds'length; z : Partition(1..n); begin Compute(1,n,1,res,z); return res; end Generalized_Bezout_Number; function Generalized_Bezout_Number ( p : in Poly_Sys ) return natural is begin Create(p); return Generalized_Bezout_Number; end Generalized_Bezout_Number; -- DESTRUCTOR : procedure Clear is begin if ds /= null then for i in ds'range loop free(ds(i)); end loop; free(ds); end if; end Clear; end Degree_Structure; SHAR_EOF fi # end of overwriting check if test -f 'degree_structure.ads' then echo shar: will not over-write existing file "'degree_structure.ads'" else cat << "SHAR_EOF" > 'degree_structure.ads' with Natural_Vectors,Sets_of_Unknowns; use Natural_Vectors,Sets_of_Unknowns; with Partitions_of_Sets_of_Unknowns; use Partitions_of_Sets_of_Unknowns; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; package Degree_Structure is -- DESCRIPTION : -- This package analyzes the structure of a given -- polynomial system, with respect to its degrees. -- CREATORS : procedure Create ( p : in Poly_Sys ); -- DESCRIPTION : -- For each equation of the polynomial system p, a heuristic is applied -- for constructing a good tuple of partitions. -- This degree structure will be contained by the package itself. procedure Put ( p : in Poly_Sys; i,m : in natural; z : in Partition ); -- DESCRIPTION : -- A partition for the set of unknowns of the ith polynomial -- of the system p is added. -- SELECTORS : function Empty return boolean; -- DESCRIPTION : -- is true initially and after the Clear procedure. function Get ( i : natural ) return natural; -- DESCRIPTION : -- returns the number of sets for the partition of -- the i-th equation of a polynomial system p for -- which the Create operation must be performed. procedure Get ( i : in natural; z : in out Partition; d : out Natural_Vectors.Vector ); -- DESCRIPTION : -- The partition for the i-the equation of the polynomial -- system p is returned together with its degrees; -- for j in d'range : d(j) = Degree(p(i),z(j)). -- REQUIRED : -- The Create operation or Put operations have been performed on a -- polynomial system p having at least i equations. -- COMPUTING THE GENERALIZED BEZOUT NUMBER : function Admissible ( z : Partition; n : natural ) return boolean; -- DESCRIPTION : -- return true if the following holds: -- `Any union of k sets of z contains at least k unknowns', -- for k in 2..n. -- NOTE : -- z is not necessary a partition, it is rather a set of n sets -- of unknowns. function Admissible ( z : Partition; n : natural; s : Set ) return boolean; -- DESCRIPTION : -- given admissible(z,n) = true, this function returns -- admissible(union(z,s),n+1). function Admissible ( z : Partition; k,n : natural; s : Set ) return boolean; -- DESCRIPTION : -- returns true if admissible(union(z,s),n+1), with respect to k. function Generalized_Bezout_Number return natural; -- DESCRIPTION : -- This function returns a Bezout number based on the -- degree structure of the system. function Generalized_Bezout_Number ( p : in Poly_Sys ) return natural; -- DESCRIPTION : -- Calling this function is equivalent to : -- Degree_Structure.Create(p); -- return Degree_Structure.Generalized_Bezout_Number; -- DESTRUCTOR : procedure Clear; -- DESCRIPTION : -- All allocated memory space is freed. end Degree_Structure; SHAR_EOF fi # end of overwriting check if test -f 'degrees_in_sets_of_unknowns.adb' then echo shar: will not over-write existing file "'degrees_in_sets_of_unknowns.adb'" else cat << "SHAR_EOF" > 'degrees_in_sets_of_unknowns.adb' package body Degrees_in_Sets_of_Unknowns is function Degree ( t : Term; s : Set ) return integer is sum : integer := 0; begin if Extent_Of(s) > 0 then for i in t.dg'range loop if Is_In(s,i) then sum := sum + t.dg(i); end if; end loop; end if; return sum; end Degree; function Degree ( p : Poly; s : Set ) return integer is res : integer := -1; procedure Degree_Term ( t : in Term; continue : out boolean ) is sum : integer := Degree(t,s); begin if sum > res then res := sum; end if; continue := true; end Degree_Term; procedure Degree_Terms is new Visiting_Iterator(Degree_Term); begin Degree_Terms(p); return res; end Degree; function Degree_Table ( p : Poly_Sys; z : Partition ) return matrix is res : matrix(p'range,z'range); begin for i in p'range loop for j in z'range loop res(i,j) := Degree(p(i),z(j)); end loop; end loop; return res; end Degree_Table; end Degrees_in_Sets_of_Unknowns; SHAR_EOF fi # end of overwriting check if test -f 'degrees_in_sets_of_unknowns.ads' then echo shar: will not over-write existing file "'degrees_in_sets_of_unknowns.ads'" else cat << "SHAR_EOF" > 'degrees_in_sets_of_unknowns.ads' with Integer_Matrices; use Integer_Matrices; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Sets_of_Unknowns; use Sets_of_Unknowns; with Partitions_of_Sets_of_Unknowns; use Partitions_of_Sets_of_Unknowns; package Degrees_in_Sets_of_Unknowns is -- DESCRIPTION : -- This procedure provides routines for computing the degree -- of a given complex polynomial w.r.t. to a given set. function Degree ( t : Term; s : Set ) return integer; function Degree ( p : Poly; s : Set ) return integer; -- DESCRIPTION : -- Returns the degree in the given set. function Degree_Table ( p : Poly_Sys; z : Partition ) return matrix; -- DESCRIPTION : -- The element (i,j) of the returned matrix contains Degree(p(i),z(j)). end Degrees_in_Sets_of_Unknowns; SHAR_EOF fi # end of overwriting check if test -f 'driver_for_interpolating_homotopies.adb' then echo shar: will not over-write existing file "'driver_for_interpolating_homotopies.adb'" else cat << "SHAR_EOF" > 'driver_for_interpolating_homotopies.adb' with Communications_with_User; use Communications_with_User; with Floating_Point_Numbers; use Floating_Point_Numbers; with integer_io,Numbers_io; use integer_io,Numbers_io; with Natural_Vectors; with Complex_Numbers,Complex_Vectors; use Complex_Numbers,Complex_Vectors; with Complex_Numbers_io; use Complex_Numbers_io; with Random_Number_Generators; use Random_Number_Generators; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; with Interpolating_Homotopies; use Interpolating_Homotopies; procedure Driver_for_Interpolating_Homotopies ( file : in file_type; p : in Poly_Sys; z : in Partition; b : in out natural; q : out Poly_Sys; qsols : in out Solution_List ) is n : constant natural := p'last; interpols : Solution_List; ib,scalind : natural; ans : character; function Random_Interpolating ( n,m : natural ) return Solution_List is -- DESCRIPTION : -- A list of m random n-dimensional vectors will be returned. -- The complex numbers will all have modulus one. res,res_last : Solution_List; s : Solution(n); begin s.t := CMPLX(0.0); s.m := 1; s.err := 0.0; s.rco := 1.0; s.res := 0.0; for i in 1..m loop for j in 1..n loop s.v(j) := random1; end loop; Append(res,res_last,s); end loop; return res; end Random_Interpolating; procedure Random_Linear_Scaler ( n : in natural; p : in Poly; v : out vector; l : out natural ) is -- DESCRIPTION : -- Returns a random vector of dimension n+1, with range 0..n. -- There will be a nonzero entry only for those unknowns that occur in p. res : Vector(0..n); last : natural := 0; begin for i in res'range loop if Degree(p,i) > 0 then res(i) := random1; last := last + 1; else res(i) := CMPLX(0.0); end if; end loop; v := res; l := last; end Random_Linear_Scaler; function Scale ( sc,v : Vector; last : integer ) return double_complex is -- DESCRIPTION : -- Returns the last component of the vector v, that is v(last), -- such that sc(0) + sum sc(i)*v(i), i in v'range, holds. res : double_complex := sc(0); begin for i in v'first..last-1 loop res := res + sc(i)*v(i); end loop; res := -res/sc(last); return res; end Scale; function Random_Interpolating ( n,m : natural; scaler : Vector; scallast : natural ) return Solution_List is -- DESCRIPTION : -- A list of m random n-dimensional vectors will be returned. -- The complex numbers will all have modulus one, except the last one, -- indicated by scallast, that has been chosen to satisfy the scaler -- equation, defined by sum of scaler(i)*x_i = 0, with x_0 = 1. res,res_last : Solution_List; s : Solution(n); begin s.t := CMPLX(0.0); s.m := 1; for i in 1..m loop for j in 1..(n-1) loop s.v(j) := random1; end loop; s.v(n) := Scale(scaler,s.v,scallast); Append(res,res_last,s); end loop; return res; end Random_Interpolating; function Create ( v : Vector ) return Poly is res : Poly := Null_Poly; t : Term; begin t.dg := new Natural_Vectors.Vector'(v'first+1..v'last => 0); for i in v'range loop t.cf := v(i); if i > v'first then t.dg(i) := 1; end if; Plus_Term(res,t); if i > v'first then t.dg(i) := 0; end if; end loop; Clear(t); return res; end Create; function Interpolating_by_User ( n,m : natural ) return Solution_List is -- DESCRIPTION : -- A list of m n-dimensional vectors will be read from standard input. res,res_last : Solution_List; s : Solution(n); -- f1,f2 : double_float; begin put("Reading "); put(m,1); put(" "); put(n,1); put_line("-dimensional complex vectors."); for i in 1..m loop s.t := CMPLX(0.0); s.m := 1; s.err := 0.0; s.rco := 1.0; s.res := 0.0; put("Give the components of vector "); put(i,1); put_line(" :"); for j in 1..n loop -- Read_Double_Float(f1); -- Read_Double_Float(f2); -- s.v(j) := CMPLX(f1,f2); get(s.v(j)); end loop; Append(res,res_last,s); end loop; return res; end Interpolating_by_User; procedure Driver_for_Interpolation is -- DESCRIPTION : interpolation without a scaling equation dp,ip : Poly_Sys(p'range); begin dp := Dense_Representation(p,z); ip := Independent_Representation(dp); ib := Independent_Roots(ip); if ib > b then ib := b; end if; put("The number of independent roots : "); put(ib,1); new_line; put("Do you want to give interpolation vectors by yourself ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then interpols := Interpolating_by_User(n,ib); else put_line("Random interpolating vectors will be generated."); interpols := Random_Interpolating(n,ib); end if; q := Interpolate(ip,ib,interpols); qsols := interpols; b := ib; Clear(dp); Clear(ip); end Driver_for_Interpolation; procedure Driver_for_Scaled_Interpolation is -- DESCRIPTION : interpolation with a scaling equation, p(scalind). dp,ip,pp,qq : Poly_Sys(p'range); scalvec : Vector(0..n); scalveclast : natural; begin Random_Linear_Scaler(n,p(scalind),scalvec,scalveclast); for i in p'range loop if i = scalind then pp(i) := Null_Poly; else pp(i) := p(i); end if; end loop; dp := Dense_Representation(pp,z); ip := Independent_Representation(dp); ib := Independent_Roots(ip,scalveclast); if ib > b then ib := b; end if; put("The number of independent roots : "); put(ib,1); new_line; put("Do you want to give interpolation vectors by yourself ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then interpols := Interpolating_by_User(n,ib); else put_line("Random interpolating vectors will be generated."); interpols := Random_Interpolating(n,ib,scalvec,scalveclast); end if; qq := Interpolate(ip,scalveclast,ib,interpols); qq(scalind) := Create(scalvec); qsols := interpols; b := ib; q := qq; Clear(dp); Clear(ip); end Driver_for_Scaled_Interpolation; begin new_line; put("Give the number of the linear scaling equation (0 if none) : "); Read_Natural(scalind); if scalind = 0 then Driver_for_Interpolation; else Driver_for_Scaled_Interpolation; end if; end Driver_for_Interpolating_Homotopies; SHAR_EOF fi # end of overwriting check if test -f 'driver_for_interpolating_homotopies.ads' then echo shar: will not over-write existing file "'driver_for_interpolating_homotopies.ads'" else cat << "SHAR_EOF" > 'driver_for_interpolating_homotopies.ads' with text_io,Solutions; use text_io,Solutions; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Partitions_of_Sets_of_Unknowns; use Partitions_of_Sets_of_Unknowns; procedure Driver_for_Interpolating_Homotopies ( file : in file_type; p : in Poly_Sys; z : in Partition; b : in out natural; q : out Poly_Sys; qsols : in out Solution_List ); -- DESCRIPTION : -- This is an interactive driver for the construction of an interpolating -- homotopy based on an m-homogeneous Bezout number. -- ON ENTRY : -- file to write diagnostics on; -- p the polynomial system; -- z partition of the set of unknowns of p; -- b an m-homogeneous Bezout number. -- ON RETURN : -- b number of interpolating roots; -- q an m-homogeneous start system; -- qsols solutions of q. SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_m_homogenization.adb' then echo shar: will not over-write existing file "'drivers_for_m_homogenization.adb'" else cat << "SHAR_EOF" > 'drivers_for_m_homogenization.adb' with Communications_with_User; use Communications_with_User; with integer_io,Numbers_io; use integer_io,Numbers_io; with Timing_Package; use Timing_Package; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Solutions_io; use Solutions_io; with Sets_of_Unknowns; use Sets_of_Unknowns; with Sets_of_Unknowns_io; use Sets_of_Unknowns_io; with Partitions_of_Sets_of_Unknowns; use Partitions_of_Sets_of_Unknowns; with Partitions_of_Sets_of_Unknowns_io; use Partitions_of_Sets_of_Unknowns_io; with m_Homogeneous_Bezout_Numbers; use m_Homogeneous_Bezout_Numbers; with m_Homogeneous_Start_Systems; use m_Homogeneous_Start_Systems; with Driver_for_Interpolating_Homotopies; package body Drivers_for_m_Homogenization is procedure m_Homogenization_Info is i : array(1..15) of string(1..65); begin i( 1):=" An m-homogeneous Bezout number is based on a partition of the"; i( 2):="set of unknowns, with m the number of sets in the partition. "; i( 3):=" The corresponding start system is a linear-product system: the"; i( 4):="i-th equation is the product of linear equations with random"; i( 5):="coefficients in the unknowns of the set of the partition. The"; i( 6):="number of factors in the product of the i-th polynomial equals"; i( 7):="the product of the degrees of the i-th polynomial in the original"; i( 8):="system w.r.t. every set in the partition. "; i( 9):=" Given a partition, the m-homogeneous Bezout number equals the"; i(10):="number of solutions of the corresponding linear-product start"; i(11):="system. Before the construction of the start system, an m-"; i(12):="homogeneous Bezout number is first computed in a formal way as a"; i(13):="generalized permanent of a degree matrix. Either all partitions"; i(14):="of the set of unknowns can be evaluated, or the available"; i(15):="heuristic procedure for generating a partition can be applied. "; for k in i'range loop put_line(i(k)); end loop; end m_Homogenization_Info; procedure Driver_for_m_Homogenization ( file : in file_type; p : in Poly_Sys; b : in out natural; q : out Poly_Sys; qsols : out Solution_List ) is n : natural := p'length; np : constant natural := Number_of_Partitions(n); procedure Write_Results ( file : in file_type; bz,nz : in natural; z : in partition ) is begin new_line(file); put(file," "); put(file,nz,1); put(file,"-homogeneous Bezout number is "); put(file,bz,1); new_line(file); put(file," with partition : "); put(file,z); new_line(file); end Write_Results; procedure Save_Results ( qq : in Poly_Sys; qqsols : in Solution_List ) is qqfile : file_type; begin if not Is_Null(qqsols) then new_line; put_line("Reading file name to write start system."); Read_Name_and_Create_File(qqfile); put_line(qqfile,qq); new_line(qqfile); put_line(qqfile,"THE SOLUTIONS : "); new_line(qqfile); put(qqfile,Length_Of(qqsols),Head_Of(qqsols).n,qqsols); Close(qqfile); end if; end Save_Results; function Universe ( n : natural ) return Set is -- DESCRIPTION : Returns the set of all unknowns. s : Set := Create(n); begin for i in 1..n loop Add(s,i); end loop; return s; end Universe; procedure Display_Menu ( choice : out character; bz,nz : in natural; z : in Partition ) is ans : character; begin new_line; put_line("MENU for computing m-Homogeneous Bezout Numbers :"); put (" 0. exit - Bezout number : "); put(bz,1); put(", partition : "); put(z(1..nz)); new_line; put_line(" 1. Heuristic generation of a partition"); put (" 2. Enumerate all "); put(np,1); put_line(" partitions"); put_line(" 3. Enumerate over #partitions <= given maximum"); put_line(" 4. Enumerate till Bezout number <= given minimum"); put_line(" 5. Combine stop criteria of strategies 3 and 4"); put_line(" 6. Evaluate your own partition"); put("Type number between 0 and 6 to choose : "); Ask_Alternative(ans,"0123456"); choice := ans; end Display_Menu; procedure Dispatch_Menu ( file : in file_type; choice : in character; bz,nz : in out natural; z : in out Partition ) is -- DESCRIPTION : -- Dispatches the choice of the user. -- ON ENTRY : -- file must be opened for output; -- choice choice of method; -- bz current Bezout number with partition z; -- nz number of sets in current partition z; -- z current partition is z(1..nz). max,min : natural; begin new_line(file); case choice is when '1' => Clear(z); nz := 0; put_line(file,"HEURISTIC PARTITIONER :"); PB(p,bz,nz,z); when '2' => put(file,"ENUMERATION OF "); put(file,np,1); put_line(file," PARTITIONS :"); Bezout_number(p,bz,nz,z); when '3' => put(" Give maximum bound : "); Read_Natural(max); put(file,"ENUMERATION OF "); put(file,max,1); put_line(file," PARTITIONS :"); Bezout_number(max,p,bz,nz,z); when '4' => put(" Give minimum bound : "); Read_Natural(min); put(file,"ENUMERATION TILL BEZOUT NUMBER <= "); put(file,min,1); new_line(file); Bezout_number(p,min,bz,nz,z); when '5' => put(" Give maximum bound : "); Read_Natural(max); put(" Give minimum bound : "); Read_Natural(min); put(file,"ENUMERATION OF "); put(file,max,1); put_line(file," PARTITIONS"); put(file," OR TILL BEZOUT NUMBER <= "); put(file,min,1); new_line(file); Bezout_number(max,p,min,bz,nz,z); when '6' => Clear(z); nz := 0; put_line(file,"PARTITION PROVIDED BY USER :"); put("Give the number of sets : "); Read_Positive(nz); put("Give "); put(nz,1); put(" sets : "); Create(z,n); get(z(1..nz)); bz := Bezout_Number(p,z); when others => null; end case; Write_Results(file,bz,nz,z(1..nz)); Write_Results(Standard_Output,bz,nz,z(1..nz)); end Dispatch_Menu; procedure Driver_for_Partition ( file : in file_type; bz,nz : in out natural; z : in out Partition ) is method : character; timer : timing_widget; begin new_line(file); put_line(file,"M-HOMOGENIZATION :"); tstart(timer); loop Display_Menu(method,bz,nz,z); exit when method = '0'; Dispatch_Menu(file,method,bz,nz,z); end loop; tstop(timer); new_line(file); print_times(file,timer,"Computation of m-homogeneous Bezout number"); end Driver_for_Partition; procedure Driver_for_Start_System ( file : in file_type; bz : in natural; z : in Partition ) is ans : character; timer : timing_widget; qq : Poly_Sys(p'range); qqsols : Solution_List; bb : natural := bz; begin new_line; put_line("MENU for m-Homogeneous Start Systems :"); put_line(" 0. No construction of m-homogeneous start system."); put_line(" 1. Start system based on interpolation."); put_line(" 2. Random linear-product start system."); put("Type 0,1, or 2 to choose : "); Ask_Alternative(ans,"012"); if ans /= '0' then tstart(timer); if ans = '1' then Driver_for_Interpolating_Homotopies(file,p,z,bb,qq,qqsols); else m_Homogeneous_Start_System(p,z,qq,qqsols); end if; tstop(timer); Save_Results(qq,qqsols); q := qq; qsols := qqsols; new_line(file); put(file,z'last,1); put_line(file,"-HOMOGENEOUS START SYSTEM : "); put_line(file,qq); new_line(file); put_line(file,"THE SOLUTIONS :"); new_line(file); put(file,Length_Of(qqsols),Head_Of(qqsols).n,qqsols); new_line(file); print_times(file,timer, "Construction of m-homogeneous start system"); end if; end Driver_for_Start_System; procedure Main_Driver is z : Partition(1..n); bz,nz : natural; begin nz := 1; z(1) := Universe(n); bz := Total_Degree(p); Driver_for_Partition(file,bz,nz,z); Driver_for_Start_System(file,bz,z(1..nz)); b := bz; end Main_Driver; begin Main_Driver; end Driver_for_m_Homogenization; end Drivers_for_m_Homogenization; SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_m_homogenization.ads' then echo shar: will not over-write existing file "'drivers_for_m_homogenization.ads'" else cat << "SHAR_EOF" > 'drivers_for_m_homogenization.ads' with text_io,Solutions; use text_io,Solutions; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; package Drivers_for_m_Homogenization is procedure m_Homogenization_Info; -- DESCRIPTION : -- Displays information about m-homogenization on screen. procedure Driver_for_m_Homogenization ( file : in file_type; p : in Poly_Sys; b : in out natural; q : out Poly_Sys; qsols : out Solution_List ); -- DESCRIPTION : -- Computation of an m-homogeneous Bezout number with the option -- of constructing an m-homogeneous start system. -- ON ENTRY : -- file output file; -- p a polynomial system. -- ON RETURN : -- b m-homogeneous Bezout number; -- q m-homogeneous start system; -- qsols solutions of q. end Drivers_for_m_Homogenization; SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_multi_homogenization.adb' then echo shar: will not over-write existing file "'drivers_for_multi_homogenization.adb'" else cat << "SHAR_EOF" > 'drivers_for_multi_homogenization.adb' with Communications_with_User; use Communications_with_User; with integer_io,Numbers_io; use integer_io,Numbers_io; with Timing_Package; use Timing_Package; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Solutions_io; use Solutions_io; with Natural_Vectors,Degree_Structure; use Natural_Vectors,Degree_Structure; with Sets_of_Unknowns; use Sets_of_Unknowns; with Partitions_of_Sets_of_Unknowns; use Partitions_of_Sets_of_Unknowns; with Partitions_of_Sets_of_Unknowns_io; use Partitions_of_Sets_of_Unknowns_io; with Random_Product_Start_Systems; use Random_Product_Start_Systems; package body Drivers_for_Multi_Homogenization is procedure Multi_Homogenization_Info is i : array(1..17) of string(1..65); begin i( 1):=" A multi-homogeneous Bezout number is based on a tuple of"; i( 2):="partitions of the set of unknowns. For every polynomial in the"; i( 3):="system, a different partition can model its structure. "; i( 4):=" The corresponding start system is a linear-product system: the"; i( 5):="i-th equation is the product of linear equations with random"; i( 6):="coefficients in the unknowns of the set of the partition. The"; i( 7):="number of factors in the product for the i-th equation of the"; i( 8):="start system equals the product of the degrees of the i-th"; i( 9):="polynomial in the original system w.r.t. every set in the"; i(10):="partition. "; i(11):=" Given a tuple of partitions, the multi-homogeneous Bezout"; i(12):="number equals the number of solutions of the corresponding"; i(13):="linear-product start system. Before the construction of the"; i(14):="start system, a multi-homogeneous Bezout number is first computed"; i(15):="in a formal way as a generalized permanent of a degree matrix. A"; i(16):="heuristic procedure is available for generating a tuple of"; i(17):="partitions. "; for k in i'range loop put_line(i(k)); end loop; end Multi_Homogenization_Info; procedure Driver_for_Multi_Homogenization ( file : in file_type; p : in Poly_Sys; b : in out natural; q : out Poly_Sys; qsols : out Solution_List ) is procedure Write_Results ( file : in file_type; gb : in natural ) is m : natural; begin new_line(file); put(file," multi-homogeneous Bezout number is "); put(file,gb,1); new_line(file); put_line(file," with partitions :"); for i in p'range loop m := Degree_Structure.Get(i); declare z : partition(1..m); dg : Natural_Vectors.Vector(1..m); begin Degree_Structure.Get(i,z,dg); put(file," partition for equation "); put(file,i,2); put(file," : "); put(file,z); new_line(file); Clear(z); end; end loop; end Write_Results; procedure Save_Results ( qq : in Poly_Sys; qqsols : in Solution_List ) is qqfile : file_type; begin if not Is_Null(qqsols) then new_line; put_line("Reading file name to write start system."); Read_Name_and_Create_File(qqfile); put_line(qqfile,qq); new_line(qqfile); put_line(qqfile,"THE SOLUTIONS : "); new_line(qqfile); put(qqfile,Length_Of(qqsols),Head_Of(qqsols).n,qqsols); Close(qqfile); end if; end Save_Results; procedure Display_Menu ( choice : out character; gb : in natural ) is ans : character; begin new_line; put_line("MENU for Multi-Homogeneous Bezout Numbers :"); put (" 0. exit - current Bezout number is "); put(gb,1); new_line; put_line(" 1. Apply heuristic partitioner"); put_line(" 2. Evaluate your own tuple of partitions."); put("Type 0, 1, or 2 to make your choice : "); Ask_Alternative(ans,"012"); choice := ans; end Display_Menu; procedure Dispatch_Menu ( choice : in character; gb : in out natural ) is m : natural; begin case choice is when '1' => gb := Degree_Structure.Generalized_Bezout_Number(p); when '2' => for i in p'range loop put("Give the number of sets in partition "); put(i,1); put(" : "); Read_Natural(m); put("Give "); put(m,1); put(" sets : "); declare zz : Partition(1..m); begin Create(zz,p'length); get(zz); Degree_Structure.Put(p,i,m,zz); Clear(zz); end; end loop; gb := Degree_Structure.Generalized_Bezout_Number; when others => null; end case; Write_Results(Standard_Output,gb); Write_Results(file,gb); end Dispatch_Menu; procedure Driver_for_Partitions ( file : in file_type; gb : in out natural ) is timer : timing_widget; method : character; begin new_line(file); put_line(file,"MULTI-HOMOGENIZATION :"); tstart(timer); loop Display_Menu(method,gb); exit when method = '0'; Dispatch_Menu(method,gb); end loop; tstop(timer); b := gb; new_line(file); print_times(file,timer,"Computation of multi-homogeneous Bezout number"); end Driver_for_Partitions; procedure Driver_for_Start_System ( file : in file_type ) is ans : character; timer : timing_widget; qq : Poly_Sys(p'range); qqsols : Solution_List; begin new_line; put("Do you want a multi-homogeneous start system ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then tstart(timer); GBQ(p,qq,qqsols); tstop(timer); Save_Results(qq,qqsols); new_line(file); put_line(file,"MULTI-HOMOGENEOUS START SYSTEM :"); put_line(file,qq); q := qq; qsols := qqsols; new_line(file); put_line(file,"THE SOLUTIONS :"); new_line(file); put(file,Length_Of(qqsols),Head_Of(qqsols).n,qqsols); new_line(file); print_times(file,timer, "Construction of multi-homogeneous start system"); end if; end Driver_for_Start_System; procedure Main_Driver is gb : natural := b; begin Driver_for_Partitions(file,gb); if not Degree_Structure.Empty then Driver_for_Start_System(file); end if; end Main_Driver; begin Main_Driver; end Driver_for_Multi_Homogenization; end Drivers_for_Multi_Homogenization; SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_multi_homogenization.ads' then echo shar: will not over-write existing file "'drivers_for_multi_homogenization.ads'" else cat << "SHAR_EOF" > 'drivers_for_multi_homogenization.ads' with text_io,Solutions; use text_io,Solutions; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; package Drivers_for_Multi_Homogenization is procedure Multi_Homogenization_Info; -- DESCRIPTION : -- Displays information about multi-homogenization on screen. procedure Driver_for_Multi_Homogenization ( file : in file_type; p : in Poly_Sys; b : in out natural; q : out Poly_Sys; qsols : out Solution_List ); -- DESCRIPTION : -- This is an interactive driver for multi-homogenization. -- ON ENTRY : -- file to write diagnostics on; -- p a polynomial system. -- ON RETURN : -- b a bound based on the degree structure; -- q a random product start system; -- qsols the solutions of q. end Drivers_for_Multi_Homogenization; SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_set_structures.adb' then echo shar: will not over-write existing file "'drivers_for_set_structures.adb'" else cat << "SHAR_EOF" > 'drivers_for_set_structures.adb' with Communications_with_User; use Communications_with_User; with integer_io,Numbers_io; use integer_io,Numbers_io; with Timing_Package; use Timing_Package; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Natural_Vectors; with Solutions_io; use Solutions_io; with Set_Structure,Set_Structure_io; with Degree_Sets_Tables; use Degree_Sets_Tables; with Random_Product_System; with Construct_Random_Product_Start_System; use Construct_Random_Product_Start_System; package body Drivers_for_Set_Structures is procedure Set_Structure_Info is i : array(1..18) of string(1..65); begin i( 1):=" A generalized Bezout number is based on a supporting set"; i( 2):="structure. A set structure is a tuple of arrays of subsets of"; i( 3):="unknowns. "; i( 4):=" The corresponding start system is a linear-product system: the"; i( 5):="i-th equation is the product of linear equations with random"; i( 6):="coefficient in the unknowns of the set of the i-th array. The"; i( 7):="number of factors in the product for the i-th equation of the"; i( 8):="start system equals the number of subsets in the i-th array of"; i( 9):="the set structure. "; i(10):=" A set structure is supporting for a polynomial system if every"; i(11):="monomial in the system also occurs in the corresponding linear-"; i(12):="product start system. "; i(13):=" Given a supporting set structure, the generalized Bezout number"; i(14):="equals the number of solutions of the corresponding linear-"; i(15):="product start system. Before the construction of the start"; i(16):="system, a generalized Bezout number is first computed in a formal"; i(17):="way as a generalized permanent of a degree matrix. A heuristic"; i(18):="procedure is available for generating a supporting set structure."; for k in i'range loop put_line(i(k)); end loop; end Set_Structure_Info; procedure Driver_for_Set_Structure ( file : in file_type; p : in Poly_Sys; b : in out natural; lpos : in out List; q : out Poly_Sys; qsols : out Solution_List ) is procedure Write_Results ( file : in file_type; bb : in natural ) is begin new_line(file); put(file," generalized Bezout number is "); put(file,bb,1); new_line(file); put_line(file," based on the set structure :"); Set_Structure_io.put(file); end Write_Results; procedure Save_Results ( qq : in Poly_Sys; qqsols : in Solution_List ) is qqfile : file_type; begin if not Is_Null(qqsols) then new_line; put_line("Reading file name to write start system."); Read_Name_and_Create_File(qqfile); put_line(qqfile,qq); new_line(qqfile); put_line(qqfile,"THE SOLUTIONS : "); new_line(qqfile); put(qqfile,Length_Of(qqsols),Head_Of(qqsols).n,qqsols); Close(qqfile); end if; end Save_Results; procedure Display_Menu ( choice : out character; bb : in natural ) is ans : character; begin new_line; put_line("MENU for generalized Bezout Numbers based on Set Structures :"); put (" 0. exit - current Bezout number is "); put(bb,1); new_line; put_line(" 1. Apply heuristic constructor for set structure"); put_line(" 2. Evaluate your own set structure"); put("Type 0, 1, or 2 to make your choice : "); Ask_Alternative(ans,"012"); choice := ans; end Display_Menu; procedure Dispatch_Menu ( file : in file_type; choice : in character; bb : in out natural ) is begin case choice is when '1' => Construct_Random_Product_Start_System.Build_Set_Structure(p); bb := Permanent(Degree_Sets_Tables.Create); when '2' => declare ns : Natural_Vectors.Vector(p'range); begin for i in ns'range loop put(" Give the number of sets for polynomial "); put(i,1); put(" : "); Read_Natural(ns(i)); end loop; Set_Structure.Init(ns); put_line("Give the set structure :"); Set_Structure_io.get; end; bb := Permanent(Degree_Sets_Tables.Create); when others => null; end case; Write_Results(Standard_Output,bb); Write_Results(file,bb); end Dispatch_Menu; procedure Driver_for_Bezout_Number ( file : in file_type; bb : in out natural ) is method : character; timer : timing_widget; begin new_line(file); put_line(file,"SET STRUCTURE ANALYSIS :"); tstart(timer); loop Display_Menu(method,bb); exit when method = '0'; Dispatch_Menu(file,method,bb); end loop; tstop(timer); new_line(file); print_times(file,timer,"set structure analysis"); end Driver_for_Bezout_Number; procedure Driver_for_Start_System ( file : in file_type; bb : in natural ) is ans : character; timer : timing_widget; qq : Poly_Sys(p'range); qqsols : Solution_List; begin new_line; put("Do you want a start system based on the set structure ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then declare nl : natural; n : natural := p'length; begin -- new_line; -- put("Solving "); put(bb,1); put(" linear systems..."); tstart(timer); Random_Product_System.Init(n); Build_Random_Product_System(n); Set_Structure.Clear; qq := Random_Product_System.Polynomial_System; -- Random_Product_System.Solve(qqsols,nl,lpos); Random_Product_System.Solve(qqsols,nl); Random_Product_System.Clear; tstop(timer); Save_Results(qq,qqsols); q := qq; qsols := qqsols; new_line(file); put_line(file,"RANDOM LINEAR-PRODUCT START SYSTEM : "); put_line(file,qq); new_line(file); put_line(file,"THE SOLUTIONS :"); new_line(file); put(file,Length_Of(qqsols),Head_Of(qqsols).n,qqsols); new_line(file); print_times(file,timer,"constructing and solving the start system"); end; else Set_Structure.Clear; -- Clear(lpos); end if; end Driver_for_Start_System; procedure Main_Driver is bb : natural := b; begin Driver_for_Bezout_Number(file,bb); if not Set_Structure.Empty then b := bb; Driver_for_Start_System(file,bb); end if; end Main_Driver; begin Main_Driver; end Driver_for_Set_Structure; end Drivers_for_Set_Structures; SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_set_structures.ads' then echo shar: will not over-write existing file "'drivers_for_set_structures.ads'" else cat << "SHAR_EOF" > 'drivers_for_set_structures.ads' with text_io,Solutions; use text_io,Solutions; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; package Drivers_for_Set_Structures is procedure Set_Structure_Info; -- DESCRIPTION : -- Displays information on set structures on screen. procedure Driver_for_Set_Structure ( file : in file_type; p : in Poly_Sys; b : in out natural; lpos : in out List; q : out Poly_Sys; qsols : out Solution_List ); -- DESCRIPTION : -- Allows the interactive computation of a generalized Bezout number, -- with an optional construction of a start system. -- ON ENTRY : -- file output file; -- p a polynomial system. -- ON RETURN : -- b a bound based on the set structure; -- lpos a list of positions indicating the acceptable classes; -- q a random product start system; -- qsols the solutions of q. end Drivers_for_Set_Structures; SHAR_EOF fi # end of overwriting check if test -f 'generate.adb' then echo shar: will not over-write existing file "'generate.adb'" else cat << "SHAR_EOF" > 'generate.adb' procedure generate ( k,first,last : in integer ) is acc : boolean_array(first..last) := (first..last => false); cont : boolean := true; procedure generate (k,start,last : in integer; acc : in out boolean_array) is begin if k = 0 then process(acc,cont); elsif k > last - start + 1 then return; else for i in start..last loop acc(i) := true; generate(k-1,i+1,last,acc); exit when not cont; acc(i) := false; end loop; end if; end generate; begin generate(k,first,last,acc); end generate; SHAR_EOF fi # end of overwriting check if test -f 'generate.ads' then echo shar: will not over-write existing file "'generate.ads'" else cat << "SHAR_EOF" > 'generate.ads' generic type boolean_array is array ( integer range <> ) of boolean; with procedure Process ( ar : in boolean_array; continue : out boolean ); procedure Generate ( k,first,last : in integer ); -- DESCRIPTION : -- This procedure generates all possible unions of k -- elements in the range first..last. SHAR_EOF fi # end of overwriting check if test -f 'interpolating_homotopies.adb' then echo shar: will not over-write existing file "'interpolating_homotopies.adb'" else cat << "SHAR_EOF" > 'interpolating_homotopies.adb' with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Numbers; use Complex_Numbers; with Natural_Vectors,Integer_Vectors; with Complex_Vectors,Complex_Matrices; use Complex_Vectors,Complex_Matrices; with Complex_Linear_System_Solvers; use Complex_Linear_System_Solvers; with Polynomial_Randomizers; use Polynomial_Randomizers; with Sets_of_Unknowns; use Sets_of_Unknowns; with Degrees_in_Sets_of_Unknowns; use Degrees_in_Sets_of_Unknowns; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; package body Interpolating_Homotopies is -- AUXILIARY OPERATIONS : function Initial_Term ( p : Poly ) return Term is -- DESCRIPTION : -- Returns the initial term of p. res : Term; procedure Init_Term ( t : Term; continue : out boolean ) is begin res := t; continue := false; end Init_Term; procedure Init_Terms is new Visiting_Iterator(Init_Term); begin Init_Terms(p); return res; end Initial_Term; procedure Eliminate_Term ( p : in out Poly; dg : in Degrees ) is -- DESCRIPTION : -- Eliminates the monomial in p that has the given exponent vector. c : double_complex := Coeff(p,dg); begin if c /= CMPLX(0.0) then declare t : Term; begin t.cf := c; t.dg := dg; Min_Term(p,t); end; end if; end Eliminate_Term; function Admitted ( t : Term; i : natural; z : partition; d : Integer_Matrices.matrix ) return boolean is -- DESCRIPTION : -- Returns true if the given term does not violate the m-homogeneous -- structure, i.e., if Degree(t,z(j)) <= d(i,j), for j in z'range. begin for j in z'range loop if Degree(t,z(j)) > d(i,j) then return false; end if; end loop; return true; end Admitted; function Dense_Representation ( p : Poly; i : natural; z : Partition; d : Integer_Matrices.matrix ) return Poly is -- DESCRIPTION : -- Returns the dense representation of the given polynomial p, known as -- p(i) of some polynomial system, of the given m-homogeneous structure. -- The returned polynomial has all its coefficients equal to one. res : Poly := Null_Poly; maxdegs,accu : Natural_Vectors.Vector(d'range(1)); procedure Generate_Monomials ( k : in natural; max : in Natural_Vectors.Vector; acc : in out Natural_Vectors.Vector) is -- DESCRIPTION : -- Generates all monomials with exponents in a box, with upper bounds -- given by the vector max. Every monomial that respects the -- m-homogeneous structure will be added to the result res. -- The current unknown is indicated by the parameter k. t : Term; begin for j in 0..max(k) loop acc(k) := j; t.cf := CMPLX(1.0); t.dg := new Natural_Vectors.Vector'(acc); if Admitted(t,i,z,d) then Plus_Term(res,t); end if; Clear(t); if k < max'last then Generate_Monomials(k+1,max,acc); end if; end loop; end Generate_Monomials; begin for j in maxdegs'range loop maxdegs(j) := Degree(p,j); accu(j) := 0; end loop; Generate_Monomials(1,maxdegs,accu); return res; end Dense_Representation; function Evaluate ( t : Term; x : Complex_Vectors.Vector ) return double_complex is res : double_complex := CMPLX(1.0); begin for i in x'range loop for k in 1..t.dg(i) loop res := res*x(i); end loop; end loop; return res; end Evaluate; procedure Interpolation_System ( p : in Poly; b : in natural; sols : in Solution_List; mat : out Complex_Matrices.matrix; rhs : out Complex_Vectors.vector ) is -- DESCRIPTION : -- Returns the matrix and right hand side vector of the linear system -- that expresses the interpolationg conditions. m : Complex_Matrices.matrix(1..b,1..b); v : Complex_Vectors.vector(1..b); cnt : natural := 0; procedure Scan_Term ( t : in Term; continue : out boolean ) is tmp : Solution_List := sols; s : Link_to_Solution; begin for row in m'range(1) loop -- fill in column indicated by cnt s := Head_Of(tmp); if cnt = 0 then v(row) := -t.cf*Evaluate(t,s.v); elsif cnt <= b then m(row,cnt) := Evaluate(t,s.v); else v(row) := v(row) - t.cf*Evaluate(t,s.v); end if; tmp := Tail_Of(tmp); end loop; cnt := cnt + 1; continue := true; end Scan_Term; procedure Scan_Poly is new Visiting_Iterator(Scan_Term); begin Scan_Poly(p); mat := m; rhs := v; end Interpolation_System; procedure Interpolation_System ( p : in Poly; i,b : in natural; sols : in Solution_List; mat : out Complex_Matrices.matrix; rhs : out Complex_Vectors.vector ) is -- DESCRIPTION : -- Returns the matrix and right hand side vector of the linear system -- that expresses the interpolationg conditions. Monomials with degree -- one in x_i will not appear in the interpolation matrix. m : Complex_Matrices.matrix(1..b,1..b); v : Complex_Vectors.vector(1..b); cnt : natural := 0; procedure Scan_Term ( t : in Term; continue : out boolean ) is tmp : Solution_List := sols; s : Link_to_Solution; begin for row in m'range(1) loop -- fill in column indicated by cnt s := Head_Of(tmp); if cnt = 0 then v(row) := -t.cf*Evaluate(t,s.v); else if cnt <= b and t.dg(i) /= 1 then m(row,cnt) := Evaluate(t,s.v); else v(row) := v(row) - t.cf*Evaluate(t,s.v); end if; end if; tmp := Tail_Of(tmp); end loop; if cnt = 0 or t.dg(i) /= 1 then cnt := cnt + 1; end if; continue := true; end Scan_Term; procedure Scan_Poly is new Visiting_Iterator(Scan_Term); begin Scan_Poly(p); mat := m; rhs := v; end Interpolation_System; procedure Construct_Interpolant ( p : in out Poly; cv : in Complex_Vectors.Vector ) is -- DESCRIPTION : -- With the coefficients of its monomials, the interpolant will be -- constructed. cnt : natural := 0; procedure Scan_Term ( t : in out Term; continue : out boolean ) is begin if cnt > cv'last then continue := false; else if cnt >= cv'first then t.cf := cv(cnt); end if; cnt := cnt + 1; continue := true; end if; end Scan_Term; procedure Scan_Poly is new Changing_Iterator(Scan_Term); begin Scan_Poly(p); end Construct_Interpolant; procedure Construct_Interpolant ( p : in out Poly; i : in natural; cv : in Complex_Vectors.Vector ) is -- DESCRIPTION : -- With the coefficients of its monomials, the interpolant will be -- constructed. Monomials that have degree one in x_i will be ignored. cnt : natural := 0; procedure Scan_Term ( t : in out Term; continue : out boolean ) is begin if cnt > cv'last then continue := false; else if cnt = 0 or t.dg(i) /= 1 then if cnt >= cv'first then t.cf := cv(cnt); end if; cnt := cnt + 1; end if; continue := true; end if; end Scan_Term; procedure Scan_Poly is new Changing_Iterator(Scan_Term); begin Scan_Poly(p); end Construct_Interpolant; function Interpolate ( p : Poly; b : natural; sols : Solution_List ) return Poly is -- DESCRIPTION : -- Constructs the interpolating polynomial with the same monomial -- structure as the given polynomial. res : Poly := Complex_Randomize(p); mat : Complex_Matrices.Matrix(1..b,1..b); rhs : Complex_Vectors.Vector(1..b); ipvt : Integer_Vectors.Vector(1..b); info : integer; begin Interpolation_System(res,b,sols,mat,rhs); for i in ipvt'range loop ipvt(i) := i; end loop; lufac(mat,b,ipvt,info); if info = 0 then lusolve(mat,b,ipvt,rhs); end if; Construct_Interpolant(res,rhs); return res; end Interpolate; function Interpolate ( p : Poly; i,b : natural; sols : Solution_List ) return Poly is -- DESCRIPTION : -- Constructs the interpolating polynomial with the same monomial -- structure as the given polynomial. The monomials that have degree -- one in x_i will not appear in the interpolation matrix. res : Poly := Complex_Randomize(p); mat : Complex_Matrices.Matrix(1..b,1..b); rhs : Complex_Vectors.Vector(1..b); ipvt : Integer_Vectors.Vector(1..b); info : integer; begin Interpolation_System(res,i,b,sols,mat,rhs); for j in ipvt'range loop ipvt(j) := j; end loop; lufac(mat,b,ipvt,info); if info = 0 then lusolve(mat,b,ipvt,rhs); end if; Construct_Interpolant(res,i,rhs); return res; end Interpolate; -- TARGET ROUTINES : function Dense_Representation ( p : Poly_Sys; z : partition ) return Poly_Sys is d : constant Integer_Matrices.matrix := Degree_Table(p,z); begin return Dense_Representation(p,z,d); end Dense_Representation; function Dense_Representation ( p : Poly_Sys; z : partition; d : Integer_Matrices.matrix ) return Poly_Sys is res : Poly_Sys(d'range(1)); begin for i in res'range loop if p(i) /= Null_Poly then res(i) := Dense_Representation(p(i),i,z,d); end if; end loop; return res; end Dense_Representation; function Independent_Representation ( p : Poly_Sys ) return Poly_Sys is res : Poly_Sys(p'range); it : Term; begin Copy(p,res); for i in res'range loop if p(i) /= Null_Poly then it := Initial_Term(res(i)); for j in res'range loop if j /= i and then (p(j) /= Null_Poly) then Eliminate_Term(res(j),it.dg); end if; end loop; end if; end loop; return res; end Independent_Representation; function Independent_Roots ( p : Poly_Sys ) return natural is ntp : natural := 0; min : natural := ntp; begin for i in p'first..p'last loop if p(i) /= Null_Poly then ntp := Number_of_Terms(p(i)); if min = 0 then min := ntp; elsif ntp < min then min := ntp; end if; end if; end loop; if min = 0 then return 0; else return (min-1); end if; end Independent_Roots; function Number_of_Terms ( p : Poly; i : natural ) return natural is -- DESCRIPTION : -- Returns the number of monomials of p, without those monomials that -- have degree one in x_i. cnt : natural := 0; procedure Count_Term ( t : in Term; continue : out boolean ) is begin if t.dg(i) /= 1 then cnt := cnt+1; end if; continue := true; end Count_Term; procedure Count_Terms is new Visiting_Iterator(Count_Term); begin Count_Terms(p); return cnt; end Number_of_Terms; function Independent_Roots ( p : Poly_Sys; i : natural ) return natural is ntp : natural := 0; min : natural := ntp; begin for j in p'first..p'last loop if p(j) /= Null_Poly then ntp := Number_of_Terms(p(j),i); if min = 0 then min := ntp; elsif ntp < min then min := ntp; end if; end if; end loop; if min = 0 then return 0; else return (min-1); end if; end Independent_Roots; function Interpolate ( p : Poly_Sys; b : natural; sols : Solution_List ) return Poly_Sys is res : Poly_Sys(p'range); begin for i in p'range loop if p(i) /= Null_Poly then res(i) := Interpolate(p(i),b,sols); end if; end loop; return res; end Interpolate; function Interpolate ( p : Poly_Sys; i,b : natural; sols : Solution_List ) return Poly_Sys is res : Poly_Sys(p'range); begin for j in p'range loop if p(j) /= Null_Poly then res(j) := Interpolate(p(j),i,b,sols); end if; end loop; return res; end Interpolate; end Interpolating_Homotopies; SHAR_EOF fi # end of overwriting check if test -f 'interpolating_homotopies.ads' then echo shar: will not over-write existing file "'interpolating_homotopies.ads'" else cat << "SHAR_EOF" > 'interpolating_homotopies.ads' with Integer_Matrices; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Solutions; use Solutions; with Partitions_of_Sets_of_Unknowns; use Partitions_of_Sets_of_Unknowns; package Interpolating_Homotopies is -- DESCRIPTION : -- This package contains facilities for constructing interpolating -- homotopies, based on a given m-homogeneous structure. -- The routines are given in the order in which they should be applied. -- Null polynomials are ignored, making scaled interpolation possible, -- the scaling equation, used for generating the interpolating vectors, -- can be added afterwards. For linear scalers, the last unknown of the -- scaling equation should be ignored in those monomials that have degree -- one in that unknown, to avoid singular interpolation matrices. function Dense_Representation ( p : Poly_Sys; z : partition ) return Poly_Sys; function Dense_Representation ( p : Poly_Sys; z : partition; d : Integer_Matrices.matrix ) return Poly_Sys; -- DESCRIPTION : -- A dense representation of an m-homogeneous structure is returned. -- The coefficients of the polynomials in the returned system are all one. function Independent_Representation ( p : Poly_Sys ) return Poly_Sys; -- DESCRIPTION : -- An independent representation of a polynomial system is returned. -- This means that the initial term of each polynomial does not occur -- in every other polynomial. function Independent_Roots ( p : Poly_Sys ) return natural; function Independent_Roots ( p : Poly_Sys; i : natural ) return natural; -- DESCRIPTION : -- Returns the number of independent roots the system p can have. -- When the ith unknown is given as parameter, the monomials that -- have degree one in x_i are not counted. -- IMPORTANT NOTE : p must be an independent representation of a polynomial -- system, otherwise the result might not be reliable. function Interpolate ( p : Poly_Sys; b : natural; sols : Solution_List ) return Poly_Sys; function Interpolate ( p : Poly_Sys; i,b : natural; sols : Solution_List ) return Poly_Sys; -- DESCRIPTION : -- This routine constructs a start system q with the same monomial -- structure as the system p. -- ON ENTRY : -- p a polynomial system; -- i monomials with degree one in x_i will be ignored; -- b must equal Independent_Roots(p); -- sols interpolation vectors, Length_Of(sols) = b. -- ON RETURN : -- q system that has the given list sols as solutions. end Interpolating_Homotopies; SHAR_EOF fi # end of overwriting check if test -f 'm_homogeneous_bezout_numbers.adb' then echo shar: will not over-write existing file "'m_homogeneous_bezout_numbers.adb'" else cat << "SHAR_EOF" > 'm_homogeneous_bezout_numbers.adb' with Integer_Vectors,Integer_Matrices; use Integer_Vectors,Integer_Matrices; with Integer_Linear_System_Solvers; use Integer_Linear_System_Solvers; with Sets_of_Unknowns; use Sets_of_Unknowns; with Degrees_in_Sets_of_Unknowns; use Degrees_in_Sets_of_Unknowns; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; package body m_Homogeneous_Bezout_Numbers is -- UTILITIES : function Create ( p : Poly_Sys ) return Set is -- DESCRIPTION : -- Returns the set of the unknowns of the polynomial system p. s : Set := Create(p'length); begin for i in p'range loop Add(s,i); end loop; return s; end Create; function Cardinalities ( z : Partition ) return Vector is -- DESCRIPTION : -- Returns a vector which contains the cardinality of each set. res : Vector(z'range); begin for i in z'range loop res(i) := Extent_Of(z(i)); end loop; return res; end Cardinalities; -- TARGET ROUTINES : function Total_Degree ( p : Poly_Sys ) return natural is d : natural := 1; begin for i in p'range loop d := d*Degree(p(i)); end loop; return d; end Total_Degree; function Bezout_Number ( p : Poly_Sys; z : Partition ) return natural is k : constant vector := Cardinalities(z); d : constant matrix := Degree_Table(p,z); begin return Per(d,k); -- returns the permanent of the degree table end Bezout_Number; function Bezout_Number ( p : Poly_Sys; z : Partition; max : natural ) return natural is -- DESCRIPTION : -- Stops when the Bezout number becomes bigger than max. k : constant vector := Cardinalities(z); d : constant matrix := Degree_Table(p,z); begin return Per(d,k,max); -- returns the permanent of the degree table end Bezout_Number; function Bezout_Number ( p : Poly_Sys ) return natural is s : Set := Create(p); res : natural := Total_Degree(p); procedure Evaluate ( z : in Partition; cont : out boolean ) is b : constant natural := Bezout_Number(p,z,res); begin if b < res then res := b; end if; cont := true; end Evaluate; procedure Evaluate_Partitions is new Generate_Partitions(Evaluate); begin Evaluate_Partitions(s); Clear(s); return res; end Bezout_Number; function Bezout_Number ( max : natural; p : Poly_Sys ) return natural is s : Set := Create(p); res : natural := Total_Degree(p); cnt : natural := 0; procedure Evaluate ( z : in Partition; cont : out boolean ) is b : constant natural := Bezout_Number(p,z,res); begin if b < res then res := b; end if; cnt := cnt + 1; if cnt < max then cont := true; else cont := false; end if; end Evaluate; procedure Evaluate_Partitions is new Generate_Partitions(Evaluate); begin Evaluate_Partitions(s); Clear(s); return res; end Bezout_Number; function Bezout_Number ( p : Poly_Sys; min : natural ) return natural is s : Set := Create(p); res : natural := Total_Degree(p); procedure Evaluate ( z : in Partition; cont : out boolean ) is b : constant natural := Bezout_Number(p,z,res); begin if b < res then res := b; end if; if res > min then cont := true; else cont := false; end if; end Evaluate; procedure Evaluate_Partitions is new Generate_Partitions(Evaluate); begin Evaluate_Partitions(s); Clear(s); return res; end Bezout_Number; function Bezout_Number ( max : natural; p : Poly_Sys; min : natural ) return natural is s : Set := Create(p); res : natural := Total_Degree(p); cnt : natural := 0; procedure Evaluate ( z : in Partition; cont : out boolean ) is b : constant natural := Bezout_Number(p,z,res); begin if b < res then res := b; end if; cnt := cnt + 1; if cnt < max and then res > min then cont := true; else cont := false; end if; end Evaluate; procedure Evaluate_Partitions is new Generate_Partitions(Evaluate); begin Evaluate_Partitions(s); Clear(s); return res; end Bezout_Number; procedure Bezout_Number ( p : in Poly_Sys; b,m : out natural; z : in out Partition ) is s : Set := Create(p); tdg : constant natural := Total_Degree(p); res : natural := tdg; procedure Evaluate ( nz : in Partition; cont : out boolean ) is nb : constant natural := Bezout_Number(p,nz,res); begin if nb < res then res := nb; m := nz'length; Clear(z); z(nz'range) := Create(nz); end if; cont := true; end Evaluate; procedure Evaluate_Partitions is new Generate_Partitions(Evaluate); begin Evaluate_Partitions(s); if res = tdg then m := 1; z(1) := s; else Clear(s); end if; b := res; end Bezout_Number; procedure Bezout_Number ( max : in natural; p : in Poly_Sys; b,m : out natural; z : in out Partition ) is s : Set := Create(p); tdg : constant natural := Total_Degree(p); res : natural := tdg; cnt : natural := 0; procedure Evaluate ( nz : in Partition; cont : out boolean ) is nb : constant natural := Bezout_Number(p,nz,res); begin if nb < res then res := nb; m := nz'length; Clear(z); z(nz'range) := Create(nz); end if; cnt := cnt + 1; if cnt < max then cont := true; else cont := false; end if; end Evaluate; procedure Evaluate_Partitions is new Generate_Partitions(Evaluate); begin Evaluate_Partitions(s); if res = tdg then m := 1; z(1) := s; else Clear(s); end if; b := res; end Bezout_Number; procedure Bezout_Number ( p : in Poly_Sys; min : in natural; b,m : out natural; z : in out Partition ) is s : Set := Create(p); tdg : constant natural := Total_Degree(p); res : natural := tdg; procedure Evaluate ( nz : in Partition; cont : out boolean ) is nb : constant natural := Bezout_Number(p,nz,res); begin if nb < res then res := nb; m := nz'length; Clear(z); z(nz'range) := Create(nz); end if; if res > min then cont := true; else cont := false; end if; end Evaluate; procedure Evaluate_Partitions is new Generate_Partitions(Evaluate); begin Evaluate_Partitions(s); if res = tdg then m := 1; z(1) := s; else Clear(s); end if; b := res; end Bezout_Number; procedure Bezout_Number ( max : in natural; p : in Poly_Sys; min : in natural; b,m : out natural; z : in out Partition ) is s : Set := Create(p); tdg : constant natural := Total_Degree(p); res : natural := tdg; cnt : natural := 0; procedure Evaluate ( nz : in Partition; cont : out boolean ) is nb : constant natural := Bezout_Number(p,nz,res); begin if nb < res then res := nb; m := nz'length; Clear(z); z(nz'range) := Create(nz); end if; cnt := cnt + 1; if cnt < max and then res > min then cont := true; else cont := false; end if; end Evaluate; procedure Evaluate_Partitions is new Generate_Partitions(Evaluate); begin Evaluate_Partitions(s); if res = tdg then m := 1; z(1) := s; else Clear(s); end if; b := res; end Bezout_Number; function Evaluate ( z : partition; m : natural; p : Poly_Sys ) return natural is n : natural := p'length; d : constant matrix := Degree_Table(p,z); function Bezout_number ( n,m : natural; z: partition; d : matrix ) return natural is -- DESCRIPTION : the Bezout number is computed type boolean_array is array ( positive range <> ) of boolean; Ii,Iacc : boolean_array(1..n) := (1..n => false); b,b_mult : natural; procedure column ( j,start,number : in natural; Ii,Iacc : in out boolean_array ); -- DESCRIPTION : the computation of a term coming from a column -- of the degree table; procedure row ( j : in natural; Ii,Iacc : in out boolean_array ); -- DESCRIPTION : the computation of a row in the degree table procedure column ( j,start,number : in natural; Ii,Iacc : in out boolean_array ) is begin if number > (n - start + 1) then return; elsif number = 0 then row(j,Ii,Iacc); else for i in start..n loop if not Ii(i) then Ii(i) := true; Iacc(i) := true; column(j,i+1,number-1,Ii,Iacc); Ii(i) := false; Iacc(i) := false; end if; end loop; end if; end column; procedure row ( j : in natural; Ii,Iacc : in out boolean_array ) is temp : natural := 1; Iacc1 : boolean_array(1..n) := (1..n => false); begin for k in 1..n loop if Iacc(k) then temp := temp * d(k,j); end if; end loop; if (j /= m) and (temp /= 0) then b_mult := b_mult * temp; column(j+1,1,Extent_Of(z(j+1)),Ii,Iacc1); b_mult := b_mult / temp; elsif j = m then temp := temp * b_mult; b := b + temp; end if; end row; begin b := 0; b_mult := 1; column(1,1,Extent_Of(z(1)),Ii,Iacc); return b; end Bezout_number; begin return Bezout_number(n,m,z,d); end Evaluate; procedure PB ( p : in Poly_Sys; b,m : out natural; z : in out Partition ) is n : natural := p'length; wb,b_min : natural; wz,z_min : partition(1..n); wm,m_min : natural := 0; procedure pcopy ( p1,p2 : in out partition; p1n,p2n : in out natural ) is -- DESCRIPTION : the partition p1 is copied to p2 begin Clear(p2); p2 := Create(p1); p2n := p1n; end pcopy; begin b_min := Total_Degree(p); for i in 1..n loop for k in 1..wm loop Add(wz(k),i); wb := Evaluate(wz,wm,p); if (k = 1) or else (wb < b_min) then pcopy(wz,z_min,wm,m_min); b_min := wb; end if; Remove(wz(k),i); end loop; wm := wm + 1; wz(wm) := Create(n); Add(wz(wm),i); wb := Evaluate(wz,wm,p); if wb < b_min then pcopy(wz,z_min,wm,m_min); b_min := wb; end if; pcopy(z_min,wz,m_min,wm); end loop; b := b_min; m := m_min; pcopy(z_min,z,m_min,wm); Clear(wz); end PB; end m_Homogeneous_Bezout_Numbers; SHAR_EOF fi # end of overwriting check if test -f 'm_homogeneous_bezout_numbers.ads' then echo shar: will not over-write existing file "'m_homogeneous_bezout_numbers.ads'" else cat << "SHAR_EOF" > 'm_homogeneous_bezout_numbers.ads' with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Partitions_of_Sets_Of_Unknowns; use Partitions_of_Sets_of_Unknowns; package m_Homogeneous_Bezout_Numbers is -- DESCRIPTION : -- This package allows the computation of m-homogeneous Bezout numbers. -- It provides various enumeration strategies for computing a minimal -- m-homogeneous Bezout number. function Total_Degree ( p : Poly_Sys ) return natural; -- DESCRIPTION : -- Returns the 1-homogeneous Bezout number of the system. function Bezout_Number ( p : Poly_Sys; z : Partition ) return natural; function Bezout_Number ( p : Poly_Sys; z : Partition; max : natural ) return natural; -- DESCRIPTION : -- Returns the m-homogeneous Bezout number w.r.t. the given partition. -- When max is given as parameter, the computation stops when the -- result becomes larger than or equal to max. function Bezout_Number ( p : Poly_Sys ) return natural; function Bezout_Number ( max : natural; p : Poly_Sys ) return natural; function Bezout_Number ( p : Poly_Sys; min : natural ) return natural; function Bezout_Number ( max : natural; p : Poly_Sys; min : natural ) return natural; -- DESCRIPTION : -- A minimal m-homogeneous Bezout number of the polynomial system -- p is computed, by generating partitions of the sets of unknowns. -- ON ENTRY : -- p a polynomial system; -- max a maximum number of partition to be evaluated, -- if max=0, then the total degree is returned; -- min the procedure stops when the Bezout number becomes -- smaller than min. procedure Bezout_Number ( p : in Poly_Sys; b,m : out natural; z : in out Partition ); procedure Bezout_Number ( max : in natural; p : in Poly_Sys; b,m : out natural; z : in out Partition ); procedure Bezout_Number ( p : in Poly_Sys; min : in natural; b,m : out natural; z : in out Partition ); procedure Bezout_Number ( max : in natural; p : in Poly_Sys; min : in natural; b,m : out natural; z : in out Partition ); -- DESCRIPTION : -- A minimal m-homogeneous Bezout number of the polynomial system -- is computed. The partition with the calculated Bezout number -- is returned. -- ON ENTRY : -- p a polynomial system; -- max a maximum number of partition to be evaluated, -- if max=0, then the total degree is returned; -- min the procedure stops when the Bezout number becomes -- smaller than min. -- ON RETURN : -- b a minimal m-homogeneous Bezout number; -- m the number of sets in the partition z; -- z the partition with the computed Bezout number b. procedure PB ( p : in Poly_Sys; b,m : out natural; z : in out Partition ); -- DESCRIPTION : -- This is a fast heuristic for computing `the' Bezout number of p. -- It is fast because it does not generate all partitions, -- it is a heuristic because it does not always give then -- minimal partition. -- ON ENTRY : -- p a polynomial system. -- ON RETURN : -- b an m-homogeneous Bezout number; -- m the number of sets in the partition z; -- z the partition corresponding to b. end m_Homogeneous_Bezout_Numbers; SHAR_EOF fi # end of overwriting check if test -f 'm_homogeneous_start_systems.adb' then echo shar: will not over-write existing file "'m_homogeneous_start_systems.adb'" else cat << "SHAR_EOF" > 'm_homogeneous_start_systems.adb' with Integer_Matrices; with Complex_Numbers; use Complex_Numbers; with Random_Number_Generators; use Random_Number_Generators; with Complex_Vectors,Complex_Matrices; use Complex_Vectors,Complex_Matrices; with Sets_of_Unknowns; use Sets_of_Unknowns; with Degrees_in_Sets_of_Unknowns; use Degrees_in_Sets_of_Unknowns; with Random_Product_System; package body m_Homogeneous_Start_Systems is procedure Create_Random_Hyperplanes ( index,n,d : in natural; s : in Set ) is begin for i in 1..d loop declare h : Complex_Vectors.Vector(0..n); begin h(0) := Random1; for j in 1..Dimension(s) loop if Is_In(s,j) then h(j) := random1; else h(j) := CMPLX(0.0); end if; end loop; Random_Product_System.Add_Hyperplane(index,h); end; end loop; end Create_Random_Hyperplanes; procedure Create_Random_System ( n,m : natural; z : partition; d : Integer_Matrices.matrix ) is begin for j in 1..m loop for i in 1..n loop Create_Random_Hyperplanes(i,n,d(i,j),z(j)); end loop; end loop; end Create_Random_System; procedure m_Homogeneous_Start_System ( p : in Poly_Sys; z : in partition; q : out Poly_Sys; qsols : in out Solution_List ) is n : constant natural := p'length; m : constant natural := z'last; d : constant Integer_Matrices.matrix := Degree_Table(p,z); nl : natural := 0; begin Random_Product_System.Init(n); Create_Random_System(n,m,z,d); Random_Product_System.Solve(qsols,nl); q := Random_Product_System.Polynomial_System; end m_Homogeneous_Start_System; end m_Homogeneous_Start_Systems; SHAR_EOF fi # end of overwriting check if test -f 'm_homogeneous_start_systems.ads' then echo shar: will not over-write existing file "'m_homogeneous_start_systems.ads'" else cat << "SHAR_EOF" > 'm_homogeneous_start_systems.ads' with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Solutions; use Solutions; with Partitions_of_Sets_of_Unknowns; use Partitions_of_Sets_of_Unknowns; package m_Homogeneous_Start_Systems is -- DESCRIPTION : -- the purpose of this package is to provide a routine -- for the automatic construction of a m-homomogeneous -- start system, given a partition of the set of unknowns. procedure m_Homogeneous_Start_System ( p : in Poly_Sys; z : in Partition; q : out Poly_Sys; qsols : in out Solution_List ); -- ON ENTRY : -- p polynomial system; -- z partition of the set of unknowns. -- ON RETURN : -- q an m-homogeneous start system; -- qsols the solutions of the start system q. end m_Homogeneous_Start_Systems; SHAR_EOF fi # end of overwriting check if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' # Establishing the links : linkrc = ../../../Ada/Root_Counts/Product links: @-ln -s $(linkrc)/startsys.a total_degree_start_systems.ads @-ln -s $(linkrc)/startsysB.a total_degree_start_systems.adb @-ln -s $(linkrc)/sets.a sets_of_unknowns.ads @-ln -s $(linkrc)/setsB.a sets_of_unknowns.adb @-ln -s $(linkrc)/sets_io.a sets_of_unknowns_io.ads @-ln -s $(linkrc)/sets_ioB.a sets_of_unknowns_io.adb @-ln -s $(linkrc)/partsets.a partitions_of_sets_of_unknowns.ads @-ln -s $(linkrc)/partsetsB.a partitions_of_sets_of_unknowns.adb @-ln -s $(linkrc)/partsets_io.a partitions_of_sets_of_unknowns_io.ads @-ln -s $(linkrc)/partsets_ioB.a partitions_of_sets_of_unknowns_io.adb @-ln -s $(linkrc)/persets.a degree_sets_tables.ads @-ln -s $(linkrc)/persetsB.a degree_sets_tables.adb @-ln -s $(linkrc)/persets_io.a degree_sets_tables_io.ads @-ln -s $(linkrc)/persets_ioB.a degree_sets_tables_io.adb @-ln -s $(linkrc)/degsets.a degrees_in_sets_of_unknowns.ads @-ln -s $(linkrc)/degsetsB.a degrees_in_sets_of_unknowns.adb @-ln -s $(linkrc)/rps.a random_product_system.ads @-ln -s $(linkrc)/rpsB.a random_product_system.adb @-ln -s $(linkrc)/rps_io.a random_product_system_io.ads @-ln -s $(linkrc)/rps_ioB.a random_product_system_io.adb @-ln -s $(linkrc)/mhombez.a m_homogeneous_bezout_numbers.ads @-ln -s $(linkrc)/mhombezB.a m_homogeneous_bezout_numbers.adb @-ln -s $(linkrc)/mhomstart.a m_homogeneous_start_systems.ads @-ln -s $(linkrc)/mhomstartB.a m_homogeneous_start_systems.adb @-ln -s $(linkrc)/generate.a generate.ads @-ln -s $(linkrc)/generateB.a generate.adb @-ln -s $(linkrc)/intehom.a interpolating_homotopies.ads @-ln -s $(linkrc)/intehomB.a interpolating_homotopies.adb @-ln -s $(linkrc)/drivinho.a driver_for_interpolating_homotopies.ads @-ln -s $(linkrc)/drivinhoB.a driver_for_interpolating_homotopies.adb @-ln -s $(linkrc)/drivmhom.a drivers_for_m_homogenization.ads @-ln -s $(linkrc)/drivmhomB.a drivers_for_m_homogenization.adb @-ln -s $(linkrc)/ds.a degree_structure.ads @-ln -s $(linkrc)/dsB.a degree_structure.adb @-ln -s $(linkrc)/rpss.a random_product_start_systems.ads @-ln -s $(linkrc)/rpssB.a random_product_start_systems.adb @-ln -s $(linkrc)/drivmuho.a drivers_for_multi_homogenization.ads @-ln -s $(linkrc)/drivmuhoB.a drivers_for_multi_homogenization.adb @-ln -s $(linkrc)/ss.a set_structure.ads @-ln -s $(linkrc)/ssB.a set_structure.adb @-ln -s $(linkrc)/ss_io.a set_structure_io.ads @-ln -s $(linkrc)/ss_ioB.a set_structure_io.adb @-ln -s $(linkrc)/crpss.a construct_random_product_start_system.ads @-ln -s $(linkrc)/crpssB.a construct_random_product_start_system.adb @-ln -s $(linkrc)/drivss.a drivers_for_set_structures.ads @-ln -s $(linkrc)/drivssB.a drivers_for_set_structures.adb SHAR_EOF fi # end of overwriting check if test -f 'partitions_of_sets_of_unknowns.adb' then echo shar: will not over-write existing file "'partitions_of_sets_of_unknowns.adb'" else cat << "SHAR_EOF" > 'partitions_of_sets_of_unknowns.adb' with Sets_of_Unknowns; use Sets_of_Unknowns; package body Partitions_of_Sets_of_Unknowns is -- CREATORS : procedure Create ( p : in out Partition; n : in natural ) is begin for i in p'range loop p(i) := Create(n); end loop; end Create; function Create ( p : Partition ) return Partition is res : Partition(p'range); begin for i in p'range loop res(i) := Create(p(i)); end loop; return res; end Create; -- CONSTRUCTOR : procedure Generate_Partitions ( s : in Set ) is -- NOTE : -- The algorithm below is a rather unelegant construction. -- The VADS compiler for IBM RS/6000 had problems with the nested -- generics, so the generation of all subsets is repeated here in full. n : constant natural := Dimension(s); continue : boolean := true; p : Partition(1..n); cnt : natural := 0; procedure Generate ( v : in Set; cont : out boolean ); -- DESCRIPTION : -- Generation of all partitions makes use of a double recursive process. procedure Empty_Subsets ( w : in Set; cont : out boolean ) is rest : Set := Difference(w,p(cnt)); begin if Extent_of(rest) = 0 then Process(p(1..cnt),cont); else Generate(rest,cont); end if; Clear(rest); end Empty_Subsets; procedure All_Subsets ( w : in Set; cont : out boolean ) is sb : Set := Create(n); procedure Create_Partition ( sub : in Set; cont : out boolean ) is rest : Set; back : Set := Create(p(cnt)); -- back up copy needed to restore begin Union(p(cnt),sub); rest := Difference(w,p(cnt)); if Extent_Of(rest) = 0 then Process(p(1..cnt),cont); else Generate(rest,cont); end if; Clear(p(cnt)); p(cnt) := Create(back); Clear(rest); Clear(back); end Create_Partition; procedure Generate_Subset ( level,start : in natural ) is begin if level > 0 then for i in start..n loop if Is_In(w,i) then Add(sb,i); Create_Partition(sb,continue); if continue then Generate_Subset(level-1,i+1); Remove(sb,i); end if; end if; exit when not continue; end loop; cont := continue; end if; end Generate_Subset; begin Generate_Subset(n,1); Clear(sb); end All_Subsets; procedure Generate ( v : in Set; cont : out boolean ) is begin for i in 1..n loop if Is_In(v,i) then cnt := cnt + 1; p(cnt) := Create(n); Add(p(cnt),i); Empty_Subsets(v,continue); if continue then declare w : Set := Create(v); begin Remove(w,i); All_Subsets(w,cont); Clear(w); end; end if; Clear(p(cnt)); cnt := cnt - 1; cont := continue; end if; exit when Is_In(v,i); end loop; end Generate; begin Generate(s,continue); end Generate_Partitions; -- SELECTOR : function Number_of_Partitions ( n : natural ) return natural is sum : natural; function comb ( n,i : natural ) return natural is n1,n2 : natural := 1; begin if (i = 0) or (i = n) then return 1; else for k in 1..i loop n1 := n1 * (n - k + 1); n2 := n2 * k; end loop; return (n1/n2); end if; end comb; begin if (n = 0) or (n = 1) then return 1; else sum := 0; for k in 0..(n-1) loop sum := sum + comb(n-1,k) * Number_Of_Partitions(n-1-k); end loop; return sum; end if; end Number_of_Partitions; -- DESTRUCTOR : procedure Clear ( p : in out Partition ) is begin for i in p'range loop Clear(p(i)); end loop; end Clear; end Partitions_of_Sets_of_Unknowns; SHAR_EOF fi # end of overwriting check if test -f 'partitions_of_sets_of_unknowns.ads' then echo shar: will not over-write existing file "'partitions_of_sets_of_unknowns.ads'" else cat << "SHAR_EOF" > 'partitions_of_sets_of_unknowns.ads' with Sets_of_Unknowns; use Sets_of_Unknowns; package Partitions_of_Sets_of_Unknowns is -- DESCRIPTION : -- This package provides a data abstraction for enumerating all -- partitions of a given set of unknowns. type partition is array ( positive range <> ) of Set; -- CREATORS : procedure Create ( p : in out Partition; n : in natural ); -- DESCRIPTION : -- Creates all sets in the partition, to be ready to contain -- at most n unknowns. function Create ( p : Partition ) return Partition; -- DESCRIPTION : -- Returns a new partition which is an exact copy of the given one. -- CONSTRUCTORS : generic with procedure Process ( p : in Partition; continue : out boolean ); procedure Generate_Partitions ( s : in Set ); -- DESCRIPTION : -- Generates all partitions of a given set of unknowns. -- The procedure Process is invoked each time a new partition is -- generated. The generation can be stopped by setting -- continue to false. Otherwise, when continue is set to true, -- the generation continues. -- NOTE : -- While processing the partition, it might be needed to copy -- the resulting partition, as sharing occurs. -- SELECTOR : function Number_of_Partitions ( n : natural ) return natural; -- DESCRIPTION : -- Returns the number of partitions of a set of n unknowns. -- DESTRUCTOR : procedure Clear ( p : in out Partition ); -- DESCRIPTION : -- Deallocates the occupied memory. end Partitions_of_Sets_of_Unknowns; SHAR_EOF fi # end of overwriting check if test -f 'partitions_of_sets_of_unknowns_io.adb' then echo shar: will not over-write existing file "'partitions_of_sets_of_unknowns_io.adb'" else cat << "SHAR_EOF" > 'partitions_of_sets_of_unknowns_io.adb' with Sets_of_Unknowns_io; use Sets_of_Unknowns_io; package body Partitions_of_Sets_of_Unknowns_io is -- DESCRIPTION : -- This package provides i/o operations for partitions of -- set of unknowns. procedure get ( p : in out Partition ) is begin get(Standard_Input,p); end get; procedure get ( file : in file_type; p : in out Partition ) is begin for i in p'range loop get(file,p(i)); end loop; end get; procedure put ( p : in Partition ) is begin put(Standard_Output,p); end put; procedure put ( file : in file_type; p : in Partition ) is begin for i in p'range loop put(file,p(i)); end loop; end put; end Partitions_of_Sets_of_Unknowns_io; SHAR_EOF fi # end of overwriting check if test -f 'partitions_of_sets_of_unknowns_io.ads' then echo shar: will not over-write existing file "'partitions_of_sets_of_unknowns_io.ads'" else cat << "SHAR_EOF" > 'partitions_of_sets_of_unknowns_io.ads' with text_io; use text_io; with Partitions_of_Sets_of_Unknowns; use Partitions_of_Sets_of_Unknowns; package Partitions_of_Sets_of_Unknowns_io is -- DESCRIPTION : -- This package provides i/o operations for partitions of -- set of unknowns. procedure get ( p : in out Partition ); procedure get ( file : in file_type; p : in out Partition ); -- DESCRIPTION : -- A partition is read from standard input or from file. procedure put ( p : in Partition ); procedure put ( file : in file_type; p : in Partition ); -- DESCRIPTION : -- Writes a partition on standard output or on file. end Partitions_of_Sets_of_Unknowns_io; SHAR_EOF fi # end of overwriting check if test -f 'random_product_start_systems.adb' then echo shar: will not over-write existing file "'random_product_start_systems.adb'" else cat << "SHAR_EOF" > 'random_product_start_systems.adb' with Floating_Point_Numbers; use Floating_Point_Numbers; with Random_Number_Generators; use Random_Number_Generators; with Natural_Vectors; use Natural_Vectors; with Complex_Vectors,Complex_Numbers; use Complex_Numbers; with Integer_Vectors,Complex_Matrices; use Complex_Matrices; with Complex_Linear_System_Solvers; use Complex_Linear_System_Solvers; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; with Sets_of_Unknowns; use Sets_of_Unknowns; with Degrees_in_Sets_of_Unknowns; use Degrees_in_Sets_of_Unknowns; with Partitions_of_Sets_of_Unknowns; use Partitions_of_Sets_of_Unknowns; with Degree_Structure; use Degree_Structure; with Random_Product_System; package body Random_Product_Start_Systems is procedure Add_Hyperplanes ( i : in natural; p : in Poly; z : in partition; m : in natural; dg : in Natural_Vectors.Vector) is -- DESCRIPTION : -- This routine adds hyperplanes to the Random Product System -- according to the partition and the degrees of the polynomial -- ON ENTRY : -- i the number of the polynomial in the system; -- p the i-the polynomial of the system; -- z a partition of the set of unknowns of p; -- m the number of sets in z; -- dg the degrees of the polynomial in the sets of z, -- for j in 1..m : dg(j) = Degree(p,z(j)). n : natural := Number_Of_Unknowns(p); h : Complex_Vectors.Vector(0..n); begin for k in 1..m loop for l in 1..dg(k) loop h(0) := random1; for j in 1..n loop if Is_In(z(k),j) then h(j) := Random1; else h(j) := CMPLX(0.0); end if; end loop; Random_Product_System.Add_Hyperplane(i,h); end loop; end loop; end Add_Hyperplanes; procedure Construct_Random_Product_System ( p : in Poly_Sys ) is -- DESCRIPTION : -- This procedure constructs a random product system by -- finding a good partition for each equation of the system p. n : natural := p'length; m : natural; begin if Degree_Structure.Empty then Degree_Structure.Create(p); end if; for i in p'range loop m := Degree_Structure.Get(i); declare z : partition(1..m); dg : Natural_Vectors.Vector(1..m); begin Degree_Structure.Get(i,z,dg); Add_Hyperplanes(i,p(i),z,m,dg); Clear(z); end; end loop; end Construct_Random_Product_System; procedure RPQ ( p : in Poly_Sys; q : out Poly_Sys; sols : in out Solution_List; nl : out natural) is n : natural := p'length; begin Random_Product_System.Init(n); Construct_Random_Product_System(p); q := Random_Product_System.Polynomial_System; Random_Product_System.Solve(sols,nl); Degree_Structure.Clear; Random_Product_System.Clear; end RPQ; procedure Solve ( i,n : in natural; sols : in out Solution_List; a : in out Matrix; b : in out Complex_Vectors.Vector; acc : in out partition ) is begin if i > n then declare aa : Matrix(a'range(1),a'range(2)); bb : Complex_Vectors.Vector(b'range); rcond : double_float; ipvt : Integer_Vectors.Vector(b'range); begin for k in a'range(1) loop for l in a'range(2) loop aa(k,l) := a(k,l); end loop; bb(k) := b(k); end loop; lufco(aa,n,ipvt,rcond); -- put("rcond : "); put(rcond); new_line; if rcond + 1.0 /= 1.0 then lusolve(aa,n,ipvt,bb); declare s : Solution(n); begin s.t := CMPLX(0.0); s.m := 1; s.v := bb; Add(sols,s); end; end if; exception when numeric_error => return; end; else declare h : Complex_Vectors.Vector(0..n); count : natural := 0; z : partition(1..n); m : natural; d : Natural_Vectors.Vector(1..n); begin Degree_Structure.Get(i,z,d); m := Degree_Structure.Get(i); for j1 in 1..m loop if Degree_Structure.Admissible(acc,i-1,z(j1)) then acc(i) := Create(z(j1)); for j2 in 1..d(j1) loop count := count + 1; h := Random_Product_System.Get_Hyperplane(i,count); b(i) := -h(0); for k in 1..n loop a(i,k) := h(k); end loop; Solve(i+1,n,sols,a,b,acc); end loop; Clear(acc(i)); else count := count + d(j1); end if; end loop; Clear(z); end; end if; end Solve; procedure Solve_Start_System ( n : in natural; sols : in out Solution_List ) is m : Matrix(1..n,1..n); v : Complex_Vectors.Vector(1..n); acc : Partition(1..n); begin for i in 1..n loop for j in 1..n loop m(i,j) := CMPLX(0.0); end loop; v(i) := CMPLX(0.0); end loop; Solve(1,n,sols,m,v,acc); end Solve_Start_System; procedure GBQ ( p : in Poly_Sys; q : out Poly_Sys; sols : in out Solution_List ) is n : natural := p'length; begin Random_Product_System.Init(n); Construct_Random_Product_System(p); q := Random_Product_System.Polynomial_System; Solve_Start_System(n,sols); Degree_Structure.Clear; Random_Product_System.Clear; end GBQ; end Random_Product_Start_Systems; SHAR_EOF fi # end of overwriting check if test -f 'random_product_start_systems.ads' then echo shar: will not over-write existing file "'random_product_start_systems.ads'" else cat << "SHAR_EOF" > 'random_product_start_systems.ads' with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Solutions; use Solutions; package Random_Product_Start_Systems is -- DESCRIPTION : -- This package contains a routine for the construction -- of random product start systems. procedure RPQ ( p : in Poly_Sys; q : out Poly_Sys; sols : in out Solution_List; nl : out natural ); -- DESCRIPTION : -- This routine constructs a start system q with the same structure -- as the system p. -- Solving q happens by factoring all possible linear systems. -- ON ENTRY : -- p a polynomial system. -- ON RETURN : -- q a suitable start system for p; -- sols the solutions of the start system; -- nl the number of matrices that are factored. procedure GBQ ( p : in Poly_Sys; q : out Poly_Sys; sols : in out Solution_List ); -- DESCRIPTION : -- This routine constructs a start system q with the same structure -- as the system p. -- Solving q happens by factoring only these linear systems that -- correspond to admissible products. -- ON ENTRY : -- p a polynomial system. -- ON RETURN : -- q a suitable start system for p; -- sols the solutions of the start system. end Random_Product_Start_Systems; SHAR_EOF fi # end of overwriting check if test -f 'random_product_system.adb' then echo shar: will not over-write existing file "'random_product_system.adb'" else cat << "SHAR_EOF" > 'random_product_system.adb' with Lists; with unchecked_deallocation; with Floating_Point_Numbers; use Floating_Point_Numbers; with Natural_Vectors; with Complex_Vectors,Complex_Numbers; use Complex_Vectors,Complex_Numbers; with Complex_Matrices,Integer_Vectors; use Complex_Matrices; with Complex_Linear_System_Solvers; use Complex_Linear_System_Solvers; package body Random_Product_System is -- DATA STRUCTURES : package List_of_Vectors is new Lists(Link_to_Vector); type Equation_List is new List_of_Vectors.List; type Equation is record first,last : Equation_List; end record; type Equations is array(positive range <>) of Equation; type Link_To_Equations is access Equations; procedure free is new unchecked_deallocation (Equations,Link_To_Equations); -- INTERNAL DATA : rps : Link_To_Equations; Bad_Condition : constant double_float := 10.0**(-12); -- OPERATIONS : procedure Init ( n : in natural ) is begin rps := new Equations(1..n); end Init; procedure Clear ( eql : in out Equation_List ) is temp : Equation_List := eql; lv : Link_To_Vector; begin while not Is_Null(temp) loop lv := Head_Of(temp); Clear(lv); temp := Tail_of(temp); end loop; List_Of_Vectors.Clear(List_Of_Vectors.List(eql)); end Clear; procedure Clear ( eq : in out Equation ) is begin Clear(eq.first); -- eq.last is just a pointer to the last element of eq.first; -- if eq.first disappears, then also eq.last does end Clear; procedure Clear ( eqs : in out Equations ) is begin for i in eqs'range loop Clear(eqs(i)); end loop; end Clear; procedure Clear is begin if rps /= null then for i in rps'range loop Clear(rps(i)); end loop; free(rps); end if; end Clear; procedure Add_Hyperplane ( i : in natural; h : in Vector ) is eqi : Equation renames rps(i); lh : Link_To_Vector := new Vector'(h); begin if Is_Null(eqi.first) then Construct(lh,eqi.first); eqi.last := eqi.first; else declare temp : Equation_List; begin Construct(lh,temp); Swap_Tail(eqi.last,temp); eqi.last := Tail_Of(eqi.last); end; end if; end Add_Hyperplane; function Dimension return natural is begin if rps = null then return 0; else return rps'last; end if; end Dimension; function Number_of_Hyperplanes ( i : natural ) return natural is begin if rps = null then return 0; else return Length_Of(rps(i).first); end if; end Number_Of_Hyperplanes; function Get_Hyperplane ( i,j : in natural ) return Link_to_Vector is nulvec : Link_to_Vector := null; begin if rps = null then return nulvec; else declare eqi : Equation_List := rps(i).first; count : natural := 1; begin while not Is_Null(eqi) loop if count = j then return Head_Of(eqi); else count := count + 1; eqi := Tail_Of(eqi); end if; end loop; end; return nulvec; end if; end Get_Hyperplane; function Get_Hyperplane ( i,j : in natural ) return Vector is lres : Link_to_Vector := Get_Hyperplane(i,j); nulvec : Vector(0..0); begin if lres = null then return nulvec; else return lres.all; end if; end Get_Hyperplane; procedure Change_Hyperplane ( i,j : in natural; h : in Vector ) is begin if rps = null then return; else declare eqi : Equation_List := rps(i).first; lv : Link_To_Vector; count : natural := 1; begin while not Is_Null(eqi) loop if count = j then lv := Head_Of(eqi); for k in h'range loop lv(k) := h(k); end loop; return; else count := count + 1; eqi := Tail_Of(eqi); end if; end loop; end; end if; end Change_Hyperplane; procedure Solve ( i,n : in natural; sols,sols_last : in out Solution_List; a : in out Matrix; b : in out Vector; nb : in out natural ) is begin if i > n then declare aa : Matrix(a'range(1),a'range(2)); bb : Vector(b'range); rcond : double_float; ipvt : Integer_Vectors.Vector(b'range); begin for k in a'range(1) loop for l in a'range(2) loop aa(k,l) := a(k,l); end loop; bb(k) := b(k); end loop; lufco(aa,n,ipvt,rcond); nb := nb + 1; if abs(rcond) > Bad_Condition then lusolve(aa,n,ipvt,bb); declare s : Solution(n); begin s.t := CMPLX(0.0); s.m := 1; s.v := bb; s.err := 0.0; s.rco := rcond; s.res := 0.0; Append(sols,sols_last,s); end; end if; exception when numeric_error => return; end; else declare eqi : Equation_List := rps(i).first; h : Vector(0..n); count : natural := 0; begin while not Is_Null(eqi) loop count := count + 1; h := Head_Of(eqi).all; b(i) := -h(0); for j in 1..n loop a(i,j) := h(j); end loop; Solve(i+1,n,sols,sols_last,a,b,nb); eqi := Tail_Of(eqi); end loop; end; end if; end Solve; procedure Solve ( sols : in out Solution_List; nl : out natural ) is n : natural := rps'last; m : Matrix(1..n,1..n); v : Vector(1..n); num : natural := 0; last : Solution_List; begin for i in 1..n loop for j in 1..n loop m(i,j) := CMPLX(0.0); end loop; v(i) := CMPLX(0.0); end loop; Solve(1,n,sols,last,m,v,num); nl := num; end Solve; procedure Solve ( sols : in out Solution_List; nl : out natural; l : in List ) is n : natural := rps'last; m : Matrix(1..n,1..n); v : Vector(1..n); num : natural := 0; temp : List := l; pos : Integer_Vectors.Vector(1..n); stop : boolean := false; last : Solution_List; procedure PSolve ( i,n : in natural; sols,sols_last : in out Solution_List; a : in out Matrix; b : in out Vector; nb : in out natural ) is begin if i > n then declare aa : Matrix(a'range(1),a'range(2)); bb : Vector(b'range); rcond : double_float; ipvt : Integer_Vectors.Vector(b'range); begin for k in a'range(1) loop for l in a'range(2) loop aa(k,l) := a(k,l); end loop; bb(k) := b(k); end loop; lufco(aa,n,ipvt,rcond); nb := nb + 1; if abs(rcond) > Bad_Condition then lusolve(aa,n,ipvt,bb); declare s : Solution(n); begin s.t := CMPLX(0.0); s.m := 1; s.v := bb; s.err := 0.0; s.rco := rcond; s.res := 0.0; Append(sols,sols_last,s); end; end if; if Is_Null(temp) then stop := true; else pos := Head_Of(temp).all; temp := Tail_Of(temp); end if; exception when numeric_error => return; end; else declare eqi : Equation_List := rps(i).first; h : Vector(0..n); count : natural := 0; begin while not Is_Null(eqi) loop count := count + 1; if count = pos(i) then h := Head_Of(eqi).all; b(i) := -h(0); for j in 1..n loop a(i,j) := h(j); end loop; --put("eq"); put(i,1); put(count,1); put(" "); PSolve(i+1,n,sols,sols_last,a,b,nb); end if; exit when stop; eqi := Tail_Of(eqi); end loop; end; end if; end PSolve; begin if not Is_Null(temp) then pos := Head_Of(temp).all; temp := Tail_Of(temp); for i in 1..n loop for j in 1..n loop m(i,j) := CMPLX(0.0); end loop; v(i) := CMPLX(0.0); end loop; PSolve(1,n,sols,last,m,v,num); nl := num; end if; end Solve; function Polynomial ( h : Vector ) return Poly is res : Poly; t : Term; n : natural := h'last; begin for j in 0..n loop if h(j) /= CMPLX(0.0) then t.dg := new Natural_Vectors.Vector'(1..n => 0); t.cf := h(j); if j /= 0 then t.dg(j) := 1; end if; Plus_Term(res,t); Natural_Vectors.Clear(Natural_Vectors.Link_to_Vector(t.dg)); end if; end loop; return res; end Polynomial; function Create ( i : in natural ) return Poly is eql : Equation_List := rps(i).first; hyp,res : Poly := Null_Poly; begin while not Is_Null(eql) loop hyp := Polynomial(Head_Of(eql).all); if res = Null_Poly then Copy(hyp,res); else Mult_Poly(res,hyp); end if; Clear(hyp); eql := Tail_Of(eql); end loop; return res; end Create; function Polynomial_System return Poly_Sys is res : Poly_Sys(rps'range); begin for i in rps'range loop res(i) := Create(i); end loop; return res; end Polynomial_System; end Random_Product_System; SHAR_EOF fi # end of overwriting check if test -f 'random_product_system.ads' then echo shar: will not over-write existing file "'random_product_system.ads'" else cat << "SHAR_EOF" > 'random_product_system.ads' with Complex_Vectors,Solutions; use Complex_Vectors,Solutions; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; package Random_Product_System is -- DESCRIPTION : -- This package enables the construction and the solution -- of a polynomial system of which each polynomial is -- represented as a product of hyperplanes. -- CONSTRUCTORS : procedure Init ( n : in natural ); -- DESCRIPTION : -- The internal data for this package are initialised -- with n, this is the number of equations of the system -- NOTE : -- This operation must be the first one executed when -- using this package. procedure Add_Hyperplane ( i : in natural; h : in Vector ); -- DESCRIPTION : -- The hyperplane h is added to the i-the equation of the -- random product system -- REQUIRED : __n_ -- i <= n \ -- h : Vector(0..n) representing h(0) + > h(j) x -- /___ j -- j=1 function Dimension return natural; -- DESCRIPTION : -- returns the number of equations in the product system. function Number_of_Hyperplanes (i : natural) return natural; -- DESCRIPTION : -- returns the number of added hyperplanes for the i-th equation function Get_Hyperplane ( i,j : in natural ) return Vector; function Get_Hyperplane ( i,j : in natural ) return Link_to_Vector; -- DESCRIPTION : -- returns the j-th hyperplane for the i-th equation procedure Change_Hyperplane ( i,j : in natural; h : in Vector ); -- DESCRIPTION : -- the (i,j)-th hyperplane will be changed into h procedure Solve ( sols : in out Solution_List; nl : out natural ); -- DESCRIPTION : -- The random product system is solved and the solutions are -- put in the list sols. -- nl is the number of matrices that are factored. -- NOTE : -- All possible linear systems are factorized using Gaussian -- elimination, together with the estimation of the condition -- of the matrices. -- Systems with a bad condition are not solved. procedure Solve ( sols : in out Solution_List; nl : out natural; l : in List ); -- DESCRIPTION : -- Cf. Solve, but only those linear systems are factorized, -- for which the linear equations are as indicated in the list -- of positions l. function Polynomial ( h : Vector ) return Poly; -- DESCRIPTION : -- returns the linear polynomial defined by the coefficients in h. function Polynomial_System return Poly_Sys; -- DESCRIPTION : -- A polynomial system is constructed by multiplying all -- the hyperplanes from the equations of the random product system. -- DESTRUCTOR : procedure Clear; -- DESCRIPTION : -- This procedure frees all memory space used by the random -- product system. end Random_Product_System; SHAR_EOF fi # end of overwriting check if test -f 'random_product_system_io.adb' then echo shar: will not over-write existing file "'random_product_system_io.adb'" else cat << "SHAR_EOF" > 'random_product_system_io.adb' with integer_io; with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Numbers,Complex_Vectors; use Complex_Numbers,Complex_Vectors; with Natural_Vectors; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; with Symbol_Table,Symbol_Table_io; with Complex_Multivariate_Polynomials_io; use Complex_Multivariate_Polynomials_io; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Random_Product_System; package body Random_Product_System_io is use Floating_Point_Numbers.double_float_io; procedure get ( n : out natural ) is begin Random_Product_System_io.get(Standard_Input,n); end get; procedure get ( file : in file_type; n : out natural ) is nn : natural; begin integer_io.get(file,nn); n := nn; Random_Product_System.Init(nn); declare h : Vector(0..nn); pp : Poly; d : degrees := new Natural_Vectors.Vector'(1..nn => 0); stop : boolean; begin get(file,nn,pp); Clear(pp); for i in 1..nn loop stop := false; while not stop loop get(file,nn,pp); stop := (pp = Null_Poly); exit when stop; h(0) := Coeff(pp,d); for j in 1..nn loop d(j) := 1; h(j) := Coeff(pp,d); d(j) := 0; end loop; Random_Product_System.Add_Hyperplane(i,h); end loop; end loop; end; end get; procedure put ( n,fore,after,exp : in natural ) is begin Random_Product_System_io.put(Standard_Output,n,fore,after,exp); end put; procedure put ( file : in file_type; n,fore,after,exp : in natural ) is h : Vector(0..n); procedure Write_Number ( file : in file_type; x : in double_complex ) is begin if IMAG_PART(x) + 1.0 = 1.0 then put(file,REAL_PART(x),fore,after,exp); else put(file,'('); put(file,REAL_PART(x),fore,after,exp); put(file,'+'); put(file,IMAG_PART(x),fore,after,exp); put(file,')'); end if; end Write_Number; begin for i in 1..n loop put(file,"The hyperplanes for the "); integer_io.put(file,i,1); put_line(file,"th equation :"); for j in 1..Random_Product_System.Number_Of_Hyperplanes(i) loop h := Random_Product_System.Get_Hyperplane(i,j); put(file,' '); for k in 1..n loop Write_Number(file,h(k)); put(file,'*'); Symbol_Table_io.put(file,Symbol_Table.Get(k)); put(file," + "); end loop; Write_Number(file,h(0)); new_line(file); end loop; end loop; end put; end Random_Product_System_io; SHAR_EOF fi # end of overwriting check if test -f 'random_product_system_io.ads' then echo shar: will not over-write existing file "'random_product_system_io.ads'" else cat << "SHAR_EOF" > 'random_product_system_io.ads' with text_io; use text_io; package Random_Product_System_io is -- DESCRIPTION : -- This package contains some routines for input and output -- of random product systems. procedure get ( n : out natural ); procedure get ( file : in file_type; n : out natural ); -- DESCRIPTION : -- This procedure reads from the standard input or from file the -- information necessary to create a random product structure. -- ON ENTRY (standard input or file) : -- n dimension of the problem -- polynomial to initialize the Symbol_Table -- the random product system: -- each equation consist of linear polynomials, -- the null polynomial ends the list for each equation. -- ON RETURN : -- n dimension of the problem -- the internal data of the package RPS are filled in. procedure put ( n,fore,after,exp : in natural ); procedure put ( file : in file_type; n,fore,after,exp : in natural ); -- DESCRIPTION : -- This procedure writes the hyperplanes on the standard input or on file. -- ON ENTRY : -- n dimension of the problem; -- fore number of digits for the `.' while printing floats; -- after number of digits after the `.'; -- exp number of digits of the exponent. end Random_Product_System_io; SHAR_EOF fi # end of overwriting check if test -f 'set_structure.adb' then echo shar: will not over-write existing file "'set_structure.adb'" else cat << "SHAR_EOF" > 'set_structure.adb' with unchecked_deallocation; with text_io,integer_io; use text_io,integer_io; with generate; with Symbol_Table,Symbol_Table_io; use Symbol_Table; with Integer_Vectors; package body Set_Structure is -- DATASTRUCTURES : type set is array (natural range <>) of boolean; type link_to_set is access set; procedure free is new unchecked_deallocation(set,link_to_set); type set_equations is array (natural range <>) of link_to_set; type link_to_set_equations is access set_equations; procedure free is new unchecked_deallocation(set_equations, link_to_set_equations); type set_system is array (natural range <>) of link_to_set_equations; type link_to_set_system is access set_system; procedure free is new unchecked_deallocation(set_system, link_to_set_system); -- INTERNAL DATA : n : natural := 0; -- the number of unknowns and equations ls : link_to_set_system := null; -- CONSTRUCTORS : procedure Init ( ns : in Natural_Vectors.Vector ) is begin n := ns'length; ls := new set_system(1..n); for i in ls'range loop ls(i) := new set_equations(1..ns(i)); for j in ls(i)'range loop ls(i).all(j) := new set'(1..n => false); end loop; end loop; end Init; procedure Add ( i,j,k : in natural ) is s : set renames ls(i).all(j).all; begin s(k) := true; end Add; procedure Remove (i,j,k : in natural) is s : set renames ls(i).all(j).all; begin s(k) := false; end Remove; -- SELECTORS : function Empty return boolean is begin return (ls = null); end Empty; function Dimension return natural is begin return n; end Dimension; function Number_of_Sets (i : natural) return natural is begin return ls(i)'last; end Number_of_Sets; function Is_In (i,j,k : natural) return boolean is s : set renames ls(i).all(j).all; begin return s(k); end Is_In; -- COMPUTING THE UPPER BOUND : function Extent_Of (s : in set) return natural is -- DESCRIPTION : return the number of elements in s sum : natural := 0; begin for i in s'range loop if s(i) then sum := sum + 1; end if; end loop; return sum; end Extent_Of; procedure Union (s : in set; u : in out set) is -- DESCRIPTION : u = u U s begin for i in s'range loop if s(i) then u(i) := true; end if; end loop; end Union; function acceptable (lset_eq : link_to_set_equations; k,n : natural; lset : link_to_set) return boolean is type arr is array (integer range <>) of boolean; accep : boolean := true; procedure check (a : in arr; continue : out boolean) is u : set(lset'range); begin u := lset.all; for i in a'range loop if a(i) then Union(lset_eq(i).all,u); end if; end loop; accep := ( Extent_Of(u) >= k+1 ); continue := accep; u := (u'range => false); end check; procedure gen is new generate(arr,check); begin gen(k,1,n); -- generates all possible unions of k sets -- out of the range 1..n return accep; end acceptable; function acceptable (lset_eq : link_to_set_equations; n : natural; lset : link_to_set) return boolean is -- DESCRIPTION : -- if acceptable(lset_eq,n) -- then verify if acceptable(lset_eq + lset,n+1) begin for k in 1..n loop if not acceptable(lset_eq,k,n,lset) then return false; end if; end loop; return true; end acceptable; procedure Compute (i,n,sum : in natural; res : in out natural; lset_eq : in out link_to_set_equations) is begin if i > n then res := res + sum; else -- Pick out a set and check if it is allowed : for j in ls(i)'range loop if acceptable(lset_eq,i-1,ls(i).all(j)) then lset_eq(i) := ls(i).all(j); Compute(i+1,n,sum,res,lset_eq); end if; end loop; end if; end Compute; function B return natural is res : natural := 0; lset_eq : link_to_set_equations := new set_equations(1..n); begin for i in lset_eq'range loop lset_eq(i) := new set'(1..n => false); end loop; Compute(1,n,1,res,lset_eq); return res; end B; procedure Compute (i,n,sum : in natural; res : in out natural; lset_eq : in out link_to_set_equations; pos : in out Integer_Vectors.Vector; first,last : in out List) is begin if i > n then res := res + sum; Append(first,last,pos); else -- Pick out a set and check if it is allowed : for j in ls(i)'range loop pos(i) := j; if acceptable(lset_eq,i-1,ls(i).all(j)) then lset_eq(i) := ls(i).all(j); Compute(i+1,n,sum,res,lset_eq,pos,first,last); end if; end loop; end if; end Compute; procedure B (bn : out natural; l : in out List) is res : natural := 0; lset_eq : link_to_set_equations := new set_equations(1..n); pos : Integer_Vectors.Vector(1..n) := (1..n => 1); last : List; begin for i in lset_eq'range loop lset_eq(i) := new set'(1..n => false); end loop; Compute(1,n,1,res,lset_eq,pos,l,last); bn := res; end B; -- DESTRUCTOR : procedure Clear is begin for i in ls'range loop for j in ls(i)'range loop free(ls(i).all(j)); end loop; free(ls(i)); end loop; free(ls); n := 0; ls := null; end Clear; end Set_Structure; SHAR_EOF fi # end of overwriting check if test -f 'set_structure.ads' then echo shar: will not over-write existing file "'set_structure.ads'" else cat << "SHAR_EOF" > 'set_structure.ads' with text_io,Natural_Vectors; use text_io; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; package Set_Structure is -- DESCRIPTION : -- This package manages the set structure of a polynomial system. -- CONSTRUCTORS : procedure Init ( ns : in Natural_Vectors.Vector ); -- DESCRIPTION : -- Initialization of the datastructures, must be the first operation. -- ns(i) contains the number of sets for the ith equation. procedure Add ( i,j,k : in natural ); -- DESCRIPTION : -- To the jth set of the ith equation, the kth unknown will be added. procedure Remove ( i,j,k : in natural ); -- DESCRIPTION : -- The kthe unknown will be removed from the jth set -- of the ith equation. -- SELECTORS : function Empty return boolean; -- DESCRIPTION : -- Returns true if the set structure is empty. function Dimension return natural; -- DESCRIPTION : -- Returns the dimension, that is the number of equations. function Number_of_Sets ( i : natural ) return natural; -- DESCRIPTION : -- Returns the number of sets for the i-th equation. function Is_In ( i,j,k : natural ) return boolean; -- DESCRIPTION : -- Returns true if the k-th unknown belongs to the j-th set of the -- i-th equation. -- COMPUTING THE UPPER BOUND : function B return natural; -- REQUIRED : -- There exists a set structure for a polynomial system -- DESCRIPTION : -- Returns an upper bound to the number of solutions to -- a given polynomial system. procedure B ( bn : out natural; l : in out List ); -- REQUIRED : -- There exists a set structure for a polynomial system -- DESCRIPTION : -- Returns the upper bound bn, together with the positions -- corresponding to the acceptable classes. -- DESTRUCTOR : procedure Clear; -- DESCRIPTION : -- All used memory will be freed end Set_Structure; SHAR_EOF fi # end of overwriting check if test -f 'set_structure_io.adb' then echo shar: will not over-write existing file "'set_structure_io.adb'" else cat << "SHAR_EOF" > 'set_structure_io.adb' with Symbol_Table,Symbol_Table_io; use Symbol_Table; with Set_Structure; package body Set_Structure_io is procedure get is begin Set_Structure_io.get(Standard_Input); end get; procedure get ( file : in file_type ) is ch : character; sb : symbol; begin for i in 1..Set_Structure.Dimension loop -- Read sets for ith equation : for j in 1..Set_Structure.Number_of_Sets(i) loop -- Read the jth set of the ith equation : get(file,ch); while (ch = ' ') loop get(file,ch); end loop; if ch = '{' then loop get(file,ch); while (ch = ' ') loop get(file,ch); end loop; exit when (ch = '}'); sb := (sb'range => ' '); Symbol_Table_io.get(file,ch,sb,'}'); Set_Structure.Add(i,j,Symbol_Table.Get(sb)); exit when (ch = '}'); end loop; end if; end loop; end loop; end get; procedure put is begin Set_Structure_io.put(Standard_Output); end put; procedure put ( file : in file_type ) is n : natural := Set_Structure.Dimension; sb : Symbol; procedure Write_set ( file : in file_type; i,j : in natural ) is begin put(file,'{'); for k in 1..n loop if Set_Structure.Is_In(i,j,k) then --Symbol_Table_io.put(file,Symbol_Table.Get(i)); sb := Symbol_Table.Get(k); Symbol_Table_io.put(file,sb); put(file,' '); end if; end loop; put(file,'}'); end Write_set; begin for i in 1..n loop put(file," "); for j in 1..Set_Structure.Number_of_Sets(i) loop Write_set(file,i,j); end loop; new_line(file); end loop; end put; end Set_Structure_io; SHAR_EOF fi # end of overwriting check if test -f 'set_structure_io.ads' then echo shar: will not over-write existing file "'set_structure_io.ads'" else cat << "SHAR_EOF" > 'set_structure_io.ads' with text_io; use text_io; package Set_Structure_io is -- DESCRIPTION : -- This package contains i/o operations of a set structure. procedure get; procedure get ( file : in file_type ); -- DESCRIPTION : -- The set structure will be read from standard input or from file. -- Example: { x1 } { x1 x2 } { x2 } -- --> separation of unknowns and delimiters by spaces. -- REQUIRED : -- The Symbol_Table must be initialized. procedure put; procedure put ( file : in file_type ); -- DESCRIPTION : -- The set structure is written on standard output or on file. end Set_Structure_io; SHAR_EOF fi # end of overwriting check if test -f 'sets_of_unknowns.adb' then echo shar: will not over-write existing file "'sets_of_unknowns.adb'" else cat << "SHAR_EOF" > 'sets_of_unknowns.adb' with unchecked_deallocation; package body Sets_of_Unknowns is -- REPRESENTATION OF A SET : type Set_Rep is array (positive range <> ) of boolean; procedure free is new unchecked_deallocation(Set_Rep,Set); -- CREATORS : function Create ( n : natural ) return Set is s : Set := new Set_Rep'(1..n => false); begin return s; end Create; function Create ( s : Set ) return Set is s1 : Set; begin if s = null then s1 := s; else s1 := new Set_Rep'(s.all); end if; return s1; end Create; -- CONSTRUCTORS : procedure Add ( s : in out Set; i : in natural ) is begin s(i) := true; end Add; procedure Union ( s1 : in out Set; s2 : in Set ) is begin for i in 1..Dimension(s2) loop if Is_In(s2,i) then Add(s1,i); end if; end loop; end Union; function Union ( s1,s2 : Set ) return Set is s : Set := Create(s1); begin Union(s,s2); return s; end Union; procedure Remove ( s : in out Set; i : in natural ) is begin s(i) := false; end Remove; procedure Difference ( s1 : in out Set; s2 : in Set ) is begin for i in 1..Dimension(s2) loop if Is_In(s2,i) then Remove(s1,i); end if; end loop; end Difference; function Difference ( s1,s2 : Set ) return Set is s : Set := Create(s1); begin Difference(s,s2); return s; end Difference; procedure Intersection ( s1 : in out Set; s2 : in Set ) is begin for i in 1..Dimension(s1) loop if Is_In(s1,i) and then not Is_In(s2,i) then Remove(s1,i); end if; end loop; end Intersection; function Intersection ( s1,s2 : Set ) return Set is s : Set := Create(s1); begin Intersection(s,s2); return s; end Intersection; -- SELECTORS : function Dimension ( s : Set ) return natural is begin if s = null then return 0; else return s'last; end if; end Dimension; function Extent_Of ( s : Set ) return natural is cnt : natural := 0; begin for i in 1..Dimension(s) loop if Is_In(s,i) then cnt := cnt + 1; end if; end loop; return cnt; end Extent_Of; function Is_In ( s : Set; i : natural ) return boolean is begin return s(i); end Is_In; function Is_Subset ( s1,s2 : Set ) return boolean is begin for i in 1..Dimension(s1) loop if Is_In(s1,i) and then not Is_In(s2,i) then return false; end if; end loop; return true; end Is_Subset; function Is_Equal ( s1,s2 : Set ) return boolean is begin return (Is_Subset(s1,s2) and then Is_Subset(s2,s1)); end Is_Equal; procedure Generate_Subsets ( s : in Set; k : in positive ) is n : constant natural := Dimension(s); sub : Set := Create(n); cont : boolean; procedure Generate ( level,start : in natural ) is begin if level = 0 then Process(sub,cont); else for i in start..n-level+1 loop if Is_In(s,i) then Add(sub,i); Generate(level-1,i+1); Remove(sub,i); end if; exit when not cont; end loop; end if; end Generate; begin Generate(k,1); Clear(sub); end Generate_Subsets; procedure Generate_All_Subsets ( s : in Set ) is n : constant natural := Dimension(s); sub : Set := Create(n); cont : boolean; procedure Generate ( level,start : in natural ) is begin if level > 0 then for i in start..n loop if Is_In(s,i) then Add(sub,i); Process(sub,cont); if cont then Generate(level-1,i+1); Remove(sub,i); end if; end if; exit when not cont; end loop; end if; end Generate; begin Generate(n,1); Clear(sub); end Generate_All_Subsets; -- DESTRUCTOR : procedure Clear ( s : in out Set ) is begin free(s); end Clear; end Sets_of_Unknowns; SHAR_EOF fi # end of overwriting check if test -f 'sets_of_unknowns.ads' then echo shar: will not over-write existing file "'sets_of_unknowns.ads'" else cat << "SHAR_EOF" > 'sets_of_unknowns.ads' package Sets_of_Unknowns is -- DESCRIPTION : -- This package provides a data abstraction for dealing with -- sets with a limited number of unknowns. type Set is private; -- CREATORS : function Create ( n : natural ) return Set; -- DESCRIPTION : -- Creates a set which can contain n unknowns. -- After this operation Dimension(s) = n. function Create ( s : Set ) return Set; -- DESCRIPTION : -- Returns a new set with the same contents as the given one. -- Note that s1 := s2 does only create a new name of the same set, -- but does not create a new set. -- CONSTRUCTORS : procedure Add ( s : in out Set; i : in natural ); -- DESCRIPTION : -- Adds the ith unknown to the set. -- The set must be created and 1 <= i <= Dimension(s). procedure Union ( s1 : in out Set; s2 : in Set ); function Union ( s1,s2 : Set ) return Set; -- DESCRIPTION : -- Constructs the union of two sets of equal dimension. -- Either the result will be contained in s1, or a new set -- will be constructed. procedure Remove ( s : in out Set; i : in natural ); -- DESCRIPTION : -- Removes the ith unknown from the set. -- The set must be created and 1 <= i <= Dimension(s); procedure Difference ( s1 : in out Set; s2 : in Set ); function Difference ( s1,s2 : Set ) return Set; -- DESCRIPTION : -- Constructs the difference s1\s2 of two sets of equal dimension. -- Either the result will be contained in s1, or a new set -- will be constructed. procedure Intersection ( s1 : in out Set; s2 : in Set ); function Intersection ( s1,s2 : Set ) return Set; -- DESCRIPTION : -- Construct the intersection of two sets of equal dimension. -- Either the result will be contained in s1, or a new set -- will be constructed. -- SELECTORS : function Dimension ( s : Set ) return natural; -- DESCRIPTION : -- Returns the number of unknowns the set can contain. -- For an empty set, Dimension(s) = 0. function Extent_Of ( s : Set ) return natural; -- DESCRIPTION : -- Returns the number of unknowns the set contains. function Is_In ( s : Set; i : natural ) return boolean; -- DESCRIPTION : -- Returns true if the ith unknown belongs to the set. function Is_Subset ( s1,s2 : Set ) return boolean; -- DESCRIPTION : -- Returns true when the set s1 is a subset of s2. function Is_Equal ( s1,s2 : Set ) return boolean; -- DESCRIPTION : -- Returns true when the two sets have the same dimension -- and the same elements. generic with procedure Process ( sub : in Set; continue : out boolean ); procedure Generate_Subsets ( s : in Set; k : in positive ); -- DESCRIPTION : -- Generates all proper subsets with k elements of the set s. -- Each time a new subset is found, Process is called, with the -- subset as input parameter. When the output parameter continue -- is set to false, the iteration stops. Otherwise it continues. -- NOTE : -- The same subset will be used over and over. If necessary, -- copies should be taken when processing the subset. generic with procedure Process ( sub : in Set; continue : out boolean ); procedure Generate_All_Subsets ( s : in Set ); -- DESCRIPTION : -- Generates all nonempty subsets of the set s, the set s included. -- As above, the procedure Process allows the processing of a subset. -- DESTRUCTOR : procedure Clear ( s : in out Set ); -- DESCRIPTION : -- Frees all occupied memory of the given set. -- After Clear(s), Dimension(s) = 0. private type Set_Rep; type Set is access Set_Rep; end Sets_of_Unknowns; SHAR_EOF fi # end of overwriting check if test -f 'sets_of_unknowns_io.adb' then echo shar: will not over-write existing file "'sets_of_unknowns_io.adb'" else cat << "SHAR_EOF" > 'sets_of_unknowns_io.adb' with integer_io; use integer_io; with Symbol_Table,Symbol_Table_io; use Symbol_Table; package body Sets_of_Unknowns_io is procedure get ( s : in out Set ) is begin get(Standard_Input,s); end get; procedure get ( file : in file_type; s : in out Set ) is ch : character; continue : boolean; procedure Read_Symbol ( cont : out boolean ) is begin loop get(file,ch); exit when ch /= ' '; end loop; if ch = '}' then cont := false; else declare sb : symbol; nb : natural; begin sb := (sb'range => ' '); Symbol_Table_io.get(file,ch,sb,'}'); nb := Symbol_Table.Get(sb); if nb = 0 then Symbol_Table.Add(sb,nb); end if; Add(s,nb); end; cont := (ch /= '}'); end if; end Read_Symbol; begin loop get(file,ch); exit when ch = '{' or ch = '}'; end loop; if ch = '{' then loop Read_Symbol(continue); exit when not continue; end loop; end if; end get; procedure put ( s : in Set ) is begin put(Standard_Output,s); end put; procedure put ( file : in file_type; s : in Set ) is standard : boolean := (Symbol_Table.Number = 0); procedure Write_Element ( i: in natural ) is begin if standard then put(file,'x'); put(file,i,2); if i >= 10 then put(file,' '); end if; else Symbol_Table_io.put(file,Symbol_Table.Get(i)); put(file,' '); end if; end Write_Element; begin text_io.put(file,"{"); for i in 1..Dimension(s) loop if Is_In(s,i) then Write_Element(i); end if; end loop; text_io.put(file,"}"); end put; end Sets_of_Unknowns_io; SHAR_EOF fi # end of overwriting check if test -f 'sets_of_unknowns_io.ads' then echo shar: will not over-write existing file "'sets_of_unknowns_io.ads'" else cat << "SHAR_EOF" > 'sets_of_unknowns_io.ads' with text_io; use text_io; with Sets_of_Unknowns; use Sets_of_Unknowns; package Sets_of_Unknowns_io is -- DESCRIPTION : -- This package contains routines for input and output of set of unknows. procedure get ( s : in out Set ); procedure get ( file : in file_type; s : in out Set ); -- REQUIRED : -- The symbol table must be initialized! -- A set must begin with '{' and end with '}. procedure put ( s : in Set ); procedure put ( file : in file_type; s : in Set ); end Sets_of_Unknowns_io; SHAR_EOF fi # end of overwriting check if test -f 'total_degree_start_systems.adb' then echo shar: will not over-write existing file "'total_degree_start_systems.adb'" else cat << "SHAR_EOF" > 'total_degree_start_systems.adb' with text_io; use text_io; with Random_Number_Generators; use Random_Number_Generators; with Complex_Numbers; use Complex_Numbers; with Natural_Vectors; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; package body Total_Degree_Start_Systems is procedure Total_Degree_Info is -- DESCRIPTION : -- Displays information about the total degree on screen. i : array(1..5) of string(1..65); begin i(1):=" The total degree is the product of the degrees of the"; i(2):="polynomials in the system. The i-th equation of the start system"; i(3):="is a univariate polynomial in the i-th unknown of the same degree"; i(4):="as the i-th polynomial in the system that has to be solved. The"; i(5):="total degree equals the number of solutions of the start system. "; for k in i'range loop put_line(i(k)); end loop; end Total_Degree_Info; procedure Start_Solutions ( level : in natural; q : in Poly_Sys; c : in Vector; s : in out Solution; qsols,qsols_last : in out Solution_List ) is -- DESCRIPTION : -- All solutions to the polynomial system q are computed. -- The parameter level indicates the current component in the recursive -- application of the rule of de Moivre. d : natural; begin if level <= s.n then d := Degree(q(level)); for j in 1..d loop s.v(level) := de_Moivre(d,j,c(level)); Start_Solutions(level+1,q,c,s,qsols,qsols_last); end loop; else s.t := CMPLX(0.0); s.m := 1; s.err := 0.0; s.rco := 1.0; s.res := 0.0; Append(qsols,qsols_last,s); end if; end Start_Solutions; procedure Start_System ( p : in Poly_Sys; q : in out Poly_Sys; c : in Vector; qsols : in out Solution_List ) is t : Term; n : natural := p'length; s : Solution(n); last : Solution_List := qsols; begin for i in p'range loop t.dg := new Natural_Vectors.Vector'(1..n => 0); t.dg(i) := Degree(p(i)); t.cf := CMPLX(1.0); q(i) := Create(t); Clear(t); t.dg := new Natural_Vectors.Vector'(1..n => 0); t.cf := -c(i); Plus_Term(q(i),t); Clear(t); end loop; Start_Solutions(1,q,c,s,qsols,last); end Start_System; procedure Start_System ( p : in Poly_Sys; q : in out Poly_Sys; qsols : in out Solution_List ) is n : natural := p'length; c : Vector(1..n); begin for i in c'range loop c(i) := Random1; end loop; Start_System(p,q,c,qsols); end Start_System; end Total_Degree_Start_Systems; SHAR_EOF fi # end of overwriting check if test -f 'total_degree_start_systems.ads' then echo shar: will not over-write existing file "'total_degree_start_systems.ads'" else cat << "SHAR_EOF" > 'total_degree_start_systems.ads' with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Vectors,Solutions; use Complex_Vectors,Solutions; package Total_Degree_Start_Systems is -- DESCRIPTION : -- This package constructs the start system based on the total degree. procedure Total_Degree_Info; -- DESCRIPTION : -- Displays information about the total degree on screen. procedure Start_System ( p : in Poly_Sys; q : in out Poly_Sys; c : in Vector; qsols : in out Solution_List); -- ON ENTRY : -- p the polynomial system that has to be solved; -- c a vector with constants. -- ON RETURN : -- q the start system, with for i in q'range : -- q(i) = x_i^Degree(p(i)) - c(i); -- qsols the solutions of the start system. procedure Start_System ( p : in Poly_Sys; q : in out Poly_Sys; qsols : in out Solution_List ); -- DESCRIPTION : -- The meaning of the parameters is here the same, except that instead -- of the vector c, a random number generator will be used for choosing -- the c(i)'s on the unit circle. end Total_Degree_Start_Systems; SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'Stalift' then mkdir 'Stalift' fi cd 'Stalift' if test -f 'bkk_bound_computations.adb' then echo shar: will not over-write existing file "'bkk_bound_computations.adb'" else cat << "SHAR_EOF" > 'bkk_bound_computations.adb' with integer_io; use integer_io; with Integer_Vectors,Float_Vectors; use Integer_Vectors; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Power_Lists; use Power_Lists; with Polynomial_to_Laurent_Converters; use Polynomial_to_Laurent_Converters; with Complex_Laurent_Polynomial_Systems; use Complex_Laurent_Polynomial_Systems; with Trees_of_Vectors,Volumes; use Trees_of_Vectors; with Trees_of_Vectors_io; use Trees_of_Vectors_io; with Mixed_Homotopy_Continuation; with Integer_Lifting_Utilities; use Integer_Lifting_Utilities; with Mixed_Volume_Computation; with Integer_Mixed_Subdivisions; use Integer_Mixed_Subdivisions; with Integer_Mixed_Subdivisions_io; use Integer_Mixed_Subdivisions_io; with Integer_Polyhedral_Continuation; use Integer_Polyhedral_Continuation; package body BKK_Bound_Computations is function BKK_by_Implicit_Lifting ( p : Poly_Sys ) return natural is n : constant natural := p'length; supports : Array_of_Lists(p'range) := Construct_Power_Lists(p); bkk : constant natural := Volumes.Mixed_Volume(n,supports); begin Deep_Clear(supports); return bkk; end BKK_by_Implicit_Lifting; function BKK_by_Implicit_Lifting ( file : file_type; p : Poly_Sys ) return natural is n : constant natural := p'length; supports : Array_of_Lists(p'range) := Construct_Power_Lists(p); tv : Tree_of_Vectors; bkk : natural; begin Volumes.Mixed_Volume(n,supports,tv,bkk); new_line(file); put_line(file,"The tree of useful directions : "); put(file,tv); new_line(file); Deep_Clear(supports); Clear(tv); return bkk; end BKK_by_Implicit_Lifting; function BKK_by_Static_Lifting ( p : Poly_Sys ) return natural is n : constant natural := p'length; supports : Array_of_Lists(p'range) := Construct_Power_Lists(p); bkk : constant natural := Mixed_Volume_Computation.Mixed_Volume(n,supports); begin Deep_Clear(supports); return bkk; end BKK_by_Static_Lifting; function BKK_by_Static_Lifting ( file : file_type; p : Poly_Sys ) return natural is n : constant natural := p'length; supports : Array_of_Lists(p'range) := Construct_Power_Lists(p); bkk : constant natural := Mixed_Volume_Computation.Mixed_Volume(file,n,supports); begin Deep_Clear(supports); return bkk; end BKK_by_Static_Lifting; function Solve_by_Implicit_Lifting ( p : Poly_Sys ) return Solution_List is n : constant natural := p'length; supports : Array_of_Lists(p'range) := Construct_Power_Lists(p); tv : Tree_of_Vectors; bkk : natural; lp : Laur_Sys(p'range) := Polynomial_to_Laurent_System(p); sols : Solution_List; begin Volumes.Mixed_Volume(n,supports,tv,bkk); Deep_Clear(supports); Mixed_Homotopy_Continuation.Solve(Standard_Output,lp,tv,bkk,sols); Clear(tv); Clear(lp); return sols; end Solve_by_Implicit_Lifting; function Solve_by_Implicit_Lifting ( file : file_type; p : Poly_Sys ) return Solution_List is n : constant natural := p'length; supports : Array_of_Lists(p'range) := Construct_Power_Lists(p); tv : Tree_of_Vectors; bkk : natural; lp : Laur_Sys(p'range) := Polynomial_to_Laurent_System(p); sols : Solution_List; begin Volumes.Mixed_Volume(n,supports,tv,bkk); Deep_Clear(supports); new_line(file); put(file,"The BKK bound equals "); put(file,bkk,1); new_line(file); put_line(file," with tree of useful directions : "); put(file,tv); new_line(file); Mixed_Homotopy_Continuation.Solve(file,lp,tv,bkk,sols); Clear(tv); Clear(lp); return sols; end Solve_by_Implicit_Lifting; function Solve_by_Static_Lifting ( p : Poly_Sys ) return Solution_List is n : constant natural := p'length; supports : Array_of_Lists(p'range) := Construct_Power_Lists(p); mv : natural; sols : Solution_List; mix,per : Link_to_Vector; mixsub : Mixed_Subdivision; permp : Poly_Sys(p'range); lp,pp : Laur_Sys(p'range); use Mixed_Volume_Computation; begin Compute_Mixture(supports,mix,per); permp := Permute(p,per); Clear(per); declare lifted : Array_of_Lists(mix'range); begin Mixed_Volume(n,mix.all,supports,lifted,mixsub,mv); pp := Polynomial_to_Laurent_System(p); lp := Perform_Lifting(n,mix.all,lifted,pp); Mixed_Solve(lp,mix.all,mixsub,sols); Deep_Clear(lifted); end; Clear(pp); Clear(lp); Deep_Clear(supports); Deep_Clear(mixsub); Clear(mix); return sols; end Solve_by_Static_Lifting; function Solve_by_Static_Lifting ( file : file_type; p : Poly_Sys ) return Solution_List is n : constant natural := p'length; supports : Array_of_Lists(p'range) := Construct_Power_Lists(p); mv : natural; sols : Solution_List; mix,per : Link_to_Vector; mixsub : Mixed_Subdivision; permp : Poly_Sys(p'range); lp,pp : Laur_Sys(p'range); use Mixed_Volume_Computation; begin Compute_Mixture(supports,mix,per); permp := Permute(p,per); Clear(per); declare lifted : Array_of_Lists(mix'range); begin Mixed_Volume(file,n,mix.all,supports,lifted,mixsub,mv); put_line(file,"THE MIXED SUBDIVISION :"); put(file,n,mix.all,mixsub); pp := Polynomial_to_Laurent_System(p); lp := Perform_Lifting(n,mix.all,lifted,pp); new_line(file); put_line(file,"POLYHEDRAL HOMOTOPY CONTINUATION"); Mixed_Solve(file,lp,mix.all,mixsub,sols); Deep_Clear(lifted); end; Clear(pp); Clear(lp); Deep_Clear(supports); Deep_Clear(mixsub); Clear(mix); return sols; end Solve_by_Static_Lifting; end BKK_Bound_Computations; SHAR_EOF fi # end of overwriting check if test -f 'bkk_bound_computations.ads' then echo shar: will not over-write existing file "'bkk_bound_computations.ads'" else cat << "SHAR_EOF" > 'bkk_bound_computations.ads' with text_io,Solutions; use text_io,Solutions; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; package BKK_Bound_Computations is -- DESCRIPTION : -- This package exports some routines for computing the BKK bound -- and solving a random coefficient system by polyhedral continuation. -- These function are black box routines: the user does not have to -- worry about intermediate data structures. function BKK_by_Implicit_Lifting ( p : Poly_Sys ) return natural; function BKK_by_Implicit_Lifting ( file : file_type; p : Poly_Sys ) return natural; function BKK_by_Static_Lifting ( p : Poly_Sys ) return natural; function BKK_by_Static_Lifting ( file : file_type; p : Poly_Sys ) return natural; -- DESCRIPTION : -- If a file is specified, then the mixed subdivision will be -- written on that file. Either implicit or random static lifting -- can be used. function Solve_by_Implicit_Lifting ( p : Poly_Sys ) return Solution_List; function Solve_by_Implicit_Lifting ( file : file_type; p : Poly_Sys ) return Solution_List; function Solve_by_Static_Lifting ( p : Poly_Sys ) return Solution_List; function Solve_by_Static_Lifting ( file : file_type; p : Poly_Sys ) return Solution_List; -- DESCRIPTION : -- If a file is specified, then intermediate results will be -- write on that file. Either implicit or random static lifting -- can be applied. end BKK_Bound_Computations; SHAR_EOF fi # end of overwriting check if test -f 'contributions_to_mixed_volume.adb' then echo shar: will not over-write existing file "'contributions_to_mixed_volume.adb'" else cat << "SHAR_EOF" > 'contributions_to_mixed_volume.adb' with Integer_Vectors_of_Vectors; with Integer_Matrices; use Integer_Matrices; with Integer_Linear_System_Solvers; use Integer_Linear_System_Solvers; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Inner_Normal_Cones; use Inner_Normal_Cones; with Normal_Cone_Intersections; use Normal_Cone_Intersections; with Vertices; use Vertices; --with Mixed_Volume_Computation; use Mixed_Volume_Computation; --with text_io,integer_io; use text_io,integer_io; --with Integer_Vectors_io; use Integer_Vectors_io; --with Arrays_of_Integer_Vector_Lists_io; use Arrays_of_Integer_Vector_Lists_io; --with Integer_Matrices_io; use Integer_Matrices_io; --with Normal_Cone_Intersections_io; use Normal_Cone_Intersections_io; --with Lists_of_Integer_Vectors_io; use Lists_of_Integer_Vectors_io; --with Faces_of_Polytope_io; use Faces_of_Polytope_io; package body Contributions_to_Mixed_Volume is -- AUXILIAIRIES TO CONSTRUCT THE FACETS : procedure Copy_Remove ( l : in out List; x : in Vector ) is -- DESCRIPTION : -- Replaces the list by a copy of it, without the point x. tmp,res,res_last : List; begin tmp := l; while not Is_Null(tmp) loop declare pt : Link_to_Vector := Head_Of(tmp); begin if not Equal(pt.all,x) then Append(res,res_last,pt.all); end if; end; tmp := Tail_Of(tmp); end loop; Copy(res,l); Deep_Clear(l); end Copy_Remove; function Vertex_Points ( l : Array_of_Lists ) return Array_of_Lists is -- DESCRIPTION : -- returns for each list the list of the vertex points. res : Array_of_Lists(l'range); begin for i in l'range loop res(i) := Vertex_Points(l(i)); end loop; return res; end Vertex_Points; procedure Copy ( f1 : in Array_of_Faces; f2 : in out Array_of_Faces ) is -- DESCRIPTION : -- Copies the array f1 into the array f2. begin for i in f1'range loop Deep_Copy(f1(i),f2(i)); end loop; end Copy; function Create_Facets ( n : natural; l : List; x : Vector ) return Faces is -- DESCRIPTION : -- Returns a list of all facets of conv(l), that all contain x. -- First it will be checked whether x belongs to l or not. res : Faces; wrk : List; lx : Link_to_Vector; begin if Is_In(l,x) then res := Create(n-1,n,l,x); else wrk := l; lx := new Vector'(x); Construct(lx,wrk); res := Create(n-1,n,wrk,x); end if; return res; end Create_Facets; function All_Facets ( n : natural; l : Array_of_Lists ) return Array_of_Faces is -- DESCRIPTION : -- Returns all facets of all sets in l. res : Array_of_Faces(l'range); begin for i in l'range loop res(i) := Create(n-1,n,l(i)); end loop; return res; end All_Facets; -- DETERMINE ZERO CONTRIBUTION BASED ON INTERSECTION MATRIX : function Exhaustive_Zero_Contribution ( pts : Array_of_Lists; g : List; i : natural ) return boolean is -- DESCRIPTION : -- Creates an intersection matrix, based on the list of generators of -- the normal cone of a points in the ith component of pts. res : boolean; n1 : constant natural := pts'length - 1; mg : constant natural := Length_Of(g); nc : constant natural := Number_of_Cones(pts,i); ima : Intersection_Matrix(n1,mg,nc); begin ima := Create(pts,g,i); return Contained_in_Union(pts,i,g,ima); end Exhaustive_Zero_Contribution; -- THE CRITERION : function Simple_Zero_Contribution ( pts : Array_of_Lists; x : Vector; i : natural ) return boolean is res : boolean := false; g : List := Generators(pts(i),x); begin for j in pts'range loop if j /= i then res := Contained_in_Cone(pts(j),g); end if; exit when res; end loop; Deep_Clear(g); return res; end Simple_Zero_Contribution; function Simple_Zero_Contribution ( pts : Array_of_Lists; ifacets : Faces; x : Vector; i : natural ) return boolean is g : List := Generators(pts(i),ifacets,x); res : boolean := false; begin for j in pts'range loop if j /= i then res := Contained_in_Cone(pts(j),g); end if; exit when res; end loop; Deep_Clear(g); return res; end Simple_Zero_Contribution; function Exhaustive_Zero_Contribution ( pts : Array_of_Lists; x : Vector; i : natural ) return boolean is n : constant natural := x'length; res : boolean := false; begin if Length_Of(pts(i)) > n then declare f : Faces := Create_Facets(n,pts(i),x); begin res := Exhaustive_Zero_Contribution(pts,f,x,i); Clear(f); end; else declare g : List := Generators(pts(i),x); begin res := Exhaustive_Zero_Contribution(pts,g,i); end; end if; return res; end Exhaustive_Zero_Contribution; function Exhaustive_Zero_Contribution ( pts : Array_of_Lists; ifacets : Faces; x : Vector; i : natural ) return boolean is g : List; begin if not Is_Null(ifacets) then g := Generators(pts(i),ifacets,x); else g := Generators(pts(i),x); end if; return Exhaustive_Zero_Contribution(pts,g,i); end Exhaustive_Zero_Contribution; -- SWEEPING THROUGH THE POINT LISTS : function Simple_Sweep ( pts : Array_of_Lists ) return Array_of_Lists is n : constant natural := Head_Of(pts(pts'first))'length; afa : Array_of_Faces(pts'range) := All_Facets(n,pts); begin return Simple_Sweep(pts,afa); end Simple_Sweep; function Simple_Sweep ( pts : Array_of_Lists; facets : Array_of_Faces ) return Array_of_Lists is res,res_last,points : Array_of_Lists(pts'range); -- wrkfacets : Array_of_Faces(facets'range); -- SAFETY MODE : checks whether mixed volume does not decrease -- n : constant natural := pts'last; -- mix : constant Vector := (1..n => 1); -- mv : constant natural := Mixed_Volume(n,mix,pts); begin -- Copy(facets,wrkfacets); points := Vertex_Points(pts); -- instead of: Copy(pts,points); for i in points'range loop declare tmp : constant Integer_Vectors_of_Vectors.Vector := Shallow_Create(points(i)); begin for j in tmp'range loop declare x : constant Vector := tmp(j).all; -- f : Faces := Extract_Faces(wrkfacets(i),x); begin -- if not Simple_Zero_Contribution(points,f,x,i) if not Simple_Zero_Contribution(points,x,i) then Append(res(i),res_last(i),x); else Remove(points(i),x); -- SAFETY MODE : -- if mv > Mixed_Volume(n,mix,points) -- then put_line("BUG at points : "); put(points); -- put("for the vector : "); put(x); new_line; -- put(" at component "); put(i,1); new_line; -- raise PROGRAM_ERROR; -- end if; -- Clear(wrkfacets(i)); -- wrkfacets(i) := Create(x'length-1,x'length,points(i)); end if; end; end loop; end; Copy(res(i),points(i)); end loop; Deep_Clear(points); return res; end Simple_Sweep; function Exhaustive_Sweep ( pts : Array_of_Lists ) return Array_of_Lists is n : constant natural := Head_Of(pts(pts'first))'length; afa : Array_of_Faces(pts'range) := All_Facets(n,pts); begin return Exhaustive_Sweep(pts,afa); end Exhaustive_Sweep; function Exhaustive_Sweep ( pts : Array_of_Lists; facets : Array_of_Faces ) return Array_of_Lists is res,res_last,points : Array_of_Lists(pts'range); -- wrkfacets : Array_of_Faces(facets'range); -- SAFETY MODE : checks whether mixed volume does not decrease -- n : constant natural := pts'last; -- mix : constant Vector := (1..n => 1); -- mv : constant natural := Mixed_Volume(n,mix,pts); begin -- Copy(facets,wrkfacets); points := Vertex_Points(pts); -- instead of: Copy(pts,points); for i in points'range loop declare tmp : constant Integer_Vectors_of_Vectors.Vector := Shallow_Create(points(i)); begin for j in tmp'range loop declare x : constant Vector := tmp(j).all; -- f : Faces := Extract_Faces(wrkfacets(i),x); begin -- if not Exhaustive_Zero_Contribution(points,f,x,i) if not Exhaustive_Zero_Contribution(points,x,i) then Append(res(i),res_last(i),x); else Remove(points(i),x); -- SAFETY MODE : -- if mv > Mixed_Volume(n,mix,points) -- then put_line("BUG at points : "); put(points); -- put("for the vector : "); put(x); new_line; -- put(" at component "); put(i,1); new_line; -- raise PROGRAM_ERROR; -- end if; -- Clear(wrkfacets(i)); -- wrkfacets(i) := Create(x'length-1,x'length,points(i)); end if; end; end loop; end; Copy(res(i),points(i)); end loop; Deep_Clear(points); return res; end Exhaustive_Sweep; end Contributions_to_Mixed_Volume; SHAR_EOF fi # end of overwriting check if test -f 'contributions_to_mixed_volume.ads' then echo shar: will not over-write existing file "'contributions_to_mixed_volume.ads'" else cat << "SHAR_EOF" > 'contributions_to_mixed_volume.ads' with Integer_Vectors; use Integer_Vectors; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Integer_Faces_of_Polytope; use Integer_Faces_of_Polytope; package Contributions_to_Mixed_Volume is -- DESCRIPTION : -- This package provides utilities to determine whether a point -- contributes to the mixed volume of a tuple of point sets, i.e.: whether -- it can be removed of the tuple without decreasing the mixed volume. -- THE CRITERION : (simple/exhaustive) function Simple_Zero_Contribution ( pts : Array_of_Lists; x : Vector; i : natural ) return boolean; function Simple_Zero_Contribution ( pts : Array_of_Lists; ifacets : Faces; x : Vector; i : natural ) return boolean; function Exhaustive_Zero_Contribution ( pts : Array_of_Lists; x : Vector; i : natural ) return boolean; function Exhaustive_Zero_Contribution ( pts : Array_of_Lists; ifacets : Faces; x : Vector; i : natural ) return boolean; -- DESCRIPTION : -- Returns true if the point x does not influence the mixed volume of -- the tuple pts, when considered w.r.t. the ith component. -- There is a simple and an exhaustive criterion to check the contribution -- of the point. When the simple criterion returns false, the point does -- not necessarily make a contribution to the mixed volume, whereas when -- the exhaustive criterion returns false, we can be sure that the point -- contributes to the mixed volume. -- ON ENTRY : -- pts tuple of points sets, with dimension = x'length; -- ifacets all facets of the polytope spanned by pts(i), that contain x; -- x a point, considered w.r.t. pts(i); -- i component of pts, i is in pts'range. -- ON RETURN : -- true if Mixed_Volume(pts) = Mixed_Volume(pts, pts(i) contains x); -- false when the criterion fails to decide. -- SWEEPING THROUGH THE POINT LISTS : (with simple/exhaustive criterion) function Simple_Sweep ( pts : Array_of_Lists ) return Array_of_Lists; function Simple_Sweep ( pts : Array_of_Lists; facets : Array_of_Faces ) return Array_of_Lists; function Exhaustive_Sweep ( pts : Array_of_Lists ) return Array_of_Lists; function Exhaustive_Sweep ( pts : Array_of_Lists; facets : Array_of_Faces ) return Array_of_Lists; -- DESCRIPTION : -- Applies the simple/exhaustive criterion to the points. -- Returns those points for which the criterion has failed to -- demonstrate that the contribution to the mixed volume was zero. -- ON ENTRY : -- pts tuple of point sets; -- facets tuple of facets of the polytopes spanned by pts, -- facets'range = pts'range. -- ON RETURN : -- A tuple of point sets where the points that do not contribute to the -- mixed volume have been eliminated, according to the simple or exhaustive -- criterion that has been used. -- Note that essential sets are not necessarily unique, because they depend -- on the order in which points with zero contribution are eliminated. end Contributions_to_Mixed_Volume; SHAR_EOF fi # end of overwriting check if test -f 'driver_for_criterion.adb' then echo shar: will not over-write existing file "'driver_for_criterion.adb'" else cat << "SHAR_EOF" > 'driver_for_criterion.adb' with Communications_with_User; use Communications_with_User; with Drivers_for_Vertex_Points; use Drivers_for_Vertex_Points; with Drivers_for_Mixed_Contributions; use Drivers_for_Mixed_Contributions; procedure Driver_for_Criterion ( file : in file_type; points : in out Array_of_Lists ) is function Menu_for_Criterion return character is -- DESCRIPTION : -- Shows the menu for computing the set of essential points. ans : character; begin new_line; put_line("MENU for sweeping out non-contributing points :"); put_line(" 0. no computation of vertex points."); put_line(" 1. elimination of non-vertex points"); put_line(" 2. apply simple criterion once"); put_line(" 3. exhaustive sweep through supports"); put("Make your choice : "); Ask_Alternative(ans,"0123"); return ans; end Menu_for_Criterion; procedure Dispatch_Criterion ( choice : character ) is -- DESCRIPTION : -- Dispatches the selected choice. nred : natural := 0; begin if choice /= '0' then Vertex_Points(file,points); case choice is when '2' => Once_Simple_Sweep(file,points,nred); when '3' => Full_Simple_Sweep(file,points,nred); when others => null; end case; end if; end Dispatch_Criterion; procedure Driver is choice : character := Menu_for_Criterion; begin Dispatch_Criterion(choice); end Driver; begin Driver; end Driver_for_Criterion; SHAR_EOF fi # end of overwriting check if test -f 'driver_for_criterion.ads' then echo shar: will not over-write existing file "'driver_for_criterion.ads'" else cat << "SHAR_EOF" > 'driver_for_criterion.ads' with text_io; use text_io; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; procedure Driver_for_Criterion ( file : in file_type; points : in out Array_of_Lists ); -- DESCRIPTION : -- Allows to apply a criterion to sweep out the points that do not -- contribute to the mixed volume of the tuple of point sets. -- ON ENTRY : -- file must be opened for output; -- points tuple of point sets. -- ON RETURN : -- points possibly reduced tuple of point sets. SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_lifting_functions.adb' then echo shar: will not over-write existing file "'drivers_for_lifting_functions.adb'" else cat << "SHAR_EOF" > 'drivers_for_lifting_functions.adb' with integer_io; use integer_io; with Communications_with_User; use Communications_with_User; with Numbers_io; use Numbers_io; with Random_Number_Generators; with Integer_Vectors; with Integer_Vectors_io; use Integer_Vectors_io; with Float_Vectors; with Float_Vectors_io; use Float_Vectors_io; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Arrays_of_Integer_Vector_Lists_io; use Arrays_of_Integer_Vector_Lists_io; with Integer_Lifting_Functions; use Integer_Lifting_Functions; with Integer_Lifting_Utilities; use Integer_Lifting_Utilities; with Float_Lifting_Functions; use Float_Lifting_Functions; with Float_Lifting_Utilities; use Float_Lifting_Utilities; with Float_Integer_Convertors; use Float_Integer_Convertors; with Float_Mixed_Subdivisions_io; package body Drivers_for_Lifting_Functions is -- AUXILIARIES : procedure Read_Integer_Vector ( v : in out Integer_Vectors.Vector ) is begin for i in v'range loop put("Give integer for component "); put(i,1); put(" : "); Read_Integer(v(i)); end loop; end Read_Integer_Vector; procedure Read_Float_Vector ( v : in out Float_Vectors.Vector ) is begin for i in v'range loop put("Give float for component "); put(i,1); put(" : "); Read_Double_Float(v(i)); end loop; end Read_Float_Vector; procedure Set_Integer_Bounds ( file : in file_type; low,upp : in out Integer_Vectors.Vector ) is -- DESCRIPTION : -- Shows the default values for lower and upper bounds and allows -- the user to modify these. ans : character; m : constant natural := low'length; begin loop new_line; put_line("Current lower and upper bounds on lifting values"); put(" lower : "); put(low); new_line; put(" upper : "); put(upp); new_line; put("Do you want to change these values ? (y/n) "); Ask_Yes_or_No(ans); exit when ans /= 'y'; put("Reading "); put(m,1); put(" lower bounds "); put_line("for the lifting."); Read_Integer_Vector(low); put("Reading "); put(m,1); put(" upper bounds "); put_line("for the lifting."); Read_Integer_Vector(upp); end loop; put(file," Lower bounds : "); put(file,low); new_line(file); put(file," Upper bounds : "); put(file,upp); new_line(file); end Set_Integer_Bounds; procedure Set_Float_Bounds ( file : in file_type; low,upp : in out Float_Vectors.Vector ) is -- DESCRIPTION : -- Shows the default values for lower and upper bounds and allows -- the user to modify these. ans : character; m : constant natural := low'length; begin loop new_line; put_line("Current lower and upper bounds on lifting values"); put(" lower : "); put(low,2,3,3); new_line; put(" upper : "); put(upp,2,3,3); new_line; put("Do you want to change these values ? (y/n) "); Ask_Yes_or_No(ans); exit when ans /= 'y'; put("Reading "); put(m,1); put(" lower bounds "); put_line("for the lifting."); Read_Float_Vector(low); put("Reading "); put(m,1); put(" upper bounds "); put_line("for the lifting."); Read_Float_Vector(upp); end loop; put(file," Lower bounds : "); put(file,low,2,3,3); new_line(file); put(file," Upper bounds : "); put(file,upp,2,3,3); new_line(file); end Set_Float_Bounds; function Read_Integer_Lifting ( l : Lists_of_Integer_Vectors.List ) return Lists_of_Integer_Vectors.List is use Lists_of_Integer_Vectors; use Integer_Vectors; tmp : List := l; res,res_last : List; begin put_line("Give a lifting value for the following points :"); while not Is_Null(tmp) loop declare v : constant Vector := Head_Of(tmp).all; lv : Vector(v'first..v'last+1); begin lv(v'range) := v; put(v); put(" : "); Read_Integer(lv(lv'last)); Append(res,res_last,lv); end; tmp := Tail_Of(tmp); end loop; return res; end Read_Integer_Lifting; function Read_Float_Lifting ( l : Lists_of_Float_Vectors.List ) return Lists_of_Float_Vectors.List is use Lists_of_Float_Vectors; use Float_Vectors; tmp : List := l; res,res_last : List; begin put_line("Give a lifting value for the following points :"); while not Is_Null(tmp) loop declare v : constant Vector := Head_Of(tmp).all; lv : Vector(v'first..v'last+1); begin lv(v'range) := v; put(v,0,0,0); put(" : "); Read_Double_Float(lv(lv'last)); Append(res,res_last,lv); end; tmp := Tail_Of(tmp); end loop; return res; end Read_Float_Lifting; procedure Integer_Random_Linear_Lifting ( file : in file_type; n : in natural; points : in Arrays_of_Integer_Vector_Lists.Array_of_Lists; lifted : in out Arrays_of_Integer_Vector_Lists.Array_of_Lists; lilifu : in out Integer_Vectors_of_Vectors.Link_to_Vector ) is low : Integer_Vectors.Vector(points'range) := (points'range => 0); upp : Integer_Vectors.Vector(points'range) := Adaptive_Lifting(points); ranvec : Integer_Vectors.Vector(1..n); begin Set_Integer_Bounds(file,low,upp); lilifu := new Integer_Vectors_of_Vectors.Vector(points'range); for i in lilifu'range loop for j in ranvec'range loop ranvec(j) := Random_Number_Generators.Random(low(i),upp(i)); end loop; lilifu(i) := new Integer_Vectors.Vector'(ranvec); end loop; lifted := Linear_Lift(lilifu.all,points); end Integer_Random_Linear_Lifting; procedure Float_Random_Linear_Lifting ( file : in file_type; n : in natural; points : in Arrays_of_Float_Vector_Lists.Array_of_Lists; lifted : in out Arrays_of_Float_Vector_Lists.Array_of_Lists; lilifu : in out Float_Vectors_of_Vectors.Link_to_Vector ) is m : constant natural := points'last; low : Float_Vectors.Vector(points'range) := (points'range => 0.0); upp : Float_Vectors.Vector(points'range) := Adaptive_Lifting(points); ranvec : Float_Vectors.Vector(1..n); begin Set_Float_Bounds(file,low,upp); lilifu := new Float_Vectors_of_Vectors.Vector(points'range); for i in lilifu'range loop ranvec := Random(m,low(i),upp(i)); lifted(i) := Linear_Lift(points(i),ranvec); lilifu(i) := new Float_Vectors.Vector'(ranvec); end loop; end Float_Random_Linear_Lifting; procedure Integer_User_Linear_Lifting ( file : in file_type; n : in natural; points : in Arrays_of_Integer_Vector_Lists.Array_of_Lists; lifted : in out Arrays_of_Integer_Vector_Lists.Array_of_Lists; lilifu : in out Integer_Vectors_of_Vectors.Link_to_Vector ) is lift : Integer_Vectors_of_Vectors.Vector(points'range); begin for k in lift'range loop put("Give "); put(n,1); put(" integers for "); put("vector "); put(k,1); put(" : "); get(n,lift(k)); put(file," vector "); put(file,k,1); put(file," : "); put(file,lift(k)); new_line(file); end loop; lifted := Linear_Lift(lift,points); lilifu := new Integer_Vectors_of_Vectors.Vector'(lift); end Integer_User_Linear_Lifting; procedure Float_User_Linear_Lifting ( file : in file_type; n : in natural; points : in Arrays_of_Float_Vector_Lists.Array_of_Lists; lifted : in out Arrays_of_Float_Vector_Lists.Array_of_Lists; lilifu : in out Float_Vectors_of_Vectors.Link_to_Vector ) is lift : Float_Vectors_of_Vectors.Vector(points'range); begin for k in lift'range loop put("Give "); put(n,1); put(" floats for "); put("vector "); put(k,1); put(" : "); get(n,lift(k)); put(file," vector "); put(file,k,1); put(file," : "); put(file,lift(k)); new_line(file); lifted(k) := Linear_Lift(points(k),lift(k).all); end loop; lilifu := new Float_Vectors_of_Vectors.Vector'(lift); end Float_User_Linear_Lifting; procedure Integer_Polynomial_Lifting ( file : in file_type; points : in Arrays_of_Integer_Vector_Lists.Array_of_Lists; lifted : in out Arrays_of_Integer_Vector_Lists.Array_of_Lists ) is lift : Link_to_Poly_Sys; begin get(lift); put(file,lift.all); lifted := Polynomial_Lift(lift.all,points); end Integer_Polynomial_Lifting; procedure Float_Polynomial_Lifting ( file : in file_type; points : in Arrays_of_Float_Vector_Lists.Array_of_Lists; lifted : in out Arrays_of_Float_Vector_Lists.Array_of_Lists ) is lift : Link_to_Poly_Sys; begin get(lift); put(file,lift.all); lifted := Polynomial_Lift(lift.all,points); end Float_Polynomial_Lifting; procedure Integer_User_Point_Wise_Lifting ( file : in file_type; points : in Arrays_of_Integer_Vector_Lists.Array_of_Lists; lifted : in out Arrays_of_Integer_Vector_Lists.Array_of_Lists ) is begin for k in points'range loop lifted(k) := Read_Integer_Lifting(points(k)); end loop; end Integer_User_Point_Wise_Lifting; procedure Float_User_Point_Wise_Lifting ( file : in file_type; points : in Arrays_of_Float_Vector_Lists.Array_of_Lists; lifted : in out Arrays_of_Float_Vector_Lists.Array_of_Lists ) is begin for k in points'range loop lifted(k) := Read_Float_Lifting(points(k)); end loop; end Float_User_Point_Wise_Lifting; procedure Integer_Random_Point_Wise_Lifting ( file : in file_type; points : in Arrays_of_Integer_Vector_Lists.Array_of_Lists; lifted : in out Arrays_of_Integer_Vector_Lists.Array_of_Lists ) is low : Integer_Vectors.Vector(points'range) := (points'range => 0); upp : Integer_Vectors.Vector(points'range) := Adaptive_Lifting(points); begin Set_Integer_Bounds(file,low,upp); lifted := Random_Lift(low,upp,points); end Integer_Random_Point_Wise_Lifting; procedure Float_Random_Point_Wise_Lifting ( file : in file_type; points : in Arrays_of_Float_Vector_Lists.Array_of_Lists; lifted : in out Arrays_of_Float_Vector_Lists.Array_of_Lists ) is low : Float_Vectors.Vector(points'range) := (points'range => 0.0); upp : Float_Vectors.Vector(points'range) := Adaptive_Lifting(points); begin Set_Float_Bounds(file,low,upp); lifted := Random_Lift(points,low,upp); end Float_Random_Point_Wise_Lifting; function Menu_for_Lifting_Functions return character is -- DESCRIPTION : -- Displays the menu and returns the selected lifting function. ans : character; begin put_line("MENU for Lifting Functions :"); put_line(" Linear : 1. Random linear vectors will be chosen."); put_line(" : 2. You can choose the vectors yourself."); put_line(" Polynomial : 3. The system to be solved will be used."); put_line(" : 4. You can choose the polynomials yourself."); put_line(" Point-wise : 5. For each point a random lifting value."); put_line(" : 6. You can choose all lifting values yourself."); put("Type a number between 1 and 6 to select lifting : "); Ask_Alternative(ans,"123456"); return ans; end Menu_for_Lifting_Functions; procedure Dispatch_Integer_Lifting ( file : in file_type; p : in Poly_Sys; choice : in character; points : in Arrays_of_Integer_Vector_Lists.Array_of_Lists; lifted : in out Arrays_of_Integer_Vector_Lists.Array_of_Lists; lilifu : in out Integer_Vectors_of_Vectors.Link_to_Vector ) is -- DESCRIPTION : -- Calls the appropriate lifting function to perform the lifting. n : constant natural := p'length; begin new_line(file); put(file,"INTEGER LIFTING FUNCTION : "); case choice is when '1' => put_line(file,"random linear."); Integer_Random_Linear_Lifting(file,n,points,lifted,lilifu); when '2' => put_line(file,"linear provided by user."); Integer_User_Linear_Lifting(file,n,points,lifted,lilifu); when '3' => put_line(file,"polynomial system."); lifted := Polynomial_Lift(p,points); when '4' => put_line(file,"polynomials provided by user."); Integer_Polynomial_Lifting(file,points,lifted); when '5' => put_line(file,"random point-wise."); Integer_Random_Point_Wise_Lifting(file,points,lifted); when '6' => put_line(file,"point-wise provided by user."); Integer_User_Point_Wise_Lifting(file,points,lifted); when others => null; end case; new_line(file); put_line(file,"THE LIFTED SUPPORTS :"); new_line(file); put(file,lifted); end Dispatch_Integer_Lifting; procedure Dispatch_Float_Lifting ( file : in file_type; p : in Poly_Sys; choice : in character; points : in Arrays_of_Float_Vector_Lists.Array_of_Lists; lifted : in out Arrays_of_Float_Vector_Lists.Array_of_Lists; lilifu : in out Float_Vectors_of_Vectors.Link_to_Vector ) is -- DESCRIPTION : -- Calls the appropriate lifting function to perform the lifting. n : constant natural := p'length; begin new_line(file); put(file,"FLOATING-POINT LIFTING FUNCTION : "); case choice is when '1' => put_line(file,"random linear."); Float_Random_Linear_Lifting(file,n,points,lifted,lilifu); when '2' => put_line(file,"linear provided by user."); Float_User_Linear_Lifting(file,n,points,lifted,lilifu); when '3' => put_line(file,"polynomial system."); lifted := Polynomial_Lift(p,points); when '4' => put_line(file,"polynomials provided by user."); Float_Polynomial_Lifting(file,points,lifted); when '5' => put_line(file,"random point-wise."); Float_Random_Point_Wise_Lifting(file,points,lifted); when '6' => put_line(file,"point-wise provided by user."); Float_User_Point_Wise_Lifting(file,points,lifted); when others => null; end case; new_line(file); put_line(file,"THE LIFTED SUPPORTS :"); new_line(file); Float_Mixed_Subdivisions_io.put(file,lifted); end Dispatch_Float_Lifting; -- TARGET ROUTINES : procedure Driver_for_Lifting_Functions ( file : in file_type; p : in Poly_Sys; points : in Arrays_of_Integer_Vector_Lists.Array_of_Lists; lifted : in out Arrays_of_Integer_Vector_Lists.Array_of_Lists; lilifu : in out Integer_Vectors_of_Vectors.Link_to_Vector ) is liftfun : character := Menu_for_Lifting_Functions; begin Dispatch_Integer_Lifting(file,p,liftfun,points,lifted,lilifu); end Driver_for_Lifting_Functions; procedure Driver_for_Lifting_Functions ( file : in file_type; p : in Poly_Sys; points : in Arrays_of_Float_Vector_Lists.Array_of_Lists; lifted : in out Arrays_of_Float_Vector_Lists.Array_of_Lists; lilifu : in out Float_Vectors_of_Vectors.Link_to_Vector ) is liftfun : character := Menu_for_Lifting_Functions; begin Dispatch_Float_Lifting(file,p,liftfun,points,lifted,lilifu); end Driver_for_Lifting_Functions; procedure Driver_for_Lifting_Functions ( file : in file_type; p : in Poly_Sys; ipoints : in Arrays_of_Integer_Vector_Lists.Array_of_Lists; fltlif : out boolean; fpoints : in out Arrays_of_Float_Vector_Lists.Array_of_Lists; ilifted : in out Arrays_of_Integer_Vector_Lists.Array_of_Lists; flifted : in out Arrays_of_Float_Vector_Lists.Array_of_Lists; ililifu : in out Integer_Vectors_of_Vectors.Link_to_Vector; flilifu : in out Float_Vectors_of_Vectors.Link_to_Vector ) is liftfun : character := Menu_for_Lifting_Functions; ans : character; begin put("Type i for integer or f for floating-point lifting : "); Ask_Alternative(ans,"if"); fltlif := (ans = 'f'); if ans = 'i' then Dispatch_Integer_Lifting(file,p,liftfun,ipoints,ilifted,ililifu); else fpoints := Convert(ipoints); Dispatch_Float_Lifting(file,p,liftfun,fpoints,flifted,flilifu); end if; end Driver_for_Lifting_Functions; end Drivers_for_Lifting_Functions; SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_lifting_functions.ads' then echo shar: will not over-write existing file "'drivers_for_lifting_functions.ads'" else cat << "SHAR_EOF" > 'drivers_for_lifting_functions.ads' with text_io; use text_io; with Integer_Vectors_of_Vectors; with Float_Vectors_of_Vectors; with Lists_of_Integer_Vectors; with Lists_of_Float_Vectors; with Arrays_of_Integer_Vector_Lists; with Arrays_of_Float_Vector_Lists; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; package Drivers_for_Lifting_Functions is function Read_Integer_Lifting ( l : Lists_of_Integer_Vectors.List ) return Lists_of_Integer_Vectors.List; -- DESCRIPTION : interactive point-wise lifting of a list. -- Returns the list of lifted points. function Read_Float_Lifting ( l : Lists_of_Float_Vectors.List ) return Lists_of_Float_Vectors.List; -- DESCRIPTION : interactive point-wise lifting of a list. -- Returns the list of lifted points. procedure Driver_for_Lifting_Functions ( file : in file_type; p : in Poly_Sys; points : in Arrays_of_Integer_Vector_Lists.Array_of_Lists; lifted : in out Arrays_of_Integer_Vector_Lists.Array_of_Lists; lilifu : in out Integer_Vectors_of_Vectors.Link_to_Vector ); -- DESCRIPTION : -- Displays the menu with the available lifting functions and -- performs the selected integer lifting function. -- NOTE : it is assumed that different supports are submitted. -- ON ENTRY : -- file file that must be opened for output; -- p polynomial system; -- points supports of the system p. -- ON RETURN : -- lifted the lifted support sets; -- lilifu vectors used for linear lifting, otherwise lilifu = null. procedure Driver_for_Lifting_Functions ( file : in file_type; p : in Poly_Sys; points : in Arrays_of_Float_Vector_Lists.Array_of_Lists; lifted : in out Arrays_of_Float_Vector_Lists.Array_of_Lists; lilifu : in out Float_Vectors_of_Vectors.Link_to_Vector ); -- DESCRIPTION : -- Displays the menu with the available lifting functions and -- performs the selected floating-point lifting function. -- NOTE : it is assumed that different supports are submitted. -- ON ENTRY : -- file file that must be opened for output; -- p polynomial system; -- points supports of the system p. -- ON RETURN : -- lifted the lifted support sets; -- lilifu vectors used for linear lifting, otherwise lilifu = null. procedure Driver_for_Lifting_Functions ( file : in file_type; p : in Poly_Sys; ipoints : in Arrays_of_Integer_Vector_Lists.Array_of_Lists; fltlif : out boolean; fpoints : in out Arrays_of_Float_Vector_Lists.Array_of_Lists; ilifted : in out Arrays_of_Integer_Vector_Lists.Array_of_Lists; flifted : in out Arrays_of_Float_Vector_Lists.Array_of_Lists; ililifu : in out Integer_Vectors_of_Vectors.Link_to_Vector; flilifu : in out Float_Vectors_of_Vectors.Link_to_Vector ); -- DESCRIPTION : -- The user has the choice for integer or floating-point lifting. -- On return, output parameter fltlif is true if the user wants -- floating-point lifting and false otherwise. -- Depending on fltlif, the appropriate parameters are determined. end Drivers_for_Lifting_Functions; SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_mixed_contributions.adb' then echo shar: will not over-write existing file "'drivers_for_mixed_contributions.adb'" else cat << "SHAR_EOF" > 'drivers_for_mixed_contributions.adb' with integer_io; use integer_io; with Timing_Package; use Timing_Package; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Contributions_to_Mixed_Volume; use Contributions_to_Mixed_Volume; package body Drivers_for_Mixed_Contributions is procedure Count_Zero_Contributions ( file : in file_type; l,nl : in Array_of_Lists; nred : out natural ) is -- DESCRIPTION : -- Counts the number of zero contributions per component and reports -- the cardinalities on file. res,inc : natural := 0; begin new_line(file); put_line(file,"#Eliminated points per component : "); for i in l'range loop inc := Length_Of(l(i)) - Length_Of(nl(i)); put(file," "); put(file,inc,1); res := res + inc; end loop; new_line(file); nred := res; end Count_Zero_Contributions; -- TARGET ROUTINES : procedure Once_Simple_Sweep ( file : in file_type; l : in out Array_of_Lists; nred : out natural ) is nl : Array_of_Lists(l'range); timer : Timing_Widget; begin tstart(timer); nl := Simple_Sweep(l); tstop(timer); Count_Zero_Contributions(file,l,nl,nred); new_line(file); print_times(file,timer,"one simple sweep"); new_line(file); Copy(nl,l); Deep_Clear(nl); end Once_Simple_Sweep; procedure Once_Exhaustive_Sweep ( file : in file_type; l : in out Array_of_Lists; nred : out natural ) is nl : Array_of_Lists(l'range); timer : Timing_Widget; begin tstart(timer); nl := Exhaustive_Sweep(l); tstop(timer); Count_Zero_Contributions(file,l,nl,nred); new_line(file); print_times(file,timer,"exhaustive sweep"); new_line(file); Copy(nl,l); Deep_Clear(nl); end Once_Exhaustive_Sweep; procedure Full_Simple_Sweep ( file : in file_type; l : in out Array_of_Lists; nred : out natural ) is totnred,wrknred : natural; timer : Timing_Widget; begin totnred := 0; tstart(timer); loop Once_Simple_Sweep(file,l,wrknred); exit when (wrknred = 0); totnred := totnred + wrknred; end loop; tstop(timer); new_line(file); print_times(file,timer,"full simple sweep"); new_line(file); nred := totnred; end Full_Simple_Sweep; procedure Full_Exhaustive_Sweep ( file : in file_type; l : in out Array_of_Lists; nred : out natural ) is totnred,wrknred : natural; timer : Timing_Widget; begin totnred := 0; tstart(timer); loop Once_Exhaustive_Sweep(file,l,wrknred); exit when (wrknred = 0); totnred := totnred + wrknred; end loop; tstop(timer); new_line(file); print_times(file,timer,"full exhaustive sweep"); new_line(file); nred := totnred; end Full_Exhaustive_Sweep; end Drivers_for_Mixed_Contributions; SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_mixed_contributions.ads' then echo shar: will not over-write existing file "'drivers_for_mixed_contributions.ads'" else cat << "SHAR_EOF" > 'drivers_for_mixed_contributions.ads' with text_io; use text_io; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; package Drivers_for_Mixed_Contributions is -- DESCRIPTION : -- This package provides some drivers to compute essential sets of -- a tuple of support sets. -- SWEEPING (once/full) WITH (simple/exhaustive) CRITERION : procedure Once_Simple_Sweep ( file : in file_type; l : in out Array_of_Lists; nred : out natural ); procedure Once_Exhaustive_Sweep ( file : in file_type; l : in out Array_of_Lists; nred : out natural ); procedure Full_Simple_Sweep ( file : in file_type; l : in out Array_of_Lists; nred : out natural ); procedure Full_Exhaustive_Sweep ( file : in file_type; l : in out Array_of_Lists; nred : out natural ); -- DESCRIPTION : -- Applies simple/exhaustive criterion once/full to the point lists. -- Full means that the lists are scanned until the criterion fails -- for all points, while with the prefix Once, only one sweep is performed. -- ON RETURN : -- l reduced set of supports; -- nred number of eliminated vectors with zero contribution. end Drivers_for_Mixed_Contributions; SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_static_lifting.adb' then echo shar: will not over-write existing file "'drivers_for_static_lifting.adb'" else cat << "SHAR_EOF" > 'drivers_for_static_lifting.adb' with Communications_with_User; use Communications_with_User; with Timing_Package; use Timing_Package; with text_io,integer_io; use text_io,integer_io; with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Numbers; use Complex_Numbers; with Integer_Vectors; use Integer_Vectors; with Integer_Vectors_io; use Integer_Vectors_io; with Float_Vectors,Float_Vectors_io; use Float_Vectors_io; with Complex_Vectors; with Complex_Vectors_io; use Complex_Vectors_io; with Integer_Vectors_of_Vectors; with Float_Vectors_of_Vectors; with Complex_Vectors_of_Vectors; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Lists_of_Integer_Vectors_io; use Lists_of_Integer_Vectors_io; with Integer_Vectors_of_Vectors_io; use Integer_Vectors_of_Vectors_io; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Arrays_of_Float_Vector_Lists; use Arrays_of_Float_Vector_Lists; with Arrays_of_Integer_Vector_Lists_io; use Arrays_of_Integer_Vector_Lists_io; with Power_Lists; use Power_Lists; with Integer_Faces_of_Polytope; with Float_Faces_of_Polytope; with Integer_Mixed_Subdivisions; with Integer_Mixed_Subdivisions_io; use Integer_Mixed_Subdivisions_io; with Float_Mixed_Subdivisions; with Float_Mixed_Subdivisions_io; use Float_Mixed_Subdivisions_io; with Mixed_Volume_Computation; use Mixed_Volume_Computation; with Float_Integer_Convertors; use Float_Integer_Convertors; with Integer_Lifting_Functions; use Integer_Lifting_Functions; with Integer_Lifting_Utilities; use Integer_Lifting_Utilities; with Float_Lifting_Functions; use Float_Lifting_Functions; with Float_Lifting_Utilities; use Float_Lifting_Utilities; with Integer_Pruning_Methods; use Integer_Pruning_Methods; with Float_Pruning_Methods; use Float_Pruning_Methods; with Solutions,Solutions_io; use Solutions,Solutions_io; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Complex_Laurent_Polynomial_Systems; use Complex_Laurent_Polynomial_Systems; with Complex_Multivariate_Laurent_Polynomials; use Complex_Multivariate_Laurent_Polynomials; with Exponent_Vectors; use Exponent_Vectors; with Polynomial_to_Laurent_Converters; use Polynomial_to_Laurent_Converters; with Laurent_to_Polynomial_Converters; use Laurent_to_Polynomial_Converters; with Laurent_Jacobi_Matrices; use Laurent_Jacobi_Matrices; with Driver_for_Criterion; with Drivers_for_Lifting_Functions; use Drivers_for_Lifting_Functions; with Pruning_Statistics; with Integer_Polyhedral_Continuation; use Integer_Polyhedral_Continuation; with Float_Polyhedral_Continuation; use Float_Polyhedral_Continuation; with Driver_for_Polyhedral_Continuation; package body Drivers_for_Static_Lifting is procedure Static_Lifting_Info is i : array(1..11) of string(1..65); begin i( 1):=" Static lifting is a general procedure to construct regular"; i( 2):="mixed subdivisions of a tuple of polytopes. For mixed-volume"; i( 3):="computation, only those cells that are spanned by a tuple of"; i( 4):="edges contribute to the mixed volume. These cells are the so-"; i( 5):="called mixed cells in the subdivision. The collection of mixed"; i( 6):="cells is computed efficiently by pruning in the tree of lifted"; i( 7):="edge-edge combinations. "; i( 8):=" These mixed cells provide the start systems in the polyhedral"; i( 9):="homotopy methods used to solve a random coefficient start system."; i(10):="Recursion is applied in case the lifting does not induce at once"; i(11):="a fine mixed subdivision. "; for k in i'range loop put_line(i(k)); end loop; end Static_Lifting_Info; procedure Driver_for_Mixed_Volume_Computation ( file : in file_type; p : in Poly_Sys; byebye : in boolean; q : out Poly_Sys; qsols : out Solution_List; mv : out natural ) is welcome : constant string := "Mixed-Volume Computation by Static Lifting"; permp : Poly_Sys(p'range); -- permuted system tmv,nbcells : natural; mix : Integer_Vectors.Link_to_Vector; imixsub : Integer_Mixed_Subdivisions.Mixed_Subdivision; fmixsub : Float_Mixed_Subdivisions.Mixed_Subdivision; -- the switches, to do or not to do, if true then : compmix : boolean; -- compute the type of mixture compmisu : boolean; -- compute the subdivision report : boolean; -- report during creation of the subdivision misufile : boolean; -- put the subdivision on separate file tosolve : boolean; -- solve the system ranstart : boolean; -- construct random coefficient start system contrep : boolean; -- intermediate output during continuation -- the files : solsft,gft : file_type; -- AUXILIAIRY : function Select_Terms ( p : Poly_Sys; mix : Integer_Vectors.Vector; pts : Arrays_of_Integer_Vector_Lists.Array_of_Lists ) return Poly_Sys is -- DESCRIPTION : -- Returns those terms of p whose exponents belong to the lists pts. -- The type of mixture is in mix and pts'range = mix'range. res : Poly_Sys(p'range); ind : natural := 0; begin for i in pts'range loop for j in 1..mix(i) loop ind := ind + 1; res(ind) := Select_Terms(p(ind),pts(i)); end loop; end loop; return res; end Select_Terms; -- REPORT DURING CREATION : procedure Write_Cell ( mic : in Integer_Mixed_Subdivisions.Mixed_Cell; continue : out boolean ) is vol : natural; begin nbcells := nbcells + 1; put(file,"Cell no. "); put(file,nbcells,1); put_line(file," : "); put(file," normal to cell : "); put(file,mic.nor); new_line(file); put_line(file," the points in the cell : "); for k in mic.pts'range loop put(file," component "); put(file,k,1); put(file," with "); put(file,Length_Of(mic.pts(k)),1); put_line(file," points :"); put(file,mic.pts(k)); end loop; vol := Mixed_Volume(p'length,mix.all,mic); put(file," with volume addition : "); put(file,tmv,1); put(file," + "); put(file,vol,1); tmv := tmv + vol; put(file," = "); put(file,tmv,1); new_line(file); continue := true; end Write_Cell; procedure Report_and_Create1_CS is new Gen1_Create_CS(Write_Cell); procedure Compute_Mixture ( file : in file_type; n : in natural; compmixture : in boolean; supports : in out Arrays_of_Integer_Vector_Lists.Array_of_Lists; mix : in out Integer_Vectors.Link_to_Vector; permp : out Poly_Sys ) is -- DESCRIPTION : -- Computes the type of mixture and permutes if necessary, -- the equations in the polynomial system. perm : Integer_Vectors.Link_to_Vector; begin if compmixture then Compute_Mixture(supports,mix,perm); else perm := Compute_Permutation(n,mix.all,supports); end if; permp := Permute(p,perm); Clear(perm); new_line(file); put(file,"TYPE OF MIXTURE : "); put(file,"#supports : "); put(file,mix'last,1); put(file," occurrences : "); put(file,mix); new_line(file); end Compute_Mixture; function Expand ( mix : Vector; points : Arrays_of_Integer_Vector_Lists.Array_of_Lists ) return Arrays_of_Integer_Vector_Lists.Array_of_Lists is -- DESCRIPTION : -- Returns a tuple of expanded lists, according to the type of mixture. sum : integer := Integer_Vectors.Sum(mix); res : Arrays_of_Integer_Vector_Lists.Array_of_Lists(1..sum); cnt : natural := 0; begin for i in mix'range loop for j in 1..mix(i) loop cnt := cnt + 1; res(cnt) := points(i); end loop; end loop; return res; end Expand; procedure Write_Cardinalities ( file : in file_type; mix,card : in Integer_Vectors.Vector ) is begin new_line(file); put_line(file,"CARDINALITIES OF THE LIFTED FACES :"); new_line(file); for i in card'range loop put(file," #lifted "); put(file,mix(i),1); put(file,"-faces of polytope "); put(file,i,1); put(file," : "); put(file,card(i),1); new_line(file); end loop; end Write_Cardinalities; procedure Create_Mixed_Cells ( file : in file_type; n : in natural; mix : in Vector; mixpts : in Arrays_of_Integer_Vector_Lists.Array_of_Lists; lifted : in out Arrays_of_Integer_Vector_Lists.Array_of_Lists; mixsub : in out Integer_Mixed_Subdivisions.Mixed_Subdivision ) is -- DESCRIPTION : -- The pruning algorithm will be applied to compute the mixed cells. use Integer_Faces_of_Polytope; afa : Array_of_Faces(mix'range); cardafa : Integer_Vectors.Vector(mix'range); nbsucc,nbfail : Float_Vectors.Vector(mix'range) := (mix'range => 0.0); timer : timing_widget; begin tstart(timer); for i in afa'range loop afa(i) := Create_Lower(mix(i),n+1,lifted(i)); end loop; tstop(timer); for i in afa'range loop cardafa(i) := Length_Of(afa(i)); end loop; Write_Cardinalities(file,mix,cardafa); new_line(file); print_times(file,timer,"Creation of the faces of lower hull"); new_line(file); put_line(file,"PRUNING TO EXTRACT THE MIXED CELLS :"); tstart(timer); if report then nbcells := 0; tmv := 0; Report_and_Create1_CS(n,mix,afa,lifted,nbsucc,nbfail,mixsub); else Create_CS(n,mix,afa,lifted,nbsucc,nbfail,mixsub); end if; tstop(timer); Pruning_Statistics(file,nbsucc,nbfail); new_line(file); print_times(file,timer,"Pruning for Mixed Cells"); end Create_Mixed_Cells; procedure Create_Mixed_Cells ( file : in file_type; n : in natural; mix : in Integer_Vectors.Vector; fltsup : in Arrays_of_Float_Vector_Lists.Array_of_Lists; lilifu : in Float_Vectors_of_Vectors.Link_to_Vector; lifsup : in Arrays_of_Float_Vector_Lists.Array_of_Lists; fltsub : in out Float_Mixed_Subdivisions.Mixed_Subdivision ) is use Float_Vectors_of_Vectors; use Float_Faces_of_Polytope; timer : timing_widget; tol : constant double_float := 10.0**(-8); supfa,liffaces : Array_of_Faces(mix'range); cardafa : Integer_Vectors.Vector(mix'range); nbsucc,nbfail : Float_Vectors.Vector(mix'range) := (mix'range => 0.0); begin tstart(timer); if lilifu /= null then for i in supfa'range loop supfa(i) := Create(mix(i),n,fltsup(i),tol); liffaces(i) := Linear_Lift(supfa(i),lilifu(i).all); end loop; else for i in liffaces'range loop liffaces(i) := Create_Lower(mix(i),n+1,lifsup(i),tol); end loop; end if; tstop(timer); for i in liffaces'range loop cardafa(i) := Length_Of(liffaces(i)); end loop; Write_Cardinalities(file,mix,cardafa); new_line(file); print_times(file,timer,"Creation of the faces of lower hull"); new_line(file); put_line(file,"PRUNING TO EXTRACT THE MIXED CELLS :"); tstart(timer); Create(n,mix,liffaces,lifsup,tol,nbsucc,nbfail,fltsub); tstop(timer); Pruning_Statistics(file,nbsucc,nbfail); new_line(file); print_times(file,timer,"Pruning for Mixed Cells."); end Create_Mixed_Cells; procedure Polyhedral_Homotopy_Continuation ( file : in file_type; qq : in out Poly_Sys; qqsols : in out Solution_List; lifted : in Arrays_of_Integer_Vector_Lists.Array_of_Lists; mixsub : in Integer_Mixed_Subdivisions.Mixed_Subdivision ) is -- DESCRIPTION : -- This procedure constructs and solves a random coefficient start system. -- Only those monomials whose exponents occur in the subdivision are -- contained in the start system. timer : timing_widget; n : constant natural := p'length; lifted_lq,lq : Laur_Sys(q'range); h : Eval_Coeff_Laur_Sys(q'range); c : Complex_Vectors_of_Vectors.Vector(h'range); e : Exponent_Vectors_Array(h'range); j : Eval_Coeff_Jacobi(h'range,h'first..h'last+1); m : Mult_Factors(j'range(1),j'range(2)); begin new_line(file); put_line(file,"POLYHEDRAL HOMOTOPY CONTINUATION :"); lq := Polynomial_to_Laurent_System(qq); lifted_lq := Perform_Lifting(n,mix.all,lifted,lq); Clear(lq); lq := Eval(lifted_lq,CMPLX(1.0),n+1); qq := Laurent_to_Polynomial_System(lq); h := Create(lq); for i in c'range loop declare coeff_lq : constant Complex_Vectors.Vector := Coeff(lq(i)); begin c(i) := new Complex_Vectors.Vector(coeff_lq'range); for k in coeff_lq'range loop c(i)(k) := coeff_lq(k); end loop; end; end loop; e := Create(lq); Create(lq,j,m); tstart(timer); if contrep then --Mixed_Solve(file,lifted_lq,mix.all,mixsub,qqsols); Mixed_Solve(file,lifted_lq,lifted,h,c,e,j,m,mix.all,mixsub,qqsols); else --Mixed_Solve(lifted_lq,mix.all,mixsub,qqsols); Mixed_Solve(lifted_lq,lifted,h,c,e,j,m,mix.all,mixsub,qqsols); end if; tstop(timer); new_line(file); print_times(file,timer,"Polyhedral Continuation"); q := qq; qsols := qqsols; end Polyhedral_Homotopy_Continuation; procedure Polyhedral_Homotopy_Continuation ( file : in file_type; n : in natural; mix : in Integer_Vectors.Vector; qq : in Poly_Sys; qqsols : in out Solution_List; lifsup : in Arrays_of_Float_Vector_Lists.Array_of_Lists; fltsub : in Float_Mixed_Subdivisions.Mixed_Subdivision; contrep : in boolean ) is lq : Laur_Sys(qq'range) := Polynomial_to_Laurent_System(qq); h : Eval_Coeff_Laur_Sys(qq'range); c : Complex_Vectors_of_Vectors.Vector(h'range); e : Exponent_Vectors_Array(h'range); j : Eval_Coeff_Jacobi(h'range,h'first..h'last+1); m : Mult_Factors(j'range(1),j'range(2)); timer : timing_widget; begin new_line(file); put_line(file,"POLYHEDRAL HOMOTOPY CONTINUATION :"); h := Create(lq); for i in c'range loop declare coeff_lq : constant Complex_Vectors.Vector := Coeff(lq(i)); begin c(i) := new Complex_Vectors.Vector(coeff_lq'range); for k in coeff_lq'range loop c(i)(k) := coeff_lq(k); end loop; end; end loop; e := Create(lq); Create(lq,j,m); tstart(timer); if contrep then Mixed_Solve(file,lq,lifsup,h,c,e,j,m,mix,fltsub,qqsols); else Mixed_Solve(lq,lifsup,h,c,e,j,m,mix,fltsub,qqsols); end if; tstop(timer); new_line(file); print_times(file,timer,"Polyhedral Homotopy Continuation"); q := qq; qsols := qqsols; end Polyhedral_Homotopy_Continuation; procedure Volume_Computation ( file : in file_type; n : in natural; mix : in Vector; lifpts : in Arrays_of_Integer_Vector_Lists.Array_of_Lists; mixsub : in out Integer_Mixed_Subdivisions.Mixed_Subdivision ) is -- DESCRIPTION : -- Computes the volumes of the mixed cells in mixsub. timer : timing_widget; mixvol : natural; begin new_line(file); put_line(file,"VOLUMES OF MIXED CELLS :"); new_line(file); tstart(timer); put(file,n,mix,mixsub,mixvol); tstop(timer); put(file,"The total mixed volume equals "); put(file,mixvol,1); new_line(file); new_line(file); print_times(file,timer,"Volume computation of mixed cells"); if compmisu then mixsub := Integer_Mixed_Subdivisions.Create(lifpts,mixsub); new_line(file); put_line(file,"VOLUMES OF MIXED CELLS, AFTER REFINEMENT :"); new_line(file); tstart(timer); put(file,n,mix,mixsub,mixvol); tstop(timer); put(file,"The total mixed volume equals "); put(file,mixvol,1); new_line(file); new_line(file); print_times(file,timer,"Volume computation of mixed cells"); end if; mv := mixvol; end Volume_Computation; procedure Volume_Computation ( file : in file_type; n : in natural; mix : in Vector; mixsub : in out Float_Mixed_Subdivisions.Mixed_Subdivision ) is timer : timing_widget; mixvol : natural; begin new_line(file); put_line(file,"THE MIXED SUBDIVISION : "); new_line(file); tstart(timer); Float_Mixed_Subdivisions_io.put(file,n,mix,mixsub,mixvol); tstop(timer); put(file,"The mixed volume equals : "); put(file,mixvol,1); new_line(file); new_line(file); print_times(file,timer,"Volume computation of mixed cells"); mv := mixvol; end Volume_Computation; procedure Data_Management ( mix : in out Integer_Vectors.Link_to_Vector; compmisu,compmix,fltlif : out boolean ) is -- DESCRIPTION : -- This procedure allows to use previously computed mixed subdivisions. ans : character; m : natural; begin new_line; put("Do you already have a mixed subdivision ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then put("Induced by integer or floating-point lifting (i/f) "); Ask_Alternative(ans,"if"); fltlif := (ans = 'f'); declare insubft : file_type; nn : natural; begin put_line("Reading the name of the input file."); Read_Name_and_Open_File(insubft); if ans = 'f' then get(insubft,nn,m,mix,fmixsub); else get(insubft,nn,m,mix,imixsub); end if; Close(insubft); new_line(file); put_line(file,"Mixed subdivision supplied by user."); new_line(file); compmisu := false; compmix := false; exception when DATA_ERROR => put_line("Data not in correct format. Will ignore it..."); Close(insubft); end; else compmisu := true; put("Do you want to enforce a type mixture ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then put("Give number of different supports : "); get(m); put("Give vector indicating occurrences : "); get(m,mix); compmix := false; else compmix := true; end if; end if; end Data_Management; procedure Main_Driver is n : constant natural := p'length; sp,qq : Poly_Sys(p'range); qqsols : Solution_List; totaltimer : timing_widget; points : Arrays_of_Integer_Vector_Lists.Array_of_Lists(p'range); ilili : Integer_Vectors_of_Vectors.Link_to_Vector; flili : Float_Vectors_of_Vectors.Link_to_Vector; fltlif : boolean; mixpts,mixpts1,ilifpts : Arrays_of_Integer_Vector_Lists.Link_to_Array_of_Lists; fpts,flifpts : Arrays_of_Float_Vector_Lists.Link_to_Array_of_Lists; ans : character; outsubft : file_type; procedure Driver_for_Integer_Lifting is begin if compmisu then new_line; put("Do you want intermediate output on file,"); put(" during creation ? (y/n) "); Ask_Yes_or_No(ans); report := (ans = 'y'); put("Do you want the mixed cells on separate file ? (y/n) "); Ask_Yes_or_No(ans); misufile := (ans = 'y'); if misufile then put_line("Reading the name of the output file."); Read_Name_and_Create_File(outsubft); end if; else ilifpts.all := Induced_Lifting(n,mix.all,points,imixsub); end if; Driver_for_Polyhedral_Continuation (file,sp,0,byebye,qq,gft,solsft,tosolve,ranstart,contrep); if compmisu then Create_Mixed_Cells(file,n,mix.all,mixpts.all,ilifpts.all,imixsub); end if; if not Integer_Mixed_Subdivisions.Is_Null(imixsub) then Volume_Computation(file,n,mix.all,ilifpts.all,imixsub); if compmisu and then misufile then put(outsubft,n,mix.all,imixsub); end if; if tosolve then Polyhedral_Homotopy_Continuation (file,qq,qqsols,ilifpts.all,imixsub); end if; end if; end Driver_for_Integer_Lifting; procedure Driver_for_Float_Lifting is begin if compmisu then new_line; put("Do you want the mixed cells on separate file ? (y/n) "); Ask_Yes_or_No(ans); misufile := (ans = 'y'); if misufile then put_line("Reading the name of the output file."); Read_Name_and_Create_File(outsubft); end if; else flifpts.all := Induced_Lifting(n,mix.all,fpts.all,fmixsub); end if; Driver_for_Polyhedral_Continuation (file,sp,0,byebye,qq,gft,solsft,tosolve,ranstart,contrep); if compmisu then Create_Mixed_Cells (file,n,mix.all,fpts.all,flili,flifpts.all,fmixsub); if misufile then put(outsubft,n,mix.all,fmixsub); end if; end if; if not Float_Mixed_Subdivisions.Is_Null(fmixsub) then Volume_Computation(file,n,mix.all,fmixsub); if tosolve then Polyhedral_Homotopy_Continuation (file,n,mix.all,qq,qqsols,flifpts.all,fmixsub,contrep); end if; end if; end Driver_for_Float_Lifting; begin new_line; put_line(welcome); tstart(totaltimer); points := Construct_Power_Lists(p); Data_Management(mix,compmisu,compmix,fltlif); if compmisu then Compute_Mixture(file,n,compmix,points,mix,permp); mixpts1 := new Arrays_of_Integer_Vector_Lists. Array_of_Lists'(Typed_Lists(mix.all,points)); Driver_for_Criterion(file,mixpts1.all); mixpts := new Arrays_of_Integer_Vector_Lists. Array_of_Lists'(Expand(mix.all,mixpts1.all)); Compute_Mixture(file,n,compmix,mixpts.all,mix,permp); mixpts := new Arrays_of_Integer_Vector_Lists. Array_of_Lists'(Typed_Lists(mix.all,mixpts.all)); ilifpts := new Arrays_of_Integer_Vector_Lists. Array_of_Lists(mix'range); fpts := new Arrays_of_Float_Vector_Lists.Array_of_Lists(mix'range); flifpts := new Arrays_of_Float_Vector_Lists.Array_of_Lists(mix'range); sp := Select_Terms(permp,mix.all,mixpts.all); new_line; Driver_for_Lifting_Functions (file,sp,mixpts.all,fltlif,fpts.all,ilifpts.all, flifpts.all,ilili,flili); else mixpts := new Arrays_of_Integer_Vector_Lists. Array_of_Lists'(Typed_Lists(mix.all,points)); ilifpts := new Arrays_of_Integer_Vector_Lists. Array_of_Lists(mix'range); fpts := new Arrays_of_Float_Vector_Lists.Array_of_Lists(points'range); fpts.all := Convert(points); flifpts := new Arrays_of_Float_Vector_Lists.Array_of_Lists(mix'range); sp := p; end if; if fltlif then Driver_for_Float_Lifting; else Driver_for_Integer_Lifting; end if; if tosolve then new_line(file); put_line(file,"THE RANDOM COEFFICIENT START SYSTEM :"); new_line(file); put_line(file,qq); new_line(file); put_line(file,"THE START SOLUTIONS :"); new_line(file); put(file,Length_Of(qqsols),qq'length,qqsols); if ranstart then new_line(gft); put_line(gft,"THE SOLUTIONS : "); new_line(gft); put(gft,Length_Of(qqsols),n,qqsols); Close(gft); else put(solsft,Length_Of(qqsols),n,qqsols); Close(solsft); end if; end if; tstop(totaltimer); new_line(file); print_times(file,totaltimer,"All Computations"); end Main_Driver; begin Main_Driver; end Driver_for_Mixed_Volume_Computation; end Drivers_for_Static_Lifting; SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_static_lifting.ads' then echo shar: will not over-write existing file "'drivers_for_static_lifting.ads'" else cat << "SHAR_EOF" > 'drivers_for_static_lifting.ads' with text_io,Solutions; use text_io,Solutions; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; package Drivers_for_Static_Lifting is procedure Static_Lifting_Info; -- DESCRIPTION : -- Displays information on static lifting on screen. procedure Driver_for_Mixed_Volume_Computation ( file : in file_type; p : in Poly_Sys; byebye : in boolean; q : out Poly_Sys; qsols : out Solution_List; mv : out natural ); -- DESCRIPTION : -- Interactive driver for the computation of the mixed volume. -- ON ENTRY : -- file output file, must be opened for output; -- p a polynomial system; -- byebye if true, then a bye-bye message will appear on screen, -- if false, then no bye-bye. -- ON RETURN : -- q a start system with randomly choosen coefficients, -- which can be used in a coefficient homotopy; -- qsols the solutions of q; -- mv mixed volume of p and the number of solutions of q. end Drivers_for_Static_Lifting; SHAR_EOF fi # end of overwriting check if test -f 'float_integer_convertors.adb' then echo shar: will not over-write existing file "'float_integer_convertors.adb'" else cat << "SHAR_EOF" > 'float_integer_convertors.adb' with Floating_Point_Numbers; use Floating_Point_Numbers; package body Float_Integer_Convertors is function Convert ( v : Integer_Vectors.Vector ) return Float_Vectors.Vector is res : Float_Vectors.Vector(v'range); begin for i in res'range loop res(i) := double_float(v(i)); end loop; return res; end Convert; function Convert ( v : Float_Vectors.Vector ) return Integer_Vectors.Vector is res : Integer_Vectors.Vector(v'range); begin for i in res'range loop res(i) := integer(v(i)); end loop; return res; end Convert; function Convert ( l : Lists_of_Integer_Vectors.List ) return Lists_of_Float_Vectors.List is res,res_last : Lists_of_Float_Vectors.List; tmp : Lists_of_Integer_Vectors.List := l; use Lists_of_Integer_Vectors; begin while not Is_Null(tmp) loop Lists_of_Float_Vectors.Append(res,res_last,Convert(Head_Of(tmp).all)); tmp := Tail_Of(tmp); end loop; return res; end Convert; function Convert ( l : Lists_of_Float_Vectors.List ) return Lists_of_Integer_Vectors.List is res,res_last : Lists_of_Integer_Vectors.List; tmp : Lists_of_Float_Vectors.List := l; use Lists_of_Float_Vectors; begin while not Is_Null(tmp) loop Lists_of_Integer_Vectors.Append(res,res_last,Convert(Head_Of(tmp).all)); tmp := Tail_Of(tmp); end loop; return res; end Convert; function Convert ( l : Arrays_of_Integer_Vector_Lists.Array_of_Lists ) return Arrays_of_Float_Vector_Lists.Array_of_Lists is res : Arrays_of_Float_Vector_Lists.Array_of_Lists(l'range); begin for i in l'range loop res(i) := Convert(l(i)); end loop; return res; end Convert; function Convert ( l : Arrays_of_Float_Vector_Lists.Array_of_Lists ) return Arrays_of_Integer_Vector_Lists.Array_of_Lists is res : Arrays_of_Integer_Vector_Lists.Array_of_Lists(l'range); begin for i in l'range loop res(i) := Convert(l(i)); end loop; return res; end Convert; function Convert ( m : Integer_Mixed_Subdivisions.Mixed_Cell ) return Float_Mixed_Subdivisions.Mixed_Cell is res : Float_Mixed_Subdivisions.Mixed_Cell; begin res.nor := new Float_Vectors.Vector'(Convert(m.nor.all)); res.pts := new Arrays_of_Float_Vector_Lists.Array_of_Lists'(Convert(m.pts.all)); res.sub := null; return res; end Convert; function Convert ( m : Float_Mixed_Subdivisions.Mixed_Cell ) return Integer_Mixed_Subdivisions.Mixed_Cell is res : Integer_Mixed_Subdivisions.Mixed_Cell; begin res.nor := new Integer_Vectors.Vector'(Convert(m.nor.all)); res.pts := new Arrays_of_Integer_Vector_Lists.Array_of_Lists'(Convert(m.pts.all)); res.sub := null; return res; end Convert; function Convert ( s : Integer_Mixed_Subdivisions.Mixed_Subdivision ) return Float_Mixed_Subdivisions.Mixed_Subdivision is res,res_last : Float_Mixed_Subdivisions.Mixed_Subdivision; tmp : Integer_Mixed_Subdivisions.Mixed_Subdivision := s; use Integer_Mixed_Subdivisions; begin while not Is_Null(tmp) loop Float_Mixed_Subdivisions.Append(res,res_last,Convert(Head_Of(tmp))); tmp := Tail_Of(tmp); end loop; return res; end Convert; function Convert ( s : Float_Mixed_Subdivisions.Mixed_Subdivision ) return Integer_Mixed_Subdivisions.Mixed_Subdivision is res,res_last : Integer_Mixed_Subdivisions.Mixed_Subdivision; tmp : Float_Mixed_Subdivisions.Mixed_Subdivision := s; use Float_Mixed_Subdivisions; begin while not Is_Null(tmp) loop Integer_Mixed_Subdivisions.Append(res,res_last,Convert(Head_Of(tmp))); tmp := Tail_Of(tmp); end loop; return res; end Convert; end Float_Integer_Convertors; SHAR_EOF fi # end of overwriting check if test -f 'float_integer_convertors.ads' then echo shar: will not over-write existing file "'float_integer_convertors.ads'" else cat << "SHAR_EOF" > 'float_integer_convertors.ads' with Integer_Vectors,Float_Vectors; with Lists_of_Integer_Vectors; with Lists_of_Float_Vectors; with Arrays_of_Integer_Vector_Lists; with Arrays_of_Float_Vector_Lists; with Integer_Mixed_Subdivisions; with Float_Mixed_Subdivisions; package Float_Integer_Convertors is -- DESCRIPTION : -- This package provides routines to convert lists of integer and floating- -- point vectors into lists of floating-point and integer vectors. -- The conversion from float to integer is done by merely rounding. function Convert ( v : Integer_Vectors.Vector ) return Float_Vectors.Vector; function Convert ( v : Float_Vectors.Vector ) return Integer_Vectors.Vector; function Convert ( l : Lists_of_Integer_Vectors.List ) return Lists_of_Float_Vectors.List; function Convert ( l : Lists_of_Float_Vectors.List ) return Lists_of_Integer_Vectors.List; function Convert ( l : Arrays_of_Integer_Vector_Lists.Array_of_Lists ) return Arrays_of_Float_Vector_Lists.Array_of_Lists; function Convert ( l : Arrays_of_Float_Vector_Lists.Array_of_Lists ) return Arrays_of_Integer_Vector_Lists.Array_of_Lists; function Convert ( m : Integer_Mixed_Subdivisions.Mixed_Cell ) return Float_Mixed_Subdivisions.Mixed_Cell; function Convert ( m : Float_Mixed_Subdivisions.Mixed_Cell ) return Integer_Mixed_Subdivisions.Mixed_Cell; function Convert ( s : Integer_Mixed_Subdivisions.Mixed_Subdivision ) return Float_Mixed_Subdivisions.Mixed_Subdivision; function Convert ( s : Float_Mixed_Subdivisions.Mixed_Subdivision ) return Integer_Mixed_Subdivisions.Mixed_Subdivision; end Float_Integer_Convertors; SHAR_EOF fi # end of overwriting check if test -f 'float_lifting_functions.adb' then echo shar: will not over-write existing file "'float_lifting_functions.adb'" else cat << "SHAR_EOF" > 'float_lifting_functions.adb' with Random_Number_Generators; use Random_Number_Generators; with Complex_Numbers,Complex_Vectors; use Complex_Numbers; with Float_Vectors_of_Vectors; package body Float_Lifting_Functions is -- AUXILIARIES : function Flt2Cmplx ( x : FLoat_Vectors.Vector ) return Complex_Vectors.Vector is -- DESCRIPTION : -- Returns a vector with complex entries. res : Complex_Vectors.Vector(x'range); begin for i in x'range loop res(i) := CMPLX(x(i)); end loop; return res; end Flt2Cmplx; -- RANDOM FLOATING-POINT LIFTING : function Random_Lift ( lflow,lfupp : double_float ) return double_float is res : double_float := random; -- in [-1,1] begin res := ((1.0+res)/2.0)*lflow + ((1.0-res)/2.0)*lfupp; -- in [lflow,lfupp] return res; end Random_Lift; function Random_Lift ( v : Vector; lflow,lfupp : double_float ) return Vector is res : Vector(v'first..v'last+1); begin res(v'range) := v; res(res'last) := Random_Lift(lflow,lfupp); return res; end Random_Lift; function Random_Lift ( l : List; lflow,lfupp : double_float ) return List is res,res_last : List; tmp : List := l; begin while not Is_Null(tmp) loop Append(res,res_last,Random_Lift(Head_Of(tmp).all,lflow,lfupp)); tmp := Tail_Of(tmp); end loop; return res; end Random_Lift; function Random_Lift ( l : Arrays_of_Float_Vector_Lists.Array_of_Lists; lflow,lfupp : Vector ) return Arrays_of_Float_Vector_Lists.Array_of_Lists is res : Arrays_of_Float_Vector_Lists.Array_of_Lists(l'range); begin for i in res'range loop res(i) := Random_Lift(l(i),lflow(i),lfupp(i)); end loop; return res; end Random_Lift; -- LINEAR LIFTING FUNCTIONS : function Linear_Lift ( x,v : Vector ) return Vector is res : Vector(x'first..x'last+1); begin res(x'range) := x; res(res'last) := x*v; return res; end Linear_Lift; function Linear_Lift ( f : Face; v : Vector ) return Face is res : Face := new Float_Vectors_of_Vectors.Vector(f'range); begin for i in res'range loop res(i) := new Float_Vectors.Vector'(Linear_Lift(f(i).all,v)); end loop; return res; end Linear_Lift; function Linear_Lift ( l : List; v : Vector ) return List is -- DESCRIPTION : -- Returns a linearly lifted list of points. res,res_last : List; tmp : List := l; begin while not Is_Null(tmp) loop Append(res,res_last,Linear_Lift(Head_Of(tmp).all,v)); tmp := Tail_Of(tmp); end loop; return res; end Linear_Lift; function Linear_Lift ( f : Faces; v : Vector ) return Faces is res,res_last : Faces; tmp : Faces := f; begin while not Is_Null(tmp) loop Append(res,res_last,Linear_Lift(Head_Of(tmp),v)); tmp := Tail_Of(tmp); end loop; return res; end Linear_Lift; -- RANDOM FLOATING-POINT LINEAR LIFTING : function Random ( n : natural; lflow,lfupp : double_float ) return Vector is res : Vector(1..n); begin for i in res'range loop res(i) := Random_Lift(lflow,lfupp); end loop; return res; end Random; -- POLYNOMIAL LIFTING FUNCTIONS : function Polynomial_Lift ( lf : Poly; x : Vector ) return Vector is res : Vector(x'first..x'last+1); begin res(x'range) := x; res(res'last) := REAL_PART(Eval(lf,Flt2Cmplx(x))); return res; end Polynomial_Lift; function Polynomial_Lift ( lf : Eval_Poly; x : Vector ) return Vector is res : Vector(x'first..x'last+1); begin res(x'range) := x; res(res'last) := REAL_PART(Eval(lf,Flt2Cmplx(x))); return res; end Polynomial_Lift; function Polynomial_Lift ( lf : Poly; l : List ) return List is res,res_last,tmp : List; begin tmp := l; while not Is_Null(tmp) loop Append(res,res_last,Polynomial_Lift(lf,Head_Of(tmp).all)); tmp := Tail_Of(tmp); end loop; return res; end Polynomial_Lift; function Polynomial_Lift ( lf : Eval_Poly; l : List ) return List is res,res_last,tmp : List; begin tmp := l; while not Is_Null(tmp) loop Append(res,res_last,Polynomial_Lift(lf,Head_Of(tmp).all)); tmp := Tail_Of(tmp); end loop; return res; end Polynomial_Lift; function Polynomial_Lift ( lf : Poly_Sys; l : Array_of_Lists ) return Array_of_Lists is res : Array_of_Lists(l'range); begin for i in res'range loop res(i) := Polynomial_Lift(lf(i),l(i)); end loop; return res; end Polynomial_Lift; function Polynomial_Lift ( lf : Eval_Poly_Sys; l : Array_of_Lists ) return Array_of_Lists is res : Array_of_Lists(l'range); begin for i in res'range loop res(i) := Polynomial_Lift(lf(i),l(i)); end loop; return res; end Polynomial_Lift; end Float_Lifting_Functions; SHAR_EOF fi # end of overwriting check if test -f 'float_lifting_functions.ads' then echo shar: will not over-write existing file "'float_lifting_functions.ads'" else cat << "SHAR_EOF" > 'float_lifting_functions.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; with Float_Vectors; use Float_Vectors; with Lists_of_Float_Vectors; use Lists_of_Float_Vectors; with Arrays_of_Float_Vector_Lists; use Arrays_of_Float_Vector_Lists; with Float_Faces_of_Polytope; use Float_Faces_of_Polytope; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; package Float_Lifting_Functions is -- DESCRIPTION : -- This package provides a suite of floating-point lifting functions. -- RANDOM FLOATING-POINT LIFTING : function Random_Lift ( lflow,lfupp : double_float ) return double_float; function Random_Lift ( v : Vector; lflow,lfupp : double_float ) return Vector; function Random_Lift ( l : List; lflow,lfupp : double_float ) return List; function Random_Lift ( l : Array_of_Lists; lflow,lfupp : Vector ) return Array_of_Lists; -- DESCRIPTION : -- Random lifting values between lflow and lfupp. -- LINEAR LIFTING FUNCTIONS : function Linear_Lift ( x,v : Vector ) return Vector; function Linear_Lift ( f : Face; v : Vector ) return Face; function Linear_Lift ( l : List; v : Vector ) return List; function Linear_Lift ( f : Faces; v : Vector ) return Faces; -- DESCRIPTION : -- Returns a linearly lifted vector, list or faces. -- RANDOM FLOATING-POINT LINEAR LIFTING FUNCTIONS : function Random ( n : natural; lflow,lfupp : double_float ) return Vector; -- DESCRIPTION : -- Returns a vector of range 1..n with randomly generated numbers, -- in [lflow,lfupp]. Random linear lifting functions are provided -- by using this randomly generated vector. -- POLYNOMIAL LIFTING FUNCTIONS : function Polynomial_Lift ( lf : Poly; x : Vector ) return Vector; function Polynomial_Lift ( lf : Eval_Poly; x : Vector ) return Vector; function Polynomial_Lift ( lf : Poly; l : List ) return List; function Polynomial_Lift ( lf : Eval_Poly; l : List ) return List; function Polynomial_Lift ( lf : Poly_Sys; l : Array_of_Lists ) return Array_of_Lists; function Polynomial_Lift ( lf : Eval_Poly_Sys; l : Array_of_Lists ) return Array_of_Lists; end Float_Lifting_Functions; SHAR_EOF fi # end of overwriting check if test -f 'float_lifting_utilities.adb' then echo shar: will not over-write existing file "'float_lifting_utilities.adb'" else cat << "SHAR_EOF" > 'float_lifting_utilities.adb' package body Float_Lifting_Utilities is function Adaptive_Lifting ( l : Array_of_Lists ) return Vector is res : Vector(l'range); fac : constant double_float := 3.0; -- multiplication factor max : constant double_float := 23.0; -- upper bound for lifting begin for i in l'range loop res(i) := fac*double_float(Length_Of(l(i))); if res(i) > max then res(i) := max; end if; end loop; return res; end Adaptive_Lifting; procedure Search_Lifting ( l : in List; pt : in Vector; found : out boolean; lif : out double_float ) is tmp : List := l; lpt : Link_to_Vector; begin found := false; while not Is_Null(tmp) loop lpt := Head_Of(tmp); if Equal(lpt(pt'range),pt) then found := true; lif := lpt(lpt'last); exit; else tmp := Tail_Of(tmp); end if; end loop; end Search_Lifting; function Search_and_Lift ( l : List; pt : Vector ) return Vector is tmp : List := l; lpt : Link_to_Vector; begin while not Is_Null(tmp) loop lpt := Head_Of(tmp); if Equal(lpt(pt'range),pt) then return lpt.all; else tmp := Tail_Of(tmp); end if; end loop; return pt; end Search_and_Lift; function Search_and_Lift ( mic : Mixed_Cell; k : natural; pt : Vector ) return Vector is begin return Search_and_Lift(mic.pts(k),pt); end Search_and_Lift; function Induced_Lifting ( mixsub : Mixed_Subdivision; k : natural; pt : Vector ) return Vector is tmp : Mixed_Subdivision := mixsub; res : Vector(pt'first..pt'last+1); begin while not Is_Null(tmp) loop declare mic : Mixed_Cell := Head_Of(tmp); lpt : constant Vector := Search_and_Lift(mic,k,pt); begin if lpt'length = pt'length+1 then return lpt; else tmp := Tail_Of(tmp); end if; end; end loop; res(pt'range) := pt; res(res'last) := 1.0; res(res'last) := Conservative_Lifting(mixsub,k,res); return res; end Induced_Lifting; function Induced_Lifting ( n : natural; mix : Integer_Vectors.Vector; points : Array_of_Lists; mixsub : Mixed_Subdivision ) return Array_of_Lists is res,res_last : Array_of_Lists(mix'range); cnt : natural := 1; tmp : List; begin for k in mix'range loop res_last(k) := res(k); tmp := points(cnt); while not Is_Null(tmp) loop declare pt : Link_to_Vector := Head_Of(tmp); lpt : constant Vector := Induced_Lifting(mixsub,k,pt.all); begin Append(res(k),res_last(k),lpt); end; tmp := Tail_Of(tmp); end loop; cnt := cnt + mix(k); end loop; return res; end Induced_Lifting; function Conservative_Lifting ( mic : Mixed_Cell; k : natural; point : Vector ) return double_float is sp : double_float := mic.nor*Head_Of(mic.pts(k)); spp : double_float:= mic.nor.all*point; res : double_float; begin if sp < spp then return point(point'last); else if mic.nor(mic.nor'last) = 0.0 then res := point(point'last); else spp := spp - point(point'last)*mic.nor(mic.nor'last); res := (sp - spp)/mic.nor(mic.nor'last) + 1.0; end if; return res; end if; end Conservative_Lifting; function Conservative_Lifting ( mixsub : Mixed_Subdivision; k : natural; point : Vector ) return double_float is tmp : Mixed_Subdivision := mixsub; pt : Vector(point'range) := point; res : double_float; begin while not Is_Null(tmp) loop pt(pt'last) := Conservative_Lifting(Head_Of(tmp),k,pt); tmp := Tail_Of(tmp); end loop; res := pt(pt'last); Clear(pt); return res; end Conservative_Lifting; end Float_Lifting_Utilities; SHAR_EOF fi # end of overwriting check if test -f 'float_lifting_utilities.ads' then echo shar: will not over-write existing file "'float_lifting_utilities.ads'" else cat << "SHAR_EOF" > 'float_lifting_utilities.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; with Integer_Vectors; with Float_Vectors; use Float_Vectors; with Lists_of_Float_Vectors; use Lists_of_Float_Vectors; with Float_Mixed_Subdivisions; use Float_Mixed_Subdivisions; with Arrays_of_Float_Vector_Lists; use Arrays_of_Float_Vector_Lists; package Float_Lifting_Utilities is -- DESCRIPTION : -- This package provides some utilities for dealing with lifting functions. function Adaptive_Lifting ( l : Array_of_Lists ) return Vector; -- DESCRIPTION : -- Returns upper bounds for a random lifting, depending on the lengths -- of the lists in l. procedure Search_Lifting ( l : in List; pt : in Vector; found : out boolean; lif : out double_float ); -- DESCRIPTION : -- Searches the lifting of the point in the lifted list l. -- If found, then lif equals the lifting, otherwise lif is meaningless. function Search_and_Lift ( l : List; pt : Vector ) return Vector; -- DESCRIPTION : -- Given a lifted list of points and a unlifted vector, the function -- either returns the corresponding lifted vector from the list, or -- the same point, when there is no lifted point in l whose projection -- equals the given point pt. function Induced_Lifting ( mixsub : Mixed_Subdivision; k : natural; pt : Vector ) return Vector; function Induced_Lifting ( n : natural; mix : Integer_Vectors.Vector; points : Array_of_Lists; mixsub : Mixed_Subdivision ) return Array_of_Lists; -- DESCRIPTION : -- Given a mixed subdivision for a tuple of supports, -- then the lifted points will be returned as induced by the -- subdivision. When points do not occur in the mixed subdivision, -- they will be lifted conservatively. function Conservative_Lifting ( mic : Mixed_Cell; k : natural; point : Vector ) return double_float; function Conservative_Lifting ( mixsub : Mixed_Subdivision; k : natural; point : Vector ) return double_float; -- DESCRIPTION : -- Returns the value of the conservative lifting function of the point -- to be considered w.r.t. the kth polytope. -- REQUIRED : -- The given point must already be in the lifted space and its last -- coordinate must contain already a lower bound for the lifting value. end Float_Lifting_Utilities; SHAR_EOF fi # end of overwriting check if test -f 'float_mixed_subdivisions.adb' then echo shar: will not over-write existing file "'float_mixed_subdivisions.adb'" else cat << "SHAR_EOF" > 'float_mixed_subdivisions.adb' with unchecked_deallocation; with Float_Matrices; use Float_Matrices; with Float_Support_Functions; use Float_Support_Functions; package body Float_Mixed_Subdivisions is -- CREATORS : function Create ( pts : Array_of_Lists; nor : Vector; tol : double_float ) return Mixed_Cell is res : Mixed_Cell; sup : double_float; begin res.nor := new Vector'(nor); res.pts := new Array_of_Lists(pts'range); for k in pts'range loop sup := Minimal_Support(pts(k),nor); res.pts(k) := Face(pts(k),nor,sup,tol); end loop; return res; end Create; function Create ( pts : Array_of_Lists; nors : List; tol : double_float ) return Mixed_Subdivision is res,res_last : Mixed_Subdivision; tmp : List := nors; begin while not Is_Null(tmp) loop Append(res,res_last,Create(pts,Head_Of(tmp).all,tol)); tmp := Tail_Of(tmp); end loop; return res; end Create; function Create ( pts : Array_of_Lists; mixsub : Mixed_Subdivision; tol : double_float ) return Mixed_Subdivision is tmp,res,res_last : Mixed_Subdivision; begin tmp := mixsub; while not Is_Null(tmp) loop Append(res,res_last,Create(pts,Head_Of(tmp).nor.all,tol)); tmp := Tail_Of(tmp); end loop; return res; end Create; procedure Update ( pts : in Array_of_Lists; nor : in Vector; mixsub,mixsub_last : in out Mixed_Subdivision ) is -- DESCRIPTION : -- Given a tuple of point sets and a normal, -- the mixed subdivision will be updated. tmp : Mixed_Subdivision := mixsub; done : boolean := false; begin while not Is_Null(tmp) and not done loop declare mic : Mixed_Cell := Head_Of(tmp); last : List; begin if Equal(mic.nor.all,nor) then for k in mic.pts'range loop last := mic.pts(k); while not Is_Null(Tail_Of(last)) loop last := Tail_Of(last); end loop; Deep_Concat_Diff(mic.pts(k),last,pts(k)); end loop; Set_Head(tmp,mic); done := true; else tmp := Tail_Of(tmp); end if; end; end loop; if not done then declare mic : Mixed_Cell; begin mic.pts := new Array_of_Lists(pts'range); Copy(pts,mic.pts.all); mic.nor := new Float_Vectors.Vector'(nor); mic.sub := null; Append(mixsub,mixsub_last,mic); end; end if; end Update; -- CONSTRUCTORS : procedure Copy ( mic1 : in Mixed_Cell; mic2 : in out Mixed_Cell ) is begin Deep_Clear(mic2); if mic1.nor /= null then mic2.nor := new Float_Vectors.Vector'(mic1.nor.all); end if; if mic1.pts /= null then mic2.pts := new Array_of_Lists(mic1.pts'range); Copy(mic1.pts.all,mic2.pts.all); end if; if mic1.sub /= null then mic2.sub := new Mixed_Subdivision; Copy(mic1.sub.all,mic2.sub.all); end if; end Copy; procedure Copy ( mixsub1 : in Mixed_Subdivision; mixsub2 : in out Mixed_Subdivision ) is tmp : Mixed_Subdivision := mixsub1; mixsub2_last : Mixed_Subdivision; begin Deep_Clear(mixsub2); while not Is_Null(tmp) loop declare mic1,mic2 : Mixed_Cell; begin mic1 := Head_Of(tmp); Copy(mic1,mic2); Append(mixsub2,mixsub2_last,mic2); end; tmp := Tail_Of(tmp); end loop; end Copy; procedure Append_Diff ( first,last : in out Mixed_Subdivision; mic : in Mixed_Cell ) is begin if not Is_In(first,mic) then Append(first,last,mic); end if; end Append_Diff; procedure Concat_Diff ( first,last : in out Mixed_Subdivision; mixsub : in Mixed_Subdivision ) is tmp : Mixed_Subdivision := mixsub; begin while not Is_Null(tmp) loop declare mic : Mixed_Cell := Head_Of(tmp); begin if not Is_In(first,mic) then Append_Diff(first,last,mic); end if; end; tmp := Tail_Of(tmp); end loop; end Concat_Diff; procedure Construct ( mixsub : in Mixed_Subdivision; first : in out Mixed_Subdivision ) is tmp : Mixed_Subdivision := mixsub; begin while not Is_Null(tmp) loop declare mic : Mixed_Cell := Head_Of(tmp); begin Construct(mic,first); end; tmp := Tail_Of(tmp); end loop; end Construct; procedure Construct_Diff ( mixsub : in Mixed_Subdivision; first : in out Mixed_Subdivision ) is tmp : Mixed_Subdivision := mixsub; begin while not Is_Null(tmp) loop declare mic : Mixed_Cell := Head_Of(tmp); begin if not Is_In(first,mic) then Construct(mic,first); end if; end; tmp := Tail_Of(tmp); end loop; end Construct_Diff; -- SELECTORS : function Is_Equal ( mic1,mic2 : Mixed_Cell ) return boolean is begin if not Equal(mic1.nor,mic2.nor) then return false; elsif Is_Equal(mic1.pts,mic2.pts) then return Is_Equal(mic1.sub,mic2.sub); else return false; end if; end Is_Equal; function Is_Sub ( mixsub1,mixsub2 : Mixed_Subdivision ) return boolean is -- DESCRIPTION : -- Returns true when every cell in mixsub1 also belongs to mixsub2. tmp : Mixed_Subdivision := mixsub1; begin while not Is_Null(tmp) loop if not Is_In(mixsub2,Head_Of(tmp)) then return false; else tmp := Tail_Of(tmp); end if; end loop; return true; end Is_Sub; function Is_Equal ( mixsub1,mixsub2 : Mixed_Subdivision ) return boolean is begin if Is_Sub(mixsub1,mixsub2) then return Is_Sub(mixsub2,mixsub1); else return false; end if; end Is_Equal; function Is_Equal ( mixsub1,mixsub2 : Link_to_Mixed_Subdivision ) return boolean is begin if mixsub1 = null and then mixsub2 /= null then return false; elsif mixsub2 = null then return true; else return Is_Equal(mixsub1.all,mixsub2.all); end if; end Is_Equal; function Is_In ( mixsub : Mixed_Subdivision; normal : Vector ) return boolean is tmp : Mixed_Subdivision := mixsub; c : Mixed_Cell; begin while not Is_Null(tmp) loop c := Head_Of(tmp); if Equal(c.nor.all,normal) then return true; end if; tmp := Tail_Of(tmp); end loop; return false; end Is_In; function Is_In ( mixsub : Mixed_Subdivision; mic : Mixed_Cell ) return boolean is tmp : Mixed_Subdivision := mixsub; mic1 : Mixed_Cell; begin while not Is_Null(tmp) loop mic1 := Head_Of(tmp); if Is_Equal(mic1,mic) then return true; else tmp := Tail_Of(tmp); end if; end loop; return false; end Is_In; -- DESTRUCTORS : procedure free is new unchecked_deallocation (Mixed_Subdivision,Link_to_Mixed_Subdivision); procedure Deep_Clear ( mic : in out Mixed_Cell ) is begin Clear(mic.nor); Deep_Clear(mic.pts); Deep_Clear(mic.sub); end Deep_Clear; procedure Shallow_Clear ( mic : in out Mixed_Cell ) is begin Clear(mic.nor); Shallow_Clear(mic.pts); Shallow_Clear(mic.sub); end Shallow_Clear; procedure Deep_Clear ( mixsub : in out Mixed_Subdivision ) is tmp : Mixed_Subdivision; begin tmp := mixsub; while not Is_Null(tmp) loop declare mic : Mixed_Cell := Head_Of(tmp); begin Deep_Clear(mic); end; tmp := Tail_Of(tmp); end loop; Shallow_Clear(mixsub); end Deep_Clear; procedure Deep_Clear ( mixsub : in out Link_to_Mixed_Subdivision ) is begin if mixsub /= null then Deep_Clear(mixsub.all); free(mixsub); end if; end Deep_Clear; procedure Shallow_Clear ( mixsub : in out Mixed_Subdivision ) is begin Lists_of_Mixed_Cells.Clear(Lists_of_Mixed_Cells.List(mixsub)); end Shallow_Clear; procedure Shallow_Clear ( mixsub : in out Link_to_Mixed_Subdivision ) is begin if mixsub /= null then Shallow_Clear(mixsub.all); free(mixsub); end if; end Shallow_Clear; end Float_Mixed_Subdivisions; SHAR_EOF fi # end of overwriting check if test -f 'float_mixed_subdivisions.ads' then echo shar: will not over-write existing file "'float_mixed_subdivisions.ads'" else cat << "SHAR_EOF" > 'float_mixed_subdivisions.ads' with Lists; with Floating_Point_Numbers; use Floating_Point_Numbers; with Float_Vectors; use Float_Vectors; with Lists_of_Float_Vectors; use Lists_of_Float_Vectors; with Arrays_of_Float_Vector_Lists; use Arrays_of_Float_Vector_Lists; package Float_Mixed_Subdivisions is -- DESCRIPTION : -- This package enables working with regular mixed subdivisions. -- DATA STRUCTURES : type Mixed_Subdivision; -- list of mixed cells type Link_to_Mixed_Subdivision is access Mixed_Subdivision; type Mixed_Cell is record nor : Link_to_Vector; -- inner normal to the facet pts : Link_to_Array_of_Lists; -- points that span the cell sub : Link_to_Mixed_Subdivision; -- subdivision of the cell end record; package Lists_of_Mixed_Cells is new Lists(Mixed_Cell); type Mixed_Subdivision is new Lists_of_Mixed_Cells.List; -- CREATORS : function Create ( pts : Array_of_Lists; nor : Vector; tol : double_float ) return Mixed_Cell; function Create ( pts : Array_of_Lists; nors : List; tol : double_float ) return Mixed_Subdivision; -- DESCRIPTION : -- Creates the mixed cell(s) of those points whose inner product -- with the given normal(s) is minimal. -- The parameter tol is the tolerance on the precision. function Create ( pts : Array_of_Lists; mixsub : Mixed_Subdivision; tol : double_float ) return Mixed_Subdivision; -- DESCRIPTION : -- Takes the normals of the cells in the given mixed subdivision -- and creates the mixed cells by selecting the points whose inner -- product with the normals are minimal. procedure Update ( pts : in Array_of_Lists; nor : in Vector; mixsub,mixsub_last : in out Mixed_Subdivision ); -- DESCRIPTION : -- Given a tuple of points and a normal, the mixed subdivision will -- be updated: either an existing cell will get additional points, -- if the normal already occurs in the subdivision, or otherwise, -- a new cell will be created and appended to the mixed subdivision. -- CONSTRUCTORS : procedure Copy ( mic1 : in Mixed_Cell; mic2 : in out Mixed_Cell ); procedure Copy ( mixsub1 : in Mixed_Subdivision; mixsub2 : in out Mixed_Subdivision ); -- DESCRIPTION : -- Makes a deep copy of the cells and the subdivisions. procedure Append_Diff ( first,last : in out Mixed_Subdivision; mic : in Mixed_Cell ); -- DESCRIPTION : -- Appends a mixed cell to the list of cells first, where -- last points to the last element of the list first. -- The suffix _Diff means that only when the cell does not already -- belong to the list first, it will be appended. procedure Concat_Diff ( first,last : in out Mixed_Subdivision; mixsub : in Mixed_Subdivision ); -- DESCRIPTION : -- Concatenates all cells in mixsub to the list of cells first, -- last is a pointer to the last cell in first. -- The suffix _Diff means that only when those cells that do not already -- belong to the list first will be appended. procedure Construct ( mixsub : in Mixed_Subdivision; first : in out Mixed_Subdivision ); procedure Construct_Diff ( mixsub : in Mixed_Subdivision; first : in out Mixed_Subdivision ); -- DESCRIPTION : -- Constructs all cells in the mixed subdivision to the front of -- the list first. -- The suffix _Diff means that only when those cells that do not already -- belong to the list first will be constructed to first. -- SELECTORS : function Is_Equal ( mic1,mic2 : Mixed_Cell ) return boolean; function Is_Equal ( mixsub1,mixsub2 : Mixed_Subdivision ) return boolean; function Is_Equal ( mixsub1,mixsub2 : Link_to_Mixed_Subdivision ) return boolean; -- DESCRIPTION : -- Returns true when two mixed cells and mixed subdivisions are equal. function Is_In ( mixsub : Mixed_Subdivision; normal : Vector ) return boolean; function Is_In ( mixsub : Mixed_Subdivision; mic : Mixed_Cell ) return boolean; -- DESCRIPTION : -- Returns true if normal or cell belongs to the mixed subdivision, -- otherwise false is returned. When the whole mixed cell is given, -- then not only the normal, but also the points will be checked. -- DESTRUCTORS : procedure Deep_Clear ( mic : in out Mixed_Cell ); procedure Deep_Clear ( mixsub : in out Mixed_Subdivision ); procedure Deep_Clear ( mixsub : in out Link_to_Mixed_Subdivision ); procedure Shallow_Clear ( mic : in out Mixed_Cell ); procedure Shallow_Clear ( mixsub : in out Mixed_Subdivision ); procedure Shallow_Clear ( mixsub : in out Link_to_Mixed_Subdivision ); -- DESCRIPTION : -- The memory space allocated will be freed. -- A shallow clear only destroys the list structures, -- while with a deep clear, also the contents of the lists are freed. end Float_Mixed_Subdivisions; SHAR_EOF fi # end of overwriting check if test -f 'float_mixed_subdivisions_io.adb' then echo shar: will not over-write existing file "'float_mixed_subdivisions_io.adb'" else cat << "SHAR_EOF" > 'float_mixed_subdivisions_io.adb' with integer_io,Integer_Vectors_io; use integer_io,Integer_Vectors_io; with Floating_Point_Numbers; with Float_Vectors_io; with Lists_of_Float_Vectors_io; with Float_Integer_Convertors; use Float_Integer_Convertors; with Integer_Mixed_Subdivisions; with Mixed_Volume_Computation; use Mixed_Volume_Computation; package body Float_Mixed_Subdivisions_io is use Floating_Point_Numbers.double_float_io; -- AUXILIARY : procedure Mixed_Volume ( n : in natural; mix : in Integer_Vectors.Vector; mic : in out Mixed_Cell; mv : out natural ) is intmic : Integer_Mixed_Subdivisions.Mixed_Cell; intsub : Integer_Mixed_Subdivisions.Mixed_Subdivision; use Integer_Mixed_Subdivisions; begin if mic.sub /= null then intsub := Convert(mic.sub.all); Mixed_Volume(n,mix,intsub,mv); Deep_Clear(intsub); else intmic := Convert(mic); Mixed_Volume(n,mix,intmic,mv); if intmic.sub /= null then mic.sub := new Float_Mixed_Subdivisions. Mixed_Subdivision'(Convert(intmic.sub.all)); end if; Deep_Clear(intmic); end if; end Mixed_Volume; -- INPUT ROUTINES : procedure get ( n,m : in natural; mic : out Mixed_Cell ) is begin get(Standard_Input,n,m,mic); end get; procedure get ( file : in file_type; n,m : in natural; mic : out Mixed_Cell ) is adl : Array_of_Lists(1..m); l : natural; begin Float_Vectors_io.get(file,n+1,mic.nor); for k in 1..m loop get(file,l); Lists_of_Float_Vectors_io.get(file,n+1,l,adl(k)); end loop; mic.pts := new Array_of_Lists'(adl); get(file,l); if l /= 0 then declare nn,mm : natural; mix : Integer_Vectors.Link_to_Vector; sub : Mixed_Subdivision; begin get(file,nn,mm,mix,sub); if not Is_Null(sub) then mic.sub := new Mixed_Subdivision'(sub); end if; end; end if; end get; procedure get ( n,m : out natural; mixed_type : out Integer_Vectors.Link_to_Vector; mixsub : out Mixed_Subdivision ) is begin get(Standard_Input,n,m,mixed_type,mixsub); end get; procedure get ( file : in file_type; n,m : out natural; mixed_type : out Integer_Vectors.Link_to_Vector; mixsub : out Mixed_Subdivision ) is res,res_last : Mixed_Subdivision; l,nn,mm : natural; begin get(file,nn); n := nn; get(file,mm); m := mm; get(file,mm,mixed_type); get(file,l); for k in 1..l loop declare mic : Mixed_Cell; begin get(file,nn,mm,mic); Append(res,res_last,mic); end; end loop; mixsub := res; end get; -- OUTPUT ROUTINES : procedure put ( lifvec : in Float_Vectors.Vector ) is begin put(Standard_Output,lifvec); end put; procedure put ( file : in file_type; lifvec : in Float_Vectors.Vector ) is begin for i in lifvec'first..lifvec'last-1 loop text_io.put(file,' '); put(file,lifvec(i),1,0,0); end loop; text_io.put(file,' '); put(file,lifvec(lifvec'last)); end put; procedure put ( lifsup : in List ) is begin put(Standard_Output,lifsup); end put; procedure put ( file : in file_type; lifsup : in List ) is tmp : List := lifsup; begin while not Is_Null(tmp) loop put(file,Head_Of(tmp).all); new_line(file); tmp := Tail_Of(tmp); end loop; end put; procedure put ( lifsup : in Array_of_Lists ) is begin put(Standard_Output,lifsup); end put; procedure put ( file : in file_type; lifsup : in Array_of_Lists ) is begin for i in lifsup'range loop put(file,lifsup(i)); new_line(file); end loop; end put; procedure put ( n : in natural; mix : in Integer_Vectors.Vector; mic : in Mixed_Cell ) is begin put(Standard_Output,n,mix,mic); end put; procedure put ( n : in natural; mix : in Integer_Vectors.Vector; mic : in out Mixed_Cell; mv : out natural ) is begin put(Standard_Output,n,mix,mic,mv); end put; procedure put ( file : in file_type; n : in natural; mix : in Integer_Vectors.Vector; mic : in Mixed_Cell ) is begin for i in mic.nor'range loop put(file,mic.nor(i)); new_line(file); end loop; for k in mic.pts'range loop put(file,Length_Of(mic.pts(k)),1); new_line(file); put(file,mic.pts(k)); end loop; if mic.sub = null then put(file,0,1); new_line(file); else put(file,1,1); new_line(file); put(file,n,mix,mic.sub.all); end if; end put; procedure put ( file : in file_type; n : in natural; mix : in Integer_Vectors.Vector; mic : in out Mixed_Cell; mv : out natural ) is begin text_io.put_line(file," normal to cell : "); for i in mic.nor'range loop put(file,mic.nor(i)); new_line(file); end loop; text_io.put_line(file," the points in the cell : "); for k in mic.pts'range loop text_io.put(file," component "); put(file,k,1); text_io.put(file," with "); put(file,Length_Of(mic.pts(k)),1); text_io.put_line(file," points :"); put(file,mic.pts(k)); end loop; Mixed_Volume(n,mix,mic,mv); if mic.sub /= null then text_io.put_line(file," with refinement : "); put(file,n,mix,mic.sub.all,mv); end if; end put; procedure put ( n : in natural; mix : in Integer_Vectors.Vector; mixsub : in Mixed_Subdivision ) is begin put(Standard_Output,n,mix,mixsub); end put; procedure put ( n : in natural; mix : in Integer_Vectors.Vector; mixsub : in out Mixed_Subdivision; mv : out natural ) is begin put(Standard_Output,n,mix,mixsub,mv); end put; procedure put ( file : in file_type; n : in natural; mix : in Integer_Vectors.Vector; mixsub : in Mixed_Subdivision ) is tmp : Mixed_Subdivision := mixsub; begin put(file,n,1); new_line(file); put(file,mix'last,1); new_line(file); put(file,mix); new_line(file); put(file,Length_Of(mixsub),1); new_line(file); while not Is_Null(tmp) loop put(file,n,mix,Head_Of(tmp)); tmp := Tail_Of(tmp); end loop; end put; procedure put ( file : in file_type; n : in natural; mix : in Integer_Vectors.Vector; mixsub : in out Mixed_Subdivision; mv : out natural ) is tmp : Mixed_Subdivision := mixsub; cnt,res : natural := 0; vol : natural; begin text_io.put(file,"Dimension without lifting : "); put(file,n,1); new_line(file); text_io.put(file,"Number of different supports : "); put(file,mix'last,1); new_line(file); text_io.put(file,"Type of mixture : "); put(file,mix); new_line(file); put_line(file,"The cells in the subdivision :"); while not Is_Null(tmp) loop cnt := cnt + 1; text_io.put(file,"Cell "); put(file,cnt,1); text_io.put_line(file," :"); declare mic : Mixed_Cell := Head_Of(tmp); begin put(file,n,mix,mic,vol); Set_Head(tmp,mic); end; text_io.put(file,"==> Volume : "); put(file,vol,1); put_line(file,"."); res := res + vol; tmp := Tail_Of(tmp); end loop; mv := res; end put; end Float_Mixed_Subdivisions_io; SHAR_EOF fi # end of overwriting check if test -f 'float_mixed_subdivisions_io.ads' then echo shar: will not over-write existing file "'float_mixed_subdivisions_io.ads'" else cat << "SHAR_EOF" > 'float_mixed_subdivisions_io.ads' with text_io; use text_io; with Integer_Vectors,Float_Vectors; with Lists_of_Float_Vectors; use Lists_of_Float_Vectors; with Arrays_of_Float_Vector_Lists; use Arrays_of_Float_Vector_Lists; with Float_Mixed_Subdivisions; use Float_Mixed_Subdivisions; package Float_Mixed_Subdivisions_io is -- DESCRIPTION : -- This package provides some routines for i/o of mixed subdivisions, -- induced by a floating-point lifting. procedure get ( n,m : in natural; mic : out Mixed_Cell ); procedure get ( file : in file_type; n,m : in natural; mic : out Mixed_Cell ); -- DESCRIPTION : -- Reads the normal and for each list of points, the length -- of the list and the list itself from standard input or from file. procedure get ( n,m : out natural; mixed_type : out Integer_Vectors.Link_to_Vector; mixsub : out Mixed_Subdivision ); procedure get ( file : in file_type; n,m : out natural; mixed_type : out Integer_Vectors.Link_to_Vector; mixsub : out Mixed_Subdivision ); -- DESCRIPTION : -- Reads the dimension, the number of different supports, -- the type of mixture, the number of mixed cells and the mixed -- subdivision from standard input or from file. procedure put ( lifvec : in Float_Vectors.Vector ); procedure put ( file : in file_type; lifvec : in Float_Vectors.Vector ); procedure put ( lifsup : in List ); procedure put ( file : in file_type; lifsup : in List ); procedure put ( lifsup : in Array_of_Lists ); procedure put ( file : in file_type; lifsup : in Array_of_Lists ); -- DESCRIPTION : -- Writes the lifted vectors on file or on standard output. -- The format uses fixed point format for the integer entries. procedure put ( n : in natural; mix : in Integer_Vectors.Vector; mic : in Mixed_Cell ); procedure put ( n : in natural; mix : in Integer_Vectors.Vector; mic : in out Mixed_Cell; mv : out natural); procedure put ( file : in file_type; n : in natural; mix : in Integer_Vectors.Vector; mic : in Mixed_Cell ); procedure put ( file : in file_type; n : in natural; mix : in Integer_Vectors.Vector; mic : in out Mixed_Cell; mv : out natural ); -- DESCRIPTION : -- Puts the normal, the length of each point list and the -- points belonging to the cell on standard output or on file. -- More text banners are provided when the parameter `mv' is supplied. -- This `mv' contains the mixed volume of the cell on return. -- When the mixed volume is computed, eventually the cell is refined. procedure put ( n : in natural; mix : in Integer_Vectors.Vector; mixsub : in Mixed_Subdivision ); procedure put ( n : in natural; mix : in Integer_Vectors.Vector; mixsub : in out Mixed_Subdivision; mv : out natural ); procedure put ( file : in file_type; n : in natural; mix : in Integer_Vectors.Vector; mixsub : in Mixed_Subdivision ); procedure put ( file : in file_type; n : in natural; mix : in Integer_Vectors.Vector; mixsub : in out Mixed_Subdivision; mv : out natural ); -- DESCRIPTION : -- Puts the dimension, the type of mixture, the number of mixed -- cells and the mixed subdivision on file or on standard output. -- More text banners are provided when the parameter `mv' is supplied. -- This `mv' contains the mixed volume of the cell on return. -- When the mixed volume is computed, eventually the cells are refined. end Float_Mixed_Subdivisions_io; SHAR_EOF fi # end of overwriting check if test -f 'float_polyhedral_continuation.adb' then echo shar: will not over-write existing file "'float_polyhedral_continuation.adb'" else cat << "SHAR_EOF" > 'float_polyhedral_continuation.adb' with integer_io; use integer_io; with Floating_Point_Numbers; use Floating_Point_Numbers; with Mathematical_Functions; use Mathematical_Functions; with Float_Vectors; with Float_Vectors_of_Vectors; with Integer_Vectors_of_Vectors; with Complex_Multivariate_Polynomials; with Complex_Multivariate_Laurent_Polynomials; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Laurent_to_Polynomial_Converters; use Laurent_to_Polynomial_Converters; with Float_Integer_Convertors; use Float_Integer_Convertors; with Lists_of_Float_Vectors; use Lists_of_Float_Vectors; with Float_Lifting_Utilities; use Float_Lifting_Utilities; with Substitutors; use Substitutors; with Transforming_Integer_Vector_Lists; use Transforming_Integer_Vector_Lists; with Transforming_Laurent_Systems; use Transforming_Laurent_Systems; with Complex_Matrices; use Complex_Matrices; with Complex_Numbers,Complex_Norms; use Complex_Numbers,Complex_Norms; with Complex_Vectors; with Continuation_Parameters; with Increment_and_Fix_Continuation; use Increment_and_Fix_Continuation; with Fewnomials; with BKK_Bound_Computations; use BKK_Bound_Computations; package body Float_Polyhedral_Continuation is -- UTILITIES FOR POLYHEDRAL COEFFICIENT HOMOTOPY : function Power ( x,m : double_float ) return double_float is -- DESCRIPTION : -- Computes x**m for high powers of m to avoid RANGE_ERROR. -- intm : integer := integer(m); -- fltm : double_float; begin -- if m < 10.0 -- then return (x**m); -- GNAT is better at this -- else if double_float(intm) > m -- then intm := intm-1; -- end if; -- fltm := m - double_float(intm); -- return ((x**intm)*(x**fltm)); -- end if; end Power; function Minimum ( v : Float_Vectors.Vector ) return double_float is -- DESCRIPTION : -- Returns the minimal element (/= 0) in the vector v. tol : constant double_float := 10.0**(-7); min : double_float := 0.0; tmp : double_float; begin for i in v'range loop tmp := abs(v(i)); if tmp > tol then if (min = 0.0) or else (tmp < min) then min := tmp; end if; end if; end loop; return min; end Minimum; function Scale ( v : Float_Vectors.Vector ) return Float_Vectors.Vector is -- DESCRIPTION : -- Returns the scaled vector such that the minimal element (/= 0) -- equals one. res : Float_Vectors.Vector(v'range); min : constant double_float := Minimum(v); begin if (min /= 0.0) and (min /= 1.0) then for i in res'range loop res(i) := double_float(v(i))/double_float(min); end loop; else res := v; end if; return res; end Scale; function Scale ( v : Float_Vectors_of_Vectors.Vector ) return Float_Vectors_of_Vectors.Vector is -- DESCRIPTION : -- Returns an array of scaled vectors. res : Float_Vectors_of_Vectors.Vector(v'range); begin for i in v'range loop declare sv : constant Float_Vectors.Vector := Scale(v(i).all); begin res(i) := new Float_Vectors.Vector'(sv); end; end loop; return res; end Scale; procedure Shift ( v : in out Float_Vectors.Vector ) is -- DESCRIPTION : -- Shifts the elements in v, such that the minimal element equals zero. min : double_float := v(v'first); begin for i in v'first+1..v'last loop if v(i) < min then min := v(i); end if; end loop; if min /= 0.0 then for i in v'range loop v(i) := v(i) - min; end loop; end if; end Shift; function Allocate ( c : Complex_Vectors_of_Vectors.Vector ) return Complex_Vectors_of_Vectors.Vector is res : Complex_Vectors_of_Vectors.Vector(c'range); begin for i in res'range loop res(i) := new Complex_Vectors.Vector'(c(i)'range => CMPLX(0.0)); end loop; return res; end Allocate; function Allocate ( n : natural; mix : Integer_Vectors.Vector; l : Array_of_Lists ) return Float_Vectors_of_Vectors.Vector is res : Float_Vectors_of_Vectors.Vector(1..n); cnt : natural := 1; begin for i in mix'range loop res(cnt) := new Float_Vectors.Vector'(1..Length_Of(l(i)) => 0.0); for j in 1..(mix(i)-1) loop res(cnt+j) := new Float_Vectors.Vector'(res(cnt).all); end loop; cnt := cnt + mix(i); end loop; return res; end Allocate; function Create ( l : List; normal : Float_Vectors.Vector ) return Float_Vectors.Vector is -- DESCRIPTION : -- Returns a vector with all inner products of the normal with -- the exponents in the list, such that minimal value equals zero. res : Float_Vectors.Vector(1..Length_Of(l)); tmp : List := l; use Float_Vectors; begin for i in res'range loop res(i) := Head_Of(tmp).all*normal; tmp := Tail_Of(tmp); end loop; Shift(res); return res; end Create; function Create ( l : Array_of_Lists; mix : Integer_Vectors.Vector; normal : Float_Vectors.Vector ) return Float_Vectors_of_Vectors.Vector is res : Float_Vectors_of_Vectors.Vector(normal'first..normal'last-1); cnt : natural := res'first; begin for i in mix'range loop res(cnt) := new Float_Vectors.Vector'(Create(l(i),normal)); for j in 1..(mix(i)-1) loop res(cnt+j) := new Float_Vectors.Vector'(res(cnt).all); end loop; cnt := cnt + mix(i); end loop; return res; end Create; procedure Eval ( c : in Complex_Vectors.Vector; t : in double_float; m : in Float_Vectors.Vector; ctm : in out Complex_Vectors.Vector ) is -- DESCRIPTION : ctm = c*t**m. begin for i in ctm'range loop -- ctm(i) := c(i)*CMPLX((t**m(i))); ctm(i) := c(i)*CMPLX(Power(t,m(i))); end loop; end Eval; procedure Eval ( c : in Complex_Vectors_of_Vectors.Vector; t : in double_float; m : in Float_Vectors_of_Vectors.Vector; ctm : in out Complex_Vectors_of_Vectors.Vector ) is -- DESCRIPTION : ctm = c*t**m. begin for i in ctm'range loop Eval(c(i).all,t,m(i).all,ctm(i).all); end loop; end Eval; -- USEFUL PRIMITIVES : function Is_In ( l : List; d : Complex_Multivariate_Laurent_Polynomials.Degrees ) return boolean is -- DESCRIPTION : -- Returns true if the degrees belong to the list l. tmp : List := l; pt : Float_Vectors.Link_to_Vector; fld : Float_Vectors.Vector(d'range); equ : boolean; begin for i in fld'range loop fld(i) := double_float(d(i)); end loop; while not Is_Null(tmp) loop pt := Head_Of(tmp); equ := true; for i in fld'range loop if pt(i) /= fld(i) then equ := false; end if; exit when not equ; end loop; if equ then return true; else tmp := Tail_Of(tmp); end if; end loop; return false; end Is_In; function Select_Terms ( p : Complex_Multivariate_Laurent_Polynomials.Poly; l : List ) return Complex_Multivariate_Laurent_Polynomials.Poly is use Complex_Multivariate_Laurent_Polynomials; res : Poly := Null_Poly; procedure Visit_Term ( t : in Term; cont : out boolean ) is begin if Is_In(l,t.dg) then Plus_Term(res,t); end if; cont := true; end Visit_Term; procedure Visit_Terms is new Visiting_Iterator(Visit_Term); begin Visit_Terms(p); return res; end Select_Terms; function Select_Subsystem ( p : Laur_Sys; mix : Integer_Vectors.Vector; mic : Mixed_Cell ) return Laur_Sys is -- DESCRIPTION : -- Given a Laurent polynomial system and a mixed cell, -- the corresponding subsystem will be returned. -- ON ENTRY : -- p a Laurent polynomial system; -- mix type of mixture: occurencies of the supports; -- mic a mixed cell. -- REQUIRED : -- The polynomials in p must be ordered according to the type of mixture. res : Laur_Sys(p'range); cnt : natural := 0; begin for k in mix'range loop for l in 1..mix(k) loop cnt := cnt + 1; res(cnt) := Select_Terms(p(cnt),mic.pts(k)); end loop; end loop; return res; end Select_Subsystem; procedure Extract_Regular ( sols : in out Solution_List ) is function To_Be_Removed ( flag : in natural ) return boolean is begin return ( flag /= 1 ); end To_Be_Removed; procedure Extract_Regular_Solutions is new Solutions.Delete(To_Be_Removed); begin Extract_Regular_Solutions(sols); end Extract_Regular; procedure Refine ( file : in file_type; p : in Laur_Sys; sols : in out Solution_List ) is -- DESCRIPTION : -- Given a polyhedral homotopy p and a list of solution for t=1, -- this list of solutions will be refined. pp : Poly_Sys(p'range) := Laurent_to_Polynomial_System(p); n : constant natural := p'length; eps : constant double_float := 10.0**(-12); tolsing : constant double_float := 10.0**(-8); max : constant natural := 3; numb : natural := 0; begin pp := Laurent_to_Polynomial_System(p); Substitute(n+1,CMPLX(1.0),pp); -- Reporting_Root_Refiner(file,pp,sols,eps,eps,tolsing,numb,max,false); Clear(pp); Extract_Regular(sols); end Refine; -- FIRST LAYER OF CONTINUATION ROUTINES : procedure Mixed_Continuation ( mix : in Integer_Vectors.Vector; lifted : in Array_of_Lists; h : in Eval_Coeff_Laur_Sys; c : in Complex_Vectors_of_Vectors.Vector; j : in Eval_Coeff_Jacobi; m : in Mult_Factors; normal : in Float_Vectors.Vector; sols : in out Solution_List ) is pow : Float_Vectors_of_Vectors.Vector(c'range) := Create(lifted,mix,normal); -- scapow : Float_Vectors_of_Vectors.Vector(c'range) := Scale(pow); ctm : Complex_Vectors_of_Vectors.Vector(c'range); use Complex_Multivariate_Laurent_Polynomials; function Eval ( x : Complex_Vectors.Vector; t : double_complex ) return Complex_Vectors.Vector is begin -- Eval(c,REAL_PART(t),scapow,ctm); Eval(c,REAL_PART(t),pow,ctm); return Eval(h,ctm,x); end Eval; function dHt ( x : Complex_Vectors.Vector; t : double_complex ) return Complex_Vectors.Vector is res : Complex_Vectors.Vector(h'range); xtl : constant integer := x'last+1; begin -- Eval(c,REAL_PART(t),scapow,ctm); Eval(c,REAL_PART(t),pow,ctm); for i in res'range loop res(i) := Eval(j(i,xtl),m(i,xtl).all,ctm(i).all,x); end loop; return res; end dHt; function dHx ( x : Complex_Vectors.Vector; t : double_complex ) return matrix is mt : Matrix(x'range,x'range); begin -- Eval(c,REAL_PART(t),scapow,ctm); Eval(c,REAL_PART(t),pow,ctm); for k in mt'range(1) loop for l in mt'range(2) loop mt(k,l) := Eval(j(k,l),m(k,l).all,ctm(k).all,x); end loop; end loop; return mt; end dHx; procedure Laur_Cont is new Silent_Continue(Norm1,Eval,dHt,dHx); begin for i in ctm'range loop ctm(i) := new Complex_Vectors.Vector'(c(i).all); end loop; Laur_Cont(sols,false); Float_Vectors_of_Vectors.Clear(pow); -- Float_Vectors_of_Vectors.Clear(scapow); Complex_Vectors_of_Vectors.Clear(ctm); Extract_Regular(sols); end Mixed_Continuation; procedure Mixed_Continuation ( file : in file_type; mix : in Integer_Vectors.Vector; lifted : in Array_of_Lists; h : in Eval_Coeff_Laur_Sys; c : in Complex_Vectors_of_Vectors.Vector; j : in Eval_Coeff_Jacobi; m : in Mult_Factors; normal : in Float_Vectors.Vector; sols : in out Solution_List ) is pow : Float_Vectors_of_Vectors.Vector(c'range); -- := Allocate(h'length,mix,lifted); -- := Create(lifted,mix,normal); -- scapow : Float_Vectors_of_Vectors.Vector(c'range) := Scale(pow); ctm : Complex_Vectors_of_Vectors.Vector(c'range); -- := Allocate(c); cnt : natural; tmp : List; use Float_Vectors; use Complex_Multivariate_Laurent_Polynomials; function Eval ( x : Complex_Vectors.Vector; t : double_complex ) return Complex_Vectors.Vector is begin -- Eval(c,REAL_PART(t),scapow,ctm); Eval(c,REAL_PART(t),pow,ctm); return Eval(h,ctm,x); end Eval; function dHt ( x : Complex_Vectors.Vector; t : double_complex ) return Complex_Vectors.Vector is res : Complex_Vectors.Vector(h'range); xtl : constant integer := x'last+1; begin -- Eval(c,REAL_PART(t),scapow,ctm); Eval(c,REAL_PART(t),pow,ctm); for i in res'range loop res(i) := Eval(j(i,xtl),m(i,xtl).all,ctm(i).all,x); end loop; return res; end dHt; function dHx ( x : Complex_Vectors.Vector; t : double_complex ) return matrix is mt : Matrix(x'range,x'range); begin -- Eval(c,REAL_PART(t),scapow,ctm); Eval(c,REAL_PART(t),pow,ctm); for k in m'range(1) loop for l in m'range(1) loop mt(k,l) := Eval(j(k,l),m(k,l).all,ctm(k).all,x); end loop; end loop; return mt; end dHx; procedure Laur_Cont is new Reporting_Continue(Norm1,Eval,dHt,dHx); begin -- put_line(file,"The coefficient vectors :" ); -- for i in c'range loop -- put(file,c(i),3,3,3); new_line(file); -- end loop; cnt := pow'first; for i in mix'range loop tmp := lifted(i); pow(cnt) := new Float_Vectors.Vector(1..Length_Of(lifted(i))); for jj in pow(cnt)'range loop pow(cnt)(jj) := Head_Of(tmp).all*normal; tmp := Tail_Of(tmp); end loop; Shift(pow(cnt).all); for k in 1..(mix(i)-1) loop pow(cnt+k) := new Float_Vectors.Vector(pow(cnt)'range); for jj in pow(cnt)'range loop pow(cnt+k)(jj) := pow(cnt)(jj); end loop; end loop; cnt := cnt + mix(i); end loop; for i in c'range loop ctm(i) := new Complex_Vectors.Vector'(c(i).all'range => CMPLX(0.0)); end loop; -- put(file,"The normal : "); put(file,normal,3,3,3); new_line(file); -- put_line(file,"The exponent vector : "); -- for i in pow'range loop -- put(file,pow(i),3,3,3); new_line(file); -- end loop; -- put_line(file,"The scaled exponent vector : "); -- for i in pow'range loop -- put(file,scapow(i),3,3,3); new_line(file); -- end loop; Laur_Cont(file,sols,false); Float_Vectors_of_Vectors.Clear(pow); -- Float_Vectors_of_Vectors.Clear(scapow); Complex_Vectors_of_Vectors.Clear(ctm); Extract_Regular(sols); end Mixed_Continuation; -- UTILITIES FOR SECOND LAYER : function Remove_Lifting ( l : List ) return List is -- DESCRIPTION : -- Removes the lifting value from the vectors. tmp,res,res_last : List; begin tmp := l; while not Is_Null(tmp) loop declare d1 : constant Float_Vectors.Vector := Head_Of(tmp).all; d2 : constant Float_Vectors.Vector := d1(d1'first..d1'last-1); begin Append(res,res_last,d2); end; tmp := Tail_Of(tmp); end loop; return res; end Remove_Lifting; function Sub_Lifting ( q : Laur_Sys; mix : Integer_Vectors.Vector; mic : Mixed_Cell ) return Array_of_Lists is -- DESCRIPTION : -- Returns the lifting used to subdivide the cell. res : Array_of_Lists(mix'range); sup : Array_of_Lists(q'range); n : constant natural := q'last; cnt : natural := sup'first; begin for i in mic.pts'range loop sup(cnt) := Remove_Lifting(mic.pts(i)); for j in 1..(mix(i)-1) loop Copy(sup(cnt),sup(cnt+j)); end loop; cnt := cnt + mix(i); end loop; res := Induced_Lifting(n,mix,sup,mic.sub.all); Deep_Clear(sup); return res; end Sub_Lifting; function Sub_Polyhedral_Homotopy ( l : List; e : Integer_Vectors_of_Vectors.Vector; c : Complex_Vectors.Vector ) return Complex_Vectors.Vector is -- DESCRIPTION : -- For every vector in e that does not belong to l, the corresponding -- index in c will be set to zero, otherwise it is copied to the result. res : Complex_Vectors.Vector(c'range); found : boolean; lif : double_float; begin for i in e'range loop declare fei : constant Float_Vectors.Vector := Convert(e(i).all); begin Search_Lifting(l,fei,found,lif); if not found then res(i) := CMPLX(0.0); else res(i) := c(i); end if; end; end loop; return res; end Sub_Polyhedral_Homotopy; function Sub_Polyhedral_Homotopy ( mix : Integer_Vectors.Vector; mic : Mixed_Cell; e : Exponent_Vectors_Array; c : Complex_Vectors_of_Vectors.Vector ) return Complex_Vectors_of_Vectors.Vector is -- DESCRIPTION : -- Given a subsystem q of p and the coefficient vector of p, the -- vector on return will have only nonzero entries for coefficients -- that belong to q. res : Complex_Vectors_of_Vectors.Vector(c'range); begin for i in mix'range loop declare cri : constant Complex_Vectors.Vector := Sub_Polyhedral_Homotopy(mic.pts(i),e(i).all,c(i).all); begin res(i) := new Complex_Vectors.Vector'(cri); for j in 1..(mix(i)-1) loop declare crj : constant Complex_Vectors.Vector := Sub_Polyhedral_Homotopy(mic.pts(i),e(i+j).all,c(i+j).all); begin res(i+j) := new Complex_Vectors.Vector'(crj); end; end loop; end; end loop; return res; end Sub_Polyhedral_Homotopy; procedure Refined_Mixed_Solve ( q : in Laur_Sys; mix : in Integer_Vectors.Vector; mic : in Mixed_Cell; h : in Eval_Coeff_Laur_Sys; c : in Complex_Vectors_of_Vectors.Vector; e : in Exponent_Vectors_Array; j : in Eval_Coeff_Jacobi; m : in Mult_Factors; qsols : in out Solution_List ) is -- DESCRIPTION : -- Polyhedral coeffient-homotopy for subsystem q. -- REQUIRED : mic.sub /= null. lif : Array_of_Lists(mix'range) := Sub_Lifting(q,mix,mic); cq : Complex_Vectors_of_Vectors.Vector(c'range) := Sub_Polyhedral_Homotopy(mix,mic,e,c); begin Mixed_Solve(q,lif,h,cq,e,j,m,mix,mic.sub.all,qsols); Complex_Vectors_of_Vectors.Clear(cq); Deep_Clear(lif); end Refined_Mixed_Solve; procedure Refined_Mixed_Solve ( file : in file_type; q : in Laur_Sys; mix : in Integer_Vectors.Vector; mic : in Mixed_Cell; h : in Eval_Coeff_Laur_Sys; c : in Complex_Vectors_of_Vectors.Vector; e : in Exponent_Vectors_Array; j : in Eval_Coeff_Jacobi; m : in Mult_Factors; qsols : in out Solution_List ) is -- DESCRIPTION : -- Polyhedral coeffient-homotopy for subsystem q. -- REQUIRED : mic.sub /= null. lif : Array_of_Lists(mix'range) := Sub_Lifting(q,mix,mic); cq : Complex_Vectors_of_Vectors.Vector(c'range) := Sub_Polyhedral_Homotopy(mix,mic,e,c); begin Mixed_Solve(file,q,lif,h,cq,e,j,m,mix,mic.sub.all,qsols); Complex_Vectors_of_Vectors.Clear(cq); Deep_Clear(lif); end Refined_Mixed_Solve; -- SECOND LAYER : procedure Mixed_Solve ( p : in Laur_Sys; lifted : in Array_of_Lists; h : in Eval_Coeff_Laur_Sys; c : in Complex_Vectors_of_Vectors.Vector; e : in Exponent_Vectors_Array; j : in Eval_Coeff_Jacobi; m : in Mult_Factors; mix : in Integer_Vectors.Vector; mic : in Mixed_Cell; sols,sols_last : in out Solution_List ) is q : Laur_Sys(p'range) := Select_Subsystem(p,mix,mic); sq : Laur_Sys(q'range) := Shift(q); pq : Poly_Sys(q'range); qsols : Solution_List; len : natural := 0; fail : boolean; begin Fewnomials.Solve(sq,qsols,fail); if fail then if mic.sub = null then pq := Laurent_to_Polynomial_System(sq); qsols := Solve_by_Static_Lifting(pq); Clear(pq); else Refined_Mixed_Solve(q,mix,mic,h,c,e,j,m,qsols); end if; Set_Continuation_Parameter(qsols,CMPLX(0.0)); end if; len := Length_Of(qsols); if len > 0 then Mixed_Continuation(mix,lifted,h,c,j,m,mic.nor.all,qsols); Concat(sols,sols_last,qsols); end if; Clear(sq); Clear(q); Clear(qsols); end Mixed_Solve; procedure Mixed_Solve ( file : in file_type; p : in Laur_Sys; lifted : in Array_of_Lists; h : in Eval_Coeff_Laur_Sys; c : in Complex_Vectors_of_Vectors.Vector; e : in Exponent_Vectors_Array; j : in Eval_Coeff_Jacobi; m : in Mult_Factors; mix : in Integer_Vectors.Vector; mic : in Mixed_Cell; sols,sols_last : in out Solution_List ) is q : Laur_Sys(p'range) := Select_Subsystem(p,mix,mic); sq : Laur_Sys(q'range) := Shift(q); pq : Poly_Sys(q'range); qsols : Solution_List; len : natural := 0; fail : boolean; begin Fewnomials.Solve(sq,qsols,fail); if not fail then put_line(file,"It is a fewnomial system."); else put_line(file,"No fewnomial system."); if mic.sub = null then put_line(file,"Calling the black box solver."); pq := Laurent_to_Polynomial_System(sq); qsols := Solve_by_Static_Lifting(file,pq); Clear(pq); else put_line(file,"Using the refinement of the cell."); Refined_Mixed_Solve(file,q,mix,mic,h,c,e,j,m,qsols); end if; Set_Continuation_Parameter(qsols,CMPLX(0.0)); end if; len := Length_Of(qsols); put(file,len,1); put_line(file," solutions found."); if len > 0 then Mixed_Continuation(file,mix,lifted,h,c,j,m,mic.nor.all,qsols); Concat(sols,sols_last,qsols); end if; Clear(sq); Clear(q); Clear(qsols); end Mixed_Solve; -- THIRD LAYER : procedure Mixed_Solve ( p : in Laur_Sys; lifted : in Array_of_Lists; h : in Eval_Coeff_Laur_Sys; c : in Complex_Vectors_of_Vectors.Vector; e : in Exponent_Vectors_Array; j : in Eval_Coeff_Jacobi; m : in Mult_Factors; mix : in Integer_Vectors.Vector; mixsub : in Mixed_Subdivision; sols : in out Solution_List ) is tmp : Mixed_Subdivision := mixsub; mic : Mixed_Cell; sols_last : Solution_List; begin while not Is_Null(tmp) loop mic := Head_Of(tmp); Mixed_Solve(p,lifted,h,c,e,j,m,mix,mic,sols,sols_last); tmp := Tail_Of(tmp); end loop; end Mixed_Solve; procedure Mixed_Solve ( file : in file_type; p : in Laur_Sys; lifted : in Array_of_Lists; h : in Eval_Coeff_Laur_Sys; c : in Complex_Vectors_of_Vectors.Vector; e : in Exponent_Vectors_Array; j : in Eval_Coeff_Jacobi; m : in Mult_Factors; mix : in Integer_Vectors.Vector; mixsub : in Mixed_Subdivision; sols : in out Solution_List ) is tmp : Mixed_Subdivision := mixsub; mic : Mixed_Cell; sols_last : Solution_List; cnt : natural := 0; begin while not Is_Null(tmp) loop mic := Head_Of(tmp); cnt := cnt + 1; new_line(file); put(file,"*** PROCESSING SUBSYSTEM "); put(file,cnt,1); put_line(file," ***"); new_line(file); Mixed_Solve(file,p,lifted,h,c,e,j,m,mix,mic,sols,sols_last); tmp := Tail_Of(tmp); end loop; end Mixed_Solve; end Float_Polyhedral_Continuation; SHAR_EOF fi # end of overwriting check if test -f 'float_polyhedral_continuation.ads' then echo shar: will not over-write existing file "'float_polyhedral_continuation.ads'" else cat << "SHAR_EOF" > 'float_polyhedral_continuation.ads' with text_io; use text_io; with Integer_Vectors,Float_Vectors; with Complex_Vectors_of_Vectors; with Arrays_of_Float_Vector_Lists; use Arrays_of_Float_Vector_Lists; with Float_Mixed_Subdivisions; use Float_Mixed_Subdivisions; with Complex_Laurent_Polynomial_Systems; use Complex_Laurent_Polynomial_Systems; with Laurent_Jacobi_Matrices; use Laurent_Jacobi_Matrices; with Exponent_Vectors; use Exponent_Vectors; with Solutions; use Solutions; package Float_Polyhedral_Continuation is -- DESCRIPTION : -- This package implements polyhedral homotopy continuation methods, -- based on mixed subdivision induced by floating-point lifting. -- The continuation is organized in three layers: -- 1. inner normal, tracking of paths for one poly -- 2. mixed cell, recursion is needed when the cell is not fine; -- 3. mixed subdivision, for all cells in the subdivision. -- Each layer has two versions: a silent and a reporting version. -- FIRST LAYER : polyhedral continuation for one transformation. procedure Mixed_Continuation ( mix : in Integer_Vectors.Vector; lifted : in Array_of_Lists; h : in Eval_Coeff_Laur_Sys; c : in Complex_Vectors_of_Vectors.Vector; j : in Eval_Coeff_Jacobi; m : in Mult_Factors; normal : in Float_Vectors.Vector; sols : in out Solution_List ); procedure Mixed_Continuation ( file : in file_type; mix : in Integer_Vectors.Vector; lifted : in Array_of_Lists; h : in Eval_Coeff_Laur_Sys; c : in Complex_Vectors_of_Vectors.Vector; j : in Eval_Coeff_Jacobi; m : in Mult_Factors; normal : in Float_Vectors.Vector; sols : in out Solution_List ); -- DESCRIPTION : polyhedral continuation with coefficient homotopy. -- ON ENTRY : -- file file to write intermediate results on; -- mix type of mixture; -- lifted lifted supports of polynomial system, in original order; -- h coefficient homotopy; -- c coefficients of homotopy; -- j coefficient Jacobi matrix; -- m multiplication factors in coefficient Jacobi matrix; -- normal normal to a mixed cell; -- sols start solutions of the subsystem which corresponds -- with the mixed cell with given inner normal. -- ON RETURN : -- sols the solutions of p, which correspond to one mixed cell. -- SECOND LAYER : polyhedral continuaton for one mixed cell. procedure Mixed_Solve ( p : in Laur_Sys; lifted : in Array_of_Lists; h : in Eval_Coeff_Laur_Sys; c : in Complex_Vectors_of_Vectors.Vector; e : in Exponent_Vectors_Array; j : in Eval_Coeff_Jacobi; m : in Mult_Factors; mix : in Integer_Vectors.Vector; mic : in Mixed_Cell; sols,sols_last : in out Solution_List ); procedure Mixed_Solve ( file : in file_type; p : in Laur_Sys; lifted : in Array_of_Lists; h : in Eval_Coeff_Laur_Sys; c : in Complex_Vectors_of_Vectors.Vector; e : in Exponent_Vectors_Array; j : in Eval_Coeff_Jacobi; m : in Mult_Factors; mix : in Integer_Vectors.Vector; mic : in Mixed_Cell; sols,sols_last : in out Solution_List ); -- DESCRIPTION : -- Polyhedral coefficient-homotopy continuation for one mixed cell. -- REQUIRED : polynomials in p must be ordered according to mix. -- ON ENTRY : -- file a file to write intermediate results on; -- p non-lifted Laurent polynomial system; -- lifted lifted supports, with original order of points; -- h coefficient homotopy; -- c coefficients of homotopy; -- e the exponent vectors of the unlifted system; -- j coefficient Jacobi matrix; -- m multiplication factors in coefficient Jacobi matrix; -- mix type of mixture; -- mic a mixed cell. -- ON RETURN : -- sols the solution list of p; -- sols_last pointer to last element of the list sols. -- THIRD LAYER : polyhedral continuation for a mixed subdivision. procedure Mixed_Solve ( p : in Laur_Sys; lifted : in Array_of_Lists; h : in Eval_Coeff_Laur_Sys; c : in Complex_Vectors_of_Vectors.Vector; e : in Exponent_Vectors_Array; j : in Eval_Coeff_Jacobi; m : in Mult_Factors; mix : in Integer_Vectors.Vector; mixsub : in Mixed_Subdivision; sols : in out Solution_List ); procedure Mixed_Solve ( file : in file_type; p : in Laur_Sys; lifted : in Array_of_Lists; h : in Eval_Coeff_Laur_Sys; c : in Complex_Vectors_of_Vectors.Vector; e : in Exponent_Vectors_Array; j : in Eval_Coeff_Jacobi; m : in Mult_Factors; mix : in Integer_Vectors.Vector; mixsub : in Mixed_Subdivision; sols : in out Solution_List ); -- DESCRIPTION : -- Polyhedral coefficient-homotopy continuation for a mixed subdivision. -- REQUIRED : polynomials in p must be ordered according to mix. -- ON ENTRY : -- file a file to write intermediate results on; -- p non-lifted Laurent polynomial system; -- lifted lifted supports, in original order; -- h coefficient homotopy; -- c coefficients of homotopy; -- e the exponent vectors of the unlifted system; -- j coefficient Jacobi matrix; -- m multiplication factors in coefficient Jacobi matrix; -- mix type of mixture; -- mixsub a collection of mixed cells. -- ON RETURN : -- sols the solution list of p. end Float_Polyhedral_Continuation; SHAR_EOF fi # end of overwriting check if test -f 'float_pruning_methods.adb' then echo shar: will not over-write existing file "'float_pruning_methods.adb'" else cat << "SHAR_EOF" > 'float_pruning_methods.adb' with Floating_Point_Numbers; use Floating_Point_Numbers; with Float_Matrices; use Float_Matrices; with Float_Linear_System_Solvers; use Float_Linear_System_Solvers; with Farkas_Lemma; use Farkas_Lemma; with Lists_of_Float_Vectors; use Lists_of_Float_Vectors; package body Float_Pruning_Methods is -- GENERAL AUXILIARIES : procedure Normalize ( v : in out Float_Vectors.Vector ) is -- DESCRIPTION : Divides every entry by v(v'last). begin for i in v'range loop v(i) := v(i)/v(v'last); end loop; end Normalize; function Convert ( fa : Face_Array ) return Array_of_Lists is -- DESCRIPTION : -- Converts the array of faces into an array of lists by -- converting the first element of each list of faces. res : Array_of_Lists(fa'range); begin for k in fa'range loop res(k) := Shallow_Create(fa(k).all); end loop; return res; end Convert; -- AUXILIARIES FOR THE PRUNING ALGORITHMS : procedure Initialize ( n : in natural; mat : out Matrix; ipvt : out Vector ) is -- DESCRIPTION : -- Initializes an n*(n+1) matrix with zeroes and the pivoting vector -- with the entries 1..n. begin for i in 1..n loop for j in 1..n+1 loop mat(i,j) := 0.0; end loop; end loop; for i in 1..n loop ipvt(i) := i; end loop; end Initialize; function Number_of_Inequalities ( mix : Vector; lifted : Array_of_Lists ) return natural is -- DESCRIPTION : -- Returns the maximal number of inequalities for pruning. res : natural := 0; begin for k in lifted'range loop res := res + Length_Of(lifted(k)) - mix(k) - 1; end loop; return res; end Number_of_Inequalities; procedure Ordered_Inequalities ( k : in natural; mat : in out Matrix ) is -- DESCRIPTION : -- Defines k inequalities mat(k,k) - mat(k+1,k) >= 0. begin for i in mat'first(1)..k loop for j in mat'range(2) loop mat(i,j) := 0.0; end loop; mat(i,i) := 1.0; mat(i,i+1) := -1.0; end loop; end Ordered_Inequalities; procedure Check_and_Update ( mic : in Face_Array; lifted : in Array_of_Lists; m : in Matrix; ipvt : in Vector; tol : in double_float; mixsub,mixsub_last : in out Mixed_Subdivision ) is -- DESCRIPTION : -- Computes the normal to the points in pts, by solving the -- linear system defined by m and ipvt. -- If the computed normal is an inner normal w.r.t. the lifted points, -- then the mixed subdivision will be updated with a new cell. use Float_Vectors; v : Float_Vectors.Vector(m'range(2)) := Solve(m,tol,ipvt); pts : Array_of_Lists(mic'range); begin if abs(v(v'last)) > tol then Normalize(v); if v(v'last) < 0.0 then Min_Vector(v); end if; pts := Convert(mic); Update(pts,v,mixsub,mixsub_last); end if; end Check_and_Update; procedure Create_Equalities ( n : in natural; f : in Face; mat,ineq : in Matrix; tol : in double_float; ipvt : in Vector; row,rowineq : in natural; newmat,newineq : in out Matrix; newipvt : in out Vector; newrow,newrowineq : in out natural; fail : out boolean ) is -- DESCRIPTION : -- Creates new equalities and uses them to eliminate unknowns in the -- matrices of equalities and inequalities. Failure is reported when -- a zero row is encountered. On entry, all new* variables must be -- initialized with the corresponding *-ones. shi : Float_Vectors.Vector(1..n+1) := f(f'first).all; fl : boolean := false; pivot : natural; begin for i in f'first+1..f'last loop newrow := newrow + 1; for j in f(i)'range loop newmat(newrow,j) := f(i)(j) - shi(j); end loop; Switch(newipvt,newrow,newmat); Upper_Triangulate(newrow,newmat,tol,newipvt,pivot); fl := (pivot = 0); exit when fl; Switch(newrow,pivot,ineq'first,rowineq,newineq); end loop; fail := fl; end Create_Equalities; procedure Complementary_Slackness ( tableau : in out matrix; tol : in double_float; feasible : out boolean ) is lastcol : constant integer := tableau'last(2)-1; rhs,sol : Float_Vectors.Vector(tableau'range(1)); columns : Vector(sol'range); begin for i in rhs'range loop rhs(i) := double_float(tableau(i,tableau'last(2))); end loop; Complementary_Slackness(tableau,lastcol,rhs,tol,sol,columns,feasible); end Complementary_Slackness; function Check_Feasibility ( k,m,n : natural; ineq : Matrix; tol : double_float ) return boolean is -- DESCRIPTION : -- Returns true if -v(n+1) > 0 can be derived, false otherwise. -- ON ENTRY : -- k current unknown that has been eliminated, -- for all i <= k : ineq(l,i) = 0, for l in ineq'first..m; -- m number of inequalities; -- n dimension; -- ineq matrix of inequalities. tableau : Matrix(1..n-k+1,1..m+1); feasi : boolean; begin if m = 0 then feasi := false; else for i in k+1..n+1 loop for j in 1..m loop tableau(i-k,j) := ineq(j,i); end loop; tableau(i-k,m+1) := 0.0; end loop; tableau(n-k+1,m+1) := -1.0; Complementary_Slackness(tableau,tol,feasi); end if; return feasi; end Check_Feasibility; procedure Update_Inequalities ( k,rowmat1,rowmat2,n : in natural; mat : in Matrix; ipvt : in Vector; tol : in double_float; rowineq : in out natural; ineq : in out Matrix; lifted : in Array_of_Lists; mic : in out Face_Array ) is -- DESCRIPTION : -- The inequalities will be updated w.r.t. the equality -- constraints on the inner normal. tmp : List; pt,shi : Float_Vectors.Link_to_Vector; begin for i in ineq'first..rowineq loop -- update the old inequalities for j in rowmat1..rowmat2 loop Upper_Triangulate(j,mat,tol,i,ineq); end loop; end loop; shi := mic(k)(mic(k)'first); tmp := lifted(k); -- make new inequalities while not Is_Null(tmp) loop pt := Head_Of(tmp); if not Is_In(mic(k),pt.all) then rowineq := rowineq + 1; for j in pt'range loop ineq(rowineq,j) := pt(j) - shi(j); end loop; Switch(ipvt,rowineq,ineq); for i in 1..rowmat2 loop Upper_Triangulate(i,mat,tol,rowineq,ineq); end loop; end if; tmp := Tail_Of(tmp); end loop; end Update_Inequalities; -- CONSTRUCTION WITH PRUNING : procedure Gen1_Create ( n : in natural; mix : in Vector; fa : in Array_of_Faces; lifted : in Array_of_Lists; tol : in double_float; nbsucc,nbfail : in out Float_Vectors.Vector; mixsub : out Mixed_Subdivision ) is res,res_last : Mixed_Subdivision; accu : Face_Array(fa'range); ma : Matrix(1..n,1..n+1); ipvt : Vector(1..n); ineqrows : natural; procedure Compute_Mixed_Cells ( k,row : in natural; mat : in Matrix; ipvt : in Vector; rowineq : in natural; ineq : in Matrix; mic : in out Face_Array; continue : out boolean ); -- DESCRIPTION : -- Backtrack recursive procedure to enumerate face-face combinations. -- ON ENTRY : -- k index for current point set; -- row number of rows already in the matrix; -- mat matrix which determines the inner normal; -- ipvt contains the pivoting information; -- rowineq number of inequality constraints already in ineq; -- ineq matrix for the inequality constraints on the -- inner normal v, of type <.,v> >= 0; -- mic contains the current selected faces, up to k-1. -- ON RETURN : -- mic updated selected faces. -- continue indicates whether to continue the creation or not. procedure Process_Inequalities ( k,rowmat1,rowmat2 : in natural; mat : in Matrix; ipvt : in Vector; rowineq : in out natural; ineq : in out Matrix; mic : in out Face_Array; cont : out boolean ) is -- DESCRIPTION : -- Updates inequalities and checks feasibility before proceeding. fl : boolean := false; tmp : List; pt,shi : Link_to_Vector; begin Update_Inequalities(k,rowmat1,rowmat2,n,mat,ipvt,tol,rowineq,ineq, lifted,mic); if Check_Feasibility(rowmat2,rowineq,n,ineq,tol) then nbfail(k) := nbfail(k) + 1.0; cont := true; else nbsucc(k) := nbsucc(k) + 1.0; Compute_Mixed_Cells(k+1,rowmat2,mat,ipvt,rowineq,ineq,mic,cont); end if; end Process_Inequalities; procedure Compute_Mixed_Cells ( k,row : in natural; mat : in Matrix; ipvt : in Vector; rowineq : in natural; ineq : in Matrix; mic : in out Face_Array; continue : out boolean ) is old : Mixed_Subdivision := res_last; cont : boolean := true; tmpfa : Faces; begin if k > mic'last then Check_and_Update(mic,lifted,mat,ipvt,tol,res,res_last); if old /= res_last then Process(Head_Of(res_last),continue); else continue := true; end if; else tmpfa := fa(k); while not Is_Null(tmpfa) loop -- enumerate faces of kth polytope mic(k) := Head_Of(tmpfa); declare -- update the matrices fl : boolean; newipvt : Vector(ipvt'range) := ipvt; newmat : Matrix(mat'range(1),mat'range(2)) := mat; newineq : Matrix(ineq'range(1),ineq'range(2)) := ineq; newrow : natural := row; newrowineq : natural := rowineq; begin Create_Equalities (n,mic(k),mat,ineq,tol,ipvt,row,rowineq,newmat,newineq, newipvt,newrow,newrowineq,fl); if fl then nbfail(k) := nbfail(k) + 1.0; else Process_Inequalities(k,row+1,newrow,newmat,newipvt, newrowineq,newineq,mic,cont); end if; end; tmpfa := Tail_Of(tmpfa); exit when not cont; end loop; continue := cont; end if; end Compute_Mixed_Cells; begin Initialize(n,ma,ipvt); ineqrows := Number_of_Inequalities(mix,lifted); declare ineq : matrix(1..ineqrows,1..n+1); cont : boolean; begin ineq(1,1) := 0.0; Compute_Mixed_Cells(accu'first,0,ma,ipvt,0,ineq,accu,cont); end; mixsub := res; end Gen1_Create; procedure Create ( n : in natural; mix : in Vector; fa : in Array_of_Faces; lifted : in Array_of_Lists; tol : in double_float; nbsucc,nbfail : in out Float_Vectors.Vector; mixsub : out Mixed_Subdivision ) is res,res_last : Mixed_Subdivision; accu : Face_Array(fa'range); ma : Matrix(1..n,1..n+1); ipvt : Vector(1..n); ineqrows : natural; procedure Compute_Mixed_Cells ( k,row : in natural; mat : in Matrix; ipvt : in Vector; rowineq : in natural; ineq : in Matrix; mic : in out Face_Array ); -- DESCRIPTION : -- Backtrack recursive procedure to enumerate face-face combinations. -- ON ENTRY : -- k index for current point set; -- row number of rows already in the matrix; -- mat matrix which determines the inner normal; -- ipvt contains the pivoting information; -- rowineq number of inequality constraints already in ineq; -- ineq matrix for the inequality constraints on the -- inner normal v, of type <.,v> >= 0; -- mic contains the current selected faces, up to k-1. -- ON RETURN : -- mic updated selected faces. procedure Process_Inequalities ( k,rowmat1,rowmat2 : in natural; mat : in matrix; ipvt : in vector; rowineq : in out natural; ineq : in out matrix; mic : in out Face_Array) is -- DESCRIPTION : -- Updates inequalities and checks feasibility before proceeding. tmp : List; pt,shi : Link_to_Vector; begin Update_Inequalities(k,rowmat1,rowmat2,n,mat,ipvt,tol,rowineq,ineq, lifted,mic); if Check_Feasibility(rowmat2,rowineq,n,ineq,tol) then nbfail(k) := nbfail(k) + 1.0; else nbsucc(k) := nbsucc(k) + 1.0; Compute_Mixed_Cells(k+1,rowmat2,mat,ipvt,rowineq,ineq,mic); end if; end Process_Inequalities; procedure Compute_Mixed_Cells ( k,row : in natural; mat : in matrix; ipvt : in vector; rowineq : in natural; ineq : in matrix; mic : in out Face_Array ) is tmpfa : Faces; begin if k > mic'last then Check_and_Update(mic,lifted,mat,ipvt,tol,res,res_last); else tmpfa := fa(k); while not Is_Null(tmpfa) loop -- enumerate faces of kth polytope mic(k) := Head_Of(tmpfa); declare -- update matrices fl : boolean; newipvt : Vector(ipvt'range) := ipvt; newmat : Matrix(mat'range(1),mat'range(2)) := mat; newineq : Matrix(ineq'range(1),ineq'range(2)) := ineq; newrow : natural := row; newrowineq : natural := rowineq; begin Create_Equalities (n,mic(k),mat,ineq,tol,ipvt,row,rowineq,newmat,newineq, newipvt,newrow,newrowineq,fl); if fl then nbfail(k) := nbfail(k) + 1.0; else Process_Inequalities (k,row+1,newrow,newmat,newipvt,newrowineq,newineq,mic); end if; end; tmpfa := Tail_Of(tmpfa); end loop; end if; end Compute_Mixed_Cells; begin Initialize(n,ma,ipvt); ineqrows := Number_of_Inequalities(mix,lifted); declare ineq : Matrix(1..ineqrows,1..n+1); begin ineq(1,1) := 0.0; Compute_Mixed_Cells(accu'first,0,ma,ipvt,0,ineq,accu); end; mixsub := res; end Create; end Float_Pruning_Methods; SHAR_EOF fi # end of overwriting check if test -f 'float_pruning_methods.ads' then echo shar: will not over-write existing file "'float_pruning_methods.ads'" else cat << "SHAR_EOF" > 'float_pruning_methods.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; with Integer_Vectors,Float_Vectors; use Integer_Vectors; with Arrays_of_Float_Vector_Lists; use Arrays_of_Float_Vector_Lists; with Float_Faces_of_Polytope; use Float_Faces_of_Polytope; with Float_Mixed_Subdivisions; use Float_Mixed_Subdivisions; package Float_Pruning_Methods is -- DESCRIPTION : -- This package contains the creators of a regular mixed subdivision, -- based on the static lifting algorithm, for computing only those cells -- of a certain type, in particular the mixed cells. -- There are facilities for computing only the generating cells and for -- computing only the stable mixed cells. generic with procedure Process ( mic : in Mixed_Cell; continue : out boolean ); -- DESCRIPTION : -- This procedure will be invoked after each computation of a new cell. -- If the parameter continue is set on false, then the computation will -- be stopped, otherwise the creation continues. procedure Gen1_Create ( n : in natural; mix : in Vector; fa : in Array_of_Faces; lifted : in Array_of_Lists; tol : in double_float; nbsucc,nbfail : in out Float_Vectors.Vector; mixsub : out Mixed_Subdivision ); procedure Create ( n : in natural; mix : in Vector; fa : in Array_of_Faces; lifted : in Array_of_Lists; tol : in double_float; nbsucc,nbfail : in out Float_Vectors.Vector; mixsub : out Mixed_Subdivision ); -- DESCRIPTION : -- Creates a mixed subdivision with a criterium to check which -- face-face combinations can lead to a cell which contributes to -- the mixed volume. -- ON ENTRY : -- n dimension before lifting; -- mix type of mixture: indicates how many times each polytope -- occurs in the supports; -- fa faces of the lower hull of the lifted point sets: -- fa(i) contains the mix(i)-faces of conv(lifted(i)); -- lifted the lifted points; -- tol tolerance on the precision; -- ON RETURN : -- nbsucc number of times a face-face combination has passed the test, -- at each level; -- nbfail number of times a face-face combinations has failed to pass -- the test, at each level; -- mixsub collection of cells which contribute to the mixed volume. end Float_Pruning_Methods; SHAR_EOF fi # end of overwriting check if test -f 'inner_normal_cones.adb' then echo shar: will not over-write existing file "'inner_normal_cones.adb'" else cat << "SHAR_EOF" > 'inner_normal_cones.adb' with Integer_Linear_System_Solvers; use Integer_Linear_System_Solvers; with Transformations; use Transformations; with Integer_Vectors_Utilities; use Integer_Vectors_Utilities; with Lists_of_Vectors_Utilities; use Lists_of_Vectors_Utilities; with Transforming_Integer_Vector_Lists; use Transforming_Integer_Vector_Lists; with Vertices; use Vertices; --with text_io,integer_io; use text_io,integer_io; --with Integer_Vectors_io; use Integer_Vectors_io; --with Integer_Matrices_io; use Integer_Matrices_io; --with Transformations_io; use Transformations_io; --with Lists_of_Integer_Vectors_io; use Lists_of_Integer_Vectors_io; package body Inner_Normal_Cones is -- NOTE ON THE IMPLEMENTATION : -- There is a safety mode in which after each computation of the generators, -- it is automatically tested whether the generators satisfy the -- inequalities of the normal cone. If not, then the bug is reported and -- a program_error is raised. -- AUXILIAIRIES : function Lower ( a1,b1,a2,b2 : integer ) return boolean is -- DESCRIPTION : -- Returns true if a1/b1 < a2/b2, false otherwise. -- REQUIRED : b1 /= 0 and b2 /= 0. begin if b1*b2 > 0 then return (a1*b2 - a2*b1 < 0); else return (a1*b2 - a2*b1 > 0); end if; end Lower; function Higher ( a1,b1,a2,b2 : integer ) return boolean is -- DESCRIPTION : -- Returns true if a1/b1 > a2/b2, false otherwise. -- REQUIRED : b1 /= 0 and b2 /= 0. begin if b1*b2 > 0 then return (a1*b2 - a2*b1 > 0); else return (a1*b2 - a2*b1 < 0); end if; end Higher; function Compute_Facets ( l : List; x : Vector ) return Faces is -- DESCRIPTION : -- Returns all facets of conv(l) that all contain x. -- Checks whether x belongs to the list or not. res : Faces; n : constant natural := x'length; begin if Is_In(l,x) then res := Create(n-1,n,l,x); else declare wrk : List := l; lx : Link_to_Vector; begin lx := new Vector'(x); Construct(lx,wrk); res := Create(n-1,n,wrk,x); end; end if; return res; end Compute_Facets; procedure Shifted_Points ( l : in List; x : in Vector; res,res_last : in out List ) is -- DESCRIPTION : -- Appends the list of shifted points w.r.t. x to the list res. tmp : List := l; begin tmp := l; while not Is_Null(tmp) loop Append_Diff(res,res_last,Head_Of(tmp).all-x); tmp := Tail_Of(tmp); end loop; end Shifted_Points; function In_Hull ( l : List; x : Vector ) return boolean is -- DESCRIPTION : -- Returns true if the vector x belongs the convex hull spanned by -- the points in l minus the point x itself. res : boolean; lx : List; begin Copy(l,lx); Remove(lx,x); res := Is_In_Hull(x,lx); Clear(lx); return res; end In_Hull; -- AUXILIAIRIES TO CONSTRUCT THE NORMALS : procedure Normal ( m : in out Matrix; v : out Vector ) is -- DESCRIPTION : -- Computes the normal to the vectors stored in the rows of the matrix m. -- REQUIRED : the matrix m is square! res : Vector(m'range(2)); begin Upper_Triangulate(m); Scale(m); res := (res'range => 0); Solve0(m,res); v := res; end Normal; procedure Orientate_Normal ( l : in List; f : in Face; normal : in out Vector ) is -- DESCRIPTION : -- Orientates the normal of the face such that it becomes an inner normal -- w.r.t. the points in the list l. tmp : List := l; ip : constant integer := f(f'first).all*normal; pt : Vector(Head_Of(l)'range); done : boolean := false; ptip : integer; begin while not Is_Null(tmp) loop pt := Head_Of(tmp).all; if not Is_In(f,pt) then ptip := pt*normal; if ptip /= ip then if ptip < ip then normal := -normal; end if; done := true; end if; end if; exit when done; tmp := Tail_Of(tmp); end loop; end Orientate_Normal; function Inner_Normal ( l : List; facet : Face ) return Vector is -- DESCRIPTION : -- Returns the inner normal to the facet. res,fst : Vector(facet(facet'first)'range); m : Matrix(facet'first+1..facet'last,facet(facet'first)'range); begin fst := facet(facet'first).all; for i in m'first(1)..m'last(1) loop for j in m'range(2) loop m(i,j) := facet(i)(j) - fst(j); end loop; end loop; Normal(m,res); Orientate_Normal(l,facet,res); return res; end Inner_Normal; procedure Inner_Normals ( l : in List; facets : in Faces; iv,iv_last : in out List ) is -- DESCRIPTION : -- Returns the list of all inner normals to the facets of conv(l). -- If there is only one facet, then both `inner' and `outer' normal -- will be returned, because there is nothing to orientate with. -- This means that also the negation of the normal will be in the list iv. tmp : Faces := facets; begin while not Is_Null(tmp) loop declare f : Face := Head_Of(tmp); v : constant Vector := Inner_Normal(l,Head_Of(tmp)); begin Append(iv,iv_last,v); if Length_Of(facets) = 1 then Append(iv,iv_last,-v); end if; end; tmp := Tail_Of(tmp); end loop; end Inner_Normals; function Number_of_Rows ( l : List ) return natural is -- DESCRIPTION : -- Returns Maximum(dimension,Length_Of(l)). -- REQUIRED : not Is_Null(l). n : constant natural := Head_Of(l)'length; m : constant natural := Length_Of(l); begin if n > m then return n; else return m; end if; end Number_of_Rows; function Normal ( l : List ) return Vector is -- DESCRIPTION : -- Return a normal to the vectors in the list. -- REQUIRED : Length_Of(l) <= n = Head_Of(l)'length -- or the points in l all lie on the same facet. fst : Link_to_Vector := Head_Of(l); m : Matrix(1..Number_of_Rows(l),fst'range); cnt : natural := 0; res : Vector(fst'range); tmp : List := Tail_Of(l); begin while not Is_Null(tmp) loop res := Head_Of(tmp).all; cnt := cnt+1; for i in res'range loop m(cnt,i) := res(i) - fst(i); end loop; tmp := Tail_Of(tmp); end loop; for i in cnt+1..m'last(1) loop for j in m'range(2) loop m(i,j) := 0; end loop; end loop; Normal(m,res); return res; end Normal; procedure Normals ( l : in List; x : in Vector; iv,iv_last : in out List ) is -- DESCRIPTION : -- Computes a list of all normals to the vectors in the list. -- REQUIRED : Length_Of(l) <= n = x'length. -- or all points in l lie on the same facet. nor : constant Vector := Normal(l); piv : natural := Pivot(nor); pivnor : Vector(nor'range); -- normal with pivnor(piv) > 0 begin if piv <= nor'last then if x'length > 2 then if nor(piv) < 0 then pivnor := -nor; else pivnor := nor; end if; declare t : Transfo := Build_Transfo(pivnor,piv); tx : constant Vector := Reduce(t*x,piv); tt : Transfo := Transpose(t); tl : List := Transform_and_Reduce(t,piv,l); begin if Length_Of(tl) <= nor'length-1 then Normals(tl,tx,iv,iv_last); else declare facets : Faces := Compute_Facets(tl,tx); begin if Length_Of(facets) > 1 then Inner_Normals(tl,facets,iv,iv_last); else Normals(tl,tx,iv,iv_last); end if; end; end if; Insert_and_Transform(iv,piv,0,tt); iv_last := Pointer_to_Last(iv); Clear(t); Deep_Clear(tl); Clear(tt); end; end if; Append(iv,iv_last,nor); Append(iv,iv_last,-nor); end if; end Normals; -- CONSTRUCTORS FOR PRIMAL REPRESENTATION : function Generators ( l : List; facets : Faces; x : Vector ) return List is res,res_last : List; begin if Length_Of(facets) > 1 then Inner_Normals(l,facets,res,res_last); -- compute inner normals elsif In_Hull(l,x) then return res; -- empty normal cone else Normals(l,x,res,res_last); -- compute normals if Length_Of(l) = 2 then Shifted_Points(l,x,res,res_last); end if; end if; -- SAFETY MODE : -- if not Contained_in_Cone(l,x,res) -- then put_line("Bug raised for computing generators for list"); put(l); -- put(" and the point : "); put(x); new_line; -- raise PROGRAM_ERROR; -- end if; return res; end Generators; function Generators ( l : List; x : Vector ) return List is res,res_last : List; n : constant natural := x'length; facets : Faces; begin if In_Hull(l,x) then return res; -- empty normal cone else if Length_Of(l) > n then facets := Compute_Facets(l,x); end if; if Length_Of(facets) > 1 then res := Generators(l,facets,x); else Normals(l,x,res,res_last); if Length_Of(l) = 2 then Shifted_Points(l,x,res,res_last); end if; end if; -- SAFETY MODE : -- if not Contained_in_Cone(l,x,res) -- then put_line("Bug raised for computing generators for list"); -- put(l); put(" and the point : "); put(x); new_line; -- raise PROGRAM_ERROR; -- end if; return res; end if; end Generators; -- CONSTRUCTOR FOR DUAL REPRESENTATION : function Inner_Normal_Cone ( l : List; x : Vector ) return Matrix is res : Matrix(x'range,1..Length_Of(l)-1); -- CAUTION : Is_In(l,x) must hold !! y : Vector(x'range); cnt : natural := 0; tmp : List := l; begin while not Is_Null(tmp) loop y := Head_Of(tmp).all; if not Equal(x,y) -- avoid trivial inequality then cnt := cnt+1; for i in x'range loop res(i,cnt) := y(i) - x(i); end loop; end if; tmp := Tail_Of(tmp); end loop; return res; end Inner_Normal_Cone; function Included_Normal_Cone ( gx : List; x : Vector ) return Matrix is res : Matrix(x'first-1..x'last,1..Length_Of(gx)); tmp : List := gx; v : Vector(x'range); begin for j in res'range(2) loop v := Head_Of(tmp).all; res(res'first(1),j) := x*v; for i in res'first(1)+1..res'last(1) loop res(i,j) := v(i); end loop; tmp := Tail_Of(tmp); end loop; return res; end Included_Normal_Cone; -- PRIMITIVE SELECTORS : function Evaluate ( m : Matrix; i : integer; v : Vector ) return integer is sum : integer := 0; begin for j in v'range loop sum := sum + m(j,i)*v(j); end loop; return sum; end Evaluate; function Satisfies ( m : Matrix; i : integer; v : Vector ) return boolean is begin if m'first(1) = v'first-1 then return (Evaluate(m,i,v) >= m(0,i)); else return (Evaluate(m,i,v) >= 0); end if; end Satisfies; function Strictly_Satisfies ( m : Matrix; i : integer; v : Vector ) return boolean is begin if m'first(1) = v'first-1 then return (Evaluate(m,i,v) > m(0,i)); else return (Evaluate(m,i,v) > 0); end if; end Strictly_Satisfies; function Satisfies ( m : Matrix; v : Vector ) return boolean is begin for i in m'range(2) loop if not Satisfies(m,i,v) then return false; end if; end loop; return true; end Satisfies; function Strictly_Satisfies ( m : Matrix; v : Vector ) return boolean is begin for i in m'range(2) loop if not Strictly_Satisfies(m,i,v) then return false; end if; end loop; return true; end Strictly_Satisfies; function Satisfies ( m : Matrix; v : List ) return boolean is tmp : List := v; begin while not Is_Null(tmp) loop if not Satisfies(m,Head_Of(tmp).all) then return false; else tmp := Tail_Of(tmp); end if; end loop; return true; end Satisfies; function Strictly_Satisfies ( m : Matrix; v : List ) return boolean is tmp : List := v; begin while not Is_Null(tmp) loop if not Strictly_Satisfies(m,Head_Of(tmp).all) then return false; else tmp := Tail_Of(tmp); end if; end loop; return true; end Strictly_Satisfies; -- SECONDARY SELECTORS : function Satisfy ( m : Matrix; l : List ) return List is res,res_last,tmp : List; begin tmp := l; while not Is_Null(tmp) loop if Satisfies(m,Head_Of(tmp).all) then Append(res,res_last,Head_Of(tmp).all); end if; tmp := Tail_Of(tmp); end loop; return res; end Satisfy; function Strictly_Satisfy ( m : Matrix; l : List ) return List is res,res_last,tmp : List; begin tmp := l; while not Is_Null(tmp) loop if Strictly_Satisfies(m,Head_Of(tmp).all) then Append(res,res_last,Head_Of(tmp).all); end if; tmp := Tail_Of(tmp); end loop; return res; end Strictly_Satisfy; function Contained_in_Cone ( l : List; x : Vector; v : List ) return boolean is ineq : Matrix(x'range,1..Length_Of(l)-1) := Inner_Normal_Cone(l,x); begin return Satisfies(ineq,v); end Contained_in_Cone; function Strictly_Contained_in_Cone ( l : List; x : Vector; v : List ) return boolean is ineq : Matrix(x'range,1..Length_Of(l)-1) := Inner_Normal_Cone(l,x); begin return Strictly_Satisfies(ineq,v); end Strictly_Contained_in_Cone; function Contained_in_Cone ( l,v : List ) return boolean is tmp : List := l; begin while not Is_Null(tmp) loop if Contained_in_Cone(l,Head_Of(tmp).all,v) then -- put("true for vector : "); put(Head_Of(tmp).all); new_line; return true; else tmp := Tail_Of(tmp); end if; end loop; return false; end Contained_in_Cone; function Strictly_Contained_in_Cone ( l,v : List ) return boolean is tmp : List := l; begin while not Is_Null(tmp) loop if Strictly_Contained_in_Cone(l,Head_Of(tmp).all,v) then return true; else tmp := Tail_Of(tmp); end if; end loop; return false; end Strictly_Contained_in_Cone; -- CONCERNING THE UNION OF CONES : function In_Union ( v1,v2 : Vector; k1,k2 : Matrix ) return boolean is -- ALGORITHM : consider x(t) = (1-t)*v1 + t*v2, for t in [0,1] -- and compute t1: smallest t such that Satisfies(k1,x(t)) -- and t2: largest t such that Satisfies(k2,x(t)). -- Then t1 >= t2 makes the test returning true, false otherwise. diff : constant Vector := v1-v2; t1a,t1b,t2a,t2b,a,b : integer; -- t1 = t1a/t1b and t2 = t2a/t2b begin t1a := 1; t1b := 1; -- initially t1 = 1 = 1/1 for i in k1'range(2) loop b := Evaluate(k1,i,diff); if b /= 0 then a := Evaluate(k1,i,v1); if Lower(a,b,t1a,t1b) then t1a := a; t1b := b; end if; end if; end loop; t2a := 0; t2b := 1; -- initially t2 = 0 = 0/1 for i in k2'range(2) loop b := Evaluate(k2,i,diff); if b /= 0 then a := Evaluate(k2,i,v1); if Higher(a,b,t2a,t2b) then t2a := a; t2b := b; end if; end if; end loop; -- put("In_Union for "); put(v1); put(" and "); put(v2); -- put(" : t1 = "); put(t1a,1); put("/"); put(t1b,1); -- put(" : t2 = "); put(t2a,1); put("/"); put(t2b,1); new_line; -- put_line("k1 : "); put(k1); put_line("k2 : "); put(k2); return not Lower(t1a,t1b,t2a,t2b); end In_Union; function In_Union ( v1,v2 : List; k1,k2 : Matrix ) return boolean is tmpv1,tmpv2 : List; begin tmpv1 := v1; while not Is_Null(tmpv1) loop tmpv2 := v2; while not Is_Null(tmpv2) loop if not In_Union(Head_Of(tmpv1).all,Head_Of(tmpv2).all,k1,k2) then return false; else tmpv2 := Tail_Of(tmpv2); end if; end loop; tmpv1 := Tail_Of(tmpv1); end loop; return true; end In_Union; end Inner_Normal_Cones; SHAR_EOF fi # end of overwriting check if test -f 'inner_normal_cones.ads' then echo shar: will not over-write existing file "'inner_normal_cones.ads'" else cat << "SHAR_EOF" > 'inner_normal_cones.ads' with Integer_Vectors; use Integer_Vectors; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Integer_Matrices; use Integer_Matrices; with Integer_Faces_of_Polytope; use Integer_Faces_of_Polytope; package Inner_Normal_Cones is -- DESCRIPTION : -- This package contains facilities for dealing with inner normal cones, -- that are cones normal to some faces of a given polytope, with apex -- at the origin. Especially the normal cones to vertices are of great -- interest to determine which points contribute to the mixed volume. -- The primal representation of a normal cone consists in the generators -- of the cone. A matrix of inequalities defines the dual representation. -- CONSTRUCTORS FOR PRIMAL REPRESENTATION : function Generators ( l : List; facets : Faces; x : Vector ) return List; -- DESCRIPTION : -- Returns the generators of the polyhedral cone, which lies in the -- dual space of the polytope spanned by l and is enclosed by the facets, -- which all contain the vector x. -- The list on return contains all inner normals to the facets. function Generators ( l : List; x : Vector ) return List; -- DESCRIPTION : -- Returns the generators of the polyhedral cone to conv(l), -- normal at the vector x. -- CONSTRUCTOR FOR DUAL REPRESENTATION : function Inner_Normal_Cone ( l : List; x : Vector ) return Matrix; -- DESCRIPTION : -- Returns the inequalities that define the normal cone to the vector x, -- normal to the polytope spanned by the points in l. -- The range of the matrix on return is (x'range,1..Length_Of(l)-1), -- which implies that the inequalities are stored columnwise. -- The type of the inequalities is >= 0. function Included_Normal_Cone ( gx : List; x : Vector ) return Matrix; -- DESCRIPTION : -- Returns the inequalities that define the inner normal cone to the -- vector x, such that these normals are pointing in the interior of -- the polytope spanned by l, when their basis is the point x. -- The walls of this cone are the facets, the list gx should -- contain all inner normal to the facets at the vertex x. -- RANGE FORMATS : -- The matrix on return has ranges (x'first-1..x'last,1..Length_Of(gx)). -- The first row of the matrix contains , -- to be used in the right-hand side of the inequalities. -- PRIMITIVE SELECTORS : function Evaluate ( m : Matrix; i : integer; v : Vector ) return integer; -- DESCRIPTION : -- Evaluates the vector in the ith hyperplane of the inequality matrix. function Satisfies ( m : Matrix; i : integer; v : Vector ) return boolean; function Strictly_Satisfies ( m : Matrix; i : integer; v : Vector ) return boolean; -- DESCRIPTION : -- Returns true if the vector v satisfies the ith inequality of the matrix. -- With Strictly_ true is only returned if the evaluation yields a -- positive result. function Satisfies ( m : Matrix; v : Vector ) return boolean; function Strictly_Satisfies ( m : Matrix; v : Vector ) return boolean; -- DESCRIPTION : -- Returns true if the vector v satisfies all inequalities defined by m. function Satisfies ( m : Matrix; v : List ) return boolean; function Strictly_Satisfies ( m : Matrix; v : List ) return boolean; -- DESCRIPTION : -- Returns true if all vectors in v satisfy all inequalities defined by m. -- SECONDARY SELECTORS : function Satisfy ( m : Matrix; l : List ) return List; function Strictly_Satisfy ( m : Matrix; l : List ) return List; -- DESCRIPTION : -- Returns a list of points from l that (strictly) satisfy the -- inequalities in the matrix. function Contained_in_Cone ( l : List; x : Vector; v : List ) return boolean; function Strictly_Contained_in_Cone ( l : List; x : Vector; v : List ) return boolean; -- DESCRIPTION : -- Returns true when all vectors in v are contained in the normal cone -- to the points in l, at the vector x. function Contained_in_Cone ( l,v : List ) return boolean; function Strictly_Contained_in_Cone ( l,v : List ) return boolean; -- DESCRIPTION : -- Returns true when there exists a normal cone to the points in l -- that entirely contains the points in v. -- CONCERNING THE UNION OF CONES : function In_Union ( v1,v2 : Vector; k1,k2 : Matrix ) return boolean; -- DESCRIPTION : -- Returns true if the convex combination of v1 and v2 is contained -- in the union of the convex cones k1 and k2, given by their -- inequality matrix. -- REQUIRED : Satisfies(k1,v1) and Satisfies(k2,v2). function In_Union ( v1,v2 : List; k1,k2 : Matrix ) return boolean; -- DESCRIPTION : -- Returns true if every convex combination of a vector from v1 -- and a vector from v2 is contained in the union of the convex -- cones k1 and k2, given by their inequality matrix. -- REQUIRED : Satisfies(k1,v1) and Satisfies(k2,v2). end Inner_Normal_Cones; SHAR_EOF fi # end of overwriting check if test -f 'integer_lifting_functions.adb' then echo shar: will not over-write existing file "'integer_lifting_functions.adb'" else cat << "SHAR_EOF" > 'integer_lifting_functions.adb' with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Numbers,Complex_Vectors; use Complex_Numbers; with Integer_Vectors_Utilities; use Integer_Vectors_Utilities; with Random_Number_Generators; package body Integer_Lifting_Functions is -- AUXILIARIES : function Convert ( v : Integer_Vectors.Vector ) return Complex_Vectors.Vector is -- DESCRIPTION : -- Converts the given vector into a vector with complex entries. res : Complex_Vectors.Vector(v'range); begin for i in v'range loop res(i) := CMPLX(double_float(v(i))); end loop; return res; end Convert; function Random_Vector ( m : natural; low,upp : integer ) return Vector is -- DESCRIPTION : -- Returns a random vector of range 1..m of randomly generated integer -- values between low and upp. res : Vector(1..m); begin for k in res'range loop res(k) := Random_Number_Generators.Random(low,upp); end loop; return res; end Random_Vector; function Random ( vec : Integer_Vectors.Vector ) return integer is -- DESCRIPTION : -- Returns a random number from the given vector. index : integer := Random_Number_Generators.Random(vec'first,vec'last); begin return vec(index); end Random; -- LINEAR LIFTING : function Linear_Lift ( lf,v : Vector ) return Vector is res : Vector(v'first..v'last+1); begin res(v'range) := v; res(res'last) := lf*v; return res; end Linear_Lift; function Linear_Lift ( lf : Vector; l : List ) return List is res,res_last : List; tmp : List := l; begin while not Is_Null(tmp) loop Append(res,res_last,Linear_Lift(lf,Head_Of(tmp).all)); tmp := Tail_Of(tmp); end loop; return res; end Linear_Lift; function Linear_Lift ( lf : Integer_Vectors_of_Vectors.Vector; l : Array_of_Lists ) return Array_of_Lists is res : Array_of_Lists(l'range); begin for i in res'range loop res(i) := Linear_Lift(lf(i).all,l(i)); end loop; return res; end Linear_Lift; -- POLYNOMIAL LIFTING : function Polynomial_Lift ( lf : Poly; v : Vector ) return Vector is res : Vector(v'first..v'last+1); begin res(v'range) := v; res(res'last) := integer(REAL_PART(Eval(lf,Convert(v)))); return res; end Polynomial_Lift; function Polynomial_Lift ( lf : Eval_Poly; v : Vector ) return Vector is res : Vector(v'first..v'last+1); begin res(v'range) := v; res(res'last) := integer(REAL_PART(Eval(lf,Convert(v)))); return res; end Polynomial_Lift; function Polynomial_Lift ( lf : Poly; l : List ) return List is res : List; elf : Eval_Poly := Create(lf); begin res := Polynomial_Lift(elf,l); Clear(elf); return res; end Polynomial_Lift; function Polynomial_Lift ( lf : Eval_Poly; l : List ) return List is res,res_last : List; tmp : List := l; begin while not Is_Null(tmp) loop Append(res,res_last,Polynomial_Lift(lf,Head_Of(tmp).all)); tmp := Tail_Of(tmp); end loop; return res; end Polynomial_Lift; function Polynomial_Lift ( lf : Poly_Sys; l : Array_of_Lists ) return Array_of_Lists is res : Array_of_Lists(l'range); elf : Eval_Poly_Sys(lf'range) := Create(lf); begin res := Polynomial_Lift(elf,l); Clear(elf); return res; end Polynomial_Lift; function Polynomial_Lift ( lf : Eval_Poly_Sys; l : Array_of_Lists ) return Array_of_Lists is res : Array_of_Lists(l'range); begin for i in res'range loop res(i) := Polynomial_Lift(lf(i),l(i)); end loop; return res; end Polynomial_Lift; -- RANDOM LIFTING : function Random_Lift ( lflow,lfupp : integer; v : Vector ) return Vector is res : Vector(v'first..v'last+1); begin res(v'range) := v; res(res'last) := Random_Number_Generators.Random(lflow,lfupp); return res; end Random_Lift; function Random_Lift ( lflow,lfupp : integer; l : List ) return List is res,res_last : List; tmp : List := l; begin while not Is_Null(tmp) loop Append(res,res_last,Random_Lift(lflow,lfupp,Head_Of(tmp).all)); tmp := Tail_Of(tmp); end loop; return res; end Random_Lift; function Random_Lift ( lflow,lfupp : Vector; l : Array_of_Lists ) return Array_of_Lists is res : Array_of_Lists(l'range); begin for i in res'range loop res(i) := Random_Lift(lflow(i),lfupp(i),l(i)); end loop; return res; end Random_Lift; -- RANDOM LINEAR LIFTING : function Random_Linear_Lift ( lflow,lfupp : integer; v : Vector ) return Vector is lf : Vector(v'range) := Random_Vector(v'last,lflow,lfupp); begin return Linear_Lift(lf,v); end Random_Linear_Lift; function Random_Linear_Lift ( lflow,lfupp : integer; l : List ) return List is begin if Is_Null(l) then return l; else declare n : constant natural := Head_Of(l)'length; lf : Vector(Head_Of(l)'range) := Random_Vector(n,lflow,lfupp); begin return Linear_Lift(lf,l); end; end if; end Random_Linear_Lift; function Random_Linear_Lift ( lflow,lfupp : Vector; l : Array_of_Lists ) return Array_of_Lists is res : Array_of_Lists(l'range); begin for i in res'range loop res(i) := Random_Linear_Lift(lflow(i),lfupp(i),l(i)); end loop; return res; end Random_Linear_Lift; -- POINT-WISE LIFTING : function Point_Lift ( lf : integer; v : Vector ) return Vector is res : Vector(v'first..v'last+1); begin res(v'range) := v; res(res'last) := lf; return res; end Point_Lift; function Point_Lift ( lf : Vector; l : List ) return List is res,res_last : List; tmp : List := l; ind : integer := lf'first; begin while not Is_Null(tmp) loop Append(res,res_last,Point_Lift(lf(ind),Head_Of(tmp).all)); ind := ind + 1; tmp := Tail_Of(tmp); end loop; return res; end Point_Lift; function Point_Lift ( lf : Integer_Vectors_of_Vectors.Vector; l : Array_of_Lists ) return Array_of_Lists is res : Array_of_Lists(l'range); begin for i in res'range loop res(i) := Point_Lift(lf(i).all,l(i)); end loop; return res; end Point_Lift; end Integer_Lifting_Functions; SHAR_EOF fi # end of overwriting check if test -f 'integer_lifting_functions.ads' then echo shar: will not over-write existing file "'integer_lifting_functions.ads'" else cat << "SHAR_EOF" > 'integer_lifting_functions.ads' with Integer_Vectors; use Integer_Vectors; with Integer_Vectors_of_Vectors; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; package Integer_Lifting_Functions is -- DESCRIPTION : -- This package offers three different types of integer-valued -- lifting functions: linear, polynomial, and point-wise. -- LINEAR LIFTING : function Linear_Lift ( lf,v : Vector ) return Vector; function Linear_Lift ( lf : Vector; l : List ) return List; function Linear_Lift ( lf : Integer_Vectors_of_Vectors.Vector; l : Array_of_Lists ) return Array_of_Lists; -- DESCRIPTION : -- The last entry of the enlarged vector on return equals , -- for every vector v in the lists. -- REQUIRED : lf'range = v'range. -- POLYNOMIAL LIFTING : function Polynomial_Lift ( lf : Poly; v : Vector ) return Vector; function Polynomial_Lift ( lf : Eval_Poly; v : Vector ) return Vector; function Polynomial_Lift ( lf : Poly; l : List ) return List; function Polynomial_Lift ( lf : Eval_Poly; l : List ) return List; function Polynomial_Lift ( lf : Poly_Sys; l : Array_of_Lists ) return Array_of_Lists; function Polynomial_Lift ( lf : Eval_Poly_Sys; l : Array_of_Lists ) return Array_of_Lists; -- DESCRIPTION : -- As lf is complex valued, the rounded real part is used as lifting. -- RANDOM LIFTING : function Random_Lift ( lflow,lfupp : integer; v : Vector ) return Vector; function Random_Lift ( lflow,lfupp : integer; l : List ) return List; function Random_Lift ( lflow,lfupp : Vector; l : Array_of_Lists ) return Array_of_Lists; -- DESCRIPTION : -- The lifting values are random integers between lflow and lfupp. -- RANDOM LINEAR LIFTING : function Random_Linear_Lift ( lflow,lfupp : integer; v : Vector ) return Vector; function Random_Linear_Lift ( lflow,lfupp : integer; l : List ) return List; function Random_Linear_Lift ( lflow,lfupp : Vector; l : Array_of_Lists ) return Array_of_Lists; -- DESCRIPTION : -- Linear lifting with random vectors of integers between lflow and lfupp. -- POINT-WISE LIFTING : function Point_Lift ( lf : integer; v : Vector ) return Vector; function Point_Lift ( lf : Vector; l : List ) return List; function Point_Lift ( lf : Integer_Vectors_of_Vectors.Vector; l : Array_of_Lists ) return Array_of_Lists; -- DESCRIPTION : -- The enlarged vector on return has as last component the lifting lf(k), -- where k is the position of the vector v in the lists. -- REQUIRED : Length_Of(l) = lf'length. end Integer_Lifting_Functions; SHAR_EOF fi # end of overwriting check if test -f 'integer_lifting_utilities.adb' then echo shar: will not over-write existing file "'integer_lifting_utilities.adb'" else cat << "SHAR_EOF" > 'integer_lifting_utilities.adb' with Integer_Vectors_Utilities; use Integer_Vectors_Utilities; with Power_Lists; use Power_Lists; package body Integer_Lifting_Utilities is function Adaptive_Lifting ( l : Array_of_Lists ) return Vector is res : Vector(l'range); fac : constant natural := 3; -- multiplication factor max : constant natural := 23; -- upper bound for lifting begin for i in l'range loop res(i) := fac*Length_Of(l(i)); if res(i) > max then res(i) := max; end if; end loop; return res; end Adaptive_Lifting; function Select_Subsystem ( p : Laur_Sys; mix : Vector; mic : Mixed_Cell ) return Laur_Sys is res : Laur_Sys(p'range); cnt : natural := 0; begin for k in mix'range loop for l in 1..mix(k) loop cnt := cnt + 1; res(cnt) := Select_Terms(p(cnt),mic.pts(k)); end loop; end loop; return res; end Select_Subsystem; function Perform_Lifting ( n : natural; l : List; p : Poly ) return Poly is res : Poly := Null_Poly; tmp : List := l; begin while not Is_Null(tmp) loop declare d : Link_to_Vector := Head_Of(tmp); dr : Link_to_Vector := Reduce(d,n+1); t : Term; begin t.cf := Coeff(p,Degrees(dr)); t.dg := Degrees(d); Plus_Term(res,t); Clear(dr); end; tmp := Tail_Of(tmp); end loop; return res; end Perform_Lifting; function Perform_Lifting ( n : natural; mix : Vector; lifted : Array_of_Lists; p : Laur_Sys ) return Laur_Sys is res : Laur_Sys(p'range); cnt : natural := 1; begin for k in mix'range loop for l in 1..mix(k) loop res(cnt) := Perform_Lifting(n,lifted(k),p(cnt)); cnt := cnt+1; end loop; end loop; return res; end Perform_Lifting; function Copy_Lifting ( lifted : List; pt : Link_to_Vector ) return Link_to_Vector is -- DESCRIPTION : -- Searches the correspoinding point in the list lifted and returns -- the lifted point. If the corresponding point has not been found, -- then the original point pt will be returned. tmp : List := lifted; lpt,res : Link_to_Vector; begin while not Is_Null(tmp) loop lpt := Head_Of(tmp); if Equal(lpt(pt'range),pt.all) then res := new Integer_Vectors.Vector'(lpt.all); return res; else tmp := Tail_Of(tmp); end if; end loop; return pt; end Copy_Lifting; function Copy_Lifting ( lifted,pts : List ) return List is -- DESCRIPTION : -- Copies the lifting on the points lifted to the points in pts, -- i.e., each point in pts will get the same lifting as the corresponding -- lifted point in the list lifted. res : List; tmp : List := pts; begin while not Is_Null(tmp) loop Construct(Copy_Lifting(lifted,Head_Of(tmp)),res); tmp := Tail_Of(tmp); end loop; return res; end Copy_Lifting; procedure Search_Lifting ( l : in List; pt : in Vector; found : out boolean; lif : out integer ) is tmp : List := l; lpt : Link_to_Vector; begin found := false; while not Is_Null(tmp) loop lpt := Head_Of(tmp); if Equal(lpt(pt'range),pt) then found := true; lif := lpt(lpt'last); exit; else tmp := Tail_Of(tmp); end if; end loop; end Search_Lifting; function Search_and_Lift ( l : List; pt : Vector ) return Vector is tmp : List := l; lpt : Link_to_Vector; begin while not Is_Null(tmp) loop lpt := Head_Of(tmp); if Equal(lpt(pt'range),pt) then return lpt.all; else tmp := Tail_Of(tmp); end if; end loop; return pt; end Search_and_Lift; function Search_and_Lift ( mic : Mixed_Cell; k : natural; pt : Vector ) return Vector is begin return Search_and_Lift(mic.pts(k),pt); end Search_and_Lift; function Induced_Lifting ( mixsub : Mixed_Subdivision; k : natural; pt : Vector ) return Vector is tmp : Mixed_Subdivision := mixsub; res : Vector(pt'first..pt'last+1); begin while not Is_Null(tmp) loop declare mic : Mixed_Cell := Head_Of(tmp); lpt : constant Vector := Search_and_Lift(mic,k,pt); begin if lpt'length = pt'length+1 then return lpt; else tmp := Tail_Of(tmp); end if; end; end loop; res(pt'range) := pt; res(res'last) := 1; res(res'last) := Conservative_Lifting(mixsub,k,res); return res; end Induced_Lifting; function Induced_Lifting ( n : natural; mix : Vector; points : Array_of_Lists; mixsub : Mixed_Subdivision ) return Array_of_Lists is res,res_last : Array_of_Lists(mix'range); cnt : natural := 1; tmp : List; begin for k in mix'range loop res_last(k) := res(k); tmp := points(cnt); while not Is_Null(tmp) loop declare pt : Link_to_Vector := Head_Of(tmp); lpt : constant Vector := Induced_Lifting(mixsub,k,pt.all); begin Append(res(k),res_last(k),lpt); end; tmp := Tail_Of(tmp); end loop; cnt := cnt + mix(k); end loop; return res; end Induced_Lifting; procedure Constant_Lifting ( l : in List; liftval : in natural; lifted,lifted_last : in out List ) is tmp : List := l; pt : Link_to_Vector; begin while not Is_Null(tmp) loop pt := Head_Of(tmp); declare lpt : Link_to_Vector := new Vector(pt'first..pt'last+1); begin lpt(pt'range) := pt.all; lpt(lpt'last) := liftval; Append(lifted,lifted_last,lpt); end; tmp := Tail_Of(tmp); end loop; end Constant_Lifting; procedure Constant_Lifting ( al : in Array_of_Lists; liftval : in natural; lifted,lifted_last : in out Array_of_Lists ) is begin for i in al'range loop Constant_Lifting(al(i),liftval,lifted(i),lifted_last(i)); end loop; end Constant_Lifting; function Conservative_Lifting ( mic : Mixed_Cell; k : natural; point : Vector ) return integer is sp : integer := mic.nor*Head_Of(mic.pts(k)); spp : integer := mic.nor.all*point; res : integer; begin if sp < spp then return point(point'last); else if mic.nor(mic.nor'last) = 0 then res := point(point'last); else spp := spp - point(point'last)*mic.nor(mic.nor'last); res := (sp - spp)/mic.nor(mic.nor'last) + 1; end if; return res; end if; end Conservative_Lifting; function Conservative_Lifting ( mixsub : Mixed_Subdivision; k : natural; point : Vector ) return integer is tmp : Mixed_Subdivision := mixsub; pt : Vector(point'range) := point; res : integer; begin while not Is_Null(tmp) loop pt(pt'last) := Conservative_Lifting(Head_Of(tmp),k,pt); tmp := Tail_Of(tmp); end loop; res := pt(pt'last); Clear(pt); return res; end Conservative_Lifting; function Lower_Lifting ( mic : Mixed_Cell; k : natural; point : Vector ) return integer is begin if Is_In(mic.pts(k),point) then return 0; else declare pt : Vector(point'range) := point; begin pt(pt'last) := 0; return Conservative_Lifting(mic,k,pt); end; end if; end Lower_Lifting; function Lower_Lifting ( mixsub : Mixed_Subdivision; k : natural; point : Vector ) return integer is lif : integer := point(point'last); tmp : Mixed_Subdivision := mixsub; max : integer := 0; begin while not Is_Null(tmp) loop lif := Lower_Lifting(Head_Of(tmp),k,point); if lif > max then max := lif; end if; exit when max = point(point'last); tmp := Tail_Of(tmp); end loop; return max; end Lower_Lifting; end Integer_Lifting_Utilities; SHAR_EOF fi # end of overwriting check if test -f 'integer_lifting_utilities.ads' then echo shar: will not over-write existing file "'integer_lifting_utilities.ads'" else cat << "SHAR_EOF" > 'integer_lifting_utilities.ads' with Integer_Vectors; use Integer_Vectors; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Integer_Mixed_Subdivisions; use Integer_Mixed_Subdivisions; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Complex_Multivariate_Laurent_Polynomials; use Complex_Multivariate_Laurent_Polynomials; with Complex_Laurent_Polynomial_Systems; use Complex_Laurent_Polynomial_Systems; package Integer_Lifting_Utilities is -- DESCRIPTION : -- This package provides some utilities for dealing with lifting functions. function Adaptive_Lifting ( l : Array_of_Lists ) return Vector; -- DESCRIPTION : -- Returns upper bounds for a random lifting, depending on the lengths -- of the lists in l. function Select_Subsystem ( p : Laur_Sys; mix : Vector; mic : Mixed_Cell ) return Laur_Sys; -- DESCRIPTION : -- Given a Laurent polynomial system and a mixed cell, -- the corresponding subsystem will be returned. -- ON ENTRY : -- p a Laurent polynomial system; -- mix type of mixture: occurencies of the supports; -- mic a mixed cell. -- REQUIRED : -- The polynomials in p must be ordered according to the type of mixture. function Perform_Lifting ( n : natural; l : List; p : Poly ) return Poly; function Perform_Lifting ( n : natural; mix : Vector; lifted : Array_of_Lists; p : Laur_Sys ) return Laur_Sys; -- DESCRIPTION : -- Construction of the polyhedral homotopy, given the lifted supports. -- The p will be lifted according to the lifted points, i.e. each -- monomial whose exponent vector corresponds to a vector in the -- lifted points (except for the last entry of course), will be -- extended with an additional unknown, with as exponent, the -- lifting value of that vector. function Copy_Lifting ( lifted : List; pt : Link_to_Vector ) return Link_to_Vector; -- DESCRIPTION : -- Searches the corresponding point in the list lifted and returns -- the lifted point. If the corresponding point has not been found, -- then the original point pt will be returned. function Copy_Lifting ( lifted,pts : List ) return List; -- DESCRIPTION : -- Copies the lifting on the points lifted to the points in pts, -- i.e., each point in pts will get the same lifting as the corresponding -- lifted point in the list lifted. procedure Search_Lifting ( l : in List; pt : in Vector; found : out boolean; lif : out integer ); -- DESCRIPTION : -- Searches the lifting of the point in the lifted list l. -- If found, then lif equals the lifting, otherwise lif is meaningless. function Search_and_Lift ( l : List; pt : Vector ) return Vector; -- DESCRIPTION : -- Given a lifted list of points and a unlifted vector, the function -- either returns the corresponding lifted vector from the list, or -- the same point, when there is no lifted point in l whose projection -- equals the given point pt. function Induced_Lifting ( mixsub : Mixed_Subdivision; k : natural; pt : Vector ) return Vector; function Induced_Lifting ( n : natural; mix : Vector; points : Array_of_Lists; mixsub : Mixed_Subdivision ) return Array_of_Lists; -- DESCRIPTION : -- Given a mixed subdivision for a tuple of supports, -- then the lifted points will be returned as induced by the -- subdivision. When points do not occur in the mixed subdivision, -- they will be lifted conservatively. procedure Constant_Lifting ( l : in List; liftval : in natural; lifted,lifted_last : in out List ); -- DESCRIPTION : -- Gives all points in l the constant lifting liftval, -- and appends them to the list lifted, where lifted_last is -- a pointer to the last element of lifted. procedure Constant_Lifting ( al : in Array_of_Lists; liftval : in natural; lifted,lifted_last : in out Array_of_Lists ); -- DESCRIPTION : -- Gives all points in al(i) the constant lifting liftval, -- and appends them to the lists lifted(i), where lifted_last(i) is -- a pointer to the last element of lifted(i). function Conservative_Lifting ( mic : Mixed_Cell; k : natural; point : Vector ) return integer; function Conservative_Lifting ( mixsub : Mixed_Subdivision; k : natural; point : Vector ) return integer; -- DESCRIPTION : -- Returns the value of the conservative lifting function of the point -- to be considered w.r.t. the kth polytope. -- REQUIRED : -- The given point must already be in the lifted space and its last -- coordinate must contain already a lower bound for the lifting value. function Lower_Lifting ( mic : Mixed_Cell; k : natural; point : Vector ) return integer; -- DESCRIPTION : -- Returns a lower bound on the lifting value. In case that the point -- belongs to the kth component of the cell, the value zero is returned. -- Otherwise, the conservative lifting value of the point w.r.t. the -- cell is returned. -- REQUIRED : -- The point must be already in lifted space. function Lower_Lifting ( mixsub : Mixed_Subdivision; k : natural; point : Vector ) return integer; -- DESCRIPTION : -- Applies the lower lifting function to all cells in the subdivision. -- Stops when the lower bound equals the lifting value of the point -- equals the lifting of the point given on entry. end Integer_Lifting_Utilities; SHAR_EOF fi # end of overwriting check if test -f 'integer_mixed_subdivisions.adb' then echo shar: will not over-write existing file "'integer_mixed_subdivisions.adb'" else cat << "SHAR_EOF" > 'integer_mixed_subdivisions.adb' with unchecked_deallocation; with Integer_Support_Functions; use Integer_Support_Functions; with Integer_Vectors_Utilities; use Integer_Vectors_Utilities; with Integer_Matrices; use Integer_Matrices; with Integer_Linear_System_Solvers; use Integer_Linear_System_Solvers; package body Integer_Mixed_Subdivisions is -- CREATORS : procedure Compute_Inner_Normal ( mic : in out Mixed_Cell ) is len : constant natural := Length_Of(mic.pts.all) - mic.pts'length; im : matrix(1..len,mic.nor'range); tmp : List; pt,first : Link_to_Vector; cnt : natural := 0; begin -- compute the inner normal : for i in mic.pts'range loop first := Head_Of(mic.pts(i)); tmp := Tail_Of(mic.pts(i)); while not Is_Null(tmp) loop pt := Head_Of(tmp); cnt := cnt + 1; for j in im'range(2) loop im(cnt,j) := pt(j) - first(j); end loop; tmp := Tail_Of(tmp); end loop; end loop; Upper_Triangulate(im); Scale(im); Solve0(im,mic.nor.all); Normalize(mic.nor); -- orientate the inner normal : if mic.nor(mic.nor'last) < 0 then Min_Vector(mic.nor); end if; end Compute_Inner_Normal; function Create ( pts : Array_of_Lists; nor : Vector ) return Mixed_Cell is res : Mixed_Cell; sup : integer; begin res.nor := new Vector'(nor); res.pts := new Array_of_Lists(pts'range); for k in pts'range loop sup := Minimal_Support(pts(k),nor); res.pts(k) := Face(pts(k),nor,sup); end loop; return res; end Create; function Create ( pts : Array_of_Lists; nors : List ) return Mixed_Subdivision is res,res_last : Mixed_Subdivision; tmp : List := nors; begin while not Is_Null(tmp) loop Append(res,res_last,Create(pts,Head_Of(tmp).all)); tmp := Tail_Of(tmp); end loop; return res; end Create; function Create ( pts : Array_of_Lists; mixsub : Mixed_Subdivision ) return Mixed_Subdivision is tmp,res,res_last : Mixed_Subdivision; begin tmp := mixsub; while not Is_Null(tmp) loop Append(res,res_last,Create(pts,Head_Of(tmp).nor.all)); tmp := Tail_Of(tmp); end loop; return res; end Create; procedure Update ( pts : in Array_of_Lists; nor : in Vector; mixsub,mixsub_last : in out Mixed_Subdivision ) is -- DESCRIPTION : -- Given a tuple of point sets and a normal, -- the mixed subdivision will be updated. tmp : Mixed_Subdivision := mixsub; done : boolean := false; begin while not Is_Null(tmp) and not done loop declare mic : Mixed_Cell := Head_Of(tmp); last : List; begin if Equal(mic.nor.all,nor) then for k in mic.pts'range loop last := mic.pts(k); while not Is_Null(Tail_Of(last)) loop last := Tail_Of(last); end loop; Deep_Concat_Diff(mic.pts(k),last,pts(k)); end loop; Set_Head(tmp,mic); done := true; else tmp := Tail_Of(tmp); end if; end; end loop; if not done then declare mic : Mixed_Cell; begin mic.pts := new Array_of_Lists(pts'range); Copy(pts,mic.pts.all); mic.nor := new Integer_Vectors.Vector'(nor); mic.sub := null; Append(mixsub,mixsub_last,mic); end; end if; end Update; procedure Update ( mixsub,mixsub_last : in out Mixed_Subdivision; cells : in Mixed_Subdivision ) is tmp : Mixed_Subdivision := cells; mic : Mixed_Cell; begin while not Is_Null(tmp) loop mic := Head_Of(tmp); Update(mic.pts.all,mic.nor.all,mixsub,mixsub_last); tmp := Tail_Of(tmp); end loop; end Update; -- CONSTRUCTORS : procedure Copy ( mic1 : in Mixed_Cell; mic2 : in out Mixed_Cell ) is begin Deep_Clear(mic2); if mic1.nor /= null then mic2.nor := new Integer_Vectors.Vector'(mic1.nor.all); end if; if mic1.pts /= null then mic2.pts := new Array_of_Lists(mic1.pts'range); Copy(mic1.pts.all,mic2.pts.all); end if; if mic1.sub /= null then mic2.sub := new Mixed_Subdivision; Copy(mic1.sub.all,mic2.sub.all); end if; end Copy; procedure Copy ( mixsub1 : in Mixed_Subdivision; mixsub2 : in out Mixed_Subdivision ) is tmp : Mixed_Subdivision := mixsub1; mixsub2_last : Mixed_Subdivision; begin Deep_Clear(mixsub2); while not Is_Null(tmp) loop declare mic1,mic2 : Mixed_Cell; begin mic1 := Head_Of(tmp); Copy(mic1,mic2); Append(mixsub2,mixsub2_last,mic2); end; tmp := Tail_Of(tmp); end loop; end Copy; procedure Append_Diff ( first,last : in out Mixed_Subdivision; mic : in Mixed_Cell ) is begin if not Is_In(first,mic) then Append(first,last,mic); end if; end Append_Diff; procedure Concat_Diff ( first,last : in out Mixed_Subdivision; mixsub : in Mixed_Subdivision ) is tmp : Mixed_Subdivision := mixsub; begin while not Is_Null(tmp) loop declare mic : Mixed_Cell := Head_Of(tmp); begin if not Is_In(first,mic) then Append_Diff(first,last,mic); end if; end; tmp := Tail_Of(tmp); end loop; end Concat_Diff; procedure Construct ( mixsub : in Mixed_Subdivision; first : in out Mixed_Subdivision ) is tmp : Mixed_Subdivision := mixsub; begin while not Is_Null(tmp) loop declare mic : Mixed_Cell := Head_Of(tmp); begin Construct(mic,first); end; tmp := Tail_Of(tmp); end loop; end Construct; procedure Construct_Diff ( mixsub : in Mixed_Subdivision; first : in out Mixed_Subdivision ) is tmp : Mixed_Subdivision := mixsub; begin while not Is_Null(tmp) loop declare mic : Mixed_Cell := Head_Of(tmp); begin if not Is_In(first,mic) then Construct(mic,first); end if; end; tmp := Tail_Of(tmp); end loop; end Construct_Diff; -- SELECTORS : function Is_Equal ( mic1,mic2 : Mixed_Cell ) return boolean is begin if not Equal(mic1.nor,mic2.nor) then return false; elsif Is_Equal(mic1.pts,mic2.pts) then return Is_Equal(mic1.sub,mic2.sub); else return false; end if; end Is_Equal; function Is_Sub ( mixsub1,mixsub2 : Mixed_Subdivision ) return boolean is -- DESCRIPTION : -- Returns true when every cell in mixsub1 also belongs to mixsub2. tmp : Mixed_Subdivision := mixsub1; begin while not Is_Null(tmp) loop if not Is_In(mixsub2,Head_Of(tmp)) then return false; else tmp := Tail_Of(tmp); end if; end loop; return true; end Is_Sub; function Is_Equal ( mixsub1,mixsub2 : Mixed_Subdivision ) return boolean is begin if Is_Sub(mixsub1,mixsub2) then return Is_Sub(mixsub2,mixsub1); else return false; end if; end Is_Equal; function Is_Equal ( mixsub1,mixsub2 : Link_to_Mixed_Subdivision ) return boolean is begin if mixsub1 = null and then mixsub2 /= null then return false; elsif mixsub2 = null then return true; else return Is_Equal(mixsub1.all,mixsub2.all); end if; end Is_Equal; function Is_In ( mixsub : Mixed_Subdivision; normal : Vector ) return boolean is tmp : Mixed_Subdivision := mixsub; c : Mixed_Cell; begin while not Is_Null(tmp) loop c := Head_Of(tmp); if Equal(c.nor.all,normal) then return true; end if; tmp := Tail_Of(tmp); end loop; return false; end Is_In; function Is_In ( mixsub : Mixed_Subdivision; mic : Mixed_Cell ) return boolean is tmp : Mixed_Subdivision := mixsub; mic1 : Mixed_Cell; begin while not Is_Null(tmp) loop mic1 := Head_Of(tmp); if Is_Equal(mic1,mic) then return true; else tmp := Tail_Of(tmp); end if; end loop; return false; end Is_In; -- DESTRUCTORS : procedure free is new unchecked_deallocation (Mixed_Subdivision,Link_to_Mixed_Subdivision); procedure Deep_Clear ( mic : in out Mixed_Cell ) is begin Clear(mic.nor); Deep_Clear(mic.pts); Deep_Clear(mic.sub); end Deep_Clear; procedure Shallow_Clear ( mic : in out Mixed_Cell ) is begin Clear(mic.nor); Shallow_Clear(mic.pts); Shallow_Clear(mic.sub); end Shallow_Clear; procedure Deep_Clear ( mixsub : in out Mixed_Subdivision ) is tmp : Mixed_Subdivision; begin tmp := mixsub; while not Is_Null(tmp) loop declare mic : Mixed_Cell := Head_Of(tmp); begin Deep_Clear(mic); end; tmp := Tail_Of(tmp); end loop; Shallow_Clear(mixsub); end Deep_Clear; procedure Deep_Clear ( mixsub : in out Link_to_Mixed_Subdivision ) is begin if mixsub /= null then Deep_Clear(mixsub.all); free(mixsub); end if; end Deep_Clear; procedure Shallow_Clear ( mixsub : in out Mixed_Subdivision ) is begin Lists_of_Mixed_Cells.Clear(Lists_of_Mixed_Cells.List(mixsub)); end Shallow_Clear; procedure Shallow_Clear ( mixsub : in out Link_to_Mixed_Subdivision ) is begin if mixsub /= null then Shallow_Clear(mixsub.all); free(mixsub); end if; end Shallow_Clear; end Integer_Mixed_Subdivisions; SHAR_EOF fi # end of overwriting check if test -f 'integer_mixed_subdivisions.ads' then echo shar: will not over-write existing file "'integer_mixed_subdivisions.ads'" else cat << "SHAR_EOF" > 'integer_mixed_subdivisions.ads' with Lists; with Integer_Vectors; use Integer_Vectors; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; package Integer_Mixed_Subdivisions is -- DESCRIPTION : -- This package defines regular mixed subdivisions induced by -- integer-valued lifting functions. -- DATA STRUCTURES : type Mixed_Subdivision; -- list of mixed cells type Link_to_Mixed_Subdivision is access Mixed_Subdivision; type Mixed_Cell is record nor : Link_to_Vector; -- inner normal to the facet pts : Link_to_Array_of_Lists; -- points that span the cell sub : Link_to_Mixed_Subdivision; -- subdivision of the cell end record; package Lists_of_Mixed_Cells is new Lists(Mixed_Cell); type Mixed_Subdivision is new Lists_of_Mixed_Cells.List; -- CREATORS : procedure Compute_Inner_Normal ( mic : in out Mixed_Cell ); -- DESCRIPTION : -- Computes the inner normal ortogonal to the points in mic. -- REQUIRED : mic.nor /= null, must already be allocated with -- the appropriate size. function Create ( pts : Array_of_Lists; nor : Vector ) return Mixed_Cell; function Create ( pts : Array_of_Lists; nors : List ) return Mixed_Subdivision; -- DESCRIPTION : -- Creates the mixed cell(s) of those points whose inner product -- with the given normal(s) is minimal. function Create ( pts : Array_of_Lists; mixsub : Mixed_Subdivision ) return Mixed_Subdivision; -- DESCRIPTION : -- Takes the normals of the cells in the given mixed subdivision -- and creates the mixed cells by selecting the points whose inner -- product with the normals are minimal. procedure Update ( pts : in Array_of_Lists; nor : in Vector; mixsub,mixsub_last : in out Mixed_Subdivision ); -- DESCRIPTION : -- Given a tuple of points and a normal, the mixed subdivision will -- be updated: either an existing cell will get additional points, -- if the normal already occurs in the subdivision, or otherwise, -- a new cell will be created and appended to the mixed subdivision. procedure Update ( mixsub,mixsub_last : in out Mixed_Subdivision; cells : in Mixed_Subdivision ); -- DESCRIPTION : -- Applies the other Update to every element in the list cells, -- to augment or modify the mixed subdivision mixsub. -- CONSTRUCTORS : procedure Copy ( mic1 : in Mixed_Cell; mic2 : in out Mixed_Cell ); procedure Copy ( mixsub1 : in Mixed_Subdivision; mixsub2 : in out Mixed_Subdivision ); -- DESCRIPTION : -- Makes a deep copy of the cells and the subdivisions. procedure Append_Diff ( first,last : in out Mixed_Subdivision; mic : in Mixed_Cell ); -- DESCRIPTION : -- Appends a mixed cell to the list of cells first, where -- last points to the last element of the list first. -- The suffix _Diff means that only when the cell does not already -- belong to the list first, it will be appended. procedure Concat_Diff ( first,last : in out Mixed_Subdivision; mixsub : in Mixed_Subdivision ); -- DESCRIPTION : -- Concatenates all cells in mixsub to the list of cells first, -- last is a pointer to the last cell in first. -- The suffix _Diff means that only when those cells that do not already -- belong to the list first will be appended. procedure Construct ( mixsub : in Mixed_Subdivision; first : in out Mixed_Subdivision ); procedure Construct_Diff ( mixsub : in Mixed_Subdivision; first : in out Mixed_Subdivision ); -- DESCRIPTION : -- Constructs all cells in the mixed subdivision to the front of -- the list first. -- The suffix _Diff means that only when those cells that do not already -- belong to the list first will be constructed to first. -- SELECTORS : function Is_Equal ( mic1,mic2 : Mixed_Cell ) return boolean; function Is_Equal ( mixsub1,mixsub2 : Mixed_Subdivision ) return boolean; function Is_Equal ( mixsub1,mixsub2 : Link_to_Mixed_Subdivision ) return boolean; -- DESCRIPTION : -- Returns true when two mixed cells and mixed subdivisions are equal. function Is_In ( mixsub : Mixed_Subdivision; normal : Vector ) return boolean; function Is_In ( mixsub : Mixed_Subdivision; mic : Mixed_Cell ) return boolean; -- DESCRIPTION : -- Returns true if normal or cell belongs to the mixed subdivision, -- otherwise false is returned. When the whole mixed cell is given, -- then not only the normal, but also the points will be checked. -- DESTRUCTORS : procedure Deep_Clear ( mic : in out Mixed_Cell ); procedure Deep_Clear ( mixsub : in out Mixed_Subdivision ); procedure Deep_Clear ( mixsub : in out Link_to_Mixed_Subdivision ); procedure Shallow_Clear ( mic : in out Mixed_Cell ); procedure Shallow_Clear ( mixsub : in out Mixed_Subdivision ); procedure Shallow_Clear ( mixsub : in out Link_to_Mixed_Subdivision ); -- DESCRIPTION : -- The memory space allocated will be freed. -- A shallow clear only destroys the list structures, -- while with a deep clear, also the contents of the lists are freed. end Integer_Mixed_Subdivisions; SHAR_EOF fi # end of overwriting check if test -f 'integer_mixed_subdivisions_io.adb' then echo shar: will not over-write existing file "'integer_mixed_subdivisions_io.adb'" else cat << "SHAR_EOF" > 'integer_mixed_subdivisions_io.adb' with integer_io,Integer_Vectors_io; use integer_io,Integer_Vectors_io; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Lists_of_Integer_Vectors_io; use Lists_of_Integer_Vectors_io; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Mixed_Volume_Computation; use Mixed_Volume_Computation; package body Integer_Mixed_Subdivisions_io is -- INPUT ROUTINES : procedure get ( n,m : in natural; mic : out Mixed_Cell ) is begin get(Standard_Input,n,m,mic); end get; procedure get ( file : in file_type; n,m : in natural; mic : out Mixed_Cell ) is adl : Array_of_Lists(1..m); l : natural; begin get(file,n+1,mic.nor); for k in 1..m loop get(file,l); get(file,n+1,l,adl(k)); end loop; mic.pts := new Array_of_Lists'(adl); get(file,l); if l /= 0 then declare nn,mm : natural; mix : Link_to_Vector; sub : Mixed_Subdivision; begin get(file,nn,mm,mix,sub); if not Is_Null(sub) then mic.sub := new Mixed_Subdivision'(sub); end if; end; end if; end get; procedure get ( n,m : out natural; mixed_type : out Link_to_Vector; mixsub : out Mixed_Subdivision ) is begin get(Standard_Input,n,m,mixed_type,mixsub); end get; procedure get ( file : in file_type; n,m : out natural; mixed_type : out Link_to_Vector; mixsub : out Mixed_Subdivision ) is res,res_last : Mixed_Subdivision; l,nn,mm : natural; begin get(file,nn); n := nn; get(file,mm); m := mm; get(file,mm,mixed_type); get(file,l); for k in 1..l loop declare mic : Mixed_Cell; begin get(file,nn,mm,mic); Append(res,res_last,mic); end; end loop; mixsub := res; end get; -- OUTPUT ROUTINES : procedure put ( n : in natural; mix : in Vector; mic : in Mixed_Cell ) is begin put(Standard_Output,n,mix,mic); end put; procedure put ( n : in natural; mix : in Vector; mic : in out Mixed_Cell; mv : out natural ) is begin put(Standard_Output,n,mix,mic,mv); end put; procedure put ( file : in file_type; n : in natural; mix : in Vector; mic : in Mixed_Cell ) is begin put(file,mic.nor); new_line(file); for k in mic.pts'range loop put(file,Length_Of(mic.pts(k)),1); new_line(file); put(file,mic.pts(k)); end loop; if mic.sub = null then put(file,0,1); new_line(file); else put(file,1,1); new_line(file); put(file,n,mix,mic.sub.all); end if; end put; procedure put ( file : in file_type; n : in natural; mix : in Vector; mic : in out Mixed_Cell; mv : out natural ) is begin put(file," normal to cell : "); put(file,mic.nor); new_line(file); put_line(file," the points in the cell : "); for k in mic.pts'range loop put(file," component "); put(file,k,1); put(file," with "); put(file,Length_Of(mic.pts(k)),1); put_line(file," points :"); put(file,mic.pts(k)); end loop; Mixed_Volume(n,mix,mic,mv); if mic.sub /= null then put_line(file," with refinement : "); put(file,n,mix,mic.sub.all,mv); end if; end put; procedure put ( n : in natural; mix : in Vector; mixsub : in Mixed_Subdivision ) is begin put(Standard_Output,n,mix,mixsub); end put; procedure put ( n : in natural; mix : in Vector; mixsub : in out Mixed_Subdivision; mv : out natural ) is begin put(Standard_Output,n,mix,mixsub,mv); end put; procedure put ( file : in file_type; n : in natural; mix : in Vector; mixsub : in Mixed_Subdivision ) is tmp : Mixed_Subdivision := mixsub; begin put(file,n,1); new_line(file); put(file,mix'last,1); new_line(file); put(file,mix); new_line(file); put(file,Length_Of(mixsub),1); new_line(file); while not Is_Null(tmp) loop put(file,n,mix,Head_Of(tmp)); tmp := Tail_Of(tmp); end loop; end put; procedure put ( file : in file_type; n : in natural; mix : in Vector; mixsub : in out Mixed_Subdivision; mv : out natural ) is tmp : Mixed_Subdivision := mixsub; cnt,res : natural := 0; vol : natural; begin put(file,"Dimension without lifting : "); put(file,n,1); new_line(file); put(file,"Number of different supports : "); put(file,mix'last,1); new_line(file); put(file,"Type of mixture : "); put(file,mix); new_line(file); put_line(file,"The cells in the subdivision :"); while not Is_Null(tmp) loop cnt := cnt + 1; put(file,"Cell "); put(file,cnt,1); put_line(file," :"); declare mic : Mixed_Cell := Head_Of(tmp); begin put(file,n,mix,mic,vol); Set_Head(tmp,mic); end; put(file,"==> Volume : "); put(file,vol,1); put_line(file,"."); res := res + vol; tmp := Tail_Of(tmp); end loop; mv := res; end put; end Integer_Mixed_Subdivisions_io; SHAR_EOF fi # end of overwriting check if test -f 'integer_mixed_subdivisions_io.ads' then echo shar: will not over-write existing file "'integer_mixed_subdivisions_io.ads'" else cat << "SHAR_EOF" > 'integer_mixed_subdivisions_io.ads' with text_io,Integer_Vectors; use text_io,Integer_Vectors; with Integer_Mixed_Subdivisions; use Integer_Mixed_Subdivisions; package Integer_Mixed_Subdivisions_io is -- DESCRIPTION : -- This package provides some routines for i/o of mixed subdivisions. procedure get ( n,m : in natural; mic : out Mixed_Cell ); procedure get ( file : in file_type; n,m : in natural; mic : out Mixed_Cell ); -- DESCRIPTION : -- Reads the normal and for each list of points, the length -- of the list and the list itself from standard input or from file. procedure get ( n,m : out natural; mixed_type : out Link_to_Vector; mixsub : out Mixed_Subdivision ); procedure get ( file : in file_type; n,m : out natural; mixed_type : out Link_to_Vector; mixsub : out Mixed_Subdivision ); -- DESCRIPTION : -- Reads the dimension, the number of different supports, -- the type of mixture, the number of mixed cells and the mixed -- subdivision from standard input or from file. procedure put ( n : in natural; mix : in Vector; mic : in Mixed_Cell ); procedure put ( n : in natural; mix : in Vector; mic : in out Mixed_Cell; mv : out natural); procedure put ( file : in file_type; n : in natural; mix : in Vector; mic : in Mixed_Cell ); procedure put ( file : in file_type; n : in natural; mix : in Vector; mic : in out Mixed_Cell; mv : out natural ); -- DESCRIPTION : -- Puts the normal, the length of each point list and the -- points belonging to the cell on standard output or on file. -- More text banners are provided when the parameter `mv' is supplied. -- This `mv' contains the mixed volume of the cell on return. -- When the mixed volume is computed, eventually the cell is refined. procedure put ( n : in natural; mix : in Vector; mixsub : in Mixed_Subdivision ); procedure put ( n : in natural; mix : in Vector; mixsub : in out Mixed_Subdivision; mv : out natural ); procedure put ( file : in file_type; n : in natural; mix : in Vector; mixsub : in Mixed_Subdivision ); procedure put ( file : in file_type; n : in natural; mix : in Vector; mixsub : in out Mixed_Subdivision; mv : out natural ); -- DESCRIPTION : -- Puts the dimension, the type of mixture, the number of mixed -- cells and the mixed subdivision on file or on standard output. -- More text banners are provided when the parameter `mv' is supplied. -- This `mv' contains the mixed volume of the cell on return. -- When the mixed volume is computed, eventually the cells are refined. end Integer_Mixed_Subdivisions_io; SHAR_EOF fi # end of overwriting check if test -f 'integer_polyhedral_continuation.adb' then echo shar: will not over-write existing file "'integer_polyhedral_continuation.adb'" else cat << "SHAR_EOF" > 'integer_polyhedral_continuation.adb' with integer_io; use integer_io; with Floating_Point_Numbers; use Floating_Point_Numbers; with Mathematical_Functions; use Mathematical_Functions; with Float_Vectors; with Float_Vectors_of_Vectors; with Integer_Vectors_of_Vectors; with Complex_Multivariate_Polynomials; with Complex_Multivariate_Laurent_Polynomials; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Laurent_to_Polynomial_Converters; use Laurent_to_Polynomial_Converters; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Power_Lists; use Power_Lists; with Integer_Lifting_Utilities; use Integer_Lifting_Utilities; with Substitutors; use Substitutors; with Transforming_Integer_Vector_Lists; use Transforming_Integer_Vector_Lists; with Transforming_Laurent_Systems; use Transforming_Laurent_Systems; with Complex_Matrices; use Complex_Matrices; with Complex_Numbers,Complex_Norms; use Complex_Numbers,Complex_Norms; with Complex_Vectors; with Continuation_Parameters; with Increment_and_Fix_Continuation; use Increment_and_Fix_Continuation; with Fewnomials; with BKK_Bound_Computations; use BKK_Bound_Computations; with Integer_Vectors_of_Vectors_io; use Integer_Vectors_of_Vectors_io; with Integer_Vectors_io; use Integer_Vectors_io; with Complex_Numbers_io; use Complex_Numbers_io; package body Integer_Polyhedral_Continuation is procedure Write ( file : in file_type; c : in Complex_Vectors_of_Vectors.Vector ) is begin for i in c'range loop put(file,i,1); put(file," : "); for j in c(i)'range loop if REAL_PART(c(i)(j)) = 0.0 then put(file," 0"); else put(file,c(i)(j),2,3,0); end if; end loop; new_line(file); end loop; end Write; -- UTILITIES FOR POLYHEDRAL COEFFICIENT HOMOTOPY : function Power ( x,m : double_float ) return double_float is -- DESCRIPTION : -- Computes x**m for high powers of m to avoid RANGE_ERROR. -- intm : integer := integer(m); -- fltm : double_float; begin -- if m < 10.0 -- then return (x**m); -- FOR GNAT 3.07 -- else if double_float(intm) > m -- then intm := intm-1; -- end if; -- fltm := m - double_float(intm); -- return ((x**intm)*(x**fltm)); -- end if; end Power; function Minimum ( v : Integer_Vectors.Vector ) return integer is -- DESCRIPTION : -- Returns the minimal element in the vector v, different from zero. tmp,min : integer := 0; begin for i in v'range loop if v(i) /= 0 then if v(i) < 0 then tmp := -v(i); end if; if min = 0 then min := tmp; elsif tmp < min then min := tmp; end if; end if; end loop; return min; end Minimum; function Scale ( v : Integer_Vectors.Vector ) return Float_Vectors.Vector is -- DESCRIPTION : -- Returns the vector v divided by its minimal element different from zero, -- such that the smallest positive element in the scaled vector equals one. res : Float_Vectors.Vector(v'range); min : constant integer := Minimum(v); begin if (min = 0) or (min = 1) then for i in res'range loop res(i) := double_float(v(i)); end loop; else for i in res'range loop res(i) := double_float(v(i))/double_float(min); end loop; end if; return res; end Scale; function Scale ( v : Integer_Vectors_of_Vectors.Vector ) return Float_Vectors_of_Vectors.Vector is -- DESCRIPTION : -- Returns an array of scaled vectors. res : Float_Vectors_of_Vectors.Vector(v'range); begin for i in v'range loop declare sv : constant Float_Vectors.Vector := Scale(v(i).all); begin res(i) := new Float_Vectors.Vector(sv'range); for j in sv'range loop res(i)(j) := sv(j); end loop; end; -- detour set up for GNAT 3.07 -- res(i) := new Float_Vectors.Vector'(Scale(v(i).all)); end loop; return res; end Scale; procedure Shift ( v : in out Integer_Vectors.Vector ) is -- DESCRIPTION : -- Shifts the elements in v, such that the minimal element equals zero. min : integer := v(v'first); begin for i in v'first+1..v'last loop if v(i) < min then min := v(i); end if; end loop; if min /= 0 then for i in v'range loop v(i) := v(i) - min; end loop; end if; end Shift; function Create ( e : Integer_Vectors_of_Vectors.Vector; l : List; normal : Vector ) return Integer_Vectors.Vector is -- DESCRIPTION : -- Returns a vector with all inner products of the normal with -- the exponents in the list, such that minimal value equals zero. res : Integer_Vectors.Vector(e'range); lei : Integer_Vectors.Vector(normal'first..normal'last-1); found : boolean; lif : integer; begin for i in e'range loop lei := e(i).all; Search_Lifting(l,lei,found,lif); if not found then res(i) := 1000; else res(i) := lei*normal(lei'range) + normal(normal'last)*lif; end if; end loop; Shift(res); return res; end Create; function Create ( e : Exponent_Vectors_Array; l : Array_of_Lists; mix,normal : Vector ) return Integer_Vectors_of_Vectors.Vector is res : Integer_Vectors_of_Vectors.Vector(e'range); cnt : natural := res'first; begin for i in mix'range loop declare rescnt : constant Integer_Vectors.Vector := Create(e(cnt).all,l(i),normal); begin res(cnt) := new Integer_Vectors.Vector(rescnt'range); for j in rescnt'range loop res(cnt)(j) := rescnt(j); end loop; end; Shift(res(cnt).all); for k in 1..(mix(i)-1) loop res(cnt+k) := new Integer_Vectors.Vector(res(cnt)'range); for j in res(cnt)'range loop res(cnt+k)(j) := res(cnt)(j); end loop; end loop; cnt := cnt + mix(i); end loop; return res; end Create; procedure Eval ( c : in Complex_Vectors.Vector; t : in double_float; m : in Integer_Vectors.Vector; ctm : in out Complex_Vectors.Vector ) is -- DESCRIPTION : ctm = c*t**m. begin for i in ctm'range loop ctm(i) := c(i)*CMPLX((t**m(i))); end loop; end Eval; procedure Eval ( c : in Complex_Vectors.Vector; t : in double_float; m : in Float_Vectors.Vector; ctm : in out Complex_Vectors.Vector ) is -- DESCRIPTION : ctm = c*t**m. begin for i in ctm'range loop -- ctm(i) := c(i)*CMPLX((t**m(i))); if (REAL_PART(c(i)) = 0.0) and (IMAG_PART(c(i)) = 0.0) then ctm(i) := CMPLX(0.0); else ctm(i) := c(i)*CMPLX(Power(t,m(i))); end if; end loop; end Eval; procedure Eval ( c : in Complex_Vectors_of_Vectors.Vector; t : in double_float; m : in Integer_Vectors_of_Vectors.Vector; ctm : in out Complex_Vectors_of_Vectors.Vector ) is -- DESCRIPTION : ctm = c*t**m. begin for i in ctm'range loop Eval(c(i).all,t,m(i).all,ctm(i).all); end loop; end Eval; procedure Eval ( c : in Complex_Vectors_of_Vectors.Vector; t : in double_float; m : in Float_Vectors_of_Vectors.Vector; ctm : in out Complex_Vectors_of_Vectors.Vector ) is -- DESCRIPTION : ctm = c*t**m. begin for i in ctm'range loop Eval(c(i).all,t,m(i).all,ctm(i).all); end loop; end Eval; -- pragma inline(Eval); -- HOMOTOPY CONSTRUCTOR : function Construct_Homotopy ( p : Laur_Sys; normal : Vector ) return Laur_Sys is -- DESCRIPTION : -- Given a Laurent polynomial system of dimension n*(n+1) and a -- normal, a homotopy will be constructed, with t = x(n+1) -- and so that the support of the start system corresponds with -- all points which give the minimal product with the normal. res : Laur_Sys(p'range); n : constant natural := p'length; use Complex_Multivariate_Laurent_Polynomials; function Construct_Polynomial ( p : Poly; v : Vector ) return Poly is res : Poly := Null_Poly; procedure Construct_Term ( t : in Term; cont : out boolean ) is rt : term; begin rt.cf := t.cf; rt.dg := new Integer_Vectors.Vector'(t.dg.all); rt.dg(n+1) := t.dg.all*v; Plus_Term(res,rt); Clear(rt); cont := true; end Construct_Term; procedure Construct_Terms is new Complex_Multivariate_Laurent_Polynomials.Visiting_Iterator (Process => Construct_Term); begin Construct_Terms(p); return res; end Construct_Polynomial; begin -- SUBSTITUTIONS : for k in p'range loop res(k) := Construct_Polynomial(p(k),normal); end loop; -- SHIFT : for k in res'range loop declare d : integer := Minimal_Degree(res(k),n+1); t : Term; begin t.cf := CMPLX(1.0); t.dg := new Integer_Vectors.Vector'(1..n+1 => 0); t.dg(n+1) := -d; Mult_Term(res(k),t); Clear(t); end; end loop; return res; end Construct_Homotopy; function Determine_Power ( n : natural; h : Laur_Sys ) return positive is -- DESCRIPTION : -- Returns the smallest power of the last unknown, -- over all polynomials in h. res : positive := 1; first : boolean := true; d : integer; use Complex_Multivariate_Laurent_Polynomials; procedure Scan ( t : in Term; cont : out boolean ) is begin if (t.dg(n+1) > 0) and then (t.dg(n+1) < d) then d := t.dg(n+1); end if; cont := true; end Scan; procedure Search_Positive_Minimum is new Visiting_Iterator(Scan); begin for i in h'range loop d := Maximal_Degree(h(i),n+1); if d > 0 then Search_Positive_Minimum(h(i)); if first then res := d; first := false; elsif d < res then res := d; end if; end if; exit when (d=1); end loop; if res = 1 then return res; else return 2; end if; end Determine_Power; procedure Extract_Regular ( sols : in out Solution_List ) is function To_Be_Removed ( flag : in natural ) return boolean is begin return ( flag /= 1 ); end To_Be_Removed; procedure Extract_Regular_Solutions is new Solutions.Delete(To_Be_Removed); begin Extract_Regular_Solutions(sols); end Extract_Regular; procedure Refine ( file : in file_type; p : in Laur_Sys; sols : in out Solution_List ) is -- DESCRIPTION : -- Given a polyhedral homotopy p and a list of solution for t=1, -- this list of solutions will be refined. pp : Poly_Sys(p'range) := Laurent_to_Polynomial_System(p); n : constant natural := p'length; eps : constant double_float := 10.0**(-12); tolsing : constant double_float := 10.0**(-8); max : constant natural := 3; numb : natural := 0; begin pp := Laurent_to_Polynomial_System(p); Substitute(n+1,CMPLX(1.0),pp); -- Reporting_Root_Refiner(file,pp,sols,eps,eps,tolsing,numb,max,false); Clear(pp); Extract_Regular(sols); end Refine; -- FIRST LAYER OF CONTINUATION ROUTINES : procedure Mixed_Continuation ( p : in Laur_Sys; normal : in Vector; sols : in out Solution_List ) is n : constant natural := p'length; h : Laur_Sys(p'range) := Construct_Homotopy(p,normal); hpe : Eval_Laur_Sys(h'range) := Create(h); j : Jacobi(h'range,h'first..h'last+1) := Create(h); je : Eval_Jacobi(j'range(1),j'range(2)) := Create(j); use Complex_Multivariate_Laurent_Polynomials; function Eval ( x : Complex_Vectors.Vector; t : double_complex ) return Complex_Vectors.Vector is xt : Complex_Vectors.Vector(x'first..x'last+1); begin xt(x'range) := x; xt(xt'last) := t; return Eval(hpe,xt); end Eval; function dHt ( x : Complex_Vectors.Vector; t : double_complex ) return Complex_Vectors.Vector is res : Complex_Vectors.Vector(p'range); xt : Complex_Vectors.Vector(x'first..x'last+1); begin xt(x'range) := x; xt(xt'last) := t; for i in res'range loop res(i) := Eval(je(i,xt'last),xt); end loop; return res; end dHt; function dHx ( x : Complex_Vectors.Vector; t : double_complex ) return matrix is m : matrix(x'range,x'range); xt : Complex_Vectors.Vector(x'first..x'last+1); begin xt(x'range) := x; xt(xt'last) := t; for i in m'range(1) loop for j in m'range(1) loop m(i,j) := Eval(je(i,j),xt); end loop; end loop; return m; end dHx; -- pragma inline(Eval,dHt,dHx); procedure Laur_Cont is new Silent_Continue(Norm1,Eval,dHt,dHx); begin -- Continuation_Parameters.power_of_t := Determine_Power(h'length,h); Laur_Cont(sols,false); Clear(h); Clear(hpe); Clear(j); Clear(je); Extract_Regular(sols); end Mixed_Continuation; procedure Mixed_Continuation ( file : in file_type; p : in Laur_Sys; normal : in Vector; sols : in out Solution_List ) is h : Laur_Sys(p'range) := Construct_Homotopy(p,normal); hpe : Eval_Laur_Sys(h'range) := Create(h); j : Jacobi(h'range,h'first..h'last+1) := Create(h); je : Eval_Jacobi(j'range(1),j'range(2)) := Create(j); use Complex_Multivariate_Laurent_Polynomials; function Eval ( x : Complex_Vectors.Vector; t : double_complex ) return Complex_Vectors.Vector is xt : Complex_Vectors.Vector(x'first..x'last+1); begin xt(x'range) := x; xt(xt'last) := t; return Eval(hpe,xt); end Eval; function dHt ( x : Complex_Vectors.Vector; t : double_complex ) return Complex_Vectors.Vector is res : Complex_Vectors.Vector(p'range); xt : Complex_Vectors.Vector(x'first..x'last+1); begin xt(x'range) := x; xt(xt'last) := t; for i in res'range loop res(i) := Eval(je(i,xt'last),xt); end loop; return res; end dHt; function dHx ( x : Complex_Vectors.Vector; t : double_complex ) return matrix is m : matrix(x'range,x'range); xt : Complex_Vectors.Vector(x'first..x'last+1); begin xt(x'range) := x; xt(xt'last) := t; for i in m'range(1) loop for j in m'range(1) loop m(i,j) := Eval(je(i,j),xt); end loop; end loop; return m; end dHx; -- pragma inline(Eval,dHt,dHx); procedure Laur_Cont is new Reporting_Continue(Norm1,Eval,dHt,dHx); begin -- Continuation_Parameters.power_of_t := Determine_Power(h'length,h); Laur_Cont(file,sols,false); Clear(h); Clear(hpe); Clear(j); Clear(je); Extract_Regular(sols); end Mixed_Continuation; procedure Mixed_Continuation ( mix : in Integer_Vectors.Vector; lifted : in Array_of_Lists; h : in Eval_Coeff_Laur_Sys; c : in Complex_Vectors_of_Vectors.Vector; e : in Exponent_Vectors_Array; j : in Eval_Coeff_Jacobi; m : in Mult_Factors; normal : in Vector; sols : in out Solution_List ) is pow : Integer_Vectors_of_Vectors.Vector(c'range) := Create(e,lifted,mix,normal); -- scapow : Float_Vectors_of_Vectors.Vector(c'range) := Scale(pow); ctm : Complex_Vectors_of_Vectors.Vector(c'range); use Complex_Multivariate_Laurent_Polynomials; function Eval ( x : Complex_Vectors.Vector; t : double_complex ) return Complex_Vectors.Vector is begin -- Eval(c,REAL_PART(t),scapow,ctm); Eval(c,REAL_PART(t),pow,ctm); return Eval(h,ctm,x); end Eval; function dHt ( x : Complex_Vectors.Vector; t : double_complex ) return Complex_Vectors.Vector is res : Complex_Vectors.Vector(h'range); xtl : constant integer := x'last+1; begin -- Eval(c,REAL_PART(t),scapow,ctm); Eval(c,REAL_PART(t),pow,ctm); for i in res'range loop res(i) := Eval(j(i,xtl),m(i,xtl).all,ctm(i).all,x); end loop; return res; end dHt; function dHx ( x : Complex_Vectors.Vector; t : double_complex ) return matrix is mt : Matrix(x'range,x'range); begin -- Eval(c,REAL_PART(t),scapow,ctm); Eval(c,REAL_PART(t),pow,ctm); for k in mt'range(1) loop for l in mt'range(2) loop mt(k,l) := Eval(j(k,l),m(k,l).all,ctm(k).all,x); end loop; end loop; return mt; end dHx; -- pragma inline(Eval,dHt,dHx); procedure Laur_Cont is new Silent_Continue(Norm1,Eval,dHt,dHx); begin for i in c'range loop ctm(i) := new Complex_Vectors.Vector(c(i)'range); end loop; Laur_Cont(sols,false); Integer_Vectors_of_Vectors.Clear(pow); -- Float_Vectors_of_Vectors.Clear(scapow); Complex_Vectors_of_Vectors.Clear(ctm); Extract_Regular(sols); end Mixed_Continuation; procedure Mixed_Continuation ( file : in file_type; mix : in Integer_Vectors.Vector; lifted : in Array_of_Lists; h : in Eval_Coeff_Laur_Sys; c : in Complex_Vectors_of_Vectors.Vector; e : in Exponent_Vectors_Array; j : in Eval_Coeff_Jacobi; m : in Mult_Factors; normal : in Vector; sols : in out Solution_List ) is pow : Integer_Vectors_of_Vectors.Vector(c'range) := Create(e,lifted,mix,normal); -- scapow : Float_Vectors_of_Vectors.Vector(c'range) := Scale(pow); ctm : Complex_Vectors_of_Vectors.Vector(c'range); use Complex_Multivariate_Laurent_Polynomials; function Eval ( x : Complex_Vectors.Vector; t : double_complex ) return Complex_Vectors.Vector is begin -- Eval(c,REAL_PART(t),scapow,ctm); Eval(c,REAL_PART(t),pow,ctm); return Eval(h,ctm,x); end Eval; function dHt ( x : Complex_Vectors.Vector; t : double_complex ) return Complex_Vectors.Vector is res : Complex_Vectors.Vector(h'range); xtl : constant integer := x'last+1; begin -- Eval(c,REAL_PART(t),scapow,ctm); Eval(c,REAL_PART(t),pow,ctm); for i in res'range loop res(i) := Eval(j(i,xtl),m(i,xtl).all,ctm(i).all,x); end loop; return res; end dHt; function dHx ( x : Complex_Vectors.Vector; t : double_complex ) return matrix is mt : Matrix(x'range,x'range); begin -- Eval(c,REAL_PART(t),scapow,ctm); Eval(c,REAL_PART(t),pow,ctm); for k in m'range(1) loop for l in m'range(1) loop mt(k,l) := Eval(j(k,l),m(k,l).all,ctm(k).all,x); end loop; end loop; return mt; end dHx; -- pragma inline(Eval,dHt,dHx); procedure Laur_Cont is new Reporting_Continue(Norm1,Eval,dHt,dHx); begin -- put(file,"The normal : "); put(file,normal); new_line(file); -- put_line(file,"The exponent vector : "); -- for i in pow'range loop -- put(file,pow(i)); new_line(file); -- end loop; -- put_line(file,"The coefficient vector : "); Write(file,c); for i in c'range loop ctm(i) := new Complex_Vectors.Vector(c(i)'range); end loop; Laur_Cont(file,sols,false); Integer_Vectors_of_Vectors.Clear(pow); -- Float_Vectors_of_Vectors.Clear(scapow); Complex_Vectors_of_Vectors.Clear(ctm); Extract_Regular(sols); end Mixed_Continuation; -- UTILITIES FOR SECOND LAYER : function Sub_Lifting ( q : Laur_Sys; mix : Vector; mic : Mixed_Cell ) return Array_of_Lists is -- DESCRIPTION : -- Returns the lifting used to subdivide the cell. res : Array_of_Lists(mix'range); sup : Array_of_Lists(q'range); n : constant natural := q'last; cnt : natural := sup'first; begin for i in mic.pts'range loop sup(cnt) := Reduce(mic.pts(i),q'last+1); for j in 1..(mix(i)-1) loop Copy(sup(cnt),sup(cnt+j)); end loop; cnt := cnt + mix(i); end loop; res := Induced_Lifting(n,mix,sup,mic.sub.all); Deep_Clear(sup); return res; end Sub_Lifting; procedure Refined_Mixed_Solve ( q : in Laur_Sys; mix : in Vector; mic : in Mixed_Cell; qsols : in out Solution_List ) is -- DESCRIPTION : -- Solves a subsystem q using the refinement of the cell mic. -- REQUIRED : mic.sub /= null. lif : Array_of_Lists(mix'range) := Sub_Lifting(q,mix,mic); lifq : Laur_Sys(q'range) := Perform_Lifting(q'last,mix,lif,q); begin Mixed_Solve(lifq,mix,mic.sub.all,qsols); Deep_Clear(lif); Clear(lifq); end Refined_Mixed_Solve; procedure Refined_Mixed_Solve ( file : in file_type; q : in Laur_Sys; mix : in Vector; mic : in Mixed_Cell; qsols : in out Solution_List ) is -- DESCRIPTION : -- Solves a subsystem q using the refinement of the cell mic. -- REQUIRED : mic.sub /= null. lif : Array_of_Lists(mix'range) := Sub_Lifting(q,mix,mic); lifq : Laur_Sys(q'range) := Perform_Lifting(q'last,mix,lif,q); begin Mixed_Solve(file,lifq,mix,mic.sub.all,qsols); Deep_Clear(lif); Clear(lifq); end Refined_Mixed_Solve; function Sub_Polyhedral_Homotopy ( l : List; e : Integer_Vectors_of_Vectors.Vector; c : Complex_Vectors.Vector ) return Complex_Vectors.Vector is -- DESCRIPTION : -- For every vector in e that does not belong to l, the corresponding -- index in c will be set to zero, otherwise it is copied to the result. res : Complex_Vectors.Vector(c'range); found : boolean; lif : integer; begin for i in e'range loop Search_Lifting(l,e(i).all,found,lif); if not found then res(i) := CMPLX(0.0); else res(i) := c(i); end if; end loop; return res; end Sub_Polyhedral_Homotopy; function Sub_Polyhedral_Homotopy ( mix : Vector; mic : Mixed_Cell; e : Exponent_Vectors_Array; c : Complex_Vectors_of_Vectors.Vector ) return Complex_Vectors_of_Vectors.Vector is -- DESCRIPTION : -- Given a subsystem q of p and the coefficient vector of p, the -- vector on return will have only nonzero entries for coefficients -- that belong to q. res : Complex_Vectors_of_Vectors.Vector(c'range); begin for i in mix'range loop declare cri : constant Complex_Vectors.Vector := Sub_Polyhedral_Homotopy(mic.pts(i),e(i).all,c(i).all); begin res(i) := new Complex_Vectors.Vector'(cri); for j in 1..(mix(i)-1) loop declare crj : constant Complex_Vectors.Vector := Sub_Polyhedral_Homotopy(mic.pts(i),e(i+j).all,c(i+j).all); begin res(i+j) := new Complex_Vectors.Vector'(crj); end; end loop; end; end loop; return res; end Sub_Polyhedral_Homotopy; procedure Refined_Mixed_Solve ( q : in Laur_Sys; mix : in Vector; mic : in Mixed_Cell; h : in Eval_Coeff_Laur_Sys; c : in Complex_Vectors_of_Vectors.Vector; e : in Exponent_Vectors_Array; j : in Eval_Coeff_Jacobi; m : in Mult_Factors; qsols : in out Solution_List ) is -- DESCRIPTION : -- Polyhedral coeffient-homotopy for subsystem q. -- REQUIRED : mic.sub /= null. lif : Array_of_Lists(mix'range) := Sub_Lifting(q,mix,mic); lq : Laur_Sys(q'range) := Perform_Lifting(q'last,mix,lif,q); cq : Complex_Vectors_of_Vectors.Vector(c'range) := Sub_Polyhedral_Homotopy(mix,mic,e,c); begin Mixed_Solve(lq,lif,h,cq,e,j,m,mix,mic.sub.all,qsols); Complex_Vectors_of_Vectors.Clear(cq); Deep_Clear(lif); Clear(lq); end Refined_Mixed_Solve; procedure Refined_Mixed_Solve ( file : in file_type; q : in Laur_Sys; mix : in Vector; mic : in Mixed_Cell; h : in Eval_Coeff_Laur_Sys; c : in Complex_Vectors_of_Vectors.Vector; e : in Exponent_Vectors_Array; j : in Eval_Coeff_Jacobi; m : in Mult_Factors; qsols : in out Solution_List ) is -- DESCRIPTION : -- Polyhedral coeffient-homotopy for subsystem q. -- REQUIRED : mic.sub /= null. lif : Array_of_Lists(mix'range) := Sub_Lifting(q,mix,mic); lq : Laur_Sys(q'range) := Perform_Lifting(q'last,mix,lif,q); cq : Complex_Vectors_of_Vectors.Vector(c'range) := Sub_Polyhedral_Homotopy(mix,mic,e,c); begin Mixed_Solve(file,lq,lif,h,cq,e,j,m,mix,mic.sub.all,qsols); Complex_Vectors_of_Vectors.Clear(cq); Deep_Clear(lif); Clear(lq); end Refined_Mixed_Solve; -- TARGET ROUTINES FOR SECOND LAYER : procedure Mixed_Solve ( p : in Laur_Sys; mix : in Vector; mic : in Mixed_Cell; sols,sols_last : in out Solution_List ) is q : Laur_Sys(p'range) := Select_Subsystem(p,mix,mic); sq : Laur_Sys(q'range); pq : Poly_Sys(q'range); qsols : Solution_List; len : natural := 0; fail : boolean; begin Reduce(q'last+1,q); sq := Shift(q); Fewnomials.Solve(sq,qsols,fail); if fail then if mic.sub = null then pq := Laurent_to_Polynomial_System(sq); qsols := Solve_by_Static_Lifting(pq); Clear(pq); else Refined_Mixed_Solve(q,mix,mic,qsols); end if; Set_Continuation_Parameter(qsols,CMPLX(0.0)); end if; len := Length_Of(qsols); if len > 0 then Mixed_Continuation(p,mic.nor.all,qsols); Concat(sols,sols_last,qsols); end if; Clear(sq); Clear(q); Shallow_Clear(qsols); end Mixed_Solve; procedure Mixed_Solve ( file : in file_type; p : in Laur_Sys; mix : in Vector; mic : in Mixed_Cell; sols,sols_last : in out Solution_List ) is q : Laur_Sys(p'range) := Select_Subsystem(p,mix,mic); sq : Laur_Sys(q'range); pq : Poly_Sys(q'range); qsols : Solution_List; len : natural := 0; fail : boolean; begin Reduce(q'last+1,q); sq := Shift(q); Fewnomials.Solve(sq,qsols,fail); if not fail then put_line(file,"It is a fewnomial system."); else put_line(file,"No fewnomial system."); if mic.sub = null then put_line(file,"Calling the black box solver."); pq := Laurent_to_Polynomial_System(sq); qsols := Solve_by_Static_Lifting(file,pq); Clear(pq); else put_line(file,"Using the refinement of the cell."); Refined_Mixed_Solve(file,q,mix,mic,qsols); end if; Set_Continuation_Parameter(qsols,CMPLX(0.0)); end if; len := Length_Of(qsols); put(file,len,1); put_line(file," solutions found."); if len > 0 then Mixed_Continuation(file,p,mic.nor.all,qsols); Concat(sols,sols_last,qsols); end if; Clear(sq); Clear(q); Shallow_Clear(qsols); end Mixed_Solve; procedure Mixed_Solve ( p : in Laur_Sys; lifted : in Array_of_Lists; h : in Eval_Coeff_Laur_Sys; c : in Complex_Vectors_of_Vectors.Vector; e : in Exponent_Vectors_Array; j : in Eval_Coeff_Jacobi; m : in Mult_Factors; mix : in Vector; mic : in Mixed_Cell; sols,sols_last : in out Solution_List ) is q : Laur_Sys(p'range) := Select_Subsystem(p,mix,mic); sq : Laur_Sys(q'range); pq : Poly_Sys(q'range); qsols : Solution_List; len : natural := 0; fail : boolean; begin Reduce(q'last+1,q); sq := Shift(q); Fewnomials.Solve(sq,qsols,fail); if fail then if mic.sub = null then pq := Laurent_to_Polynomial_System(sq); qsols := Solve_by_Static_Lifting(pq); Clear(pq); else -- Refined_Mixed_Solve(q,mix,mic,qsols); Refined_Mixed_Solve(q,mix,mic,h,c,e,j,m,qsols); end if; Set_Continuation_Parameter(qsols,CMPLX(0.0)); end if; len := Length_Of(qsols); if len > 0 then Mixed_Continuation(mix,lifted,h,c,e,j,m,mic.nor.all,qsols); Concat(sols,sols_last,qsols); end if; Clear(sq); Clear(q); Shallow_Clear(qsols); end Mixed_Solve; procedure Mixed_Solve ( file : in file_type; p : in Laur_Sys; lifted : in Array_of_Lists; h : in Eval_Coeff_Laur_Sys; c : in Complex_Vectors_of_Vectors.Vector; e : in Exponent_Vectors_Array; j : in Eval_Coeff_Jacobi; m : in Mult_Factors; mix : in Vector; mic : in Mixed_Cell; sols,sols_last : in out Solution_List ) is q : Laur_Sys(p'range) := Select_Subsystem(p,mix,mic); sq : Laur_Sys(q'range); pq : Poly_Sys(q'range); qsols : Solution_List; len : natural := 0; fail : boolean; begin Reduce(q'last+1,q); sq := Shift(q); Fewnomials.Solve(sq,qsols,fail); if not fail then put_line(file,"It is a fewnomial system."); else put_line(file,"No fewnomial system."); if mic.sub = null then put_line(file,"Calling the black box solver."); pq := Laurent_to_Polynomial_System(sq); qsols := Solve_by_Static_Lifting(file,pq); Clear(pq); else put_line(file,"Using the refinement of the cell."); -- Refined_Mixed_Solve(file,q,mix,mic,qsols); Refined_Mixed_Solve(file,q,mix,mic,h,c,e,j,m,qsols); end if; Set_Continuation_Parameter(qsols,CMPLX(0.0)); end if; len := Length_Of(qsols); put(file,len,1); put_line(file," solutions found."); if len > 0 then Mixed_Continuation(file,mix,lifted,h,c,e,j,m,mic.nor.all,qsols); Concat(sols,sols_last,qsols); end if; Clear(sq); Clear(q); Shallow_Clear(qsols); end Mixed_Solve; -- THIRD LAYER : procedure Mixed_Solve ( p : in Laur_Sys; mix : in Vector; mixsub : in Mixed_Subdivision; sols : in out Solution_List ) is tmp : Mixed_Subdivision := mixsub; mic : Mixed_Cell; sols_last : Solution_List; begin while not Is_Null(tmp) loop mic := Head_Of(tmp); Mixed_Solve(p,mix,mic,sols,sols_last); tmp := Tail_Of(tmp); end loop; end Mixed_Solve; procedure Mixed_Solve ( file : in file_type; p : in Laur_Sys; mix : in Vector; mixsub : in Mixed_Subdivision; sols : in out Solution_List ) is tmp : Mixed_Subdivision := mixsub; mic : Mixed_Cell; sols_last : Solution_List; cnt : natural := 0; begin while not Is_Null(tmp) loop mic := Head_Of(tmp); cnt := cnt + 1; new_line(file); put(file,"*** PROCESSING SUBSYSTEM "); put(file,cnt,1); put_line(file," ***"); new_line(file); Mixed_Solve(file,p,mix,mic,sols,sols_last); tmp := Tail_Of(tmp); end loop; end Mixed_Solve; procedure Mixed_Solve ( p : in Laur_Sys; lifted : in Array_of_Lists; h : in Eval_Coeff_Laur_Sys; c : in Complex_Vectors_of_Vectors.Vector; e : in Exponent_Vectors_Array; j : in Eval_Coeff_Jacobi; m : in Mult_Factors; mix : in Vector; mixsub : in Mixed_Subdivision; sols : in out Solution_List ) is tmp : Mixed_Subdivision := mixsub; mic : Mixed_Cell; sols_last : Solution_List; begin while not Is_Null(tmp) loop mic := Head_Of(tmp); Mixed_Solve(p,lifted,h,c,e,j,m,mix,mic,sols,sols_last); tmp := Tail_Of(tmp); end loop; end Mixed_Solve; procedure Mixed_Solve ( file : in file_type; p : in Laur_Sys; lifted : in Array_of_Lists; h : in Eval_Coeff_Laur_Sys; c : in Complex_Vectors_of_Vectors.Vector; e : in Exponent_Vectors_Array; j : in Eval_Coeff_Jacobi; m : in Mult_Factors; mix : in Vector; mixsub : in Mixed_Subdivision; sols : in out Solution_List ) is tmp : Mixed_Subdivision := mixsub; mic : Mixed_Cell; sols_last : Solution_List; cnt : natural := 0; begin while not Is_Null(tmp) loop mic := Head_Of(tmp); cnt := cnt + 1; new_line(file); put(file,"*** PROCESSING SUBSYSTEM "); put(file,cnt,1); put_line(file," ***"); new_line(file); Mixed_Solve(file,p,lifted,h,c,e,j,m,mix,mic,sols,sols_last); tmp := Tail_Of(tmp); end loop; end Mixed_Solve; end Integer_Polyhedral_Continuation; SHAR_EOF fi # end of overwriting check if test -f 'integer_polyhedral_continuation.ads' then echo shar: will not over-write existing file "'integer_polyhedral_continuation.ads'" else cat << "SHAR_EOF" > 'integer_polyhedral_continuation.ads' with text_io; use text_io; with Integer_Vectors; use Integer_Vectors; with Complex_Vectors_of_Vectors; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Complex_Laurent_Polynomial_Systems; use Complex_Laurent_Polynomial_Systems; with Laurent_Jacobi_Matrices; use Laurent_Jacobi_Matrices; with Exponent_Vectors; use Exponent_Vectors; with Solutions; use Solutions; with Integer_Mixed_Subdivisions; use Integer_Mixed_Subdivisions; package Integer_Polyhedral_Continuation is -- DESCRIPTION : -- This package implements polyhedral homotopy continuation methods, -- based on mixed subdivision induced by integer-valued lifting. -- The continuation is organized in three layers: -- 1. inner normal, tracking of paths for one poly -- 2. mixed cell, recursion is needed when the cell is not fine; -- 3. mixed subdivision, for all cells in the subdivision. -- Each layer has four versions: all combinations of -- 1. homotopy as polynomial system or coefficient homotopy; -- 2. silent and reporting version. -- FIRST LAYER : polyhedral continuation for one transformation. procedure Mixed_Continuation ( p : in Laur_Sys; normal : in Vector; sols : in out Solution_List ); procedure Mixed_Continuation ( file : in file_type; p : in Laur_Sys; normal : in Vector; sols : in out Solution_List ); -- DESCRIPTION : -- Polyhedral continuation for transformed polyhedral homotopy. -- ON ENTRY : -- file file to write intermediate results on; -- p a transformed lifted Laurent polynomial system; -- normal normal to a mixed cell; -- sols start solutions of the subsystem which corresponds -- with the mixed cell with given inner normal. -- ON RETURN : -- sols the solutions of p, which correspond to one mixed cell. procedure Mixed_Continuation ( mix : in Integer_Vectors.Vector; lifted : in Array_of_Lists; h : in Eval_Coeff_Laur_Sys; c : in Complex_Vectors_of_Vectors.Vector; e : in Exponent_Vectors_Array; j : in Eval_Coeff_Jacobi; m : in Mult_Factors; normal : in Vector; sols : in out Solution_List ); procedure Mixed_Continuation ( file : in file_type; mix : in Integer_Vectors.Vector; lifted : in Array_of_Lists; h : in Eval_Coeff_Laur_Sys; c : in Complex_Vectors_of_Vectors.Vector; e : in Exponent_Vectors_Array; j : in Eval_Coeff_Jacobi; m : in Mult_Factors; normal : in Vector; sols : in out Solution_List ); -- DESCRIPTION : polyhedral continuation with coefficient homotopy. -- ON ENTRY : -- file file to write intermediate results on; -- mix type of mixture; -- lifted lifted supports of polynomial system, in original order; -- h coefficient homotopy; -- c coefficients of homotopy; -- e the exponent vectors of the unlifted system; -- j coefficient Jacobi matrix; -- m multiplication factors in coefficient Jacobi matrix; -- normal normal to a mixed cell; -- sols start solutions of the subsystem which corresponds -- with the mixed cell with given inner normal. -- ON RETURN : -- sols the solutions of p, which correspond to one mixed cell. -- SECOND LAYER : polyhedral continuaton for one mixed cell. procedure Mixed_Solve ( p : in Laur_Sys; mix : in Vector; mic : in Mixed_Cell; sols,sols_last : in out Solution_List ); procedure Mixed_Solve ( file : in file_type; p : in Laur_Sys; mix : in Vector; mic : in Mixed_Cell; sols,sols_last : in out Solution_List ); -- DESCRIPTION : -- Polyhedral continuation for one mixed cell. -- REQUIRED : polynomials in p must be ordered according to mix. -- ON ENTRY : -- file a file to write intermediate results on; -- p a lifted Laurent polynomial system; -- mix type of mixture; -- mic a mixed cell; -- ON RETURN : -- sols the solution list of p; -- sols_last pointer to last element of the list sols. procedure Mixed_Solve ( p : in Laur_Sys; lifted : in Array_of_Lists; h : in Eval_Coeff_Laur_Sys; c : in Complex_Vectors_of_Vectors.Vector; e : in Exponent_Vectors_Array; j : in Eval_Coeff_Jacobi; m : in Mult_Factors; mix : in Vector; mic : in Mixed_Cell; sols,sols_last : in out Solution_List ); procedure Mixed_Solve ( file : in file_type; p : in Laur_Sys; lifted : in Array_of_Lists; h : in Eval_Coeff_Laur_Sys; c : in Complex_Vectors_of_Vectors.Vector; e : in Exponent_Vectors_Array; j : in Eval_Coeff_Jacobi; m : in Mult_Factors; mix : in Vector; mic : in Mixed_Cell; sols,sols_last : in out Solution_List ); -- DESCRIPTION : -- Polyhedral coefficient-homotopy continuation for one mixed cell. -- REQUIRED : polynomials in p must be ordered according to mix. -- ON ENTRY : -- file a file to write intermediate results on; -- p a lifted Laurent polynomial system; -- lifted lifted supports, with original order of points; -- h coefficient homotopy; -- c coefficients of homotopy; -- e the exponent vectors of the unlifted system; -- j coefficient Jacobi matrix; -- m multiplication factors in coefficient Jacobi matrix; -- mix type of mixture; -- mic a mixed cell. -- ON RETURN : -- sols the solution list of p; -- sols_last pointer to last element of the list sols. -- THIRD LAYER : polyhedral continuation for a mixed subdivision. procedure Mixed_Solve ( p : in Laur_Sys; mix : in Vector; mixsub : in Mixed_Subdivision; sols : in out Solution_List ); procedure Mixed_Solve ( file : in file_type; p : in Laur_Sys; mix : in Vector; mixsub : in Mixed_Subdivision; sols : in out Solution_List ); -- DESCRIPTION : -- Polyhedral coefficient-homotopy continuation for a mixed subdivision. -- REQUIRED : polynomials in p must be ordered according to mix. -- ON ENTRY : -- file a file to write intermediate results on; -- p a lifted Laurent polynomial system; -- mix type of mixture; -- mixsub a collection of mixed cells. -- ON RETURN : -- sols the solution list of p. procedure Mixed_Solve ( p : in Laur_Sys; lifted : in Array_of_Lists; h : in Eval_Coeff_Laur_Sys; c : in Complex_Vectors_of_Vectors.Vector; e : in Exponent_Vectors_Array; j : in Eval_Coeff_Jacobi; m : in Mult_Factors; mix : in Vector; mixsub : in Mixed_Subdivision; sols : in out Solution_List ); procedure Mixed_Solve ( file : in file_type; p : in Laur_Sys; lifted : in Array_of_Lists; h : in Eval_Coeff_Laur_Sys; c : in Complex_Vectors_of_Vectors.Vector; e : in Exponent_Vectors_Array; j : in Eval_Coeff_Jacobi; m : in Mult_Factors; mix : in Vector; mixsub : in Mixed_Subdivision; sols : in out Solution_List ); -- DESCRIPTION : -- Polyhedral coefficient-homotopy continuation for a mixed subdivision. -- REQUIRED : polynomials in p must be ordered according to mix. -- ON ENTRY : -- file a file to write intermediate results on; -- p a lifted Laurent polynomial system; -- lifted lifted supports, in original order; -- h coefficient homotopy; -- c coefficients of homotopy; -- e the exponent vectors of the unlifted system; -- j coefficient Jacobi matrix; -- m multiplication factors in coefficient Jacobi matrix; -- mix type of mixture; -- mixsub a collection of mixed cells. -- ON RETURN : -- sols the solution list of p. end Integer_Polyhedral_Continuation; SHAR_EOF fi # end of overwriting check if test -f 'integer_pruning_methods.adb' then echo shar: will not over-write existing file "'integer_pruning_methods.adb'" else cat << "SHAR_EOF" > 'integer_pruning_methods.adb' with Integer_Vectors_Utilities; use Integer_Vectors_Utilities; with Integer_Matrices; use Integer_Matrices; with Integer_Linear_System_Solvers; use Integer_Linear_System_Solvers; with Integer_Linear_Inequality_Solvers; use Integer_Linear_Inequality_Solvers; with Integer_Farkas_Lemma; use Integer_Farkas_Lemma; with Floating_Point_Numbers; use Floating_Point_Numbers; with Float_Matrices; with Float_Linear_Inequality_Solvers; use Float_Linear_Inequality_Solvers; package body Integer_Pruning_Methods is -- GENERAL AUXILIARIES : function Convert ( fa : Face_Array ) return Array_of_Lists is -- DESCRIPTION : -- Converts the array of faces into an array of lists by -- converting the first element of each list of faces. res : Array_of_Lists(fa'range); begin for k in fa'range loop res(k) := Shallow_Create(fa(k).all); end loop; return res; end Convert; -- AUXILIARIES FOR THE PRUNING ALGORITHMS : procedure Initialize ( n : in natural; mat : out Matrix; ipvt : out Vector ) is -- DESCRIPTION : -- Initializes the matrix of the equality constraints on the normals -- and sets the pivoting vector ipvt to 1..n+1. begin for i in 1..n+1 loop ipvt(i) := i; for j in 1..n+1 loop mat(i,j) := 0; end loop; end loop; end Initialize; function Number_of_Inequalities ( mix : Vector; lifted : Array_of_Lists ) return natural is -- DESCRIPTION : -- Returns the maximal number of inequalities on the inner normal. res : natural := 0; begin for k in lifted'range loop res := res + Length_Of(lifted(k)) - mix(k) - 1; end loop; return res; end Number_of_Inequalities; procedure Ordered_Inequalities ( k : in natural; mat : in out matrix ) is -- DESCRIPTION : -- Defines k inequalities mat(k,k) - mat(k+1,k) >= 0. begin for i in mat'first(1)..k loop for j in mat'range(2) loop mat(i,j) := 0; end loop; mat(i,i) := 1; mat(i,i+1) := -1; end loop; end Ordered_Inequalities; procedure Check_and_Update ( mic : in Face_Array; lifted : in Array_of_Lists; m : in matrix; ipvt : in Vector; mixsub,mixsub_last : in out Mixed_Subdivision ) is -- DESCRIPTION : -- Computes the normal to the points in mic, by solving the -- linear system defined by m and ipvt. Updates the mixed subdivision -- if the computed normal is an inner normal. v : Vector(m'range(2)) := Solve(m,ipvt); pts : Array_of_Lists(mic'range); begin if v(v'last) /= 0 then Normalize(v); if v(v'last) < 0 then Min_Vector(v); end if; pts := Convert(mic); Update(pts,v,mixsub,mixsub_last); end if; end Check_and_Update; procedure Create_Equalities ( n : in natural; f : in Face; mat,ineq : in matrix; ipvt : in Vector; row,rowineq : in natural; newmat,newineq : in out matrix; newipvt : in out Vector; newrow,newrowineq : in out natural; fail : out boolean ) is -- DESCRIPTION : -- Creates new equalities and uses them to eliminate unknowns in the -- matrices of equalities and inequalities. Failure is reported when -- a zero row is encountered. On entry, all new* variables must be -- initialized with the corresponding *-ones. shi : vector(1..n+1) := f(f'first).all; fl : boolean := false; pivot : natural; begin for i in f'first+1..f'last loop newrow := newrow + 1; for j in f(i)'range loop newmat(newrow,j) := f(i)(j) - shi(j); end loop; Triangulate(newrow,newmat,newipvt,pivot); fl := (pivot = 0); exit when fl; Switch(newrow,pivot,ineq'first,rowineq,newineq); --Scale(newrow,newmat); end loop; fail := fl; end Create_Equalities; function Check_Feasibility ( k,m,n : natural; ineq : matrix ) return boolean is -- DESCRIPTION : -- Returns true if -v(n+1) > 0 can be derived, false otherwise. -- ON ENTRY : -- k current unknown that has been eliminated, -- for all i <= k : ineq(l,i) = 0, for l in ineq'first..m; -- m number of inequalities; -- n dimension; -- ineq matrix of inequalities. tableau : matrix(1..n-k+1,1..m+1); feasi : boolean; begin if m = 0 then feasi := false; else for i in k+1..n+1 loop for j in 1..m loop tableau(i-k,j) := ineq(j,i); end loop; tableau(i-k,m+1) := 0; end loop; tableau(n-k+1,m+1) := -1; Integer_Complementary_Slackness(tableau,feasi); end if; return feasi; end Check_Feasibility; function New_Check_Feasibility ( k,m,n : natural; ineq : matrix; tol : double_float; solu : Float_Vectors.Vector ) return boolean is -- DESCRIPTION : -- Returns true if -v(n+1) > 0 can be derived, false otherwise. -- ON ENTRY : -- k current unknown that has been eliminated, -- for all i <= k : ineq(l,i) = 0, for l in ineq'first..m; -- m number of inequalities; -- n dimension; -- ineq matrix of inequalities. tableau : Float_Matrices.matrix(1..n-k+1,1..m); tabsolu : Float_Vectors.Vector(1..n-k); cols : Vector(tabsolu'range); kfail : integer; max,tmpabs : double_float; -- used for scaling of the last component of the inner normal begin for i in k+1..n loop for j in 1..m loop tableau(i-k,j) := double_float(ineq(j,i)); end loop; tabsolu(i-k) := solu(i); end loop; max := 0.0; for j in 1..m loop tableau(n-k+1,j) := -double_float(ineq(j,n+1)); tmpabs := abs(tableau(n-k+1,j)); if tmpabs > max then max := tmpabs; end if; end loop; if max > 1.0 then for j in 1..m loop tableau(n-k+1,j) := tableau(n-k+1,j)/max; end loop; end if; Scale(tableau,tol); Solve(tableau,tol,tabsolu,kfail,cols); return (kfail <= m); end New_Check_Feasibility; procedure Update_Inequalities ( k,rowmat1,rowmat2,n : in natural; mat : in matrix; ipvt : in vector; rowineq : in out natural; ineq : in out matrix; lifted : in Array_of_Lists; mic : in out Face_Array ) is -- DESCRIPTION : -- The inequalities will be updated w.r.t. the equality -- constraints on the inner normal. tmp : List; pt,shi : Link_to_Vector; begin for i in ineq'first..rowineq loop -- triangulate old inequalities for j in rowmat1..rowmat2 loop Triangulate(j,mat,i,ineq); end loop; --Scale(i,ineq); end loop; tmp := lifted(k); -- create and triangulate shi := mic(k)(mic(k)'first); -- new inequalities while not Is_Null(tmp) loop pt := Head_Of(tmp); if not Is_In(mic(k),pt.all) then rowineq := rowineq + 1; for j in pt'range loop ineq(rowineq,j) := pt(j) - shi(j); end loop; Switch(ipvt,rowineq,ineq); for i in 1..rowmat2 loop Triangulate(i,mat,rowineq,ineq); --Scale(rowineq,ineq); end loop; end if; tmp := Tail_Of(tmp); end loop; end Update_Inequalities; procedure Eliminate ( k : in natural; m : in Matrix; tol : in double_float; x : in out Float_Vectors.Vector ) is -- DESCRIPTION : -- Eliminates the kth component of x by using the matrix. fac : double_float; begin if abs(x(k)) > tol then fac := x(k)/double_float(m(k,k)); for j in k..x'last loop x(j) := x(j) - fac*double_float(m(k,j)); end loop; end if; end Eliminate; procedure Switch ( l,pivot : in integer; x : in out Float_Vectors.Vector ) is -- DESCRIPTION : -- Applies the pivotation information to the vector x. tmp : double_float; begin if l /= pivot then tmp := x(l); x(l) := x(pivot); x(pivot) := tmp; end if; end Switch; procedure Eliminate ( rowmat1,rowmat2 : in natural; mat : in Matrix; ipvt : in Vector; tol : in double_float; x : in out Float_Vectors.Vector ) is -- DESCRIPTION : -- Returns an eliminated solution vector. begin for k in rowmat1..rowmat2 loop Switch(k,ipvt(k),x); Eliminate(k,mat,tol,x); end loop; end Eliminate; -- GENERAL CONSTRUCTOR in several versions : -- procedure Compute_Mixed_Cells ( ); -- general specification. -- DESCRIPTION : -- Backtrack recursive procedure to enumerate face-face combinations. -- ON ENTRY : -- k index for current point set; -- row number of rows already in the matrix; -- mat matrix which determines the inner normal; -- ipvt contains the pivoting information; -- rowineq number of inequality constraints already in ineq; -- ineq matrix for the inequality constraints on the -- inner normal v, of type <.,v> >= 0; -- testsolu test solution to check current set of inequalilities; -- mic contains the current selected faces, up to k-1. -- ON RETURN : -- mic updated selected faces; -- issupp true if current tuple of faces is supported; -- continue indicates whether to continue the creation or not. -- CONSTRUCTION WITH PRUNING : procedure Gen1_Create_CS ( n : in natural; mix : in Vector; fa : in Array_of_Faces; lifted : in Array_of_Lists; nbsucc,nbfail : in out Float_Vectors.Vector; mixsub : out Mixed_Subdivision ) is res,res_last : Mixed_Subdivision; accu : Face_Array(fa'range); ma : matrix(1..n+1,1..n+1); ipvt : vector(1..n+1); ineqrows : natural; procedure Compute_Mixed_Cells ( k,row : in natural; mat : in matrix; ipvt : in vector; rowineq : in natural; ineq : in matrix; mic : in out Face_Array; continue : out boolean ); -- DESCRIPTION : -- Backtrack recursive procedure to enumerate face-face combinations. procedure Process_Inequalities ( k,rowmat1,rowmat2 : in natural; mat : in matrix; ipvt : in vector; rowineq : in out natural; ineq : in out matrix; mic : in out Face_Array; cont : out boolean ) is -- DESCRIPTION : -- Updates inequalities and checks feasibility before proceeding. begin Update_Inequalities(k,rowmat1,rowmat2,n,mat,ipvt,rowineq,ineq,lifted,mic); if Check_Feasibility(rowmat2,rowineq,n,ineq) then nbfail(k) := nbfail(k) + 1.0; cont := true; else nbsucc(k) := nbsucc(k) + 1.0; Compute_Mixed_Cells(k+1,rowmat2,mat,ipvt,rowineq,ineq,mic,cont); end if; end Process_Inequalities; procedure Compute_Mixed_Cells ( k,row : in natural; mat : in matrix; ipvt : in vector; rowineq : in natural; ineq : in matrix; mic : in out Face_Array; continue : out boolean ) is old : Mixed_Subdivision := res_last; cont : boolean := true; tmpfa : Faces; begin if k > mic'last then Check_and_Update(mic,lifted,mat,ipvt,res,res_last); if old /= res_last then Process(Head_Of(res_last),continue); else continue := true; end if; else tmpfa := fa(k); while not Is_Null(tmpfa) loop -- enumerate faces of kth polytope mic(k) := Head_Of(tmpfa); declare -- update matrices fl : boolean; newipvt : vector(ipvt'range) := ipvt; newmat : matrix(mat'range(1),mat'range(2)) := mat; newineq : matrix(ineq'range(1),ineq'range(2)) := ineq; newrow : natural := row; newrowineq : natural := rowineq; begin Create_Equalities(n,mic(k),mat,ineq,ipvt,row,rowineq, newmat,newineq,newipvt,newrow,newrowineq,fl); if fl then nbfail(k) := nbfail(k) + 1.0; else Process_Inequalities(k,row+1,newrow,newmat,newipvt, newrowineq,newineq,mic,cont); end if; end; exit when not cont; tmpfa := Tail_Of(tmpfa); end loop; continue := cont; end if; end Compute_Mixed_Cells; begin Initialize(n,ma,ipvt); ineqrows := Number_of_Inequalities(mix,lifted); declare ineq : matrix(1..ineqrows,1..n+1); cont : boolean; begin ineq(1,1) := 0; Compute_Mixed_Cells(accu'first,0,ma,ipvt,0,ineq,accu,cont); end; mixsub := res; end Gen1_Create_CS; procedure Create_CS ( n : in natural; mix : in Vector; fa : in Array_of_Faces; lifted : in Array_of_Lists; nbsucc,nbfail : in out Float_Vectors.Vector; mixsub : out Mixed_Subdivision ) is res,res_last : Mixed_Subdivision; accu : Face_Array(fa'range); ma : matrix(1..n+1,1..n+1); ipvt : vector(1..n+1); ineqrows : natural; procedure Compute_Mixed_Cells ( k,row : in natural; mat : in Matrix; ipvt : in Vector; rowineq : in natural; ineq : in Matrix; mic : in out Face_Array ); -- DESCRIPTION : -- Backtrack recursive procedure to enumerate face-face combinations. procedure Process_Inequalities ( k,rowmat1,rowmat2 : in natural; mat : in matrix; ipvt : in vector; rowineq : in out natural; ineq : in out matrix; mic : in out Face_Array ) is -- DESCRIPTION : -- Updates inequalities and checks feasibility before proceeding. begin Update_Inequalities(k,rowmat1,rowmat2,n,mat,ipvt,rowineq,ineq,lifted,mic); if Check_Feasibility(rowmat2,rowineq,n,ineq) then nbfail(k) := nbfail(k) + 1.0; else nbsucc(k) := nbsucc(k) + 1.0; Compute_Mixed_Cells(k+1,rowmat2,mat,ipvt,rowineq,ineq,mic); end if; end Process_Inequalities; procedure Compute_Mixed_Cells ( k,row : in natural; mat : in Matrix; ipvt : in Vector; rowineq : in natural; ineq : in Matrix; mic : in out Face_Array ) is tmpfa : Faces; begin if k > mic'last then Check_and_Update(mic,lifted,mat,ipvt,res,res_last); else tmpfa := fa(k); while not Is_Null(tmpfa) loop -- enumerate faces of kth polytype mic(k) := Head_Of(tmpfa); declare -- update matrices fl : boolean; newipvt : vector(ipvt'range) := ipvt; newmat : matrix(mat'range(1),mat'range(2)) := mat; newineq : matrix(ineq'range(1),ineq'range(2)) := ineq; newrow : natural := row; newrowineq : natural := rowineq; begin Create_Equalities(n,mic(k),mat,ineq,ipvt,row,rowineq,newmat, newineq,newipvt,newrow,newrowineq,fl); if fl then nbfail(k) := nbfail(k) + 1.0; else Process_Inequalities (k,row+1,newrow,newmat,newipvt,newrowineq,newineq,mic); end if; end; tmpfa := Tail_Of(tmpfa); end loop; end if; end Compute_Mixed_Cells; begin Initialize(n,ma,ipvt); ineqrows := Number_of_Inequalities(mix,lifted); declare ineq : matrix(1..ineqrows,1..n+1); begin ineq(1,1) := 0; Compute_Mixed_Cells(accu'first,0,ma,ipvt,0,ineq,accu); end; mixsub := res; end Create_CS; procedure New_Create_CS ( n : in natural; mix : in Vector; fa : in Array_of_Faces; lifted : in Array_of_Lists; nbsucc,nbfail : in out Float_Vectors.Vector; mixsub : out Mixed_Subdivision ) is res,res_last : Mixed_Subdivision; accu : Face_Array(fa'range); ma : matrix(1..n+1,1..n+1); ipvt : vector(1..n+1); tol : constant double_float := double_float(n)*10.0**(-11); ineqrows : natural; procedure Compute_Mixed_Cells ( k,row : in natural; mat : in matrix; ipvt : in vector; rowineq : in natural; ineq : in matrix; testsolu : in Float_Vectors.Vector; mic : in out Face_Array ); -- DESCRIPTION : -- Backtrack recursive procedure to enumerate face-face combinations. procedure Process_Inequalities ( k,rowmat1,rowmat2 : in natural; mat : in matrix; ipvt : in vector; rowineq : in out natural; ineq : in out matrix; testsolu : in Float_Vectors.Vector; mic : in out Face_Array ) is -- DESCRIPTION : -- Updates the inequalities and checks feasibility before proceeding. tmp : List; pt,shi : Link_to_Vector; newsolu : Float_Vectors.Vector(testsolu'range) := testsolu; begin Update_Inequalities(k,rowmat1,rowmat2,n,mat,ipvt,rowineq,ineq, lifted,mic); Eliminate(rowmat1,rowmat2,mat,ipvt,tol,newsolu); if New_Check_Feasibility(rowmat2,rowineq,n,ineq,tol,newsolu) then nbfail(k) := nbfail(k) + 1.0; else nbsucc(k) := nbsucc(k) + 1.0; Compute_Mixed_Cells(k+1,rowmat2,mat,ipvt,rowineq,ineq,testsolu,mic); end if; end Process_Inequalities; procedure Compute_Mixed_Cells ( k,row : in natural; mat : in matrix; ipvt : in vector; rowineq : in natural; ineq : in matrix; testsolu : in Float_Vectors.Vector; mic : in out Face_Array ) is -- DESCRIPTION : -- Backtrack recursive procedure to enumerate face-face combinations. tmpfa : Faces; begin if k > mic'last then Check_and_Update(mic,lifted,mat,ipvt,res,res_last); else tmpfa := fa(k); while not Is_Null(tmpfa) loop -- enumerate faces of kth polytope mic(k) := Head_Of(tmpfa); declare -- update matrices fl : boolean; newipvt : vector(ipvt'range) := ipvt; newmat : matrix(mat'range(1),mat'range(2)) := mat; newineq : matrix(ineq'range(1),ineq'range(2)) := ineq; newrow : natural := row; newrowineq : natural := rowineq; begin Create_Equalities(n,mic(k),mat,ineq,ipvt,row,rowineq,newmat, newineq,newipvt,newrow,newrowineq,fl); if fl then nbfail(k) := nbfail(k) + 1.0; else Process_Inequalities(k,row+1,newrow,newmat,newipvt, newrowineq,newineq,testsolu,mic); end if; end; tmpfa := Tail_Of(tmpfa); end loop; end if; end Compute_Mixed_Cells; begin Initialize(n,ma,ipvt); ineqrows := Number_of_Inequalities(mix,lifted); declare ineq : matrix(1..ineqrows,1..n+1); solu : Float_Vectors.Vector(1..n+1); begin ineq(1,1) := 0; solu := (solu'range => 0.0); Compute_Mixed_Cells(accu'first,0,ma,ipvt,0,ineq,solu,accu); end; mixsub := res; end New_Create_CS; -- AUXILIARIES FOR THE CONSTRAINT PRUNING : function Is_Supported ( f : Face; normal : Vector; supp : integer ) return boolean is ip : integer; begin for i in f'range loop ip := f(i).all*normal; if ip /= supp then return false; end if; end loop; return true; end Is_Supported; function Is_Supported ( f : Face; k : natural; normals,suppvals : List ) return boolean is -- DESCRIPTION : -- Returns true if there exists a normal for which the inner product -- with each point in the face equals the corresponding supporting value -- of the kth component. tmpnor : List := normals; tmpsup : List := suppvals; support : integer; begin while not Is_Null(tmpnor) loop support := Head_Of(tmpsup)(k); if Is_Supported(f,Head_Of(tmpnor).all,support) then return true; else tmpnor := Tail_Of(tmpnor); tmpsup := Tail_Of(tmpsup); end if; end loop; return false; end Is_Supported; procedure Update ( mic : in Mixed_Cell; normals,suppvals : in out List ) is -- DESCRIPTION : -- Updates the list of normals and supporting values with the information -- of a mixed cell. normal : Link_to_Vector := new Vector'(mic.nor.all); suppval : Link_to_Vector := new Vector(mic.pts'range); begin Construct(normal,normals); for i in suppval'range loop suppval(i) := normal*Head_Of(mic.pts(i)); end loop; Construct(suppval,suppvals); end Update; procedure Create_CCS ( n : in natural; mix : in Vector; fa : in Array_of_Faces; lifted : in Array_of_Lists; nbsucc,nbfail : in out Float_Vectors.Vector; normals,suppvals : in out List; mixsub : out Mixed_Subdivision ) is res,res_last : Mixed_Subdivision; accu : Face_Array(fa'range); ma : matrix(1..n+1,1..n+1); ipvt : vector(1..n+1); ineqrows : natural; procedure Compute_Mixed_Cells ( k,row : in natural; mat : in matrix; ipvt : in vector; rowineq : in natural; ineq : in matrix; mic : in out Face_Array; issupp : in out boolean ); -- DESCRIPTION : -- Backtrack recursive procedure to enumerate face-face combinations. procedure Process_Inequalities ( k,rowmat1,rowmat2 : in natural; mat : in matrix; ipvt : in vector; rowineq : in out natural; ineq : in out matrix; mic : in out Face_Array; issupp : in out boolean ) is -- DESCRIPTION : -- Updates inequalities and checks feasibility before proceeding. begin Update_Inequalities(k,rowmat1,rowmat2,n,mat,ipvt,rowineq,ineq,lifted,mic); if issupp then issupp := Is_Supported(mic(k),k,normals,suppvals); end if; if not issupp and then Check_Feasibility(rowmat2,rowineq,n,ineq) then nbfail(k) := nbfail(k) + 1.0; else nbsucc(k) := nbsucc(k) + 1.0; Compute_Mixed_Cells(k+1,rowmat2,mat,ipvt,rowineq,ineq,mic,issupp); end if; end Process_Inequalities; procedure Compute_Mixed_Cells ( k,row : in natural; mat : in matrix; ipvt : in vector; rowineq : in natural; ineq : in matrix; mic : in out Face_Array; issupp : in out boolean ) is -- DESCRIPTION : -- Backtrack recursive procedure to enumerate face-face combinations. old : Mixed_Subdivision; tmpfa : Faces; begin if k > mic'last then old := res_last; Check_and_Update(mic,lifted,mat,ipvt,res,res_last); if old /= res_last then Update(Head_Of(res_last),normals,suppvals); end if; else tmpfa := fa(k); while not Is_Null(tmpfa) loop -- enumerate faces of kth polytope mic(k) := Head_Of(tmpfa); declare -- update matrices fl : boolean; newipvt : vector(ipvt'range) := ipvt; newmat : matrix(mat'range(1),mat'range(2)) := mat; newineq : matrix(ineq'range(1),ineq'range(2)) := ineq; newrow : natural := row; newrowineq : natural := rowineq; begin Create_Equalities(n,mic(k),mat,ineq,ipvt,row,rowineq,newmat, newineq,newipvt,newrow,newrowineq,fl); if fl then nbfail(k) := nbfail(k) + 1.0; else Process_Inequalities(k,row+1,newrow,newmat,newipvt, newrowineq,newineq,mic,issupp); end if; end; tmpfa := Tail_Of(tmpfa); end loop; end if; end Compute_Mixed_Cells; begin Initialize(n,ma,ipvt); ineqrows := Number_of_Inequalities(mix,lifted); declare ineq : matrix(1..ineqrows,1..n+1); supported : boolean := true; begin ineq(1,1) := 0; Compute_Mixed_Cells(accu'first,0,ma,ipvt,0,ineq,accu,supported); end; mixsub := res; end Create_CCS; end Integer_Pruning_Methods; SHAR_EOF fi # end of overwriting check if test -f 'integer_pruning_methods.ads' then echo shar: will not over-write existing file "'integer_pruning_methods.ads'" else cat << "SHAR_EOF" > 'integer_pruning_methods.ads' with Integer_Vectors,Float_Vectors; use Integer_Vectors; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Integer_Faces_of_Polytope; use Integer_Faces_of_Polytope; with Integer_Mixed_Subdivisions; use Integer_Mixed_Subdivisions; package Integer_Pruning_Methods is -- DESCRIPTION : -- This package contains the creators of a regular mixed subdivision, -- based on the static lifting algorithm, for computing only those cells -- of a certain type, in particular the mixed cells. -- There are facilities for computing only the generating cells and for -- computing only the stable mixed cells. generic with procedure Process ( mic : in Mixed_Cell; continue : out boolean ); -- DESCRIPTION : -- This procedure will be invoked after each computation of a new cell. -- If the parameter continue is set on false, then the computation will -- be stopped, otherwise the creation continues. procedure Gen1_Create_CS ( n : in natural; mix : in Vector; fa : in Array_of_Faces; lifted : in Array_of_Lists; nbsucc,nbfail : in out Float_Vectors.Vector; mixsub : out Mixed_Subdivision ); procedure Create_CS ( n : in natural; mix : in Vector; fa : in Array_of_Faces; lifted : in Array_of_Lists; nbsucc,nbfail : in out Float_Vectors.Vector; mixsub : out Mixed_Subdivision ); -- DESCRIPTION : -- Creates a mixed subdivision with a criterium to check which -- face-face combinations can lead to a cell which contributes to -- the mixed volume. -- ON ENTRY : -- n dimension before lifting; -- mix type of mixture: indicates how many times each polytope -- occurs in the supports; -- fa faces of the lower hull of the lifted point sets: -- fa(i) contains the mix(i)-faces of conv(lifted(i)); -- lifted the lifted points; -- ON RETURN : -- nbsucc number of times a face-face combination has passed the test, -- at each level; -- nbfail number of times a face-face combinations has failed to pass -- the test, at each level; -- mixsub collection of cells which contribute to the mixed volume. procedure New_Create_CS ( n : in natural; mix : in Vector; fa : in Array_of_Faces; lifted : in Array_of_Lists; nbsucc,nbfail : in out Float_Vectors.Vector; mixsub : out Mixed_Subdivision ); -- DESCRIPTION : -- Does the same at the Create_CS, only with a new pruning method. procedure Create_CCS ( n : in natural; mix : in Vector; fa : in Array_of_Faces; lifted : in Array_of_Lists; nbsucc,nbfail : in out Float_Vectors.Vector; normals,suppvals : in out List; mixsub : out Mixed_Subdivision ); -- DESCRIPTION : -- Construction of the mixed subdivision by constraint complementary -- slackness: faces supported by the list of normals pass freely. -- This list of normals is updated each time new mixed cells are found. -- Following are the descriptions of the new parameters. -- ON ENTRY : -- normals list of inner normals on the lower hull of the lifted points; -- suppvals corresponding vectors which contain the supporting values -- for each component. -- ON RETURN : -- normals contains the inner normals of the mixed cells; -- suppvals corresponding vectors of support values. end Integer_Pruning_Methods; SHAR_EOF fi # end of overwriting check if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' # Establishing the links : linkrc = ../../../Ada/Root_Counts/Stalift links: @-ln -s $(linkrc)/bkkcomp.a bkk_bound_computations.ads @-ln -s $(linkrc)/bkkcompB.a bkk_bound_computations.adb @-ln -s $(linkrc)/contrimv.a contributions_to_mixed_volume.ads @-ln -s $(linkrc)/contrimvB.a contributions_to_mixed_volume.adb @-ln -s $(linkrc)/drivcrit.a driver_for_criterion.ads @-ln -s $(linkrc)/drivcritB.a driver_for_criterion.adb @-ln -s $(linkrc)/drivlift.a drivers_for_lifting_functions.ads @-ln -s $(linkrc)/drivliftB.a drivers_for_lifting_functions.adb @-ln -s $(linkrc)/drivstal.a drivers_for_static_lifting.ads @-ln -s $(linkrc)/drivstalB.a drivers_for_static_lifting.adb @-ln -s $(linkrc)/drivcomv.a drivers_for_mixed_contributions.ads @-ln -s $(linkrc)/drivcomvB.a drivers_for_mixed_contributions.adb @-ln -s $(linkrc)/cofltint.a float_integer_convertors.ads @-ln -s $(linkrc)/cofltintB.a float_integer_convertors.adb @-ln -s $(linkrc)/fltlift.a float_lifting_functions.ads @-ln -s $(linkrc)/fltliftB.a float_lifting_functions.adb @-ln -s $(linkrc)/fltlift_ut.a float_lifting_utilities.ads @-ln -s $(linkrc)/fltlift_utB.a float_lifting_utilities.adb @-ln -s $(linkrc)/fltmisu.a float_mixed_subdivisions.ads @-ln -s $(linkrc)/fltmisuB.a float_mixed_subdivisions.adb @-ln -s $(linkrc)/fltmisu_io.a float_mixed_subdivisions_io.ads @-ln -s $(linkrc)/fltmisu_ioB.a float_mixed_subdivisions_io.adb @-ln -s $(linkrc)/fltprune.a float_pruning_methods.ads @-ln -s $(linkrc)/fltpruneB.a float_pruning_methods.adb @-ln -s $(linkrc)/fltpolco.a float_polyhedral_continuation.ads @-ln -s $(linkrc)/fltpolcoB.a float_polyhedral_continuation.adb @-ln -s $(linkrc)/fltstali.a float_static_lifting.ads @-ln -s $(linkrc)/fltstaliB.a float_static_lifting.adb @-ln -s $(linkrc)/inncones.a inner_normal_cones.ads @-ln -s $(linkrc)/innconesB.a inner_normal_cones.adb @-ln -s $(linkrc)/intlift.a integer_lifting_functions.ads @-ln -s $(linkrc)/intliftB.a integer_lifting_functions.adb @-ln -s $(linkrc)/intlift_ut.a integer_lifting_utilities.ads @-ln -s $(linkrc)/intlift_utB.a integer_lifting_utilities.adb @-ln -s $(linkrc)/comisudi.a mixed_coherent_subdivisions.ads @-ln -s $(linkrc)/comisudiB.a mixed_coherent_subdivisions.adb @-ln -s $(linkrc)/intmisu.a integer_mixed_subdivisions.ads @-ln -s $(linkrc)/intmisuB.a integer_mixed_subdivisions.adb @-ln -s $(linkrc)/intmisu_io.a integer_mixed_subdivisions_io.ads @-ln -s $(linkrc)/intmisu_ioB.a integer_mixed_subdivisions_io.adb @-ln -s $(linkrc)/mivoco.a mixed_volume_computation.ads @-ln -s $(linkrc)/mivocoB.a mixed_volume_computation.adb @-ln -s $(linkrc)/noconint.a normal_cone_intersections.ads @-ln -s $(linkrc)/noconintB.a normal_cone_intersections.adb @-ln -s $(linkrc)/intprune.a integer_pruning_methods.ads @-ln -s $(linkrc)/intpruneB.a integer_pruning_methods.adb @-ln -s $(linkrc)/intpolco.a integer_polyhedral_continuation.ads @-ln -s $(linkrc)/intpolcoB.a integer_polyhedral_continuation.adb @-ln -s $(linkrc)/prunstat.a pruning_statistics.ads @-ln -s $(linkrc)/prunstatB.a pruning_statistics.adb SHAR_EOF fi # end of overwriting check if test -f 'mixed_coherent_subdivisions.adb' then echo shar: will not over-write existing file "'mixed_coherent_subdivisions.adb'" else cat << "SHAR_EOF" > 'mixed_coherent_subdivisions.adb' with Integer_Faces_of_Polytope; use Integer_Faces_of_Polytope; with Integer_Lifting_Functions; use Integer_Lifting_Functions; with Integer_Pruning_Methods; use Integer_Pruning_Methods; package body Mixed_Coherent_Subdivisions is -- a polynomial system as lifting function : function Mixed_Coherent_Subdivision ( n : natural; mix : Vector; points : Array_of_Lists; lift : Poly_Sys ) return Mixed_Subdivision is res : Mixed_Subdivision; lifted : Array_of_Lists(mix'range); nbsucc,nbfail : Float_Vectors.Vector(mix'range) := (mix'range => 0.0); begin Mixed_Coherent_Subdivision(n,mix,points,lift,lifted,nbsucc,nbfail,res); Deep_Clear(lifted); return res; end Mixed_Coherent_Subdivision; procedure Mixed_Coherent_Subdivision ( n : in natural; mix : in Vector; points : in Array_of_Lists; lift : in Poly_Sys; lifted : in out Array_of_Lists; nbsucc,nbfail : in out Float_Vectors.Vector; mixsub : out Mixed_Subdivision ) is fa : Array_of_Faces(mix'range); index : natural := points'first; begin for k in lifted'range loop -- generate lower faces lifted(k) := Polynomial_Lift(lift(k),points(index)); fa(k) := Create_Lower(mix(k),n+1,lifted(k)); index := index + mix(k); end loop; Create_CS(n,mix,fa,lifted,nbsucc,nbfail,mixsub); -- prune for mixed cells Shallow_Clear(fa); end Mixed_Coherent_Subdivision; -- a user-defined lifting function : function Mixed_Coherent_Subdivision ( n : natural; mix : Vector; points : Array_of_Lists; linear : boolean; lift : Integer_Vectors_of_Vectors.Vector ) return Mixed_Subdivision is res : Mixed_Subdivision; lifted : Array_of_Lists(mix'range); nbsucc,nbfail : Float_Vectors.Vector(mix'range) := (mix'range => 0.0); begin Mixed_Coherent_Subdivision (n,mix,points,linear,lift,lifted,nbsucc,nbfail,res); Deep_Clear(lifted); return res; end Mixed_Coherent_Subdivision; procedure Mixed_Coherent_Subdivision ( n : in natural; mix : in Vector; points : in Array_of_Lists; linear : in boolean; lift : in Integer_Vectors_of_Vectors.Vector; lifted : in out Array_of_Lists; nbsucc,nbfail : in out Float_Vectors.Vector; mixsub : out Mixed_Subdivision ) is fa : Array_of_Faces(mix'range); index : natural := points'first; begin for k in lifted'range loop -- compute lower faces if linear then lifted(k) := Linear_Lift(lift(k).all,points(index)); else lifted(k) := Point_Lift(lift(k).all,points(index)); end if; fa(k) := Create_Lower(mix(k),n+1,lifted(k)); index := index + mix(k); end loop; Create_CS(n,mix,fa,lifted,nbsucc,nbfail,mixsub); -- prune for mixed cells Shallow_Clear(fa); end Mixed_Coherent_Subdivision; -- a randomly generated lifting function : function Mixed_Coherent_Subdivision ( n : natural; mix : Vector; points : Array_of_Lists; linear : boolean; low,upp : Vector ) return Mixed_Subdivision is res : Mixed_Subdivision; lifted : Array_of_Lists(mix'range); nbsucc,nbfail : Float_Vectors.Vector(mix'range) := (mix'range => 0.0); begin Mixed_Coherent_Subdivision (n,mix,points,linear,low,upp,lifted,nbsucc,nbfail,res); Deep_Clear(lifted); return res; end Mixed_Coherent_Subdivision; procedure Mixed_Coherent_Subdivision ( n : in natural; mix : in Vector; points : in Array_of_Lists; linear : in boolean; low,upp : in Vector; lifted : in out Array_of_Lists; nbsucc,nbfail : in out Float_Vectors.Vector; mixsub : out Mixed_Subdivision ) is fa : Array_of_Faces(mix'range); index : natural := points'first; begin for k in lifted'range loop -- compute lower faces if linear then lifted(k) := Random_Linear_Lift(low(k),upp(k),points(index)); else lifted(k) := Random_Lift(low(k),upp(k),points(index)); end if; fa(k) := Create_Lower(mix(k),n+1,lifted(k)); index := index + mix(k); end loop; Create_CS(n,mix,fa,lifted,nbsucc,nbfail,mixsub); -- prune for mixed cells Shallow_Clear(fa); end Mixed_Coherent_Subdivision; end Mixed_Coherent_Subdivisions; SHAR_EOF fi # end of overwriting check if test -f 'mixed_coherent_subdivisions.ads' then echo shar: will not over-write existing file "'mixed_coherent_subdivisions.ads'" else cat << "SHAR_EOF" > 'mixed_coherent_subdivisions.ads' with Integer_Vectors,Float_Vectors; use Integer_Vectors; with Integer_Vectors_of_Vectors; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Integer_Mixed_Subdivisions; use Integer_Mixed_Subdivisions; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; package Mixed_Coherent_Subdivisions is -- DESCRIPTION : -- A number of routines for constructing a mixed coherent subdivision -- are offered, each with a different type of lifting function. -- a polynomial system as lifting function : function Mixed_Coherent_Subdivision ( n : natural; mix : Vector; points : Array_of_Lists; lift : Poly_Sys ) return Mixed_Subdivision; procedure Mixed_Coherent_Subdivision ( n : in natural; mix : in Vector; points : in Array_of_Lists; lift : in Poly_Sys; lifted : in out Array_of_Lists; nbsucc,nbfail : in out Float_Vectors.Vector; mixsub : out Mixed_Subdivision ); -- a user-defined lifting function : function Mixed_Coherent_Subdivision ( n : natural; mix : Vector; points : Array_of_Lists; linear : boolean; lift : Integer_Vectors_of_Vectors.Vector ) return Mixed_Subdivision; procedure Mixed_Coherent_Subdivision ( n : in natural; mix : in Vector; points : in Array_of_Lists; linear : in boolean; lift : in Integer_Vectors_of_Vectors.Vector; lifted : in out Array_of_Lists; nbsucc,nbfail : in out Float_Vectors.Vector; mixsub : out Mixed_Subdivision ); -- a randomly generated lifting function : function Mixed_Coherent_Subdivision ( n : natural; mix : Vector; points : Array_of_Lists; linear : boolean; low,upp : Vector ) return Mixed_Subdivision; procedure Mixed_Coherent_Subdivision ( n : in natural; mix : in Vector; points : in Array_of_Lists; linear : in boolean; low,upp : in Vector; lifted : in out Array_of_Lists; nbsucc,nbfail : in out Float_Vectors.Vector; mixsub : out Mixed_Subdivision ); -- DESCRIPTION : -- Given a set of points and a lifting function, -- a subdivision of the polytope will be computed. -- ON ENTRY : -- n the dimension of the vector space; -- mix mix(k) indicates how many times the kth point set occurs; -- points an array of all different point sets; -- linear indicates wether a linear lifting should be used; -- lift an array of lifting polynomials or an m dimensional -- array of vectors, where the length of the kth vector -- must equal the length of the kth support, -- when nonlinear, otherwise the length equals n. -- low,upp lower and upper bounds for random lifting. -- ON RETURN : -- lifted the lifted points which can later be used for lifting -- the polynomial system; -- nbsucc the number of successful face-face combinations that -- have been computed; -- nbfail the number of unsuccessful face-face combinations; -- mixsub the mixed subdivision of the polytope, defined as -- lower hull of the lifted points. end Mixed_Coherent_Subdivisions; SHAR_EOF fi # end of overwriting check if test -f 'mixed_volume_computation.adb' then echo shar: will not over-write existing file "'mixed_volume_computation.adb'" else cat << "SHAR_EOF" > 'mixed_volume_computation.adb' with integer_io,Integer_Vectors_io; use integer_io,Integer_Vectors_io; with Arrays_of_Integer_Vector_Lists_io; use Arrays_of_Integer_Vector_Lists_io; with Float_Vectors; with Integer_Matrices; use Integer_Matrices; with Integer_Linear_System_Solvers; use Integer_Linear_System_Solvers; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Transforming_Integer_Vector_Lists; use Transforming_Integer_Vector_Lists; with Integer_Lifting_Utilities; use Integer_Lifting_Utilities; with Integer_Mixed_Subdivisions_io; use Integer_Mixed_Subdivisions_io; with Mixed_Coherent_Subdivisions; use Mixed_Coherent_Subdivisions; package body Mixed_Volume_Computation is -- AUXILIAIRY OUTPUT ROUTINES : procedure put ( file : in file_type; points : in Array_of_Lists; n : in natural; mix : in Vector; mixsub : in out Mixed_Subdivision; mv : out natural ) is begin new_line(file); put_line(file,"THE LIFTED SUPPORTS :"); new_line(file); put(file,points); new_line(file); put_line(file,"THE MIXED SUBDIVISION :"); new_line(file); put(file,n,mix,mixsub,mv); end put; procedure Sort ( supports : in out Array_of_Lists; k,nb,n : in natural; mxt,perm : in out Vector ) is -- DESCRIPTION : -- Auxiliary operation for Compute_Mixture. -- Compares the kth support with the following supports. -- Already nb different supports have been found. begin for l in (k+1)..n loop if Is_Equal(Supports(k),Supports(l)) then if l /= k + mxt(nb) then declare pos : natural := k + mxt(nb); tmpdl : List := supports(l); tmppos : natural; begin supports(l) := supports(pos); supports(pos) := tmpdl; tmppos := perm(l); perm(l) := perm(pos); perm(pos) := tmppos; end; end if; mxt(nb) := mxt(nb) + 1; end if; end loop; end Sort; -- TARGET ROUTINES : procedure Compute_Mixture ( supports : in out Array_of_Lists; mix,perms : out Link_to_Vector ) is n : constant natural := supports'last; cnt : natural := 0; -- counts the number of different supports mxt : Vector(supports'range) -- counts the number of occurrencies := (supports'range => 1); perm : Link_to_Vector -- keeps track of the permutations := new Integer_Vectors.Vector(supports'range); index : natural := supports'first; begin for k in perm'range loop perm(k) := k; end loop; while index <= supports'last loop cnt := cnt + 1; Sort(supports,index,cnt,n,mxt,perm.all); index := index + mxt(cnt); end loop; mix := new Integer_Vectors.Vector'(mxt(mxt'first..cnt)); perms := perm; end Compute_Mixture; function Compute_Index ( k : natural; mix : Vector ) return natural is -- DESCRIPTION : -- Returns the index of k w.r.t. to the type of mixture. index : natural := mix(mix'first); begin if k <= index then return mix'first; else for l in (mix'first+1)..mix'last loop index := index + mix(l); if k <= index then return l; end if; end loop; return mix'last; end if; end Compute_Index; function Compute_Permutation ( n : natural; mix : Vector; supports : Array_of_Lists ) return Link_to_Vector is perms : Link_to_Vector := new Vector(1..n); begin for k in perms'range loop perms(k) := k; end loop; return perms; end Compute_Permutation; function Permute ( p : Poly_Sys; perm : Link_to_Vector ) return Poly_Sys is res : Poly_Sys(p'range); begin for k in p'range loop res(k) := p(perm(k)); end loop; return res; end Permute; function Permute ( supports : Array_of_Lists; perm : Link_to_Vector ) return Array_of_Lists is res : Array_of_Lists(supports'range); begin for k in supports'range loop res(k) := supports(perm(k)); end loop; return res; end Permute; function Typed_Lists ( mix : Vector; points : Array_of_Lists ) return Array_of_Lists is res : Array_of_Lists(mix'range); ind : natural := res'first; begin for i in mix'range loop res(i) := points(ind); ind := ind + mix(i); end loop; return res; end Typed_Lists; -- MIXED VOLUME COMPUTATIONS BASED ON SUBDIVISIONS : -- AUXILIARIES : function Is_Fine ( mix : Vector; mic : Mixed_Cell ) return boolean is -- DESCRIPTION : -- Returns true if the mixed volume can be computed by a determinant. fine : boolean := true; begin for k in mic.pts'range loop fine := (Length_Of(mic.pts(k)) = mix(k) + 1); exit when not fine; end loop; return fine; end Is_Fine; function Reduced_Supports ( n : natural; mix : Vector; mic : Mixed_Cell ) return Array_of_Lists is -- DESCRIPTION : -- Returns the supports of the cell without the lifting values. res : Array_of_Lists(1..n); cnt : natural := 1; begin for k in mic.pts'range loop res(cnt) := Reduce(mic.pts(k),n+1); for l in 1..mix(k)-1 loop Copy(res(cnt),res(cnt+l)); end loop; cnt := cnt + mix(k); end loop; return res; end Reduced_Supports; function Fine_Mixed_Volume ( n : natural; mix : Vector; mic : Mixed_Cell ) return natural is -- DESCRIPTION : -- Computes the mixed volume for a cell that is fine mixed. -- REQUIRED : Fine(mix,mic). res,count : natural; mat : matrix(1..n,1..n); detmat : integer; tmp : List; sh,pt : Link_to_Vector; begin count := 1; for k in mic.pts'range loop sh := Head_Of(mic.pts(k)); tmp := Tail_Of(mic.pts(k)); while not Is_Null(tmp) loop pt := Head_Of(tmp); for j in 1..n loop mat(count,j) := pt(j) - sh(j); end loop; tmp := Tail_Of(tmp); count := count + 1; end loop; end loop; detmat := Det(mat); if detmat >= 0 then res := detmat; else res := -detmat; end if; return res; end Fine_Mixed_Volume; function Mixed_Volume ( n : natural; mix : Vector; mic : Mixed_Cell ) return natural is -- ALGORITHM : -- First check if the cell has a refinement, if so, then use it, -- if not, then check if the cell is fine mixed. -- If the cell is fine mixed, only a determinant needs to be computed, -- otherwise the cell will be refined. res : natural; begin if (mic.sub /= null) and then not Is_Null(mic.sub.all) then res := Mixed_Volume_Computation.Mixed_Volume(n,mix,mic.sub.all); elsif Is_Fine(mix,mic) then res := Fine_Mixed_Volume(n,mix,mic); else declare rcell : Array_of_Lists(1..n) := Reduced_Supports(n,mix,mic); begin res := Mixed_Volume_Computation.Mixed_Volume(n,rcell); Deep_Clear(rcell); end; end if; return res; end Mixed_Volume; function Mixed_Volume ( n : natural; mix : Vector; mixsub : Mixed_Subdivision ) return natural is res : natural := 0; tmp : Mixed_Subdivision := mixsub; begin while not Is_Null(tmp) loop res := res + Mixed_Volume(n,mix,Head_Of(tmp)); tmp := Tail_Of(tmp); end loop; return res; end Mixed_Volume; procedure Mixed_Volume ( n : in natural; mix : in Vector; mic : in out Mixed_Cell; mv : out natural ) is begin if (mic.sub /= null) and then not Is_Null(mic.sub.all) then mv := Mixed_Volume_Computation.Mixed_Volume(n,mix,mic.sub.all); elsif Is_Fine(mix,mic) then mv := Fine_Mixed_Volume(n,mix,mic); else -- NOTE : keep the same type of mixture! declare rcell : Array_of_Lists(1..n) := Reduced_Supports(n,mix,mic); lifted : Array_of_Lists(mix'range); mixsub : Mixed_Subdivision; begin Mixed_Volume_Computation.Mixed_Volume (n,mix,rcell,lifted,mixsub,mv); mic.sub := new Mixed_Subdivision'(mixsub); Deep_Clear(rcell); Deep_Clear(lifted); end; end if; end Mixed_Volume; procedure Mixed_Volume ( n : in natural; mix : in Vector; mixsub : in out Mixed_Subdivision; mv : out natural ) is res : natural := 0; tmp : Mixed_Subdivision := mixsub; begin while not Is_Null(tmp) loop declare mic : Mixed_Cell := Head_Of(tmp); mmv : natural; begin Mixed_Volume(n,mix,mic,mmv); Set_Head(tmp,mic); res := res + mmv; end; tmp := Tail_Of(tmp); end loop; mv := res; end Mixed_Volume; -- MIXED VOLUME COMPUTATIONS BASED ON SUPPORTS : function Mixed_Volume ( n : natural; supports : Array_of_Lists ) return natural is mv : natural; mix,perm : Link_to_Vector; permsupp : Array_of_Lists(supports'range); begin Copy(supports,permsupp); Compute_Mixture(permsupp,mix,perm); mv := Mixed_Volume(n,mix.all,permsupp); Clear(mix); Clear(perm); Deep_Clear(permsupp); return mv; end Mixed_Volume; function Mixed_Volume ( file : file_type; n : natural; supports : Array_of_Lists ) return natural is mv : natural; mix,perm : Link_to_Vector; permsupp : Array_of_Lists(supports'range); begin Copy(supports,permsupp); Compute_Mixture(permsupp,mix,perm); mv := Mixed_Volume(file,n,mix.all,permsupp); Clear(mix); Clear(perm); Deep_Clear(permsupp); return mv; end Mixed_Volume; function Mixed_Volume ( n : natural; mix : Vector; supports : Array_of_Lists ) return natural is res : natural; mixsub : Mixed_Subdivision; lifted : Array_of_Lists(mix'range); begin Mixed_Volume_Computation.Mixed_Volume(n,mix,supports,lifted,mixsub,res); Deep_Clear(lifted); Shallow_Clear(mixsub); return res; end Mixed_Volume; procedure Mixed_Volume ( n : in natural; mix : in Vector; supports : in Array_of_Lists; lifted : out Array_of_Lists; mixsub : out Mixed_Subdivision; mv : out natural ) is low : constant Vector := (mix'range => 0); upp : constant Vector := Adaptive_Lifting(supports); nbsucc,nbfail : Float_Vectors.Vector(mix'range) := (mix'range => 0.0); liftsupp : Array_of_Lists(mix'range); sub : Mixed_Subdivision; begin Mixed_Coherent_Subdivision(n,mix,supports,false,low,upp,liftsupp, nbsucc,nbfail,sub); Mixed_Volume(n,mix,sub,mv); lifted := liftsupp; mixsub := sub; end Mixed_Volume; function Mixed_Volume ( file : file_type; n : natural; mix : Vector; supports : Array_of_Lists ) return natural is res : natural; mixsub : Mixed_Subdivision; lifted : Array_of_Lists(mix'range); begin Mixed_Volume_Computation.Mixed_Volume (file,n,mix,supports,lifted,mixsub,res); Deep_Clear(lifted); Shallow_Clear(mixsub); return res; end Mixed_Volume; procedure Mixed_Volume ( file : in file_type; n : in natural; mix : in Vector; supports : in Array_of_Lists; lifted : out Array_of_Lists; mixsub : out Mixed_Subdivision; mv : out natural ) is low : constant Vector := (mix'range => 0); upp : constant Vector := Adaptive_Lifting(supports); sub : Mixed_Subdivision; nbsucc,nbfail : Float_Vectors.Vector(mix'range) := (mix'range => 0.0); liftsupp : Array_of_Lists(mix'range); begin Mixed_Coherent_Subdivision (n,mix,supports,false,low,upp,liftsupp,nbsucc,nbfail,sub); lifted := liftsupp; mixsub := sub; put(file,liftsupp,n,mix,sub,mv); end Mixed_Volume; end Mixed_Volume_Computation; SHAR_EOF fi # end of overwriting check if test -f 'mixed_volume_computation.ads' then echo shar: will not over-write existing file "'mixed_volume_computation.ads'" else cat << "SHAR_EOF" > 'mixed_volume_computation.ads' with text_io,Integer_Vectors; use text_io,Integer_Vectors; with Integer_Vectors_of_Vectors; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Integer_Mixed_Subdivisions; use Integer_Mixed_Subdivisions; package Mixed_Volume_Computation is -- DESCRIPTION : -- This package offers a number of routines for the computation -- of the mixed volume of a system of polynomial equations. -- UTILITIES : procedure Compute_Mixture ( supports : in out Array_of_Lists; mix,perms : out Link_to_Vector ); -- DESCRIPTION : -- Computes the type of mixture of the supports of a system. -- ON ENTRY : -- supports the supports of a polynomial system. -- ON RETURN : -- supports a permuted array of supports, so that the same -- supports stand all toghether; -- mix mix(k) indicates number of occurrencies of the kth support; -- perms perms(k) gives the place of the kth support, -- after permutation to make supports correspond with mix. function Compute_Index ( k : natural; mix : Vector ) return natural; -- DESCRIPTION : -- Given k, an entry in the supports, the number this function returns -- indicates the number of different support, w.r.t. the type of mixture. function Compute_Permutation ( n : natural; mix : Vector; supports : Array_of_Lists ) return Link_to_Vector; -- DESCRIPTION : -- Given the type of mixture and the support, the permutation vector -- will be computed. -- ON RETURN : -- perms perms(k) gives the place of the kth support, -- after permutation to make supports correspond with mix. function Typed_Lists ( mix : Vector; points : Array_of_Lists ) return Array_of_Lists; -- DESCRIPTION : -- Returns a tuple of lists where each list occurs only once, -- according to the given type of mixture. function Permute ( p : Poly_Sys; perm : Link_to_Vector ) return Poly_Sys; function Permute ( supports : Array_of_Lists ; perm : Link_to_Vector ) return Array_of_Lists; -- DESCRIPTION : -- Permutes the polynomials in the system or the supports, -- according to the vector perm. -- MIXED VOLUME COMPUTATION, GIVEN A SUBDIVISION : function Mixed_Volume ( n : natural; mix : Vector; mic : Mixed_Cell ) return natural; function Mixed_Volume ( n : natural; mix : Vector; mixsub : Mixed_Subdivision ) return natural; -- DESCRIPTION : -- Computes the mixed volume based on a mixed cell and subdivision. -- When the cells are not fine enough, they will be refined but will -- be lost after returning the result. procedure Mixed_Volume ( n : in natural; mix : in Vector; mic : in out Mixed_Cell; mv : out natural ); procedure Mixed_Volume ( n : in natural; mix : in Vector; mixsub : in out Mixed_Subdivision; mv : out natural ); -- DESCRIPTION : -- Computes the mixed volume based on a mixed cell and subdivision. -- When the cells are not fine enough, they will be refined by lifting. -- The refinement is stored in the subdivision field of the cells. -- MIXED VOLUME COMPUTATIONS, GIVEN THE SUPPORTS : function Mixed_Volume ( n : natural; supports : Array_of_Lists ) return natural; function Mixed_Volume ( file : file_type; n : natural; supports : Array_of_Lists ) return natural; function Mixed_Volume ( n : natural; mix : Vector; supports : Array_of_Lists ) return natural; function Mixed_Volume ( file : file_type; n : natural; mix : Vector; supports : Array_of_Lists ) return natural; procedure Mixed_Volume ( n : in natural; mix : in Vector; supports : in Array_of_Lists; lifted : out Array_of_Lists; mixsub : out Mixed_Subdivision; mv : out natural ); procedure Mixed_Volume ( file : in file_type; n : in natural; mix : in Vector; supports : in Array_of_Lists; lifted : out Array_of_Lists; mixsub : out Mixed_Subdivision; mv : out natural ); -- DESCRIPTION : -- All these routines compute the mixed volume of support lists. -- ON ENTRY : -- file if specified, then the mixed subdivision will be -- written on file; -- n the dimension of the system; -- mix mix(k) is the number of times the kth support occurs; -- supports the supports of a system of n polynomials in n unknowns. -- ON RETURN : -- lifted array of listed points; -- mixsub mixed subdivision used; -- mv the mixed volume. end Mixed_Volume_Computation; SHAR_EOF fi # end of overwriting check if test -f 'normal_cone_intersections.adb' then echo shar: will not over-write existing file "'normal_cone_intersections.adb'" else cat << "SHAR_EOF" > 'normal_cone_intersections.adb' with Inner_Normal_Cones; use Inner_Normal_Cones; --with text_io,integer_io; use text_io,integer_io; --with Integer_Vectors_io; use Integer_Vectors_io; --with integer_Matrices_io; use Integer_Matrices_io; package body Normal_Cone_Intersections is -- AUXILIARY : function Get ( l : List; i : natural ) return Vector is -- DESCRIPTION : -- Returns the ith point vector in the list. tmp : List := l; cnt : natural := 0; begin while not Is_Null(tmp) loop cnt := cnt + 1; if cnt = i then return Head_Of(tmp).all; end if; tmp := Tail_Of(tmp); end loop; end Get; -- CONSTRUCTORS : function Number_of_Cones ( l : Array_of_Lists; i : natural ) return natural is res : natural := 0; begin for j in l'range loop if j /= i then res := res + Length_Of(l(j)); end if; end loop; return res; end Number_of_Cones; function Lengths ( l : Array_of_Lists; i : natural ) return Vector is res : Vector(l'range); begin res(res'first) := 1; for j in l'first..(i-1) loop res(j+1) := res(j) + Length_Of(l(j)); end loop; for j in (i+1)..l'last loop res(j) := res(j-1) + Length_Of(l(j)); end loop; return res; end Lengths; function Create ( l : Array_of_Lists; g : List; i : natural ) return Intersection_Matrix is n : constant natural := l'length - 1; m : constant natural := Length_Of(g); ll : constant Vector := Lengths(l,i); nc : constant natural := ll(ll'last)-1; res : Intersection_Matrix(n,m,nc); begin res.sv := ll(ll'first..ll'last-1); for j in l'range loop if j /= i then declare ind : natural := j; tmpl : List := l(j); cntl : natural := 0; begin if ind > i then ind := ind - 1; end if; while not Is_Null(tmpl) loop declare cone : constant Matrix := Inner_Normal_Cone(l(j),Head_Of(tmpl).all); tmpg : List := g; cntg,sum : natural := 0; begin -- put_line("The inequalities of the normal cone : "); put(cone); while not Is_Null(tmpg) loop cntg := cntg + 1; -- put(" "); put(Head_Of(tmpg).all); if Satisfies(cone,Head_Of(tmpg).all) then res.im(cntg,res.sv(ind)+cntl) := 1; sum := sum + 1; -- put_line(" satisfies."); else res.im(cntg,res.sv(ind)+cntl) := 0; -- put_line(" does not satisfy."); end if; tmpg := Tail_Of(tmpg); end loop; res.im(0,res.sv(ind)+cntl) := sum; end; tmpl := Tail_Of(tmpl); cntl := cntl + 1; end loop; end; end if; end loop; return res; end Create; -- ELEMENTARY SELECTORS : function Is_In ( ima : Intersection_Matrix; i,j,k : natural ) return boolean is begin if ima.im(i,ima.sv(j)+k-1) = 1 then return true; else return false; end if; end Is_In; function Maximal_Column ( ima : Intersection_Matrix ) return natural is res : natural := ima.im'first(2); max : natural := ima.im(0,ima.im'first(2)); begin for j in ima.im'first(2)+1..ima.im'last(2) loop if ima.im(0,j) > max then max := ima.im(0,j); res := j; end if; end loop; return res; end Maximal_Column; function Component ( ima : Intersection_Matrix; column : natural ) return natural is begin for i in ima.sv'range loop if ima.sv(i) > column then return i-1; end if; end loop; return ima.sv'last; end Component; function Length ( ima : Intersection_Matrix; i : natural ) return natural is begin if i < ima.sv'last then return (ima.sv(i+1) - ima.sv(i)); else return (ima.im'last(2) - ima.sv(i) + 1); end if; end Length; function Row_Sum ( ima : Intersection_Matrix; i,j : natural ) return natural is res : natural := 0; lst : natural; begin if j < ima.sv'last then lst := ima.sv(j+1)-1; else lst := ima.im'last(2); end if; for k in ima.sv(j)..lst loop res := res + ima.im(i,k); end loop; return res; end Row_Sum; -- ENUMERATING COMPLEMENTARY COLUMNS : procedure Complementary_Columns ( ima : in Intersection_Matrix ) is acc : Integer_Vectors.Vector(ima.sv'range) := (ima.sv'range => 0); -- acc(j) = 0 if no cone from jth component has been chosen yet, -- = k if kth cone from jth component is selected. continue : boolean := true; function Is_In ( acc : in Vector; i : in natural ) return boolean is -- DESCRIPTION : -- Returns true if the ith generator already belongs to one of the -- chosen cones in acc. begin for j in acc'range loop -- enumerate the components if acc(j) /= 0 -- acc(j) = cone selected then if Is_In(ima,i,j,acc(j)) -- is in selected cone ? then return true; end if; end if; end loop; return false; end Is_In; procedure Select_Columns ( i : in natural ) is -- DESCRIPTION : -- Selects all columns such that the ith generator belongs to the -- collection of columns. lst : natural; begin if i > ima.im'last(1) then Process(acc,continue); else if Is_In(acc,i) then Select_Columns(i+1); else for j in acc'range loop if acc(j) = 0 then if j < ima.sv'last then lst := ima.sv(j+1)-1; else lst := ima.im'last(2); end if; for k in ima.sv(j)..lst loop if ima.im(i,k) = 1 then acc(j) := k-ima.sv(j)+1; Select_Columns(i+1); acc(j) := 0; end if; exit when not continue; end loop; end if; exit when not continue; end loop; end if; end if; end Select_Columns; begin Select_Columns(1); end Complementary_Columns; function Partition ( ima : Intersection_Matrix; cols : Vector; g : List ) return Array_of_Lists is res,res_last : Array_of_Lists(cols'range); tmp : List := g; procedure Search_and_Update ( v : in Vector; i : in natural ) is -- DESCRIPTION : -- Given the ith generator v from the list g, this procedures searches -- for the first cone that contains it and updates the partition. found : boolean := false; begin for j in cols'range loop if (cols(j) /= 0) and then Is_In(ima,i,j,cols(j)) then found := true; Append(res(j),res_last(j),v); end if; exit when found; end loop; end Search_and_Update; begin for i in ima.im'first(1)+1..ima.im'last(1) loop Search_and_Update(Head_Of(tmp).all,i); tmp := Tail_Of(tmp); end loop; return res; end Partition; function Partition_in_Union ( partg,points : Array_of_Lists; i : natural; cols : Vector ) return boolean is -- ALGORITHM : lexicographic enumeration of all couples of lists in partg, -- with each time a check whether it belongs to the union of -- the normal cones as given by the set of complementary columns. function Index ( j : natural ) return natural is begin if j < i then return j; else return j+1; end if; end Index; begin for k1 in partg'range loop if not Is_Null(partg(k1)) then for k2 in (k1+1)..partg'last loop if not Is_Null(partg(k2)) then declare ind1 : constant natural := Index(k1); ind2 : constant natural := Index(k2); x1 : constant Vector := Get(points(ind1),cols(k1)); x2 : constant Vector := Get(points(ind2),cols(k2)); ic1 : constant Matrix := Inner_Normal_Cone(points(ind1),x1); ic2 : constant Matrix := Inner_Normal_Cone(points(ind2),x2); begin if not In_Union(partg(k1),partg(k2),ic1,ic2) then return false; end if; end; end if; end loop; end if; end loop; return true; end Partition_in_Union; function Contained_in_Union ( l : Array_of_Lists; i : natural; g : List; ima : Intersection_Matrix; cols : Vector ) return boolean is p : Array_of_Lists(cols'range) := Partition(ima,cols,g); res : boolean := Partition_in_Union(p,l,i,cols); begin Deep_Clear(p); return res; end Contained_in_Union; -- FINAL TARGET ROUTINE : function Contained_in_Union ( l : Array_of_Lists; i : natural; g : List; ima : Intersection_Matrix ) return boolean is res : boolean := false; continue : boolean := true; procedure Examin_Selection ( cols : in Vector; continue : out boolean ) is begin res := Contained_in_Union(l,i,g,ima,cols); continue := not res; end Examin_Selection; procedure Enumerate_Complementary_Columns is new Complementary_Columns(Examin_Selection); begin Enumerate_Complementary_Columns(ima); return res; end Contained_in_Union; end Normal_Cone_Intersections; SHAR_EOF fi # end of overwriting check if test -f 'normal_cone_intersections.ads' then echo shar: will not over-write existing file "'normal_cone_intersections.ads'" else cat << "SHAR_EOF" > 'normal_cone_intersections.ads' with Integer_Vectors,Integer_Matrices; use Integer_Vectors,Integer_Matrices; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; package Normal_Cone_Intersections is -- DESCRIPTION : -- This package provides a data abstraction to represent the intersections -- of the generators of a normal cone with a tuple of normal cone complexes. -- DATA STRUCTURE : type Intersection_Matrix ( n,m,nc : natural ) is record sv : Vector(1..n); im : Matrix(0..m,1..nc); end record; -- The aim of an intersection matrix is to answer the question : -- does the ith generator of the normal cone of the point x -- belong to the normal cone of the kth point of the jth support? -- The parameters of the three-dimensional intersection matrix are -- n : number of supports to consider the point x to; -- m : number of generators of the normal cone to x; -- nc : total number of normal cones that need to be considered. -- The data of the intersection matrix are -- sv(1..n) a vector whose entries indicates the starting position of the -- the supports in the matrix im, i.e., sv(i) gives the first column in -- the matrix im that collects the data of the normal cone of the first -- points in the ith support; -- im(0..m,1..nc) is a matrix that contains the answers to the question: -- im(i,sv(j)+k) equals 0 or 1, 0 when the ith generator does not belong -- to the normal cone of the kth points in the jth support, 1 otherwise; -- im(0,sv(j)+k) is the sum of im(i,sv(j)+k) for all i in 1..m. -- CONSTRUCTORS : function Number_of_Cones ( l : Array_of_Lists; i : natural ) return natural; -- DESCRIPTION : -- Computes the number of cones, i.e.: returns the sum of the lengths of -- all lists of l, without consider the ith one. -- This is an auxiliary for determining the third dimension of the -- intersection matrix. function Lengths ( l : Array_of_Lists; i : natural ) return Vector; -- DESCRIPTION : -- Returns a vector of dimension equal to l that accumulates the lengths -- of the lists of l, without considering the ith component. -- More precisely, the jth component of the vector on return equals -- one plus the sum of all lengths of the lists in l(l'first..j), -- minus the length of l(i), if i < j. So the vector on return can serve -- as the vector sv, except for the last component that equals one plus -- the total number of cones to consider. function Create ( l : Array_of_Lists; g : List; i : natural ) return Intersection_Matrix; -- DESCRIPTION : -- Returns the intersection matrix of the list of generators of the normal -- cone of a point that belongs to the list l(i). -- ELEMENTARY SELECTORS : function Is_In ( ima : Intersection_Matrix; i,j,k : natural ) return boolean; -- DESCRIPTION : -- Returns true when the ith generator belongs to the normal cone of the -- kth point of the jth support list. function Maximal_Column ( ima : Intersection_Matrix ) return natural; -- DESCRIPTION : -- Returns the index to the column in the intersection matrix with -- the maximal column sum. function Component ( ima : Intersection_Matrix; column : natural ) return natural; -- DESCRIPTION : -- Returns the number of the component of the intersection matrix the -- given column index corresponds to. The number on return equals the -- index of the support of the corresponding column. function Length ( ima : Intersection_Matrix; i : natural ) return natural; -- DESCRIPTION : -- Returns the length of the ith component of the matrix, i.e., returns -- the length of the ith support list. function Row_Sum ( ima : Intersection_Matrix; i,j : natural ) return natural; -- DESCRIPTION : -- Returns the sum of the elements on the ith row, for all normal cones -- of the points of the jth support. -- ENUMERATING COMPLEMENTARY COLUMS : generic with procedure Process ( cols : in Vector; continue : out boolean ); -- DESCRIPTION : -- This procedure is invoked each time a set of complementary columns -- has been found. The vector on return has the following meaning: -- cols(i) = 0 means that no normal cone of the ith component is taken, -- cols(i) = j means that the jth normal cone of the ith component -- belongs to the complementary columns. -- Note that the range of cols is 1..n-1, with n = #supports. procedure Complementary_Columns ( ima : in Intersection_Matrix ); -- DESCRIPTION : -- This procedure enumerates all complementary columns. -- A set of columns, at most one of each component, is said to be -- complementary if its union contains all generators of a normal cone. function Partition ( ima : Intersection_Matrix; cols : Vector; g : List ) return Array_of_Lists; -- DESCRIPTION : -- Returns a partition of the set of generators g w.r.t. the columns cols -- in the intersection matrix ima. More precisely: the ith list on return -- contains those generators that belong to the normal cone cols(i) of the -- ith component. -- If the same generator belongs to several cones, it will be contained -- only in the list with smallest index. -- REQUIRED : cols is a set of complementary columns. function Partition_in_Union ( partg,points : Array_of_Lists; i : natural; cols : Vector ) return boolean; -- DESCRIPTION : -- Returns true if the set of generators of a normal cones of the ith -- component of the point lists belongs to the union of normal cones, -- as indicated by the set of complementary columns. function Contained_in_Union ( l : Array_of_Lists; i : natural; g : List; ima : Intersection_Matrix; cols : Vector ) return boolean; -- DESCRIPTION : -- Returns true if the list of generators g is contained in the normal -- cones to the point selected by the columns of the intersection matrix. -- FINAL TARGET ROUTINE : function Contained_in_Union ( l : Array_of_Lists; i : natural; g : List; ima : Intersection_Matrix ) return boolean; -- DESCRIPTION : -- Enumerates all sets of complementary columns, until its union -- contains the convex cone spanned by the list of generators, -- until all possibilities are exhausted. -- In the first case, true is returned, otherwise false is returned. end Normal_Cone_Intersections; SHAR_EOF fi # end of overwriting check if test -f 'pruning_statistics.adb' then echo shar: will not over-write existing file "'pruning_statistics.adb'" else cat << "SHAR_EOF" > 'pruning_statistics.adb' with Floating_Point_Numbers; use Floating_Point_Numbers; procedure Pruning_Statistics ( file : in file_type; nbsucc,nbfail : in Float_Vectors.Vector ) is use Floating_Point_Numbers.double_float_io; totsucc,totfail : double_float := 0.0; begin new_line(file); put_line(file,"STATISTICS OF #FACE-FACE COMBINATIONS :"); new_line(file); put_line(file," #Success #Fail Ratio "); new_line(file); for i in nbsucc'range loop put(file," "); put(file,nbsucc(i),2,3,3); put(file," "); put(file,nbfail(i),2,3,3); put(file," "); if nbsucc(i) + 1.0 /= 1.0 then put(file,nbfail(i)/nbsucc(i),2,3,3); else put(file,"1/0"); end if; new_line(file); totsucc := totsucc + nbsucc(i); totfail := totfail + nbfail(i); end loop; put_line(file," ----------------------------------------------"); put(file," Total : "); put(file,totsucc,2,3,3); put(file," + "); put(file,totfail,2,3,3); put(file," = "); put(file,totsucc+totfail,2,3,3); new_line(file); new_line(file); put_line(file," Success = successful face-face combinations"); put_line(file," Fail = unsuccessful face-face combinations"); put_line(file," Ratio = #Fail / #Success"); put_line(file," Total = total number of Linear-Programming problems"); end Pruning_Statistics; SHAR_EOF fi # end of overwriting check if test -f 'pruning_statistics.ads' then echo shar: will not over-write existing file "'pruning_statistics.ads'" else cat << "SHAR_EOF" > 'pruning_statistics.ads' with text_io; use text_io; with Float_Vectors; procedure Pruning_Statistics ( file : in file_type; nbsucc,nbfail : in Float_Vectors.Vector ); -- DESCRIPTION : -- Writes statistics on the number of face-face combinations. -- These statistics give the user an idea of the pruning tree. -- ON ENTRY : -- file file must be opened for output; -- nbsucc number of successul pruning combinations per level; -- nbfail number of failing pruning combinations per level. SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'Symmetry' then mkdir 'Symmetry' fi cd 'Symmetry' if test -f 'drivers_for_orbits_of_solutions.adb' then echo shar: will not over-write existing file "'drivers_for_orbits_of_solutions.adb'" else cat << "SHAR_EOF" > 'drivers_for_orbits_of_solutions.adb' with integer_io; use integer_io; with Symmetry_Group_io,Solutions_io; use Solutions_io; with Orbits_of_Solutions; use Orbits_of_Solutions; package body Drivers_for_Orbits_of_Solutions is procedure Driver_for_Orbits_of_Solutions ( file : in file_type; sols : in out Solution_List; v : in List_of_Permutations; allperms,signsym : in boolean; tol : in double_float ) is begin if not Is_Null(sols) then declare n : constant natural := Head_Of(sols).n; orb : Permutation(1..n); begin Driver_for_Orbits_of_Solutions(file,sols,v,allperms,signsym,tol,orb); end; end if; end Driver_for_Orbits_of_Solutions; procedure Driver_for_Orbits_of_Solutions ( file : in file_type; sols : in out Solution_List; v : in List_of_Permutations; allperms,signsym : in boolean; tol : in double_float; orbi : out Permutation ) is begin if not Is_Null(sols) then declare n : constant natural := Head_Of(sols).n; orb : Permutation(1..n); len : natural; begin if allperms then sols := Generating(sols,signsym,tol); else Analyze(v,signsym,tol,sols); end if; len := Length_Of(sols); new_line(file); put(file,"The number of generating solutions : "); put(file,len,1); new_line(file); orb := Orbits(sols,tol); put(file,"The orbits : "); Symmetry_Group_io.put(file,orb); new_line(file); new_line(file); put_line(file,"THE GENERATING SOLUTIONS : "); put(file,len,Head_Of(sols).n,sols); new_line(file); orbi := orb; end; end if; end Driver_for_Orbits_of_Solutions; end Drivers_for_Orbits_of_Solutions; SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_orbits_of_solutions.ads' then echo shar: will not over-write existing file "'drivers_for_orbits_of_solutions.ads'" else cat << "SHAR_EOF" > 'drivers_for_orbits_of_solutions.ads' with text_io; use text_io; with Floating_Point_Numbers; use Floating_Point_Numbers; with Solutions; use Solutions; with Permutations,Symmetry_Group; use Permutations,Symmetry_Group; package Drivers_for_Orbits_of_Solutions is -- DESCRIPTION : -- This package provides two drivers for computing and reporting on the -- computation of the orbits of a given list of solutions. procedure Driver_for_Orbits_of_Solutions ( file : in file_type; sols : in out Solution_List; v : in List_of_Permutations; allperms,signsym : in boolean; tol : in double_float ); procedure Driver_for_Orbits_of_Solutions ( file : in file_type; sols : in out Solution_List; v : in List_of_Permutations; allperms,signsym : in boolean; tol : in double_float; orbi : out Permutation ); -- DESCRIPTION : -- Computes the orbits of the given list of solutions, creates a -- list with only the generating solutions and reports on file. -- ON ENTRY : -- file to write the results on, must be opened for output; -- sols a solution list; -- v list of permutations; -- allperms when true, then v is the full permutation group; -- signsym when true, there is additional sign symmetry; -- tol tolerance for comparing the solution vectors. -- ON RETURN : -- sols generating list of solutions; -- orbi permutation vector, indicating the orbits, if provided -- as output parameter. end Drivers_for_Orbits_of_Solutions; SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_symmetric_lifting.adb' then echo shar: will not over-write existing file "'drivers_for_symmetric_lifting.adb'" else cat << "SHAR_EOF" > 'drivers_for_symmetric_lifting.adb' with integer_io,Numbers_io; use integer_io,Numbers_io; with Communications_with_User; use Communications_with_User; with Timing_Package; use Timing_Package; with Floating_Point_Numbers; use Floating_Point_Numbers; with Integer_Vectors; with Integer_Vectors_io; use Integer_Vectors_io; with Float_Vectors; with Float_Vectors_io; use Float_Vectors_io; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Complex_Laurent_Polynomial_Systems; use Complex_Laurent_Polynomial_Systems; with Polynomial_to_Laurent_Converters; use Polynomial_to_Laurent_Converters; with Laurent_to_Polynomial_Converters; use Laurent_to_Polynomial_Converters; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Lists_of_Integer_Vectors_io; use Lists_of_Integer_Vectors_io; with Arrays_of_Integer_Vector_Lists; with Arrays_of_Integer_Vector_Lists_io; use Arrays_of_Integer_Vector_Lists_io; with Arrays_of_Float_Vector_Lists; with Power_Lists; use Power_Lists; with Integer_Faces_of_Polytope; with Integer_Mixed_Subdivisions; with Integer_Mixed_Subdivisions_io; use Integer_Mixed_Subdivisions_io; with Integer_Pruning_Methods; use Integer_Pruning_Methods; with Mixed_Volume_Computation; use Mixed_Volume_Computation; with Float_Integer_Convertors; use Float_Integer_Convertors; with Float_Faces_of_Polytope; with Float_Mixed_Subdivisions; with Float_Mixed_Subdivisions_io; use Float_Mixed_Subdivisions_io; with Float_Pruning_Methods; use Float_Pruning_Methods; with Mixed_Volume_Computation; use Mixed_Volume_Computation; with Permutations; use Permutations; with Symmetry_Group; use Symmetry_Group; with Symmetry_Group_io; use Symmetry_Group_io; with Symbol_Table,Symbol_Table_io; use Symbol_Table; with Symbolic_Symmetry_Group_io; use Symbolic_Symmetry_Group_io; with Drivers_for_Symmetry_Group_io; use Drivers_for_Symmetry_Group_io; with Equivariant_Polynomial_Systems; use Equivariant_Polynomial_Systems; with Faces_of_Symmetric_Polytopes; use Faces_of_Symmetric_Polytopes; with Integer_Lifting_Functions; use Integer_Lifting_Functions; with Symmetric_Lifting_Functions; use Symmetric_Lifting_Functions; with Integer_Lifting_Utilities; use Integer_Lifting_Utilities; with Float_Lifting_Utilities; use Float_Lifting_Utilities; with Drivers_for_Lifting_Functions; use Drivers_for_Lifting_Functions; with Generating_Mixed_Cells; use Generating_Mixed_Cells; with Symmetric_Randomize; with Symmetric_Polyhedral_Continuation; use Symmetric_Polyhedral_Continuation; with Solutions_io; use Solutions_io; with Pruning_Statistics; with Drivers_for_Polynomial_Continuation; use Drivers_for_Polynomial_Continuation; package body Drivers_for_Symmetric_Lifting is procedure Symmetric_Lifting_Info is i : array(1..6) of string(1..65); begin i(1):=" Symmetric lifting allows to exploit permutation symmetries in"; i(2):="the tuple of Newton polytopes. A symmetric subdivision is"; i(3):="induced by lifting the points in the same orbit up to the same"; i(4):="height. The corresponding random coefficient start system has"; i(5):="the same symmetric structure, so that in the homotopy, only the"; i(6):="generating solution paths need to be traced. "; for k in i'range loop put_line(i(k)); end loop; end Symmetric_Lifting_Info; procedure Driver_for_Symmetric_Mixed_Volume_Computation ( file : in file_type; p : in Poly_Sys; byebye : in boolean; q : out Poly_Sys; qsols : out Solution_List; mv : out natural ) is use Floating_Point_Numbers.double_float_io; welcome : constant string := "Mixed-Volume Computation by Symmetric Lifting"; solsft,gft,outsubft : file_type; -- SWITCHES : invariant : boolean; -- true if the polynomials are invariant equivaria : boolean; -- true if the system is equivariant compmisu : boolean; -- if a mixed subdivision has to be computed misufile : boolean; -- when the mixed subdivision has to be put on file signsym : boolean; -- there is sign symmetry allperms : boolean; -- equi-invariant w.r.t. all permutations allsigns : boolean; -- equi-invariant w.r.t. all sign permutations tosolve : boolean; -- on when the system has to be solved torandq : boolean; -- on when random symmetric start system is solved procedure Read_Symmetry ( n : in natural; pv,pw,fv,fw : in out List_of_Permutations; fail : out boolean ) is -- DESCRIPTON : -- Reads and builds representations of the symmetry groups. -- ON ENTRY : -- n dimension; -- ON RETURN : -- pv permutation symmetry on the unknowns; -- pw effect of the group actions in pv on the equations; -- fv contains pv, plus eventually sign symmetry; -- fw effect of the group actions in fv on the equations; -- fail when the polynomial system is not symmetric. ans : character; nb : natural; pg,fg : List_of_Permutations; begin Read_Permutation_Group(n,pg,pv,allperms); put("Is there a sign symmetry to take into account ? (y/n) "); Ask_Yes_or_No(ans); signsym := (ans = 'y'); if signsym then put("Is the system invariant under all changes of signs ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then allsigns := true; fv := pv; else allsigns := false; signsym := false; -- fv will contain these permutations allperms := false; -- fv will be used for the generating solutions put("The sign inversion of all elements is represented as "); for i in 1..n loop put('-'); declare sb : Symbol; begin sb := (sb'range => ' '); sb := Symbol_Table.get(i); Symbol_Table_io.put(sb); put(" "); end; end loop; new_line; put("Give the number of generating elements in the group : "); Read_Natural(nb); put("Give "); put(nb,1); put_line(" vector representations of the generating elements :"); Symbolic_Symmetry_Group_io.get(fg,n,nb); put("Do you want the generation of the group ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then fv := Generate(Union(fg,pv)); else fv := Union(fg,pv); end if; end if; else allsigns := false; fv := pv; end if; new_line(file); put_line(file,"THE SYMMETRY GROUP :"); new_line(file); put_line(file,"v:"); Symbolic_Symmetry_Group_io.put(file,fv); new_line(file); Act(pv,p,pw,fail,invariant,equivaria); if not Is_Null(fg) then Act(fv,p,fw,fail,invariant,equivaria); else fw := pw; end if; new_line(file); put_line(file,"w:"); Symmetry_Group_io.put(file,fw); new_line(file); if allsigns then put_line(file, "The system is invariant under all changes of signs."); end if; end Read_Symmetry; procedure Data_Management ( n : in natural; points : in out Arrays_of_Integer_Vector_Lists. Array_of_Lists; pv,pw,fv,fw : in List_of_Permutations; fltlif : out boolean; mix : out Integer_Vectors.Link_to_Vector; imixsub : out Integer_Mixed_Subdivisions.Mixed_Subdivision; permp : out Poly_Sys ) is -- DESCRIPTION : -- Allows to read in a mixed subdivision, determines type of mixture. -- ON ENTRY : -- n dimension; -- points supports; -- pv permutation symmetry on the unknowns; -- pw effect of the group actions in pv on the equations. -- fv contains pv, eventually with sign symmetry; -- fw effect of the group actions in fv on the equations. -- ON RETURN : -- fltlif true when floating-point lifting is used, false otherwise; -- mix type of mixture; -- points ordered according to mix; -- imixsub integer mixed subdivision; -- permp system ordered according to mix. use Integer_Vectors; use Arrays_of_Integer_Vector_Lists; use Integer_Mixed_Subdivisions; tmpmix,perm : Link_to_Vector; lifted_points : Array_of_Lists(p'range); m : natural; mixsub : Mixed_Subdivision; ans : character; procedure Read_Subdivision is insubft : file_type; nn,bkk : natural; begin put_line("Reading the name of the input file."); Read_Name_and_Open_File(insubft); get(insubft,nn,m,tmpmix,mixsub); Close(insubft); new_line(file); put_line(file,"MIXED SUBDIVISION :"); new_line(file); put(file,nn,tmpmix.all,mixsub,bkk); new_line(file); compmisu := false; fltlif := false; imixsub := mixsub; permp := p; exception when DATA_ERROR => put_line("Data not in correct format. Will ignore it..."); Close(insubft); end Read_Subdivision; begin new_line; put("Do you have already a mixed subdivision ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then Read_Subdivision; else compmisu := true; end if; if compmisu then put("Do you want to enforce the type of mixture ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then put("Give the number of different supports : "); Read_Natural(m); put("Give the vector with occurencies : "); get(m,tmpmix); permp := p; else Compute_Mixture(points,tmpmix,perm); permp := Permute(p,perm); Clear(perm); end if; put("Do you want to have the subdivision on separate file ? (y/n) "); Ask_Yes_or_No(ans); misufile := (ans = 'y'); if misufile then put_line("Reading the name of the output file."); Read_Name_and_Create_File(outsubft); end if; new_line(file); put_line(file,"THE TYPE OF MIXTURE :"); new_line(file); put(file,"The number of different supports : "); put(file,tmpmix'last,1); new_line(file); put(file,"Vector indicating the occurrences : "); put(file,tmpmix); new_line(file); else misufile := false; end if; mix := tmpmix; end Data_Management; procedure Write_Generating_Cells ( subfile : in file_type; n : in natural; mix : in Integer_Vectors.Vector; lifted : in Arrays_of_Integer_Vector_Lists.Array_of_Lists; mixsub : in Integer_Mixed_Subdivisions.Mixed_Subdivision ) is -- DESCRIPTION : -- Writes the list of generating cells on file, as the subdivision -- of the cell that contains all lifted points. -- By doing so, we will have no troubles recovering the lifting. use Arrays_of_Integer_Vector_Lists; use Integer_Mixed_Subdivisions; genmic : Mixed_Cell; genmixsub : Mixed_Subdivision; begin genmic.nor := new Integer_Vectors.Vector'(1..n+1 => 0); genmic.pts := new Array_of_Lists'(lifted); genmic.sub := new Mixed_Subdivision'(mixsub); Construct(genmic,genmixsub); put(subfile,n,mix,genmixsub); end Write_Generating_Cells; procedure Write_Generating_Cells ( subfile : in file_type; n : in natural; mix : in Integer_Vectors.Vector; lifted : in Arrays_of_Float_Vector_Lists.Array_of_Lists; mixsub : in Float_Mixed_Subdivisions.Mixed_Subdivision ) is -- DESCRIPTION : -- Writes the list of generating cells on file, as the subdivision -- of the cell that contains all lifted points. -- By doing so, we will have no troubles recovering the lifting. use Arrays_of_Float_Vector_Lists; use Float_Mixed_Subdivisions; genmic : Mixed_Cell; genmixsub : Mixed_Subdivision; begin genmic.nor := new Float_Vectors.Vector'(1..n+1 => 0.0); genmic.pts := new Array_of_Lists'(lifted); genmic.sub := new Mixed_Subdivision'(mixsub); Construct(genmic,genmixsub); put(subfile,n,mix,genmixsub); end Write_Generating_Cells; procedure Integer_Automatic_Lift_Orbits ( file : in file_type; norb : in natural; orbits : in out Arrays_of_Integer_Vector_Lists. Array_of_Lists ) is -- DESCRIPTION : -- Random integer numbers are generated and given to each orbit. lower,upper : integer; begin new_line(file); put_line(file,"AUTOMATIC RANDOM INTEGER LIFTING :"); new_line(file); put("Give lower bound for random lifting : "); Read_Integer(lower); put("Give upper bound for random lifting : "); Read_Integer(upper); put(file," Lower bound for random lifting : "); put(file,lower,1); new_line(file); put(file," Upper bound for random lifting : "); put(file,upper,1); new_line(file); Integer_Random_Lift_Orbits(orbits,norb,lower,upper); end Integer_Automatic_Lift_Orbits; procedure Float_Automatic_Lift_Orbits ( file : in file_type; norb : in natural; orbits : in out Arrays_of_Float_Vector_Lists. Array_of_Lists ) is -- DESCRIPTION : -- Random floating-point numbers are generated and given to each orbit. lower,upper : double_float; begin new_line(file); put_line(file,"AUTOMATIC RANDOM FLOATING-POINT LIFTING :"); new_line(file); put("Give lower bound for random lifting : "); Read_Double_Float(lower); put("Give upper bound for random lifting : "); Read_Double_Float(upper); put(file," Lower bound for random lifting : "); put(file,lower,2,3,3); new_line(file); put(file," Upper bound for random lifting : "); put(file,upper,2,3,3); new_line(file); Float_Random_Lift_Orbits(orbits,norb,lower,upper); end Float_Automatic_Lift_Orbits; procedure Integer_Manual_Lift_Orbits ( file : in file_type; norb : in natural; orbits : in out Arrays_of_Integer_Vector_Lists. Array_of_Lists ) is -- DESCRIPTION : -- The user can give integer lifting values for every orbit. rv : Integer_Vectors.Vector(1..norb) := (1..norb => 0); begin new_line(file); put_line(file,"MANUAL INTEGER LIFTING :"); new_line(file); put("Reading "); put(norb,1); put_line(" integer numbers to lift orbits"); for i in rv'range loop put(" give lifting for orbit "); put(i,1); put(" : "); Read_Integer(rv(i)); end loop; put_line(file," Lifting vector supplied by user :"); put(file,rv); new_line(file); Integer_Lift_Orbits(orbits,rv); end Integer_Manual_Lift_Orbits; procedure Float_Manual_Lift_Orbits ( file : in file_type; norb : in natural; orbits : in out Arrays_of_Float_Vector_Lists. Array_of_Lists ) is -- DESCRIPTION : -- The user can give integer lifting values for every orbit. use Float_Vectors; rv : Float_Vectors.Vector(1..norb) := (1..norb => 0.0); begin new_line(file); put_line(file,"MANUAL FLOATING-POINT LIFTING :"); new_line(file); put("Reading "); put(norb,1); put_line(" floating-point numbers to lift orbits"); for i in rv'range loop put(" give lifting for orbit "); put(i,1); put(" : "); Read_Double_Float(rv(i)); end loop; put_line(file," Lifting vector supplied by user :"); Float_Vectors_io.put(file,rv); new_line(file); Float_Lift_Orbits(orbits,rv); end Float_Manual_Lift_Orbits; procedure Classify_and_Lift_Orbits ( file : in file_type; mix : in Integer_Vectors.Vector; points : in Arrays_of_Integer_Vector_Lists.Array_of_Lists; pv,pw : in List_of_Permutations; fltlif : out boolean; ilft : out Arrays_of_Integer_Vector_Lists.Array_of_Lists; flft : out Arrays_of_Float_Vector_Lists.Array_of_Lists ) is -- DESCRIPTION : -- Classifies the points into orbits and lifts orbits. -- ON ENTRY : -- file output file; -- mix type of mixture; -- points support sets; -- pv representation of permutation symmetry; -- pw effect of group actions on the system. -- ON RETURN : -- fltlif true when floating-point lifting, false otherwise; -- ilft integer-valued lifted supports; -- flft floating-point lifted supports; ans : character; cnt,norb : natural; orbits : Arrays_of_Integer_Vector_Lists.Array_of_Lists(points'range); fltorb : Arrays_of_Float_Vector_Lists.Array_of_Lists(points'range); begin new_line(file); put_line(file,"CLASSIFICATION OF POINTS INTO ORBITS :"); new_line(file); Classify_Orbits(points,mix,pv,pw,norb,orbits); cnt := orbits'first; new_line; put("Classified orbits,"); put_line(" last coordinate of vector is orbit number : "); for k in mix'range loop put("support no. "); put(cnt,1); put_line(" :"); put(orbits(cnt)); put(file,"support no. "); put(file,cnt,1); put_line(file," :"); put(file,orbits(cnt)); cnt := cnt + mix(k); end loop; new_line; put_line("MENU for Lifting of Orbits"); put(" 1. Integer Automatic : "); put(norb,1); put_line(" random integer numbers as lifting."); put(" 2. Manual : "); put("you can give "); put(norb,1); put_line(" integer lifting values."); put(" 3. Float Automatic : "); put(norb,1); put_line(" random floating-point numbers as lifting."); put(" 4. Manual : "); put("you can give "); put(norb,1); put_line(" floating-point lifting values."); put("Type 1, 2, 3, or 4 to select lifting : "); Ask_Alternative(ans,"1234"); case ans is when '1' => Integer_Automatic_Lift_Orbits(file,norb,orbits); ilft := orbits; fltlif := false; when '2' => Integer_Manual_Lift_Orbits(file,norb,orbits); ilft := orbits; fltlif := false; when '3' => fltorb := Convert(orbits); Float_Automatic_Lift_Orbits(file,norb,fltorb); flft := fltorb; fltlif := true; when '4' => fltorb := Convert(orbits); Float_Manual_Lift_Orbits(file,norb,fltorb); flft := fltorb; fltlif := true; when others => null; end case; end Classify_and_Lift_Orbits; procedure Integer_Prune_for_Mixed_Cells ( file : in file_type; n : in natural; mix : in Integer_Vectors.Vector; lifpts : in Arrays_of_Integer_Vector_Lists.Array_of_Lists; pv : in List_of_Permutations; mixsub : in out Integer_Mixed_Subdivisions. Mixed_Subdivision ) is -- DESCRIPTION : -- Given the lifted supports, the mixed cells will be computed. -- ON ENTRY : -- file output file; -- n dimension; -- mix type of mixture; -- lifpts lifted supports; -- pv representation of permutation group. -- ON RETURN : -- mixsub mixed cells; use Integer_Faces_of_Polytope; use Integer_Mixed_Subdivisions; fa : Array_of_Faces(mix'range); nbsucc,nbfail : Float_Vectors.Vector(mix'range) := (mix'range => 0.0); timer : timing_widget; begin tstart(timer); for k in fa'range loop fa(k) := Create_Lower(mix(k),n+1,lifpts(k)); end loop; if invariant then if allperms then fa(fa'first) := Generating_Lifted_Faces(fa(fa'first)); else fa(fa'first) := Generating_Lifted_faces(pv,fa(fa'first)); end if; end if; tstop(timer); new_line(file); put_line(file,"CARDINALITIES OF THE LIFTED FACES :"); new_line(file); for i in fa'range loop put(file," # lifted "); put(file,mix(i),1); put(file,"-faces of polytope "); put(file,i,1); put(file," : "); put(file,Length_Of(fa(i)),1); new_line(file); end loop; new_line(file); print_times(file,timer,"Creation of the Lower Faces"); new_line(file); tstart(timer); Create_CS(n,mix,fa,lifpts,nbsucc,nbfail,mixsub); tstop(timer); Pruning_Statistics(file,nbsucc,nbfail); new_line(file); print_times(file,timer,"Pruning for Mixed Cells"); end Integer_Prune_for_Mixed_Cells; procedure Float_Prune_for_Mixed_Cells ( file : in file_type; n : in natural; mix : in Integer_Vectors.Vector; lifpts : in Arrays_of_Float_Vector_Lists.Array_of_Lists; pv : in List_of_Permutations; mixsub : in out Float_Mixed_Subdivisions. Mixed_Subdivision ) is -- DESCRIPTION : -- Given the lifted supports, the mixed cells will be computed. -- ON ENTRY : -- file output file; -- n dimension; -- mix type of mixture; -- lifpts lifted supports; -- pv representation of permutation group. -- ON RETURN : -- mixsub mixed cells; use Float_Faces_of_Polytope; use Float_Mixed_Subdivisions; tol : constant double_float := 10.0**(-10); fa : Array_of_Faces(mix'range); nbsucc,nbfail : Float_Vectors.Vector(mix'range) := (mix'range => 0.0); timer : timing_widget; begin tstart(timer); for k in fa'range loop fa(k) := Create_Lower(mix(k),n+1,lifpts(k),tol); end loop; -- if invariant -- then if allperms -- then fa(fa'first) := Generating_Lifted_Faces(fa(fa'first)); -- else fa(fa'first) := Generating_Lifted_faces(pv,fa(fa'first)); -- end if; -- end if; tstop(timer); new_line(file); put_line(file,"CARDINALITIES OF THE LIFTED FACES :"); new_line(file); for i in fa'range loop put(file," # lifted "); put(file,mix(i),1); put(file,"-faces of polytope "); put(file,i,1); put(file," : "); put(file,Length_Of(fa(i)),1); new_line(file); end loop; new_line(file); print_times(file,timer,"Creation of the Lower Faces"); new_line(file); tstart(timer); Create(n,mix,fa,lifpts,tol,nbsucc,nbfail,mixsub); tstop(timer); Pruning_Statistics(file,nbsucc,nbfail); new_line(file); print_times(file,timer,"Pruning for Mixed Cells"); end Float_Prune_for_Mixed_Cells; procedure Compute_Mixed_Volume ( file : in file_type; n : in natural; mix : in Integer_Vectors.Vector; lifpts : in Arrays_of_Integer_Vector_Lists.Array_of_Lists; mixsub : in out Integer_Mixed_Subdivisions.Mixed_Subdivision; mv : out natural ) is -- DESCRIPTION : -- Computes the mixed volume of the supports in lifpts and checks -- on the mixed cells in the subdivision. -- Results are written on the output file. -- ON ENTRY : -- file output file; -- n dimension; -- mix type of mixture; -- lifpts lifted supports; -- mixsub list of mixed cells. -- ON RETURN : -- mixsub can contain refinements of cells; -- mv mixed volume. use Integer_Mixed_Subdivisions; timer : timing_widget; bkk : natural; begin new_line(file); put_line(file,"THE LIFTED SUPPORTS :"); new_line(file); put(file,lifpts); new_line(file); put_line(file,"VOLUME OF MIXED CELLS :"); new_line(file); tstart(timer); put(file,n,mix,mixsub,bkk); mv := bkk; tstop(timer); new_line(file); put(file,"The mixed volume : "); put(file,bkk,1); new_line(file); new_line(file); print_times(file,timer,"Volume computation of mixed cells"); new_line(file); mixsub := Create(lifpts,mixsub); new_line(file); put_line(file,"COMPUTING AGAIN AFTER CHECKING :"); new_line(file); tstart(timer); put(file,n,mix,mixsub,bkk); tstop(timer); mv := bkk; put(file,"The mixed volume : "); put(file,bkk,1); new_line(file); new_line(file); print_times(file,timer,"Checking the Mixed Volume Computation"); end Compute_Mixed_Volume; procedure Compute_Mixed_Volume ( file : in file_type; n : in natural; mix : in Integer_Vectors.Vector; lifpts : in Arrays_of_Float_Vector_Lists.Array_of_Lists; mixsub : in out Float_Mixed_Subdivisions.Mixed_Subdivision; mv : out natural ) is -- DESCRIPTION : -- Computes the mixed volume of the supports in lifpts. -- Results are written on the output file. -- ON ENTRY : -- file output file; -- n dimension; -- mix type of mixture; -- lifpts lifted supports; -- mixsub list of mixed cells. -- ON RETURN : -- mixsub can contain refinements of cells; -- mv mixed volume. timer : timing_widget; bkk : natural; begin new_line(file); put_line(file,"THE LIFTED SUPPORTS :"); new_line(file); put(file,lifpts); new_line(file); put_line(file,"VOLUME OF MIXED CELLS :"); new_line(file); tstart(timer); put(file,n,mix,mixsub,bkk); mv := bkk; tstop(timer); new_line(file); put(file,"The mixed volume : "); put(file,bkk,1); new_line(file); new_line(file); print_times(file,timer,"Volume computation of mixed cells"); end Compute_Mixed_Volume; procedure Generating_Mixed_Cells ( file : in file_type; n : in natural; points : in Arrays_of_Integer_Vector_Lists.Array_of_Lists; pv,pw : in List_of_Permutations; mix : in Integer_Vectors.Vector; lorb : in Arrays_of_Integer_Vector_Lists.Array_of_Lists; lifted : out Arrays_of_Integer_Vector_Lists. Link_to_Array_of_Lists; gensub : in out Integer_Mixed_Subdivisions. Mixed_Subdivision ) is -- DESCRIPTION : -- Computes a list of generating mixed cells. -- ON ENTRY : -- file output file; -- n dimension; -- points support sets; -- pv representation of permutation symmetry; -- pw effect of group actions in pv on the system; -- mix type of mixture; -- lorb classified and lifted supports. -- ON RETURN : -- lifted lifted points; -- gensub generating cells. use Arrays_of_Integer_Vector_Lists; use Integer_Mixed_Subdivisions; lifpts : Array_of_Lists(mix'range); mixsub,genmixsub : Mixed_Subdivision; index,bkk : natural; timer : timing_widget; begin if compmisu then index := lorb'first; for k in lifpts'range loop lifpts(k) := lorb(index); index := index + mix(k); end loop; Integer_Prune_for_Mixed_Cells(file,n,mix,lifpts,pv,mixsub); Compute_Mixed_Volume(file,n,mix,lifpts,mixsub,mv); tstart(timer); if allperms then genmixsub := Generating_Cells(mixsub); else genmixsub := Generating_Cells(pv,pw,mix,mixsub); end if; new_line(file); put_line(file,"THE GENERATING CELLS :"); new_line(file); put(file,n,mix,genmixsub,bkk); tstop(timer); if misufile then Write_Generating_Cells(outsubft,n,mix,lifpts,genmixsub); end if; new_line(file); put(file,"Number of generating solutions : "); put(file,bkk,1); new_line(file); new_line(file); print_times(file,timer,"Computing generating cells"); gensub := genmixsub; else lifpts := Induced_Lifting(n,mix,points,gensub); new_line(file); put_line(file,"THE LIFTED SUPPORTS :"); new_line(file); put(file,lifpts); new_line(file); end if; lifted := new Array_of_Lists'(lifpts); end Generating_Mixed_Cells; procedure Generating_Mixed_Cells ( file : in file_type; n : in natural; points : in Arrays_of_Integer_Vector_Lists.Array_of_Lists; pv,pw : in List_of_Permutations; mix : in Integer_Vectors.Vector; lorb : in Arrays_of_Float_Vector_Lists.Array_of_Lists; lifted : out Arrays_of_Float_Vector_Lists. Link_to_Array_of_Lists; gensub : out Float_Mixed_Subdivisions. Mixed_Subdivision ) is -- DESCRIPTION : -- Computes a list of generating mixed cells. -- ON ENTRY : -- file output file; -- n dimension; -- points support sets; -- pv representation of permutation symmetry; -- pw effect of group actions in pv on the system; -- mix type of mixture; -- lorb classified and lifted supports. use Arrays_of_Float_Vector_Lists; use Float_Mixed_Subdivisions; fpoints,lifpts : Array_of_Lists(mix'range); mixsub,genmixsub : Mixed_Subdivision; index,bkk : natural; timer : timing_widget; begin if compmisu then index := lorb'first; for k in lifpts'range loop lifpts(k) := lorb(index); index := index + mix(k); end loop; Float_Prune_for_Mixed_Cells(file,n,mix,lifpts,pv,mixsub); Compute_Mixed_Volume(file,n,mix,lifpts,mixsub,mv); else fpoints := Convert(points); lifpts := Induced_Lifting(n,mix,fpoints,mixsub); new_line(file); put_line(file,"THE LIFTED SUPPORTS : "); new_line(file); put(file,lifpts); new_line(file); end if; tstart(timer); if allperms then genmixsub := Generating_Cells(mixsub); else genmixsub := Generating_Cells(pv,pw,mix,mixsub); end if; new_line(file); put_line(file,"THE GENERATING CELLS :"); new_line(file); put(file,n,mix,genmixsub,bkk); tstop(timer); if misufile then Write_Generating_Cells(outsubft,n,mix,lifpts,genmixsub); end if; new_line(file); put(file,"Number of generating solutions : "); put(file,bkk,1); new_line(file); new_line(file); print_times(file,timer,"Computing generating cells"); lifted := new Array_of_Lists'(lifpts); gensub := genmixsub; end Generating_Mixed_Cells; procedure Settings_for_Polyhedral_Continuation is -- DESCRIPTION : -- Displays the menu and allows the user to set the parameters. ans : character; oc : natural; begin new_line; put_line("MENU for Symmetric Polyhedral Continuation : "); put_line(" 0. No polyhedral continuation, leave the menu."); put_line(" 1. Solve given system by polyhedral continuation."); put_line(" 2. Create and solve random coefficient system."); put("Type 0,1, or 2 to choose : "); Ask_Alternative(ans,"012"); tosolve := not (ans = '0'); torandq := (ans = '2'); if tosolve then if torandq then put_line("Reading a name of a file to write start system on."); Read_Name_and_Create_File(gft); else new_line; put_line ("Reading a name of a file to write start solutions on."); Read_Name_and_Create_File(solsft); end if; new_line; Driver_for_Continuation_Parameters(file); new_line; Driver_for_Process_io(file,oc); end if; if byebye then new_line; put_line("No more input expected. See output file for results."); new_line; else new_line; put_line("Starting the Computations ..."); new_line; end if; end Settings_for_Polyhedral_Continuation; procedure Symmetric_Polyhedral_Continuation ( file : in file_type; pp : in Poly_Sys; fv,fw : List_of_Permutations; n : in natural; mix : in Integer_Vectors.Vector; lifpts : in Arrays_of_Integer_Vector_Lists.Array_of_Lists; gensub : in Integer_Mixed_Subdivisions. Mixed_Subdivision ) is -- DESCRIPTION : -- Constructs and solves a symmetric random-coefficient start system. -- ON ENTRY : -- file output file; -- pp polynomial system, ordered according to mixture; -- fv representation of symmetry group; -- fw effect on group actions on system; -- n dimension; -- mix type of mixture; -- lifpts lifted points; -- gensub generating mixed cells. use Arrays_of_Integer_Vector_Lists; use Integer_Mixed_Subdivisions; lq,lifted_lq : Laur_Sys(p'range); lp : Laur_Sys(p'range); qq : Poly_Sys(p'range); qqsols : Solution_List; timer : timing_widget; begin new_line(file); put_line(file,"COMPUTING THE GENERATING SOLUTIONS :"); new_line(file); tstart(timer); lp := Polynomial_to_Laurent_System(pp); if torandq then lq := Symmetric_Randomize(lp,fv,fw); qq := Laurent_to_Polynomial_System(lq); q := qq; put(gft,qq); else lq := lp; q := p; end if; lifted_lq := Perform_Lifting(n,mix,lifpts,lq); if allperms then qqsols := Symmetric_Mixed_Solve (file,signsym,lifted_lq,gensub,n,mix); else qqsols := Symmetric_Mixed_Solve (file,fv,signsym,lifted_lq,gensub,n,mix); end if; tstop(timer); new_line(file); put(file,qqsols); if torandq then new_line(gft); put_line(gft,"THE GENERATING SOLUTIONS :"); new_line(gft); put(gft,Length_Of(qqsols),n,qqsols); Close(gft); else put(solsft,Length_Of(qqsols),n,qqsols); Close(solsft); end if; new_line(file); print_times(file,timer,"Symmetric polyhedral continuation"); qsols := qqsols; end Symmetric_Polyhedral_Continuation; procedure Main_Driver is n : constant natural := p'length; timer : timing_widget; notsym : boolean; pv,pw,fv,fw : List_of_Permutations; igencells : Integer_Mixed_Subdivisions.Mixed_Subdivision; fgencells : Float_Mixed_Subdivisions.Mixed_Subdivision; mix : Integer_Vectors.Link_to_Vector; permp : Poly_Sys(p'range); points,iliforb : Arrays_of_Integer_Vector_Lists.Array_of_Lists(p'range); fliforb : Arrays_of_Float_Vector_Lists.Array_of_Lists(p'range); fltlif : boolean; ilifpts : Arrays_of_Integer_Vector_Lists.Link_to_Array_of_Lists; flifpts : Arrays_of_Float_Vector_Lists.Link_to_Array_of_Lists; begin new_line; put_line(welcome); tstart(timer); Read_Symmetry(n,pv,pw,fv,fw,notsym); if notsym then put_line("The given system is not symmetric !"); put_line(file,"The given system is not symmetric !"); else points := Construct_Power_Lists(p); Data_Management(n,points,pv,pw,fv,fw,fltlif,mix,igencells,permp); if compmisu then Classify_and_Lift_Orbits (file,mix.all,points,pv,pw,fltlif,iliforb,fliforb); end if; Settings_for_Polyhedral_Continuation; tstart(timer); if fltlif then Generating_Mixed_Cells (file,n,points,pv,pw,mix.all,fliforb,flifpts,fgencells); else Generating_Mixed_Cells (file,n,points,pv,pw,mix.all,iliforb,ilifpts,igencells); if tosolve then Symmetric_Polyhedral_Continuation (file,permp,fv,fw,n,mix.all,ilifpts.all,igencells); end if; end if; end if; tstop(timer); new_line(file); print_times(file,timer,"All Computations"); end Main_Driver; begin Main_Driver; end Driver_for_Symmetric_Mixed_Volume_Computation; end Drivers_for_Symmetric_Lifting; SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_symmetric_lifting.ads' then echo shar: will not over-write existing file "'drivers_for_symmetric_lifting.ads'" else cat << "SHAR_EOF" > 'drivers_for_symmetric_lifting.ads' with text_io,Solutions; use text_io,Solutions; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; package Drivers_for_Symmetric_Lifting is procedure Symmetric_Lifting_Info; -- DESCRIPTION : -- Displays information on symmetric lifting on screen. procedure Driver_for_Symmetric_Mixed_Volume_Computation ( file : in file_type; p : in Poly_Sys; byebye : in boolean; q : out Poly_Sys; qsols : out Solution_List; mv : out natural ); -- DESCRIPTION : -- This procedure presents an interactive driver for the computation -- of the mixed volume of a symmetric polynomial system, based on the -- construction of a symmetric mixed subdivision. -- ON ENTRY : -- file a file to put useful statistics on; -- p a polynomial system; -- byebye if true, then a bye-bye message will appear on screen, -- if false, then no bye-bye. -- ON RETURN : -- q a start system with randomly choosen coefficients, -- which can be used in a coefficient homotopy; -- qsols the solutions of q; -- mv the BKK bound of p and the number of solutions of q. end Drivers_for_Symmetric_Lifting; SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_symmetric_set_structures.adb' then echo shar: will not over-write existing file "'drivers_for_symmetric_set_structures.adb'" else cat << "SHAR_EOF" > 'drivers_for_symmetric_set_structures.adb' with integer_io,Numbers_io; use integer_io,Numbers_io; with Communications_with_User; use Communications_with_User; with Timing_Package; use Timing_Package; with Floating_Point_Numbers; use Floating_Point_Numbers; with Solutions,Solutions_io; use Solutions,Solutions_io; with Orbits_of_Solutions; use Orbits_of_Solutions; with Natural_Vectors; use Natural_Vectors; with Permutations,Symmetry_Group; use Permutations,Symmetry_Group; with Symmetry_Group_io; use Symmetry_Group_io; with Symbol_Table,Symbol_Table_io; use Symbol_Table; with Set_Structure,Set_Structure_io; use Set_Structure; with Degree_Sets_Tables; use Degree_Sets_Tables; with Symbolic_Symmetry_Group_io; use Symbolic_Symmetry_Group_io; with Symmetric_Set_Structure; use Symmetric_Set_Structure; with Random_Product_System; with Random_Product_System_io; with Linear_Symmetric_Reduction; use Linear_Symmetric_Reduction; with Lists_of_Integer_Vectors_io; use Lists_of_Integer_Vectors_io; with Equivariant_Polynomial_Systems; use Equivariant_Polynomial_Systems; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Complex_Multivariate_Polynomials; with Complex_Multivariate_Polynomials_io; with Drivers_for_Symmetry_Group_io; use Drivers_for_Symmetry_Group_io; package body Drivers_for_Symmetric_Set_Structures is procedure Symmetric_Set_Structure_Info is i : array(1..5) of string(1..65); begin i(1):=" A symmetric generalized Bezout number is based on a symmetric"; i(2):="supporting set structure and allows to exploit permutation"; i(3):="symmetries in the system. The corresponding linear-product start"; i(4):="system has the same symmetric structure, so that in the homotopy,"; i(5):="only the generating solution paths need to be traced. "; for k in i'range loop put_line(i(k)); end loop; end Symmetric_Set_Structure_Info; procedure Driver_for_Symmetric_Random_Product_Systems ( file : in file_type; p : in Poly_Sys; q : out Poly_Sys; qsols : out Solution_List; bs : in out natural; lpos : in out List ) is tol : constant double_float := 10.0**(-12); procedure Write_Results ( file : in file_type; bb : in natural ) is begin new_line(file); put(file," generalized Bezout number is "); put(file,bb,1); new_line(file); put_line(file," based on the set structure :"); Set_Structure_io.put(file); end Write_Results; procedure Save_Results ( qq : in Poly_Sys; qqsols : in Solution_List ) is qqfile : file_type; begin if not Is_Null(qqsols) then new_line; put_line("Reading file name to write start system."); Read_Name_and_Create_File(qqfile); put_line(qqfile,qq); new_line(qqfile); put_line(qqfile,"THE SOLUTIONS : "); new_line(qqfile); put(qqfile,Length_Of(qqsols),Head_Of(qqsols).n,qqsols); Close(qqfile); end if; end Save_Results; procedure Write_Orbits ( file : in file_type; qqsols : in Solution_List ) is orb : constant Permutation := Orbits(qqsols,tol); begin new_line; put("The number of generating solutions : "); put(Length_Of(qqsols),1); new_line; new_line(file); put(file,"The number of generating solutions : "); put(file,Length_Of(qqsols),1); new_line(file); put("The orbits : "); Symmetry_Group_io.put(orb); new_line; put(file,"The orbits : "); Symmetry_Group_io.put(file,orb); new_line(file); end Write_Orbits; procedure Driver_for_Bezout_Number ( file : in file_type ) is timer : timing_widget; ns : Natural_Vectors.Vector(p'range); begin put_line("Reading the set structure."); for i in ns'range loop put(" Give the number of sets for polynomial "); put(i,1); put(" : "); Read_Natural(ns(i)); end loop; Set_Structure.Init(ns); put_line("Give the set structure : "); Set_Structure_io.get; -- Set_Structure.B(bs,lpos); tstart(timer); bs := Permanent(Degree_Sets_Tables.Create); tstop(timer); Write_Results(file,bs); Write_Results(Standard_Output,bs); new_line(file); print_times(file,timer,"computation of generalized permanent"); end Driver_for_Bezout_Number; procedure Construct_Start_System ( file : in file_type; n : in natural; allperms : in boolean; v,w : List_of_Permutations; notsymmetric,degenerate : out boolean ) is timer : timing_widget; notequi,notsym,degen : boolean; begin tstart(timer); if allperms then Equivariant_Start_System(n,v,notequi); if notequi then new_line; new_line(file); put_line("The set structure is not equivariant."); put_line(file,"The set structure is not equivariant."); else notsym := false; degen := false; end if; end if; if not allperms or notequi then Symmetric_Start_System(n,bs,lpos,v,w,notsym,degen); new_line; new_line(file); if notsym then put_line("The set structure is not symmetric."); put_line(file,"The set structure is not symmetric."); else if degen then put_line("The set structure is symmetric but degenerate."); put_line(file, "The set structure is symmetric but degenerate."); else put_line("The set structure is symmetric and not degenerate."); put_line(file, "The set structure is symmetric and not degenerate."); end if; end if; end if; notsymmetric := notsym; degenerate := degen; tstop(timer); new_line(file); print_times(file,timer,"construction of symmetric start system"); end Construct_Start_System; procedure Solve_Start_System ( file : in file_type; allperms : in boolean; v,w : in List_of_Permutations ) is timer : timing_widget; nl : natural; qq : Poly_Sys(p'range); qqsols : Solution_List; begin -- Random_Product_System_io.put(file,n,2,4,3); qq := Random_Product_System.Polynomial_System; new_line(file); put_line(file,"SYMMETRIC LINEAR-PRODUCT SYSTEM : "); put_line(file,qq); -- put_line(file,"The list of positions : "); put(file,lpos); -- if allperms -- then Linear_Symmetric_Reduce(lpos,false); -- else Linear_Symmetric_Reduce(v,w,lpos); -- end if; tstart(timer); if allperms then lpos := Linear_Symmetric_Reduce(false); else lpos := Linear_Symmetric_Reduce(v,w); end if; -- put_line(file,"The reduced list of positions : "); put(file,lpos); Random_Product_System.Solve(qqsols,nl,lpos); tstop(timer); Random_Product_System.Clear; if allperms then qqsols := Generating(qqsols,false,tol); else Analyze(v,false,tol,qqsols); end if; Save_Results(qq,qqsols); new_line(file); put_line(file,"THE GENERATING SOLUTIONS :"); new_line(file); put(file,Length_Of(qqsols),Head_Of(qqsols).n,qqsols); Write_Orbits(file,qqsols); new_line(file); print_times(file,timer,"solving the linear-product system"); q := qq; qsols := qqsols; end Solve_Start_System; procedure Driver_for_Start_System ( file : in file_type; n : in natural; allperms : in boolean; v,w : List_of_Permutations ) is ans : character; notsym,degen : boolean; begin new_line; put("Do you want a symmetric linear-product start system ? "); Ask_Yes_or_No(ans); if ans = 'y' then Construct_Start_System(file,n,allperms,v,w,notsym,degen); -- new_line(file); Write_Covering(file); new_line(file); -- new_line(file); Write_Templates(file,n); new_line(file); -- Symmetric_Set_Structure.Clear; Set_Structure.Clear; if not notsym and not degen then Solve_Start_System(file,allperms,v,w); end if; end if; end Driver_for_Start_System; procedure Main_Driver is totaltimer : timing_widget; n : natural := p'length; allperms,notsym,inva,equi : boolean; g,v,w : List_of_Permutations; begin new_line(file); put_line(file,"SYMMETRIC SET STRUCTURE ANALYSIS :"); new_line(file); Read_Permutation_Group(n,g,v,allperms); tstart(totaltimer); put_line(file,"THE SYMMETRY GROUP :"); new_line(file); put_line(file,"v:"); Symbolic_Symmetry_Group_io.put(file,v); new_line(file); Act(v,p,w,notsym,inva,equi); new_line(file); put_line(file,"w:"); Symmetry_Group_io.put(file,w); new_line(file); if notsym then put_line("The system is not (G,V,W)-symmetric."); put_line(file,"The system is not (G,V,W)-symmetric."); else put_line("The system is (G,V,W)-symmetric."); put_line(file,"The system is (G,V,W)-symmetric."); if Set_Structure.Empty then Driver_for_Bezout_Number(file); end if; if not Set_Structure.Empty then Driver_for_Start_System(file,n,allperms,v,w); end if; end if; tstop(totaltimer); new_line(file); print_times(file,totaltimer,"symmetric set structure analysis"); end Main_Driver; begin Main_Driver; end Driver_for_Symmetric_Random_Product_Systems; end Drivers_for_Symmetric_Set_Structures; SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_symmetric_set_structures.ads' then echo shar: will not over-write existing file "'drivers_for_symmetric_set_structures.ads'" else cat << "SHAR_EOF" > 'drivers_for_symmetric_set_structures.ads' with text_io,Solutions; use text_io,Solutions; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; package Drivers_for_Symmetric_Set_Structures is procedure Symmetric_Set_Structure_Info; -- DESCRIPTION : -- Displays information on symmetric set structures on screen. procedure Driver_for_Symmetric_Random_Product_Systems ( file : in file_type; p : in Poly_Sys; q : out Poly_Sys; qsols : out Solution_List; bs : in out natural; lpos : in out List ); -- DESCRIPTION : -- Interactive driver for the construction of a -- (G,V,W)-symmetric random product start system. -- ON ENTRY : -- file output file to write diagnostics on; -- p a polynomial system; -- bs Bezout number based on the set structure; -- lpos list of positions. -- ON RETURN : -- q symmetric random linear-product start system; -- qsols solutions of q; -- bs Bezout number based on a symmetric set structure; -- lpos list of positions for the new set structure. end Drivers_for_Symmetric_Set_Structures; SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_symmetry_group_io.adb' then echo shar: will not over-write existing file "'drivers_for_symmetry_group_io.adb'" else cat << "SHAR_EOF" > 'drivers_for_symmetry_group_io.adb' with Communications_with_User; use Communications_with_User; with text_io,integer_io,Numbers_io; use text_io,integer_io,Numbers_io; with Symbol_Table,Symbol_Table_io; use Symbol_Table; with Symbolic_Symmetry_Group_io; package body Drivers_for_Symmetry_Group_io is procedure Read_Permutation_Group ( n : in natural; g,v : in out List_of_Permutations; allperms : out boolean ) is ans : character; nb : natural; begin new_line; put("Is the group the full permutation group ? (y/n) "); Ask_Yes_or_No(ans); allperms := (ans = 'y'); if ans = 'y' then g := SymGrp(n); else put("The neutral element of the group is represented as "); for i in 1..n loop declare sb : Symbol; begin sb := (sb'range => ' '); sb := Symbol_Table.Get(i); Symbol_Table_io.put(sb); put(" "); end; end loop; new_line; put("Give the number of generating elements in the group : "); Read_Natural(nb); put("Give "); put(nb,1); put_line(" vector representations of the generating elements :"); Symbolic_Symmetry_Group_io.Get(g,n,nb); end if; put("Do you want the generation of the group ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then v := Generate(g); else v := g; end if; -- v = either full group or group supplied by user end Read_Permutation_Group; procedure Read_Symmetry_Group ( n : in natural; g,v : in out List_of_Permutations; allperms,signsym,allsigns : out boolean ) is ans : character; nb : natural; pv,fv,fg : List_of_Permutations; begin Read_Permutation_Group(n,pv,fv,allperms); put("Is there any sign symmetry to take into account ? (y/n) "); Ask_Yes_or_No(ans); signsym := (ans = 'y'); if ans = 'y' then put("Contains the group all sign permutations ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then allsigns := true; else allsigns := false; signsym := false; -- fv will contain these permutations allperms := false; -- fv will be used for the generating solutions put("The sign inversion of all elements is represented as "); for i in 1..n loop put('-'); declare sb : Symbol; begin sb := (sb'range => ' '); sb := Symbol_Table.get(i); Symbol_Table_io.put(sb); put(" "); end; end loop; new_line; put("Give the number of generating elements in the group : "); Read_Natural(nb); put("Give "); put(nb,1); put_line(" vector representations of the generating elements :"); Symbolic_Symmetry_Group_io.Get(fg,n,nb); end if; put("Do you want the generation of the group ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then fv := Generate(Union(fg,pv)); else fv := Union(fg,pv); end if; else allsigns := false; end if; g := Union(fg,pv); v := fv; end Read_Symmetry_Group; end Drivers_for_Symmetry_Group_io; SHAR_EOF fi # end of overwriting check if test -f 'drivers_for_symmetry_group_io.ads' then echo shar: will not over-write existing file "'drivers_for_symmetry_group_io.ads'" else cat << "SHAR_EOF" > 'drivers_for_symmetry_group_io.ads' with Symmetry_Group; use Symmetry_Group; package Drivers_for_Symmetry_Group_io is -- DESCRIPTION : -- This package offers two interactive drivers for the input of -- a symmetry group. procedure Read_Permutation_Group ( n : in natural; g,v : in out List_of_Permutations; allperms : out boolean ); -- DESCRIPTION : -- Reads a permutation group, generated by the permutations in g. -- ON ENTRY : -- n dimension of the vector space. -- ON RETURN : -- g generating list of permutations; -- v the full list of permutations, if requested, -- otherwise v = g; -- allperms if true, then g generates the full permutation group. procedure Read_Symmetry_Group ( n : in natural; g,v : in out List_of_Permutations; allperms,signsym,allsigns : out boolean ); -- DESCRIPTION : -- Reads first a permutation group, and in addition to this allows to -- enter sign permutations. The parameters have the same meaning as the -- ones listed above. Only the additional parameters will be specified. -- ON RETURN : -- signsym if true, then g contains sign permutations; -- allsigns if true, then g generates the full sign permutation group. end Drivers_for_Symmetry_Group_io; SHAR_EOF fi # end of overwriting check if test -f 'equivariant_polynomial_systems.adb' then echo shar: will not over-write existing file "'equivariant_polynomial_systems.adb'" else cat << "SHAR_EOF" > 'equivariant_polynomial_systems.adb' with Permutations,Permute_Operations; use Permutations,Permute_Operations; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; package body Equivariant_Polynomial_Systems is procedure Act ( v : in List_of_Permutations; s : in Poly_Sys; w : in out List_of_Permutations; fail,inva,equi : out boolean ) is min_s : Poly_Sys(s'range); last_w : List_of_Permutations; wrkinva,wrkequi : boolean; procedure Process ( p : in Permutation; cont : in out boolean ) is ps : Poly; -- the permuted polynomial pp : Permutation(p'range); begin for i in s'range loop ps := p*s(i); pp(i) := p'last+1; for j in s'range loop if Equal(ps,s(j)) then pp(i) := j; elsif Equal(ps,min_s(j)) then pp(i) := -j; end if; end loop; if pp(i) = p'last+1 then fail := true; end if; Clear(ps); end loop; if wrkinva then for j in pp'range loop wrkinva := (pp(j) = j); exit when not wrkinva; end loop; end if; if wrkequi then wrkequi := Equal(pp,p); end if; Append(w,last_w,pp); cont := true; end Process; procedure Act_of_Permutations is new Iterator(Process); begin min_s := -s; fail := false; wrkinva := true; wrkequi := true; Act_of_Permutations(v); inva := wrkinva; equi := wrkequi; Clear(min_s); end Act; function Symmetric ( s : Poly_Sys; v,w : List_of_Permutations ) return boolean is lw,plw,pw : List_of_Permutations; fail,inva,equi : boolean; begin Act(v,s,lw,fail,inva,equi); pw := w; plw := lw; while not Is_Null(plw) loop if not Equal(Permutation(Head_Of(plw).all),Permutation(Head_Of(pw).all)) then Clear(lw); return false; else plw := Tail_Of(plw); pw := Tail_Of(pw); end if; end loop; Clear(lw); return true; end Symmetric; end Equivariant_Polynomial_Systems; SHAR_EOF fi # end of overwriting check if test -f 'equivariant_polynomial_systems.ads' then echo shar: will not over-write existing file "'equivariant_polynomial_systems.ads'" else cat << "SHAR_EOF" > 'equivariant_polynomial_systems.ads' with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Symmetry_Group; use Symmetry_Group; package Equivariant_Polynomial_Systems is -- DESCRIPTION : -- This package contains procedures for, given a group representation V, -- to compute the associated representation W, of a (G,V,W)-symmetric -- polynomial system. procedure Act ( v : in List_of_Permutations; s : in Poly_Sys; w : in out List_of_Permutations; fail,inva,equi : out boolean ); -- DESCRIPTION : -- Each permutation of the list v will be applied on the system s; -- the list w contains the results of each permutation. -- ON ENTRY : -- v a list of permutations; -- s a polynomial system. -- ON RETURN : -- w a list of Natural_Vectors x -- x(i) = j, where j indicates the index of the -- resulting polynomial of s, after permutation, -- if j = n+1, then the permuted polynomial did not belong to s -- and fail will be true on return; -- fail true if the system is not (G,V,W)-symmetric, false otherwise; -- inva true, if every polynomial in the system remains invariant, -- i.e.: Permute(s(i),p) = s(i), with i in s'range, -- for every permutation p, false otherwise; -- equi true, if v = w, false otherwise. function Symmetric ( s : Poly_Sys; v,w : List_of_Permutations ) return boolean; -- DESCRIPTION : -- This routine returns true if s is (G,V,W)-symmetric, -- it returns false when s is (G,V,W)-symmetric. -- ON ENTRY : -- s a polynomial system; -- v,w representations of the group. end Equivariant_Polynomial_Systems; SHAR_EOF fi # end of overwriting check if test -f 'faces_of_symmetric_polytopes.adb' then echo shar: will not over-write existing file "'faces_of_symmetric_polytopes.adb'" else cat << "SHAR_EOF" > 'faces_of_symmetric_polytopes.adb' with Permutations,Permute_Operations; use Permutations,Permute_Operations; with Integer_Vectors; use Integer_Vectors; with Integer_Vectors_of_Vectors; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Permutations_of_Faces; use Permutations_of_Faces; package body Faces_of_Symmetric_Polytopes is -- ON FACES : group * faces -> invariant subgroup function Stabilizer ( v : List_of_Permutations; f : Face ) return List_of_Permutations is tmp,res,res_last : List_of_Permutations; begin tmp := v; while not Is_Null(tmp) loop declare p : constant Permutation := Permutation(Head_Of(tmp).all); pf : Face := Permute(f,p); begin if Is_Equal(f,pf) then Append(res,res_last,p); end if; Deep_Clear(pf); end; tmp := Tail_Of(tmp); end loop; return res; end Stabilizer; function Stabilizer_Lifted ( v : List_of_Permutations; f : Face ) return List_of_Permutations is tmp,res,res_last : List_of_Permutations; begin tmp := v; while not Is_Null(tmp) loop declare p : constant Permutation := Permutation(Head_Of(tmp).all); pf : Face := Permute_Lifted(f,p); begin if Is_Equal(f,pf) then Append(res,res_last,p); end if; Deep_Clear(pf); end; tmp := Tail_Of(tmp); end loop; return res; end Stabilizer_Lifted; -- ON FACES : group * faces -> invariant faces function Invariant_Faces ( v : List_of_Permutations; f : Faces ) return Faces is tmpf,res,res_last : Faces; tmpv : List_of_Permutations; inva : boolean; begin tmpf := f; while not Is_Null(tmpf) loop inva := false; declare ff : Face := Head_Of(tmpf); cf : Face; begin tmpv := v; while not Is_Null(tmpv) loop inva := Invariant(ff,Permutation(Head_Of(tmpv).all)); exit when not inva; tmpv := Tail_Of(tmpv); end loop; if inva then Copy(ff,cf); Append(res,res_last,cf); end if; end; tmpf := Tail_Of(tmpf); end loop; return res; end Invariant_Faces; function Invariant_Lifted_Faces ( v : List_of_Permutations; f : Faces ) return Faces is tmpf,res,res_last : Faces; tmpv : List_of_Permutations; inva : boolean; begin tmpf := f; while not Is_Null(tmpf) loop inva := false; declare ff : Face := Head_Of(tmpf); cf : Face; begin tmpv := v; while not Is_Null(tmpv) loop inva := Invariant_Lifted(ff,Permutation(Head_Of(tmpv).all)); exit when not inva; tmpv := Tail_Of(tmpv); end loop; if inva then Copy(ff,cf); Append(res,res_last,cf); end if; end; tmpf := Tail_Of(tmpf); end loop; return res; end Invariant_Lifted_Faces; -- ON FACES : group * faces -> generated faces function Generated_Faces ( v : List_of_Permutations; f : Faces ) return Faces is tmp,res,res_last : Faces; begin return res; end Generated_Faces; function Generated_Lifted_Faces ( v : List_of_Permutations; f : Faces ) return Faces is tmp,res,res_last : Faces; begin return res; end Generated_Lifted_Faces; -- ON FACES : group * faces -> generating faces function Generating_Faces ( f : Faces ) return Faces is tmp,res,res_last : Faces; lf : Face; begin tmp := f; while not Is_Null(tmp) loop lf := Head_Of(tmp); if not Permutable(lf,res) then Append(res,res_last,lf); end if; tmp := Tail_Of(tmp); end loop; return res; end Generating_Faces; function Generating_Lifted_Faces ( f : Faces ) return Faces is tmp,res,res_last : Faces; lf : Face; begin tmp := f; while not Is_Null(tmp) loop lf := Head_Of(tmp); if not Permutable_Lifted(lf,res) then Append(res,res_last,lf); end if; tmp := Tail_Of(tmp); end loop; return res; end Generating_Lifted_Faces; function Generating_Faces ( v : List_of_Permutations; f : Faces ) return Faces is tmp,res,res_last : Faces; tmpv : List_of_Permutations; found : boolean; lf : Face; begin tmp := f; while not Is_Null(tmp) loop lf := Head_Of(tmp); tmpv := v; while not Is_Null(tmpv) loop declare pv : constant Permutation := Permutation(Head_Of(tmpv).all); begin found := Is_In(res,Permute(lf,pv)); end; exit when found; tmpv := Tail_Of(tmpv); end loop; if not found then Append(res,res_last,lf); end if; tmp := Tail_Of(tmp); end loop; return res; end Generating_Faces; function Generating_Lifted_Faces ( v : List_of_Permutations; f : Faces ) return Faces is tmp,res,res_last : Faces; tmpv : List_of_Permutations; found : boolean; lf : Face; begin tmp := f; while not Is_Null(tmp) loop lf := Head_Of(tmp); tmpv := v; while not Is_Null(tmpv) loop declare pv : constant Permutation := Permutation(Head_Of(tmpv).all); begin found := Is_In(res,Permute_Lifted(lf,pv)); end; exit when found; tmpv := Tail_Of(tmpv); end loop; if not found then Append(res,res_last,lf); end if; tmp := Tail_Of(tmp); end loop; return res; end Generating_Lifted_Faces; -- ON TUPLES OF FACES : group * faces -> invariant faces function Invariant_Faces ( v : List_of_Permutations; af : Array_of_Faces ) return Array_of_Faces is res : Array_of_Faces(af'range); begin for i in res'range loop res(i) := Invariant_Faces(v,af(i)); end loop; return res; end Invariant_Faces; function Invariant_Lifted_Faces ( v : List_of_Permutations; af : Array_of_Faces ) return Array_of_Faces is res : Array_of_Faces(af'range); begin for i in res'range loop res(i) := Invariant_Lifted_Faces(v,af(i)); end loop; return res; end Invariant_Lifted_Faces; -- ON TUPLES OF FACES : group * faces -> generators of faces function Generating_Faces ( af : Array_of_Faces ) return Array_of_Faces is res,res_last : Array_of_Faces(af'range); tmp : Faces; lf : Face; found : boolean; begin for i in af'range loop tmp := af(i); while not Is_Null(tmp) loop lf := Head_Of(tmp); for j in res'range loop found := Permutable(lf,res(j)); exit when found; end loop; if not found then Append(res(i),res_last(i),lf); end if; tmp := Tail_Of(tmp); end loop; end loop; return res; end Generating_Faces; function Generating_Lifted_Faces ( af : Array_of_Faces ) return Array_of_Faces is res,res_last : Array_of_Faces(af'range); tmp : Faces; lf : Face; found : boolean; begin for i in af'range loop tmp := af(i); while not Is_Null(tmp) loop lf := Head_Of(tmp); for j in res'range loop found := Permutable_Lifted(lf,res(j)); exit when found; end loop; if not found then Append(res(i),res_last(i),lf); end if; tmp := Tail_Of(tmp); end loop; end loop; return res; end Generating_Lifted_Faces; function Generating_Faces ( v : List_of_Permutations; af : Array_of_Faces ) return Array_of_Faces is res : Array_of_Faces(af'range); begin for i in res'range loop res(i) := Generating_Faces(v,af(i)); end loop; return res; end Generating_Faces; function Generating_Lifted_Faces ( v : List_of_Permutations; af : Array_of_Faces ) return Array_of_Faces is res : Array_of_Faces(af'range); begin for i in res'range loop res(i) := Generating_Lifted_Faces(v,af(i)); end loop; return res; end Generating_Lifted_Faces; function Generating_Faces ( v,w : List_of_Permutations; af : Array_of_Faces ) return Array_of_Faces is res,res_last : Array_of_Faces(af'range); tmp : Faces; lf : Face; found : boolean; tmpv,tmpw : List_of_Permutations; begin for i in af'range loop tmp := af(i); while not Is_Null(tmp) loop lf := Head_Of(tmp); tmpv := v; tmpw := w; while not Is_Null(tmpv) loop declare pv : constant Permutation := Permutation(Head_Of(tmpv).all); pw : constant Permutation := Permutation(Head_Of(tmpw).all); begin found := Is_In(res(pw(i)),Permute(lf,pv)); end; exit when found; tmpv := Tail_Of(tmpv); tmpw := Tail_Of(tmpw); end loop; if not found then Append(res(i),res_last(i),lf); end if; tmp := Tail_Of(tmp); end loop; end loop; return res; end Generating_Faces; function Generating_Lifted_Faces ( v,w : List_of_Permutations; af : Array_of_Faces ) return Array_of_Faces is res,res_last : Array_of_Faces(af'range); tmp : Faces; lf : Face; found : boolean; tmpv,tmpw : List_of_Permutations; begin for i in af'range loop tmp := af(i); while not Is_Null(tmp) loop lf := Head_Of(tmp); tmpv := v; tmpw := w; while not Is_Null(tmpv) loop declare pv : constant Permutation := Permutation(Head_Of(tmpv).all); pw : constant Permutation := Permutation(Head_Of(tmpw).all); begin found := Is_In(res(pw(i)),Permute_Lifted(lf,pv)); end; exit when found; tmpv := Tail_Of(tmpv); tmpw := Tail_Of(tmpw); end loop; if not found then Append(res(i),res_last(i),lf); end if; tmp := Tail_Of(tmp); end loop; end loop; return res; end Generating_Lifted_Faces; end Faces_of_Symmetric_Polytopes; SHAR_EOF fi # end of overwriting check if test -f 'faces_of_symmetric_polytopes.ads' then echo shar: will not over-write existing file "'faces_of_symmetric_polytopes.ads'" else cat << "SHAR_EOF" > 'faces_of_symmetric_polytopes.ads' with Integer_Faces_of_Polytope; use Integer_Faces_of_Polytope; with Symmetry_Group; use Symmetry_Group; package Faces_of_Symmetric_Polytopes is -- DESCRIPTION : -- This package contains some routines to construct the tuple of -- generating faces of symmetric polytopes. -- When the group representation is not given as parameter, -- full permutation symmetry is assumed. -- If `Lifted'-routines are called, then the permutations will leave -- the lifting value invariant. -- ON A FACE : group * faces -> invariant subgroup function Stabilizer ( v : List_of_Permutations; f : Face ) return List_of_Permutations; function Stabilizer_Lifted ( v : List_of_Permutations; f : Face ) return List_of_Permutations; -- DESCRIPTION : -- Returns those permutations that leave the face invariant. -- ON FACES : group * faces -> invariant faces function Invariant_Faces ( v : List_of_Permutations; f : Faces ) return Faces; function Invariant_Lifted_Faces ( v : List_of_Permutations; f : Faces ) return Faces; -- DESCRIPTION : -- Returns those faces which are invariant under the permutations. -- To check this for the full permutation group, the list of -- generators of the group should be supplied. -- ON FACES : group * faces -> generated faces function Generated_Faces ( v : List_of_Permutations; f : Faces ) return Faces; function Generated_Lifted_Faces ( v : List_of_Permutations; f : Faces ) return Faces; -- DESCRIPTION : -- Returns those faces that generate all faces in f. -- For the full permutation group, supply the generators of the group. -- ON FACES : group * faces -> generators of faces function Generating_Faces ( f : Faces ) return Faces; function Generating_Faces ( v : List_of_Permutations; f : Faces ) return Faces; function Generating_Lifted_Faces ( f : Faces ) return Faces; function Generating_Lifted_Faces ( v : List_of_Permutations; f : Faces ) return Faces; -- DESCRIPTION : -- Returns those faces that generate all faces in f. -- ON TUPLES OF FACES : group * faces -> invariant faces function Invariant_Faces ( v : List_of_Permutations; af : Array_of_Faces ) return Array_of_Faces; function Invariant_Lifted_Faces ( v : List_of_Permutations; af : Array_of_Faces ) return Array_of_Faces; -- DESCRIPTION : -- Returns for each component those faces which are invariant under the -- permutations. To check this for the full permutation group, the list -- of generators of the group should be supplied. -- It is assumed that the tuple is invariant under v. -- ON TUPLES OF FACES : group * faces -> generators of faces function Generating_Faces ( af : Array_of_Faces ) return Array_of_Faces; function Generating_Faces ( v : List_of_Permutations; af : Array_of_Faces ) return Array_of_Faces; function Generating_Faces ( v,w : List_of_Permutations; af : Array_of_Faces ) return Array_of_Faces; function Generating_Lifted_Faces ( af : Array_of_Faces ) return Array_of_Faces; function Generating_Lifted_Faces ( v : List_of_Permutations; af : Array_of_Faces ) return Array_of_Faces; function Generating_Lifted_Faces ( v,w : List_of_Permutations; af : Array_of_Faces ) return Array_of_Faces; -- DESCRIPTION : -- Returns the generating faces of the tuple. When w is left out, -- it is assumed that the tuple is invariant. When both v and w are not -- supplied, then it is assumed that the tuple is equi-invariant w.r.t. -- the full permutation group. end Faces_of_Symmetric_Polytopes; SHAR_EOF fi # end of overwriting check if test -f 'generating_mixed_cells.adb' then echo shar: will not over-write existing file "'generating_mixed_cells.adb'" else cat << "SHAR_EOF" > 'generating_mixed_cells.adb' with Floating_Point_Numbers; use Floating_Point_Numbers; with Float_Vectors; with Permutations; use Permutations; with Permute_Operations; use Permute_Operations; with Lists_of_Integer_Vectors; with Lists_of_Float_Vectors; with Arrays_of_Integer_Vector_Lists; with Arrays_of_Float_Vector_Lists; with Mixed_Volume_Computation; use Mixed_Volume_Computation; package body Generating_Mixed_Cells is -- FIRST TARGET ROUTINE : function Permute ( l : Lists_of_Integer_Vectors.List; p : Permutation ) return Lists_of_Integer_Vectors.List is -- DESCRIPTION : -- Applies the permutation p to all elements in the list l. use Lists_of_Integer_Vectors; tmp,res,res_last : List; begin tmp := l; while not Is_Null(tmp) loop declare plv,lv : Integer_Vectors.Link_to_Vector; begin lv := Head_Of(tmp); plv := new Integer_Vectors.Vector'(p*lv.all); plv(plv'last) := lv(lv'last); -- same lifting ! Append(res,res_last,plv.all); Integer_Vectors.Clear(plv); end; tmp := Tail_Of(tmp); end loop; return res; end Permute; function Permute ( p : Permutation; mix : Vector; mic : Integer_Mixed_Subdivisions.Mixed_Cell ) return Integer_Mixed_Subdivisions.Mixed_Cell is -- DESCRIPTION : -- Permutes the components of mic.pts according to the permutation p. use Lists_of_Integer_Vectors; use Arrays_of_Integer_Vector_Lists; use Integer_Mixed_Subdivisions; res : Mixed_Cell; index : natural; begin res.nor := new Integer_Vectors.Vector'(mic.nor.all); res.pts := new Array_of_Lists(mic.pts'range); for k in res.pts'range loop index := Compute_Index(p(k),mix); Copy(mic.pts(index),res.pts(k)); end loop; return res; end Permute; function Permute ( mic : Integer_Mixed_Subdivisions.Mixed_Cell; p : Permutation ) return Integer_Mixed_Subdivisions.Mixed_Cell is -- DESCRIPTION : -- Applies permutation p on the mixed cell mic. use Arrays_of_Integer_Vector_Lists; use Integer_Mixed_Subdivisions; res : Mixed_Cell; begin res.nor := new Integer_Vectors.Vector'(p*mic.nor.all); res.nor(res.nor'last) := mic.nor(mic.nor'last); res.pts := new Array_of_Lists(mic.pts'range); for k in mic.pts'range loop res.pts(k) := Permute(mic.pts(k),p); end loop; return res; end Permute; procedure Permute_and_Append ( v,w : in List_of_Permutations; mic : in Integer_Mixed_Subdivisions.Mixed_Cell; mix : in Vector; mixsub,mixsub_last : in out Integer_Mixed_Subdivisions.Mixed_Subdivision ) is -- DESCRIPTION : -- Applies all permutations to the mixed cell and appends the results. use Integer_Mixed_Subdivisions; lv,lw : List_of_Permutations; begin lv := v; lw := w; while not Is_Null(lv) loop declare vmic,wmic : Mixed_Cell; begin vmic := Permute(mic,Permutation(Head_Of(lv).all)); wmic := Permute(Permutation(Head_Of(lw).all),mix,vmic); Deep_Clear(vmic); if not Is_In(mixsub,wmic.nor.all) then Append(mixsub,mixsub_last,wmic); end if; end; lv := Tail_Of(lv); lw := Tail_Of(lw); end loop; end Permute_and_Append; function Generating_Cells ( v,w : List_of_Permutations; mix : Vector; mixsub : Integer_Mixed_Subdivisions.Mixed_Subdivision ) return Integer_Mixed_Subdivisions.Mixed_Subdivision is use Integer_Mixed_Subdivisions; tmp,res,res_last,done,done_last : Mixed_Subdivision; begin tmp := mixsub; while not Is_Null(tmp) loop declare mic : Mixed_Cell := Head_Of(tmp); begin if not Is_In(done,mic.nor.all) then Append(res,res_last,mic); Permute_and_Append(v,w,mic,mix,done,done_last); end if; end; tmp := Tail_Of(tmp); end loop; Clear(done); return res; end Generating_Cells; -- SECOND TARGET ROUTINE : function Permute ( l : Lists_of_Float_Vectors.List; p : Permutation ) return Lists_of_Float_Vectors.List is -- DESCRIPTION : -- Applies the permutation p to all elements in the list l. use Lists_of_Float_Vectors; tmp,res,res_last : List; begin tmp := l; while not Is_Null(tmp) loop declare plv,lv : Float_Vectors.Link_to_Vector; begin lv := Head_Of(tmp); plv := new Float_Vectors.Vector'(p*lv.all); plv(plv'last) := lv(lv'last); -- same lifting ! Append(res,res_last,plv.all); Float_Vectors.Clear(plv); end; tmp := Tail_Of(tmp); end loop; return res; end Permute; function Permute ( p : Permutation; mix : Vector; mic : Float_Mixed_Subdivisions.Mixed_Cell ) return Float_Mixed_Subdivisions.Mixed_Cell is -- DESCRIPTION : -- Permutes the components of mic.pts according to the permutation p. use Lists_of_Float_Vectors; use Arrays_of_Float_Vector_Lists; use Float_Mixed_Subdivisions; res : Mixed_Cell; index : natural; begin res.nor := new Float_Vectors.Vector'(mic.nor.all); res.pts := new Array_of_Lists(mic.pts'range); for k in res.pts'range loop index := Compute_Index(p(k),mix); Copy(mic.pts(index),res.pts(k)); end loop; return res; end Permute; function Permute ( mic : Float_Mixed_Subdivisions.Mixed_Cell; p : Permutation ) return Float_Mixed_Subdivisions.Mixed_Cell is -- DESCRIPTION : -- Applies permutation p on the mixed cell mic. use Arrays_of_Float_Vector_Lists; use Float_Mixed_Subdivisions; res : Mixed_Cell; begin res.nor := new Float_Vectors.Vector'(p*mic.nor.all); res.nor(res.nor'last) := mic.nor(mic.nor'last); res.pts := new Array_of_Lists(mic.pts'range); for k in mic.pts'range loop res.pts(k) := Permute(mic.pts(k),p); end loop; return res; end Permute; procedure Permute_and_Append ( v,w : in List_of_Permutations; mic : in Float_Mixed_Subdivisions.Mixed_Cell; mix : in Vector; mixsub,mixsub_last : in out Float_Mixed_Subdivisions.Mixed_Subdivision ) is -- DESCRIPTION : -- Applies all permutations to the mixed cell and appends the results. use Float_Mixed_Subdivisions; lv,lw : List_of_Permutations; begin lv := v; lw := w; while not Is_Null(lv) loop declare vmic,wmic : Mixed_Cell; begin vmic := Permute(mic,Permutation(Head_Of(lv).all)); wmic := Permute(Permutation(Head_Of(lw).all),mix,vmic); Deep_Clear(vmic); if not Is_In(mixsub,wmic.nor.all) then Append(mixsub,mixsub_last,wmic); end if; end; lv := Tail_Of(lv); lw := Tail_Of(lw); end loop; end Permute_and_Append; function Generating_Cells ( v,w : List_of_Permutations; mix : Vector; mixsub : Float_Mixed_Subdivisions.Mixed_Subdivision ) return Float_Mixed_Subdivisions.Mixed_Subdivision is use Float_Mixed_Subdivisions; tmp,res,res_last,done,done_last : Mixed_Subdivision; begin tmp := mixsub; while not Is_Null(tmp) loop declare mic : Mixed_Cell := Head_Of(tmp); begin if not Is_In(done,mic.nor.all) then Append(res,res_last,mic); Permute_and_Append(v,w,mic,mix,done,done_last); end if; end; tmp := Tail_Of(tmp); end loop; Clear(done); return res; end Generating_Cells; -- THIRD TARGET ROUTINE : function Generate_Cells ( v,w : List_of_Permutations; mix : Vector; mixsub : Integer_Mixed_Subdivisions.Mixed_Subdivision ) return Integer_Mixed_Subdivisions.Mixed_Subdivision is use Integer_Mixed_Subdivisions; tmp,res,res_last : Mixed_Subdivision; begin tmp := mixsub; while not Is_Null(tmp) loop declare mic : Mixed_Cell := Head_Of(tmp); begin Permute_and_Append(v,w,mic,mix,res,res_last); end; tmp := Tail_Of(tmp); end loop; return res; end Generate_Cells; function Exists_Permutation ( v1,v2 : Integer_Vectors.Link_to_Vector ) return boolean is -- DESCRIPTION : -- Returns true if there exists a permutation p: v1 = p*v1. begin if v1(v1'last) /= v2(v2'last) then return false; -- they must have the same lifted component ! else return Permutable(v1(v1'first..v1'last-1),v2(v2'first..v2'last-1)); end if; end Exists_Permutation; function Permutable ( mic : Integer_Mixed_Subdivisions.Mixed_Cell; mixsub : Integer_Mixed_Subdivisions.Mixed_Subdivision ) return boolean is use Integer_Mixed_Subdivisions; tmp : Mixed_Subdivision := mixsub; mic2 : Mixed_Cell; begin while not Is_Null(tmp) loop mic2 := Head_Of(tmp); if Exists_Permutation(mic.nor,mic2.nor) then return true; else tmp := Tail_Of(tmp); end if; end loop; return false; end Permutable; function Generating_Cells ( mixsub : Integer_Mixed_Subdivisions.Mixed_Subdivision ) return Integer_Mixed_Subdivisions.Mixed_Subdivision is use Integer_Mixed_Subdivisions; tmp,res,res_last : Mixed_Subdivision; mic : Mixed_Cell; begin tmp := mixsub; while not Is_Null(tmp) loop mic := Head_Of(tmp); if not Permutable(mic,res) then Append(res,res_last,mic); end if; tmp := Tail_Of(tmp); end loop; return res; end Generating_Cells; -- FOURTH TARGET ROUTINE : function Exists_Permutation ( v1,v2 : Float_Vectors.Link_to_Vector ) return boolean is -- DESCRIPTION : -- Returns true if there exists a permutation p: v1 = p*v1. begin if v1(v1'last) /= v2(v2'last) then return false; -- they must have the same lifted component ! else return Permutable(v1(v1'first..v1'last-1),v2(v2'first..v2'last-1)); end if; end Exists_Permutation; function Permutable ( mic : Float_Mixed_Subdivisions.Mixed_Cell; mixsub : Float_Mixed_Subdivisions.Mixed_Subdivision ) return boolean is use Float_Mixed_Subdivisions; tmp : Mixed_Subdivision := mixsub; mic2 : Mixed_Cell; begin while not Is_Null(tmp) loop mic2 := Head_Of(tmp); if Exists_Permutation(mic.nor,mic2.nor) then return true; else tmp := Tail_Of(tmp); end if; end loop; return false; end Permutable; function Generating_Cells ( mixsub : Float_Mixed_Subdivisions.Mixed_Subdivision ) return Float_Mixed_Subdivisions.Mixed_Subdivision is use Float_Mixed_Subdivisions; tmp,res,res_last : Mixed_Subdivision; mic : Mixed_Cell; begin tmp := mixsub; while not Is_Null(tmp) loop mic := Head_Of(tmp); if not Permutable(mic,res) then Append(res,res_last,mic); end if; tmp := Tail_Of(tmp); end loop; return res; end Generating_Cells; end Generating_Mixed_Cells; SHAR_EOF fi # end of overwriting check if test -f 'generating_mixed_cells.ads' then echo shar: will not over-write existing file "'generating_mixed_cells.ads'" else cat << "SHAR_EOF" > 'generating_mixed_cells.ads' with Symmetry_Group; use Symmetry_Group; with Integer_Vectors; use Integer_Vectors; with Integer_Mixed_Subdivisions; with Float_Mixed_Subdivisions; package Generating_Mixed_Cells is -- DESCRIPTION : -- Given a symmetric subdivision, the following routines return the -- generating cells in the subdivision. function Generating_Cells ( v,w : List_of_Permutations; mix : Vector; mixsub : Integer_Mixed_Subdivisions.Mixed_Subdivision ) return Integer_Mixed_Subdivisions.Mixed_Subdivision; -- DESCRIPTION : -- Extracts the generating cells from the (G,V,W)-symmetric subdivision, function Generating_Cells ( v,w : List_of_Permutations; mix : Vector; mixsub : Float_Mixed_Subdivisions.Mixed_Subdivision ) return Float_Mixed_Subdivisions.Mixed_Subdivision; -- DESCRIPTION : -- Extracts the generating cells from the (G,V,W)-symmetric subdivision, function Generating_Cells ( mixsub : Integer_Mixed_Subdivisions.Mixed_Subdivision ) return Integer_Mixed_Subdivisions.Mixed_Subdivision; -- DESCRIPTION : -- Extracts the generating mixed cells from mixsub, under the -- assumption that it is invariant under the full permutation group. function Generating_Cells ( mixsub : Float_Mixed_Subdivisions.Mixed_Subdivision ) return Float_Mixed_Subdivisions.Mixed_Subdivision; -- DESCRIPTION : -- Extracts the generating mixed cells from mixsub, under the -- assumption that it is invariant under the full permutation group. end Generating_Mixed_Cells; SHAR_EOF fi # end of overwriting check if test -f 'linear_symmetric_reduction.adb' then echo shar: will not over-write existing file "'linear_symmetric_reduction.adb'" else cat << "SHAR_EOF" > 'linear_symmetric_reduction.adb' with Permutations,Integer_Vectors; use Permutations,Integer_Vectors; with Random_Product_System; with Complex_Vectors,Permute_Operations; use Permute_Operations; with text_io,Integer_Vectors_io; use text_io,Integer_Vectors_io; with Complex_Vectors_io; use Complex_Vectors_io; package body Linear_Symmetric_Reduction is -- AUXILIARY DATA STRUCTURE AND OPERATIONS : type Lin_Sys is array(integer range <>) of Complex_Vectors.Link_to_Vector; -- ELEMENTARY OPERATIONS : function Linear_System ( pos : Vector ) return Lin_Sys is -- DESCRIPTION : -- Creates a linear system, by extracting the vectors that -- correspond to the entries in the given position. res : Lin_Sys(pos'range); use Random_Product_System; begin for k in res'range loop res(k) := Get_Hyperplane(k,pos(k)); end loop; return res; end Linear_System; function Permute ( p : Permutation; ls : Lin_Sys ) return Lin_Sys is -- DESCRIPTION : -- Permutes the equations in the linear system. res : Lin_Sys(ls'range); use Complex_Vectors; begin for i in p'range loop if p(i) >= 0 then res(i) := ls(p(i)); else res(i) := -ls(-p(i)); end if; end loop; return res; end Permute; function Permute ( ls : Lin_Sys; p : Permutation ) return Lin_Sys is -- DESCRIPTION : -- Permutes the unknowns in the linear system. res : Lin_Sys(ls'range); begin for k in res'range loop res(k) := new Complex_Vectors.Vector'(p*ls(k).all); end loop; return res; end Permute; function Permutable ( ls1,ls2 : Lin_Sys ) return boolean is -- DESCRIPTION : -- Returns true when there exists a permutation that permutes -- the first linear system into the second one. found : boolean := true; begin for i in ls1'range loop for j in ls2'range loop found := Permutable(ls1(i).all,ls2(j).all); exit when found; end loop; exit when not found; end loop; return found; end Permutable; function Sign_Permutable ( ls1,ls2 : Lin_Sys ) return boolean is -- DESCRIPTION : -- Returns true when there exists a permutation that permutes -- the first linear system into the second one, also w.r.t. sign -- permutations. found : boolean := true; begin for i in ls1'range loop for j in ls2'range loop found := Sign_Permutable(ls1(i).all,ls2(j).all); exit when found; end loop; exit when not found; end loop; return found; end Sign_Permutable; procedure Clear ( ls : in out Lin_Sys ) is -- DESCRIPTION : -- Deallocation of the occupied memory space. begin for k in ls'range loop Complex_Vectors.Clear(ls(k)); end loop; end Clear; -- UTILITIES : procedure Search_Permutable ( sub : in Lin_Sys; pos : in Vector; res,res_last : in out List ) is -- DESCRIPTION : -- In the list of positions, already in res, it will be searched -- whether there exists a linear system that is permutable with the -- given linear system. tmp : List := res; found : boolean := false; ls2 : Lin_Sys(sub'range); begin while not Is_Null(tmp) loop ls2 := Linear_System(Head_Of(tmp).all); found := Permutable(sub,ls2); exit when found; tmp := Tail_Of(tmp); end loop; if not found then Append(res,res_last,pos); end if; end Search_Permutable; procedure Search_Sign_Permutable ( sub : in Lin_Sys; pos : in Vector; res,res_last : in out List ) is -- DESCRIPTION : -- In the list of positions, already in res, it will be searched -- whether there exists a linear system that is sign permutable -- with the given linear system. tmp : List := res; found : boolean := false; ls2 : Lin_Sys(sub'range); begin while not Is_Null(tmp) loop ls2 := Linear_System(Head_Of(tmp).all); found := Sign_Permutable(sub,ls2); exit when found; tmp := Tail_Of(tmp); end loop; if not found then Append(res,res_last,pos); end if; end Search_Sign_Permutable; function Search_Position ( sub : Lin_Sys ) return Vector is -- DESCRIPTION : -- Returns the position of the system in the product system. res : Vector(sub'range); lh : Complex_Vectors.Link_to_Vector; begin for k in 1..Random_Product_System.Dimension loop res(k) := 0; for l in 1..Random_Product_System.Number_of_Hyperplanes(k) loop lh := Random_Product_System.Get_Hyperplane(k,l); -- put_line("Comparing "); put(sub(k).all); new_line; -- put_line("with"); put(lh.all); new_line; if Complex_Vectors.Equal(sub(k).all,lh.all) then res(k) := l; end if; exit when res(k) /= 0; end loop; end loop; return res; end Search_Position; procedure Permute_and_Search ( v,w : List_of_Permutations; sub : in Lin_Sys; pos : in Vector; res,res_last : in out List ) is -- DESCRIPTION : -- The permutations are applied to the subsystem. -- If none of the positions of the permuted systems already -- belongs to res, then its position pos will be added to res. lv,lw : List_of_Permutations; found : boolean := false; begin lv := v; lw := w; -- put_line("The permuted positions : "); while not Is_Null(lv) loop declare vpersub : Lin_Sys(sub'range) := Permute(sub,Permutation(Head_Of(lv).all)); wpersub : Lin_Sys(sub'range) := Permute(Permutation(Head_Of(lw).all),vpersub); perpos : Vector(pos'range) := Search_Position(wpersub); begin -- put(perpos); new_line; -- Clear(wpersub); responsible for storage_error if Is_In(res,perpos) then found := true; end if; end; exit when found; lv := Tail_Of(lv); lw := Tail_Of(lw); end loop; if not found then Append(res,res_last,pos); end if; end Permute_and_Search; function Generate_Positions return List is res,res_last : List; n : constant natural := Random_Product_System.Dimension; pos : Vector(1..n) := (1..n => 1); procedure Generate_Positions ( k : natural ) is begin if k > n then Append(res,res_last,pos); else for l in 1..Random_Product_System.Number_of_Hyperplanes(k) loop pos(k) := l; Generate_Positions(k+1); end loop; end if; end Generate_Positions; begin Generate_Positions(1); return res; end Generate_Positions; -- TARGET ROUTINES : function Linear_Symmetric_Reduce ( sign : boolean ) return List is res : List; begin res := Generate_Positions; Linear_Symmetric_Reduce(res,sign); return res; end Linear_Symmetric_Reduce; function Linear_Symmetric_Reduce ( v,w : List_of_Permutations ) return List is res : List; begin res := Generate_Positions; Linear_Symmetric_Reduce(v,w,res); return res; end Linear_Symmetric_Reduce; procedure Linear_Symmetric_Reduce ( lp : in out List; sign : in boolean ) is res,res_last : List; sub : Lin_Sys(1..Random_Product_System.Dimension); pos : Vector(sub'range); tlp : List := lp; begin while not Is_Null(tlp) loop pos := Head_Of(tlp).all; -- put("Testing position : "); put(pos); new_line; sub := Linear_System(pos); if not sign then Search_Permutable(sub,pos,res,res_last); else Search_Sign_Permutable(sub,pos,res,res_last); end if; tlp := Tail_Of(tlp); end loop; Clear(lp); lp := res; end Linear_Symmetric_Reduce; procedure Linear_Symmetric_Reduce ( v,w : in List_of_Permutations; lp : in out List ) is res,res_last : List; sub : Lin_Sys(1..Random_Product_System.Dimension); pos : Vector(sub'range); tlp : List := lp; begin while not Is_Null(tlp) loop pos := Head_Of(tlp).all; -- put("Testing position : "); put(pos); new_line; sub := Linear_System(pos); Permute_and_Search(v,w,sub,pos,res,res_last); tlp := Tail_Of(tlp); end loop; Clear(lp); lp := res; end Linear_Symmetric_Reduce; end Linear_Symmetric_Reduction; SHAR_EOF fi # end of overwriting check if test -f 'linear_symmetric_reduction.ads' then echo shar: will not over-write existing file "'linear_symmetric_reduction.ads'" else cat << "SHAR_EOF" > 'linear_symmetric_reduction.ads' with Symmetry_Group; use Symmetry_Group; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; package Linear_Symmetric_Reduction is -- DESCRIPTION : -- This package contains two routines that enable the faster -- solution of a symmetric product system, by extracting the -- generating positions. function Linear_Symmetric_Reduce ( sign : boolean ) return List; function Linear_Symmetric_Reduce ( v,w : List_of_Permutations ) return List; -- DESCRIPTION : -- Returns the generating list of positions in the random product system. -- REQUIRED : data in package Random_Product_System is not empty. procedure Linear_Symmetric_Reduce ( lp : in out List; sign : in boolean ); procedure Linear_Symmetric_Reduce ( v,w : in List_of_Permutations; lp : in out List ); -- DESCRIPTION : -- Given a (G,V,W)-symmetric product system, a list of positions -- that indicate the generating subsystems will be returned. -- REQUIRED : data in package Random_Product_System is not empty. -- ON ENTRY : -- v,w group representations, -- if not provided, then the full permutation group is assumed; -- sign if true, then there is also sign symmetry to consider; -- lp a list of positions, indicating the useful -- linear systems in the product system. -- ON RETURN : -- lp a sublist of the former list, -- contains only the generating linear systems. end Linear_Symmetric_Reduction; SHAR_EOF fi # end of overwriting check if test -f 'mainsmvc.adb' then echo shar: will not over-write existing file "'mainsmvc.adb'" else cat << "SHAR_EOF" > 'mainsmvc.adb' with Communications_with_User; use Communications_with_User; with text_io,integer_io,Solutions; use text_io,integer_io,Solutions; with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Polynomial_Systems_io; use Complex_Polynomial_Systems_io; with Root_Refiners; use Root_Refiners; with Drivers_for_Implicit_Lifting; use Drivers_for_Implicit_Lifting; with Drivers_for_Static_Lifting; use Drivers_for_Static_Lifting; with Drivers_for_Dynamic_Lifting; use Drivers_for_Dynamic_Lifting; with Drivers_for_Symmetric_Lifting; use Drivers_for_Symmetric_Lifting; procedure mainsmvc ( infilename,outfilename : in string ) is outft : file_type; lp : Link_to_Poly_Sys; ans : character; procedure Read_System ( filename : in string ) is file : file_type; n : natural; begin if filename /= "" then Open(file,in_file,filename); get(file,n); lp := new Poly_Sys(1..n); get(file,n,lp.all); Close(file); end if; exception when others => put_line("Something is wrong with argument file..."); lp := null; return; end Read_System; function Lifting_Strategy return natural is choice : string(1..2) := " "; begin loop new_line; put_line("MENU with available Lifting Strategies :"); put_line(" 1. Implicit lifting : based on recursive formula."); put_line(" 2. Static lifting : lift points and prune lower hull."); put_line(" 3. Dynamic lifting : incrementally add the points."); put_line (" 4. Symmetric lifting : points in same orbit get same lifting."); put("Type 1, 2, 3, or 4 to select lifting," & " eventually preceded by i for info : "); Ask_Alternative(choice,"1234",'i'); exit when choice(1) /= 'i'; new_line; case choice(2) is when '1' => Implicit_Lifting_Info; new_line; put("Do you want to apply implicit lifting ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then choice(1) := '1'; end if; when '2' => Static_Lifting_Info; new_line; put("Do you want to apply static lifting ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then choice(1) := '2'; end if; when '3' => Dynamic_Lifting_Info; new_line; put("Do you want to apply dynamic lifting ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then choice(1) := '3'; end if; when '4' => Symmetric_Lifting_Info; new_line; put("Do you want to apply implicit lifting ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then choice(1) := '4'; end if; when others => put_line("No information available."); end case; exit when choice(1) /= 'i'; end loop; case choice(1) is when '1' => return 1; when '2' => return 2; when '3' => return 3; when others => return 4; end case; end Lifting_Strategy; begin Read_System(infilename); if lp = null then new_line; get(lp); end if; declare q : Poly_Sys(lp'range); qsols : Solution_List; mv : natural; strategy : natural; begin Create_Output_File(outft,outfilename); put(outft,lp.all); strategy := Lifting_Strategy; new_line(outft); case strategy is when 1 => put_line(outft,"IMPLICIT LIFTING"); Driver_for_Mixture_Bezout_BKK(outft,lp.all,true,q,qsols,mv); when 2 => put_line(outft,"STATIC LIFTING"); Driver_for_Mixed_Volume_Computation (outft,lp.all,true,q,qsols,mv); when 3 => put_line(outft,"DYNAMIC LIFTING"); Driver_for_Dynamic_Mixed_Volume_Computation (outft,lp.all,true,q,qsols,mv); when others => put_line(outft,"SYMMETRIC LIFTING"); Driver_for_Symmetric_Mixed_Volume_Computation (outft,lp.all,true,q,qsols,mv); end case; if Length_Of(qsols) > 0 then declare epsxa,epsfa : constant double_float := 10.0**(-8); tolsing : constant double_float := 10.0**(-8); nb : natural := 0; begin new_line(outft); Reporting_Root_Refiner (outft,q,qsols,epsxa,epsfa,tolsing,nb,5,false); end; end if; Close(outft); end; end mainsmvc; SHAR_EOF fi # end of overwriting check if test -f 'mainsmvc.ads' then echo shar: will not over-write existing file "'mainsmvc.ads'" else cat << "SHAR_EOF" > 'mainsmvc.ads' procedure mainsmvc ( infilename,outfilename : in string ); -- DESCRIPTION : -- This procedure implements the dispatcher for the mvc tool -- by choosing the menu and calling the selected driver. -- The arguments are the names of the input and output files. SHAR_EOF fi # end of overwriting check if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' # Establishing the links : linkrc = ../../../Ada/Root_Counts/Symmetry links: @-ln -s $(linkrc)/drivsss.a drivers_for_symmetric_set_structures.ads @-ln -s $(linkrc)/drivsssB.a drivers_for_symmetric_set_structures.adb @-ln -s $(linkrc)/drivorbi.a drivers_for_orbits_of_solutions.ads @-ln -s $(linkrc)/drivorbiB.a drivers_for_orbits_of_solutions.adb @-ln -s $(linkrc)/drivgrp_io.a drivers_for_symmetry_group_io.ads @-ln -s $(linkrc)/drivgrp_ioB.a drivers_for_symmetry_group_io.adb @-ln -s $(linkrc)/equpsys.a equivariant_polynomial_systems.ads @-ln -s $(linkrc)/equpsysB.a equivariant_polynomial_systems.adb @-ln -s $(linkrc)/lsymred.a linear_symmetric_reduction.ads @-ln -s $(linkrc)/lsymredB.a linear_symmetric_reduction.adb @-ln -s $(linkrc)/orbits.a orbits_of_solutions.ads @-ln -s $(linkrc)/orbitsB.a orbits_of_solutions.adb @-ln -s $(linkrc)/orbits_io.a orbits_of_solutions_io.ads @-ln -s $(linkrc)/orbits_ioB.a orbits_of_solutions_io.adb @-ln -s $(linkrc)/perms.a permutations.ads @-ln -s $(linkrc)/permsB.a permutations.adb @-ln -s $(linkrc)/permops.a permute_operations.ads @-ln -s $(linkrc)/permopsB.a permute_operations.adb @-ln -s $(linkrc)/sbsymgrp_io.a symbolic_symmetry_group_io.ads @-ln -s $(linkrc)/sbsymgrp_ioB.a symbolic_symmetry_group_io.adb @-ln -s $(linkrc)/sym_ss.a symmetric_set_structure.ads @-ln -s $(linkrc)/sym_ssB.a symmetric_set_structure.adb @-ln -s $(linkrc)/symgrp.a symmetry_group.ads @-ln -s $(linkrc)/symgrpB.a symmetry_group.adb @-ln -s $(linkrc)/symgrp_io.a symmetry_group_io.ads @-ln -s $(linkrc)/symgrp_ioB.a symmetry_group_io.adb @-ln -s $(linkrc)/templates.a templates.ads @-ln -s $(linkrc)/templatesB.a templates.adb @-ln -s $(linkrc)/drivsyml.a driver_for_symmetric_lifting.ads @-ln -s $(linkrc)/drivsymlB.a driver_for_symmetric_lifting.adb @-ln -s $(linkrc)/facesypo.a faces_of_symmetric_polytopes.ads @-ln -s $(linkrc)/facesypoB.a faces_of_symmetric_polytopes.adb @-ln -s $(linkrc)/mainsmvc.a mainsmvc.ads @-ln -s $(linkrc)/mainsmvcB.a mainsmvc.adb @-ln -s $(linkrc)/faceperm.a permutations_of_faces.ads @-ln -s $(linkrc)/facepermB.a permutations_of_faces.adb @-ln -s $(linkrc)/symbkk.a symmetric_bkk_bound_solvers.ads @-ln -s $(linkrc)/symbkkB.a symmetric_bkk_bound_solvers.adb @-ln -s $(linkrc)/symlift.a symmetric_lifting_functions.ads @-ln -s $(linkrc)/symliftB.a symmetric_lifting_functions.adb @-ln -s $(linkrc)/sympolco.a symmetric_polyhedral_continuation.ads @-ln -s $(linkrc)/sympolcoB.a symmetric_polyhedral_continuation.adb @-ln -s $(linkrc)/gencells.a generating_mixed_cells.ads @-ln -s $(linkrc)/gencellsB.a generating_mixed_cells.adb @-ln -s $(linkrc)/symrand.a symmetric_randomize.ads @-ln -s $(linkrc)/symrandB.a symmetric_randomize.adb SHAR_EOF fi # end of overwriting check if test -f 'orbits_of_solutions.adb' then echo shar: will not over-write existing file "'orbits_of_solutions.adb'" else cat << "SHAR_EOF" > 'orbits_of_solutions.adb' with unchecked_deallocation; with Integer_Vectors; with Permute_Operations; use Permute_Operations; with Complex_Numbers,Complex_Vectors; use Complex_Numbers; package body Orbits_of_Solutions is -- AUXILIAIRIES : function Equal ( x,y : Complex_Vectors.Vector; tol : double_float ) return boolean is -- DESCRIPTION : -- Returns true if for all i : | x(i) - y(i) | <= tol. begin for i in x'range loop if modulus(x(i)-y(i)) > tol then return false; end if; end loop; return true; end Equal; function Equal_upon_Sign ( x,y : Complex_Vectors.Vector; tol : double_float ) return boolean is -- DESCRIPTION : -- Returns true if for all i : | x(i) +- y(i) | <= tol. begin for i in x'range loop if (modulus(x(i)-y(i)) > tol) and then (modulus(x(i)+y(i)) > tol) then return false; end if; end loop; return true; end Equal_upon_Sign; procedure Is_In ( sols : in out Solution_List; s : in Solution; sign : in boolean; tol : in double_float; isin : out boolean ) is -- DESCRIPTION : -- The output variable isin isin becomes true if one of the solutions -- in the list sols equals s. When this is the case, the multiplicity -- of the corresponding solution is augmented. -- Otherwise, isin equals false on return. s1 : Solution(s.n); temp : Solution_List; begin temp := sols; while not Is_Null(temp) loop s1 := Head_Of(temp).all; if (sign and then Equal_upon_Sign(s.v,s1.v,tol)) or else (not sign and then Equal(s.v,s1.v,tol)) then Head_Of(temp).m := Head_Of(temp).m + 1; isin := true; return; end if; temp := Tail_Of(temp); end loop; isin := false; end Is_In; -- CONSTRUCTORS : procedure Analyze ( l : in List_of_Permutations; sign : in boolean; tol : in double_float; sols : in out Solution_List ) is begin if not Is_Null(sols) then declare res,res_last,tmpsols : Solution_List; n : natural := Head_Of(sols).n; s1,s2 : Solution(n); lp : Link_to_Permutation; tmpl : List_of_Permutations; found : boolean; begin tmpsols := sols; while not Is_Null(tmpsols) loop s1 := Head_Of(tmpsols).all; tmpl := l; while not Is_Null(tmpl) loop lp := Head_Of(tmpl); s2.t := s1.t; s2.m := 1; s2.v := Permutation(lp.all)*s1.v; Is_In(res,s2,sign,tol,found); exit when found; tmpl := Tail_Of(tmpl); end loop; if not found then Append(res,res_last,s1); end if; tmpsols := Tail_Of(tmpsols); end loop; Clear(sols); sols := res; end; end if; end Analyze; function Permutable ( s : Solution; sign : boolean; tol : double_float; sols : Solution_List ) return boolean is -- DESCRIPTION : -- Returns true if the solutions s can be permuted into one of the -- solutions of the given list. tmp : Solution_List := sols; begin while not Is_Null(tmp) loop if sign and then Sign_Permutable(s.v,Head_Of(tmp).v,tol) then return true; elsif Permutable(s.v,Head_Of(tmp).v,tol) then return true; else tmp := Tail_Of(tmp); end if; end loop; return false; end Permutable; procedure Permutable ( s : in Solution; sign : in boolean; tol : in double_float; sols : in out Solution_List; isin : out boolean ) is -- DESCRIPTION : -- The output variable isin becomes true when the given solution can be -- permuted into one of the solutions of the given list. -- In this case, also the multiplicity of the corresponding solutions is -- augmented. Otherwise, isin is false on return. tmp : Solution_List := sols; ls1 : Link_to_Solution; begin while not Is_Null(tmp) loop ls1 := Head_Of(tmp); if (sign and then Sign_Permutable(s.v,ls1.v,tol)) or else (not sign and then Permutable(s.v,ls1.v,tol)) then isin := true; ls1.m := ls1.m + 1; Set_Head(tmp,ls1); return; else tmp := Tail_Of(tmp); end if; end loop; isin := false; end Permutable; function Generating ( sols : Solution_List; sign : boolean; tol : double_float ) return Solution_List is tmp,gensols,gensols_last : Solution_List; begin tmp := sols; while not Is_Null(tmp) loop declare ls : Link_to_Solution := Head_Of(tmp); isin : boolean; begin Permutable(ls.all,sign,tol,gensols,isin); if not isin then Append(gensols,gensols_last,ls.all); end if; end; tmp := Tail_Of(tmp); end loop; return gensols; end Generating; procedure Orbit_Structure ( s : in Solution; tol : in double_float; orbit : in out Permutation; nbdiff : out natural ) is nb : natural := 1; found : boolean; begin orbit(1) := nb; for i in 2..s.n loop found := false; for j in 1..(i-1) loop if modulus(s.v(i) - s.v(j)) < tol then orbit(i) := orbit(j); found := true; exit; end if; end loop; if not found then nb := nb + 1; orbit(i) := nb; end if; end loop; nbdiff := nb; end Orbit_Structure; function Orbits ( sols : Solution_List; tol : double_float ) return permutation is ind : natural; tmp : Solution_List := sols; n : natural := Head_Of(sols).n; o,orb : Permutation(1..n); sol : Solution(n); begin orb := (1..n => 0); o := orb; while not Is_Null(tmp) loop sol := Head_Of(tmp).all; Orbit_Structure(sol,tol,o,ind); orb(ind) := orb(ind) + sol.m; tmp := Tail_Of(tmp); end loop; return orb; end Orbits; procedure Orbits ( grp : in List_of_Permutations; tol : in double_float; sols : in out Solution_List; lorb : in out List_of_Orbits ) is tmp : Solution_List; n : natural := Head_Of(sols).n; begin Analyze(grp,false,tol,sols); tmp := sols; while not Is_Null(tmp) loop declare sol : Solution(n) := Head_Of(tmp).all; orbi : Orbit(n); begin Orbit_Structure(sol,tol,orbi.orb,orbi.nbdiff); orbi.nbgen := 1; orbi.nbsols := sol.m; declare tmp2 : List_of_Orbits := lorb; found : boolean := false; begin while not Is_Null(tmp2) loop declare orbi2 : Orbit(n) := Head_Of(tmp2).all; lorbi2 : Link_to_Orbit := Head_Of(tmp2); begin if orbi2.nbdiff = orbi.nbdiff and then Same_Orbit(orbi.orb,orbi2.orb) then lorbi2.nbgen := orbi2.nbgen + 1; lorbi2.nbsols := orbi2.nbsols + sol.m; found := true; exit; else tmp2 := Tail_Of(tmp2); end if; end; end loop; if not found then declare liorbi : Link_to_Orbit := new Orbit'(orbi); begin Construct(liorbi,lorb); end; end if; end; end; tmp := Tail_Of(tmp); end loop; end Orbits; -- SELECTOR : function Same_Orbit ( orb1,orb2 : Permutation ) return boolean is f1,f2 : Permutation(1..orb1'last); found : boolean; begin -- construct frequencies : f1 := (f1'range => 0); for i in orb1'range loop f1(orb1(i)) := f1(orb1(i)) + 1; end loop; f2 := (f2'range => 0); for i in orb2'range loop f2(orb2(i)) := f2(orb2(i)) + 1; end loop; -- compare the frequencies : for i in f1'range loop found := false; for j in f2'range loop if f1(i) = f2(j) then found := true; exit; end if; end loop; if not found then return false; end if; end loop; for i in f2'range loop found := false; for j in f1'range loop if f2(i) = f1(j) then found := true; exit; end if; end loop; if not found then return false; end if; end loop; return true; end Same_Orbit; -- DESTRUCTOR : procedure Clear ( lorb : in out List_of_Orbits ) is procedure free is new unchecked_deallocation(Orbit,Link_to_Orbit); tmp : List_of_Orbits := lorb; begin while not Is_Null(tmp) loop declare lior : Link_to_Orbit := Head_Of(tmp); begin free(lior); end; tmp := Tail_Of(tmp); end loop; Lists_of_Orbits.Clear(Lists_of_Orbits.List(lorb)); end Clear; end Orbits_of_Solutions; SHAR_EOF fi # end of overwriting check if test -f 'orbits_of_solutions.ads' then echo shar: will not over-write existing file "'orbits_of_solutions.ads'" else cat << "SHAR_EOF" > 'orbits_of_solutions.ads' with text_io; use text_io; with Lists; with Floating_Point_Numbers; use Floating_Point_Numbers; with Solutions; use Solutions; with Permutations,Symmetry_Group; use Permutations,Symmetry_Group; package Orbits_of_Solutions is -- DESCRIPTION : -- This package contains routines for manipulating the -- solutions set of a symmetric polynomial system. -- DATA STRUCTURES : type Orbit (n : natural) is record orb : Permutation(1..n); -- data representing the orbit -- e.g.: orb = [ 1 1 2 2 ] => solution is like (a,a,b,b) or (a,b,a,b) nbdiff : natural; -- number of different values nbgen : natural; -- number of generating solutions nbsols : natural; -- number of solutions in the orbit end record; type Link_to_Orbit is access Orbit; package Lists_of_Orbits is new Lists(Link_to_Orbit); type List_of_Orbits is new Lists_of_Orbits.List; -- CONSTRUCTORS : function Generating ( sols : Solution_List; sign : boolean; tol : double_float ) return Solution_List; -- DESCRIPTION : -- Returns a list of generating solutions, by permutations, all -- other solutions in sols can be derived from the resulting list. -- If sign is true, then also permutations who alter the sign of -- the components are tried. procedure Analyze ( l : in List_of_Permutations; sign : in boolean; tol : in double_float; sols : in out Solution_List ); -- DESCRIPTION : -- the solution list sols will be checked upon symmetry, according -- to the list of permutations l -- ON ENTRY : -- l a list of permutations; -- sign if true then sign symmetry has to be taken into account; -- tol tolerance to decide wether two solutions are equal; -- sols a list of solutions. -- ON RETURN : -- sols a list of solutions, where only one element per orbit -- is in the list; -- the multiplicity field is used to indicate the number -- of elements in the orbit. procedure Orbit_Structure ( s : in Solution; tol : in double_float; orbit : in out Permutation; nbdiff : out natural); -- DESCRIPTION : -- This procedure returns the structure of the orbit of the solution. -- ON ENTRY : -- s a solution; -- tol tolerance to decide wether two solutions are equal. -- ON RETURN : -- orbit orbit(i) = j means that x_i has the same value as x_j; -- nbdiff the number of different values in the orbit. function Orbits ( sols : Solution_List; tol : double_float ) return Permutation; -- DESCRIPTION : -- Let orb := Orbits(sols,tol), -- then orb(i) gives the number of solutions belonging to an orbit -- with i different values. -- ON ENTRY : -- sols a list of solutions; -- tol tolerance to decide wether two solutions are equal. procedure Orbits ( grp : in List_of_Permutations; tol : in double_float; sols : in out Solution_List; lorb : in out List_of_Orbits ); -- DESCRIPTION : -- The list of solutions will be analyzed according to the -- symmetry group. Together with the information on the orbits, -- the list of generating solutions will be produced. -- ON ENTRY : -- grp a list of permutations representing the symmetry group; -- tol used to compare two solutions; -- sols the list of solutions. -- ON RETURN : -- sols the generating list of solutions; -- lorb the list containing the information of the orbits. -- SELECTOR : function Same_Orbit ( orb1,orb2 : Permutation ) return boolean; -- DESCRIPTION : -- Returns true when the structures of the orbits are the same. -- For example : 1 1 1 2 = 1 2 1 1, but 1 1 2 2 /= 2 2 1 2. -- DESTRUCTOR : procedure Clear ( lorb : in out List_of_Orbits ); -- DESCRIPTION : -- All memory space allocated for lorb will be freed. end Orbits_of_Solutions; SHAR_EOF fi # end of overwriting check if test -f 'orbits_of_solutions_io.adb' then echo shar: will not over-write existing file "'orbits_of_solutions_io.adb'" else cat << "SHAR_EOF" > 'orbits_of_solutions_io.adb' with integer_io; use integer_io; package body Orbits_of_Solutions_io is procedure put ( lorb : in List_of_Orbits ) is tmp : List_of_Orbits; totgen,totsols : natural; begin tmp := lorb; if not Is_Null(lorb) then put_line("------------------------------------------------"); put_line("| ORBIT INFORMATION OF LIST OF SOLUTIONS |"); put_line("------------------------------------------------"); put_line("| TYPE | NB <> | NB GEN | NB SOLS |"); put_line("------------------------------------------------"); totgen := 0; totsols := 0; while not Is_Null(tmp) loop declare n : natural := Head_Of(tmp).n; orbi : Orbit(n) := Head_Of(tmp).all; begin put("| "); for i in orbi.orb'range loop put(orbi.orb(i),1); put(' '); end loop; for i in 1..(17-2*n) loop put(' '); end loop; put("| "); put(orbi.nbdiff,2); put(" | "); put(orbi.nbgen,2); totgen := totgen + orbi.nbgen; put(" | "); put(orbi.nbsols,3); totsols := totsols + orbi.nbsols; put_line(" |"); end; tmp := Tail_Of(tmp); end loop; put_line("------------------------------------------------"); put("| Total number of generating solutions : "); put(totgen,4); put_line(" |"); put("| Total number of solutions generated : "); put(totsols,4); put_line(" |"); put_line("------------------------------------------------"); end if; end put; procedure put ( file : in file_type; lorb : in List_of_Orbits ) is tmp : List_of_Orbits; totgen,totsols : natural; begin tmp := lorb; if not Is_Null(lorb) then put_line(file,"------------------------------------------------"); put_line(file,"| ORBIT INFORMATION OF LIST OF SOLUTIONS |"); put_line(file,"------------------------------------------------"); put_line(file,"| TYPE | NB <> | NB GEN | NB SOLS |"); put_line(file,"------------------------------------------------"); totgen := 0; totsols := 0; while not Is_Null(tmp) loop declare n : natural := Head_Of(tmp).n; orbi : Orbit(n) := Head_Of(tmp).all; begin put(file,"| "); for i in orbi.orb'range loop put(file,orbi.orb(i),1); put(file,' '); end loop; for i in 1..(17-2*n) loop put(file,' '); end loop; put(file,"| "); put(file,orbi.nbdiff,2); put(file," | "); put(file,orbi.nbgen,2); totgen := totgen + orbi.nbgen; put(file," | "); put(file,orbi.nbsols,3); totsols := totsols + orbi.nbsols; put_line(file," |"); end; tmp := Tail_Of(tmp); end loop; put_line(file,"------------------------------------------------"); put(file,"| Total number of generating solutions : "); put(file,totgen,4); put_line(file," |"); put(file,"| Total number of solutions generated : "); put(file,totsols,4); put_line(file," |"); put_line(file,"------------------------------------------------"); end if; end put; end Orbits_of_Solutions_io; SHAR_EOF fi # end of overwriting check if test -f 'orbits_of_solutions_io.ads' then echo shar: will not over-write existing file "'orbits_of_solutions_io.ads'" else cat << "SHAR_EOF" > 'orbits_of_solutions_io.ads' with text_io; use text_io; with Orbits_of_Solutions; use Orbits_of_Solutions; package Orbits_of_Solutions_io is -- DESCRIPTION : -- This package contains output routines for the orbit structure of the -- solutions set of a symmetric polynomial system. procedure put ( lorb : in List_of_Orbits ); -- DESCRIPTION : -- Produces the output of the orbit structure of a solution list, -- on standard output. procedure put ( file : in file_type; lorb : in List_of_Orbits ); -- DESCRIPTION : -- Produces the output of the orbit structure of a solution list, -- on a file. end Orbits_of_Solutions_io; SHAR_EOF fi # end of overwriting check if test -f 'permutations.adb' then echo shar: will not over-write existing file "'permutations.adb'" else cat << "SHAR_EOF" > 'permutations.adb' package body Permutations is function Is_Permutation ( p : Permutation ) return boolean is begin for i in p'range loop if ((p(i) = 0) or else (p(i) < -p'last) or else (p(i) > p'last)) then return false; else for j in p'first..(i-1) loop if ((p(i) = p(j)) or else (p(i) = -p(j))) then return false; end if; end loop; end if; end loop; return true; end Is_Permutation; function Equal ( p1,p2 : Permutation ) return boolean is begin if (p1'first /= p2'first) or else (p1'last /= p2'last) then return false; else for i in p1'range loop if p1(i) /= p2(i) then return false; end if; end loop; return true; end if; end Equal; function "*" ( p1,p2 : Permutation ) return Permutation is r : Permutation(p1'range); begin for i in r'range loop if p2(i) >= 0 then r(i) := p1(p2(i)); else r(i) := -p1(-p2(i)); end if; end loop; return r; end "*"; function inv ( p : Permutation ) return Permutation is r : Permutation(p'range); begin for i in r'range loop if p(i) >= 0 then r(p(i)) := i; else r(-p(i)) := -i; end if; end loop; return r; end inv; end Permutations; SHAR_EOF fi # end of overwriting check if test -f 'permutations.ads' then echo shar: will not over-write existing file "'permutations.ads'" else cat << "SHAR_EOF" > 'permutations.ads' with Integer_Vectors; package Permutations is -- DESCRIPTION : -- This package defines the type Permutation. type Permutation is new Integer_Vectors.Vector; type Link_to_Permutation is new Integer_Vectors.Link_to_Vector; -- DESCRIPTION : -- A permutation p defines the image of i -> p(i). -- As also negative entries are alowed, sign permutations -- will be modelled as follows: -- let perm = (1 3 -2), applied to F=(f1,f2,f3): -- perm*F = (f1,f3,-f2). function Is_Permutation ( p : Permutation ) return boolean; -- DESCRIPTION : -- Checks whether the vector p models a permutation: -- p(i) /= p(j) and p(i) /= -p(j), for all i /= j and -- -p'last <= p(i) <= p'last. function Equal ( p1,p2 : Permutation ) return boolean; -- DESCRIPTION : -- Returns true if both permutations are equal. function "*" ( p1,p2 : Permutation ) return Permutation; -- DESCRIPTION : -- returns p1 `after' p2 -- (1 3 -2) * (2 -1 3) = (3 -1 -2) -- REQUIRED : -- p1'range = p2'range function inv ( p : Permutation ) return Permutation; -- DESCRIPTION : -- inv(p)*p = p*inv(p) = the identical transformation end Permutations; SHAR_EOF fi # end of overwriting check if test -f 'permutations_of_faces.adb' then echo shar: will not over-write existing file "'permutations_of_faces.adb'" else cat << "SHAR_EOF" > 'permutations_of_faces.adb' with Integer_Vectors; use Integer_Vectors; with Integer_Vectors_of_Vectors; with Permute_Operations; use Permute_Operations; package body Permutations_of_Faces is function Invariant ( f : Face; p : Permutation ) return boolean is fp : Face := Permute(f,p); res : boolean := Is_Equal(f,fp); begin Deep_Clear(fp); return res; end Invariant; function Invariant_Lifted ( f : Face; p : Permutation ) return boolean is fp : Face := Permute_Lifted(f,p); res : boolean := Is_Equal(f,fp); begin Deep_Clear(fp); return res; end Invariant_Lifted; function Permute ( f : Face; p : Permutation ) return Face is res : Face := new Integer_Vectors_of_Vectors.Vector(f'range); begin for i in f'range loop res(i) := new Integer_Vectors.Vector'(p*f(i).all); end loop; return res; end Permute; function Permute_Lifted ( f : Face; p : Permutation ) return Face is res : Face := new Integer_Vectors_of_Vectors.Vector(f'range); begin for i in f'range loop declare pt : constant Integer_Vectors.Vector := f(i)(f(i)'first..f(i)'last-1); begin res(i) := new Integer_Vectors.Vector(f(i)'range); res(i)(pt'range) := p*pt; res(i)(res(i)'last) := f(i)(f(i)'last); end; end loop; return res; end Permute_Lifted; function Permutable ( f1,f2 : Face ) return boolean is res : boolean; begin for i in f1'range loop res := false; for j in f2'range loop res := Permutable(f1(i).all,f2(j).all); exit when res; end loop; exit when not res; end loop; return res; end Permutable; function Permutable_Lifted ( f1,f2 : Face ) return boolean is res : boolean; begin for i in f1'range loop res := false; for j in f2'range loop if f1(i)(f1(i)'last) = f2(j)(f2(j)'last) -- same lifting then res := Permutable(f1(i)(f1(i)'first..f1(i)'last-1), f2(j)(f2(j)'first..f2(j)'last-1)); end if; exit when res; end loop; exit when not res; end loop; return res; end Permutable_Lifted; function Permutable ( f1 : Face; f2 : Faces ) return boolean is tmp : Faces := f2; begin while not Is_Null(tmp) loop if Permutable(f1,Head_Of(tmp)) then return true; else tmp := Tail_Of(tmp); end if; end loop; end Permutable; function Permutable_Lifted ( f1 : Face; f2 : Faces ) return boolean is tmp : Faces := f2; begin while not Is_Null(tmp) loop if Permutable_Lifted(f1,Head_Of(tmp)) then return true; else tmp := Tail_Of(tmp); end if; end loop; return false; end Permutable_Lifted; end Permutations_of_Faces; SHAR_EOF fi # end of overwriting check if test -f 'permutations_of_faces.ads' then echo shar: will not over-write existing file "'permutations_of_faces.ads'" else cat << "SHAR_EOF" > 'permutations_of_faces.ads' with Integer_Faces_of_Polytope; use Integer_Faces_of_Polytope; with Permutations,Symmetry_Group; use Permutations,Symmetry_Group; package Permutations_of_Faces is -- DESCRIPTION : -- Provides elementary permutation operations on faces of polytopes. -- Each time, the second operation concerns a lifted face and leaves -- the lifting invariant. function Invariant ( f : Face; p : Permutation ) return boolean; function Invariant_Lifted ( f : Face; p : Permutation ) return boolean; -- DESCRIPTION : -- Returns true if the face is invariant under the permutation. function Permute ( f : Face; p : Permutation ) return Face; function Permute_Lifted ( f : Face; p : Permutation ) return Face; -- DESCRIPTION : -- Permutations the coordinates of the points which span the face. function Permutable ( f1,f2 : Face ) return boolean; function Permutable_Lifted ( f1,f2 : Face ) return boolean; -- DESCRIPTION : -- Returns true if there exists a permutation of face f1 into face f2. function Permutable ( f1 : Face; f2 : Faces ) return boolean; function Permutable_Lifted ( f1 : Face; f2 : Faces ) return boolean; -- DESCRIPTION : -- Returns true if the face f1 is permutable with one of the faces in f2. end Permutations_of_Faces; SHAR_EOF fi # end of overwriting check if test -f 'permute_operations.adb' then echo shar: will not over-write existing file "'permute_operations.adb'" else cat << "SHAR_EOF" > 'permute_operations.adb' with Complex_Numbers; use Complex_Numbers; package body Permute_Operations is function "*" ( p : Permutation; v : Natural_Vectors.Vector ) return Natural_Vectors.Vector is r : Natural_Vectors.Vector(v'range); begin for i in p'range loop if p(i) >= 0 then r(i) := v(p(i)); else r(i) := -v(-p(i)); end if; end loop; return r; end "*"; function "*" ( p : Permutation; v : Integer_Vectors.Vector ) return Integer_Vectors.Vector is r : Integer_Vectors.Vector(v'range); begin for i in p'range loop if p(i) >= 0 then r(i) := v(p(i)); else r(i) := -v(-p(i)); end if; end loop; return r; end "*"; function "*" ( p : Permutation; v : Float_Vectors.Vector ) return Float_Vectors.Vector is r : Float_Vectors.Vector(v'range); begin for i in p'range loop if p(i) >= 0 then r(i) := v(p(i)); else r(i) := -v(-p(i)); end if; end loop; return r; end "*"; function "*" ( p : Permutation; v : Complex_Vectors.Vector ) return Complex_Vectors.Vector is r : Complex_Vectors.Vector(v'range); begin for i in p'range loop if p(i) >= 0 then r(i) := v(p(i)); else r(i) := -v(-p(i)); end if; end loop; return r; end "*"; function Permutable ( v1,v2 : Natural_Vectors.Vector ) return boolean is begin if v1'first /= v2'first or else v1'last /= v2'last then return false; -- the dimensions must correspond ! else declare p : Permutation(v1'first..v1'last); begin for k in p'range loop p(k) := 0; for l in v2'range loop if v2(l) = v1(k) then p(k) := l; for j in 1..(k-1) loop if p(j) = l then p(k) := 0; end if; end loop; end if; exit when p(k) /= 0; end loop; if p(k) = 0 then return false; end if; end loop; end; return true; end if; end Permutable; function Permutable ( v1,v2 : Integer_Vectors.Vector ) return boolean is begin if v1'first /= v2'first or else v1'last /= v2'last then return false; -- the dimensions must correspond ! else declare p : Permutation(v1'first..v1'last); begin for k in p'range loop p(k) := 0; for l in v2'range loop if v2(l) = v1(k) then p(k) := l; for j in 1..(k-1) loop if p(j) = l then p(k) := 0; end if; end loop; end if; exit when p(k) /= 0; end loop; if p(k) = 0 then return false; end if; end loop; end; return true; end if; end Permutable; function Permutable ( v1,v2 : Float_Vectors.Vector ) return boolean is begin if v1'first /= v2'first or else v1'last /= v2'last then return false; -- the dimensions must correspond ! else declare p : Permutation(v1'first..v1'last); begin for k in p'range loop p(k) := 0; for l in v2'range loop if v2(l) = v1(k) then p(k) := l; for j in 1..(k-1) loop if p(j) = l then p(k) := 0; end if; end loop; end if; exit when p(k) /= 0; end loop; if p(k) = 0 then return false; end if; end loop; end; return true; end if; end Permutable; function Permutable ( v1,v2 : Complex_Vectors.Vector ) return boolean is begin if v1'first /= v2'first or else v1'last /= v2'last then return false; -- the dimensions must correspond ! else declare p : Permutation(v1'first..v1'last); begin for k in p'range loop p(k) := 0; for l in v2'range loop if v2(l) = v1(k) then p(k) := l; for j in 1..(k-1) loop if p(j) = l then p(k) := 0; end if; end loop; end if; exit when p(k) /= 0; end loop; if p(k) = 0 then return false; end if; end loop; end; return true; end if; end Permutable; function Permutable ( v1,v2 : Float_Vectors.Vector; tol : double_float ) return boolean is begin if v1'first /= v2'first or else v1'last /= v2'last then return false; -- the dimensions must correspond ! else declare p : Permutation(v1'first..v1'last); begin for k in p'range loop p(k) := 0; for l in v2'range loop if ABS(v2(l) - v1(k)) <= tol then p(k) := l; for j in 1..(k-1) loop if p(j) = l then p(k) := 0; end if; end loop; end if; exit when p(k) /= 0; end loop; if p(k) = 0 then return false; end if; end loop; end; return true; end if; end Permutable; function Permutable ( v1,v2 : Complex_Vectors.Vector; tol : double_float ) return boolean is begin if v1'first /= v2'first or else v1'last /= v2'last then return false; -- the dimensions must correspond ! else declare p : Permutation(v1'first..v1'last); begin for k in p'range loop p(k) := 0; for l in v2'range loop if (ABS(REAL_PART(v2(l)) - REAL_PART(v1(k))) <= tol) and then (ABS(IMAG_PART(v2(l)) - IMAG_PART(v1(k))) <= tol) then p(k) := l; for j in 1..(k-1) loop if p(j) = l then p(k) := 0; end if; end loop; end if; exit when p(k) /= 0; end loop; if p(k) = 0 then return false; end if; end loop; end; return true; end if; end Permutable; function Sign_Permutable ( v1,v2 : Natural_Vectors.Vector ) return boolean is begin if v1'first /= v2'first or else v1'last /= v2'last then return false; -- the dimensions must correspond ! else declare p : Permutation(v1'first..v1'last); begin for k in p'range loop p(k) := 0; for l in v2'range loop if v2(l) = v1(k) or else v2(l) = -v1(k) then p(k) := l; for j in 1..(k-1) loop if p(j) = l then p(k) := 0; end if; end loop; end if; exit when p(k) /= 0; end loop; if p(k) = 0 then return false; end if; end loop; end; return true; end if; end Sign_Permutable; function Sign_Permutable ( v1,v2 : Integer_Vectors.Vector ) return boolean is begin if v1'first /= v2'first or else v1'last /= v2'last then return false; -- the dimensions must correspond ! else declare p : Permutation(v1'first..v1'last); begin for k in p'range loop p(k) := 0; for l in v2'range loop if v2(l) = v1(k) or else v2(l) = -v1(k) then p(k) := l; for j in 1..(k-1) loop if p(j) = l then p(k) := 0; end if; end loop; end if; exit when p(k) /= 0; end loop; if p(k) = 0 then return false; end if; end loop; end; return true; end if; end Sign_Permutable; function Sign_Permutable ( v1,v2 : Float_Vectors.Vector ) return boolean is begin if v1'first /= v2'first or else v1'last /= v2'last then return false; -- the dimensions must correspond ! else declare p : Permutation(v1'first..v1'last); begin for k in p'range loop p(k) := 0; for l in v2'range loop if v2(l) = v1(k) or else v2(l) = -v1(k) then p(k) := l; for j in 1..(k-1) loop if p(j) = l then p(k) := 0; end if; end loop; end if; exit when p(k) /= 0; end loop; if p(k) = 0 then return false; end if; end loop; end; return true; end if; end Sign_Permutable; function Sign_Permutable ( v1,v2 : Complex_Vectors.Vector ) return boolean is begin if v1'first /= v2'first or else v1'last /= v2'last then return false; -- the dimensions must correspond ! else declare p : Permutation(v1'first..v1'last); begin for k in p'range loop p(k) := 0; for l in v2'range loop if v2(l) = v1(k) or else v2(l) = -v1(k) then p(k) := l; for j in 1..(k-1) loop if p(j) = l then p(k) := 0; end if; end loop; end if; exit when p(k) /= 0; end loop; if p(k) = 0 then return false; end if; end loop; end; return true; end if; end Sign_Permutable; function Sign_Permutable ( v1,v2 : Float_Vectors.Vector; tol : double_float ) return boolean is begin if v1'first /= v2'first or else v1'last /= v2'last then return false; -- the dimensions must correspond ! else declare p : Permutation(v1'first..v1'last); begin for k in p'range loop p(k) := 0; for l in v2'range loop if (ABS(v2(l) - v1(k)) <= tol) or else (ABS(v2(l) + v1(k)) <= tol) then p(k) := l; for j in 1..(k-1) loop if p(j) = l then p(k) := 0; end if; end loop; end if; exit when p(k) /= 0; end loop; if p(k) = 0 then return false; end if; end loop; end; return true; end if; end Sign_Permutable; function Sign_Permutable ( v1,v2 : Complex_Vectors.Vector; tol : double_float ) return boolean is begin if v1'first /= v2'first or else v1'last /= v2'last then return false; -- the dimensions must correspond ! else declare p : Permutation(v1'first..v1'last); begin for k in p'range loop p(k) := 0; for l in v2'range loop if ((ABS(REAL_PART(v2(l)) - REAL_PART(v1(k))) <= tol) and then (ABS(IMAG_PART(v2(l)) - IMAG_PART(v1(k))) <= tol)) or else ((ABS(REAL_PART(v2(l)) + REAL_PART(v1(k))) <= tol) and then (ABS(IMAG_PART(v2(l)) + IMAG_PART(v1(k))) <= tol)) then p(k) := l; for j in 1..(k-1) loop if p(j) = l then p(k) := 0; end if; end loop; end if; exit when p(k) /= 0; end loop; if p(k) = 0 then return false; end if; end loop; end; return true; end if; end Sign_Permutable; function "*" ( p : Permutation; t : Complex_Multivariate_Polynomials.Term ) return Complex_Multivariate_Polynomials.Term is res : Complex_Multivariate_Polynomials.Term; begin res.cf := t.cf; res.dg := new Natural_Vectors.Vector(t.dg'range); for i in p'range loop if p(i) >= 0 then res.dg(i) := t.dg(p(i)); else res.dg(i) := t.dg(-p(i)); res.cf := -res.cf; end if; end loop; return res; end "*"; function "*" ( p : Permutation; s : Complex_Multivariate_Polynomials.Poly ) return Complex_Multivariate_Polynomials.Poly is use Complex_Multivariate_Polynomials; res : Poly := Null_Poly; procedure Permute_Term ( t : in Term; continue : out boolean ) is tt : Term := p*t; begin Plus_Term(res,tt); Clear(tt); continue := true; end Permute_Term; procedure Permute_Terms is new Visiting_Iterator(Permute_Term); begin Permute_Terms(s); return res; end "*"; function "*" ( p : Permutation; t : Complex_Multivariate_Laurent_Polynomials.Term ) return Complex_Multivariate_Laurent_Polynomials.Term is res : Complex_Multivariate_Laurent_Polynomials.Term; begin res.cf := t.cf; res.dg := new Integer_Vectors.Vector(t.dg'range); for i in p'range loop if p(i) >= 0 then res.dg(i) := t.dg(p(i)); else res.dg(i) := t.dg(-p(i)); res.cf := -res.cf; end if; end loop; return res; end "*"; function "*" ( p : Permutation; s : Complex_Multivariate_Laurent_Polynomials.Poly ) return Complex_Multivariate_Laurent_Polynomials.Poly is use Complex_Multivariate_Laurent_Polynomials; res : Poly := Null_Poly; procedure Permute_Term ( t : in Term; continue : out boolean ) is tt : Term := p*t; begin Plus_Term(res,tt); Clear(tt); continue := true; end Permute_Term; procedure Permute_Terms is new Visiting_Iterator(Permute_Term); begin Permute_Terms(s); return res; end "*"; function "*" ( s : Poly_Sys; p : Permutation ) return Poly_Sys is res : Poly_Sys(s'range); begin for k in res'range loop res(k) := p*s(k); end loop; return res; end "*"; function "*" ( s : Laur_Sys; p : Permutation ) return Laur_Sys is res : Laur_Sys(s'range); begin for k in res'range loop res(k) := p*s(k); end loop; return res; end "*"; function "*" ( p : Permutation; s : Poly_Sys ) return Poly_Sys is r : Poly_Sys(s'range); use Complex_Multivariate_Polynomials; begin for i in p'range loop if p(i) >= 0 then Copy(s(p(i)),r(i)); else r(i) := -s(-p(i)); end if; end loop; return r; end "*"; function "*" ( p : Permutation; s : Laur_Sys ) return Laur_Sys is r : Laur_Sys(s'range); use Complex_Multivariate_Laurent_Polynomials; begin for i in p'range loop if p(i) >= 0 then Copy(s(p(i)),r(i)); else r(i) := -s(-p(i)); end if; end loop; return r; end "*"; end Permute_Operations; SHAR_EOF fi # end of overwriting check if test -f 'permute_operations.ads' then echo shar: will not over-write existing file "'permute_operations.ads'" else cat << "SHAR_EOF" > 'permute_operations.ads' with Permutations; use Permutations; with Natural_Vectors,Integer_Vectors; with Floating_Point_Numbers; use Floating_Point_Numbers; with Float_Vectors,Complex_Vectors; with Complex_Multivariate_Polynomials; with Complex_Multivariate_Laurent_Polynomials; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Laurent_Polynomial_Systems; use Complex_Laurent_Polynomial_Systems; package Permute_Operations is -- DESCRIPTION : -- This package provides permute operations on vectors, -- on polynomials and on systems of polynomials. function "*" ( p : Permutation; v : Natural_Vectors.Vector ) return Natural_Vectors.Vector; function "*" ( p : Permutation; v : Integer_Vectors.Vector ) return Integer_Vectors.Vector; function "*" ( p : Permutation; v : Float_Vectors.Vector ) return Float_Vectors.Vector; function "*" ( p : Permutation; v : Complex_Vectors.Vector ) return Complex_Vectors.Vector; -- DESCRIPTION : -- returns the result of the permutation of p on the vector v. -- REQUIRED : -- p'range = v'range function Permutable ( v1,v2 : Natural_Vectors.Vector ) return boolean; function Permutable ( v1,v2 : Integer_Vectors.Vector ) return boolean; function Permutable ( v1,v2 : Float_Vectors.Vector ) return boolean; function Permutable ( v1,v2 : Complex_Vectors.Vector ) return boolean; function Permutable ( v1,v2 : Float_Vectors.Vector; tol : double_float ) return boolean; function Permutable ( v1,v2 : Complex_Vectors.Vector; tol : double_float ) return boolean; -- DESCRIPTION : -- Returns true if there exists a permutation between the two vectors. -- If provided, tol is the tolerance for comparing two numeric values. function Sign_Permutable ( v1,v2 : Natural_Vectors.Vector ) return boolean; function Sign_Permutable ( v1,v2 : Integer_Vectors.Vector ) return boolean; function Sign_Permutable ( v1,v2 : Float_Vectors.Vector ) return boolean; function Sign_Permutable ( v1,v2 : Complex_Vectors.Vector ) return boolean; function Sign_Permutable ( v1,v2 : Float_Vectors.Vector; tol : double_float ) return boolean; function Sign_Permutable ( v1,v2 : Complex_Vectors.Vector; tol : double_float ) return boolean; -- DESCRIPTION : -- Also permutations where the sign of one of the components can -- be changed, are checked. function "*" ( p : Permutation; t : Complex_Multivariate_Polynomials.Term ) return Complex_Multivariate_Polynomials.Term; function "*" ( p : Permutation; s : Complex_Multivariate_Polynomials.Poly ) return Complex_Multivariate_Polynomials.Poly; function "*" ( p : Permutation; t : Complex_Multivariate_Laurent_Polynomials.Term ) return Complex_Multivariate_Laurent_Polynomials.Term; function "*" ( p : Permutation; s : Complex_Multivariate_Laurent_Polynomials.Poly ) return Complex_Multivariate_Laurent_Polynomials.Poly; -- DESCRIPTION : -- permutes the unknowns in the term t or the polynonomial s, -- according to the permuation p. function "*" ( s : Poly_Sys; p : Permutation ) return Poly_Sys; function "*" ( s : Laur_Sys; p : Permutation ) return Laur_Sys; function "*" ( p : Permutation; s : Poly_Sys ) return Poly_Sys; function "*" ( p : Permutation; s : Laur_Sys ) return Laur_Sys; -- DESCRIPTION : -- s*p permutes the unknowns in the individual polynomials. -- p*s permutes the equations in the system. -- Watch out for sharing by this second type of operation! end Permute_Operations; SHAR_EOF fi # end of overwriting check if test -f 'symbolic_symmetry_group_io.adb' then echo shar: will not over-write existing file "'symbolic_symmetry_group_io.adb'" else cat << "SHAR_EOF" > 'symbolic_symmetry_group_io.adb' with integer_io; use integer_io; with Communications_with_User; use Communications_with_User; with Symbol_Table,Symbol_Table_io; use Symbol_Table; package body Symbolic_Symmetry_Group_io is procedure iget ( p : in out Permutation ) is -- DESCRIPTION ; -- Auxiliary procedure to realize an interactive get. ok : boolean := false; pp : Permutation(p'range) := (p'range => 0); ans : character; begin while not ok loop get(Standard_Input,pp); ok := Is_Permutation(pp); if not ok then put("is no permutation. Do you want to retry ? (y/n) "); Ask_Yes_or_No(ans); ok := (ans /= 'y'); end if; end loop; p := pp; end iget; procedure get ( p : in out Permutation ) is begin iget(p); end get; procedure get ( file : in file_type; p : in out Permutation ) is sb : Symbol; ch : character; begin for i in p'range loop sb := (sb'range => ' '); get(ch); while ch = ' ' loop get(ch); end loop; if ch = '-' then get(ch); Symbol_Table_io.get(file,ch,sb); p(i) := -Symbol_Table.get(sb); else Symbol_Table_io.get(file,ch,sb); p(i) := Symbol_Table.get(sb); end if; end loop; end get; procedure get ( l : in out List_of_Permutations; n,nb : in natural ) is p : Permutation(1..n) := (1..n => 0); l2 : List_of_Permutations; begin for i in 1..nb loop iget(p); Append(l,l2,p); end loop; end get; procedure get ( file : in file_type; l : in out List_of_Permutations; n,nb : in natural ) is p : Permutation(1..n) := (1..n => 0); l2 : List_of_Permutations; begin for i in 1..nb loop get(file,p); if Is_Permutation(p) then Append(l,l2,p); end if; end loop; end get; procedure put ( p : in Permutation ) is begin put(Standard_Output,p); end put; procedure put ( file : in file_type; p : in Permutation ) is sb : Symbol; begin for i in p'range loop put(file,' '); if p(i) < 0 then put(file,'-'); sb := Symbol_Table.get(-p(i)); else sb := Symbol_Table.get(p(i)); end if; Symbol_Table_io.put(file,sb); end loop; end put; procedure put ( l : in List_of_Permutations ) is begin put(Standard_Output,l); end put; procedure put ( file : in file_type; l : in List_of_Permutations ) is temp : List_of_Permutations := l; begin while not Is_Null(temp) loop put(file,Permutation(Head_Of(temp).all)); new_line(file); temp := Tail_Of(temp); end loop; end put; end Symbolic_Symmetry_Group_io; SHAR_EOF fi # end of overwriting check if test -f 'symbolic_symmetry_group_io.ads' then echo shar: will not over-write existing file "'symbolic_symmetry_group_io.ads'" else cat << "SHAR_EOF" > 'symbolic_symmetry_group_io.ads' with text_io; use text_io; with Permutations,Symmetry_Group; use Permutations,Symmetry_Group; package Symbolic_Symmetry_Group_io is -- DESCRIPTION : -- This package contains routines for input and output of permutations -- and groups of permutations, with the use of the symbol table. -- This means that symbols rather than positions are read and written. -- REQUIRED : The symbol table may not be empty! procedure get ( p : in out Permutation ); procedure get ( file : in file_type; p : in out Permutation ); -- DESCRIPTION : -- Reads a permutation from standard input or from file. -- When read from standard input, the get will ask the user to retry -- until a valid permutation is entered. procedure get ( l : in out List_of_Permutations; n,nb : in natural ); procedure get ( file : in file_type; l : in out List_of_Permutations; n,nb : in natural ); -- DESCRIPTION : -- Reads a list of permutations from standard in put or from file. -- When read from file, nonvalid permutations are ignored. -- When read from standard input, the get askes the user to retry -- until a valid permutation is entered. -- ON ENTRY : -- n the number of elements in the permutations; -- nb the total number of permutations that must be read. procedure put ( p : in Permutation ); procedure put ( file : in file_type; p : in Permutation ); -- DESCRIPTION : -- Writes a permutation on standard output or on file. procedure put ( l : in List_of_Permutations ); procedure put ( file : in file_type; l : in List_of_Permutations ); -- DESCRIPTION : -- Writes a list of permutations on standard output or on file. end Symbolic_Symmetry_Group_io; SHAR_EOF fi # end of overwriting check if test -f 'symmetric_bkk_bound_solvers.adb' then echo shar: will not over-write existing file "'symmetric_bkk_bound_solvers.adb'" else cat << "SHAR_EOF" > 'symmetric_bkk_bound_solvers.adb' with Power_Lists; use Power_Lists; with Integer_Vectors,Float_Vectors; use Integer_Vectors; with Mixed_Volume_Computation; use Mixed_Volume_Computation; with Integer_Mixed_Subdivisions; use Integer_Mixed_Subdivisions; with Integer_Mixed_Subdivisions_io; use Integer_Mixed_Subdivisions_io; with Mixed_Coherent_Subdivisions; use Mixed_Coherent_Subdivisions; with Polynomial_to_Laurent_Converters; use Polynomial_to_Laurent_Converters; with Integer_Lifting_Utilities; use Integer_Lifting_Utilities; with Symmetric_Polyhedral_Continuation; use Symmetric_Polyhedral_Continuation; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Complex_Laurent_Polynomial_Systems; use Complex_Laurent_Polynomial_Systems; package body Symmetric_BKK_Bound_Solvers is function Symmetric_BKK_Solve ( p : Poly_Sys; sign : boolean ) return Solution_List is n : constant natural := p'length; points : Array_of_Lists(p'range) := Construct_Power_Lists(p); sols : Solution_List; mix,per : Link_to_Vector; mixsub : Mixed_Subdivision; lp,pp : Laur_Sys(p'range); low : constant Vector := (1..n => 0); upp : constant Vector := Adaptive_Lifting(points); begin Compute_Mixture(points,mix,per); Clear(per); declare lifted : Array_of_Lists(mix'range); nbsucc,nbfail : Float_Vectors.Vector(mix'range) := (mix'range => 0.0); file : file_type; begin Mixed_Coherent_Subdivision (n,mix.all,points,false,low,upp,lifted,nbsucc,nbfail,mixsub); pp := Polynomial_to_Laurent_System(p); lp := Perform_Lifting(n,mix.all,lifted,pp); Create(file,out_file,"/tmp/brol"); sols := Symmetric_Mixed_Solve(file,sign,lp,mixsub,n,mix.all); Deep_Clear(lifted); end; Clear(pp); Clear(lp); Deep_Clear(points); Clear(mixsub); return sols; end Symmetric_BKK_Solve; function Symmetric_BKK_Solve ( p : Poly_Sys; grp : List_of_Permutations; sign : boolean ) return Solution_List is n : constant natural := p'length; points : Array_of_Lists(p'range) := Construct_Power_Lists(p); sols : Solution_List; mix,per : Link_to_Vector; mixsub : Mixed_Subdivision; lp,pp : Laur_Sys(p'range); low : constant Vector := (1..n => 0); upp : constant Vector := Adaptive_Lifting(points); begin Compute_Mixture(points,mix,per); Clear(per); declare lifted : Array_of_Lists(mix'range); nbsucc,nbfail : Float_Vectors.Vector(mix'range) := (mix'range => 0.0); file : file_type; begin Mixed_Coherent_Subdivision (n,mix.all,points,false,low,upp,lifted,nbsucc,nbfail,mixsub); pp := Polynomial_to_Laurent_System(p); lp := Perform_Lifting(n,mix.all,lifted,pp); Create(file,out_file,"/tmp/brol"); sols := Symmetric_Mixed_Solve(file,grp,sign,lp,mixsub,n,mix.all); Deep_Clear(lifted); end; Clear(pp); Clear(lp); Deep_Clear(points); Clear(mixsub); return sols; end Symmetric_BKK_Solve; function Symmetric_BKK_Solve ( file : file_type; p : Poly_Sys; sign : boolean) return Solution_List is n : constant natural := p'length; points : Array_of_Lists(p'range) := Construct_Power_Lists(p); sols : Solution_List; mix,per : Link_to_Vector; mixsub : Mixed_Subdivision; lp,pp : Laur_Sys(p'range); low : constant Vector := (1..n => 0); upp : constant Vector := Adaptive_Lifting(points); begin Compute_Mixture(points,mix,per); Clear(per); declare lifted : Array_of_Lists(mix'range); nbsucc,nbfail : Float_Vectors.Vector(mix'range) := (mix'range => 0.0); begin Mixed_Coherent_Subdivision (n,mix.all,points,false,low,upp,lifted,nbsucc,nbfail,mixsub); put_line(file,"**** THE SYMMETRIC MIXED SUBDIVISION ****"); put(file,n,mix.all,mixsub); pp := Polynomial_to_Laurent_System(p); lp := Perform_Lifting(n,mix.all,lifted,pp); new_line(file); put_line(file,"**** SYMMETRIC MIXED SOLVE ****"); sols := Symmetric_Mixed_Solve(file,sign,lp,mixsub,n,mix.all); Deep_Clear(lifted); end; Clear(pp); Clear(lp); Deep_Clear(points); Clear(mixsub); return sols; end Symmetric_BKK_Solve; function Symmetric_BKK_Solve ( file : file_type; p : Poly_Sys; grp : List_of_Permutations; sign : boolean ) return Solution_List is n : constant natural := p'length; points : Array_of_Lists(p'range) := Construct_Power_Lists(p); sols : Solution_List; mix,per : Link_to_Vector; mixsub : Mixed_Subdivision; lp,pp : Laur_Sys(p'range); low : constant Vector := (1..n => 0); upp : constant Vector := Adaptive_Lifting(points); begin Compute_Mixture(points,mix,per); Clear(per); declare lifted : Array_of_Lists(mix'range); nbsucc,nbfail : Float_Vectors.Vector(mix'range) := (mix'range => 0.0); begin Mixed_Coherent_Subdivision (n,mix.all,points,false,low,upp,lifted,nbsucc,nbfail,mixsub); put_line(file,"**** THE SYMMETRIC MIXED SUBDIVISION ****"); put(file,n,mix.all,mixsub); pp := Polynomial_to_Laurent_System(p); lp := Perform_Lifting(n,mix.all,lifted,pp); new_line(file); put_line(file,"**** SYMMETRIC MIXED SOLVE ****"); sols := Symmetric_Mixed_Solve(file,grp,sign,lp,mixsub,n,mix.all); Deep_Clear(lifted); end; Clear(pp); Clear(lp); Deep_Clear(points); Clear(mixsub); return sols; end Symmetric_BKK_Solve; end Symmetric_BKK_bound_Solvers; SHAR_EOF fi # end of overwriting check if test -f 'symmetric_bkk_bound_solvers.ads' then echo shar: will not over-write existing file "'symmetric_bkk_bound_solvers.ads'" else cat << "SHAR_EOF" > 'symmetric_bkk_bound_solvers.ads' with text_io,Solutions; use text_io,Solutions; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Symmetry_Group; use Symmetry_Group; package Symmetric_BKK_Bound_Solvers is -- DESCRIPTION : -- This package offers functions for the black box computation of the -- BKK bound of a given polynomial system. function Symmetric_BKK_Solve ( p : Poly_Sys; sign : boolean ) return Solution_List; function Symmetric_BKK_Solve ( p : Poly_Sys; grp : List_of_Permutations; sign : boolean ) return Solution_List; function Symmetric_BKK_Solve ( file : file_type; p : Poly_Sys; sign : boolean ) return Solution_List; function Symmetric_BKK_Solve ( file : file_type; p : Poly_Sys; grp : List_of_Permutations; sign : boolean ) return Solution_List; -- DESCRIPTION : -- This is a black box computation of all generating solutions, -- based on the computation of the symmetric mixed subdivision. -- If a file is specified, then intermediate results will be -- write on that file. -- If no group is given, then the group of all permutations is -- assumed. Sign = true means that there is also a sign symmetry -- to take into account. end Symmetric_BKK_Bound_Solvers; SHAR_EOF fi # end of overwriting check if test -f 'symmetric_lifting_functions.adb' then echo shar: will not over-write existing file "'symmetric_lifting_functions.adb'" else cat << "SHAR_EOF" > 'symmetric_lifting_functions.adb' with Permutations,Permute_Operations; use Permutations,Permute_Operations; with Random_Number_Generators; use Random_Number_Generators; with Lists_of_Integer_Vectors; with Lists_of_Float_Vectors; with Mixed_Volume_Computation; use Mixed_Volume_Computation; package body Symmetric_Lifting_Functions is procedure Classify_Orbits ( supports : in Arrays_of_Integer_Vector_Lists.Array_of_Lists; mix : in Integer_Vectors.Vector; v,w : in List_of_Permutations; norb : out natural; orbits : out Arrays_of_Integer_Vector_Lists.Array_of_Lists ) is use Integer_Vectors; use Lists_of_Integer_Vectors; use Arrays_of_Integer_Vector_Lists; res,done,res_last,done_last : Array_of_Lists(mix'range); cnt,k,orbit,inmixk : natural; n : constant natural := supports'last - supports'first + 1; tmp : List; lv : Link_to_Vector; function Lift ( lv : Link_to_Vector ) return Link_to_Vector is res : Link_to_Vector; begin res := new Vector(lv'first..lv'last+1); res(lv'range) := lv.all; res(res'last) := orbit; return res; end Lift; function Search_and_Lift ( lv : Link_to_Vector; l : List ) return Link_to_Vector is begin if Is_In(l,lv) then return Lift(lv); else return lv; end if; end Search_and_Lift; procedure Update ( k : in natural; lv,liftlv : in Link_to_Vector ) is begin if not Is_In(done(k),lv) then Append(done(k),done_last(k),lv.all); Append(res(k),res_last(k),liftlv.all); end if; end Update; begin orbit := 0; k := supports'first; for i in mix'range loop tmp := supports(k); inmixk := Compute_Index(k,mix); while not Is_Null(tmp) loop lv := Head_Of(tmp); if not Is_In(done(inmixk),lv) then orbit := orbit + 1; -- new orbit declare tmpv,tmpw : List_of_Permutations; liftlv : Link_to_Vector := Lift(lv); begin Update(inmixk,lv,liftlv); Clear(liftlv); tmpv := v; tmpw := w; while not Is_Null(tmpv) loop -- construct the orbit declare plv : Link_to_Vector := new Vector(lv'range); index : natural := Head_Of(tmpw)(k); inmix : natural := Compute_Index(index,mix); begin plv.all := Permutation(Head_Of(tmpv).all)*lv.all; liftlv := Search_and_Lift(plv,supports(index)); if liftlv'last = n+1 then inmix := Compute_Index(index,mix); Update(inmix,plv,liftlv); Clear(liftlv); end if; Clear(plv); end; tmpv := Tail_Of(tmpv); tmpw := Tail_Of(tmpw); end loop; end; end if; tmp := Tail_Of(tmp); end loop; k := k + mix(i); end loop; Deep_Clear(done); cnt := 1; for i in res'range loop for j in 1..mix(i) loop orbits(cnt) := res(i); cnt := cnt + 1; end loop; end loop; norb := orbit; end Classify_Orbits; procedure Float_Lift_Orbits ( orbits : in out Arrays_of_Float_Vector_Lists.Array_of_Lists; lifting : in Float_Vectors.Vector ) is use Float_Vectors; use Lists_of_Float_Vectors; tmp : List; begin for k in orbits'range loop tmp := orbits(k); while not Is_Null(tmp) loop declare lv : Link_to_Vector := Head_Of(tmp); begin lv(lv'last) := lifting(integer(lv(lv'last))); Set_Head(tmp,lv); end; tmp := Tail_Of(tmp); end loop; end loop; end Float_Lift_Orbits; procedure Integer_Lift_Orbits ( orbits : in out Arrays_of_Integer_Vector_Lists.Array_of_Lists; lifting : in Integer_Vectors.Vector ) is use Integer_Vectors; use Lists_of_Integer_Vectors; tmp : List; begin for k in orbits'range loop tmp := orbits(k); while not Is_Null(tmp) loop declare lv : Link_to_Vector := Head_Of(tmp); begin lv(lv'last) := lifting(lv(lv'last)); Set_Head(tmp,lv); end; tmp := Tail_Of(tmp); end loop; end loop; end Integer_Lift_Orbits; procedure Float_Random_Lift_Orbits ( orbits : in out Arrays_of_Float_Vector_Lists.Array_of_Lists; norb : in natural; lower,upper : in double_float ) is use Float_Vectors; rv : Vector(1..norb); begin for k in rv'range loop rv(k) := (Random + 1.0)*(upper - lower)/2.0; end loop; Float_Lift_Orbits(orbits,rv); end Float_Random_Lift_Orbits; procedure Integer_Random_Lift_Orbits ( orbits : in out Arrays_of_Integer_Vector_Lists.Array_of_Lists; norb : in natural; lower,upper : in integer ) is use Integer_Vectors; rv : Vector(1..norb); begin for k in rv'range loop rv(k) := Random(lower,upper); end loop; Integer_Lift_Orbits(orbits,rv); end Integer_Random_Lift_Orbits; end Symmetric_Lifting_Functions; SHAR_EOF fi # end of overwriting check if test -f 'symmetric_lifting_functions.ads' then echo shar: will not over-write existing file "'symmetric_lifting_functions.ads'" else cat << "SHAR_EOF" > 'symmetric_lifting_functions.ads' with Floating_Point_Numbers; use Floating_Point_Numbers; with Integer_Vectors; with Float_Vectors; with Symmetry_Group; use Symmetry_Group; with Arrays_of_Integer_Vector_Lists; with Arrays_of_Float_Vector_Lists; package Symmetric_Lifting_Functions is -- DESCRIPTION : -- This package provides symmetric lifting functions. procedure Classify_Orbits ( supports : in Arrays_of_Integer_Vector_Lists.Array_of_Lists; mix : in Integer_Vectors.Vector; v,w : in List_of_Permutations; norb : out natural; orbits : out Arrays_of_Integer_Vector_Lists.Array_of_Lists ); -- DESCRIPTION : -- This procedure provides a symmetric lifting for the given supports, -- w.r.t. the symmetry group, represented by the lists of permutations -- v and w. -- ON ENTRY : -- supports supports of a polynomial system; -- mix type of mixture; -- v,w linear representations of the group actions: -- wk P(x) = P(vk x). -- ON RETURN : -- norb the number of different orbits; -- orbits the lifted supports, w.r.t. the symmetry group, -- as lifting value the orbit number has been used. procedure Float_Lift_Orbits ( orbits : in out Arrays_of_Float_Vector_Lists.Array_of_Lists; lifting : in Float_Vectors.Vector ); -- DESCRIPTION : -- Given supports with classified orbits, each orbit will receive -- the corresponding lifting value in the vector lifting. -- REQUIRED : -- lifting has range 1..#orbits procedure Integer_Lift_Orbits ( orbits : in out Arrays_of_Integer_Vector_Lists.Array_of_Lists; lifting : in Integer_Vectors.Vector ); -- DESCRIPTION : -- Given supports with classified orbits, each orbit will receive -- the corresponding lifting value in the vector lifting. -- REQUIRED : -- lifting has range 1..#orbits procedure Float_Random_Lift_Orbits ( orbits : in out Arrays_of_Float_Vector_Lists.Array_of_Lists; norb : in natural; lower,upper : in double_float ); -- DESCRIPTION : -- Orbits are given random floating-point lifting values in [lower,upper]. -- Every point in the same orbit receives the same lifting. -- ON ENTRY : -- orbits classified orbits, last entry of vectors is orbit number; -- norb the number of orbits; -- lower lower bound for random number generator; -- upper upper bound for random number generator. -- ON RETURN : -- orbits each point in the same orbit has the same random number. procedure Integer_Random_Lift_Orbits ( orbits : in out Arrays_of_Integer_Vector_Lists.Array_of_Lists; norb : in natural; lower,upper : in integer ); -- DESCRIPTION : -- Orbits are given random integer lifting values in [lower,upper]. -- Every point in the same orbit receives the same lifting. -- ON ENTRY : -- orbits classified orbits, last entry of vectors is orbit number; -- norb the number of orbits; -- lower lower bound for random number generator; -- upper upper bound for random number generator. -- ON RETURN : -- orbits each point in the same orbit has the same random number. end Symmetric_Lifting_Functions; SHAR_EOF fi # end of overwriting check if test -f 'symmetric_polyhedral_continuation.adb' then echo shar: will not over-write existing file "'symmetric_polyhedral_continuation.adb'" else cat << "SHAR_EOF" > 'symmetric_polyhedral_continuation.adb' with integer_io,Integer_Vectors_io; use integer_io,Integer_Vectors_io; with Floating_Point_Numbers; use Floating_Point_Numbers; with Complex_Numbers; use Complex_Numbers; with Complex_Multivariate_Laurent_Polynomials; with Complex_Polynomial_Systems; use Complex_Polynomial_Systems; with Complex_Multivariate_Polynomials; use Complex_Multivariate_Polynomials; with Laurent_to_Polynomial_Converters; use Laurent_to_Polynomial_Converters; with Laurent_Polynomial_Randomizers; use Laurent_Polynomial_Randomizers; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; with Transforming_Integer_Vector_Lists; use Transforming_Integer_Vector_Lists; with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; with Power_Lists; use Power_Lists; with Integer_Lifting_Utilities; use Integer_Lifting_Utilities; with Transforming_Laurent_Systems; use Transforming_Laurent_Systems; with Fewnomials; with Integer_Polyhedral_Continuation; use Integer_Polyhedral_Continuation; with Symmetric_BKK_Bound_Solvers; use Symmetric_BKK_Bound_Solvers; with Orbits_of_Solutions; use Orbits_of_Solutions; package body Symmetric_Polyhedral_Continuation is function Symmetric_Mixed_Solve ( file : file_type; grp : List_of_Permutations; sign : boolean; p : Laur_Sys; mixsub : Mixed_Subdivision; n : natural; mix : Vector ) return Solution_List is sols,sols_last : Solution_List; cnt : natural := 0; tmp : Mixed_Subdivision := mixsub; procedure Solve_Subsystem ( mic : in Mixed_Cell ) is q : Laur_Sys(p'range) := Select_Subsystem(p,mix,mic); sq : Laur_Sys(q'range); qsols : Solution_List; fail : boolean; eps : constant double_float := 10.0**(-10); begin new_line(file); put(file,"*** CONSIDERING SUBSYSTEM "); put(file,cnt,1); put_line(file," ***"); new_line(file); Reduce(n+1,q); sq := Shift(q); declare pq : Poly_Sys(q'range) := Laurent_to_Polynomial_System(sq); begin Fewnomials.Solve(sq,qsols,fail); if not fail then put_line(file,"It is a fewnomial system."); else put_line(file,"No fewnomial system."); if mic.sub = null then put_line(file,"Calling the black box solver."); qsols := Symmetric_BKK_Solve(file,pq,grp,sign); else put_line(file,"Using the refinement of the cell."); declare sup : Array_of_Lists(q'range); cnt : natural := sup'first; lif : Array_of_Lists(mix'range); lifq : Laur_Sys(q'range); begin for i in mic.pts'range loop sup(cnt) := Reduce(mic.pts(i),q'last+1); for j in 1..(mix(i)-1) loop Copy(sup(cnt),sup(cnt+j)); end loop; cnt := cnt + mix(i); end loop; lif := Induced_Lifting(n,mix,sup,mic.sub.all); lifq := Perform_Lifting(n,mix,lif,q); qsols := Symmetric_Mixed_Solve (file,grp,sign,lifq,mic.sub.all,n,mix); Deep_Clear(sup); Deep_Clear(lif); Clear(lifq); end; end if; Set_Continuation_Parameter(qsols,CMPLX(0.0)); end if; put(file,Length_Of(qsols),1); put_line(file," solutions found."); if not Is_Null(qsols) then Analyze(grp,sign,eps,qsols); put(file,Length_Of(qsols),1); put_line(file," generating solutions found."); Mixed_Continuation(file,p,mic.nor.all,qsols); Concat(sols,sols_last,qsols); end if; Clear(pq); Clear(sq); end; Clear(q); -- Shallow_Clear(qsols); end Solve_Subsystem; begin while not Is_Null(tmp) loop cnt := cnt + 1; Solve_Subsystem(Head_Of(tmp)); tmp := Tail_Of(tmp); end loop; return sols; end Symmetric_Mixed_Solve; function Symmetric_Mixed_Solve ( file : file_type; sign : boolean; p : Laur_Sys; mixsub : Mixed_Subdivision; n : natural; mix : Vector ) return Solution_List is sols,sols_last : Solution_List; cnt : natural; tmp : Mixed_Subdivision := mixsub; procedure Solve_Subsystem ( mic : in Mixed_Cell ) is q : Laur_Sys(p'range) := Select_Subsystem(p,mix,mic); sq : Laur_Sys(q'range); qsols,genqsols : Solution_List; fail : boolean; eps : constant double_float := 10.0**(-10); begin new_line(file); put(file,"*** CONSIDERING SUBSYSTEM "); put(file,cnt,1); put_line(file," ***"); new_line(file); Reduce(n+1,q); sq := Shift(q); declare pq : Poly_Sys(q'range) := Laurent_to_Polynomial_System(sq); begin Fewnomials.Solve(sq,qsols,fail); if not fail then put_line(file,"It is a fewnomial system."); else put_line(file,"No fewnomial system."); if mic.sub = null then put_line(file,"Calling the black box solver."); qsols := Symmetric_BKK_Solve(file,pq,sign); else put_line(file,"Using the refinement of the cell."); declare sup : Array_of_Lists(q'range); cnt : natural := sup'first; lif : Array_of_Lists(mix'range); lifq : Laur_Sys(q'range); begin for i in mic.pts'range loop sup(cnt) := Reduce(mic.pts(i),q'last+1); for j in 1..(mix(i)-1) loop Copy(sup(cnt),sup(cnt+j)); end loop; cnt := cnt + mix(i); end loop; lif := Induced_Lifting(n,mix,sup,mic.sub.all); lifq := Perform_Lifting(n,mix,lif,q); qsols := Symmetric_Mixed_Solve(file,sign,lifq, mic.sub.all,n,mix); Deep_Clear(sup); Deep_Clear(lif); Clear(lifq); end; end if; Set_Continuation_Parameter(qsols,CMPLX(0.0)); end if; put(file,Length_Of(qsols),1); put_line(file," solutions found."); if not Is_Null(qsols) then genqsols := Generating(qsols,sign,eps); put(file,Length_Of(genqsols),1); put_line(file," generating solutions found."); Mixed_Continuation(file,p,mic.nor.all,genqsols); Concat(sols,sols_last,genqsols); end if; Clear(pq); Clear(sq); end; Clear(q); -- Shallow_Clear(genqsols); end Solve_Subsystem; begin while not Is_Null(tmp) loop cnt := cnt + 1; Solve_Subsystem(Head_Of(tmp)); tmp := Tail_Of(tmp); end loop; return sols; end Symmetric_Mixed_Solve; end Symmetric_Polyhedral_Continuation; SHAR_EOF fi # end of overwriting check if test -f 'symmetric_polyhedral_continuation.ads' then echo shar: will not over-write existing file "'symmetric_polyhedral_continuation.ads'" else cat << "SHAR_EOF" > 'symmetric_polyhedral_continuation.ads' with text_io; use text_io; with Integer_Vectors; use Integer_Vectors; with Complex_Laurent_Polynomial_Systems; use Complex_Laurent_Polynomial_Systems; with Solutions; use Solutions; with Integer_Mixed_Subdivisions; use Integer_Mixed_Subdivisions; with Symmetry_Group; use Symmetry_Group; package Symmetric_Polyhedral_Continuation is -- DESCRIPTION : -- Polyhedral continuation based on symmetric mixed subdivision. function Symmetric_Mixed_Solve ( file : file_type; grp : List_of_Permutations; sign : boolean; p : Laur_Sys; mixsub : Mixed_Subdivision; n : natural; mix : Vector ) return Solution_List; -- DESCRIPTION : -- This function computes the generating solutions of a given -- Laurent polynomial system, by making use of its mixed subdivision. -- ON ENTRY : -- file a file to write intermediate results on; -- grp representations of the symmetry group; -- sign if true, then there is sign symmetry; -- p a lifted Laurent polynomial system; -- mixsub the mixed subdivision of the supports of p; -- n the number of polynomials in p; -- mix(k) indicates the number of occurencies of the kth support. -- REQUIRED : -- The polynomials in p should be ordered according to the -- information in the vector `mixed_type'! function Symmetric_Mixed_Solve ( file : file_type; sign : boolean; p : Laur_Sys; mixsub : Mixed_Subdivision; n : natural; mix : Vector ) return Solution_List; -- DESCRIPTION : -- Here the general permutation group is assumed. end Symmetric_Polyhedral_Continuation; SHAR_EOF fi # end of overwriting check if test -f 'symmetric_randomize.adb' then echo shar: will not over-write existing file "'symmetric_randomize.adb'" else cat << "SHAR_EOF" > 'symmetric_randomize.adb' with Complex_Numbers,Integer_Vectors; use Complex_Numbers,Integer_Vectors; with Permutations,Permute_Operations; use Permutations,Permute_Operations; with Random_Number_Generators; with Complex_Multivariate_Laurent_Polynomials; function Symmetric_Randomize ( p : Laur_Sys; v,w : List_of_Permutations ) return Laur_Sys is res : Laur_Sys(p'range); use Complex_Multivariate_Laurent_Polynomials; procedure Symmetric_Randomize_Terms ( index : in natural; py : in Poly ) is tpy : Term; procedure Permute_and_Randomize ( t : in Term ) is tmpv,tmpw : List_of_Permutations; begin tmpv := v; tmpw := w; while not Is_Null(tmpv) loop declare permt : Term := Permutation(Head_Of(tmpv).all)*t; indw : natural := Head_Of(tmpw)(index); begin if Coeff(res(indw),permt.dg) = CMPLX(0.0) then Plus_Term(res(indw),permt); end if; Clear(permt); end; tmpv := Tail_Of(tmpv); tmpw := Tail_Of(tmpw); end loop; end Permute_and_Randomize; procedure Pick_Term ( t : in Term; cont : out boolean ) is begin if Coeff(res(index),t.dg) = CMPLX(0.0) then Copy(t,tpy); tpy.cf := Random_Number_Generators.Random1; cont := false; else cont := true; end if; end Pick_Term; procedure Pick_A_Term is new Visiting_Iterator(Pick_Term); begin tpy.cf := CMPLX(0.0); Pick_A_Term(py); if tpy.cf /= CMPLX(0.0) then Permute_and_Randomize(tpy); Clear(tpy); end if; end Symmetric_Randomize_Terms; begin res := (res'range => Null_Poly); for k in res'range loop while Number_of_Terms(res(k)) < Number_of_Terms(p(k)) loop Symmetric_Randomize_Terms(k,p(k)); end loop; end loop; return res; end Symmetric_Randomize; SHAR_EOF fi # end of overwriting check if test -f 'symmetric_randomize.ads' then echo shar: will not over-write existing file "'symmetric_randomize.ads'" else cat << "SHAR_EOF" > 'symmetric_randomize.ads' with Symmetry_Group; use Symmetry_Group; with Complex_Laurent_Polynomial_Systems; use Complex_Laurent_Polynomial_Systems; function Symmetric_Randomize ( p : Laur_Sys; v,w : List_of_Permutations ) return Laur_Sys; -- DESCRIPTION : -- This function returns a polynomial system with the same Newton -- polytopes, but with randomly generated coefficients, w.r.t. to -- the symmetry relations given by v and w. -- ON ENTRY : -- p a polynomial system with n equations in n unknowns; -- v,w representations of the symmetry group. -- ON RETURN : -- a symmetric randomized polynomial system. SHAR_EOF fi # end of overwriting check if test -f 'symmetric_set_structure.adb' then echo shar: will not over-write existing file "'symmetric_set_structure.adb'" else cat << "SHAR_EOF" > 'symmetric_set_structure.adb' with unchecked_deallocation; with text_io,integer_io; use text_io,integer_io; with Lists; with Natural_Vectors; use Natural_Vectors; with Natural_Vectors_io; use Natural_Vectors_io; with Set_Structure,Templates; use Set_Structure,Templates; with Permutations,Permute_Operations; use Permutations,Permute_Operations; package body Symmetric_Set_Structure is -- DATASTRUCTURES : type set is array (natural range <>) of boolean; type boolean_array is array (natural range <>) of boolean; type link_to_boolean_array is access boolean_array; procedure free is new unchecked_deallocation(boolean_array, link_to_boolean_array); type boolean_matrix is array (natural range <>) of link_to_boolean_array; type link_to_boolean_matrix is access boolean_matrix; procedure free is new unchecked_deallocation(boolean_matrix, link_to_boolean_matrix); type set_coord is record k,l : natural; end record; type Dependency_Structure is array (natural range <>) of set_coord; type Link_to_Dependency_Structure is access Dependency_Structure; procedure free is new unchecked_deallocation(Dependency_Structure, Link_to_Dependency_Structure); package Lists_of_Dependency_Structures is new Lists ( Link_to_Dependency_Structure ); type Covering is new Lists_of_Dependency_Structures.List; -- INTERNAL DATA : cov : Covering; -- covering of the set structure lbm : link_to_boolean_matrix; -- auxiliary data structure for bookeeping during the construction -- of the covering, -- to remember which sets have already been treated. -- AUXILIARY ROUTINES FOR CONSTRUCTING THE COVERING : function Give_Set ( n,i,j : natural ) return set is -- DESCRIPTION : -- Returns the (i,j)-th set out of the set structure. s : set(1..n); begin for k in 1..n loop s(k) := Is_In(i,j,k); end loop; return s; end Give_Set; function Equal ( s1,s2 : set ) return boolean is -- DESCRIPTION : -- Returns true if both sets are equal. begin for i in s1'range loop if s1(i) /= s2(i) then return false; end if; end loop; return true; end Equal; function Find ( i,n : natural; s : set ) return natural is -- DESCRIPTION : -- Returns the first occurence of the set s in the i-th row -- of the set structure; -- returns zero if the set does not occur in the i-th row. begin for j in 1..Number_Of_Sets(i) loop if not lbm(i)(j) and then Equal(s,Give_Set(n,i,j)) then return j; end if; end loop; return 0; end Find; function Apply ( p : Permutation; s : set ) return set is -- DESCRIPTION : -- Returns the result after application of p on the set s. r : set(s'range); begin for i in p'range loop r(i) := s(p(i)); end loop; return r; end Apply; procedure Init_Covering ( n : in natural ) is -- DESCRIPTION : -- Initialization of lbm. begin lbm := new boolean_matrix(1..n); for i in 1..n loop lbm(i) := new boolean_array'(1..Number_of_Sets(i) => false); end loop; end Init_Covering; procedure Update ( dps : Dependency_Structure ) is -- DESCRIPTION : -- All pairs in dps are marked in lbm. begin for i in dps'range loop lbm(dps(i).k)(dps(i).l) := true; end loop; end Update; procedure Search ( n : in natural; i,j : out natural; empty : out boolean ) is -- DESCRIPTION : -- Searches in lbm the first (i,j)-th free set; -- returns empty if all sets have already been used. begin for k in 1..n loop for l in lbm(k)'range loop if not lbm(k)(l) then i := k; j := l; empty := false; return; end if; end loop; end loop; empty := true; end Search; -- CONSTRUCTOR FOR DEPENDENCY STRUCTURE AND COVERING : procedure Construct_Dependency_Structure ( n,m : in natural; v,w : in List_Of_Permutations; i,j : in natural; dps : in out Dependency_Structure; fail : out boolean ) is -- DESCRIPTION : -- A dependency structure will be constructed. -- ON ENTRY : -- n the dimension; -- m number of elements in dps,v and w; -- v,w matrix representations; -- i,j coordinates of a set in the dependency structure. -- ON RETURN : -- dps the dependency structure; -- fail is true if the set structure is not symmetric. s : set(1..n) := Give_Set(n,i,j); lv,lw : List_Of_Permutations; pv,pw : Permutation(1..n); ps : set(1..n); res : natural; begin lv := v; lw := w; for x in 1..m loop pw := Permutation(Head_Of(lw).all); dps(x).k := pw(i); pv := Permutation(Head_Of(lv).all); ps := Apply(pv,s); res := Find(dps(x).k,n,ps); exit when (res = 0); dps(x).l := res; lv := Tail_Of(lv); lw := Tail_Of(lw); end loop; fail := (res = 0); end Construct_Dependency_Structure; procedure Construct_Covering ( n,m : in natural; v,w : in List_Of_Permutations; fail : out boolean ) is -- DESCRIPTION : -- A covering of the set structure will be constructed. -- EFFECT : -- Initially, all entries in lbm are false; -- at the end, all entries in lbm are true (if not fail). dps : Dependency_Structure(1..m); ldps : Link_to_Dependency_Structure; empty,fl : boolean; i,j : natural; begin Init_Covering(n); Search(n,i,j,empty); while not empty loop Construct_Dependency_Structure(n,m,v,w,i,j,dps,fl); exit when fl; Update(dps); ldps := new Dependency_Structure(1..m); ldps.all := dps; Construct(ldps,cov); Search(n,i,j,empty); end loop; fail := fl; end Construct_Covering; -- OUTPUT PROCEDURES FOR COVERING : procedure Write_Set ( n,i,j : natural ) is -- DESCRIPTION : -- Writes the (i,j)-th set on the standard output. begin put('{'); for k in 1..n loop if Is_In(i,j,k) then put(' '); put('x'); put(k,1); end if; end loop; put(" }"); end Write_Set; procedure Write_Coord ( k,l : in natural ) is begin put('['); put(k,1); put(' '); put(l,1); put(']'); end Write_Coord; procedure Write_Covering is tmp : Covering := cov; ldps : Link_to_Dependency_Structure; begin put_line("The covering :"); while not Is_Null(tmp) loop ldps := Head_Of(tmp); declare nb : natural := 0; begin for i in ldps'range loop Write_Coord(ldps(i).k,ldps(i).l); nb := nb+1; if nb > 7 then new_line; nb := 0; end if; end loop; new_line; end; tmp := Tail_Of(tmp); end loop; end Write_Covering; procedure Write_Coord ( file : in file_type; k,l : in natural ) is begin put(file,'['); put(file,k,1); put(file,' '); put(file,l,1); put(file,']'); end Write_Coord; procedure Write_Covering ( file : in file_type ) is tmp : Covering := cov; ldps : Link_to_Dependency_Structure; begin put_line(file,"The covering :"); while not Is_Null(tmp) loop ldps := Head_Of(tmp); declare nb : natural := 0; begin for i in ldps'range loop Write_Coord(file,ldps(i).k,ldps(i).l); nb := nb+1; if nb > 7 then new_line(file); nb := 0; end if; end loop; new_line(file); end; tmp := Tail_Of(tmp); end loop; end Write_Covering; -- CONSTRUCTION OF TEMPLATES : procedure Init_Template ( n : in natural ) is -- DESCRIPTION : -- Initialization of the template. h : Natural_Vectors.Vector(0..n) := (0..n => 0); begin Templates.Create(n); for i in 1..n loop for j in 1..Number_Of_Sets(i) loop Templates.Add_Hyperplane(i,h); end loop; end loop; end Init_Template; procedure First_Equivariant_Template ( n : in natural; cnt : in out natural ) is -- DESCRIPTION : -- Constructs the first equation of the template, for an equivariant -- linear product system system -- ON ENTRY : -- n the dimension; -- cnt counts the number of free coefficients. h : Natural_Vectors.Vector(0..n); begin for j in 1..Templates.Number_of_Hyperplanes(1) loop Templates.Get_Hyperplane(1,j,h); cnt := cnt + 1; h(0) := cnt; for k in 1..n loop if Set_Structure.Is_In(1,j,k) then if cnt = h(0) then cnt := cnt + 1; end if; h(k) := cnt; end if; end loop; Templates.Change_Hyperplane(1,j,h); end loop; end First_Equivariant_Template; function Action ( i,n : natural ; g : List_of_Permutations ) return Permutation is -- DESCRIPTION : -- Returns the group action from the list g that permutes the first -- array of sets into the ith one. p : Permutation(1..n); first,second : Natural_Vectors.Vector(1..n); tmp : List_of_Permutations := g; begin for k in 1..n loop if Set_Structure.Is_In(1,1,k) then first(k) := 1; else first(k) := 0; end if; if Set_Structure.Is_In(i,1,k) then second(k) := 1; else second(k) := 0; end if; end loop; while not Is_Null(tmp) loop p := Permutation(Head_Of(tmp).all); if second = p*first then return p; end if; tmp := Tail_Of(tmp); end loop; p := (p'range => 0); return p; end Action; procedure Propagate_Equivariant_Template ( n : in natural; g : in List_of_Permutations; fail : out boolean ) is -- DESCRIPTION : -- Given a template whose first equation is already constructed, -- the rest of the template will be constructed, with the aid of the -- list of generating permutations. h : Natural_Vectors.Vector(0..n); p : Permutation(1..n); begin for i in 2..n loop p := Action(i,n,g); if p = (p'range => 0) then fail := true; return; end if; for j in 1..Templates.Number_of_Hyperplanes(i) loop Templates.Get_Hyperplane(1,j,h); h(1..n) := p*h(1..n); Templates.Change_Hyperplane(i,j,h); end loop; end loop; fail := false; end Propagate_Equivariant_Template; procedure Construct_Part_of_Template ( n,m : in natural; v : in List_Of_Permutations; dps : in Dependency_Structure; invpv1 : in Permutation; cnt : in out natural ) is -- DESCRIPTION : -- This procedure constructs the coefficients of the hyperplanes -- associated with the sets in the dependency structure dps. -- cnt counts the number of free coefficients. lv : List_Of_Permutations; pv : Permutation(1..n); h : Natural_Vectors.Vector(0..n); indi : natural; begin -- GENERATE CONSTANT COEFFICIENT : cnt := cnt+1; for j in 1..m loop Templates.Get_Hyperplane(dps(j).k,dps(j).l,h); h(0) := cnt; Templates.Change_Hyperplane(dps(j).k,dps(j).l,h); end loop; -- GENERATE THE OTHER COEFFICIENTS : for i in 1..n loop -- GENERATE : if Is_In(dps(1).k,dps(1).l,i) then Templates.Get_Hyperplane(dps(1).k,dps(1).l,h); if h(i) = 0 then cnt := cnt + 1; -- PROPAGATE : --put("PROPAGATING "); put(i,1); --put_line("-th coefficient :"); lv := v; for j in 1..m loop pv := Permutation(Head_Of(lv).all); indi := 0; for l in 1..n loop if pv(l) = invpv1(i) then indi := l; exit; end if; end loop; --Write_Coord(dps(j).k,dps(j).l); put(" : "); --Write_Set(n,dps(j).k,dps(j).l); --put(" indi : "); put(indi,1); new_line; Templates.Get_Hyperplane(dps(j).k,dps(j).l,h); h(indi) := cnt; Templates.Change_Hyperplane(dps(j).k,dps(j).l,h); lv := Tail_Of(lv); end loop; --put_line("RANDOM PRODUCT SYSTEM AFTER PROPAGATION :"); --Write_RPS(n,2,4,3); --for l in 1..75 loop put("+"); end loop; new_line; end if; end if; end loop; end Construct_Part_of_Template; procedure Construct_Template ( n,m : in natural; v : in List_Of_Permutations; nbfree : out natural ) is -- DESCRIPTION : -- Given a covering of the set structure, -- the data of the package Random_Product_System will be filled. -- ON ENTRY : -- n the dimension of the vectors -- m the number of entries in v -- v matrix representations of the group -- ON RETURN : -- nbfree the number of free coefficients tmp : Covering := cov; ldps : Link_to_Dependency_Structure; invpv1 : Permutation(1..n); cnt : natural; begin Init_Template(n); cnt := 0; -- CONSTRUCT THE BASE SET OF dps : invpv1 := inv(Permutation(Head_Of(v).all)); -- then for each pv in v: permutation of the base set -- is defined as pv*invpv1. --put("invpv1 : "); Put(invpv1); new_line; while not Is_Null(tmp) loop ldps := Head_Of(tmp); Construct_Part_of_Template(n,m,v,ldps.all,invpv1,cnt); tmp := Tail_Of(tmp); end loop; nbfree := cnt; end Construct_Template; procedure Construct_Equivariant_Template ( n : in natural; g : in List_of_Permutations; cntfree : in out natural; fail : out boolean ) is -- DESCRIPTION : -- Constructs a template for an equivariant system. The list g contains -- the generating elements of the group. The variable cntfree counts the -- number of free coefficients. begin Init_Template(n); First_Equivariant_Template(n,cntfree); Propagate_Equivariant_Template(n,g,fail); end Construct_Equivariant_Template; procedure Write_Templates ( n : in natural ) is begin Write_Templates(Standard_Output,n); end Write_Templates; procedure Write_Templates ( file : in file_type; n : in natural ) is h : Natural_Vectors.Vector(0..n); begin put_line(file,"The templates :"); for i in 1..n loop for j in 1..Number_of_Hyperplanes(i) loop put(file,"("); put(file,i,1); put(file,","); put(file,j,1); put(file,") : "); Get_Hyperplane(i,j,h); put(file,h); new_line(file); end loop; end loop; end Write_Templates; -- CONSTRUCTION OF START SYSTEMS : procedure Equivariant_Start_System ( n : in natural; g : in List_of_Permutations; fail : out boolean ) is nbfree : natural := 0; fl : boolean := false; begin Construct_Equivariant_Template(n,g,nbfree,fl); if not fl then Templates.Polynomial_System(n,nbfree); end if; fail := fl; end Equivariant_Start_System; procedure Symmetric_Start_System ( n,bb : in natural; lp : in List; v,w : in List_Of_Permutations; notsymmetric,degenerate : out boolean ) is m : natural := Number(v); fl : boolean; nbfree : natural; begin Construct_Covering(n,m,v,w,fl); -- Write_Covering; for i in lbm'range loop free(lbm(i)); end loop; free(lbm); if fl then notsymmetric := true; -- put_line("The set structure is not (G,V,W)-symmetric."); else notsymmetric := false; -- put_line("The set structure is (G,V,W)-symmetric."); -- Templates.Create(n); Construct_Template(n,m,v,nbfree); -- Write_Templates(n); -- vb := Templates.Verify(n,lp); -- put("The bound of Templates.Verify : "); put(vb,1); new_line; -- if bb /= vb -- then degenerate := true; -- put_line("The set structure is degenerate."); -- else degenerate := false; -- put_line("The set structure is not degenerate."); Templates.Polynomial_System(n,nbfree); -- end if; end if; end Symmetric_Start_System; -- DESTRUCTOR : procedure Clear is use Lists_of_Dependency_Structures; tmp : Covering := cov; elem : Link_to_Dependency_Structure; begin while not Is_Null(tmp) loop elem := Head_Of(tmp); free(elem); tmp := Tail_Of(tmp); end loop; Clear(cov); Templates.Clear; end Clear; end Symmetric_Set_Structure; SHAR_EOF fi # end of overwriting check if test -f 'symmetric_set_structure.ads' then echo shar: will not over-write existing file "'symmetric_set_structure.ads'" else cat << "SHAR_EOF" > 'symmetric_set_structure.ads' with text_io; use text_io; with Symmetry_Group; use Symmetry_Group; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; package Symmetric_Set_Structure is -- DESCRIPTION : -- The aim of this package is the construction of a symmetric -- start system, given a symmetric set structure. -- CONSTRUCTORS : procedure Equivariant_Start_System ( n : in natural; g : in List_of_Permutations; fail : out boolean ); -- DESCRIPTION : -- Constructs an equivariant linear-product start system. -- When not fail on return, the package Random_Product_System -- contains the data for generating the polynomial system. -- REQUIRED : -- The data of the package Set_Structure may not be empty! -- ON ENTRY : -- n the dimension of the problem; -- g the list of generating permutations. -- ON RETURN : -- fail if true, then the set structure was not equivariant. procedure Symmetric_Start_System ( n,bb : in natural; lp : in List; v,w : in List_of_Permutations; notsymmetric,degenerate : out boolean ); -- DESCRIPTION : -- After calling this routine, the package Random_Product_System -- contains the data for a symmetric random product system, -- when notsymmetric and degenerate are false on return. -- REQUIRED : -- The data of the package Set_Structure may not be empty! -- ON ENTRY : -- n the dimension of the problem; -- bb the Bezout number based on the set structure; -- lp list of positions indicating the acceptable -- classes in the set structure; -- v,w representations of the symmetry group. -- ON RETURN : -- notsymmetric is true if the set structure is not symmetric; -- degenerate is true if the set structure is degenerate. -- SELECTORS procedure Write_Covering; procedure Write_Covering ( file : in file_type ); procedure Write_Templates ( n : in natural ); procedure Write_Templates ( file : in file_type; n : in natural ); -- DESCRIPTION : -- These procedure write an intermediate data structures -- in the construction of a symmetric start system. -- DESTRUCTOR : procedure Clear; -- DESCRIPTION : -- All allocated memory space will be freed. end Symmetric_Set_Structure; SHAR_EOF fi # end of overwriting check if test -f 'symmetry_group.adb' then echo shar: will not over-write existing file "'symmetry_group.adb'" else cat << "SHAR_EOF" > 'symmetry_group.adb' with Integer_Vectors; package body Symmetry_Group is use Lists_of_Permutations; procedure Add ( l : in out List_of_Permutations; p : in Permutation ) is lp : Link_To_Permutation; begin lp := new Integer_Vectors.Vector'(Integer_Vectors.Vector(p)); Construct(lp,l); end Add; procedure Append ( first,last : in out List_of_Permutations; p : in Permutation ) is lp : Link_To_Permutation; begin lp := new Integer_Vectors.Vector'(Integer_Vectors.Vector(p)); Append(first,last,lp); end Append; function Union ( a,b : List_of_Permutations ) return List_of_Permutations is tmp,res : List_of_Permutations; begin res := a; tmp := b; while not Is_Null(tmp) loop Add(res,Permutation(Head_Of(tmp).all)); tmp := Tail_Of(tmp); end loop; return res; end Union; function SymGrp ( n : natural ) return List_of_Permutations is sn : List_of_Permutations; p : Integer_Vectors.Vector(1..n); begin for k in p'range loop p(k) := k; end loop; for k in reverse 1..n loop p(k) := 1; p(1) := k; declare lp : Link_to_Permutation := new Integer_Vectors.Vector'(p); begin Construct(lp,sn); end; p(1) := 1; p(k) := k; end loop; return sn; end SymGrp; function Generate ( g : List_of_Permutations ) return List_of_Permutations is res : List_Of_Permutations; at_end : boolean; -- IMPORTANT : -- This routine assumes that permutations are added to the front -- of the list !!! begin if not Is_Null(g) then declare p1,p2,r : Permutation(Head_Of(g).all'range); temp1,temp2,nwres : List_Of_Permutations; nb,cnt : natural; begin -- INITIALIZE res : temp1 := g; while not Is_Null(temp1) loop p1 := Permutation(Head_Of(temp1).all); Add(res,p1); temp1 := Tail_Of(temp1); end loop; -- CONSTRUCT res : at_end := false; nb := Length_Of(res); while not at_end loop temp1 := g; --res; while not Is_Null(temp1) loop p1 := Permutation(Head_Of(temp1).all); cnt := 0; temp2 := res; while cnt < nb loop p2 := Permutation(Head_Of(temp2).all); r := p1*p2; if not Is_In(res,r) and not Is_In(nwres,r) then Add(nwres,r); end if; cnt := cnt + 1; temp2 := Tail_Of(temp2); end loop; temp1 := Tail_Of(temp1); end loop; nb := Length_Of(nwres); at_end := (nb = 0); if not at_end then temp2 := nwres; while not Is_Null(temp2) loop Add(res,Permutation(Head_Of(temp2).all)); temp2 := Tail_Of(temp2); end loop; Clear(nwres); end if; end loop; end; end if; return res; end Generate; -- SELECTORS : function Number (l : List_Of_Permutations) return natural is begin return Length_Of(l); end Number; function Is_In ( l : List_of_Permutations; p : Permutation ) return boolean is tmp : List_Of_Permutations := l; begin while not Is_Null(tmp) loop if Equal(Permutation(Head_Of(tmp).all),p) then return true; else tmp := Tail_Of(tmp); end if; end loop; return false; end Is_In; procedure Iterator ( l : in List_of_Permutations ) is tmp : List_Of_Permutations := l; cont : boolean; begin cont := false; while not Is_Null(tmp) loop Process(Permutation(Head_Of(tmp).all),cont); exit when not cont; tmp := Tail_Of(tmp); end loop; end Iterator; -- DESTRUCTOR : procedure Clear ( l : in out List_of_Permutations ) is begin Lists_of_Permutations.Clear(Lists_of_Permutations.List(l)); end Clear; end Symmetry_Group; SHAR_EOF fi # end of overwriting check if test -f 'symmetry_group.ads' then echo shar: will not over-write existing file "'symmetry_group.ads'" else cat << "SHAR_EOF" > 'symmetry_group.ads' with Lists; with Permutations; use Permutations; package Symmetry_Group is -- DESCRIPTION : -- This package offers operations on elements of a symmetry group. package Lists_of_Permutations is new Lists(Link_to_Permutation); type List_of_Permutations is new Lists_of_Permutations.List; -- CONSTRUCTORS : procedure Add ( l : in out List_of_Permutations; p : in Permutation ); -- DESCRIPTION : -- Adds the permutation p to the front of the list l. procedure Append ( first,last : in out List_Of_Permutations; p : in Permutation ); -- DESCRIPTION : -- appends the permutation p to the list l1 -- ON ENTRY : -- first a list of permutations; -- last a pointer to the last element of the list first; -- p a permutation. -- ON RETURN : -- first the list to which p has been appended; -- last points to the last element of first. function Union ( a,b : List_of_Permutations ) return List_of_Permutations; -- DESCRIPTION : -- Returns the union of the two groups. function SymGrp ( n : natural ) return List_of_Permutations; -- DESCRIPTION : -- Return the transpositions that generate the full symmetry group -- of all permutations. function Generate ( g : List_of_Permutations ) return List_Of_Permutations; -- DESCRIPTION : -- This functions returns all possible permutations generated by g. -- SELECTORS : function Number ( l : List_of_Permutations ) return natural; -- DESCRIPTION : -- Returns the number of elements in l. function Is_In ( l : List_of_Permutations; p : Permutation ) return boolean; -- DESCRIPTION : -- Returns true if the permutation p belongs to the list l, returns false -- when this is not the case. generic with procedure Process ( p : in Permutation; continue : in out boolean ); procedure Iterator ( l : in List_of_Permutations ); -- DESCRIPTION : -- This iterator allows to enumerate all the elements -- in the list of permutations. -- DESTRUCTOR : procedure Clear ( l : in out List_of_Permutations ); -- DESCRIPTION : -- Deallocates the memory space occupied by the list of permutations. end Symmetry_Group; SHAR_EOF fi # end of overwriting check if test -f 'symmetry_group_io.adb' then echo shar: will not over-write existing file "'symmetry_group_io.adb'" else cat << "SHAR_EOF" > 'symmetry_group_io.adb' with integer_io; use integer_io; package body Symmetry_Group_io is procedure get ( p : out Permutation ) is begin get(Standard_Input,p); end get; procedure get ( file : in file_type; p : out Permutation ) is begin for i in p'range loop get(file,p(i)); end loop; end get; procedure get ( l : in out List_of_Permutations; n,nb : in natural ) is begin get(Standard_Input,l,n,nb); end get; procedure get ( file : in file_type; l : in out List_of_Permutations; n,nb : in natural ) is p : Permutation(1..n); l2 : List_of_Permutations; begin for i in 1..nb loop get(file,p); if Is_Permutation(p) then Append(l,l2,p); end if; end loop; end get; procedure put ( p : in Permutation ) is begin put(Standard_Output,p); end put; procedure put ( file : in file_type; p : in Permutation ) is begin for i in p'range loop put(file,' '); put(file,p(i),1); end loop; end put; procedure put ( l : in List_of_Permutations ) is begin put(Standard_Output,l); end put; procedure put ( file : in file_type; l : in List_of_Permutations ) is temp : List_of_Permutations := l; begin while not Is_Null(temp) loop put(file,Permutation(Head_Of(temp).all)); new_line(file); temp := Tail_Of(temp); end loop; end put; end Symmetry_Group_io; SHAR_EOF fi # end of overwriting check if test -f 'symmetry_group_io.ads' then echo shar: will not over-write existing file "'symmetry_group_io.ads'" else cat << "SHAR_EOF" > 'symmetry_group_io.ads' with text_io; use text_io; with Permutations,Symmetry_Group; use Permutations,Symmetry_Group; package Symmetry_Group_io is -- DESCRIPTION : -- This package contains routines for input and output of -- permutations and groups of permutations. procedure get ( p : out Permutation ); procedure get ( file : in file_type; p : out Permutation ); -- DESCRIPTION : -- Reads a permutation from standard input or from file. procedure get ( l : in out List_of_Permutations; n,nb : in natural ); procedure get ( file : in file_type; l : in out List_of_Permutations; n,nb : in natural ); -- DESCRIPTION : -- Reads a list of permutations from standard in put or from file. -- Vectors that do not represent permutations are ignored. -- ON ENTRY : -- n the number of elements in the permutations; -- nb the total number of permutations that must be read. procedure put ( p : in Permutation ); procedure put ( file : in file_type; p : in Permutation ); -- DESCRIPTION : -- Writes a permutation on standard output or on file. procedure put ( l : in List_of_Permutations ); procedure put ( file : in file_type; l : in List_of_Permutations ); -- DESCRIPTION : -- Writes a list of permutations on standard output or on file. end Symmetry_Group_io; SHAR_EOF fi # end of overwriting check if test -f 'templates.adb' then echo shar: will not over-write existing file "'templates.adb'" else cat << "SHAR_EOF" > 'templates.adb' with unchecked_deallocation; with Lists; with Random_Product_System; with Complex_Numbers,Complex_Vectors; use Complex_Numbers; with Random_Number_Generators; package body Templates is -- DATA STRUCTURES : package List_of_Vectors is new Lists(Link_to_Vector); type Equation_List is new List_of_Vectors.List; type Equation is record first,last : Equation_List; end record; type Equations is array(positive range <>) of Equation; type Link_To_Equations is access Equations; procedure free is new unchecked_deallocation (Equations,Link_To_Equations); -- INTERNAL DATA : rps : Link_To_Equations; -------------------- -- CONSTRUCTORS -- -------------------- procedure Create ( n : in natural ) is begin rps := new Equations(1..n); end Create; procedure Add_Hyperplane ( i : in natural; h : in Vector ) is eqi : Equation renames rps(i); lh : Link_To_Vector := new Vector'(h); begin if Is_Null(eqi.first) then Construct(lh,eqi.first); eqi.last := eqi.first; else declare temp : Equation_List; begin Construct(lh,temp); Swap_Tail(eqi.last,temp); eqi.last := Tail_Of(eqi.last); end; end if; end Add_Hyperplane; procedure Change_Hyperplane ( i,j : in natural; h : in Vector ) is begin if rps = null then return; else declare eqi : Equation_List := rps(i).first; lv : Link_To_Vector; count : natural := 1; begin while not Is_Null(eqi) loop if count = j then lv := Head_Of(eqi); for k in h'range loop lv(k) := h(k); end loop; return; else count := count + 1; eqi := Tail_Of(eqi); end if; end loop; end; end if; end Change_Hyperplane; ----------------- -- SELECTORS -- ----------------- function Number_of_Hyperplanes ( i : natural ) return natural is begin if rps = null then return 0; else return Length_Of(rps(i).first); end if; end Number_of_Hyperplanes; procedure Get_Hyperplane ( i,j : in natural; h : out Vector ) is begin h := (h'range => 0); if rps = null then return; else declare eqi : Equation_List := rps(i).first; count : natural := 1; begin while not Is_Null(eqi) loop if count = j then h := Head_Of(eqi).all; return; else count := count + 1; eqi := Tail_Of(eqi); end if; end loop; end; end if; end Get_Hyperplane; procedure Polynomial_System ( n,nbfree : in natural ) is rndms : Complex_Vectors.Vector(0..nbfree); begin -- GENERATE THE FREE COEFFICIENTS : rndms(0) := CMPLX(0.0); for i in rndms'first+1..rndms'last loop -- rndms(i) := CMPLX(Random_Number_Generators.Random); rndms(i) := Random_Number_Generators.Random1; -- random complex number with modulus one end loop; -- BUILD THE RANDOM PRODUCT SYSTEM : Random_Product_System.Init(n); for i in 1..n loop for j in 1..Number_of_Hyperplanes(i) loop declare ih : Natural_Vectors.Vector(0..n); h : Complex_Vectors.Vector(0..n); begin Get_Hyperplane(i,j,ih); for k in h'range loop h(k) := rndms(ih(k)); end loop; Random_Product_System.Add_Hyperplane(i,h); end; end loop; end loop; end Polynomial_System; function Verify ( n : natural; lp : List ) return natural is temp : List := lp; stop : boolean := false; matrix : array (1..n,1..n) of natural; nb : natural; function Degenerate return boolean is degen : boolean; first : natural; begin for i in 1..n loop first := matrix(i,1); degen := true; for j in 2..n loop if matrix(i,j) /= first then degen := false; end if; exit when not degen; end loop; if degen then return true; end if; end loop; for j in 1..n loop first := matrix(1,j); degen := true; for i in 2..n loop if matrix(i,j) /= first then degen := false; end if; exit when not degen; end loop; if degen then return true; end if; end loop; return false; end Degenerate; procedure PVerify ( i,n : in natural; sum : in out natural ) is begin if i > n then if Is_Null(temp) then sum := sum + 1; stop := true; elsif Degenerate then stop := true; else temp := Tail_Of(temp); sum := sum + 1; end if; else declare eqi : Equation_List := rps(i).first; h : Vector(0..n); count : natural := 0; begin while not Is_Null(eqi) loop count := count + 1; if count = Head_Of(temp)(i) then h := Head_Of(eqi).all; for j in 1..n loop matrix(i,j) := h(j); end loop; PVerify(i+1,n,sum); end if; exit when stop; eqi := Tail_Of(eqi); end loop; end; end if; end PVerify; begin nb := 0; if not Is_Null(temp) then PVerify(1,n,nb); end if; return nb; end Verify; ------------------ -- DESTRUCTOR -- ------------------ procedure Clear ( eql : in out Equation_List ) is temp : Equation_List := eql; lv : Link_To_Vector; begin while not Is_Null(temp) loop lv := Head_Of(temp); Clear(lv); temp := Tail_of(temp); end loop; List_Of_Vectors.Clear(List_Of_Vectors.List(eql)); end Clear; procedure Clear ( eq : in out Equation ) is begin Clear(eq.first); -- eq.last is just a pointer to the last element of eq.first; -- if eq.first disappears, then also eq.last does end Clear; procedure Clear ( eqs : in out Equations ) is begin for i in eqs'range loop Clear(eqs(i)); end loop; end Clear; procedure Clear is begin if rps /= null then for i in rps'range loop Clear(rps(i)); end loop; free(rps); end if; end Clear; end Templates; SHAR_EOF fi # end of overwriting check if test -f 'templates.ads' then echo shar: will not over-write existing file "'templates.ads'" else cat << "SHAR_EOF" > 'templates.ads' with Natural_Vectors; use Natural_Vectors; with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; package Templates is -- DESCRIPTION : -- This package provides the basic data abstraction to be used for the -- construction of a symmetric linear-product start system. -- DATA STRUCTURES : -- A template for an n-dimensional system is made of a table -- of natural vectors h(*). -- If h(i) = 0, then this coefficient h(i) will be zero, -- elsif h(i) = j /= 0, -- then this coefficient h(i) will be the j-th random number. -- Therefore the following will be used: -------------------- -- CONSTRUCTORS -- -------------------- procedure Create ( n : in natural ); -- DESCRIPTION : -- Allocates memory space to contain a template for -- an n-dimensional polynomial system. procedure Add_Hyperplane ( i : in natural; h : in Vector ); -- DESCRIPTION : -- The hyperplane h is added to the i-the equation of the -- random product system. -- REQUIRED : __n_ -- i <= n \ -- h : Vector(0..n) representing h(0) + > h(j) x -- /___ j -- j=1 procedure Change_Hyperplane ( i,j : in natural; h : in Vector ); -- DESCRIPTION : -- The (i,j)-th hyperplane will be changed into h. ----------------- -- SELECTORS -- ----------------- function Number_of_Hyperplanes ( i : natural ) return natural; -- DESCRIPTION : -- returns the number of added hyperplanes for the i-th equation procedure Get_Hyperplane ( i,j : in natural; h : out Vector ); -- DESCRIPTION : -- returns the j-th hyperplane h for the i-th equation procedure Polynomial_System ( n,nbfree : in natural ); -- DESCRIPTION : -- Based on the template, an n-dimensional random product -- polynomial system will be generated. -- The parameter nbfree indicates the number of free coefficients. -- After calling this routine, the package Random_Product_System -- will contain the data for a polynomial system. function Verify ( n : natural; lp : List ) return natural; -- DESCRIPTION : -- Computes the number of finite nonsingular solutions -- of the final symmetric polynomial system. -- The list of positions lp indicates where the acceptable -- classes in the structure can be found. -- The structure is degenerate if this number does not -- correspond with the generalized Bezout number. ------------------ -- DESTRUCTOR -- ------------------ procedure Clear; -- DESCRIPTION : -- This procedure frees all memory space used by the template. end Templates; SHAR_EOF fi # end of overwriting check cd .. cd .. if test ! -d 'System' then mkdir 'System' fi cd 'System' if test -f 'READ_ME' then echo shar: will not over-write existing file "'READ_ME'" else cat << "SHAR_EOF" > 'READ_ME' UNIX dependent features and general utilities. 1. Command-line arguments, timing and system calls : ucmdline Unix_Command_Line rusage Unix_Resource_Usage timing Timing_Package system_call System_Call machines Machines byemess Bye_Bye_Message 2. Dialogues with user commuser Communications_with_User file_ops File_Operations SHAR_EOF fi # end of overwriting check if test -f 'bye_bye_message.adb' then echo shar: will not over-write existing file "'bye_bye_message.adb'" else cat << "SHAR_EOF" > 'bye_bye_message.adb' with Ada.Calendar; use Ada.Calendar; function Bye_Bye_Message return string is date : time := Clock; function Convert1 ( n : integer ) return character is begin case n is when 1 => return '1'; when 2 => return '2'; when 3 => return '3'; when 4 => return '4'; when 5 => return '5'; when 6 => return '6'; when 7 => return '7'; when 8 => return '8'; when 9 => return '9'; when others => return '0'; end case; end Convert1; function Convert2 ( n : integer ) return string is begin if n < 10 then declare res : string(1..1); begin res(1) := Convert1(n); return res; end; else declare n10 : integer := n/10; n1 : integer := n mod 10; last : string(1..1); first : constant string := Convert2(n10); begin last(1) := Convert1(n1); return first & last; end; end if; end Convert2; function Convert ( d : Time ) return string is yr : Year_Number; mo : Month_Number; da : Day_Number; se : Day_Duration; begin Split(d,yr,mo,da,se); return Convert2(da) & "/" & Convert2(mo) & "/" & Convert2(yr); end Convert; begin return "PHC worked" & " on " & Convert(date) & "."; end Bye_Bye_Message; SHAR_EOF fi # end of overwriting check if test -f 'bye_bye_message.ads' then echo shar: will not over-write existing file "'bye_bye_message.ads'" else cat << "SHAR_EOF" > 'bye_bye_message.ads' function Bye_Bye_Message return string; -- DESCRIPTION : -- A bye bye message is a logistics stamp in the form : -- PHC worked for at () on . -- The items between <> are filled in by making the appropriate system calls. SHAR_EOF fi # end of overwriting check if test -f 'communications_with_user.adb' then echo shar: will not over-write existing file "'communications_with_user.adb'" else cat << "SHAR_EOF" > 'communications_with_user.adb' package body Communications_with_User is -- AUXILIARY : function Is_In ( s : string; ch : character ) return boolean is -- DESCRIPTION : -- Returns true if the character occurs in the string, false otherwise. begin for i in s'range loop if s(i) = ch then return true; end if; end loop; return false; end Is_In; -- TARGET ROUTINES : function Read_String return string is temp : string(1..80); cnt : natural; begin put("Give a string of characters : "); get_line(temp,cnt); return temp(1..cnt); end Read_String; procedure Ask ( ans : out character ) is ch : character; begin loop get(ch); skip_line; exit when Valid_Alternative(ch); put("Invalid alternative. Please try again : "); end loop; ans := ch; end Ask; procedure Ask_Yes_or_No ( ans : out character ) is function Yes_or_No ( alt : character ) return boolean is begin if alt = 'y' or else alt = 'n' then return true; else return false; end if; end Yes_or_No; procedure Yes_or_No_Ask is new Ask (Yes_or_No); begin Yes_or_No_Ask(ans); end Ask_Yes_or_No; procedure Ask_Alternative ( ans : out character; alternatives : in string ) is function Is_Valid ( alt : character ) return boolean is begin return Is_In(alternatives,alt); end Is_Valid; procedure Ask_Alt is new Ask ( Is_Valid ); begin Ask_Alt(ans); end Ask_Alternative; procedure Ask_Alternative ( ans : in out string; alternatives : string; prefix : in character ) is ok : boolean := false; tmp : string(1..10); ind,cnt : natural; begin loop get_line(tmp,cnt); ans := " "; ind := 1; while (ans(1) = ' ') and (ind <= cnt) loop ans(1) := tmp(ind); ind := ind+1; end loop; if ans(1) = prefix then while (ans(2) = ' ') and (ind <= cnt) loop ans(2) := tmp(ind); ind := ind+1; end loop; if Is_In(alternatives,ans(2)) then ok := true; else put("Invalid alternative. Please try again : "); end if; else if Is_In(alternatives,ans(1)) then ok := true; else put("Invalid alternative. Please try again : "); end if; end if; exit when ok; end loop; end Ask_Alternative; procedure Read_Name_and_Open_File ( file : in out file_type ) is name : constant string := Read_String; begin Open(file,in_file,name); exception when NAME_ERROR => put_line("The file could not be located, please try again..."); Read_Name_and_Open_File(file); when USE_ERROR => put_line("File is not readable, please try again..."); Read_Name_and_Open_File(file); end Read_Name_and_Open_File; procedure Read_Name_and_Create_File ( file : in out file_type ) is filename : constant string := Read_String; ans : character; temp : file_type; procedure Retry is begin Create(file,out_file,filename); exception when USE_ERROR => put_line("Could not create file, file already in use."); put_line("Please, try again..."); Read_Name_and_Create_File(file); when NAME_ERROR => put_line("Could not create file, perhaps wrong directory ?"); put_line("Please, try again..."); Read_Name_and_Create_File(file); end Retry; begin Open(temp,in_file,filename); Close(temp); put("There exists already a file named "); put_line(filename); put("Do you want to destroy this file ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then create(file,out_file,filename); else Read_Name_and_Create_File(file); end if; exception when others => Retry; end Read_Name_and_Create_File; procedure Open_Input_File ( file : in out file_type; filename : in string ) is begin Open(file,in_file,filename); exception when NAME_ERROR => put("The file "); put(filename); put_line(" could not be located, please try again..."); Read_Name_and_Open_File(file); when USE_ERROR => put("The file "); put(filename); put_line(" is not readable, please try again..."); Read_Name_and_Open_File(file); end Open_Input_File; procedure Create_Output_File ( file : in out file_type; filename : in string ) is ans : character; temp : file_type; procedure Retry is begin Create(file,out_file,filename); exception when USE_ERROR => put("Could not create file "); put(filename); put_line(", file already in use."); put_line("Please, try again..."); Read_Name_and_Create_File(file); when NAME_ERROR => put("Could not create file "); put(filename); put_line(", perhaps wrong directory ?"); put_line("Please, try again..."); Read_Name_and_Create_File(file); end Retry; begin if filename = "" then new_line; put_line("Reading the name of the output file."); Read_Name_and_Create_File(file); else Open(temp,in_file,filename); Close(temp); new_line; put("There exists already a file named "); put_line(filename); put("Do you want to destroy this file ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then create(file,out_file,filename); else Read_Name_and_Create_File(file); end if; end if; exception when others => Retry; end Create_Output_File; end Communications_with_User; SHAR_EOF fi # end of overwriting check if test -f 'communications_with_user.ads' then echo shar: will not over-write existing file "'communications_with_user.ads'" else cat << "SHAR_EOF" > 'communications_with_user.ads' with text_io; use text_io; package Communications_with_User is -- DESCRIPTION : -- This package provides some routines which make the -- communication with the user more easy. -- They help in catching typing errors. function Read_String return string; -- DESCRIPTION : -- Reads a string from standard input and returns it to the caller. -- The length of the input string must be smaller than 80 characters. generic with function Valid_Alternative ( alt : character ) return boolean; procedure Ask ( ans : out character ); -- DESCRIPTION : -- This procedure keeps reading a character from standard input, -- until a valid one has been given. -- The function Valid_Alternative decides whether a certain -- character corresponds to a valid answer to the question. procedure Ask_Yes_or_No ( ans : out character ); -- DESCRIPTION : -- Keeps reading a character from standard output, -- until the user gives a 'y' or a 'n'. procedure Ask_Alternative ( ans : out character; alternatives : in string ); -- DESCRIPTION : -- This procedure keeps reading a character from standard input, -- until a character that belongs to the string s has been given. procedure Ask_Alternative ( ans : in out string; alternatives : string; prefix : in character ); -- DESCRIPTION : -- Ask the user to give a character that occurs in the string of -- alternatives, eventually preceded by the given prefix character. -- This procedure keeps reading till a valid choice has been made. -- REQUIRED : ans'range = 1..2. procedure Read_Name_and_Open_File ( file : in out file_type ); -- DESCRIPTION : -- This procedure reads a name from standard input and -- tries to open this file for input. -- If this is unsuccesful, then another name will be asked. procedure Read_Name_and_Create_File ( file : in out file_type ); -- DESCRIPTION : -- This procedure reads a name from standard input and -- a file with this name will be created for output. -- If a file with the given name already exists, -- the user will be asked if the existing file may be destroyed. procedure Open_Input_File ( file : in out file_type; filename : in string ); -- DESCRIPTION : -- Tries to open a file for input, starting with the given file name. -- If the opening of the file with the given name is not succesful, -- then the procedure `Read_Name_and_Open_File' will be invoked. procedure Create_Output_File ( file : in out file_type; filename : in string ); -- DESCRIPTION : -- This procedure creates an output file, starting with the given -- file name. If the creation of a file with this name is unsuccesful, -- then the procedure `Read_Name_and_Create_File' will be invoked. end Communications_with_User; SHAR_EOF fi # end of overwriting check if test -f 'file_operations.adb' then echo shar: will not over-write existing file "'file_operations.adb'" else cat << "SHAR_EOF" > 'file_operations.adb' package body File_Operations is procedure Scan ( file : in file_type; ch : in character; found : out boolean ) is c : character; begin while not End_of_File(file) loop get(file,c); if c = ch then found := true; return; end if; end loop; found := false; end Scan; procedure Scan ( file : in file_type; banner : in string; found : out boolean ) is index : natural := banner'first-1; ch : character; begin while not End_of_File(file) loop get(file,ch); if index < banner'first then if ch = banner(banner'first) then index := banner'first+1; end if; else if ch = banner(index) then index := index + 1; else index := banner'first-1; end if; end if; exit when index > banner'last; end loop; if index > banner'last then found := true; else found := false; end if; exception when others => found := false; return; end Scan; procedure Scan_and_Skip ( file : in file_type; banner : in string; found : out boolean ) is fnd : boolean; begin Scan(file,banner,fnd); if fnd then skip_line(file); end if; found := fnd; end Scan_and_Skip; end File_Operations; SHAR_EOF fi # end of overwriting check if test -f 'file_operations.ads' then echo shar: will not over-write existing file "'file_operations.ads'" else cat << "SHAR_EOF" > 'file_operations.ads' with text_io; use text_io; package File_Operations is -- DESCRIPTION : -- This package collects some useful operations on text files. procedure Scan ( file : in file_type; ch : in character; found : out boolean ); -- DESCRIPTION : -- Scans the file on the search of a character. -- When the character has been found, then the procedure stops -- and sets found to true, otherwise, found will be false and -- End_of_File(file) will be true. procedure Scan ( file : in file_type; banner : in string; found : out boolean ); -- DESCRIPTION : -- Scans the file on the search of a text banner. -- ON INPUT : -- file a file opened for input; -- banner a string. -- ON RETURN : -- found true if the banner has been found, false otherwise. procedure Scan_and_Skip ( file : in file_type; banner : in string; found : out boolean ); -- DESCRIPTION : -- The line where the banner has been found will be skipped. end File_Operations; SHAR_EOF fi # end of overwriting check if test -f 'machines.adb' then echo shar: will not over-write existing file "'machines.adb'" else cat << "SHAR_EOF" > 'machines.adb' with System_Call; with text_io,integer_io; use text_io,integer_io; package body Machines is function getpid return integer; pragma interface(C, getpid); function Process_ID return integer is begin return getpid; end Process_ID; function Integer_to_String ( i : integer ) return string is answer : string(1..20); nb : natural := 0; tmp : integer := i; function Number_to_Character ( n : integer ) return character is begin case n is when 0 => return '0'; when 1 => return '1'; when 2 => return '2'; when 3 => return '3'; when 4 => return '4'; when 5 => return '5'; when 6 => return '6'; when 7 => return '7'; when 8 => return '8'; when 9 => return '9'; when others => return ' '; end case; end Number_to_Character; begin if tmp = 0 then nb := nb + 1; answer(nb) := Number_to_Character(0); end if; while tmp /= 0 loop nb := nb + 1; answer(nb) := Number_to_Character(tmp mod 10); tmp := tmp / 10; end loop; declare res : string(1..nb); begin for j in res'range loop res(j) := answer(nb-j+1); end loop; return res; end; end Integer_to_String; function Process_ID return string is begin return Integer_to_String(getpid); end Process_ID; function User_Name ( pid : string ) return string is temp : file_type; name : string(1..80); last : natural; begin System_Call.Call("whoami > /tmp/user_name" & pid); Open(temp,in_file,"/tmp/user_name" & pid); get_line(temp,name,last); Close(temp); System_Call.Call("rm /tmp/user_name" & pid); return name(1..last); exception when others => return "???"; end User_Name; function Architecture ( pid : string ) return string is temp : file_type; answer : string(1..80); last : natural; begin System_Call.Call("cs-arch > /tmp/arch_type" & pid); Open(temp,in_file,"/tmp/arch_type" & pid); get_line(temp,answer,last); Close(temp); System_Call.Call("rm /tmp/arch_type" & pid); return answer(1..last); exception when others => return "???"; end Architecture; function Architecture ( pid : string; machine : string ) return string is temp : file_type; answer : string(1..80); last : natural; begin System_Call.Call("rsh " & machine & " cs-arch > /tmp/arch_type" & pid); Open(temp,in_file,"/tmp/arch_type" & pid); get_line(temp,answer,last); Close(temp); System_Call.Call("rm /tmp/arch_type" & pid); return answer(1..last); exception when others => return "???"; end Architecture; function Host_Name ( pid : string ) return string is temp : file_type; answer : string(1..80); last : natural; begin System_Call.Call("hostname > /tmp/host_name" & pid); Open(temp,in_file,"/tmp/host_name" & pid); get_line(temp,answer,last); Close(temp); System_Call.Call("rm /tmp/host_name" & pid); return answer(1..last); exception when others => return "???"; end Host_Name; function Date ( pid : string ) return string is temp : file_type; answer : string(1..80); last : natural; begin System_Call.Call("date > /tmp/date" & pid); Open(temp,in_file,"/tmp/date" & pid); get_line(temp,answer,last); Close(temp); System_Call.Call("rm /tmp/date" & pid); return answer(1..last); exception when others => return "???"; end Date; end Machines; SHAR_EOF fi # end of overwriting check if test -f 'machines.ads' then echo shar: will not over-write existing file "'machines.ads'" else cat << "SHAR_EOF" > 'machines.ads' package Machines is -- DESCRIPTION : -- This package offers some routines to obtain some information -- about the machines one wants to use. function Process_ID return integer; -- DESCRIPTION : -- Returns the process ID of the program being executed. function Process_ID return string; -- DESCRIPTION : -- Returns the process ID in the form of a string of characters. -- This is useful to make unique tempory file names, as is done -- in the following procedures. function User_Name ( pid : string ) return string; -- DESCRIPTION : -- Returns the login-name of the user. -- The parameter pid indicates the process ID of the calling routine. function Architecture ( pid : string ) return string; function Architecture ( pid : string; machine : string ) return string; -- DESCRIPTION : -- The architecture of the requested machine will be returned; -- pid is the process ID of the process calling the routine. -- By default, the type of the current machine is returned. function Host_Name ( pid : string ) return string; -- DESCRIPTION : -- The name of the machine one is currently working on is returned; -- pid is the ID of the process calling the routine. function Date ( pid : string ) return string; -- DESCRIPTION : -- Returns the current date; pid contains the ID of the caller. end Machines; SHAR_EOF fi # end of overwriting check if test -f 'makefile' then echo shar: will not over-write existing file "'makefile'" else cat << "SHAR_EOF" > 'makefile' # Establishing the links : linkrc = ../../Ada/System links: @-ln -s $(linkrc)/byemess.a bye_bye_message.ads @-ln -s $(linkrc)/byemessB.a bye_bye_message.adb @-ln -s $(linkrc)/commuser.a communications_with_user.ads @-ln -s $(linkrc)/commuserB.a communications_with_user.adb @-ln -s $(linkrc)/file_ops.a file_operations.ads @-ln -s $(linkrc)/file_opsB.a file_operations.adb @-ln -s $(linkrc)/lists.a lists.ads @-ln -s $(linkrc)/lists.a lists.adb @-ln -s $(linkrc)/machines.a machines.ads @-ln -s $(linkrc)/machinesB.a machines.adb @-ln -s $(linkrc)/timing.a timing_package.ads @-ln -s $(linkrc)/timingB.a timing_package.adb @-ln -s $(linkrc)/ucmdline.a unix_command_line.ads @-ln -s $(linkrc)/system_call.a system_call.ads @-ln -s $(linkrc)/system_callB.a system_call.adb @-ln -s $(linkrc)/rusage.a unix_resource_usage.ads @-ln -s $(linkrc)/rusageB.a unix_resource_usage.adb SHAR_EOF fi # end of overwriting check if test -f 'sun_timing_package.adb' then echo shar: will not over-write existing file "'sun_timing_package.adb'" else cat << "SHAR_EOF" > 'sun_timing_package.adb' with Text_Io, Unix_Resource_Usage; package body Timing_Package is package duration_io is new text_io.fixed_io(duration); package integer_io is new text_io.integer_io (integer); function duration_to_string (dur : duration) return string; pragma inline (duration_to_string); type timing_item is record start_time : Unix_Resource_Usage.Process_Times; stop_time : Unix_Resource_Usage.Process_Times; end record; type rusage_timing_stuff is record total_time : duration; user_time : duration; system_time : duration; -- max_resident_size : natural; -- shared_pages : natural; -- unshared_pages : natural; -- stack_pages : natural; non_io_faults : natural; io_faults : natural; swaps : natural; -- input_blocks : natural; -- output_blocks : natural; -- messages_out : natural; -- messages_in : natural; signals : natural; -- vol_context_switches : natural; -- invol_context_switches : natural; total_context_switches : natural; end record; function to_rusage_timing_stuff (item : Timing_Widget) return rusage_timing_stuff; pragma inline (to_rusage_timing_stuff); procedure tstart ( widget : out Timing_Widget ) is answer : timing_item; begin answer.start_time := Unix_Resource_Usage.get_process_times; widget := new timing_item'(answer); end tstart; procedure tstop ( widget : in out Timing_Widget ) is begin widget.all.stop_time := Unix_Resource_Usage.get_process_times; end tstop; function Elapsed_Total_Time ( widget : Timing_Widget ) return duration is begin return (Unix_Resource_Usage.Total_Time_of(widget.Stop_Time) - Unix_Resource_Usage.Total_Time_of(widget.Start_Time)); end Elapsed_Total_Time; function Elapsed_User_Time ( widget : Timing_Widget ) return duration is begin return (Unix_Resource_Usage.User_CPU_Time_of(widget.Stop_Time) - Unix_Resource_Usage.User_CPU_Time_of(widget.Start_Time)); end Elapsed_User_Time; function Elapsed_System_Time ( widget : Timing_Widget ) return duration is begin return (Unix_Resource_Usage.System_CPU_Time_of(widget.Stop_Time) - Unix_Resource_Usage.System_CPU_Time_of(widget.Start_Time)); end Elapsed_System_Time; procedure print_time ( file : file_type; mach_time : duration ) is begin duration_io.put(file,mach_time); end print_time; function truncate ( d : duration ) return integer is rd : integer := integer(d); begin if rd > 0 then if duration(rd) > d then rd := rd-1; end if; end if; return rd; end truncate; procedure print_hms ( file : file_type; mach_time : duration ) is seconds : integer := truncate(mach_time); millsec : integer := integer((mach_time-duration(seconds))*1000); minutes,hours : integer; begin if millsec >= 1000 -- could be due to rounding then seconds := seconds + 1; millsec := millsec - 1000; end if; minutes := seconds/60; hours := minutes/60; seconds := seconds - 60*minutes; minutes := minutes - 60*hours; integer_io.put(file,hours,2); text_io.put(file,"h"); integer_io.put(file,minutes,2); text_io.put(file,"m"); integer_io.put(file,seconds,2); text_io.put(file,"s"); integer_io.put(file,millsec,3); text_io.put(file,"ms"); end print_hms; procedure print_times ( widget : Timing_Widget; tag : string := "" ) is begin print_times(Standard_Output,widget,tag); end print_times; procedure print_times ( file : file_type; widget : Timing_Widget; tag : string := "") is rusage_stuff : rusage_timing_stuff; printout_column : text_io.positive_count := 40; function "+" (l,r : text_io.positive_count) return text_io.positive_count renames Text_IO."+"; begin text_io.put_line (file,"TIMING INFORMATION for " & tag); rusage_stuff := to_rusage_timing_stuff (widget); -- print out total time Text_Io.Put (file,"The elapsed time in seconds was "); -- text_io.set_col (file,Text_IO.positive_count(printout_column + 3)); -- sun4 modification : text_io.set_col (file,Text_IO.positive_count(printout_column)); duration_io.put (file,rusage_stuff.total_time); text_io.put(file," = "); print_hms(file,rusage_stuff.total_time); text_io.new_line(file); -- print out user time Text_Io.Put (file,"User time in seconds was "); -- text_io.set_col (file,Text_IO.positive_count(printout_column + 3)); -- sun4 modification : text_io.set_col (file,Text_IO.positive_count(printout_column)); duration_io.put (file,rusage_stuff.user_time); text_io.put(file," = "); print_hms(file,rusage_stuff.user_time); text_io.new_line(file); -- print out system time Text_Io.Put (file,"System CPU time in seconds was "); -- text_io.set_col (file,text_io.positive_count(printout_column + 3)); -- sun4 modification : text_io.set_col (file,text_io.positive_count(printout_column)); duration_io.put (file,rusage_stuff.system_time); text_io.put(file," = "); print_hms(file,rusage_stuff.system_time); text_io.new_line(file); -- print out non-I/O page faults Text_IO.put (file,"Non-I/O page faults was "); text_io.set_col (file,printout_column); integer_io.put (file,rusage_stuff.non_io_faults); Text_IO.new_line(file); -- print out I/O page faults Text_IO.put (file,"I/O page faults was "); text_io.set_col (file,printout_column); integer_io.put (file,rusage_stuff.io_faults); text_io.new_line(file); -- print out signals Text_IO.put (file,"Signals delivered was "); text_io.set_col (file,printout_column); integer_io.put (file,rusage_stuff.signals); text_io.new_line(file); -- print out swaps text_io.put (file,"Swaps was "); text_io.set_col (file,printout_column); integer_io.put (file,rusage_stuff.swaps); text_io.new_line(file); -- print out total context switches text_io.put (file,"Total context switches was "); text_io.set_col (file,printout_column); integer_io.put (file,rusage_stuff.total_context_switches); text_io.new_line(file); -- text_io.put_line --("-----------------------------------------------------------------"); end print_times; function times_to_string (widget : Timing_Widget; delimiter : string := ":") return string is rusage_stuff : rusage_timing_stuff; begin rusage_stuff := to_rusage_timing_stuff(widget); return "Total Time in seconds => " & duration_to_string (rusage_stuff.total_time) & delimiter & "User Time in seconds => " & duration_to_string (rusage_stuff.user_time) & delimiter & "System Time in seconds => " & duration_to_string (rusage_stuff.system_time) & delimiter & "Non I/O Page Faults => " & integer'image (rusage_stuff.non_io_faults) & delimiter & "I/O Page Faults => " & integer'image (rusage_stuff.io_faults) & delimiter & "Swaps => " & integer'image (rusage_stuff.swaps) & delimiter & "Signals Delivered => " & integer'image (rusage_stuff.signals) & delimiter & "Total Context Switches => " & integer'image (rusage_stuff.total_context_switches) & delimiter; end times_to_string; function duration_to_string (dur : duration) return string is answer : string(1..(duration'fore + duration'aft + 1)); begin duration_io.put (to => answer, item => dur); return answer; end duration_to_string; function to_rusage_timing_stuff (item : Timing_Widget) return rusage_timing_stuff is answer : rusage_timing_stuff; begin answer.total_time := Unix_Resource_Usage.total_time_of (item.Stop_Time) - Unix_Resource_Usage.total_time_of (item.Start_Time); answer.user_time := Unix_Resource_Usage.user_cpu_time_of (Item.Stop_time) - Unix_Resource_Usage.user_cpu_time_of (Item.Start_time); answer.system_time := Unix_Resource_Usage.system_cpu_time_of (Item.Stop_time) - Unix_Resource_Usage.system_cpu_time_of (Item.Start_time); answer.non_io_faults := integer(Unix_Resource_Usage.non_io_page_faults_of (item.stop_time) - Unix_Resource_Usage.non_io_page_faults_of (item.start_time)); answer.io_faults := integer (Unix_Resource_Usage.io_page_faults_of (item.stop_time) - Unix_Resource_Usage.io_page_faults_of (item.start_time)); answer.swaps := (Unix_Resource_Usage.swaps_of (item.stop_time) - Unix_Resource_Usage.swaps_of (item.start_time)); answer.signals := (Unix_Resource_Usage.signals_delivered_of (item.stop_time) - Unix_Resource_Usage.signals_delivered_of (item.start_time)); answer.total_context_switches := ( Unix_Resource_Usage.voluntary_context_switches_of (item.stop_time) - Unix_Resource_Usage.voluntary_context_switches_of (item.start_time)) + (Unix_Resource_Usage.involuntary_context_switches_of (item.stop_time) - Unix_Resource_Usage.involuntary_context_switches_of (item.start_time)); return answer; end to_rusage_timing_stuff; end Timing_Package; SHAR_EOF fi # end of overwriting check if test -f 'system_call.adb' then echo shar: will not over-write existing file "'system_call.adb'" else cat << "SHAR_EOF" > 'system_call.adb' with System; use System; package body System_Call is procedure Call ( Command: in string ) is function system(command: address) return natural; pragma Interface(C, system); cmd: constant string := command & ASCII.NUL; ret: Natural; begin ret := system(cmd'address); if ret /= 0 then raise System_Error; end if; end Call; end System_Call; SHAR_EOF fi # end of overwriting check if test -f 'system_call.ads' then echo shar: will not over-write existing file "'system_call.ads'" else cat << "SHAR_EOF" > 'system_call.ads' package System_Call is -- DESCRIPTION : -- This package provides a routine to call UNIX shell commands. procedure Call ( Command: in string ); -- DESCRIPTION : -- Command is passed to and executed by the operating system. System_Error: exception; -- failure to execute Command properly end System_Call; SHAR_EOF fi # end of overwriting check if test -f 'timing_package.adb' then echo shar: will not over-write existing file "'timing_package.adb'" else cat << "SHAR_EOF" > 'timing_package.adb' with Text_Io, Unix_Resource_Usage; package body Timing_Package is package duration_io is new text_io.fixed_io(duration); package integer_io is new text_io.integer_io (integer); function duration_to_string (dur : duration) return string; pragma inline (duration_to_string); type timing_item is record start_time : Unix_Resource_Usage.Process_Times; stop_time : Unix_Resource_Usage.Process_Times; end record; type rusage_timing_stuff is record total_time : duration; user_time : duration; system_time : duration; -- max_resident_size : natural; -- shared_pages : natural; -- unshared_pages : natural; -- stack_pages : natural; non_io_faults : natural; io_faults : natural; swaps : natural; -- input_blocks : natural; -- output_blocks : natural; -- messages_out : natural; -- messages_in : natural; signals : natural; -- vol_context_switches : natural; -- invol_context_switches : natural; total_context_switches : natural; end record; function to_rusage_timing_stuff (item : Timing_Widget) return rusage_timing_stuff; pragma inline (to_rusage_timing_stuff); procedure tstart ( widget : out Timing_Widget ) is answer : timing_item; begin answer.start_time := Unix_Resource_Usage.get_process_times; widget := new timing_item'(answer); end tstart; procedure tstop ( widget : in out Timing_Widget ) is begin widget.all.stop_time := Unix_Resource_Usage.get_process_times; end tstop; function Elapsed_Total_Time ( widget : Timing_Widget ) return duration is begin return (Unix_Resource_Usage.Total_Time_of(widget.Stop_Time) - Unix_Resource_Usage.Total_Time_of(widget.Start_Time)); end Elapsed_Total_Time; function Elapsed_User_Time ( widget : Timing_Widget ) return duration is begin return (Unix_Resource_Usage.User_CPU_Time_of(widget.Stop_Time) - Unix_Resource_Usage.User_CPU_Time_of(widget.Start_Time)); end Elapsed_User_Time; function Elapsed_System_Time ( widget : Timing_Widget ) return duration is begin return (Unix_Resource_Usage.System_CPU_Time_of(widget.Stop_Time) - Unix_Resource_Usage.System_CPU_Time_of(widget.Start_Time)); end Elapsed_System_Time; procedure print_time ( file : file_type; mach_time : duration ) is begin duration_io.put(file,mach_time); end print_time; function truncate ( d : duration ) return integer is rd : integer := integer(d); begin if rd > 0 then if duration(rd) > d then rd := rd-1; end if; end if; return rd; end truncate; procedure print_hms ( file : file_type; mach_time : duration ) is seconds : integer := truncate(mach_time); millsec : integer := integer((mach_time-duration(seconds))*1000); minutes,hours : integer; begin if millsec >= 1000 -- could be due to rounding then seconds := seconds + 1; millsec := millsec - 1000; end if; minutes := seconds/60; hours := minutes/60; seconds := seconds - 60*minutes; minutes := minutes - 60*hours; integer_io.put(file,hours,2); text_io.put(file,"h"); integer_io.put(file,minutes,2); text_io.put(file,"m"); integer_io.put(file,seconds,2); text_io.put(file,"s"); integer_io.put(file,millsec,3); text_io.put(file,"ms"); end print_hms; procedure print_times ( widget : Timing_Widget; tag : string := "" ) is begin print_times(Standard_Output,widget,tag); end print_times; procedure print_times ( file : file_type; widget : Timing_Widget; tag : string := "") is rusage_stuff : rusage_timing_stuff; printout_column : text_io.positive_count := 40; function "+" (l,r : text_io.positive_count) return text_io.positive_count renames Text_IO."+"; begin text_io.put_line (file,"TIMING INFORMATION for " & tag); rusage_stuff := to_rusage_timing_stuff (widget); -- print out total time Text_Io.Put (file,"The elapsed time in seconds was "); -- text_io.set_col (file,Text_IO.positive_count(printout_column + 3)); -- sun4 modification : text_io.set_col (file,Text_IO.positive_count(printout_column)); duration_io.put (file,rusage_stuff.total_time); text_io.put(file," = "); print_hms(file,rusage_stuff.total_time); text_io.new_line(file); -- print out user time Text_Io.Put (file,"User time in seconds was "); -- text_io.set_col (file,Text_IO.positive_count(printout_column + 3)); -- sun4 modification : text_io.set_col (file,Text_IO.positive_count(printout_column)); duration_io.put (file,rusage_stuff.user_time); text_io.put(file," = "); print_hms(file,rusage_stuff.user_time); text_io.new_line(file); -- print out system time Text_Io.Put (file,"System CPU time in seconds was "); -- text_io.set_col (file,text_io.positive_count(printout_column + 3)); -- sun4 modification : text_io.set_col (file,text_io.positive_count(printout_column)); duration_io.put (file,rusage_stuff.system_time); text_io.put(file," = "); print_hms(file,rusage_stuff.system_time); text_io.new_line(file); -- print out non-I/O page faults Text_IO.put (file,"Non-I/O page faults was "); text_io.set_col (file,printout_column); integer_io.put (file,rusage_stuff.non_io_faults); Text_IO.new_line(file); -- print out I/O page faults Text_IO.put (file,"I/O page faults was "); text_io.set_col (file,printout_column); integer_io.put (file,rusage_stuff.io_faults); text_io.new_line(file); -- print out signals Text_IO.put (file,"Signals delivered was "); text_io.set_col (file,printout_column); integer_io.put (file,rusage_stuff.signals); text_io.new_line(file); -- print out swaps text_io.put (file,"Swaps was "); text_io.set_col (file,printout_column); integer_io.put (file,rusage_stuff.swaps); text_io.new_line(file); -- print out total context switches text_io.put (file,"Total context switches was "); text_io.set_col (file,printout_column); integer_io.put (file,rusage_stuff.total_context_switches); text_io.new_line(file); -- text_io.put_line --("-----------------------------------------------------------------"); end print_times; function times_to_string (widget : Timing_Widget; delimiter : string := ":") return string is rusage_stuff : rusage_timing_stuff; begin rusage_stuff := to_rusage_timing_stuff(widget); return "Total Time in seconds => " & duration_to_string (rusage_stuff.total_time) & delimiter & "User Time in seconds => " & duration_to_string (rusage_stuff.user_time) & delimiter & "System Time in seconds => " & duration_to_string (rusage_stuff.system_time) & delimiter & "Non I/O Page Faults => " & integer'image (rusage_stuff.non_io_faults) & delimiter & "I/O Page Faults => " & integer'image (rusage_stuff.io_faults) & delimiter & "Swaps => " & integer'image (rusage_stuff.swaps) & delimiter & "Signals Delivered => " & integer'image (rusage_stuff.signals) & delimiter & "Total Context Switches => " & integer'image (rusage_stuff.total_context_switches) & delimiter; end times_to_string; function duration_to_string (dur : duration) return string is answer : string(1..(duration'fore + duration'aft + 1)); begin duration_io.put (to => answer, item => dur); return answer; end duration_to_string; function to_rusage_timing_stuff (item : Timing_Widget) return rusage_timing_stuff is answer : rusage_timing_stuff; begin answer.total_time := Unix_Resource_Usage.total_time_of (item.Stop_Time) - Unix_Resource_Usage.total_time_of (item.Start_Time); answer.user_time := Unix_Resource_Usage.user_cpu_time_of (Item.Stop_time) - Unix_Resource_Usage.user_cpu_time_of (Item.Start_time); answer.system_time := Unix_Resource_Usage.system_cpu_time_of (Item.Stop_time) - Unix_Resource_Usage.system_cpu_time_of (Item.Start_time); answer.non_io_faults := integer(Unix_Resource_Usage.non_io_page_faults_of (item.stop_time) - Unix_Resource_Usage.non_io_page_faults_of (item.start_time)); answer.io_faults := integer (Unix_Resource_Usage.io_page_faults_of (item.stop_time) - Unix_Resource_Usage.io_page_faults_of (item.start_time)); answer.swaps := (Unix_Resource_Usage.swaps_of (item.stop_time) - Unix_Resource_Usage.swaps_of (item.start_time)); answer.signals := (Unix_Resource_Usage.signals_delivered_of (item.stop_time) - Unix_Resource_Usage.signals_delivered_of (item.start_time)); answer.total_context_switches := ( Unix_Resource_Usage.voluntary_context_switches_of (item.stop_time) - Unix_Resource_Usage.voluntary_context_switches_of (item.start_time)) + (Unix_Resource_Usage.involuntary_context_switches_of (item.stop_time) - Unix_Resource_Usage.involuntary_context_switches_of (item.start_time)); return answer; end to_rusage_timing_stuff; end Timing_Package; SHAR_EOF fi # end of overwriting check if test -f 'timing_package.ads' then echo shar: will not over-write existing file "'timing_package.ads'" else cat << "SHAR_EOF" > 'timing_package.ads' with text_io; use text_io; package Timing_Package is -- DESCRIPTION : -- This package allows to perform timings. -- ACKNOWLEGMENT : -- Originally developed by Dave Emery (emery@aries.mitre.org), -- but modified by me. type Timing_Widget is private; -- OPERATIONS : procedure tstart ( widget : out Timing_Widget ); -- DESCRIPTION : Starts the timing. procedure tstop ( widget : in out Timing_Widget ); -- DESCRIPTION : Stops the timing. function Elapsed_Total_Time ( widget : Timing_Widget ) return duration; function Elapsed_User_Time ( widget : Timing_Widget ) return duration; function Elapsed_System_Time ( widget : Timing_Widget ) return duration; -- DESCRIPTION : Returns elapsed time. procedure print_time ( file : file_type; mach_time : duration ); -- DESCRIPTION : -- Writes the duration in the standard way. procedure print_hms ( file : file_type; mach_time : duration ); -- DESCRIPTION : -- Writes the duration in a hours/minutes/seconds output format. procedure print_times ( widget : Timing_Widget; tag : string := "" ); -- DESCRIPTION : -- Prints as much information as is available on standard output. procedure print_times ( file : file_type; widget : Timing_Widget; tag : string := "" ); -- DESCRIPTION : -- Prints as much information as is available on a file. function times_to_string ( widget : Timing_Widget; delimiter : string := ":" ) return string; -- DESCRIPTION : -- Returns a string with information. private type timing_item; type Timing_Widget is access timing_item; end Timing_Package; SHAR_EOF fi # end of overwriting check if test -f 'unix_command_line.adb' then echo shar: will not over-write existing file "'unix_command_line.adb'" else cat << "SHAR_EOF" > 'unix_command_line.adb' with Ada.Command_Line; package body Unix_Command_Line is -- IMPLEMENTATION : using Ada.Command_Line function Number_of_Arguments return natural is begin return Ada.Command_Line.Argument_Count; end Number_of_Arguments; function Argument ( i : natural ) return string is begin return Ada.Command_Line.Argument(i); end Argument; end Unix_Command_Line; SHAR_EOF fi # end of overwriting check if test -f 'unix_command_line.ads' then echo shar: will not over-write existing file "'unix_command_line.ads'" else cat << "SHAR_EOF" > 'unix_command_line.ads' package Unix_Command_Line is -- DESCRIPTION : -- This package allows to access the arguments from the command line. function Number_of_Arguments return natural; -- DESCRIPTION : -- Returns the number of arguments of the command that started -- the current process. -- So, if the command has no arguments, then zero is returned. function Argument ( i : natural ) return string; -- DESCRIPTION : -- Returns the ith argument of the command line. end Unix_Command_Line; SHAR_EOF fi # end of overwriting check if test -f 'unix_resource_usage.adb' then echo shar: will not over-write existing file "'unix_resource_usage.adb'" else cat << "SHAR_EOF" > 'unix_resource_usage.adb' package body Unix_Resource_Usage is package C_Interfaces is times_map : constant array (times_enum) of integer := (self => 0, children => -1); function getrusage (who : integer; rusage : system.address) return integer; pragma interface (C, getrusage); function timeval_to_duration (tv : timeval) return duration; end C_Interfaces; function Get_Process_Times (who : times_enum := self) return Process_Times is answer : Process_Times; c_result : integer; begin c_result := C_Interfaces.getrusage (who => C_Interfaces.times_map(who), rusage => answer'address); if (c_result = -1) then raise program_error; -- something broke in Unix! else return answer; end if; end Get_Process_Times; function Total_Time_of (Times: in Process_Times) return duration is begin return user_cpu_time_of (times) + system_cpu_time_of (times); end; function User_CPU_Time_Of (Times: in Process_Times) return Duration is begin return C_Interfaces.timeval_to_duration (times.ru_utime); end User_CPU_Time_Of; function System_CPU_Time_Of (Times: in Process_Times) return Duration is begin return C_Interfaces.timeval_to_duration (times.ru_stime); end System_CPU_Time_Of; function Max_Resident_Set_Size_of (Times: in Process_Times) return natural is begin return times.ru_maxrss; end max_resident_set_size_of; function Shared_Pages_Value_of (Times: in Process_Times) return page_seconds is begin return page_seconds(times.ru_ixrss); end; function Unshared_Data_Pages_Value_of (Times: in Process_Times) return page_seconds is begin return page_seconds(times.ru_idrss); end; function Stack_Pages_Value_of (Times: in Process_Times) return page_seconds is begin return page_seconds(times.ru_isrss); end; function Non_IO_Page_Faults_of (Times: in Process_Times) return natural is begin return times.ru_minflt; end; function IO_Page_Faults_of (Times: in Process_Times) return natural is begin return times.ru_majflt; end; function Swaps_of (Times : in Process_Times) return natural is begin return times.ru_nswap; end; function Input_Blocks_of (Times : in Process_Times) return natural is begin return times.ru_inblock; end; function Output_Blocks_of (Times : in Process_Times) return natural is begin return times.ru_outblock; end; function Socket_Messages_Sent_of (Times : in Process_Times) return natural is begin return times.ru_msgsnd; end; function Socket_Messages_Received_of (Times : in Process_Times) return natural is begin return times.ru_msgrcv; end; function Signals_Delivered_of (Times : in Process_Times) return natural is begin return times.ru_nsignals; end; function Voluntary_Context_Switches_of (Times: in Process_Times) return natural is begin return times.ru_nvcsw; end; function Involuntary_Context_Switches_of (Times: in Process_Times) return natural is begin return times.ru_nivcsw; end; package body C_Interfaces is function timeval_to_duration (tv : timeval) return duration is answer : duration; begin -- on a sun: answer := duration(tv.tv_sec) + duration(tv.tv_usec)/1_000_000; -- on a dec: -- answer := duration(tv.tv_sec); -- if float(tv.tv_usec) <= duration'large -- then answer := answer + duration(tv.tv_usec)/1_000_000; -- else answer := answer + duration(tv.tv_usec/100)/10_000; -- end if; -- because of the strange fact that on a dec -- duration'large is about 2.14E+5 < 1_000_000; -- with the following trials, only the seconds were printed: -- answer := duration(tv.tv_sec + tv.tv_usec/1_000_000); -- answer := duration(tv.tv_sec) + duration(tv.tv_usec/1_000_000); return answer; end timeval_to_duration; end C_Interfaces; end Unix_Resource_Usage; SHAR_EOF fi # end of overwriting check if test -f 'unix_resource_usage.ads' then echo shar: will not over-write existing file "'unix_resource_usage.ads'" else cat << "SHAR_EOF" > 'unix_resource_usage.ads' with System; package Unix_Resource_Usage is type Process_Times is private; type times_enum is (self, children); type page_seconds is new integer; -- expressed in units of pages * clock ticks (1 tick = 1/50 second). -- The value is calculated by summing the number of shared memory -- pages in use each time the internal system clock ticks, and then -- averaging over 1 second intervals. function Get_Process_Times ( who : times_enum := self ) return Process_Times; function Total_Time_of ( times: in Process_Times ) return duration; function User_CPU_Time_Of ( times: in Process_Times ) return duration; function System_CPU_Time_Of ( times: in Process_Times ) return duration; function Max_Resident_Set_Size_of ( times: in Process_Times ) return natural; function Shared_Pages_Value_of ( times: in Process_Times ) return page_seconds; -- DESCRIPTION : -- returns the amount of memory used by the text segment which was -- also shared among other processes. function Unshared_Data_Pages_Value_of ( times: in Process_Times ) return page_seconds; -- DESCRIPTION : -- returns the amount of unshared memory residing in the data segment -- of the process. function Stack_Pages_Value_of ( times: in Process_Times ) return page_seconds; -- DESCRIPTION : -- returns the amount of unshared memory residing in the stack segment -- of the process function Non_IO_Page_Faults_of ( times: in Process_Times ) return natural; -- DESCRIPTION : -- returns the number of page faults serviced without any I/O activity; -- here I/O activity is avoided by "reclaiming" a page frame from the -- list of pages awaiting reallocation. function IO_Page_Faults_of ( times: in Process_Times ) return natural; -- DESCRIPTION : -- returns the number of page faults serviced which required I/O activity. function Swaps_of ( times : in Process_Times ) return natural; -- DESCRIPTION : -- returns the number of times the process was swapped out of main memory. function Input_Blocks_of ( times : in Process_Times ) return natural; -- DESCRIPTION : -- returns the number of times the file system had to perform input. function Output_Blocks_of ( times : in Process_Times ) return natural; -- DESCRIPTION : -- returns the number of times the file system had to perform output. function Socket_Messages_Sent_of ( times : in Process_Times ) return natural; -- DESCRIPTION : -- returns the number of messages sent over sockets. function Socket_Messages_Received_of ( times : in Process_Times ) return natural; -- DESCRIPTION : -- returns the number of messages received over sockets. function Signals_Delivered_of ( times : in Process_Times ) return natural; -- DESCRIPTION : -- returns the number of signals delivered. function Voluntary_Context_Switches_of ( times: in Process_Times ) return natural; -- DESCRIPTION : -- returns the number of times a context switch resulted due to a process -- voluntarily giving up the processor before its time slice was completed -- (usually to await availability of a resource). function Involuntary_Context_Switches_of ( times: in Process_Times ) return natural; -- DESCRIPTION : -- returns the number of times a context switch resulted due to a -- higher priority process becoming runnable or because the current -- process exceeded its time slice. private type timeval is record tv_sec : integer; -- Ada integer is C/SunOS long tv_usec : integer; -- Ada integer is C/SunOS long end record; type rusage is record ru_utime : timeval; ru_stime : timeval; ru_maxrss : integer; ru_ixrss : integer; -- integral shared text memory size ru_idrss : integer; -- integral unshared data size ru_isrss : integer; -- integral unshared stack size ru_minflt : integer; -- page reclaims ru_majflt : integer; -- page faults ru_nswap : integer; -- swaps ru_inblock : integer; -- block input operations ru_outblock : integer; -- block output operations ru_msgsnd : integer; -- messages sent ru_msgrcv : integer; -- messages received ru_nsignals : integer; -- signals received ru_nvcsw : integer; -- voluntary context switches ru_nivcsw : integer; -- involuntary context switches end record; type process_times is new rusage; pragma inline (get_process_times, total_time_of, user_cpu_time_of, system_cpu_time_of, max_resident_set_size_of, shared_pages_value_of, unshared_data_pages_value_of, stack_pages_value_of, non_io_page_faults_of, io_page_faults_of, swaps_of, input_blocks_of, output_blocks_of, socket_messages_sent_of, socket_messages_received_of, signals_delivered_of, voluntary_context_switches_of, involuntary_context_switches_of); end Unix_Resource_Usage; SHAR_EOF fi # end of overwriting check cd .. cd .. if test -f 'READ_ME' then echo shar: will not over-write existing file "'READ_ME'" else cat << "SHAR_EOF" > 'READ_ME' The PHC distribution consists of the following directories: Ada sources of the program and makefiles to install with the VADS compiler; GNAT links to the sources of the program and makefiles to install with the GNAT compiler; Demo the database of demonstration examples; paper.ps documentation of the program; bin aliases for the tools and binaries for DEC/Ultrix V4.4, IBM/rs6000 AIX 3.2, SUN-SPARC SunOS 4.1 and SunOS 5.5. --------------------------------------------------------------------------- Copyright 1997 by Jan Verschelde You are welcome to use, modify, or redistribute this software freely, subject to the following restrictions: 1) There is absolutely no guarantee that the software is free of defects. Neither does the author accepts any responsibility for any consequences of using this software. 2) If the sources are modified for your own proper use, then alter as well the name of the routines and of the package. 3) This software may not be included or redistributed as part of any package to be sold for profit unless the author has given explicit written permission to do so. The author greatly appreciates any comments from users, let it be bug reports, questions, suggestions for improvement, or applications that have been solved successfully. Contact address : Jan Verschelde Department of Mathematics, Michigan State University East Lansing, MI 48824-1027, U.S.A. E-mail: jan@msu.math.edu or jan.verschelde@na-net.ornl.gov. --------------------------------------------------------------------------- GNAT is a high-quality, complete compiler for Ada95, integrated into the GCC compiler system and distributed freely, with sources, under the Copyright of the Free Software Foundation. It is maintained by Ada Core Technologies. For more info, check the web site http://www.gnat.com. A free copy of the gnu-ada compiler can be obtained by an anonymous ftp to cs.nyu.edu from the directory /pub/gnat. Mirror Sites: US sites: ftp://ftp.cdrom.com/pub/languages/ada/compiler/gnat/distrib ftp://wuarchive.wustl.edu/languages/ada/compiler/gnat/distrib European sites: ftp://ftp.cs.kuleuven.ac.be/pub/Ada-Belgium/mirrors/gnu-ada ftp://ftp.dit.upm.es/mirror/cs.nyu.edu/pub/gnat ftp://ftp.cs.tu-berlin.de/pub/gnu/gnat ftp://ftp.cci.de/pub/Ada/gnat ftp://ftp.informatik.rwth-aachen.de/pub/mirror/cs.nyu.edu/pub/gnat ftp://ftp.ibp.fr/pub/gnat ftp://ftp.cnam.fr/pub/Ada/PAL/compiler/gnat/distrib ftp://ftp.eunet.no/pub/gnu/gnat ftp://ftp.fsz.bme.hu/pub/ada/gnat ftp://snowwhite.it.brighton.ac.uk/gnat Australia site: ftp://ftp.canberra.edu.au/pub/ise/gnat Binary distributions are available for many platforms, installation is straighforward. The VADS compiler is distributed by Rational, see http://www.rational.com/ for contact. Note that Rational has a SEED program for Educational Institutions to donate tools to use for educational purposes. --------------------------------------------------------------------------- SHAR_EOF fi # end of overwriting check # End of shell archive exit 0