Common arithmetic for complex type. More...
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include "slu_scomplex.h"
Functions | |
void | c_div (complex *c, complex *a, complex *b) |
Complex Division c = a/b. | |
double | c_abs (complex *z) |
Returns sqrt(z.r^2 + z.i^2). | |
double | c_abs1 (complex *z) |
Approximates the abs. Returns abs(z.r) + abs(z.i). | |
void | c_exp (complex *r, complex *z) |
Return the exponentiation. | |
void | r_cnjg (complex *r, complex *z) |
Return the complex conjugate. | |
double | r_imag (complex *z) |
Return the imaginary part. | |
complex | c_sgn (complex *z) |
SIGN functions for complex number. Returns z/abs(z). | |
complex | c_sqrt (complex *z) |
Square-root of a complex number. |
Common arithmetic for complex type.
-- SuperLU routine (version 2.0) -- Univ. of California Berkeley, Xerox Palo Alto Research Center, and Lawrence Berkeley National Lab. November 15, 1997
This file defines common arithmetic operations for complex type.
double c_abs | ( | complex * | z | ) |
Returns sqrt(z.r^2 + z.i^2).
double c_abs1 | ( | complex * | z | ) |
Approximates the abs. Returns abs(z.r) + abs(z.i).
Complex Division c = a/b.
Return the exponentiation.
SIGN functions for complex number. Returns z/abs(z).
double r_imag | ( | complex * | z | ) |
Return the imaginary part.