While I still don't see a problem with the theory side of this, there is a
practical problem - Gaussian Elimination in Julia seems to be delegated to
LAPACK and arguments are promoted to Float:
julia> [1 0; 0 1] \ [1, 2]
2-element Array{Float64,1}:
1.0
2.0
Andrew
On Thursday, 20 February 2014 19:45:28 UTC-3, andrew cooke wrote:
>
>
> A broad and a narrow question...
>
> If Julia supports the definition of new integer types can I define a new
> type for a finite field and then use existing linear algebra libraries to
> do maths with them? Could I define an integer type for polynomials? Is
> this the kind of thing that would work in theory but not in practice? Has
> anyone done this?
>
> Specifically, I need to solve a problem modulo 2 (GF(2) - addition and
> subtraction are XOR; multiplication is AND; division is trivial). I was
> about to write my own Gaussian Elimination and then remembered a comment
> from here saying Julia is the first language where you can define new
> integers...
>
> Am I talking rubbish? I'm not a mathematician, so I may be completely
> muddled anyway.
>
> Thanks,
> Andrew
>
> PS I guess for best speed I should use a Uint for my 0s and 1s? Assuming
> the problem is small enough that it will still fit in cache?
>