Optimize JMF double encoding for small integral values