Sponsored links: Algebra eBooks
 

Related

charat

charat("Lisp",1);

Calculate

charat-simplode

test:[1,2];

t:simplode (test);

charat(t,1);

Calculate

charat-cos-endcons-float-last-load-plot2d-rest-simplode-sin

load(stringproc);

axiom: "F++F++F";

newF: "F-F++F-F";

Calculate

charat

charat("Lisp",1);

Calculate

charat-simplode

test:[1,2];

t:simplode (test);

charat(t,1);

Calculate

charat-cos-endcons-float-last-load-plot2d-rest-simplode-sin

load(stringproc);

axiom: "F++F++F";

newF: "F-F++F-F";

Calculate

charat

Run Example
(%i1)? charat;

 -- Function: charat (<string>, <n>)
     Returns the <n>-th character of <string>.  The first character in
     <string> is returned with <n> = 1.

          (%i1) charat("Lisp",1);
          (%o1)                           L


(%o1)                                true
(%i2) 
Run Example
fpprintprec : 105;
(%o1)                                 105
(%i2) fpprec : 105;
(%o2)                                 105
(%i3) root : string(bfloat(sqrt(2)));
(%o3) 1.4142135623730950488016887242096980785696718753769480731766797379907324\
7846210703885038753432764157273501b0
(%i4) sum : 0;
(%o4)                                  0
(%i5) cint(charat(root,3))-48;
(%o5)                                  4
(%i6) 
Run Example
fpprintprec : 105;
(%o1)                                 105
(%i2) fpprec : 105;
(%o2)                                 105
(%i3) root : string(bfloat(sqrt(2)));
(%o3) 1.4142135623730950488016887242096980785696718753769480731766797379907324\
7846210703885038753432764157273501b0
(%i4) sum : 0;
(%o4)                                  0
(%i5) for d : 3 thru 102 step 1 do sum : sum + charat(root,d);
(%o5)                                done
(%i6) 	sum;
(%o6)   8 9 + 12 8 + 18 7 + 10 6 + 7 5 + 9 4 + 11 3 + 8 2 + 7 1 + 10 0
(%i7) 

Related Help

Help for Charat