Defect Report : numeric_limits::is_modulo insufficently defined.

Discussion in 'C++' started by Azumanga, Nov 6, 2006.

  1. Azumanga

    Azumanga Guest

    18.2.1.2 55 states that "A type is modulo if it is possible to add two
    positive numbers together and have a result that wraps around to a
    third number that is less".

    This seems insufficent for the following reasons:

    1) Doesn't define what that value recieved is.
    2) Doesn't state the result is repeatable
    3) Doesn't require that doing addition, subtraction and other
    operations on all values is defined behaviour.

    Suggest this text is ammeded to:

    "A type is modulo if, given any operation involving +,- or * on values
    of that type whose value would fall outside the range [min(), max()],
    then the value returned differs from the true value by an integer
    multiple of (max() - min() + 1) "
    Azumanga, Nov 6, 2006
    #1
    1. Advertising

  2. Azumanga

    Marcus Kwok Guest

    Azumanga <> wrote:
    > 18.2.1.2 55 states that "A type is modulo if it is possible to add two
    > positive numbers together and have a result that wraps around to a
    > third number that is less".
    >
    > This seems insufficent for the following reasons:
    >
    > 1) Doesn't define what that value recieved is.
    > 2) Doesn't state the result is repeatable
    > 3) Doesn't require that doing addition, subtraction and other
    > operations on all values is defined behaviour.
    >
    > Suggest this text is ammeded to:
    >
    > "A type is modulo if, given any operation involving +,- or * on values
    > of that type whose value would fall outside the range [min(), max()],
    > then the value returned differs from the true value by an integer
    > multiple of (max() - min() + 1) "


    There is a discussion on this topic over on comp.std.c++:

    http://groups.google.com/group/comp.std.c /browse_frm/thread/eddbfd3c42666b5d/

    --
    Marcus Kwok
    Replace 'invalid' with 'net' to reply
    Marcus Kwok, Nov 6, 2006
    #2
    1. Advertising

  3. Azumanga

    mlimber Guest

    Azumanga wrote:
    > 18.2.1.2 55 states that "A type is modulo if it is possible to add two
    > positive numbers together and have a result that wraps around to a
    > third number that is less".
    >
    > This seems insufficent for the following reasons:
    >
    > 1) Doesn't define what that value recieved is.
    > 2) Doesn't state the result is repeatable
    > 3) Doesn't require that doing addition, subtraction and other
    > operations on all values is defined behaviour.
    >
    > Suggest this text is ammeded to:
    >
    > "A type is modulo if, given any operation involving +,- or * on values
    > of that type whose value would fall outside the range [min(), max()],
    > then the value returned differs from the true value by an integer
    > multiple of (max() - min() + 1) "


    You probably meant to post in comp.std.c++.

    Cheers! --M
    mlimber, Nov 6, 2006
    #3
  4. Azumanga

    Azumanga Guest

    mlimber wrote:
    > Azumanga wrote:
    > > 18.2.1.2 55 states that "A type is modulo if it is possible to add two
    > > positive numbers together and have a result that wraps around to a
    > > third number that is less".
    > >
    > > This seems insufficent for the following reasons:
    > >
    > > 1) Doesn't define what that value recieved is.
    > > 2) Doesn't state the result is repeatable
    > > 3) Doesn't require that doing addition, subtraction and other
    > > operations on all values is defined behaviour.
    > >
    > > Suggest this text is ammeded to:
    > >
    > > "A type is modulo if, given any operation involving +,- or * on values
    > > of that type whose value would fall outside the range [min(), max()],
    > > then the value returned differs from the true value by an integer
    > > multiple of (max() - min() + 1) "

    >
    > You probably meant to post in comp.std.c++.
    >

    Yes I did. Woops. Sorry!

    Chris
    Azumanga, Nov 10, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U2hhdw==?=

    Good defect tracking system for software development

    =?Utf-8?B?U2hhdw==?=, Oct 7, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    445
    ESPN Lover
    Oct 7, 2004
  2. Oodini
    Replies:
    1
    Views:
    1,767
    Keith Thompson
    Sep 27, 2005
  3. user923005

    Visual C++ : Defect report or not?

    user923005, Nov 1, 2007, in forum: C++
    Replies:
    6
    Views:
    491
    Dann Corbit
    Nov 1, 2007
  4. Keld Jørn Simonsen

    Defect report log v1.25 available

    Keld Jørn Simonsen, Sep 15, 2008, in forum: C Programming
    Replies:
    0
    Views:
    323
    Keld Jørn Simonsen
    Sep 15, 2008
  5. Elias Salomão Helou Neto
    Replies:
    6
    Views:
    453
    Vladimir Jovic
    Jul 28, 2010
Loading...

Share This Page