summaryrefslogtreecommitdiff
path: root/tests/core/test_zerodiv.in
blob: 2143077247aa8c99cb85ba91e5aac2c085a2031b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <stdio.h>
int main(int argc, const char* argv[]) {
  float f1 = 1.0f;
  float f2 = 0.0f;
  float f_zero = 0.0f;

  float f3 = 0.0f / f2;
  float f4 = f2 / 0.0f;
  float f5 = f2 / f2;
  float f6 = f2 / f_zero;

  printf("f3: %f\n", f3);
  printf("f4: %f\n", f4);
  printf("f5: %f\n", f5);
  printf("f6: %f\n", f6);

  return 0;
}