t2sde/tests/312-c-fedisableexcept.c
René Rebe d050a0fa35 * add new c fpexcept test
git-svn-id: https://svn.exactcode.de/t2/trunk@74308 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc
2025-02-21 10:53:25 +00:00

12 lines
259 B
C

#define _GNU_SOURCE
#include <fenv.h>
#include <stdio.h>
int main(void) {
fedisableexcept(FE_INVALID | FE_DIVBYZERO /*| FE_OVERFLOW | FE_UNDERFLOW*/);
float a = 1., b = 0.;
float c = a/b;
printf("Exiting normally.\n");
return (int)c;
}