Templates work.
Tested on double and float.
additional testing will be done on unsinged integers.