Revert "Typecasts from Number changed to Double instead of double."

This reverts commit 273a315693498642fcd6547484cd2048bc76769b.
Fixed compile error caused by typecast (double) Number. Replaced by Number.doubleValue().