Rounding: wording and algorithm

Talk about anything but keep it polite and reasonably clean.
User avatar
jdaw1
Cockburn 1851
Posts: 23628
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Rounding: wording and algorithm

Post by jdaw1 »

Some posts moved from Apostrophe crimes.

> Each [thing] shall then be [maths in words], rounded to the nearest thousandth of a basis point (exact half thousandths of a basis point of yield being rounded up).

Should there be any hyphenation in the above, and if so, where? Can the parenthetical clause be both clearer and more concise?
User avatar
djewesbury
Graham’s 1970
Posts: 8165
Joined: 20:01 Mon 31 Dec 2012
Location: Gothenburg, Sweden
Contact:

Re: Apostrophe crimes

Post by djewesbury »

1. No.
2. It's already clear and concise.
Daniel J.
Husband of a relentless former Soviet Chess Master.
delete.. delete.. *sigh*.. delete...
User avatar
DRT
Fonseca 1966
Posts: 15779
Joined: 23:51 Wed 20 Jun 2007
Location: Chesterfield, UK
Contact:

Re: Apostrophe crimes

Post by DRT »

Should "half thousands" be "half thousandths"?
"The first duty of Port is to be red"
Ernest H. Cockburn
User avatar
jdaw1
Cockburn 1851
Posts: 23628
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Apostrophe crimes

Post by jdaw1 »

DRT wrote:Should "half thousands" be "half thousandths"?
Thank you. Yes, it should: fixed.
User avatar
djewesbury
Graham’s 1970
Posts: 8165
Joined: 20:01 Mon 31 Dec 2012
Location: Gothenburg, Sweden
Contact:

Re: Apostrophe crimes

Post by djewesbury »

jdaw1 wrote:
DRT wrote:Should "half thousands" be "half thousandths"?
Thank you. Yes, it should: fixed.
Should it be two-thousandths?
Daniel J.
Husband of a relentless former Soviet Chess Master.
delete.. delete.. *sigh*.. delete...
User avatar
DRT
Fonseca 1966
Posts: 15779
Joined: 23:51 Wed 20 Jun 2007
Location: Chesterfield, UK
Contact:

Re: Apostrophe crimes

Post by DRT »

How can a number that is exact be rounded up?

Do you mean "rounded up to the nearest two-thousandth of a basis point"?
"The first duty of Port is to be red"
Ernest H. Cockburn
User avatar
djewesbury
Graham’s 1970
Posts: 8165
Joined: 20:01 Mon 31 Dec 2012
Location: Gothenburg, Sweden
Contact:

Re: Apostrophe crimes

Post by djewesbury »

The exact number 7 can be rounded up to 10.
Daniel J.
Husband of a relentless former Soviet Chess Master.
delete.. delete.. *sigh*.. delete...
PhilW
Dalva Golden White Colheita 1952
Posts: 3510
Joined: 14:22 Wed 15 Dec 2010
Location: Near Cambridge, UK

Re: Apostrophe crimes

Post by PhilW »

djewesbury wrote:
jdaw1 wrote:
DRT wrote:Should "half thousands" be "half thousandths"?
Thank you. Yes, it should: fixed.
Should it be two-thousandths?
Should probably be "exact half of a thousandth being rounded up"; two-thousandths would be confusing. basis-point might need hyphenation, I do now know.
User avatar
DRT
Fonseca 1966
Posts: 15779
Joined: 23:51 Wed 20 Jun 2007
Location: Chesterfield, UK
Contact:

Rounding: wording and algorithm

Post by DRT »

djewesbury wrote:The exact number 7 can be rounded up to 10.
Stop chattering in class, Jewesbury, and pay attention.
PhilW wrote:
djewesbury wrote:
jdaw1 wrote:
DRT wrote:Should "half thousands" be "half thousandths"?
Thank you. Yes, it should: fixed.
Should it be two-thousandths?
Should probably be "exact half of a thousandth being rounded up"; two-thousandths would be confusing.
That's why I asked the question. Is JDAW rounding up to the nearest thousandth or the nearest half of a thousandth?
"The first duty of Port is to be red"
Ernest H. Cockburn
User avatar
jdaw1
Cockburn 1851
Posts: 23628
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Apostrophe crimes

Post by jdaw1 »

What I want is:
  • 50 → 50
    50.0004 → 50
    50.00049 → 50
    50.0005 → 50.001
    50.00051 → 50.001
    50.0006 → 50.001
    50.001 → 50.001
Please suggest concise and unambiguous phrasing that achieves this.

† Assume that ambiguity is being sought by evil lawyer-mathematician types. So “unambiguous” means “really utterly unambiguous”. And don’t assume that all numbers are positive.
User avatar
DRT
Fonseca 1966
Posts: 15779
Joined: 23:51 Wed 20 Jun 2007
Location: Chesterfield, UK
Contact:

Re: Apostrophe crimes

Post by DRT »

"rounded to the nearest thousandth of a basis point" does it for me. If you need more precision then perhaps "rounded to the nearest thousandth of a basis point (where greater than or equal to n.nnn5 shall be rounded up and less than n.nnn5 shall be rounded down).
"The first duty of Port is to be red"
Ernest H. Cockburn
User avatar
jdaw1
Cockburn 1851
Posts: 23628
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Apostrophe crimes

Post by jdaw1 »

DRT wrote:If you need more precision
jdaw1 wrote:evil lawyer-mathematician types
That is a yes, I do need more “precision”.
DRT wrote:"rounded to the nearest thousandth of a basis point (where greater than or equal to n.nnn5 shall be rounded up and less than n.nnn5 shall be rounded down).
Is that really clearer than my earlier suggestion (because it is longer, and the repeated n’s introduce an ambiguity)?
jdaw1 (after correcting a typo) wrote:rounded to the nearest thousandth of a basis point (exact half thousandths of a basis point of yield being rounded up).
User avatar
djewesbury
Graham’s 1970
Posts: 8165
Joined: 20:01 Mon 31 Dec 2012
Location: Gothenburg, Sweden
Contact:

Re: Apostrophe crimes

Post by djewesbury »

This is the wrong place for this discussion and you have already crowded out a true-bill spelling mistake, by Derek, whose mistakes are always most fun.
Daniel J.
Husband of a relentless former Soviet Chess Master.
delete.. delete.. *sigh*.. delete...
User avatar
jdaw1
Cockburn 1851
Posts: 23628
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Apostrophe crimes

Post by jdaw1 »

djewesbury wrote:This is the wrong place for this discussion
Prior precedent can be found in posts starting at 1350, 1256, 1225, 1212, and perhaps elsewhere. In some of these you have contributed to the discussion without complaint.
User avatar
djewesbury
Graham’s 1970
Posts: 8165
Joined: 20:01 Mon 31 Dec 2012
Location: Gothenburg, Sweden
Contact:

Apostrophe crimes

Post by djewesbury »

Now I am complaining. Precedent means nothing here.
Last edited by djewesbury on 14:18 Sat 29 Nov 2014, edited 1 time in total.
Daniel J.
Husband of a relentless former Soviet Chess Master.
delete.. delete.. *sigh*.. delete...
User avatar
jdaw1
Cockburn 1851
Posts: 23628
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Apostrophe crimes

Post by jdaw1 »

djewesbury wrote:Precedent means nothing here
This is the wrong place for this discussion (other than to mention the omission of the terminal full stop).
PhilW
Dalva Golden White Colheita 1952
Posts: 3510
Joined: 14:22 Wed 15 Dec 2010
Location: Near Cambridge, UK

Re: Apostrophe crimes

Post by PhilW »

Your original was clear. For additional evil-lawyer satisfaction:
"Each [thing] shall then be [maths in words], rounded to the nearest thousandth of a basis point; exact half of a thousandths of a basis point of yield being rounded up."

Note, you have given several examples, but then said "And don’t assume that all numbers are positive" without confirming your intention with regard to negative numbers. Your definition would mean that (first three as per your quote, second three added by me):
50.00049 → 50
50.0005 → 50.001
50.00051 → 50.001
-50.00049 → 50
-50.0005 → 50
-50.00051 → 50.001
If this is as you intend, all is good; otherwise you would need to state that exact half of thousandths are rounded to the next thousandth away from zero, instead of rounded up, or similar.
User avatar
djewesbury
Graham’s 1970
Posts: 8165
Joined: 20:01 Mon 31 Dec 2012
Location: Gothenburg, Sweden
Contact:

Re: Apostrophe crimes

Post by djewesbury »

Battle lost. Quants have taken control here as elsewhere. Is nowhere safe from their meaningless ranting?
Daniel J.
Husband of a relentless former Soviet Chess Master.
delete.. delete.. *sigh*.. delete...
User avatar
jdaw1
Cockburn 1851
Posts: 23628
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Apostrophe crimes

Post by jdaw1 »

PhilW wrote:you have given several examples, but then said "And don’t assume that all numbers are positive" without confirming your intention with regard to negative numbers.
For negative numbers I don’t particularly care which happens, except that I don’t want to pay lawyers to squabble about it. So anything clear.

Current favourite:
> Each [thing] shall then be [maths in words], rounded to the nearest thousandth of a basis point; an exact half of a thousandth of a basis point of yield being rounded up.
User avatar
DRT
Fonseca 1966
Posts: 15779
Joined: 23:51 Wed 20 Jun 2007
Location: Chesterfield, UK
Contact:

Re: Apostrophe crimes

Post by DRT »

I am a little unclear about what there is to squabble about. My maths qualification extends to a 98%ish score in the Scottish equivalent of an A-Level. My intuitive understanding of rounding would always result in me rounding 5 and above to 10 and below 5 to 0.

Do lawyers do it another way?
"The first duty of Port is to be red"
Ernest H. Cockburn
User avatar
jdaw1
Cockburn 1851
Posts: 23628
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Apostrophe crimes

Post by jdaw1 »

DRT wrote:Do lawyers do it another way?
Sometimes — it depending on the instructions from the client.

† Except when billing the client, rounding then always being up.
User avatar
DRT
Fonseca 1966
Posts: 15779
Joined: 23:51 Wed 20 Jun 2007
Location: Chesterfield, UK
Contact:

Re: Apostrophe crimes

Post by DRT »

Does the method of rounding you wish to employ meet with an international standard or specific, documented academic definition? If so, reference the source.
"The first duty of Port is to be red"
Ernest H. Cockburn
PhilW
Dalva Golden White Colheita 1952
Posts: 3510
Joined: 14:22 Wed 15 Dec 2010
Location: Near Cambridge, UK

Re: Apostrophe crimes

Post by PhilW »

DRT wrote:I am a little unclear about what there is to squabble about.
Sometimes it matters in order to avoid cumulative errors over analysis of large data sets, or addition of bias. For example, consider rounding a serial of positive floating point numbers; if you were to always round up to nearest integer, you would add a bias of 0.5 to the mean of the rounded data compared with the original. Rounding to the nearest integer works much better, but the if the rounding of the mid-point value always occurs in the same direction, this can cause a similar cumulative error over a large enough data set. This matters in some data processing applications.
PhilW
Dalva Golden White Colheita 1952
Posts: 3510
Joined: 14:22 Wed 15 Dec 2010
Location: Near Cambridge, UK

Re: Apostrophe crimes

Post by PhilW »

DRT wrote:Does the method of rounding you wish to employ meet with an international standard or specific, documented academic definition? If so, reference the source.
Yes, the IEEE defines standards for definition, format and rounding of floating point numbers stored in binary format (IEEE 754). Julian's case here is slightly different, since it is referring to the rounding to thousandths, though the same terminology could be used; in Julian's current definition the terminology would be "rounding to nearest, ties to +infinity", although ironically this is not one of the standard formats; "rounding to nearest, ties to even" is the default, while "rounding to nearest, ties away from zero" is simpler to explain.
User avatar
jdaw1
Cockburn 1851
Posts: 23628
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Apostrophe crimes

Post by jdaw1 »

There is no problem with large datasets; no standard need be followed; and I don't particularly care how rounding is done provided that it is clear, seems reasonable to a numerate lay observer, and is utterly unsquabblable.
Post Reply