I'd like to make my racket program typed/racket to speed it up. My program does operations on matrices using the Matrix data type. I was suggested to use the data type Fixnum.
I have some matrices like,(: X (Matrix Fixnum))
(define X (matrix [[0 1] [2 3]] : Fixnum))
which is OK.
However, if the numbers in the matrix have decimals, I get an error.(: Y (Matrix Fixnum))
(define Y (matrix [[0 0.5] [1.5 2.5]] : Fixnum))
Type Checker: type mismatch
expected: Fixnum
given: Positive-Flonum in: 0.5
Fixnum is a machine type (I don't fully understand what this is; not sure if it's relavant). I know fixnum is limited to 64 bits. But why can't 0.5 (or any decimal, it seems) be a Fixnum?