Skip to Content.
Sympa Menu

cado-nfs - Re: [Cado-nfs-discuss] Problem in Sieve codes

Subject: Discussion related to cado-nfs

List archive

Re: [Cado-nfs-discuss] Problem in Sieve codes


Chronological Thread 
  • From: Pierrick Gaudry <pierrick.gaudry@loria.fr>
  • To: Reza <gk.inst@gmail.com>, cado-nfs-discuss@lists.gforge.inria.fr
  • Subject: Re: [Cado-nfs-discuss] Problem in Sieve codes
  • Date: Sun, 10 Nov 2013 09:11:18 +0100
  • List-archive: <http://lists.gforge.inria.fr/pipermail/cado-nfs-discuss>
  • List-id: A discussion list for Cado-NFS <cado-nfs-discuss.lists.gforge.inria.fr>

Hi,

This part is a bit tricky. In order to understand it, you must be
familiar with the IEEE-754 standard for representing floating point
numbers. The bold line does some bit manipulation to extract the relevant
information from an element in double precision.

However, be aware that this part of the code has been completely
rewritten in the forthcoming cado-nfs 2.0. Unfortunately, it is now even
less easy to understand (but much faster).

Regards,
Pierrick


On Sun, Nov 10, 2013 at 10:03:55AM +0330, Reza wrote:
> Hi dear,
> I'm tracing the sieving algorithm in CADO-NFS for improving some functions.
> Unfortunately, I could not understand the goal of following part of
> the code; and why this part have been added to code?.
> Note that, the main problem is the Bold line.
>
> PATH: cado-nfs-1.1/sieve/las.c
>
> Line1702:
> #ifndef SSE_NORM_INIT
> uint64_t y;
> unsigned char n;
> for (i = 0; i < (int) si->I; i++) {
> /* the double precision number 1.0 has high bit 0 (sign),
> then 11-bit biased exponent 1023, and 52-bit mantissa 0 */
> /* the magic constant here is simply 1023*2^52, where
> 1023 is the exponent bias in binary64 */
> * y = (zx->x - (uint64_t) 0x3FF0000000000000) >> (52 - l);*
> n = rat->S[y & mask];
> ASSERT (n > 0);
> *S++ = n;
> zx->z += gi;
> }
> #else
>
>
> Best regrads,
> Ghasem

> _______________________________________________
> Cado-nfs-discuss mailing list
> Cado-nfs-discuss@lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/cado-nfs-discuss






Archive powered by MHonArc 2.6.19+.

Top of Page