Bug report for GMP-4.3.0

Nikolaos Karapanos karapas at gmail.com
Fri Apr 24 15:25:34 CEST 2009


GMP version: 4.3.0 (ATTENTION: this bug does not appear in version 4.2.4)
configure options: --disable-shared
OS: Mac OS X Leopard 10.5.6
uname -a: Darwin macbook.lan 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24
17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386
compiler: gcc (both versions: 4.2.1 (Apple Inc. build 5566) and 4.0.1 (Apple
Inc. build 5490) tested)
config.guess: core2-apple-darwin9.6.0
configfsf.guess: i386-apple-darwin9.6.0
ABI: 64 (default)
make check: All tests pass
BUG DESCRIPTION:
-The bug appears only when using NTL (both version 5.4.2 and 5.5) with
GMP-4.3.0 as the primary long integer library. It  does not appear when
using GMP-4.2.4 or when not using GMP at all.
-NTL configure options: CFLAGS="-O2 -m64" NTL_GMP_LIP=on
-When performing NTL self test (make test) the LLL test fails to pass.
This is what should happen:
---------------------------------------------------------------------------------------------------------------------------
making LLLTest
g++ -I../include -I. -O2 -m64 -o LLLTest LLLTest.c ntl.a -lgmp -lm #LSTAT
running LLLTest
LLL_FP...0.004357
LLL_QP...0.010303
LLL_XD...0.01135
LLL_RR...0.134876
G_LLL_FP...0.006789
G_LLL_QP...0.029973
G_LLL_XD...0.037486
G_LLL_RR...0.356805
LLL...0.010986
LLLTest OK
---------------------------------------------------------------------------------------------------------------------------------

This is what happens instead:
-------------------------------------------------------------------------------------------------------------------------------------
making LLLTest
g++ -I../include -I. -O2 -m64 -o LLLTest LLLTest.c ntl.a -lgmp -lm #LSTAT
running LLLTest
LLL_FP...0.00498
LLL_QP...0.014741
LLL_XD...0.012085
LLL_RR...0.134105
G_LLL_FP...0.006763
G_LLL_QP...0.029863
G_LLL_XD...0.037451
G_LLL_RR...0.344583
LLL...0.010009
21,24c21,24
<
[-22117048472813176994875347828101305387293550214895606501003358101135210334068394449580864805940352220248517332813142578988
-18279971153388965686530819035296738863995571660269258101819838700402270808921084353631200820370004034839745390956452822471
29544842561630535712890793019318900007808587980735502535234502192462732717033133561978460445923201302436898584710276206134
29666573887645453112697654110484330350001370072767045692835234815647126523213288890253284796923663503332270539744803327905
19669683159677188798960263231644786099110027532095343767903682258204094675631884480030181452471900033489539925330180168942
-35612755701836589917921495062556867015004555824321588455786689080843739808468997518520593371195416420916411204499636305469
-54394845373870610503397620449033482420260203941017390088643571511435209674740068409128744611903771662523246103279225282068
-28218850505495055395660589517885697451038000251724874326228461657452272033777873828285530441692411930236185479405158630202
35883827534062743612589429882053733457206920424119942632628007680528194951667975107983313879820402638521836781467395056438
1800432279254412077703599795214671993551843480863000832326635952834581084031804049327845436546291016424861986110428000620
36123320567714852021751025728801862712513524254839960698773288322511012287887296070877005179411541641507107035848004560080
-1]
<
[-22117166606901014177301086340411568093581905817287916639695379361739492189201997811813230546368112829301773405831348042392
-18280068792444219831708619720711682663123085309198671443565976085903977340477245799564385897166637561346227678610985698575
29545000369894626723627427241511523933426105566168338853451577011620725934731652927851790329554078816396454817051127715787
29666732346114709503433113959684112023063177976904148095491426462046126549286662155552317289422400595441883752529453901575
19669788221619833232434913661708164039754819870259264921387314546469765639635811053231186065837913131645829793301742637750
-35612945920726573196218011449822605137379181228767012886757213977178346105806174625217770146434273596601984532926208569321
-54395135913788230417471687605045612640905564165559122680768387349146030032490710459645792741829662428002159488437650395877
-28219001231219981044133793177605519746666363524702769906219962950670089100810085568806098294434896644817858174614762680179
35884019200832342371842418944972128195335515758208589624609699873117035496771900828280096442511835506650120767605022135282
1800441895927508570938843997022501724824711887183500436969837303761196401000932670272921228929876381626666252310105274919
36123513513691805624442792106744648572677954434147911571630188168062603848458792727833500729143222456206928982269721872345
-1]
<
[22116973879673625551675041862070953045747766887883452655878367611944302586954362901974536297242602495629806200968401548711
18279909501381424209129357084690169114749586540612575340524656796400696346044933562990509634284951953884968043566108584682
-29544742917115720178488021372822734900239022035871519837077903779948049276561065793259039605916832670677181049799302433992
-29666473832573062485274771759170438024323453536204691112833485029613341332088470338476646083113163812687996115124628059302
-19669616820652672665169281148513328059348890004971410937472971928872811046483782073943559371710268734970735379443207743437
35612635592353665740830846395331112754550863232224045430996512681724052809045926799094740277265159129578192512106839998040
54394661918908397084070104020167326767281540228116912994955531936382366006416582198248874777815963039802576287749382144987
28218755333091905619982245621760863743037789524488922328613556317283306314388233900256166523024000218224232895416216035225
-35883706510348472763454070319947651051847058238541033061889036464882893583606258173222025773365920776019938323521780399036
-1800426207020297094772282745300102359645336719223383199705936094790434528757488941353579826902802455784185467294522332110
-36123198736273578052387566741391262102364836011753592233171486143193447115428000422947043564417916438823476430190922558741
1]
<
[22117119574686528320562311087241712168598147243650262229054469591452184410466103893077670784544659752601831627534655278977
18280029919828593099834803508632134462296489047144015542588685735411933724646433105345945088459210117507326417868415072704
-29544937542371595449488488355795849150444231801996552954075944805589508202027996725768669058186269328373796474711258552028
-29666669259728302231406383210675212799219544561867188593279979694334271890401008949533965680696038810316153669355018550881
-19669746393762089377128344156958937204725111445748531205713838190939737618728172978239494745047593415265988092771420275751
35612870189700950130734217131818873062718105543325936955388234603658694621211371588743801945275662904249027877472767325046
54395020242384892235493638005685527002011650308192214118918146708514290185834904323592287215071425448153587171664338322547
28218941223437697156152276163125560808302285109023317916189117419422334153044456372686392102759998226292517193960402960290
-35883942893368657509543696847084343812359351996893171712571482408844081403299848799061688442311978212771404849971405607719
-1800438067282957321611582661259248292742513529140245567936305835316536466761371350123777763948321270744165350726695826669
-36123436696942818049156940443969426065979888079246338581932225756962649507848490205792574273615687581895126608768119646765
1]
---
>
[22116948787709292451755413138721499937621477015550187399463111658534488617623454723953276983701528060983112260902487883503
18279888762611296054253726594245795436400797306449304779068322746822808728985535458880689650339032888184073615608554247606
-29544709398260946461414597289584781605061386839569616430645469198301621818162658212095774093091114089590446387689367730747
-29666440175613148096203192662539678219828408353830989207759006299227190283963653699949964146180299346173001374982331394381
-19669594505243413030854403906336544072742227946076287665009332770427542418819281578472395975271609929597793052771952543071
35612595189404014827312653100910247613374630671337597217249287386090047934406649015172875467311834692358198989187389340086
54394600207531234648367619575172013285723048867058373569710215719983131117417842202228289979502291925011129071688657031671
28218723318585481974291578652110737060825667769496011305732812951103464900898179952215567584889398988014847614759250794360
-35883665799865709812516319059015872398539390158641006272137020544727087216277289141230835824630860703705756254642536532272
-1800424164415806231290703180738687586416564250163791135791055881961473408487473823233110267368564458618532565323136728831
-36123157754084096828826529108520741951654074068994587072706523674892820260017731262804924516844091386422555031894574423151
1]
>
[22116830653621455269329674626411237231333121413157877260771090397930206762489851361720911243273767451929856187884282420099
18279791123556041909075925908830851637273283657519891437322185361321102197429374012947504573542399361677591327954021371502
-29544551589996855450677963067392157679443869254136780112428394379143628600464138846222444209460236575630890155348516221094
-29666281717143891705467732813339896546766600449693886805102814652828190257890280434650931653681562254063388162197680820711
-19669489443300768597379753476273166132097435607912366511525700482161871454815355005271391361905596831441503184800390074263
35612404970514031549016136713644509491000005266892172786278762489755441637069471908475698692072977516672625660760817076234
54394309667613614734293552419159883065077688642516640977585399882272310759667200151711241849576401159532215686530231917862
28218572592860556325818374992390914765197304496518115725741311657885647833865968211694999732146914273433174919549646744383
-35883474133096111053263329996097477660410794824552359280155328352138246671173363420934053261939427835577472268504909453428
-1800414547742709738055458978930857855143695843843291531147854531034858091518345202288034474984979093416728299123459454532
-36122964808107143226134762730577956091489643889686636199849623829341228699446234605848428967112410571722733085472857110886
1]
>
[-22117023380848843894955719104751852279167260342562341244588102147725396364737486271559605492399277785601823392747228913780
-18279950414618837531655188544852365185646782426105987540363504650824383191861686249521380836424084969138850962998898485395
29544809042775761995817368936080946712630952784433599128802067610816305258634725980815194933097482721350163922600341502889
29666540230685538723626075013853570545506324890393343787760756085260975475088472251726602859990799036817275799602506662984
19669660844267929164645385989468002112503365473200220495440043099758826047967383984559018056033241228116597598658924968576
-35612715298886939004403301768136001873828323263435140242039463785209734933829719734598728561242091983696417681580185647515
-54394783662493448067695136004038168938701712579958850663398255295035974785741328413108159813590100547731798887218500168752
-28218818490988631749969922548235570768825878496731963303347718291272430620287819880244931503557810700026800198748193389337
35883786823579980661651678621121954803899252344219915842875991760372388584339006075992123931085342566207654712588151189674
1800430236649921214222020230653257220323071011803408768411755740005619963761788931207375877012053019259209084139042397341
36123279585525370798189988095931342561802762312080955538308325854210385432477026910734886131837716589106185637551656424490
-1]
>
[-22116877685835941126068449879581093156316879986795531671412000168217514541225745280456471005097220528629797966180975183514
-18279829996171668640949742120910399838099879919574547338299475711813145813260186707165945382249826805516492588696591997373
29544614417519886724816901953107832462425743018308566011804026585174846333167795048305565480828046063653548497688385384853
29666344803530298977494463562348795770610233864730846307314261420540044916775933640669283262407924039189118245372116171405
19669531271158512452686322981022392967127144032423100227199176837691899475722993080263082682695916547821344885330712436262
-35612480701539654614499931031648241565661080952333248717647741863275093121664274944949666893231588209025582316214258320509
-54394425339016952916271602018519968703971602499883549539435640522904050606323006287764747376334638139380788003303543991192
-28218632600642840213799892006870873703561382912197567715772157189133402781631597407814705923821812691958515900204006464272
35883550440559795915562052093985262043386958585867777192193545816411200764645415450152461262139285129456188186138525980991
1800418376387260987382720314694111287225894201886546400181385999479518025757906522437177939966534204299229200706868902782
36123041624856130801420614393353178598187710244588209189547586240441183040056537127889355422639945446034535458974459336466
-1]
27c27
<
[22116770714405583336867438587978130702368702752014262764945658666304899551532009118612221229270747902589527602271134965837
18279741583169202203715651129587038521167645899404397859842108476778489241039522138753982999060488336935620040899427577372
-29544471520782449167745951513109429577257592114105833086362929311663060912731387758880886473320185112900474336840715792517
-29666201318026504138494316785877194683069391618012842079527372584383821236527517999055313594391973907365553674022229112269
-19669436136667811236743950401073198392575657825771282857141166518044879318491619320454612959234988429098288299583613103486
35612308456702325132541059476459993253084426957133901521555264050453932658286318119320711872726009080067870852146591080210
54394162252628148090202994103027474128613435632160019306871744590527421306760878837593365169194082391156915972750797956762
28218496117205398912354707363336055251223608389913084613567321114205541621152775593363018645644354090581443525938378253844
-35883376884655048980407460804281474021716080929361989874167453847470444492308893019844835412877289729701848913856249314677
-1800409668407242273704358957808914279157477701533917265553824810013632355843555477273419336438420579290272179792998639682
-36122866910618145957800030402604365296466685699966352482414146300777147745649209126461665945430677863183314455130330427022
1]
---
>
[-22117226546116886109763322378844674622546324478431531135520811093364799400159840054921920560371132378642101991444495496654
-18280118332831059537068894499955495779228723067314165021046052970446590296867097673757907471648548586088198965665579492705
29545080439109033006559438795794252035612382706199285879517042079101293622464404015193348065694130279126870635558928144364
29666812745232097070406529987146813886760386808585192821066868530490495570649424591147935348711988942139718240704905610017
19669841528252790593070716736908131779276597652400348575771848510586757775959546738047964468508521533989044678518519608527
-35613042434538279612693088687007121375294759538525284151480712416479855084589328414372756965781242033206739341540434565345
-54395283328773697061562245921178021577369817175915744351482042640890919485397031773763669422211981196377459202217084356977
-28219077706875138457597460806660379260640059631307801018393953494350195313523278187138079380937456827669589568226031170718
35884116449273404444698288136788131834030229653398959030597574377784837675636371229369314291573973612525744122253682274033
1800446775262976035289944018144445300810930029492874702563867024782422136675722395287536367476434895753122371640566089769
36123611411180802892777524434718239367700912623868195289065665696626684802255818207220263750824955164746347612612248556209
-1]
bad LLLTest

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
NTL LLL: routines for performing lattice basis reduction, including very
fast and robust implementations of the Schnorr-Euchner LLL and Block Korkin
Zolotarev reduction algorithm, as well as an integer-only reduction
algorithm. Also, there are routines here for computing the kernel and image
of an integer matrix, as well as finding integer solutions to linear systems
of equations over the integers.
I m afraid that's the only info I can give you, cause I really do not have a
clue about what LLL class actually does.
It seems to be a bug in the new release of GMP (4.3.0) as the NTL LLL test
passes correctly when using GMP-4.2.4 or even when not using GMP at all.
Or maybe there is a compiler bug that is not triggered by the previous GMP
version...
Hope that this info will help you find out what is going wrong.
My best regards,
Nikolaos Karapanos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gmplib.org/list-archives/gmp-bugs/attachments/20090424/4a9da517/attachment-0001.html>


More information about the gmp-bugs mailing list