Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [math]

Math involves the manipulation of numbers within a program. For general math questions, please ask on math.stackexchange.com. Note: If your question is about unexpected results in floating point calculations, please read https://stackoverflow.com/questions/588004/is-floating-point-math-broken first.

-7 votes
0 answers
72 views

simple problem that can be solved manually but its impossible to come up with a mathematical solution [closed]

Algorithm to Optimize Label Making Machine Configurations Hello everyone, I’m currently facing a challenge with optimizing the configurations for our label making machines and would appreciate any ...
Adahan Onur Uğuz's user avatar
0 votes
1 answer
41 views

Minimal cost to set the springs to the same length [closed]

I am working on the following task: You are given a sorted collection of springs. Each of them has been produced in certain dimensions, and each stretching, or compression, requires quite a bit of ...
randomAlgo's user avatar
1 vote
0 answers
47 views

How do I allow decimal numbers in this program? [duplicate]

class QuadraticFormula: def __init__(self, a, b, c): self.a = a self.b = b self.c = c def quadraticFormula(self): try: root1 = (-(self.b)+((self.b ...
TaranJS's user avatar
  • 25
-4 votes
0 answers
46 views

im trying to create a code in python that calculates pi using two approaches using AI. Help AI not good. New to coding [closed]

import math import pandas as pd import matplotlib.pyplot as plt from itertools import combinations_with_replacement, permutations # Define necessary functions def primes_with_values(max_value, ...
Gegogabanana's user avatar
-1 votes
0 answers
16 views

How to limit a character velocity Vector3 to an ellipse in Unity

I was trying to make a Unity character controller where the x and the z speeds are different. So I needed to make it so the speed of the character can be described as an ellipse. I can only think of ...
DukeDookie's user avatar
0 votes
0 answers
41 views

3D Triangle doesn’t rotate properly with Camera

I have been trying to make a program where I can enter three coordinates in a right-handed coordinate system that will then form a triangle while a camera rotates around the triangle. From my ...
Thomas2806's user avatar
0 votes
0 answers
48 views

Calculate percentage with chances less than 1% in java [closed]

I want to receive a random result based on their chance. For example if there are 5 cases: A = 50%, B = 37,5%, C = 10%, D = 2,4%, E = 0,1% What would the correct algorithm be to calculate their ...
Rengobli's user avatar
-14 votes
0 answers
68 views

Python Math question : (2**3+(5+6)**(1+1)) =? [closed]

(2**3+(5+6)**(1+1)) = ? If you can provide a step-by-step solution, I would greatly appreciate it. The computer showed me the answer, but I just didn't know how it got it. So if you can, it would be ...
Doris VAN's user avatar
0 votes
0 answers
56 views

Algorithm to calculate number of buckets of different sizes required to minimise wastage [closed]

I am working on a problem at work where we have paint buckets of different sizes and we need to create a calculator that, given a required quantity of paint, will calculate the required quantity of ...
Raza_Loba's user avatar
0 votes
1 answer
59 views

How to use beta function in modelica [closed]

When I define a calculation in modelica, I need to use the beta function, but I can't find the beta function in the library. How can I use the beta function in modelica, or implement a beta function? ...
errhu doong's user avatar
-1 votes
0 answers
21 views

How to simplify a list of CSS translations and rotations? [closed]

I have this type of CSS transform: transform: translate3d(a1, b1, c1) rotate[X,Y,Z](r1) translate3d(a2, b2, c2) rotate[X,Y,Z](r2) ... The rotations can be rotateX, rotateY or rotateZ. I always have a ...
Romain F.'s user avatar
  • 782
0 votes
1 answer
47 views

How do I assign multiple variables to a single argument in a function in python?

I am trying to make a program where it takes a trinomial and factors it, if possible. Whenever the user inputs A, B, and C, the trinomial is supposed to be taken through the factor(product, summation) ...
marc77's user avatar
  • 7
0 votes
2 answers
32 views

Is it possible for a quaternion to represent a rotation pass 180 degree?

I am wondering if quaternions can be used to represent a rotation that is beyond 180 but below 360 degrees? I am asking this in the context of Unreal Engine's FQuat library where my combined ...
Jacky Lin's user avatar
-6 votes
2 answers
107 views

Summation of a abnormal complex series [closed]

In a recent cmpetitive programming contest, I faced a problem. I have found: 1 + (1 + 2) + (1 + 2 + 3) + ........... + (1 + 2 + .... + n) = ? I tried using 2 nested loops: for (int i = 1; i <= n; ...
user avatar
-3 votes
0 answers
84 views

Calculation for propotional position based on timestamp [closed]

I'm currently working on a solution to the following problem Problem: Based on timestamp, determine its position value as proportionally as possible. Current Formula: position= min_position+(...
Minorsee's user avatar

15 30 50 per page
1
2 3 4 5
2959