Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#444 closed bug (wontfix)

substitution of number by number returns poly

Reported by: gorzel Owned by: somebody
Priority: minor Milestone: 3-1-5 and higher
Component: singular-kernel Version: 3-1-5
Keywords: Cc:

Description

Substitution of number by number should return number:

 > ring ra =(0,a),x,dp;
> number N = a2+2a+2;
> N = subst(N,a,a-1);
   ? `number`(N) = `poly` is not supported
   ? expected `number` = `number`
   ? error occurred in or before STDIN line 3: `N = subst(N,a,a-1);`
> subst(N,a,a-1);    
(a2+1)
> typeof(_);
poly

Change History (2)

comment:1 Changed 12 years ago by hannes

Resolution: wontfix
Status: newclosed

There is no substitution for numbers, the automatic type conversion promotes this to poly. If you need number here, use leadcoef(subst(N,a,a-1))

comment:2 Changed 12 years ago by gorzel

Or apply the explicit cast number: N = number(subst(N,a,a-1)); which also works.

Note: See TracTickets for help on using tickets.