Skip to content

Commit 16834b7

Browse files
author
Raoul Bourquin
committed
Single source of definition for phi
Note: As calcium resolves quadratic fields, we still get phi explicitly as Q(sqrt(5)) instead of Q(a) with a^2-a-1 = 0.
1 parent 762d360 commit 16834b7

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/ca/phi.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@
1515
void
1616
ca_phi(ca_t res, ca_ctx_t ctx)
1717
{
18-
ca_sqrt_ui(res, 5, ctx);
19-
ca_add_ui(res, res, 1, ctx);
20-
ca_div_ui(res, res, 2, ctx);
18+
qqbar_t phi;
19+
qqbar_init(phi);
20+
qqbar_phi(phi);
21+
22+
ca_set_qqbar(res, phi, ctx);
23+
24+
qqbar_clear(phi);
2125
}

0 commit comments

Comments
 (0)