How to find an equation to calculate commissions
Stack Overflow Forums » Algebra
by Aaron
3d ago
I work in sales... There is a need for me to quickly calculate prices based on the commission I will be getting. Each sale pays commission based on 2 values: First, the commission on the base price is 8%. Anything over the base price of the item is paid at 40%. However, you will never earn more than 24% of the entire sale price. For instance, if the base price is $5000, and the item is sold for 7000$, then you would receive 5000*.08 or $400 and then 2000$ * .4 or $800 for a total commission of $1200. I basically need to know what I should be charging based on a commission value; for instance ..read more
Visit website
Library for multivariate root finding over the integers [closed]
Stack Overflow Forums » Algebra
by Cnoob
3d ago
TL;DR: is there any library for multivariate polynomial root finding over the integers? I'm trying to implement an attack on RSA with known bits of p by using Coppersmith, such as shown in this paper. In my case I have three blocks of lost bits, so it should be fine. The idea of Coppersmith is to first build and reduce a lattice, which is the costly part, and then convert some of the rows of the lattice back to polynomials that should have solutions over the integers that match the bits we're looking for. Finding the roots of a set of multivariate polynomials should have a very small cost when ..read more
Visit website
Basic linear regression not predicting y=x+5 pattern
Stack Overflow Forums » Algebra
by Krishan _13
5d ago
however my cost is continuously decreasing but my linear regression is unable to predict just simple pattern y=x+5. i tried all value for alpha and minimum cost i got is 3.00. x=[] y=[] for i in range(1000): x.append(i) y.append(i+5) def compute_cost(x,y,w,b): m=len(x) total_cost=0 cost=0 for i in range(m): f_wb = w*x[i]+b cost += (f_wb - y[i])**2 total_cost = cost/(2*m) return total_cost def gradient_descent(x,y,iter=200): m=len(x) w=0 b=0 alpha=0.0000001 for i in range(iter): dj_dw,dj_db=Compute_gradient(x,y,w,b ..read more
Visit website
Solve a matrix equation with linearly dependent values
Stack Overflow Forums » Algebra
by Loetschen
1w ago
For the equation (-w*M + K) * p = 0 the solution vector p is to be found. This consists of 3 values that are linearly dependent on each other. To solve, one of the values can be set equal to 1. The solution that all values equal 0 is not wanted. So far I have tested the following code. Unfortunately, I only get [] as the solution for this one I have sympy (sy) and numpy (np) in use. w = 18.54876451 p1 = 1 p2 = sy.Symbol('p2') p3 = sy.Symbol('p3') p = np.array([[p1], [p2], [p3]]) equation_p = (-w * sy.Matrix(M) + sy.Matrix(K)) * sy.Matrix(p) solutions_p = sy.solve(equation_p, (p1, p2, p3 ..read more
Visit website
Can I manipulate Op object in Jena SPARQL?
Stack Overflow Forums » Algebra
by user24538401
2w ago
I uesed Algebra.exec(opgraph,Dataset) and converted an OpGraph object to an OpTable object, I want to replace OpGraph in my original Query op with the OpTalbe object, so What should I do? I try to use Opvisitor to find OpGraph target, but can't replace it ..read more
Visit website
Operation count in specific bit-operation CPU [closed]
Stack Overflow Forums » Algebra
by 葉美華
3w ago
For a CPU with only bit operations (bit-addition, bit-multiplication, bit-or, etc.), how many bit operations are needed to compute x + y, x.y, and x mod y, where x is m-bit long and y is n-bit long. I think we should count full adder and gate numbers ..read more
Visit website
Multiple polynomial regression in C#
Stack Overflow Forums » Algebra
by Lucas Pevidor
3w ago
So I need to fit some vectorized data into a 3rd degree polynomial, however I can't find any libraries in C# that are able to do that. Essentially, x is a vector with 3 elements ([R, G, B]), and the final equation for the model is as follows: I need to obtain the l0, l1, l2, ..., l19 coefficients. I looked at some popular algebra libraries (Math.NET, Meta.Numerics, etc), and most of them can perform LinearRegression, Multi Linear Regression, and Polynomial Regression. However, if I didn't miss anything, none can perform Multi Polynomial Regression. I was able to accomplish this in python usin ..read more
Visit website
Area of 3D Cube Projected onto 2D Plane [closed]
Stack Overflow Forums » Algebra
by narmaps
1M ago
I have a 3D cube defined by 8 sets of x, y and z coordinates. The cube can be rotated in any orientation. How do I calculate the area projected onto one of the 2D cartesian planes? In the diagram below I show a 3D cube projected onto the x, y plane. I want to calculate the area of the wireframe shown. Does anyone have c# code for calculating convex hull of ordered points of the perimeter ..read more
Visit website
"MATRIX-WISE" multiplication
Stack Overflow Forums » Algebra
by RikoteMaster
1M ago
I am using a linnear application with a shape of Mx3x3. I want to apply it into a vector of Mx3x1. And obtain a final result of Mx3x1. Using a loop in which I iterate through M is quite easy but may be inefficient. How can I solve it in a more efficient way? Thx ..read more
Visit website
How to evaluate expression without multiplication symbol [closed]
Stack Overflow Forums » Algebra
by Master sinister
1M ago
Attempting to make an integral calculator, however, the following code pans out to an error due to the eval function not recognizing that an numeric value next to an algebraic symbol implies multiplication: x = 1.01 eval('3x') -> invalid decimal literal If I explicitly include the product symbol *, then it evaluates just fine eval('3x') = 3.03 I'm attempting to make my program as user friendly as possible, so I don't want the user to specify * for every product expression in their integrand when I ask them for input. I tried adding a * symbol manually to every integer next to an expression ..read more
Visit website

Follow Stack Overflow Forums » Algebra on FeedSpot

Continue with Google
Continue with Apple
OR