#include "common.h"
#include <stdio.h>
#include <math.h>
#include "machine.h"
#include "bu.h"
#include "vmath.h"
#include "bn.h"
Include dependency graph for complex.c:
Go to the source code of this file.
Defines | |
#define | SIGN(x) ((x) == 0 ? 0 : (x) > 0 ? 1 : -1) |
#define | ABS(a) ((a) >= 0 ? (a) : -(a)) |
Functions | |
void | bn_cx_div (register bn_complex_t *ap, register const bn_complex_t *bp) |
Divide one complex by another. | |
void | bn_cx_sqrt (bn_complex_t *op, register const bn_complex_t *ip) |
Compute square root of complex number. |
Michael John Muuss (Macro Version)
Definition in file complex.c.
|
Definition at line 56 of file complex.c. Referenced by bn_cx_sqrt(). |
|
Definition at line 57 of file complex.c. Referenced by bn_cx_div(). |
|
Divide one complex by another. B N _ C X _ D I V bn_cx_div( &a, &b ) divides a by b . Zero divisor fails. a and b may coincide. Result stored in a. Definition at line 68 of file complex.c. References ABS, bu_log(), FAST, NEAR_ZERO, and SQRT_SMALL_FASTF. Here is the call graph for this function: ![]() |
|
Compute square root of complex number. B N _ C X _ S Q R T bn_cx_sqrt( &out, &c ) replaces out by sqrt(c) Note: This is a double-valued function; the result of bn_cx_sqrt() always has nonnegative imaginary part. Definition at line 112 of file complex.c. References bn_cx_ampl, FAST, bn_complex::im, bn_complex::re, and SIGN. |