Examples of numerator()


Examples of DSP.filter.Rational.numerator()

    sections = new ArrayList< SecondOrderSection >();
   
    for ( int i = 0;  i < prototype.nSections();  i++ ) {
      Rational R = prototype.getSection(i).map( S );
      T.timesEquals(R);
      double[] cn = R.numerator().coefficients();
      double[] cd = R.denominator().coefficients();
      double   s  = 1.0;
      if ( cd[0] != 0.0 ) s = cd[0];
     
      double b0 = cn[0]/s;
View Full Code Here

Examples of DSP.filter.Rational.numerator()

            retval.addSection( new Rational( new Polynomial(t1), DT[1] ) );
          }
          else if ( order[0] == 1 ) {
            retval.addSection( new Rational( new Polynomial(t1), DT[0] ) );
            double[] t2 = new double[3];
            double[] tc = Tsection.numerator().coefficients();
            for ( int j = 0;  j < 3;  j++ ) t2[j] = tc[j+1];
            retval.addSection( new Rational( new Polynomial(t2), DT[1] ) );
          }
          else if ( order[0] == 2 ) {
            Polynomial[] NT = lptobpFactors( section.numerator(), BW, prod );
View Full Code Here

Examples of com.lightcrafts.utils.Rational.numerator()

                //
                final Rational r =
                    ((RationalMetaValue)value).getRationalValue();
                if ( r.isInteger() )
                    return Integer.toString( r.intValue() );
                if ( r.numerator() > r.denominator() )
                    return TextUtil.tenths( r );
            default:
                return null;
        }
    }
View Full Code Here

Examples of gnu.math.RatNum.numerator()

                public Object activate(IokeObject method, IokeObject context, IokeObject message, Object on) throws ControlFlow {
                    getArguments().getEvaluatedArguments(context, message, on, new ArrayList<Object>(), new HashMap<String, Object>());

                    RatNum value = ((Number)IokeObject.data(on)).value;
                    if(value instanceof IntFraction) {
                        IntNum num = value.numerator();
                        IntNum den = value.denominator();
                        BigDecimal nums = new BigSquareRoot().get(num.asBigDecimal());
                        BigDecimal dens = new BigSquareRoot().get(den.asBigDecimal());
                        try {
                            num = IntNum.valueOf(nums.toBigIntegerExact().toString());
View Full Code Here

Examples of org.jruby.RubyRational.numerator()

                        }
                        return new RubyBigDecimal(runtime, (RubyClass)recv, new BigDecimal(((RubyFloat)args[0]).getDoubleValue(), context));
                    } else {
                        RubyRational rat = (RubyRational)args[0];

                        BigDecimal num = new BigDecimal(rat.numerator(ctx).convertToInteger().getLongValue());
                        BigDecimal den = new BigDecimal(rat.denominator(ctx).convertToInteger().getLongValue());

                        BigDecimal value = num.divide(den, context);

                        return new RubyBigDecimal(runtime, value);
View Full Code Here

Examples of org.kocakosm.pitaya.math.Fraction.numerator()

  @Test
  public void testNumerator()
  {
    Fraction f = valueOf("42 / 16");
    assertEquals(42, f.numerator().intValue());
  }

  @Test
  public void testDenominator()
  {
View Full Code Here

Examples of wyautl.util.BigRational.numerator()

  protected void translate(Constant.Decimal e, int freeSlot,
      ArrayList<Bytecode> bytecodes) {
    BigRational rat = new BigRational(e.value);
    BigInteger den = rat.denominator();
    BigInteger num = rat.numerator();
    if(rat.isInteger()) {
      // this
      if(num.bitLength() < 32) {
        bytecodes.add(new Bytecode.LoadConst(num.intValue()));
        JvmType.Function ftype = new JvmType.Function(WHILEYRAT,T_INT);
View Full Code Here

Examples of wyautl.util.BigRational.numerator()

      output.write_uv(bytes.length);
    } else if (state instanceof Automaton.Real) {
      Automaton.Real r = (Automaton.Real) state;
      BigRational br = r.value;

      byte[] numbytes = br.numerator().toByteArray();
      output.write_uv(numbytes.length);
      output.write(numbytes);

      byte[] denbytes = br.denominator().toByteArray();
      output.write_uv(denbytes.length);
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.