The character or glyph used to separate the integer part from the fraction part in a decimal number. Usually either a dot or a comma.
Questions tagged [decimal-point]
441 questions
-1
votes
1 answer
Format Double in Currency format so that it has two zeros after the decimal point, rather than 1
I currently have a Double which is supposed to be displaying a Currency. However when the Double is actually displayed, it only shows data like this: "32.0". I would instead like it in the format of "32.00". Is there any way to fix the way a Double…

edwoollard
- 12,245
- 6
- 43
- 74
-2
votes
2 answers
How to set consistent decimal separators in R data frame?
Some columns in my data frame have ',' and some have '.' as decimal separator.
DateTime a b c
2000-01-01 00:30:00 3,4 6,1 9.5
2000-01-01 00:45:00 3,5 6,8 7.4
I would like to have '.' as a decimal separator throughout my data…

mowxting
- 1
- 1
-2
votes
1 answer
How do I parse a decimal number from a string to an integer in C#?
I want to convert a decimal string to an integer but I keep getting the following error:
System.FormatException: Input string was not in a correct format.
var myString = "18.7";
var myInteger = Int32.Parse(myString); //flaging an error…

Jdslk
- 97
- 3
- 8
-2
votes
2 answers
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, it shows nothing until i type another number. For…

Eloghosa
- 1
- 1
-2
votes
1 answer
PostgreSQL how to read csv file with decimal comma?
I try to read a csv file containing real numbers with a comma as separator. I try to read this file with \copy in psql:
\copy table FROM 'filename.csv' DELIMITER ';' CSV HEADER;
psql does not recognize the comma as decimal…

Arnold
- 4,578
- 6
- 52
- 91
-2
votes
9 answers
How to show exactly 4 numbers after decimal point without rounding in Python?
I want to calculate square root of numbers and print them with exactly 4 numbers after decimal point without rounding.
This code rounds the numbers
num="%.4f" % num
and this one doesn't show 1.0000 or numbers like this.
num=math.floor(num *…

Hosna
- 1
- 1
- 1
-2
votes
3 answers
Automatically set decimal point (.) once user enters 2 digits from number decimal keyboard android Edittext
Automatically set decimal point (.) once user enters 2 digits from number decimal keyboard in android Edit-text

Shivanshu Verma
- 609
- 5
- 19
-2
votes
2 answers
How to convert a string that includes decimal point to a list in python
The input string is like this
a=(2.5+6/3.7*2.09)
It needs to be converted to a list to be used as a calculator
b=['2.5','+','6','/','3.7','*','2.09']
How to convert the string a to a list like b, such that the decimal point numbers are considered as…

Faisal Niazi
- 3
- 3
-2
votes
3 answers
PHP round up or round down depending on decimal value
I have a php variable that I would like to round up if it closest value is i.e
113.845602277119 so this var would become 113.85
and round down if var is i.e 270.27388400703 would become 270.27 NOT 270.28
I presume i'll need a function to check the…

Alex McPherson
- 3,185
- 3
- 30
- 41
-2
votes
2 answers
How to round a number to n decimal places?
I want, what I enter in the entry field should be automatic rounded to n decimal points.
import Tkinter as Tk
root = Tk.Tk()
class InterfaceApp():
def __init__(self,parent):
self.parent = parent
root.title("P")
…

Mirza Grbic
- 152
- 1
- 3
- 14
-2
votes
1 answer
Decimal separator in C++
I'm stuck with the following problem and hope that someone can help me out. I want to use a library where I can't access the sourcecode. (only *.h) In this library in a certain function an ASCII file is read.
If I use this function in a plain…

DanS
- 183
- 1
- 2
- 12
-2
votes
2 answers
Pascal decimal-point
could you please help me with my homework? I am just a beginner and know very little about Pascal :(
I am supposed to write a program for division but have special conditions depending on their decimal numbers. The outputs should look something like…

Nxs
- 9
- 1
- 1
-2
votes
2 answers
C++ number.ToString("F") choose as decimal separator
I am using a textBox to display a double value.
double Zahl = 3.2343;
textBox1->Text = Zahl.ToString("F");
The result is 3,23. How can I set the decimal separator that is used for displaying on my own?
I found this:…
-2
votes
2 answers
PHP > MySQL Floating point separator localisation issue
I've seen a few questions on people trying to get MySQL to use ',' as the floating point separator - what I'm trying to do is stop PHP from using it on a website running under the 'nl_NL' locale.
So in the code PHP is writing an SQL query ending…

CD001
- 8,332
- 3
- 24
- 28
-3
votes
1 answer
How to return formatting type Double mapping in NHibernate
We're developing an application with C #. NET, using MVVM, Nhibernate. I noticed a strange behavior, to get data from database and put on a Grid: The data in the database that are of type Double, ie, 115,34, are returned through the mapping to the…

Gustavo Gonçalves
- 528
- 1
- 12
- 33