div_op Struct Reference

#include <operators.hpp>

List of all members.

Public Types

Static Public Member Functions


Detailed Description

Definition at line 702 of file operators.hpp.


Member Typedef Documentation

typedef ldiv_op sc_left

Definition at line 703 of file operators.hpp.

typedef rdiv_op sc_right

Definition at line 704 of file operators.hpp.


Member Function Documentation

static C def ( const C me,
const C f,
const C g 
) [inline, static]

Definition at line 718 of file operators.hpp.

References ASSERT, mmx::is_zero(), mmx::lshiftz(), and mmx::rshiftz().

00718                                             {
00719     if (is_zero (g[0])) {
00720       nat val;
00721       for (val=0; g[val]==0; val++)
00722         ASSERT (val != C::get_cancel_order (),
00723                 "valuation of denominator too high");
00724       return rshiftz (f, (int) val) / rshiftz (g, (int) val);
00725     }
00726     return (f - lshiftz (me * rshiftz (g))) / g[0]; }

static C diff_op ( const C me,
const C x,
const C y 
) [inline, static]

Definition at line 714 of file operators.hpp.

References mmx::derive(), and mmx::square().

00714                                                 {
00715     (void) me; return (derive (x)*y - x*derive (y)) / square (y); }

static generic name (  )  [inline, static]

Definition at line 705 of file operators.hpp.

References mmx::GEN_OVER.

00705 { return GEN_OVER; }

static nat nr_init (  )  [inline, static]

Definition at line 716 of file operators.hpp.

00716 { return 0; }

static C op ( const C x,
const C y 
) [inline, static]

Definition at line 708 of file operators.hpp.

00708 { return x / y; }

static generic set_name (  )  [inline, static]

Definition at line 706 of file operators.hpp.

References mmx::GEN_OVER_ASSIGN.

00706 { return GEN_OVER_ASSIGN; }

static void set_op ( R &  x,
const C1 &  y1,
const C2 y2 
) [inline, static]

Definition at line 712 of file operators.hpp.

References mmx::div().

00712 { div (x, y1, y2); }

static void set_op ( R &  x,
const C y 
) [inline, static]

Definition at line 710 of file operators.hpp.

00710 { x /= y; }


The documentation for this struct was generated from the following file:

Generated on 6 Dec 2012 for basix by  doxygen 1.6.1