Examples of todouble()


Examples of org.apache.commons.math.dfp.Dfp.toDouble()

                    refdfp = field.getPi().add(refdfp);
                else
                    refdfp = refdfp.subtract(field.getPi());
            }

            double ref = refdfp.toDouble();
            double err = (tst - ref) / ref;

            if (err != 0) {
                double ulp = Math.abs(ref -
                                      Double.longBitsToDouble((Double
View Full Code Here

Examples of org.apache.commons.math3.dfp.Dfp.toDouble()

                    refdfp = field.getPi().add(refdfp);
                else
                    refdfp = refdfp.subtract(field.getPi());
            }

            double ref = refdfp.toDouble();
            double err = (tst - ref) / ref;

            if (err != 0) {
                double ulp = Math.abs(ref -
                                      Double.longBitsToDouble((Double
View Full Code Here

Examples of org.apache.commons.math3.dfp.Dfp.toDouble()

        DfpField field = new DfpField(40);
        final double base = 1.23456789;
        Dfp baseDfp = field.newDfp(base);
        Dfp dfpPower = field.getOne();
        for (int i = 0; i < maxExp; i++) {
            Assert.assertEquals("exp=" + i, dfpPower.toDouble(), FastMath.pow(base, i),
                                0.6 * FastMath.ulp(dfpPower.toDouble()));
            dfpPower = dfpPower.multiply(baseDfp);
        }
    }

View Full Code Here

Examples of org.apache.commons.math3.dfp.Dfp.toDouble()

        final double base = 1.23456789;
        Dfp baseDfp = field.newDfp(base);
        Dfp dfpPower = field.getOne();
        for (int i = 0; i < maxExp; i++) {
            Assert.assertEquals("exp=" + i, dfpPower.toDouble(), FastMath.pow(base, i),
                                0.6 * FastMath.ulp(dfpPower.toDouble()));
            dfpPower = dfpPower.multiply(baseDfp);
        }
    }

    @Test
View Full Code Here

Examples of org.apache.commons.math3.dfp.Dfp.toDouble()

                    refdfp = field.getPi().add(refdfp);
                else
                    refdfp = refdfp.subtract(field.getPi());
            }

            double ref = refdfp.toDouble();
            double err = (tst - ref) / ref;

            if (err != 0) {
                double ulp = Math.abs(ref -
                                      Double.longBitsToDouble((Double
View Full Code Here

Examples of org.apache.commons.math3.dfp.Dfp.toDouble()

        DfpField field = new DfpField(40);
        final double base = 1.23456789;
        Dfp baseDfp = field.newDfp(base);
        Dfp dfpPower = field.getOne();
        for (int i = 0; i < maxExp; i++) {
            Assert.assertEquals("exp=" + i, dfpPower.toDouble(), FastMath.pow(base, i),
                                0.6 * FastMath.ulp(dfpPower.toDouble()));
            dfpPower = dfpPower.multiply(baseDfp);
        }
    }

View Full Code Here

Examples of org.apache.commons.math3.dfp.Dfp.toDouble()

        final double base = 1.23456789;
        Dfp baseDfp = field.newDfp(base);
        Dfp dfpPower = field.getOne();
        for (int i = 0; i < maxExp; i++) {
            Assert.assertEquals("exp=" + i, dfpPower.toDouble(), FastMath.pow(base, i),
                                0.6 * FastMath.ulp(dfpPower.toDouble()));
            dfpPower = dfpPower.multiply(baseDfp);
        }
    }

}
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.value.Conversions.Converter.toDouble()

        if (type == BOOLEAN) {
            return (T) Boolean.valueOf(converter.toBoolean());
        } else if (type == DECIMAL) {
            return (T) converter.toDecimal();
        } else if (type == DOUBLE) {
            return (T) Double.valueOf(converter.toDouble());
        } else if (type == LONG) {
            return (T) Long.valueOf(converter.toLong());
        } else {
            throw new UnsupportedOperationException(
                    "Unknown type: " + type);
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.value.Conversions.Converter.toDouble()

                if (base == Type.DATE) {
                    converter = Conversions.convert(converter.toCalendar());
                } else if (base == Type.DECIMAL) {
                    converter = Conversions.convert(converter.toDecimal());
                } else if (base == Type.DOUBLE) {
                    converter = Conversions.convert(converter.toDouble());
                } else if (base == Type.LONG) {
                    converter = Conversions.convert(converter.toLong());
                }
                if (type == Type.BOOLEAN) {
                    return (T) Boolean.valueOf(converter.toBoolean());
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.value.Conversions.Converter.toDouble()

                } else if (type == Type.DATE) {
                    return (T) converter.toDate();
                } else if (type == Type.DECIMAL) {
                    return (T) converter.toDecimal();
                } else if (type == Type.DOUBLE) {
                    return (T) Double.valueOf(converter.toDouble());
                } else if (type == Type.LONG) {
                    return (T) Long.valueOf(converter.toLong());
                } else {
                    throw new UnsupportedOperationException(
                            "Unknown type: " + type);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.