allow all numeric types
unit tests for both java and js