Examples of strVal()


Examples of org.apache.pig.data.DataAtom.strval()

          Tuple tup = new Tuple(1);
          tup.setField(0, 0.5);
          DataAtom output = new DataAtom();
          EXPM1.exec(tup, output);
          double expected = Math.expm1(0.5);
          double actual = (new Double(output.strval())).doubleValue();
          assertEquals(actual, expected, delta);
   }
  
   public void testFLOOR() throws Exception{
       EvalFunc<DataAtom> FLOOR = new FLOOR();
View Full Code Here

Examples of org.apache.pig.data.DataAtom.strval()

          Tuple tup = new Tuple(1);
          tup.setField(0, 0.5);
          DataAtom output = new DataAtom();
          FLOOR.exec(tup, output);
          double expected = Math.floor(0.5);
          double actual = (new Double(output.strval())).doubleValue();
          assertEquals(actual, expected, delta);
   }
  
   public void testgetExponent() throws Exception{
       EvalFunc<DataAtom> getExponent = new getExponent();
View Full Code Here

Examples of org.apache.pig.data.DataAtom.strval()

          Tuple tup = new Tuple(1);
          tup.setField(0, -0.5);
          DataAtom output = new DataAtom();
          getExponent.exec(tup, output);
          double expected = Math.getExponent(-0.5);
          double actual = (new Double(output.strval())).doubleValue();
          assertEquals(actual, expected, delta);
   }
  
   public void testHYPOT() throws Exception {
          EvalFunc<DataAtom> HYPOT = new HYPOT();
View Full Code Here

Examples of org.apache.pig.data.DataAtom.strval()

          tup.setField(0, -0.5);
          tup.setField(1,0.6);
          DataAtom output = new DataAtom();
          HYPOT.exec(tup, output);
          double expected = Math.hypot(-0.5,0.6);
          double actual = (new Double(output.strval())).doubleValue();
          assertEquals(actual, expected, delta);
      }
  
   public void testIEEEremainder() throws Exception {
          EvalFunc<DataAtom> IEEEremainder = new IEEEremainder();
View Full Code Here

Examples of org.apache.pig.data.DataAtom.strval()

          tup.setField(0, -0.5);
          tup.setField(1,0.6);
          DataAtom output = new DataAtom();
          IEEEremainder.exec(tup, output);
          double expected = Math.IEEEremainder(-0.5,0.6);
          double actual = (new Double(output.strval())).doubleValue();
          assertEquals(actual, expected, delta);
      }
  
   public void testLOG() throws Exception{
       EvalFunc<DataAtom> LOG = new LOG();
View Full Code Here

Examples of org.apache.pig.data.DataAtom.strval()

          Tuple tup = new Tuple(1);
          tup.setField(0, 0.5);
          DataAtom output = new DataAtom();
          LOG.exec(tup, output);
          double expected = Math.log(0.5);
          double actual = (new Double(output.strval())).doubleValue();
          assertEquals(actual, expected, delta);
   }
  
   public void testLOG10() throws Exception{
       EvalFunc<DataAtom> LOG10 = new LOG10();
View Full Code Here

Examples of org.apache.pig.data.DataAtom.strval()

          Tuple tup = new Tuple(1);
          tup.setField(0, 0.5);
          DataAtom output = new DataAtom();
          LOG10.exec(tup, output);
          double expected = Math.log10(0.5);
          double actual = (new Double(output.strval())).doubleValue();
          assertEquals(actual, expected, delta);
   }
  
   public void testLOG1P() throws Exception{
       EvalFunc<DataAtom> LOG1P = new LOG1P();
View Full Code Here

Examples of org.apache.pig.data.DataAtom.strval()

          Tuple tup = new Tuple(1);
          tup.setField(0, 0.5);
          DataAtom output = new DataAtom();
          LOG1P.exec(tup, output);
          double expected = Math.log1p(0.5);
          double actual = (new Double(output.strval())).doubleValue();
          assertEquals(actual, expected, delta);
   }
  
   public void testMAX() throws Exception {
          EvalFunc<DataAtom> MAX = new MAX();
View Full Code Here

Examples of org.apache.pig.data.DataAtom.strval()

          tup.setField(0, -0.5);
          tup.setField(1,0.6);
          DataAtom output = new DataAtom();
          MAX.exec(tup, output);
          double expected = Math.max(-0.5,0.6);
          double actual = (new Double(output.strval())).doubleValue();
          assertEquals(actual, expected, delta);
      }
  
   public void testMIN() throws Exception {
          EvalFunc<DataAtom> MIN = new MIN();
View Full Code Here

Examples of org.apache.pig.data.DataAtom.strval()

          tup.setField(0, -0.5);
          tup.setField(1,0.6);
          DataAtom output = new DataAtom();
          MIN.exec(tup, output);
          double expected = Math.min(-0.5,0.6);
          double actual = (new Double(output.strval())).doubleValue();
          assertEquals(actual, expected, delta);
      }
  
   public void testnextAfter() throws Exception {
          EvalFunc<DataAtom> nextAfter = new nextAfter();
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.