Commit 20852826 authored by ulrich_y's avatar ulrich_y

Merge branch 'bugfix-polylog-conjg'

parents 532aa4f1 3b2d170d
*.mm gitlab-language=mathematica
*.m gitlab-language=mathematica
*.tm gitlab-language=c
configure export-subst
......@@ -148,6 +148,32 @@ done
test=test$$
trap "rm -fr $test* =." 0 1 2 3 15
HAVE_GIT=false
if type -P git &>/dev/null ; then
if [ -d .git ]; then
HAVE_GIT=true
fi
fi
# This will be set by git-archive
VTAG="$Format: %D, %h$"
if $HAVE_GIT ; then
VERSION=`git describe`
COMMIT=`git log -1 --pretty=format:"%h"`
elif [[ "$VTAG" == *"HEAD"* ]]; then
VERSION=`echo $VTAG | perl -lpe 's/.*?(, tag: ([^,]*))?,.*? ([a-f\d]+)$/\2/g'`
COMMIT=` echo $VTAG | perl -lpe 's/.*?(, tag: ([^,]*))?,.*? ([a-f\d]+)$/\3/g'`
if [ -z "$VERSION" ]; then
VERSION="untagged-$COMMIT"
fi
else
VERSION="v?.?.?"
COMMIT="unknown"
fi
if $COVERAGE ; then
$DEBUG || echo "Warning: --coverage implies --debug!" 1>&3
......@@ -702,7 +728,8 @@ EOF
$HAVE_MCC && cat >> makefile <<EOF
build/%.tm.c: src/%.tm
@echo "MPREP \$@"
@cat \$< | sed '/:Begin:/,/:End:/ s/Real/Real$($CONF_QUAD && echo 128)/g' | \$(MPREP) > \$@
@cat \$< | sed '/:Begin:/,/:End:/ s/Real/Real$($CONF_QUAD && echo 128)/g' \\
| sed 's/__VERSION__/$VERSION/g' | \$(MPREP) > \$@
build/mathlink.o: build/mathlink.tm.c
@echo "CC \$<"
......@@ -741,7 +768,7 @@ cat >> makefile <<EOF
@echo "LD \$@"
@\$(LD) -o \$@ \$^ \$(LFLAGS)
install: libhandyg.a handyg.mod ${CONF_MPREP:+handyg} geval
install: libhandyg.a handyg.mod ${CONF_MPREP:+handyG} geval
mkdir -p \$(PREFIX)
mkdir -p \$(PREFIX)/bin
cp geval \$(PREFIX)/bin/geval
......@@ -838,3 +865,6 @@ distclean:
@rm -f checks/test-chen.f90 checks/test-muone.f90 checks/test-muoneNP.f90
@rm -f makefile handyg.pc
EOF
echo "Configuration of handyG $VERSION done. Now type \"make\"."
:Evaluate: BeginPackage["handyG`"];
:Evaluate:
Print["handyG by L. Naterop, Y. Ulrich, A. Signer"];
Print["handyG-__VERSION__ by L. Naterop, Y. Ulrich, A. Signer"];
G::usage = "G function";
ClearCache::usage = "Clears handyG cache";
SetHandyOptions::usage = "Sets evaluation options";
......
......@@ -423,7 +423,7 @@ CONTAINS
else if (abs(x) .gt. 1) then
inv = 1._prec/x
res = (-1)**(m-1)*polylog(m,inv) &
- (2._prec*pi*i_)**m * bernoulli_polynomial(m, 0.5_prec-i_*conjg(log(-x))/2._prec/pi) / factorial(m)
- (2._prec*pi*i_)**m * bernoulli_polynomial(m, 0.5_prec-i_*log(-x)/2._prec/pi) / factorial(m)
else if(m == 2) then
res = dilog(x)
else if(m == 3) then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment