Omgili - forum search, search forums  
  

Discussions about decimal places

Displaying 1 - 10 out of 16,660 discussions.  
RSS Feed Options
Time Frame: (Any time)   Minimum number of replies: (2)   Minimum number of discussing users: (0)
  |  

Page: 1   2   3   4   5   6   7   8   9   10  
Keep this page open to be updated with the newest discussions automatically.
Newbie programmer question - When displaying the value of a decimal currently (with .ToString()..), it's accurate to like 15 decimal places, and since I'm using it to represent dollars and cents, I only want the output to be 2 decimal places. Do I use...
Started by on , 9 posts by 9 people.  
23 => 23.00, 12.5 => 12.50 Idealdecimal value = 1... .
DecimalVar.ToString("n2"); decimalVar.ToString("F"); This will: Round off to 2 decimal places 23.456 => 23.47 Ensure that there are always 2 decimal places eg.
Does anyone know of an elegant way to get the decimal part of a number only? In particular I am looking to get the exact number of places after the decimal point so that the number can be formatted appropriately. I was wondering if there is away to do...
Started by on , 4 posts by 4 people.  
(If....
In particular mean System.Decimal.
The fourth integer, after masking out the sign) to indicate the number of decimal places, but you should be aware that it's not necessarily the number of significant decimal places.
I need it to show: 49 as 49.00 and: 54.9 as 54.90 I need it to have no limitations on length (ie, a trillion dollars), but still always have just 2 decimal places so that it is formatted like money (without the dollar sign): eg, 4898489.00 Is this efficient...
Started by on , 4 posts by 4 people.  
If the Inexact trap is set;>> # Round to two... .
The quantize() method rounds to a fixed number of decimal places.
Point application with two decimal places, some inputs have many places and need to be rounded? A.
Ask your Facebook Friends
Declare @BadDecimal varchar(5) Set @BadDecimal = '4.5' Declare @GoodDecimal Decimal Set @GoodDecimal = @BadDecimal Select @GoodDecimal --Outputs 5 Why?
Started by on , 5 posts by 5 people.  
Try Set @BadDecimal = '4,5' casting or converting to explicit decimal(digits, precision) works: SELECT CONVERT(DECIMAL(5, 2), '4.5') SELECT CAST('4.5' AS DECIMAL(5,2)) SQLServer Help states Decimal(2,1) edit: changed to (2....
I'm using decimal type (.net), and I want to see if two numbers are equal. But I only want to be accurate to 10 decimal places. For example take these three numbers. I want them all to be equal. 0.1123456789 0.11234567891 0.11234567899 The 10 decimal ...
Started by on , 6 posts by 6 people.  
What about multiplying by 10^10 and dropping the fractional part? decimal x2 = Math.Truncate(x * 1 ); decimal y2 = Math.Truncate(y * 1 ); Assert.Equals(x2, y2); EDIT: Changed to Math.Truncate 2 billion which when multipled out gives a range....
So I know how to print a floating point number with a certain decimal places. My question is how to return it with a specified number of decimal places? Thanks.
Started by on , 5 posts by 5 people.  
It will only be the closest....
And note that the number you will return will not really have only two decimal places because division.
In order to get two decimal places, multiply the number by 100, floor it, then divide by 100.
Using numpy or python's standard library, either or. How can I take a value with several decimal places and truncate it to 4 decimal places? I only want to compare floating point numbers to their first 4 decimal points.
Started by on , 5 posts by 5 people.  
Precision may be negative.
This always returns a floating point number.
You can use decimal module, especially the part on getcontext().prec If you want to compare two in decimal digits (default 0 digits).
How do I round a double to 5 decimal places, without using DecimalFormat?
Started by on , 8 posts by 8 people.  
Then do normal rounding, and make it the fifth decimal....
You can round to the fifth decimal place by making it the first decimal place by multiplying your number.
=12.345678, dbl2=12.34567 Thats the way, without any lib.
Is there a regex that would validate a percentage value to 2 decimal places? I have a regex for two decimal places, but don't know how to stop values above 100. e.g. 100.01 is validated with my regex.
Started by on , 4 posts by 4 people.  
If you want to allow tenths as well (ala 10.1) then try this: \d{1,2 .
By exactly two decimal places.
In JavaScript, the typical way to round a number to N decimal places is something like: function round_number(num, dec) { return Math.round(num * Math.pow(10, dec)) / Math.pow(10, dec); } However this approach will round to a maximum of N decimal places...
Started by on , 4 posts by 4 people.  
Of the client uses period as decimal separator, the code needs some more work to function for other settings.
Page: 1   2   3   4   5   6   7   8   9   10  
Related Searches
"decimal place" actionscript 3    export access table with values with more than 2 decimal places as csv file   
More Information


Forum Search About Omgili Help Plugins Forum/Board Owners Privacy

i
In Title
In Topic
In Reply
Exclude
Boost