Opened 15 years ago

Closed 15 years ago

#1653 closed defect (fixed)

[with patch, positive review] Bug raising an integer to a float (probably really easy to fix in integer.pyx!)

Reported by: William Stein Owned by: David Harvey
Priority: major Milestone: sage-2.10.1
Component: basic arithmetic Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

This is a bug:

sage: 2^float(3.1)
---------------------------------------------------------------------------
<type 'exceptions.TypeError'>             Traceback (most recent call last)

/Users/was/<ipython console> in <module>()

/Users/was/integer.pyx in sage.rings.integer.Integer.__pow__()

<type 'exceptions.TypeError'>: exponent (=3.1) must be an integer.
Coerce your numbers to real or complex numbers first.

Note:
sage: int(2)^float(3.1)
8.574187700290345
sage: (2/1)^float(3.1)
8.574187700290345

Note that

Attachments (1)

1653.hg (1.5 KB) - added by David Harvey 15 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 15 years ago by David Harvey

Owner: changed from somebody to David Harvey
Status: newassigned

Changed 15 years ago by David Harvey

Attachment: 1653.hg added

comment:2 Changed 15 years ago by David Harvey

Summary: Bug raising an integer to a float (probably really easy to fix in integer.pyx!)[with patch, needs review] Bug raising an integer to a float (probably really easy to fix in integer.pyx!)

comment:3 Changed 15 years ago by Robert Miller

Summary: [with patch, needs review] Bug raising an integer to a float (probably really easy to fix in integer.pyx!)[with patch, positive review] Bug raising an integer to a float (probably really easy to fix in integer.pyx!)

comment:4 Changed 15 years ago by Michael Abshoff

Resolution: fixed
Status: assignedclosed

Merged in Sage 2.10.1.alpha0

Note: See TracTickets for help on using tickets.