eval_chebyshev_function_ptxt: Chebyshev approximation of a function, in the clear
Description
The cleartext counterpart of eval_chebyshev_function(): it
evaluates the degree-degree Chebyshev approximation of func on
[a, b] at the points ptxt, with the arithmetic OpenFHE uses on
ciphertexts. Comparing its result with func(ptxt) gives the
approximation error of a degree before any encrypted computation
is run.
Usage
eval_chebyshev_function_ptxt(func, ptxt, a, b, degree)
Value
A numeric vector the length of ptxt.
Arguments
func
A function of one number returning one number.
ptxt
Numeric vector of points in [a, b].
a, b
Numeric; the interval.
degree
Integer; the degree of the approximation, at least 1.