rpms/ghdl/devel ieee-mathreal-nocompat.patch, NONE, 1.1 ghdl.spec, 1.46, 1.47
Thomas M. Sailer
sailer at fedoraproject.org
Thu Apr 2 14:00:51 UTC 2009
- Previous message (by thread): rpms/schroedinger/devel .cvsignore, 1.6, 1.7 schroedinger.spec, 1.12, 1.13 sources, 1.6, 1.7
- Next message (by thread): rpms/fedora-ds-base/F-10 fedora-ds-base.spec, 1.28, 1.29 ppc1.patch, 1.1, NONE ppc2.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: sailer
Update of /cvs/pkgs/rpms/ghdl/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11821
Modified Files:
ghdl.spec
Added Files:
ieee-mathreal-nocompat.patch
Log Message:
make math_real more standards compliant
ieee-mathreal-nocompat.patch:
--- NEW FILE ieee-mathreal-nocompat.patch ---
--- vhdl/libraries/ieee/math_real.vhdl.orig 2009-04-01 19:21:58.000000000 +0200
+++ vhdl/libraries/ieee/math_real.vhdl 2009-04-01 19:35:06.000000000 +0200
@@ -102,16 +102,21 @@
-- returns integer FLOOR(X + 0.5) if X > 0;
-- return integer CEIL(X - 0.5) if X < 0
- -- IAC: we are missing the function TRUNC
- -- IAC: we are missing the function MOD
- -- IAC: functions FMAX and FMIN should be renamed REALMAX and REALMIN
-
- function FMAX (X, Y : real ) return real;
- attribute foreign of fmax : function is "VHPIDIRECT fmax";
+ function TRUNC (X : real ) return real;
+ attribute foreign of trunc : function is "VHPIDIRECT trunc";
+ -- returns integer FLOOR(X) if X > 0;
+ -- return integer CEIL(X) if X < 0
+
+ function "MOD" (X, Y : real ) return real;
+ attribute foreign of "mod" : function is "VHPIDIRECT fmod";
+ -- returns the floating point modulus of X/Y
+
+ function REALMAX (X, Y : real ) return real;
+ attribute foreign of realmax : function is "VHPIDIRECT fmax";
-- returns the algebraically larger of X and Y
- function FMIN (X, Y : real ) return real;
- attribute foreign of fmin : function is "VHPIDIRECT fmin";
+ function REALMIN (X, Y : real ) return real;
+ attribute foreign of realmin : function is "VHPIDIRECT fmin";
-- returns the algebraically smaller of X and Y
procedure UNIFORM (variable Seed1,Seed2:inout integer; variable X:out real);
@@ -203,25 +208,17 @@
-- returns tan X; X in radians
-- X /= ((2k+1) * PI/2), where k is an integer
- -- IAC: function should be called ARCSIN
-
- function ASIN (X : real ) return real;
+ function ARCSIN (X : real ) return real;
-- returns -PI/2 < asin X < PI/2; | X | <= 1
- -- IAC: function should be called ARCCOS
-
- function ACOS (X : real ) return real;
+ function ARCCOS (X : real ) return real;
-- returns 0 < acos X < PI; | X | <= 1
-
- -- IAC: function should be called ARCTAN
-
- function ATAN (X : real) return real;
- attribute foreign of atan : function is "VHPIDIRECT atan";
+ function ARCTAN (X : real) return real;
+ attribute foreign of arctan : function is "VHPIDIRECT atan";
-- returns -PI/2 < atan X < PI/2
- -- IAC: function ATAN2 should not exist
- function ATAN2 (X : real; Y : real) return real;
+ function ARCTAN (X : real; Y : real) return real;
-- returns atan (X/Y); -PI < atan2(X,Y) < PI; Y /= 0.0
function SINH (X : real) return real;
@@ -236,20 +233,14 @@
attribute foreign of tanh : function is "VHPIDIRECT tanh";
-- hyperbolic tangent; -- returns (e**X - e**(-X))/(e**X + e**(-X))
- -- IAC: function should be called ARCSINH
-
- function ASINH (X : real) return real;
- attribute foreign of asinh : function is "VHPIDIRECT asinh";
+ function ARCSINH (X : real) return real;
+ attribute foreign of arcsinh : function is "VHPIDIRECT asinh";
-- returns ln( X + sqrt( X**2 + 1))
- -- IAC: function should be called ARCCOSH
-
- function ACOSH (X : real) return real;
+ function ARCCOSH (X : real) return real;
-- returns ln( X + sqrt( X**2 - 1)); X >= 1
- -- IAC: function should be called ARCTANH
-
- function ATANH (X : real) return real;
+ function ARCTANH (X : real) return real;
-- returns (ln( (1 + X)/(1 - X)))/2 ; | X | < 1
end MATH_REAL;
--- vhdl/libraries/ieee/math_real-body.vhdl.orig 2009-04-01 19:22:04.000000000 +0200
+++ vhdl/libraries/ieee/math_real-body.vhdl 2009-04-01 19:34:18.000000000 +0200
@@ -72,16 +72,41 @@
begin
assert false severity failure;
end ROUND;
-
- function FMAX (X, Y : real ) return real is
+
+ function TRUNC (X : real ) return real is
begin
assert false severity failure;
- end FMAX;
+ end TRUNC;
+
+ function c_mod (x : real; y : real) return real;
+ attribute foreign of c_mod : function is "VHPIDIRECT fmod";
- function FMIN (X, Y : real ) return real is
+ function c_mod (x : real; y: real) return real is
begin
assert false severity failure;
- end FMIN;
+ end c_mod;
+
+ function "MOD" (X, Y : real ) return real is
+ begin
+ if y = 0.0 then
+ assert false
+ report "MOD(X, 0.0) is undefined"
+ severity ERROR;
+ return 0.0;
+ else
+ return c_mod(x,y);
+ end if;
+ end "MOD";
+
+ function REALMAX (X, Y : real ) return real is
+ begin
+ assert false severity failure;
+ end REALMAX;
+
+ function REALMIN (X, Y : real ) return real is
+ begin
+ assert false severity failure;
+ end REALMIN;
--
-- Pseudo-random number generators
@@ -297,18 +322,18 @@
assert false severity failure;
end c_asin;
- function ASIN (x : real ) return real is
+ function ARCSIN (x : real ) return real is
-- returns -PI/2 < asin X < PI/2; | X | <= 1
begin
if abs x > 1.0 then
assert false
- report "Out of range parameter passed to ASIN"
+ report "Out of range parameter passed to ARCSIN"
severity ERROR;
return x;
else
return c_asin(x);
end if;
- end ASIN;
+ end ARCSIN;
function c_acos (x : real ) return real;
attribute foreign of c_acos : function is "VHPIDIRECT acos";
@@ -318,24 +343,24 @@
assert false severity failure;
end c_acos;
- function ACOS (x : REAL) return REAL is
+ function ARCCOS (x : REAL) return REAL is
-- returns 0 < acos X < PI; | X | <= 1
begin
if abs x > 1.0 then
assert false
- report "Out of range parameter passed to ACOS"
+ report "Out of range parameter passed to ARCCOS"
severity ERROR;
return x;
else
return c_acos(x);
end if;
- end ACOS;
+ end ARCCOS;
- function ATAN (x : REAL) return REAL is
+ function ARCTAN (x : REAL) return REAL is
-- returns -PI/2 < atan X < PI/2
- begin
+ begin
assert false severity failure;
- end ATAN;
+ end ARCTAN;
function c_atan2 (x : real; y : real) return real;
attribute foreign of c_atan2 : function is "VHPIDIRECT atan2";
@@ -345,7 +370,7 @@
assert false severity failure;
end c_atan2;
- function ATAN2 (x : REAL; y : REAL) return REAL is
+ function ARCTAN (x : REAL; y : REAL) return REAL is
-- returns atan (X/Y); -PI < atan2(X,Y) < PI; Y /= 0.0
begin
if y = 0.0 and x = 0.0 then
@@ -356,7 +381,7 @@
else
return c_atan2(x,y);
end if;
- end ATAN2;
+ end ARCTAN;
function SINH (X : real) return real is
@@ -377,11 +402,11 @@
assert false severity failure;
end TANH;
- function ASINH (X : real) return real is
+ function ARCSINH (X : real) return real is
-- returns ln( X + sqrt( X**2 + 1))
begin
assert false severity failure;
- end ASINH;
+ end ARCSINH;
function c_acosh (x : real ) return real;
attribute foreign of c_acosh : function is "VHPIDIRECT acosh";
@@ -391,16 +416,16 @@
assert false severity failure;
end c_acosh;
- function ACOSH (X : real) return real is
+ function ARCCOSH (X : real) return real is
-- returns ln( X + sqrt( X**2 - 1)); X >= 1
begin
if abs x >= 1.0 then
- assert false report "Out of range parameter passed to ACOSH"
+ assert false report "Out of range parameter passed to ARCCOSH"
severity ERROR;
return x;
end if;
return c_acosh(x);
- end ACOSH;
+ end ARCCOSH;
function c_atanh (x : real ) return real;
attribute foreign of c_atanh : function is "VHPIDIRECT atanh";
@@ -410,15 +435,15 @@
assert false severity failure;
end c_atanh;
- function ATANH (X : real) return real is
+ function ARCTANH (X : real) return real is
-- returns (ln( (1 + X)/(1 - X)))/2 ; | X | < 1
begin
if abs x < 1.0 then
- assert false report "Out of range parameter passed to ATANH"
+ assert false report "Out of range parameter passed to ARCTANH"
severity ERROR;
return x;
end if;
return c_atanh(x);
- end ATANH;
+ end ARCTANH;
end MATH_REAL;
--- vhdl/libraries/ieee/math_complex-body.vhdl.orig 2009-04-02 12:08:47.000000000 +0200
+++ vhdl/libraries/ieee/math_complex-body.vhdl 2009-04-02 12:09:18.000000000 +0200
@@ -119,7 +119,7 @@
function COMPLEX_TO_POLAR(Z: in complex ) return complex_polar is
-- converts complex to complex_polar
begin
- return COMPLEX_POLAR'(sqrt(z.re**2 + z.im**2),atan2(z.re,z.im));
+ return COMPLEX_POLAR'(sqrt(z.re**2 + z.im**2),ARCTAN(z.re,z.im));
end COMPLEX_TO_POLAR;
function POLAR_TO_COMPLEX(Z: in complex_polar ) return complex is
Index: ghdl.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ghdl/devel/ghdl.spec,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- ghdl.spec 15 Mar 2009 19:54:17 -0000 1.46
+++ ghdl.spec 2 Apr 2009 14:00:20 -0000 1.47
@@ -5,7 +5,7 @@
Summary: A VHDL simulator, using the GCC technology
Name: ghdl
Version: %{ghdlver}
-Release: 0.%{ghdlsvnver}svn.4%{?dist}
+Release: 0.%{ghdlsvnver}svn.5%{?dist}
License: GPLv2+
Group: Development/Languages
URL: http://ghdl.free.fr/
@@ -21,6 +21,7 @@
Patch104: ghdl-svn110-libgnat44.patch
Patch105: ghdl-grtadac.patch
Patch106: ghdl-ppc64abort.patch
+Patch107: ieee-mathreal.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
@@ -116,6 +117,7 @@
pushd ghdl-%{ghdlver}
%patch100 -p1
%patch103 -p0 -b .noruntime
+%patch107 -p0 -b .ieeemathreal
%{__mv} vhdl ../gcc/
popd
#patch102 -p1 -b .makeinfo
@@ -303,6 +305,9 @@
%changelog
+* Wed Apr 1 2009 Thomas Sailer <t.sailer at alumni.ethz.ch> - 0.27-0.110svn.5
+- make ieee.math_real more standards compliant
+
* Sun Mar 15 2009 Thomas Sailer <t.sailer at alumni.ethz.ch> - 0.27-0.110svn.4
- gnat version is now 4.4
- Previous message (by thread): rpms/schroedinger/devel .cvsignore, 1.6, 1.7 schroedinger.spec, 1.12, 1.13 sources, 1.6, 1.7
- Next message (by thread): rpms/fedora-ds-base/F-10 fedora-ds-base.spec, 1.28, 1.29 ppc1.patch, 1.1, NONE ppc2.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list