Opened 12 years ago

Closed 12 years ago

#9156 closed enhancement (fixed)

Add real() and imag() methods to Integer and Rational

Reported by: robertwb Owned by: AlexGhitza
Priority: major Milestone: sage-4.4.4
Component: basic arithmetic Keywords:
Cc: Merged in: sage-4.4.4.alpha0
Authors: Robert Bradshaw Reviewers: Andrey Novoseltsev
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

This is useful for consistently handling elements of ZZ, QQ, RR, and CC.

Attachments (1)

9156-QQ-ZZ-real-imag.patch (1.8 KB) - added by robertwb 12 years ago.

Download all attachments as: .zip

Change History (4)

Changed 12 years ago by robertwb

comment:1 Changed 12 years ago by robertwb

  • Status changed from new to needs_review

comment:2 Changed 12 years ago by novoselt

  • Authors set to Robert Bradshaw
  • Reviewers set to Andrey Novoseltsev
  • Status changed from needs_review to positive_review

A little, but very pleasant change, I find it very annoying when simpler objects don't have "part-accessing methods" of more complicated ones. All doctests pass.

comment:3 Changed 12 years ago by mhansen

  • Merged in set to sage-4.4.4.alpha0
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.