07-21-2018 10:05 AM
In CVI when multiplying two 64-bit integers the result by default is the lower 64-bits of the multiply.
Is there an easy way to get the upper 64-bits?
Tx,
Matt
07-22-2018 03:22 PM
maybe this code helps: (I did not try it) https://www.codeproject.com/Tips/618570/UInt-Multiplication-Squaring
07-24-2018 07:30 PM
Splitting the long long up into 2 longs and doing 4 long multiplies and adds is what I had been doing. I was hoping that there was some CPU instruction that I could get at that would give me the upper product directly which would really cut the computational time of extended arithmetic dramatically. Apparently there is not, since I can't find any reference to it on my others searches.
Tx,
Matt
07-25-2018 09:48 AM
Yeah unfortunately I think splitting it up into two 32-bit then performing 4 multiplication operations is probably going to be your best bet as CVI doesn't have built-in functionality for this and doesn't support 128-bit numerics.