The simplest solution is use division;
double result = (double)7854785 / (double)1000
double result = (double)7854785 / (double)100000
When using division in C# the value will be returned based on the datatypes of the values - not the variable type, adding (double) prior to the values casts the values as double prior to performing the division
Kind Regards