NaN returned by gauss()

trg818
Thu, 16 Sep 2021 13:21:40 +0000
Numerics

I’m using the function gauss() from QuadGK in order to calculate a non-adaptive quadrature and am irritated about the appearance of NaN beyond a certain N. Specifically, gauss(1093,38.68598671891722,150000.0) returns an array that is partly populated with NaN, whereas gauss(1092,38.68598671891722,150000.0) seems to be ok. Why is this, and is it supposed to be this way? A proper warning or error message would be more helpful than just returning NaN and waiting with the crash until they are used.

8 posts - 4 participants