Skip to content

Commit

Permalink
Use precision of ArbField or AcbField instead of Balls (#1483)
Browse files Browse the repository at this point in the history
* Use precision of ArbField or AcbField instead of Balls

* fix doctests
  • Loading branch information
daviddelaat authored May 31, 2023
1 parent a45165b commit 5300744
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/src/algebraic.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ julia> RR = ArbField(64); RR(sqrt(QQBar(2)))
[1.414213562373095049 +/- 3.45e-19]
julia> CC = AcbField(32); CC(QQBar(-1) ^ (QQBar(1) // 4))
[0.7071067812 +/- 1.35e-11] + [0.7071067812 +/- 1.35e-11]*im
[0.707106781 +/- 2.74e-10] + [0.707106781 +/- 2.74e-10]*im
```

### Minimal polynomials, conjugates, and properties
Expand Down
4 changes: 2 additions & 2 deletions src/calcium/qqbar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,7 @@ Convert `a` to a real ball with the precision of the parent field `R`.
Throws if `a` is not a real number.
"""
function (R::ArbField)(a::qqbar)
prec = precision(Balls)
prec = precision(R)
z = R()
ccall((:qqbar_get_arb, libcalcium),
Nothing, (Ref{arb}, Ref{qqbar}, Int), z, a, prec)
Expand All @@ -1310,7 +1310,7 @@ Convert `a` to a complex ball with the precision of the parent field `R`.
Throws if `a` is not a real number.
"""
function (R::AcbField)(a::qqbar)
prec = precision(Balls)
prec = precision(R)
z = R()
ccall((:qqbar_get_acb, libcalcium),
Nothing, (Ref{acb}, Ref{qqbar}, Int), z, a, prec)
Expand Down

0 comments on commit 5300744

Please sign in to comment.