Complex numbers for Java

Citation
M. Philippsen et E. Gunthner, Complex numbers for Java, CONCURRENCY, 12(6), 2000, pp. 477-491
Citations number
12
Categorie Soggetti
Computer Science & Engineering
Journal title
CONCURRENCY-PRACTICE AND EXPERIENCE
ISSN journal
10403108 → ACNP
Volume
12
Issue
6
Year of publication
2000
Pages
477 - 491
Database
ISI
SICI code
1040-3108(200005)12:6<477:CNFJ>2.0.ZU;2-E
Abstract
Efficient and elegant complex numbers are one of the preconditions for the use of Java in scientific computing. This paper introduces a preprocessor a nd its translation rules that map a new basic type complex and its operatio ns to pure Java, For the mapping it is insufficient to just replace one com plex-variable with two double-variables. Compared to code that uses Complex objects and method invocations to express arithmetic operations, the new b asic type increases readability and it is also executed faster. On average, the versions of our benchmark programs that use the basic type outperform the class-based versions by a factor of 2 up to 21 (depending on the JVM us ed). Copyright (C) 2000 John Wiley & Sons, Ltd.