MCODE: Fastest way to multiply
|
04-16-2019, 10:29 PM
Post: #9
|
|||
|
|||
RE: MCODE: Fastest way to multiply
Language of Mathematics - very droll!
I meant this stuff:- Do you know what programming language this is? #include "m_apm.h" #include "mapm_np2.c" // next powers of 2 /* * FFT_MUL = 0 -> div-and-conq ONLY * FFT_MUL = 1 -> fft mul ONLY, fatal if overflow * FFT_MUL = 2 -> fft mul AND div-and-conq */ /* * MAX_FFT_BYTES *must* be an exact power of 2 * * **WORST** case input numbers (all 9's) has shown that * the FFT math will overflow if the MAX_FFT_BYTES >= 1048576 * * the define below allows the FFT algorithm to multiply two * 524,288 digit numbers yielding a 1,048,576 digit result. */ #if FFT_MUL #define MAX_FFT_BYTES 524288 void M_fast_mul_fft(UCHAR *, UCHAR *, UCHAR *, int); #else #define MAX_FFT_BYTES 8 /* NOT using FFT */ #define M_fast_mul_fft(r,a,b,sz) M_4_byte_mul(r, a, b) static void M_4_byte_mul(UCHAR *, UCHAR *, UCHAR *); #endif #define DATA(r) r->m_apm_data #if FFT_MUL != 1 void M_fmul_div_conq(UCHAR *, UCHAR *, UCHAR *, int); static void M_fmul_dc2(UCHAR *, UCHAR *, UCHAR *, UCHAR *, int); static void M_fmul_add(UCHAR *, UCHAR *, UCHAR *, UCHAR *, int); static int M_fmul_sub(UCHAR *, UCHAR *, UCHAR *, int); #endif Leave the Planet (tlalticpac) in a better shape than when you first found it. Denny Tuckerman |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
MCODE: Fastest way to multiply - PeterP - 04-15-2019, 03:58 PM
RE: MCODE: Fastest way to multiply - Albert Chan - 04-15-2019, 05:07 PM
RE: MCODE: Fastest way to multiply - PeterP - 04-16-2019, 07:07 PM
RE: MCODE: Fastest way to multiply - Valentin Albillo - 04-15-2019, 07:50 PM
RE: MCODE: Fastest way to multiply - Gerson W. Barbosa - 04-16-2019, 01:59 AM
RE: MCODE: Fastest way to multiply - Valentin Albillo - 04-17-2019, 11:24 PM
RE: MCODE: Fastest way to multiply - Albert Chan - 04-15-2019, 10:22 PM
RE: MCODE: Fastest way to multiply - Leviset - 04-16-2019, 03:09 PM
RE: MCODE: Fastest way to multiply - ijabbott - 04-16-2019, 07:34 PM
RE: MCODE: Fastest way to multiply - Leviset - 04-16-2019 10:29 PM
RE: MCODE: Fastest way to multiply - Albert Chan - 04-16-2019, 11:04 PM
|
User(s) browsing this thread: 1 Guest(s)