enter image description here I want the price to recursively take the ID subtract percent from Price recursively using the output of previous line. ...

Calculate in recursive manner in Snowflake

enter image description here I want the price to recursively take the ID subtract percent from Price recursively using the output of previous line. ...

Finding twelve 32-bit numbers with at least 17 bit differences between pairs

Find twelve 32-bit numbers such that each pair of them differs by bits in at least 17 positions. I'm struggling to find and optimal algorithm for thi ...

How to compare two objects in a Pair and return the max one

I have an object of type Pair<Object1, Object2>, now I'm trying to return the object in which the comparison of its values is lower. I see in k ...

Count Min Binary Operations in Python

Problem: Given a positive integer n, in a single operation, choose any i >= 0 and convert n to n + 2^i or n - 2^i. Find the minimum number of opera ...

draw arc with different arguments

I'm using Pygame to draw some shapes on the screen. The problem is, I get those shapes from a different application, which exports a txt with the para ...

Recurrence Equation Simplification

Given a pseudocode like this: The main cost is the cost given by the two recursive calls. The dimension of this two recursive calls should be in my ...

Compute Bernoulli numbers with Python recursive program

I'm trying to solve a problem about Bernoulli numbers using Python. The aim is to output the numerator and the denominator of the $n$-th Bernoulli num ...

Why my python Armstrong number code doesnt work

So ive done an armstrong number code using python and it works fine till the sum of individual digits but after that it doesnt work i will type the co ...

Reduced Row Echelon Implementation in Java

. Answers to this question are eligible for a +200 reputation bounty. L ...

Using sfepy to solve a simple 2D differential euqation

I am trying to learn sfepy. To that effect I want to solve the differential equation On a triangle domain (2D). There';s 2 things I don't understa ...

Change value based on another value dynamically

Can't figure out math formula for changing one value based on another. enter image description here I wanna do mechanic where player gets bigger when ...

Can SMT solver like Z3 prove 1+2+...+n = n(n+1)/2?

The theorem 1+2+...+n = n(n+1)/2 seems to be provable by first translating it to CNFs and repeatedly applying resolution rules to them, as discussed i ...

How to convert grid number to coordinates when the rows alternate order

In this grid, the mapping of the numbers to coordinates is shown above. I'm struggling to come up with a formula where given the number of the grid ...

how to express Chebyshev sequence constants for function approximations in an interval other than [-1,1]?

To approximate the function with Cheboshev polynomials, it is necessary to operate on the interval [-1,1]. How can these constants be recalculated if ...

Apply pseudo-color palette to canvas image

How to apply a custom palette to a canvas image? for example, turn a black-white image to a color image: so the imageData.data is an array of 0 ...

How do you reduce compound inequalities in sympy? (4 < x - 8 < 10)

Using sympy solve() or reduce_inequalities() works fine for non compound inequalities like 2 - 6 * x <= -4 but it cannot do compound ones. Is ther ...

How to square the second largest number in an array

I'm trying to find the 2nd largest number in an array, and square this number. arr = [1,8,6,2,5,4,8,3,7] should return 49 (7 squared) arr = [1,1] sh ...

How to calculate coordinates of tangent points?

I need to make a svg file for a project and I need some parameters that I haven't figured out how to calculate yet. I have a point of coordinates x1,y ...

calculate if number bigger than defined percent of numbers in list without storing list in memory after first calculation

I have percent value and list with fixed length (mean that list must always has same length). In loop inputting x with type int. Task is to know if x ...

Sympy subs does not working for subexpression. Is there a way to solve this?

subs (from sympy library in Python) does not replace a subexpression in all cases except simple ones. MATLAB copes with this task perfectly. Is it pos ...

Sorted:

Quality: