### 2.21.23 Rewrite an expression with different options : `convert convertir`

`convert` takes two arguments an expression and an option.
`convert` rewrites this expression applying rules depending on the option. Valid options are :

- `sin` converts an expression like `trigsin`.
- `cos` converts an expression like`trigcos`.
- `sincos` converts an expression like `sincos`.
- `trig` converts an expression like `sincos`.
- `tan` converts an expression like `halftan`.
- `exp` converts an expression like `trig2exp`.
- `ln` converts an expression like `trig2exp`.
- `expln` converts an expression like `trig2exp`.
- `string` converts an expression into a string.
- `matrix` converts a list of lists into a matrix.
- `polynom` converts a Taylor series into a un polynomial by removing the remainder (cf 2.24.22).
- `parfrac` or `partfrac` or `fullparfrac` converts a rational fraction into it’s partial fraction decomposition (2.28.9).

`convert` can also :

- convert units, for example `convert(1000_g,_kg)=1.0_kg` (cf 5.1.4).
- write a real as a continued fraction : `convert(a,confrac,’fc’)` writes `a` as a continued fraction stored in `fc`. Do not forget to quote the last argument if it was assigned.
  For example, `convert(1.2,confrac,’fc’)=[1,5]` and `fc` contains the continue fraction équal to 1.2 (cf 2.8.7).
- transform an integer into the list of its ciphers in a basis, begining with the unit cipher (and reciprocally)
  - `convert(n,base,b)` transforms the integer `n` into the list of its ciphers in a basis `b` begining with the unit cipher.
    For example, `convert(123,base,10)=[3,2,1]` and reciproqualy
  - `convert(l,base,b)` transforms the list `l` into the integer `n` which have `l` as list of its ciphers in a basis `b` begining with the unit cipher.
    For example, `convert([3,2,1],base,10)=123` (cf 2.5).