
import org.junit.*;
import static org.junit.Assert.*;

public class StrictMathTest {

  @Test
  public void acosTest() {
    assertEquals(2.2142974, StrictMath.acos(-0.6), 1e-5);
  }

  @Test
  public void powTest() {
    assertEquals(0, Double.doubleToRawLongBits(StrictMath.pow(-0.0, 0.5)));
    assertEquals(~(-1L >>> 1),
                 Double.doubleToRawLongBits(StrictMath.pow(-0.0, 3)));
  }

  @Test
  public void IEEEremainderTest() {
    assertEquals(~(-1L >>> 1),
                 Double.doubleToRawLongBits(
                                StrictMath.IEEEremainder(-0.0, 1)));
    assertEquals(-1.7999999, StrictMath.IEEEremainder(2, 3.8), 1E-5);
  }

  @Test(timeout=1000)
  public void sinTest() {
    assertEquals(0.6402884, StrictMath.sin(1.9e209), 1e-5);
  }

  @Test
  public void tanTest() {
    assertEquals(-0.0290081, StrictMath.tan(-0.029), 1e-5);
    assertEquals(34.2325327, StrictMath.tan(-1.6), 1e-5);
  }
}
