Skip to content

mmikaitis/iterative-exp-log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

C model of an iterative algorithm for calculating the exponential and logarithm functions

About

exp-log.c is a C model of an iterative algorithm for calculating exponentials and logarithms of fixed-point numbers [Ch. 8, 1]. The iterative part is implemented in carry-save representation. The model can be used for an experimental study and design of bit-equivalent hardware implementations through parameterized fixed-point precision and number of iterations [Ch. 5, 2].

The algorithm implemented here can be used to calculate elementary functions of arguments in very narrow ranges, such as after range reduction of floating-pointing inputs [Ch. 11, 1], [Ch. 5, 2]. Range reduction is not included in this model.

The underlying fixed-point format is parameterized through the macro FRACT_BITS which defines the number of bits in the fractional part of the fixed-point format used, up to the limit of the total word length of 64 bits.

The number of iterations to run the iterative algorithm for is an input to the exp_log_iterative function.

References

[1] Jean-Michel Muller. Elementary Functions: Algorithms and Implementation. Birkhäuser Basel. 3rd edition. 2016.

[2] Mantas Mikaitis. Arithmetic Accelerators for a Digital Neuromorphic Processor. PhD thesis. University of Manchester. 2020.

Licence

See license.txt for licensing information.

About

A model of an iterative hardware algorithm for exp and log.

Resources

License

Stars

Watchers

Forks

Languages