Merge tag 'qemu-macppc-20230206' of https://github.com/mcayland/qemu into staging
[qemu.git] / tests / tcg / s390x / long-double.c
blob757a6262fd942786953dba62450cb214752a4550
1 /*
2 * Perform some basic arithmetic with long double, as a sanity check.
3 * With small integral numbers, we can cross-check with integers.
4 */
6 #include <assert.h>
8 int main()
10 int i, j;
12 for (i = 1; i < 5; i++) {
13 for (j = 1; j < 5; j++) {
14 long double la = (long double)i + j;
15 long double lm = (long double)i * j;
16 long double ls = (long double)i - j;
18 assert(la == i + j);
19 assert(lm == i * j);
20 assert(ls == i - j);
23 return 0;