[ create a new paste ] login | about

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

C++, pasted on Aug 11:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <iostream>
#include <cmath>

int
main()
{
  using std::cout;
  using std::endl;

  const long double be2 = std::log(2);
  cout << std::log(8.0) / be2 << ", " << std::floor(std::log(8.0) / be2)
       << endl;
  cout << std::log(8.0L) / be2 << ", " << std::floor(std::log(8.0L) / be2)
       << endl;

  return 0;
}


Output:
1
2
3, 2
3, 3


Create a new paste based on this one


Comments: