Previous Up Next

10.1.10  Rewriting an expression with different options

Xcas has many commands to convert expressions into different forms; the convert command (or its infixed version =>) is a different way to call most of these functions.

Examples

convert(1.2,confrac,'fc')
     
⎡
⎣
1,5⎤
⎦
          

and fc contains the continued fraction equal to 1.2.

convert(123,base,10)
     
⎡
⎣
3,2,1⎤
⎦
          
convert([3,2,1],base,10)
     
123           
convert(1000_g,_kg)
     
1.0 kg           

Previous Up Next