Fix for https://github.com/fasseg/exp4j/issues/23