Is there a way to use clojures `rational` number for elements within a matrix?
lungsi opened this issue · 1 comments
lungsi commented
Hi,
I know this might sound like an odd question but I have to use an algorithm for matrices that are not very large. Therefore, performance is not an issue, what is an issue is the loss of accuracy.
This is why I am wondering if I could use clojure's rational number system (rationalize
) when creating a matrix like
(dge rationalize 2 2 [ 1 2 3 4])
Regards.
blueberry commented
I am not sure that I understand what rationalize
would do exactly.
If you're asking whether it would be possible to have a Neanderthal backend that would perform computations using Clojure's rational numbers, that is possible. Someone would have to implement that backend. And it would be slow.