Core 1.0
Public Member Functions | Static Public Attributes | Protected Attributes | Friends | List of all members
Octic Class Reference

Octic polynomials. More...

#include <nonic.h>

Public Member Functions

 Octic ()
 Empty.
 
 Octic (const double &, const double &, const double &, const double &, const double &, const double &, const double &, const double &, const double &)
 Creates a Octic polynomial.
 
 ~Octic ()
 Empty.
 
constexpr double & operator[] (int)
 Access to the coefficients of the sextic.
 
constexpr double operator[] (int) const
 Overloaded.
 
int CheckDegree () const
 Check the degree of the Octic.
 
Octic operator- () const
 Unary.
 
Octicoperator+= (const Octic &)
 Destructive sum of two Octics.
 
Octicoperator-= (const Octic &)
 Destructive difference of two Octics.
 
Octicoperator*= (const double &)
 Scale a Octics by a double value.
 
Octicoperator/= (const double &)
 Scale a Octics by a double value.
 
Sextic Second () const
 Computes the second derivative of a Octic.
 
constexpr double operator() (const double &) const
 Evaluates the Octic. More...
 
constexpr double Derivative (const double &) const
 Computes the derivative of the sextic. More...
 

Static Public Attributes

static double epsilon = 1.0e-10
 Epsilon value used to check discriminant terms in the root finding process.
 

Protected Attributes

double c [9] = { 0.0 }
 Array of coefficients.
 

Friends

Octic operator+ (const Octic &, const Octic &)
 Overloaded.
 
Octic operator- (const Octic &, const Octic &)
 Overloaded.
 
Octic operator* (const Octic &, const double &)
 Overloaded.
 
Octic operator* (const double &, const Octic &)
 Overloaded.
 
Octic operator/ (const Octic &, const double &)
 Overloaded.
 
Octic operator* (const Quartic &, const Quartic &)
 Multiply two quartics. More...
 
std::ostream & operator<< (std::ostream &, const Octic &)
 Overloaded output-stream operator. More...
 

Detailed Description

Octic polynomials.

Constructors should provide the coefficients in descending order. Example of how to code the Octic 19x8-x+1:

Octic p(19.0,0.0,0.0,0.0,0.0,0.0,-1.0,1.0);
Octic polynomials.
Definition: octic.h:8

Member Function Documentation

◆ Derivative()

constexpr double Octic::Derivative ( const double &  x) const
inlineconstexpr

Computes the derivative of the sextic.

This function is more efficient than using Prime() and then evaluating the derivative for a given input value.

Parameters
xReal.

◆ operator()()

constexpr double Octic::operator() ( const double &  x) const
inlineconstexpr

Evaluates the Octic.

Parameters
xArgument value of the function.

Friends And Related Function Documentation

◆ operator*

Octic operator* ( const Quartic u,
const Quartic v 
)
friend

Multiply two quartics.

Parameters
u,vArgument quartics.

◆ operator<<

std::ostream & operator<< ( std::ostream &  s,
const Octic p 
)
friend

Overloaded output-stream operator.

Parameters
sStream.
pThe Octic.