FHT multiplication error


I was running some calculations which deal with several numbers of equal length. It's a fairly complex process but they are being multiplied and divided in such a way that their lengths remain the same. Everything was working fine until i increased my number of decimals from 300 000 to 310 000. Then I started getting errors with impossible numbers. I've narrowed it down to the multiplication of one very large number with a 2-digit number (also type IntX). After trying out all the GlobalSettings, the only thing that made it continue working was changing the multiplication mode from FHT to Classic.
I've tried pinpointing the error with more accuracy but that's the best description I've got, since the calculation is fairly complex. However, it is clear that result of a multiplication was wrong with FHT and always correct with Classic mode.
Closed Sep 8, 2013 at 3:50 PM by Oyster


Oyster wrote Jan 16, 2010 at 4:41 PM

I know that precision loss is possible with FHT multiplication - now I have placed this info on home page. However, I was concerned that IntX library knows how to avoid it - it appears that I was wrong. The problem is that I can't reproduce your issue - can you please provide me with more detailed steps to reproduce it?
Btw, I recommend you to download the latest release of IntX which is 0.9.3 - in this release I've added code which checks FHT result validity and thrown an exception if some digits were calculated incorrectly (or at least I hope it will behave this way).

wrote Feb 14, 2013 at 2:28 AM

wrote Sep 8, 2013 at 3:50 PM