|
CLASSpp Manual
Cosmology reference and developer manual
|
#include <precision.h>
Public Member Functions | |
| ErkControllerConfig | erk_controller_config () const |
- general precision parameters | |
| double | smallest_allowed_variation |
| void | ResolveDataPaths () |
| void | parse (const FileContent &fc) |
All precision parameters.
Includes integrations steps, flags telling how the computation is to be performed, etc.
|
inline |
The controller settings as the evolver wants them. Built here so the three callers do not each repeat the mapping.
| void precision::ResolveDataPaths | ( | ) |
| void precision::parse | ( | const FileContent & | fc | ) |
Parse precision parameters from a configuration file.
| double precision::a_ini_over_a_today_default = 1.e-14 |
Default initial value of scale factor used in the integration of background quantities. For models like ncdm, the code may decide to start the integration earlier.
| double precision::back_integration_stepsize = 7.e-3 |
Default stepsize in conformal time for the background integration, in units for the conformal Hubble time. dtau = back_integration_stepsize/aH
This is NOT the integrator's step: background_solve_evolver drives the ODE to tol_background_integration and has dense output, so this knob only sets how densely the solution is SAMPLED into the stored table (background_module.cpp computes bt_size_ = |ln a_ini| / back_integration_stepsize) and therefore how accurately every later consumer can interpolate it. Its cost is dense-output reconstruction plus the spline over bt_size_ rows, not integration work, which is why loosening it buys much less than the row count suggests.
#397 moved it 7e-3 -> 0.07 as part of the precision campaign; it is back at 7e-3 here, because the 10x coarser table was not paying for itself. Measured, one thread, lensed LCDM + mPk with one massive neutrino, five interleaved pairs: 1.089 s at 7e-3 against 1.086 s at 0.07, i.e. 0.3% and inside the run-to-run spread. The bound is structural rather than lucky – background and thermodynamics together are 0.03 s of that 1.09 s (0.02 s at 0.07), so no setting of this knob can be worth more than ~1% of a CMB run. It goes the right way on accuracy at that price: 1.3e-4 on TT, 1.0e-3 on EE, 2.4e-4 on P(k), with 7e-3 the finer of the two.
What the coarser table did cost is paid by every consumer that interpolates the background in ln a and inherits this spacing without being in a position to notice it. DNCDM's reduced collision table was one: at 0.07 every Galerkin run in the hpc_prod campaign diverged. That species now owns its own spacing (dncdm<i>.dr_table_max_dlna, PR #413), but it was not the only such consumer, merely the one that failed loudly.
| double precision::tol_background_integration = 1e-7 |
Tolerance of the background integration, giving the allowed relative integration error. Passed to the evolver in background_solve_evolver(). The default is 1e-6 (not the historical 1e-2): the removed legacy RK solver had no dense output, so the requested output points capped the step size and the step count acted as the effective precision knob; the evolver instead relies on this tolerance directly, so it must be tight.
| double precision::tol_shooting_deltax = 1e-4 |
Shooting (InputModule::DoShooting) stops once the summed |Newton step| in the unknowns falls below this. Each unknown is measured in units of its own seed's magnitude, so this is relative. class_public's name and default.
| double precision::tol_shooting_deltaF = 1e-6 |
Shooting stops once the summed |residual| falls below this. Every residual is in the units the data see it in: Omega (fractions of the critical density) for densities and budget closures, and 100*theta_s itself. class_public's name and default.
| double precision::tol_initial_Omega_r = 1.e-4 |
Tolerance of the deviation of 
| double precision::tol_M_ncdm = 1.e-7 |
Tolerance of relative deviation of the used non-cold dark matter mass compared to that which would give the correct density. The dark matter mass is estimated from the dark matter density using a Newton-Method. In the nonrelativistic limit, this could be estimated using M=density/number density
| double precision::tol_ncdm_synchronous = 0.0034 |
Tolerance on the relative precision of the integration over non-cold dark matter phase-space distributions in the synchronous gauge. The convenience input key "tol_ncdm" sets both this and tol_ncdm_newtonian. 0.0034 again since 2026-10-09: with 0.03 (2026-08-21 to 2026-10-09), together with l_max_ncdm and ncdm_fluid_trigger_tau_over_tau_k, P(k) with massive neutrinos was 3.8e-3 low at k = 5/Mpc (see docs/superpowers/specs/2026-10-09-ncdm-precision-defaults-design.md).
| double precision::tol_ncdm_newtonian = 9.05e-5 |
Tolerance on the relative precision of the integration over non-cold dark matter phase-space distributions in the newtonian gauge. Newtonian gauge needs a finer ncdm momentum grid than synchronous for the same P(k) accuracy, hence the tighter default.
| double precision::tol_ncdm_bg = 1.e-5 |
Tolerance on the relative precision of the integration over non-cold dark matter phase-space distributions during the background evolution.
| double precision::tol_ncdm_initial_w = 1.e-3 |
Tolerance on the initial deviation of non-cold dark matter from being fully relativistic. Using w = pressure/density, this quantifies the maximum deviation from 1/3. (for relativistic species)
| int precision::ncdm_driver_normalisation = 1 |
1: scale the metric drivers of the ncdm hierarchy (the dlnf0/dlnq terms) so that their momentum sum equals the rho+p of the background grid, which is what the Einstein equations see; 0: leave them to the quadrature. The quadrature misses that sum by 2e-3 on the default synchronous grid and 2e-5 on the Newtonian one, so the species does not conserve energy and momentum. That cost 2.9e-3 in TT at l < 20 for m = 1 eV, and in Newtonian gauge, where the comoving density cancels to (k/aH)^2, 1.2% in P(k) at k = 1e-5 h/Mpc (#497). ncdm_decay_dr is normalised too, on its single grid: the spline derivative of its ln f misses the sum by enough on 16 trapezoid bins that the gauges differed by 5% in TT (1.7e-3 now), and synchronous TT at l < 20 of a Gamma = 1e5, 0.3 eV parent was 1.2e-3 off a 32-bin Laguerre grid (8e-6 now); 1.7% slower on one thread. 0 until 2026-11-05.
| double precision::tol_tau_eq = 1.e-6 |
Tolerance on the deviation of the conformal time of equality from the true value in 1/Mpc.
| double precision::Omega0_cdm_min_synchronous = 1.e-10 |
Minimum amount of cdm to allow calculations in synchronous gauge comoving with cdm.
| std::string precision::sBBN_file = "/bbn/sBBN_2017.dat" |
Big Bang Nucleosynthesis file path. The file specifies the predictions for 


| std::string precision::bbn_rates_file = "/bbn/rates_reaclib.dat" |
Forward nuclear reaction rates for the solved BBN network, used when YHe = network instead of the interpolation table above. JINA REACLIB seven-parameter form; see tools/bbn_rates.h. Reverse rates are derived by detailed balance and are deliberately not expressible in this file.
| double precision::tol_bbn_integration = 1.e-8 |
Relative tolerance for the BBN network integration.
| double precision::bbn_T9_initial = 100. |
Temperature in 10^9 K at which the BBN network starts.
Must be well above weak freeze-out (T9 ~ 10) so that the initial n/p ratio really is the equilibrium one; the abundances are insensitive to it above that (measured: Y_p moves by 1e-6 between T9 = 100 and T9 = 1000).
| double precision::bbn_T9_final = 0.01 |
Temperature in 10^9 K at which the BBN network stops.
| std::string precision::bbn_history_file |
If non-empty, the solved BBN run writes its abundance history here, one row per sampled temperature. Diagnostic only; empty means no file.
| double precision::recfast_z_initial = 20000. |
The initial z for the recfast calculation of the recombination history, e.g. 10^4
| int precision::recfast_Nz0 = 20000 |
Number of recfast integration steps, e.g. if this is 1.10^4 and the previous one is 10^4, the step will be Delta z = 0.5
| double precision::thermo_z_initial_idm_dr = 1.0e9 |
If there is interacting DM, we want the thermodynamics table to start at a much larger z, in order to capture the possible non-trivial behavior of the dark matter interaction rate at early times:
| double precision::tol_thermo_integration = 1.0e-7 |
Tolerance for thermodynamical integration. RECFAST now uses the shared evolver interface with dense output, so this is a true ODE tolerance rather than a legacy per-redshift-bin RK correction tolerance.
| int precision::recfast_Heswitch |
from recfast 1.4, specifies how accurate the Helium recombination should be handled
| double precision::recfast_fudge_He |
fudge factor for Peeble's equation coefficient of Helium: CAMB 2's CosmoRec refit (recfast 1.4: 0.86, see recfast_calibration)
| int precision::recfast_Hswitch |
from recfast 1.5, specifies how accurate the Hydrogen recombination should be handled
| double precision::recfast_fudge_H |
from recfast 1.4, fudge factor for Peeble's equation coeffient of Hydrogen
| double precision::recfast_delta_fudge_H |
from recfast 1.5.2, increasing Hydrogen fudge factor if Hswitch is enabled
| double precision::recfast_AGauss1 = -0.1395272483 |
Gaussian Peeble prefactor fit, amplitude
| double precision::recfast_AGauss2 = 0.0729891952 |
Gaussian Peeble prefactor fit, amplitude
| double precision::recfast_zGauss1 = 7.2813061282 |
Gaussian Peeble prefactor fit, center
| double precision::recfast_zGauss2 = 6.7667038679 |
Gaussian Peeble prefactor fit, center
| double precision::recfast_wGauss1 = 0.1638966410 |
Gaussian Peeble prefactor fit, width
| double precision::recfast_wGauss2 = 0.2785834127 |
Gaussian Peeble prefactor fit, width
| bool precision::recfast_He_rate_correction |
multiply dx_He/dz by CAMB 2's He I rate correction F_He (arXiv:2607.14854, 'Recombination model and calibration'), which carries CosmoRec's helium radiative transfer; part of recfast_calibration = cosmorec
| bool precision::hyrec_He_rate_correction |
multiply HYREC-2's helium rate by its CosmoRec calibration; set by hyrec_calibration
| double precision::recfast_z_He_1 = 8000.0 |
from recfast 1.4, Starting value of Helium recombination 1
| double precision::recfast_delta_z_He_1 |
Smoothing factor for recombination approximation switching, found to be OK on 3.09.10
| double precision::recfast_z_He_2 = 5000.0 |
from recfast 1.4, Ending value of Helium recombination 1
| double precision::recfast_delta_z_He_2 |
Smoothing factor for recombination approximation switching, found to be OK on 3.09.10
| double precision::recfast_z_He_3 = 3500.0 |
from recfast 1.4, Starting value of Helium recombination 2
| double precision::recfast_delta_z_He_3 |
Smoothing factor for recombination approximation switching, found to be OK on 3.09.10
| double precision::recfast_x_He0_trigger |
Saha fraction of HeII at which the helium ODE takes over
| double precision::recfast_x_H0_trigger |
Saha fraction of HII at which the hydrogen ODE takes over
| double precision::recfast_x_H0_trigger2 |
x_H below which RECFAST uses Peebles' C factor rather than 1; kept equal to recfast_x_H0_trigger
| double precision::recfast_H_frac |
from recfast 1.4, specifies the time at which the temperature evolution is calculated by the more precise equation
| double precision::reionization_z_start_max = 50.0 |
Maximum starting value in z for reionization
| double precision::reionization_sampling = 0.01 |
Sampling density in z during reionization
| double precision::reionization_optical_depth_tol |
Relative tolerance on finding the user-given optical depth of reionization given a certain redshift of reionization
| double precision::reionization_start_factor |
Searching optical depth corresponding to the redshift is started from an initial offset beyond z_reionization_start, multiplied by reionization_width
| int precision::thermo_rate_smoothing_radius |
Smoothing in redshift of the variation rate of 

| std::string precision::hyrec_path |
Directory holding HYREC-2's data tables. HYREC-2 appends its own file names (Alpha_inf.dat, R_inf.dat, fit_swift.dat, two_photon_tables.dat), so it takes a directory rather than the three individual paths CLASS used before. A missing trailing separator is appended at parse time.
| double precision::k_min_tau0 |
number defining k_min for the computation of Cl's and P(k)'s (dimensionless): (k_min tau_0), usually chosen much smaller than one
| double precision::k_max_tau0_over_l_max |
number defining k_max for the computation of Cl's (dimensionless): (k_max tau_0)/l_max, usually chosen around two. Since v3.2.2, the separate full-Limber grid keeps CMB lensing accurate at high l, allowing the standard transfer grid to stop at 1.8 instead of 2.4.
| double precision::k_max_tau0_above_l_max |
the scalar CMB C_l's take k_max tau_0 = max(k_max_tau0_over_l_max l_max, l_max + this), with l_max the multipoles asked for (without the lensing headroom delta_l_max). Below l_max ~ 3000 the transfer functions carry power above k tau_0 = 1.8 l_max: with that alone, unlensed TT is 11% low at l = 200 for l_max_scalars = 200, and the lensed TT at the top of l_max_scalars = 2000 has twice the error. Above l_max ~ 3000 the damping tail removes it. See docs/superpowers/specs/2026-10-27-cmb-k-range-design.md.
| double precision::k_step_sub |
step in k space, in units of one period of acoustic oscillation at decoupling, for scales inside sound horizon at decoupling
| double precision::k_step_super |
step in k space, in units of one period of acoustic oscillation at decoupling, for scales above sound horizon at decoupling
| double precision::k_step_transition |
dimensionless number regulating the transition from 'sub' steps to 'super' steps. Decrease for more precision.
| double precision::k_step_super_reduction |
the step k_step_super is reduced by this amount in the k-->0 limit (below scale of Hubble and/or curvature radius)
| double precision::k_per_decade_for_pk |
if values needed between kmax inferred from k_oscillations and k_kmax_for_pk, this gives the number of k per decade outside the BAO region
| double precision::idmdr_boost_k_per_decade_for_pk |
boost factor for the case of DAO in idm-idr models
| double precision::k_per_decade_for_bao |
if values needed between kmax inferred from k_oscillations and k_kmax_for_pk, this gives the number of k per decade inside the BAO region (for finer sampling)
| double precision::k_bao_center |
in ln(k) space, the central value of the BAO region where sampling is finer is defined as k_rec times this number (recommended: 3, i.e. finest sampling near 3rd BAO peak)
| double precision::k_bao_width |
in ln(k) space, width of the BAO region where sampling is finer: this number gives roughly the number of BAO oscillations well resolved on both sides of the central value (recommended: 4, i.e. finest sampling from before first up to 3+4=7th peak)
| double precision::start_small_k_at_tau_c_over_tau_h |
largest wavelengths start being sampled when universe is sufficiently opaque. This is quantified in terms of the ratio of thermo to hubble time scales, 
| double precision::start_large_k_at_tau_h_over_tau_k |
largest wavelengths start being sampled when mode is sufficiently outside Hubble scale. This is quantified in terms of the ratio of hubble time scale to wavenumber time scale, 
| double precision::start_isocurvature_at_omega_tau |
non-adiabatic scalar modes (cdi, bi, nid, niv) also start no later than om*tau equals this value, om = a rho_m / sqrt(rho_r): their initial conditions are series in om*tau, whose error falls as (om*tau)^3 (cdi, bi) and (om*tau)^2 (nid). Decrease to start earlier in time.
| double precision::tight_coupling_trigger_tau_c_over_tau_h = 0.015 |
when to switch off tight-coupling approximation: first condition: 
| double precision::tight_coupling_trigger_tau_c_over_tau_k = 0.04 |
when to switch off tight-coupling approximation: second condition: 
| double precision::tight_coupling_trigger_tau_c_over_tau_h_ten = 0.015 |
Tensor-mode counterparts of the two tight-coupling triggers above.
Kept separate because the two modes reach their closures differently: the scalar TCA selects one of tight_coupling_approximation's schemes, while the tensor closure is PhotonsSpecies::TensorTightCoupling(), which no input parameter selects.
The k-trigger stays at 0.01. Correcting the closure and carrying it to first order in tau_c (#398) made 0.04 eight times cheaper in accuracy than it was – 14.0% -> 1.74% on BB over l = 100-300 against a converged reference – but 0.01 still delivers 0.18% there, and loosening buys no measurable time: 0.5% on a tensor-only run at l_max_tensors = 1500, inside the noise. Tensors are cheap; there is nothing to trade the accuracy for.
| double precision::start_sources_at_tau_c_over_tau_h |
sources start being sampled when universe is sufficiently opaque. This is quantified in terms of the ratio of thermo to hubble time scales, 
| int precision::tight_coupling_approximation |
method for tight coupling approximation
| double precision::idm_dr_tight_coupling_trigger_tau_c_over_tau_k |
when to switch off the dark-tight-coupling approximation, first condition (see normal tca for full definition)
| double precision::idm_dr_tight_coupling_trigger_tau_c_over_tau_h |
when to switch off the dark-tight-coupling approximation, second condition (see normal tca for full definition)
| double precision::idm_drmd_tight_coupling_trigger_G_over_aH |
when to switch off the dark-tight-coupling approximation in DRMD, should be larger than at least 100 (currently set to a very high number as the code runs perfectly fine without the approximation.)
| int precision::l_max_g |
number of momenta in Boltzmann hierarchy for photon temperature (scalar), at least 4
| int precision::l_max_pol_g |
number of momenta in Boltzmann hierarchy for photon polarization (scalar), at least 4
| int precision::l_max_dr |
number of momenta in Boltzmann hierarchy for decay radiation, at least 4
| int precision::l_max_dr_col |
highest multipole of the decay-radiation collision term, at least 2. It reads the parent's multipole of the same l, so it can reach no further than either hierarchy; -1 (default): as far as both reach, per species (#137). An explicit value beyond either is an error.
| int precision::l_max_dncdm_col |
max multipole receiving the DNCDM inverse-decay collision term; must be <= l_max_ncdm
| int precision::l_max_ur |
number of momenta in Boltzmann hierarchy for relativistic neutrino/relics (scalar), at least 4
| int precision::l_max_idr |
number of momenta in Boltzmann hierarchy for interacting dark radiation
| int precision::l_max_ncdm |
number of momenta in Boltzmann hierarchy for non-cold relics (scalar), at least 4; 17 again since 2026-10-09 (10 from 2026-08-21), see tol_ncdm_synchronous
| int precision::l_max_g_ten |
number of momenta in Boltzmann hierarchy for photon temperature (tensor), at least 4
| int precision::l_max_pol_g_ten |
number of momenta in Boltzmann hierarchy for photon polarization (tensor), at least 4
| double precision::curvature_ini = 1.0 |
initial condition for curvature for adiabatic
| double precision::entropy_ini = 1.0 |
initial condition for entropy perturbation for isocurvature
| double precision::gw_ini = 1.0 |
initial condition for tensor metric perturbation h
| double precision::perturb_sampling_stepsize = 0.1 |
default step 

| double precision::perturbations_sampling_boost_above_age_fraction = 1. |
Age fraction above which source sampling is twice as fine; 1.0 disables the boost. It used to improve the low-l CMB lensing line-of-sight integral, which the transfer module now samples with its own logarithmic late-time step (cmb_lensing_sampling_factor, cmb_lensing_sampling_fraction).
| double precision::tol_perturb_integration = 0.0001 |
control parameter for the precision of the perturbation integration, IMPORTANT FOR SETTING THE STEPSIZE OF NDF15
| double precision::tol_perturb_newtonian_k_over_a0H0 = 5. |
Newtonian gauge only: modes with k below this multiple of a_0 H_0 are integrated at tol_perturb_integration * (k / (this * a_0 H_0))^2, but not below 1e-10. On super-horizon scales the Newtonian-gauge delta and 3aH theta/k^2 are of order the potential and cancel to the comoving density, (k/aH)^2 smaller, so an integration error of tol in them is an error of tol (aH/k)^2 in P(k): -18% at k = 1e-5 h/Mpc for m_ncdm = 1 eV, 1.5e-3 for LambdaCDM (#497); now 5e-4 and 1.4e-4. Costs 1-7% of a Newtonian P(k) run on one thread. 0 switches it off (until 2026-11-05).
| double precision::c_gamma_k_H_square_max = 1.0e3 |
cutoff relevant for controlling stiffness in the PPF scheme. It is neccessary for the Runge-Kutta evolver, but not for ndf15. However, the approximation is excellent for a cutoff value of 1000, so we leave it on for both evolvers. (CAMB uses a cutoff value of 30.)
| double precision::tol_tau_approx = 1e-6 |
precision with which the code should determine (by bisection) the times at which sources start being sampled, and at which approximations must be switched on/off (units of Mpc)
| int precision::radiation_streaming_approximation = static_cast<int>(rsa_method::rsa_MD_with_reio) |
method for switching off photon perturbations
| double precision::radiation_streaming_trigger_tau_over_tau_k = 45. |
when to switch off photon perturbations, ie when to switch on photon free-streaming approximation (keep density and thtau, set shear and higher momenta to zero): first condition: 
45 since 2026-10-27 (class_public's value), 26 from 2026-08-21. At 26, with neglect_CMB_sources_below_visibility = 0.008, lensed EE was 8.6e-3 off a converged reference over l = 30-2500 (median of 160 LambdaCDM posterior draws), a significance of 2.3 sigma for a cosmic-variance-limited measurement, and TE 4.5e-3 (1.05); 45 and 2e-3 take them to 1.1e-3 (0.73) and 1.6e-3 (0.41) for 2-3% on one thread. Most of the EE error was this trigger's: at 35 EE is 1.7e-3 (0.97). The cheap values had been chosen because they cancel part of another error in the directions Planck constrains, mostly omega_b: on Planck PR4 CamSpec + low-l + ACT DR6 lensing + DESI DR2 the cosmological bias goes from 0.090 to 0.168 sigma (LambdaCDM) and 0.144 to 0.174 (w0wa), while the spread of delta chi^2 falls from 0.71 to 0.50. Most of that other error was the cubic interpolation of the Bessel functions (see hyper_sampling_flat). See docs/superpowers/specs/2026-10-27-precision-sync-design.md.
| double precision::radiation_streaming_trigger_tau_c_over_tau = 5.0 |
when to switch off photon perturbations, ie when to switch on photon free-streaming approximation (keep density and theta, set shear and higher momenta to zero): second condition:
| int precision::idr_streaming_approximation |
method for dark radiation free-streaming approximation
| double precision::idr_streaming_trigger_tau_over_tau_k |
when to switch on dark radiation (idr) free-streaming approximation, first condition
| double precision::idr_streaming_trigger_tau_c_over_tau |
when to switch on dark radiation (idr) free-streaming approximation, second condition
| int precision::ur_fluid_approximation |
method for ultra relativistic fluid approximation
| double precision::ur_fluid_trigger_tau_over_tau_k = 20. |
when to switch off ur (massless neutrinos / ultra-relativistic relics) fluid approximation
| int precision::ncdm_fluid_approximation |
method for non-cold dark matter fluid approximation
| double precision::ncdm_fluid_trigger_tau_over_tau_k = 31. |
when to switch off ncdm (massive neutrinos / non-cold relics) fluid approximation. 31 again since 2026-10-09: at 15 (from 2026-08-21) the switch came while neutrinos are still relativistic at k > 0.5/Mpc, see tol_ncdm_synchronous.
| double precision::neglect_CMB_sources_below_visibility = 2e-3 |
whether CMB source functions can be approximated as zero when visibility function g(tau) is tiny. 2e-3 since 2026-10-27, 0.008 from 2026-08-21: at 0.008 it was half of the lensed EE error (see radiation_streaming_trigger_tau_over_tau_k); with the trigger there at 45, 2e-3 is as accurate as class_public's 1e-3.
| evolver_type precision::evolver_background = evolver_type::ndf15 |
The type of evolver to use: options are ndf15, rk, rkdp45 or etd.
PER-MODULE, because the three callers do not want the same integrator. The decaying-NCDM inverse-decay sector is the case that forced this: its BACKGROUND Jacobian is genuinely dense (every parent momentum bin couples to every daughter bin through the collision integral, so numjac abandons sparsity and ndf15 costs ~84x more than rkdp45 for answers agreeing to 4e-9 of the energy budget), while its PERTURBATION Jacobian stays sparse and stiffness-limited, where an implicit method is the natural choice. With one global setting that model cannot express its own best configuration.
Input is an XOR: either the blanket evolver key, or any subset of evolver_background / evolver_thermodynamics / evolver_perturbations (unset members keep the default). Mixing the two is rejected rather than silently resolved by a precedence rule – see precision::parse.
| bool precision::evolver_histograms = false |
Collect explicit-RK step-acceptance histograms during the perturbations.
Step COUNTERS are always collected – they are a plain increment per step into a per-call struct, so they cost nothing measurable. The histograms are different: each step costs a log10 to find its bin, so they are opt-in. Only the explicit Runge-Kutta evolvers produce them.
| int precision::rk_controller = 0 |
Step-size controller, error norm and interpolant for the explicit embedded pairs (rkdp45, tsit5). They do nothing for the other integrators.
rk_controller 0 = legacy the historical control: an I controller with no cap on how fast h may grow, which also grows h on the step right after a rejection. Throws away ~13% of its steps on LCDM + Mnu. 1 = capped the same with a growth cap and no growth right after a rejection. Measured worth almost nothing on its own (13.7% -> 12.3% rejected). 2 = pi Hairer/Gustafsson PI control. Rejections fall to ~4.4% and, because the step sequence is smoother, it delivers more accuracy per step than the extra steps cost: ~9% cheaper at matched accuracy on both C_l and P(k). Not the default because at a FIXED tolerance it is 3.6% dearer for accuracy nobody is short of – realising its value means loosening tol_perturb_integration with it, and that knob is shared with ndf15, where the same number means something ~45x different. rk_error_norm 0 = max norm of the scaled error (MATLAB ode45; historical) 1 = RMS norm (Hairer's DOPRI5) rk_interpolant 0 = the pair's own continuous extension, which is 4th order over a 5th-order step 1 = quintic Hermite through the last three step ends, using the values and the FSAL derivatives already in hand. One order better for no extra derivative evaluations and no change to the step sequence. THE DEFAULT, because a 4th- order interpolant under a 5th-order step means the sources CLASS stores are systematically one order worse than the solution the error controller is protecting, and a user has no way to see or fix that. Measured on LCDM + Mnu it is 1.3-2.0x more accurate on lensed C_l at identical RHS count and a wall-time difference inside the noise, and P(k) is untouched (at z_pk = 0 it reads a single stored tau, which is a step end either way). rk_output_stepping 0 = serve output points from the interpolant 1 = truncate h so every output point is a step end, which never interpolates. A DIAGNOSTIC, not a setting: it is the only way to separate interpolation error from accumulated error, and it costs 1.31x at matched accuracy.
rk_safety and rk_fac_min/rk_fac_max bound the step-size change factor and are read by every controller including legacy. Note that rk_safety and rk_pi_beta together fix the error ratio the controller settles at, so raising safety is equivalent to loosening the tolerance rather than being free.
These are pushed into a process-wide slot because the shared evolver signature has no room for them. Each module configures it from its OWN ppr immediately before it integrates, so lazily-built Cosmology objects cannot read each other's settings; what remains is that two cosmologies whose modules RUN concurrently in one process must agree on them.
| double precision::k_per_decade_primordial |
logarithmic sampling for primordial spectra (number of points per decade in k space)
| double precision::primordial_inflation_ratio_min |
for each k, start following wavenumber when aH = k/primordial_inflation_ratio_min
| double precision::primordial_inflation_ratio_max |
for each k, stop following wavenumber, at the latest, when aH = k/primordial_inflation_ratio_max
| int precision::primordial_inflation_phi_ini_maxit |
maximum number of iteration when searching a suitable initial field value phi_ini (value reached when no long-enough slow-roll period before the pivot scale)
| double precision::primordial_inflation_pt_stepsize |
controls the integration timestep for inflaton perturbations
| double precision::primordial_inflation_bg_stepsize |
controls the integration timestep for inflaton background
| double precision::primordial_inflation_tol_integration |
controls the precision of the ODE integration during inflation
| double precision::primordial_inflation_attractor_precision_pivot |
targeted precision when searching attractor solution near phi_pivot
| double precision::primordial_inflation_attractor_precision_initial |
targeted precision when searching attractor solution near phi_ini
| int precision::primordial_inflation_attractor_maxit |
maximum number of iteration when searching attractor solution
| double precision::primordial_inflation_tol_curvature |
for each k, stop following wavenumber, at the latest, when curvature perturbation R is stable up to to this tolerance
| double precision::primordial_inflation_aH_ini_target |
control the step size in the search for a suitable initial field value
| double precision::primordial_inflation_end_dphi |
first bracketing width, when trying to bracket the value phi_end at which inflation ends naturally
| double precision::primordial_inflation_end_logstep |
logarithmic step for updating the bracketing width, when trying to bracket the value phi_end at which inflation ends naturally
| double precision::primordial_inflation_small_epsilon |
value of slow-roll parameter epsilon used to define a field value phi_end close to the end of inflation (doesn't need to be exactly at the end): epsilon(phi_end)=small_epsilon (should be smaller than one)
| double precision::primordial_inflation_small_epsilon_tol = 0.01 |
tolerance in the search for phi_end
| double precision::primordial_inflation_extra_efolds |
a small number of efolds, irrelevant at the end, used in the search for the pivot scale (backward from the end of inflation)
| int precision::l_linstep |
linear step in l over which bessel and transfer functions are sampled, at high l
| double precision::l_logstep |
maximum spacing of values of l over which Bessel and transfer functions are sampled (so, spacing becomes linear instead of logarithmic at some point)
| double precision::hyper_x_min |
flat case: lower bound on the smallest value of x at which we sample 

| double precision::hyper_sampling_flat |
flat case: number of sampled points x per approximate wavelength 
| double precision::hyper_sampling_curved_low_nu |
open/closed cases: number of sampled points x per approximate wavelength 

| double precision::hyper_sampling_curved_high_nu |
open/closed cases: number of sampled points x per approximate wavelength 




| double precision::hyper_nu_sampling_step |
open/closed cases: value of nu at which sampling changes
| double precision::hyper_phi_min_abs |
small value of Bessel function used in calculation of first point x ( 
| double precision::hyper_x_tol = 1.0e-4 |
tolerance parameter used to determine first value of x
| double precision::hyper_flat_approximation_nu |
value of nu below which the flat approximation is used to compute Bessel function
| double precision::q_linstep = 0.45 |
asymptotic linear sampling step in q UNHANDLED: space, in units of 
| double precision::q_logstep_spline = 400. |
initial logarithmic sampling step in q UNHANDLED: space, in units of 
| double precision::q_logstep_open = 6.0 |
in open models, the value of UNHANDLED: q_logstep_spline must be decreased UNHANDLED: according to curvature. Increasing UNHANDLED: this number will make the calculation UNHANDLED: more accurate for large positive UNHANDLED: Omega_k
| double precision::q_logstep_trapzd = 20.0 |
initial logarithmic sampling step in q UNHANDLED: space, in units of 
| double precision::q_numstep_transition = 250.0 |
number of steps for the transition UNHANDLED: from q_logstep_trapzd steps to UNHANDLED: q_logstep_spline steps (transition UNHANDLED: must be smooth for spline)
| double precision::q_logstep_limber |
logarithmic q-step ratio for the separate full-Limber CMB lensing grid. Accepted as a default, but it is coarse: against a converged 1.01 grid this leaves ~3.1e-3 in 
| double precision::k_max_extrapolated |
the linear sources are continued past the last perturbation mode up to this k (1/Mpc) by AsymptoticExtrapolation, and trusted there: halofit and HMcode decide up to which redshift they are computable from it, and the full-Limber CMB lensing source is continued to it, times the non-linear correction there. 0 trusts only the computed modes, as before 2026-10-21. See docs/superpowers/specs/2026-10-21-lensing-source-extrapolation-design.md
| double precision::k_max_limber_over_l_max_scalars |
full-Limber perturbation source cutoff k_max/l_max_scalars in 1/Mpc
| double precision::transfer_neglect_delta_k_S_t0 |
for the temperature source T0 of the scalar mode, the high-l margin delta_k in 1/Mpc: for l < (k-delta_k(l)) r_a(tau_rec), the transfer function is set to zero
| double precision::transfer_neglect_delta_k_S_t1 |
same for temperature source function T1 of scalar mode
| double precision::transfer_neglect_delta_k_S_t2 |
same for temperature source function T2 of scalar mode
| double precision::transfer_neglect_delta_k_S_e |
same for polarization source function E of scalar mode
| double precision::transfer_neglect_l_half_S_t0 |
for the temperature source T0 of the scalar mode, the l at which the margin is delta_k/sqrt(2); 0 keeps it at delta_k for every l
| double precision::transfer_neglect_l_half_S_t1 = 20. |
same for T1 of scalar mode
| double precision::transfer_neglect_l_half_S_t2 = 100. |
same for T2 of scalar mode
| double precision::transfer_neglect_l_half_S_e = 400. |
same for E of scalar mode
| double precision::transfer_neglect_delta_k_V_t1 |
same for temperature source function T1 of vector mode
| double precision::transfer_neglect_delta_k_V_t2 |
same for temperature source function T2 of vector mode
| double precision::transfer_neglect_delta_k_V_e |
same for polarization source function E of vector mode
| double precision::transfer_neglect_delta_k_V_b |
same for polarization source function B of vector mode
| double precision::transfer_neglect_delta_k_T_t2 |
same for temperature source function T2 of tensor mode
| double precision::transfer_neglect_delta_k_T_e |
same for polarization source function E of tensor mode
| double precision::transfer_neglect_delta_k_T_b |
same for polarization source function B of tensor mode
| double precision::transfer_neglect_late_source |
value of l below which the CMB source functions can be neglected at late time, excepted when there is a Late ISW contribution
| double precision::l_switch_limber |
when to use the Limber approximation for project gravitational potential cl's
| double precision::cmb_lensing_sampling_factor |
logarithmic time step of the CMB lensing line-of-sight integral at late times, Delta tau = (tau0-tau) cmb_lensing_sampling_factor / min(l_switch_limber, l_max_scalars). Decrease for more precision.
| double precision::cmb_lensing_sampling_fraction |
the CMB lensing source is sampled until tau = (1-cmb_lensing_sampling_fraction) tau0 (closer to us, it does not contribute). Decrease for more precision.
| double precision::l_switch_limber_for_nc_local_over_z |
when to use the Limber approximation for local number count contributions to cl's (relative to central redshift of each bin)
| double precision::l_switch_limber_for_nc_los_over_z |
when to use the Limber approximation for number count contributions to cl's integrated along the line-of-sight (relative to central redshift of each bin)
| double precision::selection_cut_at_sigma |
in sigma units, where to cut gaussian selection functions
| double precision::selection_sampling |
controls sampling of integral over time when selection functions vary quicker than Bessel functions. Increase for better sampling.
| double precision::selection_sampling_bessel |
controls sampling of integral over time when selection functions vary slower than Bessel functions. Increase for better sampling. IMPORTANT for lensed contributions.
| double precision::selection_sampling_bessel_los |
controls sampling of integral over time when selection functions vary slower than Bessel functions. This parameter is specific to number counts contributions to Cl integrated along the line of sight. Increase for better sampling
| double precision::selection_sampling_bessel_min |
for evenly spaced time samplings (number counts, galaxy lensing): minimum number of sampled points per radian of the Bessel functions j_l(q(tau0-tau)) for computing a line-of-sight integral. Above the corresponding q, the sampled Bessel function stops oscillating and the trapezoidal sum aliases; the Limber approximation is used instead. Results are identical between Nyquist (1/pi) and 1.
| double precision::selection_tophat_edge |
controls how smooth are the edge of top-hat window function (<<1 for very sharp, 0.1 for sharp)
| double precision::sigma_k_per_decade |
logarithmic stepsize controlling the precision of integrals for sigma(R,k) and similar quantitites
| double precision::nonlinear_min_k_max |
with halofit or HMcode, the perturbation modes are computed at least up to this k (1/Mpc); the P(k,z) output is still limited by P_k_max. Beyond the last mode the linear spectrum is continued (k_max_extrapolated). 5/Mpc until 2026-10-21; at 2/Mpc P_NL stays within 6e-4 of modes solved to 70/Mpc up to z = 3, at 1/Mpc it is 4e-3 off at z = 3. The continuation assumes the sources have their high-k form above a third of this k: true for cold dark matter, baryons, dark energy and massive neutrinos (tested to 0.2 eV each, and 1 eV within 2e-3), but not near a free-streaming cutoff. A species whose cutoff lies there (thermal warm dark matter of 0.1 to 7 keV) has its modes solved up to k_max_extrapolated instead, by itself: with 1 keV as a quarter of the dark matter, P_NL at z = 3 was 5e-2 off at 2/Mpc. See docs/superpowers/specs/2026-10-21-lensing-source-extrapolation-design.md and 2026-10-22-nonlinear-followups-design.md
| double precision::halofit_min_k_nonlinear |
parameters relevant for HALOFIT computation value of k in 1/Mpc below which non-linear corrections will be neglected
| double precision::halofit_min_k_max = 2.0 |
DEPRECATED: should use instead nonlinear_min_k_max
| double precision::halofit_kR_max = 5.0 |
halofit's sigma integrals use a Gaussian UNHANDLED: window exp(-(kR)^2), and are integrated until UNHANDLED: kR reaches this value, extrapolating the linear UNHANDLED: P(k) above the computed k_max if needed. UNHANDLED: sigma itself converges by kR ~ UNHANDLED: sqrt(-log(halofit_sigma_precision)) ~ 1.7, but the UNHANDLED: third integral carries a weight 4(kR)^2(1-(kR)^2) UNHANDLED: whose (kR)^4 term needs kR ~ 4 (measured; CAMB UNHANDLED: uses 4 for its top-hat). Truncating there biases UNHANDLED: the curvature C and through it P_nl.
| double precision::halofit_k_per_decade = 80.0 |
halofit needs to evalute integrals UNHANDLED: (linear power spectrum times some UNHANDLED: kernels). They are sampled using UNHANDLED: this logarithmic step size.
| double precision::halofit_sigma_precision = 0.05 |
a smaller value will lead to a UNHANDLED: more precise halofit result at the highest UNHANDLED: redshift at which halofit can make computations, UNHANDLED: at the expense of requiring a larger k_max; but UNHANDLED: this parameter is not relevant for the UNHANDLED: precision on P_nl(k,z) at other redshifts, so UNHANDLED: there is normally no need to change it
| double precision::halofit_tol_sigma = 1.0e-6 |
tolerance required on sigma(R) when UNHANDLED: matching the condition sigma(R_nl)=1, UNHANDLED: whcih defines the wavenumber of UNHANDLED: non-linearity, k_nl=1./R_nl
| double precision::pk_eq_z_max = 5.0 |
Maximum z for the pk_eq method
| double precision::pk_eq_tol = 1.0e-7 |
Tolerance on the pk_eq method for finding the pk
| double precision::hmcode_max_k_extra = 1.e6 |
Parameters relevant for HMcode computation parameter specifying the maximum k value for UNHANDLED: the extrapolation of the linear power spectrum UNHANDLED: (needed for the sigma computation)
| double precision::hmcode_min_k_max = 2. |
DEPRECATED: should use instead nonlinear_min_k_max
| double precision::hmcode_tol_sigma = 1.e-6 |
tolerance required on sigma(R) when matching the UNHANDLED: condition sigma(R_nl)=1, which defines the wavenumber UNHANDLED: of non-linearity, k_nl=1./R_nl
| int precision::n_hmcode_tables = 64 |
parameters controlling stepsize and min/max r & a values for sigma(r) & grow table
| int precision::nsteps_for_p1h_integral = 256 |
parameters controlling stepsize and min/max halomass values for the 1-halo-power integral
| int precision::accurate_lensing |
switch between Gauss-Legendre quadrature integration and simple quadrature on a subdomain of angles
| int precision::num_mu_minus_lmax |
difference between num_mu and l_max, increase for more precision
| int precision::delta_l_max |
difference between l_max in unlensed and lensed spectra: the unlensed C_l's above l_max_scalars that the lensing convolution needs. 500 until 2026-10-27, when the k range stopped following it (k_max_tau0_above_l_max): 1000 makes the lensed TT in the top 250 multipoles 3-4x more accurate at l_max_scalars = 2500-3000, for -3.8% to +3.5% time against the old rule with 500.
| double precision::tol_gauss_legendre |
tolerance with which quadrature points are found: must be very small for an accurate integration (if not entered manually, set automatically to match machine precision)
| double precision::smallest_allowed_variation |
machine-dependent, assigned automatically by the code