changeset 1237:23b89cbbe105

[Issue 575] New: wrong evaluation of (creal * 2 + 1i) Thomas K?hne <thomas-doop@kuehne.cn> 2006-11-19 news:bug-575-31@http.d.puremagic.com/issues/
author thomask
date Sat, 25 Nov 2006 17:52:58 +0000
parents f41655c00b51
children 672b0632b05c
files compile/c/cdouble_11_C.d compile/c/cfloat_11_C.d compile/c/creal_36_C.d run/c/cdouble_11_A.d run/c/cdouble_11_B.d run/c/cfloat_11_A.d run/c/cfloat_11_B.d run/c/creal_36_A.d run/c/creal_36_B.d
diffstat 9 files changed, 171 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compile/c/cdouble_11_C.d	Sat Nov 25 17:52:58 2006 +0000
@@ -0,0 +1,17 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Thomas Kühne <thomas-doop@kuehne.cn>
+// @date@	2006-11-19
+// @uri@	news:bug-575-31@http.d.puremagic.com/issues/
+// @desc@	[Issue 575] New: wrong evaluation of (creal * 2 + 1i)
+
+module dstress.compile.c.cdouble_11_C;
+
+template foo(cdouble a){
+	const cdouble foo = a * 2.0 + 1.0i;
+}
+
+static assert(foo!(1.0 + 2.0i) == 2.0 + 5.0i);
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compile/c/cfloat_11_C.d	Sat Nov 25 17:52:58 2006 +0000
@@ -0,0 +1,17 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Thomas Kühne <thomas-doop@kuehne.cn>
+// @date@	2006-11-19
+// @uri@	news:bug-575-31@http.d.puremagic.com/issues/
+// @desc@	[Issue 575] New: wrong evaluation of (creal * 2 + 1i)
+
+module dstress.compile.c.cfloat_11_C;
+
+template foo(cfloat a){
+	const cfloat foo = a * 2.0f + 1.0fi;
+}
+
+static assert(foo!(1.0f + 2.0fi) == 2.0f + 5.0fi);
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compile/c/creal_36_C.d	Sat Nov 25 17:52:58 2006 +0000
@@ -0,0 +1,17 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Thomas Kühne <thomas-doop@kuehne.cn>
+// @date@	2006-11-19
+// @uri@	news:bug-575-31@http.d.puremagic.com/issues/
+// @desc@	[Issue 575] New: wrong evaluation of (creal * 2 + 1i)
+
+module dstress.compile.c.creal_36_C;
+
+template foo(creal a){
+	const creal foo = a * 2.0L + 1.0Li;
+}
+
+static assert(foo!(1.0L + 2.0Li) == 2.0L + 5.0Li);
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/c/cdouble_11_A.d	Sat Nov 25 17:52:58 2006 +0000
@@ -0,0 +1,22 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Thomas Kühne <thomas-doop@kuehne.cn>
+// @date@	2006-11-19
+// @uri@	news:bug-575-31@http.d.puremagic.com/issues/
+// @desc@	[Issue 575] New: wrong evaluation of (creal * 2 + 1i)
+
+module dstress.run.c.cdouble_11_A;
+
+cdouble foo(cdouble a){
+	return a * 2.0 + 1.0i;
+}
+
+int main(){
+	if(foo(1.0 + 2.0i) != 2.0 + 5.0i){
+		assert(0);
+	}
+	return 0;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/c/cdouble_11_B.d	Sat Nov 25 17:52:58 2006 +0000
@@ -0,0 +1,18 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Thomas Kühne <thomas-doop@kuehne.cn>
+// @date@	2006-11-19
+// @uri@	news:bug-575-31@http.d.puremagic.com/issues/
+// @desc@	[Issue 575] New: wrong evaluation of (creal * 2 + 1i)
+
+module dstress.run.c.cdouble_11_B;
+
+int main(){
+	if(1.0 + 2.0i) * 2.0 + 1.0i != 2.0 + 5.0i){
+		assert(0);
+	}
+	return 0;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/c/cfloat_11_A.d	Sat Nov 25 17:52:58 2006 +0000
@@ -0,0 +1,22 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Thomas Kühne <thomas-doop@kuehne.cn>
+// @date@	2006-11-19
+// @uri@	news:bug-575-31@http.d.puremagic.com/issues/
+// @desc@	[Issue 575] New: wrong evaluation of (creal * 2 + 1i)
+
+module dstress.run.c.cfloat_11_A;
+
+cfloat foo(cfloat a){
+	return a * 2.0f + 1.0fi;
+}
+
+int main(){
+	if(foo(1.0f + 2.0fi) != 2.0f + 5.0fi){
+		assert(0);
+	}
+	return 0;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/c/cfloat_11_B.d	Sat Nov 25 17:52:58 2006 +0000
@@ -0,0 +1,18 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Thomas Kühne <thomas-doop@kuehne.cn>
+// @date@	2006-11-19
+// @uri@	news:bug-575-31@http.d.puremagic.com/issues/
+// @desc@	[Issue 575] New: wrong evaluation of (creal * 2 + 1i)
+
+module dstress.run.c.cfloat_11_B;
+
+int main(){
+	if((1.0f + 2.0fi) * 2.0f + 1.0fi != 2.0f + 5.0fi){
+		assert(0);
+	}
+	return 0;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/c/creal_36_A.d	Sat Nov 25 17:52:58 2006 +0000
@@ -0,0 +1,22 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Thomas Kühne <thomas-doop@kuehne.cn>
+// @date@	2006-11-19
+// @uri@	news:bug-575-31@http.d.puremagic.com/issues/
+// @desc@	[Issue 575] New: wrong evaluation of (creal * 2 + 1i)
+
+module dstress.run.c.creal_36_A;
+
+creal foo(creal a){
+	return a * 2.0L + 1.0Li;
+}
+
+int main(){
+	if(foo(1.0L + 2.0Li) != 2.0L + 5.0Li){
+		assert(0);
+	}
+	return 0;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/c/creal_36_B.d	Sat Nov 25 17:52:58 2006 +0000
@@ -0,0 +1,18 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Thomas Kühne <thomas-doop@kuehne.cn>
+// @date@	2006-11-19
+// @uri@	news:bug-575-31@http.d.puremagic.com/issues/
+// @desc@	[Issue 575] New: wrong evaluation of (creal * 2 + 1i)
+
+module dstress.run.c.creal_36_B;
+
+int main(){
+	if(1.0L + 2.0Li) * 2.0L + 1.0Li != 2.0L + 5.0Li){
+		assert(0);
+	}
+	return 0;
+}
+