Questions tagged [numerical-methods]

Algorithms which solve mathematical problems by means of numerical approximation (as opposed to symbolic computation).

170 questions
Filter by
Sorted by
Tagged with
231 views

Numerical integration with Numba

I'm a bit new to working with Numba, but I got the gist of it. I wonder if there any more advanced tricks to make four nested for loops even faster that what I have ...
107 views

97 views

Calculating e^x by math.h and by own means

For this program, the user needs to enter an exponent and the program will calculate $e$ (Euler's number) to the power of the exponent the user inputs. This is done by two ways: By the math.h ...
145 views

Java Pi Calculation using an Averaged-Leibniz formula

While trying to discover a way to calculate the digits of Pi faster with the Leibniz formula for Pi, I noticed that, if I took two consecuent numbers in the series, and calculate their average, I ...
3k views

Polynomial curve-fitting over a large 3D data set

I have a list of 4 images, called listfile.list, which looks like this: image1 image2 image3 image4 Each image has 10 frames containing a 2000 x 2000 array of ...
4k views

ODE45 solver implementation in Python

I have a project where I need ODE solver without dependencies to libraries like Scipy. I decide to implement ODE45. According to tutorials from internet and from what I remember from classes I ...
344 views

Multithreaded Monte Carlo pi approximation with own pseudorandom number generator

I made a Monte Carlo pi approximation program, that makes use of multithreading and a pseudorandom number generator I wrote (the one from big_wheel.hpp, which I ...
96 views

Integer square root

This essentially performs the same function as exact-integer-sqrt in math.numeric-tower. ...
428 views

Utility Method to find the Square root of a number

Utility to calculate the square root of a number. The method also accept an epsilon value, which controls the precision. The epsilon value could range to any number including zero. I am expecting a ...
1k views

Integral using Simpson's Rule

As an answer to this problem: Exercise 1.29 Simpson's Rule is a more accurate method of numerical integration than the method illustrated above. Using Simpson's Rule, the integral of a ...
59 views

Arbitrary precision Euler-Mascheroni constant via a Brent-McMillan algorithm with no math module

Utilizing the below relation, I am able to compute the Euler constant to great precision on a single thread quickly and simply. My process is to compute the natural log via the AGM(utilizing Pi an ...
52 views

Integral implemented using a trapezoidal Riemann sum

I tried to make this a general purpose integral function but I want to know if it's efficient and idiomatic Rust. ...
491 views

Estimating Pi with random darts on dartboard - high complexity issues

I've been trying to write nice snippet of code to simulate pi estimation by randomly throwing darts on a dartboard. While running the following code on high but reasonable numbers my mac doesn't plot. ...
2k views

Just recently started learning ML, first I've gone through the notes of Ng's Coursera stuff. While I have nothing against Octave, I'm trying to solve exercises in Python. It's my beginning with that ...
My code calculates $e^x$ with series expansion. Is there any way to make it shorter and cleaner? ...