Open
Description
I think it would be good to document what methods needs to be defined for a type to behave as a Number
.
Last time I had to do this it took me quite some try and error to get the methods.
I ended up with the following
+
,-
,*
,/
3 each ( (T,T), (T,Any), (Any,T) )==
,hash
,<
promote_rule
,convert
rem
,signed
,typemax
show
, Constructor
That works in my usecase, but I am still unsure if this is "correct" or it its lacking something.
If I got it right, a Number
is something that can be used in basic arithmetic, can be compared, and needs some basic rules to be usable in julia.
Maybe Number
is too broad and it would need to be further devided.
Activity