void test_multprec_Newton_Laurent_step ( void ) { int fail,dim,len,deci; printf("\nRunning Newton step with multiprecision arithmetic ...\n"); printf("\ngive the number of decimal places in the working precision : "); scanf("%d",&deci); fail = syscon_read_multprec_Laurent_system(deci); fail = syscon_number_of_multprec_Laurentials(&dim); printf("The system container has %d Laurent polynomials.\n",dim); fail = solcon_read_multprec_solutions(); fail = solcon_number_of_multprec_solutions(&len); printf("The solution container has size %d.\n",len); fail = solcon_dimension_of_multprec_solutions(&dim); printf("The solutions in the container have dimension %d.\n",dim); fail = multprec_Newton_Laurent_step(deci); printf("The solutions after the Newton step :\n"); fail = solcon_write_multprec_solutions(); }
int call_initialize_multprec_homotopy ( int *index ) { int fail,len,deci,fixed; char nlc; printf("\ngive the number of decimal places in the working precision : "); scanf("%d",&deci); scanf("%c",&nlc); /* skip new line symbol */ fail = read_multprec_target_system(deci); /* no _without_solutions ! */ fail = read_multprec_start_system(deci); fail = copy_multprec_start_solutions_to_container(); fail = solcon_number_of_multprec_solutions(&len); printf("Number of start solutions : %d\n",len); printf("-> give index of solution : "); scanf("%d",index); printf("Fixed gamma constant ? (1 = yes/0 = no) "); scanf("%d",&fixed); fail = initialize_multprec_homotopy(fixed,deci); fail = initialize_multprec_solution(*index); return fail; }
int named_input_files ( void ) { int n, fail, len; char inputfile[80]; int mode = 7; /* reading target system : 0 for standard, 1 for double double, 2 for quad double, 3 for multiprecision reading start system : 4 for standard, 5 for double double, 6 for quad double, 7 for multiprecision */ if(mode < 4) printf("\nReading the target system from file ...\n"); if(mode > 3) printf("\nReading the start system from file ...\n"); printf("Give the file name : "); scanf("%s", inputfile); n = (int) strlen(inputfile); if(mode == 0) { printf("\n... test reading in standard doubles ...\n"); fail = read_standard_target_system_from_file(n, inputfile); fail = copy_container_to_target_system(); printf("\nThe system read :\n"); fail = write_standard_target_system(); } else if(mode == 1) { printf("\n... test reading in double doubles ...\n"); fail = read_dobldobl_target_system_from_file(n, inputfile); fail = copy_dobldobl_container_to_target_system(); printf("\nThe system read :\n"); fail = write_dobldobl_target_system(); } else if(mode == 2) { printf("\n... test reading in quad doubles ...\n"); fail = read_quaddobl_target_system_from_file(n, inputfile); fail = copy_quaddobl_container_to_target_system(); printf("\nThe system read :\n"); fail = write_quaddobl_target_system(); } else if(mode == 3) { printf("\n... test reading in multiprecision ...\n"); fail = read_multprec_target_system_from_file(80, n, inputfile); fail = copy_multprec_container_to_target_system(); printf("\nThe system read :\n"); fail = write_multprec_target_system(); } else if(mode == 4) { printf("\n... test reading in standard doubles ...\n"); fail = read_standard_start_system_from_file(n, inputfile); fail = copy_container_to_start_system(); printf("\nThe system read :\n"); fail = write_standard_start_system(); fail = solcon_number_of_solutions(&len); printf("\nNumber of start solutions in container : %d\n", len); } else if(mode == 5) { printf("\n... test reading in double doubles ...\n"); fail = read_dobldobl_start_system_from_file(n, inputfile); fail = copy_dobldobl_container_to_start_system(); printf("\nThe system read :\n"); fail = write_dobldobl_start_system(); fail = solcon_number_of_dobldobl_solutions(&len); printf("\nNumber of start solutions in container : %d\n", len); } else if(mode == 6) { printf("\n... test reading in quad doubles ...\n"); fail = read_quaddobl_start_system_from_file(n, inputfile); fail = copy_quaddobl_container_to_start_system(); printf("\nThe system read :\n"); fail = write_quaddobl_start_system(); fail = solcon_number_of_quaddobl_solutions(&len); printf("\nNumber of start solutions in container : %d\n", len); } else { printf("\n... test reading in multiprecision ...\n"); fail = read_multprec_start_system_from_file(80, n, inputfile); fail = copy_multprec_container_to_start_system(); printf("\nThe system read :\n"); fail = write_multprec_start_system(); fail = solcon_number_of_multprec_solutions(&len); printf("\nNumber of start solutions in container : %d\n", len); } return 0; }