#18210: numerical bug in incomplete gamma function
-------------------------------------------------+-------------------------
Reporter: VivianePons | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.7
Component: symbolics | Resolution:
Keywords: sd67 | Merged in:
Authors: | Reviewers:
Report Upstream: Reported upstream. Developers | Work issues:
acknowledge bug. | Commit:
Branch: | Stopgaps:
Dependencies: |
-------------------------------------------------+-------------------------
Comment (by buck):
Subsequent `make` fails during pari autoregen:
{{{
python -c "from sage_setup.autogen.pari import rebuild; rebuild()"
Generating PARI functions: (!_) (#_) (%) (%#) (+_) (-_) Catalan Col Colrev
(DEBUGLEVEL) Euler I List Map Mat Mod (O)
...
galoispermtopol galoissubcyclo galoissubfields galoissubgroups gamma
gammah gammamellininvTraceback (most recent call last):
File "<string>", line 1, in <module>
File "sage_setup/autogen/pari/__init__.py", line 5, in rebuild
G()
File "sage_setup/autogen/pari/generator.py", line 247, in __call__
self.handle_pari_function(**v)
File "sage_setup/autogen/pari/generator.py", line 173, in
handle_pari_function
args, ret = parse_prototype(prototype, help)
File "sage_setup/autogen/pari/parser.py", line 204, in parse_prototype
raise ValueError('unknown prototype character %r' % c)
ValueError: unknown prototype character 'b'
}}}
I note that the build gets into a weird state afterward because the file
being generated (`src/sage/libs/pari/auto_gen.pxi`) is written to even
though its generation failed. We could avoid this state by making a patch
like so:
{{{#!diff
diff --git a/src/sage_setup/autogen/pari/generator.py
b/src/sage_setup/autogen/pari/generator.py
index 7aa9990..9b78d88 100644
--- a/src/sage_setup/autogen/pari/generator.py
+++ b/src/sage_setup/autogen/pari/generator.py
@@ -233,9 +233,9 @@ class PariFunctionGenerator(object):
D = sorted(D.values(), key=lambda d: d['function'])
sys.stdout.write("Generating PARI functions:")
- self.gen_file = open(self.gen_filename, 'w')
+ self.gen_file = open(self.gen_filename + '.tmp', 'w')
self.gen_file.write(gen_banner)
- self.instance_file = open(self.instance_filename, 'w')
+ self.instance_file = open(self.instance_filename + '.tmp', 'w')
self.instance_file.write(instance_banner)
for v in D:
@@ -249,3 +249,7 @@ class PariFunctionGenerator(object):
self.gen_file.close()
self.instance_file.close()
+
+ # All done? Let's commit.
+ os.rename(self.gen_filename + '.tmp', self.gen_filename)
+ os.rename(self.instance_filename + '.tmp',
self.instance_filename)
}}}
I'm out of my depth at this point. I think I need help from someone that
actually know what pari is at all =X
--
Ticket URL: <http://trac.sagemath.org/ticket/18210#comment:32>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.