Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Range notation

Range notation

Scheduled Pinned Locked Moved The Lounge
databasediscussiongraphicsquestionlearning
46 Posts 20 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Klaus Werner Konrad
    wrote on last edited by
    #1

    Well - had a (very short) discussion with Bjarne Stroustrup this day ... In a draft of his new book he explained a code fragment as

    double& Vector::operator[](int i)
    {
    if (i<0 || size()<=i) throw out_of_range{"Vector::operator[]"};
    retur n elem[i];
    }

    where size() returns the number of elements in the vector collection. But in the text he wrote: (can't find any link to 'quote' a clipboarded text) "Had we formally specified V ector’s subscript operator, we would have said something like ‘‘the index must be in the [0 : size()) range,’’ and that was in fact what we tested in our operator[]()." His reply to my question about this discrepance was (as I asked for) that I'm missing that it is 'common (at least in US) a Notation for 'open range''; what's quiet not definite - it's a 'right open range'. But that's not the Point; my query is to find out, if this Notation is (seen worlswide) really common. For me, this Notation is just confusing; I prefer the inbound (FROM incl. x TO incl. Y) notation. What are your thoughts about it (please with Nation code, to weight the arguments)

    Richard DeemingR C P R L 13 Replies Last reply
    0
    • K Klaus Werner Konrad

      Well - had a (very short) discussion with Bjarne Stroustrup this day ... In a draft of his new book he explained a code fragment as

      double& Vector::operator[](int i)
      {
      if (i<0 || size()<=i) throw out_of_range{"Vector::operator[]"};
      retur n elem[i];
      }

      where size() returns the number of elements in the vector collection. But in the text he wrote: (can't find any link to 'quote' a clipboarded text) "Had we formally specified V ector’s subscript operator, we would have said something like ‘‘the index must be in the [0 : size()) range,’’ and that was in fact what we tested in our operator[]()." His reply to my question about this discrepance was (as I asked for) that I'm missing that it is 'common (at least in US) a Notation for 'open range''; what's quiet not definite - it's a 'right open range'. But that's not the Point; my query is to find out, if this Notation is (seen worlswide) really common. For me, this Notation is just confusing; I prefer the inbound (FROM incl. x TO incl. Y) notation. What are your thoughts about it (please with Nation code, to weight the arguments)

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      It's the standard mathematical notation for an interval: https://en.wikipedia.org/wiki/Interval_%28mathematics%29#Notations_for_intervals[^]


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      K 1 Reply Last reply
      0
      • K Klaus Werner Konrad

        Well - had a (very short) discussion with Bjarne Stroustrup this day ... In a draft of his new book he explained a code fragment as

        double& Vector::operator[](int i)
        {
        if (i<0 || size()<=i) throw out_of_range{"Vector::operator[]"};
        retur n elem[i];
        }

        where size() returns the number of elements in the vector collection. But in the text he wrote: (can't find any link to 'quote' a clipboarded text) "Had we formally specified V ector’s subscript operator, we would have said something like ‘‘the index must be in the [0 : size()) range,’’ and that was in fact what we tested in our operator[]()." His reply to my question about this discrepance was (as I asked for) that I'm missing that it is 'common (at least in US) a Notation for 'open range''; what's quiet not definite - it's a 'right open range'. But that's not the Point; my query is to find out, if this Notation is (seen worlswide) really common. For me, this Notation is just confusing; I prefer the inbound (FROM incl. x TO incl. Y) notation. What are your thoughts about it (please with Nation code, to weight the arguments)

        C Offline
        C Offline
        CPallini
        wrote on last edited by
        #3

        (If I got you) Yes, [) is a common notation (at least here in Italy) for the right open range. I suppose it is a fair common mathematical notation also in the rest of the world.

        Veni, vidi, vici.

        K F 2 Replies Last reply
        0
        • Richard DeemingR Richard Deeming

          It's the standard mathematical notation for an interval: https://en.wikipedia.org/wiki/Interval_%28mathematics%29#Notations_for_intervals[^]


          "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

          K Offline
          K Offline
          Klaus Werner Konrad
          wrote on last edited by
          #4

          Ahem ... It's one of the (Standard) notations,but not the Standard Notation ! Remember PASCAL ? And - especially for a novice programmer - this Notation can lead to the 'on off' bug 'cause of misinterpretation (I thought it was a typo, 'cause a ')' is a SHIFT+9, whereas a ']' is a ALTGR+9' (on a german keyboard) ... But my real question is, if you provide an API, in wich notation would you explain a range to your customer (app dev), and wich notation would you (as an app dev) expect (in cross-reading the doc.'cause your'e in a hurry)

          E J 2 Replies Last reply
          0
          • C CPallini

            (If I got you) Yes, [) is a common notation (at least here in Italy) for the right open range. I suppose it is a fair common mathematical notation also in the rest of the world.

            Veni, vidi, vici.

            K Offline
            K Offline
            Klaus Werner Konrad
            wrote on last edited by
            #5

            You got me, thanks. May be I'm just ignorant, but I've never come across this notation, and it's (from a Logical thought) very uncomfortable, and also it's not common in the common sense ... Imagine: "Select - on a Scala from 1 to 10 =[1:10]" against "Select - on a Scala fron 1 to 10 =[1:11) What is intuitive ? What can you get only by cross-reading (the FM for the API)? What is the natural thinking (against that indices 'MUST start with 0') ?

            N E C J 4 Replies Last reply
            0
            • K Klaus Werner Konrad

              You got me, thanks. May be I'm just ignorant, but I've never come across this notation, and it's (from a Logical thought) very uncomfortable, and also it's not common in the common sense ... Imagine: "Select - on a Scala from 1 to 10 =[1:10]" against "Select - on a Scala fron 1 to 10 =[1:11) What is intuitive ? What can you get only by cross-reading (the FM for the API)? What is the natural thinking (against that indices 'MUST start with 0') ?

              N Offline
              N Offline
              Nueman
              wrote on last edited by
              #6

              Link[^]

              What me worry?

              D 1 Reply Last reply
              0
              • N Nueman

                Link[^]

                What me worry?

                D Offline
                D Offline
                Dan Neely
                wrote on last edited by
                #7

                Leslie Nelson[^] would like to have a word with you.

                Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt

                N 1 Reply Last reply
                0
                • D Dan Neely

                  Leslie Nelson[^] would like to have a word with you.

                  Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt

                  N Offline
                  N Offline
                  Nueman
                  wrote on last edited by
                  #8

                  :-O oops

                  What me worry?

                  1 Reply Last reply
                  0
                  • K Klaus Werner Konrad

                    Ahem ... It's one of the (Standard) notations,but not the Standard Notation ! Remember PASCAL ? And - especially for a novice programmer - this Notation can lead to the 'on off' bug 'cause of misinterpretation (I thought it was a typo, 'cause a ')' is a SHIFT+9, whereas a ']' is a ALTGR+9' (on a german keyboard) ... But my real question is, if you provide an API, in wich notation would you explain a range to your customer (app dev), and wich notation would you (as an app dev) expect (in cross-reading the doc.'cause your'e in a hurry)

                    E Offline
                    E Offline
                    Emmanuel Medina
                    wrote on last edited by
                    #9

                    Klaus-Werner Konrad wrote:

                    It's one of the (Standard) notations,but not the Standard Notation !

                    He said MATHEMATICAL notation

                    If you think you can do a thing or think you can't do a thing, you're right - Henry Ford Emmanuel Medina Lopez

                    Richard DeemingR 1 Reply Last reply
                    0
                    • E Emmanuel Medina

                      Klaus-Werner Konrad wrote:

                      It's one of the (Standard) notations,but not the Standard Notation !

                      He said MATHEMATICAL notation

                      If you think you can do a thing or think you can't do a thing, you're right - Henry Ford Emmanuel Medina Lopez

                      Richard DeemingR Offline
                      Richard DeemingR Offline
                      Richard Deeming
                      wrote on last edited by
                      #10

                      Emmanuel Medina Lopez wrote:

                      He said MATHEMATICAL notation

                      To be fair, I did say the standard mathematical notation. :-D


                      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

                      K 1 Reply Last reply
                      0
                      • Richard DeemingR Richard Deeming

                        Emmanuel Medina Lopez wrote:

                        He said MATHEMATICAL notation

                        To be fair, I did say the standard mathematical notation. :-D


                        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                        K Offline
                        K Offline
                        Klaus Werner Konrad
                        wrote on last edited by
                        #11

                        And this is exacly my Point - as explicitly as your Response is, this is my one: https://en.wikipedia.org/wiki/Integral[^] It is NOT the Standard to have an open range - the Standard is "for all values from (incl.) X to (incl.) Y do f(z) Am I missing something here, or am I just wrong, and ... did you read my original question, where I Asked for your opinion to explain the range to a customer for your API, and NOT asked to explain me what the Standard Notation (in YOUR opinium) for a range Definition is ? It was not my Goal to start a war of the notations, but to know what is usual for you AND YOUR CUSTOMERS. Sorry to let you go from your Bacon talk ...

                        Richard DeemingR 1 Reply Last reply
                        0
                        • K Klaus Werner Konrad

                          You got me, thanks. May be I'm just ignorant, but I've never come across this notation, and it's (from a Logical thought) very uncomfortable, and also it's not common in the common sense ... Imagine: "Select - on a Scala from 1 to 10 =[1:10]" against "Select - on a Scala fron 1 to 10 =[1:11) What is intuitive ? What can you get only by cross-reading (the FM for the API)? What is the natural thinking (against that indices 'MUST start with 0') ?

                          E Offline
                          E Offline
                          Espen Harlinn
                          wrote on last edited by
                          #12

                          I sometimes think it would be better if we remembered that we are talking about programming languages. Saying that std::vector has a range equal to [0,size()> or [begin(),end()> makes sense because we are talking about constructs that are used to specify computer programs, and personally I think it's a good idea to force the programmer to acknowledge that he/she is in fact creating a specification that will be used to generate a computer program.

                          Klaus-Werner Konrad wrote:

                          What is intuitive ?

                          What your accustomed to

                          Klaus-Werner Konrad wrote:

                          What is the natural thinking

                          I'm pretty sure your mind doesn't work exactly like mine, and even if we had the same idea we would express it differently. If I told you about my idea, your understanding of what I said would probably be something that would be slightly, or perhaps significantly, different from what I actually meant.

                          Klaus-Werner Konrad wrote:

                          against that indices 'MUST start with 0'

                          for i := 1 To 10: Will natural thinking give me 9 or 10 iterations? Natural thinking is ambiguous, and that is something we can't have in a programming language, and a very significant part of what goes on in the C++ committee is about clarifying and removing ambiguities from the specification. Having said that, it's fair to remind you that there is nothing that prevents you from creating a vector like container where you access all the elements like this:

                          sequence seq;
                          // add elements to the container
                          seq.add(1);
                          seq.add(2);
                          seq.add(3);
                          // and loop over the elements
                          for( int i = 1; i <= seq.count(); i++ )
                          {
                          int value = seq[i];
                          }

                          I've worked with class libraries that did stuff like that back in the 90'ties, and personally I didn't find them intuitive at all - even if I'm pretty sure that the author did.

                          Espen Harlinn Principal Architect, Software - Goodtech Projects & Services AS Projects promoting programming in "natural language" are intrinsically doomed to fail. Edsger W.Dijkstra

                          1 Reply Last reply
                          0
                          • K Klaus Werner Konrad

                            Well - had a (very short) discussion with Bjarne Stroustrup this day ... In a draft of his new book he explained a code fragment as

                            double& Vector::operator[](int i)
                            {
                            if (i<0 || size()<=i) throw out_of_range{"Vector::operator[]"};
                            retur n elem[i];
                            }

                            where size() returns the number of elements in the vector collection. But in the text he wrote: (can't find any link to 'quote' a clipboarded text) "Had we formally specified V ector’s subscript operator, we would have said something like ‘‘the index must be in the [0 : size()) range,’’ and that was in fact what we tested in our operator[]()." His reply to my question about this discrepance was (as I asked for) that I'm missing that it is 'common (at least in US) a Notation for 'open range''; what's quiet not definite - it's a 'right open range'. But that's not the Point; my query is to find out, if this Notation is (seen worlswide) really common. For me, this Notation is just confusing; I prefer the inbound (FROM incl. x TO incl. Y) notation. What are your thoughts about it (please with Nation code, to weight the arguments)

                            P Offline
                            P Offline
                            PIEBALDconsult
                            wrote on last edited by
                            #13

                            Klaus-Werner Konrad wrote:

                            if this Notation is (seen worlswide) really common

                            Maybe amongst mathemeticians, maybe not amongst bit-pushers.

                            Klaus-Werner Konrad wrote:

                            is just confusing

                            To me too.

                            Klaus-Werner Konrad wrote:

                            (FROM incl. x TO incl. Y)

                            X|

                            1 Reply Last reply
                            0
                            • K Klaus Werner Konrad

                              Well - had a (very short) discussion with Bjarne Stroustrup this day ... In a draft of his new book he explained a code fragment as

                              double& Vector::operator[](int i)
                              {
                              if (i<0 || size()<=i) throw out_of_range{"Vector::operator[]"};
                              retur n elem[i];
                              }

                              where size() returns the number of elements in the vector collection. But in the text he wrote: (can't find any link to 'quote' a clipboarded text) "Had we formally specified V ector’s subscript operator, we would have said something like ‘‘the index must be in the [0 : size()) range,’’ and that was in fact what we tested in our operator[]()." His reply to my question about this discrepance was (as I asked for) that I'm missing that it is 'common (at least in US) a Notation for 'open range''; what's quiet not definite - it's a 'right open range'. But that's not the Point; my query is to find out, if this Notation is (seen worlswide) really common. For me, this Notation is just confusing; I prefer the inbound (FROM incl. x TO incl. Y) notation. What are your thoughts about it (please with Nation code, to weight the arguments)

                              R Offline
                              R Offline
                              Ravi Bhavnani
                              wrote on last edited by
                              #14

                              I've always interpreted [a,b) to mean from (and including) a upto (but not including) b. /ravi

                              My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

                              1 Reply Last reply
                              0
                              • K Klaus Werner Konrad

                                You got me, thanks. May be I'm just ignorant, but I've never come across this notation, and it's (from a Logical thought) very uncomfortable, and also it's not common in the common sense ... Imagine: "Select - on a Scala from 1 to 10 =[1:10]" against "Select - on a Scala fron 1 to 10 =[1:11) What is intuitive ? What can you get only by cross-reading (the FM for the API)? What is the natural thinking (against that indices 'MUST start with 0') ?

                                C Offline
                                C Offline
                                CPallini
                                wrote on last edited by
                                #15

                                The notation comes from mathematics where is very useful for open ranges of real numbers, for instance [0,5) is the open range containing all the real numbers from 0 (included) up to 5 excluded. It means an element of the range my go very very (arbitrary in fact) close to 5 but can't reach it. You cannot use the [] notation with this kind of range. Its usage with ranges of discrete elements (like in your examples) might be more arguable (however many folks don't find it confusing).

                                Veni, vidi, vici.

                                1 Reply Last reply
                                0
                                • K Klaus Werner Konrad

                                  Well - had a (very short) discussion with Bjarne Stroustrup this day ... In a draft of his new book he explained a code fragment as

                                  double& Vector::operator[](int i)
                                  {
                                  if (i<0 || size()<=i) throw out_of_range{"Vector::operator[]"};
                                  retur n elem[i];
                                  }

                                  where size() returns the number of elements in the vector collection. But in the text he wrote: (can't find any link to 'quote' a clipboarded text) "Had we formally specified V ector’s subscript operator, we would have said something like ‘‘the index must be in the [0 : size()) range,’’ and that was in fact what we tested in our operator[]()." His reply to my question about this discrepance was (as I asked for) that I'm missing that it is 'common (at least in US) a Notation for 'open range''; what's quiet not definite - it's a 'right open range'. But that's not the Point; my query is to find out, if this Notation is (seen worlswide) really common. For me, this Notation is just confusing; I prefer the inbound (FROM incl. x TO incl. Y) notation. What are your thoughts about it (please with Nation code, to weight the arguments)

                                  L Offline
                                  L Offline
                                  Lost User
                                  wrote on last edited by
                                  #16

                                  Using a colon instead of a comma or a dash looks a little odd to me, but ok, I get what he means. I would have preferred [0, size() - 1] to make it more explicit and to make it clear that it's not typo. (NL)

                                  1 Reply Last reply
                                  0
                                  • K Klaus Werner Konrad

                                    And this is exacly my Point - as explicitly as your Response is, this is my one: https://en.wikipedia.org/wiki/Integral[^] It is NOT the Standard to have an open range - the Standard is "for all values from (incl.) X to (incl.) Y do f(z) Am I missing something here, or am I just wrong, and ... did you read my original question, where I Asked for your opinion to explain the range to a customer for your API, and NOT asked to explain me what the Standard Notation (in YOUR opinium) for a range Definition is ? It was not my Goal to start a war of the notations, but to know what is usual for you AND YOUR CUSTOMERS. Sorry to let you go from your Bacon talk ...

                                    Richard DeemingR Offline
                                    Richard DeemingR Offline
                                    Richard Deeming
                                    wrote on last edited by
                                    #17

                                    Klaus-Werner Konrad wrote:

                                    did you read my original question

                                    Yes, I read your question. I'm not in the habit of posting random links in response to threads I haven't read. You asked if the notation was common; I pointed out that, in mathematics, it's the standard notation. Anyone with a mathematical background would understand [x, y) to mean x <= i < y, which makes it a fairly common notation. It's also much simpler than your proposed FROM incl. x TO incl. Y notation.

                                    Klaus-Werner Konrad wrote:

                                    what is usual for you AND YOUR CUSTOMERS

                                    Your original question made no mention of customers. You were talking about a book aimed at programmers. It's fairly reasonable to assume that most programmers will have at least a basic understanding of common mathematical notation. If it was aimed at people without such an understanding, you would most likely avoid any notation for limits unless you explained it first. FYI: In English, responding to answers with "did you read the question?" sounds patronising and antagonistic. I'm assuming that wasn't your intent?


                                    "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                                    "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

                                    K 1 Reply Last reply
                                    0
                                    • Richard DeemingR Richard Deeming

                                      Klaus-Werner Konrad wrote:

                                      did you read my original question

                                      Yes, I read your question. I'm not in the habit of posting random links in response to threads I haven't read. You asked if the notation was common; I pointed out that, in mathematics, it's the standard notation. Anyone with a mathematical background would understand [x, y) to mean x <= i < y, which makes it a fairly common notation. It's also much simpler than your proposed FROM incl. x TO incl. Y notation.

                                      Klaus-Werner Konrad wrote:

                                      what is usual for you AND YOUR CUSTOMERS

                                      Your original question made no mention of customers. You were talking about a book aimed at programmers. It's fairly reasonable to assume that most programmers will have at least a basic understanding of common mathematical notation. If it was aimed at people without such an understanding, you would most likely avoid any notation for limits unless you explained it first. FYI: In English, responding to answers with "did you read the question?" sounds patronising and antagonistic. I'm assuming that wasn't your intent?


                                      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                                      K Offline
                                      K Offline
                                      Klaus Werner Konrad
                                      wrote on last edited by
                                      #18

                                      Richard Deeming wrote:

                                      Yes, I read your question. I'm not in the habit of posting random links in response to threads I haven't read.
                                       
                                      You asked if the notation was common; I pointed out that, in mathematics, it's the standard notation

                                      Hm... I followed your link again, and the first paragraph reads:

                                      In mathematics, a (real) interval is a set of real numbers with the property that any number that lies between two numbers in the set is also included in the set. For example, the set of all numbers x satisfying 0 ≤ x ≤ 1 is an interval which contains 0 and 1, as well as all numbers between them

                                      After the TOC is a paragraph titled 'Notations for intervals', that reads

                                      The interval of numbers between a and b, including a and b, is often denoted [a, b]. The two numbers are called the endpoints of the interval. In countries where numbers are written with a decimal comma, a semicolon may be used as a separator, to avoid ambiguity.

                                      Some paragraphs down is a paragraph titled 'Integer intervals' that reads

                                      The notation [a .. b] when a and b are integers, or {a .. b} , or just a .. b is sometimes used to indicate the interval of all integers between a and b, including both. This notation is used in some programming languages; in Pascal, for example, it is used to define the set of valid indices of a vector.

                                      Also ther is a link to https://en.wikipedia.org/wiki/Interval_arithmetic[^]There, too, all intervals are described with the [a,b] Notation. So - sorry, but I really doubt that [a,b) is the standard Notation, even in mathematics ...

                                      Richard Deeming wrote:

                                      It's also much simpler than your proposed FROM incl. x TO incl. Y notation

                                      Well - I just tried to emphasize the inclusion of x and y, but meant [x,y]. I don't want to introduce a new Notation :-)

                                      Richard Deeming wrote:

                                      Your original question made no mention of customers

                                      If you write libraries (as I do) your customers are programmers, too. Last, I apologise; I didn't intend to be patronising, but your answer (just a link) was IMHO not really an answer to my question.

                                      Richard DeemingR 1 Reply Last reply
                                      0
                                      • K Klaus Werner Konrad

                                        Richard Deeming wrote:

                                        Yes, I read your question. I'm not in the habit of posting random links in response to threads I haven't read.
                                         
                                        You asked if the notation was common; I pointed out that, in mathematics, it's the standard notation

                                        Hm... I followed your link again, and the first paragraph reads:

                                        In mathematics, a (real) interval is a set of real numbers with the property that any number that lies between two numbers in the set is also included in the set. For example, the set of all numbers x satisfying 0 ≤ x ≤ 1 is an interval which contains 0 and 1, as well as all numbers between them

                                        After the TOC is a paragraph titled 'Notations for intervals', that reads

                                        The interval of numbers between a and b, including a and b, is often denoted [a, b]. The two numbers are called the endpoints of the interval. In countries where numbers are written with a decimal comma, a semicolon may be used as a separator, to avoid ambiguity.

                                        Some paragraphs down is a paragraph titled 'Integer intervals' that reads

                                        The notation [a .. b] when a and b are integers, or {a .. b} , or just a .. b is sometimes used to indicate the interval of all integers between a and b, including both. This notation is used in some programming languages; in Pascal, for example, it is used to define the set of valid indices of a vector.

                                        Also ther is a link to https://en.wikipedia.org/wiki/Interval_arithmetic[^]There, too, all intervals are described with the [a,b] Notation. So - sorry, but I really doubt that [a,b) is the standard Notation, even in mathematics ...

                                        Richard Deeming wrote:

                                        It's also much simpler than your proposed FROM incl. x TO incl. Y notation

                                        Well - I just tried to emphasize the inclusion of x and y, but meant [x,y]. I don't want to introduce a new Notation :-)

                                        Richard Deeming wrote:

                                        Your original question made no mention of customers

                                        If you write libraries (as I do) your customers are programmers, too. Last, I apologise; I didn't intend to be patronising, but your answer (just a link) was IMHO not really an answer to my question.

                                        Richard DeemingR Offline
                                        Richard DeemingR Offline
                                        Richard Deeming
                                        wrote on last edited by
                                        #19

                                        All of the references to [x, y] are including both endpoints. I think you missed the section headed "Excluding the endpoints":

                                        To indicate that one of the endpoints is to be excluded from the set, the corresponding square bracket can be either replaced with a parenthesis, or reversed. Both notations are described in International standard ISO 31-11[^].

                                        Which means that both [x, y) and [x, y[ are international standard representations of a right half-open interval.


                                        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                                        "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

                                        K 1 Reply Last reply
                                        0
                                        • Richard DeemingR Richard Deeming

                                          All of the references to [x, y] are including both endpoints. I think you missed the section headed "Excluding the endpoints":

                                          To indicate that one of the endpoints is to be excluded from the set, the corresponding square bracket can be either replaced with a parenthesis, or reversed. Both notations are described in International standard ISO 31-11[^].

                                          Which means that both [x, y) and [x, y[ are international standard representations of a right half-open interval.


                                          "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                                          K Offline
                                          K Offline
                                          Klaus Werner Konrad
                                          wrote on last edited by
                                          #20

                                          Well - let me repeat my reply to your first post:

                                          It's one of the (Standard) notations,but not the Standard Notation !

                                          And NO, I didn't miss the section headed 'Excluding the endpoints' Also, the notation [a,b] is listed in ISO 31-11, too.

                                          Richard DeemingR 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups