MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

passing Indeterminate and Infinity to C via MathLink


Hello all,
I am setting up a C function which accepts real numbers from MathLink.
The behavior I would like to achieve is that whenever the number is
"Infinity" then the C function receives "inf" (which is a valid double-
precision-format number); and whenever the number is "Indeterminate"
then the C function receives "nan" (which is also a valid double-
precision-format number).
Unfortunately MathLink (Mathematica 7.0 for Mac OS X x86 (64-bit))
crashes whenever I am trying to pass either Infinity or Indeterminate
to a MathLink function expecting a double-precision number.
Would you know how to solve this without going into If[] statements on
the Mathematica side of MathLink?
Thanks!
Roman




  • Prev by Date: Manipulate inside module
  • Next by Date: help to make code run faster (mathematica v8.01)
  • Previous by thread: Re: Manipulate inside module
  • Next by thread: Re: passing Indeterminate and Infinity to C via MathLink