1 /**
2  * Compiler implementation of the
3  * $(LINK2 http://www.dlang.org, D programming language).
4  *
5  * Copyright:   public domain
6  * License:     public domain
7  * Source:      $(DMDSRC backend/_bcomplex.d)
8  */
9 
10 module ddmd.backend.bcomplex;
11 
12 extern (C++):
13 @nogc:
14 nothrow:
15 
16 // Roll our own for reliable bootstrapping
17 
18 
19 struct Complex_f
20 {
21     float re, im;
22 
23     static Complex_f div(ref Complex_f x, ref Complex_f y);
24     static Complex_f mul(ref Complex_f x, ref Complex_f y);
25     static real abs(ref Complex_f z);
26     static Complex_f sqrtc(ref Complex_f z);
27 }
28 
29 struct Complex_d
30 {
31     double re, im;
32 
33     static Complex_d div(ref Complex_d x, ref Complex_d y);
34     static Complex_d mul(ref Complex_d x, ref Complex_d y);
35     static real abs(ref Complex_d z);
36     static Complex_d sqrtc(ref Complex_d z);
37 }
38 
39 struct Complex_ld
40 {
41     real re, im;
42 
43     static Complex_ld div(ref Complex_ld x, Complex_ld y);
44     static Complex_ld mul(ref Complex_ld x, ref Complex_ld y);
45     static real abs(ref Complex_ld z);
46     static Complex_ld sqrtc(ref Complex_ld z);
47 }