squiggle.c

Self-contained Monte Carlo estimation in C99
Log | Files | Refs | README

commit b352cdf3bae52dc901ea986dd258cef87efb75f3
parent 1e786170793775025dcbe7c7757e21475bdd89cf
Author: NunoSempere <nuno.sempere@protonmail.com>
Date:   Sun, 21 Jan 2024 11:47:22 +0100

formatting tweak

Diffstat:
Mexamples/core/06_dissolving_fermi_paradox/example.c | 12++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/examples/core/06_dissolving_fermi_paradox/example.c b/examples/core/06_dissolving_fermi_paradox/example.c @@ -67,8 +67,14 @@ int main() double log_fraction_of_intelligent_planets_which_are_detectable_as_such = sample_uniform(log(0.01), log(1), seed); double log_longevity_of_detectable_civilizations = sample_uniform(log(100), log(10000000000), seed); - - double log_n = log_rate_of_star_formation + log_fraction_of_stars_with_planets + log_number_of_habitable_planets_per_star_system + log_fraction_of_habitable_planets_in_which_any_life_appears + log_fraction_of_planets_with_life_in_which_intelligent_life_appears + log_fraction_of_intelligent_planets_which_are_detectable_as_such + log_longevity_of_detectable_civilizations; + double log_n = + log_rate_of_star_formation + + log_fraction_of_stars_with_planets + + log_number_of_habitable_planets_per_star_system + + log_fraction_of_habitable_planets_in_which_any_life_appears + + log_fraction_of_planets_with_life_in_which_intelligent_life_appears + + log_fraction_of_intelligent_planets_which_are_detectable_as_such + + log_longevity_of_detectable_civilizations; return log_n; } @@ -89,6 +95,4 @@ int main() printf("Probability that we are not alone: %lf (%.lf%%)\n", p_not_alone, p_not_alone * 100); free(seed); - } -