/*
_a,_b,....,_z :variabili definite come 'a','b',...,'z'
_A,_B,....,_Z :variabili definite come 'A','B',...,'Z'
_include,_aleph,... :variabili con un spazio davanti
include_,aleph_,... :variabili con un spazio in fondo
_include_,_aleph_,... :variabili con un spazio davanti e in fondo
VARIABILI Matematiche
A , a , ag , ag , agBig , agBOTTOM , agMIDDLE , agTOP , aleph , alpha , and , angle , apix , approx , aq , aq , aqBig , aqBOTTOM , aqMIDDLE , aqTOP , at , at , atBig , atMIDDLE , atTOP , B , bar , bar , beta , biapix , bifreccia , biimp , bitilde , bra , cap , cg , cg , cgBig , cgBOTTOM , cgMIDDLE , cgTOP , coincide , comma , cq , cq , cqBig , cqBOTTOM , cqMIDDLE , cqTOP , cr , Csi , Csi , csi , ct , ct , ctBig , ctBOTTOM , ctBOTTOM , ctMIDDLE , ctTOP , cuori , cup , Delta , delta , diesis , diff , dot , dot , dots , downarrow , Downarrow , dp , E , empty , epsilon , eq , erba , eta , exists , f , fiori , forall , Gamma , gamma , ge , grades , gt , H , I , imm , include , included , includedeq , includeeq , infty , inset , int , intBig , intBOTTOM , intMIDDLE , intTOP , iota , Jota , Kappa , kappa , ket , Lambda , lambda , leftarrow , Lefttarrow , leq , lev , line , lt , M , minus , mu , N , n0 , n1 , n2 , n3 , n4 , n5 , n6 , n7 , n8 , n9 , nablagiu , ne , noinclude , nolispe , not , notinset , nu , nu , O , o , Omega , Omega , omega , omegabar , overscore , P , p , pc , pe , Phi , phi , PI , pi , picche , plus , pm , point , PPI , prop , Psi , psi , psi , pv , qp , quadri , Re , registered , ret , rho , rightarrow , Rigtharrow , root , Sigma , sigma , slash , square , SSigma , star , T , tau , teta , tilde , times , tm , tp , tp , Tr , tra , tx , underscore , Uparrow , vel , X , Y , yupsilon , Z , zeta
bold(a,b,...,u) :restituisce in bold la stringa a+b+....+u
compatta(a,b,...,u) :restituisce la stringa a+b+..+u (come join)
compattaABvC(X,y,Z):restituisce una stringa X+(B+y[0],B+y[1],..,B+y[n-1])+Z ;serve per costruire righe o colonne (header, corpo ripetuto, tail)
fontChar(f,c) :restituisce il carattere numero c del font f.
frac(num,den) :restituiste la stringa html per stampare una frazione
join(a,b,...,u) :restituisce una stringa a+b+...+u (per continuare a usare la virgola come accorpatore)
l(a,b,...,u) :restituisce una stringa dove a,b,...,u sono impacchettati in una riga di tabella in modo da impedire al browser di andare a capo, in pratica forza la stampa in linea
lc(a,b,...,u) :come l() ma con centratura verticale (utile per le frazioni)
mat31(a,b,c) :restituisce 3 dati incolonnati
log10(x) :restituisce LOG in base 10 di x
overline(x) :per mettere il simbolo di vettore su x
pow(a,b) :restituisce b in apice rispetto ad a
red(a,b,...,u) :restituisce in bold la stringa a+b+....+u
say('x') :stampa il nome di una variabile seguito dal suo valore
sayl('x') :idem e va a capo
ssay('a','b',...,'u') :stampa il nome e i valori di una lista di variabili
saySymbols() :stampa tutti i simboli presenti in gnmath
toVett(a,b,...,u) :restituisce un 'vettore' con dentro a,b,...,u
w(x) :stampa x
ww(a,b,.....,u) :stampa a,b,...,u
wwl(a,b,....,u) :stampa a,b,...,u e poi va a capo
*/
function ww(){w(compattaABvC("","",arguments,""))}// stampa tutte le stringhe-argomenti passate
function wwl(){w(compattaABvC("","",arguments,"")+'
')}// stampa tutte le stringhe-argomenti passate
function log10(x){return Math.LOG10E*Math.log(x);}
function say(x){eval("ww('"+x+"=',"+x+")")}
function ssay(){
for(var i=0;i')")}
function w(x){document.writeln(x)} // stampa semplice
function l(){return compattaABvC("")} //restituisce in linea
function lc(){return compattaABvC("")}// idem centrata verticalmente
function join(){return(compattaABvC("","",arguments,""))}
function fontChar(f,c){ return ""+String.fromCharCode(c)+""}
var p="+",t="*",m="-",d=":"; // operatori aritmetici
var plus="+", time="*", menus="-", divide=":";
var x="x",y="y",z="z",a="a",b="b",c="c",d="d";e="e",o="o";A="A",B="B",C="C",D="D"; // variabili
var sx=" x ",sy=" y ",sz=" z ",sa=" a ",sb=" b ",sc=" c ",se=" e ",so=" o ";sA=" A ",sB=" B ",sC=" C "; // variabili con spazio
var comma=",";eq="=";
var bar="|";var _bar=" |";var bar_="| ";var _bar_=" | " // simboli comunque accessibili da tastiera
var ag="{",cg="}",aq="[",cq="]",at="(",ct=")"; // parentesi (a)perte e (c)hiuse
var s=" ",sp=s+s;spa=s+s+s;spac=s+s+s+s;space=s+s+s+s+s; // spazi pił o meno lunghi
// abbreviazioni di comandi html
/* momentaneamente sospesa
function html(){
var s="";
for(var i=0;i"
}
return s;
}
*/
// PARENTESI GRANDI **************
var atUP = fontChar("Symbol",230);var atMIDDLE = fontChar("Symbol",231);
var atBOTTOM = fontChar("Symbol",232);var ctUP = fontChar("Symbol",246);
var ctMIDDLE = fontChar("Symbol",247);var ctBOTTOM = fontChar("Symbol",248);
var atBig= mat31(atUP,atMIDDLE,atBOTTOM)
var ctBig= mat31(ctUP,ctMIDDLE,ctBOTTOM)
var aqUP = fontChar("Symbol",233);var aqMIDDLE = fontChar("Symbol",234);
var aqBOTTOM = fontChar("Symbol",235);var cqUP = fontChar("Symbol",249);
var cqMIDDLE = fontChar("Symbol",250);var cqBOTTOM = fontChar("Symbol",251);
var aqBig = mat31(aqUP,aqMIDDLE,aqBOTTOM)
var cqBig = mat31(cqUP,cqMIDDLE,cqBOTTOM)
var agUP = fontChar("Symbol",236);var agMIDDLE = fontChar("Symbol",237);
var agBOTTOM = fontChar("Symbol",238);var cgUP = fontChar("Symbol",252);
var cgMIDDLE = fontChar("Symbol",253);var cgBOTTOM = fontChar("Symbol",254);
var agBig = mat31(agUP,agMIDDLE,agBOTTOM)
var cgBig = mat31(cgUP,cgMIDDLE,cgBOTTOM)
var intUP = fontChar("Symbol",243);var agMIDDLE = fontChar("Symbol",237);
var intOTTOM = fontChar("Symbol",244);var cgUP = fontChar("Symbol",252);
var intMIDDLE = fontChar("Symbol",245);var cgBOTTOM = fontChar("Symbol",254);
var intBig = mat31(agUP,agMIDDLE,cgBOTTOM)
var intLittle = fontChar("Symbol",242);var agMIDDLE = fontChar("Symbol",237);
// **********************************************
function pow(a,b){ return a+""+b+"" }
// FUNZIONI A NUMERO DI ARGOMENTI VARIABILE
function toVett(){return arguments}
function compatta(x){var s="";for(var i=0;i","",arguments,"")} // compatta con prefisso, infisso e suffisso
function mat31(a,b,c){ // restituisce 3 dati incolonnati
return ""
}
function red(){return compattaABvC("","",arguments,"")}
function frac(num,den){ return mat31(num,"
",den)} // frazione
function overline(x){
return ""
}
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::://
//
// Here (using the 'interpret' instruction ie 'eval' ) are constructed the constants
// you will use; For each of the character of the font SYMBOL either is unusefull ("a") or
// it is the symbol we need, for example 'include'. The eval instructions will construct the variable
//
var cdot='.';
var simbols=[
"a","a","a","a","a","a","a","a","a","a" //1-10
,"a","a","a","a","a","a","a","a","a","a" //11-20
,"a","a","a","a","a","a","a","a","a","a" //21-30
,"a","a","a","pe","forall","diesis","exists","pc","and","nolispe" //31-40
,"at","ct","star","plus","comma","minus","point","slash","n0","n1" //41-50
,"n2","n3","n4","n5","n6","n7","n8","n9","dp","pv" //51-60
,"lt","eq","gt","qp","approx","A","B","X","Delta","E" //61-70
,"Phi","Gamma","H","I","Jota","Kappa","Lambda","M","N","O" //71-80
,"PI","Omega","P","Sigma","T","Y","Csi","Omega","Csi","Psi" //81-90
,"Z","aq","tp","cq","Tr","underscore","overscore","alpha","beta","csi" //91-100
,"delta","epsilon","phi","gamma","eta","iota","psi","kappa","lambda","mu"//101-110
,"nu","o","pi","teta","rho","sigma","tau","nu","omegabar","omega" //111-120
,"yupsilon","psi","zeta","ag","bar","cg","tilde","a","a","a" //121-130
,"a","a","a","a","a","a","a","a","a","a" //131-140
,"a","a","a","a","a","a","a","a","a","a" //141-150
,"a","a","a","a","a","a","a","a","a","a" //151-160
,"a","erba","apix","leq","a","infty","f","fiori","quadri","cuori" //161-170
,"picche","bifreccia","leftarrow","a","rightarrow","downarrow","grades","pm","biapix","ge" //171-180
,"times","prop","diff","dot","tra","ne","coincide","bitilde","dots","bar"//181-190
,"line","ret","aleph","imm","Re","p","tx","tp","empty","cap" //191-200
,"cup","include","includeeq","noinclude","included","includedeq","inset","notinset","angle","nablagiu"//201-210
,"registered","cr","tm","PPI","root","dot","not","vel","lev","biimp" //211-220
,"Lefttarrow","Uparrow","Rigtharrow","Downarrow","bra","a","a","a","SSigma",//221-230
,"atTOP","atMIDDLE","ctBOTTOM","aqTOP","aqMIDDLE","aqBOTTOM","agTOP","agMIDDLE","agBOTTOM","a"//231-240
,"square","ket","int","intTOP","intMIDDLE","intBOTTOM","ctTOP","ctMIDDLE","ctBOTTOM"//241-250
,"cqTOP","cqMIDDLE","cqBOTTOM","cgTOP","cgMIDDLE","cgBOTTOM","a","a","a"//251-255??
];
// Constructing variable (also with a space in front and/or at end for emproving printing)
// _diesis will be " #" , _diesis_ will be " # "
//
for(var k=33;k<255;k++){
if(k==39){nolispe=fontChar("Symbol",39);continue}
zz=( "var "+ simbols[k] + "='" +fontChar("Symbol",k) +"';" )
zpre=( "var _"+ simbols[k] + "= '" +fontChar("Symbol",k) +"';" )
zpost=( "var "+ simbols[k] + "_='" +fontChar("Symbol",k) +" ';" )
zprepost=( "var _"+ simbols[k] + "_=' " +fontChar("Symbol",k) +" ';" )
eval(zz);eval(zpre);eval(zpost);eval(zprepost);
}
//
//
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
// Here we define variable _a= "a" and _b="b" and _A="A" and _B="B" in order to use them without
// opening and closin apix
// It has been choseen to use _a to let free for the user the a variable or the i variable
// hoping user is not used to use underscore!!
// Here there is no multiple declaration with blank so if you want to write " a " just write " a ".
var autodefined=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"];
for(var k=0;k