# HG changeset patch # User thomask # Date 1164477178 0 # Node ID 23b89cbbe1055b261e143f696c72beebd361e975 # Parent f41655c00b5198cbdfaa7375410733ca1a3457bb [Issue 575] New: wrong evaluation of (creal * 2 + 1i) Thomas K?hne 2006-11-19 news:bug-575-31@http.d.puremagic.com/issues/ diff -r f41655c00b51 -r 23b89cbbe105 compile/c/cdouble_11_C.d --- /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 +// @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); + diff -r f41655c00b51 -r 23b89cbbe105 compile/c/cfloat_11_C.d --- /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 +// @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); + diff -r f41655c00b51 -r 23b89cbbe105 compile/c/creal_36_C.d --- /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 +// @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); + diff -r f41655c00b51 -r 23b89cbbe105 run/c/cdouble_11_A.d --- /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 +// @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; +} + diff -r f41655c00b51 -r 23b89cbbe105 run/c/cdouble_11_B.d --- /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 +// @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; +} + diff -r f41655c00b51 -r 23b89cbbe105 run/c/cfloat_11_A.d --- /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 +// @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; +} + diff -r f41655c00b51 -r 23b89cbbe105 run/c/cfloat_11_B.d --- /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 +// @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; +} + diff -r f41655c00b51 -r 23b89cbbe105 run/c/creal_36_A.d --- /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 +// @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; +} + diff -r f41655c00b51 -r 23b89cbbe105 run/c/creal_36_B.d --- /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 +// @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; +} +