bug-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #65912] GSL_SET_COMPLEX is wrong if complex.h has no support for im


From: Sergey B Kirpichev
Subject: [bug #65912] GSL_SET_COMPLEX is wrong if complex.h has no support for imaginary numbers
Date: Sun, 23 Jun 2024 14:27:29 -0400 (EDT)

--8323329-1368453440-1719167249=:358311
Content-Type: TEXT/plain; CHARSET=utf-8
Content-Transfer-Encoding: QUOTED-PRINTABLE
Content-Disposition: inline

URL:=0A  <https://savannah.gnu.org/bugs/?65912>=0A=0A                 Summa=
ry: GSL_SET_COMPLEX is wrong if complex.h has no support=0Afor imaginary nu=
mbers=0A                   Group: GNU Scientific Library=0A               S=
ubmitter: skirpichev=0A               Submitted: Sun 23 Jun 2024 06:27:29 P=
M UTC=0A                Category: None=0A                Severity: 3 - Norm=
al=0A        Operating System: =0A                  Status: None=0A        =
     Assigned to: None=0A             Open/Closed: Open=0A                 =
Release: =0A         Discussion Lock: Any=0A=0A=0A    _____________________=
__________________________________=0A=0AFollow-up Comments:=0A=0A=0A-------=
------------------------------------------------=0ADate: Sun 23 Jun 2024 06=
:27:29 PM UTC By: Sergey B Kirpichev <skirpichev>=0AConsider following code=
:=0A----->8----=0A/* a.c */=0A#include <complex.h>=0A#include <stdio.h>=0A#=
include <gsl/gsl_complex.h>=0Aint main(void)=0A{=0A    gsl_complex z;=0A   =
 GSL_SET_COMPLEX(&z, -0.0, 0.0);=0A    printf("(%lf%+lf)\n", GSL_REAL(z), G=
SL_IMAG(z));=0A    return 0;=0A}=0A--->8------=0A=0A$ gcc a.c -std=3Dc11 -l=
gsl && ./a.out  # expected (-0.000000+0.000000)=0A(0.000000+0.000000)=0A=0A=
(GSL compiled by: CC=3D"gcc -std=3Dc11" ./configure -q && make -s)=0A=0ASim=
ilar wrong results could be reproduced for other special components,=0Ai.e.=
 NAN's or INFINITY's.  Issue should be fixed by using macro CMPLX,=0Aavaila=
ble in C11+.=0A=0APatch attached.=0A=0A=0A=0A=0A=0A=0A    _________________=
______________________________________=0AFile Attachments:=0A=0A=0A--------=
-----------------------------------------------=0AName: CMPLX.diff  Size: 6=
16B=0A<https://file.savannah.gnu.org/file/CMPLX.diff?file_id=3D56195>=0A=0A=
    AGPL NOTICE=0A=0AThese attachments are served by Savane. You can downlo=
ad the corresponding=0Asource code of Savane at=0Ahttps://git.savannah.nong=
nu.org/cgit/administration/savane.git/snapshot/savane-599caaa619bc406c0106a=
0ea59bc6c26b1a86bf0.tar.gz=0A=0A    _______________________________________=
________________=0A=0AReply to this item at:=0A=0A  <https://savannah.gnu.o=
rg/bugs/?65912>=0A=0A_______________________________________________=0AMess=
age sent via Savannah=0Ahttps://savannah.gnu.org/=0A
--8323329-1368453440-1719167249=:358311
Content-Type: APPLICATION/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCZnhpEQAKCRCqLAuaBUf3
Tqs4AP9YORBck5HIgRjkCBa86Xm5Ho6fQr7ACzroQO4cpO6RXgEA8hVg9ARiUZ/F
xQGu0ivGzVz1HUGVcyp+iGU9zO+31Qo=
=H1+N
-----END PGP SIGNATURE-----

--8323329-1368453440-1719167249=:358311--




reply via email to

[Prev in Thread] Current Thread [Next in Thread]