[Numpy-discussion] Re: numpy, overflow, inf, ieee, and rich , comparison

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Sat Oct 28 15:35:19 EDT 2000


Fri, 27 Oct 2000 22:21:18 GMT, Darren New <dnew at san.rr.com> pisze:

> Now, if you're not going to define it that way, then you shouldn't call it
> "mod". Call it "remainder". Call it "divrem" and not "divmod". :-)

Haskell provides separate families functions for these meanings:

    div,  mod, divMod,    -- x `mod` y >= 0,  x `mod` y < y  (for y > 0)
                          -- x `mod` y <= 0,  x `mod` y > y  (for y < 0)
    
    quot, rem, quotRem,   -- (-x) `rem` y == -(x `rem` y)
    
    /                     -- for floating point and other rationals only

-- 
 __("<  Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK



More information about the Python-list mailing list