[Ada] Fix faulty preconditions for trigonometric functions
authorBoris Yakobowski <yakobowski@adacore.com>
Wed, 23 May 2018 10:23:43 +0000 (10:23 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Wed, 23 May 2018 10:23:43 +0000 (10:23 +0000)
2018-05-23  Boris Yakobowski  <yakobowski@adacore.com>

gcc/ada/

* libgnat/a-ngelfu.ads (Arctanh, Arccoth): Fix faulty preconditions.

From-SVN: r260595

gcc/ada/ChangeLog
gcc/ada/libgnat/a-ngelfu.ads

index 5a34dee..f2e6fde 100644 (file)
@@ -1,3 +1,7 @@
+2018-05-23  Boris Yakobowski  <yakobowski@adacore.com>
+
+       * libgnat/a-ngelfu.ads (Arctanh, Arccoth): Fix faulty preconditions.
+
 2018-05-23  Arnaud Charlet  <charlet@adacore.com>
 
        * checks.adb (Minimize_Eliminate_Overflows): Default initialize Lo and
index 97b22c7..5a58d83 100644 (file)
@@ -196,10 +196,10 @@ is
        and then (if X = 1.0 then Arccosh'Result = 0.0);
 
    function Arctanh (X : Float_Type'Base) return Float_Type'Base with
-     Pre  => abs X /= 1.0,
+     Pre  => abs X < 1.0,
      Post => (if X = 0.0 then Arctanh'Result = 0.0);
 
    function Arccoth (X : Float_Type'Base) return Float_Type'Base with
-     Pre => X <= 1.0 and abs X /= 1.0;
+     Pre => abs X > 1.0;
 
 end Ada.Numerics.Generic_Elementary_Functions;