SuperLU: SRC/dcomplex.c File Reference

# SRC/dcomplex.c File Reference

Common arithmetic for complex type. More...

`#include <math.h>`
`#include <stdlib.h>`
`#include <stdio.h>`
`#include "slu_dcomplex.h"`

## Functions
void | z_div (doublecomplex *c, doublecomplex *a, doublecomplex *b)
| Complex Division c = a/b.
double | z_abs (doublecomplex *z)
| Returns sqrt(z.r^2 + z.i^2).
double | z_abs1 (doublecomplex *z)
| Approximates the abs. Returns abs(z.r) + abs(z.i).
void | z_exp (doublecomplex *r, doublecomplex *z)
| Return the exponentiation.
void | d_cnjg (doublecomplex *r, doublecomplex *z)
| Return the complex conjugate.
double | d_imag (doublecomplex *z)
| Return the imaginary part.
doublecomplex | z_sgn (doublecomplex *z)
| SIGN functions for complex number. Returns z/abs(z).
doublecomplex | z_sqrt (doublecomplex *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

void d_cnjg | ( | doublecomplex * | r,
|  | doublecomplex * | z |
| ) |  |  |

double d_imag | ( | doublecomplex * | z | ) |

double z_abs | ( | doublecomplex * | z | ) |

double z_abs1 | ( | doublecomplex * | z | ) |

void z_div | ( | doublecomplex * | c,
|  | doublecomplex * | a,
|  | doublecomplex * | b |
| ) |  |  |

void z_exp | ( | doublecomplex * | r,
|  | doublecomplex * | z |
| ) |  |  |

doublecomplex z_sgn | ( | doublecomplex * | z | ) |

doublecomplex z_sqrt | ( | doublecomplex * | z | ) |