eps = 0.01;
begin
- Assert(ABS(Math.sqrt(1.0) - 1.0) < eps);
- Assert(ABS(Math.sqrt(4.0) - 2.0) < eps);
+ Assert(Abs(Math.sqrt(1.0) - 1.0) < eps);
+ Assert(Abs(Math.sqrt(4.0) - 2.0) < eps);
- Assert(ABS(Math.power(0.0, 1.0) - 0.0) < eps);
- Assert(ABS(Math.power(1.0, 0.0) - 1.0) < eps);
- Assert(ABS(Math.power(2.0, 3.0) - 8.0) < eps);
- Assert(ABS(Math.power(2.0, -3.0) - 1.0 / 8.0) < eps);
+ Assert(Abs(Math.power(0.0, 1.0) - 0.0) < eps);
+ Assert(Abs(Math.power(1.0, 0.0) - 1.0) < eps);
+ Assert(Abs(Math.power(2.0, 3.0) - 8.0) < eps);
+ Assert(Abs(Math.power(2.0, -3.0) - 1.0 / 8.0) < eps);
- Assert(ABS(Math.exp(0.0) - 1.0) < eps);
- Assert(ABS(Math.exp(1.0) - Math.e) < eps);
- Assert(ABS(Math.exp(2.0) - Math.e * Math.e) < eps);
- Assert(ABS(Math.exp(-2.0) - 1.0 / Math.e / Math.e) < eps);
+ Assert(Abs(Math.exp(0.0) - 1.0) < eps);
+ Assert(Abs(Math.exp(1.0) - Math.e) < eps);
+ Assert(Abs(Math.exp(2.0) - Math.e * Math.e) < eps);
+ Assert(Abs(Math.exp(-2.0) - 1.0 / Math.e / Math.e) < eps);
- Assert(ABS(Math.ln(1.0) - 0.0) < eps);
- Assert(ABS(Math.ln(Math.e) - 1.0) < eps);
- Assert(ABS(Math.ln(Math.e * Math.e) - 2.0) < eps);
+ Assert(Abs(Math.ln(1.0) - 0.0) < eps);
+ Assert(Abs(Math.ln(Math.e) - 1.0) < eps);
+ Assert(Abs(Math.ln(Math.e * Math.e) - 2.0) < eps);
- Assert(ABS(Math.log(1.0, 2.0) - 0.0) < eps);
- Assert(ABS(Math.log(Math.e, Math.e) - 1.0) < eps);
- Assert(ABS(Math.log(100.0, 10.0) - 2.0) < eps);
+ Assert(Abs(Math.log(1.0, 2.0) - 0.0) < eps);
+ Assert(Abs(Math.log(Math.e, Math.e) - 1.0) < eps);
+ Assert(Abs(Math.log(100.0, 10.0) - 2.0) < eps);
- Assert(ABS(Math.round(0.4) - 0.0) < eps);
- Assert(ABS(Math.round(-0.4) - 0.0) < eps);
- Assert(ABS(Math.round(0.6) - 1.0) < eps);
- Assert(ABS(Math.round(-0.6) - (-1.0)) < eps);
+ Assert(Abs(Math.round(0.4) - 0.0) < eps);
+ Assert(Abs(Math.round(-0.4) - 0.0) < eps);
+ Assert(Abs(Math.round(0.6) - 1.0) < eps);
+ Assert(Abs(Math.round(-0.6) - (-1.0)) < eps);
- Assert(ABS(Math.sin(0.0) - 0.0) < eps);
- Assert(ABS(Math.sin(Math.pi / 6.0) - 0.5) < eps);
- Assert(ABS(Math.sin(Math.pi / 2.0) - 1.0) < eps);
+ Assert(Abs(Math.sin(0.0) - 0.0) < eps);
+ Assert(Abs(Math.sin(Math.pi / 6.0) - 0.5) < eps);
+ Assert(Abs(Math.sin(Math.pi / 2.0) - 1.0) < eps);
- Assert(ABS(Math.cos(0.0) - 1.0) < eps);
- Assert(ABS(Math.cos(Math.pi / 3.0) - 0.5) < eps);
- Assert(ABS(Math.cos(Math.pi / 2.0) - 0.0) < eps);
+ Assert(Abs(Math.cos(0.0) - 1.0) < eps);
+ Assert(Abs(Math.cos(Math.pi / 3.0) - 0.5) < eps);
+ Assert(Abs(Math.cos(Math.pi / 2.0) - 0.0) < eps);
- Assert(ABS(Math.tan(0.0) - 0.0) < eps);
- Assert(ABS(Math.tan(Math.pi / 4.0) - 1.0) < eps);
+ Assert(Abs(Math.tan(0.0) - 0.0) < eps);
+ Assert(Abs(Math.tan(Math.pi / 4.0) - 1.0) < eps);
- Assert(ABS(Math.arcsin(0.0) - 0.0) < eps);
- Assert(ABS(Math.arcsin(0.5) - Math.pi / 6.0) < eps);
- Assert(ABS(Math.arcsin(1.0) - Math.pi / 2.0) < eps);
+ Assert(Abs(Math.arcsin(0.0) - 0.0) < eps);
+ Assert(Abs(Math.arcsin(0.5) - Math.pi / 6.0) < eps);
+ Assert(Abs(Math.arcsin(1.0) - Math.pi / 2.0) < eps);
- Assert(ABS(Math.arccos(1.0) - 0.0) < eps);
- Assert(ABS(Math.arccos(0.5) - Math.pi / 3.0) < eps);
- Assert(ABS(Math.arccos(0.0) - Math.pi / 2.0) < eps);
+ Assert(Abs(Math.arccos(1.0) - 0.0) < eps);
+ Assert(Abs(Math.arccos(0.5) - Math.pi / 3.0) < eps);
+ Assert(Abs(Math.arccos(0.0) - Math.pi / 2.0) < eps);
- Assert(ABS(Math.arctan(0.0) - 0.0) < eps);
- Assert(ABS(Math.arctan(1.0) - Math.pi / 4.0) < eps);
+ Assert(Abs(Math.arctan(0.0) - 0.0) < eps);
+ Assert(Abs(Math.arctan(1.0) - Math.pi / 4.0) < eps);
- Assert(ABS(Math.arctan2(0.0, 2.0) - 0.0) < eps);
- Assert(ABS(Math.arctan2(2.0, 2.0) - Math.pi / 4.0) < eps);
+ Assert(Abs(Math.arctan2(0.0, 2.0) - 0.0) < eps);
+ Assert(Abs(Math.arctan2(2.0, 2.0) - Math.pi / 4.0) < eps);
- Assert(ABS(Math.sinh(0.0) - 0.0) < eps);
- Assert(ABS(Math.sinh(1.0) - (Math.e - 1.0 / Math.e) / 2.0) < eps);
+ Assert(Abs(Math.sinh(0.0) - 0.0) < eps);
+ Assert(Abs(Math.sinh(1.0) - (Math.e - 1.0 / Math.e) / 2.0) < eps);
- Assert(ABS(Math.cosh(0.0) - 1.0) < eps);
- Assert(ABS(Math.cosh(1.0) - (Math.e + 1.0 / Math.e) / 2.0) < eps);
+ Assert(Abs(Math.cosh(0.0) - 1.0) < eps);
+ Assert(Abs(Math.cosh(1.0) - (Math.e + 1.0 / Math.e) / 2.0) < eps);
- Assert(ABS(Math.tanh(0.0) - 0.0) < eps);
- Assert(ABS(Math.tanh(1.0) - (Math.e - 1.0 / Math.e) / (Math.e + 1.0 / Math.e)) < eps);
+ Assert(Abs(Math.tanh(0.0) - 0.0) < eps);
+ Assert(Abs(Math.tanh(1.0) - (Math.e - 1.0 / Math.e) / (Math.e + 1.0 / Math.e)) < eps);
- Assert(ABS(Math.arcsinh(0.0) - 0.0) < eps);
- Assert(ABS(Math.arcsinh((Math.e - 1.0 / Math.e) / 2.0) - 1.0) < eps);
+ Assert(Abs(Math.arcsinh(0.0) - 0.0) < eps);
+ Assert(Abs(Math.arcsinh((Math.e - 1.0 / Math.e) / 2.0) - 1.0) < eps);
- Assert(ABS(Math.arccosh(1.0) - 0.0) < eps);
- Assert(ABS(Math.arccosh((Math.e + 1.0 / Math.e) / 2.0) - 1.0) < eps);
+ Assert(Abs(Math.arccosh(1.0) - 0.0) < eps);
+ Assert(Abs(Math.arccosh((Math.e + 1.0 / Math.e) / 2.0) - 1.0) < eps);
- Assert(ABS(Math.arctanh(0.0) - 0.0) < eps);
- Assert(ABS(Math.arctanh((Math.e - 1.0 / Math.e) / (Math.e + 1.0 / Math.e)) - 1.0) < eps)
+ Assert(Abs(Math.arctanh(0.0) - 0.0) < eps);
+ Assert(Abs(Math.arctanh((Math.e - 1.0 / Math.e) / (Math.e + 1.0 / Math.e)) - 1.0) < eps)
end MathTest.