Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #4846
| From | Roman <rschmied@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | passing Indeterminate and Infinity to C via MathLink |
| Date | 2011-09-10 11:31 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <j4fhpt$2g7$1@smc.vnet.net> (permalink) |
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
Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread
passing Indeterminate and Infinity to C via MathLink Roman <rschmied@gmail.com> - 2011-09-10 11:31 +0000 Re: passing Indeterminate and Infinity to C via MathLink Richard Fateman <fateman@cs.berkeley.edu> - 2011-09-22 11:34 +0000
csiph-web