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

Golden ratio #43

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
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.
Raoul Bourquin committed Oct 28, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit aed4970d8a3171ad4b4acb1a731dad4ef0c162bd
10 changes: 7 additions & 3 deletions ca/phi.c
Original file line number Diff line number Diff line change
@@ -15,7 +15,11 @@
void
ca_phi(ca_t res, ca_ctx_t ctx)
{
ca_sqrt_ui(res, 5, ctx);
ca_add_ui(res, res, 1, ctx);
ca_div_ui(res, res, 2, ctx);
qqbar_t phi;
qqbar_init(phi);
qqbar_phi(phi);

ca_set_qqbar(res, phi, ctx);

qqbar_clear(phi);
}