Main Page | Modules | Class List | Directories | File List | Class Members | File Members

numerics.h File Reference

#include <stdlib.h>
#include <gandalf/common/misc_defs.h>
#include <gandalf/common/complex.h>

Go to the source code of this file.

Functions

int gan_sqr_i (int x)
 Integer square function.
unsigned gan_sqr_ui (unsigned x)
 Unsigned integer square function.
long gan_sqr_l (long x)
 Long integer square function.
float gan_sqr_f (float x)
 Real square function (single precision).
double gan_sqr_d (double x)
 Real square function.
double gan_cbrt (double x)
 Real cube root function.
double gan_normal_sample (double mu, double sigma)
 Returns a sample of a normally distributed random variable.
int gan_solve_quadratic (double a, double b, double c, Gan_Complex x[2])
 Find roots of a quadratic equation with real coefficients.
int gan_solve_cubic (double a, double b, double c, double d, Gan_Complex x[3])
 Find roots of a cubic equation with real coefficients.
double gan_sqr (double x)
 Macro: Computes square of a number.
long gan_random (void)
 Macro: Integer random number generator function.
void gan_random_set_seed (unsigned seed)
 Macro: Integer random number seed setter function.
double gan_random_01 (void)
 Macro: Random floating point number between 0 and 1.
double gan_random_m11 (void)
 Macro: Random floating point number between -1 and 1.
void * gan_kth_highest (void *base, size_t nmemb, size_t size, unsigned int k, int(*compar)(const void *, const void *))
 Return k'th highest element of an array.


Detailed Description

Module: Numerical functions

Part of: Gandalf Library

Version:
1.18
Date:
2003/01/31 18:56:41
Author:
pm
Copyright: (c) 2000 Imagineer Software Limited
Generated on Sat May 21 23:52:51 2005 by  doxygen 1.4.3