MathGroup Archive 2010

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

Search the Archive

JLink NaN Support

  • To: mathgroup at
  • Subject: [mg110752] JLink NaN Support
  • From: Raffy <adraffy at>
  • Date: Sun, 4 Jul 2010 06:10:40 -0400 (EDT)

The support for NaN -> Indeterminate over JLink from Java ->
Mathematica is completely broken.

double[] f1() { return new double[]{Double.NaN}; }
double[] f2() { return new double[]{1/0D}; }

Evaluating f1 from Mathematica will return {-1024.}
Evaluating f2 from Mathematica will kill the kernel.

The desired behavior should be {Indeterminate} in both cases.

Are there any fixes for this or am I stuck mapping NaN's to a
different value?

  • Prev by Date: Wolfram Alpha app for iPhone is now €0.79
  • Next by Date: Re: Is it possible to query current plot range values (or have
  • Previous by thread: Wolfram Alpha app for iPhone is now €0.79
  • Next by thread: FindRoot with parameterized interpolated function from NDSolve