46,081 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
10
votes
2
answers
1k
views
Estimation for Pi is precise but inaccurate
My code reliably finds a precise (similar value every time) but in the region of 3.24 and 3.26. Competent mathematicians will note this around 0.1 away from an ideal Pi value.
My code revolves around ...
0
votes
0
answers
65
views
how can i get a digit from integer by pointers arithmetic? [closed]
I'm trying to implement Radix Sort with Counting Sort, I have already Implemented Counting sort of ints array.
I had an idea to use Counting sort in Radix implementation this way:
Get the specific ...
-2
votes
0
answers
21
views
Reading 360° Potentiometer (Alpha Taiwan RV112FF series) [closed]
I'm working on a project in which I have to read a RV112FF series Potentiometer from Alpha Taiwan, which can turn 360 degrees and has 2 tapper. According to the manual there are two functions which ...
1
vote
0
answers
50
views
Euler angles continuity ZYX (Yaw Pitch Roll) when pitch crosses ±90
I’m using a Force Dimension Omega.7. From its ×ばつ3 rotation matrix
R
, I extract ZYX Euler angles (Yaw–Pitch–Roll) as:
double yaw= std::atan2(R\[1\]\[0\], R\[0\]\[0\]); // Z
double pitch = std::...
-2
votes
0
answers
72
views
Coordinate Systems. GLTF 2.0 [closed]
I use DirectX. I don't want to use another GAPI. I'm currently implementing skeletal animations in my engine. Since the X (directX) format is dead, I'm using gLTF 2.0. In the OpenGL and gLTF 2.0 ...
2
votes
1
answer
260
views
Does this function result in uniformly distributed integers?
Recently, on a project, I encountered the need for uniformly distributed integers within an arbitrary range [a, b] from random bytes, a problem that is quite common and is usually solved using ...
-1
votes
1
answer
120
views
Multiplication issue with custom fixed point number, solution or alternative [closed]
I am not fond of floating point numbers and so have decided to make a custom fixed point number type that I can use for everything that doesn't strictly require floats. Unfortunately this task is not ...
-4
votes
1
answer
190
views
How to find if a point is in a circle in C++?
I know the formula for checking for a point in/on/outside a circle but my results are incorrect. I read Equation for testing if a point is inside a circle but my implementation is wrong. That the co-...
0
votes
1
answer
53
views
Mathematical expressions not rendering properly in chat widget with marked.js and KaTeX - Need all math formatted
I'm building a Q&A chat widget that uses marked.js for Markdown rendering and KaTeX for mathematical expressions. The backend returns LaTeX-formatted math, but it's displaying as raw text instead ...
3
votes
1
answer
62
views
How can I shortcut the unlimited-time SymPy expansion of all (a + b*z**k) given some z(n)?
Let me put some context first.
You see, I have a theory that multiplying all (a + b*z**k), for a determined z based on n, and some exponents k, it could return a**n+b**n. This is my brand new Cori ...
1
vote
0
answers
75
views
Error in converting symbolic value to numerical value with subs()
I have a problem in MATLAB.
I want to calculate the nonlinear system of equation using Newton Method. This nonlinear system of equation is taken from finite difference method. The system is Ay=F(y) ...
2
votes
1
answer
224
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 ...
6
votes
3
answers
276
views
How to find the longest elementary path in a graph?
The problem is to find the longest sequence of numbers from 1 to 100 such that each number is either multiple or divisor or the previous, and with no repetition. For example, 50 25 5 35 7 63 21 is a ...
0
votes
0
answers
67
views
Strange black borders on count changes with cmath on my python fractal render
I recently wrote a program which renders the mandelbrot set and encountered some irrelevent issues, which some helpful users solved for me. One user reccommended I change an aspect of my code for ...
-5
votes
0
answers
103
views
How do I calculate directions right?
I think my problem is that I didn't calculate the direction of my tunnels in my tunnel generation script right. I want to generate a web out of rooms (in the code Spheres) and tunnels that connect the ...