zero.c
Upload User: qaz666999
Upload Date: 2022-08-06
Package Size: 2570k
Code Size: 1k
Category:

Algorithm

Development Platform:

Unix_Linux

  1. /* mpn_zero
  2. Copyright 2009 Free Software Foundation, Inc.
  3. This file is part of the GNU MP Library.
  4. The GNU MP Library is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU Lesser General Public License as published by
  6. the Free Software Foundation; either version 3 of the License, or (at your
  7. option) any later version.
  8. The GNU MP Library is distributed in the hope that it will be useful, but
  9. WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  10. or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
  11. License for more details.
  12. You should have received a copy of the GNU Lesser General Public License
  13. along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
  14. #include "gmp.h"
  15. #include "gmp-impl.h"
  16. void
  17. mpn_zero (mp_ptr rp, mp_size_t n)
  18. {
  19.   mp_size_t i;
  20.   rp += n;
  21.   for (i = -n; i != 0; i++)
  22.     rp[i] = 0;
  23. }