Handbook
Glossary
hash-fraction ( m n -- h )
Vocabulary
math
.
hashcodes
.
private
Inputs
m
an
object
n
an
object
Outputs
h
an
object
Definition
USING:
kernel
math
math.functions
;
IN:
math.hashcodes.private
:
hash-fraction
( m n -- h )
[
2dup
[
P
mod
zero?
]
both?
]
[
[
P
/i
]
bi@
]
while
dup
P
mod
zero?
[
2drop
1/0.
]
[
over
[
[
abs
P
mod
]
[
P
2
-
P
^mod
P
mod
]
bi*
*
]
dip
0
<
[
neg
]
when
dup
-1
=
[
drop
-2
]
when
]
if
;
inline