Skip to main content
Filter by
Sorted by
Tagged with
2 votes
2 answers
129 views

I'm writing a paper and I want to declare how I obtained some Gini coefficients using the Gini() function from the ineq package, but when looking for what formula Gini() from ineq uses, I do not find ...
mr.questions's user avatar
0 votes
1 answer
41 views

Getting two widely different execution times in the below import numpy as np import time array = np.arange(0, 750000) param = 20000 t1 = time.time() for _ in range(param): array <= 120 print(...
unfolx's user avatar
  • 103
0 votes
1 answer
105 views

I'm trying to formalize a stable-coin protocol using the Coq Interactive Theorem Prover. The proofs I have involve a lot of manipulation of linear and non-linear equations involving rational numbers. ...
Mohammad Shaheer's user avatar
0 votes
0 answers
41 views

I'm trying to evaluate this function after subbing in all the respective values. For some reason, this function ends up stopping here and can't be evaluated further into a numerical value. I've tried ...
Rhyn155's user avatar
0 votes
0 answers
27 views

I have an inequality in integer nonnegative x,y x+a*y<=c where a,c - real positive. The number of solutions equals sum (int(c-i*a)+1 for i in range(int(c/a)+1) Is there a compact (O(1)) formula ...
ysa's user avatar
  • 361
1 vote
1 answer
66 views

I'm trying to use Sympy to solve 0 < x + y <= 4 in the case where both x and y are positive integers or 0, in the hopes to have it return a list of tuples that solves the inequality. import ...
Ezequiel Corellano's user avatar
0 votes
1 answer
80 views

I have the past 19 days of stock price stored in the pd.dataframe and I am trying to find out the price P that is smaller than (mean - 2.5*standard deviation), where mean and standard deviation are ...
Roy Chang's user avatar
2 votes
1 answer
56 views

sympy's solve seems to generally work for inequalities. For example: from sympy import symbols, solve; x = symbols('x'); print(solve('x^2 > 4', x)); # ((-oo < x) & (x < -2)) | ((2 < ...
ChaseMedallion's user avatar
0 votes
0 answers
29 views

I am new to Rust & I am having trouble to compare mutable strings and immutable strings. Please find below a code block which should exit if "exit" is entered. But I am having problem ...
Snehangshu Bhusan Pal's user avatar
0 votes
1 answer
79 views

Relatively simple math problem, find the range over which 3 <= Abs[6 - x] <= 5. Not hard to solve by hand, and Mathematica nails it, with the answer 1 <= x <= 3 || 9 <= x <= 11. The ...
Michael Stern's user avatar
1 vote
0 answers
72 views

I am working on testing whether a function lies in a given range. Somehow, the function Simplify does not provide the correct (obvious) answer. Why is that ? The main function corresponds to the ...
T.A.'s user avatar
  • 41
0 votes
1 answer
71 views

The statement below: y must exceed x by at most 200 can be written as y - x <= 200 Does the statement imply y must exceed x? y > x ? For my understanding: y must exceed x by at most 200 this ...
Olzen Khaw's user avatar
0 votes
1 answer
283 views

I'm trying to solve a simple linear inequality in Sympy but can't seem to get it to work. Basically, I want to be able to calculate the optimal values of a when the inequality happens to be false. ...
Thomas Tiotto's user avatar
0 votes
0 answers
139 views

I want to convert all kinds of mathematical equations to any given variable within that quation using Python. I want this to work with equations with multiple variables and with all kinds of ...
Razor's user avatar
  • 11
1 vote
1 answer
67 views

I want to use nypy.solve to convert a formular to a certain variable. In my example I want to convert the formular a >= ((b-c)/2)*sy.tan(d) to the variable b. But somehow the result of Sympy is not ...
Razor's user avatar
  • 11
0 votes
1 answer
184 views

Suppose I have a simplified problem like this x1 = cp.Variable(boolean=True) x2 = cp.Variable(boolean=True) sum = x1 + x2 prob = cp.Problem(cp.Maximize(sum)) prob.solve(verbose=True) The possible ...
Nick's user avatar
  • 13
1 vote
1 answer
46 views

I have 17 inequalities: 1: (x[0] + x[1] + x[2] + x[4] + x[6] + x[7])/(x[0] + x[1] + x[2] + x[3] + x[4] + x[5] + x[6] + x[7]) >= 0.4 2: (x[3] + x[5])/(x[0] + x[1] + x[2] + x[3] + x[4] + x[5] + x[6]...
Nalimov75's user avatar
0 votes
0 answers
57 views

I'm developping a code that find the optimized condition for two independent variables h and t that define the function W(h,t). I want to minimize this function because that is the weight function. ...
Danilo Cordella's user avatar
0 votes
1 answer
183 views

I have the following problem for homework and I was wondering if you could provide some hints. Your friend has in mind a set of numbers S ⊆ {1, ... , n}. If you ask him about a set Q ⊆ {1, ..., n} he ...
bird's user avatar
  • 3
2 votes
1 answer
254 views

I'm trying to use Z3 to determine if an expression is satisfiable.I have created all equations that I want to use it as constraints using SymPy and the variables are Symbols. the equations for example ...
Sena j's user avatar
  • 25
0 votes
1 answer
564 views

I need to compare floating point numbers with inequalities: if x >= y: However, due to floating point precision issues, sometimes this fails when it should succeed (x = 0.21 and y= 0....
at.'s user avatar
  • 52.9k
0 votes
1 answer
394 views

I'm using Tim Gerrodette's inequality equation (1987), to look at power analysis of visual survey data, however i'm struggling of finding away to solve this for x, using R. I have the following ...
megsryder's user avatar
  • 101
1 vote
1 answer
181 views

I am currently working on one of the recommended question from the chapter Negation in plfa Here is the question description: Using negation, show that strict inequality is irreflexive, that is, n <...
Jackson's user avatar
  • 43
0 votes
1 answer
251 views

I need to solve this inequality: enter image description here import sympy as sp from sympy.abc import x,n epsilon = 0.01 a = 2/3 xn = (n**3 + n**2)**(1/3) - (n**3 - n**2)**(1/3) i tried to solve ...
BURAKKU's user avatar
0 votes
0 answers
427 views

I have a problem with solving a system of linear inequalities in Python. What I need is basically draw n random feasible points from the inequality system. You could also call it a constraint system ...
Simon K.'s user avatar
0 votes
1 answer
194 views

I have a Normal distribution CCDF plot made in R. I need to apply Markov inequality to this data and plot them at this same plot. How can I implement it? Any help is welcome. My data and what I have: ...
pnlp's user avatar
  • 35
3 votes
1 answer
72 views

I have been trying to learn prolog but I am having issues with limiting the possible integers that can be used in my solutions. For example, In my SWI terminal, I ran [X,Y,Z] ins 0..1,X #\= Y, Y #\= Z,...
Spencer Woolfson's user avatar
3 votes
1 answer
243 views

I have a definition involving match, similar like this: Definition five (n: nat): bool := match n with | 5 => true | _ => false end. I try to proof something similar like this: Theorem fiveT: ...
Leo G.'s user avatar
  • 53
-1 votes
4 answers
1k views

I have a char array and I want to check if it is null. if(_char_array[0] != '\0') {...} is the same as if(_char_array != '\0') {...} thanks
KostasA's user avatar
  • 5,718
0 votes
1 answer
91 views

I have a set of two arrays of numbers, and I need to find 3 indices of these arrays, such that 2 inequalities using the arrays are satisfied. We can assume the value of one index to simplify the ...
D. Brown's user avatar
  • 101
0 votes
1 answer
260 views

I've been looking for an algorithm that helps me to create the best possible diet based on a certain amount of nutrients. After a lot of research and attempts, it didn't succeed. But I found something ...
Vinnicius Pereira's user avatar
0 votes
1 answer
539 views

Is there a simple way to compare multiple values to a single value in Javascript ? Like, instead of writing : if (k != 2 && k != 3 && k!= 7 && k!12) Writing something like : ...
JS1's user avatar
  • 767
2 votes
1 answer
427 views

I have a set of polynomial equations and linear inequalities for real numbers. How can I determine whether a solution exists? I need no symbolic solution or a guarantee that the answer is correct, but ...
user505117's user avatar
-2 votes
1 answer
326 views

I am stuck for quite a while now on the following task: find the smallest integer N, such that A^N < N! I want to do this in C# and A can be so big that there is no type that can store the results. ...
Neralem's user avatar
  • 118
1 vote
0 answers
393 views

I have this code that shows the area that satisfies inequalities but I need the lines (x=3 and y=x) to be shown on the graph as well. Any help is appreciated! My Code: from sympy import * x, y, z, t = ...
George Alderman's user avatar
0 votes
0 answers
293 views

I'm looking to create a program that will randomly generate lines (that are inequalities) and that will show the area that satisfies the constraints. If possible axes would go from 10 to -10 but I'm ...
George Alderman's user avatar
0 votes
1 answer
44 views

I have a table and sample data as below. create table MyTable ( Col1 NUMBER, Col2 VARCHAR2(30) ) MyTable Col1 Col2 1 | Val1 2 | Val2 3 | Val3 4 | Val4 Below is the query which is ...
user2488578's user avatar
2 votes
1 answer
96 views

Given a set of variables and a set of strict inequalities, it's straightforward enough to detect whether there is an inconsistency: make a directed graph whose nodes are variables; for each assertion ...
rwallace's user avatar
  • 34.2k
1 vote
1 answer
883 views

I need to find the rectangle with max area inside an ellipse (which may be tilted). The goal is to gerealize this problem to N dimension, so when we set N=2 we find our rectangle iside an ellipse. ...
Artashes's user avatar
  • 138
1 vote
0 answers
41 views

I am using Matlab to solve the inequality VR2>VR1 in terms of k. The equations are When solve the inequality by hand, I get an answer of 2αy > k. When I use Matlab, I get 2αy+1 > k or empty ...
Nick's user avatar
  • 11
-1 votes
1 answer
677 views

I don't know why I can not access the data from flutter while using two "where". can any help me to solve this? what I want is to get all the documents between a period of time Error The ...
FTF Studio's user avatar
0 votes
1 answer
50 views

I am performing a self join in Hive and doing aggregations (percentile) on the window included in the join condition and I am getting the following errors - Error1: FAILED: SemanticException Line x: ...
User's user avatar
  • 57
1 vote
0 answers
248 views

I am estimating successful Concentration Index into programming language R with IC2 package. Below you can see function and results library(IC2) data(hhbudgets) calcSConc(hhbudgets[, "transporte&...
silent_hunter's user avatar
1 vote
1 answer
297 views

In the below data frame I'd like to evaluate the following compound inequality: df['B'] <= df['E'].shift(1) <= df['A'] df A B C D E F G Date ...
jgg's user avatar
  • 831
0 votes
1 answer
201 views

I want to define an inequality constraint for a PYMC3 model. I found this post about defining an equality constraint (i.e., a+b1+b2=1) using pm.Potential. Does anyone know how to change that equality ...
H2H's user avatar
  • 41
0 votes
2 answers
180 views

I have a sub goal that is of the following form: ~ (My_term1) < (My_term2) where My_term1 and My_term2 are both real numbers. Is there a way to rewrite it as (My_term1) >= (My_term2) ? I tried ...
Musher Soccoli's user avatar
-1 votes
3 answers
75 views

I am trying to split an array into three new arrays using inequalities. This will give you an idea of what I am trying to achieve: measurement = [1, 5, 10, 13, 40, 43, 60] for x in measurement: ...
triviums's user avatar
0 votes
1 answer
707 views

I want to solve a system of nonlinear inequality equations, Simplify as follows: 12<xy<14 and 2x + 3*y>40, is there any way to find the minimum of x using python, i konw how to solve linear ...
ELLEN's user avatar
  • 65
-3 votes
1 answer
2k views

I am trying to compare two big ints. I'm looking at the docs: https://pkg.go.dev/math/big#Int and I don't see an inequality operator, but I do see an equality one (Cmp). How am I meant to compare a ...
Luke's user avatar
  • 23
0 votes
0 answers
165 views

In PHP, is there any way to express a two-sided inequality like this: if( 10 <= $your_price < 15 ){echo 'Bingo!';} without having to do if( 10 <= $your_price and $your_price < 15 ){echo '...
ptrcao's user avatar
  • 423

1
2 3 4 5 6