Hi,
I formalized floating point numbers in Isabelle using integers. From this fromalization I generate PolyML-code. A fast implementation needs bit shift operations on integers. There are shift operations available but they are not implemented very efficiently:
IntInf.sml: | (* These could be implemented in the RTS although I doubt if it's | really worth it. *) | fun << (i: int, j: Word.word) = i * pow(2, Word.toInt j) | and ~>> (i: int, j: Word.word) = Int.div(i, pow(2, Word.toInt j))
How difficult is it to implement this operations efficiently in the RTS on big integers?
Johannes