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

Algorithm

Development Platform:

Unix_Linux

  1. /* __clz_tab -- support for longlong.h
  2.    THE CONTENTS OF THIS FILE ARE FOR INTERNAL USE AND MAY CHANGE
  3.    INCOMPATIBLY OR DISAPPEAR IN A FUTURE GNU MP RELEASE.
  4. Copyright 1991, 1993, 1994, 1996, 1997, 2000, 2001 Free Software Foundation,
  5. Inc.
  6. This file is part of the GNU MP Library.
  7. The GNU MP Library is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU Lesser General Public License as published by
  9. the Free Software Foundation; either version 3 of the License, or (at your
  10. option) any later version.
  11. The GNU MP Library is distributed in the hope that it will be useful, but
  12. WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  13. or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
  14. License for more details.
  15. You should have received a copy of the GNU Lesser General Public License
  16. along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
  17. #include "gmp.h"
  18. #include "gmp-impl.h"
  19. #include "longlong.h"
  20. #ifdef COUNT_LEADING_ZEROS_NEED_CLZ_TAB
  21. const
  22. unsigned char __clz_tab[128] =
  23. {
  24.   1,2,3,3,4,4,4,4,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
  25.   7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
  26.   8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
  27.   8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8
  28. };
  29. #endif