### Question:
Deg extends Algebraic { public Deg(Generic generic) { super("deg", new Generic[]{generic}); } Deg(Generic generic); @Override Root rootValue(); @Override Generic selfExpand(); @Override Generic selfElementary(); @Override Generic selfSimplify(); @Override Generic selfNumeric(); @Override Generic derivative(int n); @Nonnull @Override Variable newInstance();  }### Answer:
@Test public void testDeg() throws Exception { final JsclMathEngine mathEngine = JsclMathEngine.getInstance(); Assert.assertEquals("2", mathEngine.evaluate("deg(0.03490658503988659)")); Assert.assertEquals("-2", mathEngine.evaluate("deg(-0.03490658503988659)")); Assert.assertEquals("180", mathEngine.evaluate("deg(" + String.valueOf(Math.PI) + ")")); for (int i = 0; i < 1000; i++) { double value = Math.random() * 100000; assertEquals(value, Double.valueOf(mathEngine.evaluate("rad(deg(" + value + "))"))); assertEquals(value, Double.valueOf(mathEngine.evaluate("deg(rad(" + value + "))"))); } }