File: log_vs_natural.cpp

package info (click to toggle)
isospec 2.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,476 kB
  • sloc: cpp: 9,530; python: 2,095; makefile: 180; ansic: 100; sh: 88
file content (23 lines) | stat: -rw-r--r-- 445 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <cstddef>
#include <cmath>
#include <iostream>

//extern double a, b, c, d, e, f;
int main()
{
    double a = 1.3;
    double b = 1.2;
    double c = 3.4;
    double d = 2.3;
    double e = 0.1;
    double f = 2.3;

    for(size_t ii = 0; ii < 1000000000; ii++)
    {
        double res = exp(a);//+b+c+d+e);
        //double res = a+b+c+d+e;
        //double res = a*b*c*d*e;
        f += res;
    }
    std::cout << f << std::endl;
}