Open saona-raimundo opened 2 months ago
i considered it for a while, but that would require a more elaborate design
the main issue with arbitrary precision numbers is that the precision can vary between elements of the same matrix. for example 1.25 can be represented with a handful of bits, while finer values would need more.
for unary/binary operations, we can just take the max precision of the operands, but for things like sqrt(2.0)
, faer needs a way to know the precision of the computation, which would require carrying around a "context" type that we can use to perform the operations. this would require a redesign of the Entity trait, and might also make the implementation a lot more verbose unless i figure out a good abstraction for it.
it's something i plan on doing eventually, but it'll take time
Is your feature request related to a problem? Please describe. I had to work on exact solvers for Linear programming. The main problem with linear algebra libraries was that the numbers had to be
Copy
, but arbitrary precision numbers are usually represented by rationals with aVec
behind, which is not Copy.Describe the solution you'd like Replacing the
Copy
bound by aClone
bound.Describe alternatives you've considered I have no alternative since Rust does not allow to bypass this restriction.
Additional context Although it adds many
.clone()
in the code, I managed to implement a few routines without theCopy
bound. I am not sure how possible it would be to do in faer.