| ... | ... | @@ -25,30 +25,5 @@ int main (int argc, char *argv[]) |
| 25 | 25 | |
| 26 | 26 | if (!ok) abort(); |
| 27 | 27 | |
| 28 | | // Test some basic arithmetic from compiler-rt |
| 29 | | { |
| 30 | | double complex z = 0.0 + I * 4.0; |
| 31 | | double complex w = 0.0 + I * 16.0; |
| 32 | | double complex product = z * w; |
| 33 | | double complex quotient = z / w; |
| 34 | | |
| 35 | | if (!(creal(product) == -64.0)) abort(); |
| 36 | | if (!(cimag(product) == 0.0)) abort(); |
| 37 | | if (!(creal(quotient) == 0.25)) abort(); |
| 38 | | if (!(cimag(quotient) == 0.0)) abort(); |
| 39 | | } |
| 40 | | |
| 41 | | { |
| 42 | | float complex z = 4.0 + I * 4.0; |
| 43 | | float complex w = 2.0 - I * 2.0; |
| 44 | | float complex product = z * w; |
| 45 | | float complex quotient = z / w; |
| 46 | | |
| 47 | | if (!(creal(product) == 16.0)) abort(); |
| 48 | | if (!(cimag(product) == 0.0)) abort(); |
| 49 | | if (!(creal(quotient) == 0.0)) abort(); |
| 50 | | if (!(cimag(quotient) == 2.0)) abort(); |
| 51 | | } |
| 52 | | |
| 53 | 28 | return EXIT_SUCCESS; |
| 54 | 29 | } |