An arithmetic expression is an expression that results in a numeric value. There are two kinds of numeric values, integers (whole numbers), and real or floating point numbers (numbers containing a decimal point).
Questions tagged [arithmetic-expressions]
677 questions
-1
votes
1 answer
Arithmatic Operations On Columns Using Same Columns
I have a column and I want to perform some arithmetic operation on the same column using the same column
Price
---------
10
11
12
12
14
14
14
14
If I want to know rows with Price=14 then I can write a simple select query with where clause
select *…

user3198755
- 477
- 2
- 10
- 21
-1
votes
3 answers
How to find largest sum of divsors of a number between 2 and N?
I have a simple math problem. I want to find a number in the range [2,N] (excluding 1 and N from the divisors) with the largest sum of divisors. For example, for N = 100 the number with the highest sum of divisors between 2 and 100 is 96, which has…

Rami Raghfan
- 151
- 12
-1
votes
1 answer
Need Help/Feedback with Adding together two times in python
I am currently working on a program regarding clock arithmetic. My program asks the user for two separate times, in standard format and in military time [HH:MM:SS]. I then add those two times together to get my final result. I need help with two…
user10356373
-1
votes
2 answers
how to step over through next iteration?
store_array = list()
test_case = input()
for i in range(int(test_case)) :
number1 = input()
number2 = input()
store_array.append(int(number1))
store_array.append(int(number2))
j=0
def add(x,y):
for j in store_array:
…

Thiyagu
- 49
- 2
- 6
-1
votes
1 answer
How to use divided by 1000 as CPU optimization?
I am using small embedded PCIe based hardware, which is having a very low-end processor, based on the operation and firmware size, I am consuming all of its resources. To do CPU optimization what are the steps I can do?
I have tried to move…

Dipankar
- 141
- 2
- 9
-1
votes
3 answers
Floor divison operator applied to a list in Python
def median(numbers):
numbers.sort()
if len(numbers) % 2:
# if the list has an odd number of elements,
# the median is the middle element
middle_index = int(len(numbers)/2)
return numbers[middle_index]
…

doer76
- 11
- 6
-1
votes
1 answer
How does this arithmetic expression works?
$x = 5 /* + 15 */ + 7;
echo $x;
The output of this code is 12.
Can anybody explain me how this works?

Ranjoy Konsam
- 13
- 7
-1
votes
1 answer
Division in Python int (1000000000000000000/3)=333333333333333312
In Python
int (1000000000000000000/3)=333333333333333312
But it should be:
int (1000000000000000000/3)=333333333333333333
I am new to python.

shashank jaiswal
- 11
- 1
- 3
-1
votes
3 answers
In an R dataframe, if I want to change a column value to another value, but only if it equals 3 different things
I have a data frame in R called QCEW_County_Denominated. In this data frame I have a column called Industry. Whenever the value of this column is [31-33], [44-45], or [48-49] - actual values - not value ranges, I would like to change the value to…

J.Jack
- 51
- 8
-1
votes
1 answer
Apply arithmetic transformation on a text file column bash
I have large csv text files with multiple columns and I would like to apply an arithmetic transformation on, say, column11 using variables in column6 and column12.
The transformation would be as…

Buzz
- 516
- 7
- 21
-1
votes
3 answers
C arithmetic precedence
I stumbled upon a question about arithmetic precedence in a test and I cannot wrap my head at all around its answer.
float x = 5 % 3 * + 2 - 4.5 / 5 * 2 + 2;
My "understanding" right now is that multiplication must take place first before division…

purewatashi21
- 151
- 3
- 12
-1
votes
1 answer
Changed default time zone messed up count downs
I changed my default time zone in my php.ini from Europe/Berlin to another time zone and suddenly my login throttling lockout count down got mixed up it is showing the remaining 15 minutes in seconds but it is counting up instead of counting down ,…

Serjio
- 209
- 2
- 10
-1
votes
2 answers
multiplication of dataframes with differnet lengths
I have two dataframes: the both have 5 columns, but the first one has 100 rows, and the second one just one row. I should multiply every row of the first dataframe by this single row of the second, and than summarize the value of columns in each row…

Amanda
- 835
- 2
- 9
- 17
-1
votes
1 answer
Conditions for interchange modulos
I've been working on a problem and hope someone can help me with this (probably this has already been studied, I don't know).
For a given a and to numbers m and n, are there any special conditions for the equality
(a (mod m))(mod n)=(a (mod n))(mod…

liwuen
- 330
- 2
- 17
-1
votes
1 answer
Mysql error nested arithmetic in select
When i am trying to execute this procedure it is showing an error.
USE `metro`;
DROP procedure IF EXISTS `transaction`;
DELIMITER $$
USE `metro`$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `transaction`(
IN amount_p INT,
IN id_in INT,
IN id_out…

Sandeep Rana
- 3,251
- 2
- 24
- 38