Commit 94855a14 by Arnaud Charlet

[multiple changes]

2009-11-30  Arnaud Charlet  <charlet@adacore.com>

	* s-tassta.adb: Update comment.

2009-11-30  Robert Dewar  <dewar@adacore.com>

	* a-ngelfu.adb: Minor code reorganization.

From-SVN: r154780
parent 196b1993
2009-11-30 Arnaud Charlet <charlet@adacore.com>
* s-tassta.adb: Update comment.
2009-11-30 Robert Dewar <dewar@adacore.com>
* a-ngelfu.adb: Minor code reorganization.
2009-11-30 Robert Dewar <dewar@adacore.com> 2009-11-30 Robert Dewar <dewar@adacore.com>
* osint.ads, prj.adb, prj.ads: Minor reformatting * osint.ads, prj.adb, prj.ads: Minor reformatting
......
...@@ -68,9 +68,8 @@ package body Ada.Numerics.Generic_Elementary_Functions is ...@@ -68,9 +68,8 @@ package body Ada.Numerics.Generic_Elementary_Functions is
-- FP type. -- FP type.
function Local_Atan function Local_Atan
(Y : Float_Type'Base; (Y : Float_Type'Base;
X : Float_Type'Base := 1.0) X : Float_Type'Base := 1.0) return Float_Type'Base;
return Float_Type'Base;
-- Common code for arc tangent after cycle reduction -- Common code for arc tangent after cycle reduction
---------- ----------
...@@ -721,20 +720,35 @@ package body Ada.Numerics.Generic_Elementary_Functions is ...@@ -721,20 +720,35 @@ package body Ada.Numerics.Generic_Elementary_Functions is
---------------- ----------------
function Local_Atan function Local_Atan
(Y : Float_Type'Base; (Y : Float_Type'Base;
X : Float_Type'Base := 1.0) X : Float_Type'Base := 1.0) return Float_Type'Base
return Float_Type'Base
is is
Z : Float_Type'Base; Z : Float_Type'Base;
Raw_Atan : Float_Type'Base; Raw_Atan : Float_Type'Base;
begin begin
Z := (if abs Y > abs X then abs (X / Y) else abs (Y / X)); -- Z := (if abs Y > abs X then abs (X / Y) else abs (Y / X));
-- Raw_Atan :=
-- (if Z < Sqrt_Epsilon then Z
-- elsif Z = 1.0 then Pi / 4.0
-- else Float_Type'Base (Aux.Atan (Double (Z))));
-- Replace above with IF statements for now (ASIS gnatelim problem???)
Raw_Atan := if abs Y > abs X then
(if Z < Sqrt_Epsilon then Z Z := abs (X / Y);
elsif Z = 1.0 then Pi / 4.0 else
else Float_Type'Base (Aux.Atan (Double (Z)))); Z := abs (Y / X);
end if;
if Z < Sqrt_Epsilon then
Raw_Atan := Z;
elsif Z = 1.0 then
Raw_Atan := Pi / 4.0;
else
Raw_Atan := Float_Type'Base (Aux.Atan (Double (Z)));
end if;
if abs Y > abs X then if abs Y > abs X then
Raw_Atan := Half_Pi - Raw_Atan; Raw_Atan := Half_Pi - Raw_Atan;
......
...@@ -743,9 +743,7 @@ package body System.Tasking.Stages is ...@@ -743,9 +743,7 @@ package body System.Tasking.Stages is
function State function State
(Int : System.Interrupt_Management.Interrupt_ID) return Character; (Int : System.Interrupt_Management.Interrupt_ID) return Character;
pragma Import (C, State, "__gnat_get_interrupt_state"); pragma Import (C, State, "__gnat_get_interrupt_state");
-- Get interrupt state. Defined in a-init.c -- Get interrupt state for interrupt number Int. Defined in init.c
-- The input argument is the interrupt number,
-- and the result is one of the following:
Default : constant Character := 's'; Default : constant Character := 's';
-- 's' Interrupt_State pragma set state to System (use "default" -- 's' Interrupt_State pragma set state to System (use "default"
......
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