It's in ptolemy.data.expr.FixPointFunctions,
public static FixPoint fix(int value, int numberOfBits, int integerBits)

Edward

At 05:27 PM 5/4/2006, Michael J Wirthlin wrote:

I am looking into a bug in the FixMatrixToken class. The bug occurs when trying to create a matrix of FixToken objects from a string, ie:

"fix([1.0 2.0; 3.5 4.5], 8, 4)"

The error occurs because the precision of the tokens are not the same. The first token in the matrix is created with the 5.4 format and the second is created with the 4.4 format (the desired format).

I am struggling to find the code within the expression parser that defines the "fix" function. Any guidance on where in the code this function is defined? I think this should be a trivial bug to fix.

- Mike

--
Michael J. Wirthlin
Associate Professor
Electrical and Computer Engineering  Voice: (801) 422-7601
Brigham Young University             Fax:   (801) 422-0201
459 Clyde Building                   Email: [EMAIL PROTECTED]
Provo, UT 84602                      www.ee.byu.edu/faculty/wirthlin


----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]

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

----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]

Reply via email to