MonumoLtd / SimpleGA.jl

Geometric algebra in Julia.
MIT License
23 stars 2 forks source link

Promotion not working as expected #18

Closed tpgillam closed 10 months ago

tpgillam commented 11 months ago
using SimpleGA

e = basis(3)
1 * e[1] == 1.0 * e[1]

gives the error:

ERROR: promotion of types SimpleGA.GA30.Odd{Int64} and SimpleGA.GA30.Odd{Float64} failed to change any arguments
Stacktrace:
 [1] error(::String, ::String, ::String)
   @ Base ./error.jl:44
 [2] sametype_error(input::Tuple{SimpleGA.GA30.Odd{Int64}, SimpleGA.GA30.Odd{Float64}})
   @ Base ./promotion.jl:405
 [3] not_sametype(x::Tuple{SimpleGA.GA30.Odd{Int64}, SimpleGA.GA30.Odd{Float64}}, y::Tuple{SimpleGA.GA30.Odd{Int64}, SimpleGA.GA30.Odd{Float64}})
   @ Base ./promotion.jl:399
 [4] promote
   @ ./promotion.jl:382 [inlined]
 [5] ==(x::SimpleGA.GA30.Odd{Int64}, y::SimpleGA.GA30.Odd{Float64})
   @ Base ./promotion.jl:449
 [6] top-level scope
   @ REPL[6]:1