[kepler-dev] Token.toString method(s)

Edward A. Lee eal at eecs.berkeley.edu
Sat Feb 25 10:51:32 PST 2006

At 03:27 PM 2/24/2006, Christopher Brooks wrote:
>I started looking at DoubleMatrixToken, but one issue is that
>the underlying data type is a Java double[], so I'd have to
>keep a shadow list of nil tokens to make toString() print
>nil instead of NaN.  Right now, it is possible to create
>a DoubleMatrix with [1.0, 2.0 ; 3.0,nil], but this is printed as
>[1.0, 2.0; 3.0, NaN].

I don't think we should print NaN as nil...

The problem is that a DoubleMatrixToken might be a result
of some numerical calculation, and NaN is a legitimate result.

I think it's fine to represent nil as NaN, but I think it should
still print as NaN.


Edward A. Lee
Professor, Chair of the EE Division, Associate Chair of EECS
231 Cory Hall, UC Berkeley, Berkeley, CA 94720
phone: 510-642-0253 or 510-642-0455, fax: 510-642-2845
eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal  

More information about the Kepler-dev mailing list