High-Performance Numerical Integration in the Age of C++26>; 15 // Parameters 16 const type h0 = (argc > 1) ? std:: stod(argv [1]) : 0.677; 17 const type hubble_0 = h0 ∗ 100 ∗ 1000 / mpc; 18 const type omega_r0 = (argc > 2) ? std :: stod(argv [2]) : (2.47E−5 type a0 = (argc > 6) ? std :: stod(argv [6]) : (1.); 24 // Computation 25 auto evolution = compute(hubble_0 , omega_r0 , omega_m0 , omega_l0 , omega_k0 , h, a0); 26 // Output 27 std :: cout << std:: abs(evolution What is this program doing? 1 // Computation 2 template3 constexpr auto compute(T hubble_0 , T omega_r0 , T omega_m0 , T omega_l0 , T omega_k0 , T h, T a0) { 4 // Variables 5 T t = 0; 0 码力 | 57 页 | 4.14 MB | 6 月前3
共 1 条
- 1













