bugfix: handling invalid algorithm choice
(hopefully) solving MSVC compilation errors; assuming that int and float are 4-bytes long - possibly needs fixing