Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

float('inf')**2 != inf #51785

Closed
mdonolo mannequin opened this issue Dec 17, 2009 · 2 comments
Closed

float('inf')**2 != inf #51785

mdonolo mannequin opened this issue Dec 17, 2009 · 2 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@mdonolo
Copy link
Mannequin

mdonolo mannequin commented Dec 17, 2009

BPO 7536
Nosy @tim-one, @mdickinson
Superseder
  • bpo-7534: float('nan')**2 != nan. float('nan')**2 error 33 on windows
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2009-12-17.19:32:33.641>
    created_at = <Date 2009-12-17.19:27:46.335>
    labels = ['interpreter-core', 'type-bug']
    title = "float('inf')**2 != inf"
    updated_at = <Date 2009-12-17.19:32:33.639>
    user = 'https://bugs.python.org/mdonolo'

    bugs.python.org fields:

    activity = <Date 2009-12-17.19:32:33.639>
    actor = 'mark.dickinson'
    assignee = 'none'
    closed = True
    closed_date = <Date 2009-12-17.19:32:33.641>
    closer = 'mark.dickinson'
    components = ['Interpreter Core']
    creation = <Date 2009-12-17.19:27:46.335>
    creator = 'mdonolo'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 7536
    keywords = []
    message_count = 2.0
    messages = ['96527', '96528']
    nosy_count = 3.0
    nosy_names = ['tim.peters', 'mark.dickinson', 'mdonolo']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = None
    status = 'closed'
    superseder = '7534'
    type = 'behavior'
    url = 'https://bugs.python.org/issue7536'
    versions = ['Python 2.6']

    @mdonolo
    Copy link
    Mannequin Author

    mdonolo mannequin commented Dec 17, 2009

    The ** operator produces an error when it gets inf as an argument.
    if I try.
    >>>a=float('inf')
    >>>a*a 
    inf
    -but if I try 
    >>>a**2 
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    OverflowError: (34, 'Result too large')
    I should get inf too.

    @mdonolo mdonolo mannequin added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error labels Dec 17, 2009
    @mdickinson
    Copy link
    Member

    This is essentially the same issue as bpo-7534, but for infinities
    instead of nans. I'm closing this and folding the issue into that one.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant