cosine

package
v5.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package cosine method is the Go implementation of the polynomial-approximation algorithm by Han and Ki in

"Better Bootstrapping for Approximate Homomorphic Encryption", <https://epring.iacr.org/2019/688O>.

The algorithm was originally implemented in C++, available at

https://github.com/DohyeongKi/better-homomorphic-sine-evaluation

Index

Constants

View Source
const (
	EncodingPrecision = uint(256)
)

Variables

This section is empty.

Functions

func ApproximateCos

func ApproximateCos(K, degree int, dev float64, scnum int) []*big.Float

ApproximateCos computes a polynomial approximation of degree "degree" in Chebyshev basis of the function cos(2*pi*x/2^"scnum") in the range -"K" to "K" The nodes of the Chebyshev approximation are are located from -dev to +dev at each integer value between -K and -K

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL