Top "Division" questions

In mathematics, division (÷) is an arithmetic elementary operation.

Check if a number is divisible by 3

I need to find whether a number is divisible by 3 without using %, / or *. The hint given was to use atoi() …

division modulo integer-division
How do you calculate div and mod of floating point numbers?

In Perl, the % operator seems to assume integers. For instance: sub foo { my $n1 = shift; my $n2 = shift; print "perl's …

perl math floating-point division modulo
x86 assembly multiply and divide instruction operands, 16-bit and higher

I'm rather confused about how the multiply and divide operations work in x86 assembly. For example, the code below doesn't …

assembly x86 division multiplication
Float divison and casting in Swift

I'm trying to learn Swift and I made a simple average function: func average(numbers: Int...) -> Float { var …

casting swift division
MATLAB division... should 29/128 return 0?

I really don't think this is a precision problem, the answer should be about 0.226. Here's the exact code: val = I(…

matlab division integer-division
What is the fastest algorithm for division of crazy large integers?

I need to divide numbers represented as digits in byte arrays with non standard amount of bytes. It maybe 5 bytes …

algorithm math byte division digit
Fast multiplication/division by 2 for floats and doubles (C/C++)

In the software I'm writing, I'm doing millions of multiplication or division by 2 (or powers of 2) of my values. I …

c++ c optimization division multiplication
How can I perform divison on a datetime.timedelta in python?

I'd like to be able to do the following: num_intervals = (cur_date - previous_date) / interval_length or print (…

python date datetime division timedelta
Is MOD operation more CPU intensive than multiplication?

Why is MOD operation more expensive than multiplication by a bit more than a factor of 2? Please be more specific …

c++ division multiplication
Regular Expression for Binary Numbers Divisible by 5

I want to write a regular expression for Binary Numbers Divisible by 5. I have already done the regular expressions for …

regex binary division