The precondition of Cot in Ada.Numerics.Generic_Elementary_Functions is
not meant for execution (as enforced by the Assertion_Policy at the top
of the file) but for analysis only. A conjunct in the precondition of
Cot applied to two arguments (with a Cycle value) was incorrect, now
fixed.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

        * libgnat/a-ngelfu.ads (Cot): Fix precondition.
diff --git a/gcc/ada/libgnat/a-ngelfu.ads b/gcc/ada/libgnat/a-ngelfu.ads
--- a/gcc/ada/libgnat/a-ngelfu.ads
+++ b/gcc/ada/libgnat/a-ngelfu.ads
@@ -126,7 +126,7 @@ is
      Pre => Cycle > 0.0
        and then X /= 0.0
        and then Float_Type'Base'Remainder (X, Cycle) /= 0.0
-       and then abs Float_Type'Base'Remainder (X, Cycle) = 0.5 * Cycle;
+       and then abs Float_Type'Base'Remainder (X, Cycle) /= 0.5 * Cycle;
 
    function Arcsin (X : Float_Type'Base) return Float_Type'Base with
      Pre  => abs X <= 1.0,


Reply via email to