Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#26414 closed defect (fixed)

Various fixes to rational_power_parts()

Reported by: jdemeyer Owned by:
Priority: major Milestone: sage-8.5
Component: basic arithmetic Keywords:
Cc: Merged in:
Authors: Jeroen Demeyer Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 720cec7 (Commits, GitHub, GitLab) Commit: 720cec75d980d385ac3d05e136002f58e8bc6219
Dependencies: Stopgaps:

Status badges

Description (last modified by jdemeyer)

  1. It should return Integer instances, not int:
sage: x, y = rational_power_parts(1, 1/1)
sage: type(y)
<type 'int'>

This is causing breakage if from __future__ import division is added.

  1. Improve the fix from #15605 to work more generally for all negative bases.
  1. Add a few Cython optimizations.

Change History (6)

comment:1 Changed 3 years ago by jdemeyer

  • Description modified (diff)
  • Summary changed from rational_power_parts should return Integer instances (not int) to Various fixes to rational_power_parts()

comment:2 Changed 3 years ago by jdemeyer

  • Branch set to u/jdemeyer/rational_power_parts_should_return_integer_instances__not_int_

comment:3 Changed 3 years ago by jdemeyer

  • Commit set to 720cec75d980d385ac3d05e136002f58e8bc6219
  • Status changed from new to needs_review

New commits:

720cec7Various fixes to rational_power_parts()

comment:4 Changed 3 years ago by tscrim

  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to positive_review


comment:5 Changed 3 years ago by vbraun

  • Branch changed from u/jdemeyer/rational_power_parts_should_return_integer_instances__not_int_ to 720cec75d980d385ac3d05e136002f58e8bc6219
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:6 Changed 3 years ago by embray

  • Milestone changed from sage-8.4 to sage-8.5

This should be re-targeted for 8.5.

Note: See TracTickets for help on using tickets.