| org.apache.derbyTesting.junit.BaseJDBCTestCase org.apache.derbyTesting.functionTests.tests.lang.MathTrigFunctionsTest
Method Summary | |
public static Test | suite() | public void | testAcos() Tests the ACOS function which returns the arc cosine of a specified
number.
Acceptable input values to the ACOS function are DOUBLE PRECISION values
from -1 to 1. | public void | testAsin() Tests the ASIN function which returns the arc sine of a specified number. | public void | testAtan() Tests the ATAN function which returns the arc tangent of a specified
number. | public void | testCeil() Tests the CEIL function which rounds a DOUBLE PRECISION number up, and
return the smallest number that is greater than or equal to the input
number.
If the input number is NULL, the result of these functions is NULL. | public void | testCeiling() Tests the CEILING function which rounds a DOUBLE PRECISION number up, and
return the smallest number that is greater than or equal to the input
number.
If the input number is NULL, the result of these functions is NULL. | public void | testCos() Tests the COS function which returns the cosine of a specified number. | public void | testDegrees() Tests the DEGREES function which converts a DOUBLE PRECISION number from
radians to degrees.
The input is an angle measured in radians, which is converted to an
approximately equivalent angle measured in degrees.
The conversion from radians to degrees is not exact. | public void | testExp() Tests the EXP function which returns e raised to the power of the input
DOUBLE PRECISION number. | public void | testFloor() Tests the FLOOR function which rounds the input value which must be a
DOUBLE PRECISION number down, and returns the largest number that is less
than or equal to the input value.
If the input value is NULL, the result of this function is NULL. | public void | testLn() Tests the LN function which returns the natural logarithm (base e) of a
DOUBLE PRECISION number that is greater than zero (0). | public void | testLog() Tests the LOG function which returns the natural logarithm (base e) of a
DOUBLE PRECISION number that is greater than zero (0). | public void | testLog10() Tests the LOG10 function which returns the base-10 logarithm of a DOUBLE
PRECISION number that is greater than zero. | public void | testPI() Tests the PI function which returns a value that is closer than any other
value to pi. | public void | testRadians() Tests the RADIANS function which converts a DOUBLE PRECISION number from
degrees to radians.
The input is an angle measured in degrees, which is converted to an
approximately equivalent angle measured in radians.
The conversion from radians to degrees is not exact. | public void | testSin() Tests the SIN function which returns the sine of a specified number. | public void | testTan() Tests the TAN function which returns the tangent of a specified number. |
MathTrigFunctionsTest | public MathTrigFunctionsTest(String name)(Code) | | |
suite | public static Test suite()(Code) | | |
testAcos | public void testAcos() throws SQLException(Code) | | Tests the ACOS function which returns the arc cosine of a specified
number.
Acceptable input values to the ACOS function are DOUBLE PRECISION values
from -1 to 1. NULL returns NULL and if the absolute value of the input is
greater than 1 an SQL state of 22003 is returned.
The return value from the ACOS function is a DOUBLE PRECISION number in
radians with a range of zero to PI.
|
testAsin | public void testAsin() throws SQLException(Code) | | Tests the ASIN function which returns the arc sine of a specified number.
Acceptable input values to the ASIN function are DOUBLE PRECISION values
from -1 to 1.
If the specified number is zero (0), the result of this function is zero.
Note: Derby does not support negative zero.
An input value of NULL returns NULL.
If the absolute value of the input is greater than 1 an SQL state of
22003 is returned.
The return value from the ASIN function is a DOUBLE PRECISION number in
radians with a range of -PI/2 to PI/2.
|
testAtan | public void testAtan() throws SQLException(Code) | | Tests the ATAN function which returns the arc tangent of a specified
number. Acceptable input values to the ATAN function are DOUBLE PRECISION
values.
If the specified number is zero (0), the result of this function is zero.
An input value of NULL returns NULL.
The return value from the ATAN function is a DOUBLE PRECISION number in
radians with a range of -PI/2 to PI/2.
|
testCeil | public void testCeil() throws SQLException(Code) | | Tests the CEIL function which rounds a DOUBLE PRECISION number up, and
return the smallest number that is greater than or equal to the input
number.
If the input number is NULL, the result of these functions is NULL. If
the input number is equal to a mathematical integer, the result of these
functions is the same as the input number. If the input number is zero
(0), the result of these functions is zero. If the input number is less
than zero but greater than -1.0, then the result of these functions is
zero.
The returned value is the smallest (closest to negative infinity) double
floating point value that is greater than or equal to the specified
number. The returned value is equal to a mathematical integer.
The data type of the returned value is a DOUBLE PRECISION number.
|
testCeiling | public void testCeiling() throws SQLException(Code) | | Tests the CEILING function which rounds a DOUBLE PRECISION number up, and
return the smallest number that is greater than or equal to the input
number.
If the input number is NULL, the result of these functions is NULL. If
the input number is equal to a mathematical integer, the result of these
functions is the same as the input number. If the input number is zero
(0), the result of these functions is zero. If the input number is less
than zero but greater than -1.0, then the result of these functions is
zero.
The returned value is the smallest (closest to negative infinity) double
floating point value that is greater than or equal to the specified
number. The returned value is equal to a mathematical integer.
The data type of the returned value is a DOUBLE PRECISION number.
|
testCos | public void testCos() throws SQLException(Code) | | Tests the COS function which returns the cosine of a specified number.
Acceptable input values to the COS function are DOUBLE PRECISION values.
An input value of NULL returns NULL.
|
testDegrees | public void testDegrees() throws SQLException(Code) | | Tests the DEGREES function which converts a DOUBLE PRECISION number from
radians to degrees.
The input is an angle measured in radians, which is converted to an
approximately equivalent angle measured in degrees.
The conversion from radians to degrees is not exact. You should not
expect that the COS(DEGREES(PI/2)) to exactly equal 0.0.
The return value is a DOUBLE PRECISION number.
|
testExp | public void testExp() throws SQLException(Code) | | Tests the EXP function which returns e raised to the power of the input
DOUBLE PRECISION number. The input number is the exponent to raise e to.
The constant e is the base of the natural logarithms.
The return value is a DOUBLE PRECISION number.
throws: SQLException - |
testFloor | public void testFloor() throws SQLException(Code) | | Tests the FLOOR function which rounds the input value which must be a
DOUBLE PRECISION number down, and returns the largest number that is less
than or equal to the input value.
If the input value is NULL, the result of this function is NULL. If the
input value is equal to a mathematical integer, the result of this
function is the same as the input number. If the input value is zero (0),
the result of this function is zero.
The returned value is the largest (closest to positive infinity) double
floating point value that is less than or equal to the input value. The
returned value is equal to a mathematical integer. The data type of the
returned value is a DOUBLE PRECISION number.
throws: SQLException - |
testLn | public void testLn() throws SQLException(Code) | | Tests the LN function which returns the natural logarithm (base e) of a
DOUBLE PRECISION number that is greater than zero (0).
If the specified number is NULL, the result of these functions is NULL.
If the specified number is zero or a negative number, an exception is
returned that indicates that the value is out of range (SQL state 22003).
The data type of the returned value is a DOUBLE PRECISION number.
|
testLog | public void testLog() throws SQLException(Code) | | Tests the LOG function which returns the natural logarithm (base e) of a
DOUBLE PRECISION number that is greater than zero (0).
If the specified number is NULL, the result of these functions is NULL.
If the specified number is zero or a negative number, an exception is
returned that indicates that the value is out of range (SQL state 22003).
The data type of the returned value is a DOUBLE PRECISION number.
|
testLog10 | public void testLog10() throws SQLException(Code) | | Tests the LOG10 function which returns the base-10 logarithm of a DOUBLE
PRECISION number that is greater than zero.
If the input value is NULL, the result of this function is NULL.
If the input value is zero or a negative number, an exception is returned
that indicates that the value is out of range (SQL state 22003).
The return type is a DOUBLE PRECISION number.
|
testPI | public void testPI() throws SQLException(Code) | | Tests the PI function which returns a value that is closer than any other
value to pi.
The constant pi is the ratio of the circumference of a circle to the
diameter of a circle.
No input values are allowed for the PI function.
|
testRadians | public void testRadians() throws SQLException(Code) | | Tests the RADIANS function which converts a DOUBLE PRECISION number from
degrees to radians.
The input is an angle measured in degrees, which is converted to an
approximately equivalent angle measured in radians.
The conversion from radians to degrees is not exact. You should not
expect that the COS(RADIANS(90.0)) to exactly equal 0.0.
The return value is a DOUBLE PRECISION number.
|
testSin | public void testSin() throws SQLException(Code) | | Tests the SIN function which returns the sine of a specified number.
Acceptable input values to the SIN function are DOUBLE PRECISION values.
An input value of NULL returns NULL.
If the argument is zero, then the result is zero.
The data type of the returned value is a DOUBLE PRECISION number.
|
testTan | public void testTan() throws SQLException(Code) | | Tests the TAN function which returns the tangent of a specified number.
Acceptable input values to the TAN function are DOUBLE PRECISION values.
An input value of NULL returns NULL.
If the argument is zero, then the result is zero.
The data type of the returned value is a DOUBLE PRECISION number.
|
Methods inherited from org.apache.derbyTesting.junit.BaseJDBCTestCase | public void assertCompileError(String sqlState, String query)(Code)(Java Doc) public static void assertEquals(Blob b1, Blob b2) throws IOException, SQLException(Code)(Java Doc) public static void assertEquals(Clob c1, Clob c2) throws IOException, SQLException(Code)(Java Doc) public static void assertSQLState(String message, String expected, SQLException exception)(Code)(Java Doc) public static void assertSQLState(String expected, SQLException exception)(Code)(Java Doc) public void commit() throws SQLException(Code)(Java Doc) public Statement createStatement() throws SQLException(Code)(Java Doc) public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException(Code)(Java Doc) public Connection getConnection() throws SQLException(Code)(Java Doc) public Connection getConnection(String databaseName, String connAttrs) throws SQLException(Code)(Java Doc) public Connection getDefaultConnection(String connAttrs) throws SQLException(Code)(Java Doc) protected void initializeConnection(Connection conn) throws SQLException(Code)(Java Doc) public Connection openConnection(String databaseName) throws SQLException(Code)(Java Doc) public Connection openDefaultConnection() throws SQLException(Code)(Java Doc) public CallableStatement prepareCall(String sql) throws SQLException(Code)(Java Doc) public PreparedStatement prepareStatement(String sql) throws SQLException(Code)(Java Doc) public void rollback() throws SQLException(Code)(Java Doc) public int runSQLCommands(String sqlCommands) throws UnsupportedEncodingException, SQLException(Code)(Java Doc) public int runScript(InputStream script, String encoding) throws UnsupportedEncodingException, SQLException(Code)(Java Doc) protected void tearDown() throws java.lang.Exception(Code)(Java Doc) public static boolean usingDerbyNet()(Code)(Java Doc) public static boolean usingDerbyNetClient()(Code)(Java Doc) public static boolean usingEmbedded()(Code)(Java Doc)
|
|
|