# Remez and function approximations

DevFeed: [Remez and function approximations](<https://devfeed.tech/articles/remez-and-function-approximations-40500.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/shortform/2024-05-06-1018/>)

Published: 2024-05-06T17:18:29Z

Content type: article

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [FHE](<https://devfeed.tech/topics/fhe.md>), [homomorphic encryption](<https://devfeed.tech/topics/homomorphic-encryption.md>), [polynomials](<https://devfeed.tech/topics/polynomials.md>), [Algorithm](<https://devfeed.tech/topics/algorithm.md>), [Python](<https://devfeed.tech/topics/python.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [approximation](<https://devfeed.tech/tags/approximation.md>), [article](<https://devfeed.tech/tags/article.md>), [fhe](<https://devfeed.tech/tags/fhe.md>), [homomorphic-encryption](<https://devfeed.tech/tags/homomorphic-encryption.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [library](<https://devfeed.tech/tags/library.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [polynomials](<https://devfeed.tech/tags/polynomials.md>), [python](<https://devfeed.tech/tags/python.md>), [remez](<https://devfeed.tech/tags/remez.md>), [shortform](<https://devfeed.tech/tags/shortform.md>)

## AI overview

The article discusses approximating functions with low-degree polynomials for arithmetic fully homomorphic encryption. It examines lolremez, the Remez algorithm, Paterson-Stockmeyer evaluation, and a multi-interval Remez method for approximating discontinuous functions such as sign.

## Source excerpt

I've been learning recently about how to approximate functions by low-degree polynomials. This is useful in fully homomorphic encryption (FHE) in the context of "arithmetic FHE" (see my FHE overview article), where the computational model makes low-degree polynomials cheap to evaluate and non-polynomial functions expensive or impossible. In browsing the state of the art I came across two interesting things. The first is the software package lolremez that implements polynomial (and rational polynomial $f(x) / g(x)$) function approximation using the so-called Remez algorithm.