{
std::string number;
std::string splitnumber;
std::stringstream strstream;
strstream < strstream>>number;
int ti=number.length()-1;
bool tdone(false);
while(ti>-1 || tdone==false)
{
if(ti==number.length()-9)
{
splitnumber="."+splitnumber;
tdone=true;
}
if(splitnumber.length()==0)
{
splitnumber=number[ti];
}
else if(ti>-1)
{
splitnumber=number[ti]+splitnumber;
}
if(ti<=-1)
{
splitnumber="0"+splitnumber;
}
ti--;
}
return (splitnumber);
}
Put that in rpc.cpp and replace all instances of nAmount / COIN with taToString(nAmount). Then you'll get a precise string instead of a double.