Re: Polyhedron construction fails on specific list of vertices

220 views
Skip to first unread message

Volker Braun

unread,
Apr 23, 2013, 6:24:38 AM4/23/13
to sage-s...@googlegroups.com
I can confirm this. The problem is that cdd errors out with "*Error: Numerical inconsistency is found.  Use the GMP exact arithmetic.". Gee, thanks ;)


On Tuesday, April 23, 2013 9:09:08 AM UTC+1, Felix Wellen wrote:
while trying to render the intersection of a 4-cube and a 3-cube (I guess that really doesn't matter), I stopped on trouble with the following:

Volker Braun

unread,
Apr 23, 2013, 8:10:26 AM4/23/13
to sage-s...@googlegroups.com
This is now http://trac.sagemath.org/14479 (needs review)


Nathann Cohen

unread,
Apr 23, 2013, 10:06:55 AM4/23/13
to sage-s...@googlegroups.com

This is now http://trac.sagemath.org/14479 (needs review)

I love your style ! :-D

It says "Welcome in the world of Sage, where no known bug makes it past the day" :-D

Nathann 

Felix Wellen

unread,
Apr 23, 2013, 12:21:47 PM4/23/13
to sage-s...@googlegroups.com
With "backend='ppl', base_ring=QQ" it works!

Thanks again ;)

abhishek

unread,
May 1, 2013, 7:33:16 AM5/1/13
to sage-s...@googlegroups.com
Hello All, 

I am a new user of SAGE. I need to know how to control flow of how to control execution according to data type. As in a given loop I want to execute loop further only if variable is of a integer type. 


--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
To post to this group, send email to sage-s...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Volker Braun

unread,
May 1, 2013, 8:23:19 AM5/1/13
to sage-s...@googlegroups.com
Its bad practice in Python to depend explicitly on the specific type. You should implement your algorithm such that it does not matter if the type is exactly a Sage integer or just something that behaves like an integer:

try:
    ... do something ...
except ValueError:
    ... not an integer? ...

The second-best solution is to see if it is something that can be converted into ZZ:

sage: 5 in ZZ
True
sage: 5/2 in ZZ
False

The worst solution is to look directly at the type:

sage: isinstance(5, sage.rings.integer.Integer)
True
Reply all
Reply to author
Forward
0 new messages