[ 
https://issues.apache.org/jira/browse/MATH-1262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14734564#comment-14734564
 ] 

Sebb commented on MATH-1262:
----------------------------

It's not going to be possible in general to determine what limit to use. What 
works on one system may fail on another, and vice versa.
We don't want to artificially limit what users can do just in order to avoid 
heap overflow.

I suggest we update the Javadoc to note that the implementation can require a 
lot of memory (and maybe give some examples).

> Heap overflow in org.apache.commons.math4.special.BesselJ
> ---------------------------------------------------------
>
>                 Key: MATH-1262
>                 URL: https://issues.apache.org/jira/browse/MATH-1262
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 4.0
>            Reporter: Neil Walkinshaw
>            Priority: Minor
>              Labels: newbie, performance
>
> This test case:
> {code:java}
> import org.apache.commons.math4.special.BesselJ;
> public class BesselJHeapBug {
>     public static void main(String[] args) {
>         BesselJ.value(1182054491, 3.589635306407856E-8D);
>     }
> }
> {code}
> throws the following exception:
> {code}
> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
>       at org.apache.commons.math4.special.BesselJ.rjBesl(BesselJ.java:247)
>       at org.apache.commons.math4.special.BesselJ.value(BesselJ.java:161)
>       at BesselJHeapBug.main(BesselJHeapBug.java:5)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to