Example usage for org.apache.commons.math3.dfp Dfp getField

List of usage examples for org.apache.commons.math3.dfp Dfp getField

Introduction

In this page you can find the example usage for org.apache.commons.math3.dfp Dfp getField.

Prototype

public DfpField getField() 

Source Link

Document

Get the org.apache.commons.math3.Field Field (really a DfpField ) to which the instance belongs.

Usage

From source file:org.orekit.forces.gravity.AssociatedLegendreFunction.java

public Dfp value(Dfp t) {
    Dfp y1 = polynomial[polynomial.length - 1];
    for (int j = polynomial.length - 2; j >= 0; j--) {
        y1 = y1.multiply(t).add(polynomial[j]);
    }// www  .  ja  v a  2  s .  c o m
    Dfp oneMinusT2 = t.getField().getOne().subtract(t.multiply(t));
    Dfp y2 = t.getField().getOne();
    for (int j = 0; j < m; ++j) {
        y2 = y2.multiply(oneMinusT2);
    }
    y2 = y2.sqrt();
    return y1.multiply(y2).multiply(normalization);
}

From source file:org.orekit.forces.gravity.HolmesFeatherstoneAttractionModelTest.java

private Dfp error(Dfp refValue, double value) {
    return refValue.getField().newDfp(value).subtract(refValue);
}