Top "Decimal" questions

Decimal is the name for our common base-ten numeral system.

Adjusting decimal precision, .net

These lines in C# decimal a = 2m; decimal b = 2.0m; decimal c = 2.00000000m; decimal d = 2.000000000000000000000000000m; Console.WriteLine(a); Console.…

.net decimal precision
set double format with 2 decimal places

I have a short equation: double compute,computed2; compute=getminutes/60; where getminutes is int and I want to set the …

java swing int decimal decimalformat
How to multiply in Javascript? problems with decimals

i've the following code in Javascript: var m1 = 2232.00; var percent = (10/100); var total = percent*m1; alert(total); The problem is that …

javascript decimal multiplication
Generating a Random Decimal in C#

How can I get a random System.Decimal? System.Random doesn't support it directly.

c# .net random decimal
In Java how do you convert a decimal number to base 36?

If I have a decimal number, how do I convert it to base 36 in Java?

java math decimal
Java BigDecimal remove decimal and trailing numbers

I'm new to Java and trying to take a BigDecimal (for example 99999999.99) and convert it to a string but without …

java decimal bigdecimal
Why does adding two decimals in Javascript produce a wrong result?

Possible Duplicate: Is JavaScript’s Math broken? Why does JS screw up this simple math? console.log(.1 + .2) // 0.3000000000000004 console.log(.3 + .6) // 0.8999999999999999 The …

javascript math floating-point addition decimal
Precise Financial Calculation in JavaScript. What Are the Gotchas?

In the interest of creating cross-platform code, I'd like to develop a simple financial application in JavaScript. The calculations required …

javascript decimal finance
How would I separate thousands with space in C#

Assume I have the following decimal number that I have to format so that every thousand should be separated with …

c# decimal custom-formatting
PHP How do I round down to two decimal places?

I need to round down a decimal in PHP to two decimal places so that: 49.955 becomes... 49.95 I have tried number_…

php decimal rounding number-formatting