[CLN-list] modular polynomials
Alexei Sheplyakov
varg at theor.jinr.ru
Sat Sep 27 15:20:49 CEST 2008
Dear Jens,
On Fri, Sep 26, 2008 at 07:44:09PM +0200, Jens Vollinga wrote:
> my problems with cl_UP_MI seem to boil down to what happens in the
> following code fragment:
> umod c = a;
cl_UP is actually a pointer to a coefficient vector. This assignment creates
the pointer c which points to the same data as a. That's probably not what
you want. Perhaps you meant
c = a.ring()->create(degree(a));
for (std::size_t i = 0; i <= degree(a); ++i)
c.set_coeff(i, a.coeff(i));
c.finalize();
> So, my question to the developers is now: WTF?!?!
Wrong expectations from the user side.
@ developers:
Actually the semantics is a bit weird. Should we implement operator= which
"just works"? Or at least document the current behaviour?
Best regards,
Alexei
--
All science is either physics or stamp collecting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: Digital signature
Url : http://www.cebix.net/pipermail/cln-list/attachments/20080927/ce5e3ca8/attachment.sig
More information about the CLN-list
mailing list