[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gmp-bugs
Subject:    mpn_perfect_square_p requires normalised input?
From:       dmharvey () cims ! nyu ! edu (David Harvey)
Date:       2010-09-20 17:57:09
Message-ID: 68DE2219-B0A9-4BD5-B436-0EBC8AE1B5C3 () cims ! nyu ! edu
[Download RAW message or body]

In GMP 5.0.1, it appears that mpn_perfect_square_p requires the input  
to be normalised, i.e. the high limb is not allowed to be zero, but  
this is not documented. If called with a zero high limb, and the  
residue tests fail to rule out the input being a non-square, then  
control is passed immediately to mpn_sqrtrem, which requires  
normalised input (typical result is a segfault).

david


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic