Suppose I define a vector/list like this: v = {x + 3 y, z – x} It can be expressed as a matrix vector multiplication m.vars: vars = {x, y, z}; m = { {1, 3, 0}, {-1, 0, 1} }; v == m.vars (* True *) Is there a built-in function to get thisRead more
Suppose I define a vector/list like this: v = {x + 3 y, z – x} It can be expressed as a matrix vector multiplication m.vars: vars = {x, y, z}; m = { {1, 3, 0}, {-1, 0, 1} }; v == m.vars (* True *) Is there a built-in function to get thisRead more
Help me, please. Check my code.Did I do everything right? There is an assignment: Implement the function to find the combination of 4 digits in a row which gives the max multiplication. If object is not a string or there are no combinations found – return nil. If combination is found – return it’s multiplicationRead more
I have three lists of matrices A1, A2, A3 with ten elements each of them. When I define the function: F[i_,j_,k_]:= A1[[i]].A2[[j]].A[[k]] Mathematica does not evaluate the matrix multiplication in the output. How do I get the output to be a simple matrix when evaluating?Read more
I want to implement an elliptic curve point multiplication (Q=dG) operation with libgcrypt (gcrypt). I write the following code: #include <stdio.h> #include <string.h> #include <stdlib.h> #include <gcrypt.h> //select and insert key and curve parameters char *key521 = “(key-data\n” ” (public-key\n” ” (ecc\n” ” (curve NIST P-521)\n” ” (q #00F2271E305679EBF9D7673FBF75EEA22E90D100A9E0B5DE30C500411E91710D05826F17F2C33A9527CC6799553C626C015ED666F63A4D5CEB27CDBE61F34DB0AF#)\n” ” )\n” ” )\n” ” (private-key\n”Read more
I’m trying to test parallel matrix multiplication with commands: $ ConfiguredKernels CloseKernels[]; LaunchKernels[1] m1 = RandomReal[{-10, 10}, {2000, 2000}]; mykernel = First[Kernels[]]; startT1 = AbsoluteTime[]; ParallelEvaluate[a1 = m1.m1, mykernel]; runtime1 = AbsoluteTime[] – startT1; CloseKernels[]; LaunchKernels[2] mykernels = Kernels[]; startT2 = AbsoluteTime[]; ParallelEvaluate[a2 = m1.m1, mykernels]; runtime2 = AbsoluteTime[] – startT2; Print[runtime1, ” “, runtime2]Read more
I needed a simple way for my son to be able to finish his homework for the week with flashcards in multiplication. So instead of getting out the markers and scissors I wrote this as a simple way to choose what numbers we are practicing for the week. I simplified the points system so theRead more
I need to calculate the speed difference between performing a Montgomery Multiplication page 602-603 with a word-size/register of size 32 vs. 64. So far, this is what I understand: $ x$ and $ y$ are represented by multiple-word arrays of length $ n$ where $ n = \frac{m}{w}$ , and $ w$ is the registerRead more