This fails unexpectedly: fricas (1) -> f:=operator 'f
Type: BasicOperator?
fricas f(sin(-1))
Type: Expression(Integer)
fricas f(sqrt(-1)) But this works fricas f(sqrt(-1)::Expression(Integer))
Type: Expression(Integer)
This happens because fricas AlgebraicNumber has ExpressionSpace
Type: Boolean
AlgebraicNumber? defines:belong? op == belong?(op)$ExpressionSpace?_&(%) or has?(op, ALGOP) while ExpressionSpace? exports: belong? op == has?(op, 'any) and (is?(op, PAREN) or is?(op, BOX)) so belong? op == true |