login  home  contents  what's new  discussion  bug reports help  links  subscribe  changes  refresh  edit

Square root

fricas
ksqrt:=kernels(sqrt(x))(1)
 (1)
Type: Kernel(Expression(Integer))
fricas
name(ksqrt)
 (2)
Type: Symbol
fricas
argument(ksqrt)
 (3)
Type: List(Expression(Integer))

fricas
)di op nthRoot
There is one exposed function called nthRoot :
[1] (D,Integer) -> D from D if D has RADCAT
There are 2 unexposed functions called nthRoot :
[1] (Factored(D4),NonNegativeInteger) -> Record(exponent:
from FactoredFunctions(D4) if D4 has INTDOM
[2] (Integer,((Integer, List(OutputForm)) -> OutputBox),((Integer,
List(OutputForm)) -> OutputBox)) -> ((Integer, List(OutputForm))
-> OutputBox)
from D if D has FMTCAT

Positive nthRoot is primmitive

fricas
nthRoot(x,3)
 (4)
Type: Expression(Integer)
fricas
nthRoot(x,2)
 (5)
Type: Expression(Integer)
fricas
nthRoot(x,1)
 (6)
Type: Expression(Integer)

Strange library message

fricas
nthRoot(x,0)
>> Error detected within library code:
not invertible

Negative nthRoot is not primitive

fricas
nthRoot(x,-1)
 (7)
Type: Expression(Integer)
fricas
nthRoot(x,-2)
 (8)
Type: Expression(Integer)
fricas
nthRoot(x,-3)
 (9)
Type: Expression(Integer)
fricas
msqrt:=kernels(nthRoot(x,-3))(1)
 (10)
Type: Kernel(Expression(Integer))
fricas
name(msqrt)
 (11)
Type: Symbol
fricas
argument(msqrt)
 (12)
Type: List(Expression(Integer))

Powers are roots

fricas
psqrt:=kernels(x^(1/2))(1)
 (13)
Type: Kernel(Expression(Integer))
fricas
name(psqrt)
 (14)
Type: Symbol
fricas
argument(psqrt)
 (15)
Type: List(Expression(Integer))

Complex roots

fricas
complexNumeric(nthRoot(complex(-1,0),2))
 (16)
Type: Complex(Float)
fricas
nthRoot(%,2)
 (17)
Type: Complex(Float)
fricas
recip %
 (18)
Type: Union(Complex(Float),...)
fricas
complexNumeric(nthRoot(complex(-1,0),3))
 (19)
Type: Complex(Float)
fricas
recip %
 (20)
Type: Union(Complex(Float),...)
fricas
complexNumeric(nthRoot(complex(-1,0),4))
 (21)
Type: Complex(Float)
fricas
conjugate %
 (22)
Type: Complex(Float)

 Subject:   Be Bold !! ( 15 subscribers )