caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] behaviour of mod
@ 2015-01-18 18:48 Hannes Mehnert
  2015-01-18 19:28 ` Gabriel Scherer
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Hannes Mehnert @ 2015-01-18 18:48 UTC (permalink / raw)
  To: caml-list

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA384

Hi,

is the behaviour of modulo arithmetics intentional:
 -5 mod 4 = -1 ?

While this reflects the C behaviour, my expectation was to always have
a positive result:
 -5 mod 4 = 3

Any hints?

hannes
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCQAGBQJUu//3AAoJELyJZYjffCjuQH0QAL7FTKcguf2mKMVm1wu+jYvv
b5yOBl+X0vMBCNWjpMfYVf1nIfo+z5cNF+1zy1kHaozE2BV10qywzWe+mzq+1VMo
g1knplZbxahdTgf1Ix+BqF+Fk0voFfUTW/l9Zrg07B5wUEOFcFXKNo14eWSatTs0
tVtSAk6fTffz7IPU/QJfvi7euQ5q6e5MVyvoorpjIz2j/OJ0QXw+catlSPXWdyeW
/2TmdeX6WZuiSruEBAvDgDi8Qcp9x/q1abAjdnrZgfmY3+MxNrFZ+7M+QD+mUua6
pgOe2xdb2gRr5/pOqMLxGpfWZ8b695TS31jZj0GJOZ4sgX/Az/eq1wHSyXiGDpWP
dTr/GUPJWNUEWNeqrF88sOPJK4Zjqr19v7NX86wxvwfQGM4qCbEuYvkVQwBOhtgn
/ewgArQNVHyeAH7R8Ze0S5nqVGDRyJwDj3ef4EVvLGLuibs/fI72x4SQ2x2Xfoz7
tgkkb0g1So15iVo1z3FDbTbeJBaZh/0lyqBno7w4FmJkoc4Ool9DarKaBe+SqHqP
ErYMK+bA9P7e+rBqySnB92dsClg17v2lmzGuKd4damcaAJvsscOJXWbLvteQbxo5
eL8TG2sHCdOV5H4dJCpudUzVkA5dYnJUZuSVG/JAyyZWYm/kkQX0obJJo49GMH4h
MvZ9C+veJNgwRY540fqj
=s3KW
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-01-20 21:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-18 18:48 [Caml-list] behaviour of mod Hannes Mehnert
2015-01-18 19:28 ` Gabriel Scherer
2015-01-18 21:06 ` Mr. Herr
2015-01-19 10:59 ` Stephen Dolan
2015-01-20 21:57   ` Yaron Minsky
2015-01-20 21:57     ` Yaron Minsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).