Top "Decimal" questions

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

Limit a double to two decimal places without trailing zeros

I read this and that. I want this exactly: 1.4324 => "1.43" 9.4000 => "9.4" 43.000 => "43" 9.4 => "9.40" (wrong) 43.000 => "43.00" (wrong) In both questions the …

iphone objective-c cocoa-touch decimal nsnumberformatter
C# Padding Amount With Zeros

I have an amount field which is a decimal in the database. I need to always display this amount with 10 …

c# decimal zero zero-pad
How can I format a decimal bound to TextBox without angering my users?

I'm trying to display a formatted decimal in a TextBox using data binding in WPF. Goals Goal 1: When setting a …

wpf textbox decimal string-formatting
How to convert a string containing an exponential number to decimal and back to string

I'm converting code between delphi and c#. Values are stored as strings in a text file from the delphi app. …

c# .net decimal exponent
Parsing a decimal from a DataReader

I found a workaround for this error, but am now really curious as to why this would be happening, was …

c# parsing decimal sqldatareader
check if number string contains decimal?

After doing a sqrt() How can I be check to see if the result contains only whole numbers or not? …

javascript regex math decimal sqrt
Safe casting VARCHAR to DECIMAL in Teradata

In Teradata DB I have source table create set table SRC_TABLE ( Some_Id varchar(2O) not null ); This table …

casting decimal varchar teradata isnumeric
Determine the decimal precision of an input number

We have an interesting problem were we need to determine the decimal precision of a users input (textbox). Essentially we …

c# decimal precision decimal-point
How to truncate decimals to x places in Swift

In my swift program, I have a really long decimal number (say 17.9384693864596069567) and I want to truncate the decimal to …

ios swift double decimal calculator
PHP remove decimal from number string

i have an algorithym that gives back a number with a decimal point (I.E. ".57"). What I would like to …

php decimal eregi