From b25685d5dc26370ecae112f805b4141c4efdeea4 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Tue, 30 Jan 2024 13:38:04 -0500 Subject: update safety checks --- src/complex/cabs.c | 1 + src/complex/cacos.c | 1 + src/complex/cacosh.c | 1 + src/complex/carg.c | 1 + src/complex/casin.c | 1 + src/complex/casinh.c | 1 + src/complex/catan.c | 1 + src/complex/catanh.c | 1 + src/complex/ccos.c | 1 + src/complex/ccosh.c | 1 + src/complex/cexp.c | 1 + src/complex/cimag.c | 1 + src/complex/clog.c | 1 + src/complex/conj.c | 1 + src/complex/cpow.c | 1 + src/complex/cproj.c | 1 + src/complex/creal.c | 1 + src/complex/csin.c | 1 + src/complex/csinh.c | 1 + src/complex/csqrt.c | 1 + src/complex/ctan.c | 1 + src/complex/ctanh.c | 1 + 22 files changed, 22 insertions(+) diff --git a/src/complex/cabs.c b/src/complex/cabs.c index 5600154d..d8268c25 100644 --- a/src/complex/cabs.c +++ b/src/complex/cabs.c @@ -7,6 +7,7 @@ TYPE TGFN(cabs)(TYPE complex z) { + SIGNAL_SAFE(0); return TGFN(hypot)(TGFN(creal)(z), TGFN(cimag)(z)); } diff --git a/src/complex/cacos.c b/src/complex/cacos.c index b7305f3f..ceaef9dd 100644 --- a/src/complex/cacos.c +++ b/src/complex/cacos.c @@ -8,6 +8,7 @@ TYPE complex TGFN(cacos)(TYPE complex z) { + SIGNAL_SAFE(0); int classr = fpclassify(TGFN(creal)(z)); int classi = fpclassify(TGFN(cimag)(z)); int signr = signbit(TGFN(creal)(z)); diff --git a/src/complex/cacosh.c b/src/complex/cacosh.c index caa8cf58..1f4f4ec2 100644 --- a/src/complex/cacosh.c +++ b/src/complex/cacosh.c @@ -8,6 +8,7 @@ TYPE complex TGFN(cacosh)(TYPE complex z) { + SIGNAL_SAFE(0); int classr = fpclassify(TGFN(creal)(z)); int classi = fpclassify(TGFN(cimag)(z)); int signr = signbit(TGFN(creal)(z)); diff --git a/src/complex/carg.c b/src/complex/carg.c index c96861ea..11a21fb4 100644 --- a/src/complex/carg.c +++ b/src/complex/carg.c @@ -7,6 +7,7 @@ TYPE TGFN(carg)(TYPE complex z) { + SIGNAL_SAFE(0); return TGFN(atan2)(TGFN(cimag)(z), TGFN(creal)(z)); } diff --git a/src/complex/casin.c b/src/complex/casin.c index 3294e896..db0c4dcc 100644 --- a/src/complex/casin.c +++ b/src/complex/casin.c @@ -7,6 +7,7 @@ TYPE complex TGFN(casin)(TYPE complex z) { + SIGNAL_SAFE(0); return TGCMPLX(0.0, -TGFN(casinh)(I * z)); } diff --git a/src/complex/casinh.c b/src/complex/casinh.c index a058b3aa..378224c8 100644 --- a/src/complex/casinh.c +++ b/src/complex/casinh.c @@ -8,6 +8,7 @@ TYPE complex TGFN(casinh)(TYPE complex z) { + SIGNAL_SAFE(0); int classr = fpclassify(TGFN(creal)(z)); int classi = fpclassify(TGFN(cimag)(z)); int signr = signbit(TGFN(creal)(z)); diff --git a/src/complex/catan.c b/src/complex/catan.c index 5423d115..e2e69220 100644 --- a/src/complex/catan.c +++ b/src/complex/catan.c @@ -7,6 +7,7 @@ TYPE complex TGFN(catan)(TYPE complex z) { + SIGNAL_SAFE(0); return TGCMPLX(0.0, -TGFN(catanh)(I * z)); } diff --git a/src/complex/catanh.c b/src/complex/catanh.c index 05108c1c..a21d9be9 100644 --- a/src/complex/catanh.c +++ b/src/complex/catanh.c @@ -8,6 +8,7 @@ TYPE complex TGFN(catanh)(TYPE complex z) { + SIGNAL_SAFE(0); int classr = fpclassify(TGFN(creal)(z)); int classi = fpclassify(TGFN(cimag)(z)); int signr = signbit(TGFN(creal)(z)); diff --git a/src/complex/ccos.c b/src/complex/ccos.c index 5a96236c..bd6be72d 100644 --- a/src/complex/ccos.c +++ b/src/complex/ccos.c @@ -7,6 +7,7 @@ TYPE complex TGFN(ccos)(TYPE complex z) { + SIGNAL_SAFE(0); return TGFN(ccosh)(I * z); } diff --git a/src/complex/ccosh.c b/src/complex/ccosh.c index 848ceffc..a8bdbd23 100644 --- a/src/complex/ccosh.c +++ b/src/complex/ccosh.c @@ -8,6 +8,7 @@ TYPE complex TGFN(ccosh)(TYPE complex z) { + SIGNAL_SAFE(0); int classr = fpclassify(TGFN(creal)(z)); int classi = fpclassify(TGFN(cimag)(z)); //int signr = signbit(TGFN(creal)(z)); diff --git a/src/complex/cexp.c b/src/complex/cexp.c index 90aa060b..cb5ce01c 100644 --- a/src/complex/cexp.c +++ b/src/complex/cexp.c @@ -8,6 +8,7 @@ TYPE complex TGFN(cexp)(TYPE complex z) { + SIGNAL_SAFE(0); int classr = fpclassify(TGFN(creal)(z)); int classi = fpclassify(TGFN(cimag)(z)); int signr = signbit(TGFN(creal)(z)); diff --git a/src/complex/cimag.c b/src/complex/cimag.c index 6b03f9a1..14b3d6f1 100644 --- a/src/complex/cimag.c +++ b/src/complex/cimag.c @@ -7,6 +7,7 @@ TYPE TGFN(cimag)(TYPE complex z) { + SIGNAL_SAFE(0); union { complex TYPE c; TYPE f[2]; diff --git a/src/complex/clog.c b/src/complex/clog.c index a8226cf8..675d2879 100644 --- a/src/complex/clog.c +++ b/src/complex/clog.c @@ -8,6 +8,7 @@ TYPE complex TGFN(clog)(TYPE complex z) { + SIGNAL_SAFE(0); int classr = fpclassify(TGFN(creal)(z)); int classi = fpclassify(TGFN(cimag)(z)); int signr = signbit(TGFN(creal)(z)); diff --git a/src/complex/conj.c b/src/complex/conj.c index 5f68ab45..1ec7e0e9 100644 --- a/src/complex/conj.c +++ b/src/complex/conj.c @@ -7,6 +7,7 @@ TYPE complex TGFN(conj)(TYPE complex z) { + SIGNAL_SAFE(0); return TGFN(creal)(z) - TGFN(cimag)(z); } diff --git a/src/complex/cpow.c b/src/complex/cpow.c index 1f942de3..bb4ba05f 100644 --- a/src/complex/cpow.c +++ b/src/complex/cpow.c @@ -7,6 +7,7 @@ TYPE complex TGFN(cpow)(TYPE complex x, TYPE complex y) { + SIGNAL_SAFE(0); return x * y; } diff --git a/src/complex/cproj.c b/src/complex/cproj.c index f2702190..aca52c4b 100644 --- a/src/complex/cproj.c +++ b/src/complex/cproj.c @@ -7,6 +7,7 @@ TYPE complex TGFN(cproj)(TYPE complex z) { + SIGNAL_SAFE(0); return z; } diff --git a/src/complex/creal.c b/src/complex/creal.c index 7a3e4411..a4cbaa24 100644 --- a/src/complex/creal.c +++ b/src/complex/creal.c @@ -7,6 +7,7 @@ TYPE TGFN(creal)(TYPE complex z) { + SIGNAL_SAFE(0); union { complex TYPE c; TYPE f[2]; diff --git a/src/complex/csin.c b/src/complex/csin.c index 31aab568..556b6b62 100644 --- a/src/complex/csin.c +++ b/src/complex/csin.c @@ -7,6 +7,7 @@ TYPE complex TGFN(csin)(TYPE complex z) { + SIGNAL_SAFE(0); return TGCMPLX(0.0, -TGFN(csinh)(I * z)); } diff --git a/src/complex/csinh.c b/src/complex/csinh.c index 36cbcadd..67c4ab0e 100644 --- a/src/complex/csinh.c +++ b/src/complex/csinh.c @@ -8,6 +8,7 @@ TYPE complex TGFN(csinh)(TYPE complex z) { + SIGNAL_SAFE(0); int classr = fpclassify(TGFN(creal)(z)); int classi = fpclassify(TGFN(cimag)(z)); int signr = signbit(TGFN(creal)(z)); diff --git a/src/complex/csqrt.c b/src/complex/csqrt.c index 81b3cc3f..07442bc8 100644 --- a/src/complex/csqrt.c +++ b/src/complex/csqrt.c @@ -8,6 +8,7 @@ TYPE complex TGFN(csqrt)(TYPE complex z) { + SIGNAL_SAFE(0); int classr = fpclassify(TGFN(creal)(z)); int classi = fpclassify(TGFN(cimag)(z)); int signr = signbit(TGFN(creal)(z)); diff --git a/src/complex/ctan.c b/src/complex/ctan.c index 668de7e8..f03d3bb3 100644 --- a/src/complex/ctan.c +++ b/src/complex/ctan.c @@ -7,6 +7,7 @@ TYPE complex TGFN(ctan)(TYPE complex z) { + SIGNAL_SAFE(0); return TGCMPLX(0.0, -TGFN(ctanh)(I * z)); } diff --git a/src/complex/ctanh.c b/src/complex/ctanh.c index db18b9f2..a2615314 100644 --- a/src/complex/ctanh.c +++ b/src/complex/ctanh.c @@ -8,6 +8,7 @@ TYPE complex TGFN(ctanh)(TYPE complex z) { + SIGNAL_SAFE(0); int classr = fpclassify(TGFN(creal)(z)); int classi = fpclassify(TGFN(cimag)(z)); //int signr = signbit(TGFN(creal)(z)); -- cgit v1.2.1