SuperLU: SRC/scomplex.c File Reference

# SRC/scomplex.c File Reference

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.

## Detailed Description

     -- 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.

## Function Documentation

double c_abs | ( | complex * | z | ) |

double c_abs1 | ( | complex * | z | ) |

void c_div | ( | complex * | c,
|  | complex * | a,
|  | complex * | b |
| ) |  |  |

void c_exp | ( | complex * | r,
|  | complex * | z |
| ) |  |  |

complex c_sgn | ( | complex * | z | ) |

complex c_sqrt | ( | complex * | z | ) |

void r_cnjg | ( | complex * | r,
|  | complex * | z |
| ) |  |  |

double r_imag | ( | complex * | z | ) |