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

Sanity checking FLINT #2085

Open
wants to merge 114 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
b2a518d
Add configure option for sanity check
albinahlback Oct 4, 2024
ed16203
Do not push -Wmissing-prototypes on inlines.c
albinahlback Oct 4, 2024
3f85860
Remove FLINT_UNUSED from header files
albinahlback Oct 5, 2024
cb23003
Remove unused macros in flint.h
albinahlback Oct 5, 2024
b79f504
Introduce FLINT header start and end macro
albinahlback Oct 5, 2024
1840d9b
Move FLINT_TLS_PREFIX to start of declaration
albinahlback Oct 7, 2024
e3a2262
Set TESTCFLAGS for sanity check
albinahlback Oct 8, 2024
bb4f76c
Use --enable-sanity-check in CI
albinahlback Oct 7, 2024
7b213b3
Fix symbol for arb_mat_entrywise_is_zero
albinahlback Oct 8, 2024
8cee534
generic_files
albinahlback Oct 4, 2024
d868a78
thread_support
albinahlback Oct 4, 2024
850bc57
ulong_extras
albinahlback Oct 4, 2024
e4412c4
nfloat
albinahlback Oct 5, 2024
93c38ce
mpn_extras
albinahlback Oct 5, 2024
1bc100e
nmod_vec
albinahlback Oct 5, 2024
3df7efa
nmod_mat
albinahlback Oct 5, 2024
9ad0dfb
nmod_poly
albinahlback Oct 5, 2024
90e57a1
mpn_mod
albinahlback Oct 5, 2024
b4adc40
fmpz
albinahlback Oct 5, 2024
2a6aad4
fmpq_vec
albinahlback Oct 5, 2024
442a106
fmpz_mat
albinahlback Oct 5, 2024
36cf1e0
fmpz_poly
albinahlback Oct 5, 2024
2d4ad4f
fmpz_mod
albinahlback Oct 6, 2024
c0703c6
fmpz_mod_vec
albinahlback Oct 6, 2024
d46cc5c
fmpz_mod_mat
albinahlback Oct 6, 2024
c10ee22
fmpz_mod_poly
albinahlback Oct 5, 2024
95900ae
fmpq
albinahlback Oct 6, 2024
4bc69e3
fmpq_mat
albinahlback Oct 6, 2024
b9256d9
fmpq_poly
albinahlback Oct 6, 2024
27c9e7e
fq_mat_templates
albinahlback Oct 6, 2024
6d726dd
fq_poly_templates
albinahlback Oct 6, 2024
91d9124
fq_poly_factor_templates
albinahlback Oct 6, 2024
3617997
fq_nmod
albinahlback Oct 6, 2024
0508c4b
fq
albinahlback Oct 6, 2024
dc07303
fq_nmod_mat
albinahlback Oct 6, 2024
09408ee
fq_nmod_poly
albinahlback Oct 6, 2024
8b06100
fq_zech
albinahlback Oct 6, 2024
8d6901e
padic
albinahlback Oct 6, 2024
4ee27cb
qadic
albinahlback Oct 6, 2024
ff6c5ae
nmod_poly_factor
albinahlback Oct 6, 2024
ec124bb
fmpz_factor
albinahlback Oct 6, 2024
f9fb156
fmpz_poly_factor
albinahlback Oct 6, 2024
b648337
fmpz_mod_poly_factor
albinahlback Oct 6, 2024
1423e65
nmod_poly_mat
albinahlback Oct 6, 2024
b0c9f2d
fmpz_poly_mat
albinahlback Oct 6, 2024
7425f80
mpoly
albinahlback Oct 6, 2024
d5ad46e
nmod_mpoly
albinahlback Oct 6, 2024
5ec812e
fmpz_mpoly
albinahlback Oct 6, 2024
75dbb2e
fmpz_mod_mpoly
albinahlback Oct 6, 2024
57a1240
fq_nmod_mpoly
albinahlback Oct 6, 2024
b48774d
nmod_mpoly_factor
albinahlback Oct 6, 2024
6a70c65
fmpz_mpoly_factor
albinahlback Oct 6, 2024
3784cbf
fq_zech_mpoly
albinahlback Oct 6, 2024
43a604d
fq_zech_mpoly_factor
albinahlback Oct 6, 2024
e1043cd
fmpq_mpoly
albinahlback Oct 6, 2024
7483f30
fmpz_mod_mpoly_factor
albinahlback Oct 6, 2024
6c48701
fmpq_mpoly_factor
albinahlback Oct 6, 2024
ed9f778
fq_nmod_mpoly_factor
albinahlback Oct 6, 2024
db5f8c3
fft
albinahlback Oct 5, 2024
3e4c10b
fft_small
albinahlback Oct 6, 2024
e9cae31
fmpz_poly_q
albinahlback Oct 6, 2024
afae44c
fmpz_lll
albinahlback Oct 6, 2024
da3f9d0
n_poly
albinahlback Oct 6, 2024
3d17ec6
arith
albinahlback Oct 6, 2024
a2fbe4a
qsieve
albinahlback Oct 7, 2024
59527c4
aprcl
albinahlback Oct 7, 2024
1eade77
nf_elem
albinahlback Oct 7, 2024
1e9c656
qfb
albinahlback Oct 7, 2024
bf45f1c
double_interval
albinahlback Oct 7, 2024
83d1fa2
dlog
albinahlback Oct 7, 2024
89e641c
fmpzi
albinahlback Oct 7, 2024
56af5a9
bool_mat
albinahlback Oct 7, 2024
9cf3951
partitions
albinahlback Oct 7, 2024
750149a
mag
albinahlback Oct 7, 2024
73f6d6b
arf
albinahlback Oct 7, 2024
a3e08b1
acf
albinahlback Oct 7, 2024
f7be657
arb
albinahlback Oct 7, 2024
df27e38
acb
albinahlback Oct 7, 2024
4c51e01
arb_mat
albinahlback Oct 8, 2024
e4dbbc9
arb_poly
albinahlback Oct 8, 2024
df651f3
arb_hypgeom
albinahlback Oct 8, 2024
fd1ad12
acb_mat
albinahlback Oct 8, 2024
f78d869
acb_poly
albinahlback Oct 8, 2024
5eab58a
acb_calc
albinahlback Oct 8, 2024
74ac4d9
arb_fpwrap
albinahlback Oct 8, 2024
058e498
acb_dft
albinahlback Oct 8, 2024
71da249
acb_hypgeom
albinahlback Oct 8, 2024
d3764a5
acb_elliptic
albinahlback Oct 8, 2024
f7dd7b0
acb_modular
albinahlback Oct 8, 2024
1f67aaa
acb_dirichlet
albinahlback Oct 8, 2024
1a02da2
acb_theta
albinahlback Oct 8, 2024
838a5cf
dirichlet
albinahlback Oct 7, 2024
ada84b9
bernoulli
albinahlback Oct 8, 2024
8a6d57d
hypgeom
albinahlback Oct 8, 2024
86bcdc5
gr
albinahlback Oct 5, 2024
090df2b
ca
albinahlback Oct 8, 2024
81676fb
ca_mat
albinahlback Oct 8, 2024
dc317a0
ca_poly
albinahlback Oct 8, 2024
882e879
ca_vec
albinahlback Oct 8, 2024
5294c81
fexpr
albinahlback Oct 8, 2024
eed843e
gr_mpoly
albinahlback Oct 8, 2024
0efac5e
gr_generic
albinahlback Oct 5, 2024
fa6adb3
gr_vec
albinahlback Oct 8, 2024
dd7c9bf
gr_mat
albinahlback Oct 8, 2024
a30910c
gr_poly
albinahlback Oct 5, 2024
82a954d
gr_special
albinahlback Oct 8, 2024
01765b5
fmpz_mpoly_q
albinahlback Oct 8, 2024
77e1fd0
calcium
albinahlback Oct 8, 2024
8d49390
qqbar
albinahlback Oct 8, 2024
fd0a8d2
ca_ext
albinahlback Oct 8, 2024
d63713b
ca_field
albinahlback Oct 8, 2024
ab33d2c
padic_poly
albinahlback Oct 9, 2024
77dabaa
fmpz_vec
albinahlback Oct 9, 2024
46738f2
arb_calc
albinahlback Oct 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 10 additions & 10 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,15 @@ jobs:


##############################################################################
# gcc build check no regressions
# gcc sanity check
##############################################################################
gcc-build-regression-check:
name: GCC build regression check (no tests)
gcc-sanity-check:
name: GCC sanity check

runs-on: ubuntu-24.04

env:
CC: "gcc"
CFLAGS: "-march=native -std=c11 -Wall -Wextra -Werror"
MODULES: "build/thread_pool_merged.lo build/thread_support_merged.lo build/ulong_extras_merged.lo build/long_extras_merged.lo build/perm_merged.lo build/double_extras_merged.lo build/d_vec_merged.lo build/d_mat_merged.lo build/mpn_extras_merged.lo build/mpfr_vec_merged.lo build/mpfr_mat_merged.lo build/nmod_merged.lo build/nmod_vec_merged.lo build/nmod_mat_merged.lo build/nmod_poly_merged.lo build/mpn_mod_merged.lo build/fmpz_merged.lo build/fmpz_vec_merged.lo build/fmpz_mat_merged.lo build/fmpz_poly_merged.lo build/fmpz_mod_merged.lo build/fmpz_mod_vec_merged.lo build/fmpz_mod_mat_merged.lo build/fmpz_mod_poly_merged.lo build/fmpq_merged.lo build/fmpq_vec_merged.lo build/fmpq_mat_merged.lo build/fmpq_poly_merged.lo build/fq_merged.lo build/fq_vec_merged.lo build/fq_mat_merged.lo build/fq_poly_merged.lo build/fq_nmod_merged.lo build/fq_nmod_vec_merged.lo build/fq_nmod_mat_merged.lo build/fq_nmod_poly_merged.lo build/fq_zech_merged.lo build/fq_zech_mat_merged.lo build/fq_zech_poly_merged.lo build/fq_default_merged.lo build/fq_default_mat_merged.lo build/fq_default_poly_merged.lo build/fq_embed_merged.lo build/fq_nmod_embed_merged.lo build/fq_zech_embed_merged.lo build/padic_merged.lo build/padic_mat_merged.lo build/padic_poly_merged.lo build/qadic_merged.lo build/nmod_poly_factor_merged.lo build/fmpz_factor_merged.lo build/fmpz_poly_factor_merged.lo build/fmpz_mod_poly_factor_merged.lo build/fq_poly_factor_merged.lo build/fq_nmod_poly_factor_merged.lo build/fq_zech_poly_factor_merged.lo build/fq_default_poly_factor_merged.lo build/nmod_poly_mat_merged.lo build/fmpz_poly_mat_merged.lo build/mpoly_merged.lo build/nmod_mpoly_merged.lo build/fmpz_mpoly_merged.lo build/fmpz_mod_mpoly_merged.lo build/fmpq_mpoly_merged.lo build/fq_nmod_mpoly_merged.lo build/fq_zech_mpoly_merged.lo build/nmod_mpoly_factor_merged.lo build/fmpz_mpoly_factor_merged.lo build/fmpz_mod_mpoly_factor_merged.lo build/fmpq_mpoly_factor_merged.lo build/fq_nmod_mpoly_factor_merged.lo build/fq_zech_mpoly_factor_merged.lo build/fft_merged.lo build/fft_small_merged.lo"
# Everything until fmpz_poly_q

steps:
- uses: actions/checkout@v4
Expand All @@ -123,12 +120,15 @@ jobs:
./bootstrap.sh
./configure \
CC=${CC} \
CFLAGS="${CFLAGS}" \
--disable-debug
--enable-sanity-check

- name: "Check regression in a subset of modules"
- name: "Build with sanity"
run: |
$MAKE $MODULES
$MAKE

- name: "Build tests with sanity"
run: |
$MAKE



Expand Down
9 changes: 9 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ GC_LIB_PATH:=@GC_LIB_PATH@
NTL_LIB_PATH:=@NTL_LIB_PATH@

CFLAGS:=@CFLAGS@
CFLAGS_INLINE:=$(filter-out -Wmissing-declarations -Wmissing-prototypes,$(CFLAGS))
TESTCFLAGS:=@TESTCFLAGS@
CPPFLAGS:=-I$(ABS_SRC_DIR) -I$(SRC_DIR) @CPPFLAGS@ -DBUILDING_FLINT
CPPFLAGS2:=-L$(ABS_FLINT_DIR) $(CPPFLAGS)
Expand Down Expand Up @@ -592,6 +593,10 @@ define xxx_OBJS_rule
$(BUILD_DIR)/$(1)/%.o: $(ABS_SRC_DIR)/$(1)/%.c | $(BUILD_DIR)/$(1)
@echo " CC $$(<:$(ABS_SRC_DIR)/%=%)"
@$(CC) $(CFLAGS) $($(1)_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS) -c $$< -o $$@ $$(DEPFLAGS)

$(BUILD_DIR)/$(1)/inlines.o: $(ABS_SRC_DIR)/$(1)/inlines.c | $(BUILD_DIR)/$(1)
@echo " CC $$(<:$(ABS_SRC_DIR)/%=%)"
@$(CC) $(CFLAGS_INLINE) $($(1)_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS) -c $$< -o $$@ $$(DEPFLAGS)
endef

ifeq ($(IS_OUT_OF_TREE),1)
Expand All @@ -618,6 +623,10 @@ define xxx_LOBJS_rule
$(BUILD_DIR)/$(1)/%.lo: $(ABS_SRC_DIR)/$(1)/%.c | $(BUILD_DIR)/$(1)
@echo " CC $$(<:$(ABS_SRC_DIR)/%=%)"
@$(CC) $(PIC_FLAG) $(CFLAGS) $($(1)_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS) -c $$< -o $$@ $$(DEPFLAGS)

$(BUILD_DIR)/$(1)/inlines.lo: $(ABS_SRC_DIR)/$(1)/inlines.c | $(BUILD_DIR)/$(1)
@echo " CC $$(<:$(ABS_SRC_DIR)/%=%)"
@$(CC) $(PIC_FLAG) $(CFLAGS_INLINE) $($(1)_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS) -c $$< -o $$@ $$(DEPFLAGS)
endef

ifeq ($(IS_OUT_OF_TREE),1)
Expand Down
90 changes: 66 additions & 24 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,32 @@ yes|no)
esac],
enable_coverage="no")

# NOTE: Maintainer-level only. Does not optimize, and turns on a lot of
# warnings, all of which are turned to errors. Defaults debugging to no.
AC_ARG_ENABLE(sanity-check,[],
[case $enableval in
yes|no)
;;
*)
AC_MSG_ERROR([Bad value $enableval for --enable-sanity-check. Need yes or no.])
;;
esac
if test "$enableval" = "yes" && test "$cflags_set" = "yes";
then
AC_MSG_ERROR([Cannot enable sanity check and push other CFLAGS at the same time.])
elif test "$enableval" = "yes" && test "$testcflags_set" = "yes";
then
AC_MSG_ERROR([Cannot enable sanity check and push other TESTCFLAGS at the same time.])
fi],
enable_sanity_check="no")

# NOTE: -Wdeclaration-after-statement and -Wcast-qual is not in here. We also
# remove -Wcast-function-type for GR.
sanity_check_CFLAGS="-Werror -Wall -Wextra -Wno-cast-function-type -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -pedantic -std=c11 -O0"

# We take CFLAGS but ignore -Wsign-compare, -Wmissing-declarations and -Wmissing-prototypes.
sanity_check_TESTCFLAGS="-Werror -Wall -Wextra -Wno-cast-function-type -Wno-sign-compare -Wcast-align -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -pedantic -std=c11 -O0"

AC_ARG_ENABLE(debug,
[AS_HELP_STRING([--enable-debug],[Compile FLINT with debug information [default=yes]])],
[case $enableval in
Expand All @@ -244,7 +270,12 @@ yes|no)
AC_MSG_ERROR([Bad value $enableval for --enable-debug. Need yes or no.])
;;
esac],
enable_debug="yes")
if test "$enable_sanity_check" = "no";
then
enable_debug="yes"
else
enable_debug="no"
fi)

AC_ARG_ENABLE(dependency-tracking,
[AS_HELP_STRING([--enable-dependency-tracking],[Enable GCC automated dependency tracking [default=yes]])],
Expand Down Expand Up @@ -323,18 +354,6 @@ yes|no)
esac],
enable_mpfr_check="yes")

# NOTE: Maintainer level only. Avoids any sort of optimization to speed up
# builds.
AC_ARG_ENABLE(fast-build,[],
[case $enableval in
yes|no)
;;
*)
AC_MSG_ERROR([Bad value $enableval for --enable-fast-build. Need yes or no.])
;;
esac],
enable_fast_build="no")

################################################################################
# packages
################################################################################
Expand Down Expand Up @@ -534,11 +553,7 @@ fi
# architecture specifics
################################################################################

if test "$enable_fast_build" = "no";
then
gcc_cflags="-O3 "
fi
gcc_cflags="$gcc_cflags-pedantic -std=c11"
gcc_cflags="-O3 -pedantic -std=c11"
gcc_warnings="-Werror=implicit-function-declaration -Wall -Wno-stringop-overread -Wno-stringop-overflow -Wno-maybe-uninitialized"

dnl We only try to provide specifics for those systems that currently supports
Expand Down Expand Up @@ -1240,7 +1255,31 @@ then
[AC_MSG_ERROR([$CC does not support the flag -mavx512f needed for AVX512 instructions])])
fi

if test "$cflags_set" = "no";
if test "$enable_sanity_check" = "yes";
then
for flag in $sanity_check_CFLAGS;
do
AX_CHECK_COMPILE_FLAG([$flag],[save_CFLAGS="$flag $save_CFLAGS"],
[AC_MSG_ERROR([$CC does not support $flag needed for sanity check.])])
done
found_single="no"
for flag in $gcc_cflags_arch;
do
if test "$found_single" = "yes";
then
found_single="no"
break
else
AX_CHECK_COMPILE_FLAG([$flag],
[save_CFLAGS="$flag $save_CFLAGS"
sanity_check_TESTCFLAGS="$flag $sanity_check_TESTCFLAGS"
found_single="yes"],
[unset flint_cv_have_fft_small_x86_i
unset flint_cv_have_fft_small_arm_i])
fi
done
CFLAGS="$save_CFLAGS"
elif test "$cflags_set" = "no";
then
for flag in $gcc_cflags $gcc_warnings;
do
Expand Down Expand Up @@ -1272,10 +1311,8 @@ then
fi
done
done
if test "$enable_fast_build" = no;
then
AX_CHECK_COMPILE_FLAG([-funroll-loops],[unroll_loops="yes"])
fi

AX_CHECK_COMPILE_FLAG([-funroll-loops],[unroll_loops="yes"])
if test "$unroll_loops" = "yes";
then
AC_SUBST(UNROLL_LOOPS,1)
Expand All @@ -1292,7 +1329,12 @@ fi

if test "$testcflags_set" = "no";
then
TESTCFLAGS="$CFLAGS"
if test "$enable_sanity_check" = "no";
then
TESTCFLAGS="$CFLAGS"
else
TESTCFLAGS="$sanity_check_TESTCFLAGS"
fi
else
TESTCFLAGS="$TESTCFLAGS $save_CFLAGS"
fi
Expand Down
10 changes: 5 additions & 5 deletions src/acb/agm1.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ acb_agm_close_taylor(acb_t res, acb_t z, acb_t z2,
}

static void
acb_agm1_around_zero(acb_t res, const acb_t z, slong prec)
acb_agm1_around_zero(acb_t res, const acb_t z, slong FLINT_UNUSED(prec))
{
mag_t a, b;
mag_init(a);
Expand All @@ -113,7 +113,7 @@ acb_agm1_around_zero(acb_t res, const acb_t z, slong prec)
mag_clear(b);
}

void
static void
acb_agm1_basecase(acb_t res, const acb_t z, slong prec)
{
acb_t a, b, t, u;
Expand Down Expand Up @@ -207,7 +207,7 @@ acb_agm1_basecase(acb_t res, const acb_t z, slong prec)
Computes (M(z), M'(z)) using a finite difference.
Assumes z exact, |arg(z)| <= 3 pi / 4.
*/
void
static void
acb_agm1_deriv_diff(acb_t Mz, acb_t Mzp, const acb_t z, slong prec)
{
mag_t err, t, C;
Expand Down Expand Up @@ -341,7 +341,7 @@ This is assuming that the circle at z with radius |eps| + r
does not cross the negative half axis, which we check.
*/

void
static void
acb_agm1_deriv_right(acb_t Mz, acb_t Mzp, const acb_t z, slong prec)
{
if (acb_is_exact(z))
Expand Down Expand Up @@ -496,7 +496,7 @@ acb_agm1(acb_t res, const acb_t z, slong prec)
}
}

void
static void
acb_agm1_deriv(acb_t Mz, acb_t Mzp, const acb_t z, slong prec)
{
/*
Expand Down
6 changes: 3 additions & 3 deletions src/acb/approx_dot.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ _arb_dot_output(arb_t res, nn_ptr sum, slong sn, int negative,
xn = ARF_SIZE(xm); \
xnegative = ARF_SGNBIT(xm); \
shift = s_sum_exp - xexp; \
if (shift >= s_sn * FLINT_BITS) \
if (shift >= (ulong) s_sn * FLINT_BITS) \
{ \
} \
else \
Expand Down Expand Up @@ -173,7 +173,7 @@ _arf_complex_mul_gauss(arf_t e, arf_t f, const arf_t a, const arf_t b,
FLINT_DLL extern slong acb_dot_gauss_dot_cutoff;
#define GAUSS_CUTOFF acb_dot_gauss_dot_cutoff

void
static void
acb_approx_dot_simple(acb_t res, const acb_t initial, int subtract,
acb_srcptr x, slong xstep, acb_srcptr y, slong ystep, slong len, slong prec)
{
Expand Down Expand Up @@ -584,7 +584,7 @@ acb_approx_dot(acb_t res, const acb_t initial, int subtract, acb_srcptr x, slong
exp = xexp + yexp;
shift = sum_exp - exp;

if (shift >= sn * FLINT_BITS)
if (shift >= (ulong) sn * FLINT_BITS)
{
}
else if (xn <= 2 && yn <= 2 && sn <= 3)
Expand Down
2 changes: 1 addition & 1 deletion src/acb/atan.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "acb.h"

/* branch cuts are on (+/-i)*[1,inf] */
int
static int
acb_atan_on_branch_cut(const acb_t z)
{
arb_t unit;
Expand Down
8 changes: 4 additions & 4 deletions src/acb/barnes_g.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "acb.h"
#include "acb_poly.h"

void
static void
_arb_const_zeta_minus_one_eval(arb_t y, slong prec)
{
acb_struct z[2];
Expand All @@ -31,12 +31,12 @@ _arb_const_zeta_minus_one_eval(arb_t y, slong prec)
acb_clear(a);
}

ARB_DEF_CACHED_CONSTANT(_arb_const_zeta_minus_one, _arb_const_zeta_minus_one_eval)
_ARB_DEF_CACHED_CONSTANT(static, static, _arb_const_zeta_minus_one, _arb_const_zeta_minus_one_eval)

/* LogG(z) = (z-1) LogGamma(z) - zeta'(-1,z) + zeta'(-1)
LogG'(z) = (1/2)(-2z + 1 + log(2pi)) + (z-1) digamma(z) */

void
static void
_acb_log_barnes_g_zeta(acb_t res, const acb_t z, slong prec)
{
acb_struct t[3];
Expand All @@ -62,7 +62,7 @@ _acb_log_barnes_g_zeta(acb_t res, const acb_t z, slong prec)
acb_clear(t + 2);
}

void
static void
_acb_barnes_g_ui_rec(acb_t res, ulong n, slong prec)
{
acb_t t;
Expand Down
4 changes: 2 additions & 2 deletions src/acb/dot.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ _arb_dot_output(arb_t res, nn_ptr sum, slong sn, int negative,
xn = ARF_SIZE(xm); \
xnegative = ARF_SGNBIT(xm); \
shift = s_sum_exp - xexp; \
if (shift >= s_sn * FLINT_BITS) \
if (shift >= (ulong) s_sn * FLINT_BITS) \
{ \
s_serr++; \
} \
Expand Down Expand Up @@ -736,7 +736,7 @@ acb_dot(acb_t res, const acb_t initial, int subtract, acb_srcptr x, slong xstep,
exp = xexp + yexp;
shift = sum_exp - exp;

if (shift >= sn * FLINT_BITS)
if (shift >= (ulong) sn * FLINT_BITS)
{
/* We may yet need the top limbs for bounds. */
ARF_GET_TOP_LIMB(xtop, xm);
Expand Down
8 changes: 4 additions & 4 deletions src/acb/dot_siui.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ acb_dot_siui(acb_t res, const acb_t initial, int subtract, acb_srcptr x, slong x
acb_zero(res);
else
{
arf_t t;
arf_shallow_set_siui(t, y[1], y[0]);
arb_mul_arf(acb_realref(res), acb_realref(x), t, prec);
arb_mul_arf(acb_imagref(res), acb_imagref(x), t, prec);
arf_t tf;
arf_shallow_set_siui(tf, y[1], y[0]);
arb_mul_arf(acb_realref(res), acb_realref(x), tf, prec);
arb_mul_arf(acb_imagref(res), acb_imagref(x), tf, prec);
if (subtract)
acb_neg(res, res);
}
Expand Down
8 changes: 4 additions & 4 deletions src/acb/dot_uiui.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ acb_dot_uiui(acb_t res, const acb_t initial, int subtract, acb_srcptr x, slong x
acb_zero(res);
else
{
arf_t t;
arf_shallow_set_uiui(t, y[1], y[0]);
arb_mul_arf(acb_realref(res), acb_realref(x), t, prec);
arb_mul_arf(acb_imagref(res), acb_imagref(x), t, prec);
arf_t tf;
arf_shallow_set_uiui(tf, y[1], y[0]);
arb_mul_arf(acb_realref(res), acb_realref(x), tf, prec);
arb_mul_arf(acb_imagref(res), acb_imagref(x), tf, prec);
if (subtract)
acb_neg(res, res);
}
Expand Down
7 changes: 6 additions & 1 deletion src/acb/gamma.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
#include "acb.h"
#include "acb_hypgeom.h"

/* FIXME: Remove this guard against warnings. Best thing would probably be to
* implement an *-impl.h to keep track of local functions. */
#ifdef __GNUC__
# pragma GCC diagnostic ignored "-Wmissing-prototypes"
#endif

void
acb_gamma_stirling_choose_param(int * reflect, slong * r, slong * n,
const acb_t z, int use_reflect, int digamma, slong prec);
Expand All @@ -21,7 +27,6 @@ void acb_gamma_stirling_bound(mag_ptr err, const acb_t z, slong k0, slong knum,

void arb_gamma_stirling_coeff(arb_t b, ulong k, int digamma, slong prec);


void
acb_gamma_stirling_eval(acb_t s, const acb_t z, slong nterms, int digamma, slong prec)
{
Expand Down
Loading
Loading