Opened 5 years ago

# Convert rootof function from giac

Reported by: Owned by: mforets major sage-9.5 symbolics rws, frederichan, slelievre N/A #22024

Provide a corresponding Sage function for Giac's `rootof`. From the inline help of XCAS:

`rootof(LstPoly(P),LstPoly(Q))`: Polynomial in terms of a root of an irreducible polynomial on `Q`. Returns `P(a)` with `a` the greatest root of `Q`.

For example,

```sage: giac.simplify((exp(2*i*pi/3)+exp(2*i*pi/15))^3)
((-768*i)*(-1)^(2/15)*sqrt(3)-768*(-1)^(2/15)+768*i*(-1)^(4/15)*sqrt(3)-768*(-1)^(4/15)+rootof([[16-16*i,-16+16*i,-400+528*i,144+240*i],[1,0,-30,-40,5]]))/512
```

This seems different from #22024.

### comment:1 Changed 4 years ago by rws

• Description modified (diff)

### comment:2 Changed 3 years ago by slelievre

• Description modified (diff)
• Milestone changed from sage-8.0 to sage-8.4

### comment:3 Changed 2 years ago by gh-nasser1

fyi, This still shows up in 8.9

```var('x')
integrate(x^6/(2*x^5+3)^3,x, algorithm="giac")
NotImplementedError: Unable to parse Giac output: rootof(

```

### comment:4 Changed 16 months ago by mkoeppe

• Milestone changed from sage-8.4 to sage-9.2

### comment:5 Changed 13 months ago by mkoeppe

• Milestone changed from sage-9.2 to sage-9.3

### comment:6 Changed 10 months ago by mkoeppe

• Milestone changed from sage-9.3 to sage-9.4

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.

### comment:7 Changed 4 months ago by mkoeppe

• Milestone changed from sage-9.4 to sage-9.5
Note: See TracTickets for help on using tickets.