Name:

composepolynomials computes an approximation to the composition of two polynomials and bounds the error

Library name:

sollya_obj_t sollya_lib_composepolynomials(sollya_obj_t, sollya_obj_t)

Usage:

composepolynomials(p,q) : (function, function) -> structure

Parameters:

Description:

Example 1:

   > composepolynomials(1 + 2 * x + 3 * x^2 + 4 * x^3, 5 + 6 * x + 7 * x^2);
   { .radii = [|[0;0], [0;0], [0;0], [0;0], [0;0], [0;0], [0;0]|], .poly = 586 + x * (1992 + x * (4592 + x * (6156 + x * (6111 + x * (3528 + x * 1372))))) }

Example 2:

   > print(composepolynomials(1/5 * x + exp(17) + log(2) * x^2, x^4 + 1/3 * x^2));
   { .radii = [|[-3.5873240686715317015647477332221852960774705712039e-43;3.5873240686715317015647477332221852960774705712039e-43], [0;0], [-2.672764710092195646140536467151481878815196880105e-51;2.672764710092195646140536467151481878815196880105e-51], [0;0], [-1.069105884036878258456214586860592751526078752042e-50;1.069105884036878258456214586860592751526078752042e-50], [0;0], [-2.138211768073756516912429173721185503052157504084e-50;2.138211768073756516912429173721185503052157504084e-50], [0;0], [-1.069105884036878258456214586860592751526078752042e-50;1.069105884036878258456214586860592751526078752042e-50]|], .poly = 2.41549527535752982147754351803858238798675673527228e7 + x^2 * (6.6666666666666666666666666666666666666666666666666e-2 + x^2 * (0.2770163533955494788241369023842418408972777927067 + x^2 * (0.46209812037329687294482141430545104538366675624017 + x^2 * 0.69314718055994530941723212145817656807550013436026))) }

Example 3:

   > composepolynomials(sin(x),x + x^2);
   { .radii = [| |], .poly = sin(x * (1 + x)) }
See also: substitute
Go back to the list of commands