Skip to content

Accept -max over -infinity #182

@bangerth

Description

@bangerth

-max() might be zero probability, but it's still better than -infinity(). Accept samples if that happens. See

          const bool trial_sample_has_zero_probability
            = ((trial_log_likelihood == -std::numeric_limits<double>::max())
               ||
               (trial_log_likelihood == -std::numeric_limits<double>::infinity()));
          const bool current_sample_has_zero_probability
            = ((current_log_likelihood == -std::numeric_limits<double>::max())
               ||
               (current_log_likelihood == -std::numeric_limits<double>::infinity()));

          bool repeated_sample;
          if (!(trial_sample_has_zero_probability && !current_sample_has_zero_probability)

@dklong-csu -- FYI

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions