decimal-point Questions

8

I am using BigDecimal to get some price values. Requirement is something like this, what ever the value we fetch from database, the displayed valued should have 2 decimal points. Eg: fetched va...
Apologue asked 25/1, 2013 at 5:1

3

Solved

I have an Excel macro in VBA. Yesterday everything worked fine, this morning VBA is changing a decimal point to a comma. That is from 5.1 to 5,1. I am using a German system and have set in Excel's ...
Morphogenesis asked 9/5, 2017 at 7:16

25

Solved

The inputType numberDecimal in EditText uses the dot . as decimal separator. In Europe it's common to use a comma , instead. Even though my locale is set as german the decimal separator is still th...
Interbrain asked 29/9, 2010 at 12:26

19

Solved

Can I do it with System.out.print?
Pemberton asked 29/3, 2010 at 14:45

93

Solved

I'd like to round at most two decimal places, but only if necessary. Input: 10 1.7777777 9.1 Output: 10 1.78 9.1 How can I do this in JavaScript?
Maybe asked 6/8, 2012 at 17:17

7

Solved

I need to truncate the amount of decimal places of my double value for display in a textbox. How would one achieve this with vba?
Lanate asked 5/7, 2012 at 15:33

3

Solved

I'm looking for a regex to remove trailing zeros from decimal numbers. It should return the following results: 0.0002300 -> 0.00023 10.002300 -> 10.0023 100.0 -> 100 1000 -> 1000 0.0 -...
Gestapo asked 6/2, 2011 at 11:24

11

Solved

in JavaScript, the typical way to round a number to N decimal places is something like: function roundNumber(num, dec) { return Math.round(num * Math.pow(10, dec)) / Math.pow(10, dec); } fu...
Hayashi asked 8/2, 2010 at 11:19

5

Solved

I currently have a number input script that behaves similar to a calculator with the way numbers are displayed, but I want to stop the adding of additional numbers to the series after two numbers p...
Teevens asked 20/9, 2017 at 12:8

2

Solved

I have the following snippet to export my data as a csv file: rpm = [0.25, 0.3, 0.5, 0.75, 1.0, 1.5, 2.0] df = pd.DataFrame(get_some_data_from_somwhere(), index=rpm) with open('foo.csv', 'w') as ...
Cartload asked 23/7, 2015 at 11:34

17

Solved

I have a UITextField that when clicked brings up a number pad with a decimal point in the bottom left. I am trying to limit the field so that a user can only place 1 decimal mark e.g. 2.5 OK 2..5...
Bahaism asked 1/5, 2012 at 20:43

32

Solved

I have this line of code which rounds my numbers to two decimal places. But I get numbers like this: 10.8, 2.4, etc. These are not my idea of two decimal places so how I can improve the following? ...
Cushing asked 13/11, 2009 at 1:46

32

Solved

I have this line of code which rounds my numbers to two decimal places. But I get numbers like this: 10.8, 2.4, etc. These are not my idea of two decimal places so how I can improve the following? ...
Markus asked 13/11, 2009 at 1:46

32

Solved

I have this line of code which rounds my numbers to two decimal places. But I get numbers like this: 10.8, 2.4, etc. These are not my idea of two decimal places so how I can improve the following? ...
Magdamagdaia asked 13/11, 2009 at 1:46

32

Solved

I have this line of code which rounds my numbers to two decimal places. But I get numbers like this: 10.8, 2.4, etc. These are not my idea of two decimal places so how I can improve the following? ...
Kearney asked 13/11, 2009 at 1:46

32

Solved

I have this line of code which rounds my numbers to two decimal places. But I get numbers like this: 10.8, 2.4, etc. These are not my idea of two decimal places so how I can improve the following? ...
Fractionize asked 13/11, 2009 at 1:46

7

Solved

I have a CSV file with data reading that I want to read into Python. I get lists that contain strings like "2,5". Now doing float("2,5") does not work, because it has the wrong decimal mark. How ...
Reimport asked 18/8, 2011 at 11:8

6

Solved

I want to format a number with a decimal point in it with leading zeros. This >>> '3.3'.zfill(5) 003.3 considers all the digits and even the decimal point. Is there a function in pytho...
Carman asked 13/9, 2011 at 20:3

10

Solved

I want to convert a string to the tightest possible datatype: int or float. I have two strings: value1="0.80" #this needs to be a float value2="1.00" #this needs to be an integer. How I can det...
Venlo asked 12/3, 2013 at 9:24

14

Solved

I need to split an double value, into two int value, one before the decimal point and one after. The int after the decimal point should have two digits. Example: 10.50 = 10 and 50 10.45 = 10 an...
Gasconade asked 6/11, 2011 at 11:6

8

Solved

I have this little crazy method that converts BigDecimal values into nice and readable Strings. private String formatBigDecimal(BigDecimal bd){ DecimalFormat df = new DecimalFormat(); df.setMini...
Denice asked 19/2, 2011 at 23:11

2

Solved

I'd like to use .ftr files to quickly analyze hundreds of tables. Unfortunately I have some problems with decimal and thousands separator, similar to that post, just that read_feather does not allo...
Morrissey asked 20/5, 2020 at 9:30

1

Solved

I have made this method that was called to perform functionality and do calculation but return number in double format for some calculations upto more than 10 decimal points. How can i make this co...
Digitate asked 6/11, 2019 at 8:30

3

Is there a way to specify the decimal separator in Google Charts? By default it seems to be based on the locale, however the need I have is to have the decimal separator to be a "dot" rather than ...
Greed asked 21/8, 2015 at 7:53

13

Solved

public void LoadAveragePingTime() { try { PingReply pingReply = pingClass.Send("logon.chronic-domination.com"); double AveragePing = (pingReply.RoundtripTime / 1.75); label4.Text = (AveragePi...
Fragrance asked 18/8, 2009 at 2:24

© 2022 - 2025 — McMap. All rights reserved.