File: test_frexp_modf.cl

package info (click to toggle)
pocl 0.13-8
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 18,452 kB
  • ctags: 13,529
  • sloc: lisp: 113,221; cpp: 57,376; ansic: 25,021; sh: 6,150; makefile: 2,067; python: 699; pascal: 98; java: 72; xml: 49
file content (10 lines) | stat: -rw-r--r-- 261 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
kernel
void test_frexp_modf() {
    volatile float a = 8e2f, b = 1.5f, frac, frac2;
    int exp;
    frac = frexp(a, &exp);
    float x;
    frac2 = modf(b, &x);
    printf("frexp(8e2f): %.1f %d\n", frac, exp);
    printf("modf(1.5f): %.1f %1f\n", frac2, x);
}