Path: csiph.com!usenet.pasdenom.info!news.albasani.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Dmitry Cherkassov Newsgroups: comp.graphics.algorithms Subject: runtime exception using CGAL library Date: Wed, 13 Jun 2012 13:49:52 +0400 Organization: A noiseless patient Spider Lines: 30 Message-ID: <87txyfr16n.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: 4da.eternal-september.org; posting-host="V/pP/3lfCx/EjsLoHYBVpA"; logging-data="13202"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+RzZu/lmKrJQSWPxkxH6Dr" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) Cancel-Lock: sha1:E3XAi0Px6CNFgv4NeVBlqxMqsyI= sha1:sCpTNdMpLPp2yPgJNT9HgtAFoKo= Xref: csiph.com comp.graphics.algorithms:874 Hi! The following code using CGAL library fails with runtime exception: http://pastebin.ca/2160795 the exception: $ ./cppgraham terminate called after throwing an instance of 'CGAL::Assertion_exception' what(): CGAL ERROR: assertion violation! Expr: -CGAL_IA_MUL(-1.1, 10.1) != CGAL_IA_MUL(1.1, 10.1) File: /usr/include/CGAL/Interval_nt.h Line: 160 Explanation: Wrong rounding: did you forget the -frounding-math option if you use GCC (or -fp-model strict for Intel)? I am running this on 64-bit debian. Makefile looks like this: g++ -o ${@} graham_scan.cpp -std=c++0x -lCGAL -lgmp What's interesting is that the very same code runs ok on 32-bit debian system. Any ideas? -- With best regards, Dmitry