| 121 | { return ap::complex(lhs.x/rhs, lhs.y/rhs); } |
| 122 | |
| 123 | const double ap::abscomplex(const ap::complex &z) |
| 124 | { |
| 125 | double w; |
| 126 | double xabs; |
| 127 | double yabs; |
| 128 | double v; |
| 129 | |
| 130 | xabs = fabs(z.x); |
| 131 | yabs = fabs(z.y); |
| 132 | w = xabs>yabs ? xabs : yabs; |
| 133 | v = xabs<yabs ? xabs : yabs; |
| 134 | if( v==0 ) |
| 135 | return w; |
| 136 | else |
| 137 | { |
| 138 | double t = v/w; |
| 139 | return w*sqrt(1+t*t); |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | const ap::complex ap::conj(const ap::complex &z) |
| 144 | { return ap::complex(z.x, -z.y); } |
nothing calls this directly
no outgoing calls
no test coverage detected