2,468 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
3
votes
3
answers
114
views
Numerically finding the minimum value of a variable where a function equals a value
I have a black box function baseball that determines the magnitude of the distance that a baseball travels when launched. It takes the initial speed, the angle of launch and the initial spin. Assuming ...
2
votes
1
answer
268
views
Why does Newton’s method overshoot on the first deceleration step in my motion profile generator?
I’m porting a Python motion profile generator to C to implement for my STM32H743. The generator produces step timings for a simple acceleration → cruise → deceleration motion profile. See the ...
2
votes
2
answers
125
views
Estrin polynomial evaluation - Intel ICX strange slowdown for lengths 16N-1
Porting what I believe to be working code for a radix-2 Estrin polynomial evaluation scheme to the Intel ICX 2024 compiler I am seeing a slowdown for a handful of polynomial lengths just below 16*N (...
1
vote
1
answer
118
views
integer exact computation with logs
I need to compute ceil(log_N(i)) where log_N is the log with positive integer base N and i is also a positive integer.
The straight forward python implementation using floating point math fails at ...
1
vote
0
answers
60
views
Is it possible to reduce the memory requirements for (I)FFT by chunking?
I'm trying to run an IFFT on a very long signal (10^9 data points) and I'm running into RAM constraints. I'd like to be able to chop up the signal and run it in batches (as I am not time constrained ...
6
votes
1
answer
138
views
What is wrong with my block GMRES implementation?
I'm trying to implement a block GMRES procedure (i.e., GMRES to solve Ax=b, but with b that is not a vector but a n x r matrix, where r << n). My goal is to have a first implementation in Python ...
-1
votes
2
answers
190
views
Is there a faster method to compute these distance-based sums over a nonuniform grid of cells?
I'm attempting to implement an algorithm to compute an array of values. Unfortunately, I've found the literal implementation of that algorithm to be too slow for my use case. I suspect there's an ...
4
votes
0
answers
121
views
MSVC fixed short length polynomial evaluation curiosity - why does it not keep my coefficients array contiguous, and why subtract the absolute value?
MSVC seems to be taking the values from my array of coefficients and scattering them around in its .rdata section, not keeping them contiguous even though they're all used together. And it takes the ...
2
votes
2
answers
118
views
Differentiating OdeSolution object
I would like to compute the residual of the numerical solution to an ordinary differential equation.
Here is the code
import numpy as np
from scipy.integrate import solve_ivp
def f(t, x):
return ...
0
votes
0
answers
57
views
MICCG(0) for a fluid simulation fails at Neumann boundaries
I am trying to follow Robert Bridson's Fluid Simulation Notes (https://www.cs.ubc.ca/~rbridson/fluidsimulation/fluids_notes.pdf) to implement my own eulerian fluid simulator for the first time.
I was ...
-3
votes
3
answers
277
views
Taylor Series in Java using float [closed]
I am implementing a method berechneCosinus(float x, int ordnung) in Java that should approximate the cosine of x using the Taylor series up to the specified order.
My questions:
Can I optimize the ...
0
votes
0
answers
50
views
Problem with multigrid method implementation in MATLAB
I'm implementing a 2-grid method for solving discrete Poisson equation. I have read many papers to understand multigrid methods, for this implementation I'm following an example from this paper (p. 10)...
1
vote
0
answers
77
views
LAPACK Inconsistent across multiple different operating systems and devices
Description
I have a deterministic program that uses jax, and is heavy on linear algebra operations.
I ran this code on CPU, using three different CPUs. Two MacOs Systems (one on Sequoia (M1 Pro), ...
0
votes
1
answer
104
views
How to python code a distributed delayed differential system in python?
Already tried with ddeint, does not yield good results. I have an equivalent PDE system that works just fine and I can compare results. The key of the problem is that the system is coupled, so I ...
1
vote
1
answer
77
views
Reducing to Hessenberg form using Givens rotations
I'm trying to implement a function in Python that reduces a square matrix to upper Hessenberg form using Givens rotations. I know that this should be possible Wiki and sometimes preferred over ...