Package com.ericsson.otp.erlang

Examples of com.ericsson.otp.erlang.OtpErlangDouble.doubleValue()


    public void dump(OtpErlangObject arg, StringBuffer resultHolder) {
      assert (arg instanceof OtpErlangDouble)
          || (arg instanceof OtpErlangFloat);
      if (arg instanceof OtpErlangDouble) {
        OtpErlangDouble doubleValue = (OtpErlangDouble) arg;
        resultHolder.append(doubleValue.doubleValue());
      } else if (arg instanceof OtpErlangFloat) {
        OtpErlangDouble doubleValue = (OtpErlangDouble) arg;
        resultHolder.append(doubleValue.doubleValue());
      }
    }
View Full Code Here


      if (arg instanceof OtpErlangDouble) {
        OtpErlangDouble doubleValue = (OtpErlangDouble) arg;
        resultHolder.append(doubleValue.doubleValue());
      } else if (arg instanceof OtpErlangFloat) {
        OtpErlangDouble doubleValue = (OtpErlangDouble) arg;
        resultHolder.append(doubleValue.doubleValue());
      }
    }

    @Override
    public OtpErlangObject parseObject(
View Full Code Here

    public void dump(OtpErlangObject arg, StringBuffer resultHolder) {
      assert (arg instanceof OtpErlangDouble)
          || (arg instanceof OtpErlangFloat);
      if (arg instanceof OtpErlangDouble) {
        OtpErlangDouble doubleValue = (OtpErlangDouble) arg;
        resultHolder.append(doubleValue.doubleValue());
      } else if (arg instanceof OtpErlangFloat) {
        OtpErlangDouble doubleValue = (OtpErlangDouble) arg;
        resultHolder.append(doubleValue.doubleValue());
      }
    }
View Full Code Here

      if (arg instanceof OtpErlangDouble) {
        OtpErlangDouble doubleValue = (OtpErlangDouble) arg;
        resultHolder.append(doubleValue.doubleValue());
      } else if (arg instanceof OtpErlangFloat) {
        OtpErlangDouble doubleValue = (OtpErlangDouble) arg;
        resultHolder.append(doubleValue.doubleValue());
      }
    }

    @Override
    public OtpErlangObject parseObject(
View Full Code Here

  @Test
  public void testParse6a()
  {
    String text = " 458888.5";
    OtpErlangDouble number = (OtpErlangDouble)ErlangLabel.parseText(text);
    Assert.assertEquals(458888.5,number.doubleValue(),Configuration.fpAccuracy);
    Assert.assertEquals("458888.5",ErlangLabel.dumpErlangObject(runner.evaluateString(text)));
  }
 
  @Test
  public void testParse6b()
View Full Code Here

  @Test
  public void testParse6b()
  {
    String text = " 458888.5e0 ";
    OtpErlangDouble number = (OtpErlangDouble)ErlangLabel.parseText(text);
    Assert.assertEquals(458888.5,number.doubleValue(),Configuration.fpAccuracy);
    Assert.assertEquals("458888.5",ErlangLabel.dumpErlangObject(runner.evaluateString(text)));
  }
 
  @Test
  public void testParse6c()
View Full Code Here

  @Test
  public void testParse6c()
  {
    String text = " 458888.5e-5 ";
    OtpErlangDouble number = (OtpErlangDouble)ErlangLabel.parseText(text);
    Assert.assertEquals(4.588885,number.doubleValue(),Configuration.fpAccuracy);
    Assert.assertEquals("4.588885",ErlangLabel.dumpErlangObject(runner.evaluateString(text)));
  }
 
  @Test
  public void testParse6d()
View Full Code Here

  @Test
  public void testParse6d()
  {
    String text = " 458888.5e5 ";
    OtpErlangDouble number = (OtpErlangDouble)ErlangLabel.parseText(text);
    Assert.assertEquals(4.588885e10,number.doubleValue(),Configuration.fpAccuracy);
    Assert.assertEquals("4.588885E10",ErlangLabel.dumpErlangObject(runner.evaluateString(text)));
  }
 
  @Test
  public void testParse6e()
View Full Code Here

  @Test
  public void testParse6e()
  {
    String text = " 4588.456e34 ";
    OtpErlangDouble number = (OtpErlangDouble)ErlangLabel.parseText(text);
    Assert.assertEquals(4.588456e37,number.doubleValue(),Configuration.fpAccuracy);
    Assert.assertEquals("4.588456E37",ErlangLabel.dumpErlangObject(runner.evaluateString(text)));
  }
 
  @Test
  public void testParse6f()
View Full Code Here

  @Test
  public void testParse6f()
  {
    String text = " 4588888888888888.456e244 ";
    OtpErlangDouble number = (OtpErlangDouble)ErlangLabel.parseText(text);
    Assert.assertEquals(4.588888888888889E259,number.doubleValue(),Configuration.fpAccuracy);
    Assert.assertEquals("4.588888888888889E259",ErlangLabel.dumpErlangObject(runner.evaluateString(text)));
  }
 
  @Test
  public void testParse6g()
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.