python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
Formatting variable of type double when declaring it
I'm aware of the many ways of formatting a double variable to X # of decimal places. With that being said:
static double currentSelectedPrice = 0.00; //format to 2 decimal places
static double usercas...

codeinsteinn
Votes: 0
Answers: 2
Strange result in deducting from a Decimal number Truncated or Floored version of the same
Upon trying in simple Console App, with a code like the following, the result found to be quite something unexpected as per the clip following in the end.
Code Used
double A = 1234567.8991;
Console.Wr...

Faraz Ahmed Qureshi
Votes: 0
Answers: 0
Android Java Decimal Format - Zero is hidden after decimal point
In my app, i want to be able to format numbers to string (with commas) in a TextView e.g 123456.000 to 123,456.000. But the problem is when i type zero (0) as the last number after the decimal point, ...
Eloghosa
Votes: 0
Answers: 2
Can not get a precision of a floating number even with Decimal or mpf in Python
I need to display a number, let's say 0.9 exact at least until 17 decimal places. Even if I use Decimal or mpf, it gives me the result as if I would not be using them at all.
from mpmath import mpf
fr...
Andris Erglis
Votes: 0
Answers: 1