Multiple-step operation generated errors on PropList.Count 3. how MS create its MSDN content 4.I think this can help you: ROUNDTO: Rounds a floating-point value to a specified digit or power of ten using Bankers rounding.ADigit indicates the power of ten to which you want AValue rounded.
Delphi Chart With 2 Decimal Places How To Round ValuesRoundTo uses Bankers Rounding to determine how to round values that are exactly midway between the two values that have the desired number of significant digits. This method rounds to an even number in the case that AValue is not nearer to either value. I expected it to be linked from the See also section of Round. I have an Extended variable with a value something like 1.999343434, at the moment I round it and get 2. Sometimes the value will be more like 1.4999999 in which case Id like to see 1.5 instead of 1. Is there a Round function which takes a second parameter indicating how many decimal places to round to Peter. Micheles suggestion would be OK except, that RoundTo and SimpleRoundTo are sick. See qc.borland.comwcqcmain.aspx qc.borland.comwcqcmain.aspx To accomplish what you want, I wrote my DecimalRounding routines, which you can download from CodeCentral at codecentral.borland.comItem.aspx These routines can do about 9 kinds of rounding and do account for the inability of floating binary point numbers to exactly represent decimal fractions. Quote. Okay, the question is technical, but where it belongs I just dont know Perhaps. PS, dont you think there are just too many different Delphi groups on this server I often find that the most appropriate looking group has little or no posts. Perhaps, but I often do a Google Groups search to get a clue. Is there a Round function which takes a second parameter indicating how many decimal places to round to If you want to round to 2 decimal places. If you want to round to 2 decimal places: round(1.4999999 100) 100 It depends on the adjustment, for a mathematical rounding. John, I downloaded your unit and I thank you for your great work I do have a question. In QC8070 you say In the later DecimalRoundingJH1 version I documented that and added an Assert(MaxRelError0,.) statement. JH1 I cannot find that statement. ![]() On Fri, 14 Jul 2006 11:21:22 0100, Peter Morris Droopy eyes software writes: Quote. I down- loaded DecimalRoundingJH1.pas from code central and the date is 6292004. I added the Assert about a year ago, but could not log into CodeCentral to update the file. But, I could today, and just update the file and added an entry to the summary to so indicate. See cc.borland.comitem.aspx The assert was only to prevent a misuse of the code. ![]() Multiple-step operation generated errors on PropList.Count 3. MS create its MSDN content 4.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |