I am writing a dietary application usng Visual C# 2010. I need to output a decimal value that can be truncated to any number of decimal places I want, without rounding at all, on any level.
I want to output the answer of a cross multiply and divide setup of 3 numeric up down control values, and output to a label without rounding at all. Each numeric up down control, is set to have 3 decimal places. Unfortunately, using math.truncate(v alue * 1000) / 1000 seems to output with accuracy errors (only found using more nuds). However, I do NOT want to use math.truncate any more. I want to use "pure" string output functions to accomplish that goal.
I'll also be using other nuds (numeric up down contorls) for other functions, and need perfect fractional equivalencies if testing the string output for accuracy.
I want to output the answer of a cross multiply and divide setup of 3 numeric up down control values, and output to a label without rounding at all. Each numeric up down control, is set to have 3 decimal places. Unfortunately, using math.truncate(v alue * 1000) / 1000 seems to output with accuracy errors (only found using more nuds). However, I do NOT want to use math.truncate any more. I want to use "pure" string output functions to accomplish that goal.
I'll also be using other nuds (numeric up down contorls) for other functions, and need perfect fractional equivalencies if testing the string output for accuracy.
Comment