2k views

### Correct way to handle mysterious NaN` result from MathLink function

I have a Mathematica expression that is mapped onto an external C function via MathLink. The external function passes a ...
• 5,131
2k views

### Calculating the mean of a list with NaN values

list={1,2,3,NaN,2} I'd like to calculate the mean of this list, ignoring the NaN. Answer should be ...
• 521
367 views

### MathLink C API: sending a List[] of so far unknown length

I would like to send a set of Mathematica expressions (i.e. not simple types that are easy to represent and temporarily store in C) in a List using the MathLink C ...
• 236k
350 views

### What is the maximum real value for Compile?

Can one be found programmatically? The function I'm compiling, indicesOfMin, gives the indices of the minimum value(s) of a real-valued list, the parameter, in a ...
• 4,732
440 views

When I do: ...
• 1,417
179 views

### Wha't the meaning of NaN in the descriptor of ImageKeypoints

Bug introduced in 10.3 or earlier and persisting through 11.3 ...
• 8,619
3k views

### Remove list elements that contain NaN Symbol [duplicate]

I have a long list of lists ...similar to g = {{1,2,3},{4,2,7}, .....{1.2,9}}. Occasionally, g contains elements like ...
• 11
152 views

### Why does LibraryLink return Indeterminate sometimes?

I have a LibraryLink application and I have debugged it with VS. That is to say, the corresponding C code is totally right. However, when I test it in Mathematica, sometimes it gives the correct ...
• 317
250 views

### Machine precision infinity

Is it possible to obtain the machine precision (double) version of Infinity? This is useful when using LibraryLink and C ...
• 1,617
151 views

### How to handle ragged-list type argument in LibraryLink?

Given that I have a ragged list as below, raggedList = {U1, U2, ..., Un} where, ui is a sublist($i=1,2,\cdots,n$) and their ...
• 625
93 views

### How do I return an mcomplex NAN from C++ to Mathematica using LibraryLink?

I need to deliberately return a 'NAN' from a LibraryLink function, which is expected to return mcomplex so it appears as ...
• 19.7k