4.5.2.6 Real and Complex Numbers

sage: kash.Precision()
30
sage: kash('R')
Real field of precision 30
sage: kash.Precision(40)
40
sage: kash('R')
Real field of precision 40
sage: z = kash('1 + 2*I')
sage: z
1.000000000000000000000000000000000000000 +
2.000000000000000000000000000000000000000*I
sage: z*z
-3.000000000000000000000000000000000000000 +
4.000000000000000000000000000000000000000*I

sage: kash.Cos('1.24')
0.3247962844387762365776934156973803996992
sage: kash('1.24').Cos()
0.3247962844387762365776934156973803996992

sage: kash.Exp('1.24')
3.455613464762675598057615494121998175400

sage: kash.Precision(30)
30
sage: kash.Log('3+4*I')
1.60943791243410037460075933323 + 0.927295218001612232428512462922*I
sage: kash.Log('I')
1.57079632679489661923132169164*I

sage: kash.Sqrt(4)
2.00000000000000000000000000000
sage: kash.Sqrt(2)
1.41421356237309504880168872421

sage: kash.Floor('9/5')
1
sage: kash.Floor('3/5')
0

sage: x_c = kash('3+I')
sage: x_c.Argument()
0.321750554396642193401404614359

sage: x_c.Imaginary()
1.00000000000000000000000000000

See About this document... for information on suggesting changes.