Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7865191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:00:49+00:00 2026-06-03T00:00:49+00:00

I am working on an algorithm that requires a Gaussian function and a lot

  • 0

I am working on an algorithm that requires a Gaussian function and a lot of loops.
The Boost::math::pdf has the correct formula that I need to implement.

I am creating a normal distribution with boost::math::normal_distribution normal_distribution(0,sigma) where the mean will always be zero and the sigma can vary at different times when the function is called.

I then want to use the function boost::math::pdf( normal_distribution , dsitance_from_mean ) in my loop to avoid reinventing the wheel with my own look up table. I read through the boost documentation looking for this answer, but I am not quite clear on how the function works.

Does the pdf function use a look up table generated with the normal distribution, or does it calculate the exponent value every time it is called?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T00:00:50+00:00Added an answer on June 3, 2026 at 12:00 am

    My expectation would be that the Boost authors would prioritize accuracy over performance.

    Browsing through the source code for the version I have installed, I see plenty of
    calls to trig/log/exp functions, and nothing resembling lookup tables or interpolation,
    so I think it’s calling exp() every time.

    I would recommend benchmarking it yourself, to see if the Boost code is really a
    performance bottleneck, before implementing your own lookup table.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on an algorithm that will try to pick out, given an
I'm working on an algorithm that manipulates pictures. Basically I will implement a diffusion
I am working on an algorithm, and I need to be able to pass
I am working on an algorithm in Python that uses arrays of int64s heavily.
I am working on an algorithm that performs a global thresholding of an 8-bit
I'm working on implementing the UCT algorithm in Haskell, which requires a fair amount
I'm currently working on a project that requires me to match our database of
I have been trying to get a working algorithm that detects intersection between a
I'm currently working on a problem that requires the random selection of an element
I'm working on a game that has simple pixel-art sprites. Since I'm planning to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.