Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make RealBallField useful #17786

Closed
mezzarobba opened this issue Feb 15, 2015 · 54 comments
Closed

Make RealBallField useful #17786

mezzarobba opened this issue Feb 15, 2015 · 54 comments

Comments

@mezzarobba
Copy link
Member

After #17194, implement more comprehensive Arb bindings as part of RealBallField/RealBall.

Component: numerical

Author: Marc Mezzarobba

Branch/Commit: 37bcb77

Reviewer: Fredrik Johansson

Issue created by migration from https://trac.sagemath.org/ticket/17786

@fredrik-johansson
Copy link
Contributor

comment:1

Regarding the "What is going on?!" comment: transcendental functions are not quite deterministic due to internal caches. In this case, doing something that results in an internal recomputation of log(2) to higher precision leads to a slightly more accurate value later on.

This is something that I could fix with a bit of effort.

In any case, output could also change slightly between versions due to changes in algorithms. That's an inherent drawback of doing doctests this way...

@mezzarobba
Copy link
Member Author

comment:2

Replying to @fredrik-johansson:

Regarding the "What is going on?!" comment: transcendental functions are not quite deterministic due to internal caches. In this case, doing something that results in an internal recomputation of log(2) to higher precision leads to a slightly more accurate value later on.

Good to know, I wasn't aware of that.

This is something that I could fix with a bit of effort.

Unless you have other users that need it, I don't think it is worth the effort.

In any case, output could also change slightly between versions due to changes in algorithms. That's an inherent drawback of doing doctests this way...

Yes. But I thought I'd first go with a version that tested the exact output, and we could always make something more sophisticated later on if some of the outputs really changed.

Thanks for your comments!

@cheuberg
Copy link
Contributor

comment:3

Two remarks:

  • Shouldn't we use bint for those C functions returning an integer which is meant as a boolean? In that case, bool could be omitted in the Python methods.

  • Should we really expose a function is_nonzero? We have to implement __nonzero__ anyway.

@mezzarobba
Copy link
Member Author

comment:4

Replying to @cheuberg:

Two remarks:

  • Shouldn't we use bint for those C functions returning an integer which is meant as a boolean? In that case, bool could be omitted in the Python methods.

Yes, indeed, thanks. I just copied the C prototypes without thinking...

  • Should we really expose a function is_nonzero? We have to implement __nonzero__ anyway.

RIF intervals implement __nonzero__ with the meaning of "not exactly zero". So I think we need both if we want to stay compatible with them. But then I'm not sure doing things that way in RIF was the wisest choice in the first place...

@cheuberg
Copy link
Contributor

comment:5

Replying to @mezzarobba:

Replying to @cheuberg:

  • Should we really expose a function is_nonzero? We have to implement __nonzero__ anyway.

RIF intervals implement __nonzero__ with the meaning of "not exactly zero". So I think we need both if we want to stay compatible with them. But then I'm not sure doing things that way in RIF was the wisest choice in the first place...

I think we should not have methods __nonzero__ and is_nonzero with different behaviour.

@cheuberg
Copy link
Contributor

Work Issues: Merge 17194, 17811 and rewrite doctest

@cheuberg
Copy link
Contributor

comment:6

#17194 needs to be merged. It would be good to merge #17811 and to replace its doctest by a simpler variant using the arithmetic operations introduced here.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 5, 2015

Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:

760e2e2RBF: separate conversions from initialization of elements
464c601RealBall: def accuracy
e3453cerst syntax fixes
624a609RBF: more conversions
26d4130RealBall: better error handling
ef6d130RealBall: simple predicates
dd15270RealBall: more comparisons
d1c6169RealBall: contains()
b54dd6cRealBall: sqrt and friends
2eec53aRealBall: elementary functions

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 5, 2015

Changed commit from 21bee7d to 2eec53a

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 5, 2015

Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:

fae4e89RBF: separate conversions from initialization of elements
01af6a9RealBall: def accuracy
b1d45darst syntax fixes
0101f43RBF: more conversions
cd8b230RealBall: better error handling
6ff081aRealBall: simple predicates
1af1a53RealBall: more comparisons
5e00b8dRealBall: contains()
b76df7fRealBall: sqrt and friends
0b34a7aRealBall: elementary functions

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 5, 2015

Changed commit from 2eec53a to 0b34a7a

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 5, 2015

Changed commit from 0b34a7a to 1c8de12

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 5, 2015

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

2f2e95eRealBall: "return nonzero" → "return True" (for consistency)
d65e84eRealBall: rename arc-trig functions
ca2f5f9RealBall: adapt tests do deal with nondeterministic output
1c8de12RealBall: minor changes to docstrings and comments

@fredrik-johansson
Copy link
Contributor

Changed branch from u/mmezzarobba/arb to u/fredrik.johansson/arb

@mezzarobba
Copy link
Member Author

Changed commit from 1c8de12 to 54340f0

@mezzarobba
Copy link
Member Author

Last 10 new commits:

b518474RealBall: contains()
d28e6c2RealBall: sqrt and friends
8ea7a07RealBall: elementary functions
39c7c96RealBall: "return nonzero" → "return True" (for consistency)
17bf841RealBall: rename arc-trig functions
f8e2db9RealBall: adapt tests do deal with nondeterministic output
71a82e7RealBall: minor changes to docstrings and comments
9732629RealBall: fix comparisons involving special values
91591bfRealBall: some special functions
54340f0RealBallField: some ball function of non-ball arguments

@mezzarobba
Copy link
Member Author

Changed branch from u/fredrik.johansson/arb to u/mmezzarobba/arb

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 6, 2015

Changed commit from 54340f0 to 9ab0759

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 6, 2015

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

9ab0759RealBall: polylogs

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 6, 2015

Changed commit from 9ab0759 to 6d44ccb

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 6, 2015

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

6d44ccbRealBall: more functions

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 6, 2015

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

5a14202RealBall: changing my mind about nan1 == nan2 when nan1 is nan2

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 6, 2015

Changed commit from 6d44ccb to 5a14202

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 6, 2015

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

f5ed6b1RealBallField: misc Parent stuff
5d13026RealBall: TODO

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 6, 2015

Changed commit from 5a14202 to 5d13026

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 6, 2015

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

528fcdaRealBall: mid, rad as balls

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 6, 2015

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

b8036f2real_arb: let's no longer call the bindings elementary :-)
19aee15Fix coercion RBF → InfinityRing when arb is not installed

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 6, 2015

Changed commit from 28d63d8 to 19aee15

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 6, 2015

Changed commit from 19aee15 to 88d770d

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 6, 2015

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

88d770dreal_arb: rst syntax fixes

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 6, 2015

Changed commit from 88d770d to 0f67513

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 6, 2015

Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:

edf95abRealBall: mid, rad as balls
9469ce3RealBall: fix an incorrect statement copied from the arb documentation
5183126RealBall: remove duplicate methods introduced by mistake
8c1df6bRealBall: comparisons with symbolic ±∞
be93dbaRealBall: floor(), ceil()
36801c6RealBall: allow RealNumbers as radii
9e06ccereal_arb: let's no longer call the bindings elementary :-)
a6d68c6Fix coercion RBF → InfinityRing when arb is not installed
4046200real_arb: rst syntax fixes
0f67513real_arb: mark all tests as optional

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 6, 2015

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

1c6aa0cRealBall: improve conversion to MPFI intervals
2dd40b7real_arb: mark all tests as optional

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 6, 2015

Changed commit from 0f67513 to 2dd40b7

@mezzarobba
Copy link
Member Author

Changed work issues from Merge 17194, 17811 and rewrite doctest to none

@mezzarobba
Copy link
Member Author

Author: Marc Mezzarobba

@mezzarobba

This comment has been minimized.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 10, 2015

Changed commit from 2dd40b7 to 37bcb77

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 10, 2015

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

760c2d5real_arb: let's no longer call the bindings rudimentary :-)
91dddf9Fix coercion RBF → InfinityRing when arb is not installed
b4f922breal_arb: rst syntax fixes
1134261RealBall: improve conversion to MPFI intervals
441f1c4RealBall: remove superfluous bool() added back by mistake
37bcb77real_arb: mark all tests as optional

@fredrik-johansson
Copy link
Contributor

comment:27

Looks good to me.

Btw, I'm unable to build the reference manual, but this is presumably some problem with my Sage install and unrelated to this ticket.

@fredrik-johansson
Copy link
Contributor

Reviewer: fredrik.johansson

@mezzarobba
Copy link
Member Author

comment:28

Thanks for the review!

@vbraun
Copy link
Member

vbraun commented Mar 10, 2015

comment:29

Reviewer name is supposed to be the real name, not the trac account name

@fredrik-johansson
Copy link
Contributor

Changed reviewer from fredrik.johansson to Fredrik Johansson

@vbraun
Copy link
Member

vbraun commented Mar 12, 2015

Changed branch from u/mmezzarobba/arb to 37bcb77

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants