I'll implement `flmodulo' in the math library, which already has
`flodd?' and `fleven?'. These things can be tricky to get right; for
example, most people wouldn't notice that their implementation is wrong
on negative inputs. I'll probably also do `flremainder'.
Neil ⊥
On 09/15/2012 12:45

On 9/14/12 3:36 PM, Becca MacKenzie wrote:
Hello!
So a friend of mine just started learning Racket and was wondering if
there's a particular reason why the modulo function in racket only takes
in integers? He wrote his own mod function to take in other things but
he was just wondering what the

For the record, I've always just defined my own modulo when I need it
for floats:
; A modulo operator for floats!
(define (float-modulo p q)
(- p (* q (truncate (/ p q)
It doesn't properly handle negative numbers though.
David Van Horn dvanh...@ccs.neu.edu writes:
On 9/14/12 3:36 PM,

## 3 matches

##
Mail list logo