Opened 5 years ago

Closed 4 years ago

# Elementary and special functions for complex balls

Reported by: Owned by: mmezzarobba major sage-7.1 numerical arb Marc Mezzarobba Dima Pasechnik N/A rebase over 7.0, doc. CBF 3873da1 (Commits) 3873da1a665e028a2bb4cf3f11346cb229319882 #19063, #19152

Wrap the elementary and special functions on complex balls provided by arb (as of arb 2.6; a few more functions were added since then). We typically wrap only the high-level versions with automatic algorithm choice, and provide no Python access to implementations variants.

### comment:1 Changed 5 years ago by mmezzarobba

• Branch set to u/mmezzarobba/19082-acb-funs
• Commit set to cdede7e8b4c2aac6546fdef3f618b70612246fb2
• Status changed from new to needs_review

Last 10 new commits:

 ​b4e82aa `{Real,Complex}Ball: implement conversions to QQ` ​5e1cbda `ComplexBall: containment and overlapping predicates` ​d44c1b1 `ComplexBall: abs(), arg()` ​62af563 `RealBall: implement abs()` ​448bf24 `{Real,Complex}Ball: implement {above,below}_abs()` ​11f545b `ComplexBall: elementary functions` ​91f95f7 `ComplexBall: optimized powering methods` ​8e30743 `ComplexBall: rising_factorial()` ​1d98780 `ComplexBall: special functions` ​cdede7e `ComplexBall: additional special functions, from acb_hypgeom`

### comment:2 Changed 5 years ago by mmezzarobba

• Summary changed from Elementary and special functions for real balls to Elementary and special functions for complex balls

### comment:3 Changed 5 years ago by fredrik.johansson

In hypergeometric(), you could check if one of the upper parameters (typo: "paramaters") is equal to 1, and remove it. I guess you could also wrap hypgeom_m for 1F1 in this function. On the other hand, maybe it's best to wait until I put a function for pFq in Arb that takes care of all such special cases...

If you upgrade to Arb 2.7.0, you can add Bessel Y, Bessel I, polygamma, barnes_g, log_barnes_g, and some more hyperbolic functions of complex arguments.

### comment:4 Changed 5 years ago by git

• Commit changed from cdede7e8b4c2aac6546fdef3f618b70612246fb2 to c203cfb7d9ff626be701af6152ff64ffbda0bb91

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

 ​c203cfb `ComplexBall: unify & improve hypergeometric functions`

### comment:5 Changed 4 years ago by git

• Commit changed from c203cfb7d9ff626be701af6152ff64ffbda0bb91 to a64cde3633cd89a5368e5680ae922cbdd668c97b

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

 ​a872274 `Trac #19063: Merge #18546 in preparation of doctest fix for 32 bit` ​8479dd2 `Trac #19063: fix doctests on 32 bit` ​c022236 `Merge branch 'acb-arith' into 6.9` ​0c0a630 `ComplexBall: elementary functions` ​22adfbb `ComplexBall: optimized powering methods` ​ac54861 `ComplexBall: rising_factorial()` ​cd8e074 `ComplexBall: special functions` ​78a06c5 `ComplexBall: additional special functions, from acb_hypgeom` ​3474911 `ComplexBall: unify & improve hypergeometric functions` ​a64cde3 `{Real,Complex}Ball: extend log() to accept a base`

### comment:7 Changed 4 years ago by git

• Commit changed from a64cde3633cd89a5368e5680ae922cbdd668c97b to 74b57515f264dc51e1560d80c0c9a6b7d5d1806f

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

 ​91f9282 `Trac #19063: Replace interval by ball in title` ​08d3d29 `#19063 Implement reviewer's comments` ​d13e70f `Trac #19063: fix doctests on 32 bit` ​dd32bbd `ComplexBall: elementary functions` ​738240e `ComplexBall: optimized powering methods` ​3c0e32b `ComplexBall: rising_factorial()` ​8ee7c27 `ComplexBall: special functions` ​df6f04e `ComplexBall: additional special functions, from acb_hypgeom` ​c1651ee `ComplexBall: unify & improve hypergeometric functions` ​74b5751 `{Real,Complex}Ball: extend log() to accept a base`

### comment:8 Changed 4 years ago by git

• Commit changed from 74b57515f264dc51e1560d80c0c9a6b7d5d1806f to 7f456bd578e40f62b263e0c813870f096baf25a2

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

 ​a50fde3 `Trac #19063: Replace interval by ball in title` ​e3233c5 `#19063 Implement reviewer's comments` ​fa41787 `Trac #19063: fix doctests on 32 bit` ​767ea82 `ComplexBall: elementary functions` ​e7463cc `ComplexBall: optimized powering methods` ​fa17f51 `ComplexBall: rising_factorial()` ​8cb73bd `ComplexBall: special functions` ​ca4b436 `ComplexBall: additional special functions, from acb_hypgeom` ​07a8e06 `ComplexBall: unify & improve hypergeometric functions` ​7f456bd `{Real,Complex}Ball: extend log() to accept a base`

### comment:9 Changed 4 years ago by git

• Commit changed from 7f456bd578e40f62b263e0c813870f096baf25a2 to 9b147a92732d8df35748de8b89cd1a33caabe99c

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

 ​cc74b61 `Trac #19152: fix one link and add SEEALSO` ​f51cd86 `{Real,Complex}Ball: better document add_error()` ​49a2e9b `{Real,Complex}Ball: improve doc of is_nonzero()` ​154b65d `{real,complex}_arb: rm AUTHORS blocks` ​dfccd23 `e22f4074539b1833befb7f24bd700a7fe11589a` ​73a928a `real_ball: one more instance of [non]zero -> True/False` ​3749cbb `{real,complex}_arb: clarify that b == b in arb too` ​660075f `Merge branch 'arb-misc' into arb-all` ​5038f5a `Merge in arb-misc (and 6.10.beta4) to fix minor conflict` ​9b147a9 `real_arb: rst syntax`

### comment:10 Changed 4 years ago by mmezzarobba

• Dependencies changed from #19063 to #19063, #19152

### comment:11 follow-up: ↓ 12 Changed 4 years ago by git

• Commit changed from 9b147a92732d8df35748de8b89cd1a33caabe99c to 8d55755cbbe2ce33ee584c3601cee1666d6d5992

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

 ​8d55755 `complex_arb: remove unneeded imports from doctests`

### comment:12 in reply to: ↑ 11 Changed 4 years ago by mmezzarobba

Last edited 4 years ago by mmezzarobba (previous) (diff)

### comment:13 Changed 4 years ago by git

• Commit changed from 8d55755cbbe2ce33ee584c3601cee1666d6d5992 to a6db0a6b8fbf18b40e83644c753ff8a52979e2e5

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

 ​a6db0a6 `complex_arb: remove unneeded imports from doctests`

### comment:14 Changed 4 years ago by mmezzarobba

Note that the branch appears to merge cleanly despite the red link, and to pass the testsuite despite the patchbot's report.

### comment:15 follow-up: ↓ 16 Changed 4 years ago by cheuberg

• Milestone changed from sage-6.9 to sage-6.10
• Status changed from needs_review to needs_info

I get the same doctest errors as the patchbot under 6.10.beta7, perhaps the upgrade to arb 2.7 induced the problem. (No problems under 6.10.beta4 where this patch is based).

Do the tests really pass for you when merging with 6.10.beta7?

### comment:16 in reply to: ↑ 15 Changed 4 years ago by mmezzarobba

Do the tests really pass for you when merging with 6.10.beta7?

I think that's what I did, but I'll check.

### comment:17 Changed 4 years ago by mmezzarobba

Mmmhh, actually what happens is that when I run

```\$ sage -t src/sage/rings/complex_arb.pyx
```

the tests pass, but if I test the whole `rings/` directory they fail.

### comment:18 Changed 4 years ago by git

• Commit changed from a6db0a6b8fbf18b40e83644c753ff8a52979e2e5 to 235696d0c80dd294ed8ed451050cc3d11c97e103

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

 ​5cfd302 `Merge branch 'develop' into acb-funs` ​235696d `complex_arb: update tests after arb upgrade`

### comment:19 Changed 4 years ago by mmezzarobba

• Description modified (diff)
• Status changed from needs_info to needs_review

I don't know what the problem was, but it no longer seems to occur with 7.0β3.

### comment:20 follow-up: ↓ 23 Changed 4 years ago by dimpase

• Milestone changed from sage-6.10 to sage-7.1
• Status changed from needs_review to needs_work
• Work issues set to rebase over 7.0, doc. CBF

it has to be rebased over 7.0, and I also don't see any explanation of what CBF is in the docs.

Note that CBF occurs earlier on in the doc, and it's not mentioned that it's the same thing as `ComplexBallField`. It would be good to mention in the top part of the doc, I think.

### comment:21 Changed 4 years ago by dimpase

you might just use `public/19082` branch where I merged 7.0 into your branch, but docs I ask for are still for you to write.

### comment:22 Changed 4 years ago by git

• Commit changed from 235696d0c80dd294ed8ed451050cc3d11c97e103 to 3873da1a665e028a2bb4cf3f11346cb229319882

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

 ​3873da1 `Document the shortcut CBF for ComplexBallField()`

### comment:23 in reply to: ↑ 20 ; follow-up: ↓ 25 Changed 4 years ago by mmezzarobba

it has to be rebased over 7.0,

What do you mean? Unless I made a mistake while checking, the branch merges without conflict into 7.0.

and I also don't see any explanation of what CBF is in the docs.

Note that CBF occurs earlier on in the doc, and it's not mentioned that it's the same thing as `ComplexBallField`. It would be good to mention in the top part of the doc, I think.

Yes, that's similar to the situation with `RR`, `CC`, `RIF`... that aren't documented in the corresponding modules either. So I'm not convinced that this ticket is the right place to make the change. But I added a commit with a bit of documentation about `CBF`; please tell me if that's what you had in mind.

New commits:

 ​3873da1 `Document the shortcut CBF for ComplexBallField()`

### comment:24 Changed 4 years ago by mmezzarobba

• Status changed from needs_work to needs_review

### comment:25 in reply to: ↑ 23 Changed 4 years ago by dimpase

• Status changed from needs_review to positive_review

it has to be rebased over 7.0,

What do you mean? Unless I made a mistake while checking, the branch merges without conflict into 7.0.

I meant that I checked it out, instead of merging it into 7.0, and had to wait for 10 minutes for the re-builds to finish :-)

and I also don't see any explanation of what CBF is in the docs.

Note that CBF occurs earlier on in the doc, and it's not mentioned that it's the same thing as `ComplexBallField`. It would be good to mention in the top part of the doc, I think.

Yes, that's similar to the situation with `RR`, `CC`, `RIF`... that aren't documented in the corresponding modules either. So I'm not convinced that this ticket is the right place to make the change. But I added a commit with a bit of documentation about `CBF`; please tell me if that's what you had in mind.

That's exactly what I meant, thanks!

### comment:26 Changed 4 years ago by vbraun

• Status changed from positive_review to needs_work

Reviewer name missing

### comment:27 Changed 4 years ago by dimpase

• Reviewers set to Dima Pasechnik
• Status changed from needs_work to positive_review

### comment:28 Changed 4 years ago by mmezzarobba

Thanks for the review!

### comment:29 Changed 4 years ago by vbraun

• Branch changed from u/mmezzarobba/19082-acb-funs to 3873da1a665e028a2bb4cf3f11346cb229319882
• Resolution set to fixed
• Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.