void multiply(ComplexByte cparm) { int rtemp, itemp; rtemp = (real * cparm.getrealpart( ) - imag * cparm.getimagpart( )); itemp = (real * cparm.getimagpart( ) + cparm.getrealpart( ) * imag); if ((rtemp > 127) || (rtemp < -128)) { throw new ArithmeticException(); } if ((itemp > 127) || (itemp < -128)) { throw new ArithmeticException(); } real = (byte)rtemp; imag = (byte)itemp; }
int equals(ComplexByte cparm) { if (real != cparm.getrealpart()) { return(0); } if (imag != cparm.getimagpart( )) { return(0); } return(1); }
int equals( ComplexByte cparm ) { if (real != cparm.getrealpart()) { return 0; } if(imag != cparm.getimagpart( )) { return 0; } return 1; }
void add(ComplexByte cparm) { int rtemp, itemp; rtemp = real + cparm.getrealpart(); if ((rtemp > 127) || (rtemp < -128)) { throw new ArithmeticException(); } itemp = imag + cparm.getimagpart(); if ((itemp > 127) || (itemp < -128)) { throw new ArithmeticException(); } real = (byte)(rtemp); imag = (byte)(itemp); }
void assign(ComplexByte cparm) { real = cparm.getrealpart( ); imag = cparm.getimagpart( ); }
public ComplexByte(ComplexByte cparm) { this.real = cparm.getrealpart( ); this.imag = cparm.getimagpart( ); }
void add( ComplexByte cparm ) { int rtemp, itemp; rtemp = real + cparm.getrealpart(); if ( ( rtemp > 127 ) || ( rtemp < -128 ) ) throw new ArithmeticException(); itemp = imag + cparm.getimagpart(); if ( ( itemp > 127 ) || ( itemp < -128 ) ) throw new ArithmeticException(); real = (byte)( rtemp); imag = (byte)( itemp ); }
void assign( ComplexByte cparm ) { real = cparm.getrealpart( ); imag = cparm.getimagpart( ); }
public ComplexByte( ComplexByte cparm ) { this.real = cparm.getrealpart( ); this.imag = cparm.getimagpart( ); }
void multiply( ComplexByte cparm ) { int rtemp, itemp; rtemp = (real * cparm.getrealpart( ) - imag * cparm.getimagpart( )); itemp = (real * cparm.getimagpart( ) + cparm.getrealpart( ) * imag); if ( ( rtemp > 127 ) || ( rtemp < -128 ) ) throw new ArithmeticException(); if ( ( itemp > 127 ) || ( itemp < -128 ) ) throw new ArithmeticException(); real = (byte) rtemp; imag = (byte) itemp; }