Post Reply 
real math print: printf Xcas cmd 3/4 → ¾
02-14-2019, 12:42 AM (This post was last modified: 02-14-2019 01:06 AM by compsystems.)
Post: #2
RE: printf cmd 3/4 → ¾
Another example

PHP Code:
testPrintformat():={
  
local f,SlopeRootsAreaxpos(a)pos﹝b﹞;
  
  
assume(x,symbol);
  
  
DispGClrIO;
  
f(x):=-2*x^2-4*x+12;
  
printf("f(x):%gen",f(x));
  
  
Slope:=unapply(diff(f(x),x),x);
  
printf("Slope:∂xfx)=%gen",right(Slope));
  
  
pos(a):=-4;  print(pos(a));
  
pos﹝b﹞:=-1;  print(pos﹝b﹞);

  print(
Slope(pos(a)));  
  print(
Slope(pos﹝b﹞)) 

    
  
Roots:=solve(f(x)=0,x);
  
printf("Roots:%gen ~ %gen"Rootsapprox(Roots)); 
  
  
Area:=int(f(x),x,Roots(1),Roots(2));
  
printf("Area:%gen ~ %gen"Areaapprox(Area)); 
  return 
"Done";
}:; 

test online Xcas
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: printf cmd 3/4 → ¾ - compsystems - 02-14-2019 12:42 AM



User(s) browsing this thread: 1 Guest(s)