I guess you just don't have so much BTC in your wallet :-)
Without code and without error message nobody can help you.
Well, I supposed it's obvious what kind of error it is
Moving 17999999.99999999 BTC (18 * 10^6 - 1 satoshi) moves 18000000 and that's my error. Of course I know it is float fault, but I want to find some nice option to avoid that.
Now I see few possibilities:
1) Modify bitcoind to use string instead float or satoshi, but it is uncomfortable
2) There is a problem with rpc library, so I should modify library, use curl, etc.
I would like universal solution in terms of protocol, so moving this amount should be correct
.
Cheers