# Anyway to get rid of `math.floor` for positive odd integers with `sympy.simplify`?

I’m trying to simplify some expressions of positive odd integers with sympy. But sympy refuses to expand floor, making the simplification hard to proceed. To be specific, x is a positive odd integer (actually in my particular use case, the constraint is even stricter. But sympy can only do odd and positive, which is fine).… Read More Anyway to get rid of `math.floor` for positive odd integers with `sympy.simplify`?

# Sympy is not doing the substitution of a symbol with a value when it has a specified assumption

I’m using the subs method to replace certain parameters in an expression with values prior to solving the equation. The following simple example works fine: from sympy import Symbol Q = Symbol("Q") exp1 = Q + 1 print(exp1.subs({‘Q’: 1})) # prints 2 However, if the symbol has an assumption such as real or positive specified… Read More Sympy is not doing the substitution of a symbol with a value when it has a specified assumption

# how to change int to Binary value

Hi everyone I have a problem to change my data into binary, It’s not so complicated just using basic math like if a = 60 then the result is "good" and when a >= 60 then it is "very good". but this is implemented in the data below : enter image description here This is… Read More how to change int to Binary value

# Python's sympy struggling to solve simple equality

I have been solving a problem, and I have gotten to a pretty simple equality which I could solve on my calculator, but Sympy for some reason seems to struggle. These are in short the problematic lines of code: import sympy V = sympy.symbols(‘V’) eq = sympy.Eq(1.0 – 1.0*sympy.exp(-0.00489945895346184*V), 0.98) sol = sympy.solve(eq,V) I get… Read More Python's sympy struggling to solve simple equality