Base base = calculatorApplet.getBase();
Notation notation = new Notation();
double factor = 1;
if( calculatorApplet.getAngleType() == AngleType.DEGREES )
factor = 1;//180 / StrictMath.PI;
String string = d.toHTMLString( maxLength, sigDigits, base, notation, factor );
/* String now needs formatting */
java.util.regex.Matcher matcher = html.matcher( string );
string = matcher.replaceAll( "" );
matcher = htmlend.matcher( string );
string = matcher.replaceAll( "" );