Re:Show HN: Matrix Multiplication with Half the Multiplications
by yorwba on Friday March 15, 2024 @09:23AM
(#39715184)
On the other hand, if you tried it with floating point, you'd lose significant digits. Since the approach is to sum (a[i] + b[i+1])(a[i+1] + b[i]) and subtract the sums of a[i]a[i+1] and b[i]b[i+1] in the end to get a[i]b[i] + a[i+1]b[i+1], you may be taking the difference of two large values to get a small value, losing precision.
[ Parent
| on HN ]
Re:Show HN: Matrix Multiplication with Half the Multiplications
by tmp8086 on Friday March 15, 2024 @01:23PM
(#39718254)
Here's a matrix multiplication using Winograd's algorithm (that you describe), implemented in Go (very small code):
https://bugfix-66.com/983cb3a3a37dbe8e82edea6298988f03d2a1a4...