multiplication Questions
2
Solved
I have 2 pandas DataFrame that I want to multiply:
frame_score:
Score1 Score2
0 100 80
1 -150 20
2 -110 70
3 180 99
4 125 20
frame_weights:
Score1 Score2
0 0.6 0.4
I tried:
import pandas a...
Trespass asked 31/7, 2017 at 17:11
3
Solved
What is the guaranteed accuracy of multiplication operator for double values in java?
For example, 2.2 * 100 is 220.00000000000003, but 220 is a double number. 220.00000000000003 is the next doub...
Frear asked 23/6, 2011 at 19:6
1
Solved
I'm trying to make my own library for the elliptic curve.
Some things work, but some others don't.
To calculate a public key from a private key, you should multiply the Generator Point with the pr...
Serene asked 16/7, 2017 at 21:33
2
Solved
i have a issue with my Listview, i want to set a countdown timer to all ListView's items, and i allready have googled a solution for this, but it isn't work correctly. The Problem is that ListView ...
Bair asked 28/11, 2013 at 11:52
1
Solved
I'm trying to make a simple query in elasticsearch but I can't figure out how to do it. I searched all over the internet and there was no discussion on this situation.
Let's say I have items like ...
Frentz asked 20/4, 2017 at 0:39
2
Solved
I compiled the following program:
#include <stdint.h>
uint64_t usquare(uint32_t x) {
return (uint64_t)x * (uint64_t)x;
}
This disassembles to:
0: 89 f8 mov eax,edi
2: 48 0f af c0 imul...
Intine asked 3/3, 2017 at 20:10
4
Solved
I have implemented a list of all prime numbers from a set amount.
What I'm trying to do is hard to explain so I'll just show it with some hard code:
euclst = []
euclst.append((primelst[0]) + 1)
eu...
Godbey asked 21/1, 2017 at 20:32
5
Solved
I have three integers A, B (less than 10^12) and C (less than 10^15). I want to calculate (A * B) % C. I know that
(A * B) % C = ((A % C) * (B % C)) % C
but say if A = B = 10^11 then above expre...
Sordino asked 7/1, 2014 at 12:40
2
Solved
I have two 128 bit numbers in memory in hexadecimal, for example (little endian):
x:0x12 0x45 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
y:0x36 0xa1 0x00 0x00 0x00 0x00 ...
Billet asked 24/11, 2016 at 22:55
4
I would like to know if there is a way to perform any multiplication or division without use of MUL or DIV instruction because they require a lot of CPU cycles. Can I exploit SHL or SHR instruction...
Retentive asked 13/1, 2015 at 12:48
3
I need to perform a simple multiplication of 400 * 256.3. The result is 102520. Straight forward and simple. But to implement this multiplication in C++ (or C) is a little tricky and confusing to m...
Vatic asked 14/11, 2016 at 9:39
4
Solved
I got this C code.
#include <stdio.h>
int main(void)
{
int n, d, i;
double t=0, k;
scanf("%d %d", &n, &d);
t = (1/100) * d;
k = n / 3;
printf("%.2lf\t%.2lf\n", t, k);
...
Bedding asked 27/2, 2010 at 1:37
1
Solved
I'm using the dataset BreastCancer in the mlbench package, and I am trying to do the following matrix multiplication as a part of logistic regression.
I got the features in the first 10 columns, a...
Townie asked 30/10, 2016 at 1:9
2
Solved
Say that I have a matrix:
A = [ 1 2 3 ; 4 5 6 ; 7 8 9 ; 10 11 12];
Is there a way to multiply :
row 1 by 1
row 2 by 2
row 3 by 3
and so on?
I am able to do this with for loops, however it if fo...
Daegal asked 19/10, 2016 at 1:24
1
Ignoring all the other issues like memory transfer, etc.
I'm looking for some measure of the "cost", which I guess I would quantify as the expected number of bit flips, for multiplying two random ...
Fragile asked 27/9, 2016 at 8:6
2
I've been familiar with the famous question of implementing multiplication using addition, or exponentiation using multiplication, using algorithms of looping or bit-shifting and adding shift...
Ringler asked 14/9, 2016 at 8:41
1
Solved
I have two quaternions: Q1= w0, x0, y0, z0 and Q2 = w1, x1, y1, z1. I would like to multiply them by using NumPy or Python function which can return 2-d array. I found some pseudocodes on the...
Awn asked 17/8, 2016 at 15:30
1
Solved
When looking at the assembly produced by Visual Studio (2015U2) in /O2 (release) mode I saw that this 'hand-optimized' piece of C code is translated back into a multiplication:
int64_t calc(int64_...
Colon asked 20/6, 2016 at 14:30
2
I am trying to find the square of a int. My code looks like below:
long long sqr=0;
int num=77778;
sqr= num*num;
The result should have been 6049417284
But when I check the output it shows...
Pause asked 10/6, 2016 at 6:0
2
Solved
I want to vectorize the multiplication of two memory aligned arrays.
I didn't find any way to multiply 64*64 bit in AVX/AVX2, so I just did loop-unroll and AVX2 loads/stores. Is there a faster way...
Dandiprat asked 18/5, 2016 at 10:1
2
Solved
Due to the nature of floating-point math, .4 * .4 = 0.16000000000000003 in Julia. I want to get the mathematically correct answer of 0.16, in a CPU-efficient way. I know round() works, but that req...
Guanine asked 15/5, 2015 at 16:48
5
Solved
I have an array called $times. It is a list of small numbers (15,14,11,9,3,2). These will be user submitted and are supposed to be minutes. As PHP time works on seconds, I would like to multiply ea...
Indebtedness asked 17/4, 2010 at 21:30
2
Sometime back this question (now deleted but 10K+ rep users can still view it) was posted. It looked interesting to me and I learnt something new there while trying to solve it and I thought that's...
Ratel asked 16/3, 2016 at 19:43
2
Solved
Why does an assignment of the form int = int * double give an error, and an assignment of the form int *= double does not give an error (in Java)?
Example:
public class TestEmp {
public s...
Langue asked 13/3, 2016 at 22:22
2
Solved
We (people) take more time to multiply, add, divide and subtract two large numbers than two small numbers.
Does a computer take more time to multiply 5 * 2 than say 51234 * 987654 or is the operat...
Zymosis asked 8/3, 2016 at 13:26
© 2022 - 2024 — McMap. All rights reserved.