All Questions
Tagged with calculation or math
46,082 questions
Advice
1
vote
3
replies
63
views
Reverse-engineering CRC checksum algorithm from an oracle
I have an embedded device that implements an unknown 32-bit CRC-based checksum algorithm in hardware. I can use this device as an oracle to generate checksum values from arbitrary input, and verify ...
0
votes
0
answers
65
views
Convert a 2D point (x, y) to 3D coordinates on plane y=-50
I have a 3D rasterization rendering program on scratch.mit.edu, which has proper movement and rotation matrices for yaw and pitch (not roll). The grid is located on y=-50, and I have near plane and ...
2
votes
1
answer
179
views
Accurate computation of the inverse gamma function with the standard C math library
The inverse of the gamma function over the reals is multivalued with an infinite number of branches. This self-answered question is about the principal
inverse of the gamma function, Γ0-1(x), whose ...
Advice
0
votes
13
replies
203
views
Which algorithm does the truncate function use in c++
I'm wondering how the truncate function works. C++ is just an example i'm using because it's a language I know. I've searched online and I can't seem to find how it works, simply how to use it and ...
Advice
1
vote
9
replies
112
views
Sum of a binary tree
I have a binary tree which leafs have a size of 1, and the parent double in size at each level.
I project those nodes on a linear axe (memory space).
I need to get the equation that gives the adress ...
-3
votes
1
answer
50
views
Auto converting typed math to Latex/Mathjax [closed]
I use a learning management system from my coaching classes, and due to copyrighted material, I can't share screenshots here. However, I'm attempting to convert typed math to Latex/Mathjax math ...
1
vote
0
answers
76
views
QEF Implementation returns unexpected results on the Z value
I have a QEF implementation like this
float atA[3][3] = { 0 };
FVector atb = FVector::ZeroVector;
for (const FEdgeIntersection& e : IntersectionList)
{
const FVector& n = e.Normal;
...
2
votes
0
answers
54
views
Having problems computing PDE Residuals
I'm computing PDE residuals for The_Well datasets (e.g. turbulent_radiative_layer_2D and shear_flow) using finite differences, but the residuals are much larger than I expect. The data are generated ...
3
votes
3
answers
154
views
Wrong result when adding up to result in my number conversion program [duplicate]
I am currently writing a program in C to convert numbers between bases as an exercise. It asks the user for an input and for the base, that the number given is. It then gives the input into the ...
1
vote
0
answers
61
views
Euler angles continuity ZYX (Yaw Pitch Roll) when pitch crosses ±90
I’m using a Force Dimension Omega.7. From its 3×3 rotation matrix
𝑅
, I extract ZYX Euler angles (Yaw–Pitch–Roll) as:
double yaw= std::atan2(R\[1\]\[0\], R\[0\]\[0\]); // Z
double pitch = std::...
-1
votes
1
answer
128
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 ...
0
votes
1
answer
77
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 ...
1
vote
0
answers
91
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) ...
7
votes
3
answers
294
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
33
views
How to render MathTex formulas inside a Table with always_redraw in Manim?
I’m working with Manim Community and I would like to display dynamic values inside a Table.
Currently, I use always_redraw to update the values of the cells, and it works with plain text.
However, I ...
5
votes
2
answers
251
views
Generate all permutations which contains a number at least once given length, and number of digits
Okay, here's the problem I have. I'd like to do something like this:
V(n,k) generates all n-sized permutations in which each permutations contains all digits from 0 to k-1 in lexicographic order.
V(2,...
4
votes
1
answer
142
views
How do I create a new number type in Rust?
I am want to create a number type, lets call it a sd32.
The goal of this type to be stored like an i32, but when using it in arithmetic it should be treated as though it has 4 decimal places. The ...
0
votes
1
answer
67
views
Why is a linear triangulation method with SVD unsuitable for projective reconstruction? [closed]
I am studying a linear method for triangulation that uses Singular Value Decomposition (SVD) to estimate a 3D point P from multiple camera views. The method formulates a linear system of equations $AP=...
-2
votes
1
answer
234
views
Solve a 2 equations systems of quadratic equations with 2 unknows [closed]
I would like to solve this system of equation for X and Y :
Do you know if their exist a mathematical solution to this system ? And how to solve it ? Or a numerical solution ?
If yes, do you think ...
0
votes
1
answer
73
views
Issues with Sum of Squares for finding the region of attraction for a simple system
Over summer I've decided to explore how Sum of Squares optimization can be used with Lyapunov approaches. Currently I'm trying to find the region of attraction of the LQR's value function (when viewed ...
0
votes
1
answer
55
views
HPUX 10.20 math under qemu-system-hppa virtualization
Using qemu built from the last sources in a debian 12 machine :
./configure --target-list=hppa-softmmu --enable-numa --enable-slirp
as stated in documentation [1]
I installed a fresh HPUX 10.20 from ...
4
votes
1
answer
180
views
Calculate rotation of a point around another point on earth (or sphere)
Essentially what I'm trying to do is moving a point relative to two different scales.
The reason is to edit values in a database of a 3d party application.
So basically I want to relocate the red ...
-4
votes
1
answer
144
views
Calculate total profits or losses adjusting for future value each year
I am looking to create a spreadsheet that does the following: I give it initial revenue, initial fixed expenses, initial growing expenses, growth rate for revenue and growth expenses, number of years, ...
0
votes
2
answers
85
views
countback from date is negative, how to make numbers positive? [closed]
i am trying to use a countback from a certain date, and want it to read something like (100d, 10hrs, 10sec). the countback does this fine, except it reads as (-100d, -10hrs, -10sec). is there a way to ...
2
votes
1
answer
106
views
Gnuplot `title` using `set` and `show` versus as a follow on to `plot` on polar coordinates
I am using gnuplot 6.0 patchlevel 3 on Manjaro Linux, with the MWE below
reset
set encoding utf8
set terminal pdfcairo size 8in,8in font "STIX Two Math, 24" enhanced
set output "mwe-SO....