This repository was archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
[WIP] Add implementation of partial sqrt algorithm #51
Open
wbhart
wants to merge
24
commits into
trunk
Choose a base branch
from
sqrt
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 23 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
d96a40f
Add implementation of partial sqrt algorithm.
wbhart 54c8fca
Speed up.
wbhart d43075c
Add to TODO list.
wbhart 2198263
Deal with denominators.
wbhart 04263bd
Add back norm test.
wbhart 693e881
Cleanup.
wbhart 752cbeb
Add comment.
wbhart 41424a4
Comment.
wbhart e26a357
More comments.
wbhart 07dcca8
Small cleanup and deal with aliasing.
wbhart 3169ec5
Use fewer primes in trial factoring.
wbhart cc337a3
Add linear case.
wbhart 71f71c1
Add code for square root in quadratic fields.
wbhart 9793d16
Revise todos.
wbhart ee2820a
Fix four bugs in algorithm.
wbhart d864324
Remove memory leaks.
wbhart 1d63916
Test non-monic case.
wbhart b17ea47
Add is_square and test non-squares.
wbhart a65b06f
Rough bound improvement.
wbhart 017f6f1
Remove small squares from denominator.
wbhart 9cb8267
Add doc clarification suggested by Fredrik.
wbhart e8c959b
Make correction for non-monic case.
wbhart 517290c
Use proved bound for rational reconstruction and denominator and add
wbhart 43c2c63
Update nf_elem/doc/nf_elem.txt
wbhart File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/*============================================================================= | ||
|
||
This file is part of Antic. | ||
|
||
Antic is free software: you can redistribute it and/or modify it under | ||
the terms of the GNU Lesser General Public License (LGPL) as published | ||
by the Free Software Foundation; either version 2.1 of the License, or | ||
(at your option) any later version. See <http://www.gnu.org/licenses/>. | ||
|
||
=============================================================================*/ | ||
/****************************************************************************** | ||
|
||
Copyright (C) 2020 William Hart | ||
|
||
******************************************************************************/ | ||
|
||
#include "nf_elem.h" | ||
|
||
int nf_elem_is_square(const nf_elem_t b, const nf_t nf) | ||
{ | ||
nf_elem_t t; | ||
|
||
int ret; | ||
|
||
nf_elem_init(t, nf); | ||
|
||
ret = _nf_elem_sqrt(t, b, nf); | ||
|
||
nf_elem_clear(t, nf); | ||
|
||
return ret; | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.