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
Clean up partitions_c.cc #24667
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
New commits:
|
Commit: |
This comment has been minimized.
This comment has been minimized.
comment:16
in this chunk
you're removing Gygwin stuff. Are you sure it's OK? |
comment:17
Replying to @dimpase:
Yes because I removed the calls to those functions. That is what point 2 in the ticket description achieves. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:19
Perhaps a stupid question, sorry, but is there any reason to use this implementation instead of the one in arb? |
comment:20
Replying to @mezzarobba:
I don't know. I'm just fixing the existing code. |
comment:21
Replying to @jdemeyer:
IMO, it is not a bad thing to have redundancy checking with independent implementations. |
comment:22
naturally, we can have several backends to computing a function. Patches are welcome. |
Reviewer: Dima Pasechnik |
comment:23
looks good to me. Send it to the bots! |
Changed branch from u/jdemeyer/remove_unused_stuff_from_partitions_c_cc to |
Remove some unused stuff.
Compute the
double
andlong double
constants using MPFR. This makes a lot of sense since we already computed MPFR versions of these constants anyway. For extra safety, we also increase the precision used to compute these constants.No longer use the header file
partitions_c.h
. Instead, include the.cc
file in Cython.Points 2. and 3. above allow to remove some platform-specific hacks.
Replace
T(int(x))
byT(x)
to convertx
to typeT
.Only one temporary MPFR variable is really needed, call it
mptemp
.Merge
initialize_mpz_and_mpq_variables
,initialize_mpfr_variables
andinitialize_constants
in one functioninitialize_globals
.Use some more specialized MPFR functions like
mpfr_set_prec()
where applicable.Define all internal functions as
static
.Use
MPFR_RNDF
rounding mode where exact rounding is not required.Ensure that the file compiles without compiler warnings.
Various style improvements.
CC: @dimpase
Component: combinatorics
Author: Jeroen Demeyer
Branch/Commit:
2dba6c8
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/24667
The text was updated successfully, but these errors were encountered: