int.avm 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #
  2. # This module defines operations on signed integers. The virtual machine
  3. # representation of a non-negative integer is the same as that of the
  4. # corresponding natural number. Negative integers are represented as
  5. # the natural number equal to their absolute value with a zero bit
  6. # appended. The bit operations double, half, and odd defined in the
  7. # nat module will also work on integers in this representation.
  8. #
  9. # Copyright (C) 2009,2010 Dennis Furey
  10. #
  11. # abs (28)
  12. # difference (739)
  13. # division (976)
  14. # negation (44)
  15. # predecessor (280)
  16. # product (294)
  17. # quotient (981)
  18. # remainder (981)
  19. # sgn (26)
  20. # successor (295)
  21. # sum (741)
  22. # zleq (232)
  23. # zrange (630)
  24. #
  25. # compressed with granularity 39
  26. #
  27. #
  28. # This program is free software; you can redistribute it and/or modify
  29. # it under the terms of the GNU General Public License as published by
  30. # the Free Software Foundation; version 3.
  31. #
  32. # This program is distributed in the hope that it will be useful,
  33. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  34. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  35. # GNU General Public License for more details.
  36. #
  37. # You should have received a copy of the GNU General Public License
  38. # along with this program; if not, write to the Free Software Foundation,
  39. # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  40. #
  41. {kvwZaHsihoz{JowzjBzv[e{w>ny[Dcv^xsdRkPgf`[kEVivyo^n{Dt[KNhgYV?fHcDx^=]ZvE[hf{_
  42. noIiN\`etkGGgWZfG<_GPgXsN?ngeVh{f<\f>>\kIkp\jkfwk[IOdWlYnHfve[GwPnz^fng>_geFodE
  43. zgSJFoOWP^n<KDcFKr=ZgiVYPf{hfGdiZjkLB[nbTOEIny{i>n]D{FdzllSfpXlRhu{yqhfnoo<oIN_
  44. cxfpfwDF_CoC{xqnoKjgKO\<Opvhxvd{<ZU{s{wOGY?SIi_NpkxhcN@yN{zExU{z[{r{GFFhhRPhiM]
  45. fAyIN>guJkOIb?\mZkXUzSj[Yt^iH^i`iEHn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