If it works from the command line, the problem is almost definitely a consequence of your JSON-RPC library rather than something in MultiChain, because multichain-cli is just a wrapper for the JSON-RPC interface.
Your JSON-RPC library appears to format small numbers using exponential notation, or perhaps whatever process you are using to print out those numbers. You can probably understand the exact problem by printing the number at various stages of the code, from JSON-RPC request to how you output it.