List of usage examples for org.apache.commons.math3.dfp Dfp toString
@Override
public String toString()
From source file:org.matheclipse.commons.parser.client.eval.dfp.DfpEvaluator.java
/** * Returns a <code>String</code> representation of the given * <code>Complex</code> number. * //ww w .ja va 2s . co m * @param c * @return * */ public static String toString(Dfp c) { return c.toString(); }
From source file:org.rhwlab.BHC.GammaTest.java
static public void main(String[] args) { int n = 1000; DfpField field = new DfpField(20); for (int i = 0; i < n; ++i) { Dfp G = field.newDfp(Gamma.logGamma(i)).exp(); System.out.printf("%d: %e %e %s\n", i, Gamma.gamma(i), Gamma.logGamma(i), G.toString()); }/* ww w .ja v a 2s .c o m*/ }
From source file:org.rhwlab.BHCnotused.Algorithm.java
private Cluster maximumRCluster() { Cluster ret = null;//from w w w.j ava 2s .c o m Dfp maxR = field.getZero(); for (HashMap<Cluster, Cluster> map : pairs.values()) { for (Cluster cl : map.values()) { Dfp r = cl.getPosterior(); double realR = r.getReal(); if (r.greaterThan(maxR)) { maxR = cl.r; ret = cl; } } } System.out.printf("Posterior= %s\n", maxR.toString()); return ret; }