Changeset 241a04 in git


Ignore:
Timestamp:
Nov 16, 2012, 12:54:35 PM (11 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
428b38e6b8d35b1145d188a0e2eae3a73aa08e44
Parents:
70c40f240ce667ca18d03028aae0c90552755245
git-author:
Martin Lee <martinlee84@web.de>2012-11-16 12:54:35+01:00
git-committer:
Martin Lee <martinlee84@web.de>2012-11-16 13:39:10+01:00
Message:
chg: use NTL in tryDiophantine
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/facHensel.cc

    r70c40f r241a04  
    3030#include "cf_primes.h"
    3131#include "facBivar.h"
     32#include "facNTLzzpEXGCD.h"
    3233
    3334#ifdef HAVE_NTL
     
    100101  buf1= bufFactors.getFirst();
    101102  buf2= i.getItem();
     103#ifdef HAVE_NTL
     104  Variable x= Variable (1);
     105  zz_p::init (getCharacteristic());
     106  zz_pX NTLMipo= convertFacCF2NTLzzpX (M);
     107  zz_pE::init (NTLMipo);
     108  zz_pEX NTLbuf1, NTLbuf2, NTLbuf3, NTLS, NTLT;
     109  NTLbuf1= convertFacCF2NTLzz_pEX (buf1, NTLMipo);
     110  NTLbuf2= convertFacCF2NTLzz_pEX (buf2, NTLMipo);
     111  tryNTLXGCD (NTLbuf3, NTLS, NTLT, NTLbuf1, NTLbuf2, fail);
     112  if (fail)
     113    return;
     114  S= convertNTLzz_pEX2CF (NTLS, x, M.mvar());
     115  T= convertNTLzz_pEX2CF (NTLT, x, M.mvar());
     116#else
    102117  tryExtgcd (buf1, buf2, M, buf3, S, T, fail);
    103118  if (fail)
    104119    return;
     120#endif
    105121  result.append (S);
    106122  result.append (T);
     
    109125  for (; i.hasItem(); i++)
    110126  {
     127#ifdef HAVE_NTL
     128    NTLbuf1= convertFacCF2NTLzz_pEX (i.getItem(), NTLMipo);
     129    tryNTLXGCD (NTLbuf3, NTLS, NTLT, NTLbuf3, NTLbuf1, fail);
     130    if (fail)
     131      return;
     132    S= convertNTLzz_pEX2CF (NTLS, x, M.mvar());
     133    T= convertNTLzz_pEX2CF (NTLT, x, M.mvar());
     134#else
    111135    buf1= i.getItem();
    112136    tryExtgcd (buf3, buf1, M, buf3, S, T, fail);
    113137    if (fail)
    114138      return;
     139#endif
    115140    CFListIterator k= factors;
    116141    for (CFListIterator j= result; j.hasItem(); j++, k++)
Note: See TracChangeset for help on using the changeset viewer.