Most voted "division" questions
Division is the inverse mathematical operation of multiplication. The act of dividing by an element of a set only makes sense when multiplication by that element is a bijective function.
Learn more…25 questions
Sort by count of
-
13
votes3
answers799
viewsFloats module in PHP returns integers?
How do I get the rest of the division (operation module %) with decimal places when using a divisor or dividend float? Example: echo 5 % 3; // imprime 2 como é esperado echo 5.6 % 3; // imprime 2…
-
4
votes3
answers1099
viewsHow to divide the elements of a matrix by the average of its column
I need to divide the elements of a matrix by the respective average of its column, as I can do this, there is some function to perform this simple operation? Considering the matrix: > A <-…
-
3
votes6
answers22035
viewsCompute the rest of a decimal division in Javascript
I’m working with values (decimal(18,2)) a sale where the sum of the price of the products is to be converted into a number of parcels. So that I can divide the total of the products exactly for the…
javascript mathematics decimal monetary-value divisionasked 8 years, 11 months ago LeandroLuk 4,989 -
3
votes1
answer301
viewsException divided by zero in Java
Why this generates an Arithmeticexception / by zero: for (int i = 1; i <= 5; i++) { System.out.println(i); int a = i / 0; System.out.println(a); } And that’s not (print "Infinity")? for (int i =…
-
2
votes1
answer996
viewsDivision by zero into double = Infinity result
I was learning about error handling in the Java language and did tests with the sample code of the class in question. In a test I added (double) in the final operation to make the result more…
-
2
votes3
answers378
views -
2
votes2
answers103
viewsUnexpected result
I wish to carry out the division of two integers and have as a result a floating point value. The following code works normally: #include <stdio.h> float divInts(int x, int y) {…
-
1
votes2
answers155
viewsHow not to lose the decimals when doing "longProperty1.divide(longProperty2)"?
What I want to do is very simple, I just don’t know how to "do it right" in Javafx: I have two Longproperty (num1 and num2) and a Doubleproperty (resultado), where this Doubleproperty resultado must…
-
1
votes2
answers211
viewsJavascript function for splitting returning Nan
Faaaala staff, I have a question... Why when I pass two values per parameter in this division function is returning Nan? If I add values the variables before that is fine. But when I pass the…
-
1
votes2
answers56
viewsHow to decrease decimal numbers
How to decrease the decimal numbers of this division table ? I was thinking of putting a tofixed(), but I’m having a hard time finding a correct syntax to fit this code. how can I fix this, someone…
-
1
votes1
answer112
viewsHow NOT to round up figures?
I need an exact value but my code always rounds down: float percentageUsed = 6050492416 / 8258998272; System.out.println(String.format("Porcentagem: %.2f", percentageUsed)); In case I had to return…
-
0
votes2
answers41
viewsHow not to have Warning if I leave empty in the formula multiplication discount?
How not to have the Warning: Division by zero in if I even choose to put zero. I want to have the option to leave the price empty, but if I leave it empty, it multiplies as it is in the formula of…
-
0
votes3
answers1276
viewscode to return divisors and compare common ones
I am trying to create a code that returns the common divisors between 2 variables that receive integer numbers. And then show the common divisors. To return me the splitters I am using this code for…
-
0
votes1
answer779
viewsResult split with decimal place without rounding php
I’m trying to get a two-decimal division with no rounding. For example, I want 1000/7 to return 142.85 instead of 142.86 (The result of this account is 142.857142. I’m using number_format for this,…
-
0
votes1
answer142
viewsCalculation of Sobra VISUALG
Good evening, Colleagues! I have this problem and I cannot find a solution even in the IDE documentation. I’d like to know which command to use to pick up the leftover division to use it in the…
-
0
votes1
answer101
viewsPHP and Mysql Division without rest in PHP task division
Galley is the following need to assign tasks to a variable number of participants. EX: Through a select I got 49 tasks to be executed and I have to distribute to 4 employees. In other words the…
-
0
votes0
answers55
viewsC++: calculated float does not enter if
Hi, I need help. I’m not getting into the "if" parole with a floating number obtained after an operation. In the code below when I declare the value 0.05 enters the "if", but when I get the 0.05 by…
-
0
votes1
answer67
viewsEntire division returning a different result than expected
I’m having a problem with the entire division in python and R. The language returns a value other than "correct" in the entire division of 327 by 3.27 and the rest (%) different from 0 in these…
-
0
votes0
answers24
viewshow to place a C++ relational operator?
The exercise is to Read the value of a purchase in the Stores Your Best Purchase and show the value of the installments according to the amount of installments desired by the user. The store is…
-
0
votes2
answers102
viewsHelps to understand the Rest of Division
Boas, I’m having some difficulty understanding the rest of the division, I can calculate and get to the value of the rest and understand the formula, but in the code example described below I’m…
-
0
votes0
answers124
viewsDivision by zero in PLSQL
Hello. The Code below sometimes does not run because it is presented the error: You cannot divide by zero. I tried to do with a case, but my code is too big and the case would leave the structure…
-
-1
votes2
answers92
viewsZeroes only appear in the division
The result of division is only zero, which is wrong? #include <stdio.h> void main() { double Nota1, Nota2, MediaPond; printf("Escreva a nota 1: "); scanf("%f", &Nota1); printf("\nEscreva a…
-
-1
votes1
answer56
viewsMiscalculation of rest of division
I’m studying and setting up programs. There’s a part I put in if litro % 3.6 == 0: And when litro=36, the result doesn’t have to be true? For 36/3.6=10 and there’s nothing left. But when I put that…
divisionasked 5 years, 3 months ago Jeremias Matsumoto 1 -
-2
votes0
answers36
viewsdivision by 1/value
I’m doing some work that needs complex mathematical equations. And I’m having a problem early on, when I try to do the 1/result split, the answer is always 0,000. I have tried using double, float,…
-
-3
votes1
answer164
viewsPython Recursiveness - Rest of the division of two numbers
I’m having trouble solving a problem in Python using recursive form: Make a recursive function that gets the rest of the split between two positive integers. Example: rest(33,5) = 3 Can you please…