Commit 39a4daf9 by Boris Yakobowski Committed by Pierre-Marie de Rodat

[Ada] Fix faulty preconditions for trigonometric functions

2018-05-23  Boris Yakobowski  <yakobowski@adacore.com>

gcc/ada/

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

From-SVN: r260595
parent bc3fb397
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
......
......@@ -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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment