BRL-CAD
bn_poly_cubic_roots.c File Reference
#include "common.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <signal.h>
#include "bu.h"
#include "vmath.h"
#include "bn.h"
Include dependency graph for bn_poly_cubic_roots.c:

Go to the source code of this file.

Functions

void poly_init (void)
 
int test_bn_poly_cubic_rts (void)
 
int main (void)
 

Variables

bn_poly_t input [3]
 
bn_complex_t rts [7]
 
struct bn_poly bn_Zero_poly = { BN_POLY_MAGIC, 0, {0.0} }
 

Function Documentation

void poly_init ( void  )

Initialises cubic equations storing a negative, positive and zero coefficients.

The known output values used for these tests were generated from GNU Octave, version 3.4.3

Definition at line 45 of file bn_poly_cubic_roots.c.

References bn_Zero_poly, bn_poly::cf, bn_poly::dgr, bn_complex::im, and bn_complex::re.

Referenced by main().

int test_bn_poly_cubic_rts ( void  )

Definition at line 87 of file bn_poly_cubic_roots.c.

References bn_poly_cubic_roots().

Referenced by main().

Here is the call graph for this function:

int main ( void  )

Definition at line 134 of file bn_poly_cubic_roots.c.

References bu_log(), poly_init(), and test_bn_poly_cubic_rts().

Here is the call graph for this function:

Variable Documentation

bn_poly_t input[3]

Definition at line 36 of file bn_poly_cubic_roots.c.

bn_complex_t rts[7]

Definition at line 37 of file bn_poly_cubic_roots.c.

struct bn_poly bn_Zero_poly = { BN_POLY_MAGIC, 0, {0.0} }

Definition at line 39 of file bn_poly_cubic_roots.c.

Referenced by poly_init().