Power series truncation using constant tables for function interpolation in transcendental functions
AssigneeInternational Business Machines Corporation
InventorsSwapnil Shah, Srinivasan Ramani
Life of this patent
Estimating the term…
Abstract
A primary interval for convergence of at least one power series in a transcendental function is interpolated, 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. A function and at least one derivative of the function of the truncated expansion of the selected order of truncation is evaluated at the one or more interpolation points. Each separate value evaluated for the function and each of the at least one derivative is saved in a table, wherein the table is looked up for efficiently computing a result of the truncated expansion of the at least one power series.
Claims18
A method, comprising:
- interpolating, by a computer, 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;
- evaluating;
- by the computer, 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;
- comparing, by the computer, 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;
- responsive to the first unit of last precision value being less than an error bounds:
- decreasing, by the computer, the number of the at one or more interpolations points;
- and
- reevaluating, by the computer, 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;
- responsive to the first unit of last precision value not being less than the error bounds:
- increasing, by the computer, the number of the at one or more interpolations points;
- reevaluating, by the computer, 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
- comparing, by the computer, 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;
- responsive to the second unit of last precision being greater than the error bounds:
- increasing, by the computer, the number of the at one or more interpolations points;
- reevaluating, by the computer, 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
- comparing, by the computer, 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;
- responsive to the second unit of last precision not being greater than the error bound, determining, by the computer, 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;
- responsive to the cache effect being acceptable, saving, by the computer, 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
- responsive to the cache effect not being acceptable, increasing, by the computer, 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.
A computer system, comprising:
- one or more processors coupled to one or more memories;
- the processor operative 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;
- the processor operative 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;
- the processor operative 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;
- the processor operative 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;
- the processor operative 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;
- the processor operative 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;
- the processor operative 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;
- the processor operative 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
- the processor operative 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.
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.
Dependencies are inferred from the claim text.