commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <phil.ste...@gmail.com>
Subject Re: [math] Formatting Infinities and NaN in exception messages
Date Thu, 25 Nov 2010 15:39:29 GMT
On Thu, Nov 25, 2010 at 6:52 AM, <luc.maisonobe@free.fr> wrote:

> On a linux computer in an UTF8 environment and using Java 5, I get the
> following messages in English and in French:
>
> Continued fraction diverged to NaN for value ∞
> Divergence de fraction continue à NaN pour la valeur ∞
>
> I don't know if it will be visible through mail, but the last component of
> both messages is the single character that represent infinities. It is the
> same character you get using the &#8734; xml escape sequence, or the &infin;
> html escape sequence, or the \u221e java escape sequence.
>
> So I think the JVM is doing a good job by itself here. Could this be
> related to limitations or configuration of your display method (terminal,
> emacs, eclipse console ...) ?
>

Thanks, Luc!  My mistake.  I was looking at the test output including the
stacktrace using Mac OSX terminal app.  I can now see the  ∞ is there.  In
an ideal world, I would rather see "+INF" or "POSITIVE INFINITY" or somesuch
(including the sign) and have it plain ascii; but I now see that this is
coming from NumberFormat and don't see it as worth the trouble to change.

>
> Luc
>
>
> ----- "Phil Steitz" <phil.steitz@gmail.com> a écrit :
>
> > Researching MATH-414, I am seeing this stacktrace:
> >
> > org.apache.commons.math.ConvergenceException: Continued fraction
> > diverged to
> > NaN for value ?
> >     at
> >
> org.apache.commons.math.util.ContinuedFraction.evaluate(ContinuedFraction.java:186)
> >
> > The "?" should represent positive infinity (the actual parameter
> > passed to
> > the exception constructor).  Any ideas on how we can modify our
> > framework to
> > support formatting infinities and NaNs?
> >
> > Phil
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message