Premium
A rapid lookup table method for trigonometric functions
Author(s) -
Sewell B. T.
Publication year - 1982
Publication title -
software: practice and experience
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.437
H-Index - 70
eISSN - 1097-024X
pISSN - 0038-0644
DOI - 10.1002/spe.4380121002
Subject(s) - lookup table , table (database) , complement (music) , masking (illustration) , algorithm , representation (politics) , value (mathematics) , arithmetic , computer science , trigonometric functions , function (biology) , trigonometry , factor (programming language) , mathematics , discrete mathematics , theoretical computer science , combinatorics , programming language , data mining , mathematical analysis , geometry , art , law , chemistry , visual arts , biology , biochemistry , evolutionary biology , political science , complementation , politics , gene , phenotype , machine learning
An algorithm for determining the values of sin 2π x and cos2π x , given x , is described. The value of the function is determined by a single masking operation. By storing 2 n values in the table it is possible to exploit the periodicity of the two's complement representation to locate values for negative x and thus avoid treating negative values of x as a special case. The algorithm can be coded in some modern high level languages (e.g. PL/I) and is particularly suitable for use in structure factor routines for protein crystallography.