[ create a new paste ] login | about

Link: http://codepad.org/kSithgZQ    [ raw code | output | fork ]

C, pasted on Feb 25:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stdio.h>
#include <stdlib.h>

int main()
{
  union {
    double d;
    unsigned long long ull;
  } u;

  u.ull = 0x3fd5555555555555L;
  printf("%.55f\n", u.d);

  return EXIT_SUCCESS;
}


Output:
1
0.3333333333333333148296162562473909929394721984863281250


Create a new paste based on this one


Comments: