CVS difference for acats/cxg/cxg2014.a
--- acats/cxg/cxg2014.a 1999/03/10 22:19:15 1.4
+++ acats/cxg/cxg2014.a 1999/03/11 23:47:27 1.5
@@ -52,7 +52,8 @@
-- 15 Mar 96 SAIC Initial release for 2.1
-- 03 Jun 98 EDS In line 80, change 1000 to 1024, making it a model
-- number. Add Taylor Series terms in line 281.
---
+-- 15 Feb 99 RLB Repaired Subtraction_Error_Test to avoid precision
+-- problems.
--!
--
@@ -265,14 +266,21 @@
-- the range under test.
--
-- The maximum relative error bound for this test is
- -- 8 for the sinh operation and 1 for the Taylor series
- -- for a total of 9 * Model_Epsilon
+ -- 8 for the sinh operation and 7 for the Taylor series
+ -- for a total of 15 * Model_Epsilon
A : constant := 0.0;
B : constant := 0.5;
X : Real;
X_Squared : Real;
Actual, Expected : Real;
begin
+ if Real'digits > 15 then
+ return; -- The approximation below is not accurate beyond
+ -- 15 digits. Adding more terms makes the error
+ -- larger, so it makes the test worse for more normal
+ -- values. Thus, we skip this subtest for larger than
+ -- 15 digits.
+ end if;
Accuracy_Error_Reported := False; -- reset
for I in 1..Max_Samples loop
X := (B - A) * Real (I) / Real (Max_Samples) + A;
@@ -293,7 +301,7 @@
Check (Actual, Expected,
"Subtraction_Error_Test " & Integer'Image (I) & ": sinh(" &
Real'Image (X) & ") ",
- 9.0);
+ 15.0);
if Accuracy_Error_Reported then
-- only report the first error in this test in order to keep
Questions? Ask the ACAA Technical Agent