#26509 closed defect (fixed)

(-1).sqrt(extend=False, all=True) raises an exception

Reported by: jdemeyer Owned by:
Priority: major Milestone: sage-8.5
Component: basic arithmetic Keywords:
Cc: tscrim Merged in:
Authors: Jeroen Demeyer Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 880b0b5 (Commits) Commit: 880b0b522f601bf8c0185fd3f82041c571e931e7
Dependencies: Stopgaps:

Description (last modified by jdemeyer)

In general, N.sqrt(extend=False, all=True) should never raise an exception if N is not a square. Instead, it should just return an empty list.

We also fix 0.sqrt(prec=53) which should return a real instead of an integer.

Change History (5)

comment:1 Changed 14 months ago by jdemeyer

  • Branch set to u/jdemeyer/__1__sqrt_extend_false__all_true__raises_an_exception

comment:2 Changed 14 months ago by jdemeyer

  • Commit set to 880b0b522f601bf8c0185fd3f82041c571e931e7
  • Description modified (diff)
  • Status changed from new to needs_review

New commits:

880b0b5Various fixes to Integer.sqrt()

comment:3 Changed 13 months ago by jdemeyer

  • Cc tscrim added

comment:4 Changed 13 months ago by tscrim

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

LGTM.

comment:5 Changed 13 months ago by vbraun

  • Branch changed from u/jdemeyer/__1__sqrt_extend_false__all_true__raises_an_exception to 880b0b522f601bf8c0185fd3f82041c571e931e7
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.