Opened 5 years ago

Closed 5 years ago

#23145 closed defect (fixed)

Interval and ball field elements conversion to Python float/complex

Reported by: Ralf Stephan Owned by:
Priority: major Milestone: sage-8.0
Component: numerical Keywords:
Cc: Merged in:
Authors: Ralf Stephan Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 4138752 (Commits, GitHub, GitLab) Commit: 4138752eab7005f881d3e2586b828f92be1b7e0c
Dependencies: Stopgaps:

Status badges

Description (last modified by Ralf Stephan)

Each of float(RIF(1)),float(RBF(1)),float(CBF(1)) fails with

TypeError: float() argument must be a string or a number

and float(CIF(1)) fails with

TypeError: can't convert complex interval to float

i.e. the __float__() member exists but is not implemented.

Change History (8)

comment:1 Changed 5 years ago by Ralf Stephan

Description: modified (diff)

comment:2 Changed 5 years ago by Ralf Stephan

Branch: u/rws/interval_and_ball_field_elements_conversion_to_python_float_complex

comment:3 Changed 5 years ago by Ralf Stephan

Authors: Ralf Stephan
Commit: 13bb3b034cf78edcc505c5ccf841db7407ae1b60
Status: newneeds_review

New commits:

13bb3b023145: Interval and ball field elements conversion to Python float/complex

comment:4 Changed 5 years ago by Travis Scrimshaw

Reviewers: Travis Scrimshaw
Status: needs_reviewpositive_review

These should all be there because we can naturally convert to RR, which has coercions to RDF and floats.

comment:5 Changed 5 years ago by Volker Braun

Status: positive_reviewneeds_work

See patchbot

comment:6 Changed 5 years ago by git

Commit: 13bb3b034cf78edcc505c5ccf841db7407ae1b604138752eab7005f881d3e2586b828f92be1b7e0c

Branch pushed to git repo; I updated commit sha1. New commits:

025ba10Merge branch 'develop' into t/23145/interval_and_ball_field_elements_conversion_to_python_float_complex
413875223145: fix doctest

comment:7 Changed 5 years ago by Ralf Stephan

Status: needs_workpositive_review

Just a quick fix for a missed doctest.

comment:8 Changed 5 years ago by Volker Braun

Branch: u/rws/interval_and_ball_field_elements_conversion_to_python_float_complex4138752eab7005f881d3e2586b828f92be1b7e0c
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.