A computer program product comprising one or more computer-readable storage devices and program instructions, stored on at least one of the one or more storage devices, the stored program instructions comprising:
- program instructions to interpolate a primary interval for convergence of at least one power series in a transcendental function while selecting a number of one or more interpolation points for a truncated expansion of the at least one power series by a selected order of truncation;
- program instructions to evaluate a function and at least one derivative of the function of the truncated expansion of the selected order of truncation at the one or more interpolation points;
- program instructions to compare a first unit of last precision value of each separate value evaluated for the function and the at least one derivative at each of the one or more interpolation points;
- program instructions to, responsive to the first unit of last precision value being less than an error bounds:
- decrease the number of the at one or more interpolations points;
- and
- reevaluate the function and the at least one derivative of the function of the truncated expansion of the selected order of truncation at the adjusted number of each of the one or more interpolation points;
- program instructions to, responsive to the first unit of last precision value not being less than the error bounds:
- increase the number of the at one or more interpolations points;
- reevaluate the function and the at least one derivative of the function of the truncated expansion of the selected order of truncation at the adjusted number of each of the one or more interpolation points;
- and
- compare a second unit of last precision value of each separate value evaluated for the function and the at least one derivative at each of the one or more interpolation points for the reevaluated function;
- program instructions to, responsive to the second unit of last precision being greater than the error bounds:
- increase the number of the at one or more interpolations points;
- reevaluate the function and the at least one derivative of the function of the truncated expansion of the selected order of truncation at the adjusted number of each of the one or more interpolation points;
- and
- compare a second unit of last precision value of each separate value evaluated for the function and the at least one derivative at each of the one or more interpolation points for the reevaluated function;
- program instructions to, responsive to the second unit of last precision not being greater than the error bound;
- determine whether a cache effect of a size of each separate value evaluated for the function and each of the least one derivative in the table;
- program instructions to, responsive to the cache effect being acceptable, save each separate value evaluated for the function and each of the at least one derivative in a table in a cache, wherein the table is looked up for efficiently computing a result of the truncated expansion of the at least one power series;
- and
- program instructions to, responsive to the cache effect not being acceptable, increase the selected order of truncation and estimating the number of one or more interpolation points to converge within the primary interval for the order of truncation at a specified number of fraction bits of precision.