Basic HTML version of Foils prepared July 6 99

Foil 72 Proposal for class Complex

From Use of Java Language in Computational Science DoD Modernization Users Group Conference Monterey -- June 7 99. by Nancy McCracken, Geoffrey C. Fox


1 The Java Grande forum has a draft proposal for a class to implement type Complex, although there are still several difficulties in having a class instead of a primitive type:
  • syntax is methods, not operators
  • assignment is of references, not values
  • overhead of method calls may cause bad performance
2 The Forum is working with Sun on these issues.
3 One version of the constructor: Complex z = new Complex ( x, y ); // x and y are doubles
4 Syntax for operators: Complex z1, z2, z3; z1 = Complex.plus ( z2, z3 ) ; or z1 = z2.plus ( z3 ) ;
5 Many additional operators
6 Definitions based onC9x Annex G:"IEC 559-compatible complex arithmetic.

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Tue Jul 6 1999