2 Remove typo and add spaces edit approved Jul 8 '16 at 15:23 aloisdg 1,5671212 silver badges2424 bronze badges You can use float and double literals to save a few bytes. var x=2.0; var y=2d; // saves 1 byte  When you need some int arithmetic to return a float or double you can use the literals to force the conversion. ((float)a+b)/2; // this is no good (a+b)/2.0; // better (a+b)/2f; // best  If you ever run into a situation where you have to to cast you can save a few bytes by using multiplication instead. ((double)x-y)/(x*y); (x*1Dx*1d-y)/(x*y); // saves 5 bytes  You can use float and double literals to save a few bytes. var x=2.0; var y=2d; //saves 1 byte  When you need some int arithmetic to return a float or double you can use the literals to force the conversion. ((float)a+b)/2; //this is no good (a+b)/2.0; //better (a+b)/2f; //best  If you ever run into a situation where you have to to cast you can save a few bytes by using multiplication instead. ((double)x-y)/(x*y); (x*1D-y)/(x*y); //saves 5 bytes  You can use float and double literals to save a few bytes. var x=2.0; var y=2d; // saves 1 byte  When you need some int arithmetic to return a float or double you can use the literals to force the conversion. ((float)a+b)/2; // this is no good (a+b)/2.0; // better (a+b)/2f; // best  If you ever run into a situation where you have to to cast you can save a few bytes by using multiplication instead. ((double)x-y)/(x*y); (x*1d-y)/(x*y); // saves 5 bytes  1 answered Aug 20 '15 at 12:34 SLuck49 90155 silver badges66 bronze badges You can use float and double literals to save a few bytes. var x=2.0; var y=2d; //saves 1 byte  When you need some int arithmetic to return a float or double you can use the literals to force the conversion. ((float)a+b)/2; //this is no good (a+b)/2.0; //better (a+b)/2f; //best  If you ever run into a situation where you have to to cast you can save a few bytes by using multiplication instead. ((double)x-y)/(x*y); (x*1D-y)/(x*y); //saves 5 bytes