Examples of denominator()


Examples of DSP.filter.Rational.denominator()

   
    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;
      double b1 = 0.0;
View Full Code Here

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

                //
                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.denominator()

                    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());
                            den = IntNum.valueOf(dens.toBigIntegerExact().toString());
View Full Code Here

Examples of jmathexpr.arithmetic.pattern.FractionPattern.denominator()

        List<Expression> denominators = new ArrayList();
        FractionPattern p = new FractionPattern();
       
        for (Expression t : evaluated) {
            if (p.matches(t)) {
                denominators.add(p.denominator());
            }
        }
       
        if (!denominators.isEmpty()) { // summing fractions
            Expression lcd = new Lcm(denominators).evaluate();
View Full Code Here

Examples of org.jruby.RubyRational.denominator()

                        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.denominator()

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

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

Examples of wyautl.util.BigRational.denominator()

  }

  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()));
View Full Code Here

Examples of wyautl.util.BigRational.denominator()

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

      byte[] denbytes = br.denominator().toByteArray();
      output.write_uv(denbytes.length);

    } else if (state instanceof Automaton.Strung) {
      Automaton.Strung str = (Automaton.Strung) state;
      try {
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.