help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

embedding octave - floating point exception


From: Marco Driusso
Subject: embedding octave - floating point exception
Date: Mon, 9 Mar 2009 22:25:54 +0100

Running my program under gdb, after some functions that end correctly, I get

Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 0xb5d176c0 (LWP 15573)]
octave_ieee_init () at lo-ieee.cc:86
86            if (tmp_inf == tmp)
Current language:  auto; currently c++

Have you any idea?
Thanks for the answer!

Marco

2009/3/9 John W. Eaton <address@hidden>

On  9-Mar-2009, Marco Driusso wrote:

| I'm embedding the octave interpreter in a c++ program. I convert my c++
| variables to strings to pass them to octave (using the eval_string function
| like explained in the octave_embed.tar.gz example) and I take them back
| writing a file from octave and reading it from c++.
| I have to use the gcc compiler and not the mkoctfile (like is done the
| example) because I'm embedding octave in a big program that has an huge
| Makefile, so what I do is just to modify this makefile adding the needed
| libs.
| Once compiled and linked (no problems doing that), I run my program and just
| after called the octave_main(int argc, char*[]argv,int embedded) function I
| have a floating point exception.
| In the octave manual I read that if octave crashes immediately with a
| floating point exception it could be that octave fail to initialize  the
| IEEE floating point values for infinity and NaN.
| But octave run correctly on my system, I've not such error when I run it
| normally from a shell.
| Does anyone have an idea to solve this problem?

Did you try running your program under a debugger to see precisely
where it is crashing?

jwe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]