Examples of Overflow


Examples of javax.time.calendar.LocalTime.Overflow

    public LocalDateTime minus(PeriodProvider periodProvider) {
        Period period = Period.from(periodProvider)// TODO: overflows long->int PeriodFields
        // TODO: correct algorithm
        LocalDate date = this.date.minusYears(period.getYears())
                .minusMonths(period.getMonths()).minusDays(period.getDays());
        Overflow overflow = this.time.minusWithOverflow(
                period.getHours(), period.getMinutes(), period.getSeconds(), period.getNanos());
        LocalDateTime result = overflow.toLocalDateTime(date);
        return (result.equals(this) ? this : result);
    }
View Full Code Here

Examples of ptolemy.math.Overflow

        if (port.getType() == BaseType.FIX && token instanceof FixToken) {
            Precision precision = new Precision(((Parameter) getAttribute(port
                    .getName()
                    + "Precision")).getExpression());

            Overflow overflow = Overflow.getName(((Parameter) getAttribute(port
                    .getName()
                    + "Overflow")).getExpression().toLowerCase());

            Rounding rounding = Rounding.getName(((Parameter) getAttribute(port
                    .getName()
View Full Code Here

Examples of ptolemy.math.Overflow

    public void fire() throws IllegalActionException {
        super.fire();

        Precision precision = new Precision(getPortPrecision(output));

        Overflow overflow = Overflow
                .getName(((Parameter) getAttribute("outputOverflow"))
                        .getExpression().toLowerCase());

        Rounding rounding = Rounding
                .getName(((Parameter) getAttribute("outputRounding"))
View Full Code Here

Examples of ptolemy.math.Overflow

            if (_currentIndex < valuesArray.length()) {
                Precision precision = new Precision(
                        ((Parameter) getAttribute("outputPrecision"))
                                .getExpression());

                Overflow overflow = Overflow
                        .getName(((Parameter) getAttribute("outputOverflow"))
                                .getExpression().toLowerCase());

                Rounding rounding = Rounding
                        .getName(((Parameter) getAttribute("outputRounding"))
View Full Code Here

Examples of ptolemy.math.Overflow

                    intResult = bigIntA.xor(bigIntB).not();
                }
            }

            if (intResult != null) {
                Overflow overflow = Overflow
                        .getName(((Parameter) getAttribute("outputOverflow"))
                                .getExpression().toLowerCase());

                Rounding rounding = Rounding
                        .getName(((Parameter) getAttribute("outputRounding"))
View Full Code Here

Examples of ptolemy.math.Overflow

        }

        Precision precision = new Precision(
                ((Parameter) getAttribute("outputPrecision")).getExpression());

        Overflow overflow = Overflow
                .getName(((Parameter) getAttribute("outputOverflow"))
                        .getExpression().toLowerCase());

        Rounding rounding = Rounding
                .getName(((Parameter) getAttribute("outputRounding"))
View Full Code Here

Examples of ptolemy.math.Overflow

            _quantization = _quantization.setPrecision(precision);
        } else if (attribute == rounding) {
            Rounding r = Rounding.getName(rounding.getExpression());
            _quantization = _quantization.setRounding(r);
        } else if (attribute == overflow) {
            Overflow o = Overflow.forName(overflow.getExpression());
            _quantization = _quantization.setOverflow(o);
        } else {
            super.attributeChanged(attribute);
        }
    }
View Full Code Here

Examples of ptolemy.math.Overflow

            }
        } else if (attribute == rounding) {
            Rounding r = Rounding.getName(rounding.getExpression());
            _quantization = _quantization.setRounding(r);
        } else if (attribute == overflow) {
            Overflow o = Overflow.forName(overflow.getExpression());
            _quantization = _quantization.setOverflow(o);
            if (_quantization.getOverflow() == Overflow.GROW) {
                output.setTypeEquals(BaseType.UNSIZED_FIX);
            } else {
                output.setTypeEquals(new FixType(_quantization.getPrecision()));
View Full Code Here

Examples of ptolemy.math.Overflow

            }
            Precision precision = new Precision(
                    ((Parameter) getAttribute("outputPrecision"))
                            .getExpression());

            Overflow overflow = Overflow
                    .getName(((Parameter) getAttribute("outputOverflow"))
                            .getExpression().toLowerCase());

            Rounding rounding = Rounding
                    .getName(((Parameter) getAttribute("outputRounding"))
                            .getExpression().toLowerCase());

            FixPoint result = new FixPoint(((ScalarToken) initialValue
                    .getToken()).doubleValue(), new FixPointQuantization(
                    precision, overflow, rounding));
            output.setInitToken(new FixToken(result));
        }
        if (attribute == initialValue) {
            Precision precision = new Precision(
                    ((Parameter) getAttribute("outputPrecision"))
                            .getExpression());

            Overflow overflow = Overflow
                    .getName(((Parameter) getAttribute("outputOverflow"))
                            .getExpression().toLowerCase());

            Rounding rounding = Rounding
                    .getName(((Parameter) getAttribute("outputRounding"))
View Full Code Here

Examples of ptolemy.math.Overflow

     */
    public void initialize() throws IllegalActionException {
        Precision precision = new Precision(
                ((Parameter) getAttribute("outputPrecision")).getExpression());

        Overflow overflow = Overflow
                .getName(((Parameter) getAttribute("outputOverflow"))
                        .getExpression().toLowerCase());

        Rounding rounding = Rounding
                .getName(((Parameter) getAttribute("outputRounding"))
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.